View stickyHeader2.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<table | |
:style="{ maxWidth: `${bodyWidthString}` }" | |
> | |
<thead ref="head"> | |
<tr> | |
<th | |
v-for="(header,index) in headers" | |
:key="index" |
View stickyHeader.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div | |
ref="viewport" | |
:style="{ height: `${containerHeight}px` }" | |
@scroll.passive="onScroll" | |
> | |
<table | |
:class="$style.header" | |
> | |
<thead> |
View offset.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
offsetBody () { | |
const scrollTop = (this.$refs.viewport as Element).scrollTop | |
const remainTopNumber = Math.floor(this.remainLineNumber / 2) | |
const remainTopHeight = remainTopNumber * this.renderLineHeight | |
const remainBottomHeight = (this.remainLineNumber - remainTopNumber) * this.renderLineHeight | |
const thresholdHeight = this.thresholdNumber * this.renderLineHeight | |
const gap = scrollTop - this.bodyTranslateY | |
const overThreshold = gap < remainTopHeight - thresholdHeight || gap > remainTopHeight + thresholdHeight | |
const isReachBottom = this.totalHeight - (scrollTop + this.viewportHeight) < remainBottomHeight | |
const isReachTop = scrollTop < remainTopHeight |
View scroll.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div | |
ref="viewport" | |
:style="{ height: `${viewportHeight}px` }" | |
@scroll.passive="onScroll" | |
> | |
<div | |
:style="{ height: `${totalHeight}px` }" | |
> | |
<section |
View simple.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<table> | |
<thead> | |
<tr v-for="(title, index) in titles"> | |
<th key="index">{{ title }}</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr v-for="(item, index) in items"> | |
<td key="index">{{ item }}</td> |
View bw.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Bridgewell</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<script> |
View proposal - 1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// refer to https://github.com/kdchang/reactjs101/blob/master/Appendix04/README.md | |
const facebookCampaignType = new graphql.GraphQLObjectType({ | |
name: 'FacebookCampaign', | |
fields: { | |
id: { type: graphql.GraphQLString }, | |
name: { type: graphql.GraphQLString }, | |
status: { type: graphql.GraphQLString }, | |
// other fields | |
} |
View add_score.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const csv = require('fast-csv') | |
var addscore = fs.readFileSync("./addscore.csv").toString() | |
var students = fs.readFileSync("./student.csv").toString() | |
var arr = {} | |
var wa = [] | |
csv | |
.fromString(students, {headers: true}) |
View Test_Plot.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
import pandas as pd | |
import csv | |
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
import time | |
import datetime |
View add_image.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import argparse | |
# 使用 Python3 | |
# python3 add_image.py 檔案路徑 | |
URL_ROW_NAME = "聯絡人 學生資格資料" | |
parser = argparse.ArgumentParser(description="Input the csv file path.") | |
parser.add_argument('file_path', metavar="file path", type=str, nargs=1, help="the kktix csv local file path") |
NewerOlder