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
20d00a8b06485f6132e1c75db4546969c1b30210
70c42401593724ea844bf42eb3e106d18390900d
linguoliang/learning
/data_strcture_and_algorithms/algorithms/sort/src/shell.cc
C++
cc
347
no_license
#include "shell.h" void shell_sort(int arr[], int n) { // using shell gap sequence for (int gap = n; gap > 0; gap /= 2) { for (int i = gap; i != n; ++i) { int cur_val = arr[i]; int j; for (j = i; j >= gap && arr[j - gap] > cur_val; j -= gap) { arr[j] = arr[j - gap]; } arr...
ff27471e2add0991e5f4ba2e76d46f394b2d14d8
134b88dff3f9f6e7354c78260440b51287f9b172
aurantst/windows-XP-SP1
/XPSP1/NT/inetsrv/iis/iisrearc/core/common/util/lkrhash.cpp
C++
cpp
157,831
no_license
/*++ Copyright (c) 1998-2001 Microsoft Corporation Module Name : LKRhash.cpp Abstract: Implements LKRhash: a fast, scalable, cache- and MP-friendly hash table Author: Paul (Per-Ake) Larson, palarson@microsoft.com, July 1997 Murali R. Krishnan (MuraliK) ...
203e7dad17edb2ae947a89f1f960721d5027c311
99093e81c2ca213c06d281f14e52160f528d5ae3
xhyangxianjun/Builder6-program
/REC/HRD_220A/Motion/FormSPC.cpp
C++
cpp
5,680
no_license
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "FormSPC.h" #include "LotUnit.h" #include "SPCUnit.h" #include "UserFile.h" #include "DataMan.h" #include "OptionMan.h" #include "SPCUnit.h" //--------------------------------------------------------...
d1723e8e6d2c583d6cafe824e4796db7da36cf5c
d1299dfd3ced80ddeb45247eaf54dd493d094c9d
jhmwalters/compute-runtime
/opencl/test/unit_test/command_queue/enqueue_copy_image_to_buffer_tests.cpp
C++
cpp
16,158
permissive
/* * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "opencl/source/built_ins/builtins_dispatch_builder.h" #include "opencl/test/unit_test/command_queue/enqueue_copy_image_to_buffer_fixture.h" #include "opencl/test/unit_test/fixtures/one_mip_level_image_fixture.h" #include...
225ccaada45f17153a85f22a79a9f02da579ea05
dc816dbc312adcde3e7f1d1534744282061f02cc
samanseifi/Tahoe
/tahoe/src/elements/particle/potentials/PairPropertyT.cpp
C++
cpp
454
permissive
/* $Id: PairPropertyT.cpp,v 1.5 2011/12/01 21:11:39 bcyansfn Exp $ */ #include "PairPropertyT.h" #include <cstddef> using namespace Tahoe; /* constructor */ PairPropertyT::PairPropertyT(void) { SetName("pair_property"); } /* return Paradyn-style coefficients table */ bool PairPropertyT::getParadynTable(const double...
116a8996463195f7a794139d1ff0d4d85e86a0a7
b0acf51d2fbf041876a159af00a46ca65d3e2a9b
Mario-projects-dev/OpenGLProject
/OpenGLProject.cpp
C++
cpp
4,870
no_license
// OpenGLProject.cpp : Defines the entry point for the application. // #include "framework.h" #include "OpenGLProject.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance WCHAR szTitle[MAX_LOADSTRING]; // The title bar text WCHAR szWi...
2649053529cb71be47fbf11f410be27a0fb93bdf
9abc585249f705b0e61ec7ddff3868cf2109744c
totto82/opm-porsol
/opm/porsol/twophase2/OPMIRISCode/SFCapPress.cpp
C++
cpp
13,613
no_license
/* Copyright 2011 IRIS - International Research Institute of Stavanger. This file is part of the Open Porous Media project (OPM). OPM 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...
aa800f867f3268c4b333de3d95dae9644be2fbcf
625dc06bf57f07ceae47eb787945c9fa20ff005f
unjambonakap/opa
/glib/glib/platform/tracing.cc
C++
cc
2,938
no_license
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
b70444bf50ac316b0c24fd4ad3691b096d9b410b
755c829d4291e638a7a303f3c5ef1126c82f0ca0
PandeYogam/OldCode
/C++/rekrusif Faktorial.cpp
C++
cpp
346
no_license
#include <iostream> using namespace std; int faktorial(int n); int main(){ int angka; cout<<"masukkan bilangan : "; cin>>angka; cout<<faktorial(angka)<<"\n"; system("pause"); return 0; } int faktorial(int n){ if(n==1){ cout<<n<<"\n"; return n; } else{ cout<<n<<" * "; return ...
2d714cc5e1d904f48c8d0263ef55c580fd3cea2b
5ca907d05920d2d20cb7bfa93e39b92f251c6dd6
dlotko/SComplex
/test/unit/SComplexColorTest.cpp
C++
cpp
3,439
no_license
#include <iostream> using namespace std; #include <redHom/complex/scomplex/SComplex.hpp> #include <redHom/complex/scomplex/SComplexDefaultTraits.hpp> #include <boost/test/unit_test.hpp> #include <boost/bind.hpp> #include <boost/lambda/lambda.hpp> #include <boost/assign/list_of.hpp> #include <algorithm> using names...
46fa5e16dc73235a8e554a8aeef75f403938628b
9ae866f6abff7da05ca89caceebf533e23cf7790
ChenQL6/chenql2
/0414实验1/0414实验1/0414实验1.cpp
C++
cpp
4,666
no_license
// 0414实验1.cpp : 定义应用程序的类行为。 // #include "stdafx.h" #include "afxwinappex.h" #include "afxdialogex.h" #include "0414实验1.h" #include "MainFrm.h" #include "0414实验1Doc.h" #include "0414实验1View.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CMy0414实验1App BEGIN_MESSAGE_MAP(CMy0414实验1App, CWinApp) ON_COMMAND(ID_APP...
c415951fcbe979ae967e514da69e0bdd93bbc90c
f7da46b628c0b8d8f2809f00327da34827f9b947
TeeWorlds-org/Hunt
/src/game/client/components/controls.cpp
C++
cpp
8,031
permissive
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ #include <base/math.h> #include <engine/shared/config.h> #include <game/collision.h> #include <game/client/gameclient.h> #incl...
3a7fd32b7f6b801a12375f0a5264799e20551aa3
a2b4733fe065408bccf9fc9ca79e220d648acd75
ubaidh/Recursion
/03_gcd.cpp
C++
cpp
267
no_license
#include<iostream> //Using Recursive Euclid Algorithm for gcd int gcd(int x, int y){ if (y == 0) return x; else return gcd(y, x % y); } int main(){ int a,b; std::cout<<"enter a and b"<<std::endl; std::cin>>a>>b; std::cout<<gcd(a,b); return 0; }
3139eec3191765daee1c38ea7f63e1f73a5f78d9
ff4e97b6d6ad2ec28bd09937b14939a78c6b8766
OBSchofieldUK/gorobots_edu
/utils/sim_robots/millipede/millipede.cpp
C++
cpp
40,477
no_license
/*************************************************************************** * Copyright (C) 2012 by * * Martin Biehl <mab@physik3.gwdg.de> * * Guillaume de Chambrier <s0672742@sms.ed.ac.uk> * * martiu...
644655ab29be51834bb6447ae11c5655706f0037
b174025da994538eebd5271f4416a21cb4cb9bb9
KDSBest/service-fabric
/src/prod/src/data/tstore/Store.Backup.Test.cpp
C++
cpp
11,192
permissive
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ #include "stdafx.h" #include ...
0f45a30b4b0660a1c8ac2e9cc4bba4caf76ad2ce
390411050b14715a7f3e60e2571f4102350a2d61
saqar/Edge-of-Chaos
/src/scripts/src/SpellHandlers/PriestSpells.cpp
C++
cpp
8,319
no_license
/* * ArcScript Scripts for Arcemu MMORPG Server * Copyright (C) 2008-2009 Arcemu Team * Copyright (C) 2007 Moon++ <http://www.moonplusplus.com/> * * 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 Softwa...
7a3cfd02240fae7968d84dc761cfd7d7fcd66680
8c65227a8547111b4e3d4a4fe269c98e36e6e929
ZeyNat/VIRSU
/jouer.cpp
C++
cpp
3,180
no_license
#include <iostream> #include <assert.h> //pour tester nos fcts #include <fstream> #include "Teaupla.hpp" #include "Oueurj.hpp" #include "Streumon.hpp" using namespace std; /*Pour lancer une partie*/ int main(int argc, char **argv) { if(argc < 2) { cout << "Veuillez donner un fichier game" << endl; cout ...
83ae3052c2b09ad9529e2fea491dc6a5ad756083
5a883306428853c1c09762c133b9fbdcc02a2dba
ujjwalgulecha/Coding
/Codechef/chefdoublestring.cpp
C++
cpp
730
permissive
<<<<<<< HEAD #include<iostream> using namespace std; int main() { long long int x; int n; cin>>n; while(n--) { cin>>x; if(x==1) cout<<"0"<<endl; if(x%2==0) { cout<<x<<endl; } else { cout<<x-1<<endl; }...
4364a0498f5ba61f5a1ddce95abafa35461da989
fe846ba1a32091448d2cdd7882905fbace991ec1
OggYiu/rag-engine
/libs/all/boost_1_56_0/libs/geometry/test/test_geometries/wrapped_boost_array.hpp
C++
hpp
4,124
permissive
// Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test // Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LIC...
2315519c9b9b562113282045db6f405602e743e5
7c6f4b903a36ebf3fbf0938a40eee30ce5b16698
AnneLivia/Competitive-Programming
/Data Structures/Queue/Dynamic Queue (Implemented With Struct)/main.cpp
C++
cpp
791
permissive
#include <iostream> #include "dynamic_queue.h" using namespace std; int main() { Queue *q = create_queue(); if(isEmpty(q)) cout << "The queue is empty\n"; else cout << "The queue is not empty\n"; for ( int i = 1; i <= 10; i++) { push(q,i); } cout << "Queue size: " <<...
84875b4d4b8ad8251b535571772d9c8967e806b8
5d43692c2c748eff2ed4dcf50f9dd6967514c14d
oyesam7/swift
/lib/Index/Index.cpp
C++
cpp
50,954
permissive
//===--- Index.cpp --------------------------------------------------------===// // // 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...
c5c63dd9a63bacdcacd738bbc9cf7f6621c3fbfa
20e59aeaf40a862bb4cdcf18257c08f69ab88b42
mzxdream/PatchBasedInpainting
/Visitors/DescriptorVisitors/ImagePatchVectorizedIndicesVisitor.hpp
C++
hpp
3,789
permissive
/*========================================================================= * * Copyright David Doria 2012 daviddoria@gmail.com * * 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 * *...
a13c2928c2aac036a27c8d786e8055e8c528867a
626441b66d794219067def51153022e04fe1f22d
cran/BayesXsrc
/src/bayesxsrc/bib/statmat.cpp
C++
cpp
36,115
no_license
/* BayesX - Software for Bayesian Inference in Structured Additive Regression Models. Copyright (C) 2019 Christiane Belitz, Andreas Brezger, Nadja Klein, Thomas Kneib, Stefan Lang, Nikolaus Umlauf This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ...
8328a686e7e0be9a7625d6edbe89659835c19169
4fd51832acb8f338114f4586aa29dbaa0668396b
SiChiTong/Custom-Flight-Controller
/Matlab Simulation/IMU_9DOF/myMPU9250.cpp
C++
cpp
117,441
no_license
// I2Cdev library collection - MPU9250 I2C device class // Based on InvenSense MPU-9250 register map document rev. 2.0, 5/19/2011 (RM-MPU-6000A-00) // 8/24/2011 by Jeff Rowberg <jeff@rowberg.net> // Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib // // Changelog: // ... - ong...
b2c2312fd1cff2a7fa80e393f2f4ed07a461fc34
bccd90f5086a395dc0a36af7cba72817627b4a64
SJTU-IPADS/reef-artifacts
/reef-env/hip/tests/src/runtimeApi/module/hipOpenCLCOTest.cpp
C++
cpp
7,574
permissive
/* Copyright (c) 2020 Advanced Micro Devices, Inc. All rights reserved. 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, mo...
29501f209818e600acfa2d22cbfc936b1ad426e0
baecf34899295bdd1d1a30434a05f9d9a41e2826
ranalli/BHGMission
/Mission/Scripts/Trader_Items/Category/BlackMarketOther.hpp
C++
hpp
2,641
no_license
class Category_10000 { class ItemKiloHemp { type = "trade_items"; buy[] ={5000,"Dollars"}; sell[] ={5000,"Dollars"}; }; class vil_Panzerfaust3 { type = "trade_weapons"; buy[] = {900000,"Dollars"}; sell[] = {100000,"Dollars"}; }; class vilas_rpg26 { type = "trade_weapons"; buy[] = {90...
63160c486fafb55246d6059bb1e4a2f5b8399918
8ad57686fe3a8c6c3e0cf1b66489d502855ba71f
AltairQ/writeups
/Teaser CONFidence CTF 2019/Game server/brute.cpp
C++
cpp
2,559
no_license
#include <iostream> #include <string> #include <stdlib.h> #include <stdio.h> #include <stdint.h> typedef uint64_t QWORD; // QWORD = unsigned 64 bit value typedef uint32_t DWORD; // DWORD = unsigned 32 bit value typedef uint16_t WORD; // WORD = unsigned 16 bit value typedef uint8_t BYTE; // BYTE = unsigned...
eb897d40b09a87839acc369c1b1bc9eeb7e9397e
8ca5131abbf4ea2f44b445a62f3b602f9a58e0e7
maxulan/ClickHouse
/dbms/src/Functions/URL/registerFunctionsURL.cpp
C++
cpp
1,126
permissive
#include "registerFunctionsURL.h" namespace DB { void registerFunctionsURL(FunctionFactory & factory) { registerFunctionProtocol(factory); registerFunctionDomain(factory); registerFunctionDomainWithoutWWW(factory); registerFunctionFirstSignificantSubdomain(factory); registerFunctionTopLevelDomain(...
a9fc87c54d188ffc4138d61b5fe1a9239619b418
46aa4d3ebceff3a4fb6fd7bfa4ae7d725756854b
laurent-xu/proceCUDA-generator
/src/compilation/DotVisitor.cc
C++
cc
3,282
permissive
#include <compilation/DotVisitor.hh> namespace { std::string instantiate_node(Node& n, const std::vector<std::string>& params = {}) { auto result = n.output_name + "[shape=rect " "label=<<B>" + n.output_name + "</B><br/>"; for (auto& param: p...
9eb73e555bf8805964d11db7ca0fc88e763026dd
dff87d1c15dce63e8507935130a7e720a4c8aa84
zhangkom/MIOpen
/test/activation.cpp
C++
cpp
9,571
permissive
/******************************************************************************* * * MIT License * * Copyright (c) 2017 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * ...
a5f3074206b7199b2041a8c5e90f34cc936baa66
bcce17f3ea1f393634a6df2e6e97b2dae60d802e
Pederovski/RayTracer
/header/Scene.cpp
C++
cpp
5,209
no_license
#include "Scene.h" #define _USE_MATH_DEFINES #include <math.h> Color Scene::triangleIntersection(Ray& ray) { float minT = NOT_FOUND; Color pointSurfaceColor; Direction intersectionNormal; //Loopar alla trianglar i listan och kallar på rayintersection(ray) for (int i = 0; i < triangleList.size(); i++) { float ...
ce6e027bf2c33b0bed8945c6cc1bacaa3666ced7
9fe259a1a64f56e191b8a7e12f441d7a50fb97af
red-rick/CFundamentals
/Chapter_3/Exercise_4/main.cpp
C++
cpp
832
no_license
#include<iostream> #include<conio.h> long double percentsOfWorldPopulation( const long long&, const long long&); int main() { using namespace std; long long theUSAPopulation, worldPopulation; cout << "Enter the world's population: "; cin >> worldPopulation; cout << "Enter the population of the US: "; cin >> t...
05932c8d083b7ad14eceb3ff3e7aadcc5704e50f
f5cd4ee2cec2f25a16a834f8958cd6f5a550b91b
PFLab-OS/Toshokan
/sample_old/paging/021/friend.cc
C++
cc
744
no_license
#include "app.h" #include "common.h" void show_i(F2H &f2h, int i) { char mes[] = "i=0"; mes[2] += i; puts(f2h, mes); } int main() { F2H f2h; puts(f2h, "hello!"); extern uint8_t _binary_app1_start[]; extern uint8_t _binary_app1_size[]; memcpy((void *)0x400000UL, (const void *)_binary_app1_start, ...
1eacd5b9b952b7e50fcd0a91cfe31df8b6373283
d07484e542d722eceebd4d0526d469b211400c81
VishWas-13/All-progs
/CIRCUL~1.CPP
C++
cpp
2,490
no_license
#include<iostream.h> #include<conio.h> #define MAX 5 class Circular_Queue { private: int *cqueue_arr; int front, rear; public: Circular_Queue() { cqueue_arr = new int [MAX]; rear = front = -1; } /* * Insert into Circular Queue */ void insert(int item) { if ((front == 0...
c6e0fe19912852ecf2a972e674e2af04ea8ce217
f97f0ae8631278a79f8597dde00c1633d2617fb4
00mjk/staq
/include/tools/ast_printer.hpp
C++
hpp
6,035
permissive
/* * This file is part of staq. * * Copyright (c) 2019 - 2021 softwareQ Inc. All rights reserved. * * MIT License * * 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 restrictio...
c680443336a4ebebe4d7aa9bfb03ed2a39a0c410
05f24512ef2a0c209b9f30168dfd087c0542b169
Outshynd/SoT-SDK-1
/SDK/SoT_BP_gmp_fishing_rod_pio_01_b_ItemDesc_classes.hpp
C++
hpp
810
no_license
#pragma once // Sea of Thieves (1.4.16) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_BP_gmp_fishing_rod_pio_01_b_ItemDesc_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //------------------------------------------------------...
14dffc0da9b717f2a4c784a2ae412caf7300c94d
93c338a37445ffe552d0e1d93c05d79e29910414
hackovh/-
/src/sdktools/xsi/5.1/VMFImport/BrushConverter.cpp
C++
cpp
4,881
no_license
// BrushConverter.cpp: implementation of the CBrushConverter class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "BrushConverter.h" #include "VMFUtils.h" vec3_t vec3_origin = {0,0,0}; ////////////////////////////////////////////////////////////////////// // C...
c80bec3f4dc1e6e0cda5083dbed4e97ceda12fb1
c1d1f149688f7e6dce16cdaf6304c4113d7b47c8
cms-nanoAOD/cmssw
/L1Trigger/CSCTriggerPrimitives/src/CSCCathodeLCTProcessor.cc
C++
cc
65,482
permissive
#include "L1Trigger/CSCTriggerPrimitives/interface/CSCCathodeLCTProcessor.h" #include "L1Trigger/CSCTriggerPrimitives/interface/CSCLCTTools.h" #include <iomanip> #include <iostream> #include <memory> // Default values of configuration parameters. const unsigned int CSCCathodeLCTProcessor::def_fifo_tbins = 12; const u...
a65ac235f8a79ca17988889c28745a5d33262be3
aae65748d2b5a6ad2361e495f5f97ef2a174aa86
Himan2104/LEARNSFML
/LEARNSFML/MainApplication.cpp
C++
cpp
992
no_license
#include "MainApplication.hpp" #include"MainMenu.hpp" #include"Game.hpp" MainApplication::MainApplication() { window.create(Vmode, "Pomg"); window.setFramerateLimit(frameRate); dt = 0; StateID = 0; prevState = 0; changeState(); } MainApplication::~MainApplication() { } void MainApplication::run() { while (wi...
81a9657cc946546777212b0f652ef6fd1c21ec0d
2e2bca9afcf3cbc07e4859ab2cd45de0433793bf
mitsutaka-takeda/cmcstl2
/test/algorithm/set_symmetric_difference5.cpp
C++
cpp
2,306
permissive
// Range v3 library // // Copyright Eric Niebler 2014 // // Use, modification and distribution is subject to 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) // // Project home: https://github.com/ericniebler/range-v3 // #inc...
95aa2bc0d84e9aed195e32ed1259a1271968c5ce
295c84840b5a7cf4ba0b22fefd4ff921b267efc8
xtblock/chromium
/chromeos/components/eche_app_ui/eche_connector.cc
C++
cc
2,802
permissive
// Copyright 2021 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 "chromeos/components/eche_app_ui/eche_connector.h" #include "chromeos/components/multidevice/logging/logging.h" #include "chromeos/components/mu...
207bd80b04287b96e037d645a16414d045a3adbe
ef61d541998e262669753c3f665af3d60d1a9a6c
aviettry/My-Competition
/src/MyCompetition.cpp
C++
cpp
590
no_license
/** * Filename: MyCompetition.cpp * Authors: Ali Viettry, Martin Hung * Description: This is the main driver for the program. It will take in two * arguments, the file that it will read all the data records * from and the file that it will write its new set of data records * ...
07327aabf1ad6b6dfadafab62edd0ab17bef33c6
023949d1322b14b8b22fa9f827294c670b192492
seyedaminhabibi/sift_hls
/solution1/.autopilot/db/hls_design_meta.cpp
C++
cpp
936
no_license
#include "hls_design_meta.h" const Port_Property HLS_Design_Meta::port_props[]={ Port_Property("ap_clk", 1, hls_in, -1, "", "", 1), Port_Property("ap_rst", 1, hls_in, -1, "", "", 1), Port_Property("ap_start", 1, hls_in, -1, "", "", 1), Port_Property("ap_done", 1, hls_out, -1, "", "", 1), Port_Property("ap_idle", 1...
0bf78c10c007a27af170b45a658062a3ead911a6
44a8e5f8128f9805c2303431e5893dfd0c258ac8
ankitsharma1530/Codechef-Codeforces
/Problemset/A - Cherry.cpp
C++
cpp
1,096
no_license
#include<bits/stdc++.h> #define mod 1000000007 #define lli long long int #define ll long long #define pll pair<long long,long long> #define INF 1000000000; #define el '\n' typedef std::complex<double> Complex; typedef std::valarray<Complex> CArray; // for loops shortcut #define garr(i, n) for(ll i = 0; i < (n);...
f696bbc43bbc5dfbf742cd98723340c3599cf698
118835139e968e0a3caf4b9a7062278f519654cd
yydy1983/Solution_PAT
/Basic Level/1025/pta1025.cpp
C++
cpp
1,554
permissive
#include <cstdio> #include <vector> struct LINKLIST { int addr;//地址 int data;//数据 int next;//下一个节点地址 }; const int MAXN = 1e5; LINKLIST data[MAXN]; int main() { int addr_s;//开始地址 int n, k, i; LINKLIST node; std::vector<LINKLIST> vin;//输入 std::vector<LINKLIST> vout;//输出 scanf("%d %...
45bf6debd584fbf6236b1502958b898793f31cdb
7d913e448425e1afb1572349774070fcbfeb47f6
claudewill1/Past-Projects-and-Coding-Challenges
/Premium/C++/Codecademy/fizzbuzz.cpp
C++
cpp
431
no_license
#include <iostream> /* loop through the numbers 1 to 100. If the number is a multiple of three output Fizz. If multiple of 3 and 5 output FizzBuzz */ int main() { for(int i = 1; i <= 100; i++) { if(i%3 == 0 && i%5 == 0) { std::cout << "FizzBuzz\n"; } else if (i % 3 == 0) { std::cout << "Fizz\n"; ...
81c8314bca7166f8728740ff7fe447b8b338dd35
9953f8f7eeda89b1cfe1beb289b164f79425f353
syjsu/noip-with-vue.js
/1027/027.cpp
C++
cpp
230
no_license
#include<iostream> using namespace std; int main() { int n,s,i,j; int a[10000]; cin>>n; i=s=0; while(n!=0) { a[i]=n%10; n=n/10; i++; } for(j=0;j<=i+1;j++) s=s+a[j]; cout<<s<<endl; return 0; }
0de890a4eb294cc9f5334285434602507703c94c
b979dafd50baac0dedfe8fc97d54a8ef1b2ce049
hbprosper/cpptutorial
/src/poem.cxx
C++
cxx
557
no_license
//---------------------------------------------------------------------------- // C++ Tutorial // This is to be compiled into a dynamic shared object //---------------------------------------------------------------------------- #include <iostream> #include "poem.h" #include "colors.h" using namespace std; namespace f...
de55f00b1fc18c3c4cc3664bf2e116219b6d35d0
1b929a69d6c0e96b1176d8b678b4f13444eb4980
NinthKnight/QtQuickPlayer
/QuickLayer.cpp
C++
cpp
5,349
no_license
#include "QuickLayer.h" #include <QQuickView> #include <qqmlcontext.h> #include <SongListModel.h> #include <QJsonDocument> extern CSongLstModel songLstModel; CQuickLayer::CQuickLayer() { //播放音乐&mv connect(&m_net, SIGNAL(sig_reqSongStatus(ItemResult, SearchStatus)), this, SLOT(slot_requestSong(ItemResult, SearchStat...
d61a2e484e6e7be220aad9c84c1126c214a77d68
55b2c671d4f2417d5480fd88d429adbe2f5dda6a
alexandraback/datacollection
/solutions_1673486_1/C++/SceneTree/A.cpp
C++
cpp
1,809
no_license
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmat...
0a98ebb9b37799031ea0d021b23bb48ee9b5ffeb
01d314c169aa9b2893168ef5b95743557f7bdad5
AquJonny/KumaCatch
/MyCppGame/Resources/DemoCode/5_4_MusicTest/MusicEffectTest/MusicEffectTest/Classes/HelloWorldScene.cpp
C++
cpp
6,056
no_license
#include "HelloWorldScene.h" #include "SimpleAudioEngine.h" using namespace cocos2d; using namespace CocosDenshion; //根据不同平台使用预编译索引不同音频文件 #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #define EFFECT_FILE "effect2.ogg" #elif( CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) #define EFFECT_FILE "effect1.raw...
3b843744b1a4c02c9c9da39877114af2004ee2fc
c0b3da04eba91602ca8a3f5f872e3d74aaab6cdd
robinbattle/Knockout
/SourceCode-patch-with-moive(unstable)/KnockOut/Include/OgreMax/OgreMaxScene.hpp
C++
hpp
32,306
no_license
/* * OgreMax Scene Loader - Code for loading scenes generated by the OgreMax scene exporters. * Copyright 2009 AND Entertainment * * This code is available under the OgreMax Free License: * -You may use this code for any purpose, commercial or non-commercial. * -If distributing derived works (that use this so...
ec33418bb3de5f6167b6335971a5f4c253fdf67e
eddf3b259a4259c910e6af07c960f0c68e72c3a4
wazidu/solved-problems
/codeforce gravity flip.cpp
C++
cpp
306
no_license
#include<bits/stdc++.h> using namespace std; int main() { int n,i,j,k,a[10000]; cin>>n; for(i=0;i<n;i++) cin>>a[i]; sort(a,a+n); for(i=0;i<n;i++) { cout<<a[i]; if(i<n-1) printf(" "); } cout<<endl; return 0; }
8490e5ee4890d52773444f6a550d1da058acc812
8b2fe4c1d7351f7f0e98f638e5c2335eb46c5fd9
projectceladon/compute-runtime
/runtime/dll/windows/create_wddm_memory_manager.cpp
C++
cpp
643
permissive
/* * Copyright (C) 2019 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "runtime/execution_environment/execution_environment.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/os_interface/debug_settings_manager.h" #include "runtime/os_interface/os_interface.h" #include "runt...
e4bcc3af2ae04ed040c64b802f896ae9535bdc3c
280e6e1606244a784b51fa1524c41d63bd78e66b
thbach/ue4-vr-playground
/LightPainter/Source/LightPainter/VRPawn.cpp
C++
cpp
2,424
no_license
// Copyright TB 2020 #include "VRPawn.h" #include "Engine/World.h" #include "Kismet/GameplayStatics.h" #include "UI/PaintingPicker.h" #include "EngineUtils.h" #include "Components/InputComponent.h" // Sets default values AVRPawn::AVRPawn() { PrimaryActorTick.bCanEverTick = false; VRRoot = CreateDefaultSubobject<U...
df41551e145068a45f7d54f6bc2ada486a3fc654
d9db5f437963dea1b40f3897894fcd1409fe2918
amanraj-iit/DSA_Uplift_Project
/Assignments/Solutions/Kumari Mansi/Assignment No. 11/Q1.cpp
C++
cpp
292
no_license
// https://practice.geeksforgeeks.org/problems/number-is-sparse-or-not-1587115620/1/?track=DSASP-BitMagic&batchId=154# class Solution { public: //Function to check if the number is sparse or not. bool isSparse(int n) { // Your code return !(n & (n >> 1)); } };
9822c7d53438f9b9df7934bc859d190a02c166c3
9a2bbeb91b51c226759dba358c4401bca3a0ff33
binarydoor/CS1C_DEADPOOL
/QtProject/testing/Text.cpp
C++
cpp
1,834
no_license
/******************************************************************************* * AUTHOR : Samuel Vilchez, John, Eunsoo An, Vee * STUDENT ID : 1078959 * GROUP PROJECT : 2D Graphics Modeler Inc. * CLASS : CS1C * SECTION : MTWTh 4:30 - 7:25pm * DUE DATE : 7/26/2018 *************...
2d8154a2d76b5044eac5585249b2cdb9cbfdb60c
ace50939d9126fb60f53fe28817e6b9a1a9334dc
bobpiece/intelRSD
/PSME/common/ipmi/include/ipmi/utils/sdv/mdr_region_accessor.hpp
C++
hpp
6,921
no_license
/*! * @header{License} * @copyright Copyright (c) 2017 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.org/licenses/LICENSE-2.0. * * Unless requir...
73e899d0efa8e996ee5b79babb2ac4f064baf29c
34a41ef43955158682aa88223db901c1f939fc8a
elizamelo/CMSTOTEMSim
/CMSSW_7_0_4/src/MergingSoftware/MergeCMSTOTEMNTuples/Merge/mergeNtuples.cc
C++
cc
12,755
no_license
#include <TFile.h> #include "MyEvtId.h" // UA tree event desctiption #include "MyL1Trig.h" // UA tree event desctiption (arrays) #include "MyL1TrigOld.h" // UA tree event desctiption (arrays) #include "MyHLTrig.h" #include "MyTracks.h" #include "MyVertex.h" #include "MyPFJet.h" #include "MyCaloJet.h" #include ...
c55b02a015845166a569e713634cfc9092f9ccf6
8c249b955910fb48a829cc85e2a47d56be15990b
BackupTheBerlios/abeetles-svn
/trunk/gui/hello/quitwin.cpp
C++
cpp
1,179
no_license
#include "hello.h" #include "quitwin.h" #include "SlidComp.h" #include <QApplication> #include <QVBoxLayout> #include <QLCDNumber> #include <QSlider> #include <QSpinBox> #include <QGridLayout> QuitWin::QuitWin(QWidget * parent):QWidget(parent) { //resize(200, 120); MyPushButton * quitBut = new MyP...
20fc715b0232ea7b00c0e9ab231c1d2afe3d2e74
3ed5173d1b640900a089ac4ba07ad50aeddc4dbe
yjcchen0913/ITK
/Modules/Filtering/Thresholding/test/itkMaximumEntropyMaskedThresholdImageFilterTest.cxx
C++
cxx
2,737
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * h...
c9dbfc3f00c695d058b3ad639b64ec8d3e1eea73
dd39ef543c1100d31522438ddc0f7c5b15f89a7d
AI549654033/RDHelp
/src/src/Share/ShareLib/LinuxPublic/ACE_wrappers/apps/JAWS3/jaws3/Signal_Task.cpp
C++
cpp
1,780
permissive
// $Id: Signal_Task.cpp 80826 2008-03-04 14:51:23Z wotte $ #include "ace/OS_NS_signal.h" #include "ace/OS_NS_Thread.h" #include "ace/Thread.h" #ifndef JAWS_BUILD_DLL #define JAWS_BUILD_DLL #endif #include "jaws3/Signal_Task.h" #include "jaws3/Event_Dispatcher.h" #include "jaws3/THYBRID_Concurrency.h" #i...
8f1d1e40037a45d37dceb624f243cc3aeb10e925
16e0e0c3ad108ab0a963e940bd769c87727a2264
damian0815/kll
/src/kll/Objects/Block.cpp
C++
cpp
987
permissive
// // Created by Damian Stewart on 10/12/2016. // #include "Block.h" #include <OpenGL/OpenGL.h> #include "../../3rdparty/par_shapes.h" namespace kll { void Block::DrawImpl() { mMesh.Draw(); } Block::Block(vec3 initialPos, vec3 dimensions) : Object(initialPos), mUnscaledDimensions(dimensi...
83fb2067629f02cb3e564948b4cb54c44bec4b4c
74814b4ddfbcb0a9a456e64ed4820b1a9163430a
krishnasusritha/day0
/cplusq1/cplusq1/q2.cpp
C++
cpp
1,064
no_license
#include<iostream> using namespace std; class student { //public: char *std_namel; int std_avg; int sub1_m, sub2_m, sub3_m; friend class CollegeCourse; }; class CollegeCourse { public: void setData(char *s, int m1, int m2, int m3) { int len = strlen(s); std_name1 = (char *)malloc(sizeof(char)*(len + 1)); ...
9208d82222e7498933faba1ce6609a8acd670e8b
b4f34332998227a5d8c1eaa12965e75c9dc51bf3
priyanka-cse/ada_programs
/pro10_bfloyds.cpp
C++
cpp
1,071
no_license
#include <bits/stdc++.h> using namespace std; #define MAX 10 #define INF 99 int main() { int graph[MAX][MAX],dist[MAX][MAX]; int i,j,k,V; cout<<"Enter no. of vertices:"; cin>>V; cout<<"\nEnter the adjacency matrix:\n"; for(i=1;i<=V;i++) { for(j=1;j<=V;j++) { cin>>graph[i][j];...
001ff53d345581166b2c8b3cab94b46a60b6663f
d9330c963c8749542cf661e27117bbd7a6689648
vslavik/poedit
/deps/boost/libs/process/test/wait_for.cpp
C++
cpp
2,646
permissive
// Copyright (c) 2006, 2007 Julio M. Merino Vidal // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling // Copyright (c) 2009 Boris Schaeling // Copyright (c) 2010 Felipe Tanus, Boris Schaeling // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling // // Distributed under the Boost Software License, Version 1.0. (See ac...
3707c5ace566c2a23c2a0e2917fb03dbd8bc349a
0656423b1900f8ef417804735b72307343594400
HongYoungGee/Algorithm
/BOJ/11052/11052.cpp
C++
cpp
509
no_license
#include <iostream> #include <math.h> using namespace std; int main() { int T=1,answer=0; //cin >> T; while (T--) { int n; int *dp,*arr; cin >> n; dp = new int[n+1]; arr = new int[n+1]; for (int i = 1; i <= n; i++) { cin >> arr[i]; } for (int i = 1; i <= n; i++) { dp[i] = arr[i]; int ...
dbc9f326bc367cb65a9861398eda3479719dc2e9
4423d13fe40e5d1f69651ef512b15361170276a1
deathsimon/DataCenterSimulator
/ResAllocator.cpp
C++
cpp
7,522
no_license
#include "ResAllocator.h" /** * Constructor of the class ResAllocator */ ResAllocator::ResAllocator(vector<Server*> &serverList) { svrList = &serverList; } /** * FUNCTION NAME: scheduleTo * * DESCRIPTION: choose the server for target container using Next-Fit. * Next-Fit find the next server in the server l...
744dc47ab1789c3aba4425d5f63d7e1d3f94f9d0
61ef4b919c9eeb9271d1d14f0d8dc6016d8d268a
antonioguerrerocarrillo/1DESARROLLO-DE-APLICACIONES-MULTIPLATAFORMA
/1DAM/programacion en c++/minipractica/yobingo.cpp
C++
cpp
11,124
no_license
// // juego del bingo // // // Created by Antonio Guerrero y Pedro Infantes 02/02/2018 // // #include <iostream> #define BLACK_COLOR "\033[1;30m" #define RED_COLOR "\033[1;31m" #define GREEN_COLOR "\033[1;32m" #define YELLOW_COLOR "\033[1;33m" #define BLUE_COLOR "\033[1;34m" #define PURPLE_COLOR "\033[1;35m" #defin...
7d05db680bdd9fcf67078269f8555b641e033ca5
c9e191d75a96d610890aa9482d73ee407093920d
ludovicl/Examesure-Linux
/src/rs232.cpp
C++
cpp
4,038
no_license
//-------------------------------------------------------- //NOM : rs232.cpp //UTILITE : la classe Rs232 permet de gérer la liaison série rs232 //PROJET : Projet de fin de bts iris Examesure //Date : 2012 //AUTEUR : LARDIES Ludovic //------------------------------------------------------- #include "rs232.h" int Rs23...
9a7f259c5d68227748b70c3d590f64462298647f
4b37ef039b85f6847aa03a386c290a5a23d89295
soumyadeep-khandual/assignment-3
/tsk366.cpp
C++
cpp
368
no_license
#include <iostream> using namespace std; int main() { long int decnum, rem, quot; int binnum[100], i=1, j; cout<<"Enter any decimal number : "; cin>>decnum; quot=decnum; while(quot!=0) { binnum[i++]=quot%2; quot=quot/2; } cout<<"Equivalent binary value of "<<decnum<<" :\n"; for(j=i-1; ...
efc5cee1b9f7a0ade8e447ae70c5a4022d610495
9085dd1ea15d03781d5322de8ab4ea8382288fee
sagarsakta/Cpp-Programs
/Concepts of Loop/primeornot.cpp
C++
cpp
385
no_license
#include <iostream> using namespace std; int main() { int i,n; cout << "Enter any positive no: "; cin >> n; bool isPrime = true; for (i = 2; i <= n / 2; ++i) { if (n % i == 0) { isPrime = false; break; } } if (isPrime) cout << n << " is a prime number"; ...
fe942f3292b98b1d817be75436cc533298abf469
f823b0288b56f24cbd2b7b17f2f51d27d040e580
m4n1c22/mastersthesis
/Prototype_Impl/check_userspace/Prototype_5/Std_Thread_Impl/last_zero/last_zero.cpp
C++
cpp
4,076
no_license
/** \file : last_zero.cpp \brief : Benchmark program for last zero adaptation \author : Sreeram Sadasivam */ #include <iostream> #include <thread> #include <time.h> #include <vector> #include <algorithm> #include "../../include/common.h" #include "../../include/user_space.h" #include <unistd.h> #include <sche...
25bba5d1a44135b4c34582340373d948ebc6590a
3e52efec5b266590797ae1f41d10fa6e6f74f140
heesok2/MFC
/Example/src/MYENG_LIB/MathLib.cpp
C++
cpp
202
permissive
#include "pch.h" #include "MathLib.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif mylib::CMathLib::CMathLib() { } mylib::CMathLib::~CMathLib() { }
299b9bf20b442d2f5727bea47b9cbe02acc52836
467a2ed8f946d58141abc3156864bf9c17a41a01
kinhoy/practice_code
/classic/5_8.cpp
C++
cpp
1,105
no_license
#include <iostream> #include <string> #include <algorithm> using namespace std; const int maxcol = 60; const int maxn = 100 + 5; string filenames[maxn]; //输出字符串s,长度不足len 时补字符extra void print(const string &s, int len, char extra) { cout << s; for (int i = 0; i < len - s.length(); i++) cout << extra; } in...
347f4266c3520cb3214f491513007d66e515c123
3fe5bce47f57c69e770597cb81704c0a77a568d2
liurundan/Middle-size-robot-taiji-team
/RobotControl/SimClient.cpp
C++
cpp
2,454
no_license
#include "StdAfx.h" #include "SimClient.h" #include "WorldModel.h" #include <iostream> #include <cmath> SimClient* SimClient::the_only_sim_client = NULL; SimClient* SimClient::get_sim_client (const char* conf) throw (std::bad_alloc, std::invalid_argument) { if (!the_only_sim_client) the_only_sim_client = new SimC...
d09dd2e582167c80dc922332498911c0332ba487
92d5c6b4ed09a04b00b64e3e18280f93ab729708
ManoellaR/Linguagem_de_Programacao_II
/TrabalhoFinal/heart.hpp
C++
hpp
334
no_license
#ifndef HEART_HPP #define HEART_HPP #include <QGraphicsPixmapItem> #include <QObject> #include <QTimer> class Heart: public QObject, public QGraphicsPixmapItem { Q_OBJECT private: int frame = 1; QTimer* animationTimer; QPixmap sprite; public: Heart(); public slots: void animation(); }; #endif...
9ab1b88080a41c83eeb6c60a64dc9dc28870e3ce
2dc1b716a40773d526db5eb88fc5b2ff2c2fa0a2
bureau14/qdb-api-jni
/src/main/c++/net/quasardb/qdb/jni/export/qdb_query.cpp
C++
cpp
3,333
no_license
#include "../adapt/value.h" #include "../debug.h" #include "../env.h" #include "../exception.h" #include "../guard/local_ref.h" #include "../introspect.h" #include "../local_frame.h" #include "../object.h" #include "../string.h" #include "../util/helpers.h" #include "net_quasardb_qdb_jni_qdb.h" #include <qdb/query.h> #...
df8e3b4593c894ed97050e9aa5bb2ddb4b4ca185
bf2f3ee9f7805cc302f25435f978316f54a2ec95
jeffchadwick/rank_structured_cholesky
/src/rschol/library_interface/CHOLMOD_Environment.cpp
C++
cpp
55,267
permissive
////////////////////////////////////////////////////////////////////// // Copyright (c) 2015, Jeff Chadwick and David Bindel // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // 1. Redis...
c1f239243157a0c17bfaacec59bdb0ac42648a2b
88cc6cb8bd16bf3730500d7418712bdaf85c2930
tatsumack/codeforces
/div2/E53/C.cpp
C++
cpp
2,410
no_license
#include <limits.h> #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <set> #include ...
017ccff09fa16670c286f34c56216cb4afd17e54
1b12272506a68485834ff81e40f0adac4c6c7884
oubotong/arm-secure-nn-1
/src/backends/reference/workloads/RefSpaceToDepthWorkload.cpp
C++
cpp
829
permissive
// // Copyright © 2017 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // #include "RefSpaceToDepthWorkload.hpp" #include "SpaceToDepth.hpp" #include "RefWorkloadUtils.hpp" #include <ResolveType.hpp> namespace armnn { void RefSpaceToDepthWorkload::Execute() const { ARMNN_SCOPED_PROFILING_EVENT(Com...
9ed5270b786b416f7b01f7edd8e851cdeebf686a
ed62869a8c0387ede4c22ad20ca1c72688d1ba7a
rhnvrm/cppkiteconnect
/include/kitepp/config.hpp
C++
hpp
3,571
permissive
/* * Licensed under the MIT License <http://opensource.org/licenses/MIT>. * SPDX-License-Identifier: MIT * * Copyright (c) 2020-2021 Bhumit Attarde * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to d...
a8f463eb072fa9ebc2df06772cf80f1fa219906b
51a9e06a704e4d505a945317daecd0d6e66d3725
fengrenchang86/PKU
/1041/5711858_WA.cpp
C++
cpp
2,731
no_license
#include <iostream> using namespace std; struct ac { int v; int EdgeId; ac *next; }*plist[50]; int visit[50]; int arrid[50]; bool edge[2000]; int low[50]; int n, m, s; int nCount; bool use[2000]; int ans[2000]; void Init() { int i; for (i = 0; i < 50; i++) { plist[i] = NULL; visit[i] = 0; } for (i = 0; i < ...
f16dae5c172c0f337f94f976040d1c019fd6f4e6
20992d820134865f9e268b58756e1d0f94a589e3
monotonemonk/hhvm
/hphp/runtime/vm/jit/irgen-builtin.cpp
C++
cpp
69,038
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +---------...
ce11101f80bcd8d29fba55091546e15ae541374e
648022c6ebfa3731d5f3348c72e43dee7c8d38f9
youtube/cobalt
/third_party/skia/gm/gradients_2pt_conical.cpp
C++
cpp
19,047
permissive
/* * Copyright 2014 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "gm/gm.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" #include "include/core/SkMatrix.h" #include "include/core/SkPaint.h" #include "include/...
6f6277feb67a29fa74009c8f6fb766910528d756
474b78adbfeb975008511963336422085c2d0279
Giantpizzahead/pro-club-problems
/PRA7/solutions/solbonus.cpp
C++
cpp
954
no_license
#include <iostream> #include <unordered_map> using namespace std; const int MAXN = 3000; int N, Q; int A[MAXN], cnt[MAXN]; int mode[MAXN][MAXN]; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cin >> N; for (int i = 0; i < N; i++) { cin >> A[i]; A[i]--; } for (int i =...
c3141ea6533cd1994e9cea731133b0d9ca411ccf
6e163d1f88633af942b87de84817b5c45dff2a73
leomaurodesenv/contest-codes
/contests/uri/uri-1094.cpp
C++
cpp
1,705
permissive
/* * Problema: ExperiÍncias * https://www.urionlinejudge.com.br/judge/pt/problems/view/1094 */ #include <iostream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <numeric> #include <string> #include <sstream> #include <iomanip> #include <locale> #include <bitset> #include <map> #include <vector> #incl...
cb5f5d08460c97ee0f0c6e49067fa7c3510a8d73
9f4be6332ee5ad905d4374b2ba61daf524225519
jainamandelhi/Competitive-programming-questions
/A2OJ/Rating less than 1300/Xenia and Divisors.cpp
C++
cpp
1,121
no_license
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int *arr=new int[n]; int v[8]={0}; int flag=0; for(int i=0;i<n;i++) { cin>>arr[i]; v[arr[i]]++; } if(v[1]<n/3) { cout<<-1; return 0; } if(v[2]+v[3]...
63cf4df8d8a9b434613472cb2f8cb5ee6feabe98
667d1a383e9eedb63e7ca55c7c1f23170c58924c
cvernier/cmssw
/DQMOffline/JetMET/src/PFMETAnalyzer.cc
C++
cc
53,520
no_license
/* * See header file for a description of this class. * * \author K. Hatakeyama - Rockefeller University * A.Apresyan - Caltech */ #include "DQMOffline/JetMET/interface/PFMETAnalyzer.h" #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Common/interface/TriggerNames.h" #include "DataFor...
08facbc1a2065fa49e3acc1d56acdc26d5681faa
e61ce7f5807a92429f7c45d6ea05b2fb5a66252b
HoopAWolf/GR-Framework
/NYP_Framework/Common/Source/BaseDatabase.cpp
C++
cpp
700
permissive
#include "BaseDatabase.h" #include "Loader.h" template <class Object> BaseDatabase<Object>::BaseDatabase(const std::string& name, const std::string& filePath) :k_name(name),k_filePath(filePath) { } template <class Object> BaseDatabase<Object>::~BaseDatabase() { } template <class Object> void BaseDatabase<Objec...
016836c397d1ed92997f40cc60215d21395e7477
c3f95bb797ead420b5cb4d2b2632436546bdae4f
kutmanbekov-i/auca-ds-2020
/project01/uva-10315(Poker Hands)/main.cpp
C++
cpp
8,395
no_license
#include <bits/stdc++.h> using namespace std; class PokerHand { // const int SIZE = 5; vector<pair<int, char>> hand; vector<int> count; void parse(const vector<string> &cards) { for (int i = 0; i < 5; ++i) { if (isdigit(cards[i][0])) { hand....
c5666868640864a00482f974ac89146929357ea6
a5efc46d952b855a4bb554e8bd23c21a82b18896
zustudio/SOIA_OLD
/SOIA/Source/Environment/Reflection/Source/Unresolved/ResolvePointerInfo.cpp
C++
cpp
372
no_license
#include "Definitions.h" #include "ResolvePointerInfo.h" using namespace Environment; #include "RContainer.h" ResolvePointerInfo::ResolvePointerInfo(ElementID InID, RContainer* InContainer) : TargetElementID(InID), TargetElementContainer(InContainer) {} void ResolvePointerInfo::OverrideContainer(RContainer* InC...
562f2c3355f417c4ce95d0c6a01e3d4bf4f7c0a9
439a78ec6ceee694787dee82f358c56613cdfad7
SpiritSuperUser/spirit
/ui-cpp/src/SpinWidget.cpp
C++
cpp
78,441
permissive
// #include <fstream> #include <sstream> #include <algorithm> #include "SpinWidget.hpp" #include <QTimer> #include <QMouseEvent> #include <QtWidgets> #include <VFRendering/CombinedRenderer.hxx> #include <VFRendering/ArrowRenderer.hxx> #include <VFRendering/IsosurfaceRenderer.hxx> #include <VFRendering/BoundingBoxRe...
404bc6a41456b96e6f1c75ec74956d8b8c02afa5
983748a2c4238667ec5e3d657071e5de443286f3
mcvine/mantid
/Framework/DataHandling/src/LoadMcStasNexus.cpp
C++
cpp
6,509
no_license
#include "MantidDataHandling/LoadMcStasNexus.h" #include "MantidAPI/FileProperty.h" #include "MantidAPI/MatrixWorkspace.h" #include "MantidAPI/NumericAxis.h" #include "MantidAPI/RegisterFileLoader.h" #include "MantidAPI/WorkspaceFactory.h" #include "MantidAPI/WorkspaceGroup.h" #include "MantidKernel/Unit.h" #include <n...
cc32f0dd6cd86e709b54c8ea9c8d939afed18f11
f4159e32ffd1b62a90049829457a3555560f13d0
baidu/openrasp
/agent/php7/third_party/yaml-cpp/src/iterator.cpp
C++
cpp
1,930
permissive
#include "yaml-cpp/node.h" #include "yaml-cpp/exceptions.h" #include "iterpriv.h" namespace YAML { Iterator::Iterator(): m_pData(new IterPriv) { } Iterator::Iterator(std::auto_ptr<IterPriv> pData): m_pData(pData) { } Iterator::Iterator(const Iterator& rhs): m_pData(new IterPriv(*rhs.m_pData)) { } Iterator...
5753e58c8f77eedc12e2e7a1d954679c04a4e949
7a250237d872385bda09de3ac0a2f5221e011d65
zenoalbisser/chromium
/content/browser/geolocation/geolocation_service_context.cc
C++
cc
1,702
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 "content/browser/geolocation/geolocation_service_context.h" namespace content { GeolocationServiceContext::GeolocationServiceContext() : paused...
8bda59e67eca71f7133c975990aabf7d439c00b5
0dc416e8c823e76ca06edf848bfb40ec862199d3
SheetsKG/Seg3D
/src/Application/LayerIO/Actions/ActionExportLayer.cc
C++
cc
5,668
permissive
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2009 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwa...
e437d43cc04f4b2dedabc1f95713e98171c5393e
d75ad7678ba585ca70482078d13d4f06a089a181
tsstss123/code
/stl_usage/algorithm.cpp
C++
cpp
7,452
no_license
/* C++ 的Algorithm 函数库 * */ #include <algorithm> /* InputIterator, iterator 都是迭代器,InputIterator明确表示这个参数是输入的参数 ptrdiff_t是指针之间的差值,也就是之间之间元素个数差值,如 end() - begin() 的差值 */ /* 循环处理函数 一元函数Function,可以用一个函数或者类的()运算符实现,只有一个参数,无返回值 N * */ Function for_each (InputIterator first, InputIterator last, Function f)...
dc4d4b86b16411dda8db1cefd29cc12123497734
e2d522a844a8b936cafbae3880d31e58e89e7abf
chanlan/Data_Structure
/MOOC_zju_陈越-何钦铭/04-树6 Complete Binary Search Tree2.cpp
C++
cpp
904
no_license
#include <cstdio> #include <cstdlib> #include <cmath> int N; int T[1001] = {0}; int A[1001] = {0}; int compare(const void *a, const void *b){ return *(int*)a - *(int*)b; } int GetLeftLength(int n){ int H = log(n+1)/log(2); int X = n - pow(2,H) +1; X = X > pow(2,H-1) ? pow(2,H-1) : X; return ( pow...
c3c2a8ef51cc9cee6350b71cbc2cd48e24bb37aa
9e7f675631b37dc008c7a391e18263532f097ba8
sid19991/gil
/example/simple_filter.cpp
C++
cpp
1,610
permissive
//include libraries for image io, kernel definition and convolution #include <boost/gil/image.hpp> #include <boost/gil/typedefs.hpp> #include <boost/gil/extension/io/jpeg.hpp> #include <boost/gil/extension/numeric/kernel.hpp> #include <boost/gil/extension/numeric/convolve.hpp> //This example demonstrates the use of sim...