Skip to content

Instantly share code, notes, and snippets.

Avatar

Tzu-Yin Hong lili668668

View GitHub Profile
View autoChangeColor.java
// 第一種結果手機當掉
public static void autoChangeColors(final ImageView bg, int time, final int[] colors) {
final int size = colors.length;
final long milltime = time * 1000;
Thread timer = new Thread(new Runnable() {
int count = 0;
@Override
public void run() {
while (true) {
View autoChangeColor2.java
public static void autoChangeColors(final ImageView bg, int time, final int[] colors) {
final int size = colors.length;
final long milltime = time * 1000;
final Handler handler = new Handler() {
int count = 0;
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
@lili668668
lili668668 / C3.java
Last active Apr 12, 2016
itsa46測試第三題
View C3.java
import java.math.BigInteger;
import java.util.Scanner;
public class C3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
int n = input.nextInt();
BigInteger[][] p = new BigInteger[n+1][n+1];
@lili668668
lili668668 / index.html
Created Aug 30, 2017
下載檔案的 html 範例檔
View index.html
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<a href="Behavior.xml" download="Behavior.xml">下載行為檔案</a>
</body>
</html>
@lili668668
lili668668 / add_image.py
Last active Sep 5, 2017
將 kktix 的 csv 裡的檔案連結加工,讓 Google sheet 可以直接觀看圖片,方便檢驗身分
View add_image.py
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")
@lili668668
lili668668 / Test_Plot.py
Last active Sep 28, 2017
想給予一些比較,所以放上來
View Test_Plot.py
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
@lili668668
lili668668 / add_score.js
Last active Dec 23, 2017
合併 學生名單 與 組別名單 與 用學號加分系統 與 zuvio 成績登計系統
View add_score.js
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})
@lili668668
lili668668 / proposal - 1.js
Last active Jan 8, 2019
Ads API 整合 GraphQL Schema Proposal
View proposal - 1.js
// 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 bw.html
<!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>
@lili668668
lili668668 / simple.vue
Last active Aug 1, 2019
虛擬滾動表格解說的範例程式碼
View simple.vue
<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>