關於網路那些事...

Marketing, SEO, Web trends, Programming tutorial, Web design, and Life event...

股票市場 - 什麼是多空、牛市、空頭、熊市

股票分析 - 什麼是多空、牛市、空頭、熊市

股票分析 - 什麼是多空、牛市、空頭、熊市

股市買賣常會用一些名詞來形容買賣程度

Continue Reading

Javascript - 手機瀏覽器開啟APP ,或者導向App Store or Google Play下載

手機瀏覽器開啟APP ,或者導向App Store or Google Play下載

若使用者有安裝APP,則自動啟用,若無安裝,則導向下載頁面。

在 iOS 之前,如果要從各種瀏覽器啟動APP,都必須透過 URI Scheme

在 iOS9 之後的版本,只要你的應用程式支援 Universal Links(通用連結),就可以直接透過HTTP來啟動APP (在此不討論Universal Links)

下表格分別比較幾種瀏覽器啟動APP的方式:

Universal Link Android App Link URI Scheme Chrome Intent
系統版本 >= iOS 9 >= Android 6 Chrome1 < 25, iOS Chrome1 >= 25
未安裝APP 開啟 Web 開啟 Web 錯誤警示 開啟 Web
能否不發生跳轉 不能 不能
前往下載地址 不能
iFrame觸發 不能 不能 Chrome1 <= 18, iOS < 9 不能
連結組成 正常的 URL 正常的 URL 自定義 URL 格式 自定義 intent URL

(來源: http://harttle.land)

Continue Reading

Javascript detect mobile device and iOS Version

Best way

Use mobile-detect.js to check iOS, device… is recommended.

But, if you wanna a easy way to detect mobile and iOS, you can start with :

Detect Mobile Device

Continue Reading

Javascript 判斷移動裝置,以及iPhone, iPad手機 ios 板本

推薦的方式

判斷移動裝置或版本的最佳方式,還是建議使用完整的 Library

mobile-detect.js

若你需要一個快速可以套用在現成專案的作法,則可以參考下方:

判斷移動裝置

雖然這個判斷無法完全涵蓋所有移動裝置,仍適用於各主流的裝置

Continue Reading

ROD、IOC、FOK 是甚麼意思?

ROD、IOC、FOK 是甚麼意思? 在下單操作介面,會看到 ROD、IOC、FOK 條件, 是甚麼意思呢? ROD (Rest of Day) 當日有效單 掛限價單 從掛單,一直到收盤,這張單子都會有效 IOC (Immediate or Cancel) 立即成交否則取消單 掛市價單、範圍市價單、選擇權複式單 都屬於IOC 掛單當下,會盡量搓合成交 (能成交幾張就會盡量搓合,其餘會自動刪單) 例如,你想買進10口8000,市場上只有3口 8000委賣 會自動成交 3 口,其餘7口自動刪單 FOK (Fill or Kill) 全部成交否則取消單 掛單當下,市場上要有足夠的口數能力即成交,否則全部刪單

Continue Reading

期貨新手入門介紹

期貨基本認識 交易時間:上午8:45~下午13:45總計5小時 遇到結算日,則交易時間於 13:30 結算 買賣期貨 期貨商、證券商 都有提供期貨買賣 期貨商手續費較低 證券商服務較多元 可是情況自行選擇廠商 期貨單位 期貨只會有一個單位: “口” 買一個期貨單位就稱為 1口, 買十個單位就稱為10 口 買一個期貨單位,也稱買 1 口多單 賣一個期貨單位,可稱為放空1口期貨,也稱買 1 口空單 [備註] 股票單位有"股"和"張" 1張等於1000股 需要開兩個帳戶 期貨交易就是保證金交易,因此買期貨需要開兩個帳戶 期貨戶 保證金帳戶 台指期貨 [大台指(TX)] 原始保證金 83000元 維持保證金 64000元 每點200元

Continue Reading

PHP 判斷來源裝置的方法

通常會使用 user agent 來判斷來源裝置

在 PHP 可以使用下方式來取得 user agent

<?php
$user_agent = $_SERVER['HTTP_USER_AGENT'];

Continue Reading

ASP.NET 啟用跨站API請求 “Access-Control-Allow-Origin”

ASP.NET 啟用跨站API請求 “Access-Control-Allow-Origin” 簡易設定方式有兩種

1.設定 web.config

Continue Reading

Highcharts Error #15 原因-處理方式

Highcharts Error #15 原因 發生這個錯誤的原因是因為 Highcharts 預期資料應該已排序過 若輸入的資料中, x 軸沒有進行由小到大(asc)排序 就會出現Error #15 解決方式 (1) 若 Highcharts 需要倒序顯示 Highcharts 倒序 order desc 的方式顯示資料 在 xAxis 或 yAxis 只要加上 reversed: true 就可以倒序顯示

Continue Reading

分K線歸納法

分K線歸納法

以分鐘為單位的 K線有兩種歸納方式

前歸 包括目前時間點往前推n分鐘 後歸 不包括目前時間點,往前推n分鐘

Continue Reading

Laravel 程式緩存優化技巧

設定訊息緩存

會將config內容合併保存在 /bootstrap/cache/config.php 重新設定.env 時,直接輸入這個指令就能更新設定內容

php artisan config:cache

可以用以下命令清除訊息緩存配置

php artisan config:clear

Continue Reading

五檔報價

五檔報價

五檔報價分別包括:

  • 1 K線

Continue Reading

How to output Object Data from Chrome console.log

var myObject = Data.toJSON(); console.log(myObject); If we just right click and save console object, something will wrong as fellowing script.js:393 (64805) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, …] Just stringify your object, console and save again

