分類彙整:學習紀事

借貸法則之回顧..

拿FI來玩, FI就是Financial Accounting, 是外部會計,使用一般會計準則,能使企業法人出具法定財務報表,FI裡包括

GL: General Ledger (總帳會計): SAP系統的核心
AR: Accounts Receivable(應收管理): 債權,應收的錢,與SD銷售模組相關
AP: Accounts Payable (應付管理): 應付的錢,是一種債務,與MM採購模組相關
AA: Asset Accounting (固定資產管理): 與會計相關的就是折舊
SL: Special Purpose Ledger(特殊目的總帳): 適用跨國公司,依不同國家適用不同國家的會計準則

玩起FI,就不得不回頭看看會計,會計裡記帳最基礎就是借貸法則!!

會計紀錄中記載著每一科目增減的帳簿,稱為分類帳(Ledger),在分類帳中,每一個科目有一個帳戶(Account),用來記載該科目的增減,這種帳戶形式與英文字母”T”字非常相似,所以一般稱為T字帳(T Account),T字帳有三個部份,(1)帳戶名稱或會計科目,如現金,應收帳款等,(2)借方(debit side),就是帳戶的左方,(3)貸方(credit side),就是帳戶的右方!!

第一次看,會以為借與貸是一般借貸之意嗎?其實不是,沒有任何意義!!

借貸兩方,代表著會計科目的增減,但不是所有會計科目增減都在同一方向!!有些科目的增加在借方,但有些則記在貸方,減少也一樣!!所以,那些科目的增加或減少,應記在借方或貸方的規則,就稱為借貸法則!!

借貸法則,是初學會計者最感困惑的!!其實只要記住會計方程式就可以瞭解如何借貸,因為借貸法則是由會計方程式延伸而來!!如

(+)資產=(+)負債+(+)業主權益

凡增加記入一方時,減少必定記在另一方,所以當資產增加時,資產的增加應計入帳戶的借方,減少則在貸方;負債及業主權益在方程式右方,所以負債及業主權益的增加則計入貸方(右方),減少則記在減方

收入及費用則是與業主權益有關的帳戶,如將收入及費用套入會計方程式則為

資產=負債+(資本+收入-費用)

收入增加使業主權益增加,所以收入的記載與業主權益記載法則相同,增加記在貸方,減少記在借方; 費用使得業主權益減少,所以費用的記載與業主權益的記載相反,增加記入借方,減少記入貸方!!

如下表

作文應該怎麼寫好呢?

馬上就要月考的LUCY,那天在接送的途中,在車上問了我這個問題,作文應該怎麼寫好呢?

 

這個問題問到我,不能說問對人了,至少為父的當年也曾參加作文比賽,也曾拿過名次!!更何況還是文學院畢業的!!只是從來不務正業,搞了資訊多年,滿腦筋除了資訊電腦網路,就再也擠不出別的東西來,只能隨口擠出注意起承轉合吧!!

 

這真是一個很爛的答案,我想,99.99的人都會這麼回答!!

 

其實,作文沒有別的,就是加強閱讀,提昇修辭能力,加強思考,如能將有所省思的部份,切合主題好好發揮,配合起承轉合,或許就能寫出好文章吧~~只是這或許是八股教育下所期待的結果吧??

 

究竟老師們是如何評分的呢? 不了解則已,一了解倒還頗令我驚訝的!! 原來作文堪比第六主科,比序還排在最前面,我也不知我看到的是否最新訊息? 因為教改不是改來改去?改得大家暈頭轉向嗎?也造成我本來一點都沒有興趣研究!!我還常想,現在做工都比坐辦公室領得多了,讀書到底有什麼用呢?就出了一堆只會出嘴巴的廢材,尤其是一堆爛政客,不就這種教育制度教育出來的嗎? 好吧,我又開始抱怨了,還是回到主題,在這個社會下競爭,還是得知道那些閱卷老師在想什麼? 只能投其所好,不然又能奈何?

 

原來分成內容架構,掌握能力及表達能力等三大項,如圖!! 至少可以提供更細部的藍圖去思考如何獲取好的分數!?

 

作文閱卷標準

 

原影片在YOUTUBE,

 

極簡生活的追求

 

芬蘭的一間小屋,只有九平方公尺,完全自建,室內維持極簡的最低需求!!感覺可以在那裡修行了!!

