GJrdoq ('-' * 6)
Forked from Captain Anonymous's Pen zGojjx.
Forked from Captain Anonymous's Pen zGojjx.
A Pen by Tiffany White on CodePen.
$('a.link').click(function(){ | |
// `this` is an anchor DOM element in this context | |
// but it's not wrapped in a jQuery wrapper and doesn't | |
// have access to any of jQuery's helper methods. | |
var $a = $(this); | |
// once you wrap it in jQuery, it has access to them, | |
// for example to `.attr()`, `.prop()`, `.val()`, etc. | |
console.log('Clicked on', $a.attr('href')); | |
}); |
$(document).ready(function() { | |
$('#button').click(function() { | |
var toAdd = $('input[name=checkListItem]').val(); | |
$(".list").append('<div class="item">' + toAdd + '</div>'); | |
}); | |
}); | |
Explanation: | |
The HTML document has a form element with one text input control, The nameattribute value on the input tag is checkListItem. In addition to the form element, there is an element with id attribute value, button. This is the object that gets a binding to the click event listener. |
GJrdoq ('-' * 6)
Forked from Captain Anonymous's Pen zGojjx.
Forked from Captain Anonymous's Pen zGojjx.
A Pen by Tiffany White on CodePen.
import java.io.*; | |
class HelloWorld | |
{ | |
public static void main(String args[]) | |
{ | |
InputStreamReader sin = new InputStreamReader(System.in); | |
BufferedReader br = new BufferedReader(sin); | |
System.out.println("Type your name: "); | |
try{ |
angular | |
.module('angular-legacy-url', []) | |
.factory('AngularLegacyUrl', ['$window', function AngularLegacyUrlFactory($window) { | |
var getQueries = function (search) { | |
return search | |
.replace(/(^\?)/, '') | |
.split('&') | |
.reduce(function (sum, item) { | |
if ( item === '' ) { | |
return sum; |
https://gemma.herokuapp.com/ | |
https://github.com/freerange/mocha | |
http://www.meetup.com/OKC-Ruby/ | |
http://www.codenewbie.org/blogs/object-oriented-programming-vs-functional-programming | |
http://phoenix.thefirehoseproject.com/0.html | |
var userChoice = prompt("Do you choose rock, paper or scissors?"); | |
var computerChoice = Math.random(); | |
if (computerChoice < 0.34) { | |
computerChoice = "rock"; | |
} else if(computerChoice <= 0.67) { | |
computerChoice = "paper"; | |
} else { | |
computerChoice = "scissors"; | |
} console.log("Computer: " + computerChoice); |
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>About Me</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /> | |
<link rel="stylesheet" href="styles/main.css"> | |
</head> |
# put this in your .bash_profile | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
# Piece-by-Piece Explanation: | |
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
# the $PROMPT_COMMAND environment variable is executed every time a command is run | |
# see: ss64.com/bash/syntax-prompt.html |
This assumes you already have a Yeoman app and are ready for publishing
Create production directory & assets