43 Topics

Member Avatar for
Member Avatar for random_1

Im trying to find for bytes(unknown) that appear before another set of bytes that have already been found. i have a binary file that for example looks like this: 82 00 10 00 00 00 00 00 00 00 00 00 00 01 00 00 60 F8 6C 10 BF …

0
190
Member Avatar for giancan

Dear all, I have a small script wich is supposed to process two images passed as arguments in commandline, but I don't know how to handle these arguments when they are with non latin characters. Here is an example of command python.exe myscrit.py --first=xvalue "image1.png" "οισξφσιο.png" If I isolate the …

Member Avatar for Gribouillis
0
387
Member Avatar for Mr.M

Hi DW. How can one read a file or change a file bits without reading the entire file. But first of all how can I read a file in such a way that I get it's bits. I want to read MP3 file and change it bits but I don't …

Member Avatar for AssertNull
0
649
Member Avatar for ryannnnn

**Read title.** username = base64.b64encode(username)+'\n' This is what I thought would have worked, but it comes up with an error, "TypeError: can't concat bytes to str", meaning that I cannot add +'\n' to the end of the code. If there is anyway anyone knows how to write the byte of …

Member Avatar for vegaseat
0
297
Member Avatar for Doogledude123

Alright, so I have seen `<<` and `>>` in a few different Java Programs and I have an idea of what they do, but I have no idea what you would use them for. I haven't ran into a problem where I need to use them, so if someone could …

Member Avatar for Doogledude123
0
182
Member Avatar for Ferd12324445

I'm creating multiple custom info windows using only one xml layout, all of the info inside the window will be put In programmatically. I am now trying to give the ImageView an image but when I do that for one marker all of the other markers ImageView images become the …

Member Avatar for raj.mscking
0
337
Member Avatar for daino

If I have two bytes representing 117, 117 or 1110101 , 1110101 and I want to concatenate them (technically I know how) then which end attaches to which? I understand they will be arranged in memory depending on endianess but overall, is there a standard way of concatenating bytes. Lets …

Member Avatar for daino
0
169
Member Avatar for smart_virus87

Hi, I'm going to send a byte to the .dll to retrieve machine information. Right now I'm using the string to pass the value to CBMReader and I able to retrieve the value. Dim Devc as String Dim CBMReader as String For i = 0 To 50 If tempDev = …

0
115
Member Avatar for jakubee

Hi All, My problem is: i'm trying to convert byte[] into image. The byte[] comes from JSON and it's in this format: `"4oCwUE5HDQoaCgAAAA1JSERSAAAAfwAAAFAIBgAAADBHwqrDsAAAAAlwSFlzAAAAJwAAACcBKgnigJhPAAAgAElEQVR4xZPCrMK9ecWSZcOZfcOfw7c5w5vCvW/CqXp..."` it goes for another 100 lines. The code where the problem occurs: DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(PlayersListActivity.URL); httpPost.setEntity(new UrlEncodedFormEntity(parameters, "UTF-8")); HttpResponse httpResponse …

0
150
Member Avatar for wschamps42

So what would be the size of this array in bytes if on a 32 bit machine: double *arr[4] ;

Member Avatar for rubberman
1
262
Member Avatar for tony75

Hi Im using windows form applicaton and try using a method that returns a value and have a parmeterlist input. I try to creat a program that converts a number of kilobytes (KB) to byte. The program's user to specify the number of KiB and the program will print the …

Member Avatar for tony75
0
205
Member Avatar for CoilFyzx

Hello good day. I have a quick question is anyone able to assist me in saving a password file. I encrypted my password and so I want to save the salt and the encrypted password(which are byte arrays). I tried using a properties file, but I soon found out that …

Member Avatar for CoilFyzx
0
245
Member Avatar for Alexkid

Hi there, I have an array of unsigned chars that hold hex values, I’m interested in values [5] and [6] of the array. Say [5] = 0x5b = 0101 1011 and [6] = 0x7b = 0111 1011 I'm trying to get all of [5] and the first half of [6], …

Member Avatar for L7Sqr
0
191
Member Avatar for riccardo-m

Hi, I've been trying to send a long integer from an Arduino to my C++ program via the serial port. There seems to be many examples of this when i search, but I've not had much luck except for one example. This example seems to work, but not when I …

Member Avatar for riccardo-m
0
3K
Member Avatar for trishtren

Hey, Iv been looking around for a simple way (meaning less than 10 lines) to reverse the order of my bytes in a byte array. At the moment my code is: public byte[] outputarray() { byte b[] = new byte[10]; ByteBuffer buf = ByteBuffer.wrap(b); buf.putLong(output); } The problem is that …

Member Avatar for trishtren
0
3K
Member Avatar for trishtren

