- 前天說要學C,今天就DEMO河內塔給你看
- 前天說要學C++,今天就DEMO俄羅斯方塊給你看
- 前天說要學Web,今天就DEMO一個Judge系統給你看
- 前天說要學Java,今天就DEMO一個MP3管理系統給你看
- 前天說要學Python,今天就DEMO一個圖像辨識系統給你看
- 半年限的Project他花一個月就搞定
- 這一個月的前三個禮拜你還看他在打Online Game
- 他的世界裡只有10種人
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
int i = 0, n[100]; | |
while (scanf("%d", &n[i++]) != EOF) ; i--; | |
for (int j = 0; j < i; j++) | |
printf("%d ", n[j]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.Test; | |
public class Num123 { | |
public static void main(String[] args) { | |
int n = 5; | |
foo(2, n, "1"); | |
} | |
public static void foo(Integer i, Integer n, String s) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Animal { | |
abstract String talk(); | |
} | |
class Cat extends Animal { | |
String talk() { | |
return "Meow!"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Overloading { | |
public static String foo(int n) { | |
return "This is int " + n; | |
} | |
public static String foo(String s) { | |
return "This is String " + s; | |
} | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Animal { | |
public String talk() { | |
return "Hi"; | |
} | |
} | |
class Dog extends Animal { | |
public String talk() { | |
return "Woof!"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
void print_vector(vector<int>& v) { | |
for(int i = 0; i < v.size(); i++) { | |
cout << v[i] << " "; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isPrime = False | |
while isPrime == False: | |
number1 = eval(input("請輸入一個數值: ")) | |
isPrime = True | |
k = 2 | |
while k < number1 and isPrime: | |
if number1 % k == 0: | |
isPrime = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String file_read(String file) { | |
String sFile = null; | |
try { | |
FileInputStream fin = new FileInputStream(file); | |
byte ba[] = new byte[fin.available()]; | |
fin.read(ba); | |
// 將文字用UTF-8解碼 | |
sFile = new String(ba, "UTF-8"); | |
// 將BOM檔頭去掉 | |
sFile = sFile.replace("\uFEFF", ""); |
OlderNewer