2012年12月5日 星期三

慈濟環保酵素

力行環保減碳工作不遺餘力,慈濟環保志工研發出環保酵素,將家裡不要的廚餘果皮,經過簡單處理,可變成有去污效果的環保酵素,用來清潔家理環境,減少化學清潔劑的使用,取之大地,用之大地,讓生活回歸簡樸自然與健康。


我在11/24DIY 製作了柳丁檸檬酵素,想用來洗碗、洗衣、洗髮、沐浴等等,因為這一年來深受皮膚過敏之苦,換了很多種市售的天然清潔劑,但是價格不便宜,得知慈濟環保酵素的製作方式後,我真的很想改變自己的生活方式,讓自己過的更簡單、健康的生活。下一步,想學著自己種菜,用自製的環保酵素當肥料、除蟲劑,種出真正有機健康的蔬菜來,那真的是一個可期待的人生了。



自製環保酵素非常簡單,以下提供您釀製材料、作法及使用方法。

(一) 材料和比率:

360g的黑糖、1080g 的果皮廚餘和3600cc的水。

1:3:10 的比率

(二) 作法:

1. 首先把水和黑糖依順時針方向攪勻後再放入新鮮的果皮葉菜廚餘,需留一些空間讓它發酵(10分之3的空間)。

2. 需讓黑糖水蓋過廚餘,把浮在液體上面的廚餘按下去,便其埋在液體中。

3. 必需發酵至少三個月,發酵愈久愈好,不會過期。在釀製過程中會產生臭氣,只需將容器蓋好。每天打開一次就會聞到芳香臭氧且幫助淨化空氣。

4. 酵素液體應該呈棕黃色,有橘子般的刺激氣味。

5. 如果液體呈現黑色,即是腐敗不成功了。

6. 如發現蒼蠅卵,不必擔心也不用對它進行處理。

7. 釀製完後的殘渣可以拿出曬乾,攪碎後埋在土裡作肥料,或者繼續放在缸底和下次的鮮廚餘再次釀製酵素。

8. 釀製好的環保酵素應置於陰涼通風的地方,不可放冰箱。

(三) 使用方法:

酵素加水稀釋後效果更優。

1. 酵素肥料:酵素1cc :水100cc

2. 酵素殺蟲劑(昆蟲):酵素1cc :水1000cc

3. 酵素空氣清新劑:酵素1cc :水200cc

4. 種植花草水果:酵素1cc :水500cc

5. 消毒用:酵素1cc :水500cc

6. 洗髮、沐浴、洗衣、洗碗用:酵素1cc :水10cc

7. 酵素除草劑:酵素2湯匙:水1000cc(須等45分鐘後才可以使用)

2008年11月20日 星期四

透過 Samba 伺服器分享目錄及印表機

透過 Samba 伺服器分享目錄及印表機
透過Samba server 可以讓你的Unix 與windows 系統 透過『網路上的芳鄰』,來分享資源,互傳資料,真的很方便, 最近是因為之前workstation 上接了一台SCSI的CDwriter 掛了, 透過Samba 真的很方便又經濟。

Linux 上Samba 伺服器的設定
* Linux IP : 192.168.1.10 , hostname : linux10
* Windows IP : 192.168.1.31, hostname : pc31
* 工作群組: CADhome
* 分享目錄, Linux10:/usr/local/cadhome
* User : subby

1. Modify /etc/lmhosts
%vi /etc/lmhosts
127.0.0.1 localhost
192.168.1.10 linux10
192.168.1.31 pc31

2. Samba 的設定--修改 smb.conf 設定檔
接著請在 /etc/samba/smb.conf 設定檔中, 如下修改:
[global]
Client code page = 950 ç可以看見中文!
Workgroup = CADhome ç 須與PC的工作群組相同
Security = user ç 必須設定samba user
Encrypt passwords = yes
Smb passwd file = /etc/samba/smbpasswd ç samba user password

