text
stringlengths
3.08k
12.5k
/* * 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 agreed to...
#include <iostream> #include <string> #include <vector> #include <functional> #include <future> #include <chrono> #include <thread> #include <cmath> #include "types.h" using std::cout; using std::string; using std::vector; u32 read32(FILE*); u8 read8(FILE*); void write64(FILE*, u64); void write32(FILE*, u32); void w...
#include "ecatalogue.h" #include <qvariant.h> #include <qimage.h> #include <qpixmap.h> /* * Constructs a eCatalogue as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. */ eCatalo...
#include <iostream> #include <math.h> #include <vector> #include <functional> // std::minus, std::divides #include <numeric> // std::inner_product using namespace std; class Regression { private: vector<vector <double> > train_data; vector<vector <double> > test_data; double sumX;...
// Copyright (c) 2016-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. // This source code...
#include <iostream> #include <cstdint> #include <vector> #include <bitset> #include <limits> using namespace std; inline void setbit(int& value, unsigned bit) { value |= 1ul << bit; } inline void resetbit(int& value, unsigned bit) { value &= ~(1ul << bit); } inline void togglebit(int& value, unsigned bit) { ...
#include "IRSDKWrapper.h" #include <iostream> // npm install --debug enables debug prints #ifdef _DEBUG #define debug(x) std::cout << x << std::endl; #else #define debug(x) #endif NodeIrSdk::IRSDKWrapper::IRSDKWrapper(): hMemMapFile(NULL), pSharedMem(NULL), pHeader(NULL), lastTickCount(INT_MIN), lastSessionInfoUp...
#include "stdafx.h" #include "search_contacts_response.h" using namespace core; using namespace wim; search_contacts_response::search_contacts_response(): finish_(false) { // } int32_t search_contacts_response::unserialize_header(const rapidjson::Value& node) { { auto i = node.FindMember("finish"); if (i != ...
#include <iostream> #include <chrono> #include "cuda_runtime_api.h" #include "logging.h" #include "common.hpp" #include "yolov5.hpp" #define USE_FP16 // comment out this if want to use FP32 #define DEVICE 0 // GPU id #define NMS_THRESH 0.4 #define CONF_THRESH 0.5 #define BATCH_SIZE 1 #define NET s // s m l x #defi...
/* * Copyright (C) 2018 bzt (<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, merge, pu...
#include <fstream> #include <iostream> #include <experimental/filesystem> #include <stdio.h> #include <iomanip> #include "../tasks.hh" #include "../util/split.hh" #include "../classes/BinnedTypedMatrix.hh" namespace fs = std::experimental::filesystem; using namespace EMC; const std::string rebinned_ending = ".rebin...
#include "opencv2/opencv.hpp" #include "helpers.hpp" #include <iostream> const cv::String COMMON_KEYS{ "{ h help | | Display the usage }" "{ v verbose | | Verbose mode }" "{ imshow | | Display an image in a wind...
//============================================================================ // Name : matrice_grad_CADNA.cpp // Author : Kito // Version : // Copyright : // Description : Hello World in C++, Ansi-style //============================================================================ #include <stdio....
// // Created by huan on 3/20/17. // #include "HJPD.h" #include <iomanip> using namespace std; HJPD::HJPD(bool flag, bool svm) { use_test_ = flag; svm_output = svm; if (flag) { if (svm) out_file_name_ = "hjpd_d2.t"; else out_file_name_ = "hjpd_d1.t"; } else { if (svm) out_file...
/* * (C) Copyright 2013 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an intergo...
#include "camera_loop/camera_loop.h" #include <assert.h> #include <libcamera/libcamera.h> #include <sys/mman.h> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <memory> #include <string> std::string cameraName(libcamera::Camera *camera) { using namespace libcamera; const ...
/* * Copyright 2017, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
#include <lem/date_time.h> #include <lem/solarix/dictionary.h> #include <lem/solarix/la_autom.h> #include <lem/solarix/BasicLexer.h> #include <lem/solarix/res_pack.h> #include <lem/solarix/LA_SynPatternTrees.h> #include <lem/solarix/SynPatternTreeNodeMatchingResults.h> #include <lem/solarix/LexerTextPos.h> #inc...
/* * (c) Copyright 2011-2013, Hewlett-Packard Development Company, LP */ #include "w_defines.h" #define SM_SOURCE #include "sm_base.h" #include "alloc_cache.h" #include "smthread.h" #include "eventlog.h" const size_t alloc_cache_t::extent_size = alloc_page::bits_held; alloc_cache_t::alloc_cache_t(stnode_cache_t&...
#pragma once #include "../../../JObject.hpp" class JByteArray; class JArray; class JArray; class JArray; class JArray; class JArray; class JArray; namespace java::io { class BufferedReader; } namespace java::io { class BufferedWriter; } namespace java::io { class InputStream; } namespace java::io { class OutputSt...
//------------------------------------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2021 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), t...
// Source file for the mesh to grid conversion program // Include files #include "R3Shapes/R3Shapes.h" // Program variables static char *mesh_name = NULL; static char *grid_name = NULL; static int grid_resolution[3] = { 64, 64, 64 }; static int print_verbose = 0; static R3Mesh * ReadMesh...
#include <iostream> #include <algorithm> #include <string> #include <fstream> #include <cassert> #include <vector> #include <cmath> #include "timer.hpp" // Include OpenMP header #include <omp.h> struct Diagnostics { double time; double heat; Diagnostics(double time, double heat) : time(time), heat(heat)...
#include "MenuConfig.h" #include "Application.h" #include "Imgui/imgui.h" #define GRAPH_SIZE 75 // ------------------------------------------------------------ MenuConfig::MenuConfig() : Menu(Menu_Config), fps(GRAPH_SIZE), ms(GRAPH_SIZE), new_width(App->window->GetWidth()), new_height(App->window->GetHeight()) { Upd...
// // Created by luocj on 2/12/18. // #include <malloc.h> #include "utils.h" #include "PngTest.h" void readPngFile(char *name) { ALOGE("readPngFile %s\n", name); // 前边几句是扯淡,初始化各种结构 FILE *file = fopen(name, "rb"); png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); png_...
/** * @author dmilith * * © 2013 - VerKnowSys * */ #include "synshot_config_widget.h" ConfigWindow::ConfigWindow() { logDebug() << "Initiating configuration window"; iconGroupBox = new QGroupBox("Tray Icon"); iconLabel = new QLabel("Icon:"); iconLabel->setMinimumWidth(32); /* define act...
/** * This file is distributed under the University of Illinois Open Source * License. See LICENSE for details. * * \author <NAME> * \date 2013-06-02 * * \file Load.cpp * * Mutation pass for load instructions */ #include "llvm/Pass.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h...
// This file is part of snark, a generic and flexible library for robotics research // Copyright (c) 2011 The University of Sydney // 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. Redistr...
#include "TestCommon.hpp" #include <boost/thread.hpp> #define MEM_LEAK_LOOPS 100000; using namespace ZstTest; long double test_benchmark(std::string& server_name, std::shared_ptr<ShowtimeClient> client, bool reliable, int send_rate, int send_amount) { Log::app(Log::Level::debug, "Creating entities and cables"); /...
#include "MarkerSet.hpp" #include <algorithm> #include <stdexcept> #include "PointAverage.hpp" #include "Random.hpp" MarkerSet::MarkerSet(SplitMixGenerator &splitMixGenerator, float sideLength, U64 resolution, U64 pointCount) : xRange(-0.5f * sideLength, +0.5 * sideLength), yRange(0.0f, sideLength), zRange(-0.5f...
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<cstring> #include"Huffman.h" #include"uncompress.h" namespace uncompress { const int N = 256, M = 2 * N - 1; HTNode pHT[2 * N + 1]; struct HEAD head; } using namespace std; using namespace uncompress; // read the file and init the head f...
// Fig. 4.17: fig04_17.cpp // This program introduces the topic of survey data analysis. // It computes the mean, median, and mode of the data. #include <iostream> using std::cout; using std::endl; using std::fixed; #include <iomanip> using std::setw; using std::setprecision; void mean( const int [], int ); void me...
/**************************************************************************\ * * This file is part of the Coin 3D visualization library. * Copyright (C) by <NAME> & Gas Technologies. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License...
/* * Copyright 2021, Synopsys, Inc. * All rights reserved. * * This source code is licensed under the BSD-3-Clause license found in * the LICENSE file in the root directory of this source tree. * */ #include <assert.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <memory> ...
#include <Arduino.h> #include <SPI.h> #include <Wire.h> #include <BH1750.h> #include <ESP8266WiFi.h> #include <PubSubClient.h> #include <Adafruit_Sensor.h> #include "Adafruit_BME680.h" #include <ESP8266HTTPClient.h> #include <ESP8266httpUpdate.h> #define UPDATE_HOST "192.168.2.5" #define UPDATE_PORT 2342 #define U...
/* * 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 and the ...
/* * Copyright 2014 The RySim Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
#include "coords2typedcoords_interface.h" #include "cConformation.h" #include <iostream> #include <string> #include "nUtil.h" void Coords2TypedCoords_forward( torch::Tensor input_coords, torch::Tensor res_names, torch::Tensor atom_names, ...
/** * Example of I2C 128x32 OLED display usage with LVGL. */ #include "mbed.h" #include "ssd1306_driver.h" #include "ssd1306_lvgl_port.h" using namespace ssd1306driver; // pin configuration #define DISPLAY_I2C_SDA_PIN PB_7 #define DISPLAY_I2C_SCL_PIN PB_6 // display parameters #define DISPLAY_WIDTH 128 #define DISP...
/* * Copyright 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, ...
#include "combinedfragmentbuilder.h" #include "node.h" #include <algorithm> #include<conio.h> #include<iostream> CombinedFragmentBuilder::CombinedFragmentBuilder() { //ctor } CombinedFragment CombinedFragmentBuilder::build(TiXmlElement * ele_frag, vector<Message>& msgList) { int nm,nf; CombinedFragment cf;...
// fstbin/make-grammar-fst.cc // Copyright 2018 Johns Hopkins University (author: <NAME>) // See ../../COPYING for clarification regarding multiple authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain ...
#include <iostream> #include <Eigen/Geometry> #include <Eigen/Dense> using namespace std; using namespace Eigen; /** Euler angle defination: zyx Rotation matrix: C_body2ned **/ Quaterniond euler2quaternion(Vector3d euler) { double cr = cos(euler(0)/2); double sr = sin(euler(0)/2); double cp = cos(euler(1)/2); ...
/* Copyright The Overlaybd Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
#include <bits/stdc++.h> using namespace std; struct Dinic { using F = int; const static F INF = 0x3f3f3f3f; //using F = long long; const static F INF = 0x3f3f3f3f3f3f3f3f; struct Edge { int v, bro; F cap; Edge() {} Edge(int _v, int _bro, F _cap) : v(_v), bro(_bro), cap(_cap) {} ...
/* smplayer, GUI front-end for mplayer. Copyright (C) 2006-2010 <NAME> <<EMAIL>> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at ...
/************************************************************************** * This file is property of and copyright by the ALICE HLT Project * * All rights reserved. * * INFN, Laboratori Nazionali di Frascati * * Primary Aut...
#include "ModelerView.h" #include "camera.h" #include "modelerapp.h" #include <FL/Fl.H> #include <FL/Fl_Gl_Window.H> #include <FL/gl.h> #include <GL/glu.h> #include <cstdio> // Accessing the values of sliders is a very lengthy function call. // We use a macro VAL() to shorten it. #define VAL(x) ( static_c...
// kate: replace-tabs off; indent-width 4; indent-mode normal // vim: ts=4:sw=4:noexpandtab /* Copyright (c) 2010--2012, <NAME> and <NAME>, ASL, ETHZ, Switzerland You can contact the authors at <f dot pomerleau at gmail dot com> and <stephane at magnenat dot net> All rights reserved. Redistribution and use in source...
/* -------------------------------------------------------------------------- * * OpenMMAmoeba * * -------------------------------------------------------------------------- * * This is part of the OpenMM molecular simulation toolkit originating from * ...
/** * @file motdetection.cpp * @brief Motion Detection * @author <NAME> */ #include <opencv2/core/utility.hpp> #include "opencv2/objdetect/objdetect.hpp" #include <opencv2/tracking.hpp> #include <opencv2/videoio.hpp> #include <opencv2/highgui.hpp> #include <iostream> #include <cstring> #include <u...
#include <iostream> #include <fstream> #include <vector> #include <string> #include <set> #include <array> #include <algorithm> // Needed for the loopMap() function #include <cstdio> #include <unistd.h> // Remove on for compiling on windows and use Windows.h const char OPEN = '.'; const char TREE = '|'; const char LU...
/* * File: SoftConstraint.cpp * Author: johannes * * Created on 25. Juli 2014, 10:14 */ #include "SoftConstraint.h" SoftConstraint::SoftConstraint() { }; SoftConstraint::SoftConstraint(Particle *p0, Particle *p1, Particle *p2, Particle *p3) { this->p0 = p0; this->p1 = p1; this->p2 = p2; this...
#include <cassert> #include <fstream> #include <iomanip> #include <iostream> #include <memory> #include <unordered_map> #include "configuration.h" #include "bf/all.hpp" using namespace util; using namespace bf; trial<nothing> run(config const& cfg) { auto numeric = cfg.check("numeric"); auto k = *cfg.as<size_t>...
//===- debugStatements.cpp - Insert print statements to aid in debugging----===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===---------...
/** * The MIT License (MIT) * * g231KeybLedManager.cpp v0.1 Copyright (c) 2017 <NAME> * This software is a migration to c++ from G213Colors all the rights to SebiTimeWaster * for his investigation on the commands. * * Permission is hereby granted, free of charge, to any person obtaining a copy * o...
#include "GraphicsMath.h" #include "ExMath.h" float GraphicsMath::ToRad(const float& degree) { return degree * (pi / 180.0f); } bool GraphicsMath::CompareFloat(float x, float y, float epsilon) { if (fabs(x - y) < epsilon) return true; return false; } void GraphicsMath::TransformVector3(Vector3& outVec, Vector3&...
/* * Copyright (c) 2010 Pigeon Point Systems. * All rights reserved. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This * file and program are licensed under a BSD styl...
#include "mcSourceXrayBeam.h" #include "mcDefs.h" #include "mcSamplers.h" #include "mcHistogramSampler.h" #include "mcThread.h" #include "../geometry/vec3d.h" // Spectra double ebins_06X[] = {0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 2.5, 3, 4, 5}; double spec_06X[] = { 0.0186198, 0.0399641, 0.0405027, 0.0385809, 0.0362754...
#include "cAutomata.h" cAuto_Node::cAuto_Node() { pos = { 0,0 }; } cAuto_Node::cAuto_Node(const olc::vf2d &worldpos) { pos = worldpos; } olc::vf2d cAuto_Track::GetPostion(float t, cAuto_Node *pStart) { // pStart indicates the node the automata first encounted this track if (node[0] == pStart) ...
// CS2134 Fall 2015 // HW7 PQ2 Solution #include <iostream> using namespace std; /////////////////////////////////////////////////////// // Binary Search Tree Class (Based on Lecture Slides) /////////////////////////////////////////////////////// template <class Comparable> class BinarySearchTree; template <class C...
// Copyright 2013 by <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 wr...
/* BSD License Copyright (c) 2014 <NAME> https://github.com/achilikin 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 conditions ...
#include "linux_parser.h" #include <dirent.h> #include <unistd.h> #include <string> #include <vector> using std::stof; using std::string; using std::to_string; using std::vector; string LinuxParser::OperatingSystem() { string line; string key; string value; std::ifstream filestream(kOSPath); if (filestrea...
#include "AdaBoostEdgeDetector.h" cv::Mat AdaBoostEdgeDetector::cannyEdgeDetection(cv::Mat m) { /// Canny detector cv::Mat detected_edges; cv::Canny(m, detected_edges, 100, 100, 3); //cv::imshow("detected_edges", detected_edges); //cv::waitKey(50); return detected_edges; } AdaBoostEdgeDetector::AdaBoostEdgeDete...
#include <NewRefereeModule.cpp> #include <google/protobuf/io/zero_copy_stream_impl.h> #include <protobuf/LogFrame.pb.h> #include <protobuf/referee.pb.h> #include <QFile> #include <QTextStream> #include <vector> #include <fcntl.h> #include <time.h> using namespace Packet; using namespace std; const char BAR = '|';...
// Tencent is pleased to support the open source community by making Mars available. // Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. // Licensed under the MIT License (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License...
/* * Copyright (c) <2021> Side Effects Software 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: * * 1. Redistributions of source code must retain the above copyright notice, * this list of...
/********* * @file task_Motor.cpp * @brief The .cpp file for the Motor Driver task. * @details This file contains the three functions needed for the Motor Driver task. They are: * \li Run function - called by the scheduler. Contains an initial setup and then * an infinite loop. * \li set_outputs - the last...
// https://msdn.microsoft.com/zh-cn/library/ff398051.aspx #include <Windows.h> #include <agents.h> using namespace Concurrency; #include <iostream> #include <random> using std::wcout; using std::flush; using std::endl; /** 基本代理,使用控制流来调节程序的执行顺序 * 代理从消息块中读取数字,并统计正数和负数的个数 */ class CtrlFlowAgent : public agent { publ...
#include <iostream> #include <map> #include <vector> #include <cmath> #include <string> using namespace std; #include "Matrix.h" #include "Pr.h" int bestK(const Matrix &train, const Matrix &test, const int &numFeatures, const int &numClasses, const int &minkowskiDegree) { in...
#include <cstdio> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <ctype.h> #include <unistd.h> #include <math.h> #include <sys/time.h> #include <fstream> #include <iostream> #include "CppPotpourri.h" #include "StringBuilder.h" #include "ParsingConsole.h" #include "ElementPool.h" #include "GPSWra...
/* Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
#include "trigger.h" #include "stdio.h" #include <sstream> #include <string> #include "filefunctions.h" #include "game.h" void Trigger::activate(Aitools *aitools, Map &world){ Scanresult res; int cid; Creature *c; switch (act){ case TA_VICTORY: game->complete_game(); break; case TA_NONE: printf...
#include "SinglePieceStructuresGen.h" #include "PrefabStructure.h" #include "../IniFile.h" #include "../Item.h" //////////////////////////////////////////////////////////////////////////////// // cSinglePieceStructuresGen::cGen class cSinglePieceStructuresGen::cGen : public cGridStructGen { using Super = cGridSt...
#include "Alat/vector.hpp" #include "Mesh/meshunitinterface.hpp" #include "Solvers/xdmfwriter.hpp" #include "Solvers/variable.hpp" #include "Solvers/feminterface.hpp" #include <fstream> #include <iomanip> #include <sstream> using namespace solvers; /*---------------------------------------------------------*/...
/* * SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * * 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 Lic...
#include "hmt/bc_feat.hxx" #include "hmt/hmt_util.hxx" #include "np_helpers.hxx" #include "pyglia.hxx" #include "type/region_map.hxx" #include "util/mp.hxx" #include "util/text_cmd.hxx" #include "util/text_io.hxx" using namespace glia; using namespace glia::hmt; using LabelImageType = LabelImage<DIMENSION>; using Rea...
#include <avr/io.h> #include <avr/sleep.h> #include <avr/interrupt.h> // We want low power consumption #undef F_CPU #define F_CPU 128000L #include <util/delay.h> // Pin ports #define PWM PB0 #define WHITE PB4 #define BUTTON PB1 // How long will be fade periods #define DELAY 2 volatile bool pressed, released; volati...
/*- * Copyright (c) 2016 <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...
#include "simulator/SimManager.h" #include <conio.h> #include <ros/package.h> #include <string> Character Command::forward_ = {'i', "Forward"}; Character Command::backward_ = {'k', "Backward"}; Character Command::left_ = {'j', "Left"}; Character Command::right_ = {'l', "Right"}; Character Command::up_ = {'u', "Up"};...
// gcc : g++ -std=c++11 -I .. test-0.cpp && ./a.out // clang: clang++ -std=c++11 -I .. test-0.cpp && ./a.out // MSVC : cl.exe /EHsc /I .. test-0.cpp && .\test-0.exe #include <stdio.h> #include "glob_to_regex.hpp" static int test0() { struct TestCase { bool expected; std::string pattern...
#include <Python.h> #include <stdio.h> #include <pthread.h> #include <exception> #include <stdexcept> #include "download.h" static task_ret_map task_ret_pool; static pthread_mutex_t retmtx = PTHREAD_MUTEX_INITIALIZER; /** * test function */ void print_map() { for (ret_map_iter it=task_ret_pool.begin(); it != ta...
#include "dumpPkg.h" SideData::SideData() { init(); } SideData::SideData(const int size) { init(); this->size = size; data = (uint8_t*)malloc(this->size); memset(data, 0x0, sizeof(data)); } SideData::~SideData() { if(data) { free(data); } } void SideData::init() { data = NULL; size = 0; type = AV_PKT_DA...
#include <array> #include <iostream> #include <sstream> #include "frontend/ast/ast_stream_writer.hpp" #include "backend/codegen/bytecode/bytecode_codegen.hpp" #include "backend/vm/vm.hpp" #include "decode_instruction.hpp" #include "debug_time.hpp" #include "logging/logging.hpp" #include "options.hpp" #include "parser....
// KinematicObjectCircleConstraint.cpp // // <NAME> // Last updated: 12/07/2015 #include "KinematicObjectCircleConstraint.h" #include "scisim/Math/MathUtilities.h" KinematicObjectCircleConstraint::KinematicObjectCircleConstraint( const unsigned sim_bdy_idx, const scalar& sim_bdy_r, const Vector2s& n, const unsigned ...
/** * \file sarsa-train.cpp * \copyright <NAME> * \date December 2019 * \brief Implements the LSARSATrain class */ #include "sarsa-train.hpp" #include <time.h> #include <algorithm> #include <iostream> #include <iterator> #include <random> #include <sstream> #include <string> #include <tuple> #include <vector> LS...
// runtime.cc #include <assert.h> #include <exception> // std::exception #include <stdarg.h> // va_list, etc. #include <stdio.h> #include "runtime.h" void print(Str* s) { printf("%s\n", s->data_); } void log(const char* fmt, ...) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(a...
#include "s2geo_nif.h" #include "constants.h" #include "nif_s1interval.h" #include "nif_s2cellid.h" #include "nif_s2cellunion.h" #include "nif_s2latlngrect.h" #include "nif_s2latlng.h" #include "nif_s2loop.h" #include "nif_s2cap.h" #include "nifpp_utils.h" #include "s2cell.h" #include "s2cellunion.h" #include "s2latl...
/* * Copyright 2014-2016 <NAME>, Technical University of Munich * * 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 requi...
// // Created by michael on 07.11.15. // #include <assert.h> #include <Core/Graph/GraphAnalyzer.h> using namespace std; using namespace weave; unordered_map<string, Node> GraphAnalyzer::SolveGraph(weave::WeaverGraph *graph, shared_ptr<RandomStream> rs, ...
#include <iostream> #include "alsacls.h" #include "os.h" #include "screenxy.h" Alsacls::Alsacls():_buff(nullptr) { } Alsacls::~Alsacls() { close(); } void Alsacls::close() { snd_pcm_drain(_pcm_handle); snd_pcm_close(_pcm_handle); delete[] _buff; _buff = nullptr; } int Alsacls::open(int rate, i...
// Copyright (c) 2020 Graphcore Ltd. All rights reserved. #include "poplibs_test/Util.hpp" #include <poplar/Engine.hpp> #include <poplar/VariableMappingMethod.hpp> #include <popops/Collectives.hpp> #include <popops/ElementWise.hpp> #include <popops/codelets.hpp> #include <poputil/TileMapping.hpp> #include <poputil/Util...
/* * Copyright 2019, Offchain Labs, 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...
// FbxExporter.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "..\BabylonFbxNative\FbxSceneLoader.h" #include <iostream> #include <fstream> #include <Windows.h> #include <string> #include <sstream> #include "..\BabylonFbxNative\BabylonScene.h" #include "..\Babylon...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
/*This file is part of the FEBio Studio source code and is licensed under the MIT license listed below. See Copyright-FEBio-Studio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to ...
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
#include <iostream> #include <SDL.h> #include <boost/program_options.hpp> #include <boost/algorithm/string.hpp> #include <boost/format.hpp> #include <chrono> #include "util.h" #include "scene.h" #include "camera.h" #include "tinyexr/tinyexr.h" using boost::format; void writeToEXR(std::string fileName, optix::float4* ...
#include "typesdoc.h" #include <vector> #include "attribute_.h" using std::string; using std::vector; class TypeDesc : public Object { public: Attribute_<string> fullname_; Attribute_<string> shortname_; TypeDesc(Type type) : fullname_(this, "fullname", {}) , shortname_(this, "shortname...