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
ad75e90fbd7b156d6c7266215b410324878793e9
1d1fc28bb45c90fca14cb7c46f402cc1160c265c
juancamilog/leap_client
/src/static_twist_controller.cpp
C++
cpp
1,359
permissive
#include "ros/ros.h" #include "leap_client/HandInfo.h" #include "leap_client/HandInfoList.h" void leap_callback(const leap_client::HandInfoList::ConstPtr & msg){ //for each hand in the list ROS_INFO_STREAM(">HANDS:"<<msg->hands.size()); for(unsigned int i=0; i< msg->hands.size() ; i++){ leap_client...
b42f8b3bf0ee30b173383dadf248a81ed3239f38
9b4f6f4ea4a91d646ad77bc905ffc307c4c88e43
b3540/AzureIoTGatewaySDKExtention
/modules/httprestapi/httprestserver/httprestserver.cpp
C++
cpp
3,926
no_license
#include "httprestserver.h" using namespace Concurrency::streams; void* httpServer_Create(void* moduleHandle, const char* url, const char* port) { std::string p(port); std::string addr(url); utility::string_t portNo = utility::conversions::to_string_t(p); utility::string_t address = utility::conversions::to_stri...
857e5d6da06183974c688ed30544a6831e0a9b3b
9503104ec325aeb6c59e1b6faaa516b031559dcc
kishankr7979/CP
/3_sum_closest.cpp
C++
cpp
5,421
no_license
/*As stated in the earlier hint, the naive approach is to have 3 loops of i,j,k over the array. We then just track S[i]+S[j]+S[k] for the case when (S[i]+S[j]+S[k]-target) is minimum. The code for the same looks something like the following : IF number of elements in S < 3 THEN return -1; // Invalid case minD...
7c88c413434266439d2031ebe6ff7c42f635e4e2
f9bd93a0eae07cd3a71a7caef69320d8e87d3456
zishengye/compadre
/kokkos/core/unit_test/UnitTest_PushFinalizeHook.cpp
C++
cpp
4,835
permissive
/* //@HEADER // ************************************************************************ // // Kokkos v. 3.0 // Copyright (2020) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Govern...
4184bcc64817bba300cef9743634f08dd51ab05a
64c2095580a155a251e5079096a7d82a69486e78
lvxingstar/Box
/src/box_util.cpp
C++
cpp
586
no_license
#include "box_util.h" int box_cretae_server(uint16_t port, const char *ip) { int fd = socket(AF_INET,SOCK_STREAM,0); struct sockaddr_in addr; addr.sin_family = AF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = inet_addr(ip); int ret = bind(fd,(struct sockaddr*)&addr,sizeof(addr)); ...
002e8503878a0012b942bc96848e46270e13db1b
6846a0a816e1eb226246e542c115a46de8d19259
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-appconfig/source/model/StartDeploymentResult.cpp
C++
cpp
4,733
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/appconfig/model/StartDeploymentResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #include <aw...
5bb702a194566ffc9e4990f1ef79c9cd729d2074
412f43439fcd4f31836361165fd1cf12a9d0f8d5
namanbansal013/Data-Structures-Algorithms
/1-Basics Of Problem Solving/isPrime.cpp
C++
cpp
420
no_license
#include<iostream> using namespace std; int main(){ int i, N, check=0; cout<<"Enter the number\t"; cin>>N; for(i=2; i<N/2; i++) { if(N%i==0) { check=1; break; } } if(check==0 && N!=1) { cout<<N<<" is a prime num...
2d524bf36a2e430937cf6558717b59bb4a060110
d9cfb7e16d0263f5f0680b89042c9efe9ddaf055
qnzhou/VegaFEM
/libraries/clothBW/clothBWMT.cpp
C++
cpp
9,576
no_license
/************************************************************************* * * * Vega FEM Simulation Library Version 3.1 * * * * "clothBW" library...
bc5ce83bdd74ca8149d7e190141ce58ed0a3b54c
18f6d4a40682f16bee43ee90b5cbe51d950bfa18
lucaszardo/SCV
/SCV/src/MenuHolder.cpp
C++
cpp
1,943
permissive
#include "stdafx.h" #include "MenuHolder.h" #include "ContextMenu.h" namespace scv { MenuHolder::MenuHolder(void) {/**/} void MenuHolder::display(void) { for (ContextMenuList::iterator iter = _list.begin(); iter != _list.end(); ++iter) { (*iter)->display(); } } bool MenuHolder::processMous...
6e1e0e9cebc8fe96229a4b326f380bfc9dea0cea
a1e90a35849c4c0103318abb00e1b02f6e75a322
max-delta/retrofit-public
/apps/cc3o3/appstates/gameplay/Gameplay_Overworld.cpp
C++
cpp
21,633
permissive
#include "stdafx.h" #include "Gameplay_Overworld.h" #include "cc3o3/Common.h" #include "cc3o3/appstates/InputHelpers.h" #include "cc3o3/campaign/CampaignManager.h" #include "cc3o3/company/CompanyManager.h" #include "cc3o3/overworld/Overworld.h" #include "cc3o3/state/StateLogging.h" #include "cc3o3/state/ComponentResol...
252a34d218b40127df468edf237a560b4ac0c581
abea3b87c5cc543843ecdb4427b71e0027d2f900
Saharsh007/Computer-graphics
/lab8/line_clipping.cpp
C++
cpp
3,126
no_license
#include<GL/glut.h> #include<stdio.h> // #include<math.h> #include<iostream> using namespace std; void display(); float xmin = -200; float ymin = -200; float xmax = 200; float ymax = 200; float xd1,yd1,xd2,yd2; int bitcode(float x, float y){ int c=0; if(x<xmin) c |= 1; if(x>xmax) c |= 2; if(y<ymin) c...
caae690954d6634f581e20f8dbb10cade3482daf
38263075272fa09f32fa894c4094b940dda30a29
jcarreira/cirrus-kv
/src/authentication/AuthenticationToken.cpp
C++
cpp
395
permissive
#include "authentication/AuthenticationToken.h" namespace cirrus { AuthenticationToken::AuthenticationToken(bool allow) : allow(allow) { } AuthenticationToken AuthenticationToken::create_default_allow_token() { return AuthenticationToken(true); } AuthenticationToken AuthenticationToken::create_default_deny_...
b6ae36316701045ac2933080a0790649f3d747cd
1baf8e0f04ccd2aeb8777c20cc74a6ae436b4b84
AmosDoan/provlemSolving
/leetcode/124-binaryTreeMaximumPathSum.cpp
C++
cpp
2,548
no_license
// // Created by Amos on 2020/04/29. // #include <iostream> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNo...
df44c120ce338ccd6b15984e1950aa0b91858207
36e11f2d99a17a83cf21eb5caa1776ae7613e898
arrajpur/ecs60
/queens.cpp
C++
cpp
1,151
no_license
#include <iostream> using namespace std; bool checkMove(int &, int &, int &, int &); int main(void) { int rowOneCol = 1, moves[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; //moves is size nine so indexes 1-8 can be used bool moveGood = true; //more easily (less confusion in the loops) for (int i = 1; i <= 8; i...
c4174acf2d3d3ac510fe7b2ed4d568986e8772ff
bf97f1b7b06381d55ebce6b88caaa9aa5bfabf88
Arduino-IMERIR-2014/SMART-BARRIER
/PROJET_BARRIERE1.0_SLAVE/C_POTENTIOMETRE.cpp
C++
cpp
273
no_license
/* * File: C_POTENTIOMETRE.cpp * Author: Ttibo * * Created on 12 décembre 2014, 08:25 */ #include "C_POTENTIOMETRE.h" #include "Arduino.h" int C_POTENTIOMETRE::Get_Intensite(){ return analogRead(Index_Entree); } bool C_POTENTIOMETRE::Get_Activite(){ }
4c1437827794eb418e7b80f555dcdbecb1f78453
8799e03022b5fe2b2cdd8a6867caf5eba49e31e6
sschaitanya/BreakOut
/SDL_1/src/Shapes/Line2D.hpp
C++
hpp
913
no_license
// // Line2D.hpp // SDL_1 // // Created by santhosh chaitanya singaraju on 10/17/20. // #ifndef Line2D_hpp #define Line2D_hpp #include "Vec2D.hpp" #include <stdio.h> class Line2D{ public: Line2D(); Line2D(float x0, float y0, float x1, float y1); Line2D(const Vec2D& p0, const Vec2D& p1); inline ...
9f9ea084c8ce6cfa879fa262e0f1e770d92c3501
248fa1b14a81d2b428b489f4f79909fbfc7f175d
bramus/chromium
/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
C++
cc
19,034
permissive
// Copyright (c) 2012 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. // Implementation of helper functions for the Chrome Extensions Proxy Settings // API. // // Throughout this code, we report errors to the user by set...
c5c260741cffd71c29b26b703c7cc8e053483e13
c59b3026ff43375d1c8379309354b3fd717d4b11
stereomatchingkiss/blogCodes2
/libs/cv_format_parser/pascal_voc_parser.cpp
C++
cpp
3,512
no_license
#include "pascal_voc_parser.hpp" #include <QDebug> #include <QDomDocument> #include <QFile> #include <QStringList> pascal_voc_parser::parse_result pascal_voc_parser::parse(const QString &file_location) const { parse_result result; QDomDocument doc; QFile file(file_location); if(!file.open(QIODevice::R...
d04573fe834da7e4533d094caca7b9629a4da31a
f47dae81ba18db6e7538c6b291555e1c294065a0
PixelExperience/hardware_custom_interfaces
/wifi/1.0-legacy/wifi_feature_flags.cpp
C++
cpp
6,143
no_license
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
6dc0da103fbec47b3eb93eb288993227a06614cb
be82f288bf2aaa9799eefe6eaee91059a140b7b9
tanmay3108/Learning
/Programs/DontKnowWhy/fibonachi_again.cpp
C++
cpp
1,106
no_license
#include<iostream> using namespace std; #define ll long long #define mod 1000000007 void multiply(ll int F[2][2],ll int M[2][2]) { ll int x = F[0][0]*M[0][0] + F[0][1]*M[1][0]; ll int y = F[0][0]*M[0][1] + F[0][1]*M[1][1]; ll int z = F[1][0]*M[0][0] + F[1][1]*M[1][0]; ll int w = F[1][0]*M[0][1] + F[1][1]*M...
0ab776a5059e4b087a0573d97b5ef69396cefb6d
2b33d8cf60ed3f70507ea1e1937b4ddb2b4f88d1
youssefmyh/ThreadPoolcommandObserver
/Classes/servicelayer/commands/mobile/LoginCommandMobileFacebook.cpp
C++
cpp
1,388
no_license
// // LoginCommandMobileFacebook.cpp // myGame // // Created by Youssef Hanna on 5/1/20. // #include "LoginCommandMobileFacebook.hpp" void LoginCommandMobileFacebook::execute(int worker){ #ifdef SDKBOX_ENABLED sdkbox::PluginFacebook::login(); sdkbox::PluginFacebook::setListener(this); #endif ...
2c6c1f1a8e563235b81c5c7d9c346382f3961e08
9132e80614dd0214d269ce44acf7ff54aa5fc562
jinhyukoo/BJ
/10986_나머지합.cpp
C++
cpp
431
no_license
#include<iostream> #include<vector> using namespace std; int main(void){ ios_base :: sync_with_stdio(false); cin.tie(NULL); long long N, M, result = 0; cin>>N>>M; vector<long long> sum(N+1); vector<int> remain(M+1); for(int i = 1 ; i<=N ; i++){ cin>>sum[i]; sum[i] += sum[i-1]; long long r = su...
ac8ab7f78ce2d93c10fe19dda92085ec84084db0
5eb31234b1a5afb9033a09cd321eb246753f4af0
MacAndKaj/Theory_and_Methods_of_Optimization
/Aplikacja/Solver/include/Methods/IMethod.hpp
C++
hpp
817
no_license
// // Created by maciek on 08.03.19. // #ifndef SOLVER_IMETHOD_HPP #define SOLVER_IMETHOD_HPP #include "SSolution.hpp" #define IMETHODS_FRIENDSHIP friend class MethodsFactory; class FunctionWrapper; class GradientWrapper; class HessianWrapper; class FunctionInPointParameters; class IMethod { public: virtual boo...
b10b9d53b3eef3c3eeac81d40a68a32a1bd27fe5
646e78dfc52badf43fb52e223dcd91ca37a3f8c2
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_1/R+rfi-popl+polp-ctrlisbpa.c.cbmc.cpp
C++
cpp
43,200
no_license
// 0:vars:3 // 4:atom_0_X2_1:1 // 3:atom_0_X5_2:1 // 5:atom_1_X4_0:1 // 6:thr0:1 // 7:thr1:1 #define ADDRSIZE 8 #define NPROC 3 #define NCONTEXT 1 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) char __get_rng(); char get_rng( char from, cha...
6c1574bec4c9852128b1831533ee61bee890d38a
d25bb0c68369c6c6b536513105b7ae03f114610d
Centimo/k-means_library
/utils.hpp
C++
hpp
2,174
no_license
// // Created by centimo on 04.11.2019. // #pragma once #include <atomic> #include <vector> #include <functional> #include <cmath> #include <iostream> #include <boost/dynamic_bitset.hpp> namespace K_means_lib::utils { template <typename Value_type> class Range { Value_type& _first_element; const size...
1e745f04c550383e7ae3ddc5c1b0e99215df579a
4c47316e1b560d4e90fe964417da18df4a362028
kryssb/SySal2000
/TSReconstruct/MatchPredictions.cpp
C++
cpp
8,937
no_license
// MatchPredictions.cpp : implementation file // #include "stdafx.h" #include "MatchPredictions.h" #include "TSReconstruct.h" #include <math.h> #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////...
142cf0577e9307b4c132ee59f6e1d2b284b9e6b2
51710ad869f485526808a0af1f82c6cf1c634554
PenTesting/gobyte
/src/miner.cpp
C++
cpp
21,716
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2017-2018 The GoByte Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/li...
bdb0fa412f0722cb8dba6aa1b3c8baf00619487c
925bacb5ab28366e3547b2cf8700a1fc0a9a8e1b
ValsCSGO/AudioEffects
/src/Delay.cpp
C++
cpp
1,206
permissive
#include <stdexcept> #include <cstring> #include <iostream> #include "Delay.h" Delay::Delay(int buf_size) { if(buf_size == 0) throw std::invalid_argument("size can't be zero"); resize(buf_size); } Delay::Delay(const Delay &other) { size = other.size; front = other.front; total = other.tot...
3d24be15f8bc9e3725993aa7776dc4e640b08b89
99d6476e135c369ddcdd74c9cdbb1ce203a1a671
schism-/tinygrammar
/tinygrammar/tangle_utilities.cpp
C++
cpp
5,440
no_license
// // tangle_utilities.cpp // tinygrammar // // Created by tangles on 6/22/16. // Copyright © 2016 visgraph. All rights reserved. // #include "tangle_utilities.h" polyline2r tangents_polyline(const polyline2r& curve, bool use_both) { auto tang = polyline2r(curve.size()); if(use_both) { for(auto i ...
19039a2b962e20dd04a3d1909c4f418a2e5a9010
c5b91e26f0bb04951e1a812f361a67f7653c965c
dcronqvist/raylib-imgui-cmake-template
/libs/raylib-cpp/AudioStream.hpp
C++
hpp
2,990
permissive
#ifndef RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_ #define RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_ #include "./raylib.hpp" #include "./raylib-cpp-utils.hpp" namespace raylib { /** * AudioStream management functions */ class AudioStream : public ::AudioStream { public: AudioStream(const ::AudioStream& music) { set...
ab4ce03ac01b3144f212e9f6ba040c1a43af4755
766f22d007d55dd4912f643829dd45e8dc962cdc
Zax37/WapMap
/shared/cREZ.cpp
C++
cpp
10,906
permissive
#include "cREZ.h" #include <conio.h> #include <fstream> #include <cmath> #include <algorithm> #include "commonFunc.h" const char* emptyString = ""; bool REZ::ElementComparison(REZ::Element *one, REZ::Element *two) { return SHR::CompareStrings(one->GetName(), two->GetName()); } bool REZ::ElementComparisonInt(REZ...
49db6289d95de0c21af928f45a1ff9def7ab30ae
e0e66fad27ccb7dd2d90caf3cacd36ab11324a21
Lightjohn/MIE
/traitement/histogramme.cpp
C++
cpp
6,894
permissive
/* * File: histogramme.cpp * Author: light * * Created on 6 janvier 2012, 14:40 */ #include "histogramme.h" histogramme::histogramme(outils *o) { outil = o; reiinit(); } //rgb = bool pour dire si utilisation de la convention rgb void histogramme::calculHistogramme(int rgb) { reiinitTab(); Q...
2b587f7ac87119f707a5217f3873ca055c12f16e
f67802c69c1ca84f2b626aa34fccb788197cdcdc
sfaxi19/bgsc
/main.cpp
C++
cpp
2,325
no_license
#include "opencv2/imgcodecs.hpp" #include "opencv2/videoio.hpp" #include <opencv2/highgui.hpp> #include "psnr_ssim.hpp" #include <iostream> #include <cstdarg> #include "bgsc.hpp" using namespace cv; using namespace std; void help(){ cout << "Usage:" << endl << "./bgsc -s video.avi thr1 thr2" << endl ...
9a61292ca78be68748ea0a9acf03bcbd00e2f631
3d50bf85c7d3ca59f16f1d0410509b771de14591
KessdeRijke123/GAME202
/Lab2/IntroToSDL/IntroToSDL/main.cpp
C++
cpp
3,742
no_license
#include <stdlib.h> #include <stdio.h> #include <time.h> #include "SDL.h" #define WINDOW_WIDTH 800 #define WINDOW_HEIGHT 600 #define NUM_SPRITES 6 #define MAX_SPEED 1 SDL_Texture *sprite; SDL_Rect positions[NUM_SPRITES]; SDL_Rect velocities[NUM_SPRITES]; int sprite_w, sprite_h; int LoadSprite(char *...
538a2e7f343e908ba2d93d725c3473afb20fc919
9917a90a3843cea9606fdcb6dc948194e31e7434
bokutotu/atcoder
/ABC/125/b.cpp
C++
cpp
929
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> P; //マクロ #define REP(i,n) for(ll i=0;i<(ll)(n);i++) #define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--) #define FOR(i,a,b) for(ll i=(a);i<=(b);i++) #define FORD(i,a,b) for(ll i=(a);i>=(b);i--) #define ALL(x) (x).begin(),(x).end() //s...
f306dc8ed29e1249ecc995bdd51add346ad7cd37
3a1f08ead7936b8e46ef5899f22d2008702a4003
OlegWorld/bulkmt
/command_reader.cpp
C++
cpp
3,648
no_license
#include "command_reader.h" CommandReader::CommandReader(std::list<CommandBulk>& data, size_t commandPackSize, std::istream& input) : m_data(data), m_current_state(std::make_unique<NormalState>(commandPackSize, input)), m_other_state(std::make_unique<...
33aae410a71fc37748c94205bd12fcbf014f29bc
eeee6b720df90f3f2a46f5f28029e9a4247e5287
timhoer/core
/projects/biogears/src/cdm/utils/testing/SETestSuite.cpp
C++
cpp
4,562
permissive
/************************************************************************************** Copyright 2015 Applied Research Associates, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.ap...
5f6251c730c51e7db4a1e835ea2862efd3cb53a4
653d2f4c248c454afa0da9a3dadd16741e04ccc2
dsciebu/oneDNN
/src/cpu/x64/jit_brgemm_1x1_conv.cpp
C++
cpp
16,869
permissive
/******************************************************************************* * Copyright 2021 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
bcc46d02e0d5e8c25678a0030d353807a2a688a4
72706b3781363838f103e2de50c4e549d399a7f6
ShanGlor/RC-Tank
/lib/ArduinoRCLib/OutputSource.cpp
C++
cpp
1,029
permissive
/* --------------------------------------------------------------------------- ** This software is in the public domain, furnished "as is", without technical ** support, and with no warranty, express or implied, as to its usefulness for ** any purpose. ** ** OutputSource.cpp ** Base class for classes acting as a source...
b13047a1af7b2d5a30705822cb92d9e6d4093fa1
7bac99c8d7e38d4ed478509c2524c4cbdf42a641
Areci/modern-cbuilder
/demo/02-architecture/Frame_ProductsBrws.cpp
C++
cpp
872
no_license
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "Frame_ProductsBrws.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TFrameProductsBrws *FrameProductsBrws; //--...
688370fec38e0df3b96dc4c10ced6754104788d3
4146774f0896ea7fee9bd9a7f7e1b32cf59d5911
brotherofken/national_data_science_bowl_2
/libs/opencv/plot.cpp
C++
cpp
15,764
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
809a9d98e15ddd875069f75affedce3f65e397aa
db78497dbc04e7ca65f19c6b3d2877fe2efb7f08
osyo-manga/Sprout
/sprout/numeric/dft/fixed/square.hpp
C++
hpp
3,943
permissive
#ifndef SPROUT_NUMERIC_DFT_FIXED_SQUARE_HPP #define SPROUT_NUMERIC_DFT_FIXED_SQUARE_HPP #include <sprout/config.hpp> #include <sprout/index_tuple/metafunction.hpp> #include <sprout/container/traits.hpp> #include <sprout/container/functions.hpp> #include <sprout/container/indexes.hpp> #include <sprout/algorithm...
561a2dedc59dff03445d1f467b8049e72a2e25b2
63d5ddecf8409bb9a8bc84d33c3a47be6ef066c4
CallForSanity/oglplus
/example/standalone/004_any_text_rendering.cpp
C++
cpp
3,320
permissive
/** * @example standalone/004_any_text_rendering.cpp * @brief Shows the usage of OGLplus' text rendering utilities * * Copyright 2008-2013 Matus Chochlik. 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) */...
1fd6b28b2f2a1fcec0002f2e8ffb15bcc782b46b
ba4c8db009b36c5f98eb8ef6c840a3f311764662
cxrdevelop/usb_enumerator
/src/transfer.cpp
C++
cpp
7,764
permissive
/* * Copyright (C) 2012, Anthony Clay, ZarthCode LLC, all rights reserved. * Copyright (C) 2016, Stephan Linz, Li-Pro.Net, all rights reserved. * * This file is part of the LibUSB C++ wrapper library (libusbpp). * * libusbpp is free software: you can redistribute it and/or modify it * under the terms of the GNU ...
a1d3a4e30277809069d5ab6cab6291003a7e8183
99ed28f5dff7ff4b4d7013814731cc892b6f917d
mikestaub/arangodb
/3rdParty/boost/1.61.0/libs/intrusive/test/avl_set_test.cpp
C++
cpp
5,664
permissive
///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Olaf Krzikalla 2004-2006. // (C) Copyright Ion Gaztanaga 2006-2015. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org...
98fc53116f8dd6b75062cebdca8a589f54125917
acf9d4970dd49ae0edf46f60d15262e635141dcb
iridium-browser/iridium-browser
/third_party/blink/renderer/core/page/scrolling/scroll_into_view_test.cc
C++
cc
37,392
permissive
// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "cc/base/features.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/mojom/frame/find_in_page.mojom-blink.h" #include "third_party/bl...
38dbd345ccaf7fd7663eb63ef0419633e5132280
ca9c930e6dbea16dab7bdd6d0701eb4a6d9e4f9d
SCHTAMP/Last-Stand-Unit
/addons/327_unit/config.cpp
C++
cpp
11,362
no_license
// config.bin - 23:38:17 07/23/20, generated in 0.01 seconds // Generated by unRap v1.06 by Kegetys // Separate rootclasses: Disabled, Automatic comments: Enabled class CfgPatches { class 327_Legion { units[] = {"Ned", "Rook"}; weapons[] = {"327_HelmetP1_Ned", "327_Uniform_Ned", "327_HelmetP1_Rook", "327_Uniform_...
1843414a26339b28b3c26bd2edba336718e75e05
c44481c2ce7c2f6d307e0a1fac6dff16bc17e56d
HSKA-CuBa/CuBa_git
/2_1D_Modell/2_5_BBB_SW/CuBa_Desktop/Communication/CReceiveTask.cpp
C++
cpp
945
no_license
/** * @file CReceiveTask.cpp * @author Michael Meindl * @date 28.9.2016 * @brief Method definitions for CReceiveTask. */ #include "CReceiveTask.h" #include <iostream> CReceiveTask::CReceiveTask(CServer& server) : mServer(server), mRunningSem(false, true), mProxyPtr(nullptr) { } void C...
268d741b71694c875fa91a323b66a01a47c1cc39
d169a99f41f082cf4c62e8f1b5a87e6dc79ec36f
IljaK/arduino-aux-heater
/src/bluetooth/BluetoothSerialHandler.cpp
C++
cpp
4,384
no_license
#include "BluetoothSerialHandler.h" extern TemperatureHandler temperatureHandler; extern BatteryMonitor batteryMonitor; extern uint8_t btPinState; BluetoothSerialHandler::BluetoothSerialHandler(Stream * serial, StringCallback messageCallback): SerialCharResponseHandler(BLUETOOTH_SERIAL_BUFFER_SIZE, RESPONSE_SEPAR...
fdf80f028f1ff44e8cf876f0d526b4afa52ccf1f
bc4299e69ad60678d252ab30d71fcea8682349e0
4ms/touchgfx-f429-makefile
/Middlewares/ST/touchgfx/framework/include/touchgfx/widgets/canvas/CanvasWidget.hpp
C++
hpp
5,975
no_license
/****************************************************************************** * Copyright (c) 2018(-2021) STMicroelectronics. * All rights reserved. * * This file is part of the TouchGFX 4.17.0 distribution. * * This software is licensed under terms that can be found in the LICENSE file in * the root directory...
b7834e7b65b59a6393fb05c2d3d17cdbbe3bc3a3
c4573cdc45a15d32ef694a436a30be853ffcbb22
Bachzart/PTA_Practice
/Basic_Level/B1093.cpp
C++
cpp
394
no_license
#include <iostream> using namespace std; bool isappear[256] = {false}; int main() { string a, b; getline(cin, a); getline(cin, b); for(int i = 0; i < a.length(); i++) { if(!isappear[a[i]]) { cout << a[i]; isappear[a[i]] = true; } } for(int i = 0; i < b.length(); i++) { if(!isappear[b[i]]...
b5680097fa209c2609b63d41346dce687285d70e
3af1cecc847955ff7398771f5b7bd834f5a57f62
zH4x/SpellBreak-FULL-SDK
/SDK/SB_LiveLinkInterface_functions.cpp
C++
cpp
375
no_license
// SpellBreak By Respecter (0.15.340) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SB_LiveLinkInterface_parameters.hpp" namespace SpellSDK { //--------------------------------------------------------------------------- //Functions //-------------------------------------------------------------------...
2df4fcc517d661aafbc68372f45b3edbc90906b3
99f52527a480f264cf27d18ca7bd1b8dfe3e3b59
SelyanKab/chromium
/third_party/blink/renderer/core/css/parser/css_at_rule_id.cc
C++
cc
3,532
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/css/parser/css_at_rule_id.h" #include "third_party/blink/renderer/core/css/parser/css_parser_context.h" #includ...
ea9fc0b805bbe41962b47d22fa643a9df2d071fd
c464b2332541e1b360277950f66ca0ca169ab01b
errorcodexero/newarch
/robots/droid/src/main/cpp/automodes/DroidAutoMode.cpp
C++
cpp
1,008
no_license
#include "DroidAutoMode.h" #include "Droid.h" #include "gamepiecemanipulator/GamePieceManipulator.h" #include "gamepiecemanipulator/conveyor/ConveyorPrepareToReceiveAction.h" #include "gamepiecemanipulator/conveyor/ConveyorReceiveAction.h" #include "gamepiecemanipulator/conveyor/ConveyorPrepareToEmitAction.h" #...
8dffe71454da61cfa341f23d02c21e5cedc2d3ef
9eccd96bde8d39885dfacc0ba06a41840a9ea4f2
10urunal/ENURinger
/tests/wasm_tests/tic_tac_toe_tests.cpp
C++
cpp
7,463
permissive
#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsign-compare" #include <boost/test/unit_test.hpp> #pragma GCC diagnostic pop #include <boost/algorithm/string/predicate.hpp> #include <enumivo/testing/tester.hpp> #include <enumivo/chain/contracts/abi_serializer.hpp> #include <tic_tac_toe/tic_tac_toe.wast.h...
cc3fd6aea9285012d844c17fe4a0c37163ba8f14
99a7e8ae4dcc02755ec14d70e386b8eef6ed30a9
bafasse/CSCE-2004
/Fall2016/Sample Code/Week 7/menu.cpp
C++
cpp
1,157
no_license
// Include statements #include <iostream> using namespace std; // an example of menu system for terminal base user interface int main() { const string menu = "\nWellcome to our menu system1" "\nEnter A, B, or C" "\nA: for action one" "...
3def33f3a7ea5429b9ce22f0dd0a18778887e35c
ebf626f1d2689ed89a3792918638b8dd1310a307
sarthak0906/codeforces
/A. Bit++.cpp
C++
cpp
232
no_license
#include<bits/stdc++.h> using namespace std; typedef long long int ll; int main(){ int n; cin >> n; int x = 0; while (n--){ string str; cin >> str; if (str[1] == '+') x += 1; else x -= 1; } cout << x; return 0; }
1c0cb586a1a09634f5f0e8d3dc8ef03f60e2eff5
e9efa56b8b4473a58822f1aa41a6f45cfca82735
bejnan/SPOJ
/Solutions/NAMES.cpp
C++
cpp
2,385
no_license
// 9 paź 2013 // Jakub Banaszewski #define REP(i,n) for(int i=0;i<(n);i++) #include<iostream> #include<cstdio> #include<map> #include<vector> #include<algorithm> using namespace std; const int buf_size = 50000; const int char_size = 1; class reader { public: char buf2[buf_size]; int head, tail; bool endOfFile; r...
5519a85aecb31cf68f2506bc70e24ddd905ef814
a8e7818c284544dee776564ac96bc6d465986425
jaehyek/serialport
/serialport/serialport.cpp
C++
cpp
2,570
no_license
// serialport.cpp : 응용 프로그램에 대한 클래스 동작을 정의합니다. // #include "stdafx.h" #include "serialport.h" #include "serialportDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CserialportApp BEGIN_MESSAGE_MAP(CserialportApp, CWinApp) ON_COMMAND(ID_HELP, &CWinApp::OnHelp) END_MESSAGE_MAP() // CserialportApp 생성 Cserialp...
daf8ae1995d887dbb64c86cef9c4d95568344575
3e1f424f4badb4b3ed6f627b63edcec7d64f5b2d
thecodingwizard/competitive-programming
/USACO/2017open/gold/art2.cpp
C++
cpp
1,984
no_license
#include <iostream> #include <string> #include <utility> #include <sstream> #include <algorithm> #include <stack> #include <vector> #include <queue> #include <map> #include <set> #include <bitset> #include <cmath> #include <cstring> #include <iomanip> #include <fstream> #include <cassert> #include <unordered_set> usin...
1a607cca2b19421d8d58ccc315b6f762aabf03bb
d77f10f01650f1a62d9026472a181993898cbfe6
okutane/miranda
/miranda/src/modules/srauth/authdialogs.cpp
C++
cpp
11,508
no_license
/* Miranda IM: the free IM client for Microsoft* Windows* Copyright 2000-2017 Miranda ICQ/IM project, all portions of this codebase are copyrighted to the people listed in contributors.txt. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Li...
5b0c34e3db7c89f8cfdc63b5474b930a300b0743
e9cf1f5a80e605b435a5619d710ec37f131127a7
Bhawna11agg/Uplift-Project
/Prince-Gupta16/July/Week1/Leetcode/Same Tree.cpp
C++
cpp
333
no_license
class Solution { public: bool isSameTree(TreeNode* p, TreeNode* q) { if(p==NULL && q==NULL){ return true; }else if(p==NULL || q==NULL){ return false; } if(p->val==q->val){ return isSameTree(p->left, q->left) && isSameTree(p->right, q->right); }else{ return fals...
b352d24ad80e623a7bd49d6ca076514c0391ec25
761e813d591704cdaefd12909b085ad2962e409e
kosmaz/FileRecover
/src/FileRecover.hpp
C++
hpp
489
permissive
#ifndef FILERECOVER_HPP #define FILERECOVER_HPP #include <QObject> #include <QGuiApplication> class FileRecover : public QObject { Q_OBJECT public: explicit FileRecover(QObject *parent = 0); Q_INVOKABLE void startRecovery(QString); Q_INVOKABLE void getDrives(); signals: void recoveryComplete(); ...
9769378adf4cda2b5fb3bd6ce9e34a152d5f1316
7975fe7c9a44fbde67d9a5fd401e949cea16f064
gumb0/k_exercise
/Common.cpp
C++
cpp
483
no_license
#include "Common.h" #include <iomanip> #include <sstream> std::string FormatTimePoint(const TimePoint& timePoint) { std::stringstream stream; const std::time_t time = std::chrono::system_clock::to_time_t(timePoint); stream << std::put_time(std::localtime(&time), "%F %T"); const std::chrono::millisec...
92236fa6814d5605292779feb2ddcb02e8117cf3
f9cf0bec3d0d1031300c04f9bce9a3f319a30fa6
HJReachability/beacls
/builds/includes/levelset/InitialConditions/InitialCondition.hpp
C++
hpp
706
permissive
#ifndef __InitialCondition_hpp__ #define __InitialCondition_hpp__ //! Prefix to generate Visual C++ DLL #ifdef _MAKE_VC_DLL #define PREFIX_VC_DLL __declspec(dllexport) //! Don't add prefix, except dll generating #else #define PREFIX_VC_DLL #endif #include <cstdint> #include <vector> #include <typedef....
419cb84f59f84a47e2ecb9c4bd57f056dc78ee6a
782a4ba37d579d8784a8072c82a597bc27b44112
cogsys-tuebingen/csapex_core_plugins
/csapex_video/src/make_screenshot.cpp
C++
cpp
1,447
permissive
/// HEADER #include "make_screenshot.h" /// PROJECT #include <csapex/model/node_modifier.h> #include <csapex/msg/io.h> #include <csapex/param/parameter_factory.h> #include <csapex/utility/register_apex_plugin.h> CSAPEX_REGISTER_CLASS(csapex::MakeScreenshot, csapex::Node) using namespace csapex; using namespace csape...
767f4d07fa5aa67d284deba26ca69d3bdbfb8f26
792062f4ab37fec5c7c3ea8344791bdf0497fe8c
Harry-KIT/hackerrank
/hackrank-week-15/sudoku.cpp
C++
cpp
3,643
no_license
#include <algorithm> #include <iostream> #include <cmath> #include <cstring> #include <set> #include <utility> #include <vector> using namespace std; const int D = 9; const int DD = 3; int sudoku[D][D]; int chk[D+1]; struct swp { int x1, y1, x2, y2; swp (int xx1, int yy1, int xx2, int yy2) : x1(xx1), y1(yy1)...
24a27594b85a1a06be1fd1fe3b5ffe230814666f
c46c3a24d9788d280d571da80be0de048b36a3e2
Vuki995/PascalToLLVM
/yac.tab.cpp
C++
cpp
80,150
no_license
/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by...
a61552f031c2496bfc1ef424ea0f24fc96729137
32aa13642d6a12bf09e624f013e3b4ebdb39606f
JayhawkZombie/SFEngine
/Engine/Source/Engine/HandleKeyEvents.cpp
C++
cpp
4,341
permissive
//////////////////////////////////////////////////////////// // // MIT License // // Copyright(c) 2017 Kurt Slagle - kurt_slagle@yahoo.com // // 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 Softwar...
353cc93acb15cca3b403856e80762e75b4db2f31
3f6950dce1c5cf694279821ea63e06182ec4448f
PopCap/GameIdea
/Engine/Source/ThirdParty/hlslcc/hlslcc/src/hlslcc_test/main.cpp
C++
cpp
8,728
permissive
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include <stdarg.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <Windows.h> #include "hlslcc.h" #include "glsl/ir_gen_glsl.h" static bool Rebase = false; /** Debug output. */ static void dprintf(const char* Format, ...) { const int ...
bddcc025ad43aa5f13f70bbb006fbdd2aa9873db
e8280ee25200aced71333d2c645fbe7bc6ae7e87
TrinityTeam/GameOfLife
/shader_program.cpp
C++
cpp
1,252
no_license
#include "shader_program.h" #include <iostream> ShaderProgram::ShaderProgram() { shaderProgram = glCreateProgram(); } GLuint ShaderProgram::getGLProgram() const { return shaderProgram; } void ShaderProgram::useProgram() { glValidateProgram(shaderProgram); glUseProgram(shaderProgram); } void S...
199e71bf227e019b99cbe8fde955a1fc778c4117
13ab361302614ca9465345fd62bb8dbddf0ce7b1
AryeVarman/E-commerce-system
/E-commerce system/Product.cpp
C++
cpp
2,871
no_license
#include "Product.h" Product::Product(const Seller * seller, int category, const string & name, double price):m_seller(seller) { setCategory(category); setName(name); setPrice(price); m_serialNumber = serialGenerator++; } //-------------------------------------------------------------------// Product...
9721491828a7c6682108b4753c1fef882ba208ad
87ffafb98f894bcd707bc80ee6c05eb40ac2ac42
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_old_hunk_1872.cpp
C++
cpp
1,301
no_license
pconf = pconf_; if (ap_exists_config_define("ONE_PROCESS") || ap_exists_config_define("DEBUG")) one_process = -1; if (!strcasecmp(signal_arg, "runservice") && (osver.dwPlatformId == VER_PLATFORM_WIN32_NT) && (service_to_start_success != APR_SUCCESS)) { ap_lo...
099a6961801b99317139f173374cabb69fd85a76
7a477118e6e2b72fe746e8e9325edb172f267700
luyao777/PATcode
/1041.cpp
C++
cpp
454
no_license
#include <iostream> using namespace std; struct stu{ char num[14]; int Jnum; int Knum; }; int main(int argc, char const *argv[]) { stu usr[1000]; int n,i,j,t,k; cin >> n; for(i = 0; i < n; i++) cin >> usr[i].num >> usr[i].Jnum >> usr[i].Knum; cin >> k; for(j = 0; j < k; j++) { cin >> t; for(i...
e57fd6c068f151c2a0c2e962970ce45a84aa8cee
44e46bda658edab8c981ddddf04074678fa08468
mstsuite/lsms
/Test/Unit/test_spherical_harmonics.cpp
C++
cpp
3,269
permissive
// // Created by F.Moitzi on 18.09.2021. // #include <gtest/gtest.h> #include <complex> #include <vector> #include "Complex.hpp" #include "Real.hpp" #include "SphericalHarmonics.hpp" #include "accel_common.hpp" #include "spherical_harmonics.hpp" namespace spherical_harmonics_tests { TEST(SphericalHarmonics, SphHar...
3ee498c1892043db75e3dfd1c666d03fca543609
19efca1f03ccba616eb47c638dee881eb09d1676
ming-zhu/CMake
/Source/cmExprParser.cxx
C++
cxx
51,224
permissive
/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by...
7d1161876e174bf1aca503c207ce7fdc654501f2
0a53c359bd4140bbc6d547dce4237934302e03c4
SINTEFMedtek/CustusX
/source/resource/widgets/cxFileWatcherWidget.cpp
C++
cpp
1,831
permissive
/*========================================================================= This file is part of CustusX, an Image Guided Therapy Application. Copyright (c) SINTEF Department of Medical Technology. All rights reserved. CustusX is released under a BSD 3-Clause license. ...
aed6827eb00b92a9f68ea71193da0e2cd058634e
c2ea653a63ca1ad3beac233311f53c294e21dc9c
david-guerrero/MITK
/MITK/Modules/RigidRegistrationUI/RigidRegistrationOptimizer/QmitkAmoebaOptimizerView.cpp
C++
cpp
10,406
no_license
/*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision: -1 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.t...
05a5fae2441e0781990fe66eb85b74689bc45c46
117d26bab98ce6bf122884bc45f22787b0facea8
seyoung-Oh/learning
/BinaryFile.cpp
C++
cpp
1,901
no_license
#include <iostream> using namespace std; #define NAME_SIZE 32 #define STUDENT_MAX 3 typedef struct _tagStudent { char strName[NAME_SIZE]; int iNumber; int iKor; int iEng; int iMath; int iTotal; int fAvg; }STUDENT, *PSTUDENT; int main() { /* 파일 만들기 STUDENT tStudent[STUDENT_MAX] = {}; for (int i = 0;i < S...
9940feff4a58469d6395f657ba5b3c56b13f8a5c
62f3cda77de9cdc806a35b4e9112290ddbf3851c
fpdjsns/Algorithm
/codejam/kickstart/2020/roundC/1. Countdown.cpp
C++
cpp
935
permissive
/** * problem : https://codingcompetitions.withgoogle.com/kickstart/round/000000000019ff43/00000000003380d2 * time complexity : O(N) */ #include <string> #include <vector> #include <algorithm> #include <iostream> #include <queue> #include <map> #include <set> using namespace std; int main() { int C; cin>>C; ...
e3fffc3337819fa91a385c7ed7b1ad511cdbfc0e
ec8547ff1100df3e1de824b419a7d394deada420
RickthePikeman/Platformer
/TWL/TWL/LevelManager.cpp
C++
cpp
3,571
no_license
#include "stdafx.h" #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include "TextureHolder.h" #include <sstream> #include <fstream> #include "LevelManager.h" using namespace sf; using namespace std; int** LevelManager::nextLevel(VertexArray& rVaLevel) { m_LevelSize.x = 0; m_LevelSize.y = 0; // Get the next ...
a7a94efa4e865e3cf44f0728b4874d1724c1dc66
3621c4fa19ba1694f4749acb59e73ff2af627ede
googolhkl/MultimediaProgramming
/filter/bmp.cc
C++
cc
14,382
no_license
#include "bmp.h" #include <iostream> #include <cstdio> #include <math.h> namespace hkl { BMP::BMP(){} BMP::~BMP(){} DWORD BMP::getnWidth(){ return this->nWidth; } DWORD BMP::getnHeight(){ return this->nHeight; } void BMP::ShowHeaders() { std::cout<<"-----Bitmap File Header-----"<<std:...
17e2c29952b2749dfd99f1473f617172cc89c789
a0eeaa0b415fd4de7fdae52f0b35be4a250699cf
marcosajc/cloned_mk
/src/libmeasurement_kit/ooni/dns_injection.cpp
C++
cpp
1,376
permissive
// Part of measurement-kit <https://measurement-kit.github.io/>. // Measurement-kit is free software. See AUTHORS and LICENSE for more // information on the copying conditions. #include <measurement_kit/ooni.hpp> #include <event2/dns.h> namespace mk { namespace ooni { using namespace mk::report; void dns_injection...
91ba0437f30c7dc3edfcd8be95766b8645288da2
111cdf9619f45fa5f60952fd57c8f01904e02e07
pyruvic-acid/Polaris
/SBFT/bftengine/include/bftengine/Digest.hpp
C++
hpp
5,038
permissive
//Concord // //Copyright (c) 2018 VMware, Inc. All Rights Reserved. // //This product is licensed to you under the Apache 2.0 license (the "License"). You may not use this product except in compliance with the Apache 2.0 License. // //This product may include a number of subcomponents with separate copyright notices ...
68b7c244bb5872c1617e4393d1d296621bf83a79
bdfd0973365fb6f9a63ca1e7472baa7bd637569c
indra215/hackerRank
/search/circle_city.cpp
C++
cpp
476
no_license
#include <iostream> #include <cmath> using namespace std; int main() { int T; cin >> T; for(int i=0;i<T;i++) { double d,k; cin >> d >> k; double count=0; for(double x=0;x<=sqrt(d);x++){ double y = sqrt(d-x*x); if(y == (int)y && x!=0 && y!=0){ count += 4; }else if(y == (int)y...
241deff7988ec6223f9a9130ed04ad217b83aa6c
61b9f426f16bd1a5d67b9a12de9e75eaaa146019
YsingYang/CPP-Primer-Practice
/Chapter13/12.27.cpp
C++
cpp
561
no_license
#include"/home/ysing/codeblock Projects/CPP_prime/Chapter13/13.27_Has_Ptr.h" using namespace std; int main(){ HasPtr *hp = new HasPtr(); HasPtr *hp2 = new HasPtr(*hp); cout<<*hp2->use<<endl; HasPtr hp3 = *hp; cout<<*hp2->use<<endl; hp3 = *hp;//这种情况下才会调用=号操作 //cout<<hp3->use<<endl; ...
dfc8e544e3dc76f569297fb563685790a5620c8b
ebbfbca21a2e08a9f81ed6e0c61640486a07214d
xtblock/chromium
/chrome/browser/ash/attestation/tpm_challenge_key_result_unittest.cc
C++
cc
3,213
permissive
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ash/attestation/tpm_challenge_key_result.h" #include "testing/gtest/include/gtest/gtest.h" namespace ash { namespace attestatio...
ee3b1455bb40429fab9fec65caa077010dece59f
a8d343cc9a22bff9c479e3b1b15f1c1abf550d63
rcpauor32/NetworksLabPractice3
/MailingApp - TODO/src/ModuleServer.cpp
C++
cpp
11,194
no_license
#include "ModuleServer.h" #include "Log.h" #include "imgui/imgui.h" #include "serialization/PacketTypes.h" #include "database/MySqlDatabaseGateway.h" #include "database/SimulatedDatabaseGateway.h" #include <random> static bool g_SimulateDatabaseConnection = true; #define HEADER_SIZE sizeof(uint32_t) #define RECV_CH...
d3ba31bc249d0f7a1d3177e0fb0be8c88e9f953f
0fe884a267b72eff42acb59ee4ecc9cb3be4cb08
Poofyfancypants/Destiny-Falls
/DestinyFalls/Source/Game States/WinState.cpp
C++
cpp
2,348
permissive
#include "stdafx.h" #include "WinState.h" #include "CreditState.h" #include "../Game Core/Game.h" #include "../Game Objects/Player.h" #include "GameplayState.h" #include "../../SGD Wrappers/SGD_Geometry.h" #include "../../SGD Wrappers/SGD_GraphicsManager.h" #include "../../SGD Wrappers/SGD_AudioManager.h" #include "../...
097b402e2248591327f71ef48bf2a59048fa978d
2463e60dc072a7d25fc90eb6ff46a38a7719bd66
crastinus/utils
/meta/for_each_argument.hpp
C++
hpp
277
no_license
#pragma once #include <utility> namespace utils { template <typename FunctionType, typename... Arguments> void for_each_argument(FunctionType&& function, Arguments&&... args) { using swallow = int[]; (void)swallow{(function(std::forward<Arguments>(args)), 0)...}; } }
eb461f1576ccde89915668c230539e80d6c5080f
81fe21d0b3045427e6ab674222bd640e2050a480
trongnmchainos/validator-keys-tool
/extras/jbcoin-libpp/extras/jbcoind/src/jbcoin/rpc/handlers/BlackList.cpp
C++
cpp
1,515
permissive
//------------------------------------------------------------------------------ /* This file is part of jbcoind: https://github.com/jbcoin/jbcoind Copyright (c) 2012-2014 Jbcoin Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby g...
c3a0980e76495b6e007589908ced7d0684c2844b
8bb1832fdf644375f4478e31af82eb0eb784966e
ananya-Sharma27/Cpp-Programs
/greatest of two numbers.cpp
C++
cpp
317
no_license
//Program to find greatest of two numbers #include<iostream> using namespace std; int main() { int num1, num2; cout<<"Enter the first number\n"; cin>>num1; cout<<"Enter the second number\n"; cin>>num2; if(num1>num2) cout<<"num1 is greater than num2"; else cout<<"num2 is greater than num1"; return 0; }
e491fe09265e32059dafe7696a822011eb2aeeaf
8cf359c1b26436fc1cd2139458dc4df6b59a869e
adver1991/Calculator
/calculator.cpp
C++
cpp
837
no_license
#include"SymbolTable.h" #include"FunctionTable.h" #include"Store.h" #include"Scanner.h" #include"Parser.h" const int maxBuf = 100; const int maxSymbols = 40; int main() { char buf[maxBuf]; Status status; SymbolTable symTab(maxSymbols); FunctionTable funTab(symTab); Store store(maxSymbols, symTab); std::cout << "\...
38b9885cc35cb6ce4cb13e56cb93655279195c86
ea823bed5dae7e216b1b9ed643c44f8353f5b799
soaped/incubator-doris
/be/test/exec/schema_scanner/schema_schemata_scanner_test.cpp
C++
cpp
5,670
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
1ffbe99614cf12de9980fdec8fff26864bf18df7
ae93e6c7b13c91cf1aa2716e06c97e81ccf0c5ac
JulienRst/OpenGLIMAC
/files/engine/include/engine/music.hpp
C++
hpp
548
permissive
#pragma once #include <cstdlib> #include <iostream> #include "SDL.h" #include "SDL_mixer.h" //Initialisation et fermeture void InitAudio(); void QuitAudio(); //Gérer des musiques générale Mix_Music* LoadMusic(char const* filepath); void FreeMusic(Mix_Music* music); void PlayMusic(Mix_Music* music, int loops); void ...
35b9bf3e6f24daaa5a30f124ed4e728feef20bf9
bedf8c4f1675bb4cd02f1041a162ffa149457dbe
vinson0526/incubator-doris
/be/test/olap/bit_field_test.cpp
C++
cpp
5,776
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
ecd93f2bca8ae8997eb6728d3f7a69cbfd7adc28
117cb6356a0a03ba5c228e7d5bf4e6e00470451a
prasannabhat/iceoryx
/iceoryx_utils/test/moduletests/test_cxx_variant_queue.cpp
C++
cpp
3,986
permissive
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
52068f81e377ce4bce7472a1e7f24123a1776d0c
33af8d76293ddeefd555843efc6a527f36cbe0df
tanmayb123/swift
/lib/AST/DeclContext.cpp
C++
cpp
32,679
permissive
//===--- DeclContext.cpp - DeclContext implementation ---------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
0656d98efd61c0df158f81a3ce8488fb8633c250
fd2412ce23bea537d7d8207cecbe36558e3e54c9
BaptisteMagoni/Projet_escape_bts_7_quizz
/Programmation/Application/Escape_Quiz_Projet_BTS/debug/moc_mainwindow.cpp
C++
cpp
4,110
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'mainwindow.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1) ** ** WARNING! All changes made in this file will be lost! **********************************************************...
746cd65bc716df9b35db363a7c84bfaa8207ef6a
b782f1bd2ed303400061c7cc1fa2a17b23d1c94c
Gawhary/ImageViewer
/imageinfo.cpp
C++
cpp
362
no_license
#include "imageinfo.h" ImageInfo::ImageInfo(QObject *parent) : QObject(parent) { m_aspectRatio = 1; m_isWide = (true); m_imageSize = QSize(0,0); } QSize ImageInfo::imageSizeToFitInRec(int width, int height) { if(m_isWide) return QSize(width, width / m_aspectRatio); else return...