Skip to content

Instantly share code, notes, and snippets.

View trhgquan's full-sized avatar

Hoang-Quan, Tran trhgquan

View GitHub Profile
@trhgquan
trhgquan / app.py
Last active April 19, 2023 17:25
Runable example for the KDS
from flask import Flask, render_template
app = Flask(__name__)
orders = [
{
'order_id': 221,
'items': [{'name': 'Noodle', 'quantity': 3},
{'name': 'coke', 'quantity': 2}],
'table_num': 1
BAA00004 3 7 BB
CSC00004 4 8.5 BB
CSC10001 4 10 BB
MTH00003 3 5 BB
MTH00041 3 5 BB
MTH00081 1 5.5 BB
MTH00086 1 10 BB
BAA00102 2 6 BB
CSC10002 4 8.5 BB
@trhgquan
trhgquan / sample.html
Last active July 28, 2022 13:32
Sample html and text to collect GPA data. https://github.com/khongsomeo/create-grade-csv
<div id="lich-thi-dkhp">
<fieldset>
<legend>Danh Sách Kết Quả Học Tập</legend>
<div id="tbDiemThiGK_wrapper" class="dataTables_wrapper" role="grid"><table id="tbDiemThiGK" class="dkhp-table dataTable">
<thead>
<tr role="row"><th title="Năm Học/Học Kỳ" class="ui-state-default" role="columnheader" tabindex="0" aria-controls="tbDiemThiGK" rowspan="1" colspan="1" style="width: 89px;" aria-sort="ascending" aria-label="NH/HK: activate to sort column descending"><div class="DataTables_sort_wrapper">NH/HK<span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-n"></span></div></th><th class="left ui-state-default" title="Mã MH/Tên MH" role="columnheader" tabindex="0" aria-controls="tbDiemThiGK" rowspan="1" colspan="1" style="width: 324px;" aria-label="Môn Học: activate to sort column ascending"><div class="DataTables_sort_wrapper">Môn Học<span class="DataTables_sort_icon css_right ui-icon ui-icon-carat-2-n-s"></span></div></th><th title="Số Tín Chỉ" class
@trhgquan
trhgquan / launch.json
Created March 7, 2022 18:30
Launch gdb debugger inside VSCode, open a new console window for interactive sessions.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
@trhgquan
trhgquan / tasks.json
Last active March 7, 2022 18:29
VSCode C++ tasks.json to compile multiple .cpp files inside a project, output to main.exe
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\MinGW\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
package _3;
import java.util.*;
public class Test {
public static void main(String[] args) {
Shape s = new Rectangle(3, 4, "white");
System.out.println(s.toString());
System.out.println("Area = " + s.getArea());
@trhgquan
trhgquan / bainhomgymchua.java
Last active June 1, 2021 03:42
Bài nhóm Gym chúa
public class Student extends Person {
private String _program;
private int _year;
private double _fee;
public Student(String name, String program,
String address, int year, double fee) {
_name = name;
_address = address;
_program = program;
@trhgquan
trhgquan / atom-custom-modify.less
Last active June 30, 2021 09:29
my custom atom style modify.
/**
* My custom CSS.
*
* Code by @trhgquan - https://github.com/trhgquan
*/
// The underline cursor for the text editor.
.editor .cursor {
height: 1em !important;
@trhgquan
trhgquan / cheat-using-result.js
Created October 5, 2020 12:31
using the result to cheat.
/**
* sample auto solve questions
* code by @trhgquan - https://github.com/trhgquan
*/
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
@trhgquan
trhgquan / edit-cookie.js
Created October 5, 2020 09:39
edit cookie to create new answer