EExcel 丞燕快速查詢2

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

[轉]ZFS特性

http://blog.virtual-on.org/2011/10/zfs3-zfs.html

[轉]Windows 10 guest best practices

https://pve.proxmox.com/wiki/Windows_10_guest_best_practices

[轉]Proxmox VE Physical disk to kvm 實體硬碟給kvm用

http://blogs.yyes.chc.edu.tw/post/2/75


1、ls -l /dev/disk/by-id/  找出硬碟

2、修改vm設定檔
nano /etc/pve/qemu-server/xxxxx(vmid).conf

Example:
virtio0: /dev/disk/by-id/ata-ST2000DL003-9VT166_5YD1ZYK5,size=2000G


===============

https://forum.proxmox.com/threads/proxmox-and-hdd-passthrough.17856/

[轉]proxmox 增加其他硬碟

http://blog.pulipuli.info/2014/10/proxmox-ve-add-another-hard-disk-in.html

1、找硬碟
ls /dev/sd*   (sata is sd,  ide is hd)


2、碟磁分割
fdisk /dev/sd*
a. n (new)
b.p (primary)
c. enter
d. enter
e. enter
f. w (寫入)

c d e 操作是使用整個硬碟空間


3、格式化
mkfs -t ext3 /dev/sd*


4、掛截磁碟
a.建目錄  mkdir aaa
b.寫 /etc/fstab
/dev/sd* /aaa ext3 defaults 1 2

重開,用df查

5、用proxmox掛上去
記得 content 要全選




[轉]Shrink Qcow2 Disk Files

https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files

proxmox use vmdk

http://blog.pulipuli.info/2015/06/proxmox-vevmdk-use-vmdk-format-as.html


這是因為在KVM虛擬技術中,預設快取寫入硬碟的方式為「Default (No cache)」,但是vmdk必須使用「Write Through」設定,因此只要調整硬碟快取寫入方式就可以解決這個問題。



其實上面的Bus/Device改成VIRTIO的話,一般來說效能會更好,因為這是虛擬裝置原生的通道,而非模擬出來的IDE或SATA。

vdmk 減肥 縮小 shrink windows

結論:第二步的vmkfstools -k 或是 -i 都沒用!!

最快的方式用vSphere Client 匯出 ovf範本 就自動瘦身了!!!………


=========Windows=========
In windows VM

1、sdelete
https://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

sdelete -z -c c: (有幾個權,要都做)


2、登入esxi

cd /vmfs/volumes/

vmkfstools -K [disk].vmdk    //不見得有用  maybe no use

vmkfstools -i [來源].vmdk -d thin [新目的].vmdk



=========Linux=========
In Linux VM

1、
dd if=/dev/zero of=/[PATH]/zeroes bs=4096 && rm -f /[PATH]/zeroes


2、登入esxi

cd /vmfs/volumes/

vmkfstools -K [disk].vmdk    //不見得有用  maybe no use

vmkfstools -i [來源].vmdk -d thin [新目的].vmdk

=============================================
http://techblogsearch.com/a/vmware-virtual-disk-shrink-jiang-vmdkdang-an-suo-xiao.html

http://blog.xuite.net/tolarku/blog/331992410-%E7%B8%AE%E5%B0%8F+VMDK+%E8%99%9B%E4%BD%94%E7%94%A8%E7%9A%84%E7%A9%BA%E9%96%93+-+shrink+a+thin+provisioned+disk

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

[轉]Migrate vmware vm to proxmox

https://noteits.net/2015/07/21/migrate-vmware-vm-to-proxmox/



http://blogs.yyes.chc.edu.tw/post/2/78

proxmox freenas all in one

http://www.servethehome.com/the-proxmox-ve-kvm-based-all-in-one-freenas/


各種效能比較
https://b3n.org/vmware-vs-bhyve-performance-comparison/



參考
http://churnd.net/2014/06/29/smartos-homelab-hypervisor-v3/

[轉]2 wan mapping to 1 lan multiple wan mapped to a single internal server

http://www.minitw.com/archives/routeros/routeros-2-wan-mapping-to-1-lan-multiple-wan-mapped-to-a-single-internal-server.htm

mysql 備份

http://codego.net/10343891/



1.逻辑备份(mysqldump的,由脚本)锁定数据库。这将破坏客户端端端操作。 我的方法备份关键任务数据库InnoDB的OpenSolaris上,并采取DATADIR和日志目录的日常ZFS快照。 这些快照,然后复制到离线服务器。 因为InnoDB的是事务性和快照是atomicity,也没有必要关闭在创建快照之前的服务器(回收来自它就像复苏的表单突然停电:InnoDB支持它)。

[轉]mysql 備份還原

https://read01.com/PxLz.html

[轉]直播 深入討論

https://www.zhihu.com/question/42162310



supermicro FreeNAS

