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
05353fb039cc9053e0b8772a459359380b6aea6d
dea0bbf5f1d6bf01873d4bfaf1a0b36d8bd95768
otcshare/chromium-src
/services/viz/public/cpp/gpu/command_buffer_metrics.cc
C++
cc
3,660
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/viz/public/cpp/gpu/command_buffer_metrics.h" #include "base/metrics/histogram_macros.h" #include "components/viz/common/gpu/context_lo...
ac1adc88106bae45c330a408ddecadff318afb5d
6ad0966387a708fd4479393e8be76db653c59df0
sdimosik/spbspu-labs-2020-904-4
/nizkovskii.lev/A1/shape.hpp
C++
hpp
478
no_license
#ifndef SHAPE_HPP #define SHAPE_HPP #include <iostream> #include "base-types.hpp" class Shape { public: virtual ~Shape() = default; friend std::ostream & operator<<(std::ostream & out, const Shape & shape); virtual double getArea() const = 0; virtual rectangle_t getFrameRect() const = 0; virtual void move(c...
2f2c2cdd13a9c48ec1b54250d0cd990b1f149c27
48fc8db2e4ae59bb414ed9ac2e6b36ebfc4c2950
Frinter/simple-game-engine
/src/rendering/adsrenderer.cc
C++
cc
8,882
no_license
#include <cstdlib> #include <fstream> #include <iostream> #include <string> #include <vector> #include <GL/gl_core_3_3.h> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include "adsrenderer.hh" #include "shaderprogram.hh" #include "types.hh" using std::cout; using std::endl; ...
09400a2dca93b1abdd6875fe5b25fba1a1f74835
6435937f31822af9fc19c6ca49d3df2b1b85dab4
damarnadh/my-coding-binary-search-tree
/BST_L.CPP
C++
cpp
1,003
no_license
#include<conio.h> #include<iostream.h> struct Node { int key; Node *left, *right; }; Node *newNode(int item) { Node *temp = new Node; temp->key = item; temp->left = temp->right = NULL; return temp; } Node * largest(Node *root) { Node* current = root; while (current->righ...
12bc042bca4ff5fc8586933f6dc286ce31bfd98e
dafd162b885391be4037f816f227389db278995d
Twinparadox/AlgorithmProblem
/Baekjoon/2630.cpp
C++
cpp
1,031
permissive
#include <iostream> #include <vector> using namespace std; vector<vector<int> > paper; int white, blue; int scanColor(int size, int startX, int startY) { int mainColor = paper[startX][startY]; bool flag = true; for (int x = startX; flag && x < startX + size; x++) { for (int y = startY; flag && y < startY + size;...
78ae0d72eadb001e8bf575959594e9afade8365c
9928b23834597052f41bbc8f5d9c396684dacd0c
RomanMichna/diplomovka
/Src/Platform/Linux/Main.cpp
C++
cpp
5,819
no_license
/** * @file Platform/linux/Main.cpp * Implementation of the main() function for starting and stopping the module framework. * @author Colin Graf */ #include <csignal> #include <cstdio> #include <cstdlib> #include <cstring> #include <sys/types.h> #include <sys/file.h> // flock #include <fcntl.h> #include <sys/types.h> ...
a48578dace43cdd2135054830eec43eefa837e20
5439be41f940d2985fcec3fb73ba0fc9d5fec5fc
tommybee/zelda-series
/ZeldaPicross_US-src-windows/src/src/Joueur.cpp
C++
cpp
10,297
no_license
/* Zelda Picross Copyright (C) 2010 Vincent Jouillat Please send bugreports with examples or suggestions to www.zeldaroth.fr */ #include "Joueur.h" #include "Resources.h" #include "Game.h" #include "Audio.h" Joueur::Joueur(int num_save) : id(num_save), loaded(false), x(3), y(3), map(...
640ed0c05ffe91243a45074896af683e668aea70
6cded3d1fef649147f7323946216072a30f6bc8c
adizafri2000/Hashtable-Algorithm
/Hashtable.cpp
C++
cpp
1,804
no_license
// HashTable.cpp #include <vector> #include "LinkedList.cpp" template <typename T> class HashTable { vector< LinkedList<T> > table; int hashfunction (string hashitem) { const int p = 67; const int m = table.size(); long long hashValue = 0; long long pPower = 1; for (char c : hashitem) { ...
5db0d019ebccd4ccbca2d71b23bde966d67e7e56
19d0bbea36e52a04c738f5c01357bc7b27ee69a7
Markz2z/BitFunnel
/src/Mocks/src/PrimeFactorsDocument.cpp
C++
cpp
9,635
permissive
// The MIT License (MIT) // Copyright (c) 2016, Microsoft // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, mo...
a91e27c27431e4daae0223dc72335ed64f27aa62
799cf2ffcf0edadb38a962b65760dea337bfcec2
SnowFleur/Coding-Test-Collection
/최소 신장 트리/[백준] 1197 최소 스패닝 트리.cpp
C++
cpp
1,577
no_license
#include<iostream> #include<algorithm> #include<vector> constexpr int MAX_V = 10001; constexpr int MAX_E = 100001; using namespace std; using llong_t = long long; int GetParent(int); void Unione(int,int); bool Find(int,int); struct Edge { public: int v1 = 0; int v2 = 0; int weight = 0; Edge(int vertex, int vertex2...
7d7b2bdf6677ac85baa7043552547ff7bfa50afd
1587788b0536b10bcfaaf1b39f757bf978f88c43
TheNsBhasin/CodeChef
/NOCODING/main.cpp
C++
cpp
591
no_license
#include <iostream> using namespace std; int main() { int t; int length; string str; cin>>t; while(t--) { length=2; cin>>str; char prev=str[0]; for(int i=1;str[i];i++) { if(str[i]==prev) length++; else if(str[i]>prev...
3578d0a4aa7cdc8e3d2ee8bf1a13544c0fb53884
b7a4fc896415afbb9af0b97678f85408629df6e7
kwierman/universe_II
/api/TUVMEControlDevice.cc
C++
cc
3,954
no_license
#include "TUVMEControlDevice.hh" #include <sys/ioctl.h> #include <sys/fcntl.h> #include <unistd.h> //#include "ConcurrentVX40x.h" #include <iostream> TUVMEControlDevice::TUVMEControlDevice(): TUVMEDevice((uint32_t)-1) { fRevisionID = 0; } TUVMEControlDevice::~TUVMEControlDevice() { } int TUVMEControlDevice::Open()...
1b9942d1510c606ad7cd64835f0f12c61d3185ea
6fbe70d7850e7cc621c8c20d6870db7e7cc208d3
tgbugs/clasp
/src/core/symbolToEnumConverter.cc
C++
cc
6,017
no_license
/* File: symbolToEnumConverter.cc */ /* Copyright (c) 2014, Christian E. Schafmeister CLASP is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any l...
4c1288ea9ab0f121545e66fcdaec41a1ddf5f276
7c0699c947f0fb467c2c119a738af8ce987c2eed
blackberry/Boost
/libs/intrusive/example/doc_value_traits.cpp
C++
cpp
4,028
permissive
///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2006-2012 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://w...
45c37c50e58455681a618831509581049a7a6ca4
24ded4dd7a2ac6f55f980a163cfd00c4bccd3dfc
nec-mpc/Parallel-SPDZ-2
/Math/gf2n.cpp
C++
cpp
6,808
permissive
// (C) 2018 University of Bristol. See License.txt #include "Math/gf2n.h" #include "Exceptions/Exceptions.h" #include <stdint.h> #include <wmmintrin.h> #include <xmmintrin.h> #include <emmintrin.h> int gf2n_short::n; int gf2n_short::t1; int gf2n_short::t2; int gf2n_short::t3; int gf2n_short::l0; i...
81055627b8ee5a1b314bea3a40292dc1357ccfc3
5296905606549ace0e0ed3d7bde6b7e48808213e
asocha/Dagger
/GameCode/Entities/Player.hpp
C++
hpp
1,029
no_license
//===================================================== // Player.hpp // by Andrew Socha //===================================================== #pragma once #ifndef __included_Player__ #define __included_Player__ #include "Actor.hpp" #include "Engine/Input/InputSystem.hpp" class Player : public Actor{ private: vo...
6e55e1f9e8995bc46fedb16fa039f3ea05ab1cb3
fd774bca305c930d65233bf9f5c9492b7d3bf711
tesama/ofxKinectNui
/exampleAudio/src/ofApp.cpp
C++
cpp
8,684
permissive
/******************************************************************/ /** * @file ofApp.cpp * @brief Example for ofxKinectNui addon * @note * @todo * @bug * * @author sadmb * @date Oct. 28, 2011 */ /******************************************************************/ #include "ofApp.h" #include "ofxKinectNuiDra...
170fe4123e10a8342ece07361c0c65b3aff167a8
6860c1ae84014cd872e3b803c6450f227384632c
WestRyanK/Rodent-VR
/RodentVR/Intermediate/Build/Win64/RodentVR/Inc/OculusMR/OculusMR_PlaneMeshComponent.gen.cpp
C++
cpp
27,856
no_license
// Copyright Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ========================================================================...
505890cf66a7f52a906595e3395af68f5a7177d9
2a6a58078aac42a9291612f2793eec96fa880d3b
Aditya867/cpp_projects
/Assignment/Assignment1/BitwiseOperator.cpp
C++
cpp
515
no_license
#include <iostream> using namespace std; int main() { int a, b; cout<<" enter the value of a:"<<endl; cin>>a; cout<<" enter the value of b:"<<endl; cin>>b; cout << "Bitwise AND of a and b :"<< (a&b) <<endl; cout << "Bitwise OR of a and b :"<< (a|b) <<endl; cout <<"exclusive OR :"<< (a^b...
d6cb56164f4428522df4c164cdf57ea95557d2de
dab7b172ff86a8e19533b488638fb061f9aad12c
InfallibleProgrammer/Embedded-MP3
/L2_Drivers/base/i2c_base.hpp
C++
hpp
8,198
no_license
/* * SocialLedge.com - Copyright (C) 2013 * * This file is part of free software framework for embedded processors. * You can use it and/or distribute it as long as this copyright header * remains unmodified. The code is free for personal use and requires * permission to use in a commer...
82c108d1d7be04d786db4fadf9ffe6f75e96814e
5835b9a93730aeb9d5b73638c54061cbb3f75631
mianwu515/forumNet
/forumNet/NetServer.cpp
C++
cpp
13,802
no_license
#include "NetServer.h" using namespace std; void setnonblocking(int socked) { //cout << "setnonblocking" << endl; int opts = fcntl(socked, F_GETFL); if (opts<0) { perror("fcntl(socked,GETFL)"); exit(1); } if (fcntl(socked, F_SETFL, opts | O_NONBLOCK)<0) { perror("fcntl(sock,SETFL,opts)"); exit(1); } }...
34bc144720283baa61e3925afd11fa8edd5fad5e
05e8691d3987ba1318058032265fe0da513c5dbb
milan-r-shah/RoboND_Path_Planning_and_Navigation_Labs
/Minkowski_Sum/main.cpp
C++
cpp
1,115
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Print 2D vectors coordinate values void print2DVector(vector<vector<int> > vec) { // Sorting the vector for grading purpose sort(vec.begin(), vec.end()); for (int i = 0; i < vec.size(); ++i) { for (int j = 0; j < v...
f4b9f339c2ab109bba0f135655dd0a809e951efb
8bf32ea4fec4a51262caf4b1ddcd3eb2da0ffec2
SunHoJeong/algorithm
/11779_dijkstra.cpp
C++
cpp
1,458
no_license
// // 11779.cpp // Algorithm_2017 // // Created by 수노 on 2017. 2. 14.. // Copyright © 2017년 수노. All rights reserved. // #include <iostream> #include <vector> #include <stack> using namespace std; typedef pair<int, int> P; const int INF = 1000000000; vector<P> v[1005]; bool visited[1005]; int dist[1005]; int root...
334004064633a3556373c4e31059fe84947e79e0
43b6f91b19f9fef40a8b081a52461656f8fdc3b8
pedropaulo42/Maratona-de-Programacao
/URI/1 - Iniciante/1050 - DDD.cpp
C++
cpp
796
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int dd; scanf("%d",&dd); switch(dd){ case 61: printf("Brasilia\n"); break; case 71: printf("Salvador\n"); break; case 11: printf("Sao Paulo\...
4b8b7dea484a711a10fa8642385655dc064459c8
34fc8f71f023554ea68e5a356732e2c55d200806
AustinButterfield/Schedule-Project
/Prototype1-FINAL.cpp
C++
cpp
10,423
no_license
#include <iostream> #include <cmath> #include <cstdlib> #include <string> #include <iomanip> /////////////////////////////////////////////////////////////////////////////////// class Schedule { private: //Parts of the date int hour; std::string minute; //This will be what is scheduled for that day std::st...
d62eefcb656d5c286b6b04accbed9daf947b57f8
c69fd34fe9fff920592079ad11b29a071376d1df
g2-aj/nextpnr
/ice40/arch_place.cc
C++
cc
5,868
permissive
/* * nextpnr -- Next Generation Place and Route * * Copyright (C) 2018 Clifford Wolf <clifford@symbioticeda.com> * Copyright (C) 2018 David Shah <david@symbioticeda.com> * Copyright (C) 2018 Serge Bazanski <q3k@symbioticeda.com> * * Permission to use, copy, modify, and/or distribute this software for any...
687992ba3edfbe431df0bafc9f4ed90d4c9b3f22
2acd65800218d07eb5130621f427ba9fae9c51fa
RafalMarecki/Dron
/src/Dron.cpp
C++
cpp
7,360
permissive
#include <iostream> #include <unistd.h> #include "/home/rafaeldali/Pulpit/Dane do programów/droniarz/inc/Dron.hh" #include "/home/rafaeldali/Pulpit/Dane do programów/droniarz/inc/Wirnik.hh" #include "/home/rafaeldali/Pulpit/Dane do programów/droniarz/inc/Bryla.hh" #define PI 3.14 Dron::Dron (double bokA, double bokB,...
d6fe59febfe4a350e31bd1f34c304a4d2a012708
b029b56bb1b430b3c410b9c299eed818e57a5220
fengbingchun/PyTorch_Test
/src/onnxruntime/onnxruntime/core/providers/dml/DmlExecutionProvider/src/GraphTransformer.cpp
C++
cpp
13,418
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "precomp.h" #include "GraphTransformer.h" #include "Operators/OperatorRegistration.h" #include "Operators/OperatorUtility.h" #include "ExecutionProvider.h" #include "GraphPartitioner.h" #include "core/providers/dml...
f5e8b09b65204a4725fd6fc6b981ac3b61baf9f5
566af74fda6db1d730950258ec27856e2fb77384
jackwangPKU/online_CAPS
/reservoir.cpp
C++
cpp
4,210
no_license
#include <cstdio> #include <cstring> #include <cstdlib> #include <sys/time.h> #include <ctime> using namespace std; const int PGAP = 1024/64; const int MAXL = 100000+3; const int MAXH = 8192; const int domain = 256; const int STEP = 10000; const int CacheLineSize = 30 * 1024 * 1024 / 64; struct node { unsigned lon...
0d6e60d88cf7e828694eec489c54e99f2299aa85
54a1bdee3bbd407d9ff0155d9ae944ad5bc763c4
cossacklabs/themis
/src/wrappers/themis/themispp/exception.hpp
C++
hpp
1,217
permissive
/* * Copyright (c) 2015 Cossack Labs Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
6e4caaf6be34fa34fa58f6243cca05ab18379c77
703f0171b768de5f4bb23cdca9ace54712003249
platanit087/catkin_ws
/src/environment/src/environment.cpp
C++
cpp
3,304
no_license
/** * environment.cpp * Fecha de creación: 22/04/2016, 14:24:22 * * Desarrollador Reynaldo Martell Avila * 2016 Universidad Nacional Autónoma de México - UNAM. * Instituto de Investigaciones en Matemáticas Aplicadas y en Sistemas - IIMAS. * Laboratorio de Bio-robótica. * Señales Imagenes y Ambientes Virtuales. ...
e84f41680ab05ec52ad57e48c4626459b9653fca
c32ec24a3d428a4c32a94d3ebfc8c9a2b97f8aa3
Lightning101/FingerPrintUnlock
/FingerPrintUnlock/UnlockManager.cpp
C++
cpp
3,607
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: UnlockManager.cpp * Author: sean * * Created on August 22, 2018, 3:13 AM */ #include "UnlockManager.h" #include <...
7365eb71ab8899b08e0717093ef540a84eb887da
d8e3db1ff3a10989e0399b25e6551cc9116223a2
h7ga40/HTS_Engine_GR-MANGO
/mbed_gr_libs/R_BSP/common/R_BSP_SerialFamily.cpp
C++
cpp
4,830
no_license
/******************************************************************************* * DISCLAIMER * This software is supplied by Renesas Electronics Corporation and is only * intended for use with Renesas products. No other uses are authorized. This * software is owned by Renesas Electronics Corporation and is protected un...
ac766235b5ddaabb9622827a5a57774a8667af4c
5d547f52f96da3b17c0125dc580cbe1e43f42d09
rajneeshkumar146/pepcoding-Batches
/2019/Sept(91)/lecture_005_matrix/l001.cpp
C++
cpp
2,385
no_license
#include <iostream> #include <vector> using namespace std; void input(vector<vector<int>> &arr) { for (int r = 0; r < arr.size(); r++) { for (int c = 0; c < arr[0].size(); c++) { cin >> arr[r][c]; } } } void display(vector<vector<int>> &arr) { for (int r = 0; r < ar...
3cd049a1d0695e1352f140e1745355c42307ef65
5972e131752356513a470896192e2ec76c9f030f
fengshen024/Algorithm
/AlgorithmNote/AlgorithmNote-Code/第9章 数据结构专题2/A1043.cpp
C++
cpp
2,131
no_license
/* * @Author: wuyangjun * @Date: 2019-08-12 20:58:11 * @LastEditTime: 2019-08-12 21:34:22 * @Github: https://github.com/wyjoutstanding */ #include <bits/stdc++.h> using namespace std; struct TNode { int data; TNode *lchild, *rchild; TNode() { lchild = NULL; rchild = NULL; } }; TNode...
91b37e76bba33afeaadbc6569a69f484d22fd45a
6394786519ddb999efd44891fd6db2bdf7131b22
md1894/competitive-coding
/dynamicProgramming2/lectures/lcsIterative.cpp
C++
cpp
1,418
no_license
/* using dynamic programming */ /* LCS - Problem Send Feedback Given 2 strings of S1 and S2 with lengths m and n respectively, find the length of longest common subsequence. A subsequence of a string S whose length is n, is a string containing characters in same relative order as they are present in S, but not necessar...
39767be75e99f7facfce1b28258ed3db56016c89
5e1b658786b2f969c233a9c131b587b781da31e8
uel-dataexchange/Opencascade_uel
/drv/Graphic2d/Graphic2d_SequenceOfPolyline_0.cxx
C++
cxx
1,323
no_license
// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #include <Graphic2d_SequenceOfPolyline.hxx> #ifnde...
5b51d962e7505bbe4036124e60debe31950ee93d
f3986bd1d6d63374d4cf78c4f385e5479df3909b
ChrisDeGrendele/amrex
/Tools/C_util/WritePlotFile.cpp
C++
cpp
13,303
permissive
// Lifted code from the HCAll version of HyperCLaw for writing plotfiles. // Have to fake a level 0 data set, and then use incoming multifab as // level 1 data. All this could be cleaner, but this is throw-away code // anyway, so why bother? #include <iostream> #include <fstream> #include <unistd.h> #include <AMReX_...
b68c66a72d04e4f7efd43d4784c7bfae1f2745e9
b5f69e5733838e8c6305b202b98dc6dac49c72b2
arrfou99/ros2-code-examples
/simple_publisher/src/publisher_main.cpp
C++
cpp
298
permissive
#include "rclcpp/rclcpp.hpp" #include "simple_publisher/simple_publisher_node.hpp" int main(int argc, char ** argv) { rclcpp::init(argc, argv); std::shared_ptr<SimplePublisherNode> node = std::make_shared<SimplePublisherNode>(); rclcpp::spin(node); rclcpp::shutdown(); return 0; }
d2cee8325a4e74ca20d286a9594c8b59261b1de4
8c34d518141798a3f4ca6fd7a1888b90a8e3c397
OpenXRay/xray-15
/cs/engine/xrEngine/editor_environment_ambients_ambient.hpp
C++
hpp
2,863
permissive
//////////////////////////////////////////////////////////////////////////// // Module : editor_environment_ambients_ambient.hpp // Created : 04.01.2008 // Modified : 04.01.2008 // Author : Dmitriy Iassenev // Description : editor environment ambients ambient class ////////////////////////////////////////////////...
9c1da8513dc38455549fc3770f186326db702bbb
7c9209010ecaba9c46aaa5863668a1a4a0af9e4f
LucaMazzei88/CefiCourse
/Prova di Esame/ContaVocaliTXT/main.cpp
C++
cpp
805
permissive
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> using namespace std; int main() { FILE* vocali=fopen("Vocali.txt","r"); if(vocali==NULL) { cout<<"File Non Trovato"<<endl; exit(0); } FILE* scriviVocali=fopen("Scrivi Vocali.txt","w"); char stringVoca...
00ac2a0622bcfdbca711229e46626f400da925a7
1a7a828e64c2f41ba420e70c8b5d4bb40a082706
JungNamgyu/Algorithm
/Problem Source/Baekjoon Online Judge/10000~/13301. 타일 장식물.cpp
C++
cpp
218
no_license
#include<iostream> using namespace std; int main() { long long Ans = 0, N, D[81] = { 0, 1, }; cin >> N; for (int i = 2; i <= N; i++) D[i] = D[i - 1] + D[i - 2]; cout << D[N] * 4 + D[N - 1] * 2; return 0; }
fde9bf3f365676a8854985dcfd7581b122dab3b9
c2e64b399f7412f18df7616df39ef04a5371c872
TheWaWaR/evmone
/test/unittests/evm_test.cpp
C++
cpp
31,269
permissive
// evmone: Fast Ethereum Virtual Machine implementation // Copyright 2019-2020 The evmone Authors. // SPDX-License-Identifier: Apache-2.0 #include "evm_fixture.hpp" #include <evmc/instructions.h> #include <evmone/limits.hpp> #include <intx/intx.hpp> #include <algorithm> #include <numeric> using namespace evmc::litera...
08552960800bf2c3b155fa18c0ada1e737543d4d
191106da656cfa298b48c043912d92a8e1a5718f
pierobot/piestd
/lib/include/pie/type_traits/is_constructible.hpp
C++
hpp
1,631
no_license
#pragma once #include <pie/type_traits/integral_constant.hpp> #include <pie/type_traits/add_const.hpp> #include <pie/type_traits/add_lvalue_reference.hpp> #include <pie/type_traits/add_rvalue_reference.hpp> namespace pie { template<class Type, class... Args> struct is_constructible : pie::integral_constant<bo...
e2398d1d553f4d48a6df22a1a40be19065697b29
a4e3958053118d84170817ea0b5eccdc20708ce4
HHHHHHHHHHHHHHHHHHHHHCS/MyOpenGLStudy01
/MyOpenGLStudy01/_06_CoordinateSystems.cpp
C++
cpp
5,195
no_license
#include "_06_CoordinateSystems.h" #include "stb_image.h" int _06_CoordinateSystems::DoMain() { CommonBaseScript::InitOpenGL(); GLFWwindow* window = CommonBaseScript::InitWindow(); if (window == nullptr) { return -1; } unsigned int texture0; glGenTextures(1, &texture0); glBindTexture(GL_TEXTURE_2D, textu...
198040109d47deb505852fa7fd9d23d316047af0
ab773418d48aa2bf13c2ce4424f156ba7fa127ac
alexandraback/datacollection
/solutions_5631572862566400_0/C++/damianhxy/test.cpp
C++
cpp
1,015
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; int T, N; int BFF[15]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> T; for (int a = 1; a <= T; ++a) { cin >> N; for (int b = 1; b <= N; ++b) cin >> BFF[b]; int maxi = 0; ...
b4c0b13da32fe80351891a908d03c144799bc3dd
d1fdd84178a43b592151c884ac2a7e71f25448ab
codeakki/DSA
/350.intersection-of-two-arrays-ii.cpp
C++
cpp
2,709
no_license
/* * @lc app=leetcode id=350 lang=cpp * * [350] Intersection of Two Arrays II */ // @lc code=start class Solution { public: vector<int> intersect(vector<int> &nums1, vector<int> &nums2) { /* if (nums1.size() > nums2.size()) return intersect(nums2, nums1); //Thi...
d5f22bcafd5982c30c13f613165750bab2ce97f1
be1deb00ecfe3f9b89327b4f321b59ea57f673ec
paulocosta33/cal_proj
/WITHMENU2/Main.cpp
C++
cpp
6,464
no_license
//============================================================================ // Name : cal_proj.cpp // Author : paulo costa // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //======================================================================...
1fdf81136d04efb6ac182073e486e35397e11d7a
9334f7729abf2c62455b898b167bb689de23b8b6
mockingbirdnest/Principia
/numerics/poisson_series.hpp
C++
hpp
16,696
permissive
#pragma once #include <algorithm> #include <functional> #include <map> #include <ostream> #include <string> #include <utility> #include <vector> #include "base/macros.hpp" // 🧙 For forward declarations. #include "base/not_null.hpp" #include "geometry/complexification.hpp" #include "geometry/hilbert.hpp" #include "g...
43216bf5dc3bb003ed319761767a337f1ccba78a
fd10bd327678e9da10d2e796c528010ae1deab2b
cup2of2tea/CompetitiveProgramming
/codeforces/Codeforces_Round_#309_(Div_2)/B_Ohana_Cleans_Up.cpp
C++
cpp
458
no_license
#include <iostream> #include <vector> #include <algorithm> #include <time.h> #include <cstdlib> #include <cstdio> #include <cmath> using namespace std;   int main() { int N; cin>>N; int res =0; vector<string> board(N); for(int c=0;c<N;c++) { cin>>board[c]; int act = 0; fo...
8da36b8fd9938fb5aa10c3be0ebfda56a6fc4007
647901b702dd40afa53f8894e468bd9452635cd8
sgf/xUnitpp
/external/tinyxml2/tinyxml2.cpp
C++
cpp
52,939
permissive
/* Original code by Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, includi...
7954fbbbf47c5f2cfd51a3909ceec1f5d6e8f2f2
839f9a096a8c6d701d83b99d296c2f52e04308b4
zpoint/Reading-Exercises-Notes
/C++ Primer/4_Fundamentals/4_35.cpp
C++
cpp
610
no_license
#include <iostream> int main() { char cval; int ival; unsigned int ui; float fval; double dval; cval = 'a' + 3; // 'a' convert to int, after +, convert back to char std::cout << "cval: " << cval << std::endl; fval = ui - ival * 1.0; // ival to double, ui to double, result to float std::cout << "fval...
16bc4a538c95d1e177bb3eee11c4c09fadcddbc5
2da30c342682840c1fe37538ffc15b92f1e285bf
TYakumo/AtCoder
/arc123/A.cpp
C++
cpp
1,283
no_license
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <vector> #include <map> #include <queue> #include <set> #include <cmath> #include <queue> #include <unordered_map> #include <unordered_set> #include <sstream> #include <iomanip> using namespace std; using VI = vector <int>; using VV...
a359aa06973533c9925184bbe046baec704a1209
d86665aae0771eb5c52918d4a8a1620bd7e55ccd
rzr/chromium-crosswalk
/chrome/browser/extensions/active_tab_unittest.cc
C++
cc
14,656
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 <string> #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" #include "base/...
1595a69fe3bea51523a52fe6b127efcd229093b6
f77396a40d787cb4f90715ef40a2abf9eb69f5f7
typhigh/TColDB
/src/Common/Command.cpp
C++
cpp
561
no_license
#include "Command.h" using namespace std; namespace Common { string Command::GetContent() const { return cmd; } void Command::SetResult(const string& result) { { lock_guard<std::mutex> lock(mutex); if (done) { return; } this->result = result; done = t...
4ed7aa930605c93df0adfc448f8e9968d3533d76
d478e6701f95656d0ee477c936323a10ad9a6a7d
syan0127/PathTracer
/assignment_package/src/integrators/directlightingintegrator.cpp
C++
cpp
3,555
no_license
#include "directlightingintegrator.h" #include "fulllightingintegrator.h" Color3f DirectLightingIntegrator::Li(const Ray &ray, const Scene &scene, std::shared_ptr<Sampler> sampler, int depth) const { Color3f light_color(0.f); Color3f brdf_color(0.f); Color3f Le(0.f); Intersection isect = Intersection();...
0316388e747cf937eb003c803b1f20112b387111
71d5fe57251d664ccadc10bfa16a4c5d28aca0e0
leftumbrella/24-Point
/24Point.cpp
C++
cpp
2,058
no_license
#include <iostream> #include <string> using namespace std; char oper[4] = { '+','-','*','/' }; string getKey(int* iniNum); double useOper(double a, int x, double b); int main() { while (true) { int iniNum[4]; //cin four numbres for (int i = 0; i < 4; i++){ cin >> iniNum[i]; } cout << "The key is : " << getKey...
b33d4c11b36bedf4cc824c1d7afc4ac5b9b652eb
7a85c557e519829943cb7ae69bd6e24f681b8bc7
xrLil-Batya/cordisproject
/src/xrServerEntities/xrServer_Objects_script2.cpp
C++
cpp
773
permissive
#include "pch_script.h" #include "xrServer_Objects.h" #include "xrServer_script_macroses.h" #include "xrScriptEngine/ScriptExporter.hpp" using namespace luabind; #ifdef XRGAME_EXPORTS SCRIPT_EXPORT(CSE_PHSkeleton, (), { module(luaState)[class_<CSE_PHSkeleton>("cse_ph_skeleton")]; }); SCRIPT_EXPORT(CSE_AbstractVisua...
e2e7a4b3dc786798cb91ba82a2fb6d2b58458d58
a15b93295d609e40ce2b2d03c05cbcb9c5010b1c
parasjain99/Cryptography-Lab
/Lab_1/Q1.cpp
C++
cpp
496
no_license
#include<bits/stdc++.h> using namespace std; int main(){ string s,out, out1; cout<<"Enter String\n"; getline(cin,s); // Input for(int i=0;i<s.length();i++){ // Iterating every character out.push_back((char)(s[i] ^ 0)); //Taking xor with 0 number and pushing into the output string out1...
3c9c8393c8b9869f3e4a581de5c84b013e499fdd
d0fbe635e709620406150489ff91c4bab6ace8a1
c2fcoin/sins-coin
/src/init.cpp
C++
cpp
82,118
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017-2019 The SafeInsure Core developers // Distributed under the MIT software license, see the accompanying // fil...
448efa68edc5ea0fb938103713c7cfdad5048e30
dc4eb7307ad139d94033d8beaf96fe09b67fe874
KaiqiaoYang/ykqCode
/Algorithm/006_P017/Project1/Project1/源.cpp
C++
cpp
972
no_license
#include<iostream> #include<vector> #include<algorithm> #include<limits> using namespace std; struct MyStruct { vector<int>A; }; MyStruct Merge(MyStruct mystruct, int p, int q, int r) { int n1 = q - p + 1; int n2 = r - q; vector<int>L1; vector<int>L2; for (int i = 0; i < n1; i++) { //L1[i] = mystruct.A[p+i]...
816a48b29918c8f263a8443b9c6589a76d8cacfe
d3d164ce116eedd1c4bc222e37bbd36972fa289e
Andrey-Uvarov/300-bucks
/main.cpp
C++
cpp
3,153
no_license
#include <iostream> #include <iomanip> #include <ctime> using namespace std; int** formMatrix(int n, int m); void printMatrix(int** matrix, int n, int m); void fillMatrix(int** matrix, int n, int m); void deleteMatrix(int** matrix, int n, int m); void changeRomColumn(int** matrix, int n, int m, int k); //task 11 int ...
a6aea8b9dbc9326b2a6b656897924dddbfa4328a
5fc466dbee65c7b3da9c2d5870debc3ff0889597
belyaev-mikhail/iterations
/bfs_iterator.hpp
C++
hpp
2,752
permissive
/* * bfs_iterator.hpp * * Created on: Nov 25, 2015 * Author: belyaev */ #ifndef BFS_ITERATOR_HPP #define BFS_ITERATOR_HPP #include "iterator_adapter.hpp" #include "shared_queue.hpp" namespace essentials { namespace iterations { struct bfs_identity { template<class T> T&& operator()(T&& value) con...
0c4f43113405b2814c8723ab4d250adde7659065
7c0afe0c35ad52094d1b99f7dbd95241690e2d75
idvr/Seg3D
/src/Application/Clipboard/Clipboard.cc
C++
cc
3,982
permissive
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2015 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software")...
87531acca7be03f38dc5293dec725df69cd12b0f
da1b38a03d717dca44ffc5ebd570c44990623c0c
juanmaGHutchison/OPTIMIZACION_POR_COLONIAS_DE_HORMIGAS
/ACO_CPP/tablero.hpp
C++
hpp
14,417
no_license
#ifndef TABLERO_HPP_ #define TABLERO_HPP_ #include "listaenla.hpp" #include "hormigas.hpp" #include "camino.hpp" #include <vector> #include <ctime> #include <algorithm> #include <limits> #include <iostream> #include <iomanip> template <typename T> class Tablero { public: /********************************************...
2ab5a7e6cbe58bd6cb3e904e71c403ab0af7b185
5d99357d03c20560c32994410d994d1dd034dcaa
ajmarin/coding
/uva/Volume C/10060.cpp
C++
cpp
694
no_license
#include <cstdio> #include <cmath> const double PI = acos(-1); const double EPS = 1e-5; bool cmp(double a, double b){ return fabs(a - b) > EPS; } int main(void){ double total_mat, area; double R, T, thickness, x0, y0, xp, yp, x, y; for(int n; scanf("%d", &n) == 1 && n; ){ total_mat = 0; for(int i = 0; i < n...
35b2f4488d167212518bf1066d0a5a7983dd01ae
2be5a705265a6f5dd168fcbdb54dc75cbe62d8c2
Greycher/Block-Breaker-Origin
/main.cpp
C++
cpp
1,915
no_license
#include <iostream> #include <windows.h> #include "motor.h" RectangleShape* bouncer; Circle* ball; Rigidbody* rbBall; bool launched = false; int main() { World world(1200,600); RectangleShape leftBorder(-10,World::center.y,20,600); Rigidbody rbLeftBorder(leftBorder); rbLeftBorder.bodyType = Static; Rectangle...
3e309c2342e3f2821a18cf3d01d57ab4ace732e9
c3e5217e51b605197046affd293fca071d74a4e0
samuelwg/hoffmannfollower
/slros_busmsg_conversion.cpp
C++
cpp
7,203
no_license
#include "slros_busmsg_conversion.h" // Conversions between SL_Bus_hoffmannFollower_geometry_msgs_Point and geometry_msgs::Point void convertFromBus(geometry_msgs::Point* msgPtr, SL_Bus_hoffmannFollower_geometry_msgs_Point const* busPtr) { const std::string rosMessageType("geometry_msgs/Point"); msgPtr->x = bu...
5b1d961b652e3c356534b4a75831063ea641e013
b0fea808afd600205b78fa9cc077b470667a9631
Bill-hbrhbr/LeetCode
/Cpp/0008_String_to_Integer_(atoi).cpp
C++
cpp
1,127
no_license
#include <cmath> class Solution { public: inline bool isDigit(char &ch) { if (ch >= '0' && ch <= '9') { return true; } else { return false; } } int myAtoi(string str) { long long n = 0; char ch; int sign; unsigned index = 0; ...
0bdb07f1e5f8c7f9f933983b0e0aa3b728403ba2
3f7e94676693280964ce61e535513ec79483a859
yongdono/Panasee
/PanaSkin/PanaListCtrl.cpp
C++
cpp
7,334
no_license
// PanaListCtrl.cpp : implementation file // #include "stdafx.h" #include "PanaListCtrl.h" #include "ShowImage.h" #include "Resource.h" #include "MemDC.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif //////////////////////////////////////////////////////////////////...
518fa0f44f481ec9f9c2a26e1fe3410136bd90d9
87f519e7a4ecaa74480dba30916052da92c4550d
ctyVegetableDog/leetcode
/helloLeet/0009.cpp
C++
cpp
283
no_license
//reverse half class Solution { public: bool isPalindrome(int x) { if (x < 0 || (x != 0 && x%10 == 0)) return false; int y = 0; while (x > y){ y = y * 10 + x % 10; x /= 10; } return x == y || x == y / 10; } };
3edc70f1f4ad4f2e73d22da13c4f0f806ed51f48
dc000145ec15957259223847943f422ed059535e
gavr97/path-search
/algorithm/node.cpp
C++
cpp
1,144
no_license
#include "../global/globalTypes.h" bool Node::operator <(const Node &right) const { bool is1 = this->fVal == right.fVal; bool is2 = this->x == right.x; return ((this->fVal < right.fVal) || ((is1) && (this->x < right.x)) || (is1 && is2 && (this->y < right.y))); } bool Node::operator == (const Node &right) ...
4391870ad0592029b2600ea53bde916aad4bf747
5b18313c51927d4bad7b51abbabd6c700a61aa39
thomas3016/obstacle_detector
/src/panels/obstacle_publisher_panel.cpp
C++
cpp
10,937
no_license
/* * Software License Agreement (BSD License) * * Copyright (c) 2017, Poznan University of Technology * 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 c...
c958bd2b67dff95333deb3b61ee024983212ea90
86b8d0c0a8e9bd3db4bce8ed8a189c35cba0133a
Raunak173/hacktoberfest
/LeetCodeSolutions/searchmatrix2.cpp
C++
cpp
400
no_license
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int row = 0, col = matrix[0].size()-1; while (row < matrix.size() && col >= 0) { if (target == matrix[row][col]) return true; target > matr...
56c77b9a34df15f8f1c1a57817abc28291810b2d
55550930e905b1d3f82a1d2a73d14aa6d0b05147
davidrihtarsic/davidrihtarsic.github.io
/Racunalnik_v_pouku_Fizike/Skripta/RvPF_2021/src/main.cpp
C++
cpp
201
no_license
#include <Arduino.h> void setup() { Serial.begin(9600); for (int i = 0; i < 100; i++) { int analogni_senzor = analogRead(A0); Serial.println(analogni_senzor); } } void loop() { }
f6ddf477d4128a1959c511de065badbef783dc9d
e079521d0ca84475ccef9f5c60b9ba0ebac573b1
lqhl/PowerWalk
/toolkits/computer_vision/stitching_detailed.cpp
C++
cpp
27,205
permissive
/* * Copyright (c) 2009 Carnegie Mellon University. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2....
48dc89d7aa8bbf560c2acf15a61ee3a9c555517b
0a885fcd26e8445d63c965e5e57a33f3bcaaea7c
ajagow/ComputerGraphics
/Lab5_Part2/main.cpp
C++
cpp
564
no_license
/** * Support code written by Erik W. Anderson */ #include <QtCore> #include <QtGui> #include <QtOpenGL> // Lab application #include "Lab.h" int main(int argc, char** argv) { QApplication a(argc, argv); QString appDir = a.applicationDirPath(); QDir::setCurrent(appDir); QSurfaceFormat fmt; ...
5c2fa1f0759b85df1dc5fd7e81655e8c76202569
e19088ab4b02aa667e8eb18df7d5f9d1a8a49fe3
YoshiPark/code_exercise
/leetcode/278. First Bad Version/Solution.hpp
C++
hpp
419
no_license
// Forward declaration of isBadVersion API. bool isBadVersion(int version); class Solution { public: int firstBadVersion(int n) { int low = 1; int high = n; while (low < high) { int mid = low + (high - low) / 2; if (isBadVersion(mid)) { high = mid; ...
f28ef42cb512a0ad6ed7aedfca4d7524411b1390
ee69215aff77e55f7de98dd913602d5c6e050851
allenwhale/ACM
/codebook/ds/test/hdu4347.cpp
C++
cpp
6,609
no_license
#include <bits/stdc++.h> using namespace std; using namespace std::placeholders; #define MAXN 65536 #define SQR(x) ((x) * (x)) namespace KD { int degree = 2; const double alpha = 0.75; typedef long long T; struct Point { vector<T> d; int index; Point() {} Point(const vector<T> &_d, int _i=-1): d(_d), ind...
55cbda9aef52faa7cc998cfa72ff9226c47b2604
ddc883a1ba3432a2ae3f4a26a5198a128e2ba155
kbyando/meped-ptelescope
/include/MEPED_BField.hh
C++
hh
993
permissive
// NOAA POES Monte Carlo Simulation v1.3, 17/09/2008e // MEPED :: Proton Telescope // Karl Yando, Professor Robyn Millan // Dartmouth College, 2008 // // "MEPED_BField.hh" // Created 01/29/2008 by Karl Yando, modified 04/14/2008 to v1.0 #ifndef MEPED_BField_H #define MEPED_BField_H 1 #include "globals.hh" #include "G...
475fdf29f9a4d1440f8f9948ec6bb4ff222c59d5
4f65237feae104297a3ba968f49fa459e1186151
CTSRD-CHERI/clang
/test/SemaCXX/cheri/issue160.cpp
C++
cpp
613
permissive
// RUN: %cheri_cc1 -target-abi n64 -fsyntax-only -std=c++11 -o - -emit-llvm %s | FileCheck %s // See Sema/cheri/issue160.c // In C++, functions that differ only by __capability are allowed because // __capability-qualified pointers and references are mangled differently. struct a; void cap(struct a *) {} // CHECK: _...
8da48af54c29792e6b632356b550d848e4fa15fa
1e5fcdd0c70d3b7b2ce0bfd7508e86fb11e7f4b5
oshuakbaev/Algo
/lab1/stack_bais.cpp
C++
cpp
804
no_license
#include <iostream> using namespace std; class st{ private: int * a; int TopIndex; public: st(int n){ a = new int[n]; TopIndex = -1; } int top(){ if(TopIndex==-1 ) return -1; return a[TopIndex]; } void push...
e2250987f13a8669cc75387c6d8f1b8c03fb937f
3114c19f015344451be14d3b034949700d9b6b1d
lizy14/iMusic
/src/Parser/Segmentation.cpp
C++
cpp
2,772
permissive
/* 文件名: Segmentation.cpp 描 述: 中文分词器类的实现 作 者: 李肇阳, 清华大学软件学院, lizy14@yeah.net 创建于: 2015-10-16 环 境: Visual Studio 2012 (MSVC++ 11.0) */ #include "Segmentation.h" namespace Zhaoyang{ const int Segmentation::MAX_WORD_LENGTH = 10; const int Segmentation::MIN_WORD_LENGTH = 2; bool Segmentation::isPunctuation(CharString ...
5df8d3ec2e6cd8f2c9ca0432932894aae589decd
2722bd58032e99724fba33c0fedd5c5808564ea9
AntonovAv/BuildsTrafficLight
/DataReader.cpp
C++
cpp
4,796
no_license
// // Class allows to handle response from server that resieved by wifi module // #include "DataReader.h" char DataReader_::handleNextCharWithIPD(char c) { switch (state) { // find marker to read lenght of part of message case FIND_LEN: if (IPD_COM_TEMPLATE.charAt(char_count) == c) { char_count += 1; ...
bd6ced9b8d194c491042c47e191194f4a9b39558
9f3dba61124a66e32906c41341feba9fe8e1afee
haijun9/2019_Spring_Algorithm
/김경민/CODEFORCES/785A.cpp
C++
cpp
400
no_license
#include <bits/stdc++.h> using namespace std; int main(void){ int count,num; string str; num=0; cin>>count; for(int i=0;i<count;i++){ cin>>str; if(str=="Tetrahedron") num=num+4; else if(str=="Cube") num=num+6; else if(str=="Octahedron") num=num+8; else if(str=="Dodecahedron") nu...
77e0d092d41b5a543758dca837b247903d99bc45
100f240e65919b40f73b47745b9b39b5209c9903
AnyaIliyina/lessFiles
/packages/source_accounting/src/core/Scale.cpp
C++
cpp
3,150
no_license
#include "Scale.h" #include "Database.h" #include <QSqlError> #include <QSqlTableModel> #include <QSqlRecord> #include <QTextCodec> Scale::Scale(QString description) { m_description = description; m_id = 0; } Scale::~Scale() { } QString Scale::description() { return m_description; } Scale...
ef6586ef103ea7da8885115cbc2f368c3d39fd1a
e53504261a0f63468ec7b31c09d6f9a30fc67bc4
nickel8448/cpp
/src/codeforces/collecting_coins.cpp
C++
cpp
578
no_license
/* * Problem: https://codeforces.com/problemset/problem/1294/A * Status: Worked. Edge case was to check if that no sister has more than * totalcoins / 3 */ #include <iostream> #include <vector> int main() { int num_test_cases; std::cin >> num_test_cases; for (int i = 0; i < num_test_cases; i++) { int a,...
0d72250629f0da55568005a92697d1f4514a8a4e
28706476ebb1964bee75fd778cd95d6700819152
flxf/codeforces
/148/c.cpp
C++
cpp
1,114
no_license
#include <iostream> using namespace std; int t[100]; int fp; int n; bool rec(int oh, int wow, int pos, int sum, int mx) { //cout << oh << ":" << wow << ":" << pos << ":" << sum << ":" << mx << endl; if (mx > 50000) { return false; } if (pos > n) { return false; } if (oh == 0 && wow == 0) { fp...
003995dd17a9cae92c59074482752aa9e1ab03c7
631da33950a80765d3d94a7579078efaeced58b2
keyvank/flare
/vec.cpp
C++
cpp
362
permissive
#include "vec.h" #include <iostream> vec::vec(): x(0), y(0), z(0) { } vec::vec(const double &p_v): x(p_v), y(p_v), z(p_v) { } vec::vec(const double &p_x, const double &p_y, const double &p_z): x(p_x), y(p_y), z(p_z) { } std::ostream &operator<<(std::ostream &out, const vec &p_vec) { out << "(" << p_vec.x << ", ...
32f5102d2ac269c835a9e7318d5c827d127cac22
7a03f65d706f5f87e55ee5317bb80b2068c2f0c3
art4711/libui
/windows/drawtext.cpp
C++
cpp
15,221
permissive
// 22 december 2015 #include "uipriv_windows.hpp" #include "draw.hpp" // TODO really migrate // notes: // only available in windows 8 and newer: // - character spacing // - kerning control // - justficiation (how could I possibly be making this up?!) // - vertical text (SERIOUSLY?! WHAT THE ACTUAL FUCK, MICROSOFT?!?!?...
65f50aeeecb2a2f64f68ac1274a14691d5d509f0
01babb6a522ef5da9364d821406f2df2e401955a
murex/mikado-testbuilders-kata
/cpp/src/lib/BooksOrder.cpp
C++
cpp
1,454
permissive
/******************************************************************************* * * Copyright (c) {2003-2019} Murex S.A.S. and its affiliates. * All rights reserved. This program and the accompanying materials * are made available under the terms of the MIT License * which accompanies this distribution, and is av...
59daacaa873812fbeeae7d76aeabcdee79ab8914
e48db275d6cd8959bdc41b613f349600620d321f
Sansan222rus/fragcash
/src/qt/addresstablemodel.cpp
C++
cpp
16,113
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "addresstablemodel.h" ...
c32d87f82dcdd9a3c6c05f458cf11f0b43199e6a
de7c4a20e4460d64bebb859c9b29a0ca2a855caf
cedricpradalier/jaco-ros
/jaco_driver/src/jaco_kinematic_controller.cpp
C++
cpp
7,320
no_license
#include <kinova/KinovaTypes.h> #include "jaco_driver/jaco_kinematic_controller.h" #include <geometry_msgs/Pose.h> #include "jaco_driver/jaco_types.h" #include "jaco_driver/jaco_ik_solver.h" using namespace Eigen; using namespace std; namespace jaco { JacoKinematicController::JacoKinematicController(JacoComm &ar...
86046e1cb4eb06d521728ebcee740055eb2af8b7
54717a19871295f5c5025d2d6d02d5ad6a9301ed
zlang19/cpe315final
/main.cpp
C++
cpp
1,476
permissive
#include "thumbsim.hpp" #include "unistd.h" Memory<Data16, Data16> imem(0x8000); Memory<Data8, Data32> dmem(0xffff0000); Memory<Data32, Data32> rf(16, Data32(0)); Register pc; Options opts; int main(int argc, char **argv) { int c; string filename; while ((c = getopt(argc, argv, "pdiwsc:f:")) != -1) { s...
c900cbb055e6bafb46f0af82f412ea78f9f8da3d
10536f43154a0a90a0311ff9739292d2b2dbb514
DailinH/aoapc-book-II
/第7章 暴力求解法/7-9(1601).cpp
C++
cpp
856
no_license
#include <iostream> #include <string> #include <algorithm> #include <cstring> #include <vector> using namespace std; struct Grid { int x; int y; char val; }; int width, height, num; vector<Grid> G; bool input_graph() { cin >> width >> height >> num; cin.ignore(); if (!width) return false; for (int i = 0; i < ...
285f45e1519063dc56c44d97cfc39276ab4e764f
5d3aa52e7c2ef76f42b0c87046e8a343b25d11c3
xiaoxuehuang/OPS
/apps/c/lowdim_test/MPI_OpenMP/set_val_cpu_kernel.cpp
C++
cpp
4,136
no_license
// // auto-generated by ops.py // //user function // host stub function #ifndef OPS_LAZY void ops_par_loop_set_val(char const *name, ops_block block, int dim, int* range, ops_arg arg0, ops_arg arg1) { #else void ops_par_loop_set_val_execute(ops_kernel_descriptor *desc) { ops_block block = desc->block; int dim = ...
6d39b3faeb6a74d2d6436fb731ca3ecabf2b94ee
2801eccd843a39459e45c58db6a84c2c3098121d
peanutkingsoft/libtorrent
/bindings/python/src/create_torrent.cpp
C++
cpp
10,185
permissive
// Copyright Daniel Wallin & Arvid Norberg 2009. Use, modification and distribution is // subject to 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_python.hpp" #include <libtorrent/create_torrent.hpp> #include <libtorr...
362ceb3ab78dc2064ac6033af0ba7226fb5dd944
575225d09e51e4b1c812f20b220a4303ec7d8a0c
enfinet/spoj
/TRGRID.cpp
C++
cpp
597
no_license
#include<iostream> #include<cstdio> using namespace std; int main() { int t; scanf("%d",&t); while(t--) { int a,b; scanf("%d%d",&a,&b); if(a%2) { if(b>=a) { printf("R\n"); }else { if(b%2) printf("D\n"); ...
09e41dd47b8d328db73e6ee3678455d046e1f164
a939e6c5ea02c575e4bdd417bb5f4028662355e2
ccpcpp/NcmDump
/NcmDump/Class/Verson/taglib/asf/asfproperties.cpp
C++
cpp
4,647
no_license
/************************************************************************** copyright : (C) 2005-2007 by Lukáš Lalinský email : lalinsky@gmail.com **************************************************************************/ /************************************************************...
9bfbc9749c7e7d75a63397f0c633d1f6a11834c3
3f9f99b4cfbf9714fe1b7d7a967eec71195be101
forkrp/Enjon
/Source/Entity/Components/DirectionalLightComponent.cpp
C++
cpp
2,223
permissive
#include "Entity/Components/DirectionalLightComponent.h" #include "Entity/EntityManager.h" #include "Serialize/ByteBuffer.h" #include "Graphics/GraphicsScene.h" #include "Graphics/GraphicsSubsystem.h" #include "Base/World.h" #include "SubsystemCatalog.h" #include "Engine.h" namespace Enjon { //=======================...