Posts

How to get reference to jQuery selector for content just added via manipulation method? -

यदि सामग्री को डोम में उपयोग किया जाता है, उदाहरण के लिए, $ ("ul" ) .append ( "& lt; li & gt; परीक्षण & lt; / li & gt;"); किसी नयी सामग्री का चयन करने के लिए सामग्री को अभी जोड़ा गया है? एपेंड () विधि से रिटर्न वैल्यू असाइन करना JQuery ऑब्जेक्ट। var newContent = $ ("ul")। एपेंड ("& lt; li & gt; टेस्ट & lt; / li & gt;"); कोई भी कर सकता है var newcontent = $ ("ul li: आखिरी"); लेकिन क्या इसे और अधिक सीधे प्राप्त करने का कोई तरीका है? धन्यवाद का प्रयोग करें: लक्ष्य के अंत में मिलान वाले तत्वों के सेट में प्रत्येक तत्व सम्मिलित करें ... और .appendTo () तरीके एक ही कार्य करते हैं। मुख्य अंतर सिंटैक्स में है- विशेष रूप से, सामग्री और लक्ष्य की नियुक्ति में। .append () के साथ, विधि से पहले चयनकर्ता अभिव्यक्ति वह कंटेनर है जिसमें सामग्री डाली जाती है। .appendTo () के साथ, दूसरी ओर, सामग्री विधि से पहले होती है, या तो चयनकर्ता अभिव्यक्ति के रूप में या मक्खी पर बने मार्कअप...

Execute and output PHP on a C based web-server - Stuck! -

I am doing some research for the university and I am completely amazed, in fact I have a basic web server in C ( Which uses sockets). I have now got to create it so that any .php file can be run via PHP Compiler and output. The problem I feel is that I tried to use the system () and execlp (the latter was suggested by our lecturer) and do not know how to show it on the page instead of the terminal. This is an exclamation showing the current code. Please excuse all comments ... As you can see that I am trying all kinds of work to do it! CODE: if (strncmp (resource, ".php", 4) == 1) {// cout & lt; & Lt; "testing"; int php; int phppipefds [2], phppid; Four phpc; Pipes (phppipefds); Phppid = fork (); If (phppid == 0) {// children will read the pipe closed (0); // Close studin duplex 2 (ppppfds [0], 0); // reading pipe on studin clause (ppppfdf [1]); // We do not need to write pipe execlp ("/ application / mamp / bin / php5 / bin / php...

recursion - Why won't this Prolog predicate unify? -

I write a bill to find all the potential successor states for the repetition of A * and [(cost, State), ...], which stands at this time: addSuccessors (L, [], _). AddSuccessors (L, [x | T], oristist): - Add (Orgistist, Index, X), ((X, Index), L, List 2), Add Softers (List 2, T, Oristist). AddSuccessors (L, [x | []], Origin: - Add (Genesis, Index, X) (X, Index), L, L2), Add Softers (L2, [], Oristist). Adds something to the end of a list, Memambi receives the th element of a list (index) I know that they work, and when I down to L2 Undoubtedly, I find something like this. - addSuccessors (X, [1500, 3670], [0, 0, 0, 1500, 3670]) x = []; [(1500, 3), (3670, 4)] x = []; X = [_G1175]; [_G1175, (1500, 3), (3670, 4)] x = [_G1175]; X = [_G1175, _G1181]; [_G1175, _G1181, (1500, 3), (3670, 4)] x = [_G1175, _G1181]; ... Which is very disappointing because [[(1500, 3), (3670, 4)] is what I want to do after calling X, so it looks "text"> I am briefly after programmed...

Replacing Multiple XML Node values in TextPad -

I have a file with value "XMLNodeName" "CloseXMLNodeName" change the "value" for each entry of "NodeName" - I need to change all the 'values' with spaces How can I do this in a text pad? textpad? I'm not aware of him, do you have to do it with that device? Most editors will have to find / replace functions and you will be allowed to use regular expressions. Can you easily match all the features and can replace the value with nothing, is there only one feature for each tag? If you have a sample file that you are trying to modify, then it may be easier Edit - "Unknown" - I Not sure of the fact that without a single word, you can help you with a regular expression. Can you edit your post and show us an example?

c# - how to deal with quotes in a string when passing that string to the command line -

I can not find my head around quotation marks. EG, I have a string for MP3 with quotation marks: string ARTIT = "John" The Man \ "Do" Then I want to give it on a command line to avoid scenes. So I need my string (I think): ARTIT = "John \\\" the man \\ "doo" then It seems, every time I have my string (actual) " , I need \" . I have tried: ARTIST.Replace ("\" "," \\\ "") but It is not working. What is the correct way to handle quotes on the command line in my application? Be sure you are: ARTIST = ARTIST . Replace ("\" "," \\\ ""); Instead of: ARTIST.Replace ("\" "," \\\ ""); Is this already the case?

php - Merging sql queries to get different results by date -

I am trying to create a 'Recent Events' feed and it can not seem to be true or my query It is possible how to merge the results from two queries to sort them from the date. Plays a table, and another table holds the functions of these games / I am trying to get recent events to show users 1) Games that are publicly visible (published) 2) When a new game has been created and published Then, in my work table action id, gamid, user id , Action type, last updated in my game table gameid, start date, , Published, last updated I currently have such a query (simplified for easy understanding of understanding me) select action, actions.gameid, userid, functional work, verb. Remove from actions. (Select games.gameid, start date, createdby, published, games.lastupdate games from games published WHERE = 1 and the last update> today-2) published on actions.gameid = games.gameid where games (type 2, 4,5,6,7) and actions.lastupdate & gt; Games.lastupdate and publi...

c# - System.Data.Linq.ChangeConflictException: Row not found or changed -

I wasted a better part of the day and I am not close to understanding this issue, what was I in the morning? I am looping through a set of objects and marking them to delete. The second one always causes the exception to the above. Tb_invoice is an FK in tb_shipment. As always, I'm probably missing something very obvious, but I've already stripped a lot from this code that nothing is left, and I'm still getting this exception, it's a The local SQL 2008 example is definitely nothing and no one changes between invoicing and reading of the invoices. help! myDataContext db = new myDataContext (); IQueryable & LT; InvoiceDetail & gt; Pending Challan = db.GetInvoiceDetailPending (); Forex Currency (Invoice Discrete ID in Pending Invoice) {tb_shipment s = db.GetShipmentById ((Guid) id.shipment_id); Db.tb_invoices.DeleteOnSubmit (db.GetInvoiceById (s.tb_invoices.FirstOrDefault (.ID));} Variable fails (); // Other invoice fails Setting the "Cascad...