blob_id stringlengths 40 40 | content_id stringlengths 40 40 | repo_name stringlengths 5 114 | path stringlengths 5 318 | language stringclasses 5
values | extension stringclasses 12
values | length_bytes int64 200 200k | license_type stringclasses 2
values | content stringlengths 143 200k |
|---|---|---|---|---|---|---|---|---|
b6d800f33e9b73b9061d2be2e41c434caddb5159 | 6afb329057da60473b3099c5dd2b6b26f9c31afe | thegamer1907/Code_Analysis | /Graphs/1033.cpp | C++ | cpp | 299 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,t;
cin>>n>>t;
int* trans= new int[n];
for(int i=1;i<n;i++)
cin>>trans[i];
int i=1;
while(i<=n)
{
if(i==t)
{
cout<<"YES"<<endl;
return 0;
}
if(i==n)
break;
i= i+trans[i];
}
cout<<"NO"<<endl;
return 0;
} |
01d4a28a07f4e034fd7d8d0a29270a31b3447335 | 8611a52d7e829b1807ddfa2eaa229c1379a107ae | 0x00Finch/MFSocket | /app/src/main/cpp/dsp_custom.cpp | C++ | cpp | 11,840 | no_license | /*==============================================================================
Custom DSP Example
Copyright (c), Firelight Technologies Pty, Ltd 2004-2019.
This example shows how to add a user created DSP callback to process audio
data. The read callback is executed at runtime, and can be added anywhere in
th... |
68459fe6770af36ef700a96c673dfa5efc8ea1e6 | c33d35a01dd9f1d35d3df7562854cc42544ae767 | The-Kharsair-Empire/APP_DRAWER | /APP_DRAWER/Main.cpp | C++ | cpp | 14,822 | no_license | #define OLC_PGE_APPLICATION
//#include "olcPixelGameEngine.h"
#include "olcPGEX_UI.h"
#include "olcPixelGameEngine.h"
#include "olcPGEX_PopUp.h"
#include <rapidjson/document.h>
#include <rapidjson/prettywriter.h>
#include <rapidjson/writer.h>
#include <rapidjson/stringbuffer.h>
#include <list>
#include <fstream>
name... |
8ec1dbab62ddb17fb1562e3d8712dcddfdbd60ea | dd2ab52b8a7c116a352009a256ce9feb6be8966b | flyingalex/cpp_lox | /LoxClass.cpp | C++ | cpp | 1,369 | permissive | // Copyright 2020.2.23 <Copyright hulin>
#include <string>
#include <memory>
#include <vector>
#include "./LoxClass.hpp"
#include "./LoxInstance.hpp"
#include "./Interpreter.hpp"
#include "./LoxFunction.hpp"
#include "./Token.hpp"
using std::string;
using std::shared_ptr;
using std::vector;
LoxClass::LoxClass(
... |
36b027729c19380233f6761130f78bc61df4d7fc | 2f5ac93c623acf77cf530bc1dad917da1d3e5f2d | ScrappyMan25/Cpp_repo | /Classes/queue.cpp | C++ | cpp | 929 | no_license | // Not working - Error : Linker error.
/*
#include "queue.h"
#include <iostream>
template<class T, int size>
void SimpleQueue<T, size>::Enqueue(T value){
numItems++;
store[tail++] = value;
if(tail == max_size)
tail = 0;
}
template<class T, int size>
T SimpleQueue<T, size>::Peek(){return store[head];}
templ... |
bb0a74007c7f8dcfb86b69e1fc519e571e6c8ff3 | db9302f68e97f40851ba9e90db2ad0369cf87888 | KDE/kdepim-runtime | /resources/imap/autotests/dummypasswordrequester.cpp | C++ | cpp | 1,761 | permissive | /*
SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
SPDX-FileContributor: Kevin Ottens <kevin@kdab.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "dummypasswordrequester.h"
#include <QTimer>
#include <QTest>
DummyPasswordRequester::DummyPasswordRe... |
212597887c8cf3346ad7675be01623c8eab72a62 | de0da5bb1a6aad5b8ee6943d4c94e033274afe60 | NormenL/Hyperion | /src/hardware/display/Adafruit_SSD1306.cpp | C++ | cpp | 40,522 | no_license | /*!
* @file Adafruit_SSD1306.cpp
*
* @mainpage Arduino library for monochrome OLEDs based on SSD1306 drivers.
*
* @section intro_sec Introduction
*
* This is documentation for Adafruit's SSD1306 library for monochrome
* OLED displays: http://www.adafruit.com/category/63_98
*
* These displays use I2C or SPI to... |
2fb909771366b284e084034a649615d197d5891c | df93d4cd1ffd6bd9970e2f3ba65229b887f519c3 | rjrodger/vespa | /searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp | C++ | cpp | 6,909 | permissive | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "docsumcontext.h"
#include <vespa/document/datatype/positiondatatype.h>
#include <vespa/searchlib/queryeval/begin_and_end_id.h>
#include <vespa/searchlib/attribute/iattributemanager.h>
#includ... |
22f5facd249f43153f02428825b5b2ffbaa5b489 | a5dae18065228d0cf9d158725b06084d86b7f0db | InamTaj/data-structures | /10-Self-Organizing-Lists/2-Transpose-Method/3-Circular-Linked-List/mycode.cpp | C++ | cpp | 1,785 | permissive | #include"myheader.h"
#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
int op; //variable to store choice of operation
int value; //variable to store value into node
char ext; //variable to exit loop
int cnt; //variable to store count of nodes
int search; //variable to store re... |
31dfe1c783c10f180c5477769183708aa2fa1581 | 99126cc3066b519259f532538e9d4ee98fe9b996 | mvanotti/fuchsia-mirror | /src/developer/memory/metrics/summary.cc | C++ | cc | 5,200 | permissive | // Copyright 2019 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 "src/developer/memory/metrics/summary.h"
#include <lib/trace/event.h>
#include <unordered_set>
namespace memory {
const std::vector<const Name... |
dcd2505176b72e81553ce28601a749fb07eabece | 8dc1dbc8d6a7013157d002272fbca580c692dbe6 | LaChapeliere/Evol-artist | /Evol'artist/src/simulEngine/Spot.hpp | C++ | hpp | 1,911 | no_license | //
// Spot.hpp
// Evol'artist
//
// Created by Emma Barme on 28/09/2017.
// Copyright GNU General Public License v3.0
//
#ifndef Spot_hpp
#define Spot_hpp
#include <stdio.h>
#include <vector>
#include <iostream>
#include "Creature.hpp"
//Class for the spots in the grid
class Spot
{
private:
/**
* Horizo... |
71f85cbd7e663efbd2c3ce83a981a27d6488cc0a | f4797a2fe2904acd28d6abd620f31350a2b6f7f4 | Saaaaln/seastar | /include/seastar/net/api.hh | C++ | hh | 11,633 | permissive | /*
* This file is open source software, licensed to you under the terms
* of the Apache License, Version 2.0 (the "License"). See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. You may not use this file except in compliance with the License.
*
* You may ... |
b93c2088771d2b249de83d0de7ba10a3383a8161 | eaa80f449b1aa20904413342bb3fc5224828c9fb | allogn/TOUCH | /lib/bbpdias/libFLAT/Sphere.cpp | C++ | cpp | 1,456 | no_license | #include "Sphere.hpp"
namespace FLAT
{
std::ostream & operator << (std::ostream & lhs, const Sphere& rhs)
{
lhs << "Center: " << rhs.center << "[" << rhs.radius << "]";
return lhs;
}
spaceUnit Sphere::diameter(const Sphere &s)
{
return s.radius*2;
}
bigSpaceUnit Sphere::volume(const Sph... |
61b2eeeb4b6de81b60198ca1178d17cdba0fa5e2 | 4b3bfa6cac19f92b965ec6dcea9441a8064b1143 | jeramirez/usercode | /Analyzers/BTagPAT/src/BTagPATClosureAnalyzer.cc | C++ | cc | 20,186 | no_license | // -*- C++ -*-
//
// Class: BTagPATClosureAnalyzer
//
/**\class BTagPATClosureAnalyzer Analyzers/BTagPAT/src/BTagPATClosureAnalyzer.cc
Description: <A CMSSW analyzer for PAT objects>
Implementation:
this analyzer shows how to loop over PAT objects and play with it.
*/
//
// Original Author: J.E. Ramirez
... |
9f545a82e89a3e350ea73812ce3f41e629319a57 | fdcd46293435074aef0307f96a9871fd38d9837e | dalek-who/DataStruct | /FinalHomework/Matrix/Triple/Triple/main.cpp | C++ | cpp | 6,215 | no_license | #include "Triple.hpp"
#include <cstring>
#include <vector>
using namespace std;
void printUsage() {
cout << "Usage: " << endl;
cout << "-a addtion" << endl;
cout << "-s substruction" << endl;
cout << "-i inversion" << endl;
cout << "-m multiplication" << endl;
cout << "-t transpose" << endl; ... |
d0414868774d4ed7a7e81ea7f79043cecd53f754 | 220f4708ca45ed6e1f00227d7a22497eb0cac2e8 | lilei8630/oj | /demo_list.cpp | C++ | cpp | 1,682 | no_license | #include <stdio.h>
#include <stdlib.h>
#define selemtype char
typedef struct
{
selemtype * base;
selemtype * top;
int stacksize;
}sqstack;
int initstack(sqstack &s)
{
s.base=(selemtype *)malloc(20*sizeof(selemtype));
if(!s.base)exit(0);
s.top=s.base;
s.stacksize=20;
return 1;
}
int gettop(sqsta... |
60facec7233a44f46dd2e05d344d037fb6d05fc2 | 041828ea822ed9226c2b5873b683cd3b853ab78d | FUTUREMCC/ArmaScripts | /Arma 3/Debug Console Addon/debugger/config.cpp | C++ | cpp | 536 | no_license | class CfgPatches {
class uo_debugger {
units[] = {};
weapons[] = {};
requiredVersion = 1.0;
requiredAddons[] = {"cba_main"};
version = 1.0;
author[] = {"Crackman"};
};
};
class Extended_PreInit_EventHandlers {
uo_debugger_preInit = "call compile preprocessFileLineNumbers 'x\uo\addons\debugger\XEH\XEH_pr... |
8d2036b91d1b6a1cd64d776f2cf9990534c76736 | e78cd78aa2527cb8b77eb011a14949cc3cd06d89 | maiyao1988/my_aosp81 | /art/compiler/optimizing/scheduler_arm.cc | C++ | cc | 27,959 | permissive | /*
* Copyright (C) 2017 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... |
9f59dbf95b77b3917bb70031d0068f85572f0c8d | 717c2f488a512f8186093396b63f71fc78bdd07e | SiegeLord/allegro5 | /examples/ex_color.cpp | C++ | cpp | 6,192 | permissive | /*
* Example program for the Allegro library, by Elias Pschernig.
*
* Demonstrates some of the conversion functions in the color addon.
*/
#include <string>
#include <cstdio>
#include "allegro5/allegro.h"
#include "allegro5/allegro_ttf.h"
#include "allegro5/allegro_color.h"
#include <allegro5/allegro_primiti... |
aa3b2c54b9a56a2e2a7ba8c7d554d1f25c776edb | 8a6d799dcd60e7700d3776e4b91e469fa23b9355 | 1tygoime/a | /codefun/P332-P334.cpp | C++ | cpp | 457 | no_license | #include <bits/stdc++.h>
using namespace std;
unsigned long long gt(unsigned long long n)
{
if (n == 0 || n == 1)
return 1;
else
{
unsigned long long result(1);
for (unsigned long long i = 1; i <= n; i++)
result *= i;
return result;
}
}
int main()
{
unsi... |
85c0c7d8b4c0c27c1cc5a0edaacf98dce87afa7f | 5af1bfea3078384b618d9116e62b36c06e3c3587 | webOS101/db8 | /test/core/MojErrTest.cpp | C++ | cpp | 2,298 | permissive | /* @@@LICENSE
*
* Copyright (c) 2012 Hewlett-Packard Development Company, L.P.
*
* 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 r... |
674ddd38fcdf390a77d9d6da68ea46157a78d82b | a7c3b3681fb669991531ec218cc6575c976b697c | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/libs/mpi/src/cartesian_communicator.cpp | C++ | cpp | 4,999 | permissive |
// Copyright Alain Miniussi 2014.
// 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)
// Authors: Alain Miniussi
#include <algorithm>
#include <cassert>
#include <boost/mpi/cartesian_communic... |
4e7e5a206703ba9aab94212ee21cb49184af33ca | f25d43c5657b3fb3288ba333de7f9c403c877c4d | foolcodemonkey/chromium | /services/tracing/public/cpp/perfetto/track_event_thread_local_event_sink.cc | C++ | cc | 30,242 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/tracing/public/cpp/perfetto/track_event_thread_local_event_sink.h"
#include <algorithm>
#include <atomic>
#include "base/stl_util.h"
... |
e6e9a3f301626460ea3c932042f7b89520eee3c5 | 2c12b8c44f1ffd7d1f0c06b0e7ba2c989d0644e3 | nushrathumaira/Fall2017102 | /newlab6/lab6Sol/DateSol.cpp | C++ | cpp | 1,414 | no_license | #include "DateSol.h"
// Just an array of strings. Access a month using:
// Date::MONTHS[0] ---> "JANUARY"
// GLOBAL TO THE CLASS
// Also, why is this const?
const string Date::MONTHS[] = {
"JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY",
"JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER",
"NOVEMBER", "DECEMBER"
};
... |
79b6950b93468c51fc6e630103b0b55ea1b81c8d | 18af4b7188f7fa4f3efb93e63842c04ec418c311 | nnonnoon/AbstractDataType | /week6/infinity.cpp | C++ | cpp | 1,233 | no_license | #include<iostream>
#include <stdlib.h>
using namespace std;
int main(){
int num_dao,tod;
cin>>num_dao;
int x[num_dao];
int y[num_dao];
int r[num_dao];
int min = 0;
for (int i = 0 ; i < num_dao ; i++){
cin>>x[i]>>y[i]>>r[i];
}
for (int i = 0 ; i < num_dao ; i++){
t... |
3a8eb547fe056293fbb87ee1be93393bba36e53d | 9ce9ebdab3fb7c4d8f4431569c88c9c7ebde0879 | burmist-git/Terzina | /src/SteppingAction.cc | C++ | cc | 11,958 | no_license | #include "SteppingAction.hh"
#include "SensitiveDetector.hh"
#include "G4Track.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleDefinition.hh"
#include "G4OpBoundaryProcess.hh"
#include "G4SDManager.hh"
#include "G4ProcessManager.hh"
#include "G4RunManager.hh"
#include "G4UserEventAction.hh"
#include "EventAction.... |
5c721f79432353d5cf99125949723856887c7a0f | d78e20205cec93b96b847e551055e61d7d1432da | F1Coin/F1coin_old | /src/qt/qtipcserver.cpp | C++ | cpp | 3,371 | permissive | // Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include "qtipcserver.h"
#include "guiconstants.h"
#include "ui_interface.h"
#include "util.h"
#include <boost/date_time/... |
42b7d3c8b86fea506c40d88b4bbc05abb0d4ddf1 | 7c658794eabad6d038d32b8ceb8d130e6bd1dc21 | openvinotoolkit/openvino | /src/frontends/tensorflow_lite/src/op/depth_to_space.cpp | C++ | cpp | 786 | permissive | // Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "common_op_table.hpp"
#include "op_translation_utils.hpp"
#include "utils.hpp"
using namespace std;
namespace ov {
namespace frontend {
namespace tensorflow_lite {
namespace op {
OutputVector depth_to_space(const ov::fro... |
1df14d424cc02e1d9fb00a3c7721650504863448 | 320ca4725c4de5c9fb3e1dea64320175f2c99f11 | sitch/fbthrift | /thrift/lib/cpp2/async/ThreadBoundAdaptorChannel.cpp | C++ | cpp | 10,154 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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... |
bd899934b9c4f9fcd1aef6e6a87f97fdd271ab3d | 92d181f8884fbfdd46627dfcfcd1fc27bb2fb9d6 | digitalpbk/shaka-packager | /packager/media/formats/webvtt/webvtt_file_buffer.cc | C++ | cc | 1,882 | permissive | // Copyright 2018 Google LLC All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#include "packager/media/formats/webvtt/webvtt_file_buffer.h"
#include "packager/media/base/text_s... |
c308f56c48834dd6428a58c20bba2f7de0dba7a6 | 1423073cde20861db2dbbcc772caa457493c1a3a | Kytuzu/PCHex-plusplus | /source/gui/box.cpp | C++ | cpp | 1,547 | no_license | #include "box.h"
#include "boxslot.h"
#include "pokemon.h"
#include "utils.h"
Box::Box(sf2d_texture* texture, sf2d_texture* selectedtex, sf2d_texture* clonedtex, sf2d_texture* spritesheettex, sf2d_texture* gendertex, sftd_font* font, const int posx, const int posy, Savefile* save) : Drawable(texture, posx, posy) {
... |
b6e62d00bd40a9a54e252258b96a18e78a37666c | 56a6c1b5986fc4b5ab8922402efedb64ec01cb1a | joohyuk95/CPP_Algorithm | /24-1.model_answer.cpp | C++ | cpp | 604 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main()
{
int n, now, pre, pos;
cin >> n;
vector <int> ch(n);
cin >> pre;
for (int i = 1; i < n; ++i){
cin >> now;
pos = abs(pre - now);
if (pos > 0 && pos < n && ch[pos] == 0) // 인접한 두 값의 차가 0일 수 없고, 차가 중복될 수 없다.... |
0961b7c08f9bf7047a9a202ec3503097d80b4bb1 | 9cf64e22ab2eeebefc5299a803529a6f8fdd6303 | shanebarnes/aws-sdk-cpp | /aws-cpp-sdk-ec2/source/model/DescribeFpgaImagesResponse.cpp | C++ | cpp | 2,521 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
c94bff92af2327ad287a55f63a4375b5815a7a15 | f4cb36b38cfb977c517d5a0c365e18bf35a31dbb | Mrhuangyi/PAT-Solutions | /GPLT Practice/L1-005. 考试座位号.cpp | C++ | cpp | 567 | no_license | #include<bits/stdc++.h>
using namespace std;
struct stu {
string s;
int one;
int two;
};
int main()
{
int n;
cin>>n;
stu *a=new stu[n];
for(int i=0;i<n;i++)
{
cin>>a[i].s;
cin>>a[i].one;
cin>>a[i].two;
}
int m;
cin>>m;
int temp;
for(int i=0;i<m;i++)
{
... |
0c30e2a447a797b2a6e7c6ee8cca0ce309c94d90 | af855dd036950ae616105195bc9219efc1f04044 | mqincuhk/ReinforcedFDM | /ShapeLab/MainWindow.cpp | C++ | cpp | 133,208 | no_license | #include "stdafx.h"
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include <QFileDialog>
#include <QtDebug>
#include <QDesktopWidget>
#include <QCoreApplication>
#include <QMimeData>
#include <QTreeView>
#include <QThread>
#include <QTimer>
#include <QDateTime>
#include <QMessageBox>
#include <QScreen>
#include ... |
c256e6a143785d48cbcf72c85fcb708b3c6d212b | f5efecd629f9b71ed6f32f2189b9e9e222299287 | Ayrton432/Curso-de-Verano | /Tarea/integerArray.cpp | C++ | cpp | 643 | no_license | #include <iostream>
#include "IntegerArray.h"
using namespace std;
IntegerArray::IntegerArray(int size) {
this->data = new int[size];
this->size = size;
}
IntegerArray::IntegerArray(IntegerArray &o) {
this->data = new int[o.size];
size = o.size;
for(int i = 0; i < size; i++)
data[i] = o.... |
c0ae8a5a1693f51b042daa3236815bcb534c9e13 | 08b8b3e6efdb2d6555dbe985459130344e562ca5 | yo-shi/atcoder | /study/bitset.cpp | C++ | cpp | 876 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPl(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define REPRl(i, n) for(ll i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < (int)n; i++)... |
41548a908942149c9379b4486a7924484bc9ec25 | 5e072a76700394b58c4998d88c8385c8bb7ac1a9 | graphisoft-python/DGLib | /Support/Modules/GSRoot/TextOProtocol.hpp | C++ | hpp | 2,218 | permissive |
// *****************************************************************************
//
// Class TextOProtocol
//
// Module: GSRoot
// Namespace: GS
// Contact person: MB
//
// SG compatible
//
// *****************************************************************************
#if !defined TEXT... |
dbba7525518440e3481c0e5fe014959758678403 | 13022b55dbab996a7fe994b89170d8271dea0b6c | skyfms/hhvm | /hphp/runtime/vm/repo.cpp | C++ | cpp | 33,399 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
a6ea73b94540afa2aeb4a22fffb32e3d2851bace | c2a17bdccf307613767cfbcf0677e61ee2499eeb | Wesselmast/CrossPlatformTest | /src/Mesh.cpp | C++ | cpp | 6,909 | no_license | #pragma once
#include "Types.cpp"
#include "Math.cpp"
#include "Asset.cpp"
#include "File.cpp"
#include "Color.cpp"
#include "MeshGeneration.cpp"
#include "Perlin.cpp"
#include "Layout.cpp"
#include <vector>
struct Mesh : public Asset {
std::vector<float32> vertices;
uint32 vertexCount;
uint32 vertArrSize;
... |
ebd3951da35ce252ebbef7e0139c64f30b12a11d | 29e00c747be0b9fa67597d70b8bb61fba4d39a6a | ShinDaniel/spon | /src/masternodeman.cpp | C++ | cpp | 40,272 | permissive | // Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The SPON developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "masternodeman.h"
#include "activemasternode.h"
#include "addrman.h"
#inc... |
a9075f5a1b573b6907d75b1adfadcadaac184dc0 | ab56e911542a7d1cc660236a4bdb20be0e178fe5 | jmorton06/Lumos | /Lumos/External/box2d/testbed/tests/convex_hull.cpp | C++ | cpp | 2,705 | permissive | // MIT License
// Copyright (c) 2019 Erin Catto
// 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, merg... |
5595f767db1fbaa76bc985d9fa6dcfabf4f2c135 | d7f76c1aef2e3e19d4f6357cde2af67443df4070 | TheNewLearners/instrumentation | /cpp/nh-macmon.cpp | C++ | cpp | 2,522 | no_license | #include "CNHmqtt.h"
#include "nh-macmon.h"
#include "CMacmon.h"
#include "db/lib/CNHDBAccess.h"
class nh_macmon : public CNHmqtt
{
string _interface;
int _update_freq;
CNHDBAccess *_db;
pthread_t _mon_thread;
string _topic_known, _topic_unknown;
public:
nh_macmon(int argc, char *argv[]) : CNHmqtt(a... |
96036af0086eb8393e0dc5ac9bcb99faa91de227 | eb86aebdc54b2733a69c07cf907c0714e7026ad7 | miyamotononno/atcoder | /abc/heisei/067/d.cpp | C++ | cpp | 1,323 | no_license | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <unordered_map>
#include <set>
#include <map>
#define INCANT cin.tie(0), cout.tie(0), ios::sync_with_stdio(... |
08c818ea79217c18a320e6ada9435be6e58bb375 | 55c1bfb1dae96fea081e29e2476a33313dfcb39f | jAnist/competitive_programming | /Codeforces/BerSUBall.cpp | C++ | cpp | 868 | no_license | /*
Question Link: https://codeforces.com/problemset/problem/489/B
*/
#include <bits/stdc++.h>
using namespace std;
void solve(){
int ans=0;
int n,m;
vector<int> ar1,ar2;
cin>>n;
for(int i=0;i<n;i++){
int x;
cin>>x;
ar1.push_back(x);
}
cin>>m;
f... |
b5dd75489647e531ccbd0c5b00b589894415722e | 3d72db9c95fbfe9d695def1f15aee64f7d8d1f50 | chinhhi102/GiaiThuat | /kattis/ThamLam/Line Them Up.cpp | C++ | cpp | 1,397 | no_license | #include <map>
#include <set>
#include <queue>
#include <cmath>
#include <vector>
#include <cstdio>
#include <bitset>
#include <cstring>
#include <cstdlib>
#include <complex>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <list>
#include <stack>
#include <iterator>
#include <complex>
#include <stdi... |
b81af90bc982ceee0231d9ad327593fa3fa915fa | 1b8d5ae35e505051097e0ce8eacffc9a14427184 | videogamepreservation/blood2 | /ClientShellDLL/CastLineFX.cpp | C++ | cpp | 3,093 | no_license | // ----------------------------------------------------------------------- //
//
// MODULE : CastLineFX.cpp
//
// PURPOSE : CastLine special FX - Implementation
//
// CREATED : 1/17/97
//
// ----------------------------------------------------------------------- //
#include "CastLineFX.h"
#include "cpp_cli... |
663b76ceadfa63716083a08d052223605753af62 | 8ddc87a02e160f4965b4b192c431a2aa9f36b3e6 | mugisaku/gamebaby-20180215-dumped | /libgbstd/utility.hpp | C++ | hpp | 1,143 | no_license | #ifndef utility_TEMPLATE
#define utility_TEMPLATE
#include<cstdarg>
#include<cstdlib>
#include<cstdio>
#ifndef report
#define report printf("[report] %s, %s, %d\n",__FILE__,__func__,__LINE__);
#endif
namespace gbstd{
template<typename T>
inline void
destruct(T& t) noexcept
{
t.~T();
}
template<typename T... |
9bf5618f01b1225f18232371443f00dd08bd6216 | 0a10dd704755087be2ec0277bcc268556390842b | romanzes/chromium | /remoting/host/desktop_resizer_x11.cc | C++ | cc | 10,837 | permissive | // 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 "remoting/host/desktop_resizer_x11.h"
#include <string.h>
#include "base/command_line.h"
#include "base/macros.h"
#include "base/memory/ptr... |
c0cd5e2460668d36852e9aa19b2b326d7eb04e3f | 7e77279fc9f2f7179a19504bc2d0f0f028d1f156 | sejong-algorithm/Study | /wjdgur778/bj_돌게임.cpp | C++ | cpp | 891 | no_license | #include<iostream>
#include<vector>
using namespace std;
/*
돌 게임은 두 명이서 즐기는 재밌는 게임이다.
탁자 위에 돌 N개가 있다. 상근이와 창영이는 턴을 번갈아가면서 돌을 가져가며, 돌은 1개 또는 3개 가져갈 수 있다. 마지막 돌을 가져가는 사람이 게임을 이기게 된다.
두 사람이 완벽하게 게임을 했을 때, 이기는 사람을 구하는 프로그램을 작성하시오. 게임은 상근이가 먼저 시작한다
*/
int main() {
int n;
cin >> n;
//1 또는 3
//first -> SK
/... |
d7be1919b4da547e7944776b2d7e1d1ec791a944 | 855774cd0fc3f0f1a9b46b5055e2abe51fef8917 | JackRyan0903/BurnYourBridge | /DirectX9_Framework/DirectX9_Framework/SystemClass.cpp | C++ | cpp | 5,621 | no_license |
/*=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=*/
/* @author 정성화
/* @e-mail JackRyan0903@gmail.com
/* @Copyright 2015년 1월 9일 금요일 오전 5:41:32. Jack Ryan all rights reserved.
/*=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=*/
#i... |
67e852d66ea43da462905af32ba35f93b7e0b9f6 | 67ffd76198a9c4c6ca7b18475aca37a0071b6e6f | mildred/self | /vm/src/unix/prims/xlibPrims.cpp | C++ | cpp | 2,164 | no_license | /* Sun-$Revision: 30.9 $ */
/* Copyright 1992-2006 Sun Microsystems, Inc. and Stanford University.
See the LICENSE file for license information. */
# ifdef XLIB
# pragma implementation "xlibPrims.hh"
# include "_xlibPrims.cpp.incl"
char* Display_seal = "Display";
Display* XOpenDisplay_wrap(char *name, void ... |
ef54d16dfd950b7a4b5f19772e15b7bf9c07b902 | d92fbde4f4cb56fbdf7c8ac89fe1fc3e913e6d05 | lvjiahui/DRT | /optix_extend.cpp | C++ | cpp | 2,481 | no_license | #include <torch/extension.h>
#include <iostream>
#include "optix_prime/optix_primepp.h"
class optix_mesh {
public:
optix_mesh(unsigned cuda_device) {
optix_context = optix::prime::Context::create(RTP_CONTEXT_TYPE_CUDA);
optix_context->setCudaDeviceNumbers(std::vector<unsigned> {cuda_device});
model =... |
71a8e5333ad30e9826c7961cb17c6455b03f0dd2 | d8680d13dad3494157fed1196bcf23ee58559239 | zenoalbisser/chromium | /components/autofill/core/browser/autofill_manager.cc | C++ | cc | 58,116 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/autofill/core/browser/autofill_manager.h"
#include <stddef.h>
#include <limits>
#include <map>
#include <set>
#include <utility>
#... |
bf762f4f43b25bf81e7009a170f123822107e443 | f209e77acaf0af02559c77da1a78cb1b97c6071a | eirikvaa/TPG4850-VR-Gruppe-1 | /App/Il2CppOutputProject/IL2CPP/libil2cpp/icalls/mscorlib/System.Globalization/RegionInfo.cpp | C++ | cpp | 3,064 | no_license | #include "il2cpp-config.h"
#include "icalls/mscorlib/System.Globalization/CultureInfoInternals.h"
#include "icalls/mscorlib/System.Globalization/CultureInfoTables.h"
#include "icalls/mscorlib/System.Globalization/RegionInfo.h"
#include "utils/StringUtils.h"
#include "vm/String.h"
namespace il2cpp
{
namespace icalls
{... |
f9f45e1bf5696068b11af67a8520ec66af8859e4 | 21f4454e0a251e069f8e3af263db29bf7859bad0 | adikolo/visiblesim | /BlockSimulator-MT2/applicationsBin/blinky01/meld/meld/vm/determinism.hpp | C++ | hpp | 559 | no_license | #ifndef VM_DETERMINISM_HPP
#define VM_DETERMINISM_HPP
#include <cstdio>
#include "db/node.hpp"
#include "vm/instr.hpp"
namespace vm {
namespace determinism {
typedef size_t deterministic_timestamp;
enum simulationMode {DETERMINISTIC = 1, REALTIME = 2};
void setSimulationDeterministicMode();
simulationMo... |
b0fb70dc327402aa21aaa5884cc2620d6ca36edb | 6a5dcd2073bad5d35612b8d674c6e95d28fb1f71 | MartinBarriga/CompetitiveProgramming | /leetcode/longestCommonPrefix.cpp | C++ | cpp | 710 | no_license | class Solution {
public:
string longestCommonPrefix(vector<string>& strs) {
string commonPrefix = "";
if(strs.size() == 0) return "";
for(int charIndex = 0; charIndex < strs[0].size(); charIndex++) {
char firstWordChar = strs[0][charIndex];
for(int word = 0; word < st... |
905e438dbe886d22d6337f45e33a0906e8c577b6 | 91ee9cfc865fa06193713b628da8352d581bf083 | Symphony-in-Icecity/pcl | /geometry/include/pcl/geometry/impl/mesh_circulators.hpp | C++ | hpp | 35,046 | permissive | /*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2009-2012, Willow Garage, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are perm... |
b12c699dfba522db40fd60f4fedf3690ee5ca53f | 665881f49846705d4dc009ddee7d6bfa5b22c2c3 | Mykhailo-Granik/ACM-Solutions | /VNTU Training #13/D.cpp | C++ | cpp | 1,169 | no_license | #include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <memory.h>
#include <ctime>
#include <bitset>
#include <unordered_map>
using nam... |
0d42c8e65382f5c582b4f7806fd3fab758ff9c57 | 4e931e33aafc504990f87bb264573b16cfef0862 | Wincheat/Osiris | /Osiris/Hacks/Backtrack.cpp | C++ | cpp | 4,218 | permissive | #include "Backtrack.h"
#include "Aimbot.h"
#include "Chams.h"
#include "../Config.h"
#include "../SDK/FrameStage.h"
std::deque<Backtrack::Record> Backtrack::records[65];
Backtrack::Cvars Backtrack::cvars;
void Backtrack::update(FrameStage stage) noexcept
{
const auto localPlayer = interfaces->entityList->getEntit... |
73eb4a797d9fc077bbc6b64aaa5042487be607ea | 501781af8e7c0e8dabf77b338bd507b0673e097f | abdo-taha/Data-Structures-and-Algorithms-Specialization | /algorithmic-toolbox/week2/LastDigitoftheSumofFibonacciNumbers/main.cpp | C++ | cpp | 943 | no_license | #include <bits/stdc++.h>
using namespace std;
vector<int> numbers ;
int main()
{
ios::sync_with_stdio(0) ;
long long n , t , m = 10 ;
cin >> n ;
int i = 3 ;
numbers.push_back(0) ;
numbers.push_back(1) ;
numbers.push_back(1) ;
while(1)
{
t = numbers[i-1] + num... |
eb35ac1fd9f7aee4d92a28d2e75b1e630c18dddb | 13313f5f5678000c0d640f78ef0730ed0fc54838 | CaptainMax/backup | /game/emus.cpp | C++ | cpp | 321 | no_license | #include <iostrem>
#include <iomanip>
using namespace std;
enum color_set{red, yellow, blue, white, black};
int main(){
color_set colorl
int i;
cout << "red is "<< red
<< "yellow is " << yellow
<< "blue is" << blue
<< "white is " << white
<< "black is " << black <<endl;
color_set stop = white;
}... |
c2c4c703549a9c21726dbda5968bacff96c31b99 | ef0ded587612949ee10ca3faec274996d28dc4ee | Schwaigs/Digital_image_processing | /TP3/src/extract_border.cpp | C++ | cpp | 3,482 | no_license | #include <unistd.h>
#include <cstdlib>
#include <iostream>
#include <cstdint>
#include "image.h"
#include "fileio.h"
#include "extract_border.h"
int main(int argc, const char * argv[]) {
if(argc !=4) {
std::cout << "Usage : " << argv[0] << " <input.pgm> <output.pgm> adjacence\n";
exit(EXIT_FAILURE)... |
22e234390892861313ec224af38fef9c2ffa1ade | 796d5092261724e4b1d6c2e7b5f2f1ff77d8e3df | bravesoftdz/cbuilder-vcl | /Include/Vcl/invconst.hpp | C++ | hpp | 1,203 | no_license | // Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved
// (DO NOT EDIT: machine generated header) 'InvConst.pas' rev: 6.00
#ifndef InvConstHPP
#define InvConstHPP
#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <SysIni... |
b993a1f827415a38fe0bbd9f8b71cd35be2a5f5c | cf6f87197486019a9043842cf89cdbeaff85e3bf | dominikbelter/useLibExample | /main.cpp | C++ | cpp | 961 | no_license | /** @file main.cpp
*
* This example shows how to use external 'Robot' library
*
* @author Dominik Belter
*/
#include "Robot/LabMate.h"
#include "Robot/MessorII.h"
#include <iostream>
#include <memory>
using namespace std;
int main()
{
try {
using namespace tutorial;
// create LabMate robot
... |
211f6f245042be64e86f68ae4fc744f13cd1ef21 | a6d19cd0d6785f150deea73210fee26e7ff4a843 | yisea123/megarobostudio | /source/model/mcmodel.cpp | C++ | cpp | 1,318 | no_license | #include "mcmodel.h"
mcModel::mcModel()
{
init();
}
mcModel::~mcModel()
{
deinit();
}
//! load data from file
void mcModel::preload()
{
mDeviceDbs.load( DEVICE_TALBE_NAME );
}
void mcModel::postload()
{
resetCommunicate();
}
mcConnection& mcModel::getConnection()
{
retu... |
9df8acc77b833b50b8af6da39c79c35d156dcc4c | 9d65207d66ec6c555f8dd7f7ac6ec4dfdab271ad | ttalvitie/efficient-markov-equivalent-dag-counting | /mao/he_yu_2016.cpp | C++ | cpp | 273 | no_license | #include "mao.hpp"
#include "he_yu_2016.hpp"
Z countMAOUsingHeYu2016(const GraphData& graphData) {
Z ret;
graphData.accessGraph([&](auto graph) {
assert(isValidEssentialGraph(graph));
ret = he_yu_2016::computeSize(graph);
});
return ret;
}
|
0310f8e3b7971b5a1fa8a05af4cdb833726be08b | c31bd82a04982a982d94fef6363a4722b0a897d5 | mateushcp/POO-avancada | /VPL02 - Arranjos Limitados/main.cpp | C++ | cpp | 1,734 | no_license | #include <iostream>
class NotInicialized {
public:
NotInicialized() {
std::cout << "Erro: indice nao inicializado.";
}
};
class NonPositive {
public:
NonPositive() {
std::cout << "Erro: indice negativo.";
}
};
class Greater {
public:
Greater() {
std::cout << "Erro: indice ma... |
1239f10b6ca8554476752329a57b1036cde8f7c5 | 8e6994ca8ae2a341d84104d272418cf03a62ece6 | Jonatankk/codigos | /URIOJ/uri2399.cpp | C++ | cpp | 399 | no_license | /*
* Leonardo Deliyannis Constantin
* URI 2399 - Campo Minado
*/
#include <stdio.h>
#define MAX 52
int main(){
int N, i;
int v[MAX];
while(scanf("%d", &N) != EOF){
for(i = 1; i <= N; i++){
scanf("%d", &v[i]);
}
v[0] = v[N+1] = 0;
for(i = 1; i <= N; i++){
... |
4e6ec57c2dbf8d8d1abc8165a6444dfc4e0c638b | 0e56fef2d62ccb4362ace023f5592464f4aa3e3e | sid-tiw/cp3 | /162-Beggar_my_neighbour.cpp | C++ | cpp | 3,254 | no_license | #include <iostream>
#include <list>
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
template <class T>
void print(T arr) {
for (auto it : arr) cout << it << " ";
cout << "\n";
}
bool isNotFace(string str) {
char ch = str.at(1);
if (ch == 'K' || ch == '... |
14f421346912ad74102ca50adbb0bfc4c11888a9 | 611a09fa5041738ee3b71eee21b8fdf0bba2d3ea | nehlsen/LedWall | /main/LedMode/FancyParts/Sprinkle.cpp | C++ | cpp | 566 | no_license | #include "Sprinkle.h"
#include <LedMatrix.h>
#include <GfxPrimitive.h>
namespace LedWall::Mode::FancyParts {
uint16_t Sprinkle::getFrameCount() const
{
return 2 * 25; // 2 seconds * 25 fpd
}
void Sprinkle::renderImpl(uint16_t relativeFrame)
{
GfxPrimitive prim;
const int count = (m_matrix.getWidth() * m... |
9403f2bcb267d8f215c491e498114ec04db3f8ae | fcdb1a104b70116cb47aeb4e115f7efcd31e1378 | jahewson/gecode | /gecode/int/gcc/post.hpp | C++ | hpp | 4,950 | permissive | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Patrick Pekczynski <pekczynski@ps.uni-sb.de>
*
* Contributing authors:
* Christian Schulte <schulte@gecode.org>
* Guido Tack <tack@gecode.org>
*
* Copyright:
* Patrick Pekczynski, 2004/2005
* Christia... |
21f985d02dd725aa5b2db13711712c4082986f74 | d68459e24b0ae2d69add969879564e862c435fb4 | nilzyj/test | /数据结构/实验六/main.cpp | C++ | cpp | 11,699 | no_license | #include <math.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#define MAXSIZE 30000 //排序表的最大容量
//冒泡
//enum BOOL{False,True};
//typedef struct //定义排序表的结构
//{
// int elemword[MAXSIZE]; //数据元素关键字
// int Count; //表中当前元素的个数
//}SqList;
//void InitialSqList(SqList&); //初始化排序表
/... |
ae410c9deac27b1fcdeca93edd8babfb28f78903 | cefabfa1541b5d4524ecfd5784f18381c09d9971 | wisepotato/cppcourse | /course03/miguel/list/unit_tests.cc | C++ | cc | 1,443 | no_license | #include <gtest/gtest.h>
#include "list.h"
struct ListTest : public ::testing::Test
{
LinkedListInt lli;
};
// Just for convenience
auto& Next = LinkedListInt::Next;
TEST_F(ListTest, Init)
{
EXPECT_EQ(lli.First(), nullptr);
}
TEST_F(ListTest, EmptyList_Remove)
{
EXPECT_THROW(lli.RemoveFront(), LinkedListInt::Rem... |
c8957a4b84dccc2fb2b613bbdbfd8c3e85d816ab | db773b64da56eef11fac7cba87ec7b5ac1b7e6c5 | Jbowman353/dice-util | /inc/dice.hpp | C++ | hpp | 302 | permissive | #ifndef __DICE_HPP
#define __DICE_HPP
namespace diceutil {
class Die {
private:
unsigned int sides;
int val;
public:
Die(unsigned int sides);
int roll();
unsigned int getSides();
int getVal();
int setVal(int newVal);
};
}
#endif |
8c4f287716ed51783f130c2e96275dcd9d2f253e | 5f2de2544584028fdac28a5cdc5de325d2d2cfe6 | smartyrad/oap-mllib | /mllib-dal/src/main/native/ALSDALImpl.cpp | C++ | cpp | 22,033 | permissive | /*******************************************************************************
* Copyright 2020 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.a... |
0c546eec885316bca08691cb2fcdfb153f9b5639 | 70a07b3a031d26a1c1603e99bae409fff4fd3080 | o-nix/skypekit-node | /Account.hh | C++ | hh | 406 | no_license | #pragma once
#include "stdafx.hh"
namespace o_nix {
class Skype;
class Account : public ::Account {
protected:
o_nix::Skype* _skype;
public:
Account(unsigned int oid, SERootObject* p_root);
virtual ~Account();
typedef DRef<o_nix::Account, ::Account> Ref;
typedef DRefs<o_nix::Account, ::Accoun... |
ee3103bf5f191299108168735fea8c934326716e | efbf98796987fca9c2dc69c5f3a867a7e32d65c3 | forkee/boxycoin | /src/rpcnet.cpp | C++ | cpp | 17,429 | permissive | // Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "rpcserver.h"
#include "clientversion.h"
#include "main.h"
#include "net.... |
d6c834c455db80a00459a7b49f221647b43516f8 | 6d76dffffdee3c2e99d8108441a9b6db8856320a | Sotatek-TuyenLuu/DP2 | /MITK-superbuild/ep/src/GDCM/Source/DataDictionary/gdcmUIDs.cxx | C++ | cxx | 25,374 | permissive |
// GENERATED FILE DO NOT EDIT
// $ xsltproc UIDToC++.xsl Part6.xml > gdcmUIDs.cxx
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sour... |
38db48b38495b643454c9b69d68c9d56903aac20 | c9ac34f6ab6aa8f948d2f732be03009001aa56a6 | ZeeshanHabib7/searching-and-sorting-algo | /search.cpp | C++ | cpp | 1,597 | no_license | #include<iostream>
using namespace std;
//////////////////
class searching{
public:
int *arr,len,data,temp;
///////////////////
void length(int length){
len=length;
arr=new int[length];
}
/////////////////////////
void selectionsort(){
for (int i=0;i<len;i++){
for(int j=i+1;j<len;j++){
if(arr[i]>... |
d00ef2b85107a3497884b801e0b7a6c098903358 | fbc02ee1e7a398dd229a04f723df46f15ab9cc30 | kgajwan1/CTCI_practice | /structures/graph_test.cpp | C++ | cpp | 1,686 | permissive | #include <bits/stdc++.h>
struct edge{
int src,dest;
};
typedef std::pair<int,int> Pair;
class weighted_edge{
public:
int src,dest,weight;
};
//non weighted
class Graph
{
public:
std::vector<std::vector<int>> adjlist;
Graph(std::vector<edge> const &edges, int n)
{
... |
633e576b4411977a4a785ebb878fc00dfc416fd7 | 6f21ced858e87fe79a7e6ba93dfbc45fef757faa | coolvegan/Course-Learning-Cpp-Memory-Management | /Chapter 7/0701_code.cpp | C++ | cpp | 653 | no_license | int i = 0;
for(; i < 20; ++i) {
doThing(someVar[i]);
}
int i = 0;
for(; i < 20; ++i) {
if (someTest(i)) {
++I;
}
doThing(someVar[i]);
}
function doWork(int i) {
// .. some work
}
vector<int> someInts;
fillVector(vector);
for_each(someInts.begin(),someInts.end(),doWor... |
23f49cc6715bae1f312aaee673dcee2876db431d | ae41a36d0b3b1e5a4a148340e3a4f29da976bd33 | ibmsoe/ImpalaPPC | /be/src/runtime/data-stream-mgr.cc | C++ | cc | 11,619 | permissive | // Copyright 2012 Cloudera Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... |
71bb95b72037da0112eca03209d6ec46758a2c5b | 330c5d592f343e67f1f7c9e72e33c3ec9a8781eb | yvonne-dong/dongy987_dtOF_2018 | /w07_midterm_draft/src/Moon.cpp | C++ | cpp | 1,864 | no_license |
#include "Moon.hpp"
Moon::Moon(){
pos = glm::vec3( ofRandom(ofGetWidth()), ofRandom(ofGetHeight()), 0);
mass = ofRandom(1,5);
vel = glm::vec3(0,0,0);
acc = glm::vec3(0,0,0);
ofSetSphereResolution(3);
}
Moon::Moon(glm::vec3 _pos, float _mass){
pos = _pos;
mass =... |
9f3add0477bac28bf9527588608313c1cdc9c16a | ae3bf1071155a170266a13cf133cdcdae3ba48fd | LuxRender/LuxRays | /src/slg/kernels/camera_types_kernel.cpp | C++ | cpp | 3,420 | permissive | #include <string>
namespace slg { namespace ocl {
std::string KernelSource_camera_types =
"#line 2 \"camera_types.cl\"\n"
"\n"
"/***************************************************************************\n"
" * Copyright 1998-2017 by authors (see AUTHORS.txt) *\n"
" * ... |
bf6260a6b8a5adcecff91896e20aaf3da8f99fcc | e1c12f1df2ffcf223a06bb77107bdfc7fc05e368 | itohdak/AtCoder | /ABC/new/A-E/13-/134/E.cpp | C++ | cpp | 532 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
const int inf = 1e9+7;
const ll longinf = 1LL<<60;
const ll mod = 1e9+7;
int main() {
int N;
cin >> N;
vector<ll> A(N);
rep(i, N) cin >> A[i];
multiset<ll> S;... |
d0ce37cac6ea1b2e2984f7f7602f5e4a963f178f | eb5e2b0f00a043166848ffe2dcff57df2827402e | James-Ng0/CGRA | /work/src/application.cpp | C++ | cpp | 7,037 | no_license | #pragma once
// std
#include <iostream>
#include <string>
#include <chrono>
// glm
#include <glm/gtc/constants.hpp>
#include <glm/gtc/matrix_transform.hpp>
// project
#include "application.hpp"
#include "cgra/cgra_geometry.hpp"
#include "cgra/cgra_gui.hpp"
#include "cgra/cgra_image.hpp"
#include "cgra/cgra_shader.hp... |
67335257d7fae0010d7c90156083e2db169d8b78 | 0c1e3d34cd14bf7419cf8ab2f3822f8d2299cbe1 | gogakoreli/snake | /snake.cpp | C++ | cpp | 3,573 | no_license | #include "snake.h"
#include <pthread.h>
#include <iostream>
#include <vector>
#include <utility>
#include "snake_map.h"
#include "macros.h"
using namespace std;
void *input_thread_work(void *arg)
{
struct Snake *snake = (struct Snake *)arg;
while (true)
{
enum Direction direction = get_input();
... |
bc39c5418642cf9c820a3aab609e86a1b65ffb90 | e9b4811c6ea9c5f03436a5c7e2e6d59ab620a480 | huaweicloud/huaweicloud-sdk-cpp-v3 | /gaussdbfornosql/src/v3/model/PauseResumeDataSynchronizationRequest.cpp | C++ | cpp | 2,572 | permissive |
#include "huaweicloud/gaussdbfornosql/v3/model/PauseResumeDataSynchronizationRequest.h"
namespace HuaweiCloud {
namespace Sdk {
namespace Gaussdbfornosql {
namespace V3 {
namespace Model {
PauseResumeDataSynchronizationRequest::PauseResumeDataSynchronizationRequest()
{
instanceId_ = "";
instanceIdIsSet_ ... |
d348a9c63ff3fc8f7cf4790b2acd8ddafd933852 | 41dea707116a4fb39f16d40e7453e83068504d79 | SergeyStrukov/CCore | /CCore/src/Array.cpp | C++ | cpp | 562 | permissive | /* Array.cpp */
//----------------------------------------------------------------------------------------
//
// Project: CCore 1.02
//
// Tag: General
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
/... |
8eecfce9a7aa360f9dbd4dc527a08f2ede7399f3 | 3c43e1b61e94d450db2c88ca7aae450b48191fac | tofutim/paycon2 | /src/qt/optionsdialog.cpp | C++ | cpp | 9,406 | permissive | #if defined(HAVE_CONFIG_H)
#include "bitcoin-config.h"
#endif
#include "optionsdialog.h"
#include "ui_optionsdialog.h"
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include "netbase.h"
#include "optionsmodel.h"
#include "conspeech.h"
#include "guiutil.h"
#include "util.h"
#include <QDebug>
#include <QD... |
4b8e646bb12bf3ed8088a0329dd987c13efbd4f4 | 7d1ae46cda3e0d2e00b2d0f2378e800394994e26 | dchopra001/queueSimulation | /RandomVariable.hpp | C++ | hpp | 2,024 | no_license | #include <limits>
#include <vector>
#include <stddef.h>
class RandomVariable {
public:
RandomVariable() {};
RandomVariable(double lowerLimit, double upperLimit): lowerLimit(lowerLimit), upperLimit(upperLimit) { };
~RandomVariable() {};
virtual bool setUpperLimit(double) = 0;
virtua... |
281fcfe44c0f752d0456f151ce62fb641406557c | 9947cc2c2f832a18a8aa1a9fc5bae9c52e749002 | jpmn/rough-albatross | /Baluchon/PatternDetectionService.cpp | C++ | cpp | 7,848 | no_license | #include "PatternDetectionService.h"
#include "IServiceLayer.h"
#include "CameraCaptureService.h"
#include "Pattern.h"
#include "DetectedPattern.h"
#include "math.h"
namespace baluchon { namespace core { namespace services { namespace patterndetection {
PatternDetectionService::PatternDetectionService(voi... |
cd21f7eb31940a092a8aa6b662ac2ac4872b1129 | 8e02cf127bfd9730034f59e4508f3d198d608496 | CortexFoundation/tvm-cvm | /src/relay/pass/util.cc | C++ | cc | 11,486 | permissive | /*
* 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 ... |
55b896b1707466b8712f261beaff5ef80e981894 | 01e2f24ad3f26757f8739fd994cbcba368f9ca9d | ytlei/cpp-boilerplate | /include/PidController.hpp | C++ | hpp | 1,481 | no_license | /************************************************************
* *
* Copyright (C) 2017 by Yi-ting Lei *
* *
***********************************************************/
/**
* ... |
02f1a82f1a0844044f4401c395f9dde899433ff9 | 971112093bddf3beb1a7793e133a859ccba5756a | issac123huxley/lluvia | /samples/lluvia-docs/memory/test_createMemory.cpp | C++ | cpp | 1,814 | permissive | #define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"
#include "lluvia/core.h"
#include <vulkan/vulkan.hpp>
#include <iostream>
#include <memory>
TEST_CASE("CreateMemory", "test_createMemory") {
auto session = ll::Session::create(ll::SessionDescriptor().enableDebug(true));
REQUIRE(session != nullptr);
c... |
7e3af9847a2d056ee48dada1c4d279a0d01c7fc9 | 3bf1251de317b578e93a179ca04e458e82389c51 | MohammedMekky/ITI_Cpp | /ITI_CPP/FIRST3.CPP | C++ | cpp | 372 | no_license | #include<conio.h>
#include<iostream.h>
#include<string.h>
#include<stdio.h>
void main()
{
clrscr();
char name1[10],name2[10],fullname[20];
puts("enter your first name:");
gets(name1);
puts("enter your last name:");
gets(name2);
strcpy(fullname,name1);
strcat(fullname," ");
strcat(fullname,name2);
cout<<"... |
2b1d87bc9e993a35683c3b4f02372fe26db96cd4 | b6d66445606bf75e7be87abe7e6db82698acc6fd | FengJingkun/TinyNet | /main.cpp | C++ | cpp | 441 | no_license | #include <iostream>
#include "TinyNet/log.h"
#include "TinyNet/acceptor.h"
#include "TinyNet/event_loop.h"
#include "TinyNet/tcp_server.h"
int main() {
LOG_MSG("main thread = %d\n", pthread_self());
acceptor* pAcceptor = acceptor::acceptor_init(12345);
event_loop* pEventLoop = event_loop::event_loop_init... |
0c4b3fe7d430bed9c916cf1a062072f8e24eea80 | 5806e6c49cd165e63722ab38df4f8e15841b442d | abhishek09091/competitive-programming | /DSA-3/Arrays/frequency-of-array-elements.cpp | C++ | cpp | 596 | no_license | /****
https://www.geeksforgeeks.org/count-frequencies-elements-array-o1-extra-space-time/
*****/
/*This is a function problem.You only need to complete the function given below*/
// Function to count frequencies of elements in the array
// arr: input array
// n: size of array
void printfrequency(int arr[], int n){
... |
ee29bb6219fec2384a89d8d1d4065c03bc57b045 | b3956962532c88f89c5dcda58bcc8cf16f2f55dd | 08saurav/100_days_codes | /day67_box_stacking_problem.cpp | C++ | cpp | 1,630 | no_license | /*
* =====================================================================================
*
* Filename: day67_box_stacking_problem.cpp
*
* Description:
*
* Version: 1.0
* Created: 09/12/2020 12:55:42 AM
* Revision: none
* Compiler: gcc
*
* Author: Saurabh ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.