text
stringlengths
3.08k
12.5k
#include <iostream> #include <vector> #include <algorithm> #include <list> #include <iterator> /* * (((\w+),? ?)+\.) - zdania * (( ?(\w+)[ ,]?)+\.) - wyrazy */ enum Kolory { Czarny, Rozowy, Niebieski }; enum class Kolory2 { Bialy, Zielony, Czerwony, Pomaranczowy }; enum class Sw...
#include "TrajectoryReader.h" using namespace nspace; using namespace std; template<typename TY> class LinearInterpolation : public Function<TY, Real>{ public: TY _a; TY _b; LinearInterpolation(const TY & a, const TY & b):_a(a),_b(b){ } inline bool evaluate(TY & result, const Real & x){ // ...
/* * Copyright © 2012-2013 Red Hat, 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 without restriction, including without limitation * the rights to use, copy, modify, merge, pu...
#include "LSH.h" #ifndef UINT_MAX #define UINT_MAX 0xffffffff #endif #define RANDPROJGROUPSIZE 100 /* Constructor - Optimal Densified Minhash - Type 2. */ LSH::LSH(int hashType, int _K_in, int _L_in, int _rangePow_in) { _hashType = hashType; _K = _K_in; _L = _L_in; _numTables = _L_in; // In densifie...
#include "Main.h" #include "Strings.h" #include "../Gridder/Gridder.h" #include "Timer.h" void usage() { printf("Usage: ProbDX -r [Receptor.PDBQE] -t [Trajectory.PDB] -o [Output.DX] (Optional: -p GRID_PADDING(=10A) -s GRID_SPACING(=1.000A))\n"); } int main(int argc, char **argv) { string datfn, trjfn, recfn, ou...
/* * Copyright 2007-2021 CM4all GmbH * All rights reserved. * * author: <NAME> <<EMAIL>> * * 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 ...
/*========================================================================= * * Copyright 2011-2013 The University of North Carolina at Chapel Hill * All rights reserved. * * Licensed under the MADAI Software License. You may obtain a copy of * this license at * * https://madai-public.cs.unc.edu/vis...
#include <iostream> #include <vector> #include <cassert> #include <algorithm> #include <numeric> using namespace std; template<typename C> size_t len(const C& c){ return c.size(); } // Get the median of an unordered set of numbers of arbitrary // type (this will modify the underlying dataset). // fixme: const not ...
#include "PinTapConnector.h" db::RouteStatus PinTapConnector::run() { // 1 Get bestBox auto tapXY = database.getLoc(tap); db::BoxOnLayer bestBox; db::RouteStatus status = getBestPinAccessBox(tapXY, tap.layerIdx, dbNet.pinAccessBoxes[pinIdx], bestBox); if (status != +db::RouteStatus::SUCC_CONN_EXT_P...
#include "compiler.h" inline bool Compiler::isSep(char c, const char *s) const{ while(*s) if(c == *s++) return true; return false; } inline bool Compiler::isNum(const char *s) const{ while(*s) if(!isdigit(*s++)) return false; return true; } void Compiler::read(std::vector<std::stri...
/** *** Copyright 2019 ProximaX Limited. All rights reserved. *** Use of this source code is governed by the Apache 2.0 *** license that can be found in the LICENSE file. **/ #include "http.h" #include <xpxchaincpp/client.h> #include <string> #include <boost/asio.hpp> #include <boost/asio/ssl.hpp> #include <boost/bea...
//libs #ifdef ESP32 #include <WiFi.h> #elif MKR1000 #include <WiFi101.h> #endif #include <WiFiUdp.h> // local includes #include "network.h" #include "debug.h" #include "constants.h" #include "secrets.h" #include "networkStructs.h" #include "adc.h" // Send a network message to advertise this devise and its p...
#include <algorithm> #include <iostream> #include <vector> #include <string> #include <queue> #include <map> class Node { public: Node(int x, int y, char type) : x(x), y(y), type(type) {}; void addNeighbors(std::vector<Node>& map, int X, int Y); int x = 0; int y = 0; char type; std::vector<Node*> neighbors; bo...
auto Emulator::attach(ares::Node::Object node) -> void { if(interface && node->is<ares::Node::Screen>()) { screens = root->find<ares::Node::Screen>(); } if(interface && node->is<ares::Node::Stream>()) { streams = root->find<ares::Node::Stream>(); } } auto Emulator::detach(ares::Node::Object node) -> v...
//============================================================================ // aabbtree.cpp //============================================================================ #include "stdafx.h" #include "aabbtree.hpp" Tri* AABBtree::Tris; // THE GLOBAL MASTER LIST OF TRIANGLES int AABBtree::MINT...
//=====================================================================// /*! @file @brief R8C RAYTRACE @author 平松邦仁 (<EMAIL>) @copyright Copyright (C) 2017, 2021 <NAME> @n Released under the MIT license @n https://github.com/hirakuni45/R8C/blob/master/LICENSE */ //========================================...
#include "core.hpp" #include "font.hpp" #include <fstream> #include <iterator> #include <regex> #include "Assets.hpp" #include "Logger.hpp" #include "Utils.hpp" #include "font.hpp" // Loading utils glm::vec2 splitVec2(std::string toSplit) { glm::vec2 out; std::istringstream buf(toSplit); std::istream_itera...
#include "DragonEnemy.h" #include "app.h" #include "Textures.h" #include "Input.h" #include "Render.h" #include "Audio.h" #include "ModuleFadeToBlack.h" #include "Window.h" #include "Log.h" #include "Scene.h" #include "ModulePhysics.h" #include "ModulePlayer.h" #include "Map.h" #include "SceneIntro.h" #include "Module...
/* Connect the SD card to the following pins: SD Card | ESP32 D2 - D3 SS CMD MOSI VSS GND VDD 3.3V CLK SCK VSS GND D0 MISO D1 - */ #include "sd_card_manager.h" #include "SD.h" #include "SPI.h" SPIClass spiSD(H...
#include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include "world.h" vector<Point*> MeshWorld::points; vector<Polygon*> MeshWorld::polygons; int MeshWorld::add_point(Point p) { for (unsigned int i = 0; i < points.size(); i++) { if (*points[i] == p) { return i; ...
/* * Copyright (c) 2016 <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, dis...
/* This file is part of the CVD Library. Copyright (C) 2005 The Authors This library is free software, see LICENSE file for details */ #include <iostream> #include <sys/time.h> #include <X11/keysym.h> #include <cvd/Linux/dvbuffer.h> #include <cvd/videodisplay.h> #define DATA_TYPE GL_LUMIN...
//MIT License //Copyright 2017-2019 <NAME> #include "parser.hpp" #include "errors.hpp" #include "nameType.hpp" #include "parserNumbers.hpp" #include "parserStrings.hpp" #include "utils/constants.hpp" #include "utils/utilsWebss.hpp" #include "various/utils.hpp" using namespace std; using namespace various; using names...
#include "stdafx.h" #include "rWorld.h" rWorld::rWorld() { } rWorld::~rWorld() { } void rWorld::Frame() { if(timeOfDayProgress) timeOfDay += 1.0 / (1440.0*10.0);//1.0/(1440.0 * 60.0); if (timeOfDay > 1) timeOfDay -= 1; for (int o = 0; o < entityList.size(); o++) { if (entityList[o] != NULL) entityList[o]->F...
//============================================================== // Copyright © 2019 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= // main: Intel® oneAPI DPC++ Language Basics Using a Monte Carlo // Simulation (main function) // // This code sampl...
/** * @file client.cpp * @author <NAME> * * @brief CORBA C++11 client application * * @copyright Copyright (c) Remedy IT Expertise BV */ #include "testC.h" #include "testlib/taox11_testlog.h" #include <limits> int result_ = 0; template<class T> void TestEqual(T exp, T a) { if (a != exp) { TAOX1...
#include <random> #include "Config.h" #include "Interfaces.h" #include "Netvars.h" #include "SDK/ClientClass.h" #include "SDK/Entity.h" static int random(int min, int max) noexcept { static std::mt19937 gen{ std::random_device{ }() }; return std::uniform_int_distribution{ min, max }(gen); } static std::unorde...
// // Created by ladis on 23. 11. 2021. // #include "Floor.h" #include "fish.h" #include <iostream> #include <map> #include <list> #include <vector> #include <cmath> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/euler_angles.hpp> #include <glm/gtx/transform.hpp> #include <ppgso/pp...
#pragma once #include <iostream> #include <cassert> #include <string> #include <vector> /* return i if n == 2^i and i <= 31, 0 otherwise */ inline uint8_t power_two( const uint32_t n ) { switch( n ) { case 2u: return 1u; case 4u: return 2u; case 8u: return 3u; case 16u: return 4u; case 32u: re...
#include <iostream> #include "atkui/framework.h" #include "atk/toolkit.h" using namespace glm; using namespace atk; class Butterfly : public atkui::Framework { public: Butterfly() : atkui::Framework(atkui::Perspective) { } void setup() { Joint* body = new Joint("Body"); body->setLocalTranslation...
/******************************************************************************* * Copyright (c) 2011, <NAME> - www.xs-labs.com * Distributed under the Boost Software License, Version 1.0. * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any perso...
#include <avr/io.h> #define F_CPU 16000000UL #include <util/delay.h> #include <string.h> #include <avr/interrupt.h> #include <stdlib.h> #include "LCDDRV/LCDDrv.h" #define reverse true #define normal false LCDDrv LCD; volatile uint8_t goUp = false, canUp = true, longhold = false; template <class T> void ...
/* zip_algorithm_deflate.c -- deflate (de)compression routines Copyright (C) 2017-2019 <NAME> and <NAME> This file is part of libzip, a library to manipulate ZIP archives. The authors can be contacted at <<EMAIL>> Redistribution and use in source and binary forms, with or without modification, are permitt...
#include "chrisVeraInterruptions.h" #include "appConstants.h" #define N_XY 60 #define GRID_PADDING 10 #define N_GAPS 10 void chrisVeraInterruptions::setup(){ // setup pramaters lineWidth.set("lineWidth", 2, 0, 10); parameters.add(lineWidth); lineLength.set("lineLength"...
#include "Chest.h" void Chest::Display() { //Creates a treasure chest of wood with a gold trim glPushMatrix(); glPushAttrib(GL_ALL_ATTRIB_BITS); glDisable(GL_COLOR_MATERIAL); float brownDiffuse[] = { 0.37f,0.15f,0.02f,1.0f }; // wood colour float goldDiffuse[] = { 0.83f, 0.67f, 0.22f, 1.0f }; // gold colour flo...
/* * MIT License * * Copyright (c) [year] [fullname] * * 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, mod...
#include <pass.h> #include "llvm/IR/Module.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/CFG.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/IR/Dominators.h" #include "llvm/Transfor...
// Copyright (c) Open Enclave SDK contributors. // Licensed under the MIT License. #include <assert.h> #include <limits.h> #include <openenclave/host.h> #include <stdio.h> #include <sys/stat.h> #include <sys/types.h> #include <fstream> #include <iostream> #include <iterator> #include <vector> #include "../shared.h" #...
/* MIT License 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, distr...
/* The MIT License (MIT) Copyright (c) 2016-2018, <NAME>, <EMAIL> 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...
/** * Copyright 20__-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE-examples file in the root directory of this source tree. */ #include <cstdlib> #include <string> #include <thread> #include <folly/String.h> #include <folly/gen/Base.h> #...
#include <mpi.h> #include <Complex.h> #include <fftw3-mpi.h> #include <iostream> #include "getopt.h" #include "seconds.h" #include "timing.h" #include "cmult-sse2.h" #include "exmpiutils.h" #include "../mpiutils.h" using namespace std; using namespace utils; using namespace fftwpp; void init3r(double *f, unsigne...
/* ------------------------------------------------------------------ Copyright (c) 2019 <NAME> email: <EMAIL> This code is distributed under the MIT License. Please see <root-path>/LICENSE for details. -------------------------------------------------------------- */ #include "surfels.h" #inclu...
// Copyright 2010, <NAME>. All rights reserved. // http://code.google.com/p/muduo/ // // Use of this source code is governed by a BSD-style license // that can be found in the License file. // Author: <NAME> (chenshuo at chenshuo dot com) #include "muduo/net/poller/EPollPoller.h" #include "muduo/base/Logging.h" #in...
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define mk make_pair const int inf=(int)((1<<30)+5); const ll INF=(ll)5e18; const int MOD=998244353; int add(int x,int y){x+=y; return x>=MOD ? x-MOD : x;} int sub(int x,int y){x-=y; return x<0 ? x+MOD : x;} #define mul(x,y) (...
#include <fstream> #include "FillKindle.h" void GetReadBooksFileName(char*& fileName, char* username) { strcat(fileName, username); strcat(fileName, "'s read books"); } void GetWritenBooksFileName(char*& fileName, char* username) { strcat(fileName, username); strcat(fileName, "'s writen books"); } void Fill(char...
//--------------------------------------------------------------------------- #include "stdafx.h" #pragma hdrstop #define ECORE_API #include "GameMtlLib.h" CGameMtlLibrary GMLib; void SGameMtl::Load(IReader& fs) { R_ASSERT(fs.find_chunk(GAMEMTL_CHUNK_MAIN)); ID = fs.r_u32(); fs.r_stringZ (m_Name); i...
/*** *wcstol.c - Contains C runtimes wcstol and wcstoul * * Copyright (c) 1989-1993, Microsoft Corporation. All rights reserved. * *Purpose: * wcstol - convert wchar_t string to long signed integer * wcstoul - convert wchar_t string to long unsigned integer * *********************************...
#include "pch.h" #include "Heuristics.h" Mat sourceImg; Mat groundTruthImg; void computePolynomialFunction(double* bestValue, double* result) { // Polynomial test function // *result = 3 * pow(*bestValue, 2) + *bestValue - 20; } void applyCVPipeline(double* bestValue, double* result) { // OpenCV filter fun...
/* * Copyright (c) 2016 Juniper Networks, Inc. All rights reserved. */ #include "bgp/bgp_factory.h" #include "bgp/bgp_ribout.h" #include "bgp/bgp_ribout_updates.h" #include "bgp/xmpp_message_builder.h" #include "bgp/inet/inet_route.h" #include "bgp/test/bgp_server_test_util.h" #include "control-node/control_node.h" ...
#include "app.h" #include "util.h" #include <thread> #include <chrono> #include <numeric> #include <opencv2/features2d/features2d.hpp> #include <opencv2/features2d.hpp> #include <opencv2/xfeatures2d.hpp> using namespace std; // Constructor Capture::Capture() { // Initialize initialize(); } // Destructor Capture...
// // File: ComputationTree.cpp // Created by: <NAME> // Created on: mardi 6 décembre 2016, à 00h 07 // /* Copyright or © or Copr. CNRS, (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 license...
#include "mode_fstr_helpers.h" #include <catboost/libs/data/load_data.h> #include <catboost/libs/data/model_dataset_compatibility.h> #include <catboost/libs/fstr/compare_documents.h> #include <catboost/libs/fstr/output_fstr.h> #include <catboost/libs/fstr/shap_values.h> #include <catboost/libs/logging/logging.h> #incl...
#include "../inc/sai_adapter.h" #include <sched.h> #define ETHER_ADDR_LEN 6 #define CPU_HDR_LEN 6 #define MAC_LEARN_TRAP_ID 512 typedef struct _ethernet_hdr_t { uint8_t dst_addr[ETHER_ADDR_LEN]; uint8_t src_addr[ETHER_ADDR_LEN]; uint16_t ether_type; } ethernet_hdr_t; typedef struct _cpu_hdr_t { // TODO: remove...
#include <M5Stack.h> #include <WiFi.h> #include <Screen.h> #include <ButtonInfoBar.h> #include <StatusBar.h> #include <Button.h> #include <WidgetMosaic.h> #include <string> #include <vector> #include <AppScreen.h> #include <UpDownButton.h> #include <WiFi.h> using namespace Codingfield::UI; AppScreen* screen; StatusB...
// // Simu5G // // Authors: <NAME>, <NAME>, <NAME> (University of Pisa) // // This file is part of a software released under the license included in file // "license.pdf". Please read LICENSE and README files before using it. // The above files and the present reference are part of the software itself,...
/* * Copyright (c) 2015, Intel Corporation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the follow...
/** * MaNGOS is a full featured server for World of Warcraft, supporting * the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8 * * Copyright (C) 2005-2016 MaNGOS project <https://getmangos.eu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Gen...
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: Implements the Sticky Bolt code. This constraints ragdolls to the world // after being hit by a crossbow bolt. If something here is acting funny // let me know - Adrian. // // $Workfile: $ // $Date: $ // //------...
#include "mediapipe/framework/calculator_framework.h" #include "mediapipe/framework/port/logging.h" #include "mediapipe/framework/formats/image_frame.h" // #include "mediapipe/framework/formats/landmark.pb.h" // #include "mediapipe/util/annotation_renderer.h" // #include "mediapipe/framework/formats/landmark.pb.h" //...
/*************************************************************************/ /* Copyright (c) 2021 <NAME> */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this soft...
/*************************************************************************** * qgsgeometrycheckerfixdialog.cpp * * ------------------- * * copyright : (C) 2014 by <NAME> / Sourcepole AG * * email ...
/* * File: Sprite.cpp * Author: brucewang * * Created on October 29, 2009, 5:41 PM */ #include "DefineSprite.h" #include <stdlib.h> #include <stdio.h> #include <memory.h> #include "SWFFile.h" DefineSprite::DefineSprite() { mSprite.SpriteID = 0; } DefineSprite::DefineSprite(const DefineS...
/* * JBoss, Home of Professional Open Source * Copyright 2008, Red Hat, Inc., and others contributors as indicated * by the @authors tag. All rights reserved. * See the copyright.txt in the distribution for a * full listing of individual contributors. * This copyrighted material is made available to anyone wishin...
#include "pch.h" #include "Heal.h" #include "AbilityManager.h" #include "AudioManager.h" Heal::Heal(UINT id, std::string tag, std::string name, Ability::AbilityDescription* desc) : Ability(id, tag, name, desc) { m_manaPercentage = fmin((float)m_mana / 100.0f, 1.0f); m_healPercentage = fmin((float)m_mana / ...
#include "komo-ext.h" #include <Kin/TM_ContactConstraints.h> //#include <KOMOcsail/komo-CSAIL.h> #include <Kin/TM_default.h> #include <Kin/TM_linTrans.h> #include <Kin/TM_qItself.h> double shapeSize(const rai::KinematicWorld& K, const char* name, uint i=1); void addBoxGrasp(KOMO& komo, const char* object, const char...
/* * Clover mobile remote control backend * Send ManualControl messages through UDP * 'latched_state' topic * * Copyright (C) 2019 Copter Express Technologies * * Author: <NAME> <<EMAIL>> * * Distributed under MIT License (available at https://opensource.org/licenses/MIT). * The above copyright notice and thi...
/* * Copyright (c) 2010 Jice * 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 a...
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2006,2007,2008,2009,2010 by the GROMACS development team. * Copyright (c) 2012,2013,2014,2015,2016 by the GROMACS development team. * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by * <NAME>, <NAME>, <...
#include "PlotBenchmarks.hh" #include <iostream> PlotBenchmarks::PlotBenchmarks(const TString & arch, const TString & sample, const TString & suite) : arch(arch), sample(sample), suite(suite) { // setup style for plotting setupStyle(); // get file file = TFile::Open("benchmark_"+arch+"_"+sample+".root"); ...
/******************************************************************************* * Copyright 2019 FUJITSU LIMITED * * 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...
/** * @file * @copyright defined in evt/LICENSE.txt */ #pragma once #include <evt/chain/name.hpp> #include <evt/chain/types.hpp> #include <fc/time.hpp> #pragma GCC diagnostic ignored "-Wunused-variable" namespace evt { namespace chain { namespace config { typedef __uint128_t uint128_t; const static auto defaul...
/** EntropyCal - A tool to compute an estimation of a file entropy Copyright (c) 2020 <NAME> (<EMAIL>) 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 wit...
/* * Copyright 2009 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
#include <cstdio> #include <iostream> #include "utility.hpp" // Inludes common necessary includes for development using depthai library #include "depthai/depthai.hpp" static constexpr float stepSize = 0.05; int main() { using namespace std; dai::Pipeline p; auto monoLeft = p.create<dai::node::MonoCa...
#include <Arduino.h> #include "FS.h" #include <ArduinoJson.h> #include "log.h" #include "global.h" #include "structs.h" #include "utils.h" #include "ConfigClass.h" #include "config_names.h" const unsigned int CONF_JSON_SIZE = 4000; void alerts_to_log_string(const String &alertType) { cfglog(" WARNING1 '" + co...
#include "linux_monitor.hpp" #include <sys/poll.h> #include <unistd.h> #include <cassert> #ifdef file_monitor_USE_BOOST #include <boost/filesystem.hpp> namespace filesystem = boost::filesystem; #else namespace filesystem = std::filesystem; #endif using namespace file_monitor; namespace { template <typename T> inline...
#include "renderer.h" #include <iostream> #define GLT_IMPLEMENTATION #define GLT_MANUAL_VIEWPORT #include "ext/gltext.h" void Renderer::init(float width, float height, Shader& _quad_shader) { // Quad vertices. GLfloat quad_vertices[] = { // Anti-clockwise. -0.5f, -0.5f, 0.0f, 0.0f, 0.5f, -0.5f, 1.0f, 0.0f,...
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define gc getchar_unlocked() #define pc(x) putchar_unlocked(x) template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;} template<type...
/* * Copyright 2019 Xilinx 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 ag...
#ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <stdio.h> #include <stdlib.h> #include "symbol_table.hpp" #include "hash_table.hpp" #include "list.hpp" #include "error.hpp" #include "program.hpp" #include "llvm.hpp" struct symbol_table { int level; struct hash_table *ht; struct symbol_table *next; int64_...
// Copyright (C) 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // /////////////////////////////////////////////////////////////////////////////////////////////////// #pragma once #include <string> #include <vector> #include <gflags/gflags.h> #ifdef _WIN32 #include <os/windows/w_dirent.h> #else #inclu...
/* * Copyright 2008, 2009 Google Inc. * Copyright 2006 Nintendo Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unle...
#include <boost/uuid/uuid_io.hpp> #include <boost/functional.hpp> #include <boost/lambda/construct.hpp> #include "vfs.hpp" #include "../util/io.hpp" associative::VFS::Operation::~Operation() { } associative::VFS::Move::Move(const fs::path& src, const fs::path& dest, const boost::optional<fs::path>& destTemp) : src(s...
#include "util.h" #include "hv-microbench-structures.h" #include <cstddef> #include <tuple> #include <algorithm> #include <string.h> using SequenceAccessFunction = void (*)(const unsigned long*); static void access_sequence(const unsigned long *start_seq_va) { asm volatile( "mov %0, %%rax\n\t" "mov %0, %%rbx\n...
/******************************************************************************* * Copyright (c) 1991, 2015 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this * distribution and is available at https://w...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. Eigen itself is part of the KDE project. // // Copyright (C) 2008 <NAME> <<EMAIL>> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published b...
/*========================================================================= * * Copyright <NAME>, <NAME>, <NAME>. 2011. * * 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.o...
// Optimise #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "/home/shahraaz/bin/debug.h" #else #define db(...) #endif using ll = long long; #define f first #define s second #define pb push_back #define all(v) v.begin(), v.end() const int NAX = 2e5 + 5, MOD = 1000000007; struct SuffixTree { e...
/* * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
/* This file is part of solidity. solidity 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 version. solidity is distributed in the hope that i...
#include <cstring> #include <float.h> #include <math.h> #include <stdio.h> #include "cache.h" #include "accumulate.h" #include "best_constant.h" using namespace std; char* bufread_simple_label(shared_data*, label_data* ld, char* c) { memcpy(&ld->label, c, sizeof(ld->label)); c += sizeof(ld->label); memcpy(&ld->w...
/* ---------------------------------------------------------------------------- ex8.C mbwall 14jan95 Copyright 1995-1996 Massachusetts Institute of Technology DESCRIPTION: Example program for the list genome. This example contains the code to run a genetic algorithm with a list genome. This program illus...
// // OctreeRenderer.cpp // libraries/octree/src // // Created by <NAME> on 12/6/13. // Copyright 2013 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include <glm/glm.hpp> #include <stdint.h>...
#include <physfs.h> #include "../Common.h" #include "../Array.h" #include "../Vfs.h" #include "Shared.h" // PhysFS backwards compatibility: #if PHYSFS_VER_MAJOR < 2 || (PHYSFS_VER_MAJOR == 2 && PHYSFS_VER_MINOR == 0) #define PHYSFS_NO_STAT #define PHYSFS_readBytes( handle, buffer, size ) PHYSFS_read((handle), (buffe...
/* Tunalalooza puzzle (Dell Logic Puzzles) in Gecode. http://brownbuffalo.sourceforge.net/TunapaloozaClues.html """ Title: Tunapalooza Author: <NAME> Publication: Dell Logic Puzzles Issue: April, 1998 Page: 10 Stars: 2 Tim and Keri have a full day ahead for themselves as they plan to see and ...
#ifdef _WIN32 #include <Windows.h> #else #include <unistd.h> #endif #include <iostream> #include <string> using namespace std; string username[] = {"Paolo", "Mario", "Salvador", "Marco", "Gennaro", "Mortadella", "Francesca", "Chiara"}; string password[] = {"<PASSWORD>", "<PASSWORD>", "<PASSWORD>", "Poesia", "Rapina",...
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 2010,2011,2013,2014,2015 by the GROMACS development team. * Copyright (c) 2017,2018,2019,2020, by the GROMACS development team, led by * <NAME>, <NAME>, <NAME>, and <NAME>, * and including many others, as listed in the AUTHORS f...
#include "mapped_data.h" #include <algorithm> #include <limits> namespace { class QuotePredicate { public: bool operator()(const quote &lhs, const order &rhs) const { int cmp = strncmp(lhs.currencyPair().data, rhs.currencyPair().data, 6); return cmp < 0 || ((cmp == 0 && lhs.valueDate() < rhs.valueDate()) |...
#include "route_description/CostComputer.h" #include <iostream> #include <limits> #include <map> const struct Personna CostComputer::lambda_persona = {"lambda", {0.2,0.2,0.3,0.2,0.2,0.6}}; const struct Personna CostComputer::disabled_persona = {"disabled", {0.5,2.0,0.9,0.7,0.5,0.0}}; const struct Personna CostCompute...