gauge.js 
100% native and cool looking animated JavaScript/CoffeeScript
gaugecoffee

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link
20 Helpful jQuery Methods you Should be Using 
data() / removeData()

Have you ever wanted to store some bit of information about an element? You can do that easily with the data() method. To set a value, you can pass in two parameters (a key and a value) or just one (an object).
1
2

$('#wrap').data('myKey', 'myValue');
$('#container').data({ myOtherKey : 'myOtherValue', year : 2010 });

To get your data back, just call the method with the key of value you want.
1
2

$('#container').data('myOtherKey'); //returns 'myOtherValue'
$('#container').data('year'); //returns 2010

To get all the data that corresponds with an element, call data without any parameters; you'll get an object with all the keys and values you've given to that item.
If you want to delete a key/value pair after you've added it to an element, just call removeData(), passing in the correct key.
1

$('#container').removeData('myOtherKey');

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link
query get I'd by class 
Doh.. If I get you right, it should be as simple as:

$('.test').click(function() {
alert( this.id );
});

You can just access the id property over the underlaying dom node, within the event handler.

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link
Basic authentication in web.py via attribute 
Here I demonstrate the process of Basic Authentication in web.py python web framework.

There is a proof of concept article provided in the main site,however I just thought doing the same via an attribute might be a cleaner solution.

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link
ffnet 
ffnet is a fast and easy-to-use feed-forward neural network training solution for python.

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link
data tables js link from row 
I'm creating a dataTables table to use as an archive of pages for a site that produces a comic strip. On that archives page, I'd like to have the title of the comic be a link to the page of that comic strip.

[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link
Flot, data from Python 
class engine_flot:
def GET( self, argv ):
print "[d] engine flot, argv(%s)" % argv
interface = argv
ipv4db = eq_db_ipv4.IPv4Database()

# check if interface is in LISTENERS, if yes, return
response = {}
response[ 'data' ] = ipv4db.g_interface_statistics( interface, 43 )
response[ 'label' ] = interface
web.header('Content-Type', 'application/json')
return json.dumps( response )




[ add comment ]   |  [ 0 trackbacks ]   |  permalink
jQuery Vector Map 
This project is a heavily modified version of jVectorMap. I chose to start fresh rather than fork their project as my intentions were to take it in such a different direction that it would become incompatibale with the original source, rendering it near impossible to merge our projects together without extreme complications.


[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link
Flot Examples 
Example of loading data dynamically with AJAX. Percentage change in GDP (source: Eurostat). Click the buttons below.

The data is fetched over HTTP, in this case directly from text files. Usually the URL would point to some web server handler (e.g. a PHP page or Java/.NET/Python/Ruby on Rails handler) that extracts it from a database and serializes it to JSON.


If you tell Flot that an axis represents time, the data will be interpreted as timestamps and the ticks adjusted and formatted accordingly.

The timestamps must be specified as Javascript timestamps, as milliseconds since January 1, 1970 00:00. This is like Unix timestamps, but in milliseconds instead of seconds (remember to multiply with 1000!).




[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link
webpy, json 
import web
#import json
import simplejson as json #RHEL5/EPEL

class index:
def GET(self):
pyDict = {'one':1,'two':2}
web.header('Content-Type', 'application/json')
return json.dumps(pyDict)


[ add comment ]   |  [ 0 trackbacks ]   |  permalink  |  related link

<<First <Back | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Next> Last>>