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/php -q | |
<?php | |
/** | |
* JSBeautifier class | |
* | |
* @author Einar Lielmanis | |
* @author Kaspars Foigts | |
* @author Igal Alkon | |
* | |
* @package JSBeautifier |
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/ruby | |
# coding: utf-8 | |
# author : Marc Quinton, march 2013, licence : http://fr.wikipedia.org/wiki/WTFPL | |
libdir = 'lib' | |
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir) | |
require 'pp' |
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/ruby | |
# coding: utf-8 | |
# author : Marc Quinton, march 2013, licence : http://fr.wikipedia.org/wiki/WTFPL | |
require 'pp' | |
=begin | |
Cell 52 - Address: 00:24:D4:51:53:20 |
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
# http://www.codingame.com/ide/?target=clogin&s=1&id=719077d960bd6fa93faa2bf63cb0fff80ed64#!test:81047:true:%2523!list | |
=begin | |
Ce premier exercice a pour seul objectif de vous familiariser avec la lecture depuis l'entrée standard et l'écriture dans la sortie standard. | |
Pourquoi est-ce si important ? Parce que tous les exercices CodinGame suivent ce protocole et que ça serait dommage que vous perdiez du temps la dessus ! | |
ENTRÉE : | |
Ligne 1 : Deux entiers n1 et n2, séparés par un espace |
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
# http://www.codingame.com/ide/?target=clogin&s=1&id=719077d960bd6fa93faa2bf63cb0fff80ed64#!test:81047:true:%2523!list | |
=begin | |
Dans cet exercice, on vous demande d'écrire un programme capable d'analyser un relevé de températures pour trouver quelle température se rapproche le plus de zéro. | |
Exemple de températures. Ici, -1 est le plus proche de 0. | |
ENTRÉE : |
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 conway(start, count) | |
str=start | |
(count-1).times do | |
str = str.gsub(/(.)\1*/) {$&.length.to_s + $1} | |
end | |
return str.split('').join(' ') | |
end | |
# read data from STDIN or from FILES passed as args and split as lines | |
lines=ARGF.read.split("\n") |
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/ruby | |
# coding: utf-8 | |
require 'pp' | |
require 'treetop' | |
class ParserNode < Treetop::Runtime::SyntaxNode | |
end | |
class IntegerNode < ParserNode |
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/ruby | |
# coding: utf-8 | |
# author : Marc Quinton, février 2013, licence : http://fr.wikipedia.org/wiki/WTFPL | |
require 'pp' | |
require 'rubygems' | |
require 'mechanize' | |
class PhoneEntry |
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 | |
error_reporting(E_ALL); | |
ini_set('include_path', '.:lib:lib-extra:lib-wcap:modules:' . ini_get('include_path')); | |
# fichier de configuration du site Web. | |
# include_once('amelia-config.php'); |
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 ruby | |
# A quick and dirty implementation of an HTTP proxy server in Ruby | |
# because I did not want to install anything. | |
# | |
# Copyright (C) 2009 Torsten Becker <[email protected]> | |
require 'socket' | |
require 'uri' | |
OlderNewer