43 Topics

Member Avatar for
Member Avatar for NickPatton

I'm using sockets in C to write 10 bytes to a socket and then read 10 bytes from that socket. I create a parent process that forks, creating a child that acts as the socket server that writes the 10 bytes. After the 10 bytes are wrote, back in the …

Member Avatar for NickPatton
0
272
Member Avatar for pi_lord12

Hey guys, I'm working on a project to use Huffman trees to compress a text file into binary. For instance, based on the frequency of the characters in a string like "aardvark", a - 3 r - 2 d - 1 v - 1 k - 1, compression using a …

Member Avatar for pi_lord12
0
214
Member Avatar for Queen007

The total number of objects on one of my page is 76 which by their number will dominate web page delay. how can I reduce this to a more reasonable number? The total size of my page is 1451727 bytes, which will load in 304.53 seconds on a 56Kbps modem. …

Member Avatar for teedoff
0
108
Member Avatar for RenanLazarotto

Hey guys, quick questions! 1- How can I check the size of a variable? Size in bytes, not length. (; 2- What data can be stored into byte variables? And what the maxium size of the variable? 3- How do I store data inside a byte variable? Thats all for …

Member Avatar for RenanLazarotto
0
142
Member Avatar for clapclash

Hi guys! Well I'll be quick, I just want to know how the formula below works. Ls = least significant bit; Ms = most significant bit; Ls | Ls1 << 8 | Ls2 << 16 | Ms << 24 This formula is intended to turn four separate bytes into a …

Member Avatar for bibiki
0
183
Member Avatar for kumaravelmanju

Need to insert byte array value in to a column using bcp bulk copy. Any way?

0
80
Member Avatar for RossR

Hi all, I am stucked at this problem - net to let user set string as byte eg. "0xFF", And parse it to byte. Problem is, that using... [CODE] byte byteVar = (byte) "0xFF"; [/CODE] ...is incompatible. Nice page about this is [URL="http://www.herongyang.com/Java/Byte-Data-Type-Implicit-Casting.html"]there[/URL]. Any idea how solve this? Thx for …

Member Avatar for javinpaul
0
233
Member Avatar for chintan_1671

I have a byte array which looks something like 01 00 02 00 73 45 69 A5 So i have to read first 2 bytes and convert it into integer to get its value. Same for next 2 bytes and then next 4 bytes. Here the value for first 2 …

Member Avatar for ddanbe
0
235
Member Avatar for rokape

Hi Guys, As the title says really... Sounds simple, it is. But....! I'm dealing with huge numbers here. I'm dragging bandwidth from a logging system I am developing for a client and it returns it in BYTES... Very accurate :| This is the sort of number I'm dealing with here... …

Member Avatar for rokape
0
2K
Member Avatar for waleed.makarem

Dear All , The question is quite simple for all of you . I have a binary file . A description for this file says that : "first 2 bytes in the header is the number of records" I have opened this file and loaded it into bytes by this …

Member Avatar for waleed.makarem
0
224
Member Avatar for BluMan

Hi! Could you tell me what did I do wrong in the code bellow? I try to read one line from a file, but it shows on the screen only unknown characters(different from the characters I have in the file). [Code] GetLine Proc Hand:HANDLE, pBuf:DWord Local Len:DWord Local rLen:DWord Local …

0
128
Member Avatar for Izarian

Okay, so C++ has no specific byte class, but what they do have is an unsigned char class to convert ints/doubles/floats to binary/bytes. In trying to convert some Java to C++, I am trying to keep some of the function signatures the same or close to the same, and in …

Member Avatar for Salem
0
274
Member Avatar for Clawsy

Hi, I first convert the image on the server application in bytes: [code] //server public void sendImage(File file) throws IOException { ByteArrayOutputStream baos=new ByteArrayOutputStream(1000); BufferedImage img=ImageIO.read(new File(file.getAbsolutePath())); ImageIO.write(img, "jpg", baos); baos.flush(); os.write(baos.toByteArray());// this is a "new DataOutputStream(clientSocket.getOutputStream());" System.out.println("Done! Length is:"+baos.toByteArray().length); baos.close(); } [/code] Then my application freezes when trying to …

Member Avatar for Clawsy
0
219

The End.