Quantcast
Channel: jhjguxin
Browsing latest articles
Browse All 14 View Live

Atomic Increment in Rails

Many times you are put in a situation that you need to increment an ActiveRecord attribute, but you need to make it Atomic to avoid any concurrency problems. Using the ActiveRecord#increment! is not...

View Article


使用Rcov计算Rspec在Rails3项目中的测试覆盖率

在计算机的世界里有很多这样的事物,咋一接触它们觉得很生涩,太难用,但如果坚持下来,稍稍领会其精神,就会发现这个东西实在是太好了。在我看来,测试算是其中之一吧。从真正写测试到现在已经有一段时间了,从开始觉得写它是费力不讨好的观念也逐步转变成没有它心里就不踏实的状态。前两天在看文章时发现“测试覆盖率”这个词语,也许它存在很久了,但对于我来说还是比较新鲜的东西,赶紧拿来尝试一番,顺便也对自己的测试代码进行...

View Article

设计响应式网站的十个热门框架(Which Responsive Frameworks are Designers Using?)

All the mathematics involved in creating a responsive website design can be exhausting and time consuming, but thankfully there’s a range of responsive frameworks available that make the process quick...

View Article

Web应用的缓存设计模式 — by robbin

ORM缓存引言 从10年前的2003年开始,在Web应用领域,ORM(对象-关系映射)框架就开始逐渐普及,并且流行开来,其中最广为人知的就是Java的开源ORM框架Hibernate,后来Hibernate也成为了EJB3的实现框架;2005年以后,ORM开始普及到其他编程语言领域,其中最有名气的是Ruby on rails框架的ORM -...

View Article

监视Rails进程内存泄漏的技巧

Rails应用比较容易遇到的两类性能问题:一类是Rails执行很慢,CPU消耗过高;另一类是Rails进程内存泄漏。解决这两类问题都需要你首先能够精确定位出现问题的代码,然后才知道如何对症下药。 一、如何监控Rails进程的执行性能...

View Article


分享一些资料(侧重Linux) –by D瓜哥

以前没有攒资料的习惯,这一两年才养成了这个习惯。有次和大学老师聊天,和她说攒了不少资料,她就让我分享给她看。后来和她进一步沟通,觉得整理一下,分给学弟学妹看也许对他们更有帮助。为了这个目标,把资料重新梳理了一下,并且添加了一点我个人对学习方法的理解,分享出来,希望对大家有所帮助!   本文章面向刚刚踏入挨踢行业的新手,高手可以直接飞过!当然,如果有好的资料,或者一些不同的看法,请留言交流!...

View Article

vagreant tutorial

vagreant tutorial this tutorial base on vagrant-tutorial and suit for ~> 1.2 vagrant, thanks author @gogojimmy what is vagreant Vagrant is a tool for building and distributing virtualized...

View Article

HOW TO CHECK AND FIND YOUR LINUX OS VERSION?

Linux and Unix operating systems comes in a wide range of flavors often bundled as different distributions by different vendors. Every one of these distribution also comes with an often pre-defined and...

View Article


通过show status 来优化MySQL数据库 from lxneng

1\. 查看MySQL服务器配置信息 mysql> show variables; 2\. 查看MySQL服务器运行的各种状态值 mysql> show global status; 3\. 慢查询 mysql> show variables like '%slow%'; +------------------+-------+ | Variable_name | Value |...

View Article


Firing and being fired –by vibhu norby

source form Firing and being fired I remember every detail from the day I was fired from my first post-college job. My manager pulled me into a meeting with the engineering director at the end of the...

View Article
Browsing latest articles
Browse All 14 View Live