Skip to content

Instantly share code, notes, and snippets.

View 0xD9D0's full-sized avatar

Marwan. 0xD9D0

View GitHub Profile
@0xD9D0
0xD9D0 / README.md
Created May 7, 2018 16:17
HTTP post to txt

This php file handles input from an HTTP post of two inputs "email" & "pass" The file will print the values in txt files stored in the same directory then redirect the user to the webpage specified in the 9th line of code.

@0xD9D0
0xD9D0 / Hide.bat
Last active May 7, 2018 16:12
A bat file that automates the process of hiding a folder.
rem This batch file provides an automated way to hide folders and unhide.
rem replace EnterYourPasswordHere with your desired password
cls
@ECHO OFF
title Folder Private
if EXIST "Locker" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
:CONFIRM
echo Are you sure you want to lock the folder(Y/N)
set/p "choice=>"
@0xD9D0
0xD9D0 / README.md
Last active May 7, 2018 16:11
Temperature controller using PIC16F877

Smart temperature controller using PIC16F877

This program consists of designing, implementing and building an small temperature controller. This controller measures the temperature in the room and turns on or off an air conditioner as needed. The user should also be able to program the controller with different temperatures for the different parts of the day.

  • The controller must contain its own clock. The user will start by setting the clock, then the controller must manage on its own.
  • Interface 8 switches to one of the input ports to simulate reading the ambient temperature in BCD format.
  • Interface an LCD and use it to constantly display the clock, the current ambient temperature, the current temperature setting and the status of the A/C (ON/OFF).
.386
.model flat, stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
.data
org 100h
grades db 81, 65, 78, 83,74, 57, 88, 92, 51 ,80 ,60

A hundred element, word-sized signed array has been stored in the data segment with starting at label IN_Data. Write a program to calculate the Variance of this array data as given in the equation. The results should be stored as Hexadecimal value in the data segment with label OUT_Data. To calculate the variance the mean should be calculated first as shown in the equation.
Equation

@0xD9D0
0xD9D0 / README.md
Last active April 22, 2024 15:58
Matrix manipulation in C++

The prgoram defines a class matrix with private data members rows, columns of type int, and **p a double pointer of type float. The class has the public member functions findNorm() which finds the Euclidean norm of a matrix, dem() which finds the determinant of a matrix, inverse() which finds the inverse of a matrix, solve() which solve a system of simultaneous linear equations, and a default parametrized constructor. Overload the operators +, == operators as members of the class, and the operators *, extraction >>, insertion << as non-members of the class.