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
ddd8b93580dcf605e004c7e734d09a46f6abb302
f5bcda4d54c16a1366d456ea070012668dbbdf4c
seemantaggarwal/CODEFORALL
/ALGOS in C++/SORTINGS AND SEARCHINGS/bookallocationproblem.cpp
C++
cpp
1,006
no_license
#include <iostream> using namespace std; #define ll long long int bool isValidConfig(ll books[], ll bookno, ll students, ll mid) { int student = 1; ll currpages =0; for(int i=0; i<bookno; ++i) { if(currpages+books[i]>mid) { student++; } else { currpages+=books[i]; } if(student >...
3fd8285971e27a08695e5c5d89f19d150721b448
1b7edf17c88bb1532bf0356a929e3a4b10b4545b
Tomma94/CLEAN-Plus-Plus
/src/oclint-metrics/lib/util/Edge.cpp
C++
cpp
683
permissive
#include "oclint/util/Edge.h" Edge :: Edge(Vertex *firstVertex, Vertex *secondVertex){ this->firstVertex = firstVertex; this->secondVertex = secondVertex; (this->edge).push_back(firstVertex); (this->edge).push_back(secondVertex); } bool Edge :: containVertex(Vertex *vertex){ if (*((this->edge).fron...
e7c186a1b92f9800086354b63ae681a81784c061
4c9e4aef7e4eea549d798276b0c486dfb99bcf26
iseki-masaya/topcoder
/Div1/SRM493Div1/Easy.cpp
C++
cpp
2,988
no_license
#include <vector> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <list> #include <algorithm> #include <sstream> #include <set> #include <cmath> #include <map> #include <stack> #include <queue> #include <cstdio> #include <cstdlib> #include <cstring> #include <numeric> #include <bits...
556d809eb2e998378d219876824f3a2732209838
848134a7ef9fe947782e6d622bfd0cfd4a718294
guitarhua/zircon
/kernel/syscalls/syscalls_zircon.cpp
C++
cpp
9,050
permissive
// Copyright 2016 The Fuchsia Authors // // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT #include <err.h> #include <inttypes.h> #include <platform.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <...
b0dbc2bd7bc3597108c3e1d5dba25bea313f46ed
e99e25a22cc646431615d36168f02464375eacbc
siconos/gazebo-siconos
/gazebo/common/AudioDecoder.hh
C++
hh
2,809
permissive
/* * Copyright (C) 2012-2016 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
d3ef24ab9212b1ec4ccb5e11585e23635a610e34
f007aba853a02c50865c732fbaee4fbbbdc5c850
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function13708/function13708_schedule_6/function13708_schedule_6.cpp
C++
cpp
939
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function13708_schedule_6"); constant c0("c0", 16384), c1("c1", 4096); var i0("i0", 0, c0), i1("i1", 0, c1), i01("i01"), i02("i02"), i03("i03"), i04("i04"); input input00("input00", {i1}, p_int3...
46d3136520b7d9135fb5ce9ebc58069b0c7cad7e
a119f5ba60fb64d968bcc56d6b711474a47e9ff6
azozello/resque
/AutoStationFull/classes/cpp/Manager.cpp
C++
cpp
10,992
no_license
// // Created by azozello on 10.05.17. // #include <fstream> #include <algorithm> #include "../h/Manager.h" Manager::Manager(const string &name, const string &password) : Human(name), password(password) {} Manager::Manager() {} const string &Manager::getPassword() const { return password; } void Manager::setPa...
d97fd6af4d0be9ea8c2fd69ea443b30045953626
596458d37d2dcd6d500aeb5003116b46dcfa9d1a
intel/llvm
/flang/lib/Optimizer/CodeGen/CodeGen.cpp
C++
cpp
167,422
permissive
//===-- CodeGen.cpp -- bridge to lower to LLVM ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
4bb915534abde19a158a580ea5f2fda7acae8ec3
e472236683fafe7196dad9b0785d4f8896436708
PrincetonUniversity/athena
/src/outputs/history.cpp
C++
cpp
19,118
permissive
//======================================================================================== // Athena++ astrophysical MHD code // Copyright(C) 2014 James M. Stone <jmstone@princeton.edu> and other code contributors // Licensed under the 3-clause BSD License, see LICENSE file for details //===============================...
f9e18ac486a9fe0a83e9e9a30b1aed936893ff6a
cd6dac87055b25c6a734441537dfd7842d7ca98f
Aspenka/ORM
/src/tableschema.cpp
C++
cpp
10,838
no_license
#include "tableschema.h" #include "globaldata.h" #include <QDateTime> /*============================================================================= Конутрктор по умолчанию. QString table - имя таблицы, по которой нужно сгенерировать схему QString dbName - имя БД, в которой хранится таблица =======================...
84d4c0ff17356ec34ee89e2e32ccd4e61eed9f70
17cc2a48ec69bf77bd292ea7ade727821ec86c4a
mediabuff/app
/appseed/base/user/hotplugin/hotplugin.cpp
C++
cpp
2,928
no_license
#include "framework.h" //#include "base/user/user.h" //#include "hotplugin.h" #ifdef HOTPLUGIN_SUBSYSTEM namespace hotplugin { ::axis::system * g_paxissystem = NULL; int g_iSystemCount = 0; uint32_t c_cdecl base_system_main(LPVOID lpVoid); CLASS_DECL_BASE ::axis::system * get_axis_system() { ...
b4ba49877b3ad3f281576272e7357d1baa7cb4b2
d0512d06c6617744cbc30cf11df33c205040b5bd
thuvanhoang00/ThucTapVB2
/main.cpp
C++
cpp
662
no_license
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QDebug> int main(int argc, char *argv[]) { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif QGuiApplication app(argc, argv); QQmlApplicationEngine engine; const QUrl url(Q...
d6b5b96671e4ca717f0320a29266ab2b6f7e5b7e
7d2e3a205d751bcfb4275ee71a5bd1fc696f904f
SREERAGI18/chromium
/chromeos/process_proxy/process_proxy.cc
C++
cc
8,635
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 "chromeos/process_proxy/process_proxy.h" #include <stddef.h> #include <stdlib.h> #include <sys/ioctl.h> #include <termios.h> #include <util...
62568282c13a3c722a24ff0a5ca3d6040259efc9
d5579bfc5536f539ee758f303d18cda78b32e8c7
japthor/Pastorse-Engine
/_src/PastorseCamera.cc
C++
cc
849
no_license
#include "PastorseCamera.h" #include "PastorseGPU.h" #include <stdio.h> PastorseCamera::PastorseCamera() { projection_ = glm::mat4(1.0f); view_ = glm::mat4(1.0f); } void PastorseCamera::setLookUp(glm::vec3 position, glm::vec3 target, glm::vec3 up){ view_ = glm::lookAt(position,target, up); position_ = position; ...
f7c17f0285191e616541cfbfba5bf816cc815b15
cfa1da37d13393df8d155af362a9bf4cc09369cf
yumiris/OpenSauce
/OpenSauce/Halo1/Halo1_CE/Interface/UIWidgets.cpp
C++
cpp
3,060
no_license
/* Yelo: Open Sauce SDK Halo 1 (CE) Edition See license\OpenSauce\Halo1_CE for specific license information */ #include "Common/Precompile.hpp" #include "Interface/UIWidgets.hpp" #if !PLATFORM_IS_DEDI #include <YeloLib/Halo1/open_sauce/project_yellow_global_definitions.hpp> #include <YeloLib/Halo1/op...
ef7dda87d854c33d41004bf2336052f19c3fac15
e23520657f0a94b7e59008d531280e54bc89d92d
MistrzowieKodowania/cPlusPlusMaterials
/Kalkulator/engine.cpp
C++
cpp
946
no_license
#include "engine.h" #include "examples.h" Operation parse_operation( string operation ) { istringstream soperation(operation); Operation descriptor; while (!soperation.eof()) { string sub; soperation >> sub; // cout << "Substring: " << sub << endl; // system("pause"); i...
5dcf9e03c6f8b5606961b762b703ce1af3f1fc61
84de094d4e8dab2d38242572758ebeaaf08f6b17
JinAirsOs/pdfium
/xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.cpp
C++
cpp
76,444
permissive
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "xfa/src/fxfa/src/parser/xfa_layout_pagemgr_new.h" #include "xfa/src...
2adde4d321d1ae891c7a4f6e17586ac92eecf0c6
aa01f1a4caaf557f73dbb055ae71a9394c9c8d1d
Nyatl/acm-archive
/neerc 2016/plushki/s214-j-6.cpp
C++
cpp
3,034
no_license
#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<iostream> #include<vector> #include<string> #include<string.h> #include<set> #include<map> #include<iomanip> #include<functional> #include<cstdlib> #include<cmath> #include<queue> #include<deque> #include<algorithm> #include<ctime> #inc...
00ec2d49b43501711ff66bf50d17aeed17a43890
457b0d63c6f65f1abc122335bb4abf5d678670c4
booknu/PS_Relative
/Books/C++프로그래밍/Chapter 13/OOP_HighCreditAccount.cpp
C++
cpp
823
no_license
/************ <주소> : p553 - OOP 프로젝트 10단계 ********** <해결방안> : ********** <오답노트> : */ #include <iostream> #include "OOP_HighCreditAccount.h" using namespace std; HighCreditAccount::HighCreditAccount(int accID, String name, int money, int interest, int credit) : NormalAccount(accID, name, money, interest), credit(...
1825433ff542bcc469706833ea4907b2c14b90f9
553fe1edafcb79523f99c714de14412b9395f6fa
SnowMasaya/onnx-tensorrt
/onnx2trt_utils.hpp
C++
hpp
12,965
permissive
/* * Copyright (c) 2018, NVIDIA CORPORATION. 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...
d3c38e70058ec374bf34e4f172ba82c14fb395ce
50c256eab864bde1f7b6a4ed89b3ffd63352d25a
GameDevCPP/bespokeassetmanagertool-mateusz-kolodziejczyk
/AssetTool/main.cpp
C++
cpp
4,829
no_license
#include <SFML/Graphics.hpp> #include "TileMap.hpp" #include "Display.h" #include "MapData.h" #include "FileIO.h" #include "TilesDisplay.h" #include <TGUI/TGUI.hpp> #include <nlohmann/json.hpp> #include <fstream> #include <iostream> #include <utility> // for convenience using json = nlohmann::json; bool save(std::stri...
3338086c3b5471dabf377a277cf5281137a69355
7f257f721bfd65dbee08375979379ec4e69af139
ykaganov/UE4GitPlugin
/Source/GitSourceControl/Private/GitSourceControlUtils.cpp
C++
cpp
54,043
permissive
// Copyright (c) 2014-2020 Sebastien Rombauts (sebastien.rombauts@gmail.com) // // Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt // or copy at http://opensource.org/licenses/MIT) #include "GitSourceControlUtils.h" #include "GitSourceControlCommand.h" #include "HAL/PlatformProcess.h" #incl...
070590fffeb20386738f7372ca21f95dc45808ee
09200b97a79230ef2c3fb114e9345fc35c9a5397
EAirPeter/udc
/udc/ast/ReadLine.cpp
C++
cpp
291
no_license
#include "../IndentHelper.hpp" #include "ReadLine.hpp" namespace udc::ast { ReadLine::ReadLine(const location &loc) noexcept : ExprBase(loc) {} ReadLine::~ReadLine() {} void ReadLine::Print(std::ostream &os, std::uint32_t cIndent) const { os << Indent(cIndent) << "ReadLine()"; } }
143c677684daec4227829a674ba9b8de850e78c2
3f201225d2fa742ef687c34164d4740607f4018c
limmh/resource_management
/include/res_mgr_resource.hpp
C++
hpp
2,620
permissive
/* The MIT License (MIT) Copyright (c) 2016 - 2017 MH Lim Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
d8ab6aace6295b946e2b208a7f7df4d78f3ec45a
597507933717b8a1f87b7e97a52e011d32cf43e6
deathcod/mycode
/coding_competition/codevista/double_add_one.cpp
C++
cpp
575
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> int min(int x,int y){return(x<y)?x:y;} int max(int x,int y){return(x>y)?x:y;} int a[2500007]={0}; int main(int argc, char const *argv[]) { int x=sqrt(2500006); for(int i=2;i<=x;i++) { for(int j= i*i;j<=2500006;j+=i) a[j]=1; } int n,m,temp=0; scanf("%d ...
291861affb6b6a8be8fa7735d804f3dd07ae7e18
9e81d28010a02546965eae92115e8c3db000f136
Rpersie/AMTL-BNFs-i-vector-based-LR
/bin/ivectorconv/conv-ivector-extractor.cc
C++
cc
18,972
no_license
// ivector/ivector-extractor.cc // Copyright 2013 Daniel Povey // Copyright 2015 Srikanth Madikeri (Idiap Research Institute) // Revised 2018 JerryPeng // 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...
7f4c4222c96483ee8394a67ce99ff831890d448b
af665b19c5be2d42540c35ecd64d9457c86186b1
wbgilmartin/rocBLAS
/library/src/blas2/rocblas_symv.hpp
C++
hpp
10,812
permissive
/* ************************************************************************ * Copyright 2019-2020 Advanced Micro Devices, Inc. * ************************************************************************ */ #pragma once #include "handle.hpp" /** * Computes y := alpha*A*x + beta*y where A is a symmetric matrix. * ...
45c0d3ca71f7f23955b6b461e6a475700dd96496
fa4208c4d9898851ee2d2a09ccab3776e80cae6e
murdercdh/PKU_ACM
/code/1006.cpp
C++
cpp
465
no_license
#include <iostream> using namespace std; int main() { int p,e,i,d,c; int count=0; freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); //中国余数定理 while(1) { scanf("%d%d%d%d",&p,&e,&i,&d); if(p==-1&&e==-1&&i==-1&&d==-1) break; count++; p%=23; e%=28; i%=33; c=(5544*p+14421*e+1288*i)%21252; ...
0045734acead5d682f98401c3ebe43b615a94a6f
f7c62568312e78f2bc6be44fe1d1b5d1cadf748b
Neconspictor/Euclid
/projects/engine/nex/anim/BoneAnimation.cpp
C++
cpp
3,139
no_license
#ifndef GLM_ENABLE_EXPERIMENTAL #define GLM_ENABLE_EXPERIMENTAL #endif #include <nex/anim/BoneAnimation.hpp> #include <nex/anim/Rig.hpp> #include <nex/util/ExceptionHandling.hpp> #include <algorithm> #include <nex/math/Math.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/quaternion.hpp> #include <nex/an...
e5960ce7e657a715c737b0a4b61abc5640a52b45
224c976a5862ccb497ad2ead7e1d9449382dc1c1
vbtang/DevSoft
/Src/Edislab/Include/Bcg/BCGPTabbedControlBar.cpp
C++
cpp
7,662
no_license
//******************************************************************************* // COPYRIGHT NOTES // --------------- // This is a part of BCGControlBar Library Professional Edition // Copyright (C) 1998-2016 BCGSoft Ltd. // All rights reserved. // // This source code can be used, distributed or modified // only unde...
b5e74493d729fa3a201a488df83995949215a1a8
50ed569d32956991ec809a739614ae1883d05d69
oway13/project-presentation
/Harold CPP/sky.cc
C++
cc
1,799
permissive
//... /// Projects a 2D normalized screen point (e.g., the mouse position in normalized /// device coordinates) to a 3D point on the "sky", which is really a huge sphere /// (radius = 1500) that the viewer is inside. This function should always return /// true since any screen point can successfully be projected onto...
dfa37dd1c6d44f2d7fbbc5aeae6d64424e36923f
026f3c2b30cbf808575b1f043f7db57f38a87a8e
christophpickl/ponyo-svn
/artifact/cpp-playground/jna-playground/trunk/native/_old_sources/PnJnaCpp.cpp
C++
cpp
1,072
no_license
#include <stdio.h> #include <XnCppWrapper.h> #define CHECK(returnCode) \ if(returnCode != XN_STATUS_OK) { fprintf(stderr, "%s\n", xnGetStatusString(returnCode)); exit(1); } xn::Context context; //extern "C" void baz(/*type* var*/){ // var->foo(); //} extern "C" void init(){ printf("C init()\n"); CHECK(context.I...
f7fd32ce0b77e450e5555e7ed550acdc757bfdfc
5bee349b781b6b212d88f880a2b84baa3a7e472b
frankiegu/WriterFly
/settings/usersettingsitem.cpp
C++
cpp
7,022
no_license
#include "usersettingsitem.h" /** * 添加字符串形式的设置项 * @param key 设置项关键词 * @param title 设置项标题 * @param desc 设置项描述 * @param tip 设置项提示(鼠标悬浮) * @param val 设置项字符串值 */ UserSettingsItem::UserSettingsItem(QString key, QString title, QString desc, QString tip, QString val) : key(key) { QHBoxLayout* hlayout = new...
6bfe7ab1a706a84767365c5fb7009a463f5cd941
2a1cd6d8c00eae8458bd896922ab1595262bf9d6
ioanaif/awkward-1.0
/src/libawkward/typedbuilder/IndexedOptionArrayBuilder.cpp
C++
cpp
6,012
permissive
// BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE #define FILENAME(line) FILENAME_FOR_EXCEPTIONS("src/libawkward/builder/IndexedOptionArrayBuilder.cpp", line) #include "awkward/typedbuilder/IndexedOptionArrayBuilder.h" #include "awkward/typedbuilder/TypedArrayBuilder.h" #include...
daeb91390caf474fdfd241da163cb8f45e592e5f
29b25c7ed9d8e4129fa88e9c386087efc97789e7
Kumazuma/3D_Project
/Game/PhysicsManager.hpp
C++
hpp
2,907
no_license
#pragma once #include<memory> #include<unordered_map> #include<StringLiteral.h> #include"typedef.hpp" #include<unordered_set> #include<SpinLock.hpp> #include<vector> #include <Game/component.hpp> #include <optional> #include<DirectXMath.h> #include <Game/event.hpp> #include "PhysicsCharacterController.hpp" #include "Si...
d1bcd3f386d448a756ba956d5fcd103e49c1c8ef
4508b45421967615dbe0849c36220e2283efc8fe
HafizHamza19/C-Plus-Plus-41-Question-of-Assignment
/Q18/Q18/Q18.cpp
C++
cpp
670
permissive
#include <iostream> #include <conio.h> using namespace std; int main() { char hafiz; cout<<"Do you have children? \n Ans: "; cin>>hafiz; char hamza; cout<<"\nDo you have lots of money? \n Ans: "; cin>>hamza; char hamza19; cout<<"\nDo you like trucks? \n Ans: "; cin>>hamza19; if(hafiz=='n'&& hamza=='y' &...
f7ea9902b17c687c9d47dd7666a90e5a8955e3ae
a67974677658a90b4a6803912df12eac72eb0263
manasij7479/cbmc
/src/goto-programs/goto_inline.cpp
C++
cpp
21,745
permissive
/*******************************************************************\ Module: Function Inlining Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ #include <cassert> #include <util/prefix.h> #include <util/cprover_prefix.h> #include <util/base_type....
35f1df373c580747588bf129a3a449051c1b0ca3
6242590cebcc395d1aca0739e8db75aa5e2a89a8
jhgarner/Slip-Programming-Language
/language.hpp
C++
hpp
894
no_license
#include <vector> #include <string> #include <functional> #include <map> using namespace std; // grouping functions void addNum(map<string, function<string(vector<string>)>>& m); void addIO(map<string, function<string(vector<string>)>>& m); void addString(map<string, function<string(vector<string>)>>& m); map<string,...
503eab9b6c8ef07141c87f5ae43ea29c6e6c583d
8edd487ace3bf63aabcde2719995c2310ee6ae1a
MattConce/beep
/src/capivara.cc
C++
cc
2,501
no_license
#include <cstdio> #include <array> #include <string> #include "libircclient.h" #include "libirc_rfcnumeric.h" #include "bot.hh" #include "instant_log.hh" #include "utils.hh" #include "io.hh" #include "cmd/listener.hh" #include "cmd/help.hh" #include "cmd/echo.hh" #include "cmd/leave.hh" #include "cmd/lastseen.hh" #...
29ead38d7a1a97e454fc14868078d24f90be33a8
c7ac370dba3c7776709d18cedeb5d1fb21d0ddde
shibajyoti20/DSA_practice
/cpp program/Misc./Bit Manipulation/bitman.cpp
C++
cpp
591
no_license
#include<iostream> using namespace std; //Get Bit function int getbit(int n, int pos) { return (n & (1<<pos)!=0); } //Set Bit function int setbit(int n,int pos) { return (n | (2<<pos)); } //Clear Bit function int clearbit(int n,int pos) { int mask = ~(1<<pos); return n & mask; } // Update Bit functi...
1b18ce36443a7507260bd222fddc2da0c981239c
5278ad2ae3f891995c8547b26f9349d5b98e9656
li5ch/tencentcloud-sdk-cpp
/cvm/src/v20170312/model/ModifyHostsAttributeResponse.cpp
C++
cpp
2,463
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
fe007055f02a89bbeb24a2ba73d67b3cfad9d868
40b34a7f24394619c263d40bbe928d8bc1dbc1af
CarterTsai/clasp
/src/tests/wxWidgetsOpenGl/wxgl.cc
C++
cc
5,362
no_license
#include "wx/wx.h" #include "wx/sizer.h" #include "wx/glcanvas.h" #include "wxgl.h" // include OpenGL #ifdef __WXMAC__ #include "OpenGL/glu.h" #include "OpenGL/gl.h" #include "GLUT/glut.h" #else #include <GL/glu.h> #include <GL/gl.h> #include <GL/glut.h> #endif class MyApp: public wxApp { virtual bool OnInit(...
046120eb0139ab952543eaf37aa28bffec85aad9
92b4fc390f3175da45ca95ecb15e481d13b8ceaa
KDelli/Projet_Litchi
/Projet_Litchi/UserManagement/userSettings.cpp
C++
cpp
1,680
no_license
#include "UserSettings.h" UserSettings::UserSettings() { this->sex = new int(0); this->wallpaperPosition = new int(2); this->wallpaperChoosen = "Litchi-Chili.jpg"; this->iconThemePosition = new int(1); this->iconThemeChoosen = "Theme Litchi"; this->presettedSelectColor = new int(2); this...
916751fa115991bfdd418f388b8b9def54c883d2
531d872cce83a78e082a1cebd5703363f143a168
ChuaPingChan/SpaXI
/AutomaticProjectTesting_Aug2015_VS2015/EmptyGeneralTesting/UnitTesting/PQL/Regex/TestRegexWith.cpp
C++
cpp
6,072
no_license
#include "CppUnitTest.h" #include "string.h" #include "..\SPA\PQL\Validator\ValidationRegexLibrary\RegexValidators.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; using namespace std; namespace UnitTesting { TEST_CLASS(TestRegexWith) { public: /***************** * Ref R...
05d22bf282a9d4720dd89c8fdae6688cc85a45db
9d091ba17acdb4175cd17b4a5f3a3d8eb94db6b3
theDreamBear/algorithmn
/leetcode/152.乘积最大子数组.cpp
C++
cpp
1,183
no_license
/* * @lc app=leetcode.cn id=152 lang=cpp * * [152] 乘积最大子数组 */ #include <string.h> #include <algorithm> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> usi...
6b02d865fb0639a0cdce96e4ab5ec85e48922985
b1a4ac5e816ea3cdf09c4b08527e9fff04ae9071
gutsche/usercode
/CMS1/MCInfo/src/MCInfo.cc
C++
cc
6,470
no_license
// // Package: CMS1/MCInfo // Class: MCInfo // // Description: info and matching for MC // // Original Author: Matteo Sani, matteo.sani@cern.ch // Created: Thu Mar 1 20:27:42 UTC 2007 // // $Author: dmytro $ // $Date: 2007/06/14 05:59:58 $ // $Revision: 1.10 $ // #include "CMS1/MCInfo/in...
9905c1de7a8079945904c063c7c3dddcd2f012f8
b65be280372776a49bd824a81e46fdee42b0b60f
chkob/forked-blaze
/blazetest/src/mathtest/svecdvecinner/VCbV2b.cpp
C++
cpp
3,738
permissive
//================================================================================================= /*! // \file src/mathtest/svecdvecinner/VCbV2b.cpp // \brief Source file for the VCbV2b sparse vector/dense vector inner product math test // // Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved // // Thi...
735aa18ed7634da0b3cef743df63e0f083bf427c
b1c6818be18b2483baa7db927673098619848eda
kylin0925/online_judge
/12869.cpp
C++
cpp
606
no_license
#include <iostream> #include <string> unsigned long long gcd(unsigned long long m,unsigned long long n){ return n==0? m : gcd(n,m%n); } unsigned long long int lcm(unsigned long long a,unsigned long long b){ return (a/gcd(a,b))*b; } using namespace std; int main(int argc,char** argv){ unsigned ...
03dcc13a62ce63bdd45f923deab2f576a14a4978
539030ccb8c310c800aba5a55b2c251652f1db72
johnerlandsson/libLuna
/EtherCAT/src/Master.cpp
C++
cpp
718
no_license
/* * Master.cpp * * Created on: Nov 24, 2014 * Author: john */ #include "Master.h" #include "Domain.h" namespace luna { Master::Master() { _master = ecrt_request_master( 0 ); if( _master == nullptr ) throw errors::Request; } Master::Master( unsigned int index ) { _master = ecrt_request_master( inde...
dfae7efc0868fb888de2e0ea8d7edd2066d552ab
714464d2ded8e99a24657fc5dfa504de979fe1f6
chat-code/leetcode-everyday
/past/202105/20210526_1848/abel.cpp
C++
cpp
254
no_license
class Solution { public: int getMinDistance(vector<int>& a, int target, int start) { int res = 2000; for (int i = 0; i < a.size(); ++i) { if (target == a[i]) { res = min(res, abs(i - start)); } } return res; } };
2931138e2e770c5cdaffe2e1a4e44e216bcaef17
d82a18b76cd5376982e30e751492fc814ef88e9f
nmctwisp/Beginning-C-Programming---From-Beginnner-to-Beyond
/Section 13 - OOP - Classes and Objects/ImplementingMethods2/main.cpp
C++
cpp
470
no_license
#include <iostream> #include "account.h" int main(){ Account frank_account; frank_account.set_name("Frank's Account"); frank_account.set_balance(1000.00); if (frank_account.deposit(200)) cout << "Deposit OK" << endl; else cout << "Deposit Not Allowed" << endl; if (frank_accoun...
836d03579253929b0d672652e6c6539530bdd740
5d82a1386753cc29678b206074e93198a4059e8b
webanpick/webanpick-master
/libraries/plugins/apis/network_broadcast_api/include/webanpick/plugins/network_broadcast_api/network_broadcast_api.hpp
C++
hpp
2,266
permissive
#pragma once #include <webanpick/protocol/block.hpp> #include <webanpick/plugins/p2p/p2p_plugin.hpp> #include <webanpick/plugins/chain/chain_plugin.hpp> #include <webanpick/plugins/json_rpc/utility.hpp> #include <fc/optional.hpp> #include <fc/variant.hpp> #include <fc/vector.hpp> #include <boost/thread/mutex.hpp> n...
c632530f6d71e3d5b7d9ccac1a9a8eba50d3151e
b4f7967ec60ac6f1578c447f91486633f838fd0a
kpdev/llvm-project
/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp
C++
cpp
2,133
permissive
//===- InferFunctionAttrs.cpp - Infer implicit function attributes --------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
d4b8ea3d6a5ace83d687a13147621f26be07f5e9
f304fb58317820bf43952edba158cf411c78c93d
sjcantor/Face-Invaders-Game
/sfml320-project/Classes/bullet.cpp
C++
cpp
1,659
no_license
/* * bullet.cpp * * Created on: Nov. 25, 2019 * Author: Chris Gritter */ #include "bullet.h" #include <tuple> # define M_PI 3.14159265358979323846 /* pi */ using namespace std; Bullet::Bullet() : x(0), y(0), speed(1), angle(0){} Bullet::Bullet(float sx, float sy , float spd, float ang){ x = s...
2f86bf138e923967f9c9eac83636d9b180ab67df
d4698449fd6420e42b56beeef20e828f61f163b6
rsreenivas2001/LabMain
/Sem 3/daa/ps-4,5/ps5_3.cpp
C++
cpp
617
no_license
#include<iostream> #include<algorithm> #include<vector> using namespace std; int main(){ string new_order,input; cout<<"Enter the NEW order : "; cin >>new_order; cout<<"\nEnter the string to be sorted in new order : "; cin>>input; vector<pair<int,char>> v; for(int i = 0; i < input.length()...
97519b4a2344f0fa2429b56a93fa41c190e5ccc7
99eb806f0ae8c17ce905e4ed58ee6b35702883a9
wx257osn2/Shiro
/shiro/tuple/comparison.hpp
C++
hpp
6,968
permissive
/////////////////////////////////////////////////////////////////////////////// // // Copyright (c) fimbul 2014. // https://github.com/fimbul/Shiro // // 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) // //////////...
953b1edb8c649f234d7ae92ebecabc512b01ceb9
41988b80d5ce37f41742d2c57900e654ea39d4a3
git-Charlie/ARK-SDK
/SDK/ARKSurvivalEvolved_WyvProjLightingBall_functions.cpp
C++
cpp
3,237
permissive
// ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_WyvProjLightingBall_parameters.hpp" namespace sdk { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------...
beed938d69741d7a4516e97c9fef6bc513bced8c
37af17adc55ac3995ff33211edc498071a302c6b
Patuti/crossuo
/src/GUI/GUIDrawObject.cpp
C++
cpp
2,030
permissive
// MIT License // Copyright (C) August 2016 Hotride #include "GUIDrawObject.h" #include "../CrossUO.h" #include "../Sprite.h" #include "../Point.h" #include "../Managers/ColorManager.h" #include "../Renderer/RenderAPI.h" #include "../Utility/PerfMarker.h" CGUIDrawObject::CGUIDrawObject( GUMP_OBJECT_TYPE type, in...
34cab474d7941946bfb2c396eef97066ea0cfc0e
372bbdeb55e806f9b69205615ef351a2b153b74a
trigrass2/m3meka
/src/m3/hardware/joint.cpp
C++
cpp
23,502
permissive
/* M3 -- Meka Robotics Robot Components Copyright (c) 2010 Meka Robotics Author: edsinger@mekabot.com (Aaron Edsinger) M3 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the Lic...
3723a9c696462bd2cd0fa0c2b39e423ef6bf16e2
a0a598edf3f1b41d31c55d8aacb206336cca42d8
yyzidea/OptCom
/OptCom/list.cpp
C++
cpp
4,827
no_license
#include "stdafx.h" /************************************************** 函 数:list_is_empty@4 功 能:判断双向链表是否为空 参 数:phead - 双向链表头指针 返回值:非零表示为空,零表示不为空 说 明: **************************************************/ int list_is_empty(list_s* phead) { return phead->next == phead; } /********************************************...
d4883b6139937a0e6207739ff7887cc60f9d3e98
606f429e170cd67fb3bee330c1981da65b9f722f
ravikr126/DATA-STRUCTURE
/LinkedList/Print ith node.cpp
C++
cpp
2,571
no_license
Print ith node Send Feedback For a given a singly linked list of integers and a position 'i', print the node data at the 'i-th' position. Note : Assume that the Indexing for the singly linked list always starts from 0. If the given position 'i', is greater than the length of the given singly linked list, then don't ...
fbfe24198a09c07466af7f141a45c149c95cc458
feb10a3d709fb777a8a14c344af9f8eaa26d66f6
vsoftco/snippets
/pointer_mem_fn.cpp
C++
cpp
307
permissive
// Pointer to member function #include <iostream> struct Foo { void say() { std::cout << "Say something!" << std::endl; } }; using ptr_mem_fn = auto (Foo::*)() -> void; // same as // typedef void (Foo::*ptr_mem_fn)(); int main() { Foo foo; ptr_mem_fn fpFoo = &Foo::say; (foo.*fpFoo)(); }
a767080da1157977dd38a2776105cdd14207f74b
eead808417f94911cd3cff9ee5fd37731319cdb7
dancingpenguins/Big-Numbers
/Lib/Src/BigReal/DigitPool.cpp
C++
cpp
6,943
no_license
#include "pch.h" #include <float.h> std::atomic<UINT> DigitPool::s_totalAllocatedPageCount; DigitPool::DigitPool(int id, const String &name, size_t intialDigitCount) : BigRealResource(id) , m_origName(name) , m_name(name) , m_allocatedPageCount(0) , m_firstPage(NULL) , m_freeDigits(NULL) , m_initFlags(BR_MUTABLE) ...
a50aaacca21e0ce81e7a1313e10c727133207d68
21c3cd593577f9d62c34823632d2a71e7f1cdc38
jjprograms/SimpleRayTracer
/ray.cpp
C++
cpp
3,516
no_license
#include <iostream> #include <math.h> #include "vec3.h" #include "bmp.h" #include "boundingbox.h" #include "matrix.h" using namespace std; struct hit { bool wasRecorded; vec3 point; vec3 normal; }; class material { vec3 reflectance; }; class ray { public: vec3 origin; vec3 direction; ray() { origi...
0423c8fd451c9a68b31557dc90d01fef33fd162c
3c4d5dc685efb39660be3bcdf1dcebc08a0363b7
yikeludan/xcom
/XThreadPool.cpp
C++
cpp
2,652
no_license
#include "XThreadPool.h" #include "XThread.h" #include "XTask.h" #include <iostream> #include <mutex> #include <thread> static bool is_exit_all = false; static std::vector<XThread*> all_threads; static std::mutex all_threads_mutex; class CXThreadPool: public XThreadPool{ public: void Init(int threadCount) { ...
4e360ef38f5712dfaea65f0290e7c093a1689011
60cf4ebd936e3eb7da93f3125071b6ed010f911d
cl0ne/projecteuler
/001.cpp
C++
cpp
1,008
permissive
/* * Project Euler problem #1 * * If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. * * Find the sum of all the multiples of 3 or 5 below 1000. * */ #include <iostream> int getMultiplesSum(int base, int multiplier, int maxExclusi...
58f667368a385ad0ae27303a6ab930bf4bfad135
de44913109ef3692d40d759755954bc406dda442
syurskyi/ITVDN_C___Starter
/003_DataTypes GR/001_/008_Dec/008_Dec.cpp
C++
cpp
683
no_license
#include "stdafx.h" #include <iostream> using namespace std; int main() { short a = 0; // постфиксный декремент cout << a << endl; cout << a-- << endl; // сначала выводим на экран значение переменной а, а потом увеличиваем значение переменной на единицу cout << a << endl; cout << endl; // префиксный декреме...
072e0c81a3e4d0f68777d52373db5d92915ca4db
495dfff2d281efc813762e29a442be9922df9fbb
lythm/ld3d
/dev/src/package_core/Impl_Light_Sky.cpp
C++
cpp
2,489
no_license
#include "core_ext_pch.h" #include "Impl_Light_Sky.h" #include "core/SkyLight.h" #include "CorePackage.h" namespace ld3d { Impl_Light_Sky::Impl_Light_Sky(GameObjectManagerPtr pManager) : Light_Sky(pManager) { SetVersion(g_packageVersion); } Impl_Light_Sky::~Impl_Light_Sky(void) { } void Impl_Light_Sky::U...
f927a3089a227a2b435ceea9193a19ff50b062de
1e7b0f3345140751d49c0959e5f2a62414b507e7
janisozaur/z3
/src/nlsat/nlsat_explain.cpp
C++
cpp
73,649
permissive
/*++ Copyright (c) 2012 Microsoft Corporation Module Name: nlsat_explain.cpp Abstract: Functor that implements the "explain" procedure defined in Dejan and Leo's paper. Author: Leonardo de Moura (leonardo) 2012-01-13. Revision History: --*/ #include "nlsat/nlsat_explain.h" #include "nlsat/nlsat_assi...
26869f77c0e3be68df6ee18be56ec1a6c3d0777b
9e35083b212b741be3b6b4c8281954b683c6c47b
Jseph/google-cloud-cpp
/google/cloud/assuredworkloads/assured_workloads_connection_idempotency_policy.cc
C++
cc
2,812
permissive
// Copyright 2022 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
73b7f2f123369a74c41062845826e542e83ecbfc
ae68fafbbc21b624020dbbb235d86b571611d2c1
drodil/cpp-util
/general/operators/example.cpp
C++
cpp
1,703
permissive
// example.cpp // // MIT License // // Copyright (c) 2017 Heikki Hellgren <heiccih@gmail.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limi...
d8d245fc2361214b6697c9898463d899574a136f
cbd8e95d4a105c445f0681019caf2f60393cf16f
sarielsaz/sarielsaz
/src/bench/checkblock.cpp
C++
cpp
1,895
permissive
// Copyright (c) 2016 The Sarielsaz Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "bench.h" #include "chainparams.h" #include "validation.h" #include "streams.h" #include "consensus/validation.h" nam...
e0ca692671307e17a8419078bea285b3cb86cd16
38662f6605aabcaf21b59bdac0098531debcd890
luis-ayestaran/flutter_componentes
/windows/runner/main.cpp
C++
cpp
1,278
no_license
#include <flutter/dart_project.h> #include <flutter/flutter_view_controller.h> #include <windows.h> #include "flutter_window.h" #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { // Attach to console w...
0602b0b225f5d415ef0d099555af0ffc0fc81b51
54b1597d60fc7c9eb7524b30d9468ade7880e578
DTidd/OpenRDAAPI
/dumlib/impcode.cpp
C++
cpp
7,058
no_license
/* impcode.c - Generate Import/Export C Code for speed of development */ static char *fixIMPEXPname(char *name) { int str_length=0,x; char *new_name=NULL; if(!isEMPTY(name)) { str_length=RDAstrlen(name); new_name=Rmalloc(str_length+1); memset(new_name,0,str_length); for(x=0;x<str_length;++x) { if(na...
3d99a01af43295adfc092fcb6e9b66a6ffdddefe
ada2e5b73ae6fb815e4fed3430ded51d1c813cd4
beardog-ukr/green-silver-bulldog
/FarmerFindsDog/Classes/common/GameSettings.cpp
C++
cpp
7,229
permissive
#include "common/GameSettings.h" #include "json/document-wrapper.h" #include "json/prettywriter.h" #include "json/stringbuffer.h" #include <fstream> // ofstream #include "cocos2d.h" using namespace cocos2d; using namespace std; const char *const keyFogOfWar = "fog_of_war"; const char *const keyKeyBindings...
f2dbb6c1185d73cfbefbff9ab6e1fc107a0656c0
02a0c48ccd0ac18cfb859fc561083975e6e2f011
alexclapou/projecteuler
/005/5.cpp
C++
cpp
378
no_license
//Smallest multiple #include <iostream> using namespace std; long long int n; int c; int i; int main() { i = 2; n = 20; while(c <= 20 && i <= 20) { if(n*n % i == 0) { c++; i++; } else { n++; c = 0; i = ...
8ac8e0f4a0397d563c127ef99965b5d9946d6a13
513281dd8934856647fc7f722471737a9b8fef14
fernandezeric/acmudec
/SergioNavarrete/558_Commented.cpp
C++
cpp
1,318
no_license
// UVa 558 - Wormholes // La idea de este problema es convertirlo en un grafo. Cada star system es un nodo y los Wormholes las aristas, con su respectivo peso (t) // Despues de crear la matriz de adjacencia para representar el grafo, solo se necesita saber si contiene algun ciclo negativo // Esto lo hacen usando e...
6b4658a05637cc7b8ae47cf30e6902580710a1c7
8e8d7303846ee218b3baab5c1a8c85986f078396
svrajasekharsure/tiva-bsp
/third_party/TI/TivaWare_C_Series-2.1.0.12573/tools/dfuprog/dfuprog.cpp
C++
cpp
38,482
permissive
//***************************************************************************** // // dfuprog.cpp : A simple command-line utility for programming a USB-connected // Tiva board running the USB DFU boot loader. // // Copyright (c) 2008-2014 Texas Instruments Incorporated. All rights reserved. // Soft...
e38d65ea104eab58c8ffea3d3a10272b4d69bcad
68d83ec2a8e0b3c44dd1fa091bb9ba7d0ff5ae96
BioBoost/lorawan-transceiver
/lib/lorawan_transceiver.cpp
C++
cpp
4,116
permissive
#include "lorawan_transceiver.h" #include "lora_radio_helper.h" namespace IoT { namespace Communication { LoRaWANTransceiver::LoRaWANTransceiver(events::EventQueue * eventQueue) : lorawan(radio), eventQueue(eventQueue) { isConnected = false; initialize(); connect(); } Lo...
b999223dcfbd6c933301228557f5654b3c39d0e3
50bcc2f49d30590da85db6e4fa269298292cad9f
lg609/pinocchio
/src/spatial/motion-base.hpp
C++
hpp
5,045
permissive
// // Copyright (c) 2015-2019 CNRS INRIA // Copyright (c) 2015-2016 Wandercraft, 86 rue de Paris 91400 Orsay, France. // #ifndef __pinocchio_motion_base_hpp__ #define __pinocchio_motion_base_hpp__ namespace pinocchio { template<class Derived> class MotionBase { public: MOTION_TYPEDEF_TPL(Derived); ...
199c7eb13d3ccafd97dc27892bd69a22812a240d
c0d1f5cd967aee6d7f8d3c7f23c5929858335021
biebipan/coding
/third_part/indri5.6/FieldLessNode.cpp
C++
cpp
1,945
no_license
/*========================================================================== * Copyright (c) 2004 University of Massachusetts. All Rights Reserved. * * Use of the Lemur Toolkit for Language Modeling and Information Retrieval * is subject to the terms of the software license set forth in the LICENSE * file include...
693ee162bf267501f29045dce4017177cd12581c
038d64d44209e0db3ef048555b17c0058c8a9270
aaronds/arduino-enc28j60udp
/Enc28j60Udp/Enc28j60Udp.cpp
C++
cpp
8,956
no_license
#include "Enc28j60Udp.h" Enc28j60Udp::Enc28j60Udp(){ first = NULL; state = NOT_CONFIGURED; } /** * Connect a socket and send arp request */ void Enc28j60Udp::connect(Enc28j60UdpSocket *sock){ memset(sock->remoteMac,0,MAC_SIZE); if(first){ sock->next = first; } first = sock; sock->parent = this; arpRes...
de76ef5a259c7e5519a68bc2cc58b010230efbba
70dfd1e18fdfa5b3acbed3d3648b6cb9d64dbd95
aksris/PathTracer
/hw04_basecode/src/scene/geometry/sphere.cpp
C++
cpp
8,415
no_license
#include "sphere.h" #include <iostream> #include <la.h> #include <math.h> static const int SPH_IDX_COUNT = 2280; // 760 tris * 3 static const int SPH_VERT_COUNT = 382; float UniformConePdf(float cosThetaMax) { return 1.f / (2.f * PI * (1.f - cosThetaMax)); } float Sphere::RayPDF(const Intersection &isx, const...
e7498d3e1bf8be0193d9817ea7530e9bca2f3d53
8cc8727c711dee579d4131fbbb0611fc0ce8b7d4
armadillu/ofxFailSafeVideoGrabber
/example/testApp.cpp
C++
cpp
552
no_license
#include "testApp.h" int w = 320; int h = 240; //-------------------------------------------------------------- void testApp::setup(){ g1.start(w, h, 30, true, "fingers.mov"); g2.start(w, h, 30, true, "fingers.mov"); g3.start(w, h, 30, true, "wrongFile.mov"); } //-------------------------------------------------...
73709484ea6b2fa27a40c977f8a78466d9133bbd
1be4e974e38bf59a12eefe71f6fd0a44335ac1a1
xu-kj/ThinC_UAV
/uav_recognition/cue.cpp
C++
cpp
5,016
no_license
#include "cue.h" #include "output.h" //#include "Controller.h" //#include <GL/gl.h> #include <stdlib.h> #include <algorithm> namespace SaraMatching { std::stringstream& operator>>(std::stringstream& in, Cue * cue) { cue->Load(in); return in; } void Cue::Render(float progress, bool pla...
b07cc9227ad37bdb4f21ad7e96faeb4856003ef5
a2e34ed328b6c801f3b13201ab11dc83f31b5bda
langerhans/dogecoin-seeder
/protocol.cpp
C++
cpp
3,416
no_license
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2011 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. #include <vector> #include <stdexcept> #include "protocol.h" #include "util.h" #in...
417239dca50710abc894fa3022a0285e5fa1c120
bbae1b748d3b42e643f277355ed2a03693e6225e
misc-song/C-
/vsWorkplace/ArrayPointer/ArrayPointer/源.cpp
C++
cpp
278
no_license
#include<iostream> void main() { double number[5] = {3.5,6.7,9.9,88,7}; double *p; p = number; std::cout << *p++ << std::endl; p = number; std::cout << ++*p << std::endl; p = number; std::cout << *++p << std::endl; p = number; std::cout << ++p <<*p<< std::endl; }
4e260d8abab17bffc3bbddb472099bd86766b0f6
163cb6fd437dfef4053ff0930351fa14f61120dd
sebas095/Competitive-Programming
/URI/Multiples of 13.cpp
C++
cpp
332
no_license
#include <bits/stdc++.h> #define fast ios_base::sync_with_stdio(false);cin.tie(NULL) #define endl '\n' using namespace std; typedef long long ll; int main() { fast; ll x, y, ans = 0; cin >> x >> y; if (x > y) swap(x, y); for (ll i = x; i <= y; i++) { if (i % 13) ans += i; } cout << ans << endl; ...
99d67f04c996001221d405cf40d972f2695f1e90
06121385f4bb54c13cd1a2af1da01c006550f4fb
rosholger/Lispis
/vm.cpp
C++
cpp
50,619
permissive
#include "vm.h" #include "compiler_passes.h" #include "codegen.h" #include "parser.h" #include "lexer.h" #include <cassert> #include <cstdlib> #include <cstdio> #include <cstring> bool indexStack(LispisState *state, int64 i, Value *ret) { try { *ret = indexStackInternal(state, i); } catch (int e) { ...
9f3e0940ce7457e2d3441a2ccbfc2b0b27a55082
ccea7c67c04efdc3a8a00a91c91276256e6160a7
riverandeye/Investment
/Programming_Languages/Cpp/Operator_Overloading/main.cpp
C++
cpp
298
no_license
#include <iostream> #include <cstring> #include "Mystring.h" int main() { Mystring empty; Mystring larry("Larry"); Mystring stooge(larry); empty.display(); larry.display(); stooge.display(); cout << "Larry and stoogre is" << (larry == stooge) << endl; return 0; }
e4a4011b1194b8dcc41f81b904d526750b2e0cd6
34bd1d377bb40fc2fbd295939eef87a7ae7d0b54
mYoda/CustomBrs
/src/ash/drag_drop/drag_drop_controller_unittest.cc
C++
cc
39,514
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 "ash/drag_drop/drag_drop_controller.h" #include "ash/drag_drop/drag_drop_tracker.h" #include "ash/drag_drop/drag_image_view.h" #include "ash...
4c3e73cd88f035657b66708f2adb41806b8fa0af
3dd1ecc365fda2f6b6bca357751fbacb603e8046
Kartik-Mathur/StAndrews-CPP
/Lecture-31/Test.cpp
C++
cpp
638
no_license
#include <iostream> using namespace std; void Subsequences(char *in,int i,char* out,int j,int &cnt){ // base case if(in[i] == '\0'){ out[j] = '\0'; cout<<out<<endl; cnt++; return; } // recursive case // 1. Don't include ith character Subsequences(in,i+1,out,j,cnt); // 2. Include ith Character out[j] =...
c3b2e946899afee3fe758742647234cb0b9a7a93
71a159bc68f2ff7b239eab7c22af9431e05aba0c
NeroMoi/UE4Game
/HealthBar.cpp
C++
cpp
237
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "HealthBar.h" void UHealthBar::NativeConstruct() { } void UHealthBar::SetBarValuePercent(float const value) { healthValue->SetPercent(value); }
889ee1e4efac5e1c7a1563ebc394de78e193c250
e332b54bfefa0ed760e541e515a9fbd5b7dae020
Arielce/redis-cpp17
/example/redisproxy/proxysession.cc
C++
cc
8,566
no_license
#include "proxysession.h" #include "redisproxy.h" #include "socket.h" ProxySession::ProxySession(RedisProxy *redis, const TcpConnectionPtr &conn) :redis(redis), reqtype(0), multibulklen(0), bulklen(-1), argc(0), pos(0) { command = createStringObject(nullptr, REDIS_COMMAND_LENGTH); conn->setMessage...
ccc563bf602a2da06da3466ef25918847375e054
18304b91f80b06c38d80af58bde02fc782242d5b
eliks/pytorch
/torch/lib/c10d/TCPStore.cpp
C++
cpp
18,292
permissive
#include <c10/util/irange.h> #include <c10d/TCPStore.hpp> #ifdef _WIN32 #include <winsock2.h> #include <io.h> #else #include <poll.h> #include <unistd.h> #endif #include <algorithm> #include <fcntl.h> #include <system_error> namespace c10d { namespace { enum class QueryType : uint8_t { SET, COMPARE_SET, GET,...
4a4c52a6b0d3a0911bf37e4709b55c001ed86c1b
42381ed71fe74965ad0e76b7362c88eb34a229ce
cho876/Algorithm
/Problem/DP/baekjoon_2579.cpp
C++
cpp
621
no_license
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; int main() { int level; scanf("%d", &level); vector<int> v_level; vector<int> v_total(level); int tmp; for (int i = 0; i < level; i++) { scanf("%d", &tmp); v_level.push_back(tmp); } v_total[0] = v_level[0]...
610b97165a8ddb6b4bad3d0e53a280cbeb1af47f
b444e688a6646a47f5cabde2691595e64dda19c8
lcy8417/backjoon-online-judge
/1300.cpp
C++
cpp
486
no_license
#include <bits/stdc++.h> using namespace std; long long unsigned int N, k; int main(){ ios_base::sync_with_stdio(false); long long unsigned int lt=1, rt, res = 0; cin >> N >> k; rt = k; while(lt <= rt){ long long unsigned int key = (lt+rt)/2; long long unsigned int cnt = 0; for(long long uns...
a0493f5373b92834ffa12a640fac7770d09b5ce8
6c40a67bd17353477941c5997f63024153072da4
HariprasadNG/Myevent
/cpp/kthLargest.cpp
C++
cpp
659
no_license
#include <iostream> #include <vector> #include <queue> using namespace std; int main () { int T; cin >> T; while(T--) { unsigned int k; cin >> k; int n; cin >> n; priority_queue<int, vector<int>, greater<int>> pq; while (n--) { int x; ...
333ab8d91cbcd25b77b22cb8ea53bec9f2335de0
59bd8e3a526491350f0562cf7c9f3a6e7ebb8e7f
Dan13llljws/CP-Solutions
/CSES/1090-ferris-wheel.cpp
C++
cpp
360
no_license
#include <bits/stdc++.h> using namespace std; int main(){ cin.sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, x; cin >> n >> x; vector<int> a(n); for (int &v : a) cin >> v; sort(a.begin(), a.end()); int ans = 0; for (int i = 0, j = n - 1; i <= j;){ if (a[j] + a[i] > x) j--; else i++, j--; ...
1f636a331b873fb5379fe4df559da4c630b717bc
1c00bbf2a629ed9df7e303bb89f0a24f5d5cea34
Sarthakdtu/C-Codes
/Backtracking/rat in a maze.cpp
C++
cpp
1,674
no_license
//SARTHAK #include<iostream> using namespace std; bool isvalid(int i,int j, int n, int maze[][20]) { if(i<0||j<0||i>=n||j>=n) return false; if(maze[i][j]==0) return false; return true; } void display(int n, bool **visited) { for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { ...