text
stringlengths
3.08k
12.5k
#include "copyfilesaction.h" #include "installerapplication.h" #include "receiptwriter.h" #include "fs.h" #include <util/exception.h> #include <QDir> #include <QDirIterator> #include <QDebug> CopyFilesAction::CopyFilesAction(QObject* parent = 0) : TxAction(parent) { _fs = ngApp->globalFs(); } void CopyFilesAction...
/* * Copyright (C) Volition, Inc. 1999. All rights reserved. * * All source code herein is the property of Volition, Inc. You may not sell * or otherwise commercially exploit the source or things you created based on the * source. * */ #ifdef _WIN32 #include <winsock2.h> #include <ws2tcpip.h> #else #include <ar...
//@@@@AUTOBLOCK+============================================================; // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR // PURPOSE. ...
// VCP Library // http ://verified.computation.jp // // VCP Library is licensed under the BSD 3 - clause "New" or "Revised" License // Copyright(c) 2017, <NAME> <<EMAIL>> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the ...
// Copyright 2015 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/browser/private_working_set_snapshot.h" #include <pdh.h> #include <pdhmsg.h> #include <stddef.h> #include <algorithm> #include "base/n...
/* Copyright 2020 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
Block spawnBlock(u16 startX, u16 startY, u32 color) { for (u16 i = startY; i < startY+BSIZE; i++) { for (u16 j = startX; j < startX+BSIZE; j++) { pxl.color = color; pxl.isActive = true; pxl.isEmpty = false; } } Block block = {startX, startY, color}; re...
#include "panoramic_image.h" #include "panoramic_utils.h" #include <iostream> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/core.hpp> #include <opencv2/xfeatures2d.hpp> #include <opencv2/ccalib.hpp> using namespace std; using namespace cv; const float DISTANCE_RATIO_THRESHOLD = 3.0...
/** * @file nullable_attribute.cc * * @section LICENSE * * The MIT License * * @copyright Copyright (c) 2020-2021 TileDB, Inc. * * 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 w...
// ggCaller header #include "traversal.h" // define mutex for safe addition to robinhood_maps //std::mutex mtx2; PathVector iter_nodes_binary (const GraphVector& graph_vector, const NodeTuple& head_node_tuple, const size_t& current_colour, ...
#include<bits/stdc++.h> #include<omp.h> using namespace std; typedef unsigned long long u64; const u64 N = 1e14; constexpr u64 isqrt(u64 x) { u64 r = sqrt(x); for(;r*r > x;) --r; for(;(r+1)*(r+1) <= x; ++r); return r; } const u64 S = isqrt(N); const array<u64, 6> sp = {3, 7, 11, 19, 23, 31}; cons...
/** \file IRLS.cc * * `IRLS' is a C++ implementation of the IRLS algorithm for GLM * Copyright (C) 2013 <NAME>, <NAME> * * 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 L...
/**************************************************************************** MIT License Copyright (c) 2015 horizon-studio http://horizon-studio.net/ 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 Softw...
# include <iostream> # include <cstdlib> # include <ctime> using namespace std; int rolls[6]; int score = 0, turn = 0, bank = 0, total = 0, option = 1; int num_of_dice = 6; string player1, player2; bool triplez = true; bool game = true; void rolldie(int a[]){ srand(time(0)); for(int i = 0; i < 6; i++){...
/*! \author <NAME> (rcr33) \file loi_reduction.h Project: mopsc (gas-phase chemistry solver). Sourceforge: http://sourceforge.net/projects/mopssuite Copyright (C) 2010 <NAME>. \brief Namespace for mechanism reduction using the Level of Importance (LOI) technique. File purpose: ...
#include "CSTFile.h" #include "utils.h" #include <algorithm> #include <cctype> #include <cstdint> #include <cstring> #include <unordered_map> /* * Creates fake points for outline using outermost pins plus some margin. */ #define OUTLINE_MARGIN 20 void CSTFile::gen_outline() { // Determine board outline int minx =...
/** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @file racional.cc (definiciones) * @author <NAME> <EMAIL> * @date 7 Enero 2021 * @brief Desarrolle un programa cliente racionales.cc que permita operar con números ra...
/*********************************************************************** Copyright (c) 2008, 2009, <NAME>, www.memo.tv *** The Mega Super Awesome Visuals Company *** * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the foll...
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif #include <iostream> using std::cerr; #include "ParmParse.H" #include "LoadBa...
/** * @license MIT * @brief */ /////////////////////////////////////////////////////////////////////////////// #include "huffman_decoder.h" #include "huffman_coding_interfaces.h" using namespace std; /////////////////////////////////////////////////////////////////////////////// #define DEBUG(var) \ do{ \ co...
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: Responsible for drawing the scene // //===========================================================================// #include "cbase.h" #include "materialsystem/imaterialsystem.h" #include "materialsystem/imaterialvar.h" #inclu...
#include <Arduino.h> #include <RH_ASK.h> #include <arduino_homekit_server.h> #include <Console.h> #include <BuiltinLed.h> #include <VictorOTA.h> #include <VictorWifi.h> #include <VictorRadio.h> #include <VictorWeb.h> #include "TimesCounter.h" #include "SwitchStorage.h" #include "SwitchIO.h" using namespace Victor; u...
 // Copyright[2019][<NAME> aka Scourge] under the Apache V2 Licence #include<iostream> #include<vector> #include<string> #include<ctime> // ----- Radicalware Libs ------------------- #include "xstring.h" #include "xvector.h" #include "xmap.h" #include "SYS.h" #include "Timer.h" // ----- Radicalware Libs -----------...
