Posts

Featured post

utf 8 - Change encoding from UTF-8 to ISO-8859-2 in Javascript -

I would like to change the ISO-8859-2 string encoding from UTF-8 in Javascript. How can I do this? I need this because I have designed a widget that the user just copies & lt; The script> Tags from my site and puts it on itself creates this script Div and puts it into the div widget content with text. If the target website is in UTF-8 encoding - it works fine but when it is encoded in text in ITO-8859-2 that is encoded in UTF-8, ISO-8859-2 on site Is displayed along with and consequently I see garbage. Instead of using the example "Ĉ" in your Javascript code, escape Unicode such as "\ u0109" ".

Problem with java socket, won't listen for more than one datagram package -

I am creating a server (which is now called a server) which is communicating with another server which is I have received (which is now called Server 2). Sends a datagram package to Server 1 on Server 2. Server 2 is supposed to send back two Datagram packages, but I get only one back. Server 2 is not a problem, and sends two packages. I use VirusHark to sniff the package which comes on cards and server 1. Package One): "5955 11 99 4.023 9 74 192.168.1.3 192.168.1.2 UDP Source Port: 50000 Destination Port: 50,004" Package Two (from wireshark): 5958 11 99 4.045830 192.168.1.3 192.168.1.2 ICMP destination not accessible (port not accessible) The server runs a thread that is listening to the Datagram package. Code Server 1: while (m_keepRunning) {try {term msg receive messages = null; Received Messages = Received (); (If received (ReceiveMessage.getMsgType ()) (TermMsgType.ACK)) {println ("This is a acknowledgment!") // See this function and b

unix - Listing all shared memory segments used by a process on AIX5.3+ -

I would like to find all the shared memory segments used by a given process I am particularly interested in detecting shmid That's why I can use it in call (shmctl). On Solaris I will just read / proc / $ PID / map to find that information (field pr_shmid) The content of that file is defined by struct prmap_t in the sys / procfs format. Ax also has a / proc / $ PID / map file. Any project is a primate, but unfortunately it has been projected in pr_shmid field. Any ideas how can I get it on AIX5.3 +? I do not particularly know about AX, but I think that ipcs command is quite standard where SysV IPC is supported, so I want to get the ipcs -m command to give the appropriate code; If you can not find a better method, then there may be an option to parse its output.

Java, executing a method when object's scope ends -

I have an object with a fixed position passed to the object and this state has been temporarily replaced. is. Something like this: Public Obligation (MyObject obj) {obj.saveState (); Obj.changeState (...); Obj.use (); Obj.loadState (); } It is possible to use the scope of the object to run some code while constructing and destructing in C ++, such as << p> NeatManager (MyObject obj ) {Obj. Save the state (); } ~ NeatManager () {obj.loadState (); } and call it delete something (MyObject obj) {NeatManager mng (obj); Obj.changeState (); Obj.use (); } This simplifies the work, because the save / load is tied to the NeatManager object, is it possible to do something like this in Java? Is there any way a way to call a method, when the object goes out of the scope, which it has been declared? There is no point in the closest possibly one attempt / ultimately block: try {obj.changeState (...); Obj.use (); } Finally {obj.loadState (); } ensures that

objective c - iPhone and it's wireless area -

Is this a way to find other iPhones in the category of wireless areas? So I give an example. I'm staying at the airport somewhere I have an iPhone too. I and the other iPhone owners are playing the same game. Is there any way to warn me and the other player that we are close to each other? Does this work even if we are not on the same wireless network, or there is no wireless? And if there is any way to do this, can you give me some starting point? Like a link where I can learn something like this or maybe this is probably the name of this process, because I do not know how to search about this topic in Google. Thanks in advance! Can be completed with peer-to-peer discovery and connectivity you are describing Game Kit Framework Originally I thought it works only through Bluetooth, but after watching it immediately, it seems that WiFi is also supported. Hope it helps!

tsql - Correct sql/hql query (aggregate in where clause) -

I want to query the query as below but the question is wrong but describes my intentions. select name, date time, data from record, date time = maximum (date time) Update: OK The description of the query intentions is not very good. My bad I want to select the latest record for each person. i like Mickey's answer and quosnoye (and upyoyed miki), but if your needs are similar to me , You should keep in mind some limitations. First and foremost, this works only when you are looking for the latest record or latest record for the same name. If you want the latest record for each person in a set (a record for each person but the latest record for each), then the above solutions are small. Second, and less importantly, if you work with a large dataset, then it can be slow for a long time. So, what's around the work? Whatever I do is to add a small field to mark the "latest" in the table. Then, when I store a record (which is done in the stored procedu

.net - Self Tracking Entities (STE)'s and partial updates with EF4 and mVC2 -

I have an MVC2 app where I'm starting to use 'I'm looking for some explanation How updates should work. Background: If I have a blog entity with related category entities and related posts / comments, In MVC I am providing a view with main blog unit and categories but not related posts. When I post back the blog unit to the server, then I can see the related categories but not the post (because they were not in the view) back in the unit ordered on the server. In addition, there is a changing state of the blog unit's 'edited'. Then I'll try to call the implementer () and SaveChanges () to make an update to the unit and post it With FK fails due to relationships and the fact is that there are related posts in the database but I am returning back. With some more trials ... if I take a current example of the blog unit (with all related FK entities), while connected to the server (state = unchanged), modify the property (State = modified) and i