text
stringlengths
3.08k
12.5k
#include "formula.h" #include <cassert> #include <cstdio> #include <cstring> #include <map> #include <random> using namespace std; mt19937 genf, gend; map<int, int> pred_id; fo *gen_fmla(int n, int neg, int maxn, int nfv, int gfv, int root = 0) { assert(n > 0); while (true) { int op = genf() % 6; sw...
//------------------------------------------------------------------------------------------------------------ // File: Test_CommStrings.cpp // Test of class mtbmpi::CommStrings. // Build: // mpicxx -DDEBUG_CommStrings -I../src -o Test_CommStrings -g Test_CommStrings.cpp ../build/cmake/libmtbmpi.debug.a // Run: // mpie...
//============================================================================= /** * @file Thread_Timer_Queue_Custom_Handler_Test.cpp * * This test exercises the <ACE_Thread_Timer_Queue_Adapter> * using an <ACE_Timer_Heap>. It also demonstrates using a custom handler for * timer events. * *...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/profiles/profile_destroyer.h" #include <memory> #include "base/bind.h" #include "base/location.h" #include "base/single_thr...
/* * See header file for a description of this class. * * $Date: 2010/03/29 13:18:43 $ * $Revision: 1.2 $ * \author <NAME> - IFCA */ #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/TrackingRecHit/interface/Tra...
#include "tkdCmdParser.h" #include "annCommon.h" /** * Output Stats segmentation data. */ class AnnStats { public: typedef float PixelType; /** * Run. */ void Run( const std::string& ref, const std::string& seg, const std::string& mask, const std::string& outputSen, const std::string& outpu...
#include "network_interface_test_harness.hh" #include "arp_message.hh" #include <iostream> #include <memory> #include <sstream> using namespace std; // NetworkInterfaceTestStep NetworkInterfaceTestStep::operator std::string() const { return "NetworkInterfaceTestStep"; } void NetworkInterfaceTestStep::execute(Netw...
#include <cassert> #include <fstream> #include <iostream> #include <sstream> #include <stack> #include <string> #include <tuple> #include <unordered_set> #include <vector> void evaluateExpression(std::vector<std::string>& tree, int start, int end) { assert(start < end); assert(tree[start] == "("); assert(t...
#include "WorldViewProgram.h" #include <KrisLibrary/Logger.h> #include <Klampt/IO/XmlWorld.h> #include <KrisLibrary/GLdraw/GL.h> #include <KrisLibrary/GLdraw/drawextra.h> #include <KrisLibrary/GLdraw/Widget.h> #include <KrisLibrary/utils/stringutils.h> #include <fstream> using namespace Math3D; using namespace GLDraw; ...
/* OpenSceneGraph example, osgdrawinstanced. * * 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, me...
// Author(s): <NAME>, <NAME> // Copyright: see the accompanying file COPYING or copy at // https://svn.win.tue.nl/trac/MCRL2/browser/trunk/COPYING // // 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) // /// \file l...
// // Created by <NAME> on 11/18/18. // #include "PBDriverAdapter.hpp" typedef struct { int8_t magic[4]; uint8_t channel; uint8_t recordType; //set channel ws2812 opts+data, draw all } PBFrameHeader; typedef struct { uint8_t numElements; //0 to disable channel, usually 3 (RGB) or 4 (RGBW) union {...
/* * TesteurStationnement.cpp * * Created on: 2018-11-09 * Author: etudiant */ #include <gtest/gtest.h> #include "BorneStationnement.h" using namespace bornesQuebec; /** * @test Test du constructeur * cas valides: Creation d'un objet BorneFontaine et vérification de l'assignation de tous les attri...
// // Shape.cpp // G3MiOSSDK // // Created by <NAME> on 10/28/12. // // #include "Shape.hpp" #include "GL.hpp" #include "Planet.hpp" #include "ShapeScaleEffect.hpp" #include "ShapeOrbitCameraEffect.hpp" #include "ShapePositionEffect.hpp" #include "ShapeFullPositionEffect.hpp" #include "Camera.hpp" #include "ErrorHa...
#include <emscripten/bind.h> #include <emscripten/val.h> #include "avif/avif.h" using namespace emscripten; uint8_t *pixels; uint32_t len; uint32_t width; uint32_t height; uint32_t depth = 8; uint8_t channels; struct Dimensions { uint32_t width; uint32_t height; uint32_t depth; uint8_t channels; }; void fre...
#include <bits/stdc++.h> #ifdef LOCAL #include "code/formatting.hpp" #else #define debug(...) (void)0 #endif using namespace std; static_assert(sizeof(int) == 4 && sizeof(long) == 8); template <int A, int B, int C, int D, bool reverse, typename T> void conv_transform(vector<T> &a) { int N = a.size(); assert((...
#include <LogFactory> #include <Properties> #include <Tools> #include <fstream> #include <iostream> #include <sstream> using namespace hslib; LogFactory factory; LogFactory::LogFactory() : appenders(), loggers() { loadConfiguration(); } LogFactory::~LogFactory() { for (auto ix = loggers.begin(); ix != logge...
#pragma once #include <iostream> #include <string> #include <fstream> #include <sstream> #include <vector> #include <GL/glew.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <assimp/Importer.hpp> #include <assimp/scene.h> #include <assimp/postprocess.h> #include "SOIL2/SOIL2.h" #include "Me...
#include <common/Util.hpp> #include <common/Vector2Util.hpp> #include <vector> #include <set> #include <numeric> #include <iostream> #include <cassert> // don't whipe somethings in release mode! inline void verify(bool b) { assert(b); } // ... but... how is this good at tests then? static void test_v2(); int main(...
// Copyright 2017 Google 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 agreed to in w...
/* This pintool is the minimal Pin tool that supports Pin + Replay, * no extra functionality */ #include "pin.H" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <sys/types.h> #include <syscall.h> #include "util.h" #include <sys/wait.h> #include <sched.h> #include <errno.h> #incl...
#include <mw/models/tx/Output.h> #include <mw/models/wallet/StealthAddress.h> #include <mw/crypto/Random.h> #include <mw/crypto/Bulletproofs.h> #include <mw/crypto/Schnorr.h> Output::Output( Commitment&& commitment, Features features, PublicKey&& receiver_pubkey, PublicKey&& key_exchange_pubkey, ui...
#include "ObstacleController.h" ObstacleController::ObstacleController() { obstacleAvoided = true; obstacleDetected = false; obstacleInterrupt = false; result.PIDMode = CONST_PID; } void ObstacleController::Reset() { obstacleAvoided = true; obstacleDetected = false; obstacleInterrupt = false; delay = ...
/*************************************************************************************************** * * SUBJECT: * A Benckmark for Massive Multiplayer Online Games * Game Server and Client * * AUTHOR: * <NAME> * Politehnica University of Bucharest, Bucharest, Romania * <EMAIL> * * TIME AND PLACE: * ...
// $Id: evaluateCharacterFreq.cpp 10474 2012-03-18 07:54:07Z itaymay $ #include "evaluateCharacterFreq.h" #include "someUtil.h" #include <cassert> vector<MDOUBLE> sumAlphabetCounts(const sequenceContainer & sc) { vector<MDOUBLE> charFreq(sc.alphabetSize(),0.0); sequenceContainer::constTaxaIterator tIt; sequenceCon...
#include "game.h" #include "raylib.h" #include "mapbox/variant.hpp" #include <iostream> #include <cmath> game::game() { targetFixedStep = 1.0f / 30.0f; // target physics tick rate accumulatedFixedTime = 0.0f; screenWidth = 300; screenHeight = 300; clickReset = 0.3f; clickElapsed = clickReset; currentPointe...
#include "driver.h" #include "vidhrdw/generic.h" unsigned char *blockout_videoram; unsigned char *blockout_frontvideoram; static void setcolor(int color,int rgb) { int bit0,bit1,bit2,bit3; int r,g,b; /* red component */ bit0 = (rgb >> 0) & 0x01; bit1 = (rgb >> 1) & 0x01; bit2 = (rgb >> ...
/** * This implements some abuses of setjmp and longjmp to do platform independent context switching * in a somewhat performant manner. It relies on the existence of signals, so it is limited to * UNIX-like systems. */ #include "SetJmp.h" #include "CothreadPrivate.h" #include <atomic> #include <csetjmp> #include <...
#include <httplib.h> #include <stdlib.h> #include <chrono> #include <co2mon.hpp> #include <csignal> #include <fstream> #include <iomanip> #include <nlohmann/json.hpp> #include <sstream> #include <string> using namespace co2meter; static std::unique_ptr<Co2meter> dev = std::make_unique<Co2meter>(); constexpr bool lo...
/* * 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 (c) 2008 <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of co...
/**************************************************************************** * * Copyright (c) 2020 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistri...
/******************************************************************************************************************* Copyright 2017 Dajiang Innovations Technology Co., Ltd (DJI) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "So...
#include "./display.h" #include <GL/glew.h> #include <GLFW/glfw3.h> #include <OpenGL/OpenGL.h> #include <OpenGL/gl.h> #include <array> #include <cstdio> #include <cstdlib> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <iostream> #include <map> #include <string>...
/* * Copyright (c) 2016-2019 <NAME> * * 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...
/* ESP-32 Resume creates a WiFi access point to host your accomplishments wherever you can supply power to the ESP-32. Steps: 1. Connect to the access point "My Resume" and log in with the password "<PASSWORD>" 2. Hit 'em with the old elevator pitch Tinkerer: Moonstripe, 13 March, 2021 Built on WiFiAccess...
#include <sstream> #include <map> #include <vector> #include <string> #include <cstdio> #include <memory> #include <curl/curl.h> #include <Network.hpp> #include <StandardLogger.hpp> wtlgo::Network& wtlgo::network = wtlgo::Network::instance(); using namespace wtlgo; Network::Network() : logger{ std::make_shared<Sta...
/* Copyright 1989, 1990 by Abacus Research and * Development, Inc. All rights reserved. */ /* Forward declarations in ListMgr.h (DO NOT DELETE THIS LINE) */ #include <base/common.h> #include <MemoryMgr.h> #include <ResourceMgr.h> #include <ListMgr.h> #include <list/list.h> using namespace Executor; #define STEF_...
//== SMTConstraintManager.cpp -----------------------------------*- C++ -*--==// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
#include <algorithm> #include <iostream> #include <string> #include <vector> #include <map> #include <iomanip> #include <set> #include <cstdio> #include <climits> #include <functional> using namespace std; #define int64 long long int #define MAX_H 16 #define MAX_N 25 #define MAX_FM (MAX_H*12) int h, n, max_fm; in...
#include <stdio.h> #include <stdio.h> #include <math.h> #include <vector> #include <assert.h> #include <algorithm> using namespace std; #define eps 1e-8 struct Pt { double x, y; Pt(double a = 0, double b = 0): x(a), y(b) {} Pt operator-(const Pt &a) const { return Pt(x - a.x, y - a.y); } ...
/******************************************************************************* * * Filename : ComparePlot.cc * Description : Making The comparison plots * Author : Yi-Mu "Enoch" Chen [ <EMAIL> ] * *******************************************************************************/ #include "TstarAnalysis...
// © 2013 the Search Authors under the MIT license. See AUTHORS for the list of authors. // Learns the standard deviation in heuristic error using corrected heuristics from hlms. // // This is a mess, and we never used it for anything, it's just here in case we ever // want to look at in the future for whatever reason...
/* MIT License Copyright (c) 2020 <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, distrib...
/** * Copyright (c) 2020 <NAME> * * This software is released under the MIT License. * See the LICENSE file in the project root for more information. */ #include <fstream> #include <iostream> #include <map> #include <opencv2/opencv.hpp> #include <boost/algorithm/string.hpp> #include "object_detector.h" const ...
#include <cassert> #include <cstdlib> #include <cstring> #include <string> #include <memory> #include "sexi/Expr.h" using namespace sexi; struct SexiExprT{ SexiExprType type; union { SexiStr str; struct { size_t n; SexiExpr *exprs; } list; }; SexiOwnedStr ownedStr; }; std::vector<Expr> Expr::toList...
#include "Statistics.h" #include "StableMarriage.h" #include "Vertex.h" #include "PartnerList.h" #include "Utils.h" #include <map> #include <vector> #include <iostream> Statistics::Statistics() { //initially set all statistics to zero S = 0; BPC = 0; BR = 0; R1 = 0; def = 0; } Statistics::~Sta...
/* The MIT License (MIT) Copyright (C) 2017 RSK Labs Ltd. 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, ...
//+--------------------------------------------------------------------------- // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1991 - 1997. // // File: PROPBKP.HXX // // Contents: Property Store backup // // History: 30-May-97 KrishnaN Created // //--------------...
#include "errors.h" namespace errors { error not_enough_args = "not enough arguments (%d expected, got %d)"; error pointer_invalid = "%s reference is invalid (value 0x%X)"; error cannot_acquire = "%s reference cannot be acquired (null or invalid)"; error cannot_release = "%s reference cannot be released (null, inv...
// ------------------------------------------------------------------------------- // // Michka // // ------------------------------------------------------------------------------- // // MIT License ...
#include "dolphin-client.hpp" #define NO_FLAGS 0 #define NO_CALLBACK NULL // Interrupts #define DMA_READY 7 #define SRV_READY 1 #define ADAPTER_NUM 0 #define RECEIVERS 1 #define OFFSET 0 sci_callback_action_t callback(void *arg, sci_remote_segment_t segment, sci_segment_cb_reason_t reaso...
/***************************************************************************** Copyright (c) 2005 - 2009, The Board of Trustees of the University of Illinois. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...
#include "Holodeck.h" #include "UavControlSchemeTargetRollPitch.h" const float UAV_TAU_UP_ROLL = 0.1904; const float UAV_TAU_UP_PITCH = 0.1904; const float UAV_TAU_UP_YAW_RATE = 0.04; // 1644; const float UAV_TAU_UP_FORCE = 0.1644; const float UAV_TAU_DOWN_ROLL = 0.1904; const float UAV_TAU_DOWN_PITCH = 0.1904; const ...
// Copyright 2019 - <NAME> (@crankyoldgit) #ifndef UNIT_TEST #include <Arduino.h> #endif // UNIT_TEST #include "IRremoteESP8266.h" #include "i18n.h" // Common String kUnknownStr = D_STR_UNKNOWN; String kProtocolStr = D_STR_PROTOCOL; String kPowerStr = D_STR_POWER; String kOnStr = D_STR_ON; String kOffStr = D_STR_OF...
/* This is an example tool that converts OSM data to some output format like Spatialite or Shapefiles using the OGR library. */ #include <gdalcpp.hpp> #include <osmium/geom/ogr.hpp> #include <osmium/handler.hpp> #include <osmium/handler/node_locations_for_ways.hpp> #include <osmium/index/map/all.hpp> // IWYU pr...
// Copyright <NAME>, <NAME> 2003. // Copyright <NAME> 2017. // 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) // No include guard. This file is intended for multiple inclusion. #define BOOST_PARAMETER_ri...
// Copyright (c) 2018 BaiQiang. All rights reserved. #include "path.h" static float min(float a, float b) { return a < b ? a : b; } static float max(float a, float b) { return a > b ? a : b; } polygon::Path polygon::Path::addPoint(Point p) { this->mPs.push_back(p); return *this; } polygon::Path polygon::P...
#include "solid/frame/actor.hpp" #include "solid/frame/manager.hpp" #include "solid/frame/reactor.hpp" #include "solid/frame/scheduler.hpp" #include "solid/frame/service.hpp" #include "solid/frame/timer.hpp" #include <condition_variable> #include <deque> #include <mutex> #include <thread> #include "solid/system/casse...
/* * main.c : main function of TEMPO * V30k18 (matlab) * * coded by <NAME> 2001/2/6 * * TEMPO applied to concatenative TTS * coded by <NAME> * * <NAME> (<EMAIL>) * From Mar. 2001 to Sep. 2003 */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "fileio.h" #include "...
/* RFMIX v2.XX - Local Ancestry and Admixture Analysis Bustamante Lab - Stanford School of Medicine (c) 2016 <NAME> This program is licensed for academic research use only unless otherwise stated. Contact <EMAIL> for commercial licensing options. Academic and research users should cite <NAME>' pa...
/// /// @file main.h /// @author Jxtopher /// @copyright Apache License 2.0 /// @version 1 /// @date 2018-06-25 /// @brief scatterPlot data in svg /// #include <iostream> using namespace std; class ScatterPlot { public: ScatterPlot() { origin_x = 100; origin_y = 1100; } virtual ~ScatterPlot() { } ...
/* Copyright (c) 2021 <NAME> 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 applications, a...
#include "WebSocket.h" #include "mruby/mruby.h" #include <string> #include "cocos2d.h" extern int registerProc(mrb_state *mrb, mrb_value self, mrb_value proc); USING_NS_CC; namespace cocos2dmruby { class WebSocket : public cocos2d::extension::WebSocket, public cocos2d::extension::WebSocket::Delegate { private: ...
#pragma once #include "arch/amd64/cpu/cpu.h" #include "system/types.h" using gdt_table_desc = arch_pseudo_descriptor; using idt_table_desc = arch_pseudo_descriptor; struct idt_entry { uint32_t gd_off_15_0: 16; // [0 ~ 16] bits of offset in segment uint32_t gd_ss: 16; // segment selector uint32_t gd_ist: 3...
#include <cstdio> #include <cstring> #include <algorithm> const int maxn = 100001, maxm = 10001; int n, m, q, sqn, a[maxn], b[maxn], pos[maxn]; struct Block { int pre, nxt; int sta, len; bool rev; void access() { if(rev) { int *A = a + sta; std::reverse(A, A + len); rev = 0; } } void sort() { int *...
/* Copyright (c) 2016-2017, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following di...
#include "message_broker.h" #include "time/epoch.h" #include "table.h" #include "tablepartitioned.h" #include "http_cli.h" void openset::revent::Broker_s::webhookThread(MessageBroker* broker) { thread th([&, broker]() { const auto MaxMessages = 500; const auto MaxBackoff = 20; ...
/* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #in...
/* * Copyright (c) 2011-2013, AllSeen Alliance. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWA...
// This is free and unencumbered software released into the public domain. // For more information, please refer to <http://unlicense.org> #include "renderer.h" #include "teapot.h" #include <OrbitCamera.h> #include <Win32Window.h> #include <gizmesh.h> #include <vector> struct vertex { std::array<float, 3> position...
/* * Copyright (c) 2012-2018 <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, publ...
/* ==== Author: <NAME> (<EMAIL>) Visual Geometry Group, Department of Engineering Science University of Oxford ==== Copyright: The library belongs to <NAME> and the University of Oxford. No usage or redistribution is allowed without explicit permission. */ #include "feat_standard.h" #include <string> #include <fst...
#include <hpx/hpx_init.hpp> #include <hpx/hpx.hpp> #include <hpx/runtime/threads/topology.hpp> //#include <hpx/lcos/local/dataflow.hpp> #include <boost/format.hpp> #include <sys/time.h> #include "matrix_block.h" using hpx::lcos::future; using hpx::util::unwrapped; using hpx::async; using hpx::lcos::local::dataflow;...
#include <stdlib.h> #include <opencv/cv.h> #include <opencv/highgui.h> #include <H5Cpp.h> #include <fstream> #include <getopt.h> #include <assert.h> using namespace cv; using namespace std; H5::H5File create_feature_file(char *filename, const Mat &image); void write_feature(H5::H5File h5file, const Mat &image, const c...
#include "modules/test/test_utils.h" #include "gtest/gtest.h" #include "modules/mapred/path.h" #include "modules/io/file_io.h" #include "modules/io/mem_io.h" #include "modules/io/config.h" #define CHECK_URL_PARSE(X) ASSERT_EQ(X, path(X).url()) #define CHECK_TYPE(X, X_type) ASSERT_EQ(path(X).type(), X_type) TEST(path_...
#include "ImageLoder.h" #include <iostream> #include <fstream> #include <string> #include <exception> #include <vector> //https://blog.nobel-joergensen.com/2010/11/07/loading-a-png-as-texture-in-opengl-using-libpng/ bool ImageLoder::loadPNGFromFile(const char *name, int& pngWidth, int& pngHeight, bool& outHasAlp...
#include <hackri/mathematics.h> #include <hackri/buffer.h> #include <hackri/renderer.h> #include <hackri/image.h> #include <hackri/model.h> #include <iostream> using namespace std; using namespace hackri; struct VertexVC { Vector3f Pos; Color3f Color; }; struct VertexVN { Vector3f Pos; Vector3f Nor; }; stru...
// dbfutil.cpp // Copyright (c) 2007-2016 by <NAME>. All rights reserved. // License: wxWindows Library Licence, Version 3.1 - see LICENSE.txt #include "precomp.h" #include <wx/fdrepdlg.h> #include "dbfutil.h" #include "wx/ext/base.h" #include "datamodel.h" #include "../../ioapi/zlib.h" #include "../../ioapi/ioapi....
#include "core/context.h" #include "test_saber_func_permute_power.h" #include "funcs/permute_power.h" #include "tensor_op.h" #include "saber_types.h" #include <vector> using namespace anakin::saber; TEST(TestSaberFuncPermutePowerNV, test_func_constructor) { Env<NV>::env_init(); typedef TargetWrapper<NV> API...
/********************************************************************** // @@@ START COPYRIGHT @@@ // // 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. ...
#include<iostream> #include<cmath> #include<iomanip> using namespace::std; struct cord { double x; double y; }; double sqr(double num) { return num * num; } bool is_on_rays(cord ray_1_start, cord ray_1_dot, cord ray_2_start, cord ray_2_dot, cord intersect_point) { return (((ray_1_start.x < ray_1_dot...
#include <Arduino.h> #include <WiFi.h> #include <PubSubClient.h> #include <ArduinoJson.h> #include <Adafruit_NeoPixel.h> int output_pin = 5; #define PIN 15 #define NUMPIXELS 29 const char* ssid = "aaaaaa"; const char* password = "<PASSWORD>"; const char* mqtt_server = "mqtt.chris.gunawardena.id.au"; ui...
/* -------------------------------------------------------------------------- * * OpenSim: PointToPointActuator.cpp * * -------------------------------------------------------------------------- * * The OpenSim API is a toolkit for musculoskeletal modeling and simulation. * ...
// Copyright 2014 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 <android/log.h> #include <dlfcn.h> #include <stdio.h> #include <stdlib.h> #include <initializer_list> // This defines a function Bar() which wi...
#pragma once #include "Engine/Core/TimeUtils.hpp" #include "Engine/Math/Vector2.hpp" #include "Engine/Physics/Collider.hpp" #include "Engine/Physics/PhysicsTypes.hpp" #include <memory> struct RigidBodyDesc { Position initialPosition{}; Velocity initialVelocity{}; Acceleration initialAcceleration{}; C...
// // Created by andreimerfu on 28.05.2017. // #include <iostream> #include "BottleView.h" GLUquadricObj *quadObj; GLuint objList; extern double playerX; extern double playerZ; extern double alcohol_level; const double epsilon = 0.2; bool val = true; GLfloat ambient_mat_beer[] = {0.19125, 0.0735, 0.0225, }; GLfl...
#include "particlerender.h" #include <algorithm> #include "particleeffect.h" #include "timer.h" #include "actor.h" #include "transform.h" #include "camera.h" #include "commandbuffer.h" #define EFFECT "Effect" typedef vector<Matrix4> BufferArray; typedef list<ParticleEffect::ParticleData> ParticleList; bool comp...
#include "data.h" int seekChar(const char *s, int c) { char *inst = strchr((char *)s,c); if (inst != NULL) { return inst - s; } else return SIM_FAILURE; } int seekCharSequence(const char *s, const char *c, int *idx) { char *substr = (char *)s; char *currChar = (char *)c; int substrIdx = 0; int cur...
/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */ /* * Copyright (c) Xerox Corporation 1997. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation;...
/** fluid.cpp **/ #include <GL/gl.h> #include <cmath> #include "fluid.hpp" #include "settings.hpp" #define clamp(x,y,z) ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x))) /* The fluid particles only have this one act function That means the particles are moved to a new position as soon as it has been calculated This is ...
#include <array> #include <cassert> #include <cmath> #include <fstream> #include <iostream> #include <numeric> #include <unordered_map> #include <vector> // string split like in Python, nearly identical to https://stackoverflow.com/a/46931770/997151 std::vector<std::string> split(const std::string& s, const std::strin...
// Copyright (c) 2012-2018, The CryptoNote developers, The Bytecoin developers, [ ] developers. // Licensed under the GNU Lesser General Public License. See LICENSE for details. #pragma once #include "CryptoNote.hpp" #include "P2pProtocolTypes.hpp" #include "crypto/crypto.hpp" namespace cryptonote { st...
#include <arpa/inet.h> #include <netdb.h> #include <openenclave/enclave.h> #include <openenclave/ert.h> #include <openenclave/internal/tests.h> #include <pthread.h> #include <sys/socket.h> #include <ttls/test_instances.h> #include <unistd.h> #include <string> #include "test_t.h" static void _test_client() { cons...
#include<bits/stdc++.h> // g++ -std=c++17 -Wl,-stack_size -Wl,0x10000000 main.cpp #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define EPS 1e-6 #define ll long long int #define ld long double #define fi first #define se second #define all(v) v.begin(),v.e...
// --------------------------------------------------------------------------- // TSP solution using genetic algorithm with mutation // --------------------------------------------------------------------------- #include <iostream> #include <ctime> #include <time.h> #include <cmath> #include <fstream> #includ...
// // Created by kier on 2019/11/23. // #include <algorithm> #include "global/device_admin.h" #include "global/fp16_operator_factory.h" #include "global/hard_allocator.h" #include "global/hard_converter.h" #include "global/memory_device.h" #include "global/operator_factory.h" #include "global/shape_inferer_factory.h" ...
////////////////////////////////////////////// // include libraries // ////////////////////////////////////////////// // RemoteXY select connection mode and include library #define REMOTEXY_MODE__ESP32CORE_BLE #include "RemoteXY.h" #include <Arduino.h> #include "FastCRC.h" #include "functions....
/* Copyright (C) 2009 <NAME>. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * 0 A....
/********************************************************************* * * Copyright 2006 <NAME> and <NAME> * Copyright 2012 Intel Corporation * Copyright 2012 VMware, Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated d...