Skip to content

Instantly share code, notes, and snippets.

View duyet's full-sized avatar

duyet duyet

View GitHub Profile
CREATE PROCEDURE [dbo].[TimSoSachMuonTrongThangCuaLoaiSach]
@Thang int,
@MaLoaiSach char(4),
@SoSach int OUTPUT
AS
@duyet
duyet / nodejs-rfid.js
Last active August 29, 2015 14:16 — forked from basham/nodejs-rfid.js
/*
DESCRIPTION
-----------
Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum:
http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699
CODE REPOSITORY
---------------
https://gist.github.com/806605
void ShellSort2( string num[], int n )
{
int i, flag = 1, numLength = n;
string temp;
int d = numLength;
while( flag || (d > 1)) // boolean flag (true when not equal to 0)
{
flag = 0; // reset flag to 0 to check for future swaps
d = (d+1) / 2;
for (i = 0; i < (numLength - d); i++)
#!/bin/bash
# Find all string from input, and search all file (*.txt) contains this strings.
# Van-Duyet Le <[email protected]>
# Homepage: http://lvduit.com
ext="./*.txt"
read -p "Your input string: " input
#!/bin/bash
# Van-Duyet Le <[email protected]>
# Homepage: http://lvduit.com
maindir="."
read -p "File 1: " f1
read -p "File 2: " f2
/*
Họ tên: Lê Văn Duyệt
MSSV: 13520171
Lớp: IT004.F13
Đề: 2
*/
------------------------------------------
-- INIT
@duyet
duyet / Dec2Bin.c
Last active August 29, 2015 14:17
// Van-Duyet Le <[email protected]>
// Home: http://lvduit.com
#include <stdio.h>
long dec2bin(int n) {
long result = 0;
for (int c = 31; c >= 0; c--) {
int k = n >> c;
@duyet
duyet / bash2.sh
Last active August 29, 2015 14:17
CE Lab UIT
#!/bin/bash
# viết chương trình cho phép nhập vào tên và mssv. Kiểm tra nếu
# mssv đó không trùng với mình thì bắt nhập lại. In ra màn hình kết quả.
# Van-Duyet Le <[email protected]>
# Homepage: http://lvduit.com
me=13520340
mssv=0
@duyet
duyet / rom_and_queue.sql
Created March 23, 2015 02:06
New room and queue model
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
CREATE SCHEMA IF NOT EXISTS `imagine-cup` DEFAULT CHARACTER SET latin1 ;
USE `imagine-cup` ;
-- -----------------------------------------------------
-- Table `imagine-cup`.`Users`
-- -----------------------------------------------------
@duyet
duyet / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console