Movies
Movies I liked
- Trouble the water
Computer Stuff
Writing down things I've learned. Some miscellaneous stuff are:
- AJAX example: Checks if the username you entered is taken.
- Javascript example: Drag choices up and down.
MySQL
Problem I have a bunch of text files from USDA, which contain bits and pieces USDA ASCII databases. I want to put them into mysql.
Solution
1. I found schema.sql that Erik created, so I'm going to borrow it rather than creating my own.
mysql databasename < schema.sql -p
Problem:
mysql> create database newdatabase;
ERROR 1044 (42000): Access denied for user 'user'@'localhost'...
Solution:
1. Check grants for 'user'@'localhost' in mysql:
mysql> show grants for 'user'@'localhost';
2. Log into mysql as root (has all privileges) and change grants for a specific user:
mysql> grant all privileges on *.* to 'user'@'localhost';
Query OK, 0 rows affected (0.00 sec)
3. Log back into mysql as user (now has all privileges) and try creating a new database again.
Django
- Tried setting up Django on my computer by following this tutorial
Problem:
It worked mostly ok but I couldn't go further than the second to the last coding box on page 4. I kept getting long error messages.
Solution:
Django tutorial about django.contrib.admin
1. Check if I typed in the correct codes.
2. Check if the output are the same everwhere:
Although the codes were correct, they didn't create all the necessary things, so it couldn't find the index.html.
- I went to setting.py to specify:
- the absolute path for Template_Dir. Don't forget the , after '/path/' .
- two additional Installed_Apps: myprj_myapp (where I save my project) and django.contrib.admin . Run python manage.py syncdb afterwards.
This created myapp_post and django_admin_log in mysql database.
Javascript
HTML
Problem:
I didn't know what <form name="form1"> meant.
Solution:
"A form is an area that can contain form elements.
Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form." とほほのjavascript