├── Basic.md ├── ExampleSew.md ├── Nginxv.md ├── Notes.md ├── README.md ├── Simple.md ├── Simulator.md ├── Switch.md ├── TerraformCome.md └── User.md /Basic.md: -------------------------------------------------------------------------------- 1 | print("Hello, World!") 2 | -------------------------------------------------------------------------------- /ExampleSew.md: -------------------------------------------------------------------------------- 1 | { 2 | "status": "success", 3 | "data": { 4 | "message": "Hello, World!" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Nginxv.md: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name example.com; 4 | 5 | location / { 6 | return 200 "Hello, World!\n"; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Notes.md: -------------------------------------------------------------------------------- 1 | notes = [] 2 | 3 | loop do 4 | puts "\n1. Add Note\n2. View Notes\n3. Exit" 5 | choice = gets.chomp.to_i 6 | 7 | case choice 8 | when 1 9 | print "Enter note: " 10 | notes << gets.chomp 11 | when 2 12 | puts "Notes:" 13 | notes.each_with_index { |note, i| puts "#{i + 1}. #{note}" } 14 | when 3 15 | break 16 | else 17 | puts "Invalid choice" 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TerraformTwo -------------------------------------------------------------------------------- /Simple.md: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | class Program 4 | { 5 | static void Main() 6 | { 7 | Console.WriteLine("Hello, World!"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Simulator.md: -------------------------------------------------------------------------------- 1 | import java.util.Scanner; 2 | 3 | class ATM { 4 | private double balance = 1000; 5 | 6 | public void deposit(double amount) { 7 | balance += amount; 8 | System.out.println("Deposited: $" + amount); 9 | } 10 | 11 | public void withdraw(double amount) { 12 | if (amount > balance) System.out.println("Insufficient funds."); 13 | else { 14 | balance -= amount; 15 | System.out.println("Withdrawn: $" + amount); 16 | } 17 | } 18 | 19 | public void checkBalance() { 20 | System.out.println("Balance: $" + balance); 21 | } 22 | } 23 | 24 | public class ATMSystem { 25 | public static void main(String[] args) { 26 | Scanner scanner = new Scanner(System.in); 27 | ATM atm = new ATM(); 28 | 29 | while (true) { 30 | System.out.println("\n1. Deposit\n2. Withdraw\n3. Balance\n4. Exit"); 31 | int choice = scanner.nextInt(); 32 | 33 | if (choice == 1) { 34 | System.out.print("Amount: "); 35 | atm.deposit(scanner.nextDouble()); 36 | } else if (choice == 2) { 37 | System.out.print("Amount: "); 38 | atm.withdraw(scanner.nextDouble()); 39 | } else if (choice == 3) { 40 | atm.checkBalance(); 41 | } else break; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Switch.md: -------------------------------------------------------------------------------- 1 | Switchusing System; 2 | 3 | class Program { 4 | static void Main() { 5 | Console.Write("Enter first number: "); 6 | double num1 = Convert.ToDouble(Console.ReadLine()); 7 | 8 | Console.Write("Enter operator (+, -, *, /): "); 9 | char op = Console.ReadLine()[0]; 10 | 11 | Console.Write("Enter second number: "); 12 | double num2 = Convert.ToDouble(Console.ReadLine()); 13 | 14 | double result = 0; 15 | switch (op) { 16 | case '+': result = num1 + num2; break; 17 | case '-': result = num1 - num2; break; 18 | case '*': result = num1 * num2; break; 19 | case '/': result = num2 != 0 ? num1 / num2 : double.NaN; break; 20 | default: Console.WriteLine("Invalid operator."); return; 21 | } 22 | 23 | Console.WriteLine("Result: " + result); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /TerraformCome.md: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | region = "us-east-1" 3 | } 4 | 5 | resource "aws_s3_bucket" "example" { 6 | bucket = "hello-world-bucket" 7 | acl = "private" 8 | } 9 | -------------------------------------------------------------------------------- /User.md: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | class Program { 5 | static Dictionary users = new Dictionary(); 6 | 7 | static void Main() { 8 | while (true) { 9 | Console.WriteLine("1. Register\n2. Login\n3. Exit"); 10 | string choice = Console.ReadLine(); 11 | 12 | if (choice == "1") { 13 | RegisterUser(); 14 | } else if (choice == "2") { 15 | LoginUser(); 16 | } else if (choice == "3") { 17 | break; 18 | } else { 19 | Console.WriteLine("Invalid option."); 20 | } 21 | } 22 | } 23 | 24 | static void RegisterUser() { 25 | Console.Write("Enter username: "); 26 | string username = Console.ReadLine(); 27 | Console.Write("Enter password: "); 28 | string password = Console.ReadLine(); 29 | users[username] = password; 30 | Console.WriteLine("User registered!"); 31 | } 32 | 33 | static void LoginUser() { 34 | Console.Write("Enter username: "); 35 | string username = Console.ReadLine(); 36 | Console.Write("Enter password: "); 37 | string password = Console.ReadLine(); 38 | 39 | if (users.ContainsKey(username) && users[username] == password) { 40 | Console.WriteLine("Login successful!"); 41 | } else { 42 | Console.WriteLine("Invalid credentials."); 43 | } 44 | } 45 | } 46 | --------------------------------------------------------------------------------