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
// Luokat: | |
/* | |
create_key( y, x, version, is_current ) | |
y << 32 | x << 12 | is_current << 10 | version | |
*/ | |
uint64_t create_key( uint32_t y, uint32_t x, uint16_t version, bool is_current ); | |
uint32_t get_row( uint64_t key ); | |
uint32_t get_column( uint64_t key ); |
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
#!/usr/bin/env python | |
import libConstraint as LC | |
solution = LC.Solution() | |
@solution.must_satisfy | |
def no_loops_constraint( params, candidate ): | |
return len( candidate ) == len( set( candidate ) ) |
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
#!/usr/bin/env python | |
import libConstraint as LC | |
solution = LC.Solution() | |
@solution.must_satisfy |
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
public class Sorttaa { | |
public static int sorttaa( int a, int b, int c, int monesko ){ | |
int tmp; | |
if ( a > b ){ | |
tmp = b; | |
b = a; | |
a = tmp; |
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
#!/usr/bin/env pytohn | |
from flask import Flask, request, jsonify, abort | |
import time | |
app = Flask( __name__ ) | |
notes = {} | |
next_note_id = 0 |
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
#!/usr/bin/env python | |
import sys, csv | |
# Checking for cli parametres | |
if len( sys.argv ) < 4: | |
print "Usage: %s input.csv column-label output.csv"%( sys.argv[0] ) | |
sys.exit( 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
<?php | |
function append_log_write( $filename, $parametres ){ | |
// Return FALSE if no parametres given | |
if( count( $parametres ) < 1 ){ | |
return FALSE; | |
} | |
// Timestamp in Zebra Time |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main( int argc, char **argv ){ | |
int i; | |
srand( 22315606 ); rand(); | |
for( i = 0 ; i < 5 ; ++i ){ printf( "%c", 'A' + rand() % 32 ); } | |
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
/* | |
Commands in the virtual machine | |
+ - * / :Pop two numbers from the stack, [add|sub|mul|div] them and push the result back | |
pop :Pops a value from the stack | |
print :Pops a value from the stack and prints it to stdout |
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
## Taa ensin tonne HTTP tai HTTPS blockin sisalle (esim. virtual.conf tai sitten sites-enables/default tms filuun) | |
fastcgi_cache_path /var/cache/nginx | |
levels=1:2 keys_zone=ZONE_KEY_TAHAN:10m | |
inactive=5m; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
# ja taa sitten locationiin |