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 <benchmark/benchmark.h> | |
#include <CGAL/Nef_3/ID_support_handler.h> | |
#include <CGAL/Nef_3/SNC_indexed_items.h> | |
// A bit unconventional ;) | |
static int data[][2] | |
#include "sample.data" | |
; | |
namespace CGAL { |
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> | |
static int allocations = 0; | |
static int totalBytes = 0; | |
//Logging allocator | |
template<class T> | |
struct Allogator { | |
typedef T value_type; | |
T* allocate(size_t n, const void* = nullptr) |
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 Microsoft.Deployment.WindowsInstaller; | |
using System; | |
using WixSharp; | |
using WixSharp.CommonTasks; | |
namespace Setup1 | |
{ | |
class Program | |
{ | |
static void Main() |
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
GRID_FINE=0.000001; | |
M_PI=3.14159265358979323846; | |
function getFragments(r,fn,fs,fa) = | |
(r < GRID_FINE)?3: | |
(fn > 0.0)?(fn >= 3 ? fn : 3): | |
ceil(max(min(360.0 / fa, r*2*M_PI / fs), 5)); | |
function getPhi(i,f) = (i*360)/f; | |
function getCircle_x(r,i,f) = r*sin(getPhi(i,f)); |
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
extern (C) void* _aaGetX(void** paa, const TypeInfo_AssociativeArray ti, in size_t valuesize, in void* pkey, out bool found) pure nothrow; | |
V* slot(K, V)(ref V[K] aa, K key, out bool found) | |
{ | |
return cast(V*) _aaGetX(cast(void**)&aa, typeid(V[K]), V.sizeof, &key, found); | |
} | |
void update(K, V, C, U)(ref V[K] aa, K key, C create, U update) | |
if (is(C : V delegate()) || is(C : V function()) && (is(U : V delegate(ref V)) || is(U : V function(ref V)))) | |
{ |
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
nozzle_dia=0.4; | |
layer_height=0.3; | |
function pi() = 3.141592; | |
function width(d,h) = h-(pi()*((h*h)-(d*d)))/(4*h); | |
function arc(r,t) = 0.5*(t+sqrt((t*t)+4*(r*r))); | |
function polyhole(r,n,t) = arc(r,t)/cos(180/n); | |
function sides(d,t) = ceil(180 / acos((d-t)/d)); |
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 "stdafx.h" | |
#include <metahost.h> | |
#pragma comment(lib, "mscoree.lib") | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
ICLRMetaHost *pMetaHost = NULL; | |
HRESULT hr = CLRCreateInstance(CLSID_CLRMetaHost, IID_ICLRMetaHost,(LPVOID*)&pMetaHost); | |
} |
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
extern(C) | |
{ | |
alias uint mp_limb_t; | |
struct __mpz_struct | |
{ | |
int _mp_alloc; | |
int _mp_size; | |
mp_limb_t *_mp_d; |
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
import std.xml; | |
import std.string; | |
import std.container.stack; | |
class XmlWriter | |
{ | |
this() | |
{ | |
m_stack = new Stack!Element(); | |
} |
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
#!/usr/bin/env python | |
import requests | |
r=requests.post("http://httpbin.org/post",data={"this&":1,"that=":2}) | |
print(r.text) |