This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RankNTypes #-} | |
module Bencoding where | |
import Control.Applicative | |
import Crypto.Hash.SHA1 | |
import Data.Attoparsec.ByteString.Char8 (Parser) | |
import qualified Data.Attoparsec.ByteString.Char8 as P | |
import Data.ByteString as B | |
import Data.ByteString.Char8 as BC |
This file contains 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
use std::hashmap::HashMap; | |
trait Test {} | |
impl Test for uint {} | |
fn main() { | |
let a: &uint = &15; | |
let thing: &Test = a as &Test; | |
let mut map: HashMap<uint, &Test> = HashMap::new(); |
This file contains 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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("github.com") { | |
/* General code display */ | |
pre, code, pre > code, | |
/* commit refs */ | |
span.commit-ref, | |
/* commit meta */ |
This file contains 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 Roles::Moderator | |
applies_for -> user { user.moderator? } | |
definitions do | |
can :edit, Comment | |
can :destroy, Thread, locked: false | |
can :unlock, Thread, If(:locked_by_him) | |
end | |
def locked_by_him |
This file contains 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
The following options are target specific: | |
-m128bit-long-double [disabled] | |
-m32 [disabled] | |
-m3dnow [disabled] | |
-m3dnowa [disabled] | |
-m64 [enabled] | |
-m80387 [enabled] | |
-m8bit-idiv [disabled] | |
-m96bit-long-double [enabled] | |
-mabi= sysv |
This file contains 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
bool exiter::is_handling(const sf::Event::EventType& ev_type) const { | |
if (ev_type == sf::Event::Closed) | |
return true; | |
if (ev_type == sf::Event::KeyPressed) | |
return true; | |
else | |
return controller::is_handling(ev_type); | |
} | |
bool exiter::handle(const sf::Event& event, runner& runner) { |
This file contains 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
kuba@kuba-desk ~ $ cat chrono-constexpr.cc | |
#include <chrono> | |
int test() { | |
std::chrono::hours h{1}; | |
std::chrono::minutes m = ++h; | |
m--; | |
return m.count(); | |
} | |
////////////////////// |
This file contains 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
// Iteracyjne | |
long long potega(double a, int n) | |
{ | |
long long w=a; | |
for (int i = 1; i < n; i++) w *= a; | |
return wynik; | |
} | |
// Rekurencyjne | |
long long potega(double a, int n) |
This file contains 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
✘ ⮀ ~ ⮀ dig wp.pl | |
; <<>> DiG 9.9.2-P2 <<>> wp.pl | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44720 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 | |
;; OPT PSEUDOSECTION: | |
; EDNS: version: 0, flags:; udp: 1024 |
This file contains 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> | |
using namespace std; | |
const int m = 1001; | |
int main() { | |
ios_base::sync_with_stdio(0);//tu wklej te linie | |
int n; | |
cin >> n; |
NewerOlder