--- title: 'Programming Learning' --- - [ ] 編輯Python - [ ] 連結Github - [ ] 整理此頁內容 ## 程式語言學習網站小整理 [TOC] ## Github 資工相關學生都該去辦一個 最大程式碼開源網站 https://github.com/sapt36 (歡迎追蹤,裡面是我大學在學期間曾打過的程式所有內容) ## Markdown 常用語法整理: https://sam.webspace.tw/2020/01/10/Markdown%20%E5%B8%B8%E7%94%A8%E8%AA%9E%E6%B3%95%E6%95%B4%E7%90%86/ ## Java 類別與建構式: https://ithelp.ithome.com.tw/articles/10236606 Static 執行順序: https://juejin.cn/post/7000735799692132389 https://www.itread01.com/content/1541746087.html ```gherkin= public class TestClass { public static void main(String[] args) { // TODO Auto-generated method stub ParentClass pa = new ParentClass(); } } public class ParentClass { static int num = 0; String name = "A"; static String name2 = "B"; static ParentClass parentClass = new ParentClass(); ParentClass(){ System.out.println("建構函式1"); } { System.out.println("name1:" + name); System.out.println("區塊1"); } static { num += 1; System.out.println("name2:" + name2); System.out.println("靜態初始化區塊" + num); } } ``` 執行結果: > name1:A > 區塊1 > 建構函式1 > name2:B > 靜態初始化區塊 > name1:A > 區塊1 > 建構函式1 字串-->字串陣列 字串反轉: https://www.delftstack.com/zh-tw/howto/java/how-to-reverse-an-int-array-in-java/ https://www.delftstack.com/zh-tw/howto/java/how-to-perform-string-to-string-array-conversion-in-java/ ```gherkin= import java.util.*; public class Example3 { public static void reverse(Integer x[]) { Collections.reverse(Arrays.asList(x)); System.out.println(Arrays.asList(x)); } public static void main(String[] args) { Integer [] arr = {15, 25, 35, 45, 55}; reverse(arr); } } ``` 輸出: >[55, 45, 35, 25, 15] HashMap https://www.w3schools.com/java/java_hashmap.asp ```gherkin= import java.util.HashMap; public class Main { public static void main(String[] args) { HashMap<String, String> capitalCities = new HashMap<String, String>(); capitalCities.put("England", "London"); capitalCities.put("Germany", "Berlin"); capitalCities.put("Norway", "Oslo"); capitalCities.put("USA", "Washington DC"); System.out.println(capitalCities); } } ``` 輸出: >{USA=Washington DC, Norway=Oslo, England=London, Germany=Berlin} ## C 曾用過的所有相關網站: https://openhome.cc/Gossip/CGossip/index.html https://www.learn-c.org/en/Linked_lists EX: ```gherkin= #include <stdio.h> int main(void) { int n = 10; printf("n 的值:%d\n", n); printf("n 的位址:%p\n", &n); return 0; } ``` 輸出: >n 的值:10 n 的位址:0061FECC 經典範例: https://programming.im.ncnu.edu.tw/C_Example.htm https://www.w3schools.com/c/c_examples.php ```gherkin= /* 程式功能:反射矩陣 */ #include <stdio.h> void main(void) { int a[9][9], b[9][9]; int i, j, m, n; printf("請輸二維矩陣a的大小 m * n 的 m 與 n 值 : "); scanf("%d %d",&m,&n); printf("請輸入矩陣a的元素值(按列順序):\n"); for(i = 0; i < m; i++) { for(j = 0; j < n; j++) { scanf("%d",&a[i][j]); /*輸入矩陣a的元素值*/ b[i][n-j-1] = a[i][j]; /* b為矩陣a的反射矩陣*/ } } printf("\n"); printf("矩陣a的反射矩陣b如下:\n"); for(i = 0; i < m; i++) { for(j = 0; j < n; j++) { printf(" %d",b[i][j]); } printf("\n"); } } ``` 存取結構內屬性: https://opensourcedoc.com/c-programming/struct/ ```gherkin= #include <assert.h> typedef struct point_t point_t; struct point_t { double x; double y; }; int main(void) { point_t pt = { .x = 3.0, .y = 4.0 }; assert(pt.x == 3); assert(pt.y == 4); return 0; } ``` ## Html/JS/CSS 免費架網站: https://neocities.org/dashboard https://sapt.neocities.org (我的網站) PHP: https://www.w3schools.com/php/default.as 特殊符號輸出: https://segmentfault.com/a/1190000006590096 模板開源網站: https://codepen.io/trending ## Python(Machine Learning) ``` Python基本上youtube就有一堆教學影片 這裡就先放ML的相關網站 ``` Python&JS Sorting Algorithm https://codecoda.com/en/blog/entry/sort-algorithms-and-their-implementations 中文簡單講解ML https://tw511.com/15/129/3796.html 神經網路(ANN)新手中文指引 https://kknews.cc/zh-tw/tech/za6ke33.html Human Activity Recognition(HAR) https://machinelearningmastery.com/how-to-model-human-activity-from-smartphone-data/ Google TensorFlow https://developers.google.com/machine-learning/crash-course/first-steps-with-tensorflow/programming-exercises?hl=en 國外大神講解 How to use your trained model https://pythonprogramming.net/using-trained-model-deep-learning-python-tensorflow-keras/ >待編輯