Skip to content

Instantly share code, notes, and snippets.

View rapisenpai's full-sized avatar
💀

Rafhael Lowix A. Homwad rapisenpai

💀
View GitHub Profile
class MeElidaSalise {
public static void main(String[] args) {
// Problem 1
System.out.println("Problem 1");
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(j + " ");
}
System.out.println();
@rapisenpai
rapisenpai / db.php
Created April 4, 2023 07:01
PHP Connect to MySQL
<?php
$servername = "localhost";
$username = "root";
$password = "";
$db = "ecommerce";
// Create connection
$con = mysqli_connect($servername, $username, $password,$db);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<!-- <link rel="stylesheet" type="text/css" href="css/font.css"> -->
@rapisenpai
rapisenpai / calcu.php
Last active September 9, 2022 12:46
Write a PHP code that will ask for 2 integers and the operator to perform mathematical operations.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PHP Operators</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculator</title>
<style>
body{
text-align: center;
CONNECT LOGIN BUTTON TO DATABASE(MYSQL)
1. CREATE A METHOD
Connection con;
PreparedStatement pst;
ResultSet rs;
public void Connect() {
try {
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.BorderLayout;
import javax.swing.SwingConstants;
import java.awt.Font;
import javax.swing.JPanel;
@rapisenpai
rapisenpai / Cloud Firestore
Last active January 15, 2022 06:39
Permission Denied Error in Android Studio & Firebase
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true
}
}
}
package homwad.rafhaellowix.dnsc.edu.ph;
import java.util.Scanner;
public class ArrayExercise1 {
public static void main(String[] args) {
double sum = 0;
Scanner sc = new Scanner(System.in);
int grades[] = new int[20];