Пример #1
0
function make_test_case($ellipse_frac)
{
    $case = null;
    $case->have_ellipse = drand() < $ellipse_frac;
    if ($case->have_ellipse) {
        $case->cx = rand(50, 550);
        $case->cy = rand(50, 350);
        $case->w = rand(50, 100);
        $case->h = rand(50, 100);
    }
    return $case;
}
Пример #2
0
$words = array("input", "complemental", "makeshifty", "apagogical", "rindle", "unthreshed", "tailed", "azox", "agaricine", "underhistory", "excretes", "anthracia", "rathite", "atrabiliarious", "unregardant", "keratitis", "entotic", "revindicate", "concomitancy", "innermostly", "dentinoma", "Neobalaena", "summerly", "supervexation", "laconizer", "interbody", "paracmasis", "cumulus", "turbodynamo", "noneducable", "sulfocarbolic", "dodded", "chronometry", "Pelagianizer", "Lycopersicon", "hydrencephalocele", "pennyweight", "trowth", "puzzledom", "extinctor", "unphosphatized", "phytiform", "solitidal", "epiclinal", "quiescency", "fettler", "manerial", "catarrhal", "maney", "celebrator", "chrematist", "charadrioid", "forechase", "consequently", "archduchess", "mycoderm", "sepicolous", "caesaropapism", "subact", "setigerous", "protoconulid", "actinomycoma", "unstain", "incomposed", "oenomel", "quinquepartite", "conjointly", "prescrive", "floressence", "divulge", "controllership", "bloodthirstiness", "xantholeucophore", "ashery", "redundant", "hygroplasma", "transferring", "triduan", "Atlantid", "laxism", "undomestic", "amarantaceous", "erika", "unentering", "unentrance", "whafabout", "tomboyishly", "Orthorrhapha", "aegyrite", "ricinoleic", "dialin", "tendrillar", "Spongiidae", "swarajist", "partialistic", "picryl", "Sriram", "nephelinic", "monosulphide", "hypotrichosis", "lubricational", "cacogeusia", "unmanicured", "purgative", "Christmasberry", "canonship", "myelasthenia", "untrolled", "neuroepithelium", "superindifferent", "kirkward", "Parsiism", "hepatic", "glack", "basilyst", "corymbose", "mixtilion", "heterodontoid", "agal", "Tanyoan", "metheglin", "gristmilling", "thaumatolatry", "postcentral", "hypnone", "forepossessed", "nakedish", "breediness", "salpingion", "mammogenic", "agendum", "disinter", "turbanless", "disproof", "extrinsicality", "paraphysiferous", "adaptionism", "upwards", "citified", "Peter", "Aquarian", "Pennales", "conversable", "photomicroscope", "shipwreck", "boroughship", "chirurgery", "abandoned", "spectaclemaker", "aristocrat", "mazard", "huarizo", "tapeinocephaly", "enterokinase", "birthmark", "pitometer", "outspell", "Tammanyism", "sixpence", "stuporific", "pic", "Andrea", "milliphot", "sherify", "satirizer", "gemmiparous", "sneezing", "bare", "unfound", "syntechnic", "replication", "preobviate", "invertin", "fulguration", "concussion", "interparliamentary", "humidor", "goitered", "hostileness", "polyandrist", "chalaze", "peeved", "tempesty", "divinely", "superhistoric", "forewoman", "inexpugnable", "unadvantaged", "triseriate", "stercoricolous", "ambassy", "mussitation", "nomarthral", "unsatisfied", "zigzagger", "nursedom", "exploitage", "insure", "alemana", "palma", "mnemonize", "substrative", "Jelske", "vang", "Pyrosoma", "curvifoliate", "Sarcodina", "anapnoic", "shoreside", "malattress", "beefsteak", "grabbler", "proudness", "syntactical", "communitary", "conkanee", "frequentable", "ingenuity", "roker", "pyralidid", "chant", "sneerless", "rune", "cuprite", "pendragonish", "unreposeful", "Orochon", "eyehole", "microelectrolysis", "allanturic", "thionobenzoic", "shoestring", "nidget", "directory", "araneology", "glyphographic", "daintith", "gropple", "degressively", "vasculiform", "mordant", "pseudomasculine", "terrification", "fibroin", "vavasory", "gumfield", "constablewick", "whence", "distinctively", "compliableness", "bridgeboard", "plicator", "subindicate", "vility", "vetust", "subcineritious", "marbles", "kataphoresis", "gripsack", "unexternality", "milking", "Gullah", "uninserted", "trabucho", "unadoring", "butterless", "slugabed", "hemiparalysis", "stimulogenous", "flaggy", "archaical", "etymography", "iridoceratitic", "precomplication", "huckle", "diplostichous", "cholecystectomy", "tossicated", "tetraonine", "parabolanus", "tabularium", "Bedouin", "fumistery", "Podunk", "biod", "philadelphy", "exciting", "misobedience", "dolichosaur", "intraxylary", "paganism", "niggly", "schizoid", "Moronidae", "tacuacine", "glauberite", "bluffer", "unsalableness", "slopeness", "metamer", "prescribe", "enterectomy", "diethanolamine", "militantly", "nonharmonious", "aurore", "Liparian", "chilblain", "doggess", "southwesternmost", "coelian", "Atherosperma", "upcrane", "spectromicroscope", "awa", "halitus", "reinvestigation", "clearedness", "mannerless", "demure", "travertine", "planispherical", "sphery", "mechanality", "initiatress", "Tabloid", "semiforbidding", "hematinuria", "clavariaceous", "adenophyma", "ornithocoprolite", "bibliograph", "censurably", "folkway", "litiscontest", "preconcert", "seriately", "tannin", "crescent", "radioscopical", "rinner", "monosymmetric", "dement", "supersulphureted", "Hydrocorallia", "nonsilver", "homecrofter", "overbend", "overroughness", "gallybeggar", "unarch", "nearable", "snapps", "purpuriparous", "uninquisitorial", "marginal", "nonelectrical", "anthropobiology", "megohmit", "papey", "stereoisomer", "groover", "unlawlike", "Sphyrnidae", "fissuration", "spadrone", "creepered", "okia", "subalary", "germinate", "altin", "chevage", "pondering", "xenolite", "stero", "predicative", "nickeltype", "Sphenopteris", "autoplastic", "crooken", "doucine", "astoundingly", "prothonotaryship", "chymase", "stercorite", "Islamitic", "cruster", "biota", "psychomorphic", "rotgut", "unforeign", "oxlike", "Sigmodontes", "skag", "conterminal", "Jacques", "omnibenevolence", "Camorrista", "antwise", "bialate", "rodomontadist", "superaltar", "abkari", "perionyxis", "ardoise", "romanceproof", "Cebidae", "mydriasine", "Chaetites", "haymaking", "ochlophobia", "riley", "unailing", "illusiveness", "subdialect", "backjaw", "orihon", "awardment", "drawee", "mathematically", "antidiphtheritic", "kilo", "utricul", "Teiidae", "greffotome", "Ghedda", "phylactery", "unaccrued", "anencephalia", "mythoclastic", "exactive", "advocateship", "unstyled", "pentathionic", "sampi", "fourscore", "epistome", "scaffle", "vitrescency", "shawlwise", "dansant", "hexamerism", "polysyndetically", "narcotine", "ketone", "unhushing", "lictor", "pantoglossical", "effervescency", "impling", "Mohammedanize", "electrochemist", "resin", "histochemical", "innascibility", "Alcalzar", "unelongated", "unconstantly", "spirantize", "negrine", "moonsail", "brilliant", "disquisitive", "phrasemonger", "aryepiglottic", "yokefellow", "interacademic", "aerotherapy", "Rotary", "Tridacna", "cosonant", "cometwise", "aphyric", "media", "adsorbable", "unbewailed", "lench", "photo", "Indogaea", "belage", "Arcifera", "rubific", "subventive", "unarrogance", "chimneyman", "salientian", "degustation", "honeycombed", "granadillo", "myeloplegia", "toscanite", "rebeldom", "Tumion", "beggarer", "Emarginula", "veratrinize", "bowels", "felting", "bunyah", "backfield");
define("DB_DRIVER", "mysql");
define("DB_SERVER", "localhost");
define("DB_PORT", 3306);
define("DB_NAME", "nline_devel");
define("DB_PEOPLE_TABLE", "people");
define("DB_FOOD_TABLE", "food_venues");
$dbh = new PDO(DB_DRIVER . ":host=" . DB_SERVER . ";port=" . DB_PORT . ";dbname=" . DB_NAME, "root", "Googlesquirt1985");
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$i = 0;
while ($i < 100000) {
    $stmt = $dbh->prepare("INSERT INTO `food_venues` (`FOOD_VENUES_ID`, `FOOD_VENUES_NAME`, `FOOD_VENUES_PIC_LOC`, `FOOD_VENUES_FORMATTED_ADDR`, `FOOD_VENUES_LAT`, `FOOD_VENUES_LNG`, `FOOD_VENUES_URL`, `FOOD_VENUES_COVER_IMG_LOC`, `FOOD_VENUES_TEL`, `FOOD_VENUES_EMAIL`, `FOOD_VENUES_WEBSITE`, `FOOD_VENUES_BLURB`, `FOOD_VENUES_COLOR`) VALUES (NULL, :FOOD_VENUES_NAME, :FOOD_VENUES_PIC_LOC, 'This is an addr', :FOOD_VENUES_LAT, :FOOD_VENUES_LNG, :FOOD_VENUES_URL, 'a:4:{i:0;a:5:{s:3:\"img\";s:19:\"bistro-uniq-1/a.jpg\";s:12:\"show_caption\";b:1;s:5:\"align\";s:5:\"right\";s:6:\"header\";s:9:\"cranapple\";s:6:\"slogan\";s:1:\"a\";}i:1;a:2:{s:3:\"img\";s:19:\"bistro-uniq-1/b.png\";s:12:\"show_caption\";b:0;}i:2;a:5:{s:3:\"img\";s:19:\"bistro-uniq-1/c.gif\";s:12:\"show_caption\";b:1;s:5:\"align\";s:6:\"center\";s:6:\"header\";s:15:\"Yeee big header\";s:6:\"slogan\";s:1:\"b\";}i:3;a:5:{s:3:\"img\";s:19:\"bistro-uniq-1/a.jpg\";s:12:\"show_caption\";b:1;s:5:\"align\";s:4:\"left\";s:6:\"header\";s:6:\"aasruy\";s:6:\"slogan\";s:5:\"teeny\";}}', NULL, NULL, NULL, :FOOD_VENUES_BLURB, :FOOD_VENUES_COLOR)");
    $a = $words[array_rand($words)] . " " . $words[array_rand($words)];
    $stmt->bindParam(":FOOD_VENUES_NAME", $a);
    $b = "sample/" . rand(1, 360) . ".png";
    $stmt->bindParam(":FOOD_VENUES_PIC_LOC", $b);
    $c = drand(3040000, 4740000) / 100000;
    $stmt->bindParam(":FOOD_VENUES_LAT", $c);
    $d = drand(-12330000, -6730000) / 100000;
    $stmt->bindParam(":FOOD_VENUES_LNG", $d);
    $e = $words[array_rand($words)] . " " . $words[array_rand($words)] . " " . $words[array_rand($words)] . " " . $words[array_rand($words)] . " " . $words[array_rand($words)] . " " . $words[array_rand($words)] . " " . $words[array_rand($words)] . " " . $words[array_rand($words)];
    $stmt->bindParam(":FOOD_VENUES_BLURB", $e);
    $f = generateRandomString(40);
    $stmt->bindParam(":FOOD_VENUES_URL", $f);
    $aa = array("black", "blue-grey", "blue", "brown", "cyan", "deep-purple", "green", "indigo", "light-blue", "light-green", "lime", "orange", "pink", "purple", "red", "red-d4", "teal", "yellow");
    $g = $aa[array_rand($aa)];
    $stmt->bindParam(":FOOD_VENUES_COLOR", $g);
    $stmt->execute();
    $i++;
    echo $i . "\n";
}