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
// usage: | |
// gcc -o thread threads.c | |
// ./thread time | |
// time is the number of seconds | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.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 <stdlib.h> | |
#include <stdio.h> | |
#include <pthread.h> | |
#include <stdbool.h> | |
void* sleep_func(void* argument) | |
{ | |
int time = 10; | |
sleep(time); |
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
# DESCRIPTION: | |
# A simple zsh configuration that gives you 90% of the useful features that I use everyday. | |
# | |
# AUTHOR: | |
# Geoffrey Grosenbach http://peepcode.com | |
# Colors | |
autoload -U colors | |
colors | |
setopt prompt_subst |
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
# application.rb | |
class Application < Sinatra::Base | |
set :root, File.dirname(__FILE__) | |
end |
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
cat usr/share/calendar/calendar.lotr | |
/* | |
* Lord Of The Rings | |
* | |
* $FreeBSD: src/usr.bin/calendar/calendars/calendar.lotr,v 1.2 2003/10/09 00:31:48 grog Exp $ | |
*/ | |
#ifndef _calendar_lotr_ |
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> | |
int | |
main(int argc, char *argv[]) | |
{ | |
printf ("Hello World!\n"); | |
return EXIT_SUCCESS; | |
} |
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
% !TEX encoding = UTF-8 Unicode | |
\documentclass{abnt} | |
\usepackage{graphicx,url} | |
\usepackage[brazil]{babel} | |
\usepackage[utf8]{inputenc} | |
\usepackage[T1]{fontenc} | |
\usepackage{tabela-simbolos} | |
\usepackage{pgffor} | |
\usepackage[chapter]{algorithm} |
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
// To compile use this: | |
// make random CPPFLAGS=-std=gnu++11 | |
#include <iostream> | |
#include <random> | |
int main(int argc, char *argv[]) { | |
std::random_device rd; | |
int seed = rd(); | |
std::mt19937 g1 (seed); | |
std::mt19937_64 g2 (seed); |
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
// g++ -std=c++11 random.cpp -o random | |
#include <iostream> | |
#include <random> | |
int main () | |
{ | |
std::random_device rd; | |
std::cout << "default random_device characteristics:" << std::endl; | |
std::cout << "minimum: " << rd.min() << std::endl; |
This file has been truncated, but you can view the full file.
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
The source :rubygems is deprecated because HTTP requests are insecure. | |
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not. | |
*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** |