hex

  • PHP chose a hex color on a scale from a value 2019-01-05

    I'm looking for tips to pick a color from a variable value. I've got a color scale like this: As you can see, I've got 3 main colors. The goal is to convert a variable value to a hexadecimal color, using php. So in this example (lets name the variabl

    Tags: php, colors, hex
  • java string Constant : hex value for a single character - how? 2018-05-25

    I need to replicate a character in a unix file, that looks like this: cat myfile | xxd -ps | sed 's/[[:xdigit:]]\{2\}/\\x&/g' result -> ... \xa4 ... How can I put this character, which looks like hex A4 into a String literal in java? I tried this,

    Tags: string, java, hex
  • Assembler - standard input and conversion 2017-12-29

    I want my program to read characters from standard input and summed it up in kodd. However, when I entered, eg. The value of 23, i saved the following ASCII value of the first character only, ie. 2 without 3 The second problem is how to convert the v

    Tags: assembly, hex, ascii
  • Why does my script seem to randomly truncate strings? 2016-07-30

    The script below basically takes a source table and a target table and copies all the records. It works fairly well, but one recurring issue I'm having is that it seems to truncate some strings. Here is one of the error outputs: Error Number: -214721

    Tags: string, hex, vbscript, adodb
  • java 0xFF byte to keep positive not producing expect result 2015-08-28

    I have a hex binary which I am trying to decrypt with the following code (I used first). private byte[] Crypt(byte[] data, int length, byte[] key) { byte v3, v5, v6; int len = length; if(len > 0) { do { --len; v3 = (byte) (key[0] + 1); key[0] = v3; v

    Tags: algorithm, java, hex, binary
  • node js managing device through serialport

    node js managing device through serialport 2015-03-10

    I need a help...I'm trying to connect the device to the node js and I use serialport npm library. var comport = 'COMx'; var serialPort = require("serialport"); var usb = new SerialPort(comport, { baudrate: 9600, databits: 8 }); usb.on('open',function

    Tags: hex, serial port, device, node.js, node serialport
  • How get int from hex with Objective-C? 2015-03-01

    I have char with hex value '\xa1', it's 161, and how I can get 161 in int value? This doesn't work for me: char a = '\xa1'; int b = a; And I have a uint8_t buffer[4], it reads bytes from NSInputStream, with hex value like this, how I can get array wi

    Tags: int, objective c, encoding, hex, char
  • Escape string for javascript: hex in json 2015-03-01

    This string {\x22Address\x22:\x22some address with quotes \\x22 \x22} is parsed by JSON.parse correctly in browser. Why? What do hex numbers mean in json string? I can't find explanation. --------------Solutions------------- In Javascript a backslash

    Tags: javascript, hex, json
  • Hex *char from int number 2015-02-09

    I asked here how to convert 4 chars to int number here: stackoverflow link It is working but now I need to do the same but in reverse. I want to make 4 chars from one int. Because I dont understand completly bit shifting and using OR and AND operator

    Tags: hex, bit shift
  • Odd behavior in boost::format hex 2015-01-19

    I'm trying to format a binary array: char* memblock to a hex string. When I use the following: fprintf(out, "0x%02x,", memblock[0]); I get the following output: 0x7f, When I try to use boost::format on an ofstream like so: std::ofstream outFile (path

    Tags: hex, boost, format, boost format
  • String wouldn't print itself in C 2015-01-14

    I'm trying to format an ASCII-Art style string with strtok. When I try to run my program through my IDE it is actually printing my string which is in hexadecimal so I don't have to mess with all the backslashes in it. However when I try to run it in

    Tags: string, hex, ascii art
  • How do I convert a `string` of `integers` in `hexadecimal` (and back)? 2014-12-29

    I want to convert a string of integers in hexadecimal (and the opposite). I've seen the IntToHex functions, but it uses a small integer. For example, I need to convert the number: 999888777666555444 in hexadecimal and then the opposite: hexadecimal n

    Tags: delphi, hex
  • Hex character in BEGIN block 2014-12-15

    I can print a hex character in the process block $ awk '{printf "%c", $0}' <<< 0x21 ! However the same character will not print in the BEGIN block $ awk 'BEGIN {printf "%c", 0x21}' 0 How can I print a hex character in the BEGIN block? ------

    Tags: awk, printf, hex, posix
  • How to change a hex color code depending on the time in IOS 2014-12-15

    I would like to have the background of an app change colour depending on the time, for example if it is 12:34:56 the hex color code would be #123456 so the background would change color to #123456. Is this possible. Also is there any way to could use

    Tags: hex, ios
  • Fix for bizarre "%a" format behavior with g++ 4.9.1? 2014-11-27

    Compiler: 64-bit MinGW G++ 4.9.1 from the Nuwen distro, under Windows 8.1. Code: #ifdef INCLUDE_IOSTREAM # include <iostream> #endif #include <stdio.h> // ::snprintf #include <stdlib.h> // EXIT_SUCCESS, EXIT_FAILURE #include <std

    Tags: printf, hex, compiler bug
  • C# textBox Hex only with 0x/h/$ prefix using TextChanged property 2014-11-20

    I am testing the following code in TextChanged property to allow only HEX values in the textBox and it works just fine, it also deletes pasted string which doesn't match the HEX pattern and converts the lower to upper case, this is just what I needed

    Tags: regex, hex, textbox, prefix
  • c# Convert Hex to ASCII 2014-09-19

    I need to convert a hex string ( received from a game server via socket ), to ascii ( or any other format that works I guess ). The problem I'm having is that every time I try to display the converted string, it's null, however, this website: Click!

    Tags: string, hex, ascii
  • Decoding/Encoding this "mystery" string 2014-08-15

    I apologize in advanced for the vague nature of this request, I realize it isn't about a specific coding issue (although coding the conversion is my eventual goal). I have a string value that looks like this "Gr3tsgAAAAAAAAAA" and I know that it can

    Tags: hex, encryption, encode, character encoding
  • byte.Parse (c#) : FormatException on Hexadecimal string 2014-07-28

    I'm actually trying to implement a very simple login mecanism for an app I'm developping in Visual C# .NET 2.0 on an embedded device. After some researches, I've found on the msdn a code sample performing password hashing : How to store passwords Unf

    Tags: string, hex, byte, formatexception
  • convert key value of hexadecimal to decimal 2014-07-14

    I want to convert the key stroke representation to its decimal from. eg :- the input string is ^@^D^@^A49 This should be converted to 0004000149 ie ^@ - 00 ^D -04 ^A -01 I found the correct values from the below link http://techurls.tripod.com/dha.ht

    Tags: hex

Copyright (C) dskims.com, All Rights Reserved.

processed in 3.032 (s). 9 q(s)