This file contains 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 n = 0; | |
let primes: number[] = []; // [1, 2, 3, 5] | |
while(primes.length < 10) { | |
++n; | |
let skip = false; | |
for (let i = 1; i < primes.length && !skip; i++) { | |
if (n % primes[i] == 0) { |
This file contains 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/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 <input_type> <output_type>" | |
exit 1 | |
fi | |
tinput=$1 | |
toutput=$2 |
This file contains 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 "FreeRTOS.h" | |
#include "task.h" | |
#include "timers.h" | |
#include "event_groups.h" | |
#include "queue.h" | |
#include "semphr.h" | |
#include "xil_printf.h" | |
#include "xparameters.h" |
This file contains 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 "FreeRTOS.h" | |
#include "task.h" | |
#include "timers.h" | |
#include "event_groups.h" | |
#include "xil_printf.h" | |
#include "xparameters.h" | |
#define WITH_COMPARE |
This file contains 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
__global__ void kernel3_char(uint8_t *current, uint8_t *matrix, char *text, int textLen, int N, int matrixWidth, int currWidth, int fullArea) { | |
int thid = threadIdx.x + blockIdx.x * blockDim.x; | |
chunk_t cc; | |
extern __shared__ uint8_t s_matrix[]; | |
if (!thid) { | |
for (int i = 0; i < (sizeof(CHARS_STR) - 1) * fullArea; i++) { | |
s_matrix[i] = matrix[i]; | |
} | |
} |
This file contains 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 <fcntl.h> /* For O_RDWR */ | |
#include <sys/ioctl.h> | |
#include <unistd.h> /* For open(), creat() */ | |
#include <netdb.h> | |
#include <sys/epoll.h> | |
#include <sys/socket.h> | |
#include <unistd.h> | |
#include <signal.h> |
This file contains 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
instr2operands = { | |
'0011000' : ['add', 'add', 'pv.add.h', 'pv.add.b'], | |
'0011001' : ['sub', 'sub', 'pv.sub.h', 'pv.sub.b'], | |
'0101111' : ['xor', 'xor', 'pv.xor.sc.h', 'pv.xor.sc.b'], | |
'0101110' : ['or', 'or', 'pv.or.sc.h', 'pv.or.sc.b'], | |
'0010101' : ['and', 'and', 'pv.and.sc.h', 'pv.and.sc.b'], | |
# Shifts | |
'0100100' : ['sra', 'sra', 'pv.sra.sc.h', 'pv.sra.sc.b'], |
This file contains 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
uint32_t Flash_Write_Data (uint32_t StartPageAddress, uint32_t *Data, uint16_t numberofwords) { | |
static FLASH_EraseInitTypeDef EraseInitStruct; | |
uint32_t PAGEError; | |
int sofar=0; | |
/* Unlock the Flash to enable the flash control register access *************/ | |
HAL_FLASH_Unlock(); | |
/* Fill EraseInit structure*/ | |
EraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS; |
This file contains 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 <unistd.h> | |
#include <fcntl.h> | |
#include <stdint.h> | |
#include <sys/stat.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define memcpy_lol(_dst, _src, _size, _loc) {\ | |
memcpy(_dst, _src, _size);\ |
This file contains 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
1 2021-07-18 16:32:36,334 - INFO - **** INITIALISING NEW VIMSPECTOR SESSION **** | |
2 2021-07-18 16:32:36,334 - INFO - API is: | |
1 2021-07-18 16:32:36,334 - INFO - VIMSPECTOR_HOME = /home/gabri97/.vim/bundle/vimspector | |
2 2021-07-18 16:32:36,338 - INFO - gadgetDir = /home/gabri97/.vim/bundle/vimspector/gadgets/linux | |
3 2021-07-18 16:32:36,338 - INFO - User requested start debug session with {} | |
4 2021-07-18 16:32:36,339 - DEBUG - Reading configurations from: None | |
5 2021-07-18 16:32:36,339 - DEBUG - Reading configurations from: /home/gabri97/testgit/.vimspector.json | |
6 2021-07-18 16:32:36,341 - DEBUG - Reading gadget config: /home/gabri97/.vim/bundle/vimspector/gadgets/linux/.gadgets.json | |
7 2021-07-18 16:32:36,344 - DEBUG - Reading gadget config: None | |
8 2021-07-18 16:32:37,628 - INFO - Configuration: {"adapter": "vscode-cpptools", "configuration": {"request": "launch", "program": "/home/gabri97/testgit/a.out", "args": [], "cwd": "/hom |
NewerOlder