This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Functional Programming In a Nutshell | |
================================ | |
### History | |
The idea of functional programming has been around since well-before the invention of computers. The concepts of "partial application", "currying", and really higher level mathematics in-general lay out the framework used for the modern functional programming, more than its competing paradigms of imperative and Object-Oriented. | |
###What is Functional Programming? | |
In a nutshell, Functional programming is two things: | |
- Programming with the ideology that functions can be treated like a first-class-citizen | |
- Think about math class: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Functional Programming In a Nutshell | |
================================ | |
### History | |
The idea of functional programming has been around since well-before the invention of computers. The concepts of "partial application", "currying", and really higher level mathematics in-general lay out the framework used for the modern functional programming, more than its competing paradigms of imperative and Object-Oriented. | |
###What is Functional Programming? | |
In a nutshell, Functional programming is two things: | |
- Programming with the ideology that functions can be treated like a first-class-citizen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Finding a derivative! | |
===================== | |
The definition of an derivative is as follows: | |
$$ | |
\lim_{\Delta x \to 0} { {f(x+\Delta x) - f(x)} \over \Delta x} | |
$$ | |
Given that: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getUserObjectSomehow = () -> | |
id: 5 | |
logged_in:true | |
do_something = (user) -> "> Logged in user #{user.id}: #{JSON.stringify(user, null, 4)}" unless !user.logged_in | |
# Admittedly this is mildly dependent on underscore or lodash. | |
log = console.log.bind(window) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A generalization for all even numbers is | |
$$ | |
2k | |
$$ | |
where k is an integer. Therefore, a generalization for all odd numbers would be. | |
$$ | |
2k+1 | |
$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A generalization for all even numbers is | |
$$ | |
2k | |
$$ | |
where k is an integer. Therefore, a generalization for all odd numbers would be. | |
$$ | |
2k+1 | |
$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>A generalization for all even numbers is <br> | |
<span class="MathJax_Preview"></span><div class="MathJax_Display" role="textbox" aria-readonly="true" style="text-align: center;"><span class="MathJax" id="MathJax-Element-1-Frame"><nobr><span class="math" id="MathJax-Span-1" style="width: 1.143em; display: inline-block;"><span style="display: inline-block; position: relative; width: 0.995em; height: 0px; font-size: 112%;"><span style="position: absolute; clip: rect(1.639em 1000.002em 2.631em -0.394em); top: -2.478em; left: 0.002em;"><span class="mrow" id="MathJax-Span-2"><span class="mn" id="MathJax-Span-3" style="font-family: STIXGeneral-Regular;">2</span><span class="mi" id="MathJax-Span-4" style="font-family: STIXGeneral-Italic;">k<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.002em;"></span></span></span><span style="display: inline-block; width: 0px; height: 2.483em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Standard awesome library | |
local gears = require("gears") | |
local awful = require("awful") | |
awful.rules = require("awful.rules") | |
require("awful.autofocus") | |
-- Widget and layout library | |
local wibox = require("wibox") | |
-- Theme handling library | |
local beautiful = require("beautiful") | |
-- Notification library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==> cowboy (compile) | |
Compiled src/cowboy_acceptors_sup.erl | |
Compiling src/cowboy_listener.erl failed: | |
src/cowboy_listener.erl:30: type queue/0 is deprecated and will be removed in OTP 18.0; use use queue:queue/0 or preferably queue:queue/1 | |
src/cowboy_listener.erl:211: type queue/0 is deprecated and will be removed in OTP 18.0; use use queue:queue/0 or preferably queue:queue/1 | |
src/cowboy_listener.erl:211: type queue/0 is deprecated and will be removed in OTP 18.0; use use queue:queue/0 or preferably queue:queue/1 | |
Could not compile dependency cowboy, /usr/bin/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile cowboy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <netinet/ip.h> /* superset of previous */ | |
int main( int argc, char **argv){ | |
int tcp_socket; |
OlderNewer