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

SEARCH KEYWORD -- Random generation



  The several flavors of random in Java

Random number generation is one of most basic features in any programming language. The basic utilization is always the same: generate a random number between 0 and 1. With such a simple resource at hand we sometimes overlook some interesting features. What do we learn from the books? The most obvious and maybe intuitive way to generate random numbers in Java is simply calling: java.lang.Math.random() Random generation is in the Math utility class with abs, pow, floor...

   Java,Random,Thread,Math,Type     2012-03-22 14:17:44

  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

  Is 99.8% Secure Secure?

A group of researchers (Arjen Lenstra and collaborators  from EPFL Lausanne and James Hughes from Palo Alto) published a study, Ron was wrong Whit is right, of new vulnerabilities of cryptosystems. The New York Times picked up the story. Although Lenstra et al discuss several cryptosystems, their results are particularly relevant to those based on RSA. The title mirrors their conviction that cryptosystems based on a single random element have fewe...

   Security,Percentage,Security index     2012-02-27 04:48:06

  Will the next generation of iPhone be launched on September 10?

According to AllThingsD, Apple might launch its next generation of iPhone on September 10. There is no detailed information about this new iPhone yet, it's also unknown whether it's a cheap one or other kind of versions. But it will equip with iOS 7 and Apple may launch the next generation of Mac OS--Maverick in next few weeks. Since Apple acquired finger print recognition manufacturer AuthenTec with $356 million and it also applied the finger print unlock patent, so the next generation iPhone ...

   iPhone,iOS 7     2013-08-11 10:06:26

  A trap about PHP random number

The method to get random number in PHP is very simple, we only need to use rand() function. int rand ( int $min , int $max ) One function call can return the random number in a specified range. But in fact, the random number in computer is actually pseudorandomness, generally to increase the randomness, we may set a random seed before calling rand(). void srand ([ int $seed ] ) According to other language features, we should pass a time value as a parameter to the srand() function, generally...

   PHP,rand,srand,mt_rand     2013-06-07 09:10:10

  A serious security vulnerability found in MySQL/MariaDB

Recently a serious security vulnerability was found in MySQL/MariaDB. It relates to the access to the database. The issue is described below.When a user connects to MariaDB/MySQL, a token (SHA over a password and a random scramble string) is calculated and compared with the expected value. Because of incorrect casting, it might've happened that the token and the expected value were considered equal, even if the memcmp() returned a non-zero value. In this case MySQL/MariaDB would think that the p...

   MySQL,MariaDB,bug,fix,password,memcmp()     2012-06-11 10:28:09

  Microsoft's next generation OS Windows Blue may be free

In PC era, Microsoft is the world's largest software service provider, its revenue  is mainly from selling operating systems and other software services.With the advent of the era of mobile Internet, the free software service concept has been widely accepted, Microsoft has been forced to explore new business models.According to ZDNet, Microsoft's next-generation OS Windows Blue is expected to be released in mid of 2013. The biggest difference between the new version of the OS and the previ...

   Windows Blue, Pirce, Free     2012-11-29 10:54:15

  HeartBleed: Inside the heart, what causes the bleeding?

Just after a few weeks since Apple's famous goto fail bug, there is one bug in OpenSSL which catches the attention from the world again. The bug is named HeartBleed, found in OpenSSL library, a famous open source library supporting lots of  SSL/TLS communication among server/client applications. The reason why this bug catches the attentions from the world is it affects almost all sites which are using the affected OpenSSL library, these includes many applications like Nginx server, some v...

   OpenSSL,HeartBleed     2014-04-09 05:47:30

  Microsoft announces new Microsoft Band

Microsoft just announced a new Microsoft Band on a new product release event held in New York today. This new device is the second generation of the smart wearable device since the first generation announced around 1 year back(29 October, 2014). The biggest change of the new Microsoft Band is that it has a whole new design with curved screen. It now can be better adept to our body structure. In addition to this, there are a few other features as well. Below is a list of the features this new Mi...

   MICROSOFT BAND 2,MICROSOFT     2015-10-06 09:51:41

  Cool HTML5 matrix effect

Do you still remember the movie The Matrix? Do you still remember the cool matrix effect in that movie? How is that effect achieved? Shaun Dunne shared a piece of HTML5 code which displays a cool matrix effect. The matrix demo can be found here. Below is the code which he achieves this effect: with var s = window.screen; var width = q.width = s.width; var height = q.height = s.height; var letters = Array(256).join(1).split(''); var draw = function () { q.getContext('2d').fillStyle='rgba(0,0,...

   Matrix,HTML5     2013-08-14 08:03:34