Skip to content

Instantly share code, notes, and snippets.

View lccalluchi's full-sized avatar
:shipit:
Stay cool

Luis Dev lccalluchi

:shipit:
Stay cool
  • Perú - Arequipa
View GitHub Profile
/*!40101 SET NAMES utf8 */;
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ database /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE database;
DROP TABLE IF EXISTS categories;
CREATE TABLE `categories` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
// Author: Luis Alberto Ccalluchi Lopez
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <time.h>
#include <semaphore.h>
sem_t semaphore;
// Author: Luis Alberto Ccalluchi Lopez
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <time.h>
pthread_mutex_t mutex;
#define SIZE 5000
fruit_name mass width height color_score
apple 192 8.4 7.3 0.55
apple 180 8 6.8 0.59
apple 176 7.4 7.2 0.6
mandarin 86 6.2 4.7 0.8
mandarin 84 6 4.6 0.79
mandarin 80 5.8 4.3 0.77
mandarin 80 5.9 4.3 0.81
mandarin 76 5.8 4 0.81
apple 178 7.1 7.8 0.92
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/shm.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
// Laboratorio 05
#include <sys/types.h>
#include <wait.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
int pow(const int); // firma de la funcion pow
// Author: Luis Alberto Ccalluchi Lopez
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <time.h>
int array[5000];
void createArray(); // creacion de valores aleatorios
long long int addArray(); // suma secuencial de los valores de array[5000]