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

SEARCH KEYWORD -- Master



  When to use STDERR instead of STDOUT

Every process is initialized with three open file descriptors, stdin, stdout, and stderr. stdin is an abstraction for accepting input (from the keyboard or from pipes) and stdout is an abstraction for giving output (to a file, to a pipe, to a console). That's a very simplified explanation but true nonetheless. Those three file descriptors are collectively called 'The Standard Streams'. Where does stderr come from? It's fairly straightforward to understand why stdin and stdout exist, however ...

   UNIX,STDERR,STDOUT,Difference     2012-01-14 12:07:43

  The magic of go:linkname

When writing Go program, there is frequent need on using time.Sleep() function to pause the logic for some time. And if jumping to the definition of this function, can see below definition: // Sleep pauses the current goroutine for at least the duration d. // A negative or zero duration causes Sleep to return immediately. func Sleep(d Duration) I's strange that there is no function body defined here. What happened? The actual definition of the function body is residing at runtime/time.go&nb...

   TRICKS,GO:LINKNAME,GOLANG     2022-04-10 08:39:00

  25 worst passwords in 2012

Weak password is a serious security vulnerability, but the majority of network users still use some universal simple character sequences as the password. SplashData recently announced the world's worst password list in 2012.  "password","123456" and "12345678" are still at top places, while others have varying,  some new passwords like  "welcome" "Jesus" "ninja","mustang"and "password1 "are in the list. With the risk of password loss, SplashData CEO Morgan Slain said we hoped netw...

   Password,Security     2012-10-25 12:04:49

  How to commit code to OpenStack

If you want to make contributions to OpenStack, the best way to start is to help the community with blueprint or submit bug fix. To commit codes, you need to conform to some rules in the community. Work flow Register an OpenID Apply for a CLA certificate Apply for company CLA certificate Update contributor list Join OpenStack Contributors group and OpenStack group Set up SSH Keys Get a blueprint/bug git clone codes to local disk. Configure user name and user email and openid Modify codes in a l...

   OpenStack,Contribution     2013-08-04 23:04:45

  Python basics summary

Python is recommended by many people as the first language to be learned now. Even in some universities, it is the primary language to be taught to CS/CE students. To master this languages, we should understand some basics of it. Here we summarize some basics about this language. These basics include : string replacement with regular expression, traverse a directory, sort a list, remove duplication, dictionary ordering, dictionary, list, string conversion, date object manipulation, command line ...

   Python,Summary     2013-09-23 10:04:42

  Is working experience really so important?

When I browse the recruiting information in the website, I always see the following requirements:"The candidate must have more than 3 years experience in C++ programming" or "The candidate must have more than 3 years experience in iOS development". I would like to ask the recruiter:"Is working experience really so important?" In my opinion, the working experience is not a good measurement to decide whether a candidate is fit or not, and use this rule just like using the lines of code to judge th...

       2014-09-20 07:14:58

  Statistics on StackExchange

StackExchange is the most popular and professional IT Q&A site, Under StackExchange, there is StackOverflow and other sub sites. Many of us may wonder how this mega site is maintained and what its performance is. A performance page has been released by StackExchange recently. Below is some statistic about this mega site. 560 million page views per month, i.e around 1.9 million PVs per day. For such as big site, it has only 9 web servers and 4 SQL servers(while two of them are in backup mode...

   Stackoverflow,statistic     2015-01-05 02:47:01

  Why do I need a debugger?

  When I begin to learn a new programming language, I will try and master the debugger for it as early as possible. For example, in 2013, while I touched the Go, there seems only gdb for use. Although gdb itself is not a good choice (From Debugging Go Code with GDB): As a consequence, although GDB can be useful in some situations, it is not a reliable debugger for Go programs, particularly heavily concurrent ones. But at that time there was no other choice. So after delve&nb...

       2017-07-21 22:53:16

  Supervisord, God and Monit, which one to choose?

With the popularity of Docker, more and more service have been moved into docker containers and they are easy to build up and maintain for each atomic service(though it's a bit complex to maintain multiple docker containers which contain different service to form a complete solution). Ideally, each docker container should only contain one service which has only one running process. However, in reality there would be cases multiple processes would run in one single docker container and there is a...

   DEVOPS,MONIT,SUPERVISORD,GOD,DOCKER     2017-11-25 12:28:11

  Exit main thread and keep other threads running in C

In C programming, if using return in main function, the whole process will terminate. To only let main thread gone, and keep other threads live, you can use thrd_exit in main function. Check following code: #include #include #include int print_thread(void *s) { thrd_detach(thrd_current()); for (size_t i = 0; i < 5; i++) { sleep(1); printf("i=%zu\n", i); } thrd_exit(0); } int main(void) { ...

   C LANGUAGE,MULITHREAD,MAIN THREAD     2020-08-14 21:20:04