This file contains hidden or 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 PassByRef { | |
public static void main(String[] args) { | |
int[] array = new int[3]; | |
array[0] = 100; | |
modifyArray(array); |
This file contains hidden or 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 PassByRef { | |
public static void main(String[] args) { | |
int[] array = new int[3]; | |
array[0] = 100; | |
modifyArray(array); |
This file contains hidden or 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
/* | |
This is the code written on the board | |
during lecture Monday 5/22/17. | |
CSC 142 | |
Dr. Reid | |
*/ | |
public class FY { | |
public static void shuffle(String[] a) { |
This file contains hidden or 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.io.*; | |
import java.util.*; | |
public class WeatherData { | |
public static void main(String[] args) throws FileNotFoundException { | |
File f = new File("weather.txt"); | |
Scanner in = new Scanner(f); | |
This file contains hidden or 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.io.*; | |
public class Directory { | |
private static void crawl(File f, int indent) { | |
// Always print the name of the File object, with appropriate indentation | |
for(int i=0; i<4*indent; i++) { | |
System.out.print(" "); | |
} | |
System.out.println(f.getName()); |
This file contains hidden or 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
data_path: "/Users/charles/fuel_data" | |
floatX : "float32" |
This file contains hidden or 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
$ python3 numpy_array_timing.py | |
Using TensorFlow backend. | |
Approach 1 took 43.884194135665894 s | |
Approach 2 took 43.12157201766968 s | |
$ python3 numpy_array_timing.py | |
Using TensorFlow backend. | |
Approach 1 took 44.887431383132935 s | |
Approach 2 took 49.045594930648804 s |
This file contains hidden or 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 six | |
class Test(six.Iterator): | |
def __init__(self, init): | |
self.init = init | |
def __iter__(self): | |
return self | |
def __next__(self): |
This file contains hidden or 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 MinMaxAccount extends BankAccount { | |
private double minBalance; | |
private double maxBalance; | |
public MinMaxAccount(Startup s) { | |
super(s); | |
this.minBalance = getBalance(); | |
this.maxBalance = getBalance(); |
This file contains hidden or 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 SimpleTest { | |
public static void main(String[] args) { | |
System.out.println( (char)('a'+5) ); | |
} | |
} |