Skip to content

Instantly share code, notes, and snippets.

View hyperion0201's full-sized avatar

Hieu Hoang hyperion0201

View GitHub Profile
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
class DocGia {
protected:
string hoTen;
string ngayLapThe;
int soThangHieuLuc;
@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;
@hyperion0201
hyperion0201 / easy-css-page-slide-transitions.markdown
Created October 21, 2018 19:37
Easy CSS Page/Slide Transitions
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
class Diem
{
public:
void Nhap();
void Xuat();
float khoangCach(Diem b);
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};
}
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;
@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) {
@hyperion0201
hyperion0201 / Ham.cpp
Created October 21, 2017 15:37
1760311_BTVN_Tuan06 - Bai06
#include "Ham.h"
int CheckLeap(int year){
int leap;
if (year % 4 == 0 || (year % 4 == 0 && year % 100 != 0)) leap = 1;
else leap = 0;
return leap;
}
int DayInMonth(int month, int year){
int nday;
switch (month)
@hyperion0201
hyperion0201 / ritcheckwithfloat.c
Created September 12, 2017 10:12
Right Isosceles Triangle with Float Variables check in C
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
void CheckSST(float a, float b, float c) {
float aceil = ceilf(a*a*10)/10;
float bceil = ceilf(b*b*10)/10;
float cceil = ceilf(c*c*10)/10;
if (a==b && ceilf((a*a+b*b)*10)/10 == cceil) {
printf("Passed !\n");
}
@hyperion0201
hyperion0201 / FirstInt.c
Created September 6, 2017 14:37
C algorithm declare first num character in a Int
#include <stdio.h>
void Process(int a){
int n;
for (int i = 10; i <=a;){
a = a/10;
}
printf("Chu so dau tien cua so a la : %d ", a);
}
void main() {
int a;