Supermicro X10SLM-F
Intel Xeon E3-1231 V3、3.4GHz、10M Cache、4C/8T
8GB DDR3 ECC UnBuffer
Supermicro SC836BE16-R920B 3U 機架式 機箱 (3U 專用滑
Supermicro 920W ( 1 + 1 ) Redundant 高效能 AC-DC power supply w/ PFC
AOC-S2308L-L8e Toshiba SAS 4TB

supermicro 支援普通ddr4 關鍵字 non-ecc

copy file from freenas usb || Connect USB External Drive to FreeNAS

dmesg   check usb drive

1、mkdir /mnt/usb1234
//not sure 2、kldload fuse
3、ntfs-3g /dev/da1s1 /mnt/usb1234

umount -f /var/usb


https://forums.freenas.org/index.php?threads/connect-usb-external-drive-to-freenas.15150/

Acronis 備份/還原

http://kuang1984tw.pixnet.net/blog/post/172651324-%E3%80%90%E5%82%99%E4%BB%BD%E8%BB%9F%E9%AB%94%E3%80%91acronis-backup-11.5-build-43994---%E7%95%B0%E6%A9%9F


1、支援 UEFI/GPT 轉換 BIOS/MBR
2、異機還原最關鍵 – Universal Restore 驅動程式重抓
3、變更 SID


3跟2 在還原時會有選項
2產生的錯誤,直接略過
1也是還原時,要注意看的,會有提示

windows 快速一般化

https://dotblogs.com.tw/jamesfu/archive/2014/05/17/sysprep.aspx


公司所製作的工具 「SIDCHG 2.0」,這是一個非常小巧的工具程式,一次就可以解決更換電腦名稱和 SID 的兩個步驟,而且還會保留既有使用者的環境設定,使用起來實在是非常的方便,只要在 DOS 環境下值星傳入參數就完成了。



在我的範例中,我希望更改的時候連同電腦名稱更改為 VM1,因此使用「/COMPNAME」的參數,後面加入電腦名稱;參數「/R」是指設定完成後自動重新啟動;參數「/F」是忽略確認的訊息。而由於我目前範例中所使用的是測試版本,因此他會詢問我一個測試序號,此序號每個月會更新,必須前往官網上查看,這樣不到兩分鐘的時候,你就可以有一個仿造之前的 VM ,不但保留所有的設定,也幫你更新電腦名稱和 SID,算是非常的方便。


SIDCHG 2.0ghttp://www.stratesave.com/html/downloadsfl.html

蟑螂



http://www.mobile01.com/topicdetail.php?f=729&t=4893063&p=4







蟑螂我研究很久了, 因為住獨門獨院, 每到夏天都被蟑螂煩到不行. 我試過各種不同方法, 後來發現最有效的, 就是漂白水+香茅油+九層塔.

1. 在門口或窗口擺一盆活的九層塔盆栽.

2. 在廁所, 角落及門口擺香茅油, 放在精油罐裡讓味道釋放.

3. 每兩天在馬桶, 門口水溝及排水管倒漂白水.

4. 不會開的氣窗用矽利康封住窗縫.




我家以前每天廁所都會躲四五隻大蟑螂, 打掃再乾淨也沒用, 前撲後繼從外面湧入. 自從做了上述四點已經很久沒看到了. 一隻小的都沒有.

freenas dataset zvol

Volume = zvol

===========================
http://www.getnas.com/2015/01/386.html

FreeNAS 9.3 创建卷时会同时创建一个与卷同名的数据集,目前测试来看,在 WebGUI 界面中无法删除该数据集,因此我们只能在此数据集上面创建新的数据集。



数据集支持嵌套,即可以在某个数据集中再次创建数据集,没有数量限制,可以根据需要自由创建。也可以在数据集中创建 Zvol 虚拟硬盘,用于 iSCSI 块级共享


[轉]企業固定制 vs 固定制 比較



http://www.mobile01.com/topicdetail.php?f=507&t=4891902




結論 ping值差不多


企業固定制IP價格

10M/10M 16固定IP 6453元

20M/20M 16固定IP 9959元

30M/30M 16固定IP 11599元




固定制IP價格

100M/100M 6固定IP 2474元





Link Aggregation NIC 802.3ad switch 802.11ad

switch 交換器 重要參數

重要
WIRESPEED  WIRE-SPEED

NonBlocking  Non-Blocking

wirespeed的packet lost


  • 符不符合

1個 Gigabit port Wire Speed 每秒傳輸封包(64bit) = 1Gbit/672 = 1,488,095.2pps = 1,488.095kpps = 1.488095Mpps

簡稱 1.488算法


24 port giga switch 

1、架構(architecture):要有 24 *(1G出+1G入 理論) = 48G   (switching fabric   ,不是switching capacity)

2、效能(wire-speed):要有 24 * 1.488M = 35.712M/s    (Stack-forwarding rate for 64-byte )packets





.Backplane bandwidth 是switch的背板頻寬
所有由port傳來的packet交換的地方,通常是一台switch的可交換能力

.Backbone bandwidth  是網路的骨幹傳輸最大的流量容納分支點匯入或分支的

.Fabric switch bandwidth

.througput



http://www.vlab.com.tw/index.php/forum/network-internetwork-design/62-non-blocking-wire-speed

ubuntu lvm 新增硬碟

http://blog.xuite.net/m740138.m740138/blog/31793294-LVM%E5%AF%A6%E6%88%B0

要注意的地方是 硬碟分割完之後,partion id要設8e (linux lvm)



https://www.rootusers.com/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk/


======

說明

第一部份: 實體磁區先切

第二部份:加到LVM

第三部份:更新系統


第一部份: 兩種方式  A. fdisk  B.gparted (圖形)

基本上建議用B.  去下載 http://gparted.org/  iso,掛到虛擬機上

vmware F2 進bios 改光碟開機,然後用圖形化介面,把磁碟擴展。


如果用A. 方法是 把多的空間建立partition,問題在於partition會越建越多,比較不推


通用部份:
fdisk -l  請記得 要看兩個地方: DISK  /dev/sda   xxxxxG
DISK /dev/mapper/xxxxxxxx   xxxxxG

兩個部份是目前硬碟空間使用情況



第二部份:
先用pvscan  看有沒有free空間

再來加到LVM,

lvextend -L +xxxxG     /dev/ubuntu-vg/root   //注意,這裡請用lvdisplay



第三部份:

resize2fs /dev/ubuntu-vg/root




windows iso download

http://windowsiso.net/

unreal media server obs

https://obsproject.com/forum/threads/to-set-up-a-private-stream-server-with-ums.5401/


1、obs: customer steam  rtmp://xxx.xxx.xxx.xxx:5130/live/name
5130 is Unreal media server live port

2、Unreal media server: New Live Broadcast ->  Rebroadcast live RTMP / RTSP / MEGG-TS / MMS Stream ->

Live broadcast Alias :  name
chosese   PUSH   rtmp://     no auth for test

 then

use unreal streamplayer   or vlc


vlc
rtmp://xxx.xxx.xxx.xxx:5119/live/name
5119 is Unreal media server players port

Visual Studio Code

https://code.visualstudio.com/

CTJS2016 新手上路之 40 分鐘學會 Angular 2 網站開發框架 '



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


http://www.slideshare.net/WillHuangTW/ctjs-javascript-conference-happy-coding-with-angular-2

https://github.com/doggy8088/ctjs2016-ng2demo


非常建議值得一看,非常容易了解,非常清楚

chromebook how to backup firmware || restore

1、https://johnlewis.ie/Chromebook-ROMs/utils/flashrom
sudo flashrom –r


2、https://johnlewis.ie/flash_chromebook_rom.sh
option 4


3、
https://raw.githubusercontent.com/MattDevo/scripts/master/firmware.sh

This shell have backup option.

Then

http://mrchromebox.tech/firmware-util.sh   call   firemware.sh

So try fireware.sh


===== flashrom =====

https://johnlewis.ie/Chromebook-ROMs/utils/flashrom


chmod +x flashrom
sudo ./flashrom -w xxxxxbios.bin


==== restore =====
https://docs.google.com/document/d/1Q_5_rTv2CEMgXiAm86IXGOVGBtb8JWXj-zcCPzAEEkQ/edit

cordova framework7 base

index.html


  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; media-src *">
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>APP</title>
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/framework7.ios.min.css">
    <link rel="stylesheet" href="css/framework7.ios.colors.min.css">
    <link rel="stylesheet" href="css/my-app.css">
  </head>




    <script src="cordova.js"></script>
    <script src="js/index.js"></script>
    <script src="js/framework7.min.js"></script>
    <script src="js/my-app.js"></script>



==========
index.js for cordova

my-app.js for framework7

Crodova build release apk windows

c:\cordova_project
c:\cordova_project\project_name
c:\cordova_project\Crodova build release apk1.bat
c:\cordova_project\Crodova build release apk2.bat
c:\cordova_project\Crodova build release apk3.bat
c:\cordova_project\zipalign.exe


.Crodova build release apk1.bat

cd project_name
cordova build --release android



.Crodova build release apk2.bat

ECHO off
set /p storepass=input storepass  :
set /p keypass=input keypass  :

cd project_name
set PATH=%PATH%;C:\"Program Files"\Java\jdk1.8.0_74\bin\
jarsigner -verbose -keystore ../keystore/eexcel.keystore -storepass %storepass% -keypass %keypass% platforms/android/build/outputs/apk/android-release-unsigned.apk alias_name



.Crodova build release apk3.bat

cd project_name
del /f /q platforms/android/build/outputs/apk/project_name.apk

%cd%\..\zipalign -f -v 4  platforms\android\build\outputs\apk\android-release-unsigned.apk platforms\android\build\outputs\apk\project_name.apk


PS:zipalign download from internet
http://forum.xda-developers.com/showthread.php?t=2214583
http://forum.xda-developers.com/attachment.php?attachmentid=1848618&d=1364750980

Cordova android framework7 回上一頁

https://muut.com/framework7-cn#!/?%E8%BF%94%E5%9B%9E%E4%B8%8A%E4%B8%80%E9%A1%B5


onDeviceReady: function() {
         document.addEventListener("backbutton", function(e) {
              var currentView = myApp.getCurrentView();
              if(currentView.history.length>1) {
                     currentView.router.back({});//返回上一级
              }else{
                      navigator.app.exitApp();//首页点返回键退出
              }
        }, false);
       
        app.receivedEvent('deviceready');
}

Cordova android AdMob framework7

cordova create  oooxxxx

see js/index.js

onDeviceReady: function() {
  app.receivedEvent('deviceready');
}


Now put AdMob Code

onDeviceReady: function() {
       
        // place our admob ad unit id here
        var admobid = {};
 
        if( /(android)/i.test(navigator.userAgent) ) {
          admobid = { // for Android
            banner: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo',
            interstitial: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo'
          };
        } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
          admobid = { // for iOS
            banner: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo',
            interstitial: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo'
          };
        } else {
          admobid = { // for Windows Phone
            banner: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo',
            interstitial: 'ca-app-pub-xxxxxxxxxxxxx/oooooooooooo'
          };
        }
       
        if (! AdMob ) { alert( 'admob plugin not ready' ); return; }
       
        // this will create a banner on startup
        AdMob.createBanner( {
          adId: admobid.banner,
          adSize: 'SMART_BANNER',
          position: AdMob.AD_POSITION.BOTTOM_CENTER,
          isTesting: true, // TODO: remove this line when release
          overlap: false,
          offsetTopBar: false,
          bgColor: 'black'
        } );
       
         this will load a full screen ad on startup
        AdMob.prepareInterstitial({
          adId: admobid.interstitial,
          isTesting: true, // TODO: remove this line when release
          autoShow: true
        });
     
        app.receivedEvent('deviceready');
}


