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

SEARCH KEYWORD -- Collapse



  JavaScript cross domain request solution

1. What is cross domain? We may often using AJAX to request data from other domain, now we will have cross domain request issues. It's because JavaScript only allows to request data from the same domain because of security consideration. In short, same domain strategy means a piece of code can read data from the same source, the same source here means the combination of the same domain, protocol and port number. For example: URLDescriptionAllow communication? http://www.a.com/a.js http:/...

   AJAX,cross domain,security     2013-03-13 20:04:52

  There are no free lunches on the internet

Hot data: An IT technician checks the network servers at a data farm. Alamy Photograph: Juice Images/AlamyPhysics has Newton's first law ("Every body persists in its state of being at rest or of moving uniformly straight forward, except insofar as it is compelled to change its state by force impressed"). The equivalent forinternet services is simpler, though just as general in its applicability: it says that there is no such thing as a free lunch.The strange thing is that most use...

   Free lunch,Facebook,Google,Privacy information     2011-11-21 03:03:31

  Address of a Java Object

In conventional java programming, you will never need address or location of a java object from memory. When you discuss about this in forums, the first question raised is why do you need to know the address of a java object? Its a valid question. But always, we reserve the right to experiment. Nothing is wrong in exploring uncharted areas.I thought of experimenting using a little known class from sun package. Unsafe is a class that belongs to sun.misc package. For some of you the package might ...

   Java,Object,Address,Memory,Start address     2011-09-29 11:17:46

  CSS Tools: Reset CSS

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. The general reasoning behind this was discussed in a May 2007 post, if you're interested. Reset styles quite often appear in CSS frameworks, and the original "meyerweb reset" found its way into Blueprint, among others. The reset styles given here are intentionally very generic. There isn't any default color or background set for the bod...

   CSS,Cross browser compatibility,Reset,Partial reset     2011-12-05 02:44:11

  Significance and use of do{...}while(0)

In some Linux kernel and other open source codes, we can see some codes like below: do{ ... }while(0) This code snippet is not a loop, it seems there is no significance of using do...while this way, then why should we use it? In fact, the significance of do{...}while(0) is better than optimizing your code. After some research, we summarize some benefits of it. 1. Help define complex macro to avoid error #define DOSOMETHING()\ foo1();\ foo2(); The me...

   do{...}while(0), optimization     2012-10-21 21:13:22

  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

  Hello, Kernel!

When we learn module programming, the first small program must be hello, kernel!. For a novice, how do we avoid some mistakes and how to fix the bugs we have when writing the first module program? Is there any example we can refer to? Here is one example. 1. Write the hello.c 01 #include <linux/init.h> 02 #include <linux/module.h> 03 #include <linux/kernel.h> 04 //Compulsory 05 //Module lincese declaration 06 MODULE_LICENSE("GPL"); ...

   module,kernel,Linux     2013-05-03 03:33:52

  Writing Java codes conforming to coding standard

Recently, I was doing some cleanup to one of my current Java project. I find there are many codes which are not conforming to the Java coding standard. So I list them here and hope that people can improve your codes and write maintainable codes. Format source code and manage imports in Eclipse Eclipse provides functions of auto-formatting and imports management, you can use following shortcuts to use these functions. Ctrl+Shift+F --> Format source code Ctrl+Shift+O -- Manage imports an...

   Java, Code standard,Style     2012-09-18 12:50:28

  Here Are The 10 Highest-Paying Jobs At Google

South African job listing site JobVine compiled the following chart of the top ten salaries at Google, compiled from Glassdoor.The top pay is for contract positions leading software development. It's not uncommon to see contractors earn more salary than full-time employees at big tech companies, because they're often not able to get stock options and perks.For jobs within the company, it looks like directors of product management are the highest paid, which is fitting with Google's new...

   Google,Salary,Statistics,Job,Salary level     2011-10-14 11:24:42

  Install Open webOS on Linux

HP has just released its first beta version of the webOS, It is said the user experience of webOS is quite impressive, so I immediately had it installed on my PC. There are two versions of Beta release,one embedded version and one Ubuntu version. I briefly share my installation experience of webOS in Linux. In the official document, it says "By 'Linux' we mean 'Ubuntu Linux'", it doesn't support server version and 64 bit version of Ubuntu. Here I use Mint 13. 1. Clone source code from github Add...

   Linux,webOS,Ubuntu,embedded,HP     2012-09-10 19:36:30