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 <list> | |
#include <algorithm> | |
using namespace std; | |
void printlist(list<int>::iterator iter, list<int>::iterator& end) | |
{ | |
if( iter == end) | |
return; |
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> | |
void right_rotate(int arr[], int s, int t) | |
{ | |
int i, last; | |
last = arr[t]; | |
for(i = t; i > s; i--) | |
{ | |
arr[i] = arr[i - 1]; |
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> | |
using namespace std; | |
void print2bin(int d) | |
{ | |
for(int i = 0; i < 32; ++i) | |
cout << ((d >> (31 - i )) & 1); | |
cout << endl; | |
} |
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
{ | |
"cmd": | |
[ | |
"echo", "================================================================","&", | |
"echo", "building", "&", | |
"echo", "================================================================", "&", | |
"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat", "&", | |
"cl.exe", "${file}", "/EHsc" | |
], | |
"encoding": "cp949", |
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
using UnityEngine; | |
using UnityEditor; | |
using System; | |
public class CanvasWindow : EditorWindow { | |
[MenuItem("Canvas/Show")] | |
public static void ShowWindow() | |
{ | |
CanvasWindow window = (CanvasWindow)EditorWindow.GetWindow(typeof(CanvasWindow)); |
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
float value = 100.001f; | |
byte[] FloatToByte = System.BitConverter.GetBytes(value); | |
float ByteToFloat = BitConverter.ToSingle(FloatToByte, 0); |
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
function tuple(arg) -- arg is table. | |
local n_arg = #arg | |
if n_arg == 0 then | |
return nil; | |
end | |
if n_arg == 1 then | |
return arg[1]; | |
end |
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
classTemplate = { | |
new = function(self, func, o) | |
o = o or {} | |
setmetatable(o, self) | |
self.__index = self | |
return o; | |
end | |
} |
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
string json_text = @" | |
{ | |
""album"" : { | |
""name"" : ""The Dark Side of the Moon"", | |
""artist"" : ""Pink Floyd"", | |
""year"" : 1973, | |
""tracks"" : [ | |
""Speak To Me"", | |
""Breathe"", | |
""On The Run"" |
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 <map> | |
#include <string> | |
#include <functional> | |
#include <iostream> | |
using namespace std; | |
template <class T> | |
class Delegator | |
{ | |
public: |
OlderNewer