Skip to content

Instantly share code, notes, and snippets.

View SohanChy's full-sized avatar

Sohan Chowdhury SohanChy

View GitHub Profile
@SohanChy
SohanChy / Link-list-mini-project.cpp
Last active July 25, 2016 13:17
// print instructions cout<<"\nMENU\n\n" <<"1 - search insert\n" <<"2 - position delete\n" <<"3 - search\n" <<"4 - search delete\n" <<"5 - insert begin\n" <<"6 - Search item to edit\n" <<"7 - Print items\n" <<"0 - exit\n"<<endl;
#include <iostream>
using namespace std;
struct ListNode
{
int data;
ListNode *next;
};
@SohanChy
SohanChy / hex to binary.asm
Created March 20, 2016 12:26
Convert single char Hex input to Binary in assembly code - intel 8086
.model small
.stack 100h
.data
countOne db ?
countZero db ?
nln db 0ah,0dh,'$'
msg1 db 'Number of Ones: $'
msg2 db 0ah,0dh,'Number of Twos: $'
.code
main proc
@SohanChy
SohanChy / double_LinkedList.cpp
Last active March 21, 2016 14:14
Double Linked List WIP
#include <iostream>
using namespace std;
struct ListNode
{
int data;
ListNode *next;
ListNode *prev;
};
@SohanChy
SohanChy / database_table_join_DDL_intro.sql
Created March 23, 2016 07:40
database table join and DDL intro tasks.
select customer.customer_name,customer.customer_street,borrower.loan_number
from customer,borrower where customer.customer_name=borrower.customer_name;
select customer.customer_name,customer.customer_city,loan.amount from customer,borrower,loan where customer.customer_name = borrower.customer_name and borrower.loan_number=loan.loan_number;
select customer.customer_name,loan.amount from customer,borrower,loan where customer.customer_name = borrower.customer_name and borrower.loan_number=loan.loan_number and loan.amount between 1000 and 2500;
@SohanChy
SohanChy / labtest sql.sql
Last active March 30, 2016 06:51
sql for labtest joins
1)
SELECT E.EMPNO, E.ENAME, D.LOC, E.SAL, D.DNAME, D.LOC FROM EMP E, DEPT D
WHERE E.DEPTNO = D.DEPTNO AND D.DEPTNO=(SELECT DEPTNO FROM EMP WHERE ENAME = 'SCOTT') AND ENAME <> 'SCOTT';
2)
SELECT E.ENAME, E.JOB, E.SAL, S.GRADE, D.DNAME FROM EMP E, DEPT D, SALGRADE S
WHERE E.DEPTNO = D.DEPTNO AND E.JOB <> 'ANALYST'
AND D.DNAME = 'RESEARCH'
@SohanChy
SohanChy / binary-search-tree.cpp
Last active April 4, 2016 06:08
Recursion and Tree Assignment
#include <iostream>
#include <vector>
#include <iomanip>
using namespace std;
struct myInt
{
int num;
@SohanChy
SohanChy / WIP-heap-tree-binary-tree-implementation.cpp
Created April 4, 2016 04:18
A WIP attempt to implement a max/min heap tree using a binary tree structure (without array).
#include <iostream>
#include <vector>
using namespace std;
struct treeNode {
int data;
treeNode *left, *right;
};
@SohanChy
SohanChy / fact.asm
Created April 10, 2016 12:50
factorial in assembly 8086
.model small
.stack 100h
.data
a db 'a$'
.code
main proc
mov bl,5
@SohanChy
SohanChy / asdasd.asm
Created April 10, 2016 13:51
multiply
.model small
.stack 100h
.data
a db 'a$'
.code
main proc
call magic