Posts

.net - Deserialization of key value pair in XML to c# object -

I have XML as shown below. & lt; Device-array & gt; & Lt; Device & gt; & Lt; ID & gt; 8 & lt; / Id & gt; & Lt; Properties & gt; & Lt; PropKeyValuePair & gt; ... & lt; / PropKeyValuePair & gt; & Lt; PropKeyValuePair & gt; ... & lt; / PropKeyValuePair & gt; & Lt; / Properties & gt; & Lt; / Tools & gt; & Lt; Device & gt; ... & lt; / Tools & gt; & Lt; Device & gt; ... & lt; / Tools & gt; & Lt; / Device-array & gt; I plan to distribute it to the C # object so that it can be done faster. I just need an id area but I think there is an array required for class (properties) but how can I represent important value verb? [serialable] Public class SLV jioojone {[XML ("ID")] public string id {get; Set; } // Important value pairs entries here? } requires suggetions You can use LINQ in XML instead of Deserialization and just get what you need: ...

mysql - How to return the most recent record of a GROUP BY statement -

I have a table (call_history) that has several records against a single ID in another ID (call_detail) Trying to return which will give me a line for each ID, but the most recent entry For example, group all the rows against a single ID, but return only the most recent row to the updated_at field (which is a date field). My query so far ... select MAX (cd.id) id, cd.first_name, cd as .summary, cd.due_at, ch. Body, ch.updated_at cd.id = ch.ticket_id as CH, call_detail from call_detail as cd.status = 'Open' and (now () () ( ... what i want like returns, but this gives me the oldest entry for the update_t field. Update My table structure is as follows: Call_Detail id | Summary | Details | Due_at | First_name | Last_name 1 Call 1. Some text | 20/02/2014 17:00:00 | Joe Blogs 2 | Call 2 Some text | 18/02/2014 15:00:00 | Fred | Durst 3 | Call 3 Some text | 02/03/2014 01:00:00 | Joe Blogs call_history id | Ticket_id | Body | Updated_at | First_name | Last...

mysql - Deleting my data in my table but not in database -

I have a query I wanted to delete my data in my browser table, but I do not want to permanently delete it , I should just hide it. My problem is that I do not know what kind of inquiry I would need. Here is my delete query. My table feild id name and flag are I want to do this when the flag is 1, it shows the table and if it is 0, then it will be hidden when the delete button is pressed. function delete () {$ id = $ this- & gt; Input-> Find ('id'); $ SSQL = "Delete from table where id =?"; $ This- & gt; Db- & gt; Query ($ sSQL, array ($ id)); } You can simply update the flag, and in your selected query only select Flag = 1 Try it out, $ sSQL = "update tableclick set` flag '= 0 where id =?";; $ This- & gt; Db- & gt; Query ($ sSQL, array ($ id));

html - Stretch div to div which has fixed width -

Image
I have 2 divs inline, one of them has a fixed width. I want the div to fill in second place when the window is adjusted. To clarify the situation, take a look at the picture below: After the resize window, I need to get the next layout: How can you do this? You can take advantage of display: table-cell .

javascript - How to manage server user session within client side single page app -

I am roaming with different client side technologies, like AngularJS, EmberJS, even using JQuery directly In addition to how to use ReactJS, besides my goal client and java jersey 2 jacks-rs back and api, make a single page app using jsn. I have two stops now. I know some information..I am deploying my app as a war file in Jetty. The end of my back is Java based. I'm just using jquery in the client side as My main hurdle is how to handle logging and session management, with using a comfortable API and AJAX, I am working with the installation of a cookie. My concern is with just one page app, it's just an index page, and if the user closes the browser, it opens again on the pointer page, while the cookie / session is still good, the user is logged in Should see, not out (not logged in) page, how can I handle it, whether it is a jsp page, some templatelabour library etc index.html, etc. With JSP, I can include some written code (against my best decision). In the old days ...

c# - multiple attendance by face detection -

I have to add more than one presence to the database using face recognition. I tried a lot but was still not able to do this because my single presence is added to a single cell, but I have to add every presence to each cell. Can anyone help me by using the loop? {conn.open (); SqlCommand cmd = New SqlCommand ("InsertAttendance", conn); Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.Add ("@AddressId", SqlDbType.BigInt). Valu = textAttendanceID.Text; Cmd.Parameters.Add ("Student Roll", SqlDbType.VarChar) .Value = textname.Text; Cmd.Parameters.Add ("Date", SqlDbType.DateTime). Value = DateTime Picture 1 value; Cmd.Parameters.Add ("Status", SqlDbType.VarChar) .Value = textStatus.Text; Cmd.ExecuteNonQuery (); Cmd.Dispose (); Conn.Close (); MessageBox.Show ("The presence was successfully inserted ..."); } You need to review. This article is shown in easy mode to pass data tables to SQL Server and ins...

Remove only one newline from the end of string in vb.net -

मेरे पास नीचे की तरह एक स्ट्रिंग है test1 test2 test3 newline newline newline यहां मैं पिछली न्यूलाइन को निकालने के लिए केवल s = s.TrimEnd (ControlChars.Cr, ControlChars.Lf) का उपयोग कर रहा हूं, लेकिन यह सभी तीनों न्यूलाइन को निकाल रहा है। मैं स्ट्रिंग से केवल एक ही अंतिम पंक्ति को निकालना चाहता हूं पहले से धन्यवाद ... आप इस तरह की कोशिश कर सकते हैं: यदि (s.EndsWith (Environment.NewLine)) {s = s.Remove (s.LastIndexOf (Environment.NewLine)) }