Posts

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 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 loadState () ...

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...

configuration - How to configure web proxy for Jing -

Jing is great but it will not start unless the mother can call the ship. Through my internet access corporate web proxy, Jing does not offer any way to configure its connection to the Internet. You thought it would only use windows internet connection settings that work for browsing but no dice. Does anyone solve this problem? Maybe some configuration files or registry settings that will fix this? Thank you! I know that you thought why you were not working, but using a proxy here How to configure zing to create a jing.exe.config file inside the c: \ program files \ techsmith \ jing directory and put it in: & lt; Configuration & gt; & nbsp; & Lt; System.net & gt; & nbsp; & Nbsp; & Nbsp; & Nbsp; & Lt; Default proxy enabled = "true" use default credentials = "true" & gt; & Gt; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Nbsp; & Lt; Proxy ProxyIDS = "http://proxy....

shell - LaTeX: Which OS am I running on? -

I am writing a latex package for which it is necessary to use \ write18 . Some shell commands I give are system-specific (e.g., rm vs. del ). Is there a way to decide which system I am running? It will be enough to be incompatible with Windows and other (Unix-like) systems. Take a look at the LaTeX ifplatform package. There have been lots of discussions about reliable methods in many platforms, and current releases work very well.

c# - Using iTextSharp to save to file the fonts used in a PDF file -

This is quite a duplicate, but hopefully anyone can now find out and be helpful. I am looking for the capability of some NIT code which removes the embedded font in PDF in a font file. I am currently using iTextSharp, but I am open to other .NET libraries (eg, PDF boxes, PDF clicks, etc ...) I basefont I am able to iterate the information from the gate document font (), but I am not clear on the font file to stream the font. Thank you, Kenny itemprop = "text"> @himastastone - This is actually really simple font name, at least iText / In iTextSharp (PDF box too - but I do not have a code around now) but in iTextSharp, you will do the following: PdfReader reader = new PdfReader (strFileName); & Lt; Object [] & gt; StrFonts = BaseFont.GetDocumentFonts (Reader); And it is, most libraries have been written for simple extraction of the font (name in any case).

Google Charts: chxl and bhg -

http://chart.apis.google.com/chart?cht=bhg&chd=t3771.5 , 3220 | 5508.25,5366.75 & amp; chs = 400x200 & amp; chds = 0,9000 & amp; chxt = एक्स & amp; chxr = 0,0,9000 & amp; Chm = N * cUSD2s *, 000000,0, -1,11 | N * cUSD2s *, 000000,1, -1,11 & amp; chco = 4D89D9, C6D 9FD लेबल कैसे लगाएं प्रत्येक समूह के लिए? chxl = 1: मध्य माध्य - ऐसा कुछ करना चाहिए, लेकिन परिणाम कुछ भी नहीं है समूहों द्वारा मेरा मतलब यह संख्या: 1 = { 3771.5, 5508.25}, 2 = {3220, 5366.75} इसे जोड़ने की कोशिश करें: & amp पूर्व chxl = 2: | मतलब | माध्य | हो सकता है कि यह ठीक वही न हो जो आप चाहते हैं, लेकिन जब मैंने कोशिश की तो यह ठीक काम करता है।

tomcat - Where does Eclipse deploy web applications using WTP? -

I have a web application (war file) when I deploy it via eclipse 3.5 using WTP tools I am able to start the Tomcat server within Eclipse and I look at all the pages of the application. Although I do not see my war file in the webapps folder in the Tomcat Home Directory (or for that case for its explosion format), I was under the impression that Tomcat has allowed its web applications to be used by its WebAp folder reads how Tomcat has read my application in this case? I am using Tomek 5.5.17 as my application server. This is just Context.xml given to eclipse tomak if you If you want to configure this behavior, click the Tomcat instance twice to view the server and see the Server location section. In order to get you the desired / initially, you need to select Use the Tomcat install and specify Deploy Path Path if necessary.

sql - How to do multiple aggregated columns in a select statement -

To stop instant-ripplers, I tell that I am not using MySQL so I use it Can not GROUP_CONCAT, and I have already seen it already. Example (This is not the data with which I am working, but it accurately describes my case) The individual table, With ID, name column Person_Countries PersonID, Table Visited with Country Columns (1.m. Linking Table) Person_StatesVisited Table, with PersonID, State Columns (1.minking table) Obstacles I can not modify the DB. I can not modify the code as much as possible. So, therefore, it should be done in SQL, not later run the query code. desired result Set a result with the column Person.ID, person .name, [List of related person's list Country], [List of related people: Prop. Protected.], This can also be filtered by a normal search term that applies to all columns. My attempt Now, my SQL-Foo nowadays is not fast, but what I'm doing is based on examples of what I do I am here. 1) I have tried to use a scalar s...

