SEARCH KEYWORD -- Application Programming
The Problem with Random Numbers
Today, let's talk about how to generate true random numbers. This is an extremely difficult problem, but it involves some very interesting content. First of all, the random numbers provided by programming languages are pseudo-random numbers. The V8 engine’s official website has an article that particularly reminds everyone of this point. The built-in random numbers are not true random numbers but pseudo-random numbers. Math.random() returns a Number value with po...
RANDOM NUMBER,TRUE RANDOM,PSEUDO RANDOM,HISTORY 2024-06-21 21:09:14
Maintain multiple versions of Go in one single environment
In a development environment, there might be multiple projects going on at the same time and they may require different development environments with different versions of build tool. In many programming languages, it is possible to have multiple versions of different build tool or development tool on a single environment. For example, there can be multiple JDKs, multiple versions of Ruby using RVM. For GoLang, there is a similar tool called GVM which can also be used to maintain multiple versio...
GOLANG,GVM,GVM PKGSET,RVM 2019-11-10 00:43:47
Using htpasswd to protect your website in Nginx
We need to build a password protected website frequently such as an internal website within the team, demo website. Here what we are talking about is password protection in Nginx server level instead of application level registration and login. We are going to use Nginx server configuration and htpasswd file to achieve password authentication. The final result looks like below(Different browsers may have different interfaces): If the authentication fails, it will report a HTTP error: 401 Author...
Nginx,Password protected,htpasswd 2013-06-07 21:35:27
Don't write on the whiteboard
I recently interviewed at a major technology company. I won't mention the name because, honestly, I can't remember whether I signed an NDA, much less how strong it was.I did well. Mostly because of luck. I normally step over myself when I interview. I guess I've improved over the years. Here are a few tips to ace your own interview.1. Don't write on the whiteboardWhen I interviewed at Palantir around 5 years ago, I had a lot of trouble with this. Yes, I knew next to nothing about compu...
Interview,Preparation,Whiteboard,Note,Python 2012-01-11 11:31:32
This Is Why Your Website Is Slow
Click for a larger image Ghostery, the browser plugin that allows its users to "track the trackers," just released data on the tags, widgets and analytics on websites that are the worst in terms of slowing page loads to a crawl. Update: Ghostery discovered an error in their original data set. It appears that Millenial Media was not on this year's list at all, and the #2 slot belonged to AdFunky. Both the text and the graph above have been changed to reflect this. Any webmaster worth his or he...
Web application,Performance,Slow,Reason,Lagtag 2011-11-30 11:45:25
Top 15+ Best Practices for Writing Super Readable Code
Twice a month, we revisit some of our readers’ favorite posts from throughout the history of Nettuts+.Code readability is a universal subject in the world of computer programming. It’s one of the first things we learn as developers. This article will detail the fifteen most important best practices when writing readable code.1 - Commenting & DocumentationIDE’s (Integrated Development Environment) have come a long way in the past few years. This made commenting your ...
Readable,Source Code,Refactor,Comment.OO 2011-04-11 02:20:08
Convert HTML to DOM elements using JavaScript
In some cases, one would want to convert a HTML string to the DOM elements so that JavaScript can handle them easily. This is frequently used when one get some data from third party APIs where the data is in HTML format. In JavaScript, there are a couple of ways one can use to convert HTML to DOM elements. DOMParser document.createElement DOMParser DOMParser can parse XML or HTML source stored in a string into a DOM Document. After the conversion, the normal JavaScript call of h...
JAVASCRIPT,DOMPARSER,DOCUMENT.CREATEELEMENT,HTML,DOM 2017-08-18 22:51:46
It makes nothing but sense...Mobile Payment...
Chinese New Year is around the corner, every place in China and lots of places in the work have been in the CNY mode. People are rushing out to get all the stuff ready to welcome the New Year Eveand the Spring Festival. I also packed my stuff and flew back to my howntown in China to enjoy the great moment to stay with families and hang out with friends whom I have't been seeing for almost one year. I am exited... However, the first thing stunned me is not my friends but the mobile payment s...
CHINA,WECHAT PAY,ALIPAY,MOBILE PAYMENT 2018-02-12 00:07:46
Building the new AJAX mail UI part 2: Better than templates, building highly dynamic web pages
This is part 2 of a series of technical posts documenting some of the interesting work and technologies we’ve used to power the new interface (see also part 1, Instant notifications of new emails via eventsource/server-sent events). Regular users can skip these posts, but we hope technical users find them interesting. As dynamic websites constructed entirely on the client side become de rigueur, there are a number of templating languages battling it out to become the One True Wayâ„...
Web design,Dynamic,Ajax,UI 2012-02-21 05:32:29
Python – parallelizing CPU-bound tasks with multiprocessing
In a previous post on Python threads, I briefly mentioned that threads are unsuitable for CPU-bound tasks, and multiprocessing should be used instead. Here I want to demonstrate this with benchmark numbers, also showing that creating multiple processes in Python is just as simple as creating multiple threads. First, let’s pick a simple computation to use for the benchmarking. I don’t want it to be completely artificial, so I’ll use a dumbed-down version of factorization...
Python,Multitasking,Multiprocessing,CPU bound 2012-01-17 11:38:22
RECENT
- How to make select in WinSock exceed the 64-socket limit
- EtsiosApp Release Date: All You Need to Know
- SIEM Big Data Visualization [03]:Graph-Based SIEM Log Analysis Dashboard
- How AI is Changing Web Development: A New Era of Digital Innovation
- SIEM Big Data Visualization [02]: National Cyber Threats Dashboard
- Exploring the Impact of a Loan Origination System on Financial Institutions
- Power Grid OT Simulation System
- Why is Golang's Compilation Speed So Fast?
- SIEM Big Data Visualization : Dashboard for Monitoring Scam Events in Critical Infrastructure
- Introduction to the Application of eBPF in Golang
- more>>