Hi. I have a JFrame with a JLayeredPane. On the first layer there is a table, then above it there is black transparent layer that allows me options and what-not. I animate the arrival of this transparent layer. However when I do this the panel seems to loose it's transparency, that is until I interact with the base layer, THEN I see through the transparent layer again. Sometimes, when I start interacting with the textfield or button on the transparent level, it starts displaying pieces and bits of the lower layer on the Transparent layer. Am I missing the need …

Member Avatar
Member Avatar
+0 forum 2

Hey. In VB.NET, I need to write an array of bits to the serial port, in such a fashion that I can directly control the output signal. For example, I write 00110110 in VB and I need to get exactly that on output. I have tried SerialPort.Writeline but it's not what I need. Any help appreciated. Thanks!!

Member Avatar
Member Avatar
+0 forum 1

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], so 1011011 1111. So far I’ve come up with this; short int holder = 0; memcpy(holder,&char_array[5], 2 ); short int alt = holder >> 4; return 0; I've tried creating a 14 bit data type to hold the bits, copying the 2 bytes in then shifting right 4 but this …

Member Avatar
Member Avatar
+0 forum 1

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 of try, as it is total file size of all bytes*/ out.write((byte)out.getCount()); // my method for getting file size works } I just need a way for the last out.write, to write the byte between the already existing 70, and 40 bytes previously written. I tried the extended way with …

Member Avatar
Member Avatar
+0 forum 4

Dear all. please kindly but freely provide of your ideas and thought about following. I need to get binary bits of variety of files regardless of ASCII, Unicode, or even non-printable etc. I searched following seems to be commonly used but not for all. bits[i] = ((1<<i) & c) != 0 ? 1:0; bitset<8> qBits(buffer[j]); Will you please provide any other way of getting bits of files??? This is important task for me, and any of your response will highly be appreciated. Thanks in advance for your attention. Sincerely Ted

Member Avatar
Member Avatar
+0 forum 2

Start a new console application and fill in the about 70 lines of code in the Program.cs file. Run and enjoy!

Member Avatar
Member Avatar
+2 forum 8

These two functions compute the orders of the lowest bit and the highest bit set in the binary representation of an integer. I expect them to handle securely very large integer values.

Member Avatar
Member Avatar
+1 forum 3

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
Member Avatar
+0 forum 14

I want to merge 2 or more hashtables together..It doesn't matter what the final form is, as long as I can iterate through it. Here the final form is an array. So I have an unsigned long long as the key, the value is a string,int pair. Each key maps to a bin, each bin can have collisons. Instead of copying the entire hashtable into the array i copy it bin by bin, that way i will not need to iterate through the entire array. First I copy the first bin of the first hashtable into an array of Pairs, …

Member Avatar
Member Avatar
+0 forum 2

Hi everyone! Is there a way/command in C to find a string that is contained in a longer string? I'm currently developing a C program in Windows that sends requests to a machine and gets its response through socket programming. The response is an image in jpeg/jfif format. The whole response looks like the one below: Received data is: [CODE] HTTP/1.1 200 OK SERVER: Network Camera Date: Thu, 01 Jan 1970 00:01:14 GMT Content-Type: image/jpeg Content-disposition: filename="something.jpg" Connection: close [/CODE] I want to receive the image sent to me and it should be viewable. I tried to write the whole …

Member Avatar
Member Avatar
+0 forum 8

This snippet defines a function [icode]a2bits[/icode] which converts a characters string to a string of 0's and 1's showing its bitwise representation.

Member Avatar
Member Avatar
+0 forum 2

Howdy, those of you who remember me may be happy to know my 2D game engine was finished and I'm now working on a 3D engine. My engine has been going rather spiffingly well, after some battles with DirectX and OpenGL i managed to get them working side-by-side. Wrote a working wavefront OBJ model loader (i'll happily hand that out sometime) and generally was having a great time.. Now here comes the problem. Pretty-much all my code so far is cross platform, the parts that aren't have alternate versions for platforms (window management, etc). I'm about to impliment my Physics …

Member Avatar
Member Avatar
+0 forum 5

The End.