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

SEARCH KEYWORD -- implementation



  Gcd Algorithm with JavaScript

How to find the greatest common divisor between two integers? We may encounter this problem frequently in interviews or other occasions. An efficient metho to find gcd is the Euclidean algorithm, which uses the division algorithm in combination with the observation that the gcd of two numbers also divides their difference: divide 48 by 18 to get a quotient of 2 and a remainder of 12. Then divide 18 by 12 to get a quotient of 1 and a remainder of 6. Then divide 12 by 6 to get...

   JavaScript,Algorithm,Gcd,Implementation,     2011-09-21 15:57:32

  Application vs Database Programming

A few years ago, I had a problem.  A database routine for processing bulk payments for LedgerSMB that was humming along in my test cases was failing when tested under load with real data prior to implementation.  Some testing showed that while it ran fine with small numbers of inputs, it eventually slowed way down as the number of inputs rose.  Andrew Sullivan, who was also on the project through a different company, suggested it was something called a "cache miss" because I...

   Application Programming,Database programming,Comparison,Difference     2012-03-04 12:08:35

  About tmpfs

tmpfs is another confusing name in Linux kernel, its implementation is in mm/shmem.c, shmem has no relation to tmpfs at first glance although we know tmpfs is based on memory. We can understand why we use this name by seeing where this is used. In a desktop Linux system, tmpfs is loaded usually: % grep tmpfs /proc/mountsdevtmpfs /dev devtmpfs rw,seclabel,nosuid,relatime,size=1958956k,nr_inodes=489739,mode=755 0 0tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev,relatime 0 0tmpfs /run tmpfs rw,seclab...

   tmpfs,Linux,file system     2013-06-14 12:10:56

  What drives the popularity of Node.js?

JavaScript is a programming language which can be used on both front end and back end. Its popularity should mainly be attributed to its power in front end side. While people seem not realize its power in back end until the appearance of Node.js.  Node.js is a server-side software system designed for writing scalable Internet applications, notably web servers. Programs are written on the server side in JavaScript, using event-driven, asynchronous...

   Node.ks,Popularity,NPM     2013-07-24 01:22:58

  What has Google done on improving programming languages

Google is now becoming the most innovative IT company in the world. Every now and then they would deliver one revolutionary product to us such as Google Glass, Google Fiber, Automatic Mobile Cars etc. All these great products are backed up by the powerful software system built into. Google has used many programming languages to develop these software and they have put much resource in improving the programming languages they use and we use today. What has Google done in improving programming lan...

   Google,Programming     2014-02-21 09:36:34

  Kubernetes: Docker out

Recently,The hottest news in the Kubernetes circle that docker will be deprecated has been confirmed by the release of 1.20. Docker support in the Kubelet is now deprecated and will be removed in a future release. The Kubelet uses a module called “dockershim” which implements CRI support for Docker and it has seen maintenance issues in the Kubernetes community. We encourage you to evaluate moving to a container runtime that is a full-fledged implementation of CRI (v1alpha1 or v...

   DOCKERSHIM,DOCKER,KUBERNETES     2020-12-19 21:10:21

  errGroup in GoLang explained

Today, let's talk about the usage and applicable scenarios of errGroup, which is often used. Why is it useful? Generally, when we use goroutine, we cannot return a value. If you want to pass out the result of the goroutine execution, you usually have to use the channel. The errGroup package is suitable if you want to know when the goroutine you opened encounters an error during execution and stop working, and I need to know the error value. errGroup usage The package needs to be downloaded and i...

   GOLANG,ERRGROUP,WAITHROUP,CONCURRENCY     2023-05-27 23:58:20

  How Many C Programs Are There?

If I choose a size S, can you tell me how many valid C programs exist that are no larger than that size? I’m actually interested in the answer — it’ll help me make a point in a paper I’m writing. Shockingly, the Internet (or at least, the part of it that I looked at based on a few searches) does not provide a good answer. Let’s start with a few premises: Since it would be exceedingly difficult to construct the exact answer, we’re looking for a respe...

   C Progra,Number,Statistic,Calculation     2012-02-22 05:18:32

  Go vs C benchmark. Could Go be faster than C?

During last semester I was attending Multiprocessor Architectures course, given at Facultad de Informática where I study my Computer Science degree. As part of the assignments due to pass the course, we had to do several programs written in C to benchmark matrix multiplication by testing different techniques and technologies. First of all we had to do a secuential program in three different versions: A normal one where the result matrix is ordered by rows and the loops range the matrix by ...

   Gp,C,Benchmark,Faster,Speed,Comparison     2012-02-08 10:09:07

  Why accessing Java HashMap may cause infinite loop in concurrent environment

HashMap in Java is frequently used to handle key/value pairs. But it is not a good candidate to be used in concurrent environment where ConcurrentHashMap should be used instead. If used in concurrent environment, it may cause lots of unexpected behavior even including make the program getting into an infinite loop situation. To understand how this can happen, let's first discuss how HaspMap works internally. In this post we will use implementation of HashMap before Java 8 as example, Java 8 prov...

   JAVA,HASHMAP,INFINITE LOOP     2020-03-29 01:47:00