binary

creating a free version of an app, but having the app separate on debug device.

Hi, I was just making a free version of one of my apps. I copied the folder, renamed the project, and changed the icon file, loading screen, interface, and code. BUT YET it still replaces a build on my phone. 1)how do I stop this from happening (i want both the free and paid version on my phone) 2) if you can fix this, will a custom...

How do I copy the binary code of an executable into a new file without using a system copy command?

This is the code I have, but the file is a little smaller and doesn't execute: int WriteFileContentsToNewFile(string inFilename, string outFilename) { ifstream infile(inFilename.c_str(), ios::binary); ofstream outfile(outFilename.c_str(), ios::binary); string line; // Initial read infile >> line; outfile << line...

ruby mechanize: how read downloaded binary csv file

I'm not very familiar using ruby with binary data. I'm using mechanize to download a large number of csv files to my local disk. I then need to search these files for specific strings. I use the save_as method in mechanize to save the file (which saves the file as binary). The content type of the file (according to mechanize) is: ap...

Algorithm question: print all the elements on a single given level of a binary tree

Hi, I am required to print out(visit) the nodes on a single level of a binary tree. I don't see how this can be done but then again I not very skilled with algorithms in general. I know that in Breadth-First traversal you use a queue and that you start by putting the root node in the queue then you dequeue it visit it and enqueue it's ch...

Converting a repeating binary number to decimal (express as a series?)

Given a binary number that repeats, for example 0.(0011) or 0.0(101), how would one go about converting it to decimal? What I've been able to dig up so far is the simple method for converting a terminating binary number to decimal, as below: res(N+2) = res(N+1) / 2 + res(N) where res is the result after step N, and N is the current i...

PHP in binary mode?

Is it possible to convert PHP to binary mode (compile) and run it in all standard web servers? ...

Erlang Binary Packet

Hey, I'm very new to Erlang, and I am converting some of my PHP stuff, and I can't figure this one out. Here is the function in PHP: public function raw_send($string1, $string2 = NULL, $type = SERVERDATA_EXECCOMMAND) { $data = pack('VV', $this->get_request_id(), $type) . $string1 . chr(0) . $string2 . chr(0); // build data $packet = ...

CoreData (for iphone) storing images

i wonder if its a wise choice to store images with core data into binary property say i have a collection of movies and i want to save the image dvd cover into a property the avg size of a cover is 20/30kb (320x480px) the reason i want to do this is for storage management, once i delete the movie i know the image is also deleted i'm j...

iPhone App submission and removing a binary

Hi, I've submitted my application to the app store and had it approved. I'd set the release date to a few months in the future, but in the meantime have added a lot of extra functionality to the product. I still want my app to be listed as a 'new release' when it comes out (the release data hasn't been reached yet) so should I replace ...

howto run a cgi that is compiled as a linux binary on a linux web-host

All, My host supports Perl CGI scripts, how do I use a compiled CGI script on the host? I tried setting execute permissions via chmod, but when I try and run it via the browser, I get a server error. Thanks in advance for all help. ...

General purpose utility or library for compiling/decompiling binary data files ?

I have various binary file formats which I need to dump to some kind of text format, edit and then recompile (possibly to a slightly different version of the binary format). Of course I could write a bunch of utility code in C/C++ to do this kind of thing, and maybe leverage a library for the text side of things (XML or JSON or whatever)...

Python: strange numbers being pulled from binary file /confusion with hex and decimals

This might be extremely trivial, and if so I apologise, but I'm getting really confused with the outputs I'm getting: hex? decimal? what? Here's an example, and what it returns: >>> print 'Rx State: ADC Clk=', ADC_Clock_MHz,'MHz DDC Clk=', DDC_Clock_kHz,'kHz Temperature=', Temperature,'C' Rx State: ADC Clk= [1079246848L, 0L] MHz DDC Cl...

Binary vs non-binary socketing java

I hear'd that exist binary communication. I'm beginner in java, I use plain text based which I learn from java.sun.com tutorials for sockets. So I want to know what benefits have binary socketing? Why I should use that? And what resources you can suggest about binary communication? ...

Why Python on Windows can't read an image in binary mode?

Hi, I want to read a image in binary mode so that I could save it into my database, like this: img = open("Last_Dawn.jpg") t = img.read() save_to_db(t) This is working on Mac. But on Windows, what img.read() is incorrect. It's just a little out of the whole set. So my first question is: why code above doesn't work in Windows? And ...

Decimal to binary number conversion

What is the binary form of -10? How it is calculated? ...

how can i represent a packet (binary stream) in a variable (c++)

hi i'm working on a personal project for a transport parser. i want to be able to represent a recived packet in binary number and afterwards be able to set specific bits. I've got a pretty good idea how to do the second part but i'm really stuck at the beginning ive got an advice to use unsigned char for that but can i really represent...

Most compact way to encode a sequence of random variable length binary codes?

Let's say you have a List<List<Boolean>> and you want to encode that into binary form in the most compact way possible. I don't care about read or write performance. I just want to use the minimal amount of space. Also, the example is in Java, but we are not limited to the Java system. The length of each "List" is unbounded. Therefo...

PHP: How would I check if a sample binary string was only 1's and 0's?

I've wanted to check if a number in PHP was proper binary. So far I've added this to check if it is devisable by 8: if(strlen($binary) % 8 == 0){ return true; } else { return false; } It works, but it obviously allows other numbers to be placed in, such as 22229999. What method can I use to make sure only 1's and 0'...

PHP: Check binary string, running into errors here..

I'm using this function to check if binary is correct, I know it looks sloppy.. I'm not sure how to write the function that well.. but it doesn't seem to work! If binary = 10001000 it says malformed, even though it's not.. what is wrong in my function?.. function checkbinary($bin) { $binary = $bin; if(!strlen($binary) % 8 == 0)...

radix sort on binary strings with arbitrary length

hi, i googled around and see lots of discussion about radix sort on binary string, but they are all with same lenght, how aobut binary string with arbitrary lenght? say i have {"001", "10101", "011010", "10", "111"}, how do i do radix sort on them ? Thanks! ...