repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 2/Part 1/Lab 2.X/SPI.c | <gh_stars>1-10
#include <xc.h>
#include <stdio.h>
#include "LCD.h"
#if defined __18F8722
#pragma config OSC=HSPLL
#pragma config WDT=OFF
#pragma config LVP=OFF
#pragma config XINST=OFF
#elif defined __18F87J11
#pragma config FOSC=HSPLL
#pragma config WDTEN=OFF
#pragma config XINST=OFF
#else
#error Invalid proc... |
zzApotheosis/Personal-Projects | coding_practice/C/testing/vector.c | #include <stdlib.h>
#include <stdio.h>
#include <gmp.h>
struct vector {
};
|
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 4/Lab4.X/OneWire.h | /*
* File: OneWire.h
* Author: <NAME>
*
* Created on March 19, 2014, 10:15 AM
*/
#ifndef ONEWIRE_H
#define ONEWIRE_H
enum {OW_SEARCH_ROM = 0xF0, OW_READ_ROM = 0x33, OW_MATCH_ROM = 0x55,
OW_SKIP_ROM = 0xCC, OW_ALARM_SEARCH = 0xEC};
typedef union {
unsigned char bytes[8];
struct {
unsigned char... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/project.h | #ifndef PROJECT_H
#define PROJECT_H
/* Includes */
#include "slutil.h"
void project_set_name(char*);
char* project_get_name(void);
void project_cleanup(void);
#endif
|
zzApotheosis/Personal-Projects | coding_practice/C/testing/src/main.h | <gh_stars>1-10
#ifndef MAIN_H
#define MAIN_H
#include "util.h"
#endif
|
zzApotheosis/Personal-Projects | sysloglistener/C/src/logger.h | #ifndef LOGGER_H
#define LOGGER_H
/* Includes */
#include "slutil.h"
/* Functions */
void logger_server_setup(char*, char*);
void logger_listen(void);
void logger_set_identifier(char*);
char* logger_get_identifier(void);
void logger_set_socket(char*);
char* logger_get_socket(void);
void logger_shutdown(void);
#end... |
zzApotheosis/Personal-Projects | sysloglistener/C/src/client.c | <filename>sysloglistener/C/src/client.c
#include <stdlib.h>
#include <stdio.h>
#include "client.h"
int main(int argc, char** argv) {
char* test = NULL;
slutil_strcpy(&test, "test");
fprintf(stdout, "test = %s\n", test);
free(test);
return EXIT_SUCCESS;
}
|
zzApotheosis/Personal-Projects | coding_practice/C/util/src/stacktoheap.c | <filename>coding_practice/C/util/src/stacktoheap.c
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "include/util.h"
int* util_int_to_heap(int i) {
int* ptr = (int*) malloc(sizeof(int));
*ptr = i;
return ptr;
}
float* util_float_to_heap(float f) {
float* ptr = (float*) malloc(sizeof... |
zzApotheosis/Personal-Projects | academic/Interface Techniques/Lab 5/CANMain.c | <filename>academic/Interface Techniques/Lab 5/CANMain.c
// PIC18F66K80 Configuration Bit Settings
#include <xc.h>
#pragma config WDTEN = OFF
#pragma config XINST = OFF
#pragma config FOSC = HS1
#pragma config PLLCFG = ON
#pragma config CANMX = PORTB
#include "LCD.h"
#include <stdio.h>
#define MSG1_ID 0x123
#d... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/ComDef/ModuleErrors.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Device/ProtocolMessage.h | <reponame>briefgw/brief_schunklwa4p_simulation
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/PowerCubeSim.h | /*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*****************************************************************
*
* \note
* Project name: schunk_modula... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/sdhexception.h | <gh_stars>1-10
//======================================================================
/*!
\file
\section sdhlibrary_cpp_sdhexception_h_general General file information
\author <NAME>
\date 2007-02-22
\brief
Interface of the exception base class #SDH::cSDHLibraryException and #SDH::cMsg.
\... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/canserial-peak.h | //======================================================================
/*!
\file
\section sdhlibrary_cpp_canserial_peak_h_general General file information
\author <NAME>, <NAME>
\date 2009-07-29
\brief
Interface of class #SDH::cCANSerial_PEAK, class to access CAN bus via PEAK card on cygwin/lin... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Device/SocketCANDevice.h | <reponame>briefgw/brief_schunklwa4p_simulation<filename>schunk_modular_robotics/schunk_libm5api/src/Device/SocketCANDevice.h
/*****************************************************************************
*
* Copyright 2016 Intelligent Industrial Robotics (IIROB) Group,
* Institute for Anthropomatics and Robotics... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/Joint.h | <filename>schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/Joint.h
/*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*******... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/Thread.h | <reponame>briefgw/brief_schunklwa4p_simulation<gh_stars>1-10
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/InlineFunctions.h | <reponame>briefgw/brief_schunklwa4p_simulation
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/Config.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/datastructsManipulator.h | /*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*****************************************************************
*
* \note
* Project name: schunk_modula... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/TimeStamp.h | /*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*****************************************************************
*
* \note
* Project name: s... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/GlobalDefines.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Device/CP5X11Device.h | <reponame>briefgw/brief_schunklwa4p_simulation<gh_stars>1-10
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Device/ProtocolDevice.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/dbg.h | <reponame>briefgw/brief_schunklwa4p_simulation<gh_stars>1-10
//======================================================================
/*!
* \file
* \section sdhlibrary_cpp_dbg_h_general General file information
* \author <NAME>
* \date 2007-02-22
*
*
* \brief This file contains interface and implementation of cla... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/StopWatch.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/sdhbase.h | <filename>schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/sdhbase.h
//======================================================================
/*!
\file
\section sdhlibrary_cpp_sdhbase_h_general General file information
\author <NAME>
\date 2007-02-19
\brief
Interface of cl... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/Values.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/PowerCubeCtrl.h | /*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*****************************************************************
*
* \note
* Project name: schunk_modula... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/PowerCubeCtrlParams.h | /*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*****************************************************************
*
* \note
* Project name: schunk_modula... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/moveCommand.h | <filename>schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/moveCommand.h
/*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/simplestringlist.h | //======================================================================
/*!
\file
\section sdhlibrary_cpp_simplestirnglist_h_general General file information
\author <NAME>
\date 2007-02-19
\brief
Interface of class #SDH::cSimpleStringList.
\section sdhlibrary_cpp_simplestirngli... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/serialbase.h | <reponame>briefgw/brief_schunklwa4p_simulation<gh_stars>1-10
//======================================================================
/*!
\file
\section sdhlibrary_cpp_serialbase_h_general General file information
\author <NAME>
\date 2008-05-02
\brief
Interface of class #SDH::cSerialBase, a virtal ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/unit_converter.h | //======================================================================
/*!
\file
\section sdhlibrary_cpp_unit_converter_h_general General file information
\author <NAME>
\date 2007-02-19
\brief
Interface of class #SDH::cUnitConverter.
\section sdhlibrary_cpp_unit_converter_h_copyright Cop... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/orocos/include/PowerCubeCtrl_OROCOS.h | <reponame>briefgw/brief_schunklwa4p_simulation<filename>schunk_modular_robotics/schunk_powercube_chain/orocos/include/PowerCubeCtrl_OROCOS.h<gh_stars>1-10
/****************************************************************
*
* Copyright (c) 2010
*
* Fraunhofer Institute for Manufacturing Engineering
* and Automation... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/simulatedArm.h | /*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*****************************************************************
*
* \note
* Project name: schunk_modula... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/sdhserial.h | //======================================================================
/*!
\file
\section sdhlibrary_cpp_sdhserial_h_general General file information
\author <NAME>
\date 2007-02-19
\brief
Interface of class #SDH::cSDHSerial.
\section sdhlibrary_cpp_sdhserial_h_copyright Copyri... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/IOFunctions.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/util.h | //======================================================================
/*!
\file
\section sdhlibrary_cpp_util_h_general General file information
\author <NAME>
\date 2007-02-19
\brief
Interface of auxilliary utility functions for SDHLibrary-CPP.
\section sdhlibrary_cpp_util_h_c... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/simpletime.h | <reponame>briefgw/brief_schunklwa4p_simulation
//======================================================================
/*!
\file
\section sdhlibrary_cpp_simpletime_h_general General file information
\author <NAME>
\date 2007-02-19
\brief
Interface of auxilliary utility functions for ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/ComDef/IOErrors.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Device/ProtocolCommands.h | <gh_stars>1-10
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Device/Device.h | <reponame>briefgw/brief_schunklwa4p_simulation
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/simulatedMotor.h | <gh_stars>1-10
/*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2010 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*****************************************************************
*
* \note
* Project name... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/Message.h | <reponame>briefgw/brief_schunklwa4p_simulation
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/sdhlibrary_settings.h | <reponame>briefgw/brief_schunklwa4p_simulation
//======================================================================
/*!
\file
\section sdhlibrary_cpp_sdhlibrary_settings_h_general General file information
\author <NAME>
\date 2008-05-20
\brief This file contains settings to make the SDHLibrary com... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/Boolean.h | <reponame>briefgw/brief_schunklwa4p_simulation
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/orocos/include/PowerCubeSim_OROCOS.h | /****************************************************************
*
* Copyright (c) 2010
*
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA)
*
* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: care-o-bot
* ROS stack name: cob_driver
* ROS package na... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/Util/Random.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/sdh_codes.h | <reponame>briefgw/brief_schunklwa4p_simulation<gh_stars>1-10
//======================================================================
/*!
\file
\section sdhlibrary_cpp_sdh_codes_h_general General file information
\author <NAME>
\date 2011-02-04
\brief
This file contains function to convert the... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/include/schunk_libm5api/m5apiw32.h | <reponame>briefgw/brief_schunklwa4p_simulation
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_sdh/common/include/schunk_sdh/release.h | //======================================================================
/*!
\file
\section sdhlibrary_cpp_release_h_general General file information
\author <NAME>
\date 2006-11-30
\brief
This file contains nothing but C/C++ defines with the name of the
project itself (\ref project_name_s... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/orocos/include/OrocosRTTArmDriverInterface.h | /****************************************************************
*
* Copyright (c) 2010
*
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA)
*
* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: care-o-bot
* ROS stack name: cob_driver
* ROS package na... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_powercube_chain/common/include/schunk_powercube_chain/Diagnostics.h | /*!
*****************************************************************
* \file
*
* \note
* Copyright (c) 2012 \n
* Fraunhofer Institute for Manufacturing Engineering
* and Automation (IPA) \n\n
*
*****************************************************************
*
* \note
* Project name: schunk_modula... |
briefgw/brief_schunklwa4p_simulation | schunk_modular_robotics/schunk_libm5api/src/ComDef/DeviceErrors.h |
/******************************************************************************
*
* Copyright (c) 2012
*
* SCHUNK GmbH & Co. KG
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project name: Drivers for "Amtec M5 Protocol" Electronics V4
* ... |
jspringart/CppND-System-Monitor | include/processor.h | <reponame>jspringart/CppND-System-Monitor
#ifndef PROCESSOR_H
#define PROCESSOR_H
class Processor {
public:
float Utilization();
private:
long prevActive{0};
long active{0};
long prevIdle{0};
long idle{0};
long prevTotal{0};
long total{0};
};
#endif |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_constant.h | #pragma once
// global config items
#define RD_KAFKA_CONFIG_BOOTSTRAP_SERVERS "bootstrap.servers"
#define RD_KAFKA_CONFIG_INTERNAL_TERMINATION_SIGNAL "internal.termination.signal"
#define RD_KAFKA_CONFIG_QUEUE_BUFFERING_MAX_MS "queue.buffering.max.ms"
#define RD_KAFKA_CONFIG_GROUP_ID "group.id"
#define RD_KAFKA_CONFIG_... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_rdkafka.h | #pragma once
#include <librdkafka/rdkafka.h>
#include "util/logger.h"
#include <sstream>
#include <string>
namespace qbus {
namespace kafka {
namespace rdkafka {
struct TopicGuard {
rd_kafka_topic_t* rkt_;
TopicGuard(rd_kafka_topic_t* rkt) : rkt_(rkt) {}
~TopicGuard() {
if (rkt_) rd_kafka_topic... |
Qihoo360/kafkabridge | cxx/src/pulsar/timer.h | <gh_stars>100-1000
#pragma once
#include <stdint.h>
#include <limits.h>
#include <chrono>
namespace qbus {
namespace pulsar {
class Timer {
public:
using Clock = std::chrono::high_resolution_clock;
using TimePoint = Clock::time_point;
using Duration = std::chrono::duration<std::chrono::microseconds>;
... |
Qihoo360/kafkabridge | cxx/src/pulsar/qbus_consumer_config.h | #pragma once
#include <boost/property_tree/ptree.hpp>
namespace pt = boost::property_tree;
namespace qbus {
namespace pulsar {
struct QbusConsumerConfig {
QbusConsumerConfig() = default;
QbusConsumerConfig(const pt::ptree& tree);
std::string to_string() const;
static constexpr const char* KEY_AUT... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_helper.h | #pragma once
#include <string>
#include <pthread.h>
#include "qbus_config.h"
#include "util/logger.h"
//----------------------------------------------------------------------
namespace qbus {
namespace kafka {
class QbusConfigLoader;
class QbusHelper {
public:
static void initLog(LUtil::Logger::LOG_LEVEL lo... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_thread.h | <reponame>Qihoo360/kafkabridge
// qbus_thread.h: Simple wrappers of pthread API.
#pragma once
#include <pthread.h>
#include "qbus_noncopyable.h"
namespace qbus {
namespace kafka {
class Thread : public noncopyable {
public:
typedef void* (*FuncPtr)(void*);
bool start(FuncPtr func, void* arg);
bool st... |
Qihoo360/kafkabridge | cxx/src/pulsar/make_unique.h | <reponame>Qihoo360/kafkabridge<filename>cxx/src/pulsar/make_unique.h
#pragma once
#include <memory>
#if __cplusplus < 201402L
namespace std {
template <typename T, typename... Args>
inline std::unique_ptr<T> make_unique(Args&&... args) {
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
}
} // na... |
Qihoo360/kafkabridge | cxx/src/qbus_producer_imp.h | <reponame>Qihoo360/kafkabridge
#ifndef QBUS_QBUS_PRODUCER_IMP_H_
#define QBUS_QBUS_PRODUCER_IMP_H_
#include "qbus_producer.h"
namespace qbus {
class QbusProducer::Imp {
public:
virtual ~Imp() {}
virtual bool init(const std::string& cluster, const std::string& log_path, const std::string& config_path,
... |
Qihoo360/kafkabridge | cxx/src/pulsar/qbus_producer.h | <reponame>Qihoo360/kafkabridge
#pragma once
#include "../qbus_producer_imp.h"
#include <memory>
#include <pulsar/Client.h>
namespace qbus {
namespace pulsar {
using SharedStringPtr = std::shared_ptr<std::string>;
class QbusProducerConfig;
class QbusProducer final : public qbus::QbusProducer::Imp {
public:
b... |
Qihoo360/kafkabridge | cxx/src/qbus_consumer.h | <filename>cxx/src/qbus_consumer.h
#ifndef QBUS_QBUS_CONSUMER_H_
#define QBUS_QBUS_CONSUMER_H_
#include <string>
#include <vector>
struct rd_kafka_message_s;
namespace qbus {
struct QbusMsgContentInfo {
std::string topic;
std::string msg;
size_t msg_len;
// kafka only
rd_kafka_message_s* rd_mess... |
Qihoo360/kafkabridge | cxx/src/pulsar/to_string.h | #pragma once
#include <vector>
#include <string>
namespace qbus {
namespace pulsar {
inline std::string to_string(const std::vector<std::string>& v) {
std::string result = "[";
for (size_t i = 0; i < v.size(); i++) {
if (i > 0) result += ", ";
result += v[i];
}
result += "]";
retu... |
Qihoo360/kafkabridge | cxx/src/pulsar/qbus_producer_map.h | <reponame>Qihoo360/kafkabridge<gh_stars>100-1000
#pragma once
#include <memory>
#include <string>
#include <unordered_map>
namespace qbus {
namespace pulsar {
class QbusProducer;
class QbusProducerMap {
public:
static QbusProducerMap& instance();
// Return a non-null shared pointer of QbusProducer, if k... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_consumer.h | <filename>cxx/src/kafka/qbus_consumer.h
#pragma once
#include "../qbus_consumer_imp.h"
//-------------------------------------------------------------
namespace qbus {
namespace kafka {
class QbusConsumer : public qbus::QbusConsumer::Imp {
public:
QbusConsumer();
~QbusConsumer();
public:
bool ini... |
Qihoo360/kafkabridge | cxx/src/pulsar/retryable_send_callback.h | <filename>cxx/src/pulsar/retryable_send_callback.h
#pragma once
#include <pulsar/Producer.h>
namespace qbus {
namespace pulsar {
using SharedStringPtr = std::shared_ptr<std::string>;
using SharedResult = std::shared_ptr<::pulsar::Result>;
class RetryableSendCallback {
SharedResult result_{std::make_shared<::pul... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_noncopyable.h | <filename>cxx/src/kafka/qbus_noncopyable.h<gh_stars>100-1000
#pragma once
namespace qbus {
namespace kafka {
class noncopyable {
protected:
noncopyable() {}
~noncopyable() {}
private:
noncopyable(const noncopyable&);
noncopyable& operator=(const noncopyable&);
};
} // namespace kafka
} // na... |
Qihoo360/kafkabridge | cxx/src/mq_type.h | <reponame>Qihoo360/kafkabridge<filename>cxx/src/mq_type.h
#pragma once
#include <cctype>
#include <algorithm>
#include <boost/property_tree/ini_parser.hpp>
namespace pt = boost::property_tree;
namespace qbus {
enum class MqType
{
KAFKA,
PULSAR
};
inline MqType mqType(const std::string& config_path) {
pt... |
Qihoo360/kafkabridge | cxx/src/qbus_consumer_imp.h | #ifndef QBUS_QBUS_CONSUMER_IMP_H_
#define QBUS_QBUS_CONSUMER_IMP_H_
#include "qbus_consumer.h"
namespace qbus {
class QbusConsumer::Imp {
public:
virtual ~Imp() {}
virtual bool init(const std::string& cluster, const std::string& log_path, const std::string& config_path,
const QbusCo... |
Qihoo360/kafkabridge | cxx/src/pulsar/qbus_php_producer.h | <filename>cxx/src/pulsar/qbus_php_producer.h
#pragma once
#include "../qbus_producer_imp.h"
#include <memory>
#include <unordered_map>
namespace qbus {
namespace pulsar {
class QbusProducer;
class QbusPhpProducer final : public qbus::QbusProducer::Imp {
public:
bool init(const std::string& broker, const std... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_producer_imp.h | #pragma once
#include <string>
#include "qbus_config.h"
//-----------------------------------------------------
namespace qbus {
namespace kafka {
class QbusProducerImp {
public:
friend class QbusSqliteProducer;
QbusProducerImp();
~QbusProducerImp();
bool init(const std::string& cluster_name, co... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_producer_imp_map.h | #pragma once
#include "qbus_producer_imp.h"
namespace qbus {
namespace kafka {
class QbusProducerImpMap {
public:
typedef std::map<std::string, QbusProducerImp*> DataType;
static DataType* instance() {
static QbusProducerImpMap kProducerImpMap;
return &kProducerImpMap.data_;
}
pri... |
Qihoo360/kafkabridge | cxx/src/pulsar/qbus_php_consumer.h | #pragma once
#include "../qbus_consumer_imp.h"
#include "qbus_consumer.h"
namespace qbus {
namespace pulsar {
class QbusPhpConsumer final : public qbus::QbusConsumer::Imp {
public:
QbusPhpConsumer();
~QbusPhpConsumer();
bool init(const std::string& cluster_name, const std::string& log_path, const std... |
Qihoo360/kafkabridge | cxx/src/pulsar/log4cplus_logger.h | <reponame>Qihoo360/kafkabridge<gh_stars>100-1000
#pragma once
#include <atomic>
#include <memory>
#include <mutex>
#include <pulsar/Logger.h>
#include <log4cplus/logger.h>
namespace qbus {
namespace pulsar {
class Log4cplusLogger final : public ::pulsar::Logger {
public:
Log4cplusLogger(const std::string& fi... |
Qihoo360/kafkabridge | cxx/src/pulsar/property_tree_proxy.h | <filename>cxx/src/pulsar/property_tree_proxy.h
#pragma once
#include <boost/property_tree/ptree.hpp>
namespace pt = boost::property_tree;
namespace qbus {
namespace pulsar {
class PropertyTreeProxy {
public:
PropertyTreeProxy(const pt::ptree& tree) : tree_(tree) {}
void config(const char* key, std::stri... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_topic_partition_set.h | #pragma once
#include <map>
#include <set>
#include <string>
#include <vector>
struct rd_kafka_topic_partition_list_s;
namespace qbus {
namespace kafka {
class TopicPartitionSet {
public:
typedef std::set<int> IntSet;
typedef std::map<std::string, IntSet> MapStrToIntSet;
bool empty() const { return ... |
Qihoo360/kafkabridge | cxx/src/qbus_producer.h | #ifndef QBUS_QBUS_PRODUCER_H_
#define QBUS_QBUS_PRODUCER_H_
#include <string>
namespace qbus {
class QbusProducer {
public:
QbusProducer();
~QbusProducer();
bool init(const std::string& cluster, const std::string& log_path, const std::string& config_path,
const std::string& topic);
... |
Qihoo360/kafkabridge | cxx/src/pulsar/qbus_producer_config.h | #pragma once
#include <boost/property_tree/ptree.hpp>
namespace pt = boost::property_tree;
namespace qbus {
namespace pulsar {
struct QbusProducerConfig {
QbusProducerConfig() = default;
QbusProducerConfig(const pt::ptree& tree);
std::string to_string() const;
static constexpr const char* KEY_AUT... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_producer.h | <reponame>Qihoo360/kafkabridge<filename>cxx/src/kafka/qbus_producer.h
#pragma once
#include <string>
#include "../qbus_producer_imp.h"
//-----------------------------------------------------
namespace qbus {
namespace kafka {
class QbusProducerImp;
class QbusProducer : public qbus::QbusProducer::Imp {
public:
... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_record_msg.h | <filename>cxx/src/kafka/qbus_record_msg.h
#pragma once
#include <string>
#include <log4cplus/logger.h>
//--------------------------------------------------------------------
namespace qbus {
namespace kafka {
class QbusRecordMsg {
public:
static void recordMsg(const std::string& topic, const std::string& msg)... |
Qihoo360/kafkabridge | cxx/src/pulsar/qbus_consumer.h | <reponame>Qihoo360/kafkabridge<filename>cxx/src/pulsar/qbus_consumer.h
#pragma once
#include "../qbus_consumer_imp.h"
#include <atomic>
#include <future>
#include <memory>
#include <unordered_map>
#include <pulsar/Client.h>
#include "timer.h"
namespace qbus {
namespace pulsar {
class QbusConsumerConfig;
class Qb... |
Qihoo360/kafkabridge | cxx/src/kafka/qbus_config.h | <gh_stars>100-1000
#pragma once
#include <string>
#include <map>
#include "qbus_rdkafka.h"
//------------------------------------------------------
namespace qbus {
namespace kafka {
class QbusConfigLoader {
public:
enum ConfigType
{
CT_CONSUMER = 0,
CT_PRODUCER,
};
QbusConfigLoade... |
Qihoo360/kafkabridge | cxx/src/pulsar/pulsar_config.h | <gh_stars>100-1000
#pragma once
#include <memory>
#include <stdexcept>
#include <boost/property_tree/ini_parser.hpp>
#include <boost/property_tree/ptree.hpp>
namespace pt = boost::property_tree;
namespace qbus {
namespace pulsar {
class QbusProducerConfig;
class QbusConsumerConfig;
class PulsarConfig {
public:... |
jefersonbelmiro/tron | inc/core/negamax.h | #ifndef NEGAMAX_H
#define NEGAMAX_H
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
int* negamax_create_dist_map(int* map, int map_width, int map_height, int map_position);
int negamax_evaluate_position(int* map, int map_width, int map_height, int alpha_position, int beta_position);
void negamax_print_dist... |
jefersonbelmiro/tron | src/core/board.c | <gh_stars>10-100
#include "core/board.h"
#include "core/window.h"
#include <string.h>
Board* board_create(int width, int height)
{
Board* board = malloc(sizeof(Board));
board->width = width;
board->height = height;
board->length = width * height;
board->map = calloc(board->length, sizeof(int));
... |
jefersonbelmiro/tron | src/core/input.c | #include "core/input.h"
#include <curses.h>
Input* input_create()
{
Input* input = malloc(sizeof(Input));
return input;
}
void input_update(Input* input)
{
input->key = getch();
}
void input_destroy(Input* input)
{
free(input);
}
|
jefersonbelmiro/tron | test/int_array.c | #include "common/test.h"
#include "common/int_array.h"
IntArray* array = NULL;
void test_empty()
{
assert_not_equal(array, NULL);
assert_equal(array->length, 0);
}
void test_add_elements()
{
int t1 = 10, t2 = 20, t3 = 30;
int_array_push(array, t1);
int_array_push(array, t2);
int_array_push(... |
jefersonbelmiro/tron | inc/state/menu.h | #ifndef MENU_STATE_H
#define MENU_STATE_H
#include "core/state.h"
#include "core/window.h"
State* menu_create();
void menu_destroy(State* menu);
#endif
|
jefersonbelmiro/tron | inc/core/input.h | <reponame>jefersonbelmiro/tron
#ifndef INPUT_H
#define INPUT_H
#include <stdlib.h>
typedef struct {
int key;
} Input;
Input* input_create();
void input_update(Input* input);
void input_destroy(Input* input);
#endif
|
jefersonbelmiro/tron | inc/common/int_array.h | <reponame>jefersonbelmiro/tron
#ifndef INT_ARRAY_H
#define INT_ARRAY_H
#include "common/array.h"
typedef struct {
void **items;
int size;
int length;
} IntArray ;
IntArray *int_array_create(int size);
void int_array_destroy(IntArray *data);
void int_array_clean(IntArray *data);
void int_array_push(IntArr... |
jefersonbelmiro/tron | src/core/window.c | #include "core/window.h"
#include <curses.h>
#include <string.h>
static void configure(Window* window, int width, int height);
static void configure_resize(Window* window, int width, int height);
static void configure_screen();
static void configure_color();
Window* window_create(int width, int height)
{
Window* ... |
jefersonbelmiro/tron | test/window.c | #include "common/test.h"
#include "core/window.h"
Window* window = NULL;
int width = 40;
int height = 20;
void test_draw()
{
window_draw_string(0, 0, "test draw string");
window_draw_char(5, 5, 'a');
window_refresh();
assert(window_has_string(0, 0, "test draw"));
assert(window_has_string(10, 0, "... |
jefersonbelmiro/tron | src/main.c | <gh_stars>10-100
#include "main.h"
int main(int argc, char* argv[])
{
int width = 40;
int height = 20;
Board* board = board_create(width, height);
Window* window = window_create(width, height);
Input* input = input_create();
Game* game = game_create(window, board, input);
State* menu = men... |
jefersonbelmiro/tron | inc/common/ptr_array.h | #ifndef PTR_ARRAY_H
#define PTR_ARRAY_H
#include "common/array.h"
typedef struct {
void **items;
int size;
int length;
} PtrArray ;
PtrArray *ptr_array_create(int size);
void ptr_array_destroy(PtrArray *data);
void ptr_array_clean(PtrArray *data);
void ptr_array_push(PtrArray *data, void* item);
bool ptr... |
jefersonbelmiro/tron | src/common/array.c | #include "common/array.h"
#define ARRAY_INIT_SIZE 4
void array_resize(void **data, int size, int* data_size)
{
void **items = realloc(data, sizeof(void*) * size);
if (!items) {
printf("eror on realloc array\n");
exit(1);
}
memset(items + *data_size, 0, size - *data_size);
*data_siz... |
jefersonbelmiro/tron | inc/core/player.h | <gh_stars>10-100
#ifndef PLAYER_H
#define PLAYER_H
#include "core/light_cycle.h"
LightCycle* player_create(int position, int color, int direction);
void player_destroy(LightCycle* player);
#endif
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.