repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
callmeli/zstd-android
zstd-lib/thirdparty/zstd/tests/poolTests.c
/* * Copyright (c) 2016-present, <NAME>, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/examples/simple_compression.c
<reponame>callmeli/zstd-android /* * Copyright (c) 2016-present, <NAME>, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory ...
callmeli/zstd-android
zstd-lib/src/main/cpp/zstd.c
<reponame>callmeli/zstd-android #include <jni.h> #include <common/zstd_internal.h> #include <common/zstd_errors.h> /* * Class: com_monstertoss_zstd_1android_Zstd * Method: compress * Signature: ([B[BI)J */ JNIEXPORT jlong JNICALL Java_com_monstertoss_zstd_1android_Zstd_compress (JNIEnv *env, jclass obj, j...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/examples/streaming_memory_usage.c
/* * Copyright (c) 2017-present, <NAME>, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/tests/fuzz/fuzz.h
/* * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). */ /** * Fuzz t...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/programs/zstdcli.c
/* * Copyright (c) 2016-present, <NAME>, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/contrib/long_distance_matching/main.c
<filename>zstd-lib/thirdparty/zstd/contrib/long_distance_matching/main.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <sys/types.h> #include <sys/mman.h> #include <sys/stat.h> #include <unistd.h> #include <zstd.h> #include <fcntl.h> #include "ldm.h" #include "zstd.h" // #d...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/lib/compress/zstd_lazy.c
/* * Copyright (c) 2016-present, <NAME>, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/lib/legacy/zstd_v06.c
/* * Copyright (c) 2016-present, <NAME>, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). * You may...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/contrib/long_distance_matching/ldm.c
<gh_stars>10-100 #include <limits.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "ldm.h" #define LDM_HASHTABLESIZE (1 << (LDM_MEMORY_USAGE)) #define LDM_HASHTABLESIZE_U32 ((LDM_HASHTABLESIZE) >> 2) #define LDM_HASHTABLESIZE_U64 ((LDM_HASHTABLESIZE) >> 3) #if USE_CHECKSUM ...
callmeli/zstd-android
zstd-lib/thirdparty/zstd/tests/fuzz/zstd_helpers.h
/* * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under both the BSD-style license (found in the * LICENSE file in the root directory of this source tree) and the GPLv2 (found * in the COPYING file in the root directory of this source tree). */ /** * Helper...
kasedy/ResetDetector
src/ResetDetector.h
#ifndef ResetDetector_H__ #define ResetDetector_H__ #include <Arduino.h> #include <user_interface.h> #include <EEPROM.h> class ResetDetector { uint32_t timeoutMs; bool waitingForDoubleReset; bool isLastResetReasonValuable; EEPROMClass eeprom; public: ResetDetector(uint32_t timeoutMs, uint32_t eepromSector =...
mtrempoltsev/rapidjson-generator
parser.h
#pragma once #include <memory> #include <string> class Item; class Parser final { public: static std::unique_ptr<Item> parse(const char* text); private: static void skipSpaces(const char*& text); static void moveToEndOfName(const char*& text); static std::string getName(const char*& text); };
mtrempoltsev/rapidjson-generator
item.h
<filename>item.h #pragma once #include <memory> #include <string> #include <vector> class Item final { public: enum class Type { Root, Namespace, Struct, Bool, Double, Int8, Int16, Int32, Int64, UInt8, UInt16, UIn...
NozomiNetworks/greyenergy-unpacker
greyenergy.c
<gh_stars>10-100 /* YARA module developed to parse the GreyEnergy packer, decrypting only the first part of the appdata in order to confirm the detection. After the compilation, it is possible to detect the malicious file just using the new keyword 'is_packed'. Rule example: [rule] import "pe" import "greyenergy" ...
shijian0/LYDownloaderLib
DownloaderLib/Classes/LYTest.h
<reponame>shijian0/LYDownloaderLib // // LYTest.h // DownloaderLib_Example // // Created by LiYong on 2019/9/18. // Copyright © 2019 shijian0. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface LYTest : NSObject - (void)eat; @end NS_ASSUME_NONNULL_END
shijian0/LYDownloaderLib
Example/DownloaderLib/LYViewController.h
<reponame>shijian0/LYDownloaderLib // // LYViewController.h // DownloaderLib // // Created by shijian0 on 09/18/2019. // Copyright (c) 2019 shijian0. All rights reserved. // @import UIKit; @interface LYViewController : UIViewController @end
shijian0/LYDownloaderLib
Example/DownloaderLib/LYAppDelegate.h
// // LYAppDelegate.h // DownloaderLib // // Created by shijian0 on 09/18/2019. // Copyright (c) 2019 shijian0. All rights reserved. // @import UIKit; @interface LYAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
facebookexperimental/Rseq
rseq/internal/rseq_c_inlines.c
/** * Copyright (c) 2018-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #include "...
facebookexperimental/Rseq
rseq/internal/IdAllocator.h
<reponame>facebookexperimental/Rseq /** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in...
facebookexperimental/Rseq
rseq/internal/Errors.h
<reponame>facebookexperimental/Rseq<gh_stars>10-100 /** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the...
facebookexperimental/Rseq
rseq/internal/ThreadControl.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
facebookexperimental/Rseq
rseq/internal/CpuLocal.h
<reponame>facebookexperimental/Rseq /** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in...
facebookexperimental/Rseq
rseq/internal/Mutex.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
facebookexperimental/Rseq
rseq/internal/Code.h
<reponame>facebookexperimental/Rseq /** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in...
facebookexperimental/Rseq
rseq/internal/OsMem.h
<filename>rseq/internal/OsMem.h /** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the...
facebookexperimental/Rseq
rseq/internal/AsymmetricThreadFence.h
<reponame>facebookexperimental/Rseq /** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in...
facebookexperimental/Rseq
rseq/Rseq.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
facebookexperimental/Rseq
rseq/internal/IntrusiveLinkedList.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
facebookexperimental/Rseq
rseq/internal/NumCpus.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
facebookexperimental/Rseq
rseq/internal/CleanUpOnThreadDeath.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
facebookexperimental/Rseq
rseq/internal/CachelinePadded.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
facebookexperimental/Rseq
rseq/internal/Rseq.h
<reponame>facebookexperimental/Rseq /** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in...
facebookexperimental/Rseq
rseq/internal/rseq_c.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
facebookexperimental/Rseq
rseq/rseq_c.h
<reponame>facebookexperimental/Rseq /** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in...
alexchae/ias
compositor/text-backend.c
<reponame>alexchae/ias /* * Copyright © 2012 Openismus GmbH * Copyright © 2012 Intel Corporation * * 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 * with...
alexchae/ias
libweston/ias-common.h
/* *----------------------------------------------------------------------------- * Filename: ias-common.h *----------------------------------------------------------------------------- * Copyright 2012-2018 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining * a copy of t...
alexchae/ias
clients/vmdisplay/vmdisplay-wayland.c
/* *----------------------------------------------------------------------------- * Filename: vmdisplay-wayland.c *----------------------------------------------------------------------------- * Copyright 2012-2018 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining * a co...
alexchae/ias
clients/simple-clock.c
<gh_stars>0 /* * Copyright © 2011 <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, pu...
alexchae/ias
libweston/gl-renderer.h
<gh_stars>0 /* * Copyright © 2012 <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, pu...
AndreasVaage/elevator_driver
c_src/erl_communication.h
#ifndef ERL_COMMUNICATION_H_ #define ERL_COMMUNICATION_H_ #include <stdint.h> #include <stdbool.h> typedef uint8_t byte; int read_cmd(byte *buf); int write_cmd(byte *buf, int len); int read_exact(byte *buf, int len); int write_exact(byte *buf, int len); #endif
AndreasVaage/elevator_driver
c_src/elevator_driver.h
<gh_stars>0 #ifndef ELEV_PORT_H_ #define ELEV_PORT_H_ #define MAX_COMMAND_SIZE 100 #define INIT_COMMAND 0 #define SET_MOTOR_DIRECTION_COMMAND 1 #define SET_BUTTON_LAMP_COMMAND 2 #define SET_FLOOR_INDICATION_COMMAND 3 #define SET_DOOR_OPEN_LAMP_COMMAND 4 #define SET_STOP_LAMP_COMMAND 5 #define GET_BUTTON_SIGNAL_COMMAN...
AndreasVaage/elevator_driver
c_src/elevator_driver.c
<reponame>AndreasVaage/elevator_driver #include "elev.h" #include "elevator_driver.h" #include "erl_communication.h" #include <stdint.h> int main() { while (1) { byte command_buffer[MAX_COMMAND_SIZE]; byte result[1]; int8_t dir; if(!(read_cmd(command_buffer) > 0)) { elev_set_moto...
fengye/libdrv8835-rpi
sdl_client.c
#include "drv8835.h" #include "drv8835_util.h" #include <stdbool.h> #include <stdint.h> #include <SDL2/SDL.h> int main(int argc, const char** argv) { const char* hostname = "127.0.0.1"; if (argc > 2 && (strcmp(argv[1], "--host") == 0 || strcmp(argv[1], "-h") == 0)) { hostname = argv[2]; } drv8835_log_setlevel...
fengye/libdrv8835-rpi
socket_client.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <stdint.h> #include <stdbool.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <netdb.h> #include <pthread.h> #include "socket_client.h" #include "types.h" #include "drv8835_util.h" #include "common....
fengye/libdrv8835-rpi
socket_client.h
#pragma once #include "types.h" #include <stdbool.h> #include <stdint.h> extern result_t socket_client_connect(const char *host, int port); extern result_t socket_client_disconnect(); extern bool socket_client_is_connected(); extern result_t socket_client_send_motor_param(uint8_t motor, int16_t param); extern result_...
fengye/libdrv8835-rpi
drv8835.c
#include "drv8835.h" #include <stdint.h> #include <stdbool.h> #include "types.h" #include "drv8835_util.h" #include "common.h" #ifdef RASPI #include <wiringPi.h> #include "motor_server.h" #include "socket_server.h" #endif #include "socket_client.h" #ifdef RASPI result_t drv8835_server_init() { if (!motor_server_is_in...
fengye/libdrv8835-rpi
tests/test_socket_srv.c
<gh_stars>0 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <stdbool.h> #include <time.h> #include "common.h" #include "types.h" int main(int argc, char** argv) { int sockfd; struct sockaddr_in srv_ad...
fengye/libdrv8835-rpi
tests/test_drv8835_socket_client.c
<reponame>fengye/libdrv8835-rpi #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <unistd.h> #include <signal.h> #include <string.h> #include "drv8835.h" #include "types.h" #include "drv8835_util.h" static void _on_interrupt() { drv8835_client_disconnect(); sleep(1); exit(0); } int main(int argc...
fengye/libdrv8835-rpi
motor_server.h
#pragma once #include <stdbool.h> #include "types.h" extern result_t motor_server_init(); extern bool motor_server_is_initialised(); extern result_t motor_server_start(); extern result_t motor_server_stop(); extern result_t motor_server_force_stop(); extern result_t motor_server_wait_till_stop(); extern result_t moto...
fengye/libdrv8835-rpi
tests/test_thread.c
#include <wiringPi.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <unistd.h> #include <math.h> //#include "libdrv8835.h" #include <pthread.h> #include "common.h" typedef struct _motor_param { int left; int right; } motor_param; static const int MOTOR0 = 0; static const int MOTOR1 = 1;...
fengye/libdrv8835-rpi
common.c
<reponame>fengye/libdrv8835-rpi #include "common.h" #include <unistd.h> #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "drv8835_util.h" const uint8_t HANDSHAKE_CLIENT[] = {0xCA, 0xFE}; const uint8_t HANDSHAKE_SERVER[] = {0xBE, 0xEF}; const int MAX_MISSING_HEARTBEAT = 5; cons...
fengye/libdrv8835-rpi
common.h
#pragma once #include <stdlib.h> #include <stdio.h> #include <signal.h> #include <stdint.h> #include <stdbool.h> #include <string.h> #include <pthread.h> #define LOCK(x) pthread_mutex_lock(x) #define UNLOCK(x) pthread_mutex_unlock(x) extern const uint8_t HANDSHAKE_CLIENT[2]; extern const uint8_t HANDSHAKE_SERVER[2];...
fengye/libdrv8835-rpi
drv8835_util.c
<filename>drv8835_util.c #include "drv8835_util.h" #include <unistd.h> #include <sys/types.h> #include <stdarg.h> const int LOG_DEBUG = 1; const int LOG_INFO = 3; const int LOG_ERROR = 5; static FILE* debug_out = NULL; static FILE* info_out = NULL; static FILE* error_out = NULL; static int log_level = 1; bool drv8...
fengye/libdrv8835-rpi
daemon/daemon.c
// Requires root #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <sys/types.h> #include <sys/stat.h> #include <syslog.h> #include <math.h> #include <wiringPi.h> static const int MOTOR0 = 0; static const int MOTOR1 = 1; static const int MAX_SPEED = 480; static const int PIN_MOTO...
fengye/libdrv8835-rpi
drv8835_server.c
<filename>drv8835_server.c #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <unistd.h> #include <string.h> #include "drv8835.h" #include "drv8835_util.h" #include "common.h" static void _on_interrupt() { drv8835_server_quit(); sleep(1); exit(0); } int main(int argc, char *argv[]) { int time =...
fengye/libdrv8835-rpi
drv8835.h
#pragma once #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <stdint.h> #include <stdbool.h> #include <string.h> #include <math.h> #include <memory.h> #include "types.h" #define EXPORT __attribute__ ((visibility("default"))) #ifdef RASPI extern EXPORT result_t drv8835_server_init(); extern EXPORT ...
fengye/libdrv8835-rpi
drv8835_util.h
#pragma once #include <stdio.h> #include <string.h> #include <stdbool.h> extern bool drv8835_is_root(); extern void drv8835_log_init(FILE* debug, FILE* info, FILE* error); extern void drv8835_log_setlevel(int loglevel); extern void drv8835_log_debug(const char* msg, ...); extern void drv8835_log_debug_nocr(const ch...
fengye/libdrv8835-rpi
tests/test_drv8835_motor_server.c
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <unistd.h> #include "drv8835.h" int main(int argc, char *argv[]) { if (drv8835_server_init() != 0) exit(EXIT_FAILURE); printf("Set to 50, 80\n"); drv8835_server_set_motor_params(MOTOR0, 50, MOTOR1, 80); usleep(1000*2000); printf(...
fengye/libdrv8835-rpi
socket_server.c
<filename>socket_server.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <stdint.h> #include <stdbool.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <pthread.h> #include "socket_server.h" #include "motor_server.h" #include "types.h" #include "...
fengye/libdrv8835-rpi
types.h
<reponame>fengye/libdrv8835-rpi #pragma once #include <stdint.h> #include <stdbool.h> extern const int DEFAULT_PORT; extern const int MOTOR0; extern const int MOTOR1; extern const int MAX_SPEED; extern const int PIN_MOTOR_PWM[2]; extern const int PIN_MOTOR_DIR[2]; extern const int LOG_DEBUG; extern const int LOG_IN...
fengye/libdrv8835-rpi
types.c
#include "types.h" const int DEFAULT_PORT = 9939; const int MOTOR0 = 0; const int MOTOR1 = 1; const int MAX_SPEED = 480; const int PIN_MOTOR_PWM[] = {12, 13}; const int PIN_MOTOR_DIR[] = {5, 6};
fengye/libdrv8835-rpi
motor_server.c
#include "motor_server.h" #include "types.h" #include "drv8835_util.h" #include <wiringPi.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <unistd.h> #include <math.h> #include <pthread.h> #include "common.h" // 16ms sleep ~= 60 fps const int WAIT_INTERVAL = 1000*16; const float INTERP_SEGS = 30...
fengye/libdrv8835-rpi
tests/test_socket_clt.c
<filename>tests/test_socket_clt.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <netdb.h> #include <time.h> #include "types.h" #include "common.h" #define INSERT_RANDOM_BYTES int main(int argc, char **argv...
fengye/libdrv8835-rpi
socket_server.h
#pragma once #include "types.h" #include <stdbool.h> extern result_t socket_server_init(int port); extern bool socket_server_is_initialised(); extern result_t socket_server_start(); extern bool socket_server_is_handshake_accepted(); extern result_t socket_server_wait_till_stop(); extern result_t socket_server_stop(); ...
Vladimir-Anfimov/oop-2022
Laborator10_/Tema/Compare.h
#pragma once class Compare{ public: virtual int CompareElements(void* e1, void* e2) = 0; };
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Database_remake/Entry.h
#pragma once #include <string> #include <iostream> class Entry { protected: std::string name; public: Entry(std::string name); std::string GetName(); virtual void Add(std::string toAdd) = 0; virtual bool Substract(int toSubstract) = 0; virtual void Print() = 0; };
Vladimir-Anfimov/oop-2022
Laborator 08/Tema/Compare.h
#pragma once #include <utility> #include <string> using std::pair; using std::string; class Compare { public: bool operator()(const pair<string, int>& perOne, const pair<string, int>& perTwo); };
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Database_remake/Database.h
<reponame>Vladimir-Anfimov/oop-2022 #pragma once #include "Entry.h" #include <vector> class Database { std::vector<Entry*> entries; public: Database& operator+=(Entry* ent); Database& operator-=(std::string name); std::vector<Entry*>::iterator begin(); std::vector<Entry*>::iterator end(); vo...
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Circle/CercInterator.h
<reponame>Vladimir-Anfimov/oop-2022 #pragma once #include "Punct.h" class CercInterator { public: Punct* it; bool operator!=(const CercInterator& cerc); CercInterator& operator++(); Punct operator*(); };
Vladimir-Anfimov/oop-2022
Laborator 06/Tema/Ford.h
<filename>Laborator 06/Tema/Ford.h #pragma once #include "Car.h" #include "Weather.h" class Ford : public Car { public: Ford(); double getAverageSpeed(Weather) override; const char* getName() override; double getFuelCapacity() override; double getFuelConsumption() override; };
Vladimir-Anfimov/oop-2022
Laborator 09/Map.h
#ifndef LABORATOR_09_MAP_H #define LABORATOR_09_MAP_H #include "Pair.h" #include "MapIterator.h" template <class T1, class T2> class Map { const static int DEFAULT_CAPACITY = 2; int size; int capacity; void resize(); Pair<T1, T2> *pairs; public: Map(); ~Map(); void Set(T1 key, T2 value...
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Biblioteca/BibliotecaIterator.h
<reponame>Vladimir-Anfimov/oop-2022 #pragma once #include "Carte.h" class BibliotecaIterator { public: Carte** iterator; BibliotecaIterator& operator++(); bool operator!=(const BibliotecaIterator& carteIterator); Carte* operator*(); };
Vladimir-Anfimov/oop-2022
Laborator10_/Tema/Array.h
#pragma once #include "CompareIntPointer.h" #include "ArrayIterator.h" template <class T> class Array { private: T** List; // lista cu pointeri la obiecte de tipul T* int Capacity; // dimensiunea listei de pointeri int Size; // cate elemente sunt in lista void Resize(); public: Array(); // ...
Vladimir-Anfimov/oop-2022
Laborator 05/Tema version 02/Number.h
<reponame>Vladimir-Anfimov/oop-2022 #pragma once class Number { char* vector; int base; int vector_size; long long unsigned decimal; void calculateDecimal(); static char* processingVector(unsigned new_decimal, unsigned new_base); public: Number(const char* value, int base=10); Number...
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Circle/Punct.h
<reponame>Vladimir-Anfimov/oop-2022<gh_stars>0 #pragma once class Punct { public: int x, y; Punct(); Punct(int x, int y); };
Vladimir-Anfimov/oop-2022
Laborator 02/FisiereBinare/movieseries.h
#pragma once #include "movie.h" class MovieSeries { private: Movie movies[16]; unsigned size; public: void init(); void add(const Movie &ep); void print()const; unsigned get_size() const; const Movie& get_movie(unsigned index) const; };
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Biblioteca/Revista.h
#pragma once #include "Carte.h" #include <iostream> #include <string> class Revista: public Carte { std::string titlu; int nrArticole; public: Revista(const std::string titlu, int nrArticole); std::string GetInfo(); };
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Database_remake/IntegerData.h
#pragma once #include "Entry.h" class IntegerData: public Entry { int value; public: IntegerData(std::string name, std::string value); void Add(std::string toAdd) override; bool Substract(int toSubstract) override; void Print() override; };
Vladimir-Anfimov/oop-2022
Laborator 06/Tema/Weather.h
<gh_stars>0 #pragma once enum class Weather{ Rain, Sunny, Snow };
Vladimir-Anfimov/oop-2022
Laborator10_/Tema/ArrayIterator.h
#pragma once template <class T> class ArrayIterator { private: int Current; // mai adaugati si alte date si functii necesare pentru iterator public: T* Item; ArrayIterator(); ArrayIterator& operator++(); ArrayIterator& operator--(); bool operator=(ArrayIterator<T>& it); bool operat...
Vladimir-Anfimov/oop-2022
Laborator 04/Tema/Sort.h
<reponame>Vladimir-Anfimov/oop-2022<filename>Laborator 04/Tema/Sort.h #pragma once #include <initializer_list> class Sort { int* vector; int size; int partition(int low, int high, bool ascending); void quick_sort(int low, int high, bool ascending); public: Sort(int size, int min, int max); ...
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Biblioteca/Carte.h
<reponame>Vladimir-Anfimov/oop-2022 #pragma once #include <string> class Carte { public: virtual std::string GetInfo() = 0; };
Vladimir-Anfimov/oop-2022
Laborator 07/Tema_ex02/Vector.h
<filename>Laborator 07/Tema_ex02/Vector.h #pragma once #include <iostream> #include <cstring> template <class T> class Vector { private: static const int INITIAL_ALLOCATED_SIZE = 1; T* arr; int size; int allocated_size; void resize(int new_allocated_size) { T* old_arr = arr; a...
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Database_remake/StringData.h
<filename>Examen practic pregatire 02/Database_remake/StringData.h #pragma once #include "Entry.h" class StringData: public Entry { std::string value; public: StringData(std::string name, std::string value); void Add(std::string toAdd) override; bool Substract(int toSubstract) override; void Pr...
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Biblioteca/Roman.h
<filename>Examen practic pregatire 02/Biblioteca/Roman.h #pragma once #include "Carte.h" #include <string> #include <iostream> class Roman: public Carte { std::string nume, autor; public: Roman(const std::string nume, const std::string autor); std::string GetInfo(); };
Vladimir-Anfimov/oop-2022
Laborator 02/Ex02/Student.h
<gh_stars>0 #pragma once class Student { const static int NAME_LENGTH = 30; char name[NAME_LENGTH]; float gradeMath; float gradeEnglish; float gradeHistory; public: void setName(const char* name); const char* getName() const; void setGradeMath(float grade); float getGradeMath()...
Vladimir-Anfimov/oop-2022
Laborator 06/Tema/Toyota.h
<reponame>Vladimir-Anfimov/oop-2022 #pragma once #include "Car.h" #include "Weather.h" class Toyota : public Car { public: Toyota(); double getAverageSpeed(Weather) override; const char* getName() override; double getFuelCapacity() override; double getFuelConsumption() override; };
Vladimir-Anfimov/oop-2022
Laborator 02/Ex02/GlobalFunctions.h
<filename>Laborator 02/Ex02/GlobalFunctions.h #pragma once #include "Student.h" int compareNames(const Student& studentOne, const Student &studentTwo); int compareMathGrade(const Student& studentOne, const Student &studentTwo); int compareEnglishGrade(const Student& studentOne, const Student& studentTwo); int compa...
Vladimir-Anfimov/oop-2022
Laborator 06/Tema/Circuit.h
#pragma once #include "Weather.h" #include "Car.h" class Circuit { const static int MAX_SIZE = 100; double length; Weather weather; Car* cars[100]; int size = 0; public: Circuit(); void SetLength(double length); void SetWeather(Weather weather); bool AddCar(Car* car); ...
Vladimir-Anfimov/oop-2022
Laborator 06/Tema/Car.h
<filename>Laborator 06/Tema/Car.h #pragma once #include <corecrt_memory.h> #include "Weather.h" class Car { protected: double fuel_capacity; double fuel_consumption; double* average_speed = new double[3]; public: Car(double fuel_capacity, double fuel_consumption) : fuel_capacity(fuel_capac...
Vladimir-Anfimov/oop-2022
Laborator 09/Pair.h
#ifndef LABORATOR_09_PAIR_H #define LABORATOR_09_PAIR_H template <class T1, class T2> class Pair { public: T1 key; T2 value; Pair(){} Pair(T1 key, T2 value): key(key), value(value){} }; #endif
Vladimir-Anfimov/oop-2022
Laborator 11/Seminar/CommandManager.h
<reponame>Vladimir-Anfimov/oop-2022<filename>Laborator 11/Seminar/CommandManager.h #pragma once #include <functional> #include <string> #include <vector> #include <map> #include <string> using namespace std; class CommandManager { private: map<string, function<void(vector<string>)>> commands; public: voi...
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Circle/Circle.h
<reponame>Vladimir-Anfimov/oop-2022 #pragma once #include "Punct.h" #include "CercInterator.h" #include <string> class Circle { Punct centru, patrat[4]; int raza; public: Circle(int centruX, int centruY, int raza); CercInterator begin(); CercInterator end(); bool operator==(const Punct& punct...
Vladimir-Anfimov/oop-2022
Examen practic pregatire 02/Biblioteca/Biblioteca.h
<reponame>Vladimir-Anfimov/oop-2022 #pragma once #include <vector> #include <string> #include "Carte.h" #include <iostream> #include <functional> #include "BibliotecaIterator.h" class Biblioteca { int count; Carte** carti; public: Biblioteca(); ~Biblioteca(); Biblioteca& operator+=(Carte* crt);...
Katee/PourCourtesy
libraries/Brain/Brain.h
// To do: // Data simulator #ifndef Brain_h #define Brain_h #if defined(ARDUINO) && ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #define MAX_PACKET_LENGTH 32 #define EEG_POWER_BANDS 8 // TK some kind of reset timer if we don't receive a packet for >3 seconds? class Brain { public: /...
gavofyork/RipInPeace
RIP.h
<reponame>gavofyork/RipInPeace<gh_stars>1-10 #pragma once #include <thread> #include <vector> #include <QSystemTrayIcon> #include <QDialog> #include <QTime> #include "DiscInfo.h" #include "Paranoia.h" #include "ui_Info.h" class QAction; class QTableWidget; class Settings; struct cddb_conn_s; struct cddb_disc_s; cla...
gavofyork/RipInPeace
Settings.h
<reponame>gavofyork/RipInPeace #pragma once #include <QDialog> namespace Ui { class Settings; } class RIP; class Progress; class QTreeWidgetItem; class Settings: public QDialog { Q_OBJECT public: explicit Settings(Progress* _parent, RIP* _rip); ~Settings(); public slots: void on_close_clicked(); void on_ope...
gavofyork/RipInPeace
contrib/do_read.c
<reponame>gavofyork/RipInPeace /* $Id: do_read.c,v 1.8 2005/03/11 21:29:27 airborne Exp $ Copyright (C) 2003, 2004, 2005 <NAME> <<EMAIL>> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Softw...
gavofyork/RipInPeace
Paranoia.h
<reponame>gavofyork/RipInPeace #pragma once #include <map> #include <string> #include <functional> #include <cstdint> struct cdrom_drive_s; struct cdrom_paranoia_s; class Paranoia { public: Paranoia(); ~Paranoia(); static size_t frameLength(); bool open(std::string const& _device = std::string()); bool isOpen(...