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
| package hoffrocket | |
| import _root_.net.liftweb.mapper._ | |
| import _root_.java.sql.{PreparedStatement,Types, Connection,DriverManager} | |
| import scala.collection.mutable.HashMap | |
| import _root_.net.liftweb.util._ | |
| import Helpers._ | |
| /** |
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 profilePic(selector, id){ | |
| var element = $j(selector); | |
| var oldId = element.attr('uid'); | |
| if (oldId != id){ | |
| element.attr('uid',id); | |
| FB.XFBML.Host.addElement(new FB.XFBML.ProfilePic(element.get(0))); | |
| } | |
| } |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> | |
| <head> | |
| <title>foo</title> | |
| </head> | |
| <body style="overflow:hidden"> | |
| <div id="FB_HiddenIFrameContainer" style="display:none; position:absolute; left:-100px; top:-100px; width:0px; height: 0px;"></div> | |
| <script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> |
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
| require 'rubygems' | |
| require 'twitter' | |
| require 'mechanize' | |
| consumer_token = 'token' | |
| consumer_secret = 'secret' | |
| twitter_name = ARGV[0] | |
| twitter_password = ARGV[1] |
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
| case class Tree[A](datum:A, children:List[Tree[A]]) { | |
| def map[B](fn: A => B): Tree[B] = { | |
| new Tree[B](fn(datum),children.map(_.map(fn))) | |
| } | |
| def foreach(fn: A => Unit) { | |
| fn(datum) | |
| children.foreach(_.foreach(fn)) | |
| } | |
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
| class BinaryTree[A <% Ordered[A]]private (datum: A,less: Option[BinaryTree[A]],more: Option[BinaryTree[A]]) { | |
| def this(datum: A) = this(datum, None,None) | |
| def add(a: A):BinaryTree[A] = { | |
| def addTo(branch: Option[BinaryTree[A]]) = Some(branch.map(_.add(a)).getOrElse(new BinaryTree(a))) | |
| if (a <= datum) | |
| new BinaryTree(datum, addTo(less), more) |
NewerOlder