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
d1373635a455e8511ed36063da181c5bb1ba4fa2
4316653ebd5917ceb03d1049b0e3765066e306f7
ty-abbott/byu_cs
/cs235/Lab 9 - AVL Tree/AVL.cpp
C++
cpp
6,534
no_license
#include "AVL.h" #include <iostream> using namespace std; int size_of_tree = 0; // make empty tree Node* root = NULL; AVL::AVL(){ root = NULL; } AVL::~AVL(){ clear(); } //Please note that the class that implements this interface must be made //of objects which implement the NodeInterface /* * Returns the r...
b9c8f303d7e0ed0e5c446d57cda49f404c18ef62
4951cf1cc3c5d7b43cae764f4eb6618d491494ec
wwmmqq/algorithm
/leetcode/P011_Container_With_Most_Water.cc
C++
cc
1,675
no_license
#include <iostream> #include <vector> using std::cout; using std::cin; using std::endl; using std::vector; class Solution { public: // time out O(n^2) int maxArea_0(vector<int>& height) { int ans = 0; for (int i = 0; i < height.size(); ++i) { for(int j = i + 1; j < height.size(); ++j) { ...
78a2f13b795a7e39f3aa3b99fd64093a2804ba14
4efaa4507bfa6fd6d353db12485b8ba2b1c55ee9
zeekx/Data_Structures
/DSaAA/Ch4 Tree/SearchTree.cpp
C++
cpp
2,028
no_license
// // SearchTree.cpp // Ch4 Tree // // Created by zeek on 2019/4/6. // Copyright © 2019 Musca. All rights reserved. // #include <string.h> #include "SearchTree.hpp" #include "../DSaAA/ErrorHandle.hpp" SearchTree SearchTreeCreate(ElementType rootValue) { SearchTree root = (SearchTree)malloc(sizeof(TreeNode))...
92f45ea78136033112f4d3e2c9122dc1924b5662
b28b143486d1509aa5e34401f58487e6ca48ebed
maratsubkhankulov/graphics
/cav1/view.cc
C++
cc
18,721
no_license
#include <iostream> #include <fstream> #include <GL/glut.h> #include <map> #include <set> #include "view.h" GLdouble bodyWidth = 1.0; GLfloat angle = -150; /* in degrees */ GLfloat xloc = 0, yloc = 0, zloc = 0; int moving, begin; int newModel = 1; /* ARGSUSED3 */ void mouse(int button, int state, int x, int y) {...
642afcfda49efe1860f4ad344d08a9617427bc03
f17d9897e3bca85f0bdad34e8e52f3aee52e4df0
DavideCorradiDev/houzi-game-engine
/source/housys/src/hou/sys/keyboard.cpp
C++
cpp
999
permissive
// Houzi Game Engine // Copyright (c) 2018 Davide Corradi // Licensed under the MIT license. #include "hou/sys/keyboard.hpp" #include "hou/sys/window.hpp" namespace hou { namespace keyboard { bool has_screen_keyboard_support() { return SDL_HasScreenKeyboardSupport() == SDL_TRUE; } bool is_screen_keyboard_sh...
f8aee41eb260c343f70c9bd2f0a7ba156796f495
99126e8e93bf64ac4523cf4d0db3812856390b4f
xunzhang/paracel
/include/proxy.hpp
C++
hpp
2,473
permissive
/** * Copyright (c) 2014, Douban Inc. * All rights reserved. * * Distributed under the BSD License. Check out the LICENSE file for full text. * * Paracel - A distributed optimization framework with parameter server. * * Downloading * git clone https://github.com/douban/paracel.git * * Authors: Hong Wu ...
e84fa84434907147c53f2bed98e7ff5bac873d8d
bd4d9174fbf3a220d31eaddf9b05127a4168c7c9
Paul-Arts/cplus
/kap41Container_lst107-41allocator.cpp
C++
cpp
1,672
no_license
#include <set> #include <vector> #include <iostream> template<class T> class HappsAllocator { public: using value_type = T; T* allocate(size_t count) { size_t add = sizeof(T)*count; std::cout << "allocate("<<add<<"/"<<(buf_.size()-current_)<<")\n"; ...
ec395c35c208b1f9e52787928e768b42b365f867
20d56787cfb05a3f5b3b749db7b8721acdff712d
tianjiahe/bc_collect
/Protocol.cpp
C++
cpp
4,401
no_license
// Protocol.cpp: implementation of the CProtocol class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "collect.h" #include "Protocol.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction /////////////////////////...
b5cd40f654653c7a08edc4ff3adb3f846669c6db
784e26bd7213b12e9e5c585b39c9967d385a947f
mijanur-rahman-40/C-C-plus-plus-Online-Judge-Algorithms-Practise-Programming
/Best_Online Judge solution/Code force online judge/Lovely Palindromes.cpp
C++
cpp
661
no_license
/* #include<bits/stdc++.h> using namespace std; bool is_pal(int num) { string str,str1; str=to_string(num); str1=str; reverse(str.begin(),str.end()); if(str1==str && str.size()%2==0) { return true; } else { return false; } } int main() { int pos,k=0; cin...
a3c47ae68fdc60e9a7d13715d34e5681ea71586c
e4572aab5b092a07b63fc3997045bd1125db34fa
smeenai/llvm-project
/clang/lib/AST/DeclCXX.cpp
C++
cpp
137,753
permissive
//===- DeclCXX.cpp - C++ Declaration AST Node Implementation --------------===// // // 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 // //===---------------------------...
8ffa3b5b3fe0455e4f4a7eb61afc76b7607ff46b
aba5a409c7841c44003be71161d2feed01f357c2
AtulRajput01/Data-Structures-And-Algorithms-1
/c++/ncr.cpp
C++
cpp
343
permissive
#include <iostream> using namespace std; int factorial(int n){ int fact = n; while(n > 1){ fact = fact * (n-1); --n; } return fact; } int main(){ int n,r,ans; cout << "Please enter n, r:"; cin >> n >> r; ans = factorial(n)/(factorial(r)*factorial(n-r)); cout << ans << e...
e2474cb5705a915a0987440d020809840654f6e8
ae6ef0572b1280bda443310939ee45c7b6c9fd2d
jbernard-McMaster/PMIT
/PMIT/functions.cpp
C++
cpp
1,500
no_license
/** * @file functions.cpp * * @brief Class containing extra functions which are not available in the * default c++ libraries. * * @license * 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 ...
3131bb0cb8ccab7ba52cd1a5d5689346b750ee72
256816029a284eb99e28d3cd3a02dcbc9c37249d
ogass81/GrowBotDue
/GrowBotDue/ActionChain.cpp
C++
cpp
6,948
no_license
// // // #include "ActionChain.h" ActionChain::ActionChain(int count) { this->title = "Sequence "; this->title += String(count); reset(); } void ActionChain::changeAction1() { uint8_t action = actionPtr[0]; //Cycle through actions while (true) { if (action == ACTIONS_NUM) { action = 0; } else { ...
3145a809ec2a42a478811302dbcd70610347f130
e2e2d1acce811cc31c02f5dcf14aceef27f5cd70
PulockDas/Competitive-Programming-Algorithms
/common files/Chess Placing.cpp
C++
cpp
448
no_license
#include <bits/stdc++.h> using namespace std; int main () { int n; cin>>n; int l=n; n/=2; int arr[n]; for(int i=0; i<n; i++) cin>>arr[i]; sort(arr, arr+n); int wh=0,bl=0; for(int i=n-1,cell=l; i>=0; i--,cell-=2) wh+=abs(cell-arr[i]); for(int i=n-1,cell=l-1;...
ce2f68d04410f90452f2ebe7e23572c205a2c518
38727bfd664582f212036dc5b6dcf1cdcd5c73d8
mgudemann/cmsat
/cmsat.cpp
C++
cpp
3,670
permissive
#include <vector> #include <cstdlib> #include "cmsat.h" CMSolver * cmsat_init () { SATSolver *solver = new SATSolver (); std::vector<Lit> *assumptions = new std::vector<Lit>(); std::vector<Lit> *adds = new std::vector<Lit>(); std::vector<uint32_t> *xors = new std::vector<uint32_t>(); C...
8b0f4b0e8bfd5dafb00c17c31fb7b78c01351222
125725f07bdf885e7cd0db6c1beb1735a326f436
niterain/digsby
/digsby/ext/src/win/WinJumpList.cpp
C++
cpp
7,879
permissive
#include <comip.h> #include <shobjidl.h> #include <uxtheme.h> #include <propvarutil.h> #include <propkey.h> #include <wchar.h> #include <vector> using std::vector; #ifdef __GNUC__ #include <ext/hash_map> #else #include <hash_map> #endif using stdext::hash_map; #include <wx/wx.h> #include <wx/stdpaths.h> typedef ha...
3012d798566aff06c41aa3e430009976aaf677d7
ae37ec0839d59c6ae6405b191d068dbad3bac865
petersont/o3d
/googleclient/third_party/skia/files/src/core/SkChunkAlloc.cpp
C++
cpp
2,948
no_license
/* libs/corecg/SkChunkAlloc.cpp ** ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2...
79974117416a2139acb20adebed753fe03904e1c
326cb21e2d78d797eee51d8a1c967e8411d76f2e
ruixiao491/cmssw
/Geometry/CaloTopology/src/HcalTopology.cc
C++
cc
46,871
permissive
#include "Geometry/CaloTopology/interface/HcalTopology.h" #include <cmath> #include <iostream> #include <cassert> #include <algorithm> #include "FWCore/Utilities/interface/Exception.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "DataFormats/HcalDetId/interface/HcalDetId.h" #include "DataFormats/...
f0fd5e548e215ffb92969c552867c26b1150cee7
1236dc7e0be06fcc498e500f87eb5a3e5c4dc0db
eschnett/libelektra
/src/bindings/cpp/tests/testcpp_key.cpp
C++
cpp
27,818
permissive
/** * @file * * @brief * * @copyright BSD License (see doc/COPYING or http://www.libelektra.org) */ #include <tests.hpp> #include <memory> #include <stdexcept> #include <string> #include <vector> TEST (key, null) { Key key0 (static_cast<ckdb::Key *> (nullptr)); succeed_if (!key0, "key should evaluate to fals...
d3e4ea6e9bb3e6a8bcf074baa1923959d020702c
66327496664269f9a1a770107e77de28eb96d621
asdlei99/GTGameEngine
/source/Physics/ConeTwistConstraint.cpp
C++
cpp
2,516
permissive
// Copyright (C) 2011 - 2014 David Reid. See included LICENCE. #include <GTGE/Physics/ConeTwistConstraint.hpp> #include <GTGE/Physics/DynamicsWorld.hpp> #include <GTGE/Physics.hpp> namespace GT { ConeTwistConstraint::ConeTwistConstraint(RigidBody &bodyA, RigidBody &bodyB, const glm::mat4 &frameA, const glm::mat4 ...
90390291beb59ee76a2c0653bd9738398c88d4d5
b8a0b7fdf3be99e07887ddddf26981a3f8f1d3b0
aron98/sudoku-beadando
/library/Widget.hpp
C++
hpp
670
no_license
#ifndef WIDGET_HPP_INCLUDED #define WIDGET_HPP_INCLUDED #include "graphics.hpp" #include "global.hpp" #include "GUI.hpp" class GUI; class Widget{ protected: Coord position; int width, height; bool focus,focusable,mouseOver; genv::color backgroundColor=genv::color(0,0,0); genv::color borderColor=g...
7600e2253270c62e37b99d74d1d32cc30bc5c23e
b99c14ff73818c09679cf17b911645372658228f
SINTEFMedtek/FAST
/source/FAST/Data/Color.hpp
C++
hpp
2,139
permissive
#pragma once #include "FAST/Data/DataTypes.hpp" #include <cctype> // std::tolower namespace fast { class FAST_EXPORT Color { private: Vector3f mColorVector; public: Color() : mColorVector(Vector3f(0, 0, 0)) {}; Color(float red, float green, float blue) : mColorVector(Vector3f(red, g...
523f4970d2049199fdfed39f1b6f2dbe0103cc8f
3aa5bec8368b54c86954f49e6728b9f795fc579b
uenoyama-dominosoft/node-api
/src/PartitionController.cpp
C++
cpp
5,948
permissive
/* Copyright (c) 2020 TOSHIBA Digital Solutions Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required ...
71228d44edff547659d1533c4ae4bb0e644a5289
416947479ec941e8998c64ca8da18445256f832e
USC-PRL/ReMod3D
/Source/ReBots/CustomActors/FloorCollisionActor.cpp
C++
cpp
2,745
no_license
#include "FloorCollisionActor.h" #include "GameModes/ReBotsSimulatorGameMode.h" /** * @brief begin collision overlap * @param OtherActor the other actor involved in the collision * @param OtherComp the other component involved in the collision * @param OtherBodyIndex index of the other body * @param bFromSweep o...
9b3c493609ae2e2922cae43c6436bb604f1bca74
615097af1705d34ec7df03441fee805c1aca217e
hossamasaad/Problem-Solving
/UVA/11428 - Cubes.cpp
C++
cpp
578
no_license
#include <bits/stdc++.h> #define ll long long #define DEBUG(x) cout << '>' << #x << ':' << x << endl; #define REP(i,n) for(int i=0;i<(n);i++) #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define FORD(i,a,b) for(int i=(a);i>=(b);i--) using namespace std; int main() { int n,x; bool state; cin >> n; while(n) { ...
ff40078bf7cd9dbc2da35b2d3c3ae3afb1e49747
d0926e1c60dc075143cfc611bb51387c8127ada0
zengqh/Unique
/Source/UniqueBase/Resource/Guid.cpp
C++
cpp
5,052
no_license
#include "Precompiled.h" #include "guid.h" #if UNIQUE_IOS #include <CoreFoundation/CFUUID.h> #endif #if UNIQUE_WINDOWS #include <ObjBase.h> #endif #if UNIQUE_XENON #include <comdecl.h> #include <time.h> #endif using namespace std; #if UNIQUE_ANDROID #include <fcntl.h> #include <unistd.h> #elif UNIQUE_LINUX #inclu...
c6f10069db65be106fe54f4c1cbf4a7d5ae618b1
eefbc1e18ebcdfa71bcfab881dfba3d0ac4cb9ed
shjinyuan/Bean_notes
/multi-process/mutex_method_2/test.cpp
C++
cpp
1,724
no_license
/* * Filename: test.cpp * * Copyright (C) 2018-2023 yuan <yuan@company.com>. All Rights Reserved. * * History: * 2020/12/15 - [yuan] Created file * * Maintainer: yuan <yuan@email.com> * Created: 2020-12-15 * LastChange: 2020-12-15 * Version: v0.0.01 * */ #include <stdio.h> #include <unistd.h> #in...
6dafa4907631bcad1f07e2441a4c228c0611988b
5677ad90a228601177bef99bacb78f67b442cf29
syo0e/Algorithm
/cpp/baekjoon/11718 그대로출력하기/11718 그대로 출력하기.cpp
C++
cpp
211
no_license
#include <stdio.h> int main() { char a; //ÁÖ¼®Àº 11721¹ø //int i = 0; while (scanf("%c", &a) != -1) { printf("%c", a); /* i++; if (i == 10) { i = 0; printf("\n"); }*/ } return 0; }
f510a25f21def36c8f5bd049c5fa2affecf6355c
473331ac7f5c79cc01c8f8476e40404d5586b3d4
mattleibow/skia
/fuzz/oss_fuzz/FuzzImage.cpp
C++
cpp
1,104
permissive
/* * Copyright 2018 Google, LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "include/core/SkCanvas.h" #include "include/core/SkData.h" #include "include/core/SkImage.h" #include "include/core/SkPaint.h" #include "include/core/SkSurface.h" bo...
ffa426d73b32587267cdcd43a5a2524d594c6613
3992ba5c199066976ca5a9665ce946422e31db8d
nixoncoindev/nixon
/src/qt/intro.cpp
C++
cpp
8,814
permissive
// Copyright (c) 2011-2014 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 "intro.h" #include "ui_intro.h" #include "guiutil.h" #include "util.h" #include <boost/filesystem.hpp> #include ...
2f992ae51b87fa7c7ea88ae40f739127cc18b4c9
5f59071251fdfe390985141fc575d650f2e52630
NHERI-SimCenter/SimCenterCommon
/InputSheetBM/SteelTubeSectionInputWidget.cpp
C++
cpp
10,615
permissive
/* ***************************************************************************** Copyright (c) 2016-2017, The Regents of the University of California (Regents). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ar...
354e17b5f47402354f88f7afce622fb76d715e63
6b9cc661c8e58b54089ab33eb856e211e857a83b
novaquark/aws-sdk-cpp
/aws-cpp-sdk-robomaker/source/model/SimulationApplicationSummary.cpp
C++
cpp
3,202
permissive
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
b89b5ba67f7172906b1539c5bf38e9404a5c06c5
bcc73dcf4238f7f7f7a0063937a400a52e75e007
DolotovEvgeniy/ml-lib
/test/test_linear_algebra.cpp
C++
cpp
1,350
no_license
// Copyright 2016 Dolotov Evgeniy #include <gtest/gtest.h> #include "ml/linear_algebra.h" #include <vector> #include <iostream> using std::vector; TEST(ML_LINEAR_ALGEBRA, Can_Create_Matrix) { // Arrange int cols = 1; int rows = 2; // Act Matrix mat(cols, rows); // Assert EXPECT_EQ(cols...
e30f3a71344f5a654636186a444c291a1994c4b4
21fd6d59c90a8160250f8358765bb1569c9ffc55
NanlinW/NanlinCode
/exercise_20201025/test.cpp
C++
cpp
2,352
no_license
//已知一个顺序表A,其中的元素按值递减有序排列, //编写一个函数插入一个元素X后保持该顺序表仍按递减排列 #include<stdio.h> #include<stdlib.h> #define LIST_INIT_SIZE 100 #define LISTINCREMENT 10 #define OK 1 typedef int ElemType; typedef int Status; #define OVERFLOW -2 #pragma warning(disable:4996) typedef struct { ElemType* elem; int length; int...
6db09249341c79a10ec7437823d1291578d8e789
4158f6e3655a1b15eeea3ea6a828d456c1ee74f8
TencentCloud/tencentcloud-sdk-cpp
/eb/src/v20210416/model/ESTargetParams.cpp
C++
cpp
7,539
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
8bab92f840848f8fb13da5a2520f5b521ccf5e13
174854a7bad19327a05557711ca60c77e13ca06e
jlfos/HalloweenTownRL
/HalloweenTownRL/src/RandomWrapper.cpp
C++
cpp
1,643
no_license
/* * RandomWrapper.cpp * * Created on: Sep 6, 2015 */ #include "RandomWrapper.hpp" #include <mersenne.hpp> #include <initializer_list> #include "LoggerWrapper.hpp" #ifndef RW_LOGGER //#define RW_LOGGER #endif RandomWrapper::RandomWrapper() { rng = std::unique_ptr<TCODRandom>(TCODRandom::getInstance()); ...
137210352b85b264873bc38ca2482cd016760bb5
1434e350fdc9f997ecb86b20302331f42b94287c
Mendoa7/my_assignments
/Mendoza_Anthony_A1.cpp
C++
cpp
388
no_license
#include <iostream> using namespace std; int main() { cout << "*******************************" << endl; cout << "* Programming Assignment 1 *" << endl; cout << "* Computer Science I *" << endl; cout << "* Author : Anthony Mendoza *" << endl; cout << "* Due Date : 02/06/2019 *" << endl; ...
d939d9b0414520978510428cf7e38421ed054829
007ccb42a37a54e44c7997b3d1a0bf15ce6f7f0e
rjking58/development
/cpp/goof/goofDoc.cpp
C++
cpp
1,616
no_license
// goofDoc.cpp : implementation of the CGoofDoc class // #include "stdafx.h" #include "goof.h" #include "goofDoc.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CGoofDoc IMPLEMENT_DYN...
828e5a39e912aca720f1e80b4a62dcc17fb6b7ef
f42e65c51ba033d2c45d909c4375f9dff4a988e2
uncleDecart/viruses
/main.cpp
C++
cpp
732
no_license
#include <iostream> #include <cstdint> #include <vector> #include "game_session.h" #include "my_virus.h" int main(int argc, char** argv) { int epoches = -1; if (argc > 1) { epoches = atoi(argv[1]); } // Создаём здесь свой вирус auto v = new MyVirus(1); // Создаём игровое поле GameSession gs(10,10); // Д...
b213608701d0e5c5e882de8f83bd2d99df8c0af8
f7306f1d6607a40f0084bfbaba00a1547bd6bbde
medimonitorsview/recorder-app
/Application/src/main/cpp/ImageEnhanceTest.cpp
C++
cpp
4,368
permissive
#include "ImageEnhance.h" #include <iostream> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <string> #include <unordered_map> #include <filesystem> #include <opencv2/opencv.hpp> #include <rapidjson/document.h> #include <opencv2/core/utils/filesystem.hpp> using na...
181f9859b5860faedef3e786513a9db74bedea3c
f40e67ff1cc50f04e52b06bb8093ad8eeb7d7325
cheind/mesh-deform
/examples/deform_example.cpp
C++
cpp
1,973
no_license
/** This file is part of mesh-deform. Copyright(C) 2016 Christoph Heindl All rights reserved. This software may be modified and distributed under the terms of the BSD license.See the LICENSE file for details. */ #include <deform/arap.h> #include <deform/cotan_matrix.h> #include <iostream> int main(int argc...
3aab07696939d01c1942854d41aecd3261e21855
4a42725ab03d4c0a3395566ab4cc03b9f95c60d8
kArTeL/Raytracer
/WhittedRaytracer/Objects/Sphere.cpp
C++
cpp
2,212
no_license
// // Sphere.cpp // WhittedRaytracer // // Created by Neil García Vargas on 9/19/15. // Copyright © 2015 Neil García Vargas. All rights reserved. // #include "Sphere.h" Sphere::~Sphere() { } bool Sphere::solveQuadratic(float A, float B, float C, float& t0, float& t1) { float d = B*B - 4.0f*A*C; if (...
e54c8fa0942e3db99b68a730fad5dd83e1fe29a8
ebcc45a3f17ca0d83329659ca30f21a97bb6bba1
anglevenus/learning1
/FileTest/FileTest.cpp
C++
cpp
5,733
no_license
// FileTest.cpp : 定义控制台应用程序的入口点。 // #include <stdio.h> #include <iostream> #include <time.h> #include <string> #include <vector> #include <windows.h> #include <io.h> #include <map> #include "md5.h" #include "FileTest.h" #include "PreGenerate.h" extern "C" { #include "xxhash/xxhash.h" #include "lz4io.h" /* L...
80be4f54cae1bbbbdbd2f687f0709bc47797f2ca
bf7ea94f316aebeab3f4d37c1970f52d7021121e
UtsavChokshiCNU/GenSym-Test2
/src/xtp/Source/DockingPane/XTPDockingPaneManager.cpp
C++
cpp
43,276
no_license
// XTPDockingPaneManager.cpp : implementation of the CXTPDockingPaneManager class. // // This file is a part of the XTREME DOCKINGPANE MFC class library. // (c)1998-2011 Codejock Software, All Rights Reserved. // // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE // RE-DISTRIBUTED BY ANY ME...
1b4118736208806eec1a92f8c6abef5aa8857eb5
65bfa5765b02e4f95ddcc6c063cff7c0929e116e
BartWeyder/cpp-practice
/ID3Tests/ID3Test.cpp
C++
cpp
4,358
no_license
/// @file ID3Test.cpp /// @author yevhenii@cqg.com /// @brief ID3 algorithm utils declaration. #include "stdafx.h" #include "CppUnitTest.h" #include "ID3Node.h" #include "ID3Utils.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace { /// @brief Returns tree from example /// @see http...
628075555a92718b4fdf8da6c6de47e63aab7d91
42e4334970b036c7bd17e81869293774205e985d
galeone/tensorflow
/tensorflow/lite/experimental/acceleration/compatibility/gpu_compatibility_test.cc
C++
cc
3,858
permissive
/* Copyright 2020 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...
6e4ba98cd539b67c72ed9cc90cd38dfeec3a8dc7
9bfa63aefb149e8062033fed78bd5e4196cfad27
sebhd/spaceroads
/src/Renderer/OGRERenderer/OgreRenderer.cpp
C++
cpp
19,686
no_license
/* * OgreApplication.cpp * * Created on: 24.04.2012 * Author: sebastian */ // TODO 1: Fix wrong camera orientation after reset when gravity vector was changed during previous run // TODO 4: Implement "classic" camera that doesn't translate left/right ... // with the vehicle but stays in the centerline of th...
b1ecff9d347f3e88915d01f1340973b733cea978
0e45fe665b5dea1d2f9c0b7aa547b649d7607c5f
Chunde/kaldi
/src/rnnlm/rnnlm-embedding-training.cc
C++
cc
7,278
permissive
// rnnlm/rnnlm-embedding-training.cc // Copyright 2017 Daniel Povey // See ../../COPYING for clarification regarding multiple authors // // 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 //...
c3e24456dfef209ae51a0309dfdadd9e0f047545
e5098a4d3fa1b3912c35e2177f55206a98249852
blockspacer/cobalt-clone-cab7770533804d582eaa66c713a1582f361182d3
/src/cobalt/csp/source_list.cc
C++
cc
17,476
permissive
// Copyright 2015 The Cobalt 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 ap...
acb2269b1dffe444cbd0e879164d726e76fc6ac4
44de237e6e727b36c972159e0c2f2ef0aa6eee10
updateov/MyTestProjects
/From Sophia/Patterns/Patterns Application/base64.cpp
C++
cpp
2,851
no_license
#include "stdafx.h" #include "base64.h" using namespace patterns; static const string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static inline bool is_base64(unsigned char c) {return (isalnum(c) || (c == '+') || (c == '/'));} std::string base64::base64_encode(std::string const...
a3709a3132945e3dca72c21e2bc73f15d7cb339f
fa4d395722d218167e75b3d2e58ef22c5bd41cb5
Gabrielgca/Cardboard-with-ExoPlayer
/hellocardboard-android/src/main/jni/hello_cardboard_jni.cc
C++
cc
2,558
permissive
/* * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
68e70d6fc4a70b6a0e0b819165696550ad55691b
67081a87fa0469f7b40b141a3ae608221c5845f5
Anubhav8176/Cpp-language
/tut60.cpp
C++
cpp
448
no_license
#include <fstream> #include <iostream> using namespace std; int main() { string st = "My name is Anubhav Singh and I love my family."; ofstream out("sample60.txt"); out << st; string st2; ifstream in("sample60b.txt"); //in >> st2;// st2 mie saare text bula rhe hai hum file se. leki...
f46b0baf1128d2194143bd4385db52115c427fff
9c2c75781316b833cd7babc3b5c26c739149003f
opensource-assist/fuschia
/src/media/codec/examples/use_media_decoder/test/use_h264_decoder_secure_output_test.cc
C++
cc
1,291
permissive
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // If this test breaks and it's not immediately obvoius why, please feel free to // involve dustingreen@ (me) in figuring it out. #include <lib/async-loop...
f97fb3a6f9e4564f18cffa527ce11c9a33e3d125
d94ce10e149331828c8f61aece15554c08dd4f89
Belial2010/TIPL
/utility/pixel_value.hpp
C++
hpp
6,154
permissive
#ifndef PIXEL_VALUE_HPP #define PIXEL_VALUE_HPP #include <cmath> namespace tipl { struct rgb { union { unsigned int color; struct { unsigned char b; unsigned char g; unsigned char r; unsigned char a; }; unsigned char data[4]; }...
ae0ebf6bdc0177068d8d3e0e740d22982125bb9f
b4f1d7fc7e6b88862779a5bcd5d88e44e626e4f2
Megaclick/elo-328
/c1/proc_basico/iteracion_sobre_vide.cpp
C++
cpp
1,791
no_license
#include <opencv2/opencv.hpp> #include <iostream> int main() { cv::VideoCapture cap(0); if(!cap.isOpened()) return -1; cv::namedWindow("webcam"); while(1) { cv::Mat frame; cap >> frame; int depth = frame.depth(),channels = frame.channels(),step = frame.step; ...
88f7921be9b0aa71c493d8af33dd342355cfd2c0
2bbba595f8537ceda6652bdea6a2583a0d63fee8
zeus-iitg/atcoder-dp
/d.cpp
C++
cpp
1,256
no_license
#pragma GCC optimize("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include<bits/stdc++.h> #include<time.h> #include<stdlib.h> #define pb push_back #define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define...
54f0a97c05036283c6ac3e130e70dda301eaa1e8
759691e990bd64471d15308b5bc0aa11fef3929c
ccccqyc/Algorithm
/PAT/BasicLevel/C/B1040.cpp
C++
cpp
592
no_license
#include <cstdio> #include <cstring> #include <iostream> using namespace std; const int MAXN = 100010; const int MOD = 1000000007; char str[MAXN]; int leftNumP[MAXN] = {0}; //B1014 / A1093 int main() { cin.getline(str,MAXN); int len = strlen(str); for(int i = 0; i<len; i++) { if(i>0) { leftNumP[i] = leftNum...
179fc8de30293041e2a8d4ff513fb704f8273722
90affdf5a363c7def104db420e9042a96efb07af
zamboli/textfunnels
/writer.cc
C++
cc
1,064
no_license
// // NAME: writer.cc // AUTHOR: Ben Lazan // DATE: 08/ 9/2012 // DESCRIPTION: User can add a value to a string. Append the string. // delete the string. print the string to a file. and quit // #include<iostream> #include<fstream> #include<cstdlib> #include<string> #include"/home/ben/textfunnels/School/myfirstnamespace...
2baa3a6b020d83566c3880971af71f1802627c9b
98035ab75d8b7746566f5e0bb6438f9be2e1b266
k13jolai/COEN-70-Advanced-Data-Structures-
/Proble8and9.cpp
C++
cpp
966
no_license
//Problem 8 and 9 //Coen 70 #include <iostream> #include <math.h> class quadratic{ public: quadratic(); void set_coefficients(double x, double y, double z); void get_a() const; void get_b() const; void get_c() const; void evaluate(int p); friend quadratic operator+(const quadratic& q1, const quadratic&2); f...
2fd2c462264bf82208841f26b05cf08b037433bc
b25c80234212b8e026b5c4d42113a9609272ad77
KhachaturHakobyan1993/Scott-Meyers-Effective-Modern-C-
/source/Item16/main.cpp
C++
cpp
2,058
permissive
#include <iostream> #include <vector> #include <thread> class Polynomial { public: using RootsType = std::vector<double>; RootsType roots() const { std::lock_guard<std::mutex> g(m); if(!rootsAreValid) { rootsAreValid = true; for(int i = 0; i < 1000; ++i) { ...
285ed7da5f4262675831ea458ca7bc8444ba0af0
605bd9c59f43c10bac55af76b1a7533ee97e36f5
flybird119/shttpd
/src/response.cc
C++
cc
6,743
no_license
#include "response.hh" #include "server.hh" #include "log.hh" #include "connection.hh" #include <string> #include <exception> #include <cstdio> #define PARSE_STATUS(ststus) \ switch (status) { \ case Response::ok: \ return ok; \ case Response::created: \ return created; \...
eaf6a5525c2c0466545dc9eea4b63c0d2e18566d
5352c18bc9193c48cb42f1aa94790dd6822e16cf
Minh-An/windows-systems
/Win10SysProgBookSamples/Chapter07/QueueDemo/MainDlg.cpp
C++
cpp
6,390
permissive
// MainDlg.cpp : implementation of the CMainDlg class // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "resource.h" #include <algorithm> #include "MainDlg.h" #include <string> #include "..\ThreadingHelpers\AutoCriticalSection.h" #include "..\Thread...
919a1f384ac89ed4d954ee407d9ba0906805a856
0e12598cbef613764c6728d1c52a8b03d9cf7d3d
ryanbekabe/ouzel
/tools/ouzel/xcode/PBXObject.hpp
C++
hpp
2,507
permissive
// Ouzel by Elviss Strazdins #ifndef OUZEL_XCODE_PBXOBJECT_HPP #define OUZEL_XCODE_PBXOBJECT_HPP #include <array> #include <chrono> #include <random> #include <string> #include "formats/Plist.hpp" namespace ouzel::xcode { using Id = std::array<std::uint8_t, 12>; inline std::string toString(const Id& i) ...
c04a931423e3e8b87ad609d87c9d032e52f691d1
1a4ea2aacc87d091a39445ea8b1d8f6d6b7476a3
catddev/03.04.2019_Lesson
/03.04.2019_Lesson/Vector.cpp
C++
cpp
577
no_license
#include "Vector.h" Vector::Vector() { cur_size = 0; buf_size = 0; ps = 0; } Vector::Vector(int size) { buf_size = size; cur_size = 0; ps = new Person[buf_size]; } int Vector::size() { return cur_size; } void Vector::add(Person el) { if (buf_size == 0) { buf_size = 4; ps = new Person[buf_size]; } els...
e44bb9f24503f41f6023b9dcd809f49f3949561d
5854620c9bba61cb1257e4bb292f52bf5a68435b
EternityX/DEADCELL-CSGO
/oshgui/Input/WindowsMessage.hpp
C++
hpp
694
permissive
/* * OldSchoolHack GUI * * by KN4CK3R https://www.oldschoolhack.me/ * * See license in OSHGui.hpp */ #ifndef OSHGUI_INPUT_WINDOWSMESSAGE_HPP #define OSHGUI_INPUT_WINDOWSMESSAGE_HPP #include <Windows.h> #include "Input.hpp" namespace OSHGui { class MouseMessage; class KeyboardMessage; namespace Input { /*...
13b3440b94fcac47dbab4b05ad4e397ee19fcc69
3e8ba81a8eab5e14b9a208cf5ea9eadecd077bb2
Topa592/TopaLib
/tl/sge/utility.cpp
C++
cpp
762
no_license
#include "sge.h" void tl::sge::util::Player::slowStartMovement() { for (int i = 0; i < 4; i++) { if (input[i]) curStep[i] = (maxStep >= curStep[i]) ? curStep[i] + speedUpMultiplier : curStep[i]; else curStep[i] = (curStep[i] > speedDownMultiplier) ? curStep[i] - speedDownMultiplier : 0; if (i % 2 == 0) { ...
5843a0351c40f9349f8a1776da17911289ffe3fc
aa8b6644a479e657bdae032de4b4278ba3453e0b
c3358/ucxxrt
/src/x86/except.cpp
C++
cpp
7,917
permissive
/* * PROJECT: Universal C++ RunTime (UCXXRT) * FILE: except.cpp * DATA: 2020/02/21 * * PURPOSE: Universal C++ RunTime * * LICENSE: Relicensed under The MIT License from The CC BY 4.0 License * * DEVELOPER: MiroKaku (miro.kaku AT Outlook.com) */ #include <intrin.h> #include "vcruntime/ehassert...
d2de99066cf285eaa2a5e7c74b132ef9bd1e8d61
673e374fd1bffbe137ed2194f36cd847c841b1b5
dampers/algorithm
/제6회 우리끼리컨테스트F.cpp
C++
cpp
709
no_license
#include <bits/stdc++.h> #define swap(a,b) (a)^=(b)^=(a)^=(b) using namespace std; typedef long long lld; int num[100005]; int dpmx[100005]; int dpmn[100005]; int main() { ios_base::sync_with_stdio(NULL); cin.tie(NULL); cout.tie(NULL); int mx, mn, n; cin>>n; for(int i=0;i<n;i++) ...
079c046961117ac23c03694275bd31b9aa7ab89c
8d9c6d304b18dd1d22e9a7ccc99d07958232c10a
cppmathparser/FastMathParser
/exprtk_simple_example_06.cpp
C++
cpp
2,023
permissive
/* ************************************************************** * C++ Mathematical Expression Toolkit Library * * * * Simple Example 6 * * Author: Arash Partow (1999-2021) ...
1988ba72a665073617896b17af9d375bd45e8e47
8124a26c41ca12c28b7a9d73bb5d0d3c93b3104b
yielding/code
/cpp.rx/sample.cpp
C++
cpp
431
no_license
#include <iostream> #include <string> #include <vector> #include "rxcpp/rx.hpp" using namespace std; int main(int argc, char *argv[]) { auto ints = rxcpp::observable<>::create<int>( [](rxcpp::subscriber<int> s) { s.on_next(1); s.on_next(2); s.on_completed(); }); ints.subscribe( [](in...
39ba203ebb07571bb78ac5ef05f3419ee2693515
331478b0e4e170d0e04f6ac1ce1c827bf68aeab4
MilanDierickGD/QBert
/Heirloom/thirdparty/glm/glm/gtx/handed_coordinate_space.hpp
C++
hpp
1,544
permissive
/// @ref gtx_handed_coordinate_space /// @file glm/gtx/handed_coordinate_space.hpp /// /// @see core (dependence) /// /// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space /// @ingroup gtx /// /// Include <glm/gtx/handed_coordinate_system.hpp> to use the features of this extension. /// /// To know i...
28df33416edd100d85c748a8555a462896f25293
0006f531457f60d10fe797b37cfd1a9f5e81a890
kairi-github/Project-KGL
/Project/ExecutionProject/Game/Hrd/Scenes/TestSceneBase.hpp
C++
hpp
1,375
no_license
#pragma once #include "../Scene.hpp" #include <Dx12/Texture.hpp> #include <Loader/PMDLoader.hpp> #include <Loader/VMDLoader.hpp> #include <Dx12/2D/Sprite.hpp> #include <Dx12/3D/PMDModel.hpp> #include <Dx12/3D/PMDRenderer.hpp> #include <Dx12/2D/Renderer.hpp> #include <Dx12/PipelineState.hpp> #include <Dx12/S...
b4d4dbd18d726f7d2c6ab6d5aaa109a114bd3cff
13ae673d3f2ff6e5427751c2bec0e4221b4b8979
HwangSangDu/ProcessTracer
/processTracer1.1/ProcessTracer.cpp
C++
cpp
24,280
no_license
/* NAME ProcessTracer DESCRIPTION About the simplest debugger which is useful! COPYRIGHT Copyright (C) 2011 by Roger Orr <rogero@howzatt.demon.co.uk> This software is distributed in the hope that it will be useful, but without WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ...
ed6980701742d41fdc993514fa4dba18d39199f8
76264674092c9b94d33d0b634da4a0df040d9e6f
YuanzhongLi/CompetitiveProgramming
/AtCoder/ABC/195/b.cpp
C++
cpp
3,598
no_license
// #define LOCAL #ifdef LOCAL #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,s,n) for (int i = (ll)s; i < (ll)n; i++) #define rrep(i,n,e) for (int i = (ll)n; i > (ll)e; i--) #define ll long long #define ld long double #define pb push_back #define eb empl...
cf175cc0fe9eb642e5760079e401109a753befd9
473f36faf5d681e50cc3ad8a9b4637f5d74db90f
pse-parkview/ginkgo
/include/ginkgo/core/matrix/identity.hpp
C++
hpp
5,500
permissive
/*******************************<GINKGO LICENSE>****************************** Copyright (c) 2017-2021, the Ginkgo authors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source co...
40ed8fb052366689e4112a049cd2db47472f7334
4bd1971d97b938ca7f2e30ddeb66c6b9a73dabf0
ailyanlu1/Competitive-Programming-2
/Codeforces/189 Division 1/Problem A/A.cc
C++
cc
1,118
permissive
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<cstring> #include<map> #include<set> #include<vector> #include<utility> #include<queue> #include<stack> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi first #define...
353fe7086eab4bcb36936bd23ae33b5a2b7f64a4
20d6b1679832e6852032a27d6e5fc09c322f66ea
wpegg-dev/College-Work
/C++ Operating Systems/old/my code/file_loader.cpp
C++
cpp
2,142
no_license
//#include "StdAfx.h" #include "pcb.h" #include "file_loader.h" //#include "stdafx.h" #include <string> #include <iostream> #include <fstream> #include <sstream> #include <iomanip> //#include "disk.h" using namespace std; extern pcb pcb_table; //edtern disk disk1; const string SPC = " ";//just something i use for d...
07c6a06a9ea6df4857597ab068766b01fa8d6179
a21c9d5dda263d39b5399f53048a2a4e476fa16d
JMAR-DNY/School_CPlusPlus
/CS232_P4_HuffmanEncodingTree/code/cs232_p4_client_driver.cpp
C++
cpp
2,845
no_license
//////////////////////////////////////////////////////////////////////////////////////////////// // // File name : cs232_p4_client_driver.cpp // // This program : does huffman encoding and decoding to encode txt files and decode binary // files using an appropriate code table // // Programmer ...
bbd982fe845fdddd8705161241093b45ab9e9a3d
5f379820ba0e53c87aebb7379f5a6fd1ad8df795
kuangchen/ProtoMolAddon
/protomol/src/protomol/io/XYZBinReader.cpp
C++
cpp
5,355
no_license
#include <protomol/io/XYZBinReader.h> #include <protomol/base/Report.h> #include <protomol/base/SystemUtilities.h> #include <protomol/type/TypeSelection.h> using namespace std; using namespace ProtoMol::Report; using namespace ProtoMol; //____XYZBinReader XYZBinReader::XYZBinReader() : Reader(ios::binary), myCoord...
538218a227408e34c895f12ce24f0bd4585a15bd
74aad8debb20488177cf400b8eed127b4ad01f4b
dayler/cppthreadssolaris
/common/executor.hpp
C++
hpp
3,671
permissive
/* * File: executor.hpp * * NuevaTel PCS de Bolivia S.A. (C) 2010 */ #ifndef _EXECUTOR_HPP #define _EXECUTOR_HPP #include "Thread.hpp" #include "worker.hpp" #include <vector> /** * <p>The Executor class.</p> * * @author Eduardo Marin * @version 1.0, 05-19-2010 */ class Executor { static int DELETE...
5584978f0cdf6e7e6bbdeae032b588136d53ed7a
c348512c7f025c60e2e5765b254c85e82a70d7c0
codoudou/IntegratedFPSBypass
/IntegratedFPSBypass/Hooks/PauseLayer.hpp
C++
hpp
365
no_license
#pragma once #include "../includes.h" #include "../Other/ToggleVerticalSync.hpp" class PauseLayer : public gd::PauseLayer { gd::CCTextInputNode* m_iFPSInput; public: inline static bool(__thiscall* initO)(PauseLayer*); static bool __fastcall initH(PauseLayer*); void submitBtnCallback(CCObject*); void vSyncChec...
5e712e9be0f64ed129f580d70c26a40af428a06a
5a147c569a432af3312d180a87ade0932606c25f
YCclimber/QTproject-fontmaker
/convertthread.cpp
C++
cpp
9,756
no_license
#include "convertthread.h" convertthread::convertthread(QList<Convert> &convertlist,qint64 maxsize) { converts = convertlist; MAX_SIZE = maxsize; qDebug("convert count %d\n",converts.count()); } convertthread::~convertthread() { if(convert_character_set){ delete convert_character_set; ...
ef8e9b9115cd844babbe8a0827bfedc12b0ee51a
19fabfafb064a2fc3d8c7f72f433a8298816d440
mikekwright/devilution
/Source/sound.cpp
C++
cpp
11,441
permissive
#include "diablo.h" #include "../3rdParty/Storm/Source/storm.h" LPDIRECTSOUNDBUFFER DSBs[8]; LPDIRECTSOUND sglpDS; BOOLEAN gbSndInited; int sglMusicVolume; int sglSoundVolume; HMODULE hDsound_dll; HANDLE sgpMusicTrack; LPDIRECTSOUNDBUFFER sglpDSB; /* data */ BOOLEAN gbMusicOn = TRUE; BOOLEAN gbSoundOn...
5ee3e57bab714d864e84bf89d7c8fe4fb7a9e4e3
a93819d5f306bd18e90812d3fd4e069cb93a1634
lava/lexy
/include/lexy/encoding.hpp
C++
hpp
12,099
permissive
// Copyright (C) 2020-2021 Jonathan Müller <jonathanmueller.dev@gmail.com> // This file is subject to the license terms in the LICENSE file // found in the top-level directory of this distribution. #ifndef LEXY_ENCODING_HPP_INCLUDED #define LEXY_ENCODING_HPP_INCLUDED #include <cstdint> #include <lexy/_detail/assert.h...
a1fc77907e30dfa8a6b44342d13da5a5b1d871af
78205cf5db48432b0c372f8d6aef941ed5e1b15b
ttthink/oryol
/code/Modules/Core/UnitTests/HashSetTest.cc
C++
cc
4,428
permissive
//------------------------------------------------------------------------------ // HashSetTest.cc // Test HashSet functionality. //------------------------------------------------------------------------------ #include "Pre.h" #include "UnitTest++/src/UnitTest++.h" #include "Core/Containers/HashSet.h" using...
62282a0d7b948285e676c43a455d2eb7fffad5fe
01cfdf5ec764690831558ccbe3a36ab877bf63ac
kitabatake/AtcoderRegularContest
/056/c_dp_bit.cpp
C++
cpp
1,195
no_license
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <climits> using namespace std; typedef long long ll; #define REP(i, x) for (int i = 0; i < (int)(x); i++) int N, K; vector< vector<int > > credits; vector<int> dp; vector<int> group_credits_sum; int lose_credits(int a, int b) { re...
2ae6687944e4a40792913398f42d9b3368848fae
2332dd12ae710d3ca449b706a4382d5d90b78ece
arcadeon707/pytorch
/torch/csrc/jit/graph_executor.cpp
C++
cpp
22,032
permissive
#include <torch/csrc/jit/graph_executor.h> #include <ATen/core/ivalue.h> #include <c10/util/Exception.h> #include <torch/csrc/autograd/grad_mode.h> #include <torch/csrc/jit/argument_spec.h> #include <torch/csrc/jit/autodiff.h> #include <torch/csrc/jit/custom_operator.h> #include <torch/csrc/jit/interpreter.h> #include...
8f1b9fd7823e2258448d79241a75697cc6f9cbef
344a624a45d7861d404c5e0a577c0f2485980c6c
rpov-118-1/HOME-WORK
/15-1.cpp
C++
cpp
2,365
no_license
#include <iostream> using namespace std; int Action(int* a, int* b, int const* size); void max(int* a, int* b, int const* size, int* result, int* arr); void min(int* a, int* b, int const* size, int* result, int* arr); void avg(int* a, int* b, int const* size, int* result, int* arr); int main() { int exits = 1; int ...
29d716366d36896e284856247b3ce69351920f20
9ffb4e26a8e013fe30e045eb74e4db9cf256ea23
keendog/usbdm-eclipse-makefiles-build
/CFVx_Interface/src/USBDM_GDI.cpp
C++
cpp
75,908
no_license
/*! \file \brief Entry points for USBDM library USBDM_GDI.cpp \verbatim USBDM GDI interface DLL Copyright (C) 2008 Peter O'Donoghue 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 Fou...
c45a881c9c23b0c5dbe7bbab06bbb1cc308474a5
658e549704eb81ae7bb37e08ed778f701ffd1cc4
sum01/learning_cpp
/templates/src/main.cpp
C++
cpp
1,830
permissive
#include "sum.hpp" #include "classes.hpp" #include <string> #include <iostream> int main() { // Using same types in a sum template const int x = 4, y = 13; sum(x, y); const double dx = 44.13, dy = 1.40; sum(dx, dy); // Using mixed types in a sum template mixed_sum(x, dx); // Creating a new class from the pai...
85312e79872a0743f99d70080fa95b15c01fd3b4
5c4be3e1168571469d223e29c51cf0b1cfb7b678
HighlightDev/PHEngine
/PHEngine/PHEngine/src/Core/GraphicsCore/Texture/CubemapTexture.cpp
C++
cpp
4,483
no_license
#include "CubemapTexture.h" #include "Core/IoCore/TextureLoaderCore/StbLoader/StbLoader.h" using namespace Io::Images::Stb; namespace Graphics { namespace Texture { CubemapTexture::CubemapTexture(std::vector<std::string>& pathToTextures) { m_texDescriptor = CreateCubemapTexture(pathToTextures); } C...
c633d1156cb710b05bc9bafc07e7760425b174e7
9ea017818b1469d772145805936fc307561398e9
parsa/blaze
/blazetest/src/mathtest/operations/smatsvecmult/DCbVCb.cpp
C++
cpp
4,430
permissive
//================================================================================================= /*! // \file src/mathtest/operations/smatsvecmult/DCbVCb.cpp // \brief Source file for the DCbVCb sparse matrix/sparse vector multiplication math test // // Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserve...
af6395ed5b8ff4517d7bbb57fdc042d59d18823a
3f917018f9e8ba4f84d0cacf94fb39d5e943841a
noushadahm/MYWORK
/boreapart.cpp
C++
cpp
509
no_license
#include<iostream> #include<bits/stdc++.h> using namespace std; int count(int n){ int ans=0; while(n!=0){ n= n/10; ans++; } if(ans==1){ return 1; }else if(ans==2){ return 3; }else if(ans==3){ return 6; }else{ return 10; } } int m...
742ed74f4cb3718bc007f0f117d34637069a307f
2578059484c0099489fc6333e820ad258e895c66
uetchy/temp_hero
/src/main.cpp
C++
cpp
9,587
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ncurses.h> #include <locale.h> #include <unistd.h> #include "define.hpp" #include "main.hpp" #include "renderer.hpp" #include "map.hpp" #include "player.hpp" #include "screenplay.hpp" #include "battle.hpp" // Prototypes void gameLoop(); void gameOve...
5e1db0dea135a6dfecc7362b282d3e3ffaec1e0a
2edccf86d376d4a185ff5d1b4a21be26f4d16b82
SREERAGI18/chromium
/chrome/browser/new_tab_page/modules/safe_browsing/safe_browsing_prefs.cc
C++
cc
602
permissive
// Copyright 2021 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/new_tab_page/modules/safe_browsing/safe_browsing_prefs.h" namespace ntp { namespace prefs { const char kSafeBrowsingModuleShownC...
978fc0cc960b5cb828a8a6ec94665fbdedb060dc
365cf3f537e19e881056114dc2437c4a0aef0a3d
talkami/OOP
/Project2/AllFiles/Game.cpp
C++
cpp
5,974
no_license
#include "Game.h" Game::~Game() { // close all the dynamic libs we opened for (vitr = this->dll_vec.begin(); vitr != dll_vec.end(); ++vitr){ FreeLibrary(std::get<1>(*vitr)); } delete this->A; delete this->B; } bool Game::initGame(int argc, char* argv[]) { bool result = true; std::string path = "."; DIR * di...
f7f607fae780539b2d64330002d57da26e3a72ec
1b4784fe1740ff0b2f02d8c16c1e84473db82479
Gegel85/ChallongeLib
/src/Socket.hpp
C++
hpp
4,374
permissive
// // Created by Gegel85 on 05/04/2019. // #ifndef CHALLONGESOKU_SOCKET_HPP #define CHALLONGESOKU_SOCKET_HPP #ifdef _WIN32 # include <winsock.h> # define SOCKERR WSAGetLastError() #else # include <errno.h> # include <sys/socket.h> # define INVALID_SOCKET -1 typedef int SOCKET; # define SOCKERR errno #endif #include...
92b397cb5805338934015affd1123d2d6569107b
4b2b608e1f3d47013948d2b3164cc78592b491ad
AnotherFoxGuy/OpenTESArena
/OpenTESArena/src/Rendering/RenderTextureUtils.cpp
C++
cpp
4,456
permissive
#include "Renderer.h" #include "RenderTextureUtils.h" #include "components/debug/Debug.h" LockedTexture::LockedTexture(void *texels, int bytesPerTexel) { this->texels = texels; this->bytesPerTexel = bytesPerTexel; } bool LockedTexture::isValid() { return this->texels != nullptr; } ScopedObjectTextureRef::ScopedO...
2034580ab1992ec1ba2b8ca67aab383c392cd408
c5c4002570da74a1787198ac3260a65e9586af0a
jsandham/rocSPARSE
/clients/include/rocsparse_init.hpp
C++
hpp
27,504
permissive
/*! \file */ /* ************************************************************************ * Copyright (c) 2020 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Softwa...
fe929d2252e2f1ef1c0d58a6e125885e015d3a97
d0bb21fd5df10f00ccabde8ce79d26a9c46ee7f5
YeonWon123/My_Problem_Solving
/PS/2016 UCPC 연습/B/B/B(2).cpp
C++
cpp
1,191
no_license
#include <iostream> #include <set> #include <algorithm> #include <vector> using namespace std; int n; struct Node { int val, open, num; Node(int v = 0, int o = 0, int n = 0) :val(v), open(o), num(n) {} bool operator < (const Node& o) const { if (val == o.val) return open < o.open; return val < o.val; } }; i...