Skip to content

Instantly share code, notes, and snippets.

View sanhuang's full-sized avatar

Taz Huang sanhuang

View GitHub Profile
@sanhuang
sanhuang / README.md
Created May 27, 2017 12:57
checkifCrawldata()處理逐筆比對資料庫是否已存在紀錄,是的話將特定dict移出list另外append到新的self.RECRAWLS list內!

目前問題比對是否存在邏輯應該是正確,但變數處理上可能有問題

我把爬到的數據存在一個self.CRAWLDATA (list包dict)變數餵給checkifCrawldata()逐筆查詢判斷

因為變數結構很大,我不希望是另外分存兩個變數(一個是已存在dict,另一個則是未寫入dict),希望是直接從原本的self.CRAWLDATA remove()

但我debug發現似乎這樣會造成在跑for loop的self.CRAWLDATA索引次數錯誤?因此後半索引值的dict可能直接略過處理...沒有進行比對處理

關鍵推測在dbstore.py的line:58

@sanhuang
sanhuang / Shares.php
Created August 21, 2017 05:31
SharesGarevenue.php many to one belongto Shares.php,
<?php
namespace Pubshare\Models;
/**
* Shares
*
* @package Personalwork\Mvc\Model
* @autogenerated by Phalcon Developer Tools
* @date 2017-07-20, 13:32:19
@sanhuang
sanhuang / README.md
Created June 21, 2018 01:07
Discuz自動加標籤任務計劃

Discuz自動加標籤任務計劃

此功能在wetalk與herostory都有使用,Discuz計畫任務路徑在*/source/include/cron/*建立後的檔案可以從後台計畫任務設定排程執行 除基本需求外,包含判斷處理時間、發警示信件等附加需求做法。

@sanhuang
sanhuang / viewthread.htm
Last active January 14, 2019 16:19
Discuz! 透過boorstrap modal效果樣式以及Google DFP聯播平台加入蓋板廣告作法
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<style type="text/css">
.modal{ text-align: center; }
.modal-dialog {
display: inline-block;
vertical-align: middle;
margin-top: 50px !important;
}
</style>
@sanhuang
sanhuang / index.tsx
Created June 10, 2019 05:44
React-Native片段
// 我的
import React, { Component } from 'react';
import {
Root,
Container,
Content,
Button,
Right,
Body,
@sanhuang
sanhuang / Profile.tsx
Last active June 15, 2019 04:01
無法於登入畫面導回會員畫面時正常載出已登入狀態...
import React, { Component } from 'react';
import {
Root,
Container,
Content,
Button,
Right,
Body,
Text,
H2,
@sanhuang
sanhuang / .gitlab-ci.yml
Last active April 24, 2020 08:32
我目前使用的book.json設定以及整合gitlab發布pages配置
# requiring the environment of NodeJS 10
image: node:10
# add 'node_modules' to cache for speeding up builds
cache:
paths:
- node_modules/ # Node modules and dependencies
before_script:
- npm install gitbook-cli -g # install gitbook