binary

How do I bind str and text?

(IBAction) changeProductText:(NSString *)str;{ lblProductTxt.text = str; } I have that and i am trying to make it so that i can have the str and @"text" but i don't know how to bind them together. Any thoughts? ...

How to set binary data using setBlob() in C++ connector

I know this has been asked before, and I tried to implement the solution, but I just get exception errors when I call ps->executeUpdate(). Has anyone got an explicit example? ...

Converting binary file to Base64 string.

Hi, I need to convert uploaded binary files to base64 string format on the fly. I'm using ASP, Vbscript. Using Midori's component for base64 conversion. For small size files (<20K) the performance is okay. But when it exceeds 75 or 100K, its totally lost. Is there any efficient way to convert big binary files (2MB) to base64 string form...

In attempting to understand the concept of binary, my question is "How does a stored image or video appear in binary on the hard drive"?

In attempting to understand the concept of binary, my question is "How does a stored image or video look in binary on the hard drive?" Thanks for all help ...

Manipulate DATA FILE (text) stored as varbinary(max) in sql table

Hi, looking for help and need pointing in the right direction, can anyone assist? Have a data file (txt) that contains 10000 numbers/data points. Storing the data file as varbinary(MAX) in an SQL table. My goal is to retrieve the file on user request and plot/chart the numbers as a line chart. No problem in getting DataReader to displ...

Why is two's complement used to represent negative numbers?

I'm just curious if there's a reason why in order to represent -1 in binary, two's complement is used: flipping the bits and adding 1? -1 is represented by 11111111 (two's complement) rather than (to me more intuitive) 10000001 which is binary 1 with first bit as negative flag. Disclaimer: I don't rely on binary arithmetic for my job! ...

1x10^49 in decimal - how binary bits is that and how would you convert it to binary?

I've encountered a website that uses a 50-digit decimal integer ID in a URL query string, which seems a little excessive. The smallest 50-digit decimal number is 1.0 x 10^49, otherwise known as: 1000000000 0000000000 0000000000 0000000000 0000000000 How many bits would the binary representation contain? How would you approach conver...

Alternatives to using pack_into() when manipulating a list of bytes?

I'm reading in a binary file into a list and parsing the binary data. I'm using unpack() to extract certain parts of the data as primitive data types, and I want to edit that data and insert it back into the original list of bytes. Using pack_into() would make it easy, except that I'm using Python 2.4, and pack_into() wasn't introduced u...

Binary version of iostream

I've been writing a binary version of iostreams. It essentially allows you to write binary files, but gives you much control over the format of the file. Example usage: my_file << binary::u32le << my_int << binary::u16le << my_string; Would write my_int as a unsigned 32-bit integer, and my_string as a length-prefixed string (where the...

methods to store binary files in SVN

Are There different methods to store binary files in SVN? if so, what are they, and how I modify the storage options? I read that there are 4 ways to store binary files in SVN: Compressed tar - import - export. Tar - import - export. import - export. Efficient check-in. Which of those are the most useful for time efficiancy? and how...

reading integers from binary file in python

Hi there... I don't know if the question title is correctly set. I'm trying to read a BMP file in python. I know the first two bytes indicate the bmp firm. Next 4 bytes are the file size. When I excecute: fin = open("hi.bmp", "rb") firm = fin.read(2) file_size = int(fin.read(4)) I get ValueError: invalid literal for int() wit...

UUIDs and byte-swapping over network

Hi, Is there are a standard accepted way to byte-swap UUIDs for transmission over a network (or file storage)? (I want to send/store the 16 raw bytes rather than convert the UUID to a string representation.) I thought at first I should partition the UUID into 4 32-bit integers and call htonl on each of them, but that didn't smell right...

Sending binary data from ASP to .net component

The ASP application allows uploading of image files (jpg, gif, tif). These files are sent to a .net component registered in the GAC of the server. In the component file is encoded using System.Text.Unicode to byte[] array. This encoding is done with some data loss. The byte array has values 253 and 255 in consequetive elements. What cou...

Put into an array the deepest path of a BST (recursive)...

Hello, Im trying to put to an array the deepest path on a BST using a recursive algorithm, and im getting several difficulties... because the only thing that i get is the size of the longest path(equivalent to the height), and i cant put in the array the values regarding to the height of the BST... Can anybody help me ??? Thanks in ad...

Extra bytes in .mid files

Hi everyone. I'm trying to read information from a .mid file, but I keep seeing extra bytes that don't seem to be part of any midi messages. I'm not sure how to predict/deal with these and it's throwing everything else off in my project. Any suggestions? Here's a few examples: 4d 54 72 6b 00 00 04 48 Track Header 00 c0 19 ...

FileHelpers-like data import/export utility for binary data?

I use the excellent FileHelpers library when I work with text data. It allows me to very easily dump text fields from a file or in-memory string into a class that represents the data. In working with a big endian microcontroller-based system I need to read a serial data stream. In order to save space on the very limited microcontroller ...

iphone app binary file to source code

Hi, I just have a question about binary file in iPhone app. When an iPhone developer wants to submit their app to testers or App store they build the binary file of their appliction. My question is it possible to edit your app's binary to get the source code, or just simply edit the binary for someones purpose. If it is posible how can...

How Does Ruby handle bytes/binary?

I'm trying to send a series of binary bytes across a socket, to meet a particular standard my company uses. No one in my company has used Ruby for this before, but in other languages, they send the data across one byte at a time, (usually with some sort of "pack" method). I can't find anyway to create binary on the fly, or create bytes...

Binary file I/O issues

Edit: I'm trying to convert a text file into bytes. I'm not sure if the code is turning it into bytes or not. Here is the link to the header so you can see the as_bytes function. link #include "std_lib_facilities.h" int main() { cout << "Enter input file name.\n"; string file; cin >> file; ifstream in(file.c_str(), ios...

cvs2svn conversion ?

Hi I converted my CVS repository into SVN repository. It worked great, but one problem had occured.... I converted using a dumpfile, and the command was: cvs2svn –encoding=( ) –sort=(PATH TO sort.exe) --default-eol=native –dumpfile=PATH\name.svn_dump –svnadmin=(PATH TO SVN ADMIN) (PATH TO REP) loading the dump file: svnadmin l...