repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
MiguelDelPinto/LCOM_TPs | proj/src/keyboard.h | #ifndef _LCOM_KEYBOARD_H_
#define _LCOM_KEYBOARD_H_
#include <lcom/lcf.h>
#include "i8042.h"
#include "utils.h"
#include "kbc.h"
/** @defgroup keyboard keyboard
* @{
*
* File for programming with the keyboard
*/
/**
* @brief Subscribes to interrupts from the keyboard controller (KBC)
* @param bit_no Used ... |
MiguelDelPinto/LCOM_TPs | proj/src/sprite.c | <reponame>MiguelDelPinto/LCOM_TPs
// Lcom's lcf header
#include <lcom/lcf.h>
// Useful header
#include <math.h>
// Group's created headers
#include "sprite.h"
#include "video_card.h"
Sprite* create_sprite(xpm_map_t xpm, int x, int y, int xspeed, int yspeed) {
// Allocates space for the "object"
Sprite *sp = (Spr... |
MiguelDelPinto/LCOM_TPs | lab3/keyboard.h | <reponame>MiguelDelPinto/LCOM_TPs<filename>lab3/keyboard.h
#ifndef _LCOM_KEYBOARD_H_
#define _LCOM_KEYBOARD_H_
#include <lcom/lcf.h>
#include "i8042.h"
#include "utils.h"
/**
* @brief Subscribes to interrupts from the keyboard controller (KBC)
*
* @param bit_no Used to correctly identify interrupts, by serving a... |
MiguelDelPinto/LCOM_TPs | proj/src/uart_protocol.h | #ifndef _LCOM_UART_PROTOCOL_H_
#define _LCOM_UART_PROTOCOL_H_
#include <lcom/lcf.h>
#include <stdbool.h>
/** @defgroup uart_protocol uart_protocol
* @{
*
* File for uart protocol
*/
#define BIT_RATE 19200
#define MAX_MSG_SIZE 2
#define BLOWN_UP_MSG_SIZE 1
#define LANDED_MSG_SIZE 1
#define CONNE... |
MiguelDelPinto/LCOM_TPs | lab5/lab5.c | // IMPORTANT: you must include the following line in all your C files
#include <lcom/lcf.h>
#include <lcom/lab5.h>
#include <stdint.h>
#include <stdio.h>
// Any header files included below this line should have been created by you
#include "keyboard.h"
#include "video_card.h"
#include "sprite.h"
#include "macros.h"
#in... |
MiguelDelPinto/LCOM_TPs | proj/src/proj.c | <reponame>MiguelDelPinto/LCOM_TPs
// Lcom's headers
#include <lcom/lcf.h>
#include <lcom/liblm.h>
#include <lcom/proj.h>
// Useful headers
#include <stdbool.h>
#include <stdint.h>
// Group's created headers
#include "keyboard.h"
#include "mouse.h"
#include "space_lander.h"
#include "video_card.h"
#include "serial_port.... |
MiguelDelPinto/LCOM_TPs | proj/src/serial_port.c | #include "serial_port.h"
#include "utils.h"
#include "uart.h"
// Global variable
int serial_port_hook_id = 4;
int (serial_port_com1_subscribe_int)(uint8_t *bit_no)
{
*bit_no = BIT(serial_port_hook_id); // sets the bitmask for irq_set
if(sys_irqsetpolicy(UART_COM1_IRQ, IRQ_REENABLE | IRQ_EXCLUSIVE, &serial_port_... |
MiguelDelPinto/LCOM_TPs | proj/src/highscore.h | #ifndef _HIGHSCORES_H_
#define _HIGHSCORES_H_
#include <lcom/lcf.h>
#include "rtc.h"
/** @defgroup highscores highscores
* @{
*
* Highscore function declaration, types and macros for dealing with highscores.
*/
// ------------ MACROS ------------
#define FILEPATH "/home/lcom/labs/proj/hs.txt"
#define SPACE_X 45 ... |
MiguelDelPinto/LCOM_TPs | lab4/i8042.h | <reponame>MiguelDelPinto/LCOM_TPs<filename>lab4/i8042.h<gh_stars>0
#ifndef _LCOM_I8042_H_
#define _LCOM_I8042_H_
#include <lcom/lcf.h>
#include <minix/sysutil.h>
/** @defgroup i8042 i8042
* @{
*
* Constants for programming the i8042 Keyboard.
*/
/* General macros */
#define KBD_IRQ 1
#define MOUSE_IRQ 12
#d... |
MiguelDelPinto/LCOM_TPs | proj/src/keyboard.c | <filename>proj/src/keyboard.c
#include "keyboard.h"
/* Global variables */
int kbd_hook_id = KBD_IRQ;
uint8_t scancode;
uint32_t sys_inb_counter = 0;
bool status_error = false;
// will only count the uses of sys_inb when in LAB3, because of the flag
#ifdef LAB3
int sys_inb_with_count(int port, uint8_t *value) {
sys... |
MiguelDelPinto/LCOM_TPs | proj/src/uart.h | #ifndef _LCOM_UART_H_
#define _LCOM_UART_H_
/** @defgroup uart uart
* @{
*
* File for serial port macros
*/
// IRQS
#define UART_COM1_IRQ 4
#define UART_COM2_IRQ 3
// I/O Ports's Base Addresses
#define COM1_BASE_ADDR 0x3F8
#define COM2_BASE_ADDR 0x2F8
// Registers
#define RBR 0 // Receiver Buffer
#def... |
MiguelDelPinto/LCOM_TPs | lab3/lab3.c | #include <lcom/lcf.h>
#include <lcom/lab3.h>
#include "keyboard.h"
#include "i8042.h"
#include "i8254.h"
#include <stdbool.h>
#include <stdint.h>
// Global variables used in 'keyboard.c'
extern uint32_t sys_inb_counter;
extern uint8_t scancode;
extern uint32_t global_interrupt_counter;
int main(int argc, char *argv... |
MiguelDelPinto/LCOM_TPs | proj/src/kbc.c | #include "kbc.h"
int kbc_issue_command(uint8_t cmd) {
uint8_t status;
uint8_t num_tries = 0;
while(num_tries < MAX_TRIES) {
// reads the status of the keyboard
if(util_sys_inb(KBC_STATUS_PORT, &status))
return 1;
// loops while 8042 input buffer is not empty
if( (status & INPT_BUF_FULL) == 0 ) {
... |
MiguelDelPinto/LCOM_TPs | proj/src/graphics.h | #ifndef _GRAPHICS_H_
#define _GRAPHICS_H_
/** @defgroup graphics graphics
* @{
*
* File for including images used in game display (xpms)
*/
/**
* @brief XPM files for graphic's display
*/
// Menus
#include "xpms/menu.xpm"
#include "xpms/rules.xpm"
#include "xpms/hs.xpm"
#include "xpms/level_select.xpm"
#includ... |
MiguelDelPinto/LCOM_TPs | lab2/lab2.c | #include <lcom/lcf.h>
#include <lcom/lab2.h>
#include <stdbool.h>
#include <stdint.h>
extern uint32_t global_interrupt_counter;
int main(int argc, char *argv[])
{
// sets the language of LCF messages (can be either EN-US or PT-PT)
lcf_set_language("EN-US");
// enables to log function invocations that are bein... |
MiguelDelPinto/LCOM_TPs | proj/src/highscore.c | <reponame>MiguelDelPinto/LCOM_TPs
#include <lcom/lcf.h>
#include "highscore.h"
#include "sprite.h"
#include "graphics.h"
static Sprite* num[10]; //numbers
static Sprite* s1;
static Sprite* s2;
static Sprite* s3;
static Sprite* sp1;
static Sprite* sp2;
static Sprite* sp3;
static Sprite* sp4;
static Sprite* sp5;
static ... |
RobWalt/rustgym | metaldnn-sys/src/wrapper.h | <reponame>RobWalt/rustgym<gh_stars>100-1000
#include <Foundation/Foundation.h>
|
IrvinMB/IMBPodApi | Example/Pods/Target Support Files/Pods-IMBApiPod_Example/Pods-IMBApiPod_Example-umbrella.h | <reponame>IrvinMB/IMBPodApi
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_IMBApiPod_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned c... |
ValentinSidorov/DeLorean_Team | include/logger.h | <gh_stars>0
#ifndef _LOGGER
#define _LOGGER
#include <fstream>
#include <iostream>
// todo : add mutex , add log-level
enum typelog { DEBUG, INFO, WARN, ERROR };
class Logger {
public:
static Logger *getInstance() {
static Logger instance;
return &instance;
}
void test();
void set_log_path(const ... |
ValentinSidorov/DeLorean_Team | include/process_start.h | #ifndef _PROCESS_START
#define _PROCESS_START
#include <errno.h>
#include <stdio.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include "logger.h"
#include "types.h"
pid_t start_process(set_prog_start &program);
#endif |
I-Doctor/face_simple_demo_on_ZU9 | main.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <time.h>
#include <assert.h>
#include <unistd.h>
#include <stdint.h>
int memfd;
void *mapped_reg_base;
void *mapped_ddr_base;
void *mapped_inst_base;
#undef r... |
OlivierLi/qmk_keymaps | ergodox_ez/keymap.c | #include QMK_KEYBOARD_H
#include "version.h"
#include "keymap_canadian_multilingual.h"
#include "layer_with_mod_tap.h"
#include "enums.h"
#define KC_MAC_UNDO LGUI(KC_Z)
#define KC_MAC_CUT LGUI(KC_X)
#define KC_MAC_COPY LGUI(KC_C)
#define KC_MAC_PASTE LGUI(KC_V)
#define KC_PC_UNDO LCTL(KC_Z)
#define KC_PC_CUT LCTL(KC... |
OlivierLi/qmk_keymaps | planck_ez/keymap.c | #include QMK_KEYBOARD_H
#ifdef AUDIO_ENABLE
#include "muse.h"
#endif
#include "enums.h"
#include "eeprom.h"
#include "keymap_canadian_multilingual.h"
#include "layer_with_mod_tap.h"
#define KC_MAC_UNDO LGUI(KC_Z)
#define KC_MAC_CUT LGUI(KC_X)
#define KC_MAC_COPY LGUI(KC_C)
#define KC_MAC_PASTE LGUI(KC_V)
#define KC_P... |
OlivierLi/qmk_keymaps | ergodox_ez/enums.h | <gh_stars>0
#ifndef ENUMS_H
#define ENUMS_H
enum custom_keycodes {
RGB_SLD = EZ_SAFE_RANGE,
HSV_172_255_255,
HSV_86_255_128,
HSV_27_255_255,
ST_MACRO_0,
ST_MACRO_1,
ST_MACRO_2,
ST_MACRO_3,
ST_MACRO_4,
ST_MACRO_5,
ST_MACRO_6,
CSA_RSPC,
LEFT_SC_CONTROL,
RIGHT_SC_CONTROL,
LAYER_TAP_MOD,
};
... |
OlivierLi/qmk_keymaps | ergodox_ez/layer_with_mod_tap.h | #ifndef LAYER_WITH_MOD_TAP_H
#define LAYER_WITH_MOD_TAP_H
#include "enums.h"
// Variables ------------------------------------------------------------------
static uint16_t last_layer_tap_mod_down_time = 0;
static uint16_t last_layer_tap_mod_up_time = 0;
static bool layer_tap_mod_in_progress = false;
// -------------... |
OlivierLi/qmk_keymaps | planck_ez/enums.h | #ifndef ENUMS_H
#define ENUMS_H
#ifndef TAPPING_TERM
#define TAPPING_TERM 200
#endif
enum planck_keycodes {
RGB_SLD = EZ_SAFE_RANGE,
CSA_LSPO,
CSA_RSPC,
LAYER_TAP_MOD,
};
enum planck_layers {
_BASE,
_LOWER,
_RAISE,
_ADJUST,
_LAYER4,
_LAYER5,
_LAYER6,
_LAYER7,
};
#endif // ENUMS_H
|
AnatoleZho/Play-With-Sort-OC | Play-With-Sort-OC/NSMutableArray+MBSort.h | <filename>Play-With-Sort-OC/NSMutableArray+MBSort.h
//
// NSMutableArray+MBSort.h
// Play-With-Sort-OC
//
// Created by MisterBooo on 2017/7/26.
// Copyright © 2017年 MisterBooo. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ViewController.h"
typedef NS_ENUM(NSUInteger,MBSortType){
MBSele... |
AnatoleZho/Play-With-Sort-OC | Play-With-Sort-OC/MBBarView.h | <reponame>AnatoleZho/Play-With-Sort-OC<filename>Play-With-Sort-OC/MBBarView.h
//
// MBBarView.h
// Play-With-Sort-OC
//
// Created by MisterBooo on 2017/7/31.
// Copyright © 2017年 MisterBooo. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MBBarView : UIView
@end
|
AnatoleZho/Play-With-Sort-OC | Play-With-Sort-OC/Sort/MBHeap.h | <reponame>AnatoleZho/Play-With-Sort-OC<filename>Play-With-Sort-OC/Sort/MBHeap.h<gh_stars>0
//
// MBHeap.h
// Play-With-Sort-OC
//
// Created by MisterBooo on 2017/8/1.
// Copyright © 2017年 MisterBooo. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "NSMutableArray+MBSort.h"
@interface MBHeap : N... |
habbbe/parsimon | test/time_measure.h | <reponame>habbbe/parsimon
#ifndef TIME_MEASURE_H
#define TIME_MEASURE_H
#include <chrono>
#include <iostream>
#define TICK auto _measure_start = std::chrono::high_resolution_clock::now()
#define TOCK(x) auto _measure_end = std::chrono::high_resolution_clock::now();\
std::chrono::duration<double, std::milli> fp_m... |
habbbe/parsimon | include/anpa/combinators.h | <gh_stars>1-10
#ifndef PARSIMON_COMBINATORS_H
#define PARSIMON_COMBINATORS_H
#include <type_traits>
#include <unordered_map>
#include <map>
#include <vector>
#include <memory>
#include "anpa/core.h"
#include "anpa/monad.h"
#include "anpa/internal/combinators_internal.h"
#include "anpa/options.h"
namespace anpa {
/**... |
habbbe/parsimon | include/anpa/state.h | #ifndef PARSIMON_STATE_H
#define PARSIMON_STATE_H
#include <iterator>
#include "anpa/result.h"
#include "anpa/parse_error.h"
#include "anpa/internal/algorithm.h"
namespace anpa {
/**
* Class for the parser state.
*/
template <typename InputIt, typename Settings>
struct parser_state_simple {
/// The current po... |
habbbe/parsimon | test/json/json_value.h | #ifndef JSON_VALUE_H
#define JSON_VALUE_H
#include <unordered_map>
#include <vector>
#include <variant>
#include <memory>
#include "anpa/types.h"
struct json_value;
using json_string = std::string;
using json_object = std::unordered_map<json_string, std::shared_ptr<json_value>>;
using json_array = std::vector<json_v... |
habbbe/parsimon | test/calc/calc.h | #ifndef CALC_H
#define CALC_H
#include <sstream>
#include "anpa/anpa.h"
template <typename T>
constexpr auto const_pow(T a, T b) {
T result = 1;
for (int i = 0; i < b; ++i) result *= a;
return result;
}
// A parser for arithmetic expressions. It does not support any whitespace.
constexpr auto expr = anp... |
habbbe/parsimon | include/anpa/parse_error.h | #ifndef PARSIMON_PARSE_ERROR_H
#define PARSIMON_PARSE_ERROR_H
namespace anpa {
template <typename Message, typename InputIt>
struct parse_error {
Message message;
InputIt position;
constexpr parse_error(Message message, InputIt position) : message{message}, position{position} {}
};
}
#endif // PARSIMO... |
habbbe/parsimon | include/anpa/internal/parsers_internal.h | #ifndef PARSIMON_INTERNAL_PARSERS_INTERNAL_H
#define PARSIMON_INTERNAL_PARSERS_INTERNAL_H
#include <tuple>
#include <limits>
#include "anpa/internal/algorithm.h"
#include "anpa/options.h"
namespace anpa::internal {
/**
* Parser for a single item
*/
template <options Options = options::none, typename State, typenam... |
habbbe/parsimon | include/anpa/types.h | #ifndef PARSIMON_TYPES_H
#define PARSIMON_TYPES_H
#include <type_traits>
#include <iterator>
namespace anpa {
/**
* Empty type used to denote empty-ish results.
*/
struct empty_result {
bool operator==(const empty_result&) const {return true;}
bool operator!=(const empty_result&) const {return false;}
};
... |
habbbe/parsimon | test/json/json_parser.h | <gh_stars>1-10
#ifndef JSON_PARSER_H
#define JSON_PARSER_H
#include "json_value.h"
#include "anpa/anpa.h"
using namespace anpa;
//Remove whitespace (if any) before evaluating `p`
template <typename Parser>
constexpr auto eat(Parser p) {
return trim() >> p;
}
constexpr auto string_parser = []() {
constexpr a... |
habbbe/parsimon | include/anpa/parsers.h | #ifndef PARSIMON_PARSERS_H
#define PARSIMON_PARSERS_H
#include "anpa/internal/algorithm.h"
#include "anpa/core.h"
#include "anpa/options.h"
#include "anpa/types.h"
#include "anpa/combinators.h"
#include "anpa/internal/parsers_internal.h"
#include "anpa/internal/pow10.h"
namespace anpa {
/**
* Parser that always suc... |
habbbe/parsimon | include/anpa/internal/algorithm.h | #ifndef PARSIMON_INTERNAL_ALGORITHM_H
#define PARSIMON_INTERNAL_ALGORITHM_H
#include <algorithm>
#include <iterator>
#include "anpa/types.h"
/**
* constexpr variants of some algorithms
*/
namespace anpa::algorithm {
/**
* constexpr version of `std::equal` (1)
*/
template <typename InputIt1, typename InputIt2>
in... |
habbbe/parsimon | include/anpa/range.h | #ifndef PARSIMON_RANGE_H
#define PARSIMON_RANGE_H
#include <iterator>
#include "anpa/internal/algorithm.h"
namespace anpa {
/**
* A range described by a begin and end iterator.
*/
template <typename InputIt>
struct range {
private:
InputIt begin_it;
InputIt end_it;
public:
using size_type = size_t;
... |
habbbe/parsimon | include/anpa/internal/combinators_internal.h | #ifndef PARSIMON_INTERNAL_COMBINATORS_INTERNAL_H
#define PARSIMON_INTERNAL_COMBINATORS_INTERNAL_H
#include <type_traits>
#include <utility>
#include <valgrind/callgrind.h>
#include "anpa/types.h"
#include "anpa/monad.h"
#include "anpa/options.h"
namespace anpa::internal {
/**
* General helper for evaluating a pars... |
habbbe/parsimon | include/anpa/result.h | <reponame>habbbe/parsimon<filename>include/anpa/result.h
#ifndef PARSIMON_RESULT_H
#define PARSIMON_RESULT_H
#include <type_traits>
#include <variant>
#include <optional>
#include "anpa/parse_error.h"
namespace anpa {
/**
* A parser result. It can either be present or not present.
*/
template <typename R, typename... |
habbbe/parsimon | include/anpa/settings.h | <reponame>habbbe/parsimon
#ifndef PARSIMON_SETTINGS_H
#define PARSIMON_SETTINGS_H
#include <type_traits>
#include <iterator>
#include <array>
#include "anpa/range.h"
namespace anpa {
/// Conversion function that returns a `range`
constexpr auto range_convert = [](auto begin, auto end) {
return range(begin, end);... |
habbbe/parsimon | include/anpa/internal/pow10.h | #ifndef PARSIMON_INTERNAL_POW10_H
#define PARSIMON_INTERNAL_POW10_H
#include <limits>
#include <array>
namespace anpa::internal {
template <typename Floating>
struct pow_table {
static constexpr int min = std::numeric_limits<Floating>::min_exponent10;
static constexpr auto table = []() {
constexpr i... |
habbbe/parsimon | include/anpa/monad.h | #ifndef PARSIMON_MONAD_H
#define PARSIMON_MONAD_H
#include <type_traits>
#include <utility>
#include <memory>
#include "anpa/internal/monad_internal.h"
#include "anpa/core.h"
namespace anpa {
/**
* Combine two monads, ignoring the result of the first one
*/
template <typename P1, typename P2>
inline constexpr auto... |
habbbe/parsimon | include/anpa/anpa.h | <reponame>habbbe/parsimon
#ifndef PARSIMON_INCLUDE_H
#define PARSIMON_INCLUDE_H
#include "anpa/monad.h"
#include "anpa/result.h"
#include "anpa/state.h"
#include "anpa/settings.h"
#include "anpa/core.h"
#include "anpa/combinators.h"
#include "anpa/parsers.h"
#endif // TOKEN_PARSIMON_H
|
habbbe/parsimon | include/anpa/core.h | #ifndef PARSIMON_CORE_H
#define PARSIMON_CORE_H
#include <functional>
#include "anpa/result.h"
#include "anpa/state.h"
#include "anpa/settings.h"
#include "anpa/types.h"
namespace anpa {
// Apply a parser to a state and return the result.
// This application unwraps arbitrary layers of callables so that one can
// ... |
habbbe/parsimon | include/anpa/internal/monad_internal.h | #ifndef PARSIMON_INTERNAL_MONAD_INTERNAL_H
#define PARSIMON_INTERNAL_MONAD_INTERNAL_H
#include <utility>
#include "anpa/core.h"
namespace anpa::internal {
/**
* Currying of an arbitrary function
*/
template <std::size_t num_args, typename Fn>
inline constexpr auto curry_n(Fn f) {
if constexpr (num_args > 1) {
... |
habbbe/parsimon | include/anpa/options.h | #ifndef PARSIMON_OPTIONS_H
#define PARSIMON_OPTIONS_H
#include <type_traits>
#include <iterator>
namespace anpa {
/**
* Options that changes the behavior of a parser.
*
* See the documentation for each parser if any options are available.
*/
enum class options : uint64_t {
none = 0,
retu... |
habbbe/parsimon | include/anpa/version.h | #ifndef PARSIMON_VERSION_H
#define PARSIMON_VERSION_H
#include "anpa/parsers.h"
namespace anpa::version {
/// Current version of anpa as a std::string_view
// MAJOR.MINOR.PATCH-PRE_RELEASE components are parsed from this during compile time
constexpr std::string_view current = "0.5.0";
struct version_components {
... |
jiangweike/HJQCustomAlertView | HJQCustomAlertView/HJQCustomAlertView.h | <gh_stars>1-10
//
// HJQCustomAlertView.h
// HJQCustomAlertView
//
// Created by HanJunQiang on 16/6/27.
// Copyright © 2016年 HaRi. All rights reserved.
//
// http://blog.csdn.net/qq_31810357
#import <UIKit/UIKit.h>
@protocol HJQCustomAlertViewDelegate
- (void)customIOS7dialogButtonTouchUpInside:(id)alertView c... |
cristianmauricio612/CC31_201922705_201920113_201924756_201816689 | FRIENDSBOOK/interaction.h | #ifndef INTERACTION_H
#define INTERACTION_H
#include <QApplication>
class Interaction {
private:
QString fecha;
bool shared = false;
int idP;
public:
Interaction(QString fecha ="",bool shared = false,int idP = 0) :fecha(fecha),shared(shared),idP(idP) {}
void set_fecha(QString valor) {
... |
cristianmauricio612/CC31_201922705_201920113_201924756_201816689 | FRIENDSBOOK/list.h | #ifndef LIST_H
#define LIST_H
#include <QApplication>
#include <string>
template <typename T>
class Nodo {
public:
T data;
Nodo* next;
Nodo* ant;
Nodo(T data, Nodo* next = nullptr, Nodo* ant = nullptr) : data(data), next(next), ant(ant) {}
};
template <typename T>
class List {
public:
Nodo<T>* he... |
cristianmauricio612/CC31_201922705_201920113_201924756_201816689 | FRIENDSBOOK/comment.h | <filename>FRIENDSBOOK/comment.h
#ifndef COMMENT_H
#define COMMENT_H
#include <QApplication>
class Comment {
private:
QString date;
QString text;
int idP;
public:
Comment(QString date = "", QString text = "",int idP = 0) :date(date), text(text),idP(idP) {}
void set_date(QString valor) {
... |
cristianmauricio612/CC31_201922705_201920113_201924756_201816689 | FRIENDSBOOK/avltree.h | #ifndef AVLTREE_H
#define AVLTREE_H
#include <functional>
using std::function;
using std::max;
template <typename T, typename R=T, T NONE=nullptr>
class AvlTree {
struct Node {
T element; Node* left; Node* right; int height;
Node(T element): element(element),left(nullptr),right(nullptr),height(0)... |
cristianmauricio612/CC31_201922705_201920113_201924756_201816689 | FRIENDSBOOK/user.h | #ifndef USER_H
#define USER_H
#include <QString>
#include "interaction.h"
class User {
private:
QString Mail;
QString Fullname;
QString RegisterDate;
QString Password;
QVector <int> Friends;
QVector <Interaction*> myinteractions;
public:
User(QString Mail = "",QString Fullname = "",... |
cristianmauricio612/CC31_201922705_201920113_201924756_201816689 | FRIENDSBOOK/mainwindow.h | <reponame>cristianmauricio612/CC31_201922705_201920113_201924756_201816689
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "avltree.h"
#include "list.h"
#include "publication.h"
#include "user.h"
#include <QLabel>
#include <QMainWindow>
#include <QPushButton>
#include <QVBoxLayout>
QT_BEGIN_NAMESPACE
namespace Ui... |
cristianmauricio612/CC31_201922705_201920113_201924756_201816689 | FRIENDSBOOK/publication.h | <filename>FRIENDSBOOK/publication.h
#ifndef PUBLICATION_H
#define PUBLICATION_H
#include <QListWidget>
#include <QString>
#include "comment.h"
#include "interaction.h"
using namespace std;
class Publication {
private:
QString title;
QString desc;
QString pubdate;
QVector <Comment*> comments;
in... |
bogdanconstantinescu/ScrollViewDirection | ScrollViewDirection/ArrowView.h | <gh_stars>10-100
//
// ArrowView.h
// ScrollViewDirection
//
// Created by <NAME> on 29/08/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ArrowView : UIView
- (void)rotate: (CGFloat)degrees;
@end
|
bogdanconstantinescu/ScrollViewDirection | ScrollViewDirection/MainViewController.h | <reponame>bogdanconstantinescu/ScrollViewDirection
//
// MainViewController.h
// ScrollViewDirection
//
// Created by <NAME> on 29/08/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MainViewController : UIViewController <UIScrollViewDelegate>
@end
|
panos/serenity | Userland/Applications/Browser/Tab.h | /*
* Copyright (c) 2020-2021, <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list ... |
dannye/rgbds | include/asm/opt.h | /*
* This file is part of RGBDS.
*
* Copyright (c) 2021, <NAME> and RGBDS contributors.
*
* SPDX-License-Identifier: MIT
*/
#ifndef RGBDS_OPT_H
#define RGBDS_OPT_H
void opt_B(char chars[2]);
void opt_G(char chars[4]);
void opt_P(uint8_t fill);
void opt_Parse(char const *option);
void opt_Push(void);
void opt_... |
dannye/rgbds | include/asm/main.h | /*
* This file is part of RGBDS.
*
* Copyright (c) 1997-2021, <NAME> and RGBDS contributors.
*
* SPDX-License-Identifier: MIT
*/
#ifndef RGBDS_MAIN_H
#define RGBDS_MAIN_H
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "helpers.h"
extern bool haltnop;
extern bool optimizeloads;
extern boo... |
dannye/rgbds | src/asm/symbol.c | <gh_stars>1-10
/*
* This file is part of RGBDS.
*
* Copyright (c) 1997-2018, <NAME> and RGBDS contributors.
*
* SPDX-License-Identifier: MIT
*/
/*
* Symboltable and macroargs stuff
*/
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#inclu... |
dannye/rgbds | include/asm/fstack.h | /*
* This file is part of RGBDS.
*
* Copyright (c) 1997-2018, <NAME> and RGBDS contributors.
*
* SPDX-License-Identifier: MIT
*/
/*
* Contains some assembler-wide defines and externs
*/
#ifndef RGBDS_ASM_FSTACK_H
#define RGBDS_ASM_FSTACK_H
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include... |
dannye/rgbds | src/asm/format.c | /*
* This file is part of RGBDS.
*
* Copyright (c) 2020, RGBDS contributors.
*
* SPDX-License-Identifier: MIT
*/
#include <inttypes.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "asm/format.h"
#include "asm/warning.h"
struct Fo... |
dannye/rgbds | include/platform.h | <gh_stars>1-10
/*
* This file is part of RGBDS.
*
* Copyright (c) 2020 RGBDS contributors.
*
* SPDX-License-Identifier: MIT
*/
/* platform-specific hacks */
#ifndef RGBDS_PLATFORM_H
#define RGBDS_PLATFORM_H
/* MSVC doesn't have strncasecmp, use a suitable replacement */
#ifdef _MSC_VER
# include <string.h>
# d... |
dannye/rgbds | src/asm/warning.c | /*
* This file is part of RGBDS.
*
* Copyright (c) 2019, <NAME> and RGBDS contributors.
*
* SPDX-License-Identifier: MIT
*/
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "asm/fstack.h"
#include "asm/main.h"
#include "asm/warning.h... |
stackrox/collector | collector/lib/NetworkSignalHandler.h | <reponame>stackrox/collector
/** collector
A full notice with attributions is provided along with this source code.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distrib... |
stackrox/collector | kernel-modules/probe/collector_probe.c | #include "quirks.h"
// This definition is set when the Kernel version is newer than
// 4.17.0. It affects the way nearly everything in the falco probe
// is processed, and is a bit of a misnomer. It might be more appropriately
// called "USING_RAW_TRACEPOINTS"
//
// Since we are *not* using raw tracepoints, we unset t... |
stackrox/collector | collector/lib/Hash.h | <filename>collector/lib/Hash.h
/** collector
A full notice with attributions is provided along with this source code.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distr... |
stackrox/collector | collector/lib/CollectorConfig.h | <gh_stars>1-10
/** collector
A full notice with attributions is provided along with this source code.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the ho... |
stackrox/collector | collector/lib/ConnTracker.h | <reponame>stackrox/collector
/** collector
A full notice with attributions is provided along with this source code.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distrib... |
stackrox/collector | collector/lib/Profiler.h | <filename>collector/lib/Profiler.h
#ifndef COLLECTOR_PROFILER_H
#define COLLECTOR_PROFILER_H
#include <memory>
#include <string>
struct Free {
void operator()(const void* p) const { free((void*)p); }
};
using MallocUniquePtr = std::unique_ptr<char, Free>;
#ifdef COLLECTOR_PROFILING
# include "gperftools/heap-prof... |
myfreeer/input-switch | main.c | <reponame>myfreeer/input-switch<gh_stars>0
#include <stdbool.h>
#include <stdatomic.h>
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <winternl.h>
// created via random.org
#define MUTEX "InputSwitch_w3BYxWnv8rnOgoP6RsNE"
NTSYSAPI
NTSTATUS
NTAPI
RtlGetVersion(
_Out_... |
envzhu/kozos-pic-ongdb | tmrdrv.c | #include "defines.h"
#include "kozos.h"
#include "intr.h"
#include "interrupt.h"
#include "timer.h"
#include "lib.h"
#include "tmrdrv.h"
#define TMRDRV_DEVICE_NUM 4
#define TMRDRV_CMD_USE 'u' /* タイマ・ドライバの使用開始 */
#define TMRDRV_CMD_START 's' /* タイマのスタート */
#define TMRDRV_CMD_CANCEL 'c' /* タイマのキャンセル */
... |
envzhu/kozos-pic-ongdb | tmrdrv.h | #ifndef _TMRDRV_H_INCLUDED_
#define _TMRDRV_H_INCLUDED_
void tmr_sleep(int index, int msec);
void tmr_interval(int index, int msec);
#endif
|
envzhu/kozos-pic-ongdb | consdrv.c | #include "defines.h"
#include "kozos.h"
#include "intr.h"
#include "interrupt.h"
#include "serial.h"
#include "lib.h"
#include "consdrv.h"
#define BACKSPACE 0x08
#define DEL 0x7f
#define CONS_BUFFER_SIZE 24
static struct consreg {
kz_thread_id_t id; /* コンソールを利用するスレッド */
int index; /* 利用するシリアルの番号 */
cha... |
envzhu/kozos-pic-ongdb | kozos.h | #ifndef _KOZOS_H_INCLUDED_
#define _KOZOS_H_INCLUDED_
#include "defines.h"
#include "interrupt.h"
#include "syscall.h"
/* システム・コール */
kz_thread_id_t kz_run(kz_func_t func, char *name, int priority, int stacksize,
int argc, char *argv[]);
void kz_exit(void);
int kz_wait(void);
int kz_sleep(void);
int kz_wakeup... |
envzhu/kozos-pic-ongdb | interrupt.h | #ifndef _INTERRUPT_H_INCLUDED_
#define _INTERRUPT_H_INCLUDED_
#include "intr.h"
typedef short softvec_type_t;
typedef void (*softvec_handler_t)(softvec_type_t type, unsigned long sp);
unsigned int SOFTVECS[SOFTVEC_TYPE_NUM];
#define INTR_ENABLE asm volatile ("ei")
#define INTR_DISABLE asm volatile ("di")
/* ソフトウ... |
envzhu/kozos-pic-ongdb | timer.h | <reponame>envzhu/kozos-pic-ongdb
#ifndef _TIMER_H_INCLUDED_
#define _TIMER_H_INCLUDED_
int timer_start(int index); /* タイマ開始 */
int timer_is_expired(int index); /* タイマ満了したか? */
void timer_expire(int index); /* タイマ満了処理 */
int timer_stop(int index); /* タイマキャンセル */
void timer_intr_enable(int inde... |
envzhu/kozos-pic-ongdb | intr.h | <reponame>envzhu/kozos-pic-ongdb
#ifndef _INTR_H_INCLUDED_
#define _INTR_H_INCLUDED_
/* ソフトウエア・割込みベクタの定義 */
#define SOFTVEC_TYPE_NUM 4
#define SOFTVEC_TYPE_CPU_ERROR 0
#define SOFTVEC_TYPE_SYSCALL 1
#define SOFTVEC_TYPE_SERINTR 2
#define SOFTVEC_TYPE_TMRINTR 3
#endif
|
envzhu/kozos-pic-ongdb | hardware.h | <gh_stars>1-10
#ifndef HARDWARE_H
#define HARDWARE_H
#include "defines.h"
void system_init(void);
void init_BMX(uint32 addr);
#endif
|
envzhu/kozos-pic-ongdb | timer.c | #include "defines.h"
#include "lib.h"
#include "intr.h"
#include "interrupt.h"
#include "timer.h"
#include "kozos.h"
#define TIMER_NUM 4
#define PIC_TIMER2 ((volatile struct pic_timer *)0xBF800800)
#define PIC_TIMER3 ((volatile struct pic_timer *)0xBF800A00)
#define PIC_TIMER4 ((volatile struct pic_timer *)0xBF800C00... |
envzhu/kozos-pic-ongdb | syscall.h | #ifndef _KOZOS_SYSCALL_H_INCLUDED_
#define _KOZOS_SYSCALL_H_INCLUDED_
#include "defines.h"
#include "interrupt.h"
/* システム・コール番号の定義 */
typedef enum {
KZ_SYSCALL_TYPE_RUN = 0,
KZ_SYSCALL_TYPE_EXIT,
KZ_SYSCALL_TYPE_WAIT,
KZ_SYSCALL_TYPE_SLEEP,
KZ_SYSCALL_TYPE_WAKEUP,
KZ_SYSCALL_TYPE_GETID,
KZ_SYSCALL_TYPE_... |
envzhu/kozos-pic-ongdb | main.c | #include "defines.h"
#include "kozos.h"
#include "interrupt.h"
#include "hardware.h"
#include "lib.h"
/* System tasks */
int consdrv_main(int argc, char *argv[]);
int tmrdrv_main(int argc, char *argv[]);
/* User tasks */
int command_main(int argc, char *argv[]);
/* システム・タスクとユーザ・タスクの起動 */
static int start_threads(int... |
envzhu/kozos-pic-ongdb | io.h | #ifndef _IO_H_INCLUDED_
#define _IO_H_INCLUDED_
#define ANSELA *((volatile unsigned int *)0xBF886000)
#define TRISA *((volatile unsigned int *)0xBF886010)
#define LATA *((volatile unsigned int *)0xBF886030)
#define LATACLR *((volatile unsigned int *)0xBF886034)
#define LATASET *((volatile unsigned int *)0... |
envzhu/kozos-pic-ongdb | lib.h | <filename>lib.h
#ifndef _LIB_H_INCLUDED_
#define _LIB_H_INCLUDED_
int dump(char *buf, long size); /* メモリの16進ダンプ出力 */
void *memset(void *b, int c, long len);
void *memcpy(void *dst, const void *src, long len);
int memcmp(const void *b1, const void *b2, long len);
int strlen(const char *s);
char *strcpy(char *dst, const... |
envzhu/kozos-pic-ongdb | consdrv.h | #ifndef _CONSDRV_H_INCLUDED_
#define _CONSDRV_H_INCLUDED_
#define CONSDRV_DEVICE_NUM 1
#define CONSDRV_CMD_USE 'u' /* コンソール・ドライバの使用開始 */
#define CONSDRV_CMD_WRITE 'w' /* コンソールへの文字列出力 */
#endif
|
envzhu/kozos-pic-ongdb | sim-io.h | #ifndef _SIM-IO_H_INCLUDED_
#define _SIM-IO_H_INCLUDED_
int open(char *path,int flags);
int read(int file,char *ptr,int len);
int write(int file,char *ptr,int len);
int close(int file);
#endif
|
envzhu/kozos-pic-ongdb | hardware.c | #include "hardware.h"
#include "io.h"
#define CFGCON *((volatile unsigned int *)0xBF80F200)
#define SYSKEY *((volatile unsigned int *)0xBF80F230)
#define INTCONSET *((volatile unsigned int *)0xBF881008)
#define U1RXR *((volatile unsigned int *)0xBF80FA50)
#define RPB3R *((volatile unsigned int *... |
joaopaulo-cerquinhocajueiro/libPlc | libPlc.h | /*
libPlc Version 0.1, last updated 6th June, 2015.
A simple IL language for Programmable Logic Controller (PLC) running
on Arduino and compatibles.
Author: <NAME>
Based on:
plcLib Version 1.0, last updated 23rd December, 2014.
Author: <NAME>
Publisher: www.electronics-micros.com
This pr... |
Pratyush-Mallick/qorc-sdk | qf_apps/qf_ssi_forest_gaurdian/src/main.c | <reponame>Pratyush-Mallick/qorc-sdk
/*==========================================================
* Copyright 2020 QuickLogic Corporation
*
* 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
... |
Pratyush-Mallick/qorc-sdk | qf_apps/qf_ssi_forest_gaurdian/src/qf_hardwaresetup.c | /*==========================================================
* Copyright 2020 QuickLogic Corporation
*
* 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/licens... |
bowlofstew/hello-bazel | project/b/b.h | #pragma once
#ifndef __B__
#define __B__
class B {
};
#endif |
bowlofstew/hello-bazel | project/a/a.h | <reponame>bowlofstew/hello-bazel
#pragma once
#ifndef __A__
#define __A__
class A {
};
#endif |
fxjm/BuDeJie | BuDeJie/Classes/Other/Category/UIView+Frame.h | <reponame>fxjm/BuDeJie<filename>BuDeJie/Classes/Other/Category/UIView+Frame.h
//
// UIView+Frame.h
// BuDeJie
//
// Created by xiaomage on 16/3/12.
// Copyright © 2016年 小码哥. All rights reserved.
//
#import <UIKit/UIKit.h>
/*
写分类:避免跟其他开发者产生冲突,加前缀
*/
@interface UIView (Frame)
@property CGFloat flp_width;
@... |
fxjm/BuDeJie | BuDeJie/Classes/Other/Category/UIImage+FLPImage.h | <reponame>fxjm/BuDeJie
//
// UIImage+FLPImage.h
// BuDeJie
//
// Created by <NAME> on 2019/8/22.
// Copyright © 2019 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIImage (FLPImage)
+(UIImage *)imageOriginalWithName:(NSString *)name;
@end
NS_ASSUME_NONNULL_END
|
fxjm/BuDeJie | BuDeJie/Classes/Other/Category/UITextField+PlaceHolder.h | //
// UITextField+PlaceHolder.h
// BuDeJie
//
// Created by <NAME> on 2019/8/29.
// Copyright © 2019 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UITextField (PlaceHolder)
/** placeHolderColor */
@property UIColor *placeholderColor;
//- (void)setXmg_Placeholder:(NSSt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.