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

SEARCH KEYWORD -- BIND



  Problem and Solution for Installing wxPython on Ubuntu 20.04

When we try to install wxPython lib on Ubuntu system to do software GUI development, most of time we may meet some installation and lib dependency problems. For the latest Ubuntu version, the problems still happen. Below are some common problems which happened frequently and their solution: --------------------------------------------------------------------------------------------------------------- Problem [1]: Install wxPython on Ubuntu 20.04 fail because of dependency package Gtk is not in...

   PYTHON,WXPYTHON,UBUNTU 20.04     2020-09-09 05:32:35

  Handling Plugins In PHP

A common problem that developers face when building applications is how to allow the application to be "plug-able" at runtime.  Meaning, to allow non-core code to modify the way an application is processed at runtime.  There are a lot of different ways that this can be done, and lots of examples of it in real life.  Over a year ago, I wrote a StackOverflow Answer on this topic.  However, I think it deserves another look.  So let's look at some patterns and common im...

   PHP,Plugin,Handling     2012-03-11 13:18:39

  Currying in Python

What is Currying? Currying is like a kind of incremental binding of function arguments. Let’s define a simple function which takes 5 arguments: 1def f(a, b, c, d, e):2    print(a, b, c, d, e) In a language where currying is supported, f is a function which takes one argument (a) and returns a function which takes 4 arguments. This means that f(5) is the following function: 1def g(b, c, d, e):2    f(5, b, c, d, e) We could emulate this behavior the...

   Python,Curring,Binding,Implement     2012-03-19 12:59:10

  Load and execute JavaScript

When we load and execute JavaScript in a webpage, there are many points we need to care about because of its design and feature. There are two features about JavaScript execution in a browser: 1). The JavaScript codes will be executed immediately once loaded;2). When JavaScript codes are being executed, they will block the following contents (including page rendering and other resources downloading). So if there are multiple js files to be loaded, these codes will be executed sequentially. Since...

   JavaScript,async,defer,load,execute     2013-06-07 04:53:46

  Service discovery with etcd

In previous post, we have talked about etcd and its usage. This post we will cover how to implement server discovery with etcd. Service discovery is to solve one of the most commonly seen scenarios in distributed system where how to find the corresponding target service to talk to. In short, it is to find some server which one can talk to based on some service name. A complete service discovery system include below three key functions: Service registration: A service must register itself to so...

   ETCD,SERVICE DISCOVERY,DEMO,TUTORIAL     2021-03-08 05:36:29

  JavaScript programming style

Douglas Crockford is a JavaScript expert, he is the inventor of JSON. In November 2011 he made a speech "Youtube", during the speech he talked about what JavaScript programming style is.I recommend this speech to everyone, it not only helps you learn JavaScript but also make you enjoying because Crockford is very humorous and he made audience laugh frequently.Next I will summarize JavaScript programming style according to this speech and his article code convention. The so-called programming ...

   JavaScript, programming style,Curly braces,Equal     2015-10-14 10:16:44

  Subdomain Configuration

Subdomain ConfigurationA subdomain configuration is very similar to a domain name configuration. The only difference is that the subdomain entry is tied to the corresponding domain name lookup. A request for the subdomain (e.g. http://content.websitegear.com) will be routed to a DNS server containing the DNS information for the parent domain (websitegear.com). Once the DNS record for the subdomain is resolved to a particular IP address, the request is sent to the web server listening on that IP ...

   Domain,Subdomain,Configuration,Setup     2011-10-09 09:23:16

  JavaScript interview questions

This post will cover the JavaScript questions I have encountered and have seen during my programming career. They will mainly focus on vanilla JavaScript though there are lots of excellent frameworks out there and many people are using them in their daily work. this keyword this keyword is an very important but easy to confuse concept in JavaScript since it is always referring to the calling object of the function. 1. What will be the output of below code snippet? function User(name) { this....

   JAVASCRIPT,ALGORITHM,THIS,CLOSURE     2019-03-09 07:05:46

  In-memory key-value store in C, Go and Python

Subtitle: Wow Go’s net library is fast On paternity leave for my second child, I found myself writing an in-memory hashmap (a poor-man’s memcached), in Go, Python and C. I was wondering how hard it would be to replace memcached, if we wanted to do something unusual with our key-value store. I also wanted to compare the languages, and, well, I get bored easily! The code is on github as Key-Value-Polyglot. Each version implements enough of the get and set commands from the mem...

   key-value,Memory,C,Python,Go     2012-03-21 09:21:51

  Set up Superset on ubuntu 16.04 LTS

Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application. Compared with business-focused BI tool like Tableau, superset is more technology-navy. It supports more types of visualization and able to work in distributed manner to boost the query performance. Most importantly, it is free of charge! An example dashboard: Let’s go and set it up. Create a virtualenv Assume Anaconda is installed for python management. # create a virtualenv with python 3.6 co...

   TUTORIAL,UBUNTU,SUPERSET     2019-10-19 21:34:55