text
string
size
int64
token_count
int64
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/connect/model/UpdateInstanceAttributeRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Connect::Model; using namespace Aws::Utils::Json...
794
264
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
2,423
762
/*################################################################################ ## ## Copyright (C) 2011-2021 Keith O'Hara ## ## This file is part of the StatsLib C++ library. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance...
6,253
2,272
/* * Copyright (c) 2021 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 * rights ...
10,522
6,672
//===--- SwitchEnumBuilder.cpp --------------------------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
7,434
1,994
// 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 <string> #include "base/file_util.h" #include "base/platform_file.h" #include "base/scoped_temp_dir.h" #include "testing/gtest/include/gtest...
3,938
1,386
//--------------------------------------------------------------------------------------------------------------------- // Copyright (C) 2015, M. G. Tsai. // ALL RIGHTS RESERVED. //---------------------------------------------------------------------------------------------------------------------
299
53
///////////////////////////////////////////////////////////////////////////// // Name: src/common/sysopt.cpp // Purpose: wxSystemOptions // Author: Julian Smart // Modified by: // Created: 2001-07-10 // Copyright: (c) Julian Smart // Licence: wxWindows licence /////////////////////////////////...
3,176
901
/******************************************************************** CrazyGaze (http://www.crazygaze.com) Author : Rui Figueira Email : rui@crazygaze.com purpose: *********************************************************************/ #include "SamplesCommonPCH.h" #include "Parameters.h" namespac...
1,498
613
#include "Skin.hpp" #include <core/GodotGlobal.hpp> #include <core/CoreTypes.hpp> #include <core/Ref.hpp> #include <core/Godot.hpp> #include "__icalls.hpp" namespace godot { Skin::___method_bindings Skin::___mb = {}; void Skin::___init_method_bindings() { ___mb.mb_add_bind = godot::api->godot_method_bind_get...
2,402
981
// Copyright 2016 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 <stdint.h> #include "base/bind.h" #include "base/logging.h" #include "base/single_thread_task_runner.h" #include "base/synchronization/waitable_...
17,763
6,224
#include "TerrainBrush.h" #include "../Kernel/Gateway.h" #include "../Geometry/Ray3D.h" #include "../Factories/TerrainVisuals.h" #include "../Factories/TerrainPasture.h" #include "../Factories/TerrainLogic.h" #include "../Factories/WorldVisuals.h" #include "../Factories/Meadow.h" #include "../Factories/Water....
25,545
8,929
#ifndef _DEF_IDEMO_HPP #define _DEF_IDEMO_HPP #include "src/Omgl3D.hpp" #include <SFML/Window.hpp> class IDemo { public: IDemo() : width_screen(800), height_screen(600), running(true) { } virtual ~IDemo() {} virtual void yourEvent(float elapsedtime, const sf::Event & event) {} void events(float elapsedt...
3,139
1,092
// ============================================================================ // Copyright (c) 2011-2012 J.C. Moyer // // 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...
3,765
1,207
#include "MeanNormalLikelihood.h" // MeanNormalLikelihood::MeanNormalLikelihood() // // PURPOSE: // Derived class onstructor. // // INPUT: // observations: array containing the dependent variable values // uncertainties: array containing the uncertainties of the observations // model: object spe...
2,738
870
/****************************************************************************/ // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo // Copyright (C) 2001-2020 German Aerospace Center (DLR) and others. // This program and the accompanying materials are made available under the // terms of the Ecli...
14,678
4,245
#include<iostream> using namespace std; int main(){ int mat[3][3], i, j; float determinant = 0; cout<<"Enter elements of matrix row wise:\n"; for(i = 0; i < 3; i++) for(j = 0; j < 3; j++) cin>>mat[i][j]; printf("\nGiven matrix is:"); for(i = 0; i < 3; i++){ cout<<"\n"; for(j = 0; j < 3; j++) cout<<mat[i][j...
771
407
// T3ModulesOutputDlg.cpp : implementation file // #include "stdafx.h" #include "T3000.h" #include "T3ModulesOutputDlg.h" #include "afxdialogex.h" #include "global_function.h" // CT3ModulesOutputDlg dialog DWORD WINAPI _ReadMultiRegisters_T3_Output(LPVOID pParam) { CT3ModulesOutputDlg* pFrame=(CT3ModulesOutputD...
32,877
13,041
#ifndef __FadalightMesh_PatchInfo_h #define __FadalightMesh_PatchInfo_h #include "Alat/vector.hpp" #include "Alat/armadillo.hpp" /*--------------------------------------------------------------------------*/ namespace FadalightMesh { class PatchInfo { public: ~PatchInfo(); PatchInfo(); PatchInfo( const PatchI...
693
224
// // Mat4x4.h // DataStructures // // Created by James Landess on 11/11/16. // Copyright (c) 2016 James Landess. All rights reserved. // #ifndef DataStructures_Mat4x4_h #define DataStructures_Mat4x4_h #include "StaticArray.hpp" #include "Vec4.hpp" #include "Mat2x4.hpp" #include "Mat3x4.hpp" #include "Mat4x3.hpp"...
30,358
12,902
// Copyright (c) 2019 Álvaro Ceballos // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt #ifndef CYNODELIC_METAFLAGS_TEST_PARSER_DEFAULT_PARAMETERS_EXTRA_ARGS_IN_BETWEEN_HPP #define CYNODELIC_METAFLAGS_TEST_PARSER_DEFAULT_PARAM...
5,614
2,957
/* Source File : Trace.cpp Copyright 2011 Gal Kahana PDFWriter 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...
2,242
916
/*************************************************************************** * Copyright (C) by GFZ Potsdam * * * * You can redistribute and/or modify this program under the * * terms o...
17,796
8,491
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/mgn/model/IdentificationHints.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { names...
2,158
848
#ifndef WPP_VILL_RUNTIME_H #define WPP_VILL_RUNTIME_H #include <vector> #include "wlexer.hpp" #include "werr.hpp" #include "errors.hpp" using namespace wpp; using namespace wpp::how; namespace mill{ struct vill_type { typedef unsigned char int_u8; typedef unsigned short int_u16; typedef unsigned int int_u32; ...
2,041
989
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holdi...
3,257
1,105
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file contains stubs for some Chrome for Android specific code that is // needed to compile some tests. #include "chrome/browser/android/tab_a...
529
162
#include "JWModules.hpp" RACK_PLUGIN_MODEL_DECLARE(JW_Modules, BlankPanelSmall); RACK_PLUGIN_MODEL_DECLARE(JW_Modules, BlankPanelMedium); RACK_PLUGIN_MODEL_DECLARE(JW_Modules, BlankPanelLarge); RACK_PLUGIN_MODEL_DECLARE(JW_Modules, Cat); RACK_PLUGIN_MODEL_DECLARE(JW_Modules, BouncyBalls); RACK_PLUGIN_MODEL_DECLARE(JW_...
1,565
774
#pragma once #ifndef GEODE_CACHEABLEBUILTINS_H_ #define GEODE_CACHEABLEBUILTINS_H_ /* * 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 license...
27,534
8,062
/* * This source file is part of ArkGameFrame * For the latest info, see https://github.com/ArkGame * * Copyright (c) 2013-2018 ArkGame 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 ...
3,887
1,210
/* * Copyright (C) 2018 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...
28,079
10,976
// Copyright (C) 2022 Frank E. Curtis // // This code is published under the MIT License. // // Author(s) : Frank E. Curtis #include "testPoint.hpp" // Main function int main() { return testPointImplementation(1); }
220
79
#include "UI_Clock.h" #include "j1App.h" #include "j1Render.h" #include "j1Gui.h" #include "Brofiler\Brofiler.h" void Clock::setStartValue(int new_start_value) { start_value = new_start_value; } void Clock::setAlarm(int alarm) { alarms.push_back(alarm); } void Clock::restartChrono() { switch (this->type) { cas...
1,500
698
#include <Box3D/Renderer/TextureBuffer.hpp> namespace box3d { TextureBuffer::TextureBuffer() { glGenTextures(1, &this->m_rendererID); glBindTexture(GL_TEXTURE_2D, this->m_rendererID); } TextureBuffer::~TextureBuffer() { } void TextureBuffer::createTexImage2D(box3d::Appli...
899
344
#ifndef BOOST_GRAPH_DETAIL_EMPTY_HEADER_HPP_INCLUDED #define BOOST_GRAPH_DETAIL_EMPTY_HEADER_HPP_INCLUDED // Copyright 2018 Peter Dimov // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0 (See accompanying file // LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0...
393
180
// Copyright David Abrahams 2002. Permission to copy, use, // modify, sell and distribute this software is granted provided this // copyright notice appears in all copies. This software is provided // "as is" without express or implied warranty, and with no claim as // to its suitability for any purpose. #ifndef INHERI...
4,459
1,465
#include <fstream> #include <sstream> #include <filesystem> #include <string> #include <algorithm> #include <vector> #include "backTracking/TOP_Backtracking.hpp" #include "greedy/GreedyPaths.hpp" using namespace std; namespace fs = std::filesystem; /** * Struct that represent Chao's results */ stru...
9,694
2,911
// -*- mode: c++; indent-tabs-mode: nil; -*- // // Copyright (c) 2009-2013 Illumina, Inc. // // This software is provided under the terms and conditions of the // Illumina Open Source Software License 1. // // You should have received a copy of the Illumina Open Source // Software License 1 along with this program. If ...
3,214
1,140
#ifndef RADIUMENGINE_RENDERTECHNIQUE_HPP #define RADIUMENGINE_RENDERTECHNIQUE_HPP #include <Engine/RaEngine.hpp> #include <Engine/Renderer/RenderTechnique/ShaderConfiguration.hpp> #include <memory> #include <map> #include <functional> namespace Ra { namespace Engine { class ShaderProgram; ...
7,791
2,019
/*ckwg +29 * Copyright 2016 by Kitware, 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: * * * Redistributions of source code must retain the above copyright notice, * this list of...
8,269
2,507
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../../include/fpdfapi/fpdf_render.h" #include "../../../include/...
54,166
19,762
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #include <sstream> #include <limits> #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" #include...
3,091
1,123
#include "shm_sem.h" #include <errno.h> #include <sys/mman.h> #include <sys/types.h> #include <unistd.h> #include <cstdio> #include <cstdlib> #include <iostream> const std::string ShmSemaphore::sLockSemaphoreName = "/semaphoreInit"; ShmSemaphore::ShmSemaphore(const std::string& sName) : name_(sName), ptr_(nullp...
3,191
1,152
/* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundat...
13,543
4,125
#define EIGEN_USE_THREADS #include "tensorflow/core/kernels/training_ops.h" #include "tensorflow/core/framework/op_kernel.h" namespace tensorflow { typedef Eigen::ThreadPoolDevice CPUDevice; typedef Eigen::GpuDevice GPUDevice; namespace functor { static inline bool DoInline(int64 size) { return size <= (256ll << ...
35,105
11,304
/* $NoKeywords: $ */ /* // // Copyright (c) 1993-2007 Robert McNeel & Associates. All rights reserved. // Rhinoceros is a registered trademark of Robert McNeel & Assoicates. // // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND O...
4,487
2,072
#include <iostream> #include <stdlib.h> #include <math.h> using namespace std; int result_array[] = {0,0,1,4,6,8,9,7,2,13,12}; int array[] = {1,2,3,4,5,6}; int elements = 6; int merge_sort(int inArray[], int total_elements, bool count_inversion) { int inversion = 0; if (total_elements <= 1 ) { return 1...
1,731
719
// ControlWnd.cpp - A window for containing camera controls. #include <wx/panel.h> #include <wx/choice.h> #include <wx/checkbox.h> #include <wx/slider.h> #include <wx/spinctrl.h> #include <wx/stattext.h> #include <libcamera/controls.h> #include <libcamera/control_ids.h> #include "ControlWnd.h" BEGIN_EVENT_TABLE(Cont...
22,412
8,559
#include <pybind11/pybind11.h> #include "structures/typedefs.h" namespace py = pybind11; void init_enums(py::module_ &m) { py::enum_<vroom::ROUTER>(m, "ROUTER") .value("OSRM", vroom::ROUTER::OSRM) .value("LIBOSRM", vroom::ROUTER::LIBOSRM) .value("ORS", vroom::ROUTER::ORS) .value("VALHALLA"...
1,830
790
/* Copyright 2021, Gurobi Optimization, LLC */ /* This example reads an LP model from a file and solves it. If the model is infeasible or unbounded, the example turns off presolve and solves the model again. If the model is infeasible, the example computes an Irreducible Inconsistent Subsystem (IIS), and w...
1,585
551
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "objectdumper.h" #include <vespa/vespalib/util/stringfmt.h> namespace vespalib { void ObjectDumper::addIndent() { int n = _currIndent; if (n < 0) { n = 0; } _str.append(vespalib::s...
2,002
746
/* Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved. 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 us...
3,157
1,056
/* ** Copyright 2011-2013 Centreon ** ** 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 t...
1,789
601
#pragma once #include <nall/traits.hpp> #undef min #undef max namespace nall { namespace { template<typename T, typename U> auto min(const T& t, const U& u) -> T { return t < u ? t : u; } template<typename T, typename U, typename... P> auto min(const T& t, const U& u, P&&... p) -> T { return t < u ? min(t, for...
640
262
#pragma once #include <cmath> namespace TurtleGraphics { constexpr float float_epsilon = 0.001f; constexpr float double_epsilon = 0.00001f; inline bool ApproxEqual(const float a, const float b) { return fabs(a - b) < float_epsilon; } inline bool ApproxEqual(const double a, const double b) { r...
653
243
//========= Copyright Bernt Andreas Eide, All rights reserved. ============// // // Purpose: MP44 / STG44 // //=============================================================================// #include "cbase.h" #include "basehlcombatweapon.h" #include "NPCevent.h" #include "basecombatcharacter.h" #include "AI_BaseNPC.h...
10,582
4,598
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "DemoPage.h" #include <VGUI/IVGui.h> #include <vgui_controls/Controls.h> #include <Keyvalues.h> #include <vgui_co...
4,488
1,202
# /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0...
4,004
1,760
// Generated by Haxe 4.1.5 #include <hxcpp.h> #ifndef INCLUDED___ASSET__flixel_flixel_ui_img_finger_small_png #include <__ASSET__flixel_flixel_ui_img_finger_small_png.h> #endif #ifndef INCLUDED_haxe_Resource #include <haxe/Resource.h> #endif #ifndef INCLUDED_haxe_io_Bytes #include <haxe/io/Bytes.h> #endif #ifndef INCL...
7,226
3,236
/* 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...
1,858
616
#if !defined(SIP0X_PARSER_TOKENSIPVERSION_HPP__) #define SIP0X_PARSER_TOKENSIPVERSION_HPP__ #include "parser/tokens/TokenAbstract.hpp" #include "parser/tokens/Operators.hpp" #include "parser/tokens/Token.hpp" #include "parser/tokens/TokenRegex.hpp" #include "parser/factory/FactoryContextSIPVersion.hpp" namespace sip...
1,151
393
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
6,194
2,042
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n; cin >> n; vector<ll> v1, v2; ll sum = n * (n + 1) / 2; if (sum % 2 != 0) { cout << "NO" << endl; return 0; } sum /= 2; for (int i = n; i > 0; i--) { if (sum - i >= 0) { ...
636
263
/* // Copyright (c) 2018 Intel Corporation // // 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...
2,156
769
#include "stdafx.h" #include "ParticleBurst.hpp" #include "Math.hpp" #include "Game.hpp" #include "Function.hpp" #include "Events.hpp" #include "Sfx.hpp" #include "ScreenManager.hpp" #include "Map.hpp" #include "stdlib.hpp" struct ParticleBurst_Item { FP field_0_x; FP field_4_y; FP field_8_z; FP field_...
15,456
5,667
#ifndef RINGBUFFER_H # define RINGBUFFER_H # include <cstdint> # include <memory> # include <cstring> # include "ASocket.hpp" namespace Network { class RingBuffer { public: RingBuffer(size_t size = 4096); virtual ~RingBuffer() = default; void writeBuffer(const Network::Buffer& data); void readBuffer(Networ...
854
345
/** * Created by Joscha Vack on 12/9/2019. * **/ #include "GlobalDefinitions.h" TS3Functions ts3Functions; char* pluginID = nullptr; ServerList serverList {};
166
69
#ifdef PEGASUS_OS_SOLARIS #ifndef __UNIX_PACKAGEINCONNECTOR_PRIVATE_H #define __UNIX_PACKAGEINCONNECTOR_PRIVATE_H #endif #endif
134
72
#include "problem1.h" #include <iostream> void problem1BruteForce(long upperLimit) { printf("Problem 1 - Brute Force\n"); int multiplesOf3And5Count = 0; for (int i = 0; i < upperLimit; i++) { if (i % 3 == 0 || i % 5 == 0) { multiplesOf3And5Count += i; } } printf("Multiples of 3 and 5 below %ld = %d...
986
400
#include<bits/stdc++.h> using namespace std; int findset(vector<int> &subset,int u) { if(subset[u] == -1) return u; subset[u] = findset(subset,subset[u]); return subset[u]; } void kruskal(vector<pair<int,pair<int,int> > > edge,int V) { vector<int> subset(V,-1); vector<pair<int,pair<int,int> > > MST; sort(edge...
911
467
/* Copyright (c) 2007, 2015, 2017, 2019-2021, Arvid Norberg All rights reserved. You may use, distribute and modify this code under the terms of the BSD license, see LICENSE file. */ #include "libtorrent/aux_/session_settings.hpp" #include "libtorrent/settings_pack.hpp" #include <functional> namespace libtorrent {...
921
358
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; /* 题目: 替换空格 请实现一个函数,把字符串中的每个空格替换成“%20”, 例如,输入”We are happy.”,则输出”We%20are%20happy.”。 */ char *replace_spaces(const char *src, size_t slen) { char *desc = NULL; size_t count = 0; size_t j = 0; //malloc...
1,125
474
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2010-2013, Image Engine Design 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: // // ...
6,324
2,274
// 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 "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/...
12,441
4,883
#include "Etterna/Globals/global.h" #include "Crash.h" #include "Core/Services/Locator.hpp" #include "Core/Platform/Platform.hpp" #include "Core/Misc/AppInfo.hpp" #include <CoreServices/CoreServices.h> #include <sys/types.h> #include <fmt/format.h> #if defined(HAVE_UNISTD_H) #include <unistd.h> #endif #include <sys/sys...
4,988
1,795
#include <CGeomLight3D.h> #include <CGeometry3D.h> #include <CGeomZBuffer.h> #include <CGeomPyramid3D.h> #include <CImageMgr.h> #include "images/Sun.h" CGeomLight3DMgr:: CGeomLight3DMgr() { } void CGeomLight3DMgr:: addLight(CGeomLight3D *light) { lights_.push_back(light); light->setMgr(this); } void CGeomLight...
5,855
2,314
// // main.cpp // Fast Fibonacci // // Created by MacBook on 02/05/17. // Copyright © 2017 Bruno Botelho. All rights reserved. // #include <stdio.h> #include <math.h> int main(int argc, const char * argv[]) { // insert code here... int n; double result; scanf("%d",&n); result= pow(((...
461
202
/* * @Description: GNSS 坐标做观测时使用的先验边 * @Author: Ren Qian * @Date: 2020-03-01 18:05:35 */ #ifndef LIDAR_LOCALIZATION_MODELS_GRAPH_OPTIMIZER_G2O_EDGE_EDGE_SE3_PRIORXYZ_HPP_ #define LIDAR_LOCALIZATION_MODELS_GRAPH_OPTIMIZER_G2O_EDGE_EDGE_SE3_PRIORXYZ_HPP_ #include <g2o/types/slam3d/types_slam3d.h> #include <g2o/types...
1,626
767
// Copyright 2016-2021 Doug Moen // Licensed under the Apache License, version 2.0 // See accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0 #include <libcurv/program.h> #include <libcurv/analyser.h> #include <libcurv/builtin.h> #include <libcurv/context.h> #include <libcurv/definition.h> #inclu...
2,834
971
#include <set> #include <queue> #include <string> #include <vector> #include <cstdio> #include <cstdlib> #include <cstring> #include <climits> #include <iostream> #include <map> #include <cmath> #include <algorithm> using namespace std; #define pr(x) //(cout << #x << ' ' << x << ' ') #define prln(x) //(cout << #x << '...
956
371
/* * Copyright 2006-2008 The FLWOR Foundation. * * 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...
2,391
823
#include "stdafx.h" #include "PostprocessAnimator.h" #include "../xrEngine/effectorPP.h" #include "../xrEngine/ObjectAnimator.h" #include "object_broker.h" #include "Actor.h" void GAME_API AddEffector(CActor* A, int type, const shared_str& sect_name) { bool bCyclic = false; if (pSettings->line_exist(sect_name, "pp_...
13,202
6,187
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "miner.h" #include "amount.h" #include "chainparams.h" #include "consen...
17,470
5,423
/* @@@LICENSE * * Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P. * * 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 * * Unl...
59,522
24,695
//#include <afx.h> #include <R.h> //#include <windows.h> #include <stdlib.h> #include <stdio.h> #include <string> #include <math.h> #include "MyUtils.h" #include "Tableau.h" #define AUG_COST -1000000.00 #define LEEWAY ((double) 0.00001) #define LINE_LEN 1024 #define MAX_SOL 50.00 float SolFactor[3] = // Index...
30,109
14,206
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, i...
78,451
23,422
/****************************************************************************** * * @file: discrete_function.hpp * * @date: 12/06/2012 01:39:53 PM (CET) * * @author: Marco Müller <muelma@gmail.com> * ******************************************************************************/ #pragma once #include <vector> ...
8,951
2,754
#include "Simulation.h" #include "OrderParameterRegistry.h" Simulation::Simulation( const std::string& data_set_label, const double t_min, const double t_max, const double temperature, const bool use_floored_times, const OrderParameterRegistry& op_registry ): data_set_label_(data_set_label), t_min_(t_min), t_ma...
2,922
1,093
/* MIT License Copyright (c) 2019 Bart Bilos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dis...
5,246
2,007
/* * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> * * 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...
17,471
5,394
#include <gtest/gtest.h> #include <math.h> #include <string> #include <src/autodiff/base_functor.hpp> #include <src/scalar/functions.hpp> #include <src/scalar/operators.hpp> #include <src/test/io_validation.hpp> #include <src/test/finite_difference.hpp> template <typename T> class operator_unary_not_eval_func: publi...
776
314
/* LICENSE: BEGIN =============================================================================== @author Shan Anand @email anand.gs@gmail.com @source https://github.com/shan-anand @brief HTTP library implementation in C++ =============================================================================== MIT License Copy...
4,080
1,242
/* * Copyright © 2012 Google, Inc. * * This is part of HarfBuzz, a text shaping library. * * Permission is hereby granted, without written agreement and without * license or royalty fees, to use, copy, modify, and distribute this * software and its documentation for any purpose, provided that the * above copy...
11,450
4,620
/* * F81Handler.cpp * * Created on: 2014/07/21 * Author: MattLech */ #include "F81Handler.h" static F81Handler* instance; F81Handler * F81Handler::getInstance() { if (!instance) { instance = new F81Handler(); }; return instance; } ; F81Handler::F81Handler() { } ...
889
317
// Initialize the storage of the list box to be 256 strings with // about 10 characters per string, performance improvement. int n = m_myListBox.InitStorage(256, 16 * sizeof(TCHAR)); ASSERT(n != LB_ERRSPACE); // Add 256 items to the list box. CString str; for (int i = 0; i < 256; i++) { str.Format(_T("item string %...
362
139
// 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 may...
8,310
2,595
#ifndef BOOST_THREAD_RECURSIVE_MUTEX_HPP #define BOOST_THREAD_RECURSIVE_MUTEX_HPP // recursive_mutex.hpp // // (C) Copyright 2007 Anthony Williams // // 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)...
1,599
631
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sync/util/get_session_name.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/callback.h" #include "base/location.h" #...
3,782
1,238
#include <muduo/net/EventLoop.h> #include <muduo/net/EventLoopThread.h> #include <stdio.h> using namespace muduo; using namespace muduo::net; void runInThread() { printf("runInThread(): pid = %d, tid = %d\n", getpid(), CurrentThread::tid()); } int main() { printf("main(): pid = %d, tid = %d\n", ...
665
284
#include "insertion_sort.h" #include "gtest/gtest.h" TEST(InsertionSortTest, EmptyArray) { std::vector<int> arr; std::vector<int> result; insertion_sort(arr); EXPECT_EQ(result, arr); } TEST(InsertionSortTest, SingleElement) { std::vector<int> arr{1}; std::vector<int> result{1}; insertion_sort(arr); EX...
868
397