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

SEARCH KEYWORD -- property



  Can API be copyrighted? At least Oracle hopes so

  The result of the lawsuit case war between Oracle and Google is clearer now. The court said that 9 lines of code of Android has violated intellectual property right, these 9 lines of code can be ignored relative to the number of codes for the whole Android system. But just like LinuxToy points out that the reasons why this case catches so much attention are : 1). The amount of money Oracle asked from Google is $1 billion; 2). The statement says Java language itself doesn't violate the int...

   Oracle,Google,API,Copyright,Lawsuit case     2012-05-11 00:47:58

  jQuery to check whether checkbox is checked

In Vanilla JavaScript, the correct way of checking whether a checkbox is checked is to get the property checked of the checkbox. Assuming there is an checkbox with id "checkbox1", below line will return true if the checkbox is checked while it will return false if the checkbox is unchecked: document.getElementById("checkbox1").checked In jQuery, there are a few ways to check this. The first one is to using the corresponding counterpart of the Vanilla JavaScript, it is to check the checked proper...

   jQuery,checked,checkbox,attr,prop     2015-07-25 08:49:54

  Build Hadoop environment in Linux

Hadoop standalone installation: 1. Install JDK Install JDK with below command: sudo apt-get install sun-java6-jdk Configure Java environment, open /etc/profile, add below contents: export JAVA_HOME = (Java installation directory) export CLASSPATH =".:$JAVA_HOME/lib:$CLASSPATH" export PATH = "$JAVA_HOME/:PATH" Verify installation of Java Type java --version, if it outputs Java version information, then Java is successfully installed. 2. Install SSH Install SSH with below command: sudo ...

   Hadoop.Linux,Configuration     2013-07-31 23:22:27

  CSS position explained

CSS has two very important properties on determining the position of an element in webpage: display and position. display is used to determine how elements are grouped and displayed on the page. While position is used to determine the exact position of an element on a page. And this post would explain position property in detail. position is used to determine the exact position of an element on a page. It has five possible values. static relative absolute fixed sticky sticky is supported start...

   CSS,STICKY,CSS3     2019-11-22 19:57:52

  A small trick on using console.log to print data in JavaScript

When debugging JavaScript application, one may frequently use console.log to print data so that it is easy to debug when issue occurs and also helps on understand the data flow. The common way of printing a variable would be something like.  let user = { name: "test" }; console.log(user); In this case it will print: { name: 'test' } This is OK when there is no much logging or the program is not complicated. But it becomes difficult to debug if there are lots of variables to be printed ...

   JAVASCRIPT,CONSOLE.LOG,DEBUGGING     2019-09-03 10:24:24

  Investing in myself: Realizing my value as a programmer

Being a programmer, you have an invaluable skill that you need to learn to harness. Investors realize this already which is why they’ll spend stacks of cash to have you build them something that’ll someday be profitable. Large corporations realize the value in good developers and sometimes bend over backwards trying to retain their top talent. To be able to program well is a skill that people clearly value but why do programmers tend to place such little value on their own ta...

   Career,Inverstment,Self,Software,Developer     2012-01-11 04:36:16

  Understand JavaScript prototype

For an front end programming language like JavaScript, if we want to understand its OOP feature, we need to understand its objects, prototype chain, execution context, closure and this keyword in deep. If you have a good understanding on these concepts, you should be confident that you can handle this language well. The inheritance in JavaScript is not class inheritance like Java, but it adopts another mechanism-- prototype inheritance. The key to prototype inheritance is the prototype chain mec...

   JavaScript, prototype, __proto__     2013-02-02 02:34:09

  Hash Tables in Javascript

IntroductionHash tables are a permutation of associative arrays (i.e. name => value pairs). If you use PHP, then you are very familiar with this type of data structure already since all PHP arrays are associative.The Javascript language implements very loose and somewhat limited support for associative arrays. Any JavaScript array can use other objects as keys, making it a hash, but there exists no formal constructor for initializing them and it is more or less unweildy to work with. A short ...

   JavaScript,Hashtable,Implementation,Array     2011-11-26 02:43:40

  JavaScript-style object literals in PHP

The object literal notation in JavaScript looks like: var fido = {name: "Fido", barks: true}; or var fido = {}; fido.name = "Fido"; fido.barks = true; From assoc arrays to objects In PHP you would call that an associative array. $fido = array( 'name' => "Fido", 'barks' => true ); And you can easily make it an object too: $fido = (object)$fido; echo gettype($fido); // "object" Or if you want to start with a blank object and add stuff to it: $fido = (object)array(); or $fido...

   PHP,JavaScript,Object,Function call,Self vs this     2011-11-30 11:11:45

  Let's talk about JSON.stringify()

JSON has been used in lots of places to exchange data among different services/systems. Nowadays all mainstream programming languages have built-in library support of JSON data parse and stringify. In this post, let's talk about JSON.stringify() in JavaScript. Let's first take a small example of Object conversion handling. There is a requirement to convert below object const todayILearn = { _id: 1, content: '今天学习 JSON.stringify(),我很开心!', ...

   JAVASCIPT,JSON,JSON.STRINGIFY     2020-02-22 04:25:08