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
| function setupAjaxSearch() { | |
| var req = null; | |
| var $resultdiv = $('div.results'); | |
| var $searchbox = $('input.search'); | |
| function doSearch(value) { | |
| if (req != null) req.abort(); | |
| req = $.ajax({ | |
| type: "GET", |
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
| import copy | |
| class MyClass(object): | |
| def __init__(self, x): | |
| self.x = x | |
| def __getattr__(self, name): | |
| if name == 'plus_one': | |
| newself = copy.copy(self) | |
| newself.x += 1 |
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
| def copy(self, **kwargs): | |
| kwargs['base_image_name'] = kwargs['base_image_name'] or self.base_image_name | |
| kwargs['format'] = kwargs['format'] or self.format | |
| kwargs['size'] = kwargs['size'] or self.size | |
| kwargs['is_temp'] = kwargs['is_temp'] or self.is_temp | |
| newimage = Image(**kwargs) |
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 Modules] | |
| bcmath | |
| bz2 | |
| calendar | |
| Core | |
| ctype | |
| curl | |
| date | |
| dba | |
| dom |
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 | |
| var_dump($_FILES); | |
| if(isset($_FILES["uploadedfile"]) && $_FILES["uploadedfile"]["size"] > 0) { | |
| $target_path = 'marketing/'; | |
| $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); | |
| if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { | |
| echo "<p>The file ". basename( $_FILES['uploadedfile']['name']). | |
| " has been uploaded</p>"; |
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 | |
| $data = json_decode(file_get_contents("http://www.gw2spidy.com/api/v0.9/json/all-items/all"), true); | |
| foreach ($data as $item) { | |
| var_dump($item['name'], $item['min_sale_unit_price']); | |
| } | |
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
| April 20 of YR1 Tiger Team (8:10) has declared WAR with our kingdom! | |
| April 20 of YR1 XxCyCLonEx (8:10) invaded The Dutchies (9:15) and captured 168 acres of land. | |
| April 20 of YR1 Tannerville (8:10) invaded Blue Unicorns (9:15) and captured 62 acres of land. | |
| April 20 of YR1 Ysuelt (8:10) attacked and pillaged the lands of Spud (9:15). | |
| April 20 of YR1 Our monarch feels that this glorious kingdom is tarnished by the abandoned province of Spud. They order it destroyed and erased from our history books. | |
| April 20 of YR1 Saiko (9:15) captured 90 acres of land from FairWinds_CalmSeas (8:10). | |
| April 20 of YR1 Ysuelt (8:10) invaded Bad feelings (9:15) and captured 50 acres of land. | |
| April 21 of YR1 beGoodi (9:15) captured 58 acres of land from The Mile High City (8:10). | |
| April 21 of YR1 FairWinds_CalmSeas (8:10) ambushed armies from Anthelion (9:15) and took 53 acres of land. | |
| April 21 of YR1 FairWinds_CalmSeas (8:10) ambushed armies from Saiko (9:15) and took 45 acres of land. |
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 | |
| ini_set('max_execution_time', 0); | |
| class GW2SpidyDataset { | |
| protected $data; | |
| public function getItemById($id) { | |
| if (!$this->data) { | |
| $this->getData(); |
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
| June 1 of YR2 Thera has sent an aid shipment to XxCyCLonEx. | |
| June 1 of YR2 Thera has sent an aid shipment to XxCyCLonEx. | |
| June 1 of YR2 Thera has sent an aid shipment to XxCyCLonEx. | |
| June 1 of YR2 Thera has sent an aid shipment to IhaveNothingtodoWithit. | |
| June 2 of YR2 Deads Marshes (3:3) attacked and pillaged the lands of DeathsDoor (8:10). | |
| June 2 of YR2 Crazy88 (3:3) attacked and stole from The Mile High City (8:10). | |
| June 2 of YR2 Temple of the Gods (3:3) invaded The Mile High City (8:10) and captured 26 acres of land. | |
| June 2 of YR2 Temple of the Gods (3:3) invaded The Mile High City (8:10) and killed 394 people. | |
| June 3 of YR2 Charger (8:10) recaptured 48 acres of land from ToMaTo (3:3). | |
| June 3 of YR2 An unknown province from Double hostile - STFO (3:3) attacked and stole from VisualDreams (8:10). |