text
stringlengths
3.08k
12.5k
#include <bits/stdc++.h> using namespace std; #define debug(x) cerr << #x << " = " << x << "\n" #define all(x) (x).begin(),(x).end() #define len(x) (x).length() #define sqr(x) (x) * (x) using ull = unsigned long long; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; template <...
//------------------------------------------------------------------------------ // @file : tms_db_manager.cpp // @brief : manage the ros-tms database // @author : <NAME> // @version: Ver0.2.0 (since 2014.05.07) // @date : 2015.08.26 //------------------------------------------------------------------------------ ...
#ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #include <stdio.h> float angle = 0.0f; float globalX = 0.0f; float globalY = 0.0f; typedef struct Laser { float xPos, yPos, xVel, yVel; } Laser; typedef struct LaserNode{ Laser* val; struct LaserNode* next; } LaserNode; LaserNode** laserL...
#include "../../../shared/generated/cpp/CameraBase.h" #include <common/RhodesApp.h> // Rhodes Application utilities #include "Imager.h" #include <sstream> #pragma comment(lib, "uuid.lib") #pragma comment(lib, "dmoguids.lib") #pragma comment(lib, "strmiids.lib") #pragma comment(lib, "strmbase.lib") PListDevName...
/* Copyright 2013-2014 MultiMC Contributors * * 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...
/* * Copyright 2010-2011 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
// Copyright 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: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and...
#include "Kurisu.h" #define _2D 2 // yep, Kurisu is 2D int Kurisu::createWindow (int w, int h) { SDL_Init (SDL_INIT_VIDEO); SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute (SDL_GL_CONTEXT_MINOR_VERSION, 1); SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); window = SDL_CreateWindow ("Kuri...
// // ofxLaserDacAssigner.cpp // ofxLaser // // Created by <NAME> on 06/11/2017. // // #include "ofxLaserDacAssigner.h" using namespace ofxLaser; DacAssigner * DacAssigner :: dacAssigner = NULL; DacAssigner * DacAssigner::instance() { if(dacAssigner == NULL) { dacAssigner = new DacAssigner(); } return dacAs...
// Copyright 2017 <NAME>. All rights reserved. #include "walterAbcExportExtensions.h" #include "AbcWriteJob.h" #define MNoVersionString #include <Alembic/AbcMaterial/OMaterial.h> #include <maya/MFnPlugin.h> #include <maya/MGlobal.h> #include <boost/algorithm/string.hpp> #include <boost/property_tree/json_parser.hpp...
#include <iostream> #include <vector> #include <map> #include <string> using namespace std; typedef vector<struct Node*> Nodes; // list of pointers to nodes contained in graph typedef vector<pair<struct Node*, double>> nbrNodes; // list of pointers to neighbouring nodes with specified costs // Node in the ...
// Copyright (c) 2019-2020 <NAME> // SPDX-License-Identifier: BSD-3-Clause #include "DeviceCache.hpp" #include "Utility.hpp" #include <Pothos/Managed.hpp> #include <Pothos/Object.hpp> #include <Pothos/Plugin.hpp> #include <Poco/Format.h> #include <Poco/Logger.h> #include <Poco/RegularExpression.h> #include <algorit...
#include "UIElement.h" #include "UIController.h" using namespace ci; using namespace ci::app; using namespace std; using namespace MinimalUI; int UIElement::DEFAULT_HEIGHT = 36; UIElement::UIElement( UIController *aUIController, const std::string &aName, const std::string &aParamString ) : mParent( aUIController ),...
/* * Copyright 2016 The Cartographer Authors * * 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...
#include <CGAL/Simple_cartesian.h> #include <CGAL/Surface_mesh.h> #include <CGAL/Timer.h> // Simplification function #include <CGAL/Surface_mesh_simplification/edge_collapse.h> #include <CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h> #include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/C...
/* * Copyright (c) 2013-2015, The University of Oxford * 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 ...
/* Find the max flow in the graph. Найдите максимальный поток в сети. Первая строка содержит два числа 2≤v≤50 и 0≤e≤1000 — число вершин и число рёбер сети. Следующие e строк описывают рёбра: каждая из них содержит три целых числа через пробел: 0≤ui<v, 0≤vi<v, 0<ci<50 — исходящую и входящую вершины для этого ребр...
#include <iostream> #include <fstream> #include "LinearRegression.h" #include <stdlib.h> using namespace std; /*class weatherdata { public: double days[1000]; double temperatures[1000]; int count; weatherdata() { count=0; } void readweatherdata(int choice); }; void weatherdata::readweatherdata(int choice) {...
/* * Struck: Structured Output Tracking with Kernels * * Code to accompany the paper: * Struck: Structured Output Tracking with Kernels * <NAME>, <NAME>, <NAME> * International Conference on Computer Vision (ICCV), 2011 * * Copyright (C) 2011 <NAME>, Oxford Brookes University, Oxford, UK * * T...
/****************************************************************************** * Copyright (c) 2019, Xilinx, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributio...
int Subject::bar(bool fat,uint8_t n){ uint8_t ar[]={1,2,3,4,5,6,7,28,40,41,42,43,44,45,46,51, (uint8_t)(fat?8:1), (uint8_t)(fat?9:1), (uint8_t)(fat?10:1), (uint8_t)(fat?29:1), 54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72, ...
/* Copyright 2015 Software Reliability Lab, ETH Zurich 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 applicabl...
// // TestRunnerMobile.cpp // // Created by <NAME> on 22 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 "TestRunnerMobile.h" #include <QThread> #include <Qt...
/*----------------------------------------------------------------------- <NAME> 2017 - 2020 http://trederia.blogspot.com crogine - Zlib license. 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 softwar...
#include "Sprite.h" using namespace std; SpriteManager SpriteManager::manager; SpriteManager::SpriteManager(){ } SpriteManager::~SpriteManager(){ for(auto ptr : this->spriteList){ SAFE_DEL(ptr); } } SpriteManager* SpriteManager::getInstance(){ return &(SpriteManager::manager); } void Spr...
#include <drag.h> #include <cmath> // 1976 Standard Exponential atmosphere values double std1976_values[28][3] = { {0, 1.225, 7.249e+3}, {25000, 3.899e-2, 6.349e+3}, {30000, 1.774e-2, 6.682e+3}, {40000, 3.972e-3, 7.554e+3}, {50000, 1.057e-3, 8.382e+3}, {60000, 3.206e-4, 7.714e+3}, {70000, 8.77e-5, 6.549...
#include "systemc" using namespace sc_core; using namespace sc_dt; using namespace std; #include "tlm.h" // Initiator module generating generic payload transactions struct Initiator: sc_module, tlm::tlm_bw_transport_if<> { // TLM-2 socket, defaults to 32-bits wide, base protocol tlm::tlm_initiator_socket<> sock...
/** * File : B.cpp * Author : <NAME> * Created : 2018-2-11 19:57:26 */ #include <iostream> #include <iomanip> // << fixed << setprecision(xxx) #include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ; #include <vector> #include <string> // to_string(nnn) // substr(m, n) // stoi(nnn) #include <com...
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <time.h> #include <sstream> #include <iomanip> #include <algorithm> #include "RSA.h" void RSAEncryption::initMPZ() { //Clear Function mp_get_memory_functions (NULL, NULL, &mpz_clear_func); //Initialize rand seed u...
// target specific IO header #include <avr/io.h> // NOTE that you need to add library platform independent and platform specific // folders to compiler include files search Pbths: // '../../mcucpp' and '../../mcucpp/AVR' respectively for this example // defination of TPin class #include <iopins.h> // d...
/* ** Copyright (C) 1998-2004 <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 program...
// // Mach7: Pattern Matching Library for C++ // // Copyright 2011-2013, Texas A&M University. // Copyright 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: // // ...
#include <ginac/ginac.h> using namespace GiNaC; ex build_sin(symbol x0, symbol y0, symbol x, symbol y) { ex up = y - y0; ex down = pow(x - x0, 2) + pow(y - y0, 2); down = sqrt(down); ex sn = up / down; return sn; } ex build_cos(symbol x0, symbol y0, symbol x, symbol y) { ex up = x - x0; ex down = pow(x - x0,...
/* * Copyright (C) 2016 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...
// // ppdedge.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 <stdlib.h> #i...
// Copyright (c) 2009-2010 <NAME> // Copyright (c) 2009-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "pow.h" #include "chain.h" #include "chainparams.h" #include "primitives/block.h" ...
/* * Copyright (C) 2017-2021 Jolla Ltd. * Copyright (C) 2017-2021 <NAME> <<EMAIL>> * * You may use this file under the terms of the BSD license as follows: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * *...
/* * Copyright (c) 2010 SURFnet bv * 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 condition...
#include "video.h" #include "shim.h" const common::logger& video::logger = common::logger::get ( "shimmer::sdl2::video" ); video::video( class shim* shim ) : _shim ( shim ), _source_surface ( nullptr ), _renderer ( nullptr ) {} video::~video() { if ( _source_surface == nullptr ) sym::SDL_Fre...
/* * * Copyright (C) 2000 Silicon Graphics, 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 published by the Free Software Foundation; either * version 2.1 of the License, or (at your opti...
// // File: MvaFrequenciesSet.cpp // Created by: <NAME> // Created on: Sat Jan 12 2013 // /* Copyright or (c) or Copr. Bio++ Development Team, (November 16, 2004) This software is a computer program whose purpose is to provide classes for phylogenetic data analysis. This software is governed ...
#include "mpi.h" #include "mlpack/core.hpp" #include "mlpack/methods/decision_tree/decision_tree.hpp" #include "mlpack/methods/softmax_regression/softmax_regression.hpp" #include <string> const std::string data_files_extension = ".bin"; const std::string get_object_data_file_prefix(const int object_id); const std::str...
#include <gh-lru/expiring_lru_cache.hpp> #include <boost/functional/hash.hpp> #include <gtest/gtest.h> size_t actualKeycopies = 0; size_t expectedKeyCopies = 0; size_t actualValueCopies = 0; size_t expectedValueCopies = 0; size_t actualValueEmpty = 0; size_t expectedValueEmpty = 0; class MyKey { public: MyKey(i...
/* * Copyright (c) 2010 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, dis...
// Software License for MTL // // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: <NAME> and <NAME> // // ...
#include "client.h" #include "prediction.h" #include "gfx/lerp.h" #include "cmd/unit_generic.h" /* ************************************************************************************ **** Prediction virtual class *** ***********************************************...
#pragma once #include "../../../include/ds/ExpMap.hpp" #include "../../../include/ds/ExpSlotList.hpp" #include <chrono> #include <deque> #include <functional> #include <gtest/gtest.h> #include <iostream> #include <list> #include <shared_mutex> #include <vector> //--------------------------------------------------------...
#include "AnimationFile.h" #include <boost/tokenizer.hpp> AnimationFile::AnimationFile() { this->output_state = ""; this->animation = ""; this->direction = 'D'; this->speed = 1.0; this->stopMin = 0.0; this->stopMax = 0.0; this->probability = 1.0; this->randomHeadMovement = 'N'; } AnimationFile::AnimationFile(...
////////////////////////////////////////////////////////////////// // (c) Copyright 2008- by <NAME> ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // National Center for Supercomputing Applications & // Materials Computation Cen...
// Copyright 2010 <NAME> // henry UNDERSCORE christophe AT hotmail DOT com // This is an extended version of the state machine available in the boost::mpl library // Distributed under the same license as the original. // Copyright for the original version: // Copyright 2005 <NAME> and <NAME>. Distributed // under...
#include <glob.h> #include <iostream> #include <fstream> #include <vector> #include <string> #include <algorithm> #include <iterator> #include <mpi.h> #include <time.h> #include <math.h> #include <boost/program_options.hpp> #include <boost/regex.hpp> std::string matchToEnv(boost::smatch const& match) { const char * s...
#include "Texture.h" #include <iostream> #include <fstream> #include <stdexcept> #include "Exceptions.h" using namespace std; void userReadData(png_structp pngRead, png_bytep data, png_size_t length) { png_voidp f = png_get_io_ptr(pngRead); ((ifstream*)f)->read((char*)data, length); } Texture::Texture(const char...
/*============================================================================= Copyright (c) 2016-2020 <NAME> Distributed under the MIT License [ https://opensource.org/licenses/MIT ] =============================================================================*/ #include "app.hpp" using namespace cycfi::artis...
#include "USNParser.h" #include "util.h" #include <QDebug> USNParser::USNParser(const char dl) { driver_letter = dl; char vol[10] = ".:\\"; vol[0] = dl; char sysNameBuf[128]; int status = GetVolumeInformationA(vol, NULL, 0, NULL, NULL, NULL, sysNameBuf, 128); if (status && strcmp(sysNameBuf, "NTF...
// Copyright 2016 The University of North Carolina at Chapel Hill // // 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...
// gwish.cpp: This is a collection of device functions that manipulate graph objects according to the G-Wishart distribution. // Note: this depends on the graph.cpp library // <NAME> : <EMAIL> -- based on <NAME> : <EMAIL> #define GWISH_CPP #ifndef GRAPH_H #include "graph.h" #endif void log_det(int p, Real* A, Real *...
// Copyright 2016 The Fuchsia 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 "msd_intel_connection.h" #include "magma_util/dlog.h" #include "msd_intel_semaphore.h" #include "ppgtt.h" void msd_connection_close(msd_connecti...
#ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #include <cmath> #include <cstdio> #include <functional> #include <limits> #include <stdexcept> #include <unordered_map> #include <utility> #include <vector> namespace { struct UnweightedEdge { unsigned src, dest; }; constexpr bool operator==...
/*************************************************************************** * * Copyright (c) 2016 Baidu, 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 * ...
/* Copyright 2021 Google LLC All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
#pragma once #include <iostream> #include <fstream> #include <map> #include <Tcp/AsyncServer.h> #include "../bodyparser.hpp" #include "../http/json.hpp" #include "../http/Utility.hpp" #include "../http/sha1/sha1.hpp" #include "../http/base64/base64.hpp" using namespace std; class WebsocketInstance{ public: ...
/** * @file fields_demo.cpp * * @brief A demonstration of some fields features. * * @author <NAME> (<EMAIL>) * @date 13 May 2020 * @copyright <NAME> * Licensed under the MIT license. See LICENSE file. * */ #include <string> #include <cmath> #include <iostream> #include <iomanip> #define USE_PRECI...
/*************************************************************************** ** ** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the QtBluetooth module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** Commercial License Usage ** Licensees ho...
#include "staff.h" void POVstaff::begin(){ pinMode(PIN_VSENSE, INPUT); #ifdef PIN_CLOCK pinMode(PIN_CLOCK, OUTPUT); pinMode(PIN_DATA, OUTPUT); #endif //Serial.println("Starting..."); _pixels.begin(); _pixels.clear(); // Make sure strip is clear _pixels.show(); // before measuring battery ...
#include "./snake.hpp" #include "hardware/pwm.h" #include "picosystem.hpp" #include "../snakesheet_ids.hpp" using namespace picosystem; vec_t snake_t::next() { return { .x = body[0].pos.x + newdir.x, .y = body[0].pos.y + newdir.y }; } void snake_t::advance(bool ate) { // Insert the next p...
#include "EnsembleHandler.h" using namespace std; Ensemble::Ensemble(){ EnsembleSize = -1; Xdim = -1; Ydim = -1; LevelSet = -1.0; } Ensemble::Ensemble(const Ensemble& e) :EnsembleSize(e.EnsembleSize){ EnsembleSize = e.EnsembleSize; Xdim = e.Xdim; Ydim = e.Ydim; FieldAvg = e.FieldAvg; ...
#include <iostream> //std::cout, std::cin #include <vector> //std::vector<> #include <fstream> //std::ifstream,std::ofstream #include <string> //std::string #include<iomanip>//setw(),setfill() using namespace std; struct Valores { string item,//armazena o indice do item quantidade,//armazena a quantidade de ite...
#include "MovementManager.h" #include <String> #include <iostream> void MovementManager::ballMove(Ball *ball, sf::CircleShape *ballShape) { ball->ax = (-ball->vx) * 0.5f; //setting an acceloration value (friction on the table) ball->ay = (-ball->vy) * 0.5f; ball->vx += (ball->ax * dt); //applying the frict...
#include<bits/stdc++.h> #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.end() #define pr(v) { for(int i=0;i<v.size();i++) { v[i]==I...
/********************************************************************** * Copyright (c) 2008-2013, Alliance for Sustainable Energy. * 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 published ...
#include "portability.h" #include "unittest.h" #include "cli_Aliases.h" #include "cli_Parser.h" class AliasTest : public CPPUNIT_NS::TestCase { CPPUNIT_TEST_SUITE(AliasTest); // The name of this class #ifdef DO_ALIAS_TESTS CPPUNIT_TEST(testOne); CPPUNIT_TEST(testTwo); CP...
//--------------------------------------------------------------------------- // (c) Copyright 2000 <NAME>. All rights reserved. //--------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> //------------------------------------------------------------------------...
// // Created by filip on 20.03.2020. // #include "MinesweeperBoard.h" #include <iostream> #include <cstdlib> MinesweeperBoard::MinesweeperBoard(int width, int height, GameMode mode) { this->width = width; this->height = height; this->mode = mode; this->buildField(); }; void MinesweeperBoard::debug_...
/******************************************************************************* * Copyright © 2014-2015, <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of...
#include "engine/vfs.h" #include "graphics/assets/assets.h" #include <time.h> #include <sys/stat.h> #include <stdio.h> #ifdef __APPLE__ #define _stat stat #endif FILE* open(string_view full_filepath, const char* mode) { return fopen(full_filepath.c_str(), mode); } FILE* open_rel(string_view filepath, const char* mo...
#include "gui/commentator_drawer.h" #include "base/strings.h" #include "gui/screen.h" #include "gui/unique_sdl_surface.h" #include "gui/util.h" using namespace std; namespace { static void drawNumber(Screen* screen, const Box& b, int n) { SDL_Surface* surface = screen->surface(); SDL_Color color; color....
/* * Copyright (c) 2020 Valve Corporation * Copyright (c) 2020 LunarG, 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 * * Unl...
/* * Copyright 2012 <NAME>, CRACS & INESC-TEC, DCC/FCUP * * 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 requir...
/* Sony voice recorder MSF reader using reverse-engineered structure The MIT License (MIT) Copyright (c) 2013 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, inclu...
#include <imgui.h> #include <imgui_internal.h> #include <GL/gl3w.h> #include <GLFW/glfw3.h> #ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL #include <GLFW/glfw3native.h> #endif #define CR_HOST CR_UNSAFE #include "cr.h" #include "fswatcher/fswatcher.h" typedef std::chron...
// <NAME> // Solution to https://dmoj.ca/problem/coci06c1p6 #include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD1 = 1e9 + 9; const ll prime1 = 999983; const ll MOD2 = 1e9 + 7; const ll prime2 = 999979; const ll invprime1 = 943912055; const ll invprime2 = 672490127; const ll MOD3 = 1e9 + 21...
#include "httpconnection.h" HttpConnection::HttpConnection(QObject *parent) : TcpConnection(parent) { qDebug() << this << "Created"; m_mime.insert("txt","text/plain"); m_mime.insert("htm","text/html"); m_mime.insert("html","text/html"); m_mime.insert("js","text/javascript"); m_mime.insert("rtf...
// // test msg // - Sept 2001. // #include <sys/kernel.h> #include <iostream.h> #include <VisDMatrix.h> #include "YARPAll.h" //#include "YARPImageServices.h" #include "YARPPort.h" //#include "YARPImagePort.h" #include "YARPThread.h" #include "YARPSemaphore.h" #include "YARPTime.h" #include "YARPRandomNumber.h" #inc...
#include <windows.h> #include "FirstLoad.h" #define LITTLEBEARNAME "SystemService" #define LOG_FILENAME "log.txt" DWORD dwflag = FALSE; int WriteLog(char * pLog) { int iRet = 0; HANDLE hFile = CreateFileA(LOG_FILENAME,GENERIC_WRITE,0,0,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYST...
// Copyright (c) 2007-2008 Facebook // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
/* * Copyright (c) 2019-2021, NVIDIA CORPORATION. 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 ...
#include "object_detection.h" ObjectDetection::ObjectDetection() { // カラー画像をサブスクライブ image_sub_ = nh_.subscribe("/image_raw", 1, &ObjectDetection::imageCb, this); // 処理した画像をパブリッシュ msg_pub = nh_.advertise<std_msgs::String>("/msg_topic", 1, true); // 赤色のしきい値を設定 nh_...
#include<stdio.h> #include<stdlib.h> #include<conio.h> struct node{ int id,val; node *fa,*son[2]; }; node *rt; int cnt = 0; void rotate(node* r,int s) { node *p, *q; q = r->son[s ^ 1]; p = q->son[s]; if(p != NULL) p->fa = r; r->son[s ^ 1] = p; q->son[s] = r; q->fa = r->fa; r->fa = q; if(q->fa != NUL...
/* This file is part of Sorts, an interface between Soar and ORTS. (c) 2006 <NAME>, <NAME>, and <NAME> Sorts 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...
/* Copyright (c) 2005 - 2012 Vertica, an HP company -*- C++ -*- */ #include "ProcessLaunchingPlugin.h" #include "Vertica.h" #include "LoadArgParsers.h" #include "popen3.h" #include <stdio.h> #include <unistd.h> #include <sys/wait.h> #include <errno.h> #include <fcntl.h> using namespace Vertica; ProcessLaunchingPlugi...
/* * This file is part of the Simutrans project under the Artistic License. * (see LICENSE.txt) */ #include "../world/simworld.h" #include "../simskin.h" #include "../obj/baum.h" #include "../dataobj/environment.h" #include "../dataobj/loadsave.h" #include "../dataobj/translator.h" #include "boden.h" #include "...
// // Created by Dado on 09/12/2019. // #include "mongo.hpp" #include <core/file_manager.h> #include <core/string_util.h> #include <core/http/webclient.h> Mongo::Mongo(const DBConnection &_cs) { auto completeConnectionString = "mongodb://" + _cs.path + "/" + _cs.defaultDatabase + "?replicaSet=" + ...
//------------------------------------------------------------------------------------ // MIT License // // Copyright (c) 2020 <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 wit...
/* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * 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 l...
#include <limits> #include <clw_image.hpp> #include <clw_context.hpp> #include <clw_vector.hpp> #include <clw_function.hpp> #include "volume_block.hpp" #include "common.hpp" #include "debug_helper.hpp" #include "reference_volume.hpp" reference_volume::reference_volume(clw_context &c, volume_block *b) : ...
/* Copyright (c) 2018-2019 the `graphkernels` developers * All rights reserved. */ #include "wl.h" #include <algorithm> #include <functional> #include <numeric> #include <set> using std::accumulate; using std::greater; using std::set; using std::sort; using std::vector; using Eigen::MatrixXd; using Eigen::MatrixX...
//------------------------------------------------------------------------------ // VolumeTexture.cc //------------------------------------------------------------------------------ #include "Pre.h" #include "Core/Main.h" #include "Gfx/Gfx.h" #include "Dbg/Dbg.h" #include "Assets/Gfx/ShapeBuilder.h" #include "shaders....
// Construction/Destruction: template<class TSig, class TPar> rsDoublePendulum<TSig, TPar>::rsDoublePendulum() { // init inherited variables: this->x = 0.0; this->y.setDimensionality(4); setState(0.5*PI, PI, 0.0, 0.0); // 1st arm horizontal, 2nd arm upright // set up user parameters: setLength1(1.0); se...
/* * problem_celebration.cpp * * Created on: Aug 6, 2020 * Author: guangping */ #include "greedy_solver.h" void greedy_solver::set(problem& P, size_t boxN, size_t N, int focus, string solver_id, const std::vector<size_t>* boxNumbers, bool M_flag_p){ solver::set(P); greedy_solution.reserve(pointNumber); ...
// // // MIT License // // Copyright (c) 2017 Stellacore Corporation. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to ...