Hey, I was hoping someone can help me convert a piece of php code, im not really sure where to start pack( 'v', $test ); The pack php function above takes in an integer and converts it to an unsigned long. V - unsigned long (always 32 bit, little endian …

Member Avatar for keith.pastorek
0
1K
Member Avatar for Krokcy

So i have a working network file transfer program now (if you want to see some of the code look at my other '[article](http://www.daniweb.com/software-development/java/threads/426357/networking-in-java-not-doing-it-right)'). But now that im trying larger files, im running into a problem where i run out of memory (which is understandable when the array is 1 …

Member Avatar for Krokcy
0
4K
Member Avatar for trishtren

Hey, Im stuck trying to figure out how to insert one byte between two other bytes that have already been created in an output stream: OutputStream out = new FileOutputStream("MyFile"); try { out.write((byte) 70); /*Byte should be inserted between these elements*/ out.write((byte) 40); /* but must be performed at end …

Member Avatar for trishtren
0
176
Member Avatar for dshiells

Hi all, I'm sure this is a n00b question, but I can't seem to get my head around it! I have a 4 BYTE array which I want to display as a decimal value. For example, in the array it contains the hex values: 00 05 7d a4, and I …

Member Avatar for dshiells
0
2K
Member Avatar for SAM2012

Hi All, I am working on a program where I want to keep the length of message in bytes to further working on it. the message got this string in it. [CODE] message^ m = gcnew message("usa.weather");[/CODE] I have to keep the length of this argument that is routing key …

Member Avatar for WaltP
0
175
Member Avatar for ressaince

i have an ASP web services to change byte array that given from the client and change it to a file and save it in the web server the code is like this : [CODE] [WebMethod] public string UploadFile(byte[] f, string fileName) { try { MemoryStream ms = new MemoryStream(f); …

Member Avatar for Dagar.pp
0
510
Member Avatar for DanWebb3148

[CODE]sizeA = 2**28 M = [0]*sizeA[/CODE] The above code creates an array but, each element is 4 bytes each. How do create a large byte array with type 'B' (eight bits unsigned)? I would like it to be as large as possible. I need it for a sieve prime number …

Member Avatar for DanWebb3148
0
961
Member Avatar for behrad kiani

I try to converting bytes with 8 digits into ASCII code for example if user enter "0000111" the program convert it to it's ASCII code and shows 'p'(the value of character c in the code below became 'p') [CODE]public static void main(String[] args) { Byte bytes; char c; Scanner input=new …

Member Avatar for JamesCherrill
0
306
Member Avatar for Wouto1997

[b]C# text encoder / decoder[/b] [i][u]Please note that I'm not a professional developer and I might make simple mistakes because of that, I'm also dutch, and 14 years old, so please keep that in mind before you reply. thank you C:[/i][/u] My brother came up with an idea to encode …

Member Avatar for Narue
0
522
Member Avatar for IcantC

Hi there, My question is how could I output byte value (meaning zeros and ones) to screen. I just want to try some shifts and see how it works.

Member Avatar for IcantC
0
9K
Member Avatar for janet@123

i am receiving a struct from the switch: [CODE]/* Packet received on port (datapath -> controller). */ struct ofp_packet_in { struct ofp_header header; uint32_t buffer_id; /* ID assigned by datapath. */ uint16_t total_len; /* Full length of frame. */ uint16_t in_port; /* Port on which frame was received. */ uint8_t …

Member Avatar for janet@123
0
264
Member Avatar for sathya88

how to free memory of byte array... code[CODE]for(int j=0;j<count;j++){ buffer=null; //[COLOR="Red"]free the memory by set as a null but not working????? shows array index out of bound exception for the second time[/COLOR] buffer= new byte[size]; //byte mem alloc temp2=di.read(buffer,total,size);// read buffer total=total+temp2; fo=null; ds=null; fo= new FileOutputStream(flist[j]); ds= new DataOutputStream(fo); …

Member Avatar for masijade
0
7K
Member Avatar for Museless

I am trying to find out how to replicate the output of fwrite("andbe", 4, 1, output); an encryption algorithm I am using writes its output as this, but I am sending data across a network, and need to be able to write this to a string to send. The algorithm …

Member Avatar for thines01
0
163
Member Avatar for TrustyTony

Lookup table is usually the fastest method to find function value, if number of values is small. Here we demonstrate the principle by using task of showing the value of byte as binary string or transforming binary string to byte binary value.

0
448
Member Avatar for bleedi

Hey, I'm working on a project where we have to stream files from a server app to clients. I have it all working nicely, but we have a special client type that cannot save files to HDD, not even temporarily. I can get the byte stream from server to this …

Member Avatar for CsharpChico
0
733

The End.