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
def zeuge(a, n) | |
b = (n-1).to_s(2) # binary representation | |
d = 1 | |
b.reverse.split('').each do |i| | |
d = (d*d) % n | |
if i.to_i == 1 | |
d = (d*a) % n | |
end | |
puts "#{i}: #{d}" |
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
#include <Arduino.h> | |
short status_leds[4] = {7, 8, 5, 4}; | |
short status_leds_count = 4; | |
short status_leds_active = 1; | |
short dance_leds[2] = {13,12}; | |
short dance_leds_count = 2; | |
short buzzer = 3; | |
short button = 2; |
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
@Test | |
public void testSeasonAndEpisodeNumberExtraction() { | |
LocalFileService localFileService = new LocalFileService() | |
File test1 = new File("Breaking.Bad.4.Days.Out.S02E09.mkv"); | |
File test2 = new File("Breaking.Bad.4.Days.Out.02X09.mpg"); | |
Assert.assertTrue(localFileService.hasPattern(test1)); | |
Assert.assertTrue(localFileService.getSeason(test1) == 2); | |
Assert.assertTrue(localFileService.getEpisode(test1) == 9); | |
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
package sepm.ss15.e1325214.validators; | |
import sepm.ss15.e1325214.models.Jockey; | |
/** | |
* Specific validation behaviour for a jockey object | |
* | |
* @author philipp | |
*/ | |
public class JockeyValidator extends Validator{ |
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
using System; | |
namespace Inheritance | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Quadrat q = new Quadrat(123); |
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
public class Fussballer : Sportler | |
{ | |
public void DoSport() | |
{ | |
Console.WriteLine("Fussball spielen!"); | |
} | |
} |
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 | |
/* | |
+----------------------------------------------------------------------+ | |
| APC | | |
+----------------------------------------------------------------------+ | |
| Copyright (c) 2006-2011 The PHP Group | | |
+----------------------------------------------------------------------+ | |
| This source file is subject to version 3.01 of the PHP license, | | |
| that is bundled with this package in the file LICENSE, and is | | |
| available through the world-wide-web at the following url: | |
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
/** | |
* Le awesome button test | |
*/ | |
body { | |
background: url('http://dribbble.com/images/tile.gif'); | |
} | |
button { | |
margin-left:50px; |
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
db.foo.insert( { name: "Mario", fach: ["E", "D"] } ); | |
db.foo.insert( { name: "Philipp", fach: ["PR", "D"] } ); | |
db.foo.find(); | |
db.foo.find( { name: "Mario" } ); | |
db.foo.find( { fach: { $in : [ "E", "M" ] } } ); | |
db.foo.update( { name: "Mario" }, { $push: { fach: "M" } } ); | |
db.foo.find( { name: "Mario" } ); |
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
var Test = function() { | |
console.log("I'm not soo evil") | |
} | |
Test.prototype.play = function(arg) { | |
return arg + 1 | |
} | |
module.exports = Test |
OlderNewer