Skip to content

Instantly share code, notes, and snippets.

View AhmedNazir's full-sized avatar
🤒
Out sick

Ahmed Nazir AhmedNazir

🤒
Out sick
View GitHub Profile
#include <iostream>
using namespace std;
int main() {
int arr[] = {1,2,3,4,5,6};
int n = 6, i;
int d = 2;
#include <iostream>
using namespace std;
void insertionSort(int arr[], int n) {
int i, key, j;
for (i = 1; i < n; i++) {
key = arr[i];
j = i - 1;
#include <iostream>
using namespace std;
void selection(int arr[], int n) {
int i, j, small;
for (i = 0; i < n - 1; i++) {
small = i; //minimum element in unsorted array
#include <iostream>
using namespace std;
int main() {
int n = 10;
int arr[10] = {6,5,7,8,9,22,1,4,6,-45};
for(int i= 0; i< n; i++){
for(int j = 0; j< n - 1; j++){
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
long EEPROMReadlong(int address);
void EEPROMWritelong(int address, long value);
LiquidCrystal_I2C lcd(0x27, 16, 2);
const byte ROWS = 4;
const byte COLS = 4;
#include <iostream>
int main() {
std::cout << "Hello World!\n";
}
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
long EEPROMReadlong(int address);
void EEPROMWritelong(int address, long value);
LiquidCrystal_I2C lcd(0x27, 16, 2);
const byte ROWS = 4;
const byte COLS = 4;
<?php
$dbhost = "localhost";
$dbusername = "id13437605_admin";
$dbpassword = "Database$1234";
$dbname = "id13437605_brandurl";
// Create connection
$conn = mysqli_connect($dbhost, $dbusername, $dbpassword, $dbname);
// Check connection
@AhmedNazir
AhmedNazir / S
Created December 17, 2019 06:47
#include <SoftwareSerial.h>
int soundSensorPin = A7;
int lightSensorPin = A8;
int buzzerPin = 7;
int startButtonPin = 2;
int stopButtonPin = 3;
//int startLED = A9;
bool button = false;
#include <SoftwareSerial.h>
int soundSensorPin = A7;
int lightSensorPin = A8;
int buzzerPin = 7;
int startButtonPin = 2;
int stopButtonPin = 3;
bool button = false;
bool alarm = false;