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 |
|---|---|---|---|---|---|---|---|---|
562130d37b6b8a3df0f7149f2c1ff30b1490f942 | c7ae10a810ae1db29b7fb0167c86174f2b7634b3 | adityasinghhh/coding | /codeforces/105-2/4.cpp | C++ | cpp | 2,391 | no_license |
#include<algorithm>
#include<assert.h>
#include<bitset>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<deque>
#include<iostream>
#include<map>
#include<memory.h>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<string>
#include<utility>
#include<... |
2371c61f7aef0000e552494d7ac0f0c359bfef83 | 8c42c7385e9cac9249d3dc1be254920b5069806d | Johnson2209/TU-Wien-Assignments | /Scientific Programming/SOLUTIONS/series10old/myfolder/series10/Exercise7.cpp | C++ | cpp | 378 | no_license | #include "fraction.hpp"
#include <iostream>
using std::cout;
int main() {
Fraction x(1,2);
Fraction y(7,8);
Fraction z(3,4);
FractionVector w(3,x);
cout << "w = " << w << "\n";
FractionVector k(w);
cout << "k = " << k << "\n";
FractionVector s = w;
cout << "Length of s : " << s.length() << "\n";
s[0] = ... |
e965cbab6837112c774d867c938f5a58c242fe50 | 043fc7e531b276f48fdc0d718f09fb0d7b8007c9 | motivic/CarND-Unscented-Kalman-Filter-Project | /src/main.cpp | C++ | cpp | 5,339 | no_license | #include <uWS/uWS.h>
#include <iostream>
#include "json.hpp"
#include <math.h>
#include "ukf.h"
#include "tools.h"
using namespace std;
// for convenience
using json = nlohmann::json;
// Checks if the SocketIO event has JSON data.
// If there is data the JSON object in string format will be returned,
// else the emp... |
cf8f0f806f380ae40ab040202aaacd33f8bd11b4 | 828e7a889f32cbfd04c5b55e4d2a256ca502d07e | arnaudgelas/libmv | /src/ui/calibration/main.cc | C++ | cc | 15,076 | permissive | // Copyright (c) 2011 libmv authors.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish... |
735938f3965c30dce64e691127d2be69ea3bfdcd | a124d481b1f6f448a266d679a8fa6898d5921097 | dala0005/baseStationProgram | /src/BaseStation.cpp | C++ | cpp | 7,156 | no_license | #include "BaseStation.h"
#include <iostream>
#include "CallTime.h"
#include "Database.h"
BaseStation::BaseStation()
{
database = new Database(databasePath);
calltime = new CallTime();
}
int BaseStation::connect(std::string srcIMEI, std::string destPhoneNumber)
{
unsigned short int deviceOK = 1;
std::s... |
a7905d0a5753b27807b7aedba5aa3de0f58a314e | f1c0057c38ce8194ced9355829332cf9ba5e9653 | opensource-assist/fuschia | /src/developer/cmd/app_unittest.cc | C++ | cc | 657 | 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/cmd/app.h"
#include <utility>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "src/lib/testing/loop_fixture/test_loop_... |
23b54869bdfdaf05f4edb631d7cbfcb79d3dee66 | 300bb25acfe04ffd511cb8192e6d20d55b836928 | bar0net/BlueFir-Engine | /Source/Renderer/src/ModuleRenderer.cpp | C++ | cpp | 5,844 | permissive | #include "ModuleRenderer.h"
#include "FileSystem.h"
#include "Graphics.h"
#include "Shader.h"
#include "Mesh.h"
#include "Material.h"
#include "Components/Camera.h"
#include "Components/Transform.h"
#include "GameObject.h"
#define BF_REND_SEPARATOR "__"
bool bluefir::modules::ModuleRenderer::Init()
{
LOGINFO("In... |
f06b18cf57d79294cbbef696d9032c552608984d | 96f840dfc6bd0d95dc3854ae1b39b0c9e8d2c622 | dongdong331/test | /external/v4l2_codec2/vda/v4l2_video_decode_accelerator.cc | C++ | cc | 73,163 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Note: ported from Chromium commit head: 91175b1
// Note: image processor is not ported.
#include "v4l2_video_decode_accelerator.h"
#include <dlfcn.h>
... |
470426c85369e46000581dae5986b9243f16bfd3 | f3b49cad403ff496bd401b85ac5563b82d0e5c28 | faustgames-ru/FaustEngine | /FaustGames/Tests/TestAllocators/TestAllocators.cpp | C++ | cpp | 2,141 | no_license | // TestAllocators.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <time.h>
#include <chrono>
#include "Allocator.h"
#include "StandartAllocationPolicy.h"
struct Data
{
int id;
int value;
Data() : i... |
cd1fa5269d59285646568e1f0468e2ce1a06f10a | 5c68c983714b71ada2834ba44cd255648977968f | Sebermic/akai | /5.11.5.cpp | C++ | cpp | 457 | no_license | #include <stdio.h>
int main () //计算前20个整数的和
{
int count, sum,days ; //声明
printf("enter the days:");
scanf("%d",&days);
count = 0 ; //表达式语句
sum = 0 ; //表达式语句
while (count++ < days) //迭代语句
sum = sum + count;
printf("sum = %d... |
960fbeea1d51dd86ff3f113996fe8d49ba9f7904 | 788dd4760e03a37769b045f819ff41d140651613 | airspeedswift/swift | /lib/SILOptimizer/Mandatory/AddressLowering.cpp | C++ | cpp | 57,927 | permissive | //===--- AddressLowering.cpp - Lower SIL address-only types. --------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
89bd2528fed9dc58e29b50bcc15feedecdb34157 | 6ba40316d0e551cf72ead14766006352be5e262c | cnc4less/CodeBeautyTutorial | /BasicStuff/ASCII Program/ASCIIProgram/ASCIIProgram.cpp | C++ | cpp | 1,404 | permissive | // LastName: Guay
// FirstName: Anthony
// Date: 4/16/2021
// Program: Transform a text into a code of ASCII number.
// Credit: CodeBeautyChannel tutorial link : https://www.youtube.com/watch?v=fxFcG7Z2J0Q
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()... |
e3cc39bfe446fe2fa213a1a937670bdebefd2e29 | 0eb0375a7a1e8ba620826ee63061ba28bc7791cc | tomvanloefgh/mbed-os | /features/cellular/framework/device/CellularStateMachine.cpp | C++ | cpp | 24,743 | permissive | /*
* Copyright (c) 2018, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICEN... |
badd58e50715c5a3e3c25d96af44c1ccc2a89c9f | 7b060fbcdefeab4b562be6d022e57ddea2373674 | huwenqing0606/HaoqiangTan-C-Cpp_Examples | /Cpp_Ch10_Operator-Overloading/Example_10-4.cpp | C++ | cpp | 1,827 | no_license | #include<iostream>
#include<string.h>
using namespace std;
class String{
public:
String(){p=NULL;} //constructor funtion initialization
String(char *str);
friend bool operator > (String &string1, String &string2);
//overloading > as a friend function of class String
friend bool operator ... |
c7d02bb545c718ab525a8cb0352b63581a730d39 | 66d464b306efb73d67f186bb25cc5471ea8e4b82 | hschoi1104/Algorithm | /SW-Expert-Academy/D3/1208. [SW 문제해결 기본] 1일차 - Flatten.cpp | C++ | cpp | 1,185 | no_license | #include <iostream>
#include <algorithm>
#include <set>
using namespace std;
int main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
for (int t = 1; t <= 10; t++) {
multiset<int>s, e;//ÃÖ¼Ò ÃÖ´ë
int n; cin >> n;
for (int i = 0; i < 100; i++) {
int x; cin >> x;
s.insert(x); e.insert(-x);
}
whil... |
81153619bc65b09e43214a421685f7e983c1a014 | 2563aefab8782a5bb88363fac1609bb037ed6a17 | t3dbrida/VTK | /Infovis/Core/vtkWordCloud.cxx | C++ | cxx | 46,527 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: vtkWordCloud.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is ... |
2fcf7a16e6170890163fbc2311fbf113abccd4db | f6e7eb4028d8da4860f8143f7c367652e8843c0e | ClassicBets/cbet-coin | /src/init.cpp | C++ | cpp | 94,379 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2018-2019 The ClassicBets Core developers
// Distributed under the MIT software license, see the accompanying
// fi... |
e83a8abca09ef8a9bf82f8d945c4dcffd4cba0a8 | e760acc4ed0335377a1a62c4d90a6aa981bd63f6 | UgoLi/CXX | /CPP-04/01class_student.cpp | C++ | cpp | 1,937 | no_license | /*************************************************************************
> File Name: 01class_student.cpp
> Author:UgoLi
> Mail: 2653920896@qq.com
> Created Time: 2017年08月29日 星期二 09时37分26秒
************************************************************************/
#include<iostream>
using namespace std;
class ... |
138d6c776c2d1aac9b227516117d7a5b3f6be738 | de83e7cc396e5952be73d76f748d7f0fce4e88d4 | rjwhobbs/cpp_bootcamp | /d03/ex00/FragTrap.hpp | C++ | hpp | 1,164 | no_license | #ifndef FRAGTRAP_HPP
#define FRAGTRAP_HPP
#include <iostream>
#include <string>
class FragTrap {
public:
FragTrap(void);
FragTrap(std::string const name);
FragTrap(FragTrap const& src);
~FragTrap(void);
FragTrap& operator=(FragTrap const& rhs);
void rangedAtack(std::string const& target);
vo... |
50fd3c07fd3fe8f9ed9c5f70727a36252ecde059 | 35d86aefc4c2b74715c2255d2d451b3c990499cd | ziocleto/thekla_atlas | /src/nvcore/Memory.cpp | C++ | cpp | 3,234 | permissive | // This code is in the public domain -- Ignacio Casta�o <castano@gmail.com>
#include "Memory.h"
#include "Debug.h"
#include "Utils.h"
#ifdef __APPLE__
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#define USE_EFENCE 0
#if USE_EFENCE
extern "C" void *EF_malloc(size_t size);
extern "C" void *EF_realloc(void * ... |
172ae2e41e6d3dbfa252af1b308b054d682b8daa | 3da57d39287441d55666d370b595cdcaa8f6efb0 | jlauener/PokittoLib | /Pokitto/POKITTO_LIBS/Synth/Synth_songfuncs.cpp | C++ | cpp | 10,336 | no_license | /**************************************************************************/
/*!
@file Synth_songfuncs.cpp
@author Jonne Valola
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2016, Jonne Valola
All rights reserved.
Redistribution and use in source and binar... |
9b7adcb4dacec428ec522cb8ed1884b26de7298b | 45b53e7bdc437fc1c8cb241fde6869b6f1019b37 | BStricklin/MEEN-652-Balance-Bone-Black | /ProjectCode/ROS/project/src/PWM.cpp | C++ | cpp | 5,861 | no_license | #include <project/PWM.h>
PWM::PWM(int chipNumberr, int PWMNumberr, int Periodd, int DutyCyclee) {
// check that inputs are valid - for now we assume they are valid
// Set internal port parameters
PWMNumber = PWMNumberr;
DutyCycle = DutyCyclee;
Period = Periodd;
std::cout << "PWM Constructor Start\n.";
if... |
b4e614e37bcb05c69932c384936e12ef6560aea7 | 3e906ee90524d702d342ee058e0e61cec426fc3b | RolphWoggom/shr.tar | /Simpsons Hit&Run/game/code/presentation/gui/ingame/guiscreenpurchaserewards.cpp | C++ | cpp | 35,510 | no_license | //===========================================================================
// Copyright (C) 2000 Radical Entertainment Ltd. All rights reserved.
//
// Component: CGuiScreenPurchaseRewards
//
// Description: Implementation of the CGuiScreenPurchaseRewards class.
//
// Authors: Tony Chu
//
// Revisions... |
a11b1ae9a02da3fe2c10123456ad45a1cbf75c76 | b82ff27169ec71de75da46e0320b0514a01fa90e | I-Programmer-info/MicroBitV2 | /MicroBitV2Template/source/samples/RadioTestRx.cpp | C++ | cpp | 1,212 | permissive | #include "MicroBit.h"
#include "Tests.h"
int data_received;
void onData(MicroBitEvent)
{
PacketBuffer b = uBit.radio.datagram.recv();
if (b[0] == '1')
uBit.display.print("A");
if (b[0] == '2')
uBit.display.print("B");
}
void onData2(MicroBitEvent)
{
PacketBuffer b = uBit.radio.datag... |
44eaf1caab60294d03797bc83a495b4582ab35ba | 237faa39b02aa455e8628327c38a2c7907cb845a | optimistic-coder-001/C-Plus-Plus | /graph/dijikstras.cpp | C++ | cpp | 1,623 | permissive | #include<bits/stdc++.h>
using namespace std;
#define int long long int
#define w(t) int t; cin>>t; while(t--)
#define mod 1000000007
#define ld long double
#define F first
#define S second
#define P pair<int,int>
#define pb push_back
void dijkstras_algo(map<int,list<pair<int,int>>>g,int n,int src... |
425247b55b92e4377fd4fd43766364c29679cc56 | 4cd6f257d2f876794ffd28bc7c2cfef15b9cda4c | SergeyStrukov/CCore | /Target/Vanilla-H/CCore/src/sys/SysTask.cpp | C++ | cpp | 1,011 | permissive | /* SysTask.cpp */
//----------------------------------------------------------------------------------------
//
// Project: CCore 1.02
//
// Tag: Target/Vasnilla-H
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local... |
f93abc60095ee0c6bac10c3ef259204b5e0b162a | 63a34834c5d773103e5ee054712d2e49d531daab | erjiaqing/my_solutions | /bzoj/2732.cpp | C++ | cpp | 1,999 | no_license | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
const int maxn=100005;
const double eps=1e-25;
long long inf=(1LL<<60);
bool _le(double a,double b){return a<b+eps;}
bool _ge(double a,double b){return a>b-eps;}
bool _l (double a,double b){return a<b-ep... |
eb18b364b9c74ee44d5162ef270771d3cda23413 | c5e38aad6804ca12bb097b139ffabb0728fece50 | djw8605/htcondor | /src/condor_contrib/aviary/codegen/hadoop/src/AviaryHadoop_StopNameNode.cpp | C++ | cpp | 18,563 | permissive |
/**
* StopNameNode.cpp
*
* This file was auto-generated from WSDL
* by the Apache Axis2/C version: SNAPSHOT Built on : Mar 10, 2008 (08:35:52 GMT+00:00)
*/
#include "AviaryHadoop_StopNameNode.h"
#ifdef __GNUC__
# if _... |
01c42e404527822507c84d3cb2c2154a3533030f | 3b3f7e73d549774feb7d6871ffe9f1c3b6b2e2d4 | eval1749/evm | /src/Compiler/Ir/FieldDef.cpp | C++ | cpp | 549 | no_license | #include "precomp.h"
// @(#)$Id$
//
// Evita Compiler IR- FieldDef
//
// Copyright (C) 2010 by Project Vogue.
// Written by Yoshifumi "VOGUE" INOUE. (yosi@msn.com)
#include "./FieldDef.h"
#include "./ClassDef.h"
//#include "../Functor.h"
namespace Compiler {
// ctor
FieldDef::FieldDef(
ClassDef& owner,
int ... |
dadca70e30e04cf08234d9ecbc3eb4d9b469c168 | 521a80b64afea9041fb2034fa21a758d0fb97f98 | czxxjtu/wxPython-1 | /branches/wx-2.9.0.1/src/x11/window.cpp | C++ | cpp | 51,151 | no_license | /////////////////////////////////////////////////////////////////////////////
// Name: src/x11/window.cpp
// Purpose: wxWindow
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
////////////////////////... |
278a0ea4cacbaef23050f33215ed31109b48f458 | ddea7e3826b7dce156b2e4a7c366ff97c7c25fb8 | shirucoin/shirucoin-master | /src/rpcmisc.cpp | C++ | cpp | 9,709 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin 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 "init.h"
#include "main.h"
#include "net.h"
#include "netbase.... |
d5d6c67791dd07644c33259bc4b4737d6874cd19 | 8abbb1459ec8dc364e15d08a00965549f1ad2b79 | Jinzi-Num0/node-gdal-async | /deps/libgdal/gdal/ogr/ogrsf_frmts/pgdump/ogrpgdumplayer.cpp | C++ | cpp | 63,375 | permissive | /******************************************************************************
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Implements OGRPGDumpLayer class
* Author: Even Rouault, <even dot rouault at spatialys.com>
*
***************************************************************... |
e633fb1e12517b875cae660184ffebed186cbad7 | 41e9629821e693200bc068cfc7f8e625546b76af | vandermerwewaj/RED4ext.SDK | /include/RED4ext/Scripting/Natives/Generated/game/ui/InGameMenuGameControllerItemSceneInfo.hpp | C++ | hpp | 645 | permissive | #pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/CName.hpp>
#include <RED4ext/NativeTypes.hpp>
namespace RED4ext
{
namespace game::ui {
struct InGameMenuGameControllerItemSceneInfo
{
static constexpr const char* NAME = "gam... |
6166d547186afa9a000901e3a2b123dbe7ccc7af | 2e5dd37788d770bd148057573511d5810f92c3db | wrandy44/SFML_Gui | /src/BoxScrollable.cpp | C++ | cpp | 2,996 | no_license | /*
** BoxScrollable.cpp for BoxScrollable.cpp in /home/debrau_c/my/Mia/Gui2.0
**
** Made by debrau_c
** Login <debrau_c>
**
** Started tomorrow
*/
#include "gui/BoxScrollable.hh"
namespace gui{
BoxScrollable::BoxScrollable(unsigned int w, unsigned int h)
: Box(w, h), _upButton(20, 20, "buttonUp.png"), _downButton(... |
83676343007f66b66c6414346a11afd749e8e2d8 | 8023ea71af6f838484ca5c7372fe57ea9a88de96 | journeymidnight/S3ClientGUI | /src/S3ClientGUI/s3treemodel.cpp | C++ | cpp | 15,643 | permissive | #include <QMimeDatabase>
#include <QSize>
#include <QIcon>
#ifdef Q_OS_WIN
#include <Windows.h>
#include <shellapi.h>
#include <QtWin>
#ifdef GetMessage
//Aws::Client::AWSError::GetMessage() conflict with win32 lib
#undef GetMessage
#endif // GetMessage
//Aws::S3::S3Client::GetObject() conflict with win32 lib
#ifdef... |
9fe56bf875a6f5f8485cb8ee527d6ecf9b793018 | 1b4683dc02cb2c3574e54246c48f630adcdd64e2 | 1o-1o/mosesdecoder | /moses/Parameter.cpp | C++ | cpp | 55,740 | no_license | // $Id$
/***********************************************************************
Moses - factored phrase-based language decoder
Copyright (C) 2006 University of Edinburgh
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by th... |
00e8094ad7c093438bd465c8456db14390474abf | 1032b06f7111704bb04110bce162d50da48e3d39 | rkv225/DSA | /Divide and Conquer/Count_Inversions/Source.cpp | C++ | cpp | 907 | no_license | #include<iostream>
using namespace std;
long long arr[100000];
long long aux[100000];
long long merge(int p, int q, int r)
{
long long count = 0;
int i = p, j = q + 1, k = p;
while ((i <= q) && (j <= r))
{
if (arr[i] > arr[j])
{
//inversion
count += q - i + 1;
aux[k++] = arr[j++];
}
else
{
... |
ddd7c8810b3f636f7003610d9f8e6632c0a4694a | efa895fe321c698aa5e652685808316c3db7432e | Altcoin-Cash/BoraCoin | /src/qt/blockbrowser.cpp | C++ | cpp | 11,179 | permissive | #include "blockbrowser.h"
#include "ui_blockbrowser.h"
#include "main.h"
#include "wallet.h"
#include "base58.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include "rpcconsole.h"
#include "transactionrecord.h"
#include <sstream>
#include <string>
double getBlockHardness(int height)
{
const CBlockIndex* blo... |
a44127e3be75db65ee6fc68d83a4e1a42dc95879 | 6739fe60d7827da73e41c3b2763d24adb1a585f1 | ChrisLidbury/CLSmith | /src/Block.cpp | C++ | cpp | 22,353 | permissive | // -*- mode: C++ -*-
//
// Copyright (c) 2007, 2008, 2010, 2011 The University of Utah
// All rights reserved.
//
// This file is part of `csmith', a random generator of C programs.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following condit... |
efea3545b254db7045e445262294581e5901d38c | 1ae455c691e7bcf5161a2de8e9bdfaae16ec0788 | Trietptm-on-Security/Detect-It-Easy-Hem-for-Hiew | /dllmain.cpp | C++ | cpp | 4,399 | no_license | // Detect It Easy Hem for Hiew
// Hem Version: 1.0
// Hem Author: exet0l
// Detect It Easy Authors: Hellsp@wn, Hors
#include <windows.h>
#include "hem.h"
/////////////////////////////////////////////////////////////////
#define HEM_DIE_VERSION_MAJOR 1
#define HEM_DIE_VERSION_MINOR 0
////////////////////////////////... |
43c69838307a774d069c8d7743f02d7c8a9d00a0 | 1206a50dc82ae9b15ede8d9b8d2ff462e270c648 | EvilSteallNoProvit/Snake | /Snake/MainMenu.cpp | C++ | cpp | 3,781 | no_license | #include "MainMenu.hpp"
#include "GamePlay.hpp"
#include <SFML/Window/Event.hpp>
MainMenu::MainMenu(std::shared_ptr<Context>& context)
: m_context(context), m_isPlayButtonSelected(true),
m_isPlayButtonPressed(false), m_isExitButtonSelected(false),
m_isExitButtonPressed(false)
{
}
MainMenu::~MainMenu()
{
... |
67bc858a425c35b5855888baec9945dbcb201864 | 7def02e6ae90d17c7637f83c2e32eeae126a4cb0 | lifuxianoa/Mystudy | /DesignPatterns/Structure/Composite/src/Composite.cpp | C++ | cpp | 1,173 | no_license | /*
* =====================================================================================
*
* Filename: Composite.cpp
*
* Description:
*
* Version: 1.0
* Created: 2013年01月10日 14时50分59秒
* Revision: none
* Compiler: gcc
*
* Author: Lifuxian (Li Fuxian), lifu... |
77d5eda70870a49cf25f1998f3c61156a977a927 | 62fdf4652972f7e3654d6101a5b3cbf9a43f5b12 | martun/verilog_netlist_parser | /src/unit_tests/database_UT.cpp | C++ | cpp | 296 | permissive | #include <iostream>
#include "database/netlist_builder.hpp"
int main()
{
Netlist_builder bld( "test_data/ALU_PLUS_MINUS_last.v" );
bld.construct_netlist();
boost::shared_ptr<Netlist> netlist = bld.get_netlist();
if (netlist != 0)
{
std::cout << "DB UT passed!\n";
}
return 0;
}
|
0612c70dedec468dd4286328a618df055bd415e6 | 078052d5edab75712ab5baf305d12a3eeaa8dab1 | PapiczeK/lotto_forum | /Lotto.cpp | C++ | cpp | 1,124 | no_license | //
// Created by papik on 13.05.18.
//
#include "Lotto.h"
#include <algorithm>
#include <string>
Lotto::Lotto() {}
Lotto::~Lotto() {
}
void Lotto::addPlayer(Player &player) {
players.push_back(player);
}
bool Lotto::removePlayer(std::string nick) {
for (auto i = 0; i < players.size(); i++)
if (st... |
58a9f25c2b65844b0163125fb99c4af2653ff960 | 1cbe04ddb998486bd2522e30fc0197f77baa2395 | UDKMan/UnrealGDK | /SpatialGDK/Source/SpatialGDK/Private/SpatialView/CommandRequest.cpp | C++ | cpp | 1,434 | permissive | #include "SpatialView/CommandRequest.h"
namespace SpatialGDK
{
CommandRequest::CommandRequest(Worker_ComponentId ComponentId, Worker_CommandIndex CommandIndex)
: ComponentId(ComponentId)
, CommandIndex(CommandIndex)
, Data(Schema_CreateCommandRequest())
{
}
CommandRequest::CommandRequest(OwningCommandRequestPtr D... |
2e888e5a297ab5355f3142f844c66c5ccaa39b1a | 87804d3f3ffc38f6e065a151a34cd5d9190f38a5 | jeen0202/OOP | /C++/miniprojects/Pokemon game/main.cpp | C++ | cpp | 269 | no_license | // 최대 포켓몬 수와 스킬 개수 지정
#define MAXSERVANT 3
#define MAXSKILL 4
#include <iostream>
using namespace std;
#include "Player.cpp"
#include "Servant.cpp"
#include "Skill.cpp"
#include "Menu.cpp"
int main(void)
{
Menu m;
m.main_menu();
}; |
65e6037ef615955d1c9d88c94027991e585c0084 | 6ef47691db1c2afa07397a50ac3b612c4a1a5fb0 | WhiZTiM/coliru | /Archive2/1a/13713fd952254a/main.cpp | C++ | cpp | 352 | no_license | #include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
// helper method for removing spaces
const char* removeSpace( std::string &str )
{
std::remove( str.begin(), str.end(), ' ' );
return str.c_str();
}
int main()
{
std::string str = " jkl ll ";
std::cout << removeSpace( str )... |
cafc1a653de187371974a6b984e2b34a7bb909af | 701bf0763c147f7f0472bb23f1f392c4389bf889 | TmLev/skipper | /include/skipper/concurrent_map.hpp | C++ | hpp | 1,696 | permissive | #ifndef SKIPPER_CONCURRENT_MAP_HPP
#define SKIPPER_CONCURRENT_MAP_HPP
#include <memory>
#include <mutex>
#include <optional>
#include <vector>
namespace skipper {
template <typename Key, typename Value>
class ConcurrentSkipListMap {
public:
using Level = int;
using Probability = double;
static constexpr auto... |
5a354ce2cc180059e4938260df5c1d7e14392715 | 5c39a79ec17e7523d50c8bb4a9db4899dbeb7c76 | GameFramework/frameworks | /runtime-src/Classes/Platform/VoiceSdk.cpp | C++ | cpp | 6,342 | no_license | //
// VoiceSdk.cpp
// tdht
//
// Created by hucanhua on 16/9/12.
//
//
#include "VoiceSdk.h"
#include "scripting/lua-bindings/manual/CCLuaValue.h"
#include "scripting/lua-bindings/manual/CCLuaEngine.h"
#include <sstream>
#include "audio/include/AudioEngine.h"
using namespace cocos2d;
VoiceSdk* VoiceSdk::s_VoiceSd... |
4c5eea97d182b94aa8c6f1bb2cb4dce5e71d312e | 35a8469e674d602f314329880bced3aa6ede19cb | EdwardLiuyc/LeetCode | /15.ThreeSum/solution2.hpp | C++ | hpp | 1,096 | no_license | #pragma once
/*
Given an array nums of n integers
are there elements a, b, c in nums such that
a + b + c = 0? Find all unique triplets in the array which gives the sum of
zero.
Note:
The solution set must not contain duplicate triplets.
*/
#include <algorithm>
#include <map>
#include <set>
#include <unordered_map>
#... |
7f7e8766dc6203bd5353f18d6f99f4a67daa9bbe | f057e1343aedd9fa4a31da2beea6b812d2a8cdd8 | icepoint666/raft-cpp | /mushroom/include/guard.hpp | C++ | hpp | 463 | no_license | /**
* > Author: UncP
* > Github: www.github.com/UncP/Mushroom
* > License: BSD-3
* > Time: 2017-05-19 10:24:14
**/
#ifndef _GUARD_HPP_
#define _GUARD_HPP_
#include "utility.hpp"
#include "mutex.hpp"
namespace Mushroom {
class Guard : private NoCopy
{
public:
Guard(Mutex &mutex):mute... |
a6c42c91c5ea305ada337128521aefeb8f92d7bd | 1d8ac2aeb63f05762eecb58baf11b6782cd90d67 | duc-canh/-c-C-nh | /lab7.2.cpp | C++ | cpp | 366 | no_license | #include <stdio.h>
int main(){
int i,n;
printf("nhap n : ");
scanf("%d",&n);
int arr[n];
int s = 0;
int count = 0;
float tbc;
printf("hay nhap so vao day\n");
for(i=0;i<n;i++){
scanf("%d",&arr[i]);
}
for(i=0;i<n;i++){
if(arr[i]%2==1 && i%2==0){
s = s + arr[i];
count++;
}
}
tbc = 1.0*s/count;... |
b749e38b7f14622d3abb92cf59aa22f85ed3a287 | 6b62c652b702fa45a76df5818b8f20ab0029f63a | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/inetsrv/msmq/src/admin/mqsnap/storage.cpp | C++ | cpp | 14,770 | no_license | // Storage.cpp : implementation file
//
#include <winreg.h>
#include "stdafx.h"
#include "mqsnap.h"
#include "resource.h"
#include "globals.h"
#include "mqppage.h"
#include "_registr.h"
#include "localutl.h"
#include "Storage.h"
#include "infodlg.h"
#include "mqsnhlps.h"
#include "mqcast.h"
#include "storage.tmh"
#if... |
d640a5378d1b5c0a25a85ded830f25c4fc79e083 | aa0ed280387e135370d559b9ead9bb90c26b7b6a | 1815368076/electron | /brightray/common/application_info_win.cc | C++ | cc | 678 | permissive | #include "brightray/common/application_info.h"
#include <memory>
#include "base/file_version_info.h"
#include "base/strings/utf_string_conversions.h"
namespace brightray {
std::string GetApplicationName() {
auto module = GetModuleHandle(nullptr);
std::unique_ptr<FileVersionInfo> info(
FileVersionInfo::Cre... |
5c733ed908202d2a21160f8756894f0f1f804235 | c0955591109c44f7f8f808ae07efd1bb41359cf5 | howardchina/ACM-ICPC-solved-problem | /vjudge/HRBUST/1217/13862412_AC_38ms_1356kB.cpp | C++ | cpp | 1,560 | no_license | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int dp[211][41];
int g[211][211];
int h[211];
char str[211];
char w[8][211];
#define update(x,y) x==0?x=k:x=min(k,x)
int main()
{
int P, K;
while(scanf("%d%d", &P, &K)!=EOF){
for(int i = 0; i < P; i++){
scanf(... |
9d830e86ddbe4e46cb1bac110ca2cc2a2a635356 | aa1d3af795fda351ab6bae66b3dcda683421b542 | irfansofyana/cp-codes | /02 - SMA/pcs/BB.cpp | C++ | cpp | 447 | no_license | #include <bits/stdc++.h>
using namespace std;
int panjang, banyak;
int a, b;
int main() {
cin>>panjang>>banyak;
for(int i=0;i<banyak;i++) {
cin>>a>>b;
if(panjang%2==0) {
a--;b--;
if(a%(2*panjang)<panjang) a++;
if(b%(2*panjang)<panjang) b++;
if((a+b)%2==0) cout<<"tidak"<<endl;
els... |
aa7ff9f8bc4871c427c2768f018ef3c5948edadb | 854e6bd5319d9c59917f1c2279396fdb4afdacb8 | sprinfall/qt-study | /src/core/i18n/arrow_pad/arrow_pad.cpp | C++ | cpp | 540 | permissive | #include "arrow_pad.h"
#include <QtWidgets>
ArrowPad::ArrowPad(QWidget* parent) : QWidget(parent) {
up_button_ = new QPushButton(tr("&Up"));
down_button_ = new QPushButton(tr("&Down"));
left_button_ = new QPushButton(tr("&Left"));
right_button_ = new QPushButton(tr("&Right"));
// ÖÐÎÄ×Ö·û
QGridLayout* la... |
5f8a81804d387dbd9e27fef122423b7c3a3bb525 | f483359e9ed0872cb7c0f857ac2589ca8484d3e9 | ChanhyoLee/TextDataset | /WICWIU_src/Operator/LSTM.hpp | C++ | hpp | 18,536 | permissive | #ifndef LSTM_H_
#define LSTM_H_ value
#include "../Operator.hpp"
#include "MatMul.hpp"
#include "Add.hpp"
#include "Tanh.hpp"
#include "Tensorholder.hpp"
#define TIME 0
#define BATCH 1
template<typename DTYPE> class LSTM : public Operator<DTYPE>{
private:
//forget Gate
Operator<DTY... |
225ba290295eac704607c947936f36ad8a471f29 | c71cd09a48861f61987e62eb695852c71c58ce70 | horsenit/UModel | /UmodelTool/Main.cpp | C++ | cpp | 32,669 | no_license | #include "Core.h"
#if _WIN32
#include <signal.h> // abort handler
#endif
// Classes for registration
#include "UnrealClasses.h"
#include "UnPackage.h"
#include "UnAnimNotify.h"
#include "UnMaterial2.h"
#include "UnMaterial3.h"
#include "UnMesh2.h"
#include "UnMesh3.h"
#include "UnMesh4.h"
#in... |
3ed0b81843a4a5e8d8bd892bc1b337910f538b93 | 1c4a859f37eee91d96812618d1dd83729610668e | KryptoniteOU/NPay | /src/compat/glibc_compat.cpp | C++ | cpp | 829 | permissive | // Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/npay-config.h"
#endif
#include <cstddef>
#if defined(HAVE_SYS_SELECT_H)
#include <sy... |
5555e7225e86ef10dc5248b352ee44115702d708 | d53704fa799188a58af95ec12c3a54637b8302ac | christinaa/LLVM-VideoCore4 | /lib/Object/Archive.cpp | C++ | cpp | 14,345 | permissive | //===- Archive.cpp - ar File Format implementation --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
4c898575564da1f1d4b4f6017fb8da9d36726905 | 0d3ecfaef61d0ca63f240119bf62f550eca464e6 | Vizionnation/chromenohistory | /third_party/blink/common/loader/mime_sniffing_throttle.cc | C++ | cc | 2,596 | permissive | // Copyright 2018 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 "third_party/blink/public/common/loader/mime_sniffing_throttle.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/c... |
b80406dd74c0eb0d659a4fb7adfe00309f720ec9 | 4e96b0f2ccd0155384605e23cf93d7c25a51f4f2 | f4deb/Raspberry-Pi | /robot_server/robot_server_0.1/mainwindow.cpp | C++ | cpp | 7,675 | no_license | #include "mainwindow.h"
//#include "ui_mainwindow.h"
#include "console.h"
#include "settingsdialog.h"
#include "robot_uart.h"
#include <QMessageBox>
#include <QLabel>
#include <QtSerialPort/QSerialPort>
MainWindow::MainWindow()
{
//QMainWindow(parent),
messages = new char;
//free(messages),messages = NU... |
212bdf84d9f23ca2135d368d6d2deb716099192b | 94f8a9daf337942bc731d988d957be72d9e72a26 | kuno4n/TopCoder | /src/557-div1-550/Incubator.cpp | C++ | cpp | 13,567 | no_license |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <numeric>
//#include "cout.h"
using namespace std;
#defin... |
a459ce040b29edfd0bd8bab4a2bff76117c4bfa3 | 6a59811ec4bfdd75202ac88945cd77671bcd1c8b | hannahvnguyen/kudu | /src/kudu/mini-cluster/external_mini_cluster.cc | C++ | cc | 57,715 | 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 may... |
ef1779f237c7411282d28fff99c1f5fcbb2c1f0b | de8be6c7d44732af491911747dc97b2f1d0435af | Vetchu/cmssw | /Geometry/HGCalCommonData/plugins/DDHGCalHEAlgo.cc | C++ | cc | 24,335 | permissive | ///////////////////////////////////////////////////////////////////////////////
// File: DDHGCalHEAlgo.cc
// Description: Geometry factory class for HGCal (Mix)
///////////////////////////////////////////////////////////////////////////////
#include "Geometry/HGCalCommonData/plugins/DDHGCalHEAlgo.h"
#include "DataForm... |
6186f11a6955499d6c66c627d78b02aa46629e7e | f303d18d68fc059be665749855b9edc20ca194b2 | DariuszO/beam-dapps | /limited_vault/contract.cpp | C++ | cpp | 2,355 | no_license | #include "contract.h"
#include "../Math.h"
BEAM_EXPORT void Ctor(void*) { // Dummy constructor as needed
}
BEAM_EXPORT void Dtor(void*) { // Dummy destructor as needed
}
namespace {
Amount GetBalanceByKey(LimitedVault::ComplexKey key) {
Amount balance;
return Env::LoadVar_T(key, balance) ? balance : 0;... |
4fb2767c7e6bd032f9ca5d5b8e5603325f48afd7 | 1c13f7c8a6cb5f13280bd6340ba396bfa0059214 | crunkmetal/heap_allocation | /Vehicle.cpp | C++ | cpp | 3,410 | no_license | #include "Vehicle.h" // function prototype info for this file
#include <string> // using string
#include <iostream> // for console input/output ops
using namespace std; // using standard namespace
// function to get private property value
string Vehicle::getOwner()
{
return owner;
}
//... |
f0a5567b2e9ecb1fee148084cdf5608ecf7fc686 | 3ab908b918be91452512c3723186b691f758f1b1 | EricGao-Byte/My-CPP-Program | /函数 字符串加空格/函数 字符串加空格/源.cpp | C++ | cpp | 512 | no_license | #include <stdio.h>
#include <string.h>
#define N 100
int main()
{
char* addspace(char num1[N]);
char num[N];
printf("please input a number to add space:\n");
gets_s(num);
printf("the add space string is:\n");
puts(addspace(num));
return 0;
}
char* addspace(char num1[N])
{
static char num2[N];
int len1 = strle... |
880767b7349dd77cdf6787fa6c043bba0993737c | 837c47f2743e0e7ef01a9f72db40a50c377cce54 | zomeelee/Vulkan-1 | /VKTS/include/vkts/layer1/update/TimeParameter.hpp | C++ | hpp | 2,067 | no_license | /**
* VKTS - VulKan ToolS.
*
* The MIT License (MIT)
*
* Copyright (c) since 2014 Norbert Nopper
*
* 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, inclu... |
8d3b5c2434dd455d4dd2247141cc7a8efaaa40c4 | 3defee84f4db1c7c7ac1cfab40f0e177ab1ae22b | WarrenWFu/Testing-Programs | /cpp/cppsyntax/namespace/t2.cpp | C++ | cpp | 589 | no_license | /*******************************************************************************
*
* author:Warren Fu
* date:
* description:定义在类中的typedef,使用时必须使用类名,如果是private类型的则不能
* 被外部使用
*
*******************************************************************************/
#include <iostream>
namespace UPP
{
class Foo
{
publi... |
c2641db728b4fed74f96deb341004bedf2bbc914 | 8183ef02a42dd53beab383b453e22fc281150ab4 | ConnectionMaster/tsduck | /src/libtsduck/dtv/tables/tsDSMCCStreamDescriptorsTable.cpp | C++ | cpp | 4,797 | permissive | //----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2022, Thierry Lelegard
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the f... |
93b3e5eecef29e74c6498652fb785d4129088e83 | 35f79018e676ccdfbf8bd054fe4d5c5364cb78f1 | crenault002/Exemple | /Advection.cpp | C++ | cpp | 6,165 | no_license | #ifndef FILE_ADVECTION_CPP
#include "Advection.h"
#include <fstream>
#include <iostream>
using namespace std;
using namespace Eigen;
double square(double x)
{
return x*x;
}
// Constructeur
Advection::Advection(const Mesh2D& mesh, string type_flux, string type_ecoulement)
: _mesh(mesh), _triangles(mesh.GetTriang... |
95d94adf8034fdada1c3381bdb8aae28f793c41d | 1d4052358b3d0dff2324a7e9c1f4a6b8a689119c | wawltor/Paddle | /paddle/fluid/pybind/communicator_py.cc | C++ | cc | 1,576 | permissive | /* Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
df382d01fefd9bacd9df76bd0715d3d12ae439ab | 3d4b098c01bde1ac08a8f1405e7dee0ec3950f74 | pineal/chromium | /cc/test/test_image_factory.cc | C++ | cc | 1,053 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/test/test_image_factory.h"
#include <stddef.h>
#include "base/numerics/safe_conversions.h"
#include "ui/gl/gl_image_shared_memory.h"
names... |
08cea4d3a16124a90e0085ac9258e51c5aaf49a0 | d645fe1cd2a58b3fe92a665586cf99bf26e67edf | rzr/chromium-crosswalk | /ui/events/ozone/evdev/input_injector_evdev.cc | C++ | cc | 2,912 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/events/event.h"
#include "ui/events/keycodes/dom3/dom_code.h"
#include "ui/events/ozone/evdev/cursor_delegate_evdev.h"
#include "ui/events/oz... |
cba106574940c655720987291607a18a1dc8363b | 427abb6d1ca19dad055bef63fe4596d321c6c29d | yashagarwal97/LegendOfZelda-3D-Game-OpenGL | /src/nonedit.cpp | C++ | cpp | 8,789 | no_license | #include <iostream>
#include <cmath>
#include <fstream>
#include <vector>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include "main.h"
using namespace std;
/* Initialise glfw window, I/O call... |
31d2779afbb31819e19149439420695ac658d170 | b4c47337aca9423fa6fdfb715afe996981645273 | erikpoole/Masters-of-Software-Developement | /6017/spacialPartioningDataStructures/KDTree.hpp | C++ | hpp | 5,007 | no_license | #pragma once
#include "Point.hpp"
#include <memory>
#include <queue>
#include <vector>
template<int Dimension>
class KDTree{
public:
KDTree(std::vector<Point<Dimension>>& points){
root = std::make_unique<Node<0>> (Node<0>(begin(points), end(points)));
}
std::vector<Point<Dimension>> ra... |
765601da926843a8451404361d4dc049c36f9053 | fb13164430d74530c356e33148eb4a92585be2bc | kyx0r/FA_Patcher | /boost_lib/boost/math/special_functions/cos_pi.hpp | C++ | hpp | 2,036 | permissive | // Copyright (c) 2007 John Maddock
// Use, modification and distribution are subject to 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_MATH_COS_PI_HPP
#define BOOST_MATH_COS_PI_HPP
#ifdef _MSC_VER
#pragma once
#e... |
a12a234d01501b88df7cc43c7261289cf69aae7e | 60951b4e4b27da00a0427e9ff319dbb1819ea02f | chrysteljuan/TubeTK | /Base/Segmentation/itktubeRidgeExtractor.hxx | C++ | hxx | 56,223 | permissive | /*=========================================================================
Library: TubeTK/VTree3D
Authors: Stephen Aylward, Julien Jomier, and Elizabeth Bullitt
Original implementation:
Copyright University of North Carolina, Chapel Hill, NC, USA.
Revised implementation:
Copyright Kitware Inc., Carrboro, NC, US... |
07df694ca78e3d25eec980be344b8886de8b1ef0 | e7630f2fd010c181d2f7d4223672264cf63c15b9 | cookinrelaxin/BreakoutGL | /zengine/src/shader.cpp | C++ | cpp | 4,548 | no_license | #include "shader.h"
#include <iostream>
Shader& Shader::Use() {
glUseProgram(this->ID);
return *this;
}
void Shader::Compile(const GLchar *vertexSource,
const GLchar *fragmentSource,
const GLchar *geometrySource) {
GLuint sVertex, sFragment, sGeometry;
sVert... |
d4c19e1db01bef9486e4c473e290c9cea27d245a | 119062570510687adb78aec720744d3add19a420 | EloiVega/SeekYourExit-Ascii-Game- | /EventMaker.cpp | C++ | cpp | 11,704 | no_license | #include "EventMaker.h"
default_random_engine Rgen(time(0));
EventMaker::EventMaker(){
int ln, pn; ///level number and players' number
printf("************************************************\nWhich level would you like to play? ");
scanf("%d", &ln);
puts("****************************************... |
ea7c0d6009d4e2207e4259853a0fc4a9a0de620f | 115a3a0d2ed2b55f7988bbd745e7204f66787cb6 | DenDiem/ATM-CarpeDiem | /build-CarpeDiem-Desktop_Qt_5_10_1_MinGW_32bit-Release/release/moc_mainwindow.cpp | C++ | cpp | 5,497 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'mainwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.1)
**
** WARNING! All changes made in this file will be lost!
*********************************************************... |
378dd0d8cdf452de425f63fa613257eaee9288ed | 43d92f40972bf2f074cb1df562db537ce83bf5a6 | brinkqiang2cpp/poac | /include/poac/util/cfg.hpp | C++ | hpp | 29,060 | permissive | #ifndef POAC_UTIL_CFG_HPP
#define POAC_UTIL_CFG_HPP
#include <cstddef>
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <variant>
#include <vector>
#include <utility>
#include <boost/predef.h>
namespace poac::util::cfg {
struct exception : public std::e... |
1305b5f0c8d470b0b2aab1e41a0c42b779ba6e4e | 7badf5f817de12954ffe62e5edcbb88f3002ed63 | PoliGomes/tutorialfuse | /hikr/build/Android/Preview/app/src/main/jni/Fuse.Effects.g.cpp | C++ | cpp | 119,457 | no_license | // This file was generated based on '(multiple files)'.
// WARNING: Changes might be lost if you edit this file directly.
#include <_root.FuseEffects_bundle.h>
#include <Fuse.DrawContext.h>
#include <Fuse.Effects.BasicEffect.h>
#include <Fuse.Effects.Blur.h>
#include <Fuse.Effects.Desaturate.h>
#include <Fuse.Effects.... |
acad6c27f4c79b97ebd5c6b2c3a9439ef4a0b2d0 | 7389918f76d3755ce6942d7f6c093e2d9c0af592 | kidaak/lhcbsoft | /Rec/Rich/RichRecMonitors/src/RichTrackGeomMoni.cpp | C++ | cpp | 16,936 | no_license |
//---------------------------------------------------------------------------
/** @file RichTrackGeomMoni.cpp
*
* Implementation file for algorithm class : RichTrackGeomMoni
*
* @author Chris Jones Christopher.Rob.Jones@cern.ch
* @date 05/04/2002
*/
//--------------------------------------------------... |
8dfb304fe0c46b3ca937b726260c05fe740c4a11 | 758c972cf2e44e38c32985cad5f0a6d9753f0f84 | i-am-arvinder-singh/CP | /LeetCode Solution/Medium/Construction of BT from inorder and postorder.cpp | C++ | cpp | 1,169 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : v... |
b194309643b3fbf83d9b9b8b3c1bce715acd8fd0 | 588a8d921baf3b5ca394891df2b42955b4b6f1c1 | BristolTopGroup/AnalysisSoftware | /test/old/TestDatasetInformation.cpp | C++ | cpp | 1,613 | permissive | /*
* TestDatasetInformation.cpp
*
* Created on: 12 Mar 2012
* Author: kreczko
*/
#include "TestDatasetInformation.h"
#include "../interface/DataTypes.h"
#include <boost/array.hpp>
using namespace BAT;
TestDatasetInformation::TestDatasetInformation() :
datasetInfo_("python/DataSetInfo.py") {
}
TestData... |
e8bb8960ddb54d4e92ffbf6bdc5debe79e283ca5 | 820b80dbcb703f4a96f66a1bd77a8188f88d7032 | thegamer1907/Code_Analysis | /Codes/AC/2471.cpp | C++ | cpp | 2,785 | no_license |
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <sstream>
#include <fstream>
#include <stdio.h>
#include <set>
#include <map>
... |
512514ff838981381b2898d9e8e75828bd008e8a | 75dc4ad6bce70f0c0c0531eeead7ab4106e0a5f7 | liuxinren456852/vxl | /contrib/brl/bbas/bmsh3d/algo/bmsh3d_fileio.cxx | C++ | cxx | 35,784 | no_license | // This is brl/bbas/bmsh3d/algo/bmsh3d_fileio.cxx
#include "bmsh3d_fileio.h"
//:
// \file
// \brief 3D mesh file I/O
//
// \author MingChing Chang
// \date Feb 10, 2005
//
// \verbatim
// Modifications
// June 13, 2005 Nhon Trinh implemented bmsh3d_load_ply(...)
// \endverbatim
//
//------------------------... |
26e21bf39d77acf3de25d546ac24c55a2f7bef2c | 6d88edead88ef772d3dd861b765c37bdc5f99005 | dafadey/hed | /hed/energy_conservation/test_nrg.cpp | C++ | cpp | 3,094 | permissive | #include <heds/solver.h>
#include <svg.h>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <set>
int main()
{
std::vector<std::vector<point>> contours;
svg::importall("input_geo.svg", contours, 0.1);
std::ofstream of;
mesh m;
for(const auto& c : contours)
{
m.contours.push_back(POL... |
172ec6970adc735c9c4ee188978464b48052579d | e96fc6b1ce9ac832e13681dc3f079b1f62838794 | Acytoo/leetcode | /c++/135candy.cc | C++ | cc | 947 | no_license | #include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <queue>
#include <climits>
#include <stack>
#include <algorithm>
#include <cmath>
#include <set>
#include <unordered_map>
#include <list>
#include <unordered_set>
#include <map>
#include <functional>
#include <bitset>
#include <numeric>... |
2f50b3d9158c5d72e2539871b7656e0c6ad04218 | 08f9cdf8c8e58f53fd4d88293a287f64fa9ce17f | TySmith11/JazMan | /JazzMan/Variables.cpp | C++ | cpp | 622 | no_license | #include "Variables.h"
#include <string>
//Set Method
Variables::Variables(std::string setVariable, int setValue, int setScope)
{
this->varname = setVariable;
this->value = setValue;
this->variableScope = setScope;
}
//Get method
std::string Variables::GetValue(std::string getVariable, int currentScope)
{
//If th... |
8a34bd4fc6fd346e34d6a5b8c2fc439e42f439df | e3880012711a702e237af676371626a56ed00d25 | priyashree15/placement_preps | /DP/edit.cpp | C++ | cpp | 978 | no_license | #include <iostream>
#include <vector>
#include <stack>
using namespace std;
class Solution {
public:
int edit(vector<char>& v1, std::vector<char>& v2,int m,int n) {
std:std::vector<std::vector<int> > res;
res.resize(m+1,std::vector<int>(n+1,0));
for (int i = 0; i <= m; ++i)
{
... |
f07a6b0125f912d16ffd2fde005e8b7f2046fada | ead671c9d6e280c5f6e0102ddb9ac46cbe20ede0 | OldMan5119/ThinkingCplus | /extends/interfaces/FighterPlane.cpp | C++ | cpp | 232 | no_license | //
// Created by 石鑫 on 2020/11/26.
//
#include "FighterPlane.h"
FighterPlane::FighterPlane(string num):Plane(num) {
cout << "FighterPlane()" <<endl;
}
FighterPlane::~FighterPlane() {
cout << "~FighterPlane()" <<endl;
} |
f6e61f81ecdbc81467a4abf026ad4e321d1ba1d4 | dcdbb1a4af309b5eee607f7d94d5714d4cc1bf5b | Xilinx/Vitis_Libraries | /security/L1/include/xf_security/gcm.hpp | C++ | hpp | 38,193 | permissive | /*
* Copyright 2019 Xilinx, 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... |
630e2bd66e29c2d9d6d08878033c63deec31bc29 | 099e3af2bee1d0c1c426411a0d9be846bee2823b | lowkey42/mirrage | /src/mirrage/net/src/channel.cpp | C++ | cpp | 2,381 | permissive | #include <mirrage/net/channel.hpp>
#include <mirrage/net/error.hpp>
#include <enet/enet.h>
namespace mirrage::net {
void Channel_definitions::_add(util::Str_id id, Channel_type type)
{
auto def = Channel_definition{gsl::narrow<std::uint8_t>(_by_id.size()), type, id};
_by_name[id] = def;
_by_id.emplace_bac... |
ec4f6c0cb66478965c5327555504803be90b2158 | 3a9e016f93cdb83f5694cc4bacebb28976aca99f | chessdroid/morbidel-timus | /done/1006.cpp | C++ | cpp | 1,757 | no_license | /*
* ACM Online
* Square Frames - Problem 1006
*
* solutie: am luat-o de pe forum, problem† de c†cat...
* cred c† ia frame-urile complete si golul Śl las† pt. a pune orice...
*/
#include <stdio.h>
#include <string.h>
unsigned char a[21][51];
int b[2001][4];
int s = 0;
int in(int ch, int c1... |
9c7e6443eb361769538b8caa2d0da2785d4ae76d | 690d777a03f09bd95129123f48fd706af3b38835 | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/windows/advcore/duser/directui/engine/core/property.cpp | C++ | cpp | 82,120 | no_license | /*
* Property
*/
#include "stdafx.h"
#include "core.h"
#include "duielement.h"
#include "duithread.h"
#include "duiaccessibility.h"
namespace DirectUI
{
////////////////////////////////////////////////////////
// Property system of Element
#if DBG
// GetValue instrumentation class
class GVTrack
{
public:
//... |
21f14c1257e2003abc21528ccf513f1b7c669e60 | e3978d8805404accd8dcb735f15d6d1bc78325db | BookOfStopHere/iOSVideoCodec | /iOSCodecDemo/iOSCodecDemo/SRC/Common/BaseCodec.cpp | C++ | cpp | 305 | no_license | //
// BaseCodec.cpp
// iOSCodecDemo
//
// Created by yang on 2018/2/6.
// Copyright © 2018年 BookOfStopHere. All rights reserved.
//
#include "BaseCodec.hpp"
namespace Codec{
BaseCodec::~BaseCodec()
{
};
BaseCodec:: BaseCodec(void)
{
};
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.