// Generated from /POI/java/org/apache/poi/hssf/dev/ReSave.java #include <org/apache/poi/hssf/dev/ReSave.hpp> #include <java/io/ByteArrayOutputStream.hpp> #include <java/io/FileInputStream.hpp> #include <java/io/FileOutputStream.hpp> #include <java/io/InputStream.hpp> #include <java/io/OutputStream.hpp> #include <java...
#include "replay_system.hpp" #include "hooks.hpp" void ReplaySystem::record_action(bool hold, bool player1, bool flip) { if (is_recording()) { auto gm = gd::GameManager::sharedState(); auto play_layer = gm->getPlayLayer(); auto is_two_player = play_layer->m_levelSettings->m_twoPlayerMode; ...
#pragma once #include <vili/node.hpp> #include <Animation/Animator.hpp> #include <Collision/PolygonalCollider.hpp> #include <Debug/Logger.hpp> #include <Graphics/Sprite.hpp> #include <Scene/SceneNode.hpp> #include <Types/Serializable.hpp> #include <sol/sol.hpp> #include <vili/node.hpp> namespace obe::Scene { c...
#include <iostream> #include <iomanip> #include <string> #include <pcrecpp.h> #include "net/net.h" extern "C" { #include <arpa/inet.h> #include <netinet/in.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <netinet/if_ether.h> #include "protocol_binary.h" } static inline std::string ipv4addressToString(co...
//g++-5 --std=c++11 -g -Wall -Werror -o ds_uf_number_connected_components ds_uf_number_connected_components.cc /** * @file Number of Connected Components * @brief Given an undirected graph return the number of connected components */ // https://leetcode.com/problems/number-of-connected-components-in-an-undirected-...
#include "Laplacian.h" using namespace std; using namespace numerics; double cotangent(const Eigen::Vector3d& a, const Eigen::Vector3d& b, const Eigen::Vector3d& c) { //Vector3 ba = (a - b).norm(); //Vector3 bc = (c - b).norm(); //return 1.0 / tan( arc_cosine( ba.dot(bc) ) ); Eigen::Vector3d ba = a - b; Eigen:...
/** * ScriptDev3 is an extension for mangos providing enhanced features for * area triggers, creatures, game objects, instances, items, and spells beyond * the default database scripting in mangos. * * Copyright (C) 2006-2013 ScriptDev2 <http://www.scriptdev2.com/> * Copyright (C) 2014-2017 MaNGOS <https://get...
/* * Copyright 2008, <NAME>, <<EMAIL>>. All rights reserved. * Distributed under the terms of the MIT License. */ #include <Alert.h> #include <Catalog.h> #include <Screen.h> #include <String.h> #include <View.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <pwd.h> #incl...
// // SVisual Project // Copyright (C) 2018 by Contributors <https://github.com/Tyill/SVisual> // // This code is licensed under the MIT License. // // 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 S...
// Fill out your copyright notice in the Description page of Project Settings. #include "Guard.h" #include "PatrollPoint.h" #include "ThirdAssignmentCharacter.h" #include "GameManager.h" #include "EngineUtils.h" #include "DrawDebugHelpers.h" // Sets default values AGuard::AGuard() { // Set this actor to call...
#include "fhiclcpp/types/detail/ValidateThenSet.h" #include "cetlib/container_algorithms.h" #include "fhiclcpp/exception.h" #include "fhiclcpp/types/detail/AtomBase.h" #include "fhiclcpp/types/detail/NameStackRegistry.h" #include "fhiclcpp/types/detail/ParameterBase.h" #include "fhiclcpp/types/detail/PrintAllowedConfig...
#include "pir.hpp" #include "pir_client.hpp" #include "pir_server.hpp" #include <seal/seal.h> #include <chrono> #include <memory> #include <random> #include <cstdint> #include <cstddef> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <unistd.h> #include <sys/types.h> #include <arp...
// Copyright (C) 2000, International Business Machines // Corporation and others. All Rights Reserved. #include <fstream> #include "BCP_tm.hpp" #include "MC_tm.hpp" #include "MC_cut.hpp" //############################################################################# void MC_tm::pack_module_data(BCP_buffer& buf, BCP...
#include <string> #include <stdio.h> #include "networking/client.h" #include "vsnet_clientstate.h" #include "vsnet_address.h" #include "cmd/unit_generic.h" using std::string; ClientState::ClientState() { //this->delay=50; this->client_serial = 0; this->SPECWarpMultiplier = 0.0; this->SPECRampCounter ...
#if ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #include "imu.h" #include "./src/mpu9250/MPU9250-DMP.h" #define LOG_SERIAL SerialUSB static MPU9250_DMP imu; const signed char orientationMatrix[9] = { 0, 1, 0, -1, 0, 0, 0, 0, 1 }; void imuSelfTest(void); bool...
#include "wumpus-pp/utils.hpp" #include "wumpus-pp/bot.hpp" #ifndef WUMPUS_PP_THREADS_AMOUNT #define WUMPUS_PP_THREADS_AMOUNT std::max(std::thread::hardware_concurrency(), 4U) #endif discord::bot* discord::detail::instance = nullptr; discord::thread_pool discord::detail::tasks_pool = discord::thread_pool(WUMPUS_...
// // File: PGMA.cpp // Created by: <NAME> // Created on: Mon jul 11 11:41 2005 // /* Copyright or © 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 by the CeCILL licens...
/* Copyright (c) 2009-10 Qtrac Ltd. All rights reserved. This program or module 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 License, or (at your option) any later v...
#include "MT_XDFDialogs.h" enum { ID_X_CHOICE = wxID_HIGHEST + 1, ID_Y_CHOICE, ID_TIMESTEP }; MT_LoadXDFDialog::MT_LoadXDFDialog(wxWindow* parent, MT_ExperimentDataFile* pXDF, bool am_derived) : wxDialog(parent, wxID_...
// Problem: https://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/ // Ref: https://www.youtube.com/watch?v=f2ic2Rsc9pU&list=PLgUwDviBIf0rQ6cnlaHRMuOp4H_D-7hwP&index=8 /*******************************************************************************************************/ // NOTE:...
#include "defs.h" #include "ir.h" #define EDGE_TO_BE_FALLING 0 #define EDGE_TO_BE_RAISING 1 Ir gIr; void Ir::init() { cmd = 0; cmdOut = 0; work_time = 0; last_edge_time = 0; EICRA &= (~((1<<ISC11)|(1<<ISC10))); EICRA |= (1<<ISC11); // FALLING edge_dir = EDGE_TO_BE_FALLING; EIMSK|=(1<<INT1)...
//Delay.cpp //<NAME> //3/10/16 //Implementation of Delay.h #include "Delay.h" //Constructor Delay::Delay(int lengthInSamples) { delayLineL = new float[lengthInSamples]; delayLineR = new float[lengthInSamples]; delayLength = lengthInSamples; //Flush (zero) delay line and filter buffers. flush(); ...
#include "software/ai/hl/stp/action/intercept_ball_action.h" #include "shared/constants.h" #include "software/ai/evaluation/intercept.h" #include "software/ai/evaluation/pass.h" #include "software/ai/evaluation/robot.h" #include "software/ai/intent/move_intent.h" #include "software/geom/util.h" #include "software/logg...
#include "PBR.hpp" #ifndef M_PI #define M_PI 3.14159265358979323846 #endif void importanceSampleCosDir(const float2& u, const float3& N, float3& L, float& NdotL) { // Local referencial float3 upVector = abs(N.z) < 0.999 ? float3 (0,0,1) : float3 (1,0,0); float3 tangentX = normalize( cro...
#pragma once #include "3rdParty/Eigen.hpp" #include "Core/GL/GLRenderModel.hpp" #include "Core/GL/GLSLParser.hpp" #include "Core/GL/GLTexture.hpp" #include "Utils/EigenOpenGL.hpp" #include "Utils/ErrorChecking.hpp" // Not needed here, but usually everywhere that includes this file. #include "Utils/Logger.hpp" #incl...
/* * Copyright 2015 <copyright holder> <email> * * 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 la...
#include "stdafx.h" #include "Triangulate.h" namespace triangulator { static const float EPSILON = 0.0000000001f; static bool snip( const TVec2Vector& vb, int u,int v,int w,int n, const int *V ); }; float triangulator::area( const TVec2Vector& vb, const TIntVector& ib ) { int n = ib.size(); float ...
#include <stdlib.h> #include "PredComp.h" #include "TimeSeries.h" #include "Wavelets.h" /* Input File Format: # - ignored numlevels wavelettype (number) 0 prediction_horizon initdata model - for level 0 1 prediction_horizon initdata model - for level 1 ... numlevels-1 prediction_horizon initdata mode...
#include <DataTypes.hpp> #include <CMDParser.hpp> #include <glm/gtc/type_ptr.hpp> #include <algorithm> // std::shuffle #include <fstream> #include <iostream> #include <unistd.h> class RSBoard{ public: void read(std::ifstream& iff, float& min_depth_sample, float& max_depth_sample){ for(unsigned i = 0; i...
/* Copyright (c) Stanford University, The Regents of the University of * California, and others. * * All Rights Reserved. * * See Copyright-SimVascular.txt for additional details. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated doc...
/* * * Copyright 2017 Asylo 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 agree...
// Copyright (c) 2010 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. // Helper program to analyze the time that Chrome's renderers spend in system // calls. Start Chrome like this: // // SECCOMP_SANDBOX_DEBUGGING=1 chro...
#include <stdio.h> #include <math.h> #include <algorithm> using namespace std; struct Node { int v[800], vn; int inv_label; Node *next; Node() { vn = 0; inv_label = 0; next = NULL; } }; int p_size; void printList(Node *head) { Node *idx = head; int i, j = 0; while...
#include <bits/stdc++.h> const int MAXN = 1e5 + 10; const int MAXM = MAXN * 1.5; const int mod = 998244353; typedef long long LL; typedef std::vector<int> VI; void reduce(int & x) { x += x >> 31 & mod; } int mul(int x, int y) { return (LL) x * y % mod; } int pow(int a, int b, int r = 1) { for (; b; b >>= 1, a = mul(a...
//------------------------------------------------------------------------------ // DDSTextureLoading.cc //------------------------------------------------------------------------------ #include "Pre.h" #include "Core/Main.h" #include "Core/Containers/StaticArray.h" #include "IO/IO.h" #include "HttpFS/HTTPFileS...
#include "objparser.h" #include <fstream> #include <cstdio> #include <sstream> #include <cassert> #include "stb_image.h" void objparser::clear() { positions.clear(); normals.clear(); texcoords.clear(); indices.clear(); textures.clear(); batches.clear(); } bool objparser::...
/* * 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...
/* ___ /'___\ /\ \__/ __ __ ___ __ __ __ ____ \ \ ,__\/\ \/\ \ /' _ `\ /'_ `\/\ \/\ \ /',__\ by Zax0mA \ \ \_/\ \ \_\ \/\ \/\ \/\ \L\ \ \ \_\ \/\__, `\ \ \_\ \ \____/\ \_\ \_\ \____ \ \____/\/\____/ LITE ...
/*Advent of Code 2021, day 3, part 2 Author(s) : <NAME> Date of creation : 12/5/2021 */ #define DEBUG #include <iostream> #include <string> #include <bitset> #include <vector> #include <regex> #include <sstream> using namespace std; void fail(const string& msg) { cerr << msg << endl; exit(1); } int main(int argc,...
#include "Game.h" #include "engine.h" #include "snake.h" Game::Game(const GameSettings& _settings) { settings = _settings; // Drawing field cls(); drawFrame(2, 2, 3*settings.field_width, 3*settings.field_height, GRAY, (settings.portal_walls ? '0' :'#')); draw(2, 3+3*(settings.field_height)+2, GRAY...
#include "../Headers/loan.h" #include "../Headers/account.h" #include "../Headers/bank.h" #include <sstream> vector<string> Loan::_loanSerials; Loan::Loan(const string& serialNumber, const Account* account, const Date& loanDate, const int64_t& value, const LoanType& loanType) : Loan(serialNumber, account, loanDat...
#include <stdio.h> #include "bmpStream.h" using namespace std; bmpStream::bmpStream( unsigned int height, unsigned int width, unsigned short depth ) { if ( depth != 8 && depth != 24 && depth != 32 ) { throw "BMP_FILE_NOT_SUPPORTED"; } /* Calculate the number of bytes used to store a single image...
/* * sourceres.cpp * SourceRes project * * Copyright (c) 2013 <NAME> * BSD 2-Clause License * http://opensource.org/licenses/BSD-2-Clause * */ #include "sourceres.h" /* * Console commands */ static void sr_forceres( const CCommand& args ); static ConCommand sr_forceres_cmd("sr_forceres", sr_forceres,...
#include "DragView.h" #include <stdio.h> const ulong _GO_AWAY = 0; const ulong _DRAG = 1; long MouseThread(void* data); long MouseThread(void* data) { DragView* This = (DragView*)data; // Curly braces there due to a bug in mwcc (??) BRect goAwayRect; if (This->orientation == 0) goAwayRect.Set(3,3,16,14); else g...
#include "mpi_softmc.h" #include "../common/bit_array.h" #include "../common/igraph.h" #include "../common/realization.h" #include "mpi_common.h" #include <mpi.h> #include <unistd.h> #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cassert> using cmplx::SourceDetector; using cm...
#include "AStar.h" #include <algorithm> #include <iostream> #include <unordered_set> #include "Heap.h" #include <queue> #include "Map.h" #include "Node.h" #include "FloodFill.h" Map* AStar::pCurrentMap = nullptr; std::vector<MovementTile> AStar::GeneratePath(sf::Vector2f startPos, sf::Vector2i endPos) { std::shared_...
#include "read_integrals.hpp" using namespace aquarius::input; using namespace aquarius::task; using namespace aquarius::op; using namespace aquarius::tensor; using namespace aquarius::symmetry; namespace aquarius { namespace aim { template <typename U> ReadInts<U>::ReadInts(const string& name, input::Config& config...
#include "FontRenderer.h" #include <glm/gtc/matrix_transform.hpp> FontRenderer::FontRenderer(const std::string & p_FontPath, int p_ScreenWidth, int p_ScreenHeight, GLuint p_DefaultShaderID) { m_FontPath = p_FontPath; m_ScreenWidth = p_ScreenWidth; m_ScreenHeight = p_ScreenHeight; m_DefaultShaderID = p_DefaultSha...
#include<iostream> #include<string> #include<conio.h> #include<stdlib.h> using namespace std; int main(); void show_data(int searchkey); //function used to show data to end-user. void get_data(int i); //function used to obtain data from end-user. void search_student(int searchkey); void add_stu...
// license:BSD-3-Clause // copyright-holders:<NAME> ///////////////////////////////////////////////////////////////////////////////// ///// Hector video ///////////////////////////////////////////////////////////////////////////////// /* Hector 2HR+ Victor Hector 2HR Hector HRX Hect...
#include "log/logger.hpp" #include "gfx/renderer.hpp" #include "cmd/cmd.hpp" #include <vulkan/vulkan.h> #include <GLFW/glfw3.h> #define GLM_FORCE_RADIANS #define GLM_FORCE_DEPTH_ZERO_TO_ONE #include <glm/glm.hpp> #include <glm/gtc/type_ptr.hpp> #include <vector> #include <utility> #include <algorithm> std::vector<...
#include <string> #include <iostream> #include <fstream> #include <stdexcept> #include <stdio.h> #include <stdlib.h> #include <unordered_map> #include "SensorCluster.hpp" using std::string; using std::ifstream; using std::cout; using std::endl; // function to return the hash value based on the first digit unsigned in...
// Copyright (c) 2014-2018 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...
//Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such that: // //Only one letter can be changed at a time //Each transformed word must exist in the word list. Note that beginWord is not a transformed word. //Note: // //Retur...
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <glm/glm.hpp> #define GLM_ENABLE_EXPERIMENTAL #include <glm/ext.hpp> #include <glm/gtx/transform.hpp> #include <json-c/json.h> struct CameraCheckpoint { glm::vec3 point; glm::vec3 dir; int t; }; CameraCheckpoint cpFrom...
#include <cmath> #include <bps/bps.h> #include <bps/geolocation.h> #include <QDebug> #include "geolocation.hpp" GeoLocationData::GeoLocationData() : latitude(NAN), longitude(NAN), altitude(NAN), accuracy(NAN), vertAccuracy(NAN), heading(NAN), speed(NAN), vertSpeed(NAN), hdop(NAN)...
// // train_gmm_algo.cpp // LightCTR // // Created by SongKuangshi on 2017/10/13. // Copyright © 2017年 SongKuangshi. All rights reserved. // #include "train_gmm_algo.h" #include <string.h> #include "../util/random.h" #include "../common/avx.h" #define FOR(i,n) for(size_t i = 0;i < n;i++) const float PI = acos(-1)...
/* * Copyright (c) 2012-2013 Stanford University * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTH...
////////////////////////////////////////////////////////////////////// // noiseproc.cpp: implementation of the CNoiseProc class. // // This class implements various noise processing functions. // Impulse blanker, Noise Reduction, and Notch // // History: // 2011-01-06 Initial creation MSW // 2011-03-27 Initial rel...
#include "PCISPHSolver3.h" #include "SphKernel.h" #include "PointGenerator3.h" using namespace CalfFluidEngine; PCISPHSolver3::PCISPHSolver3() { SetTimeStepLimitScale(5.0); } PCISPHSolver3::~PCISPHSolver3() { } void CalfFluidEngine::PCISPHSolver3::accumulatePressureForce(double timeStepInSeconds) { auto particles...
//bv2av, an av and bv converter for bilibili //Code based on mcfx's python code,and algorithm by mcfx //Original: https://www.zhihu.com/question/381784377/answer/1099438784 //This transferred version is still buggy and unusable, and I have no idea why that will happen. //All functions are available now! //pull-requests...
#include <iostream> #include <fstream> #include <sstream> #include "aviao.h" #include "dados.h" #include "aeromodelo.h" namespace svs = SimuladorDeVooSimples; // Declaração da função que lê e guarda dentro dos da classe Dados os dados do arquivo void leArquivos(ifstream &arquivo, svs::Aviao &novo); // Função que lê ...
// Copyright (c) 2021 Graphcore Ltd. All rights reserved. #include <algorithm> #include <iostream> #include <numeric> #include <poprithms/error/error.hpp> #include <poprithms/schedule/shift/scheduledgraph.hpp> namespace { poprithms::schedule::shift::Graph getBaseGraph(uint64_t N) { // StartOp____0 // | | | | ...
/* Copyright (c) 2018-2019 Nokia. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
#include "VesselData.h" //! General constructor. VesselData::VesselData(void): _p1(0), _p2(0), _radius1(1), _radius2(1), _score(0), _isTerminator(false), _isInBranchingRegion(false), _distance(0), _isFitted(false) //,DEBUG1(0),DEBUG2(0),DEBUG3(0) { // Set default vessel direction this->setDirection(1,0,0); //...
//////////////////////////////////////////////////////////////// // (c) Copyright 2003- by <NAME> ////////////////////////////////////////////////////////////////// #include <cstdio> #include <gsl/gsl_multimin.h> #include <gsl/gsl_vector.h> #include <iostream> #include <iomanip> #include "Optimize/GSLMinimize.h" using...
#include <algorithm> #include <array> #include <deque> #include <fstream> #include <iostream> #include <string> #include <tuple> #include <vector> struct Coord { int x; int y; Coord(int x_, int y_) : x(x_), y(y_) {} }; bool operator<(const Coord& a, const Coord& b) { return std::tie(a.y, a.x) < std::...
#include "window.hpp" #include <iostream> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <stdexcept> #include <algorithm> #include "shaders/o2d.hpp" #include "shaders/regular.hpp" resource window::m_resource; std::unordered_map<GLFWwindow*, window*> window::m_wmap = {}; bool window::initd ...
/********************** coordinate_map.cpp author: wxw email: <EMAIL> time: 2019-7-29 **********************/ #include <iostream> #include <string> #include <opencv2/opencv.hpp> #include <ros/ros.h> #include <cv_bridge/cv_bridge.h> #include <geometry_msgs/PointStamped.h> #include <image_transport/image_transport.h> #in...
/* Copyright (c) 2019-2020, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
/** * @file This file is part of snakesGL. * * @section LICENSE * GNU General Public License v2.0 * * Copyright (c) 2018-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...
#include "utils.h" #include "../physics/sphere.h" #include "../physics/solid.h" GLFWwindow *window; bool start() { // glfw if (!glfwInit()) { fprintf(stderr, "ERROR: could not start GLFW3\n"); return false; } glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwW...
//! <EMAIL> #include <proto4z.h> #include <iostream> #include <time.h> #include <stdio.h> #ifdef WIN32 #include <windows.h> #else #include <sys/time.h> #endif // WIN32 #ifdef __APPLE__ #include<mach/mach_time.h> #endif // __APPLE__ using namespace std; using namespace zsummer::proto4z; #include "C++/TestProto.h"...
// // Copyright (c) 2017, chunquedong // Licensed under the Apache Licene 2.0 // // Created by chunquedong on 15/6/26. // #include "FType.h" #include "FPod.h" #include "../util/escape.h" bool FSlot::isStatic() { return (flags & FFlags::Static); } void FType::readMethod(FMethod &method, Buffer &buffer) { method....
#include <unordered_map> #include <regex> #include "ImageManager.h" #include "image.h" static int imageSequence = 0; static std::regex uriPattern = std::regex("image://polka/(.+)__\\d+"); std::unordered_map<QString, cv::Mat, QStringHasher> images; std::unordered_map<QString, std::vector<std::shared_ptr<polka...
#include <algorithm> #include <cassert> #include <functional> #include <graph.hpp> #include <iostream> void Graph::add_edge(int x, int y) { assert(!is_removed(x)); assert(!is_removed(y)); auto xit = std::lower_bound(G[x].begin(), G[x].end(), y); if (xit != G[x].end()) assert(*xit != y); G[...
#include "ParticlePack.h" #include <random> ParticlePack::ParticlePack() : m_put(0) { m_positions.resize(256); m_scales.resize(256); m_vertices = sf::VertexArray(sf::Quads, 256 * 4); } ParticlePack::ParticlePack(sf::Texture* tex) : m_put(0), m_texture(tex) { m_positions.resize(256); m_scales.resize(256); m_s...