Skip to content

Instantly share code, notes, and snippets.

@JeOam
JeOam / Animation.md
Last active April 16, 2026 13:22
iOS Core Animation: Advanced Techniques, Part 1: The Layer Beneath

Author: https://www.cyanhall.com/

1. The Layer Tree

Core Animation's original name is Layer Kit

Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.

In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer. The only major feature of UIView that isn’t handled by CALayer is user interaction.

There are four hierarchies, each performing a different role:

@JeOam
JeOam / go.md
Created September 21, 2016 02:21
Go 入门笔记
We couldn’t find that file to show.
@JeOam
JeOam / Bootstrap.md
Last active March 23, 2026 03:33
Bootstrap Notes
@JeOam
JeOam / Vue.md
Created June 9, 2016 14:00
Vue.js Notes
Method Description
+(id) stringWithContentsofFile:path encoding:enc error:err Creates a new string and sets it to the path contents
of a file specified by the path using character encoding env,
returning error in err if non-nil
+(id) stringWithContentsofURL:url encoding:enc error:err Creates a new string and sets it to the contents of url
using character encoding enc,
returning error in err if non-nil
+(id) string Creates a new empty string
@JeOam
JeOam / re.md
Last active March 23, 2026 03:33
Regular Expression in Python 2.7 `re` module

Backslashes are not handled in any special way in a string literal prefixed with r. Usually regular expression patterns will be expressed in Python code using Python’s raw string notation.

Some characters, like | or (, are special. Special characters either stand for classes of ordinary characters, or affect how the regular expressions around them are interpreted. Regular expression pattern strings may not contain null bytes, but can specify the null byte using the \number notation, e.g., \x00.


Special Characters:

  • . (Dot.) In the default mode, this matches any character except a newline. If the DOTALL flag has been specified, this matches any character including a newline.
  • ^ (Caret.) Matches the start of the string, and in MULTILINE mode also matches immediately after each newline.
  • $ Matches the end of the string or just before the newline at the end of the string, and in MULTILINE mode also matches before a newline. foo matches both ‘foo’ and ‘foobar’, while the regu
@JeOam
JeOam / PythonCookNote.md
Last active March 23, 2026 03:33
Python Cook Notes

###Text Text Processing. Everyone has bits of text that need to be reformatted or transformed in various ways. Text is a sequence of characters; Binary data is a sequence of bytes. All data enters Python applications as a sequence of bytes. Python strings are immutable sequences of bytes or characters. Most of the ways we create and process strings treat them as sequences of characters, but many are just as applicable to sequences of bytes.

Unicode strings are immutable sequences of Unicode characters: transformations of Unicode strings into and from plain strings use codecs (coder-decoders) objects that embody knowledge about the many standard ways in which sequences of characters can be represented by sequences of bytes (also known as encodings and character sets).

Basic Textual Operations: