source
string
code_lang
string
content
string
idx
int64
the-stack-v2-dedup
C
#define _POSIX_C_SOURCE 200112L #include <stdio.h> #include <stdlib.h> #include <string.h> #include "socket.h" void socket_crear(Socket *this) { // nothing to do } int socket_bind(Socket *this, char *puerto) { int status; bool conectado = false; struct addrinfo hints; struct addrinfo *ptr, *aux;...
1,329,600
the-stack-v2-dedup
C
// WidgetBlueprintGeneratedClass UMG_SettingRowBorder.UMG_SettingRowBorder_C // Size: 0x328 (Inherited: 0x288) struct UUMG_SettingRowBorder_C : USettingRowBorder { struct FPointerToUberGraphFrame UberGraphFrame; // 0x288(0x08) struct UBorder* Border_84; // 0x290(0x08) struct UImage* DarkTint; // 0x298(0x08) struct ...
1,329,601
the-stack-v2-dedup
C
/* ** EPITECH PROJECT, 2019 ** dante_generator ** File description: ** errors_gestion;c */ #include <stdio.h> #include <stdlib.h> static int is_number(char *str) { size_t count = 0; if (str[0] == '-') count = 1; while (str[count] != '\0') { if (str[count] < '0' || str[count] > '9') ...
1,329,602
the-stack-v2-dedup
C
 #define X86_CR0_WP (1 << 16) #define kdlsym_addr_memset 0x003205C0 #define kdlsym_addr_icc_nvs_read 0x00395830 #define kdlsym_addr_sceSblGetEAPInternalPartitionKey 0x006256E0 #define PRX_IMPORT extern "C" __declspec (dllimport) #include "unjail.h" #include "x86-64.h" //#include "stdio.h" #include "C...
