Search Results

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

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

  • How to upload binary (audio) data from a Flash AS3 client to .NET server (WCF/REST/HTTP/?)?

    - by Bobby
    Simply stated: I'm trying to record audio in a browser, and get that data back up to the server. I originally tried to capture, encode and upload the audio using Silverlight, but because of the lack of suitable client-side encoding options, I'm now giving Flash a shot (Flash has baked-in support for encoding to Speex). I think I've figured out how to capture and encode the audio... But now what was easy in Silverlight, is the challenge in Flash. My server-side is .NET: MVC2- I'm open to receiving the audio in whatever manner is best- REST, WCF.. So that's my question: How could one upload binary data from Flash, to a .NET server-side endpoint. If the answer is WCF: then how would one setup the client-side proxies to communicate with the service? If the answer is REST or HTTP Post, then how would one construct this HTTP request and pass along the data? I've been reading up on AS3, but am new to Flash dev... Thanks for any help!

    Read the article

  • Python - converting wide-char strings from a binary file to Python unicode strings...

    - by Mikesname
    It's been a long day and I'm a bit stumped. I'm reading a binary file that contains lots of wide-char strings and I want to dump these out as Python unicode strings. (To unpack the non-string data I'm using the struct module, but I don't how to do the same with the strings.) For example, reading the word "Series": myfile = open("test.lei", "rb") myfile.seek(44) data = myfile.read(12) # data is now 'S\x00e\x00r\x00i\x00e\x00s\x00' How can I encode that raw wide-char data as a Python string? Edit: I'm using Python 2.6

    Read the article

  • Delphi: how to efficently read a big binary file, converting it to hexadecimal for passing it as a v

    - by user193655
    I need to convert a binary file (a zip file) into hexadecimal representation, to then send it to sql-server as a varbinary(max) function parameter. A full example (using a very small file!) is: 1) my file contains the following bits 000011110000111 2) I need a procedure to QUICKLY convert it to 0F0F 3) I will call a sql server function passing 0x0F0F as parameter The problem is that I have large files (up to 100MB, even if average file size is 100KB files are possible), so I need the fastest way to do this. Otherwise stated: I need to create the string '0x'+BinaryDataInHexadecimalRepresentation in the most efficient way. Related question: passing hexadecimal data to sql server

    Read the article

  • Should I include the binary in a Rails plugin or not?

    - by Nick Gorbikoff
    Hello. I'm trying to roll out a little Rails plugin that is basically is just a wrapper to a 7zip archiver. Should I include the 7zip binaries for windows, mac and linux with it or explain to user that it's a dependency and they need to get it working. I know it's not that difficult to install a 7zip, but what is the best practice in general. The reason I'm asking is cause I've ran so many times into gems that need some sort of dependency that doesn't compile properly or is not available in ready form for the OS in question and then I end up spending have a day hunting down for a binary or a way to compile the program. (Have happened to me both on Mac and Windows, not on Debian so far. )

    Read the article

  • How to load an RSA key from binary data to an RSA structure using the OpenSSL C Library?

    - by Andreas Bonini
    Currently I have my private key saved in a file, private.key, and I use the following function to load it: RSA *r = PEM_read_RSAPrivateKey("private.key", NULL, NULL, NULL); This works perfectly but I'm not happy with the file-based format; I want to save my key in pure binary form (ie, no base64 or similar) in a char* variable and load/save the key from/to it. This way I have much more freedom: I'll be able to store the key directly into the application const char key[] { 0x01, 0x02, ... };, send it over a network socket, etc. Unfortunately though I haven't found a way to do that. The only way to save and load a key I know of reads/saves it to a file directly.

    Read the article

  • I'm getting the error in iTunes connect: The binary you uploaded was invalid. The signature was inva

    - by Joshua
    I went through the dev portal provisioning process twice now trying to get it to work, but to no avail. I don't think it's the second half (signature is invalid), I think it actually may have to with my binary. I have a warning in xcode that isn't helping me because I don't know what to do about it. And honestly I don't know how relevant this information even is. But it says: "Check Dependencies: Warning: The copy bundle resources build phase contains target's info.plist" The app runs perfectly in the simulator, and I haven't made any changes to the info.plist since I submitted the app to Apple last week. (this is an update) any suggestions?

    Read the article

  • is it possible to include a binary in my project and use it?

    - by Adam S
    I have a binary that's used as a command-line tool to manipulate some files - tool.exe. I would like to include this in my Visual Studio 2008 project and use it from my C# code. I have it in a folder called "Resources" which also has some other files my project uses. I would like to do something like Process myproc = Process.Start("Resources/tool.exe"); but I believe C# has an issue with this because it's looking in the file system rather than the project. How can this be done?

    Read the article

  • how to send Zip(binary) file Through HTTP post method in mFC/C++?

    - by Mahantesh
    I am posting the file to server and its working fine, But the my code fails when i try to post the .zip file. May be my code is wrong in the reading the zip file contents data. ifstream::pos_type size; char * memblock; ifstream file ("example.zip", ios::in|ios::binary|ios::ate); if (file.is_open()) { size = file.tellg(); memblock = new char [size]; file.seekg (0, ios::beg); file.read (memblock, size); file.close(); postBody.AppendFormat("Content-Disposition: form-data; name=\"datafile\"; filename=\"%s\"; \r\n\n%s", zipFilePath, memblock); postBody.AppendFormat("\r\n--%s--\r\n", boundary); }

    Read the article

  • How to read binary column in database into image on asp.net page?

    - by marko
    I want to read from database where I've stored a image in binary field and display a image. while (reader.Read()) { byte[] imgarr = (byte[])reader["file"]; Stream s = new MemoryStream(imgarr); System.Drawing.Image image = System.Drawing.Image.FromStream(s); Graphics g = Graphics.FromImage(image); g.DrawImage(image, new Point(400, 10)); image.Save(Response.OutputStream, ImageFormat.Jpeg); g.Dispose(); image.Dispose(); } con.Close(); This piece of code doesn't work: System.Drawing.Image image = System.Drawing.Image.FromStream(s); What am I doing wrong?

    Read the article

  • How to enter decimal/binary numbers when creating byte objects in python?

    - by Eric
    I'm using python 3.1.1. I know that I can create byte objects using the byte literal in the form of b'...'. In these byte objects, each byte can be represented as a character(in ascii code if I'm not wrong) or as a hexadecimal/octal number. Hexadecimal and octal numbers can be entered using an escape of \x for hexadecimal numbers and just a \ for octal numbers. However, there's no escape sequences for decimal or binary numbers. Is there any way to enter them into byte objects?

    Read the article

  • Converting byte[] of binary fixed point to floating point value?

    - by Sean Donohue
    I'm reading some data over a socket. The integral data types are no trouble, the System.BitConverter methods are correctly handling the conversion. (So there are no Endian issues to worry about, I think?) However, BitConverter.ToDouble isn't working for the floating point parts of the data...the source specification is a bit low level for me, but talks about a binary fixed point representation with a positive byte offset in the more significant direction and negative byte offset in the less significant direction. Most of the research I've done has been aimed at C++ or a full fixed-point library handling sines and cosines, which sounds like overkill for this problem. Could someone please help me with a C# function to produce a float from 8 bytes of a byte array with, say, a -3 byte offset?

    Read the article

  • SQL Server 2005 to 2008 upgrade - are MDF files binary compatible?

    - by james
    I have 50 databases on a MS SQL Server 2005 system and want to upgrade to MS SQL Server 2008. This is what I tried on some test machines: 1. copied the \DATA directory from the source (MSSQL 2005) to exactly the same path on the target (MSSQL 2008) server. 2. edited the startup parameters on the MSSQL 2008 service to point to the path of the MSSQL 2005 master database. 3. restarted MSSQL service It worked and I can access all databases, tables and data. My questions are: I go back to SQL Server 4.2 and it has never been this easy. I know it worked, but should have it worked? Am I missing something, or is there going to be a gotcha next week? These are simple databases, with just tables, views and indexes. No cross database links, no triggers etc

    Read the article

  • Firefox 3.6.3 on Snow Leopard 10.6.3 - symbolic link to command line binary doesn't work?

    - by David Watson
    I have Firefox 10.6.3 installed on Mac OS X Snow Leopard from the DMG. I can run firefox from the terminal using /Applications/Firefox.app/Contents/MacOS/firefox-bin. However, if I create a symbolic link: sudo ln -s /Applications/Firefox.app/Contents/MacOS/firefox-bin /bin/firefox then it refuses to run, or at least display. When I issue "firefox" from the terminal, I can see the process in top, but never get the GUI to appear. :/ = ls -lr /bin/firefox lrwxr-xr-x 1 root wheel 52 May 5 15:19 /bin/firefox - /Applications/Firefox.app/Contents/MacOS/firefox-bin Any ideas? Thanks, David

    Read the article

  • Where should my application setup put the binary executables in Windows 7?

    - by KeyboardMonkey
    I created a small Windows app, and am builder a setup for it using NSIS, but what I can't find out is where to put the executables to conform to the new Windows security model. Traditionally we put program files in, well, "c:\program files". With the security model getting more mangled with each Windows version, some users have restricted accounts, and I'm not sure installing into program files will work for these users. Where can I install my program's files that will cater for these lower-privileged users? Oh and I want to avoid ClickOnce.

    Read the article

  • How do operating systems… run… without having an OS to run in?

    - by Plazmotech Binary
    I'm really curious right now. I'm a Python programmer, and this question just boggled me: You write an OS. How do you run it? It has to be run somehow, and that way is within another OS? How can an application run without being in an OS? How do you tell the computer to run, say, C, and execute these commands to the screen, if it doesn't have an OS to run in? Does it have to do with a UNIX kernel? If so, what is a Unix kernel, or a kernel in general? I'm sure OSes are more complicated than that, but how does it work?

    Read the article

  • Any pre-rolled System.IO abstraction libraries out there for Unit Testing?

    - by Binary Worrier
    To test methods that use the file system we need to basically put System.IO behind a set of interfaces that we can then mock, I do this with a DiskIO class and interface. As my DiskIO code gets larger (and the grumblings from the we're unconvinced about this TDD thing crowd here in work get louder), I went looking for a comprehensive open source library that already does this and found . . . nothing. I may be looking in the wrong place or have approached this problem in completely the wrong way. I can't be the only idiot in this position, do these libraries exist, if so where are they? Any you've used and would recommend? Thanks P.S. I'm happy with my current approach i.e. starting with what we need, and adding only when the need arises. Unfortunately the we're unconvinced about this TDD thing crowd remain unconvinced, and think that I can't be right.

    Read the article

  • How to operating systems… run… without having an OS to run in?

    - by Plazmotech Binary
    I'm really curious right now. I'm a Python programmer, and this question just boggled me: You write an OS. How do you run it? It has to be run somehow, and that way is within another OS? How can an application run without being in an OS? How do you tell the computer to run, say, C, and execute these commands to the screen, if it doesn't have an OS to run in? Does it have to do with a UNIX kernel? If so, what is a unix kernel, or a kernel in general? I'm sure OSes are more complicated than that, but how does it work? It would be really brilliant to know this! Thanks.

    Read the article

  • backup util for binary/media files. (to use with source control)

    - by acidzombie24
    I am using git for my source control. I dont backup media such as gifs, pngs, etc. I am thinking everytime i tag a release it would be a good idea to backup the media files as well. But i dont want to make several copies of the same file each time i create a tag. I'd like an app to handle checking if the file already exists and handles restoring everything to a version i like What util might i use to do this? I'm using windows 7.

    Read the article

  • What is the best Binary Decision Diagram library for Java?

    - by reprogrammer
    A Binary Decision Diagram (BDD) is a data structure to represent boolean functions. I'd like use this data structure in a Java program. My search for Java based BDD libraries resulted into the following packages. Java Decision Diagram Libraries JavaBDD JDD JBDD bddbddb If you know of any other BDD libraries available for Java programs, please let me know so that I add it to the list above. If you have used any of these libraries, please tell me about your experience with the library. In particular, I'd like you to compare the available libraries along the following dimensions. Quality. Is the library mature and reasonably bug free? Performance. How do you evaluate the performance of the library? Support. Could you easily get support whenever you encountered a problem with the library? Was the library well documented? Ease of use. Was the API well designed? Could you install and use the library quickly and easily? Please mention the version of the library that you are evaluating.

    Read the article

  • Getting message in android app: Binary XML file line #2: You must supply a layout_width attribute.

    - by opike
    I'm trying to use a ListView inside of a RelativeLayout but when I run my app I get a runtimeexception with the message: Binary XML file line #2: You must supply a layout_width attribute. I tried putting layout_width attributes in every conceivable place in the xml resource files but so far no luck. I attempt to populate the listview with this line of code: setListAdapter(new ArrayAdapter(this, R.layout.tablerow3, R.id.label, items)); Here's the tablerow3.xml contents: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"> android:layout_width="20dp" android:layout_height="5dp" android:id="@+id/tablerow01"> <Label android:id="@+id/label01" android:layout_width="5dp" android:layout_height="5dp" android:textColor="@color/solid_white" android:singleLine="true"/> <Label android:id="@+id/label02" android:layout_width="5dp" android:layout_height="5dp" android:textColor="@color/solid_white" android:singleLine="true"/> </LinearLayout> Here's the xml that contains the RelativeLayout(forex2.xml): <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Button android:text="Static Button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:id="@+id/button_id"> </Button> <Spinner android:id="@+id/spinner1" android:layout_width="match_parent" android:layout_toRightOf="@id/button_id" android:layout_alignParentTop="true" android:layout_height="wrap_content" android:drawSelectorOnTop="true" /> <ListView android:id="@android:id/list" android:layout_width="5dp" android:layout_height="5dp" android:layout_alignParentBottom="true" /> <!-- android:layout_width="wrap_content" android:layout_height="wrap_content" --> </RelativeLayout>

    Read the article

  • Java InputReader. Detect if file being read is binary?

    - by Trizicus
    I had posted a question in regards to this code. I found that JTextArea does not support the binary type data that is loaded. So my new question is how can I go about detecting the 'bad' file and canceling the file I/O and telling the user that they need to select a new file? class Open extends SwingWorker<Void, String> { File file; JTextArea jta; Open(File file, JTextArea jta) { this.file = file; this.jta = jta; } @Override protected Void doInBackground() throws Exception { BufferedReader br = null; try { br = new BufferedReader(new FileReader(file)); String line = br.readLine(); while(line != null) { publish(line); line = br.readLine(); } } finally { try { br.close(); } catch (IOException e) { } } return null; } @Override protected void process(List<String> chunks) { for(String s : chunks) jta.append(s + "\n"); } }

    Read the article

  • For business people to manage, keep binary images in MySQL or just the urls?

    - by Michael Mao
    Hello everyone: I am working on a task to enable image uploading and auto-scaling(from full sized to thumbnail) by jQuery & PHP. I can naturally come up with two approaches : First, store both images as binary objects directly into MySQL; Second, store only urls to the images and keep the images somewhere on server. The images are for everyone to view, so there are no security restrictions, as far as I know. Personally I don't have any preference, however, at the end of the day, it is the business people that are going to manage the images as part of the system(CRUD). So I am wondering which seems to be a bit better for them? Of course I am building a easy-to-use, visualize web interface for the staff to control the process, but I am not sure if that is enough. Lessons told me that if I don't think for the future and seek the most flexible approach, the I will probably screw myself sooner or later. PS. The following link is what I've found so far, which is pretty cool, no flash involved :) Andrew Valum's ajax image upload jQuery plugin

    Read the article

  • SSIS String or binary data would be truncated. The statement has been terminated.

    - by Subbarao
    When I run SSIS package from BIDS it runs fine without any error / problem. When I try to call it through a ASP.NET website I get the following error - "String or binary data would be truncated. The statement has been terminated." I checked all the columns / data to see if anything is exceeding the limit, everything is fine. I can run the package through command line using dtexec C:dtexec /f "C:\temp\MyTempPackage.dtsx", it executes without any problem . The problem is when I try to run it through ASP.NET. The following is the code that I am trying to use - //DTS Runtime Application Application app = new Application(); //DTS Package Package package = app.LoadPackage(packagePath, null); //Execute and Get the result DTSExecResult result = package.Execute(); I am making a call to a webservice from asp.net which has the above code. Both the webservice and website have identity impersonation enabled. I have identity enabled in my web.config for this <identity impersonate="true" userName="MyUserName" password="MyPassword"/> This problem is only when I am trying to import a Excel file (.xlsx) when I import a .txt file everything is fine. Excel Import blew up in both 32bit and 64bit enviornments. Help on how to make this to work is greatly appreciated.

    Read the article

  • Is it possible to De-Serialize a new Derived class using Old Binary?

    - by Anand
    In my project I have a class which I Serialize in Binary format to the disk. Due to some new requirement I need to create a new class which is derived from the original class. eg [Serializable] public class Sample { String someString; int someInt; public Sample() { } public Sample(String _someString, int _someInt) { this.someInt = _someInt; this.someString = _someString; } public String SomeString { get { return someString; } } public int SomeInt { get { return someInt; } } } [Serializable] public class DerivedSample : Sample { String someMoreString; int someMoreInt; public DerivedSample () : base() { } public DerivedSample (String _someString, int _someInt, String _someMoreString, int _someMoreInt) : base(_someString, _someInt) { this.someMoreString = _someMoreString; this.someMoreInt = _someMoreInt; } public String SomeMoreString { get { return someMoreString; } } public int SomeMoreInt { get { return someMoreInt; } } } When I try to De serialize an old file which contains only object of Sample it works fine, in the current assembly. That means backward compatibility is there. But when I try to deserialize the file which contains object of DerivedSample using the previous version of the assembly application crashes. Which means forward compatibilty needs to be taken care off... It it possible to say read only the base class part of the object from new version of the file?

    Read the article

  • How to find sum of node's value for given depth in binary tree?

    - by masato-san
    I've been scratching my head for several hours for this... problem: Binary Tree (0) depth 0 / \ 10 20 depth 1 / \ / \ 30 40 50 60 depth 2 I am trying to write a function that takes depth as argument and return the sum of values of nodes of the given depth. For instance, if I pass 2, it should return 180 (i.e. 30+40+50+60) I decided to use breath first search and when I find the node with desired depth, sum up the value, but I just can't figure out how to find out the way which node is in what depth. But with this approach I feel like going to totally wrong direction. function level_order($root, $targetDepth) { $q = new Queue(); $q->enqueue($root); while(!$q->isEmpty) { //how to determin the depth of the node??? $node = $q->dequeue(); if($currentDepth == $targetDepth) { $sum = $node->value; } if($node->left != null) { $q->enqueue($node->left); } if($node->right != null) { $q->enqueue($node->right); } //need to reset this somehow $currentDepth ++; } }

    Read the article

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