Skip to content

Author: admin@master

How to apply float property for tabs?

I have designed a html tabs. I applied float property to it. The problem is when I minimize browser tabs are not visible properly. Here the my fiddle: http://jsfiddle.net/raghavendram040/vn1Leuq3/ and JavaScript is copied from Internet so can any one tell how this JavaScript works and applying float property?…

Get hours difference between two dates in Moment Js

I’m able to get the difference between two dates using MomentJs as follows: However, I also want to display the hour when applicable (only when >= 60 minutes have passed). However, when I try to retrieve the duration hours using the following: it is returning the current hour and not the number of ho…

How are Promises implemented in Javascript without threads

Recently, I have been seeing the concept of Promises being implemented in AngularJS and JQuery. I have seen the implementation of a Futures in Java as in code below, however this requires concept of thread pools to be present in language/platform. However, there is no such threading concept in Javascript. How…

Get ISO 8601 using Intl.DateTimeFormat

I want to use Intl.DateTimeFormat to format a Date, and in the examples it says Great, so I want my fallback to be ISO 8601 in the case a language doesn’t exist however This seems to be because iso8601 isn’t part of locales A string with a BCP 47 language tag, or an array of such strings. I’…

Socket.io error hooking into express.js

I’m trying to hook socket.io and express.js together: At the line: var io = require(‘socket.io’).listen(app); I’m getting an error: There doesn’t seem to be anything on SO/google about this error… Answer You can do it without using http module app.listen return a server ins…