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

SEARCH KEYWORD -- EVENTS



  Solution to getKeyCode() returns 0 in Java

The getKeyChar method always returns a valid Unicode character or CHAR_UNDEFINED. Character input is reported by KEY_TYPED events: KEY_PRESSED and KEY_RELEASED events are not necessarily associated with character input. Therefore, the result of the getKeyChar method is guaranteed to be meaningful only for KEY_TYPED events.For key pressed and key released events, the getKeyCode method returns the event's keyCode. For key typed events, the getKeyCode method always returns VK_UNDEFINED....

   Java,KeyCode,0,KeyListener     2011-06-06 10:38:11

  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

  Resolve high CPU usage issue caused by file_get_contents in PHP

Sometimes a Linux server which runs Nginx + PHP-CGI(php-fpm) web service may experience sudden system load increase and the CPU usage is around 100% for many php-cgi processes when checking with top command. If this happens, file_get_contents may be the cause if it's used in the PHP script. In lots of web applications, normally there are lots of API requests based on HTTP. Many PHP developers like to use file_get_contents("http://example.com/") to get the API response because it's simple to...

   PHP,FILE_GET_CONTENTS,PHP-CGI     2018-11-09 21:35:00

  Do things, tell people.

These are the only things you need to do to be successful*. You can get away with just doing one of the two, but that's rare, and usually someone else is doing the other part for you. If you you don't have any marketable skills, learn some. It's the future. We have Khan Academy and Wikipedia and Codecademy and almost the entire world's collective knowledge at your fingertips. Use it. Then make something that you can talk about. Make something cool. Something interesting. Spend time on it. Go ...

   Tihings,Promote,Product,Open source     2012-02-21 05:28:39

  CSS box-shadow Can Slow Down Scrolling

Working on one of the Chromebooks Google lets you borrow on Virgin America flights, I noticed scrolling down the page on my airbnb.com dashboard was much slower than on my normal laptop. I chalked it up to weak Chromebook hardware, but other sites were scrolling just fine. box-shadow had caused slow scrolling on our search results page before, so I did some investigation.I used Chrome's Timeline tab to see the duration of paint events on the page. Before each test I forced a garbage collection a...

   CSS,box-shadow,performance,Timeline,Chromebook     2011-11-13 08:13:48

  Web evolution history

I guess many of us want to know about web evolution history since it changes so fast. Web has changed our life style, there are many big events in web history. Following picture give us a general understanding of the history of web.Original author : 陈皓 Reference : http://coolshell.cn/articles/1178.html...

   Web,History,Figure     2012-04-25 07:40:52

  Advanced event registration models

On this page I explain the two advanced event registration models: W3C’s and Microsoft’s. Since neither is cross–browser supported, their use is, for the moment, deprecated. W3C and Microsoft have both developed their own event registration model to replace Netscape’s traditional model. Though I’m not impressed by the Microsoft model, W3C’s is very good, except for one crucial vagueness. Unfortunately few browsers support it at the moment. W3C W3Câ...

   JavaScript,Event model,this,bubble,capturing     2011-12-27 09:20:44

  HTTP Streaming and Internet Explorer

In early 2006, Alex Russell posted about a neat hack that the Google Talk team in Gmail use to support Comet in Internet Explorer, a trick which works as far back as IE 5.01. What great news! A reliable way to stream Comet messages to Microsoft’s browsers. If only it were that easy. I have not been alone in the following findings: after connecting the htmlfile ActiveX object as a streaming Comet transport to my Comet server, everything works perfectly for a few messages, but then abruptly...

   IE,Streaming,JavaScript,htmlfile,ActiveX     2011-09-05 04:05:23

  Instagram has more than 100 million users

On TechCrunch Disrupt, Facebook CEO Mark Zuckerberg said that Instagram users is over $100 million.According to comScore data, Instagram traffic in July rose 38%, it becomes the 56th site in United States. And Instagram official said that the number of users was 80 million and over four billion photos uploaded to the server in July.Last week, Facebook formally completed the acquisition of Instagram, the final cost is $735 million. Zuckerberg says he wants to help the growth of the application, ...

   Facebook,Instagram,Users     2012-09-11 19:50:57

  Touching and Gesturing on iPhone, Android, and More

One of the most important parts of creating an effective and intuitive user interface on touch-enabled smartphones has nothing to do with visual appearance—instead, it has to do with creating an interface that properly responds to user input based on touch. For Web applications, this means replacing mouse events with touch events. In Dojo 1.7, new touch APIs help make this process easy. This is an updated version of the post Touching and Gesturing on the iPhone, published in 2008. I...

   Touch,Gesture,iPhone,Android     2012-04-12 11:21:42