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
f2bb580d21d288a3adaa78879f02a90922790ad5
380fe529d40a4993934d5cc703afdd9b1832bab0
YanB25/MyToyCode
/DataStruct/queue.cpp
C++
cpp
2,477
no_license
#include <iostream> #include <stdexcept> using namespace std; class queue { public: queue(); queue(const queue& rhs); ~queue(); int size() const { return size_; } bool empty() const; bool full() const; void enque(int item); void deque(); int front() const; int back() const; v...
9eabef32cffcf22d9b7033283cdc91ef976636a4
e1b6502521ecdcf6d802ecbe15d8b2daa194d5ac
nicklatkovich/OOP-Lab10.1
/Source.cpp
C++
cpp
1,435
no_license
#include <iostream> #include <stack> using namespace std; void printStack(stack <char> st) { stack <char> temp = st; while (!temp.empty()) { cout << temp.top(); temp.pop(); } cout << endl; } void main() { cout << "\nCREATE STACK\n"; stack <char> st; for (int i = 0; i < 60; i++) { st.push(rand() % 26 + '...
30021e150d73a28b65c689a6b0a094bc3497a779
e491b3989629318cb3b652b870f3a119bb7ed878
exapde/Exasim
/Applications/ConvectionDiffusion/subproblem/app/cpuFlux.cpp
C++
cpp
754
permissive
#include "cpuFlux1.cpp" #include "cpuFlux2.cpp" template <typename T> void cpuFlux(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) { if (modelnumber == 1) cpuFlux1(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng,...
11826046c5ac027ddcb41d776b1b6696bc070976
b1aca2b3cf1c5dad189403585cbea3823e588c28
proaholic/Win2K3
/NT/com/ole32/stg/props/utest/propmshl.cxx
C++
cxx
16,602
no_license
/* #include <stdio.h> #include "PStgServ.h" #include "PropMshl.hxx" #include "CPropVar.hxx" #include "CHResult.hxx" #include "proptest.hxx" */ #include "pch.cxx" #include <shellapi.h> const IID IID_IPropertyStorageServer = {0xaf4ae0d0,0xa37f,0x11cf,{0x8d,0x73,0x00,0xaa,0x00,0x4c,0xd0,0x1a}}; const IID IID_IPropert...
4a5e2893c8266131314e92395287abf6b5038ca7
1e54a4ec36b1bea0f1a7f5cc50fef083db5b81ab
vieirin/TP1-2019-1
/src/domains/EventType.cpp
C++
cpp
688
permissive
#include <domains/EventType.hpp> EventType::EventType(std::string typeName) { setEventType(typeName); } void EventType::setEventType(std::string typeName) { evType = std::unordered_map<std::string, int>{{"TEATRO", 1}, {"ESPORTE", 2}, ...
4f65ced01b0b35c41254040e781ee1b2ca2e0088
bb9ad0d417b95f37103903512319fde735563d2b
bathepawan/chromium
/chrome/browser/ui/toolbar/app_menu_model.cc
C++
cc
34,922
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/toolbar/app_menu_model.h" #include <algorithm> #include <cmath> #include "base/bind.h" #include "base/command_line.h" #i...
490c32c018835c01c189cc9556c28ad6762e0660
97ae2af79fa38f670b9d622f036c7a9aa5a3ea7d
FisherCloud/LeetCode
/problems/cc/subsets.cc
C++
cc
2,242
permissive
/* * @Description: https://leetcode-cn.com/problems/subsets/ * @Author: 鱼摆摆 * @Github: https://github.com/FisherCloud * @Date: 2019-08-29 21:33:31 * @LastEditTime: 2019-08-29 21:45:33 */ #include <iostream> #include <vector> using namespace std; #define _BN #ifdef _BIT /** * 位运算 */ vector<v...
3b58b48f95b89b1a7737839aeae2168213857037
5020481e979b8b70a1d563c6ca932d9a8b1af6b9
Stiffstream/sobjectizer
/dev/test/so_5/mbox/sink_binding/multi_sink_with_delivery_filter/main.cpp
C++
cpp
2,502
permissive
/* * A simple case for multi_sink_binding_t and delivery_filter. */ #include <iostream> #include <sstream> #include <so_5/all.hpp> #include <test/3rd_party/various_helpers/time_limited_execution.hpp> #include <test/3rd_party/various_helpers/ensure.hpp> namespace test { struct msg_data final : public so_5::messag...
b858a342bb869659b2529cf2cc03deeee9112b0d
507e4f80004db4372ad48c6e42c1819e6d381677
soaibsafi/Competitive-programming
/UVa/UVA - 10041.cpp
C++
cpp
769
no_license
#include<iostream> #include<cstdio> #include<cmath> using namespace std; int main() { int testCase,min,sum,i,j; cin>>testCase; while(testCase--){ int r; cin>>r; int s[30005]; for(i=1; i<=r; i++){ cin>>s[i]; } for(i=1; i<=r;i++){ for...
5699c899ef98497bd53152b0b72904ca2c4d5e04
e1e6e3a7bed6cc74c3d55850237ff6abd8aa4ffe
veliamsli/snmptree
/workers.cpp
C++
cpp
1,589
no_license
#include "stdafx.h" #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> #include "snmpcore.h" #include "usermsg.h" #include "asntypes.h" #include "workers.h" void thread_print_variable( HWND hWnd, const oid *objid, size_t objidlen, const netsnmp_variable_l...
255e4677011b726bc441bc91fb1cfcb1d139eac0
374e419c3e79eaa3e9819d98fccda09403679914
pavanparmar144/CPP_Learning
/29-03-2021/5_Time/Time.cpp
C++
cpp
1,044
no_license
#include<iostream> #include<string.h> #include<stdlib.h> using namespace std; class Time{ int time_hr; int time_min; int time_sec; public: Time(){ this->time_hr = 0; this->time_min = 0; this->time_sec = 0; } Time(int hr, int min, int sec){ ...
f918986cc7cd3391bd287a613466b96fd65a37bb
0456547cda4df0942d6f74a76ea229d9c25818b4
SystemsGenetics/KINC
/src/tests/testexportexpressionmatrix.cpp
C++
cpp
3,100
permissive
#include <ace/core/core.h> #include <ace/core/ace_analytic_single.h> #include <ace/core/ace_dataobject.h> #include "testexportexpressionmatrix.h" #include "../core/analyticfactory.h" #include "../core/datafactory.h" #include "../core/exportexpressionmatrix_input.h" #include "../core/expressionmatrix_gene.h" void Te...
d63b2eaf08c2d4d09e412e1ecb85ad77d1ca63a8
09841c9647b358c6233c8943b604dd062e64e02b
Himanshu1233456/CS204
/Lab 7 - Largest.cpp
C++
cpp
549
no_license
#include <bits/stdc++.h> using namespace std; int main() { long long int tc,l,i,j,k; vector <string> in; string a; cin>>tc; for(i=0;i<tc;i++) { cin>>l; for(j=0;j<l;j++) { cin>>a; in.push_back(a); } sort(in.begin(), in.end(), [](string &a, string &b) ...
418c692ee10c583b569beb98d983ba80324aa71f
7cae9f495cd030d5b46bd3a401ac773ae1bada34
hongge372/myinterview
/priv/cpp/knowledge/设计模式/享元模式/main.cpp
C++
cpp
2,818
no_license
article: (报刊上的)文章,论文,报道; (协议、契约的)条款,项; 物件,物品(尤指整套中的一件); 享元模式:运用共享技术有效地支持大量细粒度的对象。在有大量对象时,把其中共同的部分抽象出来,如果有相同的业务请求,直接返回内存中已有的对象,避免重新创建。 以下情况可以考虑使用享元模式: 系统中有大量的对象,这些对象消耗大量的内存,且这些对象的状态可以被外部化。 对于享元模式,需要将对象的信息分为两个部分:内部状态和外部状态。内部状态是指被共享出来的信息,储存在享元对象内部且不随环境变化而改变;外部状态是不可以共享的,它随环境改变而改变,是由客户端控制的。 /* * 关键代码:将内部状态作为标识,进行共享。 */...
6078e8acc80ab71982276a42f515a993485bf254
df0b967671e90e9a4f7e7f04804987b1bafbb2bd
JoseAALC/Partial-Order-Planing
/tests/PlanningProblemTest.cpp
C++
cpp
330
no_license
#include "gtest/gtest.h" #include "PlanningProblem.hpp" class PlanningProblemTest : public testing::Test{ public: PlanningProblem* p; virtual void SetUp(){ p = new PlanningProblem(new Bindings()); } virtual void TearDown(){ delete(p); } }; TEST_F(PlanningProblemTest,create){ p->POP(new Heuristi...
071390ec410eedc014ccab045a216ec7671c19f2
d7f7c7be336206f7e11ab16b171ecf3c13490510
NightKirie/School_Works
/2018/Programming Language/HWBonus_F74056069/ext/nana/include/nana/gui/drawing.hpp
C++
hpp
2,050
permissive
/* * A Drawing Implementation * Nana C++ Library(http://www.nanapro.org) * Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com) * * 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) * * @file: nana/gui/drawing...
57071c29c960be874f9eec3db6e5f5799ef3e8e4
defa535154f69d7370ffa1a69e8018877e1079a2
jorgearoce2102/Cplusplus-practice
/Exercises/chapter4/Quiz4/main.cc
C++
cc
357
no_license
#include <iostream> #include "getUserInfo.h" #include <string> enum class monsterType{ UNDEFINED, OGRE, DRAGON, ORC, GIANT_SPYDER, SLIME, }; struct Monster { typedef std::string monsterName; monsterType type; int health; }; int main() { Monster Jorge={"Jorge",monsterType::OGRE,10}; std::cou...
1429acce96a2045f50faff5c067c2df4a99b990e
496105a3357cbb338d3919c27d16472ecb84c5c2
KqSMea8/sstd_library
/sstd_boost/sstd/boost/core/null_deleter.hpp
C++
hpp
1,241
permissive
/* * Copyright Andrey Semashev 2007 - 2014. * 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) */ /*! * \file null_deleter.hpp * \author Andrey Semashev * \date 22.04.2007 * * This h...
2f8b65d4167d48b272d9bdaad1fb8ab2d7ed060d
0f5b2ceb81026abc12780520a9b5eaa78fa056fe
wayou/chromium
/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
C++
cc
34,657
permissive
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" #include <algorithm> #include <utility> #include "ash/constants/ash_features.h...
c801d2d3e947b47ccbaea0dbc16204ac469ede1a
b3fbefa10b11027732c51aea3f625833568ebb2c
chibby0ne/AcceleratedC
/Chapter9/exercise6.cpp
C++
cpp
943
permissive
#include <iostream> #include <vector> #include <string> #include <ios> #include <algorithm> #include <iomanip> #include "Student_info_5.h" using namespace std; int main(int argc, const char *argv[]) { vector<Student_info> students; Student_info record; string::size_type maxlen = 0; // read and store ...
31659ab0f644f9c5294a1612685b2e4ae4499d6a
b2b3430576d2de486d6f70fb72cc02175c65b64b
Wumpf/terrainwatersim
/terrainwatersim/source/scene/PostProcessing.cpp
C++
cpp
5,167
no_license
#include "PCH.h" #include "PostProcessing.h" #include <gl/ShaderObject.h> #include <gl/resources/FrameBufferObject.h> #include <gl/SamplerObject.h> #include <gl/ScreenAlignedTriangle.h> #include <gl/resources/textures/Texture2D.h> PostProcessing::PostProcessing(const ezSizeU32& screenSize) : m_pLuminanceLogFBO(NULL...
b6d15dd6eddc6493566a9a5a0b574e13b67a4423
8f4b3f90dfe948c8353cf43bb79070c054b53299
VD-15/Sprout
/sprout/weed/detail/find_character_set.hpp
C++
hpp
4,865
permissive
/*============================================================================= Copyright (c) 2011-2019 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...
166feda0b8a9f13dd17451a8342ebb4d40be27ca
ddbeb15ed0e8fa75808fc60c98772629dc802d91
Bingbo95/openMPtest
/openMPtest/openMPtest/amgcl/solver/skyline_lu.hpp
C++
hpp
12,094
no_license
#ifndef AMGCL_SOLVER_SKYLINE_LU_HPP #define AMGCL_SOLVER_SKYLINE_LU_HPP /* The MIT License Copyright (c) 2012-2018 Denis Demidov <dennis.demidov@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...
640b73d3dc9869bcfc407be8516afefabda7084e
8ec701886e603fe6a1176ad14338889311c6df62
Totalq09/omnivelma_navigation
/src/gazr/src/estimate_head_direction_ros.cpp
C++
cpp
5,259
permissive
#include <opencv2/opencv.hpp> #include <iostream> #include <iomanip> #include <mutex> #include <thread> #include <boost/program_options.hpp> #include "../tools/LinearMath/Matrix3x3.h" #include "./head_pose_estimation.hpp" #include <ros/ros.h> #include <ros/console.h> #include <image_transport/image_transport.h> #i...
f2d289e90cedc7ed39b901ae2efd9774b4a09a72
97e1a83331c16a5137e64a895818fa7df493a37b
beatles1/mintcoin
/src/kernel.cpp
C++
cpp
19,420
permissive
// Copyright (c) 2012-2013 The PPCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/list_of.hpp> #include "kernel.h" #include "db.h" using namespace std; extern int nStakeMaxAge; extern...
e2c97925bdc0e2e0f20cc3e6f9b3015bd0241911
f7200ab14c272df46ae3db78b59515ef563a3488
AnabaenaQing/Source-Code_ShaderX_GPU-Pro_GPU-Zen
/GPU Pro5/06_Compute/Object-order Ray Tracing for Fully Dynamic Scenes/beEntitySystem/source/dllmain.cpp
C++
cpp
418
permissive
// dllmain.cpp : Defines the entry point for the DLL application. // #include "beEntitySystemInternal/stdafx.h" BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case D...
8278710959ad6406a41396a3041378a745ad645f
9f1d1bb3f4862c73ba55e022c03081468eae1c80
ecmwf/eccodes
/src/grib_vsarray.cc
C++
cc
3,712
permissive
/* * (C) Copyright 2005- ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * * In applying this licence, ECMWF does not waive the privileges and immunities granted to it by * virtue of its status as an int...
76d72cc32f1fa7d3e7dd9270ec829906587db32c
16335dcc74f67e5cbd5872b68ae1c6bd7382097b
gearsin/geartesttroject
/GameCode/UtilityFunction.cpp
C++
cpp
2,469
no_license
//------------------------------------------------------------------------------------------------------------------ #include "StdAfx.h" //------------------------------------------------------------------------------------------------------------------ void Assert( bool pExpression, const char * pMsg, ... ) { ...
61a5fa92f86b4e8eb672a7caefd8d04f34977ff4
cdcf3e501c3b750699ea482fdb395ed3ce8d51af
CentroEPiaggio/state_manager_dm
/src/ik_checking_grasp_substate.cpp
C++
cpp
10,300
no_license
#include "../include/ik_checking_grasp_substate.h" #include "../../planning/src/gml2lgf/node.h" #include <tf_conversions/tf_kdl.h> #include "dual_manipulation_shared/serialization_utils.h" #include <dual_manipulation_shared/parsing_utils.h> #define OBJ_GRASP_FACTOR 1000 #define LONG_TIME_NO_SEE 3.0 #define POSITION_TO...
3a52bcac3345dfe932dcd679eb647c3759e88bba
27d8ee88381bda4a46b7dc30d3858c99ea94e450
mensong/EventSocket
/Libevent_server/server.cpp
C++
cpp
8,157
no_license
#include <iostream> #include <stdio.h> #include <sys/types.h> #include <string> #include <string.h> #include <stdlib.h> #include <event2/event.h> #include <event2/event_compat.h> #include <event2/event_struct.h> #include <process.h> #include <ws2tcpip.h> #include <io.h> #include <winsock2.h> #pragma comment(lib,"ws2_3...
027a62bb242e698fce8e79438c54d52c68c2ae13
37fc285a4735a0df8043b1431bd158b9ea4d22ad
disobeyedtoast/charybdis
/modules/client/rooms/context.cc
C++
cc
6,080
permissive
// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2018 Jason Volk <jason@zemos.net> // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice...
b3149da03519ddc55d8c1a2a60f6bfce547b4a5b
e05cd678f937e4abcb4103b43068aba6edb20ff3
DRG-Modding/Header-Dumps
/Current/UI_MissionComplete_RankLevel.hpp
C++
hpp
1,395
no_license
#ifndef UE4SS_SDK_UI_MissionComplete_RankLevel_HPP #define UE4SS_SDK_UI_MissionComplete_RankLevel_HPP class UUI_MissionComplete_RankLevel_C : public UMissionPlayerAndCharacterWidget { FPointerToUberGraphFrame UberGraphFrame; class UImage* BorderBottom; class UImage* BorderCenter; class UImage* BorderTo...
3d9653e8472c06168a5cdfa73fc1a5dc43117c21
03385dbc7b4186cc161a6d6bc333cc84d2b0e056
kaienkira/brickred-server
/src/brickred/log_async_sink.cc
C++
cc
2,396
permissive
#include <brickred/log_async_sink.h> #include <cstring> #include <brickred/concurrent_queue.h> #include <brickred/dynamic_buffer.h> #include <brickred/object_pool.h> #include <brickred/mutex.h> #include <brickred/thread.h> namespace brickred { class LogAsyncSink::Impl { public: explicit Impl(LogSink *adapted_si...
7ba781aed111e8fea03f001beb31bfc663034e7d
5416e1b7adf74c4b60058394508a7983d73b498e
KqSMea8/sstd_library
/sstd_boost/sstd/boost/asio/detail/posix_thread.hpp
C++
hpp
2,216
permissive
// // detail/posix_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) // #ifndef BOOST_ASIO_D...
d7fabfe6a394e79553f9ee34d77dd475191ada19
4adb226845eaee550bc8320b458a5457e65f8cff
jtrfid/C-Repositories
/CTest/CTest/ch1.cpp
C++
cpp
2,787
no_license
#include "stdafx.h" #include <stdio.h> // 循环语句的辗除法,求两个整数的最大公约数 int gcd1(int a,int b){ printf("循环语句的辗除法,求两个整数的最大公约数,gcd1()\n"); int temp; if(a<b){/*交换两个数,使大数放在a上*/ temp=a; a=b; b=temp; } while(b!=0){/*利用辗除法,直到b为0为止*/ temp=a%b; a=b; b=temp; } return a; } // 循环语句的辗除法,求两个整数的最大公约数 int gcd2(int a,int b){ p...
12437efd9a29caafb905d78760374ae1535ad60a
21572e1152acb689003f999ddf4166a469681229
somitsu/04_BattleTank
/BattleTank/Source/BattleTank/Private/Tank.cpp
C++
cpp
898
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Tank.h" #include "Engine/World.h" float ATank::getHealthPercent() const { return (float)currentHealth/(float)startingHealth; } // Sets default values ATank::ATank() { // Set this pawn to call Tick() every frame. You can t...
80233032f6e9343c49e337db4883ab637aeb5559
cf9b240d3a3ee0db969d45fb59c46b0b7edeb511
rastargame/UtopianEngine
/source/utopian/vulkan/handles/RenderPass.cpp
C++
cpp
6,022
no_license
#include <array> #include "RenderPass.h" #include "vulkan/handles/Device.h" #include "vulkan/Debug.h" namespace Utopian::Vk { RenderPass::RenderPass(Device* device, VkFormat colorFormat, VkFormat depthFormat, VkImageLayout colorImageLayout, bool create) : Handle(device, vkDestroyRenderPass) { AddColo...
a374f6c7c0fe17fe520ae870cb628027f2ed4853
4450ec46b1007a790070b73793cf7ac82c9bbba4
befollow/cppGameFrame
/ my-simple-code/src/game/LoongBgSrv/base/SkillBaseMgr.cc
C++
cc
5,088
no_license
/* * SkillBaseMgr.cc * * Created on: 2012-3-21 * */ #include <game/LoongBgSrv/base/SkillBaseMgr.h> SkillBaseMgr::SkillBaseMgr(): curSkillBaseNum_(0) { // init(); } SkillBaseMgr::~SkillBaseMgr() { } bool SkillBaseMgr::init() { skillBaseList_[curSkillBaseNum_].skillId_ = 1; skillBas...
6244631e032f43c486ac222ac90a7c5624baae09
c4503425ec78d8fecd3ec5e3325ae0957e4f8062
Darian-Mello/ciencia_computcao
/2_semestre/Algoritmos2/strings/Exercicio6.cpp
C++
cpp
1,456
no_license
#include <cstring> #include <string> #include <stdlib.h> #include <iostream> using namespace std; main(){ setlocale(LC_ALL,"Portuguese"); string nome, iniciais, cpf, dia, mes, ano; bool erroucpf; cout << "Informe o seu nome completo: "; getline(cin, nome); do{ erroucpf = false; cout ...
86e0003ad0f33877316e3787523b7f478c0b00bd
55566a9c942157010f32ee44a9b2ad9e894a350b
ubyalamanchi/algorithms
/epi/6_4_board_winnable.cpp
C++
cpp
939
no_license
#include <iostream> using namespace std::cout; /* Problem: Given an array of n integers, where a[i] denotes the maximum distance you can advance from the index i, returns whether it is possible to advance to the last index starting from the begining of the array. Input : Array of integers Output : True or fals...
f9262e316e2e54b5957f9b05187e7e7381c974de
08beb7c373b28fb4374ea35d27e7a5d1a579323b
spocklin/spockTower
/Classes/TowerSnow.cpp
C++
cpp
2,605
no_license
#include "TowerSnow.h" #include "MonsterBase.h" #include "BarrierBase.h" #include "MonsterManager.h" #include "BarrierManager.h" #include "SoundUtil.h" bool TowerSnow::init() { bool bRet = false; do { CC_BREAK_IF(!TowerBase::init(rId)); unschedule(schedule_selector(TowerSnow::doRocation)); _doAnimationSprite ...
d3a0d7c9020d887f0715d783d1f7a5ce443af8e2
400489c3ddd1e19dccb65340b25089970f4839c9
gjs001/Algorithm
/json++/main.cpp
C++
cpp
1,421
no_license
#include <iostream> #include "JsonObject.h" #include <cpprest\http_client.h> #include <cpprest\json.h> using namespace std; using namespace web; void PostTest(web::json::value json_v, std::wstring p_url) // 免贸 : 流立 累己 { web::http::client::http_client client(p_url); client.request(web::http::methods::POST, U("/"), ...
d2c0db270842769e227c619b64855a17b9d0a81f
6cda4acb192304275cc0b6d3c468f1cf4a2de1ff
gneisscookie/StereoPipeline
/graveyard/orthoproject.cc
C++
cc
22,270
permissive
// __BEGIN_LICENSE__ // Copyright (c) 2009-2013, United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. All // rights reserved. // // The NGT platform is licensed under the Apache License, Version 2.0 (the // "License"); you may not use this file excep...
64ace67b6888063fe5fc8887aef51bda27eeafda
a9b029841c50804db8c831087b9ce936a6ab6981
vmaksimo/opencl-clang
/cclang/pch_mgr.cpp
C++
cpp
6,920
no_license
/*****************************************************************************\ Copyright (c) Intel Corporation (2009-2017). INTEL MAKES NO WARRANTY OF ANY KIND REGARDING THE CODE. THIS CODE IS LICENSED ON AN "AS IS" BASIS AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, INSTALLATION, TRAINING OR OTHE...
6ef797402e28c43e15e76f184f62962a71356996
a1a10df5c32a27b46e24a6a63ddf006b98990597
Huifeng-Huang/system-monitor
/src/ncurses_display.cpp
C++
cpp
3,776
permissive
#include <curses.h> #include <chrono> #include <string> #include <thread> #include <vector> #include "format.h" #include "ncurses_display.h" #include "system.h" using std::string; using std::to_string; // 50 bars uniformly displayed from 0 - 100 % // 2% is one bar(|) std::string NCursesDisplay::ProgressBar(float per...
0b8b5e25981120d923e4e2b22792ef500fdb2a98
736d1fa236ef406b9c8d54d7a12245cb256e881b
frachop/macos-libtorrent
/include/libtorrent/kademlia/get_peers.hpp
C++
hpp
3,525
no_license
/* Copyright (c) 2006-2016, Arvid Norberg & Daniel Wallin 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...
f5f02885f0caa231b518b7a34d2832e1ca35a408
9c70fe134f68adcea2c625fddfdc7fc534d64068
niuxu18/logTracker-old
/second/download/CMake/CMake-gumtree/Kitware_CMake_old_hunk_1268.cpp
C++
cpp
483
no_license
int n = static_cast<int>(graph.size()); for(int depender_index = 0; depender_index < n; ++depender_index) { NodeList const& nl = graph[depender_index]; cmTarget* depender = this->Targets[depender_index]; fprintf(stderr, "target %d is [%s]\n", depender_index, depender->GetName()); for...
f44941985114263fbd04dae34de1c431ddadfbc7
6139bb48cb70c2941a32b120cc98e13da0fe17a4
kamil-tekiela/Concurrent-Sugarscape
/SFML.cpp
C++
cpp
13,760
no_license
#include "main.h" /* \cond HIDDEN_SYMBOLS */ class Graph : public sf::RenderTexture { private: int h; int w; int i; int prevHGraph; int maxN; void drawGrid(sf::Font &font, int lines=5){ sf::Text text; text.setFont(font); text.setCharacterSize(16); text.setColor(sf::Color::White); sf::Vertex line[] = { ...
05a1364e38e16b00d0873da2d981334418d6133b
1854a083229fae2c58d2f1168c810034f7e0b942
sparmarNV/DirectXShaderCompiler
/lib/DxrFallback/DxrFallbackCompiler.cpp
C++
cpp
30,673
permissive
#include "dxc/DxrFallback/DxrFallbackCompiler.h" #include "dxc/Support/Global.h" #include "dxc/Support/Unicode.h" #include "dxc/Support/WinIncludes.h" #include "dxc/Support/FileIOHelper.h" #include "dxc/dxcapi.h" #include "dxc/dxcdxrfallbackcompiler.h" #include "dxc/Support/dxcapi.use.h" #include "dxc/Support/dxcapi.i...
189718d24d4c1bf6eb1fc39542c584725ce94689
bc4622f020ea20ea781228308f9bba7445c64c88
KrAzYGEEK32/Crazy-Traffic
/CRAZY TRAFFIC.CPP
C++
cpp
23,215
no_license
#include<graphics.h> #include<dos.h> #include<process.h> #include<conio.h> #include<iostream.h> #include<stdlib.h> #include<string.h> #include<fstream.h> #include<stdio.h> unsigned long dela = 30000, tim = 0; int lane1 = 8, pos = 30, cu = 0, prevl = 0, prevp = 0, switc = 0; int gmod = 0...
7b8c61284ea0555b7bc153a6acc266649b0e6fdd
7c4859626e458fab9cca7975c70c2ecc060e0b5b
Shubham-js/Codes
/ispalindrome.cpp
C++
cpp
452
no_license
#include<bits/stdc++.h> using namespace std; bool check(int a[], int i, int j) { if (i < j) { if (a[i] == a[j]) { return check(a, ++i, --j); } else { return false; } } return true; } int main(int argc, char const *argv[]) { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >>...
4fdb9ec17f0aa14c89f9ae47d3163e86e018b29c
05d4b2ddeabda0bbd911e9cefddda63d39c17e55
Samsung/Castanets
/dbus/object_manager.cc
C++
cc
18,170
permissive
// Copyright (c) 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 "dbus/object_manager.h" #include <stddef.h> #include "base/bind.h" #include "base/location.h" #include "base/logging.h" #include "base/metr...
68b7ff56e6a4a6b5350ba105a39bdba9fda4bf55
fd3f633c8527594692b75f770543436a7dabd1ec
mirolyubovaalyona/Vector-Matrix
/Новая папка/Vector.cpp
C++
cpp
4,101
no_license
#include <iostream> #include <cmath> #include "Vector.h" #include "Matrix.h" namespace mat_vec { // -Конструирует вектор размера size со значениями value Vector::Vector(size_t size, double value): _size(size){ data = new double [_size]; for (int i = 0; i < _size; i++) data[i] = value; } // -Конструктор к...
d59f58df7e885d04e5d6a3b64238997f96e029c4
fd42920dc527238e1f32bafd8e18a21c496d4a0e
gem5/gem5
/src/dev/riscv/plic.cc
C++
cc
17,600
permissive
/* * Copyright (c) 2021 Huawei International * All rights reserved * * The license below extends only to copyright in the software and shall * not be construed as granting a license to any other intellectual * property including but not limited to intellectual property relating * to a hardware implementation of ...
2ab7fe634f8d9646f8d4e50b313510b715627701
5b8d13eac65e0523e7464ba8500e966b1d43518b
MilagrosJohary/parallel_programming
/Tarea_01/MPI_Bxor/src/MPI_Bxor.cpp
C++
cpp
953
no_license
/* ============================================================================ Name : MPI_Bxor.c Author : Mili Version : Copyright : Your copyright notice Description : Compute Pi in MPI C++ ============================================================================ */ #include <math.h> #in...
e6b65db995e1540150ae11f8864ce0318f464060
eac253c79a291939dd430738c9dfea380795d310
mz-lisec/DuplicateChecker
/DuplicateChecker/Checker.cpp
C++
cpp
3,211
no_license
#include "stdafx.h" #include "Checker.h" using namespace ublue; Checker::Checker(std::string& dir) { gDir = dir; checkProgress = 0; } Checker::~Checker() {} void Checker::process(tDuplicated& duplicate) { FileContainer allFiles; //Recursively get all files in directory //Done so progress can be calculated! ...
706f161124357aea3366f98c41f11bbce63128e8
6ec949c777449c546b843718a0549c4ef84d6085
SagarKulk539/APS_Lib_2020
/Codeforces/flintLongVoyage_660_B.cpp
C++
cpp
677
no_license
/* APS-2020 Problem Description, Input, Output : https://codeforces.com/contest/1388/problem/B Code by : Sagar Kulkarni */ #include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); long long int t; cin>>t; for(long long int var=0;var<t;var++) ...
a8f8650f5f7d565bcccac2ec2b6cd2df0f12de04
c20d69d9d1c1e3cec7ca142647d102468b5e27a1
mitrais-cdc-cpp/SNMPDao
/test/TestMicrosoftSQLFactory.hpp
C++
hpp
690
no_license
/* * TestMicrosoftSQLFactory.hpp * * Created on: Sep 26, 2016 * Author: developer */ #ifndef TEST_TESTMICROSOFTSQLFACTORY_HPP_ #define TEST_TESTMICROSOFTSQLFACTORY_HPP_ #include <cppunit/TestFixture.h> #include <cppunit/extensions/HelperMacros.h> #include "../inc/DBFactory.hpp" #include "../inc/MicrosoftSQ...
a2ad2057803a2861b26246a0af7aa62f1cf3ac51
4ce839eea7d8dc2e4b8692e40441e6ae8004e10b
wipedlifepotato/i2pd
/libi2pd/NetDb.cpp
C++
cpp
38,886
permissive
/* * Copyright (c) 2013-2020, The PurpleI2P Project * * This file is part of Purple i2pd project and licensed under BSD3 * * See full license text in LICENSE file at top of project tree */ #include <string.h> #include <fstream> #include <vector> #include <boost/asio.hpp> #include <stdexcept> #include "I2PEndian.h" #i...
482dacdf6a11349ed1a2237040a3f5dc23b6877e
f0e6748f9ee6ce567e8cb8e3da8cd40c672d703a
AntonPavlovNN/C-lab-1
/src/main4.cpp
C++
cpp
246
no_license
#include <stdio.h> #include "task4.h" int main() { int feet, inches; printf("Enter your height in feet and inches in fomate x'yy: "); scanf("%d'%d", &feet, &inches); printf("Your height in cm = %0.1f", convert(feet, inches)); return 0; }
af2974d4d7dc2a381020111010923e5da4f210ef
44fab4eff40e233bda8bbe73e0e3ffc0c9b59478
anazmy14/Competitive-Programming-
/CodeForces/1364B Most socially-distanced subsequence.cpp
C++
cpp
1,474
no_license
#include<iostream> #include <vector> #include <string> #include <map> #include <algorithm> #include <deque> #include <set> #include <cmath> #define MKP make_pair #define ull unsigned long long using namespace std; ull gcd(ull a, ull b) { if (a == 0) return b; return gcd(b % a, a); } ull lcm(ull ...
90d44a6d18aa9b34189a9abdf89ccfd52f2018ec
d20ec1e9b0b08d1e9fe692f1f9463083d4b79514
juso40/cs-bachelor
/IPI/Übung11/main.cc
C++
cc
1,021
no_license
#include <iostream> #include"vector.hh" int main() { std::cout<<"Erstelle ersten Vektor 'eins' und setze 3 stelle auf 5"<<std::endl; Vector<int,5> eins; eins[3]=5; std::cout<<"gebe 3te stelle aus;"<<std::endl; std::cout<<eins[3]<<std::endl; std::cout<<"Erstelle zweiten Vecktor 'zwei' mit 'eins'+'eins'"<<...
75f6c90fdb482144c262969bdea46f5c4958a150
8e7c51133089829bf272620056142cc14286b510
timblechmann/boost.simd
/test/function/simd/erfcx.cpp
C++
cpp
1,176
permissive
//================================================================================================== /*! @file Copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //============================...
59177943fd7e3f7fd9c658068c7f547bda3fc26d
dcbe2db66b89345f7d3e377b6aa62eb641bdbdbf
pexa/core
/src/bench/lockedpool.cpp
C++
cpp
1,229
permissive
// Copyright (c) 2016-2019 The Pexa Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <bench/bench.h> #include <support/lockedpool.h> #include <vector> #define ASIZE 2048 #define BITER 5000 #define MSIZ...
0a6ed30779f26513a31b98e45c63402470cceedc
6b86b2779cb41630d73c0c870de57270e374899a
iamard/DS-Algorithm
/Search and Sort/MergeSort.cpp
C++
cpp
1,207
no_license
#include <cstdio> #include <cstring> using namespace std; void mergeArray(int array[], int left, int middle, int right) { int sorted[right - left + 1]; int cur = 0; int s1 = left; int s2 = middle + 1; while(s1 <= middle && s2 <= right) { if (array[s1] <= array[s2]) { sorted[c...
fe70aee25ef7811a4273691afbc2c117567846cb
dfc7f17f6d9099c5a047d4f04c8a4b4e660ad04e
shiguredo-webrtc-build/webrtc-build
/patchdev/android-simulcast/src/sdk/android/src/jni/pc/rtp_parameters.cc
C++
cc
9,204
permissive
/* * Copyright 2017 The WebRTC 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 in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
79eb6030dc14b42622d9da2365fa96442cf42757
07e00fb833f9af5a3f4233774c537fd9ef330d4e
t2013anurag/DynamicProgramming
/Coins/pathswithkcoins.cpp
C++
cpp
1,242
no_license
/*Created by Anurag*/ #include<bits/stdc++.h> # define r 3 # define c 3 # define max_k 1000 using namespace std; int dp[r][c][max_k]; int pathCountRecursion(int mat[][c], int m, int n, int k) { // Base Cases if(m < 0 || n < 0) return 0; if(m == 0 && n == 0) return (k == mat[m][n]); // If we have solved the...
cd654b71e328ca7bc2d1f6ebe29dec7ea4e2d3f2
7f4641cd0e77cb727e8610a6c77fe1695e6484d7
vittorioua/emulation
/server/tabledlg.cpp
C++
cpp
2,444
no_license
#include "tabledlg.h" #include "ui_tabledlg.h" #include <QStandardItemModel> #include <QFileDialog> #include <qdebug.h> #include <server.h> #include <QTextStream> TableDlg::TableDlg(QWidget *parent) : QDialog(parent), ui(new Ui::TableDlg) { ui->setupUi(this); m_pModel=new QStandardItemModel(10000, 4, th...
e54eead8259cc5b42220a8631416b303635ce6d7
c0eca772a2472a3c92facf7a4ba43a8ae5412c7f
lynxnake/TurboPower-Orpheus
/source/ovcsf.hpp
C++
hpp
6,397
no_license
// CodeGear C++Builder // Copyright (c) 1995, 2014 by Embarcadero Technologies, Inc. // All rights reserved // (DO NOT EDIT: machine generated header) 'ovcsf.pas' rev: 27.00 (Windows) #ifndef OvcsfHPP #define OvcsfHPP #pragma delphiheader begin #pragma option push #pragma option -w- // All warnings ...
9090e8808428e66a375f2a24c7bd40c02f72af8e
b3dde961c210e6be12fd0b7ca6d55fb0e80a8614
halfa/dublin-traceroute
/src/dublin_traceroute.cc
C++
cc
8,068
permissive
/** * \file dublin_traceroute.cc * \author Andrea Barberio <insomniac@slackware.it> * \copyright 2-clause BSD * \date October 2015 * \brief Main class for the NAT-aware multipath traceroute * * This module contains the implementation of the NAT-aware multipath * traceroute known as dublin-traceroute. * *...
2965ce96ae11fefed1adf9265761c71e7e2bbe87
9e657353bc426d47eba1b20428c4966de8c12691
juniorprincewang/gdev
/cuda/runtime/ocelot/transforms/implementation/SplitBasicBlockPass.cpp
C++
cpp
2,545
permissive
/*! \brief SplitBasicBlockPass.cpp \author Gregory Diamos <gregory.diamos@gatech.edu> \date Friday August 12, 2011 \brief The source file for the SplitBasicBlockPass class. */ // Ocelot Includes #include <ocelot/transforms/interface/SplitBasicBlockPass.h> #include <ocelot/ir/interface/ControlFlowGraph.h> #incl...
396ff27cb9a0e46263457c352ad8c340260b7f83
32ef465251cb221f69838a9204b6bb7d093aa1bc
LiamDGray/organicmaps
/indexer/features_vector.hpp
C++
hpp
2,837
permissive
#pragma once #include "indexer/dat_section_header.hpp" #include "indexer/feature.hpp" #include "indexer/metadata_serdes.hpp" #include "indexer/shared_load_info.hpp" #include "coding/var_record_reader.hpp" #include <cstdint> #include <memory> #include <vector> namespace feature { class FeaturesOffsetsTable; } /// N...
b4666f7f1c9291b0b8db92028f8d5c18d8ef911a
3f71aef5a65d5d3232cbef3c35fe4014d1ce2745
darknetpay/darknet
/src/masternode-budget.cpp
C++
cpp
67,610
permissive
// Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2016 The DarkNet developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" #include "init.h" #include "masternode-budget.h" #include "m...
fab67332275dd276ed05a2790d2175cdc93beb2c
9d3eff926c4a04de2e2a54f1485bd28b98ea3501
brpasiliao/Object_Oriented_Programming_in_C_Plus_Plus_Projects
/equivalent arrays.cpp
C++
cpp
975
no_license
#include <iostream> using namespace std; bool equivalent (int a[], int b[], int n) { for (int i = 0; i < n; i++) if (a[0] == b[i]) { bool match = true; for (int j = 1; match; j++) { if (a[j] != b[(i+j) % n]) match = false; if (j == n-1) return true; } } return false; } in...
8729208f3f51720f9328b40d1e1e6ca58c5a46d1
1237478d477899d2915efc4c5cf1c6c6d88a0e55
mohamedsobhi777/CompetitiveProgramming
/CSES/DP/dice-combinations.cpp
C++
cpp
947
no_license
#include<bits/stdc++.h> /* #pragma GCC optimize("-Ofast") //#pragma GCC optimize("trapv") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx2,tune=native") #pragma GCC optimize("-ffast-math") #pragma GCC optimize("-funroll-loops")*/ #define I inline void #define S struct #define vi vector<int> ...
db6eaad67aa8fddcb64dedff8373b73f46dd9b53
e325799dcf9222a5a9e05856cb44afdca6e3910c
WaykiChain/wicc-wasm-cdt
/wasm_llvm/tools/clang/test/OpenMP/target_parallel_for_simd_codegen.cpp
C++
cpp
52,554
permissive
// Test host codegen. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-64 // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple pow...
9c7db3444f52a5d33a30d0c2fa32b4228c0c6288
162e22f4f1162f34e03c26f013482932c1f83061
AnyUsernameIsFine/GLEngine
/GLEngine/Source/System/TimePoint.cpp
C++
cpp
296
no_license
#include "TimePoint.h" namespace GLEngine { float TimePoint::differenceInSeconds(const TimePoint& t) const { return std::chrono::duration_cast<std::chrono::nanoseconds> (timePoint - t.timePoint).count() / 1000000000.0f; } void TimePoint::setToNow() { timePoint = Clock::now(); } }
49f2f0dddc59ddd433f7e97f00275d9dbe24c492
80970b8bbbef4c48ebcd9ae27c15d741c025f048
maxyypoo/cs
/TotalofAll/ok/xCS/Strings/strcat.cpp
C++
cpp
983
no_license
#include <iostream> using namespace std; void showArray(const char array[]) { for (int count = 0; array[count] != '\0'; count++) cout << array[count]; cout << endl; } int strlen (char* arr) { int length = 0; for (int i = 0; arr[i] != '\0'; i++) length++; /* while (*(arr++) ) ...
7ba47a35cff6fb2b3fdd9277547a3813d8b17e2b
35d2aa0886dab99cbafb8e8bf6e0916b2a491906
CMS-TMTT/cmssw
/FWCore/PluginManager/bin/refresh.cc
C++
cc
12,561
permissive
#include "FWCore/PluginManager/interface/CacheParser.h" #include "FWCore/PluginManager/interface/PluginCapabilities.h" #include "FWCore/PluginManager/interface/PluginFactoryBase.h" #include "FWCore/PluginManager/interface/PluginFactoryManager.h" #include "FWCore/PluginManager/interface/SharedLibrary.h" #include "FWCore...
46c3f5a5c2de41ac2c32b40784cebd4a9ab9e2e4
9085dbb5d46bd6a5ad3010d763d729165465beef
RamilGauss/MMO-Framework
/Test/GuiProject/Meta/Generated files/Container/HandlerTypeInfo.cpp
C++
cpp
2,214
permissive
/* Project Handler */ // ReflectionCodeGenerator version 2.4.0, build 58 [Binary, DynamicCaster, Json, EcsComponentExtension, ImGui, Reflection, TypeInformation] // File has been generated at 2023_08_28 11:41:44.675 #include "HandlerTypeInfo.h" #include "SingletonManager.h" #include "RunTimeTypeIndex.h" using names...
0269a42980697a2b23fe7b4996d7dfab34486c29
f43fb17ac59a602760db1c5e22f3c68781c28805
15831944/stusystem
/StuSystem/UserInput.cpp
C++
cpp
798
no_license
#include "UserInput.h" UserInput::UserInput(Console* console){ this->console = console; } char UserInput::inputCh(){ this->clear(); char ch = '\0'; ch = getch(); this->console->setColor(0, 15); putchar(ch); this->console->setColor(); return ch; } MString UserInput::inputStr(int size){ this->clear(); char s...
e999fe8112d072c3bfecc577f4aa36cc1aa81d25
3ddd47f006c1b8b1f89a0bfff5ba3dcbffd3422b
mariaclark1123/GML
/txt-integer(C).cpp
C++
cpp
537
no_license
#include<stdio.h> #include<string.h> void main() { float temp; float array[20000]; int count = 0; FILE *fp; FILE *fout; fopen_s(&fp, "export.txt", "r"); if (fp == NULL) printf("can not open this file\n"); while (!feof(fp)) { fscanf_s(fp, "%f", &temp); array[count] = temp; count = count + 1; } fclo...
ed8115aae05565af57af272c55727cc248a08dd4
10256274ae1f89e5900ddc010158376a2a40ae7c
chaosannals/zany
/cpp/aim/Logger.cpp
C++
cpp
862
permissive
#include <string> #include <memory> #include <sstream> #include <fstream> #include "Logger.h" #include "Format.h" #include "Mistake.h" namespace{ std::string MakePath( const char *directory, const char *name){ std::stringstream date; Aim::Date(date); std::string path(directory); path += '\\' + date.str() ...
e3bdc6019bd02b126d0d9e2f4e3feff6e9ccd03f
477f5104ea223d67753637099e0c804c7c0950f9
dragonGR/frameworks_av
/media/libaudiohal/impl/StreamHalLocal.cpp
C++
cpp
18,498
permissive
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
ad28e43e10b8c26ecc65419bbe2bf2d0781a3d89
7d4a76670a9cb5dd41219c3ea049774f4ff25f07
srharris91/PSE
/PSE/src/get_D_Coeffs.cpp
C++
cpp
1,173
permissive
#include "get_D_Coeffs.hpp" #include "Ax_b.hpp" #include "factorial.hpp" #include <cmath> #include "print.hpp" #include "Init_Vec.hpp" namespace PSE { PetscInt get_D_Coeffs( const PetscScalar s[], const PetscInt &n, Vec &output, const PetscInt &d ){ ...
04bf9f367e3704566de876b61615d5ebf19d4afe
5fbb095ae1dafa147f4d62fdfd8cc6fcb0f0d02b
xueliuxing28/Medusa
/Medusa/MedusaCore/Core/Threading/win/ThreadPoolTimer_win.cpp
C++
cpp
2,297
permissive
// Copyright (c) 2015 fjz13. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. #include "MedusaCorePreCompiled.h" #ifndef MEDUSA_POSIX_THREADING #include "Core/Threading/ThreadPoolTimer.h" #include "Core/Threading/ThreadPool.h" MEDUSA_BEGIN; na...
65489cf5facddd84e443aa8a379ab298d00ebb14
7f53d89fd0fa500c0ae40aeef8600714aba59a9a
open-goal/jak-project
/game/graphics/gfx.cpp
C++
cpp
6,052
permissive
/*! * @file gfx.cpp * Graphics component for the runtime. Abstraction layer for the main graphics routines. */ #include "gfx.h" #include <cstdio> #include <functional> #include <utility> #include "display.h" #include "common/global_profiler/GlobalProfiler.h" #include "common/log/log.h" #include "common/symbols.h...
52d296994a633d8393d4a276c3b2aacf25ae5463
20c189709cf1aa784e9d24cce5466a965604f953
smarc-project/imc_ros_bridge
/external/imc-cxx/IMC/Spec/PlanDB.hpp
C++
hpp
7,026
permissive
//*************************************************************************** // Copyright 2017 OceanScan - Marine Systems & Technology, Lda. * //*************************************************************************** // Licensed under the Apache License, Version 2.0 (the "License"); * // you m...
44b7de83e057fc7b1e12399a01d2a8453e888fdf
21d95b4f7bed81adab4988ae452c505f70f0e5e3
neonsoftware/connectedhomeip
/src/lib/mdns/Discovery_ImplPlatform.cpp
C++
cpp
19,182
permissive
/* * * Copyright (c) 2020 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
b9cf184557adc7c97c074cc583031afad7385c6d
486e9cee50c12104bb342d9955e5371e0140a491
brkuhgk/Spoj-solutions
/ADABANKET.cpp
C++
cpp
369
no_license
#include<stdio.h> using namespace std; int main(){ int n, curmin=100000, temp, pui; scanf("%d", &n); for(int i=1;i<=n;i++){ temp=0; for(int j=1;j<=n;j++){ scanf("%d", &pui); temp+=pui; } if(temp<curmin){ curmin=temp; } } print...
016baf7f53d335a7e9aad7e2106e12e1d818f421
956c1a0e6aafd100e9d21652cc834074f5e7515e
monkipython/GPS-device-tracker
/GPSIOSDemo/xxsocket/refs/httpserver/thelib/utils/apr_allocator.cpp
C++
cpp
12,736
no_license
#include "apr_allocator.h" #include <stddef.h> /* for offsetof */ #if APR_HAVE_STDLIB_H #include <stdlib.h> /* for malloc, free and abort */ #endif #if APR_HAVE_UNISTD_H #include <unistd.h> /* for getpid and sysconf */ #endif #if APR_ALLOCATOR_USES_MMAP #include <sys/mman.h> #endif /* * M...
ad1d30cf7d1d287f22935adb13d5ca19a5e24662
a9eba3473df5c6bcc70f52ceb5c3b0ca98d898db
princekm/packet-analyser
/ui/widgets/MenuBar.cpp
C++
cpp
1,344
no_license
#include "MenuBar.h" #include <QApplication> #include "UIManager.h" MenuBar::MenuBar(QWidget *parent):QMenuBar(parent) { init(); setUpConnections(); applyStyle(); } MenuBar::~MenuBar() { } void MenuBar::init() { nameDialog = new NameEntryDialog; nameDialog->hide(); fileMenu = new QMenu("File"...
dba63179c88273539dab2e2fc0c625ea6a114108
71e927e60879235c68281ced0a546f57c0026569
Ryuis92/Algorithms
/BOJ/2407.cpp
C++
cpp
1,098
no_license
/* https://www.acmicpc.net/problem/2407 */ #include<cstdio> #include<string> #include<algorithm> using namespace std; int n, m; string com[101][101]; string add(string a, string b); string combination(int a, int b); int main() { scanf("%d %d", &n, &m); printf("%s\n", combination(n,m).c_str()); return 0; } str...
c6c68a309e01e28e2070d9dbf795133ed481858e
098640322770d220c5c89d8a9addf0558e784942
LavishKothari/MyAllCodes---Lavish
/hackerrank.com/caesar-cipher-1.cpp
C++
cpp
308
no_license
#include<stdio.h> int main() { int n,k; char str[101]; scanf("%d%s%d",&n,str,&k); for(int i=0;str[i];i++) { if((str[i]>='a' && str[i]<='z')) { str[i]=(str[i]-'a'+k)%26+'a'; } else if((str[i]>='A' && str[i]<='Z')) { str[i]=(str[i]-'A'+k)%26+'A'; } } printf("%s\n",str); return 0; }
4ed23ab6817fe3ea81e72f9f530c62fd61b7df9f
aaeaa4a90ac3e094dc2013baa16dec733a643bd9
mrnettek/CPP
/CPP1/copy2.cpp
C++
cpp
558
permissive
#include <iostream> #include <fstream> using namespace std; int main(int argc, char *argv[]) { if (argc < 3) { cerr << "Usage: cp file1 file2 " << endl; return 0; } string iName = argv[1]; string oName = argv[2]; ifstream fin; ofstream fout; fin.open(iName.c_str()); fout.open(oName...
249ab91a62012b7464ac5a5ffb3e08c413f5e364
2f994648823839235524bd4b76c75b5e0ebf02e0
bvbasavaraju/competitive_programming
/leetcode/weekly/211.cpp
C++
cpp
2,888
permissive
/**************************************************** Date: Oct 18th, 2020 Successful submissions : 1 Time expiration : 0 Not Solved : 2 Wrong Answer/ Partial result : 1 link: https://leetcode.com/contest/weekly-contest-211 ****************************************************/ #include <iostream> #include <vector> #in...
7053baa7e7fc1c9ae2525e68435e46064e33ee7e
cc08772f1b09417d7f7b5e01524fc1ab16fe0b1a
GuillaumeGas/serenity
/LibGUI/GInputBox.cpp
C++
cpp
2,572
permissive
#include <LibGUI/GInputBox.h> #include <LibGUI/GBoxLayout.h> #include <LibGUI/GLabel.h> #include <LibGUI/GButton.h> #include <LibGUI/GTextEditor.h> #include <stdio.h> GInputBox::GInputBox(const String& prompt, const String& title, CObject* parent) : GDialog(parent) , m_prompt(prompt) { set_title(title); ...
8724fa982da211a31c3b0ace9e8dfef6d2a9f34a
c65e11a0c7d68820ee82d98c026d26a0645d5446
zhf-0/neopz
/Projects/dactests/LaplaceInSphere.cpp
C++
cpp
129,139
no_license
// // LaplaceInSphere.cpp // PZ // // Created by Douglas Castro on 1/29/15. // // #include "LaplaceInSphere.h" #include "pzcheckgeom.h" #include "tools.h" //#define TROPICO #define CompleteShpere const int norder = 6; LaplaceInSphere::LaplaceInSphere() { fDim = 2; fmatId = 1; fdirichlet = 0; fneu...
fe366aa21d2358cb558b8932e6c840c23f8b4273
597a999cf5de7c12114103e3fa953d6633fd6e6b
jimstjean/sqldb
/SQL Database Object v2.1/Source/MMF2SDK/Extensions/V2Template32/sqldb.cpp
C++
cpp
11,595
permissive
//////////////////////////////////////////////////////////////////////////// // SQL Database MMF Extension // (c) 2004-2005, Jim St. Jean // // SQL DB wrapper utilities source file // // The file provides wrapper routines to the MMF extension so, for // example, the underlying SQLite implementation can be swapped...
9432de7e4b91b4009ffcb70c7b61df6a4c3cf222
31f2eb884f5eb5394002d876e430f37a605ebcd4
DenishBaman/wmr_pkg
/wmr_state_feedback/src/wmr_state_feedback/GPS2xy.cpp
C++
cpp
2,572
no_license
/* > @Global to Local co-ordinate transformation defination > @file Gps2xy.cpp */ #include <wmr_state_feedback/GPS2xy.h> using namespace wmr_state_feedback; void GPS2xy::Update_ECEF_init() { double L_n = semi_major/(std::sqrt(1-Eccen_sq*std::pow(std::sin(lat_init),2))); //Length of normal to the ellipsoid // X...