Skip to content

Instantly share code, notes, and snippets.

@CarterTsai
CarterTsai / cs
Created December 15, 2019 15:39
testInherit.cs
using System;
public class Program
{
public interface BaseClass
{
string baseName {get; set;}
}
public class A : BaseClass
@CarterTsai
CarterTsai / inputText.html
Created December 2, 2019 15:11
Html Input Text example
<div class="container">
<div id="example">
<ul class="list-group" v-for="data in inputData">
<v-input-text :value.sync="data"
regx-msg="請輸入數字正確格式"
regx="^[0-9]+$"
placeholder="input you text"
has-button="false"
button-word="檢查"
:button-event="test"/>
@CarterTsai
CarterTsai / inputText.js
Created December 2, 2019 15:10
vuejs input text example
// Component
var VInputText = Vue.extend({
props: {
value: { type: String, required: true, default:'' },
placeholder: { type: String, required: true, default:'請輸入資料' },
maxLength: { type: Number, required: false, default:10},
minLength: { type: Number, required: false, default:0},
regx: { type: String, required: false, default: "" },
regxMsg: { type: String, required: false, default: "格式錯誤" },
hasButton: { type: Boolean, required: false, default: false },
@CarterTsai
CarterTsai / index.html
Created November 30, 2019 14:18
image RWD with picture
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Image Test</title>
</head>
<style>
.box {
width: 100%;
@CarterTsai
CarterTsai / docker-compose.yml
Created November 24, 2019 10:10
leantime with docker
version: "3.7"
services:
leantimedb:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: 1qaz@WSX
MYSQL_USER: testtest
MYSQL_PASSWORD: 1qaz@WSX
MYSQL_DATABASE: leantime
networks:
@CarterTsai
CarterTsai / js
Created November 14, 2019 15:52
taigo 取得Yahoo熱門股票並且搜尋
const { closeBrowser, openBrowser, goto, write, click, $, into} = require('taiko');
(async () => {
try {
await openBrowser();
await goto("https://tw.stock.yahoo.com/");
// 取得熱門個股第一個股票編號, 並且搜尋
var hotStockNumber = await evaluate($('#ystkhotb th a > span'), (elem) => {return elem.innerText});
await write(hotStockNumber, into($("#stock_id")));
await press('Enter');
} catch (error) {
@CarterTsai
CarterTsai / Program.cs
Created November 6, 2019 15:07
Program.cs
using System;
namespace HamismeTemplate
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
@CarterTsai
CarterTsai / HamismeTemplate.csproj
Last active November 6, 2019 15:05
HamismeTemplate.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageType>HamismeConsoleTemplate</PackageType>
<PackageVersion>1.0</PackageVersion>
<PackageId>Hamisme.ConsoleTemplate.CSharp</PackageId>
<Title>Hamisme Console Template</Title>
<Authors>CarterTsai</Authors>
<Description>The template "Console Application" was created by Hamisme(https://hamisme.blogspot.com/).</Description>
<OutputType>Exe</OutputType>
@CarterTsai
CarterTsai / template.json
Created November 6, 2019 14:35
template.json
{
"$schema": "http://json.schemastore.org/template",
"author": "Carter Tsai",
"classifications": [ "Common", "Console" ],
"identity": "Hamisme.ConsoleTemplate.CSharp",
"name": "Hamisme Console Template (https://hamisme.blogspot.com/)",
"shortName": "hamismeconsole",
"sourceName": "HamismeTemplate",
"tags": {
"language": "C#",
@CarterTsai
CarterTsai / c#
Created November 4, 2019 16:44
read execl with openxml
using System;
using System.Collections.Generic;
using System.Linq;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
namespace read_execl
{
class Program
{