text
string
size
int64
token_count
int64
#include "Spring.h" Spring::Spring(RigidBody2D * join1, RigidBody2D * join2, float springConstant, float damping) { this->join1 = join1; this->join2 = join2; this->springConstant = springConstant; this->damping = damping; this->restDistance = glm::length(join1->getTransform().getPosition() - join2->getTransform(...
1,028
372
// // Created by asalehin on 7/30/20. // #include "RecordingStreamConstants.h" int32_t RecordingStreamConstants::mSampleRate = oboe::DefaultStreamValues::SampleRate; int32_t RecordingStreamConstants::mPlaybackSampleRate = RecordingStreamConstants::mSampleRate; int32_t RecordingStreamConstants::mInputChannelCount = ob...
975
311
// // Created by black on 05.06.18. // #include "Mill.hpp"
60
31
#include "EngineViewWidgetImpl.h" #include <QHBoxLayout> #include <QVBoxLayout> namespace editor::impl { EngineViewWidgetImpl::EngineViewWidgetImpl(QWidget* parent) : EngineViewWidget(parent) , m_EngineFrame(nullptr) { QVBoxLayout* layout = new QVBoxLayout(this); m_EngineFrame = new QFrame(...
396
150
#include "transactdatadialog.h" #include "ui_transactdatadialog.h" TransactDataDialog::TransactDataDialog(QWidget *parent) : QDialog(parent), ui(new Ui::TransactDataDialog) { ui->setupUi(this); } TransactDataDialog::~TransactDataDialog() { delete ui; } void TransactDataDialog::resetWid...
8,273
2,747
#include "master.h" #include "RectangleProgressBar.h" using namespace pyrodactyl; void RectangleProgressBar::Load(rapidxml::xml_node<char> *node) { Element::Load(node); timer.Load(node, "delta_time"); if (NodeValid("bg", node)) bg.Load(node->first_node("bg"), this); if (NodeValid("caption", node)) caption.L...
2,918
1,131
#include "pch.h" //---------------------------- #pragma comment (lib,"user32.lib") //---------------------------- MSGBOX_RETURN OsMessageBox(void *hwnd, const char *txt, const char *title, MSGBOX_STYLE wmb){ int wtype; switch(wmb){ case MBOX_OK: wtype = MB_OK; break; case MBOX_YESNO: wtype = MB_YESNO; ...
875
366
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
802
299
int ds//mX ,t3 , MGA ,s , Kai /*R4k*/,al,C8L , Zt,kW5a ,zNAk , M1l, a5Q7 , K // ,Zj/*ZbNw*/// , xz ,U8 , CQ,pb, msWtM ,PRZEy , wrI , XIc1o , uh,K2s , HR6 ,rvUy3 , Sw/*1*/, t , S8,ha , RH, Na0, q /*9ku*///P1G ,m, v3Wcf , XZ4 ,WxYJ ,OQou , py2, gpl ,h0RF, GyQZ , lVwY4b,sN2 ,c3uy ,dmv,a0,fQ , //...
15,012
10,222
/* * Copyright (c) 2011-2015 BlackBerry Limited. * * 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 ...
3,143
976
// https://leetcode.com/problems/reverse-integer class Solution { public: int reverse(int x) { int sign = (x < 0) ? -1 : 1; std: int64_t bx = x; auto s = std::to_string(std::abs(bx)); std::reverse(s.begin(), s.end()); auto r = std::stoll(s); return (r < IN...
371
148
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <chrono> #include <time.h> #include <utility> #include <string> #include <omp.h> using namespace std; static int _argc; static const char **_argv; const char *get_option_string(const char *option_name, const char *default_value) { for (int i = ...
9,707
3,978
#include "shape.h" Shape::~Shape(){ } bool Shape::moveShape(){ for(int i = 0; i < figure.size(); ++i){ //если конец остановить if(figure.value(i).y() == window->height() - shape_configuration.size.width()){ return true; } } if(shape_configuration.activity){ for(QR...
2,124
679
/** * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #include <memo...
2,606
925
#ifndef VON_MISES_HPP #define VON_MISES_HPP #include <cassert> #include <iostream> #include <utility> #include "2d.hpp" namespace Elasticity { namespace TwoD { template <class Element> struct VonMisesComputer { template <class Vector> VonMisesComputer(const Element &el, const Vector &v, double lambda, doub...
3,176
1,218
#include "HazelDashLayer.h" #include "Components/Amoeba.h" #include "Components/Animation.h" #include "Components/Camera.h" #include "Components/EnemyMovement.h" #include "Components/Explosion.h" #include "Components/Mass.h" #include "Components/PlayerState.h" #include "Components/Roll.h" #include "Random.h" #includ...
49,475
17,319
/** Copyright (c) 2021 Nikolai Wuttke * * 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...
10,437
3,793
// gles3_static_index_buffer.cpp // Created by lulimin on 2020/10/20. #include "gles3_static_index_buffer.h" #include "../render_service.h" #include "../../inc/frame_mem.h" // GLES3StaticIndexBuffer GLES3StaticIndexBuffer* GLES3StaticIndexBuffer::CreateInstance( RenderService* pRS) { GLES3StaticIndexBu...
1,575
645
#include "sge_vk_compute_target.hh" #include "sge_vk_presentation.hh" #include "sge_utils.hh" namespace sge::vk { compute_target::compute_target (const struct vk::context& z_context, const struct vk::queue_identifier& z_qid, const struct sge::app::content& z_content, const size_fn& z_size_fn) : context (z_conte...
20,408
7,143
// Fill out your copyright notice in the Description page of Project Settings. #include "Turret.h" #include "DrawDebugHelpers.h" #include "TurretProjectile.h" #include "TurretSystemFunctionLibrary.h" #include "Components/ArrowComponent.h" #include "Components/AudioComponent.h" #include "Components/SphereComponent.h"...
5,019
1,940
#include "Transform.h" #include "GameObject.h" // ================================================================= // Constructor / Destructor // ================================================================= Transform::Transform(GameObject* entity) : entity_(entity) , translate_matrix_(INativeMatrix::Create()...
2,644
843
// // dup2.cpp // // Copyright (c) Microsoft Corporation. All rights reserved. // // Defines _dup2() and _dup2_nolock, which duplicate lowio file handles // #include <corecrt_internal_lowio.h> static int __cdecl dup2_nolock(int const source_fh, int const target_fh) throw() { if ((_osfile(source_fh) & FOPEN)...
3,710
1,349
Generated 1 VCC(s), 1 remaining after simplification (5 assignments) Encoding remaining VCC(s) using bit-vector/floating-point arithmetic Thread 0 ASSIGNMENT (HIDDEN) func_case_study::$tmp::return_value$_nondet$1?1!0&0#1 == i?1!0&0#0 Thread 0 file MyContract_case_study.sol line 1 function func_case_study ASSIGNMENT ()...
973
421
// Generated from g4files/ELDOLexer.g4 by ANTLR 4.7.1 #include "ELDOLexer.h" using namespace antlr4; using namespace edacurry; ELDOLexer::ELDOLexer(CharStream *input) : Lexer(input) { _interpreter = new atn::LexerATNSimulator(this, _atn, _decisionToDFA, _sharedContextCache); } ELDOLexer::~ELDOLexer() { dele...
87,697
79,311
#include "Matrix.h" // #define _DEBUG_MATRIX_AUTOSOLVE_ Matrix::Matrix(size_t size):size(size){ A.resize(size); B.resize(size); for (unsigned int rowIndex = 0; rowIndex < size; ++rowIndex) { A[rowIndex] = new double[size]; } } Matrix::~Matrix(){ for (unsigned int rowIndex = 0; rowIndex < size; ++rowIndex) {...
4,069
1,584
// include engine headers #include "EngineStd.h" // header for specific component #include "GameAssetRefrigerationUnit.h" const GameAssetType GameAssetRefrigerationUnit::g_Type = GAType_RefrigerationUnit; GameAssetRefrigerationUnit::GameAssetRefrigerationUnit(Context* context) : BaseComponent(context) { } // Game ...
989
319
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
1,930
705
// Copyright Carl Philipp Reh 2006 - 2019. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <sge/log/default_level.hpp> #include <sge/log/default_level_streams.hpp> #include <sge/sys...
1,596
582
/** * * Tennix Archive File Format * Copyright (C) 2009-2010 Thomas Perl <thp@thpinfo.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at y...
6,260
2,316
// Copyright (C) 2016 Gideon May (gideon@borges.xyz) // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, a...
3,286
933
#include "backend.h" #ifdef THREADING __thread Backend* local_backend = nullptr; __thread GarbleCircuit* local_gc = nullptr; #else Backend* local_backend = nullptr; GarbleCircuit* local_gc = nullptr; #endif int greatestPowerOfTwoLessThan(int n) { int k = 1; while (k < n) k = k << 1; return k >> 1; }
310
130
#ifndef Error_hpp #define Error_hpp #include "io.hpp" #include "SDL.hpp" #include "Strings.hpp" #include <system_error> #include <exception> namespace SDL { /// Overload of SDL::LogError that takes std::string inline bool LogError(std::string const &prefix) { return LogError(prefix.c_str()); } /// Overload of...
2,398
816
#ifndef TRAFFIC_HPP #define TRAFFIC_HPP #include "client.hpp" #include "graph.hpp" #include "module.hpp" #include "sim.hpp" #include <queue> #include <random> #include <set> class traffic: public module<sim> { // The set of active clients. std::set<client *> cs; // The queue of clients to delete later. std:...
1,302
446
#include "Command.hpp" #include "utility.hpp" #include "Application.hpp" #include <SFML/System/Err.hpp> #include <iostream> Command::Command(const std::string& tokens, const std::string& data) : m_failed{false} { init_tokens(tokens); init_data(data); if(m_failed) { m_tokens.clear(); m_da...
1,418
549
#include<cstdio> const int N = 102; int s[N][N], t[N][N]; main() { int i, j, k, l, n, m, x, T, C = 1; scanf("%d", &T); while (T--) { scanf("%d %d", &n, &m); for (i = 0; i < n; ++i) for (j = 0; j < n; ++j) scanf("%d", &s[i][j]); for (i = 0; i < n; ++i) for (j = 0; j < n; ++j) ...
1,349
685
# /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt...
1,259
492
// // // #include "RefreshChecker.h" RefreshChecker::RefreshChecker(int size) { previousValues = new int[size]; } int RefreshChecker::PassNew(int id, int value) { if (previousValues[id] != value) { _hasNewData = true; } previousValues[id] = value; return value; } bool RefreshChecker::...
405
161
#include "enginepch.h" #include "RendererAPI.h" namespace Engine { RendererAPI::API RendererAPI::api = RendererAPI::API::OpenGL; }
132
48
class Solution { public: bool checkValidString(string s) { int minLeft = 0, maxLeft = 0; for (char ch : s) { if (ch == '(') { minLeft++; maxLeft++; } else if (ch == ')') { minLeft--; maxLeft--; ...
597
162
/* * Copyright [1999-2013] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
8,017
2,486
#include "/mnt/hgfs/ShareShen/gem5-origin-stable-2015-9-3/build/x86/mem/ruby/slicc_interface/Message.hh"
105
53
#include <iostream> #include <string> using namespace std; int main() { string s1 = "5"; string s2 = "3"; string s3 = s1 + s2; cout << s3 << endl; }
159
66
/* ============================================================ * TabManager plugin for QupZilla * Copyright (C) 2013-2017 S. Razi Alavizadeh <s.r.alavizadeh@gmail.com> * Copyright (C) 2018 David Rosca <nowrep@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms ...
30,880
9,524
#define F_MAIN_APP #include <Fusion.h> #include "SandboxLayer.h" class SandboxApp : public Fusion::Application { public: SandboxApp() { PushLayer(Fusion::CreateRef<Sandbox::SandboxLayer>()); } }; Fusion::Scope<Fusion::Application> Fusion::CreateApplication() { return Fusion::CreateScope<SandboxApp>(); }
314
115
#include "MainWindow.h" #include "ui_mainwindow.h" #include <nodes/Node> #include <nodes/NodeData> #include <nodes/FlowScene> #include <nodes/FlowView> #include <nodes/FlowViewStyle> #include <nodes/NodeStyle> #include <nodes/ConnectionStyle> #include <nodes/DataModelRegistry> #include <QApplication> #include <QScree...
2,614
858
// Copyright (c) 2011-2020 Hiroshi Tsubokawa // See LICENSE and README #include "ObjBuffer.h" int ObjBufferToMesh(const ObjBuffer &buffer, Mesh &mesh) { const int vertex_count = buffer.vertex_count; const int face_count = buffer.face_count; const std::vector<Vector> &P = buffer.vertex_position; const std::vec...
3,206
1,239
#pragma once #include <cstdint> namespace phosphor { namespace fan { namespace presence { /** * @class PresenceSensor * @brief PresenceSensor interface. * * Provide concrete implementations of PresenceSensor to realize * new presence detection methods. * * Note that implementations drive the inventory update p...
2,466
658
#pragma once #include <cstddef> #include <string> #include "colour.hpp" #include "winding_order.hpp" namespace cl { struct WindowCreateInfo { size_t width = 1280; size_t height = 720; std::string title; bool center = true; bool enable_backface_cull = true; WindingOrder front_face = WindingOrder::kClockw...
474
173
// File: utils.cc // Author: Yuxin Wu <ppwwyyxxc@gmail.com> #include "lib/utils.hh" using namespace std; string TERM_COLOR(int k) { // k = 0 ~ 4 ostringstream ss; ss << "\x1b[3" << k + 2 << "m"; return ss.str(); } void c_printf(const char* col, const char* fmt, ...) { va_list ap; va_start(ap, fmt); printf("%...
578
268
// Copyright 2018 Aman Mehara // // 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 ...
1,191
407
#include "MapTile.h" #include <utility> MapTile::MapTile(FloorTile floor_tile) : m_floor_tile(std::move(floor_tile)) {} const FloorTile& MapTile::floor_tile() const { return m_floor_tile; }
193
84
#include "util_check.h" #include <utility> #include <stdexcept> #include "gtest/gtest.h" #include "matrix_index.h" using namespace dla_interface; using namespace testing; class MockMatrix { public: MockMatrix(std::pair<SizeType, SizeType> size) : size_(size) {} std::pair<SizeType, SizeType> size() const { ...
5,143
2,081
//Hacer un programa que cuente el numero de palabras que contiene un archivo de texto #include <fstream> #include <ctype.h> #include <string> #include <iostream> #include<exception> using namespace std; int main() { ifstream X1; ifstream X2; char b,c,ban; X1.open("A.txt"); X2.open("B.txt"); if...
868
325
#include "Test.h" #include <nlohmann/json.hpp> TEST_CASE("Nets") { auto tree = SyntaxTree::fromText(R"( module Top; wire logic f = 1; endmodule )"); Compilation compilation; compilation.addSyntaxTree(tree); NO_COMPILATION_ERRORS; } TEST_CASE("Bad signed specifier") { auto tree = SyntaxTree::f...
10,582
3,719
#include <iostream> #include <vector> #include "leetcode.hpp" using namespace std; // ref: Java O(1) // https://leetcode.com/problems/bulb-switcher-ii/discuss/107269/Java-O(1) class Solution { public: // n and m both fit in range [0, 1000]. int flipLights(int n, int m) { if (m == 0 || n == 0) return 1; ...
655
297
#include <bits/stdc++.h> #define MAXN 100010 using namespace std; char a[MAXN],b[MAXN],s[MAXN]; int n,k,ans,l,r,nxt[MAXN]; inline void GetNext(char S[], int len) { int i = 0, j = -1; nxt[0] = -1; while (i != len) { if (!~j || S[i] == S[j]) nxt[++i] = ++j; else j = nxt[j]; } return ; } inline int KMP(char S...
923
539
#ifndef INVOKE_INVOKERCONFIG_HPP #define INVOKE_INVOKERCONFIG_HPP #include <string> #include <vector> #include "InvokerProfile.hpp" class InvokerConfig { public: explicit InvokerConfig(const InvokerProfile &profile); double timeLimit = -1; double wallLimit = -1; long memoryLimit = -1; int stdin_...
1,015
358
#pragma once #include <iostream> #include <async\logger.hpp> namespace async { class ASYNC_LIB_API logger_wostream : public logger { public: logger_wostream(std::wostream& stream) noexcept; public: virtual void message(std::wstring_view text) noexcept override; virtual...
883
290
// 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...
2,453
862
#include <mpi.h> #include <cmath> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <sstream> extern "C" void FMM_Init(); extern "C" void FMM_Finalize(); extern "C" void FMM_Partition(int & ni, double * xi, double * yi, double * zi, double * vi, int & nj, double * xj, doubl...
2,540
1,214
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
4,993
1,671
#include <iostream> #include "Employee.h" #include "Date.h" using namespace std; Employee::Employee( const string &first, const string &last, const string &ssn, int month, int day, int year) : firstName(first), lastName(last), socialSecurityNumber(ssn), birthDate(month, day, year) { } ...
1,197
375
#include "Includes.hpp" #include "Utils.hpp" #include "Thread.hpp" using namespace std; string getModPath() { if (fs::exists("bin64/paths.xml")) { ifstream i("bin64/paths.xml"); string buffer; while (getline(i, buffer)) { if (buffer.find("res_mods") != string::np...
1,991
641
// // Copyright 2020 Christoph Sprenger // // 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 agr...
12,806
5,099
// -*- C++;indent-tabs-mode: t; tab-width: 4; c-basic-offset: 4; -*- /* * descriptor_test.cpp * * Test suite program for C++ bindings */ #include <iostream> #include <iomanip> #include "usbpp.h" using namespace std; int main(void) { USB::Busses buslist; cout << "bus/device idVendor/idProduct" << endl; /...
2,375
928
// *************************************************************************** // // Generated automatically by genwrapper. // Please DO NOT EDIT this file! // // *************************************************************************** #include <osgIntrospection/ReflectionMacros> #include <osgIntrospection/Type...
5,633
1,940
/* ============================================================================== This file is part of the JUCE library. Copyright (c) 2015 - ROLI Ltd. Permission is granted to use this software under the terms of either: a) the GPL v2 (or any later version) b) the Affero GPL v3 Details of these ...
3,120
847
#include "SimpleTextureShader.h" using namespace DirectX::SimpleMath; D3D11_INPUT_ELEMENT_DESC SimpleTextureShader::IED[2] = { { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 }, }; SimpleTextureSh...
6,504
2,301
#pragma warning(disable: 4996) #include <iostream> #include <string> #include "product.h" #include "general.h" using namespace std; const char* Product::categories[] = {"Children","Office","Electricity","Clothes"}; int Product::s_counter = 0; //constructor . Product::Product(Item e_category, const string& itemName...
1,332
454
#include <iostream> #include <stdio.h> using namespace std; struct Person{ const char *firstName; const char *lastName; int age; }; template <class T> //typename and class are interchangeable here T min(T &a, T&b){ cout << "Type of T in min is: " << typeid(a).name() << endl; // Invoke program wit...
1,600
566
// =========================================================================== // Copyright 2007 Gennaro Prota // // Licensed under the 3-Clause BSD License. // (See accompanying file 3_CLAUSE_BSD_LICENSE.txt or // <https://opensource.org/licenses/BSD-3-C...
2,707
836
#include "ElementGeometry.hpp" #include "foundation/ArgumentException.hpp" #include "foundation/OutOfBoundsException.hpp" #include "System.hpp" #include "foundation/memory/pointer.hpp" namespace ade = axis::domain::elements; namespace adi = axis::domain::integration; namespace afb = axis::foundation::blas; namespace a...
7,524
2,616
// MUST include this #include <catch2/catch.hpp> // File being tested #include <lbann/transforms/vision/random_affine.hpp> #include "helper.hpp" // Note: This is *random* so we only do basic checks. TEST_CASE("Testing random affine preprocessing", "[preproc]") { lbann::utils::type_erased_matrix mat = lbann::utils::...
2,923
1,195
CHARFORMAT cf; // Modify the word format so that the selected word is // displayed in bold and not striked out. cf.cbSize = sizeof(cf); cf.dwMask = CFM_STRIKEOUT | CFM_BOLD; cf.dwEffects = CFE_BOLD; m_myRichEditCtrl.SetWordCharFormat(cf);
239
92
#include <gct/format.hpp> namespace gct { bool is_bgra( vk::Format format ) { if( format == vk::Format::eB4G4R4A4UnormPack16) return true; else if( format == vk::Format::eB5G6R5UnormPack16) return true; else if( format == vk::Format::eB5G5R5A1UnormPack16) return true; else if( format == vk::Format::e...
1,270
531
/** * Compile command : gcc -o gfalt_copyfile gfalt_copyfile.c `pkg-config --libs --cflags gfal_transfer` */ #include <gtest/gtest.h> #include <gfal_api.h> #include <stdio.h> #include <stdlib.h> #include <utils/exceptions/gerror_to_cpp.h> #include <transfer/gfal_transfer.h> #include <common/gfal_lib_test.h> #includ...
3,309
1,199
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. #include "FPSProject.h" //#include "CardInvUIWidget.h" #include "FPSHud.h" AFPSHud::AFPSHud(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP) { // set the crosshair texture static ConstructorHelpers::FObjectFinder<UTexture2D> Crosshair...
4,402
1,709
module; #include <vulkan/vulkan.h> #include "Core/DebugUtils.h" module Graphics:Vulkan.CmdList; import :Vulkan.Context; import :Vulkan.Viewport; import :Vulkan.Queue; namespace GFX { AVulkanCmdList::AVulkanCmdList(const VkCommandBuffer handle, const VkCommandBufferLevel level, const VkPipelineStageFlags waitStages) ...
4,352
1,770
#include <vector> #include "command.h" #include "character.h" #include "player.h" #include <iostream> #include "world.h" void Command::North() { Player player = world_.GetPlayer(); if (world_.get_tile_at_position(player.GetX(),player.GetY() - 1) != '.') return; else player.SetY(player.GetY() - 1); world_.S...
4,073
1,767
#include <iostream> #include <cstdlib> #include "llcpInt.h" using namespace std; int FindListLength(Node* headPtr) { int length = 0; while (headPtr != 0) { ++length; headPtr = headPtr->link; } return length; } bool IsSortedUp(Node* headPtr) { if (headPtr == 0 || headPtr->link == 0) // ...
8,312
2,759
// // Created by Jonas Fuhrmann on 10.07.18. // #include <BLEDevice.h> #include <Esp.h> #include "BLEHandler.h" #define SERVICE_UUID "476d099e-1ff4-43c0-9e36-23f4280ec5f7" #define CHARACTERISTIC_UUID "19f220b8-2adf-4c46-867c-c75b208ba652" BLEHandler::BLEHandler(BLECharacteristicCallbacks *callbacks) { uin...
1,019
400
/****************************************************************************** * * Copyright (C) 2021 by * The Salk Institute for Biological Studies * * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. * ***********...
2,190
672
#ifndef _ROBOT_HG_ #define _ROBOT_HG_ #include <WPILib.h> #include <Commands/Command.h> #include <Commands/DriveWithJoystick.hpp> #include <Commands/DriveWithTriggers.hpp> #include <Commands/GenericControl.hpp> #include <Commands/CVControl.hpp> #include <Commands/Scheduler.h> #include <SmartDashboard/SendableChooser.h...
1,050
389
//--------------------------------------------------------------------------- // Greenplum Database // Copyright (C) 2012 EMC Corp. // // @filename: // IMDProvider.cpp // // @doc: // Abstract class for retrieving metadata from an external location // // @owner: // // // @test: // // //------------------------------...
1,376
552
// // Copyright (C) 2000-2020 - Colen M. Garoutte-Carson <colen at cogmine.com>, Cog Mine LLC // // Status: Good #ifndef COGS_HEADER_OS_GUI_SCROLL_BAR #define COGS_HEADER_OS_GUI_SCROLL_BAR #include "cogs/sync/transactable.hpp" #include "cogs/sync/resettable_timer.hpp" #include "cogs/gui/scroll_bar.hpp" #include "...
14,349
6,092
class Solution { public: int surfaceArea(vector<vector<int>>& grid) { int total = 0; for (int i = 0; i < grid.size(); ++i) { for (int j = 0; j < grid[i].size(); ++j) { if (grid[i][j] > 0) { total += grid[i][j] * 4 + 2; if (i > 0) { ...
619
210
/// /// Copyright (C) 2015, Dependable Systems Laboratory, EPFL /// Copyright (C) 2014-2019, Cyberhaven /// /// 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, includin...
9,524
3,023
#include "sha3.h" #include "internal.h" #include "ethash.h" extern "C" bool ethash_get_default_dirname(char* strbuf, size_t buffsize); #ifdef _WIN32 #define MODULE_API __declspec(dllexport) #else #define MODULE_API #endif extern "C" MODULE_API uint64_t ethash_get_datasize_export(uint64_t const block_number) { retur...
2,152
909
// Copyright 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 in ...
2,433
875
#include <boost/preprocessor/list/to_tuple.hpp>
48
18
/*Se anula todo lo referente a Space Panic y Cosmic Guerrilla*/ /*************************************************************************** Space Panic memory map 0000-3FFF ROM 4000-5BFF Video RAM (Bitmap) 5C00-5FFF RAM 6000-601F Sprite Controller 4 bytes per sprite byte 1 - 80 = ? ...
57,296
30,252
#ifndef MARKUSJX_CSV_BASIC_CSV_FILE_DEF_HPP #define MARKUSJX_CSV_BASIC_CSV_FILE_DEF_HPP #include "escape_sequence_generator.hpp" namespace markusjx { /** * A csv file * * @tparam T the char type of the file * @tparam Sep the separator to use * @tparam _escape_generator_ the escape sequenc...
572
214
#if !defined(_DUDP_SERVER_HPP_) #define _DUDP_SERVER_HPP_ #include <array> #include <memory> #include <string> #include <boost/asio/io_service.hpp> #include <boost/asio/ip/udp.hpp> namespace dudp { class server { private: boost::asio::ip::udp::socket socket_; boost::asio::ip::udp::endpoint remote_endpoint_;...
768
289
#include "dmzRuntimeContext.h" #include "dmzRuntimeContextResources.h" #include <dmzRuntimeHandle.h> #include <dmzRuntimeLog.h> #include <dmzRuntimePluginInfo.h> #include <dmzRuntimeResourcesObserver.h> /*! \file dmzRuntimeResourcesObserver.h \ingroup Runtime \brief Contains ResourcesObserver class. \enum dmz::Resou...
6,175
1,878
#include "mocosMath.cpp" #include "weighted_sampling.cpp" #include "age_dep_sampler.h"
87
37
#include <tm_kit/infra/Environments.hpp> #include <tm_kit/infra/TerminationController.hpp> #include <tm_kit/infra/RealTimeApp.hpp> #include <tm_kit/basic/ByteData.hpp> #include <tm_kit/basic/VoidStruct.hpp> #include <tm_kit/basic/TrivialBoostLoggingComponent.hpp> #include <tm_kit/basic/real_time_clock/ClockComponent.h...
3,929
1,286
#include "RetirementReward.h" URetirementReward::URetirementReward() { this->characterID = NULL; }
105
42
#include "XSCommon/XSCommon.h" #include "XSCommon/XSCvar.h" #include "XSCommon/XSCommand.h" #include "XSRenderer/XSRenderer.h" #include "XSRenderer/XSBackend.h" #include "XSRenderer/XSImagePNG.h" #include "XSRenderer/XSRenderCommand.h" namespace XS { namespace Renderer { namespace Backend { static const size_...
1,427
621
/* * Copyright (c) 2012-2018 Robin Degen * * 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,...
2,787
1,067
/** * Copyright 2021-2022 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...
6,205
2,249