近來整理家中的物品,發現有很多不必要的浪費,偏有些東西,沒過多久,卻沒什麼價值了,想轉賣都懶,比如手機!!電腦方面,筆電PC那更是不用多說,現在的價值都不高!!比如當年2004年買的華碩筆電,當時買了46500,我連發票還留著,雖然還能用,但超慢,想賣,可能1000都沒人要,留著當古董還得保證它不會壞,那天我就發現一台2000年的華碩筆電,S8200,已經榮登極樂,或許是記憶体壞了,因為開機時一直狂叫,電源鈕按了仍有反應,那台是PIII。那台M5N的效能,後來可能比華碩2007年出品的EEEPC筆電還慢!!3C產品永遠就是這個宿命.早年硬体速度慢,也沒所謂虛擬化,所以架LAB,機器需求挺多,或許是時代需求背景不同,只能這樣安慰自己,而現在面對這些3C垃圾,開機都嫌它浪費電!!

所以現在開始追求的是極簡生活的修行!!雖然要對付萬惡的資本主義消費型態,還有待努力!!不過,對於一位提早退休的人士,這也是必須加以面對的景況!!

七年級數學–指數律

不知道是遺傳使然,抑或是何如? LUCY近日小考的成績,不僅她本人擔憂,也著實讓我害怕了起來,於是乎,開始搜尋網上的輔助資源教學!!
比起我們那個年代,坦白說,現在的小孩很幸福,只要願意的話,應該都能立刻上網找到有幫助的資源!!
LUCY出的亂子,主要在這一個小節!! 仔細看了做錯的考卷,突然發現,基本的沒有問題,但一到換算時,LUCY似乎不太理解必須換成同底來套指數律的公式,

比如說這個題目,如圖,範例題目-指數律, LUCY會不知都換成以2為底的部分再來套用指數律!!指數律公式如下圖,

指數律公式圖
其實,我感覺LUCY的狀況,就像剛上大聯盟的菜鳥投手一樣,心理上的素質不夠堅強吧,總是太過緊張害怕了,甚至有的題目本來寫對,又懷疑自己,又寫成錯的答案;有的題目還錯得離譜,比如3的五次方連加三次,是三的幾次方,她竟然選了125次方,我說,你怎麼選了一個距離最遙遠又最不可能的答案呢?
其實,她真的不是不會,就是特別抗拒這個科目而已,不知我能對她起到多麼大的幫助,只能盡力而為!!
找了一些YOUTUBE的免費教學,就屬這個,我覺得比較深入一點,其它都太基本,沒什麼变化!!經過昨天的小小惡補,今天好像就考得好很多了!!LUCY也開心得笑了!!

對於我來說,初中,也離我太遠了,重新學學也好,看會不會以後比較不會得老年癡呆症!!

 

 

 

 

如何設定MYSQL資料庫複製(How To setup MYSQL Replication)

最近,我所設立的BLOG,在測試及正式環境下,都得手動同步資料,挺麻煩的
Recently, it’s really troublesome to sync the data between testing and production server.

於是想起MYSQL的資料庫複製功能
it made me think about MYSQL REPLICATION.

我的正式環境為LINUX FEDORA OS, MYSQL為5.5.20版,測試環境為WINDOWS 7, MYSQL則為WAMP裡的5.5.16版本.不過經過測試,一樣可以同步資料
My production environment is running on the LINUX FEDORA OS, and MYSQL version number is 5.5.20, testing environment is windows 7 and mysql is 5.5.16, although it’s different OS and MYSQL version, it still can be replicated between each other.

說真的設定也沒有很難
Actually, the setting is not very difficult.

但在設定的過程中也不是沒有遇到困難,提醒
Despite it’s easy, still need to remind something as below, those were what i encountered.

1.注意權限(SLAVE機台要有連入MASTER主機的權限): 我一開始一直卡在這裡,後來才發現我手殘設錯一個小數點,我原來要192.168.1.0/24都能開放權限,應設192.168.1.但我少加了小數點,後來直接把IP也加上,縮小點也算安全一點,才使同步的錯誤解除

1. notice the access right(slave mysql need to have the access right to reach the master one): at the beginning I did not notice about this, when I was trying to enable the access right to 192.168.1.0/24, I lost a decimal dot behind 192.168.1. when i found this mistake, just add the specific ip address on it, it also meet the security principle in the network world. after completing this, I just resolve this problem.

