text stringlengths 3.08k 22k |
|---|
// Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2018-2020 The HodlCash Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// clang-format off
#... |
/*
*/
#include "commands.h"
#include "adc_commands.h"
#include "pid_commands.h"
#include "board/mpins.h"
#include "power/power_reg.h"
#include "wake/wake.h"
#include "stdint.h"
#include <Arduino.h>
// Имя устройства
static constexpr char Info[] = {"Q920dn Rev0.0\n\0"}; //
// state1
bool switchStatus =... |
//
// Background Module
//
// generates a 2D image based on colors at the
// corners
//
// Converted from AVS5 - <NAME>, AVS Inc., May 2000
//
#include "xp_comm_proj/backgrnd/gen.hxx"
#include <math.h>
typedef struct {
float Red;
float Green;
float Blue;
} T_pixel;
void fast_inner_loop (unsigned char scanl... |
#include <cassert>
#include <cstring>
#include <cstdlib>
#define LUAAA_WITHOUT_CPP_STDLIB 1
#include "../luaaa.hpp"
#define LOG printf
#if defined(_MSC_VER)
# define strncpy strncpy_s
#endif
//===============================================================================
using namespace luaaa;
class MyType {... |
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
*... |
/* This example shows how to create a PE program file for Windows
*
* Instructions:
* 1. Compile and link this file with the COFFI library
* g++ writer.cpp -o writer_obj.exe
* 2. Execute the result file writer.exe
* writer.exe
* It will produce hello.exe
* 3. Run the result file:
* hello.exe
* ... |
#include "stdafx.h"
#include "game.h"
#include "score.h"
#include "gameMap.h"
#include "winChecker.h"
#include "levelProcessor.h"
#include "console.h"
#include <sys/timeb.h>
#include "unordered_map"
#include "PointsFactory.h"
#include "analyzer.h"
#include "comboResult.h"
#include "comboProcessor.h"
extern int boardSi... |
#ifdef WIN32
#include <windows.h>
#endif
#include "Frustum.h"
#include <GL/glut.h>
#include <GL/glu.h>
#include <iostream>
#include <math.h>
using namespace std;
/*
vec3 Frustum::Intersect2D(int id1, int id2) const {
vec3 p;
// p.y = (-frustum[id2][3]/frustum[id2][0] + frustum[id1][3]/frustum[id1][0]) / (-frustum[... |
//===-- BreakpointResolverFileLine.cpp ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
//%Header {
/*****************************************************************************
*
* File: src/GL/GLCommandHandler.cpp
*
* Author: <NAME> 2002-2005
*
* This file contains original work by <NAME>. The author and his
* employer (Mushware Limited) irrevocably waive all of their copyright rights
* vested... |
/**
* @file olgwidget.cpp
*
* @author <NAME>
* Contact: <EMAIL>
* @author <NAME>
* Contact: <EMAIL>
* @author <NAME>
* Contact: <EMAIL>
*/
#include "oglwidget.h"
#include <math.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <vector>
#include "readobj.h"
#include "chaik... |
#include <iomanip>
#include <cstring>
#include <fstream>
#include <vector>
#include <deque>
#include <algorithm>
#include <iostream>
#include "audio.h"
#include "implementation.h"
#if PLAIDGADGET
#include "../console/console.h"
#endif //PLAIDGADGET
#include "../thread/lockfree.h"
/*
Change this ... |
#include "jellium.hpp"
using namespace aquarius::input;
using namespace aquarius::task;
using namespace aquarius::op;
using namespace aquarius::tensor;
using namespace aquarius::symmetry;
namespace aquarius
{
namespace jellium
{
template <typename U>
Jellium<U>::Jellium(const string& name, Config& config)
: Task(nam... |
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURP... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <proxygen/lib/http/codec/compress/QPACKHeaderTable.h>
#include <glog/logging.h>
namespace ... |
#include "nash.h"
Nash::Nash(const char * prompt_, uint8_t busyLED) {
prompt = prompt_;
_busyLED = busyLED;
}
void
Nash::init(Executable *programs) {
_programs = programs;
/* GPIO */
pinMode(_busyLED, OUTPUT);
digitalWrite(_busyLED, OFF);
/* Initial Prompt */
_printPrompt();
}
void
Nash::_freeProcess(... |
#include <boost\filesystem.hpp>
#include <boost\lexical_cast.hpp>
#include "genetic_programming.h"
int Print(fstream &output_file, string &program, int node)
{
int node1 = 0, node2;
if (program[node] < FSET_START) {
if (program[node] <= num_vars)
output_file << "x" << (int)program[node];
else
output_file ... |
/*
* Pathtracer based on <NAME>'s 'Ray Tracing in One Weekend' e-book
* series.
*
* Copyright (C) 2017 by <NAME> - <EMAIL>
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
#include <cfloat>
#include "Rectangle.h"
#include "AABB.h"
bool XYRectangle::hit(const Ray &r_... |
#include "scanner.h"
#include "files.h"
string span::getStr() {
uInt start = sourceFile->lines[line - 1] + column;
return sourceFile->sourceFile.substr(start, length);
}
scanner::scanner(string _source, string _sourceName) {
curFile = new file(_source, _sourceName);
line = 1;
start = 0;
current = start;
curFil... |
#include "gpio.h"
#include "uart.h"
#include "config.h"
#include "debugwire.h"
#include "chipinfo.h"
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include <stdio.h>
#include <string.h>
enum class ReceiveState : uint8_t
{
Start,
Sequence,
SizeHigh,
S... |
#include "gm/sm2/PrivateKey.h"
#include <iostream>
#include <string.h>
#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/evp.h>
#include <openssl/obj_mac.h>
#include <fc/crypto/sha256.hpp>
#include <fc/crypto/base58.hpp>
#include "base/Hex.h"
#include "base/StringUtils.h"
#include "base/StringUtils.h"... |
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
using namespace std;
//Área de definição de cabeçalho de função.
void menuInicial();
void limpaTela(){
system("clear");
}
void iniciaTabuleiro(char tabuleiro[3][3]){
int linha, coluna;
//Navega por cada posição do tabuleiro e co... |
/* $Id: title_screen.cpp 48740 2011-03-05 10:01:34Z mordante $ */
/*
Copyright (C) 2008 - 2011 by <NAME> <<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 Foundation; either version 2 of the... |
#include "Command.h"
const char axisCodes[3] = { 'X', 'Y', 'Z' };
const char axisSpeedCodes[3] = { 'A', 'B', 'C' };
const char speedCode = 'S';
const char parameterIdCode = 'P';
const char parameterValueCode = 'V';
const char parameterValue2Code= 'W';
const char elementCode = 'E';
const char ... |
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "cinepak.h"
static void copyV4(uint8_t *dst, uint8_t y1, uint8_t y2, uint8_t u, uint8_t v) {
dst[0] = u;
dst[1] = y1;
dst[2] = v;
dst[3] = y2;
}
void CinepakDecoder::decodeFrameV4(Cinepak_YUV_Vector *v0, Cinepak_YUV_Vector *v1, Cinepak_YUV_Vecto... |
// TranslatorTestAddOn.cpp
#include <stdio.h>
#include <string.h>
#include <Translator.h>
#include <OS.h>
#include "TranslatorTestAddOn.h"
// ##### Include headers for your tests here #####
#include "bmptranslator/BMPTranslatorTest.h"
#include "pngtranslator/PNGTranslatorTest.h"
#include "stxttranslator/STXTTranslato... |
//
// Copyright (c) 2003-2010, MIST Project, Nagoya University
// 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... |
#include <Arduino.h>
#include <Credentials.h>
#include <Wire.h>
#include <Adafruit_BNO08x.h>
#ifdef ATWINC
#include <WiFi101.h>
#elif ESP32
#include <WiFi.h>
#endif
#include <PubSubClient.h>
#include <ArduinoJson.h>
const char* MQTT_ID = "ESP32PCB";
const int myID = 1;
const char* DATATOPICNAME = "data/accel1";
// #... |
#include "BKPrefsWindow.h"
#include <Rect.h>
#include <String.h>
#include <InterfaceDefs.h>
#include <Application.h>
#include <stdio.h>
#define WIDTH 518
#define HEIGHT 350
#define MAX_DIVIDE 6
BamKeysPrefsWindow::BamKeysPrefsWindow()
: BWindow(BRect(40, 30, 40 + WIDTH, 30 + HEIGHT), "BamKeys",
B_TITLED_WINDOW... |
// Author(s): <NAME>
// Copyright: see the accompanying file COPYING or copy at
// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
/// \file symbolic_re... |
#include "PixzFile.h"
#include "PathUtils.h"
#include <cassert>
#include <cstring>
#include <inttypes.h>
const uint64_t PixzFile::MemLimit = UINT64_MAX;
PixzFile::PixzFile( const std::string& path,
uint64_t maxBlock ) :
CompressedFile( path ),
mIndex( 0 )
{
try {
... |
#include <Arduino.h>
#include <Arduino_LSM9DS1.h>
bool isRunning= true;
volatile int counter = 0;
bool isOn = false;
volatile bool useAudio = false;
bool useIMU = true;
const int buzzerPin = 2;
const int buttonInteruptPin = 4;
int freq = 1000;
float x, y, z;
//sound code from https://github.com/suskind/arduino-knigh... |
#include "Poisson.h"
void Poisson::setOrig(const QImage &orig, const Eigen::Matrix<int, -1, -1>& mask) {
int w = mask.cols();
int h = mask.rows();
printf("Copy start\n");
assert(orig.width() == w + 2 && orig.height() == h + 2);
this->mask = mask;
this->orig = orig;
printf("Copy complete\n... |
#include <SignalManager.hpp>
#include <SignalObjectDoubles.hpp>
#include <SignalObjectBus.hpp>
#include <Console.hpp>
#include <Common.hpp>
#include <SimulinkInterface.hpp>
#include <GenericTarget.hpp>
std::atomic<bool> SignalManager::created = ATOMIC_VAR_INIT(false);
std::unordered_map<uint32_t, SignalObjectBase*> S... |
/*
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of t... |
#include <iostream>
#include <iomanip>
#include <ios>
#include <cstdint>
#include <opencv2/opencv.hpp>
#include "jelly/UioAccessor.h"
#include "jelly/UdmabufAccessor.h"
#include "jelly/JellyRegs.h"
#include "jelly/Imx219Control.h"
void capture_still_image(jelly::MemAccessor& reg_wdma, jelly::MemAccessor& reg_fmtr, ... |
// Program 1: Lab 3
// Name: <NAME>
// Class: COMP 2710
// Date: November 10, 2014
// E-Mail: <EMAIL>
//
// Description: .
#include <fstream>
#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
#include <cstdlib>
#include <stdio.h>
#include <time.h>
using name... |
// Copyright (c) 2009 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, d... |
/* ----------------------------------------------------------------------------
* Robotics Laboratory, Westphalian University of Applied Science
* ----------------------------------------------------------------------------
* Project : Stereo Vision Project
* Revision : 1.0
* Recent changes : 18.06.2014
... |
/*
* Copyright (C) 2018 ETH Zurich and University of Bologna
*
* 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/licenses/LICENSE-2.0
*
* Unless required by... |
/*
* Copyright (C) 2020 HERE Europe B.V.
*
* 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/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... |
//======== (C) Copyright 2002 <NAME> All rights reserved. =========
//
// The copyright to the contents herein is the property of <NAME>.
// The contents may be used and/or copied only with the written permission of
// <NAME>, or in accordance with the terms and conditions stipulated in
// the agreement/contract u... |
// Copyright (c) 2018, The Graft Project
//
// 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 of
// c... |
#include <iostream>
#include <unordered_map>
using namespace std;
class Hashtable_htoc {
unordered_map<int, char> hmap;
public:
void put(int key, char value) { // place, search for dupes. O(n)
for (auto it : hmap) {
if (it.first == key) { // if collision,
cout << "Key/value pair exists already... |
#include <unistd.h>
#include <iomanip>
#include <torch/torch.h>
#include <torch/script.h>
#include <torch/autograd.h>
#include <torch/utils.h>
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <tuple>
#include <random>
#include "../utils.h"
#include "../matplotlibcpp.h"
namespace plt = ma... |
/*
** Copyright (C) 2011 Centre for Bioinformatics, Biomarker Discovery and Information-Based Medicine
** http://www.newcastle.edu.au/research-centre/cibm/
**
** Code for Paper:
** FS-kNN: A Fast and Scalable kNN Computation Technique using GPU,
** <NAME>, <NAME>, <NAME>and <NAME>,
** Email: ASA∗ - <EMAIL>; CR - <EMAIL... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <cstddef>
#include <string>
#include "DataStructures/DataBox/Tag.hpp"
#include "DataStructures/Tensor/EagerMath/Magnitude.hpp"
#include "DataStructures/Tensor/TypeAliases.hpp"
#include "Domain/FaceNormal.hpp"
#include "Evolut... |
#include <cstring>
#include <thread>
#include <chrono>
#include <SDL.h>
#include "Rendering/BinkVideo.h"
#include "Audio/Audio.h"
#include "FFmpegUtil.h"
using namespace Sourcehold;
using namespace System;
using namespace Audio;
using namespace Rendering;
BinkVideo::BinkVideo() : Texture()
{
ic... |
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <map>
using namespace cv;
using namespace std;
const Point neighbors[8] = {Point(1, 0), Point(1, -1), Point(-1, -1), Point(-1, 0), Point(-1, 1), Point(0, 1),
Point(0, -1), Point(1, 1)};
const
string DetectShape(vector<Point> &shape, ... |
//=====================================================================
//
// test.cpp - kcp 测试用例
//
// 说明:
// gcc ikcp.c test.cpp -o test -lstdc++
//
//=====================================================================
#include <stdio.h>
#include <stdlib.h>
#include "test.h"
//#include "ikcp.c"
... |
#pragma once
#include "stdafx.h"
#include "Environment3D.h"
#include "ConfigFile.h"
#include "ConfigManager.h"
using namespace Urho3D;
Environment3D::Environment3D(Context * context) : Application(context), framecount_(0), time_(0), absolutePose(0, 0, 0), ballXYZtoArenaXYZ_(Matrix3::ZERO), ballXYZtoArenaYaw_(Vector3... |
// /*
// AUTHORS: <NAME>,<NAME>, <NAME>
// */
// #include <iostream>
// #include <string>
// #include <stdexcept>
// #include "FamilyTree.hpp"
// using namespace std;
// using namespace family;
// Tree::Tree(string nameYoung){ //constructor - the young!
// this->name = nameYoung;
// ... |
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2002 Ramshankar (aka Teknomancer).
// Copyright (c) 2011 <NAME>.
// All rights reserved.
#include "ArkInfoWindow.h"
#include "AppUtils.h"
#include "Archiver.h"
#include "BitmapPool.h"
#include "CommonStrings.h"
#include "HashTable.h"
#include "ListEntry.h"
#inc... |
/* -*-c++-*--------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: <NAME>, based on code by
* <NAME>, et al. (see THANKS for the full author list)
* See LICENSE for the license i... |
//使用尾插法插入单链表
#include <bits/stdc++.h>
using namespace std;
typedef int datatype;
typedef struct ONode{
datatype data;
struct ONode *next;
}ONode,*pointer;
pointer InitHead();
template <typename structType>
bool InsertMutiData(structType l,int i,int num); //插入多个数据
int GetData(pointer l,int i,int &e);
int Insert... |
/*
Cafu Engine, http://www.cafu.de/
Copyright (c) <NAME> and other contributors.
This project is licensed under the terms of the MIT license.
*/
/**************/
/*** Shader ***/
/**************/
// Required for #include <GL/gl.h> with MS VC++.
#if defined(_WIN32) && defined(_MSC_VER)
#define WIN32_LEAN_AND_MEAN
... |
#include "Application.h"
#include "MeshImporter.h"
#include "TextureImporter.h"
#include "GameObject.h"
#include "Importer.h"
#include "Libs/Assimp/include/cimport.h"
#include "Libs/Assimp/include/scene.h"
#include "Libs/Assimp/include/postprocess.h"
#pragma comment (lib, "Libs/Assimp/libx86/assimp.lib")
#include <m... |
/*****************************************************************************************[Circ.cc]
Copyright (c) 2007, <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
... |
// Copyright 2020 <NAME>, <EMAIL>.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
#include "StdAfx.h"
#include "UnitTestFrameWork.h"
#include <excpt.h>
#include <Shellapi.h>
#include <vector>
using std::vector;
void UnitTestSuite::RegisterTest(UnitTest * test, char * testName)
{
TestList * newTest = new TestList();
newTest->TestName = testName;
newTest->Test = test;
newTest->pNext = 0;
if (... |
#include <QApplication>
#include <QSettings>
#include <QPixmap>
#include <QBitmap>
#include <QCursor>
#include <QMessageBox>
#include <QJsonDocument>
#include <QtWebEngineWidgets/QWebEngineView>
#include <QtWebEngineWidgets/QWebEnginePage>
#include <QtWebEngineWidgets/QWebEngineProfile>
#include <QDebug>
#include ... |
#include "Hydra.h"
#include "Sprite.h"
#include <vector>
#include <unistd.h>
#include <stdio.h>
using namespace std;
using namespace Hydra;
enum dirs {left, right, up, down};
class ComicPanel
{
public:
ComicPanel();
int posX;
int posY;
int height;
int width;
float vel; //Speed when traveling... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "stdafx.h"
#include "IEditorTexture.h"
#include "MapFace.h"
#include "clipcode.h"
// memdbgon must be the last i... |
// Copyright 1996-2019 Cyberbotics Ltd.
//
// 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/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
#pragma once
#include "examples/message_router/client_impl.h"
#include <iostream>
#include <boost/beast/core.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/asio/strand.hpp>
#include <cstdlib>
#include <functional>
#include <memory>
#include <string>
#include <chrono>
#include <thread>
#include <fstream>
na... |
/*
* Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
*/
#include "ifmap/test/ifmap_xmpp_client_mock.h"
#include "xmpp/xmpp_config.h"
#include "xmpp/xmpp_channel.h"
#include "xmpp/xmpp_init.h"
using namespace std;
const string IFMapXmppClientMock::kDefaultXmppLocalAddr = "127.0.0.1";
const string IF... |
#include "iconupdater.h"
#include "aliendalvikwatcher.h"
#include "desktopentry.h"
#include "iconprovider.h"
#include "iconupdater_p.h"
#include <MDesktopEntry>
#include <MGConfItem>
#include <silicatheme.h>
#include <silicathemeiconresolver.h>
#include <sys/stat.h>
#include <QCollator>
#include <QCryptographicHash>
#i... |
#include<rexio/tk/toolkit.h++>
#include<iostream>
#include <fstream>
#include <sstream>
#include <rexio/glyphwidth.h++>
using namespace std;
using namespace Scr;
using namespace Scr::Tk;
static const wchar_t pointerSymbol = L'✛';
static const wchar_t longPointerSymbol = L'ー';
const DisplayStyle _INACTIVE_FRAME_COLOR... |
/*************************************************************************
* *
* Vega FEM Simulation Library Version 4.0 *
* *
* "rigidBodyDynamic... |
#include <Adafruit_MLX90640.h>
/*!
* @brief Instantiates a new MLX90640 class
*/
Adafruit_MLX90640::Adafruit_MLX90640(void) {}
/*!
* @brief Sets up the hardware and initializes I2C
* @param i2c_addr
* The I2C address to be used.
* @param wire
* The Wire object to be used f... |
// This is the MEX wrapper for kmeans provided by Si et al.
//
// Invocation form within Matlab:
// [idx centers] = mykmeans(data, k, maxiter, [weight])
//
// input arguments:
// data: the d by n sparse matrix.
// k : number of clusters.
// maxiter: number of iterations.
// weight (optional): n by 1 mat... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
const int sizeHashTable = 100;
const int MR[3] = {'M', 'r', '.'};
const int MRS[4] = {'M', 'r', 's', '.'};
int sizeArray = 0;
struct Book{
char* bookId;
char* nameBook;
char* authorName;
char* ISBN;
int totalPage;
};
struct Search{
bool isFound;
... |
/************************************************
Copyright (c) 2016, Xilinx, Inc.
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 copyrig... |
/**
* Copyright (c) 2015, <NAME>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions a... |
//
// vboLetter.cpp
// newFont
//
// Created by <NAME> on 10/10/2019.
//
#include "vboLetter.hpp"
void vboLetter::setup(){
float dpi = 300;
font.loadFont("fonts/Stockholm/Stockholm_Mono.ttf", dpi, true, true, true);
// gui
gui.sectionIntensity.resize(1);
gui.setup();
// letter
... |
#include "svg_chart.h"
#include <fstream>
#include <iomanip>
SvgChart::SvgChart(const SvgChart::Settings& settings) : settings_(settings) {
root_ = std::make_unique<svg::Svg>(
svg::CreateStandardSvgAttributes(settings_.image_size));
root_->children.push_back(std::make_unique<svg::Title>(settings_.title));
... |
/**
* The MIT License (MIT)
* Copyright (c) 2015 by <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy... |
/* Copyright 2017 <NAME>
This file is part of TopNetCpp, a translation and enhancement of
Fortran TopNet.
TopNetCpp 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 Foundation, either version 3 of the Li... |
//==- CATargetInfo.cpp - Crash Analyzer Target Information ------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===-------------------------... |
/*
Copyright (C) 2007 Coolsoft Company. All rights reserved.
http://www.coolsoft-sd.com/
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the
use of this software.
Permission is granted to anyone to use t... |
#include <vector>
#include <iostream>
#include <diy/mpi.hpp>
#include <diy/master.hpp>
#include <diy/assigner.hpp>
#include <diy/serialization.hpp>
#include <diy/reduce.hpp>
#include <diy/partners/merge.hpp>
#include "opts.h"
struct Block
{
Block(int c = 0): count(c) {}
int count;
int ... |
#include <assert.h>
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <math.h>
#include "factorize.h"
void test_round_sqrt() {
typedef Factorizer<uint_fast64_t> fzr_type;
fzr_type::test_round_sqrt();
}
struct MyPow {
uint_fast64_t prime;
uint_fast8_t exp;
};
struct MyFactors {
uint_fast8_t p... |
#include <stdio.h>
#include <stdint.h>
#include <iap.h>
#include "LPC11U6x.h"
//#include "PokittoDisk.h"
#define TICKRATE_HZ (10) /* 10 ticks per second */
/* SystemTick Counter */
static volatile uint32_t sysTick;
/* LPC1347 IAP entry address */
#define IAP_LOCATION 0x1fff1ff1
#define last_sector_flash 0x00038000 ... |
/*
* NeHe Lesson #24 - Tokens, Extensions, TGA Loading.
* <NAME> (<EMAIL>)
* Revisions: Rob "Kormoc" Smith, <EMAIL>
*/
#define GLUT_DISABLE_ATEXIT_HACK
#ifdef _WIN32 // Running on windows?
#include <windows.h> // Then include windows.h
#else //... |
/*
* LynxBot: a Twitch.tv IRC bot for Old School Runescape
* Copyright (C) 2016-2017 <NAME>
*/
#include <cpr/cpr.h>
#include <iostream>
#include <string>
#include <string.h>
#include <utils.h>
#include "config.h"
#include "lynxbot.h"
#include "option.h"
#include "TwitchBot.h"
#ifdef __linux__
# include <sys/types.... |
/*
MIT License
Copyright (c) 2022 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... |
// AUTO GENERATED by vnxcppcodegen
#include <mmx/package.hxx>
#include <mmx/Node_call_contract.hxx>
#include <mmx/Node_call_contract_return.hxx>
#include <mmx/addr_t.hpp>
#include <vnx/Value.h>
#include <vnx/Variant.hpp>
#include <vnx/vnx.h>
namespace mmx {
const vnx::Hash64 Node_call_contract::VNX_TYPE_HASH(0x6... |
#include "pch.h"
#pragma hdrstop
/*-----------------------------------------------------------------------------
/ Misc data
/----------------------------------------------------------------------------*/
static UINT g_cfDsPropPageInfo = 0;
#define PATH_IS TEXT("?path=")
#define PROPERTY_PAGE... |
/**************************************************************************\
* Copyright (c) <NAME> & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistribu... |
#include "socket.hh"
#include "exception.hh"
#include <cstddef>
#include <netinet/tcp.h>
#include <stdexcept>
#include <unistd.h>
using namespace std;
// default constructor for socket of (subclassed) domain and type
//! \param[in] domain is as described in [socket(7)](\ref man7::socket), probably `AF_INET` or `AF_... |
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <random>
#include <bits/stdc++.h>
#include <fstream>
#include <iomanip>
using namespace std;
typedef uint8_t aes_state[4][4];
static const uint8_t sbox[256] = {
//0 1 2 3 4 5 6 7 8 ... |
#include "include\Game.hpp"
/*
* this makes the time per frame constant so that we avoid unwanted results
*/
const sf::Time Game::TimePerFrame = sf::seconds(1.f / 60.f);
Game::Game()
/* And we start the "in-line" initializers */
: mWindow(sf::VideoMode(800, 800), "SFML Application")
, mView(mWindow.getDefaultVi... |
#include <uWS/uWS.h>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "Eigen-3.3/Eigen/Core"
#include "Eigen-3.3/Eigen/QR"
#include "helpers.h"
#include "json.hpp"
#include "spline.h"
// for convenience
using nlohmann::json;
using std::string;
using std::vector;
template<typename T>... |
//---------------------------------------------------------- -*- Mode: C++ -*-
// $Id$
//
// Created 2008/06/18
//
// Author: <NAME>
//
// Copyright 2008-2012,2016 Quantcast Corporation. All rights reserved.
//
// This file is part of Kosmos File System (KFS).
//
// Licensed under the Apache License, Version 2.0
// (th... |
#pragma once
constexpr uint32_t kMapMaxX = 32;
constexpr uint32_t kMapMaxY = 32;
uint32_t kMapX = 4;
uint32_t kMapY = 4;
static float kMapWidth = 0.f;
static float kMapHeight = 0.f;
constexpr float kTileWidth = 25.f;
constexpr float kTileHeight = 25.f;
constexpr float kTileDepth = 4.f;
constexpr int kMaxTileNeighbo... |
#include "pcapworker/pcapworker.hpp"
#define HAVE_REMOTE
#include <pcap.h>
#include <sys/types.h>
#include <winsock2.h>
#include <time.h>
#define SIZE_ETHERNET 14
#define ETHER_ADDR_LEN 6
#define SNAP_LEN 65536
// Data labels
#define IPSRC_LBL "Source IP\n"
#define IPDST_LBL "Destination IP\n"
#define SRC_PORT_LBL "S... |
#include "MicrocontrollerID.h"
/*
This function will provide the microcontroller's unique ID. If provided size is greater than microcontroller's ID size, then
it will be zero padded.
*/
void MicrocontrollerID::getUniqueID(uint8_t* id_out, int size){
if (size < IDSIZE){
_zeroPad(id_out, 0, size);
return;
}
#if d... |
#include <Arduino.h>
#include <arduinoFFT.h>
#include <analogWrite.h>
void setColorAndBrightness(uint16_t h, double s, double b);
void hsv2rgb(uint16_t h, uint32_t s, uint32_t v, int color[3]);
//FFT-MODE
#define SAMPLES 128 // Must be a power of 2
#define SAMPLING_FREQ 8500 // Hz, must be 40000 or less due to... |
// This code is based on the GLMLV Library
#include "SceneASSIMP.h"
#include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <algorithm>
#include <stack>
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#include <assimp/Importer.hpp>
#include <... |
#include "sparkle/controller.hh"
double min(double a, double b)
{
if (a >= b) { return b; }
else { return a; }
}
double max(double a, double b)
{
if (a >= b) { return a; }
else { return b; }
}
BaseController::BaseController(ros::NodeHandle *nh): nh(nh)
{
nh->param("ego_vel_topic", ego_vel_topic, std::string("vel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.