repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
lawnjelly/godot-lsimd | lsimd/type_i32_4.h | #pragma once
// Copyright (c) 2019 Lawnjelly
// 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, ... |
lawnjelly/godot-lsimd | lsimd/fastarray_4i32.h | <gh_stars>1-10
#pragma once
// Copyright (c) 2019 Lawnjelly
// 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, ... |
lawnjelly/godot-lsimd | lsimd/fastarray_2f32.h | #pragma once
#include "simd_types.h"
#include "simd_vector.h"
#include "core/reference.h"
#include "simd_f32.h"
class FastArray_2f32: public Reference
{
GDCLASS(FastArray_2f32, Reference);
enum eRangeFlags
{
RF_BEFORE = 1 << 0,
RF_AFTER = 1 << 1,
};
public:
FastArray_2f32();
// sizing
void reserve(int s... |
lawnjelly/godot-lsimd | lsimd/vec4_i32.h | #pragma once
// Copyright (c) 2019 Lawnjelly
// 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, ... |
lawnjelly/godot-lsimd | lsimd/simd_i32.h | <reponame>lawnjelly/godot-lsimd
#pragma once
// Copyright (c) 2019 Lawnjelly
// 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
... |
lawnjelly/godot-lsimd | lsimd/simd_macros_undef.h | <gh_stars>1-10
#pragma once
#undef GSIMD_IMPL_VAL
#undef GSIMD_IMPL_SIMPLE
#undef GSIMD_IMPL_DUAL
|
Purewhite2019/cmu462 | DrawSVG/CMU462/include/CMU462/quaternion.h | <reponame>Purewhite2019/cmu462
#ifndef CMU462_QUATERNION_H
#define CMU462_QUATERNION_H
#include "CMU462.h"
#include "matrix3x3.h"
#include "matrix4x4.h"
#include <iosfwd>
namespace CMU462 {
class Quaternion : public Vector4D {
public:
/**
* Constructor.
* Initializes to 0,0,0,1
*/
Quaternion( ) : Vec... |
Purewhite2019/cmu462 | DrawSVG/CMU462/include/CMU462/spectrum.h | #ifndef CMU462_SPECTRUM_H
#define CMU462_SPECTRUM_H
#include "CMU462.h"
#include "color.h"
namespace CMU462 {
/**
* Encodes radiance & irradiance values by the intensity of each visible
* spectrum. Note that this is not strictly an actual spectrum with all
* wavelengths, but it gives us enough information as we c... |
Purewhite2019/cmu462 | DrawSVG/src/png.h | #ifndef CMU462_PNG_H
#define CMU462_PNG_H
#include <map>
#include <vector>
#include "color.h"
#include "vector2D.h"
#include "tinyxml2.h"
namespace CMU462 {
struct PNG {
int width;
int height;
std::vector<unsigned char> pixels;
}; // class PNG
class PNGParser {
public:
static int load( const unsigned char... |
Purewhite2019/cmu462 | DrawSVG/CMU462/include/CMU462/CMU462.h | #ifndef CMU462_H
#define CMU462_H
#include "misc.h"
// CMU462 Forward Declarations //
namespace CMU462 {
class Vector2D;
class Vector3D;
class Vector4D;
class Matrix3x3;
class Matrix4x4;
class Quaternion;
class Complex;
class Color;
class Spectrum;
class Renderer;
class OSDText;
class Viewer;
class Timer;
} //... |
Purewhite2019/cmu462 | DrawSVG/CMU462/include/CMU462/matrix4x4.h | #ifndef CMU462_MATRIX4X4_H
#define CMU462_MATRIX4X4_H
#include "CMU462.h"
#include "vector4D.h"
#include <iosfwd>
namespace CMU462 {
/**
* Defines a 4x4 matrix.
* 4x4 matrices are also extremely useful in computer graphics.
* Written by <NAME> on 9/10/2015.
* Adapted from the Matrix3x3 class.
*
* EXTEND_ME : ... |
Purewhite2019/cmu462 | DrawSVG/src/triangulation.h | <gh_stars>10-100
#ifndef CMU462_TRIANGULATION_H
#define CMU462_TRIANGULATION_H
#include "svg.h"
namespace CMU462 {
// triangulates a polygon and save the result as a triangle list
void triangulate(const Polygon& polygon, std::vector<Vector2D>& triangles );
} // namespace CMU462
#endif // CMU462_TRIANGULATION_H
|
Purewhite2019/cmu462 | DrawSVG/src/viewport.h | #ifndef CMU462_VIEWPORT_H
#define CMU462_VIEWPORT_H
#include "CMU462.h"
#include "svg.h"
namespace CMU462 {
class Viewport {
public:
Viewport( ) : svg_2_norm( Matrix3x3::identity() ) { }
inline Matrix3x3 get_svg_2_norm() {
return svg_2_norm;
}
inline void set_svg_2_norm( Matrix3x3 m ) {
svg_2_no... |
Purewhite2019/cmu462 | DrawSVG/CMU462/include/CMU462/misc.h | <reponame>Purewhite2019/cmu462<gh_stars>1-10
#ifndef CMU462_MISC_H
#define CMU462_MISC_H
#include <cmath>
#include <limits>
#include <algorithm>
namespace CMU462 {
#define PI (3.14159265358979323)
#define EPS_D (0.00000000001)
#define EPS_F (0.00001f)
#define INF_D (std::numeric_limits<double>::infinity())
#define I... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/staffpage.h | <reponame>benkalmus/UniversityLogin_coursework_gui
#ifndef ADMINPAGE_H
#define ADMINPAGE_H
#include "user.h"
#include "degreepage.h"
#include "courses.h"
#include "assessmentpage.h"
#include <QMainWindow>
namespace Ui {
class StaffPage;
}
class StaffPage : public QMainWindow
{
Q_OBJECT
public:
explicit Sta... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/loginpage.h | #ifndef LOGINPAGE_H
#define LOGINPAGE_H
#include <QMainWindow>
#include "studentpage.h"
#include "staffpage.h"
#include "student.h"
#include "user.h"
namespace Ui {
class LoginPage;
}
class LoginPage : public QMainWindow
{
Q_OBJECT
public:
explicit LoginPage(QWidget *parent = nullptr);
~LoginPage();
... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/courses.h | <gh_stars>0
#ifndef COURSES_H
#define COURSES_H
#include "student.h"
#include "course.h"
#include "user.h"
#include "studentcourselink.h"
#include "vector"
#include <QMainWindow>
#include <QListWidgetItem>
namespace Ui {
class Courses;
}
class Courses : public QMainWindow
{
Q_OBJECT
public:
explicit Courses... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/assessmentpage.h | <gh_stars>0
#ifndef ASSESSMENTPAGE_H
#define ASSESSMENTPAGE_H
#include "assessment.h"
#include "student.h"
#include "course.h"
#include "studentcourselink.h"
#include "user.h"
#include "vector"
#include <QMainWindow>
#include <QListWidgetItem>
namespace Ui {
class AssessmentPage;
}
class AssessmentPage : public QMa... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/course.h | #include "QString"
#include "QDate"
#include "student.h"
#include <QDebug>
#ifndef COURSE_H
#define COURSE_H
#define MAX_DEGREES 50
#define MAX_COURSES 50
template<class T> //ID GENERATING FUNCTION TEMPLATE
int generate(std::vector<T> list, size_t sizeOfList)
{
int random = std::rand();
for (size_t i=0... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/assessment.h | <gh_stars>0
#ifndef ASSESSMENT_H
#define ASSESSMENT_H
#include "student.h"
#include "course.h"
#include "QString"
#include "QDate"
#include "QObject"
namespace grade
{
class Assessment
{
public:
Assessment();
void setTitle(QString t) {this->Title = t;}
void setWeighing(int w) {this->Weighing = w;}
vo... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/degreepage.h | #ifndef DEGREEPAGE_H
#define DEGREEPAGE_H
#include "student.h"
#include "user.h"
#include "course.h"
#include "studentcourselink.h"
#include <QMainWindow>
#include <QListWidgetItem>
namespace Ui {
class DegreePage;
}
class DegreePage : public QMainWindow
{
Q_OBJECT
public:
explicit DegreePage(QWidget *parent... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/user.h | <reponame>benkalmus/UniversityLogin_coursework_gui<filename>Source code/Coursework_V3/user.h<gh_stars>0
#include "QString"
#include "QDate"
#include <QObject>
#include <string>
#include <ios>
#include <iostream>
#include <fstream>
#ifndef USER_H
#define USER_H
template<class T>
long getUserIndex(QString email, QStr... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/studentcourselink.h | #ifndef STUDENTCOURSELINK_H
#define STUDENTCOURSELINK_H
#include <QDate>
#include "student.h"
#include "course.h"
namespace slink //student links to courses and degrees and other files..
{
class StudentCourseLink
{
public:
StudentCourseLink();
StudentCourseLink(Student &student, program::Course &course,... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/studentpage.h | <filename>Source code/Coursework_V3/studentpage.h
#ifndef STUDENTPAGE_H
#define STUDENTPAGE_H
#include "student.h"
#include "degreepage.h"
#include "courses.h"
#include <QMainWindow>
#include "assessmentpage.h"
namespace Ui {
class StudentPage;
}
class StudentPage : public QMainWindow
{
Q_OBJECT
public:
ex... |
benkalmus/UniversityLogin_coursework_gui | Source code/Coursework_V3/student.h | #include "user.h"
#include <string>
#include "QString"
#include "QDate"
#include "QObject"
#ifndef STUDENT_H
#define STUDENT_H
//student class inherits from User
class Student : public person::User
{
public:
Student() : person::User ()
{this->studentCount++;}
Student(int idUser, QString FirstName,QString ... |
ITensor/ITensorBenchmarks.jl | src/bench_dmrg_1d/runbenchmark.h | <filename>src/bench_dmrg_1d/runbenchmark.h
#include "itensor/all.h"
#include <iostream>
using namespace itensor;
int
run(Args const& args)
{
int maxdim = args.getInt("Maxdim");
auto outputlevel = args.getInt("OutputLevel", 0);
int N = args.getInt("N", 100);
auto nsweeps = args.getInt("NSweeps", 5);
auto c... |
ITensor/ITensorBenchmarks.jl | src/bench_trg/runbenchmark.h | #include "itensor/all.h"
#include "sample/src/trg.h"
#include "sample/src/ising.h"
#include <iostream>
using namespace itensor;
int
run(Args const& args)
{
int maxdim = args.getInt("Maxdim");
int nsweeps = args.getInt("NSweeps", 20);
int outputlevel = args.getInt("OutputLevel", 0);
auto cutoff = args.getRea... |
AgileEhsan/libasm_io | src/read.c | <reponame>AgileEhsan/libasm_io
/**=================================================================
**
** Copyright (c) 2014, <NAME>
**
** All rights reserved.
**
** libasm_io is distributed under the following BSD 3-Clause License
**
** Redistribution and use in source and binary forms, with or without modification,... |
Dimitris-Mourtzilas/projects | header.h | <filename>header.h
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
typedef struct ll{
int data;
struct ll*next_node;
}ll;
void addNode(ll**head,int new_data){
ll*newnode=(ll*)malloc(sizeof(ll));
newnode->data=new_data;
newnode->next_node=*head;
*head=newnode;
printf("Element:%d adde... |
Dimitris-Mourtzilas/projects | main.c | #include "header.h"
int main(int argc,char *argv[]){
FILE *fp;
ll *head=NULL;
int data,size,choice,count=0;
char *fileName
while(1){
printf("Menu");
printf("Insert data to list\nPrint list to screen\nPrint list to a text file\nExit\nChoose:");
scanf("%d",&choice);
switch(choice){
case 0:
printf("Give the value:");
... |
Hyagoro/PID_controler | src/PID.h | <reponame>Hyagoro/PID_controler
#ifndef PID_H
#define PID_H
class PID {
public:
/*
* Errors
*/
double p_error;
double i_error;
double d_error;
/*
* Coefficients
*/
std::vector<double> pid;
std::vector<bool> choice;
std::vector<double> dp;
double tol;
double bes... |
patricksurry/XPlaneConnect | xpcPlugin/XPCLimits.h | #define XPC_MAX_MESSAGE_SIZE 16384 // Max message size in Message.h; was 4096
#define XPC_MAX_DREF_VALUES 255 // Max dref elements, must fit in single byte
#define XPC_MAX_DREF_COUNT 255 // Max number of drefs requested per message, encoded as single byte
#define XPC_MAX_COLS 134 // Max number of columns... |
marius-ne/aquis | arduino/src/Comms/crc.h | <filename>arduino/src/Comms/crc.h
const int POLYNOMIAL = 0b10001000000100001;
const int POLYNOM_LEN = 16; |
nanotech/cxxrx | Maybe.h | <gh_stars>1-10
#pragma once
#include <new>
#include <utility>
#include <type_traits>
#include "throw.h"
template <typename T> class Maybe;
template <typename T, typename std::enable_if<
!std::is_reference<T>::value>::type* = nullptr> // rvalues only
static Maybe<T> Just(T &&x) { return Maybe<T>(std::forward<T>(x))... |
nanotech/cxxrx | rx_dispatch.h | #include "rx.h"
#include <dispatch/dispatch.h>
#ifdef __OBJC__
@class NSOperationQueue;
#endif
namespace windberry {
namespace rx {
template <>
struct schedule_on<dispatch_queue_t> {
inline auto operator()(dispatch_queue_t q) {
assert(q);
using namespace std::placeholders;
return std::bi... |
nanotech/cxxrx | throw.h | #ifndef THROW_H
#define THROW_H
#include <utility>
// Reduce code size by letting the compiler break out throwing
// details into a function.
template <typename E, typename... Args>
[[noreturn]] void throw_(Args... args) {
throw E(std::forward<Args>(args)...);
}
#endif
|
nanotech/cxxrx | rx.h | #pragma once
#include <exception>
#include <functional>
#include <memory>
#include <utility>
#include <assert.h>
#include <vector>
#include "Maybe.h"
namespace windberry {
namespace rx {
template <typename A, typename B>
using disable_if_same_or_derived = typename std::
enable_if<!std::is_base_of<A, typename st... |
nanotech/cxxrx | rx_throttle_progress.h | #pragma once
#include "rx.h"
#include <memory>
#include <utility>
namespace windberry {
namespace rx {
template <typename Clock, typename Observable>
auto throttle_progress(Clock get_now, Observable o) {
using Time = typename function_traits<Clock>::result_type;
struct last_state {
float progress = ... |
noch3/ledger-app-mina | src/utils.h | #pragma once
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include "crypto.h"
#include "random_oracle_input.h"
#define ARRAY_LEN(array) sizeof(array)/sizeof(array[0])
uint32_t read_uint32_be(const uint8_t *buffer);
uint64_t read_uint64_be(const uint8_t *buffer);
char *amount_to_string(char *buf, co... |
noch3/ledger-app-mina | src/menu.h | <gh_stars>10-100
#pragma once
#include "globals.h"
#include "glyphs.h"
void ui_idle(void);
|
noch3/ledger-app-mina | src/sign_tx.c | <reponame>noch3/ledger-app-mina<gh_stars>10-100
#include <assert.h>
#include <stdlib.h>
#include "menu.h"
#include "sign_tx.h"
#include "utils.h"
#include "crypto.h"
#include "random_oracle_input.h"
#include "parse_tx.h"
static tx_t _tx;
static ui_t _ui;
static void sign_transaction(void)
{
char address[MIN... |
noch3/ledger-app-mina | tests/utils_tests.c | #include <assert.h>
#include <string.h>
#include <stdio.h>
#include "utils.h"
int main()
{
char buf[32];
assert(strcmp(value_to_string(buf, sizeof(buf), 0), "0") == 0);
assert(strcmp(value_to_string(buf, sizeof(buf), 000), "0") == 0);
assert(strcmp(value_to_string(buf, sizeof(buf), 001), "1") == 0);
a... |
noch3/ledger-app-mina | src/curve_checks.h | // curve_checks.h - elliptic curve unit tests
//
// These constants were generated from the Mina c-reference-signer
// Do not edit this file
//
// Details: https://github.com/MinaProtocol/c-reference-signer/README.markdown
// Generate: ./unit_tests ledger_gen
#pragma once
#include "crypto.h"
#define EPO... |
noch3/ledger-app-mina | src/parse_tx.h | #pragma once
#include "transaction.h"
typedef struct {
// Blockchain instance
uint8_t network_id;
// Account variables
uint32_t account;
// Transaction related
Transaction tx;
Field input_fields[3];
uint8_t input_bits[TX_BITSTRINGS_BYTES];
uint8_t tag;
} tx_t;
type... |
noch3/ledger-app-mina | src/menu.c | #include "menu.h"
#ifdef HAVE_ON_DEVICE_UNIT_TESTS
UX_STEP_NOCB(
ux_idle_flow_1_step,
pnn,
{
&C_mina_logo,
"Mina",
"unit tests",
});
#else
UX_STEP_NOCB(
ux_idle_flow_1_step,
pnn,
{
&C_mina_logo,
"Mina",
"is ready",
});
#endif
UX_STEP_NOCB(
ux_idle... |
noch3/ledger-app-mina | src/random_oracle_input.c | #include <string.h>
#ifdef LEDGER_BUILD
#include <os.h>
#endif
#include "random_oracle_input.h"
#include "utils.h"
// Add a field to the roinput. The field to be added is converted to
// little endian byte order for compatibility with Mina
void roinput_add_field(ROInput *input, const Field a)
{
size_t remai... |
noch3/ledger-app-mina | src/parse_tx.c | <gh_stars>10-100
#include <string.h>
#include <stdbool.h>
#include "parse_tx.h"
bool parse_tx(const uint8_t *dataBuffer, uint8_t dataLength, tx_t *tx, ui_t *ui)
{
if (dataLength != 172) {
return false;
}
// 0-3: from_bip44_account
tx->account = read_uint32_be(dataBuffer);
// 4-58: from_a... |
noch3/ledger-app-mina | src/get_address.c | #include "get_address.h"
#include "utils.h"
#include "crypto.h"
static bool _generated;
static uint32_t _account = 0;
static char _bip44_path[27]; // max length when 44'/12586'/4294967295'/0/0
static char _address[MINA_ADDRESS_LEN];
static uint8_t set_result_get_address(void)
{
uint8_t tx = 0;
mem... |
noch3/ledger-app-mina | src/transaction.c | <filename>src/transaction.c
#include <string.h>
#include "transaction.h"
void transaction_to_roinput(ROInput *input, const Transaction *tx)
{
input->fields_len = 0;
input->bits_len = 0;
roinput_add_field(input, tx->fee_payer_pk.x);
roinput_add_field(input, tx->source_pk.x);
roinput_add_field(inpu... |
noch3/ledger-app-mina | src/crypto.c | // Mina schnorr signatures and elliptic curve arithmetic
//
// * Produces a schnorr signature according to the specification here:
// https://github.com/MinaProtocol/mina/blob/develop/docs/specs/signatures/description.md
//
// * Signer reference here: https://github.com/MinaProtocol/signer-reference
//
//... |
noch3/ledger-app-mina | src/poseidon.h | // Poseidon - cryptographic hash function for zero-knowledge proof systems
//
// Details: https://eprint.iacr.org/2019/458
//
// Poseidon requires the following parameters, with p a prime defining
// a prime field.
//
// alpha = smallest prime s.t. gcd(p, alpha) = 1
// m = number of field el... |
noch3/ledger-app-mina | src/transaction.h | <gh_stars>10-100
#pragma once
#include "random_oracle_input.h"
#define MEMO_BYTES 34
typedef uint64_t Currency;
typedef uint32_t GlobalSlot;
typedef uint32_t Nonce;
typedef uint64_t TokenId;
typedef uint8_t Memo[MEMO_BYTES];
typedef bool Tag[3];
#define PAYMENT_TX 0x00
#define DELEGATION_TX 0x04
typedef st... |
noch3/ledger-app-mina | fuzzing/fuzz_message.c | <reponame>noch3/ledger-app-mina
#include <assert.h>
#include <string.h>
#include "parse_tx.h"
// mock validate_address to avoid crypto function calls
bool validate_address(const char *address)
{
if (strnlen(address, MINA_ADDRESS_LEN) != MINA_ADDRESS_LEN - 1) {
return false;
}
return true;
}
int ... |
noch3/ledger-app-mina | src/globals.c | #include "globals.h"
#include "menu.h"
ux_state_t G_ux;
bolos_ux_params_t G_ux_params;
// display stepped screens
unsigned int ux_step;
unsigned int ux_step_count;
const internalStorage_t N_storage_real;
void sendResponse(uint8_t tx, bool approve) {
G_io_apdu_buffer[tx++] = approve? 0x90 : 0x69;
G_io_apdu_bu... |
cavensio/cavencity | cavencity_slave/tick_trick.h | <reponame>cavensio/cavencity<filename>cavencity_slave/tick_trick.h
/**
Long-running discrete process without using of delay functions.
*/
#ifndef CAVE_TICK_TRICK
#define CAVE_TICK_TRICK
class TickTrick {
private:
uint32_t lastChangeTimestamp = 0;
uint32_t changeRate = 0;
public:
// changeRate = Time... |
cavensio/cavencity | cavencity_master/master_protocol.h | #ifndef CAVE_MASTER_PROTOCOL
#define CAVE_MASTER_PROTOCOL
#include "slave_protocol.h"
const char MASTER_UPTIME_TAG[] = "mu";
const char MASTER_COUNTER_TAG[] = "mc";
const char MASTER_BACKLIGHT_TAG[] = "mbl";
const char SLAVE1_ONLINE_TAG[] = "s1o";
const char SLAVE1_UPTIME_TAG[] = "s1u";
const char SLAVE1_COUNTER_TAG... |
cavensio/cavencity | cavencity_slave/slave_protocol.h | #ifndef CAVE_SLAVE_PROTOCOL
#define CAVE_SLAVE_PROTOCOL
struct SlaveTargetState {
uint8_t fanLevel;
uint8_t lightLevel;
uint8_t damperClosed;
};
struct SlaveActualState {
uint32_t counter;
uint32_t uptime;
uint8_t fanLevel;
uint8_t lightLevel;
uint8_t damperClosed;
};
#endif
|
jaromir-sukuba/pi_zero_computer | fw/keyboard/src/stm32f0xx_it.c | /**
******************************************************************************
* @file USB_Device/HID_Standalone/Src/stm32f0xx_it.c
* @author MCD Application Team
* @version V1.7.0
* @date 04-November-2016
* @brief Main Interrupt Service Routines.
* This file provides template for al... |
jaromir-sukuba/pi_zero_computer | fw/keyboard/src/stm32f0xx_hal_cortex.c | <filename>fw/keyboard/src/stm32f0xx_hal_cortex.c
/**
******************************************************************************
* @file stm32f0xx_hal_cortex.c
* @author MCD Application Team
* @version V1.5.0
* @date 04-November-2016
* @brief CORTEX HAL module driver.
* This file prov... |
jaromir-sukuba/pi_zero_computer | fw/power/src/main.c | <reponame>jaromir-sukuba/pi_zero_computer
#include "stm32l0xx.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
uint8_t tmp,btn_cnt,state,state_change;
void dly_ms (void);
void dly_nms (uint16_t num);
#define LED_G_MASK 0x08
#define LED_O_MASK 0x10
#define OUT_5VM_MASK 0x01
#define OUT_5VU_MASK 0x02
#d... |
jaromir-sukuba/pi_zero_computer | fw/keyboard/inc/stm32f0xx_hal_flash.h | /**
******************************************************************************
* @file stm32f0xx_hal_flash.h
* @author MCD Application Team
* @version V1.5.0
* @date 04-November-2016
* @brief Header file of Flash HAL module.
********************************************************************... |
jaromir-sukuba/pi_zero_computer | fw/keyboard/inc/stm32f072b_discovery.h | <gh_stars>1-10
#ifndef __STM32F072B_DISCOVERY_H
#define __STM32F072B_DISCOVERY_H
#include "stm32f0xx_hal.h"
void adc_init (void);
uint16_t adc_get (uint8_t channel);
uint8_t mouse_button_state(void);
void mouse_button_Init(void);
void keyb_init (void);
void keyb_set_col (uint8_t row);
uint8_t keyb_get_col (void);
ui... |
jaromir-sukuba/pi_zero_computer | fw/keyboard/src/stm32f072b_discovery.c | #include "stm32f072b_discovery.h"
void mouse_button_Init(void)
{
RCC->AHBENR = RCC->AHBENR | RCC_AHBENR_GPIOBEN;
}
uint8_t mouse_button_state(void)
{
uint8_t tmp=0;
if ((GPIOA->IDR&(1<<0))==0) tmp = tmp | 0x01;
if ((GPIOA->IDR&(1<<1))==0) tmp = tmp | 0x04;
if ((GPIOA->IDR&(1<<2))==0) tmp = tmp | 0... |
jaromir-sukuba/pi_zero_computer | fw/keyboard/inc/stm32f0xx_hal_conf.h | /**
******************************************************************************
* @file stm32f0xx_hal_conf.h
* @author MCD Application Team
* @version V1.7.0
* @date 04-November-2016
* @brief HAL configuration file.
******************************************************************************... |
jaromir-sukuba/pi_zero_computer | fw/keyboard/src/main.c | /*
*
*
*
*/
#include "main.h"
USBD_HandleTypeDef USBD_Device;
static void SystemClock_Config(void);
int main(void)
{
HAL_Init();
SystemClock_Config();
adc_init();
keyb_init();
mouse_button_Init();
// BSP_PB_Init(BUTTON_USER, BUTTON_MODE_EXTI);
USBD_Init(&USBD_Device, &HID_Desc, 0);
USBD_... |
rask-project/MediaPicker | src/mediapicker.h | #ifndef FILEDIALOGNATIVEPLUGIN_H
#define FILEDIALOGNATIVEPLUGIN_H
#include <QQuickItem>
#include <QObject>
#include <QList>
#include <QUrl>
#if defined (Q_OS_ANDROID)
#include <QtAndroidExtras>
#endif
#if defined (Q_OS_ANDROID)
class MediaPickerPlugin : public QQuickItem, public QAndroidActivityResultReceiver
#else
... |
cepreu2github/FlappyCube | GameConstants.h | <reponame>cepreu2github/FlappyCube
//
// Created by cepreu on 04.09.17.
//
#ifndef FLAPPYCUBE_GAMECONSTANTS_H
#define FLAPPYCUBE_GAMECONSTANTS_H
#include <SFML/Graphics.hpp>
class GameConstants {
public:
static const unsigned int windowWidth = 800;
static const unsigned int windowHeight = 600;
static co... |
cepreu2github/FlappyCube | Menu.h | <reponame>cepreu2github/FlappyCube
//
// Created by cepreu on 03.09.17.
//
#ifndef FLAPPYCUBE_MENU_H
#define FLAPPYCUBE_MENU_H
#include <SFML/Graphics.hpp>
#include "GameState.h"
class Menu {
public:
Menu();
GameState redraw(sf::RenderWindow &window);
GameState handleInput(sf::Event event);
private:
... |
cepreu2github/FlappyCube | GameState.h | <filename>GameState.h
//
// Created by cepreu on 03.09.17.
//
#ifndef FLAPPYCUBE_GAMESTATE_H
#define FLAPPYCUBE_GAMESTATE_H
enum class GameState { Menu, Game, Exit };
#endif //FLAPPYCUBE_GAMESTATE_H
|
cepreu2github/FlappyCube | Game.h | <reponame>cepreu2github/FlappyCube
//
// Created by cepreu on 03.09.17.
//
#ifndef FLAPPYCUBE_GAME_H
#define FLAPPYCUBE_GAME_H
#include <SFML/Graphics.hpp>
#include "Level.h"
#include "Menu.h"
#include "GameState.h"
class Game {
public:
Game();
void run();
private:
void handleInput(sf::Event event);
... |
cepreu2github/FlappyCube | Tileset.h | //
// Created by cepreu on 03.09.17.
//
#ifndef FLAPPYCUBE_TILESET_H
#define FLAPPYCUBE_TILESET_H
#include <SFML/Graphics.hpp>
class Tileset {
public:
Tileset(std::string filePath, int tileWidth, int tileHeight, sf::Color background);
sf::Sprite getSprite(int tileNo);
private:
sf::Texture tilesetImage;... |
cepreu2github/FlappyCube | Level.h | <reponame>cepreu2github/FlappyCube
//
// Created by cepreu on 03.09.17.
//
#ifndef FLAPPYCUBE_LEVEL_H
#define FLAPPYCUBE_LEVEL_H
#include <SFML/Graphics.hpp>
#include <list>
#include "Tileset.h"
#include "GameState.h"
#include "GameConstants.h"
class Level {
public:
Level();
GameState redraw(sf::RenderWindo... |
Azrrael-exe/relay-controller | src/keypadConfig.h | <filename>src/keypadConfig.h
#ifndef keyPadConfig_h
#define keyPadConfig_h
#include <Arduino.h>
#define C1 4 // Col 1
#define C2 5 // Col 2
#define C3 6 // Col 3
#define C4 7 // Col 4
#define R1 8 // Row 1
#define R2 9 // Row 2
#define R3 10 // Row 3
#define R4 11 // Row 4
cons... |
Azrrael-exe/relay-controller | src/relay.h | #ifndef relay_h
#define relay_h
#include <Arduino.h>
#define NON_ACTION 0
#define WRITING 1
#define SEND 2
#define NODE 0x01
class Relay {
public:
Relay();
Relay(uint8_t i);
bool setRelay(Stream& uart, bool state);
bool getRelay(Stream& uart, uint8_t (&arr)[8]);
bool swapRelay(Stream& uart);
bool getLoc... |
Azrrael-exe/relay-controller | src/lcdConfig.h | <reponame>Azrrael-exe/relay-controller
#ifndef lcdConfig_h
#define lcdConfig_h
#include <Arduino.h>
void showStatus(LiquidCrystal_I2C &lcd, Relay (&relay)[N]){
lcd.clear();
for(int i=1; i<N; i++){
if(i<5){
lcd.setCursor(0, i-1);
}
else {
lcd.setCursor(10, i-5);
}
char stringBuf[10]... |
WakeCaine/TeTTris | TeTTris/Game.h | #pragma once
#include <SFML\Graphics.hpp>
#include <SFML\Window.hpp>
#include <SFML\Audio\Music.hpp>
#include <cmath>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <conio.h>
#include "HClasses\Blocks.h"
#include "HClasses\ClassicSTR.h"
#include "HClasses\Block_I.h"
#include "HClasses\Block_Z.h"
#inc... |
WakeCaine/TeTTris | TeTTris/TWindows.h | #pragma once
#include "game.h"
#include <SFML\Graphics.hpp>
#include <SFML\Window.hpp>
#include <cmath>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <conio.h>
#include "HClasses\Blocks.h"
#include "HClasses\ClassicSTR.h"
#include "HClasses\Block_I.h"
#include "HClasses\Block_Z.h"
#include "HClasses... |
WakeCaine/TeTTris | TeTTris/HClasses/ClassicSTR.h | <gh_stars>1-10
#pragma once
#include "Blocks.h"
class ClassicSTR : public Blocks
{
char type;
int posX, posY;
int opoznienie;
sf::RenderWindow& okno;
public:
ClassicSTR(sf::RenderWindow& oknoAplikacji);
void Reset()
{
//Y=140 jest plansza
posX=90; posY=60;
}
bool BottomCheck(GameMap*);
void Draw();... |
popoffka/nanos-app-yubico-otp | src/usb_keyboard.c | <gh_stars>1-10
/*
Yubico OTP implementation for the Ledger Nano S (nanos-app-yubico-otp)
(c) 2017 <NAME> <<EMAIL>>
including code based on
Password Manager application
(c) 2017 Ledger
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compli... |
popoffka/nanos-app-yubico-otp | src/otp.c | /*
Yubico OTP implementation for the Ledger Nano S (nanos-app-yubico-otp)
(c) 2017 <NAME> <<EMAIL>>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/... |
popoffka/nanos-app-yubico-otp | src/main.c | <gh_stars>1-10
/*
Yubico OTP implementation for the Ledger Nano S (nanos-app-yubico-otp)
(c) 2017 <NAME> <<EMAIL>>
including code based on
Password Manager application
(c) 2017 Ledger
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compli... |
popoffka/nanos-app-yubico-otp | include/otp.h | /*
Yubico OTP implementation for the Ledger Nano S (nanos-app-yubico-otp)
(c) 2017 <NAME> <<EMAIL>>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/... |
bebequ/TEST_make | src/mod0/myadd.h | <gh_stars>0
#ifndef _MY_ADD_H_
#define _MY_ADD_H_
int myadd(int, int);
#endif // _MY_ADD_H_
|
bebequ/TEST_make | src/mod0/myadd.c | #include "myadd.h"
int myadd(int a, int b)
{
return a+b;
}
|
bebequ/TEST_make | src/mod0/mysub.c | #include "mysub.h"
int mysub(int a, int b )
{
return a -b;
}
|
bebequ/TEST_make | src/mod1/mymul.h | <filename>src/mod1/mymul.h
#ifndef _MY_MUL_H_
#define _MY_MUL_H_
int mymul(int, int);
#endif // _MY_MUL_H_
|
bebequ/TEST_make | src/mod1/mydiv.h | <gh_stars>0
#ifndef _MY_DIV_H_
#define _MY_DIV_H_
int mydiv(int, int);
#endif // _MY_DIV_H_
|
bebequ/TEST_make | src/mod0/mysub.h | <reponame>bebequ/TEST_make
#ifndef _MY_SUB_H_
#define _MY_SUB_H_
int mysub(int, int);
#endif // _MY_SUB_H_
|
bebequ/TEST_make | src/mod1/mydiv.c | #include "mydiv.h"
int mydiv(int a, int b)
{
if(b != 0)
{
return a / b;
}
return 0;
}
|
bebequ/TEST_make | src/mod1/mymul.c | #include "mymul.h"
int mymul(int a, int b)
{
return a * b;
}
|
bebequ/TEST_make | src/demo.c | #include <stdio.h>
#include <stdlib.h>
#include "myadd.h"
#include "mysub.h"
#include "mymul.h"
#include "mydiv.h"
int main(int argc, char* argv[])
{
printf("test\n");
if(argc > 2)
{
int a = atoi(argv[1]);
int b = atoi(argv[2]);
printf("%d + %d = %d \n", a, b, myadd(a,b));
printf("%d - %d = %d \n", a, b, my... |
rafallus/ewbik | math/qcp.h | <gh_stars>0
/*************************************************************************/
/* qcp.h */
/*************************************************************************/
/* This file is part of: */
/* ... |
rafallus/ewbik | ik_bone_3d.h | <reponame>rafallus/ewbik
/*************************************************************************/
/* ewbik_shadow_bone_3d.h */
/*************************************************************************/
/* This file is part of: ... |
rafallus/ewbik | math/ik_transform.h | <gh_stars>0
/*************************************************************************/
/* ik_transform.h */
/*************************************************************************/
/* This file is part of: */
/* ... |
rafallus/ewbik | ik_effector_3d.h | /*************************************************************************/
/* ik_effector_3d.h */
/*************************************************************************/
/* This file is part of: */
/* ... |
rafallus/ewbik | skeleton_modification_3d_ewbik.h | /*************************************************************************/
/* skeleton_modification_3d_ewbik.h */
/*************************************************************************/
/* This file is part of: */
/* ... |
ildream/CAAnimationDemo | CAAnimationDemo/CABaseAnimation.h | <reponame>ildream/CAAnimationDemo
//
// CABaseAnimation.h
// CAAnimationDemo
//
// Created by anya on 2018/10/5.
// Copyright © 2018年 ay. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface CABaseAnimation : NSObject
- (instancetype)initWithFrame:(CGRect)frame;
/**
开始动画... |
ildream/CAAnimationDemo | CAAnimationDemo/AppDelegate.h | //
// AppDelegate.h
// CAAnimationDemo
//
// Created by anya on 2018/7/2.
// Copyright © 2018年 ay. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
ildream/CAAnimationDemo | CAAnimationDemo/AlertAnimation.h | //
// AlertAnimation.h
// CAAnimationDemo
//
// Created by anya on 2018/10/7.
// Copyright © 2018年 ay. All rights reserved.
//
#import "CABaseAnimation.h"
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface AlertAnimation : CABaseAnimation
@property (nonatomic, assign) CGFloat duration;//动画时间
@property (... |
ildream/CAAnimationDemo | CAAnimationDemo/TransitionAnimation.h | <gh_stars>1-10
//
// TransitionAnimation.h
// CAAnimationDemo
//
// Created by ildream on 2018/10/7.
// Copyright © 2018年 ay. All rights reserved.
//
#import "CABaseAnimation.h"
NS_ASSUME_NONNULL_BEGIN
@interface TransitionAnimation : CABaseAnimation
@end
NS_ASSUME_NONNULL_END
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.