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

SEARCH KEYWORD -- Problem



  var in JavaScript

Geoff published an article sometime ago--"How one missing var ruined our launch". This article described one case where MelonCard uses Node.js as their backend system, suddenly there was a small registration peak period--50-100 people registered concurrently, then the entire website stopped responding and many other strange problems showed up. When they were investigating the source of the problem, they found one missing var in the following code.app.all(‘/apps/:user_id/status’, fun...

   JavaScript,Scope,variable     2012-05-26 12:35:36

  Get Facebook, Twitter and YouTube back

Facebook, Twitter and YouTube have become part of many people's daily network life. People hang around these sites to network with known and unknown friends, to know about the latest news and to relax with fancy video clips. But what will you feel if all of a sudden you cannot access them? Want to experience this? Go behind the GFW(Great Firewall) of China. Just a joke, but it's real. Huh, you are out of China? Don't worry. Change your DNS server to those located in China. I just experienced it,...

   DNS spoofing, GFW, YouTube, 37.61.54.158     2014-12-20 21:41:34

  Lots of Chinese users experienced Samsung phone crashes

Starting from 23 May morning(Beijing time), lots of Samsung phone users in China suddenly experienced system crashes and couldn't use the phone anymore.   The symptoms the users saw were that the phone started to restart infinitely and the screen turned into dark screen and nothing can be done to get it recovered. Based on the reports, the impacted models include Samsung Galaxy S8, S9, S10 and S20 series,  Other models don't receive many reports yet. After receiving the reports,...

   SAMSUNG,SAMSUNG GALAXY,SYSTEM CRASH,AUTO UPDATE,NEWS     2020-05-23 05:23:55

  CSS Overflow Property Utilization

Sometimes when we do CSS on HTML elements. We may want to hide some text when the text in a specified box overflows. Usually, we can use a CSS property overflow:hidden to hide the text so that the format of the whole element will not be affected. But will it always work? I believe some of us may encounter problems when we want to hide some text in a table td cell with specified width. If we use td { overflow:hidden;}, it is supposed to hide the text if the text in a td cell overflows. But the fa...

   CSS,Overflow,TD,Cell,Hidden     2014-10-21 08:24:48

  Hash Tables in Javascript

IntroductionHash tables are a permutation of associative arrays (i.e. name => value pairs). If you use PHP, then you are very familiar with this type of data structure already since all PHP arrays are associative.The Javascript language implements very loose and somewhat limited support for associative arrays. Any JavaScript array can use other objects as keys, making it a hash, but there exists no formal constructor for initializing them and it is more or less unweildy to work with. A short ...

   JavaScript,Hashtable,Implementation,Array     2011-11-26 02:43:40

  Show drop down list or menu above of a flash in webpage

How to make a drop down menu show above of a  flash in webpage?Normally when we embed a flash or swf file into our webpage, it is not one component of our webpage.So sometimes the flash will always show above of the webpage, it will not interact with our HTML page.To solve this problem,we need to use wmode property of object tag.wmode has three properties: window,opaque and transparent.window : the flash will show in its own rectangular window,which will not interact with    ...

   HTML,Flash,Block,Drop down menu,Solution     2012-03-12 17:13:57

  Shell script common interview questions

Shell script is frequently used when monitoring system status on Linux. It's not an easy task to write shell script but it's a very important skill for developers and system administrators to ease work and automate common tasks. This post will share some common interview questions about shell script. 1. Get random characters(8 characters) Method 1 # echo $RANDOM |md5sum |cut -c 1-8 471b94f2 Method 2 # openssl rand -base64 4 vg3BEg== Method 3 # cat /proc/sys/kernel/random/uuid |cut -c 1-8 ed...

   LINUX,INTERVIEW,SHELL SCRIPT     2018-09-28 10:46:00

  A Javascript When Function

function when(conditionFunc, execFunc, interval){ if (conditionFunc()){ execFunc(); }else{ setTimeout(function(){ when(conditionFunc, execFunc, interval);}, interval); } } You have some code which should only execute when a condition is true. E.g. You have code which relies on a javascript library but can't be sure the library has loaded yet and don't want the code to execute until it has. This is common if you have a bookmarklet which injects more than one <...

   JavaScript,When,Implementation,When function     2012-02-24 05:08:34

  Mark Zuckerberg : Facebook's biggest mistake is relying too much on HTML5

On Disrupt conference organized by TechCrunch, Facebook founder and CEO Mark Zuckerberg said they relied too heavily on HTML5 and ignored the advantages of the Native-App when talking about Facebook mobile product design strategy.Zuckerberg said the focus in HTML5 was his biggest mistake. This is the first time the young CEO admits he is wrong on HTML5 and native applications publicly. Zuckerberg later mentioned after transferring the Facebook client from HTML to Native applications, users coms...

   Facebook,HTML5,Native app     2012-09-11 19:18:39

  Guest Post from a CodeBoy: The Five Stages of Debugging

Being confronted with a serious and difficult-to-diagnose bug can be one of the most traumatic and stressful experiences of a professional programmer's career. Those who have been through such an ordeal rate the stress as on a par with that accompanying serious injury, divorce, or the death of a family member. Researchers who have studied the psychology of computer programming have lately constructed a framework to understand the stages through which the programmer's mind progresses as she...

   Debug,Steps,Stages     2012-05-01 06:39:38