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
template <class identifier> | |
return_data_type function_name(param_type param_name, ...) { | |
// function declaration | |
return result_value; | |
} | |
template <typename identifier> | |
return_data_type function_name(param_type param_name, ...) { | |
// function declaration | |
return result_value; | |
} |
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; | |
template <class T> | |
T GetMax (T a, T b) { | |
T result; | |
result = (a > b) ? a : b; | |
return result; | |
} |
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
[Extension("This extension enables Github Gist support for BlogEngine.NET.", "1.0", "Cong Danh")] | |
public class GistExtension | |
{ | |
public GistExtension() | |
{ | |
Post.Serving += Post_Serving; | |
} | |
void Post_Serving(object sender, ServingEventArgs e) | |
{ |
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
const char* format(int digit) { | |
switch (digit) { | |
case 6: | |
return "%06d"; | |
case 4: | |
return "%04d"; | |
case 5: | |
return "%05d"; | |
case 7: | |
return "%07d"; |
NewerOlder