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
// Question: What's dimention(units of measure) of E in F# calculate. | |
// Generally, human brain will answer "<J>", but... | |
[<Measure>] type m | |
[<Measure>] type s | |
[<Measure>] type kg | |
[<Measure>] type N = kg m / s^2 | |
[<Measure>] type J = N m | |
let E m g h = m * g * h |
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
// [bugbeard] http://tricklib.com/cxx/ex/bugbeard/ | |
// ver.2008-09-23 + temporary fix(http://twitter.com/USAGI_WRP/status/6680888390) | |
#define BUG_EVIL_CONTRACT | |
//#include <bug/bug.h> | |
//BUG_define_logger(new bugbeard::bug_tree_logger(new bugbeard::bug_file_writer("bug/trace.log"))); | |
#define BUG_STATEMENT_HACK | |
#include <bug/bug.h> | |
int _tmain(int argc, _TCHAR* 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
using System; | |
using System.Runtime.InteropServices; | |
using System.Security.Cryptography; | |
using System.IO; | |
namespace wrp | |
{ | |
namespace random_number_generator | |
{ | |
public class XorShift |
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 | |
{ | |
import flash.events.Event; | |
import flash.events.MouseEvent; | |
import flash.net.URLRequest; | |
import flash.display.Loader; | |
import flash.display.DisplayObject; | |
import flash.display.Sprite; | |
import flash.display.MovieClip; | |
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; | |
using System.Linq; | |
using System.Net; | |
using System.Runtime.Serialization.Json; | |
using System.Xml; | |
using System.Xml.Linq; | |
using System.Xml.XPath; | |
using System.Web; |
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; | |
using System.Text.RegularExpressions; | |
using System.Text; | |
using System.Globalization; | |
namespace code_test_dotnet | |
{ | |
/// <summary> |
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 <boost/geometry.hpp> | |
#include <boost/geometry/extensions/index/rtree/rtree.hpp> | |
#include <random> | |
#include <iostream> | |
#include <exception> | |
int main() try{ |
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 <boost/format.hpp> | |
#include <boost/lexical_cast.hpp> | |
#include <iostream> | |
#include <chrono> | |
main(){ | |
namespace c = std::chrono; | |
typedef c::duration<double> real64_seconds; |
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> | |
int main(){ | |
for(size_t a = 1; a; ++a){ | |
auto fizz = (a%3==0); | |
auto buzz = (a%5==0); | |
if(fizz) | |
std::cout << "Fizz"; | |
if(buzz) | |
std::cout << "Buzz"; | |
else if(!fizz) |
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
namespace std { | |
template<class T> | |
class complex { | |
public: | |
typedef T value_type; | |
complex(const T& re = T(), const T& im = T()); | |
complex(const complex&); | |
template<class X> complex(const complex<X>&); | |
T real() const; | |
void real(T); |
OlderNewer