Archive | JS

RSS feed for this section

GMaps: how to open all infoWindow when loaded map

Simple you can do it with some simple line code: Example:

Read full story Comments { 0 }

Javascript: how to unshift an object?

How to unshift an object in Javascript? Here my method: Example: Result:

Read full story Comments { 0 }

Javascript: how to reverse an object?

How to reverse an object in Javascript ? Here my method: Example: Result:

Read full story Comments { 0 }

Date setTimezoneOffset method

As you all know, all date methods work only in the context of local time (user) or UTC, but sometimes you want to work in other contexts (time zones), the standard js forgot about the antagonist for getTimezoneOffset, and this is my method: Result:

Read full story Comments { 0 }

How to create websocket secure by using NodeJS

Method 1: In this article: How to run a https website with Nodejs, express and socket.io Method 2: use NGINX file .conf Now, you can use websocket to create websocket secure: Read more: Example chat application using Nodejs + Socket.io Example chat application using Nodejs + ws Example chat application using Nodejs + Websocket

Read full story Comments { 0 }

How to run a https website with Nodejs, express and socket.io

Step 1: generate RSA key Use command line: (on Windows we can use Cygwin) Result: Step 2: create file csr.pem Result: Step 3: create SSL certificate file Result: Note: this is in practice, in production you must buy one certificate or use free SSL Step 4: continue with Nodejs app here an example app: app.js […]

Read full story Comments { 1 }

jQuery printMe2 plugin

In some case, we cant use plugin printMe to print because of popup blocker, so how to use it, i create a new version call: printMe2 Homepage : printMe http://www.daniarlandis.es/printMe/ https://github.com/menusal/printMe And here the new code We use type=iframe, so can print in the case below. Example usage:

Read full story Comments { 0 }

Flash detect by Javascript

How to detect flash by Javascript

Read full story Comments { 0 }

RC5 block cipher implement in PHP and Javascript – part 2

Read part 1: RC5 block cipher implement in PHP and Javascript Application of this block cipher method for stream cipher: There are many methods, but we can provide the method below: Split your string into many block with 64 bits (8 characters), then use this block cipher method. We can use the method Null-padding for […]

Read full story Comments { 1 }

PHP, JS: How to detect Safari browser

PHP Example: Result: Javascript

Read full story Comments { 0 }