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

SEARCH KEYWORD -- Demo



  Redis Cluster and Common Partition Techniques in Distributed Cache

In this post, I will discuss a few common partition techniques in distributed cache. Especially, I will elaborate on my understanding on the use of Redis Cluster. Please understand that at the time of writing, the latest version of Redis is 4.0.10. Many articles on the same topic have a different idea from this post. This is mainly because, those articles are probably outdated. In particular, they may refer to the Redis Cluster implementation in Redis 3. Redis Cluster has been improved...

   REDIS,DISTRIBUTED CACHE,CLOUD COMPUTING     2019-01-17 08:10:37

  How to be an excellent programmer

To use a programming language is very easy for a programmer, but it's a dream for many programmers to be an expert software developer. There are five levels of programmers: Novice, Senior novice, competent, proficient, and expert. Most programmers are senior novice. And programmer living in this level are a lot of people who have 1 to 10 years work experience.As a programmer, how to find the bottlenecks for your improvement and how to improve yourself quickly? This is really not an easy question...

   Programming,Tips,Habit     2013-03-26 09:53:38

  Set file permission in Java

Prior to Java 6,  there is no good solution at the Java level to provide file permission management. You need to implement your own native methods or call the Runtime.exec() to invoke the system routine such as chmod in LInux. Since Java 6, Java introduces a set of methods which can be used to set the file permission at Java level. These methods include: File.setReadable(boolean); File.setWritable(boolean); FIle.setExecutable(boolean); File.setReadable(boolean, boolean); File.setWritable(bo...

   JAVA, FILE PERMISSION, POSIX,learnjava     2015-08-29 03:37:37

  Supercolliding a PHP array

Did you know that inserting 2^16 = 65536 specially crafted values into a normal PHP array can take 30 seconds? Normally this would take only 0.01 seconds. This is the code to reproduce it: <?php echo '<pre>'; $size = pow(2, 16); // 16 is just an example, could also be 15 or 17 $startTime = microtime(true); $array = array(); for ($key = 0, $maxKey = ($size - 1) * $size; $key <= $maxKey; $key += $size) { $array[$key] = 0; } $endTime = microtime(true); echo 'Inserting...

   PHP,Array,hashtable,Slow,Colliding     2011-12-29 09:02:01

  How to create offline HTML5 web apps in 5 easy steps

Among all cool new features introduced by HTML5, the possibility of caching web pages for offline use is definitely one of my favorites. Today, I’m glad to show you how you can create a page that will be available for offline browsing.Getting startedView DemoDownload files1 – Add HTML5 doctypeThe first thing to do is create a valid HTML5 document. The HTML5 doctype is easier to remember than ones used for xhtml:<!DOCTYPE html> <html> ... Create a file named index...

   Offline store,Steps,demo,Html5,Cache     2011-09-20 13:15:45

  5 Free Open Source Chat Applications For Developers

A chat application allows users to communicate with others via texting, messaging, video and audio conferencing. While developing a web application web masters always think that they should communicate with their audience directly rather than emails, phone or contact forms, or chat applications can be used in various web applications such as social networking sites, business sites for live support etc.We understand the needs of webmasters and that’s why we searched and explored myriad of ...

   AJAX,Chat,Web,Chat system,Open source,Pr     2011-09-07 10:49:29

  Static Code Analysis

The most important thing I have done as a programmer in recent years is to aggressively pursue static code analysis.  Even more valuable than the hundreds of serious bugs I have prevented with it is the change in mindset about the way I view software reliability and code quality.It is important to say right up front that quality isn’t everything, and acknowledging it isn’t some sort of moral failing.  Value is what you are trying to produce, and quality is only one a...

   Static code,Analysis,Quality,Microsoft 360,Value     2011-12-24 06:50:18

  A tutorial on Github Actions

Github Actions is a CI/CD service created by Github. It aims to make it easy to automate all software workflows, now with world-class CI/CD. Build, test, and deploy code right from GitHub. It was launched in October 2018 and was officially available to all users in November 2019. This post will give an introduction of Github Actions and explain how it works. What is Github Actions Normally Continuous Integration includes some steps, fetching code, running test, sshing into remote server in...

   GITHUB,GITHUB ACTIONS,CI,CD     2019-12-23 05:33:39

  Some useful Linux commands for teamwork

A small development team in the intranet will frequently transfer codes, share files. Here are some command we use frequently to release some of our work. They are not applicable to Windows users. 1. Output program execution output through GTalk. Sometimes we may need to send the program execution result and log to teammates for debugging using IM. These outputs are very troublesome to copy and send while in command line mode. So we could have a program called gpipe.py which can put GTalk as a p...

   Linux,NFS,GTalk,HTTP     2013-01-16 04:36:33

  Run code with multiple files in the same main package in GoLang

To run a GoLang program, there needs to be a main() function defined. In some cases when developing some demo program which has multiple files and just wanna put them in the same main package and this folder is not in GOPATH, how to run the program? Let's say we have following folder structure where the main() function is defined in main.go. If you just run below command, it would fail to start to run the program and gives some error if some struct is defined in other files and being used. PS D...

   EXECUTABLE,GOLANG,MAIN PACKAGE,MULTIPLE FILE     2021-05-15 10:20:10