text
string
size
int64
token_count
int64
#include "cube.h" #include "server.h" extern "C" { #include "../lua/src/lua.h" #include "../lua/src/lauxlib.h" #include "../lua/src/lualib.h" } extern "C" { #include "../lanes/src/threading.h" } #include "lua.h" #include "lua_functions.h" #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <di...
92,245
42,697
#ifndef CPU_HPP #define CPU_HPP #include "register.hpp" #include <vector> namespace fusion { struct CPU { RegisterFile _regs; std::vector<uint8_t> _ram; CPU(); void loop(); }; } #endif // CPU_HPP
204
89
// Copyright 2019 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/ash/login/ui/oobe_dialog_size_utils.h" #include <stddef.h> #include "base/macros.h" #include "base/test/scoped_feature_list.h" ...
7,137
2,348
#include<iostream> #include<iomanip> using namespace std; int main(){ double Poly[1001] = {0}; //多项式A int k; scanf("%d", &k); for (int i = 0; i < k;i++){ int exp; double coef; scanf("%d%lf", &exp, &coef); Poly[exp] = coef; } //多项式B scanf("%d", &k); f...
754
337
/* * tuning.cpp * ---------- * Purpose: Alternative sample tuning. * Notes : (currently none) * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ #include "stdafx.h" #include "tuning.h" #include "../common/mptIO.h" #include "../common/seriali...
24,379
10,842
/* * Copyright (c) 2014-2021, NVIDIA 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.0 * * Unless ...
2,957
1,010
typedef struct static_queue_0; typedef struct RwObjectHasFrame; typedef struct RxPipelineNode; typedef struct zEntHangable; typedef struct static_queue_1; typedef enum _zPlayerWallJumpState; typedef struct RpPolygon; typedef struct xVec3; typedef struct xLaserBoltEmitter; typedef struct xEnv; typedef struct bolt; typed...
76,927
38,181
#include "createBoundingBox.h" #include <Inventor/So.h> /////////////////////////////////////////////////////////////////////////////// // SoSeparator * drawLine(SbVec3f pointS, SbVec3f pointE, SbVec3f color, float thickness, bool ticker, bool text, int dir) // /////////////////////////////////////////////////////////...
3,669
1,453
/* Sưu tầm bởi @nguyenvanhieuvn Thực hành nhiều bài tập hơn tại https://luyencode.net/ */ void Xuat(LIST l) { for(NODE* p = l.pHead; p != NULL; p = p->pNext) { printf("%4d", p->info); } }
212
114
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchcore/proton/server/i_blockable_maintenance_job.h> #include <vespa/searchcore/proton/server/move_operation_limiter.h> #include <vespa/vespalib/testkit/testapp.h> #include <queue> ...
3,361
1,194
#include "test.h" #include <inner/type_traits.h> class A {}; enum E : unsigned {}; enum class Ec : unsigned {}; enum Ecs : signed int {}; int main() { assert(is_unsigned_v<A> == false); assert(is_unsigned_v<float> == false); assert(is_unsigned_v<signed int> == false); assert(is_unsigned...
489
181
#pragma once #include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #include "entity.hpp" class Graphic { public: Graphic(const char* title, const int& SCREEN_WIDTH, const int& SCREEN_HEIGHT); SDL_Texture* loadTexture(const char* p_filePath); void cleanUp(); //Destroy w...
587
176
// This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved. /* rest_collection_test.cc Jeremy Barnes, 25 March 2014 Copyright (c) 2014 mldb.ai inc. All rights reserved. */ #include "mldb/utils/runner.h" #include "mldb/utils/vector_utils.h" #include "mldb/rest/rest_collection.h" #include "ml...
18,893
6,064
/** * Copyright 2020-2021 Huawei Technologies Co., Ltd * * 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 applicabl...
40,874
13,824
#include "stdafx.h" // General #include "DX11_Creator.h" // Additional #include "DX11\\RenderDeviceDX11.h" #include "DX11\\RenderWindowDX11.h" RenderDevice* DX11_Creator::CreateRenderDevice() { return new RenderDeviceDX11(); } RenderWindow* DX11_Creator::CreateRenderWindow(HWND hWnd, RenderDevice* device, cstring ...
545
209
#include "cbase.h" #include "neo_controlpoint.h" #include "neo_gamerules.h" IMPLEMENT_NETWORKCLASS_ALIASED( NeoControlPoint, DT_NeoControlPoint ) BEGIN_NETWORK_TABLE( CNeoControlPoint, DT_NeoControlPoint ) #ifdef CLIENT_DLL //RecvPropStringT( RECVINFO( m_Name ) ), RecvPropInt( RECVINFO( m_ID ) ), RecvPropVector( ...
1,883
823
#pragma once #include <boost/optional.hpp> #include <common/Singleton.hpp> #include "common/Aliases.hpp" #include "util/QStringHash.hpp" #include <map> #include <memory> #include <shared_mutex> #include <unordered_map> #include <vector> #include <QColor> namespace chatterino { struct Emote; using EmotePtr = std::...
836
298
// Created on: 2016-03-30 // Created by: Irina KRYLOVA // Copyright (c) 2016 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 publ...
4,728
1,332
// timer.cpp // E64 // // Copyright © 2019-2022 elmerucr. All rights reserved. #include "timer.hpp" #include "common.hpp" E64::timer_ic::timer_ic(exceptions_ic *unit) { exceptions = unit; irq_number = exceptions->connect_device(); } void E64::timer_ic::reset() { registers[0] = 0x00; // No pending irq's regist...
3,047
1,538
#include "pch.h" #include "Component.h" #include "GameObject.h" #include "avancezlib.h" void CollideComponent::Create(AvancezLib* engine, GameObject* go, std::set<GameObject*>* game_objects, ObjectPool<GameObject>* coll_objects){ Component::Create(engine, go, game_objects); this->coll_objects = coll_objects; ...
1,459
472
#include "blink.hpp" #include "lcd.hpp" #include <avr/io.h> #include <avr/interrupt.h> namespace Blink { namespace { volatile bool blink = false; volatile uint8_t timeout = 0; volatile uint8_t delay = 0; } void init(uint8_t delay) { speed(delay); OCR0A = 0xFF; TCCR0A |= _BV(WG...
734
335
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <functional> using namespace std; using std::placeholders::_1; bool check_size(const string& s, int i) { return s.size() < i; } int main() { vector<int> ivec{0, 1, 2, 3, 4, 5, 6}; auto result = find_if(ivec.be...
511
202
/// /// Copyright (c) 2013, Intel Corporation /// /// 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 ...
24,101
8,941
/* * (C) Copyright 1996-2016 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an in...
7,221
2,078
// file : xsde/cxx/parser/validating/inheritance-map.hxx // author : Boris Kolpackov <boris@codesynthesis.com> // copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSDE_CXX_PARSER_VALIDATING_INHERITANCE_MAP_HXX #define XSDE...
1,488
495
/* * Copyright 2021 Oleg Zharkov * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * or in the "license" file accompanying ...
34,900
11,625
/* Copyright (C) 2017 BARBOTIN Nicolas * * 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, publi...
1,797
655
#include <iostream> int main() { int n; std::cin >> n; int thousands = n / 1000; int hundreds = n / 100 % 10; int tens = n / 10 % 10; int ones = n % 10; std::string is_good_integer; if (thousands == hundreds && hundreds == tens || hundreds == tens && tens == ones) { is_good_integer = "Yes"; ...
408
166
#include<bits/stdc++.h> using namespace std; #define int long long #define M 1000000007 #define N 300010 signed main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; int dp[n+1]; for(int i=0;i<=n;i++) dp[i]=INT_MAX; dp[0]=0; for(int i=1;i<=n;i++){ int num=i; while(num>0){ ...
416
238
// // Created by xiodine on 4/19/15. // #include <sstream> #include "ControllerAdaugaRefill.h" #include "../views/ViewConsole.h" ControllerAdaugaRefill::ControllerAdaugaRefill() : Controller() { } ControllerAdaugaRefill::~ControllerAdaugaRefill() { } std::size_t ControllerAdaugaRefill::showOptions(ModelStoc &stoc...
1,985
693
/* Starshatter OpenSource Distribution Copyright (c) 1997-2004, Destroyer Studios LLC. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain t...
10,168
3,297
/** \class DTDigiAnalyzer * Analyse the the muon-drift-tubes digitizer. * * \authors: R. Bellan */ #include "DataFormats/MuonDetId/interface/DTLayerId.h" #include "SimMuon/DTDigitizer/test/DTDigiAnalyzer.h" #include <DataFormats/DTDigi/interface/DTDigiCollection.h> #include <FWCore/Framework/interface/Event.h> ...
6,017
2,245
// Examen junio 2016: Implementacion de un sistema de reproduccion de musica // APDO B: hay que reducir los costes de deleteSong y play #include "lista.h" #include "DiccionarioHash.h" #include <iostream> #include <string> using namespace std; typedef string Cancion; typedef string Artista; class SongInfo { public: ...
4,861
1,957
/* Copyright (c) 2014, Hookflash Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the fol...
19,813
4,875
#include <bits/stdc++.h> using namespace std; long long t = 1, n = 1, m, k; int main(){ cin>>k>>m; while(t % m != k){ n++; t *= 10; t++; } cout<<n<<endl; return 0; }
190
97
// maindlg.cpp : implementation of the CMainDlg class // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "resource.h" #include "maindlg.h" BOOL CMainDlg::PreTranslateMessage(MSG* pMsg) { return CWindow::IsDialogMessage(pMsg); } LRESULT CMainDlg::OnInitDial...
3,322
1,427
/* * (C) Copyright 2017 UCAR * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. */ #include "eckit/config/LocalConfiguration.h" #include "oops/util/abor1_cpp.h" #include "oops/util/DateTime.h" #include "oops/uti...
5,180
1,718
/*** * Copyright (C) Microsoft. All rights reserved. * Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. * * File:MoObservableObjectClassAdapter.cpp ****/ #include "pch.h" #include "MoObservableObjectClassAdapter.h" #include "MoObservableObjectFactory.h" ...
4,637
1,334
/////////////////////////////////////////////////////////////////////////////// /// /// \file ComponentHierarchy.cpp /// /// Authors: Joshua Claeys /// Copyright 2015, DigiPen Institute of Technology /// /////////////////////////////////////////////////////////////////////////////// #pragma once namespace Ze...
10,758
2,900
// Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved // Use of this source code is governed by an apache-2.0 license that can be // found in the LICENSE file. #include "common/step/recovery/step_open_recovery_file.h" #include <cassert> #include "common/recovery_file.h" namespace common_installer {...
1,454
469
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ #include <iostream> #include "Info.hpp" using namespace std; const string Info::institution = "Unicamp - Universidade Estadual de Ca...
1,602
541
// ***************************************************************************** // // Copyright (c) 2013, Pleora Technologies Inc., All rights reserved. // // ***************************************************************************** #include "eBUSPlayerShared.h" #include "ChangeSourceTask.h" #ifdef _AFXDLL ...
388
111
// // Copyright Copyright 2009-2022, AMT – The Association For Manufacturing Technology (“AMT”) // 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 // // ...
4,066
1,268
#include <stdio.h> #include <iostream> #include <vector> #include <unordered_map> using namespace std; #define MOVE(tx, ty, ch) (tabuleiro[tx][ty] = ch) //! Variáveis globais vector<pair<int, int>> inimigos; pair<int, int> jogador; char tabuleiro[9][8]; bool destroi_inimigos(int nivel) { if (nivel == 10 && inim...
3,341
1,152
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <array> #include <fstream> #include <gtest/gtest.h> #include "ApkResources.h" #include "Debug.h" #include "RedexMappedF...
16,272
7,593
/* halo_sim is meant to solve the halo problem using a simultaneous algrimth. */ #include "include/state.h" #include "include/hamiltonian.h" #include "include/stepper.h" #include "include/looper.h" #include "include/recorder.h" #include "include/helper.h" #include <iostream> #include <fstream> #include <cmath> #includ...
3,976
1,379
/* * Copyright 2010 The Native Client 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 "native_client/src/shared/ppapi_proxy/plugin_graphics_2d.h" #include <stdio.h> #include <string.h> #include "srpcgen/ppb_rpc.h" #inc...
4,758
1,767
#include <marnav/nmea/rot.hpp> #include "type_traits_helper.hpp" #include <marnav/nmea/nmea.hpp> #include <gtest/gtest.h> namespace { using namespace marnav; class Test_nmea_rot : public ::testing::Test { }; TEST_F(Test_nmea_rot, contruction) { EXPECT_NO_THROW(nmea::rot rot); } TEST_F(Test_nmea_rot, properties) {...
1,247
641
#include "version_handler.hpp" #include "version_mock.hpp" #include <array> #include <utility> #include <gtest/gtest.h> namespace ipmi_flash { TEST(VersionHandlerCanHandleTest, VerifyGoodInfoMapPasses) { constexpr std::array blobs{"blob0", "blob1"}; VersionBlobHandler handler(createMockVersionConfigs(blobs)...
815
267
#include "OStreamSink.h" using namespace miniant::Spdlog; OStreamSink::OStreamSink(std::shared_ptr<std::ostream> outputStream, bool forceFlush): m_outputStream(std::move(outputStream)), m_forceFlush(forceFlush) {} std::mutex& OStreamSink::GetMutex() { return mutex_; } void OStreamSink::sink_it_(const sp...
678
232
#include <chrono> #include <array> #include <iostream> #include "benchmark.h" inline size_t fib(size_t n) { if (n == 0) return n; if (n == 1) return 1; return fib(n - 1) + fib(n - 2); } inline double perform_computation(int w) { return fib(w); } int main() { using namespace std; auto start = ...
2,883
1,119
//===- lib/MC/MCDwarf.cpp - MCDwarf implementation ------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
55,419
19,726
#include <bits/stdc++.h> using namespace std; int maxLen(int A[], int n); int main() { int T; cin >> T; while (T--) { int N; cin >> N; int A[N]; for (int i = 0; i < N; i++) cin >> A[i]; cout << maxLen(A, N) << endl; } } // } Driver Code Ends ...
824
310
/* * (C) Copyright 1996- ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an interg...
1,923
624
#include "stdafx.h" #include "TestBiomeScreen.h" #include <Vorb/ui/InputDispatcher.h> #include <Vorb/colors.h> #include "App.h" #include "ChunkRenderer.h" #include "DevConsole.h" #include "InputMapper.h" #include "Inputs.h" #include "LoadTaskBlockData.h" #include "RenderUtils.h" #include "ShaderLoader.h" #include "So...
19,099
6,951
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <limits> #include "vm/CachedCCWBase.h" #include "utils/New.h" // System.Collections.Generic.IEqualityComparer`1<WindTurbineScriptableObject> struct IEqualityComparer_1_t754733F7B8BE7D6A4821...
73,265
35,860
#include <bits/stdc++.h> using namespace std; std::mt19937 rng(int(std::chrono::steady_clock::now().time_since_epoch().count())); int main() { std::ios_base::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0); int t; cin >> t; for (int test = 1; test <= t; test += 1) { int n; cin >> n; stri...
679
315
#include <iostream> //#include "Solution1.h" #include "Solution2.h" void test(string s1, string s2) { Solution solution; cout << solution.canConstruct(s1, s2) << endl; } int main() { test("a", "b"); // 0 test("aa", "ab"); // 0 test("aa", "aab"); // 1 return 0; }
277
119
//ライブラリ読み込み #include <Arduino.h> #include <DSR1202.h> #include <U8g2lib.h> //ライブラリセットアップ DSR1202 dsr1202(1); //AQM1248Aは128 * 48 U8G2_ST7565_AK_AQM1248_F_4W_HW_SPI u8g2(U8G2_R0, 10, 34, 35); //CS, DC(RS), Reset(適当) //定数置き場 #define buzzer 33 //圧電ブザー #define button_LCD_R 27 //タクトスイッチ(右) #define button_LCD_L 32 //タクトスイ...
6,310
3,054
#ifndef STAN_MODEL_PROB_GRAD_HPP #define STAN_MODEL_PROB_GRAD_HPP #include <cstddef> #include <sstream> #include <stdexcept> #include <string> #include <utility> #include <vector> namespace stan { namespace model { /** * Base class for models, holding the basic parameter sizes and ...
2,698
828
/* Open Sound Control subscription library for Teensy 3.x, 4.x * Copyright (c) 2021, Jonathan Oakley, teensy-osc@0akley.co.uk * * Development of this library was enabled by PJRC.COM, LLC by sales of * Teensy and Audio Adaptor boards, implementing libraries, and maintaining * the forum at https://forum.pjrc.com/ ...
8,725
2,887
#pragma once #include <cstdint> #include "sensors.hpp" #include "rc.hpp" #include "commonstate.hpp" #include "param.hpp" namespace ros_flight { class Mode { public: typedef enum { INVALID_CONTROL_MODE, INVALID_ARMED_STATE, } error_state_t; void init(Board* _board, CommLink* _comm_li...
6,477
2,198
#include "dotplotform.h" #include "ui_dotplotform.h" DotPlotForm::DotPlotForm(QSharedPointer<ParameterDelegate> delegate): ui(new Ui::DotPlotForm()), m_paramHelper(new ParameterHelper(delegate)) { ui->setupUi(this); connect(ui->sb_wordSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); conn...
1,025
352
/* * File: SWFFile.cpp * Author: brucewang * * Created on October 24, 2009, 9:27 PM */ #include "SWFFile.h" #include <stdlib.h> #include <stdio.h> #include <memory.h> #include "DefineEditText.h" #include "DefineJPEG2.h" #include "Exports.h" #include "DefineSprite.h" /// Destructor SWFFile::~SWFFile() { ...
5,883
2,031
#include <cmath> #include <stdlib.h> #include <tsp.h> double distance(Position p1, Position p2) { return sqrt(pow(p1.x-p2.x,2)+pow(p1.y-p2.y,2)); } TSP::TSP(const vector<Position> &vertices) { this->vertices = vertices; #ifdef USE_LINKERN writeTSPData("dumptsp.in"); system(string(CONCORDE_PATH + "/LINKERN/linke...
3,430
1,420
// Copyright 2018 Open Source Robotics Foundation, 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 appli...
1,596
557
//-------------------------------------------------------------------------------------- // Main.cpp // // Entry point for Xbox One exclusive title. // // Advanced Technology Group (ATG) // Copyright (C) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------...
4,923
1,433
// Copyright (c) 2011 The Chromium Embedded Framework 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 "include/cef_command_line.h" #include "tests/gtest/include/gtest/gtest.h" namespace { void VerifyCommandLine(CefRefPtr<C...
4,515
1,583
/**************************************************************************** ** $Id: main.cpp,v 1.6 1998/06/16 11:39:34 warwick Exp $ ** ** Copyright (C) 1992-1998 Troll Tech AS. All rights reserved. ** ** This file is part of an example program for Qt. This example ** program may be used, distributed and modified w...
793
285
// each array member has to be added to the sum according to the number of odd-length subarrays it appears in // each appears in 1 1-length, and 3 3-length unless it's near the edge, and 5 5-length with the same exception etc. // until the biggest odd that fits in the array length // if you're kth from the nearest edge...
1,028
342
#include <QFrame> #include <QPushButton> #include <QHBoxLayout> #include <QVBoxLayout> #include <QDebug> #include "room_button.h" RoomButton::RoomButton(QWidget* parent /*= nullptr*/) :QWidget(parent) { this->setWindowFlags(Qt::FramelessWindowHint | Qt::Tool); this->setAttribute(Qt::WA_TranslucentBackground);...
2,664
1,018
/* * Copyright (c) 2013-2014, Ford Motor Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of c...
8,465
3,148
#include "symbol_table.hpp" #include <iostream> #include <cassert> Symbol_table::Symbol_table() { symbol_defs["SP"] = 0; symbol_defs["LCL"] = 1; symbol_defs["ARG"] = 2; symbol_defs["THIS"] = 3; symbol_defs["THAT"] = 4; symbol_defs["SCREEN"] = 16384; symbol_defs["KBD"] = 24576; symbol_defs["R0"] = 0; symbol_de...
1,369
634
// Copyright (c) 2019 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 ...
4,752
1,318
#include "EntityManager.h" #include "../Console.h" #include "../Core/LocoFixedVector.hpp" #include "../Entities/Misc.h" #include "../Game.h" #include "../GameCommands/GameCommands.h" #include "../GameState.h" #include "../Interop/Interop.hpp" #include "../Localisation/StringIds.h" #include "../Map/Tile.h" #include "../...
13,186
4,100
/** Copyright (c) 2006-2008 by Matjaz Kovac 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, di...
2,550
938
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "chrom...
8,889
2,872
#include "copycountcontainers.h" #include "futurebasetest.h" #ifdef ASYNQRO_QT_SUPPORT # include <QLinkedList> # include <QList> # include <QVector> #endif #include <list> #include <vector> using namespace std::chrono_literals; template <typename, typename> struct InnerTypeChanger; template <template <type...
21,043
6,785
/* Nome: Otto Bittencourt Matricula: 504654 LPA */ #include<iostream> #include<cstdio> #include<cstring> using namespace std; int loop = 0; char board[5][5]; char target[5][5] = { '1', '1', '1', '1', '1', '0', '1', '1', '1', '1', '0', '0', ' ', '1', '1', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', }...
1,500
821
// Copyright 2021 Olenin Sergey #include <mpi.h> #include <ctime> #include <random> #include <vector> #include "../../../modules/task_3/olenin_method_conjugate_gradient/gradient.h" std::vector<double> rand_matrix(int size) { if (0 >= size) throw "wrong matrix size"; std::default_random_engine gene; gene.seed(st...
9,365
3,487
#include "StableRand.h" #include "LevyRand.h" #include "CauchyRand.h" #include "NormalRand.h" #include "UniformRand.h" #include "ExponentialRand.h" #include <functional> StableDistribution::StableDistribution(double exponent, double skewness, double scale, double location) { SetParameters(exponent, skewness, scale...
32,087
12,115
/* 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...
1,609
485
#include <mog.h> void MOG::train( std::vector<cv::Mat>& training_images, std::vector<cv::Mat>& masks ){ cv::Mat pos_samples, neg_samples; std::cout << "Organizing the data" << std::endl; // organize all the samples organizeSamples(training_images, masks, pos_samples, neg_samples); std::cout << ...
2,325
775
#include "NoughtGraphic.hpp" NoughtGraphic::NoughtGraphic() {} NoughtGraphic::NoughtGraphic(int i_radius) { radius = i_radius; } void NoughtGraphic::draw(int xPos, int yPos, sf::RenderWindow &window, sf::Color backgroundColor) { // xPos and yPos should be pos of center m_outerShape.setFillColor(m_col...
699
243
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #include <cstdint> #include "common.hpp" #include "forward.hpp" #include "linalg.hpp" namespace vkt { VKTAPI Error CropResize(HierarchicalVolume& dst, HierarchicalVolume& src, ...
1,259
361
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { vector<int> billu; //initialization/declaration //input billu.push_back(4); //billu[0] billu.push_back(7); //billu[1] billu.push_back(18); //billu[2] billu.push_back(45); //billu[3] billu.push_back...
1,228
465
/* * This file is part of the Glaziery. * Copyright Thomas Jacob. * * READ README.TXT BEFORE USE!! */ // Main header file #include <Glaziery/src/Headers.h> Component::Component() { ASSERTION_COBJECT(this); disposed = false; maximumSize = Vector(4096, 4096); minimumSize = Vector(0, 0); parent = NULL; size...
25,603
8,964
// // // #include "AnnotateValues/AnnotateInstructions.hpp" #include "llvm/IR/Module.h" // using llvm::Module #include "llvm/IR/Type.h" // using llvm::IntType #include "llvm/IR/Constants.h" // using llvm::ConstantInt #include "llvm/IR/Metadata.h" // using llvm::Metadata // using llvm::MDNode // using llvm::Constan...
1,724
599
#pragma once #include "Ctesconf.hpp" #include "Tablero.hpp" #include "Jugador.hpp" #include "CDado.hpp" #include <fstream> #include <ostream> class Game { private: Tablero t; Jugador j[MAX_JUGADORES]; CDado d; bool swio; // Archivos de entrada/salida para el caso de configuracion de IO por archivos -...
519
186
/* * Copyright (C) 2007-2013 German Aerospace Center (DLR/SC) * * Created: 2010-08-13 Markus Litz <Markus.Litz@dlr.de> * 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...
2,696
1,011
#include <iostream> #include <vector> #define NORTH 1 #define SOUTH 2 #define WEST 3 #define EAST 4 void get_direction(int command, int& dx, int & dy) { switch(command) { case NORTH: dx=0;dy=1;break; case SOUTH: dx=0;dy=-1;break; case WEST: dx=-1;dy=0;break; case EAST: dx=1;dy=0;br...
7,462
3,323
#include "Ast.h" namespace lws { //----------------------Expressions----------------------------- IntNumExpr::IntNumExpr() : value(0) { } IntNumExpr::IntNumExpr(int64_t value) : value(value) { } IntNumExpr::~IntNumExpr() { } std::wstring IntNumExpr::Stringify() { return std::to_wstring(value); } ...
13,923
6,019
#include <cstdio> #include <iostream> #include <algorithm> const int Max=105; int col[3*Max], zws, n, ans; struct Node { int x, y; } p[Max]; bool cmp0(Node x, Node y) { return x.y < y.y; } bool cmp1(Node x, Node y) { return x.x < y.x; } inline int abs(int x) { return x>0?x:-x; } int main(){ freopen("data.in", "r", s...
1,068
662
// Copyright 2014 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 "components/sync_driver/generic_change_processor_factory.h" #include "base/memory/ptr_util.h" #include "components/sync_driver/generic_change_pr...
1,145
341
#include <ctype.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include "graph.h" #include "MFRUtils.h" #include "jsontokenizer.h" #include <set> #include <map> #include <string> /************************************************ Started 2016 Ayal Pinkus Read in json arrays and dump as binary files fo...
7,718
2,859
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 10, mod = 998244353; int n; char s[N]; int cnt[26], num, l, r; int main() { scanf("%d%s", &n, s); for(int i = 0; i < n; ++i) { cnt[s[i] - 'a']++; } for(int i = 0; i < 26; ++i) num += (cnt[i] != 0); if(num == 1) { printf("%lld\n", (1LL * n * (...
659
395
//============================================================================= // Copyright (C) 2011-2018 The pmp-library developers // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Re...
4,853
1,809
// Copyright 2017 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 required by applicable law or agreed to in...
4,338
1,456
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
1,838
557
#include "acmacs-base/log.hh" #include "acmacs-py/py.hh" // ====================================================================== PYBIND11_MODULE(acmacs, mdl) { using namespace pybind11::literals; mdl.doc() = "Acmacs backend"; acmacs_py::chart(mdl); acmacs_py::chart_util(mdl); acmacs_py::avidity...
1,113
396