text
stringlengths
3.08k
12.5k
// // LightRay.cpp // Kuplung // // Created by <NAME> on 12/17/15. // Copyright © 2015 supudo.net. All rights reserved. // #include "LightRay.hpp" #include <fstream> #include <glm/glm.hpp> #include <glm/gtc/type_ptr.hpp> LightRay::~LightRay() { glDeleteProgram(this->shaderProgram); glDeleteVertexArrays(1, &th...
#include <ncurses.h> #include <stdint.h> #include "logger.h" #include "model.h" #include "ui/page.h" #include "ui/page_game.h" #include "ui/page_squad.h" #include "ui/ui.h" GamePage::GamePage(UI *ui):Page(ui){ } Model *GamePage::model(){ return parent->get_model(); } void GamePage::draw(){ ...
// Scans the process with a given PID // author: hasherezade (<EMAIL>) #include "pe_sieve.h" #include <peconv.h> #include <Windows.h> #include "scanners/scanner.h" #include "utils/util.h" #include "utils/process_privilege.h" #include "utils/process_minidump.h" #include "postprocessors/results_dumper.h" using namesp...
#define TINYOBJLOADER_IMPLEMENTATION #include <omp.h> #include <chrono> #include <memory> #include <string> #include "bvh.hpp" #include "camera.hpp" #include "image.hpp" #include "rng.hpp" #include "tiny_obj_loader.h" constexpr float PI = 3.14159265359f; constexpr float INV_PI = 1.0f / PI; Vec3 localToWorld(const V...
/* Copyright (c) 2011, The Mineserver Project 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 condition...
// Copyright 2018 Slightech 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 required by ap...
// https://adventofcode.com/2016/day/21 #include <bits/stdc++.h> #define all(x) begin(x), end(x) #define sz(x) ((int)(x).size()) using namespace std; static const regex swap_pattern1 {R"(swap position (\d+) with position (\d+))"}; static const regex swap_pattern2 {R"(swap letter (\w) with letter (\w))"}; static cons...
/* * Copyright (C) 2011-2018 Intel Corporation. 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 li...
#include <iostream> #include <iomanip> #include <vector> #include <string> #include <unordered_map> #include <map> #include <list> #include <set> #include <unordered_set> #include <utility> #include <algorithm> #include <sstream> #include <string.h> #include <stdio.h> using namespace std; #define uint unsigned int #d...
// Copyright (c) 2015-2019 by the parties listed in the AUTHORS file. // All rights reserved. Use of this source code is governed by // a BSD-style license that can be found in the LICENSE file. #include <_libtoast_mpi.hpp> // Currently the only compiled code that uses MPI and needs to be bound to python is // the...
#include "riveragent.h" #include <iostream> #include "../heightmap.h" #include <cstdlib> #include <algorithm> #include <ctime> RiverAgent::RiverAgent() : m_directionIndex{0}, m_nbTry{0}, m_foundCoastLine{false}, m_foundMountain{false}, m_over{false} { setValue("count", 1); setVal...
#include <windows.h> #include "common.h" #include <Shlwapi.h> #pragma comment(lib,"shlwapi.lib") #include <strsafe.h> #define PSAPI_VERSION 1 #include <Psapi.h> #pragma comment(lib,"Psapi.lib") #define MainPathRELATIVE L"." LPWSTR GetCurModuleDir(LPWSTR module_dir, DWORD size) { ::ZeroMemory(module_dir, size); ...
#include <iostream> #include <sstream> #include <wordexp.h> #include <ros/ros.h> #include <message_filters/subscriber.h> #include <message_filters/synchronizer.h> #include <message_filters/sync_policies/approximate_time.h> #include <image_transport/image_transport.h> #include <image_transport/subscriber_filter.h> #i...
/* dbesy0.f -- translated by f2c (version 20100827). This file no longer depends on f2c. */ #include "slatec-internal.hpp" /* Table of constant values */ static integer const c__19 = 19; static integer const c__1 = 1; static integer const c__2 = 2; /* Initialized data */ static double const by0cs[19] = { -.0112...
#include "freertos/FreeRTOS.h" #include "esp_wifi.h" #include "esp_system.h" #include "esp_event.h" #include "esp_event_loop.h" #include "nvs_flash.h" #include "driver/gpio.h" #include "driver/i2s.h" #include "math.h" #include "playtune.h" #include "wavetable.h" #include "songdata.h" #include "tuningwords.h" #include ...
#include "pch.h" #include "Editor.h" // Temporary colors. Color colors[10] = { YELLOW, ORANGE, PINK, RED, GREEN, BLUE, PURPLE, BROWN, GRAY, BLACK }; Editor::Editor() : m_cameraVelocity({ 0.f,0.f,0.f }) { } void Editor::OnEnter() { m_camera.position = { 0.0f, 10.0f, 10.0f }; m_camera.target = { 0.0f, 0.0f, 0.0f ...
#include "TrueSenseConverter.h" #include <PvPixelType.h> #include <QtCore/QtGlobal> #include <QtCore/QDebug> TrueSenseConverter::TrueSenseConverter(): m_patStart(0) , m_algo(TSASimpleF) , m_bEnabled(true) { }; TrueSenseConverter::TrueSenseConverter(int patternStart, TrueSenseAlgType algo): m_patStart(patternStart...
#include "eshell.h" using namespace std; EncryptedShell::EncryptedShell() { return; }; EncryptedShell::EncryptedShell(std::string lhost, int lport, short family, char* process) { this->EncryptedShell::lhost = lhost; this->EncryptedShell::lport = lport; this->EncryptedShell::family = family; this->Encr...
//////////////////////////////////////////////////////////////////////////// // Created : 21.11.2008 // Author : <NAME> // Copyright (C) GSC Game World - 2009 //////////////////////////////////////////////////////////////////////////// #include "pch.h" #include "receiver_gamepad.h" #include <xray/input/handl...
/* * Adplug - Replayer for many OPL2/OPL3 audio file formats. * Copyright (C) 1999 - 2007 <NAME>, <<EMAIL>>, et al. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * vers...
#include "beveleffect.h" #include "math.h" static void Blur(QImage & im, int radius) { int height = im.height(); int width = im.width(); QImage src = im.copy(-radius, -radius, width + radius*2, height + radius*2); // Horizontal blur for (int y = 0; y < height; ++y) { const uint32_t *s...
// Copyright 2021 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 ...
/* * Jugadores.cpp * * Created on: May 1, 2021 * Author: algo2 */ #include "Jugadores.h" #include "Jugador.h" #include <iostream> #include <string> using namespace std; Jugadores::Jugadores() { cantidadDeJugadores = 0; listaDeJugadores = NULL; primero = NULL; ultimo = NULL; } void Jugadores::...
/************************************************************************ ECS:Python - Light-Weight C++ Library For Embedding Python Into C++ Copyright (c) 2012-2019 <NAME> This file is part of EcsPython. The BSD 2-Clause License: Redistribution and use in source and binary forms, with or without modification...
// the-solver.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <vector> #include <set> #include <map> #include <array> #include <utility> #include <stdint.h> typedef std::array<int, 3> XistenceTuple; typedef std::set<XistenceTuple> XistenceS...
/* * Copyright (c) 2020 TDK Invensense * * SPDX-License-Identifier: Apache-2.0 */ #include <device.h> #include <drivers/gpio.h> #include <drivers/sensor.h> #include <drivers/spi.h> #include <zephyr.h> #include <zephyr/types.h> #include <kernel.h> #include <bt/BLE.hpp> #include <imu/IMU.hpp> #include <term/term.hp...
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2012, <NAME>, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condi...
// ChatServer.cpp : Defines the entry point for the console application. // #include "ChatServerPCH.h" #include "../../SamplesCommon/StringUtil.h" using namespace cz; using namespace cz::rpc; Parameters gParams; #define LOG(fmt, ...) printf("LOG: " fmt "\n", __VA_ARGS__) #define BROADCAST_RPC(exclud...
#include <iostream> #include <fstream> #include <string> #include <tuple> #include <gmpxx.h> using namespace std; #define big mpz_class big Exponentiation_Di( big& a, big k, big& p ) //a^k % p { if( k == 0 ) return 1; big half = Exponentiation_Di( a, k / 2, p ) % p; half = ( half * half...
/************************************** **** 2017-6-5 ****************** **** <NAME> **************** **** <EMAIL> **************** ***************************************/ #include "OD.h" #include "density_estimator.h" // ======================================================================== void OD::com...
/* * Copyright (c) 2019 <NAME> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <vector> #include <algorithm> #if defined(_WIN32) // windows # define NOMINMAX // to remove min,max macro # include <windows.h> // this shou...
#include <displayObj.h> displayObj::displayObj(bool inGraphic,bool inColor,bool inTouch,bool inSD,bool inReadable) { graphic = inGraphic; color = inColor; hasTouch = inTouch; hasSD = inSD; readable = inReadable; offsetX = 0; offsetY = 0; } displayObj::~displayObj(void) { } void displayObj::pushOf...
// clang-format off #include "serialization.h" #include <fstream> #include <sstream> #include <yaml-cpp/yaml.h> #include "components.h" // clang-format on namespace YAML { template <> struct convert<glm::vec3> { static Node encode(const glm::vec3& rhs) { Node node; node.push_back(rhs.x); node.push_bac...
/** * Created on 12/22/18. * Copyright (c) 2018 Crow All rights reserved. * @author Crow * @brief Only give the interface: * RequestBuilder::Build() * ReuestBuilder::getters */ #include "request_builder.h" #include <cstring> #include <algorithm> #include <iostream> #include <memory> using namespace...
#include "texture.hpp" using namespace box; #include <algorithm> #include <cmath> #include <fstream> #include <stdexcept> void texture::load(const std::string& path) { std::ifstream file(path, std::ios::binary); if (!file.is_open()) throw std::runtime_error("Failed to open texture file " + path); ...
#include <map> #include <string> #include "TH1D.h" #include "TH2D.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Framework/interface/EDAnalyzer.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/ParameterSet/interface/ParameterS...
#include <stddef.h> #include <stdint.h> #include <string.h> #include <limits.h> #include "ArduinoUnitMockPrint.h" #if defined(ARDUINO) #include <Print.h> #else #include <iostream> #include <math.h> #ifdef DEC #undef DEC #endif #define DEC 10 #ifdef HEX #undef HEX #endif #define HEX 16 #ifdef OCT #undef OCT #endif #d...
#include "javascript.h" #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <dirent.h> #include "gui/elements.h" //All GUI elements should be included here #include "duktape.h" #include "duk_config.h" #include "duk_console.h" #include "duk_module_duktape.h" #include <iostream> #include ...
#include "Profile.h" #include "JanusContext.h" #include "Loop.h" #include <fstream> #include <iostream> #include <sstream> #include <cstdio> #include <map> using namespace std; using namespace janus; void filterParallelisableLoop(JanusContext *gc); #ifdef DDG static void loadDDG(JanusContext *gc, Loop &loop, char *...
#include "hxhim/private/hxhim.hpp" #include "hxhim/single_type.hpp" #include "utils/Blob.hpp" #include "utils/mlog2.h" #include "utils/mlogfacs2.h" int hxhim::BPutSingleType(hxhim_t *hx, void **subjects, std::size_t *subject_lens, enum hxhim_data_t *subject_types, vo...
//OpenCV Testing //<NAME> //5/11/2019 #include <iostream> #include <string> #include <sstream> #include <stdlib.h> #include <stdio.h> #include <opencv2/core.hpp> //Basic OpenCV #include <opencv2/imgproc.hpp> //Operations and filters on images #include <opencv2/imgcodecs.hpp> // #include <opencv2/videoio.hpp> //Op...
/*------------------------------------------------------------------------- This source file is a part of Clover For the latest info, see https://github.com/cmarrin/Clover Copyright (c) 2021-2022, <NAME> All rights reserved. Use of this source code is governed by the MIT license that can be foun...
#include <CasaluxPacketFormatter.h> #include <MiLightCommands.h> bool CasaluxPacketFormatter::canHandle(const uint8_t *packet, const size_t len) { return len == packetLength && packet[1] == 0x01; } void CasaluxPacketFormatter::initializePacket(uint8_t* packet) { size_t packetPtr = 0; // Byte 0: Packet length =...
/*! \file impl-ncurses.cpp * \brief Enter description here. */ #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <signal.h> #ifndef WIN32 #include <unistd.h> #endif #include <curl/curl.h> #include <map> #include <array> #include <deque> #include <string> #i...
// nnet2bin/nnet-precondition.cc // Copyright 2012 Johns Hopkins University (author: <NAME>) // See ../../COPYING for clarification regarding multiple 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 ...
#include <cassert> #include <iostream> #include "xcam.h" using std::cout; using std::endl; using xcam::opcodes::soft::soft_cam_t; using xcam::xcam_index_t; using xcam::xcam_subkey_t; using xcam::xcam_key_t; using xcam::xcam_value_t; using xcam::xcam_entry_t; soft_cam_t::cpu_map_t soft_cam_t::cpu_map; soft_cam_t* so...
/******************************************************************************** * Copyright 2009 The Robotics Group, The Maersk Mc-Kinney Moller Institute, * Faculty of Engineering, University of Southern Denmark * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce...
// compile with std=c++11 #include<algorithm> #include<cmath> #include<fstream> #include<iostream> #include<sstream> #include<string> #include<utility> #include<vector> #include<math.h> #include<stdlib.h> using std::cerr; using std::cout; using std::endl; using std::getline; using std::ifstream; using std::pair; usin...
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2020, STEREOLABS. // // All rights reserved. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED W...
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" /*====== This file is part of PerconaFT. Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. PerconaFT is free software: you can redistribute it and/or modif...
#include "Mosquito.h" #include "Host.h" #include "probability_v11.h" #include "misc_v10.h" using namespace std; //------------------------------------------------ // constructors void Mosquito::init(Parameters* param_ptr) { // copy over some parameters for convenience L = param_ptr->L; max_inf...
#include <utility> #include <vector> #include <iostream> #include <algorithm> #include "shape/shapefil.h" #include "dbf.h" #include <QDebug> /** * @brief Dbf::Dbf * @param path * @说明:DBF构造函数 * @读取DBF字段长度、记录长度,并将字段类型以及字段名称存入_fields */ Dbf::Dbf(const std::string &path) : _handle(static_cast<void *>(DBFOpen(pat...
#include "LightingOBJApplication.h" #include "gl_core_4_4.h" #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/ext.hpp> #include "Camera.h" #include "Gizmos.h" #include "Shader.h" #include "Mesh.h" using glm::vec3; using glm::vec4; using glm::mat4; LightingOBJApplication::LightingOBJApplication() : m_ca...
#include "DIF/Routing/CentralRouting/RoutingClient.h" Register_Class(RoutingClient); void RoutingClient::onPolicyInit() { started = false; in_timer = new cMessage("In-zone update timer"); in_updateInterval = par("in_updateInterval"); status_timer = new cMessage("Status timer"); status_updateInte...
#include "LaneDeparture.h" LaneDeparture::LaneDeparture() { int yHorizonLine = 9999; Mat element = getStructuringElement(MORPH_RECT, Size(5,5)); } LaneDeparture::~LaneDeparture(){ } string LaneDeparture::checkForLanes(Mat frame) { // get frame dimentions Size size = frame.size(); Mat src; ...
#include <stdio.h> #include <stdlib.h> #include <filesystem> #include <iostream> #include <array> extern "C" { extern unsigned char swfData[]; extern int swfSize; extern unsigned char swcData[]; extern int swcSize; } [[noreturn]] void waitExit(const char *exitMessage, int exitCode) { printf("%s\n"...
/* * Copyright (c) 2015-present Advanced Micro Devices, Inc. All rights reserved. * 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 rig...
// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will...
/* * Copyright 2009-2011 Red Hat, 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 agr...
#include <cascara/cascara.hpp> using namespace cascara; #include "../src/prefix32.hpp" #include "../src/ipaddress.hpp" #include "../src/ipv4.hpp" #include "../src/crunchy.hpp" using namespace ipaddress; class Prefix32Test { public: const char *netmask0 = "0.0.0.0"; const char *netmask8 = "255.0.0.0"; c...
/* Operators Copyright 2010-201x held jointly by LANS/LANL, LBNL, and PNNL. Amanzi is released under the three-clause BSD License. The terms of use and "as is" disclaimer for this license are provided in the top-level COPYRIGHT file. Author: <NAME> (<EMAIL>) */ #include <cstdlib> #include <cmath> #inc...
/* OneLoneCoder_PGE_ExtensionTestGFX2D.cpp License (OLC-3) ~~~~~~~~~~~~~~~ Copyright 2018 OneLoneCoder.com Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions or derivations of source ...
#include <stdint.h> #include "tmwtypes.h" #include "mex.h" #include "gpu/mxGPUArray.h" #include "raster_branches_mex.hpp" #include <algorithm> #include <array> mwSize get_1D_array_size(const mwSize dim_size, const mwSize* dims) { if (dim_size == 1) { return dims[0]; } else if (dim_size == 2) { if (dims[0] == 1...
#include "skepu_pooling.hpp" #include "proto/caffe.pb.h" using namespace caffe; //skepu definitions /////////////////////////////////////////// FORWARD //////////////////////////////////// /* * max pools forward * processes entire batch in one go */ [[skepu::userfunction]] double max_pool_uf(skepu2::Index1D ind...
/* Copyright (c) 2019, Triad National Security, LLC. All rights reserved. This is open source software; you can redistribute it and/or modify it under the terms of the BSD-3 License. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confus...
#include "altruct/structure/math/prime_holder.h" #include "gtest/gtest.h" #include <vector> using namespace std; using namespace altruct::math; typedef long long ll; typedef std::pair<int, int> fact_pair; TEST(prime_holder_test, primes) { prime_holder prim(114); EXPECT_EQ(114, prim.size())...
/* spine_detector_plugin.cpp * This tool detects spine * 2015-3-11 : by <NAME> */ #include "spine_detector_plugin.h" #include "manual_correct_dialog.h" #include "learning.h" #include "file_io_dialog.h" #include "manual_proofread_dialog.h" #include "spine_detector_dialog.h" using namespace std; Q_EX...
// Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. #include <spectrum/testutils/comparison/Ssim.h> constexpr float ssimK1 = 0.01f; constexpr float ssimK2 = 0.03f; constexpr float ssimMaxVa...
#include "mydatastructs.hpp" #include <iostream> //std::ostream #include <queue> // std::priority_queue #include <functional> // std::greater #include <stack> // std::stack template <class T> MyGraph<T>::MyGraph() { } template <class T> MyGraph<T>::MyGraph(const std::list<MyGraphEdge<T>> &edges) { fo...
/** * Copyright (c) 2015 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, merge, ...
/* * ntpserver.cpp is part of the HB-RF-ETH firmware - https://github.com/alexreinert/HB-RF-ETH * * Copyright 2021 <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 * ...
// // Created by yangyanjun on 2017/3/27. // #include "SceneRefractCube.h" #include <cstdio> #include <cstdlib> #include <iostream> using std::cout; using std::cerr; using std::endl; #include "tgaio.h" #include "glutils.h" using glm::vec3; #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtc/matrix_transform.hpp> #...
#include "skynet.h" #include "sn_socket.h" #include "socket_server.h" #include "sn_server.h" #include "sn_mq.h" #include "sn_harbor.h" #include <assert.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> static struct socket_server * SOCKET_SERVER = NULL; void forward_message(int type, bool padding, stru...
// This may look like C code, but it is really -*- C++ -*- // // Copyright <NAME>, 2001, 2002, 2003 // // Resize image using specified resize algorithm with Magick++ API // // Usage: zoom [-density resolution] [-filter algorithm] [-geometry geometry] // [-resample resolution] input_file output_file // #inc...
/*======================================================================= Copyright (c) 2018-2019 <NAME>. This software is distributed under the Apache License, Version 2.0. All copies must contain the full copyright notice licence.txt located at the base folder of the distribution. =====================...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <map> #include <utility> using namespace std; vector<string> W; int N; int mod = 835454957; map< pair<int, string>, int > Ml, Mr; void inc...
#include <CL/cl.h> #include <libclew/ocl_init.h> #include <vector> #include <sstream> #include <iostream> #include <stdexcept> template <typename T> std::string to_string(T value) { std::ostringstream ss; ss << value; return ss.str(); } void reportError(cl_int err, const std::string &filename, int line)...
/// @file MetadataConverter.cc /// /// @copyright (c) 2010 CSIRO /// Australia Telescope National Facility (ATNF) /// Commonwealth Scientific and Industrial Research Organisation (CSIRO) /// PO Box 76, Epping NSW 1710, Australia /// <EMAIL> /// /// This file is part of the ASKAP software distribution. /// /// The ASKAP...
struct Point { double x, y; }; double distance(const Point &a, const Point &b) { return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)); } struct Edge { Edge() = default; Edge(int a, int b, double weight) : a(a), b(b), weight(weight) {} int a, b; double weight; bool operator<(const Edge &an...
/////////////////////////////////////////////////////////////////////// // File: sctext.cpp // Date: 9.02.2015 // Author: <NAME> /////////////////////////////////////////////////////////////////////// // Description: unified semantic knowledge representation model utility #include "sctext.h" telement fbeg(ttext& x,t...
/* * Author: <NAME> * https://github.com/kimm-cs/cpp_college/ * Implementation of a database of student information * system containing the following information: Name, Roll number, Class, division, Date of * Birth, Blood group, Contact address, telephone number, driving license no. and other. * Construct t...
// // "FF and scale tomography images" // // Apply flatfield to all images in a rick file. // #include "Cmdline.h" #include "Disk.h" #include "File.h" #include "ImageIO.h" #include "Maths.h" #include <string.h> /* --------------------------------------------------------------- */ /* Macros -------------------------...
#pragma once #include <string> #include <vector> #include <algorithm> #include <spcppl/assert.hpp> #include <spcppl/ranges/fors.hpp> #include <spcppl/functors/Min.hpp> #include <spcppl/dataStructures/SparseTable.hpp> class SuffixArray { public: explicit SuffixArray(std::string s) { s += '\0'; suffArray.resize(s....
#include <Arduino.h> #include "common.h" #include "buttons.h" #include "display.h" #include <SPI.h> #include <Wire.h> #include <Adafruit_SSD1306.h> #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels // Declaration for an SSD1306 display connected...
// Copyright (C) 2011, 2012 <NAME> <<EMAIL>> // // This file is part of YouCompleteMe. // // YouCompleteMe 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 op...
#include "parser.h" #include "types.h" #include "string.h" #include "err.h" #include "num.h" static int ch { ' ' }; static bool last_is_hash { false }; int get(std::istream &in) { last_is_hash = (ch == '#'); return ch = in.get(); } static inline void read_block_comment(std::istream &in) { int nesting = 0; bool l...
/** @file 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"); yo...
// // MIT License // // © ESI Group, 2015 // // 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, pu...
#include "historymgr.h" #include <QDebug> #include "configmgr.h" #include "sessionconfig.h" #include "coreconfig.h" #include "vnotex.h" #include "notebookmgr.h" #include <notebook/notebook.h> #include <notebookbackend/inotebookbackend.h> #include "exception.h" using namespace vnotex; bool HistoryItemFull::operator<...
// // SelectGrad.cpp // MNN // // Created by MNN on 2019/05/26. // Copyright © 2018, Alibaba Group Holding Limited // #include "SelectGrad.hpp" #include "Macro.h" using namespace std; using namespace MNN; class SelectGrad : public OpGrad { public: SelectGrad() { mType = SEMI_LINEAR; } virtual ...
#include "NotesArea.h" #include "../../Scrolls/NotesScrollArea.h" #include "../../TuningGroup.h" #include "../EditorInterface.h" #include "SettingIniFile.h" #include "application.h" #include <QScrollBar> using namespace Utau; NotesArea::NotesArea(EditorInterface *editor, NotesScrollArea *view) : GraphicsArea(view) {...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <utility> using namespace std; typedef pair<int, int> PII; vector<vector<int> > c; vector<vector<int> > f; int n; vector<string> tokenize_to_string(const string &s...
/************************************************************************************************************************** Copyright(C) 2014-2017 www.xionggf.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to d...
// Copyright <NAME> 2011 - 2013. // // Distributed under the Boost Software License, Version 1.0. // // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // A utility ...
#include <map> #include <iostream> #include <algorithm> #include <list> #include <fstream> #include <sstream> #include "Sheduler.h" #include "Debug.h" #include "RR.h" #include "SJF.h" #include "TableForPrint.h" #include "imatch.h" using namespace std; enum Choice { FromFile=2, ByRandom=1 }; void Sheduler::Start() {...
/** * HRtoSQLite_tests * * @author <NAME> */ #include "SelectionTS.h" class HRSelectionTS : public SelectionTS { }; /** * A set of tests of "SELECT" statement * executed against to Oracle database ("HR" schema) */ //& Select "managers": TEST_F(HRSelectionTS, Managers) { std::cout << std::endl << "Select...
/* -- (c) Copyright 2014 Xilinx, Inc. All rights reserved. -- -- This file contains confidential and proprietary information -- of Xilinx, Inc. and is protected under U.S. and -- international copyright and other intellectual property -- laws. -- -- DISCLAIMER -- This disclaimer is not ...
#pragma GCC optimize(3) #include <cstdio> #include <cstring> #include <cctype> #define NMAX 1000000 #define _BUFFERSIZE 65536 static int _pos = _BUFFERSIZE; static char _buffer[_BUFFERSIZE]; inline int read_string(char *dest) { int read = 0; while (read <= NMAX) { if (_pos == _BUFFERSIZE) { ...
/* * Created by <NAME> on 2018/5/14. * * 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...
//stb load #define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_WRITE_IMPLEMENTATION #define STB_IMAGE_RESIZE_IMPLEMENTATION #include "stb_image.h" #include "stb_image_write.h" #include "stb_image_resize.h" #include "e2d_picture.h" //using name space using namespace Easy2D; //costruttore Picture::Picture() { } Picture...