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

错误症状模拟器运行正常,打包正常,真机编译时部分Framework出现 ‘Realm/RLMArray.h’ file not found 背景CocoaPods 1.0.1, Xcode 8, Realm 0.98.3 解决方式按下Option+CMD+Shift+K, Clean Build Folder, 或者按下Option,选择`Product`—> Clean Build F
Continue Reading

这两天在更新一个iOS项目,因为更新XCode 8,遇到了Debug模式下能跑,但是无法打包的问题。 错误症状具体错误提示是: 点击Archive后,上传后出现错误提示1 Invalid Bundle. The bundle at ‘XXXX’ contains disallowed nested bundles. Invalid Bundle, The bundle contains disa
Continue Reading

Consiiii

China


老板,我什么都能干


China