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
f919bcc5980a7f2beb56b0d49ead7d7a5c089d6a
92a5f7c7594dedf57345d47c86407b57d0c550cd
Simon-chevolleau/cppLearning
/zesteDeSavoir/table/oddCorrection.cpp
C++
cpp
735
no_license
#include <iostream> #include <vector> int main() { std::vector<int> const entiers{ 5, -2, 74, 455, -12, 10, 11 }; std::vector<int> pairs {}; std::vector<int> impairs {}; for (auto const entier : entiers) { if (entier % 2 == 0) { pairs.push_back(entier); } ...
60c2ad1233eb02f255e6126f97df4ca94ce78558
43e8127e2d0aa54f66fae2cc3e2d6e893c9a0c17
3378950/ADT
/sort/lamda.cpp
C++
cpp
448
no_license
#include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; int n; vector<string> v; int main() { cin >> n; for(int i = 0; i < n; i++) { string s; cin >> s; v.push_back(s); } // sort based the length of each string sort(v.begin(), v.end(), [&...
365a48a3a42da42c5a0fe282f4d22e1ed01248c3
69ef1e86a5de0f163ebfdd5fd303bab37297721a
yrnkrn/zapcc
/lib/Support/Program.cpp
C++
cpp
2,685
permissive
//===-- Program.cpp - Implement OS Program Concept --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------...
af1f255746fca3da7c822c5d5e4a672f3746d421
af510b665f9a0e453c69dfcdf9220282bacc00c4
akhikolla/testpackages
/fuzzedpackages/multinet/src/src/layout/circular.hpp
C++
hpp
337
no_license
#ifndef UU_LAYOUT_CIRCULAR_H_ #define UU_LAYOUT_CIRCULAR_H_ #include <map> #include "layout/XYZCoordinates.hpp" namespace uu { namespace net { template <typename M> std::map<std::pair<const Vertex*, const typename M::layer_type*>,XYZCoordinates> circular( const M* mnet, double radius ); } } #include "circu...
df4d2caa3ac831d603a7fd36b8e79a95e2beeca5
f362292abb8a693eab0447265fcfc14381e3e03f
cms-externals/boost
/libs/log/test/run/form_named_scope.cpp
C++
cpp
27,159
permissive
/* * Copyright Andrey Semashev 2007 - 2014. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ /*! * \file form_named_scope.cpp * \author Andrey Semashev * \date 07.02.2009 * * \br...
9b8a1a17cbc8523b17382dd9a9881a07759496c3
cd85b3e25880dff8335e11269d15c50c0177b06e
The-Griffin-White/MyCentipedeProject
/GitHub Centipede/MyCentipede/Game Components/Ship.cpp
C++
cpp
2,248
no_license
// Ship #include "Ship.h" #include "BulletFactory.h" #include "Mushroom.h" #include "PlayerExplosionFactory.h" #include "Controller.h" #include "Player\PlayerManager.h" #include "PlayerMushroomCollision.h" Ship::Ship() { bitmap = ResourceManager::GetTextureBitmap("Blaster"); MainSprite = AnimatedSprite( Resource...
dba388d4c0a8bfbdd99c9f254d92949ce9ebc2b1
2eec6f100e109e79582104a72a590271eb642b0b
NgaAdrain/Adrain_Code_History
/School/2019/File Structure/filestructure2019-extendiblehashing-codingexam/filestructure2019-extendiblehashing-codingexam-NgaAdrain-master/bucket.cpp
C++
cpp
3,997
no_license
// bucket.cpp #include "bucket.h" #include "direct.h" #include "hash.h" Bucket::Bucket(Directory & dir, int maxKeys) // constructor :TextIndex(maxKeys), Dir(dir) { BucketAddr = 0; Depth = 0; } int Bucket::Insert(char * key, int recAddr) { if (NumKeys < MaxKeys) { int result = TextIndex::Insert(key, recAddr); ...
bf4be3ecb303b505875a30441c4073a39aec528f
510a8504bc0647d51f4a47ddb1f7b5c22f2b71c4
KDE/mailcommon
/src/filter/autotests/filterimporterpathcachetest.cpp
C++
cpp
2,288
permissive
/* SPDX-FileCopyrightText: 2017-2023 Laurent Montel <montel@kde.org> SPDX-License-Identifier: GPL-2.0-only */ #include "filterimporterpathcachetest.h" #include "../filterimporterpathcache.h" #include <Akonadi/Collection> #include <QTest> QTEST_MAIN(FilterImporterPathCacheTest) FilterImporterPathCacheTest::Filte...
5cc0e645cb2a10ee54fbf08bb352d5a156d111de
7c7a2e57273011254acbf74108ff937d9abf984f
GXNU-luofeng/MFC
/选择一个文件并在客户区显示/选择一个文件并在客户区显示/MainFrm.cpp
C++
cpp
1,978
no_license
// MainFrm.cpp : CMainFrame 类的实现 // #include "stdafx.h" #include "选择一个文件并在客户区显示.h" #include "MainFrm.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CMainFrame IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd) const int iMaxUserToolbars = 10; const UINT uiFirstUserToolBarId = AFX_IDW_CONTROLBAR_FIRST + 40; const UINT...
f6a14948eb9dcee2688bc5464d19c1ce3627b0e6
425b49c73fbce630c73f25f8e52db31b7d087569
T-Maxxx/mmeasureunit
/include/mmu/area.hpp
C++
hpp
4,674
permissive
#pragma once #include "measure_units.hpp" namespace mu::area { namespace detail { struct area {}; template<class Ratio = std::ratio<1, 1>> using unit = ::mu::detail::unit<area, double, Ratio>; inline constexpr auto cmRatioD = 10'000; using cmRatio = std::ratio<1, cmRa...
5ed459de1111a64d19e2f71ddb5d5c46f780eb71
c581ba5a93ab8e4817914f971c565f6417db58e0
woojooc/mariooutlet
/Source/mariooutlet/Private/EnemyBackZone.cpp
C++
cpp
750
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "EnemyBackZone.h" #include <Components/StaticMeshComponent.h> #include "CPP_GameModeBase.h" #include "EnemyA.h" // Sets default values AEnemyBackZone::AEnemyBackZone() { // Set this actor to call Tick() every frame. You can tur...
c5c07da3e4ab451f87ac455f321105f56b6c1693
c801824514295210669475791120b50d83d3ddc4
Hankyin/game_structure
/game_plane/enemy.cpp
C++
cpp
1,270
no_license
#include "enemy.h" #include "QDebug" #include "QTime" Enemy::Enemy(int id, Scene *scene) :GItem(scene) { this->id = id; this->posX = getRand(10,350); this->posY = -getRand(10,100); this->speedX = 0; this->speedY = getRand(2,6); pixList.append(new QPixmap(":/res/res/enemy1.png")); pixList...
44adadd96d38530c8b8adada534a8ede1d6eb29b
bccf0e408c6e9ed7449e187794431b1da2f547be
oniatsu/Karabiner
/Tests/kext/FromEvent/test.cpp
C++
cpp
7,602
no_license
#include <ostream> #include <gtest/gtest.h> #include "FromEvent.hpp" #include "KeyCodeModifierFlagPairs.hpp" using namespace org_pqrs_Karabiner; ParamsUnion* down_return; ParamsUnion* up_return; ParamsUnion* down_shift; ParamsUnion* up_shift; TEST(Generic, setUp) { KeyCodeModifierFlagPairs::clearVirtualModifiers()...
dbf402126428356924b7cc41c7198ac2f924e735
0036326137a2c0a261ddf268003cfea6c889b3f9
niuxu18/logTracker-old
/second/download/git/gumtree/git_patch_hunk_230.cpp
C++
cpp
1,390
no_license
end_url_with_slash(&url, remote->url[0]); } http_init(remote, url.buf, 0); do { + const char *arg; + if (strbuf_getline(&buf, stdin, '\n') == EOF) { if (ferror(stdin)) - fprintf(stderr, "Error reading command stream\n"); - else - fprintf(stderr, "Unexpected end of command stream\n"); + e...
ea9fa7f93707dfd48890c530c36ef13bc61de388
b371058f1d89051d2603e302cf76f4b12d8a2a3c
agnel-kurian/curve-project
/trunk/lab/cgafaq/cgafaqtest.cpp
C++
cpp
1,168
no_license
#include "cgafaq.h" #include <cstdio> #include <cmath> #include "gtest/gtest.h" using namespace cgafaq; TEST(CgaFaqTest, Intersection) { P2<double> a(0.0,0.0), b(100.0,100.0), c(0.0,100.0), d(100.0,0.0); double r, s; intersect(&r, &s, a, b, c, d); P2<double> ixn(a.x + (b.x - a.x) * r, a.y +...
200ef07dfc7b4805c1f26b93a1586b00f8ea861d
fbd6e92d3c2d298b5c7e94e075b2a50534aa0ccc
phvdat/dsa
/repos/ThucHanh/ThucHanh/stack_queue/stack.cpp
C++
cpp
4,983
no_license
#include <iostream> #include <stack> #include <string> #include <vector> #include <queue> #include <stdio.h> using namespace std; //============================================================ int baseballScore(string ops) { /*TODO*/ std::stack<int> sta; for (int i = 0; i < (int)ops.length(); i++) { ...
e506042ab8a627dcc4b0b101142060ba2d217a8b
b41078090bc8b594472beef32b83916111127ff2
haschmitt/iV-ART
/iV-ART/vart/source/xmlprinter.cpp
C++
cpp
1,408
no_license
/// \file xmlprinter.cpp /// \brief Implementation file for V-ART class "XmlPrinter". /// \version $Revision$ #ifdef VART_XML #include "vart/xmlprinter.h" #include "vart/scenenode.h" #include "vart/dof.h" using namespace std; ostream* VART::XmlPrinter::outputPtr = &cout; VART::XmlPrinter::XmlPrinter() { } void VA...
d522a29279907e21adfa849609b7518e6064cd30
deac3bd1e77b7b09d736632cbcda0e6179965d25
hoge-fuga-piyo/bundlerWithModernLibraries
/src/core/hash_key.hpp
C++
hpp
273
no_license
#ifndef HASH_KEY_HPP #define HASH_KEY_HPP #include <tuple> namespace std { template<> class hash<std::tuple<int, int>>{ public: size_t operator () (const std::tuple<int, int> &map) const { return std::get<0>(map)*std::get<1>(map); } }; } #endif
cc09772b92bb25d069fb8606b747a0c9eb07f5ef
5772ded467cffea2159d5bb09470f9d753827469
pfrancq/galilei
/plugins/langs/langno/frontend/qt/langno_qt.cpp
C++
cpp
2,026
no_license
/* GALILEI Research Project LangNO_Qt.cpp Norwegian language (Qt Part) - Implementation. Copyright 2001-2011 by the Snowball Project. Copyright 2001-2014 by Pascal Francq. Copyright 2001 by David Wartel. Copyright 2001-2008 by the Université Libre de Bruxelles (ULB). This library is free software; you can ...
aa4b1afaef25f724c404258e4999446aa610eda6
5a6c865aa9a2c556b1318ff1480301141112908d
Techlord-RCE/bap
/plugins/llvm/llvm_binary.hpp
C++
hpp
9,545
permissive
#ifndef LLVM_BINARY_HPP #define LLVM_BINARY_HPP #include <memory> #include <numeric> #include <vector> #include <algorithm> #include <iostream> #include <iomanip> #include <sstream> #include <llvm/Object/ELFObjectFile.h> #include <llvm/Object/COFF.h> #include <llvm/Object/MachO.h> #include <llvm/Object/Archive.h> #in...
5cfa554027f953d3c80f44948f8217abdf7f8604
4cedc10da4066156b77168bff53394644376542b
Lalo1017/Ejercicios_Club
/Project_Euler/number_spiral_diagonal.cpp
C++
cpp
308
no_license
#include <bits/stdc++.h> using namespace std; typedef long long int lli; int main(){ lli aux=0; for(int i=3; i<= 1001; i+=2){ lli cuadrado= i*i; aux+= cuadrado + (cuadrado - i + 1) + (cuadrado - 2*i + 2) + (cuadrado - 3*i + 3); } cout << ( aux +1) <<endl; return 0; }
9306fd15071147bdd3878b582ad2126e8859558e
8982f592221cf8b6640ca4ce5d54d9ca1012d304
rodrigobmg/directx-vs-templates
/d3d12game_uwp_cppwinrt_dr/DeviceResources.cpp
C++
cpp
23,755
permissive
// // DeviceResources.cpp - A wrapper for the Direct3D 12 device and swapchain // #include "pch.h" #include "DeviceResources.h" using namespace DirectX; using Microsoft::WRL::ComPtr; // Constants used to calculate screen rotations namespace ScreenRotation { // 0-degree Z-rotation static const XMFLOAT4X4 Ro...
1be2e72651a72b5ec5c9e8f6275629bfacb57bdc
57342e0a3277443865cb31d813f3ff0a13b24534
coldenheart/123
/cplusplus/level2_simple_inference/6_other/colorization_video/src/main.cpp
C++
cpp
3,037
permissive
/** * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law o...
19af844575709f92201ac9e4de5648b010c0b63c
e6298a0b510e4297e7636fc950eaffaabd3a6d11
chromium/chromium
/ui/base/resource/resource_bundle_auralinux.cc
C++
cc
406
permissive
// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/base/resource/resource_bundle.h" namespace ui { void ResourceBundle::LoadCommonResources() { LoadChromeResources(); } gfx::Image& ResourceBundle::GetNativeIma...
ed70f3a6efbd3d1fb2936b095ee29d776de25071
7951f8f3c939a4ebc0575d838548ab0faff93f62
davidmednikov/CS-161
/module 7/findMode.cpp
C++
cpp
5,343
no_license
/*************************************************************************** ** Author: David Mednikov ** Date: 11/07/2016 ** Description: This function takes an array and an integer (representing the ** size of the array), finds the most common numbers in the array (the modes), ** sorts the modes from least to greates...
a6552d5e062676fe24a20d71a7695b2e559803c8
6817f74a2d46f9cea1ee26547bdfc6adb61181cd
chaos7776/CarND-MPC-Project
/src/MPC.cpp
C++
cpp
8,863
no_license
#include "MPC.h" #include <cppad/cppad.hpp> #include <cppad/ipopt/solve.hpp> #include "Eigen-3.3/Eigen/Core" using CppAD::AD; // Timestep length and duration size_t N = 10; double dt = .1; // This value assumes the model presented in the classroom is used. // // It was obtained by measuring the radius formed by runn...
1e826aab0f204b8462d0adcdb85e849a80ae7042
5e8d185410410dedc3d2995bf5cdd93f85fa19b9
siloproduction/lispInterpreter
/symbolsList.cpp
C++
cpp
514
no_license
#include "symbolsList.h" SymbolsList::SymbolsList() {} SymbolsList::~SymbolsList() { for(unsigned int i(0); i < symbols.size(); ++i) { delete symbols[i]; symbols[i] = 0; } } void SymbolsList::push(Symbol * symbol) { symbols.push_back(symbol); } Symbol * SymbolsList::findSymbol(std::strin...
3d67e46bf9b8cbdc5427b6718cf50cd66632e106
882b05b822258154da7a6cd14c2cfdf8a94fd6ca
ldraw-linux/leocad
/common/lc_timelinewidget.cpp
C++
cpp
8,755
no_license
#include "lc_global.h" #include "lc_timelinewidget.h" #include "lc_model.h" #include "project.h" #include "piece.h" #include "pieceinf.h" #include "lc_mainwindow.h" lcTimelineWidget::lcTimelineWidget(QWidget* Parent) : QTreeWidget(Parent) { mIgnoreUpdates = false; setSelectionMode(QAbstractItemView::E...
5a20f5c07ba3d742da785351d840e7cd607881cc
f7b30cd0fa0b1b283f5fe9b0634a3aa1975ed5c8
AnnieDoDo/ChineseChess
/message.cpp
C++
cpp
573
no_license
#include "message.h" #include "ui_message.h" #include <iostream> using namespace std; message::message(QWidget *parent) : QWidget(parent), ui(new Ui::message) { ui->setupUi(this); setWindowTitle(QStringLiteral("END")); endgame=new QPushButton; endgame->setText(tr("This game is over")); end...
8e8cdcc3b1f19b9b3ce8de57be2234d61b91f181
321380aba5bd8ee6619f2fc4c3fea7876278adc4
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_5/Z6.0+dmb.sy+dmb.sy+po.c.cbmc.cpp
C++
cpp
39,932
no_license
// Global variabls: // 4:atom_2_X2_0:1 // 0:vars:3 // 3:atom_1_X0_1:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 5 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 5 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define m...
7f4795d5fa0030e80dbe87f6d9f91787124d7444
4627fbc35e17f98373421bca4e0720e838b341f6
richardjcy1/CP
/AtCoder/ABC181/D_S2.cpp
C++
cpp
1,230
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; const int mod = 1e9 + 7; /* multiple of 8 -> last three digits divisible by 8 enumerate last three digits from 0 to 1000 ATTENTION!!! if n >= 2 cannot choose < 10 if n >= 3 cannot choose < 100 then check frequency of each...
7846d941b688a4203eb761103d0b391478b68a75
d25f7ac2adc6a58a5d7759e429e73530035503a0
luk036/vtr-verilog-to-routing
/ODIN_II/SRC/Hashtable.cpp
C++
cpp
1,809
permissive
/* 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, distribute, sublicense, and/or sell copies of t...
92d544737becaec9c502420963d75a1292545f2e
5173836661b420903ede74cf76591e00e24a8e7b
jjthomas/phi-experiments
/random.cpp
C++
cpp
1,606
no_license
#include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <string.h> #include <assert.h> #include <sys/time.h> #include <vector> #include <algorithm> using namespace std; struct node { int data; node *next; }; int main(int argc, char **argv) { int SIZE = 100000000; int ITS = 1; vector<int> indic...
d526291bb1f82ab58e8783e0d8dc281e674bc09d
47ba65feab38879183e403bd924c426716332aa1
torikazi/Competitive-Programming
/Live Archive/3494.cpp
C++
cpp
2,210
no_license
#include<stdio.h> int main() { int t,k,m,d,y,tm,td,x; int a[]={0,31,30,31,30,31,30,31,31,30,31,30,31}; scanf("%d",&t); for(k=1;k<=t;k++) { scanf("%d/%d/%d %d/%d",&m,&d,&y,&tm,&td); printf("%d ",k); if ((!(y%4) && y%100 ) || !(y%400) ) { a[2]=29; } ...
f72f051870d7a83723b13b0598f7ee751c101f7d
ae83c4deaa1330b16032e88f96cc91f32c0702f5
gotomypc/AppEngine
/AppEngine/Engine/Math/AEPool.hpp
C++
hpp
590
no_license
// // AEPool.hpp // AppEngine // // Created by 韩琼 on 16/4/19. // Copyright © 2016年 Amaze. All rights reserved. // #ifndef AEPool_hpp #define AEPool_hpp #include <queue> #include <thread> #include "AEPlatform.hpp" typedef std::function<void()> AETask; class AEPool { protected: boolean stop; st...
53650ba2003eeeff3c828f12d06842059fd2709d
49998662c2226c6d5181ae74f6f9de67c769ed74
Sigm0oid/Algorithms-DataStructures
/Graph_Theory/C. Cycle/main.cpp
C++
cpp
1,383
no_license
#include <bits/stdc++.h> #include<string> #define GREY 1 #define WHITE 0 #define BLACK 2 using namespace std; typedef long long ll; typedef pair<ll,ll> ii; typedef vector<int> vi; typedef vector<ii> vii; vector<string> AdjMat; vector<vii> Adjlist; int n; vi parent,color; string res=""; bool ok=false; void detect_cyc...
07afb6e84868e5ba2e9badbabc675bd9b379885e
ddfff14fdcc8ff62ee004f49b69c897627de319e
opsway/reindexer
/cpp_src/core/index/indextext/indextext.cc
C++
cc
4,205
permissive
#include "indextext.h" #include <memory> #include "core/ft/filters/kblayout.h" #include "core/ft/filters/synonyms.h" #include "core/ft/filters/translit.h" #include "core/rdxcontext.h" #include "estl/smart_lock.h" #include "tools/errors.h" #include "tools/logger.h" namespace reindexer { // Available stemmers for lang...
5def38c90cd2022c70d6cf97134638c1908e47a7
f3bdecdd82d3b06cf2c8de689564d92f94e939f5
suriyadeepan/relay_plura
/src/C/frontier_based/node.cc
C++
cc
3,808
no_license
#include "node.h" #include "stdio.h" #include "stdlib.h" #include "math.h" #include "time.h" int nodeInit (struct node* n0, int node_id, int type,int pl){ n0->node_id = node_id; /* * Generate random values and assign to node positions */ // srand((int)time(NULL) + node_id); // srand( clock() ); // n0->x =...
b1a72ded9725210c120dcc9f3a25fe1b86efba1f
af5742f8785df1e6948a94409eb9fe8f513fbddc
namefreezers/coursera_cpp_course1
/week4/w4_t03_inversible_w_multiply/src/w4_t03_inversible_w_multiply.cpp
C++
cpp
2,095
no_license
#include <algorithm> #include <iostream> #include <map> #include <set> #include <string> #include <vector> using namespace std; class FunctionPart { public: FunctionPart(char new_op, double new_val) { op = new_op; val = new_val; } void Invert() { if (op == '+') { op = '-'; } else if (op == '-') { op ...
93c223c3842b3988ce615d3880305fae6589da92
6d8bfcdcbcca3b7f005e538c187826c267c99547
lokedhs/apl-sqlite
/Provider.hh
C++
hh
1,088
no_license
/* This file is part of GNU APL, a free implementation of the ISO/IEC Standard 13751, "Programming Language APL, Extended" Copyright (C) 2014 Elias Mårtenson This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
5929f61fe5b446f9a29ce79da36723fd7bc2b7fe
45f21c17ad44a37da815ae8297b4dbfdfae3faf6
ric2b/Vivaldi-browser
/chromium/chrome/browser/ui/android/android_about_app_info.cc
C++
cc
986
permissive
// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/android/android_about_app_info.h" #include <jni.h> #include "base/android/jni_android.h" #include "base/android/jni_string.h" #include "base/syste...
c77ee4067584d9c5de557b7cb3a60dd16d6a64e2
14af18cd66d5ffc2f5cbdd285a671d7c19349449
paloul/actor-framework
/libcaf_io/src/io/basp_broker.cpp
C++
cpp
23,702
permissive
/****************************************************************************** * ____ _ _____ * * / ___| / \ | ___| C++ * * | | / _ \ | |_ Actor * ...
2a7d14c4002e37a4365ddd115d7eb10346c6a997
ec65793f906ae6e2d6db60e165e70f0bb9bb1d72
ExpLife0011/openprocmon
/gui/propstack.cpp
C++
cpp
11,799
permissive
#include "stdafx.h" #include "resource.h" #include <psapi.h> #include <DbgHelp.h> #include "propstack.h" #pragma comment(lib, "dbghelp.lib") BOOL CProcessInfo::LookupSymbolByAddress( IN LPVOID lpAddress, OUT CString& strSymbol ) { ULONG_PTR imageLoadBase = 0; ULONG_PTR imageBase; ULONG_PTR Offset; // // get ...
260c149725f5ad637dafe43380e00fb1c981e437
619f33aa01259455365eb3d5a5aa41fb2f993a3b
hupenguestc/webkit
/Source/WebKitLegacy/win/WebFrame.cpp
C++
cpp
60,217
permissive
/* * Copyright (C) 2006-2009, 2011, 2013-2015 Apple Inc. All rights reserved. * Copyright (C) Research In Motion Limited 2009. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistrib...
cb84bb87c5746929b002cb03d798177e85b43816
b1c6a3d4aa80e9e3b5a500b094bcdd361f848615
xzrunner/renderlab
/source/NodePreview.cpp
C++
cpp
7,014
permissive
#include "renderlab/NodePreview.h" #include "renderlab/Node.h" #include "renderlab/RegistNodes.h" #include "renderlab/PinType.h" #include "renderlab/Evaluator.h" #include "renderlab/node/Preview.h" #include <blueprint/NodeHelper.h> #include <SM_Matrix2D.h> #include <unirender/Device.h> #include <unirender/Context.h> ...
e109ba739f2f37a07b1642c2d584c89118e36603
26d70a0fa0178cb94720cff636f0a197e1f3321d
Dgjtfgh/C-Qt-
/Qt/listwidget/dirmodel.cpp
C++
cpp
3,132
no_license
#include "dirmodel.h" #include <QHBoxLayout> #include <QPushButton> #include <QVBoxLayout> #include <QInputDialog> #include <QMessageBox> #include <QHeaderView> #include <QSplitter> #include <QFileSystemModel> #include <QDir> DirModel::DirModel() { model = new QFileSystemModel; // model = new QDirModel...
bd34a64f759598cd41065a8129ed6ae8ed12d541
c57969c0c337c7774e86effe97574849df6f36ab
15831944/PHStart
/Win32/NXOPEN/NXOpen/CAM_CylinderMillingBuilder.hxx
C++
hxx
10,463
no_license
#ifndef NXOpen_CAM_CYLINDERMILLINGBUILDER_HXX_INCLUDED #define NXOpen_CAM_CYLINDERMILLINGBUILDER_HXX_INCLUDED //-------------------------------------------------------------------------- // Header for C++ interface to JA API //-------------------------------------------------------------------------- // // Source Fil...
d9e545dd616ff61390df5b40144a581b0b7d3a71
fb7ac1decf09371d017b169a4d88e1d216dfa7bb
damueller/ogs
/MathLib/Integration/GaussLegendre.cpp
C++
cpp
1,107
permissive
/** * \author Norihiro Watanabe * \date 2013-08-13 * * \copyright * Copyright (c) 2012-2014, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license * ...
1164d60de3bd36e2bf0e52d655819d8eaeb52356
09167c10891fa291bf5e38b1f1211fbf16527f38
salisbury-robotics/jks-ros-pkg
/3rd_party_libs/chai3d-2.1/src/graphics/CVertex.cpp
C++
cpp
1,072
permissive
//=========================================================================== /* This file is part of the CHAI 3D visualization and haptics libraries. Copyright (C) 2003-2010 by CHAI 3D. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms o...
8b171516fb3aa8207a17ab75422857784f1aa5f7
fb1a4edd988cce002869c9cf482a3215ad5f9250
carvedge/GE730C_E
/app/bwork/ini.cpp
C++
cpp
1,966
no_license
#include "ini.h" Ini * Ini::_instance = NULL; Ini* Ini::Instance(){ if (_instance == NULL){ _instance = new Ini(); } return _instance; } Ini::Ini(){ } void Ini::setFileName(string fileName){ filename = fileName; if (access(filename.c_str(), 0) == 0) { this->err_code = 0; boos...
e8fde0cadf7edae5d9258c0732b3a42794142376
1328a3a3b30350c90442b7447f03841dd454abee
DreamLolita/BZOJ
/201802/0227/BZOJ4116/BZOJ4116.cpp
C++
cpp
1,430
no_license
#include<bits/stdc++.h> using namespace std; const int N=2005; int n,m,cnt,ans,tot=1; int head[N],low[N],dfn[N],id[N]; int bridge[N],del[N],vis[N]; struct Tway { int v,nex; }; Tway e[N<<1]; void add(int u,int v) { e[++tot]=(Tway){v,head[u]}; head[u]=tot; } void tarjan(int x,int y) { dfn[x]=low[x]=++cnt; for(i...
6d765f217f29241401eefa35555eb97a7b2500c9
c5a09d261c2f03f48ba7a1058566ad2789008e4a
buaanlsdewm/learning-compiler-graphs
/lib/c/miner_llvm_pass/src/miner.hh
C++
hh
1,435
no_license
// Copyright (c) 2019 TU Dresden // // 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, di...
576041944cc6da28673383b2d60112a4da4a5ff0
fb67f7cf6253c721b56df2f1de76a53a548742e1
asdlei99/Privexec
/vendor/bela/src/belaund/llvm/MicrosoftDemangleNodes.cpp
C++
cpp
22,294
permissive
//===- MicrosoftDemangle.cpp ----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
5b27c62fec3bc628e80ad97217584ada4ae7a971
7455fbc823f33290baf0e37363b8086a5a1062a8
canercandan/cxx-examples
/exception/main.cpp
C++
cpp
1,555
no_license
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option...
2fd2bbc1f1427dcc65e78b9ccee733b78e3b0479
2ea6b814dcda844616e79264a17e9be7c8d0e670
alexhairyman/uconf
/valtree.hh
C++
hh
1,597
no_license
#ifndef VTREE_HH #define VTREE_HH #include <map> //try to take this out #include <vector> #include "value.hh" namespace aval { /** Base value section, it's like a node, and can have subsections, etc. */ class ValueSection { private: std::string name_; ///< name bool has_name_; ///< is it named? bo...
91f2a6be07bc2e53ebe590680d60c61fb6405bdc
2e6d519eddf32be06c15cea071fe1889b350a6ab
czxxjtu/wxPython-1
/tags/wxPy-2.8.0.1/src/msw/dlmsw.cpp
C++
cpp
10,974
no_license
///////////////////////////////////////////////////////////////////////////// // Name: msw/dlmsw.cpp // Purpose: Win32-specific part of wxDynamicLibrary and related classes // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-10 (partly extracted from common/dynlib.cpp) // RCS-ID: $Id$ ...
5714bb1026b8506325878caa744dd9a389e145cf
258c1d610447e452841eec79e4c1b776d498546d
hypomod/HypoModelBase
/src/hypoanalysis.cpp
C++
cpp
42,527
no_license
//#include "hypomodel.h" #include <hypodat.h> #include <hypopanels.h> void SpikeDat::BurstProfile() { int i, j, burst; int start, end; double stime; double prosum[1000], prosumtail[1000]; int procount[1000], procounttail[1000]; int protime, oldtime; FILE *ofp; int tailspikes = 50; ofp = fopen("bprofile.t...
72be87209340c604e15c61e7fe1b11b0e518f559
42a88f75bf7a54ded0ea52547bc0149d4c95c3bc
liuqian-test/LeetCode
/160.cpp
C++
cpp
667
no_license
/*********************************************************** * &Author: liu_qian * &E-mail: liu_qian@foxmail.com * &Motto: Believe in yourself. * &File Name: 160.cpp * &Created Time: 20Century 2020年02月25日 星期二 22时48分19秒 * CST Day/056 and Week/08 of this year ...
ef39dd1c96e08c1070063353dd6924116079a0e7
dddce02f8a7a8cc595ee4dd83810b8ed6f9c1dbd
samir-nasibli/dpnp
/dpnp/backend/kernels/dpnp_krnl_sorting.cpp
C++
cpp
5,063
permissive
//***************************************************************************** // Copyright (c) 2016-2020, Intel Corporation // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // - Redistributio...
55ab80b493d78a4bf4c3cb448005946f30483014
3ca7a1d635159f54d5605d4e3b0cd58d97ffe262
NoiZeR355/libqi
/src/type/anyreference.cpp
C++
cpp
51,524
no_license
/* ** Copyright (C) 2012 Aldebaran Robotics ** See COPYING for the license */ #include <boost/lexical_cast.hpp> #include <boost/algorithm/string.hpp> #include <qi/type/detail/anyreference.hpp> #include <qi/anyobject.hpp> #if defined(_MSC_VER) && _MSC_VER <= 1500 // vs2008 32 bits does not have std::abs() on int64 ...
6452bdcf04acbd5db42012239961ae3f7b416770
d306aa376d67ae2a1236335ffadf14ed9acfd27e
ehnryx/acm
/bad_code_from_long_ago/cf101510/c.cpp
C++
cpp
1,508
no_license
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef complex<ld> pt; typedef vector<pt> pol; #define nl '\n' inline void srand() { srand(clock() + time(nullptr)); } template <class T, class U> ostream& operator << (os...
8ce3df68b40a9be008f7dff0c1b69f5eaef93bc4
30edd890fbe78243e1ffd39783239849f77fe50a
RomanMatiiv/learn_cpp_base
/module_2/task_7_resize/main.cpp
C++
cpp
1,924
no_license
#include <iostream> #include <cstring> /*! * выделяет память размера new_size, * скопирует в нее данные из переданной области памяти, * освободить старую область памяти и вернуть выделенную область памяти нового размера со скопированными данными * @param str: указатель на область в памяти * @param size: старый р...
a2d05b99b36f3bb9e49bd98479f1913abcbe8057
4373c83eaceff09b83be5e6c3df79c417956d164
co185057/MeijerTESTSVN
/Meijer/Platform-Core-Patch/Remote Console Manager/src/rap/content/AppState.cpp
C++
cpp
4,093
no_license
// $Header: /Integration_Customer/Meijer/CURRENT_DEV/Platform-Core-Patch/remote console manager/src/rap/content/AppState.cpp 3 10/21/08 4:06p Sm133076 $ /* * @(#)ApplicationState.cpp $Revision: 3 $ $Date: 10/21/08 4:06p $ * * Copyright 2005 by NCR Corporation, * * All rights reserved. * * This sof...
4229cb2b1f71358d22cce07367cde9222ad0c5d6
738fa26822c9905ded95ccbda5c9552187a846ed
yeahhhhhhhh/chromium_quic
/src/components/autofill/core/browser/autofill_manager.cc
C++
cc
87,167
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/autofill/core/browser/autofill_manager.h" #include <stddef.h> #include <stdint.h> #include <algorithm> #include <limits> #include <...
df28373d0a33cc93cae34390b95b707cd1c896c5
57b50bebb039ece655f030f5fc92ec2171e3b15d
lhlyh/leetcode
/18.四数之和.cpp
C++
cpp
1,724
no_license
/* * @lc app=leetcode.cn id=18 lang=cpp * * [18] 四数之和 */ // #include <vector> // #include <string> // #include <algorithm> // using namespace std; // @lc code=start class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { sort(nums.begin(), nums.end()); vector<vec...
d351c4b3142baf5f0f6b2573a12b47c99c2d7195
19599faf6e3dfd11ecc49914cc10cb6b2e088db4
rogueprogrammer/LeetCode2019
/Trees/BSTIterator.cpp
C++
cpp
1,808
no_license
// https://leetcode.com/problems/binary-search-tree-iterator/submissions/ /** * 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(nullp...
f570785425bae10a40947e096e7252bdfbc7294c
5a20a451f93c114577694951a579c9624278a8f2
myfreebrain/occa
/include/occa/lang/builtins/attributes/inner.hpp
C++
hpp
472
permissive
#ifndef OCCA_LANG_BUILTINS_ATTRIBUTES_INNER_HEADER #define OCCA_LANG_BUILTINS_ATTRIBUTES_INNER_HEADER #include <occa/lang/attribute.hpp> namespace occa { namespace lang { namespace attributes { class inner : public attribute_t { public: inner(); virtual std::string name() const; ...
0ef70dc47ef8933793ba35fc646383c6e35d1817
9547b018d1fe65d5eff6bf1fd6954d8c9840b53a
alexeilebedev/openacr
/cpp/amc/llist.cpp
C++
cpp
36,591
no_license
// (C) AlgoEngineering LLC 2008-2012 // (C) 2013-2019 NYSE | Intercontinental Exchange // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your optio...
e678c353e86d3f3b80f0d39168e350d7c21e13b6
9a8f4fcbc6ba33f319cd657b14400ac1ca12e5fd
ARoefer/rai
/rai/RosCom/perc/publishDatabase.cpp
C++
cpp
14,453
permissive
#ifdef RAI_ROS #include "publishDatabase.h" #include <geometry_msgs/PoseArray.h> #include <object_recognition_msgs/TableArray.h> #include <Kin/frame.h> #ifdef RAI_ROS_GROOVY #include <ar_track_alvar/AlvarMarkers.h> namespace ar = ar_track_alvar; #else // Assuming INDIGO or later #include <ar_track_alvar_msgs/Alv...
e16d804673eade2edf7f1a5592f95cfdfa436e1a
083c89fb1d1ec08bc1828fb46935e4dbe2d989d2
XeroKimo/DX12-Attempt2
/Projects/RendererDX12/Source/Level 3/CommandQueue.cpp
C++
cpp
3,513
no_license
#include "RendererDX12.h" namespace RendererDX12 { CommandQueue::CommandQueue(BaseDevice* device, D3D12_COMMAND_LIST_TYPE commandListType, ManagerCommandAllocator* allocatorManager, ManagerConstantBuffer* constantBufferManager) : m_commandQueue(device, commandListType), m_allocatorManager(allocator...
85664bc71ea9d05d436220847fea853b2e292851
97c15a583c253148ef0c3a95bc13376f3ed155db
thanhtphung/cppware
/appkit/DelimitedTxt.hpp
C++
hpp
8,904
no_license
/* * Software by Thanh Phung -- thanhtphung@yahoo.com. * No copyrights. No warranties. No restrictions in reuse. */ #ifndef APPKIT_DELIMITED_TXT_HPP #define APPKIT_DELIMITED_TXT_HPP #include "appkit/String.hpp" #include "syskit/sys.hpp" BEGIN_NAMESPACE1(appkit) class StringVec; //! delimited text...
0a8f1cc5e77913eac8a3891c56f9229dc99b77c8
7d71b714b4a5c989b6f1bbd6663f86bce620f5ba
sfzhang/CNStream
/modules/unitest/encode/test_imagepreproc.cpp
C++
cpp
8,731
permissive
/************************************************************************* * Copyright (C) [2020] by Cambricon, Inc. 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 a...
778085b9e28529d5ecfb35f18e286b314d9b1711
27971436e77281644fdb2b4eca65e5d65530eb14
ramungen/OpenGL-rendering-framework
/main.cpp
C++
cpp
3,360
no_license
#include <iostream> #include <vector> #include <algorithm> #include <iterator> #include <ctime> #include "stb_image.h" #include "shader.h" #include "cube.h" #include "ShaderHelpers.h" #include "vertices.h" #include "constants.h" #include "Core/Camera.h" Camera camera(glm::vec3(0.0f, 0.0f, 3.0f), -90.0f, 0.0f, false)...
96b7c0599ac107dea816cfd08df1cca911ad9945
d2bd93352cfa08b04cbc47300d51bcb88fc997ca
Zzzode/myLeetCode
/5633. 计算力扣银行的钱.cpp
C++
cpp
232
no_license
#include "Header.h" class Solution { public: int totalMoney(int n) { int res = n % 7, count = n / 7; int ans = 28 * count + count * (count - 1) / 2 * 7; ans += (2 * count + res + 1) * res / 2; return ans; } };
8cbd6a8a836bdc5db1bcaffd18cfed9708049e94
d004b471dbbdf6ca586b0a85e7b3e6a9093d9fe3
ydcrow/refFoxuc
/系统模块/服务器组件/游戏服务器/DistributeManager.cpp
C++
cpp
10,909
no_license
#include "StdAfx.h" #include "DistributeManager.h" ////////////////////////////////////////////////////////////////////////////////// //内存管理 tagDistributeNode * CDistributeNodePool::m_pHeadOfFreeList=NULL; const int CDistributeNodePool::BLOCK_SIZE = 20; ///////////////////////////////////////////////////////////////...
050aa2642b57bfd340fd38db4f59e674f1b4efd4
0fbf1db0685dcdbcede19fdcb78399db98810cc1
flang-compiler/f18-llvm-project
/llvm/lib/Analysis/Loads.cpp
C++
cpp
28,220
permissive
//===- Loads.cpp - Local load analysis ------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
e56f14eb896c0216d83ed9337926bc43ef88e8a9
f83b7443ea1c37783d74891f10389a5c2bf03efd
raasoft/ConEmu
/src/ConEmuHk/Entry.cpp
C++
cpp
87,403
permissive
 /* Copyright (c) 2009-2017 Maximus5 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the followin...
8769c984cf56f0d53270494834e953b9f8fa9819
a4506f541f931e5440a75fbf6899c077938ff46d
juan436/MVC-CPLUSPLUS
/Programa4/VPersona.cpp
C++
cpp
383
no_license
#include<string> #include <iostream> using namespace std; class VPersona{ public: VPersona(); int LeerEdad(); void ImprimirResultado(string DeterminarRango); }; VPersona::VPersona(){ } int VPersona::LeerEdad(){ int e; cout<<"Ingrese edad: "; cin>>e; return e; } void VPersona::ImprimirResultado(string Det...
ef3532112aa63895cb02b94196931e22420975ab
a1049f058ce8332e434ba078359bbce5dcb01f45
cowtony/ACM
/LeetCode/1500-1599/1579. Remove Max Number of Edges to Keep Graph Fully Traversable.cpp
C++
cpp
2,478
no_license
// Union Find with vector. class UnionFind { public: UnionFind(int n) : father_(n), size_(n, 1) { for (int i = 0; i < father_.size(); ++i) { father_[i] = i; } count = n; } void connect(int a, int b) { if (a > b) { swap(a, b); } int ra = root(a); ...
11c5bb7fe302a4421b01d1edaa42611d3e7a2ce5
e1b3fa48a19c3405007ca2fbe7b53f7449e855c3
ronee12/Code-Library
/My_code/Online judge solutions/Codeforces/159B.cpp
C++
cpp
905
no_license
#include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #include <iostream> #include <cstring> #include <vector> #include <string> #include <cassert> #include <ctime> using namespace std; int c[1005][1005...
90558650665b48d03cae72d0ef32cb3af06b62e3
6d0cd5cebd99cd4327a1dcdc97e32a4aa6158b97
AlejandroRodriguezO/Space-Concept
/windows/runner/main.cpp
C++
cpp
1,223
no_license
#include <flutter/dart_project.h> #include <flutter/flutter_view_controller.h> #include <windows.h> #include "flutter_window.h" #include "run_loop.h" #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { ...
cd58c03fc73ce20d8de19c104786160f897b4f0d
39485962cb6cb567d3fc5827ee4f73b380d0d114
cha63506/Library-66
/src/data_stracture/union_find.cpp
C++
cpp
625
no_license
#include "template.cpp" class UnionFind{ private: vector<int> _root; vector<int> _rank; public: UnionFind(int n){ _root.resize(n); _rank.resize(n); for(int i=0; i<n; i++){ _root[i] = i; _rank[i] = 0; } } int root(int x){ if(_root[x] == x) return x; return _root[x] = root(_root[x]); } boo...
1fd998d0dd70fc861932b2ba7d39cd7f1bc51375
0262cf284ac30ef87cc932445684690b257db4d8
colemancda/skia
/tests/FontHostStreamTest.cpp
C++
cpp
3,767
permissive
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "include/core/SkBitmap.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" #include "include/core/SkFont.h" #include "include/core/SkFontStyle.h" ...
92e179efe5319f3575f47a2d10f3f9f1e11d64d1
85b39d349764b7fa641493d553862e9f5cb6d570
dtison/graphics_lib
/G42 Libraries/API 2.0/Image/g42lzw.cpp
C++
cpp
4,977
no_license
// g42lzw.cpp - Lzw decompressor /************************************************************* File: g42lzw.cpp Copyright (c) 1996, Group 42, Inc. Description: Decompresses lzw streams Author: Guy Eric Schalnat Creation Date: 26 Jan. 1996 Modification History: Code Date Name and...
89a52e84008a5a6649c5b580dc72ae369b220155
13e8b78ca64fdc906c3ba540ba04eeaf788b9beb
ChenWenHao97/Cpp
/HttpRequest.cpp
C++
cpp
2,775
no_license
// #include "HttpRequest.h" HttpRequest::HttpRequest(): method_(INVALID), version_(UNKNOWN) { } void HttpRequest::setVersion(Version v) { version_=v; } HttpRequest::Version HttpRequest::getVersion()const { return version_; } bool HttpRequest::setMethod(const char* start, const char* end) { assert(meth...
01b49b33f17e02ebc9bae973b89c16fbad07ad01
ce5a325e39bd43f9ac9d9fceab691f64bc71bd97
donge/donge
/2006/[C++]Topcoder/SRM350/BoggleScore.cpp
C++
cpp
1,536
no_license
#pragma warning(disable: 4786) #include <iostream> #include <sstream> #include <vector> #include <string> #include <algorithm> #include <functional> using namespace std; class BoggleScore { public: int bfs(int i ,int j, vector <string> &grid, string word) { int t = 0; if(i == 4 || j == 4) return 0; if(i == ...
d4118f7bebc80c6e9ff896ef2e73546e891af9f8
ff63b5d4978d6de501f198477895d3bd48659e7c
PrathibaNagarajan/myuzik
/Track.cpp
C++
cpp
5,561
no_license
#include "Track.h" #include "midi.h" #include "MIDIOutDevice.h" #include "ShortMsg.h" #include "LongMsg.h" //Constructor function //default octave, channel rhythm and raga set Track::Track(void){ midOctaveLevel = 5; //default channelNum = 0; //default rhythmLevel = 8; //default std::string defaultRaga(""); setDef...
2779241e879b7c76c58cf286c7b9f706d233e030
9d3b59935c61b3ec18b693c7fcae1d1d2fc60adf
huangyi1234/PerManagement
/src/sdh_transmission/objEqmId.hpp
C++
hpp
1,484
no_license
////////////////////////////////////////////////////////////////// // objEqmId.hpp // // Date: 2021/02/24 // Author: yoxia // Change history: // 2021/02/24: This is the initialization version. // // Discription: // Implematation class(CobjEqmId) // // // Copyright (c) 2021-2031, xxxxxxx. //////////////////////////...
237e83311ff437d341b5923f5728858c490b0c44
7e136d053677c4fe70a7898b64b2af88003909eb
vukadinovic936/CpProblems
/11991.cpp
C++
cpp
2,072
no_license
#include <bits/stdc++.h> #define vi vector<int> #define pi pair<int, int> #define pd pair<double, double> #define vii vector<pair<int, int>> #define ll long long #define INF 1e9 #define EPS 1e-9 using namespace std; class UnionFind { private: vi p, rank, setSize; int numSets; public: Uni...
bb1c117a851f5636fda778299a2d3249e1fe938d
42d74daf87821fe08586a4da496e4f6555f7d780
flingengine/sol2
/examples/source/tutorials/quick_n_dirty/opening_state_on_raw_lua.cpp
C++
cpp
515
permissive
#define SOL_ALL_SAFETIES_ON 1 #include <sol/sol.hpp> #include <iostream> int use_sol2(lua_State* L) { sol::state_view lua(L); lua.script("print('bark bark bark!')"); return 0; } int main(int, char*[]) { std::cout << "=== opening sol::state_view on raw Lua ===" << std::endl; lua_State* L = luaL_newstate(); lua...
9ffacacd90dce8d097d3e8e0170dec9939236000
cd8cdaff11e6dbc34bce3e123125ce7a2ed1aefc
gtarciso/INE5415
/GustavoTarciso/Implementação/src/state.cpp
C++
cpp
2,283
permissive
#include "state.hpp" #include <iostream> #include <string> State::State() { this->nsymbol = 0; this->init = false; this->final = false; } State::State(int _nsymbol) { this->nsymbol = _nsymbol; this->init = false; this->final = false; this->transitions = new string*[_nsymbol]; this->readFile(); } State::State...
833acaa4e01c08221c1cfd0c6b1af25155446fe2
5ee8649fc6fc7405e0364784087194784253a35f
wouterboomsma/quickstep
/external/boost_1_60_0/qsboost/iterator/transform_iterator.hpp
C++
hpp
5,859
permissive
// (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // 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 QSBOOST_TRANSFORM_ITERATOR_23022003THW_HPP...
ea4aee3d453423c2c48470ebcab4b0a969ad0fb0
23d41a234583f695c29fb320bb453b25884c8833
AlexanderChiuluvB/Cplusplus
/Kattis/standardMST.cpp
C++
cpp
1,775
no_license
#include <algorithm> #include <set> #include <iostream> #include <vector> #include <string> using namespace std; typedef pair<int,int>ip; struct edge{ int from; int to; int weight; }; bool cmp(edge&A, edge&B){ return A.weight<B.weight; } bool cmp2(edge&A, edge&B){ if(A.from!=B.from) retu...
74ff96f96a2302e7f6b1050359e0f30b56ec945a
efa1a18a3e53b8fe24db6de300bd275136675587
maxim5/code-inspector
/data/cpp/cdada373950e233e8e0dc08f3ddd7af7_rpcwallet.cpp
C++
cpp
145,769
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 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 "amount.h" #include "base58.h" #include "core_io.h" #include "init.h" #includ...
11acd14b0f35b10e65927df9a2087860c31fe165
08374102bbb9e6ba3f4918f1a647851fe70b6b55
alexandraback/datacollection
/solutions_5756407898963968_0/C++/vator/main.cpp
C++
cpp
1,348
no_license
#include <ctime> #include <iostream> #include <iomanip> #include <set> #include <cstdio> using namespace std; // TEMPLATE {{{ #ifdef ONLINE_JUDGE #define OJ 1 #else #define OJ 0 #endif //#define TIMESTAMP fprintf(stderr, "Execution time: %.3lf s.\n", (double)clock()/CLOCKS_PER_SEC) #define TIMESTAMP merr << "Executi...
4d787356c42213833862b5219bde6e4e2f54cf76
3f599b0240b8f023b5fe67aa76e553b0d0bbff86
sivertism/mirror-sysc-ams
/src/scams/impl/predefined_moc/eln/sca_eln_sc_vsink.cpp
C++
cpp
3,908
permissive
/***************************************************************************** Copyright 2010-2013 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. Copyright 2015-2020 COSEDA Technologies GmbH Licensed under the Apache License, Version 2.0 (the "License"); you may not use ...
aa6bc2c72f2f1722d905823b6bd8183e6463dac8
0ac7ccb479f46855daf269e1390a40c940ca89bd
franktly/data-structure
/data structure/tree.cpp
C++
cpp
7,627
no_license
#include "stdafx.h" #include "tree.h" #include <stack> #include <map> #include <queue> /* 遍历二叉树: 是指按指定的规律对二叉树中的每个结点访问一次且仅访问一次(访问是指对结点做某种处理。如:输出信息、修改结点的值等) 遍历方法: 若以L、D、R分别表示遍历左子树、遍历根结点和遍历右子树,根据根节点的遍历的位置可以三种情况,分别是: DLR——先(根)序遍历。 LDR——中(根)序遍历。 LRD——后(根)序遍历 由先序和后序不能确定唯一的中序 而由先序和中序能唯一确定后序 而由中序和后序也能唯一确定先序 */ /* 二叉树遍历算法分类...
652714121e722e310f539b9db0b536e2275178f5
2581af36222af4073381a10a565d533b1f112277
nileshsah/Algorithms
/CF510C_2.cpp
C++
cpp
1,634
no_license
#include <bits/stdc++.h> #define ll long #define get(a) scanf("%ld", &a); #define rep(n) for( ll i = 1; i <= n; i++ ) #define repVector(v) for( typeof(v.begin()) it = v.begin(); it != v.end(); it++ ) #define repSet(s) for( typeof(s.begin()) it = s.begin(); it != s.end(); it++ ) #define all(c) c.begin(), c.end() #defin...
3187e2e125cdd0c4795001e5501a48b1b608e5a6
ccd487f712b8e8ec58ca1feab080c896078bdb79
presscad/nwnee
/NWNXLib/API/Linux/API/CExoLinkedListTemplatedC2DA.hpp
C++
hpp
665
permissive
#pragma once #include <cstdint> namespace NWNXLib { namespace API { // Forward class declarations (defined in the source file) struct CExoLinkedListInternal; struct CExoLinkedListTemplatedC2DA { CExoLinkedListInternal* m_pcExoLinkedListInternal; // The below are auto generated stubs. CExoLinkedListTem...
f85bba46fee89e38f7891593eeedf83f66e064ce
1b55a9b2a9e9c9de948cf058c1a77d06afe834c8
laurentlb/bazel-texgen
/src/texture.cc
C++
cc
26,707
no_license
// ============================================================================ // // Texture class // // ============================================================================ #include "src/interpolation.hxx" #include "noise.hh" #include "texture.hh" #include <math.h> #include <stdlib.h> #include <string.h> #...