Add these lines to the bottom of the file:
# ~/.bashrc
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
After editing the file execute this commands
object Main extends App { | |
println(isBalanced("(.)(.)".toList)) | |
def isBalanced(list: List[Char]) = { | |
@annotation.tailrec | |
def countBracets(string: List[Char], count: Int = 0): Int = { | |
string match { | |
case '('::tail => countBracets(tail, count+1) | |
case ')'::tail => countBracets(tail, count-1) |
/* | |
* Copyright (C) 2016 Jesse Wilson | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
apk=app.apk count=0 ; for dex in $(unzip -Z1 $apk classes*.dex); do count=$(($count + $(unzip -p $apk $dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'))) ; done ; echo $count |
Add these lines to the bottom of the file:
# ~/.bashrc
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
After editing the file execute this commands
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void jackpot() { puts("jackpot!"); } | |
int main() | |
{ | |
puts("[+] allocate p1, p2"); | |
char *p1 = malloc(0x100); |
// Minimal audio streaming using OpenSL. | |
// | |
// Loosely based on the Android NDK sample code. | |
// Hardcoded to 44.1kHz stereo 16-bit audio, because as far as I'm concerned, | |
// that's the only format that makes any sense. | |
#include <assert.h> | |
#include <string.h> | |
// for native audio |
diff -Naur qemu-2.7.0.orig/cpu-exec.c qemu-2.7.0/cpu-exec.c | |
--- qemu-2.7.0.orig/cpu-exec.c 2016-09-02 17:34:17.000000000 +0200 | |
+++ qemu-2.7.0/cpu-exec.c 2017-01-19 09:34:00.817088525 +0100 | |
@@ -33,6 +33,9 @@ | |
#include "hw/i386/apic.h" | |
#endif | |
#include "sysemu/replay.h" | |
+#include "syscall_defs.h" | |
+ | |
+extern int do_nx; |
import android.animation.TypeEvaluator; | |
import android.animation.ValueAnimator; | |
import static java.lang.Math.pow; | |
public class GammaEvaluator implements TypeEvaluator { | |
private static final GammaEvaluator instance = new GammaEvaluator(); | |
/** |
package org.telegram.example.SendMessage; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; | |
import org.apache.http.client.methods.HttpPost; | |
import org.apache.http.message.BasicNameValuePair; | |
import org.json.JSONArray; | |
import org.json.JSONObject; | |
import java.io.IOException; |
''' | |
Using Z3 to check if the number is prime | |
Original reference: https://stackoverflow.com/a/35653749/1768052 | |
''' | |
from z3 import * | |
def isPrime(x): | |
y, z = Ints("y z") |