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
941f60c471e5c6bb03b1156bbeb8a31097ed76f4
f301e05c53aa7e6609b32c5db1aa7807c58e740e
FernandoChanChenJJ/CPlusPlusCoursesOfGuoWeiPekingUniv
/PekingUniversityC++Courese/7_1.cpp
C++
cpp
631
no_license
#include <iostream> #include <cstring> //包含字符串库函数的声明 using namespace std; int main() { char title[] = "Prison Break"; //title的最后一个元素为'\0' ,13个字节 char hero[100] = "Michael Scofield"; //在d后面有'\0' char prisonName[100]; char response[100]; cout << "What's the name of the prison in " << title << endl; cin >> p...
1b5966fe268c1f09bea3450397068e742ca5e7db
840d35f38d3ee839c915565c0226fa60b2c210c7
MustafaMustafa/hftAuAu200GeVRun14
/StRoot/d0CorV2AnaMaker/StPicoD0AnaMaker.cxx
C++
cxx
12,707
no_license
#include <iostream> #include <fstream> #include <string> #include <cmath> #include "TFile.h" #include "TClonesArray.h" #include "TTree.h" #include "TNtuple.h" #include "phys_constants.h" #include "StBTofUtil/tofPathLength.hh" #include "StPicoDstMaker/StPicoDstMaker.h" #include "StPicoDstMaker/StPicoDst.h" #include "S...
4fde48d849e90afb8a780dea288f702f910544f1
8f639963a9947dca999fc0c0dfc14dec751cb87a
peilinok/skia
/src/gpu/GrFragmentProcessor.cpp
C++
cpp
37,369
permissive
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/core/SkRuntimeEffectPriv.h" #include "src/gpu/GrFragmentProcessor.h" #include "src/gpu/GrPipeline.h" #include "src/gpu/GrProcessorAnalysis.h" #include "src/gpu/effect...
48860a52e39d29bd83e8bc7a44572873a2e115df
adf2b30cddda79927c7478ec704e1faea1e56e7b
Wronskia/caffe-jacinto
/src/caffe/layers/base_conv_layer.cpp
C++
cpp
16,053
permissive
#include <algorithm> #include <vector> #include "caffe/filler.hpp" #include "caffe/layers/base_conv_layer.hpp" #include "caffe/util/im2col.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> void BaseConvolutionLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, ...
3a7ceca9aa7d6b78d7a248978aa5e827cb0c8bed
2b22002bc7cf9801b193c05d87168ee7b6d49d3c
DasNaCl/old-university-projects
/rt/rt/materials/dummy.cpp
C++
cpp
752
permissive
#include <cmath> #include <core/assert.h> #include <rt/materials/dummy.h> #include <rt/materials/material.h> namespace rt { DummyMaterial::DummyMaterial() {} RGBColor DummyMaterial::getReflectance(const Point& texPoint, const Vector& normal, const Vector& outDir, const Vector& inDir) const { // image becomes muc...
954ab8dcbbb3a98fd933c3c563b518032b936ee6
d0e58cf3e584bf8c20362a62c98b28bd880d8dc3
JorgeDGomez/CSCI272
/assign/epidemy.cpp
C++
cpp
2,098
no_license
// epidemy.cpp // compile with --std=c++14 flag #include <vector> #include <iostream> #include <iomanip> #include <random> #include "agents.hpp" using namespace std; #define INFECTION_RATE 0.03 #define DEATH_RATE 0.045 int nSimDays = 90; int nHealthy = 5; int nInfected = 1; void printPopulation(int state, cons...
fe61b62aba73d954f0b6bc3fe8ec75845d5b631a
ee99a84bce25dbed8f694046e3bcf335fa522697
ymk1477/Survivor-kit-server-client
/client source/SurvivalGame/Private/Mutators/SMutator_WeaponReplacement.cpp
C++
cpp
1,315
no_license
#include "SurvivalGame.h" #include "SGameMode.h" #include "SMutator_WeaponReplacement.h" bool ASMutator_WeaponReplacement::CheckRelevance_Implementation(AActor* Other) { ASWeaponPickup* WeaponPickup = Cast<ASWeaponPickup>(Other); if (WeaponPickup) { for (int32 i = 0; i < WeaponsToReplace.Num(); i++) { co...
d8f8cf4f5037384cb3c2f5ce24a0a5c89ad3198b
59e6f724856354141ce56d4cd754330240c7029e
vmik7/ejudge
/half_1/6_Strings/1_6_G1.cpp
C++
cpp
755
no_license
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string child, parent; cin >> child >> parent; int count = 0; if (child.size() > parent.size()) { cout << count << endl; //system("pause"); return 0; } for (int i = 0; i <= parent.size() -...
1e1f1639af10fa5805fc8499167d920d6de53db5
a297ad9e9b32139dcd790d778d94cc73917713f1
stan-dev/math
/lib/boost_1.78.0/boost/test/tree/fixture.hpp
C++
hpp
6,365
permissive
// (C) Copyright Gennadiy Rozental 2001. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // /// @file /// Defines fixture interface and objec...
d6166b4be55ff5bbaaf5a7d3f595f0f32d65f025
efd272d22f368b7043d3d263286c1196d9c0e488
apache/openoffice
/main/extensions/source/ole/unotypewrapper.hxx
C++
hxx
2,785
permissive
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
f064f7023f3e454bb9edbf2a5fc68e1c33b9a2cb
d3b5d97ffa83e4be19e8c33f54a73bf775ba48d5
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_repos_function_2307_httpd-2.4.17.cpp
C++
cpp
1,157
no_license
static apr_status_t make_h2_headers(h2_from_h1 *from_h1, request_rec *r) { from_h1->response = h2_response_create(from_h1->stream_id, from_h1->status, from_h1->hlines, from_h1->pool); if (from_h1->response == NULL) { ap_log_c...
4ff2b96cdfd79e0f090b29fee68d3703e52646d9
fc39cb67fd4e1df9d0a1a49ccaa116cdb1943a22
lucas-two/Advanced-Algorithms-Assignment-2
/src/Q1/q1.cpp
C++
cpp
8,375
no_license
/* Q1. Number list, with k-smallest list */ #include <iostream> #include <vector> #include <string> using namespace std; class FibonacciHeap { private: struct node { int value; bool looser = false; node *parent; vector<node *> children; }; node *maxNode = NULL; node ...
08e523875f8b02fb754ae081a10647a3428d6a00
8ce5793df8cab0e551379d2813d13bd9ba7e56d3
gogokigen/Cpp17-DataStructure-and-Algorithm
/Interview/AlgorithmPractice/insert_node_in_linked_list.cpp
C++
cpp
1,369
no_license
/******************************************************************* * * Practice: Insert a node in Linklist * * References: * 1. * * Key: * 1. * *******************************************************************/ #include <iostream> using namespace std; class Node { public: Node() : val(0), next(nullptr) {...
c91bd7b427436a6a9bb0f3075b56c7ab3633ebd5
d8c489830d5d16c6fa35342912e655d9b28254da
scijones/Soar
/Core/SoarKernel/src/consistency.cpp
C++
cpp
41,943
permissive
#include "portability.h" /************************************************************************* * PLEASE SEE THE FILE "license.txt" (INCLUDED WITH THIS SOFTWARE PACKAGE) * FOR LICENSE AND COPYRIGHT INFORMATION. *************************************************************************/ /************************...
95ea4f1fe64516a368ba1aefda0232d24f9cfc8f
b0572b00b06b24f2455d53b0dd6b6dcca76733df
jrondanv/algo
/solutions/Codeforces/167A.cpp
C++
cpp
1,112
permissive
//Problem Name : 167A - Wizards and Trolleybuses //Execution Time : 300 ms //Memory : 1400 KB #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <io...
2459f0fe8e96c1840d864034dbf4eb0dd9c2741b
f0fe3ffc19a81dc7ffb2eebfdb6d730a1cc2989e
IAmAnubhavSaini/cryptoAlgorithm-nt5src
/Source/XPSP1/NT/windows/advcore/duser/engine/ctrl/oldanimation.cpp
C++
cpp
24,437
no_license
#include "stdafx.h" #include "Ctrl.h" #include "OldAnimation.h" PRID OldAlphaAnimation::s_pridAlpha = 0; PRID OldScaleAnimation::s_pridScale = 0; PRID OldRectAnimation::s_pridRect = 0; PRID OldRotateAnimation::s_pridRotate = 0; static const GUID guidAlphaAnimation = { 0x41a2e2f2...
97e954cb2145c4a1bcaa6e4c5315fc5f196198f3
10f8f6e4ecabc18c44b97d48aec729ad9d7012b0
sirkp/DSA
/14. Tree/problems/p22.cpp
C++
cpp
539
no_license
// https://practice.geeksforgeeks.org/problems/construct-binary-tree-from-parent-array/1/?track=DSASP-Tree&batchId=154 Node *createTree(int parent[], int n){ Node* arr[n]; for(int i=0;i<n;i++) arr[i] = new Node(i); int pos; for(int i=0;i<n;i++){ if(parent[i]==-1) po...
e8206ad26c7f2372b4636d00339b9d68657adabe
bf73d467cc263715a87fa195f148b0f42a2c2e9b
Clever-Boy/fired
/src/location/location_room.cpp
C++
cpp
1,780
no_license
/*********************************************************************** * File : location_room.cpp * Created : Aug 26, 2014 * Copyright : (C) 2014 Achpile * Author : Fedosov Alexander * Email : achpile@gmail.com **************************************************************...
833fe68492ef29e2df73370963262332dd775bfb
a4104115f20a4338b0f1a1033bf6770accb2196b
nobled/clang
/lib/Frontend/ASTMerge.cpp
C++
cpp
4,009
permissive
//===-- ASTMerge.cpp - AST Merging Frontent Action --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
b7cbec29963c87e3e465c856e20ada519831b45a
aaaa6e4d0ef8dda332cd9351625f9380adfa9689
Scootkali14001/chromium
/components/history/core/browser/history_backend.cc
C++
cc
100,672
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 "components/history/core/browser/history_backend.h" #include <algorithm> #include <functional> #include <limits> #include <list> #include <m...
288949c74d21815b35f0f68cbc1c66fa51537258
e787d7ecc6ff63f4eba60a062c8db2632ea228c3
sunshinewithmoonlight/zircon-2003
/zircon/system/dev/board/nelson/nelson-sdio.cc
C++
cc
9,148
permissive
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <lib/mmio/mmio.h> #include <ddk/binding.h> #include <ddk/debug.h> #include <ddk/metadata.h> #include <ddk/metadata/init-step.h> #include <ddk/pla...
418d18fb0d43685d14fef943b82c0b8abb5605c1
096de4ccf79fa2f7fdee8d09785032e425cd9c79
firedtoad/Acid
/Sources/Models/ModelRegister.cpp
C++
cpp
1,497
permissive
#include "ModelRegister.hpp" #include "Files/FileSystem.hpp" #include "Obj/ModelObj.hpp" #include "Shapes/ModelCube.hpp" #include "Shapes/ModelCylinder.hpp" #include "Shapes/ModelDisk.hpp" #include "Shapes/ModelRectangle.hpp" #include "Shapes/ModelSphere.hpp" namespace acid { ModelRegister::ModelRegister() { AddM...
b6ac0bb32b6ea062a1671cdf8f128acd313e734b
87e9e2ea446721ee9307f18010aa6760865e0c0d
Allulz/Nettipeli
/Nettipeli/Bullet.cpp
C++
cpp
668
no_license
#include "Bullet.h" Bullet::Bullet(int id, Texture* bulletTex) { initializeBullet(id, bulletTex); } Bullet::~Bullet() { } void Bullet::draw(SDL_Renderer* renderer) { bulletSprite.draw(renderer); } void Bullet::setPos(SDL_Point pos) { bulletSprite.setPosition(pos); } //private void Bullet::initializeBullet(...
bff620fa2d7365d7ac63a1722c705a3fd1c00c6e
b55d695ba5f9d039e89cf4aa84f7a573fe1b0c17
almighty1984/Project1
/EntityFluganWalkState.cpp
C++
cpp
7,503
no_license
#include "EntityFluganWalkState.h" #include "EntityFluganChargeState.h" #include "EntityFluganAttackState.h" #include "EntityFluganDeathState.h" #include "Player.h" #include "SoundsManager.h" #include "ParticleSenseFlugan.h" cEntityFluganWalkState::cEntityFluganWalkState() { m_secondCall = false; } cEntityFluganWalk...
143b7b1b68bb7a1551f0c800e64c4a12d9b6dd02
bfb456609c5346215e3c9d4831f8f3187693b416
royalsoftkv/dexergi
/src/test/zerocoin_denomination_tests.cpp
C++
cpp
22,521
permissive
/* Copyright (c) 2019-2020 The Dexergi Developers */ // Copyright (c) 2017-2019 The DEXERGI developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "amount.h" #include "chainparams.h" #include "coincontrol.h" #includ...
989a3d3535a8eff219f07ef5aa3e38dbf1eb49ce
919ecf748c69781eed4cf7116c152fcffe48b6a8
irfansofyana/cp-codes
/02 - SMA/Camp 1 OSN Kelas 11/Hari-13/1225.cpp
C++
cpp
413
no_license
#include <bits/stdc++.h> using namespace std; int n,i,j,t; map<int,int> mep; void digit(int k){ while (k>0) { mep[k%10]++; k/=10; } } int main(){ cin.tie(0); cin >> t; while (t--) { cin >> n; mep.clear(); for (i = 1 ; i<= n ; i++) { digit(i); } for (i = 0; i < 10 ; i++) { ...
8a44bb923918f34f58e4643d0beee985a84fac49
8eed377284bd06ac41520d06d4594b6dff916419
wxnn08/RepLord
/nepsacademy/tecnicasProg/trocofacil.cpp
C++
cpp
428
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; int contaMoedas(int n){ int moedas[6] = {100,50,25,10,5,1}; int cont=0; for(int i=0; i<6; i++){ if(n>=moedas[i]){ cont += n/moedas[i]; n = n%moedas[i]; } } return cont; } int main(){ ios_base::sync_with_stdio(fal...
66735bcba5dc0eb35248b8a76b8a3e24f3cfab6d
ca2639899be34b51a8045ff7e685387678f499ef
jjzhang166/WinNT5_src_20201004
/NT/ds/adsi/nds/cuser.hxx
C++
hxx
1,420
no_license
class CNDSUser; class CNDSUser : INHERIT_TRACKING, public IADsUser, public ISupportErrorInfo, public IDirectoryObject, public IDirectorySearch, public IDirectorySchemaMgmt, public IADsPropertyList { public: /...
e377b53f9b612845113e773e513b62d76a090924
5e8d9ac2360659af816913aa648abe4d1451d74f
necromaner/C-
/c-primer/Chapter Three/3.4.1/3.22/main.cpp
C++
cpp
623
no_license
//3.22 修改之前那个输出text第一段的程序,首先把text的第一段全都改成大写形式,然后再输出它。 #include <iostream> #include<vector> using std::vector; using std::cin; using std::cout; using std::endl; using std::string; int main() { vector<string>text; string word; cout<<"Enter word:"; while(cin>>word) { text.push_back(word); ...
3f309879a5a469c6f5208fc3264d80e2acea02f4
0fe150adede96a21e40e3ac8d5076dfdee232af2
RobbeDGreef/CppPathTracer
/src/materials.cpp
C++
cpp
2,857
no_license
#include <core.h> #include <random.h> #include <vec3.h> #include <materials/lambertian.h> #include <materials/metal.h> #include <materials/dielectric.h> static Direction reflect(const Direction v, const Direction n) { // reflected ray direction should be: v + 2b // and b = v * n // Since we want the refle...
75d7b2fc4275da6c54281ba9d5ce5ab4f4850ba6
4331bee8040d0944063a73de5abc5857a190ff8e
Pandinosaurus/nnabla
/src/nbla/test/parametric_functions/test_convolution.cpp
C++
cpp
5,426
permissive
// Copyright 2019,2020,2021 Sony 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.org/licenses/LICENSE-2.0 // // Unless required by applicable law ...
e6926c6a9b0509c928dfd30efeceeb14d5a38a84
23179dd3dd53056fcb9201cea9faef0e46ce29ec
edyrol/Transversales_a_circulos_inflados
/include/transversal.hpp
C++
hpp
3,798
no_license
#pragma once #include <CGAL/Simple_cartesian.h> #include <algorithm> #include <discreture.hpp> #include <iostream> #include <vector> using Kernel = CGAL::Simple_cartesian<double>; using Point = Kernel::Point_2; using Line = Kernel::Line_2; //Círculo con centro c y radio r struct Circle { Point c; double r; }...
909fb934d9f863737d568547ca92467f7343eb08
648ec10642cc5e4ad2eec5429bc494bb9d31d8e2
TheBenCollins/foundationdb
/flow/DeterministicRandom.cpp
C++
cpp
4,118
permissive
/* * DeterministicRandom.cpp * * This source file is part of the FoundationDB open source project * * Copyright 2013-2022 Apple Inc. and the FoundationDB project authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You ...
ba45bc8ad96a8e058aca27075ce8c2bb6cbf29dc
c985d4d762c869f0b911e81e914cebcb59b41f63
DancingOnAir/LeetCode
/Leetcode/Array/1343_NumberofSubarraysofSizeKandAverageGreaterthanorEqualtoThreshold.cpp
C++
cpp
1,432
no_license
#include <iostream> #include <vector> using namespace std; class Solution { public: int numOfSubarrays(vector<int>& arr, int k, int threshold) { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n = arr.size(); if (n < k) return 0; ...
f25d4e49f21e596686094568f92a3040a60a4c1e
dac74810c68a168b3094cdd84ff590951bee91cd
obaydullahmhs/Programming-Contest
/Lightoj/1006 - Hex-a-bonacci.cpp
C++
cpp
896
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define N 2000005 #define ESP 1e-9 #define pii pair<int,int> #define vi vector<int> #define vl vector<ll> #define pb push_back #define pp pop_back #define ff ...
d7dfca3e7babb80597cf285239d9e10c994ead3e
d49eb913c56067223b13a18c3e3ca5edba15015a
bitwizeshift/bit-stl
/test/bit/stl/utilities/expected.test.cpp
C++
cpp
3,487
permissive
/***************************************************************************** * \file * \brief TODO: Add description *****************************************************************************/ #include <bit/stl/utilities/expected.hpp> #include <catch.hpp> #include <system_error> //============================...
39f506ce87a6d35bac9021350735ccbf33893ec0
3faade32f1e3f6e1a3d9ed1bace53148369f59f6
ford442/oglplu2
/include/eagine/tags.hpp
C++
hpp
463
permissive
/// @file /// /// Copyright Matus Chochlik. /// 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 EAGINE_TAGS_HPP #define EAGINE_TAGS_HPP #include "identifier.hpp" namespace eagine { using application...
f6aee1799432a2efc0de3649650705ae305afe88
78cb9808dd56333d9457ba2e14bd2fd60ad84454
mweisgut/duckdb
/test/common/test_ops.cpp
C++
cpp
14,123
permissive
#include "catch.hpp" #include "common/operator/comparison_operators.hpp" #include "common/types/vector.hpp" #include "common/vector_operations/vector_operations.hpp" #include <vector> using namespace duckdb; using namespace std; // TODO test selection vectors // TODO add bitwise ops // TODO add like // TODO add bool...
f922849c84802715c5f7bb8f864d05223e6d6a4c
22477a551436fc45f641f751b522e7878fbda49e
neviim/SCUM_SDK
/SDK/SCUM_Bear_Front_Paws_classes.hpp
C++
hpp
629
no_license
#pragma once // SCUM (Dumped by Hinnie) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass Bear_Front_Paws...
7c5c3afd577070fa7a71c7ca41ff8bd7e34a34a4
78943e3468d1236ccb2efe05b1926bf2202bc019
slimdy/studyC-
/studyCPP/Dynamicmemory.hpp
C++
hpp
976
no_license
// // Dynamicmemory.hpp // studyCPP // // Created by slimdy on 2017/11/6. // Copyright © 2017年 slimdy. All rights reserved. // #ifndef Dynamicmemory_hpp #define Dynamicmemory_hpp #include <stdio.h> #include <vector> #include <iostream> using namespace std; class strBlob{ public: typedef vector<string>::size_t...
ce1f1e4e54a88c61848f28d1f6abca8588f42260
ec89afae212f3b1ee805238254fd5f6ed97bdd36
AvengingGibbons/alive_reversing
/Source/AliveLib/Sfx.hpp
C++
hpp
1,985
no_license
#pragma once #include "FunctionFwd.hpp" #include "FixedPoint.hpp" enum Type1SFX { eUXBGreen = 2, eUXBRed = 3, }; struct SfxDefinition { char field_0_block_idx; char field_1_program; char field_2_note; char field_3_default_volume; __int16 field_4_pitch_min; __int16 field_6_pitch_max; }...
3a2d8b2b4f46ca619f0da3f913acd294125051cd
79d60095f810045705925d6ff3da06db960e3057
xiaoqgao/windows_embedded_7_2014M12
/windows_embedded_7_2014M12/WINCE700/private/winceos/COREOS/core/corelibc/crtw32/eh/user.cpp
C++
cpp
2,425
no_license
// // Copyright (c) Microsoft Corporation. All rights reserved. // // // Use of this source code is subject to the terms of the Microsoft shared // source or premium shared source license agreement under which you licensed // this source code. If you did not accept the terms of the license agreement, // you are...
15afdde8fe022b0333dcd37e92166a1a210b5cab
2e7320738a9297163d32c2d55c0d39dac94e2727
karasikin/Compiler
/VM/src/main.cpp
C++
cpp
2,676
no_license
#include <iostream> #include "virtualmachine.h" #include "parser.h" void vm_sum_test(); void vm_var_sum_test(); void vm_get_test(); void vm_print_char_test(); int main() { auto parser = Parser(); auto instructions = parser.parse("../files/program.code"); for(const auto &item : *instructions) { s...
cef53c9757fd4c9d1fab96977d0e8c9088c6ec0b
b08b4130ba23962fa3f7f1de74059840d3bcb783
byte4byte/cloudretro
/chrome/browser/profile_resetter/resettable_settings_snapshot.cc
C++
cc
12,706
permissive
// Copyright (c) 2013 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/profile_resetter/resettable_settings_snapshot.h" #include <memory> #include <utility> #include "base/bind.h" #include "base...
1ff94d3687d841698181af3182d4904d0779d588
1961d503b3817c8a6647942cc04fb945b707ee08
Jakelyny/Algoritmos_I-II_
/Algoritmos I/Prova 1/Questao6.cpp
C++
cpp
1,706
no_license
#include<iostream> using namespace std; main() { setlocale (LC_ALL, "portuguese"); int idade, maiorIdade, menorIdade; float salario, contFeminin=0, contMasculin=0, somaIdadeFem=0, somaIdadeMas=0,pessoas; char sexo; cout<<" Digite o número de pessoas que participaram da pesquisa: "; cin>>pesso...
20f6e6943f1bfcdb6bdf5342e02c91ed7703ee6d
c910d0b2bd293dac0414ddebe96db2c7899683fc
szarbaf/Project-Euler
/13.cc
C++
cc
951
no_license
//Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. (see 13.dat) #include <iostream> #include <vector> #include <string> #include <fstream> #include "big_number.h" using namespace std; vector<BigNumber> ReadData(string filename){ ifstream fp(filename); string line; BigNumber...
4f64662862ff9349e4885845efef11b8dd11a1fe
c6e70c7ff9f625e6ae9642fe98b561528697595b
zanehy/swoole-src
/swoole_socket_coro.cc
C++
cc
61,360
permissive
/* +----------------------------------------------------------------------+ | Swoole | +----------------------------------------------------------------------+ | Copyright (c) 2012-2018 The Swoole Group | +-------------------...
5639cd0b74c88450681904b3a7b8b9f464ccf096
4f55cf447dcc2eecb75b82a440d33b2ba6b8c86d
zuozhoulin/cpp
/std_algorithm-易犯错误/l349_unique.cpp
C++
cpp
1,655
no_license
#include <iostream> // std::cout #include <algorithm> // std::unique, std::distance #include <vector> // std::vector using namespace std; class Solution { public: vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { std::sort(nums1.begin(),nums1.end()); std::sort(nums2.beg...
f4bbfd94c4036965fc8cb8596d7a57a4ba3a88f2
9f5a411096997109019b268ebb40e3cbc104c892
TrellixVulnTeam/Chromium_7C66
/chrome/installer/util/beacons_unittest.cc
C++
cc
10,630
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/installer/util/beacons.h" #include "base/base_paths.h" #include "base/memory/scoped_vector.h" #include "base/path_service.h" #i...
6809186d683d7971893e0f9df2608a51201c4bb5
61c80675f74a56eb10c29caa906401a32f6c1878
tiguser/GRSISort
/libraries/TGRSIAnalysis/TPaces/TPacesData.cxx
C++
cxx
634
no_license
#include "TPacesData.h" //ClassImp(TPacesData) bool TPacesData::fIsSet = false; TPacesData::TPacesData() { Clear(); } TPacesData::~TPacesData() { } void TPacesData::Clear(Option_t *opt) { fIsSet = false; fCore_MidasId.clear(); fCore_NbrHits.clear(); fCore_Nbr.clear(); fCore_Address.clear(); ...
362cacac91345f7b210b7d9277fe18dc95980000
268656859126490a9f81ccf69f44b11b7036747e
Aineph/Wolf3D
/src/HorizontalRay.cpp
C++
cpp
8,632
permissive
/* * Created by Nicolas Fez for Wolf3D. * Started on 2020-04-24. */ #include <map> #include <SFML/Graphics.hpp> #include "IDrawable.hh" #include "Position.hh" #include "Level.hh" #include "Player.hh" #include "Display.hh" #include "ARay.hh" #include "HorizontalRay.hh" /** * The horizontal ray constructor. */ Ray...
7ae39e6e31b39d4cef87dbaa392c941272b6a917
4d16eed3b5426f5cb28e698b0698ec42e1a1599d
rksin8/cpp
/graph/Test.cpp
C++
cpp
1,490
no_license
#include <iostream> #include "vertex.hpp" #include "graph.h" int main(int argc, char *argv[]) { /* Node n{5}; n.addAdajacent(6); n.addAdajacent(7); n.addAdajacent(11); for (auto i : n.getAdjacents()) { std::cout << i.getValue() << std::endl; } */ Graph g("DIRECTED"); ...
e26cdf72e0efe363453db7dda6c815307e163abc
a45cf063b868a0bda13216a3243ff6d7af08a4cb
DarkCodez/TCF-SDK
/SDK/TCF_DeveloperSettings_classes.hpp
C++
hpp
788
no_license
#pragma once // The Cycle Frontier (1.X) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "TCF_DeveloperSettings_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //------------------------------------------------------------------------...
5b2cb34ec5ac244e95152c1b85b016a300b92fdf
25b6979cd3057684e1dcff79c8ae8411121f6388
dhnesh12/codechef-solutions
/04-CodeChef-Hard/150--Pairwise String Sums.cpp
C++
cpp
2,008
no_license
#include <set> #include <vector> #include <string> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #define fo(i,a,b) for(int i=a;i<=b;i++) #define fd(i,a,b) for(int i=a;i>=b;i--) using namespace std; struct Str{ string str; Str(string _st="") {str=_st;} friend bool operator < (Str a,St...
bdba84e2d9dab4b36d68c7641f397d2dacdd18d7
e0da7e8d806848d5b67614e81c749d71e83fd48f
Uriki/SuperPhotoStudio
/include/gfx.hpp
C++
hpp
1,592
permissive
#ifndef GFX_HPP #define GFX_HPP #include "sprites.h" #include <3ds.h> #include <citro2d.h> // Colors. #define TRANSPARENT C2D_Color32(0, 0, 0, 0) #define BLACK C2D_Color32(0, 0, 0, 255) #define WHITE C2D_Color32(255, 255, 255, 255) #define GRAY C2D_Color32(127, 127, 127, 255) #define BLUE C2D_Color32(0, 0, 255, 255)...
58a18fa01c3c088a08ab2f58dc998c3e8250e1e2
4095f80104c2752e0b0e916615f359b5d40c33b8
meitooth/zyrh
/App/stringz.cpp
C++
cpp
1,446
no_license
// // stringz.cpp // ftpz // // Created by 胖胖的ALEX on 2017/10/25. // #include "stdafx.h" #include "stringz.h" int trim_z(std::string& s) { if (s.empty()) { return 0; } s.erase(0, s.find_first_not_of(" ")); s.erase(s.find_last_not_of(" ") + 1); return 1; } int ltrim_z(char* s) { _strrev(s); rtrim_z(s); ...
0c798c5d101d3957f559ec2bf6aed3d0d733cf2f
ec747b06d9acda751fce9065bdca1c4dcdce93d7
RainwayApp/dart-sdk
/runtime/vm/virtual_memory_fuchsia.cc
C++
cc
7,763
permissive
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "vm/globals.h" #if defined(HOST_OS_FUCHSIA) #include "vm/virtual_memory.h" #include <sys/mma...
a0bce44abeddb6512a30a580bb30d77a4737b91f
c266f95152e24436c88c606469c7e29950367caf
Waqar-107/Codeforces
/C-set/1283C. Friends and Gifts.cpp
C++
cpp
1,609
no_license
/***from dust i have come, dust i will be***/ #include<bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define dbg printf("in\n") #define nl printf("\n"); #define N 210101 #define inf 1e9 #define sf(n) scanf("%d", &n) #define sff(n,m) scanf("%d%d",&n,&m) #define sfl(n) scanf("%I64d", &n...
cf21ac871993b37cf10b4becbbc7d84efc5df781
ef6c72519a773659e6ea773dc6a3260cd225bf9d
ngthanhtrung23/CompetitiveProgramming
/codeforces/100486/I.cpp
C++
cpp
2,961
no_license
#include <set> #include <map> #include <list> #include <cmath> #include <queue> #include <stack> #include <cstdio> #include <string> #include <vector> #include <cstdlib> #include <cstring> #include <sstream> #include <iomanip> #include <complex> #include <iostream> #include <algorithm> #include <ctime...
36d9fa742e4c9feca05f329f26628f973f9955cf
e58703c20339c24b3bbe8cc6e0e9494d75d04247
dolmac1/PROGRAMMING
/c++/이것이취업을위한코딩테스트다/그리디/만들수없는금액_.cpp
C++
cpp
473
no_license
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(); int n; cin >> n; vector<int> money; int sum = 0; for (int i = 0;i < n;i++) { int k; cin >> k; sum += k; money.push_back(k); } sort(money.begin(), money...
f5ef7e32135f953a52a8b7a772606ac130ecb914
4f19c069222fa42bc435ef594a688a48d21dd05b
Pawloda/CppExercises
/Functions/MaxFunctionProgram/MaxFunctionProgram/MaxFunctionProgram.cpp
C++
cpp
1,069
no_license
// MaxFunctionProgram.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> int maximum(int a, int b, int c) { if (a > b && a > c) return a; else if (b > c) return b; else return c; } int main() { std::cout << "Hello World!\n"; int a, b, c; std::c...
838a4191f6068e8c246fdbc4842e072e51d11c11
a47a29146d5b81ad4a256fd4b575c571157472b9
circinusX1/getic3d
/getic/CompilerStream.cpp
C++
cpp
53,965
permissive
//---------------------------------------------------------------------------------------- // Unauthorized use or duplication is strictly prohibited. // Copyright Zalsoft Inc 1999-2004. //// Author: Marius C of Zalsoft Inc 2000-2004 //-------------------------------------------------------------------------------...
3a99d627efb14b2d17d98c4e977a74069327806c
5b279351632146ff2974b1761e9640979b9a60af
fn-orca/random-coding
/ctci/chapter05/ex07/main.cpp
C++
cpp
578
no_license
#include<bits/stdc++.h> using namespace std; const unsigned int aux = 0b10101010101010101010101010101010; unsigned int pairwiseSwap(unsigned int a) { int x = a << 1; x &= aux; int y = a >> 1; y &= (aux >> 1); return x | y; } void test0() { int a = 0b010; int test = pairwiseSwap(a); int ...
f7a4065b718d86f920c99cff97ad57c8ad0b1714
35c8a66fe15acad9755a4ae45f07a8edddf7fae9
kiar40k/Big-Numbers
/Lib/Src/Math/Expression/ExpressionNodeTree.cpp
C++
cpp
11,586
no_license
#include "pch.h" #include <Math/Expression/Expression.h> ExpressionNodeTree::ExpressionNodeTree(ParserTree *tree, ExpressionInputSymbol symbol, va_list argptr) : ExpressionNode(tree, symbol) { initChildArray(argptr); } ExpressionNodeTree::ExpressionNodeTree(ParserTree *tree, ExpressionInputSymbol symbol, const Expr...
7f41be6f1ea5ef080f5e775d74009bfd6f5e0bd2
971e58a3fd87505cde580f63ce0d53da7fec0c86
marasolen/ECHOs-in-the-Dark
/template/src/components.cpp
C++
cpp
6,490
no_license
#include "components.hpp" int next_id = 0; std::map<int, MotionComponent*> s_motion_components; std::map<int, MotionComponent*> s_ui_motion_components; std::map<int, RenderComponent*> s_render_components; std::map<int, RenderComponent*> s_ui_render_components; bool RenderComponent::init_sprite() { // The position c...
c4f9bd90ca83e443de1134e3bb7eba53d36c84a0
bc2e2e15372c425cdc1aa5645bb5906283d6a956
dejan-stankovic/vcl
/src/examples/opengl/gridcube/main.cpp
C++
cpp
8,161
permissive
/* * This file is part of the Visual Computing Library (VCL) release under the * MIT license. * * Copyright (c) 2016 Basil Fierz * * 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 with...
0d12eb7474153a351ce05a4643129bf060b01825
bb2c14b2d35e4d612d53da7e897647bb91bc531a
silvest/HEPfit
/LHPC/source/MEC/RunningConstant.cpp
C++
cpp
1,065
permissive
/* * RunningConstant.cpp * * Created on: Apr 1, 2012 (really!) * Author: Ben O'Leary (benjamin.oleary@gmail.com) * Copyright 2012 Ben O'Leary * * This file is part of LesHouchesParserClasses, released under the * GNU General Public License. Please see the accompanying * README.LHPC_CP...
c8d598f8ecb305ad4862b1c94f682221686830b5
15df8ad5a872aea56619a2a0ca07acc366ee7489
murdercdh/PKU_ACM
/code/2181_GREEDY.cpp
C++
cpp
490
no_license
#include <iostream> using namespace std; int p,a,sum,maxi,mini; int main() { freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); while(scanf("%d",&p)!=EOF) { int i=1; sum=0; maxi=0; mini=0; scanf("%d",&a); maxi=a; while(i<p) { while(scanf("%d",&a),a>=maxi&&i<p) { maxi=a;i++; } ...
bdce037b95ec8ebbd755053f3bdeb423c3c5ac53
094dc653ee61df0df1cce689bdc832d243337c3f
Pietertt/battlesimulator
/src/kdtree.cpp
C++
cpp
3,391
no_license
#include "precomp.h" namespace Tmpl8 { KDTree::KDTree(){ } KDTree::KDTree(Tank* item){ this->item = item; } void KDTree::add(Tank* item, int depth) { if (this->item == NULL) { this->item = item; return; } if(depth % this->k == 0){ ...
f14ba8657ed198d141b65a7303256894d8fcab5e
c2638bfc51c46c906419c6c3da3f4e7668df41cd
nickruta/DataStructuresAlgorithmsCpp
/DataStructuresAlgorithmsCpp/Progression.cpp
C++
cpp
496
no_license
// // Progression.cpp // DataStructuresAlgorithmsCpp // // Created by Nicholas Ruta on 7/26/16. // #include "Progression.hpp" // print n values void Progression::printProgression(int n) { // print the first value cout << firstValue(); // print 2 through n for (int i = 2; i <= n; i++) cout <...
4376922d15d290c5cb7ccf2c8d26b4cc255aa4f6
0363b44d70bb89870b840f7d2615421b8a7e212a
linux4sam/egt-thermostat
/src/sensors.cpp
C++
cpp
3,857
permissive
/* * Copyright (C) 2018 Microchip Technology Inc. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "sensors.h" #include <egt/detail/math.h> #include <egt/geometry.h> #include <iostream> #ifdef HAVE_SENSORS #include <sensors/sensors.h> #else ...
ff0e269121e7776c2c4844c25e1ca1bac3f2b0d0
ff0dd001b88d75c560672a4712ccaa3feb751b24
Pan-yangxu/oneflow
/oneflow/api/python/utils/tensor_utils.cpp
C++
cpp
9,194
permissive
/* Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
d6faf709a62cce35071ec1cbd3a642bbc78a1b2c
f3ef50b91560f21c609615adb7cbb9aec2fe2c9f
worldpalyer/libed2k
/include/libed2k/deadline_timer.hpp
C++
hpp
3,247
no_license
/* Copyright (c) 2009, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the f...
e1b85cca6ded56febf18c334e93b2c1eea5544f5
3e1b69a1fbf58713c44b2cc8abcb795f7ec81b16
mujin/pcl
/io/src/image_yuv422.cpp
C++
cpp
6,727
permissive
/* * Software License Agreement (BSD License) * * Copyright (c) 2011 2011 Willow Garage, Inc. * Suat Gedikli <gedikli@willowgarage.com> * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
063a06a6a0de1d54b8ace8ea9e237d9d9f0ef91b
36567a4ab3bfcf9288a2910d468701ac968dd12b
Ewenwan/ow
/Bltc/Bltc/Items/i206.cpp
C++
cpp
516
no_license
// Author: Gamma Chen #include "ModelConfig.h" #include "TiLib.h" #include "Items.h" #include "TiApi.h" void Items::AI206() { while (1) { api.mCard.AutoPowerOnOff(); U16 key = lib.keypad.GetKey_U16(); key = (~key & (~ KEYPAD_CH_UP_U16 | ~ KEYPAD_CH_DOWN_U16) ); PDEBUG("~key & (~ KEYPAD_CH_UP_U...
d678bf47a9feeaa64407a731be93018a1328e2a8
d9c3134806980e9bccc6628ffe272b80d9e22341
jassigill2000/irods
/server/icat/src/icatHighLevelRoutines.cpp
C++
cpp
144,070
permissive
/*** Copyright (c), The Regents of the University of California *** *** For more information please refer to files in the COPYRIGHT directory ***/ /************************************************************************** This file contains most of the ICAT (iRODS Catalog) high Level functions. Thes...
1dd71021b502a607ecf15c9d1ffff41a1d104a2d
7862c6554045c58e85cbb0db06024c75fe575bd0
levuoj/cpp_rtype
/includes/server/FFEngine.hpp
C++
hpp
548
no_license
// // Created by pashervz on 10/01/18. // #ifndef CPP_RTYPE_FFENGINE_HPP #define CPP_RTYPE_FFENGINE_HPP #include "AEngine.hpp" #include "EntityFactory.hpp" #include <list> #include "GameSession.hpp" namespace FF { class FFEngine : public AEngine { private: std::list<FF::GameSession> _ses...
73fcb29d046b7fbe5a78a33236ab75690333a585
47763697e8411af09834fd93194d25e33361bac8
chinmaygarde/flutter_engine
/impeller/entity/contents/texture_contents.cc
C++
cc
5,786
permissive
// Copyright 2013 The Flutter 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 "texture_contents.h" #include <memory> #include <optional> #include <utility> #include "impeller/core/formats.h" #include "impeller/entity/conte...
03f23a4f8c2348cf84e0662deb445b599c8f5d88
f8c8caeb36415ecc0516cb17701de87d133ef18b
hvasconcelos/nxtcoin
/src/rpc/blockchain.cpp
C++
cpp
68,049
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpc/blockchain.h" #include "amount.h" #include "chain.h" #include "chainpar...
b0a82d3e99f3b906ee0df35b8f2235cb0d52ab91
e597d014dd0f4219aa0d4a55b7dd2dc094a644b2
Pahail/computational-mathematics
/normal/main.cpp
C++
cpp
566
no_license
#include <iostream> #include <math.h> using namespace std; double line (double x) { return -35 * x / 13 + 850; } double normal(double x, double d) { double k = 1 / (sqrt(d*2*M_PI)); return k * exp(- pow( 0.45 * (x - 4.12),2) / (2 * d) ); } double porable(double x) { return -41.1145 * pow(x,2) + 338....
b6a2bcf9eb71e8c025a277e95a7994f76e396b24
8e78cb9ad77c3999754e05b49a952252da6a00a3
yangbin1026/CameraJni
/CameraJNI/jni/JNVPlayer/Player/Audio/g726_40.cpp
C++
cpp
6,794
no_license
/* * This source code is a product of Sun Microsystems, Inc. and is provided * for unrestricted use. Users may copy or modify this source code without * charge. * * SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING * THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTI...
3f5d39f1019b2c10e10960e856c94131856a2e68
1f6d09c1da9e0e97295094c6a8cbf4801e72c8c6
Ph0enixxx/NetBot
/NetBot/ScreenDlg.cpp
C++
cpp
10,012
no_license
// ScreenDlg.cpp : implementation file // #include "stdafx.h" #include "NetBot.h" #include "ScreenDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CScreenDlg dialog CScreenDlg::CScr...
1235fd0ed746142bfedb7a668bd5c6386840cf74
fc7b72c55483006093d4507194f7b0429100e6dd
BartVandewoestyne/Cpp
/books/Effective_STL/utils/Widget.cpp
C++
cpp
791
no_license
#include "Widget.h" #include <iostream> bool operator==(const Widget& lhs, const Widget& rhs) { return lhs.id == rhs.id; } bool operator<(const Widget& lhs, const Widget& rhs) { return lhs.id < rhs.id; } std::ostream& operator<<(std::ostream& os, const Widget& rhs) { os << "Widget [id = " << rhs.id << "]...
e5947d2bca181a8739975063c31ba053070a5af2
cd23901bfd82130cd9c53fc0e0af38a628fd4cf9
graphisoft-python/DGLib
/Support/Extensions/APIOutputFramework/DefaultImplementation/AttributeIterator.cpp
C++
cpp
601
permissive
#include "AttributeIterator.hpp" bool GSAPI::AttributeIterator::operator== (const GSAPI::AttributeIterator& it) const { if (((&(it.parameters.container)) == (&((*this).parameters.container))) && (it.parameters.currentAttribute.databaseInfo == (*this).parameters.currentAttribute.databaseInfo) && (it.parameter...
d572fde046da9b78b01006bd87bed6e79f5aae0e
7ec8093bdce2505ca4d274ee37b65ed1a7b65638
psychomantys/miniOS
/src/kernel/compiler/gcc/new.cpp
C++
cpp
1,060
no_license
/* * ===================================================================================== * * Filename: new.cpp * * Description: * * Version: 1.0 * Created: 01/09/2013 11:06:11 AM * Revision: none * Compiler: gcc * * Author: YOUR NAME (), * Organizatio...
2c1c02e662f45710bb247e153a4735da6412f7fc
be56b334e7f8afed7233d8d028814e466e72ff82
ganlubbq/pavement_thickness_radar
/libs/splab/test/cevd_test.cpp
C++
cpp
1,786
no_license
/***************************************************************************** * cevd_test.cpp * * CEVD class testing. * * Zhang Ming, 2010-12, Xi'an Jiaotong University. *****************************************************************************/ #define BOUNDS_CHECK #include <...
db0688b5bb932d7680679073d64bd74e77c7c229
26ecc31c5ec98b5a915ea92a8935a933b83fe80e
nazpyro/tango-examples-c
/motion-tracking-jni-example/app/src/main/jni/tango_data.cpp
C++
cpp
7,065
permissive
/* * Copyright 2014 Google Inc. 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 applic...
13bab48b80a798735072a339d19fc6be2e47ad4e
49fe0f80a743ce40932e0660897dfcf56879ec60
D-Denisov/openvino
/ngraph/core/include/ngraph/op/and.hpp
C++
hpp
1,689
permissive
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include <memory> #include "ngraph/op/util/binary_elementwise_logical.hpp" namespace ngraph { namespace op { namespace v1 { /// \brief Elementwise logical-and operation. ...
82d3744b0eb53409f1ccdf20177cde3575e0cd2e
ffc44398ca95ae0c0ec75d9f53f1cfb5907c7cd3
AlexStopher/Duum
/AGP AE2/Tutorial 01/Model.cpp
C++
cpp
8,722
no_license
#include "Model.h" struct MODEL_CONSTANT_BUFFER { XMMATRIX WorldViewProjection; // 64 bytes XMMATRIX WorldView; XMVECTOR AmbientLightColour = { 0.2f, 0.2f, 0.2f, 0.2f }; // 16 XMVECTOR DirectionalLightColour = { 1.0f, 1.0f, 1.0f, 1.0f }; XMVECTOR DirectionalLightVector; XMVECTOR PointLightPosition; XMVECTOR Poi...
304c11a2176143d27a6e402df7c97b51cd9c6cce
9fe44ce221aeb724cc91e8df52c5599ef709380b
carlchen0928/PAT
/1026.cpp
C++
cpp
6,192
no_license
#include <stdio.h> #include <stdlib.h> #include <int.h> #include <malloc.h> #define N 10000 #define K 100 typedef struct { char arrtime[9]; int playingtime; char is_vip; }player; //size of player: 9+4+1=14B typedef struct { char opentime[9]; //从此刻看,这个桌子的开放时间 int usedtimes; char is_vip; }table; player players...
8a698cd518b19ea3b5dabad04fd895704de56582
6de1364142f9a0ced858e9e718a92f6867916d7b
peterivanov22/1in3SAT
/tests.cpp
C++
cpp
1,037
no_license
#include "solver.cpp" #include <math.h> #include <glpk.h> #include "solver.h" #include <time.h> #include <stdlib.h> #include <vector> #include <list> #include <utility> #include <cstdio> #include <queue> #include <iostream> #include <set> #include <algorithm> #include <cmath> #include <gtest/gtest.h> int argc; //...
87870fb0059588bdcb5f60cc124279b8427c0e34
c98c70fd4cb8bc44de559ea037b6cc478364f5be
cristicretu/advent_of_code_2020
/day15/day15.cpp
C++
cpp
597
permissive
/** * author: etohirse * created: 23.12.2020 20:06:44 **/ #include <fstream> #include <iostream> #include <unordered_map> typedef long long ll; std::ifstream fin("input.in"); int main() { std::string s; std::unordered_map<ll, ll> fv; ll i(0), count(0); while (getline(fin, s, ',')) { if (count) f...
65f6a4d5d10951228e901d5148af220de14ab889
279792a943b9e2f21cdcee7e1c59433fc08e9c1c
sw32rt/GlaphSearch
/GlaphSearch/DepthFirstSearch.cpp
C++
cpp
2,135
no_license
#include "pch.h" #include "DepthFirstSearch.h" void DepthFirstSearch::init(int StartVertexIndex, int SearchVertexIndex) { this->CurrentVertexIndex = StartVertexIndex; this->StartVertexIndex = StartVertexIndex; this->SearchVertexIndex = SearchVertexIndex; // 探索順リストクリア NextSearchVertexStack.clear();...
44f6411347de08ea44a27a5d19638baa0326b498
f6db2b4a409d2b4ed3f0c4094fe844e43697e8d1
shisa/shisa-netbsd
/src/sys/arch/hpc/stand/hpcboot/mips/mips_console.cpp
C++
cpp
2,317
no_license
/* -*-C++-*- $NetBSD: mips_console.cpp,v 1.1 2001/04/24 19:28:01 uch Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by UCHIYAMA Yasushi. * * Redistribution and use in source and binary forms, with...
07cd239d52b33eb69e20c68ff3a2c211ac2c8b04
a4cce9b9d77de652a9c4ab6568099a0929116711
jiushibushuaxie/my_leetcode_path
/c/5.longestPalindrome.cpp
C++
cpp
3,334
no_license
//问题描述 /* 5. 最长回文子串 难度:中等 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。 示例 1: 输入: "babad" 输出: "bab" 注意: "aba" 也是一个有效答案。 示例 2: 输入: "cbbd" 输出: "bb" */ //解法 /* 中心扩展法最好 马拉车算法太难了,需要补# */ #include <iostream> #include <vector> #include <string> #include <stack> #include <algorithm> #...
ab0c64b8c241c677d36e2a14fad8608fffd823be
3962c39d058fbd0123fc9e52fcbf8205376c0cf8
Rkda8071/PS
/BOJ/26xx/2613/main.cpp
C++
cpp
970
no_license
#include<bits/stdc++.h> using namespace std; int a[310]; int n,m; bool f(int maxim){ int hap = 0,cnt = 1; for(int i=1;i<=n;i++){ hap += a[i]; if(hap>maxim){ ++cnt; hap = a[i]; } } if(cnt<=m) return true; else return false; } int main(){ scanf("%d %...
24ba4f6e02b98566efafee4628ad2d189cbfbc1b
69a0d1133ded107a7a4f8b90dc55f301dece18e9
tinge666/CocosGame
/frameworks/cocos2d-x/cocos/scripting/lua-bindings/manual/navmesh/lua_cocos2dx_navmesh_conversions.cpp
C++
cpp
6,993
permissive
/**************************************************************************** Copyright (c) 2013-2016 Chukong Technologies Inc. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and assoc...
59abdf8e2f16cb044069247aa5769a3ae4476712
b2af629e61a3155020b274d78f85b1b7537203a2
ALEHACKsp/RoCo-SDK
/SDK/RoCo_WBP_KeyboardUndoButton_classes.hpp
C++
hpp
1,795
no_license
#pragma once // Rogue Company (0.60) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "RoCo_WBP_KeyboardUndoButton_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //----------------------------------------------------------------------...
7371becb5c75cd2140be450c8cb7fe71a06efd91
2324a4448f7642d573ff84a16c25bf648d277b83
Rex0070/Workspace
/C++/명품/chapter 5/ex5-3/ex5-3.cpp
C++
cpp
380
no_license
#include <iostream> using namespace std; int main(void) { cout << "i" << '/t' << "n" << '/t' << "refn" << endl; int i = 1; int n = 2; int &refn = n; n = 4; refn++; cout << i << '/t' << n << '/t' << refn << endl; refn = i; refn++; cout << i << '/t' << n << '/t' << refn << endl; int *p = &refn; *p = 20; c...
340ddd0672cacb403fe8572ada0f198da82915de
0e0b1ec1db965db9fcd2c8103ec1aa2eb2f2b1a5
yiyang-tian/openthread
/tests/unit/test_ip6_address.cpp
C++
cpp
14,470
permissive
/* * Copyright (c) 2019, The OpenThread Authors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright * notice, this ...