Continue Reading

Chrome Enable Logging chrome.exe --enable-logging --v=1

Browsing the Chrome Application Location Change directory to Chrome and Press Enter cd c:\Program Files (x86)\Google\Chrome\Application Enable logging Type in the following and Press Enter This will open a new browser page, and open your site to create console.

Continue Reading

Ionic Error: connect ETIMEDOUT xxxxx at at Object._errnoException ... at _exceptionWithHostPort ... at TCPConnectWrap.afterConnect

Whem Ionic error happened: Error: connect ETIMEDOUT 34.196.18.91:443 at Object._errnoException (util.js:1022:11) at _exceptionWithHostPort (util.js:1044:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14) Try Fellowing solution: PROXY=http://proxy.yourcompany.com:8080 ionic start Whem running command, will auto detect some package should be installed

Continue Reading

Npm set proxy_html

npm ERR! network If you are behind a proxy This is a problem related to network connectivity. In most cases you are behind a proxy or have bad network settings. If you are behind a proxy, please make sure that the ‘proxy’ config is set properly.

Continue Reading

Laravel - PHP 無法取得 Hppt Request $_GET Params 值的解決方式

這裡記錄一下,在 Nginx + PHP 環境無法取得 Http Get Request 的問題

在本機端,使用的是 apache 環境,會需要取得網址上的Get參數

<?php

    public function index(Request $request) {
    	$message = $request->message;
      ...
    }

上傳至 Server Side (Nginx 環境) 卻發現無法取得參數

嘗試取得完整網址與$_GET是否能取得值

這時先測看看完整網址以及檢查$_GET

<?php

    public function index(Request $request) {
				echo $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
        print_r($_GET);

確定在 localhost 確實能完整捕捉到 Localhost 結果如:

http://localhost:8000?message=hello
Array
(
[message] => hello
)

但是在 server 上面有捕捉到完整網址,但同樣輸出的是空的 $_GET Server 輸出結果如:

http://example.com?message=hello
Array
(
)

檢查Server side 設定

正式 Server 使用的是 Nginx

前往Server 設定中,檢查一下 nginx.conf ,發現原因是

Continue Reading

RTT 網路封包往返時間

RTT (Round Trip Time) 亦可稱為往返時間

指的是,網路封包從發送命令,列隊,命令被執行,往返結果 這一整個過程

客戶端與主機的地理位置距離,會影響資料傳輸所需的 RTT

以目前的網路基礎設施多採用光纖

Continue Reading

PHP_CodeSniffer 簡介,及 VS Code 擴充使用

PHP COdeSniffer 包含了兩個 PHP script

  • phpcs(PHP Code Sniffer),可以檢查程式碼風格
  • phpcbf (PHP COde Beautifier and Fixer),自動修正程式碼風格

在 VS Code 會使用下面這個擴充

  • php-cs-fixer ,自動修正程式碼風格

Continue Reading

讓 0-6月的寶寶睡過夜的方法

0~6 月的嬰兒還沒有成熟的自然入睡能力,

因此,照顧這階段的寶寶,最大的困擾點往往就是孩子半夜淺眠,造成父母的時間跟著打亂

這裡就彙整一些方法,給各位參考

可依照寶寶的個性及習慣來調整~ 希望會對各位新生兒爸媽有所幫助

Continue Reading