repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
resetius/graphtoys | lib/object.h | <gh_stars>0
#pragma once
struct DrawContext {
float ratio;
float time;
int w;
int h;
};
struct Object {
void (*draw)(struct Object*, struct DrawContext* );
void (*free)(struct Object*);
void (*move_left)(struct Object*, int mods);
void (*move_right)(struct Object*, int mods);
void ... |
resetius/graphtoys | test/gltf.c | #include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <lib/formats/gltf.h>
static void get_config_fname(char* out, int size, const char* dir, const char* config) {
memset(out, 0, size);
strncpy(out, dir, size-256);
... |
resetius/graphtoys | tools/rcc.c | <filename>tools/rcc.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
void usage(char* name) {
printf("%s text.txt [-o output_name] [--strip prefix] [-q]\n", name);
}
int main(int argc, char** argv) {
int i;
char* input = NULL;
char* output = NULL;
char* varname = NUL... |
resetius/graphtoys | opengl/program.c | <filename>opengl/program.c
#include "program.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <glad/gl.h>
struct ProgramImpl {
struct Program base;
GLuint program;
GLint major;
GLint minor;
void (*log)(const char* msg);
};
static void log_func(const char* msg) {
puts(ms... |
resetius/graphtoys | vulkan/rendertarget.h | #pragma once
#include "vk.h"
struct RenderImpl;
struct RenderTarget {
VkImageView* imageviews;
int n_imageviews;
VkFramebuffer* framebuffers;
int n_framebuffers;
VkDevice dev;
VkImageView depth_imageview;
};
void rt_init(struct RenderTarget* rt, struct RenderImpl* r);
void rt_destroy(struct Ren... |
resetius/graphtoys | render/pipeline.c | <reponame>resetius/graphtoys
#include "pipeline.h"
void pl_free(struct Pipeline* pl) {
pl->free(pl);
}
void pl_storage_assign(struct Pipeline* p1, int storage_id, int buffer_id)
{
p1->storage_assign(p1, storage_id, buffer_id);
}
void pl_uniform_assign(struct Pipeline* p1, int uniform_id, int buffer_id)
{
... |
resetius/graphtoys | models/triangle.h | <reponame>resetius/graphtoys
#pragma once
#include <lib/object.h>
struct Render;
struct Config;
struct Object* CreateTriangle(struct Render* r, struct Config*);
|
resetius/graphtoys | tools/stlprint.c | #include <stdio.h>
int main(int argc, char** argv) {
FILE* f;
char header[100];
int n_triangles;
int i,j;
if (argc < 2) {
printf("File name required\n");
return -1;
}
f = fopen(argv[1], "rb");
if (!f) {
printf("Cannot open file '%s'\n", argv[1]);
return -... |
resetius/graphtoys | vulkan/commandbuffer.h | #pragma once
#include "vk.h"
struct RenderImpl;
struct CommandBuffer {
VkDevice dev;
VkCommandPool pool;
};
void cb_init(struct CommandBuffer* d, struct RenderImpl* r);
void cb_destroy(struct CommandBuffer* d);
void cb_begin(struct CommandBuffer* d, VkCommandBuffer buffer);
void cb_end(struct CommandBuffer* ... |
resetius/graphtoys | main.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <render/render.h>
#include <font/font.h>
#include <lib/object.h>
#include <lib/config.h>
#include <lib/event.h>
#include <models/triangle.h>
#include <models/torus.h>
#include <models/mandelbrot.h>... |
SneakersAgencyLLC/sneakers-analytics-ios-integration-localytics | Example/Pods/Headers/Public/Segment-Localytics/SEGLocalyticsIntegration.h | <reponame>SneakersAgencyLLC/sneakers-analytics-ios-integration-localytics<gh_stars>0
#import <Foundation/Foundation.h>
#import <Analytics/SEGIntegration.h>
@interface SEGLocalyticsIntegration : NSObject<SEGIntegration>
@property(nonatomic, strong) NSDictionary *settings;
- (id)initWithSettings:(NSDictionary *)settin... |
nanvix/optimsoc | external/opensocdebug/software/src/python/src/osd.c | <filename>external/opensocdebug/software/src/python/src/osd.c
/* Generated by Cython 0.29.10 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [],
"include_dirs": [
"/home/philipp/swinstall/osd/include",
"/home/philipp/swinstall/glip/include/glip"
],
"... |
Shamilv05/findErrors | task.c | <reponame>Shamilv05/findErrors<gh_stars>1-10
/**
* @brief
* Find errors and decrease probability of getting errors of the same kind in the future
* This piece of code won't compile and it doesn't describe an entire algorithm: just part of some page storage
*
* @author
* AnnaM
*/
#include <Windows.h>
... |
Panzerschrek/Harp-Simulator | spectrum.h | <filename>spectrum.h
static const float in1[]=
{
1.0f,
0.43f,
0.46f,
0.046f,
0.19f,
0.014f,
0.08f,
0.08f,
0.4f,
0.253f,
0.564f,
0.278f,
0.21f,
0.089f,
0.16f,
0.27f,
0.15f,
0.2f,
0.09f,
0.075f,
0.035f,
0.075f,
0.028f,
0.057f,
};
static const float out1[]=
{
1.0f,
0.117f,
0.325f,
0.0357f,
0.... |
mfkiwl/Clarinet-riscv | applications/lib/clarinet.c | #include <stdio.h>
#include <math.h>
#include "clarinet.h"
// For a detailed explainer of inline assembler, the following resource is excellent:
// http://www.ethernut.de/en/documents/arm-inline-asm.html
// --------
// FMA macros
// the _p_ indicates that the input values are posit type
#ifdef POSIT
#ifdef PWIDTH_8
v... |
mfkiwl/Clarinet-riscv | applications/gemm/gemm.c | <gh_stars>10-100
#include <stdio.h>
//for read_cycle
#include "riscv_counters.h"
// for PRIu64
#include <inttypes.h>
#include "data_gemm.h"
#include "clarinet.h"
int main (void) {
#ifdef POSIT
#ifdef PWIDTH_8
unsigned char acc [VSZ][VSZ];
#endif
#ifdef PWIDTH_16
unsigned short acc [VSZ][VSZ];
#endif
#ifdef PWID... |
mfkiwl/Clarinet-riscv | applications/lib/syscalls.c | #include <errno.h>
#include <sys/stat.h>
#include <sys/times.h>
#include <sys/time.h>
#ifndef __linux__
__attribute__ ((weak))
int _read(int file, char *ptr, int len) {
errno = ENOSYS;
return -1;
}
__attribute__ ((weak))
int _write(int file, char *ptr, int len) {
errno = ENOSYS;
return -1;
}
#defin... |
mfkiwl/Clarinet-riscv | applications/vdp/vdp.c | <filename>applications/vdp/vdp.c
#include <stdio.h>
//for read_cycle
#include "riscv_counters.h"
// for PRIu64
#include <inttypes.h>
#include "clarinet.h"
#include "data_vdp.h"
int main (void) {
#ifdef POSIT
#ifdef PWIDTH_8
unsigned char acc;
#endif
#ifdef PWIDTH_16
unsigned short acc;
#endif
#ifdef PWIDTH_24
... |
mfkiwl/Clarinet-riscv | applications/givens/givens.c | <filename>applications/givens/givens.c
#include <stdio.h>
//for read_cycle
#include "riscv_counters.h"
// for PRIu64
#include <inttypes.h>
#include "clarinet.h"
#include "data_givens.h"
// --------
// Givens routines
//
#ifdef DOUBLE
void fn_double_givens (int dim, double mat[][VSZ], int r, int c) {
double tmp, si... |
mfkiwl/Clarinet-riscv | applications/lib/riscv_counters.c | // Copyright (c) 2013 Bluespec, Inc. All Rights Reserved
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
// ----------------------------------------------------------------
// For 64-bit:
// The following are interfaces to inline RISC-V assembly instructions
// RDCYCLE
// For all of them, the result... |
mfkiwl/Clarinet-riscv | applications/lib/clarinet.h | <reponame>mfkiwl/Clarinet-riscv<gh_stars>10-100
// --------
#ifdef POSIT
#ifdef PWIDTH_8
void fn_posit_p_fma (unsigned char a, unsigned char b);
#endif
#ifdef PWIDTH_16
void fn_posit_p_fma (unsigned short a, unsigned short b);
#endif
#ifdef PWIDTH_24
void fn_posit_p_fma (unsigned int a, unsigned int b);
#endif
#ifdef P... |
mfkiwl/Clarinet-riscv | applications/gemv/gemv.c | #include <stdio.h>
//for read_cycle
#include "riscv_counters.h"
// for PRIu64
#include <inttypes.h>
#include "data_gemv.h"
#include "clarinet.h"
int main (void) {
#ifdef POSIT
#ifdef PWIDTH_8
unsigned char acc [VSZ];
#endif
#ifdef PWIDTH_16
unsigned short acc [VSZ];
#endif
#ifdef PWIDTH_24
unsigned int acc [... |
mfkiwl/Clarinet-riscv | applications/lib/uart.c |
#include <stdint.h>
#define DEFAULT_BAUDRATE (115200)
#define NS16550_BASE (0xC0000000ULL)
#define NS16550_CLOCK_RATE (1000000ULL * CLOCK_MHZ)
enum __attribute__ ((__packed__)) ier_t {
IER_ERBI = (1<<0),
IER_ETBEI = (1<<1),
IER_ELSI = (1<<2),
IER_EDSSI = (1<<3),
IER_SLEEP = (1<<4), // 16650 ... |
mfkiwl/Clarinet-riscv | applications/lib/riscv_counters.h | <filename>applications/lib/riscv_counters.h
// Copyright (c) 2013 Bluespec, Inc. All Rights Reserved
#pragma once
// ----------------------------------------------------------------
// For 64-bit:
// The following are interfaces to inline RISC-V assembly instructions
// RDCYCLE
// For all of them, the result is ... |
mfkiwl/Clarinet-riscv | applications/Optical-Flow/lucaskanade_f32.c | <reponame>mfkiwl/Clarinet-riscv<filename>applications/Optical-Flow/lucaskanade_f32.c
#include <stdio.h>
#include <inttypes.h>
#include "img_rubik.h"
// #include "img_sphere.h"
#include "clarinet.h"
#include "riscv_counters.h"
// int X,Y;
int normalise = 0;
void getPOI(int kernelSize, int POI[][1][2])
{
int cou... |
mfkiwl/Clarinet-riscv | applications/lib/main.c | #include <stdio.h>
//for read_cycle
#include "riscv_counters.h"
// for PRIu64
#include <inttypes.h>
int main (int argc, char ** argv)
{
uint64_t start=read_cycle();
printf("Hello World!\n");
uint64_t end=read_cycle();
printf("read_cycle: %" PRIu64 " cycles have elapsed.\n",end-start);
return 0;
}... |
liimur/IRCClientiOS | External/libircclient/src/utils.c | <reponame>liimur/IRCClientiOS
/*
* Copyright (C) 2004-2009 <NAME> <EMAIL>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option... |
liimur/IRCClientiOS | External/libircclient/src/dcc.c | <reponame>liimur/IRCClientiOS
/*
* Copyright (C) 2004-2009 <NAME> <EMAIL>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option... |
liimur/IRCClientiOS | Classes/IRCClientSession.h | <reponame>liimur/IRCClientiOS
/*! \mainpage IRCClient - a Cocoa IRC Framework to create IRC clients
*
* \section intro_sec Introduction
*
* IRCClient is a Cocoa Framework that uses the excellent libircclient library
* written by <NAME>.
*
* \section usage Basic Usage
*
* To use this framework, you will need to... |
liimur/IRCClientiOS | Classes/IRCClientSessionDelegate.h | <gh_stars>1-10
/*
* Copyright (C) 2009 <NAME> <EMAIL>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.... |
liimur/IRCClientiOS | External/libircclient/src/portable.c | /*
* Copyright (C) 2004-2009 <NAME> <EMAIL>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* Thi... |
AmbushConsulting/AHKActionSheet | Classes/AHKActionSheet.h | <filename>Classes/AHKActionSheet.h
//
// AHKActionSheet.h
// AHKActionSheetExample
//
// Created by Arkadiusz on 08-04-14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, AHKActionSheetButtonType) {
AHKActionSheetButtonTypeDefault = 0,
AHKActionShee... |
AmbushConsulting/AHKActionSheet | Classes/UIView+Snapshots.h | //
// UIView+Snapshots.h
// AHKActionSheetExample
//
// Created by Arkadiusz on 08-04-14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (Snapshots)
- (UIImage *)AHKsnapshotImage;
@end
|
AmbushConsulting/AHKActionSheet | Classes/UIWindow+AHKAdditions.h | <reponame>AmbushConsulting/AHKActionSheet<filename>Classes/UIWindow+AHKAdditions.h
//
// UIWindow+AHKAdditions.h
// AHKActionSheetExample
//
// Created by Arkadiusz on 14-04-14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
// Original source: https://github.com/Sumi-Interactive/SIAlertView/blob/master/SIAl... |
j-kk/Languages-and-Tools-for-Programming | Starwars/battle.h | <filename>Starwars/battle.h
#ifndef JNP4_BATTLE_H
#define JNP4_BATTLE_H
#include <iostream>
#include <type_traits>
#include <cassert>
#include <tuple>
#include <array>
#include <cmath>
#include <algorithm>
#include "rebelfleet.h"
#include "imperialfleet.h"
template<typename T, T i, T t1>
static constexp... |
j-kk/Languages-and-Tools-for-Programming | Wallet/wallet_svn.h | #ifndef WALLET_H
#define WALLET_H
#include <iostream>
#include <vector>
#include <string>
#include <chrono>
#include <utility>
using namespace std::rel_ops;
using std::vector;
using std::ostream;
using std::string;
using namespace std::chrono;
using ll = long long;
using ull = unsigned long long;
// OPERATION... |
j-kk/Languages-and-Tools-for-Programming | Starwars 2/battle.h | #ifndef MJ394327_JK394387_BATTLE_H
#define MJ394327_JK394387_BATTLE_H
#include <cstdio>
#include <vector>
#include "imperialfleet.h"
#include "rebelfleet.h"
#include <iostream>
using Time = long long;
class SpaceTime {
public:
SpaceTime() = default;
bool isAttackTime(Time currentTime) {
return ((cur... |
j-kk/Languages-and-Tools-for-Programming | Citation Graph/citation_graph.h | <reponame>j-kk/Languages-and-Tools-for-Programming<gh_stars>0
#ifndef CITATION_GRAPH_H
#define CITATION_GRAPH_H
#include <vector>
#include <map>
#include <memory>
#include <set>
struct PublicationAlreadyCreated : public std::exception {
const char *what() const noexcept override {
return "PublicationAlrea... |
j-kk/Languages-and-Tools-for-Programming | Starwars 2/rebelfleet.h | <filename>Starwars 2/rebelfleet.h<gh_stars>0
#ifndef MJ394327_JK394387_REBELFLEET_H
#define MJ394327_JK394387_REBELFLEET_H
#include <memory>
#include "assert.h"
#include "helper.h"
#include "imperialfleet.h"
class RebelStarship : public virtual BasicShip {
private:
Speed speed;
public:
RebelStarship(ShieldPo... |
j-kk/Languages-and-Tools-for-Programming | Strset/tests/mtest1.c | #include "strset.h"
#include "strsetconst.h"
#include <assert.h>
#include <stdio.h>
//#include <string>
//
//using jnp1::strset_new;
//using jnp1::strset_insert;
//using jnp1::strset_delete;
//using jnp1::strset_test;
//using jnp1::strset_remove;
//using jnp1::strset_size;
//using jnp1::strset_comp;
//using jnp1::strs... |
j-kk/Languages-and-Tools-for-Programming | Starwars 2/helper.h | #ifndef MJ394327_JK394387_HELPER_H
#define MJ394327_JK394387_HELPER_H
#include <cassert>
using ShieldPoints = long long;
using AttackPower = long long;
using Speed = long long;
class Ship {
public:
virtual ~Ship() = default;
virtual ShieldPoints getShield() const = 0;
virtual void takeDamage(AttackPow... |
j-kk/Languages-and-Tools-for-Programming | Strset/tests/test2.c | #include "strsetconst.h"
#include "strset.h"
#include <assert.h>
int main(void) {
//operations on nonexistant sets
{
strset_delete(1);
strset_delete(2);
strset_delete(3);
assert(strset_size(strset42()) == 1);
assert(strset_size(5) == 0);
assert(strset_size(2) == 0)... |
j-kk/Languages-and-Tools-for-Programming | Starwars/rebelfleet.h | #ifndef REBELFLEET_H
#define REBELFLEET_H
#include <type_traits>
#include <cassert>
#include <algorithm>
template <typename U, int minSpeed, int maxSpeed, bool canAttack>
class RebelStarship {
private:
U shield;
U speed;
U attackPower = 0;
public:
using valueType = U;
template <... |
j-kk/Languages-and-Tools-for-Programming | Starwars/imperialfleet.h | #ifndef IMPERIALFLEET_H
#define IMPERIALFLEET_H
#include <type_traits>
#include <cassert>
#include <algorithm>
#include "rebelfleet.h"
template<typename U>
class ImperialStarship {
private:
U shield;
U attackPower;
public:
using valueType = U;
ImperialStarship(U projected_shield, U ... |
j-kk/Languages-and-Tools-for-Programming | Citation Graph/citation_graph_memory_testing.h | <reponame>j-kk/Languages-and-Tools-for-Programming
#define GLIBCXX_FORCE_NEW
#ifndef ZAD5_CITATION_GRAPH_MEMORY_TESTING_H
#define ZAD5_CITATION_GRAPH_MEMORY_TESTING_H
#include <cstdlib>
#include <iostream>
#include <new>
extern long long steps_left_to_throw;
extern bool test_memory;
bool prepare_for_end = false;
si... |
j-kk/Languages-and-Tools-for-Programming | Strset/tests/test3.c | <reponame>j-kk/Languages-and-Tools-for-Programming
#include "strset.h"
#include <assert.h>
//including only strset.h
int main(void) {
unsigned long first = strset_new();
unsigned long second = strset_new();
strset_insert(first, "a");
strset_insert(second, "b");
assert(strset_size(first) == 1);
... |
j-kk/Languages-and-Tools-for-Programming | Strset/strset.h | #ifndef STRSET_H
#define STRSET_H
#include <stddef.h>
#ifdef __cplusplus
namespace jnp1 {
extern "C" {
#endif
unsigned long strset_new();
void strset_delete(unsigned long id);
size_t strset_size(unsigned long id);
void strset_insert(unsigned long id, const char *value);
void strset_remove... |
j-kk/Languages-and-Tools-for-Programming | Strset/tests/test4.c | <reponame>j-kk/Languages-and-Tools-for-Programming
#include "strset.h"
#include "strsetconst.h"
#include <assert.h>
#include <stdlib.h>
//NULL values, changing values
int main(void) {
char foo[4] = "yes";
unsigned long id = strset_new();
assert(id != strset42());
strset_insert(id, foo);
assert(... |
j-kk/Languages-and-Tools-for-Programming | Strset/strsetconst.h | <filename>Strset/strsetconst.h
#ifndef STRSETCONST_H
#define STRSETCONST_H
#ifdef __cplusplus
namespace jnp1 {
extern "C" {
#endif
unsigned long strset42();
#ifdef __cplusplus
};
}
#endif
#endif //STRSETCONST_H |
j-kk/Languages-and-Tools-for-Programming | Wallet2/wallet.h | <filename>Wallet2/wallet.h
#ifndef WALLET_H
#define WALLET_H
#include <algorithm>
#include <chrono>
#include <ctime>
#include <iostream>
#include <string>
#include <sys/time.h>
#include <vector>
using namespace std::rel_ops;
using namespace std;
using unitsB = long long;
class Operation {
unitsB money;
tm d... |
j-kk/Languages-and-Tools-for-Programming | Starwars 2/imperialfleet.h | #include <utility>
#ifndef MJ394327_JK394387_IMPERIALFLEET_H
#define MJ394327_JK394387_IMPERIALFLEET_H
#include <vector>
#include <initializer_list>
#include <cassert>
#include <memory>
#include "helper.h"
class ImperialUnit : public virtual AttackShipUnit {
public:
virtual size_t count() = 0;
};
class Imperia... |
Stoefff/Data-Structures-and-Algorithms-2018 | Homework1/DanceFloor.h | <filename>Homework1/DanceFloor.h
#ifndef __DANCE__FLOOR__HEADER
#define __DANCE__FLOOR__HEADER
#include "Conga.h"
class DanceFloor {
public:
DanceFloor();
DanceFloor(const DanceFloor& rhs);
DanceFloor& operator=(const DanceFloor& rhs);
~DanceFloor();
void pushBack(const Conga& el);
void popBa... |
Stoefff/Data-Structures-and-Algorithms-2018 | Homework2/Horo.h | #pragma once
#include <string>
#include <vector>
#include <list>
using std::string;
using std::vector;
using std::list;
using std::pair;
using std::istream;
class Horo{
private:
struct DancerInfo {
string name;
DancerInfo* leftDancer;
bool isLeftConn;
DancerInfo* rightDancer;
... |
Stoefff/Data-Structures-and-Algorithms-2018 | Week03/Vector/Vector.h | #ifndef __VECTOR__HEADER__
#define __VECTOR__HEADER__
#include <iostream>
template <class T>
class Vector {
public:
Vector();
Vector(const Vector<T>& rhs);
Vector<T>& operator=(const Vector<T>& rhs);
~Vector();
void pushBack(const T& value);
void insertAt(const T& value, const size_t pos);
... |
Stoefff/Data-Structures-and-Algorithms-2018 | Homework2/System.h | <filename>Homework2/System.h
#pragma once
#include "Horo.h"
class System{
public:
System(const string& filename);
System(const System& rhs) = delete;
System& operator=(const System& rhs) = delete;
~System();
void run();
private:
void updateFirst(const string& name);
void parseFile(const ... |
Stoefff/Data-Structures-and-Algorithms-2018 | Homework1/Conga.h | <filename>Homework1/Conga.h
#ifndef __CONGA__HEADER
#define __CONGA__HEADER
#include "Student.h"
#include "iostream"
class Conga{
public:
Conga();
Conga(const Conga& rhs);
Conga& operator=(const Conga& rhs);
~Conga();
void pushFront(const char* name, const char* uni);
void pushBack(const cha... |
Stoefff/Data-Structures-and-Algorithms-2018 | Homework3/GameMap.h | #pragma once
#include <string>
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <fstream>
using std::string;
using std::vector;
using std::pair;
using std::unordered_set;
using std::unordered_map;
using std::queue;
using std::ifstream;
class GameMap{
private:
// repr... |
Stoefff/Data-Structures-and-Algorithms-2018 | Week06/ExamPractice/Window.h | <gh_stars>0
#ifndef __Window__HEADER
#define __Window__HEADER
#include <string>
#include <ctime>
using std::string;
class Window{
private:
struct tab{
string url;
time_t timestamp;
tab* nextTab;
tab(const string& newUrl, tab* newNextTab = nullptr){
url = newUrl;
... |
Stoefff/Data-Structures-and-Algorithms-2018 | Homework1/System.h | #ifndef __SYSTEM__HEADER
#define __SYSTEM__HEADER
#include "DanceFloor.h"
class System{
public:
System();
void run();
private:
void appendF(const char* name, const char* uni, size_t index);
void removeLastF(size_t index);
void removeFirstF(size_t index);
void removeF(const char* name, size_t... |
Stoefff/Data-Structures-and-Algorithms-2018 | Week07/SortStudentGradesTask/Student.h | <filename>Week07/SortStudentGradesTask/Student.h<gh_stars>0
#ifndef __STUDENT__GRADE__HEADER
#define __STUDENT__GRADE__HEADER
#include <string>
#include <iostream>
using std::string;
using std::ostream;
using std::istream;
struct Student{
string name;
string subject;
string date;
unsigned short age;
unsigned sh... |
Stoefff/Data-Structures-and-Algorithms-2018 | Homework1/Student.h | #ifndef __STUDENT__HEADER
#define __STUDENT__HEADER
#include <iostream>
//add to lower function
class Student{
public:
Student() = delete;
Student(const char* name, const char* uni);
Student(const Student& rhs);
Student& operator=(const Student& rhs);
~Student();
void print(std::ostream& os) ... |
m-colombo/cppML | src/learners/stop/stop_criteria.h | //
// stop_criteria.h
// XAA1
//
// Created by <NAME> on 14/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef XAA1_stop_criteria_h
#define XAA1_stop_criteria_h
#include "../backprop_learner.h"
#include <string>
namespace Stop {
class MaxIteration : public Criteria{
public:
... |
m-colombo/cppML | src/data/samples.h | <filename>src/data/samples.h<gh_stars>0
//
// samples.h
// XAA1
//
// Created by <NAME> on 18/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef XAA1_samples_h
#define XAA1_samples_h
#include <deque>
#include <string>
#include <memory>
#include <iterator>
#include <random>
typedef std::deque... |
m-colombo/cppML | src/data/data_normalization.h | //
// data_normalization.h
// XAA1
//
// Created by <NAME> on 16/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef __XAA1__data_normalization__
#define __XAA1__data_normalization__
#include "samples.h"
#include "../selection/model_info.h"
//TODO extend for 1-of-k
class DataNormalizer : publi... |
m-colombo/cppML | src/examples/monks/monks-interface.h | <gh_stars>0
//
// monks-interface.h
// XAA1
//
// Created by <NAME> on 11/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef __XAA1__monks_interface__
#define __XAA1__monks_interface__
#include "../../data/samples.h"
class Monks{
public:
Monks()=default;
std::shared_ptr<Samples> sampl... |
m-colombo/cppML | src/util.h | #ifndef __ML_UTIL__
#define __ML_UTIL__
#include <string>
double rand_in_range(double a, double b);
std::string createAndGetRunFolder(std::string const & parent);
std::string createSubFolder(std::string const & parent, std::string const & sub);
#endif
|
m-colombo/cppML | src/learners/loss/loss.h | <filename>src/learners/loss/loss.h
//
// loss.h
// XAA1
//
// Created by <NAME> on 17/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef __XAA1__loss__
#define __XAA1__loss__
#include "../../selection/model_info.h"
#include "../../data/sample_normalization.h"
class Loss : public ModelInfo {
p... |
m-colombo/cppML | src/selection/model_selection.h | <filename>src/selection/model_selection.h
//
// model_selection.h
// XAA1
//
// Created by <NAME> on 22/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef __XAA1__model_selection__
#define __XAA1__model_selection__
#include "../data/samples.h"
#include "../learners/backprop_learner.h"
#include... |
m-colombo/cppML | src/neurons/logistic_neuron.h | <filename>src/neurons/logistic_neuron.h
//
// logistic_neuron.h
// XAA1
//
// Created by <NAME> on 11/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef __XAA1__logistic_neuron__
#define __XAA1__logistic_neuron__
#include "neuron.h"
class LogisticNeuron : public NetNeuron{
public:
double ... |
m-colombo/cppML | src/examples/monks/task-monks.h |
#ifndef __MONKS__
#define __MONKS__
#include <string>
void Learn_Monks1(std::string const& data_dir, std::string const& out_dir);
void Learn_Monks2(std::string const& data_dir, std::string const& out_dir);
void Learn_Monks3(std::string const& data_dir, std::string const& out_dir);
#endif |
m-colombo/cppML | src/neurons/neuron.h | <filename>src/neurons/neuron.h<gh_stars>0
#ifndef NEURON_H
#define NEURON_H
#include <unordered_map>
#include <memory>
#include "../selection/model_info.h"
class Neuron {
public:
double net = 0;
double output = 0;
int layer = 0;
//Error correction term: [d\d(out) Error(out)] * [d/dx activa... |
m-colombo/cppML | src/data/sample_normalization.h | //
// sample_normalization.h
// XAA1
//
// Created by <NAME> on 29/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef __XAA1__sample_normalization__
#define __XAA1__sample_normalization__
#include "samples.h"
#include "data_normalization.h"
#include <cassert>
#include "../selection/model_info.... |
m-colombo/cppML | src/networks/feedforward_network.h | <gh_stars>0
#ifndef NETWORK_H
#define NETWORK_H
#include "../neurons/neuron.h"
#include "../data/samples.h"
#include "../util.h"
#include "../learners/loss/loss.h"
#include "../selection/model_info.h"
#include <deque>
#include <map>
#include <algorithm>
typedef std::deque<DataNeuronSP> DataLayer;
typedef std::multi... |
m-colombo/cppML | src/learners/observer/observer.h | //
// observer.h
// XAA1
//
// Created by <NAME> on 08/01/2016.
// Copyright (c) 2016 <NAME>. All rights reserved.
//
#ifndef __XAA1__observer__
#define __XAA1__observer__
#include "../backprop_learner.h"
#include <fstream>
namespace Observer{
class IterationError : public IObserver{
std::ofstr... |
m-colombo/cppML | src/selection/model_info.h | //
// IInfo.h
// XAA1
//
// Created by <NAME> on 31/12/2015.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef XAA1_model_info_h
#define XAA1_model_info_h
#include <string>
class ModelInfo{
public:
virtual std::string getInfo()=0;
};
#endif
|
m-colombo/cppML | src/learners/backprop_learner.h | #ifndef _BACKPROP_H
#define _BACKPROP_H
#include "../networks/feedforward_network.h"
#include "../learners/loss/loss.h"
#include <limits>
class BackPropagation;
namespace Stop {
class Criteria : public ModelInfo{
public:
virtual bool hasToStop(BackPropagation const& learner) = 0;
virtual st... |
NikelWolf/mirea_schedule | scheduler/include/xlsx_file.h | <gh_stars>0
#pragma once
#include "common.h"
namespace scheduler {
class XlsxFile {
public:
struct XlsxCell {
string value{};
bool __was_changed = false;
};
explicit XlsxFile(const string &filename);
XlsxFile(const XlsxFile &file);
virtual ~Xl... |
NikelWolf/mirea_schedule | scheduler/include/scheduler.h | <reponame>NikelWolf/mirea_schedule
#pragma once
#include "common.h"
namespace scheduler {
class Scheduler {
public:
Scheduler();
explicit Scheduler(const string &file_name);
bool is_group_in_schedule(const string &group_name) const;
const string &get_schedule_filename() cons... |
NikelWolf/mirea_schedule | scheduler/include/common.h | <gh_stars>0
#pragma once
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <regex>
#include <unordered_map>
#include <algorithm>
#include <cstdint>
#include <xlsxdocument.h>
using namespace std;
using namespace QXlsx;
namespace scheduler {
class Lesson;
using schedule_inde... |
NikelWolf/mirea_schedule | include/WLesson.h | #ifndef WLESSON_H
#define WLESSON_H
#include <QtWidgets>
#include "scheduler.h"
using namespace std;
using namespace scheduler;
const unsigned int h = 71;
constexpr QSize lesSize[] = {
{30, h}, //пара 0
{40, h}, //нач/кон зан 1
{30, h / 2}, //четность 2
{210, h / 2}, ... |
NikelWolf/mirea_schedule | scheduler/include/group_schedule.h | #pragma once
#include "common.h"
namespace scheduler {
class GroupSchedule {
public:
GroupSchedule();
explicit GroupSchedule(string group_name);
virtual ~GroupSchedule() = default;
static bool is_group_name_valid(const string &group_name);
const string &get_group_na... |
NikelWolf/mirea_schedule | include/Logger.h | <filename>include/Logger.h
#ifndef LOGGER_H
#define LOGGER_H
#include <QFile>
#include <QTextStream>
#include <QDateTime>
#include <QDebug>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(log)
Q_DECLARE_LOGGING_CATEGORY(gui)
Q_DECLARE_LOGGING_CATEGORY(db)
Q_DECLARE_LOGGING_CATEGORY(parse)
class Logger : p... |
NikelWolf/mirea_schedule | scheduler/include/lesson.h | #pragma once
#include "common.h"
using namespace std;
namespace scheduler {
class Lesson {
public:
Lesson();
Lesson(string subject_name, string lesson_type, string professor, string room);
Lesson(const Lesson &lesson) noexcept;
Lesson(Lesson &&lesson) noexcept;
vir... |
NikelWolf/mirea_schedule | include/WSchedule.h | <reponame>NikelWolf/mirea_schedule
#ifndef WSCHEDULE_H
#define WSCHEDULE_H
#include "WGroup.h"
class WSchedule : public QWidget {
Q_OBJECT
private:
vector<WGroup *> wgroups;
vector<GroupSchedule> &groupsVector;
private:
void createWidgets();
public:
explicit WSchedule(vector<GroupSchedule> &groupsVe... |
NikelWolf/mirea_schedule | include/WGroup.h | #ifndef WGROUP_H
#define WGROUP_H
#include <WLesson.h>
#include <QtSql>
static const QSize hedSize[] = { //todo wgroup size
{30, h},
{140, h / 2},
{30, h / 2},
{40, h / 2},
{40, h / 2},
{30, h / 2},
{210, h / 2},
{40, h / 2},
... |
NikelWolf/mirea_schedule | include/WMain.h | #ifndef WMAIN_H
#define WMAIN_H
#include <QMainWindow>
#include <QScrollArea>
#include "WSchedule.h"
class WMain : public QMainWindow {
Q_OBJECT
private:
WSchedule *wschedule;
Scheduler& scheduler;
QScrollArea *scroll;
void createWidgets();
public:
WMain(Scheduler &scheduler_, QWidget *parent = ... |
NikelWolf/mirea_schedule | scheduler/include/schedule_error.h | #pragma once
#include "common.h"
namespace scheduler {
class ScheduleError : public runtime_error {
public:
explicit ScheduleError(const string &message);
explicit ScheduleError(const char *message);
};
} |
katahiromz/WonAlphaBlend | WonAlphaBlend.h | #pragma once
#ifndef _INC_WINDOWS
#include <windows.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _WONBLENDFUNCTION {
BYTE BlendOp;
BYTE BlendFlags;
BYTE SourceConstantAlpha;
BYTE AlphaFormat;
} WONBLENDFUNCTION, *PWONBLENDFUNCTION;
#define WON_AC_SRC_OVER 0x00
#define WON_AC_S... |
katahiromz/WonAlphaBlend | WonAlphaBlend.c | <gh_stars>0
#include <windows.h>
#include "WonAlphaBlend.h"
BOOL APIENTRY
WonAlphaBlend(HDC hdc, INT x, INT y, INT cx, INT cy,
HDC hdcSrc, INT xSrc, INT ySrc, INT cxSrc, INT cySrc,
WONBLENDFUNCTION bf)
{
BITMAPINFO bi;
HBITMAP hbm, hbmSrc;
LPBYTE pbBits, pbBitsSrc;
LPBYTE pb... |
SuperrHaze/simple-ray-tracing | resource.h | //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ 生成的包含文件。
// 供 RayTracing.rc 使用
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_RAY_TRACING_DIALOG 102
#define IDR_MAINFRAME 128
#define IDR_MENU... |
SuperrHaze/simple-ray-tracing | aboutdlg.h | #pragma once
// aboutdlg 对话框
class aboutdlg : public CDialogEx
{
DECLARE_DYNAMIC(aboutdlg)
public:
aboutdlg(CWnd* pParent = nullptr); // 标准构造函数
virtual ~aboutdlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_ABOUTBOX };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ... |
SuperrHaze/simple-ray-tracing | ComfirmObjOpen.h | #pragma once
// ComfirmObjOpen 对话框
class ComfirmObjOpen : public CDialogEx
{
DECLARE_DYNAMIC(ComfirmObjOpen)
public:
ComfirmObjOpen(CWnd* pParent = nullptr); // 标准构造函数
virtual ~ComfirmObjOpen();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_COMFIRM_OBJECT_OPEN };
#endif
protected:
virtual void DoDataEx... |
SuperrHaze/simple-ray-tracing | SAPicture.h | <gh_stars>1-10
#pragma once
// SAPicture 对话框
class SAPicture : public CDialogEx
{
DECLARE_DYNAMIC(SAPicture)
public:
SAPicture(CWnd* pParent = nullptr); // 标准构造函数
virtual ~SAPicture();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_SA_PICTURE };
#endif
protected:
virtual void DoDataExchange(CDataExchang... |
SuperrHaze/simple-ray-tracing | ComfirmCamOpen.h | #pragma once
// ComfirmCamOpen 对话框
class ComfirmCamOpen : public CDialogEx
{
DECLARE_DYNAMIC(ComfirmCamOpen)
public:
ComfirmCamOpen(CWnd* pParent = nullptr); // 标准构造函数
virtual ~ComfirmCamOpen();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_COMFIRM_CAM_OPEN };
#endif
protected:
virtual void DoDataExcha... |
SuperrHaze/simple-ray-tracing | ButtonTransparent.h | #pragma once
#include <afxwin.h>
class ButtonTransparent :
public CButton
{
public:
ButtonTransparent();
~ButtonTransparent();
virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
// virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void PreSubclassWindow();
CBrush m_normalBrush;
CPen m_Pen;
CBrush ... |
Loxe/CommonLib | RSTimingFunction.h | <filename>RSTimingFunction.h
//
// RSTimingFunction.h
//
// Created by <NAME> on 2013-09-28.
// This is free and unencumbered software released into the public domain.
//
#import <Foundation/Foundation.h>
// Common predefined timing functions
extern NSString * const kRSTimingFunctionLinear; // controlPoin... |
j420247/ARO | 5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/lockdown.h | /**
* @file libimobiledevice/lockdown.h
* @brief Manage device preferences, start services, pairing and activation.
* \internal
*
* Copyright (c) 2008 <NAME>. All Rights Reserved.
* Copyright (c) 2009 <NAME>. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it und... |
j420247/ARO | 4.1.1/c/AROCrypto_Win/crypto_openssl.h | <gh_stars>100-1000
#pragma once
#include "crypto_common.h"
BEGIN_NAMESPACE(CRYPTO)
enum crypto_cipher_alg {
CRYPTO_CIPHER_NULL = 0, CRYPTO_CIPHER_ALG_AES, CRYPTO_CIPHER_ALG_3DES,
CRYPTO_CIPHER_ALG_DES, CRYPTO_CIPHER_ALG_RC2, CRYPTO_CIPHER_ALG_RC4
};
/* CipherSuite */
#define TLS_NULL_WITH_NULL_NULL 0x0... |
j420247/ARO | 5.0.0/ARO.Core/src/c/libimobiledevice-jni/ScreencaptureBridge.h | /* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_att_aro_libimobiledevice_ScreencaptureImpl */
#ifndef _Included_com_att_aro_libimobiledevice_ScreencaptureImpl
#define _Included_com_att_aro_libimobiledevice_ScreencaptureImpl
#ifdef __cplusplus
extern "C" {
#endif
/*
* Cla... |
j420247/ARO | 5.0.0/ARO.Core/src/c/libimobiledevice-jni/libimobiledevice/afc.h | <reponame>j420247/ARO
/**
* @file libimobiledevice/afc.h
* @brief Access the filesystem.
* \internal
*
* Copyright (c) 2009 <NAME> All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Fr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.