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
EXPLAIN ANALYZE | |
SELECT COUNT(*) FROM j_msg | |
Row QUERY PLAN | |
1 Aggregate (cost=1360105.49..1360105.50 rows=1 width=0) (actual time=140042.984..140042.985 rows=1 loops=1) | |
2 -> Seq Scan on j_msg (cost=0.00..1318772.99 rows=16532999 width=0) (actual time=8.377..137051.294 rows=16532999 loops=1) | |
3 Total runtime: 140057.576 ms | |
==== |
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
<?php | |
$searchURL = "http://services.runescape.com/m=hiscore/overall.ws"; | |
$perPage = 22; | |
$namesToReturn = 1; | |
for ($index = 1; $index <= $namesToReturn; $index++) | |
{ | |
// $search = rand(1, 500000); |
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 Item | |
attr_accessor :name, :odds | |
def initialize(name, odds) | |
@name = name | |
@odds = odds | |
end | |
end | |
class Dice |
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
<html> | |
<head> | |
<title>JS Key Example</title> | |
<script type="text/javascript"> | |
addEventListener("keydown", function (e) { | |
var output = document.getElementById('output'); | |
if (e.keyCode == 37) { | |
output.innerHTML = "You pressed left." | |
} |
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
EXPLAIN ANALYZE | |
SELECT | |
COUNT(*) | |
FROM jivemessage | |
Row QUERY PLAN | |
1 Aggregate (cost=1085701.27..1085701.28 rows=1 width=0) (actual time=111295.699..111295.699 rows=1 loops=1) | |
2 -> Seq Scan on jivemessage (cost=0.00..1052949.61 rows=13100661 width=0) (actual time=10.628..108926.771 rows=13100661 loops=1) | |
3 Total runtime: 111295.761 ms |
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 'rubygems' | |
require 'open-uri' | |
require 'plist' | |
require 'hpricot' | |
variables_path = "#{ENV['HOME']}/Library/Application Support/Soulver/Variables.plist" | |
items = { | |
1391 => "Battlestaff", | |
573 => "Air orb", |
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 'runescape' | |
days = 1 | |
amount_per_day = 64 | |
ge_limit_per_day = 600 | |
bstaff_shop_cost = 7000 | |
bstaff_alch_amt = 9300 | |
battlestaff = Runescape::Item.new(1391) |
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 'ge' | |
player_name = "Firblitz" | |
blue_charms = 401 | |
crimson_charms = 3510 | |
green_charms = 1971 | |
gold_charms = 4124 | |
shards = 44562 |
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 'rubygems' | |
require 'irb/ext/save-history' | |
IRB.conf[:SAVE_HISTORY] = 100 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
IRB.conf[:AUTO_INDENT] = true | |
IRB.conf[:PROMPT_MODE] = :SIMPLE | |
begin |
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
SELECT | |
CAST(COALESCE(trans_online.headcount,0) + ((COALESCE(class_online.headcount,0) - (COALESCE(class_online.headcount,0) * COALESCE(nesting.nesting_percent,0)))) AS DECIMAL(6,2)) headcount | |
FROM training_classes | |
JOIN weeks | |
LEFT JOIN (SELECT x.training_class_id, y.start_on online_week, z.headcount FROM (SELECT a.training_class_id, MAX(b.start_on) start_on FROM training_class_forecasts a JOIN weeks b ON a.week_id = b.id WHERE a.headcount > 0 GROUP BY a.training_class_id) x JOIN weeks y ON x.start_on = y.start_on JOIN training_class_forecasts z ON x.training_class_id = z.training_class_id AND y.id = z.week_id) class_online ON class_online.training_class_id = training_classes.id AND training_classes.transition = 0 AND class_online.online_week = weeks.start_on - INTERVAL 7 DAY | |
LEFT JOIN (SELECT x.training_class_id, y.start_on online_week, z.headcount FROM (SELECT a.training_class_id, MAX(b.start_on) start_on FROM training_class_forecasts a JOIN weeks b ON a.week_id = b.id WHERE a.headcount > 0 GROUP BY a.trainin |