text
stringlengths
3.08k
12.5k
#include "hlapi/hlapi.h" #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <string.h> #include <random> #include <chrono> #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x) FILE* dfile; extern int vtTLBHits, vtTLBMisses; static unsigned long readbench(const WinProcess& ...
/**************************************************************************************/ /* */ /* Visualization Library */ /* http://visualizationlibrary.org ...
#include <opencv2/opencv.hpp> #include "jetnet.h" #include "create_runner.h" #include <iostream> #include <ctime> #include <iomanip> #include <sstream> using namespace jetnet; /// \brief Process single frame and show detection result /// \param frame frame from camera /// \param runner YOLO model runner /// \param pr...
#include <stdio.h> #include <vector> using std::vector; #include "coopCutMinimizer.h" #include <time.h> struct Options_coopCut { //input files char* edgeWeightFile; char* edgeClassFile; char* unaryFile; char* outputFile; // method parameters; double edgeClassThreshold; double edgeClassLastThreshold; double ...
// rsafuncs.cpp // Implements functions declared in rsafuncs.h // C++ Standard Library #include <iostream> using std::cout; using std::endl; #include <string> using std::string; using std::to_string; #include <vector> using std::vector; #include <cstdlib> using std::rand; // Libraries #include <gmpxx.h> // Our files...
// license:BSD-3-Clause // copyright-holders:<NAME> /*************************************************************************** video.c Functions to emulate the video hardware of the machine. ***************************************************************************/ #include "emu.h" #include "video/resnet.h"...
/** * \file isect_mercator_alignment_gff.cc * This file is part of FSA. * \author Source code in this file was written by <NAME>. */ #include <getopt.h> #include <fstream> #include "config.h" #include "seq/gff.h" #include "seq/alignment.h" #include "seq/mercator.h" using namespace fsa; static std::string progr...
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2016 Couchbase, 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 * * h...
// // TestRunner.cpp // // Created by <NAME> on 23 Jan 2019. // Copyright 2013 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 "TestRunner.h" #include <QFileDialog> #include "Nitpick.h...
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file linearEulerIntegrator.c...
// Copyright 2020 The Beam Team // // 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...
#include "SampleCode.h" #include "SkView.h" #include "SkCanvas.h" #include "SkGPipe.h" #include "SkSockets.h" #include "SkNetPipeController.h" #include "SkCornerPathEffect.h" #include "SkOSMenu.h" #include <map> /** * Drawing Server * * This simple drawing server can accept connections from multiple drawing * clie...
/* JCRev Reverb Subclass by <NAME>, 1998 based on CLM JCRev Integrated into STK by <NAME> This is based on some of the famous Stanford CCRMA reverbs (NRev, KipRev) all based on the the Chowning/Moorer/Schroeder reverberators, which use networks of simple allpass and comb delay filters. This par...
//////////////////////////////////////////////////////////////////////////// // Created : 17.02.2009 // Author : <NAME> // Copyright (C) GSC Game World - 2009 //////////////////////////////////////////////////////////////////////////// #include "pch.h" #include "geometry_instance.h" #include <xray/collision/...
#if defined(HAVE_CONFIG_H) #include "config.h" #endif #include "resip/stack/ExpiresCategory.hxx" #include "rutil/Logger.hxx" #include "rutil/ParseBuffer.hxx" //#include "rutil/WinLeakCheck.hxx" // not compatible with placement new used below using namespace resip; using namespace std; #define RESIPROCATE_SUBSYSTEM ...
//===-- memprof_malloc_linux.cpp -----------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------...
#include "lib/dht.hpp" #include "lib/pwm.hpp" #include "lib/thread.hpp" #include "pico/stdlib.h" #include "pico/time.h" #include <iomanip> #include <iostream> #define MOTOR_IN1_PIN 13 #define MOTOR_IN2_PIN 14 #define MOTOR_ENA_PIN 15 #define DHT_SDA 16 #define DHT_SCL 17 #define BUZZER_PIN 22 #define TIME_TILL_BEEP_MS...
/* * Copyright (c) 2015 by <NAME>, www.dinkla.com, All rights reserved. * * See the LICENSE file in the root directory. */ #include "HeatDemoAMP.h" #include <iostream> #include "Logger.h" #include "HeatDemoDefs.h" #include "Extent2AMP.h" #include "ColorUtilitiesAMP.h" #include "FileUtilities.h" #include "...
/* * SyncronousRender.cpp * * Created on: Dec 6, 2013 * Author: Cfyz */ #include "Common.hpp" #include <cmath> #include <cstdlib> #include <ctime> struct color3_t { int r, g, b; }; color3_t GetShiftedColor(int shift) { float f = (shift%80) / 80.0f; color3_t c = {0}; if (f < 0.33...
/* Copyright 2013-present Barefoot Networks, 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 agreed to in ...
#include "dateManager.hpp" #include <ctime> #include "helpMethods.hpp" #include "stdio.h" DateManager::DateManager() : START_DATE_("2000-01-01"), SECONDS_PER_DAY_(86400) { today_ = getTodayDate(); } Date DateManager::getTodayDate() { Date today; std::time_t t = std::time(0); std::tm* now = std::lo...
/** * @file test_dynarray.cpp * @author <NAME> * * @brief header file for test DynArray * * @copyright Copyright (c) Remedy IT Expertise BV */ #include "test_dynarray.h" #include "da_testsC.h" #include "data.h" #include "tao/x11/dynamic_any/dynanyfactory.h" #include "testlib/taox11_testlog.h" #include "an...
/*********************************************************************************************//** * @file cp1616_io_device_tutorial_node.cpp * * Node for testing basic profinet communication between CP1616 and S7-1200 PLC * * Copyright {2015} {<NAME>} * * Licensed under the Apache License, Version 2.0 (the "Licens...
// Copyright (C) 2015-2021 Virgil Security, Inc. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // (1) Redistributions of source code must retain the above copyright // ...
#include<bits/stdc++.h> using namespace std; typedef long long int ll; /*int A[4][4]={ {0,20,42,25}, {20,0,30,34}, {42,30,0,10}, {25,34,10,0} }; int solve_TSP_bitmasking(int mask,int pos,int n) { if(mask==(1<<n)-1) return(A[pos][0]); ...
/* * Copyright © 2012, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * All rights reserved. * * The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed * under the Apache License, Version 2.0 (the "License"); * you may not use t...
//----------------------------------------------------------------------------- // Torque Game Engine // Copyright (C) <EMAIL>, Inc. //----------------------------------------------------------------------------- #include "platformWin32/platformWin32.h" #include "platformWin32/winFont.h" #include "dgl/gFont.h" #includ...
/** * @file options.hpp * * @brief command line options and keep search options. * * @author <NAME> * @author <NAME> (Hiroshima University) * @author <NAME> (Yamagata University) * * Copyright (C) 2019 <NAME>, <NAME>, * <NAME> and Hiroshima University. * All rights reserved. * * The MIT License is applied ...
// rtWindow.cpp #include <fstream> #include "rtWindow.h" RTwindow::RTwindow( int x, int y, int width, int height, const char *title, Scene *s, GLFWwindow *w ) { window = w; glfwSetWindowUserPointer( window, this ); // Key handler auto static_keyCallback = [](GLFWwindow* ww, int key, int scancode, int...
// Cadastrar pessoa na agenda de aniversariantes (nome, e-mail, dia, mês e ano de nascimento) // Excluir a pessoa a partir do nome // Alterar dia, mês ou ano a partir do nome // Consultar aniversariantes de uma data // Consultar aniversariantes de um dado mês // Consultar aniversariantes pela letra inicial do nome // M...
/*** This file is part of the OptAlgs C++ library originally developed by <NAME>. This code is released under the BSD-3 license: http://opensource.org/licenses/BSD-3-Clause See the file "license.txt" in the root directory for full details. ***/ /* author: <NAME> file: oa_random.cpp Description: The source ...
#include <fstream> #include <iostream> #include <iomanip> #include <assert.h> #include <sys/stat.h> #include <regex> #include "mytypes.h" #include "utils.h" using namespace std; int string_to_int(const string& s) { int x; return from_string(s, x); } size_t get_file_size(const string& path) { struct stat ...
//===--- SwiftLookupTable.cpp - Swift Lookup Table ------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
// Copyright (c) 2020, <NAME> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions a...
#include <tests/test3/BaseShadowMappingSceneTest.h> #include <tests/common/CubeVerticesGenerator.h> #include <tests/common/SphereVerticesGenerator.h> #include <GLFW/glfw3.h> #include <glm/gtc/matrix_transform.hpp> namespace { const float kFoV = 45.0f; const float kAspectRatio = 800.0f / 600.0f; const float kUpdateTi...
/* ************************************************************************ * Copyright 2013 Advanced Micro Devices, 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...
#include "_all.h" #define DEBUG_TYPE "clang-sfi-injector-wpfv" std::string WPFVInjector::toString() { return "WPFV"; }; // clang-format off WPFVInjector::WPFVInjector() { // Wrong variable used in parameter of function call Matcher.addMatcher( callExpr( allOf( unless(anyOf(...
#include "dataquay/BasicStore.h" #include "dataquay/PropertyObject.h" #include "dataquay/TransactionalStore.h" #include "dataquay/Connection.h" #include "dataquay/RDFException.h" #include "dataquay/objectmapper/ObjectStorer.h" #include "dataquay/objectmapper/ObjectLoader.h" #include "dataquay/objectmapper/ObjectBuilde...
// ParameterReader.cpp // // author: <NAME> @IBM // date: 20160616 version: 1.0.0 #include "../include/ParameterReader.h" using namespace std; void ParameterReader::info() { cout << string(80, '-') << endl; cout << printbuffer_ << endl; cout << string(80, '-') << endl; } void ParameterReader::readfromtx...
/**************************************************************************************/ /* */ /* Visualization Library */ /* http://www.visualizationlibrary.org ...
#include <sampling.hpp> using namespace Texturize; // ------------------------------------------------------------------------------------------------ // // The example demonstrates how to implement a custom synthesizer, that generates a new texture // by naively sampling an exemplar. // // ------------------------...
// 3rd includes #include <Arduino.h> #define ESP32 #include <M5StickC.h> #undef min // IR #include <IRremoteESP8266.h> #include <IRrecv.h> #include <IRutils.h> #include <IRtext.h> // Network #include <HTTPClient.h> #include <ESPmDNS.h> // system include #include <cstdint> #include <memory> #include <tuple> #define DE...
// Copyright 2022 <NAME> #include <gtest/gtest.h> #include <math.h> #include <vector> #include "./trapezoidal_rule.h" #define USE_EFFICIENCY_TESTS 0 // f(x) = x double f1(std::vector<double> args) { return args[0]; } // f(x, y) = x + y double f2(std::vector<double> args) { return args[0] + args[1]; } // f(x, y...
#include "lev.hh" #include "rep_lib.hh" #include <map> #include <iostream> #include <string> #include <vector> #include <fstream> #include <strstream> #include <algorithm> #include <list> #include <cmath> float conv_J (string& s) { float J; char* t = &s[0]; std::istrstream str(t); str >> J; string::...
#include <iostream> #include <fstream> #include <vector> #include <string> class ART1 { using vectorArray = std::vector<std::vector<int> >; vectorArray prototypeVectors; int vectorMagnitude(const std::vector<int>& vec) { int count = 0; for (int i : vec) { count += i; } return count; } void vectorB...
#include "p2Defs.h" #include "p2Log.h" #include "j1App.h" #include "j1Pathfinding.h" #include "Brofiler\Brofiler.h" // Module Pathfinding methods j1Pathfinding::j1Pathfinding() { name.create("pathfinding"); } j1Pathfinding::~j1Pathfinding() { } iPoint j1Pathfinding::GetNextTile(const iPoint & origin, const iPoin...
#include <bits/stdc++.h> #define mem(ar,num) memset(ar,num,sizeof(ar)) #define me(ar) memset(ar,0,sizeof(ar)) #define lowbit(x) (x&(-x)) #define Pb push_back #define FI first #define SE second #define For(i,a,b) for(int i = a; i < b; ++i) #define IOS ios::sync_with_stdio(false) using namespace std; typedef long long...
/** \file threshold-euclidean-dist.cpp \author <EMAIL> \author <EMAIL> \copyright ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation Copyright (C) 2019 Engineering Cryptographic Protocols Group, TU Darmstadt This program is free software: you can redistribute it and/or modify ...
#include <algorithm> #include <iostream> #include <fstream> #include <numeric> #include <sstream> #include <cassert> #include <string> #include <vector> #include <tuple> using namespace std; typedef long long ll; vector<int32_t> const IMPOSSIBLE={-123456789}; constexpr bool check_bounds(int32_t const x){ return 0 <...
#include <iostream> #include "file_manager.h" #include "errors.h" #include "constants.h" #include <cstring> #include <fstream> #include <bits/stdc++.h> #include <climits> using namespace std; void searchLeft(int firstPageNum, int lastPageNum, int &leftPage, int &leftOffset, int num, FileHandler &fh); void searchRight...
#include "gamepch.h" #include "GUI.h" #include "Spaceship.h" #include "Star.h" #include "Order.h" #include "Pathfinder.h" #include "Hyperlane.h" #include "Constellation.h" #include "GameState.h" #include "Background.h" #include "EffectsEmitter.h" #include "Sounds.h" #include "TextureCache.h" #include "SaveLoader.h" #in...
/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors ...
#include "ide.h" #if 0 #define LDUMP(x) DDUMP(x) #define LDUMPC(x) DDUMPC(x) #define LLOG(x) DLOG(x) #else #define LDUMP(x) #define LDUMPC(x) #define LLOG(x) #endif #define LTIMING(x) // DTIMING(x) String ResolveTParam(const String& type, const Vector<String>& tparam) { return ResolveTPa...
#include <torch/torch.h> #include <torch/script.h> #include <torch/autograd.h> #include <torch/utils.h> #include <iostream> #include <unistd.h> #include <iomanip> #include "../fashion.h" #include "../utils.h" #include "../matplotlibcpp.h" using namespace torch::autograd; namespace plt = matplotlibcpp; void show_ima...
#pragma once #include "src/3D/ShaderCache.hpp" #include "src/Assertions.hpp" #include "src/MeshCache.hpp" #include "src/RecentFile.hpp" #include "src/Screen.hpp" #include <SDL_events.h> #include <glm/vec2.hpp> #include <filesystem> #include <memory> #include <string_view> #include <utility> #include <vector> namesp...
// // Created by ziqwang on 2019-04-13. // #include "ShapeOpt.h" #include <igl/boundary_loop.h> void ShapeOpt::loadMesh(iglMesh &_mesh) { mesh_ = _mesh; V_ = mesh_.V_.transpose(); solver = ShapeOp::Solver(); solver.setPoints(V_); //std::cout << V_ << std::endl; } void ShapeOpt::addPlanarConstraint...
#include "nnue.h" #include "pos.h" #include "types.h" #include "bits.h" #include <string> #include <fstream> #include <iostream> #include <cstdlib> #include <cstring> using namespace std; void NNUE::load(string path) { ifstream file; file.open(path, ios::binary); if (file.is_open()) { file.read((char*)this, siz...
#include <iostream> #include <stack> #include <vector> #include <fstream> #include <list> #include <algorithm> using namespace std; class Rect{ public: int color; bool done; int number; Rect(int c, bool d, int num){ color = c; done = d; number = num; } }; bool check(Rect r1, Rect ...
// Copyright (c) 2019 DeFi Foundation // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <masternodes/mn_txdb.h> #include <chainparams.h> #include <uint256.h> #include <stdint.h> #include <boost/thread.hpp> using names...
// Copyright 2013 Google Inc. 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 required by appl...
// // rawstein_extract.cpp -- C++ code to produce an ASCII event list from // the raw binary bytes produced by STEIN. Compiles with g++. If compiled // binary has name "raw_steinunpack", then usage on a UNIX machine is: // // ./raw_steinunpack STEIN_RAWBYTESLOG.log > STEINBYTESLOG.txt // // where "STEIN_RAWBYTESL...
#define _STDC_FORMAT_MACROS #include <inttypes.h> #include <assert.h> #include <sys/time.h> #include <vector> #include "Filesystem.hh" #include "Image.hh" #include "UnitTest.hh" using namespace std; struct Color { uint8_t r; uint8_t g; uint8_t b; Color(uint8_t r, uint8_t g, uint8_t b) : r(r), g(g), b(b) {...
#include "editor/codebuilder.h" #include "resources/text.h" #include <QFile> #include <QMap> #include <QMetaProperty> #include <QDir> #include <QDirIterator> #include <QDebug> const QString gFilesList("{FilesList}"); const QString gRegisterModules("{RegisterModules}"); const QString gModuleIncludes("{ModuleIncludes...
/***************************************************************************** Copyright (c) 2020, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This p...
// Copyright 2021 <NAME> #include <mpi.h> #include <random> #include <algorithm> #include <ctime> #include <vector> #include <iostream> #include "../../../modules/task_3/shurygina_a_linear_filtration/linear_filtration_block.h" std::vector<int> createRandomImg(int width, int height) { std::mt19937 gen; gen.seed...
/* * Copyright 2021 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
// -------------------------------------------------------------------------- // Dingus project - a collection of subsystems for game/graphics applications // -------------------------------------------------------------------------- #include "stdafx.h" #include "ProxyEffect.h" #include "D3DDevice.h" #include "...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> using namespace std; const int MAXN = 100005; const int MAXP = 18; vector<int> g[MAXN]; int tin[MAXN]; int tout[MAXN]; int depth[MAXN]; int p[MAXN][MAXP]; bool used[MAXN]; int timer = 0; bool is_upper(int a, int b) { return tin[a] <= tin...
// Copyright 2016 The Streamer Authors. 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 required by ...
#include "euclidean.h" #include <iostream> #include <fstream> #include <algorithm> #include <sstream> #include <cmath> // split a string on tabs vector<string> splittab(const string& s) { vector<string> tokens; string token; std::istringstream tokenStream(s); while (std::getline(tokenStream, token, '\t'...
/* This file is part of TACS: The Toolkit for the Analysis of Composite Structures, a parallel finite-element code for structural and multidisciplinary design optimization. Copyright (C) 2014 Georgia Tech Research Corporation TACS is licensed under the Apache License, Version 2.0 (the "License"); you may ...
/****************************************** Copyright (c) 2019 <NAME> - <NAME> Copyright (c) 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 limi...
/* ** ClanLib SDK ** Copyright (c) 1997-2016 The ClanLib Team ** ** This software is provided 'as-is', without any express or implied ** warranty. In no event will the authors be held liable for any damages ** arising from the use of this software. ** ** Permission is granted to anyone to use this software for a...
// Random.cpp #include "Precompile.h" #include "Random.h" Random gRNG; // this is a mesenne twister RNG /* Period parameters */ #define MTWISTER_M 397 #define MATRIX_A 0x9908b0dfUL /* constant vector a */ #define UPPER_MASK 0x80000000UL /* most significant w-r bits */ #define LOWER_MASK 0x7fffffffU...
#include "texture.h" #include <iostream> #include <istream> #include <png.h>//#include <SOIL/SOIL2.h> #include <unistd.h> using namespace std; Texture::Texture() : m_id(0) { } GLuint Texture::getId() const { return m_id; } void Texture::load(string name) { /* GLuint tex_2d = SOIL_load_OGL_texture ...
#include "tools.h" bool strEqual(const char* str1, const char* str2) { return strcmp(str1, str2) == 0; } String humanTimeMs(unsigned long ms) { return humanTime(ms / 1000); } // in seconds String humanTime(unsigned long sec) { if (sec < 1) { return "0s"; } // 4010 // 4010/3600 = 1h // 4010%3600 = 410...
#include <vector> #include <cmath> #include <iostream> namespace { template<typename T> class Image; const int finalWidth = 2560; const int finalHeight = 1440; const int supersample = 10; const int iterations = finalHeight * supersample * 100; const int discardCount = iterations / 10; ...
//compile: g++ -std=c++11 -O3 cleanupblastgraph.cpp -o cleanupblastgraph //Usage: ./cleanupblastgraph BLASTGRAPH (BLASTGRAPH2,BLASTGRAPH3,...) //-> removes all duplicated edges //pk #include <iostream> #include <fstream> #include <vector> #include <sstream> #include <string> #include <map> #include <cstdlib> #include ...
// replaceicon.cpp : Defines the entry point for the console application. // #include "stdafx.h" #pragma pack(2) // For each 1..idCount: typedef struct { BYTE bWidth; // Width, in pixels, of the image BYTE bHeight; // Height, in pixels, of the image BYTE bColorCount; // Number of colors in image (0 if >=8bpp) BY...
#include <ScrollView.h> #include <TextView.h> #include <String.h> #include <limits.h> #include "ErrorLogWindow.h" rgb_color white = {255,255,255,255}; rgb_color notwhite = {255,255,200,255}; class Error : public BView { public: Error(BRect rect,alert_type type,const char *tag,const char *message,bool timestamp,rg...
/** @file limeRFE_ADC_example.cpp @author <NAME> (www.limemicro.com) @brief LimeRFE ADC read example */ #include <lime/LimeSuite.h> #include <iostream> #include <chrono> #include <thread> #include <stdio.h> #include <cmath> #include "limeRFE.h" int openPort(char* portName); void closePort(int fd); int main(int ar...
#include <cassert> #include <ctime> #include <cctype> #include <string> #include <random> #include <chrono> #include <iostream> #include <sstream> #include <filesystem> #include <type_alias.h> #include <types.h> #include <input_parser.h> #include <go_types.h> #include <splitmix.h> #include <null_distribution.h> #inclu...
#include "stdafx.h" #include "ai_monster_squad.h" #include "../../entity.h" #include "../../ai_object_location.h" void CMonsterSquad::ProcessIdle() { m_temp_entities.clear(); VERIFY(leader && !leader->getDestroy()); // Выделить элементы с общими врагами и состянием атаки for (auto it_goal = m_goals.begin(); it_g...
/* Copyright (c) 2007 <NAME>. 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 require...
#include "ui_main_window.h" #include <QApplication> #include <QTimer> #include <QPainter> #include <QFileDialog> #include <QMessageBox> #include <QTextStream> #include <jack/jack.h> #include <mutex> #include <memory> #include <cmath> class SignalView : public QWidget { public: SignalView(QWidget *parent = nullptr...
#include <napi.h> #include <iostream> #include "ogg_opus_to_rtp.h" #include "helpers.h" Napi::FunctionReference OggOpusToRtp::constructor; Napi::Object OggOpusToRtp::Init(Napi::Env env, Napi::Object exports) { Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "OggOpusToRtp", {InstanceMeth...
/** XNGINE TODO: - Memory management / custom memory allocator / replace all mallocs and callocs - Improve Game state and Deferred Renderer relationship (esp w the lights) - Multiple demo scenes - Primitive polygon meshes and objects - basic Cube, Sphere, Cone, Cuboid, etc. ~~~ - Reference coun...
#include "ExternalModules.h" #include "RocketPlugin.h" /* * BakkesMod plugin overrides */ /// <summary>Registers notifiers for Rocket Plugin.</summary> void RocketPlugin::registerExternalCVars() { // std::string cvar, std::string defaultValue, std::string desc = "", bool searchAble = true, bool hasMin = fals...
/*============================================================================== file: mrShaderFilter.cpp author: <NAME> created: 21feb2003 description: The filter for the material/map browser, which also doubles as a PBValidator. modified: © 2003 Autodesk =================================...
/** * Copyright 2015 <NAME> */ #include "image.h" #include "GCanvas.h" #include "GBitmap.h" #include "GColor.h" #include "GMatrix.h" #include "GPath.h" #include "GPoint.h" #include "GRandom.h" #include "GRect.h" #include "GFilter.h" #include <string> static void draw_quad_rotate(GCanvas* canvas) { const GPoint...
#include "ItemTemplate.h" #include <cmath> #include <numeric> #include <cstdlib> ItemManager* ItemManager::LoadItemTemplates() { // read the characteristic bonuses from ability_bonus.csv gLog->Log("Item Loader", "Started"); std::string itemRangeFilename = "scripts/ranges.csv"; std::ifstream rs(itemRangeFilenam...
/** * Author: <NAME> */ #include "SPChatLogin.h" using namespace std; const unsigned char SPChatLogin::NO_KEY = 0; const unsigned char SPChatLogin::ASYMMETRIC_KEY = 1; const unsigned char SPChatLogin::ENCRYPTED_SYM_KEY = 2; const int SPChatLogin::ASYMMETRIC_LENGTH = 271; const int SPChatLogin::ENCRYPT...
/* ==================================================================== * The Vovida Software License, Version 1.0 * * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following ...
inline Track_by_arcs::Track_by_arcs() : n_segments(0), total_length(0.0), _w(0.0) {} inline Track_by_arcs::Track_by_arcs(Xml_document& doc, const scalar scale, const bool closed) : n_segments(doc.get_root_element().get_children().size()), starting_points(n_segments,{0.0,0.0,0.0}), starting_directions(n_segm...
#include "p2Defs.h" #include "p2Log.h" #include "j1App.h" #include "j1Input.h" #include "j1Textures.h" #include "j1Audio.h" #include "j1Render.h" #include "j1Window.h" #include "j1Map.h" #include "j1PathFinding.h" #include "j1Gui.h" #include "j1Controls.h" #include "j1Fonts.h" #include "j1Scene.h" #include "j1Player.h"...
/***************************************************************************************** NAME PacketWrapper DESCRIPTION Packet interface COPYRIGHT (C) QSI (Quantum Scientific Imaging) 2005-2006 REVISION HISTORY MWB 04.28.06 Original Version *********************************************************...
#include <SDL.h> #include <SDL_image.h> #include <SDL_mixer.h> #include <stdio.h> #include <string> #include <iostream> #include "dungeon.hpp" #include <string> //Screen dimension constants const int SCREEN_WIDTH = 800; const int SCREEN_HEIGHT = 600; //Starts up SDL and creates window bool init(); //Loads media ...
/******************************************************************************* * Copyright (c) 2007, 2008, CerroKai Development * 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...
/*** * * Hungarian Algorithm (aka Kuhn-Munkres) for weighted bipartite matching or the assignment problem * Returns the optimal assignment in a weighted bipartite graph * Sum of edges in the optimal matching is either minimum or maximum * * Let n = number of rows, m = number of columns * Complexity: ~O(max(n, m)...
/* * 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 a...