Skip to content

Instantly share code, notes, and snippets.

View duyet's full-sized avatar

duyet duyet

View GitHub Profile
@duyet
duyet / README.md
Created December 26, 2015 11:32 — forked from kentcdodds/README.md
upload-file

upload-file angular-formly type

This is my upload-file type for what I use at work. We use angular-upload for the upload service to do the actual file uploading. We also have several abstractions and use ES6 that may confuse you a little bit (sorry about that). Hopefully this gets you started though.

@duyet
duyet / springer-free-maths-books.md
Created December 29, 2015 20:41 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@duyet
duyet / gulp-bookmarks.md
Created January 3, 2016 13:20 — forked from dypsilon/gulp-bookmarks.md
Collection fo Gulp Bookmarks
UPDATE is_options SET option_value = REPLACE(option_value,'http://localhost/isweb','http://is.duyetdev.com');
UPDATE is_options SET option_value = REPLACE(option_value,'/var/www/html/isweb/wp-content','/var/www/html/wp-content');
UPDATE is_posts SET guid = REPLACE(guid,'http://localhost/isweb','http://is.duyetdev.com');
UPDATE is_revslider_slides SET layers = REPLACE(layers,'localhost\\/isweb','is.duyetdev.com');
UPDATE is_revslider_slides SET params = REPLACE(params,'localhost\\/isweb','is.duyetdev.com');
UPDATE is_revslider_sliders SET params = REPLACE(params,'localhost\\/isweb','is.duyetdev.com');
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDR9FdvYr2HWK0kAyNYBAHsMBMdRqjB5H9h3IrBVnPo3g2WVDQw8ntXxuda8mz/X0GR/yayGaK041s3qgxNfTZ5mgNJzz///hyOYOSXuU8QPdNJePNwnzuKBYeaoEC9XSR/V9g8ucnbTxeM+QEZp+DOwzAe9eNM6GdSrvVQELfEEXie17kjFXDpvepBaPVacXvlvsoEMuVSUUNsu+x1FUfKvQ6XfZlR8clBie5YeuxEvK7LuBxGeoC07q0t08LGjFLJhs8OIUjnab6hGSefcfEKfqwohrS2O1rJaMqB4lWkq016lGhN/DwvgwlZvoQccllEOQwXw8eofU5815G1MJA5 duyetdev@duyetdev
Connection con = DBConnect.getConnecttion();
String sql = "insert into category value(?,?,?)";
PreparedStatement ps;
try {
ps = (PreparedStatement) con.prepareStatement(sql);
ps.setInt(1, 0);
ps.setString(2, "Abc");
ps.setString(3, "Def");
ps.executeUpdate();
con.close();
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author duyetdev
*/
void swap(int &b, int &b) {
int t = a; a = b; b = t;
}
int main() {
int x = 1, y = 2;
swap(x, y); // <=== Cái này là gọi hàm, học kiêu gì trời ơi
}
  1. Install python3, pip, posgres, virtualenv
sudo apt-get install python3 python3-dev python-pip 
sudo apt-get install libpq-dev libjpeg-dev build-essential python-dev # fix
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
sudo apt-get install apache2 libapache2-mod-wsgi-py3
sudo apt-get install postgresql postgresql-contrib
sudo pip install virtualenv