- Watch the Derek Wyatt videos in order (at least the “Novice” ones for now): http://derekwyatt.org/vim/tutorials/
- Read “The Problem with Vim”, just to warn you: http://haldean.org/vim-problems/
- Read the first part of this Stack Overflow answer: http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118
- Read “How to Switch to Vim” by David Bryant Copeland (entirely): http://naildrivin5.com/blog/2013/04/24/how-to-switch-to-vim.html
- Read “Coming Home with Vim” by Steve Losh (entirely): http://stevelosh.com/blog/2010/09/coming-home-to-vim/
This file contains 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
def quotes(area,no_color) | |
no_color <= 2 ? color_price = no_color * 10 : color_price = 15 * no_color | |
return (area * 15 + color_price) * 1.15 | |
end | |
puts "10 sqft and 2 color should be 195.5 Actual return #{quotes(10,2)}" | |
puts "10 sqft and 3 color should be 224.25 Actual return #{quotes(10,3)}" |
This file contains 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
def mergsort(arr) | |
return arr if arr.length <= 1 | |
#puts (0..arr.length/2-1) # Left List | |
#puts (arr.length/2..arr.length-1) #Right List | |
leftarray = arr[0..arr.length/2-1] | |
rightarray = arr[arr.length/2..arr.length-1] | |
#middle = arr[arr.length/2-1] | |
#arr.each {|value| value < middle ? leftarray << value : rightarray << value} |
This file contains 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
##Just some after thought, since I am using classes,I could've built all the methods into the class so that it will be easier and will be able to just call like player.verify_ans. but it is okay... | |
require 'colorize' | |
def generate_q(name) | |
#This one takes the string name of player and returns the answer of the problem | |
#Structure of q: num1, num2, operator, result | |
q = [rand(20).to_i,rand(20).to_i,rand(4).to_i,0] | |
case q[2] |
This file contains 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
#Dir Class exercise | |
#Dir.glob returns an array of filenames | |
# | |
puts Dir.glob("../01IO/*").length | |
puts Dir.glob("../01IO/*.rb").join("\n") | |
# | |
#Create 500 files with extension of a,b,c,d,e# | |
fdir = "../01IO/Files/" | |
(1..500).each do |i| |
This file contains 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
require_relative 'animals' | |
describe Animal do | |
before(:each) do | |
@ani = Animal.new({num_legs:4}) | |
end | |
it "has four legs" do | |
expect(@ani.num_legs) == 4 | |
end |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 21 columns, instead of 2. in line 9.
This file contains 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
CAUGHT,DEX#,POKEMON ,FORM,TYPE 1,TYPE 2,ABILITIES 1,ABILITIES 2,HIDDEN ABILITY,EVOLUTION DETAILS,EGG GROUPS,,BASE STATS,,,,,,,OBTAINABLE IN, | |
,,,,,,,,,,EG 1,EG 2,HP,ATK,DEF,SP.ATK,SP.DEF,SPEED,TOTAL,POKEMON XY,POKEMON ORAS | |
,#001,Bulbasaur,-----,Grass,Poison,Overgrow,-----,Chlorophyll,Level Up - 16,Monster,Grass,45,49,49,65,65,45,318,YES,NO | |
,#002,Ivysaur,-----,Grass,Poison,Overgrow,-----,Chlorophyll,Level Up - 32,Monster,Grass,60,62,63,80,80,60,405,YES,NO | |
,#003,Venusaur,-----,Grass,Poison,Overgrow,-----,Chlorophyll,-----,Monster,Grass,80,82,83,100,100,80,525,YES,NO | |
,#003,Venusaur,Mega,Grass,Poison,Thick Fat,-----,-----,-----,-----,-----,80,100,123,122,120,80,625,YES,YES | |
,#004,Charmander,-----,Fire,-----,Blaze,-----,Solar Power,Level Up - 16,Monster,Dragon,39,52,43,60,50,65,309,YES,NO | |
,#005,Charmeleon,-----,Fire,-----,Blaze,-----,Solar Power,Level Up - 36,Monster,Dragon,58,64,58,80,65,80,405,YES,NO | |
,#006,Charizard,-----,Fire,Flying,Blaze,-----,Solar Power,-----,Monster,Dragon,78,84,78,109,85,100,534,YES,NO | |
,#006 |
We can't make this file beautiful and searchable because it's too large.
This file contains 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
ID,Case Number,Date,Block,IUCR,Primary Type,Description,Location Description,Arrest,Domestic,Beat,District,Ward,Community Area,FBI Code,X Coordinate,Y Coordinate,Year,Updated On,Latitude,Longitude,Location | |
10854708,JA159682,09/01/2016 12:00:00 AM,027XX S INDIANA AVE,1153,DECEPTIVE PRACTICE,FINANCIAL IDENTITY THEFT OVER $ 300,RESIDENCE,false,false,0133,001,2,35,11,,,2016,02/20/2017 03:49:59 PM,,, | |
10821133,JA121660,09/01/2016 12:00:00 AM,045XX N BROADWAY,1110,DECEPTIVE PRACTICE,BOGUS CHECK,RESIDENCE,false,false,1913,019,46,3,11,,,2016,01/20/2017 03:50:54 PM,,, | |
10798858,HZ568985,09/01/2016 12:00:00 AM,026XX W 60TH ST,1153,DECEPTIVE PRACTICE,FINANCIAL IDENTITY THEFT OVER $ 300,APARTMENT,false,false,0824,008,16,66,11,,,2016,12/30/2016 03:57:27 PM,,, | |
10784101,HZ552025,09/01/2016 12:00:00 AM,081XX S HARVARD AVE,1753,OFFENSE INVOLVING CHILDREN,SEX ASSLT OF CHILD BY FAM MBR,RESIDENCE,false,true,0622,006,21,44,02,,,2016,12/29/2016 03:52:46 PM,,, | |
10793525,HZ564093,09/01/2016 12:00:00 AM,046XX N BEACON ST,2825,OTHER OFFE |
OlderNewer