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

SEARCH KEYWORD -- Internet divide



  Implementation of +,-,*,/ with bitwise operator

There is a question asked on Stackoverflow : Divide a number by 3 without using *,/,+,-,% operators. This question is an Oracle interview question. Some people give excellent answers. You can go there and take a look. Usually we need to use bitwise operators to do this kind of implementations. Here I want to show you ways to implement +,-,*,/ with bitwise operators. A bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits. It is a fast, pr...

   Bitwise operator,Shift,Add,Subtract,Multiplication,Division     2012-08-05 01:52:47

  Gcd Algorithm with JavaScript

How to find the greatest common divisor between two integers? We may encounter this problem frequently in interviews or other occasions. An efficient metho to find gcd is the Euclidean algorithm, which uses the division algorithm in combination with the observation that the gcd of two numbers also divides their difference: divide 48 by 18 to get a quotient of 2 and a remainder of 12. Then divide 18 by 12 to get a quotient of 1 and a remainder of 6. Then divide 12 by 6 to get...

   JavaScript,Algorithm,Gcd,Implementation,     2011-09-21 15:57:32

  Find max subarray of an array

In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers (containing at least one positive number) which has the largest sum. For example, for the sequence of values −2, 1, −3, 4, −1, 2, 1, −5, 4; the contiguous subarray with the largest sum is 4, −1, 2, 1, with sum 6. The problem was first posed by Ulf Grenander of Brown University in 1977,...

   Max Subarray, Divide and conquer,Kadane     2013-04-22 11:50:35

  How does Base64 work

Base64 is a data encoding scheme used in safe data transfer such as HTTP and its extensions. Base64 encoding can conver arbitrary group of bytes into a sequence of readable ASCII characters. These converted characters can safely put in a HTTP header without causing any problem while the peers process the HTTP header. Base64 encoding was invented as part of the MIME content transfer encoding. It is similar to other encoding schemes such as Uuencode and BinHex but with higher efficiency....

   ALGORITHM,BASE64     2016-03-09 23:47:40

  China has 591 million netizens now

CNNIC(China Internet Network Information Center() released its 32nd research report on Internet usage in China on July 17 Beijing Time. According to the report, China has 591 million netizens until June 2013, among them 464 million are phone Internet users. Chinese netizens surf the Internet 21.7 hours a week. The report shows that China's netizens reached 591 million as of the end of June 2013,  an increase of 26.56 million people compared to the end of 2012. Internet coverage rate is 44...

   CNNICInternet usage     2013-07-18 02:27:52

  The Story of W&L: China’s Great Internet Divide

Here’s an introductory quote from The Story of W&L, a tale of China’s great internet divide: China does not have one so-called “national internet,” instead there’s a great divide. It encompasses the elite with ThinkPad laptops and also the grassroots with MTK Shanzhai mobile phones. Our elites are on par with America, while our grassroots are on par with Vietnam. This is the story of W&L, two representatives of China’s great internet divide. T...

   China,Internet divide,Elite,Grassroot,Laptop,Mobile phone     2011-12-05 12:23:56

  Dividing any number By 9, 90, 900 and so on

The technique for Dividing any number by 9 mentally is simply to reduce a complex division to a very simple addition. The technique can be applied from both ends i.e. from right-most digit or from left-most digit. Dividing by 9 into a mixed number from right-most digit uses the Divisibility Rules for 9: 1.     First, add all the digits together and divide by 9, keeping in mind the whole number and the remainder. 2.     Write the remainder o...

   9,90,division,algorithm     2012-03-07 05:15:06

  Do IE developers feel guilty?

IE won the browser war before Chrome appeared with the help of anti-competitive practices. But with the appearance of more and more easy-to-use and fast browsers, people start to hate IE and leave IE. It seems IE is not a product of modern age. Do IE developers feel guilty about this? Everything is contextual. The browser that most people hate today is IE6, which, at the time was one of the best browsers on the planet (it didn't win the Browser Wars, Round One, by accident). It was built on "int...

   IE,History     2013-07-26 21:21:46

  Implementing DESede/ECB/NoPadding cipher algorithm in GoLang

By default, GoLang doesn't provide the ECB mode cipher for DESede though there is CBC mode provided. In cases we need to encrypt/decrypt data with ECB mode, we need to implement those by ourselves. This mode is frequently used when encrypting/decrypting PIN block which is small block data less than 16 bytes. In this post, we will introduce how to implement the DESede/ECB/NoPadding algorithm in GoLang by using the existing cipher support. Here we will not cover how DESede works in detail, instead...

   SECURITY,SAMPLE,GOLANG,DES,DESEDE,3DES     2019-07-29 06:43:50

  If Multitasking Is Impossible, Why Are Some People So Good at It?

"Multitasking means screwing up several things at once," somebody once said, wrongly. In fact, we don't do many things at once, ever. We do many things in quick succession. And some of us are very good at it.Nagy-Bagoly Arpad/ShutterstockEverybody multitasks. We have conversations while driving. We answer email while browsing the Web. It's hard to imagine living any other way. What would be the alternative, removing the seats from your car to ensure you only drive alone? Block every website not ...

   Multitasking,Human,Program,Task switch,Myth     2011-11-18 09:03:22