Doing It Wrong archive

## Plugin testing

Categories: Journal
Tags: ,
Published on: August 5, 2018

One of the benefits of coming back to an existing wordpress blog rather than continuing to try to roll my own in github.io is that I can easily piggyback on other people writing plugins to solve the same problems. So far, the Crayon and MathJax-Latex plugins seem to fit the bill.

### Testing syntax highlighting

[python]
# hello_world.py

class HelloWorld():
“””An unnecessarily complex hello world”””
def __init__(self):
print(“Hello world”)

if __name__ == “__main__”:
hello = HelloWorld()
[/python]

### Testing Latex / Math

\begin{align} J(\theta) &= \frac{1}{m}\sum_{i=1}^{m}Cost(h_\theta(x)^{(i)},y^{(i)}) \\ Cost(h_\theta(x),y) &= -log(h_\theta(x))& y=1 \\ Cost(h_\theta(x),y) &= -log(1-h_\theta(x))& y=0 \end{align}

## Reading set notation

Categories: Journal
Tags: , ,
Published on: June 25, 2009

So I’ve been skipping my World of Warcraft time and reviewing calculus and differential equations so I don’t get too rusty. I almost immediately ran into an issue “reading” some of the set notation. It’s great because it’s compact and can communicate a lot of information but that doesn’t help if you can’t read it.

Take for example

{(x,f(x))|xâˆˆA}

Doesn’t say much unless you can read it as “the set of all ordered pair x, f of x such that x is a member of set A”. Here are a few quick rules:

{ } denotes the set
( ) denotes and ordered pair
|Â  “such that”
: also “such that” just in case things were too clear
âˆˆ “is a member of”
âˆ‰ “is not a member of”
âˆª union of two sets
âˆ© intersection of sets

So â„• = {|a|Â : a âˆˆ â„¤} reads as “The set of natural numbers is equal to the absolute value of a such that a is a member of set â„¤”. Since â„¤ is generally the set of ingeters { … ,-2, -1, 0, 1, 2, … } this means that â„• = {0, 1, 2, … }

So now I can mostly read set notation again. Now I just need to learn MathML.

page 1 of 1