PS:If see example https://github.com/floatinghotpot/cordova-admob-pro/blob/master/test/index.html
Maybe this need to change
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; media-src *">


reference
https://www.npmjs.com/package/cordova-plugin-admobpro
https://github.com/floatinghotpot/cordova-admob-pro/blob/master/test/index.html
https://github.com/floatinghotpot/cordova-admob-pro/blob/master/test/admob_simple.js

FileOptimizer

http://nikkhokkho.sourceforge.net/static.php?page=FileOptimizer

google AdMob 最新版有很多問題

https://github.com/googleads/googleads-mobile-android-examples    See Issues

最新版 9.0.2 or 9.0.0   (com.google.firebase:firebase-ads:9.0.2)

Log查 w/Ads

W/Ads: Failed to connect to remote ad request service.
W/Ads: Could not start the ad request service.
W/Ads: Failed to load ad: 0


整個無言! ..............最簡單的範例也出錯!!

c# not vb.net PrintPreviewDialog PrintDialog 在PreviewDialog中按列印鈕,直接呼叫PrintDialog

http://www.blueshop.com.tw/board/FUM20050124191756KKC/BRD200707131926393KJ.html
http://homepage1.nifty.com/yamato/texts/memorandum/memo5_1.html



Globa
private ToolStripButton tbs = new ToolStripButton();


private void preview_Click(object sender, EventArgs e)  //normal buttion click
{
  tbs.Text = "Print";
  tbs.Click += new EventHandler(tbs_Click);

  PrintPreviewDialog print_preview = new PrintPreviewDialog();
  ((ToolStripButton)((ToolStrip)print_preview.Controls[1]).Items[0]).Visible = false;
  ((ToolStrip)print_preview.Controls[1]).Items.Insert(0, tbs);

  print_preview.Document = printDocument1;  //PrintPreviewDialog
  print_preview.ShowDialog();
}

private void tbs_Click(object sender, EventArgs e) {
  MessageBox.Show("dd");  //now here can put PrintDialog code

  var print_dialog = new PrintDialog();
  print_dialog.Document = printDocument1;

  if (print_dialog.ShowDialog() == DialogResult.OK)
  {
      printDocument1.Print();
  }
}






c#打印

http://www.cnblogs.com/scottckt/archive/2008/01/31/1059576.html

http://kenyanzi.blogspot.tw/2011/05/c.html

http://fanli7.net/a/bianchengyuyan/_NET/20130427/347677.html

http://stackoverflow.com/questions/25069994/use-printdocument-to-print-each-row-in-datatable-to-seperate-page

ssl vpn server vmware Openwr OpenConnect

http://www.hooklearn.top/2016/04/27/openwrt%E6%90%AD%E5%BB%BAopenconnect-vpn/

核心問題 cost down 分享

個人覺得這篇沒有說到真正的核心問題,看到的cost down只是大家本來就會做,商人天生就會做的事。

真正的問題是:分享,另一說法就是做免錢的,台灣老闆完完全全不了解這個,只有看到有收益才會投入,這才是真正最大的殺手!

為什麼會這樣說?

github上面一堆大型的Open Source專案,真正核心都是有一群熱心的、沒有收益的人在處理,然後加上一大堆志工來做文件、教學、推廣,最後大家有付出,才會共同理念,才會去支持,最後成就這套Open Source。
社群經營不外如是,有人花大量的時間及成本來維護社群,回覆新進人員問題,不耐煩的一再教育,最後加入的人產生共鳴,成為死忠粉絲。

上述跟cost down一點關係都沒有,跟分享(免錢)絕對關係。


商人天生是不會分享的,更正確的來說,是沒有利益是不分享,我想大家都認同,那問題來了,那為什麼外國商人會搞這種分享,投入大筆的資金做免費的事,google是最明顯的例子,為什麼?

因為看利益的角度是完全的不同,自己的親身實例,之前待過公司有提過做beacon,這是要投入人力、時間、成本,結果只起了個頭,剩下就希望員工自己利用時間處理完畢。再以目前手機APP程式需學習android,要員工自己進修,而不願意提供時間及成本給員工。

更重要的開放專案、社群,肯定第一論調,開放專案會讓公司的核心價值沒了,別人都能模枋,不可能!社群經營要有人力維護,花成本在這上面,沒有收益,那不投入,不然隨便找一個公司完全不懂社群的人,請他每天post一些莫名其妙的文章,公司嘴上上心,實際隨便找個員工,員工也是兼職隨便弄。

方向錯,步步錯,最後像管理學的例子,書店進二本書,一個月後賣掉,發現只賣二本書,得到這本書賣不好的結論,是一模一樣的道理。


沒有開放的Open Source、硬體,是沒有人會投入,自己先提供免費,才能讓別人一起投入免費行例,但這些對台灣的老闆太難了。


==========
https://www.twreporter.org/a/g0v-civic-tech-community

pushover

https://pushover.net/faq#overview-fees


$4.99 USD once, per-platform (iOS, Android, Desktop)

