This file contains hidden or 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 node | |
class Dog { | |
constructor (name) { | |
this.name = name | |
} | |
speak () { | |
return `${this.name}: bark!` | |
} |
This file contains hidden or 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
# Note: to compile for 64-bit, open the "x64 Native Tools Command Prompt" | |
all: listing_20-1.obj listing_20-2.obj listing_20-4.obj listing_20-5.obj nonvirtual.obj virtual.obj | |
listing_20-1.obj: listing_20-1.cpp | |
cl /c listing_20-1.cpp | |
listing_20-2.obj: listing_20-2.cpp | |
cl /c listing_20-2.cpp |
This file contains hidden or 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
all: listing_6-01.exe listing_6-02.obj listing_6-06.obj listing_6-08.obj listing_6-10.obj listing_6-12.obj listing_6-14.obj listing_6-16.obj listing_6-18.obj listing_6-18.o listing_6-20.obj listing_6-22.obj listing_6-24.obj listing_6-26.obj listing_6-29.obj | |
listing_6-01.exe: listing_6-01.c | |
cl listing_6-01.c | |
listing_6-02.obj: listing_6-02.c | |
cl /c listing_6-02.c | |
listing_6-06.obj: listing_6-06.c | |
cl /c listing_6-06.c |
This file contains hidden or 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 <stdlib.h> | |
int main() | |
{ | |
int c; | |
printf ("Hello.\n"); | |
exit (0); | |
} |
This file contains hidden or 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 cnf 11 22 | |
c DIMACS version of | |
c https://github.com/sahands/simple-sat/blob/master/src/tests/fsm/even-ones-3.in | |
c No more than one state at each step | |
-1 -2 0 | |
-3 -4 0 | |
-5 -6 0 | |
-7 -8 0 |
This file contains hidden or 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
CXXFLAGS = -g -std=c++17 -Wall -Wextra -Wpedantic -Werror | |
.PHONY: clean | |
run: test | |
./test | |
test: test.cpp nand-circ.h | |
$(CXX) $(CXXFLAGS) $< -o $@ |
This file contains hidden or 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 <iostream> | |
/* | |
C++ version of | |
https://nbviewer.org/github/boazbk/tcscode/blob/master/Chap_04_Syntactic_Sugar.ipynb#Even-more-sugar | |
*/ | |
using std::cout; | |
using std::endl; | |
using std::string; |
This file contains hidden or 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
CXXFLAGS = -g -std=c++17 -Wall -Wextra -Wpedantic -Werror -pthread #-fsanitize=thread | |
SRCS = no-lock-no-threads.cpp \ | |
lock-no-threads.cpp \ | |
single-lock-threaded.cpp \ | |
multiple-lock-threaded.cpp \ | |
approximate.cpp | |
TARGETS = $(SRCS:.cpp=) | |
.PHONY: clean |