text
string
size
int64
token_count
int64
/* Breaking Point Mod for Arma 3 Released under Arma Public Share Like Licence (APL-SA) https://www.bistudio.com/community/licenses/arma-public-license-share-alike Alderon Games Pty Ltd */ class CfgBody { class head_hit { memoryPoint = "pilot"; variation = 0.08; }; class body { memoryPoint = "aimPoint...
1,006
440
/*********************************************************************//** * \author Rachel Weissman-Hohler * \created 02/01/2017 * \modified 03/08/2017 * \course CS467, Winter 2017 * \file ItemType.hpp * * \details Header file for ItemType class. Defines the members and * ...
16,353
4,307
#include <mbed.h> #include <EthernetInterface.h> #include "http_server.h" #include "http_response_builder.h" DigitalOut led(LED1); EthernetInterface eth; // Requests come in here void request_handler(ParsedHttpRequest* request, TCPSocket* socket) { printf("Request came in: %s %s\n", http_method_str(request->get...
2,010
658
/* * Copyright (c) 2013-2016 Masahide Kashiwagi (kashi@waseda.jp) */ #ifndef COMPLEX_HPP #define COMPLEX_HPP #include <iostream> #include <cmath> #include <kv/convert.hpp> namespace kv { template <class T> class complex; template <class C, class T> struct convertible<C, complex<T> > { static const bool value...
9,463
4,252
#include "../../Flare.h" #include "FlareCompanyMenu.h" #include "../Components/FlarePartInfo.h" #include "../Components/FlareCompanyInfo.h" #include "../../Game/FlareGame.h" #include "../../Game/FlareCompany.h" #include "../../Player/FlareMenuManager.h" #include "../../Player/FlareMenuPawn.h" #include "../../Player/Fl...
7,496
2,977
#include <iostream> /* * 使用递减运算符打印10到0之间的整数 */ int main() { int base = 10; while(base >= 0){ std::cout << base << std::endl; --base; } return 0; }
181
92
//DIP switch //used for Nintendo Super System emulation DIP dip; #include "serialization.cpp" auto DIP::power() -> void { } auto DIP::read(n24, n8) -> n8 { return value; } auto DIP::write(n24, n8) -> void { }
215
90
#include "Spy.h" #include <Shlwapi.h> #include <Windows.h> #include <iostream> #include <vector> #include <list> #include "CustomCommandInvoker.h" #include "CustomCommandManager.h" #include "spy_interfaces.h" // internal command function handlers int freeBufferCommand(FreeBufferCmdData* commandData); int loadPredifn...
13,857
4,567
#include "mainframe.h" #include "ui_mainframe.h" MainFrame::MainFrame(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainFrame) { ui->setupUi(this); QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL"); db.setHostName("localhost"); db.setPort(5432); db.setUserName("omarket"); db.setDatabas...
1,077
379
// { dg-do compile { target c++14 } } // Copyright (C) 2014-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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 Found...
1,121
397
#include <iostream> using namespace std; const int MAX_SIZE = 100; class Stack { private: int cur; int *buf; int capacity; public: Stack(int capa = MAX_SIZE) { capacity = capa; cur = -1; buf = new int[capa]; } void updateQueue() { // if (bufFilled) { for (int i = 0; i < cur; i++) { ...
1,260
502
/** * Copyright (C) 2016 D Levin (http://www.kfrlib.com) * This file is part of KFR * * KFR 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 your option) any lat...
8,022
3,338
/////////////////////////////////////////////////////////////////////////////// /// \file FilesystemWindows.cpp /// \author Hector Stalker <hstalker0@gmail.com> /// \version 0.1 /// /// \brief Cross-platform filesystem handling code - Windows specific /// /// \copyright Copyright (c) 2014, Hector Stalker. All rights re...
1,472
462
/* Copyright (c) 2014-2015 Andreas Rain 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, distr...
12,344
3,801
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "Fonts/FontProviderInterface.h" UFontProviderInterface::UFontProviderInterface(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { }
228
75
/* * Unpublished Copyright (c) 2009-2017 AutonomouStuff, LLC, All Rights Reserved. * * This file is part of the network_interface ROS 1.0 driver which is released under the MIT license. * See file LICENSE included with this software or go to https://opensource.org/licenses/MIT for full license details. */ #include <ne...
2,309
851
#include "process_queries.h" #include <algorithm> #include <execution> #include <iterator> #include <string> #include <vector> #include "document.h" #include "search_server.h" std::vector<std::vector<Document>> ProcessQueries(const SearchServer& search_server, const std::vector<std::string>& queries) { std::vect...
1,094
320
#include <fs/Formats/FAT/FAT32/FATPartition.h> #include <fs/Formats/FAT/FAT32/Directory.h> #include <fs/Formats/FAT/FAT32/FAT.h> using namespace UnifiedOS; using namespace UnifiedOS::FileSystem; using namespace UnifiedOS::FileSystem::FAT32; #include <common/cstring.h> //Needed for path interaction Fat32Partition::Fa...
30,734
7,660
#include "variable.hpp" // globale variable int32_t gVar[VARIABLE_COUNT]; int32_t sysVar[SYSTEM_VARIABLE_COUNT]; void initGlobaleVariable() { for(int32_t i = 0; i < VARIABLE_COUNT; ++i) gVar[i] = 0; for(int32_t i = 0; i < SYSTEM_VARIABLE_COUNT; ++i) sysVar[i] = 0; } void resetGlobaleVariableAndString() { ...
1,608
680
#include "common.h" #include "main.h" #include "General.h" #include "ModelIndices.h" #include "FileMgr.h" #include "Streaming.h" #include "Replay.h" #include "Camera.h" #include "DMAudio.h" #include "Wanted.h" #include "Coronas.h" #include "Particle.h" #include "Explosion.h" #include "World.h" #include "HandlingMgr.h"...
31,561
14,736
#include "Vulkan/RendererBackend/vAccelerationStructure.h" #include <Vulkan/Utilities/vAccelerationStructureUtil.h> void vBLAS::generateBLAS(VkCommandBuffer commandBuffer, mageVKBuffer& scratchBuffer, VkDeviceSize scratchOffset, bool updateOnly) const { const VkAccelerationStructureNV previousStructure = updateOnly...
503
168
/* generate the tms9995 emulator */ #include "tms9900.h" #define TMS99XX_MODEL TMS9995_ID #include "99xxcore.h"
116
62
#include <mutex> #include <nano/logger.h> #include <nano/tensor/stream.h> #include <nano/gboost/wlearner_dstep.h> #include <nano/gboost/wlearner_dtree.h> #include <nano/gboost/wlearner_hinge.h> #include <nano/gboost/wlearner_stump.h> #include <nano/gboost/wlearner_table.h> #include <nano/gboost/wlearner_affine.h> usin...
2,342
882
/* ----------------------------------------------------------------------------- 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/LICENS...
1,727
511
// // Created by James Noeckel on 4/7/20. // #include <iostream> #include "utils/top_k_indices.hpp" #include "utils/sorted_data_structures.hpp" int main(int argc, char **argv) { bool passed = true; { std::vector<int> sorted_vec; sorted_insert(sorted_vec, 0); sorted_insert(sorted_vec, 0...
1,965
723
#include "dreal/util/precision_guard.h" namespace dreal { PrecisionGuard::PrecisionGuard(std::ostream* os, const std::streamsize precision) : os_{os}, old_precision_(os->precision()) { os_->precision(precision); } PrecisionGuard::~PrecisionGuard() { os_->precision(old_precision_)...
347
121
//------------------------------------------------------------------------------ // ResourceStress.cc //------------------------------------------------------------------------------ #include "Pre.h" #include "Core/Main.h" #include "IO/IO.h" #include "Gfx/Gfx.h" #include "Dbg/Dbg.h" #include "HttpFS/HTTPFileSystem.h" ...
7,874
2,494
/* Copyright (C) 2013-present The DataCentric Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to ...
21,781
6,147
//******************************************************** // Syzygy is licensed under the BSD license v2 // see the file SZG_CREDITS for details //******************************************************** #include "arPrecompiled.h" #define SZG_DO_NOT_EXPORT #include "arGraphicsClient.h" #include "arFramerate...
8,397
2,743
#include<iostream> #include<cmath> using namespace std; class fraction{ private: int num; int den; public: fraction(int ,int ); fraction(); void lowterms(); void dislay(); void set_num(int tnum){ this->num=tnum; } void set_den(int tden){ this->den=tden; } void sum(fract...
2,754
1,262
/* Cleaning Up */ #include<bits/stdc++.h> using namespace std; void fun() { int m,n,k,i; cin>>m>>n; vector<int> v(m+1,0); for(i=0;i<n;i++) { cin>>k; v[k]=1; } k=0; for(i=1;i<=m;i++) { if(v[i]==0) { if(k==0) { v[i]=1; k=1; cout<<i<<' '; } ...
523
282
#include <iostream> using namespace std; main() { int r,c; cout<<"ENTER THE ROWS OF MATRICES= "; cin>>r; cout<<"ENTER THE COLUMN OF MATRICES= "; cin>>c; int a[r][c]; for(int i=0;i<r;i++) { for (int j=0;j<c;j++) { cout<<"Enter no= "; cin>>a[i][j]; } } cout<<"\t\t\tOrignal Matrice:...
652
378
// © 2018 Joseph Cameron - All Rights Reserved #include <gdkgraphics/buildinfo.h> #include <gdk/glh.h> #include <gdk/webgl1es2_shader_program.h> #include <atomic> #include <iostream> #include <sstream> #include <stdexcept> #include <vector> using namespace gdk; static constexpr char TAG[] = "shader_program"; //! ...
20,668
6,932
#include "scene.h" #include "sceneMgr.h" #include <aoe/aoe.h> Scene::Scene(SceneID sceneID) { _sceneID = sceneID; _sceneType = SCENE_NONE; _sceneStatus = SCENE_STATE_NONE; } Scene::~Scene() { } GroupID Scene::getGroupID(ServiceID avatarID) { auto entity = getEntityByAvatarID(avatarID); if (entity...
14,860
5,159
//@group Layers #include "Layer_Console.h" #include "core_Log.h" #define LOG_MESSAGE(...) LOG_TRACE(__VA_ARGS__) namespace Engine { Layer_Console::Layer_Console() { } Layer_Console::~Layer_Console() { } void Layer_Console::Update(float a_dt) { } void Layer_Console::HandleMessage(Message * a...
394
165
#include <type_traits> namespace elle { namespace reactor { /*----. | End | `----*/ template <typename T> Generator<T>::End::End(Generator<T> const& g) : elle::Error(elle::sprintf("%s exhausted", g)) {} /*-------------. | Construction | `-------------*/ template <ty...
4,044
1,205
#include <stdio.h> #include <string.h> #include <stdlib.h> #include "freertos/FreeRTOS.h" #include "esp_system.h" #include "esp_event.h" #include "esp_event_loop.h" #include <nvs.h> #include <nvs_flash.h> #include "aws_iot_config.h" #include "aws_iot_log.h" #include "aws_iot_version.h" #include "aws_iot_mqtt_client_int...
13,219
4,982
#include <cassert> #include <mutex> #include <sstream> #include "Audio.h" #include "InputDevice.h" #include "onut.h" #include "Window.h" using namespace DirectX; // Our engine services onut::Window* OWindow = nullptr; onut::Renderer* ORenderer = nullptr; onut::Settings* ...
15,360
4,418
/********************************************************************************************************* * Containerlogger.cpp * Note: Phoenix Container * Date: @2015.03 * E-mail:<forcemz@outlook.com> * Copyright (C) 2015 The ForceStudio All Rights Reserved. ***********************************************************...
1,482
550
/**************************************************************************** Copyright (c) 2008-2020 Kevin Wu (Wu Feng) github: https://github.com/kevinwu1024/ExtremeCopy site: http://www.easersoft.com Licensed under the Apache License, Version 2.0 License (the "License"); you may not use this file except in compli...
2,630
787
/* * Copyright (C) 2021-2022 Konstanty Misiak * * SPDX-License-Identifier: MIT */ #include "scene/entity.hpp" namespace k2d { Entity::Entity(entt::entity handle, Scene& scene) : m_handle(handle), m_sceneRef(scene) { } } // namespace k2d
274
112
#include "block_out.h" #include <stdio.h> struct UserType1 { int d_i; double d_d; }; class UserType2 { int d_i; double d_d; public: UserType2() {} ~UserType2() {} }; class Source { public: block::out<void()> out0; block::out<void(const char*)> out1; block::out<void(const char*, ...
4,786
1,967
#include <nan.h> #include <v8.h> #include "SecondaryTilesLib.h" #include "TileOptions.h" using v8::Local; using v8::String; using v8::Boolean; using v8::Integer; SecondaryTiles::TileOptions ToTileOptions(TileOptions* tileOptionsObject) { SecondaryTiles::TileOptions tileOptions; tileOptions.Square70x70Logo = tileOp...
7,411
2,813
/* Copyright (C) 2008 Grame 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 your option) any later version. This program is distributed in the hope that it wi...
14,738
4,798
#pragma comment(linker, "/stack:640000000") #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iomanip> #include <iterator> #include <list> #include <ma...
2,744
1,024
#include "CommonPrecompiled.h" #include "NetworkEngine.h" #include "OnyxTransfer.h" #include "HTTP.h" #include "UDPBase.h" #include "TCPBase.h" #include "ByteArray.h" //handle closing connections //handle timeouts //handle sending queue //handle arbitrary connect requests int main(int argc, char** argv) { ArgPars...
3,025
1,152
// https://adventofcode.com/2019/day/12 #include <catch.hpp> #include <numeric> #include "day12-lib.h" TEST_CASE("sample after 1 timestep should be correct", "[part_one]") { const std::vector<Moon> sample_moons{ Moon{{-1,0,2}, {0,0,0}}, Moon{{2,-10,-7}, {0,0,0}}, Moon{{4,-8,8}, {0,0,0}}, ...
4,546
1,971
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i <= n; i++) #define FORR(i, m, n) for (int i = m; i >= n; i--) #define SORT(v, n) sort(v, v + n) #define MAX 100000 #define inf 1000000007 using namespace std;...
1,248
599
#include "Hpipe/Stream.h" #include <iostream> #include <fstream> using namespace std; int usage( const char *prg, const char *msg, int res ) { if ( msg ) std::cerr << msg << std::endl; std::cerr << "Usage:" << std::endl; std::cerr << " " << prg << " cpp_var_name input_file" << std::endl; retur...
1,086
410
#include <iostream> #include <cstdio> #include <vector> #include <tuple> using namespace std; const int MAXN = 200005; int color[MAXN]; vector<int> g[MAXN]; vector<pair<int, int>> edges; void dfs(int v, int p, bool &possible) { if (!possible) { return; } color[v] = color[p] + 1; color[v] -= 2 * (color[...
1,086
472
/* ----------------------------------------------------------------------------- The MIT License (MIT) Copyright (c) 2018 Jean Michel Catanho 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 witho...
2,877
1,009
// 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 ...
1,091
381
#include "rtc_audio_track_impl.h" namespace libwebrtc { AudioTrackImpl::AudioTrackImpl( rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track) : rtc_track_(audio_track),_renderer(nullptr) { RTC_LOG(INFO) << __FUNCTION__ << ": ctor "; if(rtc_track_){ strncpy(id_, rtc_track_->id().c_str(),...
2,757
841
/* Copyright 2021 Tim Jammer 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 writing, software d...
8,548
3,534
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2000 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 o...
14,785
4,934
class Solution { public: string addStrings(string num1, string num2) { int n1 = num1.size(), n2 = num2.size(); string& res = n1 > n2 ? num1 : num2; int n_res = max(n1, n2); int d = 1; int sum, carry = 0; while (d <= n_res) { if (n1 - d < 0) { ...
989
365
//=================================================================================================================== // // HeapMergeRight.cc -- Merge the freeing block with the block to the right if free as well // // Copyright (c) 2017-2020 -- Adam Clark // Licensed under "THE BEER-WARE LICENSE" // ...
2,365
744
#include "l_Message.hpp" Message* lua_pushmessage(lua_State *L, Message* message) { if (message == nullptr) { message = Messenger::getInstance()->appendMessage(); } Message ** messagePtr = static_cast<Message**> (lua_newuserdata(L, sizeof(Message*))); *messagePtr = message; luaL_getmetata...
5,264
1,916
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include <RcppEigen.h> #include <Rcpp.h> using namespace Rcpp; #ifdef RCPP_USE_GLOBAL_ROSTREAM Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); Rcpp::Rostream<false>& Rcpp::Rcerr...
6,810
3,121
// c'est le fichier embêtant... // il contient un singleton qu'il faut à tout prix initialiser #include "toto.h" #include <iostream> using namespace std; extern int main_use; // déclaré dans z.cpp (exécutable) extern int internal_use; // déclaré dans a1.cpp (ce module) // la classe du singleton cl...
593
204
class Solution { public: vector<string> getFolderNames(vector<string>& names) { unordered_map<string,int> mp; vector<string> ans; int j; for(int i=0;i<names.size();i++) { j = mp[names[i]]; string temp...
734
199
#include<type_traits> template<typename T1,typename T2> auto max(T1 a,T2 b) -> typename std::decay< decltype(true ? a:b)>::type { return b < a ? a :b; }
157
67
#include<iostream> #include<vector> #include<math.h> #include<sstream> #include<string> #include <SFML/Graphics.hpp> using namespace std; using namespace sf; #define SCREEN_W 600 #define SCREEN_H 600 #define LEVEL_MAX 4 #define CAPACITY 5 //efficiency changes with capacity #define PI 3.14159265 #define SPEED 0.5f str...
12,737
3,538
// Fill out your copyright notice in the Description page of Project Settings. #include "ShooterGame.h" #include "ShooterWeapon_Melee.h" AShooterWeapon_Melee::AShooterWeapon_Melee(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { CollisionComp1P = ObjectInitializer.CreateDefaultSubobject<UCa...
4,768
1,878
//============================================================================== // Copyright (c) 2015 - Thomas Retornaz // // thomas.retornaz@mines-paris.org // // Distributed under the Boost Software License, Version 1.0. ...
3,725
1,185
#include "Task.h" #include "Thread.h" Task::Task(): E_Priority(ETaskPriority::Low), E_TaskType(ETaskType::TT_GENERAL), B_HasBeenCompleted(false) { } Task::Task(ETaskPriority newPriority, ETaskType newType) : E_Priority(newPriority), E_TaskType(newType), B_HasBeenCompleted(false) { } Task::Task(std::shared_ptr<Task...
637
263
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <gst/gst.h> #include <gst/video/video.h> #include <gst/video/gstvideofilter.h> #include "gstpartassembly.h" #include <ctime> #include <iostream> #include <fstream> #include <regex> #include <string> #include <vector> #include "gstadmeta.h" #include "utils.h" #de...
40,116
12,133
#include "app_eth.h" // constructors BaseAppETH::BaseAppETH(std::string ip, unsigned short port, std::string id) { this->node = std::make_shared<Node>(id, ip, port); this->node_table = std::make_shared<NodeTableETH>(id); } // getters std::shared_ptr<Node> BaseAppETH::get_node() { return this->node; } std...
12,843
4,290
#include "CppUTest/TestHarness.h" #include "../cli.hpp" #include <string> #include <fstream> #include <vector> using std::string; using std::vector; TEST_GROUP(ArgumentIs) { }; TEST(ArgumentIs, Returns_true_if_Nth_argument_is_key) { CHECK_EQUAL(false, argumentIs("a", 0, "a b")); CHECK_EQUAL(true, a...
403
174
// Copyright 2018-2019 Carnegie Mellon University. See LICENSE file for terms. #include <libpharos/spacer.hpp> #include "pathanalyzer_test_config.hpp" using namespace pharos; using namespace pharos::ir; const DescriptorSet* global_ds = nullptr; // -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...
3,423
1,272
#pragma once #include "common.hpp" #include "../../data/shaders/uniforms.glsl" // Generic Buffer Object struct BufferObjectBase { virtual ~BufferObjectBase() { destroy(); } NONCOPYABLE(BufferObjectBase); protected: BufferObjectBase() {} void create(uint type, uint binding, uint size, const void* data); void bin...
1,993
755
#include "SegmenterDictionaryFeatureGenerator.h" #include "../Dictionary/DictionaryClass.h" #include "../Utility/CharWithSpace.h" #include <algorithm> #include <cassert> #include <unordered_set> #include <memory> #include <sstream> #include <string> #include <utility> #include <vector> namespace DataConverter { usi...
4,519
1,242
#ifndef PYTHONIC_BUILTIN_PYTHRAN_KWONLY_HPP #define PYTHONIC_BUILTIN_PYTHRAN_KWONLY_HPP #include "pythonic/include/__builtin__/pythran/kwonly.hpp" #endif
154
81
#include "flite/audio/audio.hpp" #include "flite/synthcommon/track.hpp" #include "flite/synthcommon/wave.hpp" #include "flite/utils/alloc.hpp" #include "flite/utils/math.hpp" #include "flite/utils/string.hpp" #ifdef ANDROID #define SPEED_HACK #endif #ifdef UNDER_CE #define SPEED_HACK /* This is one of those other thi...
14,537
6,369
/* * 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 ...
4,118
1,522
// // traits.hpp // gsl-modules // // Created by Francisco Meirinhos on 13/01/17. // #ifndef traits_hpp #define traits_hpp #include <chrono> #include <tuple> /* Stolen from http://stackoverflow.com/questions/7943525/is-it-possible-to-figure-out-the-parameter-type-and-return-type-of-a-lambda Traits of lambda func...
1,586
516
#include <mbed.h> #include <C12832.h> // Using Arduino pin notation C12832 lcd(D11, D13, D12, D7, D10); int main() { int j=0; lcd.cls(); lcd.locate(0,0); lcd.printf("mbed application shield!"); lcd.locate(0,10); lcd.printf("char %dx%d : %dx%d pixels", lcd.columns(), lcd.rows(), ...
521
238
// Copyright (C) 2009-2020 Christian@Schladetsch.com // // 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) #ifndef BOOST_MONOTONIC_STORAGE_HPP #define BOOST_MONOTONIC_STORAGE_HPP #include <algorithm> #include <arra...
8,650
2,239
// Boost endian.hpp header file // -------------------------------------------------------// // (C) Copyright Darin Adler 2000 // (C) Copyright Beman Dawes 2006, 2009 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // See library home page at http://ww...
18,660
7,383
/* * Copyright (c) 2013-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * 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...
1,839
656
// pipe.cc // 8/24/2013 jichi // Branch: ITH_DLL/pipe.cpp, rev 66 // 8/24/2013 TODO: Clean up this file #ifdef _MSC_VER # pragma warning (disable:4100) // C4100: unreference formal parameter #endif // _MSC_VER #include "cli_p.h" #include "ith/common/defs.h" //#include "ith/common/growl.h" #include "ith/sys/sys.h" #...
9,378
3,945
#include "../../JFloatArray.hpp" #include "./Matrix4f.hpp" namespace android::renderscript { // Fields // QJniObject forward Matrix4f::Matrix4f(QJniObject obj) : JObject(obj) {} // Constructors Matrix4f::Matrix4f() : JObject( "android.renderscript.Matrix4f", "()V" ) {} Matrix4f::Matrix4f(JFloatArra...
3,797
1,877
class Solution { public: int lengthOfLongestSubstring(string s) { int n = s.length(); if (n < 2) { return n; } int result = 1; int begin = 0; unordered_map<char, int> m; for (int i = 0; i < n; i++) { if (m.find(s[i]) != m.end() && m[s[i...
542
187
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: BeatmapDataLoader #include "GlobalN...
6,061
1,945
/********************************************************************** * Online Judge : POJ * Problem Title : Number Steps * ID : 1663 * Date : 4/22/2009 * Time : 20:34:57 * Computer Name : EVERLASTING-PC ******************************************...
811
387
#include <iostream> #include <limits> #include <iomanip> #include <fstream> using namespace std; //Function Prototyping void Header(string,int); void Menue(); void guestMenue(); void guestSelection(int); void userMenue(); void userSelection(int); void adminMenue(); void adminSelection(int...
31,681
14,102
#pragma once // // Copyright (c) 2020 Emil Forslund. All rights reserved. // #include "symbol.hpp" #include <string> Symbol* _(float v); Symbol* _(const std::string& s);
174
69
/////////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2011) by the // // Broad Institute. All rights are reserved. This software is supplied // ...
38,426
15,732
#include <big_mpi_compat.h> #include "common.h" void test() { MPI_Comm comm = MPI_COMM_WORLD; int myid; MPI_Comm_rank(comm, &myid); const std::uint64_t count = (1ULL << 32) + 5; if (myid == 0) { std::vector<short> buffer(count, 0); buffer[1] = 1; buffer[count - 1] = 99;...
1,539
559
#include "GenModel.h" //#include "SqlCaller.h" #include <math.h> #include <time.h> GenModel::GenModel() { version = "genmodellean-0.0.15 build 0001"; hassolution = false; bcreated = false; binit = false; nc = 0; nr = 0; solverdata = NULL; } double GenModel::FindConstraintMaxLhs(long row) ...
9,058
3,603
#ifndef STAN_MATH_PRIM_PROB_LOGLOGISTIC_LPDF_HPP #define STAN_MATH_PRIM_PROB_LOGLOGISTIC_LPDF_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/err.hpp> #include <stan/math/prim/fun/as_column_vector_or_scalar.hpp> #include <stan/math/prim/fun/as_array_or_scalar.hpp> #include <stan/math/prim/fun/as_value_...
6,308
2,327
#ifdef HAVE_CONFIG_H #include <config.h> #endif #include <cstring> #include "SOAPEnvelope.h" #define SOAP12_ENV_NAMESPACE "http://www.w3.org/2003/05/soap-envelope" #define SOAP12_ENC_NAMESPACE "http://www.w3.org/2003/05/soap-encoding" #define SOAP11_ENV_NAMESPACE "http://schemas.xmlsoap.org/soap/envelope/" #define ...
13,224
5,062
/* ** EPITECH PROJECT, 2020 ** B-CPP-300-LYN-3-1-CPPD14M- ** File description: ** Fruit.cpp */ #include "Fruit.hpp" Fruit::Fruit() { this->name = "fruit"; this->_vitamins = 0; return; } Fruit::Fruit(std::string const &_name_, int _vitamins_) { this->name = _name_; this->_vitamins = _vitamins_; ...
488
223
#ifndef STAN_LANG_AST_DEF_CPP #define STAN_LANG_AST_DEF_CPP #include "stan/language/ast.hpp" #include "stan/language/ast/fun/bare_type_is_data_vis_def.hpp" #include "stan/language/ast/fun/bare_type_order_id_vis_def.hpp" #include "stan/language/ast/fun/bare_type_set_is_data_vis_def.hpp" #include "stan/language/ast/fun/...
7,900
3,038
#pragma once #include <memory> #include <vector> #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include "BlockMesh.hpp" #include "Maths/Coords.hpp" class ChunkSegment; class Block { public: static constexpr int BlockFaceCount = static_cast<int>(BlockFace::Size); protected: ChunkSegment& _chunk; coords::Loca...
1,809
656
#include "engine/api/route_parameters.hpp" #include "engine/engine.hpp" #include "engine/engine_config.hpp" #include "engine/status.hpp" #include "engine/plugins/match.hpp" #include "engine/plugins/nearest.hpp" #include "engine/plugins/table.hpp" #include "engine/plugins/tile.hpp" #include "engine/plugins/trip.hpp" #i...
4,927
1,549
void alpha_sq( beacls::FloatVec& alpha, beacls::FloatVec xs, FLOAT_TYPE dim, const size_t numel, FLOAT_TYPE alpha_offset, FLOAT_TYPE length){ if (dim == 0){ std::transform(xs.cbegin(), xs.cend(), alpha.begin(), [alpha_offset, length](const auto &xs_i) { return 1- s...
855
315
/* Edge Impulse Linux SDK * Copyright (c) 2021 EdgeImpulse Inc. * * 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, ...
6,930
2,451
// ---------------------------------------------------------------------------- // ____ _ // | _\ | | // | |_)| __ _ ___ ___ ___ ___ __| | ___ TM // | _< / _` / __|/ _ \/ __/ _ \ / _` |/ _ \ // | |_)| (_| \__ \ __/ (_| (_) | (_| | __/ // |____/\__,_|___/...
31,837
9,172
// This file is licensed under the CC0 license (See http://creativecommons.org/publicdomain/zero/1.0/). // And just to make sure you get the idea, it is also licensed under the WTFPL (See http://en.wikipedia.org/wiki/WTFPL). #include "string.h" #include "error.h" #include <stdio.h> #include <stdlib.h> #include <string...
485
182