This file has been truncated, but you can view the full file.
This file contains 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
<!DOCTYPE html> | |
<!-- Created by pdf2htmlEX (https://github.com/pdf2htmlEX/pdf2htmlEX) --> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="generator" content="pdf2htmlEX"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> | |
<style type="text/css"> | |
/*! | |
* Base CSS for pdf2htmlEX |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<video width="400" controls> | |
<source src="https://drive.usercontent.google.com/download?id=1AAXSQJtMBLrV-uU_gBljoWVJgwEYJGmS&export=download" type="video/mp4"> | |
</video> | |
</body> | |
</html> |
This file contains 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
use std::any::{Any, TypeId}; | |
use std::cell::RefCell; | |
use std::collections::{BTreeMap, VecDeque}; | |
use std::mem; | |
use std::rc::Rc; | |
struct FirstEvent { | |
int_val: u32, | |
} |
This file contains 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
#![allow(dead_code)] | |
use std::iter::repeat; | |
fn main() {} | |
fn pir(n: u32) -> String { | |
let mut x = 1; | |
(0..n) |
This file contains 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
macro_rules! print_mem { | |
($ptr:expr, $address:expr) => { | |
unsafe { | |
let a_ptr: *const u32 = &$ptr; | |
let b_ptr: *const u8 = a_ptr as *const u8; | |
println!("{:#0x}", *b_ptr.offset($address)); | |
} | |
}; | |
} |
This file contains 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
use std::mem; | |
use self::State::*; | |
use self::Transaction::*; | |
fn main() { | |
let mut player = Player::new(); | |
println!("{:?}", player); // state == One | |
player.collision(Run); // state == Two |
This file contains 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
use std::ops::Range; | |
use std::rc::Rc; | |
fn main() { | |
let mut world = World::new(4); | |
world.get_cell(1).print(); | |
world.get_cell(2).print(); | |
world.get_cell(3).print(); | |
world.get_cell(4).print(); |
This file contains 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
use std::mem; | |
fn main() { | |
let mut person = Person::new(); | |
person_test(&mut person); | |
let mut person_st = PersonSt::new(); | |
person_test(&mut person_st); | |
} |
This file contains 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
use actix_web::{App, get, HttpResponse, HttpServer, post, Responder, web}; | |
#[actix_web::main] | |
async fn main() -> std::io::Result<()> { | |
println!("127.0.0.1:8080"); | |
println!("\t/"); | |
println!("\t/echo"); | |
println!("\t/txt"); | |
HttpServer::new(|| { | |
App::new() |
This file contains 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
public class Main { | |
public static void main(String[] args) { | |
byte zero = 0b0000_0000; | |
byte mid = (byte)0b1000_0000; | |
byte max = 0b0111_1111; | |
System.out.println(zero + " -> 0b0000_0000"); | |
System.out.println(mid + " -> 0b1000_0000"); | |
System.out.println(max + " -> 0b0111_1111"); | |
System.out.println("0b0111_1111 (127) + 0b0000_0001 (1) = 0b1000_0000 (" + (byte)(max + 1) + ")"); |
NewerOlder