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
1e98967ebd9d23dab10122fdbdeac2a7368b63cf
444ce1059cade14803b1d4c8a636d44b56c1222d
SmartCoffeeTech/sct
/duino/arduino-incoming-serial.cc
C++
cc
496
no_license
int incomingByte = 0; // for incoming serial data void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 bps } void loop() { // send data only when you receive data: if (Serial.available() > 0) { // read the incoming byte: inco...
61859e3818e61ab78ab55d95bd6c591cd69b86f5
3c6c167a63143d52c561ef84f2f6cfc50c307d85
indranils/SafeComplan
/src/utils/extractoutput.cpp
C++
cpp
2,516
permissive
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <string> #include <string.h> #include <stdlib.h> using namespace std; float extractTrajectoryCostInformation() { ifstream ifp; int location; string line; string var; string value; string str; float val1, val2; float ...
a5896e82a83af174c5b2bb64cd285e78d1a928f1
69400342ddadd887c7e787a65792468e7eadc715
joegoldin/seastar
/src/core/reactor_backend.cc
C++
cc
32,012
permissive
/* * This file is open source software, licensed to you under the terms * of the Apache License, Version 2.0 (the "License"). See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. You may not use this file except in compliance with the License. * * You may ...
20868be00e62992fb2d8c5d9964709d160faa76b
c1a7e66ccd1d9c36c220abaa283a7c6251c7b55b
connerlacy/quneo_demo_lab
/JuceLibraryCode/modules/juce_audio_devices/native/juce_mac_CoreAudio.cpp
C++
cpp
44,697
permissive
/* ============================================================================== This file is part of the JUCE library - "Jules' Utility Class Extensions" Copyright 2004-11 by Raw Material Software Ltd. ------------------------------------------------------------------------------ JUCE can be r...
a2d795d69ce3ad8564ad27bbf5f7d4c5e042cc2c
64b291effffd4e972a339846878f356c048a0cee
jhellerstein/tiered-storage
/tests/test_SetLattice.hpp
C++
hpp
2,064
no_license
#include <iostream> #include <stdio.h> #include <stdlib.h> #include "gtest/gtest.h" #include "core_lattices.h" class SetLatticeTest : public ::testing::Test { protected: SetLattice<char>* sl; unordered_set<char> set1 = {'a', 'b', 'c'}; unordered_set<char> set2 = {'c', 'd', 'e'}; unordered_set<char> set3 = {'a', 'd...
9e61fedcc528e8bfb8aa337d5d9ab6b9712b459c
35b418deaab397ed7f569d647efa41b136a216ed
DwyaneSuarez/CompilerExperiment
/Parser/mainwindow.cpp
C++
cpp
1,551
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QFileDialog> #include <QTextStream> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); pars = new Parser(this); } MainWindow::~MainWindow() { delete ui; } void ...
0a89d8a30eeb69a00c6667e2704e82024a217ec4
459944acad624a7476dd3cc0fb74a8addb207d26
david-guerrero/MITK
/MITK/Modules/QmitkExt/QmitkFunctionalityComponents/QmitkThresholdComponent.cpp
C++
cpp
23,040
no_license
/*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt o...
54e20fbd984958b854c1430cf175be393e67607b
4110cbc00b1fc24c0812e0bd8c9cec9a93aa3446
UG-SEP/NeoAlgo
/C-Plus-Plus/other/DynamicHuffman.cpp
C++
cpp
8,680
permissive
/* Given a string S encode it according to the Dynamic Huffman Encoding Technique. In Dynamic Huffman encoding technique we generate new code for each character dynamically i.e. it changes after we scan a new character. */ #include <bits/stdc++.h> using namespace std; class TreeNode { public: int freq; char sy...
de64c791f5967e6e3465b1de0baf84a5124ea972
3bebc38af14a9c8749c1111a8ebec9420c1de278
bzz13/cplusplus
/StivenPrata/11/sales.cpp
C++
cpp
1,930
no_license
#include <iostream> #include "sales.h" namespace SALES { void Sales::calc(int n) { double sum; sum = min = max = sales[0]; for (int i = 1; i < n; ++i) { if (sales[i] < min) min = sales[i]; if (sales[i] > max) max = sales[i]; sum += sales[i]; } average = sum / n; } // Копирует меньшее...
85bb5930c87229e7e801112437ac08cc99d86cc6
a878fdcaed71610b5b1d5df6935fd614b9212a61
BrandonKi/cross-platform-dlib
/test/test-widget2.cpp
C++
cpp
269
permissive
#include <string> #include "./widget.hpp" class TestWidget2 : public Widget { public: std::string message(void) { return "Hello. I'm Test Widget2"; } }; DLL_EXPORT extern "C" Widget* factory(void) { return static_cast<Widget*>(new TestWidget2); }
5dbe22072cf1d28f37eef310dfb1533ea12b6886
629a411f89405d3562ef0805c7569eaf0e33bbc0
PRANAV-PANU/Algorithms
/Searching/binarySearch.cpp
C++
cpp
711
no_license
#include<iostream> using namespace std; //function for binary search int binarySearch(int a[],int l,int r,int x){ if(r >= l){ //Finding middle element int mid = l+(r-l)/2; if(a[mid]==x){ return mid; } if(a[mid]>x){ binarySearch(a,l,mid-1,x); } return binary...
9550845f970eb150e0ffd45296d5cbb8c238dc82
b9626e63f531af85a39163adbe8bebae699924f0
travelpaycoin/travelpay
/src/libzerocoin/Params.cpp
C++
cpp
1,378
permissive
/** * @file Params.cpp * * @brief Parameter class for Zerocoin. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This project is released under the MIT license. **/ // Copyright (c)...
e263158fe7c51fbfe3d831093ff19f288b4c0425
c88690e94cbb69b70965fd1a5545c1c665004740
oksana-yashan/yellowBelt_Cpp
/week6/project/database.cpp
C++
cpp
711
no_license
#include "database.h" void Database::Add(const Date date, const string event) { // pair<iterator, bool> isInserted = db[date].first.insert(event); auto isInserted = db[date].s.insert(event); if (isInserted.second) { db[date].v.push_back(event); } } void Database::Print(ostream &os) const {...
470bdd42c2e8bb5ce16b5eee045b57f3cf8a088e
b7706f4cc9f53c43c03d080b9a32908a75e92149
Mogileeswaran/LeetCode_problems_solution
/source-code/Merge_Two_Binary_Trees.cpp
C++
cpp
651
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { if(!t1 and !t2) { return...
d57829f08cd65aa4de8fe9b77c7cd465c081e5c0
0a09685a27e09c563762cfb60f6debaa85b72d15
Patatje19/Procedural-Programming-in-C
/Week 3/Exercise 3.10 - Som/Exercise 3.10 - Som.cpp
C++
cpp
961
no_license
// Schrijf een functie die van een gegeven vector<vector<float> > de som per rij berekent // en teruggeeft. #include <iostream> #include <vector> std::vector<std::vector<float> > sumVector (const std::vector<std::vector<float> > & numbers) { float value = 0; std::vector<std::vector<float> > calcVector; for (int ...
f614b454f3904394b3c574963c778684918dceeb
55d7dc1442a196a0410c32641df60f40a6038166
hittongliu/InterviewCode
/stack.cpp
C++
cpp
2,290
no_license
#include <stdlib.h> #include <stdio.h> using namespace std; class Stack{ public: Stack(int length) { p = (int *)malloc(sizeof(int) * length); top = -1; } Stack() { p = (int *)malloc(sizeof(int) * 5); top = -1; } ~Stack() { free(p); } void push(int data...
1b71a3b932f3e8d072216ed5f393b6fb74bb872d
001f74a7dcdadd229c3b039cdbee1d80f89d53b2
geopm/geopm
/service/src/NVMLDevicePool.cpp
C++
cpp
15,759
permissive
/* * Copyright (c) 2015 - 2023, Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ #include "config.h" #include <cmath> #include <fstream> #include <iostream> #include <sstream> #include <string> #include <nvml.h> #include <unistd.h> #include "geopm/Exception.hpp" #include "geopm/Agg.hpp" #include "geo...
fd7f9d8ff1e22e9fceefc2dda4bebdf7262a481b
646e35d87703cb43e772e771a3ce2052ec70d81d
fivol/acos
/inf21-2_posix_dl_cpp-class-loader/tests.cpp
C++
cpp
463
no_license
#include <iostream> #include "main.cpp" class LikeA { public: int var; }; int main() { ClassLoader loader; auto class_ = loader.loadClass("A"); if (!class_) { std::cout << "Error: " << '\n'; return 0; } else { std::cout << "Success\n"; } auto *orig = (Class<Like...
7e3901ed02d5eb89f0e170764d9f9fb883fd491e
3725738cce49fd771d635cf11a04efbce35f4f1c
jonplimas/dynamic_iceberg_avoidance
/ices_timing.cpp
C++
cpp
1,924
permissive
/////////////////////////////////////////////////////////////////////////////// // ices_timing.cpp // // Example code showing how to run each algorithm while measuring // elapsed times precisely. You should modify this program to gather // all of your experimental data. // //////////////////////////////////////////////...
d2c4e81e208964f2aed6940fc3e84d06d9c5f24e
ada31e752938ae97397073a0b969a7313adcdc05
hanyc1992/EPL-Project
/lab3/PhaseB/lifeform/yh7483.cpp
C++
cpp
4,924
no_license
#include <cmath> #include <cstdlib> #include <iostream> #include <string> #include <vector> #include <algorithm> #include "yh7483.h" #include "Event.h" #include "ObjInfo.h" #include "Params.h" #include "Random.h" #include "Window.h" #ifdef _MSC_VER using namespace epl; #endif using namespace std; using String = std::s...
23006fcc1c3a846ac552fbfbecf4d09972323f1f
92084c3e14761dd406b9ff7e113d358af2b6e6c6
kgourgou/fmmtl
/fmmtl/FMMOptions.hpp
C++
hpp
3,895
no_license
#pragma once /** * Storage class for all FMM options */ #include <iostream> #include <fstream> #include "config.hpp" /** Class to define compile-time and run-time FMM options */ class FMMOptions { struct DefaultMAC { double theta_; DefaultMAC(double theta) : theta_(theta) {} template <typename BOX> bool ...
fe263eccbdc6d9757e1be2341de45123be753653
3192071d1aa3028e17aa7bb567475a1d54aca67a
kyos1704/aoj
/C++/Volume000/AOJ-0017-20120914(シーザー暗号 文中の語句がわかっている).cpp
C++
cpp
679
no_license
#include<stdio.h> #include<iostream> #include<math.h> #include<string> using namespace std; int main(){ char s[1000]; while(cin.getline(s,1000)){ for(int i=0;s[i]!='\0';i++){ if(((s[i]-s[i+1]+26)%26=='t'-'h')&&(((s[i+1]-s[i+2]+26)%26==('h'-'e'+26)%26)||(((s[i+1]-s[i+2]+26)%26==('h'-'i'+26)%26)&&((s[i...
38bb7f7524ca9f48c91e0de458c0a2411b34a592
4feeaee93b81d7cc1426fdc53dd60e18411a8797
palestar/gamecq
/GCQL/Eula.cpp
C++
cpp
1,828
permissive
// Eula.cpp : implementation file // #include "stdafx.h" #include "GCQL.h" #include "Eula.h" #include "File/FileDisk.h" #ifdef _DEBUG //#define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CEula dialog C...
2c3869d3e076d0497c21c80c170c7e0de3bb8ca7
f0953be1785af7bc2c0c1ac382b9c88d6437b26a
cecilecaillol/cmssw
/IORawData/HcalTBInputService/plugins/HcalTBSource.cc
C++
cc
5,320
permissive
#include "TFile.h" #include "TTree.h" #include "IORawData/HcalTBInputService/plugins/HcalTBSource.h" #include "IORawData/HcalTBInputService/src/CDFChunk.h" #include "IORawData/HcalTBInputService/src/CDFEventInfo.h" #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h" #include "FWCore/MessageLogger/interfa...
e83ebef21882567de67f097dbc3c382bf3d192e6
c22c542fa4142eb60dd021aa4354750dce97b59a
luoyujx/AnalysisRoot_SACLA_DelayScan
/MyGui/MyPar/MyConditions/MyConditions.cpp
C++
cpp
2,289
no_license
#include "MyConditions.h" #include "../../../MyParticle/MyParticleInfo.h" #include "../../MyInput/MyInput.h" //______________________________________________________________________________ MyConditions::MyConditions(const TGWindow *p, MyParticleInfo &pi): TGGroupFrame(p,"Conditions") { //add Tof Range From input//...
91568c1c906609c60e183eb4870ed1a3e1f8db9b
66fc3aada3d2a0e710235eb419126da409c157a8
ductape/POV-Drawrer
/PovDrawrer/MainWindow.cpp
C++
cpp
2,926
no_license
#include "MainWindow.h" #include "ui_MainWindow.h" #include "PovLibrary/Led.h" #include <QGraphicsView> #include <QGraphicsEllipseItem> #include <QGraphicsItemGroup> #include <QScreen> #include <QtMath> static const qreal LED_SIZE_IN = 0.1259; static const qreal WORK_SCREEN_X_DPI = 1920 / 18.75; static const qreal WOR...
1c5e780c5655234b38a9b5004a14b6b61f1bb12c
701b6054f2d885eb6f086e67f6af594ae9e44e27
ml-think-tanks/msm8996-vendor
/qcril-hal/modules/mbn/src/qcril_mbn_meta.cpp
C++
cpp
24,670
permissive
/****************************************************************************** # Copyright (c) 2015, 2017 Qualcomm Technologies, Inc. # All Rights Reserved. # Confidential and Proprietary - Qualcomm Technologies, Inc. #******************************************************************************/ /****************...
e2355cfe107e955389db63497135a42233a1f2b9
fd3af7d9ae370056dee546077f4cb12d929e2390
Rek3650/Engines-Project
/DirectX11_Starter/InputManager.cpp
C++
cpp
4,904
no_license
#include "InputManager.h" InputManager::InputManager(HINSTANCE appInst, HWND window, int screenWidth, int screenHeight) { keyboard = new Keyboard(); keyboard->Initialize(appInst,window,screenWidth,screenHeight); xboxC = new XboxController*[2]; xboxC[0] = new XboxController(0); xboxC[1] = new XboxController(1); ...
f800578e10c8506f39b4e5f91bb3dcdeaba37a52
f768795af8eaab6b9dee510ed62b5622a65872b2
PankeyCR/aMonkeyEngine
/EthernetCommands.hpp
C++
hpp
1,714
permissive
#ifndef EthernetCommands_hpp #define EthernetCommands_hpp #define EthernetCommands_AVAILABLE #include "Note.hpp" #include "SerialState.hpp" #include "MemoryRam.hpp" #include "System.hpp" #ifdef EthernetCommands_LogApp #include "ame_Logger_config.hpp" #include "ame_Logger.hpp" #define EthernetCommandsLog(locatio...
172e234b0a0ad4ab2cbb6592cd421a6a655e0487
14198ec3c15cc565e111fef5c3329427d35e19f3
KaixoCode/Collecto
/include/ui/GamePanel.hpp
C++
hpp
1,992
permissive
#pragma once #include "pch.hpp" #include "collecto/game.hpp" #include "collecto/player.hpp" static inline Color HexToRgb(int hexValue) { Color rgbColor; rgbColor.r = ((hexValue >> 16) & 0xFF); // Extract the RR byte rgbColor.g = ((hexValue >> 8) & 0xFF); // Extract the GG byte rgbColor.b = ((hexValue) & 0xFF); ...
008c240b520fdaa174520192201eee25203d17ec
6b44f7dab56fef9e097bc97e1aadda6b5073afeb
evertheylen/IGMPv3-Click
/elements/RouterIGMP.cc
C++
cc
1,784
no_license
#include <click/config.h> #include <click/error.hh> #include <click/args.hh> #include "RouterIGMP.hh" #include "RouterGroupState.hh" CLICK_DECLS int RouterIGMP::initialize(ErrorHandler* errh) { IGMP::initialize(errh); send_gq_timer.initialize(this, true); send_gq_timer.assign(RouterIGMP::run_send_gq_timer, this);...
464d5717e6436b8731e7f2f1973e855f1907df2c
2b277a56b8e4ce42191bc9a19c16ebc577d581b5
IAmAnubhavSaini/cryptoAlgorithm-nt5src
/Source/XPSP1/NT/inetsrv/msmq/src/migtool/mqmigrat/migent.cpp
C++
cpp
30,213
no_license
/*++ Copyright (c) 1998-99 Microsoft Corporation Module Name: migent.cpp Abstract: Migration NT4 Enterprise objects to NT5 ADS. Author: Doron Juster (DoronJ) 22-Feb-1998 --*/ #include "migrat.h" #include "resource.h" #include "dsreqinf.h" #include "migent.tmh" #define SITELINK_PROP_NUM 7 //+--...
ee56e1bd4498dbe66c7e6e688f1fa23a117213ed
751e196a99a1b0881116957194c4f4231400b4e4
mirzaei-ce/core-hellebit
/src/rpcprotocol.cpp
C++
cpp
3,784
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 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 "rpcprotocol.h" #include "random.h" #include "tinyformat.h" #include "util.h...
612e1b5a9fb187a002722776877610ae4f37a22b
76ceef32a0af5449b3cb38b0419b34151098980c
jviotti/binary-json-size-benchmark
/vendor/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc
C++
cc
6,765
permissive
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
0393918e5aca73221fda63f56ebfb4b4ab27cb92
17c544defc7d362e19357f08f806aeb967a0ac63
Pierre-Narcisi/r-type
/Server/src/Server.cpp
C++
cpp
5,235
permissive
/* ** EPITECH PROJECT, 2018 ** r-type ** File description: ** Server.cpp */ #include <signal.h> #include <iostream> #include "Constant.hpp" #include "Server.hpp" #include "WindowsCtor.hpp" #include "Network/UdpSocket/UdpSocket.hpp" #undef ERROR #define ERROR(__text) { \ resp = json::makeObject { \ { "error", js...
7cbae399da06e416421e27fb1dfdfe1aa0e8ef57
b54a49171ab55cfa7c7fbf58ed0439c26ae76723
skenqbx/atmega
/lib/ITG3200/ITG3200.cpp
C++
cpp
2,110
no_license
#include "ITG3200.h" ITG3200::ITG3200(TWI * twi, uint8_t address) : twi(twi), address(address) {} uint8_t ITG3200::enable() { // Set internal clock to 1kHz with 42Hz LPF and Full Scale to 3 for proper operation twi->start(address); twi->write(ITG3200_REG_DLPF_FS); twi->write(ITG3200_DLPF_FS_SEL_0 | ITG...
cefaa35b545cfc8075e0cbbeaf3fa8a555974988
c463f1c602af58b8251846f4e14089743eb9025f
sodrulamin/UVA
/Completed/10062 - Tell me the frequencies/10062 - Tell me the frequencies.cpp
C++
cpp
2,246
no_license
#include <iostream> #include <string> #include <map> #include <queue> #include <vector> #include <cstdio> using namespace std; class Character{ public: int ascii; int frequency; }; struct CustomCompare { bool operator()(const Character& lhs, const Character& rhs) { if(lhs.frequency == rhs...
c3716fae2bbece0e4e119b613d7b97a2f0471adb
fb6a8cb7dfba8881a7a2ca2084fe4748ccb8b9f1
MangoMaster/oop_individual_project
/testcase/vitro_diagnostics_s1r2.cpp
C++
cpp
2,931
no_license
#include <iostream> #include "testcase.h" using namespace std; using namespace DMFB; void TestCase::exampleVitroDiagnosticsS1R2() { cout << "Solving Vitro Diagnostics S1R2 example..." << endl; Profile p; Droplet droplet1("sample1_1"); p.addDroplet(droplet1); Droplet droplet2("sample1_2"); p....
da4b1138937d99b90f4292225b71ba5eb7c20661
387f47a4e1a2ba3d3c6afea94a9f77f7a5d24302
ITMO-AE/functions-containers-build-BairaMolotkova
/task4.cpp
C++
cpp
399
no_license
#include <iostream> #include <string> #include <vector> using namespace std; void copy(vector<int>& first, vector<int>& second) { for (auto x : first) { second.push_back(x); } first.clear(); } int main() { vector<int> first = { 1,2,3,4 }, second = { 1,2,3,4,5,6,7,0 }; copy(first, second); ...
bc419289c94fd271871b34ab866b01e7e988bd11
ab80fcfba6168cd41b3bf1e4272c24ad0133b1e1
smara97/CompetitiveProgramming
/UVA/10344.cpp
C++
cpp
868
no_license
#define _CRT_SECURE_NO_WARINGS #include<bits/stdc++.h> #define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define PI 3.14159265; typedef long long ll; using namespace std; ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); } ll lcm(ll a, ll b) { return (a / gcd(a, b)) * b; } int a[5]; bool ook = 0; bool s...
4d16a24e5735d2cbdb48ce93ebecc00f8cf47aa2
587e5111b04e88607d43d807475e60396fc9e4a0
CMS-TMTT/cmssw
/CondTools/Ecal/plugins/TestEcalLaser_weekly_Linearization_Analyzer.cc
C++
cc
394
permissive
#include "CondCore/PopCon/interface/PopConAnalyzer.h" #include "CondTools/Ecal/interface/EcalLaser_weekly_Linearization.h" #include "FWCore/Framework/interface/MakerMacros.h" typedef popcon::PopConAnalyzer<popcon::EcalLaser_weekly_Linearization> ExTestEcalLaser_weekly_Linearization_Analyzer; //define this as a ...
133b702459e35c0ca13a54d4cf8195865edc069d
08fb9b7f2e3a1a06ebf0a8ceae38a48f445cbea8
nikhita01/myalgo
/BUBBLE.CPP
C++
cpp
463
no_license
#include<iostream.h> #include<conio.h> #include<stdio.h> void main() { clrscr(); int a[20]; int temp; cout<<"enter elements"<<endl; for(int i=0;i<20;i++) { cin>>a[i]; } cout<<"sorting using bubble sort"<<endl; for(i=0;i<(20-1);i++) { for(int j=0;j<(20-i-1);j++) { if(a[j]>a[j+1]) { temp=a[j]...
280ab1884be3059d0d65e4963d182d50d7943f89
d2d37065c7232019c4a24c1fad6bcf84f9cd7419
mrbearsky/microsoft-ui-xaml
/dev/Lights/RevealBorderLight.cpp
C++
cpp
18,924
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. #include "pch.h" #include "common.h" #include "RevealBorderLight.h" #include "IsTargetDPHelper.h" #include "SpotLightStateHelper.h" #include "MaterialHelper.h" #pra...
72556bdc980b2e636fee7aec31bf914dfb965d6d
02cb4688e9c5be0df8ef7bde101ba6783ca1787c
Moreniell/study-projects
/CPlusPlus/Stack/Иванченко/СтекНаСписке/Utils.cpp
C++
cpp
13,812
no_license
#include "stdafx.h" #include "Utils.h" HANDLE h; // внутренняя глобальная переменная для хранения атрибута знакоместа WORD wColor = Black << 4 | Grey; // Подготовка приложения к работе void init() { SetConsoleOutputCP(1251); SetConsoleCP(1251); srand(GetTickCount()); cout << fixed << setprecision(3) << boolal...
7f4554873c4c1e13cc37f17894f2593f2a5a39e0
8a1ca024f020d7b3fd16a43060d42d20238d69d1
sadmanamin/Solved-Problems
/CodeForces/617A/7801331_AC_15ms_2040kB.cpp
C++
cpp
367
no_license
#include <bits/stdc++.h> using namespace std; int main() { int cor,cnt=0; cin>>cor; while(cor!=0){ if(cor>=5){ cor=cor-5; cnt++; } else if(cor>=4){ cor=cor-4; cnt++; } else if(cor>=3){ cor=cor-3; cnt++; } else if(cor>=2){ cor=cor-2; cnt++; } else if(cor>=1){ cor=cor-1; ...
3c5bba572d99a41827dc51d7c94c28b8dc7c882d
24957597087a2c8234b1abc0b04e1883ee717df6
jeremyroman/blink
/Source/modules/webaudio/OscillatorNode.cpp
C++
cpp
11,503
permissive
/* * Copyright (C) 2012, Google 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: * 1. Redistributions of source code must retain the above copyright * notice, this list of condition...
7f6c3e8cda4d5ac99abe70331ae659d2214c7458
006d16198c93389d17be690ab56240a745c652bc
konec/usercode-L1RpcTriggerAnalysis
/src/AnaRpcVsOth.cc
C++
cc
6,366
no_license
#include "UserCode/L1RpcTriggerAnalysis/interface/AnaRpcVsOth.h" #include "TProfile.h" #include "TObjArray.h" #include "TH2F.h" #include "TH1D.h" #include "TGraphErrors.h" #include "TF1.h" #include "UserCode/L1RpcTriggerAnalysis/interface/MuonObj.h" #include "UserCode/L1RpcTriggerAnalysis/interface/L1Obj.h" #include "U...
92bed47261c3ada42618a9dfad2204338c406223
fd35005a6db0f9121a7512c6c141c4d0c2288d60
jstavr/Architecture-Relation-Evaluator
/Replication/DataFileSystem/PRODUCT_SOURCE_CODE/itk/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx
C++
cxx
7,784
no_license
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * ...
6da5e4b11964163ca1f4de4db16d432a49b8688e
f91f1dd545ac8d348cdceb68ad0593613100f39f
Ocxs/Cpp-Primer
/ch03/ex3_36.cpp
C++
cpp
1,037
permissive
#include <iostream> #include <vector> #include <iterator> using std::begin; using std::end; using std::cout; using std::endl; using std::vector; // pb point to begin of the array, pe point to end of the array. bool compare(int* const pb1, int* const pe1, int* const pb2, int* const pe2) { if ((pe1 - pb1) != (pe2 - p...
3b7af243c9287aa81ed71b2c923e1d304dc5079e
848c94535bbaacc5ead3b524197fb0d0b1a14b91
ybs0111/AMT8590_1Edition
/AMT8590_1st/AMT8590_1th_2016_0923/AVersion.cpp
C++
cpp
2,751
no_license
// AVersion.cpp: implementation of the AVersion class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "handler.h" #include "AVersion.h" #include "AMTRegistry.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif #incl...
2df9db675db39992284d82fefd2ee3fb96ccd893
2132ec9ff8a3d2736408555ab7be8b6d7d202fab
random-builder/design_cadquery_ocp
/src-linux/TShort.cpp
C++
cpp
8,787
no_license
// std lib related includes #include <tuple> // pybind 11 related includes #include <pybind11/pybind11.h> #include <pybind11/stl.h> namespace py = pybind11; // Standard Handle #include <Standard_Handle.hxx> // includes to resolve forward declarations // module includes #include <TShort_Array1OfShortReal.hxx> #i...
b3166f6437aff12b9303060cbaa60c3d0998e554
6f1f8a23931c0ce6d7b1e612e95011da94626603
tgeery/dss_coding_assignment
/dss_project/src/JsonManager.cpp
C++
cpp
2,586
no_license
#include "JsonManager.h" #include <stdio.h> int getInt(struct json_object * obj, const char * key) { struct json_object * o = json_object_object_get(obj, key); return json_object_get_int(o); } const char* getString(struct json_object* obj, const char* key) { struct json_object* o = json_object_object_ge...
6c1881a0de64b50ea40027dd68c509632dd9a007
6a5600c76e32796091baf732835b1b55617e455d
Witalia008/university_courses
/bachelors/year1/semestre2/cpp-archive/additional/Crocodile.cpp
C++
cpp
5,595
no_license
#include <stdio.h> #include <cstdlib> #include <iostream> #include <set> #include <algorithm> #include <vector> #include <string> #include <memory.h> #include <map> #define _USE_MATH_DEFINES #include <math.h> #include <list> #include <fstream> #include <time.h> #include <iomanip> #include <queue> #inclu...
cc6ed2bb9317803f53750362fa1bbaf0e36b0491
f981842e9d4bc64b691384647621e3e6e29c96e8
peteratebs/webcwebbrowser
/webc/WebC/include/minigui/wtedbox.hpp
C++
hpp
2,268
no_license
#ifndef __WTEDBOX_HPP__ #define __WTEDBOX_HPP__ #include "wtedstr.hpp" #include "wtscroll.hpp" class WebEditBox : public WebEditString { public: WebEditBox (); virtual ~WebEditBox (); virtual HTMLEventStatus Event (HTMLEvent *e); virtual void DrawThisOnly (DISPLAY_INT x, DISPLAY_INT y, WebGraphics *...
49a312458d23816d07f1dbebeeb51c6af738cc24
0fa78a6261348da23f01faf920a55d1a481710df
dwywdo/PS
/BFS/소수 경로/1963_solution.cpp
C++
cpp
1,365
no_license
#include <iostream> #include <queue> #include <string> using namespace std; bool canGo[10000]; int dist[10000]; int T = 0; int main(){ for(int i=0; i<10000; i++){ if(i<1000) canGo[i] = false; else{ canGo[i] = true; for(int j=2; j<=i/2; j++){ if(i%j == 0) canGo...
3aab925a1209665121c8049985c33712fc0ab2b3
01c0621f5c996a39040d464f3fa3566e7d7c0097
tangchain/tang-core
/src/main/ExternalQueue.cpp
C++
cpp
6,539
permissive
// Copyright 2015 Stellar Development Foundation and contributors. Licensed // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 #include "ExternalQueue.h" #include "Application.h" #include "database/Database.h" #include "l...
6be7e7d051aa56237f5860650b0035204c8c402c
760d132974bc325abd5305e485496f5936627f7a
XSKW11111/RDF_parser
/rdf_parser.hpp
C++
hpp
748
no_license
// // rdf_parser.hpp // Trival_RDF_parser // // Created by 王嘉睿 on 2019/5/9. // Copyright © 2019 Jerry's World. All rights reserved. // #ifndef rdf_parser_hpp #define rdf_parser_hpp #include <iostream> #include <fstream> #include <map> #include <string> #include <iomanip> #include "json.h" using namespace std; c...
c74721dd3d334af17b1d9eca34bfe3ca98db77cb
95e7d29acf827737db36449621a689a5877d816b
jackflower/SCInfor
/SCInfor/source/Equipment/Thermodynamics/Airconditioning/Airconditioning.cpp
C++
cpp
10,899
no_license
// ____________________________________________ // | Airconditioning.cpp - class implementation | // | Jack Flower June 2014 | // |____________________________________________| // #include "Airconditioning.h" #include "../../../Weather/Weather.h" #include "../../../Rendering/Animations/AnimSet.h...
5dc8ca061e54bbc07a90fc99638f0f3f22c39cf8
1324b3440c6d03c0dca503abb2ef89d581aa3e35
yus013/MemRepair
/src/include/TestBipartiteGraph.cpp
C++
cpp
589
no_license
#include "Graph.h" #include <cassert> int main(int narg, char *args[]) { auto block = new sjtu::BipartiteGraph(); auto u1 = block->new_vertex_x(); block->insert(block->st, u1, 2); assert((block->edges).size() == 2); auto u2 = block->new_vertex_x(); block->insert(block->st, u2, 1); auto v = block->new_vertex_...
b14ff032b4dd2d1860ca73275824fac6c9ffc273
71822f45160c357868245dcb523cd3bae488ec73
sigh2021/connectedhomeip
/src/messaging/tests/echo/echo_responder.cpp
C++
cpp
4,473
permissive
/* * * Copyright (c) 2020 Project CHIP 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 requir...
e81247204588c45ae0238d631062d67093341f0d
27f469941f685c1e2eee1a62bf9c8a89436be9f2
shatakshi-modi/Codeforces-Solution
/A_Tram.cpp
C++
cpp
359
no_license
#include <iostream> using namespace std; int main(){ int n; cin>>n; int peopleInside{0}, a, b,maxCapacity{0}; // a is exit, b is entry while(n--){ cin>>a>>b; peopleInside=(peopleInside-a)+b; if (peopleInside>maxCapacity) { maxCapacity=peopleInside; } ...
9b8ec42ef4f21afe4c1ccf59a6cc747af292638e
845e78aab93ca6a9112d8b194d6b2e75b6480032
adshidtadka/algorithm
/qiita/chap3/sec1/sniper.cpp
C++
cpp
5,103
no_license
// include //------------------------------------------ #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include...
c5f672ca9cae76c15768f416f6ce2984ef56dca1
e7b9d200691628c4efd1369a2c69b1de05304cc1
UniqueZHY/ZHY
/algorithm/188_指定范围内的质数.cpp
C++
cpp
968
no_license
/************************************************************************* > File Name: 188_指定范围内的质数.cpp > Author: > Mail: > Created Time: 2019年12月19日 星期四 19时27分15秒 ************************************************************************/ #include<iostream> #include<cstdio> #include<cstring> #include<vector> #i...
313f7d0aae47ebff76543d71cc5db1fe197818f1
c66f57e6c05dc40260e6d8b531d1660429da5090
proprowataya/calc4
/src/StackMachine.cpp
C++
cpp
38,836
permissive
/***** * * The Calc4 Programming Language * * Copyright (C) 2018-2022 Yuya Watari * This software is released under the MIT License, see LICENSE file for details * *****/ #include "StackMachine.h" #include "Common.h" #include "Exceptions.h" #include "ExecutionState.h" #include "Operators.h" #include <algorithm...
a291abbd273eaa539863a5dda150a7b8c6149852
ee5b29cae050f5e40573d716ebbe2d0241c2cf93
lucianovr/competitive-programming
/URI/1221.cpp
C++
cpp
549
no_license
#include <cstdlib> #include <iostream> using namespace std; bool VerificaPRIMO(unsigned long long int num) { for (int i = 3; i * i <= num; i = i + 2) { if (num % i == 0) return false; } return true; } int main() { unsigned long long int x; int n; cin >> n; ...
2abed570105965da2cc4e325a598ec28004fc8c7
dfed81914892e8f9240ac5e36e1416d7a7f1f91a
setvisible/music-zapper
/src/gui/videowidget.cpp
C++
cpp
3,381
permissive
/* - MuzicZapper - Copyright (C) 2011-2017 Sebastien Vavassori * * This program is free software; you can redistribute it and/or * modify it under the terms of the MIT License. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (t...
698fde3d75f8d86e523a24e3e783782c3f154106
175d5477ddaa3e62a69d93b06151455d0f1b3dab
PreSoichiSumi/CompetitiveProgrammingLibrary
/solved/AtCoder/ABC/34C.cpp
C++
cpp
1,294
no_license
#include <iostream> #include <climits> using namespace std; #define MODULE 1000000007 typedef pair<int, int> P; typedef long long LL; const int INF = INT_MAX / 2; const int MAXWH = 1000; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, -1, 0, 1}; //-----Template--------- //素因数分解を使った組み合わせ計算.mod下でも動作する LL modComb(LL n, L...
e115d53b15c202762e1a46de8ce41983724d7146
712e942b0a612d20005e0111f7be23e4453e5d92
henrybzhang/usaco
/gift1.cpp
C++
cpp
2,040
no_license
/* ID: LGD84711 LANG: C++ TASK: gift1 */ #include <iostream> #include <fstream> using namespace std; struct structs { string person; int bank; }; int main() { ifstream fin ("gift1.in"); ofstream fout ("gift1.out"); int people, money, counter, split, counters, counter1; st...
b38d74c56a4e974f160d4e3622b2869791902bcf
b3106229c1bc83856209379f35a6c90f5c11804f
jhl72e/ROCKFALL
/ROCKFALL/myFunction.cpp
C++
cpp
2,196
no_license
#include <map> #include "myFunction.h" #include "GameScene.h" #include "SoundMgr.h" using namespace std; extern LPDIRECT3DDEVICE9 g_pd3dDevice; extern LPD3DXSPRITE g_pSprite; extern HWND g_hWnd; SoundMgr *soundMgr; IScene *nowScene; map<const char*, LPDIRECT3DTEXTURE9> texMap; LARGE_INTEGER LInterval, RInterval, Fr...
d8473f4611f4615e8f92dfc446f3888a983ab540
b56f6078943c76722bed298a8e80c6dc9bea0533
buptlxb/leetcode
/1st/binary_tree_level_order_traversal.cpp
C++
cpp
1,565
no_license
#include <iostream> #include <vector> #include <queue> using std::vector; using std::queue; using std::cout; using std::endl; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: vector<vector<int> > levelOrde...
a80b24b8b42512dc83624a19084d1a8e2254d892
f8d07461abd7fb64c762f387bd38942f67b481f9
asaivishal/sdo-1
/SDO_Model_Type.cpp
C++
cpp
15,127
no_license
/* +----------------------------------------------------------------------+ | (c) Copyright IBM Corporation 2005. | | All Rights Reserved. | +----------------------------------------------------------------------+ | ...
aaa256e9bec4439f75df6beec28c0fdb8d2edf92
4d27ba5bef8c04dceea489ab7a1b213fd1430121
Neverous/spoj
/niekolej.cpp
C++
cpp
403
no_license
/* 2010 * Maciej Szeptuch * XIV LO Wrocław */ #include<cstdio> //#define DEBUG(args...) fprintf(stderr, args) #define DEBUG(args...) int len; int main(void) { scanf("%d", &len); ++ len; if(len == 1) { puts("0"); return 0; } if(len < 4) { puts("NIE"); return 0; } for(int p = 0, a = 0, b = len / 2;...
7aafe17f81f86546f7de089d5184ceaf0c020ed4
3a2b3a19dcb62592eb789d3c48fc007e3625d4ee
alphapayofficial/alphapay
/src/qt/clientmodel.cpp
C++
cpp
10,037
permissive
// Copyright (c) 2011-2016 The Alphapay Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "clientmodel.h" #include "bantablemodel.h" #include "guiconstants.h" #include "guiutil.h" #include "peertablemodel...
a9b2b1ba9b21dfdc5cee33dc3e67ba69fb9cc314
006dc5a1377a8be875e48ba7e3bfa5bf2d4fbf7c
swri-robotics/AirSim
/AirLib/src/vehicles/multirotor/api/MultirotorRpcLibServer.cpp
C++
cpp
10,332
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. //in header only mode, control library is not available #ifndef AIRLIB_HEADER_ONLY //RPC code requires C++14. If build system like Unreal doesn't support it then use compiled binaries #ifndef AIRLIB_NO_RPC //if using Unreal...
44b3ab89446f39893706c4085275499f576bacb7
4e6a6edcbbc1d33b868ec24188c40246d5a84645
hozdogan/My_Scikit
/my_scikit.cpp
C++
cpp
29,542
no_license
#include <iostream> #include<math.h> #include<string.h> #include <stdlib.h> #include <time.h> #define PI 3.14159 #define E 2.71828 using namespace std; class Point { public: Point(){}; Point(double ,double); void setPoints(double,double); double getX(); double getY(); private: double x,y; }; class Equation...
acfeadccd1e110b08e5d30cce7893ba0dd1922f9
e78859e69fd6914f027e908a95af286263f4becd
s1hofmann/PipeR
/src/pl/ml/platt.cpp
C++
cpp
4,244
no_license
#include "platt.h" #include <iostream> #include "../exception/error.h" namespace pl { Platt::Platt() { } Platt::~Platt() { } std::pair<double, double> Platt::platt_calibrate(const cv::Mat1d decision, const cv::Mat1i labels) { if(decision.rows != labels.rows |...
b88d8fe599f9dc4dc4abc7c4a540186227aec476
6c795ca10c37832d27d82c8c1d70ca1235bec133
memosiki/da
/5-suffix_tree/main.cpp
C++
cpp
539
no_license
#include "TSuffixTree.h" #include <string> #include <iostream> int main(void) { std::string text; std::cin >> text; TSuffixTree tree(text + "$"); int count = 1; std::vector<int> res; while (std::cin >> text){ res = tree.Search(text); if (!res.empty()) { std::cout <<...
b2d32a40934734759fe0e31b1898d30a05fab0ce
9df45d3a8018774a7133b02a254763c5a6882dc4
ric2b/Vivaldi-browser
/chromium/chrome/browser/ash/login/ui/captive_portal_window_browsertest.cc
C++
cc
8,336
permissive
// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <memory> #include "ash/constants/ash_switches.h" #include "base/command_line.h" #include "base/run_loop.h" #include "chrome/browser/ash/login/login_manager_test.h" #i...
f81c0d107f1b31a86a33e9adf97ed6bbe2ce2fd0
f819976cc7587619889642c1bbb77abef450f67f
johnkirchenbauer/cse332lab4
/KBMLab4/card.cpp
C++
cpp
713
no_license
/* * Name: card.cpp * Author: Zach Miller (zach.miller@wustl.edu) * Description: This file contains the definitions for the Card struct. A Card has a suit and a rank. Cards are ranked by rank first (2 is the smallest and ace is the largest), * and then by suit (alphabetically) */ #pragma once #include "stdafx.h" #...
5879d940793938395081fabfdef2b702ccc31308
40c39c845db6394e635cc01314a23755835e9cc7
Quuxplusone/clang
/lib/AST/DeclTemplate.cpp
C++
cpp
51,863
permissive
//===- DeclTemplate.cpp - Template Declaration AST Node Implementation ----===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
6eea3819927a03382de292b8001739b4424c5732
b67da6e36b452519857044940e34ff35994d57ad
BlokyMose/SAIRArena
/Source/SAIRArena/Private/Interact/InteractableBase.cpp
C++
cpp
1,418
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Interact/InteractableBase.h" // Sets default values AInteractableBase::AInteractableBase() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.b...
675da06bcb7141c5ed5be738bd46eeeddb006660
2c3c6c48fb29434f66ef2f19be6a9e88f6a56fa1
webosce/chromium53
/src/third_party/WebKit/Source/wtf/WTFThreadData.cpp
C++
cpp
1,947
permissive
/* * Copyright (C) 2008, 2010 Apple 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: * 1. Redistributions of source code must retain the above copyright * notice, this list of condit...
4bbaafd4d854bd97260e16472c0e0332e2973ba4
81a60a198fd4abfef5ae3e509809df4631ead93c
shum/MinVR
/src/api/impl/VRGraphicsState.cpp
C++
cpp
1,343
permissive
/** This file is part of the MinVR Open Source Project, which is developed and maintained collaboratively by the University of Minnesota and Brown University. Copyright (c) 2016 Regents of the University of Minnesota and Brown University. This software is distributed under the BSD-3 Clause license, which can be foun...
0d25ec1c917e396aa8a5ef348964fed96db86197
e621da56c0b277fbb122a783e9eaae456d53534c
21denissss/aokg
/laba1/Camera.cpp
C++
cpp
2,349
no_license
#include "Camera.h" Camera::Camera() { } Camera::Camera(vec3 position) { setPosition(position); recalculatePosition(); } Camera::Camera(float x,float y,float z) { vec3 position = vec3(x, y, z); setPosition(position); } void Camera::setPosition(vec3 position) { // определяем радиус - расстояние от начала сист...
ad2360d78d56d5a8a07105d5b36a1934d3cf1e77
9e4acab3870a060db6391524fd50599889d48603
fagan2888/OTCDerivativesCalculatorModule
/OTCDerivativesCalculatorModule/Project_Cpp/lib_static/xmlFactory/GenClass/RiskMonitor-0-1/Excel_cashFlowResult.cpp
C++
cpp
10,173
no_license
// Excel_cashFlowResult.cpp #include "Excel_cashFlowResult.hpp" #ifdef ConsolePrint #include <iostream> #endif namespace FpmlSerialized { Excel_cashFlowResult::Excel_cashFlowResult(TiXmlNode* xmlNode) : ISerialized(xmlNode) { #ifdef ConsolePrint std::string initialtap_ = FileManager::instance().tap_...
dfa99cbcf40a8e476ca2fbc9f337d912024e661e
5fb1992f57e89875e6efb90d4ea41de3f5e8805e
elendilm/qtjasonviewer
/Source/JsonViewer/Windows/MainWindow.cpp
C++
cpp
9,495
no_license
/**************************************************************************** ** ** Copyright (C) 2010-2012 B.D. Mihai. ** ** This file is part of JSON Viewer. ** ** JSON Viewer is free software: you can redistribute it and/or modify it ** under the terms of the GNU Lesser Public License as published by the Fre...
22cbc4e46a3acae2e438993c05d31d5ef8ae33bb
4891640bd37e810b62acafd4d1b166430a2876ef
ruscoder2013/homework9
/main.cpp
C++
cpp
2,507
no_license
// // async_tcp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #include <cstdlib...
b66f1fae84f308cc21bfe403799dd083f219cc98
5fda0090aa229e99e67974c47a3a565a0d26a531
cvxgrp/diffcp
/cpp/src/linop.cpp
C++
cpp
4,079
permissive
#include "linop.h" #include <assert.h> LinearOperator LinearOperator::operator+(const LinearOperator &obj) const { assert(m == obj.m); assert(n == obj.n); const LinearOperator this_op = *this; const VecFn result_matvec = [this_op, obj](const Vector &x) -> Vector { return this_op.matvec(x) + obj.matvec(x);...
36bebca8502eac6711b1c6fbe041d2b9a77b0013
aad62afb18bbe68599ddbf55793757fd4314dc43
42Dugg/chentricware
/core/hooks/hooks.cpp
C++
cpp
6,590
permissive
#include "../../dependencies/utilities/csgo.hpp" #include "../features/features.hpp" #include "../features/misc/engine_prediction.hpp" #include "../features/visuals/visuals.hpp" #include "../features/legibot/legitbot.hpp" #include "../zgui/zmenu.hpp" #include "../zgui/zgui.hh" #include "../../core/features/visuals/cham...
5c89bb3457cbdfb7db779fdeb5d6e81e5f150a59
78dedba735a117652b9b35366f66d7752b603474
wayland-chen/RaftLib
/examples/simple/poc.cpp
C++
cpp
2,443
permissive
/** * test file from mr-j0nes @github * Proof of concept Raftlib * * Want to have a 3 kernels stream which produces and sends 10 numbers down the stream. * The 10 numbers should be created by the first kernel and destroyed by the last. * */ #include <raft> #include <raftio> /** * Producer: sends down the strea...
64b562ee00419bfbd24c0dc97a62a71679c74c7c
78fb39b5252750a98f1bd3a5a2532e313192bdf2
KhronosGroup/SYCL-CTS
/tests/accessor/host_accessor_linearization_fp64.cpp
C++
cpp
1,966
permissive
/******************************************************************************* // // SYCL 2020 Conformance Test Suite // // Copyright (c) 2023 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ma...
e347bdb858ff11dcb67f472fbd95a3e6dbb1e26a
53909d67a2adfb554fa1b919fba36042c4ef66e3
RossAddinall/napi-addon-templated
/cppsrc/main.cpp
C++
cpp
396
no_license
// // Created by ross on 18/12/2018. // /* cppsrc/main.cpp */ #include <napi.h> #include "Samples/functionexample.h" #include "Samples/classexample.h" #include "Samples/templateclassexample.h" Napi::Object InitAll(Napi::Env env, Napi::Object exports) { functionexample::Init(env, exports); return ClassExample...
e4576e9614bbb660e69fbeb7c39f2f4f9bd4f92a
02bc248a924fb6c9f03233d132ce30c97182dc81
samueldotj/TeeRISC-Compiler
/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
C++
cpp
165,309
permissive
//===-- LegalizeDAG.cpp - Implement SelectionDAG::Legalize ----------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
22ad39463ecd7fed1cd78867d3e5ffb71a640213
6067e8693f8c31543066d45ba22287e48474cc2b
romilpunetha/Online-Judges
/HackerEarth/Aprileasy/balls.cpp
C++
cpp
571
no_license
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; long long int sum = 0; vector<long long int> arr(n, 0); for (int i = 0; i < n; i++) { int temp; cin >> temp; arr[i] = temp; } sort(arr.begin(...
5b164453e293a4ca77fbc13e9b9d162098b15474
4d1562907bfc03b6f03548db75dbdf4c57f753a1
Devskil/master_image_synthesis
/tutos/tuto_uniform_buffers.cpp
C++
cpp
12,373
no_license
//! \file tuto_uniform_buffers.cpp alignement des donnees / uniform buffers. #include <cstddef> #include <cassert> #include <vector> #include "window.h" #include "vec.h" #include "color.h" #include "program.h" namespace glsl { // type de base alignes sur 4 octets template < typename T > struct align...
22580702faf42f1fffa5dff3b0b243be3e7d00c3
5df745de2eae3f4b4730e24c4969b221a77226e2
JoyPoint/CPP-Library-Examples
/SNR.cpp
C++
cpp
578
no_license
#include<iostream> #include<fstream> #include<algorithm> #include<SNR.hpp> using namespace std; int main(){ vector<vector<double>> p(5,vector<double> ()); double a,b,c,d,e; ifstream fpin("data/SNR_in"); while (fpin >> a >> b >> c >> d >> e) { p[0].push_back(a); p[1].push_back(b); ...
86fa4b02a2aa2db68b809fe6bb49b8cdf69d5734
18db70d9ff0d3c2954cf861359dbc7e0e53f0d0c
nexustheru/Elementum
/src/Spell.cpp
C++
cpp
1,966
no_license
/* * Copyright (C) Shroom Studios, Inc - All Rights Reserved * * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * * Written by Ahmad Amireh <ahmad@shroom-studios.com>, September 2011 */ #include "Spell.h" //#if PIXY_PLATFORM == PIXY_PLATFORM_APPLE //#include "CE...
abac046960789cb0bdbe04f59d881d3ee4a907a0
34ca878ad8610b243e24d8ca38c8cf74297b23ec
check-this-out/sharp
/src/resize.cc
C++
cc
33,454
permissive
#include <tuple> #include <algorithm> #include <cmath> #include <node.h> #include <node_buffer.h> #include <vips/vips.h> #include "nan.h" #include "common.h" #include "resize.h" using namespace v8; using namespace sharp; enum class Canvas { CROP, MAX, EMBED }; enum class Angle { D0, D90, D180, D270, DLA...
fae1ab203fbfee78521196b06312ed36d612a7bf
de9476f7e16d3b393cbed019cc3e4870afeda267
ZHOURUIH/GameEditor
/CheckVersion/EditorCore/Common/Utility/StringUtility.cpp
C++
cpp
11,546
no_license
#include "StringUtility.h" std::string StringUtility::removeSuffix(std::string str) { int dotPos = str.find_last_of('.'); if (dotPos != -1) { return str.substr(0, dotPos); } return str; } void StringUtility::removeLastComma(std::string& stream) { removeLast(stream, ','); } void StringUtility::removeLast(std:...
df12000d1c8c291fc988ec831f46674bb76e3882
7bcf6c820e5f578e81d13da866de6fadeae8b7e6
mikerovers/LINAL-assessment
/tests/matrix.test.cpp
C++
cpp
5,211
no_license
#include <catch.hpp> #include "../src/Vector2D.h" #include "../src/Matrix.h" #include "../src/MyMesh.h" TEST_CASE("basic matrix math", "[matrix]") { GIVEN("default") { auto s = Matrix::ScalingMatrix(2, 3, 4); REQUIRE(s(0, 0) == 2); REQUIRE(s(1, 1) == 3); REQUIRE(s(2, 2) == 4); ...