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
<michaelrose> phogg, it still ought to be illegal to restrict computers(aka phones) in ways that subvert the OWNERS right to use their own device please note that even a subsidized phone is SOLD to the new OWNER | |
<phogg> michaelrose: if you want to buy a restricted device that is clearly labeled as such I see no reason that it should be illegal just to save you from yourself | |
<michaelrose> doubly so when the device is made possible by free software, taking the communities work to be used in a device that is locked thusly is as good as stealing from the entire foss community | |
<phogg> michaelrose: now, failing to *offer* any unrestricted devices perhaps should be illegal and *misleading the customer* about whether it's restricted should be illegal. | |
<bls> stealing from the OSS community? what a load of crap | |
<reisio> michaelrose: well, it probably already _is_ illegal, at least in the USA | |
<phogg> michaelrose: it is not theft to comply with the licenses under which the software was released, even if you find the use |
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
// linked_list.rs:11:25: 11:26 error: expected one of `;`, `}` but found `:` | |
// linked_list.rs:11 ListIterator<T> { data: &self } | |
enum List<T> { | |
Cons(T, ~List<T>), | |
Nil | |
} | |
struct ListIterator<T> { data: &List<T> } |
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
''' take from python.org example, using hot_swapping variables method ''' | |
def fib_hotswap(n): | |
a = 1 | |
b = 1 | |
for _ in range(1,n+1): | |
tmp = a + b | |
b = a | |
a = tmp | |
return b | |
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
#!/usr/bin/env bash | |
# Ensure that your CWD is your project root | |
wget https://pypi.python.org/packages/source/s/simpy/simpy-3.0.5.tar.gz#md5=19262488f1b0e6b77556820dd2b42d67 | |
tar xzf simpy-*.tar.gz | |
mv simpy-*/simpy . | |
# Cleanup deployment artifacts | |
rm simpy-*.tar.gz | |
rm -rf simpy-* |
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 = [8,1,3,4,5,10] | |
ans = 22 | |
def non_adjacent_sum(A): | |
# Small cases | |
if len(A) < 3: | |
return max(A) | |
# Base cases | |
prev_prev, prev = A[0], A[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
.svm-example { | |
position: relative; | |
height: 60px; | |
width: 340px; | |
margin: 1.5em auto; | |
line-height: 60px; | |
} | |
.svm-example div { | |
position: absolute; | |
top: 10px; |
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
def insertNode(root, newNode, data): | |
if root is null: | |
root = newNode | |
root.data = data | |
elif data < root.left: | |
root.left = insertNode(root.left, newNode, data); | |
else: | |
root.right = insertNode(root.right, newNode, data); | |
return root | |
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
int AI::IterativeDeepening(const State& state, int alpha, int beta, int depth) { | |
if (cutoff(state, depth)) | |
return eval(state); | |
int result = 0; | |
for (Move* move : moves) { | |
State newState = state.clone(); | |
result = max(result, newState.makeMove(state)); | |
} | |
return result; | |
} |
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
/** | |
* Gio Borje | |
* 41894135 | |
*/ | |
#include "HashMap.h" | |
using namespace std; | |
/** | |
* Initializes the node with the specified parameters |
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
#ifndef BOARD_CONFIG_H | |
#define BOARD_CONFIG_H | |
class BoardConfig { | |
public: | |
unsigned int rows; | |
unsigned int cols; | |
unsigned int kLength; | |
bool gravityFlag; |
OlderNewer