-
A problem about JS singleton pattern
function Demo(name) {
this.name = name;
}
var getSingle = function(fn) {
var result;
return function() {
console.log(arguments.length);
return result || (result = fn.apply(this, arguments));
}
};
const aa = new getSingle(D...
-
During the interview, the interviewer has to add a volatile for the singleton class in the multithreaded environment with handwritten on-demand loading.
went to the interview last week, handwritten singleton class
then I handwritten a more commonly used global setting class:
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class Setting {
private ...
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3846b-2c10c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3846b-2c10c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?