This file contains hidden or 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
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import org.junit.Test; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
import org.mockito.Mock; | |
import static org.mockito.Mockito.*; | |
import static org.mockito.Matchers.*; | |
import org.hamcrest.CoreMatchers; | |
This file contains hidden or 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 groovyx.net.http.ContentType | |
import groovyx.net.http.RESTClient | |
task pushDropbox << { | |
def outName; | |
if (System.getenv("GITLAB_CI")) { | |
outName = "app-debug-${System.getenv("CI_BUILD_REF_NAME")}-SNAPSHOT.apk" | |
} else { | |
outName = "app-debug.apk" | |
} |
This file contains hidden or 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
/** | |
* remeasures view with the same width and returns it's height, the view has to be laid out before calling this | |
* @param view the view | |
* @return measured height | |
*/ | |
public static int measureViewHeight(View view){ | |
view.measure( | |
View.MeasureSpec.makeMeasureSpec(view.getWidth(), View.MeasureSpec.EXACTLY), | |
View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED) | |
); |
This file contains hidden or 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 "includes.h" | |
template<typename... Factories> | |
class LoggerManager; | |
template<typename... Factories> | |
class LoggerHelper; | |
template<typename Factory, typename... Factories> |
This file contains hidden or 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
primitives["bool"] = Bool = new ExternalType(assembly, typeof(bool)); | |
primitives["char"] = Char = new ExternalType(assembly, typeof(char)); | |
primitives["int8"] = Int8 = new ExternalType(assembly, typeof(sbyte)); | |
primitives["uint8"] = UInt8 = new ExternalType(assembly, typeof(byte)); | |
primitives["int16"] = Int16 = new ExternalType(assembly, typeof(short)); | |
primitives["uint16"] = UInt16 = new ExternalType(assembly, typeof(ushort)); | |
primitives["int32"] = primitives["int"] = Int32 = new ExternalType(assembly, typeof(int)); |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace WhyOhGodWhy | |
{ | |
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)] |
This file contains hidden or 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 <list> | |
#include <unordered_map> | |
#include <functional> | |
using namespace std; | |
template<typename... Args> | |
class Observers | |
{ | |
public: | |
using funcs = list<function<void(Args...)>>; |
This file contains hidden or 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 ControlFunctionFactory { | |
def create = new ControlFunction().respond _ | |
} | |
object Main { | |
def main(args: Array[String]) { | |
println(new ControlFunctionFactory().create("React(generation=0,time=100,view=_________________bWWW____WWW___bWWW_____PW____WWW,energy=100)")) | |
} |