Skip to content

Instantly share code, notes, and snippets.

View justmangoou's full-sized avatar

Tuan Nguyen justmangoou

View GitHub Profile
#!/bin/bash
# The script utilizes `sources_sync.sh` provided as
# part of NVIDIA(R) SDK installer
set -e
echo -e "\e[32mThe script patches and applies in-tree kernel modules required for Librealsense SDK\e[0m"
#Locally suppress stderr to avoid raising not relevant messages
exec 3>&2
exec 2> /dev/null
#define TRIG_PIN 12
#define ECHO_PIN 11
#define SAMPLE_INTERVAL_US 30
#define TEMPERATURE 25
#define HUMIDITY 50
static float prv_get_speed_of_sound() {
// Linearized 0% RH: 331.45 + 0.606718 * temperature
@justmangoou
justmangoou / co_ban_ve_lap_trinh.md
Last active March 13, 2025 03:31
Cơ bản về lập trình

Cơ bản về lập trình

Đây là những phần lí thuyết mà phải nắm chắc vì là nền tảng cho những phần nâng cao sau này.

Kiểu dữ liệu (Data types)

Trong đa số các ngôn ngữ lập trình đặc biệt là những ngôn ngữ bắt nguồn từ C như C++, Java hay Go đều có nét tương đầu về kiểu dữ liệu.

Trong đó ta chia ra làm 3 phần (Ngôn ngữ C/C++):

Kiểu dữ liệu số

Kiểu dữ liệu số nguyên

Nếu các kiểu chứa unsigned ở đằng trước thì sẽ chỉ có số dương.

import org.jetbrains.annotations.NotNull;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import xyz.mangostudio.smp.bridge.MinecraftServerBridge;
import net.minecraft.network.packet.c2s.login.LoginHelloC2SPacket;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerLoginNetworkHandler;