binary

Read VB binary file with c# (knowing the structure)

I'd like to read a file that has been binary saved by a vb prog. the file should be read line by line, 'cause every single line represents an object with many attributes. a link looks the following: 999011011/10/1 ELW the structure of data types is: Public Type ...

ZSI in python... web service that sends and receives binary file?

Hello everyone, I am working on a python app which needs to expose some services. For that task I was testing ZSI. Everything was fine until I tried to send binaries through the web service. The tested escenario looks like this: A WSDL for the WS (to execute wsdl2py / wsdl2dispatch) A response including a Base64 encoded binary The p...

The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application.

I am having a problem submitting my new app to the appstore. ItunesConnect gives me the error: The binary you uploaded was invalid. A pre-release beta version of the SDK was used to build the application. I haven't changed anything, I can compile to a ad-hoc certificate and that works fine. I uploaded another app yesterday and that wor...

JavaScript pack("d") - binary strings

I'm trying to replicate the Perl and PHP style pack and unpack functions in JavaScript. Unsigned integers were easy enough, so my pack('n') and pack('N') are ok. But my lack of a computer science background is a hurdle now and I don't know where to start with pack('d') for packing JavaScript's standard floating point. Is there a JavaSc...

How to take a collection of bytes and pull typed values out of it?

Say I have a collection of bytes var bytes = new byte[] {0, 1, 2, 3, 4, 5, 6, 7}; and I want to pull out a defined value from the bytes as a managed type, e.g. a ushort. What is a simple way to define what types reside at what location in the collection and pull out those values? One (ugly) way is to use System.BitConverter and a Que...

WCF - (Custom) binary serialisation.

I want to be able to query my database over the web, and I am wanting to use a WCF service to handle the requests and results. The problem is that due to the amount of data that can potentially be returned from these queries, I'm worried about how these results will be serialised over the network. For example, I can imagine the XML seria...

Why aren't EXE's in binary?

Why is it that if you open up an EXE in a hex editor, you will see all sorts of things. If computers only understand binary then shouldn't there only be 2 possible symbols seen in the file? Thanks ...

Display contents of file as binary.

Is there a good way to display the contents of a file as binary? I am creating a program that needs to save and load a 2D arrays from a files. When loading a saved file the result appears different. I need to be able to view the contents of the saved file in plain binary to tell if my problem in in my save or load function. Is there a ...

MinGW Doesn't Generate an Object File When Compiling

I've just bought a new laptop for me on the travel, then on my free time, I've started to test MinGW on it by trying to compile my own OS that is written in C++, then I've created all the files needed and the kernel.cpp: extern "C" void _main(struct multiboot_data* mbd, unsigned int magic); void _main( struct multiboot_data* mbd, unsig...

Group and Concatenation aggregate to produce binary string SQL

Scenario: I have a table that is used for storing a user's security on different PO series. And currently selecting a user's security produces the following record set. each permission column has a boolean value and i would like to group each set on Job, SubJobNum and get a binary result (string if need be) that would result in the fo...

php - ftp_get - Warning: ftp_get(): Opening BINARY mode data connection ...

I'm trying to write a script that will download files from an FTP server. They're all fairly large (nearly 2GB each). The script starts running, but then eventually terminates with the above error. Is it size related? Is there a way around this? Here's the code: <?php $ftp_server = "ftp.EXAMPLE.com"; $conn_id = ftp_connect ($ftp_s...

Binary Tree in C Insertion Error

I'm quite new to C and I'm trying to implement a Binary Tree in C which will store a number and a string and then print them off e.g. 1 : Bread 2 : WashingUpLiquid etc. The code I have so far is: #include <stdio.h> #include <stdlib.h> #define LENGTH 300 struct node { int data; char * definition; struct node *left; struct node *...

convert a binary file in a list (python)

Hi all, I'd like to be able to open a binary file, and make a list (kind of array) with all the chars in, like : "\x21\x23\x22\x21\x22\x31" to ["\x21","\x23","\x22","\x21","\x22","\x31"] What would be the best solution to convert it ? Thanks ! ...

Why does git think my cs file is binary?

I have just one cs file in my repository which git seems to think is binary (in git gui, it just says "binary files differ". Any ideas? ...

What's the prefix for binary in PHP?

It's neither 0x nor 0,what's it?Is there? ...

C++ how to store integer into a binary file??

i gt a struct with 2 integer, i want to store them in a binary file and read it again... here is my code... static const char *ADMIN_FILE = "admin.bin"; struct pw { int a; int b; }; void main(){ pw* p = new pw(); pw* q = new pw(); std::ofstream fout(ADMIN_FILE, ios_base::out | ios_base::binary | ios_base::trunc); std::ifst...

Sending a file over web service from java to .net

Hello, I have built .NET 1.1 Web Service which should accept files and save them. Here is the code of the webmethod: [WebMethod] public bool SaveDocument(Byte[] docbinaryarray, string docname) { string dirPath = @"C:\Temp\WSTEST\"; if(!Directory.Exists(dirPath)) { Directory.CreateDirectory(dirPath); } strin...

Getting Image size of JPEG from its binary

Hi I have a lot of jpeg files with varying image size. For instance, here is the first 640 bytes as given by hexdump of an image of size 256*384(pixels): 0000000: ffd8 ffe0 0010 4a46 4946 0001 0101 0048 ......JFIF.....H 0000010: 0048 0000 ffdb 0043 0003 0202 0302 0203 .H.....C........ 0000020: 0303 0304 0303 0405 0805 0504 0405 0a07 ...

MySql Not write CREATE TABLE to Bin Log, others do get written

Hello, We set up replication on a virtual box, imported a mysql dump and for UPDATEs, INSERTs and DELETEs is working fine. Tested today to drop a table and it didnt go through, checked the binary log in the Master and cant find any record for the DROP. It is taking the replication out of sync since the DROPs need to happen for reinstal...

Should I use Base64 encoding or byte[] for returning binary data in .NET web service

I have a simple question. Should I return a byte-array or simply base64 encode my binary data, when exposing it through a web service in .NET? Is there any pros/cons with either method, which is mostly supported etc. ...