Posts

Showing posts from June, 2015

javascript - Why won't JSON accept my PHP variable? -

I can not get jQuery.ajax calls to use my PHP string variable < Code> $ defaultTicker . I have tried encoding for utf8 and trim any kind of "special" characters, but nothing has been able to help if I see the page source, then I see a valid JSON array : {"ticker": "spy", "startday": 1, "and de": 30} . Here's my jQuery for submitting data: $ .ajax ({url: "findCorrelated.php", // why not As an idea why failing to deposit using PHP variables? If I type SPY to & lt; Default of in the hardcode , then it will be successful. However, when looking at the source, the results appear the same. Note: I am not using json_encode on a PHP array, because startday and endDay value coming Client-side JavaScript EDIT: The real problem was with Chrome's browser settings in fact it was caching my JavaScript and ignoring any updates in the files, so I kept the change and did the same Received results.

Haskell Riak driver: Making a simple 'put' operation -

I am trying to present myself in Riak with the Haskel driver and I will put a simple / Code> operation I am confused with the signature of the put function put :: (fromJSON c, tojson c, resolvable c) => With this signature: connection - & gt; Bucket - & gt; Key - & gt; Perhaps VClock - & gt; C -> W - & gt; DW - & gt; Io (C, Whicklock) I have a few questions. What is a VClock? Do I have to generate it somehow or is it not enough just to specify anything? And why do I get this VClock in the returning tube? Do I have to write IJSON and ToJSON examples for every simple value, even if it is a simple string value? Like I want to "sew" a value with the key "name", how do I do it? What is resellable example? How do I solve a text or string value? I understand that I have to define the resolution function, but I do not get enough of what it means and how to do it. Riak.Resolvable Coord P ab = a value :: Coord val

linux kernel - Is there a way to communicate with a driver from a C application? -

Communicates with kernel drivers, which means that my application can do this as well as making system calls ? For example, I would like to simulate a click in my application, is there a way that I can send some input to the mouse driver and get it or can I call the system to get the simulation? The bottom line, I would like to know, is it possible to talk to drivers using C and how do I do this? Yes, the driver has / dev / Check the entry and / dev / & lt; Device & gt; as a file from your user application and open / read / type / close that Take action on The driver will be called read / written . If you need to define specific tasks, then you have to define your driver code.

apache - Weird behavior of apache2 on Ubuntu with php.ini file -

I am trying to solve the final PHP problem, after researching for a while I checked the session was to. The cookie_time value, which is set to 0, then the session data should be preserved. After this I have the same info.php file for the configuration value loaded for the Php.ini file: / etc / php5 / apache2 However, I have the php.ini file at this location. At this place, I have all the conf.d directories which exclude php.ini and three other file types. I do not know why and how it happened. In fact, I do not have the php.ini file on php.ini location / etc / apache2 Can you please inform that what to do to get the correct php.ini file? Should I move the php.ini file from / etc / apache2 to / etc / php5 / apache2? If all is not a php.ini file, why loaded with info.php / etc / php5 / apache2 The configuration file is You must have your php.ini file in the / etc / php5 / apache2 directory /etc/php5/conf.d/ etc / php5 / apache2 should be

c# - Javascript runtime error:function expected ajax call -

I'm doing ajax on the phone to see the controller, in which I'm having an error javascript run time error :. Expectation of the ceremony My script here & lt; script type = "text / javascript" & gt; Var jsonData = []; Var ms1 = $ ('# ms-tpl'). MagicSuggest ({Data: jsonData, sortOrder: 'name', maxResults: false}); Click on $ ('# Register') (function () {taggit = document.getElementById ('TagId') value at dataplus = ms1.getValue (); debugger; tagtitle = document.getElementById ('TagTitle Tag name 'document.getElementById (' TagContent ') value, $ .ajax () ({url:'? Tagid = '?' @ Url.Action ("post") '+ + + + tagid +' tagtitle =? '+ tagtitle +' tagname = '+ tagname +' dataplus = '+ dataplus, type:' POST ', cache: false, success: function (html) {$ (' # bind ') HTML ;}}}})}}; $ ('#click') Click (function () {debugger; warning (ms1.getValu

Android TextView is failing with null pointer exception -

एंड्रॉइड टेक्स्टव्यू रिक्त सूचक अपवाद के साथ असफल रहा है और इसके "disp.setText (" 0 ");" इस विधि के अंदर "संरक्षित शून्य को क्रेट (बंडल से बचाया गया इन्स्टेंसस्टेट) {" मैंने नेट में दिए गए अधिकांश सुझावों का प्रयास किया अभी भी इसे हल नहीं कर सका। कृपया मदद की ज़रूरत है .... मेरा लेआउट: "fragment_main.xml" & lt; रिलेटिव लेआउट xmlns: एंड्रॉयड = "http://schemas.android.com/apk/res/android" xmlns: उपकरण = "http://schemas.android.com/tools" एंड्रॉयड: layout_width = "match_parent" एंड्रॉयड: layout_height = "match_parent" एंड्रॉइड: onClick = "num_Clicked" android: paddingBottom = "@ dimen / activity_vertical_margin" एंड्रॉइड: paddingLeft = "@ dimen / activity_horizontal_margin" एंड्रॉइड: paddingRight = "@ dimen / activity_horizontal_margin" एंड्रॉइड: paddingTop = "@ dimen / activity_vertical_margin" उपकरण: संदर्भ = "Com.ullas.Test1.MainAct

Scala, method call compiles with dot, doesn't compile without -

आत्म-यातना के प्रयोजनों के लिए मैं if-elseif-else < / कोड> निर्माण ( कब -पर -पर-अन्यथा मेरे मामले में)। मजेदार बात यह है कि जिस चीज़ ने मैंने लिखा है, उसे से पहले डॉट किए बिना संकलित करता है, लेकिन , और इसके साथ संकलन करता है, और इससे पहले और डॉट किए बिना अन्यथा < code>: कब (गलत) {println ("& gt; & gt; ट्रू"}} .butWhen (गलत) {println ("& gt; & gt; हैलो"}} .butWhen (false) {// डॉट के बिना "बूलियन (झूठे) पैरामीटर नहीं लेता है", "अन्यथा {println (" & gt; कुछ और ")} मेरी अप्रशिक्षित आंखों के लिए, दोनों की घोषणाओं पर और अन्यथा एक समान हैं, इसलिए ऐसा लगता है कि उन्हें वही व्यवहार करना चाहिए। इसके अलावा, जब मैं अन्यथा को सीधे क्लास के लिए चेन करता हूं, तो संकलन डॉट के बिना भी सफल होता है I क्या आप मुझे डॉट से छुटकारा पाने में मदद कर सकते हैं? नीचे के लिए कोड है लेकिन जब- अन्यथा : विशेषता ButWhenTrait {def butWhen (b: बूलियन) (op3: = & gt; इकाई) : लेकिन जब def def (b: बूलियन) (op: = &

javascript - Does ng-transclude stop event propagation in Angular.js? -

Image
The issue occurs when I try to send an event to nested directive through the $ scope object from my instruction. Like the $ scope.broadcast ('Event') The child does not receive the instruction, but when I use the $ root scope object it works Example: $ rootScope.broadcast (' Event ') . TL; DR : Why does not it work: when it works: Edit: angular.js version 1.3.0 and now this is not an issue! Your instructions (s) ng-transclude From the docs: The widget creates a separate scope in a specific setup, but transit is not a child, but is a brother of a separate scope. This looks like your radius hierarchy: 003 Directive one 004 is a separate scope, where there is an integration area where two Elements Live 005 First Directional Two 006 is the scope of the first director's area of ​​the area two You can see that the two is not the child of a .

c - Two strings input - removing common words from the 1st one and printing it -

So here it goes: I need to get two strings from the user, string 1 and string 2, then the word " "Delete String 1 which is also present in String 2 and prints in String 1. I can token to them, but then I'm out of ideas / knowledge, need help :) int main {four string 1 [100] ; // Announcing the array for the first input four characters * Token 1 [100]; // Parent's array declaration * token_ptr1; // Pointer Wear to store four strokes to hook [2 2] [100]; // Array Announcement for First Input Four Characters * Token 2 [100]; // Parent's array announces four * token_ptr2; // pointer var to store tokens int i = 0; // Input from user: printf ("Enter 1 string:"); Gets (string1); Printf ("\ n"); Printf ("Enter String 2:"); Gets (string2); Printf ("\ n"); Using the strtok function to mark / String1 token_ptr1 = strtook (string 1, ""); printf ("token 1: \ n"); // Loop to store tokens of point and structure

sql server - how to add salary in every row of a table -

I have a table worker in SQL Server. There are three column IDs, names and salaries in the employee table. And 10 rows are put in the table, so I want to write a question to add 500 rupees to each employee salary. help please. Assume the salary is stored in the form of "rupees" (probably rupees if you Update: Employee's Scheduled Pay = Pay +500 This will be the 500 requests for each salary in each row, whatever you request. You can add a where section if you want to limit the rows that are affected but which do not fit your needs. Looks In.

java - ANDROID: Converting inputted numbers to words -

Image
Our assignment states that we write a program that will input a number up to 6 digits and convert the numbers into words. East: 123 = One hundred twenty three I'm cool! Then I found this site but I do not really know how to change it in Android. Please help me .. Here's my main activity. Xml: package com.example.torres; Importroid.os.Bundle; Import android.support.v7.app.ActionBarActivity; Import android.view.View; Import android.view.View.OnClickListener; Import android.widget.Button; Import android.widget.EditText; Public Class Main Activity ActionBarActivity Expanded {@ Override Protected Zero (Bundle Saved Instance) {super.onCreate (SavedInstanceState); setContentView (R.layout.fragment_main); Find last edit test number = (edit text) VVBIID (RID Editlet 1); Find the last edit text result = (edit text) ViewById (R.id.editText2); Button btnConvert = (button) findViewById (R.id.button1); Click on BtnConvert.setOnClickListener (New OnClickListener () {@Override Publi

xml - Curl Exception HTTP 415 : Unsupported Media Type Exception in JAX-RS and Jersey -

itemprop = "text"> When I'm running a curl command at the bottom (on Windows 7) I'm getting an error (HTTP 415: unsupported media type exception ). As far as I know the jersey should be able to detect the resources, as I indicated in the curl request the content type as "app / XML". Can anyone help me solve this exception? I am using the following curl order: curl-i-x post-h "content type: app / xml" -d @ sample-input. Xml http: // localhost: 8080 / JAXRS / rest / customer my JAXB annotated model classes: public class customer {@XmlAttribute ( Required = true) safe id; @ XmlElement (required = true) string protected first name; Public int getId () {return ID; } Public Zero setId (int id) {this.id = id; } Public string getFirstname () {return firstname; } Public Zero SetFirstmen (string firstname) {this.firstname = firstname; } Public string getLastname () {return lastname; } Public Zero Settlement (string last name) {this.lastname

ios - NSMutableArray adds same object each time -

I'm adding an object to NSMutableArray but it does add a single object Instead of three times The calendar is in the form of data breeding and sowing names in the array. for (AppDelegate.calenderSowArray in SOWObject * object) {temp = object.breedingDate; NSLog (@ "date% @", temporary); [Array all array]; (Indx = 0; indices and lieutenant; counteoffrere; indix ++) {SOBOJECT * NEOBAGET = (SOOBJECT *) [APP DEALIEET CALENDERS SAURA ObjectTitx: INDEX]; NSLog (@ "reproduction date% @", neobacter.breedingdate); If ([temp isEqualToString: neObject.breedingDate]) {[arrayNew removeAllObjects]; [Array object: neject]; }} [TestArray addObject: arrayNew]; } try it, NSMutableArray * testArray = [[NSMUTABELARROR] INIT]; (App Delegate.calenderSowArray in SOWObject * Object) {[testArray addObject: object]; } This should be enough alone if you want to add all the SOWObject to appdelegate.calendarSowArray in TestArray.

html - Getting an error java.lang.reflect.InvocationTargetException in Java -

Image
I am working in an applet, when I use Netbeans to run it, I have no problem, But when I try to load an applet on my Firefox browser, it gives me this error: java.lang.reflect.InvocationTargetException this My Java code is package com.org.login; Import java.awt.event.ActionEvent; Import java.awt.event.ActionListener; Import java.util.logging.Level; Import java.util.logging.Logger; Import javax.swing. *; Import java.awt. *; Import java.sql *; Public Class LoginApplet extends JApplet {Fixed JTextField name, pass; Stable JButton submit; Implementation of Private Static Class Handler Action Allison {@ Override Public Voed Action Perffered (Action Event E) {String User = Name. Gate Text}; String straps = pass.getText (); Try {class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); } Catch (Klassnotfound exception before) {LoggerGetlogger (login.class.gateName ()) .log (level SESEE, ANNEL, X); } Try {Connection con = DriverManager.getConnection ("jdbc: mysql: // localhost

c# - How to get all Property name only in a Class -

Image
How can I get all the assets of the following classes: public class employees { Int employee id; last name; // (20) character only the first string; // (10) characters are only string titles; // (30) character only string address; // (60) characters only string city; // (15) characters are only string fields; // (15) characters only string postalCode; // (10) characters only string country; // (15) characters only string extension; // (4) characters only string homePhone; Public Entrepreneur ID {Return Worker Id; } Set {employeeID = value; }} Public String LastName {get {return lastName; } Set {lastName = value; }} Public string first name {get {return firstName; } Set {firstName = value; }} Get the public string title {return {return title; } Set {title = value; }} To get the public string address {return address; } Set {address = value; }} Public string city {return city; } Set {city = value; }} Public string field {Get return area; } Set {region = value; }} Public string post

phonecalls - Trigger a phone call in Windows Phone 8 application -

I need to develop an app to call the Windows Phone 8 app using Visual Studio. But I did not get any resources to do this. When a button is clicked, I have to call the mobile number already. I'll just need to call that mobile number by clicking that button. This is what I have coded. When a given button is clicked, I am calling this method ... Private zero hyperlink button_click_1 (object sender, routing event e) {Folkoltsk folkskoltsk = new phonecoltask ( ); phoneCallTask.PhoneNumber = "0719957868"; PhoneCallTask.DisplayName = "gauge"; phoneCallTask.Show (); } But I get an uncontrolled exception. Unrestricted Exceptions. // Code for executing unauthorized exceptions: Private Zero Application_translated exception (Object Sender, ApplicationUnhandledExceptionEventArgs e) {if (Debugger.IsAttached) {// has an unrestricted exception; Debugger debugger Break (break); }} when you use PhoneCallTask ​​ If you are, then specify a new capacity f

import - how to fix `Type mismatch: cannot convert from android.app.FragmentManager to android.support.v4.app.FragmentManager` error in android? -

मुझे निम्न त्रुटि हो रही है प्रकार बेमेल: एंड्रॉइड.एप से परिवर्तित नहीं किया जा सकता। FragmentManager को एंड्रॉइड। Support.v4.app.FragmentManager निम्न पंक्ति के लिए फ्रेगमेंट मैनेजर frgManager = getFragmentManager (); frgManager.beginTransaction ()। प्रतिस्थापन (R.id.content_frame, fragment) .commit () मेरी कक्षा में निम्नलिखित आयात हैं import android.support.v4.app.Fragment; आयात करें android.support.v4.app.FragmentManager; आयात करें android.support.v4.app.FragmentTransaction; त्रुटि कैसे ठीक करें? बदलें getSupportFragmentManager () के साथ getFragmentManager () , और सुनिश्चित करें कि आपका वर्ग फ्रेग्मेंट एक्टिविटी का उपवर्ग है।

c# - Print/Write multiple Select Statements into a file -

When I click on my print button, I get 10+ complex queries on my database Need to run / write / print results. I need to print them in the same text file / PDF, which is also easy This will not be possible to use the gridview because I have many questions There is also no manipulation, only the sequence of selected statements Do you have a tutorial which I can mention? Or a concept I can use? You can use the stored procedure with those 10+ complicated queries in a DataSet < In the form of a collection of more than one DataTable s in / code> / get that result, and after that those individually with those 'headers', those DataTable Can manipulate.

javascript - How to get the text of a textarea with a prototype click event? -

There are several textures on my page and I need some text to click on it. I would like to know how to do this in jQuery but I need a prototype / javascript solution. At the moment, which I have tried so far: $$ ("textarea"). Respond to each (function (L) {el.observe ('click', responseToClick); function (event) {var element = Event.element (event); var text = element.innerHTML (); console.log (Text);}}); There is no error in the console, but if I want the text, how can I get it? Edit: This is the solution I forgot the document. Already equal in prototype and thanks to Brusqui I can edit the correct prototype method to get the text: document.observe ("dom: loaded", function () {$$ ("textarea") Each (function (L) {el.observe (click 'Click', Click Replay); Reactions on the function Click (Event) {var element = Event.element (event); var text = element.value ; console; log (text);}}};}); PS: prototype Vesion is 1.7.0 Yo

facebook graph api - How to post comment reply on a specific post in iOS programmatically? -

I'm new to iOS programming and I want to know how we can answer a specific post? I have read a lot of links but I can not find any thing. I have used this method but this code is not working properly / post or comment: - (Zero) ABC [[FBSeX connection currentWith graph: @ "/ UROOOIDID / comments" parameter: Zero HTTPMethod: @ "GET" ClosingHandler: ^ (FBCECE Connection Connection, ID Result, NSError * Error) {/ * Result Handling * / NSLog (@ "result ==% @", result); NSLog (@ "error ==% @", error); }]; } And I'm calling this method in my textfield Prefix > [myReplyingUITextField addTarget: self action: @selector (abc) : (UIControlEventEditingDidEndOnExit)]; You must add the message parameter to your code Yes no Pass the comment in this parameter and you will be able to comment on the post. See.

javascript - Click to view information on each thumb post -

I want to click on each button to see information in every post, but when I click on it Everyone sees Here's my example: I have HTML: and I click on it: $ ('.btn'). Click (function () {$ ('.hidden'). CSS ({"visibility": "visible"})}); But this is not working I want to use toggles or something like that but I do not know how to do please < / Div> You can use $ (this) to target the next immediate brother of the clicked button < .hidden div: .btn button with strong> . Click (function (hidden). Css ({"visibility": "hidden"}); $ (this) .next () .css ({"visibility": "visible"}) ;};

Using Select2 in Ember.js -

I'm really having difficulty integrating select2 amber. I want to change it: & lt; Input type = "hidden" value = user / & gt; Force selected results for select2 in a search input with ajax using and the user attribute in the model. Please help. {{view}} has been deprecated in ember 2.0 + I have found a project that emberfies the select2 to a component install amber ember-select-2 or Amber founded amber-select-master Edit 1: There is a more active drama made there and you should probably use it Select amber-installed amber-power

How to wrap each element in python list? -

For example, I have an array like this: ['1', ' 2 ',' 3 ',' 4 '] And I have to wrap it like this: {' profile ':' 1 ',' Profile tried something like this with no luck: < result = ['1', '2', '3' , '4'] Result = {'Profile' Div class = "post-text" itemprop = "text"> Creation {'profile': '1', 'profile ':' 2 ',' profile ':' 3 ',' profile ':' 4 '} is equivalent to Python- {' Profile ':' 4 '} , as explained, word Duplicate the Son can not be keys & gt; & Gt; & Gt; ('Profile', '2'), ('Profile', '3'), ('Profile', '1' 4 ')]

python - Are there other ways to format strings other then comma, percent, plus sign? -

I see and I can not find a definite answer to this question: print variable in Python? By now, I have seen three ways: using the works, using percentages, or using the plus symptoms: gt ; & Gt; A = "Hello"> gt; & Gt; & Gt; B = "world"> gt; & Gt; & Gt; Print, "to the", b Hello for the world & gt; & Gt; & Gt; Print "% s to% s"% (a, b) Hello to the world & gt; & Gt; & Gt; Each method has its pros and cons. Comos have allowed directly to write variables and add spaces, and simultaneously perform a string conversion if needed, but I remember that good coding practices say that It is best to separate your variable from your text. Percentages are permitted, although they need to use a list when more than one variable, and you have to type the variable type (although it seems able to convert, Even if it is not a variable type, like trying to print a number with% s). plus sign "worst

matlab - How to import and read a large data set, with respect to time? -

Image
Diving directly on the question: values. 1x1 structure is detected when the met lobe is loaded, within which the following are: information {1x1 structure} X {1x1 structure} Y { 1x31 Structure} Description {1x1 Structure} My data stays in Y. When I open each strait, there is more data. However, the data of interest is only one of the data sets, it allows the data to be called. Data 1x27048 I know that the total simulation time to generate statistics is 27 seconds @ 0.001; That is, each value is generated after 0.001 seconds. I have already separated values.mat into essential values ​​in SP.mate. values_sep.mat {27048x2}: 27048x1 = original data; 27048x2 = TIME (0,0.001,0.002 ... 27); I'm determined to read this data set according to the prescribed data time ---- data 0.001 - value_1 < / P> 0.002 - value_2 ... 0.00N - value_N. Whenever I try to read this data in Simu links, then all get color lines on the scope. All other methods have also be

javascript - .mouseover in jquery not working -

I'm trying to throw a simple "one object, another fade in" when the mouse is on the object function Unfortunately this does not seem to work in jquery. This is JS: var fadeout = function (target) // Fade the logo and run Fidin (fade in the skull) {$ ( Target + '.logo'). FEDO (400, 0, fadein (target)); }; Var Fadin = Function (target) // Fade in $ $ (Target + '. School') FEDOTO (500,1); }; // Trigger Fadin When the mouse is more than an option $ ('# mortal'). Mouseover (feedout ('# mortal')); When I check the code in the console of Chrome, it works fine, but when I go to the mouse on a mouse, nothing happens. Here is the relevant HTML: & lt; Div class = "choice_option" id = "mortal" & gt; & Lt; Img class = "logo" src = "img \ text \ 230px-WorldofDarknessLogo.png" & gt; & Lt; / Img & gt; & Lt; Img class = "skull" src = "img \ skulls \ mortal.png&quo

python - Unable to perform collectstatic -

मैं डीजेंगो के लिए नया हूँ! जब मैं कमांड python manage.py collectstatic का उपयोग करता हूं तो मुझे यह त्रुटि मिलती है django.core.exceptions.ImproperlyConfigured: आप सेट किए बिना staticfiles ऐप का उपयोग कर रहे हैं और डिबग सेट है सही करने के लिए debug = true मैं इसे कैसे ठीक कर सकता हूं? किसी भी स्थापना पैकेज को याद नहीं है? इसे आज़माएं, PROJECT_DIR = Os.path.dirname (os.path.abspath (__ फ़ाइल__)) STATIC_ROOT = os.path.join (PROJECT_DIR, 'स्थिर') देखें >

benchmarking - Matlab benchmark without 3D -

I wanted to make a perfect guide on how to handle the metalbag on my computer, so I have a bench on my system gone. The bar graph plot revealed that my system was very low, but when I saw the number, I came to know that only the real low number is 3D plot test. The machine I am using will mainly be for number crunching and there will be a lot of conspiracy to create 3D, so I have the least amount of video card. 5 tests or all of me to run 6? I am currently using Matlab 7.8.0 (R2009A) You can make your own copy of the bench {/ code> command (maybe it's called mybench ), and then edit it to delete all the calls in the subfunction Bench_3d . You may need to modify the code slightly which displays the results, because you only have 5, not 6.

linker - "Implicit destructor" in c++ -

I have some header files coordinate h, some coordinate.INL and some build_getterry CPP use coordinates type. There are two versions of Coordinate H, which are ~ coordinate (); Defined and without destructive definition line is a new one. Similarly, in the new version no coordinate definition is specified in the coordinates. Inl and the old version contains: inline coordinates :: ~ coordinate () {} Now I have to compile the build_geometry.cpp against Coordinate.h / Coordinate.inl which works just fine with the old version of Coordinate H / Coordinate. Inl. Otherwise, this error will end with: build_geometry.o: build_geometry.cpp: 203: follow the more undefined reference to `geos :: geom :: Coordinate :: ~ Coordinate () Collection 2: Exit status of LD1 came back It is obviously at the end of the cycle / methods in which the coordinate type is used. So the question is how to compile and link without them. Nothing has been declared anywhere. Fixed: / usr / local

ios - How to put different headIndent (alignment) for every paragraph in UITextView -

Image
In my application, I should align the all paragraphs Like, the first paragraph has head indent 0.0f, then another 10.0 f and third 3.0f I have all the paragraph styles on textview.attributedText This will only come with the Dynamically typing text here This means that the user will see the text view Write in Sing Therefore, there is no static string to do this. I am placing all the letters in UITtexView ... UIFont * fontBold = [UIFont fontWithName: @ "Helvetica-Bold" Size: 15]; Attribute HallTeckled = @ {NSFontAttributeName: fontBold}; UIFont * fontNormal = [UIFont fontWithName: @ "helvetia new-light-light" Size: 15]; Attributes = normal = @ {NSFontAttributeName: fontNormal}; If (varBold == 1) {[textView setting properties: attributesHeltyCalled]; } And {{textView settyping properties: attributes general]; } And I want to get this kind of result in the text view While typing I'm typing slow down But I think I will come to that p

c# - How could I use Func to modify a single condition of a lambda -

Text after " I have a simple method containing a query to calculate some values. Personal Decimal MyQueryBuilderMethod ( MyThings of the list) {return myThings.Where (x => x.Id == 1). Selection (X = & gt ; (x.ThisValue * x.That)) .sum (); } My intention is to modify this method that I have x Allow this value field to allow the object to be asked in the object. If I specify where my query is, I might pass a predicate but in this case, I just want to change the value of x.ThisValue Personal Decimal MyQueryBuilderMethod (Listings. ThingsViewModel & gt; MyThings; ThingsViewModel, bool & gt; predicates of the ceremony) Return my myths. Where (predicates) Select (x = & gt; (x.ThisValue * x.That). .Sum (); } Ideally, I want to pass in something like: (things, x.ThisOtherValue) MyQueryBuilderMethod After should work: Personal Decimal MyQueryBuilderMethod ( & Lt; ThingsViewModel & gt; MyThings for the list & lt; ThingsViewModel,

How to do clear focus for Multiple EditText in Android -

In my application, I have 3 EditText with focus The problem is, I want to clear the focus of the EditText , which is noted when the user clicks on the submit button, I edittext.clearFocus () is used If I can clear the focus for single code in EditText , multiple EditText click on the submit button, Has suggested and it works great yourEditText.setFocusable (false); yourEditText.setFocusableInTouchMode (true); YourEditText1.setFocusable (wrong); YourEditText1.setFocusableInTouchMode (true); YourEditText2.setFocusable (wrong); yourEditText2.setFocusableInTouchMode (true);

android - Facing Issue when downloading image in byte array from webservice and displaying it -

I'm trying to get an image from the webservice as a byte array and then it changes the byte array to the screen I'm displaying bitmap at zero value. Can someone help me how to proceed public string final output (string response) {string status = zero; Try {JSONObject parse = new JSONObject (feedback); JSONObject registerParse = (JSONObject) parsing Get ("BusinessSearches"); Status = Register Parse.get ("Image"). ToString (); Byte [] theByteArray = status.getBytes (); System.out.println ("The Betrayer" + The Bitterayer); Bitmap bitmap 1 = bitmapfender Acadabiteurere (Betaare, 0, Betaarere.Lamp); System.out.println ("bitmap" + bitmap 1); ApplicationConstant.bitmapValue = bitmap1; } Hold (exception e) {System.out.println ("Error :::::" + e.getMessage ()); } Return status; } You can not create a bitmap directly from encoded imaging, firstly you need to base it on base 64 decoding And then generate a bitmap like this:

html - How to vertically align radio buttons with text on the same line? -

I've written two radio buttons and HTML below to display some text. & lt; Input id = "radio1" type = "radio" checked "" check "/> make application name input id =" radio2 "type =" radio "/> Create a source name My problem is that the radio buttons and text are not aligning properly. The radio buttons are displaying a bit below the text. How to align the radio buttons and text on the same line? < / Kbd> vertical-align: Medium: Aligns the vertical midpoint of the box with the baseline of the original box plus the height of x-parent height. Due to this fact, due to the fact browsers usually add some random unequal margins to the radio buttons and checkboxes. Use inline style, weird but true: & lt; input type = "radio" style = "vertical-align: Dyam; Margin: 0px; "> Labels Input Type =" Radio "style =" vertical-align: medium; Margin: 0px; "

php - Converting html for mysql - what to do with s? -

Come on ??? I am converting several HTML documents into CSV files to upload to MSQL ??? To get data in the column, IAM instead of HTML divas etc with tabs as needed in a text editor, then paste it in a spreadsheet and save as CSV. This is working fine Some "fields" have data on more than one line, which is achieved by using brâ € ™ s in html, leaving them in CSV Displays the data in the required format. I ??? I have also created a script to add / modify the data and for the multi-line field ITE is output using textareas and then using nl2br () which again Displays the required data but the uploaded data is displayed as a continuous line with the bracket in the addition / modified script with brâ € ™ s . Question one ?? ?? Can I do anything to change br / s> to replace the HTML data so that they appear as multi-lines in the texts? change "\ n"

jquery - Change div content with value of array in each function -

I have been trying this for the past several hours, I know that this is possible, what am I doing, my Below is a code that needs to be updated with the data in the array below. My code is: var data = $ .trim ('test1, test2, test3'); Var data_array = data. Split (','); $ .each (data_array, function (key, value) {$ ("#expected rierz span"). Replacewith (value);}); While this is the HTML div where I need to insert content & Lt; Period & gt; & Lt; / Span & gt; & Lt; / Div & gt; This function updates with only the first value of the ARR i.e. "Test1" and I want to display all 3 values ​​one after the delay. I have also tried it with the settimeout () function, but that too is not working please help me Where am I saying? Thanks in advance To add value to the period, try it: $ ("# waiting scheduling period"). Html (value); To remove the span and keep the editing array: if ($ ("# waiting s

python - Get subarray from bi-dimensional array in just one line -

I have a problem finding and receiving from a two-dimensional array in Python and trying the array I get it For example does not pretend to use the structure. Someone knows how to get this array in just one or a few lines of code. Thank you. An example is: my_dimensional_array I need to go back <(1, 'A'), (1, 'b'), (2, 'c') code> my_single_array_from_1 = [(1, 'a'), (1, 'b')] You can use the my_dimensional_array to select the elements whose first value is 1 In [16]: my_dimensional_array = [[17] in [(1, 'a'), (1, 'b'), (2, 'c')] : [Item in item i_dimensional_array if item [0] == 1] outside [17]: [(1, 'a'), (1, 'b')] < / Html>

java - Module has not been deployed in netbeans Error -

I'm getting an error while running my netbeans web application .. statement < Blockquote> C: \ Users \ Dhruv \ Documents \ NetBeansProjects \ FinalProject \ nbproject \ build-impl.xml: 1025: The module has not been deployed. See the server log for details. I got this error suddenly after adding the servlet to my project. These are the rows in the XML file. & lt; Goal if = "netbeans.home" name = "- run-deployment-nb" & gt; & Lt; Nbdeploy clientUrlPart = "$ {client.urlPart}" debugmode = "false" force redeploy = "$ {forceRedeploy}" /> & Lt; / Target & gt; I had only one problem. I just uninstalled Netbeen and installed it again. When I installed it again, I customized the configuration and made sure that I chose the runtime as Apache Tomcat. Maybe it could happen to anyone.

java - How to get element color with Selenium -

I want to see the color of an element in an HTML page. The color of this algorithm is set with javascript, see the image Element can assume 4 values ​​with the devil-id "ab_bencoma 1t 1 skeet", of course only one of them is " Val "Variable Val variable is set by the server in any way, this script displays the elections on every X-second server and updates the value of the value. I have tried to follow the color of the element: WebElement element = wait.until (expected conditions. Submissions (By.id ("ab_banco_M1T1_switch")) ); Element.getAttribute element.getAttribute element.getAttribute ("style") element.getAttribute ("background color") element.getCssValue ("style") element.getCssValue ("color") < P> With no success, they return "blank" or backgound-colors of the page. The only way to get the color is in Xpath / html / body / div / div [2] / div [2] / div [2] / div / div / div / div

ios - Unable to open redirected URL in UIWebview -

I am using a Google RSS feed where I am getting some URL: This page does not load when I try to open it in uiwevview If I open it in Safari then it says that can not open the Safari page Because too much redirection happened Please suggest. Your URL may not be valid, use the following code to verify it: NSString * strURL = @ "https://www.google.com/url?q=http://www.mcphersonsentinel.com/article/20140422/SPORTS/140429875/10084/SPORTS& ct = ga & cd = CAIyAA & amp; USG = AFQjCNG9pfoDddHHNV0gJaspzR1jv1ffKA "; NSString * urlRegEx = @ "(http | https): // ((\\ w) * | ([0-9] *) | ([- | _]) *) + ([\\. | /] ( (\\ W) * | ([0-9] *) | ([- | _]) *)) "; NSPredicate * urlPredic = [NSPredicate predicateWithFormat: @ "self-matching% @", urlRegEx]; BOOL isValidURL = [URL with urpdic evaluation: strURL]; If (isValidURL) {strURL = [strURL stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; NSDRAUL * Website URL = [NSURL URL with

c# - How to send screenshot to controller? -

I'm using the html2canvas library to get a snapshot from the page, and how do I get that image in my C # Can I get into the controller? VIEW $ ("#button"). Click (function () {var image; html2canvas (document.body, {onrendered: function (canvas) {image = convert convert to image (canvas); $ .post ("../../ HomeController / SetScreenshot", {sendImage : image}, function () {});}});}); File = Request.Form ["sendImage"]. ToString (); } Simlifting, hidden input can be omitted. This will do the trick: $ ("# button"). Click (function () {html2canvas (document.body, {honored: function (canvas) {var image = canvas.toDataURL ("image / PNG"); image = image. Location ('data: image / png; base 64 , '', ''); $ .ense ({type: "post", url: '../../ Home controller / saveSnapshot', data type: 'text', data: {base64data: image}, success: Function (result) {warning (result);}}}}}} cont

symfony - Import a file with constants in Twig? -

Is it possible to import a file with a bunch of constants in another TIG file? Like: {% set VAR1 = stable ("...: var1")%} {% set VAR2 = static ("...: var2" )%} {% Set VAR3 = stable ("...: var3")%} ... And then, in these other files, is this constant used? I have tried to do include , import , usage and embed . None of these seems to fit in this situation. With the design, you can not import the variable from another reference, because {% include% } without copying your current reference will be passed by the reference, not by context. The {% macro%} and parameters as _context variable, so you can not create a new variable in the context from within a macro And then your macro file {% import%} However, you can create variables from the extended file, and use them in the hair file. For example: a.html.twig {% set test = 'hello!' %} b.html.twig {% extends 'a.html.twig'%} { {Test}} will

css - Show unordered list's bullet points when display:table -

When I try to wrap the list's list with indent, there is no text below the bullet points of the list. My bullet points disappear. I have set up CSS of this list in this way: ul {display: table; } Li {display: table-row; } How do I get my bullet points to show again? Thank you in advance! [edit for clarity] display: table-row By setting you can delete default list bullets, and there is no way to get them back (currently defined and implemented in CSS) (if you want to keep it display: table-row it is not clear why you are using it). However, you can produce your own markers, you can use the generated content. E.g. li: First {content: "\ 2022"; Padding-right: 0.5 AM; } notation \ 2022 means the U + 2022 bullet "A" ???? ¢ a ?? Generally this default list does not look similar to bullets, but is similar. You may want to experiment with different fonts (you can set the font of the pseudo element different than the font in the item

web services - Open street Map How to get coordonates of all citys in a specific country -

I am using openstreetmap webservices so that the gender and latitude can be received from the cities and in contrast to what I want to add A simple selection button was sent to Coutry and the city to the WEEB user so that I would send my request like this: In which "xxxxx" and "yy" by country and user Selected city is The problem is that I did not get any request that would give me all the cities of the country at the same time from the OSM, so I can reduce the request sent to the OSM service and all the cities and their information. So did the OSM have made me a request to make all the cities or do I need to define them in my database or script file? This is not really a specific task for a geographical (which is). You can get this information through the raw or via the OSM. But there is no direct route for this because to know which city is related, you have to do some post processing of data. I think finding a database already has been catching i

sql server - waiting for sqlcmd job to finsih before next batch step -

मैं वर्तमान में एक सीएमडी फ़ाइल में है .... sqlcmd -s myserver -यू यूजर-पी पास -i स्टेप 1 एसक्यूएल -ए स्टेप 1 आउटपुट डॉट टाइमआउट 5 एसकेएलसीएमडी -एस माइस्सेर -यू यूज़र-पी पास -आई स्टेप 2 एसक्यूएल -ए स्टेप 2 आउटपुट डॉट टाइम टाइम 5 एसक्यूएलसीएमडी -स माइर्सरवर -यू यूज़र-पी पास -क्यू "एसएसई एमएसडीबी एक्सईसी sp_start_job @job_name = 'माइजोब'" एसक्यूएलसीएमडी -एस माइस्सेर -यू यूज़र-पी पास -i स्टेप 3 एसक्यूएल -ए स्टेप 3 आउटपुट। टीटी एसक्यूएलजी रनिंग के बीच में और चरण 3, मैं चरण 3 पर जाने से पहले कार्य के लिए "प्रतीक्षा" कैसे कर सकता हूं? जॉब्स एसिंक्रोनस द्वारा डिज़ाइन चलाएं हालांकि, आप step3.sql में लुक के लिए प्रतीक्षा कर सकते हैं और dbo.sysjobs जॉब की वर्तमान स्थिति के लिए dbo.sysjobactivity में शामिल हो सकते हैं। ।

rally - Add the team membership to the user who is already member of other project using RallyAPI -

USER1 पर विचार करें Project1 & amp; प्रोजेक्ट 2 मैं उसे प्रोजेक्ट 3 के सदस्य बनना चाहता हूं मेरे कोड के बाद के भाग को USER1 से प्रोजेक्ट 3 जोड़ता है, लेकिन प्रोजेक्ट 1 & amp; प्रोजेक्ट 2 मैं चाहता हूं कि User1 को प्रोजेक्ट 3 में जोड़ा जाए और साथ ही प्रोजेक्ट 1 & amp; परियोजना 2.क्या कोई कृपया सलाह दे सकता है? धन्यवाद जेसनअरे टीम टीमों की सदस्यता = नया जेसनअरे (); // उपयोगकर्ता टीममैंबरशिप.एड (प्रोजेक्ट ओबजे) के लिए परियोजनाओं को जोड़ या हटाएं; // सेटअप अपडेट फ़ील्ड / टीम सदस्यता के लिए मान JsonObject updateUserTeamMembershipObj = new JsonObject (); UpdateUserTeamMembershipObj.add ("TeamMemberships", टीममैम्बर्सशिप); UpdateRequest अद्यतन टीएएममंब्सशिप्सआरिवेस्ट = नया अद्यतन अद्यतन (यूजरआरफ, अपडेटयूएसएआरटीएममेलशिप ओबीजे); अपडेटप्रदर्शनी अद्यतन करेंममेल सदस्यताप्रतिसाद = restApi.update (updateTeamMembershipsRequest); यह जावा के लिए विशिष्ट नहीं है, लेकिन आम तौर पर WS API v2.0 के लिए एक ब्राउज़र रीस्ट क्लाइंट: यदि वर्तमान में टीम की

java - unable to retrieve the new primary key from the database -

I have a gaming project, each game dynamically generates a unique ID. I use the ID using that segment Recovering the primary key from the databases I am after the game is over, the user can play the game again. The second time that game plays a new unique ID is generated. Now when I try to recover the new primary key by specifying the new primary key, instead of getting a new primary key, I'm getting the old primary key. What could be the reason for this strange behavior? Receive public long time Priority (string id) {query q = getSession (). CreateQuery ("From GameActivities F g, g.gameid = '" + id + "'"); Game_Answers ga = (Game_Answers) q.uniqueResult (); Return ga.getId (); }

css - Iconfont charachterspace collapses in Android (Fontastic) -

I used Fontastic.me to create iconstools. It is the default browser of Android 4.2.2 and 4.3 (example: Modern Samsung Tablets) works very well. In these browsers, there is no width of characters in the entire font. It happens with every font made with Fontastic.me (even the fonts that supply themselves). This is a big problem when mouse (horizontally) focusing the mouse. I have set up a web page to test it. Pink color indicates the character's width The following screenshots compare normal behavior with Android browver-behavior: I'm sure this is due to the fontstick, because when I use Incom as a fontgenerator If I do, then the problem does not occur. I have also informed the owner but he says that he can not take note of this as he is no longer meant to install an Android emulator on his Mac. Is there any clue about what is happening to anyone here? What happens due to falling space? I had the same problem yesterday, I solved it with a little work. As you said,

php - Magento save only 325 attribute values -

Admin administrators use the Magda Administration for the attributes set and their values. Our store has more than 325 values ​​in one or more specialty sets, but Magazine only saves 325 values. Why? We use Suhosi with this setting: # Suhosin php_value your settings for suhosin.mail.protect # php_value suhosin.memory_limit 512m php_value suhosin.post.max_vars 18000 php_value suhosin.post .max_value_length 500000 php_value suhosin suhosin php_flag suhosin.session.cryptua off to .request.max_vars 18000 php_value suhosin.request.max_value_length 500000 # default settings use of our memory limit and VARs best Did not limit Is this our only problem? Can anybody help me please? Quarter;) If entered, suhosin.log.sapi = 511 The log message should be visible in the normal PHP or Apache logfile. For more logging options, please see

cordova - Problems in adding android as platform in phonegap application -

I downloaded the Android SDK and pulled it into a directory. I have set the system variable ANDROID_HOME: C: \ Users \ Aditya Sethi \ download \ adt-bundle-windows-x86-20140321 \ adt-bundle-windows -x86-20140321 \ sdk Path: Existing path;% ANDROID_HOME% \ tools; ANDROID_HOME% \ platform-tools Now When I'm trying to add a platform with adding cordova platform, Android fails error: $ cordova -d for android cordova library for platform "android" There is no need to download the release exists. If the platform "Android" passes the minimum requirements ... then prepare the Android project ... Running Command: "C: \ Users \ Aditya Sethi Cordova \ Bibi \ Android \ Cordova \ 3.4.0 \ Bin \\ Reet.Bet "-CC" C: \ Users \ Aditya Sethi \ Documents \ Project \ Conference \ Platform \ A NDED "com.phonegap.helloworld HelloWald 'C: \ Users aditya' An internal or external command, operative program or batch form The file has not been

jquery - Accessing different page controls using JavaScript -

How can I use different page controls using javascript ? For example, I have two pages: Page1.htm and Page2.htm . I write in my javascript code Page1.htm and I need to access a text box or any other control which is Page2.htm . like it, $ (function () {$ .get ('page2.html', function (html) {console.log ($ (html). Find ('textarea'));});});

javascript - calling Web service in ASP.net -

इस सवाल का पहले से ही एक उत्तर है: < / P> 5 जवाब मैं पहुंचने का प्रयास कर रहा हूं वेब सेवा जो कि नेट में लिखी गई थी। लेकिन मुझे पता चला कि मेरे जावास्क्रिप्ट कोड में कोई समस्या है। लेकिन मैं इसकी पहचान नहीं कर सकता कि यह क्या है। function getID () {var id = document.getElementById ("Text1")। Value; WebApplication4.myWebService1.getDetails (आईडी, getSMSSucsess); // मुझे लगता है कि समस्या ..} समारोह getSMSSucsess (परिणाम) {document.getElementById ("myDev")। मूल्य = परिणाम ["स्थिति"]; } आप जावास्क्रिप्ट से सर्वर साइड कोड कॉल नहीं कर सकते, सर्वर पर एक रहता है क्लाइंट पर अन्य। रेखा WebApplication4.myWebService1.getDetails (आईडी, getSMSSucsess); जावास्क्रिप्ट में मौजूद नहीं है। मैं वेबसर्विसेज को बनाने का सुझाव दूंगा।

python - Pymongo find if value has a datatype of NumberLong -

_id ": ObjectId (" 5368a4d583bcaff3629bf412 ")," बुक_आईडी ": नंबर लाँग (23302213)," serial_number ": '1122',} यह इसलिए काम करता है क्योंकि सीरियल नंबर एक स्ट्रिंग है: < / P> find_one ({"serial_number": "1122"}) हालांकि, यह नहीं है: find_one ({"Book_id": "23302213"}) जाहिर है, क्योंकि book_id में NumberLong का डेटाटाइप है इस डेटाटाइप पर आधारित विधि कैसे निष्पादित कर सकता है? ======================================== ========================== अपडेट: फिर भी यह काम करने के लिए नहीं मिल सकता है, मैं केवल स्ट्रिंग मान पा सकते हैं किसी भी सलाह की बहुत सराहना की जाएगी। आपको यह सुनिश्चित करना होगा कि आपके डेटा प्रकार मिलान कर रहे हैं MongoDB प्रकार के बारे में सख्त है। जब आप इसे निष्पादित करते हैं: book_id find_one ({"book_id": "23302213"}) आप दस्तावेजों के लिए MongoDB पूछ रहे हैं < / Code> के बराबर "23302213" ज

c - gets() function string behaviour -

इस सवाल का पहले से ही एक उत्तर है: < / P> 6 उत्तर मेरे पास एक छोटी सी समस्या है कार्य हो जाता है और सरल अगर अभिव्यक्ति हो यह जांचना है कि इनपुट सही है या नहीं, इस मामले में यह होना चाहिए:! एस चार चेककॉम [5]; हो जाता है (checkCommand); अगर (checkCommand == "! एस") ....; और डालता है ("अमान्य आदेश!"); कैसे मैं अभिव्यक्ति के लिए सही मूल्य प्राप्त करने के लिए कभी नहीं समाप्त होता है, भले ही मैं टाइप करता हूं! एस? सभी उत्तरों के लिए धन्यवाद! क्योंकि आप इस तरह से सी में तार की तुलना नहीं करते हैं: (checkCommand == "! एस") स्ट्रिंग की तुलना करने के लिए, आपको strcmp या strncmp या memcmp यदि (strncmp (चेक कॉमांड, "! एस", 5) == 0) इन फ़ंक्शंस के बारे में अधिक जानने के लिए, विज़िट करें और समान। आपको एक चेतावनी भी होनी चाहिए " हो खतरनाक है ..." कुछ इस तरह। आपको हो जाता है का उपयोग करने से बचने और इसके बजाय fgets का उपयोग करना चाहिए। क्रिस जेस्टर-यंग अपने जवाब में इसका कारण समझाया गया है।

r - how to put multiple plotmeans on one plot -

itemprop = "text"> I have the following data: x = structure (list (y1 = c (107. 37271 9 264016, 118.8632 99 513623, 122.16,25,15,227, 111.23322750 9 519, 92.5830204386651, 94.5195626032137, 104.412919961795, 91.3601725324563, 10.2253785 9 52 9 59, 178.771878 9 45058, 144.9 51255075154, 155.5 96666 92633, 174 9 61110441768, 120.832044563506, 136.643512128174, 135.187051040663, 180.2858 999 83425, 158.394853261036, 5 9 .408612698416, 210.9 22565 9 04703, 200.6372148 9 7327, 212.170348364241, 189.1760 9 660446, 19.6882878482191, 19.28 9 0862 9 5862, 209.44375842308191, 213.663792465693, 212.051141677785, 178.1957772597738), GP = c (1) , 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3 , 3, 3, 3, 3, 3), y2 = C (23.43466 99162695, 23.565 9 73096538, 25.6831595647438, 26.2750453870631, 27.4124437247719, 26.6151271841002, 18.3542500476327, 25.6479059225537, 22.7590841129755, 28.3977047665418, 49.5381487676808, 52.6323571458394, 52.0 9 78945 491726,