[佛教] 金剛七句祈禱文

蓮師金剛七句百億共修

http://buddhismstuding.blogspot.tw/2016/02/12.html?m=1#more
發願參加共修的人,最少發願念誦金剛七句祈禱文10萬遍;有人覺得因緣殊勝、機會難得,想發願念誦20萬、30萬、100萬遍或者更多,就好好地在內心發下誓願:從報名開始,一定圓滿念誦。

十七世大寶法王噶瑪巴唱誦-蓮師七句祈請文
https://www.youtube.com/watch?v=NqAuzuRB_wI&feature=youtu.be

吽!
鄔金剎土西北隅  
說明蓮師的誕生地。

蓮花蕊莖之座上  
說明蓮師的降生情形。

稀有殊勝成就者  
說明蓮師的功德。

世稱名號蓮花生  
說明蓮師的名稱。

空行眷屬眾圍繞  
說明蓮師及其眷屬是我們祈禱的對境。

我隨汝尊而修持  
說明應依教奉行,遵循蓮師的教言來修。

為賜加持祈降臨  
說明以追隨蓮師的不退轉信心,渴望成就與他無別的果位。

革日班瑪斯德吽  
依靠念誦蓮師心咒,祈禱自心與蓮師無二無別,攝集悉地。


(made by Yirong Yang)

修持的时候,先要了知莲师是一切诸佛菩萨的总集,并以坚定不移的诚挚信,将其观在头顶上。

出定后得时,日常的吃饭、走路、供养、转绕等,凡是见到的、听到的、想到的,全部要观想为上师的身体、上师的语言、上师的智慧妙用。晚上临睡前,将上师观成明点,融入自己心间而入睡……诸如此类,一切座间都成了上师的行为,如河流般无有间断精进于善行。

[佛教] 大明咒(觀音心咒)

色登寺2016年新春祈福开始报名啦!

http://blog.sina.cn/dpool/blog/s/blog_678e4bf30102wtss.html

每逢春节期间,人们欢乐团圆过佳节,却有无数动物因为大家的口腹之欲惨遭杀害,所造杀业比平时更加严重!为此,我们在殊胜的神山坛城为自他祈福的同时,亦应不忘多多念诵观音心咒回向天下所有杀生和被杀的众生,发愿救度他们远离痛苦、究竟成佛。

大明咒(觀音心咒)


 嗡  嘛  呢  唄  咪  吽

 ㄨㄥ ㄇㄚ ㄋㄧˊ ㄅㄟ ㄇㄧ ㄏㄨㄥˋ

 om  ma   ni  pad  me   hum

[C][鏈結串列應用] 自定題庫的英文單字測驗程式

因為想要自定義題庫,所以寫了這個程式。

[C] 陣列:元素個數、列數、行數

#include <stdio.h>
#include <stdlib.h>
int main() {
   // 成本邊線陣列: 邊線數 = [8]    {from, to, weight}
   int edge[8][3] = { { 1, 2, 2 },
                      { 2, 4, 3 },
                      { 1, 4, 4 },
                      { 3, 5, 5 },
                      { 2, 5, 6 },
                      { 2, 3, 8 },
                      { 3, 4, 10 },
                      { 4, 5, 15 } };
                     
   int a, b, c;
   // 元素個數 a=24    列數 b=8    行數 c=3
   a = sizeof(edge)/sizeof(edge[0][0]);
   b = sizeof(edge)/sizeof(edge[0]);
   c = a/b;
 
   printf("%d \n", a);
   printf("%d \n", b);
   printf("%d \n", c);
 
   system("pause");
   return 0;
}


[C][資料結構] 06-堆疊-後序表示法

06-堆疊-後序表示法
https://drive.google.com/open?id=0B1cXVSjadhC0WThhY25ZUzFCYlk

中序(Infix)
前序(Prefix)
後序(Postfix)
A*B+C
+*ABC
AB*C+
人類易讀

計算機不用考慮運算子的優先順序,讀取後立即執行運算


中序(Infix)
A*(B+C)
A+B*(C+D)-E
6*7+(4+5)
轉換過程
A(BC+)*
ABC+*
A+(B(CD+)*)-E
(AB(CD+)*+)-E
(AB(CD+)*+)E-
ABCD+*+E-
(67*)+(45+)
67*45++
後序(Postfix)
ABC+*
ABCD+*+E-
67*45++

