text
stringlengths
3.08k
22k
// // Created by <NAME> on 2017-07-19. // #ifdef __GNUC__ #include <unistd.h> #endif #include "models/rbm.hpp" #include "mnist_data.hpp" #include "edgeinfo/csv_record.hpp" struct test_params { size_t n_cont_div_ = 15; size_t n_epoch_ = 10; size_t n_hidden_ = 50; size_t n_batch_ = 20; size_t n_test_chain_ = 20; ...
// Ref: https://cp-algorithms.com/data_structures/fenwick.html // https://github.com/kartikkukreja/blog-codes/blob/master/src/BIT%20or%20Fenwick%20Tree%20Data%20Structure.cpp /*********************************************************************************************************************/ // Prob. based on t...
#include "Application.h" #include "ModuleModelLoader.h" #include "ModuleTexture.h" #include "ModuleScene.h" #include "ModuleRender.h" #include "ModuleImgui.h" #include "ModuleCamera.h" #include "ModuleProgram.h" #include "assimp/include/assimp/Importer.hpp" #include "assimp/include/assimp/matrix4x4.h" #include "assimp/...
///////////////////////////////////////////////// // BagOfWords-Model THash<TStr, TBowMd::TBowMdLoadF> TBowMd::TypeToLoadFH; PBowMd TBowMd::Load(TSIn& SIn){ TStr TypeNm(SIn); int TypeKeyId=-1; if (TypeToLoadFH.IsKey(TypeNm, TypeKeyId)){ TBowMdLoadF LoadF=TypeToLoadFH[TypeKeyId]; return (*LoadF()...
/* * Copyright 2017-2020 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
/** * 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. */ #include "...
#define __MOJOSHADER_INTERNAL__ 1 #include "mojoshader_internal.h" // Stripped down code from Mojoshader, originally under zlib license. // this is djb's xor hashing function. static inline uint32 hash_string_djbxor(const char *str, size_t len) { register uint32 hash = 5381; while (len--) hash = ((ha...
#include "neuron.h" #include "neural.h" #include "actFunctions.h" #include "rFunctions.h" #include <ctime> #include <cstdlib> #include <fstream> #include <iostream> net::net(std::vector<int> layersi, double alphaI, int actFunctionNI, double neuronWMi){ alpha = alphaI; actFunctionN = actFunctionNI; neuronW...
/* * Copyright 2014-2017, Max Planck Society. * 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, * thi...
/* Copyright (C) 2011 by <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 "example/task.h" #include "certain/certain.h" #include "certain/errors.h" #include "co_routine.h" #include "co_routine_inner.h" #include "gflags/gflags.h" #include "utils/co_lock.h" #include "utils/crc32.h" #include "utils/time.h" DECLARE_string(task); DECLARE_int32(index); namespace { struct Count { std...
/** ****************************************************************************** * This file is part of the TouchGFX 4.10.0 distribution. * * <h2><center>&copy; Copyright (c) 2018 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under Ultimate Libert...
#include "SceneLoader.h" #include "Camera.h" #include "Constants.h" #include "Light.h" #include "MainCamera.h" #include "Material.h" #include "Mesh.h" #include "ObjectAnimation.h" #include "RootSceneObject.h" #include "ShaderMaterialDefault.h" #include "ShaderMaterialSkyBox.h" #include "ShaderWater.h" #include "SkyBox....
// Copyright (c) 2013 University of Pennsylvania // // 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, modif...
/* * 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 ma...
#include<cstdio> #include<cstring> #include<cctype> #include<cstdlib> #include<fstream> #include<sstream> #include<map> #include<vector> #include<algorithm> #include "utils.h" #include "my_assert.h" #include "GTFItem.h" #include "Transcript.h" #include "Transcripts.h" using namespace std; struct ChrInfo { string na...
#include "ros/ros.h" #include "nav_msgs/OccupancyGrid.h" #include "nav_msgs/GetMap.h" #include <geometry_msgs/TransformStamped.h> #include <tf2_ros/transform_listener.h> #include "string" #include "chrono" inline size_t index(size_t i, size_t column, uint32_t width) { return (width * i) + column; } void initializeU...
#include "Shader/DeferredLightPassShader.h" #include <glm/ext.hpp> #include "Component/PointLight.h" #include "BaseRenderer.h" #include "Component/CameraComponent.h" #include "Entity/EntityManager.h" DeferredLightPassShader::DeferredLightPassShader() { } DeferredLightPassShader::DeferredLightPassShader(const char * ...
#include "signedauthserver.hpp" #include "rrgenerator.hpp" #include "shufflebytes.hpp" #include "logger.hpp" #include <boost/program_options.hpp> #include <boost/thread.hpp> #include <iostream> #include <fstream> #include <algorithm> #include <random> namespace dns { class FuzzServer : public SignedAuthServer ...
#include <float.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include "TalkBox.h" #include "calcAutoCoeff.h" #include "durbin.h" #include "lpcFilter.h" const float k_max = 0.99f; #define M_PI 3.14159265358979323846 /* a tunable high-pass filter based on a first order allpass */ inline double high...
#include "OLED_GFX.h" #include "ASCII_Font.h" #include "stdlib.h" uint8_t Row,Column; FONT_SIZE Font_Size; OLED_GFX::OLED_GFX(void) { Row = 0; Column = 0; Font_Size = FONT_5X8; } void OLED_GFX::Set_FontSize(FONT_SIZE size) { Font_Size = size; } void OLED_GFX::print_String(uint8_t x, uint8_t y, const uin...
#include "utilities.h" bool my_saveANO(QString ano_dir, QString fileNameHeader, QList<QString> suffix){ if(!ano_dir.endsWith('/')){ano_dir = ano_dir+'/';} FILE * fp=0; fp = fopen((char *)qPrintable(ano_dir+fileNameHeader+QString(".ano")), "wt"); if (!fp) { v3d_msg("Fail to open file to writ...
/* * * Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com * * The contents of this file are provided under the Software License * Agreement that you accepted before downloading this file. * * This source forms part of the Software and can be used for educational, * training, and demonstration purpos...
#include "Train.h" //------- Base of engine, wagons (including wheels) -------------------- void Train::base() { glColor4f(0.2, 0.2, 0.2, 1.0); //The base is nothing but a scaled cube! glPushMatrix(); glTranslatef(0.0, 4.0, 0.0); glScalef(20.0, 2.0, 10.0); //Size 20x10 units, thickness 2 units. glutSolidCub...
#include "bmobjsonutil.h" #include "../cocos/base/ccMacros.h" void BmobJsonUtil::object2Json(Json::Value *value, std::string key, Ref *object){ if (!object) { return; } if (dynamic_cast<__Integer *>(object)) { (*value)[key] = dynamic_cast<__Integer *>(object)->getValue(); }else if (dyn...
#include <onut/ActionManager.h> #include <onut/Input.h> #include <onut/Files.h> #include <onut/Texture.h> #include <onut/Renderer.h> #include <onut/SpriteBatch.h> #include <onut/PrimitiveBatch.h> #include <onut/TiledMap.h> #include <onut/ContentManager.h> #include "SceneViewPanel.h" #include "GUIContext.h" #include "Th...
//===--- SplitFunctions.cpp - pass for splitting function code ------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
#define MY_USE_FB 0 #if MY_USE_FB #define USE_FRAME_BUFFER #endif #include <string.h> #include <stdio.h> #include <Adafruit_GFX.h> // Core graphics library #include <ST7735_t3.h> // Hardware-specific library #include <ST7789_t3.h> // Hardware-specific library #include "Sharp.h" #include "noteset.h" #include "LCD....
#include <iostream> #include <random> #include <cmath> #include <noise/noise.h> #include <lib/voxel_renderer/voxel_renderer.hpp> #include <optional> static const auto PI = boost::math::constants::pi<float>(); struct CaveInfo { glm::vec3 p_direction{ 1.0f, 0.0f, 0.0f }; glm::vec3 s_direction{ 0.0f, 1.0f, 0.0f ...
/* BASIC GLFW + GLXW WINDOW AND OPENGL SETUP ------------------------------------------ See https://gist.github.com/roxlu/6698180 for the latest version of the example. We make use of the GLAD library for GL loading, see: https://github.com/Dav1dde/glad/ -----------------------------------------------...
/** \file chainiksolverpos_lma_demo.cpp \brief Test program for inverse position kinematics results with 1 million inv pos kin. <code> #times successful 999992 #times -1 result 0 #times -2 result 5 #times -3 result 3 average number of iter 16.6437 min. nr of iter 13 max. nr of iter 500 min. difference after solvi...
#include <systemc.h> #include <sstream> #include <fstream> #include <iomanip> #include "Vcpu_top.h" #include "Vcpu_top_cpu_top.h" #include "Vcpu_top_io_port.h" #include "Vcpu_top_core_top.h" #include "Vcpu_top_core_top.h" #include "Vcpu_top_core.h" #include "Vcpu_top_mmu.h" #include "Vcpu_top_regfile.h" #include "Vc...
#include "OpenMM.h" #include <cstdio> #include "openmm/ANN_Force.h" #include "openmm/internal/AssertionUtilities.h" #include "openmm/Context.h" #include "openmm/Platform.h" #include "openmm/System.h" #include "openmm/VerletIntegrator.h" #include "openmm/PluginInitializer.h" #include <cmath> #include <iostream> #include...
#include <omp.h> #include "mcr.h" std::vector<std::vector<int>> gen_mutate(std::vector<std::vector<void*>> arrs, std::vector<std::vector<int>> currPaths, std::vector<std::vector<std::vector<std::vector<bool>>>> *possibleCombinations) { // Loop through all arrays // Keep parent incase parent is better than childre...
/** Copyright (C) 2017 European Spallation Source */ /** @file KafkaPlugin.cpp * @brief C++ implementation file for an EPICS areaDetector Kafka-plugin. */ #include <epicsEvent.h> #include <epicsMessageQueue.h> #include <epicsThread.h> #include <epicsTime.h> #include <iocsh.h> #include <asynDriver.h> #include <ci...
// // solarsystem.cpp // solar-system // // Created by <NAME> on 3/28/17. // Copyright © 2017 <NAME>. All rights reserved. // #include "solarsystem.hpp" #define REST 700 #define REST_Y (-REST) #define REST_Z (REST) void SolarSystem::onDisplay() { // 清除viewport缓冲区 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUF...
/* CPSC 5700: Computer Graphics <NAME> ColorfulName.cpp: draw multiple triangles to form a colorful name */ #include <glad.h> #include <GLFW/glfw3.h> #include <stdio.h> #include "GLXtras.h" #include <vector> // shader program GLuint vBuffer = 0; // GPU vertex buffer ID, valid if > 0 GLuint program = 0; // GLSL p...
#include <rmg/window.hpp> #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <rmg/config.h> #include <rmg/cube.hpp> #include <rmg/cylinder.hpp> #include <rmg/sphere.hpp> #include <rmg/sprite.hpp> #include "../../testconf.h" using namespace rmg; static float clip(float n, float ...
// // ofx3DPro.cpp // // Copyright (c) 2013 <NAME> <http://patriciogonzalezvivo.com> // // #include "ofx3DPro.h" ofx3DPro::ofx3DPro(): globalAmbientColor(0.25, 0.25, 0.25), selectedLigth("NULL") { guiTemplate = new ofxUISuperCanvas(ofToUpper(getSystemName())); guiTemplate->setName("TEMPLATE"); guiTempla...
/* * Copyright (c) 2015, 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 ...
//$Id: adi.cpp 3132 2014-02-04 21:54:57Z johnoel $ #include "coff_t.h" #include "intersav.h" #ifdef SIMULATE #undef SIMULATE #endif //#undef HERE //#define HERE cout << "reached " << __LINE__ << " in " << __FILE__ << endl; #include "trace.h" extern setsaveinterflag interflag; extern int saveinterflag; template <> ...
/* * Model.cpp * Code for test model */ #include <math.h> #include "Model.hpp" #include "LsqrTypes.hpp" #include "test_lsqr.hpp" #define PI (4.0 * atan(1.0)) #define sqr(a) ( (a) * (a) ) void dvec_scale( double, dvec * ); //void test_mult( long, dvec *, dvec *, void *); void lstp_mult( dvec *h, dv...
#include "includes.h" #include "extern.h" #include "functions.h" // Standard TCP/UDP checksum function. USHORT checksum(USHORT *buffer, int size) { unsigned long cksum=0; while (size > 1) { cksum += *buffer++; size -= sizeof(USHORT); } if (size) cksum += *(UCHAR*)buffer; ...
// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved // Copyright (c) 2004-2006 ATI Technologies 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 restric...
/** \copyright * Copyright (c) 2013, <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...
#include "narf/console.h" #include "narf/playercmd.h" #include "narf/net/protocol.h" #include "narf/net/server.h" // TODO: move these #define WORLD_X_MAX 64 #define WORLD_Y_MAX 64 #define WORLD_Z_MAX 64 using namespace narf; std::string net::to_string(const ENetAddress& address) { char buf[3 * 4 + 3 + 1 + 5 + 1]; ...
#include "oootracer.h" // emulator.cpp passes in a pointer to the Instruction Register // found in the simulated processor. //Tracer_t::Tracer_t(dat_t<32>* _inst_ptr, dat_t<1>* _stats_reg, FILE* log) Tracer_t::Tracer_t(dat_t<32>* _inst_ptr, FILE* log) { inst_ptr = _inst_ptr; // stats_reg = _stats_reg; logfil...
/* GRAPHITE2 LICENSING Copyright 2010, SIL International All rights reserved. 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 License, or (at yo...
#include <fstream> #include <uWS/uWS.h> #include <chrono> #include <iostream> #include <thread> #include "Eigen-3.3/Eigen/Core" #include "Eigen-3.3/Eigen/QR" #include "json.hpp" #include "spline.h" #include "constants.hpp" #include "utils.hpp" using namespace std; // for convenience using json = nloh...
#include "launcher.h" #include <vector> //#include "ili9488.h" #include "app_remote_screen.h" #include "lcd.h" //#include "tft.h" #include "ADF4351.h" void StartLauncherTask() { static unsigned char parameter; xTaskHandle xHandle; // 创建任务,储存句柄 xTaskCreate(LauncherTask, "LauncherTask", configMINIMAL_STACK_SIZE * 4...
#pragma once /* Windows has thousands of me */ static const int ERROR_ACCESS_DENIED = 5; static const int ERROR_ALREADY_EXISTS = 183; static const int ERROR_INVALID_HANDLE = 6; static const int ERROR_INVALID_PARAMETER = 87; static const int GENERIC_READ = 0x80000000; static const int GENERIC_WRITE = 0x40000000; ...
// Copyright 2018 The Fuchsia 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 <lib/media/codec_impl/codec_buffer.h> #include <lib/media/codec_impl/codec_impl.h> #include <lib/media/codec_impl/codec_port.h> #include <lib/medi...
/* =========================================================================== Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). Doom 3 BFG Edition Source Code is free...
/* -*-c++-*- */ /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph * Copyright 2008-2009 Pelican Ventures, Inc. * http://osgearth.org * * osgEarth 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 ...
#include "graphics.h" #undef main #include <SDL.h> #include <SDL_ttf.h> #include <math.h> #define error(fmt, ...) _error(__LINE__, fmt, __VA_ARGS__) #define sdl_error(name, ...) _sdl_error(__LINE__, name) #define ttf_error(name, ...) _ttf_error(__LINE__, name) extern int orig_main(); extern "C" int main(int argc, ch...
#include "typecheck.h" #include <vector> #include <set> #include <iostream> using std::vector; using std::set; using std::cerr; using std::endl; template<class T> bool list_equal(list<T*>* ts1, list<T*>* ts2, bool(*eq)(T*,T*)) { if (ts1->size() == ts2->size()) { auto iter2 = ts2->begin(); for (auto iter1 = t...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* SCIP --- Solving Constraint Integer Programs */ ...
//************************************************************************ // * // Copyright (C) 2004 * // University Corporation for Atmospheric Research * // All Rights Reserved * // * //**********************************************************...
#include "glfw_keyboard.hpp" #include "glfw_user_pointer.hpp" #include <GLFW/glfw3.h> #include <spdlog/spdlog.h> #include <unordered_map> #include <string> #include <stdexcept> namespace { using k = vr::glfw::key; const std::unordered_map<k, int> key_to_glfw_mapping = { { k::a, GLFW_KEY_A }, { k::b, GLFW_KEY_B...
#include "Butterworth.hpp" #include <algorithm> #include <complex> // An ordering on complex that lets real roots dominate. // static bool sortComplex(std::complex<double> x, std::complex<double> y) { if (std::real(x) < std::real(y)) return true; if (std::real(y) < std::real(x)) return false; return std:...
#include <ros/ros.h> #include <image_transport/image_transport.h> #include <cv_bridge/cv_bridge.h> #include <sensor_msgs/image_encodings.h> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <boost/filesystem.hpp> #include <boost/format.hpp> ...
#include "../yaml-cpp/include/yaml-cpp/yaml.h" #include "common.h" #include "log_message.h" #include "muscord_config.h" #include "playerctl.h" #include <sys/stat.h> #include <iostream> #include <map> #include <vector> #include <fstream> #include <algorithm> namespace YAML { template<> struct convert<muscord::S...
#include <iostream> // pass by value void swap_pass_by_value(int a, int b){ int tmp = a; a = b; b = tmp; } // pass by reference void swap_pass_by_reference(int& a, int& b){ int tmp = a; a = b; b = tmp; } // pass a pointer by value void swap_pass_pointer_by_value_1(int* a, int* b){ int *tm...
//======================================================================================== // Athena++ astrophysical MHD code // Copyright(C) 2014 <NAME> <<EMAIL>> and other code contributors // Licensed under the 3-clause BSD License, see LICENSE file for details //=====================================================...
#include "algorithm" #include "network.hpp" float AccumulateContractRisk(float risk, Contract* c) { return risk + c->pathRisk; } /* // description iterates through Node's best paths and adds them to pertinent edges. Two variables are relevant: edgeRisks, nodeRank. An edge that is more frequently found in a best p...
#include "g_maps.hpp" #include <fstream> #include <memory> #include <sstream> #include <stdexcept> #include <unordered_map> #include "disable_gcc_warning.hpp" #include <nlohmann/json.hpp> #include "enable_gcc_warning.hpp" #include "bind/bindings_lists.hpp" #include "err_logger.hpp" #include "mapdef...
/** * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: <NAME> */ #include "particle_filter.h" #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector> #include "helper_functions.h" using std::string; using ...
// <NAME>, July 3, 2019. // Dynamic Role Switching #include <iostream> #include <fstream> #include <cmath> #include <chrono> #include <franka/exception.h> #include <franka/robot.h> std::ofstream recorder; class PotentialFieldController { public: PotentialFieldController(int leader, double period); fr...
#include <numeric> #include <algorithm> #include <polygon.hpp> #include <components/Body.hpp> ConvexPolygon::ConvexPolygon(const std::vector<Vector2f>& vertices): _vertices{vertices} { } Vector2f ConvexPolygon::supportFunction(const Vector2f& direction) const { std::vector<float> products(_vertices.size()); ...
#include "include/mainwindow.h" std::map<ECellColors, QString> g_ColorNameMap; CfgVars g_cfgVars; CGame *mpGame; CMainWindow *pMainWnd; // Logging. static std::filebuf l_fileBuff; static std::ostream l_logStream(&l_fileBuff); void SetupColorNames() { g_ColorNameMap[Cell_White] = "White"; g_ColorNameMap[Cell...
#include <Engine.h> #include <Engine/Core/EntryPoint.h> #include <imgui/imgui.h> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include "Sandbox2D.h" // This is where the Vertex Arrays and Shaders are defined class ExampleLayer : public Engine::Layer { public: ExampleLayer() : Layer("Ex...
/* * Copyright (c) 2018 Particle Industries, Inc. All rights reserved. * * 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 3 of the License, or (at your option) any ...
#include "KeePassXCClient.h" #include "Log.h" #include <array> #include <boost/iostreams/device/array.hpp> #include <boost/iostreams/stream.hpp> #include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/ptree.hpp> #include <cstdlib> #include <set> #include <sodium.h> #include <sstream> #include <std...
#include "Browser.h" void PaintText(Draw& w, int& x, int y, const char *text, const Vector<ItemTextPart>& n, int starti, int count, bool focuscursor, Color _ink, bool italic) { for(int i = starti; i < count; i++) { const ItemTextPart& p = n[i]; Font f = BrowserFont(); Color ink = SColorText; ...
/** ########################################################################## # If not stated otherwise in this file or this component's LICENSE # file the following copyright and licenses apply: # # Copyright 2019 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
//--------------------------------------------------------------------------- // File: SortedList.cpp // Author: <NAME> // Date: 10/23/2019 // Program 2: Merge Sorted List // // DESCRIPTION: // The program creates a Doubly-Linked List that implements the Carrano and // Henry sorted list interface as presented ...
#include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <string.h> #include <assert.h> #include <mkl.h> #include "winconv.hpp" #include <time.h> #include <stdint.h> #include <sys/time.h> #include <unistd.h> #define icrt_time_sec() ({ struct timeval tp; get...
#include <ros/ros.h> #include <image_transport/image_transport.h> #include <cv_bridge/cv_bridge.h> #include <sensor_msgs/image_encodings.h> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include "util.cpp" #include <opencv2/opencv.hpp> #include <opencv2/core/types_c.h> #include <opencv2...
/* * 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...
/*MT* MediaTomb - http://www.mediatomb.cc/ update_manager.cc - this file is part of MediaTomb. Copyright (C) 2005 <NAME> <<EMAIL>>, <NAME> <<EMAIL>> Copyright (C) 2006-2010 <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, ...
// // Created by tao on 19-1-17. // #include <sys/time.h> #include <cassert> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <set> #include "common_includes.h" /** * 随机一个不重复数组,通过map与交换实现,适合很大的范围中随机 * @param iMiniNum 开始数字 * @param iMaxNum 结束数字 * @param iArrlen 数组...
// vector< Term > division provided that the quotient and remainder have integer coefficients #include <iostream> using std::cin; using std::cout; using std::endl; #include <iomanip> using std::setw; #include <fstream> using std::istream; using std::ifstream; using std::ios; #include <vector> using ...
////////////////////////////////////////////////////////////////////////////////// // // Company: Universidade Federal do Rio Grande do Sul // Engineer: <NAME> // // Create Date: 01.12.2019 14:24:35 // Description: Generates visualization files for an AIG and its associated BDD // // Revision: // Revision 0.01 - File c...
/* * Copyright (c) 2008, Carnegie Mellon University * All rights reserved. * * Code author: <NAME> * Research: <NAME>, <NAME> * Funding: NSF, Link Foundation * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redis...
// created by <NAME> #include "stdafx.h" #include "VisaFlume.h" #include <qdebug.h> VisaFlume::VisaFlume(bool safemode, std::string address) : deviceSafemode(safemode), usbAddress(address) { } /// void VisaFlume::write( std::string message ) { // not sure what this is for. Perhaps actual number of characters sent, ...
// Copyright (c) 2009-2010 <NAME> // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (C) 2017 <NAME> <<EMAIL>> // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "primitives/transaction.h" #include "hash....
#include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <pybind11/eigen.h> #include <Eigen/Dense> #include "geometrycentral/surface/halfedge_mesh.h" #include "geometrycentral/surface/heat_method_distance.h" #include "geometrycentral/surface/halfedge_factories.h" #include "geometrycentral/surface/meshio.h" #i...
#include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <pybind11/complex.h> #include <pybind11/numpy.h> #include <iostream> #include <string> #include <math.h> #include "utils.cpp" /****************************************************** Time critical functions for the Deep Learning-based reconstruction (...
#include "components/Animation/SkeletalMesh.h" #include<iostream> #include "Components/Rendering/Mesh.h" #pragma warning(push, 0) #include<glad/glad.h> #include<GLFW/glfw3.h> #pragma warning(pop) std::vector<sk_vert> SkeletalMesh::vertexData = std::vector<sk_vert>(); std::vector<unsigned int> SkeletalMesh::indexList = ...
#include "DocxFactory/ConverterPrinter/MsExcelUtil.h" #include "DocxFactory/ConverterPrinter/ConverterPrinterException.h" #include "DocxFactory/ConverterPrinter/ExportFormatNotSupportedException.h" #include "DocxFactory/ConverterPrinter/UtilNotFoundException.h" #include "DocxFactory/os/OsFunc.h" #include "DocxFactory...
#include <Wire.h> #include "Chassis.h" #include "IC2_DataTypes.h" Chassis::Chassis() { } void Chassis::setup() { motor_init(&motor1); motor_init(&motor2); // Attach motor drive pins pinMode(M1DIR,OUTPUT); pinMode(M1SPEED,OUTPUT); pinMode(M2DIR,OUTPUT); pinMode(M2SPEED,OUTPUT); Wire.begin(CHASSIS_DEV...
//===- DialectConversion.cpp - MLIR dialect conversion generic pass -------===// // // Copyright 2019 The MLIR 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....
// Copyright (c) 2013, 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. #include <algorithm> #inclu...
// // Lighthouse3D.com Code Sample // // Converting 3D model files to JSON // // Uses: // Assimp lybrary for model loading // http://assimp.sourceforge.net/ // // Some parts of the code are strongly based on the Assimp // SimpleTextureOpenGL sample that comes with the Assimp // distribution, namely the code that r...
#include <algorithm> #include <cstddef> #include <cstdint> #include <exception> #include <filesystem> #include <fstream> #include <iostream> #include <iterator> #include <random> #include <string> #include <tuple> #include <vector> #include "error_logger.h" #include "font.h" #include "matrix.h" #include "neural_networ...
/* * AppStoreValidation.c * FretPetX * * Created by <NAME> on 3/10/11. * Copyright 2012 Thinkyhead Software. All rights reserved. * * Based primarily on sample code by <NAME> * https://github.com/AlanQuatermain/mac-app-store-validation-sample * */ #include "AppStoreValidation.h" #include "TString.h" #i...
//g++ -std=c++11 *.cpp `pkg-config --libs --cflags opencv` -o main #include <opencv2/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/ximgproc/slic.hpp> #include <opencv2/core/cvstd.hpp> #include <opencv2/core/utility.hpp> #include <opencv2/ximgproc.hpp> #include...
// //////////////////////////////////////////////////////// // # Title // Counting hexagons // // # URL // https://projecteuler.net/problem=577 // http://euler.stephan-brumme.com/577/ // // # Problem // An equilateral triangle with integer side length `n >= 3` is divided into `n^2` equilateral triangles with side lengt...
#include "components/GLCubeSphere.h" #include "SOIL/SOIL.h" #include <vector> #include <sstream> const float epsilon = 0.0001f; // For std::find namespace Sigma { bool operator ==(const Vertex &lhs, const Vertex &rhs) { return ((abs(rhs.x - lhs.x) < epsilon) && (abs(rhs.y - lhs.y) < epsilon) && ...