This file contains 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 HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script type="text/javascript" src="https://github.com/phstc/jquery-twitter/raw/master/src/jquery.twitter.js"></script> | |
<script> | |
/* | |
@pablocantero | |
http://pablocantero.com |
This file contains 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
/* | |
@pablocantero | |
http://pablocantero.com | |
https://github.com/phstc/jquery-twitter/ | |
*/ | |
(function(){ | |
/* | |
Customized callback to show an error message on the tweets's lookup | |
This callback is optional, the default error callback shows an alert(errorMessage) |
This file contains 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
javascript:(function(){ | |
/*@author Pablo Cantero - http://pablocantero.com/blog/2010/09/15/javascript-para-notificar-se-o-site-teve-alteracoes*/ | |
var xmlHttp = getXMLHttpObj(); | |
if(xmlHttp == null){ | |
alert('Failed to load XMLHTTP'); | |
return; | |
} | |
var actual = getPageContent(xmlHttp, window.location.href); | |
var intervalId = window.setInterval(function(){ | |
var current = getPageContent(xmlHttp, window.location.href); |
This file contains 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
javascript:(function(){ | |
/*@author Pablo Cantero - http://pablocantero.com/blog/2010/12/20/isfollowing-bookmarklet-who-is-following-who*/ | |
var isFollowing = function(twitterScreenNameA, twitterScreenNameB){ | |
jQuery.getJSON('http://twitter.com/statuses/followers.json?screen_name=' + twitterScreenNameA + '&callback=?', function(data){ | |
for(var i = 0; i < data.length; i++){ | |
if(data[i].screen_name === twitterScreenNameB.replace('@', '')){ | |
alert(twitterScreenNameB + ' is following ' + twitterScreenNameA); | |
return; | |
} | |
} |
This file contains 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
public interface Dao {} | |
public class JpaDao implements Dao {} | |
public class ProductService { | |
private Dao dao; | |
public ProductService(Dao dao){ | |
this.dao = dao; | |
} | |
} |
This file contains 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
#Apply this monkey patch in your application.rb | |
#See: https://github.com/andre/geokit-gem/issues#issue/7 | |
module Geokit | |
require 'uri' | |
module Geocoders | |
class Geocoder | |
def self.logger() | |
if Geokit::Geocoders::logger.nil? | |
Geokit::Geocoders::logger = Logger.new(STDOUT) | |
Geokit::Geocoders::logger.level=Logger::DEBUG |
This file contains 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 com.cantero.quickbooks.ws; | |
import java.util.ArrayList; | |
import javax.jws.WebService; | |
/* | |
* http://developer.intuit.com/qbsdk-current/doc/pdf/qbwc_proguide.pdf | |
*/ | |
@WebService(endpointInterface = "com.cantero.ws.client.QBWebConnectorSvcSoap") |
This file contains 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
#These Ruby OOP examples, are based on the Rails 3 presentation by @guilhermecaelum | |
class Person | |
#the attribute name is immutable | |
def initialize(name) | |
@name = name | |
end | |
def name | |
@name | |
end | |
end |
NewerOlder