text
string
size
int64
token_count
int64
#include "RenderMotion.h" #include "VkUtil.h" void RenderMotion::Create(const RenderContext& rc) { // Generate { VkDescriptorSetLayoutBinding set_layout_bindings[] = { { 0, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, NULL }, { 1, VK_DESCRIPTOR_TYP...
4,177
1,782
#pragma once #include <list> #include <memory> #include <unordered_map> #include <boost/filesystem.hpp> #include <boost/utility/string_view.hpp> #include <detail/forward.hpp> namespace components { namespace python { namespace detail { constexpr const static char* __default__ = "default"; class context_ma...
689
201
#include "Packet.hpp" #include <algorithm> std::uint64_t Packet::GetVersionSum() const noexcept { std::uint64_t versionSum{version}; if (type != 4) { for (const auto &sub: std::get<std::vector<Packet>>(content)) { versionSum += sub.GetVersionSum(); } } return versionSum; } std::uint64_t Packet::Solv...
1,947
843
# 1 "/tmp/tmpxft_00000aee_00000000-1_particles_kernel.cudafe1.cpp" # 1 "<built-in>" # 1 "<command-line>" # 1 "/tmp/tmpxft_00000aee_00000000-1_particles_kernel.cudafe1.cpp" # 1 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/particles_kernel.cu" # 46 "/usr/local/cuda/bin/../include/device_types.h"...
678,705
386,148
#include "tiffio.h" #include <string> #include <math.h> #include <iostream> #include <string.h> #include <stdlib.h> using namespace std; const double EPS = 1e-7; const double NaN = -sqrt(-1.0); struct PixelReader{ uint16 sampleFormat; uint8 byteSize; tdata_t buffer; PixelReader(); PixelReader(uint16 _sampleFor...
4,206
1,803
/* * Copyright (c) 2018 Samsung Electronics Co., Ltd. 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,361
826
#include <iostream> #include <cstdint> using namespace std; int64_t GetTotal(int64_t limit) { int64_t total = 0; int64_t a = 0; int64_t b = 1; while (1) { int64_t c = a + b; a = b; b = c; if (a < limit) { bool...
601
231
//Data Structure Course //All Codes Are Written by Krishna //Arrays Representation #include <iostream> using namespace std; int main(){ // this declaration allocates memory in stack at runtime //this is static allocation -->size can't be changed int arr[5]={1,2,3,4,5}; for(int i=0;i<5;i++){ cout...
397
145
/* The MIT License (MIT) Copyright (c) 2015 CStanKonrad 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, p...
1,918
726
#include "../../../../JString.hpp" #include "../../../lang/Void.hpp" #include "./FileTypeDetector.hpp" namespace java::nio::file::spi { // Fields // QJniObject forward FileTypeDetector::FileTypeDetector(QJniObject obj) : JObject(obj) {} // Constructors // Methods JString FileTypeDetector::probeContentType(...
502
199
//https://www.codechef.com/LRNDSA03/problems/SAVKONO/ #include<bits/stdc++.h> #define endl '\n' using namespace std; int main() { ios :: sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int t; cin>>t; while(t--) { int n,z; cin>>n>>z; priority_queue<int> pq...
711
287
/** * > Author: TISparta * > Date: 12-09-18 * > Tags: BIT * > Difficulty: 4 / 10 */ #include <bits/stdc++.h> #define all(X) begin(X), end(X) using namespace std; const int MAX_N = 1e4 + 10, MOD = 1e7 + 7; struct BIT { int* ft; int sz = 0; BIT (int n): sz(n) { ft = new int[n]; fill(ft, ft + n, 0)...
1,390
657
/* * Copyright © 2012-2016 VMware, 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 applic...
1,143
392
/****************************************************************************** * Author(s): Christopher J. Havlicek * * See LICENSE and CONTACTS. ******************************************************************************/ #include "cli.hpp" #include "canvas.hpp" #include "cli/parser.hpp" #include "cmd/command...
28,428
8,697
#include <stdio.h> #include <string> #include "dpiheader.h" #ifdef __cplusplus extern "C" { #endif int c_main(void) { printf("Hello from c_main()\n"); std::string str = "FFFFF"; char* char_out[10]; c_sv_string ( str.c_str() , char_out); printf("------ c in=%s, out=%s\n", str.c_str() , char_out[0]); return...
356
158
// // BitStream.cpp // // Copyright (c) 2018, Applied Informatics Software Engineering GmbH. // All rights reserved. // // SPDX-License-Identifier: Apache-2.0 // #include "IoT/CAN/BitStream.h" #include "Poco/SharedPtr.h" namespace IoT { namespace CAN { BigEndianBitStream::BigEndianBitStream(const char* buffer, st...
1,809
759
#ifndef SPEAKER_HPP #define SPEAKER_HPP #include <cstdint> #include <type_traits> #define SPOS_TO_SCONF(SpeakerConfigurationtype) \ static_cast<std::underlying_type<SpeakerConfiguration>::type>( \ SpeakerConfigurationtype) namespace APAL { enum class SpeakerConfigurati...
6,730
2,210
#include "player.h" #include <PLDuino.h> #include <PLDTouch.h> #include <Adafruit_ILI9341.h> #include "../../utils/utils.h" #include "../ticTacToe.h" Player::Player(){} void Player::place_O(Adafruit_ILI9341 &tft, PLDTouch touch, char board[3][3]){ Point placedIn; bool isValidSelection = false; while(!isValidSele...
932
365
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ int isSymmetricHelper(TreeNode* root1, TreeNode* root2) { if (!root1 || !root2) return root1 == root2; if (root1->va...
588
202
#include <iostream> struct A { int a; int b; }; struct B { A a; A b; }; std::ostream& operator << (std::ostream &os, const A &a) { return os << a.a << " " << a.b; } std::ostream& operator << (std::ostream &os, const B &b) { return os << b.a << " " << b.b; } int main() { B b{11, 23}; std::cout ...
341
142
#include "BezierCurve.h" #include "Mesh.h" #include "imgui/imgui.h" namespace tc { //Some math functions Vector3 QuadraticBezierInterp(const Vector3& a, const Vector3& b, const Vector3& c, float t) { Vector3 d = a + t * (b - a); Vector3 e = b + t * (c - b); return d + t * (e - d); } /* * Not as efficie...
15,901
5,541
/****************************************************************************** * File Name: * hw_i2c_data.cpp * * Description: * Provides implementation details for private I2C data * * 2021 | Brandon Braun | brandonbraun653@gmail.com *******************************************************************...
5,188
1,887
// Own header #include "lib.h" // System header // Third-party header int main() { print_hello(); return 0; }
121
46
/** * 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...
754
265
class Solution { public: void duplicateZeros(vector<int>& arr) { int n=arr.size(), new_n = n; for(int i=0; i<n; i++){ if(arr[i] == 0){ for(int j=n-1; j>i+1; j--) arr[j] = arr[j-1]; i++; if(i<n) arr[i] = 0...
356
132
// Tests heap_profile=1. // Printing memory profiling only works in the configuration where we can // detect leaks. // REQUIRES: leak-detection // // RUN: %clangxx_asan %s -o %t // RUN: %env_asan_opts=heap_profile=1 %run %t 2>&1 | FileCheck %s #include <sanitizer/common_interface_defs.h> #include <stdio.h> #include <s...
716
325
#include<iostream> #include<conio.h> using namespace std; class b1 { public: b1() { cout << "no argument const of the base class b1 is executed " << endl; } ~b1() { cout << "des des b1 " << endl; } }; cla...
782
271
/** * Copyright 2021 Budapest Quantum Computing Group * * 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 applic...
5,449
1,876
/* * 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 ...
7,629
2,452
// Copyright 2015 Patrick Putnam // // 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 o...
2,987
1,006
/* * GeometryKernelPGEOM.cpp * * Created on: Jun 16, 2016 * Author: madbrew */ #if HAVE_CUBIT // entire file #include <iostream> #include <typeinfo> #include <stdexcept> #include "GeometryKernelPGEOM.hpp" #include <string> #include <stk_mesh/base/SkinMesh.hpp> #include <stk_mesh/base/Types.hpp> #include...
10,714
3,770
/* A Bison parser, made by GNU Bison 2.3. */ /* Skeleton interface for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU...
2,846
1,092
#pragma once #include <string> #include <iostream> #include <fstream> #include <utility> #include <memory> #include <vector> #include <typeinfo> #include <stdexcept> #include <algorithm> #include "base.hh" #include "header.hh" #include "io.hh" #include "record-print.hh" namespace PLY { /*! PLY data class * ...
2,801
748
#ifndef SPLITTING #define SPLITTING #include <map> #include <set> #include <string> #include <vector> #include "Exchanging.hh" class Splitting : public Exchanging { public: Splitting(); Splitting(int num_classes, const std::map<std::string, int>& word_classes, std::string corpus_fname...
844
283
// Shortest path in DAG(Direct Acyclic Graph) // Author - rudrajit1729 // Approach - Topologically sort the graph -> Once sorted start from // the required vertex and go right relaxing the edges // Finally you get to the shortest path for every node reachable from that node #include<bits/stdc++.h> #define INF ...
2,634
1,130
#include "Order.h" void Order::setID(int i) { ID = i; } Order::Order(int id, ORD_TYPE r_Type, REGION r_region,int distance ,double money ,int Arr_time ) { ID = (id>0&&id<1000)?id:0; //1<ID<999 type = r_Type; Region = r_region; totalMoney = money; ArrTime = Arr_time; Distance = distance; // added by abdalla...
1,792
760
/*++ Copyright (C) 2020 Autodesk Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
6,972
2,310
#pragma once #include "gmock/gmock.h" #include "IPieceFactory.hpp" #include "IObservableBoard.hpp" namespace Chess { class IObservableBoard; class Location; class IPlayer; namespace Mocks { class PieceFactory : public IPieceFactory { public: MOCK_METHOD3(makePiece, std::unique_ptr<IPiece>(std::weak_ptr<IObse...
380
148
#include "types.h" /* Generated from dpostproc .section .rodata # 0x804732E0 - 0x8049E220 .global lbl_8048D8F8 lbl_8048D8F8: .asciz "/enemy/data/Kabuto/babykabuto_green_s3tc.bti" .skip 3 .global lbl_8048D928 lbl_8048D928: .4byte 0x8CC592E8 .4byte 0x834A8375 ...
10,258
5,844
//---------------------------------Spheral++----------------------------------// // GeomThirdRankTensor -- Geometric Tensor (rank 3) Class. // // This is a very simple, limited functionality rank 3 tensor. Assumes // the thing is dimensioned nDim x nDim x nDim. // // Created by JMO, Thu Jul 17 17:05:58 PDT 2008 //----...
1,149
359
/** * Copyright (C) 2018-present MongoDB, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the Server Side Public License, version 1, * as published by MongoDB, Inc. * * This program is distributed in the hope that it will be useful, * but W...
6,121
1,713
// Copyright 2020 TensorFlow 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 agree...
2,547
784
void PrintPreOrder(TreeNode<int>* root){ if(root==NULL){ return; } cout<<root->data<<" "; for(int i=0;i<root->children.size();i++){ PrintPreOrder(root->children[i]); } }
206
76
#pragma once #include "windowclass.h" #include "video.h" #include "Utils.h" #include "screenUtils.h" #include "mouse.h" #include "keyboard.h" #include "task.h" #include "file.h" #include "gdi.h" #include "Pe.h" #include "gdi/jpeg.h" #include "keyboard.h" #include "mouse.h" #include "window.h" int __kShowWindow(unsign...
8,845
3,683
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "LocalTypeAnalyzer.h" #include <ostream> #include <sstream> namespace type_analyzer { namespace local { void set_dex_t...
2,966
985
#include "pch.h" #include "GraphNode.h" GraphNode::GraphNode() { } GraphNode::~GraphNode() { }
97
44
/* * Copyright (c) 2020-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 ...
4,496
1,564
#include "hzpch.h" #include "GameEngine/Debug/Instrumentor.h" namespace GameEngine { Instrumentor::Instrumentor() : currentSession(nullptr) { } void Instrumentor::beginSession(const std::string& name, const std::string& filepath) { std::lock_guard lock(this->mutex); if (this->currentSession) { // If the...
3,315
1,187
// 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 "components/content_capture/android/test_support/jni_headers/ContentCaptureTestSupport_jni.h" #include "base/android/jni_string.h" #include "bas...
2,917
975
/* Copyright 2017 Clemens Jonischkeit Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed t...
2,401
846
#pragma once #include "AL/Common.hpp" namespace AL { enum class Endians : uint8 { Big, Little, Machine = ((0xFFFFFFFF & 0x00000001) == 0x00000001) ? Little : Big }; }
178
90
#ifndef _LARGE_OBJECT_HPP_ #define _LARGE_OBJECT_HPP_ #include <mutex> #include <vector> class LargeObject { public: explicit LargeObject (int anIndex) : index (anIndex) { data.resize (10000); } LargeObject (const LargeObject &other) { std::unique_lock<std::mutex> lock (copyMutex); data = other...
643
264
#include<bits/stdc++.h> using namespace std; int main() { long long int t,i,k,c=0; long long int a[100000]; scanf("%lld",&t); for(i=0;i<t;i++) { scanf("%lld",&a[i]); } sort(a,a+t); for(i=0;i<t;i++) { if(a[i]==(i+1)) c++; } printf("%lld\n",c); }
318
159
#include <string> #include "Structure.hpp" using namespace std; void help(); void version(); RandType detectRT(string); enum Responder { None, Mode, Seed, Discard, Length, RangeFirst, RangeSecond }; bool argAnalyze(int argc, char *argv[], Customize &c) { if (argc>1) { string firstArg = string(argv[1]); ...
2,824
1,258
#include "utils/utils.hpp" #include <vector> #include <iostream> #include <string> namespace cytnx{ }
104
39
#include "IO.hpp" #include "exception/exception.hpp" #include "number/number.hpp" #include <fstream> #include <iomanip> #include <limits> int IO::loadSDDInfo(std::string directory, Domain& domain) { #ifndef SEQUENTIAL int SDDid; MPI_Comm_rank(MPI_COMM_WORLD, &SDDid); #else int SDDid = 0; #endi...
8,192
2,981
#ifndef DRK_GRAPHICS_TRANSFORM_HPP #define DRK_GRAPHICS_TRANSFORM_HPP #include "lib/glm/mat4.hpp" #include "lib/glm/vec3.hpp" namespace DrkCraft { class Transform { private: mat4 m_matrix; public: Transform(void); // Identity matrix Transform(const mat4& matrix); Tran...
1,208
377
#include "fipch.h" #include "Renderer.h" namespace Flick { Renderer::SceneData* Renderer::s_SceneData = new Renderer::SceneData; void Renderer::BeginScene(OrthographicCamera& camera) { s_SceneData->ViewProjectionMatrix = camera.GetViewProjectionMatrix(); } void Renderer::EndScene() { } void Renderer::Sub...
561
206
/* * Copyright (C) 2012-2013, The BCE Project authors. 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 ...
10,000
3,673
#ifdef _WIN32 #define mainFunc() int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nCmdShow) #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <glew.h> #else #define mainFunc() int main(void) #endif #include <iostream> #include <Ogre.h> #include <RenderSystems/GL/OgreGLTexture...
11,413
4,478
/************************************************************************* * Copyright (C) [2021] by Cambricon, 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 a...
6,813
2,511
#ifndef RAY_HPP #define RAY_HPP #include "vec2.hpp" class Ray { public: Ray(const Vec2& p, const Vec2& v); Vec2 getOrigin() const; Vec2 getDirection() const; void setOrigin(const Vec2& p); void setDirection(const Vec2& v); private: Vec2 origin; Vec2 direction; }; #endif
317
123
/******************************** * Function Pointer * * Function pointer is a pointer that points a function. It is useful when * you considering to use C/C++ together. The syntax is like below (only * show a function pointer that takes two arguments). * * ``` * returntype (*name)(argtype, a...
773
276
/****************************************************************** * * Copyright 2016 Samsung Electronics 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://...
3,844
1,225
#include <iostream> using namespace std; #include "Shape_Yiming_Bi.h" Shape::Shape() { Set_X(0); Set_Y(0); } Shape::~Shape() { // nothing I may do here... } void Shape::Set_X(double input_x) { center_x = input_x; } void Shape::Set_Y(double input_y) { center_y = input_y; } double Shape::Get_X() const { retu...
474
212
//main.cpp #include <iostream> #include "Singleton.h" int main(int argc, char *argv[]) { std::cout << "main work" << std::endl; auto single = Singleton::GetInstance(); std::cout << single << std::endl; } //Singleton.h #ifndef __SINGLETON_H__ #define __SINGLETON_H__ #include <iostream> #include <memory> ...
3,220
1,372
#include "vector.hpp" int main() { int n(in); Vector<int64_t> a(n + 1, in), b(n, in); int64_t res = 0; for (int i = 0; i < n; ++i) { auto r1 = min(a[i], b[i]); auto r2 = min(a[i + 1], b[i] - r1); res += r1 + r2; a[i + 1] -= r2; } cout << res << endl; }
282
152
#include <_pt_trans_votepaper_zocl.hpp> START_ATF_NAMESPACE _pt_trans_votepaper_zocl::_pt_trans_votepaper_zocl() { using org_ptr = void (WINAPIV*)(struct _pt_trans_votepaper_zocl*); (org_ptr(0x1402bfff0L))(this); }; void _pt_trans_votepaper_zocl::ctor__pt_trans_votepaper_zocl() { ...
637
280
#include "Animation.hh" Animation:: Animation(const char* animationUrl, Drawable*& drawable) { reader = new std::ifstream(); reader->open(animationUrl); *reader >> delay; *reader >> row; *reader >> startFrame; *reader >> endFrame; reader->close(); currentFrame = startFrame; this->drawable = drawabl...
745
249
#include <grpc_server_lib/greeter_async_server.hpp> int main(int argc, char** argv) { ServerImpl server; server.Run(); return 0; }
139
57
#include <bits/stdc++.h> using namespace std; typedef intmax_t I; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); I n, m; cin >> n >> m; vector<I> r(n); for (I i = 0; i < n; ++i) { cin >> r[i]; if (i > 0 && r[i] > r[i - 1]) r[i] = r[i - 1]; } I l = n -...
539
281
// MIT License // // Copyright (c) 2021 Krai Ltd // // 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, me...
12,127
4,257
#include <iostream> // Reference out-of-bounds stack memory via a helper function char BufferFetch(char *buffer, size_t index) { return buffer[index]; } int main(int argc, char **argv) { char buffer[256] = {0}; char c = BufferFetch(buffer, 259); std::cout << c << std::endl; }
294
106
--- chrome/browser/download/download_shelf_context_menu.cc.orig 2020-11-13 06:36:36 UTC +++ chrome/browser/download/download_shelf_context_menu.cc @@ -146,7 +146,7 @@ base::string16 DownloadShelfContextMenu::GetLabelForCo : IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS; break; } -#elif ...
588
241
#pragma once #include <functional> namespace cq::utils { template <typename ReturnType, typename... Params, typename... Args> inline ReturnType call_if_valid(const std::function<ReturnType(Params...)> &func, Args &&... args) { if (func) { return func(std::forward<Args>(args)...); }...
824
260
#pragma once #include "../common.hpp" #include "./analyzerWorker.hpp" #include "./deviceConfig.hpp" #include <mlpack/core.hpp> #include <mlpack/methods/kmeans/kmeans.hpp> #include <time.h> #include <unistd.h> #include <semaphore.h> namespace Whisper { class AnalyzerWorkerThread; class DeviceConfig; struct Lea...
10,012
3,144
//-------------------------------------------------- // Atta UI System // repoWindow.cpp // Date: 2021-12-26 // By Breno Cunha Queiroz //-------------------------------------------------- #include <atta/uiSystem/layers/editor/topBar/localWindows/repoWindow.h> #include <atta/fileSystem/fileManager.h> #include <imgui.h> ...
4,880
1,335
#ifndef NPCDB_H #define NPCDB_H #include "vaultserver.hpp" #include "Expected.hpp" #include "BaseContainer.hpp" #include <vector> #include <unordered_map> #include <unordered_set> #include <functional> class sqlite3_stmt; /** * \brief Represents a NPC */ namespace DB { class NPC { private: enum TplFlags :...
1,740
752
/** WA at test 16! http://codeforces.com/contest/475/submission/8223685 16 11 <<<<>><><<<<<><< vv^v^vvvv^v output YES answer NO */ #include<cstdio> /**Floyd 算法. A 权值, D最终是最短距离*/ int A[410][410],D[410][410]; const int inf=1000000; int rowarr[30],colarr[30];// 1: > ^ ; -1: < v int n,m; /**safe assign something to...
1,949
974
//-------------------------------------------------------------------------------------------------- /** \file Game.cpp **/ //-------------------------------------------------------------------------------------------------- #include "Game.h" #include "Debug.h" #include "Renderer.h" #include <stdio.h> #includ...
13,408
6,171
// Copyright (c) 2006, 2007 Julio M. Merino Vidal // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling // Copyright (c) 2009 Boris Schaeling // Copyright (c) 2010 Felipe Tanus, Boris Schaeling // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling // // Distributed under the Boost Software License, Version 1.0. (See ac...
1,362
503
#pragma once #include "../base_def.hpp" #include "LolFeaturedModesQueueGameCategory.hpp" #include "LolFeaturedModesQueueAvailability.hpp" namespace lol { struct LolFeaturedModesQueue { int32_t id; int32_t mapId; std::string name; std::string gameMode; std::string gameMutator; LolFeaturedMode...
1,512
610
/* * Copyright (C) 2019 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "runtime/gmm_helper/gmm_types_converter.h" #include "core/memory_manager/graphics_allocation.h" #include "runtime/helpers/get_info.h" #include "runtime/helpers/surface_formats.h" #include "GL/gl.h" #include "GL/glext.h" us...
2,159
912
#pragma once #include <array> #include <cstddef> #include <functional> #include <type_traits> #include <utility> namespace sp { template<typename> class Small_function; template<typename Return, typename... Args> class Small_function<Return(Args...) noexcept> { public: Small_function() = default; Small_funct...
3,451
1,136
// -*- C++ -*- // // Package: TestAccessGeom // Class: TestAccessGeom // /**\class TestAccessGeom Alignment/CommonAlignmentProducer/test/TestAccessGeom.cc Description: <one line class summary> Implementation: Module accessing tracking geometries for tracker, DT and CSC */ // // Original Author: Gero Fluck...
5,788
2,091
/* iPIC3D was originally developed by Stefano Markidis and Giovanni Lapenta. * This release was contributed by Alec Johnson and Ivy Bo Peng. * Publications that use results from iPIC3D need to properly cite * 'S. Markidis, G. Lapenta, and Rizwan-uddin. "Multi-scale simulations of * plasma with iPIC3D." Mathemat...
23,768
11,080
// Source: https://leetcode.com/problems/add-two-numbers/ // Date: 17.06.2020 // Solution by: David Luna // Runtime: 44ms // Memory usage: 71.2 MB #include <iostream> #include <vector> #include "../lib/linkedListUtils/linkedListUtils.h" #include "../lib/vectorUtils/vectorUtils.h" // Leetcode solution starts class S...
1,485
667
#include "mxAUIContainer.h" #include "mxMainWindow.h" #include "mxAUI.h" BEGIN_EVENT_TABLE(mxAUIContainer,wxAuiNotebook) EVT_AUINOTEBOOK_PAGE_CHANGED(mxID_LEFT_PANELS, mxAUIContainer::OnPageChanged) END_EVENT_TABLE() mxAUIContainer::mxAUIContainer (wxWindow * parent, bool for_side_panel) : wxAuiNotebook(parent, wx...
1,122
474
#include <bits/stdc++.h> using namespace std; map<int, vector<int>> v; map<int, bool> visited; int getConnectedComponentSize(int x) { stack<int> nodes; nodes.push(x); visited[x] = true; int cnt = 0; while (nodes.size() > 0) { int x = nodes.top(); nodes.pop(); cnt += 1...
1,454
531
#include "WidgetSprinkler.h" WidgetSprinkler::WidgetSprinkler(uint8_t ucItem) { _Item=ucItem; memset(pDataStatusTopic,0,sizeof(pDataStatusTopic)); memset(pCmdWaterTopic,0,sizeof(pCmdWaterTopic)); memset(pDataSoilHumidityTopic,0,sizeof(pDataSoilHumidityTopic)); sprintf(pDataStatusTopic,"channel/spr...
1,451
587
#ifndef __REGION_EVENT_REGISTRY_HPP__ #define __REGION_EVENT_REGISTRY_HPP__ #include <geode/Region.hpp> #include <geode/EntryEvent.hpp> #include <string> #include <set> #include "region_event_listener.hpp" #include "event_stream.hpp" namespace node_gemfire { class Region; class RegionEventRegistry { public: Regi...
1,005
322
#include <tank/ComponentsFactory.h> #include <tank/ObjectPool.h> #include <tank/GameObject.h> #include <tank/ResourceManager.h> #include <tank/components/SpriteComponent.h> #include <tank/components/TransformComponent.h> #include <tank/components/HealthComponent.h> #include <tank/components/TankComponent.h> #include <...
4,079
1,493
/* -*- C++ -*- */ /************************************************************************* * Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch) * * For the licensing terms see the file COPYING * ************************************************************************/ #include <stdio.h> #define NUM 10 vo...
1,041
546
/* * Copyright (C) 2011-2021 Intel Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this li...
11,100
4,481
#pragma once #include <glm/glm.hpp> #include <glm/ext/matrix_transform.hpp> #include <memory> #include <string> #include "../Mesh.hpp" #include "../Lighting/BaseLight.hpp" #include "../Line.hpp" namespace glrenderer { struct TransformComponent { glm::vec3 location = glm::vec3(0.0f, 0.0f, 0.0f); glm::vec3 ro...
1,827
765
#include "main.h" namespace States { STRUCT( World EXTENDS StateBase ) { MEMBERS() float angle = 0; void Tick(std::string &next_state) override { (void)next_state; angle += 0.01; ImGui::ShowDemoWindow(); if (mouse.right.pressed...
1,186
389
#include <QString> #include <QHBoxLayout> #include <QLabel> #include <QDebug> #include "configDlg.h" #include "nighsky.h" /********************************************************************************************************************************************************************************** * fu...
12,860
4,263
//---------------------------------------------------------------------------- // // File: ossimGpkgContentsRecord.cpp // // License: LGPL // // See LICENSE.txt file in the top level directory for more details. // // Description: Container class for gpkg_contents table. // //------------------------------------------...
9,590
3,351
//////////////////////////////////////////////////////////////////////////////// // HlTimer // Includes #include "HlTimer.h" #include "BtTime.h" #include "BtString.h" #include "ApConfig.h" //////////////////////////////////////////////////////////////////////////////// // Constructor HlTimer::HlTimer() { m_start = ...
1,245
352
/** * * @file vpp/prediction.hpp * * @brief This is the VPP prediction description file * * @details This file describes the structure of a prediction and adds a few * methods to handle it. A prediction is basically a score, a list * index and an object index within this list. ...
2,658
805