[C][資料結構] 05-堆疊介紹

05-堆疊介紹
https://drive.google.com/open?id=0B1cXVSjadhC0YlloVmpXYzBFV3c

[C][資料結構] 03-單向鏈結串列

單向鏈結串列
https://drive.google.com/open?id=0B1cXVSjadhC0alZ5RUoza3lzaG8

單向:1)建立、2)走訪、3)刪除、4)插入

[C][資料結構] 02-鏈結串列(Linked List)基本介紹

鏈結串列(Linked List)基本介紹
https://drive.google.com/open?id=0B1cXVSjadhC0VG16bE5hbU44UVk



Array 陣列
Struct 結構
Linked List 鏈結串列
資料型態
多筆、同類型的資料
單筆、不同類型的資料
多筆、不同類型的資料
(相同結構的多個結構變數)
記憶體配置
(資料筆數)
固定大小(固定筆數)
靜態資料結構(static)
無效率

動態配置
動態資料結構(dynamic)
可彈性修改
有效率
要件
必須事先得知資料個數

可任意增減,不必事先知道
資料個數
資料存取
可利用索引值存取任意元素

必須一一走訪每個節點
資料增刪
陣列大小固定,難以增刪,尤其多維陣列更難以處理資料的增刪

只需更改指標指向,不必搬移元素,增刪容易而具有彈性

[C] 遞迴練習

// 遞迴練習
#include <stdio.h>
#include <stdlib.h>

void ape(int x, int y)
{
    int total;
   
    printf("(x, y)=(%2d, %2d)\n", x, y);
   
    /*******************************
        遞迴:結束條件 + 自我呼叫
    *******************************/
   
    // 結束條件
    if (x<0 && y<0)
        total = (x+y)*10;
    // 自我呼叫
    else{
        --x;
        --y;
        ape(x, y);
    }
    printf("\ntotal = %d\n", total);
    system("pause");
}

int main()
{
    int x=9, y=8;
   
    ape(x, y);
   
}
   

[C] 利用 struct 回傳多個參數

/* 利用 struct 回傳多個參數 */

#include <stdio.h>
#include <stdlib.h>

// 定義新的變數型態 struct num
struct num{
    int v1, v2;
};


// 副函式:回傳新的變數型態 struct num
struct num oper(struct num);


// 主函式
int main()
{
    struct num XandY, result;
    XandY.v1=1;
    XandY.v2=2;
   
    result = oper(XandY);
    printf("%d , %d\n", result.v1, result.v2);
   
    system("pause");
    return 0;
}

struct num oper(struct num XandY)
{
    struct num CandD;
    CandD.v1 = XandY.v1;
    CandD.v2 = XandY.v2;
   
    return CandD;
}
   
   

[C][104資料結構][HwA] Operation of Sparse Matrix

資料結構(Data Structures)    程式作業-A    以陣列做稀疏矩陣之運算

以Ch2-4.c 的稀疏矩陣陣列表示法為基礎,擴充支援稀疏矩陣之加、減、乘、轉置,等運算。
由『敎學支援平台』本課程之「$程式作業-規格要求」中下載ExerciseA.rar。

ExerciseA.rar內之檔案:
 ExerciseA.h :宣告用標頭檔,不應有所更動。
 ExerciseA.c : 作業中要求補齊功能的五個函數應由學生定義在其中
• void printSparseMatrix(Matrix *mat)
• void transSparseMatrix(Matrix *result, Matrix *source)
• void addSparseMatrix(Matrix *sum, Matrix *matA, Matrix *matB)
• void subSparseMatrix(Matrix *diff, Matrix *matA, Matrix *matB)
• void multSparseMatrix(Matrix *prod, Matrix *matA, Matrix *matB)
 ExerA-Data.c :含矩陣輸入資料與運算驅動程式

作業繳交時,學生必須包括至少一份可正確執行的測試資料(即ExerA-Data.c )
作業批改時,助教會換上新的測試資料(新的ExerA-Data.c )以驗證程式正確性



※程式功能要求
  補上這五個C函數的定義(在ExerciseA.c 之中)
