encode

JSON stringify missing from jQuery 1.4.1?

Apparently jQuery has the ability to decode a given object or string into a JSON object. However, I have a JS object that I need to POST back to the server and I find no utility in jQuery that wraps the JSON.stringify() function. That function is found in Chrome, Safari 4, FF3.6, and IE8 but is not found in earlier browsers. I can use it...

iPhone - encode Array of Data from CoreData Entity and store in Base64 String

I have a data model with three entities (Purchase, Items, Image) the purchase is the main with the other two as related attributes. I need to be able to send the data to a web server, and I must encode in base64, I have a couple of classes that take care of the encoding and decoding that i downloaded from the net, they are categories fo...

nrv2b decompression via C#

Does anybody have nrv2b decompression on C#? ...

How to convert a string or integer to binary in Ruby?

Let's say I need to make integers 0..9 and math operators + - * / binary strings. So 0 = 0000, 1 = 0001, etc.. Is there a way to do this with Ruby 1.8.6 without using a library? ...

Android - How to add my own Audio codec to AudioRecord?

I currently have a Loop back program for testing Audio on Android devices. It uses AudioRecord and AudioTrack to record PCM audio from the Mic and play PCM audio out the earpiece. Here is the code: public class Record extends Thread { static final int bufferSize = 200000; final short[] buffer = new short[bufferS...

Remove encoding using PHP

I have the following text: We%27re%20proud%20to%20introduce%20the%20Amazing I'd like to remove the encoding using PHP, but using html_entity_decode() does not work. Any suggestions? ...

PHP: Updating Twitter status while keeping special charactars intact

On this page... http://www.axisofeco.com/matters/2010/03/11/the-word-youre-looking-for-is-sublime/ ... I have a 'Tweet this' link which pastes in the article title and a link into your Twitter update box (if you're logged in to Twitter). Problem is, when articles such as the one above have special characters in them (fancy single / d...

Is sending a PDF as encoded byte array in XML sensible

Hi I am looking to return a PDF from a webservice call. (ATM, a custom proxy is required at the client-side) AFAICS, there are 2 ways of doing it a) Return the link to a web-accessible location b) Encode the PDF and include it in the XML In my circumstance, a) will require 2 trips from the client, the first to get the path and the se...

Garbled text when constructing emails with vmime

Hey, my Qt C++ program has a part where it needs to send the first 128 characters or so of the output of a bash command to an email address. The output from the tty is captured in a text box in my gui called textEdit_displayOutput and put into my message I built using the Message Builder ( the object m_vmMessage ) Here is the relevant co...

RLE Encoding...What's the wrong?

I'm trying to make a RLE (Run-Length Encoder) Programme just for characters. I read the way it works on notes on net. And I tried to fix my code! Regardless I think that the steps of code are right, the code doesnt work! It appears some strange 'Z' as it runs. I really can't find what;s wrong! Could you please give me a piece of advice?...

encrypt- decrypt with SHA256 using C/C++

Hi! How can I encode a file using sha256 and c/c++ ??? Thanks! ...

How to encrypt an NSString in Objective C with DES in ECB-Mode?

Hi, I am trying to encrypt an NSString in Objective C on the iPhone. At least I wan't to get a string like "TmsbDaNG64lI8wC6NLhXOGvfu2IjLGuEwc0CzoSHnrs=" when I encode "us=foo;pw=bar;pwAlg=false;" by using this key: "testtest". My problem for now is, that CCCrypt always returns "4300 - Parameter error" and I have no more idea why. Thi...

Trouble Percent-Encoding Spaces in Java

Hi Everyone, I am using the URLUTF8Encoder.java class from W3C (www.w3.org/International/URLUTF8Encoder.java). Currently, it will encode any blank spaces ' ' into plus signs '+'. I am having difficulty modifying the code to percent-encode the blank space into '%20'. Unfortunately, I am not too familiar with hex. Can anyone help me out...

What is the best php encoder software ?

What is the best php encoder software? ========================================= http://www.freedownloadmanager.org/downloads/php_encoder_software/ http://forums.digitalpoint.com/showthread.php?t=596680 or another. Everybody say Zend Guard. But you can decode/decript zend's files at the page http://www.showmycode.com/ I think, Sour...

Why does this JSON.parse code not work?

I am trying to pass json encoded values from a php script to a, GnuBookTest.js, javascript file that initiates a Bookreader object and use the values i have passed in via the variable i named "result". The php script is sending the values like: <div id="bookreader"> <div id="BookReader" style="left:10px; right:10px; top:30px; bottom:3...

Detect base64 encoding in PHP?

Is there some way to detect if a string has been base64_encoded() in PHP? We're converting some storage from plain text to base64 and part of it lives in a cookie that needs to be updated. I'd like to reset their cookie if the text has not yet been encoded, otherwise leave it alone. ...

Encode/compress sequence of repeating integers

Hey there! I have very long integer sequences that look like this (arbitrary length!): 0000000001110002220033333 Now I need some algorithm to convert this string into something compressed like a9b3a3c3a2d5 Which means "a 9 times, then b 3 times, then a 3 times" and so on, where "a" stands for 0, "b" for 1, "c" for 2 and "d" for...

Unicode and URI encoding, decoding and escaping in JavaScript

If you look at this table here, it has a list of escape sequences for Unicode characters that don't actually work for me. For example for "%96", which should be a –, I get an error when trying decode: decodeURIComponent("%96"); URIError: URI malformed If I attempt to encode "–" I actually get: encodeURIComponent("–"); "%E2%80%93" ...

What's a good method/function to create a reversible hash?

I need to transmit some data over the wire and I don't want that data being plain text. The text I'm sending needs to be reversed so I can't md5/sha256/etc... What's a good way to encode a salted string? ...

How can one prevent double encoding of html entities when they are allowed in the input

How can I prevent double encoding of html entities, or fix them programmatically? I am using the encode() function from the HTML::Entities perl module to encode HTML entities in user input. The problem here is that we also allow users to input HTML entities directly and these entities end up being double encoded. For example, a user ma...