Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- BIND



  Let browser prompt for storing password when doing AJAX login

In Web 2.0 era, more and more web applications are using AJAX to replace the traditional HTML form element to perform user login. This usually provides a better user experience than form submission. But it also brings a side effect to the end users. That is the browser will not prompt the user whether s/he wants to save the password so that s/he no needs to enter the username/password again when visiting the same site next time. Below is the code snippet which does the AJAX login.  <scri...

   AJAX,Browser,Login,Password     2015-06-04 10:02:46

  Fix 'this authentication plugin is not supported' issue while using Go to connect MySQL 8

MySQL 8 has changed its default authentication plugin from mysql_native_password to caching_sha2_password to improve its security. However many third party libraries seem act slowly to catch up with this change. This causes some compatible issues with their connection to MySQL. One of the issues is seen in Go libraries while it's trying to connect to MySQL 8. The specific error has been observed is "this authentication plugin is not supported". The root cause of this issue is that the go-sq...

   MYSQL,GO,MYSQL 8,AUTHENTICATION PLUGIN     2018-07-11 08:55:02

  The Basics of jQuery

So, a while back I had an internal presentation at work about this topic. A few good friends in the community took a look at my slides, and they thought it would make a nice blog post because “there can’t be too many good posts about jQuery introduction and best-practices.” Whether this post is going to be good or not, is up to you but I’ll try to outline what jQuery is, and how you can start working with it. For most of you, this will just be a re-cap and probably...

   JavaScript,jQuery,Framework,Basic     2012-03-01 04:57:18

  Some cases where MySQL cannot be started

After installing MySQL, when we try to start MySQL, sometimes we may not be able to start it. The reasons can be different. We share some general cases where MySQL cannot be started. Case 1: Directory or file permission issue If the permission is set wrongly in MySQL's $datadir and its sub directories or files, MySQL will not be able to read and write files normally. Error message: mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data /usr/local/mysql/bin/mysqld_safe: lin...

   MySQL,Error,Log     2013-08-15 03:32:36

  4 asynchronous programming methods in JavaScript

You may know the execution environment of JavaScript is single threaded. The so called single thread means only one task can be running at any time, if there are many tasks, they need to be in a queue and wait for the previous task to be completed. The advantage of this mode is it's easy to implement and the execution environment is relative simple; the disadvantage is that if one task takes long time, the tasks following it must wait in the queue and this will delay other tasks consequently. Th...

   JAVASCRIPT,ASYNCHRONOUS PROGRAMMING, EVENT MODEL,PROMISE     2012-12-25 00:55:47

  How to be jQuery-free?

jQuery is now the most famous JavaScript library. There are around 57.3% websites in the world using jQuery, i.e, 6 out of 10 websites are using jQuery. If we only consider those websites which use libraries, then the percentage is even higher which is 91.7%. Although jQuery is very popular, its size is still a headache to many websites maintainers. The uncompressed jQuery 2.0 has a size of 235KB, the size is 81KB after optimization.The jQuery 1.8.3 which supports IE 6/7/8 has a uncompressed si...

   jQuery,JavaScript,ECMAScript,CSS3     2013-05-13 11:53:20

  Installing LAMP On Ubuntu

In this guide I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux. Install ApacheTo start off we will install Apache.1. Open up the Terminal (Applications > Accessories > Terminal).2. Copy/Paste the following line of code into Terminal and then press enter:sudo apt-get install apache23. The Terminal will then ask you for you're password, type it an...

   LAMP,Ubuntu,Linux,Apache,MySQL,,PHP     2011-04-28 05:20:02

  9 useful jQuery code snippets

jQuery is one of the most popular JS library among front end developers because of its functionality and usability. Here we share with you some useful jQuery code snippets which can be used in our daily front end development. 1. Smoothly return to page top $(document).ready(function() { $("a.topLink").click(function() { $("html, body").animate({ scrollTop: $($(this).attr("href")).offset().top + "px" }, { duration: 500, easing: "swing" ...

   jQuery,Code snippet     2013-07-13 00:11:10

  JavaScript finite state machine

Finite state machine is a very useful design model, it can be used to simulate many events in the world. In short, finite state machine has three features: Number of states is finite At any moment, one object can only be in one state In some condition, it will transfer from one state to another state In JavaScript, finite state machine can be applied in many places. For example, one menu element on a webpage. When the mouse hovers on the menu, the menu will show up, while the mouse moves away...

   JavaScript,Finite state machine,State     2013-09-02 11:00:57

  HTML5 Web Worker

Web Worker is a JavaScript multithreading solution provided by HTML5. we can put some compute intensive codes into Web Worker and it will not hang the user interface. 1. How to use Web Worker Web Worker's basic mechanism is to use Worker to load a JavaScript file to create a new thread in JavaScript's main thread. It will not block other thread's execution and will provide a data exchange interface between main thread and new thread : postMessage() and onmessage. Let's look at an example: //work...

   JavaScript,HTML,Web Worker     2012-12-02 06:25:00