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
using System; | |
using System.IO; | |
using System.Runtime.Serialization; | |
using System.Xml; | |
namespace DataContractSerializerSample { | |
[Serializable, KnownType(typeof(DerrivedSerializableModel))] | |
public class SerializableModel { | |
public SerializableModel node; | |
} |
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 "stdafx.h" | |
class ClassA { | |
}; | |
class ClassB { | |
int value_ = 0; | |
int* ptr_ = nullptr; | |
ClassA member_; |
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
using System; | |
using System.Text.RegularExpressions; | |
namespace regex { | |
class Program { | |
static void Main (string[] args) { | |
FindDecimalNumber(); | |
FindCapturedDeciaml(); | |
} |
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
using DijkstraAlgorithm.GraphController; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace DijkstraAlgorithm { | |
public class Dijkstra<T> { | |
readonly int kInfinity = int.MaxValue - 1; | |
public void dijkstra (Graph<T> G, Graph<T>.Node r, out Dictionary<Graph<T>.Node, Graph<T>.Node> result) { | |
List<Graph<T>.Node> S = new List<Graph<T>.Node>(); |
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
using System.Collections.Generic; | |
namespace PrimAlgorithm { | |
public class Graph<T> { | |
private List<Node> nodes_ = new List<Node>(); | |
public class Node { | |
private List<Edge> edges_ = new List<Edge>(); | |
private T context_; |
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
using System; | |
using System.Collections.Generic; | |
namespace FloydAlgorithm { | |
public class Floyd { | |
public void floyd (int n, Graph W, ref Graph D) { | |
int i, j, k; | |
D.CopyFrom(W); | |
for (k = 0; k < n; k++) { | |
for (i = 0; i < n; i++) { |
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 os | |
import fnmatch | |
prefix = "page-" | |
postfix = ".jpg" | |
add_num = 1; | |
digits = 3; | |
v = [] |
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 "stdafx.h" | |
template <typename T> | |
class TSingleton { | |
public: | |
TSingleton() {} | |
~TSingleton() { | |
delete(Instance_); | |
} |
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
using System; | |
using System.Drawing; | |
namespace split_jpg { | |
class Program { | |
static void Main (string[] args) { | |
try { | |
string filename = args[0]; | |
Bitmap src = Image.FromFile(filename) as Bitmap; | |
int split = 2; |
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 "stdafx.h" | |
#include <windows.h> | |
PVOID ParentFiber; | |
VOID WINAPI logicFiber (PVOID pvParam) { | |
printf("logicFiber\n"); | |
SwitchToFiber(ParentFiber); | |
} |