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 <iostream> | |
class Bench1C { | |
public: static unsigned long long incr() { | |
unsigned long long a = 0; | |
for (unsigned long long i = 0; i < 999999999; i++) { | |
a = a + 1; | |
} | |
return a; | |
} |
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
module Normale | |
class Class | |
attr_accessor :standard_deviation, :esperance | |
def initialize standard_deviation: 1.0, esperance: 0.0 | |
@standard_deviation = Float(standard_deviation) | |
@esperance = Float(esperance) | |
end | |
def greater_than a | |
1 - repartition(a) |
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
class Calculator;def self.calculate s; m = s.match(/\A(\d+) ([\+\-\*\/\%]) (\d+)\Z/)&.to_a&.map{|e| Integer(e) rescue e } and return m[1].send(m[2], m[3]) or return "Error"; end;end |
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
-- View: public."Count of votes by meeting" | |
-- DROP VIEW public."Count of votes by meeting"; | |
CREATE OR REPLACE VIEW public."Count of votes by meeting" AS | |
SELECT tm.uuid AS "Meeting uuid", | |
count(tud1.id) AS "Count of yes", | |
count(tud2.id) AS "Count of no", | |
count(tud3.id) AS "Count of maybe", | |
count(tud4.id) AS "Count of NULL" |
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
class SeLogerScrap < ScrapBase | |
BASE_URL = ["http://ws.seloger.com/search.xml?cp=", "&tri=prix&fraicheur=1&idtt=2&idtypebien=1,2,4,13"] | |
IMAGE_LOADER = ->(e) { | |
nphotos = e.search("photos photo stdurl").map(&:text) | |
bphotos = e.search("photos photo bigurl").map(&:text) | |
photos = nphotos | |
nphotos.size.times do |i| | |
nphotos[i] = bphotos[i] unless bphotos[i].empty? | |
end |
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
ex_01: | |
files: | |
exercise_1.sql: "a039ffa2642542d5ff25b2926b4eb7db" | |
points: 2 | |
ex_02: | |
files: | |
trafic_entrant2013.xls: "54a7108f8d31d930c87341ce01ff7410" | |
trafic_entrant2014.xls: "275f8d14fe17bd6e89ee55d43feb7883" | |
points: 1 | |
ex_03: |
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 | |
require 'singleton' | |
require 'yaml' | |
require 'digest' | |
require 'pry' if ENV["DEBUG"] == "true" | |
class TestSqlAvance | |
include Singleton |
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
<html> | |
<body style="background: black;"> | |
<h1 id="countdown" style='color: red; text-align: center; font-family: "Monospace"; font-size: 12em; margin: 20%;'></h1> | |
<script> | |
let endTime = new Date((new Date()).toDateString() + " 21:00:00"); | |
let currTime = new Date(); | |
let endInt = endTime.getTime(); | |
let currInt = currTime.getTime(); |
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
[ | |
{ | |
:id=>394945, | |
:from=>"Aéroport de paris charles de gaulle, France", | |
:from_city=>"Aéroport de paris charles de gaulle", | |
:from_country=>"France", | |
:dest=>"Aérodrome de castelnau-magnoac, France", | |
:dest_city=>"Aérodrome de castelnau-magnoac", | |
:dest_country=>"France", | |
:dest_city_id=>26714, |
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
==25381== Invalid read of size 4 | |
==25381== at 0x404FC2: mail_handle_forward (forward.c:26) | |
==25381== by 0x402BED: handle_client (manage_client.c:65) | |
==25381== by 0x40277C: call_handle_for_clients (loop_server.c:86) | |
==25381== by 0x4028F7: loop_server (loop_server.c:112) | |
==25381== by 0x40155A: sub_main (main.c:49) | |
==25381== by 0x4015D0: main (main.c:63) | |
==25381== Address 0x80040a418 is not stack'd, malloc'd or (recently) free'd | |
==25381== | |
==25381== |