Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
sw = {'+': lambda a, b: a + b,
'-': lambda a, b: a - b,
'*': lambda a, b: a * b,
'/': lambda a, b: a / b}
from sys import argv
if len(argv) != 4:
#!/usr/bin/env python3
def soma(a, b):
return a + b
def sub(a, b):
return a - b
def mult(a, b):
return a * b
#include <iostream>
#include <sstream>
#include <omp.h>
using namespace std;
void sum(char* output, const long unsigned int d, const long unsigned int n) {
long unsigned int digits[d + 11];
int num_threads;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 100010
#define LEN 2300
unsigned int seq[MAX][LEN] = {0};
void double_dabble(int n, const unsigned int *arr, char **result)
@oten
oten / lower.c
Created September 28, 2015 17:13
#include <stdio.h>
#define LOWER_CHAR(C) ((C) += 'a' - 'A')
char*
lower(char *arr)
{
if (arr == NULL || *arr == '\0') return arr;
if (*arr >= 'A' && *arr <= 'Z') LOWER_CHAR(*arr);
return lower(arr + 1) - 1;
#coding: utf-8
import sys
from PyQt4 import QtGui
class Window(QtGui.QWidget):
def __init__(self):
QtGui.QWidget.__init__(self)
layout = QtGui.QVBoxLayout(self)
diff --git a/src/arch/util/mempool.c b/src/arch/util/mempool.c
index e0778b9..2b068f3 100644
--- a/src/arch/util/mempool.c
+++ b/src/arch/util/mempool.c
@@ -30,7 +30,7 @@ Heavily modified by Nikhil Jain 11/28/2011
#endif
#include "mempool.h"
-int cutOffPoints[] = {64,128,256,512,1024,2048,4096, 8192,16384,32768,
+size_t cutOffPoints[] = {64,128,256,512,1024,2048,4096, 8192,16384,32768,