text
string
size
int64
token_count
int64
#include <QTextStream> int main(void) { QTextStream(stdout) << "Hello, console!" << endl; return 0; }
106
44
#include "Arduino.h" #include "fram.h" #include "Wire.h" void FRAMinit(){ Wire.begin(); } void FRAMwrite(uint16_t address, uint8_t data){ Wire.beginTransmission(pageAddress(address)); Wire.write(wordAddress(address)); Wire.write(data); Wire.endTransmission(true); } void FRAMwriteblock(uint1...
1,951
738
#include "flashstorage.h" #include "config.h" Adafruit_FlashTransport_QSPI flashTransport; Adafruit_SPIFlash flash(&flashTransport); FatFileSystem fatfs; Adafruit_USBD_MSC usb_msc; /* * General file access functions */ uint16_t read16(File &f) { uint16_t result; ((uint8_t *)&result)[0] = f.read(); // LS...
3,029
1,098
#include "ActorRenderNode.hpp" #include "Actor.hpp" using namespace nima; ActorRenderNode::ActorRenderNode(ComponentType type) : ActorNode(type), m_DrawOrder(0) { } void ActorRenderNode::copy(ActorRenderNode* node, Actor* resetActor) { Base::copy(node, resetActor); m_DrawOrder = node->m_DrawOrder; } int Actor...
545
226
#include <iostream> #include <GPM/GPM.h> int main(const int p_argc, char** p_argv) { try { // Try stuff here Matrix4F rot = GPM::Matrix4F::LookAt(GPM::Vector3F(0, 0, 0), GPM::Vector3F(0, 0, 3), GPM::Vector3F(0, 1, 0)); std::cout << rot; } catch (const std::exception & e) { std::cerr << "Exception thrown:...
393
188
/* Name - Nikhil Ranjan Nayak Regd No - 1641012040 Desc - Closest pair */ #include <stdio.h> #include <float.h> #include <stdlib.h> #include <math.h> // represent a Point in 2D plane struct Point { int x, y; }; // Needed to sort array of points according to X coordinate int compareX(const void* a, const void* b) { ...
3,283
1,233
#include <iostream> #include <string> using namespace std; int main(){ int dataSets = 0; int rev, exp, adv; cin >> dataSets; for (int i = 0; i < dataSets; i++){ cin >> rev >> exp >> adv; if (rev > (exp - adv)){ cout << "do not advertise\n"; } else if (rev == (exp - adv)){ cout << "does not matter\n";...
379
172
const int MX = 1e7 int status[(MX/32)+2]; void sieve() { int i, j, sqrtN; sqrtN = int( sqrt( N ) ); for( i = 3; i <= sqrtN; i += 2 ) { if( bitCheck(status[i>>5],i&31)==0) { for( j = i*i; j <= N; j += (i<<1) ) { status[j>>5] = bitOn(status[j>>5],j &...
469
214
// redmine usage: This commit refs #388 @2h // ############################################################################################### // ############################################################################################### // ##########################################################################...
57,751
18,809
/* * Logger.cpp * * function: Logger Singleton for logging with different log levels to a file * * author: Jannik Beyerstedt */ #include "Logger.h" #include <iomanip> Logger::Logger() { logfile.open("logfile.txt", std::ios::trunc); logfile << std::setprecision(3) << std::fixed; time_start = std::chrono:...
1,548
569
// https://www.urionlinejudge.com.br/judge/en/problems/view/1789 #include <iostream> using namespace std; int main() { int n, x, faster = 0; while (scanf("%d", &n) != EOF) { while (n--) { cin >> x; if (x > faster) faster = x; } if (faster < 10) cout << 1 << endl; else if (faster < 20) cout << 2 ...
386
190
//###include "../01_cpp_lib/hongyulib.h" #include <iostream> // std::cout #include <algorithm> // std::unique, std::distance #include <vector> // std::vector bool myfunction (int i, int j) { return (i==j); } using namespace std; int main () { int myints[] = {10,20,20,20,30,30,20,20,10}; /...
1,421
525
/******************************************************************************* * Copyright 2019 Intel Corporation * * 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...
16,716
6,237
// Copyright (c) 2001-2011 Hartmut Kaiser // // 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) #if !defined(SPIRIT_LEX_SUPPORT_FUNCTIONS_JUN_08_2009_0211PM) #define SPIRIT_LEX_SUPPORT_FUNCTIONS_JUN_08_2009_0211P...
7,577
2,195
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
71,494
23,389
// Copyright Carl Philipp Reh 2009 - 2018. // 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 <fcppt/noncopyable.hpp> #include <fcppt/record/element.hpp> #include <fcppt/record/get.hp...
3,220
1,774
//---------------------------------------------------------- -*- Mode: C++ -*- // $Id$ // // Created 2013/10/9 // Author: Mike Ovsiannikov // // Copyright 2013,2016 Quantcast Corporation. All rights reserved. // // This file is part of Kosmos File System (KFS). // // Licensed under the Apache License, Version 2.0 // (t...
5,593
1,921
/*------------------------------------------------------------------------------ * Copyright 2016 Sensirion AG, Switzerland. All rights reserved. * * Software source code and Compensation Algorithms are Sensirion Confidential * Information and trade secrets. Licensee shall protect confidentiality of * Software sou...
4,737
1,610
#include "XML_Node.h" #include "../Parser/Parser.h" String XML_Node::getTag() const { return this->data.tag; } void XML_Node::addArgument(Argument arg) { this->data.arguments.push(arg); } List<Argument> &XML_Node::getArguments() { return this->data.arguments; } Argument XML_Node::removeArgument(int ind...
1,136
399
#include "stdafx.h" #include "WrpConsole.h" #include <malloc.h> #include <string.h> #include <sstream> #include <iomanip> #include <windows.h> // WrpConCommand /////////////////////////////////////////////////////////////// WrpConCommand::WrpConCommand(char const * name, WrpCommandCallback callback, c...
12,242
5,004
module; #include <Windows.h> module main_window; LRESULT MainWindow::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_DESTROY: PostQuitMessage(0); return 0; case WM_PAINT: { PAINTSTRUCT ps; ...
605
221
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.md file in the project root for full license information. // #include "stdafx.h" #include "Common/ReaderTestHelper.h" using namespace Microsoft::MSR::CNTK; namespace Microsoft { namespace MSR { namespace CNTK { namespac...
6,266
1,922
// Copyright 2016 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/allocator/allocator_shim.h" #include <malloc.h> // This translation unit defines a default dispatch for the allocator shim which // route...
1,953
657
#pragma once template <typename T> struct Schoenhage_Strassen_radix2 { T* buf = nullptr; void rot(T* dst, T* src, int s, int d) { assert(0 <= d and d < 2 * s); bool f = s <= d; if (s <= d) d -= s; int i = 0; if (f) { for (; i < s - d; i++) dst[i + d] = -src[i]; for (; i < s; i++) d...
5,612
2,823
#include <iostream> using namespace std; class Animal { public: Animal(const string &st) : Name(st) {} // ะฒะฐัˆ ะบะพะด const string Name; }; class Dog: public Animal { public: Dog(const string &st): Animal(st) {} void Bark() { cout << Name << " barks: woof!" << endl; } };
312
111
#define DETOURS_ARM64_OFFLINE_LIBRARY #include "disasm.cpp"
60
29
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<int, int> P; typedef pair<ll, ll> Pll; typedef vector<int> Vi; typedef tuple<int, int, int> T; #define FOR(i,s,x) for(int i=s;i<(int)(x);i++) #define REP(i,x) FOR(i,0,x) #define ALL(c) c.begin(), c.end() #define MP make_pair #define D...
1,298
623
// NOAA POES Monte Carlo Simulation v1.3, 17/09/2008e // MEPED (Medium Energy Proton and Electron Detector) // Karl Yando, Professor Robyn Millan // Dartmouth College, 2008 // // "MEPED_DetectorMessenger.hh" - (generic) #ifndef MEPED_DetectorMessenger_h #define MEPED_DetectorMessenger_h 1 #include "globals.hh" #inclu...
1,304
494
/* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. NVIDIA CORPORATION and its licensors retain all intellectual property and proprietary rights in and to this software, related documentation and any modifications thereto. Any use, reproduction, disclosure or distribution of this software and related docum...
4,281
1,411
#include <fstream> #include <vector> #include <string> #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <vector> #include <algorithm> #include <numeric> #include <iterator> #include <valarray> #include <climits> #include <sstream> #include <sys/stat.h> #include <bits...
36,350
15,746
// SPDX-License-Identifier: MIT constexpr char const* const PDI_CFG = R"PDI_CFG( metadata: Nx : int Nvx : int iter : int time_saved : double nbstep_diag: int iter_saved : int MeshX_extents: { type: array, subtype: int64, size: 1 } MeshX: type: array subtype: double size: [ '$MeshX_extents[0...
2,111
864
/* Copyright (C) 2010 Ion Torrent Systems, Inc. All Rights Reserved */ #include <iostream> #include <iomanip> #include "PhaseFit.h" #include "Stats.h" PhaseFit::PhaseFit() { read.resize(0); signal.resize(0); residual_raw_vec.resize(0); residual_weighted_vec.resize(0); err.resize(0); flowString...
10,247
3,858
// // exe_wwinmain.cpp // // Copyright (c) Microsoft Corporation. All rights reserved. // // The mainCRTStartup() entry point, linked into client executables that // uses main(). // #define _SCRT_STARTUP_MAIN #include "exe_common.inl" extern "C" int mainCRTStartup() { return __scrt_common_main(); }
312
110
#include <stdio.h> #define _USE_MATH_DEFINES #include <math.h> #include "libgtkgraph/gtkgraph.h" #include "libgtkgraph/gtkgraph_internal.h" /* Declaration of all local functions */ static GtkGraphAnnotation *gtk_graph_annotation_allocate(void); /* Externally referenceable functions */ static GtkGraphAnnotation *gtk_...
10,952
4,396
/* * OXRS_MQTT.cpp * */ #include "Arduino.h" #include "OXRS_MQTT.h" #ifdef MQTT_ENABLE_STREAMING #include <StreamUtils.h> #endif // Topic constants static const char * MQTT_CONFIG_TOPIC = "conf"; static const char * MQTT_COMMAND_TOPIC = "cmnd"; static const char * MQTT_STATUS_TOPIC = "s...
7,686
2,956
#include <iostream> #include <vector> #include <cmath> using namespace std; int calculate(vector<int> coefficients, int x) { int result = coefficients[0]; for(int i = 1; i < coefficients.size(); i++) { result = result * x + coefficients[i]; } return result; } int main() { //* x*x*x + 2*x ...
427
157
// // ortho view generation tool // ulrich.krispel@fraunhofer.at // #include <vector> #include <string> #include <algorithm> #include <cmath> #include <iomanip> #include <limits> #include <boost/program_options.hpp> #include "types.h" #include "projection.h" #include "meanshift.h" #include "extraction.h" #include ...
12,873
3,942
/********************************************************************** * Copyright (c) 2008-2016, Alliance for Sustainable Energy. * All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Fre...
1,885
588
#pragma once namespace BF { template<typename NumberType> struct QuadTreePosition { public: NumberType X; NumberType Y; QuadTreePosition() { X = 0; Y = 0; } QuadTreePosition(NumberType x, NumberType y) { X = x; Y = y; } }; }
261
129
class Solution { public: int reverse(int x) { long int tmp = 0; while (x != 0) { tmp = tmp * 10 + x % 10; x = x / 10; } return (tmp > INT_MAX || tmp < INT_MIN) ? 0 : tmp; } };
240
92
#include <thor-internal/arch/cpu.hpp> #include <thor-internal/arch/ints.hpp> #include <thor-internal/arch/gic.hpp> #include <thor-internal/debug.hpp> #include <thor-internal/thread.hpp> #include <assert.h> namespace thor { extern "C" void *thorExcVectors; void initializeIrqVectors() { asm volatile ("msr vbar_el1, %...
6,712
2,854
// 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 "content/browser/compositor/reflector_impl.h" #include "base/bind.h" #include "base/location.h" #include "content/browser/compositor/browser_com...
8,515
2,790
#pragma once struct triangle: shape { float x0; float y0; float z0; float x1; float y1; float z1; float x2; float y2; float z2; float norm_x; float norm_y; float norm_z; triangle ( material_type material, float x0, float y0, float z0, float x1, float y1, float z1, float x2, flo...
2,984
1,702
#include "docsearchcontroller.hpp" #include "codeeditor.hpp" DocSearchController::DocSearchController( UICodeEditorSplitter* editorSplitter, App* app ) : mEditorSplitter( editorSplitter ), mApp( app ) {} void DocSearchController::initSearchBar( UISearchBar* searchBar ) { mSearchBarLayout = searchBar; mSearchBarLay...
11,104
3,811
/* * Copyright (C) 2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl" #include "level_zero/core/source/cmdqueue/cmdqueue_hw_base.inl" #include "cmdqueue_extended.inl" namespace L0 { template struct CommandQueueHw<IGFX_GEN12LP_CORE>; static Com...
434
171
#include "WorldLogic.h" #include "WorldState.h" #include "GameState.h" #include "Events\ObjectDestroyedEvent.h" namespace Simulation { WorldLogic::WorldLogic() { } WorldLogic::~WorldLogic() { } void WorldLogic::Tick(WorldState* thisWorld, GameState* stateLastFrame, std::vector<EventBase*> eventsThisFrame) ...
625
264
/* * SpectRE - A Spectral Code for Reheating * Copyright (C) 2009-2010 Hal Finkel, Nathaniel Roth and Richard Easther * * 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 ret...
2,353
931
/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
695
222
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <lib/zx/guest.h> #include <zircon/syscalls.h> #include <lib/zx/vmar.h> namespace zx { zx_status_t guest::create(const resource& resource, uint...
654
224
//------------------------------------------------------------------------------------------------------------------------------ #pragma once //Engine Systems #include "Engine/Commons/EngineCommon.hpp" #include "Engine/Math/AABB2.hpp" #include "Engine/Math/AABB3.hpp" #include "Engine/Math/Capsule3D.hpp" #include "Engin...
9,769
2,927
// Copyright (C) 2014, 2010 by Mathieu Geisert, LAAS-CNRS. // // This file is part of the SceneViewer-corba. // // This software is provided "as is" without warranty of any kind, // either expressed or implied, including but not limited to the // implied warranties of fitness for a particular purpose. // // See the COP...
4,657
1,474
// Copyright (c) 2009-2021 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. // Maintainer: joaander #include "ConstraintSphereGPU.h" #include "ConstraintSphereGPU.cuh" namespace py = pybind11; using namespace std; /*! \file Constrain...
3,786
1,081
#include "catch.hpp" #include "common/types/timestamp.hpp" #include <vector> using namespace duckdb; using namespace std; static void VerifyTimestamp(date_t date, dtime_t time, int64_t epoch) { // create the timestamp from the string timestamp_t stamp = Timestamp::FromString(Date::ToString(date) + " " + Time::ToSt...
1,199
475
#include "position.h" #include <boost/format.hpp> namespace foolgo { namespace board { using boost::format; using std::string; const BoardLen Position::STRAIGHT_ORNTTIONS[4][2] = { { 0, -1 }, { 1, 0 }, { 0, 1 }, { -1, 0 } }; const BoardLen Position::OBLIQUE_ORNTTIONS[4][2] = { { 1, -1 }, { 1, 1 }, { -1, 1 ...
1,024
369
// 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...
13,823
4,329
/* * Copyright 2019 by Crisp 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 applicable law or agree...
1,455
479
/* * Copyright (c) 2019 MariaDB Corporation Ab * * Use of this software is governed by the Business Source License included * in the LICENSE.TXT file and at www.mariadb.com/bsl11. * * Change Date: 2025-04-28 * * On the date above, in accordance with the Business Source License, use * of this software will be g...
11,055
3,055
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
4,325
1,391
๏ปฟ/** * @file sph_neumann_impl.hpp * * @brief sph_neumann ้–ขๆ•ฐใฎๅฎŸ่ฃ… * * @author myoukaku */ #ifndef BKSGE_FND_CMATH_DETAIL_SPH_NEUMANN_IMPL_HPP #define BKSGE_FND_CMATH_DETAIL_SPH_NEUMANN_IMPL_HPP #include <bksge/fnd/cmath/isnan.hpp> #include <bksge/fnd/cmath/detail/sph_bessel_jn.hpp> #include <bksge/fnd...
1,822
861
#include <library/cpp/blockcodecs/core/codecs.h> #include <library/cpp/blockcodecs/core/common.h> #include <library/cpp/blockcodecs/core/register.h> #define ZSTD_STATIC_LINKING_ONLY #include <contrib/libs/zstd/zstd.h> using namespace NBlockCodecs; namespace { struct TZStd08Codec: public TAddLengthCodec<TZStd08Co...
1,871
629
#include "hole.h" #include "term.h" #include <iostream> Hole::Hole() { } Hole::Hole(int _x, int _y) { this->_x = _x; this->_y = _y; _present = true; } void Hole::handleEvent(Event *e) { } void Hole::display() { std::cout << cursorPosition(_x, _y) << '^'; } void Hole::present(bool _present) { this->_present ...
523
257
#include "sqliter/sqliter.h" #include <iostream> #include <string> using namespace sqliter::asio; int main(int argc, char *argv[]) { boost::asio::io_service io; sqlite db(io); if (argc != 2) { std::cout << argv[0] << " <sqlite db file>" << std::endl; return -1; } db.open(argv[1...
495
200
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
8,944
2,879
//////////////////////////////////////////////////////////////////////////////////////////////////// // StandardLicenseDeactivate.cpp // Copyright (c) 2019 Pdfix. All Rights Reserved. //////////////////////////////////////////////////////////////////////////////////////////////////// #include "pdfixsdksamples/Standard...
1,025
293
#include "bio_test_data.h" #include <bio/biobase_match.h> #include <bio/matrix.h> #include <bio/score_sequence.h> USING_BIO_NS; #include <boost/test/unit_test.hpp> #include <boost/test/floating_point_comparison.hpp> #include <boost/io/ios_state.hpp> #include <boost/progress.hpp> #include <boost/test/parameterized_t...
3,874
1,586
/* * This file is part of FFL project. * * The MIT License (MIT) * Copyright (C) 2017-2018 zhufeifei All rights reserved. * * MemcopyRender.hpp * Created by zhufeifei(34008081@qq.com) on 2018/06/28 * https://github.com/zhenfei2016/FFL-v2.git * android ANativewindowๆ•ฐๆฎๆ‹ท่ดๆ˜พ็คบๆ–นๅผ * */ #include "RenderInterface.hpp"...
1,405
505
#include "stdafx.h" #include <SA2ModLoader.h> // for everything #include "Networking.h" // for MessageID #include "globals.h" #include "OnGameState.h" DataPointer(uint, dword_174B058, 0x174B058); // Note that the name is misleading. This only happens when the gamestate changes to Ingame. // TODO: Real OnGameState ...
804
296
// Concord // // Copyright (c) 2018 VMware, Inc. All Rights Reserved. // // This product is licensed to you under the Apache 2.0 license (the "License"). // You may not use this product except in compliance with the Apache 2.0 // License. // // This product may include a number of subcomponents with separate copyright ...
1,472
433
/* * SphereData.hpp * * Created on: 9 Aug 2016 * Author: Martin Schreiber <schreiberx@gmail.com> */ #ifndef SWEET_SPHERE_DATA_SPECTRAL_HPP_ #define SWEET_SPHERE_DATA_SPECTRAL_HPP_ #include <complex> #include <functional> #include <array> #include <cstring> #include <iostream> #include <fstream> #include <i...
34,525
14,994
//// //// 1110.cpp //// Algorithm //// //// Created by ๋™๊ท  on 2018. 6. 1.. //// Copyright ยฉ 2018๋…„ ๋™๊ท . All rights reserved. //// // //#include <iostream> //using namespace std; // //int main() { // // int number, number2 , tmp1, tmp2, tmp3; // int cnt =0; // // cin >> number; // number2 = number; ...
478
217
#include "ruleMixedSites.h" #include <frozen/set.h> #include <nextclade/nextclade.h> #include <algorithm> #include <optional> #include <vector> #include "../utils/mapFind.h" #include "getQcRuleStatus.h" namespace Nextclade { namespace { constexpr frozen::set<Nucleotide, 6> GOOD_NUCLEOTIDES = { Nucleotid...
1,285
482
/* LICENSE ------- Copyright 2005 Nullsoft, 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 conditio...
12,739
4,128
#ifndef METRICS_HPP #define METRICS_HPP static const size_t MAX_NORM=~size_t(0); template<class FloatType,size_t P> struct Lnorm_impl { static FloatType call(const FloatType* f1,const FloatType* f2,size_t n,const std::vector<bool>& mask) { FloatType sm=0.0; for(size_t di=0;di<n;di++) { if(mask.size() == n &...
1,858
859
#include "public_key.hpp" extern const RsaPublicKey PublicKey = { 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xe0, 0x15, 0x69, 0x00, 0x55, 0x3c, 0x6a, 0x56, 0x35, 0x6d, 0x3c, 0x2a, 0x3d, 0xd6, 0xdc, 0x7a, 0xe2, 0x72, 0x3f, 0x87, 0xa3, 0x13, 0x26, 0x86, 0x75, 0x75, 0x79, 0x45, 0xbe, 0xc8, 0xb5, 0x57, 0xaa, 0x4a,...
933
841
// Copyright (c) 2012 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 "ui/app_list/views/search_box_view.h" #include <algorithm> #include "grit/ui_resources.h" #include "ui/app_list/search_box_model.h" #includ...
5,269
1,781
#include <cmath> #include <cstdlib> #include <ctime> #include <iomanip> #include <iostream> using namespace std; #include "r8lib/r8lib.hpp" #pragma once //void daxpy ( int n, double da, double dx[], int incx, double dy[], int incy ); //double ddot ( int n, double dx[], int incx, double dy[], int incy ); //double dnr...
48,543
18,499
// // Created by Chris Luttio on 3/27/21. // #include "initialize_client_requests_task.h" #include "load_requested_file_task.h" #include "general/utils.h" #include "general/route_resolver.h" #include "authorize_user_task.h" #include "jwt-cpp/jwt.h" #include "general/json.hpp" #include "objects/mail/email_parser.h" #i...
16,748
3,511
/* // Copyright (c) 2016 Intel Corporation // // 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...
3,591
1,162
/* StairCase Problem Send Feedback A child is running up a staircase with n steps and can hop either 1 step, 2 steps or 3 steps at a time. Implement a method to count how many possible ways the child can run up to the stairs. You need to return all possible number of ways. Time complexity of your code should be O(n). S...
1,806
703
/////////////////////////////////////////////////////////////////////////////// /// /// Authors: Joshua Claeys, Joshua Davis /// Copyright 2010-2017, DigiPen Institute of Technology /// /////////////////////////////////////////////////////////////////////////////// #pragma once namespace Zero { /// Define...
1,269
371
#include "template.hpp" int main() { ll(H, W); vin(string, S, H); auto dp = vecv(bool, H + 1, W + 1, true); rrep(i, H) { rrep(j, W) { if (S[i][j] == '#') { dp[i][j] = true; } else { dp[i][j] = not(dp[i + 1][j] and dp[i][j + 1] and dp[i + 1][j + 1]); } } } yes(dp[0]...
347
180
/* * Copyright (c) 2015 - 2022, Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ #include <memory> #include "gtest/gtest.h" #include "gmock/gmock.h" #include "ProcessRegionAggregator.hpp" #include "record.hpp" #include "geopm_test.hpp" #include "MockApplicationSampler.hpp" using geopm::ProcessRegionA...
6,055
2,548
/**@file test_replace.cpp * An example of doing regex replace with JPCRE2 * @include test_replace.cpp * @author [Md Jahidul Hamid](https://github.com/neurobin) * */ #include <iostream> #include "jpcre2.hpp" typedef jpcre2::select<char> jp; int main(){ jp::Regex re; //Compile the pattern re.setPatt...
1,527
449
#include "PoweredByWindow.h" #include "screen.h" CPoweredByWindow::CPoweredByWindow() { mGUI = DynaGUI::getInstance(); // mText = mGUI->createWindow( BetaGUI::MAX, BetaGUI::CENTERED ); mWindow = mGUI->createWindow( DWindow::MAX, DWindow::CENTERED ); mWindow->addText( "Powered by :", 175 ); m...
1,701
645
#include "winheaders.h" #include <cmath> #include <functional> #include <future> #include <iostream> #include <queue> #include <thread> #include <utility> #include "HCNetSDK.h" #include "bgwin.h" #include "cursors.h" #include "main.h" #include "synchronized_ostream.h" #include "util.h" #include "s...
5,968
2,274
#include "vtb/Render.hpp" #include "vtb/Device.hpp" #include "vtb/SwapChain.hpp" #include "vtb/Semaphore.hpp" VTB_BEGIN void Render::Create( const Device& device, const SwapChain& swapChain, const std::vector<VkCommandBuffer>& buffers) { device_ = &device; swapChain_ = &swapChain; commandBuffe...
2,352
811
/* * Example program for the Allegro library, by Peter Wang. * * Test audio properties (gain and panning, for now). */ #include "allegro5/allegro.h" #include "allegro5/allegro_image.h" #include "allegro5/allegro_font.h" #include "allegro5/allegro_primitives.h" #include "allegro5/allegro_audio.h" #include "al...
4,778
2,059
/* * Copyright 2021 Assured Information Security, 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 a...
2,698
880
#include "RenderSettings.h" RenderSettings g_renderSettings = {0, 0};
70
24
๏ปฟ#include "search.h" #include <math.h> Search::Search() { } //function negamax(node, depth, ฮฑ, ฮฒ, color) int Search::negamax(Position& position, int depth, int alpha, int beta) { if (stopThinking) throw exit_search(); // From https://en.wikipedia.org/wiki/Negamax //alphaOrig : = ฮฑ int...
7,129
2,365
#include "statusobject.h" //(c) Adrian Boeing 2004, see liscence.txt (BSD liscence) /* Abstract: Status object for message/error passing, without exceptions Author: Adrian Boeing Revision History: Version 1.1 : 04/08/03 TODO: -Allow integration of status tracker, or similar, to enable multiple path error r...
1,188
440
// ---------------------------------------------------- // AIMP DotNet SDK // Copyright (c) 2014 - 2020 Evgeniy Bogdan // https://github.com/martin211/aimp_dotnet // Mail: mail4evgeniy@gmail.com // ---------------------------------------------------- #include "Stdafx.h" #include "AimpDataFilterGroup.h" #include "AimpD...
4,839
1,522
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /*===================================================================== ** ** Source: MoveFileA.c ** ** Purpose: Te...
13,491
4,647
/* ///////////////////////////////////////////////////////////////////////// * File: inetstl/error/exceptions.hpp * * Purpose: Contains the internet_exception class. * * Created: 25th April 2004 * Updated: 10th August 2009 * * Home: http://stlsoft.org/ * * Copyright (c) 200...
9,369
3,208
//<Snippet3> using namespace System; void main() { // Define an array of 16-bit integer values. array<Int16>^ values = { Int16::MinValue, Int16::MaxValue, 0xFFF, 12345, -10000 }; // Convert each value to a Decimal. for each (Int16 value in values) { Decimal...
792
303
#include "PanelConfiguration.h" #include "Application.h" #include "ModuleWindow.h" #include "ModuleRender.h" #include "ModuleCamera.h" #include "ModuleInput.h" #include "ModuleTextures.h" #include "ModuleScene.h" #include "ModuleScript.h" #include "ModuleUI.h" #include "ModuleAudioManager.h" #include "imgui.h" #include...
3,434
1,469
int phoneCall(int min1, int min2_10, int min11, int s) { if (s < min1) { return 0; } for (int i = 2; i <= 10; i++) { if (s < min1 + min2_10 * (i - 1)) { return i - 1; } } return 10 + (s - min1 - min2_10 * 9) / min11; }
248
130
/* * Copyright (c) 2015-2019 Dubalu LLC * * 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, pub...
15,718
6,930
/*############################################################################## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systemsยฎ. 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...
5,324
1,482
/* * Problem: If a three-digit number is input through the keyboard, write a program to * calculate the sum of its digits. (Hint: Use the modulus operator %) * * Example * Case (1) * i/p: 369 * o/p: 18 * * Case (2) * i/p: 999 * o/p: 27 */ #include <iostream> using namespace std; int main() { // Decl...
1,102
361