Skip to content

Instantly share code, notes, and snippets.

View lalithr95's full-sized avatar
🎯
Focusing

Lalith Rallabhandi lalithr95

🎯
Focusing
View GitHub Profile
== DrupalSchema: migrating ===================================================
-- table_exists?("comments")
-> 0.0003s
-- create_table("comments", {:primary_key=>"cid", :options=>"ENGINE=MyISAM"})
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: near "ENGINE": syntax error: CREATE TABLE "comments" ("cid" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "pid" integer DEFAULT 0 NOT NULL, "nid" integer DEFAULT 0 NOT NULL, "uid" integer DEFAULT 0 NOT NULL, "subject" varchar(64) DEFAULT '' NOT NULL, "comment" text(2147483647) NOT NULL, "hostname" varchar(128) DEFAULT '' NOT NULL, "timestamp" integer DEFAULT 0 NOT NULL, "status" integer(1) DEFAULT 0 NOT NULL, "format" integer(2) DEFAULT 0 NOT NULL, "thread" varchar(255) NOT NULL, "name" varchar(60), "mail" varchar(64), "homepage" varchar(255)) ENGINE=MyISAM
/Users/Lalith/.rvm/gems/ruby-2.1.2/gems/sqlite3-1.3.11/lib/sqlite3/database.rb:91:in `initialize'
/Users/Lalith/.rvm/gems/ruby-2.1.2/gems/sqlite3
@lalithr95
lalithr95 / integer.rb
Created October 7, 2017 03:31 — forked from pithyless/integer.rb
Ruby Integer::MAX and Integer::MIN
class Integer
N_BYTES = [42].pack('i').size
N_BITS = N_BYTES * 16
MAX = 2 ** (N_BITS - 2) - 1
MIN = -MAX - 1
end
p Integer::MAX #=> 4611686018427387903
p Integer::MAX.class #=> Fixnum
p (Integer::MAX + 1).class #=> Bignum