Thursday, 15 September 2011

sql server - SQL concatenate two smaller datatypes into one larger datatype -


How can I add two small datasets to a large datatype?

TinyInt (1) = 17 = 0001 0001

TinyInt (2) = 5 = 0000 0101

New small entrant = tinient (1) + tinist (2 ) = 4357 = 0001 0001 0000 0101

I am trying to do this on a MSSQL server 2008 through a stored procedure. After that the larger value will be deposited in the table.

You can pipe using the power function and then make a bitword or (|).

  Declare @x tint announced @y tinyint set @ x = 17 set @ y = 5 declare @z small set @z = @x * power (2, 8). @ Select @z  

routing - route_hierarchical, polymer and submenu -


I was working with the polymer SPA example from the dartlang.org website, decided to teach it some new tricks page The piece is loading, and now I've been left with submenu handling. So far the templates of the code do work as expected using conditional templates, but I'm stuck in routing.

So far, I have modified the page model like this:

  class page {last string name; Last string path; Final string url; Last string icon; The final ball is the default; The last bull is submenu; Last list & lt; Page & gt; Subpage; Constance Page (this.name, this.path, it.url, this.con, {this.isDefault: false, this.isSubmenu: false, this.sub Page: zero}); String toasting () = & gt; '$ Name'; }  

And I'm adding pages to the router like this:

  domReady () {for page (page in page) {if (! Page .isSubmenu) {router.root.addRoute (Name: Page: Name, Path: page. Page, Default routing: page Default, enter: enterRoute); } For other {page (page sub page page). {Router.root.addRoute (name: subPage.name, path: subPage.path, defaultRoute: subPage.is default, enter: enterRoute); }}} Router.listen (); }  

And I'm getting

 Exception: Unwanted error: Bad status: No element in the dirutium console 
is not an exception. What am I doing wrong?


android - Parsing JSON and adding to a ListView -


I would like to update a different thread which I have created with some code that I have written which is not working . I am trying to parse my information, after sending the post request, [[user from: "Andrew"], {"user": "Jimmy"}]

