This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # From http://stackoverflow.com/questions/7027288/error-could-not-find-function-in-r | |
| help.search("some.function") | |
| ??some.function | |
| RSiteSearch("some.function") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://stackoverflow.com/questions/9860090/in-r-why-is-better-than-subset | |
| subset(airquality, Month == 8 & Temp > 90) | |
| airquality[airquality$Month == 8 & airquality$Temp > 90, ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://stackoverflow.com/questions/17079513/hdfs-replication-factor-change | |
| hadoop fs -setrep -R 2 / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\Directory\shell\runas] | |
| @="Open Command Window Here as Administrator" | |
| [HKEY_CLASSES_ROOT\Directory\shell\runas\command] | |
| @="cmd.exe /s /k pushd \"%V\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- http://stackoverflow.com/questions/898688/how-to-get-database-structure-in-mysql-via-query | |
| DESCRIBE table; | |
| SHOW TABLES; | |
| SHOW TABLES LIKE '%filter%' | |
| -- print create table query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.joda.time.* | |
| a = new DateTime() | |
| println(a.getMillis()) | |
| println(new Date()) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## create a local repo and commit it to github account | |
| ## http://stackoverflow.com/questions/2423777/is-it-possible-to-create-a-remote-repo-on-github-from-the-cli-without-ssh | |
| mkdir projectname | |
| cd projectname | |
| git init | |
| touch file1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## From http://askubuntu.com/questions/18372/how-can-i-find-out-what-ram-a-computer-system-has | |
| ## find hardware info | |
| sudo dmidecode -t memory ## RAM info | |
| ## http://askubuntu.com/questions/146621/what-is-the-equivalent-of-windows-system-properties-or-device-manager | |
| lshw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- From http://dba.stackexchange.com/questions/6031/how-do-you-kick-users-out-of-a-sql-server-2008-database | |
| -- hit Ctrl+Shift+M in SSMS to fill in the template parameter | |
| USE master; | |
| GO | |
| ALTER DATABASE N'<Database Name, sysname,>' | |
| SET SINGLE_USER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- From http://stackoverflow.com/questions/5452760/truncate-foreign-key-constrained-table | |
| SET FOREIGN_KEY_CHECKS=0; | |
| TRUNCATE table1; | |
| TRUNCATE table2; | |
| SET FOREIGN_KEY_CHECKS=1; |