Posts

Showing posts from January, 2013

python 2.7 - How to change the fontsize for everything inside QTextEdit in PyQt4? -

मेरे पास एक QTextEdit है जिसकी सामग्री को प्रोग्रामेटिक रूप से QTextEdit.textCursor । मेरी योजना है कि उपयोगकर्ता को आबादी वाली जानकारी को TextEdit में चेक करें और यदि आवश्यक हो तो संपादित करें और फिर बाद में QPrinter का उपयोग कर पीडीएफ फाइल में प्रिंट करें । हालांकि, मैं पूरी सामग्री के फोंससाइज़ को बदलना चाहूंगा जो कि उपयोगकर्ता संपादन कर सकने से पहले कोर्इपेल्ड किया जा रहा है। मैं कई फ़ॉन्ट आकारों का उपयोग नहीं करूँगा, इसलिए मुझे सामग्री की एक एकल फ़ॉन्ट आकार सेट करना होगा। मैंने QTextEdit.setFontSize (16) का उपयोग करने से पहले और text cursor ऑपरेशन के बाद लेकिन इसका कोई प्रभाव नहीं है। मैं QTextEdit के अंदर सामग्री के फ़ॉन्ट आकार को कैसे बदलूं? मुझे पूरा समाधान मिला आपको चाहिए: वर्तमान textCursor कॉल चुनेंसभी कॉल सी ++ में यह निम्नलिखित कोड के साथ किया जा सकता है (यह सिर्फ उदाहरण है) लेकिन यह आपकी समस्या का हल करता है): QTextCursor कर्सर = ui- & gt; textEdit- & gt; टेक्स्ट कर्सर (); UI- & gt; textEdit- & gt; selec

sql - syntax for inserting hstore arrays in PostgreSQL -

