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

SEARCH KEYWORD -- timeout



  Deep Understanding of ReentrantLock: Unlocking the Mysteries of Java Concurrent Programming

ReentrantLock introduction ReentrantLock is a class in the Java concurrent package, java.util.concurrent.locks, and is an implementation of the Lock interface. As its name suggests, it is a reentrant mutual exclusion lock. A mutual exclusion lock is a synchronization tool used to protect shared resources, ensuring that only one thread can access the resource at a given time. Reentrant means that a thread can acquire the same lock multiple times without causing a deadlock. This lock provides some...

   JAVA,REENTRANTLOCK,CONCURRENCY,MULTITHREADING     2023-05-22 08:01:13

  Top 10 Go Coding Traps and Tips

Go is currently the most common programming language in cloud development. Though I use it very much in my work, I am still repeating certain mistakes. This article is more a record of these errors, figuring out the causes and solutions so that people who read this article will save themselves time when coming across the same problems. Let’s cut through to the tips. Don’t rely on index var in the for loop The most common mistake we make is that we often create goroutine&nbs...

   TIPS,GOLANG,NIL INTERFACE     2021-07-03 23:45:51

  When and How to Use the Go Channel

Go’s concise structure and powerful native library enable us to hit the ground running easily. It is more efficient than Java or Python when implementing the same functions, especially its concurrent programming, which is very handy and widely admired due to its goroutine and channel. goroutine and channel has much to dig into, and let’s start with channel, which I used to consider narrowly as a message queue to transfer data between gorouti...

   GOLANG,CONTEXT,CHANNEL     2022-09-17 23:06:36

  Shell script common interview questions

Shell script is frequently used when monitoring system status on Linux. It's not an easy task to write shell script but it's a very important skill for developers and system administrators to ease work and automate common tasks. This post will share some common interview questions about shell script. 1. Get random characters(8 characters) Method 1 # echo $RANDOM |md5sum |cut -c 1-8 471b94f2 Method 2 # openssl rand -base64 4 vg3BEg== Method 3 # cat /proc/sys/kernel/random/uuid |cut -c 1-8 ed...

   LINUX,INTERVIEW,SHELL SCRIPT     2018-09-28 10:46:00

  Why I Quit My Job to Start a Tech Company

Back in November of 2006, before NY Mag and TimeOut put startups on the cover, before the “tech bubble”, before Twitter and Foursquare were popular, before working at a startup in NY was considered a reasonable thing to do, I was a private equity investor for a $1.6 billion fund called Quadrangle Group. It was just my third year out of college and I made a little over $250,000. For a Brazilian immigrant who spent most of his childhood kind of worried he would have to do physica...

   Start,Company,Creative,Innovation,Techno     2011-08-16 08:38:35

  JavaScript cross domain request solution

1. What is cross domain? We may often using AJAX to request data from other domain, now we will have cross domain request issues. It's because JavaScript only allows to request data from the same domain because of security consideration. In short, same domain strategy means a piece of code can read data from the same source, the same source here means the combination of the same domain, protocol and port number. For example: URLDescriptionAllow communication? http://www.a.com/a.js http:/...

   AJAX,cross domain,security     2013-03-13 20:04:52

  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

  Reproduce "MySQL server has gone away" in PHP

If you want to debug the issue of "MySQL server has gone away", you can reproduce it with below steps: Modify configuration file: sudo vi /etc/mysql/my.cnf  Make below changes: [mysqld]   wait_timeout = 30   interactive_timeout = 30  Restart the service: sudo /etc/init.d/mysql restart  Write below PHP codes: $link = mysql_connect('127.0.0.1', 'root', 'root');   if (!$link)&nbs...

   MySQL,debug,rMySQL server has gone away     2013-04-15 11:33:14

  How to upload file to FTP server using C# Asp.Net

This post is about uploading files to FTP server in asp.net development. You will learn step-by-step to upload files programmatically to FTP web server. All the examples shared in this post are intended by professionals to make you learn about the subject Here, I will explain you an example of Uploading Files to FTP Server programmatically in C#.Net. Using this approach, the Files will be programmatically uploaded to FTP Web Server. For example, I will create a function in which we will simply p...

   ASP.NET,DEVELOPMENT     2016-06-24 08:45:37