Posts

Showing posts from April, 2013

javascript - div not contains any string from an Array - Jquery -

I have to check that there is no string in any div from an array or not. We say that the array is: var vals = ["a", "b", "c"] I want to hide all the divs in which there is none These strings demo var vals = ["a", "b", "c"]; Var $ divs = $ ('. Container div'); $ Divs.each (function () {var $ currDiv = $ (this); $ .ec (wal, function (index, value) {if ($ currDiv.is (': (' + value + ') is included) & Amp; amp; $ currDiv.is (": appears")) {$ currDiv.hide ();}})}}; Explanation: From the collection of divs, loop through each div; Inside the loop there is another loop which gives the edge through each value in the array. Check now if the value in the div is & amp; Then hide it

Get a specific value from a function in R -

I have this question, and sorry, I know that this may be a silent question but I do not know if it How to do . I am trying to understand a code in R I have 6 different scripts, each one function, and then I save some output and work with those outputs. This value, a vector whose name is: u_cp is something like: return (u_cp) Finally they do this: How do I get the UCP value again? Will I return this value to a function and then use it? OK, if this is a function then the last expression (in fact, return statement is unnecessary). What do you do, you have a function f , which takes input, is called x and you call it and value it (if you stored it in some way Do one) for a variable or pass it on the rest of your computation one example below & gt; F & LT; -Function (X) X + 2> R & lt; -f (2) & gt; R [1] 4 & gt; F (2) +4 [1] 8

Jquery find cell containing Checkbox by class name on same row -

Hi all and thanks in advance, I'm looking at some articles using Jquery How to find the elements, but none of the changes that I have made, none of them are working. So what I am trying to achieve here, I have a gridview that has a link button that can be clicked and a check box that is wrapped in a partition with the class name. When the link button is clicked, it calls it like a jazzery function: The function itself is: RemovePerson (lnk, id) {// Find the checkbox here and uncheck it} var cb = $ (this) .closest ('.blblox'). ('Input [type =' checkbox "] '); Var cb = $ (this) .find ('.blblox & gt; input [type = "checkbox"]'); Var cb = $ (this). Parent (). ('Td: last-child input [type = "checkbox"]'); If I try to use 'LNK' instead of $ (this) then breaks the page, so I'm not sure my problem is that I'm passing 'this wrong' or I'm closest to I am using or looking for all of...

ios - SKLabelNode delays app start -

At this time I'm coding a small app with Spritekit, which works perfectly well, but only one problem is SKLabelNode That is, I started with the following common pieces of code: one. Self.scoreLabel = [SKLabelNode labeled nodivith fonts named: @ "Futura"]; Self.scoreLabel.fontSize = 190.0f; Self.scoreLabel.color = [SKColor whiteColor]; Self.scoreLabel.alpha = .2; Self.scoreLabel.text = @ "00"; Self.scoreLabel.position = CGPXMake (Screenshoot / 2, self .core labell.fr. size.height / 2); [Self compound: self.scoreLabel]; There are many more things to get started, but they do not affect anything. If I comment on the above code, then the app loads in the normal time, it is loading with SKLabelNode a few seconds ... Hope someone can help me. You need to pre-fill the font so that when you first call your SKEEN Pure Kit If already, the font is ready in memory already. The best way to do this is by app representatives or singletons as you can use in your...

ruby - rabbitmq exchange never publishes to queue binding -

I'm trying to get a basic exchange => The line going on Rabbitmq. My local host is running rabbitmq The rabbitmq web dashboard is available on http: // localhost: 15672 / I have a message source written in an exchange named "yomtvraps" I have a line called "yomtvraps" I have the binding exchange "yomtvraps" I started my message emitter : Li> Show all exchanges This web page shows incoming messages at the rate of 80 / s The Exchange page shows a graph with incoming messages http: // localhost: 15672 / # / exchange /% 2 0 messages are outgoing ("... no publications. .. ") The queue does not receive anything : I'm never listening to any message receiver to queue page sho Incoming Message draws http: // localhost: 15672 / # / Kyuuj /% 2F / Yontwraps Do I even remember? I think there is nothing right between money and queue but what? The problem is basically: the routing key was not set f...

No suitable driver found when making SQL connection to MS Access Database in java -

I have a simple Java application in Jebton (GateDataFormDB) which assumes loading data from the database shown in the path In the code given below, in Jtable in the application. Edit in code: Private Zero GetDataFromDBActionPerformed (java.awt.event.ActionEvent evt) {Connection Con; Results set rs = null; Description stmt; Try {class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); Con = DriverManager.getConnection ("jdbc: odbc: driver = {MS Access driver (* .mdb, * .accdb)} dbQ = c: \\ user \\ Bruger \\ document \ database11.accdb"); Stmt = con.createStatement (); String query = null; Query = "select * with cost"; Rs = stmt.executeQuery (query); I = 0; While (rsnext ()) {i = i + 1; JTable.getModel () SetValueAt (rs.getString (1), i, 1); JTable.getModel () SetValueAt (rs.getString (2), i, 2); } Rs.close (); Stmt.close (); con.close (); } Hold (exception mistake) {System.out.println (err.getMessage ()); }} When I press the button I get the following me...

powershell - Dump PST and DeleteContent after dump -

I am trying to dump a user's PST file and removing the content using Exchange 2013. I understand these two processes and there is no problem in executing it. I create a new mailboxexport to pst dump and I do the item search-mailbox. -Delatentant This is not a problem at all. The problem I have is that these 2 commands are tied in a .ps1 file. This file is scheduled to run daily. Sometimes MailboxExportRequest takes an unusually long queue and executes (sometimes 15-20 minutes). My fear is that these 2 scripts are being bundled together, my dumps are being removed before it starts. How do I stop it? Therefore, if I remember my exchange 2010 class correctly, then the New MailboxExportRC Mailboxx exportsRejectExposition is. Can not you store it in a variable, and then start the loop for a while, which sleeps for 30 seconds until the work is done? Something like this: $ MailExport = New-Mailbox Exporterix-FilePoint & lt; Path & gt; -Mailbox SomeGuysMailbo...

html - errors just on iPad 1 -

Image
I have only one problem in iPad 1 and iPad 2. IPad 3 is working well, like other devices This picture Is an iPad 3 and should show it like: Do anyone know Where is that problem? iPad 1 and ip D2 has a screen resolution compared to the iPad 3, which has a retina display, share CSS or use this example: # div-1 img {width: 375px;} @ media Screen and (min-width: 1366 px) {# div-1 img {width: 375px;}} @ Media screen and (minimum-width: 1440px) {# div-1 img {width: 428px;}} @ Media Screen and (min-width: 1600px) {# div-1 img {width: 434px;}} @ Media screen and (min-width: 1920px) {# div-1 img {width: 540px;}} Different iPad / IF In Zen Follow the link to get the screen resolution .

actionscript 3 - Do AS3 comments get compiled? -

Image
आसान प्रश्न। क्या टिप्पणी टैग के बीच कोड संकलित हो जाता है? // मैं एक टिप्पणी / * हूँ * मैं एक और टिप्पणी * / यह सबूत है। मैंने एक खाली परियोजना बनाई और इसे दो बार संकलित किया एक न्यूनतम न्यूनतम था (मैं सृजन के तुरंत बाद संकलित हुआ) और दूसरा ~ 2000 टिप्पणियां थीं। टिप्पणियां निम्न में से एक मिश्रण थीं: / ** * यह एक टिप्पणी है / / यह एक टिप्पणी है / * यह एक टिप्पणी है * / प्रत्येक बार कुछ सौ बार दोहराया, मेन। एएस फ़ाइल 134 बाइट्स से 32 केबी तक कूद गई। यदि निश्चित रूप से टिप्पणियों को शामिल किया गया था तो इसे निश्चित रूप से एसडब्ल्यूएफ के अंतिम आकार में उठाया जाना चाहिए था। इसके बजाय, वे दोनों बिल्कुल एक ही आकार, 608 बाइट्स (टिप्पणी में फ़ाइल के कोड के कुल आकार का अंश) पर दोनों थे। इसलिए, तर्क के रूप में आपको बताएं, नहीं, कंपाइलर में टिप्पणी शामिल नहीं है।

Entry Point or Service Layer in web applications and wcf apps -

I would like to know how we should choose our entry points in our web applications or WCF service applications. Some books talk about the service layer about the entry point which occurs after the data layer after the domain layer. It works fine until it is in the WCF Service Library. Should the service level be the entry point for the WCF service application? Or better way? I have found a solution after R & D

visual c++ - Using static boolean vs. critical section for concurrency -

So I am preparing a new software interface for a USB HID device and I have a question about concurrency protection is. I think I have to add compatibility security to call ReadFile and WriteFile (Please make me wrong if it can be told from different threads of my design) In the past, To apply the static booleans are used, until 1 boom adds a loop, as long as the bool did not indicate that the code was safe to enter. I have also used the Critical Section. Can anyone tell me that Critical Section is basically better with the use of Stable Bull, I know that I do not have a waiting loop code, but what is the polling for lock status? Rate Use in VC ++? Are they accustomed to the OS in some way so that they can be made better? Is using a boole not always safe to check a confluence? e.t.c. I do not know much about C ++, but the association is usually not is implemented by voting, and generally the polling waste processor should not waste time and energy. Blocking on one lock...

if statement - if variable is assigned then check some condition in python -

I'm coding in Python My problem is that I have a variable strGUID in the function And then if there is a control flow in which I want to see that the variable is specified and if yes, then check it on some condition. The clear sample of code is as follows: for the row in the list : if line.find ('project')! = - 1 strGUID = line.split (',') [2]. Strip ('' ') if flags == wrong and line Address (strGUID) == - 1: print 'written line:', line I get an error in the code given above Say this The variable SRRDAD is reaching before its assignment. is defined and if it then checks the position: line.find (strGUID) == - 1 . Such a thing if flag == incorrect and (if strGUID again line.find (strGUID) == - 1): PS: this is just code To minimize and make it intelligent, I know that if I can write longer in check, the code is, therefore the purpose of asking for it is not objective. Explanation: If you want to suggest the answer, where you...

deserialization using jackson objectmapper fails when json has additional fields.How to solve? -

अग्रिम धन्यवाद मैं संस्करण 1.9.2 का उपयोग कर रहा हूं & lt; निर्भरता & gt; & LT; ग्रुप & gt; org.codehaus.jackson & lt; / ग्रुप & gt; & LT; artifactId & gt; जैक्सन कोर-एएसएल & lt; / artifactId & gt; & LT; संस्करण & gt; 1.9.2 & lt; / संस्करण & gt; & Lt; / निर्भरता & gt; & LT; निर्भरता & gt; & LT; ग्रुप & gt; org.codehaus.jackson & lt; / ग्रुप & gt; & LT; artifactId & gt; जैक्सन-नक्शाकार-एएसएल & lt; / artifactId & gt; & LT; संस्करण & gt; 1.9.2 & lt; / संस्करण & gt; & Lt; / निर्भरता & gt; org.codehaus.jackson.map.ObjectMapper jsonMapper = नया org.codehaus.jackson.map। jsonMapper.configure (DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, गलत); जेसननोड सूचीनोड = जेसनमैपर। रीड्री (जेएसएन); इटरेटर & LT; JsonNode & gt; यह = listNode.getElements (); जबकि (यह hasNext ()) {JsonNode moNode = it.next (); स्ट्रिंग क्लासनाम = moNode.get ("objectC...

Play 2.2 Scala: Default values for a simple form -

Currently, I have a simple form that forms [(string, string, string)] In my scala.html file: @form (routes.Application.editParticipant (pid)) {@inputText (pForm ("email"), '_ label - & gt; "email", '_show constants -> wrong, placeholder - & gt; email) @ input text (pForm ("password"),' _log - & gt; "password", '_showConstraints - & gt; wrong, 'placeholder - & gt; password) @ input text (pForm ("phone"),' _log - & gt; "phone number", '_show contracts - & gt; wrong, page Lesholder - & gt; call) & lt; Input type = "submit" value = "edit" & gt; } I want a form to submit the existing values ​​of e-mail, password, phone, if the user does not edit it. How do I do that? You can pass the default value such as @inputtext (pForm ("email"). Copy (value = some ("abc@def.com"), '_ labels - & gt; "...

antivirus - Why my firefox browser keep directing to a blank website with extremely long url after mouse clicking? -

I'm encountering this link. I only remove one half of the link. It's really lengthy. met? How can I fix this problem? It looks like you have some spam-ware that is infecting your browser. Run and remove them. In addition, uninstall any random software from your browser and computer.

android - Passing always two characters to string from an int value -

This is the piece of code I'm using to remove: - the day of the week of the month of the month years hours -minutes P> From a string // calculo de fechas string fecha = resultp.get (Agenda_MainActivity.DIA); // format & gt; 2014-04-21 String Time = resultp.get (Agenda_MainActivity .HORA); // format - & gt; 17:30:00 string string = fade + "" + time; Calendar calendar = calendar.justinstance (); Try {calendar.setTime (New SimpleDateform ("yyyy-MM-d: m: s"). Pars (string)); } Grip (ParseException E) {// TODO self generated blocking block e.printStackTrace (); } All are working fine The only issue I have been doing is counting the minutes. This is the code that I use to remove minutes: string mintos = string.value (calendar.Ast (calendar.minutee)); The problem is the following, if the time is 17:35, then mintos = "35", as it should be. But the time is like 17:00, then miniatus = "0", and not "00"...

linux - How to use `scp` command copy a folder while not rewrite the local file with same name? -

I am using scp to copy a folder from a remote server, though , This copy process, I am trying to re-skip, but I do not want to over-write files in that folder, which has been copied to local. If it is Use the text "> just rsync . The syntax is nearly identical, it also works on the SSH, and it intelligently transfers the difference between files. Example: rsync * .jpg Hostname: yourdir

python - Using accumulate function to sort list (higher order function) -

DIF accumulated (FN, initial, CEC): if CEC == (): Return to initial: returns FN (CEC [0], Consolidate (FN, Initial, CEC [1:]) Using Submit I have to type a sorting function. def insertion_sort_hof (tup): return deposit (lambda x, y: x, y = y, x if x> y and none, (), tup) This is my code and I do not think it is capable of running. Why? Insertion_saort_hf (()) # () Combination_sort_hoff ((19,10,1,4,3,1,3, 2)) # (1, 1, 2, 3, 3, 4, 10, 19) There can be no assignment in a lambda, Therefore, try to add brackets such as lambda is invalid and you will get an error message for that error: lambda x, y: (x, y) = (y, x) if X & gt; Nothing else And it will not work anyway, because you swipe only local levels on that function.

bitbucket - Where are my files after git add .? -

Image
मैं कमांड चलाऊँ: git commit -m 'आरंभिक कमिट' git add तब स्क्रीन ने मुझे जानकारी दी मुझे लगता है कि फ़ाइलों को दूरस्थ क्लाउड में जोड़ा गया था लेकिन मैं उन्हें अपने बिटबाकेट खाते में क्यों नहीं ढूँढ सकता। ऑर्डर सही नहीं है। संशोधित फ़ाइलें इस मामले में प्रतिबद्ध नहीं हैं। आपको उन फ़ाइलों को इससे पहले जोड़कर BitBucket git add जोड़ना चाहिए। Git commit -m 'आरंभिक प्रतिबद्ध' बेहतर समझने के लिए गाइड का अध्ययन करें।

How do you manage connections to mongodb from C#? -

How can you manage the Mangodeb connection from C #? Close after use (CRUD)? Or can you keep the connection open at all times? This is my code to keep things perspective: string connection string = "mongodb: // localhost"; MongoClient Client = new Mongo Client (connectionString); MongoServer Server = client.GetServer (); MongoDatabase database = server.GetDatabase ("UsersDb"); Replica set to be added to driver in order to manage stuff, since 1.7 is. It is considered singleton and thread-protected you can always get MongoServer from it. You do not have to worry about closing the connection. See this for more information, it is managed by the driver.

nlp - How to check for unreadable OCRed text with NLTK -

I am using NLTK which analyzes a corpus of ORCR. I am new to NLTK Most OCR is good - but sometimes I come in those lines which are clearly junk. For example: Omphi au ba wmnondmam BE wBwHo & lt; obobm as bowman: ham: 8 ooww om $ 5 I want to identify (and filter) such lines from my analysis. How do NLP doctors control this situation? Something like this: If 70% of the words in the sentence are not verbatim, discard them. Or if you can not identify part of speech for 80% of the word of NLT, then leave it? Do algorithms work for this? Is there a "gold standard" way to do this? The use of NGram is probably your best choice. You can use Google en-gramme or you can use it. This idea is to make a language model and see what might be the chances of any punishment. You can define a probability limit, and all the sentences are removed with the scores given below. A proper language model will give very little scores for example sentences. If you feel that some words...

Java Declaring ArrayList -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर कभी-कभी मैं देख रहा हूँ ArrayLists की तरह अर्रेलिस्ट & lt; स्ट्रिंग & gt; str; जबकि दूसरी बार मैं इसे देखता हूं जैसे ArrayList & lt; स्ट्रिंग & gt; Str = नया अर्रेलिस्ट & lt; स्ट्रिंग & gt; (); क्या दोनों के बीच कोई अंतर है? या समान हैं और क्या दूसरे पर इस्तेमाल करने के लिए बेहतर है? सरणी लिस्ट & lt; स्ट्रिंग & gt ; str यह केवल घोषित घोषित है ArrayList & lt; स्ट्रिंग & gt; Str = नया अर्रेलिस्ट & lt; स्ट्रिंग & gt; (); यह डिफ़ॉल्ट आकार 10 के साथ एआर चर का आरंभीकरण है।

Java - Error: no suitable method found for add(int, java.lang.String) -

I'm in the middle of homework work and I'm stuck. At this point in my code, I think that I should have a GUI window that opens and allows me to type "inserted text number". Notice is not going anywhere but at this point, If I pass through the problem then it will be in a linked list. I am getting two of the same error for the lines. Add (index, element); And I can not seem to get past it, there is no suitable method for the error "add (int, java. string string)". Code is below, please advise. To clarify - this will not be a method error because it is a linked list. There should not be any way involved. import java.awt. *; Import java.awt.event. *; Import javax.swing. *; Import java.util. *; Import java.util.Scanner; Import java.util.LinkedList; Public class TopTenList JFrame {Private TopTenList tt; See the Private JTextArea list; Private JTextField cmdTextField; Private JTextField resultsTestfield; // This GUI window is the code for the public toptist...

matlab - Fitting with V matrices -

I am trying to make a linear regression without using polyfit or polyval is part of a long project and i Actually I want to accomplish this without using these tasks. I think I have got a share of the polyfit, but I do not know how to compensate for the polyvalue. Here's what I've done so far: x = [1 2 3 4 5 6 7 8 9 10] '; Y = [2.50 922 2.12187 1.88092 1.94206 2.25718 2.79674 3.22682 4.09267 4.98531 6.37534] '; V = [x ^ 3 x ^ 2 x x ^ 0]; C = V \ y; % C = (V '* V) \ (V' * Y)% points and the best fitting curve plot: x = (0: 0.1: 11) '; Plot (x, y, 'o') hold on plot (xs, polywol (c, xs)); Is this the correct way to compensate for the polyfit? And how can I do this without a polyvalue? Any help would be appreciated! This equation you solve for receiving coefficients, y = vc , now you know the V and c , related to using y : yFit = [xs ^ 3xs ^ 2xs xs ^ 0] * c; Are you happy with the setup to use c using V \ y , do you think t...

algorithm - Solving the similar recurrence: T(n) = 3T(n/3) + n/3 -

दिये गये .. टी (0) = 3 n & lt; = 1 टी के लिए (एन) = 3 टी (एन / 3) + n / 3 n & gt; 1 तो इसका जवाब है कि O (nlogn) हो सकता है .. यह है कि मैंने यह कैसे किया और यह मुझे सही जवाब नहीं दे रहा है: टी (एन) = 3 टी (एन / 3) + एन / 3 टी (एन / 3) = 3 टी (एन / 3 ^ 2) + एन / 3 ^ 2 इसे टी (एन) में जमा कर देता है .. टी (एन) = 3 (3 टी (n / 3 ^ 2) + n / 3 ^ 2) + n / 3 टी ( N / 3 ^ 2) = 3 (3 (3 टी (n / 3 ^ 3) + n / 3 ^ 3) + n / 3 ^ 2) + n / 3 आखिरकार 'जैसे दिखेंगे .. टी (एन) = 3 ^ के (टी (एन / 3 ^ के)) + सीएन / 3 ^ के सेट k = lgn .. टी (एन) = 3 ^ lgn * (टी (एन / 3 ^ lgn)) + cn / 3 ^ lgn टी (N) = n * T (0) + c T (n) = 3n + c उत्तर का ओ (n) हालांकि ... गलत क्या है मेरे चरणों के साथ? "post-text" itemprop = "text"> टी (एन) = 3 टी (n / 3) + n / 3 टी (एन / 3) = 3 टी (एन / 9) + एन / 9 टी (एन) = 3 (3 टी (एन / 9) + एन / 9) + एन / 3 = 9 टी (एन / 9) + 2 * N / 3 // कथन 1 टी (एन / 9) = 3 टी (एन / 27) + एन / 27 टी (एन) = 9 (3 टी (एन / 27) ...

accessing a PHP variable in javascript -

In my controller, I am passing this image which is an array like this: $ this- & gt; Load-> Model ('site_model'); $ Data ['picture'] = $ this- & gt; Site_model- & gt; Fetch_imes (); $ Data ['main_content'] = 'my_view'; $ This- & gt; Load-> View ('/ template', $ data included); Everything is right to know and even I have the following elements in my view that first shows the path of the element: $ images echo [0] ['path']; But seeing the script, I am trying to do the following: returns unwanted syntax error: unexpected token invalid " Warning ('& lt; php $ echo $ images [0] [' path '] ;;>'); Why is it so? Is not it possible Thank you The output you are output to has backslash The "escape sequence" in Javascript strings, which is basically a variable There is a typical representation of the tray that otherwise you would have trouble putting it in a st...

How do you get emacs to recognize .m files as Matlab files, not objective-C files? -

मैटलब के विषय में मेरी .emac फाइल इस प्रकार है: ;; Matlab मोड (autoload 'matlab-mode "matlab" "Matlab संपादन मोड" t) (setq matlab-indent-function t) (setq matlab-shell-command "matlab") लेकिन जब मैं एक Matlab फ़ाइल खोलता हूँ, तो मुझे लगता है कि मैं उद्देश्य-सी मोड में हूं। चूंकि मैं जल्द ही उद्देश्य- सी किसी भी समय लिखने की योजना नहीं बना रहा हूं, इसलिए मैटलब मोड में खुलने वाली सभी फाइलों को कैसे डिफॉल्ट कर सकता हूं? आपकी टिप्पणी कहती है कि आपने इसका समाधान किया है कुछ आपको बताता है कि आपने इसे जोड़कर किया था (ऐड-टू-लिस्ट 'ऑटो-मोड-आलिस्ट' ("\\। M"। Matlab-mode)) अपने .emacs पर। मेरे पास इनमें से बहुत से छिद्रित हैं जिनके लिए मैंने इसके लिए एक सुविधा मैक्रो लिखा है: (defmacro by-extension (ext मोड) `(ऐड-टू-लिस्ट 'ऑटो-मोड जो मुझे जैसी चीज़ों को लिखने देता है () बाय-एक्सटेंशन "एम" मैटलब-मोड)

java - Move icon from jbutton to jbutton -

I set up a gridlate with 16 buttons in the center. I had placed an icon on the first button. How do I loop, and when the user selects the next button on the grid, will this icon move from old location to new position? Private Arrestists & lt; Jebton & gt; Grid = new arreelist & lt; Jebton & gt; (); JPNEL grid BtnPanel = new zpn (); GridBtnPanel.setLayout (new grid layout (4, 4)); For (Int i = 0; I Any help would be great. Thank you. You can add an action list to the button, and after pressing a button, a button without any All buttons are searched to find an empty icon, and pressing the button on the button without any empty icon

vb.net - Can't delete the record in database/access from vb form -

I am trying to program a list, but my removed button is not working. Here is my Remove Button: btnremove.Click the handleboxBox.Show ("Do you handle personal sub btnremove_Click (ByVal as System.Object, ByVal E. System.EventArgs) To really remove this task? ", _" Remove ", MessageBoxButtons.YesNo, _ MessageBoxIcon.Warning) = DialogResult. Then exit the MsgBox (" Cancel Operation ") sub-term then slow CB New OleDb.OleDbCommandBuilder (DA) con.Open (as) Ds.Tables ("todolist") rows (ink) .elete () MaxRows = MaxRows - 1 ds.AcceptChanges () con.Close () Inc = 0 NavigateRecords () da.Update (DS, "todolist") End Sub After the removal button is pressed, it will only remove from my user interface, but not in my database. private sub btnremove_Click (ByVal sender as System.Object, as ByVal E System.EventArgs) handles btnremove.Click MessageBox.Show ("Do you really want to remove this task?", _ "Remove", MessageBox...

regex - How to replace any character (e.g. ":") with new line in bash variable pattern substitution? -

I would like to use variable pattern replacement in $ PATH to replace ":" echo $ {PATH /: / "& lt; what's here & gt;"} I tried: $ echo {PATH /: / P> You can use just quoted strings just like anywhere else. "$ {PATH //: /}" this: echo "$ {PATH / (You probably want to replace the colon everywhere, not just the first event. Therefore, the // > No / .)

php - Do I have to sanitize user input with prepared SQL statements? -

Is it considered completely safe? $ stmt = $ dbhandler-> Ready ("Set some time somefield = update: somestring"); $ Stmt- & gt; BindParam (": somestring", $ _ request ["hack_me_please"], PDO :: PARAM_STR); $ Stmt- & gt; Executed (); And if not, what can be safe with it? I am convinced that unknown weaknesses can be used in PDO / MySQL / PHP in the future, so I am thinking that if anybody is right, then I can secure my questions, or it can be done with my hands If this is easy, then why is SQL injection still a thing? Will not it run in the way of polio? No, cleaning is not required when using sql injection A statement ready to protect, but if you want for any other reason you can do this. If this is easy, then why is SQL injection still one thing? Will not it run in the way of polio? It is easy for those who know about it, unless you know it, I believe that the sql injection There is not much nowadays.

wso2 message broker + spring integration performance -

I am using the spring integration + WSO2 message broker for my project: My stream is: Step 1. Client call cool website service Step 2. Get the link from the class and send it to the request line (via gateway) Step 3. Request queue to the activator Get the message from, bussiness logic then send results back to the queue queue Step 4. Crappy results and questions for the customer. Tricyca received My question is: Why is WSO2 very slow? This took me 1-2 seconds to complete the flow with WSO2 for only one message but when I switch to ActiveMQ it grows too much ( full stream for 1000 messages in 6 seconds) ??? My configuration is as follows: & lt ;! - WSO2 connection - & gt; & Lt ;! - & lt; G: jndi-lookup id = "connectionFactory" jndi-name = "qpidConnectionfactory" cache = "true" & gt; & Lt; JEE: Environment & gt; Java.naming.factory.initial = org.wso2.andes.jndi.PropertiesFileInitialContextFactory connection...

c# - Use a Timer to change value periodically -

Hi there I'm new to C # and just want to run a timer manually! So I want to know what I am doing wrong in my code. I need to display a simple message within my timer! My code is: Public Partial Category Form 1: Form {System.Timers.Timer time; Public Form 1 () {Initialization (); Time = new system Timer Timer (); time. Interval = 10; Time.Enabled = true; time.Start (); } Private Vain Time-TAT (Object E, EventErgages EA) {For (Int i = 0; I Please tell me if I am doing something wrong thanks in advance! You forgot to hear ended event: time.apple + = new ElapsedEventHandler (time_Tick); For the initialization of the timer and call the callback function when the timer is over (10 mm time) Note that the callback function will also be every is called 10 ms. time.Stop (); inside the callback function if you want to stop it.

javascript - getElementById a XBL bound XUL element -

I'm trying to reach an XUL element that was XBL bound. I want to control it with javascript. This is binding. & lt; Binding id = "impe-thriber" & gt; & Lt; Resources & gt; & Lt; Stylesheet src = "chrome: // lighting / scan / lighting-wits.css" /> & Lt; / Resources & gt; & Lt; Content pack = "center" align = "center" & gt; & Lt; Xul: image anonid = "loading-throbber" src = "chrome: //global/skin/icons/loading_16.png" hidden = "wrong" /> & Lt; / Content & gt; & Lt; / Binding & gt; This is CSS binding imip-throbber {-moz-binding: url (chrome: //lightning/content/lightning-widgets.xml # Imip-throbber); } This is a xul implementation Electricity-Information-time ID = "Impress-Bar" abbreviation = "True" Insert = "msgHeaderView" label = "& amp; Electricity. Examination Disassembly;" & Gt; ...

ios - How to make object change in contact -

I have an object in that scene that determines: SKSpriteNode * object = [ssptn node phantom nodivith: fiction: _bovac]; [Object set: 2]; Object.position = CG Pointsmake (0, Y); object.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize: object.size]; Object.physicsBody.dynamic = NO; Then if my character hits it, then he will be there. Now, I want that whenever the object is hit on the object, the object also moves its upper half. If index value is in class 2, then in the index value class 2, in the case of object and character reflection by normal physical contact law, if the index value is in class 3, the object is broken in half I tried to put object.physicsBody.dynamic = yes; Then I saw that it pulled down and disappeared from gravity. How do I set up an object dynamic and condition to meet the above requirement? Thank you very much for your help! Added (as requested): My Representative Method: @ interface Messenci () & lt; SKFX Contact Delegate & gt...

sharepoint - Get all lists root folder with SP.js -

I need to get all root folders of lists on the current web, along with the shrepoint client object model. I try to use this code, but I have an error var context = SP.ClientContext.get_current (); Var lists = context.get_web () Get_lists (); Context.load (listings); Context.executeQueryAynync (function (sender, args) {var enumerator = lists.gateAnimator (); while (enumerator.movext ()) {var list = enumerator.get_current (); var rootFolder = list.get_rootFolder (); context.load (Rootfolder, 'server rtUurl'); references.exeaccacaccc (function (sender, args) {// error var url = rootFolder.get_serverRelativeUrl (); console.log (url);}, function (sender, args) {console.log ('Error');});}}, function (sender, args) {console.log ('error');}); thanks This error occurs because this request is not requested it was done. Change the List.RootFolder line to load: context.load (listings); with this one: context.load (lists, 'include (rootfolde...

grep - Searching a word/group of words from a list of files in unix -

I want to search for a word event in all files from a given folder and only want to see the list of files I am Tried: - Find-type f -exec grep -l & lt; Keyword & gt; {} \; But I'm getting the entire line of all the keyword's events, it's getting messy. I also have the grep -hr & lt; "Keyword" & gt; . but giving it to: grep: illegal option - r. Please help. make sure what is happening with your grep , but it's okay Works: find-type f -exec grep -l {} \: ./br.csv ./combined.csv ./skyscan.csv ./skyscan.db ./team .sql ./uniq.js Maybe check that grep is running on you.

html - Firefox has different pixel size? -

I have to use fixed height for fixed layout (Google Map with form in the sidebar) and I saw that 600px height Firefox is much larger than other browsers (Chrome, IE 8) Firefox 600 PX is actually shown as CCA 690 px! Even Google Maps tiles are reserved again, so they both display the same in FF and Chrome. And even the web developer toolbar / diverse / ruler displays 600 px instead. How is this possible? Which setting is this? I think the pixel is a pretty clear unit and it is reliable to be a real pixel Can I reset it to normal height for Firefox, so that it can look the same in all browsers? I have a problem with this because everything in Firefox can fit into "600" (= 690) pixels, but not in other browsers. I think the size will be similar to that of a field that can actually be fitted. Is it desirable to do this? Or not, because it will also break the size of all other things (font size) that users are already used, it can break the browser settings and user exp...

caching - Android HttpResponseCache, can i use that cache data? -

I searched this on the web but was unable to find an answer. Caching: Private Zero Passive HTPRPS PACCACH (File Cache Dior) {/ p> {long httpCacheSize = 10 * 1024 * 1024]; // 10 MiB file httpCacheDir = new file (cache directory, "http"); Class.forName ("android.net.http.HttpResponseCache") .getMethod ("Install", File Category, Long.) Evanoc (Blank, httpCacheDir, httpCacheSize); I have seen 3 files in the files that I created in the file: e8b34557a3241feb7e186d1b86c9af4c.0 e8b34557a3241feb7e186d1b86c9af4c.1 Magazine and the file e8b34557a3241feb7e186d1b86c9af4c.1 contains my JSON data. A way to obtain and use that data? Look at HTTPResponsecache . You can force a cash response! Try // {connection.addRequestProperty ("cache-control", "only-if-cached"); Inputstream cached = connection.getInputStream (); // Resource was cached! To show this (FileNotFoundException e) {// Source was not cached}

linux - Detecting a changed SIM card in android by means of native code C++ (without using SDK) -

Is there a possibility to get a SIM card entry & amp; Removing information in native C ++ code (i.e., without using SDK) Please help! Thanks in advance. Not likely you will need to use Android SDK.

html - Centering an image that is in an anchor tag -

I have an image in anchor tag, and I need to focus it. I have managed to use this technique to do this so that I have just been walking in the Dome Inspector: uses it: Display: Table; Margin 0 auto; I tried to use it: display: block; Margin: 0 auto; Width: (?) Px; But I came to know that it was not actually centering it until I got very confused with width which is not really very good because anchor tag width does not work too (IMO) was originally using a margin-left Curious that you have used any of these before or have got a better technique in terms of performance: Table 7 is not supported and back You can use text-align: center; #container at the inside of the center elements. Example:

php - Update single or multiple row with data from another row in the different table -

The administrator will need to accept the profile information, then it will be displayed. This is my idea that we have to store the data in a dummy table and it will need to be reviewed and approved by the administrator, because the data in the master user table is updated. So I need to update the master table by using the dummy table row, how to use this simple update query line? Is there any easier way? I am using PHP MySQL You inserted it into the table (If both tables are the same): Choose to insert in the mastertable * from the dummyTable a suggestion from me: You can add a Boolean column to MasterCables such as IsAprproved . And set it to false by default. Ever since its selection, use it: SELECT * FROM MasterTable WHERE IsApproved = 'true' That's why users will not receive records that are not approved. When the administrator accepts each record, update that record and set IsApproved to true . Ie, upstate mastertable SET IsAppr...

How do I assign a URL to a file stored in a SQL database? -

I have built a document management system that stores all types of files in SQL database. Database 4 provides information about basic rows, namely: Fleiz filename filesyes file type File content I want to use to preview files, but it requires that I have a URL to access my file, and I do not know How to assign a URL to a database in which I liked the file of my choice May include'm making a home-grown PAAS, is built on the net. I've heard that the URL rewrite module for IIS (I'm on 7) can solve my problem, but I think that The URL can be something like / document / {fileid} . When this path has to be faced, the router will call your view and you can return the contents of the file. There is some information on the model / controller. Note : There are some security problems with this approach.

mysql - Insert issue on foreign key column -

I am currently testing something and facing a problem while trying to enter some value in a table I am I have 3 tables; Equipment, Outdoor, Indoor ** External ** -> ** Device ** & lt; ----- ** indoor ** net_id (pk) net_id (fk) net_id (pk) I wanted to have a relationship so that a device can be either outdoor or indoor , Either through indoor or outdoor net_id. change table devices o_relationship foreign key (net_id) add static point reference external (net_id) reference: I did the following: Add optional table device contract i_relationship foreign key (net_id) reference indoor (net_id) ; Now my problem is, when I'm trying to insert a value in the devices, I am unable to do this as long as the net_id value is not both from the indoor and outdoor tables. Ho. It is assumed that this means "net_001" is present in the indoor and outdoor tables, allowing it to be inserted into my devices, but if "net_001" is present in the indoor and "ne...

objective c - How to swipe NSArray of images in Order using ISwipeGesture iOS 7 -

Hi, Hi in my application, I have an array of images, I swipe to see the image, so I have used swipe gestures in my application. For both left and right but the problem is that the images are not showing, in order to show only two images, please tell me how to solve this problem. My swipe codes. - (IBAction) handle wipe: (UIGestureRecognizer *) sender {// NSLog (@ "swiped"); Int imageIndex = 3; NSArray * images = [[NSArray alloc] initWithObjects: @ "2.jpg", @ "3.jpg", @ "4.jpg", @ "5.jpg", zero]; UISwipeGestureRecognizer guidelines = [[UISwipeGestureRecognizer * Sender direction]]; Switch (Direction) {Case UISwipeGestureRecognizerDirectionLeft: imageIndex++; breakage; Case UISwipeGestureRecognizerDirectionRight: imageIndex--; breakage; Default: Break;} imageIndex = (imageIndex & lt; 0) ? ([Number of images] -1): Image index% [Calculation of images]; Imageview.image = [UIImage imageNamed: [Images ItemAntx: imageIndex]];} Swipe...

python - Cycling through a group of variables with similar names -

Is there a way of cycling with names similar to using loop in cycles through cycles of Python ? Example (from nltk library): I have a group of variables named Lesson 1, Lesson 2, Lesson 3, ..., Text 9, and I have always written their names without clearly typing them All of them want to do some work, so I am exploring a way through loop through them: for class x (1, 9): text + x.someFunction ( ) I know that this is not allowed, but is there a way to do something like that? You can use eval: eval (" For example, to load your values ​​in the map: data = dict (key): key = "text" + str (x) data [key] = eval (key) or if your variable is a class object With the method someFunction : xrange (1, 9) in x: cmd = "tex t" + str (x) + ".someFunction ()" eval (cmd)

javascript - Make a dynamically generated div droppable -

I am working on a table with div in the cell, and I think the div should be droppable and when I drop something in a div so it first creates a new div under. But the dynamically-generated device should have a droppable and it is not now ... $ (" ", {id: "divCreate" + i, class: " Droppublic "}); $ (DivCreate) CSS ("text-align", "center"); $ (DivCreate) CSS ("width", "125px"); $ (DivCreate) CSS ("height", "30px"); $ (Cell) .append ($ (divCreate)); JS Droppable: $ (". Droppable"). Droppable (function () {// a lot of lines with many functions}} so I try to add that $ (divCreate) .droppable (); Now this display is a drop-job for the creation of the div, but it is not with the JS function which I influence the "draperprepellable" class. Did I create $ (divCreate) Need "live" ("droppable"); ? Or is it impossible and I need to build a code from JS f...

Getting the uploading file name before upload with jQuery File Upload plugin -

I am using the jQuery File Upload plugin to upload multiple files to the server. I'm using it with a custom web service that will store images uploaded to the server. However, in addition to the POST request body, I will also have to file the name of the web service which is being uploaded, so with each file transfer, I have to pass a web service in the name of the file. Can anyone tell me how can I get a file name and send it with each upload request? I basically need to get it from the field of no extra input fields. If a user has selected 10 files, then I have to take a name for each file in the queue and submit it with the upload request. Thank you. OK, this is the solution that works: // file name in the queue fil file = ""; // File on the file to pass the web service $ ('# fileupload') to assign the name of that file. ('Fileuploadadd', function (e, data) {$ .each (data.files, function (index, file) {fileName = file.name;}}}}); // Submit...

javascript - Applicative functors in Underscore/Lo-Dash chaining - how to map inside a map? -

मेरे पास एक नेस्टेड ऑब्जेक्ट है: var itemsQuantities = [{आइडेंटिफ़ायर: कुछ नाम: 'मात्रा: 1', मात्रा: [{नाम: 'मात्रा 1', राशि: 4}, {नाम: 'मात्रा 2', राशि: 1}, {नाम: 'मात्रा 3', राशि: 3}]}, {आइडेंटिफ़ायर: 'कुछ कुछ के साथ- Quantities2', मात्रा: [{नाम: 'मात्रा 1', राशि: 3}, {नाम: 'मात्रा 2', राशि: 2}, {नाम: 'मात्रा 3', राशि: 5}]}]; समस्या : मैं [7, 3, 8] प्राप्त करने के लिए सभी 'मात्रा' वस्तुओं को एक साथ गुना चाहता हूं यह राशि क्षेत्र के क्षैतिज रकम के रूप में है। मैं अपने मौजूदा समाधान बिना सिस्टम चेनिंग इस तरह से है: var राशि ससुराइनी चाइना = _.reduce (_। नक्शा (आइटम) विवेक, कार्य (वस्तु) {वापसी _.प्लिक (आइटम। प्रश्नोत्तर, 'राशि');}), फ़ंक्शन (प्रचाक्यू, अगली क्यू) {वापसी [prevQ [0] + अगलीQ [0], पीईटीक्यू [1] + अगली क्यू [1], प्रचेक्यू [2] + अगली क्यू [2]];}, [0, 0, 0]); इस प्रकार अब तक, लो-डैश के _ आंशिक राइट का उपयोग करके, सबसे साफ समाधान, मैंने प्राप्त किया है: var राशिस्पर्...

CRM 2013 Business Rule export option? -

Is it possible to export / import businesses written in CRM 2013? I'm migrating to CRM and I'm adding some new verification rules using the Professional Rules feature instead of Javascript. But before exporting these business rules and transferring the latest CRM database, there is no support for importing them again. In addition to a JavaScript solution, is this a better idea? You can call it Solution Add and export the solution and import it into a new environment

android - Gradient with specific height and gravity -

Image
I need to create a drawer with a gradient (10dp) on the right side of the screen. I need to make me worthy to do this Because I have to apply it to a single layout ... This is what I need to: Using two layouts is very easy, but I have to use only one experiment. Many thanks a lot from the very first! For this, create a custom view or layout on the draw for you to draw shield so that you can specify For more information, take a look at this link If you have any samples that are about using a gradient.

angularjs - CSS - Scroll is consumed by the div behind -

I have two divs, after that one is planned to be the right drawer, when the drawer is opened and I scroll Trying to do is, scroll events are used by div. What should I do in order to use the drawer in order to consume scroll events. I mean, I have to scroll over the drawer not on the main area. This is my favorite: & lt; Div ng-app & gt; & Lt; Div ng-controller = "MyCtrl" & gt; & Lt; Div ng-repeat = "values ​​in values" category = "main" & gt; M {{}} value & lt; Br / & gt; & Lt; / Div & gt; & Lt; Div class = "right drawer" & gt; & Lt; Div class = "scrollableArea" & gt; & Lt; Div ng-repeat = "value in value 2" & gt; D {{}} value & lt; Br / & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; My CSS . Main {background-color: yellow; } .right drawer {background color: light green; Status...

excel - How can a user edit the work sheet but can not save an additional copy or print the file? -

How the user can edit a work sheet but can not save an additional copy or print the file ? TL; DR: It is impossible to stop copying and printing altogether, but you can work hard to copy or print a file to make it "impossible" for uninterrupted users 1) You can 2) Even after reading it, it seems that you can protect it from copying and printing. Copy the answer from the forum: Cancel the right mouse on the axel mark on the left of "Print" and select "View code" and paste it: preceded by the Private Sub Workbook (Cancel as Boolean) if ActiveSheet.Name = "Sheet1" then Cancel = True End if End All and Cancel Copy, select the right mouse (i.e. Sheet1) on the sheet tab and select the visual code and paste it in, you are able to copy Nge but when you select another cell, it will be canceled ... Private Sub Worksheet Select application (range as Chengans). Codecmode = false and sub But as I said earlier: Experienced users ha...

excel vba - In range find this and do that -

There is a limit of cells with columns heading, in the range of cells, I want to find a number , Say 1 if it finds 1, then look for a variable, 2 or 4 in a row in the row, now that I can "triangle" (cell copy and paste) 1 "Then leave the number of variables in the week and add another triangle and continue doing it till the end of the range, then to the next line Put it down and do it by the end of the border, do the same way. Then, change to the next page and do the same thing ... through the entire workbook. I think I have done this, know It is not the best way to do that. I get an error 91 at the end of the second loop, second time the second loop ends, it goes through the error code. The error is over. I do not know Is run through a bar, but not twice. sub add_translation2 () Dim Rng as the range dim range ("G25") 'Range worksheets (1) in the second Used to prevent the loop. Activate worksheets (1) range ("A1"). Select 'Past...

javascript - how to pass domnode to the sub window created by window.open -

When we add children to B.js, then there is an undefined error I ?? / / sample code //A.js this.node = document.getElementById ("area"); window.open ("B.html"); //B.js Document.getElementById ("Area"). AppendChild (window.opener.node); document in BJS is one of the #document in AJ . It means window.opener.node is a #document with an node and therefore you have to call before using it // B.js var node = document.importNode (window.opener.node, / * deep * / true); document.getElementById ("area") appendChild (node). Please note that this new node is a copy , if you have large structures then you also want to delete the original You can. / P> If you want to support older IE browsers that have reached the end of your life, here are some things a & lt ; Div & gt; Setting and internal HTML if (! Document.importNode) {document.importNode = function (node, dark) {var wrapper_old = Node.ownerDocume...

python - Django Imagekit overwrite cachefile_name? -

I am trying to overwrite the module django-imagekit to cachefile_name property. Here's my code: square thumb-150x150 (imageppeak): processor = [resizeToFill (150, 150)] format = 'JPEG' option = {'quality @: 90} @ property def cachefile_name (self): # Simplified for this example "bla / blub / test.jpg" register.generator ('blablub: thumb_150x150', thumb-150x150) class avatar (models.Model): avatar = ProcessedImageField (upload_to = upload_to, processor = [ConvertToRGBA ()], format = 'JPEG', option = {'quality': 60}) avatar_thumb = ImageSpecField (source = 'avatar', id = 'blablub: thumb_150x150') This does not work at all. When I view the return value of debug (my cachefile_name ), and the value of cachefile_name, the result is "CACHE / blablub / asdlkfjasd09fsaud0fj.jpg". Where's my fault Any thoughts? As an example I could have copied closely, it worked fine. Some suggestions are: 1...

php - Accessing Configuration::read in Controller in CakePHP -

I have a separate configuration file for the KPPHP application that is loaded in bootstrap.php. My question is how can I use the configuration variables in my controller? To wit. How do I configure the 'Reading' ('variable') function in the controller? Thanks! Please read the documentation. It is very well explained in how to load custom config files: By default, when entered as a class in itself, its configuration merge with pre-loaded configs Will be done. Configure :: Read ('variable') Then loads the contents of the new configuration if it overwrites the app.

php - HTML to run javascript even when page is closed -

OK, this is a problem I was doing for a while, and I can find a solution, anywhere I am! My problem: My HTML content is available as a web application that can be used offline, but I also get contact form available offline too. Want to do Anyway the user can fill in the contact form when they do not have a connection and then run a script for running that keeps the input data until the connection is established. And once after the connection was established to send data to a PHP script on one server? Edit: Thanks for all your replies! I have seen in local storage but it does not work because users can turn the page back on, but they probably do not have an internet connection, so I was wondering if there is any type of script that is localized You can run from time to time unless there is no Internet connection Thank you in advance! Yes - provided that they try and send the message (AJAX etc.. ) / li> If a connection fails - store in local storage. ...

git - Files kept in bitbucket after delete -

I have a problem similar to the question, although there is no answer to it and it seems that it has been omitted In short I have deleted some files from my local store, and git add is done. git status says that files are deleted and committed also accepts that when I push me The message of everything has been updated and the files are not deleted from my BitBasket account. If you have a git add , then your deleted guitars are not recognized after you delete them. You must use git add -A apply an underlying git rm of all files to be deleted to do.