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
def search_method_2(num_pass_wheels): | |
global totalguesses | |
result = False | |
starttime = time.time() | |
tests = 0 | |
still_searching = True | |
print("Using method 2 and saerching with "+str(num_pass_wheels)+" password wheels.") | |
wheel = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" | |
if(num_pass_wheels > 8): |
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
def search_method_1 (num_digits): | |
global totalguesses | |
result = False | |
a = 0 | |
starttime=time.time() | |
print("Using method one and searching for "+str(num_digits)+" digitnumbers.") | |
while still_searching and a<(10**num_digits): | |
ourguess = leading_zeros(a,num_digits) | |
tests = tests + 1 |
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
package userinput; | |
import javax.swing.JOptionPane; | |
public static void main(String[] args) { | |
} |
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
sudo/etc/int.d/apache2stop | |
sudo/rm/etc/int.d/apache |
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
package velocity; | |
import java.util.Scanner; | |
public class Velocity { | |
public static void main(String[] args) { | |
Scanner reader = new Scanner(System.in); | |
double Momentum; | |
double Mass; | |
double Velocity; | |
System.out.print("Enter mass: "); | |
Mass = reader.nextDouble(); |
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
package payroll; | |
import javax.swing.JOptionPane; | |
public class PayRoll { | |
public static void main(String[] args) { | |
String inputString; | |
String name; | |
int hours; | |
double payRate; | |
double grossPay; | |
name = JOptionPane.showInputDialog("What is " + |
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
package barchart; | |
import java.util.Scanner; | |
public class BarChart { | |
public static void main(String[] args) | |
{ | |
// declare a double array | |
double[] store = new double[5]; | |
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
// PrimeNumber.java: Print first 50 prime numbers | |
public class PrimeNumber { | |
/** Main method */ | |
public static void main(String[] args) { | |
final int NUM_OF_PRIMES = 50; | |
int count = 1; // Count the number of prime numbers | |
int number = 2; // A number to be tested for primeness | |
boolean isPrime = true; // Is the current number is prime? | |
System.out.println("The first 50 prime numbers are \n"); |