Logo
Our blog

Resources and insights

The latest industry news, interviews, technologies, and resources.
Beansmile Blog Cover
Sharing
Rails 时区操作
事先声明,本文操作均使用 PG 数据库,保存到数据库的时间不带时区。
Beansmile Blog Author Avatar
jane
22 Feb 2022
Beansmile Blog Cover
Sharing
总结项目遇到的几个问题
#### 1、线上用户串号
Beansmile Blog Author Avatar
jane
22 Feb 2022
Beansmile Blog Cover
Sharing
微信小程序码开发注意事项
本文详细介绍了微信小程序码开发的注意事项,包括Gem库、使用方法、scene参数限制、slug的重要性等内容。同时也包括了小程序端和小程序内扫码的处理方法,以及首次提交审核时的注意事项。
Beansmile Blog Author Avatar
hugo
18 Sep 2020
Beansmile Blog Cover
Sharing
Rails中Cookie和Session的关联
本文详细介绍了Rails中Session和Cookie的关联方式,以及通过cookie_store保存session的方式。讨论了直接设置Cookie、签名方式设置Cookie和加密方式设置Cookie的区别和实现方法。了解如何在响应中设置Set-Cookie Header以及Session数据到Cookie的处理过程。
Beansmile Blog Author Avatar
cain
04 May 2019
Beansmile Blog Cover
Sharing
DSL-让你的 Ruby 代码更加优雅
DSL是Ruby这门语言较为广泛的用途之一,不过如果不熟悉Ruby的元编程的话,难免会被这类语法弄得一脸蒙蔽。今天主要就来看看DSL它是个什么东西,它在Ruby社区中地位怎么样,以及如何实现一门简单的DSL。
Beansmile Blog Author Avatar
lan
20 Apr 2019
Beansmile Blog Cover
Sharing
Ruby中的闭包-代码块
在许多编程语言中都会有闭包这个概念。今天主要来谈谈Ruby中的闭包,它在这门语言中地位如何,以什么形式存在,主要用途有哪些?
Beansmile Blog Author Avatar
lan
11 Apr 2019
Beansmile Blog Cover
Sharing
[译] 你的 Rails 应用正确建立索引了吗
原文 [Faster Rails: Is Your Database Properly Indexed?](https://semaphoreci.com/blog/2017/05/09/faster-rails-is-your-database-properly-indexed.html)
Beansmile Blog Author Avatar
jayce
01 Apr 2019
Beansmile Blog Cover
Sharing
Eval家族的那些事儿
许多编程语言都会附带[eval](https://en.wikipedia.org/wiki/Eval)的功能,通常会出现在动态语言中,它就有点像是一个微型的解释器,可以在运行时解释代码片段。这篇文章主要以Ruby为例,详细介绍Ruby中的`eval`家族。
Beansmile Blog Author Avatar
lan
30 Mar 2019
Beansmile Blog Cover
Sharing
Memory allocation strategy for struct and union in C programming language
If you are writing program by C programming language, you may need to care about how many memories to allocate, and when you should deallocate them. That is a heavy work for programmers, but at the same time it is very interesting. You will recognize that when defining a `float` variable, how many memories we need to allocate? Why a function can modify extern variables by passing the pointer of them?
Beansmile Blog Author Avatar
lan
19 Mar 2019
Book Free 30-Min Call