text stringlengths 3.08k 12.5k |
|---|
//
// 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 and the following disclaimer.
// * Redistributions in bin... |
/*******************************************************************/
/* */
/* ADOBE CONFIDENTIAL */
/* _ _ _ _ _ _ _ _ _ _ _ _ _ */
/* ... |
/*
Copyright (c) 2012 <NAME>, <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 and the following d... |
#include <cstdlib>
#include <iostream>
#include "vm.hpp"
#include "objectmemory.hpp"
#include "gc_marksweep.hpp"
#include "builtin/class.hpp"
#include "builtin/fixnum.hpp"
#include "builtin/tuple.hpp"
namespace rubinius {
/* ObjectMemory methods */
ObjectMemory::ObjectMemory(STATE, size_t young_bytes):
sta... |
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2017,2018 by the GROMACS development team.
* Copyright (c) 2019,2020,2021, by the GROMA... |
/*
* GeometryFunctions.cpp
*
* Created on: Jun 20, 2014
* Author: mgazzola
*/
#include "GeometryFunctions.h"
// Given a set of points x[3], it constructs a set of frames
// that are aligned with the tangent of the curve expressed by x[3]
std::vector<Matrix3> alignFrames(const std::vector<Vector3> &x,
... |
#include "Viewport.h"
#include "Model.h"
#include "Game.h"
using namespace df;
Viewport::Viewport() {
preferred_size = Vec2d(800, 600);
scale = Vec3d(1, 1, 1);
fill = false;
}
void Viewport::run(float delta_time) {
Vec2d self_position, self_size;
self_position = requestPosition();
self_size = requestSize();
... |
#include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
class graph {
private:
friend class partitions;
int vertices; //Number of vertices
int edges; //Number of edges
public:
//The index of the vector adjacncyList represents the vertex, I am assuming the ver... |
/**
* @file impl_bridge.h
* @author <NAME>
* @version 0.1
* @date 2019-05-27
* @brief Main module, loads config, starts handler
*
* @attention
*
* <h2><center>© Copyright (c) 2019 University of West Bohemia in Pilsen
* All rights reserved.</center></h2>
*
* Developed by:
* The Sm... |
#include "canvas.h"
#include "tile_canvas.h"
#include "common.h"
#include <cmath>
#define PROGMEM
#include "fonts/Picopixel.h"
#include "fonts/Org_01.h"
#include "icons.h"
static uint8_t cmdListBuffer[1024];
static CommandList cmdList(cmdListBuffer, sizeof(cmdListBuffer));
constexpr int16_t TILE_W = 64;
constexpr i... |
#include <iostream>
#include <iomanip>
#include "LATfield2.hpp"
using namespace LATfield2;
#define TOLERANCE 1.0e-10
double chop(const double val, const double tol)
{
if (val > tol || val < -tol) return val;
else return 0.;
}
int main(int argc, char **argv)
{
int n,m;
int BoxSize = 64;
int halo = 1;
... |
#include "graph_samples.h"
#include "Adafruit_GFX.h"
#include "Fonts/ClearSans-Medium-12pt7b.h"
#include "Fonts/ClearSans-Medium-8pt7b.h"
#include "Fonts/Picopixel.h"
#include "epd2in7b.h"
constexpr int16_t kGraphXstart = 2;
constexpr int16_t kGraphYstart = EPD_HEIGHT - 2;
int16_t GraphSamples::ValueToVerticalPixel(... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "statelib.h"
// #define DEEP_DEBUG_READ
// #define DEBUG_READ
#define DEBUG_TEST
int line_number;
const char* fname;
int NextLeftBracket(FILE* in)
{
for (;;) {
int c = fgetc(in);
if ('['==c) return c;
if (EOF==c) return c;
if ('\n... |
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sys/stat.h>
#include "../../include/CommonFuncs.hpp"
#include "../../include/ColorDefs.hpp"
#include "../../include/UTFChars.hpp"
#include "../../include/ProjectManagement/ProjectData.hpp"
#include "../../include/ProjectManagement/... |
#include "aquila/global.h"
#include "aquila/source/SignalSource.h"
#include "aquila/transform/FftFactory.h"
#include "aquila/source/WaveFile.h"
#include <algorithm>
#include <functional>
#include <memory>
#include <iostream>
#include <cstdlib>
#include "FFTreader.hpp"
using namespace std;
#define abs_amp 80000
#define... |
#include "StdAfx.h"
#include "Pipe.h"
CPipe::CPipe(void)
{
m_hPipe = INVALID_HANDLE_VALUE;
m_bLoop = false;
m_RecvCallback = NULL;
m_nBuffSize = 0;
}
CPipe::CPipe(LPCWSTR lpName, int nBuffSize, bool bCreate)
{
m_hPipe = INVALID_HANDLE_VALUE;
m_bLoop = false;
m_RecvCallback = NULL;
m_nBuffSize = nBuffSize;
if... |
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
const int NUMENTEROS = 10;
const int VALMAX = 100;
const int VALMIN = 1;
const int PALABRASCOLUMNA = 10;
const int MAXINTENTOS = 7;
int leerOpcion(std::string const & pregunta, std::string const & mensajeError, int opmin, int opmax) {
int op... |
//## 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:
//##
//## 1. Redistributions of source code must retain the above copyright
//## notice, this lis... |
#include <gtest/gtest.h>
#include "pathway.h"
using namespace pathway;
TEST(Runtime, VectorAddScalar)
{
auto a = vector_constructor<3>::make(1, 2, 3);
auto b = a + 5;
EXPECT_EQ(b.at<0>(), 6);
EXPECT_EQ(b.at<1>(), 7);
EXPECT_EQ(b.at<2>(), 8);
}
TEST(Runtime, VectorSubScalar)
{
auto a = vector_construct... |
// Copyright (c) 2013 <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, distri... |
/*
* Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
*
* 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 r... |
// Copyright (C) 2019 by <NAME>, Rector and Visitors of the
// University of Virginia, University of Heidelberg, and University
// of Connecticut School of Medicine.
// All rights reserved.
// Copyright (C) 2017 - 2018 by <NAME>, Virginia Tech Intellectual
// Properties, Inc., University of Heidelberg, and University ... |
#include "modulefinder.hpp"
#include "options.hpp"
#include "symbolize.hpp"
#include "scope.hpp"
using namespace sentry;
static std::vector<Value> find_stacktraces_in_event(Value event) {
std::vector<Value> rv;
Value stacktrace = event.get_by_key("stacktrace");
if (stacktrace.type() == SENTRY_VALUE_TYPE... |
/*
SerialControl.cpp - Library for implementing basic robot Moves using Serial Comands
Created by <NAME>, May 3, 2021
Relised into the public domain
Methods description:
ShowInfo - return about message to serial
ReadCommand - implements simple read and parse the comand from serial
*/
#include ... |
#include "gtest/gtest.h"
#include "jsontype/Root.hpp"
#include <string>
#include <cstdint>
#include <iostream>
#include <utility>
using namespace jsontype;
namespace
{
struct city_tag : Tag<city_tag> { static constexpr const auto name() { return "city"; } };
JSONTYPE_MAKE_TAG(name);
JSONTYPE_MAKE_TAG(state);
JSON... |
#include <dirent.h>
#include <unistd.h>
#include <string>
#include <vector>
#include "linux_parser.h"
#include "format.h"
using std::stof;
using std::string;
using std::to_string;
using std::vector;
// DONE: An example of how to read data from the filesystem
string LinuxParser::OperatingSystem() {
string line;
s... |
/*
//@HEADER
// ************************************************************************
//
// KokkosKernels 0.9: Linear Algebra and Graph Kernels
// Copyright 2017 Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retain... |
#include "util/CpuLoadMeter.h"
#include <gtest/gtest.h>
#include <cmath>
using namespace daisy;
TEST(util_CpuLoadMeter, a_stateAfterInit)
{
CpuLoadMeter meter;
meter.Init(48000.0f, 32);
EXPECT_TRUE(std::isnan(meter.GetMinCpuLoad()));
EXPECT_TRUE(std::isnan(meter.GetMaxCpuLoad()));
EXPECT_TRUE(std:... |
/*
* Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on
* the source.
*/
/*
* $Logfile: /Freespace2/code/Network/multi_ping.cpp $
* $Revision: 110 $... |
#include <ros/ros.h>
#include <nav_msgs/Odometry.h>
#include <geometry_msgs/PoseStamped.h>
#include <sensor_msgs/Imu.h>
#include <tf/transform_broadcaster.h>
std::string g_odometry_topic;
std::string g_pose_topic;
std::string g_imu_topic;
std::string g_frame_id;
std::string g_tf_prefix;
std::string g_footprint_frame_i... |
#include <list>
#include "brainHat.h"
#include "OpenBCIFileWriter.h"
#include "StringExtensions.h"
#include "TimeExtensions.h"
#include "BFSample.h"
#include <iomanip>
#include "FileExtensions.h"
#include "BoardIds.h"
using namespace std;
// Constructor
//
OpenBCIFileWriter::OpenBCIFileWriter(RecordingStateChang... |
//===- tools/dump/switches.cpp --------------------------------------------===//
//* _ _ _ *
//* _____ _(_) |_ ___| |__ ___ ___ *
//* / __\ \ /\ / / | __/ __| '_ \ / _ \/ __| *
//* \__ \\ V V /| | || (__| | | | __/\__ \ *
//* |___/ \_/\_/ |_|\__\___|_| |_|\___||___/ *
//* ... |
#include "BinaryAPI.hpp"
#include "BinaryApiEasy.hpp"
#include "ZstdEasy.hpp"
#define BUILD_VER 1.3
using json = nlohmann::json;
void save_json(std::string file_name, json &j);
void open_json(std::string file_name, json &j);
std::vector<std::string> get_all_symbols_binary();
void user_function_quotes_ticks(std::st... |
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com
#include "Memory.h"
#include "Memoryapi.h"
#include <psapi.h>
#include <tlhelp32.h>
#include <iostream>
#undef PROCESSENTRY32
#undef Proces... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* ... |
//
// GLBackendInput.cpp
// libraries/gpu/src/gpu
//
// Created by <NAME> on 3/8/2015.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "GLBackendShared.h"
using names... |
#include "mypanelopengl.h"
#include <cmath>
#include <iostream>
using std::cout;
using std::endl;
MyPanelOpenGL::MyPanelOpenGL(QWidget *parent)
: QOpenGLWidget(parent), m_angles(0., 0., 0.) {
for (int i = 0; i < NUM_PROGS; i++) {
m_shaderPrograms[i] = nullptr;
m_vertexShaders[i] = nullptr;
m_fragme... |
// Copyright (C) 2010-2015 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
#include <iostream>
#inc... |
#include <assert.h>
#include <sstream>
#include "auto_update_window.hpp"
#include "filesystem.hpp"
#include "json_parser.hpp"
#include "surface.hpp"
#include <SDL_image.h>
#include <SDL_ttf.h>
namespace {
TTF_Font* get_updater_font() {
static int res = TTF_Init();
static TTF_Font* f = TTF_OpenFont("data/fonts/open... |
#include <cassert>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <cstring>
#include <queue>
using namespace std;
const int MAXN = 100000;
int now;
struct Inc {
int k, v, t;
Inc(int k_=0, int v_=0, int t_=0): k(k_), ... |
/// @file tstbbcapture.cc
///
/// @copyright (c) 2014 CSIRO
/// Australia Telescope National Facility (ATNF)
/// Commonwealth Scientific and Industrial Research Organisation (CSIRO)
/// PO Box 76, Epping NSW 1710, Australia
/// <EMAIL>
///
/// This file is part of the ASKAP software distribution.
///
/// The ASKAP soft... |
/**
* Lidsky citelna predpoved z https://alojz.cz/praha
*/
#include <Arduino.h>
#include "PredpovedAlojz.h"
#include "DataAplikace.h"
#include "src/fonts/fonts.h"
// maximalni stari dat v sekundach
#define DATA_MAX_AGE 14400
PredpovedAlojz::PredpovedAlojz( raLogger * logger, raConfig * config, DataAplikace * d... |
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright 2021 XIA LLC, All rights reserved.
*
* 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/LICE... |
#include "CIMitar.hpp"
#include <timezoneapi.h>
using namespace CIMitar;
static constexpr void FromMI(Interval& cimint, const MI_Interval& miint)
{
cimint.Days = miint.days;
cimint.Hours = miint.hours;
cimint.Minutes = miint.minutes;
cimint.Seconds = miint.seconds;
cimint.Microseconds = miint.microseconds;
}
In... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <array>
#include <cstddef>
#include <optional>
#include "DataStructures/Tensor/TypeAliases.hpp"
#include "Domain/CoordinateMaps/Distribution.hpp"
#include "Parallel/PupStlCpp17.hpp"
#include "Utilities/TypeTraits/RemoveRefere... |
#include "AppClass.h"
void Application::InitVariables(void)
{
//Change this to your name and email
m_sProgrammer = "<NAME> - <EMAIL>";
//Set the position and target of the camera
m_pCameraMngr->SetPositionTargetAndUpward(vector3(5.0f,3.0f,15.0f), ZERO_V3, AXIS_Y);
m_pModel = new Simplex::Model();
m_pModel->Load... |
#include "server/potatodb.hpp"
#include "server/client_socket.hpp"
#include "server/system_catalog.hpp"
#include "parser/sql_parser.hpp"
#include "plans/plan_factory.hpp"
#include "spdlog/spdlog.h"
#include "spdlog/sinks/basic_file_sink.h"
sptr<spdlog::logger> logger =
spdlog::basic_logger_mt("basic_logger", "logs... |
/*
* Copyright (C) 2013-2015 <NAME> (<EMAIL>)
* Copyright (C) 2013-2015 <NAME> (<EMAIL>)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain t... |
/***************************************************************************
* Copyright (C) by <NAME> *
* *
* You can redistribute and/or modify this program under the *
* terms of the... |
#include "bignum.h"
#include "utils.h"
#include "../luabind.h"
#include <new>
static const char* mt_name = "llae.crypto.Bignum";
Bignum::Bignum() : m_num(BN_new()) {
}
Bignum::~Bignum() {
BN_free(m_num);
}
void Bignum::clear(lua_State* L) {
BN_clear(m_num);
}
int Bignum::import(lua_State* L) {
Bignum* self = B... |
/*
* Copyright (c) 1993-1997, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission... |
// Quaternion.cpp - quaternion rep & op
#include <float.h>
#include "Quaternion.h"
const int X = 0, Y = 1, Z = 2;
#define _PI 3.141592f
Quaternion::Quaternion(vec3 axis, float radAng) {
float c = cos(radAng/2), s = sin(radAng/2);
vec3 a = normalize(axis);
x = s*a.x; y = s*a.y; z = s*a.z; w = c;
}
Quater... |
#include "../fixtures/util.hpp"
#include "../fixtures/fixture_log_observer.hpp"
#include <mbgl/map/map.hpp>
#include <mbgl/map/still_image.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/io.hpp>
#include <rapidjson/document.h>
#include <rapidjson/writer.h>
#include <rapidjson/stringbuffer.h>
#include <mbgl/p... |
/*
Copyright 2017 <NAME>
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 to in writing, softw... |
#include <EditorFrameworkPCH.h>
#include <EditorFramework/EditorApp/EditorApp.moc.h>
#include <QStyleFactory>
#include <QtGlobal>
void ezQtEditorApp::SetStyleSheet()
{
QApplication::setStyle(QStyleFactory::create("fusion"));
QPalette palette;
//Generic
palette.setColor(QPalette::AlternateBase, QColor(24, 24,... |
/*
* $Id: testWaterPDSS.cpp,v 1.2 2006/07/11 17:13:44 hkmoffa Exp $
*/
#include "stdio.h"
#include "ct_defs.h"
#include "ctexceptions.h"
#include "global.h"
#include "xml.h"
#include "ctml.h"
#include "WaterPDSS.h"
#include "ThermoPhase.h"
#include <new>
using namespace std;
using namespace Cantera;
d... |
#include <Core/HeapAllocator.h>
#include <Core/Log.h>
#include <Core/Memory.h>
#include <Core/Pointer.h>
#include <Core/Assert.h>
#include <Core/Constants.h>
namespace
{
struct Header
{
// The unaligned memory
//
void* memory = nullptr;
// Unaligned memory size
//
size_t size = 0;
};
... |
#include "simple-OSC.h"
OSCMessage::OSCMessage()
{
setupMessage();
}
OSCMessage::OSCMessage(const char * address)
{
setupMessage();
outputAddress = address;
}
void OSCMessage::setupMessage()
{
incomingBuffer = NULL;
inputDatas = NULL;
incomingBufferSize = 0;
outputDatas = NULL;
outpu... |
/*
* Author: <NAME> <<EMAIL>>
* Copyright (c) 2015 - 2016 Intel Corporation.
*
* 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 r... |
/*
* Ths code in this file is part of tcptrack. For more information see
* http://www.rhythm.cx/~steve/devel/tcptrack
*
* Copyright (C) <NAME> - 2003
*
* tcptrack 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... |
#include "GUI/src/main_menu.h"
#include "GUI/src/config.h"
#include "GUI/src/assets.h"
#include "GUI/src/utility.h"
#include "ThirdParty/imgui/imgui-SFML.h"
#include <utility>
void MainMenu::InitializeRulesList(Rules &&rules) {
rules_ = std::move(rules);
SetInitialRule(rules_.front());
}
SimulatorState MainM... |
#include "matrix3.h"
#include "matrix2.h"
Matrix3::Matrix3() {
for (int i = 0; i < height; ++i)
for (int j = 0; j < width; ++j)
set(j,i, 0);
}
Matrix3::Matrix3(float a,float b,float c,float d,float e,float f,float g, float h, float i) {
set(0,0,a);
set(0,1,b);
set(0,2,c);
... |
#include "PostureClassify.h"
#include <fstream>
#include <iostream>
#include <memory>
#include <string>
#include <stdexcept>
#include <vector>
#include <cassert>
#include <ctime>
#include <cmath>
#include "dlog.h"
#include "utils.h"
#include "IResultReporter.h"
#include "TripleBuffer.hpp"
#include "opencv2/core/type... |
/*
* Copyright (c) 2014 <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:
*
* 1.Redistributions of source code must retain the above copyright notice,
* this list of conditions... |
#include "SearchController.h"
#include <angles/angles.h>
#include <ros/ros.h>
SearchController::SearchController() {
rng = new random_numbers::RandomNumberGenerator();
currentLocation.x = 0;
currentLocation.y = 0;
currentLocation.theta = 0;
goal_id = rng->uniformInteger(8,20);
centerLocation.x = 0;
cen... |
#include "MenuScene.h"
#include "GameManager.h"
USING_NS_CC;
//CMenuScene's Constructor
CMenuScene::CMenuScene()
{
m_pcSettingDialog = nullptr;
m_pcMenuLabel = nullptr;
}
//CMenuScene's Destructor
CMenuScene::~CMenuScene()
{
if (m_pcSettingDialog)
{
delete m_pcSett... |
#include "LeftBar.h"
#include "../../Chkdraft.h"
enum_t(Id, u32, {
IDR_MAIN_TREE,
IDR_LEFT_BAR,
IDR_MINIMAP
});
LeftBar::~LeftBar()
{
}
bool LeftBar::CreateThis(HWND hParent)
{
return RegisterWindowClass(0, NULL, LoadCursor(NULL, IDC_ARROW), CreateSolidBrush(RGB(240, 240, 240)), NULL, "LeftBar", NUL... |
// working with triangle using vector
// using functions to divide the solution to the problem
#include <iostream>
#include <fstream>
#include <cmath>
#include <string>
#include <cassert>
#include <sstream>
#include <iomanip>
#include <vector>
using namespace std;
// function prototypes
bool validTriangle(const vecto... |
//display kinect depth in real-time
#define INFO
#define TIMER
#define _USE_MATH_DEFINES
#include <GL/glew.h>
#include <cuda_gl_interop.h>
#include <cuda_runtime_api.h>
#include <iostream>
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include <boost/random.hpp>
#include <boost/generator_itera... |
//
// wirelessly connected cloud (Wireless Mesh Networking)
//
//
// Conversations about the ROOT @ SEMA storage, Seoul
//
//
// 2021 02 15
//
// (part-2) teensy35 : 'client:osc' (osc over slip --> mesh post)
//
//arduino
#include <Arduino.h>
//osc (already included in "framework-arduinoteensy")
#include <OSCBundle... |
/*
Copyright (C) 2008 by <NAME>
<EMAIL>
BSD License
*/
#include <linux/input.h>
#include <linux/uinput.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include "device.h"
Device::Device(bool touchscreen, int touchscreen_max_x, int touchscre... |
/*
Copyright 2021 Simon (psyomn) Symeonidis
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 to in... |
/*
MIT License
Copyright (c) 2021 <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... |
#include<array>
#include<algorithm>
#include<bitset>
#include<iostream>
#include<utility>
#include<vector>
using namespace std;
class input;
typedef unsigned long long N;
typedef input input_t;
N mul(N x, N y) {
return (x * y) % 1000000007;
}
N factor(N value) {
N result = 1;
while (1 < value) {
result =... |
#include "core.h"
#include "path3D.h"
#include <Physics3D/math/constants.h>
#define DEFAULT_PATTERN_3D(color) [color] (int i, const Vec3f& p) { return color; }
namespace P3D::Graphics {
namespace Path3D {
//! Batch
Graphics::Batch<Vertex>* batch = nullptr;
void bind(Graphics::Batch<Vertex>* batch) {
Path3D:... |
#include <functional>
#include <algorithm>
#include <iostream>
#include <GLFW/glfw3.h>
#include <ezn_window.h>
#include <ezn_input.h>
namespace ezn
{
constexpr int keyStateSizeInBits = sizeof(uint64_t) * 8;
constexpr int keyStateIndex(int key){ return key / keyStateSizeInBits; }
constexpr int keyBit(int key){ return... |
#include "SnakePlusPlus.h"
Snake::Snake(Game &game, Board &board, Position pos, int bodySize, COLORREF color):
mGame(game),
mBoard(board),
mPos(pos),
mColor(color)
{
if(bodySize < 1) bodySize = 1;
for (int i = 0; i <= bodySize; i++, pos.x--){
mBoard.set(pos, Board::Snake);
... |
/*
* Copyright 2003-2006, Haiku, Inc.
* Distributed under the terms of the MIT license.
*
* Authors:
* <NAME> (<EMAIL>)
* <NAME>
*
* Description: An abstract base class for option controls.
*/
#include <OptionControl.h>
#include <cstring>
/*! \brief Creates and initializes a BOptionControl.
\param fram... |
#include <fstream>
#include <iomanip>
#include <cmr/total_unimodularity.hpp>
#include <cmr/matroid_decomposition.hpp>
#include "gen_generic.hpp"
#include "gen_cycle_violator.hpp"
#include "gen_network.hpp"
#include "gen_random.hpp"
bool extract_option(char c, bool& randomize, bool& sign, tu::log_level& level, bool& ... |
#define N_IMPLEMENTS TFont
//-------------------------------------------------------------------
// font.cpp
// (C) 2002 R.Predescu
//-------------------------------------------------------------------
#include "guide/font.h"
#include "guide/osincludes.h"
#include "guide/debug.h"
#include <fstream>
#include <iostrea... |
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. 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. Redistributio... |
#include "common.h"
// ST PATTY
DEFINE_GRADIENT_PALETTE( bhw2_greenman_gp ) {
0, 1, 22, 1,
130, 1,168, 2,
255, 1, 22, 1
};
void st_patty(){
uint8_t BeatsPerMinute = 62;
CRGBPalette16 palette = bhw2_greenman_gp;
uint8_t beat = beatsin8( BeatsPerMinute, 64, 255);
for( int i = 0; i < NU... |
/*
Copyright 2017-present <NAME> (AI-TOOLKIT), All Rights Reserved
You may use this file only if you agree to the software license:
AI-TOOLKIT Open Source Software License - Version 2.1 - February 22, 2018:
https://ai-toolkit.blogspot.com/p/ai-toolkit-open-source-software-license.html.
Also included with the source... |
/*
Copyright (c) 2014-2017 Maximus5
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 conditions and the followin... |
////////////////////////////////////////////////////////////////////////////////
// //
// Name: TossToys_NoFit.cxx //
// ... |
#include <iostream>
#include <algorithm>
#include <vector>
#include <list>
#include <numeric>
#include <stdexcept>
#include <cassert>
/********** Q4a: DAXPY **********/
template <typename T>
std::vector<T> daxpy(T a, const std::vector<T>& x, const std::vector<T>& y)
{
// TODO
size_t i=0;
std::vector<T> z(... |
#include "Helper.h"
void H::print_arr(std::vector< std::pair< std::vector< double >, size_t > > const& vec ) {
for (auto i = vec.begin(); i != vec.end(); ++i){
std::cout << "[";
print_vec(i->first);
std::cout << "], ";
}
std::cout << "\n";
}
bool H::intersection(value_t x_low, value_t x_high, ... |
#include "global.h"
#include "GameConstantsAndTypes.h"
#include "GameState.h"
#include "RageUtil.h"
#include "ThemeManager.h"
#include "EnumHelper.h"
#include "Foreach.h"
const char *RANKING_TO_FILL_IN_MARKER[NUM_PLAYERS] = {"#P1#","#P2#"};
static const CString RadarCategoryNames[NUM_RADAR_CATEGORIES] = {
"Stream",
... |
#include "orwell/support/GlobalLogger.hpp"
#include "orwell/game/Game.hpp"
#include "orwell/game/Landmark.hpp"
#include "orwell/game/RGBColour.hpp"
#include "orwell/com/Url.hpp"
#include "orwell/com/Receiver.hpp"
#include "orwell/com/RawMessage.hpp"
#include "server-game.pb.h"
#include "Common.hpp"
#include <log4cxx... |
// Copyright (c) 2020 <NAME>
// See LICENSE for details.
#include "common.h"
#include "task.h"
Task* Task::_task = NULL;
Task Task::_main;
uint16_t Task::prepare_to_suspend(uint16_t* save_reg) {
task_retval = 0;
task_reg_save = save_reg + REG_SP + 1; // SP save slot plus one
// A bit cumbersome; would ... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2004, 2005, 2006, 2007 <NAME>
Copyright (C) 2005, 2008 <NAME>
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is ... |
/*
* CE_Label.cpp
*
* Created on: Jun 3, 2013
* Author: joost
*/
#include "CE_Label.h"
#include <QMenu>
#include <QContextMenuEvent>
#include <QGraphicsProxyWidget>
size_t Label::labelsInMemory = 0;
Label::Label(QString text, QColor color, bool isDeleted):
color(color){
deleted = isDeleted;
labelName ... |
#include <iostream>
#include <time.h>
#include <conio.h>
using namespace std;
enum Dir {Stop = 0, Left = 1, UpLeft = 2, DownLeft = 3, Right = 4, UpRight = 5, DownRight=6};
class Ball {
private:
int x, y;
int originalX, originalY;
Dir direction;
public:
Ball(int posX, int posY) {
originalX = ... |
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2016-2021, Intel Corporation
//
// SPDX-License-Identifier: MIT
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////... |
//--------------------------------------------------------------------------------------
// Visualization.cpp
//
// Advanced Technology Group (ATG)
// Copyright (C) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#include "pch.h"... |
#include "options.h"
#include "error.h"
#include "data.h"
#include <stdio.h>
#include <string.h>
#include "assert.h"
#include "interface.h"
#define REPLAY_MAGIC_LE 0x524D4F4D
#define REPLAY_MAGIC_BE 0x4D4F4D52
/*
* Searches a buffer up until the buffer's end or an arbitrary
* maximum length, starting at an index in... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
// ----------------------------------------------------------------------------
// Copyright 2019-2020 ARM 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.ap... |
#include <pybind11/pybind11.h>
#include <pybind11/eigen.h>
#include <pybind11/stl.h>
#include <Eigen/Dense>
#include <unordered_map>
#include <utility>
#include <tuple>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include "tuple_hash.h"
using MatrixXi = Eigen::Matrix<long, Eigen::Dynamic, Eig... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.