Skip to content

Instantly share code, notes, and snippets.

View tienhieuD's full-sized avatar
🦶
hmmm

DUONG TIEN HIEU tienhieuD

🦶
hmmm
View GitHub Profile
//
#include<iostream>
#include<conio.h>
using namespace std;
class Sophuc
{
private:
float thuc, ao;
public:
import random
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
def random_string(n):
return ''.join(random.SystemRandom().choice(chars) for _ in range(n))
i = 0
while(i < 10000000):
print(random_string(64))
nstr = [1, 2, 3, 4, 5, 6, 4, 3, 2, 3]
lst = [nstr[i:i + 3] for i in range(0, len(nstr), 3)]
print(lst)
# [[1, 2, 3], [4, 5, 6], [4, 3, 2], [3]]
@tienhieuD
tienhieuD / blog_slide.html
Created August 9, 2018 04:27
Slide for Product & Blog homepage (contact me & send $1 for css)
<div class="em_blog_slide">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2>Ưu đãi - Khuyến mãi</h2>
</div>
<div class="col-md-6 align_right align_left_sm">
<a href="#" class="view_more">Xem tất cả
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</a>
import calendar
from datetime import datetime as date
def get_date_range(self, month, year):
last_day_of_month = calendar.monthrange(year, month)[1]
begin_date = date(year, month, 1).strftime('%Y-%m-%d')
end_date = date(year, month, last_day_of_month).strftime('%Y-%m-%d')
return begin_date, end_date
# -----------------------------------------
@tienhieuD
tienhieuD / Select2-Custom-CSS.less
Created August 23, 2018 06:08
Select2 Custom CSS LESS
// Select2 Custom
.select2-container--default .select2-selection--single {
height: 48px;
text-align: left;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
padding: 10px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
@tienhieuD
tienhieuD / SchemaSpy-HOWTO.md
Created August 26, 2018 15:42 — forked from dpapathanasiou/SchemaSpy-HOWTO.md
How to use SchemaSpy to generate the db schema diagram for a PostgreSQL database

SchemaSpy is a neat tool to produce visual diagrams for most relational databases.

Here's how to use it to generate schema relationship diagrams for PostgreSQL databases:

  1. Download the jar file from here (the current version is schemaSpy_5.0.0.jar)

  2. Get the PostgreSQL JDBC driver (either the JDBC3 or JDBC4 jar file is fine)

  3. Run the command against an existing database. For most databases, the schema (-s option) we are interested in is the public one:

@tienhieuD
tienhieuD / SchemaSpy-HOWTO.md
Created August 26, 2018 15:42 — forked from dpapathanasiou/SchemaSpy-HOWTO.md
How to use SchemaSpy to generate the db schema diagram for a PostgreSQL database

SchemaSpy is a neat tool to produce visual diagrams for most relational databases.

Here's how to use it to generate schema relationship diagrams for PostgreSQL databases:

  1. Download the jar file from here (the current version is schemaSpy_5.0.0.jar)

  2. Get the PostgreSQL JDBC driver (either the JDBC3 or JDBC4 jar file is fine)

  3. Run the command against an existing database. For most databases, the schema (-s option) we are interested in is the public one:

@tienhieuD
tienhieuD / hot-item.less
Created September 3, 2018 10:16
hapu, gia thuoc hapu, gia thuoc hapu, entrustlab
a.hot-item {
position: relative;
overflow: hidden;
&::before {
content: 'Hot';
width: 112px;
height: auto;
color: white;
background: #0087ff;
position: absolute;
<ul class="lv1">
<li><a href="#" style="
width: unset;
display: block;
">
<img class="icobred" src="https://dummyimage.com/20x20/999/fff&amp;text=ic">DANH MỤC
</a>
<ul class="lv2" style="
position: relative;
display: block;