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

SEARCH KEYWORD -- Beginning



  Get hostname from a URL using JavaScript

Sometimes we may have strings which contain some UR;s and we may want to retrieve the hostname from the URLs for some statistic use. For example, we may have a URL : http://www.example.com/aboutus.html. We may want to retrieve the www.example.com from the URL. How? Use regular expression. Here I give an example using JavaScript. If you want to check whether a string is a URL or not. Refer to Detect URLs in a Block of Text. In JavaScript, we can have a regular expression like var pattern=/(.+:\/\...

   JavaScript,URL,regular expression, Hostname     2012-06-15 09:16:45

  What Level Programmer Are You?

Everybody's talking about how programming is the skill that we all are going to need. [Except those folks who might feel that most programming could be turned into wizard-like tools. Insert long discussion about Strong AI.] But what's a programmer? Is the guy who set up his own Apache Web Server a programmer? How about the guy who created a complex Excel spreadsheet? The guy who made his own RPG level? Minecraft players? When we say "Everybody is going to have to know programming" what, e...

   Programmer,Skill,Level,Criteria     2012-02-08 10:07:41

  Understand diff in Unix

diff is an important tool program in Unix. It is used to compare differences of two files, it is the foundation for code version control. If you type : $ diff <file_before_change> <file_after_change> diff will tell you what's the difference between these two files. The result may not be so easy to understand, so now I will show you how to understand diff. 1. 3 formats of diff diff has 3 formats due to historic reasons. normal diff context diff unified diff 2. Demo files For easy d...

   diff,Unix,version control,git     2012-09-03 10:49:36

  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

  Some tips for writing proper emails

Email is now becoming one necessity of working. We may receive hundreds of emails everyday, they may from our colleagues, friends or clients. We need to exchange ideas, arrange meetings , asking for help etc though email in our work. A proper email can help us achieve what we want to achieve. Here we share some tips for writing a proper email.At the beginning of an email : Thank the reader is a good way to start the email, thank the reader may make the reader feel happy, especially when you ask ...

   EMAIL,TIP,FORMAT,TEMPLATE     2012-07-02 12:26:32

  Update parent window after closing the window opened by window.open()

Imagine we have a webpage which has a text field to let user enter a date. Usually, we may create a calendar window to ask the user to pick one date from the calendar window, when the date is picked, the calendar window will close and the date picked will be put into the text field. This way involves the window.open() method in JavaScript, and we may think how the opened window knows its parent window and then updates the parent window. I give a simple demo on this.We have two pages, on is the p...

   window.open, JavaScript,update, return value     2012-06-23 01:36:32

  Twitter is the winner of US election

Yesterday, the final result of the U.S. election was that Obama defeated Romney and he was re-election as President of the United States of America, Later he made a victory speech. While in the Internet world, the real winner is not Obama, but Twitter. Why? Because there was no downtime for Twitter yesterday.On election day, There were a total of 31 million election-related Tweets posted, In peak period, there were 327,452 tweets posted per minute,  the peak record was 874,560, about 15,107...

   Twitter, US election,Fail whale     2012-11-08 10:55:38

  jQuery 2.0 will drop support for some IE6/7/8 oddities

jQuery official website releases its road map for the future jQuery development. This road map reveals that jQuery 1.8 will be released within a month and other consecutive versions will follow the following release plan:jQuery 1.9 (early 2013): many of the interfaces already deprecated in version 1.8 will be removed; some of them will be available as plugins or alternative APIs supported by the jQuery project. IE 6/7/8 will be supported as today.jQuery 1.9.x (ongoing in 2013 and beyond): This v...

   jQuery 2.0,jQuery,IE support     2012-06-29 05:20:27

  A Better Way to Learn How to Program

Learning how to program can be a nightmare. An aspiring coder has to jump through many unpleasant hoops and mysterious error messages just to get "Hello, World!" printed on the screen. Then, she's left wondering, "OK, now what? How do I actually build something?"As game developers seeing someone struggle through this, we should be screaming, “NOOOOO!” The whole thing reeks of bad game design: a lot of work with no reward, unclear failure cases, advanced features pushed on new players...

   Programming pattern,Game design,Derivati     2011-09-19 13:51:17

  What are the Four Most Important Technologies Inside an Office, Today?

The office life has changed a lot since the beginning of the 21st century. Nowadays, technologies have taken over a large part of the work that people have to do, inside their walls. Some of them are more important than others, though. Here are four that no company should live without.  A VoIP Phone System If a company wants to communicate with its clients, it needs to install a centralized phone system. The old ones were complicated and costly. The more phone lines you had, the higher the ...

   SMARTPHONE,VOIP,5G     2022-12-24 06:35:02