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

SEARCH KEYWORD -- Q&A



  Will Artificial Intelligences Find Humans Enjoyable?

Will AIs find humans interesting, enjoyable, and worthy of companionship? My guess: the smarter and more autonomous they become the more the answer will become NO. There are practical reasons for AIs to want to understand humans: The AIs will want to protect themselves from all threats, including human threads. The AIs will also want to get more resources (e.g. energy, raw materials for fabrication of additional computing power). The extent that humans control access to resources AIs will...

   AI,People,Cooperation,Enjoyable     2012-02-19 06:13:47

  Free jQuery UI themes

jQuery UI is a jQuery User Interface library, it provides many frequently used components and functions. It consists of datepicker, slider, progress bar and drag and drop support etc. Also it has many themes, you can use ThemeRoller to customize your own theme. But with ThemeRoller, we can still find the shadow of jQuery UI. If you want some highly customized, free and high quality jQuery themes such as Bootstrap, Windows-Metro, then the following themes may suit you. 1. jQuery UI Bootstrap jQu...

   jQuery UI, Theme     2012-10-20 10:59:20

  gethostbyname vs getaddrinfo

getaddrinfo is slower than ping when resolving domain names. I think ping uses gethostbyname to resolve a domain name. The question becomes whether getaddrinfo is slower than gethostbyname. After testing with both functions, we find that getaddrinfo is really slow compared to gethostbyname. By strace tracking,  we find getaddrinfo will communicate with DNS server 10 times and gethostbyname will communicate with DNS server communication twice.gethostbyname is an old way to resolve domain nam...

   C++,network,DNS     2012-08-15 14:06:34

  Is Shared Hosting Secure?

Shared hosting is incredibly popular with users who are looking for the cheapest hosting available – the problem is that along with the low price you get poor performance and even more concerning – questionable security. When running on a shared host dozens if not hundreds of other sites are running on the same servers – this means any single security flaw in any of those applications can compromise the entire server. This  dramatically increases the odds of your ...

   Shared hosting,Virtual host,Security,Data security     2012-02-14 10:48:59

  Fastjson just fixed a bug which might cause out of memory issue

Fastjson just fixed a bug which might cause service down a few days ago. This bug is caused by some mishandling of special character \x which is an escaped character to indicate hexdecimal number. The impact of this bug would be big if the attacker constructs a malicious data which would cause the service down.  The code which causes the issue is in com.alibaba.fastjson.parser.JSONLexerBase#scanString, when a JSON string is passed in, fastjson would parse the string character by c...

   FASTJSON,ALIBABA,BUG,NEWS     2019-09-07 06:03:49

  Tips and tricks about JavaScript from Google

JavaScript is now a very popular client side language. It's flexible, powerful but easy to make mistakes. So good programming style is better for you to write efficient and readable JavaScript codes. Here are some tips and tricks about JavaScript from Google. True and False Boolean Expressions The following are all false in boolean expressions: null undefined '' the empty string 0 the number But be careful, because these are all true: '0' the string [] the empty array {}&n...

   JavaScript, Google, Coding standard     2013-02-26 23:11:03

  C++/CLR int to System::String^

In C++/CLR (for Microsoft), sometimes we need to convert int to System::String type or vice versa. The simple way is :From System::String^ to int int num= int::Parse(str); // System::String^ to int From int to System::String^ System::String^ str = num.ToString(); // int to System::String^For all the other data types, similar ways can be adopted....

   C++,CLR,Microsoft,System::String,Convert,int     2011-12-15 12:47:22

  Do you really understand C? 21st International Obfuscated C Code Contest winning entries

The 21st International Obfuscated C Code Contest(IOCCC) officially launched the winning source code. IOCCC requires contestants to write the most creative and the most obfuscated C codes with the size limited to 4kb and less Work of each participant is impressive. The winners, including one French, one Korean, five Americans, one Belgian, one Israeli, one British, four Japanese and one Chinese. Here we list some codes: Best short program Seonghoon Kang  from Korea- Decodes spelled out ...

   C,Obsfucation contest     2012-10-25 12:26:55

  Java 9 release is delayed again

The original Java 9 planned release date is March 2017. But latest source shows that Java 9 release will be delayed again to July 2017. It's four months later than the planned date. Oracle Chief Architect of Java Platform group Mark Reinhold proposes this new release date in a message sent on the OpenJDK mailing list.  Despite this progress, at this point it's clear that Jigsaw needs more time. We recently received critical feedback that motivated a redesign of the module ...

   JAVA,RELEASE DATE,JAVA 9,JAVA 9 DELAY     2016-09-26 12:22:53

  Can a === 1 && a === 2 && a === 3 be true in JavaScript?

Lots of you may be aware that there is famous interview question which asks whether a == 1 && a == 2 && a == 3 can be true in JavaScript. And the answer to this question is YES. The reason is that == will do a non-strict comparison which will evaluate a to a number and this provides the possibility of dynamically return the value when every time a is accessed. Have you ever wondered whether a === 1 && a === 2 && a === 3 can be true? At first glance, it seems this ...

   JAVASCRIPT,===,STRICT COMPARISON     2018-04-06 12:17:29