Lift on Monday, Wednesday, Friday
Climb on Tuesdays/Thursdays and Saturdays
from ortools.algorithms import pywrapknapsack_solver | |
def main(): | |
solver = pywrapknapsack_solver.KnapsackSolver( | |
pywrapknapsack_solver.KnapsackSolver. | |
KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER, 'KnapsackExample') | |
values = [ | |
360, 83, 59, 130, 431, 67, 230, 52, 93, 125, 670, 892, 600, 38, 48, 147, |
from ortools.linear_solver import pywraplp | |
# A simple program that uses a SCIP solver to solve a Vertex Cover instance | |
def main(): | |
# Create the mip solver with the SCIP backend. | |
solver = pywraplp.Solver.CreateSolver('SCIP') | |
# Variables (Nodes) | |
x1 = solver.IntVar(0, 1, 'x1') | |
x2 = solver.IntVar(0, 1, 'x2') |
GDB commands by function - simple guide | |
--------------------------------------- | |
More important commands have a (*) by them. | |
Startup | |
% gdb -help print startup help, show switches | |
*% gdb object normal debug | |
*% gdb object core core debug (must specify core file) | |
%% gdb object pid attach to running process | |
% gdb use file command to load object |
Lift on Monday, Wednesday, Friday
Climb on Tuesdays/Thursdays and Saturdays
sudo apt-get install \ | |
build-essential flex bison \ | |
libreadline6-dev zlib1g-dev \ | |
libnl1 libssl-dev libnl-dev \ | |
libssl-dev \ | |
libcurl4-gnutls-dev \ | |
libexpat1-dev \ | |
tcl tk \ | |
tcl-dev gettext \ | |
asciidoc \ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
public class AverageFileSize extends SimpleTagSupport { | |
private boolean humanReadable; | |
private List<AttachedFile> fileList; | |
public AverageFileSize(List<AttachedFile> fileList) { | |
this.humanReadable = false; | |
this.fileList = fileList; | |
} |
public class AverageFileSize extends SimpleTagSupport { | |
private boolean humanReadable; | |
private List<AttachedFile> fileList; | |
public AverageFileSize(List<AttachedFile> fileList) { | |
this.humanReadable = false; | |
this.fileList = fileList; | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Compose :: SComm</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="libs/jquery-1.11.3/jquery-1.11.3.js"></script> |
#!/bin/bash | |
# where to store the sparse-image | |
WORKSPACE=~/Documents/workspace.dmg.sparseimage | |
create() { | |
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE} | |
} | |
detach() { |