repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
KIodine/naiveds | threaded-avltree/include/list.h | #ifndef LIST_H
#define LIST_H
#include <stddef.h>
#define list_entry(ptr, type, member) ({ \
void *__tmp = (void*)(ptr);\
(type *)((char*)(__tmp) - offsetof(type, member))\
})
struct list {
struct list *prev, *next;
};
#define list_decl(ident) struct list ident = {&(ident), &(ident)}
#define list_is_em... |
KIodine/naiveds | arrayq/fifoq.h | #ifndef FIFOQ_H
#define FIFOQ_H
#include <stdlib.h>
/* This implementation let indexes overflow freely, the size of
queue is round up to power of 2 automatically. */
struct fifoq {
int *arr;
unsigned int size;
unsigned int mask;
unsigned int front, end;
};
/*
...|X|...
^(front, end... |
KIodine/naiveds | union-find/src/unionfind.c | #include <assert.h>
#include "unionfind.h"
#define ALIAS_OF(func) __attribute__((weak, alias(#func)))
#define NO_UNUSED __attribute__((unused))
/* --- static functions --- */
/* NOTE: Implement different find with static function? */
NO_UNUSED
static struct ufnode *find_path_halving(struct ufnode *node){
struct u... |
KIodine/naiveds | singly-linked-list/sllist.c | <reponame>KIodine/naiveds<filename>singly-linked-list/sllist.c
#include "sllist.h"
static
struct sllnode *node_alloc(int val){
struct sllnode *node = NULL;
node = calloc(1, sizeof(struct sllnode));
node->val = val;
return node;
}
static
void node_purge(struct sllist *list){
struct sllnode *hold, *... |
KIodine/naiveds | intrusive-rbtree/rbtree.c | #include "rbtree.h"
/*
* Rewrite rbtree to intrusive version:
* - new nodes are prepared outside APIs.
* - no alloc and free inside API.
*/
enum chiral {
CHIRAL_LEFT = 0,
CHIRAL_RIGHT = 1
};
static
int node_validate(struct rbtree *tree, struct rbtnode *node){
int bh_l = 0, bh_r;
if... |
KIodine/naiveds | doubly-linked-list/main.c | #include <stdio.h>
#include <assert.h>
#include "dllist.h"
#define NL "\n"
void basic_test(void){
// alloc
int res;
struct dllist *list;
printf("alloc"NL);
list = dll_alloc();
// push and pop
printf("push pop"NL);
for (int i = 0; i < 8; ++i){
dll_push(list, i);
}
fo... |
saltares/grannys-bloodbath | src/engine/parser.h | <filename>src/engine/parser.h
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option... |
saltares/grannys-bloodbath | src/engine/image.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/scene.h | <filename>src/engine/scene.h<gh_stars>1-10
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(a... |
saltares/grannys-bloodbath | src/engine/hud.h | <reponame>saltares/grannys-bloodbath<filename>src/engine/hud.h<gh_stars>1-10
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either v... |
saltares/grannys-bloodbath | src/engine/scenemngr.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/specialscene.h | <reponame>saltares/grannys-bloodbath
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your... |
saltares/grannys-bloodbath | src/engine/sound.h | <gh_stars>1-10
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later ver... |
saltares/grannys-bloodbath | src/engine/actorfactory.h | <filename>src/engine/actorfactory.h
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your ... |
saltares/grannys-bloodbath | src/engine/fpsmngr.h | <gh_stars>1-10
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later ver... |
saltares/grannys-bloodbath | doc/pspdev/keyboard.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/story.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/keyboard.h | <reponame>saltares/grannys-bloodbath
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your... |
saltares/grannys-bloodbath | src/engine/item.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/game.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gra... |
saltares/grannys-bloodbath | src/engine/collisionmngr.h | <reponame>saltares/grannys-bloodbath
#ifndef _COLLISIONMNGR_
#define _COLLISIONMNGR_
#include <vector>
#include "actor.h"
#include "level.h"
//! Clase para gestionar colisiones entre actores y con el escenario
/**
@author <NAME>
@version 1.0
Esta clase se utiliza para detectar y gestionar colisiones tanto actor... |
saltares/grannys-bloodbath | src/engine/level.h | <reponame>saltares/grannys-bloodbath
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your... |
saltares/grannys-bloodbath | src/engine/boxedtext.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/option.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/actor.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/logger.h | #ifndef _LOGGER_
#define _LOGGER_
#include <iostream>
#include <fstream>
#include <string>
//! Gestiona los logs de eventos, utilizado para depuración
/**
@author <NAME>
@version 1.0
Clase que sigue el patrón de diseño Singleton (una sóla instancia accesible desde todo el sistema).
Se utiliza para llevar un re... |
saltares/grannys-bloodbath | src/engine/spider.h | <filename>src/engine/spider.h
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option... |
saltares/grannys-bloodbath | src/engine/music.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/enemy.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/font.h | <filename>src/engine/font.h
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) ... |
saltares/grannys-bloodbath | src/engine/bullet.h | <filename>src/engine/bullet.h
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option... |
saltares/grannys-bloodbath | src/engine/resourcemngr.h | <reponame>saltares/grannys-bloodbath
/*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your... |
saltares/grannys-bloodbath | src/engine/granny.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/application.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/animation.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
saltares/grannys-bloodbath | src/engine/menu.h | /*
This file is part of Granny's Bloodbath.
Granny's Bloodbath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gran... |
unwiredlabs/geocoder-ios-sdk | Unwired Labs iOS SDK/Unwired_Labs_iOS_SDK.h | //
// Unwired_Labs_iOS_SDK.h
// Unwired Labs iOS SDK
//
// Copyright © 2018 Unwired Labs (India) Pvt. Ltd. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for Unwired_Labs_iOS_SDK.
FOUNDATION_EXPORT double Unwired_Labs_iOS_SDKVersionNumber;
//! Project version string for Unwired_Labs_i... |
anthony-y/ftc | ftc.c | <reponame>anthony-y/ftc
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef unsigned char u8;
typedef unsigned long int u64;
#define ASSERT_FALSE() (*(int *)0)
#define IO_BUFFER_SIZE 10240 // 10kb
// For any of these, you can change the "1;" to a "0;" to make it non-bold (these are all bold by de... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex6.c | /*Escreva um programa que leia 10 números inteiros e os armazene em um vetor.
Imprima o vetor, o maior elemento e a posição que ele se encontra.*/
#include <stdio.h>
#include <stdlib.h>
int main (){
int numeros [10],i=0,maior=0,cont=0;
for (i;i<=9;i++){
printf("Digite o %d valor:\t", i+1);
s... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex3.c | /*Ler um conjunto de números reais, armazenando-o em vetor e calcular o quadrado
dos componentes deste vetor, armazenando o resultado em outro vetor.
Os conjuntos têm 10 elementos cada. Imprimir todos os conjuntos.*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main (void){
float vetor[10], resu... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex2.c | /*Implemente um código que leia o Raio de um circulo e calcule a área
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main (){
float raio, area=0;
printf("Digite o raio de uma circunferencia: \n");
scanf("%f", &raio);
area = M_PI * (pow(raio,2));
printf("Area da circunferencia: %... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex26.c | /*Informe se um número digitado é primo. Caso não for, informe por quais números ele é divisível;*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
int i=1, x, cont=0;
printf("Digite um numero:\t");
scanf("%d",&x);
for(i;i<=x;i++){
if(x%i==0){
printf("O numero e divisivel ... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex17.c | <reponame>murilloaguiar/Faculdade-AEDS-I
/*Leia uma matriz de 3 x 3 elementos. Calcule a soma dos elementos que estão na diagonal principal.*/
#include <stdlib.h>
#include <stdio.h>
int main(){
int matriz[3][3],soma=0,i=0,j=0;
printf("Matriz 3X3: ");
for(i;i<3;i++){
for(j=0;j<3;j++){
... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex13.c | <gh_stars>0
/*Declare uma matriz 5 x 5. Preencha com 1 a diagonal principal e com 0 os demais elementos. Escreva ao final a matriz obtida.*/
#include <stdlib.h>
#include <stdio.h>
int main(){
int matriz[5][5],i=0,j=0;
printf("MATRIZ 5X5: \n");
for(i;i<5;i++){
for(j=0;j<5;j++){
if (i==... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex14.c | /*Escrever um algoritmo que imprima a tabuada de um número informado pelo usuário*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
int i=0;
float a;
printf("Digite um numero\n");
scanf("%f",&a);
for(i;i<=10;i++){
printf("%.2f X %d = %.2f\n",a,i,a*i);
}
return 0;
system("pause... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex28.c | <reponame>murilloaguiar/Faculdade-AEDS-I
/*Calcule a soma de todos os números primos existentes entre 1 e 100;*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
int i=2,cont=0,x=1,soma=0;
for(i;i<=100;i++){
for(x;x<=i;x++){
if(i%x==0)
cont++;
}
if(co... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex4.c | /*Leia um vetor de 10 posições. Contar e escrever quantos valores pares ele possui.*/
#include <stdio.h>
#include <stdlib.h>
int main (){
int numeros [10],i=0,cont=0,j=0;
printf("DIGITE 10 VALORES\n");
for (i;i<=9;i++){
printf("Digite o %d valor:\t", i+1);
scanf("%d", &numeros[i]);
... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex18.c | <reponame>murilloaguiar/Faculdade-AEDS-I
/*17 - Escrever um programa de computador que leia 10 números
inteiros e, ao final, apresente a soma de todos os números lidos;*/
/*18- Faça o mesmo que antes, porém, ao invés de ler 10 números,
o programa deverá ler e somar números até que o valor digitado seja zero ( 0 ).*/... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex16.c | /*Em uma turma há 10 alunos. Cada aluno tem 2 notas.
Um professor precisa calcular a média das duas notas de cada aluno.
Crie um programa que resolve este problema.*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
int i=1,x=1;
float nota,soma=0;
for(i;i<=10;i++){
for(x;x<=2;x++){
... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex18.c | <filename>Lista 2/lista_ex18.c
/*Gere matriz 4 x 4 com valores no intervalo [1, 20]. Escreva um programa que transforme a
matriz gerada numa matriz triangular inferior, ou seja, atribuindo zero a todos os elementos
acima da diagonal principal. Imprima a matriz original e a matriz transformada*/
#include <stdlib.h>
#i... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex2.c | /*Faça um programa que lê três palavras do teclado e imprime as três palavras na ordem inversa.*/
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main (void){
char vetor[10];
int i=0,j=0,x=0;
scanf("%s",&vetor);
printf("%s\n",vetor);
setbuf(stdin, NULL);
for(i=9... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex24.c | /*Escreva um programa que leia um valor correspondente ao número de jogadores
de um time de vôlei. O programa deverá ler uma altura para cada um dos jogadores
, ao final, informar a altura média do time.*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
int i=1,j;
float altura,soma=0;
printf("Digi... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex11.c | <reponame>murilloaguiar/Faculdade-AEDS-I
/*Faça um programa que leia um vetor de 5 posições para números reais e, depois, um código inteiro.
Se o código for zero, finalize o programa; se for 1, mostre o vetor na ordem direta; se for 2,
mostre o vetor na ordem inversa. Caso, o código for diferente de 1 e 2 escreva uma m... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex10.c | /*Ler 4 notas de um aluno. Fazer a média e informar “Aprovado” caso seja maior
ou igual a 7. Caso seja menor que 7, deve-se solicitar a nota da avaliação de
recuperação e fazer média novamente.*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
float nota,soma=0,n3,n4;
int i=1,x=1;
for(i;i<=4;i++... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex22.c | /*Escreva um programa que leia dois valores reais. Ambos valores deverão
ser lidos até que o usuário digite um número no intervalo de 1 a 100.
Apresentar a soma dos dois valores lidos.*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
float a,b,soma=0;
printf("O programa so se encerrara quando digita... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex19.c | <gh_stars>0
/*Crie um programa em C que leia uma matriz de 5 linhas e 4 colunas contendo as seguintes
informações sobre alunos de uma disciplina, sendo todas as informações do tipo inteiro:
1 - Primeira coluna: numero de matricula (use um inteiro);
2 - Segunda coluna: média das provas;
3 - Terceira coluna... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex15.c | <gh_stars>0
/*Leia uma matriz 5 x 5. Leia também um valor X. O programa deverá fazer uma busca desse valor na
matriz e, ao final, escrever a localização (linha e coluna) ou uma mensagem de “não encontrado”.
*/
#include <stdlib.h>
#include <stdio.h>
int main(){
char matriz[5][5];
int i=0,j,cont=0,c=0,l=0;
... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex20.c | <reponame>murilloaguiar/Faculdade-AEDS-I
/*Faça um programa para corrigir uma prova com 10 questões de múltipla escolha (a, b, c, d).
Cada questão vale um ponto. Primeiro solicite ao usuário que digite o gabarito, depois
peça para digitar as respostas dos alunos. Calcule e escreva: A nota do aluno
e se ele foi aprovad... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex14.c | <reponame>murilloaguiar/Faculdade-AEDS-I
/*Leia uma matriz 4 x 4, imprima a matriz e retorne à localização (linha e a coluna) do maior valor.*/
#include <stdlib.h>
#include <stdio.h>
int main(){
int matriz[4][4],i=0,j=0,maior=0,c=0,l=0;
printf("MATRIZ 4X4: \n");
for(i;i<4;i++){
for(j=0;j<4;j++){
... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex6.c | <reponame>murilloaguiar/Faculdade-AEDS-I<filename>Lista 1/lista-ex6.c
/*Faça um algoritmo que leia um número e diga se este número
está no intervalo entre 100 e 200.*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
float x;
printf("Digite um numero\t");
scanf("%f", &x);
if(x>100 && x<200){
... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex1.c | /*Crie um programa que lê 6 valores inteiros e, em seguida, mostre na tela os valores lidos.*/
#include <stdio.h>
#include <stdlib.h>
int main (void){
int vetor[6], i=0;
for (i;i<6;i++){
printf("Digite o %d valor:\t", i+1);
scanf("%d", &vetor[i]);
}
for (i=0;i<6;i++){
printf(... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex12.c | <filename>Lista 2/lista_ex12.c
/*Leia uma matriz 4 x 4, conte e escreva quantos valores maiores que 10 ela possui.*/
#include <stdlib.h>
#include <stdio.h>
int main(){
int matriz[4][4],i=0,j=0,cont=0;
printf("MATRIZ 4X4: \n");
for(i;i<4;i++){
for(j=0;j<4;j++){
scanf("%d", &matriz[i][j... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex4.c | <filename>Lista 1/lista-ex4.c
/*Um aluno do Curso de Engenharia da Unimontes deseja ir ao FEPEG 2019.
Crie um algoritmo que leia duas informações:
1 - O alunto tem dinheiro para a viagem (verdadeiro ou falso) e
2 - Os pais deixam participar do evento (verdadeiro ou falso)
Exiba como resposta se o aluno irá à... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex16.c | /*Leia duas matrizes 4 x 4 e escreva uma terceira com os maiores valores de cada posição das matrizes lidas*/
#include <stdlib.h>
#include <stdio.h>
int main(){
int matriz[4][4],matriz1[4][4],result[4][4],i=0,j=0;
printf("Primeira matriz(4x4): ");
for(i;i<4;i++){
for(j=0;j<4;j++){
sca... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex12.c | <filename>Lista 1/lista-ex12.c
/*Faça um programa que imprima os 20 primeiros itens da sequência de Fibonacci.
Sequência: 0,1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89...*/
#include <stdio.h>
int main(void)
{
int n1 = 0, n2 = 1, n3 = 0, i;
for (i = 1; i < 20; i++){
if (i == 1){
printf("%d, ", n1);
_sleep(500);
... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex20.c | /*Escreva um algoritmo que leia valores inteiros e encontre o maior e o menor deles.
Termine a leitura se o usuário digitar zero (0);*/
#include<stdio.h>
#include<stdlib.h>
int main (void){
int a=1,maior=0,menor=0;
printf("O programa so se encerrara quando digitar 0\n");
while (a!=0){
printf("Di... |
murilloaguiar/Faculdade-AEDS-I | Lista 1/lista-ex8.c | <reponame>murilloaguiar/Faculdade-AEDS-I<filename>Lista 1/lista-ex8.c
/*Implemente um código que receba três números inteiros e
retorne uma destas três mensagens:
1 - Os três valores são iguais
2 - Não há valores iguais; ou
3 - Há dois valores iguais e um diferente.
*/
#include<stdio.h>
#include<stdlib.... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex10.c | <reponame>murilloaguiar/Faculdade-AEDS-I<filename>Lista 2/lista_ex10.c
/*Leia um vetor de 10 posições e atribua valor 0 para todos os elementos que possuírem valores negativos.*/
#include <stdio.h>
#include <stdlib.h>
int main (){
int i=0,j=0,numeros [10];
printf("DIGITE 10 NUMEROS: \n");
for (i;i<=9;i++... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex9.c | <gh_stars>0
/*Fazer um programa para ler 5 valores e em seguida, mostrar a posição onde se entram o maior e o menor valor.*/
#include <stdio.h>
#include <stdlib.h>
int main (){
int numeros [10],i=0,menor=0,maior=0,cont1=0,cont=0;
printf("DIGITE 10 NUMEROS: \n");
for (i;i<=9;i++){
printf("Digite o... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex8.c | <gh_stars>0
/*Faça um programa que preencha um vetor com 10 números reais, calcule e mostre a
quantidade de números negativos e a soma dos números positivos desse vetor.*/
#include <stdio.h>
#include <stdlib.h>
int main (){
float numeros [10],cont=0;
int i=0,j=0;
printf("DIGITE 10 NUMEROS: \n");
for ... |
murilloaguiar/Faculdade-AEDS-I | Lista 2/lista_ex7.c | <filename>Lista 2/lista_ex7.c
/*Faça um programa para ler a nota da prova de 15 alunos e armazene num vetor, calcule e imprima a média geral.*/
#include <stdio.h>
#include <stdlib.h>
int main (){
float notas [15],cont=0;
int i=0;
printf("DIGITE 15 NOTAS: \n");
for (i;i<=14;i++){
printf("Digite... |
muyoy/box2d-lite | include/box2d-lite/World.h | /*
* Copyright (c) 2006-2009 <NAME> http://www.gphysics.com
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies.
* Erin Catto makes no representations about the suita... |
sshutdownow/rsyslog-mmexternal-C-example | mmexternal_strip_garbage.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int is_working = 1;
int
main(int argc, char **argv)
{
char buf[64*1024];
do {
unsigned int idx;
if (fgets(buf, sizeof(buf), stdin) == NULL) {
is_working = 0; /* end of file means ter... |
manicphotons/vss | main.c | /*─────────────────────────────────────────────────────────────────────────────
* PENDING TASKS
*
* Check for and correctly handle errors when using xlib.
* Set all relavent window properties (WM_NAME etc…) for window manager usage.
* Load/save settings from/to a config file.
* Create vulkan interface.
* Handle ... |
RabbitBio/RabbitBM | src/DataPool.h | <reponame>RabbitBio/RabbitBM
/*
This file is a part of DSRC software distributed under GNU GPL 2 licence.
The homepage of the DSRC project is http://sun.aei.polsl.pl/dsrc
Authors: <NAME> and <NAME>
Version: 2.00
*/
/*
This file is modified by SDU HPC lab for RabbitQC project.
Last modified: JULY2019 ... |
RabbitBio/RabbitBM | src/Fastq.h | /*
This file is a part of DSRC software distributed under GNU GPL 2 licence.
The homepage of the DSRC project is http://sun.aei.polsl.pl/dsrc
Authors: <NAME> and <NAME>
Version: 2.00
*/
/*
This file is modified by SDU HPC lab for RabbitQC project.
Last modified: JULY2019
*/
#ifndef ... |
RabbitBio/RabbitBM | src/pigz.h | //
// Created by ylf9811 on 2021/10/14.
//
#ifndef PAC2022_PIGZ_H
#define PAC2022_PIGZ_H
#include "readerwriterqueue.h"
#include "atomicops.h"
#include <atomic>
int main_pigz(int argc, char **argv, moodycamel::ReaderWriterQueue<std::pair<int, std::pair<char *, int>>> *Q,
std::atomic_int *wDone,
... |
RabbitBio/RabbitBM | src/barcodeToPositionMulti.h | #ifndef BARCODETOPOSITIONMULTI_H
#define BARCODETOPOSITIONMULTI_H
#include <string>
#include <unordered_map>
//#include "robin_hood.h"
#include <atomic>
#include <thread>
#include <functional>
#include <sys/time.h>
#include "options.h"
#include "barcodePositionMap.h"
#include "barcodeProcessor.h"
#include "fixedfilte... |
RabbitBio/RabbitBM | src/common.h | <reponame>RabbitBio/RabbitBM<gh_stars>0
#ifndef COMMON_H
#define COMMON_H
#define FASTP_VER "0.20.0"
#define _DEBUG false
#include <boost/serialization/string.hpp>
#include <boost/serialization/unordered_map.hpp>
#include <mpi.h>
//#define PRINT_INFO
typedef long long int int64;
typedef unsigned long long int uint... |
RabbitBio/RabbitBM | src/Globals.h | /*
This file is a part of DSRC software distributed under GNU GPL 2 licence.
The homepage of the DSRC project is http://sun.aei.polsl.pl/dsrc
Authors: <NAME> and <NAME>
Version: 2.00
*/
/*
This file is modified by SDU HPC lab for RabbitQC project.
Last modified: JULY2019
*/
#ifndef H_GLOBALS
#defin... |
RabbitBio/RabbitBM | src/barcodeListMerge.h | #ifndef BARCODELISTMERGE_H
#define BARCODELISTMERGE_H
#include <iostream>
#include <unordered_map>
//#include "robin_hood.h"
#include <vector>
#include <fstream>
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
#include <boost/serialization/unordered_map.hpp>
#include "options.... |
RabbitBio/RabbitBM | src/yarn.h | <filename>src/yarn.h
/* yarn.h -- generic interface for threadPigz operations
* Copyright (C) 2008, 2011, 2012, 2015, 2018, 2019, 2020 <NAME>
* Version 1.7 12 Apr 2020 <NAME>
*/
/*
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any d... |
RabbitBio/RabbitBM | src/fastqreader.h | #ifndef FASTQ_READER_H
#define FASTQ_READER_H
#include <stdio.h>
#include <stdlib.h>
#include "read.h"
#ifdef DYNAMIC_ZLIB
#include <zlib.h>
#else
#include "zlib/zlib.h"
#endif
#include "common.h"
#include <iostream>
#include <fstream>
#include "FastqIo.h"
#include "FastqStream.h"
#include "readerwriterqueue.h"
#... |
RabbitBio/RabbitBM | lib/gzip_constants.h | /*
* gzip_constants.h - constants for the gzip wrapper format
*/
#ifndef LIB_GZIP_CONSTANTS_H
#define LIB_GZIP_CONSTANTS_H
#define GZIP_MIN_HEADER_SIZE 10
#define GZIP_FOOTER_SIZE 8
#define GZIP_MIN_OVERHEAD (GZIP_MIN_HEADER_SIZE + GZIP_FOOTER_SIZE)
#define GZIP_ID1 byte(0x1F)
#define GZIP_ID2 byte(0x8B)
#define ... |
RabbitBio/RabbitBM | src/tree.h | <filename>src/tree.h
/*
Copyright 2011 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... |
RabbitBio/RabbitBM | src/Buffer.h | <gh_stars>0
/*
This file is a part of DSRC software distributed under GNU GPL 2 licence.
The homepage of the DSRC project is http://sun.aei.polsl.pl/dsrc
Authors: <NAME> and <NAME>
Version: 2.00
*/
/*
This file is modified by SDU HPC lab for RabbitQC project.
Last modified: JULY2019
*/
#ifndef BUFF... |
RabbitBio/RabbitBM | src/writerThread.h | <gh_stars>0
#ifndef WRITER_THREAD_H
#define WRITER_THREAD_H
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <cstring>
#include <vector>
#include "writer.h"
#include <atomic>
#include <mutex>
#include "atomicops.h"
#include "readerwriterqueue.h"
#include "util.h"
#include "options.h"
using namespace ... |
RabbitBio/RabbitBM | src/try.h | <reponame>RabbitBio/RabbitBM
/* try.h -- try / catch / throw exception handling for C99
Copyright (C) 2013, 2015 <NAME>
Version 1.2 19 January 2015
This software is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of ... |
RabbitBio/RabbitBM | src/FastqIo.h | <reponame>RabbitBio/RabbitBM
/*
This file is a part of DSRC software distributed under GNU GPL 2 licence.
The homepage of the DSRC project is http://sun.aei.polsl.pl/dsrc
Authors: <NAME> and <NAME>
Version: 2.00
*/
#ifndef H_FASTQREADER
#define H_FASTQREADER
#include "Globals.h"
#include ... |
RabbitBio/RabbitBM | src/htmlreporter.h | #ifndef HTML_REPORTER_H
#define HTML_REPORTER_H
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include "options.h"
#include <fstream>
#include <sstream>
#include "barcodePositionMap.h"
using namespace std;
class HtmlReporter{
public:
HtmlReporter(Options* opt);
~HtmlReporter();... |
RabbitBio/RabbitBM | src/options.h | <filename>src/options.h
#ifndef OPTIONS_H
#define OPTIONS_H
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <cctype>
#include <algorithm>
#include "util.h"
using namespace std;
class DrawHeatMapOptions {
public:
DrawHeatMapOptions() {
}
public:
//hashmap file of the o... |
RabbitBio/RabbitBM | src/barcodePositionConfig.h | #ifndef BARCODE_POSITION_CONFIG_H
#define BARCODE_POSITION_CONFIG_H
#include <stdio.h>
#include <unordered_map>
//#include "robin_hood.h"
#include <unordered_set>
#include "common.h"
#include "options.h"
#include "barcodePositionMap.h"
using namespace std;
class BarcodePositionConfig {
public:
BarcodePositionConfi... |
RabbitBio/RabbitBM | src/bloomFilter.h | <reponame>RabbitBio/RabbitBM
//
// Created by ylf9811 on 2021/9/28.
//
#ifndef PAC2022_BLOOMFILTER_H
#define PAC2022_BLOOMFILTER_H
#include "common.h"
#include <iostream>
class BloomFilter {
public:
BloomFilter();
bool push(uint64 key);
bool get(uint64 key);
bool push_mod(uint64 key);
bool get_mo... |
RabbitBio/RabbitBM | lib/deflate_constants.h | /*
* deflate_constants.h - constants for the DEFLATE compression format
*/
#ifndef LIB_DEFLATE_CONSTANTS_H
#define LIB_DEFLATE_CONSTANTS_H
/* Valid block types */
#define DEFLATE_BLOCKTYPE_UNCOMPRESSED 0
#define DEFLATE_BLOCKTYPE_STATIC_HUFFMAN 1
#define DEFLATE_BLOCKTYPE_DYNAMIC_HUFFMAN 2
/* Minimum and maximum ... |
RabbitBio/RabbitBM | src/symbols.h | <gh_stars>0
/*
Copyright 2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
RabbitBio/RabbitBM | src/result.h | <reponame>RabbitBio/RabbitBM
#ifndef RESULT_H
#define RESULT_H
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <map>
#include <unordered_map>
//#include "robin_hood.h"
#include <iomanip>
#include "common.h"
#include "options.h"
#include "writer.h"
#include "barcode... |
RabbitBio/RabbitBM | src/DataQueue.h | /*
This file is a part of DSRC software distributed under GNU GPL 2 licence.
The homepage of the DSRC project is http://sun.aei.polsl.pl/dsrc
Authors: <NAME> and <NAME>
Version: 2.00
*/
/*
This file is modified by SDU HPC lab for RabbitQC project.
Last modified: JULY2019
*/
#ifndef H_DATAQUEUE
#def... |
RabbitBio/RabbitBM | src/DataStream.h | /*
This file is a part of DSRC software distributed under GNU GPL 2 licence.
The homepage of the DSRC project is http://sun.aei.polsl.pl/dsrc
Authors: <NAME> and <NAME>
Version: 2.00
*/
/*
This file is modified by SDU HPC lab for RabbitQC project.
Last modified: JULY2019
*/
#ifndef H_DATASTREAM
#de... |
RabbitBio/RabbitBM | src/barcodeProcessor.h | <reponame>RabbitBio/RabbitBM
#ifndef BARCODE_PROCESSOR_H
#define BARCODE_PROCESSOR_H
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <sstream>
#include <iostream>
#include <unordered_map>
#include "read.h"
#include "util.h"
#include "barcodePositionMap.h"
#include "options.h"
#include "... |
RabbitBio/RabbitBM | src/util.h | #ifndef UTIL_H
#define UTIL_H
#include <stdlib.h>
#include <string>
#include <iostream>
#include <vector>
#include <sys/stat.h>
#include <algorithm>
#include <time.h>
#include <mutex>
#include "common.h"
using namespace std;
inline bool starts_with(string const &value, string const &starting) {
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.