View foo.cpp
IAsyncOperation<String^>^ ChakraJavaScriptExecutor::RunScriptFromFile(String^ sourceUri)
{
Uri^ fileUri = ref new Uri(sourceUri);
return create_async([this, fileUri, sourceUri]
{
return create_task(StorageFile::GetFileFromApplicationUriAsync(fileUri))
.then([this, sourceUri](StorageFile^ storageFile)
{
return create_task(FileIO::ReadTextAsync(storageFile));
})
View ChakraHost.cpp
#include "stdafx.h"
#include <string>
#include <iostream>
using namespace std;
//
// Class to store information about command-line arguments to the host.
//
View ChakraHost.cpp
#pragma once
#include "pch.h"
#include "ChakraHost.h"
using namespace std;
// ES6 Promise callback
void CALLBACK PromiseContinuationCallback(JsValueRef task, void *callbackState)
{
// Save promise task in taskQueue.
View ReactSecureTextBox.cs
using ReactNative.UIManager;
using System.Threading;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace ReactNative.Views.TextInput
{
class ReactPasswordBox : PasswordBox
{
private int _eventCount;
View etw.cpp
#include "stdafx.h"
#include <stdio.h>
#include <Windows.h>
#include <Evntcons.h>
#include <Evntrace.h>
#pragma once
struct ITraceConsumer {
View foo.cpp
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <Windows.h>
#include <Evntrace.h>
#pragma once
View results.txt
λ node index.js
normal path time x 556 ops/sec ±9.22% (46 runs sampled)
UNC path time x 398 ops/sec ±10.97% (38 runs sampled)
Fastest is normal path time
View spawncmd.js
'use strict';
const exec = require('child_process').exec;
function execCommand(cmd, options) {
return new Promise((resolve, reject) => {
exec(cmd, options, function (err, stdout, stderr) {
if (err) {
reject(err);
} else {
View go.sh
root@localhost:~/src# go install github.com/user/hello
runtime: address space conflict: map(0x7ff5df610000) = 0x7ff5ffd20000
fatal error: runtime: address space conflict
runtime stack:
View install.sh
# Installing Node/NPM
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs