text
stringlengths
3.08k
12.5k
#include "Fuzzer/FuzzingParameterSet.hpp" #include "Fuzzer/HammeringPattern.hpp" #ifdef ENABLE_JSON void to_json(nlohmann::json &j, const HammeringPattern &p) { j = nlohmann::json{{"id", p.instance_id}, {"base_period", p.base_period}, {"max_period", p.max_period}, ...
//Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved. //For the list of developers, see <http://www.MercuryDPM.org/Team>. // //Redistribution and use in source and binary forms, with or without //modification, are permitted provided that the following conditions are met: // * Redistributions ...
/* * MIT License * * 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 limitation the rights * to use, copy, modify, m...
// // main.cpp // OpenGL-Front_Back_Cull-Depth_Test // // Created by 王傲云 on 2019/4/15. // Copyright © 2019 Jace. All rights reserved. // #include "GLTools.h" #include "GLMatrixStack.h" #include "GLFrame.h" #include "GLFrustum.h" #include "GLGeometryTransform.h" #include <math.h> #ifdef __APPLE__ #include <glut/gl...
#include "TCPInterface.h" /// @brief Constructor. /// @param mode The mode for this interface to act in. Can be either TCPCLIENT or TCPSERVER. /// @param port The server port which will, in the case of the client, be connected to or, in the /// case of the server, be used to accept incoming connect...
#include <algorithm> #include <cctype> #include <cstdio> #include <functional> #include <iterator> #include <numeric> #include <string> #include <tuple> #include <vector> #include "parameters/parameter_conversions.h" #include "models/header.h" namespace impl { template <typename It, typename TItem> std::vecto...
#include <Hazel.h> #include "ImGui\imgui.h" class ExampleLayer : public Hazel::Layer { public: ExampleLayer() : Layer("Example"), m_Camera(-1.6f, 1.6f, -0.9f, 0.9f), m_CameraPosition(0.0f) { // Vertex Array m_VertexArray.reset(Hazel::VertexArray::Create()); // Vertex Buffer float vertices[3 * 7] = { -...
// // Recorder - a GPS logger app for Windows Mobile // Copyright (C) 2006-2019 <NAME> // /// \file HardwareKeyManager.cpp Hardware key manager implementation // #include "stdafx.h" #include "HardwareKeyManager.hpp" #include <algorithm> boost::scoped_ptr<CHardwareKeyManager> CHardwareKeyManager::s_scpHardwareManager; ...
/* * Copyright (c) 2018, SBPrime <https://github.com/SBPrime/> * * 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, c...
#include <cstdio> #include <cmath> #include <vector> #include <bitset> #include <algorithm> #include <thread> #include <atomic> #include <chrono> #include "number.hpp" const uint64_t SIEVE_LIM = 1e9; const uint64_t SIEVE_LIM_SQRT = std::sqrt(SIEVE_LIM); #if defined SINGLE_THREAD const uint64_t THREADS = 1; #else c...
#include "Bot.h" #include "World.h" #include "Bullet.h" #define BODY_SCALE 30 #define EYE_SCALE 5 #define BOT_VISION_LENGTH 1000 extern Camera g_Camera; void Bot::Shoot(World* pWorld) { if (!m_ShootCooldown > 0) { PhysObj* obj = nullptr; if (pWorld->CheckLineForCollision(m_Position, m_Position + Vector2D(0, ge...
#include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <fstream> #include <vector> #include <pcfile.h> #include <pcvm.h> bool s_read_bin_file(const std::string &path, unsigned char**buf, size_t &bufsize) { std::fstream file; assert(buf); file.open(path, std::ios::in | std::ios::binar...
/**************************************************************************************** * @author: kzvd4729 created: Sep/12/2019 21:55 * solution_verdict: Accepted language: GNU C++14 * run...
// EVIL VCA // VCA with added boost and clipping mode switch #include "AmateurResearch.hpp" //#include "dsp/decimator.hpp" #include <chrono> #include <random> #include <iostream> #include "dsp/digital.hpp" // just setting up parameters and inputs and outputs struct EvilVCA : Module { enum ParamIds { LEVEL1_PARAM, ...
#include "Graph.h" #include "InfMaximizer.h" #include "UncertainInfExp.h" #include "UtilFunc.h" #include <fstream> #include <iostream> #include <string> #include <unordered_set> #include <vector> using namespace std; void UncertainInfExp::runCascInfDiffMaxExperiment() { // load graph Graph originGraph...
#include <cassert> #include <chrono> #include <iostream> #include <random> #include <tfhe++.hpp> using namespace std; using namespace TFHEpp; template <uint32_t address_bit, uint32_t width_bit> void UROMUX(TRLWElvl1 &res, const array<TRGSWFFTlvl1, address_bit> &invaddress, const array<TRLWElvl1, 1 << (add...
#include "CTable.h" CTable::CTable() { pMesh = NULL; m_numMaterials = 0; m_pMeshMaterials = NULL; m_ppMeshTextures = NULL; } bool CTable::create(IDirect3DDevice9 * pDevice) { if (NULL == pDevice) return false; if (loadModel(pDevice) == false) return false; return true; } bool CTable::loadModel(IDirect3DDevice...
/********************************************************* * @brief libfacedetection人脸检测demo * @Inparam * @Outparam * @return * @author hscoder * @date 2020-02-01 ********************************************************/ #include <iostream> #include <opencv2/opencv.hpp> #include <chrono>...
#include "front.h" #include "bpa.h" #include "../helpers/helpers.h" #include "../trace.h" #include <cassert> #include <iostream> std::optional<Front::ActiveEdge> Front::getActiveEdge() { ASSERT(integrity()); for (Loop loop : front) { for (Edge edge : loop) { if (!boundary.count(edge)) { ...
#include "master.h" #include "TMXLayer.h" #include "random.h" using namespace pyrodactyl; bool Layer::Load(rapidxml::xml_node<char> *node) { if (NodeValid(node)) return LoadStr(name, "name", node) && LoadNum(w, "width", node) && LoadNum(h, "height", node); return false; } bool MapLayer::Load(const std::string &...
#include <fstream> #include "lobby_attendant.h" #include "thread.h" #include "client.h" #include "yaml.h" LobbyAttendant::LobbyAttendant(Client * c, ProtectedWaitingGames & wg) : client(c), waiting_games (wg) { this->keep_running = true; this->player_name = client->getPlayerName(); } bool LobbyAttendant::isRu...
// Copyright 2011 The Avalon Project Authors. All rights reserved. // Use of this source code is governed by the Apache License 2.0 // that can be found in the LICENSE file. // <NAME>, May 2011 #include "imu.h" #include <stdio.h> #include "common/convert.h" #include "common/normalize.h" #include "helmsman/compass.h" ...
// This is an independent project of an individual developer. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com #include "vertexbuffer.hpp" #include <assert.h> #include <string.h> #include <vulkan/vulkan.h> #define VK_CHECK( x ) { VkResult res = (x); ...
// Fill out your copyright notice in the Description page of Project Settings. #include "VibrationPatternParser.h" #include "Json.h" #include "Runtime/JsonUtilities/Public/JsonObjectConverter.h" #include "RoukaViciWidget.h" #include "RoukaViciManager.h" FmPattern::FmPattern() { name = ""; duration = 0;...
#include <cstdio> #include <algorithm> #include <fstream> #include <iostream> #include <vector> #include <queue> #include <map> #include <cstring> #include <string> #include <set> #include <stack> #define pb push_back #define mp make_pair #define f first #define s second #define ll long long using namespace std; int...
// The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt /* This is an example illustrating the use of the thread_pool object from the dlib C++ Library. This is a very simple example. It creates a thread pool with 3 threads and then sends a few simple task...
#include "merge_sort.h" std::ostream& operator<<(std::ostream& out, const Vector& vector) { std::cout << "Su vector final es: { "; for ( auto number : vector.integer_vector_ ) out << number << ' '; std::cout << "}\n\nGracias por utilizar el programa\n"; std::cout << "By <NAME>\n"; } ...
#include <cmath> #include "missile.hpp" #include "aivehicle.hpp" #include "constants.hpp" #include "polygon.hpp" Missile::Missile(const int& width, const int& height) : VehiclePhysics(width, height), shape(sf::Vector2f(width, height)) { if (!missileTexture.loadFromFile("../images/missile.png")) { if (!mis...
#include "BVHTree.h" BVHTree::BVHTree(){ root = NULL; } BVHTree::~BVHTree(){ std::vector<std::string> keys; for (auto key : map) { keys.push_back(key.first); } for (int i = 0; i < keys.size(); i++) { removeBVHMember(keys[i]); } root = NULL; } v...
/// @file single.hpp #pragma once #include <mpc/type_traits.hpp> #include <mpc/utility/tuple_like.hpp> // clang-format off namespace mpc { /** * @brief A class that holds a single value. * @details To prepare multiple classes with different types but the same * properties, the tag type can be assigned to t...
/** * @file adapter.cpp * @author github.com/luncliff (<EMAIL>) */ #include <android/api-level.h> #include <android/hardware_buffer.h> #include <android/native_window_jni.h> #include <android/sensor.h> #include <media/NdkImage.h> #include <media/NdkImageReader.h> #include <spdlog/sinks/android_sink.h> #include <...
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); /* * Complete the 'matrixRotation' function below. * * The function accepts following parameters: * 1. 2D_INTEGER_ARRAY matrix * 2. INTEGER r */ void matrixRotation...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <queue> using namespace std; int B[26*26][26*26]; int C[26*26+2][26*26+2]; int F[26*26+2][26*26+2]; int P[26*26+2]; const int S = 0; const i...
/********************************************************************** Audacity: A Digital Audio Editor TwoPassSimpleMono.cpp <NAME> *******************************************************************//** \class EffectTwoPassSimpleMono \brief An Effect base class that implements a two pass process by using E...
#include <dake/gl.hpp> #include <cctype> #include <cerrno> #include <cstdint> #include <cstdlib> #include <cstring> #include <libgen.h> #include <memory> #include <string> #include <unordered_map> #include "gltf.hpp" #include "serializer.hpp" using namespace dake; class Buffer { private: void *ptr = n...
/* * Copyright (c) 2017, Ford Motor Company * 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 condit...
#include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <errno.h> #include <string.h> #include <iostream> #include <algorithm> #include <vector> #include "mergesort.hpp" using namespace std; void externalSort(int fdInput, uint64_t size, int fdOutput, uint64_t memSize) { // Number of partitions to ...
/* * Copyright (c) 2004-2005 The Regents of The University of Michigan * 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 * not...
//===--- DataflowDiagnostics.cpp - Emits diagnostics based on SIL analysis ===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
// 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 "ppapi/tests/test_utils.h" #include <stdio.h> #include <stdlib.h> #if defined(_MSC_VER) #include <windows.h> #else #include <unistd.h> #endi...
#include "stdafx.h" #include "Function.h" #include "Operators.h" Function::Function(HANDLE _target, DWORD64 _start, DWORD64 _end, byte *_code) { hTarget = _target; start_addr = _start; end_addr = _end; size = end_addr - start_addr; buf = _code; local_injection_points = map <DWORD64, Operator*>(); // Build Cap...
#include "cost.h" #include <cmath> #include <functional> #include <iostream> #include <iterator> #include <map> #include <string> #include <vector> #include "vehicle.h" #include "helper.h" #include "spline.h" #include "constants.h" using std::string; using std::vector; double collision_cost(const Vehicle &ego, cons...
/* * Copyright (c) 2002-2006 The Regents of The University of Michigan * 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 * not...
#include "DataFormats/ForwardDetId/interface/HFNoseDetId.h" #include "DataFormats/ForwardDetId/interface/HFNoseTriggerDetId.h" #include "DataFormats/DetId/interface/DetId.h" #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <string> void testCell(int type) { int N = (type == 0) ? HFNos...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2014 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla...
#include "GameLevelBase.h" GameLevelBase::GameLevelBase(){}; GameLevelBase::GameLevelBase( int _width, int _height, std::vector<int> _startPts, std::vector<int> _endPts ){ mapWidth = _width; mapHeight = _height; startPoints = _startPts; endPoints = _endPts; size = mapWidth * mapHeight; } int GameLevelBase::...
/* Copyright (C) 2016 <NAME> - All Rights Reserved * You may use, distribute and modify this code under the * terms of the Apache license, version 2.0, 2004. * * You should have received a copy of the Apache 2.0 license with * this file. If not, please write to: <EMAIL>. */ #include <stdlib.h> #include <math.h>...
//===----------------- Config.cpp - Parsing CLI options -------------------===// // // SimpLL - Program simplifier for analysis of semantic difference // // // This file is published under Apache 2.0 license. See LICENSE for details. // Author: <NAME>, <EMAIL> //===-------------------------------------------...
/* Copyright 2020-2021 The Silkworm 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 or ag...
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | https://www.mrpt.org/ | | | | Cop...
//============================================================================================== // Originally written in 2016 by <NAME> <<EMAIL>> // // To the extent possible under law, the author(s) have dedicated all copyright and related and // neighboring rights to this software to the public domain worldwide. Thi...
/* * * 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"); y...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <iostream> #include <string> #include <cstring> #include "CL/opencl.h" using namespace std; #define CL_TARGET_OPENCL_VERSION 2_1 /** * Selects last device with OpenCL 2.1 */ int get_platform_with_2_1(cl_platform_id *ids, int num_platforms) { int de...
#include "apply_transform_func.h" #include "basic_surf_objs.h" #include <math.h> #include <iostream> #include "io_affine_transform.h" using namespace std; #define PI 3.14159265 Matrix affine_matrix(unit_vector u, double angle, double shift_x, double shift_y, double shift_z) { double radians = angle * PI / 180...
/*========================================================================= * * Copyright Insight Software Consortium * * 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...
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT. * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details. * Author(s): <NAME> * * Copyright (C) 2018 Inria * * Modification(s): * - YYYY/MM Author: Descriptio...
// // Copyright (C) 2008 by sinamas <sinamas at users.sourceforge.net> // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope tha...
#include <cassert> #include <chrono> #include <cstdint> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <tuple> #include "utils.hpp" #include "armadillo" #include "mpi.h" #define MASTER 0 using hrc = std::chrono::high_resolution_clock; int rank; int num_process...
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
/* * GNUplot.cpp * * Created on: 18 Jul 2011 * Author: jack */ #include "GNUplot.h" #include "Utils.h" #include "Common.h" #include <string> #include <stdio.h> #include <iostream> #include <boost/algorithm/string/replace.hpp> #include <list> using namespace std; /** * @brief Plot a graph using GNUplot. ...
#include <boost/asio.hpp> #include <sdbusplus/asio/connection.hpp> #include <sdbusplus/asio/object_server.hpp> #include <sdbusplus/asio/property.hpp> #include <sdbusplus/bus.hpp> #include <iostream> namespace xyz { namespace demo { const std::string path = "/xyz/demo"; const std::string name = "xyz.demo"; } // name...
// Copyright (c) 2012-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...
/** * @file nbody.cpp * * @author <NAME>; xstupi00 \n * Faculty of Information Technology \n * Brno University of Technology \n * <EMAIL> * * @brief PCG Assignment 2 * N-Body simulation in ACC * * @version 2021 * * @date 11 November 2020, 11:2...
#include "build.h" #include "xenonGPUDumpFormat.h" const uint32 CXenonGPUDumpFormat::FILE_MAGIC = 'GPUD'; const uint32 CXenonGPUDumpFormat::FILE_VERSION = 1; CXenonGPUDumpFormat::CXenonGPUDumpFormat() { } bool CXenonGPUDumpFormat::Load( const std::wstring& path, uint64& memoryDumpOffset ) { // open file FILE* f = ...
/* * Copyright (C) 2010-2013 <NAME> * http://www.1f0.de * * 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 ve...
#include "stdafx.h" #include "FileSequenceDriver.h" #include "FilenameStrategy.h" #include <iostream> #include <fstream> #include <cassert> #include "Logger.h" FileSequenceDriver::FileSequenceDriver(const std::string& strPath, int startIndex, int maxIndex, bool readLoop, const std::vector<std::string>& files ): mA...
/* * Copyright (c) 2016, 2018 ARM Limited. * * SPDX-License-Identifier: MIT * * 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 * r...
/** @file @brief Simple example OpenGL application using the OSVR ClientKit display methods. This example shows the use of the C API display methods, even though it is in C++. See OpenGLSample.cpp for a more idiomatic-C++ sample using the C++ API headers. @date 2015 @author Sensics, Inc. ...
#include "serialProtocol.h" serialProtocol::serialProtocol() { this->keyWord = NULL; this->key_len = 0; // this->ptr_ = NULL; this->local_ident = {0}; this->local_ident.cmd = COM_UNKNWON; } serialProtocol::serialProtocol(byte* key, uint8_t len) { serialProtocol(); this->att...
/* Software License Agreement (BSD License) * * Copyright (c) 2019, iRobot ROS * All rights reserved. * * This file is part of ros2-performance, which is released under BSD-3-Clause. * You may use, distribute and modify this code under the BSD-3-Clause license. */ #include <gtest/gtest.h> #include "perform...
#include <iostream> #include "../args.h" #include "../basics.h" #include <fstream> #include <sstream> #include <locale> using namespace std; struct ClassDef { std::string name; std::string ctor_str; bool ctor = false; /// -> constructor bool dctor = false; /// -> default constructor bool dtor = false; ...
/* * g723_40.c * * Description: * * g723_40_encoder(), g723_40_decoder() * * These routines comprise an implementation of the CCITT G.723 40Kbps * ADPCM coding algorithm. Essentially, this implementation is identical to * the bit level description except for a few deviations which * take advantage of worksta...
/* =========================================================================== Copyright (c) 2010-2015 Darkstar Dev Teams This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the Lice...
/* [PREDITLE] Jumpshot, p100, millionware on top Awp don't need no scope, hop around don't miss a shot 7 shots in my deagle always got me lookin' evil p100 like it's cheat-codes just need one shot never reload I hit the edgebug jumpbug spin around and flickshot (ooh) Didn't even see you but your skull's eating my AWP...
#include "bench.h" #include "benchmark/benchmark.h" #include "codegen/codegen_c.h" #include "taco/util/timers.h" #include "utils.h" #include "taco/tensor.h" #include "taco/format.h" #include "taco/index_notation/index_notation.h" #include "taco/index_notation/tensor_operator.h" #include "taco/lower/lower.h" #include ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include <cstring> #include <cerrno> #include <iostream> #include <fstream> #include <vector> #include "server_u.h" #include "server/shared/constants.h" #include "server/host/enclave_error.h" #include "server/host/enclave....
// // sio_test_sample.cpp // // Created by <NAME> on 3/24/15. // #include "sio_client.h" #include <functional> #include <iostream> #include <thread> #include <mutex> #include <condition_variable> #include <string> #ifdef WIN32 #define HIGHLIGHT(__O__) std::cout<<__O__<<std::endl #define EM(__O__) std::cout<<__O__<<...
/* * Copyright (C) 2012 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...
#include <boost/python.hpp> #include <boost/python/numpy.hpp> #include <valarray> #include <cmath> #include <fstream> #include <random> #include <iostream> #include <chrono> #include <string> #include "advect_in_time.h" namespace p = boost::python; namespace np = boost::python::numpy; class Simulation_cpp { private...
/* Copyright (c) 2006-2020, Universities Space Research Association (USRA). * 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 ...
//*************************************************************************** // This file is part of the graph isomorphism algorithm. // Copyright by <NAME>, <NAME>, and <NAME> // // Name: algorithm.cpp // Author: <NAME>, <NAME> // Version // August 20, 2020: the first stable version. (version 1.0) // October...
/* * Implementation file for the particle contact resolution system. * * Part of the Cyclone physics system. * * Copyright (c) Icosagon 2003. All Rights Reserved. * * This software is distributed under licence. Use of this software * implies agreement with all terms and conditions of the accompanying ...
// Copyright 2018 Google 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 w...
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define SZ(x) ((int)x.size()) #define lowbit(x) x&-x #define pb push_back #define ALL(x) (x).begin(),(x).end() #define UNI(x) sort(ALL(x)),x.resize(unique(ALL(x))-x.begin()) #define GETPOS(c,x) (lower_bound(ALL(c),x)-c.begin()) #define LEN(...
#include "screen.h" #include <cstdlib> #include <iomanip> #include <iostream> #if defined _WIN32 || defined _WIN64 #define ISWINDOW true #else #define ISWINDOW false #endif using namespace std; void Screen::renderScreen(Map map, Player player) { const int statSize = 18; // show player status on the right side ...
#include "../common.h" #include <vector> #include <cstring> //#include <GL/glew.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> using namespace glm; #include "shader.hpp" #include "texture.hpp" #include "text2D.hpp" unsigned int Text2DTextureID; unsigned int Text2DVertexBufferID; unsigned int Te...
// SPDX-License-Identifier: MIT #include "Water.hh" #include <glow/objects/ElementArrayBuffer.hh> #include <glow/objects/Framebuffer.hh> #include <glow/objects/Program.hh> #include <glow/objects/TextureRectangle.hh> #include <glow/objects/VertexArray.hh> #include <ECS/Join.hh> #include "Terrain.hh" using namespace Wa...
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<vector> #include<algorithm> #include<queue> #include<map> #include<stdio.h> using namespace std; int dy[] = { -1,0,1,0 }; //상, 우, 하, 좌 int dx[] = { 0,1,0,-1 }; typedef struct { int y; int x; int dir; int num; unsigned operator==(const pair<int,int> a) { r...
#include "ofxOilBrush.h" #include "ofxOilBristle.h" #include "ofMain.h" float ofxOilBrush::MAX_BRISTLE_LENGTH = 15; float ofxOilBrush::MAX_BRISTLE_THICKNESS = 5; float ofxOilBrush::MAX_BRISTLE_HORIZONTAL_NOISE = 4; float ofxOilBrush::BRISTLE_VERTICAL_NOISE = 8; float ofxOilBrush::NOISE_SPEED_FACTOR = 0.04; unsign...
/* -*- Mode: C++ -*- */ /** * Author: <NAME> * Date: 5/2 - 18 * * Comments: Algorithm that has been followed to complete this with karatsubas is this: * * if n = 1 then return C ← AB * C1 ← A(0)B(0) by a recursive call * C2 ← A(1)B(1) by a recursive call * C3 ← A(0) ...
#include <stdio.h> #include <math.h> #include "brr.h" // Global variables u8 BRR[9]; pcm_t p1, p2; /* void print_note_info(const unsigned int loopsize, const unsigned int samplerate) { const char notes[12][3] = {"C ", "C#", "D ", "Eb", "E ", "F ", "F#", "G ", "G#", "A ", "Bb", "B "}; if(loopsize < 45) { double ...
/** * Copyright 2020 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 law...
/* ==================================================================== * 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...
#include <seeds.pool.hpp> ACTION pool::reset () { require_auth(get_self()); auto bitr = balances.begin(); while (bitr != balances.end()) { accounts acct(get_self(), bitr->account.value); auto aitr = acct.begin(); while (aitr != acct.end()) { aitr = acct.erase(aitr); } bitr = balances....
/* * ===================================================================================== * * Filename: lex.cpp * * Description: Analisador léxico * * Version: 1.0 * Created: 02/13/2020 03:13:48 PM * Revision: none * Compiler: gcc * * Author: <NAME> (JCBC), ...
/* * Copyright (c) 2017 - 2018, Intel 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 use, copy, modify, ...
#include <cassert> #include <vector> #include <algorithm> #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <string> #include <cstring> using namespace std; const double EPS = 1e-9; double eq(double a, double b) { return fabs(a-b) < EPS; } struct point { double x, y; point...
#include <Exceptions.h> #include <ScalarImp.h> #include <Util.h> #include "httpClient.h" #include <curl/curl.h> #include <openssl/ssl.h> #include <string> ConstantSP httpGet(Heap *heap, vector<ConstantSP> &args) { ConstantSP url = args[0]; ConstantSP params, timeout,headers; if (url->getType()...
#include "Writer.h" #include "Header.h" #include <fstream> #include <string> #include <iostream> uint64_t unique_header_id = 0; Writer::Writer(const Header& in_header, const std::filesystem::path& in_out_dir) : header(in_header), out_dir(in_out_dir) { write_h(); write_cpp(); unique_header_id++; } void Writer::...