9,731 questions
Advice
0
votes
3
replies
90
views
How to convert a color string (hex or named color) to Color in Flutter?
I have a string in Flutter that represents a color. The string can be:
A hexadecimal color code like #FFFFFF or #000000
A named color like "white", "black", "red"
I ...
0
votes
1
answer
92
views
Trying to XOR for a string in hex using radare2 in a DOS executable on Linux. Am I doing this right?
I've tried to build a shell script that iterates through all possible XOR obfuscations of a string within a DOS binary executable, parsed using radare2 in hexadecimal, and find it. Am I doing this ...
3
votes
3
answers
298
views
Convert char [] of ascii hex digits to unsigned long long (uint64_t)
I've been spending some time on this, and just can't figure out how to convert a character string of hexadecimal digits into an unsigned long long (uint64_t) without using any library routines but ...
-4
votes
2
answers
108
views
Is there a name for the high and low bits of a hex string?
In the hex byte A1 B2 C3 D4, ABCD would be the most significant bits of each pair, and 1234 would be the least significant. I find that these groups of bits are often operated on together in hardware-...
0
votes
3
answers
120
views
Is there a known solution for converting IEEE Float values to Hexadecimal in Ada without using the IEEE package?
I do not have the ability to update our Ada compiler set so include the IEEE packages. Is there a way to convert a Float into a Hexadecimal integer? For instance, a Float value of 1.5 as input should ...
0
votes
1
answer
121
views
C# String to literal bytes [duplicate]
I would like to extract text from a textbox and use it as a hexadecimal:
When someone types in "80" into the textbox, I want to be converted from string to hex "0x80", not "...
0
votes
2
answers
97
views
How do you convert a UInt64 to an unsigned hex string in Swift?
Swift's String has String.init(_:radix:) initializer, which seems to let you convert Int values to hexadecimal. However, for values with the high bit set, it displays them as negative hex values.
How ...
2
votes
0
answers
66
views
sort() without SORT_STRING flag misinterprets hexadecimal strings containing numbers and an "e" as a number in scientific notation [duplicate]
Running code
<?php
$a= array (
0 => 'bf3db17',
1 => '59bf48f',
2 => '8287265',
3 => 'c8e17d9',
4 => 'c32bd22',
5 => 'e0479db',
6 => '32697a5',
7 ...
0
votes
1
answer
74
views
Why does XML Lint say a hex value's Unicode character codepoint is valid, while W3Schools' validator does not? Which is correct? [closed]
I'm trying to understand what the difference is here between two XML validators/linters:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Data>
<ID>&...
0
votes
0
answers
38
views
CCS hex utility how to get omitted memory values
I am working on a project where I have to dump memory of msp430fr5739. I am using Code Composer Studio v20 and Hex utility to achieve this. My only problem is the ti-txt format file only containts ...
1
vote
2
answers
120
views
getting segmentation fault when attempting to read text file contraining 1 byte of hex value per line in c
was trying to write some c code to read a text file which contains some hex value in the follow format
AA
BB
CC
DD
Containing 1 Byte of hex values per line in the file.
the following is the code I ...
3
votes
2
answers
358
views
Decode a base64 string and encode it as hex using xxd
First, I take a base64 encoded string and decode it:
local base64_str="OQbb8rXnj/DwvglW018uP/1tqldwiJMbjxBhX7ZqwTw="
echo "${base64_str}" | base64 --decode > foo.txt
The size ...
0
votes
0
answers
94
views
Avalonia Textbox limit the hexadecimal character
I try to limit the input and displayed characters of an AvaloniaUi Textbox to just allow hexadezimal characters. So 0-F. So far I was not able to accomplish by using the various events and handle them ...
0
votes
2
answers
63
views
Calculating storage space between two memory addresses
If a byte addressable RAM occupies the hexadecimal addresses AOOO to BFFF, then how many KB of storage space is available?
I understand A000 and BFFF to be 16 bit numbers (2 bytes). So each address ...
2
votes
3
answers
255
views
Print a hex number with leading zeros in Ada
Is there a simple way of printing hexadecimal numbers with leading zeros in Ada? The following will print a number with leading zeros in hex but it is a bit convoluted.
with Interfaces;
with Ada....
0
votes
0
answers
169
views
Converting (I think) hexidecimal data to an image; possibly Delphi file format
NOTE: I deliberately didn't tag this with Python, even though that's what the code I've tried so far has been in, because I'm happy to use any language to solve this, it's really a data conversion ...
0
votes
1
answer
98
views
Colour Gradients for QR Codes in Excel using Python
I am new to Python, so please be patient with me.
I am working on a small project to create QR Codes using MS Excel's built-in Python mode, and apply customisations to them.
For this question, I am ...
1
vote
2
answers
175
views
How can I convert a large decimal string to an equivalent hex string?
I am trying to implement a custom 1024 bit integer datatype in C. I want to implement operations like addition, subtraction and multiplication. Here is the structure I am defining:
typedef enum{...
0
votes
2
answers
171
views
unresolved reference hexformat: Android Kotlin
Android 12
I am trying to secure username and password before sending it over the internet to the server. However, I need to convert my strings into HEX and I keep getting HexFormat: unresolved ...
0
votes
0
answers
16
views
How do I set the background or foreground color in a command terminal to a custom color?
In a command terminal, I know how to set the foreground and background color like so:
color A0
...where A is the hex value for the background color and 0 is the hex value for the foreground color.
But ...
-1
votes
1
answer
55
views
Photoshop API color normalization gives wrong hex code
Photoshop API gives text layer as follows
{
"blendOptions": {
"blendMode": "normal",
"opacity": 100
},
"bounds": {
...
1
vote
1
answer
48
views
pyspark - Issue in converting hex to decimal
I am facing an issue while converting hex to decimal (learned from here) in pyspark.
from pyspark.sql.functions import col, sha2, conv, substring
# User data with ZIPs
user_data = [
("...
0
votes
2
answers
101
views
VB.net Hex to byte array translated to C#
Hey all I am getting the following error when running this code:
byte[] bytes = new[] {
Convert.ToByte("&H" + Conversion.Hex(127)),
Convert.ToByte("&H" + Conversion....
1
vote
1
answer
54
views
How to validate data is Hexadecimal in Presto
How can I use Presto sql and check if value of a column 'cola' is Hexadecimal? My goal is to resolve the issue of 'Not a valid base-16 number' when data is messy.
I've tried below but not working.
...
1
vote
1
answer
112
views
How do I get a hexadecimal string representation of a GdkRGBA struct in C?
I have a program that reads a hexadecimal string representation from a configuration file, turns it into a GdkRGBA struct from Gdk, uses gtk_color_dialog_button_set_rgba () to set it as the default ...
0
votes
0
answers
98
views
Converting a .PNG file from a Buffer in C++ to RGB Hex
I am reading a PNG file from a website:
String zoom = "5"; // Test Values
String xmap = "30"; // Need to be adjusted
String ymap = "30";
String ...
3
votes
2
answers
172
views
Ruby pack and unpack hex value does not return the same value?
I have a hex string of unknown (variable) length and I want to pack or unpack at any time to convert to bytes.
["a"].pack("H*")
# => "\xA0"
I'm getting \xA0 -- is ...
1
vote
0
answers
112
views
Calculating Offset Values in 010 Editor based on variable inputs
I am currently trying to reverse engineer a certain file with a header (that's already done) and a list of entries.
This is the 010 Editor Template so far:
struct FILE {
struct HEADER {
...
0
votes
1
answer
157
views
How to deserialize a business object in IBM BPM from HEX data retrieved from the database?
I am working with IBM BPM (BAW) and trying to deserialize a business object (BO) that has been retrieved from the database in HEX format.
The data is extracted using the following SQL query:
DECLARE @...
1
vote
3
answers
156
views
How to Handle Garbage Data from Scales After USB Reconnection in a .NET Application?
I am developing a .NET application using C#. In my app, I connect to a scale via USB and retrieve weight data. Normally, I can successfully get the correct weight data. However, when I disconnect the ...
0
votes
1
answer
102
views
How do I convert hexidecimal to decimal using C# & BigInt?
I can reproduce this 1 line all the time & I'm thrown off why .Net 8 x64 is converting to a negative decimal. BigIntegers have to be used because of the hex sizes.
Conversion URL fact checking ....
-2
votes
1
answer
59
views
Why does hex give a different output than indexing into bytes in python?
I'm trying to confirm this struct is being formatted correctly for network byte order, but printing out the bytes and printing out the hex of the bytes give me different output, with the hex being the ...
1
vote
1
answer
74
views
How to interpret output of COM port?
I have a device outputting through a COM port. When I read it in a COM interpretter, such as PuTTY, I get a nice-looking output such as
+0.000E-3
However, when I try to read it through C, I get some ...
0
votes
1
answer
70
views
Where are the pitches in a wav file in the hex editor?
I'm trying to find the wav file pitches in the hex editor, but I can't find them!
I tried changing some bytes but they just corrupted the file, then I tried changing more bytes but then it just ...
1
vote
1
answer
75
views
Convert string with unicode characters to hexadecimal with a specific format in c#
I am working with a third party for sending SMS messages. The information is sent to them via HTTPS, in a SOAP envelope.
In case the text contains Unicode characters, the DataCoding needs to be set ...
3
votes
1
answer
203
views
Does x64 assembler use 4-byte or 8-byte memory addresses?
I'm at the end of the chapter in the 2019 book "Beginning x64 Assembly Programming: From Novice to AVX Professional" by Jo Van Hoey...
Here is the excerpt (skip to the bold text for the ...
1
vote
1
answer
158
views
Subtraction producing a negative number in assembly - what is the hex value?
I'm very new to assembly so I don't know if this is a stupid question, but I have a question where I'm being asked to read the following line of assembly and say what value is stored in %rdi ...
2
votes
3
answers
287
views
Why can't -2147483648 represented in hex literal?
Based on C++ documentation the size to hold hex literal grows from int -> unsigned int -> long -> unsigned long -> long long -> unsigned long long.
But I wonder how to specify hex ...
1
vote
1
answer
85
views
My local variable on C debugger shows as hex
Debugger Local Variable
I have a problem on my local variable, it's confusing for me to read it as hexadecimal. I want it to show as decimal, is there any way to fix this problem? Or gdb is the ...
0
votes
0
answers
14
views
MIPS Assembly - Finding the Value of a Sequence [duplicate]
.data
var: .byte 0xF0, 0xE1, 0xD2, 0xC3, 0xB4
.text
la t0, var
lb s0, 2(t0)
li s1, 0x88888800
sb s1, 3(t0)
What is the value of s0 in hexadecimal at the completion ...
0
votes
1
answer
541
views
How to turn MD5 into hexadecimal?
I am doing an advent of code problem and am trying to convert MD5 into hex, and I have no clue where to begin.
I tried looking on different websites, but I couldn't understand them. The stack overflow ...
1
vote
0
answers
47
views
cout is not outputting a hex value for 8 bit types, but 16 bits works fine [duplicate]
Something is amiss in my cout on my raspberry pi. See example code below. I need to print hex bytes, but they only show if they are ascii character values, ie. 0-9a-zA-Z. It appears to be related ...
0
votes
1
answer
77
views
How does bitshifting 0xFF to the end of an Uint32 form a complete hexadecimal code?
I've been following along to Cave of Programming's C++ for Complete Beginners on Udemy, and in lesson 67 he goes over bitshifting to output certain colour pixels in an SDL window. There's a certain ...
0
votes
0
answers
116
views
How to send on/off commands to Dell projector using TCP server to RS232 port
I have a Dell 7700 projector that has both a webpage control, and a serial port RS232. I have tried to no avail to find a specific line of code that would allow me to send an on/off command via http (...
2
votes
1
answer
125
views
Issue with a hand-made PNG file
I have been trying for some time do create a PNG file "from scratch", that is to say to manipulate the data byte per byte in order to create a viable file.
During this quest of mine I have ...
0
votes
2
answers
214
views
Converting a binary file contents to their hex code string in VB.NET
So I am making an image obfuscator which will help save the privacy of my images on a shared computer. The idea is to read the contents of the image, convert the bytes array into their corresponding ...
0
votes
2
answers
677
views
Reading a PNG in c++
I am trying to make a script that takes a PNG file, reads it and converts the data to hexadecimal, and adds it to a new file. I wrote the script and everything works as normal, except the information ...
0
votes
0
answers
244
views
TIFF image file reconstruction from Hex Code
I've been working on a "small" side project for the past year or so on and off where it requires me to extract data from a old piece of software.
It has been really fun the highs are high ...
2
votes
1
answer
480
views
How to make Colors Mixer in vba
The following link provides colors mixer in html.
https://www.w3schools.com/colors/colors_mixer.asp
I am looking for colors mixer code in vba.
Let me summarize what I want.
I will enter #FF0000 which ...
-2
votes
2
answers
1k
views
How to get HEX color value from cell color?
I want to get HEX color value from cell (range) color.
The following links are giving wrong results.
https://stackoverflow.com/a/24216193/13075931
https://stackoverflow.com/a/50479544/13075931
You can ...