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
5f54e7052b6eab3045857fe15919396579d4f78c
b1a74aedea4e3ba8482ab5961d77ce8b6ebc0e14
trumpcoinsupport/TrumpCoin
/src/test/net_tests.cpp
C++
cpp
25,127
permissive
// Copyright (c) 2012-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "addrman.h" #include "chainparams.h" #include "hash.h" #include "net.h" #include "netbase.h" #include "serialize.h" ...
ef5725b1c79fe911cc8224607aa65a963679420d
63b5e03546f831affa6dfb479716f07034c24142
1224555781/NLTGame
/Source/NLT/Private/UI/MLBUITheme.cpp
C++
cpp
26,799
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "UI/MLBUITheme.h" #include "Blueprint/WidgetTree.h" #include "Components/Button.h" #include "Components/CheckBox.h" #include "Components/ComboBox.h" #include "Components/ComboBoxString.h" #include "Components/HorizontalBoxSlot.h"...
e0362348951bbc446adbbd1c1233a18c8c1ae022
1f7f4272dbb3d1c9b266de57279423cfcc2de5e4
brucezcg/fbthrift
/thrift/lib/cpp2/transport/core/ThriftClient.cpp
C++
cpp
8,878
permissive
/* * Copyright 2017-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
dceb8035f51af97dfd516cfbea2fcbe02d26c8cc
8800c6a8ef24a1249db8a3df4fef9df423f508d9
LIMXTEC/DUST
/src/qt/peertablemodel.cpp
C++
cpp
5,944
permissive
// Copyright (c) 2011-2013 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 "peertablemodel.h" #include "clientmodel.h" #include "net.h" #include "sync.h" #include <QDebug> #include <QList> ...
a527f8eda15ceabb52163b1f6ad9293fa61333b4
33b7f9d6d47ff906c39667bf0157e98d8501f3d0
verdy997/pong_tcp
/Player.cpp
C++
cpp
669
no_license
#include "Player.h" Player::Player(float x, float y) { this->positionVector = Vector2f (x,y); this->defaulPosVector = Vector2f (x,y); } Player::~Player() { } void Player::up() { positionVector.y -= 6; } void Player::down() { positionVector.y += 6; } void Player::draw(RenderW...
a8f97f1f27b0e511fe293ac7197b355cf768d2bd
624b975e2a199fbc9f5095edc537e3d2c07181eb
dengjuncheng/ObjectChat
/main.cpp
C++
cpp
1,163
no_license
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <dbhelper.h> #include <logincontroller.h> #include <QQmlContext> #include <connectioncenter.h> #include <capturescreen.h> #include <QApplication> #include <interactioncenter.h> #include <filehelper.h> int main(int argc, char *argv[]) { #if defined(Q_...
7c11e0827ef2e9490d69f493eddb3bf6b190b24c
6f92b29c6f1078d3a0c618b3fe1ac531a917e884
TUWien/CVLModules
/src/main/cpp/ModuleFactory.cpp
C++
cpp
3,833
no_license
#include "ModuleFactory.h" #include "IBaseline2Polygon.h" #include "ILayoutAnalysis.h" #include "IHtr.h" #include "ITrainHtr.h" #include <iostream> #include <stdexcept> #include <string> #ifndef WIN32 #include <dlfcn.h> #else #include <windows.h> #endif namespace transkribus { const std::str...
ccd31b4b9815b6cc638ad0f89e9a032a19617d04
448a9122ddcdd7627f7121f57f3d82e87b6cadb6
zivkovicmilos/MusicSystem
/MusicSystem/createmidifile.cpp
C++
cpp
1,434
permissive
#include "MidiFile.h" #include <iostream> using namespace std; using namespace smf; int midimain(int argc, char** argv) { MidiFile outputfile; outputfile.absoluteTicks(); vector<uchar> midievent; midievent.resize(3); int tpq = 48; outputfile.setTicksPerQuarterNote(tpq); outputfile.addTrack(1);...
44af32e0003de035808ed4b0ce7d8f185f2f3152
bdf578ff91c76dcb6a39f7bf65a7cacbdd619b10
ttyang/sandbox
/sandbox/logging/boost/logging/detail/cache_before_init.hpp
C++
hpp
5,635
permissive
// cache_before_init.hpp // Boost Logging library // // Author: John Torjo, www.torjo.com // // Copyright (C) 2007 John Torjo (see www.torjo.com for email) // // 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...
3e3d8a469051a7e9efd4bcc473c53afdcbd5dd65
036153f7a25a8f38a36c7fd4675e4bcb7e29d7ae
Speego/EAN-Newton
/Newton/newtonrootsinterval.cpp
C++
cpp
1,510
no_license
#include "newtonrootsinterval.h" using namespace ia; Interval<long double> NewtonRootsInterval(int n, std::vector<Interval<long double> > a, Interval<long double> x, int mit, long double eps, Interval<long double>& w, int& it, int& st){ Interval<long double> dw, u, v, xh; if (n < 1 || mit < 1) st = 1;...
67254e1e3150397be5c93e18c92c568cdb0c0d14
574d17c7d3d5bc355da90aabb42af023cc785065
15831944/ObjectArx
/SDK/zrxsdk2020/samples/Sign/SignUi/SignUi.cpp
C++
cpp
2,414
no_license
// SignUi.cpp : Defines the initialization routines for the DLL. // #include "stdafx.h" #ifdef _DEBUG #define new DEBUG_NEW #endif extern void createSign(); void initApp(); void unloadApp(); void RegisterZrxApp(); ///////////////////////////////////////////////////////////////////////////// // ZRX EntryPoint exte...
112ffc6847649ff4555ff328ecf86f9e650d3e1d
120c5ff49de887b961b0c298b576b3da1f099256
radtek/asdk
/ asdk/Source/客户端/代码/otchkclient/FinSmith/LoopWnd.cpp
C++
cpp
1,994
no_license
// LoopWnd.cpp : 实现文件 // #include "stdafx.h" #include "FinSmith.h" #include "LoopWnd.h" // CLoopWnd IMPLEMENT_DYNAMIC(CLoopWnd, CFrameWnd) CLoopWnd::CLoopWnd() : m_nTime(0) { } CLoopWnd::~CLoopWnd() { } BEGIN_MESSAGE_MAP(CLoopWnd, CFrameWnd) ON_WM_TIMER() ON_WM_PAINT() ON_WM_CREATE(...
95586977bb0f39159081121126a512b1da69a69b
fd57093c96b567b0414122bd5a5902845056e4bd
myfree88/OPCNETAPI
/OPCNETAPI/Conversions.cpp
C++
cpp
1,486
no_license
#include "Stdafx.h" #include "Conversions.h" tagOPCHDA_TIME DatetimeToOPCTime(System::DateTime d) { tagOPCHDA_TIME t; t.bString = FALSE; t.szTime = NULL; SYSTEMTIME st; st.wYear = d.Year; st.wMonth = d.Month; st.wDay = d.Day; st.wHour = d.Hour; st.wMinute = d.Minute; st.wSecond = d.Second; st.wMillisecon...
625a4c5ce50947bcf46db604decfa154509d4f35
ac8ef108149856ac0e0789601d4210a30be3d57d
FITCommunity/Programiranje-1
/Ispiti/NPP - 2014×2015/2018-02-17/Grupa A - Zadatak 03.cpp
C++
cpp
933
no_license
#include <iostream> using namespace std; void fibonacci(int niz[], int duzina) { niz[0] = 0; niz[1] = 1; for(int i = 2; i < duzina; i++) niz[i] = niz[i-1] + niz[i-2]; } void ispis(int niz[], int duzina) { for(int i = 0; i < duzina; i++) cout << niz[i] << " "; } bool paranZadn...
19e5ab6e8e0ec2311530b91197b97bc8ba64b292
50a5e6790f3724737e25c52c4d25959c3c723644
9prady9/arrayfire-benchmarks
/src/topk.cpp
C++
cpp
2,744
no_license
#include <arrayfire_benchmark.h> #include <benchmark/benchmark.h> #include <arrayfire.h> #include <cmath> using af::array; using af::deviceGC; using af::deviceInfo; using af::deviceMemInfo; using af::dim4; using af::randu; using af::topk; using std::cbrt; using std::to_string; using std::vector; static void topkBen...
a532d0719b15799024176543ecf945abb42bc2a1
763fdc7e82afe7ad0863d3a9346b0f67e80c4f4f
otcshare/chromium-src
/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.cc
C++
cc
13,885
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 "third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.h" #include "third_party/blink/renderer/bindings/core/v8/script_cu...
400bec674b2e99879203dbd534b827edaeabdeaa
e395af77ee3ef4d005d2a8a46ee942e1eee47931
CasperHeller/ISU_Exercise5
/1/semaphore/vector.cpp
C++
cpp
1,207
no_license
#include <iostream> #include <pthread.h> #include <unistd.h> #include "Vector.hpp" using namespace std; void *writer(void* ID); //Prototyper Vector data;; //Opretter global variabel int main() { int numberThreads; while(numberThreads > 100 || numberThreads < 1) { cout << "Enter the number of threads yo...
bb9228d0759dfc7fe4347748e93573a223c5b967
3d9d3f2e8e2ffb9cd3c43f2cfc41b8249a17c8ec
Team302/GamePad
/gamepad-source/src/main/native/cpp/team302/gamepad/button/ButtonDecorator.cpp
C++
cpp
2,723
permissive
/*======================================================================================================== * ButtonDecorator.cpp *======================================================================================================== * * File Description: Wrapper for an XBOX controller used to control the robot ...
5ea9456fcd8ab9cd1a936062e45729dab039feb9
ad73c6ab0abf73650511c851c82c011e8d7e4f8e
OliverBryan/SFML-Bullet-Hell-Game
/src/Wave.hpp
C++
hpp
615
no_license
#ifndef WAVE_HPP #define WAVE_HPP #include <vector> #include <string> #include <fstream> #include <iostream> #include <cassert> #include <array> #include <random> struct Wave { std::vector<std::pair<std::string, int>> spawnerTypes; int spawners; int newSpawnerInterval; int waveLength; }; class ModLoader; int ge...
29f1d3ddefb40fb4af6a13618cc9446b2db78ac0
7ce5c459d5a3964b08df313413da1cb936f70094
petersont/o3d
/googleclient/third_party/v8/src/arm/assembler-arm.cc
C++
cc
46,090
permissive
// Copyright (c) 1994-2006 Sun Microsystems 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 list ...
c58e04a55dbdb2aa13f8820692b4f835ca26dfaf
d2faf5b26597ff1d0ffa9c34ead5eefb51fbfa35
abuzatu/BuzatuCPP
/Package/testUseOurSharedLibraryThatUsesAnotherSharedLibraryOfOurs/testUseOurSharedLibraryThatUsesAnotherSharedLibraryOfOurs.cxx
C++
cxx
320
no_license
#include "testUseOurSharedLibraryThatUsesAnotherSharedLibraryOfOurs.h" int main() { double a=3.0; std::cout<<"using function defined in Helper:"<<std::endl; std::cout<<"square of a="<<a<<" is "<<square(a)<<std::endl; std::cout<<"using function defined in Helper2:"<<std::endl; print_square(a); return 0; }
4d0d374001ebe52c06ba5b3e0ea6165c547f6472
901f25027f09f63fa904c71c7d83ccc5cc85f0b7
joway/fbthrift
/thrift/example/cpp2/server/ExampleServer.cpp
C++
cpp
2,826
permissive
/* * Copyright (c) Facebook, Inc. and its 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 applic...
5b13b59794419b1cbba3bbc93d39db5527ecb513
60cb3daf489d0eaff8257d610ebef9f6d28b7904
mlu2021/Project_1
/main.cpp
C++
cpp
24,514
no_license
// Project Identifier: 40FB54C86566B9DDEAB902CC80E8CE85C1C62AAD // EECS281, Project 1 #include <stdio.h> #include <vector> #include <stack> #include <queue> #include <deque> #include <getopt.h> #include <iostream> #include <string> #include "xcode_redirect.hpp" using namespace std; struct MapGrid { size_t row; ...
d356fe760a813b47dcfeafcc808ef2ad62826c0e
4ed6ddabb9bb361af3f26475f341e8cac04393ee
fwf02/QTStudyDemo
/C++/05CallbackFunction/CallbackFunction/main.cpp
C++
cpp
1,918
no_license
#include <QCoreApplication> #include <QTimer> #include <iostream> struct Msg { int type; // 消息类型 char* content; // 消息内容 }; struct Package // 包结构 { const unsigned int head = 0xFFFFFFFF; // 包头 int len; // 消息长度(type+content) Msg msg; // 消息 }; int dealLogin(const char *para) { /...
94d9b37f93f5bac742549aca0505264f8b47b137
0f0f27ac3543f9848d72939d5c11ed494903e9e7
bpmcoin/bpmcoin
/src/rpcblockchain.cpp
C++
cpp
8,480
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 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...
230ac067747347a1158b19e792f6592c18f357b4
5025c8ce108cdbadf69dbba463f0f3285f6b0d21
Finalcheat/leetcode
/src/cpp/Trim-a-Binary-Search-Tree.cpp
C++
cpp
1,605
no_license
/** * @file Trim-a-Binary-Search-Tree.cpp * @brief 二叉搜索树修剪(https://leetcode.com/problems/trim-a-binary-search-tree/description/) * @author Finalcheat * @date 2018-03-11 */ /** * Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >...
71646bb1a6ac0ea34efad627ea285d13f0839a68
96672abc268807e9386d590f39bcdf615201b986
Painted-Black/BMSTU-DB-CourseWork
/vet/vetclient/src/core/add_staff_dialog.cpp
C++
cpp
16,177
no_license
#include "add_staff_dialog.h" #include "ui_add_staff_dialog.h" #include "ui_passport.h" #include "types/json_fields.h" #include "core/add_shedule_item_dialog.h" #include "types/passport.h" #include "utils/singlenton.h" #include "core/popup.h" #include "config/config.h" #include "network/network_fetcher.h" #include "uti...
509f45c9049fc8004021eb40d8b2c575f3aab44f
3eb63b4bbb015e91eab189ecb3c76c7aea95c475
ohnozzy/or-tools
/src/linear_solver/glop_interface.cc
C++
cc
15,603
permissive
// Copyright 2010-2014 Google // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
4c2df0555bdce3a7937a6262a49f212af56b8b4f
855ba1e518e11c2316f54673425d4a9fa0846daa
nbelyh/ShapeSheetWatch
/Addin/ViewSettings.cpp
C++
cpp
6,185
permissive
#include "stdafx.h" #include "lib/Utils.h" #include "ViewSettings.h" void ViewSettings::AddCellMask(LPCWSTR name) { m_cell_name_masks.push_back(name); } void ViewSettings::UpdateCellMask(size_t idx, LPCWSTR text) { m_cell_name_masks[idx] = text; } void ViewSettings::RemoveCellMask(size_t idx) { m_cell_name_masks...
50ca1dddabcd6a658200c6ad1d45875274b4198f
8b6439cbadfa9db9a4a9b57a25943b91ffea90db
dhtech/fboss
/fboss/agent/state/AclMap.cpp
C++
cpp
1,133
permissive
/* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #inc...
71dd489d000f63d55815d2b1e87e9469993f1f02
d298750ee7cc2bc216b825f6be6ec29a3b8cba5e
matteo-dc/Nf4Clover
/bin/allocate.hpp
C++
hpp
693
no_license
#ifndef ALLOC_HPP #define ALLOC_HPP #include "aliases.hpp" #include "global.hpp" #include "operations.hpp" void allocate_vec_internal(double &t, const vector<int> sizes, int isize); void allocate_vec_internal(oper_t &o, const vector<int> sizes, int isize); template <class T> void allocate_vec_internal(valarray<T> &...
9f3dde8d7923429676405cf7ccc103680242a202
be74b219e8cef7484646349fa5f4e320195af6dc
totalkyos/AWS
/aws-cpp-sdk-config/source/model/DescribeComplianceByConfigRuleRequest.cpp
C++
cpp
2,439
permissive
/* * Copyright 2010-2016 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" file...
902a795b3c5c13d1042cd200c1beb4707ea82192
d3d4fd1d4e1ca02bca0ff374b3567bdf8b8d8cb2
burakbayramli/books
/Riemann_Solvers_and_Numerical_Methods_for_Fluid_Dynamics_Toro/Riemann-Solvers-master/Euler Equation/Approximate-state/TSRS/main.cc
C++
cc
15,525
no_license
#include <iostream> #include <fstream> #include <sstream> #include <cmath> #include <algorithm> #include <vector> #include <string> using namespace std; const double G0 = 1.4; const double G1 = 0.5 * (G0 - 1) / G0; const double G2 = 0.5 * (G0 + 1) / G0; const double G3 = 2 * G0 / (G0 - 1); const double G4 = 2 / (G0 -...
dea050ef62d6c4e1788e57970254be01a262b243
c1ad8c5d7bd4958621a1ec83cb070986f14cbbe8
jwalker-depaul/Centipede_2017
/sprint_9/MushroomFactory.cpp
C++
cpp
976
no_license
#include "MushroomFactory.h" MushroomFactory *MushroomFactory::ptrInstance = nullptr; Mushroom* MushroomFactory::privCreateMushroom(sf::Vector2f position, MushroomGrid* mushroomGrid) { Mushroom *mushroom; // Recycle if (recycledItems.empty()) { mushroom = new Mushroom(); mushroom->SetExternalManagement(Recyc...
2656a9034f7a74708f461f1167229ff74b5bb85f
457d6857523925c6902760d2cf19d6b148bbab2b
serenaferracci/AI-Homeworks
/homework-1/src/ascolta.cpp
C++
cpp
842
no_license
#include "ros/ros.h" #include "std_msgs/String.h" #include <limits.h> #include "sensor_msgs/LaserScan.h" ros::Publisher pub; void riceviCallback(const sensor_msgs::LaserScan::ConstPtr& sensore) { double minimo = DBL_MAX; int count = (sensore->ranges).size(); count--; while(count >= 0) { ...
8a102c56bae9ef3028deb215f4f5270d42243b6c
2442a5db5de62350dbbe8f94a3dcdb6e096c5b3b
Stmen/deeplearning4j
/libnd4j/include/ops/declarable/helpers/impl/unique.cpp
C++
cpp
3,831
permissive
/* ****************************************************************************** * * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * * See the NOTICE file distributed wit...
b5f119baebf37ae26f687d63a7b2b023aa4d6902
1171a7108f14adf11464966f86b2901ca057b2ce
jkells/nscp
/service/service_manager.hpp
C++
hpp
3,447
no_license
#pragma once #ifdef _WIN32 #include <ServiceCmd.h> #endif namespace nsclient { namespace client { #ifdef _WIN32 class service_manager { private: std::wstring service_name_; public: service_manager(std::wstring service_name) : service_name_(service_name) {} static std::wstring get_def...
5840565fe3e4b8e62cd727a10421535ea32c9cda
704d0152cf690cd92a35ada2d8813eee686f9079
mpekatsoula/ComputeLibrary
/src/core/gpu/cl/kernels/ClTransposeKernel.cpp
C++
cpp
5,222
permissive
/* * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * * 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 * ri...
ddeb29dbf09ef2755c932fcd35f3536e5c0fc1ed
d91b3acc4a430d18da38e1c9ab2301a0126ac9c3
AngelMonica126/GraphicAlgorithm
/005_Interactive Order Independent Transparency/Sponza.cpp
C++
cpp
340
permissive
#include "Sponza.h" #include "Interface.h" CSponza::CSponza(const std::string& vGameObjectName, int vExecutionOrder) : IGameObject(vGameObjectName, vExecutionOrder) { } CSponza::~CSponza() { } void CSponza::initV() { setModel(ElayGraphics::ResourceManager::getOrCreateModel("../Model/sponza/sponza.obj")); } void CS...
a6157c91b14ae2d3451516a8df668948fb644308
5fe8f8e5b53f441fd360b173c50f4a5465c65388
8adam95/problems
/artUnion.cpp
C++
cpp
713
no_license
#include<cstdio> #include<iostream> #include<vector> #include<set> #include<map> #include<vector> #include<algorithm> #include<queue> using namespace std; #define REP(I, N) for(int I = 0; I < (N); I++) #define FOR(I, A, B) for(int I = (A); I <= (B); I++) #define FORD(I, A, B) for(int I = (A); I >= (B); I--) #define ll...
68d120aff762dd4aebeadc60dded2b6110d5dd53
f03a961614aba1c07be19a5ad2fd19903d320c02
tzhan024/try
/A1/inverter.cc
C++
cc
3,460
no_license
#include <string> #include <fstream> #include <iostream> #include <set> #include <map> using namespace std; int main(int argc, char **argv) { int i = 0; char infiles[5][20]; //cout<<"Hello world"<<endl; //cout<<argc<<endl; if(argc > 2) { cout<<"Only one argument needed."<<endl; r...
b95bce707e145b7fbf0b2925db541004e2a6def7
08ebad9f306df12e1a1254fef2650d45ba728ebc
tfull/brainfuck
/src/Main.cpp
C++
cpp
4,029
no_license
#include <iostream> #include <fstream> #include <string> #include <vector> typedef unsigned char cell_t; const char TOKEN_PLUS = '+'; const char TOKEN_MINUS = '-'; const char TOKEN_NEXT = '>'; const char TOKEN_PREVIOUS = '<'; const char TOKEN_OUTPUT = '.'; const char TOKEN_INPUT = ','; const char TOKEN_BEGIN = '['; c...
cf4c86ace1498b9c209c702a27f6c7ea4446d648
bc3c5172d91ea2c1cc6820c3dbd51e37a49e3ad8
openbsd/xenocara
/lib/mesa/src/util/tests/mesa-sha1_test.cpp
C++
cpp
2,160
no_license
/* * Copyright © 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 without limitation * the rights to use, copy, modify, merge, pub...
2322fd66c1b7266c8fbeeb4ba4fc8c73f537cb12
373cc574c8888fc20f555ec308ee462fb4c30fb5
ARM-software/ComputeLibrary
/tests/validation/NEON/UNIT/DynamicTensor.cpp
C++
cpp
6,906
permissive
/* * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * * 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 * ri...
db44913706ed03a5923237a00f2488c71a5a2b40
c8e46f1eda48072f7547fffda77e838de7f5d648
dkubica/Workspace
/30daysOfCode/Submissions/day2/day2.cpp
C++
cpp
705
no_license
#include <bits/stdc++.h> // Complete the solve function below. void solve(double meal_cost, int tip_percent, int tax_percent) { std::cout << std::round(meal_cost+meal_cost*(double(tip_percent)/100)+meal_cost*(double(tax_percent)/100)) << std::endl; } int main() { double meal_cost; std::cin >> meal_cost;...
979e4ac0570612cdec4c29bf1463e4fc6dd5bab1
281829516fe7bbf80cf8bd2831e1dd2c8d3ab0ed
humberto-garza/SPU
/ADC/Atom/main.cpp
C++
cpp
3,183
permissive
/* Copyright (c) 2015, Intel Corporation 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 list of conditions and the following disclaimer. * Red...
7a2e175451177c9e8117f16f4544c36f0b838cfd
95327c20d22fcbb5578b26d28140328c5ec7e8f8
sknigh/sst-macro
/tests/api/mpi/coll/alltoallv.cc
C++
cc
5,885
permissive
/** Copyright 2009-2018 National Technology and Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government retains certain rights in this software. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering...
65a3278c84e75176345c4d934ddd688253252852
26c859d1ff6aacc1ad831901f7bbbcc9fa3bc10a
digint/openmptl-reg-arm-cortex
/arm/cortex/Spansion/MB9BF40xN/include/arch/reg/mfs2.hpp
C++
hpp
17,329
no_license
/* * OpenMPTL - C++ Microprocessor Template Library * * This program is a derivative representation of a CMSIS System View * Description (SVD) file, and is subject to the corresponding license * (see "License.txt" in the parent directory). * * This program is distributed in the hope that it will be useful, * bu...
c541206b7a7bdeea1d84ddc42ebde9d47e021976
474b317346a653f22d8d0efa51154347446db5b4
matheusf31/tap
/Lista 3/1766.cpp
C++
cpp
1,278
no_license
#include <bits/stdc++.h> using namespace std; typedef struct reindeer { char name[110]; int age; int weight; double height; } Reindeer; int compare(const void *a, const void *b) { // aponta para a primeira rena Reindeer *aux = (Reindeer *)a; // aponta para a segunda rena Reindeer *aux2 = (Reindeer *...
83292e053e5500bff5490c5045ab09c7d57ee6a6
74ae40fd684df11588abd64837a3c02d25853ed9
Haushoffer/graficasPruebita
/tesoro/Tracer.cpp
C++
cpp
804
no_license
#include "stdafx.h" #include "Tracer.h" // -------------------------------------------------------------------- default constructor Tracer::Tracer(void) : world_ptr(NULL) {} // -------------------------------------------------------------------- constructor Tracer::Tracer(Mundo* _worldPtr) : world_ptr(_worldPtr)...
bf376b0dc5d45858c705621a2cfa91e0615d66fb
6748224f80bc0bf8948eebe60da20794e963c0a6
jquigtar/School-Projects
/CSS343/Program4/hashtable.cpp
C++
cpp
3,232
no_license
// // Created by Jordan Quigtar on 3/11/20. // #include "hashtable.h" HashTable::HashTable() { for(int i = 0; i <100; i++){ for(int j = 0; j < 100; j++){ table[i][j] = nullptr; } } } HashTable::~HashTable() { for(int i = 0; i < 100; i++){ for(int j = 0; j < 100; j++){ ...
8e3770b58c2e1e9ccf2e7c8dd8930ef2287582e2
c16b184f5b459529cb590a333517076a3d2264bf
vrichter/assign
/assign.cpp
C++
cpp
3,742
permissive
/********************************************************************* * The MIT License (MIT) * * * * Copyright (c) 2015 Viktor Richter * * ...
b7e57bc23f89316c51e4c19cb9f8ea7a62341955
1ab97987557cacca87b9d4f2573a3cb1bed79600
Toxa-man/labWorks_8373_2018
/KrotovaEY/lab_4/Source.cpp
C++
cpp
2,141
no_license
#include <iostream> #include <conio.h> using namespace std; float stepen(float a, int b) { float result=1; if (!a) { result = 0; } else if (b > 0) { for (int i = 0; i < b; i++) { result = result*a; } } else if (b < 0) { for (int i = 0; i > b; i--) { result = result*a; ...
92a9d1b71bc7f4feb172b09b20bec08b3690e683
fa79da3f390bcb3b65659a808bce360616741eb8
stepas-toliautas/Microsoft-MPI
/src/mpi/msmpi/api/mpi_group.cpp
C++
cpp
38,542
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #include "precomp.h" /*@ MPI_Group_compare - Compares two groups Input Parameters: + group1 - group1 (handle) - group2 - ...
410de43bb2cee0bcd40760e2cc7e50c731e048fd
a5df13b3ad1a441839187e662186c6f9569f9d10
FrankB21/gravity-sim
/include/DisplayManager.hpp
C++
hpp
1,098
permissive
// Copyright 2020 Franco Berni // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, ...
53ef5547f3438cf930c9e70be73c491a30853b2f
0c2c40ec6eb60525098d591c126dc038ea4cbb08
tudennis/LintCode
/C++/super-ugly-number.cpp
C++
cpp
978
permissive
// Time: O(n * logk) ~ O(n * k) // Space: O(n + k) // Heap solution. (308ms) class Solution { public: /** * @param n a positive integer * @param primes the given prime list * @return the nth super ugly number */ int nthSuperUglyNumber(int n, vector<int>& primes) { priority_queue<pa...
46abef8b0b8d1d73229cea2ab0cf47b35eb1c1e6
781c2be1c5c9f9752eedd53d213f4058262fa3f1
BanananaFish/Data-Structure
/Data Structure/Data Structure.cpp
C++
cpp
895
no_license
// Data Structure.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <stdio.h> #include <stdlib.h> #define sqListMaxSize 10 #define sqMaxSize 10 #define initSize 10 typedef struct { int data[sqListMaxSize]; int length; }SqList; typedef struct { int* data; int maxSize; int length; }SeqList; void initList(SqList...
cbfcc65a9b107cbe0919d264033890ae7cf3aa3c
264928fe1a33c33c6d92e022841bd6935720c7df
yssource/build2
/build2/variable.cxx
C++
cxx
37,013
permissive
// file : build2/variable.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2019 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #include <build2/variable.hxx> #include <cstring> // memcmp() #include <libbutl/filesystem.mxx> // path_match() #include <build2/context.hxx> #include <build2/di...
e5768d7207f3d68d7e396b701e1cc7fdc245fc75
792a47918d3af9d89a321df7831a31dbe909bb75
pepojs/ISS
/lokalizator.cpp
C++
cpp
1,787
no_license
#include "lokalizator.h" Lokalizator::Lokalizator(QWidget* Rodzic) :QWidget (Rodzic) { Tytul = new QLabel(tr("<center><font color=white>Wspolrzedne Geograficzne</font></center>")); SzerokoscZnak = new QLabel("N"); DlugoscZnak = new QLabel("W"); SzerokoscGeo = new QLCDNumber; DlugoscGeo = new QL...
e23d24f62ec813f4eb8282f48dd3ee654f5e79ec
c43aee0c084369ce9820aa6148acf3acd653e8c4
VB6Hobbyst7/OSGAddOnsGV
/Bindings/Python/OSGWindow/module/generated/HeadTrackedStereoCameraDecorator.pypp.cpp
C++
cpp
4,380
no_license
// This file has been generated by Py++. // PyOpenSG is (C) Copyright 2005-2009 by Allen Bierbaum // // This file is part of PyOpenSG. // // PyOpenSG is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License as published by the Free // Software Foundation; ...
e5af5a3f6e63a55cc27e9345261149790c1c8387
54738dfb7bd7e3575933e32d72cb5fe09eecc91b
micheal158235/c-study
/project/test_cpp/C++_Standard_Library/iomanip_c98_IO/iomanipStudy.cpp
C++
cpp
4,069
no_license
/* * iomanipStudy.hpp * @time :2019/12/30 17:42 * @location:JieShun ShenZhen * @Copyright 2019, XiaoQian. All rights reserved. * @commit:练习c++标准库中的iomanip类 */ /*------------------------------------------------------------------------------------------------ iomanip是指IO Manipulators,意思是输入输出操纵器。 iomanip中包含如下...
23ae1afe76adfed9d2bc8f4f8978b94b074370a8
411123b5eb7a3b7933520dc07018b247ac10d8f9
dingshiyu/aliyun-openapi-cpp-sdk
/alinlp/src/AlinlpClient.cc
C++
cc
14,496
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...
469dc4a768d50418e44dca5cd6b1af78b84f5edc
c8de8fbbb289d1a5169f5f4c34f5a1da8f15c029
shreysingla11/ssl-project
/Backend/Parser/submissions/Assignment 3/39.cpp
C++
cpp
839
no_license
#include<iostream> #include<limits> using namespace std; int main(){ int n,m; cin>>n>>m; int i,j,c,min; c = 100000000; int a[n],b[m]; double L[n][m]; L[n][m]=0; for(i=0;i<n;i++){ cin>>a[i]; } for(i=0;i<m;i++){ cin>>b[i]; } if(a[n-1]=b[m-1]){ L[n-1][m-1] = 1;} else{L[n-1][m-1] = c;} cout<<L[n-1][m-1]<<endl; for(i=n-1;i<...
320cce361a2ebdfc57be84ca80ca7ea0f2ff6812
5a13f04231d1aace42ccfc7906e077cb72cc9aea
kylemhall/CC-PDF-Converter
/Common/CCPrintData.cpp
C++
cpp
22,053
no_license
/** @file @brief */ /* * CC PDF Converter: Windows PDF Printer with Creative Commons license support * Excel to PDF Converter: Excel PDF printing addin, keeping hyperlinks AND Creative Commons license support * Copyright (C) 2007-2010 Guy Hachlili <hguy@cogniview.com>, Cogniview LTD. * * This file i...
48675056542385b7b33f95fefa4995b3ed664f53
b0dc9f917604e349ca4411bf476e8349822e5d6e
tkm1211/3rdTeamProduction
/Sources/GameSources/Shot.cpp
C++
cpp
836
no_license
#include "Shot.h" #include "ParticleSystem.h" Shot::Shot(DirectX::XMFLOAT3 pPos, DirectX::XMFLOAT3 ePos) { DirectX::XMStoreFloat3(&pVec, DirectX::XMVector3Normalize( DirectX::XMVectorSubtract( DirectX::XMLoadFloat3(&pPos), DirectX::XMLoadFloat3(&ePos)))); DirectX::XMFLOAT3 temp; float speed = SPPED_AR...
491187f8bae460f1c0f1c7b73b70e3bd6c3bc42d
b49dd43afb3beaf2a387f1c72fb725708e5337f8
jaekyeom/doom-py
/doom_py/src/vizdoom/src/p_spec.cpp
C++
cpp
67,250
permissive
// Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // // $Id:$ // // Copyright (C) 1993-1996 by id Software, Inc. // // This source is available for distribution and/or modification // only under the terms of the DOOM Source Code License as ...
8ec80c73119885d7312d7486b30c1f256ead0bb4
002b78f8822554363c463e398e9aa98a0436a03d
arangodb/arangodb
/arangod/RocksDBEngine/RocksDBIterators.cpp
C++
cpp
16,745
permissive
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2023 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
5b109a43578fa187cb503c210f322965e6a7c560
ef361973d5f6698f57d2e27339bb55b705ffa3ee
paigejo/continuousNugget
/code/Rcpp/rmultinomProbMat_rcpp.cpp
C++
cpp
1,010
no_license
#include <Rcpp.h> using namespace Rcpp; IntegerVector rmultinom_1(unsigned int &size, NumericVector &probs, unsigned int &N) { IntegerVector outcome(N); rmultinom(size, probs.begin(), N, outcome.begin()); return outcome; } // [[Rcpp::export]] IntegerMatrix rmultinomSizeVecProbMat_rcpp(IntegerVector &size, Numer...
815e981dcf96c3d3d39031510e9a6aeeea7fad3e
166d05b54f720ca2526ec67cc982337b4cba207f
mattvenn/opencv
/modules/objdetect/src/cascadedetect.hpp
C++
hpp
22,124
permissive
#pragma once namespace cv { class FeatureEvaluator { public: enum { HAAR = 0, LBP = 1, HOG = 2 }; struct ScaleData { ScaleData() { scale = 0.f; layer_ofs = ystep = 0; } Size getWorkingSize(Size winSize) const { return Size(std::max(szi...
3077725cf6f4331e6e339c42718b18e0f22f66fd
9f1e085b495ab71d3e678150ff8bcf37b0dbe6d8
Abdullah28-gheyad/PesaApp
/windows/runner/main.cpp
C++
cpp
1,217
no_license
#include <flutter/dart_project.h> #include <flutter/flutter_view_controller.h> #include <windows.h> #include "flutter_window.h" #include "run_loop.h" #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { ...
76275daeedb155a108a7311a3d45885e447f7fa0
4f1deb7783e47d7b04951efaaddcdd4fda29f8f3
ValtoLibraries/PUtils
/pse/TGUI-0.7.7/tests/Signal.cpp
C++
cpp
4,927
permissive
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus's Graphical User Interface // Copyright (C) 2012-2017 Bruno Van de Velde (vdv_b@tgui.eu) // // This software is provided 'as-is', without any express or implied warranty. ...
a17bace1258cc722c9e88cc0ba0558c1838b539c
8bfead0f3812c8e480262ecd2e5c4f5b017dcb3f
eval1749/elang
/elang/compiler/analysis/variable_tracker.cc
C++
cc
3,902
permissive
// Copyright 2014-2015 Project Vogue. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "elang/compiler/analysis/variable_tracker.h" #include "base/logging.h" #include "elang/base/zone.h" #include "elang/compiler/analysis/analysis.h" ...
31ae0edbfc7c6053ce49f21d2939c1377013b256
32d058bcc754865461d14c0bc723258d5af77957
ljowen/VCVPlugins
/MyPlugin/src/MyModule.cpp
C++
cpp
3,189
no_license
#include "plugin.hpp" #include <dsp/fft.hpp> #include <iterator> #include <algorithm> struct MyModule : Module { enum ParamIds { PITCH_PARAM, NUM_PARAMS }; enum InputIds { SIGNAL_INPUT, NUM_INPUTS }; enum OutputIds { V_OCT_OUTPUT, NUM_OUTPUTS }; enum LightIds { BLINK_LI...
bd1075e537fb2852105a0c846cc2682e6eab1c99
0d9b6a0111d064b664cea9eeec59e4071b2f62e3
vijendra1125/Data-Structures-and-Algorithms
/algorithmic_toolbox/programming_assignments/week2_algorithmic_warmup/5_fibonacci_number_again/fibonacci_huge.cpp
C++
cpp
2,135
no_license
#include <iostream> #include <vector> using std::cin; using std::cout; using std::vector; long long get_fibonacci_huge_naive(long long n, long long m) { if (n <= 1) return n; long long previous = 0; long long current = 1; for (long long i = 0; i < n - 1; ++i) { long long tmp_prev...
5c1b21561700ec57b2bebacf3921e470616be797
ce3a258044a085115b78e6501fc7f693662860ac
JoaoBaptMG/ReboundTheGame
/MainGame/ui/UIPointer.hpp
C++
hpp
1,592
permissive
// // Copyright (c) 2016-2018 João Baptista de Paula e Silva. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, cop...
91f96ab881f1aa0b8716244065571534af29b08a
67369eba724e6e84c5c517627d8ed9a4cd5f1eac
mnuyens/neo-ai-dlr
/tests/cpp/dlr_tvm_test.cc
C++
cc
274
permissive
#include <gtest/gtest.h> #include "dlr.h" TEST(TVM, Test1) { EXPECT_EQ(1, 1); } int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); #ifndef _WIN32 testing::FLAGS_gtest_death_test_style = "threadsafe"; #endif // _WIN32 return RUN_ALL_TESTS(); }
5bc386cbde75c1b07de25115476cb9d5c9b99fe7
f62a659a831eaead0efe0dc6057bcb4c062f3214
Elbehery/arrow
/cpp/src/gandiva/selection_vector.cc
C++
cc
6,990
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...
df52ca65bd7be0cc9fb42cfd6d3f0e2f84d1bc66
52718ce293cddd17d2f0d4f6acf393f321840f76
tpn/cuda-samples
/v9.0/1_Utilities/deviceQuery/deviceQuery.cpp
C++
cpp
11,981
no_license
/* * Copyright 1993-2015 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
96930455afeafd9c2c8d56750a3196c1d12f36bd
95232eb5bed238c58e1cbaec2228ed319a3f7021
danielmr28/Laboratorios
/Tareaejercicio4.cpp
C++
cpp
313
no_license
#include <iostream> using namespace std; int main() { float Doritos= 0.75; int cantidad; cout << " ¿Cuantos Doritos desea llevar? \n"; cin >> cantidad; float preciototal= cantidad*Doritos; cout << " El precio total es: \n "; cout << preciototal << endl; return 0; }
1647345c4aefee644e1425f54e2d5ee858c440b4
bcd5ea4e60f7a52e48ddf196d54fb2eabb895443
adityavs/chromium-1
/ash/shell_delegate_mash.cc
C++
cc
2,567
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 "ash/shell_delegate_mash.h" #include <memory> #include <utility> #include "ash/accessibility/default_accessibility_delegate.h" #include "ash/sc...
c1220f41cf1e6823d703f40c66fa7f5d4c420f0d
ccdca7f4866450bd5615b5a2c7582e822a0026ed
Cscsabi/Prog1
/green_exercises/ch15/ex01.cpp
C++
cpp
415
no_license
#include "../../std_lib_facilities.h" int recursive_fac(int n) { return n>1 ? n*recursive_fac(n-1) : 1; } int iterative_fac(int n) { int value = n; while (n-1 != 1) { value *= n-1; n -= 1; } return value; } int main() { cout << "Recursievly" << endl << recursive_fac(15) << endl << recursive_fac(10) << en...
9ca82c0c6c502eb380b496977a00662d82ac4dc3
c6679544c2abcc31302d6ed848ca81d00c711a4f
CS23-143/IPMP1921
/WEEK6/greedy/max perimeter triangle.cpp
C++
cpp
917
no_license
vector<int> maximumPerimeterTriangle(vector<int> s) { vector<int> ans(3); int sum=0; for(int i=0;i<s.size();i++){ for(int j=i+1;j<s.size();j++){ for(int k=j+1;k<s.size();k++){ if(s[i]+s[k]>s[j]&&s[j]+s[k]>s[i]&&s[i]+s[j]>s[k]){ if(s[i]+s[j]+s[k]>sum||(...
2eddaa837ce2d033da14e18b7052bb52a900cba7
eef99506ee18e481fa79fb207552181e8dd26089
StefanRRachkov/FileSystem
/Source/FileSystemRepresentator.cpp
C++
cpp
646
no_license
// // Created by User on 16.12.2019 г.. // #include "../Headers/FileSystemRepresentator.h" FileSystemRepresentator::FileSystemRepresentator(FileSystemNode* root) { this -> fileSystem = new FileSystemStructure(root); this -> inputController.SetFileSystem(this -> fileSystem); } bool FileSystemRepresentator::St...
f4ab4113242ea14e7871c1a189318adc040154f1
a10c37ccf2a34da23f5655c79b3d0f0d2e5852c5
koafu/VecPath
/src/main.cpp
C++
cpp
1,933
no_license
#include <SFML/Graphics.hpp> #include <iostream> #include "grid.h" int main() { const unsigned int WIDTH = 1280; const unsigned int HEIGHT = 720; const unsigned int resolution = 20; Grid grid(WIDTH, HEIGHT, resolution, 32, 18); sf::RenderWindow window(sf::VideoMode(WIDTH, HEIGHT), "VecPath", sf:...
bdb33bd74d169324387de98b1016d3c35e7e00ce
937dcf398b466da523aa2980b5f2405a12520d2b
Clever-Boy/MyDoom
/src/projectile.cc
C++
cc
2,727
no_license
#include <stdio.h> #include <math.h> #include "common.h" #include "projectile.h" #include "episode_map.h" #include "game.h" #define DIST_EPSILON 1.0 projectile::projectile(vertex const *_map_position, float _facing_angle, float _foot_height, map_obj_defn const *_defn, float shooter_radius) : mobile_map_object(_map_...
0eedad9c26bec1b9668cf2b80ba9800d975067fd
1b0b76fcc89b54ccada114357c5c8afd4d9a4230
erosson/ooz
/libpoe/poe/util/sha256.hpp
C++
hpp
509
no_license
#pragma once #include <array> #include <memory> #include <string> namespace poe::util { using sha256_digest = std::array<uint8_t, 32>; std::string digest_to_string(sha256_digest const &digest); struct sha256 { virtual ~sha256() {} virtual void reset() = 0; virtual void feed(uint8_t const *data, size_t ...
611bb7f7d5c432c75a437baa4fa025ec42b7f72f
8c7e877c9fa973b72e7a3b373119906742e0e178
haozha111/algo
/122.cpp
C++
cpp
913
no_license
#include "leetcode.h" using namespace std; class Solution { public: int maxProfit(vector<int> &prices) { if (prices.empty()){ return 0; } return maxProfit2(prices); } int maxProfit1(vector<int> &prices){ //greedy algorithm: //when prices keep going up, hold the stocks, //when pric...
a5681ff337914bf5c4613fa90f7bf742371353ef
af159ce16855dc5442b6192dfbd8c8472d7a0547
Kortesss/NO3
/mainwindow.cpp
C++
cpp
96,107
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include "derivative.h" #include <QDebug> #include "grDerivative.h" #include "deltaSignal.h" #include "filterDFT.h" #include "extrem_simple.h" #include "correl_analysis.h" #include "dispers_analysis.h" MainWindow::MainWindow(QWidget *parent):QMainWindow(parent), ui(ne...
040268a93bf86ef4644993abfb32faed00369f63
156a3d307efc8b15ae57526c79c29afb0ad6195e
BertJorissen/pybinding
/cppmodule/src/main.cpp
C++
cpp
1,383
permissive
#include "wrappers.hpp" #include "support/simd.hpp" #ifdef CPB_USE_MKL # include <mkl.h> #endif using namespace cpb; PYBIND11_MODULE(_pybinding, m) { wrap_greens(m); wrap_lattice(m); wrap_leads(m); wrap_model(m); wrap_modifiers(m); wrap_parallel(m); wrap_shape(m); wrap_solver(m); w...
dbe57e163d5f72c35b50f22e00ee044994a8fb58
1f7d7dbcbe68009451dca6c1e9a2a8c0be4dfc60
khushboosinghrecs/Data_Structure
/graph/countcomponent.cpp
C++
cpp
811
no_license
#include <bits/stdc++.h> using namespace std; void dfs(int s,vector<int> edge[],bool visited[]){ visited[s] = true; for(int x : edge[s]){ if(visited[x] == false){ dfs(x,edge,visited); } } } int main() { int test; cin >> test; while(test--){ int n,e; ci...
b00b34607605db1b3e9bb0fd0e8115f31b46d0a5
27064b7bb49e33fda0645cf1db4eb518bd9d85b2
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function13903/function13903_schedule_28/function13903_schedule_28_wrapper.cpp
C++
cpp
1,001
no_license
#include "Halide.h" #include "function13903_schedule_28_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(128, 128); Halide::Buffer<int32_t> buf01...
f66926bac02d19ea6129fcea3164b802d4db2f6b
f56cd73fa8a894d227c930849961ffc0169b8c3b
NVIDIA/tensorflow
/tensorflow/core/graph/validate_test.cc
C++
cc
6,711
permissive
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
dc7e3d1ba64f8e66bafe6f8032c6d91970022fbc
35ee291568c436f8d477a7246f469fe8ddd873ea
fxprunayre/gdal
/gdal/frmts/bsb/bsbdataset.cpp
C++
cpp
43,846
permissive
/****************************************************************************** * * Project: BSB Reader * Purpose: BSBDataset implementation for BSB format. * Author: Frank Warmerdam, warmerdam@pobox.com * ****************************************************************************** * Copyright (c) 2001, Fr...
224f2a1dfc36b3a95ea4a867b51f4b5e7ce652de
2e7a13417de4cb322001f1be4dfa98a094f1ffa4
alec101/OSInteraction
/include/util/chainList.hpp
C++
hpp
7,530
permissive
#pragma once #ifndef CHAINLIST_DEFINED #define CHAINLIST_DEFINED 1 #include <stdint.h> //#define CHAINLIST_SAFECHECKS 1 //to check for bad calls to chainList #ifndef CHAINLIST_DEALLOC #define CHAINLIST_DEALLOC(x) delete x #endif // DERIVE classes from this one & DEFINE what vars are in the node inside it class ch...
d987d78b3e8d5f29e992b3e8f7311cc069f7c15d
856cb3f601956fc80449bab6d3bffc5b2ce28c7c
OSADP/INFLO
/INFLO-PRO/Azure/external/SCSC.ASN_r36/source/DSRC_TK_J2735_R36/HeadingSlice.cpp
C++
cpp
5,106
permissive
/************************************************************************* * * SCSC CONFIDENTIAL * __________________ * * Copyright (c) [2009] - [2012] * SubCarrier System Corp. (SCSC) * All Rights Reserved. * * NOTICE: All information contained herein is, and remains, * the property of SubCarrier Syste...
e0b6343613f7e5957bc136b9ecbc6e87c25fd3c6
d89496366589ff76b399a71e8c6d7b36b1042969
paulineggf/42-Modules_CPP
/day04/ex02/list/listAccess.hpp
C++
hpp
1,320
no_license
#include "list.hpp" template<typename T, class Alloc> typename ft::list<T, Alloc>::reference ft::list<T, Alloc>::back() { ft::list<T, Alloc>::iterator it = this->begin(); while (it._M_node->_M_next) it++; return (*it); } template<typename T, class Alloc> typename ft::list<T, Alloc>::...
de83725b09bbac4c1f99c76f18a97c33c011ae28
43c17af776fc9068589762ecfd7fb06542549eea
Naktakala/PyMesh
/tools/OuterHull/IGL/IGLOuterHullEngine.cpp
C++
cpp
3,295
no_license
/* This file is part of PyMesh. Copyright (c) 2015 by Qingnan Zhou */ #ifdef WITH_IGL_AND_CGAL #include "IGLOuterHullEngine.h" #include <algorithm> #include <cassert> #include <iostream> #include <sstream> #include <vector> #include <Math/MatrixUtils.h> //#include <igl/cgal/outer_hull.h> #include <igl/copyleft/cgal/...
1bdc657d8faeeac9d6fa81a184602e72bc990304
f80ae610879b493e24a38158ba2d33541a55e282
gunrock/gunrock
/include/gunrock/memory.hxx
C++
hxx
4,623
permissive
/** * @file memory.hxx * @author Muhammad Osama (mosama@ucdavis.edu) * @brief * @version 0.1 * @date 2020-09-22 * * @copyright Copyright (c) 2021 * */ #pragma once #include <iostream> #include <memory> #include <thrust/device_ptr.h> #include <gunrock/error.hxx> namespace gunrock { namespace memory { /** ...
972622e66ed4f642942387c82343761213c2305e
9864b33ecafce662714fb8ed044f38ab9f33452b
holla2040/daryldaryl
/src/Daryl.cpp
C++
cpp
407
permissive
#include <Arduino.h> #include "Daryl.h" Daryl::Daryl(int pan, int tilt, int jaw,int eyeleft, int eyemiddle, int eyeright) { pinMode(pan, OUTPUT); pinMode(tilt, OUTPUT); pinMode(jaw, OUTPUT); _pan = pan; _tilt = tilt; _jaw = jaw; _eyesLeft = eyeleft; _eyesMiddle = eyemiddle; _eyesRight = eyeright; } ...
1db69668555c4e4e4ecde1bdcb57a917ee98d5da
26b7d3591a3ab100b53a4ee47b9fdb99a600b73b
CromwellEnage/graph
/test/core_numbers_test.cpp
C++
cpp
4,062
no_license
// (C) Copyright David Gleich 2007 // // 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 <vector> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/core_numbers.hpp> #include <boost/property_...