Posts

Showing posts from February, 2011

cloudfoundry - Pushing ruby app to V2 cloud - Error, no such file ruby_versions.yml -

(cross-post on) I have a hand-made V2 installation for which I'm trying to push a Ruby app correctly to identify this Ruby app because it reports that it is "installing Ruby." But then the following is thrown: Installing Ruby. /usr/lib/ruby/1.9.1/psych.rb:297: 'Start': There is no such file or directory - ruby_versions.yml at / usr / lib / ruby ​​/ 1.9.1 / psych (Errno :: ENOENT ) .rb: 297: / home / cdavisafc / cloud-fabric / dea_ng / buildpacks / vendor / ruby ​​/ lib /usr/lib/ruby/1.9.1/psych.rb297:in_load_file from 'open' in ' `/language_pack/ruby.rb:192:in block ruby_versions (2 levels) /home/cdavisafc/cloud-fabric/dea_ng/buildpacks/vendor/ruby/lib/language_pack/ruby.rb: 190: from in` chdir / usr / lib / ruby ​​/ 1.9.1 / tmpdir.rb from '' the /home/cdavisafc/cloud-fabric/dea_ng/buildpacks/vendor/ruby/lib/language_pack/ruby.rb:190:in block ruby_versions': 83: `/ home / cdavisafc / cloud-clothes / dea_ng 'ruby_versions / home...

javascript - Stuttering on mouseout of moved image element -

Actually, when hovering over an image, I want to move the image slightly more then mouseout, return the image Original Place I have a version of this code that works to accomplish this task, but if the "mouse" is a bit of the "here and there" effect, then the user was moving the mouse from that image Where the image was originally located. ----- | | ----- | Img | | | | | | Img | ==> ----- | | In the above diagram, when the mouse jumps over the image, it is pulled up to 2 units. On mouseout, the image returns to the original state. My code works, but when the mouse is moved to an empty area (for example, X), the code thinks that it is hovering over the image again and then the image is returned to 2 units It is brought about by hovering the mouse over the area marked upwards, it creates a kind of rattling effect. I have tried various methods (such as using animate (), adding / removing a wrapper div using the settimeout, etc.) but they all produce the sam...

javascript - PhoneGap Build: how to open external url in device browser on Android? -

The external URL does not open in the phone's browser in my PhoneGap Android application. I'm using PhoneGap build 2.3.0. According to I used the target_system: window.open ('http://www.myurl.nl', '_system'); I have my config.xml: & Lt; Origin of access = "*" Browser only = "true" /> But still open the webwain in my app I How to solve it? When you want to keep, the answer is no, using the PhoneGap build, but on my machine Cordova 2.5.0 window.open ('http://www.myurl.nl', '_system') was set up by setting up a development environment for Cordova (PhoneGap) and compiling the app locally. ) In; does the right thing, it will open links in the system's browser. So my advice is to stop using the PhoneGap build and start compiling your app locally.

php - preg_split() help, properly formatted regular expression -

I am very weak in regular expressions I want to split these letters on: Location "" The hyphen " Underscore" _ " I have it: preg_split ('/ \ + | - | \ | | _ /', $ string], .. I suspect this is not correct - I like some advice on the "+" sign. preg_split ('/ [+ \ s _-] /', $ string); should work for you Unlike the squares, the characters are creating a character square. Note - It is sometimes important that - , So I keep it always kept safe.

excel - VBA - Get Selected value of a Combobox -

I have thousands of cells in the worksheet that are comboboxes, the user will select at random and populate it. How do I get the selected ComboBox value? Is there a way to speed up a function (ie an event handler) when ComboxBoxes has been selected? Text after "div class =" itemprop = "text"> If you are working with the data validation list, you can use the Worksheet_Change event . Right click on the sheet with data validation and select View code. Then type: range as private sub Worksheet_Change (ByVal Target) MsgBox Target.Value End Sub You can work with ActiveX comboboxes To hook up events, this is a bit more complex. First of all, you need to create a custom class module, create a class module named CComboEvent and put this code in it. public WithEvents cbx MSForms.ComboBox Private Sub Cbx_Change () MsgBox Cbx.Value End as Sub Next, create a class module that CCOOVOVENT says it will hold all our CComboEvent instances and keep them in the...

Java reflection superClass loaded by hibernate problems -

