text
stringlengths
3.08k
12.5k
#include <unistd.h> #include <string> #include <fstream> #include "common.h" #define TINYEXR_IMPLEMENTATION #include "tinyexr.h" using namespace std; int n = 256; // result image size n x n int spp = 16; // spp float f0 = 0.04f; // Schlick Fresnel normal incidence float rough = 0.1f; // roughness Color rho(0.8f, 0....
#include <cinttypes> #include <iostream> #include <utility> #include "PostTagSearcher.hpp" #include "arguments.hpp" #include "boost/format.hpp" #include "files/PostTagCribFile.hpp" #include "files/PostTagInitFile.hpp" #include "files/PostTagResultFile.hpp" using boost::program_options::variables_map; using PostTagSys...
/* * polyA_reads.cpp * TopHat * * Created by <NAME> on 9/2/08. * Copyright 2008 <NAME>. All rights reserved. * Derived from maq "catfilter", by <NAME> Sanger */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <cassert> #include <vector> #include <cstring> #include <cstdlib> #in...
#include <GL/gl.h> #include <GL/glut.h> #include <stdio.h> using namespace std; int frameNumber; // Numero de frames int Max_Y=10; int Min_Y=-1; int Max_X=10; int Min_X=-10; float X1=-10; float scale = 2; // escala en x, y, and z float rotateX, rotateY; // variables para rotación con teclas especiales void d...
void cvPartialLeastSquares(Mat X,Mat Y,int FeatDim,Mat &T,Mat &P,Mat &U,Mat &Q,Mat &W, Mat &B) /*********************************cvPartialLeastSquare**************************** * * Function to compute the Partial Least Square decomposition of Data * * Input - 1. X - Input Feature Matrix. X(i,:) stores the ith fea...
#include <bits/stdc++.h> using namespace std; long num_books, num_libraries, num_days; long* scores; long current_day = 0; std::unordered_set<long> books_used; const int timeout_secs = 20; struct library { long num_books, signup_time = 0, books_per_day = 0, index; vector<long> books; library() {} pair<long,...
/** Network Working Group <NAME> Request for Comments: 863 ISI May 1983 Discard Protocol This RFC specifies a standard for the ARPA Internet community. Hosts on the ARPA Internet that choose to implement a...
#include <cstdio> #include <cstring> #include <queue> #include <vector> #include <iostream> #include <algorithm> using namespace std; const int maxn = 2005; const int mod = 1e9 + 9; const int sigma_size = 2; const char sign[12][5] = {"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "1001"}; st...
// Copyright (c) 2019-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...
// // Created by <NAME> on 2016/01/28. // #include <fstream> #include "../log.hpp" #include "file_decoder.hpp" #include <cassert> #ifdef _WIN32 #include <lame.h> #else #include <lame/lame.h> #endif //_WIN32 #include <cstring> using byte = unsigned char; bool strip_header(block_buffer<byte>& buffer); bool is_syncword...
/* Copyright (c) 2019, <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublice...
#include "RenderObject.h" #include <GLUT/glut.h> RenderObject::RenderObject(const char *filename) { m = new Molecule(filename); setRotationCount(300, 5); qStart = randomUnitQuaternion(); resetQuaternions(qStart); } RenderObject::~RenderObject() { delete m; } void RenderObject::setRotationCount(int rc, int...
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * 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.org/MPL/2.0/. */ /* Implement shared vtbl methods. */...
#include <cfloat> #include <iostream> #include <memory> #include <random> #include <trayzy/Camera.h> #include <trayzy/Dielectric.h> #include <trayzy/HittableList.h> #include <trayzy/Lambertian.h> #include <trayzy/Metal.h> #include <trayzy/Ray.h> #include <trayzy/Sphere.h> #include <trayzy/Vec3.h> using Cameraf = tray...
#include <stdlib.h> #include "math.h" #include "Globals.hxx" #include "Function.hxx" #include "Problem.hxx" FILE *ARE::fpLOG = NULL ; ARE::utils::RecursiveMutex ARE::LOGMutex ; #define nPrimes 26 char primes[nPrimes] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 1...
/**************************************************************************** * MeshLab o o * * A versatile mesh processing toolbox o o * * _ O _ * * Co...
#include "Sft.h" #include "SfPacket.h" #include "UfFile.h" #include "tools/dump.h" #include "tools/logging.h" /////////////////////////////////////////////////////////////////////////////////// void Sft::Delegate::onDataReceived(const char * buffer, int len) { if (mSft != NULL) mSft->onDataReceived(buffe...
#include "PointCloud.hpp" #include <liblas/liblas.hpp> #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/search/search.h> #include <pcl/search/kdtree.h> #include <pcl/features/normal_3d.h> #include <pcl/visualization/cloud_viewer.h> #include <pcl/filters/passthrough.h> #include <pcl/segmentation/re...
#include <stdio.h> #include <string.h> #include <iostream> #include <sstream> #include "aruco.h" #include "math.h" #include "cvdrawingutils.h" #include <opencv2/opencv.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> //#define CAMERA_NUM 1 using namespace cv; using namespace std; usi...
/*Program to solve Algebraic and Transcendental Equations by Bisection Method. This program requires C++11 or newer compiler. Author: <NAME> Date: January 16, 2018.*/ #include <iostream> #include <stdio.h> #include <vector> #include <string> #include <algorithm> #include <sstream> #include <math.h> #include <iomanip...
#pragma once #include "neural_network.hpp" #include "utils.hpp" struct GLayer { std::vector<sf::Vector2f> neurons_positions; }; struct NeuralRenderer { void render(sf::RenderTarget& target, Network& network, const std::vector<float>& inputs) { network.execute(inputs); updateLayers(network); const uint64_...
#include "modules/core/gfx_platform.h" struct Gfx_Platform_Null : public Gfx_Platform { Render_Backend backend; Gfx_Platform_Info info; u32 allocation_size; void *allocated_mem; virtual void *get_backend_device() { return nullptr; } virtual void *get_backend_context() { return nullptr; } virtual const Gfx_Pla...
/* * Copyright (c) 2012-2018, Association Scientifique pour la Geologie et ses * Applications (ASGA). 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 mus...
#include <CommandHandler.hpp> #include <iostream> static const int NUM_GRID_ROWS = 3; static const int NUM_GRID_COLS = 3; static const double BLINK_PERCENTAGE = 0.3; // Average mouse precision using regular methods (touchpad, mouse) static const int MOUSE_PRECISION = 3; // If the user looks past this offset, the li...
#include "client.hpp" #include "opcodes.hpp" #include "urls.hpp" #include "nlohmann/json.hpp" #include "rpp/rpp.hpp" #include "websocketpp/connection.hpp" #include <QDebug> #include <fstream> #include <map> // Timer namespace discord { Timer::Timer(Stop_Function const& stop) : stop(stop) {} void Timer::can...
#include <bits/stdc++.h> #define EL cerr << endl; #define DB(x) cerr << "#" << (#x) << ": " << (x) << " "; #define DEB(x) cerr << "#" << (#x) << ": " << (x) << endl; #define PR(x) cout << (x) << endl #define X first #define Y second #define PB push_back #define MP make_pair using namespace std; typedef unsigned long ...
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
/* Copyright 1998–2018 <NAME> and the CrypTool Team. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation (FSF). A copy of the license is included in the section entitled "G...
/****************************************************************** A library for controling a set of 8x8 LEDs with a MAX7219 or MAX7221 displays. This is a plugin for Adafruit's core graphics library, providing basic graphics primitives (points, lines, circles, etc.). You need to download and install Adafruit_GFX...
#include "rpc-server.hpp" #include "keybox-errcodes.h" struct rpc_session_state { BaseDevice *bindDevice; }; struct rpc_server_state { std::map<generic_json_rpc_session *, rpc_session_state *> sessionStates; std::map<BaseDevice *, generic_json_rpc_session *> devStates; }; rpc_server::rpc_server() : json_r...
// Copyright 2018 The Chromium OS 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 <stdint.h> #include <map> #include <memory> #include <string> #include <utility> #include <base/command_line.h> #include <base/logging.h> #i...
// 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. #include "chrome/browser/chromeos/dom_ui/network_menu_ui.h" #include "app/l10n_util.h" #include "base/values.h" #include "base/string_number_conversi...
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, i...
# include <Eigen/Dense> # include <vector> # include "transform_hessian.h" # include "differentiate_jacobian.h" # include "stan/math/mix/mat.hpp" // # include <stan/math.hpp> // # include <stan/math/mix/mat/functor/hessian.hpp> // # include <stan/math/fwd/scal/fun/pow.hpp> // # include <stan/math/fwd/scal/fun/exp.h...
#include <iostream> #include <unistd.h> #include <time.h> #include "OpenclHelper.h" #include "NeuralNetwork.h" #include "NetworkContainer.h" #include "NetworkRunner.h" #include "GeneticAlgorithm.h" void print_help() { printf ("The GPU Based Acceleration of Neural Networks.\n" "Usage:\n" "\t...
#include <iostream> #include <string> #include <vector> #include <csignal> #include <unix/inet.hpp> #include <unix/signals.hpp> #include <unix/epoll.hpp> // Kinda like in python you say "import Foo as bar' namespace unix = _unix; volatile std::sig_atomic_t run = true; void signalHandler(int w_sig __attribute__ (...
/*----------------------------------------------------------------------------* | This file is part of WinDEU, the port of DEU to Windows. | | WinDEU was created by the DEU team: | | <NAME>, <NAME>, <NAME> and others... | | ...
#ifdef SOMA_IO_DICOM #include <soma-io/Transformation/PatientOrientation.h> #else #include <Transformation/PatientOrientation.h> #endif dcm::PatientOrientation::PatientOrientation() { } dcm::PatientOrientation::PatientOrientation( const dcm::PatientOrientation& other ) ...
// // Collect information about the disk space used by the top tier and second // tier objects inside an art format root event-data file. // #include <iostream> #include <iomanip> #include <string> #include <vector> #include <algorithm> #include <set> #include "Print/artProductSizes/RootSizeOnDisk.hh" #include "Print...
/* * $Id: $ */ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h" #include "Geometry/CSCGeometry/interface/CSCGeometry.h" #include "TrackingTools/Records/interface/TrackingComponentsRecord.h" #include "TrackingTools/GeomPropagators/interface/Propagator.h" MuonCSCChamberResidual::MuonC...
#pragma once #include "Transaction.hpp" #include "util/number.hpp" #include <xul/io/serializable.hpp> #include <xul/lang/object_ptr.hpp> #include <memory> #include <vector> #include <map> #include <unordered_map> #include <stdint.h> #include <assert.h> namespace xul { class data_input_stream; class data_output_stream...
struct nag7Segm : TransparentWidget { private: std::shared_ptr<Font> font; NagSeq *pSeq; nag *pNag; void init(float x, float y) { box.size = Vec(27, 22); box.pos = Vec(mm2px(x), yncscape(y, px2mm(box.size.y))); font = APP->window->loadFont(asset::plugin(pluginInstance, "res/Segment7Standard.ttf")); } publ...
#include <WiFi.h> #include <HTTPClient.h> #ifdef USE_DMA extern "C" { #include "tftspi.h" #include "tft.h" } #else #include "Adafruit_GFX.h" #include "WROVER_KIT_LCD.h" WROVER_KIT_LCD tft; #endif /*Uncomment the following line to get the read and display timings*/ //#define TIMINGS HTTPClient http; //Variables con...
//// guidedfilter.cpp: implementation of the guided filter method. //// // -cumsum() returns the cummulative sum over x and y for radius r. // -boxfilter() implements the boxfilter. // -guidedfilter() o(1) implementation of the guided filter. // -test_guidedfltr() testing functions for the guided filter. // // ...
#include "SylinderConfig.hpp" #include "Util/YamlHelper.hpp" SylinderConfig::SylinderConfig(std::string filename) { YAML::Node config = YAML::LoadFile(filename); // required parameters readConfig(config, VARNAME(rngSeed), rngSeed, ""); readConfig(config, VARNAME(simBoxLow), simBoxLow, 3, ""); re...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "compiler/analysis.h" #include "compiler/ast.h" #include "compiler/codegen/codegen.h" #include "compiler/context.h" #include "compiler/elaboration.h" #include "compiler/ir/builder.h" #include "compiler/ir/ir.h" #in...
#include "cbase.h" #include "pmp_gamemovement.h" #include "movevars_shared.h" #include "tier0/memdbgon.h" CPMPGameMovement::CPMPGameMovement() {} #define NON_JUMP_VELOCITY 140.f // steepness limit (z norm minimum to be considered grounded) #define ZNORM_GROUNDED_LIMIT 0.7f void CPMPGameMovement::CategorizePosition...
#include "priorbox.hpp" PriorBox::PriorBox(const cv::Size& input_shape, const cv::Size& output_shape) { // initialize in_w = input_shape.width; in_h = input_shape.height; out_w = output_shape.width; out_h = output_shape.height; cv::Size feature_map_2nd = { int(int((i...
#include "pir.hpp" #include "pir_client.hpp" #include "pir_server.hpp" #include <chrono> #include <cstddef> #include <cstdint> #include <memory> #include <random> #include <seal/seal.h> using namespace std::chrono; using namespace std; using namespace seal; int query_test(uint64_t num_items, uint64_t item_size, uint3...
/***************************************************************************** * This file is provided under the Creative Commons Attribution 3.0 license. * * You are free to share, copy, distribute, transmit, or adapt this work * PROVIDED THAT you attribute the work to the authors listed below. * For more information,...
/* * Copyright 2015 <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...
/* Copyright (c) 2002-2021 Tampere University. This file is part of TTA-Based Codesign Environment (TCE). 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, ...
//////////////////////////////////////////////////////////////////////////// // // Copyright 2016 Realm 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/li...
/* Image Uploader - free application for uploading images/files to the Internet Copyright 2007-2018 <NAME> (<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 ...
#include <cmath> #include <cstdlib> #include <iostream> #include <sstream> #include <vector> //#include <random> //#include <ctime> using namespace std; //assumes power > 0 and that map is bijective vector<unsigned int> mapPower(const vector<unsigned int>& map, int power) { if (power == 1) { return map;...
//Copyright (c) 2015 <NAME> // //Permission is hereby granted, free of charge, to any person obtaining a copy //of this software and associated documentation files (the "Software"), to deal //in the Software without restriction, including without limitation the rights //to use, copy, modify, merge, publish, distribute,...
//===- GlobalsStream.cpp - PDB Index of Symbols by Name ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
#include <glm/gtc/constants.hpp> #include <glm/gtx/compatibility.hpp> #include <glm/gtc/type_ptr.hpp> #include "particle_system.h" #include "random_utils.h" ParticleSystem::ParticleSystem(Shader& shader, Renderer& renderer, unsigned int max_particles) : particle_pool_(), ...
/* * Copyright (c) 2014 Google, Inc. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * including commercial appl...
/** @file Class to execute one (or more) remap plugin(s). @section license License 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...
#include "Isis.h" #include <cstdio> #include <QString> #include "FileName.h" #include "IException.h" #include "iTime.h" #include "IString.h" #include "OriginalLabel.h" #include "pds.h" #include "Preference.h" #include "ProcessByLine.h" #include "PvlToPvlTranslationManager.h" #include "SpecialPixel.h" #include "UserI...
#include <effectengine/Animation4Music_WavesPulseSlow.h> #include <hyperhdrbase/SoundCapture.h> #include <cmath> Animation4Music_WavesPulseSlow::Animation4Music_WavesPulseSlow() : AnimationBaseMusic(AMUSIC_WAVESPULSESLOW), _internalIndex(0), _oldMulti(0) { for (int i = 0; i < 5; i++) { _buffer.push_back(QColor...
/* * tree.cpp * * Created on: Mar 22, 2018 * Author: napoleon */ #include <iostream> #include <stdlib.h> #include <stdio.h> #include <ctime> #include <vector> #include <math.h> #include "tree.hpp" using namespace std; bool is_prime(int); int sum_digits(int); btree::btree() { root = NULL; } node* btree::i...
// Copyright (c) 2009-2010 <NAME> // Copyright (c) 2009-2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <uint256.h> #include <string.h> std::string HexStr(const Span<const uint8_t> s) ...
/// /// \file AliFemtoV0PairCut.cxx /// #include "AliFemtoV0PairCut.h" #include <string> #include <cstdio> #ifdef __ROOT__ /// \cond CLASSIMP ClassImp(AliFemtoV0PairCut); /// \endcond #endif //__________________ AliFemtoV0PairCut::AliFemtoV0PairCut(): fNPairsPassed(0), fNPairsFailed(0), fV0Max(1.0), f...
/* Writes either the unique smiles (if it can be repinterpreted) or a non-aromatic "unique" smiles */ #include <stdlib.h> #include <memory> using namespace std; #include "cmdline.h" #include "misc.h" #include "istream_and_type.h" #include "molecule.h" #include "aromatic.h" #include "iwstandard.h" const char * p...
/* Exemplo que mostra como usar a Canvas para exibir uma simples animacao de * um objeto quicante. */ #include <SCV/Kernel.h> #include <SCV/ColorScheme.h> #include <SCV/Color4f.h> #include <SCV/Canvas.h> #include <SCV/MenuBar.h> #include <SCV/ContextMenu.h> #include <string> static const int WINDOW_WIDTH = 320; stat...
// Copyright (c) 2015-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <consensus/merkle.h> #include "crypto/sha256.h" #include "hash.h" /* WARNING! If you're reading this because yo...
#include "Camera.h" void CameraController::initialize( Game* game, Scene* scene ) { _shift_key = false; _control_key = false; _rotate_active = true; _pan_active = false; _zoom_active = false; _touch_x = 0; _touch_y = 0; _invertY = false; _fpsCam = false; // let add a node to h...
/*========================================================================= * * Copyright NumFOCUS * * 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 * * https://www.apache.o...
/* https://www.hackerrank.com/challenges/mandragora/problem The evil forest is guarded by vicious mandragoras. Garnet and her pet must make a journey through. She starts with health point () and experience points. As she encouters each mandragora, her choices are: Garnet's pet eats mandragora . This increments...
#include <algorithm> #include <cstdlib> #include <ctime> #include <iostream> #include <map> #include <vector> #include <tr1/functional> #include "Scheduler.hpp" #include "DP/taskScheduling.hpp" #include "compSet/ca_ts.hpp" #include "nnet/nnetmultitask.hpp" #include "ParseCommandLine.hpp" #include "VoltageTable.hpp" u...
# line 1 "inter.m" # line 4 "inter.cpp" #include "ast.f" extern void MatchError(char *, int); #include "ast.h" # line 1 "inter.m" #include "move.hpp" extern "C" void printf(...); extern "C" int execute(Statement s); string evaluate_string(Expression e) { # line 21 "inter.cpp" // GENERATED FROM SOURCE LINE 12...
/* * SimulatorLink.cpp * * Created on: 12 ene. 2018 * Author: manupc */ #include "SimulatorLink.h" #include <cstring> #include <string> #include <cstdlib> #include "GameState.h" #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; char * strsep(char **sp, char *sep) { ...
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
// Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC") // // 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.org/MPL/2.0/. #include <config.h> #include <http/request.h...
#include "osu_reader/replay_reader.h" #include "binary_reader.h" #include "osu_reader/string_stuff.h" #include "parse_string.h" #ifdef ENABLE_LZMA #include <lzma.h> #endif std::optional<osu::Replay> osu::Replay_reader::from_file(const std::filesystem::path& file_path) { std::ifstream file{file_path, std::ios::bin...
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; void remlight(int j, string &L, vector<string> &S, int &m, int &n) { L = L.substr(0, j) + (j+1<(int)L.siz...
/* # For more info visit: https://www.geeksforgeeks.org/multi-source-shortest-path-in-unweighted-graph/ # REMEMBER: Shortest path can be found by BFS (single source or multi source) only in UNWEIGHTED GRAPHS. # The below could have also been implemented using normal BFS ---> We can loop through the vertices ...
#include <getopt.h> #include <cstdio> #include <cstdlib> #include <cstring> #include "opcodes.hpp" #include "stack.hpp" void debug(); #define max 256 int ram[max], d_flag = 0, pc = 0, cmd[2]; char txt[256]; stack ops = {{0}, 0}, pcs = {{0}, 0}; int main(int argc, char* argv[]) { char filename[100]; int rc, opt; ...
#include <psp2/ctrl.h> #include <random> #include <imgui_vita2d/imgui_vita.h> #include <vita2d.h> #include <stdio.h> #include "sqlite3.h" #include "scenarioView.hpp" #include "../view.hpp" #include "../context.hpp" #include "../scenario.hpp" #include "../scenarioContext.hpp" #include "msg.hpp" #include "db.hpp" #inclu...
/** ** Copyright (c) 2014 Illumina, Inc. ** ** This file is part of Illumina's Enhanced Artificial Genome Engine (EAGLE), ** covered by the "BSD 2-Clause License" (see accompanying LICENSE file) **/ #include <iostream> #include <string> #include <vector> #include <boost/assign.hpp> using namespace std; using boo...
/* Contest: CodeChef March 2020 Long challange Problem link: https://www.codechef.com/MARCH20B/problems/MDSWIN2 Author: <NAME> Author's Webpage: http://vinaysomawat.github.io/ */ #include <bits/stdc++.h> #define ll long using namespace std; ll mod = 998244353; const ll elementmax = 100001; ll array1[...
#include <iostream> #include <windows.h> #include <conio.h> #include "ExternalFunctions.h" #include "costanti.hpp" #include "Game.h" #include "Map.h" #include "Player.h" #include "Enemy.h" #include "Bullet.h" #include "bonus.h" #include "Scoreboard.h" using namespace std; using namespace constants; /* Author: ...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 1e5 + 10, M = 2 * N, INF = 0x3f3f3f3f; int n, m; int h[N], e[M], ne[M], w[M], idx; struct Edge { int a, b, w; bool used; bool operator< (const Edge & t) { return w < t.w; } } edge[300010]; //所有边 数据范围是题目 单向边 int ...
/* Copyright (C) 2021 Intel Corporation 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, softwa...
#include <fs/saf.h> #include <utils/log.h> #include <utils/assert.h> using namespace fs; using namespace fs::vfs; saf_mount::saf_mount(void* data) { this->data = data; } file_t* saf_mount::open(char* path) { debugf("open: %s\n", path); char* path_cpy = new char[strlen(path) + 1]; strcpy(path_cpy, path); path_c...
/* Copyright 2020, RespiraWorks Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
#include "stdafx.h" #include "clang_parsing.h" #include "clang_wrappers.h" metagen::TranslationUnitTypes metagen::ParseTranslationUnit(std::string filename, std::vector<const char*> compiler_args) { TranslationUnitTypes tu_types = { filename, {} }; CXIndex index = clang_createIndex(0, 0); CXTranslationUnit unit = c...
/* * Copyright (c) 2005, <NAME> and IFS Institute for Software at HSR Rapperswil, Switzerland * All rights reserved. * * This library/application is free software; you can redistribute and/or modify it under the terms of * the license that is included with this library/application in the file license.txt. */ #in...
/** * File: TcpServer.h * Description: Implementation of TCP server * Created Date: 2017-11-16 */ #include "TcpServer.h" int *TcpServer::child_count = static_cast<int *>(mmap(NULL, sizeof *child_count, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0)...
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2013-2014, Image Engine Design inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
#include "SymbolTable.h" #include "util.h" Item::Item(string name, Sym type, Kind kind) { this->name = name; this->type = type; this->kind = kind; } VariableItem::VariableItem(string name, Sym type, int length) : Item(name, type, VARIABLE) { this->arrayLength = length; } ConstantItem:...
#include "TexturingApplication.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 <stb_image.h> using glm::vec3; using glm::vec4; using glm::mat4; TexturingApplication::TexturingApplication() : m_ca...
#include <PerfMonitor.h> #ifdef _OPENMP #include <omp.h> #endif #include <stdio.h> #include <math.h> #include <string> #include <sstream> using namespace pm_lib; #define MATSIZE 1000 int nsize; struct matrix { int nsize; double a2[MATSIZE][MATSIZE]; double b2[MATSIZE][MATSIZE]; double c2[MATSIZE][MATSIZE]; } matri...
#include <iostream> #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" #include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h" // essentials !!! #include "FWCore/Framework/interface/Event.h" #include "DataF...
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define mem(Arr,x) memset(Arr,x,sizeof(Arr)) //#define Id(x,y) ((x)*m+(y)) const int maxN=2010000; const int Mod=1000000009; const int inf=2147483647; int n,m,K; bool Map[maxN]; int U...
#include "points.hpp" Points::Points(const uint16_t count, const float psize, const float sx, const float sy, bool randomize) : pixel_size(psize), sx(sx), sy(sy), count(count) { magic_radius = 0.6f * pixel_size; auto px = -sx; auto py = -sy; auto kx = 1.2f * magic_radius; auto ky = 1.2f * magic...
#include "sortwidget.h" sortWidget::sortWidget(QWidget *parent) : QWidget(parent) { setMinimumSize(1440, 840); setAutoFillBackground(true); setPalette(QPalette(backgroundColor)); arr = new Array; pixTemp1 = new QPixmap(size()); pixTemp1->fill(QColor(0, 0, 0, 0)); pixTemp2 = ne...
/**************************************************************************/ /* */ /* WWIV Version 5.x */ /* Copyright (C)2015-2021, WWIV Software Services */ /* ...