text stringlengths 3.08k 12.5k |
|---|
#include "CPUInfo.h"
#include <Utils/DebugHandler.h>
#ifdef _WIN32
#include <limits.h>
#include <intrin.h>
#else
#include <stdint.h>
#endif
using namespace std;
#define MAX_INTEL_TOP_LVL 4
class CPUID
{
u32 regs[4];
public:
explicit CPUID(unsigned funcId, unsigned subFuncId)
{
#ifdef _WIN32
_... |
/*
//
// Copyright (c) 1998-2019 <NAME>. All Right 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 co... |
// Copyright 2016-2021 <NAME> and Stratify Labs, Inc; see LICENSE.md
#include <fs.hpp>
#include <var.hpp>
#include "ux/TextFileArea.hpp"
#include "ux/TouchGesture.hpp"
#include "ux/draw/TextBox.hpp"
using namespace ux::sgfx;
using namespace ux;
TextFileArea::TextFileArea(const var::StringView name, const Construct ... |
/*
Copyright 2016-2019 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agree... |
#include "Car.h"
Car::Car(
float w,
float l,
float r,
unsigned long wheelPeriod,
Matrix<3> *desiredVelocity,
Matrix<3> *feedbackPose)
: period(wheelPeriod),
desiredCarVelocity(desiredVelocity),
feedbackCarPose(feedbackPose)
{
G = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,... |
#include "Graphics.hpp"
#define TRIANGLES_PER_POINT 3 // should be 2, but keeping it safer
#define VERTICES_PER_TRIANGLE 3
#define COORDS_PER_VERTEX 3 // which are x, y and color of each vertex
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
GraphicDriver::GraphicDriver(int maxPoints)
{
b... |
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#include "NetworkServices.h"
#include <iostream>
#include <winsock2.h>
#include <fstream>
#include <string>
using namespace std;
NetworkServices::NetworkServices()
{
//Initialise winsock
if (WSAStartup(MAKEWORD(2, 2), &wsa) != 0)
throw runti... |
#include "point.hpp"
#include <math.h>
/*
*
* Constructor
*
*/
point::point() {
this->x = 0;
this->y = 0;
this->z = 0;
}
point::point(int x, int y, int z) {
this->x = x;
this->y = y;
this->z = z;
}
point::point(const point& p) {
this->x = p.get_x();
this->y = p.get_y();
this->z = p.get_z();
}
/*
*
* ... |
#include "utils.h"
static QString gRclone;
static QString gRcloneConf;
static QString gRclonePassword;
// Software versions comparison
// source: https://helloacm.com/how-to-compare-version-numbers-in-c/
std::vector<std::string> split(const std::string &s, char d) {
std::vector<std::string> r;
int j = 0;
for (u... |
#include "mbed.h"
#include "WiflyInterface.h"
#include "nsdl_support.h"
#include "temperature.h"
#include "alarm_led.h"
#include "alarm_buzz.h"
#include "weight.h"
#include "C12832_lcd.h"
/*
*Main program for the SW project 2015 IoT coffee monitor application.
*HW is LPC1768 with mbed application board, a IR thermomet... |
#include <array>
#include <iostream>
#include <cmath>
#define _USE_MATH_DEFINES
#include "AdaptAbsReach.hh"
using namespace std;
using namespace scots;
using namespace helper;
#define dimX 6
#define dimU 3
#define M3l -3
#define M3u 3
#define M4l 0
#define M4u 5
#define M5l 0
#define M5u 5
const double w[dimX] = {... |
///////////////////////////////////////////////////////////////////////////////
// This source file is part of Hect.
//
// Copyright (c) 2016 <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 t... |
//
// Copyright © 2018 Sandcastle Software Ltd. All rights reserved.
//
// This file is part of 'Oaknut' which is released under the MIT License.
// See the LICENSE file in the root of this installation for details.
//
#include <oaknut.h>
static char encoding_table[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I'... |
#include "GLtoWX.h"
#include <stack>
#include <wx/dc.h>
struct matrix {
double sx,sy; // scale
double tx,ty; // translation
matrix():sx(1),sy(1),tx(0),ty(0){}
void scale(double x, double y) {
sx*=x;
sy*=y;
}
void translate(double x, double y) {
tx+=x*sx;
ty+=y*sy;
}
int x(double _x) { return int(_x*sx... |
#include "DroppedEggsCommand.h"
#include <sstream>
void DroppedEggsRconCommand(RCONClientConnection* rconClientConnection, RCONPacket* rconPacket, UWorld* uWorld)
{
FString msg = rconPacket->Body;
auto result = DroppedEggsInternal(&msg, ArkLibrary::GetCommand(CommandName_DroppedEggs_Rcon));
if (result.length() == ... |
#include "Minimap.h"
#include "Car.h"
#include "Road.h"
#include "Utils.h"
#include "MinimapUI.h"
#include "ModuleJson.h"
#include "ModuleTexture.h"
#include "ModuleRenderer.h"
using namespace std;
using namespace rapidjson;
Minimap::Minimap(const Road* road) :
road(road)
{
courseRect = COURSE_RECT;
}
Minimap::~M... |
#include "game.hpp"
using namespace std;
Game::Game(int gridSize, std::vector<Vector2D> replayFruits) : m_board(gridSize), m_score(0), m_moves(0), m_movesLeft(100), m_isDead(false), m_isReplay(false) {
Vector2D head;
head.setX(gridSize/2);
head.setY(gridSize/2);
m_snake.push(head + Vector2D(gridSize/... |
#include <fstream>
#include "btree2.hpp"
Btree2::Btree2() {
root_pointer = -1;
int i;
num_nodes = 0;
index_file = fopen("index_file2", "wb+");
for (i = 0; i < MAX_KEYS_2; i++) {
this->current_node.node_pointers[i] = -1;
strcpy(this->current_node.keys[i].key, "-1");
}
this->c... |
#include <iostream>
#include <fstream>
#include <string>
#include <numeric>
#include <vector>
#include <algorithm>
struct Line
{
Line(int x1, int x2, int y1, int y2) : minX(x1), maxX(x2), minY(y1), maxY(y2) {}
int minX, minY, maxX, maxY;
};
using Survey = std::vector <std::string>;
struct Ground
{
... |
/*
* Copyright (c) 2004-2006 Apple Computer, Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file exc... |
/*
ISC License
Copyright (c) 2016-2017, Autonomous Vehicle Systems Lab, University of Colorado at Boulder
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copie... |
// Copyright (c) 2013, <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 th... |
/*
* Copyright (C) 2016, 2017, 2018 Computer Graphics Group, University of Siegen
* Written by <NAME> <<EMAIL>>
*
* 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, in... |
////////////////////////////////////////////////////////////////////////////////
//
// Package: Kuon
//
// Library: libkuon
//
// File: kuonUtils.cxx
//
//
/*! \file
*
* $LastChangedDate: 2014-04-04 17:05:03 -0600 (Fri, 04 Apr 2014) $
* $Rev: 3629 $
*
* \brief Kuon utilities.
*
* \author <NAME> (<EMAIL>... |
#include <map>
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
#include "hub.h"
#include "message.h"
#include "polling/polling_thread.h"
#include "result.h"
#include "status.h"
#include "worker/worker_thread.h"
using std::endl;
using std::map;
using std::move;
using std::multim... |
/* Copyright 1986, 1989, 1990 by Abacus Research and
* Development, Inc. All rights reserved.
*/
#include <base/common.h>
#include <ProcessMgr.h>
#include <ResourceMgr.h>
#include <MemoryMgr.h>
#include <ToolboxEvent.h>
#include <mman/mman.h>
#include <rsys/process.h>
using namespace Executor;
#define declare_h... |
#include "bluetooth.h"
Bluetooth::Bluetooth()
{
}
void Bluetooth::init()
{
PhyphoxBLE::start("Tracer");
PhyphoxBleExperiment plotAccelGyro; //generate experiment on Arduino which plot random values
plotAccelGyro.setTitle("Tracer Plots");
plotAccelGyro.setCategory("Arduino Experiments");... |
/********************************************************************
Software License Agreement (BSD License)
Copyright (c) 2016, <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:
... |
#include "oscillator.hpp"
Oscillator::Oscillator(oscType initType, unsigned char initNote, unsigned int initFreq, unsigned int initDC, float initAmplitudeMax, unsigned int initAttack, unsigned int initDecay, float initSustainLevel, unsigned int initRelease, unsigned char initPortamentoNote, unsigned int initPortamento... |
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
#include "sholl_swc.h"
#include <vector>
#include <iostream>
#include <algorithm>
#include <math.h>
bool combine_linker(vector<QList<NeuronSWC> > & linker, QList<NeuronSWC> & combined)
{
V3DLONG neuronNum = linker.size();
if (neuronNum<=0)
{
cout<<"the linker file is empty, please check your data."<... |
// *****************************************************************************
// Copyright (C) 2018 <NAME> <<EMAIL>>
// *****************************************************************************
#include <chrono>
#include <atomic>
#include <signal.h>
#include "coretb.h"
#include "defines.h"
#include "aelf.h"
#in... |
#include <algorithm>
#include <iostream>
#include <unordered_map>
#include <string>
#include <tuple>
#include <vector>
static inline bool isCart(char c)
{
switch (c) {
case '<':
case '^':
case '>':
case 'v':
return true;
default:
return false;
}
}
struct Cart
{
int x;
int y;
char c;
int directio... |
#include <AP_Motors_L298N_3Wire_ABEncoder.h>
#include <AP_Math.h>
#include <AC_PID.h>
#include <stdio.h>
#include <string.h>
#include <entry.h>
#if MOTORS_L298N_3WIRE_ABENCODER_VCOM_DEBUG != 0
extern rt_device_t vcom;
#endif
AP_Motors_L298N_3Wire_ABEncoder::AP_Motors_L298N_3Wire_ABEncoder(AP_Motors &instance... |
// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.... |
//----------------------------------*-C++-*----------------------------------//
/*!
* \file SPn/spn/test/tstEnergy_Multigrid.cc
* \author <NAME>, <NAME>
* \date Monday March 10 12:38:40 2014
* \brief Energy Grid Transfer test.
* \note Copyright (C) 2014 Oak Ridge National Laboratory, UT-Battelle, LLC.
*/
/... |
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "adaptation/AccessCheck.h"
#include "adaptation/AccessRule.h"
#include "adaptation/Config.h"
#include "adaptation/Initiator.h"
#include "adaptation/Service.h"
#include "adaptation/ServiceGroups.h"
#include "base/AsyncJobCalls.h"
#include "base/TextException.h... |
#include "App.h"
#include "Render.h"
#include "Textures.h"
#include "Font.h"
#include "Audio.h"
#include "Bat.h"
#include "Player.h"
Bat::Bat(iPoint pos, pugi::xml_node anim, eastl::string map) : Enemy(EntityType::BAT)
{
bounds = { pos.x, pos.y, 37, 33 };
texture = app->tex->Load("Textures/Enemies/bat.png");
attac... |
//BIDS.h
//Base : stop-pattern
//v202 Support : TetsuOtter
#define DELAY_TIME 10
#include <arduino.h>
#include "BIDS.h"
#define INITIAL_BAUDRATE 19200
#define TARGET_VERSION 202
c_BIDS::c_BIDS() {
this->Version = VersionCheck(TARGET_VERSION, INITIAL_BAUDRATE);
}
c_BIDS::c_BIDS(int v = TARGET_VERSION) {
this->Vers... |
//////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2016-19, Lawrence Livermore National Security, LLC
// and RAJA project contributors. See the RAJA/COPYRIGHT file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)
////////////////////////////////////////////////////... |
/*
* Copyright 2009-2011 Red Hat, Inc.
*
* 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... |
//
// Created by cepreu on 03.09.17.
//
#include "Level.h"
#include <stdlib.h>
#include <time.h>
Level::Level() {
last = 0;
highest = 0;
font.loadFromFile("font.ttf");
reset();
}
void Level::reset() {
currentPosition = 0.0;
currentAltitude = GameConstants::startAltitude;
effort = -1.0;
... |
#include <paging/PageFrameAllocator.h>
using namespace UnifiedOS;
using namespace UnifiedOS::Paging;
using namespace UnifiedOS::Boot;
static uint64_t FreeMemory;
static uint64_t ReservedMemory;
static uint64_t UsedMemory;
static uint64_t TotalMemory;
bool Initialised = false;
PageFrameAllocator UnifiedOS::Paging::__... |
//=========================================================
// Opposing Forces Monster Voltigore blast
//
// Made by Demiurge
//
//=========================================================
#include "extdll.h"
#include "util.h"
#include "cbase.h"
#include "monsters.h"
#include "weapons.h"
#include "soundent.h"
#includ... |
// Copyright 2008 by BBN Technologies Corp.
// All Rights Reserved.
#include "Generic/common/leak_detection.h"
#include "Arabic/edt/ar_BaseFormMaker.h"
#include <string>
#include <cstdio>
#include <stdlib.h>
#include <cstddef>
#include <iostream>
using namespace std;
Symbol BaseFormMaker::_Al = Ar... |
////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010-2015, University of Washington and Battelle
// Memorial Institute. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following cond... |
/*
* Copyright 2004-2011, Haiku, Inc. All RightsReserved.
* Copyright 2002-2003, <NAME>. All rights reserved.
*
* Distributed under the terms of the MIT License.
*/
//! Handling of removable media.
#include "scsi_periph_int.h"
#include <string.h>
void
periph_media_changed(scsi_periph_device_info *device, sc... |
// Copyright (c) 2014, <NAME>
// All rights reserved.
/* Program for testing all edge types (except for sock_stream). */
#include <iostream>
#include <unistd.h>
#include <errno.h>
#include <pthread.h>
#include <string.h>
#include "pgm.h"
int errors = 0;
pthread_barrier_t init_barrier;
__thread char __errstr[80] = ... |
#include <mpi.h>
#include <papyrus/kv.h>
#include <papyrus/mpi.h>
#include <stdlib.h>
#include <stdio.h>
#include "timer.h"
//#define VERBOSE
#define KILO (1024UL)
#define MEGA (1024 * KILO)
#define GIGA (1024 * MEGA)
int rank, size;
int left, right;
char name[256];
int ret;
int db;
char* key_set;
size_t ke... |
#include "SDL_mixer.h"
#include "MenuState.h"
#include "OptionsState.h"
#include "InputManager.h"
#include "BattleState.h"
#include "JoystickConfigState.h"
#include "EditState.h"
#include "Game.h"
#include "Resources.h"
#include "StageSelectState.h"
#define OPTION_OFFSET 50
#define FONT_X 640
#define FONT_Y 680
#de... |
#include <iostream>
#include <string>
std::string NO_KEY = "no_key";
class Node {
public:
int key;
unsigned short height;
std::string data;
public:
Node *left;
Node *right;
public:
Node(const int key, const std::string data, unsigned short height);
};
Node::Node(const int ... |
// license:BSD-3-Clause
// copyright-holders:AJR
/***************************************************************************
DEC VT50/VT52 microcode disassembler
***************************************************************************/
#include "emu.h"
#include "vt50dasm.h"
vt5x_disassembler::vt5x_disassemb... |
#include "main_functions.h"
#include "image_provider.h"
#include "model_settings.h"
#include "flying_vehicle_model_data.h"
#include "tensorflow/lite/micro/micro_error_reporter.h"
#include "tensorflow/lite/micro/micro_interpreter.h"
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
#include "tensorflow/lite/... |
#include "./plan_execution.h"
#include <sstream>
#include <stack>
using namespace std;
using dependency_map_t = unordered_map<string, set<string>>;
using nodeport_dependency_map_t = unordered_map<string, unordered_map<string, set<uint32_t>>>;
class BufferPool {
uint32_t next = 0;
stack<uint32_t> pool;
public:
... |
// Copyright <NAME> 2016 - 2019.
// Distributed under the Boost Software License, Version 1.0.
//
// hash.cpp - dim core
//
// Implements SipHash-2-4, as described by:
// SipHash: a fast short-input PRF (https://131002.net/siphash/siphash.pdf)
#include "pch.h"
#pragma hdrstop
using namespace std;
using namespace Di... |
// Copyright 2014-2019 Open Source Robotics Foundation, Inc.
//
// 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 ... |
#include <iostream>
#include <stdio.h>
#include <sys/sysinfo.h>
#include <pthread.h>
#include <semaphore.h>
#include <sys/mman.h>
#include <queue>
#include <vector>
#include <string>
using namespace std;
struct zdata {
char c;
int count;
};
struct task {
string fname;
int sem_num;
};
void* com... |
#include <optional>
#include <chrono>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <queue>
#include <fmt/format.h>
#include <dstr/string.h>
#include "../days.h"
struct Point
{
int32_t x;
int32_t y;
};
class Map
{
public:
Map(std::vector<int32_t> layout_, si... |
/*
// Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a
// component of the Texas A&M University System.
// All rights reserved.
// The information and source code contained herein is the exclusive
// property of TEES and may not be disclosed, examined or reproduced
// in whole or in part withou... |
/************************************************************************
* *
* GLE - Graphics Layout Engine <http://www.gle-graphics.org/> *
* *
* Modified BSD License ... |
/*
<NAME>
IIIT Bangalore
*/
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define ll long long int
#define ld long double
#define fi first
#define se second
#define pr(v) { for(int i=0;i<v.size();i++) { v[i]==INF? cout<<"INF " : co... |
/*
Copyright (C) 2015-2016 <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... |
//
// Created by <NAME> on 16/02/2020.
//
#include <MazeDisplay.hpp>
scene::MazeDisplay::MazeDisplay() : _floor(WIDTH * HEIGHT), _maze(WIDTH, HEIGHT) {}
// Init maze and instanciate floor and walls
void scene::MazeDisplay::init() {
_maze.init();
backstage::walls_t _test = _maze.getWalls();
const glm::vec... |
/*
* rcx_comm_darwin.c
*
* Platform specific RCX communication routines.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.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.mozilla.or... |
// BSD 3-Clause License
//
// Copyright (c) 2018, <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 no... |
#include <convertgui.h>
#include <ui_convertgui.h>
#include <ui_aboutwindow.h>
#include <converter.h>
#include <qdesktopservices.h>
#include <qstring.h>
#include <qfiledialog.h>
#include <qtabwidget.h>
#include <qmessagebox.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qdir.h>
#include <qurl.h>
#include <q... |
/*
* Copyright(c) Sophist Solutions, Inc. 1990-2021. All rights reserved
*/
#include "Stroika/Foundation/StroikaPreComp.h"
#include "Stroika/Foundation/Characters/String.h"
#include "Stroika/Foundation/Characters/StringBuilder.h"
#include "Stroika/Foundation/Characters/ToString.h"
#include "Stroika/Foundation/Conta... |
/*transmitter.cc (c) 1999-2000 <NAME> (<EMAIL>)
* Indranet Technologies ltd (<EMAIL>)
*
* This file is derived from vic, http://www-nrg.ee.lbl.gov/vic/
* Their copyright notice is below.
*/
/*-
* Copyright (c) 1993-1994 The Regents of the University of California.
* All rights res... |
#include "gurka.h"
#include <gtest/gtest.h>
#include "odin/enhancedtrippath.h"
#if !defined(VALHALLA_SOURCE_DIR)
#define VALHALLA_SOURCE_DIR
#endif
using namespace valhalla;
class InstructionsUturn : public ::testing::Test {
protected:
static gurka::map map;
static void SetUpTestSuite() {
const std::strin... |
//
// simpcheck.cxx
//
// Copyright (c) 2000 IPA and Keio University SFC Research Institution
//
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
//
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include <math.h>
#i... |
/**************************************************************************\
* 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... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#include "NumericalAlgorithms/LinearOperators/DefiniteIntegral.hpp"
#include <array> // Used for mesh.slices
#include <ostream>
#include "DataStructures/DataVector.hpp"
#include "Domain/Mesh.hpp"
#include "ErrorHandling/Assert.hpp"
#include "Nume... |
// ---------------------------------------------------------------------
//
// Copyright (c) 2015 - 2020 by the IBAMR developers
// All rights reserved.
//
// This file is part of IBAMR.
//
// IBAMR is free software and is distributed under the 3-clause BSD
// license. The full text of the license can be found in the f... |
/*
* librdkafka - Apache Kafka C/C++ library
*
* 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 copy... |
/* ------------------file input output-----------------------------------*/
// cmore is an object used to view data in files ,
// History is an object used to record commands ,
// editt is an object used for editing text ,
// touch is an object used to create files ,
// ls is an object used for listing files ,
... |
#include "spikes.hpp"
#include <cppitertools/itertools.hpp>
#include <glm/gtx/fast_trigonometry.hpp>
void Asteroids::initializeGL(GLuint program, int quantity) {
terminateGL();
// Start pseudo-random number generator
auto seed{std::chrono::steady_clock::now().time_since_epoch().count()};
m_randomEngine.seed(... |
#include <iostream>
//#include <vector>
#include <algorithm> //for using std::sort
#include "petscvec.h"
#include <fstream>
Vec read_input_vector(const std::string f_name);
void make_binary_labels(Vec& v_label,int minority_label, PetscInt inverse_status=0);
void write_output(char f_name[PETSC_MAX_PATH_LEN]... |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC.
//
// Produced at the Lawrence Livermore National Laboratory
//
// LLNL-CODE-716457
//
// All rights reserved.
//
// This file is part of Ascent.
//
// For details, see:... |
/*
Copyright 2011 <NAME>
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 3 of the License, or
(at your option) any later version.
This program is distributed in... |
#include <algorithm>
#include <cpr/cpr.h>
#include <experimental/random> // for randint function
#include <iostream>
#include <opencv2/opencv.hpp>
#include <string>
#include <tgbot/tgbot.h>
#include <travisFilter.h>
using namespace std;
using namespace cv;
using namespace TgBot;
#define OUTPUT_PHOTO_PATH "out.jpg"
bool... |
#include <stdio.h> // snprintf
#include <string.h> // strcpy
#include "mysql_loaddata.hpp"
const uint16_t MySQL_LoadData::s_aposastr = *reinterpret_cast<const uint16_t*>("'*");
const uint16_t MySQL_LoadData::s_if_name = *reinterpret_cast<const uint16_t*>("-\0");
/**
* @brief This function sim... |
/**
* \file src/opr/test/loop/elemwise_grad.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
... |
/* Approach --->
First, we split the graph into SCCs. We then treat each component as a node. So then, If the
coin collector enters a component, he can collect all the coins in it.
Since the resulting graph is a DAG, we can use DP to find the maximum coins that can be collected.
*/
// Problem: Coin Collector... |
#include "levelraycaster.h"
#include "level.h"
#include "objects/visualentity.h"
#include "objects/player.h"
#include "resources/resources.h"
LevelRayCaster::LevelRayCaster(Level* level)
: _level(level)
{
maxDistance = 10.0f;
no_entities = false;
stop_target.x = -1;
stop_target.y = -1;
}
LevelRayCaster::~Leve... |
// Hazmat
// A tool for putting all the symbols in a static library into a namespace,
// or rename namespaces and classes to protect you from hazardous name conflicts
//
// Written by <NAME>
// Copyright (c) 2011 iZotope Inc.
#include "stdafx.h"
#include "ArchiveStructure.h"
using namespace std;
namespace {
c... |
/* -*- C++ -*- */
// $Id: ProxyPushConsumer_i.cpp 77020 2007-02-12 13:56:49Z johnnyw $
#include "orbsvcs/Event_Utilities.h"
#include "orbsvcs/CosEventChannelAdminC.h"
#include "orbsvcs/CosEventChannelAdminS.h"
#include "orbsvcs/RtecEventCommS.h"
#include "orbsvcs/CosEventCommS.h"
#include "ProxyPushConsumer_i.h"
#incl... |
// RecentFileManager.cpp
#include <new>
#include <stdio.h>
#include <string.h>
#include <Entry.h>
#include <File.h>
#include <Message.h>
#include "RecentFileManager.h"
using std::nothrow;
// static variables
// fDefaultManager
RecentFileManager* RecentFileManager::fDefaultManager = NULL;
// constructor
RecentFi... |
/**************************************************************************\
* 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... |
/*
* Copyright (c) 2020 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2026-01-04
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... |
////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2006 - 2016, <NAME>, <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 res... |
//-*****************************************************************************
//
// Copyright (c) 2009-2015,
// <NAME> Imageworks, Inc. and
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or wit... |
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "views/controls/link.h"
#if defined(OS_LINUX)
#include <gdk/gdk.h>
#endif
#include "app/keyboard_codes.h"
#include "base/logging.h"
#includ... |
/*===========================================================================
_____ _____ _____ _____
___| _|__ __|_ |__ __|__ |__ __| __ |__ ______
| \ / | || \ || | || |/ / ||___ |
| \/ | || \ || \ || \ ||___ |
|__/\__... |
#include <vsg/all.h>
#include <chrono>
#include <iostream>
#ifdef vsgXchange_FOUND
# include <vsgXchange/all.h>
#endif
vsg::ref_ptr<vsg::Camera> createCameraForScene(vsg::Node* scenegraph, int32_t x, int32_t y, uint32_t width, uint32_t height)
{
// compute the bounds of the scene graph to help position camera... |
// Begin ImageCapture.cpp
#include <ros/ros.h>
#include <std_srvs/Trigger.h>//追加トゥアン
#include <vision_module/VisionOrder.h>
#include <dynamic_reconfigure/server.h>
#include <vision_module/image_captureConfig.h>
#include <vision_module/image_capture/config.h>
#include <vision_module/common/VisionProcess.h>
#include <v... |
/*
* Bayes++ the Bayesian Filtering Library
* Copyright (c) 2002 <NAME>
* See accompanying Bayes++.htm for terms and conditions of use.
*
* $Id$
*/
/*
* Example of using Bayesian Filter Class to solve a simple problem.
* The example implements a Position and Velocity Filter with a Position observation.
* Th... |
/*
Copyright (c) 2005-2021, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#ifndef WIN32
# include <unistd.h>
#endif // WIN32
#ifdef MATLAB_MEX_FILE
# include "mex_types.hpp"
#else
# include "base_types.hpp"
#endif // types
#include "timer.hpp"
#include "ui_calls.hpp"
static std::clock_t get_current_cpu_time();
static void get_elapsed_cpu_time(time_data &elapsed, std::clock_t &start_time... |
// license:BSD-3-Clause
// copyright-holders:<NAME>, <NAME>
#include "emu.h"
#include "includes/mainsnk.h"
void mainsnk_state::mainsnk_palette(palette_device &palette) const
{
uint8_t const *const color_prom = memregion("proms")->base();
constexpr int num_colors = 0x400;
for (int i = 0; i < num_colors; i++)
{
... |
/* ************************************************************************
* Copyright 2020-2021 Advanced Micro Devices, Inc.
*
* ************************************************************************ */
#include "testing_ormtr_unmtr.hpp"
using ::testing::Combine;
using ::testing::TestWithParam;
using ::testing... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.