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 <QDebug> | |
#include <QSqlDatabase> | |
#include <QSqlQuery> | |
#include <QString> | |
#include <QSqlError> | |
#include <QVariant> | |
int main() | |
{ | |
QSqlDatabase db = QSqlDatabase::addDatabase("QIBASE"); |
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 autodie; | |
use Fcntl qw(SEEK_SET); | |
use strict; | |
use warnings; | |
my ($in1, $in2, $ot) = @ARGV; | |
die "usage: $0 input1 input2 output" | |
unless defined $in1 && defined $in2 && defined $ot; | |
open IN1, '<:urf8', $in1; |
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 | |
class Ax { | |
public $super; | |
function __construct() { | |
$this->super = "super"; | |
$GLOBALS['super'] = &$this->super; | |
} | |
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 <xlslib.h> | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <ctime> | |
using namespace xlslib_core; | |
using namespace std; |
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
BEGIN { | |
$ENV{PERL_ANYEVENT_MAX_OUTSTANDING_DNS} = 30; | |
} | |
use strict; | |
use Coro::LWP; | |
use Coro; | |
use LWP; | |
my @coros; | |
for (1..30) { |
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
BEGIN { | |
$ENV{SOCKS_DEBUG} = 1; | |
} | |
use IO::Socket::Socks::Wrapper ( | |
Net::FTP => { | |
ProxyAddr => 'localhost', | |
ProxyPort => 1080, | |
SocksVersion => 5 | |
}, | |
Net::FTP::dataconn => { |
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 strict; | |
use URI; | |
use HTTP::Request; | |
use IO::Lambda qw(:all); | |
use IO::Lambda::HTTP qw(http_request); | |
sub request($) { | |
my $url = URI->new($_[0]); | |
my $req = HTTP::Request->new(GET => $url, [Host => $url->host]); | |
$req->protocol('HTTP/1.1'); |
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 strict; | |
use warnings; | |
use AnyEvent::Google::PageRank 'rank_get'; | |
my $cv = AE::cv; | |
rank_get 'http://www.google.ru', sub { | |
print shift, "\n"; | |
$cv->send; | |
}; | |
$cv->recv; |
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 Data::Dumper; | |
use strict; | |
$a = ['google.ru', on_prepare => sub {}, timeout => 10, sub{}]; | |
print Dumper _extract_known_params($a); | |
print Dumper ($a), "-------\n"; | |
$a = ['google.ru', timeout => 10, on_prepare => sub {}, sub{}]; | |
print Dumper _extract_known_params($a); | |
print Dumper ($a), "-------\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
#include <iostream> | |
class Ax { | |
public: | |
Ax(int a); | |
bool compare(const Ax &other); | |
private: | |
int m_a; | |
}; |