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.util.Scanner; | |
public class MySizes2 { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println("Please input your pant size: "); | |
int number = input.nextInt(); | |
if (number == 10) { | |
System.out.println("Small pants"); |
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.util.Scanner; | |
public class forLoop { | |
public static void main(String[] args) { | |
for (int counter = 1; counter <= 5; counter++) { | |
char c; | |
Scanner scan = new Scanner(System.in); | |
System.out.println("Please Input your grades, only use one letter."); | |
try { | |
String s = scan.next(); |
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.util.Scanner; | |
import java.util.Random; | |
public class JavaGame { | |
public static void main(String[] args) { | |
System.out.println("Hello, Welcome to my guessing game! Input a number and see if your guess was correct."); | |
Scanner input = new Scanner(System.in); | |
int user_guess = input.nextInt(); | |
Random random = new Random(); | |
int genNumber = random.nextInt(10); |
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
// Write code for a parent class that contains at least three variables of at least two types, | |
// and at least one method. | |
// Create at least three new classes based on your parent class, and modify the objects they contain as needed. | |
// Create a package to bundle your classes. Write source code files for the classes in your package. | |
package MyPackage; | |
import java.util.Scanner; | |
class aircraft { | |
int passengers; // Numbers of people | |
int cruiseSpeed; // Speed of aircraft |
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
#!/bin/bash | |
#updates dependencies | |
cat versions.json | \ | |
jq -r '.devDependencies | keys[]' | \ | |
xargs -I {} npm i -S {}@latest | |
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
#!/bin/bash | |
#updates dependencies | |
echo "This is a program to update you NPM dependencies" | |
echo "Here are the current versions of your dependencies" | |
cat versions.json | \ | |
jq -r '.devDependencies' | |
echo "Would you like to update your dependencies to the latest version." | |
read answer |
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
#!/bin/bash | |
#updates dependencies | |
echo "This is a program to update you NPM dependencies" | |
echo "Here are the current versions of your dependencies" | |
cat versions.json | \ | |
jq -r '.devDependencies' | |
echo "Would you like to update your dependencies to the latest version." | |
read answer |
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
#updates dependencies | |
echo "This is a program to update you NPM dependencies" | |
echo "Here are the current versions of your dependencies" | |
cat versions.json | \ | |
jq -r '.devDependencies' | |
echo "Would you like to update your dependencies to the latest version." | |
read answer | |
if [ ${answer} = 'y' ]; | |
then |
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 main | |
import ( | |
"bufio" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/hex" | |
"fmt" | |
"io" |
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 main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
func main() { |