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
2f7b9d478a45faf6ead9696f706520fcdf1cc26c
d86ae46e9941db341f549fd33798e815caf13c6f
Zero9O/CIS-7_Discrete_Structures
/Assignment7.cpp
C++
cpp
1,672
no_license
#include <iostream> #include <string> #include <vector> using namespace std; class Tower { private: vector<string> disks; public: Tower(string name, int size, bool isInitialTower) { this->name = name; if (isInitialTower) { for (int i = size; i > 0; i--) { this->pushDisk(to_string(i)); } } } ...
bc35edc6ee8620387953d99e548df76dff757b34
c491efd2500bf2bd85cbd15e9bda8f3cef731be6
stpope/CSL6
/Old/Builds/JuceLibraryCode/modules/juce_core/xml/juce_XmlElement.cpp
C++
cpp
24,765
permissive
/* ============================================================================== This file is part of the JUCE library - "Jules' Utility Class Extensions" Copyright 2004-11 by Raw Material Software Ltd. ------------------------------------------------------------------------------ JUCE can be redistrib...
8467e4032673fa3ad0fcb54378b87a4543502531
a8e7eed17e0a3f10a8ee3d336207b5eaf900439e
XimBlockProject/Windown-iOS-Ubuntu-Wallet
/src/qt/walletview.cpp
C++
cpp
16,009
permissive
// Copyright (c) 2011-2015 The Bitcoin developers // Copyright (c) 2016-2018 The PIVX developers // Copyright (c) 2018 The XIM developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "walletview.h" #include "address...
3774b9beb537e0bc43e38ac3397f6b864a82038d
43e76415dac544a025102f45b20a96e4f0d218b9
Matvey1703/Homework
/part7/task7.2/task7.2/list.cpp
C++
cpp
2,237
permissive
#include "list.h" struct ListElement { int value; ListElement* next; }; struct List { ListElement* head = nullptr; ListElement* tail = nullptr; }; bool isEmpty(List* list) { return list->head == nullptr; } List* create() { return new List; } bool deleteElement(ListElement** elementToDelete, List* list) { i...
7928121d06482c5604c44b43f4b515bb5004f2cd
62ad610e773c37ecaf74afa611dc4815ab28df80
coecms/lrose-core
/codebase/libs/NcxxUtils/src/Ncxx/NcxxAtt.cc
C++
cc
18,106
permissive
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // ** Copyright UCAR (c) 1990 - 2016 // ** University Corporation for Atmospheric Research (UCAR) // ** National Center for Atmospheric Research (NCAR) // ** Bo...
3190279624218fc479272b72614609a3b28744e4
c5a0866073b8930b63c8d373f82f42982a238653
janexpl/PKOcsv2mt940
/include/csv2mt940.hpp
C++
hpp
273
no_license
#ifndef PKOCSV2MT940_CSV2MT940_HPP #define PKOCSV2MT940_CSV2MT940_HPP #include <iostream> #include "Mt940.hpp" #include "CsvReader.hpp" using namespace std; bool generateMt940(string inFile, string ouFile, string accNo, string docNo); #endif //PKOCSV2MT940_CSV2MT940_HPP
715c1a47ad45f83536554e432ed7ede3f4c2ae6a
f585f99e500054eb4ccb34f25a68c03992508b77
daxian-dbw/terminal
/src/terminal/adapter/ut_adapter/adapterTest.cpp
C++
cpp
95,079
permissive
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. #include "precomp.h" #include <wextestclass.h> #include "..\..\inc\consoletaeftemplates.hpp" #include "adaptDispatch.hpp" using namespace WEX::Common; using namespace WEX::Logging; using namespace WEX::TestExecution; namespace M...
d99b8da77516272e92e6f56849fb047ceb6806c4
0750702b8d9c26526c74469e707a25aa837a2395
brianewell/pkgsrc
/www/firefox78/patches/patch-js_src_jit_ProcessExecutableMemory.cpp
C++
cpp
1,696
no_license
$NetBSD: patch-js_src_jit_ProcessExecutableMemory.cpp,v 1.1 2020/11/10 02:59:27 nia Exp $ PaX MPROTECT safety for NetBSD. --- js/src/jit/ProcessExecutableMemory.cpp.orig 2020-10-27 23:47:06.000000000 +0000 +++ js/src/jit/ProcessExecutableMemory.cpp @@ -362,9 +362,16 @@ static void* ReserveProcessExecutableMem // N...
4dee4d387673d9291866141d74b29229bb977ac0
aa302608ee1b952d92b04a423d1f2ef9fdefb5d3
divyanshu-talwar/Lighting-and-Shading
/ext/glm/glm/gtx/range.hpp
C++
hpp
2,097
permissive
/// @ref gtx_range /// @file glm/gtx/range.hpp /// @author Joshua Moerman /// /// @defgroup gtx_range GLM_GTX_range /// @ingroup gtx /// /// @brief Defines begin and end for vectors and matrices. Useful for range-based for loop. /// The range is defined over the elements, not over columns or rows (e.g. mat4 has...
f347341b3f26a38ac2ca43bb4897ca7c19a91b87
15644037acc5fb47fd83cd197fab8e15db054267
TristanMathieu/TPCPP-MT-06.02.20-HeritageMultiple
/HeritageMultiple/HeritageMultiple/liste_points.cpp
C++
cpp
333
no_license
#include "liste_points.h" liste_points::liste_points() { } liste_points::~liste_points() { } void liste_points::ajoutPoint(point newPoint) { point * adrNewPoint; ajoute(adrNewPoint); } void liste_points::affichageListe() { point pointActuel; point * adrPointActuel; if (fini() == 0){ affiche(); proc...
b668c34d8d5d892db2a7394226a7c10adf9fdcd5
59e4f6ad8460a9925e19a6b669cbaffa65b76d65
minblock/qtip
/src/test/cuckoocache_tests.cpp
C++
cpp
14,690
permissive
// Copyright (c) 2012-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 <boost/test/unit_test.hpp> #include <cuckoocache.h> #include <script/sigcache.h> #include <test/test_qstees.h> #inclu...
1f3330f7edced9351d2307e0aa274bfa33a0d6dd
316ef76fed51971eb256f3c7981e692e16089508
fossabot/turicreate
/src/unity/extensions/json/encoder.cpp
C++
cpp
9,866
permissive
/* Copyright © 2017 Apple Inc. All rights reserved. * * Use of this source code is governed by a BSD-3-clause license that can * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause */ #include "encoder.hpp" #include "types.hpp" #include <logger/assertions.hpp> #include <logger/logge...
435bb0596eec5e378b6df9beb5b3302637875d15
07c6481287da7420f4c3de046343928a057cbf48
Haathor/Gravedigger
/src/components/CAcceleration.cpp
C++
cpp
597
no_license
#include "CAcceleration.hpp" CAcceleration::CAcceleration(Character* _parent, const float _hAcceleration, const float _vAcceleration): CComponent(_parent) { setHAcceleration(_hAcceleration); setVAcceleration(_vAcceleration); } float CAcceleration::getHAcceleration() { return hAcceleration; } ...
281acf4f4f3eb300dbab02f99c3d28e0361ae122
d2d796517a0ddb11944f7ace4f86886af79b31b2
dimitar-asenov/Envision
/OODebug/src/debugger/JavaDebugger.cpp
C++
cpp
23,375
permissive
/*********************************************************************************************************************** ** ** Copyright (c) 2011, 2014 ETH Zurich ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ** following c...
79646272e4796701e9fa211c7b64336b7f12b69c
7af645d1c1f54d07d47cd705d8ba63a9e61b6c6b
kahou0120424/Sector-8-Darchangel
/Darchangel/Intermediate/Build/Win64/UE4Editor/Inc/Darchangel/FindPlayerLocation.gen.cpp
C++
cpp
6,388
no_license
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ==============================================================...
835db143ca7dd99ff8acc1c7816267663e19148c
20248e820990b0464dc3be149596456e024c3b45
uwezocoin/uwezocoin
/src/qt/askpassphrasedialog.cpp
C++
cpp
9,917
permissive
// Copyright (c) 2011-2013 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 "askpassphrasedialog.h" #include "ui_askpassphrasedialog.h" #include "guiconstants.h" #include "walletmodel.h" #inc...
290094e2701569c64b277f12ff4b75eb863de02a
88a0626927a7d12ce6ba558b91868009a9aef3e8
Clepoy3/LeakNet
/dlls/vguiscreen.cpp
C++
cpp
9,966
no_license
//========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============ // // Purpose: This is an entity that represents a vgui screen // // $NoKeywords: $ //============================================================================= #include "cbase.h" #include "VGuiScreen.h" #include "networkstring...
0276c13f9c075c060af1b229c51279e8b3b80a85
530aaf39da1c0ba9b166293aabbc21e88a5013e4
man-in-black382/UbiBlur
/UbiBlur/UbiBlur/OpenGL/Core/Buffers/GLBuffer.hpp
C++
hpp
3,003
no_license
// // GLBuffer.hpp // Engine // // Created by Pavlo Muratov on 18.03.17. // Copyright © 2017 MPO. All rights reserved. // #ifndef GLBuffer_hpp #define GLBuffer_hpp #include <vector> #include <algorithm> #include <cmath> #include "GLNamedObject.hpp" #include "MemoryUtils.hpp" namespace Engine { template<typ...
b221bc282494face35f4268f4399a8349dcc23b7
f7d7ed8baf9fdfbde13e1cc0624d2cf2fc19c12c
jsj2008/PicoPicoGameEngine
/PicoGame/sources/Platforms/Android/PPGameScene.cpp
C++
cpp
6,511
no_license
/*----------------------------------------------------------------------------------------------- 名前 PPGameScene.cpp 説明 作成 2012.07.22 by H.Yamaguchi 更新 -----------------------------------------------------------------------------------------------*/ /*----------------------------------------------...
251d91a0e97fb72599cf56146eb8b4559d7bcc25
bd90aa027a473848ba6ab1af2fa8b8b897d4b665
simonecid/cmssw
/DQM/TrackingMonitorSource/plugins/WtoLNuSelector.cc
C++
cc
8,073
permissive
// W->lnu Event Selector #include "DataFormats/Common/interface/Handle.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "CommonTools/UtilAlgos/interface/TFileService.h" #include "DataFormats/GsfTrackReco/interface/GsfTrack.h" #include "DataForm...
0c86ed6a78a6e23f71525f94586c859778a2bc6a
f260728bcd69e79bedbe85a812ef41f93c7e67ac
cristaloleg/reindexer
/cpp_src/tools/serializer.cc
C++
cc
8,742
permissive
#include "tools/serializer.h" #include <errno.h> #include <stdarg.h> #include <stdio.h> #include <vendor/double-conversion/double-conversion.h> #include <cstring> #include "core/keyvalue/key_string.h" #include "core/keyvalue/p_string.h" #include "estl/chunk_buf.h" #include "itoa/itoa.h" #include "tools/errors.h" #inclu...
e45814d0b2fb68081f21c29264629bad54020605
42d762841b701bb2610648d50a6463a5520bf0cb
FRUPAL-group-1/frupal
/character.cpp
C++
cpp
4,750
no_license
// character.cpp // // This files contains the character class. // #include "character.h" //int leftbuffer = COLS - 28; Character::Character() { yAxis = 1; xAxis = 1; energy = 102; whiffles = 1000; binoculars = false; boat = false; for(int i = 0; i < MAX_TOOLS; ++i) { toolbag[i] = NULL; } } ...
a66632a0555ef3a704585d61fa5309a6dfbdf105
42476f574e3bc61b53b68eaf28f59695450fd727
EmptyCell/BattleTanks
/BattleTank/Source/BattleTank/Private/SpawnPoint.cpp
C++
cpp
1,072
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Public/SpawnPoint.h" #include "Engine/World.h" #include "Kismet/GameplayStatics.h" // Sets default values for this component's properties USpawnPoint::USpawnPoint() { // Set this component to be initialized when the game starts...
9e0ac3654f338ac2ccc81e5eb9e54d8cd89a84ff
6133d4be2bf2a97c9e2e10aa9abe2ff945160202
denisvlah/ClickHouse
/dbms/src/Server/Server.cpp
C++
cpp
24,675
permissive
#include "Server.h" #include <memory> #include <sys/resource.h> #include <Poco/DirectoryIterator.h> #include <Poco/Net/HTTPServer.h> #include <Poco/Net/NetException.h> #include <ext/scope_guard.h> #include <common/logger_useful.h> #include <common/ErrorHandlers.h> #include <common/getMemoryAmount.h> #include <Common/C...
da6fa491d974136afa762086fe1d3200c68d7203
330abf6c00bcda9162eb9c0f595ce86dd36958fc
bigdoods/OpenInfraPlatform
/IfcAlignment/src/OpenInfraPlatform/IfcAlignment/entity/IfcHeatFluxDensityMeasure.cpp
C++
cpp
1,728
no_license
/*! \verbatim * \copyright Copyright (c) 2015 Julian Amann. All rights reserved. * \author Julian Amann <julian.amann@tum.de> (https://www.cms.bgu.tum.de/en/team/amann) * \brief This file is part of the BlueFramework. * \endverbatim */ #include <sstream> #include <limits> #include <map> #include "OpenInfraPlatf...
168058c36c2b2c78a27d76ead4c789e6c4564bdd
b7bd79c6e9cb87069e38f1ea346c352db31b185b
vsevolodmur/tages_test_app
/windows/runner/main.cpp
C++
cpp
1,224
no_license
#include <flutter/dart_project.h> #include <flutter/flutter_view_controller.h> #include <windows.h> #include "flutter_window.h" #include "run_loop.h" #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { ...
39efa1ef9ce28c54c11c9af828c84372141ee492
65b05e832b9ee4dc95961869ea7c823d6ea68c25
WuFengXue/il2cpp-Mirror
/il2cpp-v24.3/libil2cpp/vm/Type.cpp
C++
cpp
40,724
no_license
#include "il2cpp-config.h" #include <string> #include <cstring> #include <algorithm> #include <ctype.h> #include "metadata/Il2CppTypeCompare.h" #include "utils/StringUtils.h" #include "vm/Assembly.h" #include "vm/AssemblyName.h" #include "vm/Class.h" #include "vm/GenericClass.h" #include "vm/GenericContainer.h" #incl...
6b04d32df8d3f00c2bf66da28255d250f819ab1b
a07f70c76185f8d85a019407346ca03e4f09d92b
wargod797/find-_string-_and_Replace-_in-_a-_single-_string_input
/str_del.cpp
C++
cpp
1,323
no_license
#include<iostream> #include<string.h> #include<algorithm> using namespace std; int main() { string s,str3="and"; int k, MAX, MAX1,i,j,m; getline(std::cin, s); //s = "hello and he"; for (k = 0; s[k] != '\0'; ++k) MAX = k; cout<<"MAX="<< MAX<<endl; size_t found = s.find(str3); ...
ca02f3deef116d620e1ba8f4066a77cdb8c946d1
ff0f5d680cce8a770b3d3e72d0dcb0e1dde49cff
fermi-lat/timeSystem
/src/CalendarFormat.cxx
C++
cxx
34,726
permissive
/** \file CalendarFormat.cxx \brief Implementation of CalendarFormat and related classes. \authors Masaharu Hirayama, GSSC James Peachey, HEASARC/GSSC */ #include "timeSystem/CalendarFormat.h" #include <cmath> #include <iomanip> #include <limits> #include <sstream> #include <stdexcept> #include <v...
0c8ef013e2a625843386964d3b9fc7ecd2967bc3
29dae3b3052a859da21e6fae00860a12d5a2a81e
coyotte508/pythran
/pythran/pythonic/numpy/any.hpp
C++
hpp
2,719
permissive
#ifndef PYTHONIC_NUMPY_ANY_HPP #define PYTHONIC_NUMPY_ANY_HPP #include "pythonic/utils/proxy.hpp" #include "pythonic/types/ndarray.hpp" #include "pythonic/__builtin__/ValueError.hpp" #include "pythonic/numpy/add.hpp" namespace pythonic { namespace numpy { template<class E> bool _any(E begin, ...
a0b8ae814663e1b10cfe0c20080d7a161ab0185c
f12eae258f1f08a382e28332a046b2dac98dbe38
BreakEngine/Break-0.1
/Physics/src/CircleShape.cpp
C++
cpp
2,342
no_license
#include "CircleShape.hpp" #include <new> #include <glm/gtc/constants.hpp> using namespace Break; using namespace Break::Infrastructure; using namespace Break::Physics; Shape* CircleShape::Clone(BlockAllocator* allocator) const { void* mem = allocator->Allocate(sizeof(CircleShape)); CircleShape* clone = new (mem) ...
4047ed36b0829c7fb32b449e833a8230e71648c8
b9e0ccfde11058dd119838afc199035d630144e8
kaymarie26/electron
/shell/browser/browser.cc
C++
cc
7,168
permissive
// Copyright (c) 2013 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "shell/browser/browser.h" #include <memory> #include <string> #include <utility> #include "base/files/file_util.h" #include "base/no_destructor.h" #include "base/path_servic...
fa968fe12c2a2d1d15c7cdc8cc2a62968506db7b
9a0af43ea991c77920303ee6b9757507bc119571
JackDrogon/LibCoroutine
/include/scheduler.hh
C++
hh
654
no_license
#pragma once #define _XOPEN_SOURCE #include <unordered_map> #include <memory> #include <ucontext.h> #include "common.hh" // ThreadLocal class Fiber; class Scheduler { public: friend class Fiber; Scheduler(); ~Scheduler() = default; COROUTINE_DISALLOW_COPY_AND_ASSIGN(Scheduler); const Fiber *Current(); vo...
77e4788cb6d62b46d220ca88c53ee172500f61de
437d7b4ea5ccbcfc4b3a6fafa389014f6a131604
jesuscraf/peopletech
/cpp/m4configuration/src/directory.cpp
C++
cpp
16,754
no_license
//## begin module.cm preserve=no //## end module.cm //## begin module.cp preserve=yes // ============================================================================== // // (c) Copyright 1991-1997 Meta Software M.S., S.A // All rights reserved. // // Module: Directory // File: Directory.cpp // Project: M...
c1e76bf5a61e43b452892550e45f58584f676b0f
3d36d0f84ca4bed00f82dbbae286c86b8692a459
MartinKalchev/2D-Platformer-Game
/Mario/Graphics.cpp
C++
cpp
4,453
no_license
//---------------------------------------------------------------------// // Graphics.cpp // // Singleton // // Handles the initialization of the graphics related SDL libraries // // and their release ...
1abeb3d60b7e0d391ba732effc88d07709080e53
6c88da50329dcb53c5ac6504ea092a4d5182b5c7
ValeryiE/daal
/algorithms/kernel/neural_networks/layers/fullyconnected_layer/backward/fullyconnected_layer_backward_dense_default_batch_fpt_dispatcher.cpp
C++
cpp
1,264
permissive
/* file: fullyconnected_layer_backward_dense_default_batch_fpt_dispatcher.cpp */ /******************************************************************************* * Copyright 2014-2019 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance w...
a818bfda1b9d432edd5326e3f8c4edd4adb503a0
bb94613331e59608d49b121a46d06b3d3d66191c
ZacharyEagan/Graphics
/holmes/lab08-master/src/Obj.cpp
C++
cpp
12,242
no_license
#include "Obj.hpp" void Obj::init(std::string model) { prog->setVerbose(true); prog->setShaderNames( "../resources/bp_vert.glsl", "../resources/bp_frag.glsl"); if (! prog->init()) { std::cerr << "One or more shaders failed to compile... exiting!" << std::endl; exit(1); } ...
6a7f02060fc25933c612d7ba70e74b247a18e640
6a1b87b23e97f7940f419f4b086cd5994234373b
soulsheng/magma
/testing/testing_dgeqrf.cpp
C++
cpp
7,657
no_license
/* -- MAGMA (version 1.4.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver August 2013 @generated d Tue Aug 13 16:46:07 2013 */ // includes, system #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <cud...
c9edf5ed5af6ae84f2d194621a09ff57739f2230
a2480f62807335d6f6f911c5007d09cca1bb5511
Liudeke/PD-Direct-Jocabi-Gauss-Seidel
/ClothSimulation/ProjectiveDynamicsMethods/GraphColoring.cpp
C++
cpp
5,004
no_license
#include "GraphColoring.h" #include <fstream> vector<vector<int>> randomizedGraphColoring(Eigen::MatrixXf& A) { int N = A.rows(); set<int>* mNeighbours = new set<int>[N]; int* mColors = new int[N]; set<int>* mPalettes = new set<int>[N]; set<int> U; //find neighbours for (int i = 0; i < N; ++i) { for (int j...
de2d567d0b69647addbbdc9b9a68d27abbff7465
d1a411a09d8f439e96769b2c67a64469cb0dae7c
slucey-cs-cmu-edu/Intro_iOS_Armadillo
/Intro_iOS_Armadillo/armadillo_bits/mtOp_bones.hpp
C++
hpp
2,560
no_license
// Copyright (C) 2008-2015 Conrad Sanderson // Copyright (C) 2008-2015 NICTA (www.nicta.com.au) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. //! \addtogroup ...
91ee0cfb909d600311a952f0b028fcb1c0515cee
39136168845480c42dde9b4f981f5880c84c1ebc
pce913/Algorithm
/baekjoon/14868.cpp
C++
cpp
2,869
no_license
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<iostream> #include<string> #include<cstring> #include<vector> #include<stack> #include<queue> #include<set> #include<map> #include<tuple> #include<iomanip> #include<algorithm> #include<functional> #include<cmath> #include<unordered_set> #include<unordered_map> ...
38abb9819983bc18b8ef51cfd94a7b357c106b70
d3ead27c3a0b94e8c30320507cc2e8079160f696
FrontISTR/REVOCAP_Mesh
/MeshGen/kmbTriangleList.cpp
C++
cpp
7,647
no_license
/*---------------------------------------------------------------------- # # # Software Name : REVOCAP_PrePost version 1.6 # # Class Name : TriangleList # # ...
eedd69fda4036070c526aa08190ae89926de95a0
0190a8397f42f283f0d1a0ffc4358b7270fcb6ff
ddavila0/htcondor
/src/condor_starter.V6.1/tool_daemon_proc.cpp
C++
cpp
13,156
permissive
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
c156771dc64c74703fc94a86ca0757a5a9bcd7a7
dd8558db5033d947a659a25bd6e1830c584dba9e
tszdanger/phd
/learn/triSYCL/002-saxpy.cc
C++
cc
3,218
no_license
/* * SAXPY using SYCL. */ #include "./trisycl.h" #include <vector> #include <stdlib.h> static unsigned int seed = 0xCEC; // // Baseline, sequential SAXPY. // template <typename T> std::vector<T> saxpy(const T& a, const std::vector<T>& x, const std::vector<T>& y) { if (x.size() != y.size()) ...
422c10b9416c5f7687d48fde2deb69c4f43f4e29
c5daa6b1b565920d37b89f1c9bdded4046e33396
woshihoujinxin/chromium-2
/chrome/browser/android/password_ui_view_android.cc
C++
cc
4,771
permissive
// Copyright 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/android/password_ui_view_android.h" #include <algorithm> #include "base/android/jni_string.h" #include "base/android/jni_weak_r...
7c77c3226a8e609b52d814b0ad179017c3c3e7cb
93f0a609c691c9197e0842f8e295fef214f1c8b8
ErikNatanael/royal-chaos
/chaos-ns-3/ns-3.27/src/test/ns3tcp/ns3tcp-loss-test-suite.cc
C++
cc
17,292
permissive
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2010 University of Washington * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This pro...
9d397886ca95c6632f039666e276849bcd417c59
8b05dd16d8ac7ee3551a158eafd13be509e09f7f
novakale/openvino
/src/plugins/intel_myriad/graph_transformer/src/middleend/hw/tiling.cpp
C++
cpp
20,748
permissive
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <vpu/middleend/hw/tiling.hpp> #include <tuple> #include <string> #include <algorithm> #include <vector> #include <limits> #include <utility> #include <vpu/middleend/hw/utility.hpp> #include <vpu/utils/numeric.hpp> namesp...
bcc0ed1a0bb0204518092781d30a46467813f506
a5570d434a798d172677158d0d0047cdbfa93917
ruisebastiao/KPPQtAutomation_old
/KPPHardware/idseventsthandler.cpp
C++
cpp
1,961
no_license
#include "idseventsthandler.h" #include "qdebug.h" #include "idscamera.h" using namespace IDS; IDSFrameEventHandler::IDSFrameEventHandler(QObject *parent) : QObject(parent) { m_stop=false; } void IDSFrameEventHandler::Abort() { m_stop=true; } void IDSFrameEventHandler::run() { //TODO Prepare for...
fa18bbca887393cb432346952640df7a6f06b3a2
b6363fefbf7ad906af51c52806c0b2ce52e0c4b3
open-mmlab/mmcv
/mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.cpp
C++
cpp
1,144
permissive
#include "pytorch_npu_helper.hpp" using namespace NPU_NAME_SPACE; using namespace std; void active_rotated_filter_forward_impl(const Tensor input, const Tensor indices, Tensor output); void active_rotated_filter_backward_impl(const Tensor grad_out, ...
76b2fe248decca1272379713358365ca5819cca2
8325036ac1e564ffa5701540efb6e0b272454595
winter-txieyyue/chromium
/third_party/blink/renderer/core/css/resolver/element_style_resources.cc
C++
cc
14,485
permissive
/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. * All rights reserved. * Copyright (C) 2013 Google Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU ...
2adf464a9f09ad517de110616174cfd2caf44d81
ecfbb928b0d23eff0eac33a5118ff57f2fa620f6
st35/DNA-supercoiling
/code/Model_Dynamics.hpp
C++
hpp
6,589
no_license
double Get_Torque(double sigma, double f, double segment) { double cutoff = 0.34*1000.0; double A = 50.0, C = 95.0, P = 24.0; double kBT = 4.1; // T = 300K. double A_m = 4.0, C_m = 1.75, e_m = 6.0*kBT, sigma_0 = -1.0; double c = kBT*C*w0*w0; double p = kBT*P*w0*w0; double cs = c*(1.0 - ((C / (4.0*A))*std::sqr...
ddc7eaa537e35bf04cf18ab8cb0c40c136a4d28f
9fb134f212efa83cffa3d5a066eb0ae756ed9c3d
vamsicool007/SDE_SHEET_30Days-Striver
/2.3.cpp
C++
cpp
1,348
no_license
//Next Permutation #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; vector<int>a(n); for(int i=0;i<n;i++) cin>>a[i]; //Method1: Basic algo of next permutation //Step1: Traverse from back and find an index where a[i]<a[i+1] since we need to find the p...
5d6c9ea7896b1cc52da5897a5b453927cc38df63
f0068be118c7a05d06099e49fb113d0f3311182a
mstei4176/triton
/lib/codegen/selection/generator.cc
C++
cc
106,730
permissive
#include <numeric> #include <sstream> #include <iomanip> #include "triton/codegen/selection/generator.h" #include "triton/codegen/target.h" #include "triton/codegen/analysis/axes.h" #include "triton/codegen/analysis/allocation.h" #include "triton/codegen/analysis/align.h" #include "triton/codegen/analysis/swizzle.h" #...
5ac21f0ffa4766eb7fae1e9fc04213e7ef2efc75
be835842553a392397f255854ae7abdecba775fc
TanjilulAnwar/HackerEarth
/Algorithms/Greedy Algorithms/Basics Of Greedy Algorithms/Dorsplen.cpp
C++
cpp
367
no_license
//https://www.hackerearth.com/practice/algorithms/greedy/basics-of-greedy-algorithms/practice-problems/algorithm/dorsplen/ #include<iostream> #include<algorithm> int main(){ std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); long long int a[3],t1; std::cin>>a[0]>>a[1]>>a[2]; std::sort(a,a+3); t1=a[2]-a[1]...
98a4416196de40d68d0c5902a6b9813a98e37f3b
a4660e122c07c552aed3c3e3bfea8beb6072c055
open-dis/open-dis-cpp
/src/dis6/DataPdu.cpp
C++
cpp
5,857
permissive
#include <dis6/DataPdu.h> using namespace DIS; DataPdu::DataPdu() : SimulationManagementFamilyPdu(), _requestID(0), _padding1(0), _numberOfFixedDatumRecords(0), _numberOfVariableDatumRecords(0) { setPduType( 20 ); } DataPdu::~DataPdu() { _fixedDatums.clear(); _variableDatums.clear(); } u...
4312c894d2b5612c608cf043965ffd9ea6bb14f3
cb6ef3a16877795098819069bb45943fbf3c2d61
sahil32/DataStructureandAlgorithm
/mockvita/rodcut_with_dp.cpp
C++
cpp
548
no_license
#include <iostream> using namespace std; int RodCut(int *a, int *prices, int length){ int b[length +1]; b[0] = 0; for (int i=1; i<=length;i++){ b[i] = 0; int res = 0; for(int j=0;j<8;j++){ if(i-a[j]>=0) res = b[i-a[j]] + prices[j]; if(res > b[i...
9cd889a94b6dff7ed12759b98b9fa2aff184ef09
f1a011fbdf3c4fd5cba51560c4f3458948e5d874
jasonTu/opencv
/src/cpp/get_started.cpp
C++
cpp
230
no_license
#include <stdio.h> #include <stdlib.h> #include "opencv2/opencv.hpp" using namespace cv; int main() { Mat picture = imread("img/affine_transf.png", CV_LOAD_IMAGE_COLOR); imshow("testing", picture); waitKey(6000); }
77697131f687ae7ffb49fe21fc7326e06cc2e954
a3aa3decbe0ff89b709dc698afd94b59e605d580
bwJeong/Monitor-Input-lag-tester
/QT Files/monitorInputLagTester/mainwindow.cpp
C++
cpp
3,156
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); port = new QSerialPort(); } MainWindow::~MainWindow() { delete ui; } void MainWindow::setPort(QString portName) { port->setPortName(p...
61d43025b6d5fd6accbf6269147297be080816b1
7af0845f7fc2b4c49a9beecb98adff03f6dba1ca
BlitzModder/dava.engine
/Sources/Internal/Input/Private/Android/GamepadImpl.Android.cpp
C++
cpp
5,769
permissive
#include "Engine/Private/Dispatcher/MainDispatcherEvent.h" #include "Input/Private/Android/GamepadImpl.Android.h" #include "Input/Gamepad.h" #include "Input/InputElements.h" #include <android/input.h> #include <android/keycodes.h> namespace DAVA { namespace Private { GamepadImpl::GamepadImpl(Gamepad* gamepadDevice) ...
8dd6728f8e8f4eade97c6969b97e6cf2fc10927d
078570f749d1e8104d9fbf1d595f5eb4efaf8fca
thoughtworksarts/Dual_Brains
/drafts/quickSpectrogram_2/libraries/liblsl/external/lslboost/math/special_functions/detail/lgamma_small.hpp
C++
hpp
23,477
permissive
// (C) Copyright John Maddock 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.lslboost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_SPECIAL_FUNCTIONS_DETAIL_LGAMMA_SMALL #define BOOST_MATH_SPECIA...
3b38a22f43237974c1edcb0e46325dacf2ad3d27
6b5b2ad9752c2a5c2c35dd6138e13e2786965558
noolua/fast-dat-parser
/include/bitcoin-ops.hpp
C++
hpp
9,892
permissive
#pragma once // from https://github.com/bitcoin/bitcoin/blob/5961b23898ee7c0af2626c46d5d70e80136578d3/src/script/script.h#L48 // from https://github.com/bitcoin/bitcoin/blob/5961b23898ee7c0af2626c46d5d70e80136578d3/src/script/script.cpp #define OP_PUSHDATA_N(x) x enum OP { // push value OP_0 = 0x00,...
4661afefb6da29199b3316b4120f95fab5b2d06d
d23fcd30792aa7351b2058e0bcc4611253d8e241
chc1129/MeikaiCpp
/chap06/list0618.cpp
C++
cpp
480
no_license
// 2つの引数の値を交換する関数 #include <iostream> using namespace std; //--- 引数xとyの値を交換 ---// void swap(int& x, int& y) { int t = x; x = y; y = t; } int main() { int a, b; cout << "変数a: "; cin >> a; cout << "変数b: "; cin >> b; swap(a, b); // aとbを交換 cout << "変数aとbの値を交換しました.\n"; cout << "変数aの値は" << a ...
9fdd08123bdad665fcef29a7af37821e96a1d62b
c1acd2a3c6a2d04f782a5b6c9dfffbddaa128194
chichuenchang/simpleWaveDemo
/base_glfw/CompileShader.cpp
C++
cpp
330
no_license
#include "CompileShader.h" CompileShader::CompileShader() { } void CompileShader::reloadShader() { std::vector<GLuint> shaders; shaders.push_back(compileShader(GL_VERTEX_SHADER, "sh_v.glsl")); shaders.push_back(compileShader(GL_FRAGMENT_SHADER, "sh_f.glsl")); programId = linkProgram(shaders); shaderID = prog...
d018999c88482e6db232d7e60c09ea101c7edc2a
e4d29555853dac8572411b6d37bfd0afab82b170
atkins126/HexEditor
/samples/Hex-Editor (BCB6)/s6main.cpp
C++
cpp
4,147
no_license
//--------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "s6main.h" #include "uprinting.hpp" //--------------------------------------------------------------------- #pragma link "MPHexEditor" #pragma link "MPHexEditorEx" #pragma resource "*.dfm" TfmMain *fmMain;...
fcea7dfc45c2b350e944c1f906e943d293154aba
8063494744b4e7d8c47ba0476778356f9936b093
shangan/leetcode
/algorithms/GrayCode/TLE_solve.cpp
C++
cpp
1,172
permissive
#include <vector> #include <string> #include <iostream> #include <cstdio> #include <algorithm> #include <unordered_set> using namespace std; class Solution { public: vector<int> grayCode(int n) { vector<int> result; vector<int> cur; int N = 1; for (int i = 0; i < n; ++i) N <<= 1; dfs(result, cur, ...
45219766fc6af358d6906ee4041725abdcb3a723
524bc729cbcdfaa344b1d3a73311ad31e5271a77
lineCode/uwplib
/custom.cpp
C++
cpp
2,798
no_license
#include "cstdafx.h" #include "uwplib.hpp" #pragma comment(lib,"Comctl32.lib") using namespace std; wstring FromClip() { vector<wchar_t> tt(10000000); wstring r; if (!OpenClipboard(GetDesktopWindow())) return r; HANDLE hG = GetClipboardData(CF_UNICODETEXT); void*p = GlobalLock(hG); if (p) wcscpy_s(tt.data...
a8f6c40ef730457ffad824332f834dae3cf5ec7c
f9eb91cda6411d363a7becc827f5f28f7d2dde1b
SiverPineValley/algo
/brute/bitmask/12100.cpp
C++
cpp
5,959
permissive
// 2048 (EASY) // 백준's 코드 #include <iostream> #include <cassert> #include <vector> #include <string> using namespace std; int dx[] = {0,0,1,-1}; int dy[] = {1,-1,0,0}; const int LIMIT = 5; vector<int> gen(int k) { vector<int> a(LIMIT); for (int i=0; i<LIMIT; i++) { a[i] = (k&3); k >>= 2; ...
8854fbb8d26d99087d1d3332c0f36ad119ad98eb
5f5e5fb128cb8fe8eebf1c7dff5a405ddc443738
Brenn10/gvg
/robot_node/src/robotSim.cpp
C++
cpp
5,168
permissive
#include <ros/ros.h> #include <robot_node/RelRotate.h> #include <robot_node/Brake.h> #include <robot_node/RelTranslate.h> #include <robot_node/Follow_Wall.h> #include <nav_msgs/Odometry.h> #include <geometry_msgs/Twist.h> #include <geometry_msgs/Point.h> #include <iostream> #include <limits> #include <utility> #include...
bfbc95bcc88724732ff63ef00e3f9d02c6a31f22
b4d6715f2deaaf23ea7d2f89a0e28e8350a1842d
jcfr/BRAINSStandAlone
/BRAINSCut/FeatureCreators/HammerAttributesCreater/HammerAttributeCreator.cxx
C++
cxx
4,766
no_license
/******************************************************************************/ /* Changed from Version 1.0 */ /* 1. Subvolume matching is also added for subject driving voxels */ /* during correspondence detection. ...
3bce65ccc86a222729eb2859376c828198b5b96e
cce3a3e625b92810ea965da9619bfb0a08d70984
carlottac94/Multimedia-set-top-box
/cpp/multimedia.cpp
C++
cpp
532
no_license
#include "multimedia.h" using namespace std; Multimedia::Multimedia(string _name, string _pathname){name=_name; pathname=_pathname;} string Multimedia::getName() const{ return name; } string Multimedia::getPathname() const{ return pathname; } void Multimedia::setName(string _name){ name=_name; } void ...
e2e2d677877b1a21d87baba15676c8d2c9ae0598
09894eea98dfcd3f726b9d0e898bb98ab22bd1f9
czxxjtu/wxPython-1
/tags/wxPy-2.8.4.2/src/motif/mdi.cpp
C++
cpp
19,409
no_license
///////////////////////////////////////////////////////////////////////////// // Name: src/motif/mdi.cpp // Purpose: MDI classes // Author: Julian Smart // Modified by: // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence //////////////////////...
e7ef1c32f78d708e063192b4ee077dc97c2dcdab
e7d9abba978a76900691bf2c8fb4f8b400ac9eef
LiaoPengyu/algorithm
/CodingInterview/2.5.cpp
C++
cpp
445
no_license
#include <cstdio> using namespace std; struct Node { int data; Node* next; Node(int d) {data = d; next = NULL;} }; Node *FindBeginning(Node *head) { if(head==NULL) return NULL; Node *p1, *p2; p1 = p2 = head; while(p1 != p2 && p2) { p1 = p1->next; if(p2->next) p2 = p2->next->next; else break; ...
e75330ae484192813275c81a30525022630b3094
3126ea8e5f8974cb11f88301de613eb5b920830f
NVIDIA/tensorflow
/tensorflow/core/framework/memory_types_test.cc
C++
cc
3,676
permissive
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
cd4f676a97633fe7b021dd06b3c4dda822fc34fe
595acb7d1c18d37e8184ce52450c87325ab18d9a
Itsuki-Mekaru/DxLib
/source/Windows/DxModelWin.cpp
C++
cpp
7,276
no_license
//----------------------------------------------------------------------------- // // DXライブラリ WindowsOS用モデルデータ制御プログラム // // Ver 3.16d // //----------------------------------------------------------------------------- // DXライブラリ作成時用定義 #define __DX_MAKE #include "DxModelWin.h" #ifndef DX_NON_MODEL // インクルード -...
5e0f843abfb0bb6f0f4d7b2f85ee295824607fa9
9bdf0f334d2f8898768043006632b685664b6127
Vicfred/llvm-project
/llvm/lib/Analysis/VectorUtils.cpp
C++
cpp
46,845
permissive
//===----------- VectorUtils.cpp - Vectorizer utility functions -----------===// // // 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 // //===---------------------------...
e247bf56b69f8d19670190becd17c42317cbd175
21a829f96c859469b3086f13747277640989bc1f
HSKA-CuBa/CuBa_git
/2_1D_Modell/2_7_SW_Old___TBD/Eclipse_WS/LibraryProject/Basic/source/CControlComponent.cpp
C++
cpp
1,872
no_license
//12.9.16, Michael Meindl #include "CControlComponent.h" #include <iostream> #include <unistd.h> CControlComponent::CControlComponent(TQueue<Config::QueueSize>& rxQueue, TQueue<Config::QueueSize>& txQueue) : AComponentBase(rxQueue, txQueue, true) { } void CControlComponent::init() { std::cout <...
d00ad8cb2284382ddfa5b495b4b7691c51292445
f9aaa4263fc5fba003dd1117d036ad855689b693
GabrielCortizo/Competitive-Programming-3
/Problem Solving Paradigms/ Complete Search/Iterative (Fancy Techniques)/UVa11553 - Grid Game.cpp
C++
cpp
663
no_license
#include<bits/stdc++.h> #define rep(i,b,c) for(int i = (int)b;i<(int)c;i++)/* The idea insists in try all possible rearrangements using one row and one col, the row will be ruled by the for and the col by the change */ using namespace std; const int bil =1000000000; int matrix[8][8],change[8]; int main(){ int n,t,min...
fcf8348c8d69950be677261fe49ab971b601ec73
f5fc21cc6cfb053e29fc913832fa9c11c7011e20
r4k0nb4k0n/Programming-Challenges
/Baekjoon/10824.cpp
C++
cpp
379
permissive
#include <cstdio> #include <iostream> #include <string> using namespace std; //written by dj910401 int main(void) { unsigned long long num1, num2; string n1, n2, n3, n4; string result1, result2; string sum; cin >> n1 >> n2 >> n3 >> n4; result1 = n1 + n2; result2 = n3 + n4; num1 = stold(resul...
bacf05f642c0e703c8ae165e92032700a64c9496
31da9df876b1340813696eceb90605016252bb8f
mmmm1998/WebWatcher
/src/applicationlanguage.cpp
C++
cpp
1,851
no_license
#include "applicationlanguage.hpp" #include <QDir> #include <QDebug> bool LanguageDialog::isEqual(const QLocale& A, const QLocale& B) { return A.language() == B.language() && A.country() == B.country() && A.script() == B.script(); } LanguageDialog::LanguageDialog(const WebWatcherApplSettings& settings) { m_u...
315b4f9ef8c05585b0b48240262d6e32b848bf35
3a13ae44d7954c50a5903db663b84e3b53d95099
kmN666/Leroy
/src/server/game/Entities/Corpse/Corpse.cpp
C++
cpp
7,587
no_license
/* * Copyright (C) 2012 DeadCore <https://bitbucket.org/selectorcore/deadcore-private> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * 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 Founda...
0d8e1b7583ef87856ed7a141f20eb1f4eafd5fc6
b848eac6cb83a22bbf2c8c98e6c0532436115b2c
codingNonGuru/FlumenGame
/FlumenGame/Interface/NewWorldMenu.cpp
C++
cpp
4,128
no_license
#include "FlumenEngine/Animation/Animator.hpp" #include "FlumenEngine/Animation/Animation.hpp" #include "FlumenEngine/Animation/AnimationEvent.hpp" #include "FlumenCore/Delegate/Delegate.hpp" #include "FlumenEngine/Interface/Interface.hpp" #include "FlumenEngine/Interface/Text.hpp" #include "FlumenEngine/Core/SceneMana...
34c54a6238cf02415a12a8ab2a261f07f8a9e437
689cc4e3a04cdd9d7e513e27551a33f7e39c8fff
MatthewCech/Addle
/src/common/interfaces/services/iformatservice.hpp
C++
hpp
1,126
permissive
/** * Addle source code * @file * @copyright Copyright 2020 Eleanor Hawk * @copyright Modification and distribution permitted under the terms of the * MIT License. See "LICENSE" for full details. */ #ifndef IFORMATSERVICE_HPP #define IFORMATSERVICE_HPP #include <QObject> #include <QIODevice> #include <QString> ...
9935e40fee4a2bdb55c8fa9f89057499886b79b2
7b91ce6f0416497441189ff9114fc8036de5aa96
spjammy/OPS
/apps/CloverLeaf_3D/OpenACC/update_halo_kernel1_ba1_openacc_kernel.cpp
C++
cpp
13,020
no_license
// // auto-generated by ops.py // #include "./OpenACC/clover_leaf_common.h" #define OPS_GPU extern int xdim0_update_halo_kernel1_ba1; int xdim0_update_halo_kernel1_ba1_h = -1; extern int ydim0_update_halo_kernel1_ba1; int ydim0_update_halo_kernel1_ba1_h = -1; extern int xdim1_update_halo_kernel1_ba1; int xdim1_update...
20693a0ea79b595d2738230a95ba17dc2eaa68f5
07f57bc64d9cd433260bb441c1279cb1d8044118
ECLvisltion/GameEngineProgramming_CK2-2
/UnrealExample_ver4.22/Projects/Chapter15_4.21/Source/ArenaBattle/Private/ABGameplayWidget.cpp
C++
cpp
1,436
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "ABGameplayWidget.h" #include "Components/Button.h" #include "ABPlayerController.h" void UABGameplayWidget::NativeConstruct() { Super::NativeConstruct(); ResumeButton = Cast<UButton>(GetWidgetFromName(TEXT("btnResume"))); if (...
d5b86b2ae5173a67f457109fde5cfd834ca61eb1
5f1a146b3ea26662dc506d6c4ecb5b2242b3434e
y33988979/majiang
/res/麻将游戏/Mahjong/CmpThink.cpp
C++
cpp
9,070
no_license
// CmpThink.cpp: implementation of the CCmpThink class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "Mahjong.h" #include "CmpThink.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////...
0a535e39f9add5938f9314df3539d21fe7446bd4
b07250b043f0152d87b13f2ef4a995dbc8e07785
codenameone-akshat/anarchyengine
/Anarchy/Source/Framework/Math/Matrix4.hpp
C++
hpp
15,338
permissive
#ifndef _MATRIX_4_HPP_ #define _MATRIX_4_HPP_ #ifdef ANARCHY_MATH_ENABLE #ifndef FORCEINLINE #define FORCEINLINE __forceinline #endif // !FORCEINLINE #include <cassert> #ifndef NativeAssert #define NativeAssert(cond, message) assert(cond) #endif // !NativeAssert #include <Framework/SerializationHelpers.h> #include...
dbf5a1654d79bed9139d602249b3bb8d40b38fec
d54df5e333a520c983ecd6bc4ea449f3116562df
adriaan-niess/omnetpp
/src/sim/cnamedobject.cc
C++
cc
3,556
no_license
//========================================================================= // CNAMEDOBJECT.CC - part of // // OMNeT++/OMNEST // Discrete System Simulation in C++ // //========================================================================= /*-----------------------------------------------...
0f036495bf72b15a1caf6c9f4511baedac6f3b1e
95bbc1015bc7fb303943c39aaa33a1318083a9e2
Jonariguez/ACM_Code
/CodeForces/515C.cpp
C++
cpp
1,103
no_license
/**************** *PID:515c div2 *Auth:Jonariguez ***************** */ #include <stdio.h> #include <string.h> #include <math.h> #include <vector> #include <algorithm> using namespace std; typedef long long LL; const int maxn=100000+10; int vis[10]; int main() { int i,j,n; char num[20]; while(scanf("%d",&...
a62d2bce3b0c07b2c3cc454d47bd1da8fdbe2c7b
7d7edcf270418a44a51a53821013a1f9d8c8ec40
horaciogd/openFrameworksWorkshop
/particulas/src/ofApp.cpp
C++
cpp
1,361
no_license
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ sistema.setup(235); } //-------------------------------------------------------------- void ofApp::update(){ sistema.update(); } //-------------------------------------------------------------- void ofApp...
af0f5f62e118f14efcaf9193094063c9f9854dc0
8626a85bbbfffc49c1fa226f6126183f697c4067
clemencia/cmssw
/SimG4CMS/ShowerLibraryProducer/plugins/HcalForwardLibWriter.cc
C++
cc
5,401
permissive
#include "SimG4CMS/ShowerLibraryProducer/interface/HcalForwardLibWriter.h" #include "TFile.h" #include "TTree.h" HcalForwardLibWriter::HcalForwardLibWriter(const edm::ParameterSet& iConfig) { edm::ParameterSet theParms = iConfig.getParameter<edm::ParameterSet>("HcalForwardLibWriterParameters"); edm::FileInPath fp...
b8eef508ed7afbb6935fd055a5dbcb5fe108472e
9e81e3f0b83d9c6e2523422a05f7af7bdf02fae9
koslak/unreal_inventory
/Source/basic/DFLExamineActionMenuGameState.cpp
C++
cpp
4,633
no_license
#include "DFLExamineActionMenuGameState.h" #include "DFLCharacter.h" #include "Engine.h" #include "InputCoreTypes.h" #include "inventory/DFLInventoryWidget.h" #include "inventory/DFLInventoryItemWidget.h" #include "DFLUsableActor.h" #include "DFLGameStates.h" void UDFLExamineActionMenuGameState::Tick(float DeltaTime...
75f0e939cf0d59387670e15a0942edb73547eaa3
21f6fcb61cb3bad08a27cbdef9468b7ec6919896
jebreimo/Xyz
/misc/removed/Xyz/Geometry/_LineString-impl.hpp
C++
hpp
1,939
permissive
#include <cassert> #include <ostream> namespace JEBMath { template <typename T, unsigned N> size_t getSegmentCount(const std::vector<Vector<T, N>>& lineString) { return lineString.empty() ? 0 : lineString.size() - 1; } template <typename T, unsigned N> LineSegment<T, N> getSegment(const std::vector<Vector<T, N>>...
153727799b4749a487d00b91a0a651d2c574efa3
8a3fa181ca8844f46bb89b02a275f54f1f4d53d7
PenningsLab/BachelerProject_New
/Simulations/Code_and_shellscript/HIVevolution_HIV1site.cpp
C++
cpp
3,219
no_license
/*************************************************************************** * copyright Pleuni PENNINGS * * pennings@fas.harvard.edu * ***************************************************************************/ // System wide headers: #include <st...
c08d881e963cde6ff2c4eb6fe14d86b0eef86c59
fa1fcc0e804ff154881a03b0def28902c10fdeee
wcysai/CodeLibrary
/Codeforces/Edu/140/D.cpp
C++
cpp
1,004
no_license
#pragma GCC optimize(3) #include<bits/stdc++.h> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int,int> P; int n,k,a[MAXN]; string str; int main() { scanf("%d",&n); cin>>str; int s=1,l=1,r=1; for(...
bc2e6f4e6987e310ff3c27fad880dca7ef359aa9
5de47d6a6162dca025d1054438018775bbdc5162
possible-caterpillar/houpeilu
/十二题.cpp
C++
cpp
454
no_license
#include <stdio.h> while (n) int a = n%2; int b = n/2; c[i] = b n = b/2; i = i+1; } int main (void){ char c[0]; for(int i = 1;i <= c.length, i++){ printf(c[i]) } } 我只知道十进制变二进制,除以二取余数,得到的余数倒序排列,目前的思路只有这么多。 距离能够完成这些题目还有很长一段距离,可能真的是学习能力的问题,不过尽力了没遗憾。
744d1566cb6dc96227a9602fbf096dbd8d383c73
18f8ff49ea96dbda57be1257109f60e6845a0128
chromium/chromium
/third_party/blink/renderer/core/animation/length_list_property_functions.cc
C++
cc
9,480
permissive
// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/animation/length_list_property_functions.h" #include "third_party/blink/renderer/core/style/computed_style.h" namespace blink { nam...
eee31ce45bf1f9b188b0ce3fd9825b0627aa55eb
48307f649fd68a9999901c7158a86748b6374951
fatdai/D2DEngine_V2
/D2DEngine_V2/Data.cpp
C++
cpp
2,051
no_license
// // Data.cpp // D2DEngine // // Created by dai on 15/8/4. // Copyright (c) 2015年 dai. All rights reserved. // #include "Data.h" #include <cstdlib> #include <memory> namespace D2D { const Data Data::Null; Data::Data() : _bytes(nullptr), _size(0) { printf("In the empty const...
e9de5f0f871cd4b85c44b67cbc07dc1ae1d0b16f
1ef08bc72e5d9fb46c27c007686b7906572b6479
joyvotu/AlgoDs
/Binary Search/smallestMissingElement.cpp
C++
cpp
361
no_license
#include <bits/stdc++.h> typedef long long ll; using namespace std; int missingElement(int arr[], int l,int r){ while(l <= r){ int mid = l + (r-l)/2; if(arr[mid] == mid) l = mid+1; else r = mid-1; } return l; } int main(){ int arr[] = {0,1,2,3,4,6,7}; ...
08271ed7796cefab74a40da126997b51b2dae38f
be5dd4701ef336632b88ae72883129e6aa0da5a7
njustbyq/Algorithms
/LeetCode/404.左叶子之和.cpp
C++
cpp
1,104
no_license
/* * @lc app=leetcode.cn id=404 lang=cpp * * [404] 左叶子之和 */ /* * 树是递归定义的数据结构,首先考虑特殊情况,即叶子结点的表示: * 左,右叶子分别为空则为叶子结点,此时取出左边叶子结点的值。 * 然后递归调用函数取出每一棵子树的左叶子的值进行求和。 * */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * ...
90ffc1db5832cd5eeecb08a47512bce8695d562a
6613e8d5f039d07f52e4875b7bd5a0fcd7775c6e
Omar1123/ExamplesC-
/1.cpp
C++
cpp
253
no_license
#include <iostream> using namespace std; int main() { int a=0; int *puntero; puntero = &a; cout << "Ingrese el valor numerico: " << endl; cin >> a; cout << "La direccion de memoria es: " << puntero << endl; return 0; }