[Author: Dingyu] [Sun, 2013-08-18, 15:01] [1414 views]
In the database.yml, the code looks like:
# MySQL. Versions 4.1 and 5.0 are recommended.
# Install the MYSQL driver
# gem install mysql2
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5 ... see full article
[Author: Dingyu] [Thu, 2013-08-15, 14:46] [1586 views]
Basic Multithreading Concepts
Concurrency and Parallelism
In a multithreaded process on a single processor, the processor can switch execution resources between threads, resulting in concurrent execution. Concurrency indicates that more than one thread is making progress, but the threads are not act ... see full article
[Author: Dingyu] [Sun, 2013-08-11, 17:46] [1539 views]
If you wish to change your password by yourself but you don't have the SUPER privilege, below process may help you.
Your MySQL username is Nickname
Your current MySQL password is OldPassword
You wish to change your password to NewPassword
1. Log into the MySQL
If you are logging into ... see full article
[Author: Dingyu] [Sun, 2013-08-11, 17:44] [2607 views]
I know two ways to find records with non-printable characters in T-SQL. The first way, use the "like" statement to do it:
SELECT * FROM tableName
WHERE (columnName COLLATE Latin1_General_BIN2) like '%[^' + CHAR(32) + '-' + CHAR(126) + CHAR(9) + CHAR(10) + CHAR(13) + ']%'
The second way, use the "PAT ... see full article
[Author: Dingyu] [Sun, 2013-08-11, 17:43] [4015 views]
In Rails 3, the primary key in a database table is very important. Rails model ActiveRecord functions, like save, destroy, update_attributes, and so on, require it to invoke callbacks. Rails 3 uses the column 'id' as a default primary key in a database table. However, in MySQL, only the primary key ... see full article
[Author: Dingyu] [Sun, 2013-08-11, 17:43] [1333 views]
I copied this article from a Stockflow post. Click here to see the original Stockflow post.
Let's say you have a class Person.
person = Person.new
person.name # no method error
Obviously we never defined method name. Let's do that.
@name # simpl ... see full article