show code js

2013年10月4日 星期五

produce quality monitor

When we have data from produce management system that we can online monitor change of producing quality.



The blue circle on the picture, that we can online to find out process of production happen change from produce management system.



We can know in process of production at all day, that produce how many quality level final products.
And we can to do an improving action online or design a fix plan on next time, to update our produce quality, and sure it will not happen again.


2013年10月2日 星期三

Small ERP part3 - SQC quality control x chart

We can get those optics data after the product run optics workstation.
In accordance with specification of PMC produce plan, we can make x chart and r chart of SQC quality control chart.



Watch those data can find out our process capability and better our process work.
Watch out our process power, better our product Manufacturing will quality stability.
And can find out those error from people, machine, materials or method what is we need better control them.


2013年10月1日 星期二

Business wireless private cloud system

Create a all wireless environment for business company.
When all of employee can use mobile devices finish job by himself.
Those jobs like pc operation, check list, ERP, IP Camera system, printer, storage, IP-PBX ... more than more.

No any line to use and cost, and very easy move or change or expansion to any architecture in the future.

Easy control, maintain, config and use, you will not see any line inside your company.

Moving anywhere and use or get this IT service is very easy things.


Small ERP part2 - Decide optics level of final product

Previous post of part, I create two type workstation.
One optics(Data) workstation will do this job.
This a specifica create by quality department before get approve by manager.
The optics workstation will online to get this specification from system. see as the picture.


Well, optics workstation will get this specification from produce plan.
When PMC get a order from sales department, that they must sent demand for raw materials and supplies to other department to support.
Then PMC will reply delivery time back to sales department and create produce plan convert from this order.
Produce plan data flow into system, go next workstation when they finish job, keep this action when product go to optics workstation.
Optics workstation just get this plan to choose that can use specifications to check those products.
After check, those products will get a new level from both normal quality and optics quality, and those products become to half products.

2013年9月26日 星期四

php odbc ready


example use access file mdb.

1.create a access file format mdb
(1)open this mdb and create some table and row data(type;table)
(2)set the IUSR read of permission for this mdb file on windows operation system
2.open \Windows\SysWOW64\odbcad32.exe
(1)click system data source of tag
(2)click new
(3)choose Microsoft Access Driver (*.mdb) before click done
(4)set data source name
(5)database file choose your access.mdb
(6)click advance and set account and password
(7)click option and set your config
3.use php odbc function

2013年9月17日 星期二

install pear to php on windows system


  1. Install pear in php on windows
  2. Download http://pear.php.net/go-pear.phar
  3. goto php directory
  4. open cmd and run php go-pear.phar to start installing pear module
  5. when it is done you can find PEAR_ENV.reg and double click it.
  6. it will change php.ini when it is done to restart your web server.
  7. Test pear, create and run php file, it will show bool(true)
  • <?php
  • require_once 'System.php';
  • var_dump(class_exists('System', false));
  • ?>
  1. If you want to install module of pear, you can open cmd and goto php directory, run pear install module_name.
  2. ex: pear install MDB2
  3. Test MDB2 module, create and run php file, it will show bool(true)
  • <?php
  • ini_set('include_path','c:\php\pear');
  • require_once 'MDB2.php';
  • var_dump(class_exists('MDB2', false));
  • ?>


2013年9月14日 星期六

SMALL ERP PART1 - Production and Quality Management System

in 2006 year, I had programming a small production management system, it includes produce line management, PMC management, Process management and multi-language. let an manually factory to be automation. The manager can constantly to get newest information from factory, produce information and quality information.
They can continuous development and adaptation of policies and decision-making.

This is a general workstation of type, and it main job is record the production and NG information. Them will show on the control management panel.
Inside this GUI, we make a anti-error control to create right data.


For the second workstation of type, the product will merge manufacturer number(barcode) and optics data (from optical apparatus) in this workstation and it will become a end product before.
And it had an important mission. It guide a product manufacture specification that use it to check optics data and set an quality level for this product.
After, this product will to go to final visual inspection of workstation to decide view level.
Both optics and view level to decide end product final level of quality.



Well, we can see both production and quality information in system panel anytime. let us full control and management this factory to be best.

After end producing, we have second work must to do.
More defective products must to be analytics. if we have no any data, we can not do this job. if we can not, those will add more cost on our operating, and we can not to control quality of production, and our customers maybe feeback more problem to us and we can not find out any troubleshooting.