I like those users to pick, and add them to the list view. Here is my code to send HTTP code and then my code is trying to parse it and keep it in the adapter.

  string temp = ""; String ar []; HTTP Client HTTP Client = New DefaultHttpClient (); Http post http post = new html post (htmlUrl); & Lt; NameValuePair & gt; NameValuePair = New ArrayList & lt; NameValuePair & gt; (); NameValuePair.add (New BasicNameValuePair ("user name", "brock")); {Try HttpPost.setEntity (New UrlEncodedFormEntity (nameValuePair)); } Hold (unsupported encoding exception e) {e.printStackTrace (); } Try {HttpResponse response = httpClient.execute (httpPost); // Writing feedback to log logs log ("HTPP response:", response.toString ()); } Catch (ClientProtocolException E) {// log e Write an exception for the exception. } Hold (IOException e) {// log e Write an exception for the exception. } Try {JSONObject Pending User = New JSONObject ("$ myArray"); } Hold (JasonX Express E) {e.printStackTrace (); } // Read the reply to the string {BufferedReader Reader = New BufferedReader (New InputStreamRadder ("UTF-8"), 8); Stringbilder sb = new stringbiller (); String line = null; While ((line = reader. Readline ())! = Null () {sb.append (row + "\ n"); }                 is close(); Result = sb.toString (); System.out.print (results); } Hold (exception e) {return tap; } // try to convert the string object {JSONArray jArray = new JSONArray (result); Int count = jArray.length (); For (int i = 0; i & lt; count; i ++) {JSONObject json_data = jArray.getJSONObject (i); Temp + = json_data.getString ("user user") + ":"; } Arr = temp.split (":"); } Hold (JasonX Express E) {e.printStackTrace (); }} "Update" return; } Public string [] getStringForAdapter () {return arr; }}  

This is where I try to get it and put it on my list to go

  HTTPSend Post postender = new HTTPSendPost ( ); Post sender.setup (500, 050, "tiest", htmlUrl); PostSender.execute (); String [] Pending RequestArray = postSender.getStringForAdapter (); ArrayAdapter & LT; String & gt; Adapter = new array adapter & lt; String & gt; (This, R. L. activity_friend, pending request); PendingRequestsListView.setAdapter (adapter);  

When I try my app, I do not get any results on the list view, any help would be appreciated. Sorry for Repost, but I have so much more information and code the next time I ask a question without the code Nhinuँga which I tried. I get the error

  java.lang.RuntimeException: Unable to start the activity ComponentInfo {com.skyrealm.brockyy.findmypeepsapp /com.skyrealm.brockyy.findmypeepsapp.FriendsActivity}: java.lang .NullPointerException: storage == null  


yii - php-pdftk extension is not working on Windows -


I am using Yii 2 and XAMPP on the Windows 7 Home Edition box and trying to use PDF form I have downloaded pdftk and installed it and have binaries in libiconf2.dll and pdftk.exe C: \ Program Files (x86) \ PDFtk \ bin \

This is my code in the controller (similar to the sample given in the above extensions)

  Usage Mikehurl \ Pdftk \ Pdf; Public Function Action Index () {// Fill the form with the data form $ pdf = new.pdf ('form.pdf'); $ Pdf- & gt; Bharufaram (array ('name' = & gt; 'John do')) - & gt; Requirements Appointments () - & gt; Savage ('loaded PDF'); }  

But it does not work, nothing happens, nothing at all!

form.pdf The file is in the Webroot directory: C: \ xampp \ htdocs \ MyWebsite \ form.pdf .

It seems, my PHP script can not be found only for PDFfeaker binaries. I have tried to put them in the seller \ bin directory without any success.

As a newbie, I do not know that pdftk binaries and /


Java Runtime exec not executing batch script -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 9 जवाब

मेरे पास एक बैच फ़ाइल है पर C: \ app \ stuff \ dostuff.bat जो कि आपके द्वारा प्रदान किए गए तर्कों के आधार पर फ़ाइल सिस्टम को सामान देता है। जब मैं एक कमांड लाइन खोलता हूं, और इसे चलाने के समान करता हूं, यह पूरी तरह ठीक काम करता है:

  सी: \ एप \ सामान \ dostuff.bat zombies  

जैसे मैंने कहा, यह अभिवादन पूरी तरह से काम करता है (और zombies arg ठीक तरीके से संभालता है) हालांकि, अब मैं एक जावा ऐप के अंदर से जैसे dostuff.bat के निष्पादन को चलाने की कोशिश कर रहा हूं:

  प्रयास करें {प्रक्रिया प्रक्रिया = रनटाइम.गेटरीटाइम ()। Exec ("सी: \\ एप \\ सामग्री \\ dostuff.bat लाश"); process.waitFor (); } पकड़ (IOException | रुकावट अपवाद ई) {logger.error (ExceptionUtils.getFullStackTrace (e)); }  

जब मैं इसे चलाता हूं, मुझे कोई अपवाद नहीं मिलता है, लेकिन यह स्पष्ट रूप से बैच स्क्रिप्ट को ठीक से निष्पादित नहीं कर रहा है (मैं यह बता सकता हूं क्योंकि बाकी फाइल सिस्टम जो बैच स्क्रिप्ट को छूता है जैसे इसे संशोधित नहीं किया जाना चाहिए)। क्या मैं इसे गलत ढंग से लागू कर रहा हूं? क्या मुझे फकरिंग प्रक्रियाओं के साथ कुछ करने की आवश्यकता है? मैं कैसे डिबग कर सकता हूं?

इसे इस प्रकार देखें:

  प्रक्रिया प्रक्रिया = रनटाइम.गेटरेन्टाइम ()। Exec ("सीएमडी / सी प्रारंभ सी: \\ एप \\ सामग्री \\ dostuff.bat लाश");  

amazon web services - Time Frame based IAM User Restriction -


I have a requirement where I can access the ADS IAM users from the AWS console only to specific frames of specific days during special days Is allowed. Anyone can tell me how it can be implemented in this policy

alternative element When a policy is in effect then you specify the conditions :

In the condition element, you create such a sense in which you have the boolean operator (equal, less, etc.) ) Use your position against prices in the request. Status values ​​can include date, time , the requester's IP address, the request source's ARN, user name, user ID, and user agent of the requestor. [...] [emphasis my]

An example provided DateLessThan condition aws With: To specify the current date that the request should be received before June 30, 2013 :

  {"Version": "2012-10-17", "Statement": {"Effect": "Allow", "Action": "iam: * Access * *", "Resource": "ARN: AAS: IAM : {"Aws: currenttime": "2013-06-30T00: 00: 00Z"}}}}}    / Pre> 

As shown here , It unfortunately only works with the conditions to specify a cron expression or a particular day or day of the week in a week, with the full date:

Give the date of the date Restrict access based on comparing a key / date value You use these conditions with the aws: CurrentTime key or aws: EpochTime Or one of the time values Or the era (Unix) must be specified over time.

It is believed that your experiment is in fact, you will need to wrap position management with some automation, depending on your needs, Updates 8601 dates.


d3.js - D3 radar graph forms loops at connections -


This D3 radar chart uses cardinal-off interpolation Tiny loops appear at the starting / end connection points (axis) 1).

Enter image details here

Anyone can solve it Do you know how to make them smooth?


python - How to make a get_or_create using OR with SQLAlchemy? -


I have a way that works well or is to create, but this and filter_by . I want the same thing, but its use or, like:

  def get_or_create_or (cls, session, ** kwargs): example = session.query (cls) .filter (or _ ( **  

This does not work because i.e. does not expect keyword logic. How can I create a normalized version of this? For example, in a phone and an email to me May have been taken, and will return a line which corresponds to both. I am in a phone and an email. I want to get a line and get a line that matches any match.

Your problem It does not expect that the keyword logic is not a sensory thing to pass in the first place filter () , And _ () and or _ () all expect one or more that define the overall expression (in fact the filter () Simply put a and _ (* args) in your own * arguments in the default and 'underlying'). You must be signed in:

  def get_or_create_or (cls, session, * args): example = session.kudi (cls) .filter (or _ (* args)). First () # of the rest of the stuff  

and it should be called in such a way:

  & gt; & Gt; & Gt; Your confusion may be by using  filter_by , which is  

only comparisons of comparisons And thus the use of keyword arguments makes sense. Unfortunately, for whatever reason, there is no orring version of filter_by you can duplicate it through:

  def or_filter_by_conditions (CLS, * * Kwargs): return or_ (getattr (cls, name) = value for name, kwargs.iteritems () in value  

which changes your original method like this:

  def get_or_create_or (cls, session, ** kwargs): example = session.query (CLS) However, obviously you leave very expressive power, but come now You can only compare the similarity of its filtering conditions. Of course if you were doing anyway (which might be appropriate for a fluctuation), then this is not a great deal. 

After saying this, in general, I suggest that you have read, because there are many potentially huge passes, the way you go beyond the simple requirement to correct your query conditions Trying to do this. It will only do what you expect that if there is only one user, you are working in a session, which is ever connected to your database.


java - Recursivley return an arrayList of specific indexes -


As the title suggests, I am repeatedly attempting to return the array of student objects whose GPA is more than 3.5. Here's my attempt on this

Public stable Array list and student; Gt; Respected students (student [] list, end n) {ArrayList & lt; Students & gt; Student list = new array list & student; & Gt; (); If (n == 0) {return list of students; } Other {Boolean currentEihanhors = list [N-1] .Ehansers (); If (current ezenhares) {studentsList.add (list [n-1]); Return honor students (list, N-1); } And {return honor students (list, N-1); }}}

Hansers () certainly determines whether the GPA is greater than 3.5 or not. Not sure how exactly I am fixing it.

My method is not returning an empty array list GPA not catching any index with more than 3.5

Any thoughts? Thank you

The problem is that you are creating a new list with each recurring call:

Arreelist & lt; Students & gt; Student list = new array list & student; & Gt; ();

You need to create this list outside of the function:

  Fixed array list & lt; Students & gt; Student list = new array list & student; & Gt; (); Public Stable ArrayList & lt; Students & gt; Respected students (student [] list, end n) {if (n == 0) {return students list; } Other {Boolean currentEihanhors = list [N-1] .Ehansers (); If (current ezoneirs) {studentsList.add (list [N-1]); Return honor students (list, N-1); } And {return honor students (list, N-1); }}}  

How to get appdynamics to detect Apache Camel Business Transactions -


Did the Appendix JAVA agent get to know the Appal Camel business transaction? Select files from a directory (voting) and then send it to activemq

Important points (or similar profiles) are required to find entry points. Generally a servicelet should be "endpoint" in a preferred manner that starts threatening and can be followed. The scenario you are describing will not work because it is not "trigger" to start following. Most likely you need to create your own app-dynamics monitoring extension for this.


excel - GetData from multiple Workbooks in the same folder [correct function to add column with wbook name] -


Usually I never ask anything more because I always get some questions and have answers, mostly In matters, great

So, this is the code below which I am using, available on the Internet and not made by me.

This is working well but I want to left or right columns in the data to be extracted, this data is a simple workbook name, it is simple ... my knowledge is very much about Vba Basic, and also thinking that this should be an easy answer, I could not do it so far

  as string as Public strFileName Workbook Public dataWB as Workbook Public strCopyRange as string Sub GetData (as public currentWB) dim strWhereToCopy string, strStartCellColName string dim strListSheet string , StrCLSheet = "list" error as the strCopySheet string as Goto error sheets (Stellisthet). Selection Range ("B2"). 'This is the main loop, we will open files one by one and copy their data Set Masterdata sheet to current WB = ActiveWorkbook while ActiveCell.Value & lt; & Gt; "StrfileName = ActiveCell.Offset (0, 1) & ActiveCell.Value strCopyRange = ActiveCell.Offset (0, 2) & amp;": "& amp; Active; ActiveCell.Offset (0, 3) strWhereToCopy = ActiveCell.Offset 0, 4) .Value strCopySheet = ActiveCell.Offset (0, 6) .Value strStartCellColName = Middle (ActiveCell.Offset (0, 5), 2, 1) application. Workbooks.Open strFileName, UpdateLinks: = False, ReadOnly: = in True data sets WB = ActiveWorkbook sheets (Strokopishet). select range (Strokopirenjh). Choose select. copy the current code. sheets activate (Stroveyrtocopi). LastRow = LastRowInOneColumn (strStartCellColName) to select cells some MsgBox "looks like this: ( LastRow + 1, 1) .Select Selection.Paste Special xlPasteValues, xlPasteSpec IalOperationNone Application.CutCopyMode = False dataWB.Close false sheet (strListSheet) .Select ActiveCell.Offset (1, 0). Exit Exit Selection Loop The sub ErrH file was missing. The data copy operation is not complete. Find the last used row in the "Last Functions LastRowInOneColumn (Col)" column from the subdivision subcollection: 'Column A' in this example http://www.rondebruin.nl/last.htm Long with Dim lastRow LastRow = with ActiveSheet = line, number, color). End (XLEEP). LastRowInOneColumn = Row End With Last Line End Function  

If I understand correctly, you want the name of the source file in column A, while the file The Eta column starts in B? That should do:

  Sub GetData () Dim strWhereToCopy string, strStartCellColName string as dim strListSheet string, strCopySheet string strListSheet = "list" In the form of error as Goto ErrH sheets (strListSheet). Selection range ("B2"). 'This is the main loop, we will open files one by one and copy your data into the masterdata sheet. Turn on WB = ActiveWorkbook while ActiveCell.Value & lt; & Gt; "StrfileName = ActiveCell.Offset (0, 1) & ActiveCell.Value strCopyRange = ActiveCell.Offset (0, 2) & amp;": "& amp; Active; ActiveCell.Offset (0,3) strWhereToCopy = ActiveCell.Offset 0, 4) .Value strCopySheet = ActiveCell.Offset (0, 6) .Value strStartCellColName = Mid (ActiveCell.Offset (0, 5), 2, 1) application. Workbooks.Open strFileName, UpdateLinks: = False, ReadOnly: = True Set Data WB = ActiveWorkbook Sheet (Strokopirate) Select Range Select the selection Copy the current code Activate Sheets (StrawberryTokopy) Select LastRow = LastRowInOneColumn (strStartCellColName) 'Paste data starts in column # 2 (B) cells (lastRow + 1, 2) .Select Selection.PasteSpecial xlPasteValues, xlPasteSpecialOperationNone Application.CutCopyMode = false only population range (cells paste file name in column 1 (A) for all rows (LastRow + 1,1), cells (LastRowInOneColumn (StrStartCellColName) , 1) .Value = strFileName dataWB.Close false sheet (strListSheet) .Select ActiveCell.Offset (1, 0) .Select Exit Exit Loop sub ErrH: MsgBox "It looks like some files were missing the data copy operation is not complete . Exit sub-sub all  

The key I have two lines of comment - Paste starting in column 2 instead of 1, then fill the column 1 with the last known use with the filename. Line up the current last used line In the example I was a little lazy and pasted the full path, but only the name of the SE and the whole of Google's path paths are extracting the filename.

In addition, I followed the pattern by selecting , select , but if you modify the code to eliminate all , then and ActiveCell references, it will run very fast.


java - Alert Dialog - how to implement Cancel and Okay button -


I have received this alert dialog in which there are two buttons (OK and cancel). I want to know how I know about implementing it.

So when you click the Cancel button, it should close the warning dialogue and return to the piece that I am currently in. And if I click on OK button then it should change the current warning dialogue and put it in another place.

This is under the consent for my code. Java file;

  public class confirmed DialogFragment {@Override public discourse onCreateDialog (bundled savedInstanceState) {extends last AlertDialog.Builder builder = new AlertDialog.Builder (getActivity ()); Layout Inflter INF = getActivity () GetLayoutInflater (); See last DIALAG = inf.inflate (R.layout.example_xml, null); Builder.setView (theDIalog); AlertDialog dialog = builder.scent (); theDIalog.findViewById (R.id.makeaTransferOk) .setOnClickListener (New View.OnClickListener () {@Override public void onClick (View v) {Toast.makeText (getActivity (), "OK button", Toast.LENGTH_SHORT) Show ();}}); theDIalog.findViewById (R.id.makeaTransferCancel) .setOnClickListener (New View.OnClickListener () {@Override public void onClick (View v) {dialog.dismiss ();}}); Return dialog; }}  

This is my code for example_xml;

  & lt ;? Xml version = "1.0" encoding = "utf-8" & gt; & Lt; RelativeLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" android: orientation = "vertical" android: Layout_width = "Match_parent" Android: Layout_height = "Wrap_content" android: background = "# ffc0c0c0 "& Gt; & Lt; Button Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" Android: Cancel text = "or" android: id = "@ + id / makeaTransferCancel" / & gt; & Lt; Button Android: Layout_width = "Wrap_content" Android: Layout_height = "Wrap_content" android: text = "right" android: id = "@ + id / makeaTransferOk" / & gt; & Lt; / RelativeLayout & gt;  

Please someone can help me

Try the functionality that you have described above:

  AlertDialog.builder builder1 = New AlertDialog.Builder (reference); Builder1.setMessage ("Write your message here."); Builder1.setCancelable (true); Builder1.setPositiveButton ("OK", New DialogInterface.OnClickListener () {Click on Public Zero (DialogInterface Dialog, IND ID) / / put your code, when necessary that when right click is done then dialog .cancel ();}}); Builder1.setNegativeButton ("Cancel", New DialogInterface.OnClickListener () {public void onClick (DialogInterface dialog, int id) {dialog.cancel ();}}); Alert Demo Alert 11 = Builder 1.create (); Alert11.show ();  

bash - How to find all files and separate results by comma on Unix? -


मैं मानक find आउटपुट से जाना चाहूंगा जो कि:

  पथ / प्रति / file1.yaml path / to / file2.yaml path / to / file3.yaml  

इसे करने के लिए:

  पथ /to/file1.yaml,path/to/file2.yaml,path/to/file3.yaml  

कमांड लाइन से ऐसा करने का सबसे आसान तरीका क्या है?

< P> मैंने इन चीजों की कोशिश की है:

  ढूंढें -पाथ '* .yaml' | Sed -e 's / \ s /, / g' ढूंढें -पथ '* .yaml' -print0 | Sed -e's / /, / g ' 

लेकिन काम करने में प्रतीत नहीं होता।

फ़ाइल नामों को अल्पविराम के साथ अलग करने के लिए यहां एक तरीका है:

  ढूंढें -पाथ '* .yaml' | यदि फ़ाइल नामों में सफेद स्थान नहीं है, तो एक और तरीका है:  
  IFS =, प्रतिध्वन $ (tr) '\ n' ','  

टिप्पणियों में, कोजिरो एक तीसरा दृष्टिकोण सुझाता है जो कि व्हाइटस्पेस को संरक्षित करता है:

  ढूंढें। -पथ '* .yaml' -print0 | ट्र '\ 0',  

ध्यान दें कि, क्योंकि नए नाम और अल्पविराम को फ़ाइल नामों में अनुमति है, इस प्रारूप से भ्रम हो सकता है। इस प्रारूप का उपयोग केवल तभी किया जाना चाहिए, अगर आपको पता है कि आपकी फ़ाइलें समझदारी से नामित हैं।


WSO2 API Manager - Make the API Store Default Component -


I am using WSO2 API Manager 1.8 and it has been deployed on the cloud according to HAPRCCE. I have been given an IP https://192.168.X.XYZ for accessing the API Manager, which is an IP given to Cloud Instance.

My problem occurs when I type https://192.168.X.XYZ , it loads the publisher, what I have to do, the publisher to load Instead of loading the API store. The basic idea is that the domain will be mapped to the above IP address. Therefore, when a user types, the domain user should be shown that API is not API API publisher.

https://192.168.X.XYZ -> https://myapistore.com

How do I configure API Store to WSO2 API Manager 1.8? Can the API be loaded instead of the publisher?

These and lt; AM_HOME & gt; In the / repository / components / plugins directory , there is a bundle called "org.wso2.am.styles_1.xxjar". Open this jar and its component.xml file located in the META-INF directory. You should note that the default-reference is indicated on the publisher , change it to store and update the jar.

& lt; Reference & gt; & Lt; Reference ID & gt; Default reference & lt; / Reference ID & gt; & Lt; Reference Name & gt; Shop & lt; / Reference name & gt; & Lt; Protocol & gt; Http & lt; / Protocol & gt; & Lt; Details & gt; API publisher default reference & lt; / Description & gt; & Lt; / References & gt;

Restart the server after doing the above.

Now, if you try to access the root URL of the server, it will be redirected to the API store ().


apache spark - SparkSQL and UDT -


I try to use SparkSQL (v.1.3.0) to access a PostgreSQL database. I have a table in this database

  Make the Tables Test (id bilint, double working []) ;;  

To access the table, I use

  val sparkConf = new SparkConf (). SetAppName ("TestRead") SetMaster ("Local [2]") Val Scheduled = New SparkContext (sparkConf) Val sqlContext = New SQLContext (Scheduled Cast) Val jdbcDF = sqlContext.load ("JDBC", Map ("url" -> "JDBC: PostgreSQL: // ... "," dbtable "- & gt;" schema.test "," user "- & gt;" ... "," password "->" ... ")) sqlContext However, every time I try to reach the table containing this array I get a  java.sql.SQLException: .sql ("select * from schema.test")  . Unsupported type 2003  

I have found an example inside the SPARC test code, which makes the UDT for two-dimensional point (see) in spark. However, I do not know how I can use this code.

This can be obtained at least by casting pyspark

I'm not sure that the syntax is correct, but something like this will go:

  val query_table = "(select ID, cast ( Value text as) Schema.test) AS casted_table "val jdbcDF = sqlContext.load (" jdbc ", map (" url "->" jdbc: postgresql: // ... "," dbtable "- & Gt; query_table, "user" - & gt; "...", "password" -> "...")) jdbcDF.map (x => (x.id, x.values. ToArray))  

I'm pretty sure there is no .toArray , which will put a string representation back into the array, it just Ark code .. but now it is a matter of parsing correctly.

Of course, this is just a patch, but it works.


inheritance - Scala: "class type required but {trait} with {trait} found" when inheriting from mixin type alias -


I have a very common type nickname defined:

  Package Object Policy Function0 [K]}  

with {type keyGen [K] serializable} but when I try to inherit it:

import Java.security.Key Case Class Fixed Keygen Key Keyword: KeyGen [Key] (Override Def) (): Key = Key} Expand

The Meowen Compiler gave me the following error:

  [error] / ho Me / peng / git / datapassport / core / src / main / scala / com / schedule1 / datapassport / policy / ValueMapping.scala16: class type is required but () = & gt; [ErrOR] ^ [ERROR] / home / peng / git / datapassport / core / src / main / scala: [Error] [key] extension of [key] key [key] / Com /schedule1/datapassport/policy/ValueMapping.scala16: com.schedule1.datapassport.policy.KeyGen [java.security.Key] does not have a manufacturer [Error] Case category Fixed keygen (key: key) Keygen [Key] { 

What's going on here?

T thinks that you are allowed to directly expand a compound type in that way. That is, Function0 [K] is not a class type and it's own, it's a mixed type without the connector, and this is the key to expand something without the constructor, in fact It does not seem that the type nickname does something like this (note the four brackets of the type):

  The case is fixed square (key: key) (function 0 [key] serialable With) override F Apply (): Key = Key}  

We get the same error:

  & lt; Console & gt; 20: Error: Class type is required but () => Fixed the category found with Java.security.Key Serializable Fixed keygen (key: key) (function 0 [key] with serial)   is not a class type. 

But, this definitely works if I remove the brackets without them, Fixed Kigen is expanding without Function0 and serialjob Shaking With it, it is trying to expand a compound type.

To work around it, you only want to use one attribute, instead:

  attribute keygen [k] Function with a serial case class that [ (Key: key) keygen (key) (override DRF): key = key}  

tfs - TFSBuild.proj import common targets after getting from source control -


I am currently writing / cleaning our TFS build, and I have seen that we have many duplication Are there. I was wishing to create a "normal targets" file, which makes all our TFS (approximately 30), imports.

I have tried some things with these things:

   & Lt; Import Project = "$ (Build Definition) .proj" /> & Lt; PropertyGroup & gt; & Lt; ProjectName & gt; Felix.LincsPublishingHandlers & lt; / ProjectName & gt; & Lt; / PropertyGroup & gt; & Lt; Import Project = "$ (Build Directory) /src/BuildScripts/Common/CommonTargets.targets" / & gt; & Lt; / Project & gt; Where  

Where:

  • $ (BuildDefinition) .proj -> Project / Environment specific properties (such as DB connection strings, IP addresses). >
  • CommonTargets.targets used in all different projects -> defined in the build definition> source setting
  • However, when I try to run on the TFS build agent (if any Need to know if version 2010), it tries to run the statement before copying source f Below the files, I get an error saying that the CommonTargets.targets file does not exist.

    I have seen a look around the web, and the solution I have completed so far is to use:

    • The same folder containing the TFSBuild.proj file Copy the Common.targets file in
      • I have 20+ different folders built in
      • I would like them to use a single common.targets file (a Only 20 copies of the file)
    • Target a common location. Build server (s) that use TFS build agents
      • I have to do the rest in control with the script and the source control.
      • As we are doing a type of migration project, mangoes. Titres will change for a short time, so the source will be best in control

    TFS source control is placed in a Common.targets file import Trying to do has come to any kind of issue

    Secondly, you should consider updating your build system to use a modern method. Use the TFS 2013 template and PowerShell.


javascript - Generate fresh django CSRF token on each login -


I want to log in form for my websites is a new token for each new CSRF that is generated fresh.

I tried to call

  logout (request) request.session.flush ()  

but the secret form area is always a It is the same token, even after restarting the server.

Its obvious meaning is that DJengo is reading data from the cookie. I do not mind this like cookies in this way and how does one generate a fresh one?

Alternatively, for me, an intermediate page clears all cookies before going to the actual login page? How to delete all cookies for your domain in a javascript

You can manually restore the token Is as follows:

 request.META _get_new_csrf_key django.middleware.csrf import  ["CSRF_COOKIE_USED"] = true request.META ["CSRF_COOKIE"] = _get_new_csrf_key ()  < / Pre> 

In Django> = 1.6, you should instead use django.middleware.csrf.rotate_token (request) , which actually does this.


timer - Compile FFTW for ARM -


I am trying to compile the FFTW library to use on the ARM processor, but when compiling the library, Errors are available:

  timer.c: 89: 2: error: #Terror "not defined timer" #Terror "timer is not defined" ^ timer.c: 119: 1: error: Unknown type name 'mytime' static mytime t0 [BENCH_NTIMERS];  

To create a makefile, I use the provided config file, and use it like this:

  ./configure - Enabled-float -with-slo-timer - host = i686-pc-linux-gnu - enabled-single-enabled-neon "cc = arm-axilin-abi-gcc -mcpu = cortex-A9-m ​​float- ABI = softf ""  

What could be the reason for this error? Is there a way to solve them without messing with the code?

Thanks

As far as I know that a cortex-A9 If there is always a timer unit, then I think there is a cycle counter in it, as mentioned in the context of fftw3, you may not use a slow-timer option which is bad anywhere in this case.


r - Retrieving sets of covarying variables -


I have a data frame that has a large number of variables that differ over time in the form of an index for them. I want to retrieve the sets of highly variable variables.

  data & lt; - data.frame (time_series = c (1,2,3), score 1 = c (0.5, 0.4, 0.6), score 2 = c (0.3, 0.2, 0.1), score 3 = c (0.1, 0.4, 0.5) ), Score 4 = C (0.5, 0.2, 0.4), score 5 = C (0.1, 0.1, 0.2))   

Two functions that should give the same result,

< Pre> libraries (statistics) with a #autocorrelation function, a data frame on ACF_rate lag 0 & lt; - ACF (data [2: length (name (data)), plot = false, lag.max = 0) #Simple Pearson correlation function. Cor_results & lt; - cor (data [2: length (name (data)), method = "pearson"

results in a simple (X_results> 0.6) , But it starts losing the names of variables.

I am trying to extract the set of threshold boundaries from the dataframe on a large scale. I hope that I am missing some simple built functions I

Edit: I realized that Spearman would be an absolutely wrong act for this, because It will rank only with the time limit as well.

You do something like that (Cor_results> 0.6) - (cor_results> 0.6) - (cor_results & gt; length: (name (data)), method = "useless" x <-> ; Arr.ind = TRUE) x # row call # score 1 1 1 # scores 5 5 1 # scores 2 2 2 # 3 3 3 # scores 5 5 3 # scores 4 4 scorers 1 score 5 5 score 3 3 5 score 5 5 5 5

To get the matrix of the cells of the cells that meet your needs, To make you more readable, you can

  x []  

php - Access denied to call LinkedIn's API -


I have followed the steps to keep an access token ().

This is my code;

  Route :: post ( 'R', function ()  

 {$ c = curl_init (); $ firstName = Request: Input ('firstname'); $ lastName = Request :: Input ('lastname'); $ resource = '& amp; firstname =' ... $ firstName '& amp; last name =' .. $ lastName '& amp; type = connection; $ parameter = array (' oauth2_access_token '=> session: get (' ACCESS_TOKEN '),' format '=>' json ',); $ POSTDATA = http_build_query ($ parameters); $ url = $ POSTDATA $ resource; curl_setopt ($ c, CURLOPT_URL, $ url '?' ..); curl_setopt ($ c, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ c, CURLOPT_HEADER, true); $ output = curl_exec ($ c ), If ($ product === incorrect) {trigger_error ( "Erreur curls: '.curl_error ($ c), E_USER_WARNING); exit (' error ');} else {var_dump ($ output); exit (" Results ");} Curl_close ($ c);});   

