Search Results

Search found 4214 results on 169 pages for 'binary serializer'.

Page 39/169 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • How do I make a Mach-O binary from an object file?

    - by Mike
    I have an object file, which I'd like to make into a Mach-O binary(I'm on Mac OS 10.6). Running ld source.o produces the following output: Undefined symbols: "_printf", referenced from: _main in source.o ld: symbol(s) not found for inferred architecture x86_64 How can I reference libSystem(or whatever library includes printf) using ld?

    Read the article

  • How do I embed a binary within a Delphi executable and extract at runtime?

    - by Mick
    I'd like to embed an executable inside of my Delphi binary and extract it at runtime. The purpose of this is to ensure that a helper utility is always available on the system, without having to distribute multiple files. With Delphi 2007 I have used JvDataEmbedded, but I am building a console application and I want to know if anyone knows of another way to do it without having to add a hidden form for JvDataEmbedded. I am using Delphi 2010.

    Read the article

  • How can I match a match a null byte (0x00) in the Visual Studio binary editor with a find using a re

    - by Paul K
    Open a file in the Visual Studio binary editor that contains a null byte (0x00), then use the Quick Find feature (Ctrl +F) to find null bytes. I would have thought I could use a regular expression such as \x00 to match null bytes but it doesn't work. Searching for any other hex value using this method works fine. Is this a VS bug, 'feature', or am I just missing something? Is there a work around?

    Read the article

  • using LARGE_INTEGER gives me back error error C2679: '=' binary no operator found which takes a right-hand operand

    - by rekotc
    i have the following code: QueryPerformanceCounter(&timeStart); winMain::render(); //do stuff QueryPerformanceCounter(&timeEnd); numCounts = ( timeEnd.QuadPart - timeStart.QuadPart); All the 3 variables are declared as LARGE_INTEGER, the code should work since im following a book example, but i get: error C2679: '=' binary no operator found which takes a right-hand operand of type LONGLONG it might be '_LARGE_INTEGER &_LARGE_INTEGER::operator =(const _LARGE_INTEGER &)' 1 durante la ricerca di corrispondenza con l'elenco di argomenti '(LARGE_INTEGER, LONGLONG)'

    Read the article

  • C# How can i remove newline characters from binary?

    - by Tom
    Basically i have binary data, i dont mind if it's unreadable but im writing it to a file which is parsed and so it's importance newline characters are taken out. I thought i had done the right thing when i converted to string.... byte[] b = (byte[])SubKey.GetValue(v[i]); s = System.Text.ASCIIEncoding.ASCII.GetString(b); and then removed the newlines String t = s.replace("\n","") but its not working ?

    Read the article

  • C#: The input stream is not a valid binary format.

    - by Mcoroklo
    I have a problem with deserializing in C#/ASP.NET, which gives the exact error: The input stream is not a valid binary format. The starting contents (in bytes) are: 41-41-45-41-41-41-44-2F-2F-2F-2F-2F-41-51-41-41-41 ... What I am trying to do I have a structure with 3 classes. I have a class A which is a base class, and then class B and C which are derived from A. I am trying to store random types of B and C in the database using LINQ to SQL, in a column with the type VARCHAR(MAX). I cannot use BINARY as the length is around 15.000. My code... Error is in the LAST codeblock C# Code in Business layer- Storing a record private void AddTraceToDatabase(FightTrace trace) { MemoryStream recieverStream = new MemoryStream(); MemoryStream firedStream = new MemoryStream(); MemoryStream moveStream = new MemoryStream(); BinaryFormatter binaryFormatter = new BinaryFormatter(); binaryFormatter.Serialize(recieverStream,trace.Reciever); binaryFormatter.Serialize(firedStream,trace.FiredBy); binaryFormatter.Serialize(moveStream,trace.Move); string reciever = Convert.ToBase64String(recieverStream.ToArray()); string fired = Convert.ToBase64String(firedStream.ToArray()); string move = Convert.ToBase64String(moveStream.ToArray()); this.dataAccess.AddFightTrace(trace.TraceType.ToString(),reciever,move,fired,trace.DateTime,this.FightId); } C# Code in Data access layer - Storing a record public void AddFightTrace(string type, string reciever, string Move, string firedBy, DateTime firedAt, int fightid) { GameDataContext db = new GameDataContext(); dbFightTrace trace = new dbFightTrace(); trace.TraceType = type; trace.Reciever = reciever; trace.Move = Move; trace.FiredBy = firedBy; trace.FiredAt = firedAt; trace.FightId = fightid; db.dbFightTraces.InsertOnSubmit(trace); db.SubmitChanges(); } C# Code getting the entry in the database public List<dbFightTrace> GetNewTraces(int fightid, DateTime lastUpdate) { GameDataContext db = new GameDataContext(); var data = from d in db.dbFightTraces where d.FightId==fightid && d.FiredAt > lastUpdate select d; return data.ToList(); } C# Factory, converting from LINQ to SQL class to my objects THIS IS HERE THE ERROR COMES public FightTrace CreateTrace(dbFightTrace trace) { TraceType traceType = (TraceType) Enum.Parse(typeof(TraceType), trace.TraceType); BinaryFormatter formatter = new BinaryFormatter(); System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); MemoryStream recieverStream = new MemoryStream(enc.GetBytes(trace.Reciever)); recieverStream.Position = 0; MemoryStream firedStream = new MemoryStream(enc.GetBytes(trace.FiredBy)); firedStream.Position = 0; MemoryStream movedStream = new MemoryStream(enc.GetBytes(trace.Move)); movedStream.Position = 0; // THE NEXT LINE HERE CAUSES THE ERROR NPC reciever = formatter.Deserialize(recieverStream) as NPC; Player fired = formatter.Deserialize(firedStream) as Player; BaseAttack attack = formatter.Deserialize(movedStream) as BaseAttack; FightTrace t = new FightTrace(traceType,reciever,attack,fired); t.TraceId = trace.FightTraceId; t.DateTime = trace.FiredAt; return t; } So the error happends when the first Deserialize method is run, with the above error. I have tried several things but I am quite lost on this one.. Thanks! :-)

    Read the article

  • Speeding Up NHibernate Startup Time

    - by Ricardo Peres
    One technique I use and posted on the NHUsers mailing list consists in serializing a previously-configured Configuration to the filesystem and deserializing it on all subsequente starts of the application: Configuration cfg = null; IFormatter serializer = new BinaryFormatter(); //first time cfg = new Configuration().Configure(); using (Stream stream = File.OpenWrite("Configuration.serialized")) { serializer.Serialize(stream, configuration); } //other times using (Stream stream = File.OpenRead("Configuration.serialized")) { cfg = serializer.Deserialize(stream) as Configuration; } Check it out for yourselves. SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.0.320/scripts/clipboard.swf'; SyntaxHighlighter.brushes.CSharp.aliases = ['c#', 'c-sharp', 'csharp']; SyntaxHighlighter.all();

    Read the article

  • How can I extract similarities/patterns from a collection of binary strings?

    - by JohnIdol
    I have a collection of binary strings of given size encoding effective solutions to a given problem. By looking at them, I can spot obvious similarities and intuitively see patterns of symmetry and periodicity. Are there mathematical/algorithmic tools I can "feed" this set of strings to and get results that might give me an idea of what this set of strings have in common? By doing so I would be able to impose a structure (or at least favor some features over others) on candidate solutions in order to greatly reduce the search space, maximizing chances to find optimal solutions for my problem (I am using genetic algorithms as the search tool - but this is not pivotal to the question). Any pointers/approaches appreciated.

    Read the article

  • Sending binary data with Indy through TCP\IP, how?

    - by Wodzu
    Hello. How to send a binary data with Indy components? Which of them is most suitable for this task? I've tried to use TIdTcpClient but it allows only to send strings. I've found one reponce for that problem here but I don't get it. It says about method Write(TIdBytes), but the answer is not clear for me. Does he meant Write to some instance of TIdBytes, and how to connect that instance with TIdTcpClient? Thanks for any help.

    Read the article

  • How to find a binary logarithm very fast? (O(1) at best)

    - by psihodelia
    Is there any very fast method to find a binary logarithm of an integer number? For example, given a number x=52656145834278593348959013841835216159447547700274555627155488768 such algorithm must find y=log(x,2) which is 215. x is always a power of 2. The problem seems to be really simple. All what is required is to find the position of the most significant 1 bit. There is a well-known method FloorLog, but it is not very fast especially for the very long multi-words integers. What is the fastest method?

    Read the article

  • Can I use ruby rest-client to POST a binary file to an http API?

    - by Angela
    I have been using rest-client in ruby in post XML to a third-party API. I need to be able to include a binary image that's uploaded. How do I do that? Uploading Attachments Both letters and postcards will, in most cases, require the attachment of documents. Those attachments might be PDFs in the case of letters or images in the case of postcards. To uploading an attachment, submit a POST to: http://www.postful.com/service/upload Be sure to include the Content-Type and Content-Length headers and the attachment itself as the body of the request. POST /upload HTTP/1.0 Content-Type: application/octet-stream Content-Length: 301456 ... file content here ... If the upload is successful, you will receive a response like the following: 290797321.waltershandy.2

    Read the article

  • Why isn't "String or Binary data would be truncated" a more descriptive error?

    - by rwmnau
    To start: I understand what this error means - I'm not attempting to resolve an instance of it. This error is notoriously difficult to troubleshoot, because if you get it inserting a million rows into a table 100 columns wide, there's virtually no way to determine what column of what row is causing the error - you have to modify your process to insert one row at a time, and then see which one fails. That's a pain, to put it mildly. Is there any reason that the error doesn't look more like this? String or Binary data would be truncated Error inserting value "Some 18 char value" into SomeTable.SomeColumn VARCHAR(10) That would make it a lot easier to find and correct the value, if not the table structure itself. If seeing the table data is a security concern, then maybe something generic, like giving the length of the attempted value and the name of the failing column?

    Read the article

  • "tailing" a binary file based on string location using bash?

    - by ilitirit
    I've got a bunch of binary files, each containing an embedded string near the end of the file but at different places (only occurs once in each file). I need to extract the part of the file starting at the location of the string till the end of the file and dump it into a new file. eg. If the file's contents is "AWREDEDEDEXXXERESSDSDS" and the string of interest is "XXX", then the part of the file I need is "XXXERESSDSDS". What's the easiest way to do this in bash?

    Read the article

  • iTunes Connect rejects my binary because I used a pre-release version of the SDK, what should I do?

    - by Prairiedogg
    NOTE - I'm posting this question to answer myself as a service to the community. Stay tuned for the answer. I downloaded a pre-release version of the iPhone SDK and tried to update one of my existing apps using a binary I built with it. Obviously you are not supposed to do this but I had forgotten about the warning when I installed the pre-release SDK. Anyway - I have two questions: Can I simply set the base SDK to an earlier version in the build settings and get around this problem? If not, then what should I do?

    Read the article

  • Important Security Issue: Is it possible to put binary image data into html markup code and then get

    - by Joern Akkermann
    Hi, it's an important security issue and I'm sure this should be possible. A simple example: You run a community portal. Users are registered and upload their pictures. Your application gives security rules wenever a picture is allowed to be displayed. For example users must be friends on each sides by the system, in order that you can view someone elses uploaded pictures. Here comes the problem: it is possible that someone crawls the image directories of your server. But you want to protect your users from such attacks. If it's possible to put the binary data of an image directly into the html markup, you can restrict the user access of your image dirs the user and group your web application runs of and pass the image data to your apache user and group directly in the html. The only possible weakness then is the password of the user that your web app runs as. Is there already a possibility? Yours, Joern.

    Read the article

  • Is it possible to put binary image data into html markup and then get the image displayed as usual i

    - by Joern Akkermann
    It's an important security issue and I'm sure this should be possible. A simple example: You run a community portal. Users are registered and upload their pictures. Your application gives security rules whenever a picture is allowed to be displayed. For example users must be friends on each sides by the system, in order that you can view someone else's uploaded pictures. Here comes the problem: it is possible that someone crawls the image directories of your server. But you want to protect your users from such attacks. If it's possible to put the binary data of an image directly into the HTML markup, you can restrict the user access of your image dirs the user and group your web application runs of and pass the image data to your Apache user and group directly in the HTML. The only possible weakness then is the password of the user that your web app runs as. Is there already a possibility?

    Read the article

  • What could prevent from running a binary on linux distribution compiled on a different platform ?

    - by yves Baumes
    We have 2 different compilation machine: red hat as4 and as5. Our architects require us, developers, to compile our program on those 2 platforms each time before copying them on their respective machine in production. What could prevent us from compiling our application on one machine only (let say the red has as 4 for instance) and deploy that binary on all target platform instead ? What is your point of view and could you pinpoint specific issues you've encountered with doing so ? What issues may I face with doing so ?

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >