repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
ustaslive/hut | hut.h |
/**
* Header only Unit Tests for C
*
* @file hut.h
* @author ustaslive
* @created 2020/11/19
*/
#ifndef __HUT_H
#define __HUT_H
#include <stdio.h>
#include <string.h>
#define CHK_LONG_EQ(expected, actual) do {\
TEST_STAT.checks_done++;\
long _expected = expected;\
long _actual = actual;\
if (_... |
mirzaei-ce/linux-ausbit | src/qt/ausbitaddressvalidator.h | <filename>src/qt/ausbitaddressvalidator.h
// Copyright (c) 2011-2014 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef AUSBIT_QT_AUSBITADDRESSVALIDATOR_H
#define AUSBIT_QT_AUSBITADDRESSVALIDATOR... |
servo/fontsan | src/fake-zlib/zlib.h | // Copyright 2015 The Servo Project Developers.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
// Declares the zlib API subset used by ots, and links it to miniz.
#ifndef ZLIB_H
#define ZLIB_H
#ifdef __cplusplus
extern "C" {
#endif
// Adapted from miniz.c.... |
GauthamVarma11/Compiler-Design-C-programs | Week1-Lab- exercise/program2.c | #include<stdio.h>
void main()
{
int state=0,i=0;
char current,input[100];
printf("Enter input string \t :");
scanf("%s",input);
while((current=input[i++])!='\0')
{
switch(state)
{
case 0: if(current=='a')
state=1;
else if(current=='b')
state=3;
... |
rogerza/patron | ext/patron/session_ext.c | /* -------------------------------------------------------------------------- *\
*
* Patron HTTP Client: Interface to libcurl
* Copyright (c) 2008 The Hive http://www.thehive.com/
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files... |
rogerza/patron | ext/patron/membuffer.h |
#ifndef PATRON_MEMBUFER_H
#define PATRON_MEMBUFER_H
#include <stdlib.h>
#define MB_OK 0
#define MB_OUT_OF_MEMORY 1
#define MB_OUT_OF_BOUNDS 2
/**
* Implementation of a simple memory buffer for collecting the response body
* and headers from a curl request. The memory buffer will grow to accomodate
... |
rogerza/patron | ext/patron/membuffer.c | <reponame>rogerza/patron
#include <ruby.h>
#include <assert.h>
#include "membuffer.h"
#define DEFAULT_CAPACITY 4096
#define MAXVAL(a, b) ((a) > (b) ? (a) : (b))
static int membuffer_ensure_capacity( membuffer* m, size_t length ) {
size_t new_capacity;
char* tmp_buf;
if (m->capacity >= length) { return MB_OK; ... |
wosiwozaiwhy/tinyFtpd | ftpproto.c | <filename>ftpproto.c
#include "ftpproto.h"
#include "sysutil.h"
#include "str.h"
#include "ftpcodes.h"
#include "tunable.h"
#include "privsock.h"
#include "common.h"
//判断是否PORT or PASV模式已开启
int port_active(session_t* sess);
int pasv_active(session_t* sess);
int get_port_fd(session_t* sess);
int get_pasv_... |
wosiwozaiwhy/tinyFtpd | privsock.h | <filename>privsock.h
#ifndef _PRIV_SOCK_H_
#define _PRIV_SOCK_H_
#include "session.h"
// 内部进程自定义协议
// 用于FTP服务进程与nobody进程进行通信
// FTP服务进程向nobody进程请求的命令
//请求PORT模式的数据连接套接字,告知nobody接收client端口号和IP地址,而后绑定套接字
#define PRIV_SOCK_GET_DATA_SOCK 1
//FTP向nobody发送2命令,请求得到是否激活的答复
#define PRIV_SOCK_PASV_ACTIVE 2
//FTP接收到... |
wosiwozaiwhy/tinyFtpd | main.c | <filename>main.c
#include "common.h"
#include "sysutil.h"
#include "session.h"
#include "tunable.h"
#include "parseconf.h"
#include "ftpcodes.h"
int
main(){
parseconf_load_file(TINYFTPD_CONF);
//parseconf_load_file(TINYFTPD_CONF);
printf("pasv_enable = %d\n",tunable_pasv_enable);
printf("port_ena... |
wosiwozaiwhy/tinyFtpd | common.h | <filename>common.h
#ifndef _COMMON_H_
#define _COMMON_H_
#include<unistd.h>
#include<errno.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<sys/types.h>
#include<netdb.h>
#include<fcntl.h>
#include<arpa/inet.h>
#include "pwd.h"
#include "shadow.h"
#include "crypt.h"
#include "signal.h"
#include... |
wosiwozaiwhy/tinyFtpd | ftpproto.h | <gh_stars>1-10
#ifndef _FTPPROTO_H_
#define _FTPPROTO_H_
#include "session.h"
void handle_child(session_t* sess);
//列出当前目录
//int list_common(session_t* sess);
//static void do_user(session_t* sess);
//static void do_pass(session_t* sess);
#endif //_FTPPROTO_H_
|
wosiwozaiwhy/tinyFtpd | nobody.h | <reponame>wosiwozaiwhy/tinyFtpd<gh_stars>1-10
#ifndef _NOBODY_H_
#define _NOBODY_H_
#include "session.h"
void handle_parent(session_t* sess);
#endif //_NOBODY_H_ |
wosiwozaiwhy/tinyFtpd | tunable.c | #include "tunable.h"
/*默认值*/
//被动模式开关
int tunable_pasv_enable = 1;
//主动模式开关
int tunable_port_enable = 1;
//监听端口,默认21
unsigned int tunable_listen_port = 21;
//最大连接数 默认2000
unsigned int tunable_max_clients = 2000;
//默认
unsigned int tunable_max_per_ip = 50;
//接收连接超时时间,默认60s
unsigned int tunable_accept_timeout = 60;
//主动连... |
wosiwozaiwhy/tinyFtpd | parseconf.h | <filename>parseconf.h
#ifndef _PARSE_CONF_H_
#define _PARSE_CONF_H_
void parseconf_load_file(const char* path);
void parseconf_load_setting(const char* setting);
#endif //_PARSE_CONF_H_ |
wosiwozaiwhy/tinyFtpd | str.h | <filename>str.h
#ifndef _STR_H_
#define _STR_H_
//去除字符串结尾的\r\n
void str_trim_crlf(char *str);
//根据第一个c把str分成left和right 两部分
void str_split(const char *str , char *left, char *right, char c);
//判断str是否全为space,是返回1,否则返回0
int str_all_space(const char *str);
//str全部转为大写
void str_upper(char *str);
//类似atoi 把str转换... |
donglinb/ESO-Simulation | include/two_mass_model.h | #pragma once
#ifndef _TWO_MASS_MODEL_H
#define _TWO_MASS_MODEL_H
#include<eigen3/Eigen/Core>
#include"SysModal.hpp"
using namespace Eigen;
// Two Mass Model
class TwoMassModal :public SysModal::TransitionModal<Vector4d>
{
public:
TwoMassModal(Vector4d x0, double h = 0.1, double t0 = 0) :
TransitionModal(x0, h, t0... |
donglinb/ESO-Simulation | include/toy_model.h | #pragma once
#ifndef _TOY_MODEL_H
#define _TOY_MODEL_H
#include<eigen3/Eigen/Core>
#include"SysModal.hpp"
using namespace Eigen;
// simple nonlinear model
class TransModal :public SysModal::TransitionModal<Vector2d>
{
public:
TransModal(Vector2d x0, double h = 0.1, double t0 = 0) :
TransitionModal(x0, h, t0)
{
... |
donglinb/ESO-Simulation | include/SysModal.h | #pragma once
#ifndef _SYSMODEL_H
#define _SYSMODEL_H
#include<eigen3/Eigen/Core>
namespace SysModal
{
using namespace Eigen;
template<typename T>
class TransitionModal
{
public:
TransitionModal(T x0, double h = 0.1, double t0 = 0)
{
x_ = x0;
h_ = h;
t_ = t0;
}
~TransitionModal()
{
;
}
... |
donglinb/ESO-Simulation | include/PIDController.h | <filename>include/PIDController.h
#pragma once
#ifndef _PIDCONTROLLER_H
#define _PIDCONTROLLER_H
class PIDController
{
public:
PIDController();
PIDController(double P, double I, double D, double T = 0.01);
~PIDController();
int setPID(double P, double I, double D);
double update(double e);
double P_, I_, D_;
d... |
MrCocoaCat/slambook | Reconstruction/class6-mesh_generation/class6-mesh_generation/poisson/src/PoissonRecon.h | <reponame>MrCocoaCat/slambook
//
// Created by sway on 17-8-1.
//
#ifndef POISSONSURFACE_POISSONRECON_H
#define POISSONSURFACE_POISSONRECON_H
int poissonRecon( int argc , char** argv);
int poisson(const char *input_file_name, const char *output_filename, int depth=10);
#endif //POISSONSURFACE_POISSONRECON_H
|
MrCocoaCat/slambook | Reconstruction/class2-structure_from_motion/robust_matcher.h | //
// Created by swayfreeda on 17-10-31.
//
#ifndef FEATURES_AND_MATCHING_ROBUST_MATCHER_H
#define FEATURES_AND_MATCHING_ROBUST_MATCHER_H
#include <opencv2/features2d.hpp>
#include <opencv2/core/cvstd.hpp>
class RobustMatcher{
public:
RobustMatcher(float ratio=0.8):lowe_ratio_(ratio){}
static cv::Ptr<Robust... |
MrCocoaCat/slambook | Reconstruction/class6-mesh_generation/class6-mesh_generation/mesh_generation/include/igit_mesh_generation.h | <filename>Reconstruction/class6-mesh_generation/class6-mesh_generation/mesh_generation/include/igit_mesh_generation.h<gh_stars>1-10
#ifndef IGIT_MESH_GENERATION_H
#define IGIT_MESH_GENERATION_H
#include"data_type.h"
#include"triangle.h"
#include<pthread.h>
#include <QVector2D>
#include<QVector>
typedef PointXYZRGBNo... |
MrCocoaCat/slambook | Reconstruction/class6-mesh_generation/class6-mesh_generation/mesh_generation/include/data_type.h | <gh_stars>1-10
#ifndef DATA_TYPE_H
#define DATA_TYPE_H
#include"stdlib.h"
#include"algorithm"
#include"cmath"
#include<vector>
#include"cmath"
#include"opencv2/opencv.hpp"
#include <iostream>
#include <string>
#include<QSet>
#include<qvector.h>
#include<qcolor.h>
#include <QtGui/QImage>
//#include<qglviewer.h>
#inclu... |
MrCocoaCat/slambook | project/0.2/include/myslam/visual_odometry.h | <gh_stars>1-10
/*
* <one line to give the program's name and a brief idea of what it does.>
* Copyright (C) 2016 <copyright holder> <email>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatio... |
MrCocoaCat/slambook | Reconstruction/class6-mesh_generation/class6-mesh_generation/mesh_generation/include/igit_dataIO.h | <reponame>MrCocoaCat/slambook
// 04/12/2015
// by suiwei
// opeartions about saving to PLY files or Load Points from PLY files
// ply files may be different accroding to the type of the points, e.g., three atrributes, color, normal, or poistions
// and also mesh should be considered.
#ifndef IGIT_DATAIO_H
#define IGI... |
MrCocoaCat/slambook | Reconstruction/class2-structure_from_motion/bal_problem.h | <filename>Reconstruction/class2-structure_from_motion/bal_problem.h
// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2015 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided ... |
MrCocoaCat/slambook | ch3/useEigen/hw.h | <reponame>MrCocoaCat/slambook
//
// Created by liyubo on 12/15/17.
//
#ifndef USEEIGEN_HW_H
#define USEEIGEN_HW_H
#endif //USEEIGEN_HW_H
void homework(); |
MrCocoaCat/slambook | Reconstruction/class2-structure_from_motion/functions.h | <gh_stars>1-10
//
// Created by swayfreeda on 17-10-24.
//
#ifndef FEATURES_AND_MATCHING_FUNCTIONS_H
#define FEATURES_AND_MATCHING_FUNCTIONS_H
#include "robust_matcher.h"
#include <opencv/cv.hpp>
// 输入两幅图像,检测特征点并进行匹配
void features_and_matching(const cv::Mat &img1
,const cv::Mat& img2
... |
MrCocoaCat/slambook | Reconstruction/class4_code-features_and_matching/functions.h | <reponame>MrCocoaCat/slambook
//
// Created by swayfreeda on 17-10-24.
//
#ifndef FEATURES_AND_MATCHING_FUNCTIONS_H
#define FEATURES_AND_MATCHING_FUNCTIONS_H
#include <opencv/cv.hpp>
bool refine_matches_via_homography(const std::vector<cv::KeyPoint> & keypts1
,const std::vector<cv::K... |
MrCocoaCat/slambook | ch3/useGeometry/hw.h | <reponame>MrCocoaCat/slambook<filename>ch3/useGeometry/hw.h
//
// Created by liyubo on 12/15/17.
//
#ifndef GEOMETRY_HW_H
#define GEOMETRY_HW_H
#endif //GEOMETRY_HW_H
void hw(); |
MrCocoaCat/slambook | Reconstruction/class6-mesh_generation/class6-mesh_generation/poisson/src/surfaceTrimmer.h | <gh_stars>1-10
//
// Created by sway on 17-8-1.
//
#ifndef POISSONSURFACE_SURFACETRIMMER_H
#define POISSONSURFACE_SURFACETRIMMER_H
int surfaceTrimmer(const char *input_file_name, const char *output_file_name);
#endif //POISSONSURFACE_SURFACETRIMMER_H
|
jiangjiang09081/code | Sources/Classes/TestViewController.h | <gh_stars>0
//
// TestViewController.h
// Demo
//
// Created by jiang on 2020/3/16.
// Copyright © 2020 jiang. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface TestViewController : UIViewController
- (void)testData:(NSString *)title;
- (void)refreshData:(NSString *)data;
@end
... |
XinweiHsu/FastCAE_Ubuntu20 | Code/DataProperty/PropertyList.h | /*********************
属性列表
需要在属性框显示的数据类都需要继承此类
**********************/
#ifndef PROPERTYLIST_H
#define PROPERTYLIST_H
#include "DataPropertyAPI.h"
#include <QList>
#include <QString>
#include <QColor>
//#include "PropertyPoint.h"
namespace DataProperty
{
class PropertyBase;
class DATAPROPERTYAPI P... |
XinweiHsu/FastCAE_Ubuntu20 | Code/HeuDataSrcIO/ReadData_LSDyna.h | <filename>Code/HeuDataSrcIO/ReadData_LSDyna.h
#ifndef READDATALSDYNA_H
#define READDATALSDYNA_H
#include "ReadData_Base.h"
#include "vtkDataSetReader.h"
#include "vtkUnstructuredGrid.h"
#include "vtkPointData.h"
#include "vtkStructuredGrid.h"
#include "vtkDataSet.h"
#include "vtkDataArray.h"
#include "vtkRectilinearGr... |
XinweiHsu/FastCAE_Ubuntu20 | Code/ConfigOptions/ConfigDataBase.h | #ifndef CONFIGDATABASE_H
#define CONFIGDATABASE_H
#include "ConfigOptionsAPI.h"
namespace ConfigOption
{
class BCConfig;
class DataConfig;
class GlobalConfig;
class GeometryConfig;
class MeshConfig;
class PostConfig;
class SolverOption;
class ObserverConfig;
class MaterialConfig;
class Proje... |
XinweiHsu/FastCAE_Ubuntu20 | Code/DataProperty/modelTreeItemType.h | <reponame>XinweiHsu/FastCAE_Ubuntu20
#ifndef _MODELTREEITEMTYPE_H_
#define _MODELTREEITEMTYPE_H_
#include <QString>
#include "DataPropertyAPI.h"
enum ProjectTreeType
{
UnDefined = -1,
TreeType = 0,
PluginDefType = 100,
TreeTypeBoundary = 100000,
};
enum TreeItemType
{
Undefined = -1,
Geome... |
XinweiHsu/FastCAE_Ubuntu20 | Code/GraphicsAnalyse/pickcurvedockwidget.h | #ifndef PICKCURVEDOCKWIDGET_H
#define PICKCURVEDOCKWIDGET_H
#include <QDockWidget>
#include "CurveAnalyse/curve_mainwindow.h"
class pickCurveDockWidget : public QDockWidget
{
Q_OBJECT
public:
explicit pickCurveDockWidget(QWidget *parent = 0);
~pickCurveDockWidget();
void setDiaplayCurveName(QString tep... |
XinweiHsu/FastCAE_Ubuntu20 | Code/Gmsh/PhysicalsGroups.h | <reponame>XinweiHsu/FastCAE_Ubuntu20<gh_stars>1-10
#ifndef PHYSICALSGROUPS_H
#define PHYSICALSGROUPS_H
#include <QString>
#include <QHash>
namespace Geometry
{
class GeometrySet;
}
namespace Py
{
class PythonAagent;
}
enum Physicals
{
PhysicalsNone = 0,
PhysicalPoint,
physicalCurve,
PhysicalSuface,
PhysicalS... |
XinweiHsu/FastCAE_Ubuntu20 | Code/Gmsh/DialogPhysicalsSetting.h | #ifndef DIALOGPHYSICALSSETTTING_H
#define DIALOGPHYSICALSSETTTING_H
#include "PhysicalsGroups.h"
#include <QDialog>
#include <QTableWidget>
namespace Ui {
class DialogPhysicalsSetting;
}
namespace Geometry
{
class GeometrySet;
}
namespace GUI{
class MainWindow;
}
namespace MainWidget{
class PreWindow;
}
class ... |
XinweiHsu/FastCAE_Ubuntu20 | Code/Gmsh/DialogSolidMesh.h | #ifndef DIALOGSOLIDMESH_H_
#define DIALOGSOLIDMESH_H_
#include "GmshDialogBase.h"
/*#include "GmshModuleAPI.h"*/
#include <QMultiHash>
namespace Ui
{
class SolidMeshDialog;
}
namespace Geometry
{
class GeometrySet;
class GeometryData;
}
namespace Py
{
class PythonAagent;
}
namespace Data... |
XinweiHsu/FastCAE_Ubuntu20 | Code/Gmsh/DialogLocalFields.h | #ifndef DIALOGLOCALFIELDS_H
#define DIALOGLOCALFIELDS_H
#include <QDialog>
#include "LocalField.h"
#include <QListWidgetItem>
namespace Ui {
class DialogLocalFields;
}
namespace GUI
{
class MainWindow;
}
namespace MainWidget
{
class PreWindow;
}
namespace GeometryWidget
{
class GeoPointWidget;
}
namespace Gmsh{... |
XinweiHsu/FastCAE_Ubuntu20 | Code/GraphicsAnalyse/PipelineObjPlotForm.h | #ifndef PIPELINEOBJPLOTFORM_H
#define PIPELINEOBJPLOTFORM_H
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL2);
VTK_MODULE_INIT(vtkInteractionStyle);
VTK_MODULE_INIT(vtkRenderingFreeType);
//VTK_MODULE_INIT(vtkRenderingContextOpenGL2);
VTK_MODULE_INIT(vtkRenderingVolumeOpenGL2);
VTK_MODULE_INIT(vtkR... |
XinweiHsu/FastCAE_Ubuntu20 | Code/GeometryWidgets/dialogMakeFillHole.h | #ifndef DIALOG_MAKEFILLHOLE_H_
#define DIALOG_MAKEFILLHOLE_H_
#include "geoDialogBase.h"
#include <QMultiHash>
//class vtkActor;
class TopoDS_Shape;
namespace Ui
{
class FillHoleDialog;
}
namespace Geometry
{
class GeometrySet;
}
namespace GeometryWidget
{
class GEOMETRYWIDGETSAPI MakeFillHoleDialog : public ... |
XinweiHsu/FastCAE_Ubuntu20 | Code/MainWidgets/DialogCreateSet.h | #ifndef DIALOGCREATESET_H
#define DIALOGCREATESET_H
#include "mainWidgetsAPI.h"
#include "SelfDefObject/QFDialog.h"
#include "moduleBase/ModuleType.h"
#include <QString>
class vtkDataSet;
namespace GUI
{
class MainWindow;
}
namespace Ui
{
class CreateSetDialog;
}
namespace MeshData
{
class... |
ruanyz/QT-tct-server2client | client.h | #ifndef CLIENT_H
#define CLIENT_H
#include <QDialog>
#include <QTcpSocket>
#include <QDateTime>
namespace Ui {
class client;
}
class client : public QDialog
{
Q_OBJECT
public:
explicit client(QWidget *parent = 0);
~client();
private:
Ui::client *ui;
QTcpSocket *cSocket;
QDateTime current_da... |
ruanyz/QT-tct-server2client | widget.h | #ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QMessageBox>
#include <QDebug>
#include <QDateTime>
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = 0);
~Widget();
private:
U... |
esmeagol/Tweety | Pods/Target Support Files/Pods-tweety/Pods-tweety-umbrella.h | <gh_stars>1-10
#import <UIKit/UIKit.h>
FOUNDATION_EXPORT double Pods_tweetyVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_tweetyVersionString[];
|
anshulpaigwar/carla | LibCarla/source/carla/sensor/data/ActorDynamicState.h | <gh_stars>1-10
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#pragma once
#include "carla/geom/Transform.h"
#include "carla/geom/Vector3D.h"... |
anshulpaigwar/carla | Unreal/CarlaUE4/Plugins/Carla/Source/Carla/OpenDriveActor.h | <reponame>anshulpaigwar/carla<gh_stars>1-10
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#pragma once
#include "CoreMinimal.h"
#include "Ga... |
anshulpaigwar/carla | Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Actor/ActorBlueprintFunctionLibrary.h | // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#pragma once
#include "Carla/Actor/ActorDefinition.h"
#include "Carla/Actor/ActorDescription.h... |
balassy/solar-wifi-weather-station | blynk-client.h | <filename>blynk-client.h
#include <Arduino.h>
#ifndef blynk_client_h
#define blynk_client_h
class BlynkClient {
public:
void setAuthToken(const char* authToken);
void waitUntilConnected();
void sendUpdate(float temperature, float humidity, float voltage);
void handleLoop();
};
#endif /* blynk_client_h */ |
balassy/solar-wifi-weather-station | ota-updater.h | #include <Arduino.h>
#ifndef ota_updater_h
#define ota_updater_h
#include "ifttt-client.h"
#include "status-led.h"
extern const char* IFTTT_WEBHOOK_EVENT_NAME;
class OTAUpdater {
public:
void initialize(const char* hostName, const char* password, IftttClient &ifttt, StatusLed &statusLed);
void handleUpdateRequ... |
balassy/solar-wifi-weather-station | rgb-led.h | <reponame>balassy/solar-wifi-weather-station
#include <Arduino.h>
#ifndef rgb_led_h
#define rgb_led_h
enum LedColor {
Red,
Green,
Blue,
Orange,
Purple,
Cyan,
White
};
class RgbLed {
public:
void setPins(uint8_t redPin, uint8_t greenPin, uint8_t bluePin);
void turnOn(LedColor color);
void turnOff... |
balassy/solar-wifi-weather-station | magicmirror-client.h | #include <Arduino.h>
#ifndef magicmirror_client_h
#define magicmirror_client_h
class MagicMirrorClient {
public:
void setHostUrl(String hostUrl);
void sendTemperature(float temperature, float humidity, float voltage);
private:
String _hostUrl;
};
#endif /* magicmirror_client_h */ |
balassy/solar-wifi-weather-station | status-led.h | #include <Arduino.h>
#include "rgb-led.h"
#ifndef status_led_h
#define status_led_h
class StatusLed {
public:
void setPins(uint8_t redPin, uint8_t greenPin, uint8_t bluePin);
void onBootStarted();
void onBootEnded();
void onWebrequestStarted();
void onWebrequestEnded();
void onMeasurementStarted();
voi... |
balassy/solar-wifi-weather-station | ifttt-client.h | #include <Arduino.h>
#ifndef ifttt_client_h
#define ifttt_client_h
class IftttClient {
public:
void setApiKey(String apiKey);
void setDeviceName(String deviceName);
void triggerEvent(String eventName, String title, String message);
private:
String _apiKey;
String _deviceName;
void trigger... |
liuxiao916/HLRobot_gazebo | hlrobot_gazebo/cubicTrajectoryPlanning/include/genTraj.h | #pragma once
#include <iostream>
#include <eigen3/Eigen/Dense>
#include "HLrobotconfig.h"
using namespace std;
using namespace Eigen;
typedef Matrix<double, 8, 1> Vector8d;
Vector4d cubic(double qo, double dqo, double qf, double dqf, double td);
Vector8d multipoints_cubic(double qo, double dqo, double qv, double qf... |
liuxiao916/HLRobot_gazebo | hlrobot_gazebo/cubicTrajectoryPlanning/include/HLrobotconfig.h | <gh_stars>1-10
#ifndef ROBOTCONFIG_H_
#define ROBOTCONFIG_H_
#include "eigen3/Eigen/Dense"
#include <vector>
#include <iostream>
using namespace std;
using namespace Eigen;
typedef Matrix<double, 6, 1> Vector6d;
typedef Matrix<double, 6, 6> Matrix6d;
const double PI = 3.1415926;
namespace HLRobot
{
//Inverse kinema... |
liuxiao916/HLRobot_gazebo | hlrobot_gazebo/cubicTrajectoryPlanning/include/motionPlan.h | #pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <eigen3/Eigen/Dense>
#include "HLrobotconfig.h"
#include <vector>
#include "genTraj.h"
using namespace Eigen;
using namespace std;
using namespace HLRobot;
typedef Matrix<double, 6, 1> Vector6d;
class motionPlan
{
public:
motionPlan();
... |
eriwen/dashpebble | src/util.c | <gh_stars>1-10
#include "util.h"
#define INT_DIGITS 5
char *itoa(int i) {
/* Room for INT_DIGITS digits, - and '\0' */
static char buf[INT_DIGITS + 2];
char *p = buf + INT_DIGITS + 1; /* points to terminating '\0' */
if (i >= 0) {
do {
*--p = '0' + (i % 10);
i /= 10;
} while (i != 0);
r... |
eriwen/dashpebble | src/config.h | <reponame>eriwen/dashpebble
#ifndef CONFIG_H
#define CONFIG_H
#define UNIT_SYSTEM "auto"
#define DAY_NAME_LANGUAGE DAY_NAME_ENGLISH
#define MONTH_NAME_LANGUAGE MONTH_NAME_ENGLISH
char *DAY_NAME_ENGLISH[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
char *MONTH_NAME_ENGLISH[] = {"JAN", "FEB", "MAR", "APR", "M... |
eriwen/dashpebble | src/util.h | <reponame>eriwen/dashpebble
#ifndef UTIL_H
#define UTIL_H
char* itoa(int i);
#endif
|
eriwen/dashpebble | src/dashpebble.c | <reponame>eriwen/dashpebble<filename>src/dashpebble.c<gh_stars>1-10
#include "pebble.h"
static Window *window;
static TextLayer *hour_layer;
static TextLayer *minute_layer;
static TextLayer *day_layer;
static TextLayer *date_layer;
static TextLayer *month_layer;
static TextLayer *icon_layer;
static TextLayer *tempera... |
normanrink/cfdlang | src/include/Runtime/TensorCodeGen.h | <reponame>normanrink/cfdlang
#ifndef __TENSOR_CODEGEN_H__
#define __TENSOR_CODEGEN_H__
#include <string>
#include "AST/AST.h"
#include "CodeGen/CodeGen.h"
#include "CodeGen/CEmitter.h"
#include "Parse/Parser.h"
#include "Runtime/TensorContext.h"
#include "Sema/Sema.h"
class TensorCodeGen {
private:
const std::s... |
normanrink/cfdlang | src/include/Operators/Scalar.h | <reponame>normanrink/cfdlang<gh_stars>1-10
#ifndef __OPERATORS_SCALAR_H__
#define __OPERATORS_SCALAR_H__
#include <ostream>
#include <string>
#include "Operators/Forwards.h"
namespace Operators {
template<typename Derived>
class Scalar {
using This = Scalar<Derived>;
const std::string name;
const Derived ... |
normanrink/cfdlang | src/include/CodeGen/GraphCodeGen.h | <reponame>normanrink/cfdlang<filename>src/include/CodeGen/GraphCodeGen.h
#ifndef __GRAPH_CODEGEN_H__
#define __GRAPH_CODEGEN_H__
#include <list>
#include <set>
#include <utility>
#include <vector>
#include "AST/AST.h"
#include "CodeGen/Comparable.h"
#include "CodeGen/CodeGen.h"
#include "CodeGen/ExprTree.h"
#includ... |
normanrink/cfdlang | src/include/Operators/Forwards.h |
#ifndef __OPERATORS_FORWARDS_HPP__
#define __OPERATORS_FORWARDS_HPP__
#include <map>
#include <vector>
#define EMIT_INDENT(indent, os) { os.width((indent)); \
os << std::left << ""; \
os.unsetf(std::ios::adjustfield); }
#define PER_LEVEL_INDENT (2)... |
normanrink/cfdlang | src/include/Operators/Operator.h |
#ifndef __OPERATORS_OPERATOR_H__
#define __OPERATORS_OPERATOR_H__
#include <assert.h>
#include <ostream>
#include "Operators/Forwards.h"
namespace Operators {
template<typename DerivedM>
class Operator<1, DerivedM> {
using This = Operator<1, DerivedM>;
const DerivedM m;
public:
Operator(const DerivedM &m... |
normanrink/cfdlang | src/include/Operators/Operators.h |
#ifndef __OPERATORS_OPERATORS_H__
#define __OPERATORS_OPERATORS_H__
#include "Operators/Forwards.h"
#include "Operators/ExprVisitor.h"
#include "Operators/Expr.h"
#include "Operators/Tensor.h"
#include "Operators/Matrix.h"
#include "Operators/Operator.h"
#include "Operators/Scalar.h"
#endif /* __OPERATORS_OPERATORS... |
normanrink/cfdlang | src/include/Parse/Lexer.h |
#ifndef __LEXER_H__
#define __LEXER_H__
#include <fstream>
#include <map>
#include <string>
#include "lang.tab.hh"
namespace CFDlang {
class Lexer {
private:
const char *Input;
yyscan_t Scanner;
YYSTYPE Val;
public:
Lexer(const char *input);
~Lexer();
int lex();
yyscan_t getScanner() const { r... |
normanrink/cfdlang | src/include/AST/AST.h | <reponame>normanrink/cfdlang
#ifndef __AST_H__
#define __AST_H__
#include <string>
#include <vector>
#include <cassert>
#include <map>
namespace CFDlang {
class ASTVisitor;
class ASTNode {
public:
enum NodeType {
NT_Program,
NT_DeclList,
NT_StmtList,
NT_ExprList,
/* declarations: */
... |
normanrink/cfdlang | src/include/CodeGen/ExprTree.h |
#ifndef __EXPR_TREE_H__
#define __EXPR_TREE_H__
#include <set>
#include <string>
#include <vector>
#include <cassert>
#include <map>
#include "CodeGen/CodeGen.h"
#include "Sema/Symbol.h"
namespace CFDlang {
class ExprTreeVisitor;
class ExprTreeTransformer;
class ExprNode {
public:
enum ExprKind {
EK_Add,... |
normanrink/cfdlang | src/include/CodeGen/StackExprRemover.h | <filename>src/include/CodeGen/StackExprRemover.h
#ifndef __STACK_EXPR_REMOVER_H__
#define __STACK_EXPR_REMOVER_H__
#include <list>
#include <map>
#include <string>
#include "CodeGen/CodeGen.h"
#include "CodeGen/ExprTree.h"
namespace CFDlang {
// This class removes stack expressions and replaces
// them with inde... |
normanrink/cfdlang | src/include/Operators/Tensor.h | <reponame>normanrink/cfdlang
#ifndef __OPERATORS_TENSOR_H__
#define __OPERATORS_TENSOR_H__
#include <assert.h>
#include <ostream>
#include "Operators/ExprVisitor.h"
#include "Operators/Forwards.h"
namespace Operators {
template<>
class Tensor<1> {
using This = Tensor<1>;
const std::string name;
const int... |
normanrink/cfdlang | src/include/Operators/ExprLowering.h |
#ifndef __OPERATORS_EXPR_LOWERING_H__
#define __OPERATORS_EXPR_LOWERING_H__
#include <assert.h>
#include <ostream>
#include <set>
#include <sstream>
#include <vector>
#include "AST/AST.h"
#include "Operators/ExprVisitor.h"
namespace Operators {
typedef std::vector<int> Indices;
class ExprLowering : public Expr... |
normanrink/cfdlang | src/include/Parse/Parser.h |
#ifndef __PARSER_H__
#define __PARSER_H__
#include "AST/AST.h"
#include "Parse/Lexer.h"
namespace CFDlang {
class Parser {
private:
Lexer lexer;
const Program *ast;
public:
Parser(const char *input)
: lexer(input) {}
~Parser() {}
int parse();
const Program *getAST() const { return ast; }
};
}... |
normanrink/cfdlang | src/include/AST/ProductRightAssoc.h |
#ifndef __PRODUCT_RIGHT_ASSOC_H__
#define __PRODUCT_RIGHT_ASSOC_H__
#include <list>
#include <map>
#include <set>
#include <vector>
#include "AST/AST.h"
namespace CFDlang {
class ProductRightAssoc : public ASTVisitor {
private:
const ASTNode *curResult;
public:
const Program *run(const Program *p);
virtu... |
normanrink/cfdlang | src/include/CodeGen/IdFinder.h |
#ifndef __ID_FINDER_H__
#define __ID_FINDER_H__
#include <string>
#include "CodeGen/CodeGen.h"
#include "CodeGen/ExprTree.h"
namespace CFDlang {
class IdFinder : public ExprTreeVisitor {
private:
const ExprNode *Root;
bool Incompatible;
std::string NameToFind;
bool Found;
bool IdIncompatible;
public:... |
normanrink/cfdlang | tests/test.utilities.h |
#ifndef __TEST_UTILITIES_H__
#define __TEST_UTILITIES_H__
#include <stdio.h>
static inline
void print_matrix_mxn(const double *matrix, const int m, const int n) {
for (int i0 = 0; i0 < m; i0++) {
for (int i1 = 0; i1 < n; i1++) {
printf("%6.2f ", matrix[i1 + n*(i0)]);
}
printf("\n");
}
printf... |
normanrink/cfdlang | src/include/Runtime/TensorKernel.h | <reponame>normanrink/cfdlang
#ifndef __TENSOR_KERNEL_H__
#define __TENSOR_KERNEL_H__
#include <map>
#include <string>
#include "Runtime/TensorContext.h"
class TensorKernel {
public:
typedef void (*CodePtr)(void **);
static unsigned UNKNOWN_FORMAL_ARG;
private:
TensorContext *Context;
const TensorContex... |
normanrink/cfdlang | src/include/CodeGen/ParentFinder.h |
#ifndef __PARENT_FINDER_H__
#define __PARENT_FINDER_H__
#include "CodeGen/CodeGen.h"
#include "CodeGen/ExprTree.h"
namespace CFDlang {
class ParentFinder : public ExprTreeVisitor {
private:
const ExprNode *Root;
const ExprNode *NodeToFind;
const ExprNode *Parent;
bool Found;
public:
ParentFinder(cons... |
normanrink/cfdlang | src/include/Runtime/TensorContext.h | <reponame>normanrink/cfdlang<filename>src/include/Runtime/TensorContext.h
#ifndef __TENSOR_CONTEXT_H__
#define __TENSOR_CONTEXT_H__
#include <unistd.h>
#include <sys/types.h>
#include <map>
#include <string>
#include "AST/AST.h"
class TensorCodeGen;
class TensorKernel;
class TensorExecution;
class TensorConte... |
normanrink/cfdlang | src/include/CodeGen/ContractionExprCounter.h | <reponame>normanrink/cfdlang
#ifndef __CONTRACTION_EXPR_COUNTER_H__
#define __CONTRACTION_EXPR_COUNTER_H__
#include <map>
#include <string>
#include "CodeGen/CodeGen.h"
#include "CodeGen/ExprTree.h"
namespace CFDlang {
class ContractionExprCounter : public ExprTreeVisitor {
private:
const ExprNode *Root;
un... |
normanrink/cfdlang | src/include/CodeGen/CodeGen.h |
#ifndef __CODEGEN_H__
#define __CODEGEN_H__
#include <list>
#include <map>
#include <string>
#include <vector>
#include "Sema/Sema.h"
#include "Sema/TensorType.h"
namespace CFDlang {
class ExprNode;
class ExprNodeBuilder;
class CodeGen : public ASTVisitor {
public:
// a program consists of delcared identifie... |
normanrink/cfdlang | src/include/CodeGen/TensorGraph.h | <filename>src/include/CodeGen/TensorGraph.h
#ifndef __TENSOR_GRAPH_H__
#define __TENSOR_GRAPH_H__
#include <fstream>
#include <map>
#include <utility>
#include <vector>
#include "CodeGen/Comparable.h"
namespace CFDlang {
template<typename NodeID, typename EdgeID> class GraphEdge;
template<typename NodeID, typena... |
normanrink/cfdlang | src/include/Operators/Expr.h |
#ifndef __OPERATORS_EXPR_H__
#define __OPERATORS_EXPR_H__
#include <assert.h>
#include <ostream>
#include "Operators/Forwards.h"
namespace Operators {
template<typename S, typename T, typename Derived>
class Binary {
const S lhs;
const T rhs;
const Derived &getAsDerived() const {
auto cast = static_ca... |
normanrink/cfdlang | src/include/Runtime/TensorExecution.h | <filename>src/include/Runtime/TensorExecution.h
#ifndef __TENSOR_EXECUTION_H__
#define __TENSOR_EXECUTION_H__
#include <string>
#include <vector>
#include "Runtime/TensorContext.h"
class TensorExecution {
public:
typedef void * ArgPtr;
private:
TensorContext *Context;
const TensorContext::KernelHandle The... |
normanrink/cfdlang | src/include/Runtime/TensorWrappers.h |
#ifndef __TENSOR_WRAPPERS_H__
#define __TENSOR_WRAPPERS_H__
typedef unsigned long handle;
typedef int Flag;
void TensorInitContext(handle *h_ctx);
void TensorFinalContext(handle *h_ctx);
void TensorInitCodeGen(handle *h_ctx, handle *h_cg,
const char *source,
const Fl... |
normanrink/cfdlang | src/include/Sema/Sema.h | <reponame>normanrink/cfdlang<gh_stars>1-10
#ifndef __SEMA_H__
#define __SEMA_H__
#include <list>
#include <map>
#include <set>
#include <vector>
#include "AST/AST.h"
#include "Sema/Symbol.h"
#include "Sema/TensorType.h"
namespace CFDlang {
class Sema : public ASTVisitor {
private:
const TensorType *scalar;
s... |
normanrink/cfdlang | src/include/Sema/TensorType.h |
#ifndef __TENSOR_TYPE_H__
#define __TENSOR_TYPE_H__
#include <vector>
#include <string>
namespace CFDlang {
class TensorType {
private:
std::vector<int> Dims;
public:
TensorType() {}
TensorType(const std::vector<int> &dims)
: Dims(dims) {}
void addDim(int dim) { Dims.push_back(dim); }
int getRank(... |
normanrink/cfdlang | src/include/CodeGen/TheanoEmitter.h |
#ifndef __THEANO_EMITTER_H__
#define __THEANO_EMITTER_H__
#include <list>
#include <string>
#include "CodeGen/DirectCodeGen.h"
#include "CodeGen/ExprTree.h"
#include "CodeGen/GraphCodeGen.h"
namespace CFDlang {
class TheanoEmitter : public ExprTreeVisitor {
private:
CodeGen *CG;
const std::string ModulePref... |
normanrink/cfdlang | src/include/Operators/ExprPrinter.h |
#ifndef __OPERATORS_EXPR_PRINTER_H__
#define __OPERATORS_EXPR_PRINTER_H__
#include <ostream>
#include "Operators/ExprVisitor.h"
namespace Operators {
class ExprPrinter : public ExprVisitor<ExprPrinter> {
std::ostream &os;
public:
ExprPrinter(std::ostream &os) : os(os) {}
template<typename S, typename T>
... |
normanrink/cfdlang | src/include/CodeGen/CEmitter.h |
#ifndef __C_EMITTER_H__
#define __C_EMITTER_H__
#include <list>
#include <vector>
#include <string>
#include "CodeGen/CodeGen.h"
#include "CodeGen/ExprTree.h"
#include "Sema/TensorType.h"
namespace CFDlang {
class CEmitter : public ExprTreeVisitor {
private:
CodeGen *CG;
const std::string FPTypeName;
con... |
normanrink/cfdlang | src/include/CodeGen/Comparable.h |
#ifndef __COMPARABLE_H__
#define __COMPARABLE_H__
#include <sstream>
#include <string>
#include "AST/AST.h"
namespace CFDlang {
template<typename Derived>
class Comparable {
public:
virtual bool operator==(const Derived &rhs) const = 0;
virtual bool operator!=(const Derived &rhs) const {
return !(*this =... |
normanrink/cfdlang | src/include/Sema/Symbol.h | <filename>src/include/Sema/Symbol.h
#ifndef __SYMBOL_H__
#define __SYMBOL_H__
#include <map>
#include <string>
#include "AST/AST.h"
#include "Sema/TensorType.h"
namespace CFDlang {
class Symbol {
public:
enum SymbolKind {
SK_Variable,
SK_Type,
SK_SYMBOLKIND_COUNT
};
private:
const SymbolKind ... |
normanrink/cfdlang | src/include/CodeGen/DirectCodeGen.h |
#ifndef __DIRECT_CODEGEN_H__
#define __DIRECT_CODEGEN_H__
#include <map>
#include <string>
#include "AST/AST.h"
#include "CodeGen/CodeGen.h"
#include "CodeGen/ExprTree.h"
namespace CFDlang {
class DirectCodeGen : public CodeGen {
public:
DirectCodeGen(const Sema *sema, const std::string &functionName);
virt... |
normanrink/cfdlang | src/include/Operators/Matrix.h | <gh_stars>1-10
#ifndef __OPERATORS_MATRIX_HPP__
#define __OPERATORS_MATRIX_HPP__
#include <ostream>
#include <string>
#include "Operators/Forwards.h"
namespace Operators {
template<typename Derived>
class MatrixBase {
using This = MatrixBase<Derived>;
const std::string name;
const int m, n;
const Deriv... |
normanrink/cfdlang | src/include/CodeGen/ExprTreeLifter.h | <filename>src/include/CodeGen/ExprTreeLifter.h
#ifndef __EXPR_TREE_LIFTER_H__
#define __EXPR_TREE_LIFTER_H__
#include <functional>
#include <list>
#include <string>
#include "CodeGen/CodeGen.h"
#include "CodeGen/ExprTree.h"
namespace CFDlang {
// This class can lift nodes out of expression trees and replace them... |
normanrink/cfdlang | src/include/Operators/ExprVisitor.h | <gh_stars>1-10
#ifndef __OPERATORS_EXPR_VISITOR_H__
#define __OPERATORS_EXPR_VISITOR_H__
#include "Operators/Forwards.h"
namespace Operators {
template<typename Derived>
class ExprVisitor {
Derived &getAsDerived() {
auto cast = static_cast<Derived *>(this);
return *cast;
}
public:
template<typename S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.