├── 1.md ├── Basic32.md ├── Basicwer.md ├── Function.md ├── Generator.md ├── Movie.md ├── Notebook.md ├── README.md ├── Styling.md ├── basket └── luck.md /1.md: -------------------------------------------------------------------------------- 1 | use std::io; 2 | use rand::Rng; 3 | 4 | fn main() { 5 | let secret_number = rand::thread_rng().gen_range(1..101); 6 | println!("Guess a number between 1 and 100:"); 7 | 8 | loop { 9 | let mut guess = String::new(); 10 | io::stdin().read_line(&mut guess).expect("Failed to read input"); 11 | 12 | let guess: u32 = match guess.trim().parse() { 13 | Ok(num) => num, 14 | Err(_) => { 15 | println!("Please enter a valid number."); 16 | continue; 17 | } 18 | }; 19 | 20 | if guess < secret_number { 21 | println!("Too low!"); 22 | } else if guess > secret_number { 23 | println!("Too high!"); 24 | } else { 25 | println!("You guessed it!"); 26 | break; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Basic32.md: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | func handler(w http.ResponseWriter, r *http.Request) { 9 | fmt.Fprintf(w, "Hello, World!") 10 | } 11 | 12 | func main() { 13 | http.HandleFunc("/", handler) 14 | fmt.Println("Server running on http://localhost:8080") 15 | http.ListenAndServe(":8080", nil) 16 | } 17 | -------------------------------------------------------------------------------- /Basicwer.md: -------------------------------------------------------------------------------- 1 | print("Hello, World!") 2 | -------------------------------------------------------------------------------- /Function.md: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | greet() { 3 | echo "Hello, $1!" 4 | } 5 | greet "World" 6 | -------------------------------------------------------------------------------- /Generator.md: -------------------------------------------------------------------------------- 1 | require 'securerandom' 2 | 3 | def generate_password(length = 12) 4 | SecureRandom.alphanumeric(length) 5 | end 6 | 7 | puts "Generated Password: #{generate_password}" 8 | -------------------------------------------------------------------------------- /Movie.md: -------------------------------------------------------------------------------- 1 | CREATE TABLE movies ( 2 | id SERIAL PRIMARY KEY, 3 | title VARCHAR(100), 4 | genre VARCHAR(50), 5 | year INT 6 | ); 7 | 8 | INSERT INTO movies (title, genre, year) VALUES ('Inception', 'Sci-Fi', 2010); 9 | INSERT INTO movies (title, genre, year) VALUES ('The Dark Knight', 'Action', 2008); 10 | INSERT INTO movies (title, genre, year) VALUES ('Interstellar', 'Sci-Fi', 2014); 11 | 12 | SELECT * FROM movies WHERE genre='Sci-Fi'; 13 | -------------------------------------------------------------------------------- /Notebook.md: -------------------------------------------------------------------------------- 1 | print("Hello, World!") 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Notebook -------------------------------------------------------------------------------- /Styling.md: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | background-color: #f0f0f0; 4 | color: #333; 5 | } 6 | h1 { 7 | color: #007BFF; 8 | } 9 | -------------------------------------------------------------------------------- /basket: -------------------------------------------------------------------------------- 1 | const http = require('http'); 2 | 3 | http.createServer((req, res) => { 4 | res.writeHead(200, { 'Content-Type': 'text/plain' }); 5 | res.end('Hello, World!'); 6 | }).listen(3000, () => console.log('Server running on port 3000')); 7 | -------------------------------------------------------------------------------- /luck.md: -------------------------------------------------------------------------------- 1 | public class HelloWorld { 2 | public static void main(String[] args) { 3 | System.out.println("Hello, World!"); 4 | } 5 | } 6 | --------------------------------------------------------------------------------