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
| # compiled with: gcc (GCC) 4.7.1 | |
| # $ gcc -O3 -S file.c | |
| # only relevant lines | |
| mod4: | |
| ... | |
| andl $3, %eax | |
| ret | |
| div4: |
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
| WITH Acc AS ( | |
| SELECT s70.ord, | |
| song70Id = s70.songId, | |
| song80Id = s80.songId, | |
| song90Id = s90.songId, | |
| roundTime = s70.songTime + s80.songTime + s90.songTime | |
| FROM (SELECT ord = Row_Number() OVER(ORDER BY songTime DESC), | |
| songId, | |
| songTime | |
| FROM @songList |
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> | |
| <meta charset="utf-8"> | |
| <title>Micro Verificador de Teoremas</title> | |
| <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
| <script> | |
| function MicroVerificador(reglas, consultas) { | |
| var w = ["siempre_que", "no", "y", "o", "implica_que", "cierto", "falso", "(", ")"]; | |
| var clear = function(s){ |
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 MicroVerificador(reglas, consultas) { | |
| var w = ["siempre_que", "no", "y", "o", "implica_que", "cierto", "falso", "(", ")"]; | |
| var clear = function(s){ | |
| return $(s.replace(/\(/g, " ( ").replace(/\)/g, " ) ").split('\n')). | |
| filter(function(){return this.trim() != ""}).get()}; | |
| var r = clear(reglas), c = clear(consultas); | |
| var v = [], S = [], R = []; | |
| $(r.join(' ').split(' ')).each(function () { | |
| var z = this.trim(); | |
| if(z != "" && $.inArray(z, w) < 0 && $.inArray(z, v) < 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
| array_reduce( explode($rowSeparator, $inputString), | |
| function($a, $x) { | |
| global $colSeparator; | |
| $r = explode($colSeparator, $x); | |
| return $a + array(array_shift($r) => $r); | |
| }, array()) | |
| // dado "12,pepe,2012;56,juan,2011" | |
| // devuelve array(12 => array("pepe", 2012), 56 => array("juan", 2011)) |
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
| qsort (p:xs) = qsort [x | x<-xs, x<p] ++ [p] ++ qsort [x | x<-xs, x>=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
| sort = sortBy compare | |
| sortBy cmp = mergeAll . sequences | |
| where | |
| sequences (a:b:xs) | |
| | a `cmp` b == GT = descending b [a] xs | |
| | otherwise = ascending b (a:) xs | |
| sequences xs = [xs] | |
| descending a as (b:bs) | |
| | a `cmp` b == GT = descending b (a:as) bs |
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/perl | |
| use strict; | |
| use bigint; | |
| print "Cache-Control: no-cache\n"; | |
| print "Content-type: text/html\n"; | |
| print "\n"; | |
| my $data = '/ruta/del/archivo/de/datos/agc.dat'; |
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> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
| <title>Anonymous Grid Computing</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
| <script> | |
| // se produce cuando un hilo a acumulado suficientes datos | |
| function RegisterData(msg) { | |
| // mostramos el resultado | |
| $('#PiDigits').html( |
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
| // Calculamos Pi enviando datos cada X tiempo | |
| function Pi(MaxMilliSegs) { | |
| var T, H, t, r = 0; | |
| var rst = function () { | |
| T = H = 0; | |
| t = MaxMilliSegs + ~~new Date(); | |
| }; | |
| rst(); | |
| while(1) { | |
| // para no andar mirando el tiempo |