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

learn more… | top users | synonyms

8
votes
2answers
87 views

HTML to Markdown converter

I've made a simple HTML→Markdown converter in Javascript and am looking for any feedback. For now, I've basically used Stack Exchange's /editing-help as a guide as ...
3
votes
3answers
201 views

Unit Converter in Python

I am new to programming and I am trying to make a simple unit converter in python. I want to convert units within the metric system and metric to imperial and vice-versa. I have started with this code ...
3
votes
1answer
35 views

Map strings to (const) ints

I'm imagining go generate would be a good tool for this. I want to convert strings to ints to save space. ...
1
vote
1answer
40 views

Powershell to Convert HTML Table to Array of PSCustomObject

I created the below script to sent a request to a website, then convert the table in the results to an array of PSObjects which I can work with in PowerShell. This uses some nasty hacks (e.g. using a ...
2
votes
1answer
65 views

Currency converter using MVC pattern in C++ & QT

While understanding the MVC pattern, I came across this particular article. I thought to implement it using the C++/QT library. The intent over here is to implement/use MVC concepts in correct way. ...
6
votes
4answers
381 views

Conversion of hexadecimal string to string

Given a C# string which is a set of hexadecimal numbers such as: string HexString = "202048656c6c6f20576f726c64313233212020"; Where those hexadecimal numbers ...
3
votes
2answers
162 views

Converting numbers to English words

This is a simple program to convert a number, from 0 up to 99999999, to English words. Example: If the input is: 1234 The output would be: one thousand ...
10
votes
2answers
322 views

Convert Persian digits to English numbers

I use the following code to convert ۱۲۳۴۵ to ‍12345, effectively transliterating the persian numbers into latin numbers: ...
3
votes
2answers
83 views

Integer to English Conversion

I wrote some code to translate numbers ( for now just positive, up to the 32bit limit ) into English words. Everything works and I'm happy. I searched through the site looking for a comparison code ...
6
votes
4answers
199 views

Converting from decimal to word

I'm still investigating the problem with decimal to word conversion. I understood the basics, but now my goal is to learn how to add in base-26 (the English alphabet) or base-52 (...
0
votes
3answers
56 views

Low-latency implementation of converting non null terminated char* to unsigned int

How would you rewrite this code which I have now: ...
11
votes
2answers
253 views

Returning result and error status for number type conversions

Looking for review of design strategy of using a struct to return the functional result and error status. Your experience of how my design approach may succeeded ...
4
votes
2answers
75 views

Recognizing number representation (and convert to decimal) from the base prefixes

Here is what appears to be a fairly easy problem: Write a program that prompts the user to enter several integers in any combination of octal, ...
3
votes
2answers
211 views

Converting CSV files to Excel workbooks

My converter converts all CSV files in the subfolders of folders 1, 2 & 3 into Excel workbooks. As of now, I am converting using codes for each folders. I previously tried to combine those into ...
3
votes
1answer
97 views

Converting a CSV file to a social network graph for Pajek

The code will ask for a directory and will then read the CSV file and then generate a file in that directory describing a social network for Pajek. Does anyone know a way to load this CSV file to a ...
4
votes
1answer
52 views

Brainf**k to Ruby interpreter — v3

Previous iteration. I think this is about as good as it's gonna get, but just for kicks, let's do one more round of iterations. As before, it's a very simple substitution from Brainfuck to Ruby, ...
8
votes
1answer
121 views

Brainf**k to Ruby converter — v2

Previous iteration. You know, I think this is the fastest I've ever pushed out an update to anything. This is Version 2 of my Brainf**k to Ruby converter, and the generated code looks... Well, like ...
6
votes
2answers
403 views

Brainf**k to Ruby converter, written in Ruby — v1.0

I've seen a lot of Brainf**k interpreters in various languages. I decided that actually interpreting Brainf**k is too hard, so instead of that, I wrote a 'compiler' in Ruby that directly transcribes ...
5
votes
3answers
182 views

K&R 4-12 recursive converter int to string

The exercise is: Adapt the ideas of printd to write a recursive version of itoa; that is, convert an integer into a string by calling a recursive routine. I wonder if I have correctly ...
1
vote
1answer
77 views

Angular filter to format temperature

Below is a basic filter I created with Angular that does temperature conversion. I'd like to get thoughts on how to improve this code from both an Angular perspective and a general JS perspective. ...
7
votes
1answer
82 views

Conversion calculator using polymorphism and Swing

This is my first attempt at a program (outside of school) and I was trying to implement and learn polymorphism on a conversion calculator for volumes and weights. I found myself using long ...
7
votes
4answers
1k views

Kelvin-Fahrenheit-Celsius temperature converter

I am curious if it would ever be in good practice to omit constructor definitions from a class. Here, the intention of the Temperature class is to simply convert between one temperature scale to ...
2
votes
2answers
57 views

Binary Conversion in Java

Before implementing a GUI I tried performing it at CLI first and I also tried to implement it by using calling methods to another class. ...
8
votes
2answers
81 views

Converting to Base 26 in One Based mode

I needed to create a simple method that converts numbers in Base 26 (string) using, as expected, letters from a to z. But that's not all, this Base 26 needs to be ...
3
votes
1answer
62 views

Updating geo coordinates

An error in a live environment was detected when trying to convert string geo coordinates into a double. The current culture (hu-HU) uses comma instead of point ...
0
votes
3answers
93 views

convertToHHMM function

Can someone help me make a more elegant solution to this function? ...
2
votes
2answers
78 views

ConcurrentLinkedQueue to unmodifiable list

I have a ConcurrentLinkedQueue where I put some mails in. Now I have a visual page where I want to see what's in the Queue, but ...
5
votes
2answers
340 views

Length Converter

I have a Swing application that converts lengths. Inches to centimeter, feet to yard, etc. I’m wondering if I could make the super large HashMap a little smaller, or more efficient. Any other ...
0
votes
1answer
134 views

Converting from binary to unary [closed]

I have function that convert binary number to unary number based on a Markov algorithm. In what ways can I improve the code? The algorithm goes as follows: Replace all ...
7
votes
3answers
1k views

Function that convert decimal to binary

I have a function that converts an integer to its binary representation. I am wondering if there is any way I can improve the function. ...
6
votes
2answers
172 views

Convert a 24bit bitmap to grayscale

I wrote this so I can learn CUDA. This is coded to work on my laptop's Nvidia GeForce GT 540M. Main points I need reviewed: CUDA programming conventions Performance, especially kernel speed C ...
1
vote
1answer
283 views

Conversion functions between binary, hexadecimal and ASCII

I've written a small suite to easily convert my data between binary, hexadecimal and ASCII: ...
5
votes
3answers
234 views

atoi implementation in C

I'm looking for feedback on my atoi implementation here in C. Any feedback would great. I made my own atoi for fun and to learn ...
1
vote
1answer
61 views

Beat count-to-time converter (task #2)

About a year ago, I was given a C++ assignment as a preliminary job-interview test. The assignment included 4 different tasks, from which I had to choose one. I actually chose and completed 3 out of ...
2
votes
1answer
58 views

Rhythm notation converter (task #1)

About a year ago, I was given a C++ assignment as a preliminary job-interview test. The assignment included 4 different tasks, from which I had to choose one. I actually chose and completed 3 out of ...
2
votes
1answer
78 views

Converting a string to a corresponding type in JavaScript

I need to convert a string value to its primitive type in JavaScript. Other values that are not of type String should just be returned. Example: String '...
4
votes
2answers
79 views

Time Code with Microsecond Conversion

The function below converts a time code into seconds, while maintaining the decimal value (fractions of seconds). The time code fed to this function will always contain microseconds. This currently ...
7
votes
1answer
65 views

MS Access to PostgreSQL converter

I was hoping to get some feedback on the implementation of this class for programmatically converting an access file into a PostgreSQL schema (works by obtaining schema data from the cursor object). ...
8
votes
2answers
338 views

Reference implementation of HTML-to-JSON converter for PCG

I have opened a puzzle at Programming Puzzles and Code Golf. The question is not perceived well (yet) and one of the reasons is that no reference implementation is provided. To mitigate this ...
6
votes
2answers
155 views

int32 to char[4] conversion functions

I need to pass some int32_t values into and later retrieve them from a local storage API that uses void* and ...
5
votes
1answer
67 views

Binary Digits to ASCII Characters

I wrote this code, as a novice a to Prolog, for a challenge posted on /r/DailyProgrammer. The formal description of this challenge, as presented in the prompt reads: Input description On ...
2
votes
0answers
256 views

PDF-to-JSON converter

I've created some methods to help me convert PDF to text and then text to a JSON object. I've never done this before and I'm using this exercise as a way to improve my knowledge of Ruby. The ...
2
votes
1answer
191 views

Byte-to-binary conversion function

My implementation of a binary-to-bits converting function: ...
4
votes
1answer
111 views

Speed unit converter

I'm basically a newbie in android app developing. So I'm not sure if this is the right way to write these codes. I have made an app called "Zconverter". It has 9 fragments and the code i m showing ...
3
votes
1answer
350 views

Binary to ASCII converter

This is a program I wrote to convert binary to ASCII. I am still learning ARM assembly. How can I improve my program? Is there any bad programming habits in my code? ...
7
votes
3answers
2k views

Convert Integer to Date in Java

Due to some clueless soul, we have several fields in a legacy database that uses a 6-digit integer to represent a date in (YYYYmm) format. The date field is assumed to be the last day of the given ...
3
votes
1answer
54 views

Convertors converting unconverted objects

In my app, I have several convertors, like these two: ...
2
votes
1answer
82 views

Binary convert to string in Ruby

This was a challenge for reddit #202 Easy /u/learnprogramming ...I wish that someone reviews my code and let me know your opinion about my way of thinking beacause I am a total beginner in Ruby: ...
8
votes
2answers
959 views

cm-to-inch calculator

After a few pages reading Learning Python Hard Way, I've decided to try to make a simple cm-to-inch calculator. I am very excited about this achievement, and I want someone to check my code. It works ...
3
votes
1answer
107 views

Converting an array-returning function to a lazy evaluator

Take a look at the following function: ...