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
708b3916f2d00600611903ba17ca2f50ef3e5907
a524797d4e6d714343fe0997790c2c233579a8bc
xx0x/earings
/firmware/xx01/animations/AnimationBasicBlink.cpp
C++
cpp
441
no_license
#include "Arduino.h" #include "../Animation.h" class AnimationBasicBlink : public Animation { public: void setup() { on = false; } int getInterval() { return animationBaseInterval; } bool draw() { on = !on; pixels.clear(); if (on) { ...
3baa7ce0327639fdb3b57e6c16bfe251e0e09427
ace7d894c95733a8870f618673c6bcb331e61d32
sibermaxim/MatrixModelView
/TestUi/OpenGl/DrawGrid.cpp
C++
cpp
1,658
no_license
#include "stdafx.h" #include "DrawGrid.h" #include <vector> /*********************************************************************** функция: DrawGrd() назначение: конструктор класса входные данные: нет выходные данные: нет **********************************************************************/ DrawGrd::Draw...
1b17d052ccabbaa9f2dc502627e0c8c747d1820f
b950cff47b81ed63997608c1963d74f9191928b2
Stephen1993/ACM-code
/hdu1596之最短路.cpp
C++
cpp
1,025
no_license
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<string> #include<queue> #include<algorithm> #include<map> #include<iomanip> #define INF 99999999 using namespace std; const int MAX=1000+10; double dist[MAX][MAX]; bool mark[MAX]; int n,m,s,t; void dijkstra(int s,int t){...
45d908dfe31c2fe304f21d2dc3e656954b0318c9
c22bd3b28d722eac73ba4f509c54aecf0cb81203
w23/stameska
/src/RootNode.hh
C++
hh
758
no_license
#pragma once #include "INode.hh" #include "ProjectSettings.h" #include "AudioCtl.h" #include "VideoNode.h" #include "filesystem.h" class RootNode : public INode { public: RootNode(const fs::path &root, const ProjectSettings &settings); ~RootNode(); void resize(int w, int h); void paint(ATimeUs ts, float dt); v...
b0496616b248f117d8161ea013f2c56bbf3e4f2b
913a6ff9175147d1edb23a8e561f3f37092f9d1c
OsvaldoSalomon/CoopGame
/CoopGame/Source/CoopGame/SWeapon.cpp
C++
cpp
3,729
no_license
// Osvaldo Salomon 2021 #include "SWeapon.h" #include "DrawDebugHelpers.h" #include "Kismet/GameplayStatics.h" #include "Particles/ParticleSystemComponent.h" #include "PhysicalMaterials/PhysicalMaterial.h" #include "CoopGame.h" static int32 DebugWeaponDrawing = 0; FAutoConsoleVariableRef CVARDebugWeaponDrawing(TEXT("...
d452c583c1e459242c49ea587b73ccc5f2dc6abd
dc9625cc53aa1f94a6612407d41ba14db43e4dba
harshp8l/deep-learning-lang-detection
/data/train/cpp/dc9625cc53aa1f94a6612407d41ba14db43e4dba7_3_Upcast1.cpp
C++
cpp
998
permissive
#include "7_1_1_InputStream.h" #include "7_1_2_ArrayStream.h" #include <iostream> using namespace std; //Show関数はアップキャストのおかげで2つのクラスのどちらのオブジェクトでも渡せる。 void Show(const Stream& stream){ cout << stream.Get() << endl; } int main(){ // InputStream stream; // cout << "> " << flush; // stream.Set(); // const Stream& ref...
b9595cddb186500d2e6a9b621df94568ebabbdbc
4b808e7e2ec4a2d92735ccb05638a74a4101b328
weimzh/VirtuaNESex
/CheatDlg.cpp
C++
cpp
38,076
no_license
// // チートダイアログクラス // // #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <shellapi.h> #include <commdlg.h> #include <mbstring.h> #include <string> using namespace std; #include "VirtuaNESres.h" #include "DebugOut.h" #include "App.h" #include "Pathlib.h" #include "Config.h" #include "Wnd.h" #include "CheatDl...
e94b4a8dd9ec45f4c15da500e2c0680e52f723c9
ff7435ae60c20dd926763303d16c2de8cfe03695
gubraot/GameTestPrototype
/Seane.cpp
C++
cpp
2,068
no_license
#include "Seane.h" #include "SeaneManager.h" SeaneManager* Seane::smanager; Seane::Seane(void){ hierarchical.push_back( INIT ); window = NULL; } Seane::~Seane(void) { for( unsigned int i = 0; i < child.size(); i++ ){ delete child[i]; } for( unsigned int i = 0; i < layer.size(); i++ ){ delete layer[i]; } d...
8f996c0f678a1219a5b1c5807e1daf28f80be46c
38641783b6b2bf415f0dc098f314dc47c9244e53
artyom-kuz/Smart-Annotate
/BUILD/moc_image_editor.cpp
C++
cpp
6,835
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'image_editor.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.6) ** ** WARNING! All changes made in this file will be lost! *******************************************************...
8511f7a9b14c6dff742720a03d38f4dc6ab706a2
c087d0af1259465ac72a701e9334beb2388072fa
Rupee-Foundation/Rupee-Evolution
/src/qt/bitcoingui.cpp
C++
cpp
56,815
permissive
/* * Qt4 bitcoin GUI. * * W.J. van der Laan 2011-2012 * The Bitcoin Developers 2011-2012 */ #include "bitcoingui.h" #include "transactiontablemodel.h" #include "addressbookpage.h" #include "messagepage.h" #include "sendcoinsdialog.h" #include "signverifymessagedialog.h" #include "optionsdialog.h" #include "aboutdi...
1b9feb3f25590fa6a1cb4305aeb4a0ce652b315e
c1f52f572fae64decb95ba501805284acace28d7
Yi-Hsuan-Su/Mesh-Proxy-tool
/Program/Source/TextureParameterization/PickingTexture.cpp
C++
cpp
1,858
no_license
#include "PickingTexture.h" PickingTexture::PickingTexture() { } PickingTexture::~PickingTexture() { Clear(); } bool PickingTexture::Init(int width, int height) { Clear(); glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_FRAMEBUFFER, fbo); glGenTextures(1, &fboColor); glBindTexture(GL_TEXTURE_2D, fboColor...
7b7e2d26aa51d98364e8817b4b21d3acb0648ebd
193cc0fa3f539616972e9658874e946bfe900b62
shdltkdi12/acm
/pokerhand.cpp
C++
cpp
339
no_license
#include <cstdlib> #include <iostream> #include <unordered_map> #include <string> using namespace std; int main() { std::unordered_map<char, int> map; int output = 0; char s[2]; while(std::cin >> s) { map[s[0]]++; } for(auto i : map) { output = std::max(i.second, output); } std::cout << output...
7777d5aeab9e4084faa4b72346f063e0b7905c3f
37525ebf0cac933bb4e0e1e0d6504f7b1407a193
codacy-badger/Alacrity-Lang
/src/Core.cpp
C++
cpp
1,109
permissive
/* Copyright (c) 2018, Electrux All rights reserved. Using the BSD 3-Clause license for the project, main LICENSE file resides in project's root directory. Please read that file and understand the license terms before using or altering the project. */ #include <vector> #include <string> #include "../include/Er...
ac572c5e1189df4b6272dae72c37c4f7e48aac81
c75762274706e674395aedc72f41ea8db07d0b05
harsh6768/Data-Structure-Programms
/Sorting/Insertion_Sort.cpp
C++
cpp
603
no_license
#include<iostream> #include<conio.h> using namespace std; int *a=NULL; int main() { int i,n,j; cout<<"enter the size of the array:"; cin>>n; a=new int[n]; for(i=0;i<n;i++) { cout<<"enter a number:"; cin>>a[i]; } for(int i=1;i<n;i++) { int temp=a[i]; j=i-1; while(j>=0 && temp<a[j]) //compar...
e300f67e31ddf457668ced5cb8aa9d4f1e5456ca
b8d097fc01504cd2b24afc22e479c4c3c7bd7ffa
Evalir/Algorithms
/Problems/Atcoder/atb100/b.cpp
C++
cpp
436
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll d,n; cin >> d >> n; if (d == 0) { if (n == 100) cout << ++n << endl; else cout << n << endl; } if (d == 1) { if (n == 100) cout << (++n)*100 << endl; else cout << n * 100 << endl; } i...
07105eb92ad5ef9f0df3d2bda82f4ca1b9fb2bc3
6eea88412fecc2e84474cbe77a0d5fcbf2776235
parizpe1/ArtefactViewer
/src/app/avpqreader.cpp
C++
cpp
7,870
permissive
/* * Copyright (c) 2016, Pedro Fernando Arizpe Gomez // PQLabs. // // Copyright (c) PQLabs. All rights reserved. // // File: PQMTClient.cpp // // Contents: SDK APIs for MultiTouch Server. // // Date: 2008-12-19 // The following ifdef block is the standard way of creating macros which make exporting /...
a9520e0974632b7a38455b07b5cbf8a36f41b1d9
e61b4b1d3e251d62e21a5d86d711ea45212d280c
Hamoruton/Ninja
/DE_Ninja1.03/Enemy.cpp
C++
cpp
2,861
no_license
#include "DxLib.h" #include "Task2DACT.h" #include "Enemy.h" #include "Bullet.h" #include "Effect.h" #include "Scene.h" //======================================================================== //コンストラクタ //======================================================================== CSmallEnemy::CSmallEnemy(float x, float...
1400085f2d8cc27800fa2236fe5c26dbfef5183f
27589cda366700d1177107d687f3c33d39ce488a
HaykTheKhulyan/GameOfLife
/GameOfLife/CellGrid.cpp
C++
cpp
3,307
no_license
#include "CellGrid.h" #include "Cell.h" #include <iostream> CellGrid::CellGrid() { for (int i = 0; i < 30; i++) for (int j = 0; j < 30; j++) { grid[i][j] = cell; grid[i][j].setPosition(sf::Vector2f(15.0f + (j * 30), 15 + (i * 30))); } } CellGrid::~CellGrid() { } void CellGrid::Update() { //variable for ...
35472e7f4af875b5c1f0746df5762eaa5c02ef03
1e6f83313ff7bd9a1a1a52d0204e2928a05561d1
alenming/trunkClient
/proj_win32/main.cpp
C++
cpp
1,236
no_license
#include "main.h" #include "AppDelegate.h" #include "cocos2d.h" #include "extern/qqHall/QQHallManager.h" #include "Game.h" #if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 #include "resource.h" HICON hdicon; #endif USING_NS_CC; int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, ...
0b182a1d4c2e9e3ce9ff8021887aa5f51c25aad9
38be89fec0c1cda677eff1777c49ef1c57abf0a5
marijnz/bouncingballs
/src/gep/src/gep/settings.cpp
C++
cpp
2,216
no_license
#include "stdafx.h" #include "gepimpl/settings.h" void gep::Settings::loadFromScriptTable(ScriptTableWrapper table) { /// Load settings from the argument 'table' like this: /// ScriptTableWrapper innerTable; /// table.tryGet("myInnerTableNameInLua", innerTable); /// int theSetting = 42; /// innerTa...
833579798d972dff1f3e6a3f5181c43a1ef910b3
32f296b08425e3eeb7c737d0e0b696dd5e157f26
KernelPanic-OpenSource/Win2K3_NT_ds
/security/base/lsa/server/extsdll/core/lsahandlelst.hxx
C++
hxx
365
no_license
/*++ Copyright (c) 2001 Microsoft Corporation Module Name: lsahandlelst.hxx Abstract: Lsaexts debugger extension Author: Larry Zhu (LZhu) May 1, 2001 Environment: User Mode Revision History: --*/ #ifndef LSA_HANDLE_LST_HXX #define LSA_HANDLE_LST_HXX DECLARE_API(dumplsahandle...
9d71a9185700aa640bccc5351f6e5fd70deaa351
e01d21540071d30230242b3946fb022760042da9
minskiter/leetcode
/codecpp/24.cpp
C++
cpp
721
no_license
#include "header.h" class Solution { public: ListNode* swapPairs(ListNode* head) { ListNode * guard = new ListNode(0,head),* p = guard; while (p->next!=nullptr){ if (p->next->next!=nullptr){ ListNode * temp = p->next; p->next = temp->next; ...
d617a0bbb92e3dc662c4eabcd12460640f3887ad
ffd7c825635b8ba337e74c7efede6447d74d0e70
NakedM/AlgospotTests
/algoPro/algospot_alltest/boj_2493.cpp
C++
cpp
968
no_license
#include<iostream> #include<fstream> #include<string> #include<cstring> #include<cmath> #include<vector> #include<algorithm> #include<queue> #include<deque> #include<limits> #include<bitset> #include<map> using namespace std; // int inf = 1000000001; #pragma warning (disable:4996) ifstream in("input.txt"); int main(...
c61fc6a6456f5e2d4d935651ec4d62bdd514edaf
34b3ca54cd222a9d8f72e015b3f513096b822753
gauravalgo/etl
/test/test_intrusive_list.cpp
C++
cpp
38,181
permissive
/****************************************************************************** The MIT License(MIT) Embedded Template Library. https://github.com/ETLCPP/etl http://www.etlcpp.com Copyright(c) 2015 jwellbelove Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associate...
aba7edf0929e79634d51644c06ae74771c98b4c4
8d0f19f30841691fd99639a74c96fb57fcbffc99
dblalock08/cavalcade
/Cavalcade/AmbientLight.cpp
C++
cpp
930
no_license
/****************************************/ /* Ambient light object */ /* */ /* David Blalock 2012 */ /****************************************/ #include "AmbientLight.h" AmbientLight::AmbientLight() { } AmbientLight::AmbientLight(const AmbientLight& other) { } AmbientLight::~AmbientLight() { } v...
fe3d72230b62e2b728226ca249f22c45bff71883
0d013b3e22f5fc7280bdbc2cfa88827b8d8836af
novaquark/aws-sdk-cpp
/aws-cpp-sdk-signer/source/model/ImageFormat.cpp
C++
cpp
2,671
permissive
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
efd77c627324ff4dac40b33daf3433b46cf3f0f7
b835bd5aa4a37ad66f95d01229379a283c39227b
webos21/xbionic
/logging-platform-12.0.0_r1/logcat/tests/logcat_test.cpp
C++
cpp
53,998
permissive
/* * Copyright (C) 2013-2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
182f450f5b6772fcaea3e3e0d2b5e4f1988310f4
5ab1575ffe2bc292fce6c1c16c8cafe898e1ab37
bangalcat/Algorithms
/partsum/11660.cc
C++
cc
622
no_license
#include <iostream> #include <vector> using namespace std; int main(){ ios_base::sync_with_stdio(false);cin.tie(NULL); int n, m; cin >> n >> m; vector<vector<int>> psum(n+1, vector<int>(n+1,0)); for(int i=0;i<n;++i) { for(int j=0;j<n;++j) { int a; cin >> a; ...
4e08c91fb6e36806333c8aa14ec9f0b59238ca22
28e2c844890296f4fae2e37521ba9367ca8d39d6
morojenoe/code-base
/istu-training/20.07.03-IIT-contest/C.cpp
C++
cpp
3,556
no_license
#pragma comment(linker, "/STACK:128777216") #include <iostream> #include <cstdlib> #include <cstdio> #include <sstream> #include <algorithm> #include <vector> #include <map> #include <set> #include <bitset> #include <queue> #include <deque> #include <stack> #include <math.h> #include <cmath> #include <string> #inc...
4b0096c0a94dad7e8552ea1b5a3dca1fbef1ee80
58cd3290665c48082bbdf2cf9f546d247a22ad06
akshayMore2018/SFML-Project
/sfmlproject/sfmlproject/LevelManager.cpp
C++
cpp
1,142
no_license
#include "LevelManager.h" #include <iostream> #include "Asteroid.h" #include "Meteor.h" #include "PlayerProfile.h" LevelManager::LevelManager(std::vector<Entity*>* entitylist):entitylist(entitylist) { } LevelManager::~LevelManager() { std::cout << "LevelManager destructor" << std::endl; for (auto i = this->entityl...
92e77880efa9e3e7ed300dc26c707d5c79f85f70
4087e2159fe41378cd5faaaa9e456d3b87974c84
kishantr-clearcap/PLCaluclator
/main.cpp
C++
cpp
7,776
no_license
#include <iostream> #include <fstream> #include <unordered_map> #include "Action.h" #include "Contract.h" #include <sstream> #include <vector> #include <iomanip> using namespace std; float theoBand; // This is the theoratical +- that the user can input. This is global because it will persist throughout the entire durat...
9e093da1ba7b5841d02f2e4950e29414dc1df6bc
3aa4d600fe4fc6e165fc36462ebed95fbd34f4a5
TsentsevitskyDmitry/Text-Chat-App
/ServerStatusApp/Models/ServerInfo.cpp
C++
cpp
552
no_license
#include "ServerInfo.h" uint32_t ServerInfo::getRunningPort() const { return runningPort; } void ServerInfo::setRunningPort(const uint32_t &value) { runningPort = value; } uint32_t ServerInfo::getUsersCount() const { return usersCount; } void ServerInfo::setUsersCount(const uint32_t &value) { users...
2c071f2e2505d17c3cac9c8b7dc00f93906d5957
b5facf2547325a6e51272be204cdf8b605494330
IceEmblem/DocFinder
/src/DocFind/SourceFiles/DocumentReaderFactory.cpp
C++
cpp
1,027
permissive
#include "../HeaderFiles/DocumentReaderFactory.hpp" #include "../HeaderFiles/DocumentReaders/TxtReader.hpp" #include "../HeaderFiles/DocumentReaders/DocxReader.hpp" namespace DocFind { std::vector<std::shared_ptr<DocumentReader>> DocumentReaderFactory::_docReaders = std::vector<std::shared_ptr<DocumentReader>>(); ...
3a88b65ca46c28c797b841f9af5316238d510176
ae4c60125528ac3290289903a218b13d267518f8
gigel773/fast-encryption
/test/source/algorithmic_tests/encryption_algorithmic_test.cpp
C++
cpp
1,632
permissive
#include "encryption_algorithmic_test.hpp" void EncryptionAlgorithmicTest::start() { before(); std::for_each(m_lengths.begin(), m_lengths.end(), [this](int &length) { /* Initializing variables */ auto message = new signed char[length]; auto key = new signed char[16]; auto ciphe...
c1217ea41bf3eedda57d9d1d943afacdab1ffcd4
960d3b54ac92468361b369060f492811eb8466bc
Closer-M/Library-acm
/Summer/ACM习题/学习样板/bmp位图的读取写入.cpp
C++
cpp
12,392
no_license
#include<iostream> #include<string> #include<algorithm> #include<iomanip> #include<cmath> #include<cstdio> #include<map> #include<queue> #include<stack> #include<ctime> #include<fstream> #include<stdio.h> #include<Windows.h>//读取位图时使用的头文件 using namespace std; unsigned char *pBmpBuf;//读入图像数据的指针 int bmpWidth;//位图的宽 int ...
ca7282dbb145318129f81ceac430c04a5ce18c1d
f33e929322ea4fe6d3641b0e5129863c53f9e120
Tudor67/Competitive-Programming
/LeetCode/Problems/Algorithms/#2597_TheNumberOfBeautifulSubsets_sol3_smart_grouping_and_sort_and_memoization_O(N^2)_time_O(N^2)_extra_space_8ms_34MB.cpp
C++
cpp
990
permissive
class Solution { private: int solve(int prevIndex, int index, vector<int>& v, int k, vector<vector<int>>& memo){ if(index >= (int)v.size()){ return 1; } if(memo[prevIndex][index] >= 0){ return memo[prevIndex][index]; } int res = solve(prevInde...
05e0e689790c42af0ea95aedb0cb826c5d37eaf1
b7da8eacd291d9fc10c4c57146c1fa7572018aba
berneylin/LeetCode2019Spring
/interview/52/get_intersection_node.cpp
C++
cpp
1,296
no_license
struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution2 { public: ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { ListNode *ptrA = headA, *ptrB = headB; while (ptrA!=ptrB) { ptrA = ptrA?ptrA->next:headB; ...
52321b8a5f680a50e124146ac2419e8f3a201872
72208376d5c7dc7d5d48a45185f4c31c8e89bf8b
ankit-nigam/work
/SPOJ/anti_blot.cpp
C++
cpp
1,342
no_license
#include <bits/stdc++.h> using namespace std; string a, b, c, d, e; int get(string x){ int res = 0; int d = x.size() - 1; for(int i = 0; i < x.size(); i++){ res += (x[i] - '0') * pow(10, d); d--; } return res; } void getm(string x, int a, int b, bool ok){ int dif = b - a; if(ok){ dif = a +...
3fe919385e99f625bba1611fcae25872462b3dad
19c8c2f75d3d7014c55b48b5ce81bccb8aa76d9e
HexColors60/shadow-of-the-wyrm
/engine/XML/source/XMLRacesReader.cpp
C++
cpp
11,440
permissive
#include "Skills.hpp" #include "StringTable.hpp" #include "tiles.hpp" #include "XMLRacesReader.hpp" #include "XMLDataStructures.hpp" #include "XMLResistancesReader.hpp" #include "XMLSkillsReaders.hpp" #include "XMLModifierReader.hpp" using namespace std; RaceMap XMLRacesReader::get_races(const XMLNode& races_node) { ...
675eb25d0bb98f096af44f29c7e73eb7fd62a1fe
8504224de9a48fef904e641ebbc56569d9af69cc
yuexiae/ns
/server/filter/ns_character.cpp
C++
cpp
2,570
no_license
#include "server/server_pch.h" #include "server/ext/ns_ext.h" class CNSCharacterFilter : public CNSCharacter { public: NSPOINT2 GetCurrentCellFilter(unsigned long dwTime) { NSPOINT2 cell; if (this->m_dwFinishTime <= dwTime) { cell = this->m_cellDest; } else { ...
f7ab1c589c6958a1af3a5dea8d4e9e984e9d8b10
54925af04177a85fc7450f57b8bb124cc2de2f20
kojingharang/algorithm_contest
/atcoder/abc113_d.cpp
C++
cpp
4,046
no_license
#include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #include <numeric> #include <sstream> #include <iostream> #include <iomanip> #include <functional> #define _USE_MATH_DEFINES #include <cmath> #include <climits> #include <cstdlib> #include <cstring> #include <cfloat> ...
1f3641488e6b80a27d7e8e89a0ec61191575b720
a3c0f9b3f85d2d3716868f225f49b076b84cde89
hdi-superuser/Codes
/Codeforces/CF 191/D.cpp
C++
cpp
1,735
no_license
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <vector> #include <cstring> #include <string> #include <cmath> #include <ctime> #include <utility> #include <map> #include <set> #include <queue> #include <stack> #include <sstream> #define FOR(a,b,c) for (int a=b,_c=c;a<=_c;a++) #de...
43208388915e808ebe05e519063c34df524eea95
08e89939e9a889aa58fba0ee2f0fd0777049239f
yysskk/Training
/AtCoder/abc138_b.cpp
C++
cpp
1,404
no_license
// SeeAlso: https://atcoder.jp/contests/abc138/tasks/abc138_b #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #define MAX 100 typedef int _loop_int; #define REP(i,n) for(int i = 0; i < n; i++) #de...
6832d3c58e59beda4143efcb9d3e0d684926b8b5
f6f6b7b5f889b0cd15b8faa4838302cd4d7a4236
Aishou/dxvk
/src/d3d11/d3d11_present.cpp
C++
cpp
2,532
permissive
#include "d3d11_device.h" #include "d3d11_context_imm.h" #include "d3d11_present.h" namespace dxvk { HRESULT STDMETHODCALLTYPE D3D11PresentBackBuffer::QueryInterface(REFIID riid, void** ppvObject) { return m_texture->QueryInterface(riid, ppvObject); } Rc<DxvkImage> D3D11PresentBackBuffer::GetDXVKIma...
b736ce9274bf57c4ef97808ff670f03fec5eabf7
521071271f43cb99c2d523425687f651846aa461
KjellSwedin/behave
/src/behave/surfaceFireReactionIntensity.cpp
C++
cpp
6,984
no_license
/****************************************************************************** * * Project: CodeBlocks * Purpose: Class for calculating surface fire reaction intensity * Author: William Chatham <wchatham@fs.fed.us> * Credits: Some of the code in this file is, in part or in whole, from * BehavePlus5 sour...
a3ec56007e12a42be142e2db8a23401c8be01980
eab17ee07be621daa752b48394152a9c259406eb
alex-87/HyperGraphLib
/src/algorithm/include/Dual.hh
C++
hh
2,097
permissive
/* * MIT License * * Copyright (c) 2015 Alexis LE GOADEC * * 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, cop...
717bae35b95c82029f8cf31852486eaf95af050d
57f04e5c09d677a03082f910d6995f83d5123b66
ChuniMuni/xray-1.0007rc1
/xray/xr_3da/xrGame/Actor_Network.cpp
C++
cpp
59,278
no_license
#include "pch_script.h" #include "actor.h" #include "Actor_Flags.h" #include "inventory.h" #include "xrserver_objects_alife_monsters.h" #include "xrServer.h" #include "CameraLook.h" #include "CameraFirstEye.h" #include "ActorEffector.h" #include "PHWorld.h" #include "level.h" #include "xr_level_control...
d011bd8cf0da9cc97bb0e4fc4c7e8d7caceac09d
0171b5c915edc561547f2e2bec92a98016e5e509
apfeltee/bits
/src/procs/disabled/entropy.cpp
C++
cpp
5,244
permissive
/* * idea: count whole strings! * problem: how to create a map + iterate over a stream AND find/select phrases. * needs a proper algorithm. */ #include <cctype> #include "private.h" namespace Bits { struct Options { std::size_t mincount = 0; bool wantwords = false; bool ignorenull = f...
6731875c2654b7469087697d62b6c9dbad7bb620
2c46285133c01a408c6352b8f1d48cadb62b1b3d
camendola/RateStudies
/MakePlotsOff.cpp
C++
cpp
19,356
no_license
#include <sstream> #include <fstream> #include <map> #include <iostream> #include <fstream> #include <utility> #include <tuple> #include <vector> #include <algorithm> #include "TCanvas.h" #include "TLorentzVector.h" #include "TH1D.h" #include "TH2D.h" #include "TH3D.h" #include "TTree.h" #include "TFile.h" #include "TC...
7ea1a5de8850dd717e4b3fd86a5300e257a6ed3a
509e138b625e1288719b7a5d7ae9eedb9bd1c6a6
Nezz7/Competitive-programming
/Codeforces/#649 (Div. 2)/C.cpp
C++
cpp
1,266
no_license
#include <bits/stdc++.h> #define endl '\n' #define LL long long #define LD long double #define pb push_back #define sz(a) (int)a.size() #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define debug(x) cerr << #x << " is " << x << endl; using namespace std; int const MAXN = 2e6 + 9; int a[MAXN],b[MA...
0935fe5c74f4ea98d4f73a850afe35980ee9b2d3
d76332e2efa15214a094ca96ce2412765e29f50e
Symom-Hossain-Shohan/CP_from_windows
/B_Max_and_Mex.cpp
C++
cpp
2,667
no_license
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; //defines... #define ll long long #define boost ios_base::sync_with_stdio(false);cin.tie(NULL); #define pb push_back #define mp mak...
5a0d5be16b4fb70583e58e1adccdc294626b5f36
0e79765e7ef04fcfa321b3d4426fb0eaff9dc570
joway/fbthrift
/thrift/compiler/test/fixtures/stream/gen-cpp2/module_constants.cpp
C++
cpp
305
permissive
/** * Autogenerated by Thrift for src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #include "thrift/compiler/test/fixtures/stream/gen-cpp2/module_constants.h" #include <thrift/lib/cpp2/gen/module_constants_cpp.h> namespace cpp2 { } // cpp2
28558cb806947f1fba7b94591ea3756abae96742
077ce0d974ff22df82c5317270abca1ef2de8cf5
jackiezc086/my_algorithm_problem_solveset
/PAT_advanced_level/PAT_1150.cpp
C++
cpp
2,148
no_license
#include <iostream> using namespace std; int const N = 210; int const M = 20010; int const D = 2000000; int dist[N][N]; int visited[N]; int main(){ int n,m; cin >> n >> m; for (int i = 0; i < N; i ++){ for (int j = 0; j < N; j ++){ dist[i][j] = D; } } for (int i = 1; i <...
c45a18907282f3317d1cc2f92c669ce9cae5d49a
d0833362b39a66f06e709d35d5f4ec720369fb20
CBLdev123/CBSLCoin
/src/txmempool.cpp
C++
cpp
26,615
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2016-2017 The PIVX developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "txmempool.h" #include "clien...
97f3367cfa920b0113b6db0a134818eb32df40b3
0ea9c6695c652fd1507b0e7070279f749a7ae12e
leo0519/cpp-primer
/chapter9/1/1.cpp
C++
cpp
208
no_license
#include <iostream> #include "golf.h" int main() { golf ann; setgolf(ann, "Ann Birdfree", 24); showgolf(ann); golf andy; setgolf(andy); showgolf(andy); handicap(ann, 48); showgolf(ann); return 0; }
73cf905988a9e00cf979bfdcd61f7694fde1bc34
72aecb594ff5aa34f7b5d392aba683ca881bb5c8
BGCX067/faint-graphics-editor-svn-to-git
/branches/vc15/formats/bmp/file-bmp.hh
C++
hh
1,025
permissive
// -*- coding: us-ascii-unix -*- // Copyright 2014 Lukas Kemmer // // Licensed under the Apache License, Version 2.0 (the "License"); you // may not use this file except in compliance with the License. You // may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by a...
5a8af7955e119083ec7b5cff7a3a012006fcd0b2
54e8e1a0e97ab5226b65b8a8fa11534576b82291
lineCode/UE4_BattleTank
/Source/UE4_BattleTank/Private/Online/BattleTankGameModeBase.cpp
C++
cpp
11,803
no_license
// Copyright 2018 - 2021 Stuart McDonald. #include "BattleTankGameModeBase.h" #include "UObject/ConstructorHelpers.h" #include "Engine/World.h" #include "EngineUtils.h" #include "TimerManager.h" #include "Kismet/GameplayStatics.h" #include "BattleTankGameState.h" #include "TankPlayerState.h" #include "GameFramework/P...
ca1c277526455d82c3a687d57f1ee0f9010c3859
091e44bdf7e3987e314b4f4a815adff408e34f18
captaintino/project-destiny
/Asteroids+Aliens/clientwindow.cpp
C++
cpp
5,369
no_license
#include "clientwindow.h" #include "ui_clientwindow.h" #include <QDebug> #include<mainwindow.h> ClientWindow::ClientWindow(QWidget *main, QWidget *parent) : QWidget(parent), ui(new Ui::ClientWindow), userName("Player"), mainwindow(main) { ui->setupUi(this); } ClientWindow::~ClientWindow() { de...
cb3e421c47bfbe24a2c88338dc454ecb016304cc
ab94957ddeedd46b9d11f73b175e7ae86ea2fc9d
Anzsley/My_Juliet_Test_Suite_v1.3_for_C_Cpp
/C/testcases/CWE127_Buffer_Underread/s03/CWE127_Buffer_Underread__new_char_ncpy_82a.cpp
C++
cpp
2,565
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE127_Buffer_Underread__new_char_ncpy_82a.cpp Label Definition File: CWE127_Buffer_Underread__new.label.xml Template File: sources-sink-82a.tmpl.cpp */ /* * @description * CWE: 127 Buffer Under-read * BadSource: Set data pointer to before the allocated memory buffer *...
1fc5a4a71b91cf8b3271ba2745a5b5e705749034
fab3c430ff2cba528b08bc859c9af66664be8fe8
Xilinx/Vitis_Libraries
/quantitative_finance/L2/tests/GarmanKohlhagenEngine/src/host/gk_test.cpp
C++
cpp
16,117
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...
5afae02d5f4a229facc4b5b05a8281edd87afbd2
5e84b372c9e72e72fdb51b7e68cdbcbca6f112d6
vibhoraggarwal/icub-firmware
/emBODY/eBcode/arch-arm/embot/app/embot_app_theCANboardInfo.cpp
C++
cpp
7,731
no_license
/* * Copyright (C) 2017 iCub Facility - Istituto Italiano di Tecnologia * Author: Marco Accame * email: marco.accame@iit.it * website: www.robotcub.org * Permission is granted to copy, distribute, and/or modify this program * under the terms of the GNU General Public License, version 2 or any * later version ...
5e932bbd887cbc0e6281158e1e1b3af7e2cbfdcc
0eb0b109149c5d1db84402ec03e3ded1e078c7b5
wdjpng/soi
/Old 2P/uniquecoding/main.cpp
C++
cpp
1,548
permissive
#include <iostream> #include <vector> #include <math.h> #include <limits> #include <algorithm> #define int long long using namespace std; signed main() { int n, m, k; cin >> n >> m >> k; cin.tie(0); ios_base::sync_with_stdio(false); string message; cin >> message; vector<string>possib...
4a96a753326413f70410744a61cf9f1a356ce298
81192c0458d093ce26dd386fc553fba8c6bfd3bc
ToyamaLab/NewSSQL
/lib/site-library/BH/include/boost/numeric/ublas/vector_expression.hpp
C++
hpp
67,083
no_license
// // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // // 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) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing t...
beb4893966afa2731f931e41862260d1ff050de5
8a121f0270f53f07f63b510ddf7f26b25ba1a709
laviniameds/CP
/studying/#special_cases/UVa-11236/11236.cpp
C++
cpp
1,401
no_license
#include <iostream> using namespace std; int main(){ int d, p, s; for (int a = 0; a+a+a+a <= 2000; a++) for (int b = a; a+b+b+b <= 2000; b++) for (int c = b; a+b+c+c <= 2000; c++) { p = (long long)a*b*c; if (p <= 1000000) continue; s = (a+b+...
90dacee690b080748732a3f38acfb74a4e151d80
b3c289c87ee7326912c9311b06a1cfb512f40a71
blaise-ian/COBot
/CO/Client.cpp
C++
cpp
14,423
no_license
#include "Client.h" #include <math.h> #include <sstream> #include <string> using namespace std; using namespace CO; void CClient::_DiceKingRole(void* sender, void** params) { //int d1 = (int)(params[0]); //int d2 = (int)(params[1]); //int d3 = (int)(params[2]); //ostringstream os; //os << "DiceKin...
4673cb4c1e8ee8e6aeface3d76b50802aac963ca
18d0b286ec3a22a987f5dbdae58e190d4f05b7ad
joaomlneto/unstickymem
/include/unstickymem/PerformanceCounters.hpp
C++
hpp
1,204
no_license
#ifndef UNSTICKYMEM_HARDWARE_EVENTS #define UNSTICKYMEM_HARDWARE_EVENTS #include <cstdint> namespace unstickymem { void initialize_likwid(); // checks performance counters and computes stalls per second since last call double get_stall_rate(); // via joao barreto's lib double get_stall_rate_v2(); // via Like I K...
ff60ba15ccd64cbc4bd56c9ef44b97d73d7b0093
dd4cf2930d9c816b02345dae539c23cfe5192b61
folm/Version-2
/src/qt/walletframe.cpp
C++
cpp
5,624
permissive
// Copyright (c) 2011-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 <qt/walletframe.h> #include <qt/folmgui.h> #include <qt/walletview.h> #include <cassert> #include <cstdio> #inclu...
47169ef5ae7ffd157ccf9dc428a749eac0edd380
1ffb67b85de9a888e4ac3ceeee67b57a124c0812
himanshu7500/Hacktoberfest2021-3
/prims.cpp
C++
cpp
1,235
no_license
#include<bits/stdc++.h> using namespace std; void primsAlgorithm(int **G, int v){ int selected[v]; memset(selected, false, sizeof(selected)); selected[0] = true; int x,y, no_edge = 0; cout << "Edge : Weight"<<endl; while (no_edge < v - 1){ int min = INT_MAX; x...
fb7d9bb76be61491ff6006063ac746d76420dfa8
efab296d577a9bc70eb4219697138f87f614dd3f
taroyabuki/cppbook2
/samples/06/06-matrix.cpp
C++
cpp
656
no_license
#include <iostream> #include <vector> using namespace std; int main() { vector<vector<int>> v{ {1, 2, 3}, {4, 5, 6 } }; cout << v.size() << endl; //出力値:2(行数) cout << v[0].size() << endl;//出力値:3(列数) cout << v[1][2] << endl; //出力値:6(1行2列あるいは1, 2成分) for (size_t i = 0; i < v.size(); ++i) { for (size_...
22c3d2c2e9aa05dca7e7bc86d638e8ad73071bdb
8b566a3bf37c59910b53aaaf29cb6ea5995d572b
ApocalypseDesign/ad_public
/Demos/CubicEntropia/Engines/Raytracing/rayt_utilsscript.cpp
C++
cpp
7,828
permissive
#include <windows.h> #include <stdio.h> #include <io.h> #include <string.h> #include "..\utilsscript.h" #include "rayt_utilsscript.h" #include "..\..\utility.h" #include "..\..\Math\fastmath.h" extern HWND miawin; // finestra principale; usata qui per le debug_error // ---------------------------------------...
cfcd47ada9bc6b11158d77ce15daec696dcd16f3
e762da2ee96bef5a6b076f7643563cdff68bc599
FFMG/myoddweb.piger
/myodd/boost/libs/asio/doc/html/boost_asio/example/cpp03/http/server/server.hpp
C++
hpp
1,840
permissive
// // server.hpp // ~~~~~~~~~~ // // Copyright (c) 2003-2016 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 HTTP_SERVER_HPP #define HTTP_SERVER_HPP...
2104648391dc9a431fa6cbb0b49370ffeb66ace3
3d25d8298ff176a308aef0494216e7ae8c3d22dc
portsip/resiprocate
/resip/recon/SipXMediaInterface.hxx
C++
hxx
5,444
permissive
#if !defined(SipXMediaInterface_hxx) #define SipXMediaInterface_hxx #if (_MSC_VER >= 1600) #include <stdint.h> // Use Visual Studio's stdint.h #define _MSC_STDINT_H_ // This define will ensure that stdint.h in sipXport tree is not used #endif #include <os/OsMsgDispatcher.h> #include <CpTopologyGraphIn...
d956c6edb4149b96a076055b8f2996762b6030dc
4729c81133b0466c0112861f171a231be5119b4e
infancy/Granite
/renderer/ground.cpp
C++
cpp
16,904
permissive
/* Copyright (c) 2017-2019 Hans-Kristian Arntzen * * 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, me...
a73b0ae4eeee9bb35923a9c81b2c33f2c4cdae5f
081aad645a2d727502422ebf0c341dc7a570de5b
pperle/self-driving-car-nd
/term-2/P1-Extended-Kalman-Filter/src/FusionEKF.cpp
C++
cpp
5,325
no_license
#include "FusionEKF.h" #include <iostream> using namespace std; using Eigen::MatrixXd; using Eigen::VectorXd; using std::vector; /* * Constructor. */ FusionEKF::FusionEKF() { is_initialized_ = false; previous_timestamp_ = 0; // initializing matrices R_laser_ = MatrixXd(2, 2); R_radar_ = Matrix...
f6fbadc3d4ed879e9d4ba493f953aaf7eab53d6c
ab3cdac29d9bf23ce61b0e52604f56b3a3d75a7e
suraj1611/Competitive_Programming
/CP-Codes/altaray.cpp
C++
cpp
1,363
no_license
/* Code by : Suraj (@suraj1611) */ #include<bits/stdc++.h> #include <string> using namespace std; #define ll long long int #define rep(i,n) for(int i=0; i<n; i++) #define rep1(i,n) for(int i=1;i<=n;i++) #define mx INT_MAX #define mn INT_MIN #define md 1000000007 #define pb push_back #define mp make_pair #define pf p...
106eea1b7ed488c7123597cbfe89aa39a3ea2c81
7703f728756807c5671ae3edda0dca54e2cc12a2
Tiem51/Lab_Artificial_Intelligence
/homework2/src/transformer.cpp
C++
cpp
1,415
no_license
#include "ros/ros.h" #include "std_msgs/String.h" #include "tf/transform_listener.h" #include "sensor_msgs/LaserScan.h" ros::Publisher pub void callback(const sensor_msgs::LaserScan::ConstPtr&, tf::TransformListener* listener) { tf::StampedTransform transform; try{ ros::Time t = ros::Time::now(); l...
9760243bd58ff45b2c0835e40c6d23eb032395c3
19e31f6fcd39289a75205c9cd226d3890f9c3a1b
ymei/G4QSim
/src/PrimaryGeneratorAction.cc
C++
cc
2,557
no_license
#include "PrimaryGeneratorAction.hh" #include "G4Event.hh" #include "G4GeneralParticleSource.hh" #include "G4ParticleTable.hh" #include "G4ParticleDefinition.hh" #include "G4IonTable.hh" #include "G4Geantino.hh" #include "G4SystemOfUnits.hh" #include "Randomize.hh" #include "ParticleSource.hh" //....oooOO0OOooo........
c5eef27225b02fd4fead91f9b5dfe2209f18b81e
fc0ea828ec4b944676f6cb0228c10cac9159cd14
cacauvicosa/inf351_2019
/trabalhos/t3/Arthur/simulador/maze/maze.cpp
C++
cpp
8,520
no_license
#include "../fx.cpp" #define LED_PIN 1 #define ROWS 12 #define COLS 12 #define LED_COUNT 144 #define UP 7 #define DOWN 6 #define LEFT 5 #define RIGHT 4 #define CENTER 3 int map_px ( int l, int c ) { return l * COLS + ((l % 2)?COLS-c-1:c); } Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); int ...
5b41f131411c856efefe5988cec9523188e66bae
8d4bc1891f034158079fa7edc72f74d7d3c62cc8
godotengine/godot
/servers/audio/effects/audio_effect_eq.cpp
C++
cpp
5,164
permissive
/**************************************************************************/ /* audio_effect_eq.cpp */ /**************************************************************************/ /* This file is part of: */ /* ...
20f63689e375b63f3ea04fbfbde5750341b5583b
dd903f1b3be75f24a52dd0ef80dd98779b087a7a
kodeepic/Belajar_Git
/ayocobakterus/main.cpp
C++
cpp
218
no_license
#include "mainwindow.h" #include <QApplication> #include <iostream> #include <stdio.h> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
2e32691a61d27d622f873ecd81019c347011ffa1
4a10ce1999e0aa8800a48d3e9ce3d153f877f540
Striz-lab/c-2sem
/3/2.cpp
C++
cpp
412
no_license
#include <iostream> #include <string> using std::cin; using std::cout; using std::endl; int main(){ int n, number, k = 0, s = 0, i; cin>>n; int *p = new int[n]; for (i = 1; i <= n; i++){ cin >> number; p[i] = number; s = s + number; } for (i = 1; i <= n; i++){ if...
6309f1c1f253efec56977e937473af6de4bec6a0
b4b2490a359321b134acc2814eec01e2f00a9463
ytchhh/project
/synctool/code/ut/utarguments.cpp
C++
cpp
969
no_license
#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <fstream> #include <iostream> using namespace std; int main(int argc, char** argv) { int flags, opt; int nsecs, tfnd; string machines; nsecs = 0; ...
42c66a23a47a6699e521f28d0342dd2171cb7692
baaa1a078552cf7ecf25b2bbe290fef076e2b819
ild-games/Ancona
/Engine/Src/Ancona/Core2D/Systems/Collision/CollisionSystem.hpp
C++
hpp
5,763
permissive
#ifndef Ancona_Engine_Core_Systems_Collision_CollisionSystem_H_ #define Ancona_Engine_Core_Systems_Collision_CollisionSystem_H_ #include <functional> #include <vector> #include <Ancona/Core2D/Systems/Position/PositionSystem.hpp> #include <Ancona/Framework/EntityFramework/UnorderedSystem.hpp> #include <Ancona/Util/Dat...
9d960ead71de7227e1bc99946601bd9f8412cc47
5932e5fb7180f17a2a898e378713b2d23c6da4f9
MonkeyFirst/Urho3DFlowGraph
/OldCppTest/Game.cpp
C++
cpp
5,633
permissive
#include <Urho3D/Urho3DAll.h> #include "FlowGraph.h" #include "CameraControllerFlowNode.h" #include "CubeCreatorFlowNode.h" #include "StarterFlowNode.h" class Game : public Application { URHO3D_OBJECT(Game, Application); public: SharedPtr<Scene> scene_; WeakPtr<Node> cameraNode_; float yaw_ = 0.0f; ...
7fffe6b456a2a878c86c91fb381355a05b70d534
8d3259a0caeafbc7096ff7f83cec90895f0f4ce4
kimsama/tcod-rogue
/Grid.cpp
C++
cpp
1,110
no_license
#include "Grid.h" #include "random.h" const int Room::MINLEN = 4; Room::Room(unsigned int l, unsigned int r, unsigned int u, unsigned int d) { left = l; right = r; up = u; down = d; } Room::Room( const Room& other ) { left = other.left; right = other.right; up = other.up; down = other.down; } #inc...
a850a5c7ee0489bf0862666d98a86e2fc4c783cb
93a2e1744ec091542356e2558c28bd85c04fd3c1
merde-libertas/merdecoin
/merdecoin-v0.01/src/bench/bench_merdecoin.cpp
C++
cpp
4,103
permissive
// Copyright (c) 2015-2018 The Merdecoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <bench/bench.h> #include <crypto/sha256.h> #include <key.h> #include <util/system.h> #include <util/strencodings....
cca7e10f8097a8c419115e57cdb5a5a3d7f7553e
8222ba3ce1afc162c3ba689ac3f5dcb9865c23bc
RussDHill/hfdp-cpp
/HeadFirstDesignPatterns/State/GumballState/GumballMachineTestDrive.cpp
C++
cpp
619
no_license
// GumballMachineTestDrive.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "GumballMachine.h" int main(int argc, char* argv[]) { shared_ptr<GumballMachine> gumballMachine(new GumballMachine(5)); gumballMachine->initialise(); printf(gumballMachine->toString().c_str()); ...
55a7f26aa6cde75b1a2906a2276fdfba923441cb
e2b24827ba8eae0db82655a2eb31596320ab5a80
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-servicecatalog/source/model/CloudWatchDashboard.cpp
C++
cpp
1,016
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/servicecatalog/model/CloudWatchDashboard.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace ...
3e9b1d253aa37506cd8b95de0a75ed31eb01f38f
f9ce4da4daa12dcbc286b75724cea01c6e4d84cb
riba2534/My_ACM_Code
/FZU/2271/9728970_AC_390ms_404kB.cpp
C++
cpp
1,815
no_license
#include <cstdio> #include <cstring> #include <string> #include <set> #include <iostream> #include <cmath> #include <stack> #include <queue> #include <vector> #include <algorithm> #define mem(a,b) memset(a,b,sizeof(a)) #define inf 0x3f3f3f3f #define mod 10000007 #define debug() puts("what the...
3914ff139a67761b3acf76c4d5b808ab3074753a
b40efe11e12b84fbecb54b143b7ea15f08f6f184
liuhuoer/AlgorithmNotes
/PAT/1905/22/A1057_2.cpp
C++
cpp
1,597
no_license
#include <cstdio> #include <stack> #include <cstring> using namespace std; const int MAXN = 100010; #define lowbit(i) ((i) & (-i)) stack<int> st; int C[MAXN], A[MAXN]; void update(int x, int v) { for(int i = x; i <= MAXN; i += lowbit(i)) { C[i] += v; } } int getSum(int x) { int sum = 0; ...
196abee98ee831f4f6e7796f812bd7c65db06a36
a729212b2cc19b93c5a857b27ad90d9812273ce4
test2pp2/TestServer
/Network/Session.cpp
C++
cpp
2,729
no_license
#include "stdafx.h" #include "Session.h" #include "Server.h" namespace Network { BaseSession::BaseSession(tcp::socket socket) : ws_(std::move(socket)), strand_(ws_.get_executor()) { } BaseSession::~BaseSession() { BOOST_LOG_SEV(LOG_NETWORK, debug) << "dtor BaseSession called"; } void BaseSession::Run() { ws_.as...
fd68161042aaf0719626b7406733681c83ae9cdd
42dc05136afd00483b42c89a5330d11abd4e884b
niuxu18/logTracker-old
/second/download/mutt/gumtree/mutt_repos_function_457_mutt-1.4.2.3.cpp
C++
cpp
243
no_license
static int mutt_sasl_conn_open (CONNECTION* conn) { SASL_DATA* sasldata; int rc; sasldata = (SASL_DATA*) conn->sockdata; conn->sockdata = sasldata->sockdata; rc = (sasldata->open) (conn); conn->sockdata = sasldata; return rc; }
2c118110b6ff059a50c565db888d40f40e9437c5
3557c9de07f4bf1d6bb0b697d29761c117cabb9d
wushangshikongyonghengdazizai/okteta
/kasten/controllers/view/structures/datatypes/primitive/bitfield/abstractbitfielddatainformation.cpp
C++
cpp
3,862
no_license
/* This file is part of the Okteta Kasten Framework, made within the KDE community. SPDX-FileCopyrightText: 2010 Alex Richardson <alex.richardson@gmx.de> SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ #include "abstractbitfielddatainformation.hpp" #include <KL...
9341b66b7cfd0d511849dc036ef67f9166b87bd6
237ef0331733c5939517a05a6b94daa5a4c883c9
salavay/algorithms_labs
/11/E.cpp
C++
cpp
3,473
no_license
#include "bits/stdc++.h" using namespace std; typedef long long ll; struct edge { int from; int to; ll c; ll fl; int rev; int id; }; int n, m; int s, t; const ll INF = 1e14; const int MAXN = 510; vector<edge> g[MAXN]; int q[MAXN], d[MAXN], ptr[MAXN]; ll dfs(int v, ll flow) { if (!flow) { return ...
16e55781a5bb13d6e45bdc7c6a9a68da4d56f7d1
9fe3b4f1ea10eb418adbc2e59a35c956b04e9229
jasking/connextdds-py
/modules/connextdds/src/rti/core/policy/DataWriterResourceLimits.cpp
C++
cpp
17,907
no_license
/* * (c) 2020 Copyright, Real-Time Innovations, Inc. All rights reserved. * * RTI grants Licensee a license to use, modify, compile, and create derivative * works of the Software solely for use with RTI products. The Software is * provided "as is", with no warranty of any type, including any warranty for * fitn...
6a1eba2ba860a3db33fe1aaccce4f9f0b8ef848e
a6944929adbef87da1440e693314e7e91305823f
WangYue0118/securelinks-iec61499
/SlibCrypto Forte implementation/LightWeight/libhydrogen/HydroSignVerify.cpp
C++
cpp
3,412
no_license
/************************************************************************* *** FORTE Library Element *** *** This file was generated using the 4DIAC FORTE Export Filter V1.0.x! *** *** Name: HydroSignVerify *** Description: Service Interface Function Block Type *** Version: *** 1.0: *********************...
44cb239354eb2ef6d8e5cd4a503268d0ba43cd17
b7b3cd27d270ddc238e423c086939962734f9e36
shaurysrivastav27/questions-solved
/CODEFORCES/662_B.cpp
C++
cpp
354
no_license
for _ in range(0,int(input())): li1=input() li=li1.split() n=int(li[0]) m=int(li[1]) a=[] for k in range(0,n): s=input() x=list(s) a.append(x) l=0 for i in range(0,n): if(a[i][m-1]=='R'): l=l+1 for j in range(0,m): if(a[n-1][j]=='D'...
5d7fd1e5371ee39969037b57cef57aa70fdf62c6
3e1026f8de42dfc781400a41598a9cd6bdc1b18b
decentralway/decentralway
/src/qt/editaddressdialog.cpp
C++
cpp
4,251
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "editaddressdialog.h" #...
1be3e0389b45010e98b84f3e5e40819dff163e2c
b8c562ff3224c8fc86283d6f556cdb305d2731d2
alexandraback/datacollection
/solutions_5753053697277952_1/C++/merc90/cj1.cpp
C++
cpp
1,475
no_license
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstd...
fc29d6f3787d2cc4bcff9014cd331c6de390d329
52caf544f6239c8ba3153fd3c28aa115ac257959
wesmc7777/DirectX-Graphics-Samples
/Samples/Desktop/D3D12LinkedGpus/src/LinkedGpusAffinity/D3D12LinkedGpusAffinity.cpp
C++
cpp
40,925
permissive
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICUL...