Posts

Showing posts from March, 2013

c - Detect certain connected USB device -

I am working with a USB device in Linux and wrote a library to control this device. Without access to too many details, the device uses a standard URL protocol, so what I have to do is open a serial connection with open , baud rate Start, baud rate, stop bit, parity, etc, and bit-banging registers. The library works fine, however, it is difficult to believe that this device is / dev / ttyUSB0. That is, this is what I pass through open . If open fails, then I exit. What I want to do is find that this device is present, even if it is / dev / ttyUSB0 , / dev / ttyUSB1 , Etc. And even this can also be detected that these devices are connected to these devices. I can write code to choose some registers on device which gives serial number, product ID and so I can figure out what is actually on the other side of the USB that is actually Actually my device is ... but how do I list the connected USB devices again, in the original C Or a more elegant way to do this, such as the...

SAS not running code -

Initial SAS users here I am not sure what I have done, but for any reason none of my code is going on now. This is done by me when I suppress code / F8, nothing happens, and my log only shows what I submitted (this is basically a copy of my code). This is a matter whether I try to run an entire program or just a piece of it This code does not look specific. I have pulled the old code which I know has run into the past, and the behavior is exactly the same. I am thinking that I have brought some sort of setting somewhere ... Thanks for any help. You have unbalanced quotation marks. (Or something else is crappy, e.g., % Mend; statement or end bracket). If starting a new session is not an option, then try running the following: ; * '; * "; * /;))% Mend; quit;

javascript - Client to Client Websockets -

I'm thinking that it's possible for two clients to establish a websocket connection with each other, provided they have something Help to "address" one another with the server Currently a message is being sent from one customer through the webserver, the server only sends the message to the customer who needs to get it, so I am thinking that it is possible to leave the middleman. This simply tells the server two clients that some information about each other needs to be communicated so that they can start connecting each other with a webcut. ' Is this possible? Or there are some other possible issues with this This is not possible by web sockets today. However, you can use WebRTC, which is based on strong ways of establishing a peer for peer connections. WebRTC is usually used for video conferencing applications, but also set as a data channel. I have not used it myself yet, but it is my understanding that the API is the same as This is for web so...

F# how to set content on WPF Label programmatically -

एफ # कोड ओपन सिस्टम ओपन सिस्टम। विंडोज़ ओपन सिस्टम। विन्डोज़। कंट्रोल्स को संसाधन लॉकेटर दें = नया उरी ("/ कंसोल अनुप्रयोग 3; घटक / मेन वाइंडो। एक्सएमएल", उरीकिंड। रिलेवेटिव) lbl2 = (application.LoadComponent (resourceLocator):? & Gt; विंडो) .फंडनाम ("एलबीएल"):? & Gt; लेबल दें tb = (Application.LoadComponent (resourceLocator):? & Gt; विंडो) .FindName ("tb"):? & Gt; TextBlock let tbo = (Application.LoadComponent (resourceLocator):? & Gt; विंडो) .FindName ("tbo"):? & Gt; पाठ बॉक्स मान दें = "रॉक!" चलिए क्लिक करेंबटन = मज़ेदार _ - & gt; Lbl2.Content & lt; - "रॉक!" Let loadwindow () = संसाधनोलोकेटर = नई उरी ("/ कंसोल अनुप्रयोग 3; घटक / मुख्य विंडो। एक्सएमएल", उरीकिंड। रिलेटीव) जाने दें विंडो = एप्लिकेशन.लोडकंपनेन्ट (संसाधनलोकेटर):? & Gt; विंडो (window.FindName ("clickButton"):? & Gt; बटन। क्लिक करें.ऐड (क्लिक बटन) विंडो [& lt; STAThread & gt;] (नया एप्लिकेश...

asp.net - Safe way to pass this variable to javascript method for all browsers -

मेरे पास यह ASPX है:

Javascript remaping array into object the 0 (zero) values are excluded -

I have a problem (another): Repeating the array in the object 0 (zero) values ​​are excluded. Why and how to ignore this price? I need this 0 (zero) value :) My array: var data = {"queryInfo": {"totalRows": "18"}, "As a result": [["A", "Maxie", "ACC - GC", "SER", 5646.5], ["A", "Maxy", "ACCA - CA", "Kit", 2474.93], [ "A +", "Maxy", "ACC - DIV", "FORM", 1531.04], ["A +", "A", "ACC", "ACC", "SACC", "Net", 5418.72] , "Maxy", "ACC - DIV", "", "AIC - GC", "TEAM", 435], "A +", "MAXI", "ACC - DIV", "High Tech", 0], ["A +", "Maxy", "ACC - GC" ["A +", "MAXI", "ACC - LPI", "ALYS", 651], ["A +", "MAX...

php - Access instance variables with special characters -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब का प्रयोग कर SimpleXML PHP में, मैं केवल & lt; lj: उत्तर-गणना & gt; नोड मान को पकड़ना चाहता हूं। XML: & LT; LJ: सुरक्षा & gt; सार्वजनिक & lt; / LJ: सुरक्षा & gt; & LT; LJ: posterid & gt; 631,636 & lt; / LJ: posterid & gt; & LT; LJ: जबाब गिनती & gt; 42 & lt; / LJ: जबाब गिनती & gt; इस तरह से सॉर्ट करें, लेकिन स्पष्ट रूप से बिल्कुल नहीं, क्योंकि यह PHP पार्स त्रुटियों को फेंक देगा if ($ item- & gt; lj: reply-count ) $ उत्तरकाउंट = $ item- & gt; lj: उत्तर-गिनती मैंने कुछ अन्य बदलावों की कोशिश की और Google ने चारों ओर घूम लिया, लेकिन मुझे लगता है कि मैं क्या ढूंढ रहा हूं । धन्यवाद। चूंकि आपके एक्सएमएल के नाम स्थान हैं, इसलिए आपको उसके लिए विधि का उपयोग करना होगा। उदाहरण: $ xml_string = & lt; & lt; & lt; XML & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8"? & Gt; & Lt; रूट xmlns: lj = "http://www.examp...

php - mysql choose first record -

+ ---- + --------- + | आईडी | नाम | + ---- + --------- + | 1 | डेविड | | 2 | रोज़ | | 3 | पैट्रिक | | 4 | क्रिस | | 5 | एग्नेस | | | 6 | फ़्राया | + ---- + --------- + नतीजतन पहले मेरा विकल्प पूर्व रिकॉर्ड करता है: मैं पहले राज़ चुनता हूँ + ---- + --------- + | आईडी | नाम | + ---- + --------- + | 2 | रोज़ | | 1 | डेविड | | 3 | पैट्रिक | | 4 | क्रिस | | 5 | एग्नेस | | | 6 | फ़्राया | + ---- + --------- + + या मैं पहले एग्नेस चुनता हूँ + ---- + --------- + | आईडी | नाम | + ---- + --------- + | 5 | एग्नेस | | | 1 | डेविड | | 2 | रोज़ | | 3 | पैट्रिक | | 4 | क्रिस | | 6 | फ़्राया | + ---- + --------- + कुछ जैसे, आपका विशिष्ट नाम, फिर बाकी के लिए डिफ़ॉल्ट सॉर्ट SELECT * FROM 'आदेश से (`नाम` =' आरओजी ') डीईएससी,` नाम`

php - Convert jQuery option value to a non-object -

I am trying to pass the var text of an option into a jquery loading event but the code text is not returning Is the option value, I believe it is returning an object in return. How do I get string values ​​to select an option? Here the code is still here var statevar = $ ("# stateselect option: selected"). Val (); $ ("#stateselect"). Change (function () {console.log ($ ("#stateselect option: selected"). Val ()); $ ("#FactoryPricing") .load ("/ include / StateSelection Php" + "? StateSELECT =" + Statewide);}); }); php variable statetel = Returning empty while trying to call that variable Try it: console.log ($ ("# state option: selected"). Text ()); Example & lt; Option value = "3" selected = "selected" & gt; Three & lt; / Option & gt; $ ("...... option: selected"). Text (); // Return "three" $ (this) .val (); // Return "3" ...