More important, we can to formulate a right action to control or find out the problem.


Warehouse Management System Part2 料件管理

庫存的管理,採用購物車的方式,讓來領用的人員,不論是生手或熟手,都可以按圖辨識是否他需要的料件。
點擊料件後,可以詳細的看更大的圖片及料件的資訊,依下圖的資訊可以知道,此料件由系統來依照>系統庫存量決策>料件安全存量+領用量+交期+重要性,來決定購買時機、購買量及交期。
當料件低於安全存量的%(x整體庫存策略%)之多少時會由系統採用觸發方式計算出要購買的量及交期,另會增加近期領用情況,若有大幅領用時,會增加購量,反之則減少購量。
最後配合重要性是否必買及交期的長久,是否要多買或少買及指定的交期日是那一天。
使用公式約略如: 購買決策 * (購買量 > 單筆採購最低量) = 料件安全庫存量 * 整體庫存策略 * 領用率(領用量 / 安全庫存量)
當然還有其他資訊參考,如上次盤點時間、系統CHECK時間、修改時間、上次購買的日期與數量,以及使用在那些設備上。

並且使用購物車的方式讓USER快速的選擇他要使用的零件,結算時就產成領料列表,完成領用後就進行扣帳及記錄。
並且列出各主類別的料件,可以快速的知道有那些料件,也可以知道1廠庫存量及2廠或另外其他廠的庫存量,以便調料,達到料件料號整合,不致於有同料多號、同料不同廠庫存的情況,有效的降低料件庫存及週轉率。

部份的料件是可以循環或再生使用、維修使用,這樣的料件就進入維修管理系統中,管制每料號的庫存品進出廠維修的情況,讓該料號的庫存可以同品出同品進,防止該品項被調換,進而可以計算出維修次數及分析(應用於異常維修,可能是其他原因造成設備連續或同情況損壞,或是評估該件品已達維修次數不堪再維修使用,應改買新品使用,或是維修費用超過該品件的1/2應進行報廢等等,還有保固的分析,可以節省大量的維修費用),追蹤每件料件出廠維修的時間、維修的內容、費用的申請核鎖及回廠的時間,並將這些資訊應用在分析上進而提供決策用。

庫存的料件,除了維修便還有借用情況,管制調借的流程及資訊,避免借出後即成為呆帳。

料件經分析後不再有維修的價值,即進行報廢的處理,並予以記錄,有效管制報廢品。

另外,還寫了儲位管理,透過建立料件時所給的尺寸、及數量,在已建立的儲位資料中,系統可以告知這樣的料件及量可以自動配置暨有的空儲位,不用人工去找去搜尋,並且按儲位表去調出每個位置的料件資訊,可應用在大型的庫儲品,不用跑到儲位上去看是什麼料件有多少量或是什麼樣子,除了熟手可以更快取得儲位內的料件資訊外,更易於新手取得這樣的資訊。



2013年9月13日 星期五

Warehouse Management System Part1-庫存盤點

為了提昇盤點的速度、準確度及帳目管理,當時購置了一台約一萬五至二萬左右的離線盤點機,機器可以提供電子檔下載及上傳。



上傳後可以利用盤點機掃描Barcode或輸入料號後,進行手動或連續盤點,手動就是沒有條碼時輸入料號,自動就是掃描條碼,然後輸入庫存量,待所有料件清點完後即可將儲存在盤點機的資料下載,再透過程式進行帳目校對,比對差異或列出帳目。


將盤點好的資料由盤點機下載後開始進行帳目校對,當然可以應用在差異比對、或任何的應用上,但主要對庫存盤點工作進行改善,三千多項三萬多件可以在單人只花二小時盤點完成,並獨立完成帳目差異比對及庫存帳目核對,大幅提昇工作效率並可提昇精確度。


校對帳目完成後,當然是要輸出總帳冊進行結算囉。這樣的功能大約是2005年時就撰寫的,用以應付資本額超過十億的電子工廠全廠設備料件的庫存盤存管理。

phpbb3 with ldap

We want to use Windows Server 2012 Active Directory Service be user data in phpbb3, let employee login with AD account & password.

More information from internet by google, but I use inside tool from system.
You can find ADSI editor in system tool folder, let you know how to get them.

Important:just a account use in system to find out account list, when this profile of account has not set some parameters, phpbb3 will feeback can not find this parameter and let ldap config to save with fail

Just record config:

LDAP SERVER: ldap://your_server (AD Server)
LDAP PORT: 389 (or 3268)
LDAP BASE DN: DC=your_domain,DC=local
LDAP uid: sAMAccountName
LDAP Filter:
LDAP email parameter:mail
LDAP user account:CN=Administrator,CN=Users,DC=your_domain,DC=local
LDAP password: keyin password of "LDAP user account"

HP Server with Windows Server 2012 part1

今年組了一台新的HP Server DL360p Gen8,配有雙CPU共12核心、8GB RAM ECC/REG、二顆SAS 300GB HDD作Raid1及8顆風扇。
與已往不同的是,HP不在使用SmartCD,前導程式已經燒錄在ROM裡面,唯一美中不足的是出廠若沒有更新,就得要自已更新並有網際網路服務,但也是可以先下載再更新。

這台另配有很棒的功能iLO不過是一般授權,在使用RDP時只有限定的時間。網路介面共有4個含iLO共5個,另配有雙PS可負載平衡或併用。

話說回來,導引程式必須先進行更新,然後才可以進行驅動程式更新,否則預設的導引程式無法安裝最新的Windows Server 2012,而這版開始的2012似乎不在有R2這個後續版本,因為常見的DFS服務已直接內建在這個版本裡面。


當然,新裝機後要進行一連串的測試,進入ID即可進行全機測試,測試後發現在吵音方面HP改善不少,以往風扇全開的吵雜聲變低了很多。



測試完畢後就開始進行導引、驅動的更新,以便抓到HDD並進行RAID配置。順序不可以錯誤,最好網路要穩定否則最好直接到HP網站下載並燒錄成CD來安裝。


待續......


2013年9月5日 星期四

台彩樂透小程式

機器出的都不是很滿意,只好自已操刀了

---------------------------------------------------------------------------------

威力彩(第二區)小全餐

http://www.hiboheaven.com/lottery.php

A:第2區第1~6注為1~38號隨機不重覆
B:第2區第7注為前6注所剩2個號碼再搭1~38號隨機不重覆4個號碼
C:第2區第8注為1~38號隨機不重覆
D:本程式僅供娛樂用途,無法影響中獎率及未提供任何獎金。
E:本程式僅個人開發娛樂用途,與台灣彩券無任何關係。
F:本站將不對此程式負任何責任,禁止非法、惡意使用。
G:若發生任何事件,本站得隨時終止本程式。
H:投訴請寄 service{at}hiboheaven{dot}com

---------------------------------------------------------------------------------

大樂透小全餐

http://www.hiboheaven.com/lottery2.php

A:第1~8注為1~49號隨機不重覆
B:第9注為前8注所剩1個號碼再搭1~49號隨機不重覆5個號碼
C:第10注為1~49號隨機不重覆
D:本程式僅供娛樂用途,無法影響中獎率及未提供任何獎金。
E:本程式僅個人開發娛樂用途,與台灣彩券無任何關係。
F:本站將不對此程式負任何責任,禁止非法、惡意使用。
G:若發生任何事件,本站得隨時終止本程式。
H:投訴請寄 service{at}hiboheaven{dot}com

MySQL優化PartII加速及防死機

show VARIABLES like '%max_connect_errors%';
set global max_connect_errors = 1844674407370954751;

show VARIABLES like '%connect_timeout%';
set global connect_timeout = 60;

show VARIABLES like '%skip_name_resolve%';
[mysqld]
skip-name-resolve
;此項若是設定後將無法使用domain指定主機,必須以ip指定主機位置,且只能於ini或cnf中設定無法直接修改,修改後請重新啟動MySQL,請留意
;留意事項(1)增加為ip的登入帳號(2)連結mysql的字串使用domain的均改為ip

show VARIABLES like '%slave_net_timeout%';
set global slave_net_timeout = 30;

show VARIABLES like '%net_read_timeout%';
set global net_read_timeout = 60;

show VARIABLES like '%net_write_timeout%';
set global net_write_timeout = 120;

2013年8月8日 星期四

MYSQL5.x 優化

MYSQL5.x 優化

另外若在連結、讀取及寫入的時間需要加長,則自行決定timeout參數的值
其他可以參考以下作法,適用x86/x64 1~2Core 4G RAM的SERVER

show VARIABLES like '%max_allowed_packet%';
set global max_allowed_packet = 1*1024*1024*1024;

show VARIABLES like '%key_buffer_size%';
set global key_buffer_size = 1*1024*1024*1024;

