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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
<script src="json2.js"></script> | |
<script type="text/javascript"> | |
var url = "http://api.tingo.com/vanhonk"; | |
var request = { | |
"jsonrpc":"2.0", | |
"method":"service.apply", |
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
#!/bin/bash | |
if [ ! $# == 2 ]; then | |
echo "usage autosshinstall useranme@host host-nickname" | |
exit | |
fi | |
ssh-keygen -t rsa | |
ssh-copy-id $1 | |
APP="alias $2='ssh $1'" | |
BASHRC="$HOME/.bashrc" | |
echo $APP >> $BASHRC |
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 processing.serial.*; | |
Serial port; // Create object from Serial class | |
int val; // Data received from the serial port | |
int[] values; | |
void setup() | |
{ | |
size(640, 480); | |
// Open the port that the board is connected to and use the same speed (9600 bps) |
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 edu.wpi.tmathmeyer.hungry.pumpkins; | |
import java.util.Collection; | |
import org.bukkit.Location; | |
import org.bukkit.Material; | |
import org.bukkit.block.Block; | |
import org.bukkit.block.BlockFace; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; |
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 edu.wpi.tmathmeyer.hungry.pumpkins; | |
import java.util.Collection; | |
import org.bukkit.Location; | |
import org.bukkit.Material; | |
import org.bukkit.block.Block; | |
import org.bukkit.block.BlockFace; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; |
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
/******************************************************************************* | |
* Copyright (c) 2013 Ted Meyer. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Ted Meyer - being a generally kickass person | |
******************************************************************************/ |
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 edu.wpi.tmathmeyer.euler; | |
public class Problem433 { | |
int[][] mem = new int[50000][]; | |
int size = 500000; | |
public static void main(String[] args){ | |
new Problem433().problem(); | |
} | |
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 edu.wpi.tmathmeyer.euler; | |
public class Probs { | |
public static void problem30(){ | |
int[] fives = new int[10]; | |
for(int i = 0; i < 10; i++) | |
{ | |
fives[i] = pow(i, 5); | |
System.out.println(fives[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
boolean isPrime(long n) | |
{//fermats :D | |
if (n%2==0 || n%3==0) | |
{ | |
return false; | |
} | |
boolean res = true; | |
for (long a = 2; a<n; a*=2) | |
{ | |
res = res&&exp_mod_itr(a,n,n)==a; |
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 RPSGame extends JFrame implements ActionListener | |
{ | |
int wins = 0; | |
int ties = 0; | |
int total = 0; | |
JPanel scores; | |
public RPSGame(String title) | |
{ |
OlderNewer