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
| update politicians set name='Sen. Shereef Bishay' where id=422; |
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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ --> | |
| <!-- Active URL: http://socrates.devbootcamp.com/sql.html --> | |
| <sql> | |
| <datatypes db="mysql"> | |
| <group label="Numeric" color="rgb(238,238,170)"> | |
| <type label="Integer" length="0" sql="INTEGER" re="INT" quote=""/> | |
| <type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/> | |
| <type label="Single precision" length="0" sql="FLOAT" quote=""/> | |
| <type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/> |
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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ --> | |
| <!-- Active URL: http://socrates.devbootcamp.com/sql.html --> | |
| <sql> | |
| <datatypes db="mysql"> | |
| <group label="Numeric" color="rgb(238,238,170)"> | |
| <type label="Integer" length="0" sql="INTEGER" re="INT" quote=""/> | |
| <type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/> | |
| <type label="Single precision" length="0" sql="FLOAT" quote=""/> | |
| <type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/> |
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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <!-- SQL XML created by WWW SQL Designer, http://code.google.com/p/wwwsqldesigner/ --> | |
| <!-- Active URL: http://socrates.devbootcamp.com/sql.html --> | |
| <sql> | |
| <datatypes db="mysql"> | |
| <group label="Numeric" color="rgb(238,238,170)"> | |
| <type label="Integer" length="0" sql="INTEGER" re="INT" quote=""/> | |
| <type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote=""/> | |
| <type label="Single precision" length="0" sql="FLOAT" quote=""/> | |
| <type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote=""/> |
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
| require 'RMagick' | |
| include Magick | |
| def image_reformatting(input_image) | |
| img = Magick::Image.read(input_image)[0] | |
| img.format = "png" | |
| img.write("format.png") | |
| text = Draw.new |
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
| class Hospital | |
| attr_reader :name, :location, :employees, :patients, :admins | |
| def initialize(name, location) | |
| @name, @location, @employees, @patients, @admins = name, location, [], [], [] | |
| end | |
| end |
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
| # run with: ruby switcharoo_test.rb | |
| require 'minitest/autorun' | |
| def switcharoo(string, switch_point, delimiter=false) | |
| if switch_point < 0 | |
| raise "switch_point too small" | |
| elsif switch_point > string.size | |
| raise "switch_point too big" | |
| end |
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
| require 'optparse' | |
| options = {date: false, sort: false, ddate: false, tag: false, prio: false} | |
| optparse = OptionParser.new do|opts| | |
| opts.on("--date") do | |
| options[:date] = true | |
| end | |
| opts.on('--sort') do |
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
| require 'yaml' | |
| class TodoList < Hash | |
| def initialize(file_name) | |
| @file_name = file_name | |
| File.open( @file_name, 'w' ) { |file| YAML.dump( self, file )} | |
| end |
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
| class Hospital | |
| attr_accessor :name, :employees, :patients | |
| def initialize(name, location) | |
| @name, @location, @employees, @patients = name, location, [], [] | |
| end | |
| end | |