Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PKUFlyingPig/CS110L
/ functions
Functions
179 in github.com/PKUFlyingPig/CS110L
⨍
Functions
179
◇
Types & classes
34
↓ 24 callers
Method
clone
(&self)
week3/linked_list/src/linked_list.rs:75
↓ 16 callers
Method
get
(&self, path: &str)
proj-2/balancebeam/tests/common/balancebeam.rs:89
↓ 16 callers
Method
set
Sets the element at the specified location to the specified value. If the location is out of bounds, returns Err with an error message.
week2/rdiff/src/grid.rs:43
↓ 11 callers
Method
pid
Returns the pid of this inferior.
proj-1/deet/src/inferior.rs:71
↓ 9 callers
Method
get
Returns the element at the specified location. If the location is out of bounds, returns None. Note to students: this function also could have return
week2/rdiff/src/grid.rs:33
↓ 8 callers
Function
get_target
This program finds a target process on the system. The specified query can either be a command name (e.g. "./subprocess_test") or a PID (e.g. "5612").
week3/inspect-fds/src/ps_utils.rs:128
↓ 8 callers
Method
kill
kill the inferior, assume that the inferior is still alive
proj-1/deet/src/inferior.rs:123
↓ 8 callers
Method
push_front
(&mut self, value: T)
week3/linked_list/src/linked_list.rs:33
↓ 8 callers
Method
stop
(self: Box<Self>)
proj-2/balancebeam/tests/common/echo_server.rs:90
↓ 6 callers
Method
next
(&mut self)
week3/linked_list/src/linked_list.rs:99
↓ 5 callers
Function
get_attr_value
based on dwarf_dump.rs
proj-1/deet/src/gimli_wrapper.rs:316
↓ 5 callers
Function
make_http_error
This is a helper function that creates an http::Response containing an HTTP error that can be sent to a client.
proj-2/balancebeam/src/response.rs:210
↓ 5 callers
Function
send_response
(client_conn: &mut TcpStream, response: &http::Response<Vec<u8>>)
proj-2/balancebeam/src/main.rs:252
↓ 4 callers
Method
address
(&self)
proj-2/balancebeam/tests/common/echo_server.rs:101
↓ 4 callers
Function
setup_with_params
( n_upstreams: usize, active_health_check_interval: Option<usize>, max_requests_per_minute: Option
proj-2/balancebeam/tests/02_multiple_upstream_tests.rs:8
↓ 4 callers
Method
write_byte
(&mut self, addr: usize, val: u8)
proj-1/deet/src/inferior.rs:162
↓ 4 callers
Function
write_to_stream
This function serializes a request to bytes and writes those bytes to the provided stream. You will need to modify this function in Milestone 2.
proj-2/balancebeam/src/request.rs:198
↓ 3 callers
Method
display
Prints a visual representation of the grid. You can use this for debugging.
week2/rdiff/src/grid.rs:53
↓ 3 callers
Method
get_function_from_addr
(&self, curr_addr: usize)
proj-1/deet/src/dwarf_data.rs:104
↓ 3 callers
Method
get_line_from_addr
(&self, curr_addr: usize)
proj-1/deet/src/dwarf_data.rs:91
↓ 3 callers
Function
read_file_lines
Reads the file at the supplied path, and returns a vector of strings.
week2/rdiff/src/main.rs:11
↓ 3 callers
Function
read_from_stream
This function reads and returns an HTTP request from a stream, returning an Error if the client closes the connection prematurely or sends an invalid
proj-2/balancebeam/src/request.rs:181
↓ 3 callers
Method
wait
Calls waitpid on this inferior and returns a Status to indicate the state of the process after the waitpid call.
proj-1/deet/src/inferior.rs:77
↓ 2 callers
Method
clear
Resets all the elements to zero.
week2/rdiff/src/grid.rs:64
↓ 2 callers
Function
connect_to_server
attemp to connect to the specific upstream server (no lock required)
proj-2/balancebeam/src/main.rs:221
↓ 2 callers
Method
continue_run
Wake up the paused inferior process, there are two possibilities: (1) inferior process paused by breakpoints (2) inferior process paused by other sign
proj-1/deet/src/inferior.rs:92
↓ 2 callers
Function
dump_exprloc
( w: &mut W, encoding: gimli::Encoding, data: &gimli::Expression<R>, )
proj-1/deet/src/gimli_wrapper.rs:406
↓ 2 callers
Function
func3
proj-1/deet/samples/function_calls.c:5
↓ 2 callers
Function
get_process
This function takes a pid and returns a Process struct for the specified process, or None if the specified pid doesn't exist. An Error is only returne
week3/inspect-fds/src/ps_utils.rs:73
↓ 2 callers
Method
get_target_file
(&self, file: &str)
proj-1/deet/src/dwarf_data.rs:48
↓ 2 callers
Function
init_logging
()
proj-2/balancebeam/tests/common/mod.rs:15
↓ 2 callers
Function
lcs
(seq1: &Vec<String>, seq2: &Vec<String>)
week2/rdiff/src/main.rs:22
↓ 2 callers
Function
parse_ps_line
This function takes a line of ps output formatted with -o "pid= ppid= command=" and returns a Process struct initialized from the parsed output. Exam
week3/inspect-fds/src/ps_utils.rs:53
↓ 2 callers
Method
pop_front
(&mut self)
week3/linked_list/src/linked_list.rs:39
↓ 2 callers
Method
print
(&self)
week3/inspect-fds/src/process.rs:17
↓ 2 callers
Function
setup
()
proj-2/balancebeam/tests/01_single_upstream_tests.rs:6
↓ 2 callers
Function
setup
(n_upstreams: usize)
proj-2/balancebeam/tests/02_multiple_upstream_tests.rs:35
↓ 2 callers
Method
size
(&self)
week2/rdiff/src/grid.rs:21
↓ 2 callers
Function
start_c_program
(program: &str)
week3/inspect-fds/src/process.rs:72
↓ 2 callers
Function
start_c_program
(program: &str)
week3/inspect-fds/src/open_file.rs:161
↓ 2 callers
Function
try_failover
(balancebeam: &BalanceBeam, upstreams: &mut Vec<Box<dyn Server>>)
proj-2/balancebeam/tests/02_multiple_upstream_tests.rs:83
↓ 1 callers
Function
active_health_check
check all the upstream servers actively (write lock required)
proj-2/balancebeam/src/main.rs:179
↓ 1 callers
Function
add_n_inplace
(v: &mut Vec<i32>, n: i32)
week1/part-2-warmup/src/main.rs:17
↓ 1 callers
Function
align_addr_to_word
(addr: usize)
proj-1/deet/src/inferior.rs:12
↓ 1 callers
Function
check_server
check specific upstream server actively (no lock required)
proj-2/balancebeam/src/main.rs:160
↓ 1 callers
Function
connect_to_upstream
randomly connect to one alive upstream, return error if all the upstream are dead
proj-2/balancebeam/src/main.rs:233
↓ 1 callers
Function
dedup
(v: &mut Vec<i32>)
week1/part-2-warmup/src/main.rs:23
↓ 1 callers
Function
dump_file_index
( w: &mut W, file: u64, unit: &gimli::Unit<R>, dwarf: &gimli::Dwarf<R>, )
proj-1/deet/src/gimli_wrapper.rs:365
↓ 1 callers
Function
dump_op
( w: &mut W, encoding: gimli::Encoding, dwop: gimli::DwOp, op: gimli::Operation<R>, )
proj-1/deet/src/gimli_wrapper.rs:446
↓ 1 callers
Function
echo
( server_state: Arc<ServerState>, req: Request<Body>, )
proj-2/balancebeam/tests/common/echo_server.rs:14
↓ 1 callers
Function
extend_header_value
This function appends to a header value (adding a new header if the header is not already present). This is used to add the client's IP address to the
proj-2/balancebeam/src/request.rs:53
↓ 1 callers
Function
factor_number
Determines the prime factors of a number and prints them to stdout. This function is taken from CS 110 factor.py. You don't need to read or understan
week5/farm/src/main.rs:27
↓ 1 callers
Function
format_request_line
(request: &http::Request<Vec<u8>>)
proj-2/balancebeam/src/request.rs:216
↓ 1 callers
Function
format_response_line
(response: &http::Response<Vec<u8>>)
proj-2/balancebeam/src/response.rs:199
↓ 1 callers
Function
func1
proj-1/deet/samples/segfault.c:9
↓ 1 callers
Function
func1
proj-1/deet/samples/function_calls.c:16
↓ 1 callers
Function
func2
proj-1/deet/samples/segfault.c:3
↓ 1 callers
Function
func2
proj-1/deet/samples/function_calls.c:9
↓ 1 callers
Method
get_addr_for_function
(&self, file: Option<&str>, func_name: &str)
proj-1/deet/src/dwarf_data.rs:70
↓ 1 callers
Method
get_addr_for_line
(&self, file: Option<&str>, line_number: usize)
proj-1/deet/src/dwarf_data.rs:55
↓ 1 callers
Function
get_child_processes
This function takes a pid and returns a list of Process structs for processes that have the specified pid as their parent process. An Error is returne
week3/inspect-fds/src/ps_utils.rs:97
↓ 1 callers
Function
get_content_length
Extracts the Content-Length header value from the provided request. Returns Ok(Some(usize)) if the Content-Length is present and valid, Ok(None) if Co
proj-2/balancebeam/src/request.rs:31
↓ 1 callers
Function
get_content_length
Extracts the Content-Length header value from the provided response. Returns Ok(Some(usize)) if the Content-Length is present and valid, Ok(None) if C
proj-2/balancebeam/src/response.rs:29
↓ 1 callers
Function
get_input_numbers
Returns a list of numbers supplied via argv.
week5/farm/src/main.rs:53
↓ 1 callers
Function
get_location
(attr: &gimli::Attribute<R>, unit: &gimli::Unit<R>)
proj-1/deet/src/gimli_wrapper.rs:294
↓ 1 callers
Method
get_next_command
This function prompts the user to enter a command, and continues re-prompting until the user enters a valid command. It uses DebuggerCommand::from_tok
proj-1/deet/src/debugger.rs:183
↓ 1 callers
Function
get_pid_by_command_name
This function takes a command name (e.g. "sort" or "./multi_pipe_test") and returns the first matching process's pid, or None if no matching process i
week3/inspect-fds/src/ps_utils.rs:111
↓ 1 callers
Method
get_size
(&self)
week3/linked_list/src/linked_list.rs:25
↓ 1 callers
Function
handle_connection
(mut client_conn: TcpStream, state: Arc<ProxyState>)
proj-2/balancebeam/src/main.rs:261
↓ 1 callers
Function
handle_connection
(mut stream: TcpStream)
simple-server/src/main.rs:22
↓ 1 callers
Method
into_iter
(self)
week3/linked_list/src/linked_list.rs:127
↓ 1 callers
Method
is_empty
(&self)
week3/linked_list/src/linked_list.rs:29
↓ 1 callers
Function
is_prime
Determines whether a number is prime. This function is taken from CS 110 factor.py. You don't need to read or understand this code.
week5/farm/src/main.rs:11
↓ 1 callers
Method
list_fds
This function returns a list of file descriptor numbers for this Process, if that information is available (it will return None if the information is
week3/inspect-fds/src/process.rs:44
↓ 1 callers
Method
list_open_files
This function returns a list of (fdnumber, OpenFile) tuples, if file descriptor information is available (it returns None otherwise). The information
week3/inspect-fds/src/process.rs:58
↓ 1 callers
Function
load_file
(object: &object::File, endian: gimli::RunTimeEndian)
proj-1/deet/src/gimli_wrapper.rs:19
↓ 1 callers
Function
parallel_map
(mut input_vec: Vec<T>, num_threads: usize, f: F)
week6/parallel_map/src/main.rs:4
↓ 1 callers
Method
parse_address
(&self, addr: &str)
proj-1/deet/src/debugger.rs:170
↓ 1 callers
Function
parse_request
Attempts to parse the data in the supplied buffer as an HTTP request. Returns one of the following: If there is a complete and valid request in the b
proj-2/balancebeam/src/request.rs:77
↓ 1 callers
Function
parse_response
Attempts to parse the data in the supplied buffer as an HTTP response. Returns one of the following: If there is a complete and valid response in the
proj-2/balancebeam/src/response.rs:55
↓ 1 callers
Function
pick_a_random_word
()
week1/part-3-hangman/src/main.rs:25
↓ 1 callers
Function
pick_random_alive_upstream
randomly pick one alive upstream and return its index (read lock acquired)
proj-2/balancebeam/src/main.rs:204
↓ 1 callers
Method
post
(&self, path: &str, body: &str)
proj-2/balancebeam/tests/common/balancebeam.rs:101
↓ 1 callers
Method
print
(&self)
proj-1/deet/src/dwarf_data.rs:115
↓ 1 callers
Method
print_backtrace
print backtrace of this inferior process
proj-1/deet/src/inferior.rs:136
↓ 1 callers
Function
print_diff
(lcs_table: &Grid, lines1: &Vec<String>, lines2: &Vec<String>, i: usize, j: usize)
week2/rdiff/src/main.rs:49
↓ 1 callers
Function
print_guessed_word
(guessed_words :&HashSet<char>)
week1/part-3-hangman/src/main.rs:39
↓ 1 callers
Function
print_word_so_far
(word_so_far :&Vec<char>)
week1/part-3-hangman/src/main.rs:31
↓ 1 callers
Function
pull_number_from_queue
(numbers: &mut Arc<Mutex<VecDeque<u32>>>)
week5/farm/src/main.rs:66
↓ 1 callers
Function
rate_limit_counter_refresher
(state: Arc<ProxyState>, interval: u64)
proj-2/balancebeam/src/main.rs:153
↓ 1 callers
Function
read_body
This function reads the body for a request from the stream. The client only sends a body if the Content-Length header is present; this function reads
proj-2/balancebeam/src/request.rs:140
↓ 1 callers
Function
read_body
This function reads the body for a response from the stream. If the Content-Length header is present, it reads that many bytes; otherwise, it reads by
proj-2/balancebeam/src/response.rs:117
↓ 1 callers
Function
read_headers
Reads an HTTP request from the provided stream, waiting until a complete set of headers is sent. This function only reads the request line and headers
proj-2/balancebeam/src/request.rs:104
↓ 1 callers
Function
read_headers
Reads an HTTP response from the provided stream, waiting until a complete set of headers is sent. This function only reads the response line and heade
proj-2/balancebeam/src/response.rs:83
↓ 1 callers
Function
return_error
()
proj-2/balancebeam/tests/common/error_server.rs:15
↓ 1 callers
Method
run
(&mut self)
proj-1/deet/src/debugger.rs:52
↓ 1 callers
Function
start_c_program
(program: &str)
week3/inspect-fds/src/main.rs:36
↓ 1 callers
Function
start_c_program
(program: &str)
week3/inspect-fds/src/ps_utils.rs:145
↓ 1 callers
Function
worker_thread
(mut numbers: Arc<Mutex<VecDeque<u32>>>)
week5/farm/src/main.rs:70
Function
add_n
(v: Vec<i32>, n: i32)
week1/part-2-warmup/src/main.rs:9
next →
1–100 of 179, ranked by callers