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
314a48a76f6e1eec0b444c66ddcd3ccb50d6c573
fb9c48e4b083ba515efa38e2c14117883edbb436
iyybpatrick/LeetCode
/C++/Array/55. Jump Game.cpp
C++
cpp
1,041
permissive
// // 55. Jump Game.cpp // leetcode // // Created by Yuebin Yang on 2017/2/4. // Copyright © 2017年 yuebin. All rights reserved. // // Question: //Given an array of non-negative integers, you are initially positioned at the first index of the array. //Each element in the array represents your maximu...
d6deacb22edb505bef9d1235e9b377dbde8e127c
50ae200cba50a17da4094bd6f7d1c82146c445cd
schips21/cpp
/cpp_01/ex05/Human.hpp
C++
hpp
209
no_license
#ifndef HUMAN_HPP # define HUMAN_HPP #include "Brain.hpp" class Human { private: const Brain hum_brain; public: Human(); ~Human(); std::string identify() const; const Brain& getBrain() const; }; #endif
e6f2ce6dee90f881fa88482bd0af4a58a93302cd
7eb0d9b760d1152b80aca70735e983a310a49f48
iukjgo/practice_easy
/Graph/PrintAdjList/PrintAdjList.cpp
C++
cpp
659
no_license
#include "PrintAdjList.h" void Graph::addEdge(int u, int v) { // assume no duplicates are inserted mAdj[u].push_back(v); mAdj[v].push_back(u); } const std::vector<int>* Graph::getAdjList(int u) const { // no bounds-check return &mAdj[u]; } void PrintAdjList::print(const Graph& g) { for (int v...
eee72d370a2a7b810fb0cd05f7f40948736afb26
0024265db483f44005ea8947d6529d3268e3fcb8
bruc93/DirectX11_MonkeyMachine
/SchoolProject/HeightMap.cpp
C++
cpp
14,863
no_license
#include "pch.h" #include "HeightMap.h" #include "stb_image.h" HeightMap::HeightMap(char const* filename) : terrainWidth(0) , terrainHeight(0) , numFaces(0) , numVertices(0) , heightMapMesh(std::make_shared<MeshData>()) { initImageData(filename); } void HeightMap::initImageData(const char* fil...
b9f8cbccf1b4c64bc338fad66b1abf6b0c0a43aa
cb1ad58064f6216c486d4a15bb08d5af07026d8b
Tduderocks/PracticeProblems
/Ch_5/Ch5_rev6.cpp
C++
cpp
408
no_license
//Ch 5 Review 6 works:) #include <iostream> using namespace std; void DrawBar(int Length,char Mark) //Draws a bar { for(int i=0;i<Length;i++){ cout << Mark; } } void DrawBox(int longness,char Design) // Draws a box { DrawBar(4,'%'); cout << "" << endl; DrawBar(4,'%'); cout << "" << endl; DrawBar(4,'%'); cout << " ...
5f5acf06dac839fea6872f13fc488981351b42b4
8a8607c2fcb818ef83041c4a42533f96d2d33a19
takatoshi-hondo/device_controller
/app/commands/nullc.cpp
C++
cpp
425
no_license
#include <commandInterface.hpp> #include "../devc.hpp" #define COMMAND_CLASS Nullc #define COMMAND_NAME "nullc" class COMMAND_CLASS : public Command<Devc> { public: COMMAND_CLASS() : Command( COMMAND_NAME ){ } string commandFunc( Devc *ptr , list<string> args ){ return "This is command template"; } }; ex...
8c77448662a83191372cf8a6026036ecfe5c7e6e
8cc634e1326eff1633c32ba5666b081cc219de08
cyborr/clboss
/Boss/Msg/PeerMetrics.hpp
C++
hpp
1,615
permissive
#ifndef BOSS_MSG_PEERMETRICS_HPP #define BOSS_MSG_PEERMETRICS_HPP #include<memory> namespace Boss { namespace Msg { /** struct Boss::Msg::PeerMetrics * * @brief this is not an emitted message, but is instead used * in `Boss::Msg::ResponsePeerMetrics` to store the metrics * of each peer. */ struct PeerMetrics { ...
7725773d937535cf22171d6e193dc6fb5b4eb9a8
9ea653a2c5ecd8dfa1dc5484f6dc13cc9838cb49
wind123mountain/code-c
/20183604_PhongDQ_BaiTH so 3_12.cpp
C++
cpp
1,158
no_license
#include <iostream> using namespace std; struct edge{ int u,v; int w; }; int** taodsk(edge *e, int n, int m){ int **dsk = new int*[n+1]; for(int i=0;i<=n;i++) dsk[i] = new int[n+1]{}; for(int i=0;i<=n;i++) dsk[0][i] = 1; for(int i=0;i<m;i++){ dsk[e[i].u][e[i].v] = 1; dsk[e[i].v][e[i].u] = 1; } r...
ba99f8d9d99321de858a7a5d35b966f246202772
08e5bc411d7ed979b79563b4f553c4fd6b801a2f
NicolasAubinet/virtual-rock-galactic
/Source/FSD/Private/FirstPersonSkeletalMeshComponent.cpp
C++
cpp
495
no_license
#include "FirstPersonSkeletalMeshComponent.h" class APlayerController; void UFirstPersonSkeletalMeshComponent::SetFirstPersonFOVEnabled(bool bEnabled) { } bool UFirstPersonSkeletalMeshComponent::GetSetFirstPersonFOVEnabled() { return false; } FVector UFirstPersonSkeletalMeshComponent::CalcFirstPersonFOVPosition...
1e142cd354fd3765a7a9d31946d9ccc305521254
4640d73d93bcd1f8f3aa898f6ffdf62b10bbe6cf
youtube/cobalt
/third_party/skia/src/xml/SkXMLWriter.cpp
C++
cpp
7,814
permissive
/* * Copyright 2006 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/xml/SkXMLWriter.h" #include "include/core/SkStream.h" #include "include/private/SkTo.h" SkXMLWriter::SkXMLWriter(bool doEscapeMarkup) : fDo...
77bb507b898c65e9394df1e6104c088e1e6a4c42
6c05cece332d0f791ac8c30b5acec7bbf24d8eaa
ansartnl/ALPHA
/common/runwaymanager/src/Runway.cpp
C++
cpp
377
no_license
#include "Runway.h" static int i0 = qRegisterMetaTypeStreamOperators < Runway >(); QDataStream &operator<<(QDataStream &out, const Runway &runway) { out << runway.numPeople << runway.numAuto << runway.numOther; return out; } QDataStream &operator>>(QDataStream &in, Runway &runway) { in >> runway.numPeopl...
aa0c95ff8a44f2b3b500ad9b71fd5b3709ab7ba1
02aa96c90d5d8b70a9229c5fb46eba07e42fee4d
TangYucao/litiv
/modules/vptz/include/litiv/vptz/virtualptz.hpp
C++
hpp
23,155
permissive
// // Virtual PTZ Camera API // // - This work was done by Gengjie Chen while at Polytechnique Montreal, Summer 2014 - // - It is now maintained by Pierre-Luc St-Charles as part of the LITIV framework - // // For licensing info, see the LICENSE.txt file provided along with this libra...
80f53fcbf74afe54b1ffa5c92e00f73004ac8074
45e83c268ee1efd4be450541dada7d721bd8fc70
blackav/cmc-cpp-seminars
/2019-2020/sem01-02/01-hello-1.cpp
C++
cpp
295
no_license
#include <iostream> //#include <stdint.h> #include <cstdint> int main(int argc, char **argv) { int32_t a, b; //(std::cin >> a) >> b; std::cin.operator>>(a).operator>>(b); //((std::cout << a) << " " << b) << std::endl; std::cout.operator<<(a).operator<<(b).operator<<(std::endl); }
c448d128ec187e6f82513aba8d2ff8eb42c29023
4e54474046090b82e4b6c4a8c6e223b5ac521b5f
BackupTheBerlios/diptables-svn
/trunk/src/logger.cpp
C++
cpp
2,540
no_license
#include "logger.h" Logger::Logger(std::string path, int size) { error = false; maxSize = size; microSize=0; struct stat pathStat; stat (path.c_str(), &pathStat); if (!S_ISDIR(pathStat.st_mode)) { error = true; errorMessage = "Invalid directory for logging"; return; } file1 = "1.log"; file2 = "2.log"...
7f04001e33b250ba703d185de556749a1f9efd4c
f2bd3617b050f3e92128c7744afa4cd6f72389fc
fazlerahmanejazi/Competitive-Programming
/Codeforces/367/B.cpp
C++
cpp
932
no_license
#include <bits/stdc++.h> using namespace std ; #define inf 0x3f3f3f3f #define INF 1000111000111000111LL #define mod 1000000007 #define pi acos(-1.0) #define eps 1e-8 #define endl '\n' #define mp make_pair #define mt make_tuple #define pb push_back #define fi first #define se second #define all(cc) (cc).b...
bb7cce4562f2ace037648827694c4054c5d42a20
a8ef146a2490d4ab95297136276d15468d06bc69
kairanaquazi/CPP
/Midterm/07readtest.cpp
C++
cpp
2,008
no_license
#include <iostream> #include <fstream> #include <string> using namespace std; void readtest(void); void printout(string, string, int, string, int); string getstatename(string); string getgender(string); int getyear(string); string getname(string); int getcount(string); int main() { readtest(); } void readtest...
7fde59ead08f1704d4eaffcbe72c467cd2e23f97
c6885327547c496f3fcb4b6ae1d8414880d63d22
dasharadhan/sclerp_motion_planner_plugin
/src/sclerp_planning_context.cpp
C++
cpp
2,225
no_license
/* Author: Dasharadhan Mahalingam */ #include <moveit/robot_state/conversions.h> #include <moveit/planning_interface/planning_interface.h> #include <moveit_msgs/MotionPlanRequest.h> #include <moveit/planning_scene/planning_scene.h> #include "sclerp_interface/sclerp_planning_context.h" #include "sclerp_interface/scler...
59d2ae8a4b69c68d302ad8b818b29b184e14debf
813a9862e5886f86f496d3bb7e11a8268447e4b8
niuxu18/logTracker-old
/second/download/git/gumtree/git_patch_hunk_458.cpp
C++
cpp
465
no_license
GIT_COLOR_GREEN, /* NEW */ GIT_COLOR_YELLOW, /* COMMIT */ GIT_COLOR_BG_RED, /* WHITESPACE */ GIT_COLOR_NORMAL, /* FUNCINFO */ }; +static NORETURN void die_want_option(const char *option_name) +{ + die(_("option '%s' requires a value"), option_name); +} + static int parse_diff_color_slot(const char *var) { ...
9559713613bcb84c5155c12cd9f3e3950ea7125e
276fa4a479b082eef26a302b457be32f3618bf7d
GreenReach/CodeForces
/A/584A - Olesya and Rodion/main.cpp
C++
cpp
256
no_license
#include <iostream> using namespace std; int main() { int n,t,i; cin>>n>>t; if(n == 1 && t == 10) { cout<<-1; return 0; } if(t == 10) n--; cout<<t; for(i = 0; i < n - 1; i++) cout<<0; }
596c867d901ad3c6f46841400dd0d9ed8af1b375
b56cc154ce13f9b1378291afe6a69412248a2eda
yuikns/gl-earth
/include/glm/gtx/type_trait.hpp
C++
hpp
4,780
permissive
/// @ref gtx_type_trait /// @file glm/gtx/type_trait.hpp /// /// @see core (dependence) /// /// @defgroup gtx_type_trait GLM_GTX_type_trait /// @ingroup gtx /// /// @brief Defines traits for each type. /// /// <glm/gtx/type_trait.hpp> need to be included to use these functionalities. #pragma once // Dep...
99ac4fd2cf4fa072b18b434b65f285515f4748f5
7f21a3679e1107a068495d0b41d40e43102b8016
fvideen/DTNME
/servlib/dtpc/DtpcTopicCollector.cc
C++
cc
3,001
permissive
/* * Copyright 2015 United States Government as represented by NASA * Marshall Space Flight Center. All Rights Reserved. * * Released under the NASA Open Source Software Agreement version 1.3; * You may obtain a copy of the Agreement at: * * http://ti.arc.nasa.gov/opensource/nosa/ * * ...
cd6efd9a79639bdb529a0ca770e7f60722d8a732
e7691461c2c30c895f09ae90032895126a29c57a
fedorareis/SAA-App
/src/test-server/TestEnvironment.cpp
C++
cpp
5,404
no_license
/** * Copyright (c) 2016 Cal Poly Capstone Team Rocket * * 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, * mod...
da61578164047c7696c0ab4219656af367fba61c
6ad81d76e0897eb61cb073a2486276dff4e9f30f
kashimmirza/Problem-Solving
/UVa/106 Fermat vs. Pythagoras.cpp
C++
cpp
2,443
no_license
/*######## IN THE NAME OF ALLAH ##########*/ #include<bits/stdc++.h> using namespace std; #define ll long long #define MAX 999999999999999999 #define nl printf("\n") #define r0 return 0 #define r1 return 1 #define sf1(x) scanf("%lld",&x) #define sf2(x,y) scanf("%lld %lld",&x,&y) #define sf3(x...
edf952178db3415eb32e707d80733d56e2b0f36f
7dc5e6e6da581fff352903c6080cf9410d5fd1a1
TeamFirework/SapphireBrowser
/ash/app_list/views/search_result_view.cc
C++
cc
14,299
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 "ash/app_list/views/search_result_view.h" #include <algorithm> #include <utility> #include "ash/app_list/app_list_view_delegate.h" #include...
10a86d94765151cc605929a57878a06380623389
5ccea0c43e2f588e485d969e673776c8f18bf9ce
lavajumper/sexcore-sexcoin
/src/txmempool.cpp
C++
cpp
50,590
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 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 "txmempool.h" #include "clientversion.h" #include "consensus/consensus....
9bf733d6a3b1fc6fffb452155e54579d30f5f697
84820d9169334b74b8238916f1d81ee28984ae98
alex-min/babelroxor
/babel-2014-minett_a/trunk/lib/network.cpp
C++
cpp
826
no_license
#include "network.h" Network::Network(unsigned int readCirbufSize, unsigned int writeCirbufSize) : _socket(new PortableSocket), _readBuf(readCirbufSize), _writeBuf(writeCirbufSize) { } Network::Network(PortableSocket *sock, unsigned int readCirbufSize, unsigned int writeCirbufSize) : ...
1007f1be206c00275941488a25a0acfbef2104bf
c6ff07565659834652bde454b3ec8693a245417c
outerWorld/petty
/src/xcmd.cpp
C++
cpp
4,655
no_license
#include <errno.h> #include <unistd.h> #include <iostream> using namespace std; #include "xsh_cmd.h" #include "xcmd.h" xcmd::xcmd() { chn_stream_buf.clear(); cur_cmd.clear(); cur_para.clear(); cmds.clear(); cmd_out.clear(); //cmds.insert(pair<string, cmd_base*>(xsh_cmd::get_name(), xsh_cmd::get_inst())); ...
87a950f44267d4399e4832d4237c98c2fad036f0
c6f1b30a732318605b0e0c9a7c4cb02d5d31a6e9
eyelinkmedia/protobuf-objc
/src/compiler/objc_message.cc
C++
cc
38,342
no_license
// Protocol Buffers for Objective C // // Copyright 2010 Booyah Inc. // Copyright 2008 Google 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/license...
b46ea4e2659e3cd29c8d1f38a7ae46569ff43c13
5b61a711f99df6f4d85894b3dcef20ca6e5f520d
acnq/Object-Serialization-in-Cpp
/Project1/Project1/serialization.cpp
C++
cpp
3,296
no_license
#include <iostream> #include "serialization.h" extern Serialization::Registers __All_Classes__; namespace Serialization { MemberInfoTriad::MemberInfoTriad(std::string type_name, std::string member_name, uint32_t offset) { class_name = type_name; this->member_name = member_name; this->offset = offset; } Me...
71119e4c628629b0cc2fcc7d0c92096572276bd5
8431a295c445135e289bd83dccca001ae4eb45fc
ycyd/buteo-syncml
/tests_meego/transporttests/ServerWorkerTest.cpp
C++
cpp
5,103
no_license
/* * This file is part of buteo-syncml package * * Copyright (C) 2010 Nokia Corporation. All rights reserved. * * Contact: Sateesh Kavuri <sateesh.kavuri@nokia.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * R...
f26eb45658e3ad86b545f5fbbc7658fc9bbed49d
c5bd784a7d0db7cb4b3f3766f8be8874b6e4b926
cschadl/mathstuff
/matrix.hpp
C++
hpp
26,058
no_license
// see matrix.h namespace maths { template <typename T> matrix<T>::matrix(size_t m, size_t n) : m_n_rows(m) , m_n_cols(n) , m_A((T)0, m * n) , m_idx(new row_major_indexer(this)) { // we'll probably run into problems before we get here // when we try to allocate m_A, but oh well if (m_n_rows < 1 || m_n_cols < 1) ...
3893379e80a72d7b0644d2c3042d5bd1519f825c
0eb1639e3758953beae60537c65918a33038360f
Parfenoff/HW_cpp
/hw#2.cpp
C++
cpp
376
no_license
#include <iostream> using namespace std; int main() { setlocale(LC_ALL,"RU"); int a; int b = 2; cout << "Введите число: " << " "; cin >> a; if(a % b == 0 ) { cout << "Введенное число" << " " << a << " " << "Четное" << endl; } else { cout << "Введенное число" << " " << a << " " << "Не четное" << endl; } ...
7ca03533f25b29f6b2d59e645450a61fa7b559cc
d08bab8ca12bc14a20c07e151ddb9f389c8e8c1a
zhouxh1023/anki-3d-engine
/src/collision/CompoundShape.cpp
C++
cpp
2,696
permissive
// Copyright (C) 2009-2015, Panagiotis Christopoulos Charitos. // All rights reserved. // Code licensed under the BSD License. // http://www.anki3d.org/LICENSE #include "anki/collision/CompoundShape.h" #include "anki/collision/Aabb.h" #include <cstring> namespace anki { //============================================...
f87cdbabf3b1c1beda7adbd0c90607e816ea4a97
75fcfe3fe498ee2fb44bc60f619fca0bc3ab90ff
imos/icfpc2015
/boost/bimap/views/multimap_view.hpp
C++
hpp
4,268
no_license
// Boost.Bimap // // Copyright (c) 2006-2007 Matias Capeletto // // 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) /// \file views/multimap_view.hpp /// \brief View of a side of a bimap that is signature ...
101d46137c60dabf2a2db3f3a842c15b9f391991
dec0d2375f7bed31f20198705bc39304ee9e5c40
darknebuli/darknebuli-RM-graph
/wxWidgets-2.8.12/src/mac/carbon/tglbtn.cpp
C++
cpp
4,550
no_license
U2FsdGVkX19fTms3OENxUoetnOKy1AyJ49jWWmkNc76HrZzistQMiePY1lppDXO+ h62c4rLUDInj2NZaaQ1zvoetnOKy1AyJ49jWWmkNc758g4KpHaB8LwCS1iqVEAa/ 3WR6GO//whonn01yC3Yog1Yto5sj7/zlPRd4isnf+5zlZhpPW2sGNRke9hY796Z/ iapPqg4PNqbv8Fym+887TrfwwZbGpe/zq5j5MC1ERF9jLtiGylTzXmcLKQNHyWv/ YSZnESeYGkKhWLw/jJu8k10gVoCyGeAaZMK+Se7gMDIGtN5h5XUDvDIz57d5...
162b7bd4fea10386496d87f5c0dbb800cae446cf
c6ae16371950b01e15cd762f4aca18153f1f5f54
AbrMa/Competitive-Programming
/Codeforces/Div 2/A/Magic Numbers.cpp
C++
cpp
665
no_license
#include <iostream> #include <iomanip> #include <vector> #include <string> #include <utility> #include <algorithm> using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> pi; #define F first #define S second #define PB push_back #define MP make_pair int main() { ios::sync_with_stdio...
de5a35da646694162a72453e7687d0d19eaa406f
fb012d560615cb5d25cae5b871b830db14cfdb91
Sagox/IIT-Hyderabad-Courses
/OS_II_Assignments/Assignment_4/Assn4-CS17BTECH11034/frw-CS17BTECH11034.cpp
C++
cpp
6,219
no_license
#include <iostream> #include <vector> #include <fstream> #include <unistd.h> #include <string> #include <time.h> #include <chrono> #include <semaphore.h> #include <random> using namespace std; // Initialising the input variables as global so that they can // be viewed across threads int nw, nr, kr, kw; float ucs...
a2f8d9d9e3baaf8fa460c54007532749485abf25
2d76998b4b3a96618663c32899596d392b513cba
Slidejiveman/Programming1
/programming2lab6task1/programming2lab6task1/lab6task1.cpp
C++
cpp
1,539
no_license
#include <iostream> #include <fstream> using namespace std; struct Product { int productNumber; char productDescription[20]; float price; int stockQuantity; float totalValue; }; int main() { Product productInfo; fstream productFile("lab6task1.dat", ios::binary | ios::out); ofstream productTXT("lab6task1.txt"...
08e2c304b0ecd156235a5f2b3877120d3e767052
bf6cfebaa46a56edff9f8459d99fd8fc2f394a54
rishithellathmeethal/Kratos
/external_libraries/amgcl/coarsening/tentative_prolongation.hpp
C++
hpp
7,201
permissive
#ifndef AMGCL_COARSENING_TENTATIVE_PROLONGATION_HPP #define AMGCL_COARSENING_TENTATIVE_PROLONGATION_HPP /* The MIT License Copyright (c) 2012-2018 Denis Demidov <dennis.demidov@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ...
12f0c1dd014296fbda382db75c6225ee20db8f32
78ac7f07f3320962ed34603e1fef47642edbe048
ZhiqiangXie/hunter_ros
/hunter_base/src/hunter_base_node.cpp
C++
cpp
1,664
permissive
#include <string> #include <ros/ros.h> #include <sensor_msgs/JointState.h> #include <tf/transform_broadcaster.h> #include <nav_msgs/Odometry.h> #include "hunter_base/hunter_messenger.hpp" using namespace westonrobot; int main(int argc, char **argv) { // setup ROS node ros::init(argc, argv, "hunter_base"); ros...
7b57d269f2c9154d8bbd0bea9918f161b4358931
e09214fe346f6e04c97e11734debb067cba9a25a
menguan/toj_code
/tojcode/1330.cpp
C++
cpp
874
no_license
#include<stdio.h> int dir[8][2]={{1,1},{1,0},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}}; char str1[100][100],str2[100][100]; int n; int bfs(int x,int y) { int count,xx,yy,i; count=0; for(i=0;i<8;i++) { xx=x+dir[i][0]; yy=y+dir[i][1]; if(xx<=0||yy<0||xx>n||yy>=n) continue; if(str1[xx][yy]=='*') count++; } return count; ...
41ac48123f556c8b010a2c75af7adc896cc17936
33bac482cfc535a679262fb9013b0f2ec9e7bf36
satchellhong/hap.py
/src/c++/include/BlockQuantify.hh
C++
hh
4,086
permissive
// -*- mode: c++; indent-tabs-mode: nil; -*- // // Copyright (c) 2010-2015 Illumina, Inc. // All rights reserved. // 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 ab...
ebea71d6c34613c39edf5cea2bdc96dcd8e9d31a
a6de0d9af346e7113f757e1a7eee5592321748c0
Patryk2211/parallel_c-
/atomic/main.cpp
C++
cpp
2,688
no_license
#include <iostream> #include <cstdio> #include <ctime> #include <thread> #include <queue> #include "Klient.h" #include "LogowanieWiadomosci.h" #include "Biletomat.h" int main() { std::clock_t start_zegara; double czas_trwania; start_zegara = std::clock(); std::queue<Klient> klienci; bool biur...
a458cb951ceb194aaef07534094b3058d7777226
73a5d8d9c7636622d77323236cff61bcc0f5151d
winksaville/fuchsia
/src/sys/appmgr/integration_tests/sandbox/features/storage/has_isolated_cache_storage.cc
C++
cc
1,095
permissive
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <fuchsia/sys/test/cpp/fidl.h> #include <chrono> #include <thread> #include "gmock/gmock.h" #include "src/lib/files/directory.h" #include "src/li...
f9f1a63106b3524cec55d4ffd277930c56a90321
f4554201ffc5bb46a7d6ed34faea49eb7a21aef4
centreon/centreon-broker
/bam/inc/com/centreon/broker/bam/ba.hh
C++
hh
4,758
permissive
/* ** Copyright 2014-2015, 2021 Centreon ** ** 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 ag...
921d1969849da9843441430ae622d040ecfd6a59
a2e3c86fbe435184ec80692e9f44a7c3ae412ae2
RNCan/WeatherBasedSimulationFramework
/wbs/src/ModelBase/Model.cpp
C++
cpp
20,378
permissive
//**************************************************************************** // File: Model.cpp // Class: CTemporalRef, CModel //**************************************************************************** // 08/12/2014 Rémi Saint-Amant Replace CWCategory by CWVariables // 04/07/2013 Rémi Saint-Amant Add SetSt...
f37fb2a6910af86f241aba0a9b1f10bb941a3c68
f88323769582ef579a178c834ed2d65182986603
luanmingyi/liton_ordered_tec_cpp
/test/Test_two_zone/Test_two_zone.cpp
C++
cpp
2,185
permissive
# include <iostream> # include <stdlib.h> using namespace std; # include "../../scr/liton_ordered_tec/ordered_tec.h" using namespace liton_ot; # define DATATYPE double int main(int argc,char **argv) { DATATYPE *x, *y, *z, *w; size_t NI = 2000, NJ = 4000; try { x = new DATATYPE[NI*NJ]; y = new DATATYPE[NI*NJ]; ...
b665b5f26ec516f729a492b62bdd88b98cc88186
e9cbf9e77d2ae28bf0123ce40012723df6ba903e
fmedel/paralela-final-2017-2-semetre
/eje/algoritmo_temporal.cpp
C++
cpp
14,602
no_license
// A C++ Program to implement A* Search Algorithm #include<bits/stdc++.h> using namespace std; #define ROW 10240 #define COL 10240 typedef pair<int, int> Pair; typedef pair<double, pair<int, int> >pPair; struct cell{ int parent_i, parent_j; double f, g, h; }; bool isValid(int row, int col){ return (row...
6e4496f9e67ee9e725ad68817beff2bde6da8a63
22578e21918d52230decb4ba8f06d59f755c6414
macyeez/chromium
/components/viz/service/display_embedder/gpu_display_provider.cc
C++
cc
11,718
permissive
// Copyright 2017 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/viz/service/display_embedder/gpu_display_provider.h" #include <utility> #include "base/command_line.h" #include "base/compiler_spec...
01ed37d301249657758f3ff8bca29a77742d705e
1b85f5dcdb5a5813fc4f46f40b24467133941188
hsoontie/vtr-verilog-to-routing
/ODIN_II/SRC/adders.cpp
C++
cpp
51,644
permissive
/* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of t...
8cae994ed592dfd7bf9a850e70ba8dc422a6e0ed
ff69518e88efeb7409b423016343780e129b45bd
wumn290/HackTechLearning
/CommonTech/BmpSave_CImage.cpp
C++
cpp
500
no_license
#include "BmpSave_CImage.h" BOOL SaveBmp(HBITMAP hBmp) { CImage image; // 附加位图句柄 image.Attach(hBmp); // 保存成jpg格式图片 image.Save("mybmp1.jpg"); return TRUE; } BOOL ConverPicture() { CImage image; // 加载图片 image.Load("1.jpg"); // 保存图片 // bmp格式 image.Save("ConverPicture.bmp"); // png格式 image.Save("Conv...
ef764d3c9fc8078021b811879223847e2435f174
2e9eadad033ad63a4e852d1b8698045b46e260e9
adegroote/hyper
/include/model/setter_impl.hh
C++
hh
2,733
permissive
#ifndef HYPER_MODEL_SETTER_IMPL_HH_ #define HYPER_MODEL_SETTER_IMPL_HH_ #include <model/setter.hh> #include <model/proxy.hh> #include <boost/variant/apply_visitor.hpp> namespace hyper { namespace model { namespace setter_details { template <typename T> struct proxy { boost::optional<T> tmp; remote_...
84f2805d3a8e18f6f5eb4e7682ca7d9f0512a186
8023561683ee9e083a19cd2a3d4d9da505273df7
szymonk/midialign
/align_midi_events.hpp
C++
hpp
675
no_license
/************************************************************************** * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation, version 2 or 3. * * Authors: ...
15fee1e12c11dbb7662fff818ebc457621b630f9
ad000c37027755800c08096be4a709e0a962e830
CXYhh121/LeetCode
/牛客网7_6/牛客网7_6/test.cpp
C++
cpp
791
no_license
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> using namespace std; int main() { string str; while (getline(cin,str)) { string mima = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string orign = "VWXYZABCDEFGHIJKLMNOPQRSTU"; for (size_t i = 0; i < str.size(); ++i) { for (size_t j = 0; j < mima...
dc527c51573236558fba7a92b44c3488d0c98b7f
ca83677d4546176a020b6dacaa84bb1f0a411e25
banbao990/OpenGL
/Demo/Codes/learnopengl/01-GetStarted/05-CoordinateSystems-02-model/main.cpp
C++
cpp
8,396
permissive
#include <glad/glad.h> #include <GLFW/glfw3.h> #include <learnopengl/shader_s.h> // 图像加载库 #define STB_IMAGE_IMPLEMENTATION #include <learnopengl/stb_image.h> // 矩阵计算库 #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> // 其他库 #include <iostream> #include <fstream> #include <i...
1d5f18b7eaf550f24be49963a70e7d3cc4d0a7f9
5f7891fa7c849a0a2fe2e59792ddd1cc938ccee0
AllenMao/hbmy_graduate
/GameEngine(C++)/RoamSystem-Fire(directX)/参考/Frustum.cpp
C++
cpp
3,596
no_license
#include "Frustum.h" void CFrustum::Update( D3DXMATRIX *view ) { // Calculate the field of view. D3DXMATRIX fov; D3DXMatrixMultiply( &fov, view, &m_projection ); // Calculate the right plane. m_planes[0].a = fov._14 - fov._11; m_planes[0].b = fov._24 - fov._21; m_planes[0].c = fov._34 - fov._31; m_planes[0].d...
1f38798a92c2917b164da339f86501a32f9957f2
60e51e3fbaa2c430dc54b03b397c9b01e0d3ef57
irq8/lnav
/src/big_array.hh
C++
hh
3,124
permissive
/** * Copyright (c) 2017, Timothy Stack * * 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 condi...
7e95fb95dbbe7e284a6d747982b617fa1579e6d1
dba409b34243f55f2590eb985e58f2e43ef95aad
MphiweNtuli/bomberman-1
/src/ScoreBar.cpp
C++
cpp
5,466
no_license
#include "ScoreBar.hpp" struct point { GLfloat x; GLfloat y; GLfloat s; GLfloat t; }; ScoreBar::ScoreBar() { score = 0; gameTime = 0; gameLevel = 0; } ScoreBar::~ScoreBar(){ } GLuint ScoreBar::getProgramId() { return (LoadShaders("shaders/vshader.glsl", "shaders/fshader.glsl")); } int ScoreBar:...
0d9b0d75ae1f066dda672f08ca2489e23d7e9c1c
1c10efed95640e0e02331fd344408951812b80dc
matus-chochlik/llvm-project
/lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
C++
cpp
6,286
permissive
//===-- ObjectFilePDB.cpp -------------------------------------------------===// // // 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 // //===---------------------------...
9c2ac861e70bfee5ab357c2c51f9ddfab87bbf2e
a9ae2126f7d445da21445a4fc2e4810a64cb5987
randydom/Caesar-Game-Engine-2
/GameComponents/GraphicComponent/DepthScreenCaptureFactory.cpp
C++
cpp
2,872
no_license
#include "DepthScreenCaptureFactory.h" #include <GenerateGUID.h> #include <Components.h> #include "Resource.h" #include "DepthScreenCapture.h" #include "BasicTexture.h" void DepthScreenCaptureFactory::Create(unsigned int width, unsigned int height, unsigned int priority, const std:...
46aeab3e0fe221c90ff361e08bc201d8c2ad13f6
ad96c86cf860ead3552341eb3c985013c0029ff6
ME-ON1/dsa-juniorSheet-Solution-
/1492a.cpp
C++
cpp
386
no_license
#include <bits/stdc++.h> using namespace std ; #define ll long long int minP(ll a , ll b , ll c , ll p ) { ll q = ceil(p/a)*a ; ll w = ceil(p/b)*b ; ll e = ceil(p/c)*c ; return min(q , min(w,e)) ; } int main ( ){ int t; cin >> t ; while(t--) { ll a, b ,c , p ; cin >> p >> a >> b >> c ; ll o = m...
feb1e3972b1d7f380b8a573cd1e71d0288158d2f
68aee6cbc3863fee29d83dccbcff74e8488d4d93
AakashKT/analytic_ss_cpu
/src/core/interaction.cpp
C++
cpp
5,885
permissive
/* pbrt source code is Copyright(c) 1998-2016 Matt Pharr, Greg Humphreys, and Wenzel Jakob. This file is part of pbrt. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redi...
730df106711820b62cbad4de7d1abf54005e7dba
680dcb7a57a88eaea6ac3900a39c90c54fe81d85
kola1197/corecvs
/applications/physics/joystickInput.cpp
C++
cpp
28,745
no_license
#include "joystickInput.h" #include "core/utils/global.h" #include <iostream> #include <QFile> #include <QTextStream> #include <QTimer> #include <unistd.h> #include <QBitArray> #include <bitset> #include <linux/joystick.h> #include <fcntl.h> #include <thread> #include "joystickInput.h" #include "time.h" #include <fstre...
3ee0b05287b8661cd1f370bf4b940e79672346c1
3cd5418479fc84ec5a3f052dc236e2d397ca45ee
mbasmanova/duckdb
/src/common/types/hyperloglog.cpp
C++
cpp
1,916
permissive
#include "duckdb/common/types/hyperloglog.hpp" #include "duckdb/common/exception.hpp" #include "hyperloglog.hpp" namespace duckdb { HyperLogLog::HyperLogLog() : hll(nullptr) { hll = duckdb_hll::hll_create(); } HyperLogLog::HyperLogLog(void *hll) : hll(hll) { } HyperLogLog::~HyperLogLog() { duckdb_hll::hll_destro...
9adc6b25408e19722e775bd3c320d35e6e732702
0302c798667759bc13cf564eb3555075decae74a
Y-modify/YamaX-Utils
/face/face.cpp
C++
cpp
3,478
no_license
/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by Denis Oliver Kropp <dok@directfb.org>, Andreas Shim...
b9ca9b0efc4a7595ecac5758b42c8ed6f8170add
43c20c2663b0e02e18576c48b4bcb66598dfed28
jacmoe/dsa-hl-svn
/rl/branches/persistence2/engine/rules/src/PartyManager.cpp
C++
cpp
4,605
permissive
/* This source file is part of Rastullahs Lockenpracht. * Copyright (C) 2003-2008 Team Pantheon. http://www.team-pantheon.de * * This program is free software; you can redistribute it and/or modify * it under the terms of the Clarified Artistic License. * * This program is distributed in the hope that it will ...
c17b68000d587a8803f07d6f81e2201d6fd46add
851ad1be825814c2169048c8408a8afe90d142a4
fendaq/track
/rrbb/text_tools.cpp
C++
cpp
2,350
no_license
#include "text_tools.hpp" #include <set> #include <algorithm> #include <functional> #include "util.hpp" #include "tree_helper.hpp" using namespace std; using namespace cv; using namespace tree; Rect TextLine::getBox() const{ if (elements.empty()) return Rect(); Rect r = elements[0]; for (int i = 1; i < elem...
6d89b50860b573818229ce016ad16cc79ba4e1d0
63822e12a044752277bdf7814f57f50651fc40de
OpenMD/OpenMD
/src/io/ZConsReader.hpp
C++
hpp
3,187
permissive
/* * Copyright (c) 2004-present, The University of Notre Dame. All rights * reserved. * * 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, ...
daadd75509b4fba27dacd7931c18eb08f58e79ed
1abea173834745b214f989667fe39621fc195979
VauP/URI_Judge_SolutionsCPP
/OsPresentesDoNoel.cpp
C++
cpp
698
no_license
#include <bits/stdc++.h> using namespace std; int main(){ long n, total = 0; cin >> n; long int vet[n]; for(long int i = 0; i < n; i++){ cin >> vet[i]; } long int k = sizeof(vet) / sizeof(vet[0]); sort(vet, vet + k); vector<long int> chars(n); long int var = 0, ref = 0; for(long int ...
df90a225b6fee6b4d9ef77e8cf74b3ce874c569f
92707069589bd10718610c73fad8f75623002078
Juna-Idler/LyricsView
/JunaLyricsMessage/JunaLyricsMessageListener.cpp
C++
cpp
1,687
no_license
#include "JunaLyricsMessage.h" static JunaLyricsMessageListener Listener; bool __stdcall JLM_Initialize(HWND hwnd) { return Listener.Initialize(hwnd); } void __stdcall JLM_Terminalize(void) { Listener.Terminalize(); } bool __stdcall JLM_ChangeWindowHandle(HWND hwnd) { return Listener.ChangeWindowHandle(hwnd)...
962bb2c97b090d8287afaef620f47423397c4d93
3a03c3fba7cae8b7f13646b6960536a2e54b2809
trel/irods
/server/api/src/rsAuthResponse.cpp
C++
cpp
3,375
permissive
/*** Copyright (c), The Regents of the University of California *** *** For more information please refer to files in the COPYRIGHT directory ***/ /* See authResponse.h for a description of this API call.*/ // =-=-=-=-=-=-=- #include "irods_native_auth_object.hpp" #include "irods_auth_object.hpp" #include...
9446d4852a15780965dc0ac4bc501167192bfe64
dd12120c84fe9a037f068fd9f8f4baa3fcf109cc
DearFedor/Practice
/Zadaniye1.cpp
C++
cpp
3,978
no_license
#include <stdio.h> #include <iostream> #include <fstream> #include <iomanip> #include <string.h> #include <stdlib.h> #include <math.h> #include <stdlib.h> #include <fstream> #include <vector> using namespace std; int main(){ int r,a; std::vector<int> v1; // Создание начального вектора из чисел ...
0ed8cfb4ca7e97504ea11ca8cca29a68c750be49
53d455b687082981d7c248dd28f204a26502940b
Mohamedebouguerra/tensorflow
/tensorflow/core/kernels/data/cache_dataset_ops_test.cc
C++
cc
24,196
permissive
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
c9dda14c2d13286261293ba851b5ea1dd2892ba7
6ee0f99716f086246c7be862f44e8df53c0f742a
kurobaron/AtCoder
/cpp/practice/abc173d.cpp
C++
cpp
426
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n,i; long long ans=0; cin >> n; vector<long long> a(n); for(i=0;i<n;++i) cin >> a.at(i); sort(a.begin(),a.end(),greater<long long>()); if(n%2==0) for(i=0;i<(n-2)/2;++i) ans += a.at(i+1)*2; else{ for(i=0;i<(n-2)/2;...
e1be63a1cf3db33a48288e78e9a78465917b1e73
0ef0c87e2ad84c46ff250e6bd865d8f4f6a4c30f
btcup/sb-admin
/exams/2558/02204111/1/midterm/1_1_715_5820500075.cpp
C++
cpp
1,950
permissive
#include <iostream> #include <cmath> using namespace std; int main() { float u,p,v,b; cout<<"Please input usage : "; cin>>u; if(u!=-1) { cout<<"Please input voltage : "; cin>>p; if(p>=22||p<=33) { cout<<" "<<endl; cout<<"Electricty Cost : "<<u*2.4649<<endl; cout<<"Serv...
d2eeecdb93246478a3fd23071467d0ea0a9b9541
642c8cfd34a6fabe74c278c81ed01c48a1fb5494
juj/emscripten-fastcomp
/lib/Bitcode/NaCl/Reader/NaClBitcodeParser.cpp
C++
cpp
2,800
permissive
//===- NaClBitcodeParser.cpp ----------------------------------------------===// // Low-level bitcode driver to parse PNaCl bitcode files. // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. /...
0a5f94167a84957895fb10477b945d68fb3bf988
380b2ea9982594c4b2bcbe97533e7386048482ce
liuwenbo3/he-transformer
/test/test_util.hpp
C++
hpp
3,712
permissive
//***************************************************************************** // Copyright 2018 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.ap...
46f8fd00c9695350ee681b05ce255c645835dd00
0353d272f8b4db34e5b9b47f9d86b1e679d23249
cuvner/Mirror_installation
/backgroundDifferencing_v4/src/ofApp.cpp
C++
cpp
3,328
no_license
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ totalFrames= 240; counter=0; record=true; video.setDeviceID(0); video.setDesiredFrameRate(60); video.initGrabber(640, 480); ofSetVerticalSync(true); // vidPlayer.load...
0bdfeb43f1c4a8174e785ad1ac45f9a98bd41041
a1c3b9fc86c34cab23cc87c537d65921524d0927
radtek/MonitorShell
/src/zbx_sender.cpp
C++
cpp
3,093
no_license
#include "ZbxSender.h" #include "CByteOrder.h" ZbxSender::ZbxSender(const char * configpath) { p_config_ = new ZabbixConfig(configpath); regex_ = std::regex(p_config_->GetZbx_Submit_Rule()); logger = spdlog::daily_logger_mt("daily_logger", "zbx_monitor.log", 2, 30); logger->set_level(spdlog::level::debug)...
3bcdab0ae1c8f85bfb03a693483a596d8629b2b7
17b5ffa9995d3f69bcc06c409afe5f60a549a1fe
safwankdb/Leetcode-Patterns-Cpp
/K Closest Points to Origin.cpp
C++
cpp
679
no_license
#include <bits/stdc++.h> using namespace std; class Solution { struct Point { int x, y; Point(int a, int b) { x = a; y = b; } bool operator<(const Point& b) const { return (x * x + y * y) > (b.x * b.x + b.y * b.y); } }; public: ...
c71209af21d43ee31c65271191c067b493fd2826
bb61e916ee887135c93c7b7ed11073cbb747b85e
piyush-pathak-3004/CSES_SOLUTIONS
/CSES/Sorting and Searching/Subarray Divisibility.cpp
C++
cpp
404
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ int n; cin>>n; ll arr[n]; map<ll,ll>mod; mod[0] = 1; for(int i=0;i<n;i++){ cin>>arr[i]; } ll currSum = 0; for(int i=0;i<n;i++){ currSum += arr[i]; mod[((currSum%n) + n)%n]++; } ll ans = 0; for(au...
625c81c31aa21980dd52936349c25730287e3990
d1a71ed8a2d92617c4b67cd4ff1b84b084ed3a60
wumn290/xlue-cef
/libcef_dll/cpptoc/completion_callback_cpptoc.cc
C++
cc
1,723
no_license
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // // --------------------------------------------------------------------------- // // This file was generated by the CEF translato...
ce3ab11e496ae8c452a5e1d24cd14d441013f494
b60204ffcbd4ffc2c4353536e54a1d9277875b37
N-911/CPP-Uamp
/app/src/settings.cpp
C++
cpp
1,487
permissive
#include <QFile> #include "settings.h" #include "app.h" #include "loggingcategories.h" //Settings::Settings(const QString& strOrg, const QString& strAppName) { Settings::Settings() { // m_preferences = new QSettings(strOrg, strAppName); m_preferences = App::get_app()->app_settings(); // load saved theme ...
fe0687a8cc6819d75e6b9d49a135432bc053b4ce
f6d8531e38ea3f1615b5f5357e9ee0577dbe81ec
Causodes/Computer-Science-31---UCLA
/Project 4/array.cpp
C++
cpp
8,478
no_license
// Project 4.cpp : Defines the entry point for the console application. // #include <string> #include <iostream> #include <array> #include <cassert> using namespace std; int appendToAll(string a[], int n, string value) { if (n < 0) //check for invalid n return -1; if (n == 0) return 0; for (in...
08b7a6380a63422202bf22314f3122fb3bcb2f31
e5e9cf763458e46d8c097ea211fe6d4be0b06c83
AsaoluElijah/veil
/src/txdb.cpp
C++
cpp
21,197
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 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 <txdb.h> #include <chainparams.h> #include <hash.h> #include <random.h>...
bda47e1631c2b556c6df8cfb96f605001995f507
8570c04517cda49dd85739b03550647afa8792e4
mostafa-j13/mobile-sdk
/all/native/renderers/components/KineticEventHandler.cpp
C++
cpp
9,371
permissive
#include "KineticEventHandler.h" #include "components/Options.h" #include "core/MapPos.h" #include "graphics/ViewState.h" #include "renderers/MapRenderer.h" #include "renderers/cameraevents/CameraPanEvent.h" #include "renderers/cameraevents/CameraRotationEvent.h" #include "renderers/cameraevents/CameraZoomEvent.h" #inc...
6ddfc026a0f1f7d1cfe0cc19d5efc17bb0d8f838
6865a0e9ea50b29b80a4bd5ef96cf8057d07327d
tjones879/engine
/core/shaders/ShaderUniform.cpp
C++
cpp
271
no_license
#include "ShaderUniform.h" ShaderUniform::ShaderUniform() {} ShaderUniform::ShaderUniform(GLuint handle, GLenum type) { this->handle = handle; this->type = type; } GLint ShaderUniform::glHandle() { return handle; } GLenum ShaderUniform::glType() { return type; }
9082c4875b44e639c3d804b849811a9e9ad3504c
713c9c814d0e62dbfc8a2e06e78635b8af662230
madz0/cpp-driver
/src/user_type_field_iterator.hpp
C++
hpp
1,733
permissive
/* Copyright (c) 2014-2015 DataStax 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...
ca13191b1619065dbf0a071bef44ead0178c8c22
11b437b6e63110e9999002c0a654c0cb138f8931
zhanggehui/FilmTrack
/include/ActionInitialization.hh
C++
hh
2,003
no_license
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
63308635dbea7b5ab0995196de7a4540d032e95d
554c8f58a1633fe1521b22a91f9e8de5df59e61b
xuxiaowei007/Medusa
/Medusa/Medusa/Resource/Map/Tiled/TiledTileRef.cpp
C++
cpp
1,608
permissive
// Copyright (c) 2015 fjz13. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. #include "MedusaPreCompiled.h" #include "TiledTileRef.h" #include "TiledTilesetRef.h" #include "TiledTileset.h" #include "TiledTile.h" #include "Node/NodeFactory.h" #...
70ad69b959e6bde99fd9d29b5b7b283237aa6841
bc7056717c4e4c760e6559ff4acda171f3d6a6af
cow-coding/algorithm
/BOJ/C++/17298.cpp
C++
cpp
619
no_license
#include <iostream> #include <vector> #include <stack> using namespace std; int main() { int N; vector<int> num; cin >> N; for (int i = 0; i < N; i++) { int n; cin >> n; num.push_back(n); } stack<int> s; vector<int> ans(num.size(), -1...
db0d5a98d7569e354bbc4595a975c1b08747a072
2d2e04ce326f108900fe3da0e653d3f505b83f79
letiziaquerci/esami-algo-public
/2020-07-14/align_one_string/gen/generatore.cpp
C++
cpp
2,931
no_license
/* Generatore di input per il problema poldo_sums. Input: N, M, P, tipo, seed USI SPECIALI: arg1 < 0: i casi di esempio tipo = 0: normale, b sottostringa di a tipo = 1: b probabile non sottostringa di a (allineamento impossibile) tipo = 2: tutte a e una z alla fine */ #include<iostream> #include<cassert> #include<cs...
bf6df19c48c0eb1921d48c0eb753e1117b09f8be
c179a83aa03594cf7b2667509afb4f512e71f7a0
koalarcoder/skia
/dm/DM.cpp
C++
cpp
58,224
permissive
/* * Copyright 2013 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "dm/DMJsonWriter.h" #include "dm/DMSrcSink.h" #include "gm/verifiers/gmverifier.h" #include "include/codec/SkCodec.h" #include "include/core/SkBBHFactory.h" #include ...
810542602029caf2cde2981ee9e5e14c2203d182
24c524fa0138db2bf3ac31d624593d3f2c05b1f2
alekswi/rentomat
/game.cpp
C++
cpp
3,563
no_license
#include "game.h" Game::Game() { id= ++nextID; name = "unknown"; producer = "unknown"; publisher = "unknown"; category = "unknown"; introduction = "Lorem ipsum"; year = rand() % 220 + 1800; } int Game::nextID = 0; bool Game::compare(QString name) { if(this->name == name) retur...
116ab5c05a3ff57e7a6e2487206d6d1713110825
10d9236b001c5edbe902632af886418618791dca
stan-dev/math
/stan/math/opencl/prim/matrix_power.hpp
C++
hpp
1,437
permissive
#ifndef STAN_MATH_OPENCL_PRIM_MATRIX_POWER_HPP #define STAN_MATH_OPENCL_PRIM_MATRIX_POWER_HPP #ifdef STAN_OPENCL #include <stan/math/opencl/prim/size.hpp> #include <stan/math/opencl/kernel_generator.hpp> #include <stan/math/opencl/prim/diag_matrix.hpp> #include <stan/math/prim/meta.hpp> #include <stan/math/prim/err.hpp...
9d22f6ed02c9ebfa1001a9b53b3ffb6cb8fcd11d
8af9d86ecbf228ac9aa62533ebc9ace01b283947
mathemage/CompetitiveProgramming
/topcoder/SRM/SRM-801-DIV-2/500/CreateMixture_coding_kata_4.cc
C++
cc
1,950
permissive
/* ======================================== * Points/Time : 498.90 * Total/ETA : 500 * Status : AC ==========================================*/ #include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(n);i++) #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define FORD(i,a,b) for(int i=(a);i>=(b...
082f6f60518a6e2abd1e9c38faefe9ade5e95d7a
97a0a6398d52437e66c6dcb924a6649b0edd9e2a
andete/ym2413
/analyze/ym-histogram.cc
C++
cc
871
no_license
#include <algorithm> #include <cassert> #include <cstdio> #include <cstdlib> #include <fstream> #include <iostream> #include <vector> using namespace std; vector<int> load(const char* file) { vector<int> result; ifstream is(file); while (1) { int i; is >> i; if (!is.good()) break; result.push_back(i); } ...
6ff815c1e75272f9079e69f1e85377520221574d
55e3d460a7ee29242a52cb1a1e4d9e8d70516f31
blackberry/Boost
/libs/math/test/test_rational_instances/test_rational_double3.cpp
C++
cpp
338
permissive
// (C) Copyright John Maddock 2006-7. // Use, modification and distribution are 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 "test_rational.hpp" template void do_test_spots<double, unsigned>(doub...
702c8c7a996c8cb5d8d0c5721341b48f6cb18db8
a55c2dfa265aa0d96deabe47d5e998f38c4669ce
JiaMing5139/DistributedSystem
/Raft/SnapShot.cpp
C++
cpp
1,930
no_license
// // Created by parallels on 6/27/20. // #include "SnapShot.h" bool SnapShot::Saved(int64_t lastterm, int64_t lastindex,const std::vector<rpcService::AppendEntriesRequest_LogEntry> & logs){ snapshot::snapshot snapshot1; snapshot1.set_lastterm(lastterm); snapshot1.set_lastindex(lastindex); for(const a...
8055c152025622a1fda8bf8566f59050a580305e
825cdbdc0e1f6c68a8425e026a44fc7eef990d2f
hlabyyamauchi/fic_sources
/hls_src/mk2lenet1noopt.cpp
C++
cpp
21,097
no_license
#include <ap_fixed.h> #include <ap_int.h> //only in C++ #include<math.h> #define MBD 1 // number of boards //conv1 parameter #define C1_OCH 20 #define C1_OSIZE 24 #define C1_ICH 1 #define C1_ISIZE 28 #define C1_K 5 //conv1 partition parameter #define CONV1_OUTLOOP 24 // outer loop == C1_OSIZE #define CONV1_LOOPEXE 24 ...