text
string
size
int64
token_count
int64
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt...
3,646
1,124
/* * param_array.cc * * Created on: Jan 14, 2014 * Author: nsoblath */ #define PARAM_API_EXPORTS #include <sstream> using std::string; using std::stringstream; #include "param_array.hh" #include "param_base_impl.hh" #include "param_node.hh" namespace param { param_array::param_array() : ...
4,989
1,594
#include "main.hpp" //$(sej$(aaa){AAA}$(bajs$(moa){kmkd}){tej$(haha){kmkm}}){kukens fitta} //$(bajskmkd){tej$(haha){kmkd}} //template <bool DO_LOUD = true> struct Process { vector <pair <string, string>> declaredVariables; Context declVar; // Context pasteVar; // comment::Context co...
17,317
5,993
/* * This file is mostly based on pudelkoMs FlowScope project, specifically of this file: * https://github.com/pudelkoM/FlowScope/blob/7beb980e2cb64284666ba2d62dda5727c7bfd499/src/var_hashmap.cpp * * Most important distinction is the use of a different hash function which is more relaxed about * different digest s...
4,584
1,850
/*! \brief Implementation of methods of TTClusterAlgorithm_official * \details Here, in the source file, the methods which do depend * on the specific type <T> that can fit the template. * * \author Nicola Pozzobon * \date 2013, Jul 12 * */ #include "L1Trigger/TrackTrigger/interface/TTClusterAl...
6,601
2,201
/******************************************************************************* * Copyright 2019 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.o...
20,822
12,702
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include <tchar.h> //--------------------------------------------------------------------------- USEFORM("UAbout.cpp", AboutBox); USEFORM("UEdit.cpp", EditFile); USEFORM("URegInf.cpp", RegInf); USEFORM("UReg...
1,436
477
// Merge two Linked List #include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node *next; } *first = NULL, *second = NULL, *third = NULL; void Display(struct Node *p) { while (p != NULL) { printf("%d ", p->data); p = p->next; } } void create(int A[], int n) { int...
1,865
716
/* ============================================================================ * Copyright (c) 2010, Michael A. Jackson (BlueQuartz Software) * Copyright (c) 2010, Dr. Michael A. Groeber (US Air Force Research Laboratories * All rights reserved. * * Redistribution and use in source and binary forms, with or witho...
2,973
879
// Copyright 2021 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
1,883
529
/** * Algorithm and estimation function regarding transform. * \author Christian Merkl (knueppl@gmx.de) * \date 2. November 2019 */ #include "francor_base/algorithm/transform.h" #include "francor_base/transform.h" namespace francor { namespace base { namespace algorithm { namespace transform { void transformP...
560
167
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
5,782
2,178
#include <array> #include <cstdlib> #include <filesystem> #include <numeric> #ifdef __linux__ #include <unistd.h> #include <limits.h> #endif #include "util_env.h" #include "./com/com_include.h" namespace dxvk::env { std::string getEnvVar(const char* name) { #ifdef _WIN32 std::vector<WCHAR> result; result...
2,932
1,077
//https://codeforces.com/contest/66/problem/B #include<bits/stdc++.h> using namespace std ; #define aakriti long long int int main() { ios_base::sync_with_stdio(false); cin.tie(0); aakriti number ; cin >> number ; aakriti arr[number], ans = 1 ; for(int i = 0; i <number ; i++) ...
805
306
#include "model.h" #include <gfx.h> #include <glad/glad.h> #include <tiny_obj_loader.h> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <shader.h> /** Constants for vertex attribute locations */ constexpr auto va_position = 0; constexpr auto va_normal = 1; constexpr auto va_texcoord ...
4,844
1,947
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "UnrealEd.h" #include "StructureEditorUtils.h" #include "ScopedTransaction.h" #include "Kismet2NameValidators.h" #include "Kismet2/BlueprintEditorUtils.h" #include "EdGraphSchema_K2.h" #include "ObjectTools.h" #include "Editor/UnrealEd/Public/Kismet...
26,507
9,526
/* * A344279.cpp * * Created on: 14-May-2021 * * Author: Soumyadeep Dhar * * A344279: Numbers a(n)=m such that |m| is the smallest, k=n*m and r=(n^2+1)*m * for two quadratic equations of the form t^2+k*t+r = 0 and t^2+r*t+k^2 = 0 * have non-zero integer roots, where k is the coeffi...
4,017
1,677
//Palindromic Partitions #include <iostream> #include <cstdio> #include <vector> using namespace std; typedef long long int lli; const lli MOD = lli(1e9)+7, base = 31; lli n; string S; lli modpow(lli a, lli b) { if(!b) return 1; else if(b == 1) return a; else { lli res = modpow(a, b/2)%MOD; res *= res; r...
840
470
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofSetVerticalSync(true); // this uses depth information for occlusion // rather than always drawing things on top of each other ofEnableDepthTest(); // this sets the camera's distance from the object cam....
3,433
1,191
#pragma once #include <algorithm> #include <complex> #include <iostream> #include <numeric> #include <string> #include <vector> #include "Abort.hpp" namespace Jet { namespace Utilities { /** * @brief Determines if an integral value is a power of 2. * @param value Number to check. * @return True if `value` is a p...
21,155
6,939
// redirection: FIXME! #include "Offline/MCDataProducts/inc/GenParticle.hh"
76
29
#include <bits/stdc++.h> #define ll long int using namespace std; int main() { string s; cin>>s; if(s[0]>='a' && s[0]<='z') { s[0]=toupper(s[0]); cout<<s<<endl; } else { cout<<s<<endl; } return 0; }
229
110
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is part of xlslib -- A multiplatform, C/C++ library * for dynamic generation of Excel(TM) files. * * Copyright 2004 Yeico S. A. de C. V. All Rights Reserved. * Copyright 2008-2013 David Hoerl All Rights Reserved. * * ...
7,659
4,491
#include "Geometry/MTDNumberingBuilder/plugins/CmsMTDBuilder.h" #include "DetectorDescription/Core/interface/DDFilteredView.h" #include "Geometry/MTDNumberingBuilder/interface/GeometricTimingDet.h" #include "Geometry/MTDNumberingBuilder/plugins/ExtractStringFromDDD.h" #include "DataFormats/DetId/interface/DetId.h" #inc...
2,242
838
/* The MIT License Copyright (c) 2011 by Jorrit Tyberghein 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...
54,434
17,986
/****************************************************************************** Plush Version 1.2 read_3ds.c 3DS Object Reader Copyright (c) 1996-2000, Justin Frankel ******************************************************************************/ #include "plush.h" typedef struct { pl_uInt16 id; void...
7,930
3,661
// Copyright (c) 2018-present Baidu, 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 b...
38,338
11,778
/* * Medical Image Registration ToolKit (MIRTK) * * Copyright 2013-2016 Imperial College London * Copyright 2013-2016 Andreas Schuh * * 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 * ...
10,152
3,359
//---------------------------------------------------------------------------// // MIT License // // Copyright (c) 2020-2021 Mikhail Komarov <nemo@nil.foundation> // Copyright (c) 2020-2021 Nikita Kaskov <nemo@nil.foundation> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of...
20,088
5,150
// // LoadedModel.cpp // martian-terrain // // Created by Sidharth Mishra on 5/20/18. // #include "LoadedModel.h" using namespace sidmishraw_model; using namespace std; LoadedModel::LoadedModel():ofNode() { } LoadedModel::LoadedModel(string modelName, bool optimize):ofNode() { this->model = ofxAssimpModelLoade...
4,027
1,414
// Licensed under the BSD license. See LICENSE.txt for more details. #include "gmock/gmock.h" #include "gtest/gtest.h" #include "runtime/buffer.h" using namespace ::testing; using namespace ::std; namespace physis { namespace runtime { TEST(BufferHost, EnsureCapacity) { BufferHost buf; size_t s = 100; buf.En...
4,482
2,160
#include <stdio.h> #define N 30 int main(void) { char a[N]; int i,j,n; gets(a); for(i=0;i<N;i++) { n=0; if(a[i]!='\0') n++; } for(j=0;j<n;j++) { if(a[j]==a[n-j-1]) printf("true"); else printf("false"); }return 0; }
281
164
/* * ===================================================================================== * * Filename: * * Description: * * Version: 1.0 * Created: Thanks to github you know it * Revision: none * Compiler: g++ * * Author: Mahmut Erdem ÖZGEN m.erdemozgen...
673
206
// [2021y-02m-05d] Idrisov Denis R. #include <mygtest/modern.hpp> #ifdef TEST_TOOLS_MATCH_OPTIMIZE_MASK #define dTEST_COMPONENT tools, match #define dTEST_METHOD optimize_mask #define dTEST_TAG tdd #include <tools/match/optimize_mask.hpp> namespace me = ::tools; //===================================================...
5,303
2,240
#pragma once #include "sl.h" #include "defines.hpp" #include "input.hpp" class controller { public: virtual input get_input() { return input(direction::horizontal, 0, rotation::none); } }; class player_controller : public controller { virtual input get_input() override { auto key_left = slGetKey(SL_KEY_LEFT)...
1,109
406
/*========================================================================= Program: Visualization Toolkit Module: vtkHiddenLineRemovalPass.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This ...
5,937
1,807
#include <iostream> #include <string> #include <vector> using namespace std; int get_all_digits(vector<char> num_palabra){ string digitos = ""; for(int i=0; i<num_palabra.size(); i++){ if(isdigit(num_palabra[i])){ digitos += num_palabra[i]; } } return stoi(digitos); } int ...
2,773
997
//[ HelloWorld //////////////////////////////////////////////////////////////////// // Copyright 2008 Eric Niebler. 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) #include <iostream> #include <boost/prot...
734
251
// NOLINT(namespace-envoy) #include <math.h> #include <string> #include "proxy_wasm_intrinsics.h" // Use global variables so the compiler cannot optimize the operations away. int32_t i32a = 0; int32_t i32b = 1; double f64a = 0.0; double f64b = 1.0; // Emscripten in some modes and versions would use functions from ...
752
301
#pragma once #include "dag_block.hpp" #include "final_chain/final_chain.hpp" #include "transaction_manager/transaction.hpp" #include "transaction_manager/transaction_manager.hpp" #include "vdf_sortition.hpp" namespace taraxa { enum class BlockStatus { invalid, proposed, broadcasted, verified, unseen }; using BlockS...
3,611
1,234
#include "runicpch.h" #include "SceneManager.h" namespace Runic { Scope<SceneManager::SceneManagerData> SceneManager::s_Data = CreateScope<SceneManager::SceneManagerData>(); }
178
58
/*+-------------------------------------------------------------------------+ | MultiVehicle simulator (libmvsim) | | | | Copyright (C) 2014-2020 Jose Luis Blanco Claraco | | Copy...
8,496
3,862
#pragma once #include "vke.hpp" #include "vkrenderer.hpp" #include "texture.hpp" #include "VulkanglTFModel.hpp" class pbrRenderer : public vke::vkRenderer { void generateBRDFLUT(); void generateCubemaps(); protected: virtual void configurePipelineLayout(); virtual void loadRessources(); virtual v...
1,126
359
//-------------------------------------------------------------------------------- // PlayerProjectiles.cpp //-------------------------------------------------------------------------------- // The class that manages the player projectiles //------------------------------------------------------------------------------...
3,723
1,108
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef IROHA_ON_DEMAND_OS_TRANSPORT_CLIENT_GRPC_HPP #define IROHA_ON_DEMAND_OS_TRANSPORT_CLIENT_GRPC_HPP #include "ordering/on_demand_os_transport.hpp" #include "network/impl/async_grpc_client.hpp" #include "orderin...
2,817
828
#include "irods/rodsDef.h" #include "irods/rodsError.h" #include "irods/rodsErrorTable.h" struct ErrorStack; int addRErrorMsg(ErrorStack *myError, const int status, const char *msg) { if (!myError) { return USER__NULL_INPUT_ERR; } if (myError->len >= MAX_ERROR_MESSAGES) { return 0; } ...
3,127
1,131
// Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup ...
3,173
1,401
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
5,533
2,013
#include <bits/stdc++.h> using namespace std; class Graph{ int V; list<int> *adj; public: Graph(int V); void AddEdge(int v, int w); void BFS(int s); }; Graph::Graph(int V) { this->V = V; adj = new list<int>[V]; } void Graph::AddEdge(int v, int w) { adj[v].push_back(w); } void Graph::...
1,439
578
/************************************************************************* * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors a...
128,393
58,758
#ifndef airsimcore_ufrudder_hpp #define airsimcore_ufrudder_hpp #include "UniForce.hpp" #include "UFRudderParams.hpp" namespace msr { namespace airlib { class UFRudder : public UniForce { public: UFRudder(const Vector3r& position, const Vector3r& normal, UFRudderParams::UniForceDirection turning_direction, ...
2,990
1,190
#include <iostream> #include <vector> using namespace std; int main() { int n, k; cin >> n >> k; vector <int> data; for (int i = 0; i < n; i++) { int input; cin >> input; data.push_back(input); } int kth_value = data.at(k - 1), count = 0; for (int i = 0; i < data...
463
184
/* * 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...
19,743
5,018
#include "Game/UI/LobbyFilterManager.hpp" #include <iostream> namespace cge { LobbyFilterManager::~LobbyFilterManager(void) { if(m_container->getGui()) { m_container->getGui()->removeMousePreviewListener(this); } } LobbyFilterManager::LobbyFilterManager(agui::Gui* gui, GuiFactory* factory, LanguageMana...
17,710
7,217
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "audio-stream.h" #include <lib/simple-codec/simple-codec-helper.h> #include <lib/zx/clock.h> #include <math.h> #include <string.h> #include <nume...
18,052
6,935
#include "socket.h" #include "common/log.hpp" #include "common/string.hpp" #include "common/hash.hpp" #include "worker.h" #include "network/moon_connection.hpp" #include "network/custom_connection.hpp" #include "network/ws_connection.hpp" using namespace moon; socket::socket(router * r, worker* w, asio::io_context &...
11,688
3,822
#pragma once #include "device_properties.hpp" #include <pqrs/json.hpp> namespace krbn { namespace connected_devices { namespace details { class descriptions { public: descriptions(void) : descriptions("", "") { } descriptions(const std::string& manufacturer, const std::string& product) : manufac...
1,710
501
#pragma once // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/REDhash.hpp> #include <RED4ext/CName.hpp> #include <RED4ext/DynArray.hpp> namespace RED4ext { namespace anim { struct AnimNode_BlendSpace_InternalsBlendSpacePoint { static co...
887
349
#include <math.h> #include <stdio.h> #include <cstring> #include <iostream> using namespace std; #define N 66000 unsigned int prime[N / 64]; #define gP(n) (prime[n>>6]&(1<<((n>>1)&31))) void sieve() { memset(prime, -1, sizeof(prime)); unsigned int i, i2, sqrtN = (unsigned int)sqrt((double)N) + 1; for(i = 3...
1,719
813
#include <bits/stdc++.h> #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; int n, board = 1, board[1001], board, t; int main() { fastio; cin >> n; for (int i = 0; i <= n; ++i) { if (i < n) { cin >> board; board[++t] = board; } ...
460
184
#include "BucketSort.hh" void BucketSort(Element Tablica[], long int pierwszy_element, long int ostatni_element) { Kubel Wiadro[11]; // stwórz tablice kubłów long int k = 0; // zmienna pomocnicza do obsługi tablicy for(long int i = pierwszy_element; i <= ostatni_element; i++) // Powtarzaj dla całej tablicy ...
618
257
#include "ResourceAnimator.h" #include "imgui/imgui.h" #include "ModuleScene.h" #include "ModuleFileSystem.h" #include "Application.h" #include "Optick/include/optick.h" #include "ModuleTimeManager.h" #include "Application.h" #include "ResourceAvatar.h" #include "ModuleResourceManager.h" #include <assert.h> ResourceA...
17,704
6,774
#ifndef ISP_IMP_HPP #define ISP_IMP_HPP #include "stm32f4xx.h" extern "C" void CAN1_RX0_IRQHandler(void); extern "C" void CAN2_RX0_IRQHandler(void); extern "C" void USART6_IRQHandler(void); #endif
200
104
/** * Adam Lamers * December 6th, 2010 * CURL HTTP Downloader class */ #include "CURLDownloader.h" #include <iostream> #include <stdlib.h> size_t write_data(void *ptr, size_t size, size_t nmemb, dataBuffer *buffer) { if(buffer->size == 0) { int dataLength = size * nmemb; buffer->size = dat...
2,366
801
#include "stdafx.h" #include "VRDemoHotKeyManager.h" #include "util\l4util.h" #include "VRDemoConfigurator.h" #include "VRDemoTogglesWrapper.h" const std::string VRDemoHotKeyManager::HOT_KEY_PAUSE = "HotKeyPause"; VRDemoHotKeyManager::VRDemoHotKeyManager() { } VRDemoHotKeyManager::~VRDemoHotKeyManager() { } void ...
830
309
#include <iostream> #include <functional> #include <SFML/Graphics.hpp> #include "ball.hpp" #include "entity.hpp" #include "character.hpp" #include "wall.hpp" class action { private: std::function< bool() > condition; std::function< void() > work; public: action( std::function< bool() > condition, std::func...
2,961
1,275
#pragma once #include <vector> #include <memory> #include <cmath> #include <cassert> #include <set> #include <chrono> #include <random> #include <ratio> #include <type_traits> #include "../RandomPlayer/RandomPlayer.hpp" template <typename Game, typename ActGen, unsigned int Iterations, typename Ratio = std::ratio<14,...
5,737
1,655
/* * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
10,626
3,588
#include <iostream> #include <vector> #include <algorithm> #include <random> #include <chrono> #include <cassert> template<typename Iterator> void qsort1(Iterator b, Iterator e) { using std::swap; if (b >= e) { return; } Iterator geb = b, unb = b; auto pivot = std::prev(e); while (unb != pivot) { if (*un...
2,418
1,176
/* * Copyright 2003-2013, Axel Dörfler, axeld@pinc-software.de. * Distributed under the terms of the MIT License. */ #include "RootFileSystem.h" #include <OS.h> #include <string.h> #include <fcntl.h> RootFileSystem::RootFileSystem() { } RootFileSystem::~RootFileSystem() { struct entry *entry = NULL; while...
3,038
1,155
#include<bits/stdc++.h> using namespace std; int phi[100000]; void phiSieve(int n) { for(int i=1; i<=n;i++) phi[i] = i; for(int i=2; i<=n; i++ ) { if(phi[i]==i) { phi[i] = i-1; for(int j= 2*i;j<=n;j+=i) { phi[j] = (phi[j]/i)*(i...
480
239
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
3,346
1,044
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018-2021 www.open3d.org // // Perm...
3,317
1,126
#include "SimMuon/MCTruth/interface/RPCHitAssociator.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" using namespace std; // Constructor RPCHitAssociator::RPCHitAssociator(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC) : RPCdigisimlinkTag(conf.getParameter<edm::InputTag>("RPCdigisimlinkT...
4,957
1,875
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "MergePrivatePCH.h" #include "SMergeTreeView.h" void SMergeTreeView::Construct(const FArguments InArgs , const FBlueprintMergeData& InData , FOnMergeNodeSelected SelectionCallback , TArray< TSharedPtr<FBlueprintDifferenceTreeEntry> >& OutTreeEn...
8,637
3,265
#include <iostream> using namespace std; int main() { double liczba; cout<<"Podaj liczbe (z zakresu 100-200): "; cin>>liczba; cout<<"Podana liczba jest "; if (liczba<150){ cout<<"mala"; } else if (liczba < 175){ cout<<"srednia"; } else { cout<<"duza"; } ...
347
147
/* Q Light Controller efxpreviewarea.cpp Copyright (c) Heikki Junnila 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.txt Unless req...
4,375
1,596
/* 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 applicable law or agreed to in ...
2,514
1,029
/* * 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 ...
20,505
5,881
#include "PID.h" /** * TODO: Complete the PID class. You may add any additional desired functions. */ // -------------------------------------------------------------------------------------------------------------------- PID::PID() { i_steer_error_ = 0.0; i_throtle_error_ = 0.0; } // -------------------------...
2,216
700
// // window.cpp // Author: Samuel Vargas // Date: 08/25/2019 // #include <iostream> #include "window.h" // https://learnopengl.com/In-Practice/Debugging void APIENTRY glDebugOutput(GLenum source, GLenum type, GLuint id, GLenum sever...
3,997
1,405
#include "EU4Leader.h" #include "../ID.h" #include "Log.h" #include "ParserHelpers.h" EU4::Leader::Leader(std::istream& theStream) { registerKeyword("name", [this](const std::string& unused, std::istream& theStream) { const commonItems::singleString nameString(theStream); name = nameString.getString(); }); ...
2,356
853
/****************************************************************************** * ____ _ _____ * * / ___| / \ | ___| C++ * * | | / _ \ | |_ Actor * ...
2,885
889
/* * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> * Copyright (C) 2009 Google, Inc. * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> * Copyright (C) Research In Motion Lim...
18,587
5,918
#include <unistd.h> //This allows the program to run on Linux/Unix systems #include <iostream> #include <cstdlib> //The cstdlib library adds the 'sleep' function using namespace std; int main() { int w, wl; // w will be the weight in kilograms, wl will be the weight in pounds string select; cout << "Would you li...
1,260
415
#ifndef SAMPLES_LIB_WINDOW_H #define SAMPLES_LIB_WINDOW_H #include <framework/framework.hpp> namespace sampleslib { template<vg::SpaceType type> struct SpaceObjectInfo { using SceneType = void; using CameraType = void; }; template<> struct SpaceObjectInfo<vg::SpaceType::SPACE_...
3,896
1,214
#include <GBAemu/cpu/hostInstructions.h> #include <GBAemu/cpu/cpu.h> #include <GBAemu/cpu/armException.h> #include <GBAemu/gba.h> #include <GBAemu/util/log.h> #include <GBAemu/defines.h> #include <GBAemu/util/preprocessor.h> // 001xxxxxxxxx uint32_t Cpu::GetShifterOperandImm(uint32_t instruction) { uint32_t operand ...
229,759
116,189
// Copyright 2019 The Souper Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
22,602
8,371
#include "rendering/records/SlideGpuRecord.h" #include "rendering/utility/gl/GLTexture.h" SlideGpuRecord::SlideGpuRecord( std::shared_ptr<GLTexture> texture ) : m_texture( texture ), m_activeLevel( 0 ) { } std::weak_ptr<GLTexture> SlideGpuRecord::texture() { return m_texture; }
295
117
/* * */ #include "hemerageneratorsconfigureplugin_p.h" namespace Hemera { namespace Generators { ConfigurePlugin::ConfigurePlugin(QObject* parent) : QObject(parent) , d(new Private) { } ConfigurePlugin::~ConfigurePlugin() { delete d; } BaseConfigure *ConfigurePlugin::baseConfigure() { return d->b...
341
121
#include "generator/x86_64/generator.h" #include <iostream> #include <sstream> using namespace generator::x86_64; namespace { std::array<std::array<const char *, 4>, REG_COUNT> reg_names = { std::array<const char *, 4>{"rax", "eax", "ax", "al"}, {"rbx", "ebx", "bx", "bl"}, {"rcx", "ecx", "cx", "cl"}, ...
145,952
47,330
/*************************************************************************** copyright : (C) 2009 by Lukas Lalinsky email : lukas@oxygene.sk ***************************************************************************/ /*******************************************************************...
5,905
2,127
 #include "bubble_border.h" #include "base/logging.h" #include "SkBitmap.h" #include "ui_gfx/canvas_skia.h" #include "ui_gfx/path.h" #include "ui_gfx/rect.h" #include "ui_base/resource/resource_bundle.h" #include "view/view.h" #include "../../resource/resource.h" // static SkBitmap* BubbleBorder::left_ = NULL; ...
15,563
5,056
// // Created by krab1k on 24.1.19. // #include <vector> #include <fmt/format.h> #include <gemmi/pdb.hpp> #include "chargefw2.h" #include "../config.h" #include "pdb.h" #include "common.h" #include "bonds.h" #include "../periodic_table.h" MoleculeSet PDB::read_file(const std::string &filename) { gemmi::Structur...
2,654
846
/* Copyright 2015 NumScale SAS Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI Copyright 2015 Glen Joseph Fernandes (glenjofe@gmail.com) Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_GCC_HPP #define BOOST_ALIGN_D...
470
216
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "lstm_gemm_kernel_base.h" #include "kernel_selector_utils.h" #include "common_tools.h" namespace kernel_selector { JitConstants LSTMGemmKernelBase::GetJitConstants(const lstm_gemm_params& params) const { JitConstants j...
2,787
921
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
6,760
2,316
class Solution { public: bool isUnique(string astr) { if ( astr.empty() ) { return true; } // 1. 使用set 记录字符是否出现过 set<char> s; for ( auto it = astr.begin(); it != astr.end(); it++ ){ if ( s.count(*it) > 0 ){ return false; } e...
418
134
#include "mbed.h" #define MYDEBUG #define COMPLETE 1 #define INCOMPLETE 0 #define END_OF_PACKET '\n' #define SIZE_OF_SEND_PACKET 16 #define CHECK_CHUTTER_US 500000 #define ALERT_CYCLE_SEC 1 #define ARERT_MAX_CNT 60 #define CHECK_CONNECT_SEC 2 #define BUZZER_ON 1 #define BUZZER_OFF 0 #define SW_LED_ON 1 #define S...
15,820
5,851
/* * Copyright (c) 2021 Light Source Software, LLC. 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 re...
5,877
1,880