Exooöl's blog

Smile and Love

It’s easier to smile
Or more difficult to love
For a smile takes one
Love takes two

But if you have someone to smile together
You all smile better

English

Temporary notes/links of memo

For quick adding notes of links across the internet!

English

An MySQL Procedure for ampache

Below is an procedure used to insert data to the rating of ampache for initialization purpose.

DROP PROCEDURE IF Exists initRatingForXo;

delimiter //
CREATE PROCEDURE initRatingForXo()
BEGIN
DECLARE max INT;
DECLARE curss INT;
SET max = 17193;
SET curss = 0;
start transaction;
WHILE max > curss DO
SET curss = curss + 1;
insert into rating (user,object_type,object_id,rating) values ( 2,'song',curss ,0);
END WHILE;
commit;
END//# MySQL returned an empty result set (i.e. zero rows).

English

Some notes

Time flies as it's another month passing by, and it will be too long if I do not post anything for more than a month.
Here are some simple notes.

01, svn: OPTIONS of 'https://svn.test:1991/prj1': SSL handshake failed: SSL error: An unexpected TLS packet was received. (https://svn.test:1991)
-->Possible solution: restart apache.
For server of older brothers of wheezy, use /etc/init.d/apache2 restart, else use service apache2 restart

English

When JQuery binded or lived events are triggered multiple times

For a code piece like this:

var clicked = function(){
alert('clicked')
}
$(".click").live("click",clicked);

The "clicked" function could be triggered multiple times in certain circumstance, on which I haven't research further yet.
But one solution to this is to remove the binded event before binding/live it, sth like:

$(".click").die("click").live("click",clicked);

or

$(".click").unbind("click").bind("click",clicked);

English

Change a column which is or has a foreign key in MySQL

When trying to change(alter) a column which is a foreign or has a foreign in MySQL, an error info like below shows up:

Error
SQL query:
ALTER TABLE `city` CHANGE `CountryCode` `CountryCode` CHAR( 3 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''
MySQL said:
#1025 - Error on rename of './test/#sql-82d_2cb' to './test/city' (errno: 150)

English

Xorg using abnormal high cpu in Debian wheezy with official Nvidia GeForce G105M driver of version 285.05

I re-installed my system with Debian Wheezy the other day. And then downloaded and installed the official Nvidia graphic driver for my GeForce G105M card. The driver version is 285.05.09 Certified published on 2011.10.05.
But unfortunately, the system became quite slow with many applications like nautilus, chrome, firefox etc. The symptoms were:
1. It's very slow to open new tab in chrome/nautilus, or to switch between tabs. It could takes several seconds!

English

P.O.D - Set It Off

.....
RISE (3x)
Set it off
chorus (2x)
RISE - Let your spirit fly (3x)
RISE - Let your spirit fly (3x)
Our time has come
Set it off

Undefined

Untitled

以宇宙之大,一切偶然都是必然

我一路乘船、火车回家。穿过了广袤的国土。看到了稻田、鱼塘、水渠、绿树掩映下粉墙绰约村镇组成的田园风光;看到了一个接一个嘈杂拥挤、浓烟滚滚的工业城市;看到了连绵起伏的著名山脉,婉蜒数千公里的壮丽大川;看们了成千上万、随处可遇的开朗的女孩子

Don't be evil.

我们站在大路上,向天空望着,看见太阳照耀着就会快乐

I see no heaven, yet no hell, only a vivid world in my eyes

你走在这繁华的街上,在寻找你该去的方向,你走在这繁华的街上,再寻找你曾拥有的力量

It is no use driving faster if you can't stay on the road

做人如果没有梦想,跟咸鱼有什么分别

Hello.Healty.Energy.-Skill-.Money.Life.Freedom.Love.Peace.Goodbye

飞得起来,都飞得起来,碧海蓝天,只等风的到来

在某些方面,我很敏感

每一个人都是天才,但不是每个人都是天使

Sorry, I loved you

Undefined

Pages

Subscribe to RSS - Exooöl's blog