[cadhome ] 以下是參考原先 /tmp 分享目錄設定值, 所自行加上的內容
comment = Share Dir 此分享目錄的註解說明
path = /usr/local/cadhome 指定分享的目錄為 /usr/local/cadhome
readonly = no 不具有"唯讀"屬性,表示可寫入此目錄,此行設定亦可寫為"writable = yes"
public = yes 指定公開此目錄


分享唯讀的目錄:
如果您希望分享的目錄只開放讓使用者讀取, 但不能寫入, 則請編輯 /etc/samba/smb.conf 設定檔, 並如下修改:
. . .
[download]
comment = Readonly Dir
path = /download
readonly = yes ← 將唯讀屬性設定為 "yes", 此行設定亦可寫為 "writable = no"
public = yes
. . .

3. 測試 smb.conf 的語法
%testparm
Load smb config files from /etc/samba/smb.conf
Processing section “[cadhome]”
4. 啟動 Samba 伺服器
存檔後, 請執行以下指令, 重新啟動 Samba 伺服器, 即可使用分享的目錄:
[root@smb samba]# /etc/rc.d/init.d/smb start ←使用"restart"參數,重新啟動Samba伺服器

啟動 Samba 伺服器或重新載入設定檔後, 即可看到分享的目錄:

5. 開始設定 User Password
% smbpasswd –a subby ← add samba user
Notes: 此user 要與你PC 所用的username 一樣.

6. 確認分享目錄的權限
分享可讀寫的目錄, 使用者存取 Samba 分享資源的權限, 由以下兩者共同決定:
1. 該檔案或目錄在 Linux 中的權限。
2. 該檔案或目錄在 Samba 設定檔中的設定值。

因此若想分享可供所有使用者讀、寫的目錄, 則必須在 Linux 下先開啟所有使用者對該目錄的讀、寫權限, 並在 Samba 伺服器的設定檔中, 將其設定為可讀寫。例如筆者現有 /upload 目錄, 想將之分享出來, 可依照下列步驟操作。

確認分享目錄的權限
請在修改設定檔之前, 先確認一般使用者對此目錄具有讀取、寫入及執行的權限:
[root@smb /]# ls - l
總計 168
. . .
drwxr-xrwx 2 root root 4096 2007-08-01 01 17:12 cadhome
一般使用者對此目錄的權限
. . .

Windows 查尋『網路上的芳鄰』:
7.設定使用者有不同權限的群組
除了限制可以讓所有使用者讀取或寫入以外, 有時某個目錄可能需要設定有些使用者可以寫入, 而其他使用者只有讀取權限。
要達到此需求並不難, 只要搭配 Linux 的群組權限及檔案權限即可做到。例如筆者想要分享 Samba 分享 secret 目錄, 並限制只有 wyw、ywwang、candy、tony 四人可進入, 其中 wyw 與 ywwang 具讀寫權限, candy 與 tony 僅有唯讀權限。

此時需如下新增兩個群組:
[root@smb ~]# groupadd flagadmin 新增一個名為 flagadmin 的群組
[root@smb ~]# groupadd flaguser 新增一個名為 flaguser 的群組

筆者將設定 flagadmin 為管理群組, 在此群組中的使用者可以讀寫 secret目錄, 而 flaguser 群組的使用者則只能讀取 secret 目錄。所以接著如下為各個使用者設定群組:
[root@smb ~]# usermod -G flagadmin wyw 將 wyw 加入 flagadmin 群組
[root@smb ~]# usermod -G flagadmin ywwang 將 ywwang 加入 flagadmin 群組
[root@smb ~]# usermod -G flaguser candy 將 candy 加入 flaguser 群組
[root@smb ~]# usermod -G flaguser tony 將 tony 加入 flaguser 群組

