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.awt.BorderLayout; | |
import java.awt.Color; | |
import java.awt.Component; | |
import java.awt.Dimension; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.event.MouseEvent; | |
import java.awt.event.MouseMotionAdapter; | |
import javax.swing.Box; |
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
// Only scalar values, both for parameters and return values. | |
// Calculation must be split into 2 methods. Ugly code, duplicate calculations. | |
public final class VectorMath { | |
public static double getRotatedX(final double x, final double y, | |
final double angle) { | |
return x * Math.cos(angle) - y * Math.sin(angle); | |
} | |
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
<?php | |
final class Secure | |
{ | |
const LINEBREAK_WIDTH = 50; | |
private static $charset = 'utf-8'; | |
/* | |
* | |
* Alle HTML-Befehlszeichen aus einem String in HTML-Entities umwandeln |
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
<?php | |
//Startguthaben definieren | |
define("startguthaben", 100); | |
define("waehrung", "$"); | |
session_start(); |
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
<?php | |
class Secure | |
{ | |
private static $charset = 'utf-8'; | |
/* | |
* | |
* Alle HTML-Befehlszeichen aus einem String in HTML-Entities umwandeln | |
* | |
*/ |
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
<?php | |
/* | |
* | |
* Secure Class | |
* | |
*/ | |
class Secure |
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
<?php | |
/* | |
* | |
* Secure Class | |
* | |
*/ | |
class Secure |
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
<?php | |
class ClansphereAbcode { | |
# alle registered patter | |
private static $patterns = array(); | |
public static function convert($string, $options = array()) { | |
$string = self::secure($string); | |
foreach(self::$patterns AS $pat => $func) { | |
$string = preg_replace_callback($pat, $func, $string); |
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
<?php | |
class Secure | |
{ | |
private static $charset = 'utf-8'; | |
/* | |
* | |
* Alle HTML-Befehlszeichen aus einem String in HTML-Entities umwandeln | |
* | |
*/ |
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
<?php | |
final class ClansphereAbcode | |
{ | |
private static $cache = array(); | |
public static function load() | |
{ | |
Abcode::register(new AbcodePattern('bold', "/\[b\](.*?)\[\/b\]/si","<strong>$1</strong>"), TRUE); |
OlderNewer