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
e9c30d00fe4a35b5272fc0e82d24123a62229bbf
34a74c4cdcb88e908533a0c4cc14f9319c46934f
kama067/spiderweb
/spidersort.cpp
C++
cpp
855
no_license
//kamalesh khanna 106117067 #include <stdio.h> void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } // A function to implement bubble sort void bubbleSort(int arr[], int n) { int i, j; for (i = 0; i < n-1; i++) // Last i elements are already in place for...
1e5b95900a3b0e791a8b948491903a7c86b9cca5
0db9dfaa08d474c993752b12d0172cfbb49eb88b
mattmcguin/CS-4102
/CoinChange/coinChange.cpp
C++
cpp
2,884
no_license
// // Matt McGuiness(mjm6qv) // Homework 10 // CS4102 - Algorithms // Spring 2017 // On my honor as a student, I have neither given nor received aid on this assignment. // // coinChange.cpp #include <iostream> #include <stdlib.h> #include <iomanip> #include <vector> using namespace std; vector<int > greedyCha...
9d69dc040efbbe7b225bc7b6d9aadb8a8a6b0933
2a01409a7985fd3b7d44b13a9e6e218fb9e9f3db
subhag071196/InterviewBit
/Arrays/HotelBooking.cpp
C++
cpp
429
no_license
bool Solution::hotel(vector<int> &arrive, vector<int> &depart, int K) { sort(arrive.begin(),arrive.end()); sort(depart.begin(),depart.end()); int c = 0,i=0,j=0; while(i<arrive.size() && j<depart.size()) { if(arrive[i] < depart[j]) { i++; c++; } ...
1dac1222fd2db6f49fc38b4429ef78bf33fdf4a0
c6a7e639bab158225387932eab9ffcda5dc769ae
leadedge/Spout2
/SPOUTSDK/Examples/ofSpoutExample/Source/ofSpoutReceiver/Data/ofApp.cpp
C++
cpp
7,307
permissive
/* Spout OpenFrameworks Data Receiver example Example of receiving per-frame data Copyright (C) 2021 Lynn Jarvis. Spout 2.007 OpenFrameworks 10 Visual Studio 2017 ========================================================================= This program is free software: you can redistribute it and/or modif...
fc69e634360ac16fa84dc85ee5380ac2445f827a
8f6b073b0caa541630feb7951cbecd9a58aec37b
23ksw10/LeetCode
/algorithm/2326_Spiral_Matrix IV/solution.cpp
C++
cpp
966
no_license
#include <iostream> #include <vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solution { public: vector<vector<int>> spiralMatrix(int...
116bdac56246f2902eedc02421295e7016774bf9
3adc783d17fc1c244ae7711ac95025541f879b1d
gitter-badger/Kvasir-1
/Lib/Chip/Unknown/STMicro/STM32F0xx/PWR.hpp
C++
hpp
2,536
permissive
#pragma once #include "Register/Utility.hpp" namespace Kvasir { //Power control namespace Nonecr{ ///<power control register using Addr = Register::Address<0x40007000,0xfffffc00,0,unsigned>; ///Flash power down in Stop mode constexpr Register::FieldLocation<Addr,Register::m...
36b6bad63f024c15e572cb75c9ad3c91760ed786
2c09c96ed458f4d595a31f9b9e0a7e214afa43c0
zhongxingzhi/parameter-framework
/parameter/ConfigurableElement.cpp
C++
cpp
15,819
permissive
/* * Copyright (c) 2011-2014, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of...
336fd961e7b3cb27ae8d3ebfe1387500924abbda
2ce59e523562daa2bc65df970c86be3b8fc9bb1f
phymucs/INMOST
/Examples/AdaptiveMesh/main_cube.cpp
C++
cpp
1,089
permissive
#include "amesh.h" using namespace INMOST; int main(int argc, char ** argv) { Mesh::Initialize(&argc,&argv); if( argc > 1 ) { Mesh mm; mm.Load(argv[1]); TagInteger indicator = mm.CreateTag("INDICATOR",DATA_INTEGER,CELL,NONE,1); AdaptiveMesh m(mm); int max_levels = 2; if( argc > 2 ) max_levels = at...
c2564023e47510e75f1880033b94f7b02f1bdd8f
b8bf082b1c891561d810d392e301db6ed8d2ee95
Mokou/thcrap
/thcrap/src/thcrap_update_wrapper.cpp
C++
cpp
3,393
permissive
/** * Touhou Community Reliant Automatic Patcher * Main DLL * * ---- * * Wrapper around thcrap_update.dll function, providing a fallback if they are absent. */ #include "thcrap.h" #include "thcrap_update_wrapper.h" #include <thcrap_update\src\loader_update.h> HMODULE thcrap_update_module(void) { static...
d75685c44ca2bb815552735ac7d1352b76510674
a7d90fe80fa8fbf1140489ba719dc8fef30824cd
bharatkumarnitc/Compative-Programming
/Advanced Recursion/Q1.cpp
C++
cpp
733
no_license
#include <iostream> using namespace std; //#include "Solution.h" void replaceCharacter(char input[], char c1, char c2) { if(input[0]=='\0') return; if(input[0]==c1) { input[0]=c2; } replaceCharacter(input+1,c1,c2); /* Don't write main(). ...
ca8ebaa210fda447bfef2f3d34886d385d3222e9
4e1b571156b93e7269c42907d114063606840408
iCodeIN/Wings
/Libraries/gtkmm/share/gtkmm-3.0/demo/example_change_display.cc
C++
cc
11,614
permissive
/* Change Display * * Demonstrates migrating a window between different displays. * A display is a mouse and keyboard with some number of * associated monitors. The neat thing about having multiple * displays is that they can be on a completely separate * computers, as long as there is a network connection to th...
717100aee7c58b4adef7e315cd9e8c304455ceaf
6b0f14d50c911854a4a3e3ac4fd91a4fe15bdff4
Team-CTK/Training
/2017Training/10.14/1006F.cpp
C++
cpp
2,312
no_license
#include<bits/stdc++.h> #define FILEIN freopen("in.txt", "r", stdin) #define FILEOUT freopen("out.txt", "w", stdout) #define CLOSEIO ios::sync_with_stdio(false) #define CLR(a) memset(a,0,sizeof(a)) #define MEM(a,x) memset(a,x,sizeof(a)) #define eps 1e-12 #define sf(x) scanf("%d",&x) #define PB(x) push_back(x) #define ...
6968c5e81cf6f0de6630fbfeacb3c3e21f321987
9807a04eaf56d66e807f394faf21a62b00a43426
M-Rodrigues/Programming
/Cracking the Coding Interview/Chapter 2 - Linked Lists/2.6 Palindrome/q6.cpp
C++
cpp
1,513
no_license
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int v): val(v), next(nullptr) {}; static Node * buildLinkedList(const vector<int> &A) { Node * head = nullptr, * aux = nullptr; for (int i = 0; i < A.size(); i++) { if (i == 0) { head = new Node(A[i]); a...
79b1529ca6cb2987065825e7a8aec1d1bed878bc
714296af99aee69fdb00921efdd87fae7e90f657
FiskSMK/SPOJ
/CALC2.cpp
C++
cpp
606
no_license
#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int r[10],a,b; char d; while (cin>>d>>a>>b) { switch (d) { case 'z' : r[a]=b; break; case '+' : printf("%i\n",r[a]+r[b]); break; case '-' : printf("%...
4cdc1c13c1b17101e429fe7f0b6df45a5e20a1f2
4dec26b9abacc5881097459b0ef01732698dd7e7
juneeda-maker/Algorithm
/programmers/Level2/hindex.cpp
C++
cpp
526
no_license
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; int solution(vector<int> citations) { int answer = 0; sort(citations.begin(), citations.end(), greater<int>()); if(!citations[0]) { return 0; } for(int i = 0; i < citations.size(); i++)...
d84b70d48f2e31745530cdc10c2fc681a3943473
67a905d678e4eac0b2ae06b91e3634a7d645fd8b
Mon-ius/ITK
/Modules/Numerics/Optimizers/src/itkInitializationBiasedParticleSwarmOptimizer.cxx
C++
cxx
3,853
permissive
/*========================================================================= * * Copyright NumFOCUS * * 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.or...
01d01952d7a817312448491721c1685b57eb7874
58c91ffdaef4c4eaca893e0c7f459d9025708f95
PPC64/hhvm
/hphp/tools/tc-print/offline-arm-code.cpp
C++
cpp
6,001
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +---------...
09dae94f9c71b80beebe7873f9d695a60804e108
b085b8a96548635054773e337c96cd493b6ba59d
Bayonetta5/panda3d
/dtool/src/dtoolutil/textEncoder_ext.cxx
C++
cxx
4,721
permissive
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file textEncoder_ext.cxx * ...
69a1e64cbc20da23f603028006a12998546ed7e3
89adfd5b9abc1cdb4ddb11b6e8ae63377fb6a7ac
syntax-tm/WidescreenFixesPack
/includes/pcsx2/mips.hpp
C++
hpp
30,011
permissive
#include <cstdint> #include <ostream> namespace mips { namespace { template<typename T> inline uint8_t get_prefix(T& r) { if (r.value < 8) return r.value; r.value -= 8; return 1; } template<typename T> inline ...
ebf71f1ab5ed94f206ca4b944fa5f062d92fa668
177670fdd81f253edbf925c9183a3ec424830900
blchinezu/EZX-SDK_CPP-QT-SDL
/toolchains/motoezx/src/Qt4/src/gui/kernel/qapplication_x.cpp
C++
cpp
229
no_license
#include "qapplication_x.h" QApplication_X::QApplication_X(int &argc, char** argv, Type type) :ZApplication(argc,argv,type) { xdebug("Namespace X"); } QApplication_X::~QApplication_X() { xdebug("Namespace X"); }
afd6c8e0a819610cba3c76f2b9952add3340046e
523f92e1229b9b330b1252ece769d9be86374208
truls/flexus
/components/TraceTrackerQEMU/TraceTrackerComponentImpl.cpp
C++
cpp
3,440
no_license
// DO-NOT-REMOVE begin-copyright-block //QFlex consists of several software components that are governed by various //licensing terms, in addition to software that was developed internally. //Anyone interested in using QFlex needs to fully understand and abide by the //licenses governing all the software components. /...
cd52c47cd0d58e8ee04e2c0915aaca59a1018b05
3faf6bc24dc400635451ebe168e54aeacb81f5f0
JoyusGim/GameProgrammingInCpp
/Chapter13/FPSCamera.cpp
C++
cpp
1,115
no_license
#include "FPSCamera.h" #include "Math.h" #include "Actor.h" FPSCamera::FPSCamera(Actor* owner) : CameraComponent(owner), mPitchSpeed{ 0.f }, mMaxPitch{ Math::Pi / 3.f }, mPitch{ 0.f } { } void FPSCamera::Update(float deltaTime) { CameraComponent::Update(deltaTime); Vector3 cameraPos = mOwner->GetPosition(); ...
d4511bbc88563b4833ee3c441e7de72fb89401ed
f8dc84eedffec8941446e8139b8c7a8d78f07efa
xorpse/gtirb
/doc/examples/functions.cpp
C++
cpp
2,424
permissive
// An example program which opens and IR and prints information about // functions. #include <gtirb/gtirb.hpp> #include <boost/uuid/uuid_io.hpp> #include <fstream> #include <iomanip> #include <iostream> #include <map> using namespace gtirb; // Print Addrs in hex format std::ostream& operator<<(std::ostream& Os, Addr...
781f280f251f31fdfa3fa3b21161a692fd7ca0dd
6ae33a743d0c825d5ef236dd8c65482b4cede6d3
jfreeze/jewelcoin2
/src/mnemonics/electrum-words.cpp
C++
cpp
16,166
permissive
// Copyright (c) 2014-2017, The Monero Project // // 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 o...
03a6f1cbca78c418d5e34662a9f58ae0a9c77cd9
583c48a0e29282dad1267fffa7f9092f984d5aac
chromium/chromium
/ui/aura/client/aura_constants.cc
C++
cc
5,285
permissive
// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/aura/client/aura_constants.h" #include "ui/base/class_property.h" #include "ui/base/owned_window_anchor.h" #include "ui/base/ui_base_types.h" #include "ui/display...
1dd2675fbd70defe7cadb0c6c753bbbff3486343
11f0bff6589f965c880a6853ed5291c002ebaeff
abgoyal-archive/OT_7025D
/mediatek/custom/jrdsz89_we_jb2/hal/camera/camera/isp_tuning_custom.cpp
C++
cpp
22,363
no_license
#define LOG_TAG "isp_tuning_custom" #ifndef ENABLE_MY_LOG #define ENABLE_MY_LOG (1) #endif #include <aaa_types.h> #include <aaa_log.h> #include <camera_custom_nvram.h> #include <isp_tuning.h> #include <camera_feature.h> #include <awb_param.h> #include <ae_param.h> #include <af_param.h> #include <flash_par...
206589d7012c5b9ed9432cf665c7a14d87e529da
6d8ab15e2373b799cfbc44fb84e0d1826b177248
KalyanovD/daal
/algorithms/kernel/assocrules/apriori_batch_fpt.cpp
C++
cpp
1,339
permissive
/* file: apriori_batch_fpt.cpp */ /******************************************************************************* * Copyright 2014-2019 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the...
9243649ccfec3bc79a3307d4d338c030d33f6cb1
41061eae6439e4006683382eb127008a4d460f40
icf/Code
/C++ code/GpBCS_S.C.CPMC/SC_afqmcConstraintPathBP_4.4_sideRotation_ExactDensityInput/source/HubbardSOCMeasureObserveBCSSD.cpp
C++
cpp
6,071
no_license
// // Created by boruoshihao on 1/13/17. // Modefied by icf on 04/29/2019 // #include "../include/HubbardSOCMeasureObserveBCSSD.h" #include "afqmclab.h" using namespace std; using namespace tensor_hao; HubbardSOCMeasureObserveBCSSD::HubbardSOCMeasureObserveBCSSD() { initModelNullptr(); reSet(); } HubbardSOC...
1c7f3652887ad85f1c9b7d8dadf7dba6e84939b3
a56e68b07bb4a87105d37114357188c299fe3879
jfrancik/FreeWill
/fwaction/wait.cpp
C++
cpp
3,551
no_license
// wait.cpp : Defines the Waiting Action // #include "stdafx.h" #include "wait.h" #include "freewilltools.h" #define _USE_MATH_DEFINES #include <math.h> #include <float.h> #include <string.h> #define DEG2RAD(d) ( (d) * (FWFLOAT)M_PI / 180.0f ) #define RAD2DEG(r) ( 180.0f * (r) / (FWFLOAT)M_PI ) #define...
db04da81480d5fd4b8645a1c3b0cb554e76ceee9
fd8f5e5d2d59715f8e2c2710d06bf48b1b28e0b6
gabrieltaets/Competitive-Programming
/codeforces/707Cdavid.cpp
C++
cpp
2,955
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #define INF 0x3F3F3F3F #define LINF 0x3F3F3F3F3F3F3F3FLL #define DINF (double)1e+30 #define EPS (double)1e-9 #define PI (double)acos(-1.0) #d...
9578a48677e8384dce3d6b0e26d94d3771a00bed
117871f67b1ea1cde1cac7e02d362462b59eff42
fuzzpault/UIndy-CSCI240-2018
/W08-Tree2/Lab08Starter/BST_test.cpp
C++
cpp
248
no_license
/* Name: < Fill me in> Date: < Fill me in> Desc: Unit tests for the BST classes */ #include "gtest/gtest.h" #include "BST.h" /* // Code to remind you what unit tests look like. TEST(size, 0){ LIST a; EXPECT_EQ(a.size(), 0); } */
086bad0734c1d414f092b2ac564d5ce04d38f0bb
c93b289909bc278bf85a500e5f69ac17560f01dc
opto/comm-central
/mailnews/base/src/nsMsgRDFDataSource.cpp
C++
cpp
11,287
no_license
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsMsgRDFDataSource.h" #i...
4659ed41a1122a75251a9a98ea5a8933b9767e3b
0cb17f64ec160dceae6ed2271c9fea51c3ebca5b
hqusxylixiang/rei-cpp
/src/render_pipelines/deferred.cpp
C++
cpp
10,616
permissive
#include "deferred.h" #include <memory> #include <unordered_map> #include "../container_utils.h" #include "../direct3d/d3d_renderer.h" namespace rei { namespace deferred { struct ViewportData { size_t width = 1; size_t height = 1; SwapchainHandle swapchain; BufferHandle depth_stencil_buffer; BufferHandle...
3645828733b32da8bbe7ba927507bcbc64000351
533f62a0b25b301baa2f176052dc086557026082
jenkinnk/Mutation_Testing_Application
/output/mutations/473/lucas.cpp
C++
cpp
4,408
no_license
/* Joshua Breeden Section #1003 Assignment #8 * The following program is designed to read pairs of integers from a file using * Linux redirection. All of the integers in the file will be >= 1. The first number * in each pair (n1) will be >= the second number (n2). * For each pair of numbers the program will: * c...
e9bf3713e4725e10dab2215f2c28d8de9791ab32
95c98d334f98ffd091a97942da3fe83a1e5d5219
ViktorHura/TurboHiker
/Source/turbohiker/ScoreSubject.cpp
C++
cpp
702
no_license
// // Created by viktor on 30.12.20. // #include "ScoreSubject.h" void turbohiker::ScoreSubject::attach(turbohiker::ScoreObserver *observer) { observers.push_back(std::unique_ptr<ScoreObserver>(observer)); } bool turbohiker::ScoreSubject::notify(int entity, int action, const d...
b9db7685d72dd4001d21aa76fbe6e66687000523
38096d76002903a0b6fd71af451ea39f08ab6f61
Rebecca-McCabe/robot-scenario-project
/src/roadmap_tutorial/src/IKManager.cpp
C++
cpp
2,369
no_license
#include <roadmap_tutorial/IKManager.h> using namespace std; IKManager::IKManager(string chain_start, string chain_end, float timeout, float eps, string urdf): successful_init(false), ik_solver(chain_start, chain_end, urdf, timeout...
53b8de2e23d137a5f99c2e6d6c1697a971de4bcf
4dcdf44ff58c4d69fc12aafb3068de45faefbd13
GGBone/WM4
/GeometryTool/SamplePhysics/RoughPlaneParticle2/RoughPlaneParticle2.cpp
C++
cpp
3,789
no_license
// Geometric Tools, Inc. // http://www.geometrictools.com // Copyright (c) 1998-2006. All Rights Reserved // // The Wild Magic Version 4 Restricted Libraries source code is supplied // under the terms of the license agreement // http://www.geometrictools.com/License/Wm4RestrictedLicense.pdf // and may not be copie...
f958ec4531403179cff39dadcf46a953594ae61b
fed3a4b1d638c7cc920a79500ca31c69b54a4d86
fengh16/HF
/A1029.cpp
C++
cpp
587
no_license
#include<iostream> using namespace std; void maxmin_0(int a, int b, int c, int * max, int * min) { *max = a > b? a: b; *max = *max > c? *max: c; *min = a < b? a: b; *min = *min < c? *min: c; } void maxmin_1(int a, int b, int c, int & max, int & min) { max = a > b? a: b; max = max > c? max: c; ...
77222e874a3d2b1cf7d967fc81e2558760536d40
4529522078c99747a5a706b065f616b4f1319ff2
Bruh-Camps/2020-2-exercicio-revisao-refatoracao
/.history/main_20210309195321.cpp
C++
cpp
4,300
no_license
#include <iostream> #include "Encomenda.hpp" #include "EncomendaNormal.hpp" #include "EncomendaRelampago.hpp" #include "Cliente.hpp" #include <vector> using namespace std; int main(){ vector<Cliente> clientes; vector<EncomendaNormal> encomendas_normais; vector<EncomendaRelampago> encomendas_relampago; Clie...
00d0aa61aefb7d187f37033274ff56ff75947c5b
ef23b823dba1d26bd14f6ff3a5338e2b97cf8749
Frimo-Original/2D-Engine
/Engine/Health.cpp
C++
cpp
314
no_license
#include "Health.h" Health::Health(int health) { if (health >= 0) this->health = health; else this->health = 100; } void Health::setDamage(Damage damage) { if (damage.getDamage() < health) health -= damage.getDamage(); else health = 0; } int Health::getHealth() { return health; }
e9a1c3b12de842786cc8bcc65ae8bee4134d8974
289434120cd069ba4e8803996d352c320be189b6
qypluobo/leetcode-solution
/5367.Longest_Happy_Prefix.cpp
C++
cpp
809
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "uthash.h" char * longestPrefix(char * s){ int i; int len = strlen(s); for (i= 1; i <= len - 1; i++) { if (0 == strncmp(s, &s[i], len - i)) { return s + i; } } return ""; } void test1() { char s[]...
b0422cbb30f17137c6f52a06f11ec3ac4bc12ac2
01a1d5d6f765822105272ac5006fbfb7a756eecd
Kanonahmed/ACM-Programming
/practice/10783.cpp
C++
cpp
389
no_license
#include<bits/stdc++.h> using namespace std; int main() { int a,b,sum,tc,t; cin>>tc; t=1; while(tc){ cin>>a>>b; sum=0; for(int i=a;i<=b;i++) { if(i%2!=0) sum+=i; } if(sum==0) { if(a%2==0) sum+=a+1; else sum=a; } printf("...
8664917b4c3f18948f9120ca15454a44132e0bc4
164300da41c6269ecee0c494097dc64dfc5faff9
hprotzek/dollhouse
/src/main.cpp
C++
cpp
8,526
no_license
#include <Adafruit_TLC5947.h> #include <Wire.h> #include <SparkFunSX1509.h> #include <Room.h> #include <FS.h> #include <FiniteStateMachine.h> #include <Wheel.h> #include <Button.h> #include <ArduinoJson.h> #include <ESP8266WiFi.h> #include <PubSubClient.h> #include <ESP8266mDNS.h> #include <WiFiUdp.h> #include <Arduino...
3d14df7955aac62afaffc2656b21bed8e976ed10
576a5a2fec17a45473b83e6dcc0fbeb9ef252a1b
aniisabihi/TNM067-Scientific-Visualization-Labs
/tnm067lab3/processors/lineintegralconvolution.cpp
C++
cpp
3,415
no_license
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2016 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that th...
9a0f5a2dfe3c4edc173dc4a37a143efecdaa192d
de74d39e359249253617bb36d9ef36477757e60b
cqtangsong/chromium
/media/mojo/services/gpu_mojo_media_client.cc
C++
cc
13,486
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 "media/mojo/services/gpu_mojo_media_client.h" #include <utility> #include "base/bind.h" #include "base/feature_list.h" #include "base/memory/pt...
10c43fe4ebda2f11eee772131dbe15ac57e2243b
757a0d957029fb0169918e604d273955d29e8cb9
showkawa/deeplearning4j
/libnd4j/include/ops/declarable/generic/tensor/fill_as.cpp
C++
cpp
1,792
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...
a3baccb1acff59337ea79a116de77a84871db40c
a8ca9949e1f2a4b4201f554671693e804dac2ee8
jhonber/Programming-Contest
/URI/1069.cpp
C++
cpp
489
no_license
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s; for (int i = 0; i < n; ++i) { cin >> s; string s2; for (int j = 0; j < s.size(); ++j) if (s[j] != '.') s2 += s[j]; s = s2; int ans = 0; while (true) { int ind = s.find("<>"); ...
f28b49238258626d43f443a389ee824391eff5d6
758f2150e4263147c377c5f041b432dcf3b50296
getHecked/test_algo
/Test_algo/chatroom.cpp
C++
cpp
523
no_license
#include <cstdlib> #include <iostream> #include <string> #include <algorithm> #include <map> using namespace std; int main() { string s; cin >> s; string temp = "hello"; int x = 0; transform(s.begin(), s.end(), s.begin(), ::tolower); for (int i = 0; i < s.length(); i++) { ...
481320de7a60eb3176a275528107d8d42dd35a90
b4585c8b915bd722c925d99a61939bb5d9a3590f
JonnyPtn/SFML
/src/SFML/Window/iOS/SFView.hpp
C++
hpp
2,213
permissive
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2022 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages a...
c68d4909da452a36db20515b33e2a3310db54aea
bc33d483e1d1f6bd9192938e83e70646082fdf3c
ALI-ZIA-KHAN/Tasks-of-c-plus-plus
/lab 2(actu week 3) Q5.cpp
C++
cpp
1,347
no_license
#include<conio.h> #include<string.h> #include<iostream> using namespace std; struct Address{ char houseno[50]; int pin; char city[50]; }; struct Employee{ int empid; char emplname[50]; float empsalary; Address empaddress; }; int main(){ Address a1; Employee e1; cout...
62575bea6fda1cdd2ef7bbcd7d62de4d74ebd94a
0fa33fdc4ff7f0f703f9827a9b026af8e9837522
mmenchon/Figuras
/Figuras/Circulo.cpp
C++
cpp
313
no_license
#include "Circulo.h" #include <math.h> const double pi=3.14159265359; Circulo::Circulo(int x, int y, int radio) : Figura("Circulo") { this->x=x; this->y=y; this->radio=radio; } Circulo::~Circulo() { //dtor } double Circulo::obtenerSuperficie() const { return(pi*pow((double) radio,2.0)); }
a3dcfaa3cd2f90ca660594f139185a066e28c531
70a74e58435600c34c9e86db2ae1957b7457514a
perezdidac/lourdes
/lourdes/fs/unique.cpp
C++
cpp
277
permissive
#include "unique.hpp" #include <boost/filesystem.hpp> namespace lourdes { namespace fs { void unique(char* filename) { boost::filesystem::path path = boost::filesystem::unique_path(); std::string tempstr = path.string(); strcpy(filename, tempstr.c_str()); } }}
786196d6fc5aacd5b9ea2d51df1bf0c66a9be727
278a0ca037c90b1b634c3f409e7a2fc635180758
eglrp/SolveAXXB
/axxb/conventionalaxxbsvdsolver.cc
C++
cc
1,923
no_license
#include "conventionalaxxbsvdsolver.h" #include<Eigen/SVD> #include <unsupported/Eigen/KroneckerProduct> #include <Eigen/LU> #include <Eigen/QR> #include <stdlib.h> #include"axxb_utils.h" #include<fstream> Pose ConventionalAXXBSVDSolver::SolveX() { Eigen::MatrixXd m = Eigen::MatrixXd::Zero(12*A_.size(),13); for(in...
431d01a09eb5b6d3278356ccc1f71aa15c36dd4f
396be4fbfe8af6aa6f7a92ef4538e6e589c3f17c
NoahWenzel/Template_Stack_Class
/src/ParenthesesMatch.cpp
C++
cpp
871
no_license
#include "../inc/ParenthesesMatch.h" #include "../inc/Stack.h" /** * @brief Determines whether or not all the parenthesis in a string match. Meaning for every '(' there is * another ')'. * @param str - String that you want to search for corresponding parenthesis. * @return bool - true: If there are no parent...
246575d1001bb3604bbf940888feaea5091b8b0a
995cb9f1adf9e9c39bcb1fcda102810698267756
111pontes/ydk-cpp
/cisco-ios-xr/ydk/models/Cisco_IOS_XR_wanphy_ui_oper.hpp
C++
hpp
6,418
permissive
#ifndef _CISCO_IOS_XR_WANPHY_UI_OPER_ #define _CISCO_IOS_XR_WANPHY_UI_OPER_ #include <memory> #include <vector> #include <string> #include "ydk/types.hpp" #include "ydk/errors.hpp" namespace ydk { namespace Cisco_IOS_XR_wanphy_ui_oper { class Wanphy : public Entity { public: Wanphy(); ~Wanphy(); ...
5089980f2f8d73868c0bf3db3a063303e241c3c4
667a0c89f98d2677d1a095079991047d5a191e6d
profMagija/CoNAL
/conal/components/code_manager/loaders/DummyLoader/DummyLoader.hpp
C++
hpp
404
no_license
#include <Loader.hpp> class DummyLoader : public ::conal::code_manager::Loader { bool validate(std::string path, std::vector<std::string> params, EnvParams env); std::string load(std::string path, std::vector<std::string> params, EnvParams env); void run(std::string code, std::vector<conal::code...
3279f96e866875c3347beece736f1618c10c900b
d3cb09c37aa87e5aa1aafe698b60c284f0133ea5
brechtvl/oiio
/src/tiff.imageio/tiffinput.cpp
C++
cpp
98,829
permissive
// Copyright 2008-present Contributors to the OpenImageIO project. // SPDX-License-Identifier: BSD-3-Clause // https://github.com/OpenImageIO/oiio #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #define AVOID_WIN32_FILEIO #include <tiffio.h> #include <zlib.h> #include <OpenImageIO/dassert...
a4b8b7ab3ffa78edbe86fbae6e0902f1fc9c18b7
330790e1c689659e2c1375464055548e4ca7dcf0
Northell/Qt-Projects
/Learning Qt/Шлее М, Qt 5.10/Multimedia_chapter27/Multimedia/soundplayer.cpp
C++
cpp
4,012
no_license
#include "soundplayer.h" QString SoundPlayer::msecsToString(qint64 n) { int nHours = (n/(60*60*1000)); int nMinutes = ((n% (60*60*1000))/(60*1000)); int nSeconds = ((n%(60*1000))/1000); return QTime (nHours, nMinutes, nSeconds).toString("hh:mm:ss"); } SoundPlayer::SoundPlayer(QWidget *pwgt...
4e52abbd6b6b77dfd11408b31085120b114766d2
a86a523d4cfd47d015429900349c05253883c4ad
leisir966/tjuOJ
/20/1021.cpp
C++
cpp
490
no_license
#include <iostream> #include <string> using namespace std; int main(){ string s; cin>>s; int a[10]={0}; for(int i=0;i<s.length();i++){ a[s[i]-'0']++; //遍历字符串中的每个字符, //将每个 数字出现的次数保存在数组a中, //a[i]表示数字i出现的次数,后将数组a的下标0-9中所 //有a[i]不不为0的 输出即可~ } for(int i=0;i<10;i++){ if(a[i]!=0) print...
792160198e65cc2d29ab739b202779696158d201
0e66c09aa51dde4917fc3850d8fef091001a2ac3
vaibhavpandey2012000/compatative-Programming
/codechef_march/dsghfdgf.cpp
C++
cpp
1,485
no_license
#include<bits/stdc++.h> #define ll long long using namespace std; int main() { int tc; cin>>tc; while(tc--) { int n; cin>>n; ll a[n],b[n]; int val=0; map<ll,ll> mpa, mpb; for(int i=0;i<n;i++) { cin>>a[i]; mpa[a[i]]++; val^=a[i]; } for(int i=0;i<n;i++) { cin>>b[i]; mpa[b[i]]++; ...
f11b8134aec44117872d838d52c7b5fb7f678b8c
598076141f24966ad5bc68c67f8e0ca00c457f9f
RDTCREW/SoT-SDK
/SDK/SoT_bsp_plm_cluster_03_d_functions.cpp
C++
cpp
820
no_license
// SeaOfThieves (1.6.4) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function bsp_plm_cluster_03_d.b...
19bfee47e19948a4a8ee823f0801f003b1f42839
371535b9d122e3bdda38ecdcc25eae17d4b4814f
Vaibhavpan02/Hacktoberfest_2021
/Beginners/Some Basic C++ Programs/power.cpp
C++
cpp
679
permissive
#include <iostream> using namespace std; int power(int x, int n) { if (n == 0) return 1; long long temp = power(x, n / 2); temp = temp * temp; if (n % 2 == 0) return temp; else return temp * x; } void powerOptimised(int x, int n) { long long res = 1; while ...
2b823f476f6d200e1c2e0d8c94749287ec94f12f
6de80400f739a886e6c3e84f599b8da4d72a86f5
trackds/osi2-stream
/src/winpcap/commLib.cc
C++
cc
1,312
permissive
#include "include/commLib.h" int getDevMac(const PCHAR devName, char* mac) { LPADAPTER lpAdapter = NULL; PPACKET_OID_DATA OidData = NULL; BOOLEAN Status; if ((devName == NULL) || mac == NULL) { return -1; } lpAdapter = PacketOpenAdapter(devName); if (!(!lpAdapter || (lpAdapter...
66e6198b51f18ae998d52f39957ae70a05f2595e
f0b8ee3272c7b65b9b3759ddc76a45d3b49bda89
yuriks/Heatwave
/src/memory/PoolAllocator.hpp
C++
hpp
1,060
no_license
#include "Heatwave.hpp" #include <cstddef> namespace hw { namespace memory { template<typename T> class PoolAllocator { static_assert(sizeof(T) >= sizeof(u16), "sizeof(T) needs to be at least sizeof(u16)."); u16& id_at_index(u16 i) { return *reinterpret_cast<u16*>(&memory[i]); } public: PoolAllocator(T* mem...
c2517c3eaee96d9c347bd9f40aed06b810ca3b5b
af55eb38161e91fc57f6ba1af35d36a873c8c241
cpj2195/Leetcode-Solutions
/search in rotated.cpp
C++
cpp
806
no_license
#include<bits/stdc++.h> #include<iostream> #include<algorithm> using namespace std; int find_element(int array[],int key,int low,int high){ if(low>high) return -1; int m=low+(high-low)/2; if(array[m]==key) return m; if(array[high]>=array[m]){ if (key>=array[m] && key<=array[high]) ...
640e3c253a7a1eade4292cacd92113b3bac5fcfb
ff2e9504f47d37e3ec4401d0f78f0d633938b8b5
Function-Coin/FUNC
/src/logging.cpp
C++
cpp
7,610
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2018 The Bitcoin developers // Copyright (c) 2015-2020 The PIVX developers // Copyright (c) 2020 The CryptoDev developers // Copyright (c) 2020 The FunCoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or ...
36ca2f94e4602ce5f302b58d55dd50e23bc2b049
807f41e2f62eeb38ca0cbe4fd75d524bbf45946d
strasdat/isometric_pattern_matcher
/IsometricPatternMatcher/PatternMatcherIsometric.cpp
C++
cpp
5,338
permissive
// Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under the MIT license found in the // LICENSE file in the root directory of this source tree. #include <IsometricPatternMatcher/DotExtractor.h> #include <IsometricPatternMatcher/HexGridCostFunction.h> #include <IsometricPatternMatch...
0823aa80dd194838cbae635400e9de8645b63635
429a54b9f92873e66cc197bebb00a37043d425ea
ebby-s/ELEC40004
/elec40004-2019-exam/q2/tensor_maths.cpp
C++
cpp
3,705
no_license
#include "tensor.hpp" /* A 3rd order Tensor is a 3D matrix per say but hollow. When you multiply, you do (Ai1,Bi1,Ci1).(Ai2,Bi2,Ci2) for all i. Or, if you want, the multiplication of all corresponding coordinate points. */ Tensor *multiply(const Tensor *a, const Tensor *b) { vector<size_t> prod_size, index, ...
db9a330af7ea33ecba470f56a2477a64aabb1e1c
34abd3e1ac7608b638c4809273168b5c72b7dbf0
mjc-ermont/2011
/Programmation/Codes fonctionnels/Logger20/mapsview.cpp
C++
cpp
481
no_license
#include "mapsview.h" MapsView::MapsView(QVBoxLayout *parent) : QWebView() { parent->addWidget(this); QFile fichier(":/html/maps"); fichier.open(QFile::ReadOnly); QString s= QString(fichier.readAll()); this->setHtml(s); } void MapsView::addPoint(double x, double y) { qDebug() << "Map"; ...
e59857601e79fe0fc86090180a6d8c7e5bfa5b15
6c74897d771402557b083c562f99b1763efd3a8c
potehin143/HiGHS
/src/lp_data/HighsLp.cpp
C++
cpp
1,378
permissive
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the HiGHS linear optimization suite */ /* */ /* Written an...
7a23c23357bde7e54cf8cea256a1473989818901
1a1982cf5a61cd12447408e9240f079b66424311
alexandraback/datacollection
/solutions_5709773144064000_0/C++/orenguy/B.cpp
C++
cpp
1,639
no_license
#include <algorithm> #include <iostream> #include <sstream> #include <cassert> #include <cstring> #include <cstdlib> #include <cstdio> #include <string> #include <vector> #include <bitset> #include <queue> #include <stack> #include <cmath> #include <deque> #include <ctime> #include <list> #include <set>...
e2ba4d8811d9dd8009f1929e11309e479ee26ed7
62917ad69a099aeae54df639415baa9c505d6d11
beinnova/cpp-exercise
/Capitolo 15/testPunttori.cpp
C++
cpp
260
no_license
#include <iostream> int main(){ int val = 10; char letter[12] = "Hello World"; char *letter_ptr = &letter[5]; int *val_ptr = &val; std::cout << "Integer pinter: " << val_ptr << '\n'; std::cout << "Pointer of letter: " << letter_ptr << '\n'; }
c679c37323f7dcc03230f378722857b1cd064cd7
2482f7995449db9770f5a74572b0200d3ed58db1
Alifianrc/ClassicToModern
/Main.cpp
C++
cpp
5,732
no_license
#include <iostream> #include <algorithm> //#include <GL/glew.h> //#include <GL/freeglut.h> #include "Shader.h" #include "Rectangle.h"; #include "Buffer.h" using namespace std; void framebuffer_size_callback(GLFWwindow* window, int width, int height); void processInput(GLFWwindow* window); // settings const unsigned ...
c4d9d0682a394d3ca17876dfbd96143a9f3f5e31
d695c343db615fd92a19a508ba392a46cdd4d076
k2font/atcoder
/virtualcontest/abc173/A.cpp
C++
cpp
903
no_license
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define all(x) (x).begin(),(x).end() using ll = long long; string char_to_string(char val) { return string(1, val); } int char_to_int(char val) { return val - '0'; } template<class T> inline bool chmin(T& a, T b...
6f44b30110293002f8f141e230a97d918094a99a
b40fece994d56e0dc70b82e18689d309e7576ef9
Miserliness/dbMeter
/src/core.cpp
C++
cpp
505
no_license
#include <Arduino.h> #include "dbMeter.h" #define BUF_SIZE (1024) char *data = (char *)malloc(BUF_SIZE); void hexPrintDebug(char *buf, size_t len) { for (int i = 0; i < len; i++) { if (buf[i] >> 4 == 0) { Serial.print('0'); } Serial.print(buf[i], HEX); Serial.print(' '); } Serial.pri...
3a82ab6eb14d951aa6d6f9b3a783428cc253b02d
3043780adaa23e6dcde257c2956bd3f1ee7ebdf8
badforlabor/DonAINavigation
/Source/DonAINavigation/Private/DonNavigationManager.cpp
C++
cpp
106,007
permissive
// The MIT License(MIT) // // Copyright(c) 2015 Venugopalan Sreedharan // // 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, ...
872daa07f7092e3f88b131eead6d763b504d8fe0
1a7f7bedb8eeb2979590884ffa7b19abe23b33d7
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function13798/function13798_schedule_3/function13798_schedule_3_wrapper.cpp
C++
cpp
988
no_license
#include "Halide.h" #include "function13798_schedule_3_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(16384); Halide::Buffer<int32_t> buf01(163...
f7d111bf65254fd67f76d235bb2593296dd2e40f
5cbac2393cc4b3a001f81cfc9ee3ab04d9360acd
Sntai20/CPSC-5910-Data-Structures
/Week3/HW3/ContainsDemo.cpp
C++
cpp
2,905
no_license
// // Created by Antonio Santana on 4/25/21. // #include "LinkedList.h" #include <iostream> #include <string> using namespace std; const int ITEM_COUNT = 6; void linkedListTester(LinkedList<std::string>* listPtr) { std::string data[] = {"one", "two", "three", "four", "five", "six"}; // isEmpty method st...
d56e46fc5414fec5c0103454838f3d9a7647e292
70590e74d47a43f2164d47fd11176c849457f435
MaxonZhao/Software
/src/thunderbots/software/ai/main.cpp
C++
cpp
3,766
permissive
#include <ros/ros.h> #include "ai/ai.h" #include "thunderbots_msgs/Ball.h" #include "thunderbots_msgs/Field.h" #include "thunderbots_msgs/Primitive.h" #include "thunderbots_msgs/PrimitiveArray.h" #include "thunderbots_msgs/Team.h" #include "util/constants.h" #include "util/parameter/dynamic_parameters.h" #include "uti...
de69e604c2720ce1119a29d357755610fc812d74
9f0c07c25ff7ff362094964b0becff798e52113a
niuxu18/logTracker-old
/second/download/rsync/gumtree/rsync_repos_function_85_last_repos.cpp
C++
cpp
1,708
no_license
static BOOL setup_merge_file(int mergelist_num, filter_rule *ex, filter_rule_list *lp) { char buf[MAXPATHLEN]; char *x, *y, *pat = ex->pattern; unsigned int len; if (!(x = parse_merge_name(pat, NULL, 0)) || *x != '/') return 0; if (DEBUG_GTE(FILTER, 2)) { rprintf(FINFO, "[%s] performing parent_dirsca...
af966c2e95675f24f2ffb2e9dec432fe28dcf257
6a98074e500fd3e8f1d5d5d4c77b61655f5acd72
ccdxc/logSurvey
/data/crawl/git/new_hunk_462.cpp
C++
cpp
578
no_license
/* * This code is included at the end of sha1dc/sha1.h with the * SHA1DC_CUSTOM_TRAILING_INCLUDE_SHA1_H macro. */ /* * Same as SHA1DCFinal, but convert collision attack case into a verbose die(). */ void git_SHA1DCFinal(unsigned char [20], SHA1_CTX *); /* * Same as SHA1DCUpdate, but adjust types to match git's ...
dad1ab2ff1624dd4c202a62696477a738abda693
690cb417722ca9672fa19cc272c29de0e5126777
devfollow/Graph-Theory-Algorithms
/feb2020/theatre.cpp
C++
cpp
5,209
permissive
#include <bits/stdc++.h> using namespace std; #define ll long long #define Fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define f(n) for (int i = 0; i < n; ++i) #define mod 1000000007 #define maxn 100000 int profit(int **b...
1f17d3b17770ea631f26a06696ec68f5f3fc7819
589bd996f668a03630d27a66165358b8d8333825
smeenai/llvm-project
/flang/runtime/numeric.cpp
C++
cpp
31,479
permissive
//===-- runtime/numeric.cpp -----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
c64544b923eecf23ee14a9edf5477e94ef479f42
a6e940d790691c34510c072fdd91bc1d3e3387fe
bysheva/oneDAL
/java/com/intel/daal/data_management/data/data_dictionary.cpp
C++
cpp
5,581
permissive
/* file: data_dictionary.cpp */ /******************************************************************************* * Copyright 2014-2021 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the L...
938950b5bc57c505d8ab322fbf28876a51af79c5
03e19b79304fee99dcfd648fd5632e76248118fc
levoserve/Levoplus-Forkupdate
/src/main.cpp
C++
cpp
142,114
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "alert.h" #include "checkpoints.h" #include "db.h" #include "txdb.h" #inc...
08b440f284819c6e80382e82fb2d4e218a9826dc
b07de080718e7fbbf8989839bbd3a4ff091535dc
honestcomrade/grade-plus
/src/Database.cpp
C++
cpp
1,569
permissive
#include "Database.h" #include <iostream> #include <sqlite3.h> #include <string> #include <vector> using namespace std; Database::Database() {} Database::Database(string filename) { load(filename); } Database::~Database() { sqlite3_close(db); } void Database::load(string filename) { sqlite3_open(filename.c_str(),...
535f4c832c3bb97d0dd5188b9340b0ee5c86f58a
ca6f7d1e308ee0191e0157476422fc97e83f6523
HaikuArchives/Beezer
/Source/Beezer/AddOnWindow.cpp
C++
cpp
25,828
permissive
/* * Copyright (c) 2009, Ramshankar (aka Teknomancer) * Copyright (c) 2011, Chris Roberts * 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 ...
08cd5a756de224388696124e52ec9c7e6033498d
a45af9ed991d3ae111270e07ead6a3ac926d5571
BeeeOn/gateway
/src/server/GWMessageContext.cpp
C++
cpp
1,997
permissive
#include <Poco/Exception.h> #include "server/GWMessageContext.h" using namespace BeeeOn; GWMessageContext::GWMessageContext(GWMessagePriority priority): m_priority(priority) { } GWMessageContext::~GWMessageContext() { } GWMessage::Ptr GWMessageContext::message() { return m_message; } void GWMessageContext::setM...
82c5d0df84f3a5fedaa95ec268d4af4b4c11fa76
748a65e22c98f9f79b5423ca50ba2b4a72c9b8ee
jweitzen/analogqct
/src/AnaLogDoc.cpp
C++
cpp
4,265
no_license
// AnaLogDoc.cpp : implementation of the CAnaLogDoc class // #include "stdafx.h" #include "AnaLog.h" #include <fstream.h> #include "AnaLogDoc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ////////////////////////////////////////////////////////////...
afd4c7fb61491d24fc397e54ae95974f62c53bf5
d608c6209417660debc2f509834b9cc6254086fb
aabhas-sao/DSA-CB-CPP
/binary_search/uplow.cpp
C++
cpp
1,174
no_license
#include <iostream> using namespace std; int findLowerB(int *a, int n, int key) { int s = 0; int e = n - 1; int possIndex; int mid; while(s <= e) { mid = (s + e) / 2; if(a[mid] == key) { e = mid - 1; possIndex = mid; } else i...
777c04096acd026d9fc6d4796d41711a496dc7e4
36bd922f9c637ae60985ad1faee3645e110676c4
zBING-QIAN/record
/b.cpp
C++
cpp
1,329
no_license
#include<bits/stdc++.h> using namespace std; long long a,b,n,h,x[10005],y[10005]; long long dp[10005]; inline bool incircle(double cx,double cy,int p){ double xp=double(x[p]),yp=double(y[p]),dh = double(h); return (cx-xp)*(cx-xp)+(cy-yp)*(cy-yp)<=(dh-cy)*(dh-cy); } bool ok(double cx,double cy,int rp,int lp){ retur...
fbeee4d56256ebe318c2f11e9cc8daa0325a1e41
fb7e7b373e425cc485c884fbdfdb7b3e80970422
zhaokang1228/ray
/src/ray/raylet/lib/java/org_ray_runtime_raylet_RayletClientImpl.cc
C++
cc
10,983
permissive
#include "ray/raylet/lib/java/org_ray_runtime_raylet_RayletClientImpl.h" #include <jni.h> #include "ray/id.h" #include "ray/raylet/raylet_client.h" #include "ray/util/logging.h" template <typename ID> class UniqueIdFromJByteArray { public: const ID &GetId() const { return id; } UniqueIdFromJByteArray(JNIEnv *e...
6c18ec3e11b010c8ebe7f7f9f305edf732c8bb00
fdf33ccd5aec3348340fef2255ca0ac1264f3a01
xulunfan/magma
/sparse-iter/testing/testing_cmatrix.cpp
C++
cpp
5,106
no_license
/* -- MAGMA (version 2.0.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date February 2016 @generated from sparse-iter/testing/testing_zmatrix.cpp normal z -> c, Tue Feb 9 16:06:18 2016 @author Hartwig Anzt */ // includes, sy...
26ecc0ccfe756d81b9f326ef5e6b32d3ecdc2b12
0d48a395e8fe782add6c1521132d049081160abf
suxue/sdlpp
/demos/basic_draw.cpp
C++
cpp
2,405
no_license
/*! * @section LICENSE * Copyright (c) 2014 Hao Fei <mrfeihao@gmail.com> * * This file is part of libsdlpp. * * 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, incl...
7e19411923062ed874f9e3bdd60420ffe8de6f93
2a58fa57323d6ad6452b7f88f2c3bc8c375f7f83
Kenneth-Nicholas/COSC-1560-03-C-Plus-Plus-Programming-II
/Programming_II_HELP/5139145_54863693_Fall+2016+COSC+1550+Class+Examples/Class Examples/Week10/Functions04.cpp
C++
cpp
1,058
no_license
// COSC 1550 // Class Example // Functions - Chapter 6 #include <iostream> using namespace std; // function prototypes int Display(int); //int Display(); // uses global variable num int num = 5; // Global Variable int main() { cout << "The value of num is " << num << " in \'main\'\n"; int num = 2, val; Displ...
46b27cd2c6019ce20c9fd65696ca395640c1a4e6
93a6fdad1c4b5597dab2969eb0b69d38a42fdffb
Sanketwankhade/SDASSINGMENTS
/SD3.cpp
C++
cpp
3,956
no_license
#include<iostream> using namespace std; class edgenode { public : char data; int wt; edgenode *enext; }; class vertexnode { public : char data; edgenode *enext; vertexnode *vnext; }; class Graph { private : vertexnode *start; ...
c3044dac194e944a2fcff6d69c125fac67e4b60b
307fad6dd35132e90d9fd03724cc595cd505f6b0
facebook/wangle
/wangle/acceptor/LoadShedConfiguration.cpp
C++
cpp
3,831
permissive
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
60a07beaca938a20a5f13c5df8e807fd017f3784
4d2c9fc922faec253d769456b7d9014065e7c9c7
dendisuhubdy/coinapi-sdk
/oeml-sdk/cpp-qt5-client/client/OAIOrderExecutionReport.cpp
C++
cpp
19,472
permissive
/** * OEML - REST API * This section will provide necessary information about the `CoinAPI OEML REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> * * The version of the OpenAPI document: v1 * C...
af53f883f513c8b4ee0d63f398e86fd742838f43
c3a4f0964f345cb39ec6ff59e6c3c37d83513b4f
joetde/SuperBadbar
/src/actors/babar_states/BabarStateNone.cpp
C++
cpp
604
no_license
#include "BabarStateNone.h" #include "../Babar.h" #include "sprites/SpriteGrid.h" BabarStateNone::BabarStateNone (Babar *context) : BabarState (context) { if (getContext()->getDirection() == LEFT) { getContext()->getSprite()->setPictures (3); } else { getContext()->getSprite()-...
36acbf5912749fe623e99e5b0e617d9057f47287
ab9818226e711117c9bbe6c44f5d1e78d5c867b9
TishakinNikolay/SnakeQt
/Food.cpp
C++
cpp
539
no_license
#include "Food.h" #include <qglobal.h> #include <QTime> #include <qrandom.h> #include "GameController.h" Food::Food() : Scale() { QTime time = QTime::currentTime(); qsrand(static_cast<uint>(time.msec())); setPixmap(QPixmap(":/Images/Resourses/Food.png")); } void Food::newCoord() { m_x = (qr...