Skip to content

Instantly share code, notes, and snippets.

$res = @ipaddress.split(/(\d+)/); $end = $res[7].to_i(10) + 127; puts $res[1] + "." + $res[3] + "." + $res[5] + "." + $end.to_s;
@MiLk
MiLk / gist:2949860
Created June 18, 2012 18:28
IA TROP COOL
isBord(M):- member(M,[11,12,13,14,15,21,31,41,51,52,53,54,55,15,25,35,45]).
coups_gagnants(_,[],[]):-!.
coups_gagnants(P,[(Depart,Arrivee,O)|Q],[(Depart,Arrivee,O)|L]) :- isMontagne(P,Arrivee),isBord(Arrivee),coups_gagnants(P,Q,L), !.
coups_gagnants(P,[_|Q],L):- coups_gagnants(P,Q,L).
% gain immediat
meilleur_coup(P,C) :- coups_possibles(P,L), coups_gagnants(P,L,[C|_]).
meilleur_coup(P,C):- coups_possibles(P,L), length(L,Taille), random(1,Taille,N), get(L,N,C).
CREATE OR REPLACE FUNCTION SIREN(id_e integer) RETURNS varchar
LANGUAGE SQL
AS '
DECLARE
SIREN varchar;
BEGIN
SELECT SUBSTR(e.siret,1,9) INTO SIREN
FROM enterprise e
WHERE id=id_e;
RETURN SIREN;
$(document).ready(function() {
$( "#liste" ).resizable({ minHeight: 10, maxHeight: 1000, minWidth: 10, maxWidth: 1000, containment: "parent" });
$('#liste tbody tr').click(function() {
var box = $(this).find(':checkbox');
if(box.attr('checked') == "checked" || box.attr('checked') == true)
{
$(this).removeClass('active');
box.attr('checked', false);
}
else
Depuis 188.165.222.52
ping 188.165.47.98
PING 188.165.47.98 (188.165.47.98) 56(84) bytes of data.
^C
--- 188.165.47.98 ping statistics ---
33 packets transmitted, 0 received, 100% packet loss, time 32254ms
traceroute 188.165.47.98
traceroute to 188.165.47.98 (188.165.47.98), 30 hops max, 60 byte packets
1 vss-3-6k.fr.eu (188.165.222.253) 128.800 ms * *
<VirtualHost *:80>
DocumentRoot "D:/Dev/UTCraft/web"
ServerName utcraft
ServerAlias utcraft
ErrorLog "logs/utcraft-error.log"
CustomLog "logs/utcraft-access.log" common
DirectoryIndex app.php
<Directory "D:/Dev/UTCraft/">
Options All
AllowOverride All
<pre>
<?php
$arr = array();
$tmp = array("1,2,3","3,4,5");
$push_array = function($array,$val)
{
return (isset($array)) ? array_merge($array,$val) : $val;
}
options:
collate: utf8_unicode_ci
charset: utf8
type: InnoDB
Profile:
connection: doctrine
actAs: { Timestampable: ~ }
columns:
user_id: { type: integer, notnull: true }
error.log:--2011-12-28 11:39:07-- http://gamesstudio.org/wp-content/uploads/2011/bss.txt
error.log:Saving to: `/tmp/bss.txt'
error.log:2011-12-28 11:39:08 (53.0 KB/s) - `/tmp/bss.txt' saved [26491/26491]
error.log:--2011-12-28 11:40:07-- http://gamesstudio.org/wp-content/uploads/2011/bss.txt
error.log:Saving to: `/tmp/bss.txt'
error.log:2011-12-28 11:40:08 (53.1 KB/s) - `/tmp/bss.txt' saved [26491/26491]
error.log:--2011-12-28 11:41:07-- http://gamesstudio.org/wp-content/uploads/2011/bss.txt
error.log:Saving to: `/tmp/bss.txt'
error.log:2011-12-28 11:41:08 (53.1 KB/s) - `/tmp/bss.txt' saved [26491/26491]
error.log:--2011-12-28 11:42:07-- http://gamesstudio.org/wp-content/uploads/2011/bss.txt
var cubes = $$('a.cube');
cubes.each(function(cube,i) {
cube.addEvent('click',function(e) {
e.stop();
var to = $(cube.get("rel")).getPosition();
to.x = 0; to.y = to.y - 300;
var scroll = new Fx.Scroll(window,{
duration: 1000,
offset: to
}).start();