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
<?php | |
function adminlogin() | |
{ | |
// Login function code | |
} | |
if (adminlogin()) | |
{?> | |
<h2>Welcome Admin</h2> | |
<a href=\"somescript.php\">Do some admin stuff!</a> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content="Cam"> | |
<title>Oliver Bray Music</title> |
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
function insuffFunds() { | |
var txt; | |
var r = confirm("You probably don't have enough to purchase the miniumum amount, continue?"); | |
if (r == true) { | |
alert("NOPE"); | |
} } | |
function sharebuy(){ | |
cash = prompt('How much money do you have?') // get cash amount | |
share = prompt('How much do shares cost?') //get share cost |
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
#include<iostream> | |
#include<vector> | |
int main() | |
try { | |
std::vector<int> vec{3,4,3,1}; | |
int i{vec.at(4)}; | |
} | |
//An exception handler, catches std::out_of_range | |
catch(std::out_of_range& e) { |
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
<!doctype HTML> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Add to TC News</title> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.4.2/pure-min.css"> | |
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script> | |
<style> | |
body { | |
width: 1600px; | |
margin-right: auto; |
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
<?php | |
// login as student, only select privilege | |
$username = "student"; | |
$password = ""; | |
$hostname = "127.0.0.1"; | |
//connect | |
$con = mysqli_connect($hostname, $username, $password, 'news'); | |
// check connection |
NewerOlder