source
string
code_lang
string
content
string
idx
int64
the-stack-v2-dedup
C
#include "subscribe_main.h" #if defined(_WIN32) #define sleep Sleep #else #include <sys/time.h> #endif volatile int toStop = 0; struct pubsub_opts opts = { 0, 0, 1, 0, "\n", 100, /* debug/app options */ NULL, NULL, 1, 0, 0, /* message options */ MQTTVERSION_DEFAULT, NULL, "paho-cs-sub", 0, 0, NULL, NULL, "loca...
1,328,500
the-stack-v2-dedup
C
#include<stdio.h> void pattern1(int n) { int i, j; for(i = 0 ; i < n ; ++i) { for(j = n ; j > i ; --j) printf("#"); printf("\n"); } } void pattern2(int n) { int i, j; for(i = 0 ; i < n ; ++i) { for(j = 0 ; j < n ; ++j) if(i + j >= (n - 1)) printf("#"); else printf(" ");...
1,328,501
the-stack-v2-dedup
C
/* As communications channels are mostly noisy, the approach of checksum can be used to check the data correctness. The checksum for a piece of data can be computed by summing the integer codes of the data and computing the remainder of this sum by dividing with 16. If the remainder is same as the last integer, the dat...
1,328,502
the-stack-v2-dedup
C
#include "m68k_allocator.h" #include <string.h> #include <stdlib.h> static M68KLinearAllocator g_allocator; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void M68KLinearAllocator_create(void* data, uint32_t size) { M68KLinearAllocator* state ...
1,328,503
the-stack-v2-dedup
C
#include <ArduinoOTA.h> void setup_function_OTA(const char* hostname_OTA, const char* password_OTA) { // Port defaults to 8266 ArduinoOTA.setPort(8266); // Hostname defaults to esp8266-[ChipID] if (hostname_OTA) { ArduinoOTA.setHostname(hostname_OTA); } // No authentication by default if (password_...
1,328,504
the-stack-v2-dedup
C
#include<sys/types.h> #include<sys/socket.h> #include<stdio.h> #include<sys/un.h> #include<netinet/in.h> #include<unistd.h> #include<stdlib.h> int main(int argc , char * argv[]) { //varible definition int sockfd; int len; struct sockaddr_in address; int result; double r=3; double area=0; // //name socket soc...
1,328,505
the-stack-v2-dedup
C
//girilen iki sayı arasındaki sayıların faktöriyelini alan ve aldığı değerleri toplayan program #include<stdio.h> #pragma warning(disable:4996) int main() { int A, B, i, j, factorial = 1; float result = 0, temp; printf("Please enter the first number: \n"); scanf_s("%d", &A); printf("Please enter the seco...
1,328,506
the-stack-v2-dedup
C
#pragma once #ifndef UTILITIES_H #define UTILITIES_H #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <math.h> int alphatoint(char* alpha); //int strlen(char* text); int numberGenerator(int num, int range); int power(int base, int exponent); #endif
1,328,507
the-stack-v2-dedup
C
#include<stdio.h> #include<stdio.h> #include<malloc.h> int main() { int cities, groups,groupSize,city,queries,cityA, cityB,cityAGroup,cityBGroup,; scanf("%ld%ld",&cities,&groups); int *a=(int *)malloc(sizeof(int)*n); for(int i=0; i<groups; i++) { scanf("%d",&groupSize); for(int j=0; j<groupSize; j++) ...
1,328,508
the-stack-v2-dedup
C
XSym 0070 3d3209e3b03f4316ba6f1670a7be2842 ../../../ReactiveObjC/ReactiveObjC/MKAnnotationView+RACSignalSupport.h ...
1,328,509
the-stack-v2-dedup
C
//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by SdkClient.rc // #define IDM_ABOUTBOX 0x0010 #define IDD_ABOUTBOX 100 #define IDS_ABOUTBOX 101 #define IDD_SDKCLIENT_DIALOG 102 #define IDR_MAINFRAME ...
1,328,510
the-stack-v2-dedup
C
//------------------------------------------------------------------ // // @@@ START COPYRIGHT @@@ // // (C) Copyright 2006-2014 Hewlett-Packard Development Company, L.P. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You m...
1,328,511
the-stack-v2-dedup
C
#ifndef _significant_interval_search_meta_fisher_c_ #define _significant_interval_search_meta_fisher_c_ /* LIBRARY INCLUDES */ #include<math.h> #include<stdlib.h> #include<stdio.h> #include<string.h> /* CODE DEPENDENCIES */ #include"time_keeping.c" #include "../../EasyGWAS/chi2.h" /* MACROS */ /* CONSTANT DEFINES *...
1,328,512
the-stack-v2-dedup
C
#pragma once #define LIVE_FILTER_NAME TEXT("UDP Push source") #define LIVE_OUTPIN_NAME L"Out" // {9E9646C2-2C55-494a-91D2-AAFF31C20530} static const GUID IID_ILiveSource = { 0x9e9646c2, 0x2c55, 0x494a, { 0x91, 0xd2, 0xaa, 0xff, 0x31, 0xc2, 0x5, 0x30 } }; // {15CF9D07-729A-4ca4-9DAA-95123FBA0EF2} static const GUI...
1,328,513
the-stack-v2-dedup
C
/*------------------------------------------------------------------------------ Copyright 2018 Sony Semiconductor Solutions Corporation Last Updated : 2018/12/13 Modification ID : e402a4dcb0e51a00c34b174334c082c1211eebf1 ------------------------------------------------------------------------------*/ /** @f...
1,328,514
the-stack-v2-dedup
C
#include "GUI.h" #include "rTouch.h" #include "GLCD.h" #include "ARM_delay.h" #define CAL_DOT_SIZE 3 #define CAL_DOT_OFFSET 10 float const preset_x_offset= 86.96; float const preset_x_scale= 5.17; float const preset_y_offset= 110.25; float const preset_y_scale= 9.7; float x_offset; float x_scale; float y_offset; flo...
1,328,515
the-stack-v2-dedup
C
#ifndef INC_UTIL_H_ #define INC_UTIL_H_ void util_assertFail(void); #define UTIL_ASSERT(x) if (!(x)) util_assertFail(); #endif /* INC_UTIL_H_ */
1,328,516
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,328,517
the-stack-v2-dedup
C
//Round Robin //FCFS #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> struct process { int id; int a; int b; int ta; int w; int c; }; int compare(const void* x, const void* y) { if(((struct process*)x)->a>((struct process*)y)->a) return 1; else return 0; } void...
1,328,518
the-stack-v2-dedup
C
/* IMPORTANT */#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> typedef struct{ char string[500]; }AllStrings; int indexReturn(char checkStr[],char findStr[]) { char * wordPosition = strstr(checkStr, findStr); int wordIndex = wordPosition - checkStr; return wordIndex; ...
1,328,519
the-stack-v2-dedup
C
#include <stdlib.h> #include <string.h> #include <signal.h> #include <stdbool.h> #include <stdint.h> #include <mcheck.h> #include <memcached/engine.h> #include <memcached/util.h> #include <memcached/visibility.h> #include <memcached/config_parser.h> #include "commons/config.h" #include <semaphore.h> #include "commons/b...
1,328,520
the-stack-v2-dedup
C
/** * @file simplexe.c * @author Aurélien Chemier * @author Romane Lhomme * @date 2014 */ #include "simplexe.h" #include "vertex.h" #include <assert.h> #include <math.h> #include <stdlib.h> #include <stdio.h> Simplexe * creationSimplexe(const Vertex *A, const Vertex *B, const Vertex *C) { Simplexe *s; ALLOUER(...
1,328,521
the-stack-v2-dedup
C
//#include "fmap.h" void* create_filemap(const char *file, HANDLE *pfhdl, HANDLE *pfmhdl); void free_filemap(HANDLE hfile, HANDLE hmap, char *fmap); unsigned readline(const char *file); //#line 3 "h:\\dev\\code\\lib-dilly\\fmap.c" void* create_filemap(const char *file, HANDLE *pfhdl, HANDLE *pfmhdl) { char...
1,328,522
the-stack-v2-dedup
C
/* A simple ADC example that checks the analog reading on ADC0 and turns * an LED on if the reading is higher than a threshold value and turns if * off if it is under that value. */ #include <avr/io.h> #include <stdint.h> #include "adc.h" #define _BV(bit) (1 << (bit)) void ADCInit() { /* Enable the ADC */ ADCS...
1,328,523
the-stack-v2-dedup
C
/* * This software is Copyright (c) 2004 bartavelle, <simon at banquise.net>, and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without modification, are permitted. * * UTF-8 support: Copyright magnum 2012 and hereby released to t...
1,328,524
the-stack-v2-dedup
C
/* * calibratie_private.h * * Code generation for model "calibratie.mdl". * * Model version : 1.948 * Simulink Coder version : 8.1 (R2011b) 08-Jul-2011 * C source code generated on : Mon Apr 4 15:30:39 2016 * * Target selection: ectarget.tlc * Note: GRT includes extra infrastructure and instrume...
1,328,525
the-stack-v2-dedup
C
// Copyright 2018 The Fuchsia Authors // // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT #ifndef ZIRCON_KERNEL_TARGET_ARM64_BOOT_SHIM_DEBUG_H_ #define ZIRCON_KERNEL_TARGET_ARM64_BOOT_SHIM_DEBUG_H_ #include <stdint.h> ...
1,328,526
the-stack-v2-dedup
C
typedef unsigned char NameField[4]; typedef struct Name { NameField name; } Name;
1,328,527
the-stack-v2-dedup
C
// // util.c // 0 VM // // Created by Darian Smalley on 7/1/15. // Copyright (c) 2015 Darian Smalley. All rights reserved. // #include "util.h" FILE* openFile(char* fileName) { FILE* file; if (!(file = fopen(fileName, "r" ))) { perror(fileName); exit(1); } return file; } ...
1,328,528
the-stack-v2-dedup
C
../../../../../Pod/Classes/NOGlisteningImageView.h
1,328,529
the-stack-v2-dedup
C
#ifndef LIST_H_INCLUDED #define LIST_H_INCLUDED #include "Aeroporto.h" struct TList{ Aeroporto aeroporto; double prezzo; int tempo; struct TList* next; }; typedef struct TList* List; List createNode(Aeroporto aeroporto); List initNodeList(Aeroporto aeroporto); //Ritorna l'aeroporto ricercato o uno ...
1,328,530
the-stack-v2-dedup
C
#include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <sys/wait.h> #include <string.h> int main() { char line[100]; while(printf(">"), gets((line)!= NULL)) { if(fork() == 0){ execlp(line, line, (char *)0); printf("not found: %s!\n", line); exit(1); } else wait(0); //prompt the user again ...
1,328,531
the-stack-v2-dedup
C
#include <stdio.h> struct node{ int data; struct node* next; }; struct node* head; int main(){ head=NULL; int n,x,i; printf("Enter number of elements to push into the stack:"); scanf("%d",&n); for (i=0;i<n;i++){ printf("Enter element:"); scanf("%d",&x); push(x); ...
1,328,532
the-stack-v2-dedup
C
//{{BLOCK(_2523) //====================================================================== // // _2523, 40x40@8, // + palette 256 entries, not compressed // + 25 tiles lz77 compressed // Total size: 512 + 1316 = 1828 // // Time-stamp: 2014-11-28, 05:19:54 // Exported by Cearn's GBA Image Transmogrifier, v0.8.12 // ( ...
1,328,533
the-stack-v2-dedup
C
#ifndef _LOG_H_INCLUDED # define _LOG_H_INCLUDED # include <unistd.h> /*! * @defgroup log Logging * @brief Logging and debugging information * @{ */ /*! * @typedef verbosity_level_t * @brief A message verbosity level */ typedef unsigned int verbosity_level_t; enum verbosity_levels { LOG_NOTHING = 0, LOG_ERRO...
1,328,534
the-stack-v2-dedup
C
/* * Parallel xz decoder written to optimise the decompress of files in tmpfs * * Author: Ben Gray <ben.gray@sky.uk> * * This util process xz streams in separate processes to utilise multi-core * systems to speed up the decompression process. In addition it uses mmap * rather than file read/write to also speed ...
1,328,535
the-stack-v2-dedup
C
../../../../../../YZBaseSDK/YZBaseSDK.framework/Headers/YZBaseSDK.h
1,328,536
the-stack-v2-dedup
C
/* * Copyright(C) 2014 Pedro H. Penna <pedrohenriquepenna@gmail.com> * * <arch.h> - Archtiecture contants and definitions. */ #ifndef ARCH_H_ #define ARCH_H_ /* Maximum cluster workload. */ #define CLUSTER_WORKLOAD 0xfffff /* 1 MB */ /* * Number of clusters on a MPPA-256 processor. */ #define NUM_CLUSTERS 16 ...
1,328,537
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #include <limits.h> #include "struct.h" #include "prototype.h" double WL(int k,struct data dataset[],struct center k_center[],struct config conf[]) { int i,j; double tmpu,tmpdist,tmpsum; double alldist; double sumU,Sum_dist_u; double avg,...
1,328,538
the-stack-v2-dedup
C
/* File: ContFramePool.C Author: Sulav Adhikari Date : 29-01-2019 */ /*--------------------------------------------------------------------------*/ /* POSSIBLE IMPLEMENTATION ----------------------- The class SimpleFramePool in file "simple_frame_pool.H/C" describes an incomplete vanilla implementation of ...
1,328,539
the-stack-v2-dedup
C
#include <stdlib.h> #include <stdint.h> #include <stdio.h> #include "util.h" // input is a const array to const char. void interpreter(const char input[]) { // ASCII 8 bit. uint8_t tape[30000] = { 0 }; // set pointer to the left most cell of the tape. uint8_t *ptr = tape; char ...
1,328,540
the-stack-v2-dedup
C
#ifndef _MERGETREESTRUCT_ #define _MERGETREESTRUCT_ typedef struct { mtree *tree; RAG *rag; struct xvimage *labels; int32_t *altitudes; float *weights; int cs; int rs; } MergeTree; #endif #ifndef _MERGETREE_ #define _MERGETREE_ // create a proper Lua class to represent a merge tree #define MT "imgr...
1,328,541
the-stack-v2-dedup
C
#include <iostm8s903k3.h> #define uint unsigned int #define uchar unsigned char #define ulong unsigned long #define Time_AdcImp 250 //主要功能函数的轮询时间设置 #define Time_DispImp 1 #define Time_KeyImp 10 #define Time_BuzImp 10
1,328,542
the-stack-v2-dedup
C
#pragma once // Standard configurations for can_rx_event_mapper. #include "can_rx_event_mapper.h" extern const CanRxEventMapperConfig g_front_can_rx_config; extern const CanRxEventMapperConfig g_rear_can_rx_config;
1,328,543
the-stack-v2-dedup
C
#include<stdio.h> int main() { double n; int choice; printf("1:Feet to Meter, 2:Meter to Feet\n"); scanf("%d", &choice); if(choice==1) { printf("Enter the number of Feet\n"); scanf("%lf", &n); printf("Meter=%lf", n/3.28); } else if(choice==2) { printf(...
1,328,544
the-stack-v2-dedup
C
#include "lists.h" #include <stdio.h> /** * free_listint - adds a new node at the beginning of a list * @head: header */ void free_listint(listint_t *head) { listint_t *ptrfree; while (head != NULL) { ptrfree = head; head = head->next; free(ptrfree); } }
1,328,545
the-stack-v2-dedup
C
/* * Sean Middleditch * sean@sourcemud.org * * The author or authors of this code dedicate any and all copyright interest * in this code to the public domain. We make this dedication for the benefit * of the public at large and to the detriment of our heirs and successors. We * intend this dedication to b...
1,328,546
the-stack-v2-dedup
C
/** * The MIT License (MIT) * * Copyright (c) 2019 Erik Moqvist * * 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...
1,328,547
the-stack-v2-dedup
C
#include <project.h> #include "`$INSTANCE_NAME`_MusicPlayer.h" #define `$INSTANCE_NAME`_NO_SONG (0xFF) #define `$INSTANCE_NAME`_PWM_DIVIDER (128) #define CLOCK (12000000) static int `$INSTANCE_NAME`_BPM = 25; // current tempo static int `$INSTANCE_NAME`_nextNote=0; // what is the next note in the song static...
1,328,548
the-stack-v2-dedup
C
// proc.c, 159 #include "spede.h" #include "kernel_data.h" #include "proc.h" #include "syscalls.h" #include "tools.h" #include "kernel_types.h" void IdleProc(void) { int i; unsigned short *p = (unsigned short *) 0xb8000 + 79; while(1){ *p = '0' + 0x0f00; for(i=0;i<(LOOP/2);i++){ asm...
1,328,549
the-stack-v2-dedup
C
// How many leds in your strip? #define NUM_LEDS 150
1,328,550
the-stack-v2-dedup
C
/* * AtkDemo.c * * Created on: Mar 21, 2019 * Author: giuseppe */ #include <stdio.h> #include <stdlib.h> #include <atk/atk.h> #include <atk-bridge.h> #include "myAtk.h" static CAtkActor *root = NULL; static CAtkActor *frame = NULL; static CAtkActor *root_pane = NULL; static CAtkActor *layered_pane = NULL; s...
1,328,551
the-stack-v2-dedup
C
#include "arm_math.h" #include "stm32f4xx.h" #include "cmsis_os.h" #include "led.h" #include "threads.h" #include "lcdManager.h" #include "timer.h" #include "keypadManager.h" #include "globals.h" short timerInterrupt; //osThreadId tid_wireless; //! Thread structure for above thread osThreadDef(accelerometer, osPrior...
1,328,552
the-stack-v2-dedup
C
#include "libft.h" char *ft_strrchr(const char *str, int c) { char *s; size_t len; s = (char *)str; len = ft_strlen(s) - 1; while (*(s + len)) { if (*(s + len) == c) return (s + len); len--; } ...
1,328,553
the-stack-v2-dedup
C
#include <stdio.h> int fib(int number); //Fibonnacci function int fib(int number){ if (number <= 0 || number > 20) return 0; if(number==1||number==2) return 1; else return fib(number-1)+fib(number-2); }
1,328,554
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_bzero.c :+: :+: :+: ...
1,328,555
the-stack-v2-dedup
C
/* Copyright 2005-2010 Jakub Kruszona-Zawadzki, Gemius SA. This file is part of MooseFS. MooseFS 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, version 3. MooseFS is distributed in the hope t...
1,328,556
the-stack-v2-dedup
C
int ** open(char* filename, int* nLine, int* nCol);
1,328,557
the-stack-v2-dedup
C
/* /* Paul Nguyen cssc1143 Ryan Ragasa cssc1144 Assignment #2 Algorithms Analysis secondchance.c file 6/19.2017 CS570 Summer 2017 function: secondchance Note: To build the Second Chance Algorithm, we set a loop to check if the page number exists in a frame, setting or resetting the reference bit ac...
1,328,558
the-stack-v2-dedup
C
/** @file renderer.c */ #include "renderer/renderer.h" /* TODO(marceline-cramer): mdo_allocator */ #include <stdlib.h> /* for mem alloc */ #include <TracyC.h> #include <vulkan/vulkan_core.h> #include "gpu/gpu_device.h" #include "log.h" #include "renderer/debug/debug_pass.h" #include "renderer/frame_data.h" #includ...
1,328,559
the-stack-v2-dedup
C
//12 MHz with external crystal oscillator to allow V-USB to work //set fuse bits with the following command //avrdude -p t84 -U lfuse:w:0x6f:m -U hfuse:w:0xdf:m - U efuse:w:0xff:m #include <avr/io.h> #include <util/delay.h> #include <stdint.h> #include "hv.h" //turns on pmos for boost converter and 555 timer #define RE...
1,328,560
the-stack-v2-dedup
C
// https://leetcode-cn.com/problems/excel-sheet-column-title/description/ #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #define MAX_SIZE 500 typedef int ElemType; typedef struct { ElemType *elems; int top; int size; } Stack; Stack * CreateStack(){ Stack * stack = (Stack *)malloc(sizeof(S...
1,328,561
the-stack-v2-dedup
C
#include <stdio.h> int fib(int n); int main() { int fibnum = fib(10); printf("%d\n",fibnum); return 0; } int fib(int n) { if(n<=2) return 1; else return fib(n-1)+fib(n-2); }
1,328,562
the-stack-v2-dedup
C
#include "glm_includes.h" #include <GL\glew.h> #include <GL\freeglut.h>
1,328,563
the-stack-v2-dedup
C
/* * Copyright (C) 2015 ETH Zurich and University of Bologna * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. * */ #ifndef __HAL_DEVCHIP_PULP_H__ #define __HAL_DEVCHIP_PULP_H__ #include "hal/riscv/riscv_v4.h" #incl...
1,328,564
the-stack-v2-dedup
C
// mask.c 09/03/2020 // J_Code // brief: 给数据上Mask #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "jc.h" #include "encoder.h" #define W1 100 #define W2 3 #define W3 3 /** * @brief Apply mask penalty rule 1 * @param matrix the symbol matrix * @param width the symbol matrix ...
1,328,565
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <getopt.h> /* for getopt */ #include <string.h> #include <usb.h> /* this is libusb, see http://libusb.sourceforge.net/ */ #define USBDEV_SHARED_VENDOR 0x16C0 /* VOTI */ #define USBDEV_SHARED_PRODUCT 0x05DC /* Obdev's free shared PID */ /* Use obdev's generic...
1,328,566
the-stack-v2-dedup
C
../../../DTCollectionViewManager/DTCollectionViewManager/Convenience/DTCollectionReusableView.h
1,328,567
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_atoi.c :+: :+: :+: ...
1,328,568
the-stack-v2-dedup
C
void ethernetTransmit(char *data,int len): void ethernetReceive(char *data);
1,328,569
the-stack-v2-dedup
C
#ifndef __JSONTREE_TYPE_H__ # define __JSONTREE_TYPE_H__ # ifndef __JSONTREE_PARSER__ # define __JSONTREE_PARSER__ typedef struct s_JSONtree_parser JSONtree_parser; // Need to be first declarated for the following prototypes # endif /* __JSONTREE_PARSER__ */ #include "tree_type.h" /* Prototypes */ void JSONide...
1,328,570
the-stack-v2-dedup
C
#include <stdio.h> void util(); void dllmain(void) { printf("!! now in dll\n"); printf("hello from dllmain!\n"); printf("!! calling util() which must be defined in host program\n"); util(); printf("!! done calling util\n"); }
1,328,571
the-stack-v2-dedup
C
#include<stdio.h> #include<omp.h> #include<stdlib.h> #include<math.h> int num_points; int dataPoints[100][2]; int cluster_points[4][2] = {{25,25},{25,75},{75,25},{75,75}}; int clusterCounts[4]; void populate_points(){ int i = 0; #pragma omp parallel for private(i) for(i=0;i<num_points;i++){ dataPoi...
1,328,572
the-stack-v2-dedup
C
#ifndef STRAT_RSI_H #define STRAT_RSI_H #include <stddef.h> #include "AllIndicators.h" #include <math.h> #include <stdlib.h> int StratRsiSimple(double rsi, int oversold, int overbought); #endif
1,328,573
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* rush01.h :+: :+: :+: ...
1,328,574
the-stack-v2-dedup
C
#pragma once #include "mathcompat.h" #include "matrix3.h" inline Float Matrix3::det() const { return +data[0][0]*(data[1][1]*data[2][2]-data[2][1]*data[1][2]) -data[0][1]*(data[1][0]*data[2][2]-data[1][2]*data[2][0]) +data[0][2]*(data[1][0]*data[2][1]-data[1][1]*data[2][0]); } inline Vect...
1,328,575
the-stack-v2-dedup
C
../../../AsyncDisplayKit/AsyncDisplayKit/Details/ASTextNodeTextKitHelpers.h
1,328,576
the-stack-v2-dedup
C
// The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the LAB23_EXPORTS // symbol defined on the command line. This symbol should not be defined on any project // that uses this DLL. This way any other project whose so...
1,328,577
the-stack-v2-dedup
C
//合并石子问题 (最小得分) #define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> #include<stdlib.h> void bubble(int data[], int num) //冒泡排序(相邻的两个比较) { int i, j; for (i = 0; i < num - 1; i++) { for (j = 0; j < num - i - 1; j++) { if (data[j]>data[j + 1]) { int tmp; tmp = data[j]; data[j] = data[j + 1]; ...
1,328,578
the-stack-v2-dedup
C
#ifndef PQCLEAN_NTRUHPS2048509_CLEAN_API_H #define PQCLEAN_NTRUHPS2048509_CLEAN_API_H #include <stdint.h> #define PQCLEAN_NTRUHPS2048509_CLEAN_CRYPTO_SECRETKEYBYTES 935 #define PQCLEAN_NTRUHPS2048509_CLEAN_CRYPTO_PUBLICKEYBYTES 699 #define PQCLEAN_NTRUHPS2048509_CLEAN_CRYPTO_CIPHERTEXTBYTES 699 #define PQCLEAN_NTRUHP...
1,328,579
the-stack-v2-dedup
C
char * numberToWords(long long int num) { int digits[12]; int index = 0; char *spelling = malloc(100 * sizeof(char)); while(0 != num) { digits[index++] = num % 10; num = num / 10; } }
1,328,580
the-stack-v2-dedup
C
/* * TI's FM Stack * * Copyright 2001-2008 Texas Instruments, Inc. - http://www.ti.com/ * Copyright 2010 Sony Ericsson Mobile Communications AB. * * 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 ...
1,328,581
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <string.h> void recursive_reverse(); void iterative_reverse(); int main(int argc, char const *argv[]) { printf("\nEnter your characters for recursive reversal test:"); recursive_reverse(); printf("\nEnter your characters for iterative reversal test:"); ...
1,328,582
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,328,583
the-stack-v2-dedup
C
#pragma once #include <D3DX11.h> #include <xnamath.h> // Vertex structure - our 3D models will store this information per-vertex struct CGVertexExt { XMFLOAT3 pos; XMFLOAT3 normal; XMCOLOR matDiffuse; XMCOLOR matSpecular; XMFLOAT2 texCoord; static HRESULT createInputLayout(ID3D11Device *device, ...
1,328,584
the-stack-v2-dedup
C
/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution...
1,328,585
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,328,586
the-stack-v2-dedup
C
#include<stdio.h> #define SIZE 40 _Bool is_within(char c,char *ch); int main(void) { char ch[SIZE],target; _Bool result; printf("Enter the string(enter ctrl+z to quit):\n"); while(fgets(ch,SIZE,stdin)!=NULL) { printf("Enter the charactor:"); scanf("%c",&target); result=is_within(target,ch); ...
1,328,587
the-stack-v2-dedup
C
void foo(int X, int (*A)[X]) { #pragma spf assert nomacro { int Y = X; A[X][X] = X; } }
1,328,588
the-stack-v2-dedup
C
#include <stdio.h> #include <sys/stat.h> int LongestCommonSubString(const char *str1, const char *str2) { if ( str1==NULL || str2==NULL ) { return 0; } int len1 = strlen(str1); int len2 = strlen(str2); int start1 = -1; int start2 = -1; int longest = 0; if ( len1 == 0 || len2 == 0 ) { return 0; } in...
1,328,589
the-stack-v2-dedup
C
// // Created by lipan on 2019/5/6. // #include "class.h" #include "obj_range.h" #include <string.h> bool valueIsEqual(Value a, Value b) { if (a.type == VT_NULL && b.type == VT_NULL) { return true; } // 类型不同则无需进行后面比较 if (a.type != b.type) { return false; } // 同为数字, 比...
1,328,590
the-stack-v2-dedup
C
#ifndef OUR_STRING_H #define OUR_STRING_H #include "pool.h" #include "unicode.h" #include <string.h> typedef struct { s64 count; u8 *data; } string; void append_character(string *text, u32 c) { u8 *d = (u8 *)&c; u8 size = utf8_size(d); for(s64 index = 0; index < size; ++index) text->data...
1,328,591
the-stack-v2-dedup
C
#ifndef CONST_H #define CONST_H #define SCREEN_WIDTH 800 #define SCREEN_HEIGHT 480 #define ARR_SIZE(N) sizeof(N)/sizeof(N[0]) #endif /* CONST_H */
1,328,592
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* rtv.h :+: :+: :+: ...
1,328,593
the-stack-v2-dedup
C
// // Created by 91241 on 2018-10-07. // #ifndef LINTCODE_P97_H #define LINTCODE_P97_H void P97(); #endif //LINTCODE_P97_H
1,328,594
the-stack-v2-dedup
C
#ifndef MAT_EE95_H #define MAT_EE95_H #include <inttypes.h> void ee95_init(uint8_t fdiv); void ee95_rd(uint16_t adr, uint8_t* buf, uint16_t len); void ee95_wr(uint16_t adr, uint8_t d); uint8_t ee95_rdsr(void); #endif
1,328,595
the-stack-v2-dedup
C
#ifndef __QUEUE_WRAP_H__ #define __QUEUE_WRAP_H__ #include "queue_private.h" struct queue_wrap_node { struct node node; void *data; }; extern int queue_wrap_prepend(queue_t q, void* data); extern int queue_wrap_enqueue(queue_t q, void* data); extern int queue_wrap_dequeue(queue_t q, void** data); #endif /...
1,328,596
the-stack-v2-dedup
C
/******************************************************************************* Copyright (c) 2011, Hangzhou H3C Technologies Co., Ltd. All rights reserved. -------------------------------------------------------------------------------- info_proc.c Project Code: Comware V700R001 Mo...
1,328,597
the-stack-v2-dedup
C
#include <stdio.h> void main(){ char painel; int C, unid, i; scanf("%d", &C); unid = 0; for(i = 1; i <= C; i++){ scanf(" %c", &painel); switch(painel){ case 'C': case 'P': { unid = unid + 2; break; } case 'A': { unid = unid + 1; break; } } } printf("%d\n", unid)...
1,328,598
the-stack-v2-dedup
C
#include <stdio.h> main() { int c; int zapped = 1; while((c = getchar()) != EOF) if(c == ' ') { zapped = 1; } else { // empty else branch behaves weirdly. I'm not sure if whatespace or even a blank semicolon does anything here. if (zapped == 1){ putchar(' '); zapped ...
1,328,599