EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

Preloading images and executing code only after all images have loaded

http://www.javascriptkit.com/javatutors/preloadimagesplus.shtml

http://fragged.org/preloading-images-using-javascript-the-right-way-and-without-frameworks_744.html

ChrUbuntu

https://github.com/iantrich/ChrUbuntu-Guides

Crouton

Crouton Installation Guide: Updated for Broadwell Chromebooks
http://www.voltron00x.com/?p=1091


Moving Crouton installation to USB-drive
https://www.reddit.com/r/Crouton/comments/3vyyf0/moving_crouton_installation_to_usbdrive/



Elementary OS for crouton
https://docs.google.com/document/d/1Mj7r8QzONMUHBSIMHWLgmRCS-EfefeYj-3-AO9wt_00/edit


Unreal Tournament 4 on the Chromebook!https://holeunlee.wordpress.com/2015/03/24/unreal-tournament-4-on-the-chromebook/

[轉]開箱:達墨 TOPMORE AP USB3.0 32GB光速原子隨身碟

http://blog.icece.tw/TOPMORE-AP-USB3-32GB

usb 3.0   32GB   read 212.3MB/s  write 48MB/s

[轉]開源 x 節流:企業導入實例分享


http://www.slideshare.net/jasoncheng7115/x-52965782


http://www.slideshare.net/jasoncheng7115/x-52965806?next_slideshow=1




=====
http://www.slideshare.net/jasoncheng7115/zimbra-20151125?next_slideshow=3

http://www.slideshare.net/jasoncheng7115?utm_campaign=profiletracking&utm_medium=sssite&utm_source=ssslideview

[轉]Proxmox VE 4.1 vs VMWare

http://www.mobile01.com/topicdetail.php?f=494&t=4648520#10

[轉]New tool lets Chromebooks run Linux in a desktop window

http://www.pcworld.com/article/2864153/new-tool-lets-chromebooks-run-linux-in-a-desktop-window.html

http://www.pcworld.com/article/2984834/chromebooks/installing-linux-on-a-chromebook-what-you-need-to-know.html

[轉]Dual Boot ChromeOS & Linux on a Chromebook

https://johnlewis.ie/
https://johnlewis.ie/dual-boot-chromeos-linux-on-a-chromebook/

https://wiki.archlinux.org/index.php/Chrome_OS_devices/Chromebook


CPU是Baytrail,可能會有問題

https://wiki.archlinux.org/index.php/Chrome_OS_devices/Chromebook

ChromeOS需要更新的話,需要刷回官方 BOOT_STUB或 在RW_LEGACY下,用CTRL + D,正常的chromeos開機,更後,再刷新BOOT_STUB


chromebook已經刷了別的linux,要修改BOOT_STUB/Full ROM,先刷回官方;修改RW_LEGACY slot,也是要先ChromeOS刷回原官方 RW_LEGACY,再刷修改版本RW_LEGACY
**反正做什麼動作,前先回復到官方版本,再刷修改後版本


Acer Chromebook 15, and an HP Chromebook 14.


sudo cgpt add -i 1 -s 4194304 /dev/sda
把第一分割區,縮小到2GB


sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 2
關閉rootfs驗証


sudo vbutil_kernel --get-vmlinuz /dev/sda2 --vmlinuz-out /media/removable/UNTITLED/chromeos-vmlinuz
複製ChromeOS kernel到usb
“UNTITLED” 是usb名稱

sudo dd bs=1k count=32 if=/dev/sda of=/media/removable/UNTITLED/chromeos-gpt.bak
備份開機記錄及磁區分割表


重開機,看還是不是能正常運作
如果ok,請刷 非官方BOOT_STUB,插入Linux live usb,然後重開

安裝linux時,會建立磁區

裝完重開

複製vmlinuz到/dev/sda3 根目錄下

設定GRUB,/etc/grub.d/40_custom 新增

menuentry "Chrome OS" {
 insmod part_gpt
 insmod ext2
 set root=(hd0,gpt3)
 linux /vmlinuz root=/dev/sda3 rw noresume noswap i915.modeset=1
 loglevel=1 quiet noinitrd tpm_tis.force=1
}

**開機多一個Chrome OS,在第3個磁區

update-grub/grub2-mkconfig > /boot/grub2/grub.cfg
執行更新grub,然後重開,測試新選項ChromeOS

記得要更新ChromeOS,要先回覆官方的BOOT_STUB,備份ChomeOS GTP分割表,重開正常執行ChromeOS。如果不能開機,就用ChromeOS Recovery。更新完畢後,再刷非官方BOOT_STUB,且回復Linux版本的GPT分割表,才能雙開機。

**按上面說法,灌好Linux的之後,要先備份好Linux GTP分割表,之後再回復,怎麼備份....再說吧


Baytrial部份 要 略過在MMC上最多8個主分割區問題

umount /dev/mmcblk0p[1,3,5]
sudo modprobe -r mmc_blocksudo modprobe mmc_block
mmcblk.perdev_minors=32

以上~




[轉]Asterisk Elastix

http://www.mobile01.com/topicdetail.php?f=505&t=4588954&p=2

EluSiOn
2015-11-02 02:30 #14

nec 後續跟其它套件整合非常麻煩, 因此非常不建議

asterix 在臺灣無法有很好的永續的商業模式,因爲業者賺不到錢, 連電信商也賺不到錢, nec 的方案一定要上看10萬 (含話機) elastix 不到 3萬搞定. 所以廠商賺不到錢, 怎麼會有人肯服務. pbx 一臺舊的 intel core2 就可以搞定了.

但是如果你們公司真的要使用 elastix/asterix 的話, 自己本身的能力一定要夠強, 不然你是拿石頭砸腳. 我可以給你一些我本身的經驗

如果要使用 asterix/elastix, 最好不要使用 pstn 因爲 ippbx 是數位訊號, pstn 是模擬訊號, 這樣子轉換過程中, 會出現 delay 跟 echo. 很難解決. 我會建議你們使用中華電信的 ip centrex + 自己的 ip pbx asterix 系列, 這樣子就沒有問題了, 全部都是 sip trunk 走到完. 然後跟中華電信談節費打折就好, 不需要安裝新的設備 (市話到手機節費).

初學者使用 elastix 是最簡單, 但是它開發的速度太慢了, 幾乎是慢其它 group 有3年多的腳步. 現在都已經開始使用 asterix 13 的版本了, 但是 elastix 不管是 os 或是 asterix 的版本都卡在 centos 5.11 跟 asterix 11, 它們剛剛才開完開發者大會, 每一個人都超級失望的, 因爲它的 elastix 4 連 rc1 都無法正式推出, 還是卡在 beta. 我自己是使用 incrediblepbx 的版本, 但是這個系統困難非常多, 而且在臺灣根本沒有人會.話或是 qq 給他們慢慢殺價, 我部署150臺話機, 一個話機才 1400 臺幣含稅含運費 (gxp 1620)

sip 的手機軟體建議使用 bria, 雖然最貴但是它是最穩定而且一直更新上去, 不管 ios 以及 android 支援都很好, 一個月內會有一到兩次更新. 免費的我建議使用 zoiper

ip pbx 跟 ip pbx 的連接請使用 iax2 trunk, 它效率最好最快最穩定, 不同的辦公室互相打來打去最方便, 而且跳車也可以設置.基本上臺灣島內網路速度非常快, 一臺 pbx 就可以服務臺灣全省了.

關於手機節費以及 sms 我會建議你去淘寶上面買一個 gsm gateway 然後自己辦理 中華電信羣租來節費, 對於外部手機打電話進來, 也可以把手機號碼提供出去給客戶, 讓客戶也可以省錢 (手機到市話節費). 而自己內部互打只要使用內部分機互打, 只有數據流量的費用而已. 只要手機sip 軟體支援 g729, 數據量真的使用的很少很少....

再來就是 sip one way audio 的問題, 一定是 pbx 或是 sip client 沒有設定好, 沒有設定好 SIP NAT, ICE 以及 TURN 這三部分. 這個不是 asterix 的問題, 這個是設定者本身調試的問題. (播跟打的雙方都在 firewall 後面, 然後 sip nat 沒有設定好, sip ext 沒有允許開啓 ice 以及 sip client 沒有設定好 turn)

asterix 的穩定性以及功能性強大, 有太多美國前五百大的公司使用, 包括很多政府機關以及醫院使用. 會不會使用都是看功力了, 這個就是免費開源軟體的生態以及環境.

最後, sip 手機用戶並不需要使用 vpn 或是 pptp 連線回公司才能播以及接電話, 開 vpn 非常耗電池, 只要防火牆/fail2ban/sip nat 設定的正確, 根本不需要增加 sip client 端的負擔, 使用 vpn 模式只是廠商/網管偷懶不想找出問題點而已.

php jquery multi file download

https://github.com/sjardim/processwire-simple-flickr-album

http://www.webinfopedia.com/multiple-file-download-by-creating-zip-file-in-PHP.html

http://stackoverflow.com/questions/1754352/download-multiple-files-as-zip-in-php

=====
jquery


https://github.com/biesiad/jquery-multidownload

** $('.my_download_trigger').multiDownload({ delay: 500 });
http://stackoverflow.com/questions/9047645/download-multiple-files-without-using-zip-file

https://github.com/sindresorhus/multi-download

Docker Container

http://pulipuli.blogspot.tw/2015/06/dockeropenvz-why-docker-is-better-than.html

https://www.gitbook.com/book/philipzheng/docker_practice/details

PageSpeed Module vestacp

https://forum.vestacp.com/viewtopic.php?f=11&t=9790



Why Google PageSpeed Module
http://www.phpxs.com/post/2501
https://moz.com/ugc/use-googles-pagespeed-module-to-dramatically-increase-the-speed-of-your-website

Google PageSpeed Module
https://developers.google.com/speed/pagespeed/module/configuration
https://developers.google.com/speed/pagespeed/module/download


=====

Compiling Third-Party Modules Into Nginx
https://serversforhackers.com/compiling-third-party-modules-into-nginx

=====

Apache mod-pagespeed-stable_current_amd64.deb
http://www.matrudev.com/post/download-install-mod_pagespeed-linux-server/

https://www.howtoforge.com/tutorial/ubuntu-apache-mod_pagespeed/

chromebook apk



https://www.reddit.com/r/chromeapks/

http://archon-runtime.github.io/

https://chrome.google.com/webstore/detail/twerk/jhdnjmjhmfihbfjdgmnappnoaehnhiaf?hl=en

http://apps.evozi.com/apk-downloader/

=====
https://www.reddit.com/r/chrubuntu/comments/391mh5/help_thinking_about_getting_the_acer_chromebook/

https://johnlewis.ie/custom-chromebook-firmware/rom-download/

https://plus.google.com/communities/112479827373921524726

php image compression || php image optimization

2016/03/02

http://www.mikkonen.info/imageutil/




=====2015/11/29


http://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/

From my tests, running ImageMagick with the following settingsproduced the smallest results, while generally being visually indistinguishable from Photoshop’s output:

mogrify -path OUTPUT_PATH -filter Triangle -define filter:support=2 -thumbnail OUTPUT_WIDTH -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB -strip INPUT_PATH

I looked at 11 different functions and found that -thumbnail does the best job of optimizing quality and file size.

PHP

composer require nwtn/php-respimg

require_once('vendor/autoload.php');
 use nwtn\Respimg as Respimg;
$image = new Respimg($input_filename);
$image->smartResize($output_width, 0, false);
$image->writeImage($output_filename);



At the moment the script is a bit limited, and there’s no *great* way to do this. However, you could try running it in a loop on the command line, like this:

