Skip to content

Instantly share code, notes, and snippets.

@d8ta
d8ta / cpp
Last active August 29, 2015 14:01
CG
// zum einbinden der Dateien
#include <oogl/Texture2D.h>
#include <oogl/GLSLProgram.h>
// sowie..
oogl::Texture2D* moontexture;
oogl::GLSLProgram* phongshader;
// in der Init haben wir:
using System;
using System.Collections.Generic;
class Book
{
public string isbn;
public string title;
public string year;
public string publisher;
<?php
$uploaddir = dirname( $_SERVER["SCRIPT_FILENAME"] ) . "/pix/";
$filename = basename($_FILES['bild']['name']);
$ext = substr($filename, -4);
if( $ext != '.jpg' || $ext != '.gif' || $ext != '.png' ) {
die("es dürfen nur jpg, png oder gif Dateien hochgeladen werden, nicht " . substr($filename, -3) );
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Übung 3: PHP Upload</title>
</head>
<body>
<form action="upload.php" method="post" enctype="multipart/form-data">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Post</title>
<link type="text/css" rel="stylesheet" href="stylesheet.css" />
</head>
@d8ta
d8ta / 9_MyIntArray_expand.cs
Last active August 29, 2015 13:57
Methoden Remove() und RemoveAT() fehlen noch
// (d) void RemoveAt(int index)
public void RemoveAt(int index)
{
int counter = 0;
numbers [index] = 0;
counter++;
if (counter >= 1) {
for (int i = index; i < numbers.Length-1; i++) {
numbers [i] = numbers [i + 1];
}
/* 1310601027, fhs36118
* Daniel Raudschus
* ue02 bsp08
* */
//8. MyIntArray (2P):
//Programmiere eine eigene, auf integer-Werte reduzierte Version einer ArrayList namens MyIntArray.
//Dieses Array kapselt ein Standard-Integer-Array (int[] numbers), und darf NICHT eineArrayListverwenden.
//Es muss das dynamische Wachsen des Arrays unterstützen.
/* 1310601027, fhs36118
* Daniel Raudschus
* ue02 bsp01
* */
using System;
using System.Collections;
class Article
{
// 1310601035, fhs36126
// Franz Rest; slight adaptions, comments/notes made by G.Mitterlechner.
// ue09 bsp56
using System;
class Article
{
private int Artikelnummer;
private string Name;
@d8ta
d8ta / RLS.cs
Created February 27, 2014 09:17
Aufgabe 2: RLE
using System;
class MainClass
{
const int CODE_OF_A = 65; // ASCII code for A
const int CODE_OF_a = 97; // ASCII code for a
static int[] uppercase = new int[26];
static int[] lowercase = new int[26]; // Arrays for upper and lowercase alphabet