Skip to content

Instantly share code, notes, and snippets.

// Blatt12.2.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
//
#include "stdafx.h" // unter linux einfach entfernen
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <set>
@daemonfire300
daemonfire300 / bla.cpp
Last active December 11, 2015 22:59 — forked from anonymous/bla.cpp
#include <string>
using namespace std;
#ifndef MEDIUM_H
#define MEDIUM_H
class Medium
{
public:
string titel;
bool ausleihstatus;
#include <iostream>
using namespace std;
int a;
int b;
void max(int a, int b){
if(a > b){
cout << "a größer b" << endl;
}
/*
*
* Super Duper Copyright by Jul Foi, do not cropy
*/
// win_visdata.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
//
#include "stdafx.h"
void teiler(int x){
int i=1;
while(i<=x){
if(x%i==0){cout << i; i++}
else{i++;}
}
}
int main(){
@daemonfire300
daemonfire300 / complex.h
Created December 7, 2012 00:14
Complex Numbers in C++ WIP
#ifndef COMPLEX_H_INCLUDED
#define COMPLEX_H_INCLUDED
struct ComplexNumber{
double realPart;
double imaginaryPart;
ComplexNumber operator+(ComplexNumber k)
{
this.realPart += k.realPart;
var sys = require('sys');
var express = require('express')
, passport = require('passport')
, util = require('util')
, TwitterStrategy = require('passport-twitter').Strategy
, RedisStore = require('connect-redis') (express);
var https = require('https');
var oauth = require('oauth').OAuth;
var TWITTER_CONSUMER_KEY = "LJgg";
var TWITTER_CONSUMER_SECRET = "0Q7vE";
@daemonfire300
daemonfire300 / double_t.cpp
Created December 2, 2012 13:54 — forked from anonymous/double t
eine Funktion namens t, welche keine Argumente entgegen nimmt und einen Wert vom Typ double zur ̈ckliefert. u
#include <iostream>
using namespace std;
double t()
{
double a;
return a; // fehler, a wurde zwar initialisiert aber nicht deklariert also es wurde kein wert zugewiesen
}
// was du eigentlich wolltest
import Data.Complex
import PNG
type DComp = Complex Double
iter :: DComp -> DComp -> DComp
iter c 0 = 0
iter c z = z*z + c
nest :: (DComp -> DComp) -> DComp -> Integer -> DComp
map (\(k:ks) -> k ++ (k:ks) ) (map (\x -> map (\y -> (x,y)) [1,2,3,4]) [1,2,3,4])
<interactive>:32:54:
Couldn't match expected type `[a0]' with actual type `(t0, t1)'
In the expression: (x, y)
In the first argument of `map', namely `(\ y -> (x, y))'
In the expression: map (\ y -> (x, y)) [1, 2, 3, 4]