2.注意語法: 我曾還到CHANGE MASTER那一段指令,有一個單括號漏了,結果那些設定出了點問題,我也花了點時間確認
但總計來看,MYSQL的資料庫複製功能好用又不太難設定.

2. notice the setting of CHANGE MASTER section, I lost a single brackets,and then i encountered the trouble again, and also take me for a while to confirm about this. anyway, MYSQL REPLICATION is a good function and also easy for setting.

主要參考自以下連結內的文章介紹
mainly refer to the paper URL as below.
http://www.hackosis.com/how-to-setup-mysql-replication/

MySQL is the relational database system of choice for open sourcers. Replication is the process of replicating data from one MySQL database server (the master) into another (the slave). We?ll go into why you would want to replicate a MySQL database in another article.

MySQL Replication

Using the master-slave configuration mentioned above, only the changes made to the master are replicated in the slave. Changes made to the slave do not affect the master.

If you follow the steps below, you can set up MySQL replication in a matter of minutes.

Open the my.cnf or my.ini file (depending on whether you are running Linux or Windows).
Type in the following, somewhere below ?[mysqld]?

log-bin=mysql-bin
server-id=1
innodb_flush_log_at_trx_commit=1
sync_binlog=1
Restart MySQL on the master server.
Create a new user on the master server with the ?REPLICATION SLAVE? privelege. You don?t need to assign any other priveleges to this user. In the following commands, replace X.X.X.X with the IP address of the slave server.

CREATE USER ?user?@ ?X.X.X.X? IDENTIFIED BY ?password?;
GRANT REPLICATION SLAVE ON *.* TO ?user?@’X.X.X.X? IDENTIFIED BY ?password?;
Execute ?FLUSH TABLES WITH READ LOCK;? on the master to prevent writing to the databases.
Execute ?SHOW MASTER STATUS;? on the master and note down the values because we?ll use these later.
Execute ?UNLOCK TABLES;? on the master.
Open the my.cnf or my.ini on the slave server.
Enter somewhere below ?[mysqld]? on the slave server:

server-id=2
Save the file and restart mysqld.
Execute the following on the slave server (adjust values according to user setup in step 4 and values retrieved from step 6):

CHANGE MASTER TO
MASTER_HOST=?X.X.X.X?,
MASTER_USER=?user?,
MASTER_PASSWORD=?password?,
MASTER_PORT=3306,
MASTER_LOG_FILE=?mysql-bin.000001?,
MASTER_LOG_POS=98,
MASTER_CONNECT_RETRY=10;
Execute the following on the slave server:

START SLAVE;
Check the mysql log on the slave to ensure that the connection to the master has been successful. You should see a line similar to the following:
091104 8:42:02 [Note] Slave I/O thread: connected to master ?root@X.X.X.X:3306?, replication started in log ?mysql-bin.000001? at position 98
Now you should have successfully configured master-slave MySQL replication.

Something you might want to consider is limiting the binary log files retentions with the expire_logs_days on the master, otherwise the replicated date will just grow and grow.

如何在LINUX APACHE中設定虛擬主機(How to setup the virtual web server in Linux APACHE)

上一篇介紹了如何在WAMP中設定虛擬網站/主機,現在介紹在LINUX中如何設定?
Last post I demo how to setup the virtual servers in WAMP, now give the example for LINUX APACHE.

在LINUX中的設定,我想應該比WAMP容易些,只要更新一個檔案即可.
It’s easier than WAMP, I think, only one configuration file needs to be updated.

請編輯在/etc/httpd/conf下的httpd.conf,並將以下的設定更新到該檔下.(如圖)
please edit your httpd.conf where located at /etc/httpd/conf, and updated some configuration as below (as screenshot)

最後建議您更新/etc/下的hosts檔案
and the last step I will suggest is to update your hosts file where is located at /etc directory.

在虛擬主機的架構下,APACHE是靠完整的網域名稱解析來決定要如何導下內部設定的那一個虛擬主機.以這個例子而言,我的BLOG完整網域名稱為blog.urcloud.biz,當USER在瀏覽器輸入FQDN時,APACHE即以此為依據去尋找在httpd.conf中virtualhost裡設定的SERVERNAME來對應,如果找到了,就將您引導到適當的首頁.所以,在virtualhostL裡設定正確的servername是非常重要的.你也必須確認在DNS中的設定也是正確的.
in such architecture, apache will identify your FQDN to decide which virtual web site will be redirected. for this example, my domain name of BLOG is blog.urcloud.biz, when you guys input the FQDN on your browser, and then apache will search for the setting of virtual server in httpd.conf, and then forward to the right index page for clients. so, it’s very important when you set up a servername in your virtualhost setting of httpd.conf, you also need to make sure it can be correctly work fine on your DNS setting.

