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

SEARCH KEYWORD -- keyword



  JavaScript's Two Zeros

JavaScript has two zeros: -0 and +0. This post explains why that is and where it matters in practice. The signed zero Numbers always need to be encoded to be stored digitally. Why do some encodings have two zeros? As an example, let’s look at encoding integers as 4-digit binary numbers, via the sign-and-magnitude method. There, one uses one bit for the sign (0 if positive, 1 if negative) and the remaining bits for the magnitude (absolute value). Therefore, -2 and +2 are encoded as f...

   JavaScript,zeros     2012-03-24 05:21:49

  Reproduce "MySQL server has gone away" in PHP

If you want to debug the issue of "MySQL server has gone away", you can reproduce it with below steps: Modify configuration file: sudo vi /etc/mysql/my.cnf  Make below changes: [mysqld]   wait_timeout = 30   interactive_timeout = 30  Restart the service: sudo /etc/init.d/mysql restart  Write below PHP codes: $link = mysql_connect('127.0.0.1', 'root', 'root');   if (!$link)&nbs...

   MySQL,debug,rMySQL server has gone away     2013-04-15 11:33:14

  On Erlang's Syntax

I first planned to release this text as an appendix entry for Learn You Some Erlang, but considering this feels more like editorial content and not exactly something for a reference text, I decided it would fit better as a blog post. Many newcomers to Erlang manage to understand the syntax and program around it without ever getting used to it. I've read and heard many complaints regarding the syntax and the 'ant turd tokens' (a subjectively funny way to refer to ,, ; and .), how annoying...

   Erlang,Syntax,Error     2011-12-22 08:35:42

  Automatically post to Facebook from PHP script

Facebook is currently on of the most important publishing and traffic generating sources for many websites. Manually Cross publishing content on your own site and Facebook seems like a lot of extra work. This post guides you through the creation of a Facebook application that can automatically post messages and other types of content on your Facebook wall. Getting started Building a php script that automatically posts status updates on your wall requires the following steps: Download Faceboo...

   PHP,Facebook,API,Auto post,OAuth     2012-02-27 09:03:00

  10 reasons why Dart is cooler than JavaScript

Dart is a new programming language from Google and after coding JavaScript for over one year now, I immediately felt in love with it. Coming from the Java world I had a good bunch of things I had to learn before I could use JavaScript. Some people say, you need to dig deep into JavaScript, otherwise you are not allowed to speak about the pros and cons of a language. I am not a JavaScript Ninja. But I strongly believe a programming language should be easy to learn, easy to understand and s...

   Dart,JavaScript,Comparison     2012-01-05 08:23:21

  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

  Qihoo 360 confirms the cooperation with Google

Affected by the news that Qihoo 360 would cooperate with Google, Qihoo 360 and Baidu are treated differently in capital market at the beginning of 2013. Analysts have high expectations on Qihoo 360 and increase its performance expectations for fiscal year 2013, while Baidu suffered price target downgrades.According to Sina technology news, Qihoo 360 confirmed this news to ZDNet, but they refused to disclose more details. According to Qihoo 360, there is some kind of cooperation existed between ...

   Qihoo 360, Google, Search, Baidu     2013-01-04 12:06:17

  Some short code snippets which use all JavaScript keywords

In JavaScript, keywords are reserved and cannot be used as variable or function names. For example void, function and this are JavaScript keywords, they are keywords which are reserved for special use. Here is list of the keywords in JavaScript. We also show you some short code snippets which use all the keywords in JavaScript.void function() {//abcd   do break;while(typeof delete this);  for(var a;;)  if (true)  with(null)  try{}catch(a){}finally{} else throw new 1;&nbs...

   Code snippet,JavaScript,keyword     2012-07-16 12:12:05

  Display GIF animation while submitting the web form

Internet appears everywhere in our life. Form as a data gathering component is the must have component in a web app. When the page is submitting data to the server, if it takes a relative long time for the backend server to process the data, then the client users will feel lost while waiting for this if he cannot get any indication about what's happening. They may even reclick the button which will cause the data resubmission. This affects the user experience and also the system performance and ...

   HTML,Spin,Submit,Form     2013-05-17 11:47:07

  Twitter OAuth the easy way – simple post to twitter script

After Twitter introduced mandatory authentication with OAuth, many of the current scripts for posting content to Twitter don’t work anymore. OAuth can be great for more advanced authentication, but for a simple post to twitter script, it seems like a little overkill. In this post you’ll learn how to create a simple script that uses a quick and dirty version of OAuth for posting new tweets to Twitter. How to create a simple script Simplified, Twitter OAuth involves sending both ap...

   Twitter,OAuth,PHP,Auto tweet     2012-02-25 12:51:07