show VARIABLES like '%table_open_cache%';
set global table_open_cache = 1*512;

show VARIABLES like '%back_log%';
set global back_log = 1*100;

show VARIABLES like '%interactive_timeout%';
set global interactive_timeout = 1*7200;

show VARIABLES like '%read_buffer_size%';
set global read_buffer_size = 1*256*1024;

show VARIABLES like '%join_buffer_size%';
set global join_buffer_size = 1*1024*1024;

show VARIABLES like '%net_buffer_length%';
set global net_buffer_length = 1*32*1024;

show VARIABLES like '%preload_buffer_size%';
set global preload_buffer_size = 1*64*1024;

show VARIABLES like '%sort_buffer_size%';
set global sort_buffer_size = 1*512*1024;

show VARIABLES like '%thread_cache_size%';
set global thread_cache_size = 1*256;

show VARIABLES like '%table_definition_cache%';
set global table_definition_cache = 1*1000;

show VARIABLES like '%query_cache_size%';
set global query_cache_size = 1*128*1024*1204;

show VARIABLES like '%myisam_sort_buffer_size%';
set global myisam_sort_buffer_size = 1*512*1024*1024;

show VARIABLES like '%max_heap_table_size%';
set global max_heap_table_size = 1*32*1024*1024;
set global max_heap_table_size = 1*64*1024*1024;

2013年7月19日 星期五