And this "error": 0, "message": "has denied the people search.", "Request ID": "DHYNQTZDN8", "Status "403," timestamp ": 1426519095912}

someone could be used to advise me to find a solution

thanks in advance, David Mureşus

You need special permissions from LinkedIn to use the Search API.


curl writes to cookie jar file, but does not appear to read -


I am not using PHP curls, but just running as a command line:

< Pre> curl-i-l-c cookie / my website's dot. TT-A 'Mozilla / 5.0 (Windows NT 6.1; WA64; RV: 36.0) Gecho / 20100101 Firefox / 36.0' https://www.mywebsite.com/

to print the results For, I'm receiving a set-cookie in the header for PHPSESSID, so the site is setting a session cookie on the initial contact, and I confirm the cookie jar file Cookies / mywebsite.com.txt is set with this information.

However, I think that curl, on the next page call I (for example, https://www.mywebsite.com/about-us ), the previous page's cookie Not sending information, as I've noticed that I'm getting the set-cookie once again with the header line, but with a different PHPSESSID value.

Is there any way to confirm this, and what could be the reason for this?

Note: The permissions cookie jar file is owned by iWww-data (Apache User) and it is also clearly written that this is not just issuing session, and I do not know how to know That curl is sending out as a header, only what he is getting.

To send and receive cookies, I think that I would like to -b And -c are required to do the following:

  curl -i-l-b cookies / mywebsite.com -c cookies / mywebsite.com .txt -A 'Mozilla / 5.0 (Windows NT 6.1; WV64; rv: 36.0) Gecko / 20100101 Firefox / 36.0' https://www.mywebsite.com/  

I section here The last example found in 9.2 and used:

Except that I use it clearly for both of them File name

The solution to this problem. Hope this helps someone else.


gruntjs - Grunt useminPrepare - not all CSS files are included in build (Yeoman) -


मेरी यह index.html फ़ाइल में है:

  & lt;! - build : सीएसएस (।) शैलियाँ / vendor.css - & gt; & Lt;! - bower: सीएसएस - & gt; & Lt; link rel = "स्टाइलशीट" href = "bower_components / bootstrap / dist / css / bootstrap.css" / & gt; & Lt;! - एंडबोवर - & gt; & Lt; link rel = "स्टाइलशीट" href = "शैलियाँ / फ्लैगसैस" / & gt; & Lt;! - endbuild - & gt; & gt; & Lt;! - बिल्ड: सीएसएस (.टीएमपी) शैलियों / मुख्य कैस - & gt; & Lt; link rel = "स्टाइलशीट" href = "शैलियों / मुख्य कैस" / & gt; & Lt;! - endbuild - & gt;  

इसलिए मैं 3 सीएसएस फ़ाइलों से जुड़ रहा हूँ। जब मैं अपनी ग्रन्ट बिल्ड स्क्रिप्ट चलाता हूं, जो कि यमन पर आधारित है, तो मैं अपना विक्रेता सीएसएस और मेरा मुख्य सीएसएस प्राप्त करता हूं, लेकिन विक्रेता सीएसएस में flags.css का हिस्सा गायब है।

यहां मेरे ग्रन्टफ़ाइल.जेएस का प्रासंगिक हिस्सा:

  useminPrepare: {html: '& lt;% = yeoman.app% & gt; /index.html', विकल्प: {dest: '& lt;% = Yeoman। डाइस्ट% & gt; ', प्रवाह: {html: {steps: {js: [' concat ',' uglifyjs '], सीएसएस: [' cssmin ']}, पोस्ट: {}}}}}, // प्रदर्शन फ़ाइलरेव और यूज़िन के आधार पर पुन: लिखता है। कॉन्फ़िगर कॉन्फ़िगरेशन यूज़मन: {html: ['& lt;% = yeoman.dist% & gt; / {, * /} *। Html'], सीएसएस: ['& lt;% = yeoman.dist% & gt; ; / शैलियाँ / {, * /} *। Css '], विकल्प: {assetsdirs: [' lt;% = yeoman.dist% & gt; ',' & lt;% = yeoman.dist% & gt; / चित्र ']} },  


angularJS valdr + ui-select validation -


I was messed up on this issue but still I could not find the right discussion about it. We are using Vallar and UI in a form (angularjs app) and we have encountered this problem that the input of the UI-Selection renderer will not get the name attribute, and since then, angular throws an error:

  Error: The form element with id is not bound to the "undefined" field name. On d.link (http: // localhost: 8080 / bower_components / valdr / valdr.min.js: 1: 8414) at invokeLinkFn (http: // localhost: 8080 / bower_components / angular / Angular.js: 8141: 9) On nodeLinkFn (http: // localhost: 8080 / bower_components / angular / Angular.js: 7653: 11) at compositeLinkFn (http: // localhost: 8080 / bower_components / angular / angular.js: 7009: 13) at nodeLinkFn (http : // local host: 8080 / bower_components / angular / Angular.js: 7648: 24) at http: // local host: 8080 / bower_components / angular / Angular.js: 7884: processQueue 13 (http: // localhost: 8080 / Bower_components / angular / Angular.js: 13071: 27) at http: // local host: 8080 / bower_components / angular / Angular.js: 13087: .. $ 27 get.Scope $ eval ($ http: // localhost: 8080 /bower_components/angular/angular.js:14287:28) at scope $ get.scope $ digest (http: // localhost: 8080 / bower_components / angular / Angular.js: 14103: .. 31) K & lt; Input type = "autocomplete =" off "tabindex =" - 1 "aria-expanded =" true "aria-label =" {{$ select.baseTitle}} "aria-owns =" ​​UI-Selection-Option - {{$ Select select.Create IID}} "Area -activedescendant =" ui-Selection-Options Line - {{$ select.generatedId}} - {{$ select.activeIndex}} "class =" Form Control ui-Selection- Search ng-ancient ng-insulated nG-valid "placeholder =" {{$ select.placeholder}} "ng-model =" $ select.search "ng-show =" $ select.search enabled & amp; amp; $ Select.open "& gt;  

So we tried some hacks on the UI-Selection Directive, like template catches, hidden information with the same model, but the result is the same.

BTW template catches rewriting is the worst method of this instruction used for use by other reasons for this instruction and we can not hack the whole app.

Was anyone experiencing this problem?

Code snippet:

If Name attribute input element valdr throws an exception but does not exist.

ui-select internally creates an input field without name > error. Therefore error

You can try to get rid of the error. return (function) (return to 'e', ​​compile): function () {return} {return: (function, field, element, Etters) {// If the input is made by Ui-select and is the NG-model if (element.hasClass ('UI-Selection-Search') & amp; amp; Attrs.ngModel) {if (! Attrs.name ) {// If there is no name in the input attrs.name = 'ui-select' + (++ count); // Assign name}}}}}}})


List of tuples c++ -


I am a newbie in C ++ and I would like to know whether it is possible to write this C # declaration in C ++ in Tupla, please

.

Public List & lt; Tupal & lt; Int, double> & Gt; [] Tab;

I do not know in my .h file and my. What is the announcement in CPP

Thanks for your help

  # Include & lt; List & gt; # Include & lt; Tupal & gt; Std :: List & lt; Std :: tuple & lt; Int, double> & Gt; Tab;  

& lt; Tupal & gt; A C ++ 11 is additional. I believe if you need two types in your tubal, you can type std :: pair in & lt; Utility & gt; .

.

Deleting Semi-blank records in Excel through VBA -


I am trying to delete rows in VBA which are not completely empty because I am saying this because I I can not apply the conditions to clear completely like my first column is never empty and I want to filter on the second column.

find lastrow = sht.Cells ("*", search order: = xlByRows, searchdirection: = xl pre). = 1 for I = 1 activate = "" then select. Enterro Counter = Counter - Delete 1 other ActiveCell.Offset (1, 0). Select End End Next I (given information) Desired Results Name ID Address Name ID Address John NYC Jack 55 Chicago Jack 55 Chicago Cate 65 Boston Kate 65 Boston Mike London

Now Offset Always On the next line but if I have another column in the row blank, then how do I delete the entire row? Thank you.

You can display only the rows to delete an .autofilter

  with sub nuke_BLank_Bs () from ActiveSheet. With (1, 1) .CurrentRegion if .autofilter then .AutoFilter .AutoFilter Field: = 2, Criterion 1: = "=" with .Offset (1, 0) If CBU (App. Settle (103. Seals) ) so _. Innero Delete and end with Endfilter End & End and End and End and End and End.  

This filter will filter for empty entries in column B. and delete all the rows if entries are found

< / Div>

Android Get next batch of sms/mms -


I need to recover the next 20 messages from DB in Android. I use the following code below to the first 20 messages Retrieving:

  Ury Provider = Uri.parse ("Content: // MMS-SMS / Chat /" + threadid); Cursor cursor = contentResolver.query (provider, new string [] {"_ id", "ct_t"}, empty, blank, "_id desc limit 20"); // Then used the id to get the actual message  

This is working fine but I have to get the next 20 threads from the next thread ID and below. I tried to add the selection:

  "_ id & lt; lastmessageId"  

but it gives me a null cursor I have another The solution is to use the code above, but the limit of 20 is increased, but it will return unnecessary rows of data. Can anyone help me with this? ! Thanks

Edit :. I found this in the log

  SQLiteException: (unclear column name: _ id (code1): while compilation: select _ id, from ct_t (as DISTINCT date * 1) Select normalized_date, _ id, select NULL SMS from ct_t (_ id & lt;?! And thread_id = 25 and (type = 3)) select UNION DISTINCT date * 1000 normalized_date, pdu._id, ct_t PDU from left to pdu._id = pending_msgs.msg_id Where are the pending_msgs JOIN (? _ Id & lt; and thread_id = 25 and msg_box = 3 and (msg_box = 3 and (m_type = 128 or m_type = 132 or m_type = 130))! ) Select UNION DISTINCT as the date * 1, where normalized_date, _ id, cellbroadcast (_ id The description range of order by ct_t null _ id from the & lt; and thread_id = 25) 20) the order limit is 20 by dd)  

is there any way that i just where Can only add section of SMS table?

The cursor should not be empty as if the query does not return the results, its size (cursor .getCount () Will be 0.

It is definitely true to use selection and selection - selection ==> "_id & lt;?" And selectionArgs ==> string lastThreadId [] {lastThreadId.toString ()}

The integer provided or its one if int you can use String.valueOf (lastThreadId) to wrap in a string.

In addition to this, you can use "_id"; +++++++++++++++++++++++++++++++++++++++++ ++++++++++++ "

linux - bash script while loop -


Hello I'm new in bass scripting. This is my script which I am using, while this loop server ping the IP in the file Is working on providing input, but I want to use those IPs so that I can do the files of each of the following given below, but I think there is some problem with it if there is more loop in it. But it is not working only takes one IP in the form of input and can only create a file and adding it to the required file which is not working on the whole input, it is to say that the file is 5 ips It only creates the first IP file.

  #! / Bin / bash l2 = $ (tail1 / root / server file | grep hasoop | tr '' '\ n' | grep hasoop) awk '{print $ 1}' & lt; ServerFile.txt | While reading IP; If Ping-C1 $ ip & gt; / Dev / null 2 ​​& gt; and 1; Then CD / USR / Local / Negies / etc / Object / Hadoop CP Hadoop-node.cfg $ l2.cfg sed -i '/ 192.168.0.1 /' $ ip '/' $ l2.cfg sed -i '/ Hadoop -Node / '$ l2' / '$ l2.cfg resonance' cfg_file = / usr / local / nagios / etc / objects / hadoop / $ l2.cfg ">  
< / Div> P>

css - wordpress sidebar vertical spacing between Li -


In WordPress, the left sidebar text is too long and it is wrapped, due to which there is actually a vertical space between the li. How can I correct this? Any help is appreciated I have attached the screenshot below.

Enter image details here

< Div class = "post-text" itemprop = "text">

You font-size: 11px; should be removed in . Sidebar - Left one and add it to . Sidebar - left . Finally looks like this.

 . Sidebar li {list-style: none; Font-size: 11px; }. Sidebar-a left {color: # 232324; Text-decoration: None; }  

PHP Internal Memory Bloat -


I need to process some large files. I have found that PHP functions use large part of memory. In the example below, the memory used by PHP functions ends up being four (4) times the file size, but I can understand the transient use of the file's memory size twice, but not four times. Finally stripe out the _limit PHP memory. Although I can increase the PHP memory_limit it is not a good long-term solution, because I may have to process large files, and the PHP per process in the production environment is not worth the 400 MB, is not desirable.

Code:

  $ buf = ''; Report_memory (___LINE__); $ Buf = file_get_contents ('./20MB.pdf'); Report_memory (___LINE__); Base64_encode ($ buf); Report_memory (___LINE__); Urlencode ($ buf); Report_memory (___LINE__); Function report_memory ($ line = 0) {echo 'line:'. Str_pad ($ line, 3) "'; Echo 'Mem:' Str_pad (intval (memory_get_usage () / 1024) 'K', 8). ''; Echo 'peak:' str_pad (intval (memory_get_peak_usage () / 1024). 'K', 8). ''; Echo "\ n"; }  

Output:

  Line: 4 mem: 622 peak: 627 km Line: 7m: 21056 peak: 21074 line: 10m : The top of 21056: line of 48302: 13mm: 21056 peak: 82358  

Anyone can see that 21 MB for current memory usage for a 20 MB file, while the extreme Memory usage jumps up to a crazy 82 MB. / P>

The PHP functions used in this example are unchecked, I can easily swap from str_replace, is_string, gettype, etc. with the same result.

The question is how can I do PHP?

You are url-encoding, seeing that your PDF is basically" random "binary waste, without the MANY of the bytes -printing is that it means that you are moving a byte "binary" character to a 3+ byte URL-encoded string. You've got 20 MEG PDFs, it's no surprise that three times the amount of text is bloating your memory, remember that PHP has to keep two copies of your PDF, when it's working: the original " Raw "version, and copying the work you are working on.

One of the worst situations is "Every single character is encoded", your 20 mg PDF will be converted into 60 MEG URL-encoded string, due to which 20 + 60 = 80 mega pixels are used, even if Only the 60 MEG encoded version is thrown away immediately.


php - How to order mysql results in the order I specify the row id's inside the "IN" condition -


क्वेरी है:

  का चयन करें * स्टॉक से `` स्टॉकआईड`` में ( 33, 12,53,4,99,88)  

लेकिन जब मैं क्वेरी चलाता हूं तो यह पंक्तियों को 33, 12, 53 आदि के क्रम में नहीं लौटाता है

मैं php का उपयोग कर रहा हूँ उपरोक्त एक सरल उदाहरण है।

आप फ़ील्ड द्वारा क्रम का उपयोग कर सकते हैं

 < कोड> SELECT * से स्टॉक `जहां` स्टॉकआईड` IN (33, 12,53,4,99,88) क्षेत्र द्वारा आदेश (स्टॉकआईडी, 33, 12,53,4,99,88)   

c++11 - Proper ways to initialize member variables with identical names as the parameters -


I get a square that looks like

  class rational {public: Logical (int P = 0, int q = 1): p (p), q (q) {}; Private: int p; Int q; };  

My question is about the initial syntax where the member variables and the constructor parameters are the same names. Now I know that it is legal to do this, but my question is if I want to I'm "clean", so I'm easy to understand if I can do as I normally do in Java:

  // Legal Java code this.q = q ; This p = p; // Is any of these legal C ++ code (if yes, then what)? This.q (q); This.p (p); // or this- & gt; Q (q); This- & gt; P (P);  

Although I have not tested it, and I can test it, I still want to know the C ++ conventions of doing so.

in C ++ , you must say:

< Pre> this - & gt; Q = q; This - & gt; P = P;

or equivalent

  (* this) .q = q; (* this). P = P;  

But I think the member initializer list syntax

  logical (int p = 0, int q = 1): p (p), q ( Q) {}  

Cleaner (note the lack of a semicolon!) Why do not you like it?


grails - GStringImpl cannot be cast to java.lang.String -


I got an error in using grails and spring security. Someone has such a problem.

  error. Exception in thread "Thread-15" error. Java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl can not be entered in java.lang.String error. Org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher.run (GrailsProjectWatcher.java:114)  

and

  java.lang.IllegalArgumentException : Have you generated all the sections (user, etc.)? User_name ' 

role ...) What does your order look like? This way grails s2-quickstart com.testapp user role ? Check your configuration and see it in this tutorial.

Actually this error means that you use a GString like "$ {my_var}" and some classes are expected to be string. It can not be inserted automatically. If you have such a code, you have to change it in the string: "$ {my_var}". ToString () .


.net - Resolve strange compiler error -


I have such lines:

  String as myNewStringValue: myNewStringValue = "Hello"  

I am trying to convert them all into several lines, that is, to remove the character, because : However, it results in a strange compiler error:

Enter image details here

after that Some can not even, I do conclude it is I, even if I undo all the error persists.

Is there anything that I can stop it?

Based on the question, usually something like clear solution and then Can be solved by rebuilding solution .

It is not always enough for yourself to do reconstruction solutions for just .


linux - Permissions for a Bash Script -


मेरे पास एक स्क्रिप्ट है, जो /home/domain/cron/backup.sh में स्थित है

मैं मूलतः यह क्रॉन नौकरी है जो कि mysqldump का उपयोग करके mysql डेटाबेस का बैक अप लेना चाहता है। कमांड काम करता है जब मैं एसएसएच में लॉग इन हूं, लेकिन जब मैं क्रोन नौकरी से फाइल को चलाने के लिए चाहता हूं तो वह अनुमति से वापस आता है।

जिस फ़ोल्डर को मैं डंप करना चाहता हूँ उसे 'dbbackup' कहा जाता है । अगर मैं इस फ़ोल्डर पर ls -al चलाता हूं तो मुझे मिलता है:

  drwxrwxrwx 2 रूट रूट 4096 मार्च 16 14:07 ./ drwx - x - x 14 gf Gf 4096 मार्च 13 14:47 ../  

gf प्रणाली पर एक और उपयोगकर्ता है, और वह उपयोगकर्ता है जो क्रॉन स्क्रिप्ट के रूप में चलता है।

जब मैं क्रॉन नौकरी चलाता हूं, तो मुझे निम्नलिखित प्रतिक्रिया मिलती है:

डेटाबेस2015-16-03-2015.sql: अनुमति से वंचित

मैं केवल एसएसएच को ग्रेफाइट नामक उपयोगकर्ता के रूप में लॉग इन कर सकता हूं, यूज़र जीएफ में शेल एक्सेस नहीं है इसलिए मैं उनके रूप में लॉग इन नहीं कर सकता।

Mysqldump कमांड है:

mysqldump db_2015 & gt; /

मजबूत> संपादित करें भविष्य के संदर्भ के लिए और जो भी निराशा होती है, उसके लिए आने वाले किसी भी व्यक्ति को मुझे समाधान मिल गया था।

मूलतः मैं नियंत्रण कक्ष के माध्यम से क्रोन नौकरी सेट करने की कोशिश कर रहा था, उपयोगकर्ता gf के तहत (जो कि एसएसएच पहुंच नहीं है और इसलिए मैं कमांड प्रॉम्प्ट पर प्रवेश नहीं कर सकता)। लेकिन बेशक इस उपयोगकर्ता को इस बैकअप.श फ़ाइल को चलाने की अनुमति नहीं है। < / P>

इसलिए मैंने उस उपयोगकर्ता को अच्छी तरह से सोचना शुरू कर दिया कि मैंने बैकअप.श फ़ाइल को, ग्रेफाइट के साथ बनाया है, शायद मैं उसे क्रॉन नौकरी के रूप में चला सकता हूँ। इसलिए मैंने क्रॉन्टाबैब की तलाश शुरू की, और अभी भी sudo त्रुटियों (tty नहीं मिला) और बातें हो रही है। फिर मैं अपने mysqldump आदेश में backup.sh फ़ाइल में वापस गया और इसके बजाय उस कमांड को < कोड> सुडो , मैंने इसे सामान्य रूप में चलाया, और -यू ​​& lt; username & gt; और --password = & lt; password & gt रखा ; वहां में, और यह पूरी तरह से काम करता है मैं अनुमतियों के बारे में थोड़ी अधिक सीखा है और मेरे डेटाबेस अब दैनिक आधार पर बैक अप लेते हैं। हूज़ा!

समस्या यह है:

  drwx - x --x 14 जीएफ जीएफ 4096 मार्च 13 14:47 ../  

जैसा कि आप देख सकते हैं gf कर सकते हैं पढ़ा , और excecute लिखें, लेकिन अन्य उपयोगकर्ता केवल excecute कर सकते हैं।

नोट यह एक फ़ोल्डर है। इस प्रकार यदि इसकी पठनीय फाइल अंदर नहीं पहुंचा जा सकती है।

आपको यह सुनिश्चित करना है कि यह फ़ोल्डर और हर दूसरे मूल फ़ोल्डर है पठनीय । कुछ ऐसा:

  chmod 755 & lt; फ़ोल्डर का नाम & gt;  

तो आपको मिलेगा:

  drwxr-xr-x 14 gf gf 4096 13 मार्च 14:47 ../   

नोट यदि आप root या gf उपयोगकर्ता नहीं हैं आप उन चीजों में से कोई भी नहीं कर पाएंगे


javascript - Get geoJSON data from mapbox API to determine point in polygon -


I have recently followed the tutorial to determine whether a point shown by a marker is defined by the polygon Sits inside:

Works great, but they drag into polygon geographic data with AGX and apply it on the map. I have a mapbox map that is made from a polygon area already prepared. I am using my API to display my map. Now it is necessary to use geographic data to determine whether a point is within an area or not. How can I access that data via API?

Here's how I drag the map, GOJSON and a function to test if a point is in a ground area:

  // mapbox connection Var map = "& lt; map-id & gt;"; L.mapbox.accessToken = "& lt; my-token & gt;"; // init map var map = L.mapbox.map ("mapData", mapID, {attributionControl: false, zoomControl: false}) setView ([53.799, -1.548], 13, {PAN: {animated}}, zoom : {Living: true}}); // GeoJSON var geoJson; $ Http.get ("https://a.tiles.mapbox.com/v4/" + mapID + "/features.json?access_token=" + l.mapbox.accessToken) .vivet (data) {geoJson = Information; }); // Set the fixed point in the polygon function PointInPolygon () {var conno = [-1.3, 5.2]; Var Layer = LeafletPip.pointInLayer (Cores, L. Geogen (GOJSON), True); If (! Layer.length) // dot polygon does not have / / dot in polygon  

Integrated features are loaded in the L.mapbox.featureLayer which is available as a member of your L.mapbox.Map example. Suppose you have an example of your map stored in a reference named map map.featureLayer :

  // sure Please make sure that the feature layer is ready. Map.featureLayer.on ('ready', function (e) {// Loop on features e.target.eachLayer (function (layer) {// Your work / here is an example of "Layer" Marker / Polygon / Polyline // "Layer. Feature" assumes actual geographic feature});});  

An example of this concept is:

If you want you can also load different tiles and attributes, do not code your map with the code mapid :

  var map = l.mapbox.map ('mapbox', empty, {'center': [0, 0], 'zoom': 1}); Var Tile Layer = L. Mapbox. Tile layer ('yourMapId') AddTo (map); Var featureLayer = L. Mapbox. Feature Layer ('yourMapId') AddTo (map); Example:  

You can then leave the addTo method, first process your features and then add the layer to the map:

  var FeatureLayer = L. Mapbox. FeatureLayer ('yourMapId'); // Make sure that the feature layer is ready feature layer.Or ('ready', function (e) {// features at the eupport eeTarget.eachLayer (function (layer) {// your point}}; // layer E.target.addTo (map) for the map;});  

Whatever works best for you but I really forgot to answer your question (though I think you will not need it), the actual geographic feature is selected by the L.mapbox.FeatureLayer 's getGeoJSON method (only when ready for level):

  // Make sure the feature is ready on feature lair ('ready', Function (e) {// bring you featurecrollen variant = e.target.getGeoJSON ();});  

regex - OpenCover Filter not working -


I am using OppenCow to get more code coverage and test assemblies from the Open Sewer report, Spring Net Assembly and I want to filter autogenerated code. I passed the following parameters for OPEC

  OpenCover.Console.exe -register: user -target: "D: \ Softwares \ OPenCover \ TestProj.dll" -filter: "+ [*] * I am doing - [Namesphere 1. Nom place 2. *. * Test] * [Spring *] Spring *. * [* Archive XSD *]. RGXXD. * [Namespace 1. Namespace 2. Namespace 3. Namespace 4. *. * XSD *] * "-Mergebish-Output: C: \ Reports \ Project Choices Reverse 1 XML-CopyToprops - HudsChip: All  

However, I still have XSD and Spring in the generated report. I see the coverage for Net (which is zero).

Thank you,

Include / exclusion marker (+/-) such as

  -filter: "+ [*] * - [Namesphere 1. Namespace 2. *. * Test] * - [Spring * ] * Spring *. * - [* Archive XSD *] Archive XSD. * - [Namesphere 1. Namespace 2. Namespace 3. Namespace 4. *. * XSD *] * " 

c# - Couldn't run Visual Studio Android Emulator -


When I try to start an Android Visual Studio emulator, I get an error "Emulated device" VS emulator lollipop phone 'could not be started'.

I have installed the new Microsoft Android emulator , Has restarted my PC, but I am still unable to run it.

I am running: OS: Windows Technical Preview, Visual Studio 15 is capable of both BIOS and features in Hyper-V.

In addition, I try to do it with an Xamerine form: Working with maps

What could I do? Enter image details here

Some things to try:

  1. Control panel> All control panel items> User accounts> Manage user accounts> Advanced> Advanced user management Under "Groups", make sure your user account is listed under "Hyper-V Administrator". If it is not, then you have to add your user account to this group.
  2. Check which version of Visual Studio 2015 you (preview, CTP5, or CTP6) and upgrade if not latest (latest available). Before upgrading, make sure you remove the Visual Studio emulator for Add / Remove Programs for Android and install it via the checkboxes in Visual Studio Setup.

Let me know that none of these work is done, you can also go to the program file (x86)> Microsoft Xde> 10.0.0.0, right click XDE.exe, and " Can you know the file version listed under the "Details" tab?


powershell - Reading specific HTML Content specified by TAG and ID -


I'm trying to wrap my head around the command invoke-webRequest .

For testing purposes, I am using one of my old website projects. The website has several dynamic (auto updating) DIV ID-names, which defines the DIV function. (Eg:

or
)

I am now searching for Dev to find a way to read the entire contents of these specific Divi Containers including HTML code.

In HTML = Invoke-WebRequest -Uri "http: // localhost: 6642 /" ($ HTML.ParsedHtml) Can someone start heading me in the right direction?

You use a hashteble to save information Can:

  $ r = iwr http: //yahoo.fr $ cpt = 1 $ resu = @ {} $ R.ParsedHtml.getElementsByTagname ("div") |% {if ($ _. Id -q $ null) {$ _. Id = "div $ cpt"; $ Cpt ++} $ resu [$ ($ _ id)] = $ _. InnerHTML} $ resu  

ios - Updating data after modal segue completed -


How can I update the data after the Model Segue is dismissed? As I think the best method is using notifications, but I do not know how to set up notification in the main scene when the model seagull is closed.

I have a "logged in" modal view, when the user clicks the "don" modal view, then dismissed, the main view reads new data from NSUserDefaults and displays new data .

  @IBAction func doneLicked (From: AnyObject) {Settings.synchronize () self.dismissViewControllerAnimated (true, perfection: zero)}  

If you are using storyboard then open segues. Then you just use segue.sourceViewController and get the data that you need - has now been dismissed - Model View Controller In your case, you can see any data from the Model View Controller There is no need to, so open whatever you want SEGUE IBAction-method

A guide:


PHP Getting server url parameters -


I am using the following function to get my server URL:

  / * Get url parameter * / function url () {return sprint ("% s: //% s% s", continue ($ _ server ['HTTPS']) and $ _SERVER ['HTTPS']! = 'Off'? 'Https': 'http', $ _SERVER ['SERVER_NAME'], $ _SERVER ['REQUEST_URI']); }  

The following is my URL:

  http://enunua.com/emarps/recover_password.php  

From the above URL, I want the following parameters only as part of my URL:

  http://enunua.com/emarps/  

Except that recovery_password.php but the above function gives me the full URL of retrieved_password.php, please advise how can I get only:? You are using $ _SERVER ['REQUEST_URI'], which includes the entire request-URL, which is "recover_password.php" You can use STH like "strrpos" to get the URL without the filename.

Try to use it:

  function url () {return sprintf ("% s: //% s" Https': 'http', $ _SERVER ['SERVER_NAME'], substart ($$), "% s", $ (server $ [$ HTTPS ']) & amp; _SERVER [' REQUEST_URI '], 0, stropo ($ _ server [' REQUEST_URI '], '/') + 1)); }  

asp.net - What is the Difference Between MOSS and WSS in sharepoint server? -


I'm new to SharePoint technology. Can you find me the main differences between Moss and WSS in SharePoint? Thanks in advance.

In the hosting configuration:

WSS is excellent for sharing

Target Market: WSS works well for small businesses and at least mid-market.

Moss is effectively from middle to upper market or enterprise.


java - encoding is lost or not encoded/decoded correct -


I am using the Spring Tools suite and I've got a rest server that I used to do through a tutorial on the springs web site. Was configured from. In addition, I found a database that meets customers' REST server requests. My problem is that the characters displayed in the browser have been messed up ☆ Stars ☆ becomes Stars and so on. When I encode online with IO-8859-1 and decode it with UTF-8, the result is what looks like to look like letters. I'm connecting to the server via AJAX, if it matters it seems like one step is missing.

The tweaking I've done so far is:

Beans. Xml

  & lt; Bean id = "datasource" class = "org.springframework.jdbc.datasource.DriverManagerDataSource" & gt; & Lt; Property Name = "driverClassName" value = "com.mysql.jdbc.Driver" /> & Lt; Property name = "url" value = "jdbc: mysql: // localhost: 3306 / database? CharacterEncoding = latin1" /> & Lt; Property Name = "User Name" Value = "User" /> & Lt; Property Name = "Password" Value = "Pa $$ word" /> & Lt; / Bean & gt;  

characterEncoding: latin1 has made the text a bit more readable.

And I did the and lt; Without success in the heads of meta http-HTML files. Equil = "content type" content = "text / html; charset: UTF-8" & gt; .

I've got a PHP version, the services I'm building with STS releases, it displays everything as it seems, so I do not think there is something wrong with the database and how the characters Stores.

I do not know what to try next.


Squaring step variable - Batch for loop -


Whether it is possible to group increments / step increment in batches for loops.

This is exactly what it looks like

  FOR / L %% A IN (1024,1000, 1048576) DO (do stuff)  < / Pre> 

Although going up to 1000 every time, I want to go above 2 ^ 10, 2 ^ 11 ... 2 ^ 20 (1048576) Is it possible to do this?

No, for the the / l end can not control the geometric growth But you can use batch arithmetic for it

 for  / l %% a in (10 1 20) do (set / a " A = 1 & lt; & lt; %% for a setlocal enabledelayedexpansion %% (!!!) (Endoklal your code here - echo the material %% A))  

Delayed detail is required to change variable variables inside the blocks of code if your internal code If there is no problem with delayed extension being activated, then it can be simplified

  for setlocal enabled extensions / l %% Do a (10 1 20) in (set / an "A = 1"  
< / Html>

Error on remote notifications with swift and iOS 7.1 -


मुझे आईओएस 7.1 पर केवल var सेटिंग ... पर त्रुटि मिल रही है:

यहां छवि विवरण दर्ज करें

इसके बारे में कोई और सुराग नहीं है।

  मजेदार अनुप्रयोग (अनुप्रयोग: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) - & gt; आवेदन शुरू करने के बाद अनुकूलन के लिए बूल {// ओवरराइड प्वाइंट। Var प्रकार = UIUserNotificationType.Badge | UIUserNotificationType.Alert | UIUserNotificationType.Sound; Var सेटिंग = UIUserNotificationSettings (forTypes: प्रकार, श्रेणियां: शून्य); । UIApplication.sharedApplication () registerUserNotificationSettings (सेटिंग); UIApplication.sharedApplication () registerForRemoteNotifications ()।; रिटर्न सच}  

IOS 8.1 और 8.2 पर ठीक काम करता है। क्या आप मुझसे बात कर सकते हैं कि इसे कैसे हल करें? registerUserNotificationSettings

UIUserNotificationSettings ios 8 से उपलब्ध है

कोड>

आप आईओएस 7 के लिए registerForRemoteNotificationTypes का उपयोग कर सकते हैं लेकिन आपको रनटाइम (ओएस संस्करण) पर इसका पता लगाने और उचित पद्धति का उपयोग करने की आवश्यकता होगी।


android - Getting Contacts numbers -


I'm having trouble getting the number of contacts selected by my contacts in my app I as a new activity made the call app do, when you select a contact, activity, gives his name, so I need to return the number of which was the user to enter the contact. I found the code in some tutorials on the internet ... Here is the code

This I say how contacted activity

  mSuspectButton = (Button) v.findViewById (R.id. Crime_suspect); mSuspectButton.setOnClickListener (New View.OnClickListener () {public void onClick (View v) {Intent i = new Intent (Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI); startActivityForResult (i, REQUEST_CONTACT);}});  

This is How do I get selected Contact Name:

  @Override public void OnActivityResult (integer requestCode, integer resultCode, intent data) {if ( ResultCode! = Activity. RESULT_OK) Return; If (requestcode == REQUEST_CONTACT) {Ury Contact Yuri = Data .getData (); // Specify which query you want to return the // values ​​for your query. String [] queryFields = new string [] {ContactsContract.Contacts.DISPLAY_NAME}; // to your query performance - contactUri like a "where" clause // cursor on c = getActivity () getContentResolver () query (contactUri, queryFields, null, null, null); .. // Again check that you actually get results if (c.getCount () == 0) {c.close (); Return; } // Remove the first column of the first row of data - // which is the name of your suspect. C.moveToFirst (); String Suspicious = c.getString (0); MCrime.setSuspect (Suspicious); MSuspectButton.setText (Suspicious); C.close (); }}  

So no one can help, I really do not understand how it works.

Use this in your onActivityResult, this will return the number you selected

< Pre> @Override Public Zero onActivityResult (integer reqCode, integer resultCode, intent data) {super.onActivityResult (record, resultcode, data); Switch (case) {case (PICK_CONTACT): if (resultCode == activity. RESULT_OK) {URI contactData = data.getData (); Cursor c = managed query (contact data, empty, null, empty, zero); If (c.moveToFirst ()) {string id = c.getString (c.getColumnIndexOrThrow (contactContact.Contacts_ID)); String isphone = c. Getstring (c.getColumnIndex (contactsContract.Contacts.HAS_PHONE_NUMBER)); If (hasPhone.equalsIgnoreCase ( "1")) {cursor phone = getContentResolver () query (ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, ContactsContract.CommonDataKinds.Phone.CONTACT_ID + "=" + id, null, null). Phones.moveToFirst (); String cNumber = phones.getString (phones.getColumnIndex (ContactsContract.CommonDataKinds.Phone.NUMBER)); }}}}}

Javascript in <head> of html file not working -


So I have this code with which to connect to Google API and get some user information. The problem is that people who start the login function do not work.

This is a Java practice project, which has been created by Maven and posted on the Tomcat server, if it helps.

  & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script src = 'http: //code.jquery.com/jquery-2.1.3.min.js'> & Lt; / Script & gt; & Lt; Script type = 'text / javascipt' & gt; $ (Document) .ready (function () {var OAUTHURL = 'https://accounts.google.com/o/oauth2/auth?'; Var VALIDURL = 'https://www.googleapis.com/oauth2/v1 / Tokeninfo? Access_token = '; var SCOPE =' https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email '; var CLIENTID =' SAARC '; Var REDIRECT = 'myredirect'; var LOGOUT = 'http://accounts.google.com/Logout'; var TYPE = 'token'; var url1 = OAUTHURL + 'scope =' + SCOPE + 'and client_id =' + CLIENTID + 'And amp; redirect_uri =' + REDIRECT + 'and response_type =' + TYPE; var acToken; var ends of token type var; var user; var login = function; function login () {var win = Window.open (url1, 'Windowname1', 'width = 800, height = 600'); var pollTimer = window.setInterval (Function () {try {console.log (win.document.URL); if (win.document.URL.indexOf (radrite)! = -1) {window.clearInterval (pollTimer); var url = win.document URL; AcToken = gup (url, 'access_token'); TokenType = gup (url, 'token_type'); Ends = gup (url, 'expires_in'); Win.close (); ValidateToken (acToken); }} Catch (e) {}}, 500); }); Validate the function token (token) {$. Ajax ({url: VALIDURL} token, data: blank, success: function (feedback lesson) {getUserInfo (); login = true; $ ('# login text') Hide (); $ ('# logout text' ). Show ();}, Datatype: 'jsonp'}); } GetUserInfo () function {$. Ajax ({url: 'https://www.googleapis.com/oauth2/v1/userinfo?access_token=' + acToken, data: empty, success: function} {user = resp $ ('# ughhoulder'). Et ('src', user.picture);}, datatype: 'jsonp'}); } / * Credit: http://www.netlobo.com/url_query_string_javascript.html*/function gup (url, name) {name = name.replace (/ [\\\\ [/], '\\\ [' ).To change(/[\]]/,'\\\]'); Var regexS = '[\\ # and amp;]' + name + '= ([^ & amp; #] *)'; Var rigax = new regexS; Var result = regex.exec (url); If return (result === blank); Results return [1]; } Function startLogoutPolling () {$ ('# Login Text'). Show (); Hide $ ('# LogoutText'). LoggedIn = false; $ ('# UName') Text ('Welcome'); $ ('# ImgHolder') Et ('src', 'none.jpg'); }}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; A href = "#" onclick = 'login ()' id = 'login text' & gt; Click here to login & lt; / A & gt; & Lt; A href = "#" style = 'display: none' id = 'logout text' target = 'myframe' onclick = "myIFrame.location = 'https: //www.google.com/accounts/Logout'; startLogoutPolling ( ); Return false; "& gt; Click here to logout & lt; / A & gt; & Lt; Iframe name = 'myiframe' id = 'myiframe' style = 'display: none' & gt; & Lt; / Iframe & gt; & Lt; Div id = 'uName' & gt; & Lt; / Div & gt; & Lt; Img src = '' id = 'imgholder' / & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

A small error, Big waste of time :)

  & lt; Script type = 'text / javascript' & gt;  

You've missed 'R' in javascipt


c# - Does Azure service bus permission get passed onto its child topics and queues -


I have created a service bus in blue I have created a topic in the service bus shared a basic routine shade exit at the service bus An access policy that manages to send and listen to the set permissions.

By using the Microsoft.ServiceBus API, I will create an instance of NameSpaceManager through the CreateFromConnectionString method which is the connection string I get from the service bus level.

  this.namespaceManager = Namespace Manager. CreateFromConnectionString (connectionString);  

enter image details here

issue Comes when I call

  Namespace Manager. Gateptics ();  

I get it

Enter image details here

Do queues or topics like child institutions need exclusive access rights? I would have thought that the permission of the parent service bus will be reduced and then I will have the option to be more specific on the permissions for child institutions if I need it

text "itemproc =" text ">

Yes it does! My problem was because I had extra characters in my connection string.


ruby on rails - Avoiding scope usage in views -


Due to specific results, I want to render, I am currently using Scope in my thoughts. I know that this is probably not the best idea, but I honestly do not have any clue how to reuse it properly.

  @ category = category> all> # post. RB region: published, - & gt; {Post.all.where (Published: true) .order ('created_at DESC')} # Category RB DR def_posts posts.published end  

view

  @ categories.Each | Category | Do Category.published_posts.each | Posted in | ... Continue posting by post #  

As you can see, I'm using publish_pose in my view, do you think it's okay, or do I Should it be re-used in any way?

Good it depends. It is okay to call scope in the scenes. It is good as the calling method on the object now it depends on whether you want to preprocess on the post before you pass the post to see or decorate it, Can take over

There will be one more example, suppose that you have promoted the post, you want to add a post that receives more logic and want to send it to show.

At the end of the day, I want to put less business logic into ideas. Just pass the data and present it


chart.js - dx.chartjs: Global configuration -


I know how to specify chart configuration on a "per-chart" basis, for example it works fine:

  $ ('# someDiv'). DxChart ({title: {text: 'some headline', font: {size: '1.25em'}}, data source: [...]  

but I once I want to specify some configuration settings (i.e. color palette, title font size, tool tip setting, ...) for all the charts, each time instead of specifying the chart. Is it possible?

I'm thinking of using jQuery.merge to reuse a normal configuration object Yes, but I am not really happy about it. Of course, should dx.chartjs be a better way of achieving global configuration?


css - Bootstrap text button to a icon in mobile device -


Is it possible to show a text button as an icon button in the mobile view using bootstrap?

As of now, I have two buttons based on JavaScript variables, which I am hiding and showing the other.

  & lt; Input type = "button" class = "btn-primary" value = "remove employee" / & gt;  

and

  & lt; A & gt; & Lt; I class = "glyphicon glyphicon-remove" & gt; & Lt; / I & gt; & Lt; / A & gt; 

Post-text "itemprop =" text ">

CSS classes are Visual-X and hidden-xs that show or hide blocks for mobile views, I think they will help you hide / hide some parts for mobile.


git hook script name - named appropriately -



git hook script name - named appropriately -

the git hooks documentation says:

to enable hook script, set file in hooks subdirectory of git directory named appropriately , executable

http://git-scm.com/book/en/customizing-git-git-hooks

what mean named appropriately?

there illustration scripts in .git/hooks show how utilize hooks. note name of hook defines when called ; hook names pre-defined git. cannot pick own names — git ignore them.

requirements working hook:

correct name, see all hooks executable placed in .git/hooks/

further reading

http://git-scm.com/docs/githooks http://git-scm.com/book/en/customizing-git-git-hooks

git hook

java - executing toString() in Eval () - Groovy (method call in Gstring) -



java - executing toString() in Eval () - Groovy (method call in Gstring) -

consider this, value of

$respnode

is

respjson.seatbid[0].bid[0].price

i trying run

eval.me('respjson', respjson, "assert $respnode.tostring() == '$avalue'")

but getting error

[no such property: tostring class: java.lang.string]

when run (directly, without eval() )

assert respjson.seatbid[0].bid[0].price.tostring()==avalue

it runs fine (no error)

the below works fine (without tostring() )

eval.me('respjson', respjson, "assert $respnode == '$avalue'")

any ideas , how run tostring() eval() thanks!

a method phone call in gstring needs curly brackets, otherwise parents don't parsed part of call:

class foo { def getbar() { 'get bar' } def bar() { 'method bar' } } foo = new foo() assert "$foo.bar()".tostring() == "get bar()" assert "${foo.bar()}".tostring() == "method bar"

java groovy eval

ios - Why didn't JSON parser catch non-validated data? -



ios - Why didn't JSON parser catch non-validated data? -

once & awhile fatal crash: exc_bad_instruction.

this can happen after few iterations.

i've traced source of crash (what believe be) nsjsonserialization parser happens non-validated string --> data.

that is, works few iterations (exit, relaunch app & run again); crashes. clear simulator & rebuild... pattern repeats.

found out doing println(string) before json call; , did cut/paste of string json validator , found errant '(' at beginning:

({"photos":{"page":1,"pages":1340,.....

here's actual screen dump:

question: why didn't json parser trap error within nserror vs throwing fatal exception? ...is bug?

you're forcibly unwrapping object returned nsjsonserialization.jsonobjectwithdata(), nil if parser error occurs. when happens, crash runtime error.

since don't @ contents of jsonerror @ all, can ignore error parameter , utilize optional binding instead; e.g.

if allow jsondict = nsjsonserialization.jsonobjectwithdata(data!, options: .allowfragments, error: nil) nsdictionary { // jsondict } else { println("error") homecoming }

if want inspect error object, write this:

let jsondict = nsjsonserialization.jsonobjectwithdata(data!, options: .allowfragments, error: &jsonerror) nsdictionary? if jsondict == nil { if allow err = jsonerror { println(err.localizeddescription) } homecoming } // jsondict

ios json swift error-handling runtime-error

os161 - How semaphore value is checked using '==' operator? -



os161 - How semaphore value is checked using '==' operator? -

a semaphore declared , created --

static struct semaphore *done; done = sem_create("done",0); // semaphore value initialized 0

now happens when,

if(done==null) { //something done here... }

the if status executed above ? since done set 0 statements within if block executed ?

done pointer semaphore, , status done==null checks whether creation of new semaphore succeeded, in case done hold address of new semaphore, or failed, in case done hold null.

in short, status not check state of semaphore, if created @ all.

semaphore os161

c# - Nested Lambda Expressions -



c# - Nested Lambda Expressions -

does have thought how phone call lambda look within lambda expression?

if have:

public class courseviewmodel { public int id { get; set; } public string name { get; set; } public static expression<func<course, courseviewmodel>> asviewmodel = x => new courseviewmodel { id = x.id, name = x.name, } } public class studentviewmodel { public int id { get; set; } public string name{ get; set; } public string preferredcheese { get; set; } public ienumerable<courseviewmodel> courses { get; set; } public static expression<func<student, studentviewmodel>> asviewmodel = x => new studentviewmodel { id = x.id, name = x.name, preferredcheese = x.preferredcheese, courses = ???i'd phone call courseviewmodel.asviewmodel here } }

in code above rather writing asviewmodel look within studentviewmodel as:

courses = new courseviewmodel { id = x.id, name = x.name, }

i'd phone call courseviewmodel.asviewmodel allow code re-use , maintain code converting course of study courseviewmodel in courseviewmodel class. possible?

you can utilize x.courses.select(c => courseviewmodel.asviewmodel(c)) whole look be:

public static expression<func<student, studentviewmodel>> asviewmodel = x => new studentviewmodel { id = x.id, name = x.name, preferredcheese = x.preferredcheese, courses = x.courses.select(c => courseviewmodel.asviewmodel(c)) }

c# lambda expression-trees

f# - ExcelProvider - writing? -



f# - ExcelProvider - writing? -

i'm trying utilize excelprovider http://fsprojects.github.io/excelprovider/ . i'm not sure if i'm missing here there way write excel file?

for writing can suggest seek npoi library: http://fsharp.org/guides/data-science/#excel-interop

f# type-providers

arrays - Opening a new excel worksheet from outlook -



arrays - Opening a new excel worksheet from outlook -

i importing info outlook , works code opening excel opens instance personal.xlsb not loaded, , open multiple instances of excel. if run twice open 2 instances overwrite info in first instance, leaving sec instance blank workbook. if excel closed , outlook not, code run give error since won't set info new "second" instance, though 1 instance running.

can suggest amendment prevent this?

sub extract() on error goto 0 set myolapp = outlook.application set mynamespace = myolapp.getnamespace("mapi") dim thermomail outlook.mailitem set thermomail = application.activeinspector.currentitem set xlobj = createobject("excel.application") xlobj.visible = true xlobj.workbooks.add 'set headings dim msgtext, delimtedmessage, delim1 string delimtedmessage = thermomail.body 'remove before "lead source:" , after "elms" trimmedarray = split(delimtedmessage, "source:") delimtedmessage = trimmedarray(1) trimmedarray = split(delimtedmessage, "elms") delimtedmessage = trimmedarray(0) 'split array @ each homecoming messagearray = split(delimtedmessage, vbcrlf) 'this next line gives error if excel closed , macro rerun. range("a1:a" & ubound(messagearray) + 1) = worksheetfunction.transpose(messagearray) phone call splitatcolons end sub

right now, creating new instance of excel line:

set xlobj = createobject("excel.application")

excel different (most) office applications, because can run multiple instances (powerpoint, outlook, word cannot this...)

so want first check if there open instance of excel, , utilize that. create new instance if there no instance open.

on error resume next set xlobj = getobject(, "excel.application") on error goto 0 if xlobj nil set xlobj = createobject("excel.application")

arrays excel vba outlook

JMeter how to set Config Element for JSON as payload -



JMeter how to set Config Element for JSON as payload -

i using jmeter load testing application .

as part of payload sending 3 parameters rest webservice phone call

ordersplitjson = {"highpricevendor": "vc4 raj","vendors": {"t1": [{"item_ids_": "194","leaf": [{"orderid": "14101519","cust_id": "22"}],"vendor_id": "9"}]}} customer_id = 22 homedelivery = yes

i loadtesting application 100 users ramp time 2 seconds .

this way have configured , works fine static payload

as part of load test , want login different user every request (means every request want send different parameters )

i guess cant utilize csv dataset config have json payload

could please allow me know how achive load test different payloads

you should still able utilize csv info set config next 1 of below approaches

option 1: alter "delimiter" default comma `,' else won't in json payload, i.e. | , set json payloads csv file , utilize them it.

option 2: don't need have total json in csv info set element, can configured read multiple values multiple variables, i.e. csv file like

vc4 raj, t1, 194, 141519, 22, 9

and variable names in csv info set config be

highpricevendor, vendors, item_ids_, orderid, cust_id, vendor_id

in case can configure request body as:

{"highpricevendor": "${highpricevendor}","vendors": {"${vendors}": [{"item_ids_": "${item_ids_}","leaf": [{"orderid": "${orderid}","cust_id": "${cust_id}"}],"vendor_id": "${vendor_id}"}]}}

see using csv info set config guide instructions on sec approach.

jmeter

powershell - Azure VNet Gateway Setup fails for second pair -



powershell - Azure VNet Gateway Setup fails for second pair -

i attempting setup multiple vnet vnet connections in azure described here: https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-configure-vnet-to-vnet-connection/

i have 4 vnets

vnet-north vnet-south vnet-east vnet-west

i have been trying setup star topology domain controller in center this:

i have setup vnet-north vnet-south in both directions.

when seek connect vnet-north vnet-east using poewershell command:

ps c:\> set-azurevnetgatewaykey -vnetname vnet-north -localnetworksitename vnet-east -sharedkey a1b2c3d4

it returns success

but when try:

ps c:\> set-azurevnetgatewaykey -vnetname vnet-east -localnetworksitename vnet-north -sharedkey a1b2c3d4 set-azurevnetgatewaykey : badrequest: specified local network site name 'vnet-north' not valid or not found. @ line:1 char:1 + set-azurevnetgatewaykey -localnetworksitename vnet-north -sharedkey aabacada -vnetn ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryinfo : closeerror: (:) [set-azurevnetgatewaykey], cloudexception + fullyqualifiederrorid : microsoft.windowsazure.commands.servicemanagement.iaas.setazurevnetgatewaykey

is star topology possible?

powershell azure

Pipe groupByKey data in Apache Spark -



Pipe groupByKey data in Apache Spark -

i transform next info set external script piped apache spark:

key,val1,val2 1,a,b 1,c,d 1,e,f 2,g,h 2,i,j 2,k,l

data should first grouped key , values passed external script using pipe()

i tried code, calls script 1 time , passes info it:

data.map(s => s.split(",")).map(a => (a(1),a)).groupbykey().pipe(seq(sparkfiles.get("test.sh")))

apache pipe apache-spark

android - Target SDK not showing above 18 in eclipse -



android - Target SDK not showing above 18 in eclipse -

when creating new android project, target sdk not show above 18. have gone android sdk manager , updated version 21. when start eclipse comes error "the android sdk requires android developer toolkit version 23.0.o0 or above. current version 22.3.0. please update adt latest version.".

so check updates , tells me there no updates found. has else had problem , know why perchance finds no updates when specifying 1 needs made?

also, tried link, this android sdk requires adt version 23.0.0 or above. current version 22.6. please update adt latest version?. below gets me install 23.0.0 maintain getting dependency errors. there comment uninstall 22.3.0 versions if take route uninstalls eclipse well. text article below:

"you can update adt plugin

select help > install new software work with: p2repo - https://dl-ssl.google.com/android/eclipse/ select developer tools , next next, take license agreement* , finish"

update: quickest resolution found this, @ to the lowest degree able start new project , target newer sdks, download newest android sdk bundle. downloaded of latest needed.

there can many issue.did restart eclipse.if not,try it.your eclipse may outdated.eclipse should kepler or mars or adt didn't updated.so have update 1 time again was.

android eclipse

mysqli php prepared statement fetch() method return "uninitialized" -



mysqli php prepared statement fetch() method return "uninitialized" -

i trying below php code, $prepstmt->fetch() method returns uninitialized. of methods prepare(), bind_param(), bind_result() etc returns true fetch() returns "uninitialized" code never enters while loop. using php v5.5.

i have tried numerous things name few moving execute() method or downwards relative postion alter wrt other methods (if ordering imp), called store_result() before fetch()

i tired of googling not able find solution. first php project , stuck. please 1 help me out. have sec eye , identify missing. pls pls help me out bcoz much frustated now.

$prepstmt = $msqli->prepare("select bank_id,bank_name,loan_rate msdb1.loan_rates bank_id in (?) , from_amount = ? , to_amount <= ? , floating = ? , salaried in (?) , professional in (?) , gender = ?"); $prepstmt>bind_param("siissss",$bnkidfmtlist,$frmamt,$toamt,$inttype,$bind_sal, $bind_pro,$gender); $meta = $prepstmt->result_metadata(); while ($field = $meta->fetch_field()) { $parameters[] = &$row[$field->name]; } call_user_func_array(array($prepstmt, 'bind_result'), $parameters); $prepstmt->execute(); while ($prepstmt->fetch()) { $x = array(); foreach($row $key => $val) { $x[$key] = $val; } $results[] = $x; }

php mysqli prepared-statement