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 | |
| const http = require('http') | |
| const url = require('url') | |
| const qs = require('querystring') | |
| function formHandler (request, response) { | |
| response.write(`method: ${request.method}\n`) | |
| response.write(`url: ${request.url}\n`) |
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
| students = [ | |
| ['foo', 'junior'], | |
| ['bar', 'senior'], | |
| ['baz', 'junior'], | |
| ['quux', 'junior'], | |
| ['guacamole', 'senior'], | |
| ['spatula', 'junior'], | |
| ['firewood', 'senior'], | |
| ] |
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
| CFLAGS= -g -std=c11 -Wall -Wextra -Wpedantic | |
| TARGET=dieroll | |
| $(TARGET): $(TARGET).c | |
| $(CC) $(CFLAGS) -o $@ $^ $(LDLIBS) | |
| test: $(TARGET) | |
| ./$< 100000 | |
| clean: |
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
| *.o | |
| resource-allocation |
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
| burncpu | |
| multithread | |
| mutex | |
| semaphore |
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 <cstdlib> | |
| #include <iostream> | |
| #include <pthread.h> | |
| using std::cout; | |
| using std::cerr; | |
| using std::endl; | |
| // Don't forget to compile with -pthread |
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
| *.o | |
| send_string | |
| receive_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
| #include <cstdlib> | |
| #include <iostream> | |
| #include <sys/types.h> | |
| #include <sys/wait.h> | |
| #include <unistd.h> | |
| using std::cout; | |
| using std::cerr; | |
| using std::endl; |
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 <cstdlib> | |
| #include <iostream> | |
| #include <sys/wait.h> | |
| #include <unistd.h> | |
| using std::cout; | |
| using std::endl; | |
| int main() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.