• printSparseMatrix(Matrix *mat)
 用長方型格式輪出稀疏矩陣*mat;原稀疏矩陣無值的項補零印出
• transSparseMatrix(Matrix *result, Matrix *source)
 將稀疏矩陣*source 轉置(transpose),置入稀疏矩陣*result 之中
• addSparseMatrix(Matrix *sum, Matrix *matA, Matrix *matB)
 將矩陣*matA 加上矩陣*matB, 結果置入矩陣*sum 之中
  (*sum) = (*matA) + (*matB)
• subSparseMatrix(Matrix *diff, Matrix *matA, Matrix *matB)
 將矩陣*matA 減去矩陣*matB, 結果置入矩陣*diff 之中
  (*diff) = (*matA) - (*matB)
• multSparseMatrix(Matrix *prod, Matrix *matA, Matrix *matB)
 將矩陣*matA 乘上*matB, 結果置入矩陣*prod 之中
  (*prod) = (*matA) X (*matB)

  注意參數的順序!




※書面報告
1.時間複雜度分析.doc
  以Big Oh, O()符號, 表示出你的程式所用之演算法,各計算函數之時間複雜度,
    表示成rows, cols, numOfTerms 的函數。參考課本p.1-31頁「1-7-1 Big Oh函數的基礎」,
    簡單分析並概要說明如下你寫的C函數其時間複雜度為何?
    1) void transSparseMatrix(Matrix *result, Matrix *source)以r, c, n, 表示
    2) void addSparseMatrix(Matrix *sum, Matrix *matA, Matrix *matB) &
       void subSparseMatrix(Matrix *diff, Matrix *matA, Matrix *matB)
     以r, c, nA, nB, 表示(note: r = rA = rB, c = cA = cB )
    3) void multSparseMatrix(Matrix *prod, Matrix *matA, Matrix *matB)
     以rA, cr, nA, cB, nB, 表示(note: cr = cA = rB )
2.程式作業A說明.doc
  概要說明程式使用及設計方式,及程式撰寫及測試過程是否遭遇困難及解決之道。

  以上分為兩個MS Word檔,連同程式碼一併繳交。


題目:ExerciseA.rar
https://drive.google.com/open?id=0B1cXVSjadhC0R0djVmZTcUVCdFE

[圖解C] Example 908: there are some data with the same structure

// Example 908: there are some data with the same structure
#include <stdio.h>
#include <stdlib.h>

int main()
{
    struct student
    {
        char name[10];
        int math;
        int english;
    };
   
    // declare an array with the same structure
    struct student classA[3] =
    {{"Jay", 87, 69}, {"Jolin", 77, 88}, {"Henrry", 78, 70}};
   
    int i;
    float aveMath=0, aveEng=0;
   
    // print by using array
    for (i=0 ; i<3 ; i++){
        printf("%s \t math= %d \t english= %d \n",
        classA[i].name, classA[i].math, classA[i].english);
       
        aveMath += classA[i].math;
        aveEng += classA[i].english;
    }
   
    printf("============================\n");
   
    // print by using pointer
    for (i=0 ; i<3 ; i++){
        printf("%s \t math= %d \t english= %d \n",
        (classA+i)->name, (classA+i)->math, (classA+i)->english);
    }
   
    system("pause");
    return 0;
}

[圖解C] Example 907: there are some data with the same structure

// Example 907: there are some data with the same structure
#include <stdio.h>
#include <stdlib.h>

int main()
{
    struct student
    {
        char name[10];
        int math;
        int english;
    };
   
    // declare an array with the same structure
    struct student classA[3] =
    {{"Jay", 87, 69}, {"Jolin", 77, 88}, {"Henrry", 78, 70}};
   
    int i;
    float aveMath=0, aveEng=0;
   
    for (i=0 ; i<3 ; i++){
        printf("%s \t math= %d \t english= %d \n",
        classA[i].name, classA[i].math, classA[i].english);
       
        aveMath += classA[i].math;
        aveEng += classA[i].english;
    }
   
    printf("============================\n");
    printf(" Math average = %f\n", aveMath/3);
    printf(" English average = %f\n", aveEng/3);
   
    system("pause");
    return 0;
}