上一页 1 2 3 4 5 6 7 8 9 ··· 30 下一页

2018年11月27日

Altera: set pin locations using tcl

摘要: 1, compile the project; 2, store current tcl settings: Project –> Generate Tcl File from Project… 3, modify the generated tcl file. Add pin assignment in section like “# Make assignments”: ... 阅读全文

posted @ 2018-11-27 10:35 freshair_cn 阅读(225) 评论(0) 推荐(0) 编辑

USB-to-UART bridge CP2102

摘要: 阅读全文

posted @ 2018-11-27 10:06 freshair_cn 阅读(633) 评论(0) 推荐(0) 编辑

2018年11月26日

一个Level Shifter老图

摘要: 阅读全文

posted @ 2018-11-26 11:38 freshair_cn 阅读(1236) 评论(0) 推荐(0) 编辑

2018年11月23日

python: 可变参数

摘要: 结论:定义Python函数的默认参数时,默认参数必须指向不变对象! 事实上,编写程序时如 果可以设计成不变对象,就应该尽量设计成不变对象。 以下例子来自 The Hitchhiker’s Guide to Python . 假如定义函数: def append_to(element, to=[]): to.append(element) return to 调用函数如下: my_l... 阅读全文

posted @ 2018-11-23 11:33 freshair_cn 阅读(581) 评论(0) 推荐(0) 编辑

2018年11月22日

vim编码方式设置

摘要: 建议vim的_vimrc文件里设置如下的编码方式: set encoding=utf-8 set fileencodings=ucs-bom,utf-8,cp936 set fileencoding=gb2312 set termencoding=utf-8 原因可参考: https://www.cnblogs.com/freewater/archive/2011/08/26/2154602.... 阅读全文

posted @ 2018-11-22 17:16 freshair_cn 阅读(192) 评论(0) 推荐(0) 编辑

ASCII, Unicode 与 UTF-8

摘要: 1,ASCII 由于计算机是美国人发明的,最早只有127个字符,即大小写英文字母、数字、一些符号,被编码到计算机里,这个编码表就是ASCII表。这时每个字符用1 Byte表示。 2,Unicode 当其他语言也需要在计算机上表示时,1 Byte显然不够,这时Unicode出现了。Unicode试图把所有语言统一到一套编码,它与ASCII的区别是:ASCII用1 Byte表示字符;Unicode通常... 阅读全文

posted @ 2018-11-22 15:33 freshair_cn 阅读(157) 评论(0) 推荐(0) 编辑

2018年11月21日

Vim: 强大的g

摘要: 来源于:http://vim.wikia.com/wiki/Power_of_g 一般格式: :[range]g/pattern/cmd 对range内所有符合pattern的行执行cmd 常见的一些用法: 1, 删除包含某个Pattern的行 :g/pattern/d, 实际上作者更推荐这种用法: :g/pattern/d_,原因请看原文 2,删除不包含某个Pattern的行 :g!/pat... 阅读全文

posted @ 2018-11-21 15:00 freshair_cn 阅读(2058) 评论(0) 推荐(0) 编辑

2018年11月1日

Vim模糊查找与替换

摘要: 例如要把 ( 1 )、( 2 ) … 全部替换成其他字符,可以用命令: :%s/(.*)/str/gn 其中,.* 表示匹配任何东西,如果只希望匹配应为字母和数字,可以用 \w\+。 有些特殊字符需要转义,因此出错时可以考虑是否需要转义。 阅读全文

posted @ 2018-11-01 17:56 freshair_cn 阅读(8787) 评论(0) 推荐(0) 编辑

2018年10月24日

Vim统计字符串出现次数

摘要: 关键命令: :%s/pattern//gn 参数说明: % - 指明操作区间,%表示全文本;可以使用1,$或者行区间代替 s – substitute,表示替换 pattern - 要查找的字符串 // - 替代文本应该放在这里,两个斜杠中间没有任何字符表示无替代文本 g – Replace all occurences in the line. Without this argument, re... 阅读全文

posted @ 2018-10-24 14:15 freshair_cn 阅读(22338) 评论(0) 推荐(2) 编辑

2018年10月16日

APB简介

摘要: 一、血缘 AMBA: Advanced Microcontroller Bus Architecture 高级处理器总线架构 AHB: Advanced High-performance Bus 高级高性能总线 ASB: Advanced System Bus 高级系统总线 APB: Advanced Peripheral Bus 高级外围总线 AXI: Advanced eXtendable I... 阅读全文

posted @ 2018-10-16 13:29 freshair_cn 阅读(2086) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 30 下一页

导航