For an obfuscation program I am writing in Java, I need to find a way to get a value at a specific address. For example, in a program I opened in a hex editor, at the address 0000001F is the hex value "00". Furthermore, is it possible to write to a specific memory address? For example writing to 0000001F and changing it from "00" to for ...
The compiler seems to be ok with this (single digit hex values only):
byte[] rawbytes={0xa,0x2,0xf};
But not this:
byte[] rawbytes={0xa,0x2,0xff};
I get a "Possible Loss of Precision found : int required : byte" error?
What am I doing wrong - or are single digit hex numbers a special case ?
Java 1.5.x.
...
i need to load the third column of this text file as a hex string
http://www.netmite.com/android/mydroid/1.6/external/skia/emoji/gmojiraw.txt
>>> open('gmojiraw.txt').read().split('\n')[0].split('\t')[2]
'\\xF3\\xBE\\x80\\x80'
how do i open the file so that i can get the third column as hex string:
'\xF3\xBE\x80\x80'
i also tried ...
Python: Unpack from hex to double
This is the value
value = ['\x7f', '\x15', '\xb7', '\xdb', '5', '\x03', '\xc0', '@']
I tried
unpack('d', value)
but he needs a string for unpacking. It is a list now. But when I change it to a string, the length will change from 8 to 58. But a double needs a value of the length 8.
...
So I have kind of a ignorant (maybe?) question. I'm working with writing to a serial device for the first time. I have a frame [12, 0, 0, 0, 0, 0, 0, 0, 7, 0, X, Y] that I need to send. X and Y are checksum values. My understanding in using the pyserial module is that I need to convert this frame into a string representation. Ok that's f...
I am having a problem converting a value to int.
I ran this query to count number of tags in xml file
var items = (from category in xml.Descendants("category")
where category.Attribute("id").Value != "0"
select category).Count();
it is returning me this 0x00000002 when i am expecting...
How do I create a custom colour scale ideally in Hex? say from yellow to red, depending on the height of an object? is this a correct way to achieve this or is there a better way without having to convert it at the end?:
var r:int = 255;
var b:int = 0;
var maxHeight:int = 52;
var minHeight:int = 21;
var scale:int = 255 / (maxHeight-min...
I have this value:
double headingAngle = 135.34375;
I would like to convert it to HEX and print the HEX to the console. I have already converted a string and int into their respective HEX values, but a double seems to be much more tricky. Can someone point me in the right direction?
...
I'd like to convert ASCII code (like - or _ or . etc) in hexadecimal representation in Unix shell (without bc command), eg : - => %2d
any ideas ?
...
I have a string like this:
"00c4"
And I need to convert it to a hex value like this:
0x00c4
How would I do it?
...
Need to convert RGB or HEX colors to "Long Int" for another program that uses this format. Not sure the specifics of the "Long Int" color format though.
It is possible to generate the "Long Int" values manually using this color-picker http://hide-inoki.com/en/soft/chunter/index.html but a php function would be preferred.
hexdec genera...
I have a byte array represented by hex values, these are time durations. The data could be converted to integer values and multiplied by a constant to get the timings. The decoding of the data will be saved to a file as a series of hex strings. What would be an efficient way of manipulating hex values?
I was looking at performance iss...
Hi, I want to insert a label into a PowerPoint presentation. But I don't want any background on there, or, have the background color be the same as the what is underneath.
I've found that 082F68 is the hex code I want. The RGB code is: 8, 47, 104
This color is supposed to be bluish, but when I insert it, it just gets brown.
I really d...
What I understand that hexadecimal numbers can be placed into string using \x. For example 0x41 0x42 can be placed in string as "\x41\x42".
char * ptr = "\x41\x42" ;
printf( "%s\n" , ptr ) // AB
\x is discarded and 41 is considered as a hex by the compiler.
But if I pass it to my program through command line arguments, it does not wo...
I would like to know how to parse a hex string, representing a number, in objective c. I am willing to use both an objective, or a C based method, either is fine.
example:
#01FFFFAB
should parse into the integer:
33554347
Any help would be appreciated!
...
Hi, can you please tell me
How to use printf to find out the hex and octal values of 255?
Thanks a lot.
...
Hi folks,
I'm looking for words that can be created from hex alphabet [0-9a-f]+
like C0FFEE, DEFACED
We also can use lisoz, where 1=l,i; 5=s; 2=z; 0=o etc.
It can be used in memory addressing or IPv6 address, so it will be funny and much easier to remember.
There is nice list here: http://www.nsftools.com/tips/HexWords.htm
but I'm sure...
How can i convert my Hex value to Dec value using pipe after sed.
Conversion from 'litte endian' to 'big endian'
dec_value=`echo dede0a01 | sed 's,\(..\)\(..\)\(..\)\(..\),\4\3\2\1,g'`
...
I am working a C firmware program for an embedded device. I want to send an array of hex char values over the serial port. Is there a simple way to convert a value to ASCII hex?
For example if the array contains 0xFF, I want to send out the ASCII string "FF", or for a hex value of 0x3B I want to send out "3B".
How is this typically do...
I'm trying to store an hexadecimal value (\xC1) in MySql Database. When I print that with PHP, i get: xC1lcool instead of the right word.
INSERT INTO veiculos VALUES (1, 'Ford', 'Ka RoCam Flex', 25850.00, 1998, 1999, 'Vermelho', 15000, '\xC1lcool;Gasolina;GNV', 'Ar-Condicionado;4 portas;Câmbio automático', 'imagem1.jpg;imagem2.jpg;im...