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
/* Usage: To implement a object as fstream with operator ! and open() | |
* Author: Allen ([email protected]) | |
* Date: 04/14/2009 | |
* Output: | |
* object has been opened! | |
*/ | |
#include <iostream> | |
using namespace std; | |
class object |
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
/* Usage: To implement a function pointer with asc() , desc() | |
* Author: Allen ([email protected]) | |
* Date: 04/26/2009 | |
* Output: | |
* Sorted number list. | |
*/ | |
#include <iostream> | |
using namespace std; | |
bool asc(int *,int *); |
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
/* | |
* DATE: 07/06/2009 | |
* Usage: Passing two-diemnsion array | |
* Author: Allen | |
*/ | |
#include <iostream> | |
using namespace std; | |
#define SIZE 10 | |
void func(int arr[][SIZE]) |
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> | |
#include <map> | |
using namespace std; | |
class object ; | |
class object | |
{ | |
public: | |
static int count; | |
int value1; |
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
/* Class: CAlgo | |
* T : type of "Node" , with begin() , end() and operator++ | |
* ClassC1 : the implemented class , must have operator() | |
*/ | |
template<typename T,typename ClassC1 > | |
class CAlgo : public ClassC1 | |
{ | |
protected: | |
void DFS(T * ptrNode, ClassC1 *ptrObj ) | |
{ |
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> | |
#include<cstdlib> | |
using namespace std; | |
/* Note: 這裡的CWin隱含著可以自由存取private,protected, public成員。也就是CWin Class本身就隱含著自己是自己的frined. | |
* | |
*/ | |
class CWin | |
{ | |
private: | |
char m_nID_; |
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 Counter; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.Configured; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.mapred.*; | |
import org.apache.hadoop.fs.Path; | |
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.*; |
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
<?xml version="1.0"?> | |
<!-- core-site.xml --> | |
<configuration> | |
<property> | |
<name>fs.default.name</name> | |
<value>hdfs://namenode/</value> | |
<final>true</final> | |
</property> | |
</configuration> |
OlderNewer