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
<?php | |
class GEO | |
{ | |
const | |
PI = M_PI, | |
TWOPI = 6.28318530718, | |
DE2RA = 0.01745329252, | |
RA2DE = 57.2957795129, | |
ERAD = 6378.135, |
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
<?php | |
$db = new PDO('sqlite:ai.db'); | |
$db->exec(' | |
CREATE TABLE IF NOT EXISTS | |
phrases | |
( | |
`word` INTEGER, | |
`left` INTEGER, | |
`right` INTEGER, | |
PRIMARY KEY (`word`, `left`, `right`) |
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
CREATE TABLE IF NOT EXISTS | |
words | |
( | |
`id` INTEGER PRIMARY KEY ASC, | |
`word` VARCHAR(45) NOT NULL | |
), INDEX `word` (`word`); |
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
>>> sqlite3 ai.db | |
SQLite version 3.3.6 | |
Enter ".help" for instructions | |
sqlite> select * from words limit 10; | |
1|figured | |
2|out | |
3|issue | |
4|hack | |
5|the | |
6|planet |
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
<?php | |
class phpIBModule extends ModuleCore | |
{ | |
private $db, $wordIdCache; | |
public function getWordId($word) | |
{ | |
$db = $this->db; | |
$word = trim($word); | |
if(!$word) return 0; |
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
<?php | |
function DB($query, $args = NULL, $return = false) { | |
$stmt = DB::prepare($query); | |
if ($args !== NULL && !is_array($args) && func_num_args() == 2) { | |
//support DB(query,return) | |
$return = $args; | |
$args = array(); | |
} | |
if (!is_null($args) && is_array($args)) { |
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
things im working with: | |
Mobile: media="handheld, handheld and (max-device-width: 480px), screen and (max-device-width: 480px)" | |
Non Mobile: media="only screen" | |
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
<?php | |
function DB($query, $args = NULL, $return = false) { | |
$stmt = DB::prepare($query); | |
if ($args !== NULL && !is_array($args) && func_num_args() == 2) { | |
//support DB(query,return) | |
$return = $args; | |
$args = array(); | |
} | |
if (!is_null($args) && is_array($args)) { |
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
Date: 2010-10-12 23:40:22 | |
ID: 55 | |
Error occured in: Global | |
Count: 1 | |
Message: ..\FrameXML\UIDropDownMenu.lua line 558: | |
attempt to index local 'frame' (a nil value) | |
Debug: | |
[C]: ? | |
..\FrameXML\UIDropDownMenu.lua:558: UIDropDownMenu_SetSelectedValue() | |
Auctionator\AuctionatorShop.lua:568: func() |
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
#showtooltip Sinister Strike | |
/console Sound_EnableSFX 0 | |
/startattack | |
/use Bladefist's Breadth | |
/castsequence reset=0/combat/target Sinister Strike,Feint | |
/console Sound_EnableSFX 1 | |
/script UIErrorsFrame:Clear() |