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<cstdio> | |
#include<vector> | |
#include<iostream> | |
#define INF 2000000000 | |
using namespace std; | |
int Z, n; | |
int A[2004]; | |
int max_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
#include<cstdio> | |
#include<vector> | |
#include<iostream> | |
#define INF 2000000000 | |
using namespace std; | |
int Z, n; | |
int A[1002]; | |
int max_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
#include<cstdio> | |
#include<vector> | |
#include<iostream> | |
#define INF 2000000000 | |
using namespace std; | |
int Z, n; | |
int A[1002]; | |
int P[1002][1002]; |
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
Wolumin w stacji G to disk0s2 | |
Numer seryjny woluminu: C89A-6620 | |
Katalog: G:\System\Library\Extensions | |
2007-08-22 22:33 <DIR> ACard6280ATA.kext | |
2007-08-22 22:32 <DIR> ACard62xxM.kext | |
2007-08-22 22:32 <DIR> ACard67162.kext | |
2007-08-22 22:32 <DIR> ACard671xSCSI.kext | |
2007-08-22 22:33 <DIR> ACard6885M.kext |
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
require 'mechanize' | |
require "prime" | |
agent = Mechanize.new | |
primes = Prime.new | |
pr = primes.next | |
results = [] | |
while (pr <= 1000) do |
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
require "rubygems" | |
require "xmpp4r-simple" | |
require "session" | |
USERNAME = "[email protected]" | |
PASSWORD = "*" | |
im = Jabber::Simple.new(USERNAME, PASSWORD) | |
sh = Session::new |
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
Mam prosty middleware, który usuwa subdomenę "www" z requestów (zwykłe przekierowanie) - http://gist.github.com/425207 | |
W przeglądarce wszystko działa wzorowo, problemy są z testami. | |
[code=ruby]host! "example.com" | |
root_url #=> "http://example.com/"[/code] | |
Przykładowy scenariusz: | |
- wejdź na new_post_url (przechodzi na "http://example.com/posts/new") | |
- ... |
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 NoWWW | |
STARTS_WITH_WWW = /^www\./i | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
if env['SERVER_NAME'] =~ STARTS_WITH_WWW |
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
1. Edit ~/.gitk: | |
set mainfont {Monaco 10} | |
set textfont {Monaco 10} | |
set uifont {Monaco 10} | |
2. Upgrade wish | |
sudo aptitude install tk8.5 | |
sudo update-alternatives --config wish (select wish8.5) |
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<cstdio> | |
#include<vector> | |
#include<algorithm> | |
#define INF 2000000000 | |
#define MAX 36 | |
using namespace std; | |
int Z, n, S; | |
vector<int> l; | |
vector<int> A; |