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
653134e1bac97f71459c83d8cf26d0cbd7e84650
0bb87b660c0cda077ecfc52b7743e42783936a8d
TorqueGameEngines/Torque2D
/engine/source/2d/sceneobject/Trigger.cc
C++
cc
6,536
permissive
//----------------------------------------------------------------------------- // Copyright (c) 2013 GarageGames, LLC // // 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 restr...
b8880c987d15199bfaab36cdf858adba7401faf5
86f21326a22dcb331114222323dbb051d708da9b
hansb21/trabalho_2
/src/main.cpp
C++
cpp
1,304
no_license
#include <fstream> #include <iostream> #include <string> #include "trie.h" #include "dic.h" /** * @brief Printa a resposta correspondente ao nó e à palavra buscada. * * @param NoTrie nó correspondente a palavra buscada * @param string palavra buscada */ void outputResults(structures::NoTrie* node, std::string ...
dc6cc230b5a42ba2564ff4739d2f63e86c6d84f9
d1e5b73d5caccd0a683f14019f88e3958ce71c1f
reeonce/ree_image
/test/ree/image/ppm_tests.cc
C++
cc
2,117
no_license
#include <ree/unittest.h> #include <ree/image/io/ppm.hpp> #include <ree/image/test_config.h> namespace ree { namespace image { namespace io { R_TEST_F(Ppm, ParsePpm) { Ppm ppm; { auto source = ree::io::Source::SourceByPath(kTestAssetsDir + "dot1.ppm"); source->OpenToRead(); auto ctx =...
f5379e54ae3bfec1367264f366257e4a84467acd
807cdc8f59898df21d512563be0cf8d5c45a6bae
codecameo/ProblemSolved
/UVA/Happy Number-10591/Happy Number.cpp
C++
cpp
1,044
no_license
#include <stdio.h> #include <string.h> long long int ar[1000000]; int main () { long long int t,i,sum=0,kase,n,d,j,num,c,k,index; scanf("%lld",&t); kase=1; while(t--) { index=-1; memset(ar,0,sizeof(ar)); scanf("%lld",&num); n=num; ...
22c89124d534799c087cee7eb12e544975aa2a8d
b8f6ce353d0b55a469f693cfb5a517aa7ff17358
haekb/ltel
/LTEL/LTEL/client_info.cpp
C++
cpp
305
no_license
#include "client_info.h" #include "LT1/AppHeaders/server_de.h" ClientInfo::ClientInfo(bool bIsHost, std::string sName, ClientDE* pClient) { m_bIsHost = bIsHost; m_sName = sName; m_pClient = pClient; m_nFlags = CIF_LOCAL; m_pObject = nullptr; m_pUserData = nullptr; } ClientInfo::~ClientInfo() { }
ba1c4da3849e31b8b6aab158f5174fcfacd2326a
e73dfce378930f44db238cc0077445fd1e792fe4
congbui12/SDL2-project-20020190
/well.cpp
C++
cpp
1,595
no_license
#include "well.hpp" Well::Well(): data{{false}} { } void Well::draw(SDL_Renderer *renderer) { SDL_SetRenderDrawColor(renderer, 0xff, 0xff, 0xff, 0xff); for (auto x = 0; x < Width; ++x) for (auto y = 0; y < Height; ++y) { if (data[x][y]) { SDL_Rect rect{ x * 720 / 2 / 1...
3c7da20dd2f4cc3d16c801b3b3c2eeb3053166f1
71455fad881ba3c61296572876a0bf8a260ba20d
sauravjaiswalsj/Guvi
/begineer/cpp/maximum.cpp
C++
cpp
249
no_license
#include<iostream> #include<algorithm> #include<vector> int main(){ int n,t; std::cin>>n; std::vector<int> list; for(int i=0;i<n;i++){ std::cin>>t; list.push_back(t); } std::cout<<*(std::max_element(list.begin(),list.end())); return 0; }
b0f9423eb5fa0feb63da537e8d30e71a0a412f17
a2fa8837a6dc8838003b4529e4f3898963a4f168
Jin992/websocket_opencv
/client_src/connection_metadata.cpp
C++
cpp
1,648
no_license
// // Created by roda on 27.03.19. // #include "connection_metadata.h" connection_metadata::connection_metadata(int id, websocketpp::connection_hdl hdl, std::string uri) : m_id(id) , m_hdl(hdl) , m_status("Connecting") , m_uri(uri) , m_server("N/A") {} void connection_metadata...
3988016822e32e215c1f88f85143977d49b6d6e2
45021d0804f1888b72b150fb9d077d63396db650
andresviikmaa/Robotiina
/GateFinder.cpp
C++
cpp
3,338
permissive
#include "GateFinder.h" GateFinder::GateFinder() { } GateFinder::~GateFinder() { } extern void drawLine(cv::Mat & img, cv::Mat & img2, cv::Vec4f line, int thickness, CvScalar color, bool nightVision = false); cv::Point2i GateFinder::LocateOnScreen(ThresholdedImages &HSVRanges, cv::Mat &frameHSV, cv::Mat &frameBG...
4b58b71d8406166f5f21fc77089b8f20fd7e9f2a
c96b204a5f4a9110740876fca788863bde5b3c3a
bravesoftdz/MyVCL-7
/DevExpress VCL/ExpressDBTree Suite/Demos/CBuilder/DBTree_F/dbtree_f.cpp
C++
cpp
775
no_license
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop //--------------------------------------------------------------------------- USEFORM("DBTree_Fmain.cpp", Form1); USERES("dbtree_f.res"); USEFORM("dbview.cpp", Form2); //---------------------------------------...
87bd6026a08a88dbdb5e245c916bae22005c51f6
e5350d40cecfb3d7df42be284c42e18cd66b4bec
Dezato108/Making_Simple_Space_Invader_Game_At_Gameloft
/Bt3/Bt3/StaticObject.cpp
C++
cpp
397
no_license
#include "StaticObject.h" #include <iostream> using namespace std; StaticObject::StaticObject() { } StaticObject::StaticObject(string id, string name, int x, int y) : BaseObject(id, name, x, y) { } StaticObject::~StaticObject() { //cout << "Static object deleted" << endl; } void StaticObject::move(int x, int y) { ...
e12278a36bca83c82239139afc98f852158bbc25
273db094dd4efc092e4445b93623fa5b6af19c8c
wywdiablo/ChargedAnalysis
/Network/src/htagdataset.cc
C++
cc
7,069
no_license
/** * @file htagdataset.cc * @brief Source file for HTagDataset class, see htagdataset.h */ #include <ChargedAnalysis/Network/include/htagdataset.h> HTagDataset::HTagDataset(std::shared_ptr<TFile>& inFile, std::shared_ptr<TTree>& inTree, const std::vector<std::string>& cutNames, const std::string& cleanJet, const int...
fd17932d3ec50d0d8c7e8a82dc624089ef2d68c9
606bb745e57d270dc57a8711f2b48d8b130baf46
weixiaopassking/Lidar_Localization_RQ
/include/lidar_localization/publisher/key_frames_publisher.hpp
C++
hpp
883
no_license
/* * @Description: key frames 信息发布 * @Author: Ren Qian * @Date: 2020-02-06 21:05:47 */ #ifndef LIDAR_LOCALIZATION_PUBLISHER_KEY_FRAMES_PUBLISHER_HPP_ #define LIDAR_LOCALIZATION_PUBLISHER_KEY_FRAMES_PUBLISHER_HPP_ #include <string> #include <deque> #include <ros/ros.h> #include <nav_msgs/Path.h> #include <geometry_...
b90c32ed4efd4e35d80874837191294e35575957
0a7a231232f90fc9afd59ac212ee9d7c829e2ca6
YYGYYGyy/LSPC-Loading-Simulation-Program
/Source-32-Bit/DirDialog.cpp
C++
cpp
3,288
no_license
/////////////////////////////////////////////////////////////////////////// // DirDialog.cpp: implementation of the CDirDialog class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "DirDialog.h" #include <shlobj.h> #ifdef _DEBUG #undef THIS_FILE static char THIS...
f4a51affe912e1af4091bcb016b2983dc5909e57
c9a469c4c602d4fbd06f10c8babfc08963a0dc22
gruizFING/CompGrafica
/Laboratorio/Obligatorio1/Grafica_Obligatorio1/SpaceRace/Code/math_3d.cpp
C++
cpp
6,010
no_license
/* Copyright 2010 Etay Meiri This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed...
612f2e910edf1c2aeb7534910df65967a6146a8d
2f3032982b5971f25da845396b594e307c2751d5
Takechiyoo/C-Code
/LeetCode/LeetCode/LeetCode/Delete Node in a Linked List.cpp
C++
cpp
672
no_license
#include <iostream> using namespace std; /* 最开始的想法真是蠢爆了,竟然还用了循环,真是忘了什么叫链表了。 不加判断的话只需要两行代码就可以了,不知道为什么这么短的代码才战胜9%的人 */ struct ListNode { int val; ListNode* next; ListNode(int x) : val(x), next(NULL){} }; class Solution { public: void deleteNode(ListNode* node) { /*while (node) { node->val = node->next->va...
d265991f6997da44c6472cbb50db7104b9a772e9
2eefec8ab341d99038222c7830f700c8372fc5d6
mfkiwl/FlyDog_SDR_GPS
/extensions/DRM/dream/datadecoding/journaline/crc_8_16.cpp
C++
cpp
14,476
permissive
/* * * This file is part of the 'NewsService Journaline(R) Decoder' * * Copyright (c) 2003, 2004 by Fraunhofer IIS, Erlangen, Germany * * -------------------------------------------------------------------- * * For NON-COMMERCIAL USE, * the 'NewsService Journaline(R) Decoder' is free software; * you can r...
ccd68ecc96ddfd56999de07754af72d610915f17
6aba78301f8b1f3ab46304630ed5e4b501209459
GrapheneCt/android_kernel_zte_run4g_mod
/mediatek/hardware/sensor/StepCounter.cpp
C++
cpp
6,766
no_license
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
584e756641348bdf3aa9905e61ff7f8e8059f335
f515fa46fc048bab6605d2136a2648bd78470fab
goodann/AlgorithmsStudy
/JSK/Algorithms/Implementation/49_Chocolate Feast.cpp
C++
cpp
574
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main(){ int t; cin >> t; for(int a0 = 0; a0 < t; a0++){ int n; int c; int m; cin >> n >> c >> m; int chocolate=n / c; int changedCh...
7304d8ca88dc8244cd6bd6d4adcffbd2e17f06e4
ee16c48d25c388c6b9da3aa572ebafeda965ae15
ethancoyle7/c-sharp-programs
/nestedloops/forloop/source.cpp
C++
cpp
271
no_license
using System; class Ethan Coyle { public static void Main() { // nested for loop // printing my name for(int i = 0; i < 5; i++) for(int j = 1; j < i; j++) Console.WriteLine("Ethan Coyle!!"); } }
c8f458f0470bcaab8dedceca3a11b492415bbc2f
c78bb1cab0757719308100dc1353926b709c98ad
dbv771/Ditto
/RulerRichEditCtrl/External/ColourPicker.cpp
C++
cpp
9,760
no_license
// ColourPicker.cpp : implementation file // // ColourPicker is a drop-in colour picker control. Check out the // header file or the accompanying HTML doc file for details. // // Written by Chris Maunder (chrismaunder@codeguru.com) // Extended by Alexander Bischofberger (bischofb@informatik.tu-muenchen.de) // Copyrigh...
d0da6209a5ea1caf42c9b8051855320261226258
a5343f0291839d3f39aa0e3d113dcc49984f451b
34234344543255455465/aws-sdk-cpp
/aws-cpp-sdk-ec2/source/model/MonitorInstancesResponse.cpp
C++
cpp
2,354
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...
7e8eb59cb776334ff6f8e54fc8eacdf4e558f14a
c439413868fdf4157cc532ee0afb9b8db9713b25
jianhang-liu/mkl-dnn
/src/cpu/rnn/cell_common.cpp
C++
cpp
3,428
permissive
/******************************************************************************* * Copyright 2018 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
821f986bec8520521733e562f01dadacd1d1a9f3
743fab9e25fef6fcda239ff5e46b5935fd02198c
zhihanyang2022/cs312
/cs312/project1/project1/CVolumeController.cpp
C++
cpp
2,815
no_license
#ifndef CVOLUMECONTROLLER_H_ #include "CVolumeController.h" #endif #ifndef HW511_CBLUESMELODYTRACK_H_ #include "hw511_CBluesMelodyTrack.h" #endif #include <iostream> #include <vector> #include <cstdlib> #include <math.h> #define PI 3.14159265 CVolumeController::CVolumeController() { } double CVolumeController::get...
1cc97221a0bac2a368ebc5b95da94e73d49c9038
93b0650532427ac85d8d93beab36b8e850179085
bvanloon/Scientific-Visualization
/smoke/settings/simulationsettings.cpp
C++
cpp
5,298
no_license
#include "simulationsettings.h" #include "settings/canvassettings.h" #include "fftw.h" #include <QDebug> Settings::Simulation::Simulation(QObject *parent) : QObject(parent), dimension(100), timestep(0.4), frozen(false), force(10.0f), cellSize(-1, -1), useDynamicValueRange(true) { staticScalarRa...
4c1143f85ca12a7c05fef62f79b1c2dda259105b
fc0739046f0b7ac419accfc22fa1a15170ad9c39
didiwuliu/swoole-src
/src/reactor/select.cc
C++
cc
8,404
permissive
/* +----------------------------------------------------------------------+ | Swoole | +----------------------------------------------------------------------+ | This source file is subject to version 2.0 of the Apache license, | | that is bundl...
12f806fe6daf9b3635fabe16c8acce346d011902
eecee16c0f7058138ff6706c5813cfb2fed97d62
keeptotheend/cocos2dx-classical
/samples/Cpp/TestCpp/Classes/ShaderTest/ShaderTest.cpp
C++
cpp
21,266
no_license
#include "ShaderTest.h" #include "../testResource.h" #include "cocos2d.h" NS_CC_BEGIN extern const GLchar* ccPositionTextureColor_vert; extern const GLchar* ccPositionTexture_vert; extern const GLchar* ccPositionTexture_vert; NS_CC_END static int sceneIdx = -1; #define MAX_LAYER 9 static CCLayer* createShader...
24083dd28256ac4b9e638c045376e6976969e026
8fd0f33cf792cecf952674ae7cd2084835462c50
CRASHFIRE-666/Project-9
/9.2.cpp
C++
cpp
464
no_license
#include <iostream> using namespace std; #include <cmath> int main() { setlocale(LC_ALL, "Russian"); int n; cin >> n; if (n == 0) { cout << "Север" << endl; } else if (n == 1) { cout << "Запад" << endl; } else if (n == -1) { cout << "Восток" ...
8e7908baec0341820918e2cdc14ee2b900bc484a
bb128e4699ccfafa9dd1bd25dde3ba68fd79aea8
SymbianSource/oss.FCL.sf.mw.classicui
/lafagnosticuifoundation/uigraphicsutils/tef/tetultestserver.cpp
C++
cpp
2,466
no_license
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" // which accompanies this distribution, and is available // at the URL "http://www.eclipse.org/legal/e...
78ea0838c08190573fda4952d8220241e9484ebf
ae1d8da21c8656571879728dfb230ab1b68370e9
Renanvt/Curso_de_C_e_CPlusPlus
/funcoes_ListaEncadeada.cpp
C++
cpp
11,471
permissive
#include <iostream> #include <new> #include <string> #include <stdlib.h> using namespace std; struct pessoa{ string nome; int rg; struct pessoa *proximo; }; void limpaTela(); int retornaTamanho(pessoa *ponteiroEncadeada); void adcComecoEncadeada(pessoa *&ponteiroEncadeada, string nome, int rg); void adcFim...
813e51007bddda2b0396e2454a5d549fcbe19191
6a354b58865fa257673188e8f5fffa73131d941b
RohanPadmanabhan/perspective
/packages/perspective/src/cpp/traversal.cpp
C++
cpp
20,580
permissive
/****************************************************************************** * * Copyright (c) 2017, the Perspective Authors. * * This file is part of the Perspective library, distributed under the terms of * the Apache License 2.0. The full license can be found in the LICENSE file. * */ #include <perspecti...
0a0fecfd159b0ee4d4852b65d0bf3620dac848c5
292838541f86e11d086a7cd76c7c4bda1ff3cdb0
microsoft/onnxruntime-openenclave
/orttraining/orttraining/test/model/training_runner_test.cc
C++
cc
2,367
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "orttraining/models/runner/training_runner.h" #include "gtest/gtest.h" #include "core/common/path_string.h" #include "core/platform/path_lib.h" #include "core/session/environment.h" #include "orttraining/models/r...
041b8b2759b941d364aef302a04823bad43feb51
dfbcd324e14851c0e92e684eedf4c5cb4edbe296
sergi4ua/devilution
/Source/logging.cpp
C++
cpp
5,530
permissive
//HEADER_GOES_HERE #include "../types.h" static CRITICAL_SECTION sgMemCrit; CHAR FileName[260]; // idb char log_buffer[388]; LPCVOID lpAddress; // idb DWORD nNumberOfBytesToWrite; // idb /* data */ int log_not_created = 1; // weak HANDLE log_file = (HANDLE)0xFFFFFFFF; // idb #...
f52909ba3a039b6dd91fc3bb3bfdcb730bb81248
bfd82efce78195b13938b25b7d46e11882ad07e8
EmpireCryptoNetwork/emp
/src/qt/addressbookpage.cpp
C++
cpp
10,192
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2019 The EmpireCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mi...
0f5388f0cb2d836fb5ee949ea6f6de62124bbc0c
5369da6b88cc1f95ba0bea79816a8a67a1301788
AnudeeP-1/Codes
/CPP/OOPS/Abstraction/1.cpp
C++
cpp
737
no_license
//displaying only essential information and hiding the details is known as abstraction //for eg. consider man driving a car. He knows how to apply brakes and accelerator //but he dont know whats happening inside the brake mechanism. //eg. is we use pow() to calculate the power using math.h header file. //but we donno ...
46748a07d4b2b8beb2f699020fbc23425b813cf8
ea0065a678272beb4839ff5e8669048980cc31b0
lowsar/mesa3d
/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
C++
cpp
21,984
no_license
/* * Copyright © 2013 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, pub...
1a180462374376f25b3a721ea1b3d8c0fec1473b
68e699ce91cdefe78e0d9c301847cb91140541bd
akhikolla/TestedPackages-NoIssues
/psychonetrics/src/18_dlvm1_prepare_cpp.cpp
C++
cpp
2,569
no_license
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- // we only include RcppArmadillo.h which pulls Rcpp.h in for us #include <RcppArmadillo.h> #include <math.h> #include "02_algebragelpers_kronecker.h" #include "02_algebrahelpers_RcppHelpers.h" #include "03_modelformation_formModelMatric...
d349bb83d69f0ef237c480cf1b14285823af74ba
3a02db4f41ebc95b7eaf1cccc8bd8a83573708c7
Geospatial-Data-Science/pangeo-pyinterp
/src/pyinterp/core/tests/math_bivariate.cpp
C++
cpp
4,681
permissive
// Copyright (c) 2020 CNES // // All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include <gtest/gtest.h> #include <boost/geometry.hpp> #include "pyinterp/detail/geometry/point.hpp" #include "pyinterp/detail/math/bivariate.hpp" namespace math = ...
004dcabf39e6d8d3c46739ab0a0c4ef4c66a8ce8
e3c760ac338780c8aa45b8259095b5746ccbf3cb
openharmony/communication_bluetooth
/services/bluetooth/service/src/pbap_pce/pbap_pce_state_machine.cpp
C++
cpp
31,798
permissive
/* * Copyright (C) 2021 Huawei Device Co., Ltd. * 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 ...
17dee6adca3e94da0d802d4f2ab1189adec36ff4
8391dd692a43a732be13523b567538883d1feb87
moiri-usi/USI-specification-project
/modules/ycbcr2rgb.cpp
C++
cpp
621
no_license
#include "ycbcr2rgb.h" void ycbcr2rgb::process() { int y, cb, cr; int value; while (1) { y = input_y.read(); cb = input_cb.read(); cr = input_cr.read(); // calc of red value = y+1.402*(cr-128); if (value < 0) value = 0; if (value > 255) value = 255; output_red.write(value); // ...
de27d4a4eb8b1613f8414a10807990dfa0c857d2
9da00d1e2b2852d8b5127d5a73c06c302b7b587d
digital-synapse/espresso
/SystemController.cpp
C++
cpp
258
permissive
#include <ESP8266HTTPClient.h> #include "espresso.h" void systemController() { server->on("/system", HTTP_GET, []() { if (server->arg("reboot") != "") { reboot(); } if (server->arg("reset") != "") { writeString("", 0); reboot(); } }); }
8abb8890a3ef6c6c7de742a90225eeb7def8f2d0
95417ce94614c41e40461c7e7eda3c5a7cc5829f
atbaird/DrekLike
/DrekLike/Code/Game/Generators/MapGenerators/CavernMap/Cavern.cpp
C++
cpp
2,764
no_license
#include "Game/Generators/MapGenerators/CavernMap/Cavern.hpp" #include "Game/Generators/MapGenerators/CavernMap/PerlinWorm.hpp" const int Cavern::minNumberOfTunnelLines = 4; const int Cavern::addRandNumOfTunnelLines = 3; const float Cavern::minCavernSize = 1.0f; const float Cavern::addRandCavernSize = 5.0f; const int ...
6131211d2892665cf40b7d4f42c777dcb7ea01a3
19583253f9572a317927baec0b156e3c343503d1
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14733/function14733_schedule_12/function14733_schedule_12.cpp
C++
cpp
1,457
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function14733_schedule_12"); constant c0("c0", 64), c1("c1", 128), 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...
905ed0a52ec68d04becc92d22209a47f72edcbc2
a686aecf3b59d8fb57b64fe80ce3267522d35915
Kickoman/code
/Contests/RESPA/2015-2016/Viciebsk_rajon_2015/solutions1gimn/F159Z124.cpp
C++
cpp
1,089
no_license
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <cmath> #define DEBUGs using namespace std; const int INF = (int) 1e9; const int SWAG = 228; const long long INFll = (long long) 1e18; int main() { #ifdef DEBUG #define debug(...) printf(__VA_ARGS__) #else ...
468ed8fb1dc710296c70f56e936d775b94ce4dc2
fc8be0f362f7f6205147245cf71f563e2072da42
Ewenwan/RVAF
/AcfDetect/acfDetect.cpp
C++
cpp
10,700
permissive
/* * acfDetect.cpp * for VisualStudio & opencv3.0.0 * * Created on: Aug 2, 2015 * Author: Peng Chao * */ #include <stdio.h> #include <vector> #include <opencv2\opencv.hpp> #include "acfDetect.h" #include "chnsPyramid.h" #include "disp.h" #include <glog\logging.h> using namespace std; ...
100e12326d533a7bdecc4c822b33f292e785bd7b
e8691115ee019b430d1cfbaba4bfbf27acbd4da1
ChuaPingChan/SpaXI
/AutomaticProjectTesting_Aug2015_VS2015/EmptyGeneralTesting/SPA/PQL/Evaluator/Pattern/AssignPatternEvaluator.cpp
C++
cpp
14,656
no_license
#include "AssignPatternEvaluator.h" AssignPatternEvaluator::AssignPatternEvaluator() { } AssignPatternEvaluator::~AssignPatternEvaluator() { } bool AssignPatternEvaluator::evaluate(PatternClause ptClause, ClauseResult* clauseResult) { Entity argOneType = ptClause.getArgOneType(); Entity argTwoType = ptCla...
29c08bd7063b42c58b487e2ae475d70814f5d768
f3e7887136dd711db489beefc3b1943ac065afd4
edisonhello/waynedisonitau123
/Contest/Europe/NEERC/2016/K.cpp
C++
cpp
4,235
no_license
#include <bits/stdc++.h> using namespace std; constexpr int Z = 1000; constexpr int ZZ = 3000; using Row = bitset<ZZ>; using Pat = array<Row, ZZ>; ostream& operator << (ostream& o, const Pat &p) { for (int i = 0; i < ZZ; ++i) o << p[i] << '\n'; return o; } Pat MoveDown(const Pat &x, int o) { Pat y; ...
530a131588b0376958a3214d5b713e94e49d9f79
c93e009a3f286fa22a9c22e9986f56053b3e6adc
rezacute/fbthrift
/thrift/compiler/generate/t_hack_generator.cc
C++
cc
114,428
permissive
/* * Copyright 2014 Facebook, Inc. * * 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 agreed to...
502fec586ff6e0489ee37e856caab9debcc74db9
c8c722534414406cb18bd026cd583145563b6d64
alexandraback/datacollection
/solutions_5640146288377856_1/C++/Candyman/jam.cpp
C++
cpp
519
no_license
#include<iostream> #include<math.h> #include<stdio.h> #include<string> using namespace std; long long wow = 10000000000000016; int print(int a, int x) { cout<<"Case #"<<x<<": "<<a<<endl; return 0; } int main() { freopen("out.txt", "w", stdout); //freopen("in.in", "r", stdin); int t, r, c, w; ci...
067c75a66d91e1403c13bae35c29fda5c0633faa
2bda729ae154c7a007148e33cd14a1d9cb6034bd
UDC-GAC/tejas_knl
/Tejas-Simulator/PIN/pin-2.14/source/tools/CacheClient/mtFlush.cpp
C++
cpp
4,064
permissive
/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2014 Intel Corporation. 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 noti...
03170f9a10fbb5c67ac7969f580a5b28300194b1
8c54159a41e3361322d0fa7ce36534447680207d
wanghaoshuang/Paddle
/paddle/fluid/operators/distributed/grpc_client.cc
C++
cc
15,099
permissive
/* Copyright (c) 2016 PaddlePaddle 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...
b245ba99bf0daca28d06b8eb6689bf9e226875de
9664cebea4353a285364f2979116ee488a2b8b91
Crackeree/lightoj
/1354.cpp
C++
cpp
1,203
no_license
#include <bits/stdc++.h> using namespace std; int p,q,r,s; void stod(char str[]) { int j = 4, i=-1 ; while(j--) { int mul=128,sum=0,loop=8; while(loop--) { ++i; if(str[i]=='.') { break; } ...
d718dfabbd19df51975fdcb80a627c0598d6bda8
2fba703811c6c1add99b9273ca94fe5f7e779d69
SoftwareSnowball/Dragons-In-Shelby
/Dragons in Shelby/Project1.cpp
C++
cpp
4,188
no_license
/* Author: James Malloy email: jem0044@tigermail.auburn.edu id: 903518039 FileName: Project1.cpp Compilation: g++ -Wall -std=c++11 -c -o resources.o resources.cpp g++ -Wall -std=c++11 -c -o MMC.o MenuManagerClass.cpp g++ -Wall -std=c++11 -c -o SMC.o ScoreManagerClass.cpp g++ -Wall -std=c++11 -c -o EN.o Encounters.c...
41c3e275aa97bba419d4447dc6cd210a52355e41
144c9d3bd683701c939b98a6984773226c301bd8
spring/svn-spring-archive
/branches/nmapsys2/Map/SM3/terrain/Lightcalc.cpp
C++
cpp
5,532
no_license
#include "StdAfx.h" #include "TerrainBase.h" #include "Terrain.h" #include "TerrainNode.h" #include "Textures.h" #include "Lightcalc.h" #include "Map/ReadMap.h" #include <SDL.h> namespace terrain { using namespace std; void BlurGrayscaleImage(int w, int h, uchar *data) { uchar *nd = new uchar [w*h]...
86d44bfbc290bd18f8b3558b4e15e0b3de19a571
f1ee2059096d89f2311cea4b64827bffb2c927f7
sonastea/Project-Omega
/Project Omega/Rat.cpp
C++
cpp
4,012
no_license
#include "stdafx.h" #include "Rat.h" /* Initializer functions */ void Rat::initVariables() { } void Rat::initAnimations() { /*this->animationComponent->addAnimation("IDLE", 25.f, 0, 0, 3, 0, 60, 64); this->animationComponent->addAnimation("WALK_DOWN", 11.f, 0, 1, 3, 1, 60, 64); this->animationComponent->addAnimat...
6d499ecf7eb0613a847bf1fb3e9f1526a1125384
c7aa60cc605a220f74589d0fc25055fe808a2c81
chadrockey/chromium
/chrome/browser/extensions/subscribe_page_action_browsertest.cc
C++
cc
13,937
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/extensions/extension_browsertest.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h...
fd0e7f6d49d801b460d423cfea3ad9599fef9190
4cdd4ccafce3580ed15ef31d8525500dec95313c
XC-Team/c-program-code
/源代码/【75-85】 源代码/前自增和后自增的比较_1.cpp
C++
cpp
430
no_license
# include <stdio.h> int main(void) { int i; int j; int k; int m; i = j = 3; //等价于 i = 3; j = 3; k = i++; m = ++j; printf("i = %d, j = %d, k = %d, m = %d\n", i, j, k, m); return 0; } /* 在Vc++6.0中的输出结果是: ---------------------- i = 4, j = 4, k = 3, m = 4 ---------------------- 总结: 前自增整体表达式的值是i加1之后的值 后自...
d6857682d369a03b0d393ae01878a5b19013a547
5b96a005ea554464a77c8a105c6897da01d05b34
K-Wu/leetcode
/5-expandcenter.cpp
C++
cpp
964
no_license
//Longest Palindromic Substring #include<iostream> #include<string> using namespace std; //expand center string longestPalindrome(string s) { int maxlength = 1, subscr = 0; for (int centre = 0; centre < s.length(); centre++) { int length = 1; while (centre - (length - 1) / 2 >= 0 && centre + (length - 1) / 2 < s...
96fec424ae974a254e10f993b577db74d298f2ba
a81e6791ffd1f683440fb4c5056ad07e8310395e
dogtwelve/eepp-clone
/include/eepp/system/condition.hpp
C++
hpp
3,592
permissive
#ifndef EE_SYSTEMCCONDITION_HPP #define EE_SYSTEMCCONDITION_HPP #include <eepp/core.hpp> #include <eepp/core/noncopyable.hpp> namespace EE { namespace System { namespace Platform { class ConditionImpl; } /** @brief Blocks concurrent access to shared resources from multiple threads */ class EE_API Condition : NonCop...
acb86f80d3dddf83213ba3b90155bb72a43cddc9
cb82e0ffa75c59ef1d53f62e83ce87e68fe0aacc
chachakotorin/oggYSEDbgm
/Zwei.cpp
C++
cpp
3,081
no_license
// Zwei.cpp : 実装ファイル // #include "stdafx.h" #include "ogg.h" #include "Zwei.h" // CZwei ダイアログ IMPLEMENT_DYNAMIC(CZwei, CDialog) CZwei::CZwei(CWnd* pParent /*=NULL*/) : CDialog(CZwei::IDD, pParent) { } CZwei::~CZwei() { } void CZwei::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Contr...
c798e4861a21f7801a7137b3b617fa5acb416abd
98a70fdf77e115fc3705258f98f1a8895ac01428
Koloses/Vivaldi-browser
/chromium/content/public/browser/content_browser_client.cc
C++
cc
30,274
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 "content/public/browser/content_browser_client.h" #include <utility> #include "base/feature_list.h" #include "base/files/file_path.h" #incl...
c7a020b2f3f6780b50c2a616b2a477b1da7149c4
599ac382bcc21d3ef968feb39747831acf63f7e7
keyor/douzizhu
/Regist/Debug/moc_registserver.cpp
C++
cpp
5,280
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'registserver.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.0) ** ** WARNING! All changes made in this file will be lost! ********************************************************...
710568ef42fc49b439eb8a650ef027c11921f316
566d99fcd13152a1c38e1545fea3639752540e18
DangZhonghua/CodingPractice
/LeetCode/Hard/Minimize Malware Spread II.cpp
C++
cpp
1,545
no_license
/* https://leetcode-cn.com/problems/minimize-malware-spread-ii/ Minimize Malware Spread II (This problem is the same as Minimize Malware Spread, with the differences bolded.) In a network of nodes, each node i is directly connected to another node j if and only if graph[i][j] = 1. Some nodes initial are initially in...
3e06ffd59ee5d3819bc13339b37ff59ae4e82159
7190906977bb9f82ee92deabf9257ae4354126ad
qq456cvb/SLAM-MaskRCNN
/src/TSDF_CPP/ViewShader.cpp
C++
cpp
2,368
no_license
#include "ViewShader.h" bool ViewShader::init() { bool res = true; const char *attribs[] = { "aPosCoord", "aTexCoord" }; int *attribIds[] = { &mAttribPosCoord, &mAttribTexCoord }; const int attribsCount = sizeof(attribs) / sizeof(attribs[0]); const char *uniforms[] = { "tsdf" , "s2w", "c", "vol_dim", "volStart",...
b514a8efa53c6d8cfa4726fec1affb1b89dd72e5
613eaf614215cb60ab5d61ad7cdd102b6cb1b6be
arangodb/arangodb
/3rdParty/boost/1.78.0/boost/process/detail/posix/async_out.hpp
C++
hpp
5,794
permissive
// Copyright (c) 2006, 2007 Julio M. Merino Vidal // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling // Copyright (c) 2009 Boris Schaeling // Copyright (c) 2010 Felipe Tanus, Boris Schaeling // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling // // Distributed under the Boost Software License, Version 1.0. (See ac...
c2bbaeb81d18c6e0f085fbe77d5e59b5cb97efc9
821fff8cc641909b465868705d980e8a57040396
chenguoguowen/server
/Head.cpp
C++
cpp
277
no_license
#include "StdAfx.h" #include "Head.h" CHead::CHead(void) { type = -1; tag = 1; strcpy_s(fromID,""); strcpy_s(toID,""); strcpy_s(ip,""); strcpy_s(msg,""); strcpy_s(usermsg.ID,""); strcpy_s(usermsg.NAME,""); strcpy_s(usermsg.PASSWORD,""); } CHead::~CHead(void) { }
8143edd96bfcff2d1854e345ca528384ff0f1804
9cf4ff9df229f2ee4ef0ba219b360ac5f8bad7f5
JiangKevin/gearoenix
/gearoenix/render/skybox/gx-rnd-sky-cube.hpp
C++
hpp
719
no_license
#ifndef GEAROENIX_RENDER_SKYBOX_CUBE_HPP #define GEAROENIX_RENDER_SKYBOX_CUBE_HPP #include "gx-rnd-sky-skybox.hpp" namespace gearoenix::render::material { class SkyboxCube; } namespace gearoenix::render::skybox { class Cube final : public Skybox { // Just for reducing the unnecessary and repetitive casting GX...
764a9c148fdeb2c960640012870566645f05d1d0
81cf26e8ed74727adeb755908eff528fb6e9f051
MarilynDafa/filament
/samples/sample_cloth.cpp
C++
cpp
9,340
permissive
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
a3a886e0bb12e7359baa94dfbbc82f390878d42d
de212000ba88f763d0b9332c9a887de5a9d08723
sleepbysleep/hyperspectral_imager
/CTabStream.cpp
C++
cpp
9,049
no_license
// CTabStream.cpp : implementation file // #include "pch.h" #include "HyperImager.h" #include "CTabStream.h" #include "afxdialogex.h" // CTabStream dialog IMPLEMENT_DYNAMIC(CTabStream, CDialogEx) CTabStream::CTabStream(CWnd* pParent /*=nullptr*/) : CDialogEx(IDD_DIALOG_STREAM, pParent) { } CT...
23075200f3d5bfa4b04ce7c8341086231c287ba0
6a5e0a088694182199f609b3e2608ccd42858d8a
harzcoin/harzcoin
/src/compat/glibc_compat.cpp
C++
cpp
839
permissive
// Copyright (c) 2009-2014 The Harzcoin Core developers // 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/harzcoin-config.h" #endif #include <cstddef> #if defined(HAVE_SYS_SELECT_H) #i...
442db47cfb80023086ccc9a9e103ce9f666b784c
025bddbf0a85d76002cf9a2ee64a52713a6fbe6d
TimSC/pgmap
/dbids.cpp
C++
cpp
8,925
permissive
#include "dbids.h" #include "dbcommon.h" using namespace std; #if PQXX_VERSION_MAJOR >= 6 #define pqxxfield pqxx::field #define pqxxrow pqxx::row #else #define pqxxfield pqxx::result::field #define pqxxrow pqxx::result::tuple #endif bool GetMaxObjIdLiveOrOld(pqxx::connection &c, pqxx::transaction_base *work, const st...
ea6e168759eb1e68b9d170aa661bc0f7efa46863
dcf07063e497da9316b538f45928995549b7b573
project-renard-survey/leechcraft
/src/plugins/lmp/util/lmp/util.cpp
C++
cpp
4,284
permissive
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2006-2014 Georg Rudoy * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or organiz...
f528e8da45684da9e58aee820caf971d5ea23751
abb34114184560ac75483218671b62da51e944d6
CVerbist/SupermarketApp
/askUser.cpp
C++
cpp
1,229
no_license
#include "askUser.h" #include <string> #include <iostream> using namespace std; // Asks the users any kind of input through the screen //TODO: put in place checks to see if user input is good string askUser::askInput(string appQuery) { string responseUser; cout << appQuery << endl; getline(cin, responseUser); r...
ad10d92ceb4b59990cbde7a42058a9c63414a120
0dd2621e8e2d5b64259211411a837f835a5c0312
BlurEffect/SquadAI
/SquadAI/AimAtTarget.cpp
C++
cpp
757
no_license
/* * Kevin Meergans, SquadAI, 2014 * AimAtTarget.cpp * An action behaviour that has the entity aim at the currently set attack target position. */ // Includes #include "AimAtTarget.h" #include "Entity.h" AimAtTarget::AimAtTarget(const char* name, Entity* pEntity) : UniversalIndividualBehaviour(name, pEntity) { } ...
ba78faeb602a52ddb173d1e90f62f18e3ad1e83c
4cd4e956c56dd45a6463c807e6a4f102ccc709f0
thegamer1907/Code_Analysis
/DP/1609.cpp
C++
cpp
848
no_license
#include <bits/stdc++.h> using namespace std; int l, r, lr; int main () { string a; cin >> a; int n = a.size(); int i = 0; while (i < a.size()) { if (a[i] == 'A' && a[i + 1] == 'B' && i + 1 < a.size()) { if (i + 2 < a.size() && a[i + 2] == 'A') { lr ++; i += 3; } ...
b49a9fce0e0f8dfb3ba0aac574c5ab6069e42ff9
3ede0e3a267185673786706a3e313e2e99fd31c8
moadmmh/Competitive-Programming
/CF/Div 1/A/109A.cpp
C++
cpp
1,167
no_license
#include <bits/stdc++.h> using namespace std; #define sf(n) scanf("%d", &n) #define pd(n) printf("%.12lf", n) #define pf(n) printf("%d", n) #define p() printf("\n") #define ps() printf(" ") #define ll long long #define ull unsigned long long #define MAX 1e9 #define mod 1000 * 1000 * 1000 + 7 #define ex 1e18 #define dbl...
5f566194296c3d8843160061bbfdbe5903830962
01a4d650b0eb1c1c12c6bff72260748a21c62060
jmg/nttp-server
/nntpServer/nntpServer/Utils/Configuration.cpp
C++
cpp
2,543
no_license
#ifndef CONFIG_CPP #define CONFIG_CPP #include "configuration.h" #include <string.h> #include <stdlib.h> #include <windows.h> #include <stdio.h> struct XmlFileClass { HANDLE f; char* Content; int Size; }; typedef struct XmlFileClass * XmlFile; char* MemReserveForChar(int len) { return (char...
3e8b32b620c37c6169fb9a2b3007b62c013aee9a
a071a82433a91924c6759f6b00c145ded2f52005
LU15W1R7H/lwirth-lib
/src/algorithm/Sorting.hpp
C++
hpp
2,324
permissive
#include <algorithm> /* * IMPORTANT NOTE: * Make sure the comparison-condition CAN be met. * Especially if multiple identical elements exist. * Otherwise the function will never return and run forever. * E.g. the condition [a < b] can't be satisfied if two identical elements exist. */ namespace lw { templ...
577a8877250b197bd1afb0a60dfa779df8c11c18
f4fbc48f0c603655883a7c8d0accfb1386ac02f7
bniss/hit-computer-network
/network4/ipv4.cpp
C++
cpp
2,239
no_license
#include "sysInclude.h" #include <vector> #include <algorithm> using std::vector; extern void fwd_LocalRcv(char *pBuffer, int length); extern void fwd_SendtoLower(char *pBuffer, int length, unsigned int nexthop); extern void fwd_DiscardPkt(char *pBuffer, int type); extern unsigned int getIpv4Address(); struct RNo...
78d605f71b1849add29c4f82d49770cc7a4d0234
07e7b023fce262178a274afd7cf40ab491292447
Isshon-Saha/C-plus-plus-Exercises
/assignments/flab 4/main.cpp
C++
cpp
320
no_license
#include <iostream> using namespace std; int main() { for(int i=5;i>-4;i--) { try {if(i==0) throw i; cout<<22/i<<endl; } catch(int x) { cout<<"FUCK YOU I CANT DO THAT"<<endl; } } return 0; }
46c762fba0154e486d469243d70d970017e9976e
2d9848f3cdf1ac8e40a239544c9d300065f814b0
vespa-engine/vespa
/vespalib/src/vespa/vespalib/util/bits.cpp
C++
cpp
994
permissive
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/util/bits.h> namespace vespalib { uint8_t Bits::_reverse[256]; Bits::ReverseTableInit Bits::_reverseTableInit; void * Bits::reverse(void * srcDst, size_t sz) { uint8_t ...
cb14313fb0b72815bda9020412116d27978546df
ca67a35003f5ad54a810bd70aa393bb54b527647
callistusystan/Algorithms-and-Data-Structures
/Codeforces/solved/682A/682A_remainders.cpp
C++
cpp
384
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; int main() { ios::sync_with_stdio(0); cin.tie(0); ll N,M; cin >> N >> M; vi c1(5), c2(5); for (int i=1;i<=N;i++) c1[i%5]++; for (int i=1;i<=M;i++) c2[i%5]++; ll ans = c1[0]*c2[0] + c1[1]*c2[4] + c1[2]*c2[3] + c...
c47a9d8a4b0dc252d60509e4882234ffc55d6722
90a8423270fb8ab0c22522c9de79e50a4b919e83
ecommerece/Gears
/gears/adl.hpp
C++
hpp
2,268
permissive
// The MIT License (MIT) // Copyright (c) 2012-2014 Danny Y., Rapptz // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // us...
a7d135717a08679d90556ec0285c9a07489f816b
1804056003769984b1ca985f4bf92d67d7fbae7d
avinashw50w/practice_problems
/CodeChef/Maths/Anup at Amritapuri.cpp
C++
cpp
6,638
no_license
/* Anup recently visited Amrithapuri for ACM ICPC regional contest. A student walked up to Anup, gave him a paper which had a long programming question on it and asked him to solve it by 18th of January, 2015. As Anup was busy with school kids, he posted the question as cook off question, asking wider community to ...
a73315f692e5a7763a2aad14c66e87d10bb8e5c5
c6d87eda556679a4c648add2fc079b57b0ad8566
google/ecclesia-machine-management
/ecclesia/lib/redfish/dellicius/utils/for_each.cc
C++
cc
1,223
permissive
/* * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
781c5d46819d7012b8b072ee1130445db3382d9f
a6f66152cd37bc3defdd7c4ee7081573423c33e1
VbaGGz/Image-Processing-Median-Filtering
/Source.cpp
C++
cpp
907
no_license
#include <iostream> #include <string> #include <vector> #include <windows.h> #include <fstream> #include <cstdlib> #include "medianFilter.h" using namespace std; int main(int argc, char *argv[]) { vector<string> filenames; int i = 1; string path = "./"; string searchPattern = "*.ppm"; string full...
ef4a0856197679b7b3fc924bf54815038d3658dd
047514d32c5dae16ee58da610b0c93ff5af1d667
AdamCDunlap/7wonders
/infix_iterator.hpp
C++
hpp
1,441
no_license
// infix_iterator.hpp // // Lifted from Jerry Coffin's 's prefix_ostream_iterator #if !defined(INFIX_ITERATOR_H_) #define INFIX_ITERATOR_H_ #include <ostream> #include <iterator> template <class T, class charT=char, class traits=std::char_traits<charT> > class infix_ostream_iterator : public st...
336e3f7dbc1bc26272ff32b9e3768219f3d34574
b7c201e59933891f8f5ec693d9bd7f16a02cb488
kkishi/atcoder
/contests/abc180/abc180_d/main.cc
C++
cc
286
no_license
#include <bits/stdc++.h> #include "atcoder.h" void Main() { ints(x, y, a, b); int e = 0; while (x < y - 1) { if (__int128_t(x) * (a - 1) < b) { x *= a; ++e; continue; } int z = (y - x - 1) / b; x += z * b; e += z; break; } wt(e); }
040f4ea9590e8726b9f407b894502001bda1623c
faecf312251f9cad35e75d52a8e5850ee448051c
forestdan/myMikanOS
/kernel/acpi.hpp
C++
hpp
1,334
no_license
/** * @file acpi.hpp * * ACPI テーブル定義や操作用プログラムを集めたファイル。 */ #pragma once #include <cstdint> #include <cstddef> namespace acpi { struct RSDP { char signature[8]; uint8_t checksum; char oem_id[6]; uint8_t revision; uint32_t rsdt_address; uint32_t length; uint64_t xsdt_address; uint8_t extended_check...
2e777f55302b793bc7a25252c55dd43858455ad5
f9ac35cf22fd4f682c04493d528238bb379c6e00
chopshop-166/frc-2013
/WPILib/networktables2/AbstractNetworkTableEntryStore.cpp
C++
cpp
6,335
no_license
/* * AbstractNetworkTableEntryStore.cpp * * Created on: Sep 16, 2012 * Author: Mitchell Wills */ #include "networktables2/AbstractNetworkTableEntryStore.h" #include "networktables2/TableKeyExistsWithDifferentTypeException.h" #include <map> #include <vector> #include <iostream> #include <stdio.h>...
bc60d6142ae837f878c4fb3a1d1516cdeb76e228
afa8c61c359965ea75ed448d04fba8bfc31c9fef
Jeonghwan-Yoo/brain_STL
/06_시퀀스컨테이너/6_31.cpp
C++
cpp
492
no_license
#include <iostream> #include <deque> using namespace std; int main() { deque<int> dq; for (int i = 0;i < 10;i++) { dq.push_back((i + 1) * 10); } deque<int>::iterator iter; deque<int>::iterator iter2; for (iter = dq.begin();iter != dq.end();++iter) { cout << *iter << ' '; } cout << endl; iter = dq.begin...
34f0128d27eec50fb7c9601aeb3a177e98c841d0
f88ca5bfdbbe3a3f5a31cb18b91c79670c000bfd
aejsmith/kiwi
/source/services/terminal_service/terminal.cpp
C++
cpp
29,783
permissive
/* * Copyright (C) 2009-2023 Alex Smith * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DIS...
1b56960e662c980143935a386a9404d0b1b00b46
23da5b92f2fb5ee4768044028e341dc202f41456
yuhuazou/visionworkbench
/src/vw/FileIO/DiskImageResourcePNG.cc
C++
cc
23,034
permissive
// __BEGIN_LICENSE__ // Copyright (C) 2006-2011 United States Government as represented by // the Administrator of the National Aeronautics and Space Administration. // All Rights Reserved. // __END_LICENSE__ /// \file DiskImageResourcePNG.cc /// /// Provides support for the PNG file format. /// /// FIXME Currently w...
63e044d9f5692c4ae5fcb2677a49dd809b5c30b2
1914d42687f026d36cd6ad90df6a439301c24851
chongin12/Problem_Solving
/acmicpc.net/1292.cpp
C++
cpp
300
no_license
#include <bits/stdc++.h> using namespace std; int sum[10001]; int main(){ int k=2; sum[1]=1; for(int i=2; i<1001; ){ for(int j=0; j<k; ++j){ sum[i]=sum[i-1]+k; ++i; } ++k; } int a,b; cin>>a>>b; cout << sum[b]-sum[a-1] << '\n'; }
7d34a5c998746435437d1c59c1cae4ce1b27cd54
ae1a1b643bba6a3b198aa18d2298030208d154e9
ecalvovi/AliRoot
/EMCAL/EMCALsim/AliEMCALTriggerSTU.cxx
C++
cxx
8,412
no_license
/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors ...
ff50fd2702be265de425610eeb7027934bdb5e0c
b4246b6a4f680fbf6dc5f19d202843b67e3c97c0
UnnamedOrange/OI
/Problems/GCD/source/std/gcd1.cpp
C++
cpp
1,698
no_license
#include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <string> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <list> typedef long long INT; using std::cin; using std::cout;...
59505c119a564ba1453be12136e0cb2cd7d552ea
0c1392557a09f0bf1fc811b03c7ba4858718b68d
bhsphd/cpplects-beamer
/codes/chap07/CB-Projector-Codes/testSTLAlgSetIntersection/main.cpp
C++
cpp
692
no_license
//求两个集合的交集,演示c++中set_intersection函数的使用 // set_intersection example #include <iostream> #include <algorithm> #include <vector> using namespace std; int main () { int first[] = {5, 10, 15, 20, 25}; int second[] = {50, 40, 30, 20, 10}; vector<int> v(10); // 0 0 0 0 0 0 0 0 0...
187d3fd5aa9931a9d6430f33c7f43ff86c98eddb
12145351f01cc0727eb9980045088e4774fac7bb
JackBro/kernel
/system/src/system_pmm.cpp
C++
cpp
11,098
no_license
#include "../include/system_pmm.hpp" #include <Hybros/StdHelper> #include <Hybros/System> #include <Hybros/BitOperations> // ~ HSystem::PhysicalMemoryManager HSystem::PhysicalMemoryManager::PhysicalMemoryManager(multiboot::multiboot_info* multiboot_info, size_t memory_size) : pmm_max_blocks((memory_size * 1000) ...
3142303b6e26693773f3bb6c0cb80dc1c2c7cacd
05365a8d0524791aa763bef74527e1b143886d63
ShinNoNoir/gdal-1.11.5-vs2015
/gdal/ogr/ogrsf_frmts/sqlite/ogrsqliteselectlayer.cpp
C++
cpp
21,994
permissive
/****************************************************************************** * $Id$ * * Project: OpenGIS Simple Features Reference Implementation * Purpose: Implements OGRSQLiteSelectLayer class, layer access to the results * of a SELECT statement executed via ExecuteSQL(). * Author: Frank Warmer...
627abea8589352a657bc1f4c7e5ba269d1259d7e
eb4c6c64cbffb172990d618ddbab12ba4ed6d6b1
ParkHanbum/dex2ir
/frameworks/compile/mclinker/lib/Target/X86/X86LDBackend.cpp
C++
cpp
22,753
permissive
//===- X86LDBackend.cpp ---------------------------------------------------===// // // The MCLinker Project // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------------------...