Skip to content

Instantly share code, notes, and snippets.

View sgharms's full-sized avatar

Steven G. Harms sgharms

View GitHub Profile
diff --git a/public/javascripts/custom/application.js b/public/javascripts/custom/application.js
index 6d55e23..51fd890 100644
--- a/public/javascripts/custom/application.js
+++ b/public/javascripts/custom/application.js
@@ -4,3 +4,8 @@ window.App = Ember.Application.create({
}
});
+App.FunView = Ember.View.extend({
+ templateName: 'fun',
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stevengharms.algoclass</groupId>
<artifactId>assn1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>assn1</name>
@sgharms
sgharms / Using printerX function
Created January 10, 2013 20:10
Demonstrating some of the interesting challenges in C programming. To clarify these concepts I referred to: http://www.geeksforgeeks.org/memory-layout-of-c-program/.
saw a length of 12 for clone 'Hello, World'
saw a length of 12 for clone 'HeXYo, World'
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block}a{color:#1863a1}a:visited{color:#751590}a:focus{color:
_move: function( direction, filter, event ) {
var next, wrapItem;
var activeSubmenu = this.active;
var activeSubmenusParentMenubarItem = activeSubmenu.closest( ".ui-menubar-item" );
//var nextSelection
debugger;
if ( this.open ) {
next = [ direction + "All" ]( this.options.items ).first().children( ".ui-menu" ).eq( 0 );
#!/usr/bin/env ruby
class Hero
attr_reader :name, :provenance, :hit_points
def initialize(name, prov, occupation_role, init_hit_points=nil)
@name = name
@provenance = prov
@occupation_role = occupation_role
@hit_points = init_hit_points || 1;
@sgharms
sgharms / resto.rb
Created October 4, 2012 16:11
Delegators and composition in Ruby
class Kitchen
def prepare_hamburger
return ( %w/ artisinal_bun niman_ranch_beef cowgirl_creamery_bleu_cheese lettuce central_valley_avocado/.
join ', ' ) + " hamburger."
end
def generate_mixin
Module.new do
def prepare_hamburger
puts "Enjoy a: " + @kitchen.prepare_hamburger
/* Define the namespace, models, views, and controllers */
window.App = Ember.Application.create({
ApplicationController: Ember.Controller.extend({
mockAjaxCall: function(){
// Imagine this in a $.ajax.success return call
console.log("Mocking the AJAX GET call for playerData");
Ember.run.later(this, function(){
this.set('playerData',
// vim: set ft=javascript sw=4 :
window.App = Ember.Application.create({
ApplicationController: Ember.Controller.extend(),
ApplicationView: Ember.View.extend({
templateName: 'application',
click: function(event) {
console.log('appView saw a click');
@sgharms
sgharms / j
Created August 21, 2012 04:49
test:w