This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
⌘T | 前往文件 |
⌘⌃P | 前往项目 |
⌘R | 前往 method |
⌘⇧P | 命令提示 |
This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
⌘T | 前往文件 |
⌘⌃P | 前往项目 |
⌘R | 前往 method |
⌘⇧P | 命令提示 |
The bomb lab is most easily completed if you understand the following tools and commands. Also, if I am describing a program, assume that you run it from command line.
In case you have never used strings before it basically just tells you all the strings in an executable. If I were to run it on the bomb I would simply run
#include "fssimplewindow.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct cursor *PtrCursor; | |
struct cursor | |
{ | |
int lb, mb, rb, mx, my; | |
}; |
/* | |
* csapp.c - Functions for the CS:APP3e book | |
* | |
* Updated 10/2014 droh: | |
* - Added safe_printf, anasync-signal-safe wrapper for printf | |
* | |
* Updated 8/2014 droh: | |
* - New versions of open_clientfd and open_listenfd are reentrant and | |
* protocol independent. | |
* |
Cursor movement
h - move left
j - move down
k - move up
l - move right
w - jump by start of words (punctuation considered words)
W - jump by words (spaces separate words)
e - jump to end of words (punctuation considered words)
/* | |
* csapp.h - prototypes and definitions for the CS:APP3e book | |
*/ | |
/* $begin csapp.h */ | |
#ifndef __CSAPP_H__ | |
#define __CSAPP_H__ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdarg.h> |
/* | |
* waitfg - Block until process pid is no longer the foreground process | |
*/ | |
void waitfg(pid_t pid) { | |
sigset_t mask, nomask, old; | |
struct job_t *j = getjobpid(jobs, pid); | |
sigfillset (&mask); | |
sigemptyset (&nomask); | |
sigprocmask (SIG_SETMASK, &mask, &old); |
/* run command */ | |
if (tok.builtins == BUILTIN_NONE) { | |
sigemptyset(&mask); | |
sigaddset(&mask, SIGCHLD); | |
sigaddset(&mask, SIGINT); | |
sigaddset(&mask, SIGTSTP); | |
sigprocmask(SIG_BLOCK, &mask, &prev); | |
/* Children process */ | |
if ((pid = fork()) == 0) { |
\question{5}{Short Circuitry} | |
\subsubsection*{Task 5.1} | |
\begin{description} | |
\item[Theorem:] \textit{For all types} \texttt{t1, t2} \textit{and values} \texttt{f : t1 -> bool, g : t2 -> bool, x : t1, y : t2,} | |
\begin{align*} | |
\texttt{(fn (a,b) => a orelse b) (f x, g y)} \cong \texttt{f x orelse g y} | |
\end{align*} | |
\item[Proof:] \quad\\ | |
By mathmatical induction on \texttt{f x}.\\ |
#!/usr/bin/env python | |
import os | |
import datetime | |
import BaseHTTPServer | |
import SocketServer | |
# hard-coded configurtion |