Older blog entries for sness (starting at number 5083)

Syncing Backbone Models in Real Time Over Socket.io | Flowdock

Syncing Backbone Models in Real Time Over Socket.io | Flowdock: "The New Flowdock was built from the ground up on top of Backbone.js. Since Flowdock is all about real-time messaging, our web app posts and receives messages via a Socket.io backend. To support saving messages through Socket.io instead of a REST API, we wrote a custom Backbone.sync method."

'via Blog this'

Syndicated 2013-02-04 04:46:00 from sness

javascript - Enable Django and Tastypie support for trailing slashes? - Stack Overflow

javascript - Enable Django and Tastypie support for trailing slashes? - Stack Overflow: "For a Backbone solution:

You can overwrite the default behavior of Model.url, even using the normal one and making a small modification like the one you are looking for:

// code simplified and not tested
var MyModel: Backbone.Model.extend({
url: function() {
var original_url = Backbone.Model.prototype.url.call( this );
var parsed_url = original_url + ( original_url.charAt( original_url.length - 1 ) == '/' ? '' : '/' );

return parsed_url;
}
});"

'via Blog this'

Syndicated 2013-02-04 04:45:00 from sness

django-backbone 0.2.3 : Python Package Index

django-backbone 0.2.3 : Python Package Index: "This app provides a Backbone.js compatible REST API for your models. It follows the Django admin pattern of extending, overriding and registering; and provides an extendable class based view for customization.

"

'via Blog this'

Syndicated 2013-02-04 04:40:00 from sness

Learn - Syncing Backbone.js with Django

Learn - Syncing Backbone.js with Django: "Backbone.js is a fantastic tool for adding structure to your complex JavaScript applications. It provides Models, Collections, Views and more that you can extend and build your intricate client-side code with. One powerful feature is Backbone's ability to automatically sync data to a RESTful server backend. This video will take you through three different ways to implement a RESTful API to sync your Django application with Backbone - using custom class-based views, using the Django Rest Framework toolkit, and using the Tastypie API toolkit."

'via Blog this'

Syndicated 2013-02-04 04:39:00 from sness

python - Iterating over a numpy array - Stack Overflow

python - Iterating over a numpy array - Stack Overflow: "for x in xrange(array.shape[0]):
for y in xrange(array.shape[1]):
do_stuff(x, y)"

'via Blog this'

Syndicated 2013-02-04 04:38:00 from sness

python - Iterating over a numpy array - Stack Overflow

python - Iterating over a numpy array - Stack Overflow: ">>> a =numpy.array([[1,2],[3,4],[5,6]])
>>> for (x,y), value in numpy.ndenumerate(a):
... print x,y"

'via Blog this'

Syndicated 2013-02-04 04:38:00 from sness

AppleKeyboard - Community Ubuntu Documentation

AppleKeyboard - Community Ubuntu Documentation: "A tar archive containing all workarounds can be found at (un-apple-keyboard)"

'via Blog this'

Syndicated 2013-02-04 00:41:00 from sness

Dev Addiction - Lab» Blog Archive » Backbone.js Tutorial – VI. Synchronization and persistence

Dev Addiction - Lab» Blog Archive » Backbone.js Tutorial – VI. Synchronization and persistence: "And finally we come to the last topic of the tutorial on Backbone.js, which will work to see the mechanisms of persistence and synchronization with the server that offers the library. In models we saw how we could create, modify and delete models in our application, but never said how we could send that information to the server to store or process it.

As we discuss in this topic, Backbone defines a default behavior that will help us keep the data synchronized between the client and server."

'via Blog this'

Syndicated 2013-02-03 23:13:00 from sness

Django: Parse JSON in my template using Javascript - Stack Overflow

Django: Parse JSON in my template using Javascript - Stack Overflow: "You could use the built-in json module:

>>> import json
>>> geodata = [ ( "Here", (1003,3004) ), ("There", (1.2,1.3)) ]
>>> json.dumps(geodata)
'[["Here", [1003, 3004]], ["There", [1.2, 1.3]]]'
You can then simply embed the resulting string inside a javascript script:

"

'via Blog this'

Syndicated 2013-02-03 22:42:00 from sness

jQuery Boilerplate

jQuery Boilerplate: "So, you've tried your hand at writing jQuery plugins and you're comfortable putting together something that probably works. Awesome! Thing is, you think there might be better ways you could be writing them - you've seen them done a number of different ways in the wild, but aren't really sure what the differences between these patterns are or how to get started with them."

'via Blog this'

Syndicated 2013-02-03 10:14:00 from sness

5074 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!