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

SEARCH KEYWORD -- Net



  A Perl Regular Expression That Matches Prime Numbers

perl -lne '(1x$_) =~ /^1?$|^(11+?)\1+$/ || print "$_ is prime"' Can you figure out how it works? I give an explanation below, but try to figure it out yourself. Here is what happens when you run it: $ perl -lne '(1x$_) =~ /^1?$|^(11+?)\1+$/ || print "$_ is prime"' 1 2 2 is prime 3 3 is prime 4 5 5 is prime 6 7 7 is prime 8 9 10 11 11 is prime Here is how it works. First, the number is converted in its unary representation by (1x$_). For example, the number 5 gets converted into 1x5, which is ...

   Perl,Regex,Regular expression,Prime number,One line     2011-12-26 08:42:00

  Global web browser market share statistic in June

The war among the leading web browsers is still on after Google Chrome took over IE as the No.1 web browser last month. Let's take a look at the market share for different web browsers in June 2012.According to statCounter.  Chrome still remains at the No. 1 position and its market share is continuously increasing. Its market share increases by 0.28% from 32.43% in May to 32.71% in June. While for IE, eve. though it lost its No. 1 position to Chrome last month, its market share still...

   Web browser, Market share,June,2012     2012-07-02 06:08:17

  Hidden messages in logos

A logo is the simplest thing a user can remember about a product or a company. A good logo design will leave deep impression to customers. Each logo tries to convey either their product information or company vision to customers, this information may be easily understood with a glance or it contains some hidden messages which need us to figure out. Today we share some logos which contain some hidden messages. 1. Fedex The arrow between E and X means Fedex will deliver the product to the right p...

   Logo,Meaning     2013-10-01 07:52:05

  Haxe: Another multiplatform language

There are two kinds of programmers: One is using different languages to solve problems, the other is inventing languages to solve problems. Haxe is an emerging open source programming language which is universal, powerful and easy-to-use. Some languages claimed they were multiplatform languages, such as Java, C# and ActionScript. They all are based on some platforms, Java has JVM, C# has .Net and ActionScript has Flash Player. While Haxe is a trule multiplatform language, it can be used to devel...

   Haxe,Multiplatform,Open source     2012-06-11 08:08:28

  How to do pprof for gRPC service

gRPC is a RPC framework based on HTTP and is frequently used for communications among micro service inside the same organization network. However,  the service functions cannot be accessed via normal HTTP URL as it's not a WEB framework. In this case, how to do pprof on a gRPC service? The trick is starting a HTTP server asynchronously while starting the gRPC service. This HTTP server can be accessed to run prrof debug. go func(){ http.ListenAndServe(":10001", nil) }() Since it uses the de...

   GOLANG,PPROF,GRPC     2021-01-29 23:11:33

  30 minutes to fix Java vulnerability

On September 25, Adam Gowdiak from the Polish security consulting firm Security Explorations submitted a Java security vulnerability to Oracle and provided a proof-of-concept. The vulnerability exists in Java 5 6,7, once the user accesses hosted malware site, an attacker can remotely control the infected machine.Gowdiak later got in touch again with Oracle and got the response that the fix has reached the final stage. He can expect the patch in four months later. He eventually unbearable Oracle'...

   Java, Vulnerability,Fix     2012-10-29 11:53:43

  Windows 8 will be on sale on 26th October

Microsoft announced that they would start to sell Windows 8 on 26th October. Earlier this month at the Microsoft Worldwide Partner Conference, Microsoft promised that they would release Windows 8 in this October.Steven Sinofsky, Windows department manager, announced this news in Microsoft's yearly sales conference. He mentioned that the next generation Windows operating system would be on sale on the Friday 3 months later. But he didn't mention whether Surface would be released at the same time....

   Windows 8, Release date, Sale date,Surface     2012-07-19 10:38:51

  PHP to output string to client terminal

It is a common task to echo messages to the user using PHP. There are lots of ways where the message can be echoed to the client terminal(browser or console window) through PHP. These includes some well know debug methods like var_dump() and var_export() etc. In this post, we will show you some other methods shared by Laruence, one of the core members of PHP development team. 1. echo First comes with the most common one : echo. $str = "Hello PHP\n"; echo $str; 2. print Then comes another c...

   TRICKS,DEBUG,OUTPUT,PHP     2015-10-01 03:16:56

  Nokia finally announces the death of Symbian

According to Sina.com. Nokia confirmed that the 808 PureView released last year would be the last phone equipped with Symbian OS in its Q4 financial report. This means that Symbian has been officially declared dead.Nokia said in the report: "In 2012, during the process of transition to Windows Phone, we continue to sell Symbian devices. The Nokia 808 PureView launched in the middle of last year is the last Symbian device."In Q4 2012, sales of Symbian phones were 2.2 million which was equivalent...

   Nokia, Symbian, Windows Phone     2013-01-24 06:45:17

  TIOBE : C overtakes Java as the No.1 programming language

TIOBE has released the Programming Community Index for April 2012. The highlight of this month is that C overtakes Java as the No.1 programming language again. C language is liked by more and more developers of all ages. Due to the growing popularity of the Android platform, Java decline will not be obvious. Previously Java took a very long time to overtake C, now C once again returns to the throne. The battle between these two languages will continue.The top three are respectively, C, Jav...

   C.TIOBE,Java     2012-04-09 07:01:20