This file contains hidden or 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
<html> | |
<head> | |
<title>拖曳物件</title> | |
</head> | |
<style> | |
.drop-area { | |
border: 1px solid black; | |
width: 300px; | |
height: 300px; |
This file contains hidden or 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
#!/usr/bin/env node | |
console.log('yay gist') |
This file contains hidden or 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 enchant | |
from xml.dom.minidom import parse | |
import xml.dom.minidom | |
import js2py | |
import re | |
# ------------------- Define ------------------- | |
pat = '[a-zA-Z]+' | |
xmlTags = ['String', 'value', 'string'] | |
# ------------------- Use lib ------------------- |
This file contains hidden or 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 selenium import webdriver | |
chromedriver = "/Users/justin_w_wu/Documents/www/drivers/chromedriver" | |
web = webdriver.Chrome(chromedriver) | |
web.get('http://www.cwb.gov.tw/V7/') | |
web.find_element_by_link_text('生活氣象').click() #點擊頁面上"天氣預報"的連結 |
This file contains hidden or 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 codecs | |
import argparse | |
from bs4 import BeautifulSoup | |
#在CMD取得引數 | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-name") #<file_name.py> -name "html檔名" | |
args = parser.parse_args() | |
#讀取 HTML 靜態頁 |
This file contains hidden or 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
@mixin striped-bg($bg-color: #ccc, $darken-amount: 5%, $stripe-color: darken($bg-color, $darken-amount)) | |
background-color: $bg-color | |
@include background-image(linear-gradient(-45deg, $stripe-color 25%, transparent 25%, transparent 50%, $stripe-color 50%, $stripe-color 75%, transparent 75%, transparent)) | |
background-size: 40px 40px | |
.warning | |
font-family: sans-serif | |
font-weight: bold | |
color: #333 | |
text-align: center |
This file contains hidden or 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
var monoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/member3'); | |
/* 新增Add */ | |
var Product = mongoose.model('Product', { | |
title: String, | |
price: Number | |
}); |
This file contains hidden or 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
require('font-awesome/css/font-awesome.css'); | |
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>'; |
This file contains hidden or 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
function reducer(state = [], action) { | |
switch (action.type) { | |
case 'ADD_ATTENDEE': | |
// Return a new array with old state and added attendee. | |
return [{ | |
name: action.name, | |
color: action.color | |
}, | |
...state | |
]; |
This file contains hidden or 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
Video Tutorial: | |
https://egghead.io/series/getting-started-with-redux | |
Lesson 05: | |
Redux: Writing a Counter Reducer with Tests | |
http://jsbin.com/piqapi/edit?js,console | |
Lesson 06: | |
Redux: Store Methods: getState(), dispatch(), and subscribe() | |
http://jsbin.com/jadunek/edit?js,console |
NewerOlder