hexadecimal

What is the specification of Hexadecimal Date format in SQL server?

SQL Server Management studio generated value of datatype "Date" into following string: CAST(0x38320B00 AS Date). I need to convert it into classical .NET datetime (i have the string in c# app). I know that if it were SQL Server DateTime it would be 2 times longer Hex number and first part would specify number of days from 1.1.1900, an...

Hex representaion of bytes in a String

I read somewhere that string 0123456789ABCDEFFEDCBA987654321089ABCDEF01234567 is 192 bit (24). Its written that it is a "hex representation of bytes" I need help on this concept. PS: This is secret key of TripleDES algorithm. ...

What is the syntax to check for element present using Style in IE

I have the following line that works for Firefox assertTrue(!selenium.isElementPresent("//input[@name=\""+chosen.getField().getName()+"\" and contains(@style, \"color: rgb(255, 0, 0);\")]")); But Fails in IE. When i inspect the field in IE, i see the color style represented in hexadecimal. How would you represent the line above to w...

extratinf RGB components frm HEX digit in java

i have color= #12FFFF . that is color in this format where 12FFFF are hexadecima numbers.Now i want to get the each of indepenent R,G,B componetents in decimal. How do i do it in java? ...

Method to convert from Hex to Integer in C, can't get lowercase!

Hey everyone, just a quick thing, I have the hex to integer working, but I need to get the numbers lowercase. Here's what I have, any ideas to get to get the A thru F case insensitive? int htoi(char f[]) { int z, n; n = 0; for (z = 0; f[z] >= '0' && f[z] <= 'F'; ++z) if (f[z] >= 'A' && f[z] <= 'F') n ...

Convert hex to binary

I have ABC123EFFF, I want to have 01010101010001010101. How? ...

Is there a C# equivalent to Python's unhexlify?

Possible Duplicate: How to convert hex to a byte array? I'm searching for a python compatible method in C# to convert hex to binary. I've reversed a hash in Python by doing this: import sha import base64 import binascii hexvalue = "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" binaryval = binascii.unhexlify(hexvalue) print base64...

Common lisp integer to hex conversion

Is there a similar function to (parse-integer "ff" :radix 16) that will take me back the other way? If I have the int 255 how do I convert it to the string ff? ...

Problem (bug?) loading hexadecimal data into MATLAB

I'm trying to load the following ascii file into MATLAB using load() % some comment 1 0xc661 2 0xd661 3 0xe661 (This is actually a simplified file. The actual file I'm trying to load contains an undefined number of columns and an undefined number of comment lines at the beginning, which is why the load function was attractive) For s...

Convert a string with a hex representation of an IEEE-754 double into JavaScript numeric variable

Suppose I have a hex number "4072508200000000" and I want the floating point number that it represents (293.03173828125000) in IEEE-754 double format to be put into a JavaScript variable. I can think of a way that uses some masking and a call to pow(), but is there a simpler solution? A client-side solution is needed. This may help. I...

Error while fetching Data in form of XML from SQL Server Database

I have a Multi-tier ASP.NET application. In which am reading data from SQL Server 2005. Am fetching XML data directly from database using "FOR XML AUTO,ELEMENTS" suffix in my query. The problem is some SQL records contain data with invalid chars (like hex values) which throws error while reading it using the XMLReader obtained by executi...

Detect Unicode characters in NSString on iPhone

I am working on an SMS application for the iPhone. I need to detect if the user has entered any unicode characters inside the NSString they wish to send. I need to do this is because unicode characters take up more space in the message, and also because I need to convert them into their hexadecimal equivalents. So my question is how d...

How to interpret hexadecimal numbers like 0x0A?

What does 0x0A mean in C++ and how should I interpret or read such hexadecimal values? if (version < 760 || version > 760){ disconnectClient(0x0A, STRING_CLIENT_VERSION); } uint32_t accnumber = msg.GetU32(); std::string password = msg.GetString(); if(!accnumber){ disconnectClient(0x0A, "You must enter your account number."); ...

Hex 0x0001 vs 0x00000001

hi, often in code that uses permissions checking, i see some folks use hex 0x0001 and others use 0x00000001. these both look like an equivalent of a decimal 1, if i'm not mistaking. why use one over the other, just a matter of preference? ...

Within a windows batch file, how do I set an environment variable with the hexadecimal representation of a decimal number?

When using the Windows set /p and set /a commands to accept a hexadecimal value from the command line and convert it to decimal. What I need is to be able to take a decimal value and set and environment variable with its hexadecimal equivalent. Current batch file coding: @echo off set HexV1=%1 set HexV2=%2 set /A DecV1=0x%HexV1% set /A...

base64 encoded data mixed in with "random" hex

I get an input string with some data that's base64 encoded. Unfortunately, it gets random hexadecimal data (all lowercase) mixed it. It's fairly straightforward to sort out by hand because the hexadecimal data all seems to be in segments of 32 bytes. For example, I can format an example string like this: 6dd11d15c419ac219901f14bdd9...

need help writing hexadecimals to an exe file

can somone tell me how to write these hexadecimals to an exe file while still having it exec 4D 5A 50 00 02 00 00 00 04 00 0F 00 FF FF 00 00 B8 00 00 00 00 00 00 00 40 00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 BA 10 00 0E 1F B4 09 CD 21 B8 01 4C CD 21 90 90...

Printing out hex values of a char* array in C gives odd values for binary input.

Here's an odd problem that's been stumping me for a bit. The program is written in C89, and it reads a file into a char* array 16 bytes at a time (using fread and a size of sizeof(char)). The file is fopen'd with the "rb" flags. The array is then passed into a function that basically takes the 16 hex values and sticks it into a string, ...

How can I sum large hexadecimal values in Perl?

I'm iterating over a set of 32-bit hexadecimal strings ("DEADBEEF", "12345678", etc..) and I'm trying to sum them together to form a 32-bit checksum. Assume that the variable $temp is loaded with some hexadecimal string in the example below. my $temp; my $checksum; for (...) { #assume $temp is loaded with a new hex string here ...

What is the HEX code for Transperent color?

Hi. I want to set color as transperent. In RGB 255 0 255 with alpha 5 may work as transperent, But How to get it in HEX ? What is the HEX code for Transperent color Thanks in advance... ...