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
8ed2f4c751b268a9d3085923d19d4580538dedbe
30f992515d22dfa2e31c29e623ffdda17ec57b7e
Tomarron/folly
/folly/test/RandomTest.cpp
C++
cpp
3,732
permissive
/* * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
105f390903b4f45b1ab0152e04f9c3572a0496c1
4115676823a3ba149122693b7ea1719b310277f8
daneel95/RTSGame
/Source/RTSGame/RTSGameGameModeBase.cpp
C++
cpp
381
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "RTSGameGameModeBase.h" #include "RTSController.h" #include "RTSCameraPawn.h" #include "RTSHud.h" ARTSGameGameModeBase::ARTSGameGameModeBase() { PlayerControllerClass = ARTSController::StaticClass(); DefaultPawnClass = ARTSCame...
f8126427d7c838a52cbafef209e30b8294fc7fd6
885f5848ca27652f4c9091d8e50c07bbb2a9b6b9
verghv5/IS2_Final_Project
/main.cpp
C++
cpp
4,846
permissive
/* Sample code for controlling the various sensors for the VR Bike Trainer. Author: Vivek Verghese Date: 04/30/2020 Class: Inventor's Studio 2 */ #include <iostream> #include <string> #include <vector> #include <fstream> #include <time.h> #include "mtrand.h" #include <stdlib.h> #include <cassert> double current...
89fc0f4c98c5acb4c33a03f9f2c461309ac1ac23
92ab2f0886fca9abcd99ad98d70cee814a026452
pyst1g/Programming-Cplus
/TopCoder/div2/SRM727/medium.cpp
C++
cpp
2,078
no_license
// finish date: 2018/01/11 #include <iostream> #include <cmath> #include <vector> #include <bitset> #include <algorithm> #include <stack> #include <map> #include <climits> using namespace std; #define FOR(i, a, b) for(int i=a;i<b;i++) #define rep(i, n) FOR(i,0,n) #define ll long long class TwoDiagonals { public: ...
115bb83d8c27587212a969f537e7e273b992e5da
b8249ca0768c0fdc3801fb5b3c9efd810980be60
nasa/europa
/src/PLASMA/PlanDatabase/component/Db.hh
C++
hh
433
no_license
#ifndef H_Db #define H_Db #include "PlanDatabaseDefs.hh" #include "Timeline.hh" #include "IntervalToken.hh" #include "TokenVariable.hh" #include "PlanDatabase.hh" #include "RulesEngine.hh" #include "Rule.hh" #include "RuleInstance.hh" #include "Schema.hh" #include "ObjectTokenRelation.hh" #include "ConstraintEngine.h...
8dc20ea354d8c1a4e231a04ad7a96f834028ddd2
9010025340b052a4e2b8aace707d23ea1c3cc92d
yyyeader/ACM
/HDU/HDU 1176免费馅饼(递推DP).cpp
C++
cpp
776
no_license
#include<cstdio> #include<cmath> #include<cstring> #include<algorithm> using namespace std; const int N=1e5+5; int dp[N][15]; int a[N][15];//a[i][j]表示在时刻i,位置j上掉落的馅饼数 int main(){ int n; while(~scanf("%d",&n)&&n){ memset(dp,0,sizeof(dp)); memset(a,0,sizeof(a)); int mt=0; for(int i=1;i<=n;i++){ int x,t; ...
11ad179600f80662eef06400b7cac4af1edec32d
fdafd71b748f9626ce26d17bcb4fd8178e92a4e3
Genvekt/CPP_little_games
/Tic_Tac_Toe/Player.cpp
C++
cpp
740
no_license
#include "Player.h" #include "Board.h" #include <iostream> #include <string.h> using namespace std; Player::Player(char *str, int my_num) { strcpy_s(name, str); my_number = my_num; } Player::Player(int num, int my_num) { cout << "Player" << num << ", enter your name: "; cin >> name; my_number = my_num; } Play...
7fc8151f22064dc30c3eea282ec6273da787f46a
c828192762c9cc901c1f6e05717bc1379fccb905
SCIInstitute/fluorender
/FluoRender/FluoRender/Flobject/InfoVisitor.hpp
C++
hpp
2,580
permissive
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2018 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to d...
6ead184f2281be31836e64830d779e9e548d4b1b
8b465d23cb909ff0670170c349d2eb9f7556c046
jfactory07/apitrace
/retrace/retrace.cpp
C++
cpp
5,437
permissive
/************************************************************************** * * Copyright 2011 Jose Fonseca * All Rights Reserved. * * 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 wit...
1f7dda79aee37efbf37346e884fa265a5a85ebfd
825dd742b55086c165af4e78513d21df20e1a72e
przemkovv/sphinx-cpp
/src/app/SampleData.cpp
C++
cpp
910
no_license
#include "SampleData.h" namespace Sphinx { namespace SampleData { Sandbox simple_hello_world() { return {{"foo.cpp", R"code( #include <iostream> int foo() { std::cout << "int foo(){}" << std::endl; return 0; } )code" }, {"foo.h", R"code( int foo(); )code"}, {"main.cpp", R"co...
e788a7b6853d2cbf433d50dc47892bcf0cba20b8
de0292cd8b8fa40ec796567cd53a818f08b069b0
sqchenxiyuan/NetTopo
/MFCEND/ChildFrm.cpp
C++
cpp
877
no_license
// ChildFrm.cpp : CChildFrame 类的实现 // #include "stdafx.h" #include "MFCEND.h" #include "ChildFrm.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CChildFrame IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWndEx) BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWndEx) END_MESSAGE_MAP() // CChildFrame 构造/析构 CChildFrame::CChil...
502969c9a296488df3d78bfcc5d77c7b69badb1a
4bb1b1c5020c8cf4304a0a12f39ee2f301bde0c3
samcom12/NektarWithScalar
/library/MultiRegions/ExpList3D.cpp
C++
cpp
28,280
permissive
/////////////////////////////////////////////////////////////////////////////// // // File ExpList3D.cpp // // For more information, please see: http://www.nektar.info // // The MIT License // // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA), // Department of Aeronautics, Imperial College L...
bb9eaafa8b35390abd3fc1c8a3a40b32420dd5a9
56d197376e917b687953593659e8692bd7ac2fed
longstl/mus12
/_Library/_Include/boost/align/detail/is_alignment_constant.hpp
C++
hpp
869
no_license
//////////////////////////////////////////////////////////////////////////////// // is_alignment_constant.hpp /* (c) 2014 Glen Joseph Fernandes glenjofe at gmail dot com Distributed under the Boost Software License, Version 1.0. http://boost.org/LICENSE_1_0.txt */ #ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_CONSTANT_HPP #...
5119beb446022ede0fd9af601fc92e1772884907
34d06500994b22e750659beab8001ccff4cf90aa
villadox/PrimeWorldEditor
/src/Core/CRayCollisionTester.cpp
C++
cpp
2,362
permissive
#include "CRayCollisionTester.h" #include "Core/Scene/CSceneNode.h" CRayCollisionTester::CRayCollisionTester(const CRay& rkRay) : mRay(rkRay) { } CRayCollisionTester::~CRayCollisionTester() { } void CRayCollisionTester::AddNode(CSceneNode *pNode, uint32 ComponentIndex, float Distance) { mBoxIntersectList.emp...
7f6eabf9426a421bcb67333b8968a16a17d2c69e
dad328076461ddb64c648c413c33a8c6541730f3
yijay/TMB
/examples/state space Schaefer models/schaefer_r_Millar/schaefer_r.cpp
C++
cpp
1,873
no_license
//----------------------------------------------------- // State-Space Schaefer Production model // with Meyer & Millar formulation // // Group project by: // // Yi-Jay Chang // Felipe Carvalho // Jin Gao // Marc Nadon // 2/9/2016 9:40:46 PM //----------------------------------------------------- ...
5026dddf126ddc0e419ab0dbed5fb145f1dd64f4
158585cbbbeb41fc408d1dabf26077e6f993779e
uutzinger/RTIMULib
/RTIMULib/IMUDrivers/RTPressureMS5637.cpp
C++
cpp
5,937
permissive
//////////////////////////////////////////////////////////////////////////// // // This file is part of RTIMULib // // Copyright (c) 2014-2015, richards-tech, LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"...
8efe07f3b0a8a97febb5000e3107c5b57b5c5488
6a4a73aa90b5f5e70c4421da3e55b5c8184019e0
OrangeCocoa/Model-Converter
/Assimp-Converter/Src/MMDFileRoader/PMXFile.cpp
C++
cpp
17,718
no_license
#include<iostream> #include<fstream> #include<filesystem> #include"PMXFile.h" template<typename _To, typename _From> inline constexpr _To s_cast(_From from) { return static_cast<_To>(from); } //const std::string MODEL_DIR = "../../../Resource/Model/"; template <typename Type> void Read(Type* value, std::ifstream& ...
bb754896a3c4da53dbab86b670f378533c36fda1
6b6d080a5865d4d503704b6c80999d6f7fbe9ac6
ClearSeve/Old-Codes
/3s.cpp
C++
cpp
3,182
no_license
#include<iostream> #include<cstdio> #include<cmath> using namespace std; typedef long long int lg; void sort1(lg,lg); void sort2(lg,lg); lg mila(lg,lg,lg); lg a,b,n1,n2,x1,x2,n,cg=0; lg a1[5999999]={0}; lg a2[5999999]={0}; int main() { lg i,s1[99],s2[99],j,x,sm,cn; scanf("%lld%lld%lld",&n,&a,&b); n1=n/2;//pahle ...
badad37659945939386a61fda014537c950da287
6dea68401a2aab8deb78d5146a60df739c7e1b60
glitchhunter/OperationCode
/Source/OperationCode/Interpreter/SemanticAnalysis/Phases/SAP_Final.cpp
C++
cpp
1,475
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "SAP_Final.h" #include "Interpreter/SemanticAnalysis/SymbolTable.h" void USAP_Final::StartAnalysis(UAST_Node* RootNode) { for (auto it = GetSymbolTable()->FunctionIDs.CreateConstIterator(); it; ++it) { // Store them separatly ...
d9c4a4028016ce25dc3ead8a461b005ffd5d393a
3628b87a27a0540ffe984d0388705d493e5d70a8
aliyun-beta/aliyun-openapi-cpp-sdk
/aliyun-api-rds/2014-08-15/src/ali_rds_describe_sq_llog_report_list.cc
C++
cc
5,842
permissive
#include <stdio.h> #include "ali_api_core.h" #include "ali_string_utils.h" #include "ali_rds.h" #include "json/value.h" #include "json/reader.h" using namespace aliyun; namespace { void Json2Type(const Json::Value& value, std::string* item); void Json2Type(const Json::Value& value, RdsDescribeSQLLogReportList...
acb2015c9e603613c75cdf12d85b4a788e6a97e2
c79e82705e27625f73688506a9e501e3453a9dd9
blockchaindevelopers/AXEL-Utility-Token
/src/netbase.cpp
C++
cpp
42,202
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2015-2017 The PIVX Core developers // Copyright (c) 2018-2019 The AXEL_Utility_Token Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.openso...
7f3fafb430fb488d85c7386e168e1a331b9daa5a
0e595b07f51e24b82d652218dab7a5ac14e7174e
agiacobbi/CPSC223
/HOLYGRAIL/binarytree.cpp
C++
cpp
13,280
no_license
//file binarytree.cpp //Alex Giacobbi and Jalen Tacsiat //agiacobbi //date: 11/1/18 //implementation file for binarytree.cpp // data object: a binary tree which is in the form of empty or // consists of a root with left and right trees // that are binary trees // data s...
db84fc2d40dd7b9aedcf4a3472bd032df879223f
dc5569c31dd8908e511e2278ca5d38d34affad42
vergilium/itstep
/ITStepWorks/DesignPatterns/Visitor/ConcreteElementB.cpp
C++
cpp
215
no_license
#include "ConcreteElementB.h" ConcreteElementB::ConcreteElementB() { } ConcreteElementB::~ConcreteElementB() { } void ConcreteElementB::Accept(BaseVisitor* pVisitor) { pVisitor->VisitConcreteElementB(this); }
06e4c4b805ad97e8c944fe34057f76081f75b062
354ac1f927b4e966e949d858fe09eff688b7009e
DylanBelka/OpenGL-Engine
/OpenGL/CubeMap.cpp
C++
cpp
595
no_license
#include "CubeMap.h" CubeMap::CubeMap(std::string& fileName) { glGenTextures(1, &texture); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_CUBE_MAP, texture); int width, height; //for (unsigned i = 0; i ) glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE...
53454063200f2c52fd73c42f37a848e5254db61e
837e62e26387748aa3f24a38edaac1023a8c65c1
cpp-pm/filament
/filament/backend/test/test_ReadPixels.cpp
C++
cpp
12,028
permissive
/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
44b0f3bfbf43b6ac573411c082b426e38dda4fca
198e4b496f5628fced16588b0b0842bd8d5be7be
magickazer/epsilon
/apps/regression/model/linear_model.cpp
C++
cpp
1,289
no_license
#include "linear_model.h" #include "../store.h" #include <poincare/layout_helper.h> #include <math.h> #include <assert.h> using namespace Poincare; namespace Regression { Layout LinearModel::layout() { if (m_layout.isUninitialized()) { const char * s = "a·X+b"; m_layout = LayoutHelper::String(s, strlen(s),...
f17c6986d8b80854bfa69c40dd5fd4bed16793c9
65478f8beaba9b883248f16456b94d6f1cb59761
wfwgghb/devclientQt
/tcpclientGui/myitemdelegate.cpp
C++
cpp
4,881
no_license
#include "myitemdelegate.h" #include <QDateTime> #include <qdebug.h> MyItemDelegate::MyItemDelegate(QObject * parent):QItemDelegate(parent) { connect=QPixmap(":new/icon/connect.png"); disconnect=QPixmap(":new/icon/disconnected.png"); car = QPixmap(":new/icon/car.png"); battary_full = QPixmap(":new/icon/...
18b13c20d90b7ed59b178686565f9de87caffb16
b0b02a61a654dc9a32a7d3b108a6980e48170c06
boxnos/codeforces
/0230A/main.cpp
C++
cpp
2,326
no_license
#include <cstdio> #include <utility> #include <vector> #include <algorithm> using namespace std; #define _gp(l) const auto gcu{getchar##l}; const auto pcu{putchar##l} #ifdef __linux _gp(_unlocked); #else _gp(); #endif #define _DEF(r, n, ...) inline r n(__VA_ARGS__) noexcept #define _T template <typename T> #define _HT...
9c8e44fcf0eeb93ab985069f5f08ada9ba91bb6d
125464378592255b67d5d3c8550148626a429225
cmorgoth/BSMatLHC
/BSMApp/src/CMS/CMSRazorHggHbb.cc
C++
cc
20,066
no_license
//------------------------------------------------------- // Description: // Runs Hgg analysis // Assumes all h->gg // "fakes" one h->bbar // Authors: //------------------------------------------------------- #include <string> #include <iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <TTr...
f762595410da7309912a975fe29ba454ea1727be
cfd67e2aed6ce80161d3924f6d5dbffb01819d22
mbbill/Chromium_Base
/demo/demo.cpp
C++
cpp
2,979
no_license
#include <iostream> #include <string> #include "base/logging.h" #include "base/base64.h" #include "base/run_loop.h" #include "base/memory/ref_counted_memory.h" #include "base/trace_event/trace_event.h" #include "base/trace_event/trace_buffer.h" #include "base/trace_event/trace_log.h" using namespace std; using namespa...
b92a3dff5d88b23dd74ab3fbf4117dbced71d2d6
8e4a06ceac11899d129574aa8f5a15aeff587075
LL0626/LeeCode
/leeCode/155_最小栈.cpp
C++
cpp
766
no_license
#include <iostream> #include <stack> #include <vector> using namespace std; class MinStack { public: /** initialize your data structure here. */ MinStack() { } void push(int x) { a.push(x); if (b.empty() || x < b.top()) { b.push(x); } else { b....
c66e5c582ea9eba891c3230acdcfb9d173227997
1a6e24e9d698d4d521defc115bea5954405de07d
Myke500/Leafn0de
/src/qt/addresstablemodel.cpp
C++
cpp
14,037
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "addresstablemodel.h" ...
48123cf83436ea2ebacc5f3fbb0b8f8de65cdcfc
1b86d5dd555e8ec771918b2a092de239fbc388c0
Rozinoer/basic_cpp_oop
/Module04/ex02/main.cpp
C++
cpp
442
no_license
#include "Animal.hpp" #include "Dog.hpp" #include "Cat.hpp" #include <unistd.h> void test() { Animal* animal[4]; for (int i = 0; i < 4; i++) { if (i % 2 == 0) animal[i] = new Dog(); else animal[i] = new Cat(); } for (int i = 0; i < 4; i++) { anim...
5d24d8420186045a5a0a332783f33fc7e971f6e6
de5dcc07ff4b2c1cc48477f197a03e89571481bd
anstadnik/CPP_pool
/d04/ex01/main.cpp
C++
cpp
449
no_license
#include "PlasmaRifle.hpp" #include "RadScorpion.hpp" #include "PowerFist.hpp" int main() { Character* zaz = new Character(``zaz''); std::cout << *zaz; Enemy* b = new RadScorpion(); AWeapon* pr = new PlasmaRifle(); AWeapon* pf = new PowerFist(); zaz->equip(pr); std::cout << *zaz; zaz->equip(pf); zaz->attack(b); std::co...
95e99aadf6c177602b18f2697af908634f42d6ea
69bf1f53fad844cd749dac0773459dc6071ca335
bigben0123/chromium
/content/browser/speech/tts_controller_unittest.cc
C++
cc
29,902
permissive
// Copyright (c) 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. // Unit tests for the TTS Controller. #include "content/browser/speech/tts_controller_impl.h" #include "base/memory/ptr_util.h" #include "base/value...
259c17b81b7c9dda10be3e04b64c0e4934809053
3b7dba9e687b23264f86f1832b2c22456a0c47a7
git-Charlie/ARK-SDK
/SDK/ARKSurvivalEvolved_PrimalItemStructure_WoodElevatorTrack_parameters.hpp
C++
hpp
824
permissive
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_PrimalItemStructure_WoodElevatorTrack_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //--------------------------------...
be4bdbea345822199280801b72c3e82cd6a9710f
2f76f5f4f510f584daff7ff49eed676883826a68
mjendruk/qttokenedit
/source/examples/sorted_table/CsvItemModel.cpp
C++
cpp
2,495
permissive
#include "CsvItemModel.h" #include <algorithm> #include <QtCore/QFile> #include <QtCore/QTextStream> #include <QtDebug> CsvItemModel::CsvItemModel(QString const& filePath, QObject* parent) : QAbstractTableModel{parent} { loadFromFile(filePath); } int CsvItemModel::rowCount(QModelIndex const& parent) const { ...
7c7c642493dbb7bd9366352c6ce4630120f269f8
d78109f8fc7923def3b4af4cafe83d84144860e5
brandoncabael/CSC160-HW
/lesson08/StudentException/StudentException.cpp
C++
cpp
636
no_license
//--------------------------------------------------------------------------- // CSC160 Homework 8 - StudentException.cpp // // This is the implementation file for the StudentException class //--------------------------------------------------------------------------- #include <string> #include "StudentException.h" usi...
2263193498d91f363c930ae0c25e3558ea4d0b5e
6f32f14133fa8fd8f1d34cd42e0f3e1c685fa9e6
ishine/paddle-mobile
/lite/kernels/arm/activation_compute.cc
C++
cc
11,884
permissive
// Copyright (c) 2019 PaddlePaddle 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...
34b182b8f95cae45a065c33119a5c67fe7588492
cf1921052c3f513c619a9b6c6920bd34da286af3
linouk23/leetcode
/31.cpp
C++
cpp
1,404
no_license
// 31. Next Permutation - https://leetcode.com/problems/next-permutation #include "bits/stdc++.h" using namespace std; class Solution { public: vector<int> nextPermutation(vector<int>& nums) { // {6, 2, 1, 5, 4, 3, 0} -> {0, 3, 4, 5, 1, 2, 6} -> 1 auto break_point = is_sorted_until(nums.rbegin(),...
cf07c6cf835f01e9c80abac58eeb34c0c56bf723
7d70faa831312c8adebc0c140a9c55598311d9af
Utopianer/DOMO-Project
/others/DOMO-Core[PoW] OLD VERSION/src/bitcoin-tx.cpp
C++
cpp
20,484
permissive
// Copyright (c) 2009-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "base58.h" #include "clientversion.h" #include "primitives/block.h" // for MAX_BLOCK_SIZE #include "primitives/transa...
cc7bb78a8ebcbef543417f47eda09da7cf5a9b4e
03f374b99b0ad9c877d7dd09f6222c5befd67d36
OSLL/geo2tag
/src/tracker/clients/meego/lib-meego-client/MeegoClient.cpp
C++
cpp
6,379
no_license
/* * Copyright 2010-2011 OSLL osll@osll.spb.ru * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and th...
3b956b2b0b6e9f6d58da3ce9b6c64764f3ea3469
26006204e48a217aac7c4f49df2c4bbcf795ad63
joshuabezaleel/cp
/codeforces/Gym/haha/C.cpp
C++
cpp
1,785
no_license
#include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <utility> #include <numeric> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <ctime...
0699509dd4d0311026d8e955ccd86122fc928b8c
a6a6afdcf81e0748bc48182f7027f6a21a486277
Pierre-Gilles/ut-computer
/UTComputer/ut_computer_tests/operators_tests/classic_operators_tests/tests_OperatorNeg.cpp
C++
cpp
3,629
no_license
#include <iostream> #include <gtest/gtest.h> #include "../../../operators/classic_operators/OperatorNeg.h" #include "../../../literals/ProgramLiteral.h" using namespace std; class Test_Operator_Neg : public ::testing::Test { protected: StackUTComputer st; OperatorNeg op_neg; public: virtual void SetUp()...
53b8c40e8c20845200f31627037ae6cc8330fe0b
b6aa5e55355981955d9893b37ae43cfdadc5495f
BenjaminCoquelle/MIOpen
/src/binary_cache.cpp
C++
cpp
4,176
permissive
/******************************************************************************* * * MIT License * * Copyright (c) 2017 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * ...
2206a44df91095d0a567300d3180ea957d6ea6a9
8b69168659b446c83bf7b1bedac171646346373a
gagandeepahuja09/Dynamic-Programming
/LeetCode/Uncrossed Lines.cpp
C++
cpp
567
no_license
class Solution { public: int dp[501][501]; int f(vector<int>& A, vector<int>& B, int i, int j) { if(i == A.size() || j == B.size()) return 0; if(dp[i][j] != -1) return dp[i][j]; int ans = 0; if(A[i] == B[j]) ans = 1 + f(A, B, i + 1, j + 1); ...
4724c1990c667ff4ba6f9b74e29084a7270512bd
0f99c9f57b52bd105c124ebeaf4703d52a45fba1
xu-star/A31_QT_APP
/ethernethttp.cpp
C++
cpp
60,692
no_license
#include "ethernethttp.h" EthernetHttp::EthernetHttp(QObject *parent) : QObject(parent) { this->moveToThread(&m_threadhttp); m_threadhttp.start(); } void EthernetHttp::ethernetHttpInit() { interface = ""; TokenData = ""; StateCode = 0; TerminalPlusFlag = false; AccountFlag = true; ...
44cb018aac4c6a9b237fce16b9c8cdf856395484
b86da588a2d7dfddaf8b7da900946c79f98aca9b
shamexln/nowcoder
/18-Mirror.cpp
C++
cpp
464
no_license
/*二叉树的镜像*/ /* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class Solution { public: void Mirror(TreeNode *pRoot) { if (pRoot==nullptr || (!pRoot->left && !pRoot->right)) return; std::swap(pRoo...
aa5f82bfc2d9acf7f3f757b0bcefd5b3799d901d
b7ad82dc65f12dfb5960927f90b222a52151862d
LLlkaiwen/Firmware
/src/drivers/distance_sensor/mb12xx/mb12xx.cpp
C++
cpp
16,234
permissive
/**************************************************************************** * * Copyright (c) 2013-2015 PX4 Development Team. 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. Red...
8d375514fd03a928c7a77a47353aa7e985e43f82
1ad4087865375d5966760cf4a3e50fa1b4c38057
Rajat-S-Patel/Data-Structures-and-Algorithms
/Algorithms.cpp
C++
cpp
17,741
permissive
/* * @author: tirthasheshpatel@gmail.com * @github: tirthasheshpatel@github.com * All the algorithms from CLRS Section 1 are implemented except Strassen's Algorithm. * Sorting algorithms implemented : 1.) Insertion Sort 2.) Heap Sort 3.) Quick Sort 4.) Randomized ...
9146f251668d051147cd01577cd9ce5818ce65f7
73274f4bcb2028b3e1b7be317afffe8450c36444
wlenthe/DREAM3D
/Test/Unused/NewDataContainerStructureTest.cpp
C++
cpp
23,286
permissive
/* ============================================================================ * Copyright (c) 2009-2015 BlueQuartz Software, LLC * * 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 ...
5866c8448251f31eae686b1c48814552c091b0bf
284798f008b5f87e7b48979774093595a3931775
leequan/DLSD
/DeepLearningSystemdialog/src/pages.cpp
C++
cpp
13,841
no_license
#include <QtWidgets> #include "./include/pages.h" #include "./include/subgroundpage.h" #include "./include/subskypage.h" #include "./include/configdialog.h" VideoPage::VideoPage(QWidget *parent) : QWidget(parent) { QPushButton *browseButton = createButton(tr("&Browse..."), SLOT(browse())); findButton = c...
7bc720f055fa0504b95d0d6881f541deb3a3fdc0
16c04f0673aaf669e3042d1fc32316de960d3e69
aurusov/ClickHouse
/dbms/src/Interpreters/JoinToSubqueryTransformVisitor.cpp
C++
cpp
10,986
permissive
#include <Common/typeid_cast.h> #include <Interpreters/JoinToSubqueryTransformVisitor.h> #include <Interpreters/IdentifierSemantic.h> #include <Interpreters/AsteriskSemantic.h> #include <Interpreters/DatabaseAndTableWithAlias.h> #include <Parsers/ASTSelectQuery.h> #include <Parsers/ASTTablesInSelectQuery.h> #include <P...
3d203dc855a38c9039c54d4767f6f8d8dbe00a7e
66c0b0d4f5a8b9a739c8e1f06560b25ff206f943
wever0408/int128bit-inCalculator
/BigInt.cpp
C++
cpp
19,387
no_license
#include "BigInt.h" BigInt BinToDec(char* bin) //Hàm chuyển từ nhị phân sang thập phân theo thuật toán đã học { string kq = "0"; string pow = "1"; BigInt res = { 0 }; for (int i = strlen(bin)-1; i >= 0; i--) { if (bin[i] == '1') { kq = AdditionForString(kq, pow); } pow = AdditionForString(pow, pow); ...
bb3bfae983e8d41021cd152728d3b93d8b13efa1
a7894c06614bd73feeeacebaa0bf36aa4da8cc0d
cw100/SoT-SDK
/SDK/SoT_UnarmedCombatItemCategory_classes.hpp
C++
hpp
758
no_license
#pragma once // Sea of Thieves (1.4) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_UnarmedCombatItemCategory_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------...
4549b4e0ef9a0182ed547040e38f1e889d28bc2e
7f7f95f8f4677bd12148402f7ba4c97133cb7ff9
WYK15/swift-Ollvm11
/lldb/source/Expression/Materializer.cpp
C++
cpp
50,803
permissive
//===-- Materializer.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 // //===---------------------------...
313e253412c0b9ecb0e4b40e76de59f35537f156
5ef9f3c5f586af20b3e13dda3aa8ba8a33450a53
vetal71/OOP
/Laba1/program.cpp
C++
cpp
2,736
no_license
/* Лабораторная работа №1 Вариант 11 Колесник Илья Витальевич program.cpp */ #include <iostream> #include "conio.h" using namespace std; /* Структура Pair */ struct Pair { char * name; // имя int value; // значение }; // Константа #define MAX_PAIRS 100 // максимальное количество пар // Стр...
9bd491325776c7425e3736fe21e0fb9747380bd3
769e13e440b0da9fc8f2c45a5d3b2656ded9fe86
xidianlina/cppprimer
/chapter_09_51.cpp
C++
cpp
2,611
no_license
#include<iostream> #include<string> using namespace std; class Date { public: unsigned _year; unsigned _month; unsigned _day; void _show() { cout << _year << "年" << _month << "月" << _day << "日" << endl; } Date(string); }; Date::Date(string s) { int flag = 0; string number = "0123456789/"; string ...
fbe0a2bf1bdbd0c9edc6740040a121f1854c8cb6
67383487f4eb3d264ac5b8d56de386e5a6a9d66d
SIMRAN1/Coding-practice
/minOneBitOperation_greycode.cpp
C++
cpp
230
no_license
class Solution { public: int minimumOneBitOperations(int n) { int output = 0; while( n> 0) { output ^= n; n = n >> 1; } return output; } };
c229d9b92681dfadb72e72295d1286d62f52d6d2
1651fc983b5575e14844dccd42ca4293cad5c463
Rios92/TFT8
/Talon Aegis (2nd Rendition)/@TalonAegis/talagownt/script_component.hpp
C++
hpp
402
no_license
#define COMPONENT talagownt #define COMPONENT_BEAUTIFIED talagownt #include "\x\\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_TALAGOWNT #define DEBUG_MODE_FULL #endif #ifdef DEBUG_SETTINGS_TALAGOWNT #define DEBUG_SETT...
e12022af87e04db1cf205611c5b790c63640d612
e1fe5ac9bd9467cecb7d7260938ce0cda09e56c7
dianarg/geopm
/integration/test/test_timed_scaling_region.cpp
C++
cpp
3,303
permissive
/* * Copyright (c) 2015 - 2021, Intel Corporation * * 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 condition...
8894047adbfbc140af1f21488fb91ea2cea59667
bc16e9a3f86599e4fd64e0de4fb2b1e212b19e5c
Refuge89/sunwell-2
/core/src/server/game/Entities/Object/Object.cpp
C++
cpp
103,439
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 progra...
a97b48535dd57e017a04aad4a9358730db8fb749
a0fea5cd25214fc97160dec401062b48ad0658e5
sirikata/sirikata
/libcore/include/sirikata/core/command/Command.hpp
C++
hpp
2,545
permissive
// Copyright (c) 2012 Sirikata Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. #ifndef _SIRIKATA_LIBCORE_COMMAND_COMMAND_HPP_ #define _SIRIKATA_LIBCORE_COMMAND_COMMAND_HPP_ #include <sirikata/core/util/Platform.hpp> #include <json_s...
f8bdb0c0c30949825d0eb7d632bc2ffb87945271
b9d98cac5b9929727635b59bedd35b220dc1a281
minxuanjun/basalt_class
/thirdparty/ros/ros_comm/test/test_roscpp/test/src/multiple_subscriptions.cpp
C++
cpp
5,765
permissive
/* * Copyright (C) 2008, Morgan Quigley and Willow Garage, Inc. * * 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 cond...
da2af96ef2664929588a31ccd4802a9c68801ebc
ee2078e71e23074aafe05e41afdca6f98924484c
programmingmind/CUDAMandelbrot
/BigFloatTests.cpp
C++
cpp
1,316
no_license
#include <iostream> #include "BigFloat.h" #include "common.h" using namespace std; int main() { BigFloat a; BigFloat b; BigFloat c; BigFloat d; a = -1.50; b = 2.00; cout << "a: " << a << endl; cout << "b: " << b << endl; init(&a, 5); init(&b, 2000000000); add(&a, &b, &c); sub(&c...
d48db105e4e49a7a0a3e57c88c66309de462b952
8fe6d3bdea17744b365cdc96df414803fae29378
felikjunvianto/kfile-uvaoj-submissions
/10327.cpp
C++
cpp
679
permissive
#include <cstdio> #include <cmath> #include <iostream> #include <string> #include <cstring> #include <algorithm> #include <vector> #include <utility> #include <stack> #include <queue> #define fi first #define se second #define pb push_back #define mp make_pair #define pi acos(-1.0) #define eps 1e-9 ...
fb210ed8d19867d7c82c4eecb5642a2d1bcca59a
f2f6d78e4b9daceb4da1531a21495f777230dfa3
SeifAldeinAhmed/Test
/MyCodes/GCD/GCD_Naive.cpp
C++
cpp
372
no_license
#include <iostream> int gcd_naive(int a, int b) { int current_gcd = 1; for(int d=2; d<=a && d<=b; d++) { if(a%d==0 && b%d==0) { if(d>current_gcd) { current_gcd= d; } } } return current_gcd; } int main() { int a, b; std::cin >> a >> b; std::...
399d4d6c3e8eb725535f49b66510b5662f132cc0
a75dd6d7aea70c8df423b8221e75b5b5d2711c29
zeroengineteam/ZeroCore
/ZeroLibraries/Zilch/Project/Zilch/HandleManager.hpp
C++
hpp
15,990
permissive
/**************************************************************\ * Author: Trevor Sundberg * Copyright 2016, DigiPen Institute of Technology \**************************************************************/ #pragma once #ifndef ZILCH_HANDLE_MANAGER_HPP #define ZILCH_HANDLE_MANAGER_HPP namespace Zilch { //...
95c62fa2d0403f567d1ef499cd499503053ba019
908db31b72ddb7bd265e0286a0aef06d6bf30a49
JulianAdamek/gevolution-1.1gpu
/hibernation.hpp
C++
hpp
15,337
permissive
////////////////////////// // hibernation.hpp ////////////////////////// // // Auxiliary functions for hibernation // // Author: Julian Adamek (Université de Genève & Observatoire de Paris) // // Last modified: December 2016 // ////////////////////////// #ifndef HIBERNATION_HEADER #define HIBERNATION_HEADER ////////...
99bfb6614be4c294148262f662ebfded0af3eab2
aacc6711a60431d43f83d592e3fd2294e3fb32fc
Kujanenj/OhSunnittelu
/Application/UnitTests/ParseTests/tst_parsertests.cpp
C++
cpp
1,578
no_license
#include <QtTest> #include "parser.h" // add necessary includes here class parserTests : public QObject { Q_OBJECT public: parserTests(); ~parserTests(); private slots: void test_fullParse(); void test_failToRead(); void test_failToFindTable(); private: QMap<QString,QString> example = {...
ef63d1a246d16b9057e2f690686ae856b95d42ec
090e09fc7ec09c3fec2b1b7a246660ec3110cc59
ffinfo/Picl
/src/clustering/ReadSingleReads.cpp
C++
cpp
4,586
no_license
/* * File: ReadSingleReads.cpp * Author: peter * * Created on January 8, 2013, 1:45 PM */ #include <api/BamReader.h> #include <sstream> #include "ReadSingleReads.h" ReadSingleReads::ReadSingleReads(ReferenceDataStorage* Ref, bool forward, long int begin, long int end, Config* config) : Task(config) { thi...
d5994dd33ac9c2f2bf0b46e5a6feba5c8a9b6d32
74f41bbde8232c1a496bf266543be99283a3a21a
hyunynim/algorithm_archive
/solved/20364.cpp
C++
cpp
496
no_license
#include<bits/stdc++.h> using namespace std; vector<int> p2(22); vector<int> chk(1 << 22); int next(int idx) { int tmp = idx; vector<int> res; while (idx > 1) { if (chk[idx]) res.push_back(idx); idx >>= 1; } if (res.empty()) { chk[tmp] = 1; return 0; } return res.back(); } int main() { int n, q; scan...
c9aed2ea19805004c0564d1fa88223dcdcff00ed
f3595c59172bec3d90c694b807b86d007552b9d0
akien-mga/godot
/servers/rendering/renderer_rd/pipeline_cache_rd.cpp
C++
cpp
6,251
permissive
/**************************************************************************/ /* pipeline_cache_rd.cpp */ /**************************************************************************/ /* This file is part of: */ /* ...
f2f52bbc43a910264e080805670da154336a26ed
a3f8cbf77962d64f5ebfb1278c4db7970fcf8c2d
play3577/GoSample2
/learn/Pattern.cpp
C++
cpp
3,613
no_license
#include <math.h> #include "../Board.h" #include "Pattern.h" // パターン値取得(回転、対称形の最小値) template <typename I> I get_min_pattern_key(const I& val) { I min = val; // 90度回転 I rot = val.rotate(); if (rot < min) { min = rot; } // 180度回転 rot = rot.rotate(); if (rot < min) { min = rot; } // 270度回転 rot = rot.r...
0ec9e8999af0a53652e8c6696f512b00a12422aa
8ff8d31ce8c95e6019fb54e6213967bf39ea7f71
niuxu18/logTracker-old
/second/download/git/gumtree/git_repos_function_4728_git-2.12.3.cpp
C++
cpp
2,835
no_license
int cmd_describe(int argc, const char **argv, const char *prefix) { int contains = 0; struct option options[] = { OPT_BOOL(0, "contains", &contains, N_("find the tag that comes after the commit")), OPT_BOOL(0, "debug", &debug, N_("debug search strategy on stderr")), OPT_BOOL(0, "all", &all, N_("us...
c7d5fe881d891a8d2f4572bd7984e14e5be404c2
dae838b93ad330f076177952ea0bdf09df8f2e0c
JinbaoWeb/ACM
/POJ/poj2048_1.cpp
C++
cpp
1,195
no_license
#include <iostream> using namespace std; #include <string.h> int flag[30][30]; int mov[8][2]={{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,-1},{2,1}}; int n,k; int p,q; char path[30][2]; int tag; int dfs(int x,int y,int step) { int n_x,n_y,i; if(step==p*q) { tag=1; return 1; } for(i=...
f00457c5fe5f188d99e110ea848fc6e11d5656fa
abebacbfdca2760651317443edc66526153e0946
zjin-lcf/HeCBench
/miniFE-hip/src/CSRMatrix.hpp
C++
hpp
4,287
permissive
#ifndef _CSRMatrix_hpp_ #define _CSRMatrix_hpp_ //@HEADER // ************************************************************************ // // MiniFE: Simple Finite Element Assembly and Solve // Copyright (2006-2013) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license f...
6db4a485486263e7f15b346700d01ec89e39600c
a4ef14af6f7b105c7e804ef9ba81407431f99eb6
google/or-tools
/ortools/algorithms/python/knapsack_solver.cc
C++
cc
4,120
permissive
// Copyright 2010-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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
b31370f7b29d9f28090fbf957ff72189c78930e6
99272205b73e3849bcf88d9c44b3c043903c884b
dothithuy/ElastosRDK5_0
/Sources/Elastos/Frameworks/Droid/Base/Core/src/view/Gravity.cpp
C++
cpp
9,074
no_license
#include "view/Gravity.h" #include "graphics/CRect.h" using Elastos::Droid::Graphics::CRect; namespace Elastos { namespace Droid { namespace View { ECode Gravity::Apply( /* [in] */ Int32 gravity, /* [in] */ Int32 w, /* [in] */ Int32 h, /* [in] */ IRect* container, /* [in] */ IRect* outRect) { ...
a6597e9c5ce16a1d8d0ed55c66673b3480ad11a3
8c0530cd1b154bac42f66b540eb13d91d70fff9b
sharad2307/Competitive_Programming
/Codeforces/Practice/276C.cpp
C++
cpp
800
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define loop(i,a,b) for(ll i=a;i<b;i++) #define testcases ll t;cin>>t;while(t--) #define pb push_back #define all(x) x.begin(), x.end() #define dec(x) greater<x>() ll a[200001],d[200001],n,i,q,l,r; unsigned long long m; int main()...
00a58b3022f9517fa7755e49716085ca49819d8a
042f56da6f13f2917cfca1de9208f3a074c1fd47
caogtaa/OJCategory
/HackerRank/HR_Chessboard_Game_Again.cpp
C++
cpp
1,367
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string.h> using namespace std; int G[15][15]; pair<int, int> delta[4] = { {-2, 1}, {-2, -1}, {1, -2}, {-1, -2} }; int Grundy(int x, int y) { int &ret = G[x][y]; if (ret == -1) { vec...
c86ab48de59cc3a450714162f537417a6a03ebf2
7b3958057d29841448092dbdbbfedd8bd073d65f
dove-project/dove-backend
/src/Enclave/binary/log_bin.cpp
C++
cpp
402
permissive
#include "log_bin.hpp" #ifdef LIB_FTFP void LogBinOp::call(fixed scalar1, fixed scalar2, fixed *result) { fixed x = scalar1; fixed y = scalar2; fixed ln_x = fix_ln(x); fixed ln_y = fix_ln(y); *result = fix_div(ln_x, ln_y); #else void LogBinOp::call(double scalar1, double scalar2, double *result) { *result ...
de51ce27e52a6f2b5a93b64b8ec95b66cd7391a9
d94e33621905cefd20b8832611504913a916aedb
a799091501/libsaki
/table/table.cpp
C++
cpp
30,497
permissive
#include "table.h" #include "princess.h" #include "table_view_real.h" #include "../util/misc.h" #include "../util/debug_cheat.h" #include <numeric> #include <cstdlib> #include <ctime> namespace saki { TablePrivate::TablePrivate(const std::array<int, 4> &points, Rule rule, Who tempDeale...
6e1b711b292825f11eb2ff6a927e70f67270cfb6
a451b1a476ac5d01a52520b3e1a8f8868089683e
alwaysused/Mymuduo
/EventLoopThreadPool.cc
C++
cc
1,888
no_license
// Copyright 2010, Shuo Chen. All rights reserved. // http://code.google.com/p/muduo/ // // Use of this source code is governed by a BSD-style license // that can be found in the License file. // Author: Shuo Chen (chenshuo at chenshuo dot com) #include "EventLoopThreadPool.h" #include "EventLoop.h" #include "Event...
b341e6908887ece8fa0058db998551c333ad8a46
6a438eb22a8e6d1a5baedb060d768c730108ee59
scortier/Snippets
/Amazon/Convert/five star.cpp
C++
cpp
3,908
no_license
class ABC { double chance; }; public static int XYZ() { PriorityQueue<ABC> pq = new PriorityQueue<>((p1, p2) -> Double.compare(p2.chance, p1.chance)); //REMAINING FUNCTION }; class Product { int count, total; double afterChange; public: Product(int count, int total) { this->count = count; ...
9c5a7249d1be9c5f2c08c53268464a6ef9b46924
e00ab9d4d93014aee9047248003f7d8ee2b321e1
iblacksand/electron
/atom/browser/ui/webui/pdf_viewer_handler.cc
C++
cc
7,669
permissive
// Copyright (c) 2017 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/browser/ui/webui/pdf_viewer_handler.h" #include "atom/common/atom_constants.h" #include "base/bind.h" #include "base/memory/ptr_util.h" #include "base/values.h" #includ...
97af0d659fb00300a6f395c7353bd9d11948bdf8
79afaf98d2b61afa9629b241c886377336ba4f97
helixum/wow-cata
/ACE_wrappers/tests/MEM_Stream_Test.cpp
C++
cpp
15,276
no_license
//============================================================================= /** * @file MEM_Stream_Test.cpp * * $Id: MEM_Stream_Test.cpp 93638 2011-03-24 13:16:05Z johnnyw $ * * This is a test of the <ACE_MEM_Acceptor> and * <ACE_MEM_Connector> classes. * * * @author Nanbor Wang <nanbor@cs.wustl...
f7049c309173e33c7ec9b55d56cf541ab5916ec8
aa85aec61f76073a8acd05cf9c5f583cba33a6bf
Vaa3D/vaa3d_tools
/released_plugins/v3d_plugins/bigneuron_AmosSironi_PrzemyslawGlowacki_SQBTree_plugin/libs/ITK_include/itkWinterColormapFunction.hxx
C++
hxx
1,699
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
7bded92e6fe0ec38db2524fd0d716c573e021f3d
57cda0635f8040c108acb7c455c3785f878bdaca
frankhoff/xictools
/xt_base/miscutil/quicksort.cc
C++
cc
9,542
permissive
/*========================================================================* * * * Distributed by Whiteley Research Inc., Sunnyvale, California, USA * * http://wrcad.com * * Copyright (...
18a1dc7e3abcd4a5d0d1b458e5cddfe72729b4cd
7f0f4ad9d548994b893f7dde9984bebe672092de
skygrammas/Whive-Core
/src/qt/clientmodel.cpp
C++
cpp
8,828
permissive
// Copyright (c) 2011-2018 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 <qt/clientmodel.h> #include <qt/bantablemodel.h> #include <qt/guiconstants.h> #include <qt/guiutil.h> #include <qt/...
7fbbfe040fb289cfccefa1d0c4d9fdf7f7334f80
65296df58bd8390e09d6fd11b57550004dc302f1
yanhongjuan/Algorithm
/sort/sort_11.cpp
C++
cpp
1,111
no_license
/*@brief:旋转数组的最小数字*/ #include <iostream> #include <vector> using namespace std; int MinInOrder(vector<int> vec,int index1,int index2) { int result = vec[index1]; for(int i = index1+1;i<=index2;i++) { if(result > vec[i]) result = vec[i]; } return result; } int Min(vector<int> vec,int ...
d691ff04b44445891a27fc76f735b182c9c66f85
473f7126686745594b1bb6ed6316facb38e7bccd
stan-dev/math
/stan/math/prim/err/is_mat_finite.hpp
C++
hpp
733
permissive
#ifndef STAN_MATH_PRIM_ERR_IS_MAT_FINITE_HPP #define STAN_MATH_PRIM_ERR_IS_MAT_FINITE_HPP #include <stan/math/prim/fun/Eigen.hpp> #include <stan/math/prim/fun/to_ref.hpp> #include <stan/math/prim/meta.hpp> namespace stan { namespace math { /** * Return <code>true</code> is the specified matrix is finite. * @tparam...
2d7eba9ded84088b47d34f246c120fc48449f784
65700ecaa271a1b064a4ab53df398d31643576e1
dknife/GraphicsExCode
/P06TangentSpace_01MeshTangent/chapTangetSpace01_meshTangent/STBImage.cpp
C++
cpp
140,246
permissive
#include "STBImage.h" #ifndef STBI_HEADER_FILE_ONLY #ifndef STBI_NO_HDR #include <math.h> // ldexp #include <string.h> // strcmp, strtok #endif #ifndef STBI_NO_STDIO #include <stdio.h> #endif #include <stdlib.h> #include <memory.h> #include <assert.h> #include <stdarg.h> #ifndef _MSC_VER #ifdef __cplusplus #defin...
ff548d9ca8bcfa49fb2c74d8a6fc87658b3f7230
a329b84c4f04df420387ef338ed47c9000ded932
CodeNinja96x/Data-Structures
/Graphs/Largest Piece.cpp
C++
cpp
1,998
no_license
/* Its Gary's birthday today and he has ordered his favourite square cake consisting of '0's and '1's . But Gary wants the biggest piece of '1's and no '0's . A piece of cake is defined as a part which consist of only '1's, and all '1's share an edge with eachother on the cake. Given the size of cake N and the cake , c...
f804aeb2b9b8cce1a23b3a31ff33c7d371ceb61f
9e129cd0725daab2d7b1a270d8f3dd93b2d7388c
Slicer/BRAINSTools
/BRAINSFit/BRAINSFit.cxx
C++
cxx
27,985
no_license
/*========================================================================= * * Copyright SINAPSE: Scalable Informatics for Neuroscience, Processing and Software Engineering * The University of Iowa * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file excep...
5ab2d1d23d2ec562b45c750d742fe3e82ae96e35
3351cb581beb0fc2737caf48c8f8c92cf747db2f
smilenow/PPL
/MUA/MUA/Value.cpp
C++
cpp
5,171
permissive
// // Value.cpp // MUA // // Created by SmilENow on 1/9/15. // Copyright (c) 2015 Jiaquan Yin. All rights reserved. // #include "Value.h" const int number::type_int = 0; const int number::type_double = 1; number::number(string str){ stringstream ss; bool flag = true; int dot = 0; for (int i=0;i<(...
3eb640ce679faf72137ce1ece2651be0886992ec
e07492004bf894b4580423b25016a19a32e60d22
LuisAlbertoVasquezVargas/CP
/CDF/304DIV2/D.cpp
C++
cpp
1,088
no_license
#include<bits/stdc++.h> using namespace std; #define sc( x ) scanf( "%d" , &x ) #define REP( i , n ) for( int i = 0 ; i < n ; ++i ) #define clr( t , val ) memset( t , val , sizeof( t ) ) #define pb push_back #define all( v ) v.begin() , v.end() #define SZ( v ) ((int)(v).size()) #define mp make_pair #define fi first ...
a4f7343cabc2e5fe3f546ab010257b20424fc9de
5bd57ac6cd9482f42f6ca2dedc5413b7ec4fd0a1
515hikaru/solutions
/book/aoj/08/ALDS1_7_B/main.cpp
C++
cpp
1,929
permissive
#include <iostream> using namespace std; const int NIL = -1; struct Node { int parent, left, right; }; int n; int D[50], H[50]; Node nodes[50]; int getSibling(int id, Node node) { if (node.parent == -1) return NIL; Node parent = nodes[node.parent]; int left = parent.left; int right = parent.ri...
f65d8aed71b02ecff373109d32fbdf8130d2fa9c
812ad64c0e7168fa2dd28f172e19e425c7cd9f4e
akhikolla/RcppDeepStateTest
/issuestests/ambient/inst/testfiles/gen_value2d_c/libFuzzer_gen_value2d_c/gen_value2d_c_DeepState_TestHarness.cpp
C++
cpp
2,711
permissive
#include <fstream> #include <RInside.h> #include <iostream> #include <RcppDeepState.h> #include <qs.h> #include <DeepState.hpp> NumericVector gen_value2d_c(NumericVector x, NumericVector y, double freq, int seed, int interp); TEST(ambient_deepstate_test,gen_value2d_c_test){ static int rinside_flag = 0; if(rinside...
93ceb828ed8cd23df047cefd885c005e4be0c01d
6c8592c7550b6782db87e1a8417703b494c89fea
everlasting5820/c-code
/数位.cpp
C++
cpp
200
no_license
# include <stdio.h> int main() { int x; int n = 0; scanf("%d",&x); //x = 0; while (x > 0){ n++; x /= 10; printf("x=%d,n=%d\n",x,n); } printf("%d\n",n); return 0; }