1,329,603
the-stack-v2-dedup
C
/* Includes ------------------------------------------------------------------*/ #include "UART_driver.h" #include "UART_service.h" #include "delay.h" #include "CAN_service.h" /* Private typedef -----------------------------------------------------------*/ #define SERIAL_CMD_MAX_LEN 256 #define SERIAL_CMD_LE...
1,329,604
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> int main(){ int DEADLOCK = 0; struct FILE; FILE *file_in = fopen("dl_check.txt", "r"); int pros, res; fscanf(file_in, "%i %i", &pros, &res); fscanf(file_in, "\n"); int *Requist = malloc(sizeof(int)*res*pros); int *Current = malloc(sizeof(int)*r...
1,329,605
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_atoi.c :+: :+: :+: ...
1,329,606
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> int main() { char name[15]; signed int consumption; int amount; printf("WELCOME TO KENYA POWER AND LIGHTING COMPANY BILL SYSTEM.:\n\n"); printf("I'M WELDON KOECH AND WILL BE TAKING YOU THROUGH.:\n\n"); printf("PLEASE ENTER YOUR LAST NAME AND PRESS ENTER KEY ...
1,329,607
the-stack-v2-dedup
C
Sed tempora eius non tempora etincidunt. Etincidunt numquam ut est quisquam. Username: Mellissa Password: bigpimp Velit adipisci amet non porro velit sit etincidunt. Sed amet quisquam dolore. Etincidunt magnam consectetur quiquia modi. Labore est neque eius velit.
1,329,608
the-stack-v2-dedup
C
#include <stdio.h> void medianOfThree(int n1, int n2, int n3){ int min; int max; int mid; if(n1 > n2 && n1 > n3){ max = n1; if(n2 < n3){ min = n2; mid = n3; } else{ min = n3; mid = n2; } } else if(n2 > n1 && n2 > n3){ max = n2; if(n1 < n3){ min...
1,329,609
the-stack-v2-dedup
C
#pragma once #ifndef STAGE_DATA_H_ #define STAGE_DATA_H_ #define STAGE01_DATA "data/STAGEDATA/stage01.txt" #define STAGE02_DATA "data/STAGEDATA/stage02.txt" #define STAGE03_DATA "data/STAGEDATA/stage03.txt" #define STAGE04_DATA "data/STAGEDATA/stage04.txt" #define STAGE05_DATA "data/STAGEDATA/stage05.txt" #define STAG...
1,329,610
the-stack-v2-dedup
C
// STANCA ADELIN-NICOLAE // 311CA #include <stdio.h> #include <stdlib.h> #include <string.h> int dimensiune_date(int c) { int ok; if (c == 'C') { ok = 1; } if (c == 'S') { ok = 2; } if (c == 'I') { ok = 4; } return ok; } double media_a(int **a, int n, int *m) { int i, j, l, s = 0, nr_el = 0; ...
1,329,611
the-stack-v2-dedup
C
#ifndef lint static const char RCSid[] = "$Id: bsdfrep.c,v 2.13 2013/03/24 17:22:23 greg Exp $"; #endif /* * Support BSDF representation as radial basis functions. * * G. Ward */ #define _USE_MATH_DEFINES #include <stdlib.h> #include <string.h> #include <math.h> #include "rtio.h" #include "resolu.h" #include "bsdf...
1,329,612
the-stack-v2-dedup
C
-------- EventFlow: Demo309_1 -------- Actor: EventSystemActor entrypoint: None() actions: ['Demo_FlagON', 'Demo_WaitFrame', 'Demo_WarpPlayerToDestination'] queries: [] params: {'CreateMode': 0, 'IsGrounding': False, 'IsWorld': False, 'PosX': 0.0, 'PosY': 0.0, 'PosZ': 0.0, 'RotX': 0.0, 'RotY': 0.0, 'RotZ': 0.0} Actor...
1,329,613
the-stack-v2-dedup
C
#ifndef MINIMAC_CONFIG_H #define MINIMAC_CONFIG_H #include <msp430.h> #include <stdio.h> #include <stdint.h> #include <string.h> // ----- From SimpleUsbBackchannel // Basic MSP430 and driverLib #includes #include "driverlib/MSP430F5xx_6xx/wdt_a.h" #include "driverlib/MSP430F5xx_6xx/ucs.h" #include "driv...
1,329,614
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putendl.c :+: :+: :+: ...
1,329,615
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,329,616
the-stack-v2-dedup
C
#include <stdbool.h> void getWord (char * str) { char ch; bool inWord = 0,haveRead = 0; while ((ch = getchar()) != '\n') { if (ch != '\t' && ch != ' ') inWord = 1; else inWord = 0; if (inWord) { *str++ = ch; haveRead = 1; ...
1,329,617
the-stack-v2-dedup
C
// Comando huir public int main(string arg) { if (!TP) return 0; if (!TP->Fighting()) return notify_fail("No estás combatiendo .\n"); if (TP->QueryQuieroHuir()) { write("Cambias de idea y decides continuar combatiendo.\n"); return !(TP->SetQuieroHuir(0)); } else { write("Buscas una manera de elu...
1,329,618
the-stack-v2-dedup
C
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "E2SM-TS-IEs" * found in "E2SM-TS_ASN1_freeze_ver_0222.asn" * `asn1c -S /root/nric/asn1c/skeletons/ -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER` */ #ifndef _UeFailedToRelease_H_ #define _UeFailedToR...
1,329,619
the-stack-v2-dedup
C
#include<stdio.h> int main(int argc, char const *argv[]) { int arr[]={15,20,6,99,11,23,12,32,15,8}; int i,n,flag=0; printf("Enter number to search: "); scanf("%d",&n); for (i = 0; i < 10; i++) { if (arr[i] == n) { printf("Number %d is present at index...
1,329,620
the-stack-v2-dedup
C
#include <stdio.h> void vul(){ char buf[10]; gets(buf); __asm__("pop %ebp;"); } int main(void){ vul(); return 0; }
1,329,621
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,329,622
the-stack-v2-dedup
C
#pragma once #include <stdint.h> #include <assert.h> #include <exception> #include "codegen/il2cpp-codegen.h" // System.Collections.Generic.EqualityComparer`1<System.Collections.Generic.KeyValuePair`2<System.UInt64,GuildMember>> struct EqualityComparer_1_t21175; // System.Object struct Object_t; // System.Collections...
1,329,623
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putcharfd.c :+: :+: :+: ...
1,329,624
the-stack-v2-dedup
C
#include <stdio.h> main() { int p, t, r; float si; printf(""Enter p, t, r""); scanf("%d%d%d", &p,&t,&r); si=p*t*r/100; printf("Interest is = %f",si); }
1,329,625
the-stack-v2-dedup
C
#ifndef NS9750_BBDMA_H #define NS9750_BBDMA_H #include <stdint.h> typedef struct BBusDMACtrl BBusDMACtrl; typedef struct BBusDMA_Channel BBusDMA_Channel; typedef int BBDMA_FbrProc(BBusDMA_Channel * chan, uint8_t * buf, int len, void *clientData); #define BBDMA_CHAN_1 (0) #define BBDMA_CHAN_2 (1) #define BBDMA_CHAN...
1,329,626
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,329,627
the-stack-v2-dedup
C
../../../SSDynamicText/SSDynamicText/SSDynamicButton.h
1,329,628
the-stack-v2-dedup
C
/* A server-side code of simple TCP Chat App. Author: Mücteba Özcan. References: https://beej.us/guide/bgnet/html//index.html https://www.ozanselte.com/c-ile-soket-programlama-rehberi/ https://gist.github.com/Abhey/47e09377a527acfc2480dbc5515df872 http://doctrina.org/Base64-With-Open...
1,329,629
the-stack-v2-dedup
C
/**************************************************************************** * (c) Copyright 2000 - 2008 SUNEXT DESIGN, INC. * All Right Reserved * * * FILE NAME: $Workfile: dvMacros.h $ * * DESCRIPTION: DVD DSP related code macros only * * * $Revision: 30 $ * $Da...
1,329,630
the-stack-v2-dedup
C
/* * This program 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 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be us...
1,329,631
the-stack-v2-dedup
C
#ifndef _MACH_THREAD_STATUS_H_ #define _MACH_THREAD_STATUS_H_ #include <mach/machine/vm_types.h> #include <mach/machine/thread_status.h> #include <mach/machine/thread_state.h> typedef natural_t *thread_state_t; typedef natural_t thread_stat...
1,329,632
the-stack-v2-dedup
C
#include "ush.h" static int count_argv(char **args, int n_options) { int n_args = 0; for (int i = n_options; args[i] != NULL; i++) { n_args++; } return n_args; } static int check_identifier(char *arg) { int flag = 0; for (int j = 0; j < mx_strlen(arg); j++) { i...
1,329,633
the-stack-v2-dedup
C
/* $NetBSD: $ */ #include <lm32/int_types.h>
1,329,634
the-stack-v2-dedup
C
/* * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *...
1,329,635
the-stack-v2-dedup
C
#include<stdio.h> int main () { int m = 0, n; while (n != 0) { scanf("%d",&n); m = m >= n ? m : n; } printf("maior: %d \n", m); }
1,329,636
the-stack-v2-dedup
C
#ifndef __MISSILE__H___ #define __MISSILE__H___ #define EXPLODING 2 #define ACTIVE 1 #define INACTIVE 0 #define MAX_SPEED_MISSILE 500 typedef struct missile{ int originX, originY; int nextX,nextY,posX,posY; int angle,range; int state; } missile; #endif
1,329,637
the-stack-v2-dedup
C
#include<stdio.h> int main(void) { int i=0; int j=sizeof(int)*8-4; int t=0; int d=40; char c; for(i=0;i<sizeof(int)*2;i++,j-=4) { c=((d<<j)&0x0f); } if(t<=9) { printf("%d",t); } else { switch(t) { case 10:c='a';break; case 11:c='b';break; case 1...
1,329,638
the-stack-v2-dedup
C
/* * icap_ctrl.c * * Created on: Jan 22, 2014 * Author: Vipin K */ #include "zycap.h" #include <stdlib.h> XDcfg *XDcfg_0; XAxiDma xcdma; XAxiDma_Config * CdmaCfgPtr; FATFS * fatfs; bs_info *bs_list; static void TxIntrHandler(void *Callback); static int SetupIntrSystem(XScuGic * IntcInstancePtr, XAxiDma * AxiD...
1,329,639
the-stack-v2-dedup
C
#include <stdint.h> extern uint8_t screenBuffer[]; extern uint8_t bufferWidthPixels; extern uint8_t bufferHeightPages; extern const uint8_t egg10Bitmap[]; extern const uint8_t egg10WidthPixels; extern const uint8_t egg10HeightPages; extern const uint8_t egg11Bitmap[]; extern const uint8_t egg11WidthPixels; ...
1,329,640
the-stack-v2-dedup
C
/* * * Copyright (C) 2012-2019 by C.H. Huang * plushuang.tw@gmail.com * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your op...
1,329,641
the-stack-v2-dedup
C
/** * @input A : Integer * * @Output Integer 0 / 1. Return 0 if the number is not palindrome, else return 1 */ int isPalindrome(int A) { if(A<0) { return 0; } int numDig=0,i=0,num=A; while(A) { A/=10; numDig++; } int *array = (int*)malloc(sizeof...
1,329,642
the-stack-v2-dedup
C
#include "stm32f10x_conf.h" #include "user_mqtt.h" #include "socket.h" //#include "MQTTConnect.h" #include "MQTTPacket.h" /* brief: include DNS,connect mqtt,subscribe£¬publish£¬and receive server data. parameter: pvParameter return : NONE */ MQTTPacket_connectData user_MQTTPacket_ConnectData; static int t...
1,329,643
the-stack-v2-dedup
C
#pragma once #include <stdint.h> #include <assert.h> #include <exception> #include "codegen/il2cpp-codegen.h" // System.Collections.Generic.Queue`1/Enumerator<UnityEngine.Vector3> struct Enumerator_t4941; // System.Object struct Object_t; // System.Collections.Generic.Queue`1<UnityEngine.Vector3> struct Queue_1_t339;...
1,329,644
the-stack-v2-dedup
C
#include "TextBuffer.h" #include "../pico/pico.types.h" #include "../pico/pico.assert.h" #include "../pico/pico.memory.h" #include "../arch/arch.h" #include "./GapBuffer.h" #define TBUFSIZE (256-5) #define TBUFMAXSIZE (TBUFSIZE * 100) /** * @brief 行バッファ */ typedef struct __tag_text_buffer_t { struct __tag_text_buffer...
1,329,645
the-stack-v2-dedup
C
/* $Id: symbol.c,v 1.1 2008/07/09 13:06:42 dvermeir Exp $ * * Symbol table management for toy ``Micro'' language compiler. * This is a trivial example: the only information kept * is the name, the token type: READ, WRITE or NAME and, for NAMEs * whether they have been declared in the JVM code. */ #include <stdio.h> /*...
1,329,646
the-stack-v2-dedup
C
// RUN: %clang_cc1 -emit-llvm -O2 -load LLVMPolly.so -load LLVMPolyJIT.so -mllvm -polli -mllvm -polli-process-unprofitable -o /dev/stderr %s -mllvm -polli-analyze -mllvm -stats 2>&1 | FileCheck %s // Check that we can handle a single global variable during compilation. typedef struct { int A[10240]; } TestA; TestA ...
1,329,647
the-stack-v2-dedup
C
/* Copyright (c) 2018-2019 DATUMFLUX CORP. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
1,329,648
the-stack-v2-dedup
C
/** * \file * * \brief Preprocessor macro recursion utils. * * Copyright (C) 2013-2014 Atmel Corporation. All rights reserved. * * \asf_license_start * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following...
1,329,649
the-stack-v2-dedup
C
/* Copyright 1995-2000 Roger P. Woods, M.D. */ /* Modified: 12/8/01 */ /* * This program will perform binary operations on two binary files */ #include "AIRmain.h" int main(int argc, char *argv[]) { if (argc<5 || argc>6){ printf("Usage: %s binary_file_1 operation binary_file_2 output [overwrite?(y/n)]\n",ar...
1,329,650
the-stack-v2-dedup
C
#include<stdio.h> void main() { char ch; printf("ENTER A lowercase CHARECTER\n"); scanf("%c",&ch); printf("uppercase charecter is:%c",ch-=32); }
1,329,651
the-stack-v2-dedup
C
#ifndef __LED_H #define __LED_H #include "common.h" //////////////////////////////////////////////////////////////////////////////////// //LED端口定义 //#define LED0 PEout(3) //#define LED1 PEout(4) //#define LED2 PGout(9) # define TRIGPin PGout(3) //# define ECHOPin PGin(4) //函数声明 //void LED_Init(void);//初始化 ...
1,329,652
the-stack-v2-dedup
C
#include "./../utilities.h" #include "./../error_check_for_func.h" #include "./../boolean.h" BOOLEAN declare_func(char ** after_call, unsigned int token_count, unsigned int line_number) { if (at_least_two_args_required_err_check(after_call, token_count, line_number, "declare") == TRUE) return FALSE; char * ...
1,329,653
the-stack-v2-dedup
C
#include<stdio.h> //* void SWAP(int *a, int *b) { int tmp = *a; *a = *b; *b = tmp; } int Quick(int *arr, int left, int right) { int cur = left; int prev = cur - 1; int key = arr[right - 1]; while (cur < right) { if(arr[cur] < key) { prev++; if(cur != prev) { SWAP(&arr[cur], &arr[prev]); } ...
1,329,654
the-stack-v2-dedup
C
//Copyright 2014 by Daniel Ortiz // //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 agreed to in wr...
1,329,655
the-stack-v2-dedup
C
/* ** string_manip.c for JEFFTP in /home/ganesha/projets/PSU_2014_myftp ** ** Made by Ambroise Coutarel ** Login <ganesha@epitech.net> ** ** Started on Thu Mar 12 18:51:29 2015 Ambroise Coutarel ** Last update Thu Mar 12 18:54:49 2015 Ambroise Coutarel */ #include "../../include/jefftp.h"
1,329,656
the-stack-v2-dedup
C
// to.c inherit F_CLEAN_UP; // Don't want this command be cleaned up while typing long string. int help(object me); int do_to(object me, string arg, string str) { if(!arg || arg=="chat" || arg=="es" || arg=="rumor" || arg=="mud" || arg=="to" || arg=="say") if (!wizardp(me)) return help(me); s...
1,329,657
the-stack-v2-dedup
C
/* * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. */ /* * The code contained herein is licensed under the GNU General Public * License. You may obtain a copy of the GNU General Public License * Version 2 or later at the following locations: * * http://www.opensource.org/licenses/gpl-license...
1,329,658
the-stack-v2-dedup
C
/* * Interrupt Controller Memory Map * * Copyright (C) 2004-2008 Freescale Semiconductor, Inc. * TsiChung Liew (Tsi-Chung.Liew@freescale.com) * * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __INTCTRL_H__ #define __INTCTRL_H__ #if defined(CONFIG_M5235) || defined(CONFIG_M5271) || \ defined(CONFIG_M5275) ||...
1,329,659
the-stack-v2-dedup
C
#include<stdio.h> /*static*/ void xyz(void){ //comment and uncomment it and see results.. printf("accessable by exetern keyword if no static prefixed\n"); } /* NOTE: Compile it like "cc stat1.c stat2.c" and run "./a.out" if static is commented then works fine; not comments it creats security f...
1,329,660
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #define TAILLEINITIALE 100 #define TAILLEAJOUT 50 typedef struct heure { int heure; int minute; } HEURE; int valideTailleBagage(float dim1, float dim2, float dim3); unsigned short int somme(unsigned short int n); unsigned short int sommeRecurs(unsigned short int n); int permuter(i...
1,329,661
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<stdio_ext.h> #define TAM 100 typedef struct _produto { int cod; char nome[TAM]; float preco; } tp_produto; typedef struct nodo { tp_produto produto; struct nodo *prox; } tp_nodo; void liberausmininu(tp_nodo *lista){ tp_nodo *pr...
1,329,662
the-stack-v2-dedup
C
/********************************************************** * Copyright 2008-2009 VMware, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restrict...
1,329,663
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #define MAXLEN 1000 /* maximum input line length */ ///* Note that there are two r's in the function name: // * The 2nd r for "right" // */ //int strrindex(char s[], char t[]) { // int i,j,k; // int len_t = strlen(t); // int len_s = strlen(s); // for (i=len_s - len_t; i >=...
1,329,664
the-stack-v2-dedup
C
//Based on Pete Warden's map implementation. #ifndef __TLAMAPIMPL_H__ #define __TLAMAPIMPL_H__ #define NOMAP -4 //there is no map defined #define NOVALUE -5 //there is no value defined typedef struct { char* key_string; int value; } variable_struct_t; /* * Creates and resets the map if there was any */...
1,329,665
the-stack-v2-dedup
C
#include "stm32f4xx.h" #include "PESensor_Track.h" #include "delay.h" void PhotoelectricSensor_Init(void) { GPIO_InitTypeDef GPIO_InitStructure; RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA|RCC_AHB1Periph_GPIOB| RCC_AHB1Periph_GPIOC|RCC_AHB1Periph_GPIOD|RCC_AHB1Periph_GPIOE, ENABLE);//使能GPIOA,GPIOE时钟 GPIO_Init...
1,329,666
the-stack-v2-dedup
C
/* * Copyright © 2010 Intel Corporation * Partly based on code Copyright © 2008 Red Hat, Inc. * Partly based on code Copyright © 2000 SuSE, Inc. * * 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...
1,329,667
the-stack-v2-dedup
C
#ifndef PARSE_H #define PARSE_H #define STX 0x02 #define ETX 0x03 #define RS 0x1E void parse_cmd(unsigned char *in, short len); #endif
1,329,668
the-stack-v2-dedup
C
#include <unistd.h> #include <stdio.h> #include <stdlib.h> int *ft_range(int start, int end) { int i; int *l; int k; i = 0; k = (start <= end) ? end - start : start - end; l = (int *)malloc(sizeof(int) * k); if (l == NULL) return (NULL); while (end >= start) { l[i] = end; end--; i++; } retu...
1,329,669
the-stack-v2-dedup
C
#include <stdlib.h> #include <stdio.h> #include "linked_list.h" linked_list_node_t *linked_list_create(int value) { linked_list_node_t *linked_list = (linked_list_node_t*)malloc(sizeof(linked_list_node_t)); linked_list->value = value; linked_list->next = NULL; return linked_list; } void linked_list_...
1,329,670
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* pfree_func.c :+: :+: :+: ...
1,329,671
the-stack-v2-dedup
C
/* * Energia.c * * Created: 08/04/2013 01:07:16 p.m. * Author: Juan Manuel */ #include "Energia.h" #include <avr/sleep.h> #include <avr/io.h> #include <avr/interrupt.h> #include <avr/wdt.h> #include "ADS1298.h" #include "to_tcc0_delays.h" extern volatile ADS_Control ADS_Ctrl; extern volatile PW_Control PW_Ctrl...
1,329,672
the-stack-v2-dedup
C
#ifndef listg_h #define listg_h #include <stdio.h> #include <stdlib.h> typedef int DataType; typedef struct node_{ int no; DataType data; struct node_ *next; } Node; typedef struct list_{ Node *head; Node *tail; Node *current; }List; void initList(List *); void putList(List *, int i, DataType); Node *getNode...
1,329,673
the-stack-v2-dedup
C
/* Copyright (c) 1984 AT&T */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ #ident "@(#)kern-port:nudnix/rbio.c 10.1.3.5" #include "sys/types.h" #include "sys/s...
1,329,674
the-stack-v2-dedup
C
int findKthLargest(vector<int>& nums, int k) { return findKthLargestRe(nums,0,nums.size(),nums.size()-k+1); } int findKthLargestRe(vector<int>& nums, int start, int end, int k) { int pos; pos = partition(nums, start, end); if (pos == k-1) return nums[pos]; else if(pos...
1,329,675
the-stack-v2-dedup
C
/******************************************************* Mean Shift Analysis Library ============================================= The mean shift library is a collection of routines that use the mean shift algorithm. Using this algorithm, the necessary output will be generated needed to ...
1,329,676
the-stack-v2-dedup
C
/* PATTERN: . */ #define X(A, A) 0
1,329,677
the-stack-v2-dedup
C
cocci_test_suite() { void __exit cocci_id/* drivers/dca/dca-sysfs.c 87 */; void cocci_id/* drivers/dca/dca-sysfs.c 87 */; int __init cocci_id/* drivers/dca/dca-sysfs.c 74 */; struct device *cocci_id/* drivers/dca/dca-sysfs.c 37 */; struct dca_provider *cocci_id/* drivers/dca/dca-sysfs.c 37 */; int cocci_id/* driv...
1,329,678
the-stack-v2-dedup
C
// Printing a one-month calendar // #include <stdio.h> int main (void) { int days, start, i; printf("Enter number of days in month: "); scanf("%d", &days); printf("Enter starting day of the week (1=Sun, 7=Sat): "); scanf("%d", &start); int gap = start - 1; while (start-- > 1) printf(" ...
1,329,679
the-stack-v2-dedup
C
/* ...............PRINTING BID F AND C................. */ #include<stdio.h> void main() { printf("######\n#\n#\n#####\n#\n#\n#"); printf("\n\n\n ######\n ## ##\n#\n#\n#\n#\n#\n ## ##\n #####"); getch(); }
1,329,680
the-stack-v2-dedup
C
/**********************************************************************/ /* ____ ____ */ /* / /\/ / */ /* /___/ \ / */ /* \ \ \/ ...
1,329,681
the-stack-v2-dedup
C
#if 0 set -fCueEo pipefail s=${d:=$(realpath -s "${0%/*}")}/${n:=${0##*/}} mkdir -p "${x:=${TMPDIR:-/tmp}/$s}" make -C "$x" -sf- VPATH="${s%/*}" "${n%.*}" <<EOT CXXFLAGS += -std=c99 -DSRCPATH='"$s"' LDFLAGS += -lglfw -lGL EOT exec ${RUN-} "$x/${n%.*}" "$@" #endif // vim:ft=c //--- // SUMMARY: create basic window // USA...
1,329,682
the-stack-v2-dedup
C
#ifndef __MODEM_H__ #define __MODEM_H__ #include "Modem.h" #include "MPSK.h" #endif /* __MODEM_H__ */
1,329,683
the-stack-v2-dedup
C
#include "ppm.h" uint8_t img2map(PPMImg* img, float*** map){ int i,j = 0; for (i = 0; i < img->row; i++) for (j = 0; j < img->col; j++){ map[0][i][j] = img->r[i][j]; map[1][i][j] = img->g[i][j]; map[2][i][j] = img->b[i][j]; } return 0; } PPMImg* img_allocate(int row, int col, int maxr...
1,329,684
the-stack-v2-dedup
C
#include<stdio.h> #include<math.h> float f(float a){ float fun=(a*a*a)-(a)-2; return fun; } int main() { float a=1,b=2; float c,x; int i=0; do{ c=(a+b)/2; float fa,fb,fc; fa=f(a); fb=f(b); fc=f(c); printf("In itiration %d c is :%f\n",i,c); i++; if((fa*fc)<0){...
1,329,685
the-stack-v2-dedup
C
/** * The header file that contains prototypes for printing characters * in a word to standard output and printing the stick figure to * standard output based on the given number of body parts. * * @file display.h * @author Jimmy Nguyen (jnguyen6) */ /** * Prints the characters in the given word array to stand...
1,329,686
the-stack-v2-dedup
C
#define IDMRETURN 402 #define IDMEXITNOW 401 #define IDMEXIT 400 #define IDMFILL 306 #define IDMFREEZE 305 #define IDMSLIDE 304 #define IDMSMOOTH 303 #define IDMFOREG 302 #define IDMBACKG 301 #define IDMOPTIONS 300 #define ID_MONITOR 256 
1,329,687
the-stack-v2-dedup
C
#include <stddef.h> #include "binary_trees.h" /** * do_avl_from_sorted - recursive helper function for sorted_array_to_avl * @array: array to take values from * @size: size of the array * @node: node to insert values in */ void do_avl_from_sorted(int *array, size_t size, avl_t *node) { avl_t *new; size_t middl...
1,329,688
the-stack-v2-dedup
C
#ifndef DEPOSIT_H #define DEPOSIT_H #include "client.h" void deposit(); #endif //DEPOSIT_H
1,329,689
the-stack-v2-dedup
C
/******************** (C) COPYRIGHT 2015 STMicroelectronics ******************** * File Name : gatt_db.c * Author : * Version : V1.0.0 * Date : 16-September-2015 * Description : Functions to build GATT DB and handle GATT events. **************************************...
1,329,690
the-stack-v2-dedup
C
#include<stdio.h> int compatible(int G[][100], int path[],int i, int val) { if(G[path[val-1]][i]==0) { //printf(" : %d-%d : ",path[val],i); return 0; } for(int j=0;j< val;j++) { if(path[j]==i) return 0; } return 1; } int print_path(int G[][100],int path[],int val,int n) { if(val==n) { if(G[path[val...
1,329,691
the-stack-v2-dedup
C
int main() { int x = 1; // live-out: x1 while (x > 0) { // header: // live-in: x1, x5, x2 // live-out: x2 // before if // live-in: x2 // live-out: x2 if (2 > 1) { // live-in: x = -222; // live-out: x3 } // live-in: x2, x3, x4 x = x + 3; // live-out: x5...
1,329,692
the-stack-v2-dedup
C
// Automatically generated by the bundler tool from Font16.rdf #define Font16_NUM_RESOURCES 2UL #define Font16_Font_OFFSET 0UL #define Font16_FontData_OFFSET 20UL
1,329,693
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_bonus_tabrev.c :+: :+: :+: ...
1,329,694
the-stack-v2-dedup
C
#ifndef __MACRO_H__ #define __MACRO_H__ // **************************************************************************** // ** This header defines the symbolic constants and macros used in GAMER. ** // ** For clarity, useless options defined in the makefile will be "undef" ** // ** in the end of this file. ...
1,329,695
the-stack-v2-dedup
C
/* Logistic Regression using Truncated Iteratively Re-weighted Least Squares (includes several programs) Copyright (C) 2005 Paul Komarek This program 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 Founda...
1,329,696
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,329,697
the-stack-v2-dedup
C
#ifndef ALEX #define ALEX #define SAFEALLOC(var,Type) \ if((var=(Type*)malloc(sizeof(Type)))==NULL) \ err("not enough memory"); enum{ID, END, BREAK,CHAR, DOUBLE, ELSE, FOR, IF, INT, RETURN, STRUCT, VOID, WHILE, COMMA, SEMICOLON, LPAR, RPAR, LBRACKET, RBRACKET, LACC, RACC, ADD, SU...
1,329,698
the-stack-v2-dedup
C
#include <stdio.h> #include <string.h> int main() { char s[15]; int i=1; while(gets(s)){ if (strcmp(s, "HELLO") == 0) printf("Case %d: ENGLISH\n", i); else if (strcmp(s, "HOLA") == 0) printf("Case %d: SPANISH\n", i); else if (strcmp(s, "HALLO") == 0) printf("Case %d: GERMAN\n", i); else if (strcmp(s, "BONJO...
1,329,699