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
if (tempToken != null) { | |
loginToken = parseToken(tempToken); | |
if (loginToken != null) { | |
// This creates our login information | |
List<NameValuePair> parameters = createParams(); | |
// Here we send the information to the server and login | |
String postResults = conn.postData("https://mytlc.bestbuy.com/etm/login.jsp", parameters); | |
// If we logged in properly, then we download the schedule | |
if (postResults.contains("etmMenu.jsp")) { | |
// Here is the actual call for the schedule |
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 tempToken = conn.getData(url + "/etm/login.jsp"); | |
if (tempToken != null) { | |
loginToken = parseToken(tempToken); | |
} else { | |
String error = parseError(tempToken); | |
if (error != null) { | |
showError(error); | |
} else { | |
showError("Error retrieving your login token, make sure you have a valid network connection"); | |
} |
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
'Validate first name | |
Dim passenger As String | |
If strFirstName.Length <= 30 Then | |
passenger = strFirstName + " " | |
Else : MessageBox.Show("First name must be less than 30 characters") | |
End If | |
'Validate middle initial | |
If strMiddleName Like "[aA-zZ]" Then |
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
Dim PassengerData As String | |
If strSSN.Length = 11 Then | |
PassengerData = strSSN + " " | |
Else | |
MessageBox.Show("Please enter a valid SSN") | |
Return | |
End If | |
If strFirstName.Length <= 30 Then |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
if (savedInstanceState == null) { | |
ssf = new StartStopFragment(); | |
tkf = new TimeKeeperFragment(); | |
rf = new ResetFragment(); | |
lcf = new LapCounterFragment(); |
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
if ($success) { | |
// DO SUCCESS STUFF | |
} else { | |
$errorInfo = $dbh->errorInfo(); | |
if ($errorInfo[1] == 1062) { | |
// DUPLICATE PIN | |
} | |
} |
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 GameRenderer { | |
private OrthographicCamera camera; | |
private SpriteBatch batch; | |
private SoundSprite sound; | |
private int score; | |
public GameRenderer() { | |
camera = new OrthographicCamera(); | |
camera.setToOrtho(true, 800, 600); |
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 Invoice { | |
private String partNumber = ""; | |
private String partDescription = ""; | |
private int quantity = 0; | |
private double pricePerItem = 0; | |
public Invoice(String partNumber, String partDescription, int quantity) { | |
this.partNumber = partNumber; | |
this.partDescription = partDescription; | |
this.quantity = quantity; |
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
//File Name: SourceCh3.cpp | |
//Author: Brandon Cabael | |
//Assignment : Chapter 3 | |
//Description: Create Rock Paper Scissors Game | |
//Last Changed: March 3, 2015 | |
//Including string for the P_1 and P_2 variables | |
#include<iostream> | |
#include<string> | |
using namespace std; | |
int main() |
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
Random r = new Random(); | |
int selectedCard = r.nextInt(52) + 1; // 51 is the maximum, 1 is the minimum | |
String suit = ""; | |
String card = ""; | |
int cardNum = 0; | |
if (selectedCard <= 13) { | |
suit = "Hearts"; | |
} else if (selectedcard <= 26) { |
OlderNewer