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 java.util.Scanner; | |
public class C5Sum { | |
public static void main(String[] args) | |
{ | |
Scanner input = new Scanner(System.in); | |
//Getting the number | |
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 java.util.Scanner; | |
public class C5Main { | |
public static void main(String[] args){ | |
Scanner input = new Scanner(System.in); | |
//System.out.print("Enter a number: "); | |
//int n= input.nextInt(); | |
for(int n = 1; n<=100; n++) |
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
private void CheckOut() { | |
try { | |
Class.forName("oracle.jdbc.driver.OracleDriver"); | |
Connection library = DriverManager.getConnection([VALID CONNECTION HERE]); | |
Statement stmt = library.createStatement(); | |
PreparedStatement preparedStmt=library.prepareStatement ("Update Book set bookcopies = bookcopies - 1 where booktitle="+jtfBookCheckedOut.getText()); | |
preparedStmt.executeUpdate(); |
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
String sqlCommands = "UPDATE Patron, Book " | |
+ "SET firstname = '"+ firstname +"', lastname = '"+ lastname +"', " | |
+ "bookcheckedout = '"+bookcheckedout+"', book.bookcopies = book.bookcopies - 1 " | |
+ "WHERE patronid = '"+ pid + "';"; |
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
private void UpdateSQL() { | |
String sid = jtfStaffId.getText(); | |
String firstname = jtfFirstName.getText(); | |
String lastname = jtfLastName.getText(); | |
String midinit = jtfMidInit.getText(); | |
String address = jtfAddress.getText(); | |
String city = jtfCity.getText(); | |
String state = jtfState.getText(); | |
String phone = jtfPhoneNum.getText(); |
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
/** View SQL commands */ | |
private void ViewSQL() { | |
String sid = jtfStaffId.getText(); | |
if (connection == null) { | |
jtaSQLResult.setText("Please connect to a database first"); | |
return; | |
} | |
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
[URL="https://twitter.com/petergoodwin92"]Shrimper[/URL] | |
[URL="http://www.twitter.com/2noided"]Forest Whitaker[/URL] | |
[URL="http://www.twitter.com/cedwardslino"]Imaginary Threats[/URL] | |
[URL="http://www.twitter.com/londonhockey71"]jumptheshark[/URL] | |
[URL="http://www.twitter.com/SwedishPuma"]Swedish Puck Mafia[/URL] | |
[URL="http://www.twitter.com/AnthonyRescan"]Murray's Twitter[/URL] | |
[URL="http://www.twitter.com/aheavenlyforest"]Trance Kuja[/URL] | |
[URL="http://www.twitter.com/deficientmode"]Deficient Mode[/URL] | |
[URL="http://www.twitter.com/ceremonyhf"]Ceremony[/URL] | |
[URL="http://www.twitter.com/FyC_HR"]FyC[/URL] |