excel - Nested If Statements Returning zero if nothing entered in cell -

The formula listed below. I would like to go back to zero if nothing is recorded in the cell. How do i do this = IF (E6> 0, F6 / E6, "") = IF (ISBLANK (E6), 0, IF (E6 & gt; 0, F6 / E6, ""))

SSL with Ruby on Rails -

Why do I need to get rail traffic on the Ruby app to use the train app? I have a certificate set up and if I manually type in "https: //" in the address bar to reach the site, a little lock icon appears, but manually www.example-app Goes to http and sends traffic through http in your browser: //. Is there a one-line configuration or is it more complicated than that? I had never compromised before the SLL, so forgive me if I think I do not know what's going on. I'm hosting a MediaTemle on (GS), if this is the case or Check this gem. This lets you specify in your controllers which actions should be served on https and which action may be It will then take care of redirection from http to https. From the document: class ApplicationController & lt; SslRequirement End Class Account Controller in ActiveRecord :: Base & lt; ApplicationController ssl_required: signup, payment: ssl_allowed: index def signup # Non-SSL access will be redirected to...

asp.net - Parse Credit Card input from Magnetic Stripe -

Does any magnetic card know how to parse the credit card string input from swipe? I never tried to work on javascript parser. The input looks like this. % BNNNNNNNNNNNNNNN ^ ^ DOE / JOHN ^ 1210201901000101000100061000000 ?; Nnnnnnnnnnnnnnnnn = 12102019010106111001? There are N credit card numbers. see: Format code = " B "- One letter (alpha only) Primary account number (PAN) - up to 19 characters Field Separator - One Letter (usually '^') Name - Normally on the name of two to 26 characters, but does not always match the credit card number. Field separator - One letter (usually '^') Expiration date - four characters in the form of YYMM. Service code - Three letters Discretionary data - Pin verification key indicator (PVKI, 1 character), PIN verification value (PVV, 4 characters), card verification value or card verification code (CVV or CVK, 3 characters) PINs may be included Longitudinal redundancy probe (LRC) - A cha...

iPhone reverse geocoding: give all possible streets/suburbs? -

I know the core space is not always accurate on the iPhone, in that area, possibly catching all the points of the suburbs / streets Is there any way to use space (late / tall) with accuracy? So instead of using reverse geo-codeing and estimating the way 'the best possible suburban / street, is it possible to create an array of all possible suburbs / streets (or any other format)? Which can be considered? Thank you! So, the best way to do this is using the Google Maps API, for example See the following URL: As you can see, for this pair (latitude, longitude) you have 10 potential placemarks for this coordinate. Here you can find: You can see that you get the information in XML, JSON, CSV. Take a look at the status code, it is important to verify whether was easy. = Coordinate Double longitude = coordination. Lame; NSString * urlString = [NSString stringWithFormat: @ "http://maps.google.com/maps/geo?q=%f,%f&output=xml", latitude, longitude]; NSUR...

asp.net mvc - Testing user role , Authorize attribute in VB.NET -

I am using ASP.NET MVC to create a site. I am using VB as a programming language. I have some questions. 1 I have created a role "Manager" How should I check that the user belongs to this particular role? For now I'm using if My.User.IsInRole ("Manager") then 'see another option for direct one other view Is this the right way? How to use the authorized attribute to restrict access to 2 functions? I know that in C # this happens [authorized (roles = "manager")] but not sure in VB besides , I can define that user to redirect, at which point there is no "manager" role for a particular view while trying to access this function. Thanks in advance. This will be in VB: & lt; Authorized (roles: = "manager") & gt; _

packet marking(IP Traceback) in C# -

I am looking for implementation of IP traceback using packet marking algorithm in C #? I google it > Not even because C # is not for hardware programming !!!!

actionscript 3 - Synchronize the Playing of Multiple Video Files in Flash AS3 -

I would like a controller to sync and control multiple video objects (start / stop simultaneously). Is this possible? I think I understand your question. If I do, then the answer is yes. You can act as the controller of many videos (FLVPlaybacks, JW Player, FlowPlayer) as a class ... Basically you can control your 1 controller Use any calls to proxy so that you can make a video on all your videos. Then you will have something like the following: Function play (): for zero {{var i: number = 0; i & lt; video.lamp; i ++} {video [I] play (); }} or even function play (): zero {var playvideo: function = function () {this.play () }; Map (playvideo, departures); }