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
//... | |
//create an array of all unique userids in the page | |
if(this.id != undefined) | |
{ | |
var username = this.id; | |
//add this object (div by default) that met the query parameters | |
//to a list to be altered later | |
if( GitHubRepos.displayObjects[username] == undefined) | |
{ |
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
//... | |
//for each unique user | |
for(var i in GitHubRepos.displayObjects) | |
{ | |
//format the github url for our given user and callback function | |
var github_url = format(GITHUB_JSON_URL, i, "GitHubRepos.DisplayRepos"); | |
//insert a script into the DOM to add our JSON data via the github url | |
//once the script loads it will callback the DATA_DISPLAY_FUCNTION |
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
<script src='http://github.com/api/v1/json/johnbender&callback=GitHubRepos.DisplayRepos' | |
type='text/javascript' > | |
</script> |
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
GitHubRepos.DisplayRepos({"user": {"name": "John Bender", "repositories": [{"owner": "johnbender", "description": "Unit testing with Ruby for simple C bits, or small pieces of larger projects.", "name": "ryc", "watchers": 1, "private": false, "url": "http://github.com/johnbender/ryc", "forks": 0, "fork": false, "homepage": ""}, {"owner": "johnbender", "description": "GitHub Blog Badges for Everyone", "name": "github-badges", "watchers": 1, "private": false, "url": "http://github.com/johnbender/github-badges", "forks": 0, "fork": true, "homepage": "http://drnicjavascript.rubyforge.org/github_badge/"}], "blog": "http://nickelcode.com", "login": "johnbender", "location": "New York, NY"}}); |
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
//add the repo data to the div using the template | |
this.DisplayRepos = function(data) | |
{ | |
//if we got properly formed data | |
if(data.user != undefined) | |
{ | |
var user = data.user; | |
//for all the div objects that correspond to that user | |
for(var j in GitHubRepos.displayObjects[user.login]) |
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
<div class="delicious-user-top-links" id="johndoe|erlang"> | |
</div> |
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
<script type='text/javascript'> | |
//FIRST | |
//script added before the remote resource call to delicious | |
//added dynamically with the right id | |
DeliciousTop.DisplayjohndoeLinks = function(data){ | |
DeliciousTop.DisplayLinks(data, 'johndoe|erlang'); | |
} | |
</script> | |
<script type='text/javascript' src='http://feeds.delicious.com/v2/json/nousplacidus/erlang?callback=DeliciousUserTop.DisplayjohndoeLinks'> |
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
mnesia:create_schema([somenode]), | |
mnesia:add_table_copy(Tab, somenode, Type) |
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
in function list_to_atom/1 | |
called as list_to_atom(["obj"]) | |
in call from erl_scan:scan/6 | |
in call from smerl:parse_func_string/1 | |
in call from smerl:add_func/3 | |
in call from grove_appmod:get_query/3 |