15 Mart 2012 Perşembe

python csv to sql inserts

code below tells why i like python

#!/usr/bin/env python
import string
def main():
    file=open('yourfile.txt')
    for i in file:
        line=string.split(i,',')
        print "insert into your_table values ('%s','%s','%s');" % (line[0],line[1],line[2])

if __name__ == '__main__':
    main()

4 Ocak 2012 Çarşamba

bootstrap css library framework from twitter

Are you only coder like me ?
Can't you find good and cheap designer for your apps ?
Don't you want to bother with basic css and js tricks ?

http://twitter.github.com/bootstrap/ is your best friend.

Bootstrap is very easy to use css library from well known social platform twitter.

They are also using this library in their site.
I tried to implement bootstrap library in http://freedjangohosting.com

how to remove dublicates from your mysql table

nice mysql syntax for removing dublicates from your tables

strategy as follows

clone your table with
create table a as select * from b

truncate your table
truncate b

create unique index
create unique index u_indx1 on b (x,y,z)

insert all rows back to table with ignore
insert ignore into b select * from a

24 Ağustos 2011 Çarşamba

Django mysql innodb transaction

Development is really headache without transactions in database.



change your mysql database storage engine to innodb

and add commit on success annotation to your procedures in django to work with transaction enabled environment



http://djangosaur.tumblr.com/post/357759467/django-transaction-mysql-engine-innodb

25 Kasım 2010 Perşembe

Freelancer

Just launched my new freelance web site:
http://frlnc.com

All comments welcome.

Thanks.

Freelance Profiles,Freelance Job Opportunities

Just launched my new freelance web site:
http://frlnc.com

All comments welcome.

Thanks.

11 Ekim 2010 Pazartesi

how to download whole website with wget

wget is incredible software you don't any fancy program to download entire site for offline browsing

you can use wget -m WEBSITEURLTODOWNLOAD