I am trying to print in the console, which, by the name of the name of a superclass, which is required for later computing A simple POJO is working fine but when the class is first loaded by hibernation, I can not find a super class in the area of ​​the child and when I print the name of the parent (when it happens to be in hibernation , So I'm getting the following) [Handler, _Filter_signature, serialWARUID, methods ] This is my code public static zero main String [] args) {fixing models clause = new fixing models (); Hibernate Handler Handler = New Hibernate Handler (true); Student student = (student) handler.jet session (). Load (student.jagger, 1); Student new student = new student (); System.out.println ("Printing class loaded by Humbernet"); Clazz.showFieldsFromSuperClass (student); // Show Fields of the Child and Parent Incorrect Systems. Out.printline ("------------------------- -------------------- ----- "); System.out.println ("Printin...

mysql - #1064 - You have an error in your SQL syntax; right syntax to use near 'block'? -

मुझे इस प्रश्न के लिए मदद की ज़रूरत है: update ibf_posts set post = replace (post, '& Lt; div & gt; & lt; div शैली = "पृष्ठभूमि: # बी 7 ई 5 सीई; सीमा: 1px बिंदीदार # 000; सीमा नीचे: 0; सीमा-बायां: 4 पीएक्स ठोस # 42 9 ई 6 एफ; रंग: # 000; फ़ॉन्ट-वजन: बोल्ड; फ़ॉन्ट -आकार: 10px; मार्जिन: 8px ऑटो 0 ऑटो; पैडिंग: 3px; "& gt; स्पॉइलर & lt; a href =" जावास्क्रिप्ट: शून्य (0); "ऑनक्लिक =" जावास्क्रिप्ट: if (parentNode.parentNode.getElementsByTagName ('div' ) [1] .style.display == 'ब्लॉक') {parentNode.parentNode.getElementsByTagName ('div') [1] .style.display = 'none'; this.innerHTML = '- यहां देखने के लिए यहां क्लिक करें - ';} अन्य (parentNode.parentNode.getElementsByTagName (' div ') [1] .style.display =' block '; this.innerHTML =' - छुपाने के लिए यहां क्लिक करें - ';} "& gt; - यहां क्लिक करें देखने के लिए - & lt; / a & gt; & lt; / div & gt; & gt; ...

Retrieve vendor specific information from WiFi in Android -

Do anyone know how to get information about the WiFi network vendor in Android ?? For example, if it is a Cisco router, then the phone seems to have a way to determine it. It seems that there can be many applications to do this. They are not present in ScanStrust. Many thanks. They might use a MAC address database to view the seller. I can not find the Java Library for this, but VirusHark maintains a database: You have to import it into your application, possibly in your SQLite database and use it lookup Be in the form of

r - Distance matrix to dist element -

New to R here. I have calculated a distance matrix, say, points a, b, c: (a, a) = 0; (A, B) = 1; (A, C) = 5; (B, A) = 1; (B, B) = 0; (B, C) = 7; (C, A) = 5; (C, B) = 7; (C, C) = 0; And I want to use a function that expects the 'distribution' element RA is the result of a calculation on the coordinates of the working item, but this is not a standard calculation , So I can not make a distinction using distant constructor, which expects only several predefined distance measures. The bottom line is that I want to make the element of the district out of that matrix which I have calculated. Appreciate your help! You can create a square object from a matrix simply create the matrix and Use as.dist example as.dist (matrix (c (0, 1, 5, 1, 0, 7 , 5, 7, 0), ncol = 3)) 1 2 2 1 3 5 7

random walk - Numpy array comparing 2 arrays element wise with increasing offset of indicies -

This is a version of the problem of random walking using numpy arrays here only 500 times again. To do this, we have to compare a sort array of situations with our offset, close that time and increase the offset. So far my code is, the problem is in 'when' loop, where I am reviewing the situation in the form of elements in 'ZeroAir', trying to store the last time. / P> When I run it, I get an indicative error, no results were recorded and a counter that is repeated several times, though the loop has changed to prevent Boolean expression . Edit: How to obtain a duplicated status with numpy array: 1) Sort the last position array in ascending order. 2) Compare slices with edge offset until you find the post within 0.001 m on that offset, then you compare the position of neighboring posts (offset 1). You can get 18 cases, where in neighboring math two places you can get only two cases. And in three places you will get 0 point. import as import import random MA...

php - JQuery Load a page into a div and onload change content of second div -

I have a page with 2 divs called the menu and the other is called content Content div is a login page Loads when a user tries to log in, I call a script in the content device and if unsuccessful it reloads the login page. If this is successful, then I use the header location to redirect to the login page. When this page loads in the content device, I have to change the menu div to a different menu. I have tried to use the following but there is no benefit. Is there any way that when the successful page content loads into a diva, it can automatically change the content of the menu div It is that I have tried on the login page which is the content device The tag of that page loads in onLoad = "$ ('div # menu'). Load ('include / log-in-menu-page.php')" the second argument. The Load () function is a callback function. You are using it correctly and can then edit your menu element: $ ('# result'). Load ('include / log-in-menu-page....

Splitting a huge text file (2Gb+) into 2 chunks in C++ -

I have a huge text file with two columns (floats) I would like to split them into two files What is the best way to do the same number of lines? I VS I am using 2012. The size of the file is approximately 2 GB. is a free tool, windows file splitter divides it into any type and size files Can be called. Or you can use grep on windows in Saigwin or it can be done in powers [and here it is done in C ++: related question:] ()

bash - using command on a gnplot script -

I am using a script on Mac Bash Shell which uses gnuplot. When I use ($ 100 *) on the script ( ) ) By using the line gets 0: invalid expression However, if I use the same command on the gnuplot prompt line, There is no problem. What is the use of the command while using it? Thank you for your time. As you have not posted your script, I can only guess. The problem may be that $ 2 is interpreted as "the second argument of the script" as "bash". You should avoid a dollar sign with backslash. using 1: (\ $ 2 * 100.0)

How to center text in an android view class? -

When I have a class that I see, how can I draw text in the center of the scene? To attract text I am using canvas.drawText , but when you can not take the text after dragging it, then I'm not sure how I will focus this text. . So how do I focus text in Android view class In the spirit, on the right track of Maver1ck, though In practice it is a bit more difficult than that. You have to set up a TextPaint and have to do some measurements: textpaint paint = new textpaint (paint.ntiiaias_flag.paint.sppINENETFTAFLG); Paint.setTextAlign (Paint.Align.CENTER); // Draw text from the center // Set any text size or color attributes Now, to determine how to orient the text vertically Want Center on Visible Text? Do you want the baseline at the center? Do you want a center based on text top or climb? For the simplest case of the text, suppose we will center the center of the top and bottom of the font (note that this is not the full top and bottom - it will be the ascending an...

javascript - how do you get the integer value of a field? -

I had to use it to get an integer value of the field: var local = {}; Local.result = $ ('# myID'). Val (); Local.result = parseInt (0+ local.result); Local Return Question: Is it a best practice instead, like some kind of jQuery method that gives value or number 0 if it is not a value? Let me more jQuery! You should only make any strong efforts to use + val If you have a non-numeric value, and want to default to 0 on your original post like this: str > var num = + str || 0; JSFiddle: Related JS Ninja Tricks: I'm not sure that you mean any float conversion. It seems that this is already an integer because otherwise you will not be able to do it on parseInt , okay?

adobe reader - renaming an app's package or Activity name? -

I searched around, and the only way to run multiple instances of an app would be to rename the app's activity or package , Such as com.adobe.reader.MainActivity to rename something like com.adobe.reader.myActivity. Has anyone succeeded in doing something like this or is there an easy way to run many instances of one? Here's one. Basically, this includes: Back up and copy apk in the PC Edit APK To edit APK Copy APK to device

winforms - C# Windows Form Application - Send email using gmail smtp -

