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
b1cbf5c516ac5c53da9c9af5925448644112ac9a
0b103a6546dfc93bad0c5916287e9e9f05fdb164
fceller/arangodb
/arangod/IResearch/IResearchDocument.cpp
C++
cpp
20,405
permissive
////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2017 EMC 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 //...
d8c34a0a80aebb5a0cd248549e0f95fa481cac65
99a2980ad6845c7ea8d2c479c0a0699649ab7d52
warrenween/Elastos
/Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/database/sqlite/CSQLiteDatabaseHelper.cpp
C++
cpp
3,534
permissive
//========================================================================= // Copyright (C) 2012 The Elastos Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // ...
269bd184ede47e4510bd63fe4db0f3a4e18f7ac1
74f437b842e5c92353e0f88f30eec7a876066296
ThomasMarches/Indie-Studio
/Fox/include/Utils/Vec3.hpp
C++
hpp
3,354
no_license
/* ** EPITECH PROJECT, 2020 ** B-YEP-400-TLS-4-1-indiestudio-thomas.marches ** File description: ** Vec3.hpp */ #ifndef FOX_VEC3_HPP_ #define FOX_VEC3_HPP_ #include <reactphysics3d/mathematics/Vector3.h> #include <math.h> #include <iostream> #include "raylib.hpp" constexpr float VEC3_EPSILON = 0.000001f; // namespa...
f598762a0793e79c9fe0209d483e96edbaf3380a
7cc3ae1afbadbca33894c2b0bc959f430d8a637e
CreativeLabs0X3CF/Sprout
/sprout/type_traits/add_lvalue_reference.hpp
C++
hpp
930
permissive
/*============================================================================= Copyright (c) 2011-2016 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout 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.tx...
15b06e9d8cc3a002f2af068d39bb09bcedcc87a1
0efea6ec311f75a7c61edd089c9f7d1f1daced53
JannaKim/PS
/C++/7step/1152_numOfString.cpp
C++
cpp
1,326
no_license
#include <iostream> #include <cctype> // isspace #include <vector> #include <string> #include <stdio.h> #include <string.h> #include <unistd.h> using namespace std; /* vector<string> split(const string&s) { vector<string> ret; auto string_size = s.size(); int i=0; while(i!=string_size) { wh...
69c0a526365c3fd0c695b427e7032ef1e3795af7
75681edbdc3d36f4c10a7d6f36cd36807b025e7d
BinaryGears/tensorflow
/tensorflow/compiler/xla/service/dynamic_padder.cc
C++
cc
96,348
permissive
/* Copyright 2019 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...
4ea22a08a11072214ad95d3947ce1de604f163dc
9af29573ad04129cacff920077f176025700d645
grockious/cbmc
/src/goto-instrument/function.cpp
C++
cpp
4,388
permissive
/*******************************************************************\ Module: Function Entering and Exiting Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ /// \file /// Function Entering and Exiting #include "function.h" #include <util/arith_to...
9965e94e8a497b2eeff3c755fda90b677c6070c8
a9bcb35cd802427a78ef3824f4418e49bb2d3a9a
wilson-ben/ITKExamples
/src/IO/GDCM/ReadDICOMSeriesAndWrite3DImage/Code.cxx
C++
cxx
4,279
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...
29a67914be0df70993dfa18911ce2fd43e3f0a29
c352ca127e6b065c412220777d7139db12c572cf
kyllosenjuha/CPP
/GameOfLifeWindows/MainApp.cpp
C++
cpp
1,364
no_license
#include "GameBoardSize.h" #include "MainApp.h" #include "MainFrame.h" MainApp::MainApp() { //ctor } MainApp::~MainApp() { //dtor } bool MainApp::OnInit() // Luodaan pelilauta ikkuna { MainApp::wxCmdLineParser(argc, argv); // Command line parametri (pelilaudan koko) MainFrame *Mai...
7dcbe1529898035d7c7ee99f7f2dcc305af73eae
343af29ebd8b462e41e62a26dba4e24fd7c34b45
JintianGo/Training
/Hyacinth/Practice 001 NEERC 09/F.cpp
C++
cpp
1,967
no_license
//kybconnor 5Y (ryan) #include <cstdio> #include <iostream> #include <cstring> #include <vector> #include <string> #include <algorithm> #include <queue> #include <set> using namespace std; #define LL long long #define PB push_back #define MP make_pair int cnt[1111][33]; int temp[33]; string s[1111]; int n,m; set<char>S...
31e143ad4d0348a9242dfbf858d2b241689e4ecc
e3c0a5b050b6b3e51a4460cf0f9109bfb10bb33a
ndoss/nt2
/modules/core/combinatorial/bench/scalar/cnp.cpp
C++
cpp
2,947
permissive
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
42ba17ba69e2e28d05b5395302c78b51134efcd5
0dab7f9a1ce2a8ed2dbbc3cffe6306bac9ba0c93
jhincapie/tictactoe
/app/src/main/jni/game/simple_game.cpp
C++
cpp
9,246
permissive
//// // simple_game.cpp //// #include "game/simple_game.h" #include "base/logging.h" #include "base/thread/task.h" #include "base/thread/thread_util.h" #include "game/core/platform_delegate.h" #include "game/input/key_event.h" #include "game/input/keycodes.h" #include "game/input/touch_event.h" #include "game/render/...
c45a3859123f8b93cfa9056ebcd7909834ad07f2
656394b0a70175a947345cb05d68e891e8f02ee5
canonical-robots/DomainModelsRepositories
/CommTrackingObjects/smartsoft/src-gen/CommTrackingObjects/enumPersonManagerParam.hh
C++
hh
3,001
permissive
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // Service Robotics Research Center // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information abo...
dba05d6a8d1abc5244eeac23766ee1cef0a7bdbb
e9c2a8b58d300ecd8fd48efa807107ebe9d1a4cc
giorgiopizz/lab
/prove/classe.cc
C++
cc
267
no_license
#include "classe.h" #include <iostream> #include <cmath> complesso::complesso(double reale, double ima){ real=reale; imm=ima; } complesso::~complesso(){ std::cout<< "Ho distrutto l'oggetto\n"; } double complesso::modulo(){ return sqrt(pow(real,2)+pow(imm,2)); }
0904882d80140bd28291bc63274434055ef640ce
bbc56f36ae23067fbe0ccc70e736e3957cd5ab7d
Joshnunez-ksu/SWE6843
/Project1/test_display.cpp
C++
cpp
1,217
no_license
#include <iostream> #include "../common/Peripherals.h" //~ #include < //~ #include "Display.cpp" using namespace std; int main(int argc, char **argv) { PeripheralFactory pf; GPIOSystem* gpio = (GPIOSystem*) pf.getPeripheral(PERIPHERAL_GPIO); //~ Display display( gpio->getPin(20), //~ gpio->getPin(25), ...
fe74d36e5dff28560e1595f0447b15e47a36a473
826f526f92f900bcdf3d800703d0fcbfcb73a94b
kosfango/fips
/floating.cpp
C++
cpp
9,876
no_license
// floating.cpp : implementation file // IDD_FLOATING_BAR #include "stdafx.h" #include "resource.h" #include "lightdlg.h" #include "floating.h" #include "structs.h" #include "cfg_icon.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif static _DlgItemsSize DlgItemsSize ...
07edb7f14678e0b296284141fb53158e1e8baa2e
fe9e7ee37bbf9d849c0284e538a46ea88d82db87
sxin-h/VCT
/source/ssaa.cpp
C++
cpp
2,161
no_license
#include <cstdio> #define STB_IMAGE_IMPLEMENTATION #include "../external/stb/stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "../external/stb/stb_image_write.h" #pragma pack( push, 1 ) struct RGB8 { unsigned char r, g, b; }; #pragma pack( pop ) static_assert( sizeof( RGB8 ) == 3 * sizeof( unsigned c...
2496f76d8b3899aba11cb345ee768fc027a0a50a
9936341c8c452edd2d0175b32f114ccc16726d41
jjykh/v8
/src/profiler/heap-snapshot-generator.cc
C++
cc
111,008
permissive
// Copyright 2013 the V8 project 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 "src/profiler/heap-snapshot-generator.h" #include "src/code-stubs.h" #include "src/conversions.h" #include "src/debug/debug.h" #include "src/o...
978ab416d893f02581b6983ef07871ec30393b96
6ad55c64389ccba11786dc2d9f2bf84446119362
dyg540/chromium
/content/browser/renderer_host/render_widget_host_unittest.cc
C++
cc
94,204
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <stddef.h> #include <stdint.h> #include <memory> #include <tuple> #include "base/bind.h" #include "base/command_line.h" #include "base/loca...
0bbbd1b4ffe08e7861079fe25f64fedad0c398c8
ddc10342b5dc1c9a4d0a7726636210305e49090f
polatory/polatory
/include/polatory/rbf/cov_spheroidal9.hpp
C++
hpp
1,535
permissive
#pragma once #include <cmath> #include <memory> #include <polatory/rbf/covariance_function_base.hpp> #include <vector> namespace polatory::rbf { class cov_spheroidal9 final : public covariance_function_base { public: using covariance_function_base::covariance_function_base; explicit cov_spheroidal9(const std::...
ecd834dd07baf915b32a507391ce327486b137d3
dd056dacffa01bb483e136635663af21abcec509
sj/fawkresrobotics-fawkes-copy
/src/plugins/rrd/aspect/rrd_descriptions.cpp
C++
cpp
29,263
no_license
/*************************************************************************** * rrd_descriptions.cpp - Fawkes RRD descriptions * * Created: Sat Dec 18 11:41:32 2010 * Copyright 2006-2011 Tim Niemueller [www.niemueller.de] * ****************************************************************************/ /* Th...
6ce7b403349f7bfc38a562b0cb7dc37fedef4593
29b2f28a80279e1908f0cd2c7fa3960e8e3e1faf
webosce/chromium53
/src/components/sessions/core/session_service_commands.cc
C++
cc
33,672
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/sessions/core/session_service_commands.h" #include <stdint.h> #include <string.h> #include <utility> #include <vector> #include "ba...
8ab7206de1ec2c2f34081dd78e43c4d3e09b3fc4
927206f4892da4ed681efa3a25ab3e0870603163
SayaUrobuchi/uvachan
/USACO/3-4_fence4.cpp
C++
cpp
3,521
no_license
/* ID: sa072682 LANG: C TASK: fence4 */ #include <stdio.h> #include <stdlib.h> double point[201][2], s[2]; int pair[201][2], n; int comp(const void *p, const void *q) { if(((int*)p)[1] == ((int*)q)[1]) { return ((int*)p)[0] - ((int*)q)[0]; } return ((int*)p)[1] - ((int*)q)[1]; } double cross(double x1, doub...
a8b3ca0de296b2a07dbf6dc4139ff8f71c1241ec
9ce02b9015217441e0b1bc8b8bae1ef49fb5cf50
Romanovich1311/DEngine-pcsx4
/Tests/TestApp/src/Linux/TestAppLinux.cpp
C++
cpp
2,091
permissive
/* Copyright 2015-2018 Egor Yusov * * 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 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARR...
b9f5134ca9eb8879c6a712838c947cdf303b3ad1
304088337539835fd4798199347175f3b90e9cbb
KitwareMedical/IntersonArraySDKCxx
/test/IntersonArrayCxxIntersonClassTest.cxx
C++
cxx
1,067
permissive
/*========================================================================= Library: IntersonArray Copyright Kitware Inc. 28 Corporate Drive, Clifton Park, NY, 12065, USA. All rights reserved. Licensed under the Apache License, Version 2.0 ( the "License" ); you may not use this file except in compliance with the...
4544a168fa5670f718cf5d423620d0a5e5728e83
5b118b6eb142901e6741c163386f54de663ed389
DanielThurau/Database-System-II
/project3-15/codebase/ix/ixtest_09.cc
C++
cc
3,789
no_license
#include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include "ix.h" #include "ix_test_util.h" IndexManager *indexManager; int testCase_9(const string &indexFileName, const Attribute &attribute) { // Functions tested // 1. Create Index File // 2. Open Index File // 3. Inser...
a91aea7fef0e37ba2ca9f32b7d122a87803f8bce
a5e277d063b7b8b32bd3bf53d2f52b83e23ca3e8
Meatlf/CPlusPlus
/Chapter04-复合类型/exercise08.cpp
C++
cpp
656
no_license
// exercise08.cpp // 说明:使用new创建结构体数组 #include <iostream> #include <string> // make string class available #include <cstring> using namespace std; struct Pizza { string company; float diameter; float weight; }; int main() { Pizza *snack = new Pizza[2]; cout << "请输入2个关于Pizza的信息:" << endl; for (...
d77cdf1df080b7d42da795d8124070d6a8c85410
8e3f9c7f7d6de62def476ede815860f4f08fd1ed
Sicarii-NaumaN/TechnoparkCinema
/http_server/async/include/Listener.hpp
C++
hpp
778
no_license
#pragma once #include <memory> #include <mutex> #include <queue> #include <thread> #include "socket.hpp" #include "HTTPClient.hpp" class Listener { private: Socket socket; std::queue<HTTPClient>& unprocessedClients; std::shared_ptr<std::mutex> unprocessedClientsMutex; bool stop; std::thread lis...
c98a158840b66e690fe780e82af7101fb4df7ead
b84c2a5a916ecc41d37294573fd702b2f5b572fa
czxxjtu/wxPython-1
/branches/wx-2.9.0.1/src/cocoa/main.cpp
C++
cpp
604
no_license
///////////////////////////////////////////////////////////////////////////// // Name: src/cocoa/main.cpp // Purpose: Entry point // Author: David Elliott // Modified by: // Created: 2002/11/11 // RCS-ID: $Id$ // Copyright: (c) 2002 David Elliott // Licence: wxWindows license ////////////...
0415c2ee201775c87c689cd4e3b5cf4263d24362
08a46c5434f850ffdaf4185c7e774110108bb3c8
montsigur/PAMSI-lab04
/kopiec.cpp
C++
cpp
3,505
no_license
#include "kopiec.hpp" using namespace std; kopiec::kopiec() { wysokosc = 0; korzen = NULL; } void kopiec::dodaj(int klucz) { nowy = new wezel(klucz); if (korzen == NULL) korzen = ostatni = nowy; else if (ostatni->lewySyn == NULL) { ostatni->lewySyn = nowy; ostatni->lewySyn->ojc...
09f906ceebc2d74bd6597b419c958d487f1238a7
0166393ee86c8dba5b7e17fcbeecba9618fa7188
mengjiaowang/leetcode
/linked-list-cycle.cpp
C++
cpp
436
permissive
class Solution { public: bool hasCycle(ListNode *head) { ListNode * p1 = head, * p2 = head; while(p1 != NULL && p2 != NULL){ p2 = p2->next; if(p2 == p1) return true; if(p2 == NULL) return false; p1 = p1->next; ...
1294de5386040ec30c47b49f825c544ebfd9eb07
8835a3e8fbb3b44bf0d2329364092be386250d4e
rjpdasilva/WPEFrameworkPlugins
/DIALServer/Netflix.cpp
C++
cpp
1,370
permissive
/* * If not stated otherwise in this file or this component's LICENSE file the * following copyright and licenses apply: * * Copyright 2020 RDK Management * * 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 cop...
807055ca007f6f1b9339259f596d340477d889ce
c4ea2f46cea46e064bb88ce0d22f687942832c5f
Christopher-Richards/ENSE274project
/sim.cpp
C++
cpp
2,123
no_license
#ifndef SIM_CPP #define SIM_CPP #include "sim.h" short simulator::xadd(unsigned x) { srand(rand()); srand(rand()*rand()); if(x%4<2) return (rand()+rand())%10; return (rand()+rand())%4; } short simulator::xrem(unsigned x) { srand(rand()); srand(rand()+rand()); if(x%4>2) return (rand()+rand())%10; return ...
2d449b224a9a481b4e761b8a8be3e693feb51d05
484b3640f0ee11844911c84e726fff8712bd0f85
imanbarati/IHHook
/IHHook/imguiimpl/imgui_lua_bindings.cpp
C++
cpp
13,660
permissive
//tex slightly tweaked from imgui_lua_bindings fork since main repo hasn't been updated since imgui 1.60 https://github.com/ZhuRong-HomoStation/imgui_lua_bindings #include <stdio.h> #include <imgui.h> #include <deque> // #include "imgui_lua_binding.h"//tex OFF not in repo? #include "lua.h" #include "lualib.h" #include ...
7623b54ff38965c072e45f073f4f63896f101759
15673dd9960a48ef13ea45c1c78b161ca5dd3f18
svn2github/p-stade
/tags/pstade_2007/pstade/gravy/include/wtypes.hpp
C++
hpp
339
permissive
#ifndef PSTADE_GRAVY_INCLUDE_WTYPES_HPP #define PSTADE_GRAVY_INCLUDE_WTYPES_HPP // PStade.Gravy // // Copyright Shunsuke Sogame 2007. // 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 <wtyp...
8fe886b055d89e298b305a4148c07104824630aa
9e98969c92f25b41350791676d124ee74eb6bd8a
ckh0618/CryptoCurrencyExchange
/src/BCMath.hpp
C++
hpp
6,455
permissive
#ifndef BCMATH_H #define BCMATH_H /* This file is part of VK/KittenPHP-DB-Engine. VK/KittenPHP-DB-Engine 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 2 of the License, o...
7ce8b9e4397b429f8aa3aa4fe3174ebebb3f015c
25dd04df4a29d77c3ea1bd827d6fce1f53bf2ee5
YeonBot/PacManGame
/PacMan.cpp
C++
cpp
4,696
no_license
#include "stdafx.h" #include "PacMan.h" CPacMan::CPacMan(int &sc, CDrawConsole &draw) :score(sc), CCharacter(draw) { setXY(22, 15); charnum = 0; } CPacMan::~CPacMan() { } void CPacMan::setpacmandirection(const int pd) { pacmandirection = pd; } int CPacMan::getpacmandirection() { return pacmandirection; } cons...
e65cb3bea6bc80a32f1b5e50e3d3a27632ac3220
820ed40b56846672837d8236cccd1fc85e6355fe
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14700/function14700_schedule_40/function14700_schedule_40_wrapper.cpp
C++
cpp
857
no_license
#include "Halide.h" #include "function14700_schedule_40_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){Halide::Buffer<int32_t> buf0(256, 512, 512); init_buffer(buf0, (int32_t)0); ...
9d9e8def8ecb7b1c92c3e8db06651c7bcd1953f5
7ba93126495ac0977de8a4e6e194d62f8e593c8a
massbrowser/android
/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp
C++
cpp
4,108
permissive
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
688768acba82c6237ead1163ca8d9f8f8c568701
299120036b0837d004c3852da2598dc872ca9a83
RATime360/Code
/Lib/Dispatcher/LogCleaner.cpp
C++
cpp
3,948
no_license
#include <Lib/Common/Format.h> #include <Lib/Settings/SettingsA.h> #include <Lib/Db/ObjectLog.h> #include <Lib/Db/ObjectLogInfo.h> #include "LogCleaner.h" const int kWorkPeriodMs = 100; const int kTooLongFunctionMs = 30*1000; const int kFailFunctionMs = 15*60*1000; const int kTruncHours = 7*24; const int kCleanHours...
4b4a70190f10faebb26c675c203007fbd8cad022
12665ec424c18fccf9e96a5d98eb493ea4b37b03
kahsh/kahsh
/src/chainparamsbase.cpp
C++
cpp
2,932
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2016-2017 The PIVX developers // Copyright (c) 2018-2019 The Dilithium Core developers // Copyright (c) 2019 The Kahsh Core developers // Distributed under the MIT software license, see the accompanying // file CO...
a62bf9bc58496b0465167be0e87d55cdd42f42df
ff000b5e335b5c2624e265569c96b64be30ca628
xfoxfu/DCS112
/6855/JobManager.cpp
C++
cpp
2,283
no_license
#include "JobManager.h" #include <algorithm> using std::swap; JobManager *JobManager::instance = nullptr; JobManager *JobManager::getInstance() { if (instance == nullptr) instance = new JobManager(); return instance; } bool JobManager::deleteInstance() { if (instance == nullptr) return fal...
71e230a988962b8fcdc6ec94a6eb82112d798d93
dc3a19616fc0af99c38ae4e6d53efa7363dacd2b
hamDrambus/ROOT_post_processing
/210909/7analysis_history.cpp
C++
cpp
28,708
no_license
void noise_cut(int channel, int aggressiveness, int device_condition, bool display); void time_zoom_fPMTs (double f_time, double to_time); void time_zoom_sPMTs (double f_time, double to_time); void time_zoom_SiPMs (double f_time, double to_time); std::string cuts_str(std::vector<int> cuts); void central_SiPMs(bool on);...
68b0db02a3b9bb5021448d33403b556baa048708
f6d29fb0601ba2eaa956b788bd3d86611293b126
karvotch/OpenGL_Practice
/mac/OpenGLTutorial/16-FaceCulling/OpenGLTutorial16/main.cpp
C++
cpp
16,899
no_license
#include <glad/glad.h> #include <GLFW/glfw3.h> //#define STB_IMAGE_IMPLEMENTATION #include <stb_image.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <SHADER/shader.h> #include <CAMERA/camera.h> #include <MODEL/model.h> #include <iostream> using namespace ...
9f9dac112570942cc2f81f05e203e52f9561c33c
3b4be8c0a361ab9fc3cc578044b0a183f0c8150a
hhsdev/huffman-compression
/huffman-compression/src/tree_reconstruction.hpp
C++
hpp
1,169
permissive
#pragma once #include <exception> #include <utility> #include <vector> #include "./all_bitsets.hpp" #include "./huffman_node.hpp" #include "./huffman_tree.hpp" #include "./util.hpp" namespace TreeReconstruction { using CodeLengths = Huffman::CharSizedArray<unsigned char>; using CodeLengthAndCharPair = std::pair<int,...
9c92e5010b080b2050c7d35c686afeb6dd69ac02
6d1e281caa58d7bf64c4a4f428e9f76040b18de6
mfykmn/contest
/AtCoder/APG4b/ex10/Main.cpp
C++
cpp
307
no_license
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int A, B; cin >> A >> B; cout << "A:"; rep(i, A) { cout << "]"; } cout << endl; cout << "B:"; rep(i, B) { cout << "]"; } cout << endl; }
f6375856fa17c16bc4e291af6681751a759ec1db
deaed4ec171edb40d0c5a937a40d02c21b6bdea5
dbuskariol-org/chromium
/chrome/browser/extensions/extension_service_sync_unittest.cc
C++
cc
78,974
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <stddef.h> #include <map> #include <memory> #include <string> #include <utility> #include "base/bind.h" #include "base/command_line.h" #include...
2939f39aed20cee1e03c7c425548d70777b1831f
d07b66c50d97efa2527ce168ac28c7a1f1c01f1c
MICHAEL-MAURICE/problem_solving_training
/kkkfkkf/main.cpp
C++
cpp
225
no_license
#include <iostream> using namespace std; int main() { int arr[4]; string s; cin>>s; for(int i=0;i<4;i++) ++arr[s[i]-'a']; for(int i=0;i<4;i++) cout<<arr[i]<<endl; return 0; }
8f44ec40d1867177f0e3b35ddf06bb1c3594584d
258ac1f80b37de5aabf13c93f9abbfdc684a204d
FuzesiMate/onlab
/cmakeCV/ComputerVision/src/ObjectDataCollector.cpp
C++
cpp
1,738
no_license
#include "ObjectDataCollector.h" #include <thread> #include <mutex> #include <chrono> void ObjectDataCollector::process(ObjectData objectData, CollectorNode::output_ports_type& output){ dataBuffer[objectData.name].push_back(objectData); bool readyToSend = true; if (dataBuffer.size() == numberOfObjects) { ...
a46cd221aa13b31a52cd7d4ff34356d4692f5307
5bbad72dc02de591ef3fb2d404d6b31373a82894
samreachyan/BKCodes
/C++ Program/Array/Array8_enterELEMENT0.cpp
C++
cpp
905
no_license
#include<iostream> #include<conio.h> #include<sstream> using namespace std; int main() { int a,n=0,ns[100]; while(1) //1 is true condition { cout<<"Enter number ["<<n<<"] :"; cin>>ns[n]; if(ns[n]==0) { break; } n++; } cout<<"\n"; for ( int i=0 ; i<n; i++) { cout<<ns[i]...
38155fa3ab76dec3fd2c7df4e2e6a24a1555b984
4f10a547a40eeaef214dce880b3d3481b1ee746c
KeiHasegawa/ISO_IEC_14882
/14_Templates/0_Templates/test131.cpp
C++
cpp
356
no_license
#include <stdio.h> template<class C> struct S { typedef typename C::X Y; template<class C2> void f(C2); }; struct T { typedef int X; }; int main() { S<T> x; x.f(3); return 0; } template<class C> template<class C2> void S<C>::f(C2) { printf("S<C>::f(C2) called\n"); Y y; printf...
d76763d123d028ac76e6636763e430e2b7211625
5e9f15c778a04469e6818cb8206b2e74fdbcdebd
ParinVachhani/coding-practice
/hackerrank/c++/classes/abstract-classes-polymorphism-1.cpp
C++
cpp
1,310
permissive
//Problem link - https://www.hackerrank.com/challenges/abstract-classes-polymorphism //Code author - Parin Vachhani - https://github.com/parinvachhani #include <iostream> #include <vector> #include <map> #include <string> #include <algorithm> #include <set> #include <cassert> using namespace std; struct Node{ Node...
725648e854e213e1d31cc3c49bfe8411972e19f8
02a78bd1f2e281e0ca4250442fa72639ac2a7eb4
Thomas-McKanna/Kattis
/mirror/main.cpp
C++
cpp
662
no_license
#include <iostream> #include <vector> using namespace std; int main() { int t, r, c; cin >> t; vector<vector<char>> img; for (int i = 0; i < t; i++) { cin >> r >> c; img = vector<vector<char>>(r, vector<char>(c)); for (int j = 0; j < r; j++) { for (int k = 0; k ...
e71d90ceab33c2bd8c025770232b0c8c9e6285d5
3f6c57a195937082cc11fea66540e7cc622a42c8
Rewasvat/Faculdade
/MAC420_ComputacaoGrafica/EP1/src/engine/inputmanager.cc
C++
cc
2,751
no_license
#include "inputmanager.h" #include <GL/glut.h> #include <engine/engine.h> #include <engine/eventhandler.h> namespace engine { InputManager::InputManager() { buttons_[0] = buttons_[1] = buttons_[2] = false; buttons_map_[0] = GLUT_LEFT_BUTTON; buttons_map_[1] = GLUT_MIDDLE_BUTTON; buttons_map_[2] = GLUT_RIGHT_BUTT...
ea1dc713e352c640ef730d09d48fcefefd523e7b
690065f3e5dd6dea3fc2a3c9f61429e6814025f6
mjuventus/Computer-Science-NSUOK
/CS 3403 - Data Structure/Assignment 2 - Linked List/NumberGenerator/cpp and header only/NumberGenerator.cpp
C++
cpp
5,824
no_license
// NumberGenerator.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <string> #include <random> #include <fstream> #include <ctime> #include "ListNode.h"; using namespace std; void CreateTxtFile(); void GenerateRandomArray(); void w...
976eacf09ef08a16282a083d4873075d4f96f01d
e109e4257d1c768ba9d24b780cc697a79a723483
sabjohnso/summation
/summation/details/NoEnhancement.hpp
C++
hpp
216
no_license
#pragma once // // ... Summation header files // #include <summation/details/import.hpp> namespace Summation::Details { template<typename T> using NoEnhancement = T; } // end of namespace Summation::Details
a6902911d6105036262c98f8e6798e53f584261d
1db66a032e3d210a151dea885c5d7db216c3ee92
Yang-33/competitive-programming
/Yukicoder/YUKICODER213.cpp
C++
cpp
3,698
no_license
#include <bits/stdc++.h> using namespace std; using VS = vector<string>; using LL = long long; using VI = vector<int>; using VVI = vector<VI>; using PII = pair<int, int>; using PLL = pair<LL, LL>; using VL = vector<LL>; using VVL = vector<VL>; #define ALL(a) begin((a)),end((a)) #define RALL(a) (a)....
3ae73c42060a5605a1d72f8b693bf1b61f0d0529
648a6dbc26acad4cfc19e08cd69e6cea96845fb5
Rahul-111/Competitivecode
/LinkList/LongestSubstringWithoutRepeatingCharacters.cpp
C++
cpp
500
no_license
class Solution { public: int lengthOfLongestSubstring(string s) { int l=0,r=0; int ans=0; unordered_set<int> hash; while(r<s.size()){ //is not present if(hash.find(s[r])==hash.end()){ hash.insert(s[r]); ans=max(ans,...
1e803b100d2c8c47b53ef01207dda59ac1444330
12032237035e25cb0d0ad4fde4905b279baec9ee
garrrick/hello-world
/gra.cpp
C++
cpp
1,468
no_license
#include "fun.h" #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] NumericVector gra(std::string dist_name, List mydata, NumericVector bp1, NumericVector bp2, NumericVector cu, NumericVector bindex, d...
afef41e1e9dce2f2e151b1db39d64fdd1399d350
6db2078a2d13de21d09ff0c46fd91ed7c9718a9f
BackupTheBerlios/wolfpack-svn
/tags/Release-12_9_13/server/src/network/asyncnetio.cpp
C++
cpp
21,366
no_license
/* * Wolfpack Emu (WP) * UO Server Emulation Program * * Copyright 2001-2004 by holders identified in AUTHORS.txt * 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 2 of t...
59ddf8aa21575a3064f376d8695eaf10424a4691
11bc552a969825de9d90022aa97dbf6e1171f87d
cpp-projects-showcase/QuaqraticEquation
/Eq2deg.cpp
C++
cpp
2,039
no_license
// ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// // STL #include <math.h> #include<iostream> #include <sstream> // Eq2deg object #include <Eq2deg.hpp> // ////////////////////////////////////////////////...
da550ac7aca79d3f05b3faf683bc8c19d3ccd1bc
c4992667cdd3ebae228ee3a4bfa5d637e282a326
EchoDemo/algorithm-notes
/Unit 2/2.5_experime.txt/matrix_transposition.cpp
C++
cpp
642
no_license
/* 将一个2行3列的矩阵(二维数组)行列互换,存储到另一个3行2列的矩阵中。 要求以整型数据为例来解答。 输入:输入2行数据,每行3个整数,以空格分隔。 输出:行列互换后的矩阵,3行,每行2个数据,以空格分隔。 */ #include "stdafx.h" #include<cstdio> #include<cstdlib> int main() { int a[2][3], b[3][2]; for (int i = 0;i < 2;i++) { for (int j = 0;j < 3;j++) { scanf("%d", &a[i][j]); } } for (int i = 0;i < ...
9e7ed4e93e0b03605d011b602ed2a81cc4552bdb
c04ccdc2ecfbfab6a371084f7896ada9a8e73c9c
Nuskit/OSiSP_Course_Project_Gauntry
/GameObjectTexture.cpp
C++
cpp
3,146
no_license
#include "stdafx.h" #include "GameObjectTexture.h" #include "ServiceManager.h" #include "DirectX.h" #include "d3dUtility.h" GameObjectTexture::GameObjectTexture(LPCWSTR nameFile, LPCSTR folder) :meshX(new MeshFromX()), textures(nullptr), materials(nullptr) { if (getServiceManager().getDirectX().loadMeshFromX(nameFile...
9e22be73d6adb6b7824399d7fb49cae5529775f8
fab5d599607bf6e007e97d4ed26a70ac51efe433
deepakantony/vispack
/src/param/param.cxx
C++
cxx
3,435
no_license
#include "param/param.h" extern "C"{ #include <stdio.h> } extern FILE *yyin; extern int yyparse(); extern void yyrestart(FILE *); extern void reset_yyvalues(); extern int syntax_error_count; extern VISParameterFile::File VPF_file_parse_result; namespace VISParameterFile { const value_type ValueTraits<float>::ValueT...
59eca5121e1c72ec67a5348c2cae8444bc3b4e82
47450d31542be6d952cb0eccbe227fd40b67e336
metux/chromium-suckless
/gpu/command_buffer/client/fenced_allocator.cc
C++
cc
8,209
permissive
// Copyright (c) 2011 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. // This file contains the implementation of the FencedAllocator class. #include "gpu/command_buffer/client/fenced_allocator.h" #include <stdint.h> ...
9d9a637c84a5f864934f2044e99b70577aba60fe
16238e3a4a169a7d4f94e31daabfecfec5a49924
trainesb/CSE335-Software_Design
/07_Homework/main.cpp
C++
cpp
1,813
no_license
/* * File: main.cpp * Author: Ben * * Created on February 5, 2019, 9:40 PM */ #include <cstdlib> #include <iostream> using namespace std; template<class QueueType, int QueueSize >class Queue{ protected: QueueType values[QueueSize]; int bottom, tp; public: queu...
4b47dd0fa4f2a01d22c31c2aa9948fc17d634e0e
12da273fb39c9fab4534f2cd7d94845621ad857b
mfornet/acm-icpc-solutions
/camps/havana-2017-leopoldo-taravilse/contest-05/auto/pyramid/sol.cpp
C++
cpp
893
no_license
#include <bits/stdc++.h> using namespace std; #define endl '\n' typedef long long int64; typedef pair<int,int> pii; typedef vector<int> vi; const int oo = 0x3f3f3f3f; const double eps = 1e-9; const int maxn = 1010; int64 mat[ maxn ][ maxn ]; int64 acc[ maxn ][ maxn ]; int64 MIN[ maxn ][ maxn ]; int main(){ ...
7e318cb7242e9bf4841f3b497696f50edee1be90
b488149e4e71e9c9573319dfe633194f8ea34ced
anzhou-li/chiyuan
/LeetCodes/T39_combination_sum/solution.cpp
C++
cpp
1,299
no_license
#include<iostream> #include<vector> #include<algorithm> #include "../vector_utils.cpp" using namespace std; void go_through(vector<int> &vi, int target, vector<vector<int>> &results, vector<int> &path, vector<int>::iterator begin){ // 终止条件: target=0 if(target==0) results.push_back(path); //每个节点遍历分支得到子节点时,不...
2eea684e1f426311c71647c07ae640888d5de1d1
eab2f941eb475989003b6a9e94180debfe916605
dummas2008/chromium
/src/content/common/gpu/media/gpu_video_encode_accelerator.cc
C++
cc
14,050
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 "content/common/gpu/media/gpu_video_encode_accelerator.h" #include "base/callback.h" #include "base/command_line.h" #include "base/logging.h" #i...
2cf5010f74495037cd560f0e95bf9188a445c2a2
29f6fa102a8241b255342814bc8c7bbc442cf8ae
dmitriy79/puisecoin
/src/qt/optionsdialog.cpp
C++
cpp
9,336
permissive
// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "optionsdialog.h" #include "ui_optionsdialog.h" #include "bitcoinunits.h" #include "monitoreddatamapper.h" #include ...
fc806c449d73dab5182a013d33a67de0a9db3d35
4d668ac1fbc45a1dd65297df170a2c8be6fef8f2
tahodzic/Chip-8-emulator
/Chip8/chip8.cpp
C++
cpp
12,327
permissive
#include "chip8.h" #include <windows.h> #include <conio.h> chip8::chip8(void) { } chip8::~chip8(void) { } void chip8::initialize(void){ // Initialize registers and memory once pc = 0x200; opcode = 0; InsReg = 0; sp = 0; // Clear display for (int i = 0; i < 2048; ++i) gfx[i] = 0; // Clear stack for (i...
fcbf8e3acf16318bf57cca3b20bbc3a4ad762d07
1369358f2607424e41f2828a97104e3018196374
f0829/kovri
/src/core/router/info.cc
C++
cc
37,329
permissive
/** // * Copyright (c) 2013-2017, The Kovri I2P Router Project // * // * All rights reserved. ...
f38c808b407b28f7a9d754b629d75930327a99c9
c8754e14a287f6b34f1509ea48a7162197267c8b
1991jesle/chromium
/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
C++
cc
76,294
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" #include <set> #include <utility> #include "base/command_line.h" #include "base/feat...
fc5e3f9611a2a85a99d5bc9df1e67e49cad23816
7c4b53733697befe6ab97675e481c0e4306a7692
GaretJax/pop-utils
/examples/master/packages/popc/services/jobmgrpublish.cc
C++
cc
929
permissive
#include <stdio.h> #include <errno.h> #include <string.h> #include "jobmgr.ph" int main(int argc, char **argv) { char master[256]; char slaver[256]; if (paroc_utils::checkremove(&argc,&argv,"-help")!=NULL) { printf("Usage: jobmgrpublish [-help] [jobmgr contact | jobmgr host]\n"); return 0; } if (argc<=1) ...
63eb15f88384809e54ad7ee558ac2f2e146b44c7
67c5df4473bb0e16f9a5525e39ae514c3c78d64f
frewerins/buildsystem-hw4
/way2/main2.cpp
C++
cpp
571
no_license
#include "map.h" #include <opencv2/core.hpp> #include <string> #include <opencv2/imgcodecs.hpp> int main() { auto file = cv::imread("../../data/file.jpg"); for (size_t i = 0; i < file.rows; ++i) { for (size_t j = 0; j < file.cols; ++j) { auto& item = file.at<cv::Vec3b>(i, j); f...
398f3850d37b1d9ea4a20c503cceee7ea0d899e7
43d99b1410f5b90de013116e9eba614b3e0847b4
chromium/chromium
/ash/system/toast/toast_manager_impl.cc
C++
cc
11,422
permissive
// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ash/system/toast/toast_manager_impl.h" #include "ash/public/cpp/system/scoped_toast_pause.h" #include "ash/session/session_controller_impl.h" #include "ash/shell.h" ...
798c713b1f3290a8ade9ff8400dbbd50e5180257
539819405e9d8593107fc447f9dfe4ccb0e7975a
jhnnsrs/visualize
/src/JFragment.cpp
C++
cpp
521
no_license
#include "JFragment.h" JFragment::JFragment(void) { mesh.enableIndices(); mesh.setMode(OF_PRIMITIVE_TRIANGLE_STRIP); starttime = ofGetElapsedTimef(); direction = ofVec3f(1,0,0); velocity = 200; } JFragment::~JFragment(void) { } void JFragment::update() { float t = ofGetElapsedTimef() - starttime; velocity -...
dda59885c59292040944a4b9db07316dac3c3b66
265bd237ea34de3e68119a7ad876a7731de4482f
Arryboom/AutoProfilingToolTrunk
/HookD3DAll/recoder.cpp
C++
cpp
22,254
no_license
#include "recorder.h" void Recoder::init(char * path, char * prefix, char * setName){ FILE * setFile = NULL; char fullPathForSet[MAX_PATH] = {0}; // get the prefix from the full path game name char name[100] = {0}; char * p = prefix; char * lastSlash = NULL; while(*p){ if(*p == '\\'|| *p == '/'){ lastSla...
770afc397a3c65ddf3847936fa595735ee93f782
894f00141aba2326b3ee49bc747b7bcbd7e8a186
niuxu18/logTracker-old
/second/download/git/gumtree/git_old_hunk_3773.cpp
C++
cpp
1,025
no_license
} } /* Make sure leading directories are created */ status = safe_create_leading_directories_const(path); if (status) { if (status == SCLD_EXISTS) { /* something else exists */ error(msg, path, _(": perhaps a D/F conflict?")); return -1; } die(msg, path, ""); } /* * Do not unlink a file in th...
21905bff5acfe2cbc0bfd8112359263166df2307
f28f5aa282a5966ff9c8e0570d808493c6a3e097
new-TonyWang/renderdoc
/renderdoc/driver/d3d12/d3d12_command_list3_wrap.cpp
C++
cpp
1,699
permissive
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2019-2021 Baldur Karlsson * * 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...
fe976c9371f639f3c462d39b8e2e76ef85703c7f
ac2a6074edcaba52366ba31a509bfc03a3d53b84
patrykcwirko/Przemysl4_Projekt1
/Problem.cpp
C++
cpp
4,845
no_license
#include "Problem.h" #include <iostream> Problem::Problem() : city_count(0) , cars(0) , unit("") , centMag() { } Problem& Problem::operator=(const Problem& s) { tab = s.tab; unit = s.unit; city_count = s.city_count; citis = s.citis; cars = s.cars; perm = s.perm; centMag = s.centMag; r...
b5d46f78c26d641faf65d2a95a94c0f3a745a888
304da4225e6a5d65024e52b9a203c7b2ba6f594d
efficient/cicada-exp-sigmod2017-ermia
/dbcore/sm-log-segments.cpp
C++
cpp
7,947
permissive
#include "sm-log-segments.h" #include <memory> log_segment_mgr::log_segment_mgr(uint64_t ssize, uint64_t scsize) : segment_size(ssize) , segment_close_size(scsize) , active_segment(rcu_alloc()) , segment_change_mutex(PTHREAD_MUTEX_INITIALIZER) { active_segment->start_offset = 0; active_segment...
35f6979b040c963a4de48cdffd87c48a4977517a
ab2a031622825a978c782c5f3375a0c55b3712d8
jgaloguz/numerical-methods
/array_sorters/bubble_sort/bubble_sort.cpp
C++
cpp
3,720
no_license
// Bubble-sort method for sorting array of integers #include <cmath> #include <iostream> #include <iomanip> #include <fstream> #include <random> using namespace std; // Swap function void swap(int * a, int * b) { int temp = *a; *a = *b; *b = temp; } // Bubble-sort function void BubbleSort(int * A, int N) { ...
9e00515d6ea97744afcaeb16cf599b228b704702
bf5be55739fd3748328d85be9c6bb34f3118ead9
jjzhang166/Akanya
/externs/glm/gtx/number_precision.hpp
C++
hpp
2,133
no_license
/// @ref gtx_number_precision /// @file glm/gtx/number_precision.hpp /// /// @see core (dependence) /// @see gtc_type_precision (dependence) /// @see gtc_quaternion (dependence) /// /// @defgroup gtx_number_precision GLM_GTX_number_precision /// @ingroup gtx /// /// @brief Defined size types. /// /// <glm/g...
0b2405b39e34e97ada50d44ec4b4a1049bbabe60
00846e805828d37b3f543c5bb8fdd938e23c326c
Armenuhi-Qocharyan/ITC-8
/Homework/Mary_Antonyan/Data_Structures/07_04_2017/Deque/linkedlist.cpp
C++
cpp
2,375
no_license
#include "linkedlist.hpp" #include <iostream> namespace List { LinkedList::LinkedList() : head(nullptr) , length(0) {} LinkedList::LinkedList(const LinkedList& other) : head(nullptr) , length(0) { Node* current = other.head; for (int i = 0; i < ...
1ca0616f31923be1670f0081be8cd208f8e8582b
784e1d23109ded04d0e4508f753326084c9ce97f
philippe554/Andantino
/GLib/src/MovingView.cpp
C++
cpp
12,013
no_license
#include "../include/GLib.h" namespace GLib { void MovingView::init(bool _horizontal, bool _vertical) { int xSize = place.right - place.left; int ySize = place.bottom - place.top; horizontal = _horizontal; vertical = _vertical; horizontalScrollZoom = false; verticalScrollZoom = false; if (vertical &...
4c7e79e81500243d98cc2bb0dcf6e29fb6252179
ff36779194491658f695e7422a505bc7f85a9c0b
allender/apple2emu
/src/debugger_disasm.cpp
C++
cpp
20,169
permissive
/* MIT License Copyright (c) 2016-2017 Mark Allender 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,...
ddc8284bf2a78f31fa0e9ea18766aad6a6d4839f
042b271a093e340d4115a20a65be1f12ff5b3da4
torch-points3d/torch-points-kernels
/cpu/src/bindings.cpp
C++
cpp
4,316
permissive
#include "ball_query.h" #include "fps.h" #include "interpolate.h" #include "knn.h" using namespace pybind11::literals; PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { m.def("dense_knn", &dense_knn, "", "support"_a, "querry"_a, "k"_a); m.def("knn_interpolate", &knn_interpolate, "", "features"_a, "idx"_a, "weights"_...
4e8c63eafad474bfd5681a3562f410e3209a2444
e036b00208114a2c751f39cde2a744bc1d0a7072
pbeeken/VernierLabProj
/lib/VernierVoltage/examples/VernierVoltageTest.cpp
C++
cpp
1,124
permissive
/*** * Test Platform for Vernier Interface Shield ***/ #include <Streaming.h> #include <VernierBlinker.h> #include <VernierVoltage.h> VernierBlinker theLED; VernierVoltage theSensor( VernierVoltage::BTA01 ); bool amIdone(); void setup() { Serial.begin( 115200 ); theLED.turnOn(); Serial << "Testing Diff Vol...
5671ef273cabe65d2ff0b8def8525eaf6f67b1ee
412cf57c55265104d0ed86e895173575cf5b889a
qiatongxueshaonianC/CaiZebin-Code_warehouse
/高级专题/普通图求最大团、最大独立集/Pat顶级1021/第二次写/main.cpp
C++
cpp
1,793
no_license
#include<bits/stdc++.h> using namespace std; const int maxn=1010; int N,M,Price[maxn],G[maxn][maxn],best,Min_Price=INT_MAX,Stack[maxn][maxn],dp[maxn]; vector<int> A,ans,temp; int mp[maxn],rmp[maxn],cnt=1; void DFS(int idx,int total,int cnt,int price){ if(total==0){ if(cnt>best||(cnt==best&&price<Min_Price)){ Min...
18f7400dc85cccee118116a6918a9670a69023ae
c4b3f9c393c2994b54b9e3a93aa8b293f499901a
wesmail/hydra
/old_hydra/hydra/branches/v3_04stable/rich/hrichparhadasciifileio.cc
C++
cc
6,613
no_license
// File: hrichparhadasciifileio.cc // *************************************************************************** //*-- Author : Witold Przygoda (przygoda@psja1.if.uj.edu.pl) //*-- Modified : 1999/12/04 by Witold Przygoda (przygoda@psja1.if.uj.edu.pl) #include <iostream.h> #include "hrichparhadasciifileio.h" #includ...
8d22b491e22301e76e6b4e98e8d2fb2aa8dbd326
4a2ea82783af127e533586cac50dfdfea682db02
iamdeepti/100DaysOfCode
/660-div2/C.cpp
C++
cpp
1,336
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define f first #define s second #define pii pair<int,int> #define pb push_back #define mk make_pair #define vi vector<int> vi p,a,h,go; vector<vi> g; bool access=true; void dfs(int s,int ancestor) { a[s] = p[s]; int s...
ea325484244f4b58eaff000aabf61c0b1aa062b8
181396dadfb954965804984a584af60635f32d83
chinchila/ICPC
/code/data_structures/segtree.cpp
C++
cpp
1,361
no_license
// Index 0 // O(n log n) build | O(log n) query // check if 0 should be returned on query (INF on max/min) #define ll long long ll st[MAXSEG]; ll lazy[MAXSEG]; void build(int node, int s, int e, ll *v){ if( s == e ) st[node] = v[s]; else{ int m = (s+e)/2; build(2 * node + 1, s, m, v); b...
e454a5bfe7622d0748a734db7900c1bfd3b68cf9
5dc8c93f7a0a2a08c03d6e9788f2353a67ddca3f
OperationSleepyWeasel/PirexPickleBlowfish
/src/logic/Field.hpp
C++
hpp
470
no_license
#ifndef FIELD_HPP #define FIELD_HPP #include <gtest/gtest.h> #include "Token.hpp" #include "Side.hpp" class Field { public: Field(void); ~Field(void) {} //getters Token* getToken(void); Field* getNeighbour(Side side); void setToken(Token* token); void addNeighbour(Field* field, Side side); private: ...
b0aca300e240f8a2381ce212276b76b9c8c08b8f
761a3c48136a4165f824deb889db482240a91bda
magrawal128/ngraph
/src/ngraph/op/util/index_reduction.cpp
C++
cpp
4,313
permissive
//***************************************************************************** // Copyright 2017-2019 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://w...
7b8add492edd7dbc52d8fa102f41732639faef73
98253b5e63d6ce0cc6825e86c91f3ac3ed5a2c81
prolog/shadow-of-the-wyrm
/engine/calculators/source/CarryingCapacityCalculator.cpp
C++
cpp
4,302
permissive
#include "CarryingCapacityCalculator.hpp" CarryingCapacityCalculator::CarryingCapacityCalculator() : CARRYING_CAPACITY_TOTAL_ITEMS_MULTIPLIER(10), carrying_capacity_multipliers({{CreatureSize::CREATURE_SIZE_TINY, 1.0f}, {CreatureSize::CREATURE_SIZE_SMALL, 1.0f}, ...
ba2968cd9f7f643637007b475a661f2ac5b90ca8
d91c4dc007aed1d294e02068237aba539745647e
MineGoldCoin/MineGoldCoin
/src/qt/walletmodel.cpp
C++
cpp
20,666
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "walletmodel.h" #include "addresstablemodel.h" #include "guiconstants.h" #include "recentrequeststablemodel.h" #incl...
65ee75ba9e25217976066c49752c930d5dca6a63
6f08cecdba85e82badecb9fcf4328c847f5f47b2
jacoloves/docker_for_clang
/src/cpp_robe/mod/Array1.cpp
C++
cpp
220
no_license
#include <iostream> using namespace std; int main() { int a[2]; a[0] = 1; cout << "a[0] = " << a[0] << endl; a[1] = 2; cout << "a[0] = " << a[0] << endl; a[0] = 3; cout << "a[0] = " << a[0] << endl; }
09175e3dda41060f97fa8dec07778a0554d728be
ff441647a099fbd3d8278a58ebd9b8bef27d9955
pitmonticone/individual
/src/categorical_variable.cpp
C++
cpp
2,028
permissive
/* * state.cpp -> variable.cpp * * Created on: 19 May 2020 * Author: gc1610 */ #include "../inst/include/CategoricalVariable.h" #include "utils.h" //[[Rcpp::export]] Rcpp::XPtr<CategoricalVariable> create_categorical_variable( const std::vector<std::string>& categories, const std::vector<std::stri...
f8173c1366418d9f414562d75f057aa76033b73b
a666f86015518627c976bc861ff7dba20bb0f9d9
CasperBHansen/CPP
/13/13-6.cpp
C++
cpp
817
no_license
/* * 13-6.cpp * * Add a class to the system to represent students taking the * course for pass/fail credit. Assume that such students need * not do the homework, but might do so. If they do, the homework * should participate in determining whether they passed or failed, * according to the normal formula. If they...