簡言之,此例,假設未在DNS設定正確的FQDN,使用者將無法找到虛擬站台.所以如果你的作業平台為LINUX請試著用nslookup或dig指令,如是WINDOWS,請用nslookup試著查看看,你設定servername是否有正確的解譯名稱.
in short, in this case, if you did not set up a right FQDN on your DNS server, users will not find your virtual web site. to make sure your dns setting is ok, please try to nslookup or dig in your linux or using nslookup in your windows OS.

WAMP 虛擬主機設定 (How to set up virtual web server on WAMP)

My testing BLOG web site installed on win7 platform, also function as backup site.
我的BLOG在WIN7工作站上,還架了一個測試站台,另有備份功能

I installed WAMP on win7, but production server was installed on LINUX. It’s no impact on the BLOG service I provided between each other.
WIN7上裝的是WAMP, 但BLOG是架在LINUX上的,但這其實沒有什麼影響

To edit the file of httpd-vhosts.conf in the directory of C:wampbinapacheApache2.2.21confextra
在目錄C:wampbinapacheApache2.2.21confextra下,編輯httpd-vhosts.conf

< VirtualHost *:80 >
ServerAdmin webmaster@urcloud.biz
DocumentRoot “c:/vhosts/blog”
ServerName blog.urcloud.biz
ErrorLog “logs/blog.urcloud.biz-error.log”
CustomLog “logs/blog.urcloud.biz-access.log” common
< /VirtualHost >

< VirtualHost *:80>
ServerAdmin webmaster@urcloud.biz
DocumentRoot “E:/LAB/phpcs5”
ServerName phpcs5
ErrorLog “logs/phpcs5-error.log”
CustomLog “logs/phpcs5-access.log” common
< /VirtualHost>

APACHE上(httpd.conf)
增加虛擬目錄的實體路徑上去
after completing the setting as above, you need to add the physical directory of virtual host on the configuration file of APACHE (httpd.conf)

< Directory C:/vhosts>
Order Deny,Allow
Allow from all
< /Directory>

< Directory "e:/lab/phpcs5">
Order Deny,Allow
Allow from all
< /Directory>

And then, remember to enable the setting of virtual server on APACHE.
把虛擬主機的設定打開
# Virtual hosts
Include conf/extra/httpd-vhosts.conf <---把#號刪除掉 (to delete the #) It's done, very simple. 大致上這樣,就能把虛擬主機的設定搞定囉..很簡單

LINUX備份遇到的問題

最近,為了將LAB備份好,決定用LINUX裡的DUMP指令,DUMP一份到我另一台WINDOWS 7裡的分享資料夾

於是我在我的WIN7工作站,用我剛買的3TB硬碟(外接在USB 3.0上)來做為備份硬碟,於是我啟動檔案共享

然後在LINUX裡輸入以下指令

mount.cifs -o username=your_username,password=your_password,uid=your_uid,gid=your_gid //win7_ipaddress(ex:192.168.1.1)/shared_directory /mnt/backup

(如果要使用以上指令,要替換成你自己的設定)

做完以上指令後,在LINUX,閱覽MOUNT起的目錄沒有問題…

接著問題發生在備份執行後,因DUMP指令是將一大堆檔案及目錄備份成一個副檔名dump的大檔案,只要檔案太大,接著便發生DUMP指令卡在最後完成100%,無去回到console,就hang在那裡,如果開另一個console連入,去閱覽那掛載的目錄就會出現以下的錯誤:

mount error(12): Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

接著我找到兩篇文章,連結如下:


照著以上編修win7 registry(機碼)後,似乎稍有改善,但仍時不時會出現一樣的錯誤…

但在重啟 LanmanServer服務(net stop lanmanserver)後,立刻dump可以執行完畢…

這個問題雖未全解,我只能先做完備份,改天再追蹤…(也有可能老花機碼又看錯,回家再檢查一次好了)