javascript - how to make footer width responsible in wordpress (theme twenty thirteen) -

I have a problem with the site: when I give a web browser window size of 997px or less, the horizontal scroll Appears. I have this problem in this div tag: How can I change the style to reactive site work properly? This is because there is a minimum-width defined here. .archive-header, .search .page-header, .archive .page-header, .blog .page-header, .error404 page-content, .search .page-content, .archive .page -content, .attachment .entry-header, .attachment .entry-content, .post-navigation .nav-links, .sebar .site-info, .site -pifter Widget-field {minimum-width: 980px; } You can overwrite it when the screen size is smaller than 980 pixels.

objective c - Part of the image clickable in iOS -

I do not know this is the right place to ask this question. This image view takes full screen when I am displaying an image in a UIImageView. The image contains Facebook, Twitter and Email buttons (there are actually no buttons - it is designed in the picture). I want to make Facebook, Twitter and Email "button" and want to do something is it possible? You are not doing it correctly Most of the time when you If you create the interface, there are lots of logical components, and each component has its own functions (animation / noteable / editable components). For each of the different logical components, you should put a different element on it. In your case, I will set a full screen UIImageView for background, add UILabel for texts on this (you can choose on it If there is no effect on your text, but this is what I like because it is more flexible in the future). And above those people, you can add UIButton s to tweepable elements, for example, Faceboo...

java - Cannot use static List within Comparator -

