text
string
size
int64
token_count
int64
// // Created by weisler on 06/04/2021. // #include <iostream> #include "osm.h" #include <sys/time.h> /** * An empty function */ void empty_func() {} long get_nano(struct timeval t) { return ((t.tv_sec * 1000000 + t.tv_usec) * 1000); } double osm_operation_time(unsigned int iterations) { if (iterations == ...
2,193
821
/* Copyright 2019-2021 Canaan 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 t...
3,855
1,400
#include "main.h" const color_t COLOR_BLACK = { 52, 73, 94 }; const color_t COLOR_BACKGROUND = { 153, 235, 255 }; const color_t COLOR_BLUE = { 0, 138, 230 }; // const color_a COLOR_ABLUE = { 0, 138, 230, 0.3 }; const color_t COLOR_CUBE1 = { 128, 43, 0 }; const color_t COLOR_CUBE2 = { 204, 68, 0 }; const color_t COLOR_...
1,229
715
#pragma once #include <algorithm> #include <nonstd/optional.hpp> #include <nonstd/span.hpp> #include <nonstd/string_view.hpp> namespace cc_wrapper { namespace util { namespace detail { char *append(char *out, nonstd::string_view str); nonstd::string_view removeTrailing(nonstd::string_view path); } // namespace deta...
832
286
#include "myIterator.hpp" myIterator& myIterator::operator = (const myIterator &iter){ this->setPtr(iter.showPtr()); this->setDequePos(iter.showDequePos()); this->setBlockPos(iter.showBlockPos()); this->setMode(iter.showMode()); return (*this); } bool myIterator::operator == (const myIterator &ite...
2,003
651
// DirWalker project // Copyright 2013 Philippe Quesnel // Licensed under the Academic Free License version 3.0 #include <iostream> #include <dirent.h> #include <string> #include <list> using namespace std; class OneDir { public: OneDir() {} OneDir(const string& basePath, const string& name) { ...
3,835
1,252
--- src/util/system/system.cpp.orig 2021-02-12 11:50:56 UTC +++ src/util/system/system.cpp @@ -16,7 +16,7 @@ #include <fcntl.h> #include <unistd.h> #ifndef __APPLE__ - #ifdef __FreeBSD__ + #if defined(__FreeBSD__) || defined(__DragonFly__) #include <sys/types.h> #include <sys/sysctl.h> ...
894
424
/* Copyright (c) 2018 Inverse Palindrome Apophis - DroneSystem.cpp InversePalindrome.com */ #include "DroneSystem.hpp" #include "ObjectComponent.hpp" #include "SteeringBehaviors.hpp" #include "TransformComponent.hpp" DroneSystem::DroneSystem(entityx::EntityManager& entityManager, entityx::EventManager& eventManager...
4,503
1,185
/* -*-mode:c++; c-file-style: "gnu";-*- */ /* * $Id: CgiEnvironment.cpp,v 1.31 2017/06/22 20:26:35 sebdiaz Exp $ * * Copyright (C) 1996 - 2004 Stephen F. Booth <sbooth@gnu.org> * 2007 Sebastien DIAZ <sebastien.diaz@gmail.com> * Part of the GNU cgicc library, http://www.gnu.org/software/cgi...
11,238
4,128
#pragma once #include "cuda_graph.hpp" namespace tf { // ---------------------------------------------------------------------------- // for_each // ---------------------------------------------------------------------------- // Kernel: for_each template <typename I, typename F> __global__ void cuda_for_each(I firs...
2,534
857
#include <utility> #include "components/RenderableComponent.hpp" namespace obelisk { RenderableComponent::RenderableComponent(APG::SpriteBase *sprite) : sprite{sprite} { } RenderableComponent::RenderableComponent(APG::SpriteBase *sprite, APG::SpriteBase *secondary) : sprite{sprite}, secondary{secondary} { ca...
700
253
#include<bits/stdc++.h> using namespace std; class AdjMatrix { private: int v; int adj[10][10]; public: AdjMatrix(int); ~AdjMatrix(); void addPath(int,int); void print(); }; AdjMatrix::AdjMatrix(int v) { this->v = v; for(int i=0;i<v;i++) for(int j=0;j<v;j++) adj[i][...
842
372
#include "rawread.h" #include "rawreadutil.h" int main(int ac,char *av[]) { FM7RawDiskReadUtil::CommandParameterInfo cpmi; if(true!=cpmi.RecognizeCommandParameter(ac,av)) { printf("Usage:\n"); printf(" rawRead2D77 -?\n"); printf(" Show help.\n"); printf(" rawRead2D77 inputFileName.txt outputFileName.d...
648
248
#include "UnicodeStr.h" /// <summary> /// Given an item to replace it finds it in the requested translation table and replaces it. /// </summary> /// <param name="pTargetPosBegins">Index of the string to be replaced.</param> /// <param name="pTargetLength">Length of the string to be replaced.</param> /// <param name="...
5,788
2,439
#define CATCH_CONFIG_RUNNER #include "catch.hpp" int main( int argc, char* argv[] ) { #if defined( _WIN32 ) _CrtSetDbgFlag( _crtDbgFlag | _CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF ); #endif int result = Catch::Session().run( argc, argv ); return result; } ...
321
145
// Ivan Carvalho // Solution to https://www.urionlinejudge.com.br/judge/problems/view/1288 #include <unordered_map> #include <algorithm> #define MAXN 1010 using namespace std; typedef long long ll; ll n,s,casos,peso[MAXN],valor[MAXN],r,davez,condicional; unordered_map<ll,ll> tab[MAXN]; int knapsack(ll obj, ll aguenta){...
1,147
524
#include "MusicHandler.hpp" #include <SDL_image.h> #include <iostream> MusicHandler::MusicHandler() : GExL::TAssetHandler<Music>() { } MusicHandler::~MusicHandler() { } bool MusicHandler::LoadFromFile(const GExL::typeAssetID theAssetID, Music& theAsset) { bool anResult = false; std::string anFilname = GetFilename...
983
342
#include <string> #include <iostream> #include <sstream> #include <iterator> #include <fstream> #include <iomanip> #include <vector> #include <queue> #include <utility> #include <algorithm> #include <stdlib.h> #include <math.h> long long solution(const std::vector<std::vector<long long>> & sides, std::vector<long long...
2,300
866
/*! * \file Component.hpp * \brief Provides ECS component class */ #ifndef VLK_COMPONENT_HPP #define VLK_COMPONENT_HPP #include "ValkyrieEngine/AllocChunk.hpp" #include "ValkyrieEngine/IComponent.hpp" #include "ValkyrieEngine/Entity.hpp" #include <stdexcept> #include <type_traits> #include <unordered_map> #includ...
15,886
5,695
/* // Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a // component of the Texas A&M University System. // All rights reserved. // The information and source code contained herein is the exclusive // property of TEES and may not be disclosed, examined or reproduced // in whole or in part withou...
1,107
325
#include "stdafx.h" #include "Cls.h" namespace LiteCppDB_Console_Commands { DataAccess Cls::getAccess() noexcept { return DataAccess::None; } bool Cls::IsCommand(LiteCppDB::StringScanner& s) noexcept { return s.Scan("cls[[:s:]]*").length() > 0; } void Cls::Execute(LiteCppDB::LiteEngine engine, LiteCppDB::...
471
198
//Copyright ?2014 Sony Computer Entertainment America LLC. See License.txt. #include "stdafx.h" // These names conflict with the managed versions. #undef BROWSEINFO #undef HDITEM // Couldn't get this fully working. I'll make the necessary types public instead. --Ron //// This 'using' is because of an annoying C++/C...
40,194
16,848
#include "stdafx.h" #include "LafsFlat.h" #include "FormattingException.h" #include <Windows.h> #include <sstream> #include <fstream> using namespace DarkOsFormat; const unsigned int LafsFlat::LAFS_NAME_SIZE = 6; const unsigned int LafsFlat::LAFS_ENTRIES_PER_FLAT = 128; const unsigned int LafsFlat::LAFS_JUMP_MAXLEN...
6,359
2,600
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Test of bates model constructor from bates process */ #include <iostream> #include <iomanip> #include "utilities.hpp" #include <ql/quantlib.hpp> #ifdef BOOST_MSVC /* Uncomment the following lines to unmask floating-point exceptions....
1,885
684
#define entity 16053E8; #define X 0x50; #define Y 0x54; #define Z 0x58;
71
43
#pragma once #include "AL/Common.hpp" #include <iterator> namespace AL::Collections { template<typename T> class ForwardIterator { public: typedef T* pointer; typedef T& reference; typedef T value_type; typedef std::ptrdiff_t ...
3,217
1,058
// normal_distribution #include <iostream> #include <random> using namespace std; int main() { const int nrolls=120; // number of experiments const int nstars=100; // maximum number of stars to distribute std::default_random_engine generator; std::normal_distribution<double> distribution(0.05,0.02); in...
500
178
// Copyright (c) 2021 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special ...
1,686
516
#pragma once #include "PathFinderAgent.hpp" #include "CollapsibleSearchNode.hpp" namespace aima::path_finder { class RecursiveBestFirstAgent final : public PathFinderAgent { public: std::unique_ptr<core::Agent> clone() const override; std::shared_ptr<const SearchNode> getPlan() const override...
1,116
254
/****************************************************************************************************************/ /* */ /* OpenNN: Open Neural Networks Library ...
6,717
2,174
#ifndef WKB_HPP_ #define WKB_HPP_ #include "core.hpp" #define POLYGON_TYPE 3 #define LINESTRING_TYPE 2 namespace HiGIS::IO { Core::GeoType ReadWkb(Core::GeoBuffer &out, uint8_t *source, int type); int ReadWkbType(uint8_t *source); Core::GeoType GetGeoType(int code); } // namespace HiGIS::IO #endif // WKB_HPP_
317
140
#include "render.h" SDL_Window* gWindow = NULL; SDL_Renderer* gRenderer = NULL; std::map<int, SDL_Texture*> textureMap; std::map<int, TTF_Font*> fontMap; std::map<int, Mix_Music*> musicMap; std::map<int, Mix_Chunk*> soundMap; int tcnt = 0, fcnt = 0, mcnt = 0, scnt = 0; std::vector<Napi::ThreadSafeFunction> keyEvent...
9,747
4,049
// Copyright 2018 The Abseil 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
2,215
820
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
1,071
366
// (C) Copyright Matt Borland 2022. // Use, modification and distribution are subject to 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) #include <vector> #include <benchmark/benchmark.h> #include <boost/math/special_functions/l...
1,221
454
#include "SendingCommand.hpp" #include <sw/redis++/redis++.h> #include "../Modules/GeneralMessageTranslator.hpp" #include "TurretCommand.pb.h" namespace Icarus { using namespace Gaia::BehaviorTree; void SendingCommand::OnInitialize() { InitializeFacilities(); auto connection = GetBlackboar...
1,933
577
// Copyright (c) 2013-2018 mogemimi. Distributed under the MIT license. #pragma once #include "detail/TemporalAction.hpp" #include "Pomdog.Experimental/Gameplay/Entity.hpp" #include "Pomdog.Experimental/Gameplay2D/Transform.hpp" #include "Pomdog/Math/Vector3.hpp" #include "Pomdog/Utility/Assert.hpp" namespace Pomdog...
1,305
419
#include <iostream> #include <fstream> #include <string> #include <vector> #include <unordered_map> #include <cstdlib> #include "scanner_lexer.hpp" #include "scanner.hpp" #include "exception.hpp" namespace kp19pp{ namespace scanner{ namespace semantic_action{ typedef scanner_type::token_type to...
9,227
2,798
#pragma once #include "Camera.h" #define UNREFERENCED_PARAMETER(P) (P) using namespace glm; namespace AlphonsoGraphicsEngine { const float Camera::DefaultFieldOfView = 45.0f; const float Camera::DefaultNearPlaneDistance = 0.1f; const float Camera::DefaultFarPlaneDistance = 10.0f; Camera::Camera(RendererC& rende...
2,882
1,139
//================================================================================================== /*! Copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //====================================...
1,131
409
#include <iostream> #include <iomanip> #include <sstream> #include <pybuildinfoexample.hpp> int main(){ using namespace std; using namespace pybuildinfo; int width = 32; cout << left; cout << setw(width) << "vcs::name" << vcs::name << endl; cout << setw(width) << "vcs::revision" << vcs::revis...
2,506
880
// // GMeshEdgeNormalDynamic.cpp // // Created by David Coen on 2011 03 30 // Copyright 2010 Pleasure seeking morons. All rights reserved. // #include "GMeshEdgeNormalDynamic.h" //constructor GMeshEdgeNormalDynamic::GMeshEdgeNormalDynamic( const int in_vertexIndex0, const int in_vertexIndex1, const int in_verte...
510
200
// 22/06/07 = Tue // 18/12/26 = Wed // 88. Merge Sorted Array [Easy] // You are given two integer arrays nums1 and nums2, sorted in non-decreasing // order, and two integers m and n, representing the number of elements in nums1 // and nums2 respectively. // Merge nums1 and nums2 into a single array sorted in non-dec...
2,464
952
/* * Copyright 2015 Erik Van Hamme * * 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 ...
1,281
435
#ifndef SELDON_WITH_BLAS #define SELDON_WITH_BLAS #endif #ifndef SELDON_WITH_LAPACK #define SELDON_WITH_LAPACK #endif #include "SeldonHeader.hxx" #ifndef SELDON_WITH_COMPILED_LIBRARY #include "vector/Vector.cxx" #include "matrix/Matrix_Base.cxx" #include "matrix/Matrix_Pointers.cxx" #include "matrix/Matrix_Symmetric....
11,619
4,027
/* * Copyright 2018-2021 Membrane Software <author@membranesoftware.com> https://membranesoftware.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 must retain the above copyright...
12,342
4,345
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistic...
1,442
714
#include "OscillatorDPW.h" OscillatorDPW::OscillatorDPW(): Oscillator() { AudioOut = new AudioNodeOutput(this, &_osc); _acc = 0; _f0 = 1; // we should not divide by zero!!!! _fs = (int64_t(48000) << 32); // placeholder until the below works // bitshift up with 32 then divide by 4, is the same as bitshifting up wit...
967
482
#include "AtIncludes.h" #include "AtMem.h" // The below global objects MUST be initialized before code that may call the allocation functions in AtMem.h #pragma warning (push) #pragma warning (disable: 4073) // L3: initializers put in library initialization area #pragma init_seg (lib) #pragma warning (pop) ...
527
190
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { int x, y, n, num; while(cin >> n && n != 0) { x = 0; y = 0; for(; n > 0; n--){ cin >> num; if(num == 0) x++; else ...
462
168
// Console.cxx // implementation of VConsole // NOTE: this is OS-sensitive // Logical windows: // top half: Franci // bottom half: user // 1st line of bottom half: user name // 1st line of top half, or title bar: Franci // headers #include "console.hpp" // to be initialized by the application Consol...
35,772
14,415
/// Linear transformation of the wave-functions. /** The transformation matrix is expected in the CPU memory. */ template <typename T> inline void transform(device_t pu__, int ispn__, double alpha__, ...
21,089
6,877
/** This is free and unencumbered software released into the public domain. The authors of ISIS do not claim copyright on the contents of this file. For more details about the LICENSE terms and the AUTHORS, you will find files of those names at the top level of this repository. **/ /* SPDX-License-Identifier: CC0-1.0 ...
5,376
1,723
#include "Window.h" /* Constructs a new Window with the defined properties */ Window::Window(int width, int height, const char* title) { // Init GLFW if (!glfwInit()) { cout << "Failed to initialize GLFW" << endl; return; } // Set all the required options for GLFW glfwWindowHint(GLFW_CONTEXT_VERSI...
3,046
1,085
#include "CurvesEditor.h" #define WIDTH 800 #define HEIGHT 600 #define CURVE_SIZE 20.0 //Atributos janela int RESIZED_WIDTH = WIDTH; int RESIZED_HEIGHT = HEIGHT; bool keys[1024]; GLuint pointsVAO, centralCurveVAO, internalCurveVAO, externalCurveVAO; GLuint pointsVBO, centralCurveVBO, internalCurveVBO, externalCurve...
17,229
6,178
#include <bits/stdc++.h> using namespace std; string str, res; int resNum = -1; unordered_map<string, int> counts; int main() { getline(cin, str); int j = 0; for (int i = 0; i < str.size(); i = j) { j = i; string word = ""; while (j < str.size() && ((str[j] >= 'A' && str[j] <= '...
972
376
#include <cstdio> #include <iostream> #include <cstring> #include <string> using namespace std; int main() { int loan_duration , number_of_depriciation_recorded; double down_payment , initial_loan; while(scanf("%d %lf %lf %d", &loan_duration , & down_payment , &initial_loan , &number_of_depriciation_...
1,737
552
/* * Copyright (C) 2009 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...
2,880
1,118
/////////////////////////////////////////////////////////////////////////////// /// /// \file IntegrateDimension.cpp /// \author Paul Ullrich /// \version December 26th, 2020 /// /// <remarks> /// Copyright 2020 Paul Ullrich /// /// This file is distributed as part of the Tempest source code package. /// Permiss...
30,654
13,551
// Copyright Carl Philipp Reh 2009 - 2021. // 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) #ifndef FCPPT_CONTAINER_GRID_IN_RANGE_HPP_INCLUDED #define FCPPT_CONTAINER_GRID_IN_RANGE_HPP_INCLUD...
1,054
413
// -*- C++ -*- // Copyright (C) Dmitry Igrishin // For conditions of distribution and use, see files LICENSE.txt or util.hpp #ifndef DMITIGR_UTIL_DEBUG_HPP #define DMITIGR_UTIL_DEBUG_HPP #include "dmitigr/util/macros.hpp" #include <cstdio> #include <stdexcept> namespace dmitigr { /** * @brief The debug mode indic...
3,844
1,373
// // main.cpp // string_playing // // Rev: 1 // Created by Jonathan Reiter on 6/8/16. // Copyright © 2016 Jonathan Reiter. All rights reserved. // #include <iostream> #include <cstring> #define STRMAX 300 using namespace std; int main() { //char s[20]; char str[STRMAX]; char name[100]; cha...
1,074
426
#include "anim3/WxStageCanvas.h" #ifdef MODULE_ANIM3 #include "anim3/WxStagePage.h" #include "frame/WxStagePage.h" #include <ee0/WxStagePage.h> #include <ee0/SubjectMgr.h> #include <model/Model.h> #include <node0/SceneNode.h> #include <node3/CompModel.h> #include <node3/CompModelInst.h> #include <node3/RenderSyste...
2,042
810
// CG:SHOP 2021 Coordinated Motion Planning - Shadoks Team // // Elementary classes // /** * MIT License * * Copyright (c) 2020 Guilherme Dias da Fonseca <gfonsecabr@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (...
5,684
2,228
#include <gtest/gtest.h> #include <pheromones/UserCallRequestDTO.h> class UserCallRequestDTOFixture : public testing::Test { public: static constexpr UserCallTargetDTO gc_src = UserCallTargetDTO::BUZZ; static constexpr UserCallTargetDTO gc_dest = UserCallTargetDTO::BUZZ; UserCallRequestDTO* m_request; ...
2,076
731
#include <qtcomponents.h> N::ScrollArea :: ScrollArea ( QWidget * parent , Plan * p ) : QScrollArea ( parent ) , VirtualGui ( this , p ) { addIntoWidget ( parent , this ) ; setAttribute ( Qt::WA_InputMethodEnabled ) ; addCon...
720
204
/* * BearLibTerminal * Copyright (C) 2013-2016 Cfyz * * 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...
11,052
5,021
// File: ./src/wrapDictDataInfo.cpp // Date: 2018-01-10 // #include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <string> #include <vector> #include "DataInfo.h" #include "DictObjCont.h" #include "DictDataInfo.h" namespace py = pybind11; using namespace pybind11::literals; #ifndef BINDER_PYBIND11_TYPE_CAS...
2,003
721
#include <bits/stdc++.h> using namespace std; #define ll long long //tag: gcd();, find a divisor that divides n-1 number in an array; ll prefix[1000005], suffix[1000005]; int main(){ int n; cin>>n; ll arr[n]; for(int i=0;i<n;i++) cin>>arr[i]; if(n==1) { cout<<arr[0]+1<<endl; return 0; } for(int ...
665
373
#include "hwtimer.h" bool ALWAYS_INLINE IS_ADVANCED(volatile TIM_t *t) { return t == &TIM1 || t == &TIM8; } void HwTimer::init(uint16_t period_, uint16_t prescaler) const { if (tim == &TIM1) { RCC.APB2ENR |= (1 << 11); // TIM1 enable RCC.APB2RSTR = (1 << 11); // TIM1 reset RCC.APB2RST...
2,854
1,200
//============================================================================== #include "CEvent.h" //============================================================================== CEvent::CEvent() { } //------------------------------------------------------------------------------ CEvent::~CEvent() { //Do...
7,441
2,609
/***************************************************************************** * * util.cpp - Shared stuff that operates on all classes * *****************************************************************************/ #include "priv.h" #include "util.h" HINSTANCE g_hinst; /* My instance h...
557
177
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include "class-internals.h" #include "codegen/il2cpp-codegen.h" extern const Il2CppGenericMethodF...
596,867
333,852
#ifndef NV_MEMORY_INPUT_STREAM_H #define NV_MEMORY_INPUT_STREAM_H #include <cstdio> #include <string> namespace nv_test { class MemoryInputStream { MemoryInputStream(MemoryInputStream const & other) = delete; MemoryInputStream& operator=(MemoryInputStream const & other) = delete; public: MemoryInputStrea...
539
168
#include "visualization/visualizer.h" #include "mesh.h" #include "cfd_components.h" #include "graphics/assets/model.h" #include "graphics/assets/assets.h" #include "graphics/rhi/draw.h" #include "components/transform.h" #include "ecs/ecs.h" #include "core/time.h" #include "cfd_ids.h" #include "core/math/vec3.h" #inclu...
6,048
2,065
#include <Poco/Clock.h> #include <Poco/Error.h> #include <Poco/Exception.h> #include <Poco/Logger.h> #include <Poco/Thread.h> #include <Poco/Net/NetException.h> #include "di/Injectable.h" #include "net/MosquittoClient.h" BEEEON_OBJECT_BEGIN(BeeeOn, MosquittoClient) BEEEON_OBJECT_CASTABLE(StoppableRunnable) BEEEON_OBJ...
5,883
2,275
/****************************************************************************** * Copyright (c) 2016 Sergey Alexandrov * * 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 restricti...
5,420
1,867
// // Created by Robin Scheibler // Copyright (c) 2018 Robin Scheibler. All rights reserved. // #include "biquad.h" Biquad::Biquad(float *_b, float *_a) { registers[0] = registers[1] = 0; for (int i = 0 ; i < 3 ; i++) b[i] = _b[i]; for (int i = 0 ; i < 2 ; i++) a[i] = _a[i]; } float Biquad::process(f...
533
232
/* edid.hpp Copyright (c) 04 Yann BOUCHER (yann) 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,...
1,815
665
#include "map/guides_on_map_delegate.hpp" GuidesOnMapDelegate::GuidesOnMapDelegate( std::shared_ptr<CatalogHeadersProvider> const & headersProvider) : m_headersProvider(headersProvider) { } platform::HttpClient::Headers GuidesOnMapDelegate::GetHeaders() { if (!m_headersProvider) return {}; return m_hea...
350
111
/* * gap_and_valley.cpp * * Copyright 2007 Joey Durham <joey@engineering.ucsb.edu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the Licen...
3,972
1,645
#pragma once #include <Register/Utility.hpp> namespace Kvasir { // peripheral CLK_GATING namespace ClkGatingCken0{ ///< register CKEN0 using Addr = Register::Address<0x4003c100,0xeaf00000,0x00000000,unsigned>; /// bitfield GIOCK constexpr Register::FieldLocation<Addr,Register::maskFro...
13,121
4,272
// This file is part of comma, a generic and flexible library // Copyright (c) 2011 The University of Sydney // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // 1. Redistributions of source cod...
7,363
2,401
/* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certain so...
2,029
600
// 713 - Adding Reversed Numbers #include <cstdio> #include <cstring> #define N 202 int main() { int n, i; char A[N], B[N], C[N], a; scanf("%d", &n); while(n--) { memset(A, 0, sizeof(A)); memset(B, 0, sizeof(B)); scanf("%s %s", A, B); a = 0; for(i = 0; A[i] || B[i]; ++i) { a += A[i] ? A[i] - '...
519
332
#include "P4LoginCommand.hpp" #include "../Utils/StringUtil.hpp" #include <sstream> namespace VersionControl { P4LoginCommand::P4LoginCommand(const std::string &password, bool globalTicket) : P4Command("login"), m_password(password), m_loginRequired(false), m_globalTicket(true) { } bool P...
891
378
#pragma once #include <Windows.h> #include <functional> namespace dk { struct memory_manager { using Callback = std::function<bool(uint64_t, uint8_t *&)>; memory_manager(); ~memory_manager(); uint64_t scan_ranges(char *pool_tag, size_t page_size, Callback page_cb, Callback block_cb); void map_all_memory(...
623
269
#ifndef HYMLS_HOUSEHOLDER_H #define HYMLS_HOUSEHOLDER_H #include "HYMLS_config.h" #include "HYMLS_OrthogonalTransform.hpp" class Epetra_RowMatrixTransposer; namespace HYMLS { //! Householder transform I-2vv'/v'v, where v_1=1+sqrt(n) and v_j=1 for 1<j<=n class Householder : public OrthogonalTransform { public: ...
3,072
1,033
#include <vector> #include <utility> #include "cnf.hpp" #include "state.hpp" class Converter { public: Converter(unsigned int h, unsigned int l, unsigned int p) { height = h + 2, length = l + 2, period = p; } CNF& convert() { cnf.clear(); ruleNeighbor(); ruleWall(); ...
3,981
1,539
/*************************************************************************** # Copyright (c) 2015, NVIDIA CORPORATION. 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 sourc...
5,513
1,719
/************************************************************************* * odil - Copyright (C) Universite de Strasbourg * Distributed under the terms of the CeCILL-B license, as published by * the CEA-CNRS-INRIA. Refer to the LICENSE file or to * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * for...
2,820
902
#include "vixen.h" #include "physics/havok/vxphysics.h" #include "physics/havok/vxcloth.h" #include <Common/Base/KeyCode.h> #include <Common/Base/hkBase.h> #include <Common/Base/hkBase.h> #include <Common/Base/Config/hkConfigVersion.h> #include <Common/Base/Math/QsTransform/hkQsTransform.h> #include <Common/Base/Threa...
7,093
2,955
#include "FakeUUIDFactory.h" UUID FakeUUIDFactory::create() { return std::to_string(++count); }
101
40
#pragma once #include <string> #include <sys/types.h> #include <sys/stat.h> #include <unordered_map> struct stat Lstat(std::string path_to_file); size_t Last_Modified_Time_From_Epoch(std::string const& path_to_file); //checking characteristics of a single file bool Is_Symbolic_Link(std::string path_to_file); boo...
1,216
433
/** * @file unit_test_fnd_memory_uninitialized_default_construct.cpp * * @brief uninitialized_default_construct のテスト * * @author myoukaku */ #include <bksge/fnd/memory/uninitialized_default_construct.hpp> #include <bksge/fnd/memory/destroy.hpp> #include <bksge/fnd/iterator/begin.hpp> #include <bksge/...
2,065
969
#include "ILProgram.h" ILProgram::ILProgram():Scope(NULL) { } ILProgram::~ILProgram() { }
94
41
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: Message2Server.proto #include "Message2Server.pb.h" #include <algorithm> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/extension_set.h> #include <google/protobuf/wire_format_lite.h> #include <google/protobuf/descriptor.h>...
20,943
7,890
class Solution { public: //1,数学+递归 int lastRemaining(int n, int m) { return f(n,m); } int f(int n, int m) { if (n == 1) return 0; int x = f(n - 1, m); return (m + x) % n; } };
241
106
#include "peripherals/lpc40xx/gpio.hpp" #include "peripherals/lpc40xx/spi.hpp" #include "devices/displays/oled/ssd1306.hpp" #include "systems/graphics/graphics.hpp" #include "utility/log.hpp" #include "utility/time/time.hpp" int main() { sjsu::LogInfo("Starting OLED Application..."); sjsu::lpc40xx::Spi & ssp1 ...
3,155
1,434
#include "GUI_Common.h" #include "GUI_LabelValuePair.h" #include "GUI_LabelValuePairState.h" GUI_LabelValuePair::GUI_LabelValuePair(string _label, string _value, RECT _rect, int _id, GUI_ElementStyle *_style, GUI_font *_valuefont) : GUI_BaseElement(_rect, _id, _style), label(_label), valuefont(_valuefont) { swapStat...
3,076
1,126