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 58 87 45 87 6F 0C 61 0D 26 B0 F5 10 00 00 00 01 00 11 00 00 00 00 00 0E 00 11 00 2D 00 04 00 72 46 13 F4 18 43 C0 D2 0A 64 24 91 F3 E7 00 80 54 00 4E …

Member Avatar
+0 forum 0

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 explain exactly what they do and give and show some examples of when and why you would need them, that would be much appreciated.

Member Avatar
Member Avatar
+0 forum 4

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 same, any idea why? final Bitmap bmp = BitmapFactory.decodeByteArray(data, 0,data.length); if(postc.getAuthor().getObjectId().equals(ParseUser.getCurrentUser().getObjectId())){ Marker oldMarker = mapMarkers.get(postc.getObjectId()); final MarkerOptions MarkerT = new MarkerOptions().snippet(postc.getTContent()); MarkerT.title(postc.getAuthor().getUsername()); MarkerT.position(new LatLng(postc.getLat(), postc.getLong())); MarkerT.icon(BitmapDescriptorFactory.fromBitmap(bmp)); final Marker markeri = map.addMarker(MarkerT); map.setInfoWindowAdapter(new InfoWindowAdapter(){ @Override public View getInfoContents(final Marker marker) { View v = getLayoutInflater().inflate(R.layout.custommarker, null); final LinearLayout ll = (LinearLayout)v.findViewById(R.id.ll); …

Member Avatar
Member Avatar
+0 forum 1

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 say I want to concatenate these two into a 16 bit variable and they are arranged as above in little endian on a windows machine. **1110101**1110101 , i've just bolded on for clarity. Is that the way I would have to do it? OR, does the first byte always link …

Member Avatar
Member Avatar
+0 forum 6

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

Member Avatar
Member Avatar
+1 forum 4

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, 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 byte order - is the php documentation of the function. But im told java stores as big endian? So any help on how to convert the integer to an unsigned little endian long would be helpful, i assume a simple type cast would convert to a big endian based number …

Member Avatar
Member Avatar
+0 forum 6

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

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 of this message "usa.weather" in bytes. Its so important for me to sort out this today. Please HELP

Member Avatar
Member Avatar
+0 forum 3

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 Scanner(System.in); System.out.println("enter your specefic bytes(maximkum 8 digits to show the ASCII code) : "); bytes=input.nextByte(); c=(char)bytes; System.out.println("the Equivalent ASCII code of your bytes is = "+c); }[/CODE]

Member Avatar
Member Avatar
+0 forum 11

[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 and decode text with a username and a password... When you encode something you have to decode it with the same username and password again, otherwise it will give you a very strange character text. We're going to use this for our website, and I thought it might be nice …

Member Avatar
Member Avatar
+0 forum 1

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 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 reason; /* Reason packet is being sent (one of OFPR_*) */ uint8_t pad; uint8_t data[0]; /* Ethernet frame, halfway through 32-bit word, so the IP header is 32-bit aligned. The amount of data is inferred from the length field in the header. Because of padding, offsetof(struct ofp_packet_in, data) == sizeof(struct …

Member Avatar
Member Avatar
+0 forum 2

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 writes all of its output in 4-byte chunks, and reads them the same way. The problem is that it also writes strings that are much less than 16 characters as four bytes, which it can read with fread("...", 4, 1, input) but I cannot seem to replicate as just strings? …

Member Avatar
Member Avatar
+0 forum 1

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 parent, those 10 bytes get read from the socket. This is what is supposed to happen. My current output just shows the server "waiting". I'm not sure what's causing the hangup between the parent/child but any help or suggestions would be much appreciated. Here's my code below. [CODE] #include <stdlib.h> …

Member Avatar
Member Avatar
+0 forum 8

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. how can I reduce this to total page size less than 100K? Any help will be highly appreciate... Thanks

Member Avatar
Member Avatar
+0 forum 3

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... [CODE] $str = 1.797693134862316e+308; $float = settype($str, "integer"); $bandwidthusage = intval($float) / 1048576; echo $bandwidthusage;[/CODE] The above code returns: 9.53674316406E-7 How do I convert this to MB?! It's driving me nuts. Any help would be really appreciated. Thank you in advance, Josh

Member Avatar
Member Avatar
+0 forum 18

The End.