So one of the side effect of hanging around with hackerspacekl too much is, one begin to develop feeling toward hacking hardware... Which in one of my post shows their project creating their own arduino severino.
I got myself freeduino thanks to Kakeman, our resident hardware guru in hackerspacekl. It is not the latest, but it is good enough. After following the tutorial, I begin to feel to blink a LED, which built into the board
link.
Then I play around with the serial library,
link
In the end of the day it is fun, much before I continue, I need to find time to get a breadboard and more components, like LED,transistors, resistors etc, to make more stuff. Think i am going to play with this for a long time to come
this is a place where i put my thought of technology and things that i do.
Thursday, September 09, 2010
Saturday, September 04, 2010
Software Freedom Day KL status
It is a while since I actually started Software Freedom Day in KL. Since I am like swarmed with job. So finally get a few thing done
A bit of a status report for Software Freedom Day KL 2010
What we have:
What we don't have,
A bit of a status report for Software Freedom Day KL 2010
What we have:
- 17 attendee registered
- A space, in hackerspacekl
- A switch for the LAN party
- A site at https://sites.google.com/site/sfdkl2010/
- And aircond(ok...hackerspacekl have it for sometime)
What we don't have,
- Speakers, for the sessions
- Helpers to help, not that the event need many people
So what next, if we have speaker, we just continue as planned, else, we might reschedule the whole thing it depends on how.
Tuesday, August 31, 2010
Doing ajax with django models serialization: jquery part
We have finished(somewhat) with our json source, now we can do ajax. With the help of jquery, we can use the data source to create something interactive. One of the key ingredient is the jquery ajax function, there is a few such as, $.post, $.get, $.getJSON etc. Here I use $.getJSON, because
Lets start with load data to a table from a json source last post.
Loading data into table alone is not that exciting, and you can do that using django templates, but this shows a example of loading data using json
You can get the example project here
http://github.com/sweemeng/Sweemeng-django-example/tree/master/djangoajax/
You can get the example project here
http://github.com/sweemeng/Sweemeng-django-example/tree/master/djangoajax/
Tuesday, August 17, 2010
Software Freedom Day @ KL
Another year, another Software Freedom Day
I have registered a team for sfdkl, and the page is at https://sites.google.com/site/sfdkl2010/
It will be held on 19 Sept 2010, a Sunday, at hackerspacekl
And with the help of hackerspacekl, i borrowed the space for software freedom day. Which is cool, because there is a few place to eat there.
What we plan to do
What we need now, speaker, well attendee. And last but not least, participant for our Frag Fest(we even got a switch ready),
you can register on the google site page, add your talk there as well.
https://sites.google.com/site/sfdkl2010/
I have registered a team for sfdkl, and the page is at https://sites.google.com/site/sfdkl2010/
It will be held on 19 Sept 2010, a Sunday, at hackerspacekl
And with the help of hackerspacekl, i borrowed the space for software freedom day. Which is cool, because there is a few place to eat there.
What we plan to do
- Have a gathering of foss geeks on the day itself,
- Someone will give a talk on the day itself
- Frag fest aka Lan party of foss game, in the end of the day, this is the only event that is confirmed
- t will also be held with a unix-g33kz session which is part of hackerspacekl own project, while this is payed project, the rest of the event is not
What we need now, speaker, well attendee. And last but not least, participant for our Frag Fest(we even got a switch ready),
you can register on the google site page, add your talk there as well.
https://sites.google.com/site/sfdkl2010/
Friday, July 09, 2010
Doing ajax with django models serialization: json part
Finally a technical post after a long while, here goes
On my new job, the site requires a crazy level of interactivity, probably for the wrong reason, but lets not go there now.
Along the way, we decide to use a mix of javascript, and html, with a help of json. Thats is where, django serialization comes in. What it does is, it serialize a django queryset into xml or json. If i need to use that to generate json for django queryset, because simplejson cannot do it, not directly.
To output a queryset to json is pretty easy.
from django.core import serializers
data = serializers.serialize('json', queryset)
where queryset your djangoqueryset
in a sample database, in a called addressbook
to play around with the django shell, assume that data already there
>>> from django.core import serializers
>>> from addressbook.models import Contact
>>> serializers.serialize('json', Contact.objects.all())
[{"pk": 1, "model": "addressbook.contacts", "fields": {"phone": "012345678", "post_code": "68100", "name": "sweemeng", "address": "somewhere in selayang"}}]
To make it useful for my purpose to use in a javascript, i need to put this into a views, point your urls.py to the views, and run the server, and point your browser to it, you should able to see a json output
But here is the catch, one, this is strictly only for serializing django queryset, you can still use simplejson for other type of data. two it seems that django serializer don't serialize a single model instance.
Next post, using it with a jquery
more information on django serialization
from django.core import serializers
data = serializers.serialize('json', queryset)
where queryset your djangoqueryset
in a sample database, in a called addressbook
to play around with the django shell, assume that data already there
>>> from django.core import serializers
>>> from addressbook.models import Contact
>>> serializers.serialize('json', Contact.objects.all())
[{"pk": 1, "model": "addressbook.contacts", "fields": {"phone": "012345678", "post_code": "68100", "name": "sweemeng", "address": "somewhere in selayang"}}]
To make it useful for my purpose to use in a javascript, i need to put this into a views, point your urls.py to the views, and run the server, and point your browser to it, you should able to see a json output
But here is the catch, one, this is strictly only for serializing django queryset, you can still use simplejson for other type of data. two it seems that django serializer don't serialize a single model instance.
Next post, using it with a jquery
more information on django serialization
Subscribe to:
Posts (Atom)
