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 distutils.dir_util | |
import shutil | |
import os | |
def copytree(src, dst): | |
for item in os.listdir(src): | |
s, d = os.path.join(src, item), os.path.join(dst, item) | |
if os.path.isdir(s): | |
shutil.copytree(s, d, False, None) | |
else: |
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
void save() { | |
Store store1 = new Store(dbName, store1Name); // Opening first nonexistent store, all good | |
store1.open().then((_) { | |
store1.batch({ | |
// This will run sucessfully and the data will be saved | |
}); | |
}); | |
Store store2 = new Store(dbName, store2Name); | |
store2.open().then((_) { |
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
[2014-10-03T14:42:09+0300] <@moomoohk> i think i got it | |
[2014-10-03T14:42:10+0300] <FleshyPig> yo moomoohk, i played the just cause 2 demo | |
[2014-10-03T14:42:12+0300] <FleshyPig> it is sick | |
[2014-10-03T14:42:19+0300] <@moomoohk> figured as much | |
[2014-10-03T14:42:31+0300] <FleshyPig> totally gonna get it soon | |
[2014-10-03T14:42:36+0300] <St1nG> fleshypig, just cause 2 is legit | |
[2014-10-03T14:42:43+0300] <FleshyPig> so is my ass | |
[2014-10-03T14:42:45+0300] <FleshyPig> ooooohhhhh | |
[2014-10-03T14:42:46+0300] <St1nG> I prefer it to gta | |
[2014-10-03T14:43:31+0300] <FleshyPig> cool |
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 com.moomoohk.MarketMaven.Components; | |
import java.io.Serializable; | |
import com.moomoohk.MarketMaven.Game; | |
public class Person extends Agent implements Serializable | |
{ | |
private static final long serialVersionUID = 1L; |
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 InstanceCalculator | |
{ | |
public dd(int num1, int num2) | |
{ | |
return num1 + num2; | |
} | |
public ubtract(int num1, int num2) | |
{ | |
return num1 - num2; |
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 Meshulam Silk ([email protected]) | |
* @since Aug 4, 2014 | |
*/ | |
public class BrokerTest | |
{ | |
public static void main(String[] args) | |
{ | |
/* |
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
// return C = A * B | |
public static double[][] multiply(double[][] A, double[][] B) | |
{ | |
int mA = A.length; //row | |
int nA = A[0].length; //col | |
int mB = B.length; | |
int nB = A[0].length; | |
if (nA != mB) | |
throw new RuntimeException("Illegal matrix dimensions."); | |
double[][] C = new double[mA][nB]; |
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 matrix mul(matrix B) | |
{ | |
// Return a new matrix which is the matrix product of this | |
// with B. | |
if((rows()!=B.rows()) || (cols()!=B.cols())) | |
{ | |
System.out.println("Error, cannot add since the 2 matrices do not have the same dimensions."); | |
System.exit(0); | |
} | |
matrix M = new matrix(rows(), cols()); |
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 gridCheck; | |
import java.util.Scanner; | |
public class Grid | |
{ | |
private boolean[][] grid; | |
public Grid(int row, int col) | |
{ |
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 networking; | |
import java.awt.Color; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.event.KeyAdapter; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; | |
import java.io.BufferedReader; | |
import java.io.EOFException; |
NewerOlder