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
6232571bd976a622fb836f2015e8c7923d31cc86
7e253b0cee38c49b20fa7f1cd9bf22c205d8340b
SNSystems/pstore
/unittests/json/klee/string.cpp
C++
cpp
1,227
permissive
//===- unittests/json/klee/string.cpp -------------------------------------===// //* _ _ * //* ___| |_ _ __(_)_ __ __ _ * //* / __| __| '__| | '_ \ / _` | * //* \__ \ |_| | | | | | | (_| | * //* |___/\__|_| |_|_| |_|\__, | * //* |___/ * //===------------------------...
8cf6244f0c85167084f13489f32ee4b56d9dcc85
b7a758aa29190dcc7f698b3a9eabb6a23901ba6d
Jay-9912/leetcode
/1TwoSum/solution2.cpp
C++
cpp
468
no_license
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { int n=nums.size(); map<int,int> loc; vector<int> res(2,-1); for (int i=0;i<n;++i) { if (loc.count(target-nums[i])==1&&loc[target-nums[i]]!=i) { res[1]=i; ...
bceeeba8cfe2a716f1537f55b4aba0a68fc269be
444edc5a5eda7401f102da16b742db5a7cfac445
rynnokung/SunWellCore
/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp
C++
cpp
971
no_license
/* * Copyright (C) * Copyright (C) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is dist...
7c9932be91e2787471a22388ca6316541e7fe812
919d52f4046822702a7a088598b3d12ec2ab05c2
AlaskaJoslin/client-server
/file-server/asio/detail/wrapped_handler.hpp
C++
hpp
8,103
no_license
// // detail/wrapped_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) // #ifndef ASIO_DE...
175c778c82760bc4673026c78113510740d7cd10
4367de5bbe6108d3e355aced7de0b7b2279aa3f5
manuelTorrealba/ndeAero
/cpp_library/include/Interpolator.hpp
C++
hpp
2,725
no_license
#ifndef INTERPOLATOR_HPP #define INTERPOLATOR_HPP /** Interpolation class HARD-CODED CONVENTIONS: - flat extrapolation beyond boundary points. */ #include"Matrix.hpp" #include"Vector.hpp" namespace nde { enum InterpolationType { LINEAR = 1, SPLINE_MON...
51915706a3cc92763659753e066246ac16cfa9a7
079cfd22c06acb50ec24cc6341e8ed5010fe2944
MoezGholami/Enigma
/Codes/File_Coding_Test/Decoder.cpp
C++
cpp
3,002
no_license
#include "Decoder.h" Decoder::Decoder(BigInt m) { Mode=m; Reset("",Default_Code_Option,Key()); } Decoder::Decoder(const string &CmplxURL, const Key &Kelid, BigInt m) { Mode=m; Reset(CmplxURL, Default_Code_Option, Kelid); } Decoder::~Decoder(void) { Close(); } void Decoder::Decode(unsigned int BffBlcksNum) { P...
5f9da5942cd1aae06bd440fb3282f8ec68a3eb0f
3abdd0145dce5c4708ce26364ef8d97c9e657899
sunyinkai/ACM_ICPC
/2018/Futher3_3_String2/b.cpp
C++
cpp
2,168
no_license
#include<cstdio> #include<cstring> #include<queue> using namespace std; const int MAXN=107; const int MAXM=27; const long long mod=20090717; int ch[MAXN][26],fail[MAXN]; int match[MAXN]; queue<int>q; int N,M,K; long long dp[MAXM][MAXN][1<<10];//27*207*1024 struct AC{ int tot,root; AC(){ tot=0; root=newnode(); ...
408476e3211ed51bbbaf413a70c84ec43207d775
49bb14bfb4efbe54b29ab59c859df95c7b7783c4
neilkakkar/NewBeginning
/716C.cpp
C++
cpp
604
no_license
#include <bits/stdc++.h> using namespace std; #define ll unsigned long long const ll sz = (ll)1e18; int main() { int n; cin>>n; freopen("output716.cpp","w",stdout); cout<<"int X["<<n<<"] ={"; ll curr=2; for(ll i=1;i<=n;i++){ //cout<<i<<endl; for(ll j=1;j<sz;j++){ ...
afc7b578014521faa8623f1180f27b72619bd755
2640b7ae2ed3d7680d9c907c7a2f8455b7de3ab6
LiHaiBaoBao/DataStructure
/Lexicon/Lexicon/main.cpp
C++
cpp
276
no_license
// // main.cpp // Lexicon // // Created by hantianbao on 2017/10/12. // Copyright © 2017年 hantianbao. All rights reserved. // #include <iostream> int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n"; return 0; }
a64137cffeb3720e83accafe7e2e1ba300893744
d7d168941df807529ee6ab90402f7f04b89cd8b2
roadnarrows-robotics/rnr-sdk
/Hekateros/sw/apps/arduinodiag/arduinodiag.cxx
C++
cxx
2,295
permissive
//////////////////////////////////////////////////////////////////////////////// // // Package: Hekateros // // Program: arduinodiag // // File: arduinodiag.cxx // /*! \file * * $LastChangedDate: 2014-10-22 10:04:28 -0600 (Wed, 22 Oct 2014) $ * $Rev: 3791 $ * * \brief Print Hekateros serial numbers. *...
7b2c1e0e70c231052d9e7fc19b32b6427bd18ce2
e83e3b2d2c1a333bf2d5993286013f3e96119793
NikTRSK/CS104
/Assignments/hw5/src/GoSubStatement.cpp
C++
cpp
549
no_license
// GoSubStatement.cpp: #include "GoSubStatement.h" using namespace std; GoSubStatement::GoSubStatement(int lineNum) :m_jumpTo( lineNum ) {} GoSubStatement::~GoSubStatement() {} void GoSubStatement::execute(ProgramState * state, ostream &outf) { outf << ""; // only used to get rid of the unused variable warning (...
c476e470465331cd6a0784f2fe8a4fe79fe6f43a
2cea93d39d22e49108745ddf2685b26e2785bd81
mutexre/SceneGraph
/SceneGraph/Material/PhongMaterial.hpp
C++
hpp
5,185
no_license
// // Created by mutexre on 05/11/15. // Copyright © 2015 mutexre. All rights reserved. // namespace SG { class PhongMaterial : public Material { public: enum class ShadingModel { flat, gouraud, lambert, phong }; ShadingModel mode =...
c63b226dd6d91d7e17dbc44a0327fa860497c942
3fed339d98ce76a2b5870c16f5d7b7b01e8700a5
nSircombe/mkl-dnn
/tests/benchdnn/utils/fill.hpp
C++
hpp
1,147
permissive
/******************************************************************************* * Copyright 2023 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
a9fbbbc09fc07ba0132f22c898b08e05d4402b85
31e946e7efea25499c50933e9c8ac2f678e9fe78
milanpro/Masterthesis-Heterogeneous-PC
/src/util/indep_util.hpp
C++
hpp
281
no_license
#pragma once // Task to be balanced on the execution units struct SplitTask { int row; int rowCount; }; // Result of an execution unit containing the duration of execution struct TestResult { unsigned long long duration; // Test count not implemented yet int tests; };
123b16c2e6813223e4277d239d5ce69d27ddefd1
f5e2bf3905b2cb5ed5a8168ebc9e4d8ff1d8dd7c
rtohid/blaze
/blazetest/src/mathtest/smatsmatsub/MIaSCa.cpp
C++
cpp
4,063
permissive
//================================================================================================= /*! // \file src/mathtest/smatsmatsub/MIaSCa.cpp // \brief Source file for the MIaSCa sparse matrix/sparse matrix subtraction math test // // Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved // // This f...
1585d67d58ed6d46c1c1a6f39e0de03a190a79ec
faf6083e3bd98951ef916e7e3113d4c0da1ade02
rubybuildbot/ruby
/include/Emulator.hpp
C++
hpp
1,907
no_license
#pragma once #include <memory> #include <filesystem> #include "CPU.hpp" #include "COP0.hpp" #include "Interconnect.hpp" #include "BIOS.hpp" #include "RAM.hpp" #include "GPU.hpp" #include "DMA.hpp" #include "Scratchpad.hpp" #include "CDROM.hpp" #include "InterruptController.hpp" #include "Expansion1.hpp" #include "Timer...
0eda6401490977717bbf6fbad96850c366b35533
e7335b4b72528bbd8580a27b15f160c3b20450bc
juarezpaulino/coderemite
/problemsets/Codeforces/C++/A1205.cpp
C++
cpp
2,418
permissive
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */ #define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define eb emplace_back #define mp make_pair #define fi first #define se second #define sz(v) ((int) (v).size()) #define all(v) (v).begin(), (v).end() #define...
e28fe9d18dc40fb793fdf9787ac1f7d0f86db7c8
254fe8586d0cb5f9b06d42043cae42ea4a668334
zhaocc1106/my-leetcoding
/c++/producerAndConsumer.cpp
C++
cpp
1,964
no_license
/** * 实现生产者-消费者模式 */ #include <iostream> #include <deque> #include <thread> #include <mutex> #include <condition_variable> using namespace std; static deque<int> storeHouse; // 仓库 static int houseSize = 5; // 仓库大小 static int curCount = 0; // 当前仓库存放物品的编号 static int maxCount = 100; // 截至编号 static mutex mtx; // 互斥体 ...
ca33a193c7df66ce831225723072ea99f017b0f3
5f1651377c4dd47255ac025d3943561389183294
nevilparmar11/CompetitiveProgramming
/Codeforces/1208G.cpp
C++
cpp
378
no_license
#include <bits/stdc++.h> using namespace std; const int mxN=1e6; int n, k, p[mxN+1]; bool c[mxN+1]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> k; iota(p, p+n+1, 0); for(int i=2; i<=n; ++i) { if(c[i]) continue; for(int j=i; j<=n; j+=i) { c[j]=1; p[j]=p[j]/i*(i-1); } } sort(p+1...
737d76374517e113fa72b7e27f0a3303b1789455
b860ab53b91e0c66f884c679e0b788ed839420c6
HemantKoti/Coding
/InterviewBit/src/BinarySearch/RotatedSortedArraySearch.cpp
C++
cpp
614
no_license
/* * RotatedSortedArraySearch.cpp * * Created on: Apr 21, 2018 * Author: HemantKo */ #include "../../include/interviewbit.h" int search(const vector<int> &A, int B) { int start = 0, end = A.size() - 1; while (start <= end) { int mid = (start + end) / 2; if (A[mid] == B) return mid; else if (A[m...
d3931d37ff6ff4e16be8311e1c9fa7760302f72f
384d67e930775876b3a9fc6744f65de3fc7bfbea
algorithmEricDHS/interview
/tree_checkB.cpp
C++
cpp
2,164
no_license
#include <stdio.h> #include <malloc.h> #include <stdlib.h> #include <stack> #include <string.h> #include<queue> using namespace std; typedef struct Node { int data; int layer; struct Node *left; struct Node *right; }Node; Node * buildT (int count) { Node * h; Node *tmp; Node *c; int i; int l; queue<Node...
fbf3abb4d7ee900769536d36fded37df08d3304c
710286324a7317f1828ca9133622fc92a83259a8
Jseph/google-cloud-cpp
/google/cloud/kms/ekm_connection.cc
C++
cc
3,153
permissive
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
7c5a5ab494a5ca4d8cb8d97e2c30e330568751e4
57e3a4b874c30e76ffab49f48a4deb7ab44c8068
Baaleos/unified
/Plugins/Dialog/Dialog.hpp
C++
hpp
2,119
permissive
#pragma once #include "Plugin.hpp" #include "Services/Events/Events.hpp" #include "Services/Hooks/Hooks.hpp" #include "API/Types.hpp" using ArgumentStack = NWNXLib::Services::Events::ArgumentStack; namespace Dialog { class Dialog : public NWNXLib::Plugin { public: Dialog(const Plugin::CreateParams& params); ...
c3c7979765f40ec1ef0b87c738c70c5167edb642
ea7646dee8ec1e5af0a70ef3a427dfcd3e76e41d
silvest/HEPfit
/THDMW/src/THDMWSTU.cpp
C++
cpp
10,238
permissive
/* * Copyright (C) 2018 HEPfit Collaboration * * * For the licensing terms see doc/COPYING. */ #include "THDMWSTU.h" #include "THDMW.h" #include "THDMWcache.h" //Theoretical formulae taken from https://arxiv.org/pdf/0907.2696.pdf THDMWSTU::THDMWSTU(const StandardModel& SM_i) : ThObservable(SM_i), myTHDMW(stati...
8b0ed81e60e13b91b1877162acbcd70fab317fc0
fcdfb6a51373a6ae97d5e1377509a823c61a64d2
TomasRejhons/gpg-source-backup
/2/05 Graphics Display/08 James/GII_NVEB/DX8/CommonSrc/nvtex.cpp
C++
cpp
7,532
no_license
/* Copyright (C) Greg James, 2001. * All rights reserved worldwide. * * This software is provided "as is" without express or implied * warranties. You may freely copy and compile this source into * applications you distribute provided that the copyright text * below is included in the resulting source code...
5c94ca4ce3bda00a06fc04eb286ce5af788e41e9
63261de0cd4cc18d020356dffb8d967b509c99be
j1249845202/chromium
/chrome/browser/sync/chrome_sync_client.cc
C++
cc
33,044
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 "chrome/browser/sync/chrome_sync_client.h" #include <string> #include <utility> #include "base/bind.h" #include "base/command_line.h" #include ...
30f90b7ddfefdb46ddc3316010cfbd009d492c37
3c3a6480789dcc82423a890ba32b52a4bd25a585
sonuishaq67/algorithms
/simple_problems/uncomf.cpp
C++
cpp
445
no_license
#include <iostream> using namespace std; int main() { int n, t; char str[100]; scanf("%d%d", &n, &t); scanf("%s", str); for (int i = 0; i < t; i++) for (int ii = 0; ii < n - 1; ii++) if (str[ii] == 'B' && str[ii + 1] == 'G') { str[ii] = 'G'; ...
4a66e98660f327dab97588f6a0947afe7f536707
638e5ba40efa499f1a1fed27386704afbc64388c
dgalide/piscinecpp
/D05/ex03/Intern.cpp
C++
cpp
569
no_license
#include "Intern.hpp" Intern::Intern(void) {} Intern::~Intern(void) {} Intern::Intern(Intern &ref) { (void)ref; } Intern &Intern::operator=(Intern &ref) { (void)ref; return *this; } Form *Intern::makeForm(std::string formType, std::string target) { Form *n; n = (formType == "rob...
8c3f24b67a8f70cb4dcc026c1fa3d511f97baa9c
b7c2af4df0b49c6b109c57f9f4e9ae998c2dee76
uriJuhasz/OpenGL_test_4.6_a
/OpenGL_test_4.6_a/OpenGLBackend/private/Instances/OpenGLBezierPatchInstance.cpp
C++
cpp
3,283
no_license
#include "OpenGLBezierPatchInstance.h" #include "OpenGLBackend/private/OpenGLUtilities.h" #include "Utilities/Misc.h" using std::vector; using std::array; OpenGLBezierPatchInstance::OpenGLBezierPatchInstance(const OpenGLBezierPatchPrimitive& primitive) : OpenGLGraphicObject(primitive.getScene()) , OpenGLSurface(pr...
9a7f485cc4306fe77c4dff79075fb3d860e094d5
ce4232d5d02d18cf076ba54d0a8815440e9f11b4
lopatovsky/Algorithms
/Graph/flow-dfs.cpp
C++
cpp
2,647
no_license
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef pair<int,int> ii; typedef vector<int> vi;...
9d8ecf95baad23afa6a1f1eb6ea62fb81bd1d63d
8d3574d64cfdec7f91ae2a4421436e748f6b216b
tangjz/acm-icpc
/leetcode/extra/剑指 Offer II 065-最短的单词编码.cpp
C++
cpp
589
permissive
class Solution { public: int minimumLengthEncoding(vector<string>& words) { sort(words.begin(), words.end(), [&](string const &u, string const &v) { return u.size() > v.size(); }); int ans = 0; unordered_set<string> sp; for(string &buf: words) { revers...
e830219c64fd292df33644e7f3efccf7104893d9
8bfdf2bccc88e9427a0c62e26f5c0e527df24cd0
KarthikJay/raytracer
/src/camera.cpp
C++
cpp
949
permissive
#include "camera.hpp" Camera::Camera() { position = Eigen::Vector3d(0.0, 0.0, 0.0); up = Eigen::Vector3d(0.0, 0.0, 0.0); right = Eigen::Vector3d(0.0, 0.0, 0.0); look_at = Eigen::Vector3d(0.0, 0.0, 0.0); } Camera::Camera(Eigen::Vector3d position, Eigen::Vector3d up, Eigen::Vector3d right, Eigen::Vector3d look_...
34ba0277cc47ae4d5da16686780a9bdbeba8b328
f37eda543d76a7b4d409e642f151a880b7477ad5
mycolors/tensorflow
/tensorflow/core/profiler/lib/scoped_annotation_test.cc
C++
cc
4,263
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 ag...
49fb8d77f20b2209efac4dd61bfa40a650eb1476
0bf4bc3ba4d4cec2eccc09d4913ad6bc05504b40
zhengguo07q/GameWorld
/Src/Object/KBaseball.cpp
C++
cpp
2,002
no_license
#include "stdafx.h" #include "KBaseball.h" #include "KScene.h" #include "KHero.h" #include "KPlayerServer.h" KBaseball::KBaseball(void) { m_nCurAttackPoint = 1; m_bAttackState = true; m_fXYReboundCoeX = 0.65; m_fXYReboundCoeY = 0.65; m_fXYReboundCoeZ = 0.65; m_fYZReboundC...
289e286889772bac811091eb6575c5673412ee65
15bdd671a3cd2cf4a714af749af892a6e36b1be7
azizk1997/aziz
/marks.cpp
C++
cpp
1,111
no_license
#include<iostream> using namespace std; class s2; class s3; class s1 { int marks[5]; public: void getdata(); friend void cal(s1,s2,s3); }; void s1::getdata() { int i; float sum=0; float per; cout<<"enter the marks= "; for(int i=0;i<5;i++) cin>>marks[i]; sum=sum+marks[i]...
61a537a58896b24796b2cc7d4351d0a94523e672
4f99934839e3628b596eeb3bbe610d2eafd46c25
marlonwc3/cp-codes
/CF/CF550D==Regular Bridge.cpp
C++
cpp
2,797
no_license
#include <bits/stdc++.h> #define _ printf("\n"); #define sc1(a) scanf("%d", &a) #define sc2(a,b) scanf("%d %d", &a, &b) #define sc3(a,b,c) scanf("%d %d %d", &a, &b, &c) #define sc4(a,b,c,d) scanf("%d %d %d %d", &a, &b, &c, &d) #define iz(b) if(b==0) { break; } #define pb(a) push_back(a) #define inf 0x3f3f3f3f #define l...
0f0051dd791efa3c528d2f23a3b8e514a41a90b5
f361cbda1d9491dd383cf2a8b98553d547e2ac9b
Top-Homework/hw5v3
/reachability.cpp
C++
cpp
3,666
no_license
#include <iostream> #include <fstream> #include <string> #include <vector> #include <sstream> #include <list> #include "ArgumentManager.h" using namespace std; // This class represents a directed graph using adjacency list representation class Graph { int V; // No. of vertices list<int> *adj; // Pointer to an array...
9ba8e6c4cfcbae58c6f29be11248aa355a07c40a
f91f008690000c66f3096b521ca5ab66affe0615
intel/xetla
/tests/unit/bit_mask_manipulation/kernel_func.hpp
C++
hpp
6,948
permissive
/******************************************************************************* * Copyright (c) 2022-2023 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...
8c0b3b852aa5e6562145a48dc56da9c3cbf6bbfd
120ccb2dd8b592583a0fb32b07e7881712ad58a0
junxuezheng/chromium
/third_party/blink/renderer/core/page/scrolling/root_scroller_test.cc
C++
cc
125,776
permissive
// Copyright 2016 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 "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/platform/web_coalesced_input_event.h" #include "third_party/blink/public...
9d45c27b7039175fb5a97d16b43a0ba5c89c1b4e
b831315657528962bf4d9090639346200c9f2779
PenfreeTseng/WebKit
/Source/ThirdParty/ANGLE/src/tests/egl_tests/EGLPreRotationTest.cpp
C++
cpp
100,054
permissive
// // Copyright 2020 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // EGLPreRotationTest: // Tests pertaining to Android pre-rotation. // #include <gtest/gtest.h> #include <vector> #include "common/Color.h"...
ad20d0391a76098b171ea2c8955c7923c81219ba
7b6b9478681495b599339936148604e982bf409c
nav-mike/the-theseus-and-minotaur
/src/sword.cpp
C++
cpp
3,963
no_license
#include "sword.h" /* Конструктор по умолчанию. */ Sword::Sword() : AbstractSceneItem() { #ifdef QT_DEBUG logMessage("Sword::Sword()\n"); #endif } // End Sword. /* Конструктор с параметрами. */ Sword::Sword(const int x, const int y) : AbstractSceneItem(x,y) { #ifdef QT_DEBUG logMessage...
e596d862ad480f122d7dcc2fb9b77bdb41d6d8c7
bf827cafe79cdaec23fdbbec5ce3efc1616e69c1
zhpinkman/Hotel-Manager-App
/src/User.cpp
C++
cpp
2,236
no_license
#include "User.hh" #include "Utrip.hh" #include "RatingCategoryWeightEstimator.hh" #include <vector> #include <iostream> using namespace std; User::User(const string &email, const string &username, const string &password) : email(email), username(username), password(password), _weightsAreManual(false...
107b436b9cb2784b2519f6e2878e54b464a1984d
efb90ce1d7943e2514c5a829502e02227368d5fd
zester/Mezzanine
/Mezzanine/libincludes/common/ogresrc/ogresvnsrc/OgreMain/src/OgreTextureManager.cpp
C++
cpp
11,007
permissive
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2013 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person ...
e3b7f432a2f72e8ac4a4d7e355d37f18376ffeaa
d657dec2ad2279ed52648e0cc29edee5c967e980
jedelbo/PEGTL
/include/tao/pegtl/internal/pegtl_string.hpp
C++
hpp
3,976
permissive
// Copyright (c) 2015-2018 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEGTL_STRING_HPP #define TAO_PEGTL_INTERNAL_PEGTL_STRING_HPP #include <cstddef> #include <type_traits> #include "../ascii.hpp" #include "../config.hpp" n...
496894fb9af78167f1fe3c1804e16ef09ca6c43e
ab8c6d82b8f681e529335ea9892762695753a3b7
jameskumar/USACO-solutions
/Section 2.1/Healthy Holsteins/holstein.cpp
C++
cpp
1,880
permissive
/* ID: vistasw2 PROG: holstein LANG: C++11 */ #include <string> #include <iostream> #include <fstream> using namespace std; ifstream fin; ofstream fout; int main() { fin.open("holstein.in"); fout.open("holstein.out"); int v; int require[1000]; int g; int value[15][1000]; fin >> ...
f913be43c17deb9b86331347930176044d74ef61
3e42b476fb728ee5705b404022c3a9f7b81c3e45
skwee357/sk_glft
/skfont.hpp
C++
hpp
2,464
permissive
/** * @file skfont.hpp * @author skwee * @brief Declaration of SkFont class, a class based on SDL_ttf and Freetype * lib to render text in OpenGL. */ #ifndef _SKFONT_HPP_ #define _SKFONT_HPP_ #include <SDL/SDL.h> #include <GL/gl.h> #include <SDL/SDL_ttf.h> namespace sk{ const int cMaxChars = 256; ...
b8dd0e39ec0421f7dbf3bd3cd6efc96bc96bab20
e5a830c01884d8c0fb99cc3efae0acb4a40f060c
yosupo06/library-checker-problems
/math/composition_of_formal_power_series/gen/small.cpp
C++
cpp
718
permissive
#include <cstdio> #include "../params.h" #include "random.h" using namespace std; int main(int, char* argv[]) { long long seed = atoll(argv[1]); auto gen = Random(seed); int n = gen.uniform(1ll,N_SMALL_MAX); vector<int> f(n),g(n); for (int i = 0; i < n; i++){ f[i] = gen.uniform(0ll,MOD-1)...
4b6d23944386509fac1946158bb138c3628eb68b
3157eb8871cea3f2b65a0c655356f6302c89fd5c
jjzhang166/WinNT5_src_20201004
/NT/inetsrv/query/filters/html/source/textelem.hxx
C++
hxx
1,380
no_license
//+------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation, 1992 - 1996 // // File: textelem.hxx // // Contents: Html Text Element class // //-------------------------------------------------------------------------- #if !defined( __TEXTE...
eb2169fd8df46a601c893df37ac100925c66202e
1a61e5d82532f1835f97be8bf0f21441ba1ca634
tangmengqiu/leetcode
/code/1.two-sum.cpp
C++
cpp
1,017
no_license
/* * @lc app=leetcode id=1 lang=cpp * * [1] Two Sum * * https://leetcode.com/problems/two-sum/description/ * * algorithms * Easy (40.70%) * Total Accepted: 1.4M * Total Submissions: 3.5M * Testcase Example: '[2,7,11,15]\n9' * * Given an array of integers, return indices of the two numbers such that the...
3c8c2a57b387d6d26650e28ae31c8db13646b0ff
20bd4c95df99109b6be391f40e28b6bc70eccc2d
thedaysob/Tufts-Classes
/main.cpp
C++
cpp
3,630
no_license
#include <string> #include <iostream> #include <fstream> #include <stdio.h> #include <string.h> #include "HashTable.h" #include "HashEntry.h" #include "Classes.h" using namespace std; void fill_table(HashTable *); void fill_entry(HashTable *, string, Classes, string); int calculate_key(string); void get_s...
395230e4f053c1e62dabbc5463db26f4b3e3c4e7
981e1e80ecf8d7452d2846b95df4b6b9c8a53748
BeyondCC/LeetCode
/ProductArrayExceptSelf.cpp
C++
cpp
1,809
no_license
/* * Author: cc * Date : 2015-07-17 * Source: https://leetcode.com/problems/product-of-array-except-self/ * Description: * Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Solve it without division and...
e91420345eddc3a6fbb71b6145b69799ab19763f
1cfec9ae1d0a1581083b164a9262cf4e651d80f3
hulor/EpicJamSeptember
/DeathLessManKind/Source/DeathLessManKind/OrbitalCharacter.cpp
C++
cpp
5,530
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "DeathLessManKind.h" #include "OrbitalCharacter.h" #include "BasePower.h" DEFINE_LOG_CATEGORY(OrbitalChar); // Sets default values AOrbitalCharacter::AOrbitalCharacter(const class FObjectInitializer& PCIP) { // Set this charact...
7bfe5e0fc8c7a59982a5809696f44c43c0f9adbd
15572b177e69f4bec2ebfdf8e5f8e36dffefff6f
zhanglinhahaha/PrimerCpp5th
/12/test.cpp
C++
cpp
3,216
no_license
#include "ConstStrBlobPtr.h" #include <cstring> #include <memory> void test1() { StrBlob b1; { StrBlob b2 = {"a", "an", "the"}; b1 = b2; b2.push_back("about"); } cout << b1.size() << endl; } vector<int>* write(vector<int>* v) { int n; while(cin >> n && n != -1) { ...
6baf2481ccc30af6383803f50b4afbb668a5c49d
d94b8ce4b88f6f21c47b1a7cb99d232feefe3091
NightOwl314/acm
/main_mod/com_substr_cnt.cpp
C++
cpp
11,061
no_license
//определение числа подстрок длины не менее k, содержащихся в обоих документах #include <iostream> #include "com_substr_cnt.h" using namespace std; struct TNode; //----------------------------------------------------------- struct TEdge { TNode* tonode; //узел, в которое идёт ребро int first, last; //начальн...
4a81ab6fe28b486d7125eabfb90b3a7bde78263a
733a95472002ec7d1edc177c52d78efb1c924c71
dai543103/ServerFramework-1
/001_ServerLib/BaseLibs/LRUHashCache.hpp
C++
hpp
11,470
no_license
#ifndef __LRU_HASH_CACHE_HPP__ #define __LRU_HASH_CACHE_HPP__ #include "SharedMemory.hpp" #include "ObjAllocator.hpp" #include "HashMap_K32.hpp" #include "BiDirQueue.hpp" //#include "LogAdapter.hpp" #define HASH_NODE_MULTIPLE 2 // hash结点个数为对象结点个数的2倍 using namespace ServerLib; // 需要自动回收的cache对象管理器,以hash方式和双向静态链表方...
9305c36c23dd98f29c852ebf1eb9ec52a4409741
0e9e4974b28aa05ccdb56d026ff0bd6c2fa21943
shubhamivane/CodeForces
/the smallest pair.cpp
C++
cpp
437
no_license
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { register int t; cin >> t; while(t--) { register int n,num; cin >> n; vector <int> arr; for(register int i = 0; i < n; i++) { cin >> num; arr.push_back...
ca714d31de044df7c9d4bf7c970c9c704a3b1ef3
46e23ccdf0e13a7dbbd6beabd7d4d2a3afee61c1
Roame/EDD-Iris
/code/src/main.cpp
C++
cpp
545
no_license
#include <iostream> #include <chrono> #include "Capture.h" using namespace std; int main(){ Capture cap; cap.start(); while(true){ chrono::steady_clock::time_point begin = chrono::steady_clock::now(); cap.takePicture("/home/pi/Iris/web/images/feed.jpg"); chrono::steady_clock::tim...
a8066779dfb09ae57080f3fa5ca45e7b4db73f16
6dfd64cef93f7c75fd6dd00e91c925caa8dd3d78
RUSHDCAT/Contest-Solutions
/Educational Codeforces Round 106 (Rated for Div. 2)/B.cpp
C++
cpp
853
no_license
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 100 + 10; int main() { int t; ios::sync_with_stdio(0); cin.tie(0); cin >> t; while (t --) { string s; cin >> s; int n = s.length(); vector<int> a(n+1, 0); for (int i = 1; i <= n; i ++) if (s[i-1] == '1...
b489e6176b3648f906b0eab06d91454474cf9f6a
c4fbfe35d508ce0f3d43cf8fca08ef36f1b90cf7
DylanVanAssche/harbour-matrix
/lib/user.cpp
C++
cpp
13,492
no_license
/****************************************************************************** * Copyright (C) 2015 Felix Rohrbach <kde@fxrh.de> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; ei...
174d78d178ad2538eaafb3593b149f5de281c36a
c600e1eb486f4518d20632f454704c597f6ead62
daotianya/browser-android-tabs
/chrome/browser/ui/ash/chrome_launcher_prefs.cc
C++
cc
26,581
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/ash/chrome_launcher_prefs.h" #include <stddef.h> #include <set> #include "base/macros.h" #include "base/strings/string_...
190ac567742b64eb8f0ead273a5faef2de3191f3
6e3c215675a71e56d70d8bfbb7802d48b0b5076f
ARM-software/ATP-Engine
/fifo.cc
C++
cc
16,239
permissive
/* * SPDX-License-Identifier: BSD-3-Clause-Clear * * Copyright (c) 2015 ARM Limited * All rights reserved * Created on: Oct 19, 2015 * Author: Matteo Andreozzi */ #include "fifo.hh" #include "logger.hh" #include "traffic_profile_desc.hh" #include <cmath> namespace TrafficProfiles { Fifo::Fifo(): ...
845717182afeae447a0e2f58746b626f0f994467
3f6d108c4cff4d65e271cefa03383815898b6192
kariander1/OperatingSystems
/Wet4/tests/test477.cpp
C++
cpp
49,461
no_license
#include "aux_macro.h" #include "../malloc_2.cpp" #include <iostream> void printStats() { std::cout << "_num_free_blocks: " << _num_free_blocks() << std::endl; std::cout << "_num_free_bytes: " << _num_free_bytes() << std::endl; ...
dce2894ffee4d9d443fcec2171dac168f333ef66
4fa694af91885be5159162f95e0ce4c816c5038d
peterou/mrpt
/libs/opengl/src/CPointCloud.cpp
C++
cpp
10,345
permissive
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | http://www.mrpt.org/ | | | | Cop...
531f5a76292a160859a3fba3d63603394ad96699
5c895339e50fb8b9930c2c85f5eeec38acef1927
alf-p-steinbach/cppx
/source/text/is_char_type_.hpp
C++
hpp
320
permissive
// Source encoding: UTF-8 (π is a lowercase Greek "pi" character). #pragma once #include <stdlib/type_traits.hpp> // std::is_same_v namespace cppx { using std::is_same_v; template< class Char > constexpr bool is_char_type_ = (is_same_v<Char, char> or is_same_v<Char, wchar_t>); } // namespace cppx
ed3590cd3ef16efa93ac850c4fe5d8a7df5b8f79
d252384d158965b9e0626495f931ff1c35c8aceb
song-kang/SKHMIProject
/SKBaseWidget/skbasewidget.cpp
C++
cpp
10,170
no_license
#include "skbasewidget.h" #include "ctopwidget.h" #include "cmainwidget.h" #ifdef WIN32 #define SHADOW_WIDTH 6 #else #define SHADOW_WIDTH 1 #endif SKBaseWidget::SKBaseWidget(QWidget *parent,QWidget *w) : AbsFrameLessAutoSize(parent) , m_centerWidget(w) { Init(); InitUi(); InitSlot(); } SKBaseWidget::~SKBaseWidg...
b169b48b99b0de0c9b3f49179b67165d729499b4
31678dd65efe39c8ef116302e30d5270adb0696b
tranquilhero/vinecopulib
/test/src_test/include/test_vinecop_class.hpp
C++
hpp
8,277
permissive
// Copyright © 2017 Thomas Nagler and Thibault Vatter // // This file is part of the vinecopulib library and licensed under the terms of // the MIT license. For a copy, see the LICENSE file in the root directory of // vinecopulib or https://vinecopulib.github.io/vinecopulib/. #pragma once #include "vinecop_test.hpp" ...
4d89c6578e00deb6024e58ab87646c67fad181d0
4a30cba437e5bc8885dd3f2b69b4abf82a3d9154
ekdrozdov/ai_box
/src/resource.cpp
C++
cpp
1,684
no_license
#include "resource.h" Resource::Resource() { // capacity = 0.; capacity = 500.; // permeability = 0.; permeability = 5.; energy = Energy(); } // double Resource::add(const std::string &state, const double &value) // { // if (allowed_states.find(state) != allowed_states.end()) // { // ...
4684b0152f2a64ad4d5c1688e6b4d7a95611e41f
f547f4ca3d2b5ed46edbd2e6fc92de7d3669c195
GonzalezAvilaAlejandro/arbol
/arbol.cpp
C++
cpp
527
no_license
#include "arbol.h" #include <cstdlib> node *newnode(int x){ node*p = new node; p->data=x; p->left = NULL; p->right = NULL; return p; }cb bool empty(arbol &t){return t.root==NULL} void init (arbol &t){ t.root=NULL; t.s=0; } void ins(arbol &t, int x){ if(empty(t)) t.root=newnode(x); else { node*p=t.root; n...
7a8327d3595cc643db73a31d4321702de7018efa
b60689b9c37b5dff00f848290c614a8a82ecf7f9
noche-x/networkio
/library/src/posix.cpp
C++
cpp
474
permissive
#include <mutex> #include <networkio/posix.h> namespace networkio::posix { std::mutex lock_gethostbyname; auto gethostbyname_safe(const std::string &addr, SOCKADDR_IN &out_addr) -> bool { std::lock_guard<std::mutex> lock(lock_gethostbyname); struct hostent *host = ::gethostbyname(addr.c_str()); if (host ...
c8ea1f8d28f35cc32eb3eb7dc865f99595aff81d
bd47f07c9b386e2224d4f63474ccdb777d74dac9
shengxiaweizhi/chromium
/media/learning/impl/fisher_iris_dataset.cc
C++
cc
7,967
permissive
// Copyright 2018 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 "media/learning/impl/fisher_iris_dataset.h" #include <vector> namespace { struct IrisExample : public media::learning::TrainingExample { Iris...
ce40cb6c67b9100689ae2d62071dd402679f3252
e5afeedfab0cb9e37e0206ccaa46817fe6aea705
WMcC17/Bartender
/ConsoleApplication3/ConsoleApplication3/Ingredients.cpp
C++
cpp
363
no_license
#ifndef _INGREDIENTS_CPP_ #define _INGREDIENTS_CPP_ #include "Ingredients.h" #include<iostream> #include<string> using namespace std; string Ingredients::getName(){ return _nm; } double Ingredients::getAmtNeed(){ return _amtNeeded; } void Ingredients::setAmtNeed(double amtn){ _amtNeeded = amtn; } void Ingredients::s...
854dcf6f75b410e8d39e12e2666cf1ad2df28198
8b86dd9473bf69750d44d5eaca07ec29806aada6
devjonathanday/CustomPhysics
/raygame/main.cpp
C++
cpp
226
permissive
#include "raylib.h" #include "Game.h" int main() { Game app; app.Init(); while (!app.ShouldClose()) { app.Tick(); while (app.ShouldPhysics()) { app.TickPhys(); } app.Draw(); } app.Exit(); return 0; }
923b25391ec6ab7abdb3adc7616fee08637d01d7
c2a4e54486eb63f8b57dd4182dda1967dee96385
zzsun777/OrderBook-6
/OrderBookMain.cpp
C++
cpp
1,167
no_license
#include "OrderBook.hpp" int main() { OrderBook orderBook; orderBook.enterOrder(2134, SIDE::BID, 21.3, 123); orderBook.enterOrder(2135, SIDE::BID, 24.6, 123); orderBook.enterOrder(2136, SIDE::BID, 12.9, 123); orderBook.enterOrder(2137, SIDE::BID, 7.7, 123); orderBook.enterOrder(2138, SIDE::BID, 21.3, 123)...
415345a83deb10ca01d5d54dc8b44201b2ff5ac9
be5b8ac9a7da65d3b363fb67851aa91b8c12f4c5
Titwin/Hexapod
/Robot sources/sources/Maths/ForwardKinematics.cpp
C++
cpp
4,661
no_license
#include "ForwardKinematics.hpp" //Default ForwardKinematics::ForwardKinematics() { legLength1 = MyVector3f(0, 4.4, 2); legLength2 = MyVector3f(0, 5.4, 0); legLength3 = MyVector3f(0, 9.9, 0); sensorPosition = MyVector3f(0, 0.7, 2.8); anglesOffset[0] = 0; anglesOffset[1] = 0; anglesOffs...
d3a8671e777a66cac09cd94d8c38a118fbc23477
117edbe99fbd8480163b5f82a0dd200873854cb0
avillega/CompetitiveProgramming
/UVA/UVA12516.cpp
C++
cpp
1,474
permissive
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(false);cin.tie(NULL); #define f(a, b, c) for(int a = b; a < c; a++) #define ra(a, b) f(a, 0, b) typedef vector< vector<bool> > supports; typedef pair<int, int> seat; int main(){_ int R, C, P, G; char row, side; ...
5575feefafa7d4bc8d16e77deb96b2e93edbc86d
1adde48d4c77153d484d38813d5a7b1050f81946
ribrdb/lldb
/source/DataFormatters/TypeSynthetic.cpp
C++
cpp
7,554
permissive
//===-- TypeSynthetic.cpp ----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------------------...
866437961567f757a7a0446181148d56424996fa
c41fc446e062002ae43b9ba402a4ae3c2707b147
zhmu/ananas
/external/gcc-12.1.0/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/unlock/1.cc
C++
cc
1,148
permissive
// { dg-do run } // { dg-additional-options "-pthread" { target pthread } } // { dg-require-effective-target c++14 } // { dg-require-gthreads "" } // Copyright (C) 2015-2022 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and...
5913d9e203889b99e4034055067b30118cd35315
d8636087e5c733013f01348ab9a1f83d72707b5b
alexandraback/datacollection
/solutions_5708921029263360_0/C++/HYEA/CCC.cpp
C++
cpp
944
no_license
#include<cstdio> #include<cstring> int J, P, S; void tmain() { int K; scanf("%d%d%d%d",&J,&P,&S,&K); int XX=J*P*S; int maxv=0; int maxi=0; for(int i=1;i<(1<<XX);i++) { int qq= __builtin_popcount(i); if(qq<=maxv) continue; int aa[3][3][3]; memset(aa,0,sizeof(aa)); for(int j=0; j<XX;j++) { if(!((1<<...
8caa5692bb484b0c1837a2730c45b28b0b352249
f203f9d7ddfca2a2d83ed5b0109fe2e9d6585ce8
oudream/ccxx
/test/string/test_string2.cpp
C++
cpp
3,242
permissive
#include <ccxx/cxapplication.h> #include <ccxx/cxstring.h> using namespace std; void testSplitn( bool bOutInfo = true ) { string ss[] = { "abds,asdf,sdaf,asd", ",abds,asdf,sdaf,asd", ",abds,asdf,sdaf,asd,", "abds,asdf,sdaf,asd,"}; for (size_t i = 0; i < 4; ++i) { co...
c059959aab17518f0fdb2f9ba85912a8668491fa
a4560f8fbee2a985e397492cdea9e874f7f94b7a
verif/leetcode
/permutationSequence/t.cpp
C++
cpp
1,244
no_license
/* The set [1,2,3,..., n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following sequence (ie, for n = 3): "123" "132" "213" "231" "312" "321" Given n and k, return the kth permutation sequence. Note: Given n will be betwe...
0bf4a92f21f1386dea7f589901cc636861cd3cd8
db28416174286b693e411e58699e05ff8c5f0f1b
applied-systems-biology/misa-framework
/src/misaxx-ome/src/misaxx/ome/utils/ome_helpers.cpp
C++
cpp
3,129
permissive
/** * Copyright by Ruman Gerst * Research Group Applied Systems Biology - Head: Prof. Dr. Marc Thilo Figge * https://www.leibniz-hki.de/en/applied-systems-biology.html * HKI-Center for Systems Biology of Infection * Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Insitute (HKI) *...
809bc0c1232b43ea83b72dcb24df361c77aa4c0a
51400d44793caa4386f3ec9b6996ea88f99a1329
15137359541/PyCTP-master
/PyCTP_Client/PyQt_Demo/GAS_V20160904/GAS/qemail/mimepart.cpp
C++
cpp
2,731
no_license
#include "mimepart.h" #include "quotedprintable.h" MimePart::MimePart() { cEncoding = _7Bit; prepared = false; cBoundary = ""; } MimePart::~MimePart() { return; } void MimePart::setContent(const QByteArray &content) { this->content = content; } void MimePart::setHeader(const QString &header) { this->header = ...
a3821fe0b94ba6390e4bfd45b590be563da1d9ec
8a38de64b7ecdf12c516b9d9ae0785da3e7e0a31
x-lugoo/nos
/drivers/lapic.cpp
C++
cpp
2,452
no_license
#include "lapic.h" #include "acpi.h" #include <kernel/trace.h> #include <kernel/asm.h> #include <mm/mmio.h> namespace Kernel { void* Lapic::GetRegBase(ulong index) { return Stdlib::MemAdd(Acpi::GetInstance().GetLapicAddress(), index * 0x10); } u32 Lapic::ReadReg(ulong index) { Barrier(); return Mm::MmIo...
de56c6062ae1a6580a2fb86b9958d952fb7f4e0a
93f3f7ae155ad3e96622abc3451a4f3f21f837e1
rubelhassan/cp-and-algorithms
/UVA/UVA - 11461 - Square Numbers.cpp
C++
cpp
391
no_license
/** * rubelhassan * 29 Nov 2016 */ #include<iostream> #include<cmath> using namespace std; int main(){ int a, b, counter; while(cin>>a>>b){ if(a==0 && b==0) break; int sq = sqrt(b); int s = sqrt(a); if(s*s < a) s += 1; counter = 0; for(int i=s; i<=sq;...
8277377701e44ad42f60e944c7e00a98913a593c
76efc30a14b340597147a438bf793960de8687a0
rushioda/PIXELVALID_athena
/athena/DataQuality/DataQualityUtils/src/StatusFlagCOOL.cxx
C++
cxx
3,193
no_license
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ // ********************************************************************** // $Id: StatusFlagCOOL.cxx,v 1.6 2009-02-13 12:32:11 ponyisi Exp $ // ********************************************************************** #include "DataQualityUt...
72f2af56f67c4929f8737f020b7ca8ae6e544bb3
5561ac0253ac1c888111a6eef59b270aec41ea4c
gameoverhack/FlightPhase-ofxAddons
/ofxTSPSReceiver/addons/ofxTSPSReceiver/ofxTSPSPerson.cpp
C++
cpp
3,134
permissive
/*************************************************************************** * * ofxPerson.cpp * ofxTSPSReceiver * Rockwell LAB + IDEO LAB peopleVision project * * Created by Brett Renfer * Adapted/Polished for by James George ( http://www.jamesgeorge.org ) * in collaboration with FlightPhase ( http://ww...
bc93d43a288888ce9d2b34c835ac46b96742411f
6d9147d7224bf3e793e73051951a501ce67dee7e
maniart/maniNilchiani_algo2012
/week_3/week3-multiple-ptr/src/timePointRecorder.cpp
C++
cpp
2,924
no_license
/* * timePointRecorder.cpp * drawingWithTime * * Created by zachary lieberman on 9/21/10. * Copyright 2010 __MyCompanyName__. All rights reserved. * */ #include "timePointRecorder.h" //------------------------------------------------- void timePointRecorder::setup(){ bRecording = false; } //-------------...
904addc96cbc619ae5d13727809828ae3830a90d
f3d462a158e9b69c8696acd5febe7dec0c74fa8a
prateeek1/CP
/Problems/NumberTheory/1487D-PythagorasTriplet.cpp
C++
cpp
955
no_license
#include<iostream> #include<vector> #include<cstring> #include<limits.h> #include<algorithm> #include<iomanip> #include<map> #include<cstring> #include<math.h> #include<queue> #define pb push_back #define fo(i,n) for(int i=0;i<n;i++) using namespace std; #define ll long long int #define ld long double const ld r = 1e+9...
75559e55d23cf9b69c93e9c0065ed8d155d8e1b8
1fc78edf58928fb30b4c8b9e6f1270e01409300e
byl484/NYSSE
/Game/statistics.cpp
C++
cpp
2,130
no_license
#include "statistics.hh" Statistics::Statistics(QGraphicsItem* parent) { Q_UNUSED(parent) humans_eliminated_ = 0; busses_eliminated_ = 0; player_lives_ = 3; // Statistics will be shown at the top layer of scene. setZValue(6); } Statistics::~Statistics() { } QRectF Statistics::boundingRect...
b1c0cdabfcc85cc37228b6477a2ed77680c84b9d
41e1b5f80d68c3e394445f483e8be6f5c5ce7a66
rawrunprotected/ezEngine
/Code/Tools/EnginePluginKraut/KrautTreeAsset/KrautTreeView.cpp
C++
cpp
3,053
permissive
#include <EnginePluginKrautPCH.h> #include <Core/ResourceManager/ResourceManager.h> #include <Core/World/Component.h> #include <Core/World/GameObject.h> #include <EditorEngineProcessFramework/EngineProcess/EngineProcessDocumentContext.h> #include <EditorEngineProcessFramework/EngineProcess/EngineProcessMessages.h> #in...
16eae5acc6bfe811c5ee71214e062287107e0595
c8dfcb49d2fdd5995e425bbb7f9034c508138628
yuanhang3260/TcpStack
/src/Packet.cc
C++
cc
2,366
no_license
#include <iostream> #include <vector> #include <stdlib.h> #include <string.h> #include "Packet.h" #include "Strings/Utils.h" namespace net_stack { Packet::Packet(const IPHeader& ip_header, const TcpHeader& tcp_header) : ip_header_(ip_header), tcp_header_(tcp_header) { } Packet::Packet(const IPHeader& ip_hea...
972c0c8460ae2b2e910d5af3963f6c28f25eb7ad
545792c3ab275ffef02c49481a49f6e1c0626fcc
alexandraback/datacollection
/solutions_5688567749672960_1/C++/WJMZBMR/A_BIG.cpp
C++
cpp
942
no_license
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <map> #include <sstream> using namespace std; typedef long long int64; int64 rev(int64 u) { ostringstream oss; oss << u; string U = oss.str(); reverse(U.begin(), U.end()); return atoll(U.c_s...
1dae0dcc4daefb336fffd02c89cb7cbef98f116a
6f37960ae72a8a2bf8fa9f10c565bc767a3c58cb
dchao34/bdtaunu_signal_extraction
/visualization/visualize_individual_components.cc
C++
cc
14,612
no_license
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <string> #include <chrono> #include <algorithm> #include <boost/program_options.hpp> #include <KernelDensity.h> #include <MarginalDensityAssociator.h> #include <utils/visualization_utils.h> #include <utils/custom_program_option_utils...
727d2308398444cc1b742c9196355b9daf723397
a50df89b9fb26a08e633b8837fbf35dab7f2e7c2
migregal/bmstu-iu7-oop
/lab_03/libs/driver/src/load_controller/scene/scene_load_controller.cpp
C++
cpp
535
permissive
#include <load_controller/scene/scene_load_controller.h> #include <error.h> std::shared_ptr<Object> Load::SceneLoadController::load(std::string &fname) { try { loader->open(fname); } catch (SourceError &error) { throw SourceError((std::string &) "can't open source"); } std::shared_ptr...
08e6aa78fd5f38e5b8b857724ca9511870869fba
83913ecd480dc17d31cc84d6cc8e312e206667f5
BobDeng1974/Giotto
/src/gfx/bgi/GfxTextJustification.hpp
C++
hpp
2,850
permissive
/* Giotto Copyright (C) 2017 George Oros 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, including commercial a...
14a3fb6b057bb13418ad299f8856640802e70056
034b6b963ca7e3f0635d052d5de61f30a0178687
zackdraper/MOB-CTI
/MOB_CTI/resources/Notifications.hpp
C++
hpp
2,150
no_license
class CfgNotifications { class Default { title = "%1"; // Tile displayed as text on black background. Filled by arguments. description = "%2"; // Brief description displayed as structured text. Colored by "color", filled by arguments. color[] = {1,1,1,1}; // Icon and text color duration = 5; // How many seco...
72fb4710bd749ad826267fc391005a221aa34f09
c63d8c239dc55c8f5cde1bf4e7801c4d9187de0a
eoma/gm-engine
/depends/ClanLib/Sources/Network/Web/ring_buffer.cpp
C++
cpp
2,392
no_license
#include "Network/precomp.h" #include "ring_buffer.h" #include "API/Core/Math/cl_math.h" namespace clan { RingBuffer::RingBuffer() : data(nullptr), size(0), pos(0), length(0) { } RingBuffer::RingBuffer(size_t size) : data(new char[size]), size(size), pos(0), length(0) { for (size_t i = 0; i < size; i++) data[i] ...
793a15735c3de8ce9dcaa30656b73ba6abcacde9
2f183048bb4ce7c72a2660b7b863e59427fd16a4
wentaozou1/BaruchCPPHW
/Level 3 HW Submission/2.2/2.2.2/2.2.2/Point.hpp
C++
hpp
396
no_license
// Point.hpp // // @author Xinyuan Zhang // @version 1.0 07/11/18 #ifndef Point_HPP #define Point_HPP #include <iostream> using namespace std; class Point { private: double m_x; double m_y; public: Point(); ~Point(); double GetX(); double GetY(); void SetX(double x); void SetY(double y); string To...
8d7e3efa3dddf062eaba1e2e92524e5e3d86309c
c437434373286d94e7169320554b66a6dcc62149
inikhil/Competitive-Programming
/twoarrays.cpp
C++
cpp
528
no_license
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int main(){ int nt,n,k,i,m;scanf("%d",&nt); long long t; while(nt--){ scanf("%d %d",&n,&k);m=0; int *a=new int[n]; int *b=new int[n]; for(i=0;i<n;i++){scanf("%d",&a[i]);} for(i=0;...
31822a374bc4bed08748932313345446e4872c62
e64d3e4c0331b2f0bc22c6024951c4ef315ebf86
Jin-Myung/hacker_rank
/algorithms/search/similar_pair.cpp
C++
cpp
1,930
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <assert.h> using namespace std; struct node_t { node_t(int _v) : v(_v) { } int v; vector<node_t> child; node_t *get_sub_node(int a) { if (a == v) { return this; } ...