text
stringlengths
3.08k
12.5k
/*============================================================================= # Author: <NAME> - https://github.com/mjenrungrot/ # FileName: 758.cc # Description: UVa Online Judge - 758 =============================================================================*/ #include <bits/stdc++.h> #pra...
#include "benchmark_runner.hpp" #include "common/profiler.hpp" #include "common/string_util.hpp" #define CATCH_CONFIG_RUNNER #include "catch.hpp" #include <thread> using namespace duckdb; using namespace std; void BenchmarkRunner::RegisterBenchmark(Benchmark *benchmark) { GetInstance().benchmarks.push_back(benchm...
#include <bits/stdc++.h> #define pb push_back #define pf push_front #define pob pop_back #define fp first #define sp second #define mp make_pair #define ins insert #define uEdge(u, v) g[u].pb(v), g[v].pb(u) #define uwEdge(u, v, w) g[u].pb({v, w}), g[v].pb({u, w}) #define dEdge(u, v) g[u].pb(v) #define dwEdge...
#define TINYOBJLOADER_IMPLEMENTATION #include "tiny_obj_loader.h" #include "Mesh_generated.h" #include <string> #include <vector> #include <iostream> #include <fstream> static const std::string fileType = "mesh"; struct Parameters { std::string input = "", output = ""; bool combineMesh = true; }; void PrintHelp(...
#include <Arduino.h> #include "driver/i2s.h" #include "driver/adc.h" #include "I2SSampler.h" void readerTask(void *param) { I2SSampler *sampler = (I2SSampler *)param; while (true) { // wait for some data to arrive on the queue i2s_event_t evt; if (xQueueReceive(sampler->i2s_queue, &...
/**************************************************************************** * Copyright (c) 2021, CEA * 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 retai...
#include <iostream> #include <codecvt> #include "ui/objects.h" #include "ui/form_menutop.h" #pragma comment(lib, "comctl32.lib") form_menutop::form_menutop(HWND hwndParent, int lpParam, int x, int y, int width, int height) { hwndmenutop = CreateWindow("STATIC", "", ES_CENTER | WS_CHILD | WS_VISIBLE, x, y, width, ...
#include<bits/stdc++.h> // g++ -std=c++17 -Wl,-stack_size -Wl,0x10000000 main.cpp #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define EPS 1e-6 #define ll long long int #define ld long double #define fi first #define se second #define all(v) v.begin(),v.e...
#include <cassert> #include <cstdlib> #include <iostream> #include <vector> using namespace std; void prt(vector<int>& v) { for(auto& x: v) cout << x << " "; cout << endl; } void selection_sort(vector<int>& v) { // select the min and put to current position for(int i = 0; i < v.size(); i++) ...
#include <bits/stdc++.h> using namespace std; // input handle #define iln() scanf("\n") //scan new line #define in(n) scanf("%d",&n) //scan int #define ins(n) scanf("%s",n) //scan char[] #define inc(n) scanf("%c ",&n) //scan char #define inf(n) scanf("%lf",&n) //scan double/float #define inl(n) scanf("%lld",&n) //scan...
// SPDX-License-Identifier: MIT #include <cstdlib> #include <iostream> #include <limits> #include <memory> #include <string_view> #include <pulse/context.h> #include <pulse/introspect.h> #include <pulse/mainloop.h> #include <pulse/operation.h> #include <pulse/subscribe.h> namespace { constexpr auto PaClientName = ...
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "gm.h" #include "SkCanvas.h" #include "SkPath.h" static SkCanvas* MakeCanvas(const SkIRect& bounds) { SkBitmap bm; bm.setConfig(SkBitmap::kARGB_8888_Config, ...
/********************************************************************** * VERSION 1.0 / PAULVHA / JANUARY 2018 / ESP8266-PVH-driver * * PVH_ESP8266Server.cpp * * This an updated version for the ESP8266 AT WIFI shield driver * for the Arduino. It contains a number of bugfixes, enhancements and * new features that are n...
// // Created by <NAME> on 29.09.17. // #include "../include/Tagger.h" #include "../include/Parser.h" #include <taglib/tbytevector.h> #include <taglib/mpegfile.h> #include <taglib/id3v2tag.h> #include <taglib/tstringlist.h> #include <taglib/attachedpictureframe.h> #include <fstream> #include <taglib/urllinkframe.h> #i...
/* Authors: <NAME>, <NAME>, <NAME> dfilippo | geet | robp @<EMAIL> See LICENSE.txt included with this distribution. */ #include <iostream> #include <iomanip> #include <sstream> #include <cmath> #include <boost/range/irange.hpp> #include <boost/filesystem.hpp> #include <boost/program_options.hpp> #include "Ve...
#include <arpa/inet.h> #include <csignal> #include <fcntl.h> #include <http/http_request.h> #include <server.h> #include <sf/color.hpp> #include <sf/format.hpp> #include <sys/socket.h> #include <sys/timerfd.h> #include <unistd.h> #define println(...) \ if (verbose) \ { ...
#pragma once #include <cstdint> #if defined(__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1) && defined(__ARM_ARCH_7M__) && (__ARM_ARCH_7M__ == 1) #include "cmsis_gcc.h" #define builtin_add_u8(x, y) __UQADD8(x, y) #else #define builtin_add_u8(x, y) ((x) + (y)) #endif struct Color { // Todo: measure how much slower it ...
//Optimise #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; // #define MULTI_TEST #ifdef LOCAL #define db(...) ZZ(#__VA_ARGS__, __VA_ARGS__); #define pc(...) PC(#__VA_ARGS__, __VA_ARGS__); template <typename T, typen...
#include "pdfcomp.h" #include <assert.h> #include <memory> #include "exception.h" #include "../pdf/pdf.h" #include "../io/sub.h" #include "../io/mem.h" #include "../io/crypt.h" #include "../util/util.h" #include "../pdf/outpdf.h" // FIXME #include "../filter/pdffilter.h" // FIXME #include <stdio.h> using namespace s...
#include <cxxopts.hpp> #include "ServerFifoPath.hpp" #include "SimpleIni.h" #include "TelemetryService.hpp" #include "TerminalServer.hpp" using namespace et; namespace google {} namespace gflags {} using namespace google; using namespace gflags; int main(int argc, char **argv) { // Setup easylogging configurations...
// Scintilla source code edit control /** @file LexSpice.cxx ** Lexer for Spice **/ // Copyright 2006 by <NAME> // The License.txt file describes the conditions under which this software may be distributed. #include <stdlib.h> #include <string.h> #include <stdio.h> #include <stdarg.h> #include <assert.h> ...
#include "stdafx.h" #include "Ansel.h" #include "../../xrEngine/IGame_Actor.h" #include "../../xrEngine/IGame_Persistent.h" #include "../../xrEngine/IGame_Level.h" #include <AnselSDK/AnselSDK.h> static bool bInited = false; AnselCamera::AnselCamera(CObject* p, u32 flags) : CCameraBase(p, flags) { } AnselCameraEffe...
#include "StrategyEngine.h" #include "Units.h" void StrategyEngine::upgradeAtCount(std::map<int, std::vector<ProductionGoal>> &prioritizedProductionGoals, UpgradeOrTechType upgradeOrTechType, BWAPI::UnitType unitType, ...
/** * The MIT License (MIT) * * Copyright © 2019 <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, ...
#include <stdio.h> #include <opencv2/opencv.hpp> #include <opencv2/dnn.hpp> #include <opencv2/highgui.hpp> #include <fstream> #include <iostream> #include <opencv2/core/ocl.hpp> #include "tensorflow/lite/interpreter.h" #include "tensorflow/lite/kernels/register.h" #include "tensorflow/lite/string_util.h" #inc...
#include "SSAOPass.h" #include <array> #include <random> #include <glm/glm.hpp> using namespace glm; #include <imgui.h> #include "GuiSystem.h" #include "ShaderSystem.h" #include "TextureSystem.h" #include "shader_locations.h" #include "ssao_data.h" void SSAOPass::Draw(const GBuffer& gBuffer) { static int lastW =...
#include "mex.h" #include <cstdint> #include <vector> #include <array> #include <omp.h> // Matlab is colomn major. template<typename T,int d> struct FindLocalMax { static constexpr T epsilon = 1e-3; inline int fastrand(int& g_seed) { g_seed = (214013*g_seed+2531011); return (g_seed>>16)&0x7FFF...
/** * Idea got from http://www.pyimagesearch.com/2015/06/01/home-surveillance-and-motion-detection-with-the-raspberry-pi-python-and-opencv/ * This program detects movement, and shoots photos until movement has stopped. * Photos are saved to images -folder as .jpg and files are named by unix time stamp * and names a...
//==- ObjCMissingSuperCallChecker.cpp - Check missing super-calls in ObjC --==// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
#include <termios.h> #include <QApplication> #include <QCommandLineParser> #include <QDebug> #include <QThread> #include <csignal> #include <iostream> #include "selfdrive/ui/replay/replay.h" const QString DEMO_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36"; struct termios oldt = {}; void sigHandler(int s) { std:...
#include <AP_HAL/AP_HAL.h> #include <AP_BoardConfig/AP_BoardConfig.h> // fixme: debugging #include "setup_board.h" #include "pilot.h" // 982 - 2006 (frsky) / 1496 static const uint16_t PWM_MIN = 982; static const uint16_t PWM_MAX = 2006; static const uint16_t PWM_CENTER = (PWM_MIN + PWM_MAX) / 2; static const uint16...
/*************************************************************************/ /* Xania (M)ulti(U)ser(D)ungeon server source code */ /* (C) 2021 Xania Development Team */ /* See merc.h and README for original copyrights */ /***************...
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). #include <atomic> #include <memory> #include <thread> #in...
/* * @file RRT.cpp * @Copyright MIT license * Copyright (c) 2018 <NAME>, <NAME> * @author <NAME>, <NAME> * @brief RRT algorithm implementation class */ #include "../include/RRT.h" #include <vector> #include <cstdlib> #include <ctime> #include <algorithm> #include <cmath> #include <iterator> #include <utility> #i...
#include "test.h" #include "skadi/sample.h" #include "pixels.h" #include "midgard/sequence.h" #include "midgard/util.h" using namespace valhalla; #include <cmath> #include <list> #include <fstream> namespace { void no_data() { //check the no data value skadi::sample s("test/data/this_is_not_a_directory"); if...
// // FILE NAME: ZWaveUSB3Sh_CCNaming.cpp // // AUTHOR: <NAME> // // CREATED: 09/21/2017 // // COPYRIGHT: Charmed Quark Systems, Ltd @ 2020 // // This software is copyrighted by 'Charmed Quark Systems, Ltd' and // the author (<NAME>.) It is licensed under the MIT Open Source // license: // // https://opensource.o...
//#include "rosic_StringTests.h" using namespace rotes; //#include "rosic/rosic.h" using namespace rosic; void rotes::testRosicString() { testCharacterComparisons(); testStringBufferCopying(); testStringIntConversions(); //testStringDoubleConversions(); // fails - why? } void rotes::testCharacterComparisons...
// Advent of Code 2018 // Day 22: Mode Maze // https://adventofcode.com/2018/day/22 #include <algorithm> #include <chrono> #include <iostream> #include <istream> #include <iterator> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; // 4-tuple with less-than comparison operator (f...
//***************************************************************************** // Copyright 2017-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://w...
#include<bits/stdc++.h> using namespace std; using vi = vector<int>; using vvi = vector<vi>; using ii = pair<int,int>; using vii = vector<ii>; using l = long long; using vl = vector<l>; using vvl = vector<vl>; using lu = unsigned long long; using vb = vector<bool>; using vvb = vector<vb>; using vd = vector<double>; us...
#include <csignal> #include <getopt.h> #include "common/log.hpp" #include "common/config.hpp" #include "../git.h" #include "../config.h" #include "queries/executor/server.hpp" #include "devices/cpu/threadPool.hpp" #define TERMINAL_COLOR_WELCOME "\033[38;5;208m" extern void createTestFiles(); extern void checkKernels(b...
#include<iostream> #include<bits/stdc++.h> #include<iomanip> #include<stdio.h> #include<stdlib.h> #include<dirent.h> #include<errno.h> #include<string.h> #include<time.h> #include <sys/stat.h> #include <sys/types.h> #include <grp.h> #include <pwd.h> #include <sysexits.h> using namespace std; void print...
#include <iostream> #include <fstream> #include <thread> #include <chrono> #include <string> #include <vector> #include <unordered_map> //Determines if the threads should stay alive. When false, all threads should finish and close bool keepalive = true; std::unordered_map<std::string, std::ifstream *> open_files; //G...
/* ArduinoCloud.cpp - Class definitions that provide Arduino layer for Hologram Cloud on Dash https://hologram.io Copyright (c) 2017 Konekt, Inc. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as pub...
#include "ModuleTexture.h" #include "LittleEngine.h" #define STB_IMAGE_IMPLEMENTATION #include <stb_image/stb_image.h> #include "Log.h" bool ModuleTexture::Init() { GetCheckerboardTexture(); return true; } ModuleTexture::~ModuleTexture() { CleanUp(); } bool ModuleTexture::CleanUp() { for (auto& texture : texture...
// SPDX-License-Identifier: Apache-2.0 // // Copyright 2000-2014 <NAME> // Copyright 2004-2013 Gigablast, Inc. // Copyright 2013 Web Research Properties, 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...
#include "ESPIoTCommon.hpp" #include "ESPIoTCommonValue.hpp" #include <Arduino.h> #include <WiFi.h> #include <mbedtls/md.h> #include <WiFiClientSecure.h> #include <MQTT.h> #include <ArduinoJson.h> bool setupWiFi() { Serial.println("WiFi begin"); WiFi.begin(); while (WiFi.status() != WL_CONNECTED) { ...
///////////////////////////////////////////// // RichView.cpp #include "stdafx.h" #include "richview.h" CRichView::CRichView() { } CRichView::~CRichView() { } // Calculates the character position of the page breaks, and returns // the number of pages. UINT CRichView::CollatePages() { CPrintDialog printDlg; ...
//**************************************************************************** // Copyright © 2017 <NAME>. All rights reserved. // Created by <NAME> on 26.04.2017. // // This file is distributed under the BSD License. // License text is included with the source distribution. //******************************************...
// -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- /* Copyright 2020 <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 r...
// SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2021 Scipp contributors (https://github.com/scipp) #include <gtest/gtest.h> #include "scipp/dataset/dataset.h" #include "scipp/dataset/rebin.h" #include "scipp/dataset/reduction.h" #include "scipp/dataset/shape.h" #include "scipp/variable/arithmetic.h" #includ...
/* * $Id: AUD_LinearResampleReader.cpp 39792 2011-08-30 09:15:55Z nexyon $ * * ***** BEGIN GPL LICENSE BLOCK ***** * * Copyright 2009-2011 <NAME> * * This file is part of AudaSpace. * * Audaspace is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as ...
#include "box.hpp" #include "renderer.hpp" Box::Box(): Shape{}, max_{0.0f}, min_{0.0f}{/*std::cout << "Box constructor used."<<std::endl;*/} Box::Box(glm::vec3 const& max, glm::vec3 const& min): Shape{} {if(max.x > min.x){ max_= max; min_= min; } else { min_ = max; max_ = min; ...
/* * Copyright (C) 2014 The Android Open Source Project * * 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 app...
//***************************************************************************** // Copyright 2017-2020 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://w...
/* * Copyright 2020 <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...
/*+-------------------------------------------------------------------------+ | MultiVehicle simulator (libmvsim) | | | | Copyright (C) 2014-2020 <NAME> | | Copyright (C) 2017 <N...
#include <string> #include <random> #include <algorithm> #include <iostream> #include <fstream> #include <sstream> #include <cstdio> #include <cstdlib> #include <typeinfo> #include <tuple> #ifdef _MSC_VER #include <Windows.h> #else #include <unistd.h> #endif using namespace std; string token = "<KEY>"; random_devi...
/* * \file DTDCSByLumiTask.cc * * \author <NAME> - CIEMAT * \author <NAME> - INFN PD * \author <NAME> = INFN PD * */ #include <DQM/DTMonitorModule/src/DTDCSByLumiTask.h> // Framework #include <FWCore/Framework/interface/EventSetup.h> // Geometry #include "Geometry/Records/interface/MuonGeometryRecord.h" #inc...
#include "stdafx.h" #include "error.h" #include "utils.h" const wstr msg_table[] = { L"Couldn't open the file \"%1%\".", L"Couldn't open the directory \"%1%\".", L"Couldn't create the file \"%1%\".", L"Couldn't create the directory \"%1%\".", L"Couldn't delete the file \"%1%\".", L"Couldn't delete the...
/* * Author: <NAME>, ISCAS * * Below is PortSmash Author info * * Copyright 2018-2019 <NAME>, <NAME>, <NAME>, <NAME> and <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 Licen...
#include "CDKLoader.h" #include "Masks.h" #include <iostream> CDKLoader::CDKLoader(CByteCodeReader *pReader, TString DolPath, TString FSTRoot) : IPropertyLoader(pReader, DolPath, FSTRoot) {} TString CDKLoader::LinkedObjectsFolder() { return mFSTRoot / "/RSO/wii_production/"; } uint32 CDKLoader::ObjectsAddres...
#include <functional> // Arithmetic, comparisons, and logical operations #include <memory> // Dynamic memory management #include <string> // String functions #include <rclcpp/rclcpp.hpp> #include <sensor_msgs/msg/imu.hpp> #include <cmath> #include <iostream> #include <geometry_msgs/msg/twist.hpp> #include <chro...
/************************************************************************* * Copyright (c) 2015, Synopsys, Inc. * * All rights reserved. * * * * Redistribution and...
/* test_pipe_fib_throttle.cpp -*- C++ -*- * * @copyright * Copyright (C) 2013, Intel Corporation * All rights reserved. * * @copyright * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: ...
#include "vsbox.h" #include "xml_support.h" /* * inline ostream &operator<<(ostrstream os, const Vector &obj) { * return os << "(" << obj.i << "," << obj.j << "," << obj.k << ")"; * } */ string tostring( const Vector &v ) { return std::string( "(" )+XMLSupport::tostring( v.i )+", "+XMLSupport::tostring( v.j...
//---------------------------------------------------------------------------// // Copyright (c) 2020-2021 <NAME> <<EMAIL>> // Copyright (c) 2020-2021 <NAME> <<EMAIL>> // // MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation fi...
/* ** Copyright (C) 1998-2010 <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 License, or ** (at your option) any later version. ** ** This progra...
//%Header { /***************************************************************************** * * File: src/GL/GLTextureTIFF.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 in...
#include "TriangleCluster.h" #include <glog/logging.h> #include <set> #include "HelperFunctions.h" auto trianglePoints( TriMesh& mesh, const TriMesh::FaceHandle fh ) { std::vector<TriMesh::Point> points; for ( auto fvh : mesh.fv_range( fh ) ) { points.push_back( mesh.point( fvh ) ); } return std::make_tuple(...
/* * Receiver_program.cpp * * Created: 4/8/2015 5:00:52 PM * Author:relux */ //#define F_CPU 16000000UL #include <avr/io.h> #include <awesome/UART.h> #include <util/delay.h> #include <avr/interrupt.h> unsigned char data1; unsigned char data_main; uint8_t z=0; uint8_t speed[2]; uint8_t intensity[2]; int main(...
/* * Copyright(C) 2020. Huawei Technologies Co.,Ltd. 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/LICENSE-2.0 * * Unless re...
/* the vast starry sky, bright for those who chase the light. */ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define mk make_pair const int inf=(int)1e9; const ll INF=(ll)5e18; const int MOD=998244353; int _abs(int x){return x<0 ? -x : x;} int add(int x,int y){x+=y; ret...
/* CLIENT CODE */ #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <winsock2.h> #include <ws2tcpip.h> #include <stdlib.h> #include <iostream> // Need to link with Ws2_32.lib, Mswsock.lib, and Advapi32.lib #pragma comment (lib, "Ws2_32.lib") #pragma comment (lib, "Mswsock.lib") #pragma comment (lib, "AdvApi32...
#include "broad_phase.h" bool hgrid_fully_fits(Vec2 R1, r32 dimension, Mm_Rect rect) { if (R1.x <= rect.min.x && R1.y <= rect.min.y && (R1.x + dimension) >= rect.max.x && (R1.y + dimension) >= rect.max.y) return true; return false; } void hgrid_add_body_to_grid(HGrid *hgrid, Rigid_Body *body) { auto grids = hgri...
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
/* Some numbers: Max ActorID: 1971696 NRows: 17316773-1 Max MovieID: 1151758 */ #include <iostream> #include <vector> #include <fcntl.h> #include <unistd.h> #include <sys/mman.h> #include <thread> using namespace std; // BAD CODING!!! <3 int *actor_keys = new int[1971696]; int *act2mov_actors = new int[1971696]; in...
/* * Copyright (c) 2010, <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 cond...
//======================================================================= // Copyright (c) 2013-2018 <NAME>. // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //======================================================================= ...
/*************************************************************************** This source file is part of OGREBULLET (Object-oriented Graphics Rendering Engine Bullet Wrapper) Copyright (c) 2007 <EMAIL> (Use it Freely, even Statically, but have to contribute any changes) Permission is hereby granted, free of charge...
#include "bezier_calc.h" #include <cmath> #include <vector> #include <QLineF> #include "points.h" void BezierCalc::deCasteljau(QList<QPointF>& resultCurve, const QList<QPointF>& controllPoints, const int degree, const float t) { QList<QPointF> tmpPoints; if (degree...
// license:BSD-3-Clause // copyright-holders:<NAME> /***************************************************************************** * * Xerox AltoII PROM loading and decoding * *****************************************************************************/ #include "emu.h" #include "alto2cpu.h" #include "a2roms.h" ...
#include "model.h" #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <utility> #include "glm/glm.hpp" #define TINYOBJLOADER_IMPLEMENTATION #include "tiny_obj_loader.h" bool CreateModelFromFile(const std::string& path, Model* model) { tinyobj::attrib_t attrib; std::vector<tinyob...
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #include <sstream> #include <limits> #include <map> #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/IFC4/include/IfcDamp...
/*- * Copyright (c) 2020 The Johns Hopkins University Applied Physics * Laboratory LLC * * 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 limita...
#include <SDL2/SDL.h> #include <iterator> #include "Ball.hpp" #include "Rectangle.hpp" #include "Paddle.hpp" #include "ScoreKeeper.hpp" #include "Options.hpp" #include "Util.hpp" #include "Draw.hpp" Ball::Ball(Options& options, Paddle& i_paddle, HyperBlock& i_hyper, ScoreKeeper& i_SK, AudioManager& i_AM) :...
#include "memory_layer.h" #include <string> #include <thread> #include <chrono> #include <vector> #include <infiniband/verbs.h> #include <unistd.h> #include <stdio.h> static const int MEMORY_REGION_SIZE = 4096; int main(int argc, char *argv[]) { int cluster_size = std::stoi(argv[1]); int machine_id = std::stoi...
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- vim:set ts=4 sw=4 sts=4 noet: */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <cstdlib> #include <cstring> #include <iostream> #include <fstream> #include <memory> #include <string> #include <boost/program_options.hpp> #include "bc...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <map> using namespace std; struct Glob { vector<int> v; void inc(int i) { ++v[i]; } Glob() { v.assign(3, 0); } }; /* make OBJ delete ...
#include "pch.h" #include "GameObject.h" #include "WICTextureLoader.h" #include "World.h" using namespace Config; using namespace DirectX; using namespace DirectX::SimpleMath; using Microsoft::WRL::ComPtr; GameObject::GameObject(Vector2 position, ID3D11Device2* device) : m_acceleration(Vector2::Zero), m_angu...
// The MIT License (MIT) // // Copyright (c) 2015, 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 the Software without restriction, including without limitation the rights // to use, co...
#include <iostream> #include <vector> #include <numeric> #include <sys/time.h> #include "icp.h" #include "Eigen/Eigen" using namespace std; using namespace Eigen; float my_random(void); Eigen::Matrix3d rotation_matrix(Eigen::Vector3d axis, float theta); void test_best_fit(void); void test_icp(void); void my_random_...
//============================================================================= // 2D rendering interfaces. //============================================================================= #pragma once #include "Types.hpp" #include <d3d11.h> class FWindow; // DirectX 11 2D render interface. class FRender { public: //...
// Copyright © 2017 by <NAME> <<EMAIL>> // Available under the MIT License. See LICENSE for details. #include "encoding/base64.h" #include <cstring> #include "base/logging.h" static constexpr uint8_t NPOS = 0xff; static uint8_t find(const char* cs, char ch) { uint8_t index = 0; while (*cs) { if (*cs == ch)...
#include "stdafx.h" #include "n2v.h" #ifdef USE_OPENMP #include <omp.h> #endif void ParseArgs(int &argc, char *argv[], TStr &InFile, TStr &OutFile, int &Dimensions, int &WalkLen, int &NumWalks, int &WinSize, int &Iter, bool &Verbose, double &ParamP, double &ParamQ, bool &Directed, bool ...
#if defined(HAVE_CONFIG_H) #include "config.h" #endif #include "rutil/Logger.hxx" #include "resip/stack/StatisticsManager.hxx" #include "resip/stack/SipMessage.hxx" #include "resip/stack/TransactionController.hxx" #include "resip/stack/SipStack.hxx" using namespace resip; using std::vector; #define RESIPROCATE_SUBSY...
//main.cpp #include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <unordered_set> #include <solution.h> bool debug_addr = false; bool debug_key = true; bool debug_name = true; bool set_weight = true; int total_jobs = 0; int num_of_nodes = 0; int num_o...
#include "MazeEnv.h" #include <string> #include <fstream> #include <cstring> MazeEnv::MazeEnv(StateP s) { nRows = 0; nColumns = 0; position = make_pair(0,0); state = s; ntries = 0; displayStatEvent = NULL; changePositionEvent = NULL; isExploitExperiment = false; } GenotypeP MazeEnv::getInput(){ ntries++; B...
/* * 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) 2012,2014,2015,2016,2017 by the GROMACS development team. * Copyright (c) 2019,2020, by the GROMACS de...
/* * NeuralNet.cpp * * Created on: Dec 8, 2016 * Author: ken */ #include "NeuralNet.hpp" NeuralNet::NeuralNet(std::vector<Layer*> layers, Loss* loss) : mLayers(layers), mLoss(loss) { } NeuralNet::~NeuralNet() { for (Layer* lp : mLayers) { delete lp; } delete mLoss; } arma::field<arma::Cube<double>...