Why me to fully qualify java.lang.String in the list of stable areas public stable class MyComparator & lt; String & gt; Applies Comparator & lt; String & gt; {Public stable list sort order; Public static list & lt; Integer & gt; SortOrder2; Public static list & lt; Java.lang.String & gt; SortOrder3; // Works! Public static list & lt; String & gt; SortOrder4; // & lt; - Compiler Error: Comparison of Override Public Int = Only In This Line (String S1, String S2) {// TODO return -1; }} The error "can not create a static reference for non-static type string" You have defined a normal type parameter string which is the same name as the square, therefore string refers to your parameter, while Java.lang.String still works. Remove it from your class, but keep it in the apply section. Public static class MyComparator Comparator & lt; String & gt; Applies. {

javascript - Angular.js ngTable select input as a column not showing the existing value -

I am using Angular.js 1.2 and I am trying to select an input in a ngtables cell . Popups the option list but ngModel does not select the item to display instructions. This is what my desk looks like at this time: & lt; Table class = "col-xs-12 table" data-ng-table & gt; & Lt; Tr data-ng-repeat = "task in template.tasks" & gt; & Lt; Td data-title = "'category'" & gt; & Lt; Class = "form-control template-work-category" data-ng-model = "function.categoryId" data-ng-option = "category for category category, track category categories according to category" & gt; & Lt; / Select & gt; & Lt; / TD & gt; & Lt; Td data-title = "'description'" & gt; & Lt; Input class = "form-control template-work-center-center-block" data-ng-model = "workdescription" /> & Lt; / TD & gt; & Lt; Td data-title = "'default ...

java - Why doesn't Chrome Developer's Tools an JS Fiddle include classes and void while in the Javascript console? -

I'm a new developer, and usually walking around in JS Friedal and Chrome Developer Tools. Looking at the responses on stack overflow, I saw that the user started from the public class and the static zero. Why do not I have to do this in Developer Tools? are Java and Javascript Put simply, Java was a low-level language, which is designed for server-side operation or operation in applet, while JavaScript basically websites (especially with static HTML content) Interactivity was designed to add Since then, the server-side space has also evolved, but now you do not need to confuse those words. Today, there is no more common ground than any other two programming languages ​​in two languages. You will see in dev tool that stands for JSL "JavaScript" JavaScript JS Fredl It is very unlikely that you actually use Java in your browser are doing. Examples of Java applications include: Android Apps, Eclipse (code editor suite), software on your ATMs etc. Examples inc...

Laravel not redirecting to route -

I am trying to validate some data from a data and redirects the user to the page with any errors I am My code does not redirect to any route. The path of all my passages works well I have echoed the input with input (all) and it has user input in it The verifier works also I am not sure What is actually prohibiting the redirect: Working from the path Public function postPurchase () {$ validator = validator :: make (input :: all (), array ('condition' & Gt; 'Required', 'Memory' = & gt; 'Required', 'Color' = & gt; 'Required', 'luggage' = & gt; 'required', 'shipping' = & gt; 'required')); // $ input = input :: all (); // DD ($ input); If ($ validator-> fails ()) // // resonant "string"; Return Redirect :: Way ('Home'); } Other {resonant "this succedded"; } // Get prices, item IDs, and send to the user on the checkout page / "Get value, item ID, etc...

c# - Index out of range exception in datagridview when header is selected -

Text after "div class =" itemprop = "text"> I think that for sorting or for any reason I get a follow-up error on the following line when I click on a title A DataGridView is the code .... The reason for our exception is the argument (the index was out of bounds. Should be less than the size of the non-negative and the collection. Private Zero firearmView_CellClick (Object Sender, DataGridViewCellEventArgs E) {Pre // I get the error above if line above. If (firearmView.Rows [e.RowIndex] .IsNewRow) {selectedFirearmPictureBox.Image = Image. FromFile (firearmView.Rows [e.RowIndex] .cs [12] .Value.ToString (), true);}} I do not know why I am getting this particular error here. In the MSDN docs, say about When RowIndex property returns -1, the cell is either a column header or a line of cells is shared. So you have to handle E.Roindex == -1 when you do yo event (... index .... not negative Not Received) Private Zero firearmView_CellClick (O...

python - Replacing missing data in pandas.DataFrame not working -

I'm digging in it I have a panda. Detafrem which column 'age in' scattered NaN ' value and the second column IsAlone has been created with value 1 or 0 on the basis of a private rule on the basis of that person was alone on that ship. I am trying to change the NaN values ​​on the columns age for those people who were alone and the average age of those people with the aim in the same manner which was not alone based on just a rule NaN instead of values ​​to practice Pands Detafrem I'm doing with them were alone: ​​ df_train [(df_train.IsAlone.astype (bool) and df_train.Age.isnull ())] .ge = \ df_train [(df_train.IsAlone.astype (bool) & Amp; ~ df_train.Age.isnull ())]. Age Mean () And the same way for those who were not alone: ​​ df_train [(~ df_train.IsAlone.astype (bool) and df_train .ge.isnull ())]. Age = \ df_train [(~ df_train.IsAlone .sleeppe (bool) and ~ df_train.Age.isnull ())]. Age Pisces () But it is not working at all...

angularjs - Parsing JSON data into table -

मेरे पास ऐसा एक JSON स्ट्रिंग है: {"प्रगति में": 1, "पुनः सौंपा": 0, "पूर्ण": 0, "प्रस्तुत": 1, "समीक्षित": 0, "असाइन किया गया": 0, "असाइन किया हुआ": 0, "ड्राफ्ट": 1, "समीक्षा में": 0 } मैं इसे एक सरल तालिका में स्वरूपित करना चाहता हूं जैसे: & lt; table & gt; & LT; thead & gt; & LT; टीआर & gt; & Lt; th & gt; राज्य का नाम & lt; / th & gt; & LT; वें & gt; गणना & lt; / वें & gt; & Lt; / टीआर & gt; & Lt; / thead & gt; मैं & lt; tr & gt; और & lt; td & gt; वर्गों के रूप में क्या डालूँ? कहां आपका $ scope ऐसा कुछ दिखता है: $ scope डेटा = {"प्रगति में": 1, "पुनः सौंपा गया": 0, "पूर्ण": 0, "सबमिट किया गया": 1}; एनजी-दोहराने : में अभिव्यक्ति के लिए थोड़ा अलग उपयोग करने की आवश्यकता है; & Lt; tr ng-repeat = "डेटा में (कुंजी, वैल)" ...

compiler construction - Code for translating JSP to a class for portlet -

I know that translating the JSP file into an SSVT (a Java class) file in Apache. I want to get the source code for this translator. I want to modify it to create a portal class. I need to translate JSP into Java class, where Java code creates code for portlet. I highly appreciate, if anyone can tell me where I can get an open source code for this translator / converter. Once my translator gets ready, there is nothing to release me as an open source, if someone needs such a converter. Best regards, Raju Here is the Tomcat source code repository: for example Here is the source code for the JSPC compiler: Now, just my opinion. The jsp pages can not be converted directly into the portal, because Portlets and JSP pages have different sets of restrictions to operate with web page structure. > But by the way - Good luck with that :)

ruby on rails 4 - Cannot load such file uglifier -

I'm having this error: error ("Load error: not loaded I can not manage this error on Rail 4.1.4. This is my jammf file: eg file - Uglifire \ n (in / var / www / dev / app) Source 'https://rubygems.org' Mani Rail ',' 4.1.4 'Mani' mysql2 'Mani' jquery-rails' Mani 'devise' Mani 'Spring', Group :: Development Mani 'Unicorn' I tried to keep the light as light as possible, so I did the TurboLinks Removed, and all those initial gems: -gem 'sass -rils', '~> 4.0.3' -Gam 'eugriffire', 'gt = 1.3.0' - Village 'coffee-rail', '~> 4.0.0' -Gam 'turboilance' I used the rake property: precompile or RAILS_ENV = The output rake property: used the precompile and I think the JS file is compiled incorrectly. This is my application.js: / / = Required jquery // = Required_js / require_tree And this is my production. RB: # Compile JavaScript and ...

html - CSS state for current menu page? -

Image
To get started, I have an automated list that holds my menus. & lt; Ul id = 'css3menu1' class = 'top menu' & gt; & Lt; Li class = 'top menu' & gt; & Lt; A href = 'home.html' & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = 'top menu' & gt; & Lt; A href = 'forum.php' & gt; Forums & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = 'top menu' & gt; & Lt; A href = 'policy.html' & gt; Policy & lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = 'top menu' & gt; & Lt; A href = 'logout.php' & gt; Logout & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; What I want to do when the user is on the page, the hover state becomes active In other words, change the background color of the menu item with a dark color on which the user's Depends on the page. ...

node.js - mongodb Callback inside for loop in nodejs -

I am trying to fill the mongoDB archive with data from Excel. I think I understand the incredible nature of the callback and therefore localized this area using another function before the database callback. However, I can not follow my error. Here is the code. var http = need ('http'); Var parseXlsx = Required ('Excel'); Var Mongo = expected ('mongoskin'); Var faker = is required ('Fake'); Var moment = expected ('moment'); Var object = requires ('mandode'). Object; Var uristring = process.env.MONGOLAB_URI || Process.env.MONGOHQ_URL || 'MongoDB: // local host: 27017 / loadmongo / data'; Var db = mongo.db (uristring, {Native resident: true}); Db.on ('error', console.error.bind (console, 'connection error:')); Db.once ('open', function callback () {console.log ('connect');}); Http.createServer (function handler (req, res) {res.writeHead (200, {'content-type': 'text / plain'});...

Capturing and storing all matches for regex using D -

I'm trying to capture every instance of the text with numbers, numbers and underscores after the% symbol, unless I have written the following regex to do this: ((? I want to store everything to capture it in an associative array like this, and so I wrote the following function to do it: / P> string [string] Make_symbol_table (string input) {string [string] symbol_table; Automatic M = Match All (Input, Regedx ("(?? & Lt;! (?: \\ |%))% [a-zA-Z0-9 _] +)", "G")) . Capture (); (Auto i = 1; i & lt; m.length; i ++) for {symbol_table [m [i]] = null; } Return symbol_table; } and tested it on the following input: This is a simple% template, with some well-located% template_arguments. It uses a range of characters, mostly to ensure that% template1 works correctly. \ N \ nYou can also start a% 1 template with a number! We may also have some silly matters:% _% 1,% a, and so on. Should never be captured in %% method, nor should you run from \\% or...

c# - Enable windows service programmaticaly -

I am trying to enable a window service program by modifying the value in the registry below and changing the value. However, I am not able to start the service after this because the windows are still unable to see it. Public Zero Enabled TheService (string serviceName) {try {RegistryKey key = Registry.LocalMachine}. OpenSubKey (@ "System \ CurrentControlSet \ Services \" + serviceName, is true); Key.SetValue ("Start", 2); } Hold (Exception Pre) {Console.Write (ex.Message); }} Public Zero StartService (String Servant) {ServiceController Service = New Service Controller (serviceName); Try {service.start (); Service.WaitForStatus (ServiceControllerStatus.Running, New TimeSpain (0, 0, 0, 20)); } Hold (Exception Pre) {Console.Write (ex.Message); There are several ways that you can access windows Can change the startup type of service (see). If I remember correctly that when I tested it but was not completely reliable, I used the Windows API function. I h...

passwords - PasswordHash not working php CI -

I have followed the tutorial, but when I enter the password M @ Ndiri %% 321 and M @ ndiri %% 654 At any rate my password has been reversed. If there is a problem in regex? How to fix ?? Thanks According to the regex shown above, you should not be anything except alphanumeric characters, but like That you can see, you have some special characters in your password string :) The above expression can be written as / ([a-zA-Z0-9] +) / If you want to add special characters such as / ([[: alnum:] +]) / g then / ([- ~] +) Use / g . This will allow you to use (English) alphanumeric and special characters. Or if you want to allow alphabetical and only special characters described below, then / ([a-zA-Z0-9% @ # $] +) / g Use your comments. How to use the above pattern with PHP $ password = "aH8J9% 3 $%"; If (! Preg_match ("/ ^ ([a-zA-Z0-9% @ # $] +) $ /", $ password) {echo "invalid password!";} How to use it with Javascript va...

google analytics event tracking for individual users -

Hi is using google analytics ga.js to track a button click event. Although it's working fine, I want to track button click events for individual users on my site. (Like Karthik-5, Richard -7 etc.) I'm using WordPress. How to get it? There are ways to track non PII user data by using Google Analytics. It is the one used by You can do this to import information of what you are looking for. Actually, you can send user scraps in a custom dimension that reflects the user with hit data, and then a CSV import that scales the dimensions of any other user to the custom dimension.

java - how do I delete .jar files in the JRE System Library? -

Image
Due to my homework work for my class, I was given lots of Java files to import, I was sleeping for a way to import them into the package (I did not know that I could just pull and drop ..), but instead I imported them into the JRE system library folder, where I can not remove them. I understand the mistake I made, though I can not find any way to remove these files from JRE 1.7. I have re-assumed eclipse, and even removed the JRE 7 folder and reinstalled the JRE. But the files are still here. Window - & gt; Preference - & gt; Java - & gt; Installed JREs - & gt; Select Zero - & gt; Edit - & gt; Click on the jar to remove - & gt; Delete on the right menu.

sql server - How can I change the value returned from a SELECT inside a stored procedure? -

मेरी संग्रहीत कार्यविधि निम्न लौट रही है: DECLARE @ AnsverGridCorrect VARCHAR (20)। .. ... SELECT @ AnsverGridResponses एएस उत्तर ग्रिड रीस्पॉन्स, एन्वेर ग्रिड संरूपण के रूप में उत्तर ग्रिड संकेतन, @ प्रमाणित के रूप में प्रमाणित, @ आरसी एएस आर सी, @ परिणाम के रूप में परिणाम मैं इसे NULL के लिए @ AnsverGridCorrect अगर @Result = 'F' ? विवरण आप ऐसा स्विच केस स्टेटमेंट के द्वारा कर सकते हैं। नमूना घोषणा @ AnsverGridCorrect VARCHAR (20) ... ... SELECT @ AnsverGridResponses एएस उत्तर ग्रिड रीस्पॉन्स, एसएएस @ रिजल्ट WHEN 'एफ' फिर शून्य ELSE @ AnsverGridCorrect END के रूप में उत्तर ग्रिड संकेतन, @ अधिकृत के रूप में प्रमाणित, @ आरसी एएस आर सी, @ परिणाम के रूप में परिणाम अधिक जानकारी

excel - How to get file extension using Microsoft XMLHTTP using VBA -

I am using the following simple code to download and save some files from the Internet. The server that I am sometimes connecting to excel files and generates text files for the second time, I know that if theres want to find out in any possible way what file extension then download it with the proper detail Can be done? Right now I save files all of the files in the form of text and if the file returns the file excellence then the downloaded file will be useless (as it is saved as a txt file and I change the extension manually ). Thanks guys Dim myURL String Dim as WinHttpReq Object FSD string as myURL = "Sample URL" WinHttpReq = CreateObject ("Microsoft.XMLHTTP") WinHttpReq.Open "GET" , As myURL, wrong WinHttpReq.Send myURL = WinHttpReq.ResponseBody if WinHttpReq.Status = 200 then Ostream = Create Object ("ADODB.Stream") ostream. Open Ostream Type = 1 ostream.Write WinHttpReq.ResponseBody Ostream. SaveToFile (FP & "& amp; 1;...

java - 405 - method not allowed calling web service from struts -

Image
I have a data access object that calls the web service. In my browser, I can hit the web service using a URL and it is successful. http: // mycompany: 9080 / reporting manager / service / repManHealth / importHistoryTrafficLightStatus.json But when trying to execute the code, in my data access object, I get a 405 error saying method Not allowed. string request request = "http: // mycompany: 9080 / reporting manager / service / repManHealth / importHistoryTrafficLightStatus.json"; Url url = new url (request urai); HttpURL connection httpCon = (HttpURLConnection) url.openConnection (); HttpCon.setDoOutput (true); HttpCon.setRequestMethod ("GET"); HttpCon.setRequestProperty ("Accept", "App / JS"); OutputStream Water Out = New OutputStream Water (httpCon.getOutputStream ()); Int ResponseCode = httpCon.getResponseCode (); String response message = httpCon.getResponseMessage (); BufferedRadder RD = New buffed reader (new inputtreamreade...

python - Adding 1 to an integer value gives TypeError -

I know that this is probably a super simple answer but I have some problems with basic programming questions. I am trying to program for Python so that in this case can add a specific variable "age" + 1 This is not working import cgi form = cgi.FieldStorage () "content type: text / html & lt;! DOCTYPE html public" (); Text1 = form.getvalue ("name") text2 = int (form.getvalue ("age")) # Print HTTP / HTML Header Print ("" "- //W3C / DTD XHTML 1.0 Stronger // N "" Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Head & gt; & lt; Title & gt; A CGI Script & Lt; / title & gt; & lt; / head & gt; & lt; body & gt; "" ") Print (" & lt; p & gt; hello, "+ name +". & Lt; / p & Gt; ") Print (" & lt; p> Next year you will be of "+ str (age) + 1" year; ") Print (" & lt; / body & Gt; ...

php - Second query doesn't work -

The first query works fine but the second query does not update the database. I'm not getting the error & lt ;? Php if (isset ($ _gET ['id'])) {$ editdes = $ _GET ['id']; $ Con = mysqli_connect ("localhost", "user", "password", "destino"); $ Con1 = mysqli_connect ("localhost", "user", "password", "var"); // Check connection if (mysqli_connect_errno ()) {echo "failed to connect to MySQL:". Mysqli_connect_error (); } Mysqli_query ($ con, "Update Dinosaurs SET Precio = 730 where denito = '$ editdes'"); Mysqli_query ($ con1, "UPDATE var SET variable = '$ editdes' WHERE variable = *"); Mysqli_close ($ thief); }? & Gt; * is a string if the value of a Fields used in and should be cited UPDATE var SET variable = '$ editdes' WHERE variable = '*' Very important:

actionscript 3 - How to add html page into a flex web application -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर कैसे html पृष्ठ को जोड़ने के लिए एक फ्लेक्स वेब अनुप्रयोग मेरी आवश्यकता तब होती है जब कोई बटन क्लिक किया जाता है, मुझे एक विशेष HTML पृष्ठ को पॉपअप के रूप में खोलना है। फ्लेक्स वेब अनुप्रयोग में यह संभव है, एफवाईआई, एमएक्स: फ्लेक्स वेब अनुप्रयोग में एचटीएमएल घटक समर्थित नहीं है, फ्लेक्स वेब अनुप्रयोग में स्टेज वेबफ़ेव भी समर्थित नहीं है। मुझे गतिशील एचटीएमएल चाहिए फ्लेक्स (वेब) में प्रदर्शित करने के लिए सामग्री, कृपया मुझे संभावित समाधानों के साथ मार्गदर्शन करें। आप RichText घटक का उपयोग कर सकते हैं import flashx.textLayout.formats .WhiteSpaceCollapse; आयात spark.utils.TextFlowUtil; संरक्षित फ़ंक्शन importRichText (): शून्य {var richTextXML: XML = & lt; TextFlow xmlns = "http://ns.adobe.com/textLayout/2008" & gt; & Lt; p fontSize = "10" & gt; एक छोटा सामान्य अनुच्छेद & lt; / p & gt; & Lt; p fontSize = "14" fontWight = "बोल्ड" & gt; मध्यम माध्यमिक ...

android - images in gridview from lazyloading are mixing places on scroll -

In my application, I'm loading lazy in a gridview with the URL. When I scroll through my grid view, the images change their position. How is this possible ? I'm new to Android so can anybody help? This is my list adapter code: import android.app.activity; Import android.content.Context; Import android.view.LayoutInflater; Import android.view.View; Import android.view.View.OnClickListener; Import android.view.ViewGroup; Import android.widget.BaseAdapter; Import android.widget.ImageView; Public class LazyImageLoadAdapter BaseAdapter applies OnClickListener {Personal Activity Activity; Private string [] mStrings; Private reference mContext; Private stationary layoutInflator inflater = faucet; Public ImageLoader imageLoader; Public LazyImageLoadAdapter (Reference Reference, Activity A, String [] D) {Activity = A; MStrings = d; MContext = Reference; Inflater = (Layout Inflator) Activity getSystemService (Context.LAYOUT_INFLATER_SERVICE); ImageLoader = new imager (activity.g...

Passing a structure handle (converting C to C++ OOP) -

Can you suggest in a way how I can "handle (* h)" inside an object Am I This way my code c. Looks like int open (const char * name, ini_file_t **); Read int (ini_file_t * h, const char * sn, const char * kn, int *); Write int (ini_file_t * h, char * sn, char * kn, int); Int ini_file_close (ini_file_t * h); I'm trying to delete it (+ h) in C ++. XTextFile {public: int open (const char * name); Read int (const char * sn, const char * kn, int *); Write int (four * sn, four * cube, int); Int ini_file_close (); }; Can you share some suggestions about how I can do this? Or am I on the right track when doing this in OP? This will be my explanation: class XTextFile {Public: XTextFile (const std :: string and name); // Constructor opens () ~ XTextFile (); // replaces destructor ini_file_close int (const std :: string and sn, const std :: string & kn, int *); Write int (four * sn, four * cube, int); // Not sure what these parameters are, but they sho...

PHP reading lines from file and compare them -

I am trying to read all the rows from a file and try to see if what is in the given string None of these have row. My code $ mail = file ('blacklist.txt'); $ Email = "hendrik@anonbox.net"; $ Fail = False; Forex Currency ($ Mail $ as Mail) {If (SRPO ($ Email, $ Mail)> 0) {$ fail = true; }} If ($ failed) {echo "unsuccessful"; } And {echo "you can use it"; } blacklist.txt can be found here. I hope there will be a status returned for stops black list has at least one string, but it is not. I'm guessing that I am not generating any kind of values ​​within $ mails because I hope. Edit it print_r ($ mails) EDIT2 Some explanations: I have to check whether a domain is inside email, even if in the mail is subdomain.domain.teed . And I got the & gt; Instead of ! Tried using the == incorrect ; 0 which achieved the same result. Checking the domain of the email address, if there is blacklist inside it Example: $ em...

continuous integration - Keep project history when transforming project in module in SONARQUBE -

I recently tried to change a sonar project in another project module. I came to know that to keep the current module in a module, it has to be removed. However, I want to keep the history of the project. Is this possible? Unfortunately this is not possible, and we do not do this, it is possible to make a plan for the moment is.

ASP.NET Identity Create an Account -

I am using ASP.NET MVC 5.0 EF 6.0 and Identity 1.0. I is a seed festival which currently runs successfully and incorporates various pieces of data such as 'teacher' into the database. I would like to expand the seed festival, so that when I make a new teacher, it also creates a new user account in the aspen's table. I have tried the following code in the 'SampleData.cs' file: Using the system. Colllections.Generic; Using System.Linq; Using System.Data.Entity; Using Oberhofen.EdNow.Data.Models; Using Oberhofen.EdNow.Model.Models; Using Microsoft.AspNet.Identity; Using Microsoft.AspNet.Identity.EntityFramework; Using the system; Nameshot Oberhofen.Adnov.Data {Public class Adenospledata: DropCreate DibSimedel Changes & lt; Adenovantitis & gt; {Personal User Manager & lt; ApplicationUser & gt; UserManager; Protected Override Zero Seed (EdenNews Reference) {// Create a new account String Username = "Volock"; String password = "pa...

shopify - How to get value from customer's notes field? -

I am working on the store and my requirement is to add some additional information of the user and I followed this link: - But now I want to know how to get value from the customer [note] [label] field in my liquid code. As such, I am able to use the customer's name as {{customer.name}} which is stored in the customer [name] field but receives value from customer [note] [label] Unable to field the customer.not is not appearing through it currently Only available through this is because customer notes are not to be displayed in your shop, they are for shop owners to manage customers in the admin area. Instead, an alternative is used. Relevant discussion on shopping platforms:

css - Execute function on class when load and resize (Jquery) -

I have a problem with the following function. It is crazy that for all parents, with the "center_vert" class, all divs are to be centered in the center when the page is full, then the center with vertical "center_vert" is vertically centered only in the first div. When I change the size of the page all the elements are centered. Why are not all divs with the "center_vert" class centered on the load? $ (document) .load ($ (window) .bind ("resize", centerVertically)); $ (Document) .ready (centerVertically ()); Function Center (especially) ($ {'(center_vert'). Each (function () {var parentHeight = $ (this) .Parent () height (); var selfHeight = $ (this) .height (); $ (this) .css ('padding-top', function , X) {returns ((parentheit-swight) / 2);});}); }; Remove empty space near the function name. You should get an error in your browser console related to this error. $ (document) .ready (centerVertically ());

xtable - Table with function in R -

Do I need to do some descriptive statistics on datasets I I need to make a table from a dataset which gives me, Meaning of any other variable for each variable. City means (age) 1 14 2 15 3 23 4 34 What is the fastest way to do this? I do whatever it is the same thing, but on two dimensions: mean (age) Male Female City 1 12 13 2 15 16 3 21 22 4 34 33 and I wonder if there is more likely to apply to other functions, minimum, yoga .... edit: I instances adds a dataset to simplify am: data.frame (year = representatives (c (12,13, 14,15,15,16,34,67,45,78, 17,42), 2), gender = representative (c ("m", "f"), 12), city = representative (c (1, 2,3,4,4,3,2,1), 3 )) dcast on large data sets> Detatabl package can be added a) library (data only) means library (Reshape2)) Dcastkdataktable (Setditi (DTO), city ~ gender, Mankvr = "old" fun =) # City FM # 1: 1 41.33333 24.0 0000 # 2: 2 35.66667 21.66667 # 3: 3 35.66667 21.66667 # 4: 4 ...

java - how to pass a list to sql query in the below mentioned scenerio -

I have to give a list in a stored procedure that the user has selected that list as a string in the Java end . Example: string list = "123,467,980"; Now if I take this string in the stored procedure, how will it work? I can not use it as the following: select * table_name where code in (list_var) This functionality will be the best way to get that so no one can guide me. Type your SQL on your client side: string sql = "Select * from tablemap" where in the code ("+ list_var +") "; Or, if you want to call stored stored procedures with the actual parameters shown in your list string: String [] id = list.split (","); String sql = "{call for your processing ("; (int i = 0; i Alternatively: string sql = "{call your phone (" + + list + ")}"; Callable Stattement cst = con.prepareCall (sql);

php - Url Manager issue in Yii -

मैं यूआरएल नियमों का पालन कर रहा हूं: 'urlManager' = & gt; सरणी ('urlFormat '=' Gt; 'path', 'showScriptName' = & gt; गलत, 'नियम' = & gt; सरणी ('& lt; नियंत्रक: \ w + & gt; / & lt; id: \ d + & gt;' = & gt; '& lt ; नियंत्रक & gt; / दृश्य ',' बचाता है / rescueprofile / & lt; id: \ d + & gt; '& gt;' बचाता / rescueprofile ', //' & lt; नियंत्रक: \ w + & gt; / & lt; breed: \ w + & Gt; '= & gt;' & lt; नियंत्रक & gt; / दृश्य ',' / नस्लों / & lt; नस्ल: [^ \ /] + & gt; '= & gt; नस्लों / दृश्य', '& lt; नियंत्रक: \ w + & Gt; / & lt; कार्रवाई: \ w + & gt; / & lt; id: \ d + & gt; '= & gt;' & lt; नियंत्रक & gt; / & lt; क्रिया & gt; ',' & lt; नियंत्रक: \ w + & gt; / & lt ; कार्रवाई: \ w + & gt; '= & gt;' & lt...

assembly - How to use #include for .S file in Xcode? -

#include director in Xcode. Same does not seem to use the same header / user search path settings CPP. MM Etc. Does anyone know where this setting stays? Is this just a bug? Is it possible that I want to include in my format: ./../../ some / path / it is not working? I think this is a bug if my project file opens in the text file / /. ../../Some/Path/ is unavailable, and instead I added last year (which always used to work, and I thought weird that it was missing when I first saw it). Include the file handheld hand in hand.

sql - Mysql : How to know the value of a field at date (audit table) -

मेरे पास एक फ़ील्ड opt_out फ़ील्ड के साथ संपर्क है। क्षेत्र opt_out में 'वाई' , 'एन' और नल। मेरे पास फ़ील्ड के साथ एक तालिका CONTACT_AUDIT है तारीख contact_id field_name value_after value_after जब मैं जोड़ता हूं एक नया संपर्क, CONTACT तालिका में एक नई पंक्ति जोड़ दी जाती है, CONTACT_AUDIT तालिका में कुछ भी नहीं। जब मैं कोई संपर्क संपादित करता हूं, उदाहरण के लिए यदि मैं opt_out फ़ील्ड का मूल्य NULL से 'वाई' में बदलता हूं, तो opt_out CONTACT तालिका में फ़ील्ड वैल्यू बदल दी जाती है और CONTACT_AUDIT तालिका में मूल्यों के साथ एक नई पंक्ति जोड़ दी जाती है date = now () contact_id = & lt; मेरे संपर्क का आईडी & gt; फ़ील्ड_नाव = 'opt_out' value_before = null value_after = 'y' मुझे उन संपर्कों को जानना होगा जो opt_out = 'Y' को किसी दिए गए दिनांक में। I इसे करने की कोशिश की: SELECT count (*) एएस एनबी से संपर्क सी WHERE (- संपर्क अब ऑप्टआउट किया गया है और इसे कभी भी संशोधित नहीं किया गया है c.optout = 'Y' और...

html - How to make the popup box show up once the site is opened -

Hi friends Anyone about how to create a popup box after the site is open idea. Currently the popup box will be clicked once. It is possible that the box will open when the site loads. & lt; Span class = "box" & gt; & Lt; Span class = "title" & gt; Title & lt; / Span & gt; & Lt; Span class = "copy" & gt; Pildeske's House Matrici Tristique Carnatus and Net & Lt; / Span & gt; If you just want to show pop-up on page load (instead the button After clicking on) & lt; Input & gt; Tag by default by selecting check = 'true' on page load as . HTML: & lt; Input type = "checkbox" id = "linkie" class = "popUpControl" check = 'right' & gt; Note: The above animation / transit effect does not show because there was no state change in it. If you want to display the transition on page load, then you have to initially leave input as unchec...

php - Installing dBase extension in XAMPP -

I have a problem installing the debugge extension in XAMPP with PHP 5.5.11. I added the php_dbase.dll to the php / ext folder and added the following line to the php.ini file: extension = php_dbase. Dll But when I see this code in my script: dbase_open ('file.dbf'); I found an error message: Call dbase_open () for the undefined function ' installed properly How to do dBase extensions? Try this link: In my case I have: XAMPP 1.8 .3 [PHP: 5.5.15] And I use it: php_dbase-5.1.0-5.5-ts-vc11-x86.zip Access your PHP windows environment Download the correct version for Regards,

javascript - Open new tab in the same browser window after some event -

इस सवाल का पहले से ही एक उत्तर है: 25 उत्तरों आप में से कुछ इस प्रश्न के लिए बेवकूफ लग सकता है, लेकिन मुझे ऐसा नहीं लगता ... तो, मूल रूप से मैं क्या हासिल करना चाहता हूं, उसी ब्राउज़र विंडो में javascropt द्वारा नया टैब खोलना है, लेकिन यह नहीं होना चाहिए कुछ पर क्लिक करके खोला मैंने कई चीजों की कोशिश की है ... window.open (url, "_ blank") किसी भी तरह से गूगल क्रोम के लिए काम नहीं करता, यह क्रोम की पूरी नई विंडो खोलता है ... फिर मैंने ऐसा कुछ करने की कोशिश की `& lt; a href =" "target =" _ blank "id =" link "& gt; & lt; / a & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; फ़ंक्शन ओपनन्यूटैब (लिंक) {var a = $ ('a [target = "_ blank"]') [0]; A.setAttribute ('href', लिंक); // document.getElementById ("लिंक")। क्लिक करें (); // a.click (); } & Lt; / script & gt; ` फिर भी अगर मैं किसी भी पंक्ति को टिप्पणी करता हूं, यह अभी भी वही करता है,...

ftdi - Visual C++ error with ftd2xx.h -

Image
I have created a CPP blank project in Visual Studio 2013. I add a form (not currently used) In this code: #include & lt; Iostream & gt; #include & lt; Windows.h & gt; # Include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; # Include & lt; Conio.h & gt; #include "ftd2xx.h" using namespace std; Int main () {FT_HANDLE ftHandle; FT_STATUS ftStatus; FtStatus = FT_Open (0, and FThandle); If (ftStatus! = FT_OK) {cout & lt; & Lt; "Error opening FTDI \ n"; } Cout & lt; & Lt; "Fdfd"; Return 0; } I take these errors: Error 1 error LNK2028: Unsolved Token (0A 2000410) "External" C "unsigned long __stdcall FT_Open Error 2 referenced in (int, null * *) "(? FT_Open @@ $$ J18YGKHPAPAX @ Z) function" int __cdecl main (zero) "(? Main @@ $ $ HYAHXZ) LNK2019: Unsolved exotic symbol" extern " C "__stdcall FT_Open (int, void * *) referred to in the unsigned l...

node.js - Create, Update and Delete arrays within arrays in mongoose -

I have a schema like below. course: [{institution: string, from: date, date: date, aggregate session: string, coursework: [{semestername: string, score: string, from: date, date:] }} I know how to add a new course, but how do I value the value of a particular research based on the _id prepared by each coursework? Can I update when there are many text-list items? In addition, similarly, how do I remove a special research from the large collection? Any help is appreciated .. You can select an individual sub-document using the .id () method. Therefore, assuming an existing course document called course : var coursework = course.coursework.id ('id- coursework'); This document can be deleted again: coursework.remove (); Note that you will have to save the parent code course to continue the changes in sub-documents.

javascript - Filtering data-foreach rendering view with option dropdown, BatmanJS -

I simply try to manipulate a populated table by Batman JS to filter the entries with a dropdown option box I am doing (html view code) & lt; Select Data-Bind = "Itemview" & gt; & Lt; Option Data- foreach-item = "items" data-bind = "item.key1" data-bind-value = "item.key1" & gt; & Lt; / Options & gt; & Lt; / Select & gt; & Lt; Table & gt; & Lt; Tr class = "key" & gt; & Lt; Th class = "label" data-bind = "keys. Key1" & gt; & Lt; / Th & gt; & Lt; Th class = "label" data-bind = "keys .key2" & gt; & Lt; / Th & gt; & Lt; Th class = "label" data-bind = "keys .key3" & gt; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; Tr class = "item" data-foreach-item = "items" & gt; & Lt; Td square = "name" data-bound = "item.key1" & gt; ...

python - I'm having trouble calling up a value inside a class -

I am having trouble calling this value in class and I do not understand what is wrong with this implementation May be click the square image: def image_clicked (auto, event): self.x = event.x self.y = event.y userClick = imageClick () print userClick.image_clicked. X imageClick Should be an introductory method for location: click the square image: def __init __ ( Auto): self.x = None at all self.y = any def image_comic (self, event): self.x = event.x self.y = Event.y now Try it: userClick = imageClick () userClick.image_clicked (someEvent) Print userClick.x Note that imageClick 'S image_clicked () method is expected to have an event as a parameter - and that is where the coordinates are obtained from x and y Are done.

objective c - Page controller not displaying correctly -

Image
The division on my page control, which is in an EXB, has been cut / trimmed on an iPad non-retina . A pixel or 2 is missing in the top and right sides of the dots. How to fix any idea? Here is a screenshot of dots (see closely) This is usually due to an odd number split, and this is why you can only do it with non-retina devices Look at This will be useful for viewing the frame of your page control for both size and coordinates, there is a strange value between those people who go to the non-retina screen to bring the component to "half-pixel". Looking at the image you attached looks like the original. It is placed on the "half-pixel" value. Try frame NSLog and you will probably see what I mean. Hope it helps.

java - Unable to add product details while creating new quote -

I am developing an Android app to create a new quote in the vTiger (ver 5.4) CRM server. I was able to generate a new quote but was not added to the product_id and the quantity I sent in addition to the bid details. Except other details, products, their quantity and pricing, are being shown in new bids. I also studied but it was not helpful in this case. / Em> I found the same thing but it is in php not in Android / JavaA . Similarly I am sending the necessary details to create a new quote in the vTiger server. - try {objectJson.put ("subject", subject); ObjectJson.put ("account_id", account id); ObjectJson.put ("bill_street", address); ObjectJson.put ("assigned_user_id", "19x1"); ObjectJson.put ("conversion_rate", "1.000"); ObjectJson.put ("currency_id", "21x1"); ObjectJson.put ("hdnTaxType", "Groups"); ObjectJson.put ("productive", prod...

sql - Two Column Data Structure - Python -

If I have a list of colors, how do I know about creating a data structure in a loop [(u'blue ',), (u'green'), (u'black ',)] and a data structure is required ( Maybe 2 ('blue', 'blue'), ('green', 'green'), ('black', 'black')) code> In addition, as an additional, why (and what kind of variable) is a list of my colors that is made with the items prefixed with you and they Surrounded When I try the string ops and do not recognize it as part of the string, the data comes from a pyodbc query on a column in SQL DB (not really color!). For example if I was modifying the first row in colours_list (not the correct syntax) line [2:] print row (u'ue ',) # Output thanks! Using generator expression and taple unpacking: & gt; ; & Gt; & Gt; Color = [[('U', ''), (U'Green ',), (U' Black ',]] # If you want a Tuepal of Two-Item Tuples, then `Tupl ()`...

objective c - AFJSONRequestSerializer POST JSON Array -

I am trying to post to the API which is expecting the JSON array as input, for example For: [["token": "bd3", "display_order": 0}] I get the AFJSONRequestSerializer to get this build up: Unable to create parameter, my code: NSDictionary * campParams = @ {@ "token": @ "bd3", @ "display_order": @ "0"}; NSArray * arr = [NSArray arrayWithObject: campParams]; NSDictionary * Final = [object with NSDictionary dictionary: arr forKey: @ ""]; that creates JSON: {"": [{"token": "bd55", "display_order": "0"}]} How do I modify my code to get the proper JSON output? I am making a second dictionary as AFHTTPRequestOperationManager accept the parameter as a dictionary, not an array [keep the manager. Url parameter: Final success: ^ (AFHTTPRequestOperation * operation, id responseObject) {/ Done} failure: ^ (FTPTRAQ operation operation *, NSERR * error) {...