Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
1 answer
2k views

Indian Numbering System - converting into the Official and Common-Use Numbering Systems Words/Strings

I have developed the following short JavaScript function to convert numbers to the Indian Numbering System formats; both the Official Numbering System and the Common-Use System (i.e. using the Lakh-...
Mohsen Alyafei's user avatar
5 votes
1 answer
232 views

Simple Pretty-Bytes Size (SI System)

This is a simple and short "Pretty Bytes" javascript function using the SI Decimal System for quantifying bytes. The code does not use complex maths such as ...
Mohsen Alyafei's user avatar
2 votes
2 answers
435 views

JavaScript -- Convert decimal to another base

The Source code is maintained on GitHub and may be cloned via the following commands. A Live demo is hosted online, thanks to GitHub Pages. ...
S0AndS0's user avatar
  • 968
3 votes
0 answers
1k views

Large Number Scales Names Generator

This JavaScript code generates the full name of the numeral scales for large numbers under the "Short Scale Numeral System" using the Conway-Guy system for forming number prefixes. Some very ...
Mohsen Alyafei's user avatar
7 votes
2 answers
16k views

Convert Exponential (e-Notation) Numbers to Decimals

I have the following short function code that converts Exponential (e-Notation) Numbers to Decimals, allowing the output of large number of decimal places. I needed to cover all the e-notation ...
Mohsen Alyafei's user avatar
9 votes
4 answers
1k views

Simple Number to Words using a Single Loop String Triplets in JavaScript

I have extensively reviewed 2 old articles on the subject: https://stackoverflow.com/questions/14766951/convert-digits-into-words-with-javascript and https://stackoverflow.com/questions/5529934/...
Mohsen Alyafei's user avatar
5 votes
1 answer
297 views

Convert numbers from base X to base Y

I recently wrote a piece of code to convert between two bases of X, (Where 26 > X > 0). I was mighty proud that I did this. And then I started wondering, am I using modern coding conventions/practices?...
FreezePhoenix's user avatar
3 votes
2 answers
692 views

Base Conversion in Node.js

I am doing a program for my APCS class in Node.js to practice node, but I am unsure if I did everything the best way possible. The assignment is to take the number and base as user input and then ...
Zach Hilman's user avatar
10 votes
3 answers
23k views

Convert Persian and Arabic digits to English

I use the following utility method to convert Persian and Arabic digits to English using regex: ...
Ali Sherafat's user avatar
3 votes
1 answer
126 views

Is this an efficient implementation of the Roman Numeral Converter?

Is this an efficient way to implement the Roman Numeral Converter ? So first, I put all the digits of the parameter number into an array. Then I loop through this array, and multiply a 10 power ...
user141605's user avatar
0 votes
1 answer
1k views

Binary to decimal converter in JavaScript

This exercise with a test suite is from here. I did not intend to use ES6 features, it's plain old JavaScript. That's why I seek advice more on the good practices, performance side, than modern syntax....
Antonin Cezard's user avatar
2 votes
0 answers
85 views

Subtraction in a spreadsheet column numbering scheme

The idea of the algorithm is to decrease a number from a word. Is there a better way to write this algorithm? limitiation: it is important to decrease with a limit, if BB is the word we decrease ...
Adam's user avatar
  • 21
2 votes
2 answers
634 views

Decimal number to binary number conversion in JavaScript

I made this decimal to binary conversion as an exercise for myself and because it is obviously often asked during job interviews / tests. Any hints concerning possible improvements welcomed. <...
michael.zech's user avatar
  • 4,516
4 votes
2 answers
10k views

JavaScript function to convert decimal number to binary

I was recently asked this in an interview for a front-end position and I came up with something like the code below, which seems to work but is clunky. (...
WinchenzoMagnifico's user avatar
12 votes
4 answers
1k views

Arabic to Greek numeral converter, 1 - 10

One of the things that's straight-forward in JavaScript is Unicode support. If you want to return ϝ (lowercase digamma, not a simple ...
Mast's user avatar
  • 13.5k
4 votes
2 answers
4k views

Excel-like column numbering

I have a working code (below) to convert a number to Excel-like (A...Z AA...AZ BA...BZ ...ZA-ZZ) column codes (headers). For ...
PM 77-1's user avatar
  • 597
14 votes
1 answer
10k views

Implement numbering scheme like A,B,C... AA,AB,... AAA..., similar to converting a number to radix26

I want to implement numbering scheme like Microsoft Word uses for numbering. first one gets = A,next is B, next is C, .... then AA, then AB,....and so on. as shown below ...
sbr's user avatar
  • 243