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 Test::More; | |
use Module; | |
is($Module::data, undef); | |
$Module::data = 10; | |
done_testing(); |
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
# Run these commands to install PHPUnit | |
# More info @ http://www.phpunit.de/manual/current/en/installation.html | |
pear channel-discover pear.phpunit.de | |
pear channel-discover components.ez.no | |
pear channel-discover pear.symfony-project.com | |
pear install phpunit/PHPUnit | |
# OSX - you may need to upgrade pear before installing PHPUnit |
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
<?php | |
final class AddController { | |
public function __construct() { | |
require 'model/WriteModel.php'; | |
} | |
public function newPost($name,$text) { | |
$addModel = new WriteModel($name, $text); | |
return $addModel; |
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
set errorformat=%f:%l:\ error:\ %m,%f:%l:\ warning:\ %m | |
set autowrite | |
au! BufWritePost *.m make! test |
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
// outlets | |
IBOutlet UILabel *label; | |
// actions | |
- (IBAction)onChange:(id)sender; | |
// storage | |
[[NSUserDefaults standardUserDefaults] storeFloat: 123 forKey: @"key"]; | |
float value = [[NSUserDefaults standardUserDefaults] floatForKey: @"key"]; |
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
import ftplib | |
import sys | |
import os | |
ftpServer = 'xxx' | |
ftpUser = 'xx' | |
ftpPass = 'xx' | |
#ftpPath = 'FileFlowStatus/' | |
ftpPath = '/' |
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
def get_last_lines(fp, num, step=10): | |
pos = step | |
lines = [] | |
quit = False | |
while len(lines) < num + 1 and not quit: | |
fp.seek(-pos, 2) | |
if int(fp.tell()) == 0: | |
quit = True | |
lines = fp.readlines() |
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
blogout = new Button("Registrovat"); | |
blogout.addClickHandler(new ClickHandler(){ | |
public void onClick(ClickEvent sender) { | |
RequestBuilder request = new RequestBuilder(RequestBuilder.POST, GWT.getModuleBaseURL() | |
+ "userhandling/createUser"); | |
request.setRequestData("username=" + user.getText() + "&password=" + pass.getText() + "&im=" + im.getText() | |
+ "&email=" + email.getText()); | |
request.setHeader("Content-Type", "application/x-www-form-urlencoded"); | |
request.setCallback(new RequestCallback() { | |
public void onError(Request request, Throwable exception) { |
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
=item TEST | |
dsadsasda's dsadsaoi doasuioapo | |
=cut | |
sub test { | |
print qq/pff's lalerweq/; | |
} |
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
Device Boot Start End Blocks Id System | |
/dev/sda1 * 23995 24322 2620416 c W95 FAT32 (LBA) | |
/dev/sda2 15 1320 10485760 7 HPFS/NTFS | |
/dev/sda3 * 1321 14068 102398310 7 HPFS/NTFS | |
/dev/sda4 14069 24322 82358472 f W95 Ext'd (LBA) | |
/dev/sda5 23995 24322 2620416 dd Unknown | |
/dev/sda6 14069 15343 10241374+ 83 Linux | |
/dev/sda7 15344 23740 67448871 83 Linux | |
/dev/sda8 23741 23994 2040223+ 82 Linux swap / Solaris |