然後新增 secret 目錄並設定權限:
[root@smb ~]# mkdir /var/secret 建立 /var/secret 目錄
[root@smb ~]# chgrp flagadmin /var/secret / 設定此目錄的群組為 flagadmin
[root@smb ~]# chmod 2775 /var/secret ← 設定 flagadmin 群組可讀寫此目錄, 權限最
前面的 "2" 表示設定 sgid 權限, 所有新增
的檔案將繼承此目錄的群組, 如此才能讀寫其他人建立的檔案
最後於 /etc/samba/smb.conf 新增 secret 目錄的分享設定:
. . .
[secret]
comment = secretspace
path = /var/secret
public = no
guest ok = no
forcecreatemode = 0775 設定所有新建檔案的權限為 775
validusers = @flagadmin , @flaguser 設定只有 flagadmin 與 flaguser 群組才可以進入此目錄
writelist = @flagadmin 設定只有 flagadmin 群組才可以寫入此目錄
readlist = @flaguser 設定 flaguser 群組只有唯讀權限
. .
完成後, 執行 /etc/rc.d/init.d/smb restart ; /etc/rc.d/init.d/nmb start 重新啟動 Samba, 使新設定生效, 如此 secret 目錄便可以依照不同使用者而給予不同的權限了。

8.分享印表機
要設定透過 Samba 分享 Linux 主機上的印表機非常簡單, 與分享目錄的方式相同。請先在 Linux 主機上安裝好印表機, 接著在 /etc/samba/smb.conf 檔中加入以下內容 (存檔後需重新啟動 Samba):
[LaserJet5] 印表機顯示的名稱
path = /var/spool/samba 印表機的佇列, 一般指定此路徑即可
readonly = no 是否只能唯讀
guestok = yes 允許匿名存取
printable = yes 是否可列印
printername = hplj5 此為您在安裝印表機時所設定的印表機名稱

Windows 上的設定
* Linux 的 /etc/samba/smb.conf file 中, 設定的工作群組, 必須與你的Windows內的工作群組相同.
* 登入Windows 時, Login username 與password, 一定要使用smbpasswd檔案中有的username/password 相同.

呵呵, 這樣就OK了, 只要以透過『網路上的芳鄰』來連線及可共享資源.

2008年6月12日 星期四

Mining communities and their relationships in blogs: A study of online hate groups

1. Introduction
Blogs, or Weblogs, have become increasingly popular in recent years. Blog is a Web-based publication that allows users to add content periodically, normally in reverse chronological order, in a relatively easy way.Therefore, Many communities have emerged in the blogosphere. These could be support communities such as those for technical support or educational support. In addition, there are also hate groups in blogs that are formed by bloggers who are racists or extremists. The consequences of the formation of such groups on the Internet cannot be underestimated. Beacuse Young people are the major group of bloggers, are more likely to be affected and even ‘‘brainwashed’’ by ideas propagated through the Web as a global medium.

Facing the new trend in the cyberspace, our study has two objectives.First, we propose a semi-automated approach that combines blog spidering and social network analysis techniques to facilitate the monitoring, study, and research on the networks of bloggers, especially those in hate groups.Second, our study seeks insights into the organization and movement of online hate groups.

2. Web mining and social network analysis
Techniques based on both Web mining and social network techniques have been used in intelligence-and security-related applications and achieved considerable success.Web mining techniques can be categorized into three types: content mining, structure mining, and usage mining (Kosala and Blockeel, 2000).

  1. Web content mining refers to the discovery of useful information from Web contents, including text, images, audio, video, etc.
  2. Web structure mining studies the model underlying the hyperlink structures of the Web. It usually involves the analysis of in-links and out-links information of a Web page, and has been used for search engine result ranking and other Web applications.
  3. Web usage mining employs data mining techniques to analyze search logs or other activity logs to find interesting patterns.

3. Proposed approach
We propose a semi-automated approach for identifying groups and analyzing their relationships in blogs. The approach is diagrammed in Fig. 1. Our approach consists of four main modules: (a). Blog Spider, (b). Information Extraction, (c). Network Analysis, and (d).Visualization. The Blog Spider module downloads blog pages from the Web. These pages are then processed by the Information Extraction module. Data about these blogs and their relationships are extracted and passed to the Network Analysis module for further analysis. Finally the Visualization module presents the analysis results to users in a graphical display. In the following, we describe each module in more detail.

3.1. Blog spider
A blog spider program is first needed to download the relevant pages from the blogs of interest. Similar to general Web fetching. Alternatively, asynchronous I/O can be used for parallel fetching (Brin and Page, 1998). In either case, after a page is downloaded it can be stored into a relational database or as a flat file. In addition, the spider can use RSS (Really Simple Syndication) and get notification when the blog is updated.

