Search Results

Search found 1130 results on 46 pages for 'encode'.

Page 4/46 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Java: Moving Away from XML Encode

    - by bguiz
    Hi, We have this software which loads various bits of data from files that are written using XMLEncode (serialization using XML). We want to migrate from that to our own proprietary file format (can be XML based). Is there a automated way to achieve this initial conversion, without having to perform a deserialization, and then write those objects out in the new format? XMLEncode format --> New proprietary file format Thanks!

    Read the article

  • Base64 Encode String in VBScript

    - by Patrick Cuff
    I have a web service load driver that's a Windows Script File (WSF), that includes some VBScript and JavaScript files. My web service requires that the incoming message is base64 encoded. I currently have a VBScript function that does this, but it's very inefficient (memory intensive, mostly due to VBScripts awful string concatenation) [Aside; Yes, I've seen Jeff's latest blog post. The concatenation is happening in a loop across messages that are 1,000's to 10,000's bytes in size.] I've tried using some custom string concatenation routines; one using an array and one using ADODB.Stream. These help, a little, but I think it would help more if I had some other way of encoding the message rather than via my own VBS function. Is there some other way of encoding my message, preferebly using native Windows methods?

    Read the article

  • jQuery JSON encode set of input values

    - by gurun8
    I need tp serialize a group of input elements but I can't for the life of me figure out this simple task. I can successfully iterate through the targeted inputs using: $("#tr_Features :input").each(function() { ... } Here's my code, that doesn't work: var features = new Array(); $("#tr_Features :input").each(function() { features += {$(this).attr("name"): $(this).val()}; } Serializing the entire form won't give me what I need. The form has much more than this subset of inputs. This seems like it should be a pretty straightforward task but apparently programming late into a Friday afternoon isn't a good thing. If it's helpful, here's the form inputs I'm targeting: <table cellspacing="0" border="0" id="TblGrid_list" class="EditTable" cellpading="0"> <tbody><tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Cable Family</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:8" name="feature_id:8"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Material</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:9" name="feature_id:9"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Thread Size</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:10" name="feature_id:10"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Attachment Style</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:11" name="feature_id:11"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Feature</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:12" name="feature_id:12"></td> </tr> <tr id="tr_Features" class="FormData" rowpos="1"> <td class="CaptionTD ui-widget-content">Comments</td> <td id="td_Features" class="DataTD ui-widget-content" style="white-space: pre;">&nbsp;<input type="text" value="" id="feature_id:13" name="feature_id:13"></td> </tr> </tbody></table>

    Read the article

  • IDN aware tools to encode/decode human readable IRI to/from valid URI

    - by Denis Otkidach
    Let's assume a user enter address of some resource and we need to translate it to: <a href="valid URI here">human readable form</a> HTML4 specification refers to RFC 3986 which allows only ASCII alphanumeric characters and dash in host part and all non-ASCII character in other parts should be percent-encoded. That's what I want to put in href attribute to make link working properly in all browsers. IDN should be encoded with Punycode. HTML5 draft refers to RFC 3987 which also allows percent-encoded unicode characters in host part and a large subset of unicode in both host and other parts without encoding them. User may enter address in any of these forms. To provide human readable form of it I need to decode all printable characters. Note that some parts of address might not correspond to valid UTF-8 sequences, usually when target site uses some other character encoding. An example of what I'd like to get: <a href="http://xn--80aswg.xn--p1ai/%D0%BF%D1%83%D1%82%D1%8C?%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81"> http://????.??/???????????</a> Are there any tools to solve these tasks? I'm especially interested in libraries for Python and JavaScript.

    Read the article

  • html source encode

    - by Joseph
    when I view source on my php page I get &quot; for a quote. But instead, I would like " to be used in the source code. I have no control over manually replacing it so Im wondering if there is a function to do such a thing.

    Read the article

  • how to use json_encode without PHP 5.2

    - by Ashley Ward
    I've written a CMS which uses the PHP function json_encode to send some data back via an Ajax Request. Unfortunately, I'm trying to load it onto a server which is running PHP version 5.1, the json_encode PHP function is not available on versions of PHP before 5.2.0. Does anyone know of a way to encode a PH array as JSON without using the inbuilt json_encode function?

    Read the article

  • PHP JSON encode output number as string

    - by mitch
    I am trying to output a JSON string using PHP and MySQL but the latitude and longitude is outputting as a string with quotes around the values. This causes an issue when I am trying to add the markers to a google map. Here is my code: $sql = mysql_query('SELECT * FROM markers WHERE address !=""'); $results = array(); while($row = mysql_fetch_array($sql)) { $results[] = array( 'latitude' =>$row['lat'], 'longitude' => $row['lng'], 'address' => $row['address'], 'project_ID' => $row['project_ID'], 'marker_id' => $row['marker_id'] ); } $json = json_encode($results); echo "{\"markers\":"; echo $json; echo "}"; Here is the expected output: {"markers":[{"latitude":0.000000,"longitude":0.000000,"address":"2234 2nd Ave, Seattle, WA","project_ID":"7","marker_id":"21"}]} Here is the output that I am getting: {"markers":[{"latitude":"0.000000","longitude":"0.000000","address":"2234 2nd Ave, Seattle, WA","project_ID":"7","marker_id":"21"}]} Notice the quotes around the latitude and longitude values.

    Read the article

  • How to encode cyrillic in mysql?

    - by Premke
    Hello fellows, what's up? :-) I have one problem and i hope you can help me with it. One friend of mine have a simple solid html website and i implemented little php; CRUD system for articles... problem i came across is placing and getting cyrillic characters from mysql database. What i want to achive is next: In the main navigation there are some separated sections, whose names, ids and item's order i want to place in mysql and than to pull names and to put each name as a link. Names are supposed to be cyrillic characters. The problem comes when i, using php mysql_fetch_assoc function, try to display names which are inserted with cyrillic characters in database row, collation of row is utf8_general_ci, and i end with ????? insted of original characters. If i submit cyrillic characters via submit form to mysql it shows something like this У. How can i solve this, thanks in advance!? :-)

    Read the article

  • Encode JSON data into another JSON object

    - by jburns20
    I have a JSON string that I would like to include as a value in a larger JSON object that I am creating from an array. How can I create the larger JSON object without php escaping the string, and without having to decode the previously encoded string? For example, if my JSON string is: $encoded_already = '{"encoded_key": "encoded_value"}'; And I would like to include it in my array and json_encode() it: $new_array = array( "some_other_key" => $some_value, "premade_data" => $encoded_already ); $output = json_encode($new_array); but I want to have the $encoded_already string be included as actual JSON, not just an escaped string.

    Read the article

  • Encode URL while send ajax

    - by meotimdihia
    I use cakePHP and it generate ajax /animemanga/animes/search/page:1?type%5B0%5D=3&amp;genre%5B0%5D=20&amp;genre%5B1%5D=4&amp;info%5B0%5D=episodes&amp;info%5B1%5D=released&amp;info%5B2%5D=rating&amp;info%5B3%5D=synopsis&amp;info%5B4%5D=completed&amp;info%5B5%5D=rating_count&amp;info%5B6%5D=name&amp;info%5B7%5D=id&amp;info%5B8%5D=name&amp;info%5B9%5D=id cakePHP encoded: & = &apm; will create error while use with Ajax. I use Jquery, browser Opera. how can this solve ?

    Read the article

  • MultipleHiddenInput doesn't encode properly over POST?

    - by andrew
    The form looks very simple: class MyForm(forms.Form): ids = forms.MultipleChoiceField(widget=forms.MultipleHiddenInput()) def view(request): ... form = MyForm(initial={'ids': [o.id for o in queryset]}) Which gives me the HTML (which looks good enough): <form method="post" action="/foo/bar/"> <input type="hidden" name="ids" value="7720889" id="id_ids_0"> <input type="hidden" name="ids" value="7717962" id="id_ids_1"> <input type="hidden" name="ids" value="7717807" id="id_ids_2"> <input type="hidden" name="ids" value="7713584" id="id_ids_3"> <input type="hidden" name="ids" value="7712277" id="id_ids_4"> <input type="hidden" name="ids" value="7707475" id="id_ids_5"> <input type="hidden" name="ids" value="7707257" id="id_ids_6"> <input type="hidden" name="ids" value="7705271" id="id_ids_7"> <input type="hidden" name="ids" value="7704338" id="id_ids_8"> <input type="hidden" name="ids" value="7704137" id="id_ids_9"> <input type="hidden" name="ids" value="7695444" id="id_ids_10"> <input type="hidden" name="ids" value="7695242" id="id_ids_11"> <input type="hidden" name="ids" value="7690683" id="id_ids_12"> <input type="hidden" name="ids" value="7690431" id="id_ids_13"> <input type="hidden" name="ids" value="7689035" id="id_ids_14"> <input type="hidden" name="ids" value="7681230" id="id_ids_15"> <input type="hidden" name="ids" value="7679189" id="id_ids_16"> <input type="hidden" name="ids" value="7675315" id="id_ids_17"> <input type="hidden" name="ids" value="7667291" id="id_ids_18"> <input type="hidden" name="ids" value="7661162" id="id_ids_19"> <button type="submit">Test</button> </form> But, in the POST that comes in, I'm only getting one value: <QueryDict: {u'ids': [u'7661162']}> What gives? What am I doing wrong?

    Read the article

  • Efficient way to ASCII encode UTF-8

    - by Andreas Gohr
    I'm looking for a simple and efficient way to store UTF-8 strings in ASCII-7. With efficient I mean the following: all ASCII chars in the input should stay ASCII chars in the output the resulting string should be as short as possible the operation needs to be reversable without any data loss there should be no restriction on the input length the whole UTF-8 range should be allowed My first idea was to use Punycode (IDNA) as it fits the first three requirements, but it fails at the last two. Can anyone recommend an alternative encoding scheme? Even better if there's some code available to look at.

    Read the article

  • Can't DER encode and BER decode RSA public key

    - by Mildred
    I have problems using Crypto++ to save a RSA public key (that I obtained loading a private key file in PKCS#8 format). When decoding the key, I always get a BERDecodeErr exception. Here is the code I am using: CryptoPP::RSASSA_PKCS1v15_SHA_Signer _signer; CryptoPP::RSASSA_PKCS1v15_SHA_Verifier _verifier; CryptoPP::ByteQueue bytes; //_signer.AccessPublicKey().Save(bytes); // seem to save private key instead _signer.AccessKey().DEREncodePublicKey(bytes); //_verifier.AccessKey().Load(bytes); //_verifier.AccessKey().BERDecodePublicKey(bytes, 0, 0); _verifier.AccessPublicKey().Load(bytes); I also tried with the instructions commented above, without success. How do you do to save or open the public key? The public key looks like this in hex format, is there a tool to check its format / validity (regarding what crypto++ supports) ? 3081890281810097e24f2e95504a397e90fbc56d1b330ab2ab97a0d326007b890e40013f9e1d9bd9 f54b0c0840782ddae19b5b4595d8f8b9ffe0d2120174fcbc39585c5867cd2dfba69f8e540caa2c52 de8f08278a34e9249120500117f0ba756c5bb2be660013160db9f82f75deb7ccf63742a9e945da6c cf30c2b109b73342daaabd02b872e50203010001

    Read the article

  • php json encode

    - by hafizan
    This below output come from php json_encode.What we see here is 0849 is twice.Since javascript only use sn to get value why we need the "0" value.The main problem is speed execution. If 800 kb data might can be reduce to 400 kb {"success":"true","total":968,"data":[{"0":"0849","sn":"0849" }] If no solution i have to make a script to filter in json_encode so no need twice data transter.

    Read the article

  • HttpUtility.HtmlEncode doesn't encode everything

    - by Anthony
    I am interacting with a web server using a desktop client program in C# and .Net 3.5. I am using Fiddler to see what traffic the web browser sends, and emulate that. Sadly this server is old, and is a bit confused about the notions of charsets and utf-8. Mostly it uses Latin-1. When I enter data into the Web browser containing "special" chars, like "O p ? 8 ? ? ? ? ? ? ? ? ? ? ? ? ? ?" fiddler show me that they are being transmitted as follows from browser to server: "&#9800; &#9801; &#9802; &#9803; &#9804; &#9805; &#9806; &#9807; &#9808; &#9809; &#9810; &#9811; " But for my client, HttpUtility.HtmlEncode does not convert these characters, it leaves them as is. What do I need to call to convert "?" to &#9800; and so on?

    Read the article

  • Webcam capture and convert to avi

    - by Spidfire
    Im trying to make a program that captures a video from the webcam and sound from the microphone but im getting stuck at the part where ive try to make a movie out of still images ive heard you need to use directshow but it doesnt jet work for me Does someone know a good piece of example code that captures video and sound and can encode it to a file (divx or something like that) ? or some suggestions where to look so i can build it myself (if a other programming language is better for this im happy to know it early. )

    Read the article

  • rawurl encode problem

    - by pradeep
    hi, i am using rawurlencode($url_variable) while passing to a script.. when i receive the variable in the script ,before passing this variable to mysql ,i was doing mysql_real_escape_string . now the problem is like when there is a variable like $url_variable = "Off-St.Mark's-Road" ...after i do mysql_real_escape_string it become slike Off-St.Mark\\'s-Road . which is creating a problem in mysql query ... how i get over this...rawurlencode is necessary to pass variables to the script and i want to do mysql_real_escape_string to make the data safe...

    Read the article

  • where should i encode this html data in an asp.net mvc site

    - by ooo
    here is my view code: <%=Model.HtmlData %> here is my controller code: public ActionResult GetPage() { ContentPageViewModel vm = new ContentPageViewModel(); vm.HtmlData = _htmlPageRepository.Get("key"); return View(vm); } my repository class basically queries a database table that has the fields: id, pageName, htmlContent the .Get() method passes in a pageName (or key) and returns the htmlContent value. Right now i have just started this (haven't persisted anything to the db yet) so i am not doing any explicit encoding in my code now. What is the best practice for where i need to do encoding (in the model, the controller, the view ??)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >