text
string
size
int64
token_count
int64
/* * Copyright (c) 2008-2019 SLIBIO <https://github.com/SLIBIO> * * 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 * ...
22,804
11,283
/////////////////////////////////////////////////////////////////////////////// /// /// Authors: Joshua Davis /// Copyright 2017, DigiPen Institute of Technology /// /////////////////////////////////////////////////////////////////////////////// #pragma once namespace Zero { template <typename ArrayTyp...
7,337
2,179
#include "Item_4_Heal.h" #include "Game.h" #include <iostream> using namespace std; void Item_4_Heal::onCheck(Game* pGame) { pGame->Use_Item_4_Heal(); } Item_4_Heal::Item_4_Heal() { } Item_4_Heal::~Item_4_Heal() { }
221
111
/* * * Copyright 2010 JiJie Shi(weixin:AIChangeLife) * * This file is part of bittrace. * * bittrace 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 3 of the License, or * (at ...
2,917
1,293
#include <stdlib.h> #include <stdio.h> #include <typedefs.h> #include "menu/option_decode.h" #include "util/load_file/load_bin.h" #include "EEPROM/EEPROM.h" #include "menu/menu_choice.h" #include "util/os/linux/escape_codes.h" void exit_program(option_struct * options); int main(int argc, cstring argv[]){ opt...
1,169
454
#include "sgp4io.h" #include "sgp4unit.h" #include <GeographicLib/Geocentric.hpp> #include <iostream> int main() { /* INPUT is e.g. 2019 12 6 1 1 1 2020 12 6 1 1 1 */ char fossasatTLELineA[70] = "1 44829U 19084F 20183.10006475 .00039774 00000-0 23016-3 0 9991"; char fossasatTLEL...
4,645
1,981
#include "alpaca/portfolio.h" #include "alpaca/json.h" #include "rapidjson/document.h" namespace alpaca { Status PortfolioHistory::fromJSON(const std::string& json) { rapidjson::Document d; if (d.Parse(json.c_str()).HasParseError()) { return Status(1, "Received parse error when deserializing portfolio JSON");...
757
297
using namespace std; int bsearch(int *arr, int size, int value) { int left = 0, right = size - 1, middle; while (left <= right) { middle = (left + right) / 2; if (arr[middle] == value) return middle; else if (arr[middle] < value) left = middle + 1; else ...
395
129
// Filename: IBLagrangianForceStrategySet.cpp // Created on 04 April 2007 by Boyce Griffith // // Copyright (c) 2002-2013, Boyce Griffith // 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,456
2,163
/*********************************************** The MIT License (MIT) Copyright (c) 2012 Athrun Arthur <athrunarthur@gmail.com> 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 ...
2,935
1,081
// TestSmallBlockAllocator.cpp //------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------ #include "TestFramework/UnitTest.h" #include "Core/Containers/Array.h" #include "Core/Math/Random.h" #include "Co...
9,142
2,986
// Wheels - various C++ utilities // // Written in 2013 by Martinho Fernandes <martinho.fernandes@gmail.com> // // To the extent possible under law, the author(s) have dedicated all copyright and related // and neighboring rights to this software to the public domain worldwide. This software is // distributed without a...
1,639
522
// Copyright 2019 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 "sim-env.h" #include <zircon/assert.h> namespace wlan::simulation { uint64_t Environment::event_count_ = 0; void Environment::Run() { while ...
3,722
1,226
#include <TaskGraph> using namespace tg; typedef TaskGraph<void,int> andor_TaskGraph; int main( int argc, char *argv[] ) { andor_TaskGraph T; taskgraph( andor_TaskGraph, T, tuple1(a) ) { tVar(int, b); b = ((a < 12) + (a > 42)); b = ((a > 6) - (a < 9)); b = ((a < 12) * (a > 42)); b = ((a > 6) ...
556
289
#pragma once #include <string> #include <imgui.h> #include "common.hpp" #include "events.hpp" struct GLFWwindow; namespace graphene::imgui { IMGUI_IMPL_API bool init_application(GLFWwindow* window, const std::string& font_path, float font_size, std::shared_ptr<event_manager> events); IMGUI_IMPL_API void shutdown_a...
437
163
#include "AzimuthEvaluation.h" #include "PolarDecomposition.h" #include "LibraryParameters.h" #include <opencv2/core.hpp> #include <gtest/gtest.h> #include <limits> #include <vector> class AzimuthEvaluationTests : public ::testing::Test { public: AzimuthEvaluationTests(); cv::Mat genRandomMat(double min, double...
4,139
1,778
#include <iostream> #include <list> #include <tuple> #include "instructions.hpp" using namespace mjavac::vm; Instruction_iload::Instruction_iload(std::string identifier) : identifier(identifier) { } void Instruction_iload::perform(State *state) const { state->stack.push(state->variables[this->identifier]); ...
7,107
2,406
// Copyright 2021 Google LLC // // 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 ...
6,035
2,069
#include <sstream> #include "illegalParameter.h" #include "linearList.h" #include "linkedNode.h" template <typename T> class linkedList : public linearList<T> { //链表 public: linkedList(); linkedList(const linkedList<T>&); ~linkedList(); bool empty() const { return listSize == 0; } int size() ...
7,580
2,596
/* Copyright (c) 2010, Piet Hein Schouten. All rights reserved. * This code is licensed under a BSD-style license that can be * found in the LICENSE file. The license can also be found at: * http://www.boi-project.org/license */ #include <QMutex> #include <QWaitCondition> #include "ThreadLockData.h" #include "Mute...
1,617
584
#include <iostream> using namespace std; void lr(int a[],int n) { int temp=a[0]; for(int i=0;i<n-1;i++) a[i]=a[i+1]; a[n-1]=temp; } int main() { int n,d; cin>>n/*>>d*/; int a[n]; for(int i=0;i<n;i++) cin>>a[i]; /*for(int i=1;i<=d;i++)*/ lr(a,n); for(int i=0;i<n;i++) cout<<a[i]<<" "; return 0; }
299
173
// Copyright(c) 2019-present, Anton Lilja. // Distributed under the MIT License (http://opensource.org/licenses/MIT) #pragma once #include "vec2.hpp" #include "vec3.hpp" #include "vec4.hpp" namespace sm { // Other op funcs template <typename V> inline V inverse(const V& v) { return v.inverse(); ...
664
223
//! Integration test for C++17 variant of the toojpeg implementation #include <iostream> #include "toojpeg_17.h" #include "vendor/sha2.h" #include "tests.h" #include <filesystem> #include <array> using std::cout; using std::endl; // 800x600 image const auto width = 800; const auto height = 600; void testColor() { ...
4,277
1,580
// this file is generated via daScript automatic C++ binder // all user modifications will be lost after this file is re-generated #include "daScript/misc/platform.h" #include "daScript/ast/ast.h" #include "daScript/ast/ast_interop.h" #include "daScript/ast/ast_handle.h" #include "daScript/ast/ast_typefactory_bind.h" ...
4,875
1,659
//===- test.cpp -------------------------------------------------*- C++ -*-===// // // This file is licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // (c) Copyright 2020 Xilinx Inc. //...
3,585
1,544
/* https://leetcode.com/problems/two-sum/ Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. 思路 在one pass中,每个element-target=value,看看value是否已存在于hash map中 */ #include <codech/codech_def.h> using namespace CODECH; using namespace std; /* vector<int> twoSum(vector<int>...
2,359
886
#include "org_libharu_Document.h" #include "org_libharu_HPDF.h" #include "haru_error_handler.h" #include <assert.h> jfieldID Document_HPDF_Doc_Pointer_ID; JNIEXPORT void JNICALL Java_org_libharu_Document_initIDs (JNIEnv *env, jclass cls) { Document_HPDF_Doc_Pointer_ID = env->GetFieldID(cls, "HPDF_Doc_Pointer", "I...
3,703
1,436
// This file is part of qtExtensions, and is distributed under the // OSI-approved BSD 3-Clause License. See top-level LICENSE file or // https://github.com/Kitware/qtExtensions/blob/master/LICENSE for details. #include "qtColorScheme.h" #include <QSettings> #define ARGS(x) QPalette::x, #x //-----------------------...
5,065
1,515
// Copyright (c) 2021 Tobias Bohnen // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include <tcob/tcob_config.hpp> #include <concepts> #include <queue> #include <vector> #include <tcob/core/Random.hpp> #include <tcob/core/Signal.hpp> #include <tcob/core/Upd...
11,228
3,541
// Copyright 2014 Samsung Electronics. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "utc_blink_ewk_base.h" class utc_blink_ewk_context_proxy_uri_set : public utc_blink_ewk_base { protected: static const char*const url; }; cons...
1,288
485
#include "DHT_U.h" DHT_Unified::DHT_Unified(uint8_t pin, uint8_t type, uint8_t count, int32_t tempSensorId, int32_t humiditySensorId): _dht(pin, type, count), _type(type), _temp(this, tempSensorId), _humidity(this, humiditySensorId) {} void DHT_Unified::begin() { _dht.begin(); } void DHT_Unified::setName(...
4,554
1,797
#include "freertos_driver.h" // void FreeRTOSDriverTask::task() { // run(); // } FreeRTOSDriverTask::FreeRTOSDriverTask( const char * name, int priority, int stack_depth, size_t request_queue_length, TickType_t timeout): FreeRTOSTask(name, priority, stack_depth), request_queue_length(requ...
1,625
515
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cstdio> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(nullptr), right(nullptr){} }; class Solution { public: int kthSmallest(TreeNode *root, int k) { int result...
1,453
626
#include "GroundMissionControl.h" #include "Satellite.h" GroundMissionControl::GroundMissionControl() { } void GroundMissionControl::attach(Satellite* addSatellite) { this->satelliteList.push_back(addSatellite); } void GroundMissionControl::detach(Satellite* removeSatellite) { vector<Sate...
985
347
#include "graphic/sphere_transparent.h" #include <gtest/gtest.h> namespace graphic { using geometry::vec3d; TEST(sphere_transparent, creation) { constexpr vec3d C1{ 7, 8, 9 }; constexpr dim_t R1 = 5.0f; const sphere_transparent S1{ C1, R1, 1.458, 0.1, 0.2, 0.3 }; constexpr vec3d C2{ -2, 3, 10 }; ...
4,609
2,454
#include <NTL/ZZ_pX.h> #include <cstdio> NTL_CLIENT double clean_data(double *t) { double x, y, z; long i, ix, iy, n; x = t[0]; ix = 0; y = t[0]; iy = 0; for (i = 1; i < 5; i++) { if (t[i] < x) { x = t[i]; ix = i; } if (t[i] > y) { y = t[i]; iy...
2,624
1,269
#include <iostream> #include <string> int main() { char c = 'a'; std::cout << "size of char: " << sizeof(c) << '\n' << "size of int: " << sizeof(int) << '\n' << "size of double: " << sizeof(double) << '\n' << "size of pointer: " << sizeof(&c) << std::endl; double foo[...
1,120
410
/* * * Copyright (c) 2016-2017 Nest Labs, 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...
9,461
2,986
#include <VL53L0X.h> #include "Sensores.h" #include "_config.h" #include <Wire.h> VL53L0X Sensores::sensor1; VL53L0X Sensores::sensor2; void Sensores::init(){ Wire.begin(); pinMode(Xshut_1, OUTPUT); pinMode(Xshut_2, OUTPUT); digitalWrite(Xshut_1, LOW); digitalWrite(Xshut_2, LOW); delay(10)...
2,462
952
/* * This file contains sample wrappers showing Android Java Developers * who are not familiar with the NDK or JNI how to get data in and out of the * CPP and how to incorporate the sample code in * http://leveldb.googlecode.com/svn/trunk/doc/index.html into their JNI */ #include <string.h> #include <jni.h> #incl...
6,560
2,582
#include "Core/SourceCommon.h" #include "System/ThreadPrivateResources.h" #include "Interface/InstanceImpl.h" #include "Interface/Resources/ResourceManager.h" #include "Interface/Resources/ResourceManagerImpl.h" #include "Interface/Resources/FontResource.h" #include "Interface/Resources/FontResourceImpl.h" #inclu...
30,067
12,877
#include <stdio.h> #include <map> using namespace std; long long x[10000], y[10000], avex, avey, n; void solve() { if(avex%n || avey%n) { puts("no"); return; } avex /= n, avey /= n; map<long long, int> r; int i; for(i = 0; i < n; i++) r[x[i]*100000000+y[i]] = 1; long ...
827
384
#include "Application.h" #include "GenomeModel.h" void Application::execute() { GenomeModel model; model.load(arguments.genomeModelFilename, geneRegistry); }
162
54
/* * Copyright 2008-2021 Max Kellermann <max.kellermann@gmail.com> * * 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 co...
5,119
1,977
#include "scriptlistingdialog.h" #include "ui_scriptlistingdialog.h" ScriptListingDialog::ScriptListingDialog(QWidget *parent) : QDialog(parent), _ui(new Ui::ScriptListingDialog), _scriptDirModel(new QFileSystemModel), _currentScript(0) { _scriptDir = QFileInfo(_SETTINGS.fileName()).absolutePath() + "/...
3,272
1,047
#include "wbdl.hpp" #include <algorithm> using namespace wbdl; ////////////////////////// // FrameBuffer void FrameBuffer::clearDirty() { dirtyX0 = 0; dirtyY0 = 0; dirtyX1 = 0; dirtyY1 = 0; } bool FrameBuffer::isDirty() { return dirtyX0 != dirtyX1; } unsigned int FrameBuffer::bufferSize() { return width * ...
3,505
1,664
//================================================================================================== /*! @file Defines the property_of meta-function @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,625
509
#include "side_pane.hpp" #include <cppurses/painter/color.hpp> #include <cppurses/painter/glyph.hpp> #include <cppurses/widget/widgets/text_display.hpp> using namespace cppurses; namespace demos { namespace glyph_paint { Side_pane::Side_pane() { this->width_policy.fixed(16); space1.wallpaper = L'─'; sp...
577
223
#ifndef BLUETOE_ATTRIBUTE_HANDLE_HPP #define BLUETOE_ATTRIBUTE_HANDLE_HPP #include <bluetoe/meta_types.hpp> #include <bluetoe/meta_tools.hpp> #include <cstdint> #include <cstdlib> #include <cassert> #include <algorithm> namespace bluetoe { namespace details { struct attribute_handle_meta_type {}; ...
17,299
4,669
/* libs/graphics/sgl/SkScan.cpp ** ** Copyright 2006, Google 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 req...
1,402
468
#include <bits/stdc++.h> using namespace std; string appendAndDelete(string s, string t, int k) { if(s==t) return "Yes"; int i=0; while(s[i]==t[i]) i++; if( ( s.length()+t.length()-2*i ) > k ) return "No"; else if( (s.length()+t.length()-2*i) % 2 == k%2 ) return "Yes"; else ...
739
303
class Solution { public: // int add_digits(int n) { // int ans = 0; // int k; // while (n != 0) { // k = n % 10; // ans += k; // n /= 10; // } // return ans; // } int addDigits(int n) { ...
549
199
#include <iostream> using namespace std; int main() { int var = 789; int *ptr2; int **ptr1; ptr2 = &var; ptr1 = &ptr2; cout << "The value of var = "<< var << endl; cout << "Content value of single pointer ptr2 = " << *ptr2 << endl; cout << "address value of single pointer ptr2 = " << ptr2 << e...
469
167
#include <map> #include <set> #include <vector> #include <algorithm> #include <cstdlib> #include <stack> #include <cmath> using namespace std; class IntMap { public: static const long serialVersionUID = 1L; static const int FREE_KEY = 0; static const int NO_VALUE = 0; /** Keys and values */ vector<in...
18,747
7,775
/* ///////////////////////////////////////////////////////////////////////////// * File: whereis.cpp * * Purpose: Implementation file for the Synesis Software whereis utility * * Created: 19th January 1996 * Updated: 16th August 2004 * * Author: Matthew Wilson, Synesis Software P...
45,612
15,741
// referst.cpp // demonstrates passing structure by reference #include <iostream> using namespace std; //////////////////////////////////////////////////////////////// struct Distance //English distance { int feet; float inches; }; ////////////////////////////////////////////...
1,461
463
#include <qtgadgets.h> N::RegExpValidator:: RegExpValidator ( QObject * parent ) : QRegExpValidator ( parent ) , Validator ( parent ) { } N::RegExpValidator::~RegExpValidator (void) { } int N::RegExpValidator::Type(void) const { return 1102 ; } voi...
738
253
#ifndef SALES_H #define SALES_H #include "sales.h" #endif #include <iostream> using namespace std; namespace SALES { void setSales(Sales &s, const double ar[], int n) { int count = 0; double max, min, ave = ar[0]; for(int i=0;i<n and i<QUARTERS;++i) { s.sales[i] = ar[i]; count++; if(max < ar[i])...
1,097
600
// Identification comments code block // Wills Stern // Kepler's 3rd Law // Editor(s) used: VS Code // Compiler(s) used: g++ #include <iostream> using std::cout; using std::cin; #include <string> using std::string; using std::endl; #include <cctype> // for toupper #include <cstdlib> // for atof #include <cmath> //...
2,746
948
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ #include "cxxtest/TestSuite.h" #include "coherence/lang.ns" #include "coherence/util/CircularArrayList.hpp" #include "private/coherence/util/l...
17,443
5,450
#include "extbrotli.h" VALUE mBrotli; VALUE mConst; VALUE eError; VALUE eNeedsMoreInput; VALUE eNeedsMoreOutput; EXTBROTLI_CEXTERN void Init_extbrotli(void) { mBrotli = rb_define_module("Brotli"); mConst = rb_define_module_under(mBrotli, "Constants"); rb_include_module(mBrotli, mConst); eError = rb_...
617
253
/* Copyright 2017 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense...
18,260
5,521
/// @file test_infNaN_iamax.cpp /// @brief Test cases for iamax with NaNs, Infs and the overflow threshold (OV). // // Copyright (c) 2021, University of Colorado Denver. All rights reserved. // // This file is part of testBLAS. // testBLAS is free software: you can redistribute it and/or modify it under // the terms of...
24,755
9,162
#include "interp_visitor.hpp" #include <eigen3/Eigen/Core> // Vector2f #include <iostream> // cout, endl #include <memory> // make_shared #include <stdexcept> // invalid_argument #include <string> // string #include "ast/library_functions.hpp" using Eigen::Vector2f; using ...
5,679
1,935
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <direct.h> #ifdef WIN32 #pragma warning(disable:4996) #include <conio.h> #endif #include "telnet.h" bool getInputString(char *buf,int len) { bool ret = true; int index = 0; bool exit = false; while ( !exit ) ...
4,052
1,275
/** * @file optionscontrols.cpp * @brief Controls for options dialogs (and the like). * @author Simon Steele * @note Copyright (c) 2002-2011 Simon Steele - http://untidy.net/ * * Programmer's Notepad 2 : The license file (license.[txt|html]) describes * the conditions under which this source may be modified / d...
6,200
2,502
#include "tests/tdmaMsgProcessor_UT.hpp" #include "comm/tdmaCmds.hpp" #include "comm/tdmaComm.hpp" #include "comm/cmdHeader.hpp" #include "comm/commands.hpp" #include "node/nodeParams.hpp" #include "node/nodeState.hpp" #include <gtest/gtest.h> #include <cmath> #include <unistd.h> using std::vector; namespace { } na...
2,744
925
#include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <cstring> #include <map> #include <set> #include <vector> #include <utility> #include <queue> #include <stack> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi f...
1,545
805
#pragma once #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #include <systemc> #include <sc_time_literal.hpp> #pragma clang diagnostic pop #pragma GCC diagnostic pop //vim:syntax=systemc
310
98
/** * @file player_test.cpp * * This module is a part of Fusion Server project. * It contains the implementation of the unit tests for the Player class. * * Copyright 2019 Kamil Rusin */ #include <gtest/gtest.h> #include <fusion_server/ui/player.hpp> using namespace fusion_server; TEST(PlayerTest, SerializeI...
3,293
1,340
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); int n, d; cin >> n >> d; int p = 0, l = p+d, next = -1; string a; cin >> a; int ret = 0; for (int i = 1; i < n; i++) { if (a[i]=='...
486
225
#pragma warning (disable:4786) #include <windows.h> #include <time.h> #include "constants.h" #include "misc/utils.h" #include "Time/PrecisionTimer.h" #include "Resource.h" #include "misc/windowutils.h" #include "misc/Cgdi.h" #include "debug/DebugConsole.h" #include "Raven_UserOptions.h" #include "Raven_Game.h" #include...
14,792
4,992
// // Created by kaiser on 19-3-16. // #include <iostream> class A { public: virtual ~A() = default; }; class B : public A {}; class C : public B {}; int main() { { A* pa = new C; if (B* pb = dynamic_cast<B*>(pa); !pb) { std::cerr << "error 1\n"; } } { B* pb = new B; if (C* pc = dy...
391
179
/* Copyright (c) 2012, Julian Straub <jstraub@csail.mit.edu> * Licensed under the MIT license. See LICENSE.txt or * http://www.opensource.org/licenses/mit-license.php */ #include <baseMeasure_py.hpp> #include <hdp_gibbs_py.hpp> #include <hdp_var_py.hpp> #include <hdp_var_base_py.hpp> // using the hdp which utilizes...
5,508
2,383
/* Copyright 2005-2007 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://stlab.adobe.com/licenses.html) */ /*************************************************************************************************/ #ifndef ADOBE_STRING_POOL_H...
1,307
302
/** * \file process.hpp * \brief Generic interface of processing plugin * \author Vaclav Bartos <bartos@cesnet.cz> * \author Jiri Havranek <havranek@cesnet.cz> * \date 2021 */ /* * Copyright (C) 2021 CESNET * * LICENSE TERMS * * Redistribution and use in source and binary forms, with or without * modificati...
4,290
1,305
/** @file ColliderManager2D ckass definition */ #ifndef COLLIDER_MANAGER_2D_HH_ # define COLLIDER_MANAGER_2D_HH_ # include <cstddef> # include <map> # include "object-2d.hh" # include "collider-2d.hh" namespace opl { class ColliderManager2D { public: static ColliderManager2D* instance (); bool are_col...
743
334
#ifndef SEMANTIC_HPP #define SEMANTIC_HPP #include "types.hpp" namespace semantic { Result<Ok, Errors> analyze(std::shared_ptr<Ast::Program> program); } #endif
164
67
/************************************************************** * * 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 y...
5,277
1,788
#include "Selection.h" Selection::Selection(sf::Vector2f pos) : m_selected(false) { m_outerShape.setRadius(12); m_innerShape.setRadius(10); m_innerShape.setFillColor(sf::Color::Blue); setPosition(pos); } void Selection::handleEvents(sf::Event e, const sf::RenderWindow& window, sf::Vector2f displacement) { switc...
1,637
586
#include "p2Defs.h" #include "j1App.h" #include "p2Log.h" #include "j1Textures.h" #include "j1Input.h" #include "j1Audio.h" #include "j1Render.h" #include "j1Window.h" #include "j1Player.h" #include "j1SceneManager.h" #include "j1EntityManager.h" #include "j1Window.h" #include "j1UI_manager.h" #include "Scene.h" #inclu...
8,296
3,888
/* * This file is part of CasADi. * * CasADi -- A symbolic framework for dynamic optimization. * Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl, * K.U. Leuven. All rights reserved. * Copyright (C) 2011-2014 Greg Horn * * CasADi is free software; you ...
2,846
955
/* ,--. ,--. ,--. ,--. ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2018 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation `---' `--' `...
3,671
1,261
#include "stdafx.h" #include "Plane.h" #include <iostream> using namespace std; Plane::Plane() { isSet = 0; } Plane::Plane(char *c) { PlaneName = c; NumberOfParties = 0; for (int i = 0; i < 40; i++) { PartyArray[i].SetPartyName("NULL"); PartyArray[i].SetPartySize(0); }; isSet = 0; } void Plane::SetPartyAt(...
2,278
975
/***************************************************************************//** * @file keywork_detection.cc * @brief Top level application functions ******************************************************************************* * # License * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b> ******...
6,161
1,724
#include "ControlContext.hpp" using namespace AppCUI::Controls; bool UserControl::Create(Control* parent, const AppCUI::Utils::ConstString& caption, const std::string_view& layout) { CONTROL_INIT_CONTEXT(ControlContext); CHECK(Init(parent, caption, layout, false), false, "Failed to create user control !"); ...
583
188
/* * ETransform.hh * * Created on: 2015-8-11 * Author: cxxjava@163.com */ #ifndef ETRANSFORM_HH_ #define ETRANSFORM_HH_ #include "Efc.hh" #include "../inc/ELogger.hh" namespace efc { namespace log { /** * Utility class for transforming strings. */ class ETransform { public: /** * This method takes ...
1,360
449
#include <algorithm> #include <iostream> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; const int MOD = 1E9 + 9; const int INF = 1 << 29; int main() { int A; cin >> A; cout << A; }
254
109
/* ** Xin YUAN, 2019, BSD (2) */ //////////////////////////////////////////////////////////////////////////////// #include "precomp.h" #include "../WmarkScanner.h" #include "../base/WmarkDef.h" //////////////////////////////////////////////////////////////////////////////// ////////////////////////...
1,985
889
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
1,079
347
// // MIT License // // Copyright (c) 2021 Jan Möller // // 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...
1,902
650
/* Copyright (c) 2011, Siemens Corporate Research a Division of Siemens Corporation 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....
2,593
941
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/tabs/overflow_view.h" #include <algorithm> #include <memory> #include <utility> #include "base/bind.h" #include "base/...
19,869
6,506
// // Created by MarcasRealAccount on 31. Oct. 2020 // #include "Engine/Renderer/Apis/Vulkan/Shader/VulkanMaterialData.h" #include "Engine/Renderer/Shader/Shader.h" namespace gp1::renderer::apis::vulkan::shader { VulkanMaterialData::VulkanMaterialData(renderer::shader::Material* material) : VulkanRendererData(m...
424
161
/*! \file finter_writer_bzip2.cc \brief method implementations for finter bzip2 writer \copyright Released under the MIT License. Copyright 2020 Cameron Palmer */ #include "finter/finter_writer_bzip2.h" void finter::finter_writer_bzip2::open(const char *filename) { if (_raw_output) throw std::domain_er...
3,058
1,151
/* * Copyright 2007, Vasilis Kaoutsis, kaoutsis@sch.gr. * Distributed under the terms of the MIT License. */ #include <errno.h> #include <fcntl.h> #include <unistd.h> #include <errno_private.h> int lockf(int fileDescriptor, int function, off_t size) { struct flock fileLock; fileLock.l_start = 0; fileLock.l_le...
3,599
1,138
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2014 Georg Rudoy * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0....
1,879
694
#include <iostream> #include <string> class Complex { double r_; double i_; public: Complex(double r = 0., double i = 0.) : r_{r}, i_{i} { } double real() const { return r_; } double imag() const { return i_; } Complex& operator+=(Complex const& o) { r_ += o.r_; i_ += o.i_; ...
1,773
714
/* * Copyright 2019-2022 Diligent Graphics LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
8,626
2,971
/** * Copyright (c) 2020 Paul-Louis Ageneau * * 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 the License, or (at your option) any later version. * * This ...
3,861
1,369