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
package main | |
import ( | |
"fmt" | |
"strconv" | |
"github.com/axiomhq/hyperloglog" | |
"github.com/c2h5oh/datasize" | |
) |
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
//motor A connected between A01 and A02 | |
//motor B connected between B01 and B02 | |
int STBY = 10; //standby | |
//Motor A | |
int PWMA = 3; //Speed control | |
int AIN1 = 9; //Direction | |
int AIN2 = 8; //Direction |
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 | |
$start = microtime(true); | |
$first = 0; | |
$second = 1; | |
$n = 10000000; | |
for($i=1;$i<=$n-1;$i++) | |
{ |
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
#!/usr/bin/env php | |
<?php | |
/** | |
* CSV files splitter | |
* @author [email protected] | |
*/ | |
// helpers functions | |
$stderr = function ($message) { |
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
var jq = document.createElement('script');jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(jq); | |
// Returns interval between next keywords suggestions download | |
// return value must be seconds (int) | |
// defaults: 15-30 seconds | |
var phraseInterval = function(){ | |
return ( Math.random + 1 ) * 15; | |
}; | |
var suggestedKeywordsOffset = 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 | |
$configString = 'opcja1 wartość; | |
opcja2 wartość; | |
blok1 { | |
opcja3 wartość; | |
opcja4 wartość; | |
blok1.1 { | |
opcja5 wartość; |
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
INSERT INTO `cataloginventory_stock_item` ( | |
`item_id` , | |
`product_id` , | |
`stock_id` , | |
`qty` , | |
`min_qty` , | |
`use_config_min_qty` , | |
`is_qty_decimal` , | |
`backorders` , | |
`use_config_backorders` , |
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 calculateThumbnailDimensions( $dim, $max ) | |
{ | |
$more = max( $dim ); | |
$more_max = $max[ end( array_keys($dim, $more) ) ]; | |
$scale = $more_max / $more; |
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 | |
$options = array(); | |
$arguments = array(); | |
array_shift( $argv ); | |
foreach ( $argv as $arg ) | |
{ | |
if ( $arg[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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
var takeDir = false | |
var haveTurn = true; |
NewerOlder