View Harvester.cs
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 System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Xml.Linq; | |
using WixSharp; | |
using WixSharp.CommonTasks; | |
namespace WixSharp |
View benchmark-update.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
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)))) | |
{ |
View Not so Simple!
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
module interop.net; | |
import core.sys.windows.windows; | |
import core.sys.windows.com; | |
import core.sys.windows.objidl; | |
import core.sys.windows.oaidl; | |
import core.sys.windows.wtypes; | |
pragma(lib, "mscoree.lib"); | |
extern (Windows) |
View Minimal C++ example
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); | |
} |
View simple gmpq test.
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; |
View xmlwriter.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(); | |
} |
View test.py
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) |
View extruder_fan3.scad
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
duct_wall=1; | |
gap=6; | |
inner_radius=18; | |
outer_radius=inner_radius+gap; | |
height=14; | |
nozzle_height=6; | |
taper_angle=30; | |
skew=nozzle_height*tan(taper_angle); | |
top_height=height-nozzle_height; |
View extruder_fan2.scad
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
duct_wall=1; | |
gap=6; | |
inner_radius=18; | |
outer_radius=inner_radius+gap; | |
height=14; | |
nozzle_height=6; | |
taper_angle=30; | |
skew=nozzle_height*tan(taper_angle); | |
top_height=height-nozzle_height; |
View confused.scad
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
$fn = 32; | |
w = 0.5; | |
n = 4; | |
R = 2; | |
r = R / cos(180/n); | |
difference() { | |
// Chain hull of circles same width as filament at nozzle positions | |
for(i = [0 : n - 1]) |