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
0d2dc11d661ef3e5de053e5018f5750262be775d
fde66fcabb5ce1c2d1921b45bdaef056ddece1d8
themightyoarfish/intro-to-c
/Übung 8/src/math/Quaternion.cpp
C++
cpp
1,780
no_license
#include "Quaternion.hpp" namespace asteroids { Quaternion::Quaternion() { // Default Quaternion x = 1.0; y = 0.0; z = 0.0; w = 0.0; } Quaternion::~Quaternion() { // Do nothing } Quaternion::Quaternion(Vertex vec, float angle) { // Calculate the quaternion fromAxis(vec, angle); } Quaternion::Quaternion(fl...
28b5526eb6b497273580bade90402f1ae463eea7
581352ed9f2132d63aedc0059f71409e2ef29b50
JeremyDaug/Labyrinthian
/AbilityPack.cpp
C++
cpp
479
no_license
#include "AbilityPack.h" AbilityPack::AbilityPack() { } AbilityPack::~AbilityPack() { } Ability* AbilityPack::getAbility(int index) { if (abilities.size() <= index) return nullptr; return abilities[index]; } std::string AbilityPack::HasRequirement(std::string req) { if (reqs.find(req) == reqs.end()) retu...
04f02aef3cfa7ba7100e512d028a92af043c3dc0
8e2f114dcd35b9e50802f714e42c405d25096c24
aalto-mediacode/tutoringExamplesNuno-2020
/PerlinNoise2D-linesClasses2/src/ofApp.cpp
C++
cpp
3,185
no_license
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofBackground(0); // ofRectangle newRectangle; // for(int i=0;i<1000;i++){ // newRectangle.set(ofRandomWidth(),ofRandomHeight(),20,20); // myArea.push_back(newRectangle); // } } //-------...
ebf3ab3d5fa87c79c70fa899e5a7eadd9d828ace
62b8014c80ca7f2ef800fb88b451eaab72dc33cf
AudioBucket/AudioTK
/ATK/EQ/RIAAFilter.hxx
C++
hxx
3,189
permissive
/** * \file RIAAFilter.hxx */ #include <cmath> #include <boost/math/tools/polynomial.hpp> #include <ATK/EQ/RIAAFilter.h> #include <ATK/EQ/helpers.h> namespace ATK { template<typename DataType> RIAACoefficients<DataType>::RIAACoefficients(std::size_t nb_channels) :Parent(nb_channels, nb_channels) { } ...
b895819e50b4998807a32897ab21403408bbe61b
42ab91b8c690fec21f82fdd9ed2d02d75bfe244e
shogun-toolbox/shogun
/examples/undocumented/libshogun/evaluation_cross_validation_locked_comparison.cpp
C++
cpp
4,346
permissive
/* * This software is distributed under BSD 3-clause license (see LICENSE file). * * Authors: Heiko Strathmann, Soeren Sonnenburg, Evgeniy Andreev, Soumyajit De, * Jacob Walker, Sergey Lisitsyn */ #include <shogun/base/init.h> #include <shogun/features/DenseFeatures.h> #include <shogun/labels/BinaryLabe...
05af92949e0b1a0a52ab3629b3064429fc3223aa
8fd8b955dcd08d8174c9839a95713908cc15b58c
meniossin/src
/base/trace_event/cfi_backtrace_android.cc
C++
cc
13,013
permissive
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/trace_event/cfi_backtrace_android.h" #include <sys/mman.h> #include <sys/types.h> #include "base/android/apk_assets.h" #if !defined(ARCH...
3158e92e1030a49151504278aac1e94cefa6a493
b8af4f377623b45bde742a4f3259f516ff1d92a4
apostud/Mininet-Router
/skel.cpp
C++
cpp
7,271
no_license
#include "skel.h" #include <iostream> extern int interfaces[ROUTER_NUM_INTERFACES]; int get_sock(const char *if_name) { int res; int s = socket(AF_PACKET, SOCK_RAW, 768); DIE(s == -1, "socket"); struct ifreq intf; strcpy(intf.ifr_name, if_name); res = ioctl(s, SIOCGIFINDEX, &intf); DIE(res, "ioctl SIOCGIFINDEX...
6b28b4679f08e6a9af1a7e5dce1b22029e6c01b3
5dbdf08623d036d0c4197939237e56c9656e424e
dibery/UVa
/vol113/11327.cpp
C++
cpp
1,755
no_license
#include<cstdio> #include<climits> #include<algorithm> using namespace std; int prime[ 3410 ] = { 2 }, size = 1, pow2[ 15 ] = { 1 }; bool isprime[ 31622 ] = { false, false, true }; int gcd( int a, int b ) { return a % b? gcd( b, a%b ) : b; } bool check( int n ) { for( int i = 0; i < size && prime[ i ] * prime[ i ] <=...
546e09d8437a490d1c240a85b076328feef10753
e97109fa3dca93b3de0951b6e5c5547b5e96e59d
Amybiubiu/LeetCode
/offer12.exist.cpp
C++
cpp
877
no_license
class Solution { public: bool exist(vector<vector<char>>& board, string word) { n = board.size(); m = board[0].size(); for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ if(dfs(board, i, j, word, 0)){ return true; } ...
bca2567524d5b78fb4e3b0785f436404eee3f9ac
2e10602b82c3f133e2041f3e6c85adb42f600ab4
nrithyatheetharappan/CS211-IoT-analytics
/cpp_parser-revised.cc
C++
cc
7,821
no_license
//A C++ program to take 4 log files as inputs and output an easy to read interpretation of the AT command trace //can be extended to any number of files by opening the file in the main function //and calling the operate_on_file function with filename as argument //the output can be displayed on console or redirected to...
5c7eb2006545b165d93bfdaba23814991f642b95
f35a7f220e989fe0100be418f87fc82791fbc656
ByunghunLee/linkedin_training
/chapter1/data.cpp
C++
cpp
252
no_license
#include <cstdio> using namespace std; struct A{ int ia; const char* sb = ""; int ic; }; int main(){ A a; a.ia = 1; a.sb = "two"; a.ic = 3; printf("ia is %d, sb is %s, ic is %d\n", a.ia, a.sb, a.ic); return 0; }
0be86c8a8eefcf9e27186949de06010a0830cdbf
491ad66ed794fd3ce961c9161438d802d348830c
chenan02/Interview-Practice
/linked_lists/delete/delete.cpp
C++
cpp
774
no_license
#include <iostream> using namespace std; struct Node { int data = 0; Node *next = NULL; Node(int data) : data(data) {} }; void deleteNode(Node **head, Node *deleting) { if(*head == deleting) { *head = deleting->next; delete deleting; } else { Node *current = *head; while(current->next != ...
3ff00a3fba7b22af02449346dd4aca87467586f0
a32464178b6e5916280de989c2b40bb0fc3f9f81
TheTastyGravy/Daily-Warmups
/13 - Othello/Source.cpp
C++
cpp
5,263
no_license
#include <iostream> #include <vector> typedef std::vector<std::vector<char>> OthelloBoardState; bool IsValidMove(char player, int x, int y, const OthelloBoardState& grid) { // Size of the game board const unsigned int SIZE = 8; // Determine the opponents playing piece const char opp = (player == 'B')...
138255a07ed6dc83d581a3da159665c33db82ac2
65758daf6adad5a29a828bf243743e0a182d3fe7
pavelkumbrasev/cpp-courses
/11_smart_pointers/11_13_weak_ptr_example/11_13_00_weak_ptr_example.cpp
C++
cpp
717
permissive
#include <unordered_map> #include <memory> struct widget {/*...*/}; struct id_type {/*...*/}; // This function can be expensive std::unique_ptr<const widget> widget_factory( id_type id ) {/*...*/} std::shared_ptr<const widget> widget_factory_with_caching( id_type id ) { static std::unordered_map<id_type, std::w...
4e0aa113964ee6e2f1ecbb86eaf16f6850eeea09
5c51f28089c9a965cc582cf28eb4b9f1d43107e1
7blasts/Test
/src/third_party_src_glm/glm/gtc/type_precision.hpp
C++
hpp
19,045
no_license
/////////////////////////////////////////////////////////////////////////////////////////////////// // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) /////////////////////////////////////////////////////////////////////////////////////////////////// // Created : 2009-06-04 // Updated : 20...
e44792dbb16a5a7ac3e5f83aa9beb9a8e8e7ddaa
899697275bbcc7f6bbd7d286702b26fa7cb07839
Cl0v1s/unamedRogueLike
/src/PacketAskMap.cpp
C++
cpp
422
no_license
#include "PacketAskMap.h" PacketAskMap::PacketAskMap() : Packet(NETWORK_ASKMAP) { } void PacketAskMap::prepare(SceneGame *scene) { } void PacketAskMap::process(SceneGame *scene, sf::UdpSocket &socket, sf::IpAddress &distant, unsigned short port) { //répond en envoyant un paquet send map PacketSendMap response; ...
198bdccfd8fc320c68cae0a64fcd9d50b93a0f55
e0c20171e0c56f4952dfa1bf9f2179246ef859ab
amanakin/MCPUx32
/scr/cpu/EXECUTOR.cpp
C++
cpp
509
no_license
#include <stdio.h> #include <string.h> #include <math.h> #include <windows.h> #include "M_CPUx32.h" #include "../../log/log.h" #include "../dsm/dsm.h" int main() { LOG_MESS(GOOD, "WE STARTED\n") CP_Intro(); char exeName[] = ""; scanf("%s", exeName); CPU_32 proc = {}; CP_DataCtor(&proc); ASM_DATA asmData ...
572c5bfcc4818d5ec24da425fc47cde139eacfc3
672cb7fa1ec13afcf4a650d7d9ca12dd68ecbdbc
SBU-Cpp-Club/cpp-exercises
/chapter-03/exercise-3.1-bs.cpp
C++
cpp
1,075
no_license
#include<iostream> using std::cin; using std::cout; using std::endl; struct Sales_data{ std::string bookNo; int units_sold = 0; double price = 0.0; double revenue = 0.0; }; int main() { Sales_data currentItem, Item, sumItems; int cnt = 0; cin >> currentItem.bookNo >> currentItem.units_so...
12664a90866e5fd2479431c3c8e447bdfe1fa241
07ea9fe4d3add2e780d6dfedb42a0a5f9f18cad4
coletiv/universal-c
/test/unit/universal_transport_messages_test.cc
C++
cc
1,581
permissive
#include "gtest/gtest.h" #include "universal_transport_messages.h" TEST(universal_transport_messages_test, transport_messages_session_authenticate) { const char * _session_user_id = "27aeae53-f5d3-429d-82a9-35d0355b875c"; const char * _session_device_token = "27aeae53-f5d3-429d-82a9-35d0355b875c"; const ...
5798432913a97696df8960daca3f1076017d3622
5779bcd2cf14625c1eda1a93725a987b8794c197
MrStark135/Minesweeper
/Class/MineField.cpp
C++
cpp
8,060
no_license
#include "MineField.h" #include "Game.h" #include "TextureManager.h" #include "InputHandler.h" #include <thread>//to be able to put to sleep the current thread #include <iostream> MineField::MineField(int width, int height, int numMines, int offsetX, int offsetY) :_width(width),_height(height),_numMines(n...
6a769806ba1e717720988f483ed65eeff6796788
67e2c5ea773a8989676f7b81829ca74ae0bccb62
15831944/barry_dev
/src/IILMgr/IILBigHitQuery.cpp
C++
cpp
109,980
no_license
//////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2005 // Packet Engineering, Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification is not permitted unless authorized in writing by a duly // appointed officer of ...
9533e80cf25642d561cc534a04d041bf29e053f1
b5cb11a5db2042f87232e222b9e271347ce45f58
alexandraback/datacollection
/solutions_5706278382862336_1/C++/vgarg/a.cpp
C++
cpp
1,208
no_license
#include <algorithm> #include <iostream> #include <sstream> #include <vector> #include <cstdio> #include <string> #include <cmath> #include <queue> #include <stack> #include <set> #include <map> using namespace std; typedef long long ll; const int INF = 1e9; typedef pair<int,int> pii; ll gcd(...
f2991b9b7793c093a79cc064f578b76de38c35e2
a3533179abb7db2e154ab4103561bccc8f84749e
udit043/little_bit_competitive
/chef/MIXCOLOR.cpp
C++
cpp
444
no_license
#include <bits/stdc++.h> using namespace std; #define ll long long #define mx 1000007 #define sd(x) scanf("%d", &x) #define sll(x) scanf("%lld", &x) int a[mx]; int main() { int t; sd(t); while(t--) { memset(a, 0, sizeof(a)); int n, i, f=0; sd(n); for(i=0; i<n; ++i) { sd(a[i]); } sort(a, a+n); fo...
b8f5f140ad0ac3adf41ba2e2106448079bd9cd03
a4cbfc2bf54f03e3edb6ddb33947ae34145c2e2c
ggaspar/orion
/matchState.cpp
C++
cpp
1,429
no_license
#include "matchState.h" bool MatchState::isPlayerFirstToPlay(PlayerId player) { return (*_allPlayersCurrentStatus)[player]->_isFirst; } bool MatchState::hasPlayerPlayed(const PlayerId player) { return (*_allPlayersCurrentStatus)[player]->_played; } Card* MatchState::getCardOfPlayer(PlayerId player) { return (*_all...
16df91c00f4464eb798fb601178c37344dad8095
6bd7091d3b06774c775b3837f7ccf9b2dbe694aa
braeden/Cpp-NCC
/14_1.cc
C++
cc
332
no_license
#include <iostream> #include <stdlib.h> #include <time.h> using namespace std; int initRand(void); int main() { int i; srand(time(NULL)); int a; int myrand; int printIt(); for (i=0; i<100; i++) { a = initRand(); cout << a << "\n"; } } int initRand(void) { int myrand; myrand = rand() % 100 + 1; retur...
f1cc4ec2b60662dca30e86169f04b9f8678c46fd
2470fe0c0a4c48c2bd0924a9bc3b241b2a2469be
NotAPenguin0/-DISCONTINUED-SaturnEngine
/GLFinal/Skybox.cpp
C++
cpp
3,177
no_license
#include "Skybox.hpp" #include <fstream> #include <string> #include <vector> #include "OpenGL.hpp" #include "depend/stb_image.h" #include "log.hpp" static unsigned int load_cubemap( std::vector<std::string> const& faces) { unsigned int tex; glGenTextures(1, &tex); glBindT...
422dbf3825ee282c2193a09f78ae1fceb143b37a
8c3bdc71b6988459b682597bc46bf59d299b2d62
qfoxic/grapher-client-qt
/src/graph/edge.cpp
C++
cpp
1,466
permissive
#include <QDebug> #include <QPainter> #include <QStyleOptionGraphicsItem> #include <QStaticText> #include "graph/edge.h" #include "graph/node.h" #include <math.h> Edge::Edge(Node *source, Node *dest, QGraphicsItem *parent) : QGraphicsWidget{parent} { setAcceptedMouseButtons(0); setCacheMode(ItemCoordinateCach...
d9503eaa316e2e52157b84f4686f4410740aadda
cfb644b36f8b0a5504fa4428354687e6a42aeda0
Evervolv/android_external_perfetto
/src/trace_processor/importers/proto/metadata_module.cc
C++
cc
7,433
permissive
/* * Copyright (C) 2021 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
77ffb8564c6ec8bba9531ed65c817ec40d134a9a
e29b9cd6bd7170ec249a8df82ee543df19f141a9
strassek-snapshots/gmmlib
/Source/GmmLib/Resource/GmmResourceInfoCommonEx.cpp
C++
cpp
26,110
permissive
/*============================================================================== Copyright(c) 2017 Intel Corporation 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 w...
04e70122970f139fb93351b0f7ccef262964efd7
125152ab142cd36d678912befc02b74ec4c43a89
XingZYu/leetcode
/13.罗马数字转整数.cpp
C++
cpp
1,537
no_license
/* * @lc app=leetcode.cn id=13 lang=cpp * * [13] 罗马数字转整数 */ // @lc code=start class Solution { public: int romanToInt(string s) { char c; string subs; int result=0; for (int i=0; i<s.length(); ++i) { c = s[i]; if (i<s.length()-1) subs = s.substr(i, 2); ...
ca1944ed09581933787c269ae116196085c2afd5
c100a7bc5db6128a91f08005df648944f6c50b0d
MSurfer20/test2
/cpp-qt-client/client/OAIInline_response_200.cpp
C++
cpp
6,604
permissive
/** * Zulip REST API * Powerful open source group chat * * The version of the OpenAPI document: 1.0.0 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #include "OAIInline_response_200.h" #inclu...
c6e1cb2416495f3bc935d1b3dd837b729e15486c
dec1de17b5935fe19e04a053bc1562f6aa738f6f
nguyenphithanh/HocLapTrinhC
/DeQuy/soNguyen.cpp
C++
cpp
231
no_license
// giaithuacua1=1 // giai thua cua 3= giaithua2*3 // giai thua cua n = giaithua(n-1)*n float giaithua(int n){ if(n==1){ return 1; } else { return n* giaithua(n-1); } } int main(){ return 0; }
c354cf39743fbb5041eebad1ea511e4b152e097a
7560cda16c36fd28b7fb0758d80cd93b9e1df460
connectthefuture/psdmrepo
/psddl_psana/tags/V00-06-01/src/epix.ddl.cpp
C++
cpp
297
no_license
// *** Do not edit this file, it is auto-generated *** #include <cstddef> #include "psddl_psana/epix.ddl.h" #include <iostream> namespace Psana { namespace Epix { AsicConfigV1::~AsicConfigV1() {} ConfigV1::~ConfigV1() {} ElementV1::~ElementV1() {} } // namespace Epix } // namespace Psana
41c10a7997221b18bf01220396e0c1ca9a8fe7c3
890300fe6fca58a52409e1555df1d5132a8b9fa7
simond983/Unplayable
/Server/ARGO_Server_Team_E/Server.cpp
C++
cpp
4,008
no_license
#include "Server.h" Server::Server() { // Structure to store the WinSock version. This is filled in // on the call to WSAStartup() WSADATA data; // To start WinSock, the required version must be passed to // WSAStartup(). This server is going to use WinSock version // 2 so I create a word that will store 2 and ...
757c8b76a2cc18550fe7ef3754a8c96d92f06ec1
371a4af52b79ee082f797e1102dc18a09d501eef
darreney/EffekseerForCocos2d-x
/Players/Cocos2d-x_v4/EffekseerRendererGL/EffekseerRenderer/EffekseerRendererGL.VertexArray.cpp
C++
cpp
3,853
permissive
 //----------------------------------------------------------------------------------- // //----------------------------------------------------------------------------------- #include "EffekseerRendererGL.VertexArray.h" #include "EffekseerRendererGL.Shader.h" #include "EffekseerRendererGL.VertexBuffer.h" #include "Ef...
af224a788b1a2c3ebd3af4f93887eecb19ae5fef
5c6a909e46a4efdfffa588ed6d0f845d58a033db
jatrindo/learncpp
/6.x_chapter_6_summary_and_quiz/quiz/q3/program.cpp
C++
cpp
638
no_license
/* * Complere the following program by writing the passOrFail() function, * which should return true for the first 3 calls, and false thereafter. */ #include <iostream> bool passOrFail() { static int passes_left{ 3 }; return (--passes_left >= 0); } int main() { std::cout << "User #1: " << (passOrFail() ? "Pass" ...
43482ee2fb1fbc49d79c0786e62a4ef0eaf8805f
d788576ce4ff49b990d3a547c435683d76d18862
suliaron/solaris.cuda
/src/Solaris.NBody.Cuda.Test/unit_test.cpp
C++
cpp
27,133
no_license
#define _CRT_SECURE_NO_WARNING // includes, system #include <iostream> // includes CUDA #include "cuda_runtime.h" #include "device_launch_parameters.h" // includes Thrust #include <thrust/host_vector.h> #include <thrust/device_vector.h> #include <thrust/reduce.h> //#include "config.h" #include "constants.h" #incl...
15e4a1e59c25e0cc935b3b5e3c7511891562ebd3
faa2f035da7260165f9977be3e394e84ff79d26c
cowo78/canviausb
/src/can/settings_lawicel.cpp
C++
cpp
4,911
no_license
/* * Copyright 2015 Laurent Schall (schall_l@yahoo.fr) * * This file is part of CANviaUSB. * * CANviaUSB 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 ...
c0a4e265008db4bb5d1a01104d51ff1c1d5bff31
0d2cfe796073e212a740935ffe19d901d88f050a
poorscoot/TFG
/PackageTester/Q4SMessageManager.cpp
C++
cpp
7,429
no_license
#include "Q4SMessageManager.h" #include "../PackageCreator/Q4SMessageTools.h" Q4SMessageManager::Q4SMessageManager( ) { clear(); } Q4SMessageManager::~Q4SMessageManager( ) { done(); } bool Q4SMessageManager::init( ) { //done(); bool ok = true; pthread_mutex_init(&mut_section, NULL); sem_in...
71dba3967a7f2420a5ea500728a43d69fee463e8
e3b8b96911eb91ea8087b5130dfd313f8b91955f
pu2oqa/muServerDeps
/_Include/boost/archive/binary_iarchive_impl.hpp
C++
hpp
3,251
no_license
#ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP #define BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_iarchive_impl.hpp // (C) Copyr...
241d43af16a0d938bfa0c41811e7d3866e2c35cd
9ec45c794ff905f838ec78cff7e99c1e101ded1b
degarashi/revenant
/src/tests/common/filetree_func.cpp
C++
cpp
10,628
permissive
#include "../filetreetest.hpp" #include "../../fs/filetree.hpp" #include "../../fs/watch.hpp" #include "../../fs/dir.hpp" #include "lubee/src/range.hpp" #include "lubee/src/random.hpp" #include <fstream> #include <gtest/gtest.h> namespace rev { namespace test { const std::string c_testDir = "test_dir"; Dir MakeTe...
05f697d6a5dbb1daaf36480a74900f705397c54a
9b935bd0ed8881bd8c45a27fa2342424394883d3
oakreid/terminal-snake
/SnakeGame.cpp
C++
cpp
10,487
no_license
#include <iostream> #include <cstdlib> #include <ctime> #include <deque> #include <unistd.h> #include <fcntl.h> #include <unistd.h> #include <sys/mman.h> #include <stdio.h> #include "SnakePart.cpp" #include "Food.cpp" // represents an instance of the game "Snake" class SnakeGame { private: int boardWidth; int boardH...
20aa603728b234d3a8cdfa2661d40bd5583489f9
385d6003f4cac5fa2f63d8e02af4908dccad09ce
ProjectCrypto2K/ArgoniumCore
/tests/unit_tests/check_points_test.cpp
C++
cpp
1,387
no_license
// Copyright (c) 2012-2013 The Argoniumcore developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "gtest/gtest.h" #include "common/util.h" #include "currency_core/checkpoints.h" TEST(checkpoints_test, test_ch...
4fbe1cd9cbdbd1635665c5b01dc276ab69bb0b42
18cc5ccb83f45b399585a673e501644c083e0d6f
vovkos/jancy
/src/jnc_ct/jnc_ct_Module/jnc_ct_AttributeBlock.cpp
C++
cpp
3,278
permissive
//.............................................................................. // // This file is part of the Jancy toolkit. // // Jancy is distributed under the MIT license. // For details see accompanying license.txt file, // the public copy of which is also available at: // http://tibbo.com/downloads/archive/...
c2a69014d52f3ed7261ad6ea141eefd41beb6792
3a7fe9969e91656e786ec51d1506a16523e622b3
pendulm/cpp_primer_5th_exercises
/11/e11.17.cc
C++
cc
656
no_license
#include <set> using std::multiset; #include <vector> using std::vector; #include <string> using std::string; #include <algorithm> using std::copy; #include <iterator> using std::inserter; using std::back_inserter; multiset<string> c; vector<string> v; // function cant be called outside? /*copy(v.begin(), v.end(), ba...
f624cd9c5699ff1b48e19636aab3c6302cd71ab6
07fea6d57e83dae692413ca26989a3004fc3ecb8
terencekwt/opencensus-cpp
/opencensus/trace/internal/trace_options.cc
C++
cc
1,684
permissive
// Copyright 2017, OpenCensus Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
6c84368b9d3d68057a9f3909f57c096927bad23c
bf03d7662c56811bc1faf2eed7258803ce2fd75f
bfierz/brofiler
/ProfilerCore/Core.cpp
C++
cpp
11,283
permissive
#include "Common.h" #include "Core.h" #include "Event.h" #include "ProfilerServer.h" #include "EventDescriptionBoard.h" #include "Thread.h" #include "HPTimer.h" extern "C" Profiler::EventData* NextEvent() { if (Profiler::EventStorage* storage = Profiler::Core::storage) { return &storage->NextEvent(); ...
974cc2b7b3a73f6ab6d64b94157cad2b8b7fcc38
f3b1a1fcf8087dabd4f085bdca9a80f2c97fc488
lcimage/Vitis-Tutorials
/AI_Engine_Development/Design_Tutorials/05-aie_tx_chain_tutorial/design/aie_src/local/src/mixer_2out.cc
C++
cc
4,684
permissive
/* (c) Copyright 2014 - 2021 Xilinx, Inc. All rights reserved. This file contains confidential and proprietary information of Xilinx, Inc. and is protected under U.S. and international copyright and other intellectual property laws. DISCLAIMER This disclaimer is not a license and does n...
124e7f23312cb900b4eb47dc1ffc7d9368cef910
d92601bac31b7640666001a92f1c01c7eaaf6e16
ycdbh/SDL_RGSSPlayer
/RGSS_SDL_MediaPart/rsm_bitmap.cpp
C++
cpp
2,845
no_license
#include "pch.h" #include "rsm_bitmap.h" RSM_Bitmap::RSM_Bitmap(const char* filename) { m_surface = IMG_Load(filename); } RSM_Bitmap::RSM_Bitmap(int width, int height) { m_buffer = new unsigned char[width * height * 4]; m_surface = SDL_CreateRGBSurfaceWithFormatFrom((void*)m_buffer, width, height, 32, 4 * width, S...
4df35a80ec57b8efa16a16e5478e91ef4eb5721b
4a74c7e9d7637976561243517e08cff7cea0a383
dmjoy/kwiver
/vital/io/metadata_io.cxx
C++
cxx
8,869
permissive
/*ckwg +29 * Copyright 2017-2019 by Kitware, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this li...
8f7df8a1ab94cd93acec450402fa623d65e82a2c
93892a00089ccc27ad7891c3779185c94aa5c27a
Ekaterina19/tp-lab-3
/test/tests.cpp
C++
cpp
1,404
no_license
#include "gtest/gtest.h" #include "task1.h" #include "Circle.h" #include "DateTime.h" #include <string> TEST(circle,circle_get_area1) { Circle c(0.0); EXPECT_DOUBLE_EQ(0.0,c.getArea()); } TEST(circle,circle_get_ference1) { Circle c(0.0); EXPECT_DOUBLE_EQ(0.0,c.getFerence()); } TEST(circle,circle_get_...
24a57c2148ae71642b9120efb9ab003e8d612c38
6316bd6a47e810b494bb95ef1f8c2ff5bb6de24d
beuville/minesweepersolver
/GameInterface_deprecated/GameInterface.cpp
C++
cpp
1,470
no_license
#include "Gameboard.h" #include "GameInterface.h" ;//Compile errors in VS9 without ";" using namespace std; Game_specs GameInterface::reportSpecs(){ return board_specs; } /* Send game commands to the gameboard * Allowed commands are: * GETBOARD - returns integer array of current board values * P...
dcc5cc18d43b3f29acf0fb8bd6c68ebd1dbba73e
362fd998aaa318c401ee86b73fafc4871b4e8c7e
LEECHHE/acmicpc
/solved/9507.cpp
C++
cpp
331
no_license
#include <cstdio> using namespace std; int main(){ int t; scanf("%d",&t); long long koong[68] = { 1, 1, 2, 4 }; for( int i = 4 ; i <= 67 ; ++i ){ koong[i] = koong[i-1]+koong[i-2]+koong[i-3]+koong[i-4]; } while(t--){ int k; scanf("%d",&k); printf("%lld\n",koong[k]); } ...
2800755eee3a85b961a436ea23ac1b48e05c56de
b2af0de3a8da2c82e5fc2bd9c4e4b33cba24b77c
kordian127/MissingInteger
/MissignInteger.cpp
C++
cpp
348
no_license
#include<iostream> #include<algorithm> using namespace std; int main(){ int A[]={-3,-2,2,-5,4}; int sizeA=sizeof(A)/sizeof(A[0]); int* p; int* k; k=max_element(A,A+sizeA); for(int i=1;i<=*k;i++){ p=find(A,A+sizeA,i); if(p!=A+sizeA){ cout<<i<<endl; } else{ cout<<"Missing element: "<<i<<...
17e2ca109a72e1bb4e58604f8aa41c21d86eda47
089f391bb3fa3bec60ccd721e2fe55b3582a3874
skyopener/IBAMR
/src/navier_stokes/StaggeredStokesPETScLevelSolver.cpp
C++
cpp
10,702
no_license
// Filename: StaggeredStokesPETScLevelSolver.cpp // Created on 08 Sep 2010 by Boyce Griffith // // Copyright (c) 2002-2014, Boyce Griffith // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // //...
64e2ed5fbd5d93752d747a31dfddac6e0f26fa83
494acdada059962494eb7a6a3affe405ba950f96
NJACKWinterOfCode/nwoc_algorithms
/Algorithms/mathematical_algorithm/Matrix_Exponentiation.cpp
C++
cpp
1,353
no_license
//C++ program to find value of f(n) where f(n) is defined as // f(n)=f(n-1)+ f(n-2)+ f(n-3), n>=3 //Base cases: //f(0)=0, f(1)=1, f(2)=1; //C++ program for MATRIX EXPONENTIATION #include<bits/stdc++.h> using namespace std; //A utility function to multiply two matrices //arr1[] and arr2[] . multiplication result is s...
bfd0af636269683db5107b48a2cf185df16e9ede
5281081088a31aba57133bb8e24ad5f9e1c424f6
kyo-ke/coding_study
/cpp_study/detect_circle.cpp
C++
cpp
1,511
no_license
#include<iostream> #include<vector> #include<string> #include<map> #include<queue> #include<set> #include<cmath> #include<stack> #include<random> #include<iterator> #include <algorithm> #include <functional> #include <cassert> #include <iomanip> #include<unordered_map> #include<bitset> using namespace std; struct Lis...
d3fa37e6950434c4e31d4d9f72816ec02a702fd4
79e2cb9c9d31dce43f8ed5602d69058ef6c8d2a3
maweifei/deeplab-ver2
/src/caffe/layers/video_seg_data_layer.cpp
C++
cpp
12,522
permissive
#include <fstream> // NOLINT(readability/streams) #include <iostream> // NOLINT(readability/streams) #include <string> #include <utility> #include <vector> #include <algorithm> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/highgui/highgui_c.h> #include <opencv2/imgproc/img...
cf16d15b7e03cba5d39e073738b85dab67d6e992
b11b6d5537922b99c7044ebb8d13a5ab4cbcde2f
rick68/thread_adaptor
/thread_adaptor/process.hpp
C++
hpp
1,411
no_license
// // thread_adaptor_process.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2013 Rick Yang (rick68 at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef THREAD_ADAPTOR_PROCESS_HPP #...
be7e27aa2133d2a9b66fc1f5b52229eaad9658b7
2947fbabd204b6257a0b66a05f7337d8830bd1df
Mr-Phoebe/ACM-ICPC
/OJ/SGU/271.cpp
C++
cpp
1,756
no_license
#include<iostream> #include<queue> #include<stack> #include<cstdio> #include<string> #include<cstring> using namespace std; char a[105]; char tmp[105]; int main() { int n,m,k,i; int flag; while(cin>>n>>m>>k) { deque<string> mq; stack<string> ans; flag=0; while(n--) ...
d890e19a88a6c457201d20bf00780d3748b6e703
459b038ffce988711fa998fed02033ca182f7424
ross-alexander/lizards
/cxx/tordbord.cc
C++
cc
26,243
permissive
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <libxml/tree.h> #include <libxml++/libxml++.h> #include "lizards.h" #define NUM_POSSIBLE_LINES 22 struct text_t { const char *full; const char *abb; int order; int (*func)(turn_t *, char *strs[], int pl...
b3affca34abcd7f1d14bcc3f693fa06b109f9fe5
52bba0c8db8dadeb0f1ddd1920b08921bb258bd4
VishalJaishankar/Beginner-CodeChef
/TLG.cpp
C++
cpp
495
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int W; int diff=0; int p1,p2; /*cin>>p1>>p2; diff=p1-p2; if(diff<0){ W=2;//if p2 has a bigger score } else W=1; */ int cum1=0; int cum2=0; for(int i=0;i<n;i++){ cin>>p1>>p2; cum1+=p1; cum2+=p2; if(cum1<cum2 && abs(...
307f078f02d12d17de62f0a7a53d9f7a7acb562e
576241d7fa3aa4bc54e40ec10c915453d7bd1c30
MaxSmile/novacoin
/src/rpcblockchain.cpp
C++
cpp
11,201
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace...
4ccc341dd055cfbff7b8015b6f3cb6ddda631fe5
e8a5b8a063eb74671c7948930b5953a8d6a4e25f
derbess/PP1-assist
/lab9/O.cpp
C++
cpp
370
no_license
#include<iostream> #include<set> using namespace std; char down(char c) { if(c>='A' and c<='Z') return char(c-'A'+'a'); return c; } int main() { string s; cin>>s; set<char> st; for(int i=0;i<s.size();i++) { st.insert(down(s[i])); } set<char>::iterator it; cout<<st.size()<<endl; for(it = st.begin(); it!=s...
1afecf6abd69f05e12e486c0ec35f4fe01a0f789
5d38a518b5357aa26ee47f48db8f4b47fd6d663c
openbmc/phosphor-power
/phosphor-power-supply/util_base.hpp
C++
hpp
2,054
permissive
#pragma once #include "types.hpp" #include <sdbusplus/bus/match.hpp> #include <bitset> #include <chrono> namespace phosphor::power::psu { /** * @class UtilBase * A base class to allow for mocking certain utility functions. */ class UtilBase { public: virtual ~UtilBase() = default; virtual bool getPre...
5336f7f52c067de6da25287152bb1da7d933da62
fd054c5e5b9b07a1de8b22da3cda4a00dd3c03fa
yashkp/cpp
/arrays/arry_rotation.cpp
C++
cpp
1,498
no_license
//juggling algorithm //return type as array #include<iostream> using namespace std; void usingTemporaryArray(int *arr, int n, int d); void rotateOneByOne(int *arr, int n, int d); void reversalAlgorithm(int *arr, int n, int d); int main(){ int arr[] = {1, 2, 3, 4, 5, 6, 7}; int n = sizeof(arr)/sizeof(arr[0])...
2daa13fe73e0d8b20d71efe958290ad866dddad3
c02362aa07ba47f7f8ec9140c51ed8f248619e1a
SenSY96/Local_C_Language
/Chapter_3/3.9/fltadd/main.cpp
C++
cpp
246
no_license
// fltadd.cpp -- precision problems with float #include <iostream> int main() { using namespace std; float a = 2.34E+22f; float b = a + 1.0f; cout << "a = " << a << endl; cout << "b - a = " << b - a << endl; return 0; }
802d2024f363007c9aa9c0381930ab184e64089d
6714c765f43c35fe51e71c6613872a418acead3a
rahulagr2000/TrafficSurveillanceAnalysis
/package_tracking/cvblob/cvblob.cpp
C++
cpp
10,661
no_license
// Copyright (C) 2007 by Cristóbal Carnero Liñán // grendel.ccl@gmail.com // // This file is part of cvBlob. // // cvBlob is free software: you can redistribute it and/or modify // it under the terms of the Lesser GNU General Public License as published by // the Free Software Foundation, either version 3 of the Licens...
92e8bb3cd1c9a932857c6be25d585fb159e7b049
417c89697e6d60973bb881687fe5bddd018cf55b
staring/DuiFramework
/DuiFramework/event/event_dispatcher.cpp
C++
cpp
1,269
no_license
#include "stdafx.h" #include "event_dispatcher.h" #include "event_include.h" namespace ui { bool EventDispatcher::DispatchEvent(UIElement* elem, Event* e) { EventDispatcher dispatcher(elem, e); return dispatcher.Dispatch(); } bool EventDispatcher::Dispatch() { event_->setTarget(elem_.get()...
1e9a6f00bed1fa5b946b7ab29f79c27965899b56
a8333aab2da2e87ad77d2aead229b46c1757be77
JiahongHe/Data-Structures-and-Algorithms
/Algorithms on Strings/Assignment1/trie.cpp
C++
cpp
1,246
no_license
#include <string> #include <iostream> #include <vector> #include <map> using namespace std; typedef map<char, int> edges; typedef vector<edges> trie; bool find_val(map<char, int> edges, char key) { map<char, int>::iterator it; it = edges.find(key); if (it != edges.end()) { return true; } ...
2614f0b5d7324e0bb3cda088c652f56c6a6394f7
620af38fb8805bf417eab5a3f36793bbef81693d
ithsarasak/Programming
/Compettitive programming/codeforces/frog jumpie.cpp
C++
cpp
209
no_license
#include <bits/stdc++.h> using namespace std; int t; long long a, b, k; int main() { scanf("%d",&t); while( t-- ){ scanf("%lld %lld %lld",&a,&b,&k); printf("%lld\n",(k+1)/2*a - (k/2)*b); } return 0; }
4a1cc35e6087457e0da50c92cd0fa5a2cb913992
7b1a2bf41504fe74054eceaa3f2396207191791b
Mr-Clem/nachos2
/nachos/code/threads/thread.cc
C++
cc
16,023
permissive
// thread.cc // Routines to manage threads. There are four main operations: // // Start -- create a thread to run a procedure concurrently // with the caller (this is done in two steps -- first // allocate the Thread object, then call Start on it) // Finish -- called when the...
1c4aafef9aab8a66128466de0f672ccf06095ea4
1e34504f3aa24b6a9f6b6bb7f3b60dd6ee2fd2c6
pvelpur/Object-Oriented-Programming-CPP-and-Java
/CPP project/Trigger.cpp
C++
cpp
1,545
no_license
#include "Trigger.h" #include "Zork.h" Trigger::~Trigger() {} Trigger::Trigger(rapidxml::xml_node<> * node) { setuptrigger(node -> first_node()); } bool Trigger::check(Zork& zork) { for (std::vector<Condition *>::iterator trig_condition = conditions.begin(); trig_condition != conditions.end(); trig_condition++) { ...
f2005002e0740753223d668f4475ec6a793facb3
e0052c24c4a16e13a8ef27d31e38da78a0ee82c0
RC-MODULE/nmpp
/app/test/fixed/signal/Init/nmppsConvert/nmppsConvert_08s32s/main.cpp
C++
cpp
1,049
no_license
#include "nmpp.h" #include "minrep.h" ///////////////////////////////////////////////////////////////////////////////// nm64s *L0; nm64s *L1; nm64s *G0; nm64s *G1; int KB=1024/8; int SizeL0=60*KB; int SizeL1=60*KB; int SizeG0=60*KB; int SizeG1=60*KB; int main() { L0=nmppsMalloc_64s(SizeL0); L1=nmppsMalloc...
b709b614511dcac5ce7caca3dac1008024088620
5f6710d1e545c0e7687f3500a8c10020fc214539
ThomasOttestad/2202
/upcxx/atomic.hpp
C++
hpp
11,338
no_license
#ifndef _4fd2caba_e406_4f0e_ab34_0e0224ec36a5 #define _4fd2caba_e406_4f0e_ab34_0e0224ec36a5 #include <upcxx/backend.hpp> #include <upcxx/completion.hpp> #include <upcxx/global_ptr.hpp> #include <upcxx/backend/gasnet/runtime.hpp> #include <climits> #include <cstdint> #include <vector> #include <type_traits> namespac...
5ad0572bb92903e5c5537e8dd37dcb524120574f
ebcad7791d8546b46efa0f95e575b2d2e102fbda
zhyhou/Smilei
/src/Field/Field3D.cpp
C++
cpp
9,502
no_license
#include "Field3D.h" #include <iostream> #include <vector> #include <cstring> #include "Params.h" #include "SmileiMPI.h" #include "Patch.h" #include "Tools.h" using namespace std; // --------------------------------------------------------------------------------------------------------------------- // Creators f...
bd3d29075de40ca1e05ae73b844dbe533815b9a4
af3b27b564b14476085ca05f86344b50ce00b9fc
cmec-seanwilson/cs240-practice
/practice/car/main.cpp
C++
cpp
323
no_license
#include <iostream> #include "car.h" int main () { Car cars[2] = { Car("Nissan Altima", 2008, "Silver", "123456abc7891011", 150000), Car("Dodge RAM", 2005, "Gray", "112134525560627", 50000) }; for (int i = 0; i < 2; i++) { Car car = cars[i]; std::cout << car.getType(); ...
3b724b9873c45d660092e9108aeba0834b9db318
3ec3b0b315c755d3a7c662037df2587895015fe8
subnr01/subs-practice
/leet_code/graphs/medium/redundant_connection.cpp
C++
cpp
3,273
no_license
/* In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes (with distinct values 1, 2, ..., N), with one additional edge added. The added edge has two different vertices chosen from 1 to N, and was not an edge that already exis...
fdaf11ff72f0138017d18d26d2978f0c276d4dbd
37fbbf7592792d6ef6960c90480ae2a2a2740069
MichaelJDG/computer-science
/Cpts223/Micro 3/main.cpp
C++
cpp
1,460
no_license
//***************************************************************************// //** //** Simple Heap implementation //** Copyright 2016 - Aaron S. Crandall //** //** //** //***************************************************************************// #include <iostream> #include <string> #include "Heap...
81655b7c52c4adf37174f9dc9e8d11c3f8ef39e2
8ddbbd3989bdec528046fd7bd49773f332ecef01
dsciebu/oneDNN
/src/cpu/simple_concat.cpp
C++
cpp
6,783
permissive
/******************************************************************************* * Copyright 2017-2021 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...
9946d68aee4ecf5355a6d1687b9a486b16e4af01
97b5e18ce71f6c319f4a06ff8012b9dbe94cf7e6
ysyshtc/Codeforces
/87r/a.cpp
C++
cpp
1,093
no_license
#include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <cstdlib> #include <ctime> #include <string> #include <cmath> #include <climits> #include <vector> #include <map> #include <set> #include <iterator> #include <utility> #include <numeric> #include <memory> #include <stack> #include <d...
6c6b5a5e6af8de8050c3e25d4871365919f06af6
3b9772ef0b1fa556f583065da812cbe5461ad7a7
bwzhou/misc
/clone_graph/clone_graph.cc
C++
cc
2,303
no_license
#include <random> #include <vector> #include <map> #include <set> #include <iostream> #include <algorithm> using std::default_random_engine; using std::uniform_int_distribution; using std::vector; using std::map; using std::set; using std::cout; using std::endl; using std::min; struct Node { int id; vector<Node*>...
8fcbb5eeefd7361e2929d80e947f9e86d0af341c
b833b58d0fac0e531c5be40a9c474f298fa575f4
GSIL-Monitor/platform.framework.web.chromium-efl
/components/viz/client/client_shared_bitmap_manager.cc
C++
cc
6,422
permissive
// Copyright (c) 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/viz/client/client_shared_bitmap_manager.h" #include <stddef.h> #include <utility> #include "base/debug/alias.h" #include "base...
08fdabb74def48de8ce86533101fff7c6568caf2
1048579140ad3c3db529fdfaed60a493c63b46e7
prathameshk54/hacktoberfest
/Tree/check_for_bst.cpp
C++
cpp
3,698
no_license
/* Given a binary tree, return true if it is BST, else false. For example, the following tree is not BST, because 11 is in left subtree of 10. The task is to complete the function isBST() which takes one argument, root of Binary Tree. 10 / \ 7 39 \ 11 Input: The input contains T, ...
603962089f32bd30d3a539e78e2a1ec90aa97b06
744399a636cafeae340747e0f798fe8df35fa748
opasni/GeantCode
/NeutronDetector/EnergyThicnkess/include/DetectorConstruction.hh
C++
hh
2,432
no_license
#ifndef DetectorConstruction_h #define DetectorConstruction_h 1 #include "globals.hh" #include "G4VUserDetectorConstruction.hh" #include "G4RotationMatrix.hh" #include "G4FieldManager.hh" #include <vector> class G4VPhysicalVolume; class G4Material; class G4VSensitiveDetector; class G4VisAttributes; class G4GenericMe...
0a7461f8735962324bcc7c10b01bcda3fc3c968b
ec810761f865c77d5201c8ba18ac4f72d9b51871
facebook/fbthrift
/thrift/lib/cpp2/type/IdTest.cpp
C++
cpp
1,150
permissive
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * 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 appl...
20592adf23333e04c33b9bf8586d5ab5cb9725ca
84e02bed7d1e6e209af640bd6e2e2328cf80b681
ayushpareek179/CPP-DSA
/Part_Eleven/LinkedListProg.cpp
C++
cpp
3,823
permissive
//Implementing a linked list in C++ #include <iostream> using namespace std; template <class T> class Node { public: T data; Node* next; }; template <class T> class LinkedList { private: Node<T>* head; Node<T>* middleR(); Node<T>* middleL(); public: LinkedList() { head ...
c7e59aa0bc7e37b7e5369f290ff7a0bab20c73e7
42eed333e3c390ed2c4ac5572e7c10b14acf23b4
ggjersund/TDT4102
/Exercises/oving-6/oving6-2/utilities.cpp
C++
cpp
458
no_license
// // utilities.cpp // oving3 // // Created by Gjert Ingar Gjersund on 30.01.2018. // Copyright © 2018 Gjert Ingar Gjersund. All rights reserved. // #include "utilities.hpp" int randomWithLimits(int min, int max) { return (std::rand() % ((max + 1) - min)) + min; /* std::random_device seeder;...
fb4ec6d7cbf1b5994e1bbb69e5e4182f04376b8a
a4e30c0756b66936e80bec768f6400105593ef4f
alma4rebi/swift
/lib/SIL/SILInstruction.cpp
C++
cpp
33,431
permissive
//===--- SILInstruction.cpp - Instructions for SIL code -------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
9b500656e27ffd1a3eb3413bde089e48b1cc1612
3f99b038f6ef82bf0794cee6607a98bbc01649db
adwpc/webrtc
/modules/rtp_rtcp/source/rtcp_packet/transport_feedback_unittest.cc
C++
cc
22,878
permissive
/* * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
821abda0782d44009101938dd39eff722ba73903
3c9ec39d70fe79e04ef98670ebb0bd947211c4f6
juruo123/some-programs
/比例简化.cpp
C++
cpp
421
no_license
#include<bits/stdc++.h> using namespace std; int gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } int main(){ double a,b,l,ans1,minn=9999999,a1,b1; cin>>a>>b>>l; ans1=a/b; for(double i=1;i<=l;i++) { for(double j=1;j<=l;j++) { if(i/j>=ans1&&gcd(i,j)==1&&i/j-ans1<minn) ...
6ca112c71329a0e3276535866a52f54e92599949
bbdf8f929cfeaab83d61b5d8a2b2eb1cdae51915
polarisli/OpenXLSX
/library/pugixml/pugixml.hpp
C++
hpp
57,813
permissive
/** * pugixml parser - version 1.9 * -------------------------------------------------------- * Copyright (C) 2006-2018, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) * Report bugs and download new versions at http://pugixml.org/ * * This library is distributed under the MIT License. See notice at the end *...
da7673a2ad0885b7ae113e8dd3abf408a7370a1f
3c7c106ed1dd6ab1f65818f5aa57048904f769b1
joabda/ASCELOPIOS
/patient/pregnantpatient.cpp
C++
cpp
392
permissive
#include "pregnantpatient.h" PregnantPatient::PregnantPatient(const QString& firstName, const QString& lastName, const QString & phoneNumber, const double weight, const QDate& birth, const QString& referent, const QString& payer) : Patient (firstName, lastName, phoneNumber, weight,...
7d5aa0259b4cde2876bfd1085205003f0994b611
485083794015f01d65ab25d7bd60d0f3cd770b07
malaifa/source
/src/numeric/kdtree/KDPoint.hh
C++
hh
3,907
no_license
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
1bdf693047bfbded58bb2914bfd68b4804baab86
dfc5462c1a35884817dde407b6cc4f3557dc0077
TRBlount/fs2open.github.com
/code/hud/hudtargetbox.cpp
C++
cpp
69,661
permissive
/* * Copyright (C) Volition, Inc. 1999. All rights reserved. * * All source code herein is the property of Volition, Inc. You may not sell * or otherwise commercially exploit the source or things you created based on the * source. * */ #include "asteroid/asteroid.h" #include "cmdline/cmdline.h" #include "d...
a1c2dfe91ae3a053000c45c48762b58ba293f407
dd52f7870a878418b5cadb1969c9dce7112101b9
ties/algorithm-challenges
/uva/cpp/uva_algorithms/u10055.cpp
C++
cpp
378
no_license
#include <iostream> using namespace std; #define MAX(s1, s2) (s1 > s2 ? s1 : s2) #define MIN(s1, s2) (s1 < s2 ? s1 : s2) /** * UVA "hashmat the brave warrior" <http://uva.onlinejudge.org/external/100/10055.pdf> */ int main(int argc, const char * argv[]) { int s1, s2; while (cin >> s1 >> s2) { cout <<...
76f5668844506b0080c65e0d9bfca662d759b52f
ce2427b8843b0a9dfa121d3855955c7fbf24a926
tanneeru-vamshi-krishna/eosio-appointment
/contracts/appointment/appointment.cpp
C++
cpp
3,477
permissive
#include <appointment.hpp> #include <eosiolib/asset.hpp> #include <eosiolib/action.hpp> #include <eosiolib/print.hpp> #include <string> #include <iostream> #include <stdio.h> #include <chrono> #include <ctime> using namespace std; using namespace eosio; using eosio::permission_level; uint64_t UISappoint::stringToHa...
f5d721efd0503cdb7be96be4bd3f72e77717474e
268bd5d7805548d5a380ccfff3b1a3f38098f4c0
abiam222/Data-Structures-and-Algorithms
/Data Structures/linked list/linked_list.cpp
C++
cpp
645
no_license
Questions *Explain LL, Doubly LL, How it works, what it is, how can it be implemented etc CRUD for LL and Doubly LL Print the Elements of a Linked List Insert a Node at the Tail of a Linked List Insert a node at the head of a linked List Insert a node at a specific position in a linked List Delete a Node Print...
175333aec7cee4fc034f2685d0bd43b916b310f9
3a480268486753f7790845ce4dcf82bb52973b04
kyx0r/FA_Patcher
/boost_lib/boost/hana/fwd/concept/comparable.hpp
C++
hpp
7,019
permissive
/*! @file Forward declares `boost::hana::Comparable`. @copyright Louis Dionne 2013-2017 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_FWD_CONCEPT_COMPARABLE_HPP #define BOOST_HANA_FWD_CONCEPT_COMPARABLE_...
084fb05fc86eecf90944e122c67440dc2ed19175
bfc2b007f82e0c65c9c7a2c29df97c88fc95142a
noxo/zed-examples
/tutorials/tutorial 5 - spatial mapping/cpp/main.cpp
C++
cpp
3,695
permissive
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2021, STEREOLABS. // // All rights reserved. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIE...