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

SEARCH KEYWORD -- Post



  PHP function overloading puzzle clearer

PHP's meaning of overloading is different than Java's. In PHP, overloading means that you are able to add object members at runtime, by implementing some of the __magic methods, like __get, __set, __call, __callStatic. You load objects with new members. Overloading in PHP provides means to dynamically "create" properties and methods. These dynamic entities are processed via magic methods one can establish in a class for various action types. Some example:class Foo{    p...

   PHP,function overloading,OOP,default val     2011-07-11 03:24:30

  Binary tree iterator algorithm

Binary tree pre-order,in-order and post-order traversal are basics in algorithm and data structure.And the recursive binary tree traversal is a classical application of recursion. We define a binary tree node as : // C++ struct Node { int value; Node *left; Node *right; } In order binary tree traversal can be: // C++ void inorder_traverse(Node *node) { if (NULL != node->left) { inorder_traverse(node->left); } do_something(node); if (NULL != node->righ...

   Binary tree,Iterator,Traversal     2013-07-14 21:51:09

  Facebook steps into the $100 billion club

According to 36 Kr, investors and analysts seemed to be inspired by the Q2 earnings report released on 24th July by Facebook, Facebook share price increased by more than 50% post that. As the U.S. stock market closed, Facebook share price rose $0.79 yesterday, closing at $41.34. As of now, Facebook's market capitalization has reached 100.676 billion U.S. dollars.The reason why Facebook share price kept dropping since its IPO is because investors doubted,the ability of Facebook on selling advert...

   Facebook,Share price     2013-08-27 03:48:12

  HP To Apple: You Win.

As I write this, I’m sitting in a cafe. Around me, there are five people on laptops — four of them are MacBooks. Four other people are using tablets — all four are iPads. Welcome to the Post-PC world. That phrase was one of the first things that jumped to my mind today when I heard the news that HP was not only killing off their TouchPad and Pre webOS-based products, but also trying to spin-off their PC business. The largest PC busine...

   HP,Apple,Palm,Competition,webOs     2011-08-19 07:38:41

  OpenLDAP Proxy -- Installation and configuration

After understanding what the configuration would be for an OpenLDAP proxy, it's time to explain the installation of OpenLDAP proxy and how to make it run. In this post, we will cover how to install OpenLDAP proxy both locally and using docker. Local installation The installation is quite easy, there are a few packages to be installed including the ldap server, ldap client and some utilities. Below steps are for CentOS, the instructions for other platforms should be similar with minor differ...

   INSTALLATION,CENTOS,DOCKER,OPENLDAP,OPENLDAP PROXY     2017-11-03 20:26:41

  Web Technologies Need an Owner

Many people seem to assume that the Web will one day become the one and only client computing platform on Earth, therefore it must not be controlled by anyone. This is a dangerous assumption. The HTML, CSS, and JavaScript triumvirate are just another platform, like Windows and Android and iOS, except that unlike those platforms, they do not have an owner to take responsibility for them.The Web has no one who can ensure that the platform acquires cutting edge capabilities in a timely manner (came...

   Web domain,Owner,Lead,Change,Innovation,     2011-09-28 09:12:12

  Most Pressed Keys and Programming Syntaxes

I switch between programming languages quite a bit; I often wondered what happens when having to deal with the different syntaxes, does the syntax allow you to be more expressive or faster at coding in one language or another. I dont really know about that; but what I do know what keys are pressed when writing with different programming languages. This might be something interesting for people who are deciding to select a programming language might look into, here is a post on the...

   Keyboard,Programming language,Hottest ke     2011-09-23 13:10:10

  Using JSON in PHP

Currently JSON has become one of the most popular data exchange formats. Many website APIs support it. Since PHP 5.2, PHP provides json_encode() and json_decode() method to handle JSON encoding and decoding.1. json_encode()This function is used to transform array and objects to JSON format. First let's look one array example.        $arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);   echo json_encode($arr);the result is{"a":1,"b"...

   JSON,PHP,json_decode(0,json_encode()     2012-05-06 06:04:42

  Lisp: It's Not About Macros, It's About Read

Note: the examples here only work with outlet lisp. Refer to your version of lisp/scheme’s documentation for how read works (and possibly other forms) I know it’s an old post by now, but something about the article Why I love Common Lisp and hate Java, part II rubbed me the wrong way. The examples just aren’t that good. The usage of macros is plain baffling, when a function would have been fine. The author admits this, but still does it. There’s a follow-up post wh...

   Lisp,Macro,Read,Java     2012-02-19 06:12:19

  Handle ”cannot modify header information – headers already sent by”

Man PHP developers should encounter ”Warning: Cannot modify header information – headers already sent by ….” error before when executing a PHP script. Here are some solutions to this error. 1. Blank line Check whether there is any blank line after , especially in the files which are used in include() and require(0, some problems are caused by blank lines. 2. Add exit() after head() header (“Location: xxx”); exit(); 3. Use output cache <?php ob_start(); ...

   header sent, PHP error handle     2012-11-17 08:45:22