《如何激励10到25岁的人》总结
Babel工作原理
道金斯《自私的基因》读后感
李俊慧的经济学
精英日课笔记
汪诘-科学故事解读
吴国盛-科学简史
汪诘-科幻世界漫游指南
费曼漫谈科学研究
CSS Resolution Rules and Specificity
How to Start a Python Project
Notes for Generative AI With LLMs
精英日课-道可道非常道
精英日课-意识红色胶囊
精英日课-别相信直觉
樊登读书摘要(2021-2023)
近视的原理和各种预防措施
精英日课2023(2)
精英日课2022-2023
卓克聊科技2022
React Learning Note 2023
事件循环中的Macrotask和Microtask
Promise以及sync和async
如何在一台机器上使用两个github账号
迁移Octopress到MacBook(M1)
精英日课-排序不等式
精英日课-思维是平的
精英日课-伯克森悖论
重学前端-通过window属性了解协议API
精英日课-期权思维
精英日课-问题分类
精英日课-计算机不能做所有的事情
精英日课-杂想
精英日课-反脆弱
精英日课
精英日课-博弈论
程序员的数学基础课(黄申)
Web性能优化
从Terminal切换到iTerm2,从Bash切换到Zsh
HTTP(s)请求性能优化
如何调试NodeJs源码
极客时间-Web前端性能优化
极客时间-深入浅出云计算
极客时间-徐文浩-《深入浅出计算机组成原理》
使用Nodejs-Express-MongoDB搭建服务器
刘慈欣《三体》总结
极客时间-罗剑锋-《透视HTTP协议》总结
薛兆丰经济学整理
SightReading(视奏)应用开发知识点总结
帮助练习钢琴视奏的应用SightReading
Android内存分析工具
薛兆峰-少年经济学
董悠悠-不可不知的50位艺术大师
CSS中的white-space,word-break和word-wrap
使用Python解析Excel文件
使用Python解析XML格式文件
我们为什么喜欢看林李大战
《如何开发孩子的数学潜力》总结
Iframe之外能否知道iframe里面产生的事件?
浏览器的同源策略和跨域解决方法
区域位置地理信息的获取、查看、和后期处理
即兴伴奏点滴(六):无旋律伴奏
即兴伴奏点滴(五):常见伴奏音形
如何培养受欢迎的孩子
即兴伴奏点滴(四):其它知识
即兴伴奏点滴(三):琶音伴奏
即兴伴奏点滴(二):和弦伴奏
即兴伴奏点滴(一):概括
理解CSS中的z-index
CSS中的z-index
和iOS中的非常不一样:iOS非常简单,所有的z-index
设置只在parent视图(view)中起作用。但是,CSS的z-index
的作用范围却可以超出parent的限制。
一些得到课程小结
包括《给忙碌者的量子力学课》、《脑机接口》和《王立铭-病毒科学9讲》。
Read on →贾行家说武侠
李林-宗教学10讲
林欣浩-数学有意思
怀沙-人类科幻200年-少年得到
天文学通知30讲(高爽)
迁移Octopress到新的机器上
《如何参观美术馆》听后总结
雷蕾《孩子,这才是音乐》读后
字里行间,能够感受到雷蕾对音乐的真爱,以及音乐带给雷蕾的宁静。尤其是其中反复出现的,那种弹奏音乐时的状态,或者说是境界,刻画的让人心潮澎湃:哪一天我也能体会一下这种状态,该多好!
下面是摘抄的一些片段。
Read on →如何开发孩子的阅读潜力(周育如)
点、线、多边形之间的位置关系
刘慈欣科幻作品科幻元素汇总
如何开发孩子的绘画潜力
太空漫游(亚瑟·克拉克)
美丽新世界(阿道司·赫胥黎)
人工智能时代,你的工作还好吗
上帝的手术刀(王立铭)
怎样培养亲近自然的孩子
生命是什么(王立铭,生命科学50讲)
博世宁的医学通识50讲
吴军《信息论40讲》小结
对得道App上面吴军对信息论40讲的个人小结。
Read on →互联网和移动通信简史
得到App里面吴军关于5G、物联网和移动通信发展史的一些看法。
Read on →吴军的硅谷来信
Swift Closure
Sequece and Collection in Swift
自然语言理解(NLU)综述
Offline Natural Language Understanding Engine on iOS
如何控制iOS应用的屏幕方向
架构整洁之道总结(the Clean Architecture)
编程中的SOLID原则
Robert C. Martin (Bob大叔)在《敏捷软件开发》中提出了编程过程中的五个原则,以适应敏捷开发(Agile)的特点:以微小增量的方式构建软件。
Read on →在swift和Objc之间转换的一些想法
读朱光潜《谈修养》
《谈修养》的一点读书杂想和摘抄。
Read on →关于AR的一些使用场景
搜集一些有意思的AR应用。
Read on →将代码查重工具CPD集成到Xcode
Introducing Create ML
What Is New in ARKit 2
CNN与图像识别
- 卷积神经网络用于图像识别的现状。
- 卷积与图像处理基础知识。
- 卷积神经网络每一层的可视化,了解神经网络内部的物理意义。
- 图像卷积滤波器与神经元和权重的关系。
Swift Coding Conventions
Collection of some Swift coding conventions, which will make Swift code more maintainable, more readable.
Read on →DR Project
Key words: ARKit, CoreML, SceneKit
Read on →CoreML Usage
ARKit Usage
Some Tips on Markdown Usage
Collect some markdown usage tips.
Read on →Swift中的Error
iOS代码查重工具
《哲学家们都干了些什么?》读后小结
继续采用《苏菲的世界》读后小结的方式,摘抄一些观点,记录一下自己的想法。
Read on →layoutSubviews的调用机制
如何处理多个手势之间的关系
- 可以为同一个view添加两个相同类型的手势吗?比如添加两个
UITapGestureRecognizer
到同一个view。 - 如果一个view中有多个手势(
UIGestureRecognizer
),应该怎么处理它们之间的关系? - 如果子view和父view中都有手势,这些手势之间的关系又是怎么样的呢?
室内定位技术现状
- 室内定位各种技术的特点。
- 室内定位技术的现状:简单介绍苹果、高德、百度、识途等公司的技术。
iOS语音控制系统
介绍了iOS10开放的语音识别库Speech的特点和使用。
Read on →微信小程序
- 微信小程序的特点。
- 微信小程序与公众号的区别。
- 微信推出微信小程序的动机。
iOS中多线程任务之间的同步
当我们使用iOS的多线程并发执行一些任务的时候,有时候需要考虑任务之间的同步问题,比如任务1和任务2执行完之后,才可以执行任务3,原因可能是任务3需要任务1和任务2执行得到的结果。
Read on →Android开发中使用的度量单位px、dp、sp、pt、in、mm
关于多屏的支持,最好的文章当然是官方文档:Supporting Multiple Screens。一篇文章,从概念到解决方案,非常全面。
下面主要讨论一下开发过程中使用的度量单位的问题。
Read on →《苏菲的世界》读后小结
利用这一周的课余时间,读了《苏菲的世界》。这是一本非常好的西方哲学发展史的入门书,对于每个哲学家的观点阐述的简明扼要。由于主人翁是一个15岁的小女孩,所以,为了讲清楚,书中给了很多例子,生动形象易于理解。另外,采用对话的形式,而且知识点不是非常密集,读起来不会很累。
下面总结一下书中的观点,并加入一些自己的思考,如果有的话。
Read on →Android Unit Test With Junit
Create Android unit tests using junit4.
Read on →在UITableViewCell中异步加载图片
iOS应用如何在列表中高效地加载图片?
Read on →Objective-C中Property和Method的可见性
- Objective-C里Category和Inheritence中的Property和Method的可见性.
- Instance variable的可见性。
Documenting in Xcode With HeaderDoc Tutorial
Documenting in Xcode with HeaderDoc Tutorial 讲解的非常全面详细可操作。
补充一点:如果最终导出的html文件想转换成docx或者pdf文件,只需要用word打开,然后另存为你想要的格式即可,多数情况下,word可以处理好格式的问题。
Ios MultiplePagesViewController Usage
使用node-xlsx进行excel文件的读写
Ios内存管理——调试
iOS/OS X 内存管理(二):借助工具解决内存问题讲了一些调试技巧,包括:
Read on →Ios内存管理——理论
iOS/OS X内存管理(一):基本概念与原理对内存管理的概念讲的很清楚。
Read on →iOS中的动画——UIView
官方文档Animations详细讲述了UIView的animations, iOS 开发之动画篇 - 从 UIView 动画说起也阐述了用UIView进行动画的基本用法。
Read on →火星坐标导致iOS系统下高德地图定位不准
应用CocoaPods管理iOS的依赖库关系
就像Java有Maven,nodejs有npm一样,ios也有自己的库依赖管理工具:CocoaPods。
Read on →Python对中文的支持问题
Https在ios客户端的objective-c实现
ios通过NSURLSession进行网络请求,参考另一篇博客ios进行网络请求。
在开发阶段,server端我们会用self-signed证书(省钱啊!)。正因为不是第三方机构认证的证书,所以客户端都会报警告。我们需要对此进行处理(参考NSURLSession in Apple Tech Note和How do I accept a self-signed SSL certificate using iOS 7’s NSURLSession and its family of delegate methods for development purposes?):
Read on →https在Server端的Nodejs实现
服务器端利用Nodejs创建https的Server,请参考Nodejs创建HTTPS服务器
Read on →Https工作过程
摘录在此,备忘。
HTTPS其实是有两部分组成:HTTP + SSL / TLS,也就是在HTTP上又加了一层处理加密信息的模块。服务端和客户端的信息传输都会通过TLS进行加密,所以传输的数据都是加密后的数据。
具体的加密过程看下图:
Read on →Generics in Objective-c
参考:Is there any way to enforce typing on NSArray, NSMutableArray, etc.?
随着Xcode7的发布,苹果实现了collection类(NSArray,NSDictionary,NSSet)的generics功能。
Read on →Property, Instance Variable and @synthesize
这一段时间,在对自己不是很了解的代码进行重构,重新了解了一下Property、Instance Variable和@synthesize,总结一下。
首先需要明白一点:Property和@synthesize是让编译器帮助我们做一些规律性的工作。
如果没有Property
如果没有Property,我们可以这样实现Instance Variable的accessor(getter和setter),示例代码如下:
Read on →Ios Coding Best Practice
UIViewController中常见的ios编程习惯
AutoSizing and AutoLayout
参考:
摘要:
AutoSizing和AutoLayout都是用来自动确定试图大小和位置的方法,区别在于:
- AutoSizing: 只针对SuperView
- AutoLayout: 针对SuperView和兄弟View
Ios进行网络请求
Sublime的一些插件
Package Control
Package Control是Sublime中用于插件管理的工具。安装之后,其它插件基本上可以通过它进行管理:安装、删除、禁用等。
JSFormat
Read on →应用Node.js搭建一个简单的服务器
第一个简单应用
参考Node.js for Beginners. 去除以下代码:
1 2 3 |
|
如何调试Node.js在服务器上的应用
Read on →Some Tools to Impromve Efficiency in Daily Life
Operating Files and Folders With Command Line in Terminal
为什么需要在命令行进行文件和文件夹的操作:
Read on →iOS中的触控事件机制
在iOS中有三类事件:
- 触控事件(单点、多点触控以及各种手势操作)
- 传感器事件(重力、加速度传感器等)
- 远程控制事件(远程遥控iOS设备多媒体播放等)
这里要讨论的是触控事件的机制。
iOS中主要有两种触控事件:
- 手势识别类定义的触控事件
- UIResponder中定义的触控事件
Migrate Blog to Octopress
For basic configuration of octopress blog, go to official site for references.
Issue with OS EI Caption (10.11)
After updating OS to EI Caption (10.11), there is some bugs when we run rake preview
. You need to update your ruby version, and reinstall dependencies of octopress.
Refer to Errno::ENOENT: No Such File or Directory - Jekyll ~ Octopress and El Capitan post for more details.
If you can still not update your ruby version using the way in the above post, try the following commands (Refer to Using Rbenv to Manage Multiple Versions of Ruby for more details.) before install new ruby version:
- Add rbenv init to your shell to enable shims and autocompletion:
1 2 |
|
- Restart shell as a login shell so that the PATH changes take effect:
1
|
|
Themes
Go to here to choose the theme you like. Personally, I like the boldandblue theme. It is simple and elegant.
Read on →Singleton
Shortcut of Chrome on Windows and Mac
Use shortcut to improve productivity while using Chrome.
A full page is on Chrome helper:
I will list some common used ones here by myself.
Read on →Warning Messages in Xcode
Compiler Warnings for Objective-C Developers is a good post for describing warning messages for Objective-C in xcode. A Chinese version can be found 谈谈Objective-C的警告.
Some important things are marked here.
Two ways to modify complier’s warning setting: UI Method and Custom Compiler Flags Method.
Read on →How to Use Google Maps Android API Utility Library in Android Studio
Google Maps Android API utility library (the github repo and the documentation) supplies multiple cool features, including
- Marker clustering — handles the display of a large number of points
- Heat maps — display a large number of points as a heat map
- IconGenerator — display text on your Markers
- Poly decoding and encoding — compact encoding for paths, interoperability with Maps API web services
- Spherical geometry — for example: computeDistance, computeHeading, computeArea
- KML — displays KML data (Caution: Beta!)
- GeoJSON — displays and styles GeoJSON data
Deploy Environment for Android Map Development
Contents:
The following suggestions are all based on Windows. It should be similar on Mac.
Read on →Some Frameworks in iOS Development
The .dSYM File in Ios Project
Description
A .dSYM file is a debug symbols file. It is generated when in xcode:
Generate Debug Symbols
setting is enabledDebug Infomation Format
is set toDWARF with dSYM File
in the build settings of your project.
自动引用计数(ARC)和垃圾回收(GC)
在Java或者Javascript的开发中,我们会碰到垃圾回收(Garbage Collection,GC),它和iOS中的自动引用计数(Auto Reference Count,ARC)有什么区别呢?
Read on →Understanding KVC and KVO in Objective-C
Contents:
Description
In Cocoa, the Model-View-Controller pattern, a controller’s responsibility is to keep the view and the model synchronized. There are two parts to this: when the model object changes, the views have to be updated to reflect this change, and when the user interacts with controls, the model has to be updated accordingly.
Key-Value Observing helps us update the views to reflect changes to model objects. The controller can observe changes to those property values that the views depend on.
For more details, refer Key-Value Coding and Observing from objc.io;
Read on →Resources for iOS Developers
Refer Mac和iOS开发资源汇总
Another good github page for iOS resources: iOS 学习资料整理.
其中,最近(2015年)仍然在更新的中文博客:
Read on →Font Size in Html - Px, Em, Rem
Ios App Life Circle and Related Interfaces
TODO
Communication Between WebView and Native Android
Property and Its Attributes in Objective-C
All the attributes of a property defines how the compiler generate the getter
and setter
accessors.
- atomic / nonatomic
- strong / weak: used for ARC.
- assign / retain / copy: go to here for reference. These properties define how the compiler generate the
setter
accessor. - readonly / readwrite: if a property is declared as
readonly
, the compiler will only declare the getter accessor, so that you can not call setter accessor.
Property vs Instance Variable (iVar) in Objective-c
This post is deprecated. Refer to Propety, Instance Variable and @synthesize.
Read on →Use Current Location Service in Map
Location Service Authorization
1. Set info.plist
For iOS SDK 8.0 and later, we need to set NSLocationWhenInUseUsageDescription
and ‘NSLocationAlwaysUsageDescription’ in info.plist file. A sample case is:
1 2 3 4 |
|
The string
will appear in the popup dialog. You can leave it as empty, and only the system message will appear in the popup.
Some Useful Tools for Coding
Use MKOverlay and MKOverlayRenderer
MKOverlay
Write your own overlay class (for example, MapOverlay
) confirm to MKOverlay
, synthesize coordinate
and boundingMapRect
, so that we can assign value to them while initializing it.
Note that the type of coordinate
is CLLocationCoordinate2D
with latitude
and longitude
, while boundingMapRect
is MKMapRect
. And we need to use MKMapPointForCoordinate
method to convert a CLLocationCoordinate2D
type data to MKMapPoint
type data. If we assign the CLLocationCoordinate2D
data directly to boundingMapRect
, the overlay will be too small to draw, and the mapView:rendererForOverlay:
method will not be called at all. It is very hard for debugging.
How to Add Category or Tag to Github Page Posts
[updated 2015.09.13] This adding method is only for my project pages (gh-pages) GitBlogs, and for octopress, the way is builded in.
[updated 2015.06.07] For adding category or tag automatically through python script, go to here.
Introduction
The index page includes cat_tag_for_index.html for showing all the categories and tags, and the number of the corresponding posts.
The _layouts/default.html describes the content of a post, because post includes it. In the _layout/default.html file, it includes the cat_tag.html template as the category and tag info in the beginning of the post. And cat_tag.html also includes the date behind.
_data/categories.yml and _data/tags.yml describe all the categories and tags.
Read on →Basic Git Commands
Some Useful Links for Building Github Pages Blog
[updated 2015.10.30] The followings ways for deploying posts is deprecated. Refer to deploying octopress for details. But if you knows things this post descripbes, you will have better understanding of octopress.
[updated 2015.09.13] Github has two kind of pages: user/orgnization pages and project pages (gh-pages).
Currently, I am using the user/orgnization pages deployed by octopress. This is recommended, due to the easy deployment.
If you are using the project pages (gh-pages), the following references may be help.
How to get started
Refer to “一步步在GitHub上创建博客主页”.
Categories and tags
I tried the this one. It works well.
Jekyll debugging
I didn’t try the debugger yet.
Pdb Commands for Python Debugging in Command Line
How to Use the Python Script for Adding Tags and Categories
[updated 2015.10.30] The following way is for my previous blog, and now I am using octopress for my blog.
The following is for my project pages (gh-pages) GitBlogs.
The python script is put GitBlogs/tools/add.py.
For adding category or tag:
- go to tools/
- run
python add.py -category category_name
orpython add.py -tag tag_name
for adding category and tag respectively.
Basic Vim Commands
Vim is an editor to create or edit a text file.
Two modes:
- command mode: move around, copy and past
- insert mode: insert text
How to Write Post in Github Pages
[updated 2015.10.30] The following way is deprecated, and octopress way is prefered. But the To make the post searchable by Google part is still in use.
Contents:
- To add a new post
- To add a new “category” or “tag”
- To enable code highlight
- To make the post searchable by Google
- Some tips for markdown grammar
The first two sections are only for my project pages (gh-pages) GitBlogs, and currently in cotopress blog, we have other new simpler ways to do these things. See Migrate Blog to Octopress.
Description
This post is not for how to deploy the environment of writing posts in github pages, but how to use the environment you deployed before.
Read on →How to Deploy MicroStrategy iOS Mobile Environment
Start Developing in a New Mac Machine
[updated on 2015.9.17] With Xcode 7, we only need an Apple ID for deploying your app to ipad or iphone, with the ability to debug.
Read on →Caution Javascript Closure in Loop
Object
Define a function addTimer, to log executed time for all function-type property of an object
Definition 1
Read on →How to Add a Clone Function to Function?
1 2 3 4 5 6 7 8 |
|