Skip to content

Instantly share code, notes, and snippets.

View hvent90's full-sized avatar

Henry Ventura hvent90

View GitHub Profile

keybase.md

<!DOCTYPE html>
<html>
<head>
<title>Puppy Pictures</title>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-2.1.1.js"></script>
<style>
</style>
<script>
</script>
@hvent90
hvent90 / gist:cd069f51f52ec52d015f
Created October 13, 2014 02:04
click events and anonymous functions
<!--before-->
<script>
$(document).ready(function(){
$('.text_1').click(function() {
$("p").prependTo( $(".text_3")); // The following code CLONES rather than "moves" the text: $("p").clone().prependTo(".text_3");
$('.text_2').click(function() {
$("h3").prependTo( $(".text_4"));
});
});
http://bit.ly/1wEsYYo
$(document).ready(function() {
1. Fade in (a) upon load
$('#a').hide();
$('#a').something-here();
2. Fade out (b) upon clicking (b)
3. If (c) has been clicked by the user AND THEN the user clicks (d), output 'hello' to (e)
<html>
<head>
<!-- CSS & jQuery for Bootstrap and jQuery -->
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- Custom Javascript Files -->
<link href="css/custom.css" rel="stylesheet" />
<style>
<html>
<head>
<!-- CSS & jQuery for Bootstrap and jQuery -->
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- Custom Javascript Files -->
<link href="css/custom.css" rel="stylesheet" />
<style>
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: java.util.NoSuchElementException: key not found: 3
at scala.collection.MapLike$class.default(MapLike.scala:228)
at scala.collection.AbstractMap.default(Map.scala:58)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: com.mongodb.MongoException: error on invocation of $where function:
JS Error: TypeError: Array.isArray is not a function nofile_a:0
at com.mongodb.MongoException.parse(MongoException.java:82)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "/54.86.92.124:27017" , "ok" : 0.0 , "errmsg" : "can't drop collection with reserved $ character in name"}
at com.mongodb.CommandResult.getException(CommandResult.java:71)
at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)