Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
use Data::Dumper;
my @coords;
my %cent = (x => 0, y => 0);
for my $i (0..3){
my ($x, $y) = split /\s/, <STDIN>;
$coords[$i]{x} = $x;
$coords[$i]{y} = $y;
#!/usr/bin/perl
print "SQUARE";
/*
* programm to test constructor/destructor call sequence
* programm compiled in gcc generate following output:
Constructor a
Constructor b
Constructor a
Constructor b
in function
Destructor b
Destructor a
create table SOMEPROJECT_USERS(
ID int not null auto_increment,
NAME varchar(32),
primary key (ID),
key (NAME)
);
create table SOMEPROJECT_SHARES(
ID int not null auto_increment,
NAME varchar(32),
//-------------------------------------------------------------------------------------------
// This file is the MAIN part of the program complex "Poincare_Map"
// Author: Anton Doroshin <doran@inbox.ru>
// Samara State Aerospace University (Russia)
// Version 1.1 (04.04.2008)
// Version 2.0 (07.05.2013)
//
// THIS IS FREE SOFTWARE on GNU GPL BASE
//
// YOU MAY USE, MODIFY, DISTRIBUTE THIS PROGRAM
#include <sys/time.h>
#include "time_measurement.h"
unsigned long get_current_time_in_us(){
struct timeval tv;
gettimeofday(&tv, 0);
return (tv.tv_sec*1000000l+tv.tv_usec);
}
//-------------------------------------------------------------------------------------------
// This file is the MAIN part of the program complex "Poincare_Map"
// Author: Anton Doroshin <doran@inbox.ru>
// Samara State Aerospace University (Russia)
// Version 1.1 (04.04.2008)
// Version 2.0 (07.05.2013)
//
// THIS IS FREE SOFTWARE on GNU GPL BASE
//
// YOU MAY USE, MODIFY, DISTRIBUTE THIS PROGRAM
firefish@vmhost:~/parallel$ for i in {1..10}; do ./linear_4.7 | grep Done; done
Done in: 33818772
Done in: 35755699
Done in: 34884689
Done in: 34889286
Done in: 35219693
Done in: 34525493
Done in: 35191607
Done in: 34655455
Done in: 35070075
//-------------------------------------------------------------------------------------------
// This file is the MAIN part of the program complex "Poincare_Map"
// Author: Anton Doroshin <doran@inbox.ru>
// Samara State Aerospace University (Russia)
// Version 1.1 (04.04.2008)
// Version 2.0 (07.05.2013)
//
// THIS IS FREE SOFTWARE on GNU GPL BASE
//
// YOU MAY USE, MODIFY, DISTRIBUTE THIS PROGRAM
#include <stdio.h>
#include <cuda_runtime.h>
#define DIM 2 //Dimension of the dynamical system <--second order as an example
#define EGOROVS_CONST 8 //Egolov's constant for integration step control
#define PI 3.1415926535897932384626433832795029L //Pi-magic-number is the base of the Universe
#define A1 5.0
#define A2 15.0
#define B2 8.0
#define C1 4.0