GiM
|
codepad
|
|
GiM
|
Saved pastes by GiM:
#include <stdio.h>
#include <stdlib.h>
short int gabs(short int x) {
/* signed shift */
|
view (27 lines, 2 lines of output) |
#include <cstdio>
enum Testerka { a, b, c, d, e, f };
Testerka &operator++(Testerka &p, int x)
|
view (28 lines, 2 lines of output) |
#include <cstdio>
// May the force be with you
#define private public
#define protected public
|
view (27 lines, 1 line of output) |
<?xml version="1.0" encoding="UTF-8" ?>
<project name="sample" default="compile" basedir=".">
<property file="build.properties" />
<macrodef name="compile" >
|
view (37 lines) |
template <void (*F)()>
struct SigFoo { static const int x = 0; };
template <class T>
struct RequiredStatics {
|
view (29 lines) |
template RetriveFields(T, char[] name, int u)
{
static if (is(T == struct) || is(T == class))
{
static if (u < T.tupleof.length)
|
view (37 lines) |
import tango.io.Stdout;
char toupper(char letter)
{
if (letter >= 'a' && letter <= 'z')
|
view (43 lines, 2 lines of output) |
extern(C) int write(int fd, char *buf, int len);
void gwrite(char[] str) { write(2, str.ptr, str.length); }
interface Big { void brother(); }
void foo(Big biggy) { biggy.brother(); }
|
view (10 lines, 2 lines of output) |
/* Michal 'GiM' Spadlinski
* FizzBuzz on delegates
*/
import tango.io.Stdout;
import tango.text.convert.Integer;
|
view (19 lines, 100 lines of output) |
/* D - ArraySeq - size, capacity, length
*/
import tango.util.collection.ArraySeq;
import tango.io.Stdout;
|
view (18 lines, 1 line of output) |
/* Michal 'GiM' Spadlinski
* dear children, don't do this at home :>
*/
import tango.io.Stdout;
|
view (94 lines, 2 lines of output) |
#include <iostream>
class A {
public: virtual void blah() { std::cout << "in a" << std::endl; }
void dupa() { std::cout << "dupA" << std::endl; }
|
view (48 lines, 16 lines of output) |
char *b1 = new char[dlugosc_genotypu], *b2=b1;
int flag=1;
for (i = 0; i < dlugosc_genotypu; i++)
{
if( ((float)rand()/(RAND_MAX + 1.0))< wsk_pop->prawd_pkt_krzyzowania )
|
view (22 lines) |
/+ Michal 'GiM' Spadlinski +/
import tango.io.Stdout;
import tango.math.Random;
void blink(T, U)(T t, bool delegate(ref U) cond, void delegate(ref U) act)
|
view (47 lines, 18 lines of output) |
/+ Michal 'GiM' Spadlinski +/
import tango.io.Stdout;
import tango.math.Random;
class Kontener
|
view (31 lines, 1 line of output) |
/+ Michal 'GiM' Spadlinski +/
import tango.io.Stdout;
void blink(T, U)(T t, bool delegate(ref U) cond, void delegate(ref U) act)
{
|
view (23 lines, 14 lines of output) |
import tango.io.Stdout;
class Baz { void blinkenlights() {Stdout("Baz").newline; } }
class Bar : Baz { void blinkenlights() { Stdout("Bar").newline; } }
class Foo(T) {
|
view (21 lines, 1 line of output) |