Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

hex

What’s the difference between hex code (\x) and unicode (\u) chars?

December 27, 2023 by Tarik
Categories r Tags hex, r, unicode Leave a comment

How to Convert Qcolor value to hex value?

December 24, 2023 by Tarik

You need to print selectedColor().name() to print the actual color value in hex. See the QColor Documentation

Categories qt Tags hex, pyqt, qt Leave a comment

How do you convert a hexadecimal of type string to number in JS?

December 23, 2023 by Tarik

You can use the Number function, which parses a string into a number according to a certain format. console.log(Number(“0xdc”)); JavaScript uses some notation to recognize numbers format like – 0x = Hexadecimal 0b = Binary 0o = Octal

Categories javascript Tags byte, hex, javascript Leave a comment

how to format hex numbers using stringstream

December 22, 2023 by Tarik

setw is going to set the width of the entire formatted output, including the displayed base, which is why you’re not seeing the leading 0. Also, there’s no way to make the base be displayed in lowercase if you use std::showbase along with std::uppercase. The solution is to insert the base manually, and then apply … Read more

Categories c++ Tags c++, c++11, hex, string-formatting, stringstream Leave a comment

Convert between Decimal, Binary and Hexadecimal in Swift

December 20, 2023 by Tarik

Both String and Int have initializers which take a radix (base). Combining those, you can achieve all of the conversions: // Decimal to binary let d1 = 21 let b1 = String(d1, radix: 2) print(b1) // “10101” // Binary to decimal let b2 = “10110” let d2 = Int(b2, radix: 2)! print(d2) // 22 // … Read more

Categories swift Tags binary, hex, swift Leave a comment

Decode Base64 to Hexadecimal string with javascript

December 18, 2023 by Tarik

Why not try the following code?: const buffer = Buffer.from(rawData, ‘base64’); const bufString = buffer.toString(‘hex’);

Categories javascript Tags base64, hex, javascript Leave a comment

What is the difference between the meaning of 0x and \x in Python hex strings?

December 14, 2023 by Tarik

0x is used for literal numbers. “\x” is used inside strings to represent a character >>> 0x41 65 >>> “\x41” ‘A’ >>> “\x01” # a non printable character ‘\x01’

Categories python Tags hex, python Leave a comment

Convert hexadecimal string (hex) to a binary string

December 11, 2023 by Tarik

BigInteger.toString(radix) will do what you want. Just pass in a radix of 2. static String hexToBin(String s) { return new BigInteger(s, 16).toString(2); }

Categories java Tags binary, hex, java Leave a comment

How to randomly receive a Material Design Color?

December 11, 2023 by Tarik
Categories java Tags android, android-color, colors, hex, java Leave a comment

Convert hex to decimal in R

December 9, 2023 by Tarik
Categories r Tags decimal, hex, r Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 … Page18 Next →

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa