Skip to content

Instantly share code, notes, and snippets.

View jarwonozt's full-sized avatar
🏠
Working from home

NOZT jarwonozt

🏠
Working from home
View GitHub Profile
@jarwonozt
jarwonozt / circle_calc.rs
Created November 27, 2024 10:05
Simple Calculator Circle
static PI:f64 = std::f64::consts::PI;
fn main()
{
let circle_calc = function::circle_calc(14);
for list in 0..circle_calc.len() {
println!("{}", circle_calc[list]);
}
}
pub fn nested_array_heros() {
let heros = [
[
"7", //hero id
"Lancelot", //name
"assassin", //type
"89", //power
"100", //hp
"3", //count skill
],
@jarwonozt
jarwonozt / grade.rs
Last active November 20, 2024 12:10
Basic example grade score in RUST
use std::io;
fn main()
{
println!("Username : ");
let mut username = String::new();
io::stdin()
.read_line(&mut username)
.expect("Read input failed");
@jarwonozt
jarwonozt / check_odd.rs
Last active November 20, 2024 12:09
Check Odd Number in Rust
use std::io;
fn main()
{
println!("Enter an odd number between 1 - 10");
let mut number = String::new();
io::stdin()
.read_line(&mut number) // read number
.expect("Read input failed");
@jarwonozt
jarwonozt / reset-mysql-password-on-linux-mint.md
Created January 22, 2024 17:16 — forked from syahzul/reset-mysql-password-on-linux-mint.md
Reset MySQL root password on Linux Mint 19.2

Let's start by stopping the currently running MySQL database.

$ sudo systemctl stop mysql.service

Next, create set proper permission to the folder to be used by MySQL process to store and access socket file.

$ sudo mkdir -p /var/run/mysqld