Skip to content

Instantly share code, notes, and snippets.

View H2CO3's full-sized avatar
🦀

Árpád Goretity  H2CO3

🦀
View GitHub Profile
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 11
.globl _main
.align 4, 0x90
_main: ## @main
.cfi_startproc
## BB#0:
pushq %rbp
Ltmp0:
.cfi_def_cfa_offset 16
1. utasítás: | 2. utasítás:
|
PC[-2] PC[0] PC[2] |
+-------+--------+--------+-------+--------+--------+
| "ADD" | 0x12ab | 0x2468 | "SUB" | 0x2345 | 0x3456 |
+-------+--------+--------+-------+--------+--------+
^ ^ ^ ^
+ PC-2 | +- PC+2 +- PC+4 stb.
|
PC = 0xf00
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
static int twocomp(unsigned u)
{
if (u > INT_MAX) {
return (long long)u - (long long)UINT_MAX - 1LL;
} else {
fn take_mut_ref(ptr: &mut i32) {
*ptr += 1;
}
fn main() {
let mut x = 42;
{
let ptr = &mut x;
take_mut_ref(ptr);
use std::io;
use std::io::{Read, BufRead, BufReader};
use std::cmp::{min, max};
use std::collections::HashMap;
struct Testcase {
sum_price: u64,
flavor_prices: Vec<u64>,
}
1 + 0.000i 1 + 1.732i 1 - 1.732i
1 + 1.732i -2 + 3.464i 4 - 0.000i
1 - 1.732i 4 - 0.000i -2 - 3.464i
use std::ops::{Add,Sub,Mul,Div,Neg};
use std::fmt;
use std::fmt::Display;
#[derive(Clone, Copy, Debug)]
struct Complex {
re: f32,
im: f32,
}
Learning TODO:
~~~~~~~~~~~~~~
* Theoretical(-ish) Stuff:
------------------------
- Computer Science, Algorithms, Data Structures (e.g. Finite Automata,
Classic Graph Algos, Searching and Sorting, Solutions to NP-Complete
Problems, Inventing and Using Heuristics, Complexity Theory in Depth,
#include <stdio.h>
#include "bmp.h"
typedef struct __attribute__((packed)) {
uint16_t bfType; // specifies the file type
uint32_t bfSize; // specifies the size in bytes of the bitmap file
uint16_t bfReserved1; // reserved; must be 0
uint16_t bfReserved2; // reserved; must be 0
uint32_t bfOffBits; // species the offset in bytes from the bitmapfileheader to the bitmap bits
Békésen ülök a Mammut KFC-ben, mellettem két, 24-28 éves forma lány. Egyikük hevesen ecseteli
a pasizás terén véghezvitt hőstetteit.
Sztori #1: Volt egy barátja, annak egy húga. A húgnak volt egy pasija. A csaj ezzel a csávóval jött össze,
még mielőtt a barátjával szakított volna, ezért hetekig titkolóztak – amit a leányzó láthatóan roppant humorosnak tartott.
Sztori #2: Nagyon büszke volt arra is, hogy ezután (meg előtt) volt pár egyéjszakás kalandja is. (vajon közben is voltak…?)
Sztori #3: 2 hónapig volt egy 20 éves (!!!) barátja, aki állítása szerint 16-ként viselkedett. De legalább vicces volt!
Úgy látszik, azt, hogy – idézem "mások előtt is képtelen volt normálisan viselkedni" –, ez teljesen jól ellensúlyozta.
Na, ezek után végre kifújta magát, így hagyta a másik lányt is szóhoz jutni, aki erre: "Jé, ez olyan érdekes! Nekem