帶著你的LINE到世界各國下載貼圖去

  • LINE的重新安裝:
    • 請先進入LINE點擊右下角的其他,點擊上面中間的設定,再點擊我的帳號,設定一個MAIL綁定,密碼不用跟MAIL收信的一樣,如圖8。
    • 接著跳出LINE,直接刪除LINE,然後再APPLE STORE重新安裝。
    • 開啟LINE後使用綁定的EMAIL登入,記得不要作手機號碼驗證,否則會被限制只能下載台灣的圖,用VPN會失效沒用,如圖8沒作電話設定。
    • 若改用MAIL登入仍然要驗證,請驗證手機後,查看連絡人是否都回來了!!然後再重新砍掉LINE再用MAIL登入,記得一定要用MAIL登入,否則都會被限制只能在台灣下載圖。
  • 設定VPN的操作流程如附圖1~7.PNG
  • 伺服器的位置及IP如網址: http://just-cool.net/thread-2413-1-1.html
  • VPN的密碼如網址: http://www.flyvpn.com/freetrial
  • 加入iPhone & iPad 粉絲團,他會通知有新圖,或是自已常常VPN連到日本、泰國及越南比較常出新圖的國家
  • 補充說明:
    • 新增VPN時請使用PPTP協定並且一定要"傳送所有流量",在描述時增加VPNC或VPNU結尾是易於在列表時得知使用的是那一個帳號,好將對應的密碼填入。
    • 啟動VPN連線時,若VPN設定沒有填入密碼,則每次都會被要求輸入,作法一,可將項次4的密碼用複製的,要求密碼時用貼上的,作法二,可以進入設定檔將密碼填入,VPN連結時則不用密碼,每次都在新密碼取得後,先填入再連接較為方便,因為常常會撥不同,後面再說明此問題。
    • 項次3有列出很多國家,目前有圖可以下載的有中國、香港、印尼、日本、馬來西亞、菲律賓、新加坡、西班牙、泰國及越南,其他的可視自已的需求增加,這些VPN可將來出國時作跳板應用。
    • 項次4,每次的帳號密碼只有20分鐘有效,斷線後就會被限制在一定時間內不能再連,這樣的連接VPN是免費服務不收費用,但新圖發佈時就會常常塞車連不上,要有耐心或是等一、二天後再連接VPN下載圖。
  • 下載免費的圖有二處,一是活動,二要去查一下新圖的列表,有些免費的圖不會列在活動區。

  • 圖一

    圖二

    圖三

    圖四

    圖五

    圖六

    圖七

    圖八

    2013年5月23日 星期四

    git use share with dropbox



    Server:
    1.get dropbox account and download & install dropbox
    2.download and install git
    3.goto dropbox website
    (A)create a new_project.git
    (B)right click this folder and click share with (not use link)
    4.goto dropbox folder on computer
    (A)cd ~/Dropbox/
    (B)cd new_project.git and command:git init --bare [to format]

    Client:
    1.Config

    (A)git config --global user.name "your name"
    (B)git config --global user.email youremail


    2.New project
    (A)mkdir your project
    (B)cd project
    (C)git init
    (D)git remote add origin ~/Dropbox/project/myproj.git

    3.create a project from server
    (A)git init or git clone ~/Dropbox/project/myproj.git [to format and get code from git server]
    (B)git remote add origin ~/Dropbox/project/myproj.git

    Upload:
    1.add new document to git server
    (A)git add filename.xxx
    (B)git commit {-a} -m "Add a filename.xxx"
    (C)first time:git push origin master, next time:git push

    2.modify and update to git server
    (A)git commit -m "desc:modify"
    (B)first time:git push origin master, next time:git push

    Download
    1.update from git server
    (A)first time:git pull origin master, next time:git pull

    Add ignore:
    1.add a .gitignore in project root directory and set
    data/*
    xml/*.dat
    password.file

    See log:
    1.git log

    Mirror a new project :
    mkdir ../new_directory
    git archive master | tar -x -C ../new_directory

    2013年5月10日 星期五

    Windows Server 2012 Active Directory 取代 Windows Server 2008 Active Directory

    加入Windows Server 2008 AD陣列
    • 將DNS指向AD陣列
    • 變更電腦加入網域,成為成員伺服器
    • 新增ADDS角色
      • 開啟「新增角色及功能精靈」,點擊下一步
      • 選擇「角色型或功能型安裝」,點擊下一步
      • 伺服器選取項目中,點擊目前的伺服器,點擊下一步
      • 鉤選「Active Directory 網域服務(AD DS),會跳出對話盒,點擊新增功能,返回後再點擊下一步
      • 若還沒安裝Framework3.5,則視情況鉤選,點擊下一步
      • 確認安裝AD DS,點擊下一步
      • 「必要時自動重新啟動目地伺服器」可視需要自選是否需要在重新啟動時作通知,點擊安裝
      • 完成安裝後,檢視安裝進度說明,點擊「將此伺服器升級為網域控制站」,開啟對話盒,進行「部署設定」
    • 部署設定(DC2)
      • 選擇部署作業,選擇「將網域控制站新增至現有的網域」,點擊下一步
      • 網域控制站選項,分別鉤選「網域名稱系統(DNS)伺服器(O)」及「通用類別目錄(GC)(G)」,若需要將此網域控制站設為唯讀時,則鉤選「唯讀網域控制站(RDDC)(R)」。接著輸入目錄服務還原模式(DSRM)密碼,點擊下一步
        • DNS選項
          • 建立完後,在DC1建立並授權委派此網域控制站
          • 點擊下一步
      • 其他選項,點擊下一步
      • 路徑,點擊下一步
        • 準備選項,點擊下一步
      • 檢閱選項,點擊下一步
      • 先決條件檢查,點擊安裝,伺服器會在升級作業結束時自動重新開機
    • 轉移5+1角色
      • 先將DC1的DNS指向DC2的IP
      • 進入DC1的Active Directory網域服務,以右鍵點擊選擇變更網域控制站(連至DC2)
        • RID、PDC及基礎結構主機:
          • 以右鍵點擊自訂的網域名稱,在選單上點擊操作主機
          • 分別在RID、PDC及基礎結構主機標籤內,點擊變更,將主機DC1改為DC2
        • 通用類別目錄
          • Active Directory站台及服務
          • 一個Site 必須至少有一台GC(通用目錄)伺服器,將「Active Directory站台及服務」的「Sites」「Default-First-Site」「Servers」中DC2的的指定的PDC或DC的「NTDS Settings」的「內容」,將「通用類別目錄」鉤選起即可
      • 架構主機及網域命名主機:
        • 在DC1上點選開始>執行>regsvr32 schmmgmt
        • 在DC1上點選開始>執行>mmc
        • 點擊檔案>新增/移除崁入式管理元件,新增”Active Directory架構”及"Active Directory網域和信任關係"二個元件
        • 分別連至DC2並且變更主機至DC2
    • 確認複寫成功後,則可以開始將Windows Server 2008 DC1退役囉

    2013年3月15日 星期五

    CJ2M CPU33

    Usually use line connect to OMRON PLC when we get a plc.
    If it have include program and data will show error when we connect to it.
    You can re-create IO table let plc to be normal.

    But it not good, you can do it below.

    1. click "PLC" on tool bar
    2. click "Clear All Memory Areas"
    3. turn off power and turn on power one time
    4. now, you can re-create IO table