Skip to content

Instantly share code, notes, and snippets.

View ilopX's full-sized avatar
🐞
make some bugs

ilopX ilopX

🐞
make some bugs
  • ilopXgoup
  • Ukraine, Cherkassy
  • X @ilopX3
View GitHub Profile
This file has been truncated, but you can view the full file.
<!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
<!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>
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,
}
@ilopX
ilopX / pir.rs
Created August 5, 2023 13:59
pir
#![allow(dead_code)]
use std::iter::repeat;
fn main() {}
fn pir(n: u32) -> String {
let mut x = 1;
(0..n)
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));
}
};
}
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
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();
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);
}
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()
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) + ")");