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 <sys/stat.h> | |
#include <fcntl.h> | |
#include <limits.h> | |
#include <sys/mman.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <pvm3.h> | |
int main() { | |
const double yMin = -1.0; | |
const double yMax = +1.0; | |
const double xMin = -2.0; | |
const double xMax = +0.5; |
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 <stdlib.h> | |
#include <math.h> | |
#include <limits.h> | |
#include <float.h> | |
#include <stdio.h> | |
#define N 300000 | |
#define K 100 | |
#define TOLERANCE 0.00001 | |
#define SEED 11 |
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 <pthread.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <limits.h> | |
#include <float.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#define CANT_THREADS 8 |
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 <pthread.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <limits.h> | |
#include <float.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <pvm3.h> | |
#define CANT_SLAVES 20 |
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 sys | |
from socket import (socket, AF_INET, SOCK_DGRAM, SOL_SOCKET, SO_REUSEADDR, | |
SO_BROADCAST) | |
from struct import pack, unpack | |
UDP_IP = "127.0.0.1" | |
UDP_PORT = 6454 |
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 "mbed.h" | |
InterruptIn device1(p11); | |
InterruptIn device2(p12); | |
InterruptIn device3(p13); | |
DigitalOut led1(LED1); | |
DigitalOut led2(LED2); | |
DigitalOut led3(LED3); |
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 "Arduino.h" | |
// Include API-Headers | |
extern "C" { | |
#include "ets_sys.h" | |
#include "os_type.h" | |
#include "osapi.h" | |
#include "mem.h" | |
#include "user_interface.h" | |
#include "cont.h" |
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
// Based in http://stackoverflow.com/a/2686098/4436816 | |
// | |
// Usage examples: | |
// {{ 2134124 | abbreviate:2}} -> 2.13M | |
// {{ 2134124 | abbreviate }} -> 2M | |
// {{ 1000 | abbreviate }} -> 1K | |
myApp.filter('abbreviate', function() { | |
return function(number, decPlaces) { |
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
(function() { | |
var lastScrollY = 0; | |
var ticking = false; | |
var update = function() { | |
// do your stuff | |
ticking = false; | |
}; | |
var requestTick = function() { |
OlderNewer