I am trying to create a small program to send emails through smtp.gmail.com, but this Always indicates to me that "the operation timed out" I know that many solutions are available on the net but none of this works. try {MailMessage message = new MailMessage (); SmtpClient smtp = new SmtpClient (); message. From = new mail address ("from@gmail.com"); message. To Add (new mail address ("to@gmail.com")); Message.Subject = "test"; message. Body = "content"; Smtp.Port = 465; Smtp.host = "smtp.gmail.com"; Smtp.EnableSsl = true; Smtp.UseDefaultCredentials = false; Smtp.Credentials = New network credentials ("from@gmail.com", "pwd"); Smtp.DeliveryMethod = SmtpDeliveryMethod.Network; Smtp.Send (message); } Hold (Exception Pre) {MessageBox.Show ("err:" + ex.Message); } Is there a way to fix this? Change port 587: {mail message message = New mail form (); SmtpClient smtp = new SmtpClient (...

Magento: Create Link From Outside Application To Create Sales Order -

To create an order for the currently selected customer, trying to create a link in the CRM to open the page in the Magento store is. When I'm looking at the customer in Magento, click on the Composition Orders button in Magenta while viewing the customer in Magento, this is the URL: This link in the CRM Tried to make, but instead of customer_id I believe the key is a key piece which I am missing. I have estimated that if this link creates an order for customer 124, then the following link will create an order for the customer 300: No Important value is constantly changing thanks option 1: In the controller pane: getSingleton ('adminhtml / url') - & gt; TurnOffSecretKey (); Option 2: Disable the secret key in admin

php - mysqli_fetch_assoc -

Normally I use mysqli_fetch_array to display the contents of my database in my CMS I used to tell someone recently that I should use the mysqli_fetch_assoc and put the results in an array so that the database runs for each record instead of running the database only once. But I'm not sure how to display all of my fields without displaying, I usually resonate $ data [field_name '] , but I What I have seen with mysqli_fetch_assoc I can not just echo out $ value ['field_name'] , what I can do is resonate $ value And it displays all the results. This is what I have done, hope that makes sense Thanks in advance for any help! PHP $ sql = "Select from app selections"; If ($ result = query ($ sql)) {$ list = array (); While ($ data = mysqli_fetch_assoc ($ result)) {array_push ($ list, $ data); } Foreach ($ i => $ list as line $) {foreach ($ column = $ value as value = & gt; $ value) {echo $ value; Why do not you just code> Ech...

php - Customise google map annotations -

Image
How can I customize Google Maps like this? I have to add a custom icon in the form of comments, clicking on annotations should show a small pop up box like this. Please help me Get started with documents (- ()), see examples, copy them and replace them. Create your custom marker with the standard info window Once you work, customize InfoWindows

ios - NSNotification alert body issue -

I want to print in the notification body like today Jane's birthday I'm using notification below. AlertBode = [NSString stringWithFormat: @ "Today's% @ Birthday", [_combinedNameArray objectAtIndex: i]]; But in the notification it only shows the name which is Jane and not showing today is a birthday ... Tell me what I am doing is wrong? Try thanks : Notification.alertBody = [NSString StringWithFormat: @ "Today is% @ \ 's Birthday", [_combinedNameArray ObjectIntext: i]]; (The character needs to avoid the character)

xml - How does one copy document specific DTD during XSL transformation? -

I have the following document specific DTD at the top of the XML file created by my editing software: & lt ;! DOCTYPE front system "File: /// M: / Library / AMH-Paid.Dtd" [& lt ;! Notation CGM Public "" & gt; & Lt ;! - Start document specific announcements - & gt; & Lt ;! ENTITY fm.tcont "(continued)" & gt; & Lt ;! ENTITY equation 1 system "equation 11.cgm" NDTA CGM & gt; & Lt ;! ENTITY equation 2 system "equation 26.cgm" NDTA CGM & gt; & Lt ;! ENTITY equation 3 system "equation 32.cgm" NDTA CGM & gt; & Lt ;! ENTITY equation 4 system "equation 41.cgm" NDTA CGM & gt; & Lt ;! ENTITY equation 5 system "equation 51.cgm" NDTA CGM & gt; & Lt ;! ENTITY equation 6 system "equation 62.cgm" NDTA CGM & gt; & Lt ;! - End Document Specific Announcements - & gt;] & gt; We are updating the general functionality to o...

persistence - How to share memory between http requests in g-wan? -

Let's have a G-Wan server with C-script, if any HTTP request arrives and then another Http request, I would like to be able to read and write both running scripts from the same part of Rama. In other words, I can only read a simple RAM database, an array of data and any http request from this RAM database. I mean that this server can be from any customer, for any HTTP request. I just want to be able to read or write the same data in RAM. you US_SERVER_DATA : US_SERVER_DATA , // global indicators (for maintenance scripts)

Spring sts with websphere -

I am trying to recover Spring STS from IBM rational application developer. One of the first things I have seen is that when I try to define a webserver server runtime library it is not a list of webserver application servers and therefore I do not import a webserver library I can also note that it does not accept WebSpace (WebSpace 5.1 in my case) as a targeted sequence. Is it possible to do these two things in Spring STS? In addition, if STS is not possible in the spring, does anyone recommend an alternative IDE that can accomplish better work? Thank you The common solution is installing the Eclipse plugin. An alternative is used which still supports some older WAS versions. However for webpage 5.1 you are out of luck. No one else supports this 8-year piece of software. You should really take a serious look at updating your webserver installation or migrating to a newer application server. Update Hmm. Still thought that he still list the WAS5x support though...

Retrieve text from span element in watir webdriver -

मेरे पास निम्न है: & lt; ul class = "a" & gt; & Lt; li वर्ग = "बी" & gt; & Lt; एक वर्ग = "सी" & gt; & Lt; span class = "d" & gt; & Lt; strong & gt; पाठ & lt; / strong & gt; & Lt; / span & gt; & Lt; / a & gt; & Lt; / li & gt; & Lt; / ul & gt; मैं स्पैन से "टेक्स्ट" प्राप्त करने की कोशिश कर रहा हूं। जब मैं कोशिश करता हूं: ब्राउज़र को डालता है (* Class = & gt; 'a')। Li (: class = & gt; 'b')। Link (: class = & gt; 'c')। ​​Span (: class = & gt; 'डी') मुझे span तत्व वापस मिलता है # & lt; Watir :: Span: 0x007fa1d11edb18 & gt; जैसा मुझे चाहिए। लेकिन जब कोशिश कर रहा है: puts browser.ul (: class = Link (: class = & gt; 'c')। ​​Span (: class = & gt; 'd')। पाठ im कह रही एक त्रुटि हो रही है: तत्व का पता लगाने में असमर्थ, {: class = & gt; 'b',: tag_n...

Plotting exp series with GNUplot -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर मुझे 2 ^ ग्नुप्लॉट के साथ संख्या मेरा डेटा नीचे जैसा दिखता है 2 1 4 10 8 15 16 20 .. x अक्ष पर मैं संख्याओं को 2 ^ पावर का होना चाहता हूं । मैं सेट प्रारूप x "2 ^% L की कोशिश करता हूं, लेकिन हर जगह यह 2 ^ 0 एक्स अक्ष पर है। कृपया कुछ विधि का सुझाव दें। % L मौजूदा लॉग स्केल का उपयोग करता है, जो मूल 10 के लिए डिफ़ॉल्ट होता है, इसलिए आपको दर्ज करना होगा: लॉगस्सेल x 2 सेट करें इसे आधार 2 में सेट करने के लिए

c# - Grid Load With Specific,Conditional Content -

मेरे पास डेटाबेस तालिका & gt; & gt; (स्ट्रिंग) (फ्लोट) (फ़्लोट) ) (फ्लोट) व्यापार नहीं | Buy_Sell | ट्रेड_क्टी | Market_Price 205412 1 50 300 205487 2 30 350 208754 1 20 200 इस तालिका में कॉलम Buy_Sell है खरीदें = 1, बेचें = 2 जब मैं ग्रिड को बाँधता हूं, तब मान दिखाए जा रहे हैं। लेकिन, मैं उन्हें ग्रिड में & gt; व्यापार नहीं | Buy_Sell | ट्रेड_क्टी | Market_Price 205412 खरीदें 50 300 205487 30 350 205487 बेचें 20 200 खरीदें मैं ऐसा कैसे कर सकता हूं? मैंने निम्न कोड के साथ बस ग्रिड को बाध्य किया है & gt; प्रयास करें {con.Open (); Da = नया SqlDataAdapter ("चुनें ..., ट्रेड नोवो, खरीदें_जेल, ट्रेडक्टी, मार्केटप्रस", कॉन); डाटासेट डीएस = नया डाटासेट (); da.Fill (डी एस); // gvTradeFile.DataSource = ds.Tables [0]; GvTradeFile.DataSource = ds.Tables [0]। एएनएनमेरेबल ()। चयन करें (डी = & gt; नया {TradeNo = d.Field & lt; स्ट्रिंग & gt; ("ट्रेड नो"), Buy_Sell = d.Field & lt; float & gt; ("Buy_Sell") == 1? ...

Confused in appending Strings in Java -

इस सवाल का पहले से ही एक उत्तर है: 23 उत्तर मेरे पास आने की स्थिति है स्ट्रिंग। और मैं उलझन में हूँ .. सार्वजनिक स्थिर शून्य foo () {स्ट्रिंग s = "str4"; स्ट्रिंग s1 = "str" ​​+ s.length (); System.out.println ("(एस == s1) =" + (s1 == s)); } और सार्वजनिक स्थिर शून्य बार () {स्ट्रिंग s = "str4"; स्ट्रिंग s1 = "str" ​​+ "4"; System.out.println ("(एस == s1) =" + (s1 == s)); } 1 मामले में यह 'झूठी' लौट रहा है, लेकिन दूसरे मामले में 'सत्य' जैसा कि मैं दोनों मामलों में समझता हूँ 'स्ट्र 4' ऑब्जेक्ट ढेर पर बनाया जा रहा है। इसलिए इसे दोनों मामलों में सही होना चाहिए। लेकिन ऐसा नहीं है। कृपया कोई मेरी मदद करता है कि ऐसा क्यों है ? धन्यवाद।! का प्रयोग करें s1.equals (s) स्ट्रिंग्स की तुलना करने के लिए, अन्यथा आप संदर्भों की तुलना करते हैं। दूसरे मामले में यह true देता है क्योंकि स्ट्रिंग s1 = "str" ​​+ "4"; को स्ट्रिंग s1 = "str4" क...

Python dual- variable search algorithm -

I have an algorithm that: takes two inputs (x, y) , Where x and y are two 'lambda' variables in two independent pauson distribution (). Calculate the matrix product of two pauson vectors / P> import math, random (zodiac), zodiac (lower_quadrant), zodiac (diagonal)] def poinson (m, n): p = math In XP (-M) R = [P] category I (1, n): P * = M / Float (I) RApment (P) Returns in RDR Range (N): For i (NA) Imitation (MX, My, N): R = [0.0] in Category (N): Range (3)] PX, PI = (Poison (MX, N), Poison (Mary, N)): i & gt ; J: k = 0 alif i Now I need to solve for X and Y I specifically cut output of the following solver function: def solution (p, n, generation, decay, tolerance): def rms_error (x, y): Return (zodiac (zip (x, y)]) / float (lane (x)) ** 0.5 def calcerer (x, y, n, target): 2 for x * (xy) * * x, estimate = Simulation (X, Y, N) returns Rms_error (target, estimate ) Err = calc_error (math.exp (q [0]), math.exp (q [1]), n, p) err range for best, beste...

getting results of custom action in rails with angularjs -

I am using 3.2 rail with angular, and I understand how to use angular resources. Resource (Do not Get It, Save, Query, Remove, and Delete) to return results from non-default action Then I have in my mail controller def home @recent_posts = Post. Format.html format.json end end and then in my JS file I have app.factory "post", ["$ resource", ($ Resource) - & gt; $ HOMECtrl = ["$ scope", "$" ("/ post /: id /: action", {id: "@id"}, {home: {method: "GET", isArray: true}}) ", ($ Scope, post) - & gt; $ Scope.recent_posts = Post.home ()] If I try and ng-repeat =" recent_posts Post " , you have forgotten to specify the verb {/ code> parameter: app.factory "post", ["$ resource", ($ resource) - & gt; $ Resource "/ post /: id /: action", id: "@id", home: method: "received" parameter: verb: "home" is alright:...

java - Creating the ServerSocket in a separate thread? -

I have a problem in using ServerSocket in my application. I am creating ServerSocket in the constructure of my application. The manufacturer of the socket calls the accept () method to wait for the customer to call. The problem is that accept () is the method until my client is connected and my whole application is cold. So I would like to ask whether there is an option to create whole ServerSocket in a separate thread, which is the constructor of ServerSocket and its accept () method Is called next to my main application? Edit: Thanks for Olivier, for the advice. Enter a runnable and create a threadpool to handle the client connection. / P> My code is right now: Public Zero Starter () {Last Executor Service Customer Processing Pool = Examiner. NewfixedThreadPool (10); Runnable ServerTask = New Runnabel () {@ Override Public Wired Run (try {serverSocket = new ServerSocket (port); While (true) {socket client socket = serverSocket.accept (); Object = new ...

php - how to send array in post using codeigniter -

I have sent the arrays in the codeigniter structure as follows: for (var i = 1; i & lt; = selected; i ++) {& lt; Div style = "float: left; padding-left: 13px; padding-right: 12px; padding-top: 7px; margin-top: 0px;" & Gt; '+ I +' & lt; / Div & gt; & Lt; Input type = "text" name = "unitName []" id = "unit-name '+ i +'" style = "width: 18 9px;" Required /> & Lt; Input type = "text" name = "swan name []" id = "owner name" + i + '"style =" width: 241 pixels; "/ When I try to post it using: $ owner name = $ this- & gt; Input-> Post ('swami name'); If (is_array (owner name)) {foreach ($ owner name as owner name name) {echo "owner's name is:" $ OwnerName; }} Else {echo "the owner is not the array";} This is my entire controller, with all the posting: if ($ this- & Gt; form_validation- ...

zepto - Zeptojs on() not triggering -

I created a plugin (pluginA) based on zeptojs And inside this plugin I get data using Ajax and and How do these anchors attach a list of how to tie an event? I & lt; A href = "..." data-key = "ABC123" & gt; & Lt; / A & gt; Like it was going for something at the global level and then $ ('[data-key]'). PluginB () and then inside pluginB () is something $ (this) .on ('click', function (e) {e .preventDefault (); ...}); But I'm not able to bind the click event to the dynamically created anchor. I would like to actually do two plugins to reduce the $ ( For the bind () trigger () approach is to use, but I'm having trouble finding a good example. Use on representative to link all the desired links in a particular area (in this example, whole body): $ (body) .on ('click', 'a data-key]', function (e) {e.preventDefault (); ...}); now All links with data-keys will trigger...

javascript - Object property cannot be set via setter while using Object.create -

On your attempt to know more about the object. I came across. An example page from the top: var car2 = object. Create (empty); // This is an empty object, such as {} Car2.prototype = {getInfo: function () {return 'a' + this.color + '' + this.desc + '.'; '; }}; Var car2 = Object.create (Car2.prototype, {// value properties color: {writeable: true, configurable: true, value: 'red'}, // concrete rick value rawDesc: {writeable: false, configurable: true, Price: 'Porsche Boxer'}, // Data Properties (Assigned using Gates and Sets) desc: {Configure: True, Receive: Function () {return.rawDesc.toUpperCase ();}, set : Function (value) {This.rawDesc = value.toLowerCase ();}}}); Car2.color = 'Blue'; Warning (car2.getInfo ()); // Display 'A Blue Porsche Boxer.' Question: How accurate is the above example? It seems that rawDesc can be a private member, which can only be modified through desc code>. Is it useful in any...

javascript - jquery restricting numbers greater than required -

In jquery, there is a need to restrict the typing of more than 20 numbers into a text box, how to implement it. Any help is appreciated. & lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; H: Input text id = "actual card" style class = "input-lesson-bx" & gt; & Lt; / H: Input Text & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; Attr ('maxlength', $ ("# physical card") '20'); For verification of numbers: Validate $ ("# actual card") ({rule: {field: {expected: true, number: true}}});

How to clean xcode user specific settings (organizer, provisioning profiles)? -

My Xcode is crashing when I press the refresh button in the Organizer. There seems to be a problem with the certificate and provision profile. If I log in as a second user in the same Mac, then everything is working fine. So, can I clear user-specific settings without affecting the encoded installation? Like cleaning of organizer settings, provisioning profiles, etc.? Here's the official solution for Apple: Run / Applications / Utilities / Terminal Execute the app and the following statement: mkdir ~ / library / developer / xcode / old portsites; Mv ~ / Library / Developer / Xcode / connect1.apple.com * ~ / Library / Developer / Xcode / OldPortalDBs See:

javascript - Uncaught TypeError: Object # has no method '_initText' -

मुझे जो त्रुटि मिल रही है (कंसोल में): अनक्यूट टाइप एरर: ऑब्जेक्ट # & LT; वस्तु & gt; मैं अपने कैनवास में सरल पाठ जोड़ने की कोशिश कर रहा हूं (काइनेटिक। जेएस का उपयोग करके) इस तरह कोई भी विधि '_inittext' kinetic.js: 52 Var simpleText = किनेटिक। पाठ (); जैसे ही मैं इस लाइन को बाहर कर देता हूं, कोई त्रुटि या चेतावनी नहीं होती है। लेकिन जब मैं इसे रखता हूं तो मुझे त्रुटि मिलती है। इस तथ्य को देखते हुए कि यह पूंजी के साथ पाठ है एक कन्स्ट्रक्टर फ़ंक्शन है और आपको इसे नया करना होगा। var simpleText = new Kinect.Text () उदाहरण के उपयोग के लिए ट्यूटोरियल देखें। जावास्क्रिप्ट नामकरण सम्मेलनों के बारे में अधिक।

jquery - How to addClass and removeClass in the simplest way -

addClass and The shortest way to toggle the hidden element using the removeClass What is a one click event has been received after a certain other element. & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ("# pps_Link"). ('Click', function (evt) {evt.preventDefault (); var pssd = $ (". PsSelectDD"); if (! Pssd.hasClass ("db") {pssd.removeClass ("dn"). AddClass ("db");} And if (! Pssd.hasClass ("dn")) {pssd.removeClass ("db") AddClass ("Dn")} evt.stopPropagation ();});}); & Lt; / Script & gt; Instead of addClass () and (client ), Do not use only: Similarly: $ (".psselectedDD"). Toggleclass ('dn db');

c# - Initialization of tabs in tabControl -

I am using tab control with multiple tabs (& gt; 10), and each tab has UserContol but Tabs start each app when I start my app. This is slowing down my program. I want to run my user control only when I click on it How do I do this? You should improve your user control that they do not display content as long as you get active / visible Give them a way to activate , when the tab has a tabront call when the selected tab is created. Alternatively, you can not add user control to the tab page content in the designer. Instead of activating tabs, create your UserTrint instead But this will make them invisible in the designer.

Stop Reduce function in Hadoop on condition -

I have a low function where I want to stop reducing the function after processing some 'N' keys. I have set up a counter to increase every key, and the situation is being satisfied due to low position. Here is the code public class virtual words {public static class mapper and lating; Longweightable, text, intritable, intrubivative & gt; {Private Final Static IntWritable A = New IntWritable (1); Private text word = new text (); Private IntWritable LONG = New IntWritable (); Public Zero map (long-term appropriate key, text value, reference reference) throws IOException, interrupted; Expression {string line = value Tutorial (); StringTokenizer Tokenizer = New StringTokenizer (line); While (tokenizer.hasMoreTokens ()) {string lword = tokenizer.nextToken (); Leng.set (lword.length ()); Context.write (leg, one); }}} Reducer reduction in public stationary and lt; IntWritable, IntWritable, IntWritable, IntWritable & gt; {Int count = 0; The public throws IOException (i...

java - AssertionError when using a TaskExecutor -

I am writing a program that executes multiple threads at the same time (in parallel), I have a task exciterator I am using. @Atoward Task Explorer Thread Pole Task Exchanger; @Test Public Zero Test Display Tape Charger () throws hurdles exceptions {assertNotNull (threadPoolTaskExecutor); For (int k = 0; k & lt; 5; k ++) {runner myThread = new workflow (New Atomicator (K)); ThreadPoolTaskExecutor.execute (myThread); } Thread. Sleep (500); Logger.info ("End all threads"); } When I checked my code, an assurance error exception was raised. I am using the Spring Framework to manage execution. Here is the log screen: Exceptions to the thread "main" java.lang.AssertionError at org.junit Org.junit.Assert.assertNotNull (assert.java .Assert.fail (Assert.java:92) P> Any one has any ideas please :) Thanks I have found a solution, I have to start ThreadPoolTaskExecutor so when we use assertNotNull (threadPoolTaskExecutor) ; The object will be started...

Can't fetching records from nested JSON objects in Sencha Touch Application -

सेचा में JSON से वेब सेवा प्रतिक्रिया प्राप्त करने के लिए मैं समस्या से गुजर रहा हूं टच । मुझे सर्वर से प्रतिक्रिया मिल रही है। {"type": "फीचर कलेक्शन", "विशेषताएं": [{"type": "फ़ीचर", "आईडी": "business_poi_en.1", "ज्यामिति": {"प्रकार": "बिंदु", "निर्देशांक": [28.219623549 9 3591, 36.452844361147314]}, "ज्यामिति_नाम": "geom", "गुणधर्म": {"स्थिति": "एम", "स्कोर": 100, "पक्ष": "आर", "रिफ_आईडी": 0, "आईडी": रिक्त, "business_p": "AQUARIOUM",}}, {"type" : "फ़ीचर", "आईडी": "business_poi_en.2", "geometry": {"प्रकार": "बिंदु", "निर्देशांक": [28.225417523605692, 36.436470953176716]}, "ज्यामिति_नाम": "geom", "गुण" : {"स्थिति": "एम"...

multiple UPDATE function, php sql, only updates last function -

I have a problem with my update function on php, I have the code to work the function that it only ever How does the last action update Input Name =" Stock_1 "Type =" Text "ID =" Stock_1 "> & lt; & lt; ; / Tr> & lt; tr & gt; & lt; td width = "100" & gt; Samsung 2.5 "SATA Hard Drive & lt; / Td> & Lt; Td> & Lt; Input name = "stock_2" type = "article" id = "stock_2" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD width = "100" & gt; 8gb Kingston DDR3 RAM 1333 MHG & lt; / TD & gt; & Lt; Td> & Lt; Input name = "stock_3" type = "text" id = "stock_3" & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "100" & gt; Apple MacBook Ram 8 GB & lt; / Td> & Lt; Td> & Lt; Input name = "...

c# - not all code paths return a value using html agility pack -

I'm new to the C # and html agility pack, I've written this code to isolate a webpage. Private IList & lt; Category & gt; GetFeatureSubCategories (HtmlNode standard, category category) {list & lt; Category & gt; Categories = new list & lt; Category & gt; (); {If (category.name == "Featured") {var nodes = std.SelectNodes ("// span [contains (@ class, 'widget')] [position () & lt; = 4]"); Forwarding (nodes in nodes) {string name = SiteParserUtilities.ParserUtilities.CleanText (System.Net.WebUtility.HtmlDecode (node.InnerText)); String url = node.Attributes ["href"]. Values; String identifier = url.Split ('/'). Last (). Change (".html", ""); WriteQueue.write (string.Format ("category [{0}] .. {1}", name, url)); IList & LT; Category & gt; Sub = GetSubCategories (STD); Category c = new category () {active = true, categories = sub.ToArray (), description = "...

PayPal Android SDK to be discontinued? -

I think PayPal recently disliked its developer site X dot and launched a new developer . However, on the new site, I do not get any reference to Android SDK (MLP for Android), neither on Githab repositories). Does anyone know the future of Android SDK? So far everything has not been taken to the new site. Some things are being transferred at different stages. Android SDK will eventually be transferred.

How to implement a persistent counter in Python -

Is there a way of "last known counter" in Python that will survive after a server reboot? I have a dragon script, which is launched by the schedule (by the cron). It reads the files with the document ID in the predefined format. If any, I have to remember the last documented document id to ignore all the previous ones. Any value you want to save from reboots should be constantly put in storage - i.e. Disc. It means any kind of file, even if it's a simple plain text file or database file that is up to you, you have indicated in the comments that you do not think it's a "cross-platform" but it will be a really funny platform That it does not have some type of file system support. If you have built-in SQLite support for structured storage then with Python module, it seems that you need to store a single ID, so a simple file will be sufficient. I give some suggestions like this: import os DATA_FILENAME = os.path.expanduser ("~ / document-cou...

android - Passing your own objects between activities -

I am a newbie on Android development and how to transmit data from one activity to another is still unclear for me. Is it a good practice to pass your own items between activities? What size can they be? EDIT: Maybe I did not clear it clearly I know how to pass data between activities is the question: is it a good practice or I get data from better SQLlite database should do? In that case, which is the maximum size that I can pass to perform well? Sending the object Similar to sending pre-defined objects such as strings or variables, () Or maintenanceable () methods can be done directly by intent or by binding the object using the binding object to intent. But you have to make sure that your class either applies to a parcel or serial jub. Like here: UserDefined myObject = new UserDefined (); Intent i = new intent (this, activity 2. class); Bundle B = new bundle (); B.putParcelable ("myObject", myObject); I.putExtras (b); StartActivity (i); To get more act...

powershell outputing results to a file -

I am trying to use Powershell V2.0 to write the content of the SQL query in a file. To write on the console screen, I can successfully use the host CMDlet to write on the console screen, but when I change the write-output, only one result is given in the test.txt file (instead of about 700 ). Why can this be? foreach ($ line $ $ DataSet.Tables [0] .owsows) {$ name = $ row [0] .strass (). Type trim () - $ name & gt; Test.txt} You are redirecting to the output file & gt; On every record of (instead of & gt; & gt;) this is causing the file to be rewritten with each record, and you are only left with the final record in the output file. It should work better: & Amp; {Foreach ($ R $ Tables in DataSet [0] .row) {$ line [0]. Ostring () .trim ()}} | Set-content test.txt

javascript - Reapply bindings after Fancybox with knockout -

I am trying to complete this result when a user clicks on a link then an inline fancy box contains html When the user entered a value and entered the hit, he should update the knockout and my view must be in order and the fancy box should face in a way. This is my code so far, I know that I need to resend again, HTML: & lt; Div style = "display: none" & gt; & Lt; Div id = "inlineManufacturerAdder" & gt; & Lt; Div style = "width: 1000px;" & Gt; & Lt ;! - Days Deep Eli Content - & gt; & Lt; H2 & gt; Add new Creator 2 & lt; / H2 & gt; & Lt; P & gt; & Lt; Form data-bind = "submit: vm.addManufacturer" & gt; & Lt; Input type = "text" data-bind = "value: vm.new builder, value update: 'afterkeydown'" placeholder = "new creator" & gt; & Lt; / Form & gt; & Lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt; ...

objective c - List with 3 columns editable on the fly -

Image
I want to add a list with 3 columns in an iOS app, but I also want every field to be editable Let's just fly by clicking on it and when I return, this field saves. Currently I am using the ExCode 4.6.1 and Storyboard. Here's an idea: Because I'm starting a new one, I'm asking you to do that there is a way to do this, use UITABLE vixel, UITFieldfield and UITCADView, or something else, faster, do you have me tutorial or similar Can provide some links with, please? Another question is: Because each field (label 1, 1; label 1, 2; L1, 3) will see the same object (example: cable [1]; [size] 1 meter [Diameter] 1 centimeter), should each row be placed in the NSMUTUABE array or everything in the SQLLite database? Hope in some signals. / Div> You can create custom cells. I answered how to do this and add gesture identifier for each object on the cell. Change the values ​​and reload the data.

Iterate & print values in ember.js -

मैंने अभी शुरू किया है ember.js मेरा मार्कअप कोड है & lt; script type = "text / x-handlebars" data-template-name = "home" & gt; & Lt; h1 & gt; नाम: & lt; / h1 & gt; {{App.HomeController.content} में होम #} & lt; h1 & gt; नाम: & lt; / h1 & gt; {{Home.name}} & lt; br / & gt; {{/ प्रत्येक}} & lt; / स्क्रिप्ट & gt; और मेरा जावास्क्रिप्ट कोड है ऐप = एम्बर। आवेदन .create (); App.Router.map (फ़ंक्शन () {this.route ("घर", {पथ: "/"})}}; / * * होम नियंत्रक * / App.HomeController = Ember.ArrayController.extend ({content: [], templateName: 'home', init: फ़ंक्शन () {var self = this; $ .ajax ({url: 'response.php ', डेटा प्रकार:' JSON ', प्रकार:' POST ', सफलता: फ़ंक्शन (रेस) {self.set (' content ', res);}, त्रुटि: फ़ंक्शन () {}})}}}) लेकिन ऐसा लगता है कि मैं नाम मुद्रित नहीं कर सकता मैं पुनरावृति नहीं कर सकता & amp; नाम प्रिंट करें कोई भी शरीर मेर...

pandas - how to change the order of resampling in python timeseries -

मेरे पास एक पंगन पंड्या बार शृंखला है index = pandas.date_range ('4 Df = pandas.DataFrame (numpy.random.randn (len (index), 1), index = index) df = 2012-04- 30 1.06 2012-05-31 0.82 2012-06-30 0.65 2012-07-31 1.12 2012-08-31 1.0 9 2012-09-30 0.65 फिर मैं एक से आवृत्ति बदल महीने से दो महीने df_new = df.resample ('2M') Resample फ़ंक्शन प्रारंभिक तिथि से अंतिम तिथि से शुरू होता है मुझे जो आउटपुट मिलता है वह इस प्रकार है: df_new = 2012-04-30 ... 2012-06-30 ... 2012-08-31 ... 2012-10-30 ... जब तक मैं रिवर्स ऑर्डर में एल्गोरिथ्म को फिर से याद रखना चाहता हूं। मुझे इस तरह से कुछ आउटपुट चाहिए: df_new = 2012-05-31 ... 2012-07-31 ... 2012-09-30 ... क्या कोई इस के साथ मदद कर सकता है .. अग्रिम धन्यवाद ठीक है, यह अधिक है जटिल होना चाहिए - लेकिन यहां में [282]: डीएफ आउट [282]: 0 2012-04-30 0.583255 2012-05-31 -0.247403 2012-06-30 0.816290 2012-07-31 -1.989587 2012-08-31 0.740463 2012-09-30 0.971749 में [279]: df.resample ('2M', कैसे = 'आखिरी...

how to store sql select to gridview ASP.net C# -

SQL Commands CMD = new SQL Commands ("Select * from [order] where date and gt; = @ Start and date & lt; = @ and ", conn); Cmd.Parameters.AddWithValue ("Start", DT1); Cmd.Parameters.AddWithValue ("@ end", dt2); This is my selection statement, I want to keep this data on Gridview, how to use Datasets to store in ASPN C # support ASAP in Gridview. Use . SqlCommand CMD = New SQL Command (select [from [order] where date is> = start and date & lt; = @ end ", cone); Cmd.Parameters.AddWithValue ("Start", DT1); Cmd.Parameters.AddWithValue ("@ end", dt2); SqlDataAdapter sda = New SqlDataAdapater (cmd); Datatable dt = new datatable (); Sda.fill (dt); YourGridView.DataSource = DT; YourGridView.DataBind ();

Understand Unicode and code pages in SQL Server collations -

Why all SQL Server 2008 R2 collations are linked to a code page are all collocations unicode? When a database is used by multiple languages ​​using different code pages, then how to choose a match? Thank you. CRAC vs NCHH (i.e. non-Unicode versus Unicode) defines character storage encoding. Collations define ... collation (ie order order and comparison rule). They are different concepts, though they are often confused. Illusion arises from the fact that the client tools use coding of non-Unicode data to select the sign code page. See . This means that clients like ADO.Net SqlClient can be retrieved from the single-byte CHAR data server multi-byte string net object The columns used in the metadata will be coated and therefore the client will know how to interpret single-byte data according to the specific code page. For the Unicode (NCHAR) column, the client does not need to interpret it according to the code page, the data is already multi-byte and the customer...

javascript - Custom scrollbar - mouse wheel too slow -

I am working on a site that has a div with a custom scroll bar. My problem is that the mouse wheel It's not working properly, it's very slow. is the site and the custom scroll library , such a script has been issued: $ (window) .load (function () ($ {"Scroll-panel"). MCustomScrollbar (); // code which is faster to scroll with a mouse}}; You can set the scrolling speed in options as described in Scol libraries here: I think what you are looking for It's something like this: $ (". Scroll-pane"). MCustomScrollbar ({mouseWheelPixels: 50 // c Hange it is for a price that matches your needs}) As long as scoring is needed, keep playing it with the value.

c++ - How to pass reference to slot in QT Creator -

I have two forms in the project: mainwindow.ui and mydialog.ui / Em>. Each has .hpp and cpp files. In the mainwindow.cpp file, there is an QList object. I press the button on the main window form and model mydialog form appears. I then press the button on the mydialog form and on_btnCreate_clicked () run. What is the object in QList object in the on_btnCreate_clicked () slot ? If so, how? zero main window :: on_btnCreate_clicked () {MyDialog dialog; Dialog.setList (m_qList); // Add a member set list to your MyDialog class dialog.exec (); }

How can I disable double click on Jquery Modal Dialog button? -

let me know I am using the jquery model dialog after depositing some data in the server side and saving it in the database; Here is my modal dialog code: function loadUserDialog (tag, event, target, id) {event.preventDefault (); $ .validator.unobtrusive.parse ('# frmModalPopup'); Var $ loading = $ ('& lt; img src = "@ Url.Content (" ~ / content / images / ajaxLoading.gif ")" alt = "loading" class = "ui-loading-icon" style = "margin : 150px 150px; "& gt; '); Var $ url = $ (tag) .attr ('href'); Var $ title = $ (tag) .attr ('title'); Var $ dialog = $ (' & lt; / div & gt;'); $ Dialog.empty (); $ Dialog Append ($ loading) .load ($ url) .dialog ({autoOpen: false, title: $ title, width: 500, model: true, minhite: 400, show: 'fade', hide: 'fade'}); $ Dialog.dialog ("option", "button", {"submit": function () {var dlg = $ (this); if (IsVa...

build - Building Opencv 2.4.9 with VS 2012, install generates incorrect header files -

I'm trying to create opencv version 2.4.9 with git repository. I have followed the instructions for running a semik-gi to create a visual studio solution. I reloaded VS in both relay and debug mode. The studio solution is created and then the install build is run. The installed build puts all of the compiled labs in the folder included in the install folder as well. The problem is that the included folder is completely false and many files are missing when I add a folder path contained in a HelloWorld project, then it can not find any opencv methods class etc. This means that the cmake manufacturing process has become corrupted in some way and is not properly prepared, include the folder with the necessary header files. I have tried to do it for both the VS 2010 and VS 2012 Semicom configuration and for the same result everything is compiled, the header file in the installed directory is not correct. A pre-built windows installation type is copying header files, and I...

three.js - How to convert a Matrix4 to a Matrix3 in ThreeJS -

Do anyone know how to convert matrix 3 to matrix 3 in three JS? What I'm trying to achieve is 'Inverse sequence rotation' matrix Do I understand that you need to do something like this: 1) Change the camera. Word WINDOWS INWORLD FOR MATRIX3 2) Then invert result Is that correct? And if so, how do I change from matrix 4 to 3? Thanks for any help You can invert the 4x4 matrix . In the upper 3x3 the inverse rotation will be what you want. Otherwise use the set method of 3x3 matrix and assign it the value of your 4x4 matrix.

matplotlib - Python Plotting. How to plot f(x,y)? -

I'm new to Python I have a column of data x and other columns of data (both of which are floats). I have saved them as a list of other B. I wanted to plot the relationship and wanted a standard deviation between the 10 rows of A and B. So in short, I want to plot: | | X | Corr (x, y), stdev (x, y) | | Can anyone tell me how to do it in Python? For the first part of your question ... plotting two lists in relation to each other ( Correlation) I would like to mention, in which there is a very clear example. Could you please explain the detailed question (explanation) in the second part of your question (stdev.)? Do you want to plot standard deviation on dataset (1 continuous?)? Or do you want to plot the standard deviation in the work of correlation (there is not a lot of information about this data but I am sure if that is meaningful: D)? Value, M.