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

SEARCH KEYWORD -- number



  Sorry, I don't want to download your fucking app

You should not claim yourself as a mobile Internet service provider if your product doesn't have an App nowadays. The topic cannot get away from App when we talk on bus, restaurant. Recently it becomes a little bit quiet, but the app wind does not seem to stop, it seems every website may have an App. According to data released by Apple a couple of days ago, its application store app downloads already exceeded 50 billion. However some people are not happy with this.Some people created a blog ...

   App,Update,Force download     2013-05-19 02:50:02

  One reason why mcrypt responds slowly

This morning one colleague came over and talked about one script which used mcrypt responded very slowly, the server configurations are fine. But the reason for the slowness is unknown. Here is one script which reproduces the issue: <?php $dmcryptText = "dummy"; $key = "foobar"; $size = mcrypt_get_iv_size(MCRYPT_BLOWFISH,MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($size); //Take care $m = mcrypt_ecb(MCRYPT_BLOWFISH, $key, $dmcryptText, MCRYPT_DECRYPT, $iv); var_dump($m); When 20 requests of&...

   SOLUTION,SLOW,MCRYPT,RESPONSE,PHP     2012-09-27 12:03:16

  Traditional recursion vs Tail recursion

Recursion is a frequently adopted pattern for solving some sort of algorithm problems which need to divide and conquer a big issue and solve the smaller but the same issue first. For example, calculating fibonacci  accumulating sum and calculating factorials. In these kinds of issues, recursion is more straightforward than their loop counterpart. Furthermore, recursion may need less code and looks more concise. For example, let's calculate sum of a set of numbers starting with 0 and st...

   ALGORITHM,RECURSION,TAIL RECURSION,TRADITIONAL RECURSION     2016-09-23 23:54:09

  Currying in Python

What is Currying? Currying is like a kind of incremental binding of function arguments. Let’s define a simple function which takes 5 arguments: 1def f(a, b, c, d, e):2    print(a, b, c, d, e) In a language where currying is supported, f is a function which takes one argument (a) and returns a function which takes 4 arguments. This means that f(5) is the following function: 1def g(b, c, d, e):2    f(5, b, c, d, e) We could emulate this behavior the...

   Python,Curring,Binding,Implement     2012-03-19 12:59:10

  Different types of font icons

A website with just text belongs to the pre Web 2.0 era. A modern site will have different icons appearing on different places on the site. This will give the visitor a better visual feeling. But to have a set of consistent and well crafted icons is not an easy task. It may even require a dedicated icon designer to design them. Fortunately, we now can use font icons provided by many people around the web. Today we will introduce some of them. Font Awesome Font Awesome is an open source font ico...

   font icon, web design, font awesome     2015-07-19 06:22:48

  Polymorphism in OOP programming

Polymorphism is the capability of an action or method to do different things based on the object that it is acting upon. This is the third basic principle of object oriented programming. Overloading, overriding and dynamic method binding are three types of polymorphism. Overloaded methods are methods with the same name signature but either a different number of parameters or different types in the parameter list. For example 'spinning' a num...

   Java,OOP,Polymorphism,Overloading,Overri     2014-10-23 08:11:50

  Supercolliding a PHP array

Did you know that inserting 2^16 = 65536 specially crafted values into a normal PHP array can take 30 seconds? Normally this would take only 0.01 seconds. This is the code to reproduce it: <?php echo '<pre>'; $size = pow(2, 16); // 16 is just an example, could also be 15 or 17 $startTime = microtime(true); $array = array(); for ($key = 0, $maxKey = ($size - 1) * $size; $key <= $maxKey; $key += $size) { $array[$key] = 0; } $endTime = microtime(true); echo 'Inserting...

   PHP,Array,hashtable,Slow,Colliding     2011-12-29 09:02:01

  Networking Terminologies

Portmaps sudo apt-get install -y portmap Portmap is a part of ONC RPC (Open Network Computing Remote Procedure) collection of software for implementing remote procedure calls between Computer Programs. It is widely used by NFS (Network File System) and NIS. Portmap is a server that converts RPC program number to DARPA protocol port number. It must be used in order to make RPC calls. Network Infomation Service (NIS) sudo apt-get install -y nis NIS is a client server directory service provi...

   Linux,Network programming,Network file system     2012-02-16 06:22:30

  Tencent released Q1 earning report of 2013

Tencent has released the earnings report of Q1 in 2013, the total revenue is $2.1611 billion which increases  11.5% compared to last quarter and increases 40.4% compared to the same time last year. The  profit is 649.4 million US dollars which increases 17.3% compared to last quarter and increases 37.4% compared last year.The three main profit generators are:1. Value-added services revenue of 1.7014 billion US dollars with an increase of 13.6% compared to last quarter and an increase o...

   Tencent,Earnings report,WeChat     2013-05-15 07:02:45

  YouTube’s Policy Change: All Set to Take Down Hate Videos

Owing to a major policy change, YouTube is introducing new changes in the ways the videos are streamed on its channel. YouTube being the giant video sharing website is all set to work on a long list of policies regarding the content of videos on its channel. The shift in the policies has been introduced by the Google so that hate speech videos can be taken down by the channel.  The most important concern behind the policy shift is to eliminate the videos that are influential in nature. The...

   GOOGLE,YOUTUBE,YOUTUBE POLICY,GOOGLE POLICY,TECHNOLOGY     2017-12-27 07:56:02