Posts

Showing posts from May, 2014

How do I update a single row in a SQL Server database? -

How can I update a line? I have a SQL Server database of 34 rows fe SYSTIMESTATE (14.10.2014 08: 01: 15: 000) and I will replace it with (04.11.2014 08 : 01: 15: 000) How can I do this? Statement is SELECT with the statement UPDATE : select from EXDOCS * where SYSTIMESTATE = '14.10.2014 08: 01: 15: 000 '' set the update EXDOCS SYSTIMESTATE = '04 .11.2014 08: 01: 15: 000 'WHERE SYSTEMSTATE = '14 .10.2014 08: 01: 15: 000' Also learn how to come up with a solution:

MySQL how to use SET type to select records where a SET contains one or more items from another SET -

I have a table called 'recipes', which is listed in a SET type called 'content', all food items Table of Recipes ID (int) A recipe (a small piece of special ingredients for recipes Numbers are restricted to use). Contents (text) Content (SET) I have another table called 'food_type' in each record for a 'name' field (eg 'fruit', 'poultry' 'Masala', 'Meat', ...) and 'Item' is a SET type that holds content related to that food type. As for the 'fruit', the SET record can be 'apple, orange, pear, banana' food_types table ID (p) Item (SET) My problem is how to create a MySQL query that sets the 'item' set in the 'Content' set From the 'recipes' table with one or more items, select all the records. Then my question may be in English: 'Select all the recipes where there is one or more fruits in the content' Does any MySQL A good way to do this...

seo - Google Sitelinks Search Box -

For some reason, the name of our company ("") does not produce the search box in search results (though We do sitelinks.) We're adding schema markup as a schema, but we are not sure about this: Adding the code will show the search bar (or less) ), Or it only changes the search box's functionality (on-site search) for those search results Is the person who is already showing the search bar? This is only in search of search bar search (on on-site search) which is first Showing only a search bar from As told here: The search box is not being displayed? The sitelink search box appears only for shipping queries and when relevant to users. Uses many factors to determine when the information given on the site and various types of navigation queries come to the Google algorithm box.

objective c - Security scoped bookmark stopped working on Yosemite 10.10 -

