text
stringlengths
3.08k
12.5k
#include "Tile.h" #include "Map.h" #include "Player.h" extern Assets assets; extern Map* map_; extern sf::RenderWindow* renderWindow_; Tile::Tile() : road(false) { } //Tile::Tile(const int& x, const int& y, const int& z) : // Tile(sf::Vector3<int>(x, y, z)) { //} Tile::Tile(const int & a, const int & b, const Terr...
#include <string> #include <iostream> #include <fstream> #include <locale> #include <libgen.h> // for locale stuff (comma-formatted numbers) #include <cerrno> #include <cstdio> #include <getopt.h> #include "global.h" // global variables #include "shrinksam.h" #include "process_stream.h" using namespace s...
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // This job type handles Chrome plugin network interception. When a plugin // wants to intercept a request, a job of this type is created. Th...
/* * FILE: B.cpp * * @author: <NAME> <arafathasanjenin[at]gmail[dot]com> * * LINK: * * DATE CREATED: 23-12-17 20:54:30 (+06) * LAST MODIFIED: __last_modified * * DESCRIPTION: * * DEVELOPMENT HISTORY: * Date Version Description * -----------------------------------------------------------------...
#include "PlayerControllerSystem.h" #include "..\Factory.h" #include "..\ECS\World.h" #include <winuser.rh> #include <winuser.h> #include "..\Events\DisplayTextEvent.h" #include "..\Events\SoundEvent.h" #include "..\Data\Enums.h" #include "..\Events\TorchToggleEvent.h" #include "..\Events\KeyboardInputEvent.h" void Pl...
#include "projections.h" #define _USE_MATH_DEFINES #include <math.h> #include <iostream> #define TINYOBJLOADER_IMPLEMENTATION // define this in only *one* .cc #include "tiny_obj_loader.h" cg::ObjParser::ObjParser(std::string filename) : filename(filename) { faces.clear(); } cg::ObjParser::~ObjParser() { faces...
#include "protocols/wl/pointer.hpp" #include "protocols/wl/keyboard.hpp" #include <spdlog/spdlog.h> #include <linux/fb.h> #include <linux/kd.h> #include <linux/input.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/inotify.h> #include <fcntl.h> #include <std...
#include "SDL_net.h" #include "SDL_ttf.h" #include "SDL_image.h" #include "SDL_mixer.h" #include "MyGame.h" using namespace std; const char* IP_NAME = "localhost"; const Uint16 PORT = 55555; bool is_running = true; MyGame* game; static int on_receive(void* socket_ptr) { TCPsocket socket = (TCPsocket)socket_p...
/* * RemoteSwitch library v2.3.0 (20121229) made by <NAME> http://randysimons.nl/ * See RemoteReceiver.h for details. * * License: GPLv3. See license.txt */ #include "RemoteReceiver.h" /************ * RemoteReceiver ************/ int8_t RemoteReceiver::_interrupt; volatile int8_t RemoteReceiver::_state; byte R...
/*==================================================================* * ___ _ _ _ _ _ * * / __(_)_ __ ___ | |__ _ _| |_ _(_)_ __ | |_ ___ _ __ * * / _\ | | '_ ` _ \| '_ \| | | | \ \ /\ / / | '_ \| __/ _ \ '__| * * / / | | | | | | | |_) | |_| | |\ V V /| | | | |...
#pragma once #include "SFML/Network.hpp" #include "ClientInfo.hpp" #include <functional> #include <unordered_map> struct ClientConnection final { private: friend class NetServer; std::unique_ptr<sf::TcpSocket> m_socket; ClientInfo m_clientInfo; public: ClientConnection(std::unique_ptr<sf::TcpSocket> socket, Clien...
#include "reads.hpp" const char Reads::EXTENSION[] = "lfq"; const char Reads::INDEX_EXTENSION[] = "lfqi"; const uint8_t Reads::BASES_BYTES = 4; Reads::Reads(const std::string& path, ReadsMode mode) : file(), index(), read_i(0) { this->open(path, mode); } Reads::~Reads() { this->file.close(); } const std::vect...
#include <iostream> #include <linux/input.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <cstring> #include <fstream> #include <unordered_map> #include <sys/time.h> #include <ext/stdio_filebuf.h> using namespace std; //Keeping track of presses. struct PressRecord { bool ...
/// @file tParallelMetadataSnoop.cc /// @details /// This application runs parallel metadata adapter prints some stats /// similar to msnoop utility (but it works via MetadataSource). It is handy for /// ingest scaling tests as it mimics the behaviour of the receiving part /// without visibility/synchronisatio...
#include <sirius.hpp> using namespace sirius; void test_wf_inner(std::vector<int> mpi_grid_dims__, double cutoff__, int num_bands__, int bs__, linalg_t la__, memory_t mem_bra__, memory_t mem_ket__, ...
#include "Engine.h" // XML reader #include "../Utils/tinyxml2.h" #include <sstream> #include <cstdlib> using namespace tinyxml2; #include <iostream> #include "Math.h" #include "FilesHelper.h" #include "ResourceManager.h" #include "Logger.h" #include "XmlUtils.h" #include "../Game/Directories.h" Engine::Engine(std...
//----------- allPages.cpp ---------------------------------------------------- //---------------------------------------------------------------------------- //#define ISOLATION_AWARE_ENABLED 1 //#include <windows.h> //#include <commctrl.h> #include "precHeader.h" //----------------------------------------------------...
#include <iostream> #include <numeric> #include <chrono> #include <docopt/docopt.h> #include <SFML/Graphics.hpp> #include <boost/range.hpp> #include <boost/iterator/distance.hpp> #include <boost/range/adaptor/transformed.hpp> #include <boost/range/algorithm/min_element.hpp> #include "utils.hpp" class Compressor { p...
// Copyright (c) 2019 Bitcoin Association. // Distributed under the Open BSV software license, see the accompanying file LICENSE. #include "logging.h" #include <boost/iterator/filter_iterator.hpp> #include <mining/journal_builder.h> #include <mining/journal_change_set.h> #include <txmempool.h> #include <validation.h>...
/* * Copyright 2010 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrAtlas.h" #include "GrContext.h" #include "GrGpu.h" #include "GrRectanizer.h" #include "GrPlotMgr.h" #if 0 #define GR_PLOT_WIDTH 8 #define GR_PLOT_HEIGHT 4 #...
// // Created by lab on 2021/8/25. // #include "global.h" param CfgParam; PinholeCam Cam; Eigen::Matrix4f T_base; void readParameters(std::string config_file) { cv::FileStorage fsSettings(config_file, cv::FileStorage::READ); cout << "start loading parameters from:"<<config_file << endl; // load cam info: ...
// // PatternScanner.cpp // ButOSX // // Created by Can on 1.11.2020. // Copyright © 2020 Lyceion. All rights reserved. // // All Credits goes to: https://github.com/aKalisch/gosx-public-external/blob/f41c9ec45eb0cc657fa81c50b45bd966e302be22/Engine/MemoryManager/pattern.cpp // 24.07.2021 -> I should rewrite it bu...
/* * Optimal Lunar Landing Analysis * https://github.com/dankrusi/optimal-lunar-landing-analysis * * Contributor(s): * <NAME> <<EMAIL>> (original author) * * 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 * ...
//#define GLEW_BUILD #define GLM_FORCE_RADIANS #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <cmath> #include <cstdlib> #include <assert.h> #include <GL/gl3w.h> #include <GLFW/glfw3.h> void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode); void che...
#include "MarineManager.h" #include "Util.h" #include "CCBot.h" #include <cmath> MarineInfo::MarineInfo() : m_hpLastSecond(45) { } MarineInfo::MarineInfo(float hp) : m_hpLastSecond(hp) { } MarineManager::MarineManager(CCBot & bot) : MicroManager(bot) { } void MarineManager::executeMicro(const std::vector<cons...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/common/extensions/feature.h" #include <map> #include "base/command_line.h" #include "base/lazy_instance.h" #include "base/stringpri...
/** * Copyright 2014- Social Robotics Lab, University of Freiburg * * 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...
#include "tools.h" using namespace std; // ************************************************** void displayHeader() { cout << " _ _ _____ _____ _____ _ _ _ _ _ " << endl; cout << " | \\ | | /\\ / ____|/ ____| / ____| | (_) | | | (_) ...
#include <algorithm> #include <cmath> #include <iostream> #include <vector> #include <boost/geometry.hpp> #include <boost/geometry/geometries/box.hpp> #include <boost/geometry/geometries/point.hpp> #include <boost/geometry/index/rtree.hpp> #define DATASET_SIZE 500 #define ELIPSON 30 #define MIN_POINTS 10 using names...
//===-- lib/galaxy/Parser.cpp - Parser class definition ----*- C++ -*-===// // // The Galaxy Programming Language // // This file is distributed under the ISC License. // See LICENSE.TXT for details. // //===-----------------------------------------------------------------===// /// /// \file /// \br...
#include <array> #include <algorithm> #include <istream> #include <optional> #include <ranges> #include <vector> #include "util.h" namespace { template<int LEVELS> struct SnailNumber { public: explicit SnailNumber() { numbers.fill(-1); } int magnitude() const { auto magnitudes = std::array<int,...
#include <gtest/gtest.h> #include <rtw/algorithm/binary_search.hpp> #include <array> #include <vector> #include <deque> #include <forward_list> #include <list> class EqualRangeTest : public ::testing::Test{ protected: EqualRangeTest() {} virtual ~EqualRangeTest() {} virtual void SetUp() override {} vi...
#include <algorithm> #include <iostream> #include <limits> #include <vector> using namespace std; long long t, w, n, x[100010], sum[100010]; // 是否一定就是变成现在存在的某个数? // 比如 1 2 100000,N 为 200000000,这个时候可以都变成 2 // 1 2 100000 100000 // 50000 * 4 vs. 100000 * 2 // 可以验证,一定是都变成现存的某个数,否则的话可以把部步数转义之后会等价的 // 如何计算任意两个数之间的距离?...
/* * Copyright (c) 2018 Samsung Electronics 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...
/* * BSD 2-Clause License * * Copyright (c) 2017, <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 ...
// Copyright (c) 2020 LG Electronics, 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 agre...
// Game_Music_Emu $vers. http://www.slack.net/~ant/ #include "Ym2610b_Emu.h" #include "fm.h" #include <string.h> static void psg_set_clock(void *param, int clock) { Ym2610b_Emu *info = (Ym2610b_Emu *)param; info->psg_set_clock( clock ); } static void psg_write(void *param, int address, int data) { Ym2610b_Emu *in...
#include "Dialect/Stencil/Passes.h" #include "Dialect/Stencil/StencilDialect.h" #include "Dialect/Stencil/StencilOps.h" #include "Dialect/Stencil/StencilTypes.h" #include "Dialect/Stencil/StencilUtils.h" #include "PassDetail.h" #include "mlir/IR/Value.h" #include "mlir/Pass/Pass.h" #include "mlir/Support/LLVM.h" #inclu...
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a...
/* * Copyright 2016 - 2019 <NAME>, <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
// // Nov-2020, <NAME> // MIT license // #include "renderer3.h" #include "cube3_data.h" #include "spiel/color.h" #include "essentutils/filesys.h" #include "glfw/glfw3.h" #include "glm/gtx/rotate_vector.hpp" #include "opengl_util/gll_binding.h" bool Renderer3::setup() { if (!setupShaders()) return false; i...
/***************************************************************************** * * $Id$ * * Copyright (C) 2006-2009 <NAME>, Ingenieurgemeinschaft IgH * * This file is part of the IgH EtherCAT Master. * * The IgH EtherCAT Master is free software; you can redistribute it and/or * modify it under the terms ...
#include "tortuosity_unified.h" puma::TortuosityUnifiedReturn puma::compute_TortuosityUnified_particle(puma::Workspace *grayWS, puma::Cutoff cutoff, int numParticles, int randomSeed, double totalLength, bool print, int numThreads) { if (cutoff.first < -0.5 || cutoff.second > 32767.5 || cutoff.first > cutoff.seco...
// C++ program to implement multilevel queue scheduling #include <bits/stdc++.h> using namespace std; struct Process { int pid; // Process ID int bt; // Burst Time int art; // Arrival Time int queue; // queue number }; // Function to find the waiting time for all processes void findWaitin...
/* * mmvtkmMeshRenderTasks.cpp * * Copyright (C) 2020-2021 by Universitaet Stuttgart (VISUS). * All rights reserved. */ #include "stdafx.h" #include "mmvtkm_gl/mmvtkmMeshRenderTasks.h" #include "mesh_gl/MeshCalls_gl.h" using namespace megamol; using namespace megamol::mmvtkm_gl; mmvtkmMeshRenderTasks ::mmvtkm...
#include <unistd.h> #include <stdio.h> #include <dirent.h> #include <string.h> #include <sys/stat.h> #include <stdlib.h> #include <time.h> #include <pwd.h> #include <vector> #include <string> #include <sys/ioctl.h> #include "dir_traverse.h" #include "screen_man.h" #include <bits/stdc++.h> using namespace std; bool co...
/* * Copyright 2018-2019 Autoware Foundation. 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 requi...
/* * Copyright 2014 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 applicab...
/* Copyright (c) 2014, Intel Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redis...
#include <stdexcept> #include <tuple> #include "http_handler.hpp" using boost::asio::ip::tcp; using boost::asio::buffer; class http_invalid_request : public std::exception {}; void http_handler::start() { _socket->set_option(tcp::no_delay(true)); do_read_header(); } void http_handler::do_read_header() { auto ...
// Class for selecting Silberberg-Tsao algorithms for cross-section calculations #include "Activia/ActSTXSecAlgorithm.hh" #include "Activia/ActAbsXSecModel.hh" #include "Activia/ActTargetNuclide.hh" #include "Activia/ActProdNuclideList.hh" #include "Activia/ActNucleiData.hh" #include "Activia/ActSTSelect.hh" #inclu...
#include <stdio.h> #include <GL/glew.h> #include <GLFW/glfw3.h> #include <vector> #include <algorithm> #include <memory> #include <functional> #include <string> #include <cmath> #include <optional> #include <cstdlib> #include <time.h> #include "util.h" #include "shaders.h" const GLint WIDTH = 800; const GLint HEIGHT ...
#include <cfloat> #include "HeuCHH.h" HeuCHH::HeuCHH(QuadraticGAP* QGAPinst) { QGAP = QGAPinst; } HeuCHH::~HeuCHH() { } // CHH heuristic void HeuCHH::goCHH(CPXENVptr env, CPXLPptr lp, int maxnodes, int optimality_target, vector<int> sol) { int i,j,n,m,status,solstat=0; double objval; double *x = NULL;...
#include "Projectile.h" #include <cmath> Projectile::Projectile() { //ctor } Projectile::~Projectile() { //dtor } Projectile::Projectile(double newX, double newY, double newWidth, double newHeight, int newDamage, float newSpeed, string newName, string newTag, double newTargetX, double newTargetY) { xPos =...
#include <bits/stdc++.h> using namespace std; const int maxn = 200010; int N, M, current_x, current_id; // Segments, Queries inline int compareTo(double x, double y, double tol=1e-9) { return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1; } struct point { int x, y; point(int x = 0, int y = 0) : x(x), y(y) {} ...
/*<NAME> */ /*header files*/ #include<bits/stdc++.h> using namespace std; /*debugging*/ #define out1(x)cout<<#x<<" is "<<x<<endl #define out2(x,y)cout<<#x<<" is "<<x<<" "<<#y <<" is "<<y<<endl #define out3(x,y,z)cout<<#x<<" is "<<x<<" "<<#y<<" is "<<y<<" "<<#z<<" is "<<z<<endl; #define out4(a,b,c,d)cout<<#a<<" is ...
/* * Copyright (C) 2015 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...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. ...
/* Copyright 2001, 2019 IBM Corporation * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the * following d...
#include "vprocess.h" #include<QSet> #include<CmdExecution.h> VChunk::VChunk() {} VChunk::VChunk(int idx, const QString& vid_src, ll vStart, ll vEnd, const QString& aud_src, ll aStart, ll aEnd, bool hasAudio, const QVector<Effect*>& efct) : idx(idx) , vid_src(vid_src) , vStart(vStart) ...
/** * @author <NAME> * @file nbesttranslation.cc This file produces the N-Best translations * directly (using BGL algorithms). * * $Id$ * * Canoe Decoder * * Technologies langagieres interactives / Interactive Language Technologies * Inst. de technologie de l'information / Institute for Information Technolog...
#include "stdafx.h" #include "TestMappingScreen.h" #include <Vorb/graphics/GLStates.h> #pragma region Simple shader code const cString SRC_VERT = R"( uniform mat4 unWVP; in vec4 vPosition; void main() { gl_Position = unWVP * vPosition; } )"; const cString SRC_FRAG = R"( out vec4 pColor; void main() { pColo...
/****************************************************** XtraBackup: hot backup tool for InnoDB (c) 2009-2012 Percona Inc. Originally Created 3/3/2009 <NAME> Written by <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> and <NAME>. This program is free software; you can redistribute it and/or modify it under the terms of t...
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
// // Created by cao on 19-10-26. // #include <assert.h> #include <fstream> #include "ctdetNet.h" #include "ctdetLayer.h" #include "entroyCalibrator.h" static CTDetLogger gLogger; namespace ctdet { ctdetNet::ctdetNet(const std::string &onnxFile, const std::string &calibFile, ctdet::RUN_MODE mode):fo...
/* * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * ...
/*************************************************************************** file : pitmenu.cpp created : Mon Apr 24 18:16:37 CEST 2000 copyright : (C) 2000 by <NAME> email : <EMAIL> version : $Id: pitmenu.cpp,v 1.4.2.1 2011/12/28 ...
/** * Copyright (C) 2017 MongoDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITH...
// Copyright 2016 Uber Technologies, 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 a...
// // Discrete-event simulator based on C++20 coroutines. // // Copyright (c) 2021 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitati...
// <NAME> // Solution to https://www.urionlinejudge.com.br/judge/problems/view/1887 #include <bits/stdc++.h> using namespace std; typedef tuple<int,int,int,int> quadra; const int MAXN = 30100; const int BUCKET = 250; vector<quadra> arestas,especiais; vector<int> marca_antes,marca_depois; int pai[MAXN],peso[MAXN],n,m,q,...
#include "PWM.hpp" const byte MAX_ISR_COUNT = 20; byte isr_count = 0; byte isr_pin[MAX_ISR_COUNT]; unsigned int isr_value[MAX_ISR_COUNT]; bool isr_last_state[MAX_ISR_COUNT]; bool isr_trigger_state[MAX_ISR_COUNT]; unsigned long isr_timer[MAX_ISR_COUNT]; unsigned long isr_age[MAX_ISR_COUNT]; void ISR_generic(byte isr)...
/* * @Author: sxf * @Date: 2015-10-10 18:45:20 * @Last Modified by: sxf * @Last Modified time: 2015-12-24 09:37:24 */ #include "Elite/CodeGen/CodeGenContext.h" #include "Elite/Model/StringNode.h" #include "Elite/Model/IDNode.h" #include "Translater/idtable.h" #include "Translater/MacroTranslate.h" #include "Elite/...
#include <cstdio> #include <cstring> #define NMAX 300 #define L true #define S false static int sbuc[NMAX + 10], lbuc[NMAX + 10], sa[NMAX + 10]; static int stil[NMAX + 10], ltil[NMAX + 10]; void induced_sort(int *str, bool *type, int *scnt, int *lcnt, int s) { // L 型桶在前,S 型桶在后 memcpy(ltil + 1, lcnt, s << 2...
#include "heightmap.h" #include "terraineditor/editabletexture.h" MapGrid::MapGrid(float size, const Range& range) : m_heightRange(range), m_gridSize(size) { m_mapDefinitions.push_back( MapDef{0,0} ); // Null definition for heightmap map } MapGrid::~MapGrid() { for(auto& s: m_slots) delete s.second.node; } vec3 M...
/* * rpn.cc * * Requirement: It requires g++ or clang++ with c++11 enabled * Build: * clang++ -std=c++11 -stdlib=libc++ rpn.cc -o rpn * then run "./rpn" * * */ #include <iostream> #include <exception> #include <vector> #include <queue> #include <unordered_map> using namespace std; // RPN: // Exp := Num /...
/* 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 add(int x,int y){x+=y; return x>=MOD ? x-MOD : x;} int sub(int x...
#include "client_world.h" #include "../client_config.h" #include "../gl/primitive.h" #include "../renderer/camera.h" #include "chunk_mesh_generation.h" #include <common/debug.h> #include <common/maths.h> GLuint VoxelTextureMap::getTextureId(const std::string& name) { auto itr = textureMap.find(name); if (itr =...
/* * sync_test.c: * Tests serial connection on RPi * Echoes if not in sync. Interferes if in sync * */ #include <stdio.h> #include <string.h> #include <errno.h> #include <stdbool.h> #include <time.h> /* time */ #include <sys/time.h> /* time */ #include <wiringSerial.h> #define BYTES_IN_FRAME 16 #d...
/*** DEVSIM Copyright 2013 Devsim LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, soft...
#include <Graphics/Uniform.h> #include <Renderer/SceneRenderer.h> #include <SceneGraph/Graph.h> #include <SceneGraph/Camera.h> #include <SceneGraph/Material.h> #include <SFML/Graphics.hpp> #include <SceneGraph/QuadNode.h> #include <Descriptors/ImageIO.h> #include <Descriptors/FileInfo.h> #include <Plugins/RenderPlu...
// minimal.cpp: Display the landmarks of a face in an image. // This demonstrates stasm_search_single. #include <stdio.h> #include <stdlib.h> #include "opencv/highgui.h" #include "opencv2/video/tracking.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include "stasm_lib....
/* CCCC - C and C++ Code Counter Copyright (C) 1994-2005 <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) ...
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007-2017 musikcube team // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redist...
/* ** Bitty ** ** An itty bitty game engine. ** ** Copyright (C) 2020 - 2021 <NAME>, all rights reserved ** ** For the latest info, see https://github.com/paladin-t/bitty/ */ #include "palette.h" #include <SDL.h> /* ** {=========================================================================== ** Macr...
#include <vector> #include <string> #include <iostream> #include <iomanip> #include <utility> #include "TPRegexp.h" #include "TEveManager.h" #include "TEveScene.h" #include "TEveElement.h" #include "TEveGeoNode.h" #include "TGeoNode.h" #include "TCollection.h" #include "TObjString.h" #include "split.h" #include "eve_...
#include "localFiles.h" const std::string LocalFileDealer::identifier = "slitherlink"; const int LocalFileDealer::headerSize = 14; void LocalFileDealer::popMatrix(Matrix *mat) { if (length == 0) { mat->resize(0, 0); return; } mat->resize(width, height); int i, j; for (i = heig...
#include "UbidotsWiFire.h" /** * Constructor. */ Ubidots::Ubidots(char* token){ _token = token; maxValues = 20; currentValue = 0; state = CONNECT; val = (Value *)malloc(maxValues * sizeof(Value)); } /** * This function is to get value from the Ubidots API * @arg id the id where you will get th...
#include <Arduino.h> #include <ESP8266WiFi.h> #include <espnow.h> #include <stdbool.h> #include <FastCRC.h> #define ESP_OK 0 static uint8_t header[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77}; static uint8_t RECV_MESSAGE[] = {0x55, 0x44}; static uint8_t GET_PEERS[] = {0x44, 0x33}; static uint8_t CONNECT_BRIDGE[] ...
#include <stdlib.h> #include "MS5837.h" /* * Sensor operating function according data sheet */ void MS5837::MS5837Init(void) { MS5837Reset(); MS5837ReadProm(); step = 1; return; } void MS5837::MS5837Start(void) { if (!started) { step = 1; MS5837::Barometer_MS5837(); wait_ms(20); } return; } /* Send ...
// Copyright (c) 2018 <NAME> // // I am making my contributions/submissions to this project solely in my // personal capacity and am not conveying any rights to any intellectual // property of any third parties. #include <pch.h> #include <jet/apic_solver2.h> using namespace jet; ApicSolver2::ApicSolver2() : ApicSolv...
#include "IoTHub.h" //IoT::IoT(CloudConfig* cloud) //{ // _cloud = cloud; //} String IoT::urlEncode(const char* msg) { const char *hex = "0123456789abcdef"; String encodedMsg = ""; while (*msg!='\0'){ if( ('a' <= *msg && *msg <= 'z') || ('A' <= *msg && *msg <= 'Z') ...
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QMessageBox> GRANSAC::VPFloat Slope(int x0, int y0, int x1, int y1) { return (GRANSAC::VPFloat)(y1 - y0) / (x1 - x0); } void DrawFullLine(cv::Mat& img, cv::Point a, cv::Point b, cv::Scalar color, int LineWidth) { GRANSAC::VPFloat slope = Slope(a.x, ...
/****************************************************************************** * Copyright 2019 The Hesai Technology 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 L...
/* region_convex_hull.cc - This file is part of MUSIC - a code to generate multi-scale initial conditions for cosmological simulations Copyright (C) 2010-13 <NAME> */ #include <vector> #include <iostream> #include <cmath> #include <cassert> #include <fstream> #include <sstream> #include <cctype> #include...
#include "Defs.h" #include "Log.h" #include "App.h" #include "Input.h" #include "Textures.h" #include "Audio.h" #include "Render.h" #include "Window.h" #include "Map.h" #include "Scene.h" #include "Transition.h" #include "EntityManager.h" #include "Pathfinding.h" #include "Gui.h" //#include "MenuScene.h" Scene::Scene(...
/* ZACwire - Library for reading temperature sensors TSIC 206/306/506 created by <NAME> in 2020 v2.0.0 */ #include "ZACwire.h" #include "Arduino.h" #if !defined(ESP32) && !defined(ESP8266) //initialize static variables for AVR boards uint8_t ZACwire::bitThreshold; uint16_t ZACwire::measuredTimeDiff; ...
#include <RcppArmadillo.h> using namespace Rcpp; #include <RcppParallel.h> #include "parameters.h" #include "function_pointers.h" #include "distributions.h" #include "importance_sampler.h" #include "likelihood_estimator_output.h" // class Tester { // // public: // // Tester(double input) {stored = input;} // // ...
#include "NumberParserImpl.hpp" #include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/include/phoenix_operator.hpp> #include <boost/spirit/include/phoenix_stl.hpp> //#include <boost/spirit/home/phoenix/container.hpp> //#include <boost/spirit/home/phoenix/statement/sequence.hpp> #include <climits> #inc...