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
package main | |
import ( | |
"fmt" | |
"log" | |
"syscall" | |
"unsafe" | |
) | |
type MallocVtbl struct { |
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> | |
#include <limits.h> | |
#include <stdlib.h> | |
#include <dlfcn.h> | |
#include <string.h> | |
#include <set> | |
#include <dirent.h> | |
#include <sys/stat.h> | |
#include "coreclrhost.h" |
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; | |
interface IAdd | |
{ | |
void Add(int val); | |
} | |
struct Foo : IAdd | |
{ | |
public int value; |
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.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication3 | |
{ | |
class Program |
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
class rw_spin_lock | |
{ | |
public: | |
rw_spin_lock() | |
{ | |
_readers = 0; | |
} | |
public: | |
void acquire_reader() |
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
'use strict' | |
var sqlite = require('sqlite3').verbose(); | |
var db = new sqlite.Database('test_db'); | |
function vote(voter, callback) { | |
var val; | |
var getStmt = `SELECT Name, Count FROM Voters WHERE Name="${voter}"`; | |
console.log(getStmt); | |
db.get(getStmt, function(err, row) { |
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
'use strict' | |
var sqlite = require('sqlite3').verbose(); | |
var db = new sqlite.Database('test_db'); | |
db.getAsync = function (sql) { | |
var that = this; | |
return new Promise(function (resolve, reject) { | |
that.get(sql, function (err, row) { | |
if (err) |
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
'use strict' | |
var sqlite = require('sqlite3').verbose(); | |
var db = new sqlite.Database('test_db'); | |
db.getAsync = function (sql) { | |
var that = this; | |
return new Promise(function (resolve, reject) { | |
that.get(sql, function (err, row) { | |
if (err) |
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 <future> | |
#include <iostream> | |
using namespace std; | |
future<int> async_add(int a, int b) | |
{ | |
auto fut = std::async([=]() { | |
int c = a + b; | |
return c; |
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
# escape=` | |
# Installer image | |
FROM microsoft/windowsservercore:1709 AS installer-env | |
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | |
# Retrieve .NET Core Runtime | |
ENV DOTNET_VERSION 2.0.6 | |
ENV DOTNET_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-win-x64.zip |
OlderNewer