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
set(CMAKERS OFF) | |
if (NOT CMAKERS) | |
set(CMAKERS ON CACHE INTERNAL "" FORCE) | |
find_program(CMAKERS_CARGO cargo REQUIRED) | |
if (CMAKE_BUILD_TYPE STREQUAL "Release") | |
set(CMAKERS_RELEASE "--release") | |
set(CMAKERS_TDIR "release") | |
else () |
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
macro(_LIBFINDER_LIB variable lib) | |
find_library(${lib}-LIB ${lib}) | |
if(${lib}-LIB-NOTFOUND) | |
message(FATAL "Unable to find library ${lib}") | |
endif() | |
message(STATUS "${lib} library at ${${lib}-LIB}") | |
list(APPEND ${variable} ${${lib}-LIB}) | |
endmacro() | |
macro(LIBFINDER_LIBRARIES variable) |
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 AirKit; | |
using AirKit.Layout; | |
using AirKit.Material; | |
namespace AirKit.Demo | |
{ | |
class MainView : View | |
{ |
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
#lang aurakit | |
(require aurakit/layout) | |
(require aurakit/material) | |
(define main-view-state% | |
(class ak-state% | |
(super-new) | |
(init-field [counter 0]) |
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
(defvar greeter:Greeter) | |
(defvar greeting:String) | |
(defvar anotherGreeting:String) | |
(set greeter (new Greeter "Great")) | |
(new Greeter "Great") | |
"Great" | |
(set greeting (.greet greeter "World")) | |
(.greet greeter "World") | |
greeter | |
"World" |
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
// same code as in quill part, but in C++ | |
{ | |
int i = 0 | |
contfunc = [&] () { i++; } | |
while (i < 10) { | |
std::cout << i << std::endl; | |
contfunc(); | |
} | |
std::cout << "Done counting" << std::endl; | |
} |
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
--[[ | |
The MIT License (MIT) | |
Copyright (c) 2018 Nickolay Ilyushin | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
#pragma once | |
#include <functional> | |
#include <memory> | |
#include <mutex> | |
template<class T> | |
class room { | |
public: | |
typedef std::shared_ptr<T> ptr; |
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.exports = (obj, ...args) => { | |
return new Promise((res, rej) => { | |
try { | |
res(new obj(...args)); | |
} catch (e) { | |
rej(e); | |
} | |
}); | |
} |
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
require "date" | |
dt = DateTime.now | |
base = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a | |
blen = base.length | |
passlen = ARGV[0] | |
if passlen == "-" | |
passlen = gets |
NewerOlder