Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
一週完成英文學習網
Search
F2E桃園
May 04, 2014
Education
1
180
一週完成英文學習網
介紹 網站發想、製作、與探索的過程 (包含 成立原因、期程進度規劃表、等等)
F2E桃園
May 04, 2014
Tweet
Share
More Decks by F2E桃園
See All by F2E桃園
[0503] 使用Sublime Text編輯HTML/CSS: Emmet + LiveStyle
f2e_taoyuan
0
410
Other Decks in Education
See All in Education
わたしのメタ学習 / My Own Meta Learning #shinjukurb
expajp
0
120
Design Guidelines and Principles - Lecture 7 - Information Visualisation (4019538FNR)
signer
PRO
0
1.7k
5 занятие. Разбор метода "8 кубиков"бизнес-модели #ideaNN 16.02.2024.
karlov
0
180
STEAM教育の枠組で行うプログラミング学習
asial_edu
0
210
Virtual and Augmented Reality - Lecture 8 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
1.2k
4 занятие. Разбор бизнес-моделей и метод красной нити #ideaNN 9.02.2024.
karlov
0
230
第1回全国商業高校Webアプリコンテスト総括
asial_corp
0
410
@ngrx/signals
yannickbaron
0
170
TCA Practice in 5 min
d_date
1
580
HyRead2324
cbtlibrary
0
120
Data Management and Analytics Specialisation
signer
PRO
0
990
保育とふりかえりをコネクト! / connect childcare and retrospectives!
psj59129
1
150
Featured
See All Featured
Music & Morning Musume
bryan
41
5.6k
Design by the Numbers
sachag
274
18k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
40
4.4k
Fireside Chat
paigeccino
21
2.6k
Making the Leap to Tech Lead
cromwellryan
124
8.5k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
Become a Pro
speakerdeck
PRO
11
4.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
320
23k
RailsConf 2023
tenderlove
4
540
Product Roadmaps are Hard
iamctodd
44
9.7k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Transcript
⼀一週完成英⽂文學習網 ! 主講者:莊宗憲 http://word.wishes.tw
莊宗憲 ! 系統設計: 補教課室系統、︑法拍系統平台、︑網路商城、︑形象網站、︑ ⾦金流簡訊、︑POS營運系統、︑⽪皮質紋檢測分析系統。︒ ! 導入⾏行業: 才藝教室、︑服飾業、︑法拍仲介業、︑宮廟、︑ 直銷業、︑公司⾏行號、︑個⼈人形象網站。︒
前提 假設各位已具備程式設計基礎
起源 英文報告滿天飛,惡補英文心灰灰。
爆肝 字典查到沒日沒夜沒時間
構圖 簡單輸入、豐富輸出。
⼀一點靈 最終希望一鍵完成所有項目
完成 整頁筆記、練習、測驗、字典。
列 需 求 、 建 資 料 庫 網 頁
版 面 規 劃 建 置 文 章 拆 解 自 動 分 析 開 發 練 習 測 驗 模 式 開 發 會 員 複 習 功 能 導 入 各 平 台 A P I 功 能 測 試 正 式 開 放
餐⼱巾紙計劃 一個跟創業者息息相關的小故事
破梗 其實我都記在筆記本與memo紙裡
再破梗 請用力想像 ! 我好認真~ 好認真 ! 好認真~ 好認真的 ! 畫了使用者情境&
! UI草圖
像這樣...
又其實...
只想到⼀一句話
1-CLICK
所以才有它 《這張圖又出現了》
天外⾶飛來⼀一筆靈感
簡潔多了
步入正題
檔案結構 程式碼依系統功能類別分開存放
碼農重構 減少垃圾碼、增加可讀性、提升維護效益
模組化 隨插即用的美妙
PDO 資料庫語法物件化,防注入、重構提高使用率。
⽂文章解析 字串處理重要函數
// 統整字串為小寫字母 strtolower(); ! ! // 讓迴圈用生命跑完所有文字吧 for、foreach、while(…){ ! preg_split
+ strpos + strlen => 截取關鍵字 ! } ! ! // 取得結果 $word_array => 目標文章處理後的單字陣列
整合臉書 導入 Facebook API
require 'facebook.php'; ! $facebook = new Facebook(array( ! 'appId' =>
'程式ID', 'secret' => '此程式所對應的編碼' ! )); ! $fbid = $facebook->getUser();// Get User ID ! if ($fbid) { //登入成功 ! try { ! //查看已登入FB用戶的個人資料 $user_profile = $facebook->api('/me'); ! } catch (FacebookApiException $e) { ! $fbid = null; ! } ! }else { ! //登入失敗 … ! }
演算法 Porter Stemming Algorithm
class PorterStemming{ ! private static $xxxxx = xxx; private static
$xxxxx = xxx; ! private static function step1($word){ … } private static function step2($word){ … } private static function step3($word){ … } } ! function ptr_s($word,…){ // 修正演算結果 $xxx = $database_pdo->original($word); if($xxx) return …; else if(strpos($word,'xxx')!==false) return substr(PorterStemming::xxx($word),0,-1). 'x'; else if(strpos($word,'xxx')===false&&strpos($word,'xx')===false) return $word ; else return PorterStemming::xxx($word); }
截取資料 get contents
$ch = curl_init(); ! $opt = array( CURLOPT_URL => '目標網址',
CURLOPT_HEADER => false, CURLOPT_RETURNTRANSFER => true, CURLOPT_USERAGENT => 'Google Bot', CURLOPT_FOLLOWLOCATION => true, CURLOPT_REFERER => ‘`http://xx.xx.xx/xx.php' ); ! curl_setopt_array($ch, $opt); ! $web_contents = curl_exec($ch); ! curl_close($ch); ! ! /* 串接平台 api 回傳 JSON 格式 true 為回傳 array 格式 , false 回傳 object 格式 */ echo json_decode(web_contents,true); !
隱藏版功能 wu la la
LIKE..
! ! ! ! ! ! ! ! ! $web
= file_get_contents(“http://xx.xx.xx”); ! ! ! 王⼦子的筆記 輸入網址,一鍵完成翻譯及單字筆記功能。
靠北 邊⾛走
None
! 解決方案 ! 自建專用主機 X ! 孤芳自賞自己用 … ! 建置網站APP
O
None
Q&A
結束~ 謝謝:)