avatar

Coderek's blog

Loneliness is the gift of life

今天帮同事解决了一个rails的问题。 这是一个会员的网站。每个准会员要先填写资料,然后交会员费才能成为正式会员。我们用session来存储他填写的资料,然后redirect到第三方的网站(我们用的是eNets)付款。成功付款后,eNets会redirect用户到我们事先给他们的一个付款成功的链接页面完成交易。前面的步骤都很好,就是当eNets转到我们的页面的时候,用户储存的session都不见…

Read more ››

The common practice is to create a repo user account (git) to host all the repository. So in principle, users or admin should not have the need to access it through SSH. But I did set it up for mysel…

Read more ››

blogger import到wordpress的文章,标题和内容都会有一个'>',可能原因是有一个html tag escape了。 解决的办法是,import到wordpress后在database里run: -- update posts update wp_posts set post_content=insert(post_content, 1, 1, '') w…

Read more ››

Pear Mail Queue 的docs有一个bug让我花了不少时间来fix。 本来想图个方便,直接直接run Mail Queue文档里的范例。但不管怎么都不能put mail到数据库。我用的是mysql的driver,唯一的错误就是一个unknown error。把PHP的error_display set成 E_ALL | E_STRICT,出来一大堆deprecated的错误。Mail…

Read more ››

In JavaScript, primitive types behave like objects. They use dot expression to access certain methods. For example var str = "abcd"; console.log(str.length); //4 But for object, every pr…

Read more ››

因为新工作的缘故这两天开始学习JavaScript。 一直在看David Flanagan的JavaScript: The Definitive Guide 6th Edition,收获颇丰。 以前在云风的博客上第一次看到closure这个词的时候就很好奇,但那篇介绍是以C作为例子,讲的也不是很清楚,所以一直都没搞懂closure这个东西。 现在读JavaScript,对这个closure算是有…

Read more ››

Computer science has some of the most colorful language of any field. In what other field can you walk into a sterile room, carefully controlled at 68°F, and find viruses, Trojan horses, worms, bugs…

Read more ››

Everybody should have a god in his heart. This god is not necessary to be Jesus or Buddha. Generally accepted idolism gave us an abstract interface, it’s up to us to implement our own God. Jesus and …

Read more ››

Seem like many people have encountered this daunting “data type mismatch in criteria expression” error, so do I. Some people have this when they wrote VB scripts in MS Access, but my case is not rela…

Read more ››

First off, welcome to the fraternity. There aren’t too many people who want to create stuff and solve problems. You are a hacker. You are one of those who wants to do something interesting. "When yo…

Read more ››

1 2 3 4 5 6 7 8