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
ee23f4c824301005af2530bae8541289ecdd321f
66496494134bf1e89d2bcecb9be61b369991a9c1
MAPSWorks/qmicromap
/spatialtest/demo2.cpp
C++
cpp
12,639
permissive
/* demo2: version 2.2, 2008 September 13 Author: Sandro Furieri a-furieri@lqt.it ------------------------------------------------------------------------------ this is a sample C source showing how to manipulate GEOMETRY 1. creating geometries 2. exploring geometries 3. enquiring their basic properties ----------...
e26d64cac41bfd4da4923e525e4ccd6d84c60dbf
711452a32ac71611cdd5817aba8fbe7f1dc2f894
15831944/BeijingEVProjects
/小浪底泥沙三维/EV_Xld/jni/src/EV_Spatial2DCarto_Java/wrapper/symbolconvertor_wrapperjava.cpp
C++
cpp
1,868
no_license
/* This file is produced by the JNI AutoWrapper Utility Copyright (c) 2012 by EarthView Image Inc */ #include "spatial2dcarto/symbolconvertor.h" #include <jni.h> #include "core_java/global_reference.h" #include "core_java/jni_load.h" #include <typeinfo> namespace EarthView { namespace World { namespace Spatial ...
ba18ca02125a757268ce413932be43edf2807718
147288d96ade0c53c2d6940a95f5c18669028ffa
Jonatankk/codigos
/URIOJ/uri1633.cpp
C++
cpp
893
no_license
#include<stdio.h> #include<stdlib.h> #include<vector> #include<queue> #include<utility> #define MAX 112345 using namespace std; struct proc{ int t, c; }; typedef long long ll; int paircomp(const void *a, const void *b){ return ((proc*)a)->t - ((proc*)b)->t; } int main(void){ int N; proc v[MAX]; while(scanf("%d...
7e172aaa9f08859499cf033a4be43b49297bc371
f30634583ce8f6a0ae6d96513c9efc60990084c2
jaxlson/CG_Labs
/src/EDA221/assignment2.cpp
C++
cpp
5,618
permissive
#include "assignment2.hpp" #include "interpolation.hpp" #include "node.hpp" #include "parametric_shapes.hpp" #include "config.hpp" #include "external/glad/glad.h" #include "core/Bonobo.h" #include "core/FPSCamera.h" #include "core/InputHandler.h" #include "core/Log.h" #include "core/LogView.h" #include "core/Misc.h" #...
5b27f45413ecf156c2703db06a5173c9c40039f0
7b58e2260001d95282b5f51cdbf682caf2251a72
karlmiko/prog-logic-ifpr
/Aula18/Exercicio5_Aula18.cpp
C++
cpp
721
no_license
//Exercicio5_Aula18.cpp //Karl Michel Koerich #include "biblaureano.h" int main() { char cVetor[30]; int iPreenchendo = 0; while (iPreenchendo < 30) { cVetor[iPreenchendo] = readChar ("Caracter: "); iPreenchendo++; } char cVerificaSeHa = readChar ("Verifique quantas vezes há...
862a56def56490009dbce880680c3d9887f4de74
fabc266cf3258b832e454693c373809b1a7d9bd4
nemo-by-replace/all-tests
/c-c++/future/promise.cpp
C++
cpp
640
no_license
#include <iostream> // std::cout #include <functional> // std::ref #include <thread> // std::thread #include <future> // std::promise, std::future void print_int (std::future<int>& fut) { int x = fut.get(); std::cout << "value: " << x << '\n'; } int main () { std::promise<int> prom; ...
d2f51bc6df42ab34f9786d2bc76440a9acdc6c24
145ad9aafeb890c338c906eef72b0780981b865b
BharatiSukanya/30_DaysOfLearning
/Day8/Sort an array of 0s,1s,2s .cpp
C++
cpp
586
no_license
//Sort an array of 0s, 1s and 2s #include<bits/stdc++.h> using namespace std; int main() { int n,i; int *arr = new int(n); int c0 = 0, c1=0,c2=0; cin>>n; for(i=0;i<n;i++) cin>>arr[i]; for(i=0;i<n;i++) { if(arr[i]==0) c0++; else if(arr...
1177b10276cb9ed1212781b2316371c733292da7
3f55f8895c2c1c79fda431de893ecfd4e87a21b3
erwincoumans/dynamica
/Extras/wxWidgets-2.9.0/src/osx/core/timer.cpp
C++
cpp
2,899
no_license
///////////////////////////////////////////////////////////////////////////// // Name: src/osx/core/timer.cpp // Purpose: wxTimer implementation using CoreFoundation // Author: Stefan Csomor // Modified by: // Created: 2008-07-01 // RCS-ID: $Id: timer.cpp 54129 2008-06-11 19:30:52Z SC $ // Copy...
31cf20fdc33b8a439eeb1e41ff5726ebda5e1621
316273de8cca4d9e3321b423b3b851f001f82efc
DerickThePoney/SFML-OPENGL-SUPERBIBLE
/ProgramManager.cpp
C++
cpp
1,573
no_license
#include "stdafx.h" #include "ProgramManager.h" ProgramManager* Singleton<ProgramManager>::s_kInstance = nullptr; ProgramManager::ProgramManager() { } ProgramManager::~ProgramManager() { } OGLProgram * ProgramManager::InstantiateFromRessource(const std::string & kFilename) { auto itFind = m_akPrograms.find(kFilena...
1315e5d5ac729d2f0fb991495a5bb66ee5ccc7fc
49f8b46656458927d47edec55470d76a7f4e75dd
cgthkoeln/AcceleratedStereoscopicRendering
/Source/Falcor/Core/API/Sampler.cpp
C++
cpp
4,056
no_license
/*************************************************************************** # Copyright (c) 2020, NVIDIA 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: # * Redistributions of...
76c6179c42350a11c95773201bb40cf584f356b0
4a43e45d88567876bd036be6c58a148b1e14d55a
whip112/webdawplugins
/source/host/cpp/plugformats/vst.cc
C++
cc
8,465
no_license
// // vst.cc // // // Created by Jari Kleimola on 04/12/14. // // #include "vst.hh" #include "dawhost.h" #include "audioeffectx.h" #include <sstream> // extern void* entrypoint(int& type); extern "C" { extern void jslog(int); } extern DAWHost* ghost; static VstTimeInfo timeinfo; static VstIntPtr VSTCALLBACK AMC(...
d5c2e3939c2f4b7dc1895f7da1a7a973716d64c3
062b5152a186e29bae6f68fb5ab022f2577ded09
thangkhuc/Library_Management_GUI
/anzeige_dialog.cpp
C++
cpp
8,099
no_license
#include "anzeige_dialog.h" #include "ui_anzeige_dialog.h" Anzeige_Dialog::Anzeige_Dialog(QVector<Book*> books, QWidget *parent) : QDialog(parent), ui(new Ui::Anzeige_Dialog) { ui->setupUi(this); ui->label->setText("Buecher"); ui->table->setRowCount(books.size()); // das 3. Colomm modifiziere...
2241ac50f16126babf3e1cb137860b7b210c89be
64ee31b3f43531f7c3e3d984da84d9292aabea97
jrprice/OpenCL-CTS
/test_conformance/pipes/test_pipe_read_write.cpp
C++
cpp
72,364
permissive
// // Copyright (c) 2017 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable la...
5155a1e6aa9837b541925d365a6be42e302fd9af
0a2ed03785c910077e1216de676e9f169c7c7af3
amundhov/heatbath
/aggregate.cpp
C++
cpp
805
no_license
#include <stdio.h> #include <math.h> #include <stdlib.h> /* Take in filename and starting sample as arguments. Compute average of <I> and <W^2> */ int main(int argc, char* argv[]) { int iteration; int firstSample; sscanf(argv[2],"%u", &firstSample); float I,Wsquared; double iterations; doub...
bfb6f252cb004cd687c2010c5c23a8c87e78c6e8
efa0d24f430029957d43221309f1e79eeb054b2f
cuicp/USACO
/Chapter2/顺序的分数.cpp
C++
cpp
1,640
no_license
/* ID:cui chengpeng PROG:frac1 LANG:C++ */ #include<iostream> #include<fstream> #include<algorithm> using namespace std; typedef struct fractions{ int x;//分子 int y;//分母 double s;//与该分数等价的小数 }fractions; fractions a[100000]; bool cmp(const fractions &s1,const fractions &s2) { if(...
b8ed4608ab40b77dd008830a3ec1afe5998c01b3
0b9399a5bc705afdd9523e020e2527f0f1343f33
fsy-juruo/noip2020-JS-Answers
/answers/JS-0627/string/string.cpp
C++
cpp
1,433
no_license
#include<bits/stdc++.h> using namespace std; int T; string s; int cnt[1100],cnts[1100],mus[1100]; int main(){ freopen("string.in","r",stdin); freopen("string.out","w",stdout); cin>>T; while(T){ T--; int ans=0; memset(cnt,0,sizeof(cnt)); memset(cnts,0,sizeof(cnts)); memset(mus,0,sizeof(mus)); cin>>s; f...
c130d68e434ae2db1c8a86383ba970936756e379
387205baf4ace7a94ea7cb56036ae934cd3236f5
BekzhanKassenov/olymp
/acmp.ru/001...100/091/91.cpp
C++
cpp
682
no_license
#include <iostream> #include <cstdio> #include <vector> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); bool used[100000] = {0}; int a[10010] = {2, 3, 4, 7, 13, 15, 0}; int b[10010] = {1, 5, 6, 8, 9, 10, 0}; for (int i = 0; i < 6; i++) { used[a[i]]...
336daaea3f35d9a77bf7bd2d153135adf66c1336
dd4317f910fccb339013431b38491cdbe6b66c10
aahernandez/SimpleMiner
/Code/BlockDefinition.cpp
C++
cpp
2,782
no_license
#include "Game/BlockDefinition.hpp" BlockDefinition::BlockDefinition() : m_blockType(BLOCK_TYPE_AIR) , m_texCoordsXForward(0.f, 0.f) , m_texCoordsXBack(0.f, 0.f) , m_texCoordsYLeft(0.f, 0.f) , m_texCoordsYRight(0.f, 0.f) , m_texCoordsZUp(0.f, 0.f) , m_texCoordsZDown(0.f, 0.f) , m_isOpaque(false) , m_isSolid(f...
49acc7bc283cb2b1b23411b5b2ca1579b3df0797
e27824b4f7fdc949dd90ccfd5d598d408fe278df
akhikolla/RcppDeepStateTest
/issuestests/icRSF/inst/testfiles/gradlikCD0/AFL_gradlikCD0/gradlikCD0_DeepState_TestHarness.cpp
C++
cpp
1,244
no_license
#include <fstream> #include <ctime> #include <RInside.h> #include <iostream> #include <RcppDeepState.h> #include <qs.h> #include <DeepState.hpp> NumericVector gradlikCD0(NumericVector parm, NumericMatrix Dmat); TEST(icRSF_deepstate_test,gradlikCD0_test){ RInside R; std::time_t t = std::time(0); std::cout << "in...
be56791a32441192f677fc5682082cc8c29d47c7
b4e19743288f1710e5de6159b710ed2b0984715d
celestecote21/ray_tracer_cpp
/Hitable.hpp
C++
hpp
311
no_license
#ifndef HITABLE_H #define HITABLE_H #include "Vec3.hpp" #include "Ray.hpp" #include "Material.hpp" typedef struct{ float t; Vec3 p; Vec3 normal; Material* mat_ptr; } hit_record_t; class Hitable{ public: virtual bool hit(const Ray& r, float t_min, float t_max, hit_record_t& rec) const = 0; }; #endif
55f038d4328a993e718872e6f00a313c1af9c670
9ba4169a210ad8cf51e9ab09e871b064647344eb
bkueppers/chromium
/chrome/browser/signin/signin_ui_util_unittest.cc
C++
cc
25,338
permissive
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/signin/signin_ui_util.h" #include "base/bind.h" #include "base/macros.h" #include "base/test/metrics/histogram_tester.h" #includ...
5c7a3b457ce2074b864d1af116bc15a2eaf12c48
7f1e849b95bae79f78feaf73e71a07e2734d18f6
nandohca/kista
/src/user_task_constructs.hpp
C++
hpp
8,971
no_license
/***************************************************************************** user_task_constructs.hpp This file belongs to the KisTA library All rights reserved by the authors (until further License definition) Author: F. Herrera Institution: KTH Deparment: Electronic Systems Date: 2013 Februar...
eab6b1bee1415f289de0bbdf8ba1796efb693503
1403f5fbc857114ea8050475bb41f1c5caa73e93
msimberg/hpx
/libs/full/performance_counters/src/server/per_action_data_counters.cpp
C++
cpp
4,577
permissive
// Copyright (c) 2016 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <hpx/config.hpp> #if defined(HPX_HAVE_PARCELPORT_ACTION_COUNTERS) && defined...
5984af43e739804dfcf16679132fd68dc55f7d22
4f6cf3e4331f93c7ba1a9d7b574560300e283fad
renra/cxx_benchmarks
/array_iteration/without_caching.cxx
C++
cxx
408
no_license
#include <iostream> #include <vector> // 100'000'000 seems a good benchmarking size int main(int argc, char ** argv){ if(argc < 2){ std::cout << "Give me array size" << std::endl; return 1; } int size = std::stoi(argv[1]); int sum = 0; std::vector<int> * vec = new std::vector<int>(size); for(int ...
291255a8390a2fce5e1ce2989f937ad28668565c
70cd6c71a5c257f828f17bcf0ff6d0e1fd035c48
laods/opm-porsol
/opm/porsol/blackoil/co2fluid/opm/material/components/iapws/region1.hh
C++
hh
12,278
no_license
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // vi: set et ts=4 sw=4 sts=4: /***************************************************************************** * Copyright (C) 2009-2010 by Andreas Lauser * * Institute of Hydraulic Engineering ...
5d395bb85e23ffd52e6806390d398762a8d198ed
28a639950d13eb3d5d0c4052006d28ca4f28f415
WiseCow/algorithm
/BOJ/윤수용사.cpp
C++
cpp
8,525
no_license
//#include <iostream> //#define SIZE 52 //using namespace std; // //typedef struct Node //{ // int x; // int y; // int cnt; // struct Node *next; //}Node; // //typedef struct Queue //{ // int size; // Node *head; // Node *tail; //}Queue; // //void push(Queue *q, int x, int y, int cnt) //{ // Node *...
c49901e89f865900f46250926c4846bad8a3ec42
e78f4eee0a783d2adea66e0bc34426e92227a6fc
jhx76/zigbus-system
/online/lib/com/xap/XAPNetworkProperties.cpp
C++
cpp
6,572
no_license
/* This file is part of Zigbus Home Automation API. Copyright (C) 2012 jhx 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 the Free Software Foundation, either version 3 of the License, or (at your option...
c35d4876322a96e520b864b198dc1e1bc884dbf2
313e18d018201718a45e8a7ddfe32da5d39fc579
BGI-Qingdao/fabulous2.0
/src_main/MergePhaseResult.cpp
C++
cpp
7,720
no_license
#include "common/args/argsparser.h" #include "common/files/file_reader.h" #include "common/files/file_writer.h" #include "common/log/log.h" #include "common/error/Error.h" #include "appcommon/FileName.h" #include "appcommon/SegmentFa.h" #include <functional> #include <map> #include <string> #include <sstream> #includ...
c90e2882742cd7128e575de71d2e4086e22207af
6cd8ebc030e455f6cb491255127c17509d403c0b
ebotCode/SelfDrivingCarRepo
/CoreSDC/ComputationMath.cc
C++
cc
232
no_license
#include "ComputationMath.h" namespace Math{ Unit::Degree RadToDeg(Unit::Radian radian){ return (radian * 180.0 / Constant::PI); } Unit::Radian DegToRad(Unit::Degree degree){ return (degree * Constant::PI / 180.0); } }
5b467d885e0bd719bf78738a1eb3edee2c1045b4
d775713b7396c22ad0714fb142b2cd1d9f5f58b6
alvarodlg/lotsofcoresbook2code
/c13.code/uintah/branches/pearls/src/CCA/Components/MPM/ConstitutiveModel/ViscoTransIsoHyperImplicit.cc
C++
cc
54,018
permissive
/* * The MIT License * * Copyright (c) 1997-2015 The University of Utah * * 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 * right...
abdcc677177563085b09ebcc5a889e8f68a8d691
6954be4a337a58c41751955380f44fa687f494b5
bgoonz/UsefulResourceRepo2.0
/_REPO/MICROSOFT/cocos2d-x/tests/performance-tests/Classes/tests/PerformanceEventDispatcherTest.cpp
C++
cpp
29,955
permissive
// // PerformanceEventDispatcherTest.cpp // #include "PerformanceEventDispatcherTest.h" #include <algorithm> #include "Profile.h" USING_NS_CC; // Enable profiles for this file #undef CC_PROFILER_DISPLAY_TIMERS #define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers() #undef CC_PROFILER_PURGE_ALL...
cad28dd54cc9c29ca37b8921bd673ca5e3f1b628
34b78b20b395b4b33c13f192c1d328e3e9f3ad4a
hefen1/chromium
/components/autofill/core/browser/credit_card.cc
C++
cc
25,125
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/autofill/core/browser/credit_card.h" #include <stddef.h> #include <algorithm> #include <ostream> #include <string> #include "base/...
ce3cec8bc6e00b7e1b7811e0275273aabdef9d9f
d94be14cdfef5e1a1a4c7199cba7e4930a9052dc
bvchirkov/GpCore2
/RandomGenerators/GpRandom.hpp
C++
hpp
3,279
permissive
#pragma once #include "../GpCore_global.hpp" #if defined(GP_USE_RANDOM_GENERATORS) #include "../Multithreading/SyncPrimitives/GpSyncPrimitives.hpp" #include "../Types/Numerics/GpNumericOps.hpp" #include "../Types/Units/Numerics/GpUnitsNumerics.hpp" #include <random> #include <array> #include <type_traits> namespace...
bcfd5499db5df63e3b25543e00dd20bd1fdd208a
51496cdc0bd56ef4a884ffe23bb6ac22e6a29990
arukaminado/aiengine-2
/src/protocols/http/test_http.cc
C++
cc
69,882
no_license
/* * AIEngine a deep packet inspector reverse engineering engine. * * Copyright (C) 2013-2016 Luis Campo Giralte * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * versi...
102dc9fcaa6de3b883944c451c31908228b0477e
51aacff9170a85130b9cce6374a096767be8ce1a
ErikHurum/S2Prog
/Win/ANWIN/src/CTS_ReportUnit.cpp
C++
cpp
7,781
no_license
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "CTS_ReportUnit.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "LoadResultUserInputUnit" #pragma link "frxClass" #pragma li...
542efc1e6e7e5692daf2144badb3dce49084b1df
402004efc146f5000963f367e2e228a08d734759
Funncy/flutter_unity_test
/unity/MyFirstGame/Library/Il2cppBuildCache/iOS/il2cppOutput/UnityEngine.VehiclesModule.cpp
C++
cpp
39,365
no_license
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> // UnityEngine.Collider struct Collider_t5E81E43C2ECA0209A7C4528E84A632712D192B02; // System.String struct String_t; // System.Void struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70...
5ff3609039702299ec89745e14a47634a433f670
3241e5e393e06a7b6384f50fb34f6beaba275250
Anthima/Hack-CP-DSA
/Leetcode/N-Repeated Element in Size 2N Array/solution.cpp
C++
cpp
498
permissive
class Solution { public: int repeatedNTimes(vector<int>& nums) { int n=nums.size(), ans=0; //defining variables sort(nums.begin(),nums.end()); // sorted vector for easily finding repeated number for (int i=0;i<n;i++){ if(nums[i]==nums[i+1]) {ans...
885858e701a736a7fc888e40480c4500799177a7
d88e617850c8f05402d6e2b71c91a0c03b2e5232
hannes-steffenhagen-diffblue/cbmc
/unit/goto-programs/goto_model_function_type_consistency.cpp
C++
cpp
1,851
permissive
/*******************************************************************\ Module: Unit tests for goto_model::validate Author: Diffblue Ltd. \*******************************************************************/ #include <testing-utils/use_catch.h> #include <util/arith_tools.h> #include <goto-programs/goto_model.h> #in...
b39add9adc7ecb45cfe44a251cc1c70767df7402
13b2a2b6ca3aa789e229a17fafde374f429160ff
zbjxb/rastertek_study
/DirectX_Tutorials/DirectX_Tutorials/main.cpp
C++
cpp
673
permissive
//////////////////////////////////////////////////////////////////////////////// // Filename: main.cpp //////////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "systemclass.h" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmd...
02a74b91974e43eff8d5582d5e6fd08b45f3099c
42cc0d0e8a2764d8147e8159175a48e33e774ca0
Vaa3D/vaa3d_tools
/hackathon/linus/sort_neuron_swc_lmg/sort_plugin.cpp
C++
cpp
1,246
permissive
/* * sort_func.cpp * io functions for domenu and do func * * 2018-05-24 : by Linus Manubens Gil * adapted from 2012-02-01 : by Yinan Wan */ #include "v3d_message.h" #include "sort_plugin.h" #include "sort_func.h" Q_EXPORT_PLUGIN2(sort_neuron_swc_lmg, SORTPlugin); QStringList SORTPlugin::menulist() con...
7046ca5632bb6d956b10b433d7aa054f025a1d0b
06b69df638ccb57469c8b3facc8be83fe1e77aa1
codeteenager/lynx-native
/Core/base/rand_util.cc
C++
cc
375
permissive
#include "base/rand_util.h" #include <stdlib.h> #include <time.h> namespace base { void RandomBuffer(char* buffer, size_t length) { static bool seeded = false; if (!seeded) { seeded = true; // could fread from /dev/random srand((unsigned)time(NULL)); } size_t i; for (i = 0; i < length; i++) { ...
52dd88b7534cad2b7b1535431f06f573d1696f1b
f9431b03c05335d3cbeb3f4a42607cb293ed0efe
a-schaefers/clasp
/src/core/commandLineOptions.cc
C++
cc
9,739
no_license
/* File: commandLineOptions.cc */ /* Copyright (c) 2014, Christian E. Schafmeister CLASP is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any late...
4a8b852252845204a4b9b165b1a8a8579b832a80
6c115fde8d662937d5218e3a7c916a6788a29bed
Dream-Runner-Yu/LightSaber
/src/utils/AttributeType.cpp
C++
cpp
851
permissive
#include "AttributeType.h" using namespace std; const std::map<const BasicType, const std::string> AttributeType::m_typeNames({{BasicType::Integer, "int"}, {BasicType::Float, "float"}, {BasicType::Long, "long"}, {Basic...
46d8a7103478974a70556118d3940796478bea03
2428fdb23992424c4baa2da862550a1fa5170d95
roybertito/FinalProject2
/include/EnemyGun.hpp
C++
hpp
679
no_license
#ifndef FinalProject_EnemyGun_hpp #define FinalProject_EnemyGun_hpp #include "EnemyBullet.hpp" #include "PlayerShip.hpp" #include "cinder/app/AppBasic.h" #include "cinder/gl/gl.h" #include "cinder/ImageIo.h" #include "cinder/gl/Texture.h" #include <iostream> #include "Resources.h" #include <vector> using namespace ci...
c87a39fd33671347fec0dce85e78e1b1e8965265
ecf0f8b25418de5f9f718c826639cfbf8b79a308
satvik-2-9/Leetcode
/solutions/1105. Filling Bookcase Shelves.cpp
C++
cpp
806
no_license
class Solution { public:    int n;    int d;    int dp[2000];    int func(int s,vector<vector<int>>arr){        if(s==n)            return 0;        // cout<<"pop";        if(dp[s]!=-1)            return dp[s];        int curr=0,ans=INT_MAX,h=INT_MIN;        for(int i=s;i<n;i++){            curr+=arr[i][0];...
dbc2a26c69dd1086026841ac9e103cad9cd4b4be
61d182548dbd2a70f535497f150dc0434e711412
aurantst/windows-XP-SP1
/XPSP1/NT/com/ole32/cs/admin/ui/events.cpp
C++
cpp
5,819
no_license
// This is a part of the Microsoft Management Console. // Copyright (C) 1995-1996 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Management Console and related // electronic documentation provided with the interfaces. #include "precomp....
55f061208c837d6874b6dbcf5a72dece65dcc3ac
76400b1ec09bb454c78deb120ae820686eea917b
k8w/pixi-animate-extension
/src/ThirdParty/xerces/win/xerces-c-3.1.1/tests/src/DOM/Normalizer/Normalizer.cpp
C++
cpp
16,888
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...
2bd1704f289fb23f26d8ab9e1b2ac840c30cf2c2
8ee94b259d22c848ea47d820cec500132c126a8c
ttzztztz/leetcodeAlgorithms
/栈/1441. Build an Array With Stack Operations.cpp
C++
cpp
504
no_license
class Solution { public: vector<string> buildArray(vector<int>& target, int n) { vector<string> answer; int ptr = 0; for (int i = 1; i <= n; i++) { if (i == target[ptr]) { ptr++; answer.push_back("Push"); } else { answer...
7a95c5ce8af5cc78917b061879fccb4b0b0932b3
1daecb4ad34b55307320cffff19fbb255d9be0b2
db0company/Zia
/src/tools/baseexcept.cpp
C++
cpp
395
no_license
/* * baseexcept.cpp for zia * by lenorm_f */ #include "baseexcept.hpp" BaseExcept::BaseExcept(std::string const &s) { _error = s; } BaseExcept::BaseExcept(std::initializer_list<std::string> l) { int n; n = 0; for (auto i = begin(l); i != end(l); ++i, ++n) { if (n > 0) _error += " "; _error += *i; } }...
511dc4597bf3ecc67494a5ee07b736156af30d0b
b7b338db889a248d11ff8ccb701c6abbc8d79182
huangyt/MyProjects
/PPTVForWin8/base_1.2.2/include/boost/iostreams/filter/gzip.hpp
C++
hpp
20,794
no_license
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2003-2007 Jonathan Turkanis // 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.) // See http://www.boost.org/libs/iostreams for docume...
ca560f5139eba6af5c58707e933cb2bf495d7e66
d5eb905f4662718d0ac8128ec7c48bd6dc0306c1
sunnybouorm/Task_Tracker
/application/source/Core.cpp
C++
cpp
4,667
no_license
/* Date Created : 19/12/2014 * Author : Sultan Bou Orm */ #include "Core.h" using namespace std; using std::chrono::system_clock; Core::Core(){ tskmgr.attach_Link_Manager(lnkmgr); ctgmgr.attach_Link_Manager(lnkmgr); activeTask = &emptyTask; } /* * Converts time_t to UTC using gmtime and returns...
19fe161c6b9ffbd6f02576b16e26f75fd83ac7df
4c34bc2d2812175cb2e440c12482c0604335975f
t-bonds/comp3500
/project5/Tanner_Bonds_5.cpp
C++
cpp
7,820
no_license
// Please change the following into your name // #0#BEGIN# DO NOT MODIFIE THIS COMMENT LINE! // Tanner // Bonds // #0#END# DO NOT MODIFIE THIS COMMENT LINE! #include<iostream> using namespace std; #define MAXPROCESS 50 // max number of processes #define MAXRESOURCE 100 // max n...
60d0b698b82ca73869cf26173056c29cd0e3b750
74ea7ac6d98e7e1b0e9f4611545fa2173cf66c3b
Bonaparto/CPP-Codes
/nuopen/uu.cpp
C++
cpp
432
no_license
#include <iostream> using namespace std; int main(){ unsigned long long n, x, c, d; cin >> n >> x; if(n > x) cout << 1 << " " << 1; else if(n == x) cout << n << " " << n + 1; else if(n < x){ if(x % (n - 1) == 0) c = x / (n - 1); else c = x / (n - 1) + 1 ; if(x % (n - 1) == 0) d = x ...
ac1d53b40137d63b2df95cf024c9756b34799331
a473bd0f96a45788afff8bc80277d11687f4e757
lukemonaghan/YR02_00_AieFramework
/Source/Texture.cpp
C++
cpp
3,619
no_license
#include "Texture.h" #include <iostream> #include <GL\glew.h> #include <GLFW\glfw3.h> #include <string> Texture::Texture(const char *filename,int force_channels){ // loads a texture and returns just the OpenGL texture handle m_texture = SOIL_load_OGL_texture(filename,force_channels, SOIL_CREATE_NEW_ID, SOIL_FLAG_TEXT...
3fc0263aee03dcc53b8dd84e6f39731db0a8b69d
560aec64310173d8c190babe61c24f3d77841f2d
cvora23/CodingInterviewQ
/LinkedList/Operations/PairWiseSwap.cpp
C++
cpp
2,463
no_license
/* * PairWiseSwap.cpp * * Created on: Sep 7, 2013 * Author: cvora */ /* Program to pairwise swap elements in a given linked list */ #include<stdio.h> #include<stdlib.h> /* A linked list node */ struct node { int data; struct node *next; }; /*Function to swap two integers at addresses a and b */ void...
b987919da385859eec4cb291b87c0f5b68bd0405
e01d4019f9834322a3916aff00bdaa3dcecc4294
elliotchance/maven
/src/maven/keywords/func_keywordThrow.cpp
C++
cpp
742
no_license
/* * maven Programming Language * Created by Elliot Chance <elliot@chancemedia.com>. */ #include "maven.h" #include "struct_StringList.h" #include "struct_MavenCompiler.h" #include "scope.h" using namespace std; string keywordThrow(MavenCompiler* c, string line) { // throw is pretty simple, as long as you give...
dfb73525edf6d9cf8167305536e77a070c771db6
c91de8aaa75e655b803f8767c03190777b1f63ac
Alicetech/bobsgame
/lib/GWEN-master/gwen/Renderers/OpenGL/TruetypeFont/OpenGL_TruetypeFont.cpp
C++
cpp
2,116
permissive
#include <GL/glew.h> #include "Gwen/Renderers/OpenGL_TruetypeFont.h" #include "Gwen/Utility.h" #include "Gwen/Font.h" #include "Gwen/Texture.h" #include <math.h> #include <sstream> #include "font/font.hpp" // moon9::font is an abstraction for fontstash, //#include "font/font.cpp" // which is itself an abstraction f...
c784b7a7440fa78de3b1bde5366bddb2318a2dee
3beab092eff563056294e3d0aa913f6a1d80737c
hongjonghwa/algorithms
/ex/1809-editor/ver4-gap-buffer/main.cpp
C++
cpp
3,482
no_license
/* 힙 256M, 스택 1M, 시간 10초 */ // 횟수 10번? 100번? 100번으로 기억 #define TIME_LOOP 100 #define NN 1024*1024 //#define NN 1000 #include <stdio.h> #include <time.h> extern void create(); extern void put_char(char c); extern void put_enter(); extern void put_backspace(); extern void cursor_up(int i); extern void cur...
59cd667a59b640df9aebd5abe6a9a79899ae670a
aa76ea1c0af239a8b430e96f2a22280535329eaa
k-nuth/network
/include/kth/network/protocols/protocol_timer.hpp
C++
hpp
1,712
no_license
// Copyright (c) 2016-2023 Knuth Project developers. // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef KTH_NETWORK_PROTOCOL_TIMER_HPP #define KTH_NETWORK_PROTOCOL_TIMER_HPP #include <string> #include <kth/domain.hpp> #inc...
3a4f4b968202330b0ff49591cb406ffb7243bcb1
ad0eac50784bf9c69704d831691a5be4ca0a7dc9
theaudaxproject/audax
/src/test/wallet_tests.cpp
C++
cpp
14,491
permissive
// Copyright (c) 2012-2014 The Bitcoin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet/wallet.h" #include <set> #include <stdint.h> #include <utility> #include <vector> #include <boost/fore...
c04469f36c1cba69f009883db113c0bfd492fd80
8fc728931772589c048f9e86d9b6ecfecda71ff7
ci-group/gazebo
/test/integration/gz_log.cc
C++
cc
2,074
permissive
/* * Copyright (C) 2013-2015 Open Source Robotics Foundation * * 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...
fe03f35db8b6bd54b8f0518781d822e6ea737b40
db7c6fc9b2ffc76aac206daa7a8a127f4e97b2ea
eyobed7b/Data-Structure-example-codes
/02 doublyLinkedList.cpp
C++
cpp
3,628
no_license
#include <iostream> #include<conio.h> using namespace std; struct student{ int id; char name[20]; student *next; }; student *start_ptr = NULL; void b_add(){ student *temp,*temp2; temp=new student; cout<<"Enter the name: "; cin>>temp->name; cout<<"Enter the id: "; cin>>temp->id; if(start_ptr==...
5aac90c08bf954e3d5b52d9f238b6f3939644b5f
5ba587b50c0255fc8985d18b02d019fa4fbbb34f
drohmer/inf443_opengl_introduction
/attributes/attributes_interleaved/src/opengl_helper.cpp
C++
cpp
4,403
no_license
#include "opengl_helper.hpp" #include <vector> #include <iostream> #include <fstream> #include <cassert> // Read a file given by its path and return its content as a string static std::string read_file_text(const std::string& path) { // Open file with pointer at last position std::ifstream stream(path, std::...
6dab559bd1ff65d900c04bcb60d4928681ef98a1
276135d47d49b5d2784b3d25d624a5bc7b89b092
rohanamin291291/testdome
/TestDome Path/testdome_path.cpp
C++
cpp
3,179
no_license
#include <iostream> #include <string> #include <stack> #include <stdexcept> using namespace std; class Path { public: Path(std::string path) { currentPath = path; } std::string getPath() const { return currentPath; } Path cd(std::string newPath) const { ...
58c65221a11014892299cfe7b1dbb7382afe2948
0fa856d006539025f01e1657b5ae92fbbe0157d4
EnEff-BIM/EnEffBIM-Framework
/SimModel_Python_API/simmodel_swig/SimModel/framework/SimAppLibraryDefault.hxx
C++
hxx
12,388
permissive
// Copyright (c) 2005-2014 Code Synthesis Tools CC // // This program was generated by CodeSynthesis XSD, an XML Schema to // C++ data binding compiler. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Fre...
e8a33f3e3cdf876bc4cfa27173268575e33b8fbd
498ced049c32db8b5c63e51d926e8589b35e2aa9
niuxu18/logTracker-old
/second/download/collectd/gumtree/collectd_repos_function_1834_collectd-5.7.1.cpp
C++
cpp
1,209
no_license
static int clua_read(user_data_t *ud) /* {{{ */ { clua_callback_data_t *cb = ud->data; pthread_mutex_lock(&cb->lock); lua_State *L = cb->lua_state; int status = clua_load_callback(L, cb->callback_id); if (status != 0) { ERROR("Lua plugin: Unable to load callback \"%s\" (id %i).", cb->lua_func...
1a2995c9808ca8664040e6870e08f9631f7356ce
fd158c24b31bd45f00cd61750490fc0bafe868bf
bobverity/bobFunctionsEpi
/src/epi.cpp
C++
cpp
19,393
no_license
#include <Rcpp.h> #include "misc.h" #include "probability.h" #include "epi.h" using namespace std; //------------------------------------------------ // See R function of the same name (without _cpp) for details // [[Rcpp::export]] Rcpp::List SIS_stochastic_async_cpp(Rcpp::List args) { // convert input form...
e997c7fad8309140bab1df632f26d5015bf49f53
5165c724cbf7cdcf7cb8c2c360d53852fc33dfb1
codingbycoding/codingbycoding.github.io
/boost/boost_unit_test.cpp
C++
cpp
948
no_license
// #define BOOST_TEST_INCLUDED // #define BOOST_TEST_DYN_LINK //ÔËÐвÎÊý exe --build_info=yes --log_level=all --show_progress=yes --output_format=xml(hrf) #define BOOST_TEST_MAIN #include "boost/test/unit_test.hpp" #include "boost/smart_ptr/scoped_ptr.hpp" #include "boost/smart_ptr/weak_ptr.hpp" #include...
61d4b817cc75578b4a5f4a8c575858bdb1067981
e90e0383b9003251fdcf924c4c9d97656d374994
green-fox-academy/JKatalin
/week-02/day-2/15shopping-list2/main.cpp
C++
cpp
3,282
no_license
#include <iostream> #include <map> int main() { std::map<std::string, float> mapProduct; std::map<std::string, int> mapBob; std::map<std::string, int> mapAlice; mapProduct["Milk"] = 1.07; mapProduct["Rice"] = 1.59; mapProduct["Eggs"] = 3.14; mapProduct["Cheese"] = 12.60; mapProduct["Ch...
536354a66c3c6a73b5266b40e28ef16716a1b60d
33bb8fff456e108d0a479ee6bb4a272bb0296b9a
k08eYLx/intern
/SilentInstaller/SilentInstaller/BaiduYun.cpp
C++
cpp
7,989
no_license
// BaiduYun.cpp : implementation file // #include "stdafx.h" #include "SilentInstaller.h" #include "BaiduYun.h" #include "FileUtils.h" // BaiduYun IMPLEMENT_DYNAMIC(BaiduYun, CWnd) BaiduYun::BaiduYun() : PROCESS_NAME("baiduyun.exe"), APP_NAME("百度云"), EXIST_WIN_TITLE("百度云安装"), // 没有空格 I...
f49468ff4f636c4c7920c62d2ae8a09addeaa8f9
ff0df9edd97d2461804b8803ae8721751c6601b4
switchey321/XSEngine
/XSEngine/Core/InputHandler.cpp
C++
cpp
375
no_license
#include "../InputHandler.hpp" InputHandler::InputHandler(XSEngine* game) { _game = game; } void InputHandler::handle() { if (key[KEY_ESC]) { _game->close(); } if (key[KEY_SPACE]) { _game->getStack()->remove(); } if (key[KEY_ENTER]) { if (!_game->getStack()->isPaused()) _game->getStack()->pause(); ...
7aa4eafc2162cb5ed5ad922f56691f7e0484c928
9fa8e5db6fd8a3587f32bb926d827db1f756cf84
amenoyoya/old-project
/c/Haxe/OpenFL/01.HelloWorld/Export/windows/cpp/obj/src/lime/graphics/utils/ImageDataUtil.cpp
C++
cpp
70,305
permissive
#include <hxcpp.h> #ifndef INCLUDED_Std #include <Std.h> #endif #ifndef INCLUDED_haxe_Log #include <haxe/Log.h> #endif #ifndef INCLUDED_haxe_io_Bytes #include <haxe/io/Bytes.h> #endif #ifndef INCLUDED_hxMath #include <hxMath.h> #endif #ifndef INCLUDED_lime_graphics_Image #include <lime/graphics/Image.h>...
284475ebc4c4390dd027ac420ca2cfde5698a054
46dd867f43832abc863bf1d1b720441eab81aaee
v2v3v4/BigWorld-Engine-2.0.1
/src/lib/romp/glyph_reference_holder.hpp
C++
hpp
1,459
no_license
/****************************************************************************** BigWorld Technology Copyright BigWorld Pty, Ltd. All Rights Reserved. Commercial in confidence. WARNING: This computer program is protected by copyright law and international treaties. Unauthorized use, reproduction or distribution of thi...
3e1b7de1b86bd2937e1e549ab0c31c8d87254661
d3176cfe5f6390ed31285a2a51053b887804c313
yildiz-online/component-native-bullet
/src/main/c++/examples/OpenGLWindow/SimpleOpenGL3App.cpp
C++
cpp
36,162
permissive
#ifndef NO_OPENGL3 #include "SimpleOpenGL3App.h" #include "ShapeData.h" #ifdef BT_USE_EGL #include "EGLOpenGLWindow.h" #else #endif //BT_USE_EGL #ifdef B3_USE_GLFW #include "GLFWOpenGLWindow.h" #else #ifdef __APPLE__ #include "MacOpenGLWindow.h" #else #ifdef _WIN32 #include "Win32OpenGLWindow.h" #else //let's cros...
ae146a0bc31a68e695c3204a8b807d0aef28d899
604fa61402d1643545ec605303ecfe14d9f8e8ea
foolcodemonkey/chromium
/components/password_manager/core/browser/password_store.cc
C++
cc
50,888
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/password_manager/core/browser/password_store.h" #include <algorithm> #include <iterator> #include <memory> #include <utility> #incl...
766210a29b7cd9c894eefd8baf1393149cc871ee
9f932dc23a3781e4b3b71cacd8393d7a22c0cf0d
smeenai/llvm-project
/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp
C++
cpp
994
permissive
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
8bbb0c8ddf9ad2677b261681f42feb2e709d593a
56cdaddd25ccb719c6baae7225c17e0067a77ca2
Nipun4338/Solved-Programming-Problems
/CodeForces/219/a/64728863.cpp
C++
cpp
1,999
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const ll inf = 1e9; const ll mod = 1e9 + 7; const double eps = 1e-8; const ll MAX = 1e7 + 20; #define fast ios_base:: sync_with_stdio( false ); cin.tie(0); cout.tie(0); #define eb emplace_back #define em ...
54df31f543b4eefb23a28a99849b44b9e632f158
b7c87d04d4067abcbc50107915f3cb9dc7b2f0e2
coughs/cwb
/Study/coduck/k1-15/g.cpp
C++
cpp
220
no_license
#include<iostream> using namespace std; int main () { int n,m,b=0; cin>>n; int a[n]; for(int i=1;i<=n;i++){ cin>>a[i-1]; } cin>>m; for(int i=0;i<n;i++){ if(a[i]==m){ b++; } } cout<<b; return 0; }
0c328826b3cecdb0dfe8a06ceec396eb2a1fb408
4655dd61e55973e8d7271278df55ff976c8cdf53
smmzhang/EasyBlocks
/src/simplevariable.cpp
C++
cpp
1,162
no_license
#include "simplevariable.h" #include "numbervalue.h" #include "stringvalue.h" #include "booleanvalue.h" SimpleVariable::SimpleVariable(QString name, Value::DataType type, bool locked) : _name(name), _dataType(type), _locked(locked) { if (type == Value::NUMBER) _value = new NumberValue(0.0); else if (t...
e823fb33a158eb9eb7aa296627634cf5cf19f519
5c9ab6d7e2730ec1a0c6288623fdb6079257ae6f
yair-k/Win2000SRC
/private/shell/cplwiz/magnify/mag_hook/mag_hook.cpp
C++
cpp
15,053
no_license
// -------------------------------------------------------------------------- // // Mag_Hook.cpp // // Accessibility Event trapper for ScreenX. Uses an in-context WinEvent // hook to tell the applet where to magnify. // // Mainly what we want this to do is to watch for focus changes, caret // movement, and mouse p...
528128351037e9d7f65a58d2855f81b8a0a5f389
69988e822fd98cf2536bb60680ed1a00c538a944
Lenadros/ue4shooter
/ProjectDurian/Game/ZGameInstance.cpp
C++
cpp
1,895
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "ProjectDurian.h" #include "ZGameInstance.h" UZGameInstance::UZGameInstance(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { UE_LOG(LogTemp, Log, TEXT("Constructed game instance!")); } AZGa...
314d25d9104657e59a448cc020e040ecb72d79f4
4ae1df136ea276f188cfe571e7300138944ad52e
OpusV/AstroMechanics
/include/mantella_bits/optimisationProblem/blackBoxOptimisationBenchmark/gallaghersGaussian21hiPeaksFunction.hpp
C++
hpp
644
permissive
#pragma once // Armadillo #include <armadillo> // Mantella #include "mantella_bits/optimisationProblem/blackBoxOptimisationBenchmark.hpp" namespace mant { namespace bbob { class GallaghersGaussian21hiPeaksFunction : public BlackBoxOptimisationBenchmark { public: explicit GallaghersGaussian21hiPeaksF...
a3fcd308079a202c96f06dd3abb69c4f32bb071e
3536ab3a55f49eebc5d040dd106695570debceb9
Moodax/4provjera-vjezba
/main.cpp
C++
cpp
4,578
no_license
#include <iostream> #include<math.h> #include<algorithm> #include<string> #include<utility> #include<numeric> using namespace std; struct sortiranje{ unsigned long long int brracuna1; string ime1; double saldo1; }; bool isort(sortiranje a,sortiranje b) { if(a.ime1>b.ime1) return true; return...
5d39d8ec7e25f84d3b7c26d35d53638a48ba080c
9c1dcadd176fe5aa2f4f39f90aae20ff527b8b9f
sc2ad/BeatSaber-Quest-Codegen
/include/Newtonsoft/Json/Linq/JRaw.hpp
C++
hpp
4,825
permissive
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: Newtonsoft.Json.Linq.JValue ...
dc97f637ce71cc24d2c0132fe2e163e0205e280e
62ee308de2decd5513cd3aac844d589839d2d4a7
HsuChiChen/cpp-first
/hw25.cpp
C++
cpp
1,119
no_license
//影片P117 //const修飾成員函數 #include <iostream> using namespace std; class person{ public: person(int a, int b){ m_A = a; m_B = b; } //this指針的本質是指針常量,指針的指向是不可以修改的 //person * const this; //void show_person() { //const person * const this; //在成員函數後面加const,修飾的是this指向,讓指針指向的值也不能修改...
c67e568b5eeacfc27e5105a4270c8b929b5b18d2
237d1ef115090c060815a3683b03e71e94c37af4
iridium-browser/iridium-browser
/buildtools/third_party/libc++/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp
C++
cpp
4,490
permissive
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
dacca7f117a1801c043bd8709ba45c671648e6ef
1630d97b18a9ed1bb1f291a30d5c32a9899de0d9
yoshi5534/schorsch-the-robot
/src/Control2012/libreoffice/com/sun/star/awt/XKeyHandler.hpp
C++
hpp
1,681
no_license
#ifndef INCLUDED_COM_SUN_STAR_AWT_XKEYHANDLER_HPP #define INCLUDED_COM_SUN_STAR_AWT_XKEYHANDLER_HPP #include "sal/config.h" #include "com/sun/star/awt/XKeyHandler.hdl" #include "com/sun/star/awt/KeyEvent.hpp" #include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/lang/XEventListener.hpp" #include "c...
3dee7d4116c0949061ad283b3167870d45c673b9
d80a591ee905884005d0bd396ae7c82cdf5c0acc
mbits-os/libremote
/src/signals_win32.cpp
C++
cpp
6,894
no_license
/* * Copyright (C) 2013 midnightBITS * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, pub...
c6cee8a65241f1c2607460aa457c3633187858f7
cb4f0f2e9976c9b2067d269ea225332ac9920e09
rzr/chromium-crosswalk
/chrome/browser/sync_file_system/local/local_file_sync_service.cc
C++
cc
17,926
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/sync_file_system/local/local_file_sync_service.h" #include "base/single_thread_task_runner.h" #include "base/stl_util.h" #includ...
ab679f69209d230ff8420d9a4977502281608faa
7ab04bbc8a32302ae1675be3d86193538f9e6047
hpullen/DPhil_B02DKstar_analysis
/Toy_studies/src/plotPulls.cpp
C++
cpp
7,939
no_license
#include <iostream> #include "TCanvas.h" #include "TChain.h" #include "TCut.h" #include "TPad.h" #include "TF1.h" #include "TFile.h" #include "TH1F.h" #include "TIterator.h" #include "TStyle.h" #include "RooArgList.h" #include "RooFitResult.h" #include "RooGaussian.h" #include "RooRealVar.h" #include "PlotStyle.hpp"...
b24a9773483bdb147ecd8c472fd948d0447e9b80
79814118eb6a866cf2c0fc92fd9a8e2f6aba93fc
Cindia-blue/openair-cn-lixh
/src/hss_rel14/src/s6t_impl.cpp
C++
cpp
26,963
permissive
/* * Copyright (c) 2017 Sprint * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,...
693d85c714cc9a9a51d6a934257e646658eb5a62
4650e25039b658269e79040e20a468ef62a828b6
copernicus231/gatempi
/source/physics/src/GatePhysicsListMessenger.cc
C++
cc
10,923
no_license
/*---------------------- GATE version name: gate_v6 Copyright (C): OpenGATE Collaboration This software is distributed under the terms of the GNU Lesser General Public Licence (LGPL) See GATE/LICENSE.txt for further details ----------------------*/ #ifndef GATEPHYSICSLISTMESSENGER_CC #define GATEPHYSI...
ff61ef52a905ddb7ca88744e1570d6e96199b39d
468be19c6d158077d6bc6d0c0e2baf49f1d0c0af
handsomeprince/PUBG-SDK-3
/SDK/PUBG_AnimationCore_structs.hpp
C++
hpp
6,120
no_license
#pragma once // PlayerUnknown's Battlegrounds (2.6.23) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "PUBG_Basic.hpp" #include "PUBG_CoreUObject_classes.hpp" namespace Classes { //--------------------------------------------------------------------------- //Script Structs //--------------------------...
9a3b61cf0171399620c6a9fcb0b450ecbeaffd47
9d086c1080b1050d657d43312505734783b69bfd
AndreyFerral/lab20
/lab6/lab6.cpp
C++
cpp
2,479
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; void OutputEl(int a) { cout << a << " "; } int main() { setlocale(LC_ALL, "ru"); int intersect = 0; vector<int> Intersect; vector<int> MyVector = { 1, 1, 1, 3, 3, 1, 2, 1, 2, 3, 4, 1, 5, 1, 5, 3, 7, 1 }; cout...
0467785709a271a02151ed766ebd7dbbcfb0c21e
d72c23a1a635f8afc23c65ec3c52f354f2fecc60
jdoolittle126/Cube-Game
/src/Managers/FontManager.cpp
C++
cpp
516
no_license
#include "FontManager.h" FT_Face FontManager::build_font(std::string font_loc) { FT_Face face; if(FT_New_Face(ft, font_loc.c_str(), 0, &face)) log_error(ERROR_FREETYPE_FONT_OPEN); return face; } void FontManager::create_font(std::string reference_name, std::string font_loc) { fonts.insert(std::pair<std::string, F...
ced39292138809cc5369c4f080cfdc52d6969a55
c61617bd18e5101901397e8b5a51f2873edcaaeb
chncwang/mindspore
/mindspore/lite/tools/optimizer/fusion/sigmoid_mul_fusion.cc
C++
cc
2,389
permissive
/** * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
bdf2d14ba91d20eb6ead0a54494b3c0e0cddb13a
3853bce6b019d468d199b1e20926e2029950255c
Mu2e/Offline
/Mu2eG4/src/Mu2eG4GlobalMagneticField.cc
C++
cc
2,047
permissive
// // G4 interface to the Detector Solenoid full magnetic field. // // // Original author Julie Managan and Bob Bernstein // Major rewrite by Rob Kutschke at version 1.4 // C++ includes //#include <cmath> #include <iostream> // Mu2e includes. #include "Offline/Mu2eG4/inc/Mu2eG4GlobalMagneticField.hh" #include "Offlin...
ab8038c525f78eda253a95db0915e068719131cc
4fdcca3d186ece299b90c00219785b6eb18347ca
ahojcn/code-linux
/LinuxCode/thread/practice/5-原子操作.cc
C++
cc
849
no_license
// 销售火车票 #include <unistd.h> #include <iostream> #include <thread> #include <atomic> std::atomic<int> ticket(10); // 每个窗口都执行的售票操作,假设每个窗口每次只卖出 1 张 void SellTicket(const std::string& id); int main() { // 有 3 个售票窗口在售票 std::thread t1(SellTicket, "窗口1"); std::thread t2(SellTicket, "窗口1"); std::thread t3(S...
d3cdf5cc1c58fd79caad5963fb3154fdae75ea99
6c93d2815cfe6fca1db8982c64bc7a681f1c2cde
osmansajid/Contest-Problems
/SPOJ/AIBOHP/8953561_AC_1170ms_161792kB.cpp
C++
cpp
664
no_license
#include<bits/stdc++.h> using namespace std; string a,b; int dp[6110][6110]; int LCS(int i,int j) { if(i==a.size() || j==b.size()){ return 0; } if(dp[i][j]!=-1){ return dp[i][j]; } int res1=0,res2=0,res3=0; if(a[i]!=b[j]){ res1=LCS(i,j+1); res2=LCS(i+1,j); ...
4fdd865ecd92c88f31510056319cd5a747a3124d
cd196ab85dade75282875fb47f5ff08fd70005e2
alex566/Sample
/Sample/Externals/Ogre3D/OgreMain/src/OgreLodStrategy.cpp
C++
cpp
4,858
permissive
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2014 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person ...