send Pushover notifications may send 7,500 messages per month for free

10,000 for $50.00 USD, 25,000 for $115.00 USD, 50,000 for $200.00 USD

[轉]教你搭建你自己的“深度学习”机器

http://www.freebuf.com/articles/others-articles/104968.html


https://youtu.be/dgxe15vCR7s


https://cloud.google.com/products/machine-learning/

M$ workflow foundation

https://dotblogs.com.tw/sophieq/archive/2012/07/04/73210.aspx



文件核准程序
公司購買程序
招聘程序
Visual 工作流程追蹤
暫停的執行個體管理

訂購狀態機器範例
Outlook 工作流程精靈範例
語音應用程式範例
終止追蹤服務範例
追蹤設定檔設計工具範例
工作流程監視器範例
工作流程反映公用程式範例

----------
.net 3.5
http://msdn.microsoft.com/zh-tw/library/ms741723(v=vs.90)

.net 4.0
http://msdn.microsoft.com/zh-tw/library/dd483375.aspx
WF4.5
http://msdn.microsoft.com/zh-tw/magazine/hh781025.aspx
http://msdn.microsoft.com/zh-tw/library/gg427656


C# print preview multiple pages

http://www.codeproject.com/Tips/733680/Printing-and-Previewing-multiple-pages-in-Csharp

信用卡 收款手續費

豐掌櫃

收款: 手續費率 2.2%  
提領:

提領帳號為「永豐帳戶」者:免費
提領帳號為「他行帳戶」者:25

系統服務費 (月費):
當月累積代收金額超過5 萬元者,每月380

==============================

Paypal

收款:  手續費 2.4% ~ 3.9% ~5.4%
提領:

台灣當地銀行的美金帳戶 2.5%
台幣 免費


==============================

歐付寶 Allpay

收款: 手續費 2.75%  行動支付2%
提領: 無

==============================

PayNow

收款:  手續費 2.5% ~ 3.5%
提領:

每次撥款帳務處理費新台幣30元由賣家支付


==============================

第e支付

收款:  手續費 2% ~ 2.5%
提領:

進階會員、進階商務會員每次提領收費新台幣30


==============================

Go2Pay

收款:  手續費 2.8%
提領:

一次15元 (其他條件超多...)


==============================

Pay2Go

收款:  手續費 2.8%
提領:

提領手續費 10元 (每個月可享有四次手續費免收優惠)


prevent directory traversal attacks in php

http://www.bitrepository.com/prevent-directory-traversal-attacks-in-php-wordpress.html

freenas cifs slow

https://forums.freenas.org/index.php?threads/slow-transfer-speeds-via-cifs.39867/

https://forums.freenas.org/index.php?threads/cifs-directory-browsing-slow-try-this.27751/

---CIFS--Advance mode----Auxiliary Parameters:-------------
store dos attributes = no
map system = no
-----------------------------------------------------------------------
Jumbo Frame enable
-----------------------------------------------------------------------
In BSD the CFIS implementation is only single threaded
-----------------------------------------------------------------------
Omni-OS + Napp-it for great iSCSI and CIFS performance
A multithreaded kernel based alternative to SAMBA is Solaris CIFS in Oracle Solaris, OmniOS or NexentaStor
OmniOS is currently SMB1
Nexenta and Solaris 11.3 is SMB 2.1.
Most feature rich is Solaris 11.3 as it includes real ZFS encryption, SMB 2.1, LZ4 compress and fast sequential resilvering
-----------------------------------------------------------------------

store dos attributes = no
ea support = no
map archive = no
map hidden = no
map system = no
map readonly = no

