Skip to content

Instantly share code, notes, and snippets.

@A-J-C
A-J-C / dabblet.css
Last active August 29, 2015 14:16
Untitled
<html lang="en"><head>
<meta charset="utf-8">
<title>SANBOG.COM</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/assets/css/base.css">
<link rel="stylesheet" href="/assets/css/layout_ss.css">
<!--[if lt IE 9]>
<script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script src="/assets/js/dhtml.js"></script><style type="text/css"></style>
@A-J-C
A-J-C / TowerOfRandomness
Created September 5, 2013 19:42
This is for AdvancedJSCoders from Codecademy. This is the code for the challenge in Java and works when run in eclipse.
import java.util.Scanner;
public class TowerOfRandomness {
public static void main(String[] args) {
System.out.println("Welcome to Random Tower! \nWhat is the scope of your tower?: ");
int a = new Scanner(System.in).nextInt();
System.out.println("What is the height of your tower?: ");
int b = new Scanner(System.in).nextInt();
System.out.println("Ok. Generating a tower of 4 numbers between 1 and "+a+"...\n");
for(int i=0;i<b;i++){System.out.println((int) Math.floor(Math.random()*a+1));}
System.out.println("Tada!");
int randA = getInt(); //Random x position
int randB = getInt(); // Random y position
for (int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
if (a == randA && b == randB) addObject(new BaseCamp(), a, b);
else setLand(a, b);
}
} // Loop populating the 10 x 10 grid with different land types apart from one space which is for the 'BaseCamp'
@A-J-C
A-J-C / PythonMOOC
Last active December 18, 2015 21:19
<!DOCTYPE html>
<html>
<head>
<title>Video Attributes</title>
</head>
<script>
function speed(x){
var myVid=document.getElementById("pythonVid");
myVid.playbackRate=x;
@A-J-C
A-J-C / script.js
Created June 1, 2013 21:59
A CodePen by Alex C.
function splitFLI(name) {
var names = name.split(" ");
var fullNameLength = names.join("").length;
var initials = "";
var i;
for (i = 0; i <= names.length - 1; i++) {
initials += names[i][0].toUpperCase();
}
console.log("Your first name is " + names[0] + " and your surname is " + names[names.length - 1] + ". Your initials are " + initials + ".");
return fullNameLength;
@A-J-C
A-J-C / index.html
Created June 1, 2013 21:33
A CodePen by Alex C. Backlight Message - Click the press button to make a special message come to life!
<body>
<div id="press_button">Press</div>
<div id="space"><div id="line"></div><div id="time"></div>Don't for get to read all the articles on how to be a better person. It might come in handy! Or not...</div>
</body>
@A-J-C
A-J-C / index.html
Created June 1, 2013 21:31
A CodePen by Alex C. LogIn screen - A simple login in screen to test out css and some jQuery.
<body>
<!-- log in box -->
<div id="hint1"><h3>username: master</h3></div>
<div id="hint2"><h3>password: 123456789</h3></div>
<div id="center">
<div id="form_sheet">
<div id="form_title"><h2>Note Book</h2></div>
<div id="message_login"></div>
<input type="text" name="name" id="name" placeholder="username" />
@A-J-C
A-J-C / index.html
Created May 31, 2013 18:20
A CodePen by Alex C. Building a Calculator
<!DOCTYPE html>
<html>
<head>
<title>Calculator</title>
<link rel="stylesheet" href="style.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<div id="calculator">
@A-J-C
A-J-C / index.html
Created May 30, 2013 21:18
A CodePen by Alex C. Password timer
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css"/>
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<input type="password"/>
<label id="password-label">Enter a Password</label>
</body>
@A-J-C
A-J-C / index.html
Created May 30, 2013 20:34
A CodePen by Alex C.
<!DOCTYPE>
<html>
<head>
<title>My Website</title>
</head>
<body>
<div id = "container">
<h1>Welcome to My Website</h1>