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
84a4f2673d2ccead2c525aea1dbe8ab18e2d8a0d
c43c59d7de390bcfccb71cf50e96807bae4b7791
marjotm/SJSU-Superway-2014
/lpc1758_freertos_195/L5_Application/source/remote.cpp
C++
cpp
4,462
no_license
/* * SocialLedge.com - Copyright (C) 2013 * * This file is part of free software framework for embedded processors. * You can use it and/or distribute it as long as this copyright header * remains unmodified. The code is free for personal use and requires * permission to use in a commer...
20adf1be01224a058a8cf41ce8feddcd0d79cebb
b64161d50b332f862b83bc8123c75299ce351d13
MothCreations/gavlanWheels
/tensorflow/core/framework/function_handle_cache.cc
C++
cc
2,182
permissive
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
1022b11b101ca04f3db41e2983232619dec15a76
2f09e7038dd2c7928809a7efcecfb74feb4388fe
yotam-medini/cj
/ymutil/dfs.cc
C++
cc
6,314
no_license
#include <algorithm> #include <array> #include <fstream> #include <iostream> #include <string> #include <vector> using namespace std; typedef unsigned u_t; typedef unsigned long long ull_t; typedef array<u_t, 2> au2_t; typedef vector<u_t> vu_t; typedef vector<vu_t> vvu_t; typedef vector<au2_t> vau2_t; typedef void (...
381865bfd7c0cd23021682d3f32cfb5c21d530d3
ee2a0f75a333a445c1564deb95c664811930f013
Dallin343/PlanetRenderer
/src/CubeSphereMesh.cpp
C++
cpp
4,378
no_license
// // Created by Dallin Hagman on 12/5/20. // #include "CubeSphereMesh.h" static const glm::vec3 origins[6] = { glm::vec3(-1.0, -1.0, -1.0), glm::vec3(1.0, -1.0, -1.0), glm::vec3(1.0, -1.0, 1.0), glm::vec3(-1.0, -1.0, 1.0), glm::vec3(-1.0, 1.0, -1.0), glm::vec3(-1.0, -1.0, 1.0) }; static const...
ce0a7035b05c6d00f713312d37813dfc0015aef4
0541d3fee1ce05103b0e01a65572ac9176761d1c
AmanRawat1298/CodeForces
/B_Trouble_Sort.cpp
C++
cpp
1,181
no_license
#include <iostream> #include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int t; cin>>t; while(t--) { int n; cin>>n; vector <int> a; vector <int> b; int val; for(int i=0 ;i<n ;i++) { cin>>val; a.pu...
a00d447c685e8ee5fad6b9c43bffb91eacc9999f
766525c9154f8462a43bcd8ab01b7ac96f33a2b4
Mohamed-Elhabashy/competitive-programming
/Codeforces/208/A.cpp
C++
cpp
367
no_license
#include<bits/stdc++.h> using namespace std; char s[201]; int main(){ scanf("%s",s); int n=strlen(s); for(int i=0;i<n;i++){ if(s[i]=='W' && s[i+1]=='U' && s[i+2]=='B'){ i+=2; } else{ printf("%c",s[i]); if(s[i+1]=='W' && s[i+2]=='U' && s[i+3]=='B') pri...
987d846217fc5b37c9262f1ae843ddbe79cd08c5
6e24a4aa83572bc9399a9094575933d524e76237
ashusao/Coding_Practise
/Leet Code/Data Structure/LinkedList/src/mergeTwoSortedLL.cpp
C++
cpp
872
no_license
/* * mergeTwoSortedLL.cpp * * Created on: Jul 21, 2018 * Author: ashu */ #include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) { } }; // Create a dummy node and make it head // point next of dummy node to ll whose val is small and m...
59f872bc7e819a5893785c78f5c6fbf18e1cbec7
3f6b9565048d2a5a6daafeac39b1f1041189b72d
jenetics/trng4
/src/static_assertion.hpp
C++
hpp
2,225
no_license
// Copyright (c) 2000-2011, Heiko Bauke // 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 o...
405406290371a85bbbb520abfd7887c429a8a893
000eab4ced7dc610793ab6f0f31a6d7ba9268841
novaquark/aws-sdk-cpp
/aws-cpp-sdk-workspaces/source/model/CreateWorkspacesResult.cpp
C++
cpp
2,057
permissive
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
f7d5095b230ddc14f44e25bc3d287f74c9e1dd1a
e821c4865526acf25e453e4e6278e83bad6e3227
pizibing/swingengine
/SEFoundation/SEEffects/SEBumpMapL1Effect.cpp
C++
cpp
2,120
no_license
// Swing Engine Version 1 Source Code // Most of techniques in the engine are mainly based on David Eberly's // Wild Magic 4 open-source code.The author of Swing Engine learned a lot // from Eberly's experience of architecture and algorithm. // Several sub-systems are totally new,and others are re-implimented or ...
47e69c456a01b2ff03c9ff953d6a78a3b02ffec2
d0fbb3f37692580dd8b265fdfbd7326e68300260
OS2World/APP-EDITOR-FAST_Editor_Lite
/source/pars_pl.cpp
C++
cpp
3,429
permissive
/* ** Module :PARS_PL.CPP ** Abstract : ** ** Copyright (C) Sergey I. Yevtushenko ** ** Log: Fri 08/12/2000 Created ** */ #include <parser.h> #include <version.h> //---------------------------------------------------------------------- // // Class Parser_PL // //----------------------------------------------------...
db30c15548044c8beb41f3eca096d32f784ce5bd
4470dc9cf283cb5a8a2cc925ed760c55e8397f90
izzyreal/vmpc-unreal-plugin
/VmpcPlugin/Source/ThirdParty/include/mpc/src/midi/event/meta/SequencerSpecificEvent.cpp
C++
cpp
1,576
no_license
#include <midi/event/meta/SequencerSpecificEvent.hpp> #include <midi/event/MidiEvent.hpp> #include <midi/event/meta/MetaEvent.hpp> #include <midi/util/MidiUtil.hpp> #include <midi/util/VariableLengthInt.hpp> using namespace mpc::midi::event::meta; SequencerSpecificEvent::SequencerSpecificEvent(int tick, int delta, s...
a41c0c91575b3a10b7e85fdb608f6d10353f3f4a
237d98577c8b33aee41a3434e40d1cd1adfd846c
frank-yuzhige/bugzillas-browsing-report
/gcc/96097/bug.cpp
C++
cpp
502
no_license
/** * Triggers ICE on x86-64 gcc 10.1 with flag "-std=c++17" * The bug is first introduced in x86-64 gcc 5.1 (the version which gcc begins to support c++17 standard). */ template < typename A, template <typename T, typename T::typeX> typename TA> auto func() { return TA<typename A::typeY, 0>{}; } struc...
0dd2bfff1201198fcdcaa17ea3fb66c73998360d
165196b0eac35fce5f03c0086e669588590c3ea1
jiyongjung/CoalaMC
/Example4/Example4.cpp
C++
cpp
1,833
permissive
#include <CoalaMOD.h> #pragma comment(lib, "CoalaMOD.lib") #include <math.h> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif void locateBlockIfAir(BlockID block, int x, int y, int z, bool emptyOnly) { if (!emptyOnly || getBlockType(x, y, z) == BLOCK_AIR) { locateBlock(block, x, y, z);...
637f4e0d90426ff9207520c3f32d7f91dc1e13d2
8b697743b3bc64d33023f9665bb4ee517e36ee42
weirdrag08/Data-Structures-Algorithms
/Dynamic_programming/Max_non_overlapping_bridges.cpp
C++
cpp
1,609
no_license
#include <iostream> #include <unordered_map> #include <list> #include <vector> #include <stack> #include <queue> #include <algorithm> #include <string> #include <climits> #include <utility> using namespace std; #define mp make_pair #define pb push_back #define INFI 10e8 #define INF 10e7 #define mod 1000000007 #define ...
b43916b89446b37e07f3bedeb599d51b78f52be1
08d5930d06cc046598d8b8815e0e1974d4e32d88
pandaant/libecalc
/src/ecalc.cpp
C++
cpp
4,369
permissive
#include "ecalc.hpp" #include "random_handlist.hpp" #include <algorithm> namespace ecalc { const double ECalc::DLUT[] = {0, 1, 0.5, 0.33333333333333333, 0.25, 0.2, 0.16666666666666666, 0.14285714285714285, 0....
9b882a03ac6bf563308b02b6808f493721e1e3f5
439c6d4a139f7d80d5579366674b81d27eeefd1f
timdewhirst/util
/server_main.cpp
C++
cpp
2,064
no_license
#include <cstring> #include <iostream> #include <string> #include <thread> #include "tcp_server.hpp" #include "tcp_socket.hpp" int main(int argc, char* argv[]) { if (argc != 2) { std::cout << "usage: " << argv[0] << " <port>\n"; return 1; } try { tcp_server server; ...
b9fcaecdf636934c580459a43a34c0aa14b475cd
cf033ba5352137d4491d98f72b3a466abbff49fc
janderudder/test-tool
/test-tool.hpp
C++
hpp
4,121
no_license
#pragma once #include <iomanip> #include <iostream> #include <string> #include <string_view> // Public interface // Assertion-like macro. //////////////////////////////////////////////////////////////////////////////// #define EXPECT(cond, reason) \ ::test_tool::impl::m4_api_expect(...
23bb072fe2e370fed2ae82fff83975c078d49508
a3d945803e666297c40dde569e8f7e36cd64bd0b
hmilkovi/fakultet
/Strukture podataka/Stog/MainProgram.cpp
C++
cpp
15,054
permissive
#include <cstdlib> #include <iostream> #include <cstring> #include <stdio.h> #include <time.h> #include "stog_polje.h" //#include "stog_pokazivac.h" using namespace std; class teretnivlak{ private: roba artikl; int kolicina; string stanica1, stanica2; time_t now, later; int brojac;...
b4e9caaab799921c545f086d02ded09877da77e0
6aaf8fd2fb0d5a8dc7662353faed3db13d44fc89
Neurologist/mrpt
/apps/mrpt-performance/perf-atan2lut.cpp
C++
cpp
3,703
permissive
/* +---------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | http://www.mrpt.org/ | | ...
a94ee713740177bca4f8238c796d98adaa83f62f
6082c18843f1165144399d91a55cbe77afa9cb23
testitesti22/palemoon27
/gfx/gl/GLContextProviderWGL.cpp
C++
cpp
20,779
no_license
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GLContextProvider.h" #incl...
83a4930a8eb3666ff8a5dac30dab6e73651ff0c1
61034654be9ebac843b5c063d6616e9014f95b82
Chortowod/Cpp-Practice
/Lab 9/Lab 9.cpp
C++
cpp
6,278
no_license
#include <iostream> #include <string> #include "time.h" using namespace std; class DivideByZeroError { private: string message; public: // DivideByZeroError() : message("Деление на нуль") { } DivideByZeroError() { message = "Деление на нуль"; } void printMessage() const { cout << message << endl; } }; class Stud...
878136ce210438b0e37df150db5adecded07864e
702926e403e6e8883c0716ef40f214e86e706243
klimovhome/xxx
/xxx/src/send_transport.cpp
C++
cpp
4,062
no_license
//#include "stdafx.h" #include "send_transport.h" #include <string.h> #include <stdio.h> #ifdef __XXX_WINDOWS__ send_transport_windows::send_transport_windows() { } void send_transport_windows::open() { WSADATA wsa; unsigned short usWSAVersion = MAKEWORD(2, 2); //Start WSA WSAStartup(usWSAVersion, &wsa); _s...
6e282416f0c37b204b9f10665cc3f841aee45eb0
f8d1ceb04241ebf89dff101f4b9cd2cb1ea3ba49
pan2za/ctrl
/third_party/boost_1_48_0/libs/config/test/config_info.cpp
C++
cpp
39,780
permissive
// Boost config.hpp configuration test program file -----------------------// // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001. // (C) Copyright Peter Dimov 2001. // (C) Copyright Darin Adler 2001. // (C) Copyright Beman Dawes 2002. // Use, modification and distribution are sub...
ba7e14d85cb47554517eacc12038f3922d0e0c52
e248dd3f5e5c8c85c3ba21eb69b92935e9857fdf
Sparking2/learncpp
/CplusplusQuizes/Ch_7_X_Question1.cpp
C++
cpp
1,063
no_license
// Take the program below and modify it so that the ball falls for as many seconds as needed until it reaches the ground. #include <iostream> #include "constants.h" double calculateHeight(double initialHeight, int seconds) { double distanceFallen = myConstants::gravity * seconds * seconds / 2; double heightNow = in...
5e9ff5c61bbc89aa01bbb18ca6011575d2999aa7
0bcb0b78a9121aa02c416e5aa232e0fdb8226468
TieConscious/OgnamMirror
/Source/Ognam/Ritual/RitualPlayerState.cpp
C++
cpp
2,257
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "RitualPlayerState.h" #include "RitualGameState.h" #include "Ognam/OgnamCharacter.h" #include "Engine/World.h" #include "UnrealNetwork.h" #include "Ognam/OgnamMacro.h" #include "RitualSpectator.h" ARitualPlayerState::ARitualPlaye...
97d5cadc830aed6d6b52b0a58f097b05a5e9caf6
bb55d230462b3abcb3da0a49502997aa09f67272
rubcv/INGENIERIA-INFORMATICA-ETSIIT-UGR
/2 SEGUNDO/2 Cuatrimestre/Inteligencia Artificial - IA/EXAMENES/player.cpp
C++
cpp
19,053
no_license
/****************************************************************************** * * Inteligencia Artificial * Grado en Ingeniería Informática * * 2014 - Ernesto Serrano <erseco@correo.ugr.es> * ----------------------------------------------------- * * Codigo fuente del agente * *******************************...
6f1537154411316dd7b789c150156ac9640b01f4
f574bef8adf69ed9ffba44ba1a0c28a2f28a447f
Stanley131/Research
/RpcTransportDesign/OMNeT++Simulation/inet/src/inet/networklayer/ipv4/IPv4RoutingTable.cc
C++
cc
32,291
no_license
// // Copyright (C) 2004-2006 Andras Varga // Copyright (C) 2000 Institut fuer Telematik, Universitaet Karlsruhe // // This program 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 2 // ...
dd155c3035eca976a5a4e0922f6964f1850e40ed
5107d7ecf80243f06d2f307aa78d33490149123e
bansalanurag/LeetCode
/submissions/Interval List Intersections_343479971.cpp
C++
cpp
965
no_license
class Solution { public: vector<vector<int>> intervalIntersection(vector<vector<int>>& A, vector<vector<int>>& B) { vector<vector<int>> ans; if (A.empty() || B.empty()) return ans; int i = 0; int j = 0; while (i < A.size() && j < B.size()) { i...
7c087664617783327c26369645fdf4ae55f4e576
2d8f644aa1e5f5823137a7c7d86b78104a4b7018
CiscoDevNet/ydk-cpp
/cisco-ios-xe/ydk/models/cisco_ios_xe/Cisco_IOS_XE_types.hpp
C++
hpp
18,951
permissive
#ifndef _CISCO_IOS_XE_TYPES_ #define _CISCO_IOS_XE_TYPES_ #include <memory> #include <vector> #include <string> #include <ydk/types.hpp> #include <ydk/errors.hpp> namespace cisco_ios_xe { namespace Cisco_IOS_XE_types { class CosValueType : public ydk::Enum { public: static const ydk::Enum::YLeaf cos; ...
f7ff6f9f314459b5634791c1a8faa539547172ce
7e25583fe2cbfa8f64def313914f450c873bf1bc
chiwunau/pcl_tutorials
/imagesift/imagesurf.cpp
C++
cpp
5,688
no_license
// Copyright (C) 2008 Rosen Diankov (rdiankov@cs.cmu.edu) // // This program 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 License, or // at your option) any later version. /...
e5c4ff04a0de37692b8913ad62e89cba62d590e9
5d5dfe583ee2b5f092abbc43b064bba8f60aae01
MORTAL2000/Rade
/Source/Rade/System/OptionManager.cpp
C++
cpp
10,720
permissive
// Copyright 2015 Vagen Ayrapetyan #include "OptionManager.h" #include "Rade.h" #include "AudioDevice.h" #include "InputCore.h" ////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Input Settings void UOptionManager::GetAllActionInput(TA...
5c7de6592126b960786fcda26b92595c8d443542
1a3ec2c9a6f705f1d12316c17a3ade15e6601f73
3rd-ndn-hackathon/repo-sql
/postgrespp/result.cpp
C++
cpp
1,913
no_license
/* Copyright (c) 2014, Tolga HOŞGÖR All rights reserved. This file is part of postgrespp. postgrespp is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opt...
e3daca3b9e7846abb23f47925c4214232860dd9e
fd373d28259eed00da22406af07abd4b9f2be8cb
adzhou/oragle
/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp
C++
cpp
3,189
permissive
/* * Copyright (C) 2013 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
0b7a660268a080bc175aaa12de93623e9e0602c0
04f094c97605018fae5d011bb3e296e16910be97
dk8660/ProgrammingAndPractice
/실습10/3__상속_생성자__소멸자.1626597300695/Main.cpp
C++
cpp
372
no_license
#include <iostream> #include <string> using namespace std; class animal{ public: animal(){ cout << "생성자 animal" << endl; } ~animal(){ cout << "소멸자 animal" << endl; } }; class hamster : public animal{ public: hamster(){ cout << "생성자 hamster" << endl; } ~hamster(){ cout << "소멸자 hamster" << endl; } }; int main()...
3e49530d6a30e65df396ed3e2286752e212428dd
42e3ff2e0a4a76e3783f29af2589f97f5eece541
gsc0107/octopus
/src/config/option_collation.cpp
C++
cpp
71,381
permissive
// Copyright (c) 2015-2018 Daniel Cooke // Use of this source code is governed by the MIT license that can be found in the LICENSE file. #include "option_collation.hpp" #include <string> #include <iostream> #include <cctype> #include <fstream> #include <exception> #include <stdexcept> #include <iterator> #include <al...
9fcfa1c6635a6aa48e61960b1fdb19c4f4f3485f
c4c6cdf33d2df0be0ec2dbefb175f77d1e76ff99
ReegeChris/Engines-Lab-4---Exercise-2-Part-1
/Assets/Plugins/Native Plugin/Native Plugin/Native Plugin.cpp
C++
cpp
1,085
no_license
#define EXPORT_API _declspec(dllexport) #include <iostream> extern "C" { //The functions we will call from Unity. int EXPORT_API PrintANumber() { return 5; } int EXPORT_API AddTwoIntegers(int a, int b) { return a + b; } float EXPORT_API AddTwoFloats(float a...
75e33232832d0243a26cd31e63d93e5d33d16bfb
c51577f63a80cdf26ba545bd20bf5db77049a5aa
igor-dev13/oop
/lab2/dictionary/dictionary/main.cpp
C++
cpp
698
no_license
#include "stdafx.h" #include "dictionaryProcessor.h" using namespace std; int main(int argc, char * argv[]) { SetConsoleCP(1251); SetConsoleOutputCP(1251); if (argc != 2) { cout << "Invalid count of arguments\n" << "Usage: dictionary.exe <dictionary file name>\n"; return 1; } string dictionaryFileIn...
5624e4f2eebaf4bcb7683e675a186a68f454d6da
e7ec19e15956ee3cb84264d77fb2b181c0ecf0b7
pseyfert-cern-gitlab-backup/Urania
/Phys/BsKstKst/src/TimeIntegratedRephase/AngF2.cxx
C++
cxx
4,639
no_license
/***************************************************************************** * Project: RooFit * * * * This code was autogenerated by RooClassFactory * ...
15dcd58c078636becc0a075889b632ec468e8caa
209a1b9d8f673b8356befd51096c24a00d40157f
jnohlgard/avr32-playground
/system/console.cpp
C++
cpp
2,253
no_license
#include "system/console.h" #include "system/streams.hpp" #include "system/framebuffer.hpp" #include "board.h" #include "conf_system.h" //~ #include <drivers/intc/intc.h> //~ #include <drivers/tc/tc.h> #ifdef __cplusplus extern "C" { #endif #include <services/clock/sysclk.h> #ifdef CONF_SYSTEM_OLED_CONSOLE #include ...
b63a7427a8ab155a622d4381abd8df28efe2d5a8
326debd7a99fbfa14dae999536f05fa9d4360bba
coypoop/mrustc
/src/hir/deserialise.cpp
C++
cpp
45,126
permissive
/* * MRustC - Rust Compiler * - By John Hodge (Mutabah/thePowersGang) * * hir/serialise.cpp * - HIR (De)Serialisation for crate metadata */ //#define DISABLE_DEBUG // Disable debug for this function - too hot #include "hir.hpp" #include "main_bindings.hpp" #include <serialiser_texttree.hpp> #include <mir/mir.h...
6c0bf7877edc7aba14bff1f9dfad5e448b286807
c17041549a2bb8736a69b21ee89b53d4f46593b8
joelday/papyrus-debug-server
/dependencies/skse64/src/skse64/skse64/Serialization.cpp
C++
cpp
16,114
permissive
#include "skse64/Serialization.h" #include "common/IFileStream.h" #include "skse64/PluginManager.h" #include "GameAPI.h" #include "skse64_common/skse_version.h" #include <vector> #include <shlobj.h> #include "GameData.h" #include "skse64/InternalSerialization.h" #include "skse64/GameSettings.h" #include "skse64/Scalefo...
fdba170bf41cc32c34fa89049dd9d6fb23f1c66f
73da34286995b6f84226de69998ab6b89a81f482
DominicCabral/Solver
/sudoku/src/cell.cpp
C++
cpp
1,023
no_license
#include "sudoku.h" #include <algorithm> using namespace std; using namespace sudoku; template <size_t max_val> Cell<max_val>::Cell () { data.fill(true); } template <size_t max_val> bool& Cell<max_val>::access (const int value) { return data[value - 1]; } template <size_t max_val> const bool& Cell<max_val>::acces...
216a1ba03842d74b0e60f5e6094511986f7226c3
d7bd5e06bbe97ae2e3d24da9ee12a2c587f9472b
metux/chromium-suckless
/buildtools/third_party/libc++/trunk/test/std/strings/basic.string/string.cons/move_assign_noexcept.pass.cpp
C++
cpp
2,725
permissive
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
aa8a93c718040d9cc006de2b9dcb43f86bd4e21a
1e367bd5f5fe56f299c86dcd6091a284ebfba7dc
Mintonmu/QWidgetDemo
/comtool/main.cpp
C++
cpp
1,007
permissive
#include "frmcomtool.h" #include "quiwidget.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); a.setWindowIcon(QIcon(":/main.ico")); QFont font; font.setFamily(QUIConfig::FontName); font.setPixelSize(QUIConfig::FontSize); a.setFont(font); //设置编码以及加载中文翻译文件 QUIHelper::se...
88f43f3e11d84307f4a8f605364d35ba1957471c
13c815da27110359078a33b2fb960579aa303109
ShaderManager/OpenColorIO
/src/apps/ociolutimage/main.cpp
C++
cpp
12,363
permissive
/* Copyright (c) 2003-2010 Sony Pictures Imageworks Inc., et al. 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 co...
d1b7dc055ed7e587f02deaa28d566f46dbb47ff2
bfff16deef12f259d7b66f9ba54b982bd61afe95
chaomengnan/aliyun-openapi-cpp-sdk
/domain/src/model/DeleteEmailVerificationResult.cc
C++
cc
2,570
permissive
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
d50fe65e1b726631fc780be54fffbb1550868feb
743e6e58717aca8f8cf37bf08d7eefb6b34757e9
arabhiar/InterviewBit
/Graph Data Structure & Algorithms/convert-sorted-list-to-binary-search-tree.cpp
C++
cpp
450
no_license
TreeNode *helper(vector<int> &A, int i, int j) { if (i > j) return NULL; int m = (i + j) / 2; auto newNode = new TreeNode(A[m]); newNode->left = helper(A, i, m - 1); newNode->right = helper(A, m + 1, j); return newNode; } TreeNode* Solution::sortedListToBST(ListNode* A) { vector<in...
832424856a6e4fdc46c92282c2db7ab8a781cb3b
6ec1898410825f34c0217aa46caf685f31e5524e
Shenyii/BFS_Path_Planning
/BFS_Path_Planning/Map.cpp
C++
cpp
6,854
no_license
#include "Map.h" Map::Map() :x0_(-1),y0_(-1),x1_(-1),y1_(-1) { for (int i = 0; i < 100; i++) { for (int j = 0; j < 100; j++) { map_[i][j].setPosition(i, j); } } } Map::~Map() { node_searched_.clear(); } void Map::setStart(int x, int y) { x0_ = x; y0_ = y; } void Map::setDestination(int x, int y) { ...
c992a6226d3f69362f516847b7d8a0e5425da42f
0e1e642c1df18b4e8f08dfa1ddeda2f4b5244768
quangtynu/iroha
/shared_model/backend/protobuf/commands/proto_remove_peer.hpp
C++
hpp
715
permissive
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef IROHA_PROTO_REMOVE_PEER_HPP #define IROHA_PROTO_REMOVE_PEER_HPP #include "interfaces/commands/remove_peer.hpp" #include "backend/protobuf/common_objects/peer.hpp" #include "commands.pb.h" namespace shared_mo...
3304604739b4c13fc99954e0ac2aa06824f6e945
acb4adc639da648f60ba6a46b9aa68651ce3f68e
ForNextSoftwareDevelopment/3dEngine
/3dEngine/Utils.cpp
C++
cpp
24,697
permissive
#include "utils.h" namespace Utils { /********************************************************************* * Window handle for displaying bmp's *********************************************************************/ HWND hWndBump; /*********************************************************...
6e8bb8caa0d23a80e060fcd899355503ca2348a2
11293e28e7acde56912192219f7366936f8fdf96
studentdeng/algorithms_class
/04/Graph_c++/Digraph.cpp
C++
cpp
1,055
no_license
// // Digraph.cpp // Graph_c++ // // Created by yg curer on 13-2-23. // Copyright (c) 2013年 curer. All rights reserved. // #include "Digraph.h" Digraph::Digraph(int V) { this->vNum = V; this->eNum = 0; for (int v = 0; v < V; ++v) { NodeList nodeList; this->adj.push_back(nodeList); ...
52ed242125dafa5b3a9a1bb70c9c81f467f6e042
fce4c04c92efe37fb1320221b270e1c474c53ee2
thavlik/iridium
/Source/Core/Window.cpp
C++
cpp
324
no_license
#include "Window.h" #include <string.h> namespace Ir { Window::Window(Object* parent, const char* title, int x, int y, int width, int height) : Control(parent) { CONTROL_PROPERTY( AFFECTS_RENDERING, Title ) = title; CONTROL_PROPERTY( AFFECTS_RENDERING, X ) = x; CONTROL_PROPERTY( AFFECTS_RENDERING, Y ) = y; ...
b987451ad51cfe5b73828a47cddaa76933577af3
2d89cf0c27fa72937820929dcb5b2a3f0b4cea30
JonnyPtn/xygine
/Demo/src/EndingDirector.cpp
C++
cpp
19,429
permissive
/********************************************************************* (c) Matt Marchant 2017 http://trederia.blogspot.com xygineXT - Zlib license. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this softw...
509090bf0f1aef3a802172eb0604190c0db8738d
d06d038b4f77761b9cc444eb81476953a3dca443
xxdoc/Workspaces
/Libs/registerEmulator/source/ISL29028.cpp
C++
cpp
1,139
no_license
/* * ISL29028.cpp - Linux kernel module for * Intersil ambient light & proximity sensors * * Copyright (c) 2010 Jim Getchell <Jim.Getchell@yahoo.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free S...
0bd4649f5eb618abbac2225f8df48663a19e351b
4ade7e157a8dccee18ce4db657d1924660bef978
samwolde/AssemblerRobotArms
/src/robot_gazebo/plugins/IR_sensor_ctrl.cpp
C++
cpp
2,848
no_license
#include <functional> #include <gazebo/gazebo.hh> #include <gazebo/physics/physics.hh> #include <gazebo/common/common.hh> #include <gazebo/transport/transport.hh> #include <gazebo/msgs/msgs.hh> #include <ignition/math/Vector3.hh> #include <thread> #include "ros/ros.h" #include "ros/callback_queue.h" #include "ros/subsc...
7a8f20bc3331cf0645fa74a4c87ae7b29c14db11
f9bd67e083c6606b2437b2c3bcb42716750a8db5
Software-Analysis-Team/CMake
/Source/cmGlobalVisualStudioGenerator.cxx
C++
cxx
33,902
permissive
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmGlobalVisualStudioGenerator.h" #include <future> #include <iostream> #include <cm/iterator> #include <cm/memory> #include <windows.h> #include <objbase.h> ...
82d418b5e00c88096c946d701a7dec957d91204f
5e0e889e580efcd7a551111fbb9cb59787dd819e
shiyangdaisy23/tensor-contraction
/code/btas/ctf-master/src/tensor/algstrct.cxx
C++
cxx
26,492
permissive
/*Copyright (c) 2014, Edgar Solomonik, all rights reserved.*/ #include "../shared/util.h" #include "../shared/blas_symbs.h" #include "untyped_tensor.h" #include "algstrct.h" namespace CTF_int { void sgemm(char tA, char tB, int m, int n...
d266c6645a36f7534ec08f44e33d7f9a8671866d
11110c72ca4d9981a0f8c2b3c7da76a257fd212c
aurantst/windows-XP-SP1
/XPSP1/NT/shell/shell32/ftdlg.cpp
C++
cpp
1,498
no_license
#include "shellprv.h" #include "ids.h" #include "ftcmmn.h" #include "ftdlg.h" #include "ftascstr.h" //there only for the new CFTAssocStore CFTDlg::CFTDlg(ULONG_PTR ulpAHelpIDsArray) : CBaseDlg(ulpAHelpIDsArray), _pAssocStore(NULL) {} CFTDlg::~CFTDlg() { if (_pAssocStore) delete _pAssocS...
3652302679e0a275c51b7e45befc389495b51712
54caf3812ee9468352eb5bbc286dc9a5d4f07e26
toggame/test_cpp
/test_cpp_simple.cpp
C++
cpp
164,319
no_license
#pragma clang diagnostic push #pragma ide diagnostic ignored "hicpp-signed-bitwise"//位操作校验 #pragma ide diagnostic ignored "cert-err58-cpp"//STCAN_MSG报错 #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"//未使用全局变量,取消对部分BUSMASTER功能检查 /* This file is generated by BUSMASTER */ /* VERSION [1.2] */ /* BUSMAS...
6da1427edbe136155275560dd9e5a533ff9cd959
4810d0e9c52d5450c5da4f9bae5a416e2844b739
Go-Line-Track-Yourself/Lib
/Beta/Drive.cpp
C++
cpp
287
no_license
#include "Drive.h" void Drive::Forward(int Dis,int Power){ RequestDeg=(Dis/WheelCer)*360; while(Input)<RequestDeg){ DriveStr.Straight() Pct1=DriveStr.Pct1; Pct2=DriveStr.Pct2; } Pct1=0; Pct2=0; } void Drive::Input(int IV){ Input=IV; }
f811565a20ffdcadc2eeeda65400652991fbefaa
50117120d1b0cfb5a20ff00d0785f945f2dec3b8
ileitch/rwx
/ext/wxStartUpTip.cpp
C++
cpp
1,021
no_license
/* * wxStartUpTip.cpp * * Created on: 08.03.2012 * Author: hanmac */ #include "wxStartUpTip.hpp" #if wxUSE_STARTUP_TIPS class DLL_LOCAL RubyTipProvider : public wxTipProvider { public: RubyTipProvider(VALUE obj,VALUE i) : wxTipProvider(NUM2UINT(i)), mRuby(obj) {} wxString GetTip() { if(rb_respond_to(mR...
925a45915db521b6f728d4394c27a0da0edd291a
7cd6e91b91589b3c4441a6c1b9bc676f7fd6ec03
PeterZhouSZ/point-line-mis
/src/core/sampler.cpp
C++
cpp
8,372
permissive
/* pbrt source code is Copyright(c) 1998-2016 Matt Pharr, Greg Humphreys, and Wenzel Jakob. This file is part of pbrt. 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...
c40eb161d102021dd2943fcc8b84c0250a42250f
545ab9dbabae86a276a462bd66795f15e4aac135
slinh/hide-and-seek
/Hide-And-Seek/INL_gen/INL_gen.cpp
C++
cpp
4,176
no_license
// INL_gen.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <fstream> #include <vector> using namespace std; class TMesh { public: TMesh(char* parName) { FName = parName; FName += ".obj"; } void SetTranslation(float tx, float t...
19d744b53c8e91a465b6e636391f5567bbe1246d
a2189947a47abe0246b235a74f3ded0b11484162
samrisxxl/entt
/src/entt/entity/view.hpp
C++
hpp
31,197
permissive
#ifndef ENTT_ENTITY_VIEW_HPP #define ENTT_ENTITY_VIEW_HPP #include <array> #include <iterator> #include <tuple> #include <type_traits> #include <utility> #include "../config/config.h" #include "../core/iterator.hpp" #include "../core/type_traits.hpp" #include "entity.hpp" #include "fwd.hpp" namespace entt { /** * @...
ab558638f85b05f30957fc7591a2c8d797fe0bc3
0ca3e05b40602f06164fde271a64dc3530e11774
iabur/code-monk
/6. number theory/number theory-1/5. Modular multiplicative inverse/modular inverse/main.cpp
C++
cpp
398
no_license
#include<bits/stdc++.h> using namespace std; int modularExponentiation(int x, int n, int m) { if(n == 0) return 1; else if(n%2 == 0) { return modularExponentiation((x*x)%m, n/2, m); } else return (x*modularExponentiation((x*x)%m, (n-1)/2, m))%m; } int main() { int...
325cc320cf30c59b17cfa3d51592cbfac45cc9f8
f9fe2927e800e04310b036a95c08b202a8c20a96
SenZhangAI/my-code-gems
/Sen/getMemberOffset.cpp
C++
cpp
1,136
no_license
#include "stddef.h" #include <iostream> //============================================================= // 核心代码 // st为某struct//class,m为该struct/class中的成员变量 template<typename T> T* _nullptr() { T* t = NULL; return t; } #define OFFSET_OF(st, m) \ ((size_t) ( (char* )&(_nullptr<st>() -> m) - (char* )0 )) //=============...
7ee53c973de5bf9a79a00c1bc52a05d648e0c2c3
210ee0f6193fa0cdb87de28151603c083232bd65
PacificBiosciences/OpenHT
/tests/dsn9/src/Main.cpp
C++
cpp
1,264
permissive
#include "Ht.h" using namespace Ht; bool done = false; int err_cnt = 0; class CHtSuUnitEx : public CHtSuUnit { public: CHtSuUnitEx(CHtHif * pHtHif) : CHtSuUnit(pHtHif) {} void RecvCallback( Ht::ERecvType ); }; int main(int argc, char **argv) { CHtHif *pHtHif = new CHtHif(); CHtSuUnitEx *pHtUnit = new CHtSuUnitEx...
5a048f35207c5512f5ba024a7fb36cff9eb9b3f9
69bab414fb877514e4639d3eae468b28062d5b0c
Hanielson/2021-1-exercicio-revisao-refatoracao
/src/main.cpp
C++
cpp
7,932
no_license
#include <iostream> #include <iomanip> #include <vector> #include "Imovel.hpp" #include "Casa.hpp" #include "Cobertura.hpp" #include "Apartamento.hpp" #include "Cliente.hpp" // Macros para os valores de comissão, que dependem do tipo de Imovel #define COMISSAO_CASA 0.06 #define COMISSAO_COBERTURA 0.10 #d...
3fed51b7bf24e754bb2cc6b8efb0e561feb97c00
36d478d5c4fac772ccb1790c2c3828ce7c46143b
fpelliccioni/hamigaki
/hamigaki/checksum/sha2.hpp
C++
hpp
18,635
permissive
// sha2.hpp: SHA-2 checksum // Copyright Takeshi Mouri 2008, 2009. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://hamigaki.sourceforge.jp/libs/checksum for library home page. #ifndef HAMIGAKI_CH...
a6e3ebd4819a317f232c0c9d0f6e5f2cbbed506b
714bdcdaf9d4d031c605c76a1929464fb6b999bc
benedicka/Competitive-Programming
/UVA/10895/22417128_AC_0ms_0kB.cpp
C++
cpp
748
no_license
#include<bits/stdc++.h> using namespace std; struct data { int pos[10010],v[10010]; }x[10010]; int idx[10010],n,m,a[10010],jum,tmp,k; int main() { while(scanf("%d %d",&m,&n)!=EOF) { for(int i=0;i<n;i++) idx[i]=0; for(int i=0;i<m;i++) { scanf("%d",&k); for(int j=0;j<k;j++) { scanf("%d",&a[j]); ...
f1680eba8cff56a3ad45ca927746b669bf4c0e6c
a48bbc7556c5d3f7f55fcdac48cd79e15a8b2a76
tryingtokeepup/JA2-1.13
/Build/Strategic/Facilities.cpp
C++
cpp
80,625
no_license
////////////////////////////////////////////////////////////////// // HEADROCK HAM 3.5: Facilities // // This file contains functions that test facility data (read // from XML) whenever necessary. See XML_Facilities.cpp and // XML_FacilityTypes.cpp for the reading XML functions. //////////////////////////////////...
4ce7a7218207ca9e7418b7422d842fd074712623
edd0a7bb581c48fec7de9625776f8e5a36a0e772
JesseOsrecak/AzulMilestone2
/GameModel.cpp
C++
cpp
5,528
no_license
#include <iostream> #include <memory> #include "BoxLid.h" #include "Factory.h" #include "GameModel.h" #include "GameTurn.h" #include "Player.h" #include "TileBag.h" #define MAX_PLAYERS 2 #define MIN_PLAYERS 2 using std::make_shared; using std::map; using std::shared_ptr; using std::string; using std::to_string; usi...
ef05707de8d50aae5405d16265d0e82f82ce370a
81572af0240f677d76e2a7d3710137d0d2bf1bd8
LowySt/miniature-barnacle
/code/tools/Maths/Maths.cpp
C++
cpp
19,485
no_license
#include "tools\Maths\Maths.h" #include <immintrin.h> /////////////////////////////////////////// // VECTOR DEFINITIONS /////////////////////////////////////////// v2 vec2(f32 x, f32 y) { v2 Result = { x, y }; return Result; } v3 vec3(f32 x, f32 y, f32 z) { v3 Result = { x, y, z }; return Result; } v4 vec4(f32 x...
f478f0eb4bd9509a93756e42b4917305850d3c2b
e9a804ed360279aa14cc9744e64d8266f4bedfb6
ANtlord/Ogre3d-study
/src/gwQuadBuilder.cpp
C++
cpp
530
no_license
#include "../include/gwQuadBuilder.h" namespace GW { QuadBuilder::QuadBuilder() : GeometryObjectBuilder() { } QuadBuilder::~QuadBuilder() { } void QuadBuilder::buildGeometryObject(const std::string &name, const float normalCoords[3], const float ** vertexesCoords, Ogre::SceneManager * sm, Ogre::St...
8a2972d88bdd7e66b601620765cc1d2d3a9eb4f4
bebef0ebdcce08166956f5a209b6133ffa067f1c
dzimbeck/BitBay
/src/qt/qwt/qwt_plot_grid.cpp
C++
cpp
9,959
permissive
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** * Qwt Widget Library * Copyright (C) 1997 Josef Wilgen * Copyright (C) 2002 Uwe Rathmann * * This library is free software; you can redistribute it and/or * modify it under the terms of the Qwt License, Version 1.0 **************...
218e158e09454fcac02a490de5fbd0188768b15f
83a13252de482f9451865781084b3b34f2c1a374
jesand/ordgeo
/src/lib/embed/embed_cmp_with_soe.cpp
C++
cpp
10,010
permissive
/// @file embed_cmp_with_soe.cpp /// @brief Implements Soft Ordinal Embedding. #include <ordgeo/embed/cmp.hpp> #include <ordgeo/embed/dlib_opt.hpp> #include <ordgeo/linalg/linalg.hpp> using Eigen::Index; using Eigen::MatrixXd; using Eigen::MatrixXi; using Eigen::VectorXd; using ORDGEO_NAMESPACE::linalg::dist; using ...
8a74c1075ec9e750a9d4da2c043bbdef05662cde
23e1e62df4af3f4748fb7e1b8866231904c3db22
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-snowball/source/model/DescribeReturnShippingLabelRequest.cpp
C++
cpp
986
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/snowball/model/DescribeReturnShippingLabelRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Snowball::Model; using namespace Aws::Utils...
31525fd08b46150c5f3379c8dd543e94181c6e70
da3a5d31d4355850d46b48d37036a0f020275869
koalaa13/ITMO-University-AaDS-labs
/sorting and searching/solves/Mergesort.cpp
C++
cpp
2,286
no_license
#include <iostream> #include <vector> #include <math.h> #include <stdio.h> #include <set> #include <map> #include <bitset> #include <string> #include <queue> #include <algorithm> #include <stack> #include <ctime> #include <cassert> #include <complex> #include <stdlib.h> #include <limits> // #pragma comment(linker, "/ST...
4b8e1aef62036c07844a6dd593cfa32d82e383eb
bf392098a54476d0f20c8e446171bba552156d2f
cqtxft/qtAndroidLogTool
/loginfo.cpp
C++
cpp
8,404
no_license
/* * Copyright (C) 2012 cqtxft@gmail.com * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
9afcea1f2a430022e8ee3031baf73f4ac3ac4ee7
62f41c8c3882265ee72415b0f643c96b2f394c31
Passionzq/SYSU-Computer-Version
/CV_hw6/main.cpp
C++
cpp
52,735
no_license
#include "ans.hpp" string filename; string file_path = "./Ol9b/"; // main函数中对其进行修改,从而能够在函数中调用。 string f_temp; int main() { int s, e; cin>>s>>e; for(int i = s; i <= e; i+=2){ f_temp = "pic" + to_string(i); filename = "ol9b" + to_string(i); CImg<uchar> src((file_path + filename+".p...
8be74e07fa2f46992cc768a3ea7b8d773462837a
2c47ef992d8faaad1f9a7e4205e2cbf0186c4631
unmelted/ros_prj
/ros2-osx/include/test_msgs/srv/basic_types__rosidl_typesupport_connext_cpp.hpp
C++
hpp
7,519
no_license
// generated from rosidl_typesupport_connext_cpp/resource/idl__rosidl_typesupport_connext_cpp.hpp.em // with input from test_msgs:srv/BasicTypes.idl // generated code does not contain a copyright notice #ifndef TEST_MSGS__SRV__BASIC_TYPES__ROSIDL_TYPESUPPORT_CONNEXT_CPP_HPP_ #define TEST_MSGS__SRV__BASIC_TYPES__ROSID...
677c5abfd3acc767034e0b0cde8e00d2d623ac66
7fea311bc725d65e161312f501c828fbcbb1903a
thalium/icebox
/third_party/retdec-3.2/src/fileinfo/file_information/file_information_types/relocation_table/relocation_table.cpp
C++
cpp
6,249
permissive
/** * @file src/fileinfo/file_information/file_information_types/relocation_table/relocation_table.cpp * @brief Class for relocation table. * @copyright (c) 2017 Avast Software, licensed under the MIT license */ #include "fileinfo/file_information/file_information_types/relocation_table/relocation_table.h" #includ...
dfac5b8d500449d1c93bb47ff2f8aa0827a74720
97fe153bb65cc9f09f9bf45e124614afe4f3e27c
Moein-Karami/OlympiadCodes
/Codeforces/A. Stones on the Table/main.cpp
C++
cpp
448
no_license
#include <iostream> using namespace std; int main() { int n; bool b=1; cin>>n; string s; cin>>s; int ans=0,x; for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { x=j; if(s[j]!=s[i]) j=n; else ...
c730cd234bcfbf77d88be4b3981ef7d5bd0a5753
eac08a0c47ca0718176f698e29fcf63b52d4a2d3
ColleyLi/bsp
/AD_tools/fadbad/test-with-eigen.cpp
C++
cpp
5,771
no_license
#include <iostream> #include <Eigen/Eigen> using namespace Eigen; #include "badiff.h" using namespace fadbad; typedef B<double> bdouble; typedef Eigen::Matrix<bdouble, 2, 1> VectorB; typedef Eigen::Matrix<bdouble, 2, 2> MatrixB; typedef Eigen::Matrix<bdouble, Dynamic, Dynamic > MatrixBd; typedef Eigen::Matrix<bdoub...
eb90cc8adea664e900282f4446d7c23654e91821
7676a3ecde2f85e5012b0c2e0a9134a792d8951c
moikot/gluino
/src/Messaging/QueueGenericClient.hpp
C++
hpp
1,485
permissive
// Copyright Sergey Anisimov 2016-2017 // MIT License // // Gluino // https://github.com/anisimovsergey/gluino #ifndef MESSAGING_QUEUE_GENERIC_CLIENT_HPP #define MESSAGING_QUEUE_GENERIC_CLIENT_HPP #include "RequestType.hpp" #include "QueueClient.hpp" #include "Core/Status.hpp" #include <functional> namespace Messag...
c20f8d43a08bfe739704cd343d2eeb92168aedbb
9f23f600ef9ca6ad9799de81f3d573ea6a43d61f
Azure/azure-remote-rendering-asset-tool
/ArrtSource/Conversion/Conversion.cpp
C++
cpp
7,749
permissive
#include "Conversion.h" #include <QJsonArray> #include <QJsonDocument> #include <QJsonObject> static QString ToString(Axis value) { switch (value) { case Axis::Inherit: return "default"; case Axis::PosX: return "+x"; case Axis::NegX: return "-x"; ...
173cebd2713c77097f7c8167aeda5d0f1eebebc6
976319ee4342ca369135af83dcec193cbc1528b9
IMyoungho/Network
/Hansel_and_Gretel/parse.cpp
C++
cpp
611
no_license
#include "parse.h" parse::parse(int argc, char *argv[]){ check_argc(argc, argv); } void parse::check_argc(int argc, char *argv[]){ if(argc!=3){ cout << "***** 인자값이 잘못되었거나 존재하지 않습니다 *****\n"; cout << " < Usage > : < interface > < Drone Mac >\n" << endl; exit(0); } this->int...
2ac86e6ce3e4b0bc84ac9c508ae8ec47dbd4b2ad
f055f75ab8b4672da79e16b5452cc6e6dd8616ca
NadigerAmit/DataStructure-Algo-Problem-Solution-Cpp
/C++17-Practice/WeakPointerUsage.cpp
C++
cpp
3,566
no_license
/* https://thispointer.com//shared_ptr-binary-trees-and-the-problem-of-cyclic-references/ std::shared_ptr<Node> leftPtr; std::shared_ptr<Node> rightPtr; std::shared_ptr<Node> parentPtr; left and right child will be pointing to parents . Now constructor will be called 3 times but there will be n...
31ef6a9d58641c8b3a3f5ad83a75586c9b42c7f1
3ce56757004f61cb7245f98597255d97305fa778
AlgoSeoLee/backjooncpp
/Project1/3053/3053.cpp
C++
cpp
291
no_license
//https://www.acmicpc.net/problem/3053 #include <iostream> #include <cmath> #define PI 3.1415926535897932 using namespace std; int main() { long double R; cin >> R; cout << fixed; cout.precision(6); cout << powl(R, 2) * PI << '\n'; cout << powl(R, 2) * 2 << '\n'; }
69bc6eb0063da74678f0ef7dcc8b72ba2873d8c0
7a5f6668128cbbf8906501dc581dc2d632b3da3d
CharlesPu/intern
/clie/clie.si4project/Backup/cancomm(6718).cpp
C++
cpp
3,366
no_license
#include "cancomm.h" #include <pthread.h> CanComm::CanComm() { can_sock=0; } CanComm::~CanComm() { if(can_sock) close(can_sock); } bool CanComm::CanInit(int channel) { int domain = PF_CAN; int type = SOCK_RAW; int protocol = CAN_RAW; //默认情况下,发送CAN报文的套接字不想接受自己发送的报文,回还功能关闭 int ro=0;//0表示关闭(默...
868200ec5977fefac4156f7c1e20c81f2f269256
c11a65b71187c630f57d70b77a10ab99fdd9fbe3
cortesjpb/Programacion-Competitiva
/Codeforces/EC Round 60 Div 2/A/a.cpp
C++
cpp
730
no_license
#include <bits/stdc++.h> using namespace std; #define forr(i,a,b) for(int i=(a); i<(b);i++) #define dfor(i,a,b) for(int i=(a);i>=(b);i--) #define forn(i,n) forr(i,0,n) #define dforn(i,n) dfor(i,n,0) #define sz(c) ((int)c.size()) #define zero(v) memset(v, 0, sizeof(v)) #define pb push_back #define fst first #define snd ...
66af12e142fcf765a9306d991de34585fc7c8175
6bfeab40532405f4c265ed4aa39a19451114b81d
johannesgensheimer/onnxruntime
/onnxruntime/contrib_ops/cpu/pad.cc
C++
cc
2,769
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // there's no way to use a raw pointer as the copy destination with std::copy_n // (which gsl::copy uses with span::data() which returns a raw pointer) with the 14.11 toolset // without generating a 4996 warning. going thro...
93af5be318a893807b36617979cb6d32a824bc8f
0ac62145958039fdcbd86af2c213035f22e397cf
yeyuzhen/EasonCodeShare
/ProfessionalCpp2e/c09_code/Scope/Scope.cpp
C++
cpp
556
no_license
#include <iostream> class Demo { public: static int get() { return 5; } }; int get() { return 10; } namespace NS { int get() { return 20; } }; int main() { Demo* pd = new Demo(); Demo d; std::cout << pd->get() << std::endl; // prints 5 std::cout << d.get() << std::endl; // prints 5...
2a4393273dd3ad01149e620272de812db2e3021e
81d7154071ba8903221045cee366d410134f3465
ranalli/BHGMission
/Mission/Scripts/Trader_Items/Category/NeutralBoatsArmed.hpp
C++
hpp
252
no_license
class Category_673 { class RHIB { type = "trade_any_boat"; buy[] ={40000,"Dollars"}; sell[] ={20000,"Dollars"}; }; }; class Category_558 { class RHIB { type = "trade_any_boat"; buy[] ={40000,"Dollars"}; sell[] ={20000,"Dollars"}; }; };
cb35a024671f2e7b93e9135cf84c4b94eb5fa586
0086b9db9e2aba3b90f08142c994b73d068ff69f
LordTocs/TocsEngine
/Components/Tocs/Core/Numerics.cpp
C++
cpp
740
no_license
#include "TocsLib.h" #include "Numerics.h" namespace Tocs { int GetLargerPowerOfTwo (int number) { int power = ceil (log ((double)number)/log (2.0)); return 1 >> power; } float FastInverseSquareRoot (float value) //Yey Quake! { long i; float x2, y; const float threehalfs = 1.5F; x2 = value * 0.5F; ...
717efb492df8b4276ec5d47541e4f07470db319a
0bf312a0234afbf6b749ee173ec77e7d896ac209
niuxu18/logTracker-old
/second/download/squid/gumtree/squid_repos_function_2689_squid-3.1.23.cpp
C++
cpp
382
no_license
static void htcpLogHtcp(IpAddress &caddr, int opcode, log_type logcode, const char *url) { AccessLogEntry al; if (LOG_TAG_NONE == logcode) return; if (!Config.onoff.log_udp) return; al.htcp.opcode = htcpOpcodeStr[opcode]; al.url = url; al.cache.caddr = caddr; al.cache.code = ...
995f840919d58cc01f77178e3a8198dc0d457927
1aa54f3ce757f468b8ac090d5839d6a0e068df98
visi/DuiBrowser
/Duibrowser/src/EAWebkit/Webkit-owb/WebKit/OrigynWebBrowser/Api/WebView.cpp
C++
cpp
82,937
no_license
/* * Copyright (C) 2008 Pleyo. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of co...
6dd4398c393b02308f40f5137cc9b0cd41944ac4
a9b43f51e053bc8a72035ff4f3b03c0a5aca777d
asiq-dev/Data-Structure-and-Algorthim
/Linklist/searching/searching.cpp
C++
cpp
1,115
no_license
#include<iostream> using namespace std; struct List { int value; List *next; List() { value = 0; next = NULL; } }*root; void insertData(int value) { List *current = root; while(current->next !=NULL) { current = current->next; } current->next = new List...
7bed6a38435f466b8bce689399cb01778ab9c3ea
158bbdd1062d1542f3eb4f0165f8d902ba715476
chi3236/algorithm
/LeetCode_DivideTwoIntegers.cpp
C++
cpp
1,078
no_license
class Solution { public: int divide(int dividend, int divisor) { if(divisor == -1 && dividend == INT_MIN) { return INT_MAX; } if(divisor == 1) { return dividend; } int sign = 1; if((dividend < 0 && divisor > 0) || (dividend > 0 ...