[ create a new paste ] login | about

rplantiko

Name: RĂ¼diger Plantiko
Email:
Site/Blog: http://ruediger-plantiko.net
Location: Winterthur, Switzerland
Default language:
Favorite languages:
About:

Saved pastes by rplantiko:

C++, pasted on Oct 24:
1
2
3
4
5
// Track differences - a component for automatic numeric tests

#include <iostream>
#include <sstream>
#include <stdio.h>
...
view (128 lines, 4 lines of output)
C, pasted on Sep 25:
1
2
3
4
5
// Rational numbers with exposed type

typedef struct {
  int numer;
  int denom;
...
view (61 lines, 7 lines of output)
Perl, pasted on Aug 1:
1
2
3
4
5
# Since the DRY violation of repeating color codes in CSS bothered me,
# I made a meta-CSS in the form of a simplistic perl file

# The simplest way to do this in Perl is by using the built-in 
# variable substitution mechanism (interpolation)
...
view (43 lines, 17 lines of output)
C++, pasted on Jun 18:
1
2
3
4
5
// Mimic a "public readonly" attribute (as in C# and ABAP)
// Inspired by Peter Ammon, http://bytes.com/topic/c/answers/62093-read-only-data-members

class F {
private: 
...
view (21 lines, 2 lines of output)
C++, pasted on Jun 18:
1
2
3
4
5
// A pair of any "things". It can be swapped.

template <class T>
class Pair {
  public:
...
view (32 lines, 2 lines of output)
C++, pasted on Jun 18:
1
2
3
4
5
// Example for method chaining in C++

class F {
  private: 
    unsigned int eax;
...
view (21 lines, 1 line of output)