text
stringlengths
3.08k
12.5k
#include "Cubes3D.h" #include <glad\glad.h> #include "../../Platform/Platform_SDL.h" #include <SDL_events.h> #include "../../Platform/Window_SDL_GL.h" #include <gtc/type_ptr.hpp> Cubes3D::Cubes3D(Camera * cam) : Node(&Node::ROOT), cam_(cam) { glGenBuffers(1, &VBO_); glGenVertexArrays(1, &VAO_); // 1. bin...
#include <iostream> #include <fstream> #include <string> #include <sstream> #include "asrFile.h" #include "List.h" #include "intList.h" using namespace std; int width, height = 0; int bs = 0; int x, y = 0; uint8_t r = 0; uint8_t g = 0; uint8_t b = 0; uint8_t a = 0; List iTokens; intList vals; asr ASR; int charToI...
#pragma once #include <algorithm> #include <array> #include <cassert> #include <charconv> #include <limits> #include <string> template <size_t N> class StaticCStringBuff { private: std::array<char, N + 1> str_{'\0'}; public: size_t len_ = 0; StaticCStringBuff() = default; constexpr StaticCStringBuf...
#include "../include/GPIO/tsic.h" #include "../include/GPIO/pigpiomgr.h" #include <stdio.h> #include <unistd.h> #include <pigpio.h> using namespace std; //----------------------------------------------------------------------------- // // Copyright (C) 2014-2015 <NAME>, edited 2021 <NAME> // // This software is free ...
// Verify that VelocityToXFlux is adjoint of FluxToXVelocity #include <iostream> #include "ibpm.h" using namespace std; using namespace ibpm; void printY(Flux q) { for (int lev=0; lev<q.Ngrid(); ++lev) { cout << "level " << lev << endl; for (int j=q.Ny(); j>=0; --j) { for (int i=0; i<...
// 曲线的绘制 #include <GL/glut.h> #include <iostream> #include <stdlib.h> #include <math.h> #include <stdio.h> #include <string.h> using namespace std; int q; GLsizei winWidth = 800, winHeight = 800; /*class wcPt3D { public: GLfloat x, y, z; }; */ GLfloat ctrlPts[4][3] = {{-200.0, 50.0, 0.0}, {-100.0, 300.0, 0.0}...
#include "RanSanMoi.h" #include <ctime> #include "Hazel/Renderer/Renderer2D.h" RanSanMoi::RanSanMoi() { snake[100]; snakeLength; direction; food; isempty[400]; empty[400]; size; runTime = 0.0f; block = false; dead; } void RanSanMoi::InitGame() { for (int i = 0; i < 400; i++) { isempty[i] = true; } size...
#include "SendTable.hpp" #include "netmessages_public.pb.h" using namespace csgotools; void SendTable::GatherExcluded(SendTable& table, std::set<std::string>& excluded, std::unordered_map<std::string, SendTable>& tables) { for (auto& prop : ...
/* * * Copyright (c) 2014, weizhenwei * 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 condi...
// Copyright 2021 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "media_capabilities/common.h" #include <sys/ioctl.h> #include <base/files/file_enumerator.h> #include <base/logging.h> #include <base/numeri...
/* Copyright (c) 2017, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * * All rights reserved. * * The Astrobee platform is licensed under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with...
#pragma once #include "dataset.h" #include <losses/crossentropyloss.hpp> #include <device/device_tensor.hpp> #include <chrono> #include <vector> #include <string> #include "cifar10_network.hpp" using namespace EigenSinn; template<typename Device_, int Layout = RowMajor> inline void TestNetwork(cifar::CIFAR10_datase...
// Copyright 2017, 2019 ETH Zürich, <NAME> // // 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 and the followi...
#include "router.h" #include "rip.h" #include <stdint.h> #include <stdlib.h> #include <stdio.h> #include <vector> using namespace std; /* RoutingTable Entry 的定义如下: typedef struct { uint32_t addr; // 大端序,IPv4 地址 uint32_t len; // 小端序,前缀长度 uint32_t if_index; // 小端序,出端口编号 uint32_t nexthop; // 大端序,下一跳的...
#include "SliderSelectorTile.h" #include "Core/LabelFactory.h" using namespace cocos2d; SliderSelectorTile::SliderSelectorTile() : _callback_scheduled(false) { } SliderSelectorTile* SliderSelectorTile::create(const std::string& title, const MTilePosition& position, co...
#include <cocos2d.h> #include "TestLayer.h" #include "ro-library/b2physics/debug/B2DebugDrawLayer.h" #include "ro-library/b2physics/utils/B2RangeConverter.h" USING_NS_CC; //------static functions------ Scene* TestLayer::createWithScene() { auto layer = TestLayer::create(); auto scene = Scene::create(); scene->add...
#include "msp.h" /* ========================================== MSP V2 Message Structure: Offset: Usage: In CRC: Comment: ======= ====== ======= ======== 0 $ Framing magic start char 1 X 'X' in place of v1 'M' 2 type '<' ...
#include <iostream> #include <string> #include <vector> #include <cmath> #include <limits> #include <cstdlib> using namespace std; #include <time.h> #ifndef srcPath #define srcPath "." #endif // The path and name of the town file string townFile = srcPath "/villes.txt"; #include "town.h" #include "neighbors.h" /*...
// Example of text usage, using glfw for the window system binding. // Copyright 2014 (C) <NAME>, Palo Alto, CA #define GL_GLEXT_PROTOTYPES 1 #include <GLFW/glfw3.h> #include <GL/gl.h> #include <pango/pango-layout.h> #include <text/pango/ViewdoPangoRenderer.h> #include <text/pango/ViewdoGLRenderer.h> // OpenGL boiler...
#include "matrixlib/wbsm4.h" #ifdef __GNUC__ #include <x86intrin.h> #endif #ifdef _MSC_VER #include <intrin.h> #endif #pragma intrinsic(__rdtsc) //Repeat test times and calculate on average for accuracy #define TEST 100000 //CPU cycles set start; uint64_t start_rdtsc() { return __rdtsc(); } //C...
/****************************************************************************** Copyright 2015 RAPP 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 Un...
#include "graphics.hpp" #include <SDL.h> #include <utils/utils.hpp> #include <stdlib.h> #include <string.h> #define STBI_ONLY_PNG #define STB_IMAGE_IMPLEMENTATION #define STBI_WINDOWS_UTF8 #include <stb_image.h> #define STB_RECT_PACK_IMPLEMENTATION #include <imstb_rectpack.h> #define STB_SPRINTF_IMPLEMENTATION #include...
/* * (C) Copyright 1996- 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 interg...
#include "IntroToOpenGL.h" #include "gl_core_4_4.h" #include <GLFW\glfw3.h> #include "Gizmos.h" using glm::vec2; using glm::vec3; using glm::vec4; using glm::mat4; IntroToOpenGL::IntroToOpenGL() { } IntroToOpenGL::~IntroToOpenGL() { } bool IntroToOpenGL::startup() { if (Application::startup() == false) { return ...
#include "astFunctionCall.h" #include <stdint.h> #include <stdio.h> //////////////////////////////////////////////////// int ASTFunctionCall::cnt=0; void ASTFunctionCall::show(uint32_t indent) { fprintf(stdout, ";%*s ASTFunctionCall\n", 4*indent, ""); } void ASTFunctionCall::generateLSM(FILE* fout) { ASTFunct...
#include <vector> #include "Blob.h" #include "BlobBoid.h" #include <iostream> #include <unistd.h> using namespace std; BlobBoid::BlobBoid(){ } BlobBoid::BlobBoid(int n, int x, int y, float knn_size, float bin_size){ //int lens = int (x / bin_size); _bin_size = bin_size; //_gridbins[num_bins][num_bins] = ...
#pragma once #include <functional> #include <vector> #include "Arduino.h" #include "StreamingOperator.hpp" #include "SmartIot/Datatypes/Interface.hpp" #include "SmartIot/Datatypes/Callbacks.hpp" #include "SmartIot/Limits.hpp" #include "SmartIotRange.hpp" class SmartIotNode; namespace SmartIotInternals { class SmartI...
#include "SegDataset.h" std::vector<cv::Scalar> get_color_list(){ std::vector<cv::Scalar> color_list = { cv::Scalar(0, 0, 0), cv::Scalar(128, 0, 0), cv::Scalar(0, 128, 0), cv::Scalar(128, 128, 0), cv::Scalar(0, 0, 128), cv::Scalar(128, 0, 128), cv::Scalar(0, ...
#include <stdio.h> #include <fcntl.h> #include <zlib.h> #include "gtest/gtest.h" #include "utils.h" static struct { const char* stripped; const char* original; } rstrip_strings[] = { { "foobar", "foobar " }, { "foobar", "foobar" }, { "", "" }, { "foobar", "foobar \n" }, { "foobar", "foobar\n" }, }...
// // Created by cmj on 20-3-26. // #include <stdio.h> #include <iostream> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/epoll.h> #include <netinet/in.h> #include <arpa/inet.h> #include <cstring> #include "HttpServer.h" #include "Reques...
/* MIT License Copyright (c) 2021 abhilashraju 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, d...
/** * Copyright 2020, <NAME> * * 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 and the following disclaimer...
#include "Terrain.h" Terrain::Terrain(int gridX, int gridZ, Loader & loader, const std::string & heightMap, TerrainTexturePack * texturePack, Texture * blendMap) :m_TexturePack(texturePack), m_BlendMap(blendMap), SIZE(400), MAX_HEIGHT(20), MAX_PIXEL_COLOUR(255) { name = "Terrain"; m_X = gridX * SIZE; m_Z = gridZ...
#include "mesh.h" #include "ble.h" #include "leds.h" #include <ArduinoJson.h> #include <WiFi.h> #include <esp_now.h> #include <esp_wifi.h> union fade_cmd_t { struct __attribute__((packed)) color_t { uint16_t h; uint8_t s; uint8_t v; uint16_t fadeMs; uint32_t seq; } color; uint8_t bytes[size...
#include "crypto.h" #include "util.h" #include <stdio.h> #include <string> #include <unistd.h> #include <vector> using namespace std; #define eprintf(...) fprintf(stderr, __VA_ARGS__) void usage(char *name) { eprintf("Usage: %s OPTIONS INPUT OUTPUT\n", name); eprintf(" OPTIONS:\n"); eprintf(" -d:...
/* * Copyright 2015-2019 Autoware Foundation. 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 requi...
// Copyright (c) 2011 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/renderer/external_host_bindings.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/values.h" #include "chrome/c...
/** game.cpp * * Entry point for the game. * * TODO: try to see if I can meaningfully separate out output * processes, so that it may be possible, if need arises, to use * libraries other than SDL. * */ #include <SDL2/SDL.h> #include <cstdlib> #include "game.h" #include "gamepiece.h" #include "m...
// Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Tests the sampling API in include/v8.h #include <map> #include <string> #include "include/v8-isolate.h" #include "include/v8-local-handle.h" #inc...
/* * 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 i...
#include <iostream> #include <iomanip> // for setw formatter #include <map> #include <set> #include <string> #include "imdb.h" using namespace std; static const int kWrongArgumentCount = 1; static const int kDatabaseNotFound = 2; /** * Function: printFill * ------------------- * Silly formatter... self-explanatory...
#include "Common.h" /************************************************************************/ /* Drawing Commands */ /************************************************************************/ void tvgDrawStar(tvg::Shape* star) { star->moveTo(199, 34); star-...
/*! \file btGImpactTriangleShape.h \author <NAME> */ /* This source file is part of GIMPACT Library. For the latest info, see http://gimpact.sourceforge.net/ Copyright (c) 2007 <NAME>. C.C. 80087371. email: <EMAIL> This software is provided 'as-is', without any express or implied warranty. In no event will the auth...
#include "ros/ros.h" #include "visualization_msgs/Marker.h" #include "visualization_msgs/MarkerArray.h" #include <tf/transform_broadcaster.h> #include <tf/tf.h> ros::Publisher g_marker_pub; void publishText(int& id, float x, float y, const std::string & text) { visualization_msgs::Marker marker; marker.header.f...
/*========================================================================= Program: ALBA (Agile Library for Biomedical Applications) Module: albaOpImporterVRML Authors: <NAME> Copyright (c) BIC All rights reserved. See Copyright.txt or This software is distributed WITHOUT ANY WARRANTY; without even the imp...
//===-- irstruct.cpp ------------------------------------------------------===// // // LDC – the LLVM D compiler // // This file is distributed under the BSD-style LDC license. See the LICENSE // file for details. // //===----------------------------------------------------------------------===/...
/* * Copyright (c) 2016, 2017 ARM Limited. * * SPDX-License-Identifier: MIT * * 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 * r...
#include "test_saber_buffer_NV.h" #include "saber/core/buffer.h" #include "saber/core/data_traits.h" using namespace anakin::saber; template <DataType datatype> void test_buffer() { typedef TargetWrapper<X86> X86_API; typedef TargetWrapper<NV> NV_API; typedef typename DataTrait<datatype>::dtype Dtype; ...
#include <iostream> #include <cstring> #include <thread> #include <atomic> #include <droidCrypto/ChannelWrapper.h> #include <droidCrypto/gc/circuits/AESCircuit.h> #include <droidCrypto/BitVector.h> #include <droidCrypto/utils/Log.h> #include <assert.h> std::atomic_flag ready; #define NUM_AES 5535 int main(int argc, c...
// // Copyright 2018 Pixar // // 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 wri...
// Copyright (c) 2001-2010 <NAME> // // 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) // This example is the equivalent to the following flex program: /* //[wcf_flex_version %{ #define ID_WORD 1000 ...
#include <tuple> #include <iostream> #define LC(l) \ l ## l ## l ## l ## l ## l ## l ## l ## l ## l ## \ l ## l ## l ## l ## l ## l ## l ## l ## l ## l ## \ l ## l ## l ## l ## l ## l ## l ## l ## l ## l #define DECLARE_LETTER_CLASS(letter) \ struct LC(letter) \ { \ void print_ ## letter () \ { \ ...
// Copyright 2021, University of Freiburg, // Chair of Algorithms and Data Structures. // Author: <NAME> <<EMAIL>> #include <gtest/gtest.h> #include <unordered_set> #include "../src/engine/sparqlExpressions/SetOfIntervals.h" #include "../src/util/Random.h" using namespace ad_utility; TEST(SetOfIntervals, SortAndCh...
/* * Copyright (c) 2016 MariaDB Corporation Ab * * Use of this software is governed by the Business Source License included * in the LICENSE.TXT file and at www.mariadb.com/bsl11. * * Change Date: 2024-11-26 * * On the date above, in accordance with the Business Source License, use * of this software will be g...
/* Copyright (c) 2021 <NAME>. See the COPYRIGHT file at the top-level directory of this distribution. Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. T...
/// \file Lsystem.cpp /// \brief Code for LProduction and LSystem. // 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, ...
#include <so_5_extra/disp/asio_one_thread/pub.hpp> #include <so_5/all.hpp> #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> struct cfg_t { unsigned int m_request_count{ 1000u }; bool m_separate_dispatchers{ false }; }; [[nodiscard]] cfg_t try_parse_cmdline( int argc, char ** argv ) ...
/* * This source file is part of RmlUi, the HTML/CSS Interface Middleware * * For the latest information, see http://github.com/mikke89/RmlUi * * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd * Copyright (c) 2019 The RmlUi Team, and contributors * * Permission is hereby granted, free of charge, to...
/* Copyright (c) 2005-2018, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
#include "server.h" #include "adapter.h" #include "wallet/secstring.h" #include "core/ecc_native.h" #include "node/node.h" #include "utility/cli/options.h" #include "utility/logger.h" #include "utility/helpers.h" #include "utility/string_helpers.h" #include "utility/log_rotation.h" #include <boost/program_options.hpp...
//---------------------------------------------------------------------------- // // TSDuck - The MPEG Transport Stream Toolkit // Copyright (c) 2019-2020, <NAME> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following c...
#include "masked_image.h" #include <algorithm> #include <iostream> const cv::Size MaskedImage::kDownsampleKernelSize = cv::Size(6, 6); const int MaskedImage::kDownsampleKernel[6] = {1, 5, 10, 10, 5, 1}; bool MaskedImage::contains_mask(int y, int x, int patch_size) const { auto mask_size = size(); for (int dy ...
#include <vector> #include <algorithm> #include <iostream> #include "Integrate.hpp" #include <random> using namespace std; Integrate::Integrate(double (*func)(double, double, double), std::vector< double > ranges, int MCSteps){ fun_ = func; _ranges = ranges; _MCSteps = MCSteps; _dim = _ranges.size()/2; /* * L...
/****************************************************************************** * * Project: OGR/DODS Interface * Purpose: Implements OGRDODSLayer class. * Author: <NAME>, <EMAIL> * ****************************************************************************** * Copyright (c) 2004, <NAME> <<EMAIL>> * * Per...
// Copyright (c) by respective owners including Yahoo!, Microsoft, and // individual contributors. All rights reserved. Released under a BSD (revised) // license as described in the file LICENSE. #include "feature_group.h" #include "v_array.h" #include <vector> #include <algorithm> #include <utility> #include <numer...
#include "RigidBody.h" using namespace kep; RigidBody::RigidBody(Vector3 _position, Quaternion _orientation, real _mass) { position = _position; velocity = Vector3(0.0f, 0.0f, 0.0f); acceleration = Vector3(0.0f, 0.0f, 0.0f); forceAccum = Vector3(0.0f, 0.0f, 0.0f); orientation = _orientat...
#include <c10d/ProcessGroupMPI.hpp> #include <torch/torch.h> #include <iostream> // Define a Convolutional Module struct Model : torch::nn::Module { Model() : conv1(torch::nn::Conv2dOptions(1, 10, 5)), conv2(torch::nn::Conv2dOptions(10, 20, 5)), fc1(320, 50), fc2(50, 10) { register_...
/* Copyright (c) 2014 Quanta Research Cambridge, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify...
/******************************************************************************** * Copyright 2009 The Robotics Group, The <NAME>-Kinney Moller Institute, * Faculty of Engineering, University of Southern Denmark * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except ...
// KeyUtil.cc for FbTk // Copyright (c) 2003 - 2006 <NAME> (fluxgen at fluxbox dot org) // // 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...
#include <sstream> #include <string> #include <ATen/core/jit_type.h> #include <c10/core/ScalarType.h> #include <torch/csrc/jit/backends/backend.h> #include <torch/csrc/jit/backends/backend_detail.h> #include <torch/csrc/jit/backends/backend_preprocess.h> #include <torch/csrc/jit/mobile/nnc/aot_compiler.h> #include <to...
/* * bpf.cpp * profils * * Created by <NAME> on 29/01/10. * Copyright 2010 ircam. All rights reserved. * */ #include <iostream> #include <string> #include "bpf.h" #define SHOW(I,X) cout << "[" << (I) << "]\t " # X " = \"" << (X) << "\"" << endl using namespace std; void split( vector<string> & theStri...
#include <functional> #include <vector> #include <cstdint> #include <cstdio> #include <queue> #include <mutex> #include <string> #include <condition_variable> #include <threadx/tx_api.h> #pragma mark - Definitions - /// Definitions for dispatch event flags #define DISPATCH_WAKE_EVT (0x1) #define DISPATCH_EXIT_EVT (0x...
#include <GLUT/glut.h> #include <cmath> #include <iostream> #include <sstream> #include <vector> #include <vecmath.h> using namespace std; // Globals // This is the list of points (3D vectors) vector<Vector3f> vecv; // This is the list of normals (also 3D vectors) vector<Vector3f> vecn; // This is the list of faces...
// // MathFunctions.cpp // MNN // // Created by MNN on b'2021/07/05'. // Copyright © 2018, Alibaba Group Holding Limited // #include "FunctionSummary.hpp" #include <math.h> void _AVX_MNNGeluFMA(float *dst, const float *src, size_t size) { auto var1 = _mm256_set1_ps(0.044715f); auto var2 = _mm256_set1_ps(0...
//<NAME> //<NAME> #include <iostream> #include <fstream> #include <string> #include <iomanip> #include <vector> using namespace std; int produto_tot; int maior=0; class prod { public: int cod; string marca; double preco; int quant; prod( int cod, string marca...
/**************************************************************************\ * Copyright (c) <NAME> & Gas Technologies AS * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistribu...
/* * Copyright 2017 Google Inc. 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 applica...
#include "MeanShift.h" void MeanShift::SetupMeanShift() { for (int i = 0; i < NBINS; i++) { q_u.R[i] = 0; q_u.G[i] = 0; q_u.B[i] = 0; p_u.R[i] = 0; p_u.G[i] = 0; p_u.B[i] = 0; } } MeanShift::Histogram MeanShift::CalculateHistogram(AVFrame * pFrame, int imageW, int imageH, int x, int y, int width, int...
//Optimise #include <bits/stdc++.h> using namespace std; // #define multitest 1 #ifdef WIN32 #define db(...) ZZ(#__VA_ARGS__, __VA_ARGS__); #define pc(...) PC(#__VA_ARGS__, __VA_ARGS__); template <typename T, typename U> ostream &operator<<(ostream &out, const pair<T, U> &p) { out << '[' << p.first << ", " << p.secon...
#ifndef STATIC_LINK #define IMPLEMENT_API #endif #if defined(HX_WINDOWS) || defined(HX_MACOS) || defined(HX_LINUX) #define NEKO_COMPATIBLE #endif #include <hx/CFFI.h> #include <string.h> #include "NativeText.h" #include "NativeTextFieldConfig.h" using namespace nativetext; static bool _idsInitialized = false; st...
#include <algorithm> #include <fstream> #include <iterator> #include <map> #include <set> #include <sstream> #include <string> #include <utility> #include "utils/profiling.h" #include <armadillo> using namespace util; using namespace arma; bool checkMat(int row, int col, mat const &mat) { if(mat.n_rows == row &...
// This file is a part of the IncludeOS unikernel - www.includeos.org // // Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences // and <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 obta...
// 2014-2019, ETH Zurich, Integrated Systems Laboratory // Authors: <NAME> #include "test_fn_linear_path_generation.h" #include "ll_fn.h" #include "ll_cell.h" #include "ll_testTools.h" #include "lm_testTools.h" using namespace lm__; using namespace lm__::test; using namespace ll__; using namespace ll__::test; void...
# include <bits/stdc++.h> # define F first # define S second # define mp make_pair // everything go according to my plan # define pb push_back # define sz(a) (int)(a.size()) # define vec vector // shimkenttin kyzdary, dzyn, dzyn, dzyn... # define y1 Y_U_NO_y1 # define left Y_U_NO_left # define right Y_U...
/* * Copyright (C) 2015 <NAME> <http://gregmeiste.com> * * 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 <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <queue> using namespace std; int key[27] = { 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9 }; string M, S; vec...
#include <unistd.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <sys/epoll.h> #include <netdb.h> #include "epollinterface.h" #include "connection.h" #include "netutils.h" #include "Logger.h" #include "server_socket.h" #define MAX_LISTEN_BACKLOG 4096 using namespace std; struct server_socket_...
/* Copyright (c) 1999 - 2010, Vodafone Group Services Ltd 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 condit...
#pragma once #include <eosio/dispatcher.hpp> #include <sessions.hpp> namespace eden { template <typename T, typename R, typename... Args> void execute_session_action(eosio::name contract, R (T::*func)(const eosio::not_in_abi<session_info>& current_session, ...
#include <glog/logging.h> #include <gtest/gtest.h> #include <boost/serialization/map.hpp> #include <boost/serialization/vector.hpp> #include <iostream> #include <tuple> #include "MsgArchive.hpp" namespace zlcook { /*trivial class *no standard layout * */ class Person { public: Person(){}; Person(int a, bool ...
/* AUTHOR : <NAME> (angelo12 AT vt DOT edu) PROJECT : Hybrid Rendering Engine LICENSE : This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) DATE : 2018-09-08 */ #include "shader.h" #include <fstream> #include <iostream> #include <sstream> //Shader setup and in...
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #include "sysid/generation/ConfigManager.h" #include <cstddef> #include <stdexcept> #include <string_view> #include <f...
// -*- C++ -*- // // Package: MCZll // Class: MCZll // /* Description: filter events based on the Pythia ProcessID and the Pt_hat Implementation: inherits from generic EDFilter */ // // Original Author: <NAME> // // #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/Eve...
#include <iostream> #include <boost/program_options.hpp> #include <boost/thread.hpp> #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> // #include <pcl/visualization/pcl_visualizer.h> #include "AvatarRenderer.h" #include "AvatarOptimizer.h" #include "AvatarPCL.h" #include "Config.h" #include "Util.h" namespa...
/* * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights reserved * * The Universal Permissive License (UPL), Version 1.0 * * Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, * associated documentation and/or data (collectivel...
/* * Copyright 2009-2017 Alibaba Cloud 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...
#include <stdio.h> int getUTF8(const unsigned char *data, unsigned long data_sz, unsigned long *c, int *sz){ if(data_sz==0 || data==NULL || c==NULL || sz==NULL)return -1; *c=0; *sz=0; unsigned char c1=data[0]; if((c1 & 128)==0){ // single byte UNICODE *sz=1; *c=c1; }else if((c1 & 224)==192){ // two byte UN...
//===-- HexagonDisassembler.cpp - Disassembler for Hexagon ISA ------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
/* * switch.cc * * Created on: 2019年2月1日 * Author: qinhongbo */ #include <stdio.h> #include <string.h> #include <omnetpp.h> #include <string> #include <condition.h> #include "switch_message_m.h" using namespace omnetpp; using namespace std; class sdn_switch : public cSimpleModule { private: sim...