Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| // we will use weak references with the Rc<T> (reference counting pointer) type | |
| // weak references allow us to make references to a value that will -not- keep it alive | |
| // this is perfect in the intsance of children, as we will soon see | |
| use std::rc::{Rc,Weak}; | |
| use std::cell::RefCell; | |
| // this example builds upon the last by storing a vector of children as well as a parent | |
| #[derive(Debug)] | |
| struct Node { | 
| 个人简历 | |
| 个人基本信息 | |
| 姓 名: 彭秋源 性 别: 男 | |
| 联系方式: 15005917185 出生年月: 1989.11.02 | |
| 电子邮箱: [email protected] 毕业院校: 福建省闽江学院 | |
| 专 业: 软件工程专业 学 历: 本科 | |
| github : https://github.com/pengqiuyuan/ | |
| blog : http://blog.pengqiuyuan.com/ | |
| gitbook: https://www.gitbook.com/@pengqiuyuan/dashboard | |
| 求职意向 | 
| # 1. Make sure you have nginx sub module compiled in | |
| # nginx -V 2>&1 | grep --color=always '\-\-with\-http_sub_module' | |
| # 2. add two directives below at HTTP level | |
| # nginx.conf | |
| http { | |
| # ...... | |
| sub_filter '</head>' '<style type="text/css">html{ filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | 
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| package main | |
| import( | |
| "fmt" | |
| "reflect" | |
| ) | |
| func main(){ | |
| // iterate through the attributes of a Data Model instance | |
| for name, mtype := range attributes(&Dish{}) { |