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
| 0x518BC8e39Fb0288Bf84c699579ce1D0cF7bEaa7D |
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
| 0x3BF0C38e8cfA6ba2463BeEeEb6605c15BC918425 |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>NodeJS - Task 2</title> | |
| <meta charset="UTF-8"> | |
| <style> | |
| body { margin: 0px; } | |
| #tripio { background-color: #f1f1f1; } | |
| </style> | |
| </head> |
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 beerAndFries(items) | |
| { | |
| var beers = [], fries = [], score = 0; | |
| for (var x in items) | |
| { | |
| if (items[x].type === 'beer') | |
| beers.push(items[x].score); | |
| else | |
| fries.push(items[x].score); | |
| } |
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 | |
| /** | |
| * This file contains PHP classes that can be used to crypt/decrypt strings. | |
| * The encryption/decryption method is based on the Caesar cihper. | |
| * | |
| * (C) 2013 Anton Georgiev (http://github.com/angeorg/). All rights reserved. | |
| * This work is licensed under a Creative Commons Attribution 3.0 Unported License. | |
| * To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ | |
| */ | |
| interface MarcActions |
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 | |
| class QueryWorker extends Worker | |
| { | |
| public $numbers; | |
| public $numbers_per_query = 10; | |
| public function write_action($job) | |
| { | |
| $this->numbers[] = $job->workload(); |
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 | |
| class Worker | |
| { | |
| public function __construct($host, $port) | |
| { | |
| $this->worker = new GearmanWorker(); | |
| $this->worker->addServer($host, $port); | |
| echo 'Waiting for work...' . PHP_EOL; | |
| } |
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
| #!/bin/bash | |
| big_file="big.txt" | |
| # Create folders if they don't exist | |
| mkdir -p parts/ sorted/ | |
| # Split the file into pieces, 5 MB each |
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
| galileo = new Object(); | |
| galileo.points = new Array(); | |
| galileo.lines = new Array(); | |
| galileo.add_point = function(x, y) | |
| { | |
| this.points.push({'x': x, 'y': y}); | |
| } |