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

SEARCH KEYWORD -- Documentation



  Responsive Web Design

With the popularity of 3G, more and more people are surfing the Internet using mobile phones. Mobile devices are becoming common devices for accessing internet. So web design faces a big challenge which is how to display the same webpage on different devices with different screen  resolutions.Screen resolution of mobile device are usually not very large, the width is below 600px, while PC usually has a resolution over 1000px. It is not an easy task to display the same content with satisfyin...

   CSS,Web design,Layout,Response web design     2012-05-03 06:59:40

  It’s Not Too Late to Learn How to Code

Coding is sort of like a superpower; with it you can create things that millions of people see. You can change the way people behave, the way they think, and the way they interact with others. This is beyond awesome, but I’ve also met a lot of people that think that this ability is inaccessible to them. I’ve met a lot of “non-technical” people who seem to think that this superpower is only bestowed on those fortunate enough to have it come easily to them at a very early...

   Tips,Coding,Preparation,Interest     2011-10-17 11:26:38

  Parallel Javascript

Lately the ideas for a parallel, shared memory JavaScript have begun to take shape. I’ve been discussing with various JavaScript luminaries and it seems like a design is starting to emerge. This post serves as a documentation of the basic ideas; I’m sure the details will change as we go along. User Model The model is that a JavaScript worker (the “parent”) may spawn a number of child tasks (the “children”). The parent is suspended while the children exe...

   Parallel JavaScript,API,Spawn,Parent,Task     2012-01-11 12:02:00

  A simple tutorial on GoLang connecting to Clickhouse

Go, also known as Golang, is a statically-typed, concurrent programming language created by Google. ClickHouse is a high-performance, column-oriented database management system that can be used for real-time data analysis. This tutorial will provide a deep dive into how to connect to ClickHouse from a Go program, including how to perform common database operations such as SELECT and INSERT statements. Before proceeding, it is assumed that you already have Go and ClickHouse installed on your mach...

   GOLANG,CLICKHOUSE,TUTORIAL     2023-02-11 07:05:36

  Use Java ThreadLocal with caution

According to Oracle documentation, ThreadLocal is a class provides thread-local variables. These variables differ from their normal counterparts in that each thread that accesses one (via its get or set method) has its own, independently initialized copy of the variable. ThreadLocal instances are typically private static fields in classes that wish to associate state with a thread. In short, ThreadLocal variables are variables belong to a thread, not a class or an instance of a class. One common...

   JAVA,MEMORY LEAK, THREADLOCAL     2015-11-03 07:31:57

  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

  Python for the Web

Python is the best language in the world for interacting with the web, and I'm going to show you why.This article will give an extremely high level overview of how to use python for the web. There are many ways you can interact with the web using python, and this post will cover all of them. This includes python web scraping, interacting with APIs (Application Programming Interfaces) and running your own python web site using python server software. There are many ways to do all these thing...

   Python,Web,Interaction,Communication,Network     2011-10-19 14:19:11

  PHP advisory file lock : flock

When we process a file in PHP, we may often need to acquire a lock so that other scripts cannot edit the same file at the same time. There is a flock() function in PHP which can help us lock the file we want to process. But there is one issue we should take care. Recently, ffb encountered one issue while he was trying to lock a file handle. The codes are below: $filename = "/tmp/lock.txt";      $fp = fopen($filename, "r+");   if (!$fp...

   flock(),advisory locking,PHP     2013-04-23 11:42:48

  A Different Kind of Technical Interview

Everyone who's been programming professionally for a while knows the standard format of the technical interview. You go in, there's a whiteboard in the room, and you write code on it to answer questions.Everyone also has the same basic complaints about these interviews. In a normal work environment, you have access to an API or search engine, but at a whiteboard you don't. Whiteboard questions generally don't include much in the way of overall design, and they're typically limited to simple algo...

   Interview,Programming,Methods,Pairing     2011-06-04 07:56:21

  Python internals: how callables work

[The Python version described in this article is 3.x, more specifically - the 3.3 alpha release of CPython.] The concept of a callable is fundamental in Python. When thinking about what can be "called", the immediately obvious answer is functions. Whether it’s user defined functions (written by you), or builtin functions (most probably implemented in C inside the CPython interpreter), functions were meant to be called, right? Well, there are also methods, but they’re not very ...

   Python,Callable work,Rationale     2012-03-24 05:20:27