React中的使用input时想让输入框有一个可修改的默认值,且该默认值跟随state变化,则可以写成: 12345678910this.state = { defaultValue: ..., key: Math.random()}render () { return ( <input defaultValue={this.state.defau
Continue Reading

Colon in Ruby

in slots

1) abc: it can’t exist independently 2) :xyz it is a symbol :xyz.class => Symbol3) abc::xyz it represents namespace Example code: module ABC class Xyz def initialize @size = 400
Continue Reading

替换homebrew默认源

in Ruby

12cd "$(brew --repo)"git remote set-url origin git://mirrors.ustc.edu.cn/brew.git 来源https://lug.ustc.edu.cn/wiki/mirrors/help/brew.git $ gem sources –add https://gems.ruby-china.org/ –remove https://r
Continue Reading

Login ProFTPD as root

in Linux

使用root登录不是一种安全的方式,请悉知 1. 安装ProFTPDapt-get install proftpd 安装完成后会要求我们选择让该 server 以 inetd 还是 standalone, 选择standalone. 配置相关文件 vi /etc/proftpd/proftpd.conf 改变Server Name 1ServerName
Continue Reading

在帮导师开发一个校内应用时,由于Windows Server是中文版,Web应用是UTF8的,上传文件后服务器显示乱码。 原因是Windows Server中文版的字符集是GBK,使用以下代码可以解决: 1$name = iconv("UTF-8", "GBK//ignore", $name); 几个常用的字符集: GB2312: 7445个符号,包括6763个汉字 GBK: GB2312的
Continue Reading

Change to directory to Base.proj in your project in terminal, and type ibtool Main.storyboard --generate-strings-file file_name.strings open the file_name.strings, copy/replace.
Continue Reading

Consiiii

China


老板,我什么都能干


China