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
| <?php | |
| if(isset($_GET['n'])): | |
| $n = $_GET['n']; | |
| else: | |
| $n = 3; | |
| endif; | |
| $set = "{"; | |
| for($i=1;$i<=$n;$i++): | |
| $set .= $i.","; |
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
| use.path("scripts/") | |
| use(["cui","dom","yql"], function(){ | |
| var lastfm = function() { | |
| var user = 'thinkphp', | |
| url; | |
| function init() { |
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(dom, event, yql) { | |
| var $ = function( id ){ return dom.select(id);}; | |
| cui.ready(function(){ | |
| var input = $("#in"), | |
| output = $("#out"); |
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
| import urllib | |
| import json | |
| import logging | |
| LASTFM_API_URL = 'http://ws.audioscrobbler.com/2.0' | |
| API_KEY = '2993c6e15c91a2890c2f11fa95673067' | |
| def get_recent_tracks(user): |
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
| define("lastfm", ["cui", "dom", "event", "yql"], function(cui, dom, event, Y ){ | |
| var _lastfm = function() { | |
| var user = 'thinkphp', | |
| url; | |
| function init() { |
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(["lastfm"], function( lastfm ) { | |
| lastfm.init().and().render() | |
| }); |
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(["cui","dom","event","jsonp","router"], function(cui, dom, evt, $, app){ | |
| //show me love to the module pattern | |
| var googlesearch = function(){ | |
| var f, | |
| resultscontainer, | |
| send, | |
| q, | |
| appid = 'B59F3913692A46D75ED39BA8F472DF267E24B611'; |
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
| use.path("../src/core") | |
| use(["cui","dom","event","jsonp","router"], function(){ | |
| //dom is available and ready to use | |
| var dom = cui.dom, | |
| //event is available and ready to use | |
| event = cui.event, |
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
| //show me love to the module pattern | |
| var googlesearch = function(){ | |
| /* defines the vars*/ | |
| //for google form | |
| var f, | |
| //for div container | |
| resultscontainer, |
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(["ready","dom","delegate"], function(r, dom, d){ | |
| var ready = r.ready, | |
| delegate = d.delegate; | |
| ready(function(){ | |
| delegate(dom.select("#menu"), 'li a', 'click', function( e ){ |