Skip to main content

Questions tagged [converting]

Converting involves changing data from one data type or format to another.

6 votes
1 answer
342 views

This is a library I've been writing, for now named ALFPN, for converting between native floats and layouts that are not native - half, various 8-bit formats etc. ...
herhor67's user avatar
4 votes
1 answer
194 views

Because I think maintainability can be done better with strings instead of plain enumerator-values when doing fstream IO, I wanted a replacement struct in my project that behaves like an ...
ScratchingTheSurface's user avatar
2 votes
0 answers
177 views

I am working on a PHP application that transforms data from the input CSV (JSON, TXT, or XML) into an output CSV (JSON or database, for example). The output format differs from the input: some columns ...
friday-json's user avatar
8 votes
1 answer
814 views

This is library for fast converting "HEX strings" to unsigned numbers and vice versa. The result is not defined, if input is incorrect, e.g. string "ZZZ1" will be converted to ...
Nick's user avatar
  • 1,656
3 votes
1 answer
98 views

Can anybody help me with examples of code? How is the approach to optimize code relative to my example with using "switch case" to "arrays"? Without changing its functionality, but ...
Vladistone's user avatar
0 votes
1 answer
318 views

I'm looking for feedback on a WordPress plugin I developed for automatically converting images to WebP and AVIF formats. The goal is to optimize image loading performance. The plugin has the following ...
KermitTheFrog's user avatar
1 vote
1 answer
144 views

I have written a function for casting between built in numeric types. I built it to check if the source value is within the range of the destination value, and to provide a nicely legible error if not....
Diederick C. Niehorster's user avatar
1 vote
1 answer
342 views

This is my second C++ program. Again, I wrote it all by myself. I only started learning C++ yesterday. The concept of the program is simple; it should read input from ...
Ξένη Γήινος's user avatar
4 votes
2 answers
539 views

The code makes following assumptions: std::string_view is not null-terminated there are no exponents, all floating point inputs are in the way 123.123 limiting ...
Nick's user avatar
  • 1,656
1 vote
0 answers
112 views

I have written a Python script that turns a gigantic text file into a SQLite3 database. The text file is truly gigantic, it is 133MiB or 140,371,572 bytes in size, and contains 140,371,572 characters ...
Ξένη Γήινος's user avatar
5 votes
1 answer
736 views

This is a Python script I wrote to identify the country code of a given IP address, using data obtained from tor. It uses geoip.txt to identify country code for IPv4 addresses, and geoip6.txt to do so ...
Ξένη Γήινος's user avatar
5 votes
1 answer
2k views

I'm a noob. I wrote this code to convert bools to ints and ints to bools as a past-time but I would like to know whether to continue programming - this is the kind of thing I've been doing, no useful ...
user avatar
4 votes
1 answer
255 views

It's one of the tasks suggested in the Rust Programming Language book by Steve Klabnik and Carol Nichols, and to a complete Rust newbie like me, figuring out converting scale from ...
szychy's user avatar
  • 141
6 votes
1 answer
251 views

I've written a bytes to number converter for cpp similar to the python int.from_bytes. It does not make any assumptions on: The endianness of the input buffer The ...
Sam Coutteau's user avatar
2 votes
2 answers
2k views

I've got something really simple this time where I'm mapping pandas' Series to dataclasses with a oneliner helper function (as ...
t3chb0t's user avatar
  • 44.7k

15 30 50 per page
1
2 3 4 5
26