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
df8df7dc6af19328f06d4ed2b0f54479f62d7c02
b14fec1b731f7fc9a688a77cb8ca2afd2eabb63d
Abdus8Samad/c-cpp-codes
/top3Max.cpp
C++
cpp
636
no_license
#include <iostream> #include <climits> using namespace std; int main() { int n; cin >> n; int* arr = new int[n]; for(int i=0;i<n;i++) cin >> arr[i]; int a = INT_MIN,b=a,c=a; for(int i=0;i<n;i++){ // if(arr[i] <= d){ // e = d; // d = arr[i]; // } else if(...
decb711ef6b14b2680435aaa78f45f52fbb3e657
1c5e2b4b2c39ca5ed9a645a9c27e2b8f25339ffd
Ali-Ussama/codes
/Egypt 11854 uva/Egypt 11854 uva.cpp
C++
cpp
882
no_license
#include <iostream> #include <cmath> #include <stdio.h> using namespace std; int main(){ freopen("Egyptfile","rt",stdin); long int length,width,diameter; while(cin>>length){ cin>>width>>diameter; if(diameter==0 && length==0 && width==0) break; if((diameter*di...
d4642f0393703c10033a3d8efb37d49b634d7a69
80c8a24b3576b624296b757340588211af1db663
shahed-shd/Online-Judge-Solutions
/LightOJ/1002 - Country Roads.cpp
C++
cpp
4,010
no_license
// Run time : 0.156 sec. #include <cstdio> #include <algorithm> #include <vector> using namespace std; typedef pair<int,int> ii; typedef pair<int,ii> iii; const int MAXN = 500+3; vector<vector<ii> > adjList; int costs[MAXN]; class UFDS { int parent[MAXN], rnk[MAXN] = {0}; public: UFDS(int n) {...
9986283af3c9e2c8a04912e929be8451a55dd80c
88b89d3f5294e78b4d15a22b417c93a9a2e36d38
avdleeuw/dvblinkremote
/libdvblinkremote/src/remove_object_request.cpp
C++
cpp
2,073
permissive
/*************************************************************************** * Copyright (C) 2012 Marcus Efraimsson. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restricti...
3e7547f70d836cafe30c81f80397e96aa3ed09ea
8df7c78ed59d42c3c268bad2c6f19bd736fd457b
UniversityOfAlaskaFairbanksCS202/Spring13GroupD
/TurretMissile.cpp
C++
cpp
3,122
no_license
#include "TurretMissile.h" #include "cinder/gl/gl.h" using namespace ci; TurretMissile::TurretMissile() // does nothing but needed // { } TurretMissile::TurretMissile(ci::Vec2f cursor, ci::Vec2f start) // constructor that creates class object and gives initial instructions, chaged with updates // { _healt...
c58ffce7d162c473f0923d0cfc6e6300cbd601d6
39f7116a0da1b2a3dc6aa448d6dfdf1576f3346c
yumkong/cpp_prac
/leet/0811/leet_33.cpp
C++
cpp
1,642
no_license
// search a targe value from a sorted array after rotation, if found return index, otherwise return -1 // ASSUME: no duplicate exists in the array #include <iostream> #include <vector> using namespace std; class Solution { public: int search(vector<int>& nums, int target) { int len = nums.size(); i...
bed49cf682f84e3901aaf2ef88b0919d66155756
55e57cab6cc6fd1ccd4f00e586ac0a7d9e67bd78
duanhai/LandMark-SDM
/RemarkLandMark/include/cereal/types/string.hpp
C++
hpp
2,928
no_license
/*! \file string.hpp \brief Support for types found in \<string\> \ingroup STLSupport */ /* Copyright (c) 2014, Randolph Voorhies, Shane Grant All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...
9cc81dd6673d801e1d3987079cd76cfa8ae63039
cc07879de6ecb11ff728a7591b3662a9142d71c3
putnampp/clotho
/src/clotho/utility/my_timer.cpp
C++
cpp
966
permissive
// Copyright 2015 Patrick Putnam // // 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 o...
0fc60f42e6b2ff54156de0a9c540c6c7e5e81e5e
4a7168bb04ca044a87ba597bc5e2d080a60fdaec
paroj/mygui
/MyGUIEngine/src/MyGUI_ControllerFadeAlpha.cpp
C++
cpp
2,521
permissive
/* * This source file is part of MyGUI. For the latest info, see http://mygui.info/ * Distributed under the MIT License * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) */ #include "MyGUI_Precompiled.h" #include "MyGUI_ControllerFadeAlpha.h" #include "MyGUI_Gui.h" #include "MyGUI...
11f5c684358e66da31e9190bfd5b623ababb7181
4185dc21e8a281b81870c11eebaa7846f42222ee
cowtony/ACM
/ZOJ/ACM answer/1291.CPP
C++
cpp
1,325
no_license
#include<iostream.h> #include<string.h> int main() { long val[101][101]; int n;int i; int visit[101]; long cur[101]; long cost; cin>>n; for(i=1;i<=n;i++) { if(i!=1) cout<<endl; int j,k; int nn;cin>>nn; for(j=2;j<=nn;j++) for(k=1;k<j;k++) { char ch[20]; cin>>ch; if(ch[0]==120) va...
f92d6940f9181cca8171e1276a9de1edba59a06c
5b39beb88e6885858cea3031d997fcdd6cf8747f
lambdaxymox/fuchsia
/src/storage/fshost/main.cc
C++
cc
7,595
permissive
// Copyright 2017 The Fuchsia 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 <errno.h> #include <fcntl.h> #include <fidl/fuchsia.fshost/cpp/wire.h> #include <fidl/fuchsia.io/cpp/wire.h> #include <getopt.h> #include <lib/asy...
b8171ce2f5c1829b3ff9cb1e90cef4ea0cd9eab3
d2f0e51e53ddcd1904e40f91cd0542825aee9b83
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14137/function14137_schedule_34/function14137_schedule_34.cpp
C++
cpp
1,700
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function14137_schedule_34"); constant c0("c0", 128), c1("c1", 64), c2("c2", 128), c3("c3", 64); var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i3("i3", 0, c3), i01("i01"), i02("i02"), i03("i...
3aac894005a92f7795eef04948408c2f93c50227
094d2e8fa33c26d81c85e0d1280071ba90a11c77
BitStone333/bloom
/ios/Pods/boost-for-react-native/boost/iterator/iterator_facade.hpp
C++
hpp
35,721
permissive
// (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // 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_ITERATOR_FACADE_23022003THW_HP...
3a872f9e1b81157076835e1fdc37049870be65e9
c00225e604b541d661879c5158df06e6bff6f38a
IAmAnubhavSaini/cryptoAlgorithm-nt5src
/Source/XPSP1/NT/net/tcpip/services/telnet/server/tlntsess/fsm.cpp
C++
cpp
5,737
no_license
// FSM.cpp : This file contains the Finite State Machine ... // Created: Feb '98 // Author : a-rakeba // History: // Copyright (C) 1998 Microsoft Corporation // All rights reserved. // Microsoft Confidential #include "telnet.h" #include "FSM.h" #include "RFCProto.h" FSM_TRANSITION telnetTransTable[] = { // St...
f41b090022547cb0242d07d8d579150ab43ff805
3c13da7fa9c5836c18e1afb8be8ad178bb30f8ea
simright/Kratos
/kratos/tests/cpp_tests/strategies/schemes/test_residual_based_adjoint_bossak_scheme.cpp
C++
cpp
28,265
permissive
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // #include <algorithm> #include <exception> #inclu...
cfc046fbefda574be12d2efba1d7eee1bec3d600
fc83d08a881c8cd8709e73e1e85acbeb58d8c103
xtblock/chromium
/chrome/updater/device_management/dm_storage_unittest.cc
C++
cc
8,469
permissive
// Copyright 2020 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 <memory> #include <utility> #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "build/build_config.h" #include "...
9adc1b750885c4129350cfcff2c2165e175a8689
a3a7868ba751d560754cc94628e7a0b1f0c14c9c
rachitjain123/3d_Adventure_game
/src/other_handlers.cpp
C++
cpp
1,554
no_license
#include <iostream> #include <cmath> #include <fstream> #include <vector> #include <GL/glew.h> #include <GLFW/glfw3.h> #define GLM_FORCE_RADIANS #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> #include <glm/gtc/matrix_transform.hpp> #include "main.h" using namespace std; void error_callback(int error, cons...
e3efbe412fb637cbaca08234f3b0930d3cfa212f
6e5adf0ad79de448c31b2f01b7e296648e00edee
AlexDevyatov/ACM-Contests-Data
/NCPC/2014/ncpc2014/squares/submissions/accepted/squ-mipi-map.cpp
C++
cpp
2,598
no_license
#include <cstdio> #include <iostream> #include <algorithm> #include <set> #include <map> #include <stack> #include <list> #include <queue> #include <deque> #include <cctype> #include <string> #include <vector> #include <sstream> #include <iterator> #include <numeric> #include <cmath> using namespace std; typedef pair<...
d399d068f5964e780f0300ba3b1e97dec7bf3b19
07d50be406795025c7f91c33208bdd1f890e98ee
DiGiDeoni/dll
/include/dll/pooling/pooling_layer.hpp
C++
hpp
5,394
permissive
//======================================================================= // Copyright (c) 2014-2017 Baptiste Wicht // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //==================================================================...
0943b56ccb9acfbc5239b5d666ced194f80d5219
ef497934989375cabfb7277d4add0a33da0804ad
we-conceived-the/oracle
/src/rpcprotocol.cpp
C++
cpp
3,889
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2018-2018 The Oracle Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/license...
49f397d5be243135e9eb1172b07c772dbf7c9ff7
364e1a398936623ed51921ae8745dd8ebfdb7505
toooldlm/pota
/src/pota_raytraced.cpp
C++
cpp
11,632
no_license
#include <ai.h> #include "pota.h" #include "lens.h" #include <cmath> #include <string> #include <chrono> #include "../../Eigen/Eigen/Dense" //#define TIMING AI_CAMERA_NODE_EXPORT_METHODS(pota_raytracedMethods) enum { p_unitModel, p_lensModel, p_sensor_width, p_wavelength, p_dof, p_focus_distance, p_e...
3884f08aae8bca00e758b8d33d2b284f7f54aa13
f656222eca86592fb625666debed33300b68e765
glestadv/GAE
/source/shared_lib/sources/sound/sound.cpp
C++
cpp
2,359
no_license
// ============================================================== // This file is part of Glest Shared Library (www.glest.org) // // Copyright (C) 2001-2008 Martiņo Figueroa // // You can redistribute this code and/or modify it under // the terms of the GNU General Public License as published // by the Free Software Fo...
9af12ca9968e2c6863a3624f1bb00a567aa88aad
a614bcc3255af51aba370c96ba6d9d1f641ebc66
niuxu18/logTracker-old
/second/download/squid/gumtree/squid_new_hunk_443.cpp
C++
cpp
309
no_license
return p; } static void peerSourceHashCachemgr(StoreEntry * sentry) { CachePeer *p; int sumfetches = 0; storeAppendPrintf(sentry, "%24s %10s %10s %10s %10s\n", "Hostname", "Hash", "Multiplier", "Factor",
17123a25a30a33e602e39ba93214909178d4c027
8510057ed429aa2f43f3315c4c89f7a1034d2418
iLoveUcdit/design-patterns
/facade/screen.hpp
C++
hpp
520
no_license
#ifndef _SCREEN_HPP_ #define _SCREEN_HPP_ #include <string> #include <iostream> class Screen { public: Screen(std::string description) { m_description = description; } virtual ~Screen() {} void up() { std::cout << m_description << " going up" << std::endl; } void down() { ...
63f5d9d9f93d34194eb343b53c1e496a3a6a28ac
470a59fc65e69296a3c58ca45fc80024aa1bb5e9
Alipipe/TOP-chain
/tests/xsync/test_xchain_block_fetcher.cpp
C++
cpp
11,185
no_license
#include <gtest/gtest.h> #include "xsync/xblock_fetcher.h" #include "xsync/xsync_sender.h" #include "tests/xvnetwork/xdummy_vhost.h" #include "xdata/tests/test_blockutl.hpp" #include "xsync/xsync_util.h" #include "xsync/xchain_block_fetcher.h" #include "../mock/xmock_auth.hpp" #include "common.h" #include "xsyncbase/xm...
7f306d0525e60f6d87cc7ccaa6948fd7c430e970
0d480580bf5ab32d2cab2f649e0961c65843a71f
ChuanChinLai/LaiCraft
/ExampleGame_/ExampleGame/WorldMapSystem/Generator/Terrain/ClassicWorldGenerator.cpp
C++
cpp
4,775
no_license
#include "ClassicWorldGenerator.h" #include <Engine/Math/Math.h> #include <Engine/Utility/Random.h> #include <ExampleGame/WorldMapSystem/Generator/Biome/Biome.h> #include <ExampleGame/WorldMapSystem/Chunk/Chunk.h> #include <iostream> namespace { const int seed = LaiEngine::RandomSingleton::Get().intInRange(424, 3...
38d80825a9cc38011959a9cffaa4fc018c91be31
5d59cfc6b2222216a3999c07bd1b53b3d77e4f4a
siddharthacheruvu/CPP-Coding
/src/Chapter4/4p13.cpp
C++
cpp
858
no_license
#include <iostream> #define DEBUG #define NAME "Siddhartha" // Symbolic constant using object-like macros with a substitution variable #include "myconstants.h" #include <math.h> int main() { // constexpr double gravity {9.81}; // acc. due to gravity - constant std::cout << constants::gravity << '\n'; ...
a5b12daf34bad974e56bf41c3facf9303bbda47e
b92bf9a49ed44ca0a93f13e1f52b05eb18846110
Elkantor/the-debuginator
/tests/sdl/game.cpp
C++
cpp
9,416
permissive
#include "../../the_debuginator.h" //#include <time.h> #include <stdio.h> #include <string.h> #include "game.h" static void on_colorpicker(DebuginatorItem* item, void* value, const char* value_title, void* app_userdata) { (void)app_userdata; (void)value; (void)value_title; GameData* data = (GameData*)item->user...
d8674f93b5bdd5228f579b6f0b11119495160465
8713c7340c3cd200799aa50ea1290f36e3e9da19
wizbl/wizbl
/src/protocol.cpp
C++
cpp
5,380
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Wizblcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "protocol.h" #include "util.h" #include "utilstrencodings.h" #ifndef...
06ec425a570b438a1f8e973321c7f73d08d30c27
9bfba92710619374e9197825b7091dbc0071da27
milestonesvn/GraphLab-Create-SDK
/graphlab/fileio/general_fstream.hpp
C++
hpp
3,984
permissive
/** * Copyright (C) 2015 Dato, Inc. * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #ifndef FILEIO_GENERAL_ISTREAM_HPP #define FILEIO_GENERAL_ISTREAM_HPP #include <iostream> #include <string> #include <boost/iostr...
b88348e33faddf97a88737f7d2af31aecb0a4fa1
80cfd9a89dc811e5fa4a3aab3973af0a8b410d5e
openvcash/wxVcashGUI
/resources/unlocked20.cpp
C++
cpp
2,586
no_license
/* unlocked20.png - 400 bytes */ static const unsigned char unlocked20_png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x14, 0x08, 0x06, 0x00, 0x00, 0x00, 0x8d, 0x89, 0x1d, 0x0d, 0x00, 0x00, 0x00, 0x06, 0x62, 0...
98f8f18879be2cb9bda8932644fa91b359d0e4b7
c87f00d50a61f504bc47840e549605ee8f00afaa
EmbarkStudios/PhysX
/physx/source/physxcooking/src/convex/BigConvexDataBuilder.cpp
C++
cpp
12,496
no_license
// // 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 conditions and the following disclaimer. // * Redistributions in bin...
172a0315e2f29d37442259e5b8c336c828d993f9
8f1aaa18e368df988feeb17c87231d08b691273b
TheKillerAboy/BasicRevision
/fenwick_tree_recap.cpp
C++
cpp
3,384
no_license
#include <bits/stdc++.h> using namespace std; #define FOR(i_,a_) for(int i_=0;i_<a_;++i_) #define FORS(s_,i_,a_) for(int i_=s_;i_<a_;++i_) #define FORR(i_,a_) for(int i_=a_-1;i_>=0;--i_) #define FORI(i_,a_) for(int i_=1;i_<=a_;++i_) #define FORA(i_,a_) for(auto i_:a_) #define FOR1(i_,a_) for(int i_=1;i_<a_;++i_) #def...
a85f45839176eb08f58d87c6f825138a0a3bc47a
b065d839404e97c1e2b65eb3c953f0fdb6d126d8
reaperofchaos/GladeParrser
/gladeTemplate.cpp
C++
cpp
8,556
no_license
#include "gladeTemplate.h" void GladeTemplate::read(std::ifstream& is){ int lines = 1; std::cout << "Widgets Found: \n"; while(is) { std::string line; //read line by line getline(is, line); //find <object class GladeTemplate::getTag(line, "object"); GladeTemplate::getTag(line, "signal");...
047e65ebba71b8e0af85644e48acfd354c9f3c03
9861dde23c85498207d98c4951da2a182354a358
sierracthomas/spectre
/src/Evolution/EventsAndDenseTriggers/DenseTriggers/Filter.cpp
C++
cpp
566
permissive
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Evolution/EventsAndDenseTriggers/DenseTriggers/Filter.hpp" #include <pup_stl.h> #include <utility> namespace DenseTriggers { Filter::Filter(std::unique_ptr<DenseTrigger> trigger, std::unique_ptr<Trigger> filter) noexcept ...
4a4494559b9b9aae4cc3cadda310deb9853e38d7
9e8fa7b257a89112b63b19e2606aac25e7a0f770
lx999/Plurinote
/notes/notextualnote.cpp
C++
cpp
658
no_license
#include "notextualnote.h" /*NoTextualNote::NoTextualNote(QUuid identifier):Note(identifier){} NoTextualNote::NoTextualNote(QUuid identifier, QDateTime c):Note(identifier,c){}*/ const QString& NoTextualNote::getDescription() const{ return description; } void NoTextualNote::setDescription(const QString& d){ d...
9979d59cc5131964e92dae8c77f9ff2c3e73db13
d21a9028ea427b41d12b02b13403cda5a39615fa
VitaeTeam/Vitae
/src/test/zerocoin_denomination_tests.cpp
C++
cpp
22,528
permissive
// Copyright (c) 2012-2014 The Bitcoin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "amount.h" #include "chainparams.h" #include "coincontrol.h" #include "denomination_functions.h" #include "main....
a60077d678ae738e0f61882877bc588cebf00a74
8d035c0e316cbf0787441fb92e4dd0f82c3af251
PPNav/prototype
/nucl/thread/Thread.cpp
C++
cpp
10,125
no_license
#include "Thread.h" //#include "PLT_Thread.h" namespace nc{ namespace generic{ namespace thread{ using nc::interlocked::readAcquire; using nc::interlocked::increment; using nc::interlocked::decrement; volatile nc::uint32_t Thread::masterThreadCount_ = 0; //ThreadManagerが、メインスレ...
adfa92f963618efc9653dc5e909c766be0a6bdc1
498787aa5ecd1a3fa94d2514661af4b1de81fe6b
KqSMea8/sstd_library
/sstd_boost/sstd/libs/asio/test/dispatch.cpp
C++
cpp
601
permissive
// // dispatch.cpp // ~~~~~~~~~~~~ // // 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) // // Disable autolinking for unit tests. #if...
22f22fbf70449b1a3a78949c304ff64fbe5e9735
0ce667209496e31cb5385df337d8fa4db286bca4
Gabrielle-OyO/GO
/somethinguseless0/The C++ Programming Language/The Assignments/实验1/1-6.cpp
C++
cpp
372
no_license
#include <iostream> #include<string.h> #pragma warning(disable:4996) using namespace std; class student { private: char name[20]; int age; public: student(const char n[], int a) { strcpy(name, n); age = a; } void show() { cout << "学生姓名为:" << name << ",年龄是:" << age << endl; } }; int main() { student AA(...
8ae1f1c545f687e3c89f2a54a5c3d80b746c66cd
40ae0707c80b89b592c69ced86aecda38c7ab790
lrmodesgh/pothos
/pothos-serialization/include/Pothos/serialization/impl/mpl/map/aux_/preprocessed/plain/map10.hpp
C++
hpp
5,671
permissive
// Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // 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) // // Preprocessed version of "boost/mpl/map/map10.hpp" header // -- ...
7ce10fda78d6bbcb59df79ad156d780358e6a6c4
e728f7b03ec0ca102b8c886d692571a45a8a33cd
ExternalRepositories/celeritas
/app/geant-exporter/geant-exporter.cc
C++
cc
14,720
permissive
//----------------------------------*-C++-*----------------------------------// // Copyright 2020 UT-Battelle, LLC, and other Celeritas developers. // See the top-level COPYRIGHT file for details. // SPDX-License-Identifier: (Apache-2.0 OR MIT) //-------------------------------------------------------------------------...
638bf6087a65ca3fa4a3e2d2350655824acf45c5
9aa85de8c45d8b97deb981cb8a600bec5a881279
mascai/exercise
/1_arrays/greedy_largest_permutation.cpp
C++
cpp
1,111
no_license
/* https://www.interviewbit.com/problems/largest-permutation/ Problem Description Given an integer array A of size N consisting of unique integers from 1 to N. You can swap any two integers atmost B times. Return the largest lexicographical value array that can be created by executing atmost B swaps. Problem Con...
514b6cd868864dc148c323e30a09804e7c243689
aadbe024ce66161da3c55db62271c48cd2f27366
bianliu1013/maxcommander
/src/settingscontroller.cpp
C++
cpp
49,975
no_license
#include <QDebug> #include "settingscontroller.h" #include "constants.h" #include "defaultsettings.h" // Settings Singleton static SettingsController* settingsSingleton = NULL; //============================================================================== // Get Instance - Static Constructor //==================...
163c3f4966f0efc7f601c85b39abf5c0c1b29e75
516e2b48da7db671d469d524ac2e332e90f84ba4
Hsingmin/cc_practice
/higher/Exception.cc
C++
cc
1,051
no_license
#include<fstream> #include<iostream> #include<vector> #include<string> #include<exception> using namespace std; void readIntegerFile(const string& filename,vector<int>& dest) { ifstream istr; int temp; istr.open(filename.c_str()); if(istr.fail()) { throw exception();//抛出的异常信息 } /...
6e4ce75bd70fd09fc7132f923a9b88b45dd0ee24
01ce97b49445e72c285f8baf0d10e3f4f8ca6ad8
LLNL/RAJA
/test/functional/kernel/nested-loop-view-types/tests/test-kernel-nested-loop-OffsetView3D.hpp
C++
hpp
5,328
permissive
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Copyright (c) 2016-23, Lawrence Livermore National Security, LLC // and RAJA project contributors. See the RAJA/LICENSE file for details. // // SPDX-License-Identifier: (BSD-3-Clause) //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
03a24c32fef7bb242479c2cdd6ab4b9c85d1d5e2
b6007b5a8f097acbda21a1bbb0faa9f38334f694
ErnadS/EsDemo
/common_library/nmea/msg/msg_ths.cpp
C++
cpp
1,613
no_license
#include "msg_ths.h" #include "nmea/nmea_parser.h" MsgTHS::MsgTHS() { this->m_message_type_hash = MsgTHS::THShash; this->m_message_type = TYPE_THS; } MsgTHS::MsgTHS(float headingDegrees, QString modeIndicator) { this->m_message_type_hash = MsgTHS::THShash; this->m_message_type = TYPE...
bb19712edf891de03aaedccfd8fb380c6d6591d1
0d111101508a17f3ce1fa9fdb01d14ede482fd03
MagicPixel/Linux_Tx2
/include/openMVG_dependencies/osi_clp/Clp/src/ClpCholeskyDense.hpp
C++
hpp
5,928
no_license
/* $Id$ */ /* Copyright (C) 2003, International Business Machines Corporation and others. All Rights Reserved. This code is licensed under the terms of the Eclipse Public License (EPL). */ #ifndef ClpCholeskyDense_H #define ClpCholeskyDense_H #include "ClpCholeskyBase.hpp" class ClpMatrixBase; cl...
311900f2c0975dbf7197d0a7e83faaf8f8381ed5
d37699afcfc76bce0bb7921c4dae8f3f69683db2
sahumada2/AhuamdaSpencer_CIS5_40772
/Homework/HomeworkAssignment1/HomeworkAssignment1/Savitch_10thEdition_Chapter1_#1_ProgrammingProjects/main.cpp
C++
cpp
740
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.cpp * Author: sahum * * Created on January 6, 2020, 6:13 PM */ #include <cstdlib> #include <iostream> using ...
7c2e89cde49905d2a10286e6a9da472ed7e4df01
a73872ccb8cf697a6974893cb51ef53678f445ac
presscad/nwnee
/NWNXLib/API/Linux/API/CNWSJournal.cpp
C++
cpp
3,424
permissive
#include "CNWSJournal.hpp" #include "API/Functions.hpp" #include "Platform/ASLR.hpp" #include "CNWSCreature.hpp" namespace NWNXLib { namespace API { CNWSJournal::CNWSJournal() { CNWSJournal__CNWSJournalCtor(this); } CNWSJournal::~CNWSJournal() { CNWSJournal__CNWSJournalDtor(this); } void CNWSJournal::Dest...
9957dde743119f97a3bbbf7647b1ce4c788e98de
a6d031875a3bd9b5e8c851c1603e0eefc2400200
amitsadaphule/chromium
/content/public/browser/site_isolation_policy.cc
C++
cc
8,925
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/public/browser/site_isolation_policy.h" #include <algorithm> #include <iterator> #include <string> #include <utility> #include "base/b...
871daeffec45c28107907b3085b4a6e2032a63ed
e767ae099efb75439477e763679f57bc32c87d2d
Matthew-Yorke/Bebop
/Bebop/Source/BebopCore/Graphics/Sprite.cpp
C++
cpp
10,887
no_license
//********************************************************************************************************************* // // File: Sprite.cpp // // Description: // This class handles creating and drawing of a sprite image. // //****************************************************************************************...
81ab535cbd4d3b43e30e397779a7122b363b949a
21def99c511cfbd62167a3bf4ee94db7a76bc1fa
PDi-Communication-Systems-Inc/lollipop_external_chromium_org
/third_party/skia/gm/filltypespersp.cpp
C++
cpp
4,808
permissive
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "gm.h" #include "SkGradientShader.h" namespace skiagm { class FillTypePerspGM : public GM { SkPath fPath; public: FillTypePerspGM() {} void makePath() ...
cd9cabbc8c9a132eb319caa12254f9f6e4aba135
e8d82f40e0aa2907c9ba5ea9ca63e430a315221e
rishacha/envoy
/test/common/router/config_impl_test.cc
C++
cc
156,897
permissive
#include <chrono> #include <list> #include <map> #include <memory> #include <string> #include "envoy/server/filter_config.h" #include "common/config/metadata.h" #include "common/config/rds_json.h" #include "common/config/well_known_names.h" #include "common/http/header_map_impl.h" #include "common/http/headers.h" #in...
ec670a4f621f6b5ba5ede660d55b9792fa7a6a4a
ecfa0ee7b079216b2abff8f8ddf4a614b0ced6ea
ademed/tetgen1.6.0
/poly, ele, nodes and smesh files/main.cpp
C++
cpp
1,326
no_license
#include <iostream> #include <string> #include <vector> #include <cstddef> // std::size_t #include <cmath> // std::sqrt(double) #include <fstream> #include <istream> #include "plc_line.h" #include "templates_def.h" int main() { std::ifstream wfile("input.csv"); dvec_t p1_in; bvec_t is_perf_in; st...
af85298ec12d757a66bde3784b2c365f3c365a5f
a25066ae6663043173074d2a65ca5867894d9fcc
sumitneup/openfx-misc
/Shuffle/Shuffle.cpp
C++
cpp
41,573
permissive
/* OFX Shuffle plugin. Copyright (C) 2014 INRIA 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 conditions and the following disclai...
f9d2db8b99ac319c6c92c47b3a4c7bbd66326f1b
87a15b78a27bebf4b4e3f164937c7c689b2bae1f
luckylove/first
/10.27.3.cpp
C++
cpp
2,611
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define bug(x) cout<<#x<<" :: "<<x<<"\n"; #define bugg(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n"; #define buggg(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n"; #define si(x) scanf("%d",&x) #def...
67becc8411ee22b9c41811f458b7ddb7a3c6b061
b00ab101bd1eb16f632f834e02b67b4aacb26da0
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14678/function14678_schedule_39/function14678_schedule_39_wrapper.cpp
C++
cpp
923
no_license
#include "Halide.h" #include "function14678_schedule_39_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(512); Halide::Buffer<int32_t> buf0(256, 512, ...
b23fe50d10ebf1214e54dac1a52dce345bae25e0
b8b69475c03a7c185b3dc704f3a3541797fdd9d6
Zhao-Shiwen/vision-of-movement
/src/TangentRotationReader.cpp
C++
cpp
3,086
permissive
/** * \file * \date 21.02.2013 * \author Michał Orynicz */ #include "TangentRotationReader.hpp" #include "ImageEdgeFilter.hpp" TangentRotationReader::TangentRotationReader( const FeatureTracker &tracker, const FeatureExtractor &extractor, const std::list<FeatureFilter*> &filters, ...
94871f9e62531a394f5453cb5509b0ece113b0bb
3bd6439bb46fceb149ed468960333f8d1fdd1cab
llechner/cmssw
/L1Trigger/L1THGCal/plugins/geometries/NullGeometry.cc
C++
cc
451
permissive
#include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h" class NullGeometry : public HGCalTriggerGeometryGenericMapping { public: NullGeometry(const edm::ParameterSet& conf) : HGCalTriggerGeometryGenericMapping(conf) { } virtual void initialize(const edm::ESHandle<CaloGeometry>& ) overri...
336e22a501757348d70763e8fd3382d2708ef934
1b997d42a84f45cb1bbb4e9acf9299699e0fde9f
sayandodo1234/compe_codes
/love_for_characters.cpp
C++
cpp
923
no_license
// Ayush loves the characters ‘a’, ‘s’, and ‘p’. He got a string of lowercase letters and he wants to find out how many times characters ‘a’, ‘s’, and ‘p’ occurs in the string respectively. Help him find it out. // Input: // First line contains an integer denoting length of the string. // Next line contains the string....
dc69b86546a5d7797c55c9c9e3af4942f604bd34
0b43cdd3b9deee6c9a4b18214b9198962279a7b2
firebiteLR/PavlovVR-SDK
/SDK/SearchAndDestroyGameMode_functions.cpp
C++
cpp
23,595
no_license
#include "../SDK.h" // Name: , Version: 1.0.0 #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- // Functions //--------------------------------------------------------------------------- // Function SearchAndDestroyGameMode...
0c9404a9c8dad5995d71e529bf84c62cb1ab59f5
0daed27d54963b1a5d9d796290cd4ab1cc03b96e
luabeltranga/Herramientas
/matrix_libraries/eigen_example3.cpp
C++
cpp
601
no_license
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { std::cout.precision(16); std::cout.setf(std::ios::scientific); Matrix2f A; A << 1, 2, 2, 3; cout << "Here is the matrix A:\n" << A << endl; SelfAdjointEigenSolver<Matrix2f> eigensolver(A); if (eigens...
9630edda32e26f6d65f77044751d0eeb0c12cbb0
80c2e9c738c5f59920c9c035da43c79472c8bf4f
funkfuzz/delfem2
/examples_oldgl_glfw_cnpy/15_ClothInitialConfig/main.cpp
C++
cpp
6,701
permissive
/* * Copyright (c) 2019 Nobuyuki Umetani * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * @brief putting cloth on SMPL modl * @details */ #include "delfem2/cnpy/smpl_cnpy.h" #include "inputs_garment.h" #include "delfem2/garment.h...
c8de3c164c19ca8de11a17b2731a03cdc0a7f601
b19fbd7ec30983cefd88727e25922aa6435ec3c9
VB6Hobbyst7/OSGAddOnsGV
/Bindings/Python/OSGEffectGroups/module/generated/PostShaderStage.pypp.hpp
C++
hpp
1,315
no_license
// This file has been generated by Py++. // PyOpenSG is (C) Copyright 2005-2009 by Allen Bierbaum // // This file is part of PyOpenSG. // // PyOpenSG 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; ...
0ffa0c8d0516c93168445aed2c434074b1f1075f
39328d6f22301ef171f033e9f96aebd9ba602258
jefftrull/CktSimLightningTalk
/eigen.cpp
C++
cpp
5,900
permissive
// A numerically integrated implementation of the circuit described in // "Rolling Your Own Circuit Simulator with Eigen and Boost.ODEInt" // using Eigen to store and manipulate circuit values // Author: Jeff Trull <edaskel@att.net> /* Copyright (c) 2014 Jeffrey E. Trull Permission is hereby granted, free of charge, ...
0da3e864b87de862712b534d89e14646b71775a8
558b3c91357a6e69ec8a628f952cefbdab0e9342
mdhatmaker/Misc-cpp
/TimeSeries/SimpleTime.cpp
C++
cpp
3,659
no_license
// // Created by Michael Hatmaker on 5/5/2017. // #include "SimpleTime.h" #include "tools.h" #include <vector> #include <cassert> bool SimpleTime::dateEquals(SimpleTime t) { return (year == t.year && month == t.month && day == t.day); } bool SimpleTime::same_month(SimpleTime t) { return (year == t.year && m...
71a2d284d7a45bb6702224f03d53f4ac7c1fce52
445d517c4816cc9c954a673d08b48e53a4e169f5
ordansantos/acm-icpc
/xgcd.cpp
C++
cpp
385
no_license
ll xgcd (ll a, ll b, ll &x, ll &y){ if (b == 0){ x = 1, y = 0; return a; } ll x1, y1, g = xgcd (b, a%b, x1, y1); x = y1, y = x1 - a/b * y1; return g; } // ax + by = gcd (a, b) // a * x0 * (n/gcd(a,b)) + b * y0 * (n/gcd(a,b)) = n // a * (x + b/gcd(a,b) * k) + b * (y - a/gcd(a,b) * k)...
488cde3684ec16eef4665a403b534d8d20e3b1e3
e54a98a3aa4e473702f1071e0dc68a74caa725bc
johnttaylor/colony.core
/src/Cpl/Text/DFString.cpp
C++
cpp
2,900
no_license
/*----------------------------------------------------------------------------- * This file is part of the Colony.Core Project. The Colony.Core Project is an * open source project with a BSD type of licensing agreement. See the license * agreement (license.txt) in the top/ directory or on the Internet at * http://int...
ea4760ebfd42d0b76af33c690caaf675133f9baf
76074be9c4eee6dea50b332db1e18409c4df341a
heying1990/Cracking-the-Coding-Interview
/stack_practice.cpp
C++
cpp
1,004
no_license
#include<iostream> using namespace std; template<class SIT > struct listNode{ SIT data; listNode *next; listNode():next(NULL){} listNode(SIT newData):data(newData),next(NULL){} }; template<class SIT > class Stack{ public: Stack():top(NULL), size(0){}; ~Stack() { while(top!=NULL) pop(); } bool empty() co...
e37664fcb554edd0acc6687653d10991c5e3b5cd
a4ac8fb77b04841bd88a637da9003aa6c1835ae9
ezEngine/ezEngine
/Code/Engine/Foundation/IO/Implementation/StreamUtils.cpp
C++
cpp
514
permissive
#include <Foundation/FoundationPCH.h> #include <Foundation/IO/StreamUtils.h> void ezStreamUtils::ReadAllAndAppend(ezStreamReader& inout_stream, ezDynamicArray<ezUInt8>& ref_destination) { ezUInt8 temp[1024 * 4]; while (true) { const ezUInt32 uiRead = (ezUInt32)inout_stream.ReadBytes(temp, EZ_ARRAY_SIZE(tem...
97b4bf3728dd7b73c07a0c4d88640f49e9723b2f
3c1f4e3c7278d8f1317c8d7fe2cb05bab8c3a32c
Milax11/t0r0-gui-cameras
/build/moc_window.cpp
C++
cpp
2,667
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'window.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1) ** ** WARNING! All changes made in this file will be lost! **************************************************************...
cd3b021e23f65cdea2ecb4154b76c0db2a95b340
d78d68faea24060122beb1fe7cf2e4feda9b2378
JohanMabille/boost.simd
/bench/function/simd/is_denormal/regular.double.m10_10.cpp
C++
cpp
845
permissive
// ------------------------------------------------------------------------------------------------- // Copyright 2016 - NumScale SAS // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE.txt or copy at // ...
3ed67c181f615130643bdb365d5ed2a4214f36a5
1f998f6ebadc1cd2477497d3f9b32f90d5657641
cantidio/gorgonCpp
/examples/src/sff_to_gsp.cpp
C++
cpp
246
no_license
#include<gorgon++/gorgon++.hpp> #include<gorgon++/addons/spritepack/spritepack_sff.hpp> using namespace Gorgon; int main() { allegro_init(); Video::init(); SpritePackSff a(); Palette pal(); a->setGlobalPalette(&pal); a.save("teste.gsp"); }
f05d05c82481d91c70e34cadf621656b1d79b3a7
d1ee3c2e452473c05a8ddd6f063f1e066d707ca8
zhihaoy/arrayfire
/test/testHelpers.hpp
C++
hpp
46,344
permissive
/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
b32624cd2b10ad77624612127ec3a9a86b43a7fe
b3426de2b6125fc0914c0fef45bc597b141e6095
TimZhiX/portfolioSolver
/cal_cov.cpp
C++
cpp
1,240
no_license
/***************************************************************************** File name: cal_cov.cpp Description: calculate covariance matrix *****************************************************************************/ #include "cal_cov.h" void cal_cov(double **covMatrix, double *meanMatrix, double **retMat...
2c033305ec0ac0f4e534463fb807c4d83d4f7e6a
7da14c95cf3a8c3f926cc5b08a49b0dab641a588
ViktorHofer/runtime
/src/coreclr/src/vm/pefile.cpp
C++
cpp
69,734
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. // -------------------------------------------------------------------------------- // PEFile.cpp // // ------------...
a2172aaf5c6a3f90271bcdec091bc9eed735ab66
7591268fa53ece102cafad2672d76b6a4a3e1e9d
girishetty/mytools
/EmbeddedSystemAndMemory/AsyncRead/async_read.cpp
C++
cpp
7,653
no_license
#include <string> #include <vector> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <termios.h> #include <signal.h> #include <stdarg.h> #include <sys/select.h> using std::string; using std::vector; typedef int status_t; #define OK 0 #define NO_ERROR OK // Previous signal handler state, restored ...
ffd8645df55fe576806598b185468a5808b5c1a3
dcd9fb6c0a9533d7d07caa6678c5f13d817430b4
maomao2046/fci
/math.cpp
C++
cpp
3,052
no_license
/* # This file is part of the Fci program. Fci 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, # version 3. # # Fci is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even ...
e494e17ee3adfd171807307bfeb2046275db1556
a8405f95ab70aa1179841b436f35de6ce426cfb3
piyushchavan88/DS_Algo
/LinkedList/LinkedListImplement.cpp
C++
cpp
1,851
no_license
#include <iostream> using namespace std; class node{ public: int data; node *next; node(int d){ data = d; next = NULL; } }; void insertAtHead(node*&head, int data){ // node *temp = head; node *n = new node(data); n->next = head; head = n; } void insertInMiddle(...
313ed6a67bd4c9d13d0bba0eeff76ab4615948ce
5fe1ccde08ef55c01e2d19f3b2e796918e6089e4
pingany/poj
/1036/10585437_AC_32MS_768K.cc
C++
cc
1,340
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <algorithm> using namespace std; #define INLINE inline #ifdef _MSC_VER #define ASSERT(x) do{if(!(x)) __asm{int 3};}while(0) #else #define ASSERT(x) #endif #define MAXN 100 #define MAXT 30000 #define MAX...
9beb40c0f6589d1c6e340a87f57eeef94810664b
09abf9bc0281bc43c90197d081dd194ca9ec263e
anastasia-tropina/dgap-cpp-course
/task01/main.cpp
C++
cpp
201
no_license
#include <iostream> #include "complex.h" int main() { C a, b(2.0), c(1.0, 1.0); a = a * C(2.0); a += c; c = a + 2 * b; std::cout << a << ", " << c << std::endl; return 0; }
4c69d3a036acea48f0cf26b2798efe3c5a5a701c
478d16bda84766545d2f67faffd46f614575e40b
ujjaldas1997/Competitive-programming
/max_element_in_sliding_window.cpp
C++
cpp
839
permissive
#include <bits/stdc++.h> using namespace std; void max_subarray(vector<int> box, int k){ int n = box.size(); deque<int> res; for(int i = 0; i < k; ++i){ while(!res.empty() and box[i] >= box[res.back()]) res.pop_back(); res.push_back(i); } cout << box[res.front()] << " "; ...
60c707235d31ea71508b50d10330decf23cd61c0
7c7b77ebd4b11009ab5a7227d872f113e86eff0d
KrzysztofKozubek/Projects
/OCR/OCR/.localhistory/OCR/1481732096$ocr.cpp
C++
cpp
20,050
no_license
#include "ocr.h" // TODO: 1. wyrownanie katu 2. erozja i dylatacja (moze filtr) pozbycie sie szumu // zmiana organizacji // OCR::OCR(QWidget *parent) : QMainWindow(parent) { /* Kontrast & Jasność & Obrót */ ui.setupUi(this); this->image = imread("lena.jpg", 1); showImage = image.clone(); connect(ui.HSContr...
77d9190d20868e952114705f62992fd30ebd0415
ec23587d5e4c5c0d5e705d7dc8d30d3b5f7e1f62
nunch/PR-IT-4201
/tp0/exo1/ops.hh
C++
hh
1,229
no_license
#include <cassert> #include <iostream> vector operator+(int a, const vector& v2){ vector v(v2); for(int i=0;i<v2.dim();i++){ v[i]+=a; } return v; }; vector operator*(int a, const vector& v2){ vector v(v2); for(int i=0;i<v2.dim();i++){ v[i]*=a; } return v; }; matrix operator+(int a, const matrix& m){ mat...
53fb8675eda47c35a2001883f36336be4603abb9
193ba8814f12f4bacc0df763c84a0d9c1e907ff4
rdarnold/project-robot
/PopupWindow.cpp
C++
cpp
3,163
no_license
// All the class implementation features are in the header. this is just some basic // data manipulation. #include "PopupWindow.h" #include "ProjectRobot.h" PopupWindow *pPop = 0; PopupWindow *pEndTurnPop = 0; bool ButtonsEnabled[MAX_BUTTONS]; bool ButtonsVisible[MAX_BUTTONS]; // Take a snapshot of what the bu...
ffd199e923225cc3a4f5546f45aded8ee0063ddb
48977ad04f5b4f1d140186baf2517a1b2ddce4d4
4drama/map
/object.hpp
C++
hpp
5,072
no_license
#ifndef OBJECT__ #define OBJECT__ #include "geometry.hpp" #include "surface.hpp" #include "graphics.hpp" #include "observer.hpp" #include <list> #include <string> #include <memory> #include "interact.hpp" class control_handler; class interact_handler; class graphics_handler; class object; class interact; class in...
7b81983fd5ed0b4dc47c62b15d9fc2026f613701
c25ea68a186f24bc676a504a8f08ef8215d1dcdc
nuts-bottles/DRaGon
/LIMoSim/app/DRaGon/sectionalview_if.cpp
C++
cpp
1,213
no_license
#include "sectionalview_if.h" namespace LIMoSim { SectionalView_if::SectionalView_if() { m_sv = new SectionalView(Vector3d(0,0,0), Vector3d(0,0,0)); UiManager *ui = UiManager::getInstance(); OpenGL::OpenGLWindow* window = ui->getWindow(); connect(window, SIGNAL(mouseEvent(QVector3D,int)), this, SLOT(...
f133c72c4ba9a0be24238eaae31d5c6d29095282
42db352f1a0c4833d7b980ac78caf677b46db2d1
Happy-Ferret/feathers
/include/opengl/my_opengl.hpp
C++
hpp
2,122
no_license
#ifndef MY_OPENGL_HPP_ # define MY_OPENGL_HPP_ # include <string> # include <array> # include <GLES3/gl3.h> class Shader { public: GLuint shader; private: unsigned int *count; public: Shader(GLuint); ~Shader(); Shader(Shader const &); Shader &operator=(Shader); operator GLuint() const; }; class Program...
ba3c61ff5a3389063cd281a805bbe8e4363634e4
abc51d0abcf84cd091b89aa880fd0bf7b802a1aa
datacomo-dm/DMCloud
/dmsrc/samples/bftest/bloom.cpp
C++
cpp
1,374
no_license
#include<limits.h> #include<stdarg.h> #include <stdio.h> #include "bloom.h" #include "hash.h" #include <string.h> #define SETBIT(a, n) (a[n/CHAR_BIT] |= (1<<(n%CHAR_BIT))) #define GETBIT(a, n) (a[n/CHAR_BIT] & (1<<(n%CHAR_BIT))) bloom::bloom(size_t size, size_t _nfuncs, ...) { va_list l; int n; funcs = NULL; d...
7e7093569f97f1a9129630f9b753a33870b3dc95
5ccf7520098269b48fc6ec5bd072a53ec07059dd
coleb/Raid-Sim
/engine/sc_gear_stats.cpp
C++
cpp
8,640
no_license
// ========================================================================== // Dedmonwakeen's Raid DPS/TPS Simulator. // Send questions to natehieter@gmail.com // ========================================================================== #include "simulationcraft.h" // =======================================...
5b3130fb38e31dc5fb1bbd01adec09cbe4390ece
b27215dab3c93fbc369587fa6f26d43d203eca61
floblockchain/flo
/src/qt/askpassphrasedialog.cpp
C++
cpp
10,406
permissive
// Copyright (c) 2011-2016 The Bitcoin Core developers // Copyright (c) Flo Developers 2013-2018 // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/bitcoin-config.h" #endif #include "ask...
b24e9f67cc0b08e152b9d94fbb0e0f3f374ac90c
94e7b93677fd13291578d218b72b6f8dd99778ba
Amrutha26/A2OJ-Ladder-12
/116B.cpp
C++
cpp
507
no_license
#include <bits/stdc++.h> using namespace std; int main() { int n,m,i,j,count=0; cin >> n >> m; char a[n+5][m+5]; for(i=0;i<n;i++) { for(j=0;j<m;j++) { cin >> a[i][j]; } } for(i=0;i<n;i++) { for(j=0;j<m;j++) { if(a[i][j] == 'W') { ...
051dfd9143fb3f9cdaf7b3071885ff6601b2f14b
e3e87f1c6c313d7b6927994254ece7bc5fc5d1a5
scinart/MAC
/hdu/hdu3397.cc
C++
cc
15,554
no_license
// Time-stamp: <2014-08-07 18:45:01 scinart> // created at 2014-08-06 21:31:46 // hdu3397.cc #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> #include <string> #include <vector> #include <queue> #include <cassert> #include <list> #include <iomanip> #include <cmath> #include <deque> #includ...
8dd620da0f03c13d9f44cafc3ce5ff32e6827b34
35a7fa945b450832d1f3e2a10cb9975769fbca46
Japroriple/chromium
/chrome/browser/ui/webui/about_ui.cc
C++
cc
51,039
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/webui/about_ui.h" #include <algorithm> #include <string> #include <vector> #include "base/bind.h" #include "base/bind_he...
6531ad3bb951855638008ec219476f34c48fce38
d77bdbaa88d3f81f4ba14f87a22dbdd8b6a76b90
thiagoecs/cpp-exercises-1st-year
/Exercise05_B.cpp
C++
cpp
1,033
no_license
#include <iostream> #include <fstream> #include <string> using namespace std; string find_page(string &src, string text); int main(void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while (getline(inputFile, line)) { page.append(line); line.erase(); } // ...
2c25859b450679872c9cd1bfc444198f2e941863
a8b455eb98f985c260eb6abfba360bc582059ba0
mukeshjais/FAANG-Leetcode-questions
/Number_of_Digit_One.cpp
C++
cpp
311
no_license
class Solution { public: long long countDigitOne(int n) { long long ans(0); for (long long i = 1; i <= n; i *= 10) { long long temp = i * 10; ans += (n / temp) * i + min(max(n % temp - i + 1, 0ll), i); } return ans; } };
f5b9c2e8dacf5b8ead57a61626363ce18f65925f
4cb3bc957c5cc17970f00e83da5587fdbf03357a
jlwirtner/streams
/streams/main.cpp
C++
cpp
3,103
no_license
// // main.cpp // streams // // Created by Josh Wirtner on 9/30/19. // Copyright © 2019 jlwCode. All rights reserved. // #include <iostream> #include "streams.hpp" int main(int argc, const char * argv[]) { std::cout << "Hello, Brahj!\n" << std::endl; uint32_t input1 = 0x12345678; uint16_t in...
8be9efb8cf943feaac9441e14a802c38976c24f5
88bfa0990651c0cf10fb3adb7ae33e4ba2c36d1f
ZiyanHuang1993/Radon-Detector-simulation
/src/ExN01EventAction.cc
C++
cc
6,229
no_license
#include "ExN01EventAction.hh" #include "ExN02RunAction.hh" #include "ExN01PrimaryGeneratorAction.hh" #include "G4VUserPrimaryGeneratorAction.hh" //#include "mpi.h" //#include "ExN01SteppingAction.hh" // use of stepping action to get and reset accumulated energy #include "G4SystemOfUnits.hh" #include "G4UnitsTable...
c6e4f6f34125ef858fcc8400e0462b171741e8db
8eaa6d8ffe01876b70126aa575402094d7869d18
zakuro9715/OpenSiv3D
/Siv3D/include/Siv3D/AssetHandle.hpp
C++
hpp
2,477
permissive
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2022 Ryo Suzuki // Copyright (c) 2016-2022 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # pragma once # include <memory> # include "Co...