Skip to content

Instantly share code, notes, and snippets.

View wolfkarl's full-sized avatar

Karl Wolf wolfkarl

View GitHub Profile
@wolfkarl
wolfkarl / ajax
Created July 8, 2013 12:52
simple ajax request --> alert
<script type="text/javascript">
// Request Objekt Anlegen
var httpRequest;
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
httpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE 8 and older
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
@wolfkarl
wolfkarl / ajax
Created July 8, 2013 15:15
Ajax Raw und jQuery (noch async.php anlegen!!)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>AJAX Demo</title>
</head>
<body>
<h1>huuuuui Ajax!</h1>
@wolfkarl
wolfkarl / bs1quiz.md
Last active December 28, 2015 23:38
BS1 Fragen (grandios unvollstaendig)

BS1 Klausur Multiple Choice

Was ist kein Windows Entwurfsziel?

  • portability
  • nahtloser netzwerk support
  • efficiency
  • (hard) realtime

Ziele von Trennung User/Kernelmode

  • Increasing OS Efficiency

Designing Interactive Systems

Definitions

Usability

effectiveness, efficiency, satisfaction with which specified users achieve a particular goal Goals:

  • discoverable
  • efficient
  • robust
@wolfkarl
wolfkarl / gist:7879804
Created December 9, 2013 20:02
go home buffer, you're drunk
Param: X * 63
Hello XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Param: X * 64
Hello XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Param: X * 65
Hello XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Param: X * 66
Hello XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Param: X * 67
Hello XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@wolfkarl
wolfkarl / klausur.md
Last active December 31, 2015 00:49
ISEC Klausur Themen

Klausur

110 Punkte erreichbar / 100 bewertet

General

  • Security Goals
  • Human Factor
  • Internet General Structure
  • Attack Types
  • Risk Analysis
@wolfkarl
wolfkarl / malloc.c
Created January 27, 2014 14:54
first fit algorithmus
#include "memory.h"
#include <stdio.h>
#include <errno.h>
/* Do not change !! */
static char mem[4096];
static size_t MEMSIZE = 4096;
// BLOCKGROESSE: 1 byte

Creational Patterns

  • Builder
  • Factory Method
  • Abstract Factory
  • Prototype
  • Singleton

Structural Patterns

  • Adapter, Bridge, Decorator und Proxy an
  • Composite (das hatten wir schon kurz in der Patterneinführung)
// normalize and flip
for (ii = 0; ii < npoints; ii++)
{
cv::Point p, pn;
p = selected.at(ii);
pn.x = 100*(p.x - xmin) / (xmax-xmin);
pn.y = 100*(p.y - ymin) / (ymax-ymin);
normalized.push_back(pn);
std::cout << "Normalized: " << pn.x << " " << pn.y << "\n";
@wolfkarl
wolfkarl / wordcount.py
Last active November 1, 2016 15:52
Lazy Lover Python Word Count
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import glob
import os
# (C) 2015 Ich konzentriere mich völlig auf meine Bachelorarbeit GmbH
# v2: now mildly recursive (depth of 1)
# v3: sortiert die meisten Latexbefehle aus