Posts

Showing posts from June, 2012

node.js - Dynamically load Javascript functions -

I want to load a dynamically and want to call Javascript functions with a JSON file. This idea is to build a plugin framework that will enable others to add functionality by typing a function and updating the JSON file. For example, with the following JSON: {"plugins": {"random": {"name": "random number generator", "hook": "random"}}} ... and the following plugin: random.js module.export.ron = function () {return mathematics. (Mathematics. RANDOM () * 100); } I want to be able to parse the JSON file and want to call the run function of any plugin How can I load and call the run function on random? Depending on what you have described, just need the requirement module. var plugins = required ('./plins.json'); Var plugins for = objects Kids (plugins); For (var i = 0; i & lt; plugin kios; i ++) plugins [plugin keys [i]]. Func = is required ('.' '[Plugin ki [i]. Hook +' .js'

Ruby on Rails: passing value from view to controller -

I am new to rail. I have calculated some value in a javascript based on user input and now I want to set a variable presence in the controller function at the calculated value. Is it possible to do this or is there a better way? Are you sending an ultimate with javascript? Then just set: @variable = params [: calculation]

dojo - A dgrid row disappears when sorting -

I have implemented dgrid. It is really clear though, when I click on the row to sort it, but All in a row disappears, I am trying to understand how mad is going .... Let's go to it. DGrid, it's a dojo-based data grid, see When using JavaScript and HTML and join the Observavist Memestor, the grid is populated, in which many rows Data is happily displayed. Columns are sortable, that is, you can click on the row / column title. However - and here's the problem - when these row / column headings are clicked to collapse the line row, then all one row disappears One memory (dojo / store / memory) Using Digit Data Store is a good job - that is, to sort the rows successfully; however, when observation (dojo / store / inspection) is used as a data store, then order rows Causes fall Please see the examples given below. Working with memory: function populateGrid (memory, message) {var featureOne = {"id": message [0] .Quality ["id "Call 2": Mes

ember.js - Returning record(s) after store pushPayload call -

What is a better way to bring back records after DS.Store # pushPayload ? This is what I am doing ... var payload = {id: 1, title: "example"} store.pushPayload ('post', payload); Return store.getById ('Post', Payload.Id); But, regular DS With the store # push you get the record back entered, the only difference between the two, which I can tell, is that D. Store # Pushpeload serializes the payload data with the correct serializer. DS.Store # pushPayload an array of objects is not the only one, and it may contain side-loaded data, it does a complete payload process and requires the route in the payload: {"posts" : [["Id": 1, "title": "title", "comments": [1]}], "comments": [// .. and so on ...]} ds Store # Push Expecting a single record is normalized and does not have any side loaded data (note no root key): {"id": 1, "title": "title", &q

html5 - How to center align Text in carousel? -

I am trying to create simple text carousel using pure css3 (no javascript). With the help of some references; I managed to write the code mentioned below: In this code, the text is being mis-aligned; Can you please help in fixing? Carosuel; Please try it out: < code> & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Style & gt; # Carousel Pe (Text-Alignment: Center; Position: Relative;} # Carousel P: nth-child (1) {Opacity: 1.0; -WebKit-Transform: Translation X (0 pixels); -MOZ-TRANSFORM: Translation X (0 Pixels ); -MMS-Transform: Translator X (0 px); -O-Transform: Translation X (0 pixels); Conversion: Translator X (0 pixels); Animation: Carousel 1 10S Infinite; Webkit-Animation: Carousel 1 10 S Infinity; / * Safari and Chrome * Sarosol P: nth-child (2) {Opacity: 0.0; Animation: Carousel 2 10s Infinite; Webkit-Animation: Carosol 2 10s Infinity; / * Safari and Chrome # / Carrosol P: nth-child (3 ) {Opacity: 0.0; Anim

parallel processing - Can you parallelise inexact Jacobian calculation in Julia without special arrays? -

In Julia, you wanted to calculate a false Jacobian based on a vector function, F (x), for which Much is necessary to evaluate the calculation of Jacoban's assessment clearly there is quite a systematic similarity in the concept. My question is, can it be done without the support of the distributed array, shadearere etc in Julia? For example, suppose you have the code: function Jacob (f:: function (x) = 1e-7 delta = eps * eye (length (X) J = Zero (length (x), length (x)) for i = 1: length (x) J [:, i] = (F (x + delta [:, ii]) - F ( X-delta [:, ii])) / 2 / EPS end J & Is it possible to parallel in this way, according to the manual, the sum of the 200000000 random coin flip Can explain parallel? I = 1: 200000000 int (randbool ()) end I've tried nheads = @ parallel (+) something like this: function of yakub (f :: function, x) Required ("testfunc.jl"); EPS = 1e-7 delta = EPS * eye (length (x)) J = zero (length (x), length (x)) for j = @ parallel (+

nsarray - copy custom array without pointing old array in iOS ARC -

I would like to know how can I make a deep copy of the custom array without pointing to the old array. I have examined almost all stack overflow queries but no solution was found. Please help copy the array without pointing to my old array so that my new array operation does not affect (add, remove) the original / old array. This is my main manifestation manifesto. @ Property (non-dynamic, strong) NSArray * secArray; Add a custom object to the array NSMutableArray * secDataArray = [NSMutableArray array]; [SetRequest.SetMembersEnumerateObjectsUsingBlock: ^ (SetMember * subscriber, NSUInteger idx, block *) {SecData * secData = [secDataArray lastObject]; (Sec SecData.open = Yes; [Second Data Arrayed Object: Second Data]; } And {{secData.lines addObject: member]; }}]; New array in deep copy of custom array NSArray * newSecarray = [[NSMutableArray alloc] initWithArray: secArray copyItems: Yes]; But extracting data from the new array also removes data from the old arr

javascript - Change background color on refresh with Vanilla JS -

There is a problem changing the background color when I refresh each one. Any help is appreciated that this is my JS yet: var color = ['# 760c8', '# 4782b1', '# e889c']; Var change background = function () {document.body.style.background = colors ([Math.floor (Math.random (* * colors.length)]);}; Change background (); You are almost there. In the line document.body.style.background = colors ([Math.floor (Math.random (* * colors.length)]; You [Math.flur (Math.Rendum (*) * Colors Length ).] Otherwise you think that you want to call colors as a code. The index wants to use an array of what the square brackets do, so it should document.body.style.background = colors [Math.floor (Math.random (* * colors.length) ]; and it will be alright.

math - Calculation in Javascript without rounding decimal numbers -

Friends, I've got a text box in which users can enter valid decimal numbers. And then calculate it without having scored with this decimal number. Currently I am working as var pricePerItemExVat = Math.round ($ ("(#innerCaseWsp"). Val ()) / Math. ($ ("#increasium SLUNIT") .Val ()); How can I do without spinning the number? It seems that you get Math.round Is used. Parsing only the strings using numbers: var pricePerItemExVat = ParseFloat ($ ("#InnerCaseWsp"). Val ()) / parseFloat ($ (" #InnerCaseItemSellUnit "). Val ());

java - Only Last Value is Printing From Database in jTable -

I am going to show the stock record in jTable from the database. But when I get the jTable value from the database it is only showing the last value. while (rs.next ()) {string vendor = rsgetstring ("vendor"); String p_type = rs.getString ("P_TYPE"); String p_name = rs.getString ("P_NAME"); String unit = r.getString ("UNITS"); Letter unit_price = rs.getString ("UNIT_PRICE"); Stock_ Table.setValueAt (Vendor, 1, 0); Stock_ Table.setValueAt (Vendor, 2, 0); Stock_ Table.setValueAt (Vendor, 3, 0); Stock_tout.SetVellLate (vendor, 4, 0); First of all, Java docs clearly shows that the two int value line And column in that order. Based on your example, you are updating the first column of 1, 2, 3 and 4 rows. P>

How to start rebuild in Jenkins? -

Is there any way in Jenkins to rebuild the old build jobs? For example, I want to build a job with build number # 712, but when I click on the job link, I do not see any build option to restart the build. Jenkins "Rebuild Plugin" after installing this user Provide the plugin to re-create a parametid build without re-entering the parameters. Before the user will be allowed to edit the parameters before rebuilding. Is it looking for you?

ios - Facebook Inbox with Fql -

I will show the name and image of another participant in TableView , such as Facebook Inbox I'm using this fql query to get me - (zero) readInbox {NSString * query = [NSString stringWithFormat: @ "Select recipients, thread_id from unified_message where thread_id IN (SELECT thread_ID FROM unified_thread where folder = 'inbox')"]; NSMutableDictionary * params = [Object EndCase with NSMutableDictionary dictionary: query, @ "q", zero]; FBSEEEST * Request = [FBCAC Request Request: @ "/ FQL" parameter: Paramas HTTPMethod: @ "GET"]; [Request Started End Handler: ^ (FBCACC Connection * Connection, ID Result, NSERR * Error) {NSLog (@ "Result:% @", Results); }]; } And the result is something like this data = ({recipient = ({email = "****@facebook.com"; name = "*****"; "user_id" = 6 * * *;}, {email = "****@facebook.com"; name = "******"; // it is me "User_id" = *

jquery - How to use "rel" attribute with image map -

I have a jquery popup that runs different popups (DIVs) when clicking on different links. But now I want it to map the image. But it seems that the "rel" feature is not working for the image map, look wired - Although W3schools say it is ok to use "rel" with image map - Please help! rel attribute can only be used if your document type HTML5 , meaning your page for href attributes containing & lt ;; Doctype html & gt; line This attribute specifies the connection to the target object in the linked object. Value is a comma separated list of relationship values. Values ​​and their words will be registered by some authority, which may mean the document writer. Default connection, if no other has been given, then is look for details In addition, a side note, Do not trust the web site, nothing to do with it.

android - why is there an underlying line beneath my listView? -

Image
After I have the following XML: & lt; XML version = "1.0" encoding = "utf-8" & gt; & Lt; LinearLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" Android: Layout_width = "Match_parent" Android: Layout_height = "Match_parent" android: orientation = "vertical" android: paddingLeft = "8 DP "Android: PaddingRight =" 8 DP "& gt; & Lt; TextView Android: id = "@ + id / errorMsg" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" /> & Lt; Android: layout_height = "match_parent" android: layout_weight = "1" Android: drawSelectorOnTop = "false" /> & Lt; / LinearLayout & gt; And this XML for each item in ListView? & lt; XML version = "1.0" encoding = "utf-8" & gt; & Lt; LinearLayout xmlns: android = "Http://schemaskandroidkcom/

javascript - cannot get REST response using $.ajax() -

नीचे मेरी विधि है function getCurrentUserName () {$ .ajax ({type: "GET", url: "http: // localhost: 8099 / rest / प्रोटोटाइप / 1 / स्पेस / डी एस", क्रॉसडामन: सही, डेटा टाइप: "jsonp", सफलता: फ़ंक्शन (resp) {चेतावनी ("सर्वर ने कहा: 123: n '"+ resp.name +"' ');}, त्रुटि: फ़ंक्शन (ई) {अलर्ट ("त्रुटि" + ई)}}); }); } मैं इसे एक बटन क्लिक पर कॉल कर रहा हूं, मुझे कोई चेतावनी नहीं दिखाई दे रही है, जब मैं ब्राउज़र पर यूआरएल टाइप करता हूं, तो मुझे XML में प्रतिक्रिया मिलती है। लेकिन मुझे जवाब नहीं मिलता स्क्रिप्ट में क्या कोई भी मेरी इस के साथ मदद कर सकता है ? क्या मुझसे कोई चूक हो रही है ? धन्यवाद:) एक JSON पार्स त्रुटि की तरह दिखता है। < कोड> जेसन के बजाय jsonp फ़ंक्शन getCurrentUserName () {$ .ajax ({प्रकार: "GET", url: "http: // लोकलहोस्ट: 8099 / बाकी / प्रोटोटाइप / 1 / स्पेस / डीएस ", क्रॉसडामैन: सच, डेटाटाइप:" जेसन ", सफलता: फ़ंक्शन (resp) {चेतावनी (" सर्वर ने कह

groovy - Sort by boolean value inside collect -

मेरे पास मानचित्र की सूची है students.collect {[id: it.id, सेल: [it.id, जांच IFTrue (it.id, sessionsByUser)]] यह ओ / पी देता है [[id: 7, सेल: [7, गलत]], [आईडी: 8, सेल: [8, सत्य]], [आईडी: 9, सेल: [9, गलत]] कुछ पर आधारित शर्त मुझे बुलीयन मान का उपयोग करके इस सूची को सॉर्ट करने की आवश्यकता है I सच तो यह होना चाहिए [[id: 8, cell: [8, true]], [id: 7, cell: [7, false]], [id: 9, सेल: [9, गलत]] क्या यह किया जा सकता है? क्या आप की ज़रूरत है सॉर्ट विधि, नहीं जमा करें : def m = [[id: 1, cell: [ 1, झूठी]], [आईडी: 2, सेल: [2, सत्य]], [आईडी: 3, सेल: [3, गलत]],] [[आईडी: 2, सेल: [2, सत्य]] , [आईडी: 1, सेल: [1, गलत]], [आईडी: 3, सेल: [3, गलत]],] == m.sort {! It.cell [1]}

java - How to perform a method on multiple arrays? -

The method takes an array in the form of an argument I am trying to implement it in Java. I believe this can be achieved by creating an array list, but I am doing a blank illustration. Thoughts: for (i = 0; i For better use ArrayList like: Arreelist & lt; ArrayList & gt; Lists = new arreelists & lt; ArrayList & gt; (); then: for (arrelist list: list) {method (list); }

c++ - How to remove const qualifier from a member function pointer -

I am using a library that contains the following code: lt; Typename M & gt; Void _register_member (lua_State * state, const char * member_name, M T :: * member) {std :: function & lt; M (T *) & gt; Lambda_get = [member] (t * t) {// ^ error return here T->; Member; }; // ... However this code does not accept the member function pointer that passes the error to the function function type 'zero () ' or the Constant member can not return any type of function. How do I remove Constable? Member has passed the work or how can I implement std :: remove_const ? The observation states that this error occurs when it tries to compile that Uses the library: #include & lt; Selene.h & gt; Square C {public: bool get () console; }; Bool C :: get () const {return true;} int main () {cell :: state state; State ["c"]. SetClass & lt; C & gt; ("Get", and & amp; ac :: get); } The compiler fails to compile the code in the

wpf - c# double screen app, how to change frame of the mainwindow from second window? -

I have an app that works in two screens, the second screen is a setting panel, from the settings panel to me in the main window Frame content must be refreshed. I am using this code: main window winprost = new menu-window (); Var PrimaryScreen = System. Windowsforms Screen. All scans. Where (s = & gt; s primary). FirstOver Default (); If (primaryscreen! = Null) {winFirst._mainFrame.Source = New Uri ("DynamicSource.xaml", UriKind.Relative); winFirst.Show (); } With this code I need to press a button in the second window which can load in the main window. But every time I launch it, this code loads a new main window class ... I think this is not the best way, maybe I will have to face some memory related problem. So if this is a problematic approach how can I use the frame of the current main window and change it without any change? Application curApp = application.Current; Window main window = break Manwindo; I have also tried this code but in this way I ca

javascript - Jquery Table Sum -

Every time I click the "+" button and add each column, trying to create rows I am here. I can create columns but no row. This is my code: $ (document) .ready (function () {$ ("# tabla"). Click (function () ($ & Amp; nbsp;; & lt; input type = "text" value = "0" & ​​gt; & lt; / td & gt; '); $ ("(" (TD: final "). (' & Lt ; Td & gt; & lt; input type = "text" value = "1" & gt; & lt; / td & gt; '); $ ("input"). (Function () {$ (this) .keyup (function () {newSum.call (this);}}}};});}); function newSum () {var sum = 0; var thisRow = $ (this) .closest ('tr') ; Var total = 0; $ (ThisRow) .Find ("TD: no (gross) input"). Each (function () {sum + = parseInt (this.value);}); $ (ThisRow) .find "Total.") HTML (sum). $ ('Total') Each (function () {total + = parseint ($ (this) .html ());});} thanks in advance.

java - What's MySQL's role in a JPA project? -

I am confused about the role of MySQL within a JPA project. For example, if the project is being created in the eclipse IDE, how can it be exported in MySQL? What is the role of MySQL in this project? I have researched about this, but I still need some explanation. What is the role of MySQL in this project? MySQL database: where the data is stored. What is its role? You usually do not need to "export" mySQL to anything from your project. Instead, you set up the JPA configuration file with backend database settings (database type, hostname, account name, logical database name, etc.), and the JAPA provider (for example, hibernate) will take care of your essential tables and indexing. Does backend database

objective c - Can XCTAssertThrows catch c++ exception? -

I am using Exstate to test some C ++ / OC mixed code units. I think it seems that XCTAssertThrows can not take exceptions c ++? My use is very simple Say, as an expression c ++ test () < p> Any suggestions? > Wrap Long answer: You can wrap NSE expansion for any std :: exception, like << p> #import & lt; XCTest / XCTest.h & gt; #import & lt; Exceptions & gt; @interface NSException (ForCppException) @end @implementation NSException (ForCppException) - (id) initWithCppException: (std :: exception) cppException {NSString * Description = [NSString stringWithUTF8String: cppException.what ()]; Return [self-initWithName: @ "cppException" Reason: Description userInfo: zero]; } @end @interface XCTestCase (ForCppException) @end @implementation XCTestCase (ForCppException) - (zero) rethowNSExceptionForCppException: (zero (^) ()) ACTION {ACTION (try {); } Hold (const std :: exception & e) {@throw [[NSException alloc] initWithCppEx

indesign sdk - sample plugin not working -

Image
I am trying to develop a new plugin for InDesign. But for now I'm looking at some samples which comes with SDK. The fact is that I can not get these plugins to work on indispensable (for example, snippetner). I compile then, create a successful message and move it to the insdish's directory of the plugin, as well as this resource directory. They are loading correctly (because I did not get a message error during startup) but the plug-in does not appear in the tab It seems that there is no plugin there. What's going on? I had a single problem and I understand that at the top of the "Plug-ins" menu bar, The snippetner is not found below, but you can call it "window" - & gt; "Snippetner".

c++ - How do I get a O(log n) when I want to sort according to two keys? -

I have a bunch of nodes sorted alphabetically according to the data in the red-black tree. Structure node {int counter = 1; String data = nullptr; int red = 0; }; I have used a balanced binary tree because it has a big o (log n). The counter increases for the nodes, if I try to insert the node, the data matches any child, and / or the root (and the node is not included). I probably want to print like the top n we say 10) the nodes are ranked by the counter in the descending order (at the very least). But since the nodes are sorted alphabetically by statistics and do not have a counter, the best scenario is to use the O (n), worst position, selection or sequential search to search through a canceled list. I can think of doing I should be a big O (N + Log N), which is essentially the big O (N) - I was hoping to achieve something faster. My question is how can I achieve Oi, that is, anything faster than O (N)? By keeping data in a binary tree sorted by data in a

Please explain break and continue on Objective-C -

Firstly excuse my newbie question I am learning the purpose and I am very new to programming. Can you tell me what causes a break or what happens inside a loop? For example, two codes? for (int i = 0; i & lt; 100; i ++) {if ([looks correct itself]) {[do something self]; } And {break} }} For and (int i = 0; i & lt; 100; i ++) {if ([self okToProceed]) {[Self doSomething]; } And {continue; }} Can the first code loop be stopped for the first time? OK to return to hacking, the repatriation is wrong and the second loop bus continues to run, but okToProceed is nothing wrong Has been doing? A break statement exits the loop. You can think of it as a means of making a loop For example, in your code: for (int i = 0; i & lt; 100; i ++ ) , i is the status of a loop. Loop will stop if this situation is not completed. Similarly, if you have something like this, then if (i == 34) {break; } . It will exit from the loop when the value of i reaches 34, a

php - preg_replace() escaping: single vs double backslash? -

I have seen preg_replace () with double backslash to prevent someone (e.g., < Code> instead of & nbsp; ). Is it necessary? I tried both ways and I do not know what is preg_replace ('/ / lt; div & gt; \\ s * text & Lt; \\ / div & gt; / ',' ', $ Somestring); ', $ a backslash in PHP string literally ; For a typical meaning, for example, "\ n" is a new row, not a string "\ n". "To write the string" \ n ", you must type the code " \\ n " However, if there is no special meaning after the backslash, then the backslash is taken as such "\ foo" is required to be saved as . The ring "\ foo" is the only case in single-quoted wires in which you need to avoid backslash, which is directly before the end of the string: 'foo' \\ ' â? ??? "Foo \". Therefore, writing the \\ / in PHP code string or \ / The meaning is the same, because

amazon web services - Inner workings of an elastic search? -

I want to learn how elasticsearch works I have had concerns about the scalability of my design. I have 50 million documents, each document has approximately 50 string properties, 45 integer properties and 5 date time properties. So my worries are when I query the E with E, containing the date of 8 fields and 3 sorting based on date and integer values. How does ES do? What happens in the background, so when the system reaches 500 million, I ensure that performance? The link is a good start to understand what the comment is going on. But you do not have to understand everything to work things out. Good thing on elastic search - it's elastic means, it's very well scales , so if you need more performance then you have more RAM / CPU / server You can add and maybe configure the cluster (well, at least then you should learn something about shards and nodes). BTW, your scenario is not very difficult for Lucene (which is ES based), if you need to query under the secon

testing - How to test WebSocket + PHP app? -

I have a chat app written on PHP with the websocket (shaft + rect php) I I have some PHPUnit tests for standalone classes. But I am used to testing a full functionality of my app. How to do it? What is the best way to do this? You can simply write PHPUnit tests for your entire project. / P> If you want to test your entire project with PHPUnit and Selenium (a portable test framework), then this is a good guide:

Matlab Simulink S-Function: How to transfer the data from block to block except using a global variable -

In my simulated model, I have several block S functions that share the global variable. As we know, the value of the global variable will be transferred and potentially changed to block from the block. I am surprised that there is no alternative to transfer to block the data from the block. I used to share between C and C ++ classes (or any other content) between pwork vectors functions For a scolding vector is actually just an indicator for one object Check it out:

javascript - Adding dynamic styles with conditions to the dom elements -

I am creating dynamically divs, but what I want to add an anchor tag is to remove that particular message A garbage image shows a hover for a particular div I have written: hover over the orbit to add background and it is working fine, but I want to add an anchor tag too. Here is my code: style & lt; Style & gt; .mail: hover {background color: # cde6f7; / * Background image: URL ("/ content / images / trash page"); * /} .mail {float: left; Width: 100%; Border Bottom: Solid 1px #ccc; Padding-down: 10px; Margin-top: 3px; Cursor: indicator; } & Lt; / Style & gt; Here I am creating dynamic development and I have background color and a garbage image image every DIV I hover "; // Hello Hi; DataDiv + =" & lt; Label style = "+ style +" class = 'clsLbl' & gt; From: "+ RowData.Message_From +" & lt; / Labels & gt; "; DataDiv + =" & lt; Label style = "+ style +" class = 'cl

html - Form looks good in Firefox but a mess in Chrome -

Image
Please refer to the attached images. The second image is from Firefox, which looks great, first comes from Chrome, which is a mess. Anywhere I have a label and input field, this is a mess in Chrome. Both have the same code. & lt; Tr & gt; & Lt; Td class = 'sale-label-req' & gt; First Name * & lt; / Td> & Lt; Td class = 'sale-label-req' & gt; & Lt; Input type = 'text' name = 'Contact0FirstName' value = '& lt ;? = $ _ POST ['Contact0FirstName']? & Gt; ' & Gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td class = 'sale-label-req' & gt; Last name * & lt; / Td> & Lt; Td class = 'sale-label-req' & gt; & Lt; Input type = 'text' name = 'Contact0LastName' value = '& lt ;? = $ _ POST ['Contact0LastName']? & Gt; ' & Gt; & Lt; / TD & gt; & Lt; / TR &

javascript - Auto complete textbox for php from MongoDB -

यह मेरा कोड है autocomplete.php & lt; html & gt; & Lt; शीर्ष & gt; & Lt; script type = "text / javascript" src = "js / jquery-1.4.2.min.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" src = "js / jquery.autocomplete.js" & gt; & lt; / स्क्रिप्ट & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; $ (दस्तावेज़) .ready (function () {$ ("# name")। Autocomplete ({source: 'test.php', minLength: 1, selectFirst: true});}); & Lt; / स्क्रिप्ट & gt; & Lt; / head & gt; & LT; बॉडी & gt; & lt; form method = "post" क्रिया = "" & gt; नाम: & lt; इनपुट प्रकार = "टेक्स्ट" id = "name" name = "name" / & gt; & Lt; / प्रपत्र & gt; & Lt; / body & gt; & LT; html & gt; test.php & lt;? Php $ my_string = $ _ GET [&

c++ - how to name a critical section in openmp in visual studio 2012 -

I want to name an important section in openmp I have given it a name like this : #pragma omp critical [RawImageFile] And I'm getting this error: Error C3005: '[': Unexpected token OpenMP was faced with 'Important' Directorate If I use it like this: #pragma omp Critical raw photo I am getting this error: TC3005: 'RAW IMAGEFILE': OpenMP encountered an unexpected token on 'Important' directive If I use it like this: #pragma omp Important "RawImageFile" I am getting this error: error C3005: 'string': unexpected on 'OpenMP' critical 'directive' Token faced Right syntax to give an important section name in opnmp in Visual Studio 2012 Or is it? You should use round-brackets i.e. #pr Egma Ompi Important (Roimagefile) No class-brackets (details in the OpenMP specification are part of the square-bracket syntax description, and this means "optional", they will be includ

javascript - jquery animate opacity arrows mouseenter mouseleave -

I'm trying to add an opacity effect with jquery when the last on arrow navigation, but it seems that anything Does not happen :( Do you know what is wrong with my JC script? Here is my jazzery: $ (document) .ready (function () { $ ("flscroll") {$ ("flscroll") {$ ("flscroll" ({opacity: .8}, 300);})}} My CSS is defined in: .flscroll {Display: Block; Height: 83 PA Opacity: 0.8; position: fixed; top: 40%; z-index: 1000;} .88 .flscoll {filter: alpha (ambiguity = 80);} # flscolog {background: url (images / spread pages) - Repeat 50px -100px; left: -30px; padding-left: 50px; width: 52px;} #flscrolld {background: url (images / sprite.png) No-repeat left-200px; padding right: 50px; right: - 30px; width: 53px;} My HTML arrow declaration is like this: & lt; a href = "# 1" headline = "prev" square = "flscroll" id = "flscrollg" & gt; & Amp; Nbsp; & Lt; / A & gt; & Lt; A href = &quo

xml - Dynamic attribute in element XSD Schema -

& lt; element & gt; में गतिशील विशेषता जोड़ना संभव है उदाहरण के लिए मेरे पास & lt; A & gt; तत्व में एक निश्चित विशेषता नाम मोड & lt; ए मोड = "सक्षम" & gt; ; & Lt;! - सक्षम या अक्षम - & gt; यदि मोड सक्षम होता है तो यह तत्व `& lt; A & gt;` जैसे & lt; ए मोड = "सक्षम" attr1 = "abc" attr2 = "xyz" & gt; में कुछ और गतिशील विशेषता जोड़ देगा। यदि मोड अक्षम है तो इसे यह पसंद आएगा & lt; ए मोड = "अक्षम" attr3 = "abc" attr4 = "xyz" & gt; इसका मतलब है कि विशेषता मोड तय हो गई है और attr1, attr2, attr3 और attr4 मोड के मानों पर निर्भर करती है विशेषता मोड - फिक्स्ड विशेषता। attr1, attr2, attr3 और attr4 - गतिशील विशेषता < कोड> मोड कृपया मुझे उपयुक्त उदाहरण दें। करने के लिए अन्य विशेषताओं की सामग्री के आधार पर विशेषताओं की अनुमति दें, जिन्हें आपको XSD 1.1 (या कुछ एक्सएसडी 1.0 एक्सटेंशन जैसे स्कीमाट्रान) की आवश्यकता है। XSD 1.1 में आप एक

java - pass EJB ApplicationException to web -

I have EJB classes, custom exceptions, and web back and bean classes, I want to capture custom exceptions in the Web if EJB Exception passes, but can hold runtime exposure exception ?? Exception class: @ Application exceptions expands public class CustomException exception {} EJB class: Employees of Public Sector Dao {Private User Transaction Transaction; @basana unit (unit name = "xxx") protected EntityManagerFactory entityManagerFactory; . . . . . Public Zero addNewEmployee (employee employee) throws CustomException {. . . . Throw New CustomException (...); }} Backend class: Public class employee backend {. . . . Public Zero doAddEmployee () {try {.... employeeDao.addNewEmployee (); } Grip (custom expression e) {System.err.println ("------------------------ Custom Expansion"); E.printStackTrace (); } Hold (runtime exception e) {System.err.println ("------------------------ runtime exception"); E.printStackTrace (); Afte

asp.net mvc - why model posted to action Display in view? -

There are 2 verbs with the same name. (AddNewUser) One of them works with HttpGet and the second HTTP post. [HTTPGet] Add Public Activity AddNewUser () {User User = Utilities. Session Provider. GETCurrentUser (); If (user.ID_User == 0) Return Direct ("Apps.kosarfci.ir"); RoleType role = (RoleType) RoleDeterminer.RoleDeterminate (); If (Role! = RoleType.Center) {Return Redirect ToAction ("Ban"); } See Return ("Venue User"); } [Http post] Public Action Result AddNewUser (VMNewUser InModel) {User User = Utilities. Session provider GETCurrentUser (); If (user.ID_User == 0) redirect return ("Apps.kosarfci.ir"); RoleType role = (RoleType) RoleDeterminer.RoleDeterminate (); If (Role! = RoleType.Center) {Return Redirect ToAction ("Ban"); } IUserBL Center UsherBel = New Center User BL (); InModel.User.UserName = InModell.User.NationalCode; InModel.User.Password = InModell.User.PersonalCode; Confirm of BULLBL = CenterUsbLl Edusor (inmoded

migration - How to write WI (TestCase) from TFS 2010 to 2013? -

Good day! I try to migrate trial cases from TFS 2010 to 2013 edition. So, I can get worktime from TTS 2010, but how to set it up to 2013, do not know? Please tell me how to write the current WI (Test Seas) in TFS 2013. Thank you. You can create a test case (or TFS API) from MTM or TFS Web Access. If you need to migrate extensively, then you can migrate through Excel or through one of the many TFS migration tools (which often cost money) by using TCIMImport Tool (Google ) You can use.

create a postgresql dump file on ubuntu system -

I am new to the Ubuntu environment and I want to create a database file dump. You can use / usr / bin / pg_dumpall - host {Yourhost} --port {port} --username "{username}" - Database "{dbname}" - any password - webz - file "backup .sql"

python - Kivy use Android Notifications -

Is it possible to use Python and / or Kiwi to send local notifications to iOS? Actually it does not have to vibrate, only a number icon and maybe a real time message will work. Edit: Looking at the comments it seems that Pyobjus will be able to complete it, but I'm not quite sure how. Uh! My dreams are bad My hacking shaw has not been completed yet and PIBOS needs a Mac! It seems that this is going to be an Android app. But I still do not know how to do it. Since you have changed your subject Android. ..I can help! Kivy has a sister project, offers a platform independent form for accessing various APIs through a single dragon interface. A lot of interfaces have been implemented for Android, including notifications, so that you can directly use the player and / or see the code to see how it works. When I did this, I made a small video before, about Android stuff, which you can find, this is only a very quick introduction, but can help.

javascript - Custom google maps marker from sprite and retina proof -

I have learned that when I want to use sprites as Google Map markers, I have to keep it like this : var myIcon = new google.maps.MarkerImage ("../public/img/categories.png", new google.maps.size (90, 50), new google.maps .Point (0, data [i] .subcategory_id * 50); // Like I understand: // new google.maps.MarkerImage (url, original size, anchor point); When creating this retina-proof, I understand that I have to make it this way: // new google.maps.MarkerImage (url, original size, anchor point, null, half size); var myIcon = new google.maps.MarkerImage ("../public/img/categories.png", new google.maps.size (90,50), new google.maps.Point (0, data [i] .subcategory_id * 50), blank, new google.maps.size (45,25); However, when adding additional size, my marker no longer exists. What am i doing wrong As such, @ Duncan said, "I have to use the icon square." var myIcon {url: "../public/img/categories.png", size: new google.maps.size (

iptables -L is slow even with just 2 ip's blocked -

Does anybody know that iptables -l is slow, while only 2 IPs are blocked? Try using iptables -n -l < / Code> Reverse DNS lookup

css - Text overflowing div -

EDIT: Wow, do I feel like heel? This is probably the worst question posted on the internet, anytime. The whole problem is that I tried to fit an incredibly long word in a div and it was overflowing. Sorry, I wasted all the time I am totally new to CSS. I am trying to keep a simple page together with some columns or divs. I can just fine-tune the column, but when I add text to them, the text overflows only the column / division I am within the appropriate div How can I keep the text? I have read in all the books / tutorials / sites, this issue has never been born. So why is this a problem for me? What do people usually do that prevent it from having an issue in the first place? I assume that the browser will once again move the text to a new line, Also, Overflow: I'm not seeing what I'm looking for. I do not want to hide the overflow I want to end the overflow altogether. I just want to flow naturally within the bounds of the text. How can I get it? I've tried

date - PHP Book renewal, update a day -

In php, I want to renew the borrowed book for 5 days, however, it only on today's date Updates, how do I update my borrowing book? Select the book from the book $ sql_renewal = "book. Student's where B.B.D. = BD. BOROBDI and BSSSSSISIISIIIID and BD.BOOK_IBID = BK.BIDIDS S S_email = ''. $ _ Session ['sss_USERN']. '' $) QueryResult = mysqli_query ($ connection, $ sql_renewal); $ row = mysqli_fetch_array ($ query reset); $ return_date = $ row ['bk.returnDate' ]; Counterpart $ return_date; $ return_date1 = s tr_replace ('-', '/', $ return_date); $ updated_return_date = date ('MD-Y', strotom ($ return_data. "+5 days")); echo "& lt; Td> $ Update_return_date & lt; / td> "; You create SQL queries this way or similar $ Sql ​​= Sprintf ('Update bu KSET return date = return date + interval 5 days where booked =% d', $ line ['booked']) After that, simply execute it.

c# - How to use this WndProc in Windows Forms application? -

Please guide me how to use this WndProc Forms in Windows: private IntPtr WndProc (IntPtr hwnd, int message, IntPtr wParam, IntPtr lParam, handled bool ref) {if (msg == NativeCalls.APIAttach & amp; & amp; (uint) lParam == NativeCalls.SKYPECONTROLAPI_ATTACH_SUCCESS ) {// Make the Skype window netic call to the current handle. HWND_BROADCAST = wParam; Handled = true; New Interrupt Return (1); } // Skype sends our program messages using WM_COPYDATA if the data is in lParam (msg == original call. WM_COPYDATA & amp; amp; & amp; amp; amp; WPParam == original call. H.F.F.D.A.A.A.T.T.) {Copdatatadata Data = (Copdatatact) Marshall.traighter structure (LPAMM, typef (COPIDATTCT)); StateTextBox Appendex (Data. LPDT + Enterprise. Newline); // Check for connection if (data.lpData.IndexOf ("CONVITATUS ONLINE") & gt; -1) connect button. I.e. enabled = false; // Check for Call IsCallInProgress (data.lpData); Handled = true; New Interrupt Return (1); } Return IntPt

objective c - ios facebook get posted image by user -

I do not know how to post images by user. My code returns this username and user id, user image But I want to post the user posted images, please help me in the posted comment. This is my code only for user information and it is working but the feed code is not working if (FBSession.activeSession .isOpen) {NSLog (> "> <> gt; & gt; Facebook & gt; & gt; & gt; "); [[FBCAC Request Formation] Beginning End Handler: ^ (FBCACC Connection Connection *, NSDictionary & lt; FBGraphUser & gt; * User, NSError * Error) {if (! Error) {NSLog (@ "% @", user); User name = user.name; // NSLog (@ "% @", user name); // NSLog (@ "% @", user.id); User ID = user.id; // [Self saviuserid]; // [auto save name]; NSLog (@ "> gt;> Name: gt; & gt;% @", user.link); StringImage = [NSString stringWithFormat: @ "https://graph.facebook.com/%@/picture", user.id]; NSLog (@ "& gt; & gt; Image Link&

java - Using scanner to read string from text file and then print out -

I have a text file that has a string, - "! - ========= == All the objects in classes: FunctioningFrages: Detelad =========== " In this as you can see in the code below. If there is this string in the text file, then I need to read it from the text file and then print it again. The problem is that I can not do that work, why my code is not printing. Any help would be appreciated thanks! public class Main {public static void main (String [] AGR) file throws Notfound Akspesheshn (File = new File ( "C: / Users / Anton / Pictures / 1 x Jiotronsform. 5m. cinematography "txt); Scanner scan = new Scanner (file); while (ScankhasNext ()) {string str = scan.next (); if (str =="! - ======= ==== all purposes in the classroom: Fasisreshnsfas: Diteelad =========== ") {System.out.print (str);}} scan.close ();}} < / pre> use under code, to use a word to read just before the scanner. The whole line .. Scanner scan = new Scanner (file); string str1 =

ms access - Export data from continuous form to Excel w/o header fields -

Text after I have a continuous form, where there are form header filter options, and the details section is data. I want to be able to export it for excellence. Basic VBA code works DoCmd.OutputTo but When I export in Excel, it also includes form header control for each line. Is there any way to set up a property that will exclude form headers from joining in export? Basically, only the form details section export I do not use a question I have 6 unbound text boxes in the title: -? Artnr - Artnr Supplier - Description - Article Status - Supplier Name - Supplier Number And I Have A Search Button That Keeps This Code: Personal sub cmdSearch_Click () Dim strWhere string dim lngLen So as IsNull Long 'artikel zoeken (my.txtSearchArtnr) then strWhere = strWhere & amp; "(Like [physical]" "*" & amp; Me.txtSearchArtnr & amp; "*" ") and" end if "artnr leverancier zoeken if not IsNull (Me.txtSearchSupplArt) then str

agda - Why is typecase a bad thing? -

दोनों Agda और Idris प्रकार के मूल्यों पर पैटर्न मिलान प्रभावी ढंग से निषेध करता है प्रकार । ऐसा लगता है कि आगरा हमेशा पहले मामले से मेल खाता है, जबकि इड्रिस ने सिर्फ एक त्रुटि फेंकता है तो, क्यों टाइपकेस एक बुरी चीज है? क्या यह निरंतरता तोड़ता है? मैं विषय के बारे में अधिक जानकारी प्राप्त करने में सक्षम नहीं हूं। यह वाकई अजीब है कि लोग सोचते हैं कि पैटर्न प्रकार पर मिलान खराब है हमें डेटा पर मिलान वाले पैटर्न का बहुत लाभ मिलता है जो एन्कोड प्रकार, जब भी हम ब्रह्मांड निर्माण करते हैं यदि आप उस दृष्टिकोण को लेते हैं जो थॉर्स्टेन अलटेनचिर्च और मैंने अग्रणी (और जो मेरे साथियों और मैं इंजीनियर शुरू हुआ), प्रकार एक बंद ब्रह्मांड बनाते हैं, इसलिए आपको (स्पष्ट रूप से हल करने की ज़रूरत नहीं है डेटा के रूप में प्रकार के उपचार के लिए खुले डेटाटाइप के साथ कंप्यूटिंग की समस्या। अगर हम प्रकारों के साथ सीधे पैटर्न का सामना कर सकते हैं, तो हमें उनके अर्थों के प्रकार के कोड को मैप करने के लिए डिकोडिंग फ़ंक्शन की आवश्यकता नहीं होगी, जो सबसे खराब तरीके से अव्यवस्था को कम कर देता है, औ

file - boost log every hour -

I am using a boot log and I want to create the original log principal file: New error log at the beginning of each hour (If error exists), and name it like "file_% Y% m% d% H.log" With this boost library I have 2 problems: 1. How to rotate the file at the beginning of each hour? This is not possible with the rotation_at_time_interval parameter because it creates a new file about the first written record in the file, and that hour in the file name does not match that rule. Can there be multiple rotation_t_time points for a file in sync or is there a different solution? 2. When the file is more than a size, I want to start a new file and in that case it should attach some index to the file name. Adding the Rotation_size parameter and% N with the filename will increase it all the time while the app is running. I want to reset N to the beginning of every hour, as my file name changes. Does anyone know how to do this with the Boost log library? It is fundamental to create lo

html - Focus rectangle for input button on IE11 -

Image
Focus rectangle on IE11 is very noticeable .. I have reviewed my CSS file and any related style Could not find .. Is anyone encounter this? How can I solve it? This focus rectangle is not present on earlier IE versions .... Update: Thanks to @TimB James, I have modified the CSS: input [type = "submit" ], Input [type = "button"], button {background color: # d3dce0; Border: 1px solid # 787878; Cursor: indicator; Font-size: 1.2mm; Font-weight: 600; Padding: 7px; Margin-right: 8px; Width: Auto; Profile: 0; Focus, focus, focus, focus, input [type = "submit"]: focus, input [type = "button"]: focus, button: focus {border: 1px solid # 7ac0da; Outline-style: dotted; Outline-width: thin; } Thanks a lot. Use Settings: Anyone your CSS rules for those buttons (Or specify a different, less noticeable, outline) in

eclipse - Android App Deleted -

I'm new to Android. Recently I uploaded an app on Google Play but did not advertise it in (I think That I will do this and just update the app). The problem is that when I was trying to fix some errors in my app code (I am using Eclipse) I tried to remove it from eclipse and import it back. I checked "Copy the projects to workspace" and I do not know why, the whole project has been removed. Files are still, but they have 0 bytes. I still have APK. Is there a way to recover files or codes back? thank you in advanced! I'm not sure that you can recover the code. If you have an APK, try to use Dex 2's. Next time make sure you back up all your projects!

ruby - Rails 4.0 undefined method `call' -

I have a rail app by which I am creating a highchart line graph which includes 2 industries, telecommunications and agriculture. The following are the shares, Ryan Bats Higstox Video. The graph will be index.html.erb of an output, stock_quotes, by which the JavaScript code for the highlight is as follows: , Points start: <% = 2.weeks.ago.to_i * 1000%>, Data: & Lt;% = (2.weg .go.to_date..Date.today) .map {| Date | Stockquite.Price_On (date) .to_f} .inst%>}, & lt;% end% & gt;]}}}}); & lt; / div> The model stock_quote.rb is as follows: area: agric, where (category: "agriculture") area: telecommunications, where (category: "telecommunications ".def (all_price) end This is going to be output on the stock_quoass device: / P> $ (function () {new high charts. Chart (chart: {rendereTo: "quotes_chart"}, title: {text: "Daily Trades"}, XAxis: {type: "datetime"}, yAxis: {title: {text: "shi

ios - Create segue based on a downloaded config file -

To perform advanced A / B testing, I want to be able to create segue based on a config file. When I launch, my app downloads a JSON file to make the parts of the main page dynamically. For example, will create 2 buttons on the following main view like a JSON. First button will be blue with the "button1" label and the second label will be red with "button2". {"Type": "button", "label": "button1" "color": "blue"}, "1": { "Type": "Button", "Label": "Button 2" "Color": "Red"}}; Now, I want to add something to JSON like this: "goto": "OptionViewController" where the value of the goto key is displayed when the displayed button Clicking on I want to be able to add or remove the buttons on the main page (how to do this) and to change the view associated with a button (this is my problem) Remotely, just download

nsis - nsDialogs invalid command -

I through which I have a problem with my NSIS script to a custom page, where users access clientid insert a textbox the problem I have received so far that my compiler is my error: invalid command: nsDialogs :: Create error in the script "C: * Directory * \ Installer .nsi "On line 35 - Proclamation being terminated Security I have both nsDialogs.nsh and my script LogicLib.nsh included.! NsDialogs.nsh! LogicLib.nsh var dialog Var label text named "Installer" Autfail "Installer.exe" InstallDir $ PROGRAMFILES \ MyProject RequestExecutionLevel admin page directory page confirm custom nsDialogsPage nsDialogsPage move page instfiles UninstPage uninst UninstPage instfiles section Installer SetOutPath $ INSTDIR file / R "* release folder * "" Uninstall.exe "WriteUninstaller calls InstallService SectionEnd function nsDialogsPage nsDialogs :: create 1018p $ Nwad $ {are} $ dialog off == error between $ {endif} $ {NSD_CreateLabel} 0

git - Gitflow - master and develop diverged -

The model of the implemented git branches is shown below But my branch Step 1: Merge for release in Master (no faster than forward) Step 2: Merge release in development (no faster than forward) After merging with step 1, it will not be available for step 2, the development and master gets separated. How to develop and master the separation git-flow model naturally develops and master deviation There is no way to follow that workflow and make sure that develops and One of the master is always the ancestor of the other. If you have a look at Master and in the development you should only see the merge committ: git log develop..master This means that if you use the following git-log command, then the output should be empty: git log - If you are not satisfied with this answer, please explain why it counts for you, to explain your question, develop and Master should not be different from each other.

asp.net - SELECT WHERE in asp web forms -

I have a lot of problems with ASP web form, currently I try to get data from a database and data It is based on what the user enters into a text box of a form. I have found so far that at the moment it will select data from the database if I have prepared the last bit about it, but as soon as I try to filter it by saying it That should declare scalar convertible @ 1. I'm killing my head against a brick wall at this time } & lt; form method = "find"> gt; & gt; table & gt; & lt; tr & gt; & lt; Td> Enter employee ID & lt; / Td> & Lt; Td> & Lt; Input class = "id" name = "searchId" type = "text" /> gt; & Lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td> Date from date & lt; / Td> & Lt; Td> & Lt; Input name = "search df" style = "cursor: text" value = "">> gt; & Lt; / Td> & Lt; / TR & g