for f in inputdir/* ; do smartresize "$f" 300 outputdir/; done

=====

https://a1websitepro.com/optimize-images-with-php-in-a-directory-on-your-server/

auto height or width image optimization


=====

http://calendar.perfplanet.com/2014/mozjpeg-3-0/

=====

image-serverhttps://github.com/blomming/image-server

=====

Smart Lencioni Image Resizer  GD
https://github.com/lencioni/SLIR

=====

https://github.com/mozilla/mozjpeg/releases

=====

幾個圖片無損的壓縮方案
http://blog.chengweichen.com/2015/10/blog-post.html
http://blog.chengweichen.com/2015/10/mozjpeg.html

=====

win32 工作 免費的
http://nikkhokkho.sourceforge.net/static.php?page=FileOptimizer

Let’s Encrypt ubuntu 14.04 vmware 2

Using Let’s Encrypt (beta) with Vesta Control Panel
https://docs.google.com/document/d/1y5tTtImTGk_zqYe3lelGtMl8_gSCQcNgCCdbYTQAb7E/edit#heading=h.fc0utsgks117

./letsencrypt-auto certonly -a webroot --renew-by-default --agree-dev-preview --server https://acme-v01.api.letsencrypt.org/directory --webroot-path /home/admin/web/<domain>/public_html -d <domain>

other way:
./letsencrypt-auto --server https://acme-v01.api.letsencrypt.org/directory \
  --renew-by-default \
  -a webroot --webroot-path [PATH_TO_APP_WEBROOT] --email [EMAIL] --text \
  --agree-tos --agree-dev-preview -d [DOMAIN_NAME] auth


Super Important  now open not need to do

https://docs.google.com/forms/d/15Ucm4A20y2rf9gySCTXD6yoLG6Tba7AwYgglV7CKHmM/viewform?edit_requested=true


Super Important2

open pem file, copy inside data put in vestacp..............no put path/file


SO Wait for Let’s Encrypt OPEN~~~


=====renew=====
 ./letsencrypt-auto renew

1、If   /etc/letsencrypt/archive/<domain>/  have  new file:cert2.pem 、 chain2.pem、fullchain2.pem 、privkey2.pem then

check  /etc/letsencrypt/live/<domain>/   If link is new file, the mean
ln -s /etc/letsencrypt/live/<domain>/fullchain.pem /home/admin/conf/web/ssl.<domain>.pem
ln -s /etc/letsencrypt/live/<domain>/privkey.pem /home/admin/conf/web/ssl.<domain>.key
ln -s /etc/letsencrypt/live/<domain>/cert.pem /home/admin/conf/web/ssl.<domain>.crt
ln -s /etc/letsencrypt/live/<domain>/chain.pem /home/admin/conf/web/ssl.<domain>.ca
this no use.

2、put new file:cert2.pem 、 chain2.pem、fullchain2.pem 、privkey2.pem to vestacp SSL Support again

SSL Certificate   =  cert2.pem
SSL Key  =  privkey2.pem
SSL Certificate Authority / Intermediate (optional)  = chain2.pem

3、restart apache and nginx then ok~~~


vestacp install

1、https://vestacp.com/#install
2、login change admin password
3、restore backup 

restore backup Fails


Super Important 
A

Old vmware or server setting:~admin/conf/web/*.conf  must keep or backup. Beacuse vestacp backup & resstore have big promble at here.

Example: I have nginx.xxxxx.conf use include other nginx.ooooo.conf .  When resotre conf, vestacp make error, put all conf together one file.

So Best Way is backup old server conf/web/* , restore conf/web/  then

nginx -t   for test check conf, If ok, nginx is work ok.

So this step must remeber~~~~~~

B
named  bind9 load file permission denied

HOW to check

tail -f /var/log/syslog
then
sudo service bind9 restart
then can see log. IF see named load file have permission denied, the mean log /home/admin/conf/dns conf faild!

SO  NOW EDIT

sudo nano /etc/apparmor.d/usr.sbin.named
put
  /home/admin/conf/dns/** rw,
  /home/admin/conf/dns/ rw,
then
sudo service apparmor reload
then 
sudo service bind9 restart
then check syslog agin.
tail -f /var/log/syslog
IF Not see  permission denied,  It's mean SUCCESS!

Search google, some article chmod、chgrp、chown /home/admin/con/dns/*  is not use for me.

Let’s Encrypt ubuntu 14.04 vmware

DHCP can use internet.

1、install new ubuntu 14.04
2、install vmware-tools
3、install ssh
sudo apt-get install openssh-server
4、install git
sudo apt-get update
sudo apt-get install git
5、https://letsencrypt.readthedocs.org/en/latest/using.html#installation

use root at root directory
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
https://letsencrypt.readthedocs.org/en/latest/contributing.html#ubuntu
 ./bootstrap/ubuntu.sh
 https://letsencrypt.readthedocs.org/en/latest/using.html#letsencrypt-auto
 ./letsencrypt-auto 

.netword static ip & dns

static ip
nano /etc/network/interfaces
iface eth0 inet static
address 192.168.0.xxx
netmask 255.255.255.0
gateway 192.168.0.xxx

dns
nano /etc/resolvconf/resolv.conf.d/base
nameserver 8.8.8.8
nameserver 8.8.4.4
resolvconf -u
--close vm NIC,

reboot

ui 畫面 制作

http://blog.akanelee.me/


photoshop 製作 Mockup

http://blog.akanelee.me/posts/260806-noteprototype-software




https://uistore.io/downloads/category/tools/

Blocs 整個排版
WebZap photo排版




網頁 版面 html動畫
http://tumult.com/hype/
http://tumult.com/hype/pro/

vestacp Restore Fails

nginx restart error
nginx: [emerg] unexpected end of file, expecting ";" or "}" in
he problem is in /etc/nginx/conf.d/vesta.conf
There is probably a apache.conf line and you need to remove it and problem solved.

https://forum.vestacp.com/viewtopic.php?t=5352
https://forum.vestacp.com/viewtopic.php?t=6213

=====

Error: Database connection to localhost failed

service mysql stop && service mysql start && dpkg-reconfigure mysql-server-5.5
>> the mean: reset root passwd

https://forum.vestacp.com/viewtopic.php?t=5195

=====
phpmyadmin can't login

nano /usr/local/vesta/conf/mysql.conf   see root passwd

http://ljasonh.com/find-and-change-vestacp-mysql-root-password/

vestacp restore backup



v-restore-user admin admin.2015-11-08.tar


you should run this command under root
or (under sudo user)
/usr/local/vesta/bin/v-restore-user


Error: backup doesn't exist
mkdir /home/backup
chown admin backup
chgrp admin backup
ln -s /home/backup / 
move   admin admin.2015-11-08.tar to directory backup

 IF still can not, put admin.2015-11-08.tar in backup

 IF no /home/backup  mkdir and chown chgrp, but check /etc/passwd have account

ARChon ARC welder

https://www.reddit.com/r/chromeapks/

http://archon-runtime.github.io/

https://chrome.google.com/webstore/detail/twerk/jhdnjmjhmfihbfjdgmnappnoaehnhiaf?hl=en

http://apps.evozi.com/apk-downloader/

買筆電-寫程式


1、一開始考慮是mac air 13
2015年最新版,官方是31,900,新的基本上各種管道 東森、森森、momo等,有時候會有28,900,而特定管道mobile01 28,900,日本代購算一算也是28,900左右

二手的部份,基本上保固內,可以賣到比新品還高~ 扯! 過保一年,還可以賣到2萬4左右,一堆人在買。

這個用想就知道,用一年的mac才花四五千,賣掉,換新的mac,這樣每年都用最新的mac,可以用5年以上.........這一定是有問題的!超級保值到讓人無法理解!肯定有出問題的。

主要寫程式,重點:
A、螢幕:舒服 是大部份用過mac螢幕都這樣說,另外簡報時,畫面清楚
B、觸控版:不用滑鼠,在外面時不用帶滑鼠

A這點到是比較麻煩的,現階段螢幕要舒服,就nb來說,非常少!
B這點我到是覺得慢慢不是重點,因為就使用習慣而言,如果在家居多,用滑鼠居多,滑鼠的速度肯定是最快的,更不論跨多螢幕切換;試用surface pro或是看chromebook、聯想等,其實多點觸控手勢都做很多了,win8.1、win10都有支援多點了,所以覺得已經不太是優點。


2、就螢幕和ssd,所以看到 MSI GE GP PE系統,這時候突然想到一件事,鍵盤,寫程式要鍵盤很好打,MSI這電競系統,其中一點就是鍵盤好打,第二特點,可以多插兩組m2,一組msata,這個對寫程式,android、開模擬、vm環境,非常有幫助!新品或二手(保固內)在2萬2上,所以和mac air 13差了6~7千的差距,而且效能(CPU、獨顯、SSD、RAM等)超出非常多,散熱又好很多,但重量、續航就是缺點,但如果是在家用居多,或到starbuck定點使用,如不定點用才會需要觸控版~~ 在這裡想了久~~

有看了asus、acer、....gigabtye等,.....沒什麼考慮!

3、這時看到了asus的ux305、ux303lb,mm,基本上,真的不錯,螢幕好(?)、有多點手勢觸控,輕薄、長續航等,反正就是合格啦!但價格........2萬2到3萬多,那乾脆買mac air 13,一年後還能賣高價… 長考

4、雙十一來了,仔細看了又看,發現真的沒有更便宜,更重要是 筆電不能直寄台灣.....無言,本來想說 asus ux305、ux303lb會比較便宜,但實際上又沒有,那雙十一到底便宜在那!!!

5、領薪水算一算,真的要花2萬7買一台2015年今年保內mac air 13...想想....長考,錢好像不好賺,加上不景氣,會不會被fire!

再仔細思考,要寫程式,最重要:一、螢幕,二、ssd 就這樣!
一、長時間看螢幕,那就要好的螢幕,要大,要舒服
二、ssd,省時間,常寫php之類的,也不用ram多或是多個ssd,只要夠用就好

所以
一、開始上pcdvd看螢幕,dell....ezio.....樂天的全球購....買二手ezio送台灣,好像蠻合算的,後來還是放棄,保固和人品很重要,(當然看過mac螢幕,2萬8起跳…我肯定買EZIO),最後有大神分析螢幕又做分析比較表,BENQ的22吋,3千五左右,低藍光、不閃、VA面版,就這個啦!完全符合寫程式的需求,又能開到1920 * 1080解析,最低成本,達到一定的效果!

二、有了螢幕,但出門呢? 總要一台記筆型,這裡分成兩個想法,A、用esxi,開vm,遠端控制。B、找一台13~15吋1080P出去時能展示就行了!

A、大家都知道ctrix的遠端控制最好,但沒錢,不用盜版,RDP 8.1看full hdd還太不行,測試報表...會lag,想到以前有測過splashtop,這個順,比ctrix好,但只能用在local lan,遠端能用,要花錢!

又生出兩個想法:A-1:可以在外面連回來在esxi vm寫程式,A-2:純展示,網頁都在主機上了,不用連回來。

查Thin Client,大陸叫瘦客戶端,很便宜rdp 8.1,基本上運到台灣只要2千以內,這樣就可以直接terminal RDP.

A-1、後來想想,這樣的話,要走vpn,比較方便是ssl vpn,但效率待測,在外面頻寬也是個問題,所以還是展示為主,除非特殊情況下,才要vpn,那就不用特地ssl vpn了。

如果在家Lan環境下使用,遠端很順,那為什麼要在esxi上開vm,因為esxi上是八核,不用白不用,所以又參考vmware vmfs、虛擬rdm、直接rdm,看vmware測試報告vmfs和直接rdm差不多.....差別在於,如果直接rdm,硬碟可以直接移出來,如果是vmfs,可以快照之類! 要再想想!

連線遠端就用splashtop 在lan處理,是比較理想的

B、找了又找,看到chrombook,喔,有符合,toshiba 13吋 1080,有手勢,有待機九小時以上,美國ebay、amazom賣到259美金,還有往下一些,新品,也有返包裝,結果...amazom寄送回台,要1萬1~2....那就~~不太~~~合算~~,如果7、8千,肯定就買了。

後來查一下,acer chromebook 15在台灣有賣1萬1,喔!也都符合,又有兩年保,好像就不用買toshiba…一萬一是有15吋1080P,我又想想,真的找不到這價位的windows nb,找不到!

最後最便宜的是gigabyte 17吋 1600*900,11,900 元.....最後,考慮中!


最終買了
acer chromebook 15 cb5 https://tw.buy.yahoo.com/gdsale/gdsale.asp?act=gdsearch&gdid=6229583

10,900 刷卡1%回鐀

又送
Targus 16” Motor 後背包

現在line 也有web
只剩下,編輯器、ftp、ssh

=====
2015/12/16

後來發現一個東西叫 電腦棒,直接輸出hdmi,在大陸基本上一台2,000內,第三代,有小風扇的,不會過熱,代表效能會穩定,而且又可以裝android~~ 這個比thin client好太多了,底層走win10~~

代表rdp 8.1肯定沒問題! splashtop windows client沒問題! 又能隨身帶著走!


所以正確的架構是買benq va 低藍光 要有含hdmi,買一支電腦棒,這個就能直送台灣,運費也省,插在benq螢幕上,可以直接有win10環境,接上盤鍵、滑鼠就可以用了,內有wifi,連到esxi 內的win10 vm,RDP完美使用,splashtop完美使用!

chromebook 出門能做過展示就行。平常就用chromebook上上網,查資料,真的要開發時,就用電腦棒遠開發,如果在外面臨時,chromebook也可以有vpn+rdp、vpn+splashtop、chrome remote 以上方式,暫時先連回win10 vm處理。

主力還是固定點的上面開發。


=====
2016/01/06
在昨天發生chrome OS 毀損之後,重試完整recovery動作兩次後,送修了~~~ 真慘~啊!

=====
2016/03/13
用到現在,因為vmware內的windows vm無法用vt,寫android的android模擬器,無法加速,很慢,所以只能放棄 chrome os 連vmware走rdp,如在chromebook換linux,連RDP基本上OK,但就卡在android開發上~

本來要賣,發現懂這台妙處的人很少,幹脆不要賣,自用比較簡單,改成win10就行了~~

http://sueboy.blogspot.tw/2016/03/acer-cb5-571-windows-10-installation.html

加壓機 為了 熱水器

http://www.mobile01.com/topicdetail.php?f=168&t=1449338


木井 的KQ系列
寫著Q的線,代表著流控開關
寫著P的線,代表著壓力開關


順水流控加壓機
缺點:水塔沒有高於馬達50公分不能用!
http://search.ruten.com.tw/search/s000.php?searchfrom=indexbar&k=%B6%B6%A4%F4%ACy%B1%B1%A5%5B%C0%A3%BE%F7&t=0
3千上


葛蘭富熱水器用加壓機
評價也可以,但價格約
http://search.ruten.com.tw/search/s000.php?searchfrom=indexbar&k=%B8%AF%C4%F5%B4I%BC%F6%A4%F4%BE%B9&t=0
4千以上



1、電腦變頻式最理想

TQIC變頻加壓機
https://tw.bid.yahoo.com/item/%E3%80%90%E5%B7%9D%E5%A4%A7%E6%B3%B5%E6%B5%A6%E3%80%91-%E5%A4%A7%E4%BA%95TQIC-400%E3%80%821-2HP%E9%9B%BB%E8%85%A6%E8%AE%8A%E9%A0%BB%E5%8A%A0%E5%A3%93%E9%A6%AC%E9%81%94-%E8%B6%85-1245449321
9,000

http://goods.ruten.com.tw/item/qa?21308025099650#qna

您好~TQIC400 $10,500元,TQIC800 $12,500元

一些關於前端Framework的想法 上 中 下

https://medium.com/@tomchentw/framework-5e29b0fadeac#.wjfrlldfy

https://medium.com/@tomchentw/framework-1b133c6e320d#.u62x5757o

https://medium.com/@tomchentw/framework-a3befb7db904#.4mihsnswl




封裝程式邏輯

React.createClass 的方式來產生一組Component元件(native ES6 class support is on the road),這點跟其他Framework很像,但是React對待元件狀態有嚴格規定:
this.props為given properties (by owner),不能修改,也不應該被修改
this.state為自身的狀態物件,所有的狀態都源自於此(也只該源至於此,否則就是你的問題)

React透過Framework給出強烈的約束行為,限制你的思考方向,因此我們較容易寫出清楚的程式碼:因為狀態的來源只有一個this.state。也因為我們減少狀態來源到只有一個地方(Single Source of Truth!),元件封裝變得容易許多,邏輯部分也只要搞清楚this.state的變化就好。
達成復用性

基於「封裝程式邏輯」的理由,我們剛剛講了this.state被封裝在元件裡面,因此對於使用這個元件的人(owner)而言,它要怎麼去影響元件的狀態?其實就是根據owner傳進去給該元件的props來決定。你可以說,當你決定好這個元件要回應哪些props的時候,介面就已經訂完了,復用性根本連想都不必想,它已經內化在整個React的核心價值,寫好一個元件後,復用性就在那裡:各位,我們準備好了。

你會想,不,哪有那麼好康的事?事實上,正因React完美達到這兩個聖杯,幾乎所有在這裏撞到牆的Web Developers,一使用後便瘋狂的愛上它,社群幾乎是瞬間飆漲起來,非常之可怕。我誠摯的推薦大家好好的玩一下React,新一波的技術革命正在醞釀!


React components呈現爆炸性成長(1)(2)





「單向資料流」可以說是整個React/flux架構最核心的想法,而且也正因為單向資料流的實現,我們可以輕易實現Computer Science的聖杯「Single Source of Truth」,在flux架構下,所有的資訊來源只有Store(s),沒有第二種可能;這時候,React的props相對於Store而言就收斂成另一種state。

Single Source of Truth的好處非常多,以React Component來講,這讓元件的行為變得可預期,測試更好寫了。即使在不寫測試的情況下,唯一真相會大幅提高元件可信賴度(這邊可以另外開文寫了)。




我現在選擇的Framework是React.js與Flux.js,它提供三大好處解決長久以來開發的問題:
Custom Element:真正Reusable、Scalable的客製化元件。
單向資料流:易除錯、架構清晰且邏輯完整的思考模式。
Single Source of Truth:核心思想。

我相信只要是寫過Single Page Application的開發者,都會知道這三點有多麼重要,而React/flux幫我們優雅地實現了。再不試試看損失的機會成本越大呀!

5 Practical Examples For Learning The React Framework

http://tutorialzine.com/2014/07/5-practical-examples-for-learning-facebooks-react-framework/



react natvie vs ionic vs polymer vs titan etc......






现在 react 是否比 polymer 流行,为什么?

http://www.zhihu.com/question/27757141







不仅用于UI构建:Facebook React完全解析


http://www.html-js.com/article/Front-end-Perspective%203105








http://www.reactnative.com/uiexplorer/
http://www.ruanyifeng.com/blog/2015/03/react.html

dreamfactory Login request is missing required email.

1、use
http://xxx.xxx.xxx.xxx/files/applications/test/index.html

real login success. remeber email/password  (or userName/password)
Better way is see Request  how to send POST

2、Use postman

2-1: POST
2-2:http://xxxoooxxxoooxxx/rest/user/session
2-3:X-DreamFactory-Application-Name    value: your app name
2-4:Content-Type    value:application/json
2-5:Body   raw      choese  JSON(application/json)

{"email":"xxxxx00000xxxxxx000xx","password":"xxxxx00000xxxx000xx"}

Better way is copy from Request

2-6: Send  then success is get information.

SSL 憑證

Comodo SSL 單一域名(不含子域名) 76.95美金/年(一次買兩年),平常正 99美金/年
EV SSL  單一域名(不含子域名) **網址列會變成緣色,更清楚辦視 99美金/年
Widcard SSL 單一域名(含子域名)  400美金以上/年

SSL UCC 多域名
Beyond these initial 3 domains, you can add up to 100 FQDN on the same certificate at just $35.00 per additional domain. Wildcard domains can be added to a UCC for a $399.00 surcharge per domain

需注意是,如果是在Inmotionhosting上買的話,因為VPS有IP,所以免費案裝;如果是自己到第三方SSL認證網站買,要自己安裝。

以上價格以下面網址為主,供參考
https://ssl.comodo.com/comodo-ssl-certificate.php?key5sk0=1907&key5sk1=6383797a763319dc06db9ef0e03e4ed9a351f8df



整合許多SSL廠商
http://www.sslbuyer.com/index.php?option=com_content&view=article&id=115&Itemid=166

[轉] 如何使用 Open Graph, Twitter Card 自訂網頁在 Facebook, Google, Twitter… 的顯示內容

http://blog.shihshih.com/social-meta-tag/#more-165




Open Graph Tags

[轉]影像地圖

影像地圖

http://blog.shihshih.com/responsive-image-map/





https://www.image-maps.com/

https://github.com/stowball/jQuery-rwdImageMaps

[轉]Email HTML 撰寫問題

http://www.benchmarkemail.com/tw/help-FAQ/answer/Common-HTML-Email-Coding-Mistakes


常見的HTML電子郵件錯誤語法

一封html email的電子郵件在您的電腦上或許看來完美,但卻在收件人的電腦上卻不是這麼一回事,因為它需要使用到您系統上的圖表、字型和CSS檔案。當您在HTML編輯器以外的地方(例如:Microsoft Publisher、Dreamweaver或FrontPage)建立您的電子郵件時,請記住:您是在設計一封電子郵件,而不是設計網站,如果您把它當成一個網頁來撰寫時,有些內容可能會無法正常顯示在不同的聯絡人郵件伺服器以及網頁電子信箱伺服器上。
  1. 不要引用外部的CSS檔案。 大多數的電子郵件客戶端(Gmail、Yahoo、Mac、AOL Web等等)不會引用這些外部檔案,因為這會干擾它們的CSS編碼。如果您要使用CSS,就要用In-line CSS(標記加註式),並且利用市占率最高的電子郵件客戶端來測試您的郵件,如此您就可以檢查其錯誤或不一致的地方。

    i) 引用外部的CSS檔案會導致無效
    <link href="css1.css" rel="stylesheet" type="text/css">
    ii) 將電子郵件的首頁或正文中放入CSS編碼,也會無效
    <style>
    .main{font-size:16px;}
    .subhead{font-size:14px; font-weight:bold; color:#cc0000;}
    </style>
    <span class="subhead">Newsletter Article</span>

    <strong> Use Inline Stylesheet:</strong>
    <span style="font-size:14px; font-weight:bold; color:#cc0000;">Newsletter Article</span>
  2. 不要使用一張大圖檔佔滿您電子郵件的頁面和空間。大多數的電子郵件程式,會依照系統設定值來攔截檔案過大的圖片,所以您的收件人只會看到一封沒有圖片的空白郵件。
  3. 切勿將郵件的頁面設計的太寬。這主要是協助您設計出符合讀者閱讀視角的電子郵件版面,大約650圖素寬的電子郵件是最適合顯示在收件人電腦螢幕上的。如果您對這部分還是有疑慮,可以自行先設定幾個Yahoo!、Gmail等信箱來測試看看。
  4. 移除您HTML上不必要的編碼。如果您曾經使用Microsoft Front Page、Microsoft Word或Microsoft Publisher來設計電子郵件,請注意:您的範本中將包含所有種類的junk code,那些程式碼會破壞您設計好的電子郵件版面,造成一些問題,更糟糕的是,花指令(sloppy code)會讓您的電子郵件歸到垃圾郵件匣中。請確認在您上傳電子郵件之前,已經清除了不必要的標籤、屬性、意見和其他junk code。以下是一些相關範例:
    <span class="fs12"><v:shape>
    <o:column>
    <b:Xl>
    ![endif]></span>
  5. Flash、JavaScript、ActiveX以及內嵌的影像和聲音檔皆無法在HTML電子郵件中正常運作。雖然這些附件會讓您的郵件更炫目,但防毒軟體卻會將它們阻擋下來,更不用說從您電子郵件中連結影像和聲音檔。
  6. 確認所有的圖片連結都是完整的,包含Web-based的URLs。我們發現客戶經常使用連結硬碟上的圖檔,而非網頁上的。

    相對位址(無法正常開啟的URL)
    <a href="lastpage.htm"> </a>
    這些文字只是網頁的部分連結。

    完整位址(可以正常開啟的URL)
    <a href="http://www.microsoft.com/"> </a>
    這些文字是可以連至全球資訊網(World Wide Web)的連結上。
  7. 至少運用三種電子郵件客戶端(如Yahoo!、Gmail、AOL以及Hotmail)來測試電子報。如此便可檢查電子郵件的版面,檢查錯誤。您應該多利用這些郵件帳號,來測試設計好的電子郵件,檢查版面、圖片、連結、顏色…等元素是否能正常顯示出來。
  8. Avoid Form code as it is likely to get stripped out by the email client.
    iFrames should also be avoided, as they are not supported by many email clients
=====
A Bulletproof Guide to Using HTML5 and CSS3 in Email

https://litmus.com/blog/a-bulletproof-guide-to-using-html5-and-css3-in-email

phpFlickr authentication to access private photos flickr

phpFlickr authentication to access private photos

1:https://github.com/jrtilson/phpflickr/tree/master/token

download index.php & auth.php

or

my demo

2:edit index.php
   2-1 mark:
        //$f->auth($_SESSION['perms']);  //會造成迴圈
        //$token = $f->auth_checkToken($_SESSION['phpFlickr_auth_token']);  //無用

   !!important!! token usually is ok~ and phpFlickr check token is broken.
This can check token   https://www.flickr.com/services/api/explore/flickr.auth.checkToken 

   2-2 change:
 echo "<h2>" . $_SESSION['phpFlickr_auth_token'][_content] . "</h2>";
 //要補上[_content]

3:call back URL set THIS FILE:http://xxxxoooo.com/auth.php
   IF not sure, just index.php when you not login. index.php have Set the callback url to: xxxxxxoooooo

4:How to access private photos
 
    require_once("phpFlickr.php");
 
    $token = ""; //put now get token
    $api_key =""; //put api
    $secret =""; //put secret
 
    $f = new phpFlickr($api_key, $secret);
    $f->setToken($token);

    !!important!! Don't $f.auth() again~ DO NOT DO AGAIN.

    method 1:
      $res = $f->photosets_getList(); //get all Albums
      $PhotosetList = $res['photoset'];
      //print_r($PhotosetList);   //just test

    method 2:
    $Allphoto = $f->photosets_getPhotos('xxxxxxxxxx');  //xxxx -> put Albums ID

    if (is_array($Allphoto)){
      foreach ($Allphoto as $AllphotoList){
        foreach ($AllphotoList['photo'] as $PhotoInfo){
          $imgsrc = $f->buildPhotoURL($PhotoInfo, "small");
         
          echo "<img src='".$imgsrc."'>";
    }
      }
    }
 

IF sails.js + (ng-admin and Angular Schema Form < sails.js-Model.Validations.json ) perfacet !!!

Why is perfacet~~  Because ONLY write one time validations then RESTFUL API can use. Front Angular Form can use.


So maybe sails.js have output Model Validations JSON

or write use jsonschema (A fast and easy to use JSON Schema validator)

JSON Schema

http://json-schema.org/

http://jsonschema.net/#/


https://www.npmjs.com/package/jsonschema

Angular Schema Form

use   JSON Schema + Form definition  (condition)



http://schemaform.io/
https://github.com/Textalk/angular-schema-form

seedjs = sails.js + ember.js + ......

This is same sails + ng-admin but different is ng-admin have gui.


This is good idea for sails.js  RESTFUL.

sails.js & ng-admin

sails.js

https://github.com/marmelab/ng-admin


put together is very good. easy to use CRUD by GUI.



https://github.com/zvesp/sails-generate-ng-admin

ghettoVCB

http://www.mobile01.com/topicdetail.php?f=300&t=4438446


https://github.com/lamw/ghettoVCB





HOPE000

VMDK Thin Provision Type Copy
vmkfstools -i /vmfs/volumes/VMBackup/0.vmdk /vmfs/volumes/datastore1/Test/0.vmdk -d thin &


或是用現成的 ghettoVCB Backup Script ... VM 免停機就能備份
Export OVA / OVF 都太慢啦

[轉]The Best Notebook Displays As Reviewed By Notebookcheck

http://www.notebookcheck.net/The-Best-Notebook-Displays-As-Reviewed-By-Notebookcheck.120541.0.html






Dell Latitude E5550
Samsung SDC4C48
IPS LED
Color Gamut AdobeRGB   84%

notebook Dell Latitude E5550 Samsung SDC4C48 IPS LED 廣色域70以上



http://www.mobile01.com/topicdetail.php?f=159&t=4294631


依據樓主需求 , 非蘋果 , 廣色域70以上 , 外出需求 , 2~4萬 , 德國有個專業網站 , 答案是Dell Latitude E5550 , 15.6吋 , FHD , 採用Samsung SDC4C48 IPS LED




http://www.ebay.com/itm/2015-Dell-Latitude-E5550-Laptop-Notebook-15-6-FHD-1080p-i5-8GB-128GB-SSD-VPRO-/301731192384?hash=item4640949e40

[轉]What is the best way to Shrink a Thin Provisioned Disk?

https://community.spiceworks.com/topic/461716-what-is-the-best-way-to-shrink-a-thin-provisioned-disk



==========
http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc%2FGUID-CBF31A6B-B36F-4552-B512-CC92B1943902.html



Removing Zeroed Blocks


Use the vmkfstools command to convert any thin, zeroedthick, or eagerzeroedthick virtual disk to a thin disk with zeroed blocks removed.-K --punchzero


This option deallocates all zeroed out blocks and leaves only those blocks that were allocated previously and contain valid data. The resulting virtual disk is in thin format.

=======

Poblano

Gabrielle,

I did the sdelete -z and this cleared up the space on one of my drives. Which worked awesome for this particular issue I ended up just added a new drive to the system copied the 5 GB of data over changed the drive letter, rebooted and brought my application back online. Worked great. Thanks for the information.

========
http://www.virten.net/2014/11/howto-shrink-a-thin-provisioned-virtual-disk-vmdk/





nakivo vmware

backup and restore  for free   備份還原免費

backup
1、免費的功能有限
2、有限在,backup只能在local 空間上,但可以在vmware上掛新的HDD
3、記得 NAKIVO 的vm,還是在原本的機器上,所以建議,直接用在nakivo的網站上,下載ova,直接掛而新的地方,這樣就能備份了


recovery
recovery -> recovery vm
netwrok 選一下

重點要注意:


1、選 Create only thin disks on recovered VMs

2、Levave VM name is

[轉]jQuery 之 checkbox 及 radio 設定值的

http://note.tc.edu.tw/175.html








[radio 取值]

以下範例示範當使用者按下 submit ( id=sb1 ) 時的檢查動作,其中 radio 的 name=doway

$("#sb1").click(function(){
var method =$("input[name='doway']:checked").val(); //radio 取值,注意寫法
if( typeof(method) == "undefined"){ // 注意檢查完全沒有選取的寫法,這行是精華
alert( "請選取操作方式!");
return false;
}

用框架時,要注意

StrongLoop 和 Dreamfactory


1、比較複雜的SQL能不能自定議?  
基本上兩者目前都還在開發中,StrongLoop是beta吧


2、能不能在資料CRUD時,Model自訂檢查?
 這樣後端檢查完就送回前端,雖然最好是前端就要檢查,但實際上,前端檢查完畢後,後端還是要再檢查一次,不然駭客之類可以模擬crul方式送資料,繞過前端檢查,所以最後後端還要檢查,那到不如直接在後端檢查完畢後,送回訊息。

當然如果真的要即時性非常重的話,那還是要先在前端檢查了~~~

3、登入、帳號管理、token?
Dreamfactory一直來都非常的清楚,而StrongLoop現在也清楚多了

4、效能、API、Restful使用?
這只能租主機,然後掛上去,試試看,才能知道,到底效能如何

strongloop now is more better for document

底下是strongloop相關操作

Managing users 管理使用者
https://docs.strongloop.com/display/public/LB/Managing+users



Getting started with LoopBack 怎麼使用loopback
https://docs.strongloop.com/display/public/LB/Getting+started+with+LoopBack



Getting started part II  怎麼使用loopback II
https://docs.strongloop.com/display/public/LB/Getting+started+part+II



Validating model data  資料進資料庫前的驗証
https://docs.strongloop.com/display/public/LB/Validating+model+data


Executing native SQL  自訂義SQL,但還在測試中,不能保障正常運行
--This feature has not been fully tested and is not officially supported: the API may change in future releases.

https://docs.strongloop.com/display/public/LB/Executing+native+SQL

node.js 書 推薦 找網路上的

http://www.books.com.tw/products/0010644512

書名:深入淺出Node.js  2014/07/29 必買的
作者: 朴靈


http://www.books.com.tw/products/0010679787
書名:Node.js的九堂實作課  2015/06/24
作者: 趙坤, 寸志, 雷宗民, 吳中驊
譯者:許郁文


http://www.books.com.tw/products/0010671565
書名:Node.js模組參考手冊  2015/04/15
作者:作者: 錢逢祥, 蔡政崇, 楊傑文

自已整理的資料,不知道準不準 vps 虛擬主機

arvixe
http://www.arvixe.com/awards

.Best Web Hosting for Budget Focused Small Businesses in 2015 等,都是2015年

inmotion
https://www.inmotionhosting.com/partners-and-awards
.Best Web Hosting for Budget Focused Small Businesses in 2015 等,都是2015年
.CNET 12年來滿三星推薦
.管理McAfee防毒夥伴


資料來源:
http://www.pcmag.com/article2/0,2817,2424725,00.asp
http://webhosting2go.com/

1、線上直接排bootstrap layout 2、程式排bootstrap layout 3、線上測bootstrap

http://pingendo.com/ 免費
http://mobirise.com/ 免費
http://keynotopia.com/bootstrap/  好像免費
http://www.frontenda.com/snipped/  好像免費


http://www.layoutit.com/build  Beta,只有簡單區塊
http://shoelace.io/ 簡單拉colum

http://www.bootply.com/new#  更圖形化,但註冊無效! 無圖形化,但可測試bootstrap程式碼

http://scripteden.com/builder/bootstrap/ 好像免費


收費:
http://pinegrow.com/  好
http://macaw.co/ 好
https://www.boottheme.com/app/#page  要錢-不能商用
https://app.brix.io/brix/preview.html?p=811#self  只有試用
http://www.bootstrapdesigner.com/ 要註冊,存在遠端

http://demo.bootstraptor.com/blocks.html#  讚
PRO us$44  http://www.mightydeals.com/deal/blocks.html

php pdo [轉]Useful database helper class to generate CRUD statements using PHP and MySQL

http://www.angularcode.com/useful-database-helper-class-to-generate-crud-statements-using-php-and-mysql/

這個看起來更好,滿足我的問題,不用再進crud class中,一個一個改欄位,直接帶什麼改什麼,這樣更快。

Integration blueimp fileupload in ckeditor 實例範例

Integration blueimp fileupload in ckeditor

http://stackoverflow.com/questions/14013418/integration-blueimp-fileupload-in-ckeditor

https://github.com/blueimp/jQuery-File-Upload

------
檔案下載 file download


1、index.php 是 建立ckeditor,主要是多一個function triggerUploadImages(url){
2、在ckeditor目錄下的config.js,補上網頁上的程式碼,要注意html : ' <iframe src=  需要給正確

2.1、index.html 是非常基本的,basic-plus.html是取jquery file uploder的範例來用,上傳完後,點選該圖或文字,就能會回傳

2.2、index.html 和 basic-plus.html兩支程式都有呼叫 parent.triggerUploadImages,把url傳回ckeditor

2.3、注意index.html的data-url="server/php/" 路徑是否正確;basic-plus.html 這段

var url = window.location.hostname === 'blueimp.github.io' ?
                '//jquery-file-upload.appspot.com/' : 'server/php/'

路徑是否正確


基本上較麻煩的是,上傳完畢後,會回傳url,再送到CKEitor裡面。


圖片上傳在server/php/files  ,會自動做縮圖

[轉]HOW TO MAKE UPLOAD IMAGE IN CKEDITOR.



http://www.dukaweb.net/2014/01/how-to-make-upload-image-in-ckeditor.html


In script tag, which we call CKEditor put one more code:

CKEDITOR.replace( 'editor1', {
  filebrowserUploadUrl: "upload/upload.php"
} );


In upload.php

if (file_exists("img/"; . $_FILES["upload"]["name"]))
{
echo $_FILES["upload"]["name"] . " already exists please choose another image.";
}
else
{
move_uploaded_file($_FILES["upload"]["tmp_name"],
"img/" . $_FILES["upload"]["name"]);
echo "Stored in: " . "img/" . $_FILES["upload"]["name"];
}


If you get an error “image source url is missing“, that means the url of the image doesn’t pass to the image info tab, you can fix this error by adding the php code to pass the image url.

In upload.php file

Add the following code in the else function


// Required: anonymous function reference number as explained above.
$funcNum = $_GET['CKEditorFuncNum'] ;
// Optional: instance name (might be used to load a specific configuration file or anything else).
$CKEditor = $_GET['CKEditor'] ;
// Optional: might be used to provide localized messages.
$langCode = $_GET['langCode'] ;

// Check the $_FILES array and save the file. Assign the correct path to a variable ($url).
$url = "img/" . $_FILES["upload"]["name"];
// Usually you will only assign something here if the file could not be uploaded.
$message = '';

echo "<script type='text/javascript'> window.parent.CKEDITOR.tools.callFunction($funcNum, '$url', '$message');</script>";





http://www.paulfp.net/blog/2010/10/how-to-add-and-upload-an-image-using-ckeditor/

----------
http://bittyferrari.blogspot.tw/2015/03/ckeditor-image-upload.html

做法就是用個jquery的ajax檔案upload功能

我是包了這個 jquery-fileupload.min.js

function addImg(v) {

CKEDITOR.instances.content.insertHtml('<img src="' + baseUrl + '/upload/news/' + v + '" />');

}

==========

Integration blueimp fileupload in ckeditor

http://stackoverflow.com/questions/14013418/integration-blueimp-fileupload-in-ckeditor

https://github.com/blueimp/jQuery-File-Upload


jquery file upload 后台收到的文件名中文乱码, filename中文乱码
http://blog.csdn.net/zhouyingge1104/article/details/38322403


CRUD jquery free datatable jtable

以前開發的經驗,用過兩個算是功能最多最好用的

https://datatables.net/    MIT license
在六七年前有回覆過bug,在某間公司開發網頁時,有套用,前台顯示+後台MSSQL Storeprocess,在search按下任何一個字元,直接在後台的DB抓資料出來,速度非常的快,幾萬幾都沒問題。

https://editor.datatables.net/ 要付費,但付一次,無限站台,無限使用者
三、四年前有套過一次,上馬很快,但15天後到期,沒付費,轉找別的…

http://www.jtable.org/ MIT license
三、四年最後用這套,很快就套起來,CRUD全有了

以上很快的意思是,網站的demo含php,基本上,table column設好,就新、修、刪全有了,而且可以設定顯不顯示等等。

這些套件只有一個問題,就是css在修改上需要蠻多時間熟悉,不過有的是套jquery ui,可以用jquery ui產生器,也許會更快套色。


======

Evolutility 1.1.2  AGPL v3http://evoluteur.github.io/evolutility/


jsGrid   MIThttp://js-grid.com/


X-editable  MIT
https://vitalets.github.io/x-editable/


=====
手寫
https://github.com/sitepoint-editors/SCRUD   修改、刪除是在server輸出

php pdo

https://www.codeofaninja.com/2013/05/crud-with-php-jquery.html


while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){
// extract row
// this will make $row['name'] to
// just $name only
  extract($row);

這樣就能直接引用

例: 原本是用$row['id'],現在直接$id

如果有重覆變數,請看
http://pydoing.blogspot.tw/2013/03/PHP-extract.html




[轉]Top 12 Best PHP RESTful Micro Frameworks (Pro/Con)



http://www.gajotres.net/best-available-php-restful-micro-frameworks/




I will recommend these 4 frameworks:

Silex
**Slim
Lumen
Phalcon

node.js

一但重開機,要執行npm,就要執行底下


nvm use stable

應該是自己那沒設好


http://learn.bevry.me/node/install/

git clone git://github.com/creationix/nvm.git ~/.nvm
printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc
NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh



nvm use stable

nvm list





[轉]

直接用github for windows 在gitlab上

https://www.youtube.com/watch?v=fGiQIJczdFc

[轉]不會不專業!只要懂這五題你就是 Pro 級的 JavaScript 工程師

http://buzzorange.com/techorange/2015/08/18/humans-create-softwarehow-do-you-judge-a-javascript-programmer-by-only-5-questions/



Q1:你能解釋出什麼是 apply 函數嗎?

當之後你在建立 Library 時你一定要記得最常使用的 apply 函數




Q2:你能跟我解釋一下什麼是 map 嗎?不仿就再問問有關 reduce 方法。如果你不懂什麼是 map ,這代表著你在功能性撰寫程式程度是零!但千萬別放棄治療,建議你從這快開始你的學習之旅:A dirt simple introduction to higher order functions in JavaScript.

Q3:能解釋什麼是 bind 嗎?
Q4:解釋一下什麼是 closures ?

node js



https://cnodejs.org/topic/55651bf07d4c64752effb4b1




Node.js最新Web技术栈(2015年5月)

-----
https://cnodejs.org/topic/5059ce39fd37ea6b2f07e1a3

阿里云主机Nginx下配置NodeJS、Express和Forever

forever 和 pm2 大家推荐用哪个呢?

-----
https://cnodejs.org/topic/5338c5db7cbade005b023c98



快速搭建 Node.js 开发环境以及加速 npm

-----
https://cnodejs.org/topic/55c2b29b5965fe2c74f4787c


easyui 或者 jgrid + ztree 或者bootstarp


表格和tab貌似都是前端的东西啊,跟 express 这个后端没关系。express 作为后端说白了就是提供 api ,作数据交换,至于数据要怎么展示,通过什么展示那就是另外的框架做的事件了。很很多JS框架可以做相关的事件,推荐 bootstrap 。用 ui.bootstrap 把它跟 angular 整合起来,一般 web 界面不在话下。


angular 属于前端框架,bootstrap 属于界面框架, express 属于后端框架


----

https://cnodejs.org/topic/55c44356b98f51142b367b30


javascript, nodejs, express, mongodb

我觉得还是先打基础把, 不然知其然不知其所以然. javascript, nodejs, express, mongodb 的官方文档或者经典书看一遍, 其间动手练练里面的例子. 然后找个小项目上手, 是水到渠成的事. 欲速不达.


https://github.com/madhums/node-express-mongoose-demo


-----

http://nodejs.tw/t/53689557c7991d0000199e6c






剛好看到....

呵呵...... 是不是遇到什麼挫折了?

我覺得 1-3 點,不跳坑的理由,完全不成立耶...我覺得是這樣:


1.假設你還不會 js,那寫 node.js 可能會有些辛苦,最好要能體會 js 的精神,擺脫 class 的語言,不要再去想介面,方法, 抽象類,包裝,及各種設計方法,忘掉它們,至少寫 js 時,忘掉它們。function 就是物件!!
node.js 是single thread 的,美就美在這裡。它的創造者 Ryan,故意這麼設計的。意思就是,即便很多人建議 multi-thread,他仍堅持 single thread,而後來證明這是對的。因為 Node.js 用的是 event loop 。所以,可以再仔細看看下面的程式:


setTimeout( function(){

console.log('world');

}, 1000); // 告訴 event loop 一秒後執行它, 然後繼續執行下去....是不是有點像太極拳...


console.log('hello');


Node.js 因為使用 js, 完全沒有沉重舊 lib 的負擔,也是 Ryan 選擇 js 的原因,Ryan 打造 Node.js ,是希望找出一個方法,可以擺脫 I/O blocking, 建立各種 net application。在這面這程式裡,就是擺脫的方法,去讀你的檔案吧,我先去做其它的事了,好了你再叫我。


明白了上面幾點後,應該就能進去 Node.js 的世界了。


如果你要用 node.js 寫網站,搞懂 express, 搞懂 express, 其它 mvc 架構框架,像 restify ...等,大同小異,你也會懂了。


你會需要做單元測試, 可以用 mocha


即便會了 js, 你還會陷入 callback hell,就是瘋狂無止盡的巢狀 callback,千萬別那樣寫。搞清楚, async.js 或 q 的 promise 可以幫你。不過,我建議 async.js ,它是最普遍的。

- See more at: http://nodejs.tw/t/53689557c7991d0000199e6c#sthash.icKddbqZ.dpuf

李敖 反課綱學運



※李敖大師終於出手了 :

反課綱學運時,大家都想學歷史的李敖大師為什麼沒開口,今天他終於大開金口,而且是噴的體無完膚:




在過去的幾十年,臺灣學生都是躲在後面,“太陽花學運”時他們突然跑到前面,可他們洩底了:『竟然要求以“一邊一國”的“兩國論”來與大陸談判。』他們完全不知道自己是老幾。




這次“反課綱”的高中生,一下子就讓人看出了他們的軟弱。你看,『他們從一開始的“我來了”,到後來的“我說了”、“我抗爭了”,結果不到10天,8月5日就說“我累了”,準備撤離。而且,他們談判時講理講不贏就下跪,甚至還哭哭啼啼;或者忽然被媽媽叫走,不再參加“反課綱”了。』這說明什麼?他們根本就是一群軟弱的高中生,世界上從來沒有這樣軟弱的“革命家”,“反課綱”根本就是一個笑話。




臺灣目前的高中歷史課綱是有問題,但不是這些學生所認為的那些問題,而是馬英九和臺灣“教育部”不敢正視真正歷史的問題。




大家要明白,陳水扁和前“教育部長”杜正勝把臺灣高中歷史課本一分為二,即分為《中國史》和《臺灣史》;目前這些高中生所鬧的部分只是針對一分為二後的《中國史》,對《臺灣史》又絕不允許馬英九去碰,馬當局也不敢撥亂反正,重新合二為一。




“反課綱”人士糾纏的一個問題,是要求課綱中不可刪除“二二八事件”,因為不可忘了國民黨殺了臺灣人。好,既然如此,那台當局有兩個真正關鍵的問題為什麼不寫?!




第一,日本人總共殺了多少臺灣人?當初一個“霧社事件”,日本人見臺灣人就殺,把整個村莊的人都殺光了,國民黨來台是不敢這麼殺的。關於日本人殺臺灣人,如今在課綱中已刪除,這些“反課綱”的人為何不要求寫這段歷史呢?




第二,400年前,當多數臺灣人的祖先從廣東和福建來台後,殺了多少原住民?這些原住民原來住在平地,被漢人打殺後逃到山裡變成了如今的高山族。《宜蘭縣誌》裡記載,有的高山族逃到山上後,一哭就是一個多月。這些歷史為什麼不要求寫?這些高中生根本不瞭解這些歷史,民進黨則故意隱瞞,國民黨卻不敢據理力爭。




日本福島核洩漏事故發生後,臺灣各界向日本捐款共66億元,這比全世界的其他國家和地區向日本捐款的總和還多。可是,日本當地學校複課後,在校學生中唯一得不到助學金的卻是臺灣學生,可見日本人根本就是把臺灣人當作賤骨頭來看待。

關於慰安婦問題,1990年代日本被揭露後,想給她們每人50萬元私了。日本為什麼要給錢和解?因為他們覺得對不起這些慰安婦呀!但臺灣的慰安婦對日本人說,這個錢不能要。50萬元現金對這些慰安婦其實很重要,可她們說不可以拿,為的是不讓人篡改這段歷史。最終,我李敖站出來,給臺灣慰安婦每人發了50萬。




可如今這些“反課綱”的高中生,竟然同意陳水扁時期課綱中有關“慰安婦是自願的”說法,而反對微調後的“被迫”說法,可見臺灣新一代的年輕人更加混蛋。日本統治過韓國,如今在首爾基本很難看到日本車,可見韓國人對日本人是什麼態度;日本統治臺灣的時間更長,可臺灣人如今卻是如此媚日。

臺灣社會如今沒有任何一個力量敢去譴責這些年輕人,年輕人都被慣壞了,沒事就上街胡鬧。




就說“洪仲丘事件”吧,事情發生了,輿論的整個風向就是全部怪罪臺灣軍方,批評軍方虐待士兵。可沒有人去問,按理軍中訓練是高強度的,為何洪仲丘還能長胖30多公斤?說明是在養尊處優嘛。結果,整個事件就按“刑法”論處,臺灣的“軍法”形同被取消,軍隊自然也就完蛋了。




現在這些“反課綱”的學生,不認真做學問,對歷史也完全不瞭解,輿論竟然也不敢批評,結果他們就胡鬧了,這當然也是國民黨文化教育的失敗。




“文化台獨”根本是假的,是不成立的,根本就是胡鬧。這些所謂“搞台獨”的人,敢改“中華民國國號”嗎?敢改“中華民國國歌”嗎?當然不敢!他們對於威脅和嚇唬似乎並不怕,但要是拳頭打到臉上,他們就真怕了。這就是說“台獨”的基礎根本不牢靠,因為海島上的臺灣人,性格上是很現實的。




前有李登輝說“釣魚島是日本的”,後有高中生說“慰安婦是自願的”,這根本就是一脈相承,一丘之貉。當然,釣魚島問題的爭端,有其歷史原因,但不管怎樣,當初美國只是把治權交給日本,主權並不屬於日本。

自架 vmware esxi 6

原價屋

Intel XEON E-1231 v3 (1150腳位/Haswell Refresh)   x1     7,770
超微 Super micro  X10SLL-F-O   x1   5,699
金士頓 Kingstom HyperX FURY 120G (SHFS37A/120G)  x1   1,630
金士頓 Kingstom 8G DDR3-1600 ECC (KVR16E11/8)  x2   4,780

總共  19,879

用非常一般的機殼,cpu溫度非常低,可能沒跑什麼系統吧。目前主力跑 couchbase server。

sudo -i | sudo -

有時候sudo - 會不能用,要補上i

sudo -i 基本上都能過

在root被關掉情況下,又要有root的操作

[轉]How do i restart nginx only after the config test

nginx -t


after the test ran successful, I can restart the service/etc/init.d/nginx restart


or only reload the nignx site configs without a restartnginx -s reload

[轉]LINUX VPS VESTACP



http://zhaozhao.info/archives/150416













Apache模版有default、basedir、hosting、phpcgi、phpfcgid和wsgi。default模版没有额外的设置,适合自用的朋友。basedir模版直译是反对使用openbasedir指令的PHP脚本,我理解是防止PHP脚本试图绕过openbasedir指令限制。hosting模版适用于虚拟主机,各个网站会相对独立,可能更适合要外包的同学。phpcgi模版则是使用CGI方式运行PHP,个人认为没什么意思。phpfcgid模版则使用FastCGI方式运行PHP。wsgi模版则是为了运行python脚本。







Nginx模版有default、hosting、сaching和force-https。default模版提供静态服务。hosting模版禁用了symlink,适用于虚拟主机,更安全。сaching模版适用于追求高性能的朋友,Nginx将发挥其强大的缓存功能,而Apache和php真正成了后台。force-https模版则是访问HTTP会跳转到HTTPS。







DNS模版有default、gmail、child-ns。gmail模版适用于使用Google App邮件托管。child-ns模版比default模版多了ns1和ns2的A记录,大家差不多就明白是什么意思了吧。

模版在/usr/local/vesta/data/templates/目录下,可以很方便地自定义模版,可以先参考官方怎么写的。个人自用我推荐default+default,虚拟主机外包我推荐hosting+hosting或者phpfcgid+hosting。







另外一点,就是软件包中有一项SSH访问,其中有sh、bash、nologin、tcsh、csh与rssh。nologin就是禁止SSH访问,sh、bash、tcsh与csh都是shell,具体区别就不谈了。rssh特别重要,rssh是指restricted secure shell,受限制的Shell,只能使用sftp与scp(一个基于SFTP的文件拷贝命令)。FTP其实是一种很不安全的传输协议,全明文,连密码也是明文。SFTP则是一个很棒的东西。因此使用VestaCP开虚拟主机推荐使用rssh,当然直接给用户bash就更好了。







所以之后我习惯在新主机安装好基本环境后,先丢 PHP 探针到主机上做一下浮点运算能力检测,检测出的数值要在0.8以下才会快速的开启网页(之前在 Linode 测出来的是2点多,在白天时还会更慢,你说扯不扯!?)。






如果你很在乎网站的效能的话,那么应该知道要利用 cache 的方式让网站提升速度,而在 Vesta 里很容易的就可以设定好 Varnish cache(https://www.varnish-cache.org/),只要进入 WEB 里,在 Nginx Template 的下拉选单指定 caching 就完成了。







网站的安全防护也是很重要的部份,如果是租一般的分享空间的话,基本上主机商都已经做好防火墙之类的设定了。但我租的是 VPS,所以向主机商租到的只有硬件、传输量、DNS 跟支持服务而已,需要防卫的话就要自己处理,建议可以安装 CSF 防火墙来保护主机的安全


用 SSH 与主机联机安装 CSF:




wget http://www.configserver.com/free/csf.tgz




tar xzvf csf.tgz


安装


ufw disable


进到 CSF 文件夹


cd csf


执行安装脚本


sh install.sh


安装完成后再测试一下 iptables 模块看有没有问题


perl /usr/local/csf/bin/csftest.pl


接着编辑需要要开放的 Port


nano /etc/csf/csf.conf


因为 Vesta 的后台是走 Port 8083,所以也要开启这个阜号才能进入后台


# Allow incoming TCP ports




TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,8083"


# Allow outgoing TCP ports




TCP_OUT = "20,21,22,25,53,80,110,113,443,8083"


若是还需要其它的设定,可以参考这篇教学:https://www.digitalocean.com/community/articles/how-to-install-and-configure-config-server-firewall-csf-on-ubuntu




http://configserver.com/cp/csf.html







硬碟耐用

http://technews.tw/2015/07/30/hard-drive-reliability-stats-for-q2-2015/







最好的是 HGST

預付卡

台星 是 黑心油,大家都不支持,只好用中華如意卡


http://www.mobile01.com/topicdetail.php?f=18&t=4222189&p=1







中華預付卡:撥打508申請網路吃到飽499元

補充:

撥打508後~

選語言1.印尼2.菲律賓3.越南4.泰國~

按1~申請30天無限上網499 確定申請按1~收到簡訊後~重新開機

按3~申請計量型~(100mb再按1) (1GB按2) (2GB按3) ~確定申請按1~收到簡訊後~重新開機

按4~申請計日型~(1日按1) (3日按2) (5日按3) (7日按4) (10日按5) 確定申請按1~收到簡訊後~重新開機

按5~申請30日語音優惠450元~確定申請按1~收到簡訊後~重新開機

按6~服務說明~(1)30天無限上網(2)計量型(3)計日型(4)30日語音優惠

按7~查詢已申請的服務(到期日 查詢用量 剩餘金額)

按9~轉接客服

按0~重聽

[轉]管理的能與不能

http://www.projectup.net/blog/index.php?option=com_content&view=article&id=8480:2012-03-13-08-52-54&catid=8:pmp-pm&Itemid=18

[轉] Reddit 起義:美版 PTT 開除一名「高級」員工,慘遭上百位版主關站抗議

http://buzzorange.com/techorange/2015/07/06/reddit/

單月不重複造訪者達 1.7 億的份上

因此在去年 9 月時,我們都知道 Reddit 才又融資估值上看 5 億。



現階段我們對於 Reddit 的溢美之詞,不管是他們的流量、AMA 活動的成功,甚至是言論自由、成為「網路的首頁」等等,都直指他們網站中內容的展演與呈現的方式,但這些卻都不是 Reddit 管理階層能夠控制的。

[轉]一帶一路和希臘 美元 黃金 脫勾

http://www.caizischool.com/blog/33408/%E4%B8%80%E5%B8%B6%E4%B8%80%E8%B7%AF%E5%92%8C%E5%B8%8C%E8%87%98.html

[轉]Couchbase Lite stops syncing when an app resumes from background

http://stackoverflow.com/questions/20822285/couchbase-lite-stops-syncing-when-an-app-resumes-from-background



answered Dec 30 '13 at 12:55

MonkeyBonkey


Looks like if I set the replication to "persistent" it resumes on app backgrounding

e.g._pull.persistent = YES;

couchbase todolist get database sync part

https://github.com/couchbaselabs/ToDoLite-Android


 Write ToDoLite database sync  guy  is very good.

OK, take out.

android studio:new project   then


  • Copy todolist four java :

             Application.java、BaseActivity.java、Preferences.java、Synchronize.java


  • Edit  java : MainActivityjava、AndroidManifes.xml 

           1、app/src/main/AndroidManifest.xml
            <application 
     add        android:name="com.sandk.groupaccountbook.Application"


           2、app/src/main/java/com/sandk/groupaccountbook/MainActivity.java
  change     public class MainActivity extends ActionBarActivity  => 
                  public class MainActivity extends BaseActivity {


If have new activity, just change extends to BaseActivity, then can use application.getDatabase().

four java : any use facebook just // or delete

now database = application.getDatabase()  is ok~~

==========
主要是新增四支java和二個設定

從todolist copy 四支為:
Application.java、BaseActivity.java、Preferences.java、Synchronize.java 

變更設定為:MainActivityjava、AndroidManifes.xml 

差別閱github版本差異 官方寫的非常漂亮,可以切開來

  • app/src/main/AndroidManifest.xml
            <application 
     add        android:name="com.sandk.groupaccountbook.Application"


  • app/src/main/java/com/sandk/groupaccountbook/MainActivity.java
  change     public class MainActivity extends ActionBarActivity  => 
                  public class MainActivity extends BaseActivity {

別忘記最重要的, MainActivity extends 要改成 BaseActivity
將來有新的Activity extends BaseActivity 就行用了!


把四支新增 java,裡面有facebook 部份註解掉,基本上就能使用了


寫程式就可以用 database = application.getDatabase()


android & couchbase app -- ok, now can share little

1. activity_main.xml   =>   tools:context=".MainActivity"  => MainActivity.java


.......I try first... is more better  then post.

=========
=========
===== suggestion newbie =====
https://github.com/couchbaselabs/CouchbaseLite-DevDay-StarterKit
https://github.com/couchbaselabs/GrocerySync-Android
https://github.com/couchbaselabs/ToDoLite-Android        (Hard Understand) SO see this first:
http://sueboy.blogspot.com/2015/06/couchbase-todolist-get-database-sync.html
=========

MainActivity.java

  BuildConfig -- 來自 build.gradle ( Module.app ) 目錄app -- build.gradle

  extends ActionBarActivity -- http://blog.tonycube.com/2014/02/android-actionbarcompat-1.html

  Intent -- http://www.imyukin.com/?p=183
         -- http://kezeodsnx.pixnet.net/blog/post/27072894-android-----%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F%E8%87%AA%E6%88%91%E4%BB%8B%E7%B4%B9%E4%B9%8Bintent-resolution

  startService -- http://blog.maxkit.com.tw/2014/01/android-serviceintentservice.html
               -- http://blog.kenyang.net/2012/11/android-startservice-vs-bindservice.html
               -- http://blog.csdn.net/biezhihua/article/details/44439897
    context.bindService() <==> context.startService()
    context.startService() ==> Service <==> IntentService

  AsyncTask -- http://a-can.logdown.com/blog/201623/android-asynctask-asynchronous-functions-are-carefully

  Observer -- http://www.apkbus.com/android-112815-1-1.html

  runOnUiThread -- http://lak4cyut.blogspot.com/2011/03/android-tip-activityrunonuithread.html
                -- http://blog.csdn.net/zhang_yanye/article/details/40794629

  getApplication Application.java -- http://www.cnblogs.com/duanxz/p/4379800.html

  Replication 同步local到remote -- http://developer.couchbase.com/mobile/develop/references/couchbase-lite/couchbase-lite/replication/index.html

  application.getOnSyncProgressChangeObservable() --
    onSyncProgressChangeObservable --
      addObserver -- http://www.apkbus.com/android-112815-1-1.html

  application.getOnSyncUnauthorizedObservable().addObserver(new Observer()

  application.startReplicationSyncWithCustomCookie 開始同步到remote

  DrawerLayout -- http://ikevin.tw/?p=277


===== command see database =====
http://xxxx.xxxx.com:4985/_admin
http://xxxx.xxxx.com:4985/groupaccountingbooks/_session
http://xxxx.xxxx.com:4985/groupaccountingbooks/_user/
http://xxxx.xxxx.com:4985/groupaccountingbooks/_persona
http://xxxx.xxxx.com:4985/groupaccountingbooks/_changes
http://xxxx.xxxx.com:4985/groupaccountingbooks/_all_docs

open Sync Gateway GUEST account
http://xxxx.xxxx.com:4985/default/_user/GUEST --data  '{"disabled":false, "admin_channels":["public"]}

add sync_gateway user (basic auth : user must exist on Sync Gateway.)
https://forums.couchbase.com/t/couchbase-lite-and-couchbase-sync-gate-way-authentication-failed/3993
https://forums.couchbase.com/t/user-authentication-document-best-practices/3086
http://sueboy.blogspot.com/2015/06/couchbase-basic-auth-basicauth.html
==========

===== couchbase todolist =====

getDeviceToken  ==> AsyncTask ==> doInBackground ==> GoogleCloudMessaging gcm

Synchronize.java <== Application.java <== Many use


===== android adapter view listen best way =====
http://androidadapternotifiydatasetchanged.blogspot.com/2013/02/android-notifydatasetchanged.html
http://stackoverflow.com/questions/4198425/updating-the-list-view-when-the-adapter-data-changes
https://developer.android.com/training/material/lists-cards.html

===== RecyclerView  =====
http://blog.csdn.net/guxiao1201/article/details/40423361
http://hmkcode.com/android-simple-recyclerview-widget-example/
http://blog.csdn.net/li396858359/article/details/40270921
http://www.eoeandroid.com/thread-535701-1-1.html
https://blog.nraboy.com/2015/04/create-a-couchbase-lite-todo-list-with-native-android/


===== RecyclerView onClick =====
http://stackoverflow.com/questions/24885223/why-doesnt-recyclerview-have-onitemclicklistener-and-how-recyclerview-is-dif
http://sueboy.blogspot.com/2015/06/recyclerview-onclick.html


===== Write your own Android Sync Adapter =====
http://blog.udinic.com/2013/07/24/write-your-own-android-sync-adapter/


==== Easy start new activity on button click =====
http://stackoverflow.com/questions/4186021/how-to-start-new-activity-on-button-click


===== How to add Secure Sync to your mobile apps =====
https://github.com/couchbaselabs/sg-live-demo


=====  save document =====
Map<String, Object> properties = new HashMap<String, Object>();
properties.put["type", "List"];
properties.put["title", title];
properties.put["created_at", currentTimeString];
properties.put["owner", "profile:"+ userId];
properties.put["members",, new ArrayList<String>()];

//save to database
Document document = database.cretaeDocument();
document.putProperties(properties);


===== read document =====
Document document = database.getDocumnet(mDocId);
String title = document.getProperty("title");

Map<String, Objectt> properties = doc.getProperties();
String owner = (String) properties.get("owner");


===== Push Pull =====
Push => Server or couchbase SyncGateway
Pull <= Server or couchbase SyncGateway


===== cookie auth =====
app calls my server which POST to SyncGateway's _session
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/mobile-couchbase/83srQTNmXj0/sPOW61ZWNtkJ



couchbase basic auth basicAuth startReplicationSyncWithBasicAuth --- How To Do

突然想到,他的basic auth,其實不是用來給系統用的,是給app用的
也就是app每一支都是用同樣的basicAuth id/pwd登入,區分 管理者和一般使用者

而一般使用者註冊後,帳密是另外開一個doucment,之後所有的文件管理是自己要控制的
跟mysql的一樣,不會給每個人有basic auth,權限管理,也是在sql下的時候,抓出資料做判斷

所以才會在 add user時,用restful curd,使用者代表不同的專案

==========
This is my think:

couchbase basic auth is not for every body login. It is app connect to sync_gateway for auth. Example is have normal user and Admin user. Maybe login sync_gateway, that get different document、channel、sync.

Normal user registered. The register data put in document, Maybe document name is "members" then system programmer need to control document show or not by permit. Like sql not everybody register, then get login mysql account. Only one account connect. After login, everythings is by program control.

So add user is use restful curd to sync_gateway. Like different project <= user.


 (basic auth : user must exist on Sync Gateway.)
https://forums.couchbase.com/t/couchbase-lite-and-couchbase-sync-gate-way-authentication-failed/3993
https://forums.couchbase.com/t/user-authentication-document-best-practices/3086

==========

curl -vX     POST
-H     'Content-Type: application/json'
-d     '{"name": "guest",   "password": "xxxooo"}'
http://xxx.xxx.com:4985/db_name xxx ooo/_user/

use method POST
db_name xxx ooo is your db name



==========
when user login use basic auth website  (If sync_gateway guest disable)

http://sandk.mkinweb.com:4984/groupaccountingbooks/    This is login, you need to login by aa : aaa
http://sandk.mkinweb.com:4984/groupaccountingbooks/_session   If login ok, you can see this have

{"authentication_handlers":["default","cookie"],"ok":true,"userCtx":{"channels":{"!":1},"name":"aa"}}


==========
See best new couchbase android todolite
ok~ see java    ui.login/LoginActivity

mBasicAuthButton = (Button)findViewById(R.id.basicAuthLoginButton);
then see layout : activity_login.xml   ok,find this:
android:id="@+id/basicAuthLoginButton"  

then you see 
android:visibility="invisible" />  just remove  "invisible".  When you login,  now you can see button.

But click no anythings.  Ok~ go back  ui.login/LoginActivity  find this:
private void promptUserForBasicAuthAndStartSync() {

see commit, now you can understand.  add user / pwd

curl -X POST http://localhost:4985/${db}/_user/ -d '{"name":"foo", "password":"bar"}'


For Session

key point:  create one session
curl -X POST -H "Content-type: application/json" -d '{"name": "your-user-id"}' localhost:4985/todolite/_session

then sync_getway renturn session_id

{"session_id":"03bdd7f1be83f035a7298924f9a28270feac7f4c","expires":"2015-03-17T21:39:16.076186179Z","cookie_name":"SyncGatewaySession"}

then chang session_id to 
private void loginWithCustomCookieAndStartSync() {



==========
sync_gate have username, password , this username, password for couchbae server, new bucket setting username, password

{
  "log": ["CRUD", "REST+", "Access"],
  "interface":":4984",
  "adminInterface":"192.168.0.00:4985",
  "databases": {
     "groupaccountingbooks": {
       "username": "xxxxoooo",
       "password": "xxxxoooo",

       "server": "http://192.168.0.00:8091/",
       "users": {
          "GUEST": {"disabled": true, "admin_channels": ["*"] }
        },
        "sync": function(doc, oldDoc) { channel("all_docs"); }
      }
    }
}


graphical http client restful

https://code.google.com/p/im-only-resting/
http://www.swensensoftware.com/im-only-resting


https://github.com/wiztools/rest-client


RecyclerView onclick

RecyclerView step 3

step1
public class xxxxxxxx extends RecyclerView.Adapter<MyAdapter.ViewHolder> implements View.OnClickListener {



step2

public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position
viewHolder.textView.setOnClickListener(this);

textView is findViewById(R.id.xxxxxxxxx)


step3


@Override
public void onClick(View view) {
  int viewId = view.getId();
   if (viewId == R.id.xxxxxxxxx) {  //which item click
      if (onItemClickListener != null) {
         onItemClickListener.onItemClick(view, (Integer) view.getTag());
      }
  }
}



view.getTag() maybe null

about RecyclerView error: android.widget.LinearLayout cannot be cast to android.widget.TextView

https://developer.android.com/training/material/lists-cards.html


I think many people, try to do this demo. But this demo is not good, because some things no show.
like:

RecyclerView .xml to a layout:.......only little, but ok, this not import.
MyAdapter .xml no layout: this is bad. Get error in here.

so, follow this do is better
http://stackoverflow.com/questions/28407768/android-widget-linearlayout-cannot-be-cast-to-android-widget-textview-in-recycle

Gorcyn  is good guy~~ ^ ^

But what different with android demo (fxxxxxxxxxxxxxx)

android:
  • public ViewHolder(TextView v) {
  • mTextView = v;

good guy:
  • public ViewHolder(View v) {
  • mTextView = v.findViewById(R.id.textView));

so Now I think you understand what happen, if you lean java.

Why android developer not put full demo, than everybody get right demo. I search this issue, wast 3 hours. And on internet many people get this problem. Really miss Delphi~~

write java let me feel back ten years ago. that time write can use jbuilder 2. But now ...........

powerbuilder is good for demo, too.


[轉]Google 出手尝试解决 Android WebView 的碎片化

https://typeblog.net/tech/2015/04/06/google-released-seperate-webview.html




Google Play Store 上发现了一个新的App: Android System WebView
用來更新 WebView

但只限官方的rom,因為

指向到 com.android.webview 和  com.google.android.webview
後者才有用

所以作者用  Xposed 處理

[轉]Etsy 用 SSD 的故事 ssd 使用情況



https://blog.gslin.org/







Intel 的評價很不錯:


Okay, bad start, we’ve actually had no issues with Intel. This seems to be common across other companies we’ve spoken to.




Samsung 的評價不錯,C/P 值很高,而且有 S.M.A.R.T.:

Samsung saved the day and picked up from OCZ with a ludicrously cheap 960GB offering, the 840 EVO. A consumer drive, so very limited warranty, but for the price (~$400-500) you got great IOPS and they were reliable. They had better SMART info, and seemed to play nicely with our hardware.

sometime have couchbase.lite error, how to do



change build.gradle


  • use old couchbase.lite  then ok


compile 'com.couchbase.lite:couchbase-lite-android:1.1.0-516'

use 
1.3.0
1.4.0 
but get error, some method go away~

[轉]Android app has error: Execution failed task':app:preDexDebug' trying to test parse but can't run app with this error

https://teamtreehouse.com/forum/android-app-has-error-execution-failed-taskapppredexdebug-trying-to-test-parse-but-cant-run-app-with-this-error

http://stackoverflow.com/questions/25529155/android-studio-gradle-error-predexdebug



Try this : File ----> Invalidate caches/restart



couchbase sync gateway Edit data save

http://xxx.xxx.xxx.xx:4985/admin/

click   Documents

click left documents, then show data on top.  then can see two button

"Save Doc"   "Revert DOC"

Now you can change data in  { ................. }

Changed finish, click  "Save Doc",   now document be change.


I think sync to app right now.




[轉]Svetlin Stanchev: Couchbase Lite, Sync Gateway and Server 1-2

https://www.youtube.com/watch?v=hzeeENTRjlc

https://www.youtube.com/watch?v=3Zl7bJXqYJU
6:10 start demo



======
..........don't show import.

[轉]網路科技是救星!地段超差餐廳如何用訂餐 O2O 年賺 3000 萬台幣?



http://buzzorange.com/techorange/2015/06/03/restaurant-o2o/








100 單雖然不多,但這是顧客意識的轉變,我覺得肯定是互聯網在改變了人的思維。從一開始你要他網上訂,他不肯訂,到現在天天通過網絡訂,到現在都有了預定的意識。其實是顧客、商戶、平台這些年都在共同進步。


現在,我開始加收 1 塊錢外送費,客戶也願意買這個單,單量不但沒有下降,還上升了。我覺得,把事情做到極致了,就可以坐地收錢了。

Velocity.js Accelerated JavaScript animation. jQuery's $.animate()

http://julian.com/research/velocity/

http://julian.com/research/velocity/demo.html

http://zencode.in/19.CSS-vs-JS%E5%8A%A8%E7%94%BB%EF%BC%9A%E8%B0%81%E6%9B%B4%E5%BF%AB%EF%BC%9F.html

http://www.devoxx.com/display/DV12/Faster+Websites++Crash+Course+on+Frontend+Performance


圖片 自動嶞尺寸放大縮小 picturefill responsiveimages

http://scottjehl.github.io/picturefill/

http://responsiveimages.org/


PayPal 教學 -- 有點舊,不過能參考



http://calos-tw.blogspot.com/2012/09/paypal.html
























[來源]:http://fxc86.blog.hexun.com.tw/44899711_d.html
PayPal 快速、安全而又方便,是跨國交易的首選在線付款方式。現在PayPal可以和國內大部分信用卡關聯,可以實現國人的跨國交易收支。
申請PayPal註冊網址:https://www.paypal.com/
paypal接口與其它接口有些不同,稍微復雜一點。 其實銀行接口也算是一個站點的插件。
所謂paypal ipn(Instant Payment Notification),就是Paypal開發的一種能主動通知第三方賣家系統交易狀態的一種機制。IPN的原理很簡單,就是當產生了一個交易之後, 交易狀態發生變化時,如用戶已經付款、或者退款、撤銷時,Paypal利用常用的HTTP POST方式,將交易的一些變量提交給網站的某個頁面(稱之為IPN Handler),當這個頁面接受到請求時候,將這些數據原封不動加上一個指示驗證的cmd=_notify-validate,POST回Paypal 的接口地址,如果數據正確,那麽Paypal返回字符串VERIFIED,否則為INVALID,如果結果為VERIFIED,那麽你的程序就可以使用這 些數據進行操作。
開設Sandbox帳號
但代碼的調試是一件很痛苦的事情,因為作為第三方開發人員,不可能開兩個帳號,每次測試還要 之間交易一些錢,所以Paypal專門開發了Sandbox給開發人員進行開發,首先到https://developer.paypal.com/ 註冊一個開發帳號,好了之後再進入Sandbox建立測試用的Paypal虛擬帳號(至少應該建立一個Business的和一個Personal的),這 種賬號註冊方法和Paypal的流程一樣,信息可以是假的,包括銀行帳號、信用卡(其實Paypal Sandbox會自動生成一些隨機的號碼)。接下來需要激活Paypal Sandbox的虛擬帳號,註意,這裏不管你在Paypal Sanbox註冊時填什麽郵件地址,有任何發送到虛擬帳號所填郵箱的郵件都存會在開發帳號的管理界面中的Email頁(導航欄上有)中。登錄 Sandbox的虛擬Paypal環境,還需要驗證虛擬帳號的銀行,這裏可以隨便填,然後通過Add Funds來給賬戶充值(想填多少填多少 920-203 920-533 )。然後,還需要激活IPN的選項,在Business的那個賬戶的Profile設置頁面中,點擊,然後點擊Edit按鈕,打開IPN,這裏如果你使用的是固定的IPN Handle,可以直接將地址填入。
接下來,我們測試的時候,應該將Paypal接口的地址設置為 https://www.sandbox.paypal.com/cgi-bin/webscr
基本的流程
當客戶向您付款時,PayPal將向位於指定 URL (type=”hidden” name=”notify_url” value=” “)的服務器發送一個通知。此通知中將包括您的客戶的所有付款信息(例如,客戶名稱、金額),以及一段加密代碼。當服務器收到通知時,它隨後會將該信息 (包括加密代碼)發送回安全的PayPal URL。PayPal將通過檢查加密字符串對交易進行身份驗證。這種將 IPN 數據傳回PayPal的操作防止了“欺騙”,因此您可以確保 IPN 來自PayPal。在進行驗證時,PayPal會將其合法性的確認信息發送回您的服務器。
提示:要啟用即時付款通知,您將需要輸入一個 URL,通過它您可以接收到來自您的用戶信息的通知。
啟用了即時付款通知後,每次當您接收付款時您的服務器都會收到一個通知,此通知將以隱藏的“FORM POST”的方式發送到指定的 URL,並將包括所有付款信息。此頁面的底部列出了通知的 FORM 變量。
每次收到來自PayPal的 IPN 時,您必須在實施訂單之前完成如下所述的通知確認過程。確認列出的信息將可確保交易合法。
通知確認IPN
為了確保付款已進入您的PayPal賬戶,您必須驗證用作“receiver_email”的電子郵件地址是否已在您的PayPal賬戶中註冊並得到確認。
服務器收到即時付款通知後,您將需要通過構建一個發送到PayPal的 HTTP POST 對其進行確認。您的 POST 應發送到 https://www.paypal.com/cgi-bin/webscr
您必須完全按照收到表單變量時的原樣發送所有收到的表單變量。您還需要將一個值為“_notify-validate”的名為“cmd”變量(例如,cmd=_notify-validate)附加到 POST 字符串。
PayPal將回復該 POST,並在回復的正文中包含一個單詞“VERIFIED”或“INVALID”。當您收到 VERIFIED 回復時,您需要在實施訂單之前執行若幹檢查:
確認“payment_status”為“Completed”,因為系統也會為其他結果(如“Pending”或“Failed”)發送 IPN。
檢查“txn_id”是否未重復,以防止欺詐者重復使用舊的已完成的交易。
驗證“receiver_email”是已在您的PayPal賬戶中註冊的電子郵件地址,以防止將付款發送到欺詐者的賬戶 。
檢查其他交易詳情(如物品號和價格),以確認價格未改變完成了以上檢查後,您可以使用 IPN 數據更新您的數據庫,並處理購物。

如果收到“無效”通知,則應將其視為可疑通知,並應對其進行調查。
主要參數:
向PayPal提交粘貼代碼時,應包括以下 4 個隱藏變量及一張圖片,這就是說,您粘貼到PayPal的最短必需代碼應如下:




1
2
3
4
5
6
7
8

ion="https://www.paypal.com/row/cgi-bin/webscr" method="post">
// "_xclick" 立即購買
//PayPal賬戶上的電子郵件地址
//物品名稱(或購物車名稱)
de" value="USD"> //定義幣種以標示貨幣變量 值可以為 "USD"、"EUR"、"GBP"、"CAD"、"JPY"。
//物品的價格(購物車中所有物品的總價格,因為是_Xclick模式)




可用變量
business 您的PayPal賬戶上的電子郵件地址
quantity 物品數量。大於 1 時,會與金額相乘
item_name 物品名稱(或購物車名稱)。必須是字母數字字符,最多為 127 個字符
item_number 用於跟蹤付款的可選傳遞變量。必須是字母數字字符,最多為 127 個字符
amount 物品的價格(購物車中所有物品的總價格)
shipping 該物品的運送成本
shipping2 每增加一件物品所需的運送成本
handling 手續費
tax 基於交易的稅額。如果使用該變量,傳遞值將覆蓋所有用戶信息稅收設置(不管買家所在位置)。
no_shipping 送貨地址。如果設為 "1",則不會要求您的客戶提供送貨地址。該變量為可選項;如果省略或設為 "0",將提示您的客戶輸入送貨地址
cn 可選標簽,會在提示欄上顯示(最多 40 個字符)
no_note 為付款加入提示。如果設為 "1",則不會提示您的客戶輸入提示。該變量為可選項;如果省略或設為 "0",將提示您的客戶輸入提示。
on0 第一選項欄名稱。最多 64 個字符
os0 第一組選項值。最多 200 個字符。"on0" 必須定義,以便識別 "os0"。
on1 第二選項欄名稱。最多 64 個字符
os1 第二組選項值。最多 200 個字符。"on1" 必須定義,以便識別 "os1"。
custom 決不會向您的客戶顯示的可選轉遞變量。可用於跟蹤存貨
invoice 決不會向您的客戶顯示的可選轉遞變量。可用於跟蹤賬單號
notify_url 僅與 IPN 一起使用。發送 IPN Form Post 的互聯網 URL
return 您的客戶完成付款後將返回的互聯網 URL
cancel_return 您的客戶取消付款後將返回的互聯網 URL
image_url 您要用作圖標的圖片的互聯網 URL,圖片大小為 150 X 50 像素
cs 設置您的付款頁面的背景色。如果設為 "1",背景色將為黑色。該變量為可選項;如果省略或設為 "0",背景色將為白色
擴展變量
PayPal 允許您粘貼擴展變量,條件是將改變以下 "cmd" 值:
到:
通過上述 “cmd” 值修改,您還可使用以下變量:
擴展變量
email 客戶的電子郵件地址
first_name 客戶的名。必須是字母數字字符,最多為 32 個字符
last_name 客戶的姓。必須是字母數字字符,最多為 64 個字符
address1 客戶地址所在國家或地區。必須是字母數字字符,最多為 100 個字符
address2 客戶地址第二行。必須是字母數字字符,最多為 100 個字符
city 客戶地址所在城市。必須是字母數字字符,最多為 100 個字符
state 客戶地址所在州。必須是正式的 2 個字母縮寫
zip 客戶地址的郵政編碼
night_phone_a 客戶夜間聯系電話號碼的區號
night_phone_b 客戶夜間聯系電話號碼前三位
day_phone_a 客戶白天聯系電話號碼的區號
day_phone_b 客戶白天聯系電話號碼前三位
提示:若要更改”用戶信息”中的默認運費和手續費設置,請轉至您的用戶信息,編輯您的運費計算,然後點擊”允許采用基於交易的運費”復選框。
將單個物品傳遞給PayPal
如果您的第三方購物車可設置成向PayPal傳遞單個物品,有關物品的信息將加入買家和賣家 的記錄日誌和系統通知中。要加入該物品的信息,您需要將 HTML 格式元素粘貼至PayPal購物車流程的新版本。該過程與 #1 節"將總購物車數量傳遞給PayPal"描述的非常相似,不同之處在於:
將 "cmd" 變量設置到 "_cart"
更換必要的 HTML 行與
添加稱為 “upload” 的新變量
在 <表格> 和 標簽之間新增以下行:
定義物品明細
對於以下各特定物品參數,定義與通過您的合作商購物車購買的各物品對應的一組新值。將 “_x” 附加到變量名稱,其中 x 是物品號碼,從 1 開始,每加入一物品增加一。
item_name_x (物品 #x 需要)購物車中物品 #x 的名稱。必須是字母數字字符,最多為 127 個字符
item_number_x 與購物車中物品 #x 關聯的可選傳遞變量。必須是字母數字字符,最多為 127 個字符
amount_x (物品 #x 需要)物品 #x 的價格
shipping_x 運送物品 #x 的第一件(數量 1)的成本
shipping2_x 每增加一件運送物品 #x(數量 2 或更多)所需的運送成本
handling_x 物品 #x 的處理成本
on0_x 物品 #x 的第一選項欄名稱。最多 64 個字符
os0_x 物品 #x 的第一組選項值。最多 200 個字符。”on0_x” 必須定義,以便識別 “os0_x”。
on1_x 物品 #x 的第二選項欄名稱。最多 64 個字符
os1_x 物品 #x 的第二組選項值。最多 200 個字符。”on1_x” 必須定義,以便識別 “os1_x”。
為購物車中每件物品重復此設定
為您的買家購物車中的各物品加入以上表格中的一組必需的變量和任何選項變量。購物車中的第一 物品必須用以 “_1″ 結束的參數定義,如 “item_name_1″、”amount_1″ 等。同樣,第二物品應用變量 “item_name_2″、”amount_2″ 等命名。提示:”_x” 值必須以一為單位按序遞增,以便識別。如果從 item #1 跳到 item #3 而不定義 item #2,則第三個物品會被忽略。
要指定幣種:所有貨幣變量(金額、運費、運費 2、手續費、稅款)將以粘貼在付款上的 “currency_code” 變量指定的幣種顯示。因為其不是隨物品不同的,無需向變量名稱附加 “_x”。如果沒有粘貼 “currency_code” 變量,我們將假定所有貨幣變量值為美元。
PayPay API
PayPal提供了多個API接口供開發者使用。在使用API之前,你必須先申請一個高級個人賬戶或者企業賬戶,同時你必須獲取API 憑證供每次調用API 時使用。
一旦你獲取了API憑證,您就可以調用相關的API接口了。目前,我們提供兩種API接口方式,NVP和SOAP。一般來說我們推薦您使用 NVP 接口。
? Name-Value Pair(NVP)接口 – 請求和響應都是使用簡單的HTTP。該接口簡單易實現,適合於初級開發者和需要快速完成集成的人員;
? SOAP接口 - 請求和響應都是通過SOAP來完成。該接口適合於面向對象工程的開發;
PayPal API:NVP(名稱/值對)接口
通過NVP API接口, 您只需給PayPal發送一個HTTP請求,並通過“名稱=值”的形式指定請求參數,即可充分利用PayPal的API功能。
NVP API 是 PayPal 的業務功能、風險管理和業務邏輯的簡單接口。NVP API 最基本的使用方法是通過到 PayPal 服務器的 HTTPS 連接發送一個 NVP 字符串,然後處理響應(也是一個 NVP 字符串)。執行 NVP API 調用的基本步驟如下:
? 為特定的 API 方法構造一個請求參數字符串。
? 通過 HTTPS 連接向 PayPal 服務器發送這個參數字符串。
? 處理服務器響應中的 NVP。
每個NVP API請求字符串包含有API用戶名、API密碼、所要調用API的名稱及用來標識交易的令牌,如: USER=someone@unknowncompany.com&PWD=mypassword &METHOD=GetExpressCheckoutDetails&TOKEN=EC-23T233ZP3DFB...
成功的應答包含以下要素:ACK=Success ,以及一個用來標識交易的唯一令牌。 ACK=Success&TIMESTAMP=date/timeOfResponse &CORRELATIONID=debuggingToken&VERSION=2.300000&BUILD=buildNumber &TOKEN=EC-3DJ78083ES565113B&EMAIL=abcdef@anyemail.com &PAYERID=95HR9CM6D56Q2&PAYERSTATUS=verified &FIRSTNAME=John&LASTNAME=Smith...
您可以使用NVP API完成以下操作:
? 搜索已完成的交易記錄,以及查詢交易詳情;
? 自動化後端功能,例如,捕獲授權,以及處理退款等;
API Profile
進入商家賬號得到相應的APIProfile,如果是以中文語言查看,在-用戶信息-API 訪問-中得到,其中裏面申請API時,有兩個選項,第一個是用簽名的方式,第二種是以證書的方式來認證商家身份,當你選擇下載數字證時,可以到 www.paypaltech.com/tools/pem2p12.php轉換為.p12文件,也可以采用OpenSSL的命令完成,一句話搞定,要輸 入密碼喔~。這裏的鏈接有詳細說明www.paypal.com/IntegrationCenter/ic_certificate.html
相應參考資料請參考連接www.paypal.com/IntegrationCenter/ic_expresscheckout.html 了解關於Express Checkout的原理;
在此基礎上,你可以訪問www.paypal.com/IntegrationCenter/ic_nvp.html 獲取相關測試代碼;
關於PayPal的測試環境你可以訪問www.paypal.com/IntegrationCenter/ic_sandbox.html,
API Reference https://www.paypal.com/IntegrationCenter/ic_api-reference.html