IQ: items in list-1 but not in list-2 (JS)

The following code demonstrates an operation on lists.It accepts 2 lists, and prints the values of items present in the first list, but not in the other.It uses Javascript built-in hash table implementation (built into all objects).The code includes other functions to function listDiff(list1, list2){ var hash={}; // This is … Continue reading

make introduction

(Makefile (make) tutorial – part 1 based on the GNU make manual) When we have a large project, compiling all modules can take a lot of time.From the manual:“The make utility automatically determines which pieces of a large program need to be recompiled, and issues commands to recompile them.” Make … Continue reading

what is my linux system?

What linux type am I running? What is my host name? In systems that use systemd, it is easy. Just use the hostnamectl command: linux> hostname yuval-Lenovo-G510 linux> hostnamectl Static hostname: yuval-Lenovo-G510 Icon name: computer-laptop Chassis: laptop Machine ID: c811090bea744c87969c773662753a37 Boot ID: 245ac2c4a50442b6af159e2329c06fa3 Operating System: Ubuntu 18.10 Kernel: Linux 4.18.0-25-generic … Continue reading

python interview questions

The following questions are all based in Python 3. Explanations are short, so you may have to read further if you don’t understand the answer. 1.What will the following code print ? Explain your answer. x=100 def outer(): def inner(): global x x=9 print(“inner x: “, x) x=15 inner() print(“outer … Continue reading