Skip to content

Instantly share code, notes, and snippets.

View carstenlucke's full-sized avatar

Carsten Lucke carstenlucke

View GitHub Profile
<?php
$ds=ldap_connect("ldap.fh-friedberg.de"); // muss ein gültiger LDAP Server sein!
print_r($ds);
if ($ds) {
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
<?php
$FB_SG_INFO = array("BAU" => array(), "EI" => array(), "GES" => array(), "IEM" => array(), "LSE" => array(), "ME" => array(), "M" => array(), "MND" => array(), "MNI" => array(), "MuK" => array(), "W" => array(), "WI" => array(), "ZDH" => array());
$FB_SG_INFO["BAU"][] = array("Architektur","Bachelor of Engineering");
$FB_SG_INFO["BAU"][] = array("Architektur (konsekutiv)","Master of Engineering");
$FB_SG_INFO["BAU"][] = array("Bauingenieurwesen","Bachelor of Engineering");
$FB_SG_INFO["BAU"][] = array("Bauingenieurwesen (6 Semester)","Bachelor of Engineering");
$FB_SG_INFO["BAU"][] = array("Bauingenieurwesen (konsekutiv)","Master of Engineering");
$FB_SG_INFO["BAU"][] = array("Bauingenieurwesen (konsekutiv) (4 Semester)","Master of Engineering");
Sub häufigsteZahl_nachher()
Dim i As Integer
Dim c As Integer
Dim b() As Integer
Dim a(9) As Integer
Dim n As Integer
Dim d As Integer
c = 0
// Aus Excel mit VBA:
// n = 10^7 bis 10^8 => 2,3025851479933
// n = 10^8 bis 10^9 => 2,30258509849375
// Dieses C-Programm:
// n = 10^0 bis 10^1 => 2.928968253968254
// n = 10^1 bis 10^2 => 2.358409263671365
// n = 10^2 bis 10^3 => 2.308093342910723
// n = 10^3 bis 10^4 => 2.303135175494027
// n = 10^4 bis 10^5 => 2.302640093819069
#include <stdio.h>
#include <math.h>
int main (int argc, char const *argv[])
{
const unsigned long long N = pow(10.0, 9.0);
double Hn = 0.0;
for (unsigned long long i=1; i<=N; i++) {
Option Explicit
Function calcHR(start, stopp)
Dim N As Currency
calcHR = 0#
For N = start To stopp
calcHR = calcHR + 1 / N
Next N
@carstenlucke
carstenlucke / Client.java
Created January 15, 2018 00:19
Simple echo server and simple client, using some Java 8 features
import java.io.PrintStream;
import java.net.Socket;
import java.util.Scanner;
import java.util.function.Supplier;
import java.util.stream.Stream;
public class Client {
public static void main(String[] args) {
Sub EinfacherAdditionsRechner()
Dim Wert As Integer, Summe As Integer
Do While (True)
Wert = InputBox("Zahl eingeben")
Summe = Summe + Wert
MsgBox "Summe: " & Summe
If (Wert = 0) Then Exit Do
Loop
End Sub
Sub aufgabe()
Dim F(3 To 9) As Integer
InitialisiereArrayMitWert F, 99
End Sub
Sub funktionmitrwnutzen()
Dim wert As Integer
wert = InputBox("Wert: ")
Dim neuerWert As Integer
/* Hello World program */
#include<stdio.h>
main()
{
printf("Hello World");
}