mac下MongoDB

1. 安装 1.1 解压缩mongo文件,将解压缩后的文件移动到自己喜欢的目录下 1.2 由于没有配置环境变量,先测试使用。 终端进入mongodb的安装路径,在……

阅读全文

FF的Git使用整理

创建 Git仓库命令:(进入将要管理的Git文件夹地址下) git init 查看当前Git管理状态 git status 添加Git文件 git add * 提交文件到仓库 git commit -m “……

阅读全文

ghost是什么

ghost是什么? ghost是WordPress前雇员跳槽出来,创业做的个人博客项目。开源,免费,nodejs技术栈,专注个人博客领域。有别……

阅读全文

使用hexo的第一篇文章

hexo建站之后如何使用 1.如何写文章 hexo 需要配合git使用 创建文章:需要在terminal 输入命令 hexo new “文章名” 创建好的”文件名.md” 文件……

阅读全文

NodeJS 文件系统

文件加载顺序: st=>start: 开始require isfc=>condition: 是否在文件缓冲区 isnf=>condition: 是否是原生模块 ff=>operation: 查找文件模块 lfm=>operation: 根据扩展名载入模块 cfm=>operation: 缓存文件模块 isnc=>condition: 是否在原生模块缓存区中……

阅读全文

NodeJS 文件系统

文件加载顺序: require方法接受以下几种参数的传递: http、fs、path等,原生模块。 ./mod或../mod,相对路径的文件模块。……

阅读全文

swift 中初始化ViewController

let vc = NameVC() init(title: String){ super.init(nibName: nil, bundle: nil) self.title = title } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") }……

阅读全文

Xcode插件XcodeColors的使用

安装: 在 管理器中搜索 下载 Xcodecolors 重启Xcode 选择load boundle 使用: 配置环境变量-> 打开Product -> Edit Scheme 选择Run->”Argume……

阅读全文

mac下wireshark的使用方法

Wireshark是mac下一款非常好的抓包工具,安装我就不说了,下面我重点来说说如何使用。 1.打开终端 2.rvictl -s // 创建一个虚拟接口 3.打开Wir……

阅读全文

JavaScriptCore

JavaScript 和OC原生交互 <br />- (void)ocCallJSFunction{ JSContext context = [[JSContext alloc]init]; JSValue jsValue = [context evaluateScript:@"21+7"]; int iVal = [jsValue toInt32]; NSLog(@"js value=%@,int=%d",jsValue, iVal); [context evaluateScript:@"var arr = [21, 7, 'fanyiqing.com'];"]; JSValue jsArr = context[@"arr"]; NSLog(@"JS Array:%@ length:%@",jsArr,jsArr[@"length"]); jsArr[1] = @"blog"; jsArr[7] = @7; NSLog(@"JS Array:%@, length:%d",jsArr,[jsArr[@"length"] toInt32]); NSArray nsarray = [jsArr toArray]; NSLog(@"nsarray:%@",nsarray); }……

阅读全文

vim

Vim 自带教程 终端输入 vimtutor 两种模式状态 命令模式 编辑模式 命令模式下的操作 dd 删除一行;三行:3dd y复制 d()剪切 p(paste)粘贴 :wq 或 ZZ 或 保存退出……

阅读全文

iOS GCD dispatch barrier

需求: 两个线程并行执行,当两线程都执行完后,在执行另一个线程,然后在执行并行多线程 thread1 thread4 --> thread3 --> thread2 thread5 一个dispatch barrier 允许在一个并发队列中创……

阅读全文

Xcode7.3 cannot create __weak reference in file using

升级xcode7.3后项目编译不通过 error:cannot create __weak reference in file using manual reference counting 解决办法: Set Build Settings -> Apple LLVM 7.1 - Language - Objective C -> Weak References in Manual Retain Release to YES.……

阅读全文

Xcode7.3 cannot create __weak reference in file using

升级xcode7.3后项目编译不通过 error:cannot create __weak reference in file using manual reference counting 解决办法: Set Build Settings -> Apple LLVM 7.1 – Language – Objective C -> Weak References in Manual Retain Release to YES.……

阅读全文

react JS style样式设置总结

const styles = StyleSheet.create({ style_0:{ flex:1, borderColor: 'red', borderWidth:1, }, <View style={styles.style_0}> <View style={[styles.view, styles.center]}><Text>自由摆放</Text></Vie……

阅读全文

sketch使用tips

记录sketch使用心得 1. 打开设计模板:file–> New from Template –>选择需要的模板库(Android Icon Design,iOS APP Icon,……

阅读全文