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
/* | |
* I WAS ONLY CAPABLE OF FINDING AN O(N*M) SOLUTION | |
* | |
* THE O(N+M) SOLUTION PRESENTED HERE IS BASED ON: | |
* http://csharplabtests.blogspot.co.il/2015/06/codility-lesson-3-genomicrangequery.html | |
*/ | |
class Solution | |
{ | |
public int[] solution(String S, int[] P, int[] Q) |
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
#include <GLES2/gl2.h> | |
#include <GLES2/gl2ext.h> | |
#include <stdio.h> | |
#include <emscripten.h> | |
#include <emscripten/html5.h> | |
int main() | |
{ | |
emscripten_set_canvas_size(256, 256); |
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
/* | |
* REFERENCE: https://github.com/arielm/chronotext-boost/wiki/Basic-code-sample | |
*/ | |
#include <iostream> | |
#include <boost/algorithm/string.hpp> | |
#include <boost/lexical_cast.hpp> | |
#include <boost/filesystem.hpp> |
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
# BUILDING BOOST FOR EMSCRIPTEN... | |
# REFERENCE: http://www.boost.org/doc/libs/1_58_0/more/getting_started/unix-variants.html | |
# TESTED WITH: BOOST 1.53 ON OSX 10.10 | |
# DEPENDS ON: MODIFIED user-config.jam | |
# REQUIRED FOR iostreams | |
# REFERENCE: http://www.boost.org/doc/libs/1_58_0/libs/iostreams/doc/installation.html#bjam | |
cd $EMSCRIPTEN_PATH; ./embuilder.py build zlib | |
export NO_BZIP2=1 |
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
#!/bin/sh | |
cpus=$(sysctl hw.ncpu | awk '{print $2}') | |
../configure --disable-tests --disable-shared-js --enable-llvm-hacks \ | |
--without-intl-api \ | |
--disable-threadsafe \ | |
--enable-exact-rooting --enable-gcgenerational \ | |
--enable-gczeal --enable-root-analysis \ | |
--enable-debug --enable-debug-symbols \ |
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
#!/bin/sh | |
if [ -z $NDK_ROOT ]; then | |
echo "NDK_ROOT MUST BE DEFINED!" | |
echo "e.g. export NDK_ROOT=$HOME/android-ndk" | |
exit -1 | |
fi | |
host_kernel=$(uname -s | tr "[:upper:]" "[:lower:]") | |
host_arch=$(uname -m) |
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
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
ifndef SPIDERMONKEY_SDK_PATH | |
SPIDERMONKEY_SDK_PATH := $(LOCAL_PATH)/../../.. | |
endif | |
ifndef SPIDERMONKEY_DIST_PATH | |
SPIDERMONKEY_DIST_PATH := $(SPIDERMONKEY_SDK_PATH)/js/src/build-android/dist | |
endif |
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
LOCAL_PATH := $(call my-dir)/.. | |
include $(CLEAR_VARS) | |
ICU_COMMON_SRC = common | |
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(ICU_COMMON_SRC) | |
LOCAL_SRC_FILES += $(ICU_COMMON_SRC)/cmemory.c | |
LOCAL_SRC_FILES += $(ICU_COMMON_SRC)/cstring.c | |
LOCAL_SRC_FILES += $(ICU_COMMON_SRC)/cwchar.c |