Term 2:
- Week 6 14 May - 20 May
- Week 7 21 May - 27 May Reference: Discrete Mathematics with Applications by Susanna S.Epp, Fourth Edition Data Visualisation: https://medium.com/@mbostock/a-better-way-to-code-2b1d2876a3a0 Trees: https://www.educative.io/collection/page/10370001/160001/220001 Patrick discrete maths app : https://discrete.now.sh/ Got the Discrete Rails app hosted on Google Cloud: http://104.198.155.205/ Github: coder-factory-academy/DiscreteRails
Logic, bitwise logic and truth tables
-
Div (/), Mod (%), floor, truncate, Ceil, sqrt, cbrt, Power,
-
Logarithm definition:
logb(x) = y => Math.log(x, b) = y
by = x => b ** y = x24 = 16 => 2 ** 4 = 16
log2(16) = 4 => Math.log2(16) = 4 = Math.log(16,2)For example: Find the value of y where 2 ** y = 16
y = Math.log(16,2) same as Math.log2(16)
y = 4Find b where Math.log(16,b) = 4
b4 = 16
b = 16 ** (1/4.0)9 = 3 x 3 Math.sqrt(9) = 3 8 = 2 * 2 * 2 Math.cbrt(8) = 2
-
http://www.rapidtables.com/math/algebra/Logarithm.htm Natural logarithm: ln(x) = log e (x) where e is 2.718281828459... e = lim x -> inf (1 + 1/x) ** x
Math::PI => 3.141592653589793 Math::E => 2.718281828459045
Number systems base 10 to base 2 division by 2 (shift operator) Recursion - tail recursion - factorial Geometric sequences
Sets contain unique values.
Hash functions, Relations between Exponential and Logarithmic functions,
Cryptography, Topological sorting
Counting elements in a list, permutations and combinations, pascal's triangle
Matrices, Simple graphs, Binary trees,
Binary search, merge sort, benchmarking https://www.toptal.com/developers/sorting-algorithms
Regular Expressions
Browser rendered....visual engaging example
binary bigger binary, octal 0-7, decimal, hexadecimal 0-F, ascii (chr, ord) 'A' 65 'a' 97 mask & 1 == 1 mask & 2 == 2 mask & 0b0100 == 0b0100 => unicode https://www.tutorialspoint.com/ruby/ruby_operators.htm
Logical Operators: and or xor Truth table - on and off => update and (&) or (|) xor (^?)
a&b = 0000 1100 # check flag
a|b = 0011 1101 # set flag
a^b = 0011 0001 # xor - merge -
~a = 1100 0011 # binary ones compliment - flip bits
Jamie - Trent - User Stories, Planning, dbdesigner visualize ER-Diagram/schema MVC, generate model Controler, hidden fields, communication b/w, turbo links (rendering partials) - ajax - devise , socket action cable session gaming chat, async
rails new proj && cd proj if str == nil || str.length = 0 null of empty 1 0 0 0 1 0 1 1 0 0 0 1
0b010 1 0b01 2 0b10 4 8 16
Number system.
Series, patterns, infinite series, recursive definitions 1/3 0.3333333333333333 float: left; width: 30%; margin: 10/6 = 1.7%; trunc floor ceil mod
Big-O notation, algorithms, optimisation, benchmark
Matrices multi dimensions
Sets - Unique
Probability, permutations and combinations
a b c
a b
a c