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 |
|---|---|---|---|---|---|---|---|---|
8510c30b2488acb416b111d3399f16d1559f3806 | 92d2583c20fac5ba4bbc7f8a1f000cb44c75bf61 | ALEHACKsp/niesonae_csgo | /sdk/valve_sdk/client_class.hpp | C++ | hpp | 702 | no_license | #pragma once
#include <sdk/types.hpp>
#include "dt_recv.hpp"
namespace sdk::valve
{
class ClientClass
{
class IClientNetworkable;
using CreateClientClassFn = IClientNetworkable*(*)(int entnum, int serialNum); // typedef IClientNetworkable* (*CreateClientClassFn)( int entnum, int serialNum );
using CreateEven... |
0db8cb2fbf8e398ff14cf25109ee7179e24f5827 | 2a912c0988df1bcce10aee6285e0149376117461 | IoanaCristescu15/Lab1 | /ReadWriteFinal.cpp | C++ | cpp | 8,340 | no_license | /*
Names: Mamnuya Rinki and Ioana-Andreea Cristescu
Course: CMSC 240
Professor: D Szajda
Due date: 09/01/2021
Project Description: This program reads an input file where each line of the input file
consists of a first name (string), last name (string), student ID (int), and year of study (int) separ... |
24251fed5ce50b4ac9a5bcc17666764476b804a3 | 68d82fc2fcd875e826716af46236b32c408ffc7a | mbeckem/tiro | /src/vm/interpreter.hpp | C++ | hpp | 11,487 | permissive | #ifndef TIRO_VM_INTERPRETER_HPP
#define TIRO_VM_INTERPRETER_HPP
#include "bytecode/fwd.hpp"
#include "vm/fwd.hpp"
#include "vm/handles/handle.hpp"
#include "vm/objects/coroutine.hpp"
#include "vm/objects/nullable.hpp"
#include "vm/objects/value.hpp"
#include <array>
namespace tiro::vm {
/// Storage for temporary va... |
fd5dee37fe1f320e54fcb85c6f446959769d3415 | 2c93f6d281edee0dc7847dd7ce5a6f42cc59ef14 | cryptoknowing/gastrocoin | /src/amount.cpp | C++ | cpp | 862 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017-2018 The PIVX developers
// Copyright (c) 2021-2021 The GastroCoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-... |
9d6bd76e3f8ee23acd72114fba47c5b98474d2ae | af4b0052b29e2a0bcc8d1e50e0db3f9b87735ae3 | liuqun/tpm2-app | /appmain/libplugin/Hash.cpp | C++ | cpp | 5,944 | no_license | /* encoding: utf-8 */
/// @copyright Copyright (c) 2017, 青岛中怡智能安全研究院有限公司
/// All rights reserved.
#include <sapi/tpm20.h>
#include "TPMCommand.h"
using namespace TPMCommands;
// ============================================================================
// 自定义输入输出参数格式
// --------------------------------------------... |
df021159b00be074804ae56a54cbd86066103236 | 0553eb00e014cc04dd6a2526798778316c8cc0e4 | jpnurmi/skia | /tools/DDLTileHelper.cpp | C++ | cpp | 14,486 | permissive | /*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "tools/DDLTileHelper.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkDeferredDisplayListRecorder.h"
#include "include/core/SkPicture.h"
#include "incl... |
66a09c8008148e3136f7b68aeeb0f58d2ca6630f | 6a820224c674e6b4775b28648a2d35cfe7cf10eb | jokerlee/college | /courses/SoliDire/Final/SoliDire/MainFrm.cpp | C++ | cpp | 4,320 | no_license | // MainFrm.cpp : implementation of the CMainFrame class
//
#include "stdafx.h"
#include "SoliDire.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
static const UINT kImageWidth (50);
static const UINT kImageHeight (70);
static co... |
97282eeae28a5196d5e966e91ee20e09bb57b91b | a74bd5a06565bd72ba41649e7e5e5b6ee2541604 | zcl/asio | /include/boost/asio/basic_socket.hpp | C++ | hpp | 65,552 | no_license | //
// basic_socket.hpp
// ~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot 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_ASIO_BASIC_SOCKET_HPP... |
7f928d2bf42f4c93d0d52b2114c6f324aa809c24 | d3448b299e06c2b85812eb2a3c2d39fd1bbe19b5 | OKullmann/oklibrary | /Experimentation/Investigations/RamseyTheory/VanderWaerdenProblems/Transversals/plans/Datak16.hpp | C++ | hpp | 2,732 | no_license | // Oliver Kullmann, 22.4.2010 (Swansea)
/* Copyright 2010 Oliver Kullmann
This file is part of the OKlibrary. OKlibrary 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 and included in this library; either version 3... |
2e9576521ec2eed981e39953b5772e24297abce3 | b1cb8f8d0ab607a863636720fe5df6ef03c847ab | artagnon/rhine | /include/rhine/Toplevel/ParseFacade.hpp | C++ | hpp | 3,469 | permissive | #pragma once
#include <iostream>
#include <string>
#include <vector>
#include "rhine/IR/Context.hpp"
#include "rhine/IR/Module.hpp"
#include "rhine/Parse/ParseDriver.hpp"
#include "llvm/Support/raw_ostream.h"
typedef int (*MainFTy)();
namespace llvm {
class ExecutionEngine;
class Module;
}
namespace rhine {
class... |
fc729cd6c540d9089a672e645734cf2ceeb6ebc1 | 3d9176379ae0c727fbee108d958cb56ef844fcb3 | sbrmnd/SabirMandal | /CPlusPlus/ConsoleApplication1/GraphsQuestions.cpp | C++ | cpp | 1,404 | no_license | #include "GraphsQuestions.h"
Graph::Graph(int V)
{
this->V = V;
Adj = new list<int>[V];
}
void Graph::AddEdges(int v, int e)
{
//Add the edges to V's list.
Adj[v].push_back(e);
}
void Graph::DFSUtils(int V, bool visited[])
{
//Make the current node as visited node.
visited[V] = true;
cout << V << " ";
//rec... |
43055c410ef84c25662e151b09f8b87de6f74072 | 729d92f7e2c0dbb5b7aea90fdc6997d4c85730ba | LuZhouheng/CLOUDS | /CloudsLibrary/src/VisualSystems/ExampleBox2D/vs_src/CloudsVisualSystemExampleBox2D.cpp | C++ | cpp | 20,376 | no_license | //
// CloudsVisualSystemEmpty.cpp
//
#include "CloudsVisualSystemExampleBox2D.h"
#include "CloudsRGBDVideoPlayer.h"
static int id0 = 0;
static int id1 = 1;
//These methods let us add custom GUI parameters and respond to their events
void CloudsVisualSystemExampleBox2D::selfSetupGui(){
customGui = new ofxUISupe... |
3353f01b710476569cb46af8ff5cf3eb726fed56 | f7614b009cc99e796a2c0bf2037cfeb4f9cdc86e | bk5115545/3d_app_framework | /source/main.cpp | C++ | cpp | 3,486 | no_license | // Copyright 2015 Casey Megginson and Blaise Koch
#include <ctime>
#include <iostream>
#include <string>
// Media Libraries
#include "SDL.h"
// Physics
// Threaded Events
#include "event_system/Dispatcher.h"
// Project Libraries
#include "util/definitions.h"
#include "core/app_3d.h"
#include "core... |
d270295c54d050e84fbd139728d06398393e0397 | 93ea81d3acbcd7a2c5f2815224c0b4d1d1f23af5 | orsosa/telescope_arduino | /Clases/stepper/Stepper.cxx | C++ | cxx | 615 | no_license | #include <avr/io.h>
#include "Stepper.h"
void Stepper::stepperInit()
{
__STEPPER_DDR|=(0X0F<<STEPPER_POS);
__STEPPER_PORT|=(1<<STEPPER_POS);
}
void Stepper::stepperStepCCW()
{
uint8_t temp=(__STEPPER_PORT & (0x0F<<STEPPER_POS));
temp=temp>>(STEPPER_POS);
temp=temp<<1;
if(temp>(8))
temp=1;
__STEPPER_PORT=(... |
747fd1f26b854c04a7b70a322d9582e3263eacfe | 3553b14cb4fe7ef4fcd478773b8b2738211c0f89 | pavlutom/tomeshstein | /source/engine/utils/threading/renderer_thread.cpp | C++ | cpp | 1,701 | no_license | //
// Created by tomesh on 6/17/20.
//
#include "renderer_thread.h"
CRendererThread::CRendererThread()
: m_Thread(&CRendererThread::_thread_function, this),
m_Alive(true), m_WaitCalled(false), m_JobDone(false) {}
CRendererThread::~CRendererThread() {
m_Thread.join();
}
void CRendererThread::t... |
ccbcadb1bcec4163613e2f19afc26fcdbf7d7170 | c90e78d7086f6f2c88a092b3e4a4a764e0bf5b55 | fsy-juruo/noip2020-JS-Answers | /answers/JS-0389/water/water.cpp | C++ | cpp | 1,497 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int inf=0x3f3f3f3f;
const int N=1e5+10;
int n,m;
int d[N];
vector<int> gv[N];
vector<int> out;
queue<int> q;
int in[N];
ull gcd(ull x,ull y){if (!y)return x;return gcd(y,x%y);}
class frac{
public:
ull p,q;
... |
9e3f9138f6ece81d7d4b82339c193a323a572b20 | 35cbc8ceb3a9b29b6e9f4b0435caf90b824dea86 | Dipet/dldt | /inference-engine/thirdparty/clDNN/tests/test_utils/instrumentation.cpp | C++ | cpp | 16,491 | permissive | /*
// 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... |
bcc3e7b92280987b4b9108a914066997d8becfdb | 45b7b97698af65cc427bdf30b8136320f0be3590 | cttq-wubin/rdkit | /Code/GraphMol/SmilesParse/SmartsWrite.cpp | C++ | cpp | 30,057 | permissive | //
// Copyright (C) 2002-2019 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include "SmartsWrit... |
b4c3bed871ba0ecb262d0afacc8b4724423334cd | f1715f5be0f2466b601d8cd85cb22c88f1a93a92 | cuhk-eda/split-extract | /src/io/file_bkshf_db.cpp | C++ | cpp | 28,839 | permissive | #include "../db/db.h"
#include "../global.h"
#include "../sta/sta.h"
#include "io.h"
#include <set>
using namespace db;
class BookshelfData {
public:
int nCells = 0;
unsigned nTypes = 0;
unsigned nNets = 0;
unsigned nRows = 0;
std::string format;
map<string, int> cellMap;
map<string, int... |
4eae43130c982bb96f50b04bf8042380aae90a71 | 6445075c8ca34370d7f13b3bdb3bd263daeee7a3 | ajpen/cpp-caesar-cipher-workshop-solutions | /section_1/lesson/main_solution.cpp | C++ | cpp | 854 | no_license | //
// Created by anfernee on 9/5/19.
//
#include <iostream>
#include <cctype>
using namespace std;
/*
* Given what the user entered, we should tell them
* if they entered an upper case letter, or lower case letter
* or a non alphabetical character
*
* */
int main(){
char input = '\0';
cout << "Ente... |
eb74a2f306d44d1359f7b312893ce29d1beb7cb9 | 1373b5b7321dde65031aa50c49e29796cd4b2c5a | piabacsdump/EXP-2 | /P3.cpp | C++ | cpp | 1,045 | no_license |
#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include <cmath>
using namespace std;
const double z = 2.5;
int main()
{
int x, y;
double v;
cout << "Please enter two integers: ";
cin >> x >> y;
switch(x)
{
case(1):
{
if(1 < y && y < 5)
{
v = x*y*z;
cout << ... |
7dacce17fc04c12868822b0b2ffee2d9312952f8 | 736d22be5ca3a6700f0808630ea6bca0edc52949 | cran/VarSelLCM | /src/XEM.cpp | C++ | cpp | 3,115 | no_license | #include "XEM.h"
void XEM::InitCommumParamXEM(const colvec & om, const int & gv){
nbSmall = 10;
iterSmall = 20;
nbKeep = 1;
iterKeep = 1;
tolKeep = 0.001;
m_nbdegenere=0;
degeneracy=0;
loglikeSmall = ones<vec>(nbSmall) * log(0);
omega = om;
g=gv;
location = find(omega == 1);
iterCurrent = iterS... |
0008fb25dd403993d8e4cd60f6caf4df12210eaf | 4787a939969f674208586c83c1584565b1ccf573 | WtathamJason/AB0805_lib | /AB0805.cpp | C++ | cpp | 11,380 | no_license | // I2Cdev library collection - AB0805 I2C device class
// Based on Abracon AB08X5 Real-Time Clock Family datasheet, 2015
// 03/07/2015 by Curran Sinha (curransinha@gmail.com)
// Based heavily off of Jeff Rowberg's DS1307 RTC Library
// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdev... |
7b0a30936418fb3fc5beca828894e173dbae0371 | dcf97c80a682d16da3d6182a789e4dd330c2c7a6 | wonda-tea-coffee/aoj | /1173.cpp | C++ | cpp | 2,553 | no_license | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <ctime>
#include <cstring>
#include <functional>
#include <iostream>
#include <iomanip>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <regex>
#include <vector>
#define fix(... |
39d30c05a774fe14e8d237aee126834627f1817c | 80df8ae4f0047179492fce7348836967041ad1d7 | mfkiwl/ptam_android | /jni/PTAM/EyeGame.cc | C++ | cc | 7,194 | no_license | // Copyright 2008 Isis Innovation Limited
#include "EyeGame.h"
#include <cvd/convolution.h>
#include "OpenGL.h"
using namespace CVD;
EyeGame::EyeGame()
{
mdEyeRadius = 0.1;
mdShadowHalfSize = 2.5 * mdEyeRadius;
}
void EyeGame::DrawStuff(Vector<3> v3CameraPos)
{
if(!mbInitialised)
Init();
mnFrameCounter... |
91a4d6d61ccf41a20a5dcffd235883911b42d8ae | b8e76358963a5731e183f859b176f3962aec16a8 | vladimir-dudnik/open_model_zoo | /demos/background_subtraction_demo/cpp_gapi/include/custom_kernels.hpp | C++ | hpp | 2,212 | permissive | // Copyright (C) 2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <string>
#include <vector>
#include <cpp/ie_cnn_network.h>
#include <ie_allocator.hpp>
#include <ie_common.h>
#include <ie_input_info.hpp>
#include <opencv2/core.hpp>
#include <opencv2/gapi/gkernel.hpp>
#include <... |
6d6e5cac54f350cb83d21a1f18cafb83904c8a6a | 6d9db601e7da8eb98c82cbb90b0679785fdc6e97 | mrkmarron/ChakraCore | /lib/Runtime/Library/WebAssemblyTable.cpp | C++ | cpp | 8,725 | permissive | //-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... |
79447f525c863df56d71c305488cd06a9b1d915b | e58be18e30f982a948fe62ec74a70e43976d3f16 | phandaiduonghcb1/nmlt | /Buoi2/B9.cpp | C++ | cpp | 378 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n,i;
float s = 0;
cin >>n;
for (i=1;i<=n;i++)
s=s+1/float(i);
if (n==0) cout <<"S(0) = 0";
else
if (n==1) cout <<"S(1) = 1";
else
{
cout <<"S("<<n<<") = 1";
for (i=2;i<=n;i++)
cout << " + 1/"<<i;
... |
90b31b1d73f1f3316c4bd08a2aa00b95cb2365dc | c31a4325479c7869f554f7dd7a62c923ea90db2b | Tuan-97/Nhom_4 | /FinalProject/Class/customer.cpp | C++ | cpp | 422 | no_license | #include "customer.h"
Customer::Customer()
{
}
Customer::Customer(int id, string name, string contact, string address, string city, string postalcode, string country){
this->Customer_ID = id;
this->Customer_Name = name;
this->Customer_Contact = contact;
this->Customer_Address = address;
this->Cust... |
7f420fb75c6cf25cb7790e57eef64fba2e538ca9 | 0d6002c9f0244b333d6b53b126fd64a1f627b527 | sbrkopac/VulkanSceneGraph | /src/vsg/app/Viewer.cpp | C++ | cpp | 23,076 | permissive | /* <editor-fold desc="MIT License">
Copyright(c) 2018 Robert Osfield
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, mod... |
f4c0fa286942f5fec0155e5a30036966fd2777bd | 173e44c49d689f667dd69a5798c8f7abed614eab | aryan-shrivastava09/GFGDSA | /StockBuySellNaive.cpp | C++ | cpp | 571 | no_license | #include<iostream>
using namespace std;
int maxprofit(int arr[], int start, int e)
{
int curr_profit = 0, profit = 0;
if(e<=start)
return 0;
for(int i=start;i<e;i++)
{
for(int j=i+1;j<=e;j++)
{
if(arr[j]>arr[i])
{
curr_profit = arr[j]-arr[i... |
eb66ce0d3d09c1d7ceb5a4ac55317140d836fcd4 | 4e2813d02c0625e756ffaf8fca6e5bd45fc78ed5 | burghout/mezzo | /branches/Emma/mezzo_lib/src/Graph.cpp | C++ | cpp | 20,022 | no_license | //-*-C++-*------------------------------------------------------------
// NAME: Template Classes
// NOTE: A basic graph class
// AUTH: Yang, Qi
// FILE: Graph.cc
// DATE: Thu Sep 28 18:02:13 1995
//--------------------------------------------------------------------
#ifndef GRAPH_IMPLEMENTATION
#define GRAPH_IMPLEMENT... |
c6514642171f7e35dafd76defed981d34fa7e86c | d66004d714fe4fc5a9ef429d0c0e450dbb5e74e4 | RinatB2017/Qt_github | /Habrahabr_Demo/Source/ComPort/PresenterComPort.cpp | C++ | cpp | 4,728 | no_license | #include "PresenterComPort.h"
PresenterComPort::PresenterComPort(QObject *parent) :
QObject(parent),
m_model(new ModelComPort)
{
thread = ComPortThread::getInstance();
connect(thread, SIGNAL(responseMsg(const QByteArray&)), this, SLOT(response(const QByteArray&)));
connect(thread, SIGNAL(error(QSt... |
41c786a0c672afcc5fd1ea6173bad0c5a8e0ceee | e97020cb22d055678f6cdc64c2b6df3954dec9cc | dinhnhat0401/Henshin | /Classes/Model/DBTalkNext.cpp | C++ | cpp | 2,513 | no_license | //
// DBTalkNext.cpp
// Henshin
//
// Created by hoangdieu on 8/2/14.
// Copyright (c) 2014 DNK. All rights reserved.
//
#include "DBTalkNext.h"
#include "DBConnect.h"
USING_NS_CC;
void DBTalkNext::init(int uid, int chara_id, int talk_id, int time)
{
this->uid = uid;
this->chara_id = chara_id;
this->t... |
c8de26c36e48e1b95f9e7700a20a391157999283 | 5b54852b6d1c76848b4e456e062f64f06e35fc2b | eduardordev/MicrosLab04 | /Lab4.cpp | C++ | cpp | 4,942 | no_license | /*
-------------------------------------------
Lab4.cpp
-------------------------------------------
UNIVERSIDAD DEL VALLE DE GUATEMALA
PROGRAMACION DE MICROPROCESADORES
SECCION 20
AUTHORS:
Oscar De Leon - 19298
Eduardo Ramirez - 19946
Marco Ramirez - 19588
version 1.0
DATE: 15/09/2020
----------------------------------... |
9550f8636924e3c158a5f3cb3cbdf702c02e4961 | ac253847495c941f32a99a8a8ef85d44535a6fb7 | pconrad/old_pconrad_cs16 | /textbooks/etterC3e/0131429892_Source/Cpp/p8_1.cpp | C++ | cpp | 846 | no_license | // p8_1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
//--------------------------------------------------------------
// Program chapter8_1
//
// This program computes the distance between two points.
#include <iostream.h>
#include <math.h>
int main(void)
{
... |
4dc13b07859fbf80f747ca6efaa58c23f66efa9c | 308f8acc93f9e25f2d6ca00ff5abb039b23dae1f | mnmz81/Generic-binary-search-tree- | /Point.cpp | C++ | cpp | 1,586 | no_license | #include "Point.h"
using namespace std;
/********************************************/
Point::Point(double xp,double yp):x(xp),y(yp){}
/********************************************/
Point::Point():x(0),y(0){}
/********************************************/
Point::Point(Point& temp):x(temp.x),y(temp.y){}
/**************... |
0a676c407062ce8f145de2a31efeee75c3d47640 | 83dcc5176e7be2bba9b5890276ef82de00f99b68 | plibera/Inkball-game | /inkballview.cpp | C++ | cpp | 612 | no_license | #include "inkballview.h"
InkBallView::InkBallView(InkBallScene* inkBallScene)
:QGraphicsView(inkBallScene)
{
setRenderHint(QPainter::Antialiasing);
setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "InkBall"));
setFixedSize(scene()->sceneRect().width(), scene()->sceneRect().height());
setHorizontalSc... |
443bf8d35f7617a6bdf4a0dda39a070e7db1a305 | c6787ea22c1d4bb20788029495330fe3eb67a816 | intel/umf | /3rdparty/cryptopp/cast.cpp | C++ | cpp | 11,304 | permissive | // cast.cpp - written and placed in the public domain by Wei Dai and Leonard Janke
// based on Steve Reid's public domain cast.c
#include "pch.h"
#include "cast.h"
#include "misc.h"
NAMESPACE_BEGIN(CryptoPP)
/* Macros to access 8-bit bytes out of a 32-bit word */
#define U8a(x) GETBYTE(x,3)
#define U8b(x)... |
619a327e92bda2ddfa44fd5ebf9b3b0476ec3bf8 | 7ba3bd8e4eaa392410e636ceaeb4c8fc75f25dac | kylegalloway/lrose-core | /codebase/apps/ingest/src/GtsSockIngest/GtsSockIngest.cc | C++ | cc | 8,657 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
86d0f704326ba2820dfd883a32868ce9765bfda1 | fdcb179b81d8c33b01784f8c33b6fb6cc94ca6c8 | sumoclassic/haven | /src/wallet/api/wallet_manager.cpp | C++ | cpp | 11,996 | permissive | // Copyright (c) 2014-2017, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
/... |
90801fe961c7f0f180c7279ae366e99c6ec2211e | 2f77037e45319ab463a26fef1cb60929bccc283f | timblechmann/nt2 | /modules/extern/boost_math/unit/scalar/gamma_p_derivative.cpp | C++ | cpp | 2,082 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
bda343b9981a0ffc47ab2be1c25c650c3a37ab40 | 263160470114aacdf7b97260202e39417886656e | bit-hack/trash | /gc.cpp | C++ | cpp | 786 | no_license | #include "gc.h"
gc_t::gc_t() {
_bounce = [&](gc_base_t *obj) {
if (obj) {
_follow(obj, _mark);
}
};
}
void gc_t::_follow(gc_base_t *obj, std::set<gc_base_t *> &out) {
if (obj && out.find(obj) == out.end()) {
out.insert(obj);
obj->_enumerate(_bounce);
}
}
void gc_t::collect() {
_mark.c... |
830af4247ad04c22cb08725660422c1dae97e127 | a8e69d5b7cd8e3fdd27b3f5cc8bbb6cbb46d9fd6 | iraqigeek/iZ3D | /lib/boost/include/boost/mpl/aux_/config/operators.hpp | C++ | hpp | 1,121 | permissive |
#ifndef BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
//
// 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)
//
// See htt... |
abac6599ec02ffb67cc3996543b1d48fbccc4f52 | 2902c9d3ca04e1fae74061c76f3c060ff1d731b7 | joshkol1/Project-Euler | /Completed/001-050/problem016.cpp | C++ | cpp | 736 | no_license | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<array>
#include<assert.h>
#include<string>
#include<math.h>
#include<climits>
#include<utility>
#include<functional>
#include<numeric>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
i... |
17dee1f4fa23eaf19f0f69d528d17e8af55eb4b1 | fe0684267c0b126e138652ab51a926484abd22ca | Martins3/ACM | /lintcode/6/671.cpp | C++ | cpp | 887 | no_license | #include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include <stack>
#include <sstream>
#include <climits>
#include <forward_list>
#include <deque>
#include <set>
#include <utility>
#include <queue>
#include <map>
#include <cstring>
#include <algorithm>
#include <iterator>
#include <string>
using... |
f942b51eb89d41a92711e2c0b2ae47ccf48e009f | d6a2955af7e17ec1f0741934583265b3d4ffa9be | Achandroth/QHG | /QHG3/tools_io/Angulator.cpp | C++ | cpp | 18,970 | no_license | #include <stdio.h>
#include <hdf5.h>
#include <math.h>
#include "Vec3D.h"
#include "SCell.h"
#include "QDFUtils.h"
#include "Angulator.h"
const double RAD = M_PI/180.0;
const double EPS = 1e-6;
const int MAX_NEIGHBORS = 6;
//----------------------------------------------------------------------------
// createIn... |
8f831b003b4cc4003f1f07fee2c3307e452ff989 | 0b9a4591984c0617accf87222d17e62c47481974 | tongnamuu/Algorithm-PS | /B2579/B2579.cpp | C++ | cpp | 466 | no_license | #include <iostream>
using namespace std;
int max(const int &a, const int &b) { return a > b ? a : b; }
int main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
int n; cin >> n;
int a[301] = { 0, };
int d[301][3] = { 0, };
for (int i = 1; i <= n; ++i) cin >> a[i];
d[1][1] = a[1];
for (int i = 2; i ... |
46c648c88d273c8b607f3d8e8a2e218ed89d16e1 | 4af436550e393c0dc506579ac40d5f10aa1cb338 | dracohan/code | /code_book/Thinking C++/master1/Chapter 4/Ex/Ex0203.cpp | C++ | cpp | 741 | no_license | //: EX04:Ex0203.cpp
// 02. Создайте объявление структуры с одной функцией-членом, затем создайте
// определение для этой функции. Создайте объект нового типа данных и
// вызовите функцию
// 03. Измените решение урпажнения 2 так, чтобы структура объявлялась в
// "защищенном" заголовочном файле, при этом определен... |
5b6f6c2e0fa4e32e5ea555648c43bf3f632d0c96 | 30b5d0e0ed08aec45d3e491435c468ac97015c82 | openharmony/ace_ace_engine | /frameworks/core/accessibility/js_inspector/inspect_input.cpp | C++ | cpp | 2,041 | permissive | /*
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
f2797eef269b56d82bb9f7662046cff1ffc3e6f4 | 3f292cd710e821678e929cfec4b53924f999bd77 | gujgicza/EvolAlg | /GenetikusHatizsak/GenetikusHatizsak/main.cpp | C++ | cpp | 815 | no_license | #include <iostream>
#include "genetic.h"
#include <ctime>
#include <cstdlib>
#include <string>
#include <fstream>
void main(){
srand(time(NULL)); //Initialising rng seed
std::string fileName;
std::cin >> fileName; // Specify the file name
std::ifstream input;
input.open(fileName);
int capacity, mutateChance,... |
230ff7b931f34299437c750af28af9ee0c3d4bc4 | c109a01ceecc1ad388c1d963521606fc57cfb0d1 | fleissig/vk2skype | /skype/src/main.cpp | C++ | cpp | 586 | no_license | #include <QDebug>
#include "skype.h"
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
Skype skype("test", 8);
if (skype.connect()) {
bool ok = false;
QStringList list = skype.getBookmarkedChatIds("code4food", ok);
if (ok) {
foreach(QString line, list... |
d82591a620067711f62f043ad51e9dea0aed6ed6 | bf3355655745f3f550666288ef54845d085fd03f | Pandey-SaurabhP/Codechef-Codes | /codechef_COOK101_2.cpp | C++ | cpp | 425 | no_license | #include <iostream>
using namespace std;
const int M = 1e9 + 7;
unsigned long long (int n){
int f = 1;
for (int i = 1; i <= N; i++){
f = (f * i) % M;
}
return f;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int T, N;
int arr[1e5] = {0};
... |
0749d6140fbac78002994d3d85f62d77b75d9478 | c37b2905344760fe47e376867282674497ec2989 | carlosal1015/or-tools | /ortools/sat/pseudo_costs.cc | C++ | cc | 4,399 | permissive | // Copyright 2010-2018 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... |
21a18782b4fbe692fcae7bb16c68c6a01000cbd1 | 1ebd6206fa83874d32f586ea293c7f9b0dcc76ab | nisailhan/AutowareArchitectureProposal.iv | /vehicle/raw_vehicle_cmd_converter/src/brake_map.cpp | C++ | cpp | 5,786 | permissive | // Copyright 2017-2019 Autoware Foundation
//
// 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 ... |
270926971b5e9d507449c3a8ebaeaab168304693 | 9388b3c483af6d07b0781649f7e0797fe1945ce8 | k1988/libtorrent | /src/lsd.cpp | C++ | cpp | 8,075 | permissive | /*
Copyright (c) 2007-2016, Arvid Norberg
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... |
e9c6a578ff69fb9914fb4da98fd7576a0af40ec0 | e015db71918e4c5e5f7a43ee53252b07d85180cd | ymahinc/MyTypon | /sources/typonWidget/mytyponscene.cpp | C++ | cpp | 17,016 | no_license | #include "mytyponscene.h"
#include <QGraphicsSceneMouseEvent>
#include <QDebug>
#include <qgraphicsview.h>
#include <QGraphicsRectItem>
#include "items/myitembase.h"
#include "global.h"
#include "tools/GroupTool/groupundocommand.h"
#include "tools/GroupTool/ungroupundocommand.h"
#include "tools/SelectTool/rotateundocom... |
e61dfab9c2aeac6764927fcd8dd2098b7e38253e | e8c3c2577dca53ff0c059140703d1fe80552eb30 | fwilliams/libigl-python-bindings | /src/map_vertices_to_circle.cpp | C++ | cpp | 1,189 | no_license | //TODO: __example
#include <common.h>
#include <npe.h>
#include <typedefs.h>
#include <igl/map_vertices_to_circle.h>
const char* ds_map_vertices_to_circle = R"igl_Qu8mg5v7(
Map the vertices whose indices are in a given boundary loop (bnd) on the unit circle with spacing proportional to the original boundary edge lengt... |
b938dc832a71493af6611a33c2cec6e89ba00946 | 4b24ea7ac3ef6276379b39b129fb99eee5b5d2d3 | yakuseishou/42Cpp-piscine | /d04/ex01/SuperMutant.cpp | C++ | cpp | 1,627 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* SuperMutant.cpp :+: :+: :+: ... |
5dddf516e60e4731ac73f0d501ab199fe936c418 | 5e33143c5974c29946d28dcf835b97cd0e763b82 | TheSmilingSky/CS213-IITB-DSA | /Practice Problems/Handout 1/q13.cpp | C++ | cpp | 1,369 | no_license | #include <bits/stdc++.h>
using namespace std;
string trimall(string s){
string r;
int cnt = 1;
for(int i=0;i<s.length();i++){
if (s[i]==' ' and cnt<7) {
cnt++;
r.push_back(' ');
}
else if ((s[i]==',' or s[i]==';' or s[i]==';'
or s[i]=='.' or s[i]=='!' or s[i]=='?' or s[i]==':'
or s[i]=='\'' or s... |
2e62090c9e791667e1171dbca98dc2a7f2355e38 | dfb073ec1f8ff1c1453ed7f3de09aaf00f983b8d | benedictaquino/cpp-primer | /ch03/src/ex3_6.cpp | C++ | cpp | 455 | no_license | /* This program uses a range for to change all the characters in a string to X */
#include <iostream>
#include <string>
using std::cin; using std::cout; using std::endl;
using std::string;
int main()
{
string s; // initialize empty string s
cin >> s; // read string from standard input to s
for (auto &c : ... |
66fbb26ca7e16e02b5a6109cb07680913bb5d877 | 5b0d6201c2196b3e627a54c1331056eb1514c6de | doctordre246/randDNA | /src/rdna.hpp | C++ | hpp | 456 | no_license | #include <iostream>
#include <string>
#include <random>
using namespace std;
string randDNA(int seed, string bases, int n){
if( bases == ""){
return "";
}
std::mt19937 eng1(seed);
int max = bases.size()-1;
int min = 0;
uniform_int_distribution<>uform(min,max);
string dna="";
int ... |
2548d9d9b8a3c1a34088c935c99a0e009d581135 | 8eee60821aaacadd3239faf294bc34806144a178 | ml-think-tanks/msm8996-vendor | /qcril-hal/modules/uim/src/qcril_uim_restart.cpp | C++ | cpp | 30,943 | permissive |
/*===========================================================================
Copyright (c) 2017 Qualcomm Technologies, Inc.
All Rights Reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
===========================================================================*/
/*=========================... |
212fc699642142c6150e7adb71730148198063d5 | fcbd3c099ef69b41b571d3a30966cfdb7ae3a5c3 | deepakrkole/epibook.github.io | /solutions/cpp/View_from_above.cpp | C++ | cpp | 3,358 | no_license | // Copyright (c) 2013 Elements of Programming Interviews. All rights reserved.
#include <algorithm>
#include <iostream>
#include <map>
#include <memory>
#include <unordered_set>
#include <vector>
using std::cout;
using std::endl;
using std::map;
using std::unique_ptr;
using std::vector;
using std::unordered_set;
// ... |
2e2761fae8c233b42c420195688e07849ecd0dbe | 7a379b40618bde405f3978660d7372f19a852083 | qurobert/CPP | /05/ex02/PresidentialPardonForm.hpp | C++ | hpp | 562 | no_license | //
// Created by Quentin Robert de beauchamp on 9/27/21.
//
#ifndef PRESIDENTIALPARDONFORM
#define PRESIDENTIALPARDONFORM
#include <iostream>
#include "Bureaucrat.hpp"
#include "AForm.hpp"
class PresidentialPardonForm : public AForm
{
private:
public:
PresidentialPardonForm();
PresidentialPardonForm(std::string con... |
5564e8b41c89df5d5718759525f9f1ea29f7e1b3 | b3b3e498f09f94fe25a98256d7d4c84da35c1bcf | rgrupesh/projecteuler-dsa | /3.cpp | C++ | cpp | 334 | no_license | #include<iostream>
#include<cmath>
using namespace std;
int main()
{
long int i, j, lpf, num = 600851475143, count = 1;
for(i = 1; i < ceil(sqrt(num)); i++) if(num % i == 0)
{
for(j = 2, count = 0; j < i; j++) if(i % j == 0) count++;
if(count == 0) lpf = j;
}
cout << "The largest prime factor is " << lpf;
... |
5e30681f9753f87139acc6956cdeb4d5b8da14ac | b3f6649d6e69ecc14134e33d579b25f8483b4f06 | heguoxing98/knoss-pcmanager | /ppro/PrivacyProtection/kuc/kxeuc.cpp | C++ | cpp | 19,901 | permissive |
/************************************************************************
* @file : kxeuc.cpp
* @author : WangBin5 <WangBin5.com>
* @date : 26/11/2009 AM 11:53:11
* @brief : 统一通信接口的实现层
*
* $Id: $
/************************************************************************/
#pragma warning(disa... |
a46cf12f234490f08aab998afa487f947687fa59 | 4e5fa94aa82140e683de13f30fb9af72a4b086ed | dhirschfeld/mamba | /libmamba/src/api/install.cpp | C++ | cpp | 30,767 | permissive | // Copyright (c) 2019, QuantStack and Mamba Contributors
//
// Distributed under the terms of the BSD 3-Clause License.
//
// The full license is in the file LICENSE, distributed with this software.
#include <stdexcept>
#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <reproc++/run.hpp... |
f2d9352f0121f6f4b3e02e4ac8dbf76070371e9f | 23d7eb272d59641981f5037e407751a1d14ea1ef | guacamoleo/rocBLAS | /library/src/blas3/rocblas_trsm.cpp | C++ | cpp | 16,885 | permissive | /* ************************************************************************
* Copyright 2016 Advanced Micro Devices, Inc.
*
* ************************************************************************ */
#include <hip/hip_runtime.h>
#include "rocblas.h"
#include "rocblas.hpp"
#include "status.h"
#include "definit... |
4fb8560e24f1edbbe41e1db4e9f7b855a71b23a8 | fcdaab70f7328b1378fdcc4730356ec0fde4dbb5 | tpghks98/VirusShot | /cSmooth.cpp | C++ | cpp | 545 | no_license | #include "DXUT.h"
#include "cSmooth.h"
cSmooth::cSmooth(void)
:IsOn( false ),
pTarget( NULL ),
fStart( 0.0f ),
fEnd( 0.0f ),
fSpeed( 0.0f ),
fElap( 0.0f )
{
}
cSmooth::~cSmooth(void)
{
}
void cSmooth::Update()
{
if( IsOn )
{
fElap += _GETSINGLE( cSystemMgr )->GetDeltaTime() * ( sin( 1.0f - fElap ) * 3.0... |
660b381c860b52d71f1448caab18d032c6693ee0 | 245e36cf05ead883cbe510090ff78c2e4424a3bd | szk/reprize | /input/WMsgOptIO.cpp | C++ | cpp | 471 | permissive | #include "Common.hpp"
#include "WMsgOptIO.hpp"
#include "OptIO.hpp"
using namespace reprize;
using namespace inp;
WMsgOptIO::WMsgOptIO(Win32DepInfo* dep_info)
: OptIO(dep_info), win32_info(dep_info)
{
}
WMsgOptIO::~WMsgOptIO(void)
{
}
const bool WMsgOptIO::init(void)
{
return true;
}
void WMsgOptIO::restor... |
52fa29e3a6deba63869b5e411d395392e4ecac80 | 67570b964f0e777681d152952828ba45aef836fd | cvasqxz/chauchera | /src/rpc/rawtransaction.cpp | C++ | cpp | 46,913 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <base58.h>
#include <chain.h>
#include <coins.h>
#include <consensus/validati... |
ee78207fe9c6987dc6a81493520bd64c2fd2d967 | def8cdb58271e02056bd68f434551595522ebde6 | Andy608/BrickSimulator | /SceneSplash.cpp | C++ | cpp | 2,670 | no_license | #include "SceneSplash.h"
#include "SplashSceneInput.h"
#include "KeyboardCallback.h"
#include "MeshList.h"
#include "ModelResourceBundle.h"
#include "GuiResourceBundle.h"
#include "WindowSizeCallback.h"
#include <glm\glm.hpp>
#include "Logger.h"
namespace Bountive
{
Logger SplashScene::logger = Logger("SplashScene", ... |
23fe9d988ce659a25e06fe82de4405278951f11d | 160682754e61585a959a6aa883fdd24d139a33a1 | hamDrambus/ElectronDriftOneDim | /view_Ec_spectra.cpp | C++ | cpp | 5,221 | no_license | {
TH1D* histE_0_3 = new TH1D ("EnergyC 0.3 Td [eV]","EnergyC 0.3 Td [eV]",300,0, 14);
TH1D* histE_1_0 = new TH1D ("EnergyC 1.0 Td [eV]","EnergyC 1.0 Td [eV]",300,0, 14);
TH1D* histE_1_7 = new TH1D ("EnergyC 1.7 Td [eV]","EnergyC 1.7 Td [eV]",300,0, 14);
TH1D* histE_3_0 = new TH1D ("EnergyC 3.0 Td [eV]","EnergyC 3.... |
a0a4b24b4fe82fab705717530c041cc073151d13 | 799da4f5dd1887c0ce86529f0872c484e83267d3 | AlmaCeax/ProjectI-AlmaCeax | /X-Multiply_Tribute/Enemy_WormBody.cpp | C++ | cpp | 3,344 | no_license | #include "Application.h"
#include "ModuleCollision.h"
#include "ModuleParticles.h"
#include "Enemy_WormBody.h"
#include "ModuleEnemies.h"
#include <stdlib.h>
Enemy_WormBody::Enemy_WormBody(int x, int y, bool _up, bool tail) :Enemy(x, y)
{
type = WORMBODY;
up = _up;
speed = {0,1};
if (up) {
flipY = true;
}
... |
b5ebfa013f9ed1038c5ec812609e29874b317322 | bf0988003b9fa8ec12f56cd31d3ec0f5e516fdfb | xhzhf/envoy | /test/extensions/stats_sinks/hystrix/hystrix_test.cc | C++ | cc | 22,139 | permissive | #include <chrono>
#include <memory>
#include <sstream>
#include "extensions/stat_sinks/hystrix/hystrix.h"
#include "test/mocks/network/mocks.h"
#include "test/mocks/server/mocks.h"
#include "test/mocks/stats/mocks.h"
#include "test/mocks/upstream/mocks.h"
#include "absl/strings/str_split.h"
#include "circllhist.h"
#... |
dcb4c420acf88cd5ede084f77a7bc5ce139a9d36 | 9530a9ce91811d0a357781cd7af10048d8a29842 | jindalshivam09/cppcodes | /ACM/CodeChef/BUTTON.cpp | C++ | cpp | 1,964 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef list<int> li;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long long> vll;
typedef vector<bool> vb;
typedef pair<int,int> pii;
typedef vector<pair<int,int> > vpii;
typedef pair<double,double> pdd;
typedef vector<p... |
ce542a8b6ceae79b607c1cc42f56665a9f49f998 | b896bc32e2ca51e85a236267aef468f65cdd8d97 | Xilinx/Vitis-AI | /src/vai_library/xnnpp/include/vitis/ai/nnpp/yolov8.hpp | C++ | hpp | 2,671 | permissive | /*
* Copyright 2022-2023 Advanced Micro Devices 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 applica... |
d7d3ca27f946fa035304155ddf334261b1dde9a8 | b25194a6173bcd16e669be4c7c4e13a1a2898806 | naricc/runtime | /src/coreclr/gc/unix/gcenv.unix.cpp | C++ | cpp | 46,077 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#define _WITH_GETLINE
#include <cstdint>
#include <cstddef>
#include <cstdio>
#include <cassert>
#define __STDC_FORMAT_MACROS
#include <cinttypes>
#include <memory>
#include <pthread... |
995d0f9f2406c11a3cf2a4ae98cef0573fd1db64 | abc21b66f078b1aaa98d0e467abc6c21de4e82ab | SaadBazaz/Trie | /TrieADT/TrieADT.cpp | C++ | cpp | 7,417 | no_license | // TrieADT.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include "Trie.h"
using namespace std;
int main()
{
std::cout << "Hello World!\n";
TRIE dictionary;
try {
dictionary.CreateDictionary("dictionary.txt");
cout << "Created th... |
64911fc7b4fa2dc77894ff11a3910f64f8504edf | cf819c12ac3fab322212c08e0e12fb1450edbf8c | kks227/BOJ | /6300/6357.cpp | C++ | cpp | 903 | no_license | #include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
const int INF = 1e9;
int main(){
while(1){
int N;
cin >> N;
if(N == 0) break;
cin.ignore(1024, '\n');
vector<int> adj[100];
while(1){
string line;
getline(cin, line)... |
026224bb697d261b10cf564ca7867c944ed566d9 | 18b3a2e831bac3632a9337efe48e593bb37f30e6 | dmtmalin/LedBillboard | /src/service/billboardservice.cpp | C++ | cpp | 1,260 | no_license | #include <QApplication>
#include <QWindow>
#include <QFile>
#include <VLCQtCore/Media.h>
#include <VLCQtCore/MediaList.h>
#include "model/playlist.h"
#include "model/mediacontent.h"
#include "gui/mediawindow.h"
#include "settings.h"
#include "billboardservice.h"
BillboardService::BillboardService(QObject *parent) :
... |
c95c043ad5f0c6b160afc104efc8d72d8ac80492 | 9d89c02ed809b07e68ce36cd9dd756415ae4788f | axxonite/algorithms | /EPI/Solutions/11_Heaps/11.2_sort_k_increasing_decreasing_array_solution.cpp | C++ | cpp | 1,721 | no_license | // Copyright (c) 2015 Elements of Programming Interviews. All rights reserved.
#include "stdafx.h"
namespace Solutions
{
vector<int> MergeSortedArrays( const vector<vector<int>>& sortedArrays );
// Note: the official implementation is VERY tricky. In an interview setting, I would reconsider doing it with the offic... |
72a605bcdc0bb5480190ada946829fa22d7a1afc | 9638b8d14fdb3eee752897ea9f8a8f1195f7fb94 | Mr-Bangladesh/Problem-Solving | /UVa/821 Page Hopping.cpp | C++ | cpp | 1,896 | no_license | ///***Bismillahir Rahmanir Rahim***
///***Faizul***CSE**4th batch**BU
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 100000000000000000
///cin.ignore();
void FastIO()
{
ios_base:: sync_with_stdio(false);
cin.tie(0);
cout.precision(20);
}
ll max(ll a,ll b)
{
... |
f57159dd6d03503be25934166ac4c1e1f037ad03 | 6bb30b01fdf881f9831ff2f4fc36cfab226c8177 | boiseHPSim/ldpcGpuTegra | /code/x86/CDecoder/template/CDecoder_fixed.cpp | C++ | cpp | 1,103 | no_license | /**
Copyright (c) 2012-2015 "Bordeaux INP, Bertrand LE GAL"
[http://legal.vvv.enseirb-matmeca.fr]
This file is part of LDPC_C_Simulator.
LDPC_C_Simulator 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 Foundatio... |
883533dae809e129c7fba8d957d03733824970e3 | 50a225978c87884b4d8b4890c9fbbc0f3b2ee204 | andrewbriand/libroadrunner-deps | /third_party/rr-libstruct/Wrappers/C/lsc_api.cpp | C++ | cpp | 38,597 | no_license | #ifdef USE_PCH
#include "rr_pch.h"
#endif
#pragma hdrstop
#include "lsC_API.h"
//---------------------------------------------------------------------------
// load a new stoichiometry matrix and reset current loaded model
/*LIB_EXTERN*/ int LibStructural_loadStoichiometryMatrix ( const double ** inMatrix, const int ... |
ce7507c8e95a55b275eb9644a5be492c8dde638d | 93c0f3c8292903998d51a6d8ab1f5a969cc68865 | NikkiR97/complex | /Chapter10cpp/wci/frontend/Scanner.cpp | C++ | cpp | 939 | no_license | /**
* <h1>Scanner</h1>
*
* <p>A language-independent framework class. This abstract scanner class
* will be implemented by language-specific subclasses.</p>
*
* <p>Copyright (c) 2017 by Ronald Mak</p>
* <p>For instructional purposes only. No warranties.</p>
*/
#include "Scanner.h"
#include "Source.h... |
d1ff6c6f0681004b95fd9d5f05bba4a503730278 | cd4c05bc1ea40e94c4ba80443aa53d33c98c056a | srengasamy/agent | /sources/WavefrontReporter.cpp | C++ | cpp | 1,561 | no_license | //
// WavefrontReporter.cpp
// agent
//
// Created by Suresh Rengasamy on 10/9/18.
// Copyright © 2018 Suresh Rengasamy. All rights reserved.
//
#include "WavefrontReporter.hpp"
#define SOCKET_ERROR "FATAL: Unable to connect to proxy"
WavefrontReporter::WavefrontReporter(MetricRegistry *metricRegistry){
regi... |
12a6c1f2cf38f81d6cb046bb6d2000bde0db1a37 | b666c1da5327cf64faa60b131c3ba4d7c6fb1e68 | Arfaqur-Rahman/cp | /SPOJ/BOSSACT - BOSSACT.cpp | C++ | cpp | 646 | no_license | #include<bits/stdc++.h>
using namespace std;
#define ll long long
bool comp(pair<int, int> x, pair<int, int> y){
if (x.second<y.second) return true;
return false;
}
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
vector< pair<int, int> > v(n);
for(int i=0; i<n... |
504a979619f458d7d17df78e90249d7debfbbd97 | b2a262950144bbca4f98f39acd794390b899bb91 | lisawerner/GeKo | /src/executables/Ex_ShadowMapping/main.cpp | C++ | cpp | 8,530 | no_license | #include <GL/glew.h>
#include <GeKo_Graphics/InputInclude.h>
#include <GeKo_Graphics/MaterialInclude.h>
#include <GeKo_Graphics/GeometryInclude.h>
#include <GeKo_Graphics/ShaderInclude.h>
#include <GeKo_Graphics/ScenegraphInclude.h>
#include <GeKo_Graphics/Camera/Camera.h>
const int WINDOW_WIDTH = 800;
const int WIND... |
95e58dc8205c62310b9f20f3eb2b1e7230d7b335 | dc66561c184669ebfa184addfe1b51b9952a543e | WFLSCoin/wflscoin | /src/qt/overviewpage.cpp | C++ | cpp | 15,326 | permissive | // Copyright (c) 2011-2020 The Wflscoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/overviewpage.h>
#include <qt/forms/ui_overviewpage.h>
#include <qt/wflscoinunits.h>
#include <qt/clientmodel.h... |
9bb846864dbfd5cb6266b5e541ba7fc2e8fde2a2 | de19c0708ff4abb68b979154a262f5860797a75d | Alex-Dragutoiu/simulacra | /SimulacraEngine/map/MapParser.hpp | C++ | hpp | 4,024 | no_license | //
// MapParser.hpp
// SimulacraEngine
//
// Created by Alex Dragutoiu on 02/09/2020.
// Copyright © 2020 Alex Dragutoiu. All rights reserved.
//
#pragma once
#include <fstream>
#include <nlohmann/json.hpp>
#include <SFML/Graphics.hpp>
#include "../ResourceIdentifiers.h"
using json = nlohmann::json;
namespace... |
96c20deba361a3896d379d2706d95d06da988f0a | 71d08aace7c758fdd8f5830ed8bc747a6b9282d8 | Gesendex/SPbCT_GireevTU | /EducationalPractice/Okno/MyForm.cpp | C++ | cpp | 282 | no_license | #include "MyForm.h"
using namespace System;
using namespace System::Windows::Forms;
[STAThreadAttribute]
void Main(array<String^>^ args) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Okno::MyForm form;
Application::Run(% form);
} |
d5ff87367916fb3d8342ea876c6bcc9bb0d65bdb | 053fdb26ae5120f1d9549b243fad410c0c6ab51c | CombineFodder/oaplugins | /RayJay/Versions/2.0/visualstudio/RayJay-v2/RayJay/main.cpp | C++ | cpp | 3,670 | no_license | #include "Interface.h"
#include "Methods.h"
#include "curl/include/curl/curl.h"
#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
using namespace GarrysMod::Lua;
using namespace Methods;
std::string productToken = "2w8GR7gOIUeEGRHe23789";
std::string webToken = "F78I6Gg8gyuigh39";
std::str... |
18e93b7f5f643aa7949e7a6bc8a69c8385de03f5 | db066862bc20d55b1a9ca87b919e206271cacbaf | yftsai/uva-online-judge | /contest_volumes/volume_123/12393.cpp | C++ | cpp | 544 | no_license | #include <iostream>
#include <vector>
#include <bitset>
using namespace std;
int main()
{
for (int n; cin >> n && n>0; ) {
vector<int> a(n);
for (auto &ai: a)
cin >> ai;
vector<bool> start(n, true);
for (int i=0, sum=0, p=0; i<2*n; ++i, p=(p-1+n)%n)
if ((sum... |
d322e8d5b7e77b13926d432866dcd08ad0c045de | 57f497074165f7607a5baa3dda231fee39c8e9e3 | jigsaw5071/algorithms | /Graphs/min_cah_flow.cpp | C++ | cpp | 2,688 | no_license | /*
@Shubham Sharma
-06/12/2016
*/
/*
Minimum Cash Flow among the friends those who have borrowed money from each other
The alorithm works as:
1. First calculate the net cash flow of each person by (total credit)-(total debt)
2. Settle the amount of either maximum creditor or maximum debtor (whichever is minimum)
3. T... |
a8bd1ce9394b0a4e3c7e34a0c3b851a34a4ded70 | 57580ec3ea8cd915408963acd0dfb107473ada68 | eumenide/ALG_18 | /class_work_1/2_min_swap.cpp | C++ | cpp | 886 | no_license | #include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int T;
int N;
int minSwarp(int *A, int *B, int N){
int counts = 0;
for(int i = 0; i < N; ++i){
if(A[i] == B[i]) continue;
else{
for(int j = i + 1; j < N; ++j){
if(A[i] == B[j]){
... |
98025e99ccced2d67ee6ca3cd88189fad62f0dd3 | 91579aaf56e8e76fd130779150bb34c93d7e81a5 | amitprat/PracticeCode | /stringtransformationtodoublestringandappendtoend.cpp | C++ | cpp | 1,502 | no_license | //Reference : http://www.careercup.com/question?id=5825789740187648
Given a string say "ABCD". Now create a new string with duplicates of each character in the original string and append the reverse of the same string (with duplicates) excluding the last character.
First iteration: AABBCCCCBBAA
[ABC three types of c... |
b1872caf36d21e1b698a8cf6a39a392184156d75 | 508abe6616e98d494ab40cffff9f4aef77f69c68 | AJ-54/Coding-BLocks-CP-Solutions | /Maths/retrospective_sequence.cpp | C++ | cpp | 2,018 | no_license | #include<iostream>
#include<bits/stdc++.h>
#include<cstring>
#define ll unsigned long long
#define MOD 1000000009
const ll maxN = 22;
using namespace std;
ll k;
vector<ll> a,initial,c;
map <int,int> mp;
vector<vector<ll>> multiply(vector<vector<ll>> A, vector<vector<ll>> B){
vector<vector<ll>> c(k,vector<ll>... |
55290256e94d059f0ee3894e4668456648c8a665 | 74f20fcd6d5899e4237c5e90269ccfd620963b61 | dualword/Dron | /src/Dron/Items/Fragmenter.cpp | C++ | cpp | 1,371 | permissive | #include "Fragmenter.h"
#include "../World.h"
#include "../Player.h"
#include "../Animations/CollectAnimation.h"
#include <iostream>
namespace Dron
{
Fragmenter::Fragmenter(const Position& position, std::size_t remainingSteps) :
Item(position, remainingSteps)
{
}
void Fragmenter::Draw(const Rect& rect, sf::Rende... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.