Skip to content

Instantly share code, notes, and snippets.

View datduyng's full-sized avatar

Dominic Nguyen datduyng

View GitHub Profile
//http://doors.stanford.edu/~sr/universities.html
let data = [];
for (let item of $("ol").children) {
if ( item instanceof HTMLLIElement) {
let inner = item.innerText;
let email_grp = inner.match(/\(([^)]+)\)/);
if (!email_grp || email_grp.length < 2) continue;
let email = email_grp[1];
Cereal Name Manufacturer Type Calories Protein (g) Fat Sodium Dietary Fiber Carbs Sugars Display Shelf Potassium Vitamins and Minerals Serving Size Weight Cups per Serving
100%_Bran Nabisco C 70 4 1 130 10 5 6 3 280 25 1 0.33
100%_Natural_Bran Quaker Oats C 120 3 5 15 2 8 8 3 135 0 1 -1
All-Bran Kelloggs C 70 4 1 260 9 7 5 3 320 25 1 0.33
All-Bran_with_Extra_Fiber Kelloggs C 50 4 0 140 14 8 0 3 330 25 1 0.5
Almond_Delight Ralston Purina C 110 2 2 200 1 14 8 3 -1 25 1 0.75
Apple_Cinnamon_Cheerios General Mills C 110 2 2 180 1.5 10.5 10 1 70 25 1 0.75
Apple_Jacks Kelloggs C 110 2 0 125 1 11 14 2 30 25 1 1
Basic_4 General Mills C 130 3 2 210 2 18 8 3 100 25 1.33 0.75
Bran_Chex Ralston Purina C 90 2 1 200 4 15 6 1 125 25 1 0.67
@datduyng
datduyng / Pyodbc sqlserver lambda
Created October 2, 2020 03:23 — forked from carlochess/Pyodbc sqlserver lambda
How to install Pyodbc for Sqlserver.
# Start a container that mimic the lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/var/task -e ODBCSYSINI=/var/task -v "$PWD":/var/task lambci/lambda:build-python2.7
# Then, download ODBC source code, compile and take the output
curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.5.tar.gz -O
tar xvzf unixODBC-2.3.5.tar.gz
cd unixODBC-2.3.5
./configure --sysconfdir=/var/task --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/home
make install
cd ..
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Class</h2>
<p>In this example we demonstrate a simple class definition and how to use it.</p>
<p id="demo"></p>
@datduyng
datduyng / index.html
Created May 24, 2020 23:30
google page
<html>
<header>
</header>
<!-- commenting -->
<body>
//https://www.jqueryscript.net/menu/Material-Floating-Action-Button.html
function Fab(json){
var __element = document.querySelector(json.selector);
var positions = ["top-left","top-right","bottom-left","bottom-right"], countposition = 0, status = false;
if (!json.selector || !__element) {
console.error("There is no selector or you have not written one, write one in the option 'selector' in the json");
return false;
}
positions.forEach(function(e, i){
if(positions[i] != json.position){
@datduyng
datduyng / interview_prep_data_structure_java.md
Created May 27, 2019 06:01
interview_prep_data_structure_java
@datduyng
datduyng / interview_prep_data_structure_java.md
Created May 27, 2019 06:01
interview_prep_data_structure_java
@datduyng
datduyng / interview_prep_data_structure_java.md
Last active June 9, 2019 10:15
interview_prep_data_structure_java
@datduyng
datduyng / chapter05-MOSFET.md
Created February 25, 2019 16:30
chapter05-MOSFET


Chapter 05: MOSFET

5.1 Device Struture and physical operation

5.1.1 Device Struture