This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env Rscript | |
# Diese Funktion berechnet die exakte und die approximierte Version | |
calc_exact_and_approx <- function(n, p, x1, x2) { | |
# exakte Berechnung: | |
sum <- 0 | |
for(i in x1:x2) { | |
sum <- sum + ( choose(n, i) * p**i * (1 - p)**(n-i) ) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
import thread | |
import threading | |
import Queue | |
matrix = [ | |
[0.0, 0.82, 0.59, 0.68, 0.71, 0.31, 0.42, 0.05, 0.0, 0.0, 0.26, 0.0, 0.18, 0.56, 0.42, 0.45], | |
[0.59, 0.0, 0.72, 0.81, 0.16, 0.29, 0.0, 0.0, 0.0, 0.29, 0.0, 0.0, 0.87, 0.74, 0.08, 0.64], | |
[0.54, 0.0, 0.0, 0.08, 0.0, 0.43, 0.94, 1.0, 0.29, 0.95, 0.09, 0.71, 0.0, 0.51, 0.0, 0.0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.UUID; | |
import java.util.Random; | |
/* | |
* Run and compile: | |
* | |
* javac Timer.java && java -Djava.compiler=NONE Timer | |
* | |
* Aufgabe 1. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>XSS POC</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width"> | |
</head> | |
<body> | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function spg_add_admin() { | |
global $emgplugname, $theshort, $theopt; | |
// Checks that the wp_http_referer includes emg_settigns. This means that the request originated from the emg settings form. But this | |
// may cause problems if other plugins user the same parameters, which is nontheless very unlikely. | |
if (strpos($_REQUEST['_wp_http_referer'], 'post_type=easymediagallery&page=emg_settings') !== FALSE && isset($_REQUEST['_wpnonce']) && check_admin_referer('easy_options_group-options')) { | |
if (is_admin() && ( isset($_GET['page']) == 'emg_settings' ) && ( isset($_GET['post_type']) == 'easymediagallery' )) { | |
if (isset($_REQUEST['action']) && 'save' == $_REQUEST['action']) { | |
$curtosv = get_option('easy_media_opt'); | |
foreach ($theopt as $theval) { | |
$curtosv[$theval['id']] = $_REQUEST[$theval['id']]; |