15
votes
3answers
1k views

Converting an IP

I've written a DNS tool in Node and would like to know if there's a better and more efficient way of handling the conversion from an IP to a long. I'm not too good at bitwise just yet and would like ...
6
votes
1answer
150 views

Converting any PHP function toString() like in JS

In JavaScript, any function is basically an object on which you can call (function(){}).toString() to get it's underlying code as a string. I'm working on a ...
5
votes
6answers
85 views

Readability of JavaScript shorthand for converting strings to numbers with default value

This is perfectly readable code to me, but I'm afraid it may be too confusing to others. What do you think? Note that I'm not interested in validation of the input here (validation will happen long ...
6
votes
1answer
158 views

BBCode to HTML converter using functional programming

I was inspired to write a BBCode to HTML converter as I'm currently learning functional programming. I wanted achieve functional cohesion. jsFiddle I'd like feedback on: structuring of the code. ...
1
vote
1answer
210 views

Milliseconds to Time string & Time string to Milliseconds

Fast Time conversion I'm trying to write a very fast time-to-string and string-to-time function. I noticed that on low CPU mobile devices this function has, even if minimal, impact on the ...
4
votes
1answer
136 views
5
votes
1answer
114 views

YouTube-to-Spotify converter

I have been doing some JS lately and I would like to get some constructive criticism. The project I am working on Live demo ...
2
votes
1answer
162 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 ...
2
votes
1answer
2k views

Javascript conversion of datetime strings in PHP pages to user's timezone

I am working on an PHP/MySQL application that uses a different timezone from the server it runs on, and neither of the timezones are UTC. I'm converting displayed times to be in the user's timezone, ...