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

SEARCH KEYWORD -- Standard



  Why 0.1+0.2 != 0.3

In programming languages such as JavaScript, c/c++, Java and Matlab, you will find that you will get unexpected result when doing float point calculation. For example, when calculating 0.1 + 0.1, you will not get 0.3: > 0.1 + 0.2 == 0.3 false > 0.1 + 0.2 0.30000000000000004 Don't be surprised of this result, this is the end result of IEEE 754 standard, float point number cannot be accurately represented according to IEEE 754 because: No enough memory is allocated for representing the num...

   float point,comparison,JavaScript     2014-11-19 05:32:46

  Output control functions in PHP

The Output Control functions in PHP allow you to control when output is sent from the script. This can be useful in several different situations, especially if you need to send headers to the browser after your script has began outputting data. The Output Control functions do not affect headers sent using header() or setcookie(), only functions such as echo and data between blocks of PHP code. These output control functions include ob_start(0, ob_clean(),ob_get_contents(), etc. To be honest, I a...

   PHP,output buffer,relationship,ob     2012-06-15 10:11:58

  How to secure an Ubuntu Apache web server

Securing server software is not a straightforward task. Not all of our operating environments are the same, leading to a variety of potential security vulnerabilities. However, using a few basic configuration and security options, you can stay a little ahead of where you want to be. 1. Fail2ban Fail2ban is a Python-based intrusion prevention software that detects and blocks malicious IP addresses from multiple unsuccessful attempts at software logins. In other words, if someone is attempt...

   Unix server security,Log,.htaccess,Cache     2011-12-27 09:25:32

  Start to work with rollup.js to pack JS files

rollup.js is a module bundler for JavaScript. It compiles small piece of JavaScript modules spreading in different files into a single larger standardized ES code file. This post will show some entry level usage for this library. Introduction Normally a bundler tool would compile a few small JavaScript files into a single JavaScript so that web browser can read, parse and render it properly. A bundler tool may be needed because of a few reasons: Some early stage browsers don't understand module...

   ROLLUP.JS,COMMONJS,ES MODULE,BUNDLE,WEBPACK     2022-06-12 00:00:14

  Building an iPhone application.

One of my New Years resolutions was to finally learn the iOS SDK and build a 'real' application.I am happy to report that progress is going really well and wanted to share something that I have noticed about iOS programming.It only looks scary... it's not. It's actually very easy.Now, I am not building Mail, Angry Birds or Photosynth or anything, but the core concepts of the SDK are not that bad once you spend some time learning delegation. If you don't understand delegation, iOS programmi...

   Apple,iOS,Application development     2012-01-28 07:03:36

  Web design trends for 2014

Now, it's age of web, many resource and manpower have been invested in web to extend and enhance the capability of web. Every year there are new web designs and technologies emerging. In recent years, with the popularity of handhold devices such as smart phones and smart devices like iPads,Surface, responsive design is becoming a requirement, also we can find flat design in many places. The web design trend is changing dramatically. Many people may wonder what's the web design trend in 2014? Jow...

   web design,trend,2014     2014-06-01 08:27:35

  Configure static IP for Linux

When a Linux server is running, it has to have an IP so that other machines can talk to it. It is often desired that the server would own a static IP so that every time other machines want to connect to it, the same IP address would be used. This is extremely useful when there are virtual machines installed on a host machine where the virtual machine would start and stop now and then.  To configure static IP address for a Linux server, the /etc/network/interfaces needs to be updated. Assumi...

   LINUX,NETWORK,STATIC IP,DNS     2017-07-08 08:39:58

  Some laws of interactive design

The well known quote from Alan Cooper is   Conforming to the standard unless there is a better choice. There are some best practices in interaction design. How many do you know? 1. Fitts' Law The time from one start point to target point is determined by two parameters: The distance to the target and the size of the target. )D and W in above picture), the formula is : T=a+blog2(D/W+1). It was first proposed by Paul Fitts, it is mathematical model used to predict the time from any poin...

   interaction design, laws, Fitts' law     2012-11-16 11:25:24

  Data from iPhone 5 event

Apple finally unveils iPhone 5 on an event at the Moscone Center in San Francisco. At the beginning of the event, Apple showed us some data. There will be 380 Apple Retail Stores opened across 13 countries Last year Apple Retail Store welcomed 83 million customers 7 million Mountain Lion upgrades since last month It ranked the first place in sales for Macbook Air in United States, it has 27% market share in July From April to July, 17 million iPads are sold 84 million iPads are sold until thi...

   Apple,iPhone 5,event,data     2012-09-12 21:26:03

  Google search now highlights search text in target link page

It seems Google is slowly releasing a new feature to highlight search text when user opens a matching search result link through its search engine.  Now for example if you type something in the Google search bar, you will see normal search results. But when you click the link, e.g, the first search result to Stackoverflow, you will see something like below after the link is opened. The searched text is highlighted and the page automatically scrolls to the position where the search text ap...

   GOOGLE SEARCH,FEATURED SNIPPET,TECH NEWS     2020-06-13 06:09:38