repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
jeanleflambeur/silkopter | silkopter/gs/src/value_editors/Optional_Value_Editor.h | <filename>silkopter/gs/src/value_editors/Optional_Value_Editor.h
#pragma once
#include "IValue_Editor.h"
#include "Qualified_Value.h"
class QWidget;
class QCheckBox;
class Value_Editor_Factory;
class Optional_Value_Editor : public IValue_Editor
{
public:
Optional_Value_Editor(const Qualified_Value<... |
jeanleflambeur/silkopter | silkopter/libs/common/stream/ICamera_Commands.h | #pragma once
#include "Stream_Base.h"
namespace silk
{
namespace stream
{
class ICamera_Commands : public IScalar_Stream<Semantic::CAMERA_COMMANDS>
{
public:
typedef std::false_type can_be_filtered_t;
enum class Quality : uint8_t
{
LOW,
HIGH
};
struct Value
{
Qualit... |
jeanleflambeur/silkopter | silkopter/libs/utils/Fec_Encoder.h | #pragma once
#include <vector>
#include <string>
#include <atomic>
#include <thread>
#include "Queue.h"
struct fec_t;
class Fec_Encoder
{
public:
Fec_Encoder();
~Fec_Encoder();
typedef std::chrono::high_resolution_clock Clock;
static const uint8_t MAX_CODING_K = 16;
static const uint8_t MAX_CO... |
jeanleflambeur/silkopter | def_lang/include/def_lang/JSON_Serializer.h | <reponame>jeanleflambeur/silkopter<gh_stars>10-100
#pragma once
#include "Serialization.h"
#include "Result.h"
namespace ts
{
namespace sz
{
std::string to_json(Value const& value, bool nice);
std::string& to_json(std::string& dst, Value const& value, bool nice);
Result<Value> from_json(std::string const& value);
R... |
jeanleflambeur/silkopter | silkopter/rc/def/settings.def.h | #pragma once
#include <stdint.h>
#include <string>
#include <vector>
#include <memory>
#include <cfloat>
#include <boost/variant.hpp>
#include <def_lang/Result.h>
#include <def_lang/Serialization.h>
#include "gen_support.h"
namespace silk
{
namespace settings
{
template<class T>
struct Poly
{
Poly() = default;
e... |
jeanleflambeur/silkopter | silkopter/libs/utils/comms/RCP.h | <reponame>jeanleflambeur/silkopter<filename>silkopter/libs/utils/comms/RCP.h
#pragma once
#include <deque>
#include <map>
#include <vector>
#include <boost/intrusive_ptr.hpp>
#include "ISocket.h"
#include "utils/Clock.h"
namespace util
{
namespace comms
{
namespace detail
{
struct Pool_Item_Base
{
st... |
jeanleflambeur/silkopter | q/include/video/Capabilities.h | #pragma once
namespace q
{
namespace video
{
class Capabilities
{
public:
//caps start here
math::vec2u32 max_texture_size;
math::vec2u32 max_render_target_size;
size_t max_anisotropy = 0;
size_t max_aa_samples = 0;
//texture formats
bool float_texture_support ... |
jeanleflambeur/silkopter | q/include/scene/Model_Base.h | #pragma once
#include "Ptr_Fw_Declaration.h"
#include "scene/Skeleton.h"
#include "video/Vertex_Declaration.h"
#include "video/Material.h"
namespace q
{
namespace scene
{
class Model_Base : public res::Resource, public std::enable_shared_from_this<Model_Base>
{
public:
Model_Base(Path const& path);
... |
jeanleflambeur/silkopter | silkopter/gs/src/Properties_Model.h | #pragma once
#include <memory>
#include <QAbstractItemModel>
#include "def_lang/IStruct_Value.h"
#include "def_lang/IOptional_Value.h"
#include "def_lang/IVariant_Value.h"
#include "def_lang/IVector_Value.h"
#include "def_lang/IPoly_Value.h"
class Properties_Model : public QAbstractItemModel
{
public:
... |
jeanleflambeur/silkopter | q/src/res/Impl/Free_Type_Font_Loader.h | <filename>q/src/res/Impl/Free_Type_Font_Loader.h
#pragma once
#include "res/Loader.h"
namespace q
{
namespace res
{
namespace impl
{
class Free_Type_Font_Loader : public res::Loader<text::Font>
{
public:
virtual void load(Path const& path, data::Source& source, text::Font& r) const;
virtual boo... |
jeanleflambeur/silkopter | silkopter/gs/src/Comms.h | #pragma once
#include "common/Comm_Data.h"
#include "common/stream/IAcceleration.h"
#include "common/stream/IADC.h"
#include "common/stream/IFloat.h"
#include "common/stream/IBool.h"
#include "common/stream/IAngular_Velocity.h"
#include "common/stream/IBattery_State.h"
#include "common/stream/ICurrent.h"
#include "co... |
jeanleflambeur/silkopter | qmath/include/qmath/trans2d.h | #pragma once
namespace math
{
///////////////////////////////////////////////////////////////////////////////
// forward declarations
///////////////////////////////////////////////////////////////////////////////
template<typename T> struct vec2;
template<typename T> struct mat2;
template<typename T> struc... |
jeanleflambeur/silkopter | def_lang/include/def_lang/Value_Selector.h | #pragma once
#include <string>
#include <vector>
namespace ts
{
class Value_Selector final
{
public:
Value_Selector() = default;
Value_Selector(std::string const& str);
Value_Selector(char const* str);
//---------------------------------------------------------
struct Element
{
enu... |
jeanleflambeur/silkopter | silkopter/libs/common/stream/IGPS_Info.h | #pragma once
#include "Stream_Base.h"
#include "ICurrent.h"
#include "IVoltage.h"
#include <limits>
namespace silk
{
namespace stream
{
class IGPS_Info : public IScalar_Stream<Semantic::GPS_INFO>
{
public:
typedef std::false_type can_be_filtered_t;
struct Value
{
enum class Fix : uint8_t
... |
jeanleflambeur/silkopter | def_lang/include/def_lang/impl/Enum_Item.h | <filename>def_lang/include/def_lang/impl/Enum_Item.h<gh_stars>10-100
#pragma once
#include "def_lang/IEnum_Item.h"
#include "def_lang/ep/Symbol_EP.h"
#include "def_lang/ep/Attribute_Container_EP.h"
namespace ts
{
class Enum_Item final: virtual public IEnum_Item, public Symbol_EP, public Attribute_Container_EP
{
publ... |
jeanleflambeur/silkopter | silkopter/libs/utils/hw/SPI_PIGPIO.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "ISPI.h"
#include <atomic>
#include <vector>
namespace util
{
namespace hw
{
class SPI_PIGPIO : public ISPI
{
public:
SPI_PIGPIO();
~SPI_PIGPIO();
ts::Result<void> init(uint32_t port, uint32_t channel, uint32_t speed, uint32_t mode);
bool tra... |
jeanleflambeur/silkopter | qmath/include/qmath/func_test.h | <gh_stars>10-100
#pragma once
//#include <limits>
namespace math
{
//everything was moved to func_common
}
|
jeanleflambeur/silkopter | q/include/video/Uber_Shader.h | #pragma once
#include "video/Shader.h"
#include "video/Shader_Source.h"
#include "Ptr_Fw_Declaration.h"
namespace q
{
namespace video
{
class Uber_Shader
{
public:
Uber_Shader();
Uber_Shader(Uber_Shader&& other);
Uber_Shader(Uber_Shader const&) = default;
Uber_Shader& operator=(Ube... |
jeanleflambeur/silkopter | silkopter/libs/common/stream/IAngular_Velocity.h | #pragma once
#include "Stream_Base.h"
namespace silk
{
namespace stream
{
template<Space SPACE_VALUE>
class IAngular_VelocityT : public ISpatial_Stream<Semantic::ANGULAR_VELOCITY, SPACE_VALUE>
{
public:
typedef std::true_type can_be_filtered_t;
typedef math::vec3f Value; //radians per second
typed... |
jeanleflambeur/silkopter | q/include/video/GLES/GLES_Index_Buffer.h | <gh_stars>10-100
#pragma once
#include "GLES_Buffer_Impl.h"
#include "video/Index_Buffer.h"
namespace q
{
namespace video
{
class GLES_Index_Buffer : public Index_Buffer
{
public:
GLES_Index_Buffer();
~GLES_Index_Buffer();
virtual bool allocate(size_t size, Usage usage);
virtual size_... |
jeanleflambeur/silkopter | def_lang/src/ts/ast/Lexer.h | #pragma once
#undef yyFlexLexer
#define yyFlexLexer xxFlexLexer
#include "FlexLexer.h"
namespace ts
{
namespace ast
{
class Builder;
}
}
#include "yy_parser.hpp"
namespace ts
{
namespace ast
{
class Lexer : public xxFlexLexer
{
public:
Lexer(Builder& builder);
int yylex()
{
//not used
... |
jeanleflambeur/silkopter | def_lang/include/def_lang/ITemplate_Argument.h | #pragma once
#include <string>
namespace ts
{
class ITemplate_Argument
{
public:
virtual ~ITemplate_Argument() = default;
virtual std::string get_template_instantiation_string() const = 0;
};
}
|
jeanleflambeur/silkopter | def_lang/include/def_lang/IEnum_Type.h | #pragma once
#include "IDeclaration_Scope.h"
#include "IType.h"
namespace ts
{
class IEnum_Value;
class IEnum_Item;
class IEnum_Type: virtual public IType, virtual public IDeclaration_Scope
{
public:
virtual ~IEnum_Type() = default;
typedef IEnum_Value value_type;
virtual size_t get_item_count() const... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IAttribute.h | #pragma once
#include <string>
#include "Result.h"
namespace ts
{
class IInitializer;
class IAttribute
{
public:
virtual ~IAttribute() = default;
virtual std::string get_name() const = 0;
};
}
|
jeanleflambeur/silkopter | def_lang/include/def_lang/IEnum_Item.h | <filename>def_lang/include/def_lang/IEnum_Item.h
#pragma once
#include "IInitializer.h"
#include "ISymbol.h"
#include "IAttribute_Container.h"
namespace ts
{
class IEnum_Item: virtual public ISymbol, virtual public IAttribute_Container
{
public:
virtual ~IEnum_Item() = default;
virtual int64_t get_integral_... |
jeanleflambeur/silkopter | qdata/include/data/Memory_Sink.h | #pragma once
namespace q
{
namespace data
{
class Memory_Source;
class Memory_Sink : public Sink
{
friend class Memory_Source;
public:
Memory_Sink(size_t reserve_size = 0u);
virtual ~Memory_Sink();
size_t get_size() const;
size_t get_capacity() const;
void set_size(size_t size);
... |
jeanleflambeur/silkopter | qbase/include/util/Hash.h | #pragma once
namespace q
{
namespace util
{
template <class T>
inline void hash_combine(std::size_t& seed, const T& v)
{
std::hash<T> hasher;
seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
}
} //util
} //q
|
jeanleflambeur/silkopter | silkopter/libs/utils/comms/RFMON_Socket.h | #pragma once
#include "ISocket.h"
#include <vector>
#include <string>
#include <thread>
namespace util
{
namespace comms
{
class RFMON_Socket : public ISocket
{
public:
RFMON_Socket(std::string const& interface, uint8_t id);
~RFMON_Socket();
auto process() -> Result;
auto start() -> bool;
void... |
jeanleflambeur/silkopter | silkopter/libs/utils/comms/esp32/spi_comms.h | <filename>silkopter/libs/utils/comms/esp32/spi_comms.h
#pragma once
static constexpr size_t MAX_SPI_BUFFER_SIZE = 1600; //has to be multiple of 16
enum class SPI_Req : uint8_t
{
PACKET = 1,
SET_RATE = 2,
GET_RATE = 3,
SETUP_FEC_CODEC = 4,
SET_CHANNEL = 5,
GET_CHANNEL = 6,
SET_POWER = 7,
... |
jeanleflambeur/silkopter | def_lang/include/def_lang/IConstant.h | #pragma once
#include "ISymbol.h"
namespace ts
{
class IType;
class IValue;
class IConstant : virtual public ISymbol
{
public:
virtual ~IConstant() = default;
virtual IValue const& get_value() const = 0;
};
}
|
jeanleflambeur/silkopter | silkopter/gs/src/Properties_Browser.h | #pragma once
#include <QTreeView>
#include <QSortFilterProxyModel>
class QSettings;
class Properties_Model;
class Properties_Delegate;
class Value_Editor_Factory;
class Properties_Browser : public QTreeView
{
Q_OBJECT
protected:
class SignalKey;
public:
Properties_Browser(QWidget* parent = nu... |
jeanleflambeur/silkopter | silkopter/libs/common/comms/def/messages.def.h | <filename>silkopter/libs/common/comms/def/messages.def.h
#pragma once
#include <stdint.h>
#include <string>
#include <vector>
#include <memory>
#include <cfloat>
#include <boost/variant.hpp>
#include <def_lang/Result.h>
#include <def_lang/Serialization.h>
#include "gen_support.h"
namespace silk
{
namespace messages
{... |
jeanleflambeur/silkopter | qdata/include/data/File_Sink.h | #pragma once
namespace q
{
namespace data
{
class File_Sink;
DECLARE_CLASS_PTR(File_Sink);
class File_Sink : public Sink
{
public:
File_Sink(Path const& path);
virtual ~File_Sink();
bool is_open() const;
size_t get_size() const;
size_t write(uint8_t const* buffer, size_t size);
size_... |
jeanleflambeur/silkopter | q/include/scene/Camera.h | <gh_stars>10-100
#pragma once
#include "video/Viewport.h"
#include "scene/Frustum.h"
namespace q
{
namespace scene
{
class Camera
{
public:
Camera();
void set_viewport_and_aspect_ratio(video::Viewport const& viewport);
void set_viewport(video::Viewport const& viewport);
video::View... |
jeanleflambeur/silkopter | silkopter/rc/src/PI_HAL.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include "IHAL.h"
namespace silk
{
class PI_HAL : virtual public IHAL
{
public:
PI_HAL();
~PI_HAL();
ts::Result<void> init() override;
void shutdown() override;
Comms& get_comms() override;
math::vec2u32 get_display_size() const override;
... |
jeanleflambeur/silkopter | def_lang/include/def_lang/Serialization.h | <filename>def_lang/include/def_lang/Serialization.h
#pragma once
#include <stdint.h>
#include <string>
#include <map>
#include <vector>
#include "ts_assert.h"
namespace ts
{
namespace sz
{
struct Value final
{
//----------------------
enum class Type : uint8_t
{
BOOL,
EMPTY,
INT8,... |
jeanleflambeur/silkopter | silkopter/libs/common/node/ILPF.h | #pragma once
#include "common/node/INode.h"
namespace silk
{
namespace node
{
class ILPF : public Node_Base<Type::LPF>
{
public:
};
}
}
|
jeanleflambeur/silkopter | silkopter/libs/common/stream/Stream_Base.h | #pragma once
#include "IStream.h"
namespace silk
{
namespace stream
{
//for streams of data with a fixed sample rate
template <Semantic SEMANTIC_VALUE>
class IScalar_Stream : public IStream
{
public:
static constexpr Space SPACE = Space::SCALAR;
static constexpr Semantic SEMANTIC = SEMANTIC_VALUE;
static... |
jeanleflambeur/silkopter | def_lang/include/def_lang/impl/Name_Attribute.h | #pragma once
#include "def_lang/IName_Attribute.h"
#include <string>
#include <memory>
namespace ts
{
class IValue;
class Name_Attribute : public virtual IName_Attribute
{
public:
Name_Attribute(std::string const& name);
~Name_Attribute();
std::string get_name() const override;
private:
std::strin... |
jeanleflambeur/silkopter | silkopter/libs/utils/hw/RF4463F30.h | <reponame>jeanleflambeur/silkopter
#pragma once
#include <chrono>
#include <string>
#include <vector>
#include <mutex>
#include "Si4463.h"
#include "utils/Clock.h"
namespace util
{
namespace hw
{
class RF4463F30
{
public:
RF4463F30();
~RF4463F30();
bool init(hw::ISPI& spi, uint8_t sdn_gpio);
bool s... |
jeanleflambeur/silkopter | silkopter/fc/src/source/SRF01.h | #pragma once
#include "HAL.h"
#include "common/node/ISource.h"
#include "common/stream/IDistance.h"
#include "common/bus/IUART.h"
#include "Basic_Output_Stream.h"
namespace silk
{
namespace hal
{
struct SRF01_Descriptor;
struct SRF01_Config;
}
}
namespace silk
{
namespace node
{
class SRF01 : public ISource
{
pu... |
fruitnuke/exercises | ex1-19.c | <filename>ex1-19.c
/* Write a function reverse(s) that reverses the character string
* s. Use it to write a program that reverses its input a line at a
* time. */
#include <stdio.h>
#define MAXLEN 1000
int getstr(char s[], int maxlen);
void reverse(char s[]);
main()
{
char line[MAXLEN];
while (getstr(lin... |
fruitnuke/exercises | ex1-10.c | <gh_stars>0
/* Write a program that copies its input to its output, replacing tabs
* with '\t', backspaces by '\b' and backslashes by '\\' */
#include <stdio.h>
main() {
int c;
while ((c = getchar()) != EOF)
{
if (c == '\b')
printf("\\b");
else if (c == '\t')
prin... |
fruitnuke/exercises | ex1-21.c | /* Write a program `entab` that replaces strings of blanks by the
* minimum number of tabs and blanks to achieve the same spacing. Use
* the same tab stops as for `detab`. When either a tab or a single
* blank would suffice to reach a tab stop, which should be given
* preference? */
/* Answer: Give the space pre... |
fruitnuke/exercises | ex1-23.c | /* Write a program to remove all comments from a C program. Don't
* forget to handle quoted strings and character constants properly.
* C comments do not nest. */
/* Notes: "quoted strings" refers to string literals such as:
*
* "this string \"/*not a comment *\/\" is not a comment"
*
* and character consta... |
fruitnuke/exercises | ex1-4.c | <filename>ex1-4.c
#include <stdio.h>
int main()
{
int lower = 0;
int upper = 300;
int step = 20;
float cels = lower;
float fahr = 0;
puts(" C F");
puts("--- ---");
while (cels <= upper) {
fahr = ((cels * 9.0) / 5.0) + 32.0;
printf("%3.0f %3.0f\n", cels, fahr);
... |
fruitnuke/exercises | ex4-4.c | <filename>ex4-4.c<gh_stars>0
/* Exercise 4-4. Add commands to print the top element of the stack
* without popping, to duplicate it, and to swap the top two elements.
* Add a command to clear the stack.
*
* Notes: It may seem more natural to add keywords for the commands,
* like "top", "dup" and "swap", that invol... |
fruitnuke/exercises | ex2-1.c | /* Exercise 2-1. Write a program to determine the ranges of char,
* short, int, and long variables, both signed and unsigned, by
* printing appropriate values from standard headers and by direct
* computation. Harder if you compute them: determine the ranges of
* the various floating-point types. */
#include <st... |
fruitnuke/exercises | ex1-9.c | /* Write a program to copy its input to its output, replacing one or
* more blanks with a single blank */
#include <stdio.h>
main()
{
int c;
int prev;
while ((c = getchar()) != EOF)
{
if (c != ' ') {
prev = c;
putchar(c);
}
if (c == ' ')
{
... |
fruitnuke/exercises | ex1-7.c | <reponame>fruitnuke/exercises
#include <stdio.h>
main()
{
printf("EOF is: %d\n", EOF);
}
|
fruitnuke/exercises | ex1-6.c | <reponame>fruitnuke/exercises<filename>ex1-6.c
#include <stdio.h>
main()
{
while (getchar() != EOF);
}
|
fruitnuke/exercises | ex1-18.c | /* Write a program to remove trailing blanks and tabs from each line
* of input, and to delete entirely blank lines */
#include <stdio.h>
#define MAXLN 1000
#define OUT 0
#define IN 1
int getln(char s[], int max);
int length(char s[]);
void strip(char s[]);
main()
{
char line[MAXLN];
while (getln(line,... |
fruitnuke/exercises | ex1-13.c | /* Write a program to print a histogram of the lengths of words in its
* input. */
#include <stdio.h>
#define OUT 0
#define IN 1
#define MAX_WORD_LEN 20
#define SZ MAX_WORD_LEN - 1 /* don't count words of length 0 */
main()
{
int c, i, j, nc;
int lengths[SZ];
nc = 0;
for (i = 0; i < SZ; ++i)
... |
fruitnuke/exercises | ex1-8.c | /* Write a program to count blanks, tabs, and new lines */
#include <stdio.h>
main()
{
int c;
long nb = 0;
long nt = 0;
long nl = 0;
while ((c = getchar()) != EOF)
{
if (c == ' ')
++nb;
if (c == '\t')
++nt;
if (c == '\n')
++nl;
... |
fruitnuke/exercises | ex1-15.c | /* Rewrite the temperature conversion program of Section 1.2 to use a
* function for conversion. */
#include <stdio.h>
int convert(int fahrenheit);
main()
{
int f, c;
int lower, upper, step;
lower = 0;
upper = 300;
step = 20;
f = lower;
while (f <= upper) {
printf("%d\t%d\n", f... |
fruitnuke/exercises | ex1-20.c | <filename>ex1-20.c
/* Write a program `detab` that replaces tabs in the input with the
* proper number of blanks to space to the next tab stop. Assume a
* fixed set of tab stops, say every n column. */
#include <stdio.h>
#define TABSTOP 4
#define MAXLINE 1000
int getln(char s[], int maxlen);
void detab(char in[... |
fruitnuke/exercises | ex1-14.c | <reponame>fruitnuke/exercises
#include <stdio.h>
#define CHAR_MIN ' '
#define CHAR_MAX '~'
#define ARRAY_SZ CHAR_MAX - CHAR_MIN + 1
#define WIDTH 77
main()
{
int c;
int counts[ARRAY_SZ];
int freq, maxn;
int i, j;
float scale;
for (i = 0; i < ARRAY_SZ; ++i)
counts[i] = 0;
while ((... |
Andy1211556847/pullrefresh | Pullrefresh/Classes/Utils/MSViewHelper.h | //
// MSViewHelper.h
// Pullrefresh
//
// Created by andy on 2019/6/4.
// Copyright © 2019 andy. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface MSViewHelper : NSObject
+(NSString*) cocatString:(NSString*)str1 andStr:(NSString*)str2;
/**
say hello
*/
-(void) hello... |
Andy1211556847/pullrefresh | Pullrefresh/Pullrefresh.h | <reponame>Andy1211556847/pullrefresh
//
// Pullrefresh.h
// Pullrefresh
//
// Created by andy on 2019/6/4.
// Copyright © 2019 andy. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "MSViewHelper.h"
//! Project version number for Pullrefresh.
FOUNDATION_EXPORT double PullrefreshVersionNumber;
//! Project ... |
DarkTitan007/Knight-s-Tour-Problem---C | main.c | #include <stdio.h>
#define N 8
int is_valid(int i, int j, int sol[N+1][N+1]) {
if (i>=1 && i<=N && j>=1 && j<=N && sol[i][j]==-1)
return 1;
return 0;
}
int knight_tour(int sol[N+1][N+1], int i, int j, int step_count, int x_move[], int y_move[]) {
if (step_count == N*N)
return 1;
int k;
... |
omega-graphics/common | include/omega-common/utils.h | #ifndef __cplusplus
#error OmegaCommon must be compiled as a C++ api
#endif
#include <string>
#include <fstream>
#include <assert.h>
#include <sstream>
#include <type_traits>
#include <vector>
#include <map>
#include <unordered_map>
#include <cstring>
#include <typeinfo>
#include <memory>
#include <optional>
#include ... |
omega-graphics/common | src/crt.c | #include "omega-common/crt.h"
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
struct __OmegaObject {
OmegaObjectType type;
void *data;
size_t size;
};
OmegaRTObject * omega_common_alloc(void *data,size_t size,OmegaObjectType t){
OmegaRTObject *rc = malloc(sizeof(OmegaRTObject));
Ome... |
omega-graphics/common | wrapgen/parser.h | <gh_stars>0
#include <memory>
#include "ast.h"
#include "wrapper_gen.h"
#include "lexer.h"
#include "diagnostics.h"
#ifndef OMEGA_WRAPGEN_PARSER_H
#define OMEGA_WRAPGEN_PARSER_H
namespace OmegaWrapGen {
class Parser final {
std::unique_ptr<DiagnosticBuffer> errStream;
std::unique_ptr<Lexer> lex... |
omega-graphics/common | include/omega-common/crt.h | #include <stddef.h>
#include <stdint.h>
#ifndef OMEGA_COMMON_CRT_H
#define OMEGA_COMMON_CRT_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct __OmegaObject OmegaRTObject;
typedef int64_t OmegaObjectType;
typedef const char * OmegaCString;
typedef enum {
FALSE = 0x00,
TRUE = 0x01,
} OmegaCommonBool;
... |
omega-graphics/common | include/omega-common/net.h | <reponame>omega-graphics/common
#include "common.h"
#include <future>
#ifndef OMEGA_COMMON_NET_H
#define OMEGA_COMMON_NET_H
namespace OmegaCommon {
struct HttpRequestDescriptor {
StrRef url;
StrRef header;
};
struct HttpResponse {
size_t size;
void *data;
};
c... |
omega-graphics/common | include/omega-common/common.h | #include "utils.h"
#include "fs.h"
#include "json.h"
#include "format.h"
#include "multithread.h"
// #ifndef OMEGA_COMMON_COMMON_H
// #define OMEGA_COMMON_COMMON_H
// namespace OmegaCommon {
// };
// #endif
|
omega-graphics/common | wrapgen/ast.h | #include "nodes.def"
#include <vector>
#include <string>
#include "omega-common/common.h"
#ifndef OMEGA_WRAPGEN_AST_H
#define OMEGA_WRAPGEN_AST_H
namespace OmegaWrapGen {
struct TreeScope {
typedef enum : int {
Class,
Func,
Interface,
Namespace
} T... |
omega-graphics/common | include/omega-common/multithread.h | <filename>include/omega-common/multithread.h
#ifndef OMEGA_COMMON_MULTITHREAD_H
#define OMEGA_COMMON_MULTITHREAD_H
#include "utils.h"
#ifdef _WIN32
#include <Windows.h>
#elif defined(__APPLE__)
#include <dispatch/dispatch.h>
#else
#include <semaphore.h>
#endif
#include <mutex>
#include <thread>
#include <future>
... |
omega-graphics/common | wrapgen/wrapper_gen.h | <reponame>omega-graphics/common
#include "ast.h"
#include <memory>
#include <deque>
#ifndef OMEGA_WRAPGEN_WRAPPER_GEN_H
#define OMEGA_WRAPGEN_WRAPPER_GEN_H
#define COMMENT_HEADER "WARNING.. This file was generated by omega-wrapgen. DO NOT EDIT!"
#define HEADER_INSERT_TEMPLATE "#include \"@{0}\""
namespace OmegaWrapG... |
omega-graphics/common | wrapgen/tests/myHeader.h | <reponame>omega-graphics/common<filename>wrapgen/tests/myHeader.h
#include <iostream>
class TestClass {
public:
void testFunc(){
std::cout << "Hello World" << std::endl;
};
void otherFunc(int param){
std::cout << "Hello World With Param:" << param << std::endl;
};
} |
omega-graphics/common | embedbin/tests/msg.c | <reponame>omega-graphics/common<filename>embedbin/tests/msg.c
// WARNING!! This file was generated by omega-ebin.
//
const char mysource[] ={0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64,};
|
omega-graphics/common | wrapgen/diagnostics.h | <filename>wrapgen/diagnostics.h
#include "omega-common/common.h"
#include <deque>
#ifndef OMEGA_WRAPGEN_DIAGNOSTICS_H
#define OMEGA_WRAPGEN_DIAGNOSTICS_H
namespace OmegaWrapGen {
struct Diagnostic {
virtual void format(std::ostream & out) = 0;
virtual bool isError() = 0;
};
class DiagnosticBuffer {
std:... |
omega-graphics/common | wrapgen/lexer.h | #include <string>
#include <vector>
#include <istream>
#include "toks.def"
#include "diagnostics.h"
#ifndef OMEGA_WRAPGEN_LEXER_H
#define OMEGA_WRAPGEN_LEXER_H
namespace OmegaWrapGen {
struct Tok {
TokTy type;
std::string content;
};
class Lexer final {
std::istream * is;
... |
omega-graphics/common | include/omega-common/fs.h | <filename>include/omega-common/fs.h<gh_stars>0
#include "utils.h"
#ifndef OMEGA_COMMON_FS_H
#define OMEGA_COMMON_FS_H
#if defined(_WIN32)
#define PATH_SLASH '\\'
#else
#define PATH_SLASH '/'
#endif
namespace OmegaCommon::FS {
/**
@brief A platform specific filesystem path class.
@paragraph ... |
omega-graphics/common | include/omega-common/format.h | <filename>include/omega-common/format.h
#include "utils.h"
#include <ctime>
#include <tuple>
#include <array>
#include <memory>
#ifndef OMEGA_COMMON_FORMAT_H
#define OMEGA_COMMON_FORMAT_H
namespace OmegaCommon {
template<typename T>
struct FormatProvider;
template<typename T>
using _has_format_provi... |
omega-graphics/common | include/omega-common/json.h | <filename>include/omega-common/json.h
#include "utils.h"
#include <initializer_list>
#include <istream>
#include <sstream>
#ifndef OMEGA_COMMON_JSON_H
#define OMEGA_COMMON_JSON_H
namespace OmegaCommon {
class JSONParser;
class JSONSerializer;
/**
@brief A simple class for parsing and serializing JS... |
hermantb/fast_json | fast_json.h | /* Copyright 2019 <NAME>
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
* option. This file may not be copied, modified, or distributed
* except according to those... |
hermantb/fast_json | fast_json.c | /* Copyright 2019 <NAME>
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
* option. This file may not be copied, modified, or distributed
* except according to those... |
hermantb/fast_json | fast_json_benchmark.c | <filename>fast_json_benchmark.c
/* Copyright 2019 <NAME>
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
* option. This file may not be copied, modified, or distribu... |
hermantb/fast_json | fast_json_test.c | <reponame>hermantb/fast_json
/* Copyright 2019 <NAME>
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
* option. This file may not be copied, modified, or distributed... |
hermantb/fast_json | fast_json_random.c | #include <stdio.h>
#include <math.h>
#include "fast_json.h"
#define RAND_IA __UINT64_C(0x5851F42D4C957F2D)
#define RAND_IC __UINT64_C(0x14057B7EF767814F)
#define SIZE (29)
#define NEST (10)
static FAST_JSON_DATA_TYPE add_null (FAST_JSON_TYPE json);
static FAST_JSON_DATA_TYPE add_boolean (FAST_JSON_... |
lucky-patty/Maze-Solver | DijkstraSolver.h | #ifndef DjikstaSolver_H
#define DjikstraSolver_H
#include "solver.h"
#include "Maze.h"
class DjikstraSolver : public Solver{
protected:
public:
int solve (Maze * );
void euclideanApply (Maze *);
void manhattanApply (Maze *);
} |
lucky-patty/Maze-Solver | solver.h | #ifndef Solver_H
#define Solver_H
#include "Maze.h"
#include "Edge.h"
#include<vector>
#include<iostream>
#include<fstream>
#include<stdio.h>
#include<stdlib.h>
using namespace std;
class Solver{
protected:
int xStart = 0;
int yStart = 0;
int xFinish;
int yFinish;
std::vector<Edge> path;
... |
lucky-patty/Maze-Solver | DFSSolver.h | <reponame>lucky-patty/Maze-Solver<filename>DFSSolver.h
#ifndef DFSSolver_H
#define DFSSolver_H
#include "solver.h"
#include "Maze.h"
class DFSSolver: public Solver{
protected:
public:
int solve(Maze *);
DFSSolver(Maze * maze) : Solver::Solver (maze){};
bool allAdjVisit(vector<vector<bool>> , int... |
lucky-patty/Maze-Solver | Edge.h | <filename>Edge.h<gh_stars>0
#ifndef EDGE_H
#define EDGE_H
//struct of Edge, contains coordinates of 2 Cell
typedef struct Edge {
int xCellA;
int yCellA;
int xCellB;
int yCellB;
}Edge;
#endif |
lucky-patty/Maze-Solver | menu.h | #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<fstream>
#include<random>
#include "Maze.h"
#include "Generator.h"
#include "solver.h"
#include "DFSSolver.h"
#include<string>
#include<regex>
#define MAX_ARG 9 |
lucky-patty/Maze-Solver | Maze.h |
#ifndef MAZE_H
#define MAZE_H
#include "Cell.h" // File
// Include Necessary Library
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<fstream>
#include<vector>
#define MAZE_SIZE 1000
//Class structure for Maze
class Maze {
protected:
int width;
int height;
int noEdges =... |
lucky-patty/Maze-Solver | Generator.h | #ifndef Generator_H
#define Generator_H
#include<stdlib.h>
#include<random>
#include<vector>
#include<algorithm>
#include "Maze.h"
#include "Edge.h"
class Generator
{
private:
long seed;
public:
Generator(long);
void setNSEW(int,int,int,int, Maze*);
void ABgenerate(Maze*);
void EllerGenera... |
lucky-patty/Maze-Solver | BFSSolver.h | #ifndef BFSSolver_H
#define BFSSolver_H
#include "solver.h"
#include "Maze.h"
#include "Cell.h"
using namespace std;
class BFSSolver : public Solver{
protected:
vector<vector<Cell>> visited;
public:
int solve (Maze * );
} |
lucky-patty/Maze-Solver | Cell.h | <reponame>lucky-patty/Maze-Solver
#ifndef CELL_H
#define CELL_H
#include "Edge.h"
#include<vector>
#define MAX_NEIGHBOUR 4
//struct for cell, contains coordinate, visited value (for generating maze) and references to its neighbours (max 4 neighbours)
typedef struct Cell {
int x;
int y;
bool vis... |
haribo0915/Judge-Girl | Commons/src/test/resources/test/C/C-1/memoryLimit.c | <reponame>haribo0915/Judge-Girl
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
#include <stdio.h>
#include <assert.h>
#include <CL/cl.h>
#define MAXGPU 10
#define MAXK 1024
#define N (1024 * 1024)
int f() {
return f();
}
/* main */
int main(int argc, char *argv[])
{
f();
return 0;
}
/* end */
|
haribo0915/Judge-Girl | Judger/CC-Profiler-Sandbox/rules/c_cpp_file_io.c | <filename>Judger/CC-Profiler-Sandbox/rules/c_cpp_file_io.c
#include <stdbool.h>
#include "seccomp_rules.h"
int c_cpp_file_io_seccomp_rules(struct config *_config) {
return _c_cpp_seccomp_rules(_config, true);
} |
haribo0915/Judge-Girl | Judger/CC-Profiler-Sandbox/sandbox.h | #ifndef JUDGER_SANDBOX_H
#define JUDGER_SANDBOX_H
#include <string.h>
#include "profiler.h"
//if the directory have been mounted, we must first unmount it before remove it, or it will cause horrible system crash
#define CHILD_ERROR_EXIT(error_code)\
{\
LOG_FATAL(submission_id, log_fp, "Error: System errno... |
haribo0915/Judge-Girl | Judger/judgeCases/50179/AC/submitted/a.c | <reponame>haribo0915/Judge-Girl
#include<stdio.h>
#include<assert.h>
int main(){
char in[100],out[100]; int n;
scanf("%s",in);
scanf("%d",&n);
scanf("%s",out);
//FILE *tmpf=fopen("out/std.out","w");
//fclose(tmpf);
//printf("hello.\n");
FILE *fin=fopen(in,"r");
assert(fin);
FILE... |
haribo0915/Judge-Girl | Judger/judgeCases/128/providedCodes/main.c | #include<stdio.h>
#include "intersection.h"
main(){
int m[100][100];
int r[4] = { -1, -1, -1, -1 };
int i, j;
for(i=0; i<100; i++)
for(j=0; j<100; j++){
scanf("%d", &m[i][j]);
}
intersection(m, r);
for(i=0; i<4; i++)
printf("%d ", r[i] );
printf("\n");
}
|
haribo0915/Judge-Girl | Judger/judgeCases/9999999/WA/submitted/prefixsum-seq.c | <gh_stars>10-100
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include "utils.h"
#define MAXN 10000005
uint32_t prefix_sum[MAXN];
int main() {
int n;
uint32_t key;
while (scanf("%d %" PRIu32, &n, &key) == 2) {
for (int i = 1; i <= n; i++) {
prefix_sum... |
haribo0915/Judge-Girl | Judger/CC-Profiler-Sandbox/main.c | <gh_stars>10-100
#include "profiler.h"
#include <assert.h>
#include <stdlib.h>
int main(int argc, char const *argv[])
{
struct result *_result = (struct result *)malloc(sizeof(struct result));
struct config *_config = (struct config *)malloc(sizeof(struct config));
//program + number of entries in struct ... |
haribo0915/Judge-Girl | Judger/CC-Profiler-Sandbox/logger.h | <filename>Judger/CC-Profiler-Sandbox/logger.h
#ifndef JUDGER_LOGGER_H
#define JUDGER_LOGGER_H
#define LOG_LEVEL_FATAL 0
#define LOG_LEVEL_WARNING 1
#define LOG_LEVEL_INFO 2
#define LOG_LEVEL_DEBUG 3
FILE *log_open(const char *log_path);
void log_close(FILE *log_fp);
void log_write(int level, const char *source_fil... |
haribo0915/Judge-Girl | Commons/src/test/resources/test/C/C-2/vectorAdd.c | <reponame>haribo0915/Judge-Girl<filename>Commons/src/test/resources/test/C/C-2/vectorAdd.c
/* header */
#include <stdio.h>
#include <assert.h>
#include <CL/cl.h>
#define MAXGPU 10
#define MAXK 1024
#define N (1024 * 1024)
/* main */
int main(int argc, char *argv[])
{
printf("Hello, OpenCL\n");
cl_int status;
cl... |
haribo0915/Judge-Girl | Spring-Boot/Spring-Boot-Problem/src/test/resources/providedCodes/file1.c | // Copyright (c) 2019 Facebook
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <linux/bpf.h>
#include <linux/ptrace.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <bpf/bpf_helpers.h>
typedef uint32_t pid_t;
struct task_struct {};
#define TASK_COMM_LEN 16
#define PERF_MAX_STACK_DE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.