Parses a string and evaluates the expression. I didn't realize how hard doing this actually was.
A Pen by Dave Pagurek on CodePen.
//Module to communicate between background and app scripts | |
var Messenger = (function() { | |
var m = {}; | |
var responses = {}; | |
m.current = chrome.runtime.id; | |
m.extension = "hkgihfhfbmabgamjpbgkkdjcmicmheap"; | |
m.app = "neoalcniaoimlmhmibbccponldlhnnee"; |
#!/usr/bin/perl | |
use v5.10; | |
use strict; | |
use warnings; | |
use URI; | |
use Web::Scraper; | |
use Encode; | |
use Data::Dumper; |
$DBH = new PDO("mysql:host=$host;dbname=$database", $username, $password); | |
$DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); | |
$STH=$DBH->prepare("SELECT * FROM jokes WHERE id=:joke"); | |
$STH->setFetchMode(PDO::FETCH_ASSOC); | |
$STH->execute(array(":joke" => $joke)); | |
$result = $STH->fetchAll(); |
This line of actionscript: | |
swivelJob.duration = RecordingDuration.frameRange(2, swivelJob.duration.params[1]); | |
...is this in bytecode: | |
getlocal0 | |
pushscope | |
findpropstrict swivelJob //nameIndex = 7 | |
getproperty swivelJob //nameIndex = 7 | |
findpropstrict RecordingDuration //nameIndex = 9 | |
getproperty RecordingDuration //nameIndex = 9 |
1. initially all registers are set to 0x0 except | |
$1 = 3 | |
$2 = 1 | |
$31 = something | |
what registers have changed (from beginning to end) | |
DIV(2,1) ; sets lo,hi = (1/3),1%3 = 0,1 | |
ADD(0,1,1) ; $0 = $1 + $1, but this doesn't do anything ($0 stays 0) | |
SUB(3,1,2) ; $3 = $1 - $2, so $3 = 2 |
Parses a string and evaluates the expression. I didn't realize how hard doing this actually was.
A Pen by Dave Pagurek on CodePen.
.DS_Store | |
## Build generated | |
build/ | |
DerivedData/ | |
## Various settings | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 |
use v6; | |
unit module TestModule; | |
constant $nouns = "{$?FILE.IO.dirname}/conv.data.noun".IO.lines.Set; |
The past two assignments in this course have had what I feel to be significant issues that impede learning. I disagree with the philosophy behind the assignments' design decisions, and I feel like my opinions need to be voiced in order to help improve the quality of the course and, by extension, our education.
For a course about learning good C++ design, the decision to disallow all of STL, templating, arrays, and multiple files confuses me. The first assignment requires the creation of multiple container types, many of which can have very similar implementations. We are marked on not repeating ourselves, so every student completing this assignment needs to refactor their collections into some sort of heirarchy to achieve this and avoid simply copy-and-pasting code. There are a few ways to do this without using the tools we are restricted from using, and all of them lead to poor C++ code:
#!/usr/bin/env bash | |
# install rlwrap | |
cd ~ | |
git clone https://github.com/hanslub42/rlwrap.git | |
cd rlwrap | |
autoreconf --install | |
./configure --prefix=$HOME | |
make | |
make install |