New in postgrad, just thinking how the syntax will be done. For example, I have the following table: < Pre> create table test (field 1 hstore [], field 2 text [], field3 hstore) ... To insert entities, syntax is the INSERT test (field 2) value ('{"abc", "def"}'); To insert hstore, like syntax INSERT test (field 3) value ('' A '=> 1.0,' b '=) & Gt; 2.4 '); But, what do I do for the inclusion on ' field 1 '? Something gives me an error like the following: INSERT test (field 1) values ​​(`{'" a "=> 1.0," b "=> 2.0', ' "A" = & gt; 3.0, "b" => 4.0 '} `) Any fix? Thanks! == Edit == Just explained it INSERT ('{' a = & quot; Gt; 1.0, b = & gt; 2.0 "," a => 3.0, b => 4.0 "} ') The answer given below also helps , But in this particular case, a string (rather than array structur

mysql - How to number Duplicate rows in sql -

I am trying to figure out the best / simplest way of duplicated lines in the same way. I have a set of data I am uploading to the database table, I have uploaded it, and auto has extended it, now I want to generate order_id in fashion shown in my question. For example ---- ID ------- NAME ----------- ORDER_ID ---------- 1 Bob Smith 1 Steve Jones 2 3 Bob Smith 1 4 Billy Boys 3 Steve Jones 2 -------------------------------- I was thinking that I can use a statement like select the table from NAME Where name = Duplicate_name but I can not seem to know how to actually go about it, enter the appropriate ORDER_ID later in the form An easy way to respond? You can do something like this: SELECT AID, A A.N., (T.D. to T.I.E. from the table with name of TIE = ANI order) TDI as ORDER_ID AS A If your database engine does not support top keywords, but supports LIMIT keywords, then you might be able to: SELECT A. ID, A.NAME, (Select CD from TDID T.D.C.I.I.IIIEIIT. Wara 1. ASD

objective c - Unable to parse JSON to UITableView -

Currently I'm trying to parse responseObject to populate my table view But I'm having some problems in parsing the array in response. I want to populate my cell with values ​​from responseObject [@ "test"] Request Functions: FHTPPRKAccess Operation Manager * Manager = [FHTPTPAST Operation Manager Manager]; [Manager post: [kBaseURL stringByAppendingString: @ "directori / member_list"] Parameters: Parameter success: ^ (F.httipafefaction * operation, id response object) {nslog (@ "answer:% @", referee); If ([responseObject [@ "status_reason"] is elevation: @ "success"]) {self. All Members = Response Object [@ "Test"]; NSLog (@ "Member:% @", all of itself); } Else {// Handle Error}} Failure: ^ (FHTPPKAEASTA Operation * Operation, NSERR * Error) {NSLog (@ "Error:% @", Error); }]; As you can see below, test is an array of objects Sample feedback objects: < / P> Answers: {te

Non-implicit Writes can't deal with Option (Scala, JSON, Play 2.3.6) -

मेरी इस तरह एक केस क्लास है: केस वर्ग उत्पाद (ean: long, नाम: स्ट्रिंग, विवरण: स्ट्रिंग, खरीद मूल्य: विकल्प [बिगडीकिलल] = कोई नहीं, विक्रय मूल्य: विकल्प [बिगडीकिल] = कोई नहीं) और मेरे पास इस तरह एक गैर-निहित लेखन है: और तो मेरे पास है विकल्प का एक उदाहरण [उत्पाद]: val prod = कुछ (उत्पाद (5018206244611 एल, "ज़ेबरा पेपरक्लिप्स", "ज़ेबरा लंबाई 28 मिमी घोषित 150 पैक")) जब मैंने इसे क्रमबद्ध करने की कोशिश की ...: val jsonStr = Json.toJson (prod) (adminProductWrites) मुझे एक त्रुटि मिली इस तरह से: & lt; कंसोल & gt;: 21: गलती करें या: प्रकार बेमेल; पाया: play.api.libs.json.owrites [उत्पाद] आवश्यक: play.api.libs.json.Writes [कुछ [उत्पाद]] val jsonStr = Json.toJson (prod) (adminProductWrites) तो, पहले (केवल तुलना के लिए) मैंने यह कोशिश की: val jsonStr = Json.toJson (prod.get) (adminProductWrites) यह काम करता है: jsonStr: play.api.libs.json.JsValue = { "EAN": 5018206244611, "नाम": "ज़ेबरा पेपर क्लिप"

using imread of OpenCV failed when the image is Ok -

When I want to read an image using the OpenCV function imread () Had to face a problem. The image is fine and I can show it in the image display software. But when I use the imdecode () to get the image data, the data gets zero. I will upload the image and code and hope someone can help me Mat img = imread (image_name); If (! Img.data) return -1; The link for the image is here: PS: image_name OK I think OpenCV can not decode this image. Is there a way to decode this image using OpenCV ?, like adding a new decode library, by the way, I can read this image using free image like another image library. Your image is in .gif and is not yet supported by OpenCV . Note OpenCV image formats support Windows Bitmap (BMP), Portable Image Format (PBM, PGM, PPM) and Sun raster (SR, RUS). With the help of plugins (if you create your own library, we present them in the package by default, then you need to specify them) You can use JPEG (JPEG, JPG, JP), JPEG 2000 (JP2 - CMK)

javascript - Node server is returning rotated images when I use background-image -

I have an application with node.js, and some images are stored in the server, but for some reason, when I find the image looks good in my browser: But when I use the same image but with a CSS rule like : & lt; Div class = "upload-grid" style = "color: white; font-size: 1em; text-line: center; background-color: # 727272; background-image: url (http: / /myimage.jpg)! Important ; "& Gt; & Lt; / Div & gt; Image rotates. How can I fix this?

java - Update a column using hibernate -

मेरे पास दो वर्ग कर्मचारी और विभाग हैं। सार्वजनिक वर्ग कर्मचारी {int empId; स्ट्रिंग empName; बूलियन ईएफ़ उपलब्ध है; स्ट्रिंग empAddress; विभाग विभाग; } सार्वजनिक वर्ग विभाग {int deptId; स्ट्रिंग deptName; } मैंने हाइबर्नेट फाइलें बनायीं हैं, विभाग विभाग.एचबीएम.एक्सएमएल और कर्मचारी एचबीएम.एक्सएमएल मैं कॉलम को अपडेट करना चाहता हूँ एम्पायर में एम्पाउपलब्ध है सार्वजनिक शून्य अद्यतन कर्मचारी (कर्मचारी का अधिकार, कर्मचारी पद, कर्मचारी, डिपार्टमेंट डीपटीड) {स्ट्रिंग क्वेरी = "एम्प्लीयर सेट है एम्पएवएबल = = जहां डीप्टीड =? ऑब्जेक्ट [] वैल्यू = {" सच्चे "," 133 "}; हेइबरनेट टेम्प्लेट.अपडेट (क्वेरी, वैल्यू);} जब मैं कोड चलाता हूं, तो कॉलम अपडेट नहीं होता है। एंटिटी के रूप में एक त्रुटि फेंक जाती है: अद्यतन कर्मचारी कर्मचारी है एम्पएवएबल =? जहां डीप्टीड =? मैंने ऑनलाइन डॉक्स पढ़ा है GetHibernateTemplate () के तरीकों के रूप में वापसी का पूर्णांक प्रकार है I यहां मैं किसी भी प्रकार के बिना dao.updateEmployee को कॉल करके डेटाबेस निर्देश को अद्यतन करन

Excel VBA - Vlookup & range -

मैंने CL को सीमा के रूप में परिभाषित किया और < कोड> VLOOKUP । VLookUp से प्राप्त परिणाम एक श्रेणी का पता है (उदाहरण: e58 )। मैं इसे एक श्रेणी के रूप में निर्दिष्ट करने में असमर्थ हूँ सेट सीएल = रेंज ("= vlookup (i, रेंज (" a7: b28 "), 2, गलत)") ऐसा नहीं है कि आप VBA में सूत्र कैसे चलाते हैं कुछ कार्य अनुप्रयोग ऑब्जेक्ट ( VLookUp सहित) में उपलब्ध हैं। सेट करें cl = रेंज (application.VLookup (i, रेंज ("a7: b28"), 2, गलत)) दूसरों के लिए उपयोग करें application.WorksheetFunction वस्तु सेट करें cl = रेंज सेट करें (application.WorksheetFunction.VLookup (i, रेंज ("a7: b28"), 2, गलत)) नोट: दो तरीकों में कुछ सूक्ष्म अंतर हैं, खासकर कि फ़ंक्शन, कैसे त्रुटियों को संभालता है चींटी हां, आपको अपने कोड में त्रुटि से निपटने को जोड़ना चाहिए। साइड नोट: भले ही आपका दृष्टिकोण काम करता है, आपको " के आसपास a7 को सीमांकित करना होगा : B28 , इस तरह "= vlookup (i, रेंज (" a7: b28 "", 2, गलत) &qu

ruby - rspec - matcher for one of choices -

I'm returning a random value from the predefined array (i.e .:: ['value1', 'value2'] < / Code>). How should I test with RSPC? I want to do something like this: Hope (FooClass.new.value). Be_in ['value1' 'Value2'] Is there any way to do this? Thanks Use it Hope (['value1', 'Value2']). To include (FooClass.new.value) or a simple boolean match Hopefully (['value1', 'value2']. FooClass.new.value) Be true

java - Building Eclipse Project With Maven -

Image
I follow the following from a tutorial on a racing web service. Are there Spring Framework dependencies, instead of downloading binaries and entering it in the lib dir, I pom.xml in & lt ;? Xml contains a dependency version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "http: / /maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> & Lt; ModelVersion & gt; 4.0.0 & lt; / ModelVersion & gt; & Lt; Group & gt; Com.concretepage & lt; / Group & gt; & Lt; ArtifactId & gt; Spring4 & lt; / ArtifactId> & Lt; Version & gt; 1 & lt; / Edition & gt; & Lt; Packaging & gt; War & lt; / Packaging & gt; & Lt; Parents & gt; & Lt; Group & gt; Org.springframework.boot & lt; / Group & gt; &

c# - Issue using <asp:Repeat> to repeat <a> tags, specifically the inner text property -

I am running asp.net 4.0 on VS2013, and I'm having trouble understanding ASP repeater completely. What I'm trying to do is look like this: & lt; Div id = "datesDivContainer> ASP: repeater runat =" server "id =" repeater "DataSourceID =" listToAddToHTML "& gt; item item & gt; & lt; div & gt; & lt; a href = current date Aspx? Date = "+ + & Gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / ItemTemplate & gt; & Lt; ASP: Repeater & gt; & Lt; / Div & gt; Now, what do I need to do is set text of the Template Link Tag item values ​​of the data source list of repeater's data source (eg date 28/10/2014, hence the text link 28/10/2014, 27/10/2014, and whatever is in the XML file). The date is made up of elements in the list, and is initiated in the following way: var list = new list & lt; String & gt; (); XDocument XMLDatesDocument = XDocument.Load ("

xml rpc - Perl how to get values from bless object request data -

मैं RPC :: XML और parsing अनुरोध xml का उपयोग कर रहा हूँ नीचे कोड और अनुरोध xml। < कोड> RPC :: XML :: ParserFactory 'XML :: Parser' का उपयोग करें; मेरा $ P = RPC :: XML :: ParserFactory- & gt; नया (); मेरी $ parse_data = $ P- & gt; पार्स ($ xml_data); प्रिंट डम्पर ($ parse_data); अनुरोध xml: & lt; methodCl & gt; & LT; methodName & gt; get_topic & lt; / methodName & gt; & LT; पैरामीटर & gt; & LT; param & gt; & LT; मूल्य & gt; & LT; स्ट्रिंग & gt; 163,397 & lt; / स्ट्रिंग & gt; & Lt; / मूल्य & gt; & Lt; / param & gt; & LT; param & gt; & LT; मूल्य & gt; & LT; I4 & gt; 0 & lt; / I4 & gt; & Lt; / मूल्य & gt; & Lt; / param & gt; & LT; param & gt; & LT; मूल्य & gt; & LT; I4 & gt; 19 & lt; / I4 & gt; & Lt; / मूल्य & gt; & Lt; / param & gt; & LT; param & gt; & LT; मूल्य &

sql server - To lower case in PHP or MS SQL -

Like a weird question, I think that PHP is fast, but maybe someone knows better . The question is: A table with approximately 10k rows, varchar (550) field. The field is indexed. The selection of data is too many or -cases and scans such as for each condition. Running P> query with the PHP script. Would the lowercase search be faster for search substrings before running a query in the script? e.g. Regions ('% substring_100%') like <(>% Substring_1% ') or less ('% substring_2% ') or ... > or something like this: // $ substr_array has all the substrings $ condition = ""; Foreign Currency ($ substr_array $ as substring) {$ condition. = "Like field '%'. Mb_strtolower ($ substring, "UTF-8"). "% 'Or"; } $ Condition = substr ($ bet, 0, -4); $ Query = "SELECT * to table WHERE $ bet"; $ Result = query ($ query); This is an opinion based question, but still there is a qu

winforms - Using Firebase / Pusher / Pubnub for to-fro push notifications between .Net Desktop application and web application -

I am working on a system that has a .NET Desktop Winform application and a web application (REST API and HTML / UI based with JavaScript), I want to use one of the REST based hosted services (Firebase / Fisher / Pubnable) to establish a push notification based communication between these applications so that any user (or external system) Any changes made by Should be notified immediately for any other application. According to my understanding, the services hosted above with WebSocket-like systems, which are more suitable for browser-based communication. I thus need to understand that if the rest of the above mentioned scenarios are left to the rest Can be applied if using base-based services (Firebase / Pusher / Pubbon). Firebase, Pushar and Pabanab all provide a REST / Web API that will publish you Event / Data And in some cases the query state all these services provide a real-time API for taking and publishing data. Try using WebSockets and Fallback to use HTTP-based solut

How to use define in php -

I have an array with some key value pairs, which has been rewritten in the number of places in my entire project. Therefore, I want to define and use it in one place. array is array ('isValid' = & gt; 'wrong', 'message' = & gt; 'invalid login credentials, please try again'); I tried this way, but he has defined the ('ketchavilleiuserssevatspons', array ('isValid' = & gt; 'wrong', 'message' = & gt; Invalid login credentials, please try again ')); Define and use the array at the top, but how some values ​​are not available when I resonate any help really is appreciated. kCheckValidUserSuccessResponse ; P> Constants can only evaluate scalar values ​​ class error {public $ my_error1 = array ('isValid' = & gt; 'false', 'message' = & Gt; 'Please Invalid Login Credential, Please try again'); } $ Error = new error (); Print_r ($ error- & gt;

python - setup.icloud.com two-step verification -

I am playing with an open source app that lets you download iCloud backup and I was wondering how It is possible to implement two factor authentication. I have 2FF enabled on my account and what I get on the first request: First request: auth = "Basic% ("Setup.icloud.com", "POST", "/ setup / authentication / $ APPLE_ID $", "" "% base64.b64encode ("% s:% s "% (login, password)) authenticationresources = plist_request (" , {"Authorization": auth}) plist_request is just a normal python () function that requests url and returns a parsed xml The first response ( In xml format): I'm an iOS boy, not a backend man, but my backend team solved it in my favor Using an app-specific password instead of token. How can such a user create an app-specific password: Then just use the email and this password instead of token created by DSPRIID: mmaithtokan as i To learn, you do not need to encode ba

sql - Finding list of all the tables those use a common column -

I have a requirement where I need to find all the tables with a common column. My requirement is as follows: Example: A school teacher has been entrusted with many tasks for many divisions. Each partition is placed as a table. Therefore all the partition tables should have a column that can point to teacher ID. But the name of the column may be different. For East: Diva-educator ed, deviab-teacher id ...., Devon-teacher id There is also a table named Teacher which includes details of teachers. - Column Teacher ID (Primary Key) The teacher leaves school and the new teacher takes the place and takes the same role and responsibilities of the old teacher, so here we have all the dependencies with the new teacher The tables need to be updated. We may have a number of 100 tables. Therefore it is difficult to find all these tables manually. Do you have any queries, we can find all the tables that are dependent on this column, so that they can be updated with the new teacher I

jquery - Bootstrap : affix + carousel + spy does not work correctly -

I develop a new website (). I try to do it with bootstrap script (scraspi, carousel, affix). However, Safari does not work properly in Safari and Chrome: My page is - Header - Carousel - # Brand-menu (APII) - Landing page content: < Code> & lt; Body & gt; & Lt; Header & gt; & Lt ;! - Height: $ (window) .Hight () - $ ("# brand-menu") height () (before script) - & gt; & Lt; Section id = "carousel" & gt; & Lt; / Section & gt; & Lt ;! - height: 15 9px, apixt - & gt; & Lt; Div id = "brand-menu" & gt; & Lt; Div id = "brand" & gt; ... & lt; / Div & gt; & Lt; Navigation ID = "Menu" & gt; ... & lt; / Nav> & Lt; / Div & gt; & Lt; / Header & gt; & Lt; Section & gt; ... & lt; / Section & gt; ... & lt; Script & gt; // Memory Dollar ('# Carousel'). Carousel (); // scroll (159 sticky # is the height of th

html5 - Firefox ignores cache.manifest -

I'm trying to add offline caching to my HTML5 app. > & Lt; Html lang = "en" manifest = "cache.manifest" & gt; I've added the cache file name that looks like this: cache manifest # versionHash: fd30cdac1dd02ec2077dd5ca1b097369 #VersionTime: October 28, 2014 10:59:48 Cache: css / ebot.css js / ebot.js js / jquery.min.js js / actionlog.js images / arrow-right.js ... and so on - Almost 50 files ... Networks: getdata.php Emaillog .php uploadlog.php And now I'm testing it. It works perfectly fine in Chrome, though Firefox is simply ignoring the manifest parameter. When I look at the "Networks" tab in Dev Tool, the file cache.manifest does not load at all. I am using for debugging - and I can see that it is being cached in Chrome - eventually with "load". However, in Firefox, I'm looking into the console "Online: yes, event: checking" cache. JS: 30 repeated and "over, every second I c

html - Internet explorer 9 wrapped in div table, which consist of inputs, select/deselect bug -

Image
I have a table that contains input in the cell is a weird bug (in IE 9, After input into the input (or after selection / after unselecting), it has not been tested in any other IE versions - the parent div of the table starts to expand if overflow: auto; is set Property and if horizontal scroll is how it looks: Try selecting some rows in the table HTML: class =" maindiv "& Gt; & lt; div class =" gridwrapper "> LT; Table & gt; & lt; thead & gt; & lt; tr & gt; & lt; th & gt; column & lt; / th & Gt; & lt; th & gt; column & lt; / th & gt; & lt; th & gt; column & lt; / th & gt; & lt; th & gt; column & lt; / v & gt; ; & Lt; th & gt; column & lt; / th & gt; & lt; th & gt; column & lt; / or & gt; & lt; th & gt; column & lt; / v & gt; & Lt; Th & gt; Column & lt; / Th & gt; & Lt; Th & gt; Colu

android - UPC API Database Lookup -

I am writing a commercial app which estimates that 50,000 UPCL lookups per month will be required. For now, I'm just looking for a database that supports the UK / USA code. I've read some posts here that keep me going. However, this limit only searches for 1000 per day and does not guarantee any uptime. Many other questions about this subject are on SO few years old. I was wondering if anyone has any experience with a trusted UPC database? What we have seen another is that, but we did not have any trial of the UPC. Has anyone found the UPC database which supports the number of questions we ask and is reliable for both the UK and USA? I do not like to answer my own question, but there are about 14 million UPC's database and Charges 1000 dollars per 1000 requests (paid by paypal). They give 500 free lookups to test the system. It seems that till now I have tested the UK's UPC

c# - Can't resolve namespace while parsing a XML wih XDocument -

I need some help in parsing this XML. I get the following string and I need to get the value of "MensajeError" I have made it on physical tags but I do not manage to parse under XML var xDocument = XDocument.Parse (resultado) can; X-namespace soap = "http://schemas.xmlsoap.org/soap/envelope/"; Var xElements = xDocument.Descendants (Soapenby + "Body"). First () The tag that I tried to parse "" failed. I just need to retrieve the "Mentass Aror" tag Thanks! You can just use the local name: Var nodeValue = XDocument.Parse (resultado). Dscendants () First (n = & gt; n.Name.LocalName == "MensajeError"). value; // nodeValue = "error1"

ios - how to change uiview position, height, using swift programatically -

ओवरकोड फ़ंक्शन दृश्यडिडलोड () {super.viewDidLoad () bottom_round_view1.frame = CGRectMake (256,741,15,15) } यह काम नहीं कर रहा है। मेरी मदद करो। आपको IBOutlet के उपयोग के बजाय प्रोग्राम के नीचे bottom_round_view1 घोषित करना होगा

fiware orion - Context broker is not started: parameter header not recogined -

I am deploying contextual broker and when I use "-multi service" as the context-Broker_extra_ops option If I do, the reference broker does not start and there is no further information found. Can you give me a hand? I am using Reference Broker version 0.15.0 contextbroker -port 9999-logdir / var / log / contextbroker -pidpath / var / log / contextbroker / Contextbroker.pid -dbhost 127.0.0.17017 -db testdb1- Maximum service header log directory: '/ var / log / contextbroker' DEBUG @ 12: 59: 56 PA Config CPP [8 9]: Trace for '0-255 Setting Level 'DEBUG @ 12: 59: 56 PA Config CPP [8 9]: Skiping the function paConfig parameter' header 'is not recognized /etc/init.d/contextBroker I got a failure using /etc/init.d/contextBroker Start Starting up ... ReferencesBlock is closed Bringing Reference ... Cat: /var/log/contextBroker/contextBroker.pid: No such file or directory foundPidfile [FAILED] -Multiserve CLI parameter has been changed be

android - onScale and Canvas - how to adjust origin point after zooming image? -

Image
I have a very simple test app with a custom component - which shows a scrollable and scalable image (a board in Scrabble Represents the term of the game): < P> 1) I adjust the scale factor in the listener of my scale: Public Bullion on Scale (Scalgester Detector Detector) {mScale * = detector.getScaleFactor (); // XXX How to adjust mOffsetX and mOffsetY? XXX Blocking (); ConstrainOffsets (); Invalid (); Back true; } 2) And then in the drawing method of my custom component, I apply the translation and scale factor: secure entry onda (canvas canvas) {Super.onDraw (canvas); Canvas.translate (mOffsetX, mOffsetY); Canvas.scale (mScale, mScale); Gamebird.Setbound (0, 0, GameBoardedIntertricic Wideth), gameBoard.getIntrinsicHeight ()); GameBoard.draw (canvas); } Unfortunately, a small bug appears while scaling with a pinch gesture - I can see, scale and limitations are the right size after zooming, But the image is not offset. The problem gets worse, when the poi

javascript - Upload file automatically once browse without any button -

I need to browse and upload files. Here we have put a control to upload the file and to upload a button, click the button to upload the file. Now the task file is to upload automatically, without any button browsing the click event. Thank you Why do you upload files Do not try to handle the changing event of load? $ ("fileUpload"). Change (Tasks (Events) {......});

weblogic 10.x - java.sql.SQLException: Statement has already been closed -

सार्वजनिक वर्ग CpiDaoBase {संरक्षित कनेक्शन con = null; सार्वजनिक शून्य परीक्षण () {cpiDAOBase.openDbConnection (); Ps = नया cpiDAObase ()। Con.prepareStatement (INSERT_CARRIER); ps.executeQuery (); ... ऐसा ऐसा} सार्वजनिक शून्य openDbConnection () फेंकता CpiSystemException {try {अगर (चोर == बातिल || con.isClosed ()) {चोर = CpiDataSource.getNonTxConnection (); }} पकड़ (SQLException ई) {log.error (e.getMessage (), e); नया सीपीआईसिस्टम एक्सेप्शन ("क्यूलेक्साक्स्शन कॉन कॉस।" के कारण होता है: "+ ई.जेट मेसेज ()); }}} सार्वजनिक वर्ग CpiDataSource {सार्वजनिक स्थिर कनेक्शन getNonTxConnection () CpiSystemException {कोशिश थ्रो {if (nonTxDs == नल) {if (log.isDebugEnabled ()) {log.debug ( "nonTxDs रिक्त है"); } इस में(); } वापसी नॉनटीक्सडीज। कनेक्शन (); } पकड़ (नामकरण अपवाद ई) {लॉग। आतंक ("cpiPoolDataSource उपलब्ध नहीं है!" + ई); नया सीपीआई सिस्टम एक्स्प्शन फेंकें ("सीपीआईपूलडेटास उपलब्ध नहीं है!"); } पकड़ (SQLException ई) {लॉग। आतंक (&q

for loop after specific index with python not working -

Then I have a piece of code that is changing to data in the toplex through dataframe and before each value Runs again Tomorrow everything was working fine, but today, with some lines it is not leaving the first index and I do not know why. Here is the code: in the data for the rows .tartup (): r = int (lines [0]) in 1 rows I [1:]: c = Rows.index (i) print r, i, c, int (rows.index (i)), rows I have copied the print out of the first two lines of print The line works perfectly. There was a problem in the second row, what is expected is that 1 will be set for the first element, which increased the line [1], but instead 0 is. It is randomly happening through lines of dataframe. Does anyone have any idea why the first element is not left for the loop? 1 3 1 1 (0, 3, 27000, '1060', 'QMS', 'test' 'day', 'LMT') 1 1 3 1 27000 2 2 (0, 3, 27000, '1060', 'QMS', 'test', 'day', 'LMT') 1 2 27000 1 1060 3 3, 3,

go - Set a parameter as an interface or a list of interfaces -

I am doing a lot to go and there are some goodies which I have not yet received For example, I have a function that can be called in such a way: Avatar myVar.InitOperation ("foo", operator.acqual, "bar") myVar.InitOperation ( "Foo", include operator, [] interface {} baz ", 1," boo "} myVar.InitOperation (" foo ", operator.GREATER_THAN, 1) : < / P> func InitOperation (attr string, operator operator, value interface {}) {if operator.String () == "bar" {doSomething (attr, Operator, value)} and if (operator.string () == "include" {doSomethingElse (atri, operator, value)} // and in similar case} The thing is that when I pass a string or an integer, it goes well, but when I pass through an array, it is parsed as an element. In my function doSomethingElse , I get the value of value , and you seem to be y as a mother, I have an error OK, May include only value as [] interface {} and inte

shared libraries - where is .so file saved in android -

My application needs to work for a library. This is in the library. So the file in the raw folder looks for the first time that I run this application. That's why I save the file anywhere on Android device, because when I delete it, the file form library runs the application without any problem, but I want to check the application for some reason and I need to delete it . I know somebody can not find the file but where it is. File saved on Android?

c++ - How to infer automatically the size of a C-Array within a struct template? -

I have a question about how to automatically estimate the size of the C-arrays within a structure template. Coming from the world of embedded systems, I am interested in romantic strokes to save RAM. The deal is: I have many different structures like straight struct_1 {uint8_t const in variable1; Uint16_t const variable 2; }; In a structure template, I store a c-or holding structure elements and a pointer in the shape of that c-arrow. template & lt; Typnam T & G; Struct config_data {T const * const ptr_to_c_array; Uint8_t const array; }; Template & lt; Typename t, uint8_t array_size & gt; Constexpr uint8_t getArraySize (T (& amp;) [array_size]) {Back array_ size; }; Int main () {struct_1 const array_1 [] = {{2,5}, {1,9}, {20,20}}; Uint8_t const arraySize_1 = getArraySize (array_1); Config_data & lt; Struct_1 & gt; Const config_data_1 = {array_1, arraySize_1}; } This is my question: How do I create a struct template that is automatically

oracle11g - What does this stand for in oracle regex ? -

निम्नलिखित कथन ओरेकल रेगेक्स में क्या होगा? REGEXP_REPLACE (एक्स, '[[: अंक:]।]', '')

winapi - Concurrent File read write -

I am on a Win7 platform, I have a third party software that opens and writes a file. Before the process is over, I want to stop and see the data that goes to that file. Although the file is being loaded, it looks bigger in Explorer, so the data imo is being written. Of course, the use of any high (or low-level API I know, if it makes a difference, then I am writing it in Python) error "denied error" error 5 or "no access to the process file Because it is used by another process. "Error 32. What am I missing? Other apps allow you to access the file. When it opens / opens the file, it specifies sharing rights for the file. If you try to open the file, while it is already open, you are not compatible with sharing rights, using the flag, your open will fail. If you want to open the file for read-only access, it is necessary to share the file to read / enable another app. You can use a tool to see what other apps are actually using which sharing rights.

arrays - Why doesn't the sort function of javascript work well? -

यह साधारण जावास्क्रिप्ट var x = नया अर्रे (); एक्स [0] = 2.73; एक्स [1] = 11.17; X [2] = 3.12 x.sort (); के लिए (var i in x) चेतावनी (x [i]); परिणाम उत्पन्न करता है: 11.17, 2.73, 3.12 के बजाय 2.73, 3.12, 11.17 । क्यों वह है और मैं इसे कैसे ठीक कर सकता हूं? धन्यवाद अग्रिम! यह वर्णानुक्रमिक रूप से सॉर्ट करना, अपने स्वयं के सॉर्टिंग फ़ंक्शन को पार करने का प्रयास करें: var x = new Array (); एक्स [0] = 2.73; एक्स [1] = 11.17; एक्स [2] = 3.12; NumberSort = फ़ंक्शन (ए, बी) {वापसी a - b; }; x.sort (numberSort); के लिए (var i में x) {चेतावनी (x [i]); }

go - GoLang- PostForm request for updating one of the resources of Cloudfoundry App -

I write the code to access the cloudfoundry platform and to summarize the data of all the applications pushed on the cloud. I can access every app individually and display data related to each through a http.GET request, but I will update some special data Want to change / app an app? This sample data xzys has been an app called: { "metadata": { "guid": "71a3c77f-d2791232323-4b7625dq32908492b04f17e", "url ":" / V2 / apps / 71a3c77f-d2791232323-4b7625dq32908492b04f17e "," created_at ":" 2000-18-24 t "," updated_at ":" 2000-18-27T "}," unit ": {" name ": "xzys", "production": false, "space_guid": "65050bcb-81c6-45a2-b6ef-5e7097c7ece1", "stack_guid": "89a4fb19-08ef-4c44-90f7-f222a5699fdc", "buildpack": null, "detected_buildpack ":" Memory ": {}," memory ": 1024," e

list - QTP UFT - WinList.Select cannot select any line -

I need a QTF script which selects a line and income, the following code is given by recording the steps : window ("[Windowman]"). WinList ("list box") Select "[Name of Name]" But when I try to run it, I see an error box: does not recognize specific item of the list box object can. This does not work with any line. I can not even choose with an arrow key, the error is always the same. Before highlighting the script, highlight the WinList from the object repository, object to update the object property Can not be detected. Also, make sure that your screen is not diminished every time you run your script in the standard window.

Chef IIS cookbook default resource -

साझा कॉन्फ़िगरेशन निर्देशिका सेट करने के लिए IIS cookbook के साथ कार्य करना iisconfigsettings.rb ... default ['iis'] ['conf_dir'] = "# {आईआईएस ['होम']} डी: \\ कॉन्फ़िगरेशन" ... यह कॉन्फ़िगरेशन निर्देशिका को डी: \ कॉन्फ़िगरेशन में बदलना चाहिए। शेफ चलाने के बाद मुझे FATAL मिलता है: ArgumentError: डिफ़ॉल्ट संसाधन की घोषणा करते समय आपको एक नाम देना होगा। मुझे यकीन नहीं है कि नाम यहाँ निर्दिष्ट क्यों करना चाहिए। शेफ पर प्रलेखन के अनुसार, जो बहुत विशिष्ट नहीं है मेरा मानना ​​है कि मेरे पास यहां उपयुक्त पैरामीटर हैं। किसी को भी इस सेटिंग में अनुभव है? मुझे लगता है कि आपकी समस्या यह है कि आपका एक नुस्खा संदर्भ में डिफ़ॉल्ट विधि को बुला रहा है वह प्रकार डिफ़ॉल्ट के संसाधन बनाने का प्रयास करता है, और यह नाराज है कि आपने कहा संसाधन नहीं एक नाम दिया है। सच कहूँ तो, मैं वास्तव में वहाँ क्या हो रहा है, या जहां आप डिफ़ॉल्ट के प्रकार के साथ एक संसाधन मिला है, लेकिन सौभाग्य से समाधान सरल है, के बारे में थोड़ा चकित हूँ: Iisconfigsetting

php - try to extract data from string in structured format -

I am trying to parse some data in PHP, but I'm not sure what the data format is. It appears to be a type of JSON, but I'm not sure. Here's an example; "Name" "" "{}" group "" "{}" group "" trusted "}" J883Dd "{" name " "Foo Bar" "Reject" {} "" {} "Group" Regular "Allow}} I can add the person's nickname and group to my ID ( kFj394 < / Code> and J883Dd in this example) If anyone knows how I can complete it, or even What data format is this, I appreciate the help. Thanks. I do not know what your format is. It is definitely not JSON. Regular expression is probably your only shot: $ block = ''; // The text you pasted goes here. Foreach (['kFj394', 'J883Dd'] as the $ id) {$ nameSearchPattern = '/' $ id. ' "[\ N \ t \ s \ w {}"] *? Name "\ s +" (. +) "/ '; $

c# - the name "model" does not exist in the current context -

I have an ASP.NET MVC 5 application with some ideas. All my thoughts are working well, but one of them gives me an error at the top where I have the "model" for the @model X.Models.MyModel " Is not present in the current context " I am not sure why this is happening due to only 1 scene, what can help to resolve this issue? About the web .config file or some type? I just created a new strongly typed view and it seems to be working now in comment Greg And thanks for the hem

c# - Loading Multiple Scripts from IronPython, Executing, and allowing them to access functions in realtime -

I am currently working on my Bot which reads chats, and people use IronPython to script those commands , But currently I do not load this script ' , and if this happens, then it does not read commands or crashes completely. Here is the code: Public class ScriptEngine {Personal Static Script Engine E = Python. Cretegenine (); Private Static ScriptScope s = null; Public static async zero load () (if directory! Axis ("script")) Directory.CreateDirectory ("scripts"); S = e.CreateScope (); Var path = E. GetSearchPaths (); paths.Add ("Script"); e.SetSearchPaths (path); Directory.GetFiles (".", "* .py") .Olist (.) Identification (F => E.ExAtextfile (F, S));} } Public class ReadCommand {public string commandName {get} set;} public read command (string c) {c = CommandName;} public string read command () {while (true) {if (File.Exists (@ "logs \ current .log ")) {var ln = File.ReadLines (@" log \ current.log "

Updated to Java 8 and Eclipse failed to launch -

Image
I updated my java in 8.0.250 and after that I can not launch eclipse now. When I try, I get the following message: what happened and What happened to do it again to work? I had one problem, and resolved it by installing Java 8 of 64 bit (Automatic installer only 32 bit is capable of installing 64 bit.) If this does not help, then this post has a lot of information:

elisp - Emacs: use add-hook inside function (defun) -

if i do (ad-hook 'hascal-mode-hook (lambda (Setq Indent-Tabs-Mode T) (Setting Tab Width 4) (Message "OK"))) In my ~ / .emacs.d / init , then executes (lambda ...) when I enter Haskell-Mode . However, if I have a function like this: (hook-temode tiered) (Ad-hook hook (Lambda () (Satac Indent) -Tabs-mode temode) (Setac tab-width Twidth) (message "OK")))) and then later it ~ / .emacs.d / init. Call in el : (my-add-hook 'is Hascale-mode-hook T4) then nothing happens (Even "OK" message is not displayed). Is add-hook / a special function that can not be used within defun ? I have the per-project settings defined in a separate initialization file that detects the buffer name and adds (lambda () ... which is in the appropriate key mode (in the example above, Haskell Mode ); I want to reduce the vocabulary of code using a thin wrapper like my-add-hook , but I can not tell why < Code> Ad-hook is very difficult. ED

AngularJS ng-options sorting according to value -

"1": "A", "2": "B", "3": "I have data": I have the population in the selcet box as value for the value (key, value) orderbyy: 'value'" I mean that I want to sort it as a value or a key but in a proper way. Since the key string format is 1,12,123,2,23,224 I sorted out Try ordering the filter but that does not work. How to sort this sort There was an error like this; The possible solution can be found; $ scope.keys = function (obj) {back obj? Object key (obje): [];} and select an option tag in ng-repeat; option value = "" & gt; please select & lt; / options & gt; Lt; Option ng-repeat = "key in k (value)" value = "{{k}}"> {{Data [k]}} & lt; / Options & gt; What does this do with the $$ hash, and not the key, to order data with NGREPT?

c++ - vector push_back zero into an empty vector -

I had encountered the following property of std :: vector which I did not know and I Wondering if someone could make it clear to me. I think this code: int main () {int i = 5; Of vector & lt; Int & gt; Vector; While (i & gt; 0) {vector.push_back (i); - I }} A vector should be created with the following elements: 5, 4, 3, 2, 1 However, when I get the code, I run it over: 5, 4, 3, 2, 0 Going on to find out I have printed the vector at each stage and I get the following sequence: i = 5 - vector (0) i = i = 2 - vector (5, 4, 3, 0) i = 3 - vector (5, 4, 0) Li> i = 1 - vector (5, 4, 3, 2, 0) this A. I think that in some way the first cycle becomes zero (where should be 5) which is very strange if I say a big (n = 10) then the cycle is revised every time the last time. I do not understand what is happening, my guess is that there is something in buffer that takes you back before 5 and then it takes the push back and goes out of the cycl

javascript - Can't Use :not() Selector -

I am trying to make a tick-to-play game and I currently work on the aspect of choosing myself a box I'm doing, but when using jQuery: No selector does not work. function main () {// work $ ('. Cell: not (.block)'). Click ((color == 'g') {color = 'r';} and {color = 'g'}; ($ (this). $ (This) .addClass (color); $ (this) .addClass ('Block');;}}); // variable var color = 'g';} $ (). Ready (main); html {background color: black; white color; text-align: center;} .cel {border: 1px solid white; margin: 1px; width: 30%; height: 30%; } .g {background-color: lime;} .r {background-color: red;} #board {height: 500px;} & lt; script src =" https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js "& gt; & lt; / script & Gt; & lt; header & gt; tick tech Toe & lt; / header & gt; div id = 'board' & gt; & lt; div class = 'cell' & gt; & lt; / div & gt; &

javascript - using cv.readImage() with stream in nodejs -

I am trying to create something like this fascination with OpenCV and nodejs. I am already using Ubuntu and I am able to stream images from my webcam. Then it is my .js for the webcam var socket = io.connect (); Var FPS = 30; Socket.on ('connect', function () {$ (server server). Text ('connect')}); Socket.one ('connecting', function () {$ ('serverstats'). Text ('connect')}); Socket.one ('disconnect', function () {$ ('serverstatus'). Text ('disconnected')}); Var dropped = function (e) {warnings ('you have to enable webcams'); }; Window.URL = window.URL || Window.webkitURL; Navigator.getUserMedia = (Navigator.GetuSermedia || Navigator.WebKitGetUsermedia || Navigator.MozGetUsermedia || NavigatorMMSGetUsermedia); Var video = document.query selector ('video'); If (navigator.getUserMedia) {navigator.getUserMedia ({video: true}, function (stream) {video.src = window.URL.createObjectURL (stream);}, dropp

php - Zend Framework 2 get identity in view helper -

I need to display the amount of user cart on each page of the e-Shop app. To achieve this, I have created a visual assistant, but I do not know how to get the identity of the user ... Appreciate your help Normally a Dependency injection examples will be required here, but in this case, $ this-> view-> identity () (by calling the Identity view assistant) you should give the time that is after you.

How can I modify/update a java.net.URI object? -

Looking at an object, let me either: Destructively modify (such as path component). Although there are no setX methods, it seems that these objects are irreversible. Create a new URI object which is similar to the original ("Functional Update") except for a given field although there are no withX methods , So I have to write my own logic to deal with this. Do I really need to write my own work to deal with? URI with the amendment of objects? Yes, you can create a new object every time java.net.URI is irreversible. You can use third party classes such as Apache HTTP Components. Example: URI Yuri = new URLIBiller () .setScheme ("http") .setHost ("UP") .setPath ("/ search"). Sitemap ("Q", "httpclient") .setParameter ("BTNG", "Google search"). Sitemapator ("A", "F") .setParameter ("Oak", "") .build (); // Build method creates a new URI ex

vbscript - Wscript: Where is the logo located? -

I do not care when executing those two lines of batch file code Wscript Test.vbs Wscript // Nologo Test.vbs Where is the logo located? Although your question is not clear, let me tell you the concept of logo / noloo < Pre> // logo When a script runs under CScript (this is the default setting for WSH) then displays a logo. Logo, which appears before any output from the script, looks like this: Microsoft (R) Windows Script Host Version 5.6 Copyright (c) Microsoft Corporation 1996-2000. All rights reserved. // nologo prevents the display of the logo at run time (by default, the logo is displayed). // Nologo option is often used for scripts, whose output is redirected to a text file. Pressing the logo ensures that this information is not visible in the text file. It is easy to write scripts that parse the information found in the text file or which import the contents of the file into the database, because these scripts do not have an account for the log

c# - Missing packages while creating a diagnostic analyzer using Roslyn -

स्पष्ट करने के लिए: मैं Visual Studio 2013 Ultimate, Update 2 का उपयोग कर रहा हूं < p> मैं एक नैदानिक ​​विश्लेषक रोसलिन का उपयोग कर बनाने के लिए कोशिश कर रहा हूँ एक नैदानिक ​​विश्लेषक (स्थित के लिए नमूना कोड वाणी इस तरह से इस तरह के एक विश्लेषक:। [DiagnosticAnalyzer (LanguageNames.CSharp)] आंतरिक वर्ग DiagnosticAnalyzer: Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer हालांकि जब मैं इस पुनः बनाना मैं DiagnosticAnalyzer में वर्ग नहीं मिल सकता है की कोशिश < कोड> Microsoft.CodeAnalysis.Diagnostics (हालांकि IDiagnosticAnalyzer एक ही नाम स्थान में मौजूद है)। StackOverflow पर यहाँ कुछ नमूने के बजाय (जैसे) [DiagnosticAnalyzer] [ExportDiagnosticAnalyzer (DiagnosticId, LanguageNames.CSharp)] आंतरिक वर्ग DiagnosticAnalyzer: ISyntaxTreeAnalyzer हालांकि इस मामले में मैं नहीं ExportDiagnosticAnalyzer विशेषता ई। ऐसा लगता है कि मुझे एक विधानसभा याद आ रही है NuGet का उपयोग करके मैंने निम्नलिखित पैकेज स्थापित किए हैं: & lt;? Xml संस्करण = "1.0

ios - UISearchBar triggered functions -

मेरा पूरा ऐप इंटरफ़ेस प्रोग्राम के अनुसार ViewController.swift से बना है दृश्य UISearchBar है। जब अपने कोड को चलाने के लिए UISearchBar पर टैप किया जाता है, तब कुंजीपटल का खोज बटन दबाया जाता है और जब UISearchBar का कार्य करता है, तब कार्यों के नाम क्या हैं I ओवरराइड रद्द करें बटन दबाया जाता है? अगर वे मौजूद नहीं हैं, तो क्या मैं उस समय अपने स्वयं के कार्यों को गति दे सकता हूँ? आप अपने दृश्य नियंत्रक के साथ अनुरूपता जोड़ना चाहेंगे: एक्सटेंशन व्यू नियंत्रक: UISearchBarDelegate {func searchBarTextDidBeginEditing (searchBar: UISearchBar) {/ / ...} func searchBarSearchButtonClicked (_ searchBar: UISearchBar) {// ...}} और फिर स्वयं पर खोज बार का प्रतिनिधि सेट करें। < / P>

javascript - Gridster not appearing under jQuery variable -

I'm using Gridster to render the layout of tiles in my app, using nodebaby as the base I am doing The code is as follows: & lt; Script src = "/ jquery.js" & gt; & Lt; / Script & gt; & Lt; Script src = "/ gridster.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ .noConflict (); Gridster ({widget_margins: [10, 10], widget_base_dimensions: [175, 175], serialize_params: function (wi, wgd) {console.log ($ (wi)) .attr ('id')); Return {id: $ (wi) .attr ('id'), col: wgd.col, line: wgd.row, size_x: wgd.size_x, size_y: wgd.size_y};}, dragable: {start: work () {Dragged = 1;}, stop: function () {setTimeout (function () {drag = 0;}, 5);}}});}); & Lt; / Script & gt; As you can see, I have a & lt; Script & gt; I've tried to start Gridster in the tag, but when I run it I get: While trying to use Gridster ( $ ('.gridster ul') < Previous> UnkitType Error: There is no unde

java - Creating setColor method without parameter being passed? -

I am working on a homework project for an introduction to Java course. In order to organize the calling methods and functions, we have to modify two colors of the balloon objects S1 and S2 and using the methods in a separate Java class, modify their color and height. All I have is fine, but not quite right Assignment requirements list the list of announcements of the sheet and can not be changed, only the code inside them can be. The method that is used to change the balloon color is to be made as public void setColor () . I do not understand this, though. I am using public zero set collar (string color) for now. How can I change the property of the color of a balloon object without passing anything from the settler method? Public Zero Set Collar () {int red, green, blue; Red = green = blue = 0; Random random = new random (); Int high = 255, less = 0; Red = random.nextInt (high-low) + less; Green = random. NXIT (high-low) + less; Blue = random.xitINt (high-low) + less;

vb.net - Determine if all members of a list are unique -

I searched and found a number of answers about finding and / or removing duplicates from a list and found. I would be able to adapt any of these to my specific need, which is to find only that there is more than a unique value in the list of integers. However, it seems that there is a problem in my project. All the answers I found, using all the specific () or GroupBy () , which have been added to all the extension methods in .NET 3.0. I have verified that the target framework of the project is set to 4.5, and all the system references in this project are 4.0.30319. I get an error is not a member of the 'distributed' system. Selection. Generic The list goes (for integer) ' The same group goes to the group, selection, etc. Why am I not using these methods? As I said in the comment, LINQ requires that you include the library. Do not forget it For future skirmishes, you do this by typing it: Import system.log The best happens to us. : D

javascript - iframe dynamic height doesn't work -

I have created a small widget that is basically a php file that contains an HTML AJAX based form. The height of the form depends on the production of AJAX reaction text. Therefore, I need to change the speed dynamically. I tried to do this with some code and it actually works well, but only on the local host file. This code works: & lt; Iframe src = "ajax / cfw.php" id = "idIframe" width = "400px" onload = "iframe loaded ()" style = "border: none;" & gt; & Lt; / Iframe & gt; & Lt; Script type = "text / javascript" & gt; Function iframeLoaded () {var iFrameID = document.getElementById ('idIframe'); If (IFFROMId) // Here you can make the height, then I delete it first, then make it again the IFrameID. Hect = ""; IFrameID.height = IFrame Iocentent Window.document.body.scrollHeight + "px"; }} & Lt; / Script & gt; However, when I try to IFrame the exact file I po

scala - How to return an option when reading a vector -

Reading from a vector, I do not want to return anything while trying to read an index, which is not anything else Is there any standard way to do this? you lift : val V = Vector (1, 2, 3) v.lift (0) // some (1) v.lift (5) // none for any partial function Note the work.

javascript - turn off event listener after triggered once -

I have a script that triggers popup box that provides free downloads, it starts when someone The user's mouse leaves the page (obviously not for mobile - I already have a work solution for that). In my script I set a cookie to deactivate the script for 30 minutes, and that part works; Popovar does not appear again if I refresh the page. The problem is that if a popover closes the box, and the page has not refreshed (or navigated to another page on the site), the popover gets out of the mouse page every time . I am using a function that sets an event, but I can not do it only once in the fire. (The WordPress site I'm working with is using jquery ver = 1.10.2). My Javascript: if (Document.cookie.indexOf ('somecookiename')! = -1) {function addEvent (obj, evt, fn) {if (obj.addEventListener) {obj.addEventListener (evt, fn, false); } And if (obj.attachEvent) {obj.attachEvent ("on" + + evt, fn); }}}; JQuery (document) .ready (function ($) {if (document.c