I am using the following code to generate security scanned bookmarks. It worked fine on 10.8 and 10.9 but stopped working on 10-10. What will I check about the loss? NSOpenPanel * panel = [NSOpenPanel openPanel]; [Panel sethold: Multiple selection: No]; [Panel set communicates directory: yes]; [Panel SetCancoFile Files: No]; [Panel cetarsolveelse: yes]; [Panel setcanetcreatories: yes]; [Panel setTitle: @ "Choose a directory as your input folder"]; [Panel set lighting: @ "select"]; NSInteger Results = [Panel Run Model]; If (Results == NSFileHandlingPanelOKButton) {NSURL * urlPath = [[Panel URL] ObjectItindex: 0]; NSError * Error = Zero; NSDTA * Bookmarks = Zero; Bookmark = [url path bookmarket dataupport: NSWLMicroRank activationSpecial resource including security vulnerabilities: zero relative: url: zero error: & amp; Error]; If (error) {[NSAPP present: error: error]; } BOOL BookmarkDataStastStale; NSURL * url = [NSURL URLByResolvingBookmarkData: Bookmark...

Detect if there is Microsoft Access installed on the computer and the version of Microsoft Access c# -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर मुझे ग्राहक द्वारा अनुरोध किया गया है पॉइंट ऑफ़ सेल्स सिस्टम बनाने के लिए और मैं स्थानीय डाटाबेस (माइक्रोसॉफ्ट एक्सेस 2010) का उपयोग कर रहा हूं। तो, मैं यह सवाल सोच रहा हूं: माइक्रोसॉफ्ट कंप्यूटर पर स्थापित और किस संस्करण में प्रवेश किया गया? एक तरह से (bitness को मैच की आवश्यकता है) : प्रकार एक्सेस = प्रकार। GetTypeFromProgID ("Access.Application"); अगर (प्रवेश! = नल) {गतिशील पहुंच = उत्प्रेरक। बनाना (पहुंच); स्ट्रिंग वर् = एक्सेस। संस्करण; }

Rails : devise and best_in_place -

I am using rail and am ready to authenticate (username - email-password), for the user The best_in_ location is used to edit other attributes (profiles), but when I update field properties, it is not saved even if I reload the page (this is not a jquery problem ), So what should i do Are you configuring device parameters before the update? Add something to your ApplicationController: before_filter: update_sanitized_params, if :: devise_controller? Def update_sanitized_params devise_parameter_sanitizer.for (: sign_up) & lt; & Lt; : Name devise_parameter_sanitizer.for (: account_update) & lt; & Lt; [: Name: avatar, remote_overa_arla] and Your update action does not work, another reason may be that, you do not allow additional fields in your profile controller Are there. def user_params access = [: name,: email,: age ...] # Expand with your own parameters .require (: user). Passed (accessible) end I hope this will help.

javascript - How to store D3.js pie chart in database directly -

I copied and pasted a D3.js based pie chart example code from Oreli eBook. I have modified it so that I can keep the data in run time. Its work is absolutely fine. But now I am facing a problem because I want to save this code from my data in my database. But I do not know how to do it. I searched it on the internet but I could not find anything. If you have any suggestions then it will be helpful to me. This is a link to the Oreli Book Piech Code.

php - not getting user name and id from database in codeigniter -

I have changed my code and I am getting user email and password, but can not get name and id? What's the problem? Plus I'm getting an error undefined index ID and name? Public function login () {$ users = array ('email' => $ this-> Input-> Post ('email'), 'password' = & Gt; This-> Input-> Post ('password'), TRUE); $ Users ['password'], 'name' = & gt; $ Users ('count ($ users)) {$ my_data = array (' email '= & gt; $ users [' email '],' password '= & gt; $ users [' name '],' id '= & Gt; $ user ['id'], 'login' = & gt; TRUE); $ This- & gt; Session-> Set_user data ($ my_data); Var_dump ($ my_data); }} This is my var_dump 'session_id' = & gt; String 'fa71c96123ea05c8c10ec8c49d125f5c' (length = 32) 'ip_address' = & gt; String '127.0.0.1' (length = 9) 'user_agent' = & gt...

php - Front Page Displays in wordpress -

I have two pages in WordPress, a home page and the other is a blog page for blog posts. This is the thing when I Settings-> gt; Reading there, I select the second option in the front display option, which is the Static Page In that setting, The front page option for the page is selected and the blog page of the post page is empty. In addition, I have this option display on the front page, my posts ** do not appear * on the home page that I have created but when I leave the front page blank and I I select the post page as a home page, then it works. Please, if someone knows what I have to do, I appreciate it.

detecting UML relationships from java source code -

My program is easily run through source code and I can detect that easy relationship like implementation or legacy Where the classroom can be searched from, the class is defined, however, I have stuck something with ideas about finding other relationships, such as a union with another class or a union with another class. So far I have tried to parse the code and where it is said to seek other methods but I am not sure about an exact code definition of these relations Sorry if I am being ambiguous then I can try and understand better if you do not understand, tell me in the comment. The problem is that there is no concrete definition to translate into Java class relationships, dependencies, and aggregations. You should set the rules on your own, only check them against the UML standard. I will give the following advice: UML Java dependency A-> B class A reference in class B association A-> B class A reference (which can be referenced) (this recurring Examples of ...

how to add mongo option configuration to spring -

मेरी मॉन्गो कॉन्फ़िग इस तरह दिखता है & lt; beans xmlns = "http: // Www.springframework.org/schema/beans "xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xmlns: संदर्भ =" http://www.springframework.org/schema/context " Xmlns: मोंगो = "http://www.springframework.org/schema/data/mongo" xsi: स्कीमा स्थान = "http://www.springframework.org/schema/beans http://www.springframework.org/schema / बीन्स / साइप्रिंग- बीन्स.एक्सएसडी http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/ स्कीमा / डेटा / मॉन्गो http://www.springframework.org/schema/data/mongo/spring-mongo.xsd"> & Lt; बीन आईडी = "मोंगो" वर्ग = "कॉम। मैंगोडब। मोंगो" & gt; & Lt; constructor-arg नाम = "addr" ref = "address" / & gt; & Lt; कन्स्ट्रक्टर- आर्ग नाम = "विकल्प" रेफरी = "विकल्प" / & gt; ...

objective c - Initialize an image from a given path in swift? -

I object> This code selectedImage = [[NSImage alloc] initWithContentsOfFile: [_the path path]]; If (selectedImage.size.width & lt; selectedImage.size.height) {imageProportion = selectedImage.size.height /selectedImage.size.width; [Selected image set size: nsmcases (690.0, 690.0 * imagepropation)]; } Other {imageProportion = selectedImage.size.width /selectedImage.size.height; [Selected image set size: nsmcases (690.0 * imageproportion, 690.0)]; } [_imageEditorWindow orderFront: nil]; [_imageViewEditor setFrameSize: NSMakeSize (selected image size.width, selectedImage.size.height)]; InitialImageSizeH = Selected Image.size.height; InitialImageSizeW = Selected Image.size.width; [_imageViewEditor setImage: selectedImage]; [_imageViewEditor setFrameOrigin: NSMakePoint (45, 35)]; If I write this code in Swift using the playground, but I get an error: var selectedImage = NSImage (byReferencingURL: NSURL (string: "/ users / admin / desktop / 10658771_575156615924178_825...

javascript - Drag and drop inside an image with kineticjs -

I want to drop a star on a tree and find out which tree has been dropped, so I In the end I can choose it by highlighting But I could not get more than just going to Star. I chose for Kinetic because it works with the touchscreen, so I probably do not want to use anything else. (Unless it works with both touchscreen and mouse) This is my JavaScript: & lt; Script defer = "defer" & gt; Function drawImage (imageObj) {var platform = new kinetic.stage ({container: "star", width: 900, height: 500}); Var layer = new kinetic Layers (); // star by star = new kinetic Image ({Image: Image Obj, X: 376, Y: 30, width: 40, height: 46, drag-able: true, draw: wrong}); // Add cursor style star.on ('mouseover', function () {document.body.style.cursor = 'pointer';}); Star.on ('mouseout', function () {document.body.style.cursor = 'default';}); Layer.add (star); Stage.add (layer); } Var imageObj = new image (); ImageObj.onload = function...

javascript - How can I change the text of a DIALOG button after initialize? -

I wrote a dialog definition, but the name of the buttons depends on the situation. When I open the dialogue, I want to set the button name. Here is my dialog code: $ ("#neueFrage") .dialog ({resizable: how to change the name of dialog button after defining it) False, autoOpen: false, height: 900, width: 1100, model: true, passOnScope: false, open: function (event, UI) {$ (".ui-dialog-titlebar-close"). Button: [{text: 'SAVE', class: 'dialogbutton', click: function () {}}, {Text: 'CANCEL', category: 'dialog box', click: function () {}}]} ); I communicate with this small code sample. If 'yes', everything is fine, but if not, then I want to change the name of the button for 'REDO'. if ($ (this) .text () == "yes") {$ ("#neueFrage") .dialog ("open"); } Else {// Open Dialog $ ("#neueFrage") .dialog ("open"), change the button 'save' to 'radio'; } ...

Using Capistrano To Run mySql Command -

I'm trying to use capistrano to run a mysql command. If I run my local terminal then mysql -u & lt; Username & gt; -P & lt; Password & gt; -H & LT; Server IP & gt; & Lt; Database Name & gt; It connects to mysql and is ready for command. If I run it in a Castrene task .... "Mysql -u ", & lt; password & gt; -h & lt; server ip & gt; & lt; execute database name & gt; " If it goes without fail and just hangs there does it mean Is that connected and waiting for an order? If so, how do I provide command? mysql The command line client has a few different ways, About the question command line it can accept them with the - execute / -e flag: mysql --execute 'SELECT * FROM tbl' --user = User dbname or it can accept them from pipe or file redirection from STDIN : echo 'SELECT * FROM tbl '| Mysql --user = User dbname # or: mysql --user = user dbname & lt; File_conta...

php - Extracting values from JSON iOS -

I am developing an app that communicates with my own server (Apache-> PHP) and I have a simple The JSON dictionary is sending the PHP code for the app from the server: $ aJSON = array ('result' = & gt; true, 'Result_Msg' = & gt; "success !!!" ); Echo json_encode ($ aJSON); I want to extract values ​​from the keys with these lines of code: 'Result' and 'Result_Msg': // Receive logging and converted JSON / NSMutableDictionary NsLog (@ "rectangle =% @", DJSON); BOOL B = [DJSN ObjectForcae: @ "Response"]; NSString * string = [DJSON ObjectForcae: @ "Result_Msg"]; NSLog (@ "% @", [DJSON ObjectForcae: @ "Respapsation"]); NSLog (@ "% @", [DJSON Manfurky: @ "Response Mags"]); NSLog (@ "% @", [DJSON Manfurky: @ "Response"]); NSLog (@ "% @", [DJSON ObjectForcae: @ "Response"]); And my printed / logged in JSON result look...

javascript - jquery and a value of a var -

I wrote this code in jQuery, it's working perfectly, but I want to start index number 1 the wanted. How can I do this? This is my code: $ ("span.text") .each (function (index) {console.log (index + ":" + $ (this) .attr ('name ')) Var microcorrect = $ (this) .attr (' name '); $ ("span.lista a # caracter_" + index) .append (micaracter);}); Then just do the basic programming method, add one with zero-based index, $ ("span.lista a # caracter_" + (index + 1)). Attachment (microcracker);

indexOf() when array-elements are objects (javascript) -

For example, a variable in the name of the arrayElements type contains: [html] {id: 1, value: 5}, {id: 2, value: 6}, {id: 3, value: 7}, {id: 4, value: 8}] . How do I get the position of the array element with the id === 3 addition to using the loop in the arrayElements variable Do you? Thank you. You should have a loop at a point. But you can see that you are not looping " snippet-code-js lang-js prettyprint-override "> function indexoffrollback (ARI, callback, startendex) {if (type of startIndex == 'undefined') {startIndex = 0; } (Var i = startIndex; i & lt; arr.length; i ++) {if (callback (ARE [i])) {return i; }} Return -1; } Var array = [{id: 1, value: 5}, {id: 2, value: 6}, {id: 3, value: 7}, {id: 4, value: 8}]; Search on // id === 3 console.log (indexOfCallback (array, function (obj) {return obj.id === 3;})); // search at value === 6 console.log (indexOfCallback (array, function (obj) {return obj.value === 6;})); As Anthony...

"Unable to re-open an already closed object", when reading data from sqlite android -

itemprop = "text"> In my Android app, I am using SQLite database but when I use a query to read data from SQLite So, I get an error. This is my code to create the table. package com.example.mydb; Public class Dbadapter {Private static final string DATABASE_NAME = "mydb"; Personal Static FINAL END DATABASE_VERSION = 5; Private static final string DATABASE_TABLE18 = "modalation_medicine_table"; Private static final string MOD_ID = "modalation_previousss_id"; Private static final string MOD_MED_ID = "modalation_medicine_id"; Private static final string MOD_MEDICINE = "modalation_medicine"; Private static final String CREATE_DATABASE_TABLE18 = "Table does not exist to create" + DATABASE_TABLEl8 + "(" + MOD_MED_ID + "integer primary key autoincrement," + MOD_MEDICINE + "text" + MOD_ID + "integer" + "foreign key ( '+ MOD_ID + ") reference" "+ DATABAS...

java - GXT 2.2.5 give ugly page -

मेरी परियोजना: जीडब्ल्यूटी 2.3.0, जीटीटी 2.2.5 सर्वर: ग्लासफ़िश 4.1। आईडीई: प्लगइन जीवाट 4 एनबी के साथ नेटबींस 8.0.1। मैं केवल जीएमटीपी परियोजना बनाने की कोशिश करता हूं, लेकिन जब मैं अनुप्रयोग चलाता हूं तो मुझे केवल लेबल वाले पृष्ठ देता है और बटन html जैसा दिखता है अगर मैं स्लाइडर या अन्य घटक जोड़ना चाहता हूं - ब्राउज़र यह प्रदर्शित नहीं करता (मुझे लगता है कि कोड html, css आदि का संकलन नहीं था)। मैंने जो कदम उठाया है चरण 1. नई परियोजना बनाएं: वेब एप्लीकेशन एंड टेक्नोलॉजी: जीडटी। 2. क्लासपाथ जीसीसी.जर के लिए लाइब्रेरी जोड़ें 3. जीटीटी से अपनी परियोजना में युद्ध फ़ोल्डर में संसाधन जोड़ें 4. इसमें और लेफ्टिनेंट जोड़ें; Com.extjs.gxt.ui.GXT '& gt; से Main.gwt.xml को जोड़ें 5. & lt; लिंक जोड़ें rel = "stylesheet" type = "text / css" href = "संसाधन /css/gxt-all.css "/> html मुझे लगता है कि समस्या यह है कि आपका gwt ऐप्स gxt-all.css को लोड नहीं कर सकते यह gxt-all.css फ़ाइल को शामिल करने के कई तरीके हैं: वेबफ़ॉक फ़ोल्डर में एक नया...

Intellij Java/Scala: Delete to delimiter? (like Emacs Paredit) -

Emacs is one of the terrible characteristics of "paredit" mode that is Lisp-like as well as other languages ​​such as Java / X. Scala has the ability to kill only Ctrl-K (kill), and it will manipulate the text until it is cleverly delimited, which can be a close quote mark or a closing brace / paren / square-bracket. While keeping your things in verbally valid, it is necessary to remove things as necessary, that means it will remove the correct number of correct closure feet / braces etc. Is there any such action or keyboard shortcut in Intellij IDEA? Or how would I define a macro to do this? I have a solution that works almost: Record Macro Sequence (Mac binding): Maximize selection (alt above) Maximize selection (Alt top) Right with selection (Shift RightArrow) Cut selection (CMD X) Then I'm tapping this macro with Ctrl-K, it works great, eg. (The vertical bar is the state of the carat when it is applied): List ("first", "second...

Trouble opening Excel document via python -

I am not a very advanced Python user and I am having trouble with that program on which I am working . I was able to work it out without problems on a computer, but now when I try to run on another computer it is not working. Actually I'm trying to open an Excel file and write stuff and then save it. Here is the error traceback (most recent call final): File "C: \ user \ aainstall \ Desktop \ Python \ DD \ DDcreatemachesheets10_27_14.py", line 70 , & Lt; Module & gt; Wb = excel.Workbooks.Open ("Allmacro.xlsx") file "C: \ Python 34 \ lib \ site-packages \ win32com \ gen_py \ 00020813-0000-0000-C000-000000000046x0x1x7 \ Workbooks.py", line 78, Open, converter, addToMru, local, corrupted load) pywintypes.com_error: (-2147352567, 'Exception happened.', (0, 'Microsoft Excel', '' Elmacro.xslsex ''.) Check the spelling of filename, And verify that the file location is correct. \ N \ nIf you are trying to open...

c# - .NET 4.5 Semaphore WaitOne(0) doesn't block, but decrements semaphore count -

On top of .NET 4.5 if I use the WaitOne (Int32) method on some objects of the Sacchar class (or - usually - WaitHandle class) As its logic with 0 (zero), it does not block and can be used to test the current status of the sequence: "If millisecond timeout is zero , Then the method is not blocked. Wait and handle immediately. " For me it is very deceptive (or Ramak too), because it does not block, but it decreases the marginal count of one, so if I use it like this: if (! MySemaphore.WaitOne (0 )) DoSomething (); So it can reduce my semaphore (if true), which is unable to run the other thread. So we can not use this to test the situation of Simraff. Should be the correct use if (! MySemaphore.WaitOne (0)) DoSomething (); Otherwise my face Release (); So it does not test the condition of Sikandra only! correct? Correct, this not only tests the state of Sikandara, will be a better word If millisecond timeout is zero, then the method is not blocked. Th...

oracle - How to execute procedure in APEX SQL script? -

I understand how to use several processes in the APEX SQL script. I do not really need a stored procedure before, but it's not sure how to declare simple processes in APEX SQL scripts. So this is my endeavor: DBMS_UUTUPT Forming or changing methodology test 1 as the beginning of NABLE; Dbms_output.put_line ('test1'); End; Execute Test 1; This gives me an error: Error in line 7: PLS-00103: Symbol "EXECUTE" Question - How to create regular / not stored / processes in a SQL script and then call them. What does entrepreneurship mean in the APEX SQL script? UPD (for the first time I completely understand the wrong question ) The correct version of a script: To create or change the process test1 start DBMS_ OUTPUT. ; Dbms_output.put_line ('test1'); End; Start / Test 1; End; / Say that script can include SQL and PL / SQL commands. Older version (Cancel here) In the APAC pages you have the PL / SQL anonymous block for examp...

python - "Unblock me" puzzle representation -

I'm trying to implement a program that fixes the "Unblock" puzzle. People who do not know this, "Unblock me" is a sliding block puzzle where you have a board with 1x1, 1x2, 2x1 and 2x2 boxes and take the goal out of the board through the opening of the red box is. My question is how can I show a board state? I searched through the internet and found a suggestion to represent the state in this way. For example this board: Representation: How I can understand this representation works. The problem comes when I want to move a box. How can I check if the box is 1x1, 1x2, 2x1 or 2x2, to check if the desired move is possible or not? How can I do this, or any other "easy" representation? I do: Grid width The height of the grid The list of boxes, and for each box: The dimensions of the box (no square or rectangle) Box width The height of the box Each cell Position the top-left cell, so the coordinates (X, Y) The name of th...

java - Jackson JSON processor failure -

मेरे पास कक्षा में एक विधि है: सार्वजनिक MyClassMyObject (गतिविधि गतिविधि) { MyClass myClass = नल; कोशिश करें {myClass = नया MyClass (); साझा किए गए संदर्भ prefs = activity.getApplicationContext ()। GetSharedPreferences ("myClass", Context.MODE_PRIVATE); स्ट्रिंग वरीयताएँ = prefs.getString ("myClass", "0"); ऑब्जेक्टमैपर मैपर = नया ऑब्जेक्टमापर (); बाइट [] byteTemp = mapper.readValue (वरीयताएँ, बाइट []। वर्ग); ByteArrayInputStream = नए बाइटअरेइनपुटस्ट्रीम (बाइटटेम्प) में; ObjectInputStream = नया ObjectInputStream (में); MyClass = (MyClass) is.readObject है (); } पकड़ (जेसन पर्स ईक्सेप्शन ई) {} कैच (आईओई एक्सप्शन ई) {} कैच (क्लासनोटफ़ाउंड एक्सपेशेशन ई) {} मायक्लस पर लौटें; } निम्नलिखित अपवाद मुझे मिल रहा है java.lang.NoClassDefFoundError: असफल संकल्प: Lcom / fastxml / jackson / databind / objectMapper; मैं उपयोग करता हूं: जैक्सन-कोर-2.4.2.jar जैक्सन-एनोटेशन-2.4.2.jar जैक्सन- databind-2.4.2.jar मेरे ऐप का लक्ष्य एंड्रॉइड 5.0 है। धन्य...

Python calling a (fortran) library that uses MPI -

I would like to call and call a library which uses MPI, I think that each rank has its own version of the library Loads and then the library will communicate with each other. I do not want to do any communication or MPI handling with the library collar. Python code will not be the same if I load a library that uses an MPI or a library which uses openmp for example. MCA Base: Component_find: unable to open the / usr / lib / openmpi / I manage to make it work when I dynamically load and library calls C but failed with Python Lib / Openmpi / mca_paffinity_hwloc: Probably unavailable symbol, or compiled for a different version of Open MPI? (Ignored) [..] It seems that opal_init has failed for some reason; [..] failed opal_shmem_base_select -> the value -1 OPAL_SUCCESS instead ompi_mpi_init: failed orte_init -> Back "Error" (- 1) Instead of "Success" (0) [..] I wonder what to do with the dragon Is there anything like copyping the dragon with...

jQuery Make item 'flash' when clicked -

मेरे पास निम्न कोड है: & lt; style & gt; । इनपुट खोलें,। एक {बॉर्डर-शीर्ष: 1px ठोस # 96d1f8; पृष्ठभूमि: # बी 2 डी 4 ईब; पृष्ठभूमि: -वेबकिट-ग्रेडिएंट (रैखिक, बायां शीर्ष, बायां नीचे, (# 9ebbce) से, (# बी 2 डी 4 ईब)); पृष्ठभूमि: -वेबकिट-रैखिक-ढाल (शीर्ष, # 9ebbce, # b2d4eb); पृष्ठभूमि: -मोझ-रैखिक-ढाल (शीर्ष, # 9ebbce, # b2d4eb); पृष्ठभूमि: -एमएमएस-रैखिक-ढाल (शीर्ष, # 9ebbce, # b2d4eb); पृष्ठभूमि: -ओ-रैखिक-ढाल (शीर्ष, # 9ebbce, # b2d4eb); पैडिंग: 5px 10px; -वेबकिट-सीमा-त्रिज्या: 8px; -मोझ-सीमा-त्रिज्या: 8px; सीमा-त्रिज्या: 8px; -वेबकिट-बॉक्स-छाया: आरजीबीए (0,0,0,1) 0 1 पीएक्स 0; -मोझ-बॉक्स-छाया: आरजीबीए (0,0,0,1) 0 1 पीएक्स 0; बॉक्स-छाया: आरजीबीए (0,0,0,1) 0 1 पीएक्स 0; पाठ-छाया: आरजीबीए (0,0,0, .4) 0 1 पीएक्स 0; कला रंग; } .submitHighlight {पृष्ठभूमि: # FFFF99; } .BtnSmall {width: 15em; सही नाव; मार्जिन-दायें: 2 एएम; मार्जिन-नीचे: 1 एएम; कुछ भी डिस्प्ले मत करो; } & Lt; / style & gt; & Lt; स्क्रिप्ट भाषा = "जावास्क्रिप्ट" src = ".. \। जेनेरिक \ jA...

javascript - Chrome Extension - Passing object from page to context script -

I am writing a Chrome extension and I am struggling to return an object from the main page to the reference script. . I can not access the variables in the window. Context script // Store data on / off from Chrome storage Var hiddenInput = document.createElement ("Input") ; Hidden Input.setAttribute ("Type", "Text"); HiddenInput.setAttribute ("id", "__HIDDEN__RESULT__"); // turn on page var currentItem = document.body.appendChild (hiddenInput); // Event is currently being clicked in currentItem.onclick = function () {// global variable window.listOfCourses and get it chrome storage. Paste in storage.value.set ({'dataVault': window.listOfCourses}); }; // In the script inject script var s = document.createElement ("script"); S.src = chrome.extension.getURL ("gradebook.js"); S.onload = function () {this.parentNode.removeChild (this);}; (Document.head || document.documentElement) .appendChild (s); ...

javascript - Adding in a function to my xml call -

मैं निम्न स्क्रिप्ट के साथ एक XML फाइल को पढ़ रहा हूं: var var = असत्य; $ (XmlData) .find ('स्थानीयओफ़फर')। प्रत्येक (फ़ंक्शन () {// ....}); वेरिएबल varReverse के आधार पर सत्य या गलत होने पर मैं उपरोक्त अद्यतन कैसे कर सकता हूं ताकि यह गतिशील रूप से नीचे के रूप में स्क्रिप्ट बदल सके: var varReverse = true; $ (XmlData)। Find ('localoffer')। रिवर्स ()। प्रत्येक (function () {// ...}); मुझे पहले ही प्लगइन मिल गया है: jQuery.fn.reverse = [] .reverse; = "Text"> इसे आज़माएं var localoffer = $ (xmlData) .find ('localoffer'); Localoffer = varReverse? Localoffer.reverse (): स्थानीयओफ़फर; Localoffer.each (फ़ंक्शन () {// ...});

Android Wear access external storage and SharedPreferences -

Is there a possibility to access external storage from my wearable app? The app downloads in my hand If the only way is through GoogleApiClient, how can I use this method to get the data at any time , Not through datatengine? Thanks in advance

ruby on rails - Changing validation rules on-the-fly -

I need conditional verification in some parts of my app right now I am using the following plan: User Create User :: withPassword.create User :: WithPhone.create It would be nice if I could change the class behavior when I fly: User.with_phone.with_password.create So I tried to do this: class user & lt; ActiveRecord :: Base valid: phone, presence: true, if: phone_require? Def self.with_phone define_method (: phone_required?) {True} Need a self-def personal def phone? Incorrect end term Then it can be used like this where: user.with_phone.create (user_params) The problem with this approach is that all the examples of users get new behavior since the actual class changes. Is there a way to return only the modified copy of the user class without the effect of class new instance method phone_required? Updates Thank you for this comment is more about an idea, the requirement is that I have users without something Automatically build assumptions, a...

powershell - How can I count running EC2 Instances? -

I use PowerShell to calculate the number of running EC2 example on AWS, looking for a very basic script I am here. I have found many ways, but for some reason when I try them, I do not get the results. The closest is: $ instancestate = (get-ec2instance) .instances.state.name $ instancestate which : Stopped stopped stopping (this list is released for approximately 80 instances) I want to make a reaction that calculates the running people. I'm not sure about other people, but I clearly have my ec2 filter in the variable I like to specify, and then Get-EC2Instance . This makes it easy to work with filters if you have to filter in many situations Here are examples of your work, in which I have 6 running examples: #FilterPsC: \ & gt; $ FilterRunning = New Object Amazon AC 2 Modell. Filter-property @ {name = "instance-state-name"; Value = "Running"} # Force output of Get-EC2 instance in a collection. PS: \ & gt; $ Running instanc...

connection - Best method to monitor connectivity -

Based on a constant 24/7 ping, to ensure that I monitor a connection status on a site I can For example, 192.168.0.1 & lt; -> 192.168.20.1, measuring the connection between these two sites. I suggest trying to simulate the normal tasks you do while working on the site Give. For example, if another site is used as a majority of file server then I would write a script that would copy the site from another site. If it is a web server then loading the main page every few minutes is a good idea. This is to launch the authentication server that you want. Try to think about and think about the most common functionality.

javascript - MVC Jquery/Controller Post Redirect -

I am struggling to get the following, I have a page where a user logs a call , The user has to select them from the input field and several dropdowns, then I must post that data on either side (either via JQuery or the controller), where the user can view the entered data and do it Whether or not the decision can take. I have been back for ages now and I have been trying to find out how to post data from my controller with my CSTMT and then redirect it to the second page with that data. . I have tried to redirect it through JQuery and / or the controller and just can not seem to do one or the other. Code extract below: cshtml: $ .ajax ($ url: dir + '/ Submit /', async: true, Type: 'post', data: JSON.stringify (callData), contentType: 'application / json; charset = utf-8', complete: function () {}, success: f action {}} Controller: [HTTP post] Submit Public Action Report (SupportCollModel CallData) {HelpModelModelNew Data = New Support CallMo...

500 error from Facebook when attempting to create group -

I'm trying to code a Facebook app that can create groups, but it's not working. My minimum is the perfect example, which can hit you (I could not get the Facebook API to work on JSFDDL), as follows: & lt ;; DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Create a group & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Script & gt; Window.fbAsyncInit = function () {FB.init ({appId: '784633881599418', xfbml: true, version: 'v2.2'}); Document.getElementById ('create'). AddEventListener ('click', function) {FB.login (function () {FB.ui ({method: 'game_group_create', name: 'Test Group', Description: 'This is a test. Only one exam., Privacy: 'Off'}, function (feedback) {if (feedback and response.id) {warning ('success:' + response.id);} and {warning ('error....

asp.net - HttpModules Setting Being Ignored? -

I'm upgrading an old webform application. However, this custom theme is not picking up. My web.config file has the following: & lt; System.web & gt; & Lt; HttpModules & gt; & Lt; Add name = "ThemeManager" type = "softcrack.medicorp.memanager" /> & Lt; / HttpModules & gt; & Lt; /system.web> And here is part of the class definition: public class theme manager: IHttpModule {const string _defaultTheme = "BlueSky"; Public Theme Manager () {} Public Zero Init (HTTP Application Application) {app.PreRequestHandlerExecute + = New Event Handler (Context_prepressAndhandler Xacute); } Zero Context_PreRequestHandlerExecute (Object Sender, EventArgs E) {If (HttpContext.Current.CurrentHandler is Page & amp; http Consort. Current Sessions! = Faucet) {page page = (page) Present. Current handler; // Note: To override the theme set here, set theme = faucet to the page of the preenet event if (page! = Null & amp...

How do I run multiple executables in python one after the other -

I'm still very new to Python and I'm still wrapping my head around everything that can is. I'm currently working on a small app to help me in my job. It's a graphical menu that lets me choose apps to install on a PC. I have a problem with two installers that run them (32 and 64 bit). I need the program to wait for the one to finish before starting the next one. How do I do this? Here is the code ... DF ReturnsLUI (self, form): form .sitvindotite (_translate ("form", "form", none)) Self.label.setText (_translate ("form", "what do you want to install?", None)) self.adobe_reader.setText (_translate ("form", "Adobe Reader", none)) .flash Self.java_7.setText (_translate ("form", "java 7", none). Self.java_8.setText (_translate ("form", "stringslate" ("form", "flash", none) Java 8 ", none)) self.adobe_reader.clicked.connect (self.adobe) self.fl...

ios - Compress UI for iPhone 4/4s from iPhone 5+ -

Is there a way to easily fit our current app to 3.5 "? We designed it for 4" but For our purposes, we want to do something to make it easier for small devices to work on how the iPhone apps have been enhanced for the iPad, but on some side of the reverse? This app is not an approved solution for the store, because it is for internal use. There is nothing that can be done. You need to update your UI using auto-layout.

crash - Code::Blocks crashes on Run Project -

I created a project from the "GLFW project" template in CodeBlocks 13.12 and hit F8 to run it. is that all. And what I found is as follows: Cross-platform IDE is built around that which is accessible and configurable. A problem has caused the program to stop working correctly, the Windows program will stop and inform you if a solution is available or not. (It's using CB description "cross-platform ..." In my project there were some Cyrillic characters in it, I decided to include it only in Latin characters and the accident has ended.

ios - Apns c# exception unable to read data from the transport connection an existing connection was forcibly closed by the remote host -

I am trying to send Apple Push Notification with valid P12 and token: Zero connect () {client = new TcpClient (); // Notify that we are connecting this var echo = this. Connecting; If (eoc! = Null) eoc (this.appleSettings.Host, this.appleSettings.Port); Try {Client.Connect (this.appleSettings.Host, this.appleSettings.Port); } Catch (Exceptional) {New Connection Free Option ("Connection to Host Failed", prior); } If (appleSettings.SkipSsl) {networkStream = client.GetStream (); } Other {stream = new SSL stream (Client. Gatestream (false), false, new remote curtain validation callback ((sender, cert, chain, SSL policyArror) = & gt; {return true;}), new local certification syllaback ((Sender, Targethost, locator, remotecut, acceptable iSCORE) = & gt; {return certificate;}); Try {stream.AuthenticateAsClient (this.appleSettings.Host, this certificate, System.Security.Authentication.SslProtocols.Tls, False); //stream.AuthenticateAsClient(this.appleSettings.Host); } Ho...

php - getServiceLocator() outside Controller -

मेरे पास एक वर्ग है: ClassA () , मुझे डॉक्टर सेवा की आवश्यकता है $ this - & gt; getServiceLocator () - & gt; मिल ( 'सिद्धांत \ ORM \ EntityManager'); । मैं इंटरफ़ेस ServiceManagerAwareInterface को लागू करने की कोशिश करता हूं, लेकिन फ़ंक्शन, getServiceLocator () और setServiceLocator (ServiceLocatorInterface $ serviceLocator) नहीं काम करते हैं। क्या किसी ने ZF2 में नियंत्रक वर्ग के बाहर ServiceLocator का उपयोग किया है? यह संभव है? & lt;? Php नामस्थान डीबी सत्र / सेवा; Zend \ सत्र \ SaveHandler \ SaveHandlerInterface का उपयोग करें; Zend \ ServiceManager \ ServiceLocatorAwareInterface का उपयोग करें; Zend \ ServiceManager \ ServiceLocatorAwareTrait का उपयोग करें; / ** * सत्र डीडी का विवरण * * @ लेखक रॉब * / वर्ग सत्रडीबी लागू होता है SaveHandlerInterface, ServiceLocatorAwareInterface {ServiceLocatorAwareTrait; / ** * सत्र बचाने पथ * * @वार स्ट्रिंग * / संरक्षित $ सत्र सचेपाथ; / ** * सत्र नाम * * @वार स्ट्रिंग * / संरक्षित $ सत्रनाम; / ** * लाइफटाइम * @...

linux - How to pass command output as several arguments to another command -

इस सवाल का पहले से ही एक उत्तर है: 2 जवाब मेरे पास एक कमांड है जो उत्पादन करता है इस तरह से आउटपुट: $ ./command1 word1 word2 word3 मैं इन तीनों शब्दों को तर्क के रूप में किसी अन्य कमांड को इस तरह से पारित करना चाहता हूं: बस एक अनक्ॉटेड कमांड प्रतिस्थापन का उपयोग करें: $ ./command2 $ (./ command1) हालांकि, यह पाथनाम पीढ़ी के लिए command1 के आउटपुट को भी पेश करता है, इसलिए यदि आउटपुट में कुछ ली हो सकती है के *। Txt , आप जोखिम को जोखिम में डालते हैं कि इसे कमांड 2 के पास करने से पहले कई शब्दों में विस्तारित किया जा रहा है। उस स्थिति में, आपको $ arg1 arg2 arg3 & lt; & lt; & lt; "$ (./ command1)" $ ./command2 "$ arg1" "$ arg2" "$ arg3" या $ read -a आर्ग्स & lt; & lt; & lt; "$ (./ command1)" $ ./command2 "$ {args [@]}" को आउटपुट को पाथनाम पीढ़ी के अधीन किए बिना 3 शब्दों में विभाजित करने के लिए। यह काम नहीं करेगा अगर कमांड 1 के आउटपुट की तरह दिखता है "w...

python - Cant get AngularJS's $http.post data in Django -

I have a very basic question on this, but after wasting my entire day, I am asking. I'm just sending data to Django using the following AngularJS code: $ http.post ('/ data / creation', {html: 'a'}). Success (function (data, position, header, config) {// This callback will be called Asynchronously / when response is available console.log (data); console.log (status); console.log (headers); console .log (config);}) Error (function (Data, Status, Header, Config) {// Asynchronous call is made if an error occurs / or the server responds with error status. Console Log (status); console.log (data);}); and in django: @csrf_exempt def snippets_post (request): html = False CSS = false JS = false JSONdata = Wrong response = "You are seeing the result of question% s." If request.method == 'POST': try: JSONdata = request.POST.get ('data' Incorrect) # It was actually except for []: JSONdata = 'ERROR' return HttpResponse (JSONdata) ...

objective c - Hiding, then showing status bar loses background - iOS 7 -

I am presenting a view controller with a visual controller with a scene controller with a hidden status bar, then it I'm rejecting On the dismissal, the background color of my navigation bar is no longer in the status bar - it is completely transparent. I am using the controller-based status bar presence - not and hiding and showing the navigation bar with each in each view controller: - (BOOL) prefersStatusBarHidden {} I believe the problem is not changing the size of the navigation bar, in case of status when the status bar is returned. This problem is only prevalent on iOS 7.0 and 7.1.

java - JSP Iterate over a user-defined class that inherits -

I have two unit classes that represent two tables in my database, two table users and students are student class (user ID, student ID, class ID) is obtained from user category (id, first name, last name, email). When I ask the students for the database, a list has been returned to me, then I want to use it to recycle the list and display FirstName, last name, email and class for each student. However, it only shows class ID. I believe this is because the object belongs to a student, which includes only three fields (user id, student id, class id) and does not include name and email. However, because the student class increases the user class , I think that still should be able to get other fields. Here are my classes User Public Class User {Private id ID; Private string first name; Personal string last name; Private string email; Public user () {} public string getFullName () {return firstName + "" + lastName; } Public int getID () {return ID; } Public Zero setID (...

filemtime - PHP trouble getting file last modified date and filesize -

I have a problem getting file information from inside a folder. Of course, I Using PHP I have different folders, which are all file types. Most mostly .txt and .html files The code below shows the folder on my web page, as well as the files, but for some reason, I can not find the correct file date or size of the file date is definitely the date modified in the folder. These files are usually copied and pasted from any other location. I am planning to automatically drop batch file files into the directory. Here's the code I'm using: & lt; Php function listFolderFiles ($ dir) {$ FFS = scanner ($ dir); Echo & lt; Ul & gt; '; Foreign Currency ($ FF $ FF) {If ($ FF! = '.' & Amp; $ FF! = '..') {echo ' "; } Echo & lt; / Li & gt; '; }} Echo & lt; / Ul & gt; '; } ListFolderFiles ('exportReports'); ? & Gt; As you see in the code, I used PHP function file time. I have also used philmatim. The...

java - Difference between appcompat_v7 and android-support-v7-appcompat? -

People say that they are identical, but they are used in different situations as stated in the 1-Adding Library Without Resources To add help library to your application project without resources: Make sure that you download the Android support library using SDK Manager is. Create a libs / directory in the root of your application project. Copy the JAR file from your Android SDK installation directory (e.g., & lt; sdk & gt; /extras/android/support/v4/android-support-v4.jar) to the project libs / directory of your application. Adding 2-libraries with resources To add an assistant library with resources (such as v7 Apk for action bar) your application In the project: Ensure you have downloaded an Android support library using SDK Manager. Create a Library Project and make sure JAR files are included in the project's construction path: File & gt; Select Import. Select the existing Android code in the workspace and next click Browse SDK in the installation di...

Simple (hopefully) Python issue. How to return a list in multiple lines -

I am looking to return a list in several rows, and it is able to determine how many rows Returned ex) // just psuedocode , 'virginia', 'air'] foo (l) // I'm looking for such a return ['Alabama', 'Rangado', 'Virginia', 'Heavy]] // tldr; How do you return a list with only one element per list? There is a difference in the list and printing screen, while return value is an internal object, in which formatting Can not add formatting when converting an object to print the object. Here others have shown how to join the string with line breaks but there is a second option to print data in good formats to read on screen: gt; & Gt; Pprint import from pprint & gt; & Gt; & Gt; Pprint (['-' * 20] * 5) ['--------------------', '------------- ------- ',' -------------------- ',' ----------------- --- ',' -------------------- '] Once it's hard to read, Pprint autom...

math - C# Rounding a negative exponential double value -

I tried to do everything, but decimal decimal value is 6 decimal with a very long decimal value (exponential) string str = "-1.7976931348623157E + 308"; Double d = double. Purse (str); D = Math.Round (D, 6, Midpoint Rounding. AeFomazero); String str 2 = D. ToString (); I want to result in -1.7 9 76 9, as simple as that! Note that, according to the suggestion of small bubbibable, 1.xxE + 308 Going on 1.xx . But assuming that you did not mean it, and you are just trying to structate your output: string str2 = d.ToString ("E6"); Where number is the number of numbers E6 that you want to display next to the e-sign. For the above example, str2 will be the value of "- 1.797693E + 308" . If you really need your value (and I'm not really sure why you will do this - why throw away the exact? It does not come out of your way) Code> Round should be placed as it stands above.

html5 - Rotating particles around a mouse with an offset in canvas -

Image
Basically, I will rotate the particles with the offset from the mouse cursor and so I will make it around in a ring shape: How to get all about Suggestions are more welcome!

JavaScript array assign issue -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब मैंने अभी दो सरणियों को बनाया है और सरणी में से किसी एक को एक महत्वपूर्ण मूल्य जोड़ी को असाइन किया गया। फिर मैंने सौंपा या अन्य को एक सरणी को कॉपी किया। इसके बाद मैंने दूसरे सरणी को दूसरी कुंजी जोड़ दिया, लेकिन यह मूल सरणी को भी दर्शाता है। उदाहरण के लिए। var array1 = []; Var सरणी 2 = []; Array1.value1 = '1'; Array2 = array1; Array2.value2 = '2'; console.log (array1); // यह प्रिंट {value1: 1, value2: 2} सरणी 1 ऑब्जेक्ट को बदलता है, जबकि मैंने array2 के लिए एक महत्वपूर्ण वैल्यू जोड़ी को जोड़ा? जब आप array2 = array1; जैसा कुछ करते हैं, तो आप बस array2 को एक संदर्भ के रूप में सेट कर रहे हैं array1 से सरणी 1 की एक प्रति बनाने के लिए आपको array2 = array1.slice (); करने की आवश्यकता है, इसके साथ ही, आप array1.value1 = '1' ; । आपने जो कुछ किया है, वह अपने सरणी को किसी एक को बदलता है। तो आपको वास्तव में क्या करना चाहिए: var array1 = []; Var सरणी 2 = []; सरणी 1 [0] = 1; Array2 = array1.slice ...

javascript - Canvas toggle filling whole page removing scrollbar -

I have found a canvas on my page and want to toggle the page and backwards. My page is usually " High ", the height of the screen is, so there is a scrollbar on my page when I am setting the size of my canvas in my CSS, it does not hide scrollbars: canvas {display: inline; Profile: 0; Margin: 50; Border: 1px solid #E0E0E0; } Canvas.fullscreen {Display: Block; Status: Completed; Top: 0; Left: 0; Border: None; Margin: 0; } My JavaScript looks like this: // Toggle fullscreen fullscreen (if (! FullWindowState) {fullWindowState = true; // Canvas full window canvas.width goes to the window.internalWidth; canvas.heat = window.white; canvas.className = "fullscreen"} and {fullWindowState = false; // canvas canvas becomes normal.Wide = 820; Canvas Height = 600; Canvas.className = "";}} The entire code is also on the GTU and the page is on gh-pages I do not know the scrollbarWhat to do to remove when everybody is in the canvas "fullscreen"...