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
47a84c7e7317fa2303f41def4c82afb623444292
9e912148002d8dd6e6a72f2b8fd2aa077d179f0f
svn2github/open64
/tags/open64-0.15/osprey1.0/be/com/be_config_targ.cxx
C++
cxx
2,762
no_license
/* Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it would...
5ef7284d317f9e503b4e97a60efb5a46e0f41293
9c5cb5ec556a719615519e519f1a19b1b64b3bf0
andongfan/oicode
/3063.cpp
C++
cpp
868
no_license
#include<iostream> #include<iomanip> #include<cstring> #include<algorithm> #include<cstdio> using namespace std; typedef long long ll; struct node{ll loc,vel;}car[300005]; ll n,tmp[300005]={0},tot=0; bool cmp(const node &a,const node &b) {return a.loc<b.loc;} void MS(ll op,ll ed) { if(op==ed) return; ll...
f0f884f10d687f287408fac3ca2590fca6354d45
6f099e3c8d2c528a9a9ec57ee4db6eda5e417489
zaourzag/chromium
/chrome/browser/chromeos/web_applications/chrome_media_app_ui_delegate.cc
C++
cc
2,403
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 "chrome/browser/chromeos/web_applications/chrome_media_app_ui_delegate.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/p...
9dcfff77a5efebd35ce4e72bad8690ff868f7fc4
0c28670864c762a4234d0af6fe11595c763c22a9
qt/qtwebengine
/src/pdf/qpdflink.cpp
C++
cpp
4,879
permissive
// Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qpdflink.h" #include "qpdflink_p.h" #include "qpdflinkmodel_p.h" #include <QGuiApplication> #include <QDebug> QT_BEGIN_NAMESPACE /*! \class QPdfLink \since...
de26a03adacfecbc92b781f2e1148e221ae09cc4
59c50be1ec498bd15a880190bc20032a00e0e5ec
nayuta1019/AtCoder
/ABC/ABC151-160/ABC156/B/B.cpp
C++
cpp
1,493
no_license
/* ABC156 2020/02/22/ 自力AC */ #include <bits/stdc++.h> using namespace std; // repetition #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define rep(i, n) for (int i = 0; i < (int)(n); i++) // container util #define all(x) (x).begin(), (x).end() // typedef typedef long long llint; typedef uns...
df6eca2f1df11ee8e01bfc4dfdfa3c5937ceb56f
beb5e827bd4e8900d70f348437defc3d65d1407e
Almahmudrony/BattleOfBritain
/SRC/MFC/NOTES.CPP
C++
cpp
4,061
no_license
/* Battle of Britain Copyright (C) 2000, 2001 Empire Interactive (Europe) Ltd, 677 High Road, North Finchley, London N12 0DA Please see the document licence.doc for the full licence agreement 2. LICENCE 2.1 Subject to the provisions of this Agreement we now grant to you the following rights in respect...
5960cb4e3c587fa04b641c99eabbf9d0ccddbce1
504a6837a1a17ef51230a63ab68bcc954b818258
pvchupin/llvm
/llvm/lib/ObjectYAML/ELFYAML.cpp
C++
cpp
63,795
permissive
//===- ELFYAML.cpp - ELF YAMLIO implementation ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
60d319c51de7cefc97410757ede54868e5e00a65
0052dc486803230714b60886c3716050bfe2b68b
Jiongyu/goldpaint
/ELMO_CPP/MMCPP/rapidxml_print.hpp
C++
hpp
17,552
permissive
#ifndef RAPIDXML_PRINT_HPP_INCLUDED #define RAPIDXML_PRINT_HPP_INCLUDED // Copyright (C) 2006, 2009 Marcin Kalicinski // Version 1.13 // Revision $DateTime: 2009/05/13 01:46:17 $ //! \file rapidxml_print.hpp This file contains rapidxml printer implementation #include "rapidxml.hpp" // Only include streams ...
d35e046e591a6109debef29fa789fb836600214a
97266695ae398278bc0190d55eaebfb148dd0186
guillaumerm/king-of-new-york
/king-of-new-york/GameCard.cpp
C++
cpp
908
no_license
#include "GameCard.h" using namespace std; int const DEFAULT_GAME_CARD_COST = 0; GameCard::GameCard() :Card() { this->setCost(DEFAULT_GAME_CARD_COST); }; GameCard::GameCard(string name, string description) : GameCard(name, description, DEFAULT_GAME_CARD_COST) {}; GameCard::GameCard(string name, string description...
cd332a6a2286ec89eeb8cca6065d36c3e3d6b8da
03e4d475373b957eb6e5b53bd73f148f1e0e455f
rikuTanide/atcoder_endeavor
/iroha2019-day1/iroha2019_day1_b.cpp
C++
cpp
1,404
no_license
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //namespace mp = boost::multiprecision; using namespace std; const double PI = 3.14159265358979323846; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) //#define rep(i, n) for (ll i = 0; i < (n); ++i) ...
00d5585ddb01b6240859a5b7d96f593a04b7d0d0
1e2273bae02248c579ee605e5eb7079b4f58ee91
edisontung/mesos
/src/local/local.cpp
C++
cpp
4,533
permissive
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
a37e9465187fe06d67e524bb5d9c36754e06bb4a
4cf2a87c90b502aac41ce7974f5eb75bd564013d
moon6pence/DailyCode
/PouringWater/PouringWater.cpp
C++
cpp
2,323
no_license
#include <iostream> #include <vector> #include <set> #include <queue> #include <map> using namespace std; // bfs recursion void run(); void pull_water(vector<int>& a, int from, int to); void read_vector(vector<int>& v, int k); void print_vector(vector<int>& v); int k; vector<int> capacity; vector<int> initial_amoun...
c40b13f8ace29d1a0491a2d4a42784c65ded6ffd
f8cab7833c9db8b43782565d02cae6262df5b84e
batur1349/Batupan_OpenGL_3D
/Batupan_OpenGL_3D/Skybox/SkyboxShader.hpp
C++
hpp
903
no_license
#ifndef SKYBOXSHADER_HPP #define SKYBOXSHADER_HPP #include "../Toolbox/Maths.hpp" #include "../Shader/ShaderProgram.hpp" #include "../Entity/Camera.hpp" static const std::string SKYBOX_SHADER_FILE = "Skybox/skyboxShader"; static const float ROTATE_SPEED = 0.2f; class SkyboxShader : public ShaderProgram { public: // ...
0991cfaabfcc7eb6df022553f50f87bb29a5a2d9
e380033403517f2dd29eb08a537a1996a19f75fe
mcopik/llvm-project
/compiler-rt/test/dfsan/control_flow_tests/test_foo_7.cpp
C++
cpp
1,426
permissive
// RUN: %clang_dfsan -mllvm -dfsan-cfsan-enable %s -o %t && %run %t #include <assert.h> #include <sanitizer/dfsan_interface.h> #include <stdio.h> int foo(int a) { int x = 0; if(a) { x = 5; } else { x = 3; } int sum = 0; int i = 0; while (i < x) { sum += i; i++; } assert(dfsan_has_label(dfsan_get_l...
9195fd16c0a06c43ecc1519b103945470c9e4f10
82c1e0366c0a957e0be466f106a04a4390caa8dc
dimatwl/InterfacesHW
/Lesson5/Lesson5/main.cpp
C++
cpp
245
no_license
#include <QApplication> #include <ball.h> #include <window.h> #include <QGraphicsScene> #include <QGraphicsView> int main(int argc, char *argv[]) { QApplication a(argc, argv); Game window; window.show(); return a.exec(); }
a0761367ed12fb646d64bf38f8d1aac07a1ed607
56575752d612f8a40cf35a8599994967d0c7cf76
Nuos/SearchEngine
/InformationRetrievalAssignment/src/InvertedIndex.cpp
C++
cpp
8,821
no_license
#include "InvertedIndex.h" #include <iostream> #include <thread> #include <fstream> #include <string> #include <sstream> #include <algorithm> #include <iterator> #include <vector> #include <mutex> #include <math.h> using namespace std; mutex InvertedIndex::printMutex; mutex InvertedIndex::atoiMutex; InvertedInde...
91cf2ee4de9b72ef727c9532ae3400814705468f
d40d56b24af9f92b097e8032695202be2e1e6e39
mapsme/omim
/drape/vulkan/vulkan_gpu_buffer_impl.hpp
C++
hpp
3,406
permissive
#pragma once #include "drape/data_buffer.hpp" #include "drape/data_buffer_impl.hpp" #include "drape/pointers.hpp" #include "drape/vulkan/vulkan_base_context.hpp" #include "drape/vulkan/vulkan_object_manager.hpp" #include "base/assert.hpp" #include <vulkan_wrapper.h> #include <vulkan/vulkan.h> #include <cstdint> #in...
4d8b0ce874a65e076ded3ce9691bcef2e1a700fe
f48062cdd72f44be5dafe70e172794c7c3e2d6ea
cwza/codeforces
/334A.cpp
C++
cpp
522
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; /* 4 1 16 2 15 3 14 4 13 5 12 6 11 7 10 8 9 6 1 36 2 35 3 34 4 33 5 32 6 31 7 30 8 29 9 28 10 27 11 26 12 25 13 24 14 23 15 22 16 21 17 20 18 19 */ int n; int main() { ios::sync_with_stdio(0); cin.tie(0); // freopen("input.tx...
32d22ae0fa6beee9c7ccef67c7ad66ca833c7d07
53085e2a1755ca092c3aa62a47261b80dbf589d8
rishabsehra/cilantro
/examples/space_region_3d_example.cpp
C++
cpp
3,618
permissive
#include <cilantro/space_region.hpp> #include <cilantro/io.hpp> #include <cilantro/visualizer.hpp> void callback(cilantro::Visualizer &viz, int key) { if (key == 'a') { viz.toggleVisibilityStatus("hull1"); } else if (key == 's') { viz.toggleVisibilityStatus("hull2"); } } int main(int argc,...
49d50d3427a4649a2ee705efec604763d526286d
a416e18f32799d21caf82e8882b6b902be1c4fce
VikasKumarRoy/Leetcode
/Problem-1337.cpp
C++
cpp
1,059
no_license
// Problem - 1337 // https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/ // O(n*m + n*logk) time complexity and O(k) space complexity solution class Solution { public: vector<int> kWeakestRows(vector<vector<int>>& mat, int k) { vector <int> ans; priority_queue <pair<int, int>> pq; ...
bd275eb465242d20fcadef0f56444cf61f511ada
f80820a1690e0b375bbe671173b26492135d7686
ANUPPRAMANIK/CS-ASSIGNMENT-3
/Lab3_question10.cpp
C++
cpp
255
no_license
#include<iostream> using namespace std; main() { char a; cout<<" enter a character "; cin>>a; if(a>=65 && a<=90) cout<<" the character is uppercase alphabet "; else cout<<" the character is a lowercase alphabet "; }
83e8044e04906b323944c0536189233ed3e4e215
2c82b3f27778e3a9e4b20799ed303a9816114c48
zongxinqi/Code
/C-C++/acm/Divide by three, multiply by two.cpp
C++
cpp
406
no_license
#include<bits/stdc++.h> using namespace std; typedef long long LL; struct node{ LL a,b; }A[110]; int cmp(node m,node n){ if(m.b == n.b) return m.a < n.a; else return m.b > n.b; } int main() { int n;cin>>n; for(int i = 1;i <= n;i++){ cin>>A[i].a; LL k = A[i].a; while(k % 3 == 0&&k){ A[i].b++; k /= 3; ...
de958f7d3db045e05492b65e0ab6223b340af324
0968814ea269220e519d4c806698d0d67555301a
zhzhzoo/apertus-test
/main.cpp
C++
cpp
2,228
no_license
#include <stdio.h> #define LODEPNG_NO_COMPILE_CPP #include "lodepng.h" unsigned char buf_r[1536][2048], buf_g1[1536][2048], buf_g2[1536][2048], buf_b[1536][2048], buf_rgb24[1536][2048][3]; int main() { unsigned char buffer[2048 * 3]; FILE *fp = fopen("portrait-gainx2-offset2047-20ms-02.raw12", "rb"); int ...
d709a1be717e039d6e775639eb3d51c6c5312051
ec5e16c7787410be4f879cf22b86ac17ae41dd30
davidwowa/robot3
/src/drive/drive.cpp
C++
cpp
3,435
no_license
/* * drive.cpp * * Created on: 17.03.2017 * Author: Wladimir David Zakrevskyy */ #include <iostream> #include "../../lib/WiringPi/wiringPi/wiringPi.h" #include "../../lib/WiringPi/wiringPi/softPwm.h" #include "drive.h" #include "gpio_drive.h" using namespace std; void init_drive(void) { init_drive_wiri...
461224cd1f28bafc2ce55446d6e37a822e61e76e
566355d49736f70f3baee165bcf845414da56a15
progician/llvm-project
/lldb/source/Utility/FileCollector.cpp
C++
cpp
5,157
permissive
//===-- FileCollector.cpp ---------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
81d16800acf2295a853f130d6aa8f3ca1f532fb1
943300f5bab8375ca0e4a7307618dd45c2a50429
mpsparrow/Quark
/Quark/src/Platform/Vulkan/VulkanContext.hpp
C++
hpp
2,632
permissive
#pragma once #include "Quark/Photon/Context.hpp" #include <map> #include <vulkan/vulkan.h> struct GLFWwindow; namespace Quark { namespace Photon { /** * @brief Abstraction of a Vulkan rendering context */ class QUARK_API VulkanContext : public Context { struct QueueFamilyIndices { std::optio...
abe1f3be54220c427155f286fd1652c46874d6c9
f705c7e042423d62d896945301ad4b46c39c4f82
BreakEngine/Break-0.1
/Physics/inc/EdgeCircleContact.hpp
C++
hpp
566
no_license
#pragma once #include "Contact2D.hpp" namespace Break { namespace Physics { class BREAK_API BlockAllocator; class BREAK_API EdgeAndCircleContact : public Contact { public: static Contact* Create( Fixture* fixtureA, s32 indexA,Fixture* fixtureB, s32 indexB, BlockAllocator* allocator); static void De...
e45e6822a1ee06f7e584ee07596b8474f67a9671
2250db22fb73ae35072608dc303c51e24d304708
OIC-Shinchaemin/RatchetNclank-PrivateCopy
/ClientProject/Mof/RatchetNClankCopy/StageTest/TestApp.cpp
C++
cpp
1,541
permissive
#include "TestApp.h" MofBool test::CGameApp::Initialize(void) { ::CUtilities::SetCurrentDirectory("Resource"); bool success = _stage.Load("../Resource/stage/stage.json"); _stage.Initialize(); // カメラ初期化 _camera.SetViewPort(); _camera.PerspectiveFov(MOF_ToRadian(60.0f), 1024.0f / 768.0f, 0.01f,...
b5876199346e5f48176dc1b0f663de064dbfb804
d26f0bb8815dac99e609db26be82628a4be84156
hugbed/OOPCV
/OPCViewer/src/PointCloudSubscriber.cpp
C++
cpp
1,206
no_license
#include "PointCloudSubscriber.h" #include <ctime> PointCloudSubscriber::PointCloudSubscriber(char* rosMasterIP) : m_rosMasterIP(rosMasterIP) , subscriberThread(&PointCloudSubscriber::run, this) , nbPoints(0) { } void PointCloudSubscriber::callback(const pcl_to_windows::PCLXYZRGB &msg) { std::clock_t c_start = s...
04d0a54c5c5b4f03fa8348f474711b9eabf89f1b
3178979cec58457a4657bb374b618ed41cec3f41
SunshineXz/BattleTest
/BattleTest/Battle.cpp
C++
cpp
18,017
no_license
#include "Battle.h" #include <iostream> #include <vector> using namespace std; /***************/ /*Constructeurs*/ /***************/ Battle::Battle(Pokemon * pp1, Pokemon * pp2, Pokemon * pp3, Pokemon * ap1, Pokemon * ap2, Pokemon * ap3) { PlayerPokemon1 = pp1; PlayerPokemon2 = pp2; PlayerPokemon3 = pp3; AIPokemo...
4e08f5c3e0b5806e61468da9328bc46dead003b7
00497c9ee3c71afba295d67ce6d08e6f2e7754a4
Maxim-Doronin/AVL-Tree
/src/binary-search-trees.cpp
C++
cpp
3,909
no_license
#include "binary-search-trees.h" BinarySearchTree::BinarySearchTree() { root = 0; } BinarySearchTree::~BinarySearchTree() { recursiveDel(root); } Node* BinarySearchTree::searchMin(Node* const node) const { Node* currentNode; if (node == 0) currentNode = root; else currentNode = no...
1d78db95bf8641c2bbb60af153a2b18acccf9a06
4363f12d8e66c9359401de7bf5bcc11a90a5225c
AnastasiaShade/OOD
/lw2/Test/stdafx.cpp
C++
cpp
706
no_license
// stdafx.cpp: исходный файл, содержащий только стандартные включаемые модули // RationalTests.pch будет предкомпилированным заголовком // stdafx.obj будет содержать предварительно откомпилированные сведения о типе #include "stdafx.h" // TODO: Установите ссылки на любые требующиеся дополнительные заголовки в файле ST...
80591732dc4cdea4ce48348809a03174945e2be7
28d9ee4fbc9d1ee091aca970a9306d0e2917d751
kaiulrich/kulrich-CarND-PID-Control-Project
/src/main.cpp
C++
cpp
4,249
no_license
#include <uWS/uWS.h> #include <iostream> #include "json.hpp" #include "PID.h" #include <math.h> // for convenience using json = nlohmann::json; // For converting back and forth between radians and degrees. constexpr double pi() { return M_PI; } double deg2rad(double x) { return x * pi() / 180; } double rad2deg(double...
236817fb48307d52e19497fe60097c58f97700f3
a91457160287f1d69b4a8841a47a2576d996aa7a
luatil/cppractice
/contests/codeforces/template.cpp
C++
cpp
356
no_license
#include <bits/stdc++.h> // see /general/running-code-locally using namespace std; using ll = long long; using vi = vector<int>; #define pb push_back #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() using pi = pair<int,int>; #define f first #define s second #define mp make_pair const ll inf = numeric_lim...
e2c5e59859d6a68d3b99cb151231d40989fa36f7
0e7041b27ee64a46c4388601df62387fa11bd2bc
GUAN-XINGQUAN/LeetCode
/Array/724. Find Pivot Index.cpp
C++
cpp
1,048
no_license
class Solution { public: int pivotIndex(vector<int>& nums) { // no edge case because nums is guaranteed to be nonempty array // get the total of the entire array int total = 0; for (int i = 0; i <nums.size(); i++) total += nums[i]; // move the candidate index ...
88124f8ff15d00abf9c0426b6216056c729de506
11b2bbca8d82004b3d5228085600d581ca1d23b7
brainerazer/DigSig
/src/misty.cpp
C++
cpp
3,135
no_license
// // Created by Bohdan Rybak on 21.03.2016. // #include <iostream> #include "misty.h" #include "bitwise.h" namespace { const byte_t _s_table[256] = {0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x...
aba191076fdaf0d829536908a78b57ae0e32be2e
efc250c2acb7f6d3ef0f23a76c4419ca32bcf12a
Jwcob/BA21_MODULE_TESTS
/Test4_Code/Header_Code_Dependencies/Header/h4_d14.hpp
C++
hpp
5,203
no_license
#ifndef H4D14_H #define H4D14_H namespace h4d14_ns { int return0(); int return1(); int return2(); int return3(); int return4(); int return5(); int return6(); int return7(); int return8(); int return9(); int return10(); int return11(); int return12(); int return13...
8418e00eafac1309087534b48adab9dda4f96c6d
4795e002cd08af89b700bad9c05a9cdd22f48beb
selmentdev/graphyte-engine
/engine/runtime/libs/base/private/GxBase/Diagnostics/Impl.UWP/UWP.Abort.cxx
C++
cxx
437
no_license
#include <GxBase/Diagnostics.hxx> #include <GxBase/System/Impl.Windows/Windows.Helpers.hxx> #include <GxBase/System.hxx> #include "../Diagnostics.Impl.hxx" namespace Graphyte::Diagnostics::Impl { bool ReportAbort( std::string_view title, std::string_view content, std::string_view stacktrac...
53b0050b657161ecb7c48e142d19e1fa916c9fd3
62af1e5111fe7077a6e08ccc76cbf973962df2f3
monkeyboy123/ray
/src/ray/raylet/node_manager.cc
C++
cc
100,871
permissive
// Copyright 2017 The Ray Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
1d7daa62cfabd66e13dcf5c8ecc696eceea412b6
89e4ff927142581c16c267409077d9aedbef0403
Igalia/chromium
/chrome/browser/performance_manager/decorators/page_almost_idle_decorator.cc
C++
cc
8,250
permissive
// Copyright 2019 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/performance_manager/decorators/page_almost_idle_decorator.h" #include <algorithm> #include "chrome/browser/performance_manager/...
b1c8b9144e93124481280f7491f6a3432d89388b
3559484617d018a34bdbab58d7a343d102f72381
chryan/chewable
/src/cbl/Core/Object.cpp
C++
cpp
1,598
no_license
/* This source file is part of the Chewable Framework. * For the latest info, please visit http://chewable.googlecode.com/ * * Copyright (c) 2009-2012 Ryan Chew * * 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...
2fa6b46e719f7ea477122b875cdebc99756fc4d8
f9098b53bb5ee68978a0dfed882435b52aaff73f
anshbargoti/ProblemSolving
/codeforces/1467/A.cpp
C++
cpp
789
no_license
#include<bits/stdc++.h> using namespace std; #define end "\n" //#define int long long //const int MOD = 1000000007; void striker() { int n; cin >> n; for (int i = 0; i < n; i++) { if (i == 0) cout << 9; else cout << (7 + i) % 10; } } int32_t main(){ ...
8ea85dfe8efa1a2c0a5353cf2d0ad9d47365cc04
464d7c1af855dc679a890a2995b533f2612692fc
kyamashiro/atcoder
/agc037/agc037_f/main.cpp
C++
cpp
840
no_license
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; (i) < (int)(n); ++ (i)) #define REP3(i, m, n) for (int i = (m); (i) < (int)(n); ++ (i)) #define REP_R(i, n) for (int i = (int)(n) - 1; (i) >= 0; -- (i)) #define REP3R(i, m, n) for (int i = (int)(n) - 1; (i) >= (int)(m); -- (i)) #define ALL(x) ::std::begin(x), :...
cd7bcf40c3aad730631851517c127537b2596685
fa1344ad05ab459a6a4f135d8852f52921f82e4e
Rapira16/JULY-HW4
/HW4.2.cpp
C++
cpp
373
no_license
#include <iostream> #include <vector> using namespace std; int main() { int num = 0; int sum = 0; vector<int> array {0, 1, 1, 2, 3, 3}; for(int i = 0; i < 6; i++) { for(int j = i++; j < 6; j++) { if (array[i] != array[j]) { num ++; } if ...
f0cde4c2de30aad29ff5e9d4b0585cb2a3c4c242
c36b364068b9ca7fe30db67911432343b8b58576
mcvine/mantid
/Framework/SINQ/src/PoldiPeakSearch.cpp
C++
cpp
24,866
no_license
#include "MantidSINQ/PoldiPeakSearch.h" #include "MantidAPI/Axis.h" #include "MantidAPI/WorkspaceProperty.h" #include "MantidAPI/WorkspaceFactory.h" #include "MantidKernel/BoundedValidator.h" #include "MantidKernel/UnitFactory.h" #include "MantidKernel/UnitConversion.h" #include "MantidKernel/V2D.h" #include "MantidD...
7cb68b6f3843465ec8df50310df725ade77b5756
e20f2772ae2e55f8dc0dff423767fdcd308a7866
PubFork/KTL
/src/big_int/BigInt.hpp
C++
hpp
17,233
permissive
/*============================================================================= Copyright (c) 2010-2015 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/KTL 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) =====...
a05416c0a200e7b2f1b67c4cab37a504a4365c79
d2584ad53ad9f2a56c523f70f60897ff647ef53b
o-xygen/MiniMC
/MiniMC/UILogic.cpp
C++
cpp
787
no_license
void Application::_mouse(int button, int state, int x, int y) { if (button == GLUT_LEFT_BUTTON) { switch (state) { case GLUT_DOWN: { int ret = menu->changepress(x, y); if (ret == 0) { pp = !pp; //function } else if (ret == 1) { exit(0); //function } b...
567d6c5cdb5798e0d4cdcf63629402fce646ccf4
9583bbe5e342f939b8ead4c5dbd1dec8870ac324
simonpcook/llvm-or1k
/lib/Analysis/AliasAnalysis.cpp
C++
cpp
20,016
permissive
//===- AliasAnalysis.cpp - Generic Alias Analysis Interface Implementation -==// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
e5ce499cdedc314bbba6ad9c810d77bf19256967
dc2e5ecdd2fe9b0a37dcfd6b70b771291130da69
omn14/scicoin
/src/qt/test/uritests.cpp
C++
cpp
2,945
permissive
// Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "uritests.h" #include "guiutil.h" #include "walletmodel.h" #include <QUrl> void URITests::uriTests() { SendCo...
468e384090a95a24e7eb04138005cf0dc504f3bc
6c668f5a895386fafb0cb254a844e9a04439234a
whztt07/cocos2dx-IntegrationDemo
/cocos2d-x/Classes/SceneMain.cpp
C++
cpp
13,108
permissive
#include "SceneMain.h" #include "Platform.h" #include <AK/Tools/Common/AkPlatformFuncs.h> #include "SceneDialogueMenu.h" #include "SceneRTPCCarEngine.h" #include "SceneFootsteps.h" #include "SceneMarkers.h" #include "SceneMusicCallbacks.h" #include "SceneInteractiveMusic.h" #include "WwiseWrapper.h" #if defined INTEGRA...
4abbad687df7b7480d72071dce7b5b449db37bfd
2b7d427474979af7ddf2adb475369fac769a16ec
Christasen/ArtRender
/artrender_app.cc
C++
cc
9,792
no_license
/** CSci-4611 Art Render Guangyu Yan */ #include "artrender_app.h" #include "config.h" #include <iostream> #include <sstream> using namespace std; ArtRenderApp::ArtRenderApp() : GraphicsApp(1024,768, "Art Render"), shader_style_(0), current_model_(0), light_pos_(3,3,3), diffuse_ramp_(GL_CLAMP_TO_EDGE), ...
3d68f6434a5162b3a0bd0000f5583d172bde6611
641d322e6b14d5975bd0d3a1c34980098782fff6
libov/zeus
/other/old_scripts/scripts/MC_true_zarah/K0s_analysis_part1+true_116.cxx
C++
cxx
18,423
no_license
////////////////////////////////////////////////// ////////////// K0s analysis ///////////////// ////////////// with V0lite ///////////////// ////////////// (part1) ///////////////// ////////////////////////////////////////////////// // // // ...
b7ce71626da522b19cc40c84a98f1ceed3770fce
66659a37563cae72b09f2d58f8cc87cd5b5c0532
apkriege/c-plus-plus-work
/hw5-stack-queue-dbllinkedlist/Stack.cpp
C++
cpp
2,103
no_license
#include <iostream> #include <cstring> #include <fstream> #include <string> using namespace std; class Stack { public: int top = 0; int s[30]; Stack(){} /* Precondition: arr is char array read in from file Postcondition: loops through elements and pushes the value t...
4d31fa5a15fe384eced213b0e9b16f72d700647c
af298183ce4ff275e95229bf3854b99cf98894ff
Monotrea/competitive-programming-public
/AtCoder/ABC023/d.cpp
C++
cpp
994
no_license
#include <iostream> #include <algorithm> using namespace std; bool check(long* h, long* s, long x, int N) { long t[N]; for (int i = 0; i < N; i++) { if (x < h[i]) return false; t[i] = (x - h[i]) / s[i]; } sort(t, t + N); for (int i = 0; i < N; i++) { if (t[i] < i) r...
d56107e0fb24f9cb780e3bb4e84ff5924d999c9d
f5c193d5cfccab9ecd935846f0b42c2a9a65e017
samuelshao/chromium
/net/socket/socks_connect_job.cc
C++
cc
5,668
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 "net/socket/socks_connect_job.h" #include "base/bind.h" #include "net/base/host_port_pair.h" #include "net/base/net_errors.h" #include "net/...
e41dfac0229276b3d718a189856e4b090f9f4cd9
b0b3c96b87566a12501e6513c3348f43f6348f27
zester/Mezzanine
/Mezzanine/libincludes/common/ogresrc/ogresvnsrc/Components/Terrain/src/OgreTerrain.cpp
C++
cpp
145,614
permissive
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2013 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person obta...
7a507ddd3635a6b567c70148af4b3521e12890db
49394fd52983c20d46aeeb7dbcf4869349e24c12
i-saint/SmallFBX
/src/SmallFBX/sfbxObject.cpp
C++
cpp
6,750
permissive
#include "pch.h" #include "sfbxInternal.h" #include "sfbxObject.h" #include "sfbxDocument.h" namespace sfbx { ObjectClass GetObjectClass(string_view n) { if (n.empty()) { return ObjectClass::Unknown; } #define Case(T) else if (n == sfbxS_##T) { return ObjectClass::T; } sfbxEachObjectClass(Case) #u...
52c4c69eb466609531d233c9c3731ddad62f907c
2b59091495d8be9e1b206792c592c544e156ae0e
icecocoa6/abc
/bs/3.cpp
C++
cpp
200
no_license
#include <iostream> int main(int argc, char *argv[]) { char c; int cnt = 0; for (int i = 0; i < 3; i++) { std::cin >> c; if (c == '1') cnt++; } std::cout << cnt << std::endl; return 0; }
ee693bf797612de0aa82de5d71d790693a0bab06
2c6dc482f1d7c3459bed75c7b4f0905e6a51d1f6
andyro2/MAMAT5
/MAMAT5/main.cpp
C++
cpp
3,728
no_license
#include <iostream> #include <cstdlib> #include <cstring> #include <string> #include <stdexcept> #include "func.h" #include "polynom.h" #include "ratfunc.h" #include "compfunc.h" using namespace std; const int MAXLINE = 256; int main() { map<string, func*> func_list; char func_cmd[MAXLINE], func_name[MAXLINE], ...
225dcfb409fae6f6bcadb55cbb532beb44fa933f
14e514ec9fa456c69efd46dffc4f33cc5ca94509
kunalvasudevan/leaf
/test/ctx_remote_handle_some_test.cpp
C++
cpp
1,040
permissive
// Copyright (c) 2018-2020 Emil Dotchevski and Reverge Studios, Inc. // 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) #include <boost/leaf/context.hpp> #include <boost/leaf/handle_errors.hpp> #include <boost/leaf/r...
4a783ebdddb6e61a0b423adbcff76e1cb6ea7eea
cc296e1e1f04ec79522a6140fd67fe1a92bc79af
CryptoCashBack-Hub/CCBC
/src/rpcmining.cpp
C++
cpp
32,886
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 The PIVX developers // Copyright (c) 2018-2019 The CCBC developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or...
12e9c61d99175581b7e9c24b2f197130cf8691e8
0e8133167b95f97e67cfc19cda0c47b771c9c0ec
dvphuonguyen/IT001.K16
/wecode/Buoi02/vietchuongtrinhtinhtongs voinlasonguyenkhongam.cpp
C++
cpp
430
no_license
// tinh s=1+1/2+...1/n n la so nguyen khong am #include <bits/stdc++.h> using namespace std; int main() { int n,i; float s=1; do{ cin>>n; } while(n<0); if(n==0) cout<<"S(0) = 0"; else if( n==1) cout<<"S(1) = 1"; else { cout<<"S("<<i<<") = 1 +"; for(i=2;i<=n;i++) { s=s+(float)(1)/i...
c01c1f313f2fe4932d463abaaf07c916c16bb885
c9e117c1d920a90baa1c99aef2c13de68a165d49
krocki/plot
/displacement2.cpp
C++
cpp
9,654
no_license
/* * @Author: Kamil Rocki * @Date: 2017-02-28 11:25:34 * @Last Modified by: Kamil Rocki * @Last Modified time: 2017-03-02 10:24:52 */ #include <iostream> #include <vector> #include <algorithm> #include <cstdarg> #include <cstdio> #include <nanogui/screen.h> #include <nanogui/window.h> #include <nanogui/layout.h> ...
864d4daf37321195de300b65f75deb913866e6c1
3256b9b61006d2a6783442d3bdedc24024ca1a12
smafjal/AcmNotebook
/Math_Function/Bigint(Forhad_vai).cpp
C++
cpp
6,844
no_license
#include <iostream> #include <string> #include <map> #include <queue> #include <stack> #include <algorithm> #include <list> #include <set> #include <cmath> #include <cstring> #include <stdio.h> #include <string.h> #include <sstream> #include <stdlib.h> #include <vector> using namespace std; #define ...
af485a10948b7c9352f7300b6ef0a09e20214f83
eaa928350667847454354df8067c83706ee95dea
IntelPython/optimizations_bench
/numpy/linalg/dot.cc
C++
cc
2,237
permissive
/* * Copyright (C) 2016, 2019 Intel Corporation * * SPDX-License-Identifier: MIT */ #include "dot.h" #include <cstring> #include <iostream> static const double a_mat_test[] = { 0.470442000675409, -0.176333746005435, 0.481736547564898, -0.291482508170914, 0.007410393215614, 0.805743972141035, -0.4418...
b9d877c470ea524cc0e1c461191b966b4d42347a
198eea0d570a9083e0d9bca00e103f623f4db885
yar-tal-de-we/CrimsonEditor
/FileWindowDirectory.cpp
C++
cpp
20,715
no_license
#include "stdafx.h" #include "cedtHeader.h" #include "SortStringArray.h" #include "FolderDialog.h" BOOL CFileWindow::InitLocalDriveList(LPCTSTR lpszInitialDriveName) { TCHAR szBuffer[1024]; TCHAR * pDrive = szBuffer; if( ! GetLogicalDriveStrings(sizeof(szBuffer), szBuffer) ) return FALSE; m_cmbLocalDrive.ResetCo...
b074e90cb3c493f3f7c3b4076dc5d11e8ba32067
395284ba2d11285106102bfd7c89e751925de174
Fmaj7-dev/qtrader
/gui/src/plotting/plottingwidget.cpp
C++
cpp
735
no_license
#include "plotting/plottingwidget.h" #include "plotting/configtree.h" #include "plotting/plotcontroller.h" #include <QSplitter> #include <QHBoxLayout> using namespace gui; using namespace gui::plotting; PlottingWidget::PlottingWidget( SeriesRepository& repo ) : repo_( repo ) { // plotcontroller PlotControlle...
c0fa80554f4759fa85dc6f2b33ea056df439e1a4
6274a39ed5f88fc337356d2bd821a1bd6bf25f44
HEXING19/Windows-Setup-EoP
/CVE-2020-1571-Bypass(0day)/source/bluebear/exploit.cpp
C++
cpp
14,292
no_license
#include "stdafx.h" #include "ReparsePoint.h" #include "FileOpLock.h" #include <iostream> #include <conio.h> #include <ctime> #include <wchar.h> #include <io.h> #include <string.h> #include <stdio.h> #include <random> #include <AclAPI.h> #include "ntimports.h" #include "CommonUtils.h" #include "resource.h...
160cd0d57d96aa039316436fc5e93a12ea792cfe
6bd55b9db338891cc49af05f5fdcdef879edd4c8
gboyraz/macchina.io
/platform/OSP/WebEvent/src/WebEventService.cpp
C++
cpp
837
permissive
// // WebEventService.cpp // // Library: OSP/WebEvent // Package: WebEvent // Module: WebEventService // // Copyright (c) 2013, Applied Informatics Software Engineering GmbH. // All rights reserved. // // SPDX-License-Identifier: Apache-2.0 // #include "Poco/OSP/WebEvent/WebEventService.h" namespace Poco { namespa...
aea926cd8ebf7596e1163ce1b5eb38317b72ef49
537669858dd4e080a6475ef31254f53e7b81edfb
danblade/C-Extended-Learning
/dynmem.cpp
C++
cpp
965
no_license
// dynmem.cpp : Defines the entry point for the console application. // //#include "stdafx.h" built with VS #include <stdio.h> #include <stdlib.h> int main() { printf("Hello, World! %d\n", sizeof(int)); int entriesSize = 1; int *entries = (int *) malloc(sizeof(int) * entriesSize); int count = 0; for (count =...
9efc0c96f79410ca96f45af5ea22d7ac46d07213
69a24f8b5e8206a10ef6123e2c1850f294fae259
sgraham/nope
/media/audio/win/audio_low_latency_input_win_unittest.cc
C++
cc
16,634
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 <windows.h> #include <mmsystem.h> #include "base/basictypes.h" #include "base/environment.h" #include "base/files/file_util.h" #include "bas...
c60de5203a24bae803790617399a727e6837aa13
7716f65ba14f20fa60ecbea276cfb302054c1359
novakale/openvino
/src/core/reference/include/ngraph/runtime/reference/round.hpp
C++
hpp
899
permissive
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include <cmath> namespace ngraph { namespace runtime { namespace reference { template <typename T> T round_to_nearest_even(const T arg) { const auto floor_arg = std::floor(arg); const auto diff = arg - floor_...
2ecf5e2254a5ca7bc398af307b65cb92826c1ab5
259228bbe08b09eacd78e666eb967cdc3825d219
BeautifulCodes/LeetCode
/Merge two Binary trees.cpp
C++
cpp
587
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { if((!t1) and (!t2))return NULL; ...
801c9e189b2526b1532695d35e6083b803b0aab5
4bae22db201d54a31d7bd668238aaf2cae518408
ThQ/memc
/src/mem/ast/node/PointerType.cpp
C++
cpp
1,018
permissive
#include "mem/ast/node/PointerType.hpp" namespace mem { namespace ast { namespace node { //============================================================================= // CONSTRUCTORS / DESTRUCTOR //----------------------------------------------------------------------------- PointerType::PointerType () { _nod...
7dbfbc5939f4cceb50f1a84e5f0f290d62463043
ad3602a58fe13b667ef681d90a779d2e3f3cbdb4
Baranzo94/Port-GP
/GP/Cerberus/GameObject.cpp
C++
cpp
3,299
no_license
#include "GameObject.h" #include "Component.h" #include "Transform.h" #include "Mesh.h" #include "Material.h" #include "Camera.h" #include "Light.h" GameObject::GameObject() { m_Transform = NULL; m_Mesh = NULL; m_Material = NULL; m_Camera = NULL; m_Light = NULL; m_Name = "GameObject"; m_Parent = NULL; } GameOb...
0adc51e6ff5e67d1ef9952a026bcd1f5ed322685
eb7186986cb3eadff94fa4d59a8c5cef2bc0c7db
biebipan/coding
/third_part/i18n/encoding_detector/nsUniversalDetector.cc
C++
cc
8,157
no_license
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
10f0e2f48a0f43323faefdffaed8293e79fdb354
6f2b906589cc6f1b3d3a6d0102696a8e493d3d0b
tisrico/node-windows
/sandbox.cc
C++
cc
1,444
no_license
#include "sandbox.h" Nan::Persistent<v8::Function> SandBox::constructor; SandBox::SandBox() { } SandBox::~SandBox() { } void SandBox::Init(v8::Local<v8::Object> exports) { Nan::HandleScope scope; // Prepare constructor template v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New); tpl->Set...
1334d023a8010050a2e5544908e3ae68038069b0
8daf4fbf8239915f7ecaf624a444411f6b50507e
v2v3v4/BigWorld-Engine-2.0.1
/src/lib/moo/visual_compound.cpp
C++
cpp
36,322
no_license
/****************************************************************************** BigWorld Technology Copyright BigWorld Pty, Ltd. All Rights Reserved. Commercial in confidence. WARNING: This computer program is protected by copyright law and international treaties. Unauthorized use, reproduction or distribution of thi...
8463764a8eb5d370c47fd78d58df35808476be36
4a1d914cb2c32769ca2654f315b08020776276e4
iamsadee/Online-Judge-Code
/UVA/10656 max sum II.cpp
C++
cpp
754
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n,i; while(scanf("%d",&n)==1) { if(n==0) break; int arr[1005]; vector<int> ans; for(i=0;i<n;i++) { scanf("%d",&arr[i]); if(arr[i]!=0) { ...
8523e1b44a22d41d8cbdee59fe8e7ea02d2ead38
c9555fa76768240e8bd19de9629283baf83b24c8
rohg007/mediasoup-client-android
/mediasoup-client/deps/webrtc/src/modules/rtp_rtcp/source/rtp_sender.cc
C++
cc
43,260
permissive
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
0649246bb2245d73d413badfca98df93e09d0f6f
4d0253f37876c4fb98c66e5424b485713b617a4f
androiddevnotesforks/simpleLang
/compiler/src/CodeGenerate/GlobelWrapValue.cpp
C++
cpp
594
permissive
#include "stdafx.h" #include "GlobelWrapValue.h" #include "CallGen.h" GoWrapValue::GoWrapValue(size_t index, llvm::Type* type) : _index(index) { this->type = type; } llvm::Value* GoWrapValue::generateCode(const Generater& generater) { auto* m = generater.module; auto& builder = generater.builder(); //llvm::raw_o...
524bbcca4b8f598a87d7b5a5bee157ae3257cbe3
f41f169333ffebf8ef7de8a7870feb59197c2b45
lordronz-archive/TugasProLan
/Hello World/Game.cpp
C++
cpp
16,542
no_license
#include "Game.h" Game::Game() : view(sf::View(sf::FloatRect(640, 360, 256, 144))), walls{ wall }, zombieShot(false), gameOver(false), score(0) { if (!cursorText.loadFromFile("Textures/pointer.png")) std::cout << "ERROR LOADING CURSOR TEXTURE\n"; sf::Vector2u textSize = cursorText.getSize(); textSize.x /= 2; t...
46c095351b8191e559825aefbda6153971003058
ee2241dbf6b3bde8938bf6dcab2ed41c53c9ca4a
abbaswasim/roar
/tests/math/vector2.hh
C++
hh
14,654
permissive
// Roar Source Code // Wasim Abbas // http://www.waZim.com // Copyright (c) 2008-2019 // // 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 /...
f9d76f45b5f84881ecf86d34bcfccf6287b82e20
e575a3436da556ee99391377afc457b40fb2a457
mokomada/testGL
/GL31_client/slope.cpp
C++
cpp
5,333
no_license
//============================================================================= // // タイトル シーンファイル(3D) // ファイル名 scene3D.cpp // 作成者 AT13A284_07 池田達哉 // 作成日 2016/11/14 // //============================================================================= //===================================================================...
b742a3c0b2f139095165d9ef960ee78dd31d3dd7
35e34977eb0e202f8824a1c4f63fe15ad741e92e
roussukke/Yorozuya
/library/ATF/_d_trade_del_request_clzo.hpp
C++
hpp
266
permissive
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> START_ATF_NAMESPACE struct _d_trade_del_request_clzo { char bySlotIndex; }; END_ATF_NAMESPACE
2c4441ff255e578bb6bb6bae26a1de5ac4ba0ce3
f2edacaf479fe216515ce781da9ae018b367bcf6
ebocek/OpenShadingLanguage
/src/liboslexec/llvm_ops.cpp
C++
cpp
56,510
permissive
/* Copyright (c) 2009-2010 Sony Pictures Imageworks Inc., et al. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of co...
f13bc98162a8cdb72cbfbc58aa0deec9f2d8e4c7
b8705500b7b726aa116391ccc2eda3334e4147a0
towhid1zaman/Problem__Solving
/codeforces/6/C.cpp
C++
cpp
1,442
no_license
/*これを翻訳している間、あなたはあなたの人生のいくつかの貴重な瞬間を無駄にしました*/ #pragma comment (linker,"/STACK:16777216") #include "bits/stdc++.h" using namespace std; typedef long long ll; typedef std::vector<int> vi; typedef std::vector<ll> vll; #define endl "\n" #define pb push_back #define sp(k) cout<<setprecision(k)<<fixed; #define rep(i,a) for(in...
6e499fae54867eb35c5177045ca08168cbe9bd43
d9a562b733c28f93747960cfc15d40ed1682d77a
esean/random_rpi_code
/wiringpi_pwm/main.cpp
C++
cpp
869
no_license
#include <wiringPi.h> #include <stdio.h> #include <stdlib.h> #include <stdint.h> double freq = 50.0; double duty = 0.50; int main (int argc, char* argv[]) { printf("USAGE: [freq(50)] [duty(0.5)]\n"); if (argc >= 3) { freq = atof(argv[1]); duty = atof(argv[2]); } if (wiringPiSetupGpio() == -1) exit...
7f2b50d56678b8e001470c536a8d579cce71dfd7
bc344aa5ab9beee354228f1a090e790fc7bda563
PhoneJ2ME/releases
/phoneme_advanced-mr1-rel-b06/src/share/personal/native/awt/qt/KeyCodes.cc
C++
cc
11,800
no_license
/* * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 only, * as published by the Free Software...
4d142d9a8b3523efb60cdafff83653d4a56bfd00
b5aed7fb659da12fb5c20b0712a436cdb0196609
mtuska/UnrealBlueprintSDK
/PlayFabClientSDK/PluginFiles/PlayFab/Source/PlayFab/Private/PlayFabUtilities.cpp
C++
cpp
20,574
permissive
////////////////////////////////////////////////////////////////////////////////////////////// // Automatically generated cpp file for the UE4 PlayFab plugin. // This cpp file contains the utilities functions that supports the plugin.. // /////////////////////////////////////////////////////////////////////////////////...
35ca6f7c9d06886bed7933db9f09c4cc4547e4d2
cae3cae67990d653e1939bd53a4a147e1146e2fc
Mengman/VTK
/Rendering/Core/vtkWindowLevelLookupTable.cxx
C++
cxx
4,496
permissive
/*========================================================================= Program: Visualization Toolkit Module: vtkWindowLevelLookupTable.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This...
c1406d0ce9fae4468ee8769bcdf2159fc20f318f
d7e7507d75dd7008cf61fe637ed03b6e3381dca8
azureopen/neoml
/NeoML/src/TraditionalML/SMOptimizer.cpp
C++
cpp
17,869
permissive
/* Copyright © 2017-2020 ABBYY Production 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 in writing,...
b7c24ab89801a84259d71570e4b46e68d4f69b0c
8c9bc9c92bc0b7da9c9cf3ac68c036f90c326ac2
min-0/cpcp
/ch5_예제/ch5_예제9.cpp
C++
cpp
518
no_license
#include <iostream> using namespace std; class Circle{ int radius; public: Circle(const Circle& c); Circle(){ radius = 1; } Circle(int radius) { this->radius = radius; } double getArea(){ return 3.14*radius*radius; } }; Circle::Circle(const Circle& c){ this->radius = c.radius; cout << "복사 생성자 실행 radius = " << ...
f78d56eb5213262cdb0af76c8791b71eabd9b687
6d0cb4f25e3d11b931826e9261a1227345f29f25
rhymu8354/JsonClusterMemberStore
/src/JsonDatabase.cpp
C++
cpp
29,364
permissive
/** * @file JsonDatabase.cpp * * This file contains the implementation of the * JsonClusterMemberStore::JsonDatabase class. */ #include <functional> #include <Json/Value.hpp> #include <JsonClusterMemberStore/JsonDatabase.hpp> #include <memory> #include <SystemAbstractions/IFile.hpp> #include <SystemAbstractions/I...
b891afca25ffd7cd74386b03c13e99bcce0116cb
5cfd03a9d34a54496eec05584c0c1c16e8a71538
jinhongyii/ttrs--for-oj
/backend/resource/src/table/table_heap.cpp
C++
cpp
6,535
no_license
/** * table_heap.cpp */ #include <cassert> #include "common/logger.h" #include "table/table_heap.h" namespace sjtu { // open table TableHeap::TableHeap(BufferPoolManager *buffer_pool_manager, LogManager *log_manager, page_id_t first_page_id) : buffer_pool_manager_(bu...
803dd57c6c79b5c35f0bee86df5503efa09adb0b
3c713762332b87191b78f18f57aa665275316694
MCFR/cpp_pool
/cpp_d14m_2018/ex02/Coconut.hpp
C++
hpp
342
no_license
/* ** EPITECH PROJECT, 2019 ** Coconut.hpp ** File description: ** @epitech.eu */ #ifndef COCONUT_HPP_ #define COCONUT_HPP_ #include "Fruit.hpp" class Coconut : public Fruit { public: Coconut(); ~Coconut(); virtual std::string const & getName() const; }; #end...
84a7c271c6f2636be610a14b5f9db1ea4fb53685
74a96a23b6effb55801159bc6d60f2913de925c8
wangtaoyijiu/flockingbird
/tests/src/nearest_neighbors/nanoflann_exploratory_tests.cpp
C++
cpp
2,156
permissive
#include "gtest/gtest.h" #include "nearest_neighbors/nanoflann.hpp" #include "flock_simulation/flock.hpp" using namespace nanoflann; using namespace flockingbird; const int dim = 2; const int maxLeaf = 10; typedef KDTreeSingleIndexAdaptor<L1_Adaptor<double, Flock>, Flock, ...
ed96113437deb4d25a82f1359c72905421f344e3
bce444a8a2c94b4574a8bdad1d5c591de96875bb
msisov/chromium
/content/browser/renderer_host/media/media_stream_manager.cc
C++
cc
76,546
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/browser/renderer_host/media/media_stream_manager.h" #include <stddef.h> #include <stdint.h> #include <algorithm> #include <cctype>...
62cc9aab200feb32a961cb92510882c3252c0b2c
bc732dc1c3ff42617f5e54c2a539f3868d9c9a19
jagjitsjsu/epibook.github.io
/solutions/cpp/longest-contained-range.cc
C++
cc
4,878
no_license
// Copyright (c) 2013 Elements of Programming Interviews. All rights reserved. #include <iostream> #include <algorithm> #include <cassert> #include <random> #include <string> #include <unordered_set> #include <unordered_map> #include <utility> #include <vector> using std::cout; using std::default_random_engine; using...
79f9415ca1c9aa01b78fdf01103548b7cb5a866a
a2beae670b7d8c8402ab008221bd3fb82d1e2e5c
sea5727/gstreamer-tutorial
/cpp/rtpbin-tutorial-2.cpp
C++
cpp
18,386
no_license
#include <gst/gst.h> #include <gst/rtp/rtp.h> #include <unistd.h> typedef struct _rtpbin_data { GstBus * bus; GMainLoop *main_loop; GstElement * pipeline; GstElement * file_src; GstElement * qtdemux; GstBin *rtpbin; GstBin *audio_bin; GstElement *audio_queue; GstElement * rtpmp4...