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 <stdlib.h> | |
int main(int argc, char** argv) { return EXIT_FAILURE; } |
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
# Author: Pete Jensen | |
# Author: Natasha Mandryk (math) | |
class ECurve: | |
def __init__(self, p, a, b): | |
# Define basic variables, coefficients and prime p. | |
# (y^2 mod p) = (x^3 + ax + b) mod p | |
self.__a = a # The coefficient: a | |
self.__b = b # The coefficient: b | |
self.__p = p # The prime p. |
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
# Authors: Pete Jensen, Natasha Mandryk (math) | |
class ECurve: | |
def __init__(self, p, a, b): | |
# Define basic variables, coefficients and prime p. | |
# (y^2 mod p) = (x^3 + ax + b) mod p | |
self.__a = a # The coefficient: a | |
self.__b = b # The coefficient: b | |
self.__p = p # The prime p. | |
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 os, sys, string | |
class VSSRemover: | |
def __init__(self, aStartDir): | |
self._startDir = aStartDir | |
self._extensions = ['sln', 'scc', 'vssscc', 'csproj', 'vspscc'] | |
self._slnSCTagOne = "GlobalSection(SourceCodeControl)" |
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
@ECHO OFF | |
REM The following applies trigger patches to the selected database using | |
REM a preset username catalog and password. | |
ECHO Setting db connection information | |
SET dbUser=[[UserNameHere]] | |
SET dbCatalog=[[CatalogNameHere] | |
SET dbServer=[[ServerNameHere] | |
ECHO *** |
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
/// <summary> | |
/// Computes scalar result from collection of booleans | |
/// </summary> | |
/// <param name="aBooleans">Array of booleans to be aggregated</param> | |
/// <returns>The aggregation of all booleans; | |
/// <value>true if all true, false if otherwise.</value> | |
/// </returns> | |
public bool aggregateBooleans(bool[] aBooleans) | |
{ | |
bool tmpReturn = true; |
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
/// <summary> | |
/// RandomChoice | |
/// <example> | |
/// <code> | |
/// var flowerColor = Dice.RandomChoice<Colour>(new List<Colour>() | |
/// { | |
/// new Colour(ConsoleColor.Magenta, ConsoleColor.Green), | |
/// new Colour(ConsoleColor.Red, ConsoleColor.Green), | |
/// new Colour(ConsoleColor.Yellow, ConsoleColor.Green), | |
/// new Colour(ConsoleColor.DarkMagenta, ConsoleColor.Green), |
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
/// <summary> | |
/// Given a number (n) returns a string referring to that number (n) | |
/// using (st), (nd), (th), (rd) as suffixes. | |
/// </summary> | |
/// <param name="n">The number to convert to nth notation.</param> | |
/// <returns>The passed number in nth notation.</returns> | |
private static string nth(int n) | |
{ | |
switch (n) { | |
case 11: |
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 time | |
## | |
# @File: p55.py | |
# @Author: PJensen | |
# @Version: Oct 31, 2010 | |
# @Description: Find the number of lychrel numbers below 10k. | |
# http://projecteuler.net/index.php?section=problems&id=55 | |
## | |
def fast_lychrel(n): | |
N_MAX = 50 |
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 time | |
## | |
# @Fle: p74.py | |
# @Author: PJensen | |
# @Version: Oct 31, 2010 | |
# @Description: Unoptimized solution for Problem-74. | |
# http://projecteuler.net/index.php?section=problems&id=74 | |
# n-factorial |
OlderNewer