Search Results

Search found 3923 results on 157 pages for 'binary x'.

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

  • Odd FTP ASCII/BINARY transfer behavior after migrating to a new server

    - by Incognita Mundi
    I recently got a dedicated server and after migration to the new machine I started noticing problems with file transfers. My FTP client, despite being set to auto, keeps uploading php files in binary mode and the content of those files is messed up. Since I mostly upload files of different kinds it would be annoying to change from binary to ASCII every single time, beside, I never had such problems. What could be the cause of this behavior? My dedicated server runs CENTOS 6.4 and the ftp server is Pure-FTPd. I tried different FTP clients and they all have the same problem so I assume is soem misconfiguration on the server side. Thanks

    Read the article

  • Embedding binary blobs using gcc mingw

    - by myforwik
    I am trying to embed binary blobs into an exe file. I am using mingw gcc. I make the object file like this: ld -r -b binary -o binary.o input.txt I then look objdump output to get the symbols: objdump -x binary.o And it gives symbols named: _binary_input_txt_start _binary_input_txt_end _binary_input_txt_size I then try and access them in my C program: #include <stdlib.h> #include <stdio.h> extern char _binary_input_txt_start[]; int main (int argc, char *argv[]) { char *p; p = _binary_input_txt_start; return 0; } Then I compile like this: gcc -o test.exe test.c binary.o But I always get: undefined reference to _binary_input_txt_start Does anyone know what I am doing wrong?

    Read the article

  • How to tell binary from text files in linux

    - by gabor
    The linux file command does a very good job in recognising file types and gives very fine-grained results. The diff tool is able to tell binary files from text files, producing a different output. Is there a way to tell binary files form text files? All I want is a yes/no answer whether a given file is binary. Because it's difficult to define binary, let's say I want to know if diff will attempt a text-based comparison. To clarify the question: I do not care if it's ASCII text or XML as long as it's text. Also, I do not want to differentiate between MP3 and JPEG files, as they're all binary.

    Read the article

  • How to redistribute binary programs built on modern Ubuntu so that they can be executed on any older Linux system ?

    - by psihodelia
    I found that if I build any binary on Ubuntu 10.10, then it doesn't execute on some older Linuxes. It is because Ubuntu uses a very new C library, called EGLIBC. Most of the desktop Linux systems use GLIBC. I would like to know whether there is any standard method how to redistribute binary programs built on a modern Ubuntu so that they can be executed on any older Linux system ? How to find all required dependencies (glibc version, dynamic libraries) ?

    Read the article

  • Error importing large MySQL dump file which includes binary BLOBs in Windows

    - by Daniel Magliola
    I'm trying to import a MySQL dump file, which I got from my hosting company, into my Windows dev machine, and i'm running into problems. I'm importing this from the command line, and i'm getting a very weird error: ERROR 2005 (HY000) at line 3118: Unknown MySQL server host '+?*á±dÆ-N+Æ·h^ye"p-i+ Z+-$?P+Y.8+|?+l8/l¦¦î7æ¦X¦XE.ºG[ ;-ï?éµ?º+¦¦].?+f9d릦'+ÿG?-0à¡úè?-?ù??¥'+NÑ' (11004) I'm attaching the screenshot because i'm assuming the binary data will get lost... I'm not exactly sure what the problem is, but two potential issues are the size of the file (2 Gb) which is not insanely large, but it's not trivially small either, and the other is the fact that many of these tables have JPG images in them (which is why the file is 2Gb large, for the most part). Also, the dump was taken in a Linux machine and I'm importing this into Windows, not sure if that could add to the problems (I understand it shouldn't) Now, that binary garbage is why I think the images in the file might be a problem, but i've been able to import similar dumps from the same hosting company in the past, so i'm not sure what might be the issue. Also, trying to look into this file (and line 3118 in particular) is kind of impossible given its size (i'm not really handy with Linux command line tools like grep, sed, etc). The file might be corrupted, but i'm not exactly sure how to check it. What I downloaded was a .gz file, which I "tested" with WinRar and it says it looks OK (i'm assuming gz has some kind of CRC). If you can think of a better way to test it, I'd love to try that. Any ideas what could be going on / how to get past this error? I'm not very attached to the data in particular, since I just want this as a copy for dev, so if I have to lose a few records, i'm fine with that, as long as the schema remains perfectly sound. Thanks! Daniel

    Read the article

  • What is the most efficient way to convert to binary and back in C#?

    - by Saad Imran.
    I'm trying to write a general purpose socket server for a game I'm working on. I know I could very well use already built servers like SmartFox and Photon, but I wan't to go through the pain of creating one myself for learning purposes. I've come up with a BSON inspired protocol to convert the the basic data types, their arrays, and a special GSObject to binary and arrange them in a way so that it can be put back together into object form on the client end. At the core, the conversion methods utilize the .Net BitConverter class to convert the basic data types to binary. Anyways, the problem is performance, if I loop 50,000 times and convert my GSObject to binary each time it takes about 5500ms (the resulting byte[] is just 192 bytes per conversion). I think think this would be way too slow for an MMO that sends 5-10 position updates per second with a 1000 concurrent users. Yes, I know it's unlikely that a game will have a 1000 users on at the same time, but like I said earlier this is supposed to be a learning process for me, I want to go out of my way and build something that scales well and can handle at least a few thousand users. So yea, if anyone's aware of other conversion techniques or sees where I'm loosing performance I would appreciate the help. GSBitConverter.cs This is the main conversion class, it adds extension methods to main datatypes to convert to the binary format. It uses the BitConverter class to convert the base types. I've shown only the code to convert integer and integer arrays, but the rest of the method are pretty much replicas of those two, they just overload the type. public static class GSBitConverter { public static byte[] ToGSBinary(this short value) { return BitConverter.GetBytes(value); } public static byte[] ToGSBinary(this IEnumerable<short> value) { List<byte> bytes = new List<byte>(); short length = (short)value.Count(); bytes.AddRange(length.ToGSBinary()); for (int i = 0; i < length; i++) bytes.AddRange(value.ElementAt(i).ToGSBinary()); return bytes.ToArray(); } public static byte[] ToGSBinary(this bool value); public static byte[] ToGSBinary(this IEnumerable<bool> value); public static byte[] ToGSBinary(this IEnumerable<byte> value); public static byte[] ToGSBinary(this int value); public static byte[] ToGSBinary(this IEnumerable<int> value); public static byte[] ToGSBinary(this long value); public static byte[] ToGSBinary(this IEnumerable<long> value); public static byte[] ToGSBinary(this float value); public static byte[] ToGSBinary(this IEnumerable<float> value); public static byte[] ToGSBinary(this double value); public static byte[] ToGSBinary(this IEnumerable<double> value); public static byte[] ToGSBinary(this string value); public static byte[] ToGSBinary(this IEnumerable<string> value); public static string GetHexDump(this IEnumerable<byte> value); } Program.cs Here's the the object that I'm converting to binary in a loop. class Program { static void Main(string[] args) { GSObject obj = new GSObject(); obj.AttachShort("smallInt", 15); obj.AttachInt("medInt", 120700); obj.AttachLong("bigInt", 10900800700); obj.AttachDouble("doubleVal", Math.PI); obj.AttachStringArray("muppetNames", new string[] { "Kermit", "Fozzy", "Piggy", "Animal", "Gonzo" }); GSObject apple = new GSObject(); apple.AttachString("name", "Apple"); apple.AttachString("color", "red"); apple.AttachBool("inStock", true); apple.AttachFloat("price", (float)1.5); GSObject lemon = new GSObject(); apple.AttachString("name", "Lemon"); apple.AttachString("color", "yellow"); apple.AttachBool("inStock", false); apple.AttachFloat("price", (float)0.8); GSObject apricoat = new GSObject(); apple.AttachString("name", "Apricoat"); apple.AttachString("color", "orange"); apple.AttachBool("inStock", true); apple.AttachFloat("price", (float)1.9); GSObject kiwi = new GSObject(); apple.AttachString("name", "Kiwi"); apple.AttachString("color", "green"); apple.AttachBool("inStock", true); apple.AttachFloat("price", (float)2.3); GSArray fruits = new GSArray(); fruits.AddGSObject(apple); fruits.AddGSObject(lemon); fruits.AddGSObject(apricoat); fruits.AddGSObject(kiwi); obj.AttachGSArray("fruits", fruits); Stopwatch w1 = Stopwatch.StartNew(); for (int i = 0; i < 50000; i++) { byte[] b = obj.ToGSBinary(); } w1.Stop(); Console.WriteLine(BitConverter.IsLittleEndian ? "Little Endian" : "Big Endian"); Console.WriteLine(w1.ElapsedMilliseconds + "ms"); } Here's the code for some of my other classes that are used in the code above. Most of it is repetitive. GSObject GSArray GSWrappedObject

    Read the article

  • Free-as-in-beer binary file format inspector

    - by fbrereto
    I am looking for a utility that gives me the ability to specify a binary file format and then interpret a file of bytes according to that format. (Something along the lines of the 010 Editor, but infinitely more cost-effective). Something that runs on Mac OS X would be preferred, but I'm interested to see what all is out there in general (while more of a hassle I'd be willing to run a tool on Windows if it were superior.) What's your preference?

    Read the article

  • Processing Binary Data in SOA Suite 11g

    - by Ramkumar Menon
    SOA Suite 11g provides a variety of ways to exchange binary data amongst applications and endpoints. The illustration below is a bird's-eye view of all the features in SOA Suite to facilitate such exchanges. Handling Binary data in SOA Suite 11g Composites Samples and Step-by-Step Tutorials A few step-by-step tutorials have been uploaded to java.net that illustrate key concepts related to Binary content handling within SOA composites. Each sample consists of a fully built composite project that can be deployed and tested, together with a Readme doc with screenshots to build the project from scratch. Binary Content Handling within File Adapter Samples [Opaque, Streaming, Attachments] SOAP with Attachments [SwA] Sample MTOM Sample Mediator Pass-through for attachments Sample For detailed information on binary content and large document handling within SOA Suite, refer to Chapter 42 of the SOA Suite Developer's Guide. Handling Binary data in Oracle B2B The following diagram illustrates how Oracle B2B facilitates exchange of binary documents between SOA Suite and Trading Partners.

    Read the article

  • Apache return binary data on the headers

    - by Camvoya
    Sometimes when i get my page, the apache return a file named 4r4fq34sd.part . the file seem a random name. And the content is: i»{h»¿ox..(a lot of binary)¿ox.... Date: Wed, 12 May 2010 13:40:10 GMT Server: Apache X-Powered-By: PHP/5.2.12-pl0-gentoo And i don´t can find in google the solution. Thanks

    Read the article

  • Binary diff/patch for large files on linux?

    - by thejh
    I've got two partition images (A and B) and want to use them to create a patch that I can apply on A on another computer in order to get the new B image without flooding the network. I have the following requirements: works on linux can create diffs can use diffs to patch files can handle binary files can handle large files (a few hundred GB should work) no user interaction required (just a console application) ideally, should be able to read from/write to pipes (so that I can pipe into it from a gzip-compressed file and write to one) Does something like that exist?

    Read the article

  • Unconvert Text File from Binary Format

    - by Hammer Bro.
    I've got a rather large CSV file (~700MB) which I know to consist of lines of 27-character alpha-numeric hashes; no commas or anything fancy. Somehow, during its migration from Windows to Linux (via winSCP and then a few regular SCPs), it has converted into some kind of binary format I am unfamiliar with. If I open the file in vi, everything appears fine, and it says [converted] at the bottom, although I know it's not a line endings issue (and dos2unix doesn't help). If I 'head' the file, it looks proper except for a "ÿþ" at the beginning of the first line. If I open up the file in nano, however, I see the "ÿþ" at the start and then "^@" before every character (even newlines and EoF). If I try to re-save or copy the file (say via: head file.csv short.txt), this special encoding is preserved. I copied the first ten lines out of vi (which displays it properly) into my Windows clipboard via my SSH client, then pasted it into a new text file, test.txt. This file is visually identical when opened in vi (and similar through 'head', minus the "ÿþ"), although it's roughly half of the filesize. Additionally, file test.txt test.txt: ASCII text file short.txt short.txt: I have no idea what format this once-text file got converted to (it's notoriously hard to search the internet for symbols), but surely there must be some way to convert it back. Any ideas?

    Read the article

  • binary protocols v. text protocols

    - by der_grosse
    does anyone have a good definition for what a binary protocol is? and what is a text protocol actually? how do these compare to each other in terms of bits sent on the wire? here's what wikipedia says about binary protocols: A binary protocol is a protocol which is intended or expected to be read by a machine rather than a human being (http://en.wikipedia.org/wiki/Binary_protocol) oh come on! to be more clear, if I have jpg file how would that be sent through a binary protocol and how through a text one? in terms of bits/bytes sent on the wire of course. at the end of the day if you look at a string it is itself an array of bytes so the distinction between the 2 protocols should rest on what actual data is being sent on the wire. in other words, on how the initial data (jpg file) is encoded before being sent. any coments are apprecited, I am trying to get to the essence of things here. salutations!

    Read the article

  • Converting binary to hexadecimal??

    - by Bobbert
    Hey guys, Just wondering on how I would go about converting binary to hexadecimal?? Would I first have to convert the binary to decimal and then to hexadecimal?? For example, 101101001.101110101010011 How would I go about converting a complex binary such as the above to hexadecimal? Thanks in advance

    Read the article

  • read url in binary mode in java

    - by Andrew Zawok
    In java I need to read a binary file from a site and write it to a disk file. This example http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html could read webpages succesfully, but when I try to read a binary file from my localhost server and write it to a disk file the contents change, corrupting the binary file. Using fc I see that 0x90 is changed to 0x3F and other changes. How do I acess the binary files (read url and write to file) without java or anything else changing ANY characters, like doing any newline conversions or character conversions or anything else, simply reading input url and writing it out as a file.

    Read the article

  • dynamic array pointer to binary file

    - by Yijinsei
    Hi guys, Know this might be rather basic, but I been trying to figure out how to one after create a dynamic array such as double* data = new double[size]; be used as a source of data to be kept in to a binary file such as ofstream fs("data.bin",ios:binary"); fs.write(reinterpret_cast<const char *> (data),size*sizeof(double)); When I finish writing, I attempt to read the file through double* data = new double[size]; ifstream fs("data.bin",ios:binary"); fs.read(reinterpret_cast<char*> (data),size*sizeof(double)); However I seem to encounter a run time error when reading the data. Do you guys have any advice how i should attempt to write a dynamic array using pointers passed from other methods to be stored in binary files?

    Read the article

  • Reading Binary Plist files with Python

    - by Zeki Turedi
    I am currently using the Plistlib module to read Plist files but I am currently having an issue with it when it comes to Binary Plist files. I am wanting to read the data into a string to later to be analysed/printed etc. I am wondering if their is anyway of reading in a Binary Plist file without using the plutil function and converting the binary file into XML? Thank you for your help and time in advance.

    Read the article

  • Display contents of file as binary.

    - by Eric Davidson
    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 program like octal dump but is binary dump? Thanks.

    Read the article

  • Usage examples of binary search

    - by python dude
    I just realized that in my 4+ years of Java programming (mostly desktop apps) I never used the binary search methods in the Arrays class for anything practical. Not even once. Some reasons I can think of: 100% of the time you can get away with linear search, maps or something else that isn't binary search. The incoming data is almost never sorted, and making it sorted requires an extra sorting step. So I wonder if it's just me, or do a lot of people never use binary search? And what are some good, practical usage examples of binary search?

    Read the article

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