Skip to content

Instantly share code, notes, and snippets.

View theArjun's full-sized avatar

Arjun Adhikari theArjun

View GitHub Profile
@theArjun
theArjun / PolarToCartesianAndViceVersa.cpp
Last active September 28, 2018 04:03
Polar Coordinates to Cartesian Coordinates and Vice Versa
#include<iostream>
#include<cmath>
#include<math.h>
using namespace std;
class Cartesian{
private:
float xCo, yCo;
public:
@theArjun
theArjun / OperatorOverloadingInC++.cpp
Last active January 13, 2019 18:04
Operator Overloading for '+' , '- ' and '='.
// Q. Write a program with class Distance to realize following main method.
// [Internal 2018 Spring - GCES]
#include<iostream>
using namespace std;
class Distance{
private:
int cm;
@theArjun
theArjun / databaseConnect.php
Last active January 13, 2019 18:05
PHP Database Connect
<?php
$conn = mysqli_connect("localhost","root","");
if(!$conn){
die("Host connection failed.<br/>");
}else{
echo "Host connected.<br/>";
}
$create_db = "CREATE DATABASE authentication";
@theArjun
theArjun / Form_Validation.htm
Last active September 28, 2018 04:01
Client Side Validation using REGEX
<!DOCTYPE html>
<html>
<head>
<title>Register</title>
</head>
<body>
<form action="#" method="POST" id = "myform">
<fieldset>
<legend>Fill up the form</legend>
<label>
@theArjun
theArjun / Class Template for Stack of Array.cpp
Last active September 28, 2018 04:02
Class Template for Stack of Array
#include<iostream>
#include<conio.h>
using namespace std;
template<class X>
class Stack{
private:
X index;
X pile[100];