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
// Mutual Exclusion Example | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#define NUM_THREADS 500 | |
#define N_SUM 100000 | |
void* sum(void *t) | |
{ |
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
#ifndef _CERTUGOL_H_ | |
#define _CERTUGOL_H_ | |
#define se if | |
#define paratodo for | |
#define enquanto ; | |
#define principal main | |
#define vazio void | |
#define retorne return | |
#define inteiro int |
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> | |
#define CAT(a, ...) PRIMITIVE_CAT(a, __VA_ARGS__) | |
#define PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__ | |
#define COMPL(b) PRIMITIVE_CAT(COMPL_, b) | |
#define COMPL_0 1 | |
#define COMPL_1 0 | |
#define BITAND(x) PRIMITIVE_CAT(BITAND_, x) |
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> | |
int print_0_99(int n){ | |
printf("%d\n",n); | |
((n<99) && print_0_99(n+1)); | |
return 0; | |
} | |
int main(){ | |
print_0_99(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
#include <stdio.h> | |
int main(){int n=12237514;/*imprime algo sobre você*/printf("%02x\n",*((int*)(&main+(n-12237503))));return 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
#include <stdio.h> | |
typedef void* (*f)(void); | |
int n = 0; | |
void* func(void){ | |
printf("%d\n", n++); | |
return &func; | |
} |
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
menu_parent Left | |
menu_child Right | |
menu_down Down | |
menu_up Up | |
scroll_left h | |
scroll_right l | |
scroll_up k | |
scroll_down j |
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
import skimage.feature | |
import skimage.data | |
import skimage.color | |
import skimage as sk | |
import matplotlib.pyplot as plt | |
img_astronaut = sk.color.rgb2gray(sk.data.astronaut()) | |
img_photographer = sk.data.camera() | |
parameters = [ |
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
/** @file any.hpp | |
* This class implement a generic placeholder for any type. | |
* Inspired by the awesome article "Valued Convertions" by | |
* Kevlin Henney. | |
* http://www.two-sdg.demon.co.uk/curbralan/papers/ValuedConversions.pdf | |
*/ | |
#pragma once | |
#include <cstdlib> | |
#include <string> |
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
sudo pacman -Scc | |
sudo pacman -S deepin deepin-extra lightdm deepin-manjaro mesa xf86-video-intel nvidia bumblebee | |
sudo systemctl enable lightdm.service --force | |
sudo systemctl enable bumblebeed.service | |
/usr/bin/cp -rf /etc/skel/. ~ |