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
3a5959fdbd7482eef68745fff28461d9a358b7b9
c21f5d226e982da2bc1ae9fbe86ebacf6cff9278
gammasoft71/xtd_forms
/examples/dialogs/about_dialog_system/src/about_dialog_system.cpp
C++
cpp
3,054
permissive
#include <xtd/xtd.forms> #include "../resources/gammasoft_64x64.xpm" using namespace xtd; using namespace xtd::forms; class form1 : public form { public: form1() { text("About dialog system example"); controls().push_back(button1); button1.location({10, 10}); button1.text("About..."); button1.c...
dbfc8ef24e2ccfcc903b049916410bdd7e70d43b
f79880d559337150752598341391c19aeb0f35f8
khuatt/CorrelatedSubgraphMining
/CorrelatedSubgraphMining/utility.cpp
C++
cpp
8,413
no_license
#include "utility.h" #include <iterator> #include <strstream> #include <cstring> #include <string> #include <fstream> template <typename t,typename i> void token(const char* str, i iterator) { istrstream is (str, strlen(str)); std::copy(istream_iterator<t> (is), istream_iterator<t> (), iterator); } bool Utility::is...
ed14b9ff0c5ec82405a572216936d40d0cf8c524
cbe366668fbb6c0de242fed2154f43245d2a54d4
JohnnyJimJams/syntax
/src/utilities/Assert.cpp
C++
cpp
1,141
permissive
#include <utilities/Assert.h> #ifdef _DEBUG #include <windows.h> #include <string> bool syn::synAssert( const char* a_expression, const char* a_description, int a_line, const char* a_file, const char* a_function) { // convert the line number into a character char line[32]; sprintf(line, "%i", a_line); //short...
1e7e85741cad1a4c98275d82a1a8af2c94ffc4dc
b1ee0963c1e4bade4f4759e173eab9f545cbe620
kovdennik/TestEngine
/src/Engine/Renderer/Shaders/Effect.cpp
C++
cpp
221
permissive
#include "Effect.hpp" int CEffect::GetNumShaders() { return m_shaders.size(); } IEffect::ShaderInfo CEffect::GetShader(int i) { return m_shaders[i]; } IShader* CEffect::GetShader(const char* name) { return nullptr; }
6d45ed2bf564790c2298158ddd38606e41f273f6
663fff73eaa83cbc4f180f8a443899e203108ac2
cha63506/chromium-44
/media/filters/ffmpeg_glue.cc
C++
cc
4,867
permissive
// Copyright (c) 2010 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 "base/string_util.h" #include "media/base/filters.h" #include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/ffmpeg_glue.h" namespac...
1db2f6ce723b6aafa4da80d50e133c74e64ef5e9
d15ce93247cd7fd332c61487fe0a1a8ce63f503f
bleach86/tuxcoin-V2
/src/qt/askpassphrasedialog.cpp
C++
cpp
10,789
permissive
// Copyright (c) 2011-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include <config/bitcoin-config.h> #endif #include <qt/askpassphrasedialog.h> #include <qt/forms/...
8a9f378057c2a80aa0481f9f43ee07048c8a9f77
12229c97230c498675668d64620c1ee59c061640
smtth2018/SMTH
/univalue/test/unitester.cpp
C++
cpp
3,235
permissive
// Copyright 2014 BitPay Inc. // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <stdlib.h> #include <stdio.h> #include <string.h> #include <cassert> #include <string> #include "univalue.h" #ifndef JSON_TEST_SRC #erro...
33a706871fa0afedcf394fa612ab3dadd70dad02
5be62c1bd91f63f06de55db2e1bb3b20b0f3d76a
DragonJoker/Ashes
/source/ashes/renderer/D3D11Renderer/Enum/D3D11StencilOp.cpp
C++
cpp
824
permissive
#include "D3D11RendererPrerequisites.hpp" namespace ashes::d3d11 { D3D11_STENCIL_OP getStencilOp( VkStencilOp const & value ) { switch ( value ) { case VK_STENCIL_OP_KEEP: return D3D11_STENCIL_OP_KEEP; case VK_STENCIL_OP_ZERO: return D3D11_STENCIL_OP_ZERO; case VK_STENCIL_OP_REPLACE: return D3D1...
75596da0cd0604d8360ebcee1dc7024d50af4653
6d1242593eaf6e706253292829a717d45dd7e05b
atem11/ITMO_Labs
/8(DFS)/n.cpp
C++
cpp
1,196
no_license
#include <bits/stdc++.h> using namespace std; int g[1007][1007]; int use[1007]; int N, ans; void dfs(int v) { use[v] = 1; for (int i = 0; i < N; ++i) { if (g[v][i] <= ans && !use[i]) dfs(i); } } void rdfs(int v) { use[v] = 1; for (int i = 0; i < N; ++i) { if (g[i][v] <= ans && !u...
7139311853230ef3a093e660775dedaaca85a31a
e6eb95b09e48fda8189511fc2705ba12bb0dd3c0
Pandinosaurus/ITK
/Modules/Numerics/Optimizers/test/itkConjugateGradientOptimizerTest.cxx
C++
cxx
7,572
permissive
/*========================================================================= * * Copyright NumFOCUS * * 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.or...
d01052c74502b60c3461deab2452621d4953ae11
c4a7761510a652fdad0d8f6f227ad02b702715d5
crystax/android-vendor-sobjectizer
/dev/test/so_5/bench/parallel_send_to_same_mbox/main.cpp
C++
cpp
3,434
permissive
/* * A benchmark of parallel send from different agents to the same mbox. * * There is no a receiver for the messages. Benchmark shows only * the price of parallel access to the mbox. */ #include <iostream> #include <iterator> #include <numeric> #include <cstdlib> #include <so_5/all.hpp> #include <various_helpe...
431fa20d3b14ba66f7fda64319f33b8c5fc32864
8301282909c5aaf81d8528eda76d0556c645b772
gabrieltseng/datascience-projects
/general_programming/learncpp/Ch06/q3/main.cpp
C++
cpp
302
no_license
# include <iostream> void swap(int &x, int &y) { int temp = x; x = y; y = temp; } int main() { int x = 1; int y = 2; std::cout << "Before swap, x: " << x << ", y: " << y << std::endl; swap(x, y); std::cout << "After swap, x: " << x << ", y: " << y << std::endl; }
9841cb352c6916f4341865397ced70acca10695e
6493917138ef6c292c0f5f104872f7b59f2ea835
olyzakharova/BMSTU-InstagramClient
/include/instagram/client.hpp
C++
hpp
459
no_license
#include <map> #include <string> namespace Instagram { class InstagramClient { public: using dict_t = std::map<std::string, std::string>; InstagramClient() {}; InstagramClient(dict_t settings) : settings_(settings) {}; auto check_connection() -> bool; ...
d2ae70c092b50ae35c637d12f74b83af45d5a6e8
157a4150d7bdb9b269284fbf31f5ef78b4918d98
HEP-FCC/k4RecCalorimeter
/RecCalorimeter/src/components/NoiseCaloCellsFromFileTool.cpp
C++
cpp
8,820
no_license
#include "NoiseCaloCellsFromFileTool.h" // FCCSW #include "DetCommon/DetUtils.h" #include "k4Interface/IGeoSvc.h" // DD4hep #include "DD4hep/Detector.h" // Root #include "TFile.h" #include "TH1F.h" #include "TMath.h" DECLARE_COMPONENT(NoiseCaloCellsFromFileTool) NoiseCaloCellsFromFileTool::NoiseCaloCellsFromFileTo...
266f3beee7c943a9b2dfe5f108110b607af51302
6ececd8c63d69106bf46e9468407c614200870f4
yangyujiang/Trapit
/proj.win32/GamePlayController.cpp
C++
cpp
713
no_license
#include "GamePlayController.h" USING_NS_CC; GamePlayController::GamePlayController(void) { } GamePlayController::~GamePlayController(void) { } bool GamePlayController::init(){ bool pRet = false; do{ // 先调用超类的init方法 CC_BREAK_IF(! CCLayer::init()); view = GamePlayView::create(); this->...
644eb64ee1866985e9315a9403227c0bf3ac68c5
c12d8a68a631ca8b7da22382d8228a7b3380e0bc
plastcom/mazecoin
/src/walletdb.cpp
C++
cpp
24,457
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 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 "walletdb.h" #include "wallet.h" #include <boost/version.hpp> #include <b...
d0e8308f18e890125cdf4ba9460a3e8d15353658
2cc06a1ce5f1aaa6d81843bcb9c40c34d402d9c5
dennis903/Webserv
/libft/libft.cpp
C++
cpp
783
no_license
#include <iostream> #include <string> namespace ft { std::string getline(std::string &str1) { size_t idx; std::string line; idx = str1.find("\n"); if (idx != std::string::npos) { line = str1.substr(0, idx); str1 = str1.substr(idx + 1, str1.size()); } else { line = str1.substr(0, str1.size(...
082d6eb01bfe6ad96cf65f271cbb7bb22772f742
80c08c14edfb2a4762fc2439a96ed9c940a60a52
host1812/scx_plugin_public
/source/ext/common/pegasus/src/Pegasus/WQL/WQLQueryExpressionRep.cpp
C++
cpp
2,901
permissive
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor lice...
4437e29fbc4ef301fcbc7083f223aeb7a485087c
c2cf6e6d1bf0bd7b5ab75ce60f423d42becd6746
EdissonPeralta/herramientas_computacionales
/2020-06-05-MPI-3/integral-mpi-collective.cpp
C++
cpp
1,307
no_license
#include <cstdio> #include <cstdlib> #include <vector> #include <cmath> #include "mpi.h" int main(int argc, char **argv) { int pid, np; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &pid); MPI_Comm_size(MPI_COMM_WORLD, &np); int tamvector = 0; double sumatotal = 0; int p = 1; if (0 == pid) ...
409f998dc1713194687537a7954b844e946ede00
fc285d7ff8cecc18f2ff4990832325b3386d9cfa
Kartikei-12/OperatingSystem_Lab
/Lab-8_25-03-2019/2.cpp
C++
cpp
2,757
permissive
// @author: Kartikei Mittal // ID: 2017KUCP1032 // Implemented Priority based sheduling with preemption #include<iostream> using namespace std; class Process { public: int id, at, bt, ct, tat, wt, rt, priority; void operator=(const Process &temp) { id = temp.id ; priority = temp.prio...
f5b087e020eedf529f9b70dce0606dd0defe7218
556c070c2b59b427fe6def0e6efedd0f8d05e660
gruut/gruut-storage
/storage/db_lib.hpp
C++
hpp
1,025
no_license
#ifndef GRUUT_PUBLIC_MERGER_DB_LIB_HPP #define GRUUT_PUBLIC_MERGER_DB_LIB_HPP #include "../lib/json.hpp" #include "mysql/soci-mysql.h" #include "soci.h" #include <iostream> #include <stdio.h> #include <stdlib.h> #include <utility> using namespace std; namespace gruut { class mariaDb { private: soci::session m_db...
cf3497bec53f4f0ea272ff1535c79aaeedd338c0
03fd3abdfe1678c11d2cd05f5117fc6bda5d9171
xiang1374/OpenMaya
/src/mayaToLux/src/shaders/scatterMaterialOverride.cpp
C++
cpp
2,104
permissive
//- // =========================================================================== // Copyright 2012 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this softwa...
80e416cd4e2b78a6687cb858c247dea96d267ace
a434f86870add49018363d792e8a61b91e143e0a
yzliang/sgu
/114.cc
C++
cc
469
no_license
#include <algorithm> #include <iostream> using namespace std; int n, total; struct City { int x; int p; bool operator<(const City& that) const { return x < that.x; } } c[15000]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> c[i].x >> c[i].p; total += c[i].p; } sort(c, c + n...
8ef79fc62d70160c05d417b8db2012b6a56a004f
3c757f794b44ca1e6ca0071b18be89a654dc851d
zagoranov/timus
/longest_seq.cpp
C++
cpp
666
no_license
#include <vector> #include <iostream> int main() { std::vector<int> a = { 1,6,2,1,5,6,2 }; const size_t sz = a.size(); int max_cnt = 1; int max_i = 0; size_t i = 0, j = 0; do { int prev = i; int cnt = 1; for(j = i+1; j < sz; ++j) { if(a[prev] <= a[j]) { ...
c8072724e0891a4ef93dba1a18d1913ea7746997
75879e5d0b29b22db2f095d34d6e456dfb5b3e05
xfl03/DataStructCourseWork
/DataStructVisual_Tree/DataStructVisual_Tree/BiTreeDraw.cpp
C++
cpp
3,002
permissive
// BiTreeDraw.cpp : 实现文件 // #include "stdafx.h" #include "DataStructVisual_Tree.h" #include "BiTreeDraw.h" // CBiTreeDraw IMPLEMENT_DYNCREATE(CBiTreeDraw, CFormView) CBiTreeDraw::CBiTreeDraw() : CFormView(IDD_BITREE_DRAW) { } CBiTreeDraw::~CBiTreeDraw() { } void CBiTreeDraw::DoDataExchange(CDataExchange* pDX) ...
40a47edbb3cfe81b50ae9049de0303c7aa5b11f9
f0ea57566d5add19c9ff0a6b5f6629b5773fa118
MichaelHDesigns/Aezora
/src/masternode-sync.cpp
C++
cpp
15,068
permissive
// Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2019 The PIVX developers // Copyright (c) 2020 The AEZORA developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // clang-format off #include "main.h" ...
8fb48c151f192804b48e40617ef57e986fe24f73
32c59c07e5a0efdd5d5b92ba2424f01a3f7f65c8
Dragon31337/gpu_performance_api
/source/auto_generated/gpu_perf_api_counter_generator/public_counter_definitions_dx11_gfx8_baffin.cc
C++
cc
4,464
permissive
//============================================================================== // Copyright (c) 2010-2020 Advanced Micro Devices, Inc. All rights reserved. /// \author AMD Developer Tools Team /// \file /// \brief Public Counter Definitions for DX11 GFX8 _baffin //=====================================================...
de0531a185e7d1571566d766201504cdbbb0a683
e6bc705e4f8db0818668e66f9aa1d10c06139fd3
doctoroyy/algorithm
/nyoj/Sky number.cpp
C++
cpp
487
no_license
#include<stdio.h> //char ch[] = "0123456789ABCDEF"; // //char *conversion(int num, int ary) { // char str[5]; // int len = 0; // while (num) { // str[len++] = ch[num % ary]; // num /= ary; // } // return str; //} int digitsum(int num, int ary) { int sum = 0; while (num) { sum += num % ary; num /=...
49435d171c0249a93f73ac246b00b942de9a19d1
3e52e2742e83c045294fc8d7443f582497e31f1c
ccdxc/logSurvey
/data/crawl/git/old_hunk_659.cpp
C++
cpp
1,022
no_license
* Write an entry to the packed-refs file for the specified refname. * If peeled is non-NULL, write it as the entry's peeled value. */ static void write_packed_entry(FILE *fh, char *refname, unsigned char *sha1, unsigned char *peeled) { fprintf_or_die(fh, "%s %s\n", sha1_to_hex(sha1), refname); if (peeled...
e566f4f41c47ad9fa7425f5042c3346d068a0dcc
180a54f5e7a3a40a7f019d17078dec9f70b07bba
yuantailing/tsinsen
/problems/D6706/697076.60.cpp
C++
cpp
671
no_license
#include <cstdio> using namespace std; struct student { char name[24]; char sex[24]; int age; int grade; }; int main() { int n; scanf("%d", &n); student stu[1000]; for (int i = 0; i < n; i++) scanf("%s %s %d %d", stu[i].name, stu[i].sex, &stu[i].age, &stu[i].grade); for (in...
390810e670ea5de0e44a80a67cf077ea9b9a207d
88afda548820e0d01d62984a235a224d2e362ca5
hjh4638/C-11
/ST2_day4/1_변환.cpp
C++
cpp
1,135
no_license
// 1_변환 #include <iostream> using namespace std; // 변환 연산자 : 객체(Point) => 다른 타입(int) // 변환 생성자 : 다른 타입(int) => 객체(Point) class Point { int x, y; public: Point() :x(0), y(0){} Point(int a, int b) :x(a), y(b){} // 변환 생성자 : 인자가 한개인 생성자 // 다른 타입이 객체로 암시적 형변환되게 한다. Point(int a) :x(a), y(0){} ...
d370b75e1b091bb80fd75da87392c9beb598314a
5fabd0dd6e5ac8d06178e5c33979e634ec93f124
4me2fun/DesignPatterns
/Flyweight/include/Font.hpp
C++
hpp
207
no_license
#ifndef __FONT__ #define __FONT__ namespace font { class Font { public: explicit Font( const char *name ); virtual ~Font(); private: const char *m_name; }; } // namespace font #endif // __FONT__
8d316727c091c79925daac275883ff196718f2a8
f661c188c4815c7f7e5b5f6ebddc6d26eba61919
ygtars/geacoinold
/src/miner.cpp
C++
cpp
31,597
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2018 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-li...
cc4ad6d28da8919d195106c0073f0cf70fa82eff
c87a2a6331a373333e3cdbb5427aa81c8e574b8d
litao1009/SimpleRoom
/externals/OCCTLib/inc/Handle_StepShape_ShapeDimensionRepresentation.hxx
C++
hxx
914
no_license
// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Handle_StepShape_ShapeDimensionRepresentat...
2c2dbee1bbb19eb37739d2950a15ad93a0893009
95cdb0a226dfe6838d09f61f2c027f3b32e7fca6
choiyeonseong/StudyCpp
/객체지향/ch10/dynamic_cast.cpp
C++
cpp
1,002
no_license
/* RTTI (RunTime Type Information) : 실시간으로 타입 정보를 알아내는 기술 */ #include<stdio.h> class Parent { public: virtual void PrintMe() { printf("I am Parent\n"); } }; class Child :public Parent { private: int num; public: Child(int anum) :num(anum) {} virtual void PrintMe() { printf("I am Child\n"); } void PrintNum() { p...
3fe61b90bf58328f015516214c6103de332a664d
97803f1a476d578a7f5d1c5fd8cfa4cd3f977ea8
cbarange/my-learning-space
/OLD_my-learning-space/reactjs/tuto/CodeClinicCPP/Ex_Files_Code_Clinic_C_Plus_Plus/Exercise Files/CH01/solution/WeatherStatistics.hpp
C++
hpp
751
no_license
/** * WeatherStatistics.hpp by Olivia Stone for Code Clinic: C++ **/ #ifndef WEATHERSTATISTICS_H_ #define WEATHERSTATISTICS_H_ #include <iostream> #include <fstream> #include <sstream> #include <string> #include <map> #include <ctime> #define RESOURCE_PATH "../resources/" class WeatherStatistics { public: Wea...
5ef004b9420c4d3849abfeb6914babde91642223
0eb01f67313b69514d925cab19458fd3ebeeb646
SinghVikram97/Interview-Prep
/IMP Questions/A_20 Root To Leaf Paths.cpp
C++
cpp
1,893
no_license
https://practice.geeksforgeeks.org/problems/root-to-leaf-paths/1 https://drive.google.com/open?id=1IBHT9UiLTJbeaBfGLmmGRrrPJzVU4yEf Time Complexity--> Traversing the tree plus printing array equal to height of the tree at leaf node O(num_nodes+ num_leafs*height) void printPathsUtil(Node *root,vector<int> path){ ...
8108897c5fc264fe04b9fe18439a8a90fd6a4593
5b7e7bfd03eb16852e2505b5efa08e090aa88021
rccorliss/coresoftware
/offline/QA/modules/QAG4SimulationUpsilon.cc
C++
cc
13,028
no_license
#include "QAG4SimulationUpsilon.h" #include "QAHistManagerDef.h" #include <g4eval/SvtxEvalStack.h> #include <g4main/PHG4Particle.h> #include <g4main/PHG4TruthInfoContainer.h> #include <trackbase_historic/SvtxTrack.h> #include <g4eval/SvtxTrackEval.h> // for SvtxTrackEval #include <g4eval/SvtxTruthEval.h> // for ...
48fb443a83ccea0b69422f517c555b6464814267
82a5023b64fe17dd7261b23d9e8c0aa6fb8e4360
dimatteo/MitAna
/Utils/src/TClassDocOutput.cxx
C++
cxx
60,261
no_license
// @(#)root/html:$Id: TClassDocOutput.cxx 26715 2008-12-07 17:32:59Z axel $ // Author: Axel Naumann 2007-01-09 /************************************************************************* * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * All rights reserved. ...
a12690478315cf86829e84401ce20b45b3680701
734d2043b7482039f96c57bec4ddae359c2d218a
lschaefer/xAODAnaHelpers
/Root/PhotonCalibrator.cxx
C++
cxx
23,846
no_license
/******************************************************* * * Interface to CP Photon calibration tool(s). * * The tool applies: * * -) scale corrections for DATA * -) smearing corrections for MC * (data VS. MC check is done by the CP tool internally) * * M. Milesi (marco.milesi@cern.ch) * *******************...
53e7d54125db452ef8e61f1eb2a7a3294185cce1
78325f2ba3bdd650f25e3b8beae99fbb2bcfeb9f
jiangshen95/UbuntuLeetCode
/IntersectionofTwoArraysII.cpp
C++
cpp
876
no_license
#include<iostream> #include<vector> #include<unordered_map> #include<algorithm> using namespace std; class Solution { public: vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { unordered_map<int, int> m; for(int num : nums1) m[num]++; vector<int> result; for(i...
c71648e14ebd065868f8cec1a3c6e06358d83b1c
6c559de9fc406dbf3f0c00237b003e917a60901f
jianwel/ns3-dce-mptcp
/ns-3-dce/netlink/netlink-socket-factory.cc
C++
cc
1,483
no_license
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 Liu Jian * * 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 program is distribu...
cd75b0342c1747de93e81f405d0d3f05644df9a7
19b6167c2f2f7ce2cb8e3904d46df71a2e0b9cf2
tamathar/Code
/CS356/workers.cpp
C++
cpp
2,265
no_license
//Thomas Scroggins //Manual Multithreading Synchronization Attempt //This seems to produce almost perfect results //slightly slower than what is probably appropriate, but its midnight and I still have OOP HW //First attempt was a queue that queued threads for data access -WAY to slow, but perfect results //Second atte...
9d0247c0c8ee2c928692404866e68606050423c1
600601886857c13afb9b1b37aaf8942d0e995df3
JW-CHEN/leetcode
/PathSum2/main.cc
C++
cc
1,859
no_license
#include "../common/comm.h" class Solution { public: void reverseVector(vector<vector<int> > &res) { int sz = res.size(); for (int i = 0; i < sz; i++) { for (int j = 0; j < res[i].size()/2; j++) { swap(res[i][j], res[i][res[i].size()-1-j]); } } } ...
6ea47c9ea46bf2ac42eade5c7af2fe7e251aa32a
86c87d0831d5cdc870c99a17d357bd23bd8b02b8
gamer08/prog
/Brain POO/Source/Brain/Core/BrainCameraManager.cpp
C++
cpp
1,806
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Brain.h" #include "BrainCameraManager.h" #include "BrainGameInstance.h" ABrainCameraManager::ABrainCameraManager() { _minPitch = -89.0f; _maxPitch = 89.0f; _relativePosition = FVector(0.0f, 0.0f, 64.0f); _rotation = FRotator(...
22c761439068186104427fd5f7476baa5240611d
e2f864ddb0457f89e7b2da0cd3982b23a9a34722
Raptor-Ryu/kyoupuro
/Codeforces/575/B.cpp
C++
cpp
524
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int q,n,k,pos; long long tmp,count; vector<long long> data(200000); cin >> q; for(int i=0;i<q;i++){ cin >> n >> k; count = 0; pos = 0; for(int j=0; j<n; j++){ cin >> tmp; if(tmp % 2 == 1){ data.at(pos) = j+1; pos++; count++; ...
e6354ceed23454b0038687d6f9ba26cf69bf776c
607b1b4647f9d6cc9e41e0163c37fdf6550d601f
lunlun1992/LeetCode
/313. Super Ugly Number.cpp
C++
cpp
1,079
no_license
//题意:找到[2, 3, 5...]质数的所有乘积,然后取出其第n个。 //肯定是乘啦,怎么乘?全部乘在一起有可能漏。 //所以引入index[j]数组:第j个质数使用过的次数。每次取出相乘最小的值,然后判断这个最小值中的质因数有没有primes数组中的数,如果有,则对应index+1。这样primes数组中乘以res中对应位置的数是当前最小的。 //看做一个用许多质数凑乘积的过程。 class Solution { public: int nthSuperUglyNumber(int n, vector<int>& primes) { vector<int> idx(primes.size(), 0); ...
af18684f642dcf9b0571e0b0f09d22a004cab9ec
a30c0fd723422f415159da404d7c7c3766122e39
AayushTyagi1/CPP-COMPLETE
/pattern1.cpp
C++
cpp
272
no_license
/* 0 01 010 0101 01010 */ #include<iostream> using namespace std; int main() { int i,n; cout<<"Enter Limit:"; cin>>n; string a="0"; for(i=0;i<n;i++) { cout<<a; i%2==0?a.insert(i+1,"1"):a.insert(i+1,"0"); cout<<endl; } }
e6f8a3197ce71dfa7f6247c9e9e154519f11f5f4
9a24dbf16324dca8e2d826efaabad84c955f2a02
mushenghe/visual-pushing-grasping
/dockerfile/src/common/zeromq-4.1.0/src/dbuffer.hpp
C++
hpp
3,440
permissive
/* Copyright (c) 2007-2014 Contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or ...
4536372912b38c64a8a8a3de3baa7513d3cec6b8
3ea80e3c6cf444c2d5187d77254185acc72eab81
JACB920/chromium
/ui/events/keycodes/dom/keycode_converter_unittest.cc
C++
cc
9,974
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 "ui/events/keycodes/dom/keycode_converter.h" #include <stddef.h> #include <stdint.h> #include <map> #include <set> #include "base/stl_util.h" ...
ef24a441d4f8d9b342603b2557662bada472accf
dfdd626bf113abb8d1e725d6a743c12a27da641c
226526/PAMSI-1
/lab4/src/Tablica.cpp
C++
cpp
5,435
no_license
/* * Tablica.cpp * * Created on: 17 mar 2017 * Author: michal */ #include "Tablica.h" using namespace std; // Konstruktor Tablica::Tablica(int r) { TABLICA = new int[r]; ROZMIAR = r; WYPELNIENIE = 0; } //Destruktor Tablica::~Tablica() { delete[] TABLICA; } // Przypisanie wartosci do konkretnego miejsc...
d71cfbe8845682dba96422cc436e537d12dbfeb9
1e1a46e54a12c79d360cd625973ed7cee2bb860f
joshuanl/Nachos
/code/network/nettest.cc
C++
cc
39,726
permissive
// nettest.cc // Test out message delivery between two "Nachos" machines, // using the Post Office to coordinate delivery. // // Two caveats: // 1. Two copies of Nachos must be running, with machine ID's 0 and 1: // ./nachos -m 0 -o 1 & // ./nachos -m 1 -o 0 & // // 2. You need an implementation of condition var...
6d05480142db500d91f8e9ba4700b0233ef9a073
18f714498dbfe827c7aa785b046dc3c0c56f224e
boxysean/rainbowTracer
/LPD8806.cpp
C++
cpp
2,530
no_license
#include "LPD8806.h" //Example to control LPD8806-based RGB LED Strips // (c) Adafruit industries // MIT license /*****************************************************************************/ LPD8806::LPD8806(uint16_t n, uint8_t dpin, uint8_t cpin) { dataPin = dpin; clockPin = cpin; numLEDs = n; // malloc...
2309d390ed5743f2724c95015a56abd8c429c70a
a9af9c83cb3a00f8b4ed1d010d43017d9a0242bf
shigehito7110/cpp-tra
/chap3/exe/exe1.cpp
C++
cpp
402
no_license
#include <iostream> #include <vector> using namespace std; int main() { int N, v; cin >> N >> v; vector<int> a(N); for(int i = 0; i < N; i++) cin >> a[i]; // bool result = false; int id = -1; for(int i = 0; i < N; i++) { if(v == a[i]) { // result = true; id = i; } } // if(resul...
848b72ec96ab4e1ae63dd56fc9828eab1535b3ae
394dff7e86ed8b583a599975202930d799b5855d
rlj1202/problemsolving
/codeforces/1660/E/main.cpp
C++
cpp
865
no_license
#include <cstdio> using namespace std; char temp[2003]; int map[2003][2003]; int main() { int T; scanf("%d", &T); while (T--) { int N; scanf("%d", &N); for (int r = 0; r < N; r++) { scanf("%s", temp); for (int c = 0; c < N; c++) { map[r][c]...
868725326d2efedfbadc4a3fd33d5147c410e1c8
8498cc6c9967f1f3c245e2999f740e64d51b3716
proaholic/Win2K3
/NT/multimedia/directx/dxg/d3d8/fe/ddi.cpp
C++
cpp
156,906
no_license
#include "pch.cpp" #pragma hdrstop /*==========================================================================; * * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved. * * File: ddi.cpp * Content: Direct3D DDI encapsulation implementations * **********************************************...
166e8896c6c246bbe1bc5f2f1dcbe268c6f04813
b43e6f6c74dde46aa36d9c821bdb0a48096ce423
nuzumglobal/Elastos.Trinity.Alpha.Android
/src/content/browser/service_worker/service_worker_handle.cc
C++
cc
10,605
permissive
// Copyright 2014 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 "content/browser/service_worker/service_worker_handle.h" #include "content/browser/service_worker/service_worker_client_utils.h" #include "conte...
3317fef22b333e1d83d5479f2ebf94fd5ce126cd
9407f87de5e091b08a377569995f2ed0a7b3f748
killzdesu/cpp-archive
/fairphoto.cpp
C++
cpp
1,690
no_license
#define fi first #define se second #define REP(_x, _y) for(_x=0;_x<_y;_x++) #define REPI(_x, _y) for(_x=1;_x<=_y;_x++) #define ALL(x) (x).begin(),(x).end() #define compress(x) {sort(ALL(x));(x).resize(distance((x).begin(), unique(ALL(x))));} #define pb push_back #define mp make_pair #define EL printf("\n"); #include<bi...
56e88580ce00145ee54ba1b80ab5ace8e76f1d03
d1ad755737ac4987af21daa5546b1be0014803c1
hlyces/teamtalk_TT
/win-client/src/Modules/Session/UI/SearchLayout.cpp
C++
cpp
7,379
permissive
/******************************************************************************* * @file SearchLayout.cpp 2014\8\11 16:31:05 $ * @author 大佛<dafo@mogujie.com> * @brief ******************************************************************************/ #include "stdafx.h" #include "Modules/UI/SearchLayo...
aff63965b2713bce24f42d16b8530657127fb823
c65dc0c8a1b3a1cb39ce85b4e06feec43c7b04bd
manideep1821/pscp-lab
/lab/5/4.cpp
C++
cpp
850
no_license
#include<iostream> using namespace std; int main() { int n,temp,m,flag=-1; cout<<"enter the number : "; cin>>n; int arr[n]; cout<<"enter the marks : "<<endl; for(int i=0;i<n;i++) { cin>>arr[i]; } for(int i=0;i<n;i++) { for(int j=0;j<n-i-1;j++) ...
10a9fa9795fd18bfd0ffd839fec3118ac17ed7aa
3a11abad01c7ed652e9929e2bea352b6291e8bc7
xieyi4650/nowcoder-BAT-algorithm-practice
/9_permutation_combination/count_ways.cpp
C++
cpp
463
no_license
class Robot { public: int factorial(int n) { if(n == 0) return 1; return n*factorial(n-1); } int permutation(int i, int j) { return factorial(i) / factorial(i - j); } int combination(int i, int j) { return permutation(i, j) / factorial(j); } int...
61c31926b2515295f1ba68303e09c816a52c1c17
f7717614cc11d30b7190f9d66abd885fb62c5a90
KiyotakaYokoyama/Attraction2018prototype
/AttractionCypher/Solution/Cypher/ScenePlay.cpp
C++
cpp
12,548
no_license
#include "ScenePlay.h" #include "Area.h" #include "Board.h" #include "Drawer.h" #include "Image.h" #include "ImageTarget.h" #include "define.h" #include "MusicSync.h" #include "Panel.h" #include "TouchPanel.h" #include "Mouse.h" #include "Debug.h" const int MAX_RESULT_COUNT = 100;//ゲームオーバー画面へ遷移するまでの時間 const int MAX_MI...
a5135955ccedff951739f718ca6b33286830a90f
8aadbc29df36af73ffed0961e91d48ce439eef23
paradise-fi/divine
/divine/vm/setup.hpp
C++
hpp
2,328
no_license
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4 -*- /* * (c) 2016 Petr Ročkai <code@fixp.eu> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all cop...
5bb0a864476c3e57b13780768e0548ebf182706c
7eee05d756859a2c3d37c081ce18c0f07dac675b
Simillo/dredd
/lista 9/9.cpp
C++
cpp
1,087
no_license
#include <iostream> #include <fstream> using namespace std; int main() { char m[10][10]; fstream entrada("tropas.txt"); char wes,ini; entrada >> wes >> ini; int qntWes; entrada >> qntWes; for(int i=0;i<qntWes;i++){ int x,y; entrada >> x >> y; m[x][y]...
708938b901ed89fc6cce1f8575ec5ee5a0dc1d54
ce5b4009d63fcea98865d699c62415a7952cc2c9
tangbin90/Learning-Cplusplus
/textquery/textquery/Blob.cpp
C++
cpp
1,454
no_license
// // ex12_19.cpp // Exercise 12.19 // // Created by pezy on 12/26/14. // Copyright (c) 2014 pezy. All rights reserved. // // Define your own version of StrBlobPtr and // update your StrBlob class with the appropriate friend declaration and begin // and end members. // // @See ex12_19.h #include "stdafx.h" #...
ad1d5e1d40b1c3fb8d16c75ad217b78424611cb2
768de26db5606fcd13371523a6208b21cda59e3b
Piratkopia13/Sail
/Sail/src/Sail/states/State.cpp
C++
cpp
439
permissive
#include "pch.h" #include "State.h" #include "StateStack.h" #include "imgui.h" State::State(StateStack& stack) : m_stack(&stack) { } State::~State() { } bool State::renderImgui(float dt) { ImGui::ShowDemoWindow(); return false; } void State::requestStackPush(States::ID stateID) { m_stack->pushState(stateID);...
a4ef1030b2d732efd8c5f652c7dbade49f929ee6
8ccc7f5179cdca2fb7d43cd37c35a54a4462643a
puneetk/Punisher
/test/time.cxx
C++
cxx
1,251
no_license
#include "TcpSocket.hxx" #include "HostAddress.hxx" #include <stdio.h> #include <sys/time.h> #include <stdint.h> #include <string.h> #define __STDC_FORMAT_MACROS #include <inttypes.h> int main() { // time objects struct timeval start_time; struct timeval end_time; // create a host object Network::Host test_ho...
c500619ce5ddb4b16bfcf12d1533b4ec87ddc500
8b888597298487824d591322d6e9e80cd1f41449
lbnb/skia
/modules/skottie/src/text/TextAnimator.cpp
C++
cpp
7,939
permissive
/* * Copyright 2019 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "modules/skottie/src/text/TextAnimator.h" #include "include/core/SkColor.h" #include "include/core/SkPoint.h" #include "include/private/SkNx.h" #include "modules/sko...
919f13e7a8461a548a0b390c4a429664d5df8fb1
63c305ef2b2c744c81a3957b0f382393dc071d70
arjan-bal/competitive-coding-library
/cpp/Algebra/online fft recursive.cpp
C++
cpp
295
no_license
//add contributions of ans[l->mid] to ans[mid+1->r] void solve(int l, int r) { if(l==r) return ; int m=(l+r)/2; solve(l, m); int sz=r-l+1; vi a(ans+l, ans+m+1), b(numtree+1, numtree+sz+1); vi c=mult(a, b); for(int i=m+1; i<=r; ++i) add(ans[i], c[i-l-1]); solve(m+1, r); return ; }
dad8a0777ed4a8663f03e667628a5451f0262cc0
4be929eebd9aeb42a5c0f80690e64b0b374d5333
cholakova99/Tom-and-Jerry
/TreeFactory.cpp
C++
cpp
1,559
no_license
#include "TreeFactory.h" void TreeFactory::createTreeHelp(vector<char> instr, NodePoint* root, int index) { if (instr.size() > index&& index > 0) { root->kids.push_back(new NodePoint(instr[index])); if (index < instr.size()) { index++; createTreeHelp(instr, root->getKids()[0], index); } }...
551d345aca0b959f86432b5415234adcc0a130c6
7cbd8798269907b6786098f40af3d84c5feb5971
sihai571332/cs354-raytracing
/src/SceneObjects/trimesh.cpp
C++
cpp
5,848
no_license
#include <cmath> #include <float.h> #include <algorithm> #include <assert.h> #include <string.h> #include "trimesh.h" #include "../ui/TraceUI.h" extern TraceUI* traceUI; using namespace std; Trimesh::~Trimesh() { for( Materials::iterator i = materials.begin(); i != materials.end(); ++i ) delete *i; } // must add ...
827919ce283b7f403d9ce2c032b2bbdc4d8d49a1
4bdd4fa6e2159bc89b04cea484a642ffa3b4ce4b
akpopoola/Kratos
/applications/StructuralMechanicsApplication/custom_utilities/project_vector_on_surface_utility.cpp
C++
cpp
8,505
permissive
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Klaus Sautter // ...
e2a09a6ecfcf59dddee894206b6f80d96dfe74dc
291b14788b54280afec6cea4c21f7f18937ed85e
dmcdougall/vexcl
/examples/symbolic.cpp
C++
cpp
3,485
permissive
#include <iostream> #include <vector> #include <array> #include <functional> //#define VEXCL_SHOW_KERNELS #include <vexcl/vexcl.hpp> // http://headmyshoulder.github.com/odeint-v2 #include <boost/numeric/odeint.hpp> namespace odeint = boost::numeric::odeint; typedef double value_type; typedef vex::symbolic< value_ty...
3254f8a27f7d8e40df6b75ec340b346a601b67c6
4824f8d37834e9a9f6fa210865448583bd89a99b
Sabouh/M2GICAO
/S1/CurvRec/Projet/reconstruction/miniproj/iso_value.cpp
C++
cpp
14,089
no_license
///////////////////////////////////////////////////////////////////////////// // module de calcul de courbe / surface isovaleur ///////////////////////////////////////////////////////////////////////////// #include<cstdio> #include<vector> #include<map> #include"geom.h" #include"data_struct_algo.h" #include"iso_value....
ae04ee79f74f8c5c83bbfea68b9000fb920af66e
a4fc90b7c1acd573ca3bc6e8d10be64b59504ab9
Insineer/Hold-On
/Sources/States/State.hpp
C++
hpp
256
no_license
#pragma once class Game; namespace sf { class Event; class Time; } class State { protected: Game *game; public: State(); virtual void HandleEvent(sf::Event) = 0; virtual void Update(sf::Time) = 0; virtual void Draw() = 0; };
2075b9c9f26ae3d03ecd7ff82b0c5365fcefd4c7
99b71a829de7366682f4922e9850da92a7b47547
lum7na/ACM
/LUOGU/P3756_6408161.cpp
C++
cpp
4,625
no_license
// luogu-judger-enable-o2 #include <bits/stdc++.h> using namespace std; inline int read() { int f = 1; int x = 0; char ch = getchar(); while (ch < '0' || ch > '9') { f = (ch == '-') ? -1 : 1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getch...
30da4d4c6745a171579d0bbd65df0d9772a74450
c63df89b9b70d562162530574f51d3393f70a2db
liulin2012/myLeetcode
/CombinationSumII.cpp
C++
cpp
996
no_license
class Solution { public: vector<vector<int>> res; vector<vector<int>> combinationSum2(vector<int>& candidates, int target) { sort(candidates.begin(), candidates.end()); CSum(candidates, target, {}, 0); return res; } void CSum(vector<int>& candidates, int target, vector<int> vec, ...
c9c9e5a0edae2492f6e4369c9923d997d6fdf23c
b8ab75c61f8d43f318022501d4286dec6fa00826
ssm/pkg-gearmand
/tests/libgearman-1.0/task.cc
C++
cc
20,781
permissive
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * * Gearmand client and server library. * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the fo...
d2b923e53fc4ee4af1c8faa3294978a93243e45a
b4bfcd69df864a3c7cc9429cea9a39095593440a
8l/iridium-browser
/chrome/browser/io_thread.cc
C++
cc
41,390
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/io_thread.h" #include <utility> #include <vector> #include "base/base64.h" #include "base/bind.h" #include "base/bind_helpe...
6aee42a84256c54a885af096e0726e54d8cb9bf8
0e4721aa8f7e3d43ba480af88fd612ee3e35fa14
TheStormkeeper/golgotha
/i4/video/win32/win32.cc
C++
cc
7,918
no_license
/********************************************************************** <BR> This file is part of Crack dot Com's free source code release of Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for information about compiling & licensing issues visit this URL</a> <PRE> If that doesn't help, con...
2a292559598efec69b72f5c1d3bf21e664453fb4
5609c38af1746a5d8717d13e3056dd0c33df67ad
dalihub/dali-adaptor
/dali/internal/trace/generic/trace-factory-generic.cpp
C++
cpp
1,177
permissive
/* * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * 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...
fa7db89a2954d4b9dc6402b24393b9ab5196404b
8f0931e6fe29dcd33132997c5cd2c85958c0f0c5
nealwu/UVa
/temp/1662 - Brackets Removal.cpp
C++
cpp
3,374
no_license
#include <stdio.h> #include <string.h> #include <math.h> #include <algorithm> #include <queue> #include <stack> #include <assert.h> #include <set> #include <iostream> #include <sstream> #include <map> using namespace std; #define MAXN 1024 int isOperator(char c) { switch (c) { case '+': return 1; ca...
61fb463bc554cb81657b6c0504396de43b95cf39
03050ccdc13e4529e9afb571131f5daaf1d7739f
bill20509/leetcode-practice
/cpp/array/easy/1185. Day of the Week.cpp
C++
cpp
633
no_license
class Solution { public: bool leap(int year){ return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0; } string dayOfTheWeek(int day, int month, int year) { vector<string> week = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; vector<int> days = {...
966973df0c894b77b2a30ace0455a5c2cfd5a015
67537be5837ab65aa6f1f8830199d272480dadab
iamvickynguyen/Kattis-Solutions
/exammanipulation.cpp
C++
cpp
1,226
no_license
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vector<int>> vvi; typedef unordered_set<int> usi; typedef unordered_map<int, vi> ivi; typedef unordered_map<int, int> ii; #define all(x) (x).begin(), (x).end() #...
6f55c9039c326339080e402a724df7f921d187f0
7b7c351a24cc09f76d625796043277c0dbabc108
lmoalic/SApolygonization
/phase2/grid.cpp
C++
cpp
4,211
no_license
#include<math.h> #include<limits> #include<iostream> #include "grid.h" void grid::init(polygon& p, int nbNodePerCell) { clock_t startTime = clock (); poly=&p; p.determineBounds(); xMin = p.xMinMin.x; yMin = p.yMinMin.y; xMax = p.xMaxMin.x; yMax = p.yMaxMin.y; // calcul du PDM doub...
765066ba8dbaa5856745d627f5e01b1f0e46fd4c
c1f43b06716179c5556df2ecf4301f034409d5c8
rranjik/ideal-octo-barnacle
/1175-PrimeArrangements.cpp
C++
cpp
1,325
no_license
class Solution { public: int numPrimeArrangements(int n) { //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 vector<int> primes = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97}; //if n == 20 then we get 23 and its index, 8 ...
70b839f1968bef61efd233c06ac5084eb7158bdb
5fb6b5ba9f12f078a07e8ff3d68330f8b060e878
koobonil/Boss2D
/Boss2D/addon/webrtc-jumpingyang001_for_boss/p2p/base/p2pconstants.cc
C++
cc
3,475
permissive
/* * Copyright 2004 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
370987515a47a12960c4d2f0bef07c9116b46176
2d5f5fd2d40664eb5ab0f62880bece4be561250c
anstaf/arbsimd
/include/arbsimd/generic.hpp
C++
hpp
1,443
permissive
#pragma once #include <array> #include <cstring> #include <cmath> #include "implbase.hpp" namespace arbsimd { namespace detail { template <typename T, unsigned N> struct generic; template <typename T, unsigned N> struct simd_traits<generic<T, N>> { static constexpr unsigned width = N; using scalar_type = T...
1983b556f8e0466059f5ec87b43c81b1ec5993fa
e3e129e5b46da8e0b2a767c8b6c924bd6e5f8681
onuryildriim/sdk
/runtime/vm/compiler/compiler_state.cc
C++
cc
2,638
permissive
// Copyright (c) 2018, 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/compiler/compiler_state.h" #include <functional> #include "vm/compiler/backend/il_printe...
f4673512e97992f8249a66609b43e7b200de087b
1bb0ea05d83754f52b1285ff2c38a5661e333536
hackerlank/Test-3
/GameServer/src/QuestNew/QuestDaily.cpp
C++
cpp
19,653
no_license
/* * QuestDaily.cpp * * Created on: 2014年10月21日 * Author: root */ #include "QuestDaily.h" #include "../Object/Player/Player.h" #include "Quest.h" #include "MessageCommonRet.h" #include "QuestLoader.h" #include "Log/Logger.h" #include "../QuickMessage.h" #include <math.h> #include "../Attribute/AttributeCre...
2577c66096b8cd3b89cb4fb31dcd0256feef3ef2
d26fd19091390c2705c7ce594ff0c6e898133187
appEX2321/2SEM
/nasledovanie.cpp
C++
cpp
683
no_license
#include<iostream> #include<cstring> using namespace std; class Finger{ public: string typeFinger; }; class Arm: public Finger{ public: int kolvoArm; }; class Leg{ public: int kolvoLeg; }; class HUMAN: public Arm, public Leg{ public: int height; }; int main(){ setlocale(LC_ALL,"rus"); HUMA...
dfe8a30b7ef200a3080d8f6e30ead36617e74e8a
ab56a2938bb7dd26d5725971a8b5639ff5d1832c
cfs6/DSandAlgorithm
/jianzhiOffer/LeastNumbers.cpp
C++
cpp
1,516
no_license
//Get the smallest numbers in the array //Heap sort //Max Heap #include<vector> #include<iostream> std::vector<int> GetSmallestKNumbers(std::vector<int> array, int k) { std::vector<int> resHeap = BuildHeap(array, k-1); int arrayLength = array.size(); for (int i = k; i < arrayLength; ++i) { if (array[i...
b5b590aae4ee7c490b62ded10808f7d3a696c354
83b870d97ec5472cec3efea391b7df4a7044f028
nonathaj/EAE_Engineering_2
/Code/Engine/Core/Random.cpp
C++
cpp
1,380
no_license
#include "Random.h" #include <cstdlib> #include <cstdint> #include <type_traits> #include <random> #include <chrono> namespace { unsigned default_seed = static_cast<unsigned>(std::chrono::system_clock::now().time_since_epoch().count()); std::default_random_engine generator(default_seed); std::uniform_real_distrib...
a5cd86371ee31ca43dde79f080cbc8dad1655567
18e5c643e7cfadd29e380a1e922088b9c025d428
computerphilosopher/BOJ
/11403/11403.cpp11.cpp
C++
cpp
1,061
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; int n; vector < vector<bool> > adj; vector <bool> visited; void dfs(const int here, const int count) { if (count != 0) { visited[here] = true; } for (int i = 0; i < n; i++) { if (adj[here][i] && !visited[i]) {...
309302a4f2997e64e42c2c1d06ab474ac397f154
f135b42fedad5e7e9f5982ffef0415515e52e997
ufz/ogs
/MaterialLib/MPL/Properties/CreateAverageMolarMass.cpp
C++
cpp
1,001
permissive
/** * \file * \author Norbert Grunwald * \date Jul 07 2020 * * \copyright * Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/lic...
6a9f83b3f38f471d5c70e8bf4be2570f22eb2b20
6e00f6051a792d7dcb1e1524004039e86a0fd620
biddisco/hpxcl
/opencl/server/kernel.hpp
C++
hpp
2,169
permissive
// Copyright (c) 2013 Martin Stumpf // // 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) #pragma once #ifndef HPX_OPENCL_SERVER_KERNEL_HPP #define HPX_OPENCL_SERVER_KERNEL_HPP #include <hpx/hpx.hpp> #include <hp...
6668a0224681c31e0d3564e06f512d003b4a4c33
d4a96257f8b2c7b107c889056f56c0f1375bea68
tghyyhjuujki/ProblemSolving
/Programmers/키패드누르기.cpp
C++
cpp
1,543
no_license
#include <string> #include <vector> #include <algorithm> using namespace std; string solution(vector<int> numbers, string hand) { string answer = ""; int arr[4][3] = { 0, }, size = numbers.size(); pair<int, int> left = { 3,0 }, right = { 3,2 }; for (int i = 0; i < size; ++i) { if (numbers[i] == 1 || numbers[i] ...
44e39d3d67c51fd810342282fc5236eee03ebbed
885b9f2bc3f987335ce69e7fd969324cb79fc33c
Omar-Radwan/UVA_Solutions
/Volume 102/10298 - Power Strings/10298 - Power Strings.cpp
C++
cpp
3,256
no_license
#include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace __gnu_pbds; typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_nod...
7b27a3885ae9e0f9dee663a25d8bc2b17925f776
e833f21fdf40ce7149cb5bf865d49c748086775f
rockcdr/KITTI_SSD
/include/caffe/layers/neuron_layer.hpp
C++
hpp
889
permissive
#ifndef CAFFE_NEURON_LAYER_HPP_ #define CAFFE_NEURON_LAYER_HPP_ #include <vector> #include "caffe/blob.hpp" #include "caffe/layer.hpp" #include "caffe/proto/caffe.pb.h" namespace caffe9 { /** * @brief An interface for layers that take one blob as input (@f$ x @f$) * and produce one equally-sized blob as ou...
1c27f16b401ee85982b1780f167b0e2bd25cbb67
e44ea72e8fb53d8dea9d094c3567dd42f047c19a
AztecProtocol/barretenberg
/cpp/src/barretenberg/proof_system/plookup_tables/dummy.hpp
C++
hpp
3,730
permissive
#pragma once /** * @file dummy.hpp * @author Rumata888 * @brief This file contains functions for the dummy tables that we use in UltraHonk to make table, sorted and lookup * selector polynomials non-zero. * */ #include "types.hpp" namespace plookup { namespace dummy_tables { /** * @brief Lookup the value corr...