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> | |
<title>Query string</title> | |
</head> | |
<body> | |
<?php | |
echo $_GET ["message"]; | |
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
var i = 2; | |
function numberFunction(number) { | |
var sum = 0; | |
if(number<1){ | |
console.log("Enter a positive whole number greater than 0"); | |
}else{ | |
for (count = number; count>0; count--) { | |
sum = sum + count; | |
if(count != 1){ |
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
var shade = process.argv[2]; | |
switch(shade) { | |
case "black": | |
console.log("You chose black"); | |
break; | |
case "white": | |
console.log("You chose white"); | |
break; | |
default: |
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
var i = 2; | |
for (i; i < process.argv.length; i++) { | |
if (process.argv[i] == "black") { | |
console.log("You chose black"); | |
} else if (process.argv[i] == "white") { | |
console.log("You chose white"); | |
} | |
} |
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
function createUsername(firstName, secondName) { | |
var username = firstName[0] + secondName; | |
console.log("Hi " + username); | |
}; | |
createUsername("john", "smith"); |
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
$username = $_POST["uname"]; | |
$password = $_POST["pword"]; | |
$con = mysqli_connect("localhost", "student", "", "ryan04"); | |
//check connection | |
if (mysqli_connect_errno()) { | |
echo "Failed to connect to MySQL: " . mysqli_connect_error(); | |
} 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
var i = 3; | |
while(i < process.argv.length){ | |
console.log(process.argv[i] + " " + process.argv[i+1]); | |
i=i+2 | |
} |
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 CareWorker { | |
private String firstName; | |
private String secondName; | |
private String speciality; | |
private String manner="Polite"; | |
public CareWorker(String firstName, String secondName, String speciality){ | |
this.firstName = firstName; |
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 Doctor extends CareWorker { | |
private String manner = " and Informative"; | |
public Doctor(String firstName, String secondName, String speciality){ | |
super(firstName, secondName, speciality); | |
} | |
OlderNewer