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

SEARCH KEYWORD -- keyword



  How to find which process a file is being written by in Linux?

Some people ask a file is being written by one process and they want to check this process, but they cannot find the process even with sof. This question is very common and there are many solutions, here we introduce a straightforward method. In Linux, each file will be stored on one device and of course there will be a relative inode, then we can use vfs.write to know who is writing the inode on one specified device continuously. Luckily there is inodewatch.stp in the installation package of s...

   Linux,process,file write     2013-03-16 21:44:35

  Java’s toLowerCase() has got a surprise for you!

Have you ever encountered a surprise while using toLowerCase()? This is a widely used method when it comes to strings and case conversion. There is a nice little thing you should be aware of. toLowerCase() respects internationalization (i18n). It performs the case conversion with respect to your Locale. When you call toLowerCase(), internally toLowerCase(Locale.getDefault()) is getting called. It is locale sensitive and you should not write a logic around it interpreting loca...

   Java,toLowerCaser(),Locale specific,Stra     2011-09-29 11:21:07

  How expensive is a MySQL query?

Database access speed is always the bottle neck of many applications. Many application have large amount of data to search, retrieve and display nowadays. How do we improve the performance of our applications, how do we reduce the cost of database access? Apart from the design of database, the quality of the query is also one important factor to take care.  But before that, we need to know how much network traffic a query will consume. Yunyang,Zhang from Nubee in Singapore did some research...

   MySQL,Network traffic,Query     2013-04-09 05:13:33

  Introducing JavaScript native file management

TL;DR The Mozilla Platform keeps improving: JavaScript native file management is an undergoing work to provide a high-performance JavaScript-friendly API to manipulate the file system. The Mozilla Platform, JavaScript and Files The Mozilla Platform is the application development framework behind Firefox, Thunderbird, Instantbird, Camino, Songbird and a number of other applications. While the performance-critical components of the Mozilla Platform are developed in C/C++, an increasing number o...

   JavaScript,File,Local file,Firfox,Mozilla     2011-12-06 09:05:48

  Php Class to Retrieve Alexa Rank

Alexa is a service acquired by Amazon which offers a web traffic report for websites. They retrieve the data from toolbar that can be installed in different browsers, centralize the data and display reports to anyone. The most important indicator is the Alexa Rank. It represents the rank of a webpage in a list of all the websites. It’s not the 100% accurate but it gives a good indication.Alexa does not offer any free API to obtain Alexa Rank. However there is a simple method to obtain it ...

   PHP,Alexa,Alexa rank,API,Retrieve Alexa rank     2011-10-25 11:28:55

  Will nil == nil be true in GoLang

There is some interview question may ask whether nil == nil be true in GoLang. Wil it be true. false or compilation error? To know the answer, some knowledge about nil in GoLang needs to be explained first. nil definition According to Go's official documentation, the definition of nil is // nil is a predeclared identifier representing the zero value for a // pointer, channel, func, interface, map, or slice type. var nil Type // Type must be a pointer, channel, func, interface, map, or slice type...

   GOLANG,NIL,NIL EXPLANATION     2021-08-08 02:54:15

  The Ultimate GetElementsByClassName, Anno 2008

Two and a half years ago, I released the first version of getElementsByClassName. With how web browsers has evolved since, I thought I’d release a real ultimate version, dated 2008. Native Web Browser SupportSafari 3.1 has native getElmentsByClassName support, and upcoming Firefox 3 and Opera 9.5 will have it too. It only leaves out, you’ve guessed it, Internet Explorer.The Necessity Of This ScriptLiving in a world where Microsoft is halting every possible way t...

   JavaScript,geElementsByClassName,Cross browser compatible,Implementation     2011-11-26 02:46:20

  5 Reasons Your Javascript Stinks

Javascript gets a bad rap on the Internet, but there are few languages that are so dynamic, so widespread, and so deeply rooted in our lives as Javascript is. The low barrier of entry leads some people to call it a script kiddie language, others scoff at the concept of a dynamic language while riding their statically typed high horse. You and Javascript just got off on the wrong foot, and now you've made it angry. Here's five reasons why your Javascript code sucks.1. You're not using a namespace...

   JavaScript,Good,Habit,Prototype,OOP     2011-04-13 12:25:37

  Understand this in JavaScript

In JavaScript, this is always pointing to the owner of a function or a method. Function Let's check out function first. function introduce() {      alert("Hello, I am Laruence\r\n"); } For this function, what does this point to? In JavaScript, a global function's owner is the current page, i.e, the window object. Because its a method of the window object if we define a global function. Now you should know the this will point to the window object in the above function. ...

   JavaScript,this,event,call     2013-04-03 04:10:03

  Facebook appoints former Google engineer to improve its search function

Facebook has set up a new team to improve its search products, the team leader is Lars Rasmussen who was a former Google engineer..The team consists of more than 20 engineers which is led by Rasmussen. The main efforts are to achieve easier sorting for contents which are created by users on Facebook . This will help Facebook be a more powerful search engine, which not only allows the user to stay longer on Facebook, but also helps Facebook make more profits by selling keyword ads like ...

   Facebook,Search engine,Google,Like     2012-03-30 11:33:28