This file contains hidden or 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
<?php | |
include("class.phpmailer.php"); // 匯入PHPMailer library | |
$mail= new PHPMailer(); //建立新物件 | |
$mail->IsSMTP(); //設定使用SMTP方式寄信 | |
$mail->SMTPAuth = true; //設定SMTP需要驗證 | |
$mail->SMTPSecure = "ssl"; // Gmail的SMTP主機需要使用SSL連線 | |
$mail->Host = "smtp.gmail.com"; //Gamil的SMTP主機 | |
$mail->Port = 465; //Gamil的SMTP主機的SMTP埠位為465埠。 | |
$mail->CharSet = "utf-8"; //設定郵件編碼,預設UTF-8 |
This file contains hidden or 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
/* Program: Find the character substring location of the input character string. | |
* Author: Jyun-Yao Huang ([email protected]) | |
* License: Free | |
*/ | |
#include <iostream> | |
#include <bitset> | |
#include <string> | |
#include <set> | |
#include <vector> |
This file contains hidden or 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
/* | |
Ex: Given | |
10 | |
1 2 3 4 5 8 4 3 2 1 | |
Note that the first line is the counts of numbers in the second lines. | |
Then, we can find that the max_seq = '1 2 3 4 5 4 3 2 1', whose length = 9. | |
*/ | |
#include <iostream> |
This file contains hidden or 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
/* | |
* Program Description: | |
* Count the input data character frequence, and store the characters which are composed with 'A-Z' or 'a-z'. | |
* And output the character and respective frequency. Note that the characters 'A-Z' and 'a-z' are the same. | |
* For example, | |
* Input: | |
* This is a text for Q2. | |
* My cellphone number is 123-456-789. | |
* E-mail: [email protected] | |
Output: |
This file contains hidden or 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> | |
using namespace std; | |
/* 總金額 */ | |
#define _SUM_OF_DOLLARS 20800 | |
/* Dollars of Item 1. */ | |
#define _ITEM_1 170 | |
/* Dollars of Item 2. */ | |
#define _ITEM_2 870 | |
int main(int argc, char * argv[]) |
This file contains hidden or 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
import java.io.IOException; | |
import java.util.*; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.io.Writable; | |
import org.apache.hadoop.mapred.*; | |
import org.apache.hadoop.util.*; | |
import java.io.DataInput; |
This file contains hidden or 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
import java.io.IOException; | |
import java.util.*; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.io.Writable; | |
import org.apache.hadoop.mapred.*; | |
import org.apache.hadoop.util.*; | |
import java.io.DataInput; |
This file contains hidden or 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
<?xml version="1.0"?> | |
<!-- core-site.xml --> | |
<configuration> | |
<property> | |
<name>fs.default.name</name> | |
<value>hdfs://namenode/</value> | |
<final>true</final> | |
</property> | |
</configuration> |
This file contains hidden or 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 SortData; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.Configured; | |
import org.apache.hadoop.io.IntWritable; | |
import org.apache.hadoop.io.SequenceFile.CompressionType; | |
import org.apache.hadoop.io.compress.*; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.mapred.*; | |
import org.apache.hadoop.util.*; |
This file contains hidden or 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 SortData; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.Configured; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.io.SequenceFile.CompressionType; | |
import org.apache.hadoop.io.compress.GzipCodec; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.mapred.*; | |
import org.apache.hadoop.util.*; |