2. (and 3.) was probably related to the old switch, which is now replaced. Even home PCs had short interruptions, which should be now gone (it seems so).
4. I deleted this share (wasn't necessary anymore), but didn't reset the permissions yet.
1. and 5. done.

Now I get speeds around 110-115MB/s.
But with another PC it is around 75MB/s writing to NAS and 95MB/s reading from NAS.


=====
ea support = no
store dos attributes = no
map archive = no
map hidden = no
map readonly = no
map system = no


1. Disables Samba from using EAs.
2. Tells Samba not to store the DOS attributes (any existing bits that are set are simply abandoned in place in the EAs).
3. Forces all 4 parameters to off/no/unchecked/disabled.

Note: The read-only bit I am mentioning, disabling, then forcing to off is not the standard read-only permissions users may be given to files or folders.

[轉] solved use root Login CIFS(access is denied)

https://forums.freenas.org/index.php?threads/use-root-login-cifs-access-is-denied.21233/



I fixed the issue by changing root's password via the WebGUI. To do this:
1. Go to the "Accounts" page
2. Click on the "Users" tab
3. Locate and select the user "root"
4. Click on the "Modify" button located at the bottom of the page and a dialogue window will open
5. Enter a password, twice, and click on the Save? button located at the bottom of the dialogue window

xampp upgrade php for linux

1、backup

/opt/lamp/etc/extra/httpd-xampp.conf

or
/opt/lamp/etc/extra/   any conf  be edited


/opt/lamp/etc/php.ini
/opt/lamp/etc/httpd.conf

any conf、ini  or your edit file backup .

2、download xampp newst install sh    then install again

3、Don't copy backup file overwrite old ini conf file

use note++ to compare different, then change or no change.


4、finish try to ./lamp restart

====================================

Maybe other way

You can see  /opt/lampp/properties.ini

maybe use apt-get install php or mysql, then change this path, then restart......I Not Sure can or not.

ConfuserEx 保護 C# windows form

https://yck1509.github.io/ConfuserEx/

http://confuser.codeplex.com/


=====
http://www.cnblogs.com/zhangzhi19861216/p/3937434.html

Visual Studio 2015 net 4.6.1 四捨六入五成雙 錯誤

最近再試,發現 Math.round() 又正確了....奇了! 116.55出來是116

==========
一般的說法是Math.round()

但實際上跑

decimal num = 116.55
Math.round(num)

結果是 117  這是錯的!!


所以

參考這個
https://windperson.wordpress.com/2013/02/21/c-%E5%B0%87%E5%B0%8F%E6%95%B8%E9%BB%9E%E5%BE%8C%E6%8C%87%E5%AE%9A%E4%BD%8D%E6%95%B8%E7%9A%84%E6%95%B8%E5%80%BC%E5%8E%BB%E6%8E%89%E7%9A%84%E6%96%B9%E6%B3%95/


改成

decimal GetFrag1(decimal input,int digit) //這個四捨六入五成雙才正確
{
            if (digit < 0) { return Math.Floor(input); }
            double pow = Math.Pow(10, digit);
            decimal sign = input >= 0 ? 1 : -1;
            return sign * Math.Floor(sign * input * (decimal)pow) / (decimal)pow;
}


GetFrag1(num, 0).ToString()

結果 116



[轉]vm安全性

http://www.mobile01.com/topicdetail.php?f=494&t=4790863

EluSiOn
請看 https://www.openssl.org/news/secadv/20160503.txt Severity: High. 2016/05/03 嚴重的 bug. 但是到了今天我伺服器上所有的 patch 都已經更新完畢了. 但是 Q & S 的 nas 的 patch 連影子都沒有.

所有的 debian/ubuntu/centos/freebsd 基本上都會在 5個工作天內完成 patch 提供更新, 但是不管是 Q牌或是S牌的更新是絕對超過 30天以上的.

再來就是 VM 有自己獨立的 file system. 其 file system 損會是不會傷害到 host 的資料. 但是 LXC/Docker 是允許跟 NAS host 共用資料夾, 這個時候, 就有機會讓針對於 host 共享的資料夾的資料造成毀損.



防火牆是使用 PFSense, 你的安全係數可以拉很高! 不管是 Deep packet inspection (DPI), Intrusion Detection System IDS 以及 Intrusion Prevention System 都有. 但是就要看你防火牆的 cpu 是否夠力了


pfsense 主體是 iptable, 但是搭配了其它的 package 後 (直接從 pfsense 裡面選擇安裝), 它就變成非常的強大. 安全防護的 package 如下

1. pfBlockerNG
2. snort IDS/IPS
3. Squid Proxy 可以搭配 clamav 掃毒任何所有的 http request.

但是上述這些服務都非常吃 cpu. 一定要時候夠有力的喲. intel atom 2558 等級以上的才可能考慮全開.

j1900 n3150 n3700 這些都不夠力

android crosswalk goback



MainActivity.java

@Override
public boolean dispatchKeyEvent(KeyEvent event) {
  if(event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getAction() != KeyEvent.ACTION_UP) { //按下有用,key up 無用
    if (mXWalkView != null && mXWalkView.getNavigationHistory().canGoBack()) {
      mXWalkView.getNavigationHistory().navigate(XWalkNavigationHistory.Direction.BACKWARD,     1);
      return true;
    }
  }

  return false;
}

[轉]为什么放弃WebView crosswalk

http://www.cnblogs.com/ct2011/p/4100132.html

android remove title bar



<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>

android crosswalk new for file upload、camera test

1、build.gradle


repositories {
  maven {
    url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
  }
}

compile 'org.xwalk:xwalk_core_library:18.48.477.13'





2、active_main.xml





<org.xwalk.core.XWalkView android:id="@+id/activity_main"
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent">
</org.xwalk.core.XWalkView>

3、MainActivity.java
 




mXWalkView = (XWalkView) findViewById(R.id.activity_main);
mXWalkView.load("https://blueimp.github.io/jQuery-File-Upload/", null);


@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  mXWalkView.onActivityResult(requestCode, resultCode, data);

 
4、AndroidManifest.xml



<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />





android:hardwareAccelerated="true"

web app javascript hyper app basic



基本上 codova phonegap都是用webview裡面的addJavascriptInterfac 指定@JavascriptInterface 的java method,間接呼叫 回傳資料,達到和原生溝通


codova phone 等等都是包好,讓使用者方便使用,而且共同開發,讓呼叫 回傳 android 多版本能正常


ionic、titanic、react native 等等 為了在web app上速度更快或是對應呼叫 回傳時,開發速度更快

[轉]Android WebView 与 JavaScript 交互 AND Java

https://codemumbai.wordpress.com/android-webview-image-upload-solved/

http://maurizionapoleoni.de/blog/implementing-a-file-input-with-camera-support-in-android-with-crosswalk/

=====
https://mthli.github.io/Android-WebView-JavaScript


http://stackoverflow.com/questions/11544992/taking-a-picture-from-the-camera-fails-20-of-the-time


http://bluereader.org/article/165908253


http://www.mobile-open.com/2015/65366.html


http://www.flapjacksandcode.com/blog/2015/2/17/android-webviews-getusermedia-putting-it-all-together

http://lookintoandroid.blogspot.tw/2015/11/getting-camera-captured-image-in.html
=====
upload file
http://www.unknownerror.org/opensource/brandonsavage/Upload/q/stackoverflow/5907369/file-upload-in-webview




=====

用CrossWalk包的話,可以肯定是最新的chrome,保證在操作上的正常!但app會非常的肥大~~

再不然就不能事先說明android 5以上才能存取 camera, file upload

[轉]免费空间+便宜VPS和OpenResty,Ngx_lua,Redis搭建系统负载均衡环境

http://www.freehao123.com/vps-openresty-ngx_lua/

免费空间+便宜VPS+OpenResty +Ngx_lua +Redis高效系统负载平衡环境,经过测试,15美金的服务器能支持每天2-3万IP的访问量



免费空间、nginx、ngx_lua、Redis


[轉]网站服务器压力Web性能测试:Apache Bench,Webbench,http_load安装使用


http://www.freehao123.com/apache-bench-webbench/

http://www.freehao123.com/linux-vps-cpu/

website moeny

http://www.cj.com/

https://affiliate-program.amazon.com/

oneinstack 一键安装 lnmp

https://oneinstack.com/install/


=====
可另外裝  oneinstack/shadowsocks.sh install

image resize and fill color



http://deepliquid.com/projects/Jcrop/demos.php?demo=advanced




http://dbwebb.se/opensource/cimage

[轉]怎麼知道 SEO (關鍵字) 成效如何?

https://cola.workxplay.net/how-to-know-seo-is-working/





快查 SEO 成效

– Chrome 請登出 Google 帳號
– 請用無痕模式


你可以在 Google 查詢 site:你的網址
確認你的頁面被 Google 收錄(建立索引 / index)了沒.






(已經被收錄的網址)






[轉]SMO

https://cola.workxplay.net/what-is-smo-metatag/



FaceBook : Open Graph tags
https://developers.facebook.com/docs/sharing/webmasters#markup
最常見的 FB og /社群標籤,直接影響轉貼、分享於 FB 上的內容

小乾貨:有時修改了 og tag 內容,但是 FB 的分享畫面總是出現舊資料,這時可以試試 https://developers.facebook.com/tools/debug/ ,請 FB 重新抓取指定網址的資料。

=====

Twitter card info
https://dev.twitter.com/cards/types/summary個人愛用,雖然近期使用人數大減,但他的好處和優點很難用文字說明 XD ,除了 card info 的標籤官網也指出:我們也吃 og 標籤
https://dev.twitter.com/cards/getting-started#opengraph


=====

Google Plus / Google +
https://developers.google.com/+/web/snippet/你以為 Google plus 沒人用,那就虧大了!Google 的 搜尋結果頁超愛這味的!
上面的網址內也有提供產生器,讓非工程師也能簡單使用。

=====

MicroData JSON-LD
https://developers.google.com/schemas/formats/json-ld?hl=zh-TW這算是比較工程師層面的,把內容丟給你家工程師看吧
由入門的 MicroData (http://schema.org/) 延伸到較進階的 JSON-LD


====================



Google 提供的 https://developers.google.com/structured-data/testing-tool/ ,他能驗證、檢驗你設定的 tag 有沒有生效、正確



強大的 http://smo.knowem.com/ ,他能將所有常用、相關的 tag 分類列出,並且還能告訴你缺少了哪些


較可惜的 https://www.similarweb.com/website/,他可以取得目標網站的各種資料,關鍵字、連入/連出網站等,缺點就是想要更多資訊,就需要升級付費功能

大量email

http://mailchimp.com/pricing/entrepreneur/

https://sendgrid.com/pricing

turnkeylinux bitnami

https://www.turnkeylinux.org

php news records previous next

http://www.sitepoint.com/forums/showthread.php?645467-Retreiving-the-previous-and-next-row-through-PDO&p=4425809&viewfull=1#post4425809


SELECT
i.images_id
,COALESCE(
(SELECT images.images_id FROM images WHERE images.images_id < i.images_id ORDER BY images.images_id DESC LIMIT 1),
(SELECT images.images_id FROM images ORDER BY images.images_id DESC LIMIT 1)
) AS previous_images_id
,COALESCE(
(SELECT images.images_id FROM images WHERE images.images_id > i.images_id ORDER BY images.images_id ASC LIMIT 1),
(SELECT images.images_id FROM images ORDER BY images.images_id ASC LIMIT 1)
) AS next_images_id
FROM
images i
WHERE
i.images_id = 1



==========
for record, not for page

1、 get all new_id in array  (PDO fetchAll(PDO::FETCH_ASSOC) )

$all_news_ids = $crud->sql("select news_id from news");


2、get $now_news_id key for array

$now_news_id_key_id = array_search(array('news_id'=>$now_news_id), $ar_all_news_ids);


3、check $now_news_id_key_id first, if empty

$prive_news_id = empty($now_news_id_key_id)?"":get_record_column('news_id', $all_news_ids, $now_news_id_key_id+1);
$next_news_id = empty($now_news_id_key_id)?"":get_record_column('news_id', $all_news_ids, $now_news_id_key_id-1);



function get_array_column($val, $ar){
return array_key_exists($val, $ar)?$ar[$val]:"";
  }

function get_record_column($val, $ar, $rec_arrow=0){
return (isset($ar[$rec_arrow]))?get_array_column($val, $ar[$rec_arrow]) : "";
  }

[轉]網頁已死,兇手是 App

https://yowureport.com/%E6%89%93%E4%B8%8D%E9%81%8E%E5%B0%B1%E4%BB%BF%E6%95%88%EF%BC%8C%E8%A1%8C%E5%8B%95%E7%B6%B2%E9%A0%81%E7%AA%81%E7%A0%B4-app-%E7%94%9F%E6%85%8B%E5%A3%9F%E6%96%B7%E5%B1%80%E9%9D%A2/

[轉]工程師轉職商人的心路歷程 #1 - 這輩子成長最快的一年

好文

http://adz.cool/posts/711838-merchant-mentality-of-1-software-engineer-to-be-redeployed-fastest-growth-ever-year


couchbaselabs mini-hacks

https://github.com/couchbaselabs/mini-hacks


Important !!
channels-users-roles
https://github.com/couchbaselabs/mini-hacks/tree/master/channels-users-roles

=====

level-1:未註冊使用者(發文要核準)
level-2:註冊使用者(發文不用核準)
level-3:版主(可核準或取消)

程式動態新增role
藍線:建立role
綠線:回覆結果

.角色(Roles)和使用者(users) 是可以被授權 而訪問 Channels.
  使用者(users) 被附予角色(Roles),則可以 用角色的授權 進而訪問 Channels

channel(channelname)  有讀取權限
access(doc.owner, channelname);  給 寫入權限
requireUser(doc.owner) requireRole(doc.role)  也可以給 寫入權限
document content (using throw)  ???

讀和寫權限是分開的。
寫的權限完全是用sync function控制:除非sync function拒絕.........


Write
requireUser(username)  是否是該使用者(User)
requireRole(rolename)  是否有該角色(Role)
requireAccess(channels)  是否有該Channel


curl -vX POST -H 'Content-Type: application/json' \ --cookie 'SyncGatewaySession=d007ceb561f0111512c128040c32c02ea9d90234' \ :4984/db/ \ -d '{"type": "review", "role": "level-1", "owner": "jens"}'

 {"type": "review", "role": "level-1", "owner": "jens"}  =>

type => doc.type
role => doc.role
owner => doc.owner

So

doc.type    review
doc.role     level-1
doc.owner  jens

=====

curl -vX POST -H 'Content-Type: application/json' \ --cookie 'SyncGatewaySession=6e7ce145ae53c83de436b47ae37d8d94beebebea' \ :4984/db/ \
-d '{"type": "review", "role": "level-2", "owner": "andy", "restaurant_id": "123"}'

 So

doc.type    review
doc.role     level-2
doc.owner  andy
doc.restaturant_id  123


=====

curl -vX POST -H 'Content-Type: application/json' \ --cookie 'SyncGatewaySession=3a5c5a67ff67643f8ade175363c65354584429e9' \ :4984/db/ \ -d '{"type": "profile", "name": "william", "role": "level-3"}'

So

doc.type   profile
doc.name william
doc.role    level-3 



[轉][Javascript] 讓 Ckeditor 更好用:拖曳上傳圖片

http://symposium-of-coding.blogspot.tw/2016/01/javascript-ckeditor.html

Dropler

租 買 房

http://www.mobile01.com/topicdetail.php?f=356&t=4772225&p=6


以下我簡短提一下為何要買的概念
首先我們先設定有工作 且能一次付清600萬 30坪 3房 單坪價20/坪
假設10年後1坪20萬跌到1坪10萬 600萬剩300萬
售出拿回300萬 這時把自己存的錢加碼買60坪 這時候要多付300萬 300+300等於600萬60坪
若10年後1坪30萬 售出拿回900萬 換大房60坪要 1800萬 你還要多付900萬
跌只要拿300萬 漲卻要900萬 這樣一來一回差600萬
若你10年能存900萬那我無話可說 你很棒
但是一般人不敢買 或以為有房的人怕跌 根本狗屁
這些有房階級很會算好嗎 跌他才能換更好更大的房子
而受薪階級總受限於不敢負擔太重

結果越來越買不起 這才是為啥要買的原因

不管你何時買 只要你有固定收入 買在越高點 跌越深你越能換好房子

不管你買多少 住一段時間後 跌越多 你越有機會換大的
所以說有人不敢買房子不適買不起原因就在這




為啥有房子的人會一直買
我舉的例子給你聽好了
5年前我客戶買一間房子在未來捷運站走路5分鐘內會到
35坪她買615萬 她現金夠 但她貸款500 (500是好抓的數字非固定)
然後呢
500萬約月繳2萬5 年繳30萬 利息約13萬 前期是利息高後期是利息低
然後呢 這500萬她拿去買中華電 因為最穩 10萬1隻 近5年都配息5塊多
50隻配25萬 應該只會多不會少
房子我租人1萬8 年收21.6萬 抓20好了
這間房子幫她收入45萬 她繳給銀行30萬含本金 你說她賺多少 扣掉利息 她賺27萬
利息還能抵所得 另外繳銀行貸款也有技巧
申請前2年只繳息到期再展延 45萬-13萬等於27萬 2年54萬
這筆錢你可以考慮繼續加買中華電或還本金 還本金你變成用446萬去計算以後的本利攤還
或在買5隻中華電 每年又多2萬5的股息 這時股息變27萬5+20萬等於47萬5
等於每年多還2萬5本金 這20年下來你多還50萬等於提早1年半還完 利息少了快15萬
上面我還沒算我客戶那種 展延2年再2年收的錢全拿去買股票也不賣只收股息 我記得沒錯他第5年總共買的64隻 股息32萬
然後她跟我說 就算沒人租她也夠付銀行 沒錯他就是一個很會算的女生
也許你以為這是理想值 但就我認識的客戶就是這樣買
也些人根本不用工作 你不敢不會算不代表這世上沒人會算
很多人也許會說沒600萬就別搞了 你不會認真工作+兼差住家裡一年存個30萬 存個3年先買套房再慢慢換越大的
一堆藉口都是自己做不到怪誰






我舉這例子是告訴大家有錢人買房子的觀念是用來賺錢理財 很多醫生超愛買豪宅又貸款又能扣所得





你只要去想為啥一堆好野人買幾千萬的豪宅又貸款 財產還不會減少 難道他們比你笨嗎
PS 有人會說你不會600萬去買中華電60隻 一年30萬 20年600萬嗎恩那20年後你就是60隻股票+600萬
但我客戶每年收47萬5最少 利息13萬其他都去還本金 基本不用15年就還玩了 剩5年能存200萬以上20年後我有股票+房子+200萬 鈔票會貶值 但鈔票貶值房子就越貴

Could not create an instance of Tooling API implementation using the specified Gradle installation gradle-2.10

If you try many way, can't finish.



1、reinstall android studio  : remove all
2、delete all 
c:\user\your user name\.gradle
c:\user\your user name\.AndroidStudio2.0

3、reinstall android stuido 
be careful path and directory, C:\Program Files\Android   check this directory, have other Android Studio, likfe Android Studio1..... If have delete Android Studio1 directory, only keep Android Studio.


[轉]測試有沒有唯一值

http://my.oschina.net/phpfunction/blog/65090

<?php
    $a = array();
    for($i=0; $i<16*16*16*2; $i++){
        $a[$i] = uniqid();
    }
    $b = array_count_values($a);
    $c = array_keys($b, 2);
    if($c){
        echo '<pre>';
        print_r($c);
    }
    echo '<pre>';
    print_r(array_count_values($a));
    exit;
?>

[轉] .....


http://www.mobile01.com/topicdetail.php?f=291&t=4760575


morgan8639
2016-04-07 01:17 #6

我是曾經投入網賺領域超過八家..月報酬1~7%以上的失敗過來人和你說:
"不願意"
其實像這種吸金案都差不多,網路和實體差別也只是產品服務不同罷了。

原因不是負面思考,而是要用事實說話

要分兩部分:(知己知彼,百戰不怠)

知彼部分:
1.現在低利率,為啥你不和銀行貸款反而要加盟?

2.我怎麼知道你給我的2萬8是不是從本金裡拿給我的?

3.10萬1%、100萬給1.2%利率,200萬1.4%,什麼好東西還可以讓你這樣報酬定價的?還是你只是想快速籌錢?(傾向這一塊)

現在廣告都以網路行銷居多,實體行銷已經是弱勢,你拿什麼和FB廣告鬥?20元就能起家欸!

我比較傾向建商租地賣不出去,所以變相拿去做附屬建案吸金籌錢+增加房產價值這個論點

現在連饒河夜市店面都租不滿了..小小一個看板牆效率會高嗎?

政府部門他們熟嗎?不然怎麼防止下一位柯P把北車2F以上廣告牆都拆掉的類似政策呢?

不然怎麼能批准像基隆路信義路交叉口那個影片牆呢?

會不會哪一天政府搞你陰溝翻船呢?如果你和政府有關係..那你怎會和銀行沒關係又借不到錢想讓利呢?

老闆的品德怎麼樣呢?有經過驗證嗎?
資訊的落差就是財富的落差
這筆錢我們盡量不賺


第一題對方一定是無法解答的~銀行鑑價如果有關係絕對是借的到低利錢

第二題加上本金要扣3年一整個就更無言風險更大

第三題代表對方公司層級是業務思維..只是想找消費者罷了(不好意思,我經營傳直銷四年多只上總監,跟的是台灣前三名的個人營收領導人,看的人來來去去的多一聽數據大概知道背後狀態)


你要做投資以前 一定要先知道上一位買家的成本
然後要知道下一位買家是否願意用你願意賣出的價格買進
這個投資案才成立 沒有的話你就是消費者

買產品的消費者賺不到錢..至少可以欺騙自己得到健康

投資的消費者賺不到錢就......................
















至於知己部分:




你資金規模只要不影響生活,就可以無限嘗試




投資可以先投基本額,確認回收本錢再重倉加碼都不遲




至少利於不敗







fb廣告行銷也是這樣..一開始先投入20~100$/天去測試市場




確定文案點擊率大於收入才會開始重倉加碼廣告費




你掌握這個邏輯做事都能有守有攻!













(這篇過幾天會刪除~~看到就是有緣^^)









[轉]隨身碟

https://www.ptt.cc/bbs/Lifeismoney/M.1459756875.A.B76.html



gitlab ubuntu 15.10 TortoiseGit

1、virtualbox create vm
2core  ram 2G  hdd 20G

2、download ubuntu 15 server,  best new version iso

3、install ubuntu,no need add any server.

4、change ip dhcp to static  PS:new ubuntu eth0 maybe become to enp0s3 , don't warring.

sudo nano /etc/newwork/interfaces
auto eth0
iface eth0 inet static
address 192.168.x.x #IP位址
netmask 255.255.255.0 #網路遮罩
gateway 192.168.x.x #預設閘道
/etc/init.d/networking restart

5、change dns

sudo nano /etc/newwork/interfaces
dns-nameservers 8.8.8.8 8.8.4.4
 /etc/init.d/networking restart

6、try to connection Internet, if can conntiuum

7、Update system

sudo apt-get update
sudo apt-get upgrade

===========================
8、install gitlab

https://about.gitlab.com/downloads/#ubuntu1404

a、sudo apt-get install curl openssh-server ca-certificates postfix

postfix maybe ask some question:I choose internet like this... not important

b、 step 2 

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get update
sudo apt-get upgrade

but get error, so

https://packages.gitlab.com/gitlab/gitlab-ce

curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/wheezy/gitlab-ce_8.3.6-ce.0_amd64.deb/download
dpkg -i gitlab-ce_8.3.6-ce.0_amd64.deb

c、finish install

sudo gitlab-ctl reconfigure


===========================
9、 use web broswer http://your_ip

account:root  password:5iveL!fe

maybe can change same password.

10、create new project
user is root

Private
Private

then create

===========================
11、TortoiseGit for gitlab

a、Git for windows 
https://git-scm.com/download/win

install

b、Download TortoiseGit and language packs

https://tortoisegit.org/download/

install

reboot windows

c、create Public and Private key
run tortoisegit -> PuTTYgen ->Generate  then mouse move move move , let it finish.

.Public key 

一、copy all to     http://your_ip/profile/keys
add ssh key, put in key.  Title is not import by yourself. Better is rsa-key-yyyymmdd.

二、do this step 
http://sueboy.blogspot.tw/2016/04/gitlab-tortoiesgit-git-clone-server.html


.Private key : click Save private key button. save file. This file is very import.


d、On desktop right click, click git clone

URL:git@your_ip:root/your_project_name.git

putty (key):choose your Private key


now usually can get file.  Success.


e、Success then right click on folder. TortoiseGit  -> setting -> git

all->
name: by yourself
Email: by yourself

PS:by yourself  is important.  If you git push, this name and email, will in git.




===========================

Now Finish.














gitlab tortoiesgit git clone Server refused our key

This problem is root user, No Have .ssh folder


1、mkdir .ssh
2、chmod 700 .ssh
3、nano authorized_keys
copy gitlab ssh keys, put inside
4、chmod 600 authorized_keys
5、sudo service sshd restart

use tortoiesgit git clone, now usually no error msg :Server refused our key.

[轉]Download Crystal Reports For Visual Studio 2015

http://tektutorialshub.com/download-crystal-reports-for-visual-studio-2015/

http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_16.exe




sap
https://scn.sap.com/docs/DOC-7824

[轉]Visual Studio程序打包软件——InstallShield(4)

http://blog.csdn.net/luoyouren/article/details/45953171


http://read01.com/78nNN.html

.NET Framework 4.6.1正式版完整離線安裝包

.NET Framework 4.6.1正式版完整離線安裝包

http://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe

https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe



visual studio C# embed dll in .exe 打包dll到.exe firebird embedded

Loading Managed DLL   Firebirdsql.DataFirebirdClient.dll is ok
Loading Unmanaged DLL  fbembed.dll is not ok for embed

so easy way is not do embed.

DEMO APPLICATION 
Sure can run for
=====
http://www.codeproject.com/Articles/528178/Load-DLL-From-Embedded-Resource

1、want packget FirebirdSql.Data.FirebirdClient
tools -> NuGet manager - > manager NuGet
find FirebirdSql.Data.FirebirdClient install to project

2、reference -> FirebirdSql.Data.FirebirdClient.dll
a、copy local -> false
b、get full path [copy]
c、right click on Application1 -> add -> Existing item -> use b. path -> chooses file type dll -> find FirebirdSql.Data.FirebirdClient.dll  add
f、click reference -> FirebirdSql.Data.FirebirdClient.dll
Build Action -> Embedded Resource

3、open program.css
a、add using System.Reflection;
b、in main()  add
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
c、copy this all

private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
        {
            Assembly assembly = Assembly.GetExecutingAssembly();
            //Project_Namespace.Package_Namespace.dll
            //Project Namespace = TestProject
            //Package Namesapce = Newtonsoft.Json
            using (var stream = assembly.GetManifestResourceStream("FirebirdSql.Data.FirebirdClient.dll"))
            {
                byte[] buffer = new byte[stream.Length];
                stream.Read(buffer, 0, buffer.Length);
                stream.Flush();
                stream.Close();
                return Assembly.Load(buffer);
            }
        }

now run application for release, and see WindowsFormsApplication1\bin\Release
have .exe file, try to run.


======reference=====
http://ponyoth.hateblo.jp/entry/2015/07/28/072718

http://stackoverflow.com/questions/26179554/unable-to-access-embedded-firebird-database-server-with-net-client

http://www.sukitech.com/64/c-wpf-windows-form%EF%BC%8C%E5%B0%87dll%E5%8C%85%E9%80%B2exe%E5%9F%B7%E8%A1%8C%E6%AA%94%EF%BC%8C%E8%A3%BD%E4%BD%9C%E5%96%AE%E4%B8%80%E5%9F%B7%E8%A1%8C%E5%85%8D%E5%AE%89%E8%A3%9D%E6%87%89%E7%94%A8/

http://cyfangnotepad.blogspot.tw/2015/10/cnet-dllexe.html

https://support.microsoft.com/en-us/kb/319292#bookmark-5


allpay 歐付寶 模擬付款

官方說的有夠爛,底下是模擬的方式:

請先登入 官方模擬後台,請查詢官方連結、帳密。

有分兩個部份:
一、是訂單成不成立
二、模擬付款

這兩個分開測的,不是連在一起的,一開始以為是連在一起的。


一、訂單成不成立:在後台->一般訂單查詢->全方位金流訂單(AIO)
如果你是購物車發出訂單,這裡面得到,那就是訂單有成立了,但這樣的模擬付款是不行用的。

二、模擬付款:要能用請,到後台->系統開發管理->模擬交易
利用這個功能開出來的訂單才能進行模擬交易。



所以整個開發測試,請分開測試:

一、先測訂單成不成立,成立後,就沒問題。

二、這時候主力是測 ReturnURL這支程式,模擬付款後,呼叫此程式來進行DB處理,可能成功或失敗。

模擬交易開立的訂單會有輸入MerchantTradeNO,這是自己系統的單號,那在AIO進行模擬時,會(可以)重覆這個MerchantTradeNO模擬付款,建議就直接把DB內的TradeNO改掉,這樣按下模擬付款。

按下模擬付款,兩個部份要處理:A、有真的連到ReturnURL?B、DB有把資料寫進去嗎?

A、ReturnURL 看不到有沒有呼叫到?很簡單,再程式最前面,直接呼叫DB寫入某個欄位,如果有寫入,就那至少知道有呼叫到這支程式。

B、DB寫的不完整,或是欄位有Error等等,反正就是沒寫進去,很簡單,把error_code寫到DB某欄位,這樣也知道錯誤訊息是什麼。

以上大概是歐付寶 模擬、測試方式。


PS:模擬付款成功,很多對應欄位資料是無值的

htm5 form javascript validation

http://www.sitepoint.com/html5-forms-javascript-constraint-validation-api/

1. progressive enhancement: http://jsfiddle.net/trixta/ru7...
http://jsfiddle.net/trixta/ru7jt/


http://stackoverflow.com/questions/12470622/how-can-i-check-the-validity-of-an-html5-form-that-does-not-contain-a-submit-but

form.checkValidity()


https://html.spec.whatwg.org/multipage/forms.html#dom-form-checkvalidity
https://html.spec.whatwg.org/multipage/forms.html#statically-validate-the-constraints

=====
var form = document.getElementById("purchaser_form");
form.noValidate = true;
form.onsubmit = validateForm;

// set handler to validate the form
// onsubmit used for easier cross-browser compatibility
function validateForm(event) {
    if (form.checkValidity()) {
        return true;
    } else {
        field = form.querySelector('input:invalid, select:invalid, textarea:invalid');
        field.focus();
        if (field.checkValidity()) {
            removeInvalid(field);
        } else {
            setInvalid(field);
        }

        return false;
    }
}

function setInvalid(element) {
    var message;
    var parent = element.parentNode;

    if (!parent.classList.contains('has-error')) {
        message = document.createElement('div');
        message.className = 'help-block';
        message.innerHTML = element.validationMessage;
        parent.classList.add('has-error');
        parent.appendChild(message);
    } else {
        parent.querySelector('.help-block').innerHTML = element.validationMessage;
    }
}

function removeInvalid(element) {
    var parent = element.parentNode;
    if (parent.classList.contains('has-error')) {
        parent.classList.remove('has-error');
        parent.removeChild(parent.querySelector('.help-block'));
    }
}

php allpay 歐付寶

http://www.webteach.tw/?p=591

https://github.com/allpay/AllPayAioExample/blob/master/Allpay_AIO_CreateOrder.php