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
cbf795b7a7dad866c08202e2d2c3054e287ce6b6
5c98fc453169b78e7c2eb45dd2f6ad41bb6d2933
BuschMath/Chapter9_Example_FA21
/Chapter9_Example_FA21/Main.cpp
C++
cpp
387
no_license
#include <iostream> using namespace std; void ExampleFunction(); void Function(); int main() { for (int i = 0; i <= 10; i++) { ExampleFunction(); Function(); } return 0; } void ExampleFunction() { static int counter = 0; counter += 3; cout << "Count: " << counter << endl; } void Function() { int coun...
ab6e9c88fa89129653773efb8bb1bb42abea2108
e58c616f5589684793b4021f8558bd8bd94315a8
darkfirefox/translateMVC
/src/streamdata.cpp
C++
cpp
1,240
no_license
#include "streamdata.h" StreamData* StreamData::stream=0; StreamDataDestroyer StreamData::destroyer; StreamData &StreamData::Instance() { if(!stream){ stream=new StreamData(); destroyer.init(stream); } return *stream; } void StreamData::writeString(QString str) { mutex.lock(); stac...
82515051eebe9e1bcaf27c0b9a4a830964c8f8be
496d2e3382f5fccfe8f4aa3fcf26922d371c837a
novaquark/aws-sdk-cpp
/aws-cpp-sdk-cloudhsm/source/model/CreateHsmResult.cpp
C++
cpp
1,362
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...
d89fd2ae60c6a163112c214c92016202997de90a
3c985c77aa72c108971b0ce56c742eef2c86b993
mronian/digitalIP15
/ass1_12CS30004.cpp
C++
cpp
5,675
no_license
#include "opencv2/highgui/highgui.hpp" #include <iostream> using namespace cv; using namespace std; int main(int argc, char* argv[]) { Mat F1 = imread("I1.png", CV_LOAD_IMAGE_GRAYSCALE); //read the image data in the file "MyPic.JPG" and store it in 'F1' if (F1.empty()) //check whether the image is loaded or...
3af83e5d79fa65b000c7e5d705539fe9e7d14a75
86a5eed50d63c342fd28685a4b5b64c02cce282f
madbadPi/TelerikAcademy
/VCPlusPlus/CPlusPlusTest2/VectorExample/VectorExample.cpp
C++
cpp
687
permissive
#include <iostream> #include <vector> //pass vector to function by reference void sortvector(std::vector<int>& myvector) { int length = myvector.size(); //bubble sort for (int i = 0; i < length; i++) { for (int j = 0; j < i; j++) { if (myvector[j]>myvector[j + 1]) { std::swap(myvector[j], myvector[j +...
2cb60714fff1ba4611835bb61e68c7e92b56cf73
4c48e128fad737dbdb9d53520e951c4d10868eee
amir9480/lightning
/lgfx/D3D9/ld3d9device.cpp
C++
cpp
32,532
no_license
#include "ld3d9device.h" #if ( LGFX == LGFX_D3D9 ) LNAMESPACE_BEGIN LGFXVertexDeclaration* D3D9QuadVertex::decl=nullptr; LVector<LVertexElement> _d3d9quad_decl={ {0,LVertexElementType_Float3,LVertexElementUsage_Position,0}, {0,LVertexElementType_Float2,LVertexElementUsage_TextureCoordinate,0}, }; D3D9QuadV...
6252cb245e0f7bfdb10beb1950b7678a23502614
39dfaf129150e898e1ffc2e8bc92e2e91f05a0b2
sahilverma0696/the-useless-repo
/coding_problems/recursion/subSTR.cpp
C++
cpp
597
no_license
#include<bits/stdc++.h> #include<cstring> using namespace std; void __subSTR__(string input, string output) { if(input.size() == 0) { cout<<output<<"\n"; return; } char c = input[0]; // case of backtracking char x = toupper(input[0]); __subSTR__(input.substr(1),output+input[0])...
a2648aa1a80189f04fd819444b60fcf1852cc9ac
b44ffa585b7b950714cbe5ef68c3d41fed0e87aa
dianabertash/OOP_LAB_02
/LAB_02.TASK_2/LAB_02_TASK_2/Source.cpp
C++
cpp
3,186
no_license
#include <iostream> #include <time.h> using namespace std; class Matrix { private: int MAT[25][25]; int *M; int *N; public: Matrix(); Matrix(int m, int n); ~Matrix(); void GetMatrix(); void ShowMatri...
517ba98bbefda9fd04cde25e8db9727e9b8727e3
984b252f01aaad9c8babc9f5532b952f96005320
stardog-union/boost
/libs/math/test/float128/log1p_expm1_test.cpp
C++
cpp
2,849
permissive
/////////////////////////////////////////////////////////////// // Copyright Christopher Kormanyos 2002 - 2011. // Copyright 2011 John Maddock. 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_ // // This work is ...
9a179aaa87d80ba58ad32d88d7d32513abec398f
52a7ee0bf805bb1f4bdd42c3961f6f1467ed34a6
GendronD/Oregon-State-Comp-Sci
/162/Lab 3 - War Game with Dice Design/gameClass.hpp
C++
hpp
1,204
no_license
/********************************************************************* ** Program name: War Game with Dice Design ** Author: Devin Gendron ** Date: 1/28/17 ** Description: War game with two players using a loaded and unloaded dice. *********************************************************************/ #ifndef GAMECLASS...
870845a6f7bcb329d3ae4011260b0f6b5d8a7732
59088a5aa7362a6a8671964ba503328a1efac91a
EO-Zanzo/SeaOfThieves-Hack
/SDK/SoT_DevilsRoar_classes.hpp
C++
hpp
643
no_license
#pragma once // Sea of Thieves (1.2.6) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_DevilsRoar_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // B...
ec97b4092f07f5b6504028d7920ceca71f8d2f32
964fe1630fff0dad186623179e4f8a19d1ba2c94
matejcik/hadi
/vyhodnocovac.cpp
C++
cpp
937
no_license
#include <had.hpp> void TVyhodnocovac::proved (Smer o, Had h) { if (mapa == NULL) throw (1); if (h->jsi_mrtev ()) { try { // respawn: Coords c = mapa->get_spawnpoint (); h->spawn (c, h->kam_jdes ()); // zatim fixnim smerem } catch (...) { // no free spawnpoint } } else { Smer smer = h->kam_jdes (...
b4f2773f1df93e1cf5f5beb6bce534d69822d64b
0fb50fff41c7b8e9b4c54fe50bbc977ffec25650
raipat/aifcoin
/src/test/netbase_tests.cpp
C++
cpp
14,597
permissive
// Copyright (c) 2012-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Aif Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "netbase.h" #include "test/test_aif.h" #include <string> #inclu...
f18c8169215d58e8fe13eb9bae4ddce5d7176fc2
f7f26a8e87661c5b9bca525a821a439f7645702f
hjmjohnson/test_teem
/Deft/tags/start/src/Viewer.cxx
C++
cxx
20,070
no_license
/* Deft: experiments in minimalist scientific visualization Copyright (C) 2005 Gordon Kindlmann 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...
0e3d3077e4393a15d919ac31fe8aab756afed31f
abd49545f5c49cb93ec0b86fe9d2466c93d38771
dunyuling/cpp
/imooc/class/polymorphism/pure_virtual_func/Person.cpp
C++
cpp
298
no_license
#include "Person.h" #include <iostream> using namespace std; Person::Person(string m_strName) { this->m_strName = m_strName; cout<<"Person Person(string m_strName)"<<endl; } Person::~Person() { cout<<"Person ~Person()"<<endl; } void Person::work() { cout<<"Person work()"<<endl; }
fa125efa11e691473b1301ceaa0adaaf9e2bba44
7094529e160923efbe8a6a49395672f40286e515
amelieakc/assignments
/gcd.cpp
C++
cpp
308
no_license
#include <cstdlib> #include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; printf("The numbers are larger=%d and smaller=%d\n", a, b); while (b != 0) { int r = a % b; a = b; b = r; } printf("Greatest common divisor is %d\n", a); return 0; }
c723ca049e816bdfa56937a0fd5df6c098a05e54
34b7d70073ce6623927c471307b22f02729f61af
Mariana-Perez/201713-TC3022-2
/ConsoleApplication1_tarea1/ConsoleApplication1_tarea1/InputFile.cpp
C++
cpp
688
no_license
/******************* MATERIA: GRÁFICAS COMPUTACIONALES FECHA: 05 Septiembre 2017 AUTOR: A01376131 MARIANA PÉREZ SÁNCHEZ ********************/ #include "InputFile.h" #include <fstream> #include <iostream> #include <sstream> bool InputFile::Read(std::string filename) { if (filename.empty()) { std::cout << "No filen...
c55f9d06dfea6abf54e4fa63bb864ec07987eda9
82e8d156f7c7e59c9f15a4d098a5ee65f21ccd8a
Arkashish/DSA-Bootcamp
/DSA Bootcamp/Patterns/pattern26.cpp
C++
cpp
220
no_license
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=1;i<=n;i++) { for(int j=0;j<=n-i;j++) { cout<<i<<" "; } cout<<endl; } }
e45de27f032e0326576cd7aeaa947dcae400c7d8
a5881a8ab73df53079ad7a90035b299524af75d4
yjsyyyjszf/DcmNetTools
/DcmNetTools/Global.cpp
C++
cpp
5,885
no_license
#include "Global.h" #include <QSettings> #include <QCoreApplication> #include <QFile> namespace Global { QSettings::Format g_dcmNetToolsRecordFileFormat = QSettings::IniFormat; inline const QString g_dcmNetToolsRecordFileName = "DcmNetToolsRecord.ini"; inline const QString g_echoStoreSCUIniGroupName = "EchoStoreSCU"...
fb59de2d52a85ebbc8764f440800febde1abc918
9b5ccec1d6323c2ee0251d8760d39f69e66b3616
KEY60228/paiza_learning
/src/a_rank_levele_up/twopointers_step1/main.cpp
C++
cpp
235
no_license
#include <iostream> using namespace std; int main() { int n; cin >> n; int a = 0; for (int i = 0; i < n; i++) { int tmp; cin >> tmp; a += tmp; cout << a << endl; } return 0; }
2f8575e2daa7ce227a92056910c2c2c0e1bf77ad
51a32f4bbd953cc515a875de16d62e4cac855f37
CoinTraderJoe/cryptotarget
/src/qt/coincontroltreewidget.cpp
C++
cpp
1,051
permissive
// Copyright (c) 2011-2013 The Cryptotarget developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "coincontroltreewidget.h" #include "coincontroldialog.h" CoinControlTreeWidget::CoinControlTreeWidget(QWidget *...
263b79d4186a9acec7f2a18b2ef0968d87b9c3cb
923e6390c78eb9355d877c34176b18f747a77e88
gyf821/chromium
/content/renderer/accessibility/blink_ax_tree_source.cc
C++
cc
32,582
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/renderer/accessibility/blink_ax_tree_source.h" #include <stddef.h> #include <set> #include "base/memory/ptr_util.h" #include "base/st...
ea15fd00ff8d3c96a6fba12c06bd1bc353095236
86747466fc2b1559201680d244ab4fb20075a0cc
synth-soul/HyperNEAT
/NE/HyperNEAT/NEAT/src/NEAT_GeneticPopulation.cpp
C++
cpp
19,665
no_license
#include "NEAT_Defines.h" #include "NEAT_GeneticPopulation.h" #include "NEAT_GeneticGeneration.h" #ifdef EPLEX_INTERNAL #include "NEAT_CoEvoGeneticGeneration.h" #endif #include "NEAT_GeneticIndividual.h" #include "NEAT_Random.h" namespace NEAT { GeneticPopulation::GeneticPopulation() : onGeneratio...
5ae044f0d6bbf8fff360ae70d307b9ecb8c00a60
ae4ce2cb989708469ec45c5705498d495f46fd4f
soaped/incubator-doris
/be/src/olap/rowset/beta_rowset_writer.cpp
C++
cpp
10,512
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
b555c0a61223e0b8734a0c7bc5ef1651f947a5a2
d0b507195a02a595a074a8bb25ec0e562330f621
lilinhan/code
/c++11/11_1.cpp
C++
cpp
775
no_license
/************************************************************************* > File Name: 11_1.cpp > Author: lewin > Mail: lilinhan1303@gmail.com > Company: Xiyou Linux Group > Created Time: 2015年08月08日 星期六 10时01分19秒 ************************************************************************/ #include...
56188c097015b5b5dd46be21b33cf562a39972c6
054e9c0c56cc849f1e90309a9f8e0c96577d6f43
RakeshIIITD/Uva
/uva_11690_2.cpp
C++
cpp
1,072
no_license
// dfs solution #include<iostream> #include<bits/stdc++.h> using namespace std ; vector<int> _sum ; vector<vector<int> > adj ; vector<int> visited ; void dfs(int u, int *total) { visited[u] = 1 ; *total+=_sum[u] ; for(int i=0;i<adj[u].size() ; i++) { if(visited[adj[u][i]]==0) dfs(adj[u][i], total) ; } } i...
a0b15e5d5913a5e0075682672e0735a423affbf1
c4af9a2b6deb151cb7d00616208b60a329c63ad1
sulthan-95/Practice_codes
/_cpp_/unsaved.cpp
C++
cpp
291
no_license
#include<iostream> using namespace std; int main() { int t,n,a,b,d,x1,y1,x2,y2,e; char c; cin>>t; while(t--) { cin>>n; while(n--) { cin>>c; if(c=='p') cin>>a>>b; else if(c=='c') cin>>a>>b>>d; else if(c=='l') cin>>a>>b>>d>>e; } } }
39cfc02a282601dc36404b72cf3b7df0e88a9bec
3ee3c1fa86a80475dabe78ba440544767b2fce3a
chromium/chromium
/services/device/generic_sensor/platform_sensor_win.cc
C++
cc
2,983
permissive
// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/device/generic_sensor/platform_sensor_win.h" #include "base/functional/bind.h" #include "base/task/single_thread_task_runner.h" #include "base/time/time.h" ...
829f1e26bb5072de20f7f90af37a29d219672fe8
158f881b646a33cc815c1c699ab35a1d9919c8ca
johannasmriti/Data-Structures
/array/level-1/five.cpp
C++
cpp
623
no_license
/*Find the frequency of a number in an array Difficulty Level : Easy Last Updated : 14 May, 2021 Given an array, a[], and an element x, find a number of occurrences of x in a[]. Examples: Input : a[] = {0, 5, 5, 5, 4} x = 5 Output : 3 Input : a[] = {1, 2, 3} x = 4 Output : 0*/ #include <bits...
e5f2e23b1a2c8a6b3da6c4bc0850e30823798d40
16ddb7d2088593ea218e1df35cf9753b017b05e9
luismoax/Competitive-Programming---luismo
/My Implementations (luismo)/FenwickTree.cpp
C++
cpp
1,291
no_license
class FenwickTree { private: vector<ll> tree; inline int lowBit(int i) {return i&-i;} public: FenwickTree(){} FenwickTree(int len) { tree.resize(len, 0); } FenwickTree(int len, int v) { tree.resize(len, v); } ...
880c788252479a37615279477502b49c65d8bf6a
8781e3a274f5dbb814abe565f882a9992b74ed7a
25wes25/caramelDelights
/CollegeTour/adminwindow.cpp
C++
cpp
5,662
no_license
#include "adminwindow.h" #include "ui_adminwindow.h" #include <QDir> #include <QMessageBox> /*! * \brief AdminWindow::AdminWindow * \param parent */ AdminWindow::AdminWindow(QWidget *parent) : QDialog(parent), ui(new Ui::AdminWindow) { ui->setupUi(this); ui->addBox->hide(); ui->deleteBox->hide(...
f9f2c36dc8acaa2f1f5a357f05c7a7b05c0237bd
bc45502e10b8e8732905a60fe6ebb9e16e970aa0
mmcclain117/School-Code
/College/Matthew C++ Classes/Matthew Project/Cs 2/Lab 4/WCS_String.cpp
C++
cpp
1,731
permissive
#include "WCS_String.h" #ifndef STRING_SIZE #define STRING_SIZE 50 #endif WCS_String::~WCS_String () { delete [] pChar; } #pragma warning (disable:4996) istream & WCS_String::Read (istream & In) { char c; char * pTemp; CharCount = 0; while (((c = ReadChar (In)) != '\n') && !In.eof ()) { pChar [Char...
0bab515d1795f14500c908d24968fbe64c493d37
908c58660a2f59f60dfd1ca6caaeb6244e769893
snappas/kv_epoll
/Epoll_Manager.cpp
C++
cpp
4,356
no_license
#include <sys/epoll.h> #include <cstdio> #include <cstdlib> #include <netinet/in.h> #include <memory> #include <iostream> #include <cstring> #include "Epoll_Manager.hpp" Epoll_Manager::Epoll_Manager(int listen_fd_) : listen_fd(listen_fd_) { /* * Create epoll instance */ epollfd = epoll_create1(0); if (ep...
008f1631b428d0375b0605ad76f6df7ab7201ac4
c204c8c3d5f41926472d2368c0c7cedc2b33d09f
luqilinok/Leetcode
/leetcode-algorithms/240. Search a 2D Matrix II/240. Search a 2D Matrix II.cpp
C++
cpp
1,254
no_license
/* * @lc app=leetcode.cn id=240 lang=cpp * * [240] 搜索二维矩阵 II */ /*思路:分治法。 左下角的元素是这一行中最小的元素,同时又是这一列中最大的元素。比较左下角元素和目标: 若左下角元素等于目标,则找到 若左下角元素大于目标,则目标不可能存在于当前矩阵的最后一行,问题规模可以减小为在去掉最后一行的子矩阵中寻找目标 若左下角元素小于目标,则目标不可能存在于当前矩阵的第一列,问题规模可以减小为在去掉第一列的子矩阵中寻找目标 若最后矩阵减小为空,则说明不存在 */ class Solution { public: bool searchMatrix(vect...
b25b1156e45bcdccd4447dc0bdf9798381bd83f0
0ede81c9592df927ffbb9d78071b04d647db376d
googleapis/google-cloud-cpp
/google/cloud/dialogflow_cx/internal/pages_stub_factory.cc
C++
cc
2,898
permissive
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
8918cbc0effb7aa9821d24e28a5701cf977eacbe
65d7e1ed1f7c5ba79ba97220e951a9878e62fea5
siyuanpan/ddg-exercises
/projects/simplicial-complex-operators/src/simplicial-complex-operators.cpp
C++
cpp
11,683
permissive
// Implement member functions for SimplicialComplexOperators class. #include "simplicial-complex-operators.h" using namespace geometrycentral; using namespace geometrycentral::surface; /* * Assign a unique index to each vertex, edge, and face of a mesh. * All elements are 0-indexed. * * Input: None. Access geomet...
ee6e28332e23867838ff407a56aa6b64a1dcf91d
263381348f918e315e87a8b9eeea669e3b149cf5
tengyucai/Computer-Graphics
/A4/SceneNode.hpp
C++
hpp
1,196
no_license
#pragma once #include "Material.hpp" #include "Primitive.hpp" #include <glm/glm.hpp> #include <list> #include <string> #include <iostream> enum class NodeType { SceneNode, GeometryNode, JointNode }; class SceneNode { public: SceneNode(const std::string & name); SceneNode(const SceneNode & other); vir...
7a2d04311d86e873f90b530610f92fe72fd05fcd
847503e0f02325b2b11e4b3ca0a9f93d9c3a6cec
inbangsa/ifm3d
/modules/framegrabber/src/libifm3d_framegrabber/frame_impl.hpp
C++
hpp
3,355
permissive
// -*- c++ -*- /* * Copyright 2022-present ifm electronic, gmbh * SPDX-License-Identifier: Apache-2.0 */ #ifndef IFM3D_FG_FRAME_IMPL_H #define IFM3D_FG_FRAME_IMPL_H #include <map> #include <ifm3d/fg/frame_grabber_export.h> #include <ifm3d/device/err.h> #include <ifm3d/fg/frame.h> #include <fmt/format.h> namespace...
91785ed30bc340e369b422bcece9782c68615b8d
5cb0c42338cb701d072246c0bafc7b0626e27fb5
toosyou/network_programming
/np_hw3_cgi/hw3.cpp
C++
cpp
4,465
no_license
#include <iostream> #include <cstdio> #include <cstdlib> #include <string> #include <fstream> #include <vector> #include <netinet/in.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> #include <arpa/inet.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <ctime> using namespace...
2247ec7883a744f212a3451c6a4e6e1c16ced113
a747c181f0690bb1d747128bdeebcd3147ea36da
UIKit0/rippled
/src/ripple/types/ripple_types.cpp
C++
cpp
1,772
permissive
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
168672d976056fc6f56882209c65a585c94aa984
f1b58d7daf04cd1b913f5db7a249c8eb40e81ce4
ugozapad/TheZombieEngine
/zombie/code/nebula2/src/misc/ncsrv_cmds.cc
C++
cc
3,325
no_license
//------------------------------------------------------------------- // misc/ncsrv_dispatch.cc // This file was machine generated. // (C) 2000 A.Weissflog/A.Flemming //------------------------------------------------------------------- #include "precompiled/pchnnebula.h" #include "misc/nconserver.h" static...
07ba67e0e8cbf3a6377a99d8688bc15b34ac6658
2b7e4a7a058d8910b176806c6ec5d2a7fe782334
rr2d2/Assignment2
/output files/B3/b3Avg.cpp
C++
cpp
2,503
no_license
// main.cpp //g++-4.7 -std=c++11 *.cpp will compile all files in working directory //gcc-4.7 -std=c++11 *.cpp //gcc -std=c++11 *.cpp // //gcc main.c -o main.out creates executable file //run by ./.main.out #include <iostream> #include <sstream> #include <fstream> #include <math.h> #include <stdio.h> #include <stdlib.h>...
683201433b853ca345f1e4148463253702b399cc
260027000e84ee1d8577238d8345f5ff79efcb5b
LJK150030/Emotional_Modeling
/Code/Game/Personality.cpp
C++
cpp
1,051
no_license
#include "Game/Personality.hpp" #include "ThirdParty/imGUI/imgui.h" Personality::Personality(float o, float c, float e, float a, float n) : m_personality{ o, c, e, a, n } { } Personality::~Personality() = default; void Personality::DrawImguiValues() { if(ImGui::TreeNode("Personality")) { // Various ImGui::Pus...
73519f04e893a1a7349a1429b6c669207b50bb1c
3441a76aae4a7959e79a77aaf794649f9633d234
thebravoman/software_engineering_2015
/c24/A_03_Antonio_Mindov.cpp
C++
cpp
204
no_license
#include <iostream> using namespace std; int main() { int numb; cin >> numb; for (int i = 2; i < numb + 1; ++i) { if(numb % i == 0) { cout << i << "," << numb/i << endl; } } return 0; }
c66202d7b92da1f399d88907dc823d42b84c0910
48301769f9b8bd479f05204a2e604b7d88fe8481
jdavez/easycalc
/PPCport/core/mlib/matrix.cpp
C++
cpp
30,464
no_license
/* * $Id: matrix.cpp,v 1.2 2009/11/02 17:24:39 mapibid Exp $ * * Scientific Calculator for Palms. * Copyright (C) 1999,2000,2001 Ondrej Palkovsky * * 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...
ed76bebf9011c6f7e07d33123a71edb47d170452
c7289d869e26ffe0c2f4e4a2fc34a4494b5ddb9f
arnauddeman/td
/td/telegram/net/Session.cpp
C++
cpp
48,784
permissive
// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021 // // 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) // #include "td/telegram/net/Session.h" #include "td/telegram/t...
444e4b0d8916cccd1b3564c4be0bce35d0776741
d577ac0de93d9c01381112f2abc75d0750a250d5
Akshayakayy/opengl_3DPlaneSimulator
/src/attack.cpp
C++
cpp
2,458
no_license
#include "attack.h" #include "main.h" #include "plane.h" Attack::Attack(float x, float y, float z, Plane plane, color_t color) { this->position = glm::vec3(x, y, z); this->rotation = 0; this->rotationy = rotationy; this->plane = plane; speed = 1; // Our vertices. Three consecutive floats give ...
da380d08712257e224c4c20ae753df3b1136550b
622ffcc25720da98f58e1c682be70c91e2005015
Pratik038/Sorting-Algorithm
/MERGE_SO.CPP
C++
cpp
732
no_license
#include<constream.h> void merge(int *a,int s,int e){ int mid=(s+e)/2,i=s,j=mid+1,k=s; int temp[100]; while(i<=mid && j<=e){ if(a[i] < a[j]) temp[k++]=a[i++]; else temp[k++]=a[j++]; } while(i<=mid) temp[k++]=a[i++]; while(j<=e) temp[k++]=a[j++]; for(int l=0;l<e+1;l++) a[l]=temp...
2b37a3b9e7cbc8f52bae08fcc6331d273351f49b
ba10a62f008c6f690f918b8946c8ebfca84d332c
jjputamierda/jueputahijueputa
/lamilputa/src/nodo_verde/agente_red/Agente_red.cc
C++
cc
42,882
no_license
#include "Agente_red.h" struct datosForwarding{ uint16_t idNodo; uint16_t distancia; uint16_t camino; }; //uint16_t nodoSender; uint16_t nodoSenderTWH; std::vector<struct datosForwarding> tablaForwarding; void capaRed(Cola<struct Mensaje>* colaAzul, Cola<struct ArbolGenerador>* colaRosada, std::vect...
14e4b6d995a00dbb0c804bffc60d2eb623e3e02b
748d2c5c0ebdcf567b98ea68b45c36d9aef747ad
sanjaysupanch/code
/binarySearch.cpp
C++
cpp
1,624
no_license
#include <iostream> using namespace std; /*---function that performs binary search--------------------*/ /*---------we take three variables namely start, mid and end to keep track of start, mid and end of the given array respectively the main idea of binary search is to search only into half relevant list a...
e24ef8f76ead53370ccf56c9cfb294c83879da82
7919bfdd5265184309250f15d522af4ad8a01e36
Tenebrie/Taiga-4-Engine
/Taiga 4 Engine/database_load_unit.cpp
C++
cpp
14,338
no_license
#include "main.h" #include "database.h" #include "visual.h" void cDatabase::loadUnits() { int i = 0; unit[i].type = "missingno"; unit[i].size = vec2(20, 20); unit[i].addRef(REF_UNIT_NORENDER); i += 1; // Actual units unit[i].type = "player"; unit[i].size = vec2(64, 64); unit[i].center = vec2(32, 52); unit[...
12800a2a3626652f09f5c52312dac1a29311042d
e78baee464b417416836fe7586dcb8e50973b505
Buttars/SCUM-SDK
/SDK/SCUM_Shorts_Pants_08_classes.hpp
C++
hpp
671
no_license
#pragma once // SCUM (0.1.17) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SCUM_Shorts_Pants_08_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // Blue...
1694dd04e84e47ca1ee3d9b8f36640c74deed2bc
4ac8d186971291490a5c9f90c5f98b7d524b142f
WavesUR/leetcode-study
/401/src.cpp
C++
cpp
2,575
no_license
#include <iostream> #include <cstring> #include <string> #include <sstream> #include <vector> #include <algorithm> #include <cmath> #include <cctype> #include <climits> using namespace std; class Solution { public: int hour(vector<int>& v){ int res = 0; for(int i = 0; i < 4; i++){ res =...
9a0acd45c1ff264085445c96cbdebfb465ec8727
b16d346bd77bdfb5e066387bdd1209253fba86b4
lightphoenix2/ICT_07_FileManagementSimulation
/Project1/Source.cpp
C++
cpp
32,372
no_license
#include <string> #include <iostream> #include <vector> #include <fstream> #include <sstream> #include <queue> #include <algorithm> #include <ctime> #include "SingleEntry.h" #include "Functions.h" using namespace std; /* _____ _ __ __ | __ \ | | \/ | | |__) |___ __ _ __| | \ / | __...
5df97cddb99edf5ace9e03b5a1a12f9b813fafb0
3aca6b81cc3b78e69892c40b8e934148a3a69f02
jjzhang166/WinNT5_src_20201004
/NT/enduser/sakit/sak/frameworks/core/comhelper/systemsetting.cpp
C++
cpp
21,683
no_license
// SystemSetting.cpp : Implementation of CSystemSetting ////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 1999 Microsoft Corporation // // Module Name: // SystemSetting.cpp // // Description: // Implementation file for the CSystemSetting. Deals wit...
81f24a3ce10ae389b2c4b6d8abe65fb57b13787a
d5ac87e8bb5b7f559347d3fa3e7860175ff41159
igor-zhigulin/voxer
/VoxeR/src/Shaders/Shader.cpp
C++
cpp
7,748
no_license
#include "Shader.h" #include <fstream> #include <cstring> Shader::Shader::Shader(ShaderType type) : ready(false) { shader = glCreateShader(static_cast<GLenum>(type)); for (int i = 0; i < MAX_LOG_SIZE; i++) log[i] = 0; } bool Shader::Shader::loadAndCompile(const char* path_to_source) { /* Если шейдер уже готов,...
e6ab39a8937d705c93cc6a639fe3e632f77b6034
9cef8cc87b3e336001ff53e0809838bac22be5e0
eddelbuettel/bh
/inst/include/boost/url/url_view.hpp
C++
hpp
8,419
permissive
// // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com) // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.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) // // Official repository: https://gi...
9658a1e21a96d57db7aeba03d01004c8c8d8edd4
b7569f326a3dff56a08f9da534fec716594b0327
flitzmo-hso/flitzmo_agv_control_system
/Versionen/2021_06_15/RMF/rmf_ws/install/rmf_task_msgs/include/rmf_task_msgs/msg/detail/task_type__traits.hpp
C++
hpp
1,104
permissive
// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em // with input from rmf_task_msgs:msg/TaskType.idl // generated code does not contain a copyright notice #ifndef RMF_TASK_MSGS__MSG__DETAIL__TASK_TYPE__TRAITS_HPP_ #define RMF_TASK_MSGS__MSG__DETAIL__TASK_TYPE__TRAITS_HPP_ #include "rmf_task_msgs/msg/d...
3993914360827d7d31c36013f4d5fd185b2e8f2c
c1d4b71910699ceb7acd0a0710473d36d328ba38
aa10000/PEGTL
/pegtl/internal/eolf.hh
C++
hh
790
permissive
// Copyright (c) 2014-2016 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/ColinH/PEGTL/ #ifndef PEGTL_INTERNAL_EOLF_HH #define PEGTL_INTERNAL_EOLF_HH #include "skip_control.hh" #include "../analysis/generic.hh" namespace pegtl { namespace internal { struct...
d93c07d5f66f100b2e5733da8a5d7d386c601bc1
c08798ed16847408cc8133ad6dab40b6b2331b2f
xnf4o/DBD_SDK_460
/SDK/TheHuntress_functions.cpp
C++
cpp
10,649
no_license
// Name: DBD, Version: 4.6.0 #include "../pch.h" /*!!DEFINE!!*/ /*!!HELPER_DEF!!*/ /*!!HELPER_INC!!*/ #ifdef _MSC_VER #pragma pack(push, 0x01) #endif namespace CG { //--------------------------------------------------------------------------- // Functions //------------------------------------------------------...
45ee83e80249c8901768f101f97369b7a231ebb7
178603e101a7b3fe7012b90ad0560b2f211ad2cc
Alzhan01/CPP
/Task23.cpp
C++
cpp
260
no_license
#include <iostream> using namespace std; int main(){ double x,a,y,k; cin>>x; cin>>a; cin>>y; cin>>k; cout<<y<<" Killogramm stoyat "<<a/x*y<<" Rublei"<<endl; cout<<"Za "<<k<<" Rublei mojno kupit' "<<k/(a/x)<<" Kilogramm konfet"; return 0; }
4719bb342bd5495b8ee6a20a8e9dba0d22d67797
df40e7d01f47f723217e6c1e011e7a1932ed4a60
gpreviato/Mulberry-Mail
/Sources_Common/HTTP/WebDAVClient/CWebDAVDelete.cpp
C++
cpp
1,233
permissive
/* Copyright (c) 2007 Cyrus Daboo. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless re...
cf68cfb2861d8445793cb9e63f922f2644b2c664
33b35115547c0cec582ade47a32e901aff549da2
chenjunlin-innovate/ACM
/ACM新人训练/第二周 基础排序加思维训练/G/main.cpp
C++
cpp
309
no_license
#include<iostream> #include<cmath> #include<algorithm> using namespace std; int main() { int l, r, a; while (cin >> l >> r >> a) { int ans(0); if (a > abs(l - r)) { ans += max(l, r) * 2; ans += (a - abs(l - r)) / 2 * 2; } else { ans += (min(l, r) + a) * 2; } cout << ans << endl; } }
2a58c4e5213bff1d23059649a76b6f10099ff128
2779a85a6d569120e3ccda9ecd3f9db6321c3c2f
saadrahim/rocPRIM
/rocprim/include/rocprim/device/device_transform.hpp
C++
hpp
11,055
permissive
// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. // // 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 // t...
590112a48e7a983123a73717cbf14c874c94c91d
d74a17c0e2e2318baca82f870e725e646c0d5826
bitengen/Bitengen1
/src/miner.cpp
C++
cpp
18,181
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2013 The NovaCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "txdb.h" #include "miner.h"...
b3e2ebe88c635d8768cdeb50bd8702f6245504e0
260a782639cb9b4b50315c539acb595ce42547bb
oliverboldt/OBMTlib
/SensorLokal.cpp
C++
cpp
2,621
no_license
#include "SensorLokal.h" #include "Arduino.h" SensorLokal::SensorLokal(int id, int pin, Type type) : m_id(id) , m_pin(new Pin(pin,INPUT)) , m_type(type) , m_wert(0) /*, m_timeUp(0) , m_timeDown(0) , m_timeUpLength(0)*/ , m_triggered(false) , m_triggerFunction(NULL) { if (pin >= 0) pinMode(...
9bd3fb74a6f77c57fbf84f60eb56f1d798b7caac
b45cb1353381ea71868857ea9c89386f7ada426c
openharmony-sig-ci/powermgr_battery_manager
/services/zidl/src/battery_srv_stub.cpp
C++
cpp
4,143
permissive
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
b2ed21421593ba6c77f34f1188dd3d07fabf7499
81abd74d7015a752d73f7a61476a4d68ef804eb0
anirudhkannanvp/CODECHEF
/Practice/CONFLIP.cpp
C++
cpp
383
permissive
#include <iostream> #include<limits> #include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); long int t,g,n,I,Q; cin>>t; while(t--) { cin>>g; while(g--) { cin>>I>>n>>Q; if(Q==I || n%2==0) { cout<<n/2<<endl; } ...
6480ce3f148e974c5deb4b50b2cd95d46502c015
9c91c43f4927036afbb00166469981ca12f7d1d2
kuscsik/ozone_haisi
/eglhaisi_surface_factory.cc
C++
cc
5,479
permissive
#include "base/files/file_path.h" #include "base/native_library.h" #include "ui/ozone/platform/eglhaisi/eglhaisi_surface_factory.h" #include "ui/ozone/public/surface_ozone_egl.h" #include "ui/ozone/public/surface_factory_ozone.h" #include "ui/gfx/vsync_provider.h" #include <EGL/egl.h> #include "EGL/fbdev_window.h" #in...
becde1927e11467285643575e4e89169894e0fd7
b673925edc80b528d29e85353fe0afd59b21dac6
bitGraf/Rohin
/Engine/src/Engine/Resources/Catalog.cpp
C++
cpp
1,644
no_license
#include <enpch.hpp> #include "Catalog.hpp" namespace rh { bool is_power_of_two(uintptr_t x); uintptr_t align_forward(uintptr_t ptr, size_t align); void Catalog::init(void* backing_buffer, size_t backing_buffer_length, size_t block_size, size_t block_align) { buffer = (unsigned char*)backing_buf...
bfe232eb5fa0c50bf9cc0d82bcda79b2ca3d8644
4e40c7ddd2d7dfbcc9cc4ce6680efaea2eaf82ec
ntustison/Utilities
/src/OldCode/2D/ConvertTensorFieldToVTK.cxx
C++
cxx
2,862
no_license
#include "itkVectorImageFileReader.h" #include "itkVector.h" #include "itkImageRegionIteratorWithIndex.h" #include "vtkStructuredGrid.h" #include "vtkStructuredGridWriter.h" #include "vtkFloatArray.h" #include "vtkPoints.h" #include "vtkPointData.h" #include "global.h" int main( int argc, char *argv[] ) { if ( ar...
31b37ab708e2b0bab1d45ad4dfad0079dc6356ee
e1ad5fb5155857450726903be89ce0ed108c6bba
PunnyOz2/POSN-Programming
/May/Lowest common ancestor/Food web(Binary).cpp
C++
cpp
1,059
no_license
/* TASK: LANG: CPP AUTHOR: Pun~ SCHOOL: CRU */ #include<bits/stdc++.h> using namespace std; int dp[22][100007],lv[100007],in[100007]; vector<int> g[100007]; void dfs(int u, int p,int lvl){ dp[0][u]=p; lv[u]=lvl; for(auto e:g[u]){ dfs(e,u,lvl+1); } } int LCA(int a,int b){ int ...
ac96166c14faefe0ea78fcba2186e0a7be4d4df7
2f0d3d1e3a5ac8c164f262f60f5384d3020f04b8
ksekimoto/llvm-project
/llvm/lib/IR/ConstantRange.cpp
C++
cpp
62,791
permissive
//===- ConstantRange.cpp - ConstantRange implementation -------------------===// // // 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 // //===---------------------------...
03dffbeabece66a44a15d63235100cde41da5bca
618eabb4a613b0003f6800d98fa130edeaa3ca93
petersn/tausch
/crunch/bn_tester.cpp
C++
cpp
2,289
permissive
// Simplest exponentiation test. #include <stdio.h> #include <sys/time.h> #include <gmp.h> #include <openssl/bio.h> #include <openssl/bn.h> #include <openssl/rand.h> #include <openssl/err.h> #define EXP_ITERS 300 #define DT ((stop.tv_sec + stop.tv_usec*1e-6) - (start.tv_sec + start.tv_usec*1e-6)) #define STATS(iter...
218fbfe0de816e82c4cde547b27fe33b9f512729
6c1766922dc18b26cdd8468ef755b5853b68ffc1
imos/icfpc2015
/boost/iostreams/skip.hpp
C++
hpp
4,006
no_license
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2003-2007 Jonathan Turkanis // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boost.org/libs/iostreams for d...
ea533f62c9e1b81f6c724cf23d2c1cb0dafdb2fd
f6026d8793deb861ec86cbf57e0e7e481c034bf0
chxj1980/ht-recorder-client
/HTRecorder/common/HTDateTime.cpp
C++
cpp
10,989
no_license
#include "Common.h" #include "HTDateTime.h" #define ADJUST_TIME(x, y) ((x) * 1000 + (y)) / 1000 #define ADJUST_MSEC(x) (x) >= 0 ? (x) % 1000 : 1000 + ((x) % 1000) static const unsigned __int64 EPOCH = 2208988800ULL; static const unsigned __int64 NTP_SCALE_FRAC = 4294967295ULL; #define FMAXINT (4294967296.0) ...
061777a128b81f0997711a32d388e9afdeaa8ea7
791ef75d86299a7f06484d1fef5d5e4eb1854989
Hanawaro/Turing-machine
/Project/SceneLoader/Scenes/Scene_01/Alphabet/InputBar/InputBar.cpp
C++
cpp
6,321
no_license
#include "InputBar.hpp" InputBar::InputBar(SDL_Renderer* l_Renderer) { m_Renderer = l_Renderer; value.data = new TextEntity(m_Path, 22, {0, 0, 0}, Status::alphabet, l_Renderer); value.height = value.data->GetDstRect()->h - 4*2; value.width = (value.data->GetDstRect()->w * value.height) / value.data->G...
50e9b98e02184c138acf7a0ef7311728dbba1750
297b9dd2f32f0cb0088eca455a2c9be03c956ccd
snowsky/CompCoin
/src/qt/askpassphrasedialog.cpp
C++
cpp
10,000
permissive
#include "askpassphrasedialog.h" #include "ui_askpassphrasedialog.h" #include "guiconstants.h" #include "walletmodel.h" #include <QMessageBox> #include <QPushButton> #include <QKeyEvent> extern bool fWalletUnlockStakingOnly; AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : QDialog(parent),...
d320e7b9ac1872a7a5f389d690f87cba67579940
920afd7752b7d897577f3b4996e3b563d7714e10
kimmikimmi/Algopool
/acm/10870/10870.cpp
C++
cpp
425
no_license
#include <iostream> #include <vector> #include <algorithm> #include <list> #include <map> #include <cmath> #include <cstdio> #include <cstring> #include <stack> #include <tuple> #include <set> using namespace std; int n; void input(std::istream& pin) { pin >> n; } int fibo(int n) { if(n == 0 ) return 0; if(n== 1...
5d9a7d599f952e3241428de1ebc6d09feb70d227
39e26e1068139f84e1c3975aaaddfced8815ef20
allanleung/cs221
/lab2/insertion.cc
C++
cc
1,556
no_license
#include <iostream> #include <cstdlib> #include "insertion.h" using namespace std; // insertion sort with several errors // store command-line arguments in x[] array void getArgs( int argc, char **argv ) { x_size = argc - 1; for( int i = 0; i < x_size; i++ ) x[i] = atoi( argv[ i+1 ] ); } void scootO...
37fa8cbadde7493be8bc6c482f8981d402286a51
f1d22171b859dd912b72cb07aaead0f0b299f351
ktran050/Portfolio
/plusplus/csCourseWork/SI/SI_Quarter1/Test.cpp
C++
cpp
247
no_license
#include <iostream> using namespace std; int main() { int ex; cout << "Which exercise? "; cin >> ex; cout << endl; if ( ex == 1 ) { // All Exercise 1 code } else if ( ex == 2 ) {
3fa13097a0fa26d082d3582191cc01d03f582233
4e695083638471d4dac08ddd43094065a8577b2a
jjj404001/CS230_Final
/CS230_Final/Mesh.cpp
C++
cpp
14,280
no_license
#include "Mesh.h" #include "Font.h" #include <cmath> #define PI 3.14159265f #define FONT_SIZE vector2(256,256) unsigned int Mesh::number_of_element_per_stride = 10; // Position 3 + Color 4 + Texture 3 namespace Math { float inversed_radian = (PI) / 180; } void Mesh::Emplemplace_back_whole_attrib(const float size, co...
9fd3175700852241a25ea0b9c1397e40cf139fbe
2d3e2597673967467d4c779ca072db8c1d15b66b
physician/LeetCode
/SearchforaRange.cpp
C++
cpp
3,348
no_license
/* Author: physician Date: Feb 01, 2015 Update: Feb 01, 2015 Problem: Search for a Range Difficulty: Medium Source: https://oj.leetcode.com/problems/search-for-a-range/ Problem Description: Search for a Range: Given a sorted array of integers, find the starting and ending position of a ...
91a6abc3f7d93350c40b0b550e50027ae1cbfc9a
19fead398416f6f0dfa904a93cf3d113a7efd934
yechang1897/algorithm
/面试/面试美团_3.cpp
C++
cpp
1,423
no_license
#include<iostream> #include<algorithm> #include<string> #include<vector> #include<cmath> #include<unordered_map> using namespace std; int getMost(unordered_map<int, int>& nums) { unordered_map<int, int>::iterator it; int i = it->second; int num = 0; int max1 = 0; int max2 = 0; int res = 0; ...
8ba385e5eb722ce5646cee66239423af05b98744
e54a49721a9c4266a1bb9ab8cd03e57696cef65a
aliyun/aliyun-openapi-cpp-sdk
/r-kvstore/src/model/ModifyInstanceAutoRenewalAttributeResult.cc
C++
cc
1,381
permissive
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
aede44050946d336819fffaa8f080575456f6a68
2cf5c954d93bc5b101c7f368a20d55d5d39f1032
swissco67/B1_EPG04_AR
/src/B1PrimaryGeneratorAction.cc
C++
cc
459
no_license
#include "B1PrimaryGeneratorAction.hh" #include "G4Event.hh" #include "G4GeneralParticleSource.hh" #include "G4ParticleDefinition.hh" B1PrimaryGeneratorAction::B1PrimaryGeneratorAction() : G4VUserPrimaryGeneratorAction(), gun(0) { gun = new G4GeneralParticleSource(); } B1PrimaryGeneratorAction::~B1PrimaryGenerato...
f908a98cd496935183c75970a07551d4dcf7c045
8ac110a4709451022f52d2e82dd7a9b87842aace
LUCIFER-dev-king/SDE_SHEET
/day1/01_FindDuplicate.cpp
C++
cpp
1,156
no_license
#include <bits/stdc++.h> using namespace std; //1. Find the duplicate in an array of N+1 integers. /*Bruteforce approach */ class Solution { public: int findDuplicate(vector<int> &nums) { int n = nums.size(); vector<int> temp(n + 1, 0); for (int i = 0; i < n; i++) { if (temp[nums[i]] != 0) ...
f96a3cd200a38d7de0af16b91d94b395885b94a8
4a126cb9203a768b161e722c2aefd218808e946d
CaptainTsao/hana.zh
/hana/remove.hpp
C++
hpp
1,647
permissive
/*! @file Defines `boost::hana::remove`. @copyright Louis Dionne 2013-2016 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_REMOVE_HPP #define BOOST_HANA_REMOVE_HPP #include <hana/fwd/remove.hpp> #include...
ef32d05fcd0083dd8abda8c93ad4bd6836d6a21b
dceb655e7ac56523b376adc74ab035fd58d22406
konaitor/104a_Pair
/asg4_work(Gahl)/symtable.cc
C++
cc
6,667
no_license
#include "auxlib.h" #include "symtable.h" // Creates and returns a new symbol table. // // Use "new SymbolTable(NULL)" to create the global table SymbolTable::SymbolTable(SymbolTable* parent) { // Set the parent (this might be NULL) this->parent = parent; // Assign a unique number and increment the global N th...
2de5de016124878c3cfc58589eb82e0f8fe2bf53
356fb59563226a0fc93df9951215a4df6e76a729
pyfsi/Kratos
/kratos/containers/model.cpp
C++
cpp
14,012
permissive
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // Pooyan Dadvan...
7c7b4b41d4de370c3f88c648e89fc49f9a0318ae
67df63e4740fd7a850fc99600dc90a7a1bea69df
hasan-kamal/Competitive-Programming
/codeforces/cf_582/c.cpp
C++
cpp
627
no_license
#include <iostream> #include <vector> using namespace std; typedef long long int ll; typedef vector<ll> vll; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int q; cin >> q; ll n, m; while(q--){ cin >> n >> m; ll l = 1, s = m % 10, i = 2; vll sum(2, 0); sum[1] = s; while( (i * m) % 10 != (...
d655dddffd878c570a802a08b22e885cdaf7e70d
7b5f2f77f6e2209131678f81d4c457bda524f12e
filipemleite94/Exercises
/Symmetric Tree/Symmetric Tree.cpp
C++
cpp
640
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { private: bool areTreesSymmetric(TreeNode* root1, TreeNode* root2){ if(!root1||!root2) ...
894d53417c7c525c5dd317b58177e19523560e72
6ac966287f3d0fe32543ff3b189aa2471da2ae33
PengChaoJay/chromium
/chrome/common/chrome_features.cc
C++
cc
43,893
permissive
// Copyright 2016 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 "chrome/common/chrome_features.h" #include "base/command_line.h" #include "base/feature_list.h" #include "base/strings/string_split.h" #include ...
f4ce68a1215b1271caa5ac1fe4be2aaabfd521b6
00dff8261e4cea5cf338b46bc0f4adf04188709b
mborgerson/OpenXBOX
/src/kernel/NtQuerySymbolicLinkObject.cpp
C++
cpp
564
no_license
#include "common.h" /* * NtQuerySymbolicLinkObject * * Import Number: 215 * Calling Convention: stdcall * Parameter 0: HANDLE LinkHandle * Parameter 1: POBJECT_STRING LinkTarget * Parameter 2: PULONG ReturnedLength * Return Type: NTSTATUS */ int Xbox::NtQuerySy...
aeb38b87c9d4d24a3e433ed9101a50bcefd92390
35e9e6faa3151de57806d1fb8bf734f21b559a88
thalium/icebox
/third_party/retdec-3.2/tests/loader/segment_tests.cpp
C++
cpp
11,196
permissive
/** * @file tests/loader/segment_tests.cpp * @brief Tests for the @c segment module. * @copyright (c) 2017 Avast Software, licensed under the MIT license */ #include <gtest/gtest.h> #include "retdec/loader/loader/segment.h" using namespace ::testing; namespace retdec { namespace loader { namespace tests { clas...
ae1a58fb4a9fa9287545264ed67ad85146afcd29
866921e4bdf9a98483f273aa89d098ac5179f87b
Mordeguy/Code
/C Language(s)/CST8233 - Numerical Computing/Assignment 3 - Hoynes.cpp
C++
cpp
5,352
no_license
/* FILE HEADER ------------------------------------------------------------------------------------------ File Name: ass3.cpp Version: 1.0 Author/Student Name: Nathan M. Abbey Student Number: 040 - 557 - 192 Course Name and Number: CST8233 - Numerical Computing Lab...
86671ae9f3f40a2fe62be7b9eda1cf0cb6772a99
5d369a7c0b99d8ccc861566b83dd1b10736dd2a0
Josua95/Studienarbeit-CNN-x86
/src/CNN.cpp
C++
cpp
8,040
no_license
/* * CNN.cpp * * Created on: 09.03.2018 * Author: josua */ #include <vector> #include <iostream> #include <math.h> #include <time.h> #include "ConvLayer.hpp" #include "MaxPoolingLayer.hpp" #include "FullyConnectedLayer.hpp" #include "PictureContainer.hpp" #include "Mathematics.hpp" #ifdef _OPENMP #include <...
71dac5a0d02c0749aa20f842d13bbe692286f137
a88d9bce52372483d6a17233865566d55c7d131c
birkett/maniadminplugin
/mani_admin_plugin/mani_playerkick.cpp
C++
cpp
2,832
no_license
// // Mani Admin Plugin // // Copyright © 2009-2015 Giles Millward (Mani). All rights reserved. // // This file is part of ManiAdminPlugin. // // Mani Admin Plugin 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 Softwar...
72c6a76074f7ebbe4b6f51303b2387726791779f
3432d11fb11903a02b8efb82027f205a4a17115f
Alexandrovith/TestCpp
/Tags.cpp
C++
cpp
2,224
no_license
#include "RowOutPar.h" #include "Tags.h" namespace TestCpp { CTags::CTags () { InitializeComponent (); FDOpenFl->Filter = "Файлы параметров|*.prmd|Все файлы|*.*"; FDOpenFl->Title = "Открытие файла параметров"; /*CSerialize::ReadFl ("Superflo.prmd", PShowParams);*/ } //_____________________________________...
f129b395ce7f8a35fed9dfb41bb07ac4c9eb9dcc
f138abc0fedf698b9242f8e90f6b7ff4ac3a9152
walterian/mkl-dnn
/src/common/primitive.hpp
C++
hpp
2,111
permissive
/******************************************************************************* * Copyright 2016-2019 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...