Skip to content

Instantly share code, notes, and snippets.

View hyperion0201's full-sized avatar

Hieu Hoang hyperion0201

View GitHub Profile
@hyperion0201
hyperion0201 / SingleLinkedList.cpp
Created May 11, 2018 03:18
24 core functions about single linked list C++
#include "SingleLinkedList.h"
int CompareData(Data info1, Data info2) {
if (info1.x == info2.x) return 0;
else if (info1.x > info2.x) return 1;
return -1;
}
void InitList(List& l) {
l.pHead = l.pTail = NULL;
}
bool isEmptyList(List l) {
import React from 'react'
import quest1 from './Q1';
class Question extends React.Component{
constructor (props){
super(props);
this.state ={ correctRecorded: false, incorrectRecorded: false};
}
handleChange(event){
var score = 0;
import React from 'react'
import quest1 from './Q1';
import Question from './Question';
class QuestionPaper extends React.Component{
constructor(props){
super(props);
this.state={totalscore:0};
}
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
class Diem
{
public:
void Nhap();
void Xuat();
float khoangCach(Diem b);
@hyperion0201
hyperion0201 / easy-css-page-slide-transitions.markdown
Created October 21, 2018 19:37
Easy CSS Page/Slide Transitions
@hyperion0201
hyperion0201 / LinkedList.cpp
Created October 25, 2018 09:38
Data Structures Week 04
#include "LinkedList.h"
LinkedList::LinkedList(){
this->length = 0;
this->pHead = NULL;
}
Node* LinkedList::CreateNode(int data) {
Node* p = new Node;
if (p != NULL) {
p->key = data;
p->pNext = NULL;
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
class DocGia {
protected:
string hoTen;
string ngayLapThe;
int soThangHieuLuc;
@hyperion0201
hyperion0201 / AVLTree.cpp
Created November 29, 2018 03:49
AVL Tree simple implementation in C++
/*
* C++ program to Implement AVL Tree
*/
#include<iostream>
#include <algorithm>
#define pow2(n) (1 << (n))
using namespace std;
/*
1. create db using GUI
2. create db using commnand line
3. i/o data
4. query
5. gruoping
6. mid test
7. mid test : 50%
8. double query
9. division
10. final test
@hyperion0201
hyperion0201 / install.sh
Created May 5, 2019 02:58
Jekyll 2.6.0 Installation on Manjaro/Arch Linux based.
sudo pacman -S ruby ruby-rdoc
gem update
gem install jekyll
# Add this line to .zshrc (if you are using ZSH) : export PATH=$HOME/.gem/ruby/2.6.0/bin:$PATH
# For default terminal, add to .bashrc