repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
Yozak47/DistMedDevice | main/include/apSelected_html.h | <filename>main/include/apSelected_html.h
#pragma once
unsigned static char apSelected_html[] = {
0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x68, 0x74,
0x6d, 0x6c, 0x3e, 0x0d, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0d,
0x0a, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0d, 0x0a, 0x3c, 0x6d, 0x65,
... |
Yozak47/DistMedDevice | main/distmed_webserver.c | <gh_stars>0
/*
* Copyright 2017 <NAME>
*
* 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,... |
Yozak47/DistMedDevice | main/include/distmed_adc.h | <reponame>Yozak47/DistMedDevice
/*
* Copyright 2017 <NAME>
*
* 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, ... |
Yozak47/DistMedDevice | main/include/distmed_netstruct.h | /*
* Copyright 2017 <NAME>
*
* 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, di... |
Yozak47/DistMedDevice | main/distmed.c | /*
* Copyright 2017 <NAME>
*
* 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, di... |
Yozak47/DistMedDevice | main/include/distmed_signalprocessing.h | /*
* Copyright 2017 <NAME>
*
* 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, di... |
Yozak47/DistMedDevice | main/include/distmed_storage.h | <reponame>Yozak47/DistMedDevice
/*
* Copyright 2017 <NAME>
*
* 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, ... |
Yozak47/DistMedDevice | main/distmed_signalprocessing.c | /*
* Copyright 2017 <NAME>
*
* 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, di... |
Yozak47/DistMedDevice | main/include/distmed_json.h | <gh_stars>0
/*
* Copyright 2017 <NAME>
*
* 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,... |
Yozak47/DistMedDevice | main/include/distmed_i2c.h | /*
* Copyright 2017 <NAME>
*
* 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, di... |
Yozak47/DistMedDevice | main/distmed_networks.c | <reponame>Yozak47/DistMedDevice
/*
* Copyright 2017 <NAME>
*
* 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, ... |
Yozak47/DistMedDevice | main/include/distmed_webserver.h | /*
* Copyright 2017 <NAME>
*
* 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, di... |
Jazzinghen/cave_generator_ue4 | Source/CavGen/cave_lib/Maze.h | <reponame>Jazzinghen/cave_generator_ue4
// Copyright (c) 2020 Michele "Jazzinghen" Bianchi
#pragma once
#include "Containers/Array.h"
#include "RandomWallQueue.h"
#include <cstdint>
#include <utility>
#include "Maze.generated.h"
/**
*
*/
UCLASS()
class CAVGEN_API UMaze : public UObject
{
GENERATED_BODY()
public... |
Jazzinghen/cave_generator_ue4 | Source/CavGen/cave_lib/RandomWallQueue.h | // Copyright (c) 2020 Michele "Jazzinghen" Bianchi
#pragma once
#include "Math/UnrealMathUtility.h"
#include <cstdint>
#include <iterator>
#include <random>
#include <utility>
#include <vector>
#include "RandomWallQueue.generated.h"
/**
*
*/
UCLASS()
class CAVGEN_API URandomWallQueue : public UObject
{
GENERATE... |
Jazzinghen/cave_generator_ue4 | Source/CavGen/cave_lib/CaveLib.h | // Copyright (c) 2020 Michele "Jazzinghen" Bianchi
#pragma once
#include "Containers/Array.h"
#include "CaveLib.generated.h"
/**
*
*/
UCLASS()
class CAVGEN_API UCaveLib : public UObject
{
GENERATED_BODY()
public:
UCaveLib() = default;
~UCaveLib() = default;
/** Generate cave system using the system presented... |
Jazzinghen/cave_generator_ue4 | Source/CavGen/CaveActor.h | <gh_stars>1-10
// Copyright (c) 2020 Michele "Jazzinghen" Bianchi
#pragma once
#include "Components/StaticMeshComponent.h"
#include "Containers/Array.h"
#include "CoreMinimal.h"
#include "Engine/StaticMesh.h"
#include "GameFramework/Actor.h"
#include "CaveActor.generated.h"
UCLASS()
class CAVGEN_API ACaveActor : pu... |
gergelyorosz/ObjectiveCToSwiftStepByStep | ObjectiveCToSwift - v1 with pch/ObjectiveCToSwift/ViewController.h | <filename>ObjectiveCToSwift - v1 with pch/ObjectiveCToSwift/ViewController.h
//
// ViewController.h
// ObjectiveCToSwift
//
// Created by <NAME> on 25/02/2016.
// Copyright © 2016 GergelyOrosz. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
gergelyorosz/ObjectiveCToSwiftStepByStep | ObjectiveCToSwift - v1/ObjectiveCToSwift/Models/FlightLeg.h | <reponame>gergelyorosz/ObjectiveCToSwiftStepByStep
//
// Flight.h
// ObjectiveCToSwift
//
// Created by <NAME> on 25/02/2016.
// Copyright © 2016 GergelyOrosz. All rights reserved.
//
@interface FlightLeg : TripLegBase
typedef NS_ENUM(NSInteger, FlightLegTravelClassType)
{
THFlightLegTravelClassTypeEconomy,
... |
gergelyorosz/ObjectiveCToSwiftStepByStep | ObjectiveCToSwift - v1 with pch/ObjectiveCToSwift/Models/TripLegBase.h | //
// TripLegBase.h
// ObjectiveCToSwift
//
// Created by <NAME> on 25/02/2016.
// Copyright © 2016 GergelyOrosz. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface TripLegBase : NSObject
@property (nonatomic, copy, readwrite) NSString *id;
@property (nonatomic, strong, readwrite) NSDate *start... |
gergelyorosz/ObjectiveCToSwiftStepByStep | ObjectiveCToSwift - v1/ObjectiveCToSwift/Models/HotelLeg.h | //
// HotelLeg.h
// ObjectiveCToSwift
//
// Created by <NAME> on 25/02/2016.
// Copyright © 2016 GergelyOrosz. All rights reserved.
//
@interface HotelLeg : TripLegBase
@property (nonatomic, copy, readwrite) NSString *hotelName;
@property (nonatomic, copy, readwrite) NSString *hotelDescription;
@property (nonatom... |
gergelyorosz/ObjectiveCToSwiftStepByStep | ObjectiveCToSwift - v2/ObjectiveCToSwift/Models/Trip.h | <reponame>gergelyorosz/ObjectiveCToSwiftStepByStep
//
// Trip.h
// ObjectiveCToSwift
//
// Created by <NAME> on 25/02/2016.
// Copyright © 2016 GergelyOrosz. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CarHireLeg;
@class HotelLeg;
@interface Trip : NSObject
@property (nonatomic, strong, read... |
NonNullDinu/TokenWiseDiff | src/comparing_algorithm.c | <filename>src/comparing_algorithm.c
#include "comparing_algorithm.h"
#include <stdlib.h>
void LCS(const struct token_t *items1, const struct token_t *items2,
unsigned count1, unsigned count2, size_t *matches_count) {
if (count1 == 0 || count2 == 0)
return;
unsigned begIndex1 = 0, begIndex2 = 0;
while (b... |
NonNullDinu/TokenWiseDiff | src/comparator.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "comparator.h"
#include "syntax.h"
#include "comparing_algorithm.h"
//int min(int a, int b) {
// return a < b ? a : b;
//}
static int special_matches(struct btoken_t blueprint, const char *txt);
static void token_cpy(struct token_t *adr, const struct... |
NonNullDinu/TokenWiseDiff | include/comparator.h | <filename>include/comparator.h<gh_stars>0
#ifndef COMPARATOR_H
#define COMPARATOR_H
#include <stdio.h>
#include <stdbool.h>
#include "tokens.h"
#include "syntax.h"
struct tokens_container_t {
struct token_t tokens[65536];
size_t token_count;
};
struct result_t {
size_t matches, total;
};
bool read_parse(struct t... |
NonNullDinu/TokenWiseDiff | include/comparing_algorithm.h | #ifndef COMP_ALGO_H
#define COMP_ALGO_H
#include "tokens.h"
#include <stddef.h>
void LCS(
const struct token_t *items1, const struct token_t *items2,
unsigned count1, unsigned count2, size_t *matches_count);
#endif |
NonNullDinu/TokenWiseDiff | include/tokens.h | <filename>include/tokens.h
#ifndef TOKENS_H
#define TOKENS_H
struct token_t {
int type;
};
struct btoken_t {
int type;
char blueprint[256];
};
#endif |
NonNullDinu/TokenWiseDiff | src/syntax.c | //
// Created by dinu on 4/4/20.
//
#include "syntax.h"
#include <stdio.h>
#include <string.h>
struct syntax_t getSyntax(const char *file) {
struct syntax_t s;
s.has_c_cpp_comments = s.has_std_strings = 0;
FILE *f = fopen(file, "r");
if (!f) { perror("Cannot open syntax"); }
char input[131072];
fread(input, 1, ... |
NonNullDinu/TokenWiseDiff | include/syntax.h | <gh_stars>0
#ifndef SYNTAX_H
#define SYNTAX_H
#include "tokens.h"
struct syntax_t {
int number_of_tokens;
struct btoken_t tokens[2048];
unsigned has_c_cpp_comments;
unsigned has_std_strings;
};
struct syntax_t getSyntax(const char* file);
#endif |
NonNullDinu/TokenWiseDiff | src/main.c | <reponame>NonNullDinu/TokenWiseDiff<filename>src/main.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "comparator.h"
struct in_file_t {
size_t index;
char path[256];
struct tokens_container_t container;
bool need, createdSuccessfully;
};
struct pair_of_in_files_t {
size... |
renemoll/stm32f7-template | src/system/clock.h | #ifndef CLOCK_H
#define CLOCK_H
void configureClockDomain();
#endif |
renemoll/stm32f7-template | src/system/system.h | <gh_stars>0
#ifndef SYSTEM_H
#define SYSTEM_H
extern "C" {
void __initialize_platform();
void __prepare_environment();
void __start();
}
#endif
|
renemoll/stm32f7-template | include/demo.h | <filename>include/demo.h<gh_stars>0
#ifndef DEMO_H
#define DEMO_H
#include <cinttypes>
class DemoInterface
{
public:
virtual void update(uint32_t timestamp) = 0;
virtual bool periodElapsed() const = 0;
protected:
virtual ~DemoInterface() {}
};
class Demo : public DemoInterface
{
public:
explicit Demo(uint32_t p... |
baileyeet/assignments | A06/decode.c | <filename>A06/decode.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "read_ppm.h"
int main(int argc, char** argv) {
int w = 0;
int h = 0;
int count = 0;
unsigned char str = 0;
if (argc < 2) {
printf("Need input file");
return -1;
}
char * file = argv[1];
struct ppm_pixel* arr = read_... |
baileyeet/assignments | A05/glitch.c | #include <stdio.h>
#include "read_ppm.h"
#include <stdlib.h>
#include <string.h>
int main(int argc, char** argv) {
if (argc < 2) {
printf("Need param");
return -1;
}
char* file = argv[1];
int w = 0;
int h = 0;
struct ppm_pixel* pxs = read_ppm(file, &w, &h);
printf("Reading %s with a width %d and a heig... |
baileyeet/assignments | A00/fortune.c | /***************************************************
* fortune.c
* Author: <NAME>
* Date: 1/21/2022
* Print fortune
*/
#include <stdio.h>
int main() {
printf("You will be rich.\n");
return 0;
}
|
baileyeet/assignments | A05/word.c | <reponame>baileyeet/assignments<filename>A05/word.c
#include <stdlib.h>
#include <stdio.h>
int main() {
char arr[4];
printf("Enter 4 characters: ");
scanf("%s", arr);
int word = 0;
int counter = 0;
for (int i = 3; i >= 0; i--) {
unsigned int temp = arr[i] << counter;
printf("Debug %c = 0x%08x\n", arr[i], ... |
baileyeet/assignments | A02/repeat.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
// declare variables
char *word;
char read_in[32];
int count;
// read in word and count
printf("Enter a word: ");
scanf("%s", read_in);
printf("Enter a count: ");
scanf("%d", &count);
// allocate memory from heap for word
word... |
baileyeet/assignments | A10/thread_mandelbrot.c | <filename>A10/thread_mandelbrot.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <time.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/shm.h>
#include <sys/ipc.h>
#include <pthread.h>
#include "read_ppm.h"
struct Info {
int id;
struct ppm_pixel* base;
struct ppm... |
baileyeet/assignments | A03/sorted_snackbar.c | //---------------------------------------------------------------------
// sorted_snackbar.c
// CS223 - Spring 2022
// Ask the user for a list of snacks and store them in alphabetical order
// Name: <NAME>
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct snack {
char name[32];
int quantity;
flo... |
baileyeet/assignments | A02/wordguess.c | <reponame>baileyeet/assignments
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
int main() {
FILE *fp;
char word[32];
char current_word[32];
int counter = 0;
char guess;
int random_word;
char stored_guesses[100]; // assumes 100 guesses max
int tries = 1;
srand(time(NULL));
int d... |
baileyeet/assignments | J02/readvector.c | <reponame>baileyeet/assignments
#include <stdio.h>
#include <stdlib.h>
// readvector opens and reads the given file
// The size of the vector should be stored in the parameter size
// The values should be returned in a flat float array
struct vector {
double one;
// double two;
// double three;
};
void readvector... |
baileyeet/assignments | A04/test_ppm.c | #include <stdio.h>
#include "read_ppm.h"
#include <stdlib.h>
int main() {
// todo: call read_ppm
int w = 0;
int h = 0;
int count = 1;
char * file = "feep-ascii.ppm";
struct ppm_pixel* arr = read_ppm(file, &w, &h);
printf("Testing file %s: %d %d\n", file, w, h);
for (int i = 0; i < w*h; i++) {
printf("(%d, %... |
baileyeet/assignments | A08/reallocate.c | #include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include "rand.h"
int main (int argc, char* argv[]) {
void *init = sbrk(0);
void *current;
for (int j = 0 ; j < 10; j++) {
size_t size = 100; // 100 bytes
int *memory = NULL;
memory = malloc(size);
if (memory == NULL) {
fprintf(... |
baileyeet/assignments | A01/password.c |
/***************************************************
* password.c
* Author: <NAME>
* Date: 1/22/2022
* Generate password given input
*/
#include <stdio.h>
void replace(char*, char, char);
int main() {
/// declaring string
char str[50];
// reading string
printf("Enter a word: ");
scanf("%s"... |
baileyeet/assignments | A05/binarychar.c | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
int compute(int n) {
int dec = 0, i = 0, rem;
while (n!=0) {
rem = n % 10;
n /= 10;
dec += rem * pow(2, i);
++i;
}
return dec;
}
int main() {
//unsigned char bits[8];
int num;
printf("Enter 8 bits: ");
scanf("%d", &num);
num = compute(num);
p... |
baileyeet/assignments | A10/read_ppm.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "read_ppm.h"
struct ppm_pixel* read_ppm(const char* filename, int* w, int* h) {
FILE *fp;
struct ppm_pixel* arr;
char current_word[200];
int tempw, temph;
fp = fopen(filename,"rb");
if(fp == NULL) { // ... |
baileyeet/assignments | J01/border.c | <filename>J01/border.c
#include <stdio.h>
#include <string.h>
int main() {
char *word;
char symbol;
int word_length;
printf("Please enter a word: ");
scanf(" %s", word);
printf("Please enter a symbol: ");
scanf(" %c", &symbol);
//printf(
word_length = strlen(word);
for (int i = 0; i < word_length + ... |
baileyeet/assignments | A02/dynamic_snackbar.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char name[32];
float cost;
int quantity;
}snack;
void print_options(snack*, int);
void create_snack(snack*, int);
int main() {
int num_snacks;
printf("Enter a number of snacks: ");
scanf("%d", &num_snacks);
snack snackbar[num_snack... |
baileyeet/assignments | J02/linkedlist.c | #include <stdio.h>
#include <string.h>
struct cake {
float cost;
char flavor[16];
struct cake* next;
};
struct cake makeCake(const char* flavor, float cost) {
struct cake newCake;
strncpy(newCake.flavor, flavor, 16);
newCake.cost = cost;
newCake.next = NULL;
return newCake;
}
// todo: implement cheapestCake
... |
baileyeet/assignments | A04/read_ppm.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "read_ppm.h"
// Feel free to change the function signature if you prefer to implement an
// array of arrays
struct ppm_pixel* read_ppm(const char* filename, int* w, int* h) {
FILE *fp;
struct ppm_pixel* arr;
char current_word[200];
unsigned char ... |
baileyeet/assignments | A04/ascii_image.c | #include <stdio.h>
#include "read_ppm.h"
#include <stdlib.h>
char intensity(int r, int g, int b) {
int i = (r + g + b)/3;
if (0 <= i && i <=25) {
return '@';
} else if (26 <= i && i <= 50) {
return '#';
} else if (51 <= i && i <= 75) {
return '%';
} else if (76 <= i && i <= 100) {
... |
baileyeet/assignments | A05/test_ppm.c | <reponame>baileyeet/assignments
#include <stdio.h>
#include "read_ppm.h"
#include <stdlib.h>
int main(int argc, char** argv) {
int w = 0;
int h = 0;
int count = 1;
char * file = "feep-raw.ppm";
struct ppm_pixel* arr = read_ppm(file, &w, &h);
printf("Testing file %s: %d %... |
baileyeet/assignments | A08/test.c | #include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <sys/time.h>
struct chunk {
int size;
int used;
struct chunk *next;
};
extern struct chunk* flist;
void check(int expr, const char* message) {
if (!expr) {
printf("%s\n", message);
exit(1);
}
}
... |
baileyeet/assignments | A01/snackbar.c | /*
* Desc:
* Program 2 for Assignment 1. Allows user to choose snack from snackbar
* and gives according feedback.
* @author <NAME>
* Modified: 1/26/2022
*/
#include <stdio.h>
#include <string.h>
#include <stddef.h>
// snack struct - contains name, cost, and quantity
typedef struct {
ch... |
baileyeet/assignments | A01/rpc.c | /***************************************************i
* rpc.c
* Author: <NAME>
* Date: 1/22/2022
* Play rock, paper, scissors
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
// methods defined later in code
int playRound(int, int, int);
void printScore(int, int);
void printWinner(... |
baileyeet/assignments | A09/single_mandelbrot.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include "read_ppm.h"
#include <math.h>
#include <string.h>
void generate(struct ppm_pixel* base, struct ppm_pixel* palette, int size, float xmin, float xmax, float ymin, float ymax, int maxIterations) {
float r... |
baileyeet/assignments | A09/multi_mandelbrot.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <time.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/shm.h>
#include <sys/ipc.h>
#include "read_ppm.h"
void generate(struct ppm_pixel* base, struct ppm_pixel* palette, int size, float xmin, float xmax, float ymin, flo... |
baileyeet/assignments | A06/encode.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "read_ppm.h"
char* string_to_binary(char* s) {
if(s == NULL) return 0; /* no input string */
size_t len = strlen(s);
char *binary = malloc(len*8 + 1); // each char is one byte (8 bits) and + 1 at the end for null terminator
binary[0] = '\0';
for(... |
baileyeet/assignments | A03/magic_square.c | <reponame>baileyeet/assignments
//---------------------------------------------------------------------
// magic_square.c
// CS223 - Spring 2022
// Identify whether a matrix is a magic square
// Name:
//
#include <stdio.h>
#include <stdlib.h>
int main() {
int rows;
int cols;
int *arr;
scanf("%d", &rows);
scanf(... |
baileyeet/assignments | A10/buddhabrot.c | <filename>A10/buddhabrot.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <time.h>
#include <pthread.h>
#include <math.h>
#include "read_ppm.h"
#include <sys/time.h>
#include <string.h>
struct Info {
struct ppm_pixel* base;
struct ppm_pixel* palette;
int size;
float xmin;
... |
baileyeet/assignments | A03/match_braces.c | <filename>A03/match_braces.c
//---------------------------------------------------------------------
// match_braces.c
// CS223 - Spring 2022
// Identify matched braces from a given file
// Name:
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
struct node {
char sym;
int linenum;
... |
baileyeet/assignments | A08/mylloc_list.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
struct chunk {
int size;
int in_use;
struct chunk *next;
};
struct chunk *flist = NULL;
void *malloc (size_t size) {
if( size == 0 ){
return NULL;
}
struct chunk *next = flist;
struct chunk *prev = NULL;
while (next != NULL) {
if (next->size >... |
azibom/bitcoin | src/test/fuzz/util.h | <reponame>azibom/bitcoin
// Copyright (c) 2009-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_TEST_FUZZ_UTIL_H
#define BITCOIN_TEST_FUZZ_UTIL_H
#include <amount.h>
#include <att... |
mitchellharper12/folding-scripts | foldingathome/yield_test.c | <filename>foldingathome/yield_test.c<gh_stars>1-10
#include <sched.h>
int main() {
return sched_yield();
}
|
mitchellharper12/folding-scripts | foldingathome/sched_yield_hook.c | #define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdarg.h>
#include <sys/types.h>
#include <unistd.h>
#include <dlfcn.h>
#include <time.h>
// If the below is set to 0, we will always return immediately
// Otherwise, we will selectively yield based on the modulus of a random int... |
zli12/reinforcement_learning | rlclientlib/vw_model/safe_vw.h | #pragma once
#include <vector>
#include <memory>
#include "vw.h"
#include "model_mgmt.h"
namespace reinforcement_learning {
class safe_vw {
// we need to keep a reference to the master around, so it's still valid even if the factory is deleted
std::shared_ptr<safe_vw> _master;
vw* _vw;
std::vector<... |
zli12/reinforcement_learning | unit_test/mock_util.h | <reponame>zli12/reinforcement_learning<filename>unit_test/mock_util.h
#pragma once
#include "factory_resolver.h"
#include "sender.h"
#include <memory>
#ifdef __GNUG__
// Fakeit does not work with GCC's devirtualization
// which is enabled with -O2 (the default) or higher.
#pragma GCC optimize("no-devirtualize")
#e... |
zli12/reinforcement_learning | rlclientlib/sampling.h | #pragma once
#include "model_mgmt.h"
#include "ranking_response.h"
#include "decision_response.h"
#include <vector>
namespace reinforcement_learning {
class i_trace;
}
namespace reinforcement_learning {
int populate_response(size_t chosen_action_index, std::vector<int>& action_ids, std::vector<float>& pdf, std::... |
zli12/reinforcement_learning | rlclientlib/utility/context_helper.h | #pragma once
#include "api_status.h"
#include <vector>
#include <map>
#include <utility>
namespace reinforcement_learning {
class i_trace;
namespace utility {
int get_action_count(size_t& count, const char *context, i_trace* trace, api_status* status = nullptr);
int get_event_ids(const char* context, std::map... |
zli12/reinforcement_learning | bindings/cs/rl.net.native/rl.net.live_model.h | <reponame>zli12/reinforcement_learning
#pragma once
#include "rl.net.native.h"
namespace rl_net_native {
namespace constants {
const char *const BINDING_TRACE_LOGGER = "BINDING_TRACE_LOGGER";
}
typedef void(*background_error_callback_t)(const reinforcement_learning::api_status&);
typedef void(... |
zli12/reinforcement_learning | include/learning_mode.h | <gh_stars>0
/**
* @brief decision_modes definition.
*
* @file decision_modes.h
* @author <NAME>
* @date 2020-02-13
*/
#pragma once
namespace reinforcement_learning {
enum learning_mode {
ONLINE = 0,
IMITATION = 1,
};
namespace learning {
learning_mode to_learning_mode(const char* l... |
DavidHLSilva/App_clima | build/iphone/Classes/TiUITextField.h | <reponame>DavidHLSilva/App_clima
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at you... |
DavidHLSilva/App_clima | build/iphone/Classes/TiFilesystemFileProxy.h | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
... |
DavidHLSilva/App_clima | build/iphone/Classes/YahooModule.h | <reponame>DavidHLSilva/App_clima<filename>build/iphone/Classes/YahooModule.h
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WA... |
DavidHLSilva/App_clima | build/iphone/Classes/KrollCoverage.h | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
... |
DavidHLSilva/App_clima | build/iphone/Classes/TiDOMNodeProxy.h | <reponame>DavidHLSilva/App_clima
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at you... |
DavidHLSilva/App_clima | build/iphone/Classes/TiUITabGroup.h | <reponame>DavidHLSilva/App_clima
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at you... |
DavidHLSilva/App_clima | build/iphone/Classes/TiCalendarEvent.h | <filename>build/iphone/Classes/TiCalendarEvent.h<gh_stars>1-10
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is... |
DavidHLSilva/App_clima | build/iphone/Classes/TiNetworkBonjourBrowserProxy.h | <gh_stars>1-10
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and wit... |
DavidHLSilva/App_clima | build/iphone/Classes/TiRect.h | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
... |
DavidHLSilva/App_clima | build/iphone/Classes/TiAppiOSUserDefaultsProxy.h | <filename>build/iphone/Classes/TiAppiOSUserDefaultsProxy.h
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is gen... |
DavidHLSilva/App_clima | build/iphone/Classes/CalendarModule.h | <reponame>DavidHLSilva/App_clima
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at you... |
DavidHLSilva/App_clima | build/iphone/Classes/TiMediaAudioPlayerProxy.h | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
... |
DavidHLSilva/App_clima | build/iphone/Classes/TiUIPicker.h | /**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2018 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
... |
HoriaCool/Hackthon-SO-2020-2021 | skel/test_clients/client6.c | <gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/logmemcache.h"
int main() {
char longline[LOGLINE_SIZE + 1];
struct logmemcache_st *client;
struct client_logline **lines;
char *stats;
uint64_t logs, i;
char time[TIME_SIZE + 1];
char logline[LINE_SIZE - TIME_SIZE + 1]... |
HoriaCool/Hackthon-SO-2020-2021 | skel/test_clients/client5.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/logmemcache.h"
int main() {
struct logmemcache_st *client;
struct client_logline **lines;
char *stats;
uint64_t logs, i;
char time[TIME_SIZE + 1];
char logline[LINE_SIZE - TIME_SIZE + 1];
client = logmemcache_create(NULL);
logmem... |
HoriaCool/Hackthon-SO-2020-2021 | skel/test_clients/client2.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/logmemcache.h"
int main() {
struct logmemcache_st *client;
client = logmemcache_create(NULL);
printf("client = %p\n", client);
if (client != NULL)
fprintf(stderr, "Client was created\n");
else
fprintf(stderr, "Client was not ... |
HoriaCool/Hackthon-SO-2020-2021 | skel/test_clients/client3.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/logmemcache.h"
char logline[200];
int main() {
int rc;
struct logmemcache_st *client;
client = logmemcache_create("specialC");
printf("client = %p\n", client);
for (rc = 0; rc < 50; rc ++) {
fprintf(stderr, "Send log no %d\n", ... |
HoriaCool/Hackthon-SO-2020-2021 | skel/liblogmemcache/win/logmemcache_os.c | /**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#undef _UNICODE
#undef UNICODE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winsock2.h>
#include "../../include/logmemcache.h"
#include <windows.h>
#include <Psapi.h>
#include <shlwapi.h>
#pragma comment (lib, "Ws2_32.... |
HoriaCool/Hackthon-SO-2020-2021 | skel/test_clients/client4.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/logmemcache.h"
int main() {
struct logmemcache_st *client;
char *stats;
client = logmemcache_create(NULL);
logmemcache_add_log(client, "this is a log line");
logmemcache_add_log(client, "this is a log line");
logmemcache_add_log(c... |
HoriaCool/Hackthon-SO-2020-2021 | skel/liblogmemcache/lin/logmemcache_os.c | <gh_stars>0
/**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include <time.h>
#include <arpa/inet.h>
#include "../../include... |
HoriaCool/Hackthon-SO-2020-2021 | skel/liblogmemcache/logmemcache.c | <filename>skel/liblogmemcache/logmemcache.c
/**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "../include/logmemcache.h"
#ifdef _WIN32
#include <windows.h>
#endif
/* Client API */
static int logmemcache_cli... |
HoriaCool/Hackthon-SO-2020-2021 | skel/include/logmemcache.h | <filename>skel/include/logmemcache.h
/**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#ifndef __LIBLOGMEMCACHE
#define __LIBLOGMEMCACHE
#include <stdint.h>
#include "utils.h"
struct logmemcache_st {
SOCKET socket;
char *name;
};
/* Client API */
struct logmemcache_st *logmemcache_create(ch... |
HoriaCool/Hackthon-SO-2020-2021 | skel/include/server.h | /**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#ifndef __LOGMEMCACHE_SERVER
#define __LOGMEMCACHE_SERVER
#include <sys/types.h>
#include "utils.h"
#ifdef __unix__
#include <sys/socket.h>
#endif
#define DEFAULT_CLIENTS_NO 20
#define FLUSH_TIME 1 /* minutes */
#define LOGFILE_NAME_LEN 128
... |
HoriaCool/Hackthon-SO-2020-2021 | checker/checker.c | <gh_stars>0
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef __unix__
#include <signal.h>
#endif
#include "logmemcache.h"
#define STREQ(S1, S2) (strcmp(S1, S2) == 0)
#define PADLEN 80
#define SHORT_LINE_LEN 20
#define LONG_LINE_LEN 200
#define TOO_BIG_LINE_L... |
HoriaCool/Hackthon-SO-2020-2021 | skel/test_clients/client1.c | <filename>skel/test_clients/client1.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/logmemcache.h"
int main() {
struct logmemcache_st *client;
client = logmemcache_create(NULL);
logmemcache_unsubscribe(client);
printf("client = %p\n", client);
return 0;
}
|
HoriaCool/Hackthon-SO-2020-2021 | skel/include/utils.h | <filename>skel/include/utils.h
/**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#ifndef __LOGMEMCACHE_UTILS
#define __LOGMEMCACHE_UTILS
#include <stdint.h>
#ifdef __unix__
#include <inttypes.h>
#elif defined(_WIN32)
#include <winsock2.h>
#endif
#ifdef __unix__
typedef int SOCKET;
#define UIN... |
HoriaCool/Hackthon-SO-2020-2021 | skel/server/win/server_os.c | /**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#pragma comment(lib,"Ws2_32.lib")
#include "../../include/server.h"
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
extern char *logfile_path;
DWORD WINAPI client_fu... |
HoriaCool/Hackthon-SO-2020-2021 | skel/utils.c | /**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifdef __unix__
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <unis... |
HoriaCool/Hackthon-SO-2020-2021 | skel/server/lin/server_os.c | <reponame>HoriaCool/Hackthon-SO-2020-2021
/**
* Hackathon SO: LogMemCacher
* (c) 2020-2021, Operating Systems
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <pthre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.