3.2. Information extraction
After a blog page has been downloaded, it is necessary to extract useful information from the page. This includes information related to the blog or the blogger, such as user profiles and date of creation. This can also include linkage information between two bloggers, such as linkage, commenting, or subscription.

3.3. Network analysis
Network analysis is a major component in our approach. In this module we propose three types of analysis: topological analysis ,centrality analysis and community analysis.

  1. The goal of topological analysis is to ensure that the network extracted based on links between bloggers is not random and it is meaningful to perform the centrality and community analysis. We use three statistics that are widely used in topological studies to categorize the extracted network (Albert and Baraba’ si, 2002): average shortest path length, clustering coefficient and degree distribution.
  2. The goal of centrality analysis is to identify the key nodes in a network. Three traditional centrality measures can be used: degree, betweenness, and closeness.
  3. Community analysis is to identify social groups in a network. In SNA a subset of nodes is considered a community or a social group if nodes in this group have stronger or denser links with nodes within the group than with nodes outside of the group (Wasserman and Faust, 1994).

3.4. Visualization

The extracted network and analysis results can be visualized using various types of network layout methods.

4. Case study
4.1. Focus and Methods
We applied our approach to conduct a case study of hate groups in blogs. We chose to study the hate groups against Blacks. There are two reasons for the focus. First, the nature of hate groups and hate crimes is often dependent on the target "hated" group. By focusing on a type of hate groups it is possible to identify relationships that are more prominent. Second, among different hate crimes, anti-Black hate crimes have been one of the most widely studied (e.g., Burris et al., 2000; Glaser et al., 2002). Our approach consists of four main modules:

  1. Spiders were used to automatically download the description page and member list of each of these groups. A total of 820 bloggers were identified from these 28 groups. The spiders further downloaded the blogs of each of these bloggers.
  2. The extraction program also analyzed the relationship between these bloggers. In this study, two types of relationships were extracted:
    (1). Group co-membership: two bloggers belong to the same group (blogring).
    (2). Subscription: blogger A subscribes to blogger B. This is a directed, binary relationship.
  3. After collecting the blogs and extracting information from them, we performed demographical and network analysis on the data set in order to reveal the characteristics of these groups and ascertain whether any patterns exist.
  4. Visualization was then applied to present the results. We discuss the details of our analysis in the following sections.

4.2. Discussion
a. What are the structural properties of the social networks of bloggers in the hate groups?
Ans : Similar to the network of white supremacist Web sites (Burris et al., 2000), the network of bloggers in hate groups is decentralized.
b. Are there bloggers who stand out as leaders of influence in these groups?
Ans : Burris et al. (2000) found that the decentralized white supremacist groups had different centers of influence.
c. What is the community structure in these groups?
Ans : Communities, However, these communities are not composed of Web sites but individual bloggers. Communities provide an environment for its members to exchange their ideas and opinions and reinforce the shared ideology.
d. What do the structural properties suggest about the organization of the hate groups?
Ans : As mentioned in point (a), the structure of the network suggests that the hate groups in blogosphere have not formed into centralized organizations.
e. What are the social and political implications of these properties?
Ans :Burris et al. (2000) commented that extremist groups are a type of social movement which has profound social and political implications.

5.Conclusion and future directions
In this paper, we have discussed the problems of the emergence of hate groups and racism in blogs. Our contributions are twofold. First, we have proposed a semi-automated approach for blog analysis. Our approach consists of a set of Web mining and network analysis techniques that can be applied to the study of blogosphere. Such techniques as network topology analysis. We believe that the approach can also be applied to other domains that involve virtual community analysis and mining, which we believe would be an increasingly important field for various applications.


Second, we applied this approach to investigate the characteristic and structural relationships among the hate groups in blogs in our case study. Our study not only has provided an approach that could facilitate the analysis of law enforcement and social workers in studying and monitoring such activities, but also has brought insights into the structural properties of online hate groups and helped broaden and deepen our understanding of such a social movement.