To uninstall Node.js on Windows, use Add or Remove Programs like this:
Open Add or Remove Programs from the start menu.
Search for Node.js.
Windows 10:
Click Node.js.
Click Uninstall.
Click the new Uninstall button.
Windows 7-8.1:
Click the Uninstall button under Node.js.
ALTER TABLE foo ENGINE=InnoDB;
This converts the table, but does not take care of any differences between the engines. Most differences will not matter, especially for small tables. But for busier tables, other considerations should be considered. Conversion considerations
A branch is just a pointer to a commit, so you can freely move it around. To make it so that the branch is referring to the commit aabbcc, issue the command
git reset --hard aabbcc
Please note that this will overwrite your branch's current commit, and as so, its entire history. You might loose s...
section .data
msg db "Hello world!",10 ; 10 is the ASCII code for a new line (LF)
section .text
global _start
_start:
mov rax, 1
mov rdi, 1
mov rsi, msg
mov rdx, 13
syscall
mov rax, 60
mov rdi, 0
syscall
If you want to e...
You can update multiple columns in a table in the same statement, separating col=val pairs with commas:
UPDATE person
SET country = 'USA',
state = 'NY'
WHERE city = 'New York';
You can also update data in a table based on data from another table:
UPDATE person
SET state_code = cities.state_code
FROM cities
WHERE cities.city = city;
Here we are joining the person city column to the cities city column in order to get the city's state code. This is then used to updat...
Everything in .NET is an object, hence every type has ToString() method defined in Object class which can be overridden. Default implementation of this method just returns the name of the type:
public class Foo
{
}
var foo = new Foo();
Console.WriteLine(foo); // outputs Foo
ToString() is i...
Using GNU grep
grep -r 'pattern' <directory path>
To also list line numbers of matches use -n option
grep -rn 'pattern' <directory path>
To search only files with particular glob pattern
grep --include='*.txt' -r 'pattern' <directory path>
Exclude file patterns or direc...
Say we are working on a class representing a Person by their first and last names. We have created a basic class to do this and implemented proper equals and hashCode methods.
public class Person {
private final String lastName; //invariant - nonnull
private final String firstName; //in...
The Comparable<T> interface requires one method:
public interface Comparable<T> {
public int compareTo(T other);
}
And the Comparator<T> interface requires one method:
public interface Comparator<T> {
public int compare(T t1, T t2);
}
These two met...
Variables declared inside a function only exist (unless passed) inside that function.
x <- 1
foo <- function(x) {
y <- 3
z <- x + y
return(z)
}
y
Error: object 'y' not found
Variables passed into a function and then reassigned are overwritten, but only insi...
Variables can be assigned globally from any environment using <<-. bar() can now access y.
bar <- function() {
z <- x + y
return(z)
}
foo <- function() {
y <<- 3
z <- bar()
return(z)
}
foo()
4
Global assignment is highly discourag...
Environments in R can be explicitly call and named. Variables can be explicitly assigned and call to or from those environments.
A commonly created environment is one which encloses package:base or a subenvironment within package:base.
e1 <- new.env(parent = baseenv())
e2 <- new.env(parent ...
The on.exit() function is handy for variable clean up if global variables must be assigned.
Some parameters, especially those for graphics, can only be set globally. This small function is common when creating more specialized plots.
new_plot <- function(...) {
old_pars <- par(m...
Functions and objects in different packages may have the same name. The package loaded later will 'mask' the earlier package and a warning message will be printed. When calling the function by name, the function from the most recently loaded package will be run. The earlier function can be accessed ...
Microsoft.CSharp.CSharpCodeProvider can be used to compile C# classes.
var code = @"
public class Abc {
public string Get() { return ""abc""; }
}
";
var options = new CompilerParameters();
options.GenerateExecutable = false;
options.GenerateInMe...