Skip to content

Instantly share code, notes, and snippets.

View cyyeh's full-sized avatar
👋
Focusing

Chih-Yu Yeh cyyeh

👋
Focusing
View GitHub Profile
@cyyeh
cyyeh / swift-basics.swift
Last active February 27, 2019 11:33
Swift Basics
/*
Referenced from Stanford CS193p
#: important
##: very important
The Basics
- Constants and Variables
- Comments
- Semicolons
@cyyeh
cyyeh / swift-basic-operators.swift
Last active February 27, 2019 11:40
Swift Basic Operators
/*
Referenced from Stanford CS193p
#: important
##: very important
Basic Operators
- Terminology
- Assignment Operator
- Arithmetic Operators
@cyyeh
cyyeh / swift-strings-characters.swift
Last active February 27, 2019 11:48
Swift Strings and Characters
/*
Referenced from Stanford CS193p
#: important
##: very important
Strings and Characters
- String Literals
- Initializing an Empty String
- String Mutability
@cyyeh
cyyeh / swift-collection-types.swift
Last active February 27, 2019 11:57
Swift Collection Types
/*
Referenced from Stanford CS193p
#: important
##: very important
Collection Types
- #Mutability of Collections
- #Arrays
- Sets
@cyyeh
cyyeh / swift-control-flow.swift
Last active February 27, 2019 12:04
Swift Control Flow
/*
Referenced from Stanford CS193p
#: important
##: very important
Control Flow
- For-In Loops
- While Loops
- Conditional Statements
@cyyeh
cyyeh / swift-functions.swift
Last active February 27, 2019 12:20
Swift Functions
/*
Referenced from Stanford CS193p
#: important
##: very important
Functions
- Defining and Calling Functions
- Function Parameters and Return Values
- Functions Without Parameters
@cyyeh
cyyeh / swift-structures-classes.swift
Created February 27, 2019 06:41
Swift Structures and Classes
/*
Referenced from Stanford CS193p
#: important
##: very important
Classes and Structures
- Comparing Classes and Structures
- #Structures and Enumerations Are Value Types (ignore enumerations)
- Classes Are Reference Types
@cyyeh
cyyeh / swift-properties.swift
Created February 27, 2019 07:30
Swift Properties
/*
Referenced from Stanford CS193p
#: important
##: very important
Properties
- Stored Properties
- Property Observers
- Global and Local Variables
@cyyeh
cyyeh / swift-methods.swift
Created February 27, 2019 07:55
Swift Methods
/*
Referenced from Stanford CS193p
#: important
##: very important
Methods
- Instance Methods
- The self Property
- Modifying Value Types from Within Instance Methods
@cyyeh
cyyeh / swift-inheritance.swift
Created February 27, 2019 08:12
Swift Inheritance
/*
Referenced from Stanford CS193p
#: important
##: very important
Inheritance
- Defining a Base Class
- Subclassing
- Overriding