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
// Place this at the top of index.js in your react-native project | |
delete global.URLSearchParams; | |
delete global.URL; | |
const pollyfillGlobal = require('react-native/Libraries/Utilities/PolyfillFunctions').polyfillGlobal; | |
pollyfillGlobal('URL', () => require('whatwg-url').URL); | |
pollyfillGlobal('URLSearchParams', () => require('whatwg-url').URLSearchParams); | |
global.URL = require('whatwg-url').URL; | |
global.URLSearchParams = require('whatwg-url').URLSearchParams; |
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
package service | |
import ( | |
"fmt" | |
"testing" | |
"time" | |
"github.com/dedis/cothority" | |
"github.com/dedis/kyber" | |
"github.com/dedis/kyber/util/key" |
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
const kyber = require('@dedis/kyber-js') | |
const cothority = require('@dedis/cothority') | |
const config = require('./config') | |
const hexToArrayBuffer = require('hex-to-array-buffer') | |
const mockVotes = () => { | |
const promises = [] | |
for (let i = 0; i < voters.length; i++) { | |
const signature = generateSignature(voters[i]) | |
// login |
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
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix | |
set-option -ga terminal-overrides ",xterm-256color:Tc" | |
set-option -g default-terminal "xterm-256color" | |
# Start windows and panes at index 1 | |
set -g base-index 1 | |
setw -g pane-base-index 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
let mapleader = "," | |
" Load vundle | |
set nocompatible | |
filetype off | |
call plug#begin() | |
" GUI enhancements | |
Plug 'itchyny/lightline.vim' | |
Plug 'machakann/vim-highlightedyank' |
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 <iostream> | |
#include <vector> | |
#include <map> | |
#include <queue> | |
#include <stack> | |
#include <string> | |
#include <algorithm> | |
using namespace std; |
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
/** | |
* @NoAdminRequired | |
* @NoCSRFRequired | |
*/ | |
public function cover() { | |
$albumId = $this->getIdFromSlug($this->params('albumIdOrSlug')); | |
$album = $this->albumBusinessLayer->find($albumId, $this->userId); | |
// try to extract the first picture from the first track on the album |
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
Thread 19 (Thread 0x7fffb7fff700 (LWP 22175)): | |
#0 0x00007ffff57facf9 in syscall () from /usr/lib/libc.so.6 | |
No symbol table info available. | |
#1 0x00007ffff7b5b87a in g_cond_wait_until () from /usr/lib/libglib-2.0.so.0 | |
No symbol table info available. | |
#2 0x00007ffff7aeba69 in ?? () from /usr/lib/libglib-2.0.so.0 | |
No symbol table info available. | |
#3 0x00007ffff7aec08b in g_async_queue_timeout_pop () | |
from /usr/lib/libglib-2.0.so.0 | |
No symbol table info available. |
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 java.util.*; | |
public class MergeSort { | |
public static void sort(Comparable[] arr) { | |
Comparable[] temp = new Comparable[arr.length]; | |
sort(arr, temp, 0, arr.length - 1); | |
} | |
public static void sort(Comparable[] arr, Comparable[] aux, int lo, int hi) { | |
if(lo >= hi) { |
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
from subprocess import check_output | |
for i in range(1,1000): | |
print(check_output(["java", "Sort"], universal_newlines=True, input="{0}\n".format(i))) |
NewerOlder