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

SEARCH KEYWORD -- reason



  strange thing in PHP session variable and local variable

A few minutes ago, I noticed one strange thing when I did my PHP web application development.The situation is described below:I want to display a user's profile using a query parameter user=user_id as the parameter. And also the session variable when user logs in  is $_SESSION["user"].So before displaying the user's profile, I need to either get the query string parameter user and create a local variable called $user and assign value to it as $user=$_REQUEST["user"].Here comes the strange t...

   PHP,session,variable name,change automat     2011-06-13 12:23:59

  Here is why Mark Zuckerberg wears the same thing every day

Have you noticed that Facebook CEO Mark Zuckerberg always wears the same thing every day when he appears in the public? A grey t-shirt which is now a symbol of Mark Zuckerberg. The reason why he wears the same thing every day is "I want to clear my life to make it that I have to make as few decisions as possible about anything except how to best serve this community" as what he said in an in-person public Q&A at the Facebook HQ in Menlo Park where he answered questions from people around th...

   Facebook,Mark Zuckerberg, grey T-shirt     2015-03-01 01:01:16

  Disgusting programming language list

To avoid arguments among different programming languages, this ranking only covers the opinions from programmers with multi-language experience. Also it doesn't mean the language is not good if the language is on the list, it just means those developers don't like some features of the language. Below ranking is summarized from Quora、Stack Overflow and Hacker News. 10. Python Reason : It uses code indent to define block level scope, why not use curly braces? It also uses massive colons and ...

   Programming language rank     2013-09-27 09:53:39

  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

  Does Microsoft lack of UI designers?

I believe that many of us visited one or more of Microsoft's website before. We may want to know what new products Microsoft has presented, or we may be developers who want to discuss some Microsoft products on their forums. I have to say that Microsoft has presented many amazing products to the world such as Windows OS, XBox, Office etc. But for its website, I don't know about you guys, every time I visit Microsoft's websites, I wonder whether they lack of UI designers or not. Their websites ar...

   Website UI design,Microsft website     2012-03-31 02:54:00

  That’s Not TDD

A few months ago I was visiting a client who was having a lot of problems using TDD. “It takes over half an hour to run our unit tests,” he said. “You are not doing TDD,” I said. “In order for tests to be valuable all of them must run fast—within a few seconds, or developers will stop running tests frequently.” “But how to I make them run fast?” he asked, “Just connecting to the database takes 30 seconds” So I showed him a techn...

   TDD,Driver,QA,Model,Uncontrol,Method     2011-08-25 02:26:29

  How does CSDN dare to use plain text as password?

Recently, the China's largest Chinese IT community website named CSDN leaked its user's account information. Later today CSDN made an announcements to its users on their website. The announcement said that some user account information was leaked and the passwords of the accounts were stored as plain text in their database before 2009, and after 2009, they adopted an encryption algorithm to encrypt user password. They urged all users who registered the account before 2009 to change their passwor...

   Security,Information leak,CSDN,Plain text     2011-12-22 09:10:01

  The story behind Twitter Bootstrap

Bootstrap is a free front end framework used for creating websites and web applications. It contains HTML and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions. It now becomes a very popular front end frameworks for web designers. This framework was developed by Mark Otto and Jacob Thornton at Twitter. Later this framework was open sourced and hosted on GitHub and it now becomes one of the most popular ...

   Open source,Bootstrap     2013-12-16 08:14:22

  Different ways to pass query parameters in EmberJS

In EmberJS, one could pass query parameters when retrieving resources with store.query() method. But what if there is a requirement that one wants to pass query parameters when calling store.findRecord()? Or there is a requirement that one wants to pass query parameters to a relationship when calling model.get('hasManyAttribute') in a RESTful style? In this post, we will explain how these can be achieved. In the store.query() case, one could easily pass the query parameters by passing ...

   RELATIONSHIP,EMBERJS,QUERY PARAMETERS     2018-05-18 10:47:56

  Why is programming unique profession

Why programming is unique profession - Presentation Transcript Introduction Some people says programming is difficult and for some others it is so easy. It not only depends on your capabilities, but your attitude for work. Programming is hard indeed, but not at all as difficult as life of a crook or joker who pretend, lie and act for living. Knowing what you do, life is going to be much more interesting and enjoyable for a programmer. You play with a dumb machine Computer is dumb machine. Unless...

   Programming,Unique profession,Reason     2011-07-22 23:55:09