Search Results

Search found 796 results on 32 pages for 'hex'.

Page 8/32 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Python: combine two neighbor list components

    - by kame
    When i use this code I get elements wich containing one number or letter. How to combine two neighbors? data = '4D41544C414220352E30204D41542D66696C652C20506C6174666F726D3A20504357494E2C2043726561746564206F6E3A20576564204D61792030352031363A31393A3337203230313020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200001494D0F00000026000000789CE36360607000623620E680D220C00AE53343312310BA00692620E604F351010025BE00C8' data2 = list(data) print data2

    Read the article

  • ActionScript 3.0 Color Output Error?

    - by TheDarkIn1978
    I'm employing color in a current AS3 project, and have come across what appears to be an error in the Flash Player (version 10). it might also be an error with Apple's DigitalColor Meter (version 3.7.2), which is what i'm using to sample the displayed colors on Mac OS X Snow Leopard (version 10.6.3). //Primary, secondary, and tertiary colors of the RGB color wheel var red:Number = 0xFF0000; var orange:Number = 0xFF7D00; var yellow:Number = 0xFFFF00; var chartreuse:Number = 0x7DFF00; var green:Number = 0x00FF00; var spring:Number = 0x00FF7D; var cyan:Number = 0x00FFFF; var azure:Number = 0x007DFF; //reads 0x0077FF var blue:Number = 0x0000FF; var violet:Number = 0x7D00FF; var magenta:Number = 0xFF00FF; //reads 0xFF00F8 var rose:Number = 0xFF007D; //reads 0xFF0077 all of these colors display normally except for 3: Azure, Magenta and Rose. they are coded with the appropriate number, but when i use the color meter to sample the displayed colors, those 3 return inaccurate results. anyone have any insight about this issue? what is causing the error, the Flash runtime or the color sampler? if it's the Flash player, could this problem be much deeper? *sampling this image will return inaccurate results due to .jpg compression. it's simply for illustration

    Read the article

  • String as \x03\x00\x00\x00 to integer

    - by marta
    Helo: I have a question, that I solved in c, but now I want to do it in hava: I have a String like: '\x03\x00\x00\x00' This is representing an hexadecimal value of a integer. I transform to 0x03\0x00... And now I want to obtain the integer, but I don't know how to do it in java could someone give me some idea ? Thanks in advance (Is it some way to use this format ('\x03\x00\x00\x00' ) directly without use byte[] arrays? and in C can I use this format directly to build a integer (int)?)

    Read the article

  • What is this C function supposed to do based on description?

    - by user1261445
    unsigned int hex_c0c0c0c0(): Allowed operators: + - = & | ~ << ! >> Allowed constants: 1 2 4 8 16 Return 0xc0c0c0c0 The above is the description I have been given and I have to write the code for it. Can someone tell me what exactly the function is supposed to do? All the description says is what I have pasted above, so I'm not sure what my goal is. I'm sure it is an easy enough function to program on my own, but it would help if someone could tell me what the function is supposed to do, and maybe provide sample input/output so that I know my code is working correctly once I program this. Thanks.

    Read the article

  • char '0x8' what character is this?

    - by OHHAI
    I have a large amount of data in a database. When I attempt to read a certain portion of the data and generate some xml and send it to a webservice I get the following exception... The char '0x8' in 'java.lang.IllegalArgumentException'. I'm guessing it is some bad data, as it has worked perfectly for about 7 months but now some user uploaded some new data that seems to have some issues. Anyone know what character this is so I can just run a sql query and clean it from the db? Thanks in advance.

    Read the article

  • Programmatic gradient stops with Javascript

    - by TomcatExodus
    Working with Javascript (jQuery), given 2 color values (2033ff and 3300a0 for example) how can I determine certain gradient stops between them? Reason being is, I intend on using an array of color values: 0 => '000000' 8400 => 'f0ff00' 44000 => '2033ff' 68400 => '3300a0' There being 86400 seconds in a day, 12:00AM maps to 0, and 11:59PM maps to 86399. As time passes, the background color of a specified element changes to the appropriate color in gradient list via window.setInterval(function(e){ ... }, 1000). For example 2:32:11PM = 52331, which from the example would be somewhere between 2033ff and 3300a0. I don't need to populate the array with the values (unless that would be easier) but instead use the index and value as references.

    Read the article

  • How to divide hex grid evenly among n players?

    - by manabreak
    I'm making a simple hex-based game, and I want the map to be divided evenly among the players. The map is created randomly, and I want the players to have about equal amount of cells, with relatively small areas. For example, if there's four players and 80 cells in the map, each of the players would have about 20 cells (it doesn't have to be spot-on accurate). Also, each player should have no more than four adjacent cells. That is to say, when the map is generated, the biggest "chunks" cannot be more than four cells each. I know this is not always possible for two or three players (as this resembles the "coloring the map" problem), and I'm OK with doing other solutions for those (like creating maps that solve the problem instead). But, for four to eight players, how could I approach this problem? As always, any and all help is appreciated. :)

    Read the article

  • please help turn a simple Python2 code to PHP

    - by user296516
    Hi guys, Sorry to bother again, but I really need help transforming this Python2 code into PHP. net, cid, lac = 25002, 9164, 4000 import urllib a = '000E00000000000000000000000000001B0000000000000000000000030000' b = hex(cid)[2:].zfill(8) + hex(lac)[2:].zfill(8) c = hex(divmod(net,100)[1])[2:].zfill(8) + hex(divmod(net,100)[0])[2:].zfill(8) string = (a + b + c + 'FFFFFFFF00000000').decode('hex') data = urllib.urlopen('http://www.google.com/glm/mmap',string) r = data.read().encode('hex') print float(int(r[14:22],16))/1000000, float(int(r[22:30],16))/1000000 Would be great if someone could help, thanks in advance!

    Read the article

  • What feature is at play when Ctrl+Shift+Alt+U,E "types" an unprintable hex 000E?

    - by Peter.O
    I tend to use Ctrl+Shift+Alt for my customized system-wide keybindings. When I tried Ctrl+Shift+Alt+U it printed an underscored u and waited for more keyboard input!... Some keys were accepted and some were not... eg. Numbers were accepted and they too were underlined, but only a few keys allowed me to break out. I then tried Ctrl+Shift+Alt+U immediately followed by Ctrl+Shift+Alt+E. This produced an unprintable hex 000E(?) and broke out of the loop... The unprintable character got me thinking that this may be Unicode related. If so, how so? What is happening here? Is this underscored u a trigger for an Input Method Editor? This behaviour occurs: Here (as I type), "gedit", text-edit fields... (but not in the Terminal)... and "gvim" reported "pattern not found"...

    Read the article

  • Function that converts hex color values to an approximate color name?

    - by dclowd9901
    I don't suppose anyone knows of a function (PHP, preferably) that can take a hex color code and give an approximate color name for that hex value. I don't need a solution with 100s of colors. Even if it just amounted to the colors white, black, red, green blue, brown orange and yellow, I'd be pretty well in shape. If you don't know of an existing resource, does anyone know of a good way to approach this problem? Thanks in advance for the help.

    Read the article

  • C read X bytes from a file, padding if needed

    - by Hunter McMillen
    I am trying to read in an input file 64 bits at a time, then do some calculations on those 64 bits, the problem is I need to convert the ascii text to hexadecimal characters. I have searched around but none of the answers posted seem to work for my situation. Here is what I have: int main(int argc, int * argv) { char buffer[9]; FILE *f; unsigned long long test; if(f = fopen("input2.txt", "r")) { while( fread(buffer, 8, 1, f) != 0) //while not EOF read 8 bytes at a time { buffer[8] = '\0'; test = strtoull(buffer, NULL, 16); //interpret as hex printf("%llu\n", test); printf("%s\n", buffer); } fclose(f); } } For an input like this: "testing string to hex conversion" I get results like this: 0 testing 0 string t 0 o hex co 0 nversion Where I would expect: 74 65 73 74 69 6e 67 20 <- "testing" in hex testing 73 74 72 69 6e 67 20 74 <- "string t" in hex string t 6f 20 68 65 78 20 63 6f <- "o hex co" in hex o hex co 6e 76 65 72 73 69 6f 6e <- "nversion" in hex nversion Can anyone see where I misstepped?

    Read the article

  • jQuery jPicker colorpicker: How to convert from 8 digit (w Transparency) to standard 6 digit hex?

    - by Scott B
    I've got a jPicker installed and running fine; its a pretty sweet script. However, the value it returns to my input box is 8 digit hex. I need it to return 6 digit hex. Rather than post-process the 8 digit into 6, I'd rather just hack into the script and force 6 digit. Alternately, I'd be ok with hooking into the change event of the jPicker to intercept the value its sending to the input element and doing the conversion there just before it updates the input with the hex. Here's my code: $(function() { $('#myThemeColor').jPicker(); /* Bind jPicker to myThemeColor input */ $("#carousel").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible: 6, speed: 700 }); And here's the code I'm working with to intercept the myThemeColor input's change event, but its not firing at all. $('#myThemeColor').change(function() { alert(this.val()); /* does not fire on any action */) if($(this).val().length == 8) { $(this).val(function(i, v) { return v.substring(0, 6); }); } });

    Read the article

  • Convert a string representation of a hex dump to a byte array using Java?

    - by ravigad
    I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array. I couldn't have phrased it better than the person that posted the same question here: http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_21062554.html But to keep it original, I'll phrase it my own way: suppose I have a string "00A0BF" that I would like interpreted as the byte[] {0x00,0xA0,0xBf} what should I do? I am a Java novice and ended up using BigInteger and watching out for leading hex zeros. But I think it is ugly and I am sure I am missing something simple...

    Read the article

  • benchmark tcp: ab or iperf like tool to send hex/binary/pcap data?

    - by olan
    Hello all, I have written a server in Twisted for a current project I'm working on, and now I need to test it. It receives TCP packets, with the payload consisting of just a serialised binary string. I want to be able to test the server for concurrency/throughput using the binary data as the payload, but can not find any tool that will allow me to do this. I tried iperf -F but it didn't work, as I think it was sending the binary/hex data as chars. I've also looked at ab which seems to be perfect - if only for http. As well as these, I've had a look at tcpreplay, but it doesn't perform any testing (or establish TCP connections) so it's not much use. Any help would be greatly appreciated as I'm rather stuck on this one!

    Read the article

  • Tool to convert a file of HEX to ASCII character set?

    - by Aaron
    Question: Is there a known tool to convert a file consisting of 2 byte Hex into ascii? Note: - Maintain file offset listing in bytes Example: File contents: 00000000 0054 0065 0073 0074 0020 0054 0065 0073 00000008 0074 0020 0054 0065 0073 0074 0020 0054 00000016 0065 0073 0074 0020 0054 0065 0073 0074 00000024 0020 0054 0065 0073 0074 0020 0054 0065 00000032 0073 0074 0020 0054 0065 0073 0074 0020 00000040 0054 0065 0073 0074 000a 0054 0065 0073 00000048 0074 0020 0054 0065 0073 0074 0020 0054 00000056 0065 0073 0074 0020 0054 0065 0073 0074 00000064 0020 0054 0065 0073 0074 0020 0054 0065 Expected output 00000016 0065 0073 0074 0020 0054 0065 0073 0074 |est Test Test Te| 00000032 0073 0074 0020 0054 0065 0073 0074 0020 |st Test Test.Tes| 00000048 0074 0020 0054 0065 0073 0074 0020 0054 |t Test Test Test| 00000064 0020 0054 0065 0073 0074 0020 0054 0065 | Test Test Test |

    Read the article

  • how i can display a NSDATA description not in hex but in human redeable text ?

    - by halba
    I'm writing an iphone apps that receive data from an udp socket i can dispay what i receive using NSDATA description but is in hex format and for example it look like this: <4c61742c 34343039 3131302e 35302c4c 6f6e2c39 38343237 352e3934 2c482c32 37392e30 302c4b6e 6f74732c 302e3032 2c4e616d 652c504c 41594552 2c496e64 65782c30 2c4d756c 7469706c 61796572 4e756d62 65722c30 00 i know that thi is a prase of compite sens how i can convert it ?

    Read the article

  • How to convert binary, OCT, HEX to calculate in Java?

    - by user316751
    Write an application that inputs one number consisting of FIVE digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in the number 12345, the program should print 1 2 3 4 5 The following screen dump of result is for your reference. Input a digit: 12345 Digits in 12345 = 1 2 3 4 5 How to convert binary, OCT, HEX to calculate the question?

    Read the article

  • Is it safe to change the 'Security.salt' line to a more lengthy string {64 hex key}

    - by Gaurav Sharma
    Hi everyone, I have changed the Configure::write('Security.salt', '############'); value in the file config/core.php file to a '256-bit hex key'. Is it safe or a good practice to change these lines for every different installation of cakephp application or shall I revert back to the original ? I also changed the Configure::write('Security.cipherSeed','7927237598237592759727'); to a different one of more length. Please throw some light on this. Thanks

    Read the article

  • How to replace HEX character in an xml document?

    - by Nalum
    I'm trying to import an xml file into vb.net XmlDocument but am getting the error: '.', hexadecimal value 0x00, is an invalid character. Line 94, position 1. I'm wondering if there is a way to replace the hex character 0x00 The following are lines 92,93,94 the file ends on line 94 92 | </request> 93 |</rpc> <!-- XML Finishes here --> 94 | Thanks for any help.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >