setq and defvar in Lisp

There are several ways to introduce variables. DEFVAR and DEFPARAMETER introduce global dynamic variables. DEFVAR optionally sets it to some value, unless it is already defined. DEFPARAMETER sets it always to the provided value. SETQ does not introduce a variable. (defparameter *number-of-processes* 10) (defvar *world* (make-world)) ; the world is made only once. Notice that … Read more

Assign multiple new variables on LHS in a single line

There is a great answer on the Struggling Through Problems Blog This is taken from there, with very minor modifications. USING THE FOLLOWING THREE FUNCTIONS (Plus one for allowing for lists of different sizes) # Generic form ‘%=%’ = function(l, r, …) UseMethod(‘%=%’) # Binary Operator ‘%=%.lbunch’ = function(l, r, …) { Envir = as.environment(-1) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)