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
4e45da4bd5b94c528adf864d7621c0a6666ed7f7
ab7da5827fa946a81e3598fbdeda1daebf77ed1f
PorkyFighter/CasseBriqueTom
/fenetreprincipale.cpp
C++
cpp
3,316
no_license
#include "fenetreprincipale.h" #include "ui_fenetreprincipale.h" /* * Utilisation de fenetreprincipale.ui, fichier contenant une partie de l'interface graphique, créée à l'aide de Qt Designer */ FenetrePrincipale::FenetrePrincipale(QWidget *parent) : QMainWindow(parent), ui(new Ui::FenetrePrincipale) { ...
c8af63c14b535dcddbb6b528752cd8a8478ccb47
d77de2ceb62d9309ddbf8c41688501c363e3af08
AlexanderLeading/robo_ws
/pytorch/torch/csrc/jit/passes/python_print.cpp
C++
cpp
41,194
permissive
#include <c10/util/Exception.h> #include <torch/csrc/jit/attributes.h> #include <torch/csrc/jit/export.h> #include <torch/csrc/jit/ir.h> #include <torch/csrc/jit/ir_views.h> #include <torch/csrc/jit/passes/python_print.h> #include <torch/csrc/jit/resource_guard.h> #include <torch/csrc/jit/script/error_report.h> #includ...
2969bc2f68ff358f568f7086814d7978707eb6fc
26018541f1325c0b91a87021cd0d3ed9707b4c43
abelianwang/malloc-survey
/elephant/elephant.cpp
C++
cpp
2,081
permissive
// Elephant Memory Allocations #include <stdio.h> #include <JRSMemory_Pools.h> using namespace Elephant; struct manager { enum { s_defaultAlignment = 16 }; cHeap *heap; static void MemoryManagerLogText(const jrs_i8 *pText) { printf("%s\n",pText); } static void MemoryManagerErrorHandle(const jrs_i8 *pError, ...
6ec40140acc2f4b99ce50801f2c05b393ba1c7fb
24d8cec1834030399f35daded13b36055f516679
Bocity/ACM
/vjudge/little_kawayi/HDU/6170/13383553_WA_0ms_0kB.cpp
C++
cpp
2,001
no_license
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/hash_policy.hpp> #include <ext/pb_ds/priority_queue.hpp> #include <ext/pb_ds/tree_policy.hpp> #define REP(i, x, n) for (int i = (x); i < (n); ++i) #define PER(i, x, n) for (int i = (n) -1; i >= x; --i) #define endl "\n" #define DE put...
b7625e53c4c0f6e9dd1e129357bdcdd1838a17ca
e07650d64102a4eae137f188a26f5f5a36fe5b99
smeenai/llvm-project
/compiler-rt/test/sanitizer_common/TestCases/FreeBSD/hexdump.cc
C++
cc
482
permissive
// RUN: %clangxx -O0 -g %s -o %t -lutil && %run %t 2>&1 | FileCheck %s #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <libutil.h> int main(void) { printf("hexdump"); char *line; size_t lineno = 0, len; const char *delim = "\\\\#"; FILE *fp = fopen("/etc/fstab", "r"); assert(fp); lin...
611c23e2c3512a69f3f772a7582e4bbc774eb630
4552dfa795adbb0b3444c7635a8fa4c4d3087337
ECSE437-Fall2019/OpenOffice
/main/framework/source/inc/loadenv/loadenvexception.hxx
C++
hxx
6,733
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 y...
babd97434986297d7508e8df5b2c46e0ba2c7525
777cce070577927428e9bc5df47f9e9956d139ea
igoroogle/codeforces
/div411/ZAD_B.cpp
C++
cpp
436
no_license
#include<bits/stdc++.h> #define mp make_pair #define x first #define y second using namespace std; typedef long long ll; int main() { //ios_base::sync_with_stdio(0); ll i, n, l, r, ans = 0; cin >> n; l = 1; r = n; while (l < r) { ans += (l + r) % (n + 1); ++l; if (l < r)...
5d918b4c73021f3374ca4f88cfd2c2fe846209d0
e5dcd52b7b11900f55a3d2a3da75a5bb7d3e0668
tongchiyang/chromium
/cc/metrics/compositor_frame_reporting_controller.cc
C++
cc
11,915
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 "cc/metrics/compositor_frame_reporting_controller.h" #include <utility> #include "cc/metrics/compositor_frame_reporter.h" #include "cc/metrics/...
cddc1cf59bd79862d4017c951dc1729598d8c6fe
d0a6113f4fc25f3c462069b35c93d067341a457c
skanda99/Hackerrank-Leetcode
/leetcode493.cpp
C++
cpp
1,915
no_license
// problem: "https://leetcode.com/problems/reverse-pairs/" #define ll long long class Solution { public: Solution() { ios_base::sync_with_stdio(false); cin.tie(NULL); } int reversePairs(vector<int>& nums) { if(nums.empty()) return 0; int...
7ef04998d76e3480b1d8a4f06c3d9950b761a56d
30aee39a0d9ac95dc61be73a2e43af3cab6e465f
ashmidgley/ray-tracer
/PinholeCamera.cpp
C++
cpp
658
no_license
/* $Rev: 250 $ */ #include "PinholeCamera.h" PinholeCamera::PinholeCamera(double f) : Camera(), focalLength(f) { } PinholeCamera::PinholeCamera(const PinholeCamera& camera) : Camera(camera), focalLength(camera.focalLength) { } PinholeCamera::~PinholeCamera() { } PinholeCamera& PinholeCamera::operator=(const Pinh...
f16be072162e1edbd90dfc7827efdbfda7d37824
c556eb14772aa71016913efc0b1313e22a9584c9
sacceus/BabylonCpp
/src/Samples/src/samples/loaders/gltf/simplemodels/simple_meshes_scene.cpp
C++
cpp
2,418
permissive
#include <babylon/cameras/arc_rotate_camera.h> #include <babylon/engines/scene.h> #include <babylon/helpers/environment_helper.h> #include <babylon/interfaces/irenderable_scene.h> #include <babylon/lights/light.h> #include <babylon/loading/plugins/gltf/gltf_file_loader.h> #include <babylon/loading/scene_loader.h> #incl...
8232b3590409cb3621e95b0c2607f27edccc0117
60415166a166ac2ca0d21b3f2b182374ddd3dbf8
DelfiSpace/DelfiPQcore
/PeriodicTaskNotifier.cpp
C++
cpp
1,552
no_license
/* * PeriodicTaskNotifier.cpp * * Created on: 21 Jan 2020 * Author: Casper */ #include "PeriodicTaskNotifier.h" PeriodicTaskNotifier *notifierStub; void NotifyTasks_stub(){ //systick interrupt clears automatically. notifierStub->NotifyTasks(); }; PeriodicTaskNotifier::PeriodicTaskNotifier(Peri...
726bcc165d77a563126522646ada73c707b587db
c08e2909935da4d8ed2cfd39bab95d26137378d9
wyxPatrick/Program-Design-and-Algorithm
/C++-Programming/Week-4/Project3/Project3/Source.cpp
C++
cpp
2,430
no_license
#include <iostream> #include <cstring> using namespace std; // 在此处补充你的代码 class Array2 { int** ptr; int row; int col; public: Array2(int i = 0, int j = 0); Array2(Array2& a); ~Array2(); Array2& operator=(const Array2& a); int& operator()(int i, int j) { return ptr[i][j]; } ...
472b9d737295850d4493d011f1b3062ca4cb502d
ab2eeee4d027917a475a6f0649ef5c0e9a13b1bf
jackjchen/map
/sparta/test/Buffer/Buffer_test.cpp
C++
cpp
22,469
permissive
// -*- C++ -*- #include <iostream> #include <cinttypes> #include <memory> #include <vector> #include "sparta/resources/Buffer.hpp" #include "sparta/simulation/ClockManager.hpp" #include "sparta/kernel/Scheduler.hpp" #include "sparta/utils/SpartaTester.hpp" #include "sparta/statistics/StatisticSet.hpp" #include "spar...
a46bd6790f559ffbfe2e450da5568fd41144f32b
4c89f8b994fd0519bffd1cd029348fef6fc999e9
xn1924/FirstGame
/Classes/HelloWorldScene.cpp
C++
cpp
1,410
no_license
#include "HelloWorldScene.h" #include "ui/CocosGUI.h" USING_NS_CC; Scene* HelloWorld::createScene() { auto scene = Scene::create(); auto layer = HelloWorld::create(); scene->addChild(layer); return scene; } void HelloWorld::touchEvent(Ref *sender, ui::Widget::TouchEventType type) { switch (type...
64d81f67cef0133b0ca7f4e96614271c52647e78
e449808c1cb4506c3bcc94e5709bc55c9f9e48df
leduythuccs/HCMUS-CalicoCat
/Code/2020 Vietnam National Programming Contest/J.cpp
C++
cpp
1,217
no_license
#include <bits/stdc++.h> using namespace std; int n, k; int l[20]; vector<int> h; long long calc() { long long res = 0; int M = 0; for (int i = 0; i < n; ++i) { l[i] = M; M = max(M, h[i]); } int maxRight = 0; for (int i = n - 1; i >= 0; --i) { res += max(0, min(l[i], maxR...
f92246dff582009f28d865e50117bb1f1ce0a972
0be7b4c44055c8e41f87e50786c52d520caf76d7
EvAlex/clang-course
/LinkedLists/List.cpp
C++
cpp
2,422
permissive
#include "List.h" List initList() { List l = { nullptr, nullptr }; return l; } void push(List& list, double inf) { Node* temp = new Node; temp->inf = inf; temp->next = list.top; if (!list.top) list.bottom = temp; list.top = temp; } bool pop(double& inf, List& list) { if (!list.top) return false; Node...
844b3956308414c873e3649acd75c68451bd89af
ea725c5300c8caeb5d4698ddadb1d8022132e622
Sahilnegi-code/Have_practised_Dsa
/part2/heap/findLargestelementinanarray.cpp
C++
cpp
582
no_license
// Online C++ compiler to run C++ program online #include <iostream> #include <vector> #include<bits/stdc++.h> using namespace std; int main() { priority_queue<int , vector<int> , greater<int>> m; // push-->log(n); // pop-->log(n); // top-->o(1); // size-->o(1); int k =3; int arrSize=6; int arr[]={1,34,21,65,2,5}; ...
cbb8685bdc00ea02415dc6196e72523c24a0d16c
29de69f369f1dc54e8e3a1a00315087de78e8f56
dlstkd710/Alice
/16.12.01 Portfolio Framework+character/Dx3D/cUtill.cpp
C++
cpp
11,055
no_license
#include "stdafx.h" #include "cUtill.h" namespace cUt { DWORD MaxAnisotropic; //이방성 필터링 최대 단계 LPDIRECT3DDEVICE9 Device; //전역 Device //디바이스 생성함수 HRESULT CreateDevice() { // // Direct3D 초기화 // //1. Device 를 생성할 IDirect3D9 객체를 얻는다. //IDirect3D9* d3d9; LPDIRECT3D9 d3d9; d3d9 = Direct...
7c51d28007a23ae27f677daa11e189dbe28fd887
82d9b05cda1258f00c037c9acf30d9c3323901ef
delta1766/logging-log4cxx
/src/main/cpp/propertyconfigurator.cpp
C++
cpp
16,227
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 may ...
fd16c47d03e537d4dcd03d4fe598d516cfc267ba
b8c6253200e7bbc6b1b3db04d16fb30878352bdb
xingjilin/moon9
/src/moon9/memtracer/memtracer.sample.cpp
C++
cpp
236
permissive
// notice we do not need to include <memtracer.hpp> in order to catch memory leaks! :) void *make_a_leak() { return new int [400]; } int main( int argc, char **argv ) { make_a_leak(); new int(); // make another leak return 0; }
b74c99d19038c5d3d4e77a2a3405b71f6387b2d0
faf136172f9b096b1d705c942ec492099e3ccecf
finegs/Test01
/pjt02/hash/hash.cpp
C++
cpp
1,018
no_license
#include <stdio.h> #include <iostream> #include <cstring> #include "hash.hpp" using namespace std; void Book::printBook() { printf("Book={Title=%s, Author=%s, Subject=%s, Id=%d\n", title, author, subject, bookId); } std::ostream& operator<<(std::ostream& os, const Book& o) { os << "{\"title\":" << ...
363d6c8dab3fe14b88234f5c6105cba6c7b23ab8
206bc43f9d1f721eeaf96a075eb00473d9d22772
chirag77/verible
/verilog/tools/project/project_tool.cc
C++
cc
11,182
permissive
// Copyright 2017-2020 The Verible 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 o...
13caf85eb95d100588734c99951ac7530c2e11c9
c3cc61ca9e1159cc303ff48192b11bc8e80137b2
markveligod/ft_irc
/includes/Class.Socket.hpp
C++
hpp
820
no_license
/* **========================== ** Class Socket - **========================== */ #pragma once #include <netinet/in.h> //struct sockaddr_in #include <sys/socket.h> //socket #include "main.hpp" class Socket { protected: public: int _port; int _fd; int _sin_family; int _type; int _protocol; c...
96a23316ed4216a9ea5d8035fb83d26567403b49
10d99080bdf1673d29ddefb529f5ca91a6038d03
fhe002/SpringMassParticleSystem
/ParticleSystem/vector3.cpp
C++
cpp
2,374
no_license
#include "vector3.h" #include <cmath> static const Vector3 ZERO = Vector3(0.0, 0.0, 0.0); Vector3::Vector3() : x(0.0), y(0.0), z(0.0) { } Vector3::Vector3(double x, double y, double z) : x(x), y(y), z(z) {} Vector3::Vector3(const Vector3 & v) : x(v.x), y(v.y), z(v.z) {} Vector3 Vector3::operator+(const Vector3...
2b840e931c277eb8e3e5bcdf8b79485453f10772
6b221173d10c7126ef9cc5ab794aba599cf0f28f
faiuwle/ConlangDictionary
/main.cc
C++
cc
897
no_license
#include <QApplication> #include <QFile> #include <QTextStream> #include <QMessageBox> #include "mainwindow.h" int main (int argc, char *argv[]) { QApplication app (argc, argv); QFont font ("DejaVu Sans", 8); QString path = "."; QString filename = argc > 1 ? argv[1] : ""; QFile settingsFile ("cd.config"...
f19da7395141227575183e07d4e02778d755755c
bb52ac16068d9156145b85dee0ddf8bde06a5035
nguyennhattruong96/BiboTraining_BaiTap_KTLT_Thay_NTTMKhang
/BaiTap_KTLT_0107/BaiTap_KTLT_0107.cpp
C++
cpp
567
no_license
#include "BaiTap_KTLT_0107.h" int Inputx(string sMessage) { float x; cout << sMessage; cin >> x; return x; } int Inputn(string sMessage) { int n; do { cout << sMessage; cin >> n; if (n < 2) { cout << "So Nhap Vao La So Nho Hon Hai Xin Nhap Lai " << endl; } } while (n < 2); return n; } voi...
04cc60e0b80561925608403137639e065847eb56
01e98b181e13ba4b58cb7d569af3a0d5a83223f4
Squarespace/envoy
/test/common/upstream/cluster_factory_impl_test.cc
C++
cc
8,758
permissive
#include <chrono> #include <list> #include <string> #include <tuple> #include <vector> #include "envoy/api/api.h" #include "envoy/config/cluster/v3/cluster.pb.h" #include "envoy/http/codec.h" #include "envoy/upstream/cluster_manager.h" #include "common/network/utility.h" #include "common/singleton/manager_impl.h" #in...
d85aba074f711bad5021cd781e327306fc64efa5
60705d12d136b5c949ea6c83a6733509a73c7592
freddyz/SubmarineFree
/src/SS1.cpp
C++
cpp
4,471
permissive
#include "SubmarineFree.hpp" struct SS_112 : Module { static constexpr int deviceCount = 12; SS_112() : Module(0, deviceCount, 0, 0) {} }; struct SS112 : ModuleWidget { SS112(SS_112 *module) : ModuleWidget(module) { setPanel(SVG::load(assetPlugin(plugin, "res/SS-112.svg"))); for (int i = 0; i < SS_112::deviceC...
d9fe2043cf3b48303c6e554f9899c3ab29c8e7b6
c61f8a7705e2ac56a2c456b47b2f8d792becca43
Prcuvu/stepmania-cvs
/src/TransitionFadeWipe.cpp
C++
cpp
2,567
no_license
#include "stdafx.h" //----------------------------------------------------------------------------- // File: TransitionFadeWipe.cpp // // Desc: "Window blinds"-type transition. // // Copyright (c) 2001 Chris Danford. All rights reserved. //----------------------------------------------------------------------------- ...
958a1cc2c160ab21e6bf05f5532377843d1fa837
454db3779542ef0231bbd0391a832c1a9842698d
LuizFelipeBaroncello/Estrutura-de-Dados
/Projetos/Projeto1/Market/src/client.cpp
C++
cpp
1,195
no_license
#include "client.h" Client::Client() { } Client::Client(Time& arrival_time, int total_purchases, int total_purchases_value, int pay_type, int queue_type) { total_purchases_= total_purchases; total_purchases_value_ = total_purchases_value; if (pay_type == 0) { pay_type_ = PayType::card; } els...
f3150f5dfebb611d1f0326a918b29f9e22a03ab7
e80c671b4a335e581613ca43184b881b04330de2
spiralgenetics/biograph
/vendor/msgpack/test/streaming.cc
C++
cc
3,777
permissive
#include <msgpack.hpp> #include <gtest/gtest.h> #include <sstream> TEST(streaming, basic) { msgpack::sbuffer buffer; msgpack::packer<msgpack::sbuffer> pk(&buffer); pk.pack(1); pk.pack(2); pk.pack(3); const char* input = buffer.data(); const char* const eof = input + buffer.size(); msgpack::unpacker pac; ms...
4ea835be51d688c23fcb62a2594b620353fc14e8
9e243d3826b01ce5d03b1b262907e0c5866317cb
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_5/MP+dmb.sy+pos-data-[ws-rf]-ctrl.c.cbmc_out.cpp
C++
cpp
58,973
no_license
// Global variabls: // 0:vars:3 // 3:atom_1_X0_1:1 // 4:atom_1_X2_1:1 // 5:atom_1_X5_2:1 // 6:atom_1_X6_0:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 7 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 5 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CP...
449ee707405491b20acd160c50e6b1e34b55c627
0e6101818ac9e242501ddf1788ea2a7f3800a9d4
trizt/osquery
/osquery/tables/system/darwin/smc_keys.cpp
C++
cpp
20,476
permissive
/* * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #in...
62e00f93d1ac2373b83948870169934dbd2217e0
46a8edd034ef276da398ef301d6850dab589e893
ssauermann/AutoPas
/tests/testAutopas/tests/containers/LinkedCellsVersusDirectSumTest.cpp
C++
cpp
4,451
permissive
/** * @file LinkedCellsVersusDirectSumTest.cpp * @author tchipev * @date 23.01.18 */ #include "LinkedCellsVersusDirectSumTest.h" #include "autopas/containers/directSum/DirectSumTraversal.h" #include "autopas/containers/linkedCells/traversals/C08Traversal.h" #include "autopas/molecularDynamics/LJFunctor.h" #includ...
6d6504e271e57bfe9e7556717d8b3a1848ab8820
728ccde4cf9b324ba3cf56d69f5f9e4a3b271ef9
Sfourtou/Arcade
/arcade/sources/Sfml.cpp
C++
cpp
9,681
no_license
#include <SFML/Window.hpp> #include <SFML/Graphics.hpp> #include <sstream> #include "Protocol.hpp" #include "Sfml.hh" #include "Map.hh" #include "TileMap.hh" Sfml::Sfml() : tilesize(24), name("") { buttons[sf::Keyboard::Up] = InputButton::UP; buttons[sf::Keyboard::Down] = InputButton::DOWN; buttons[sf::Keybo...
e25ec7c9b8f6debc2f64e6634c943e55a4ef72ba
86b404c91a41599a178252131cb64e28a4370a6c
DrZhuYichen/Exam
/recursion.cpp
C++
cpp
3,260
no_license
#include <iostream> #include <vector> #include <string> using namespace std; class Factorial { public: void solve() { int n = 10; cout << recursion(n) << endl; } int recursion(int n) { if (n == 1) { return 1; } return n * recursion(n - ...
25c93682c3815752c9ab19c231a3f058f25572f1
14ee585480584063e82e40a35ef8492b78759746
Ujjwal120/MyC-
/Forest_RGY.cpp
C++
cpp
2,479
no_license
#include<bits/stdc++.h> #define pb push_back #define x first #define y second #define sz(a) (int)(a.size()) using namespace std; const int MAX = 100005; int occ[MAX][2]; int banned[3 * MAX]; int color[3 * MAX]; int ptr[MAX]; vector<pair<int , int> > g[MAX]; pair<int, int> getNext(int u) { while(ptr[u] < sz(g[u])) ...
4aff2252d08113c2f8c725c17d6c8d1ed91a82aa
b2f299a7e49d751b98eecff7036678ea7ae85790
hnrklssn/thesis-llvm
/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
C++
cpp
45,480
permissive
//===- GCOVProfiling.cpp - Insert edge counters for gcov profiling --------===// // // 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 // //===---------------------------...
c8a613783d61e73a24c3c94b0a6cb6ddf0b205c6
83ac5096a57e8f4435d5e3c5ecc4c12a24f5337e
reezer/maplibre-gl-native
/test/util/tile_range.test.cpp
C++
cpp
2,831
permissive
#include <mbgl/util/tile_range.hpp> #include <mbgl/util/geo.hpp> #include <mbgl/map/transform.hpp> #include <gtest/gtest.h> using namespace mbgl; TEST(TileRange, ContainsWorld) { auto range = util::TileRange::fromLatLngBounds(LatLngBounds::world(), 0); EXPECT_TRUE(range.contains(CanonicalTileID(0, 0, 0))); ...
b3465dda7774507dbcc18d24ecbac0f2219551c5
d9783bb2a5372024e634759aac7f55d81752bcba
FahimNirob/AlgorithmCodeFile
/DFS.cpp
C++
cpp
827
no_license
#include<bits/stdc++.h> #include <vector> using namespace std; void DFS(int start); void process(int node); std::vector<int> graph[1000]; bool visit[1000]; int node; int main() { int ver,x,y,starting;//x and y are adjecent nodes connected by a vertecis. cin>>node;//entering number of node; if(node ==...
e641929852e9bd96835e0ea05a8e5fb7e769457a
d8aad649bc58bb77b013d5392f629976e9695d2f
delecui/oneAPI-samples
/Libraries/oneMKL/monte_carlo_pi/mc_pi.cpp
C++
cpp
4,906
permissive
//============================================================== // Copyright © 2020 Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= /* * * Content: * This file contains Monte Carlo Pi number evaluation benchmark for DPC++ * interface ...
469f4698c14f8bac667fc5f99bff591f157132f6
87d8f928e56f8b391241a93abfdf8a988169a857
JinbaoWeb/ACM
/C++/201411291255.cpp
C++
cpp
610
no_license
#include <iostream> using namespace std; #define MAX 1000005 int main(){ int n,t; short a[MAX]; cin>>t; for (int cas=1;cas<=t;cas++){ cin>>n; for (int i=0;i<n;i++) cin>>a[i]; int count=0; int s=n; while (n){ int flag=0,index=0,flagflag=0; for (int i=0;i<s;i++){ if (a[i]==n){ flag=1; ...
6692cc7e29cf2a53a8c73dfd0885cbcb2e5650ce
7198b6203379b56007fbfe92c4f7a846c0601e81
lost-cat/Luo_Jia_Li_Xian_Ji
/Luo_Jia_Li_Xian_Ji/shop.cpp
C++
cpp
6,448
no_license
#include "shop.h" #include<qpushbutton.h> #include<qtimer.h> #if _MSC_VER >=1600 #pragma execution_character_set("utf-8") #endif shop::shop(maincharc*mm, QWidget* parent) : QWidget(parent) { ui.setupUi(this); Items* goods1 = new Items(200, 0, 100, 0, 300, 50); Items* goods2 = new Items(150, 0, 150, 0, 300, 50);...
ca199ab4048ec69b269b8c4f4d0e2235ce8b8064
9f6850e5508c71ea919acc0d63a103bf13f9544f
apache/ignite
/modules/platforms/cpp/thin-client/src/impl/utility.cpp
C++
cpp
5,804
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 may ...
8a351828971b96d3070e2211f6d86fd96c5abdd9
44e69d19e3cbbf54ae11ad573757c265cf761fff
dkhonker/sysu
/数据结构/数据结构实验课文件/EXP14/EXP14/学生作业0609/学生作业0609/20354044/spanforest.cpp
C++
cpp
1,444
no_license
#include<stdio.h> #include<memory.h> #include<stdlib.h> const int maxn=5001; int *A[maxn]; int *B[maxn]; bool visited[maxn]; int d[maxn], n, edges; void dfs(int v){ visited[v]=true; for(int i=1;i<=d[v];i++){ int u=A[v][i]; if(!visited[u])B[v][i]=1; for(int k=1;k<=d[u];k++) if(A[u][k]==v)B[u][k]=1; ...
cf768ccebd500be346c79235eea9341479914021
6faffca211b1ad104c5f4ab03faa128952123444
kklt92/CUDA_Programming
/labs/src/bgsegm/main.cpp
C++
cpp
3,124
no_license
#include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" #include <opencv2/highgui.hpp> #include <stdio.h> #include <iostream> #include <sstream> #include <cuda.h> #include <cutil.h> #include "bg_sub_kernel.h" #include "util.h" using namespace cv; using namespace std; Mat frame[6]; Mat fgMaskMOG2; Mat r...
1f153da50bddf201cf577108b02ec0e36c6871f1
c58dbe606975f9f32f34fb57ef9c13804ca9e089
okpreetam/Practise-Code
/crack-the-codeing-interview/partition.cpp
C++
cpp
1,026
no_license
#include <iostream> using namespace std; void exchange( int *source, int *destn) { int temp = *source; *source = *destn; *destn = temp; } void partition(int *arr, int p, int r) { int x = 0; int i = p -1; for (int j = 0; j <= r ; j++) { if(arr[j] > x) { i = i + 1; exchange(&arr[i], &arr[j]); } }...
0eb6a50a08e81a1d3770b0b9a62af3e9f439ee01
81132ef0e6e6dc3f9162bbe30e3a1ec4de9dd611
ailyanlu1/Competitive-Programming-2
/Codeforces/321 Division 2/Problem C/C.cc
C++
cc
1,833
permissive
#include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <cstring> #include <map> #include <set> #include <vector> #include <utility> #include <queue> #include <stack> #include <cassert> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&...
42374395a18c832b47704af0b3fa781e407d8234
1e4f18d278ff1802d367fc5629bce6ca77ffbab5
RHHayes/The_Rock
/Source/Engine/Source Files/Object/Object.cpp
C++
cpp
3,761
no_license
/* File which defines the methods of the object class */ #include "Object.h" #include "WorldManager.h" #include "LogManager.h" using namespace df; Object::Object(){ static int id_counter = 0; id = id_counter; id_counter++; //object is inittially has no type type = "Undifined Object"; //object position is i...
7d35be7e2612f103ffd0d7c813084d4a677c1f6e
9bab23e3d481e3ad7d8ea2da01a5a9f1fed5d676
shunf4-assignment/shenjian-cpp-assignments
/SJHomeworkArrayFinal/SJHomeworkArrayFinal/x-x.cpp
C++
cpp
218
no_license
/* 1652270 ¼ÆËã»ú2°à ·ëË´ */ #define _CRT_SECURE_NO_WARNINGS #include <iostream> using namespace std; int main() { char *s = (char *)malloc(sizeof(char) * 1000); cout << s << endl; free(s); return 0; }
c9182589d72dbf0aba408e653ab999562f14ece1
042babd60efeaf781280a1da7e7fbe7aa7040a46
robertbjarum/CXHibernate
/SQLComponents/SQLVariantOperatorAdd.cpp
C++
cpp
49,260
no_license
//////////////////////////////////////////////////////////////////////// // // File: SQLVariantOperatorAdd.cpp // // Copyright (c) 1998-2020 ir. W.E. Huisman // All rights reserved // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files ...
53bd4cb7ed033114ccff800a704b32d39ceb6702
d4d8119d032a6d75f941243053a4c28b9b1ad481
kailaisi/android-29-framwork
/av/media/libaudiohal/impl/EffectHalHidl.cpp
C++
cpp
13,908
permissive
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
34f0a12ebe70917c032a097620db917a8845d4ad
297ff3d4d4ec22e97228c89412b94a118661506a
apache/openoffice
/main/chart2/source/controller/main/CommandDispatchContainer.cxx
C++
cxx
7,862
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 y...
51fb5bab8f1171583f49b87f5e8570279b7ac935
374ed72c27fe2751308ba91261bc8c7e3abff0d1
konstantinoscs/Atiki_odos-Simulation
/Toll.cpp
C++
cpp
1,264
no_license
//Author: Konstantinos Stefanidis (Support) / Giannis Lamprou (Lead)) #include <iostream> #include <cstdlib> #include "Toll.h" using namespace std; toll::toll(int NSegs, int fill) { this->rand_fill(NSegs, fill); cout << "Toll created" << endl; } toll::~toll() { for (unsigned int i = 0; i < waiting_vehicles_ptr...
89bac3afa7fc121864cd0a92bafdf8c2db25b937
a574abceb524b3a817e085604ca75fcc34069de3
Sarthak104/Jaynam-Sir-100-Programs
/17.cpp
C++
cpp
255
no_license
#include<iostream> using namespace std; int main() { int year; cin>>year; if(year%4==0) { cout<<"Leap year"; } else if(year%100==0) { cout<<"Not a leap year"; } else if(year%400==0) { cout<<"Leap year"; } return 0; }
8eb82e0e7c0bbaffd7a940ffdbc298814b8da60b
eac2c2689e1db10e603a2f4e906b79fc2499b91e
bonly/exercise
/2010/201004/20100425_GetObj.cpp
C++
cpp
1,736
no_license
/** * @file 20100425_GetObj.cpp * * @date 2012-3-13 * @Author: Bonly */ #include "20100425_GetObj.h" #define IMGSEG #define RES(O,F) OBJ<Obj,void*> V_##O; #include "20100425_Resource.inc" #undef RES #define RES(O,F) (OBJ<Obj,void*>*)&V_##O, OBJ<Obj, void*>* List[] = { #include "20100425_Resource.inc" ...
eb286afd8bbdb8fb5fcf2d2361f969478b5c51a5
c9e0bac95b06eb2c4e9e9dc17de3bced2bd1bb26
vishaalravikumar/Vishaal_cclab2016
/W08 H08/Repulsion revised/src/ofApp.cpp
C++
cpp
2,934
no_license
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ //setting up the grid ptsW = 200; ptsH = 200; for(int i = 0; i< ptsW; i++){ for(int j = 0; j < ptsH; j++){ float x = ofMap(i,0, ptsW, 0,ofGetWidth());...
24ff94d44c6548b841452cb7be757c1c0d1d69e2
06b4d8953796b06e293b4e7d861862d36b9d89d5
lyt217/IPCCoin
/src/qt/bitcoinunits.cpp
C++
cpp
5,586
permissive
// Copyright (c) 2011-2016 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 "bitcoinunits.h" #include "primitives/transaction.h" #include <QStringList> BitcoinUnits::BitcoinUnits(QObject *p...
8f6fdb69a45c9bff3d2a108a91b3741f0112b050
c5e24424cb30c741815f935a6fb069e32845e61e
zishengye/compadre
/kokkos/core/unit_test/threads/TestThreads_TeamVectorRange.cpp
C++
cpp
2,086
permissive
/* //@HEADER // ************************************************************************ // // Kokkos v. 3.0 // Copyright (2020) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Gover...
b576c894dd442a7e659e565f4645b5248ea2f41c
64860fc798cc43aa79aaa31bf1818fa4f298ecf1
codymorg/Homework
/Archive/2020.02/CS460/CS460_project/Source/Object.cpp
C++
cpp
13,802
no_license
/****************************************************************************** Brief : manages and contains all information about the 3D object Name : Cody Morgan Date : 16 DEC 2019 ******************************************************************************/ #include "Common.h" #include "Camera.h" #i...
b4d841102582ddd6d3cfa2497d3bba8a7a642416
34658fff067ccbb81149bd77629928f2285c43a2
tuank60/ThuatToanUngDung
/WATERJUG_BFS(HAI).cpp
C++
cpp
2,075
no_license
#include <iostream> #include <string.h> using namespace std; int a, b, c; int qx[1000000], qy[1000000]; // Hang doi luu trang thai cua binh 1 va binh 2 int first, last; // Vi tri bat dau va ket thuc cua hang doi int qz[1000][1000]; // qz[i][j] so lan do nuoc toi thieu de binh 1 co i va binh 2 co j int x, y, z;...
061ee70a19e62bf90a7039ef7397be4d710f6be5
947596ffd28d529ba5faa8dd7f8e925d733bc170
najosky/darkeden-v2-serverfiles
/src/server/gameserver/skill/Uninvisibility.cpp
C++
cpp
2,219
no_license
////////////////////////////////////////////////////////////////////////////// // Filename : Uninvisibility.cpp // Written by : elca@ewestsoft.com // Description : ////////////////////////////////////////////////////////////////////////////// #include "Uninvisibility.h" #include "ZoneUtil.h" ////////////////////...
2b107f5491c8de1f20e762208c767387c32df3f9
7cf06b98c2a48f465ae9023769a0e1af0e8b857a
matabesu/arduino
/button.cpp
C++
cpp
492
no_license
const int LED = 13; const int BUTTON = 7; int val = 0; int old_val = 0; int state = 0; void setup() { // put your setup code here, to run once: pinMode(LED, OUTPUT); pinMode(BUTTON, INPUT); } void loop() { // put your main code here, to run repeatedly: val = digitalRead(BUTTON); if ((val == HIGH) && (old...
5d8e625a05b2b7b508d9dca69dde47e838211e89
97be239c65ac671c950e4af7c68c472c560765f6
labulaka6/Leetcode
/String/simple/680.cpp
C++
cpp
739
no_license
static const auto _ = [](){ ios::sync_with_stdio(false); cin.tie(nullptr); return nullptr; }(); // 双指针 class Solution { // [i, j]是否构成回文字符串 bool isPalindrome(string s, int i, int j) { while (i < j) { if (s[i++] != s[j--]) { return false; ...
ac7fd3e9749c641672e2768cc52f632adff64174
5e92b13e6b3b1fd09621dbaaa8d53dd385f1c0b1
xfdingustc/smash
/fast_ui/ui_lib/App.cpp
C++
cpp
2,482
no_license
/******************************************************************************* ** App.cpp ** ** Copyright (c) 2011 Transee Design ** All rights reserved. ** ** Description: ** ** Revision History: ** ----------------- ** 01a 27- 8-2011 Linn Song CREATE AND MODIFY ** ****************...
7b4ca46463bd65fb8b4a2d4cbc9e4d07f8ff1aaf
58bdb357d8d458093eca6bd515f7de6eed38abf3
sanity-tool/bitreader-service
/src/test/resources/parser/methodCalls.cpp
C++
cpp
396
permissive
struct Foo { void instanceMethod(); static void staticMethod(); virtual void abstractMethod() = 0; }; void instanceMethodCall(Foo *p) { p->instanceMethod(); } void staticMethodCall() { Foo::staticMethod(); } void abstractMethodCall(Foo *p) { p->abstractMethod(); } struct Bar : public Foo { void abstractMe...
6d1d0810e8f4ffcc4624926da82af9e07c2b40d2
40978430ff22793b54eaf9b158fa87fe7a655dd9
coderTong/aws-sdk-cpp
/aws-cpp-sdk-ecs/source/model/NetworkBinding.cpp
C++
cpp
2,609
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...
3adab76940293d0e58d751b7aba0d1d799c50268
73d2e66d7adcc9826db568cd148548617fd1dd95
TauGames/Rendu
/src/engine/renderers/Probe.cpp
C++
cpp
6,737
permissive
#include "Probe.hpp" #include "graphics/GPUTypes.hpp" #include "graphics/GPU.hpp" #include "resources/Library.hpp" Probe::Probe(const glm::vec3 & position, std::shared_ptr<Renderer> renderer, uint size, uint mips, const glm::vec2 & clippingPlanes) { _renderer = renderer; _framebuffer = renderer->createOutput(Textur...
ef2adcba0100b75ddb5e3e6efa254ee05a67b97d
4fb9cc5871f92386c0270c7ea0c081a769d0cb05
ingangi/chroutine
/net/epoll/epoll.hpp
C++
hpp
1,122
permissive
#pragma once /// \file epoll.hpp /// /// /// /// \author ingangi /// \version 0.1.0 /// \date 2020-04-01 #include <map> #include <stdint.h> #include "selectable_obj.hpp" namespace chr { class epoll_handler_it; class poll_it : public selectable_object_it { public: virtual int add_fd(epoll_handler_it* handler, ...
6ea5d253aeda8b46a94f340125f19fa712f161c1
d5fbac8cd6e7c6d1fff70ff7cd664b1f6ff50a54
SREERAGI18/chromium
/components/permissions/contexts/camera_pan_tilt_zoom_permission_context_unittest.cc
C++
cc
9,898
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 "components/permissions/contexts/camera_pan_tilt_zoom_permission_context.h" #include "components/content_settings/core/browser/host_content_sett...
132112890494bd58b08ed923c4e9c5c6d7536b9d
df318c167d24281b7c985ed3e5152ceb41556ac7
iannielsenCode/Highschool-Work-C-
/LETOCUR.CPP
C++
cpp
1,971
no_license
//Student: Ian Nielsen //File Name: LETOCUR.CPP //Last Updated: May 17th 2011 //I, Ian Nielsen, did not get help from anyone while working on this program. #include<iostream> using namespace std; struct List { char letter; int num; }; void enter(List[], int&); //Postcondition: The line of text...
135e89aa89efec31bb8435196d9206317b980b7e
b550ccb03b7188d72c0e787f3a5355be197522e7
leotfrancisco/patch-hosting-for-android-x86-support
/android-x86/external/opencore/nodes/pvprotocolenginenode/src/pvmf_protocol_engine_download_common.cpp
C++
cpp
5,393
no_license
/* ------------------------------------------------------------------ * Copyright (C) 2008 PacketVideo * * 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/li...
aa9374dcade08b0a22cc057a419e758cc077efda
6d5ed03716e4a88052c7b7e40040c7d578d9fec1
dongdeji/p4c
/frontends/p4/simplifyDefUse.cpp
C++
cpp
51,523
permissive
/* Copyright 2016 VMware, 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 in writing, software di...
8e890b570296c8f7a3d4cf2286ce5841cb7a67c8
d1005d1dc81b14b833c2d0e2b7ee40dcc680a17b
gem5/gem5
/src/mem/cache/compressors/cpack.hh
C++
hh
5,432
permissive
/* * Copyright (c) 2018-2020 Inria * 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 conditions and the...
8802d63d155300da8f5ecd4be7b1b30a630c5e17
0d292b4dd3e6601f76e2d73b68db9f64521a9c75
jeet-sharma-bd/CodeForces
/800/A. Night at the Museum.cpp
C++
cpp
460
no_license
#include<bits/stdc++.h> using namespace std; int main(){ string str("0abcdefghijklmnopqrstuvwxyz"); string x; cin>>x; int n; int s; int r=str.find(x[0]); s=str.find('a'); if(abs(s-r) > 13){ s=abs(s-r); n=abs(s-26); }else{ n=abs(s-r); } for(int i=0;i<x.size()-1;i++){ r=str.find(x[i]...
0430208b97ed954d34e70282c608ffdd72fc096f
1db73f5819489ef078126fc262a15a6f9f320519
rutku/uKiris
/arayuzler/tekilkuvvetekle.cpp
C++
cpp
6,794
permissive
/**************************************************************************** ** ** Copyright (C) 2017 Ramazan Utku ** Contact: ramazanutku@gmail.com ** ** This file is part of the examples of the Qt Toolkit. ** ** $UKIRIS_BEGIN_LICENSE:BSD$ ** BSD License Usage ** Alternatively, you may use this file under the terms o...
fa3d2f720b930e43fa0cda0b9fc720bad8af5879
cb76369a4c11c51faf65b1b540db65aac4986bc5
pepijndevos/scopehal
/scopeprotocols/Ethernet10BaseTDecoder.cpp
C++
cpp
9,695
permissive
/*********************************************************************************************************************** * * * ANTIKERNEL v0.1 ...
ca91e37fe7a861f631cae286185b39cdf10aa447
cc5e41bb9b8a6000206cf9389d65eb05c9071217
aditya20t/100DaysofCP
/Codeforces/A/permutation_forgery.cpp
C++
cpp
634
no_license
/* Problem Statement : https://codeforces.com/contest/1405/problem/A */ #include <bits/stdc++.h> using namespace std; typedef long long int ll; #define mp make_pair #define pb push_back void solve(){ // Solve here int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) cin>>arr[i]; for(int i=n-1;i>...
6e78e7b0e07c595db912e6a966f5df0097638ef4
ef36c13b49f14f7239ac281b2c652b76cb7aa45c
Maeiky/CpcdosOS2.1-1
/CONTRIB/LLVM/src/lib/Tg/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp
C++
cpp
1,738
permissive
//===-- NVPTXMCAsmInfo.cpp - NVPTX asm properties -------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
c0cb578c59638ee2b44bae49a35d94e031b4d974
3b4a7cb380f8c9b46afe1304d59c283bd3160a8d
rpavlik/txmpp
/src/unixfilesystem.cc
C++
cc
15,815
permissive
/* * libjingle * Copyright 2004--2006, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and...
c00cc079dcfb65ea35acfb3e965034915321dd46
77cdf2319ec2eba8d5ec20906f4fd67a904acd8c
jdolen/ZprimeAllHad
/JetAnalysis/src/JetStudies2011.cc
C++
cc
12,384
no_license
#include "Analysis/JetAnalysis/interface/JetStudies2011.h" #include "TVector3.h" #include "TLorentzVector.h" #include <sstream> #include "TRandom.h" #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" #include "DataFormats/PatCandidates/interface/Jet.h" #include "DataFormats/VertexReco/interface...
ed1c553d14a0495146d9c7a89d9f15f14f79f265
c31dcbc02fc2896ef732474c3572b60dd7dcfc37
99hgz/Algorithms
/Problems/loj/6001.cpp
C++
cpp
2,771
no_license
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> #include <iostream> using namespace std; typedef long long ll; int Q[110], dep[110]; int tot, Head[110], cur[110], Next[21000]; ll Val[21000], To[21000], Trueflow[21000]; int n, m, S, T, u, v; bool bfs() { memset(dep, ...
0420cff6c82e5913f2c87d67fb7bde2b05951ad6
a8bc23307bd2a463919f1dce4b9775fb7734f64e
NanorJ/INF1010
/TD3/depenseIndividuelle.cpp
C++
cpp
789
no_license
/*************************************************************************************************** * Titre: Travail pratique #3 - depenseIndividuelle.cpp * Auteur: Nanor Janjikian (1901777) et Stéphanie Mansour (1935595) * Date: 22 octobre 2018 * Description: Ce code contient les méthodes implémentées de depenseIndiv...
e57b2a7f5aeb332cbb11f57860b2d773f22321f3
b7fe36084edbcd5d9575a5ba9adb32e921c219cf
kwencel/FileSharer
/client/src/Client.cpp
C++
cpp
934
no_license
#include "MainWindow.h" #include <QApplication> #include <easylogging++.h> #include <boost/filesystem/operations.hpp> #include <SerializationHelper.h> INITIALIZE_EASYLOGGINGPP int main(int argc, char *argv[]) { if (argc < 3) { std::cerr << "FileSharer Client - simple P2P file-sharing program." << std::en...
a70c31887e93c426e8b5c211815d10d2572a2d48
41a04f457fac7ffc1d3f53fea6ffa6442166267d
alexandraback/datacollection
/solutions_5686275109552128_1/C++/jwbuurlage/B.cpp
C++
cpp
730
no_license
#include <iostream> #include <vector> using namespace std; int main() { int T; cin >> T; for (int run = 0; run < T; ++run) { vector<int> Ps; int D; cin >> D; for (int i = 0; i < D; ++i) { int Pi; cin >> Pi; Ps.push_back(Pi)...
41bae79a00c1e37e93bff00526e114eb5cda22e5
ec95c22bdcda0e8bd15150ce69bfafa199720107
isabella232/axis-axis1-c
/src/engine/HandlerChain.cpp
C++
cpp
3,133
permissive
/* -*- C++ -*- */ /* * Copyright 2003-2004 The Apache Software Foundation. * * 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 ...
66e01753d69f733014d15e5440a0f76ec09c86f7
72fde83d76e05c85b7fccf693476c07c6f0634ee
ljoaquin/toolbox
/test/test_format.cc
C++
cc
1,768
no_license
#include <iostream> #include "string_formater.h" // template<typename T> // void push_into_vector(std::vector<std::string>& vector_args, T arg) // { // std::stringstream ss; // ss << arg; // vector_args.push_back(ss.str()); // } // struct pass // { // template<typename... Targs> // pass(Targs...)...
a0fc4d6d1daa06093a97ba622e784f5710e2f0e3
f5d72d8c1230a79b034811e0a7ecf8c372908791
shossjer/chester
/src/utility/type_traits.hpp
C++
hpp
863
no_license
#ifndef CHESTER_UTILITY_TYPE_TRAITS_HPP #define CHESTER_UTILITY_TYPE_TRAITS_HPP #include <type_traits> namespace chester { namespace utility { template <std::size_t I> using index_constant = std::integral_constant<size_t, I>; template <typename T> struct type_is { using type = T; }; template <ty...
db793bd3ba8e74d78f3cfcee5d21935fe28579c4
f7741589a7c9f5e8e272e4f1579506342fd4893d
lovi9573/caffe
/src/caffe/layers/softmax_layer.cpp
C++
cpp
3,609
permissive
#include <algorithm> #include <vector> #include "caffe/layer.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/vision_layers.hpp" namespace caffe { template <typename Dtype> void SoftmaxLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { softmax_axis_ = ...
0a4ee071bb57ba33e62a363e121f76dc4a739cec
7ffb0b326ead787a33dacb3e3ae127556c7854df
NicolasBun/Embree
/EmbPT/renderer/renderers/openglrenderer.cpp
C++
cpp
15,267
permissive
// ======================================================================== // // Copyright 2009-2011 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // y...
398d286bdd0fde097c5f2f318dca5beb1b1725f5
12692a01d3831f207701556c3c9a8828e41921a5
errantti/ontheedge
/OtE source/menus/MenuFileParser.cpp
C++
cpp
19,805
permissive
// On the Edge // // Copyright © 2004-2021 Jukka Tykkyläinen // // 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, cop...
750eafb0e90fa260f658c1eb4ce3fee6ede440e8
8cb7e198d9a1ead1351043beec8a59f96000f5b2
reezer/maplibre-gl-native
/include/mbgl/util/noncopyable.hpp
C++
hpp
413
permissive
#pragma once namespace mbgl { namespace util { namespace non_copyable_ { class noncopyable { public: noncopyable( noncopyable const& ) = delete; noncopyable& operator=(noncopyable const& ) = delete; protected: constexpr noncopyable() = default; ~noncopyable() = default; }; } // namespace non_copyabl...
3aa4a9110c65e805842e6e54ccb013de505e0f24
0134e63d437a8bb5df4c45deefd8b027ee15f09b
someoneAlready/Summer-Code
/Codeforces/CF#192#2/B.cpp
C++
cpp
1,520
no_license
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <cctype> #include <ctime> #include <algorithm> #include <iostream> #include <queue> #include <vector> #include <set> #include <map> #include <stack> using namespace std; typedef vector<int> vi; typedef...
a9914824ea140ebc0f650bfa9acfd33f88e6fdb0
430347bde27a2451de0aa6a4e542722b51cac65d
rahedmir/CPP-Programs
/Methods/Constructor & Destructor/Constructor/Constructor.cpp
C++
cpp
612
no_license
//Constructor #include <iostream> using namespace std; class cls { private: int x,y; public: cls() //Default Constructor { cout<<"Hello from Default Constructor "<<endl; } cls(int a, int b) //Parameterized Constructor { x=a; y=b; } void add...
8a22b66ef715ad953164838943495c8855851b30
f3706e585d058260ad3809b148032365b0b37c12
CMS-TMTT/cmssw
/DataFormats/TauReco/src/PFTauTagInfo.cc
C++
cc
1,573
permissive
#include "DataFormats/TauReco/interface/PFTauTagInfo.h" using namespace std; using namespace edm; using namespace reco; PFTauTagInfo* PFTauTagInfo::clone()const{return new PFTauTagInfo(*this);} std::vector<reco::CandidatePtr> PFTauTagInfo::PFCands()const{ std::vector<reco::CandidatePtr> thePFCands; for (std::vect...
3a4d361d6ed2d96e2256bbd66408f81db9e838c5
9eb2beb635eb1e7605d8931caea19c05a455ffe6
remicollet/SkyAPM-php-sdk
/src/base64.cc
C++
cc
1,641
permissive
// 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 may not use this file except in compliance with // the License. You may obta...
e701e3d2ca4d6ad12aa8d64ca60061d9b54f63d9
0fe6a317141fec1d91c78acc88857c4f0e18e8c7
infotron/chromium-src-chrome-browser
/chromeos/login/enrollment/enrollment_screen.cc
C++
cc
11,906
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/chromeos/login/enrollment/enrollment_screen.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/logging....
e97b94ff203e6a8b62a596fb592a3605370fa256
034c401397c001c1a235e4e9ac44d043ae4ad10d
txsl/ee4-hpce-2014-cw3
/src/txl11/fast_fourier_transform_parfor.cpp
C++
cpp
4,096
no_license
#include "fourier_transform.hpp" #include <cmath> #include <cassert> #include <complex> #include "tbb/parallel_for.h" namespace hpce { namespace txl11 { class fast_fourier_transform_parfor : public fourier_transform { private: mutable unsigned chunk_size = 0; protected: /* Standard radix-2 FFT only s...
5d79367fe8d22f6cd30714c8d600ef4419ad657d
5c88add2483550d54b4c355cdf47a55639c781fc
couchbasedeps/folly
/folly/experimental/test/PrimaryPtrTest.cpp
C++
cpp
7,520
permissive
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...