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
88874c158838ff4af1f6d9e48ae39502b87d71a2
6a70ccc89eca92a795884a3840f205e28766ecdc
moteesh-in2tive/chromium
/base/power_monitor/power_monitor_source.cc
C++
cc
2,449
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 "base/power_monitor/power_monitor_source.h" #include "base/power_monitor/power_monitor.h" #include "base/power_monitor/power_observer.h" #includ...
dcf5346e9536b3de4f9ad3ec84e2d0c3b775874a
cfbfaa8ca07efc16546b90d81baea243f638e62e
quasi-project/sdk
/runtime/vm/intermediate_language_dbc.cc
C++
cc
39,979
permissive
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. #if defined(TARGET_ARCH_DBC) #include ...
eac6f1e5d88077c6c452e47a1720a82d4e735a27
609bf736b8944bc8f03588b16489a530fddfca88
ht0919/ALDS
/ch05/hash_search.cpp
C++
cpp
472
no_license
#include<iostream> #include<vector> using namespace std; void print(vector<int> v) { vector<int>::iterator it; for ( it = v.begin(); it != v.end(); it++ ) { cout << *it; } cout << endl; } int main() { int N = 4; vector<int> v; for (int i=0; i<N; i++) { int x; cin >> x; ...
44d21d3cab343d283b14d15f6694fbc736853460
10ae7f6877565e9460de26ed22d4238aa2b3bb38
zsq001/oi-code
/11.11contest/source/Stu-05-rhj/equal/equal.cpp
C++
cpp
1,694
no_license
#include<stdio.h> #include<string.h> #include<algorithm> using namespace std; const int N=100005; template<class T>void read(T &x) { bool f=0;x=0;char s=getchar(); while(s>'9'||s<'0'){f|=(s=='-');s=getchar();} while(s>='0'&&s<='9'){x=(x<<1)+(x<<3)+(s^48);s=getchar();} x=f?-x:x; } int n,m,fa[N][25],dep[N...
ef8182c7e7b0c59ad18658a1e719d832cbdfb86a
f0a2e77e49d8bf953852ae72ebc8bd37949377f9
isabella232/Gringofts
/test/infra/raft/v2/RaftCoreTest.cpp
C++
cpp
5,284
permissive
/************************************************************************ Copyright 2019-2020 eBay Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0...
910b5d17e774deb21d126e1871e8baee723a5898
61a96b35a5c484ea7c0f02bd2658d2e36e6ebc45
study-game-engines/chili
/Intermediate/Tut 4 - Files/writeNread/writeNread/Source.cpp
C++
cpp
1,630
no_license
#include <conio.h> #include <fstream> //filestram namespace aguszka { void print(const char* s) { for (; *s != 0; s++) { _putch(*s); } } void read(char* buf, int maxSize) { const char* const pEnd = buf + maxSize; for (char c = _getch(); c != 13 && (buf + 1 < pEnd); c = _getch(), buf++) { _putch...
0244bf7666e995e897b1e53ab422551c83a82fa7
e3500a5846156839e6d6475443a4441dc447a29c
WhiZTiM/coliru
/Archive2/9e/3bad82e5ddb3b0/main.cpp
C++
cpp
967
no_license
#include <istream> //#define DO_COMPILE_1 1 //#define DO_COMPILE_2 1 //#define DO_COMPILE_3 1 #define DO_COMPILE_4 1 #if DO_COMPILE_1 class A { private: std::istream strm; public: A() : strm(NULL) { } }; class B : public A { public: B() : A() { } }; #elif DO_COMPILE_2 cl...
1930bd9d7c7d5cceaf7212c5236274ca1c12139d
a03b200731a578001dbdef5aff6230fea6698100
lohyenjeong/Sudoku
/main.cpp
C++
cpp
3,987
no_license
#include <iostream> #include <cstdio> #include "sudoku.h" using namespace std; int main() { char board[9][9]; /* This section illustrates the use of the pre-supplied helper functions. */ cout << "============== Pre-supplied functions ==================" << endl << endl; cout << "Calling load_board():" << e...
7aae266d38010d70768a133ecfa7daadc1a5b5c4
25c666712da1da18de1dd26a8f0e2569c84c17f5
domenn/OgreGame
/src/game_setup_component.hpp
C++
hpp
3,022
no_license
#pragma once #include "fps_game.hpp" using namespace Ogre; using namespace OgreBites; namespace fpsgame { class GameSetupComponent { public: static void setup(FpsGame* fps_game) { fps_game->addInputListener(fps_game); // get a pointer to the already created root Root* root = fps_game->getRoot(); ...
98875bd7fddaf8b9984bcb156f3fe7e77c23b8dc
37ac6749f94de5271908a8ad28ddc0a12b5fda7a
bloodorange0313/programming_contest_practice_atcoder
/051c.cpp
C++
cpp
893
no_license
#include<iostream> #include<string> using namespace std; using ll = long long; int sx, sy, tx, ty; void input(){ cin >> sx >> sy >> tx >> ty; } string first_time(){ string s; int y = ty - sy; int x = tx - sx; for(int i = 0; i < y; ++i){ s.append("U"); } for(int i = 0; i < x; ++i){ s.append("R...
2b18d7ff8b44b1fcc9548613ed7cac8c48c61ded
05556d5c16a3182ed2c0ff82431da440415fd794
demonsheart/C-
/rongyu/homework1/file2/2018152114_1235_姝g‘_600.cpp
C++
cpp
1,226
no_license
#include<iostream> #include<cstring> #include<iomanip> using namespace std; class Geometry{ public: virtual double getArea()=0; //计算面积,结果保留小数点后两位 virtual ~Geometry(){ } }; class Rect:public Geometry { double x,y; public: Rect(double _x,double _y):x(_x),y(_y){} virtual double getArea() { return x*y; }...
1f229955f337c712bd1b7369cfa7f8099b373104
2295e03a11eecc7f0c038798ad7e732390ad5b00
gky2009514/lintcode
/C++/159_Find Minimum in Rotated Sorted Array.cpp
C++
cpp
686
no_license
class Solution { public: /** * @param num: a rotated sorted array * @return: the minimum number in the array */ int findMin(vector<int> &num) { if (num.size() == 0) return 0; int left = 0, right = static_cast<int>(num.size()) - 1; while (left < right) { ...
d95acac428e2293cbb911421c732b61bdc311d04
46676090bcf16d8fb6c934a3c462758e9e572142
nshah08/Coding-Projects
/Shah_Nishil_CS361_Assignment/src/Flechettes.cpp
C++
cpp
1,071
no_license
#include "Flechettes.h" Flechettes::Flechettes(int i) { id=i; } Flechettes::~Flechettes() { //dtor } void Flechettes::randomy(default_random_engine * genptr) { normal_distribution<double> ydist(100,15); y=ydist(*genptr); } void Flechettes::display() { cout << "Flechettes ID: ...
b3b2c2fd531aa2e7246a622acad58f836f5ec375
7e94661fdaff08abb04f711402015f1963090a0f
2bite/ARK-SDK
/SDK/ARKSurvivalEvolved_DinoTamedInventoryComponent_Exosuit_functions.cpp
C++
cpp
1,757
permissive
// ARKSurvivalEvolved (332.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_DinoTamedInventoryComponent_Exosuit_parameters.hpp" namespace sdk { //--------------------------------------------------------------------------- //Functions //----------------------------------------------...
c715e8fc5360d6e33a895484ae985b1aa0a797a4
4f9f2ce976af4d4deb4d2cb3074cbc9900a4915d
kaitokidi/Base
/SoundManager.cpp
C++
cpp
2,478
permissive
#include "SoundManager.hpp" //PLACE HERE A FORWARD DECLARATION OF YOUR STATIC VARIABLES //sf::SoundBuffer SoundManager::SOUND_NAME; //sf::Music SoundManager::MUSIC_NAME; /* Example: sf::Music SoundManager::overWorldMusic; sf::SoundBuffer SoundManager::attackBuf; */ std::map<std::string, ...
034fcde25176304b81b09be4ebc7705895a39715
2b72d02e56f6403cdf9fad352b6c7b2fbc118757
sstsimulator/sst-elements
/src/sst/elements/memHierarchy/membackend/dramSim3Backend.cc
C++
cc
2,949
permissive
// Copyright 2009-2023 NTESS. Under the terms // of Contract DE-NA0003525 with NTESS, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2023, NTESS // All rights reserved. // // Portions are copyright of other developers: // See the file CONTRIBUTORS.TXT in the top level directory...
12e3f88bd94beb53659f1de73994c85c3304121d
3c765432029b0734e498526e04d9a4ebf669720f
luchesar/emibg
/node_modules/node-sass/src/libsass/file.cpp
C++
cpp
8,823
permissive
#ifdef _WIN32 #include <direct.h> #define getcwd _getcwd #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #else #include <unistd.h> #endif #include <iostream> #include <fstream> #include <cctype> #include <algorithm> #include <sys/stat.h> #include "file.hpp" #include "context.hpp" #include "utf8_string.hpp" #inclu...
754274ab3363f9dfdc562f97b4be7ff4f466a1da
cdf359cd21157729b6cdb21ec3281d92e5d7c919
rexzhang/ngpodwc
/common_wallpaper_ngpod.cpp
C++
cpp
4,892
no_license
///////////////////////////////////////////////////////////////////////////// // Name: common_wallpaper_ngpod.cpp // Purpose: // Author: Rex Zhang // Modified by: // Created: 2006-03-04 // RCS-ID: // Copyright: (c) 2006 Rex Zhang // Licence: GNU General Public License (GPL) version 2 ////...
9466428f8b284461c91cb31bc49baabe11b381a7
30d30c3948782858a640dc922660056b4e437995
Dayibawolf/FiveinaRow
/FiveinaRow/AI.cpp
C++
cpp
2,720
no_license
#include "AI.h" #include <iostream> using namespace std; void AI::computer(Player & player, Chess & chess) { int s = 0; sum[0] = 0; sum[1] = 0; assignscore(sum[s], chess); cout << "电脑不会。。。"; } void AI::assignscore(int sum, Chess & chess) { cout << chess.board[3][4]; system("pause"); } int AI::judger(Chess &...
2fa4c9142bca482e8a2005c5b3f8197747f273c3
c534976f634712f86ac8cf0d0695182e6f4ff0f4
dice2019/alexlabonline
/easyMule/easyMule/src/WorkLayer/SHAHashSet.cpp
C++
cpp
37,990
no_license
/* * $Id: SHAHashSet.cpp 4483 2008-01-02 09:19:06Z soarchin $ * * this file is part of eMule * Copyright (C)2002-2006 Merkur ( strEmail.Format("%s@%s", "devteam", "emule-project.net") / http://www.emule-project.net ) * * This program is free software; you can redistribute it and/or * modify it under th...
33031ba1b191b8963de781f9369faf6a1341b191
178efdf2d3a7c3203583add6283af8da731aa8fd
shobhit-saini/Leet_Code
/674.Longest_Continuous_Increasing_Subsequence/approach.cpp
C++
cpp
1,043
no_license
/* Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: Input: [1,3,5,4,7] Output: 3 Explanation: The longest continuous increasing subsequence is [1,3,5], its length is 3. Even though [1,3,5,7] is also an increasing subsequence, it's not a continuou...
015815d563e6f9aced9e54a6140243ad5b28a8b1
14616862801d14d7bbb845280cebcd7ba69b560f
gaoyunjun/VAPOR
/apps/vaporgui/TabManager.cpp
C++
cpp
17,513
no_license
//************************************************************************ // * // Copyright (C) 2004 * // University Corporation for Atmospheric Research * // All Rights Reserved * // * //************************************************************************/ // // File: Tab...
3c01be0105dc76c16cd8b4d165705152f26ca795
d026150ea86197969820302f7c4948a13086d292
mzry1992/workspace
/OJ/TopCoder/551/250.cpp
C++
cpp
5,448
no_license
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstd...
ff58fba7723f5a9e67837062488fd5a15473f05b
63f89cd78eb3e7591fba53f937336e0260c0873d
yleo/aggregation
/C++/etude_max.cpp
C++
cpp
1,186
no_license
#include <iostream> #include <vector> #include <queue> #include <cmath> #include <map> #include <stdio.h> #include <stdlib.h> using namespace std; struct Result { unsigned short int time; unsigned short int hops; }; struct Arete { unsigned short int u; unsigned short int v; }; struct Step { unsigned short...
740d4489c21b8a65836d10c914bbb778fa401d2e
9182b95dcc29559b217df43b63db2290ab6419fa
adityagupta1089/Computer-Graphics
/Lab 5/teapotsgalore.cc
C++
cc
1,391
no_license
#include <GL/gl.h> #include <GL/glut.h> void display () { /* clear window */ glClear(GL_COLOR_BUFFER_BIT); /* future matrix manipulations should affect the modelview matrix */ glMatrixMode(GL_MODELVIEW); /* draw scene */ glPushMatrix(); glPushMatrix(); glTranslatef(0,0,-3); glutWireTeapot(1); glTranslatef(0...
20e3e7a451bdec4054b4869dc7c0ca61a7393270
993749669854e78e36ea4990ff697a8f0a9c485e
DRot88/Lab3_Dice_War
/die.cpp
C++
cpp
404
no_license
#include "die.hpp" #include <ctime> #include <iostream> using std::cout; using std::endl; // default constructor Die::Die() { sides = 6; } // constructor requiring input for number of sides Die::Die(int n) { sides = n; } // Roll the Die, randomizing between 1 and N sides int Die::roll() { cout << "Regular Roll...
30275f59889c5d940de617eb75e5c4637cd38680
8ca121ca23ceddb82f1aea6129086ce296afbbec
Adityamishra018/CPP
/code-lib/equal_sum_partition.cpp
C++
cpp
736
no_license
#include<bits/stdc++.h> #define M 1001 using namespace std; int t[M][M]; bool Subset_Sum(vector<int> &arr, int sum, int n) { for(int i=0; i<M; i++) { t[0][i] = 0; t[i][0] = 1; } for(int i=1; i<n+1; i++) { for(int j=1; j<sum+1; j++) { if(j>=arr[i-1]) t[i][j] = t[i-1][j]||t[i-1][j-arr[i-1]]; e...
0f4b74ba6eea718695108602c7da6d80fb042822
eb483fd24a09b8075cf73f45b5044cb2c1bf9c1f
ishaansingal/Tempus
/TempusGUI/TempusTest/HistoryHandler.cpp
C++
cpp
5,581
no_license
/* Authors : Ishaan Singal, Raunak Rajpuria HistoryHandler does the following: --Subclass of ListHandler class. It handles past events. --It is a singleton classes. Only one instance of this class can be created. --Apart from inheriting the attributes and methods of the parent class, it has certain methods of i...
a1a606b887dad34296a7c0b923e0dee02a795b00
2bc2dcabc9cf0a9dab12a9247aa3a2780ca50e6d
damu/UrhoSampleProject
/main.cpp
C++
cpp
13,351
permissive
/** * Released under the same permissive MIT-license as Urho3D. * https://raw.githubusercontent.com/urho3d/Urho3D/master/License.txt */ #include <string> #include <memory> #include <fstream> #include <sstream> #include <Urho3D/Urho3D.h> #include <Urho3D/Core/CoreEvents.h> #include <Urho3D/Graphics/RenderPath.h> #incl...
226bcf1962f156b55186be8100bc0c168f0a3808
0fafc13baf1db4fbe37e61fb4af904e976cbb23b
FenneX/FenneX
/cocos2d/cocos/2d/CCRenderTexture.cpp
C++
cpp
29,165
permissive
/**************************************************************************** Copyright (c) 2009 Jason Booth Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2013-2017 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this softwa...
fde5d2bc4ec913bbdae203f2661a6c8d3e8f85ea
5ae44486f3f818fb6d10c8fcb3781c44a7c11db3
WuNL/sdtNewTerminal
/common/cmd_options.cpp
C++
cpp
8,298
no_license
/***************************************************************************** INTEL CORPORATION PROPRIETARY INFORMATION This software is supplied under the terms of a license agreement or nondisclosure agreement with Intel Corporation and may not be copied or disclosed except in accordance with the terms of that agre...
2010629e12c63c7c5b936421f788b845b38c93da
b8e5f5a48fa27e6d24162f7ac8bf02260447e792
mizuirorivi/kyopuro
/ABC133proC.cpp
C++
cpp
573
no_license
#include<bits/stdc++.h> using namespace std; #define ALL(v) (v).begin(),(v).end() #define REP(i,p,n) for(int i=p;i<(int)(n);++i) #define rep(i,n) REP(i,0,n) #define SZ(x) ((int)(x).size()) #define debug(x) cerr << #x << ": " << x << '\n' #define INF 999999999 typedef long long int Int; typedef pair<int,int> P; using ll...
77cda85a15934deb2734b3f42532c3b339044145
b0a61d5b03f66769440e935d897fa62a04711cc0
Shaker2001/Algorithms-Library
/Regionals/NA Pacific Northwest 2012/pacnw2012/SarumansLevelUp/levelup-simple.cpp
C++
cpp
604
no_license
#include <iostream> using namespace std; long long count1(long long k); long long solve(long long N); long long count1(long long k) { // counts the number of 1s in k long long ret = 0; while(k) { if (k & (long long)1) ret++; k = k >> 1; } return ret; } long long solve(long long...
53cf9621ab3552d676c90ec351ed2e9cf09af7fd
f9aa60a20a795191141f2116da4b032b8ebcb7cb
amir5200fx/Tonb
/Common/DE/de_constraints.hpp
C++
hpp
17,867
no_license
/* * Copyright (c) 2017, Adrian Michel * http://www.amichel.com * * This software is released under the 3-Clause BSD License * * The complete terms can be found in the attached LICENSE file * or at https://opensource.org/licenses/BSD-3-Clause */ #pragma once #include <boost/algorithm/string.hpp> #include <boo...
ec8ee62b69e20e46807832826ec54030141c3c2d
5608dc39e9ae385fc332a353d7edcee75a01d54e
MaksFomenko/MyFirstGeme-
/My Firsh Game/My Tirsh Game/MyFirstGame.cpp
C++
cpp
7,305
no_license
#include <iostream> #include <string.h> #include <time.h> #include "ClassPlayer.h" #include "ClassHero.h" #include "GameManager.h" #include "PlayerHero.h" #include "Session.h" #include "TeamManager.h" using namespace std; int main() { srand(time(0)); ClassPlayer p[10]; ClassHero h[10]; TeamManager TM;...
4da33bd56544d7f101f9e32456e728911fbbc5db
94d14a5e36b09c77a1c9ce6ae7ae95db3f038398
pbb59/ScaffCC
/llvm/lib/Support/DataStream.cpp
C++
cpp
2,981
permissive
//===--- llvm/Support/DataStream.cpp - Lazy streamed data -----------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
473d2072ddae6df335548f491ac613517b0ed1e1
e3a8ca159081ed7a1979adae78001d6c2c052df6
danbudanov/upm
/src/mma7660/mma7660.hpp
C++
hpp
8,101
permissive
/* * Author: Jon Trulson <jtrulson@ics.com> * Copyright (c) 2015-2016 Intel Corporation. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limi...
5baaec22b88a5f9a3d094d712b4b33435f49d0e9
92e30dfe56d209d68dcc078ad5933b06e9a14b09
ccdxc/logSurvey
/data/crawl/squid/hunk_3406.cpp
C++
cpp
726
no_license
count++; hres_list = hres_list->ai_next; } - rc = xgetnameinfo(hres->ai_addr, hres->ai_addrlen, hostname, + rc = getnameinfo(hres->ai_addr, hres->ai_addrlen, hostname, sizeof(hostname), NULL, 0, 0); if (rc != 0) { fprintf(stderr, "%s| %s...
7dd8153f5800acc77d34b0133e29c2501bc728a3
6b77b20f4188214d1ba5e6e90c9cc09c6f0a725d
onnx/onnx
/onnx/defs/nn/old.cc
C++
cc
99,107
permissive
/* * SPDX-License-Identifier: Apache-2.0 */ #include <cmath> #include "onnx/defs/function.h" #include "onnx/defs/schema.h" namespace ONNX_NAMESPACE { static const char* Dropout_ver12_doc = R"DOC( Dropout takes an input floating-point tensor, an optional input ratio (floating-point scalar) and an optional input tr...
96fb418adc0c386f82b3f986f5e58d4b7af417d7
f1d3a49cf55749a92cf30579634e06055eab2c56
shameekganguly/spline_tree_sim
/02-simple_tree/main.cpp
C++
cpp
24,099
no_license
// 02-simple_tree: haptic display of a simple tree with a few fruits #include <Sai2Graphics.h> #include <GLFW/glfw3.h> //must be loaded after loading opengl/glew #include "TreeKinematic.h" #include "TreeVisual.h" #include "SplineContact.h" #include "timer/LoopTimer.h" #include "LCPSolver.h" #include <Eigen/Core> #inc...
81f47acd8f50f843bf82d12c2a4ccb0746c1aae0
7dacd8c570f0472613ee6d23a2d7119841804660
marcosvcloures/maratona
/UVA/1225.cpp
C++
cpp
397
no_license
#include <bits/stdc++.h> using namespace std; int main() { int qtd[10000][10] = { 0 }, i, t, n; for (i = 1; i < 10000; i++) { for (t = 0; t < 10; t++) qtd[i][t] = qtd[i - 1][t]; for (t = i; t; t /= 10) qtd[i][t % 10]++; } scanf("%d", &n); while (n--) { scanf("%d", &t); printf("%d", qtd[t][0]);...
e3c22b4b532336c777134f213251d89df07840da
70e7d5cc0323ac40c727f884d7d56aa2caf7eff3
c0de4un/gl_sprite_batch
/src/cpp/systems/SpriteSystem.cpp
C++
cpp
8,627
permissive
/* * Copyright © 2018 Denis Zyamaev. Email: (code4un@yandex.ru) * License: see "LICENSE" file * Author: Denis Zyamaev (code4un@yandex.ru) * API: C++ 11 */ // HEADER #ifndef __c0de4un_sprite_system_hpp__ #include "SpriteSystem.hpp" #endif // !__c0de4un_sprite_system_hpp__ // Include Random #ifndef __c0de4un_random...
f03e68539734c45317e6245e4cfc88619b22f59b
dcea76a43fb42cb31d5c45f69a6f7800f190c613
ric2b/Vivaldi-browser
/chromium/chrome/common/extensions/extension_test_util.cc
C++
cc
3,820
permissive
// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/common/extensions/extension_test_util.h" #include <memory> #include "base/command_line.h" #include "base/files/file_path.h" #include "base/json/json_file_val...
7592cc77acf794a042a327e67056c780f9e1870c
10504ada57ebcf96e95c24b6fcceae759a181ea8
Seng-Jik/RotatingCube
/SourceCode/VCProject2010/VCProject2010/StageSelectMenu.cpp
C++
cpp
2,813
no_license
#include "stdafx.h" #include "SavaData.h" #include "StageSelectMenu.h" #include "StageSelectGUI.h" #include "GameMain.h" #include "SoundEffect.h" #include "Clock.h" #include "StarDisplayer.h" using namespace Game::GamePlay; Game::Title::StageSelectMenu::StageSelectMenu(MainBackground& mainBackground, StageSelectGUI& ...
6fea4748595c9f204d677aa9dc65ee60205fa5ec
7a125233ff0c20a745b5889f2adb5338ca07a639
ganler/GanlerCS
/Cpp/others/ganler_trie.hpp
C++
hpp
2,907
no_license
#pragma once #include <iostream> #include <unordered_map> #include <stdexcept> #include <memory> #include <type_traits> #define gassert(X) \ if(!(X))\ {\ std::cerr << "GASSERT FAILED :=> line " << __LINE__ << ": " << #X << '\n';\ std::exit(-1);\ } namespace ganler { template <typename T>...
5af15bdf3359d2f88d70cffe7b04aa5d17d9f559
30f111ac996172711f302ac6a1d8dc4cda960311
google/XNNPACK
/test/even-split4.cc
C++
cc
30,913
permissive
// Copyright 2022 Google LLC // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #include <algorithm> #include <array> #include <cstddef> #include <cstdint> #include <limits> #include <memory> #include <numeric> #include <random> #incl...
bcfb25ce1c0acd1bfe4c8ad34f080706139f4c24
a6778b1083e8f8f947f3c0e36f47ce4aeb149415
Ozmileny/Flight-storage
/tests.cpp
C++
cpp
6,005
no_license
#include<cassert> #include "linearflight.h" #include "cyclicflight.h" #include "point.h" #include "timetable.h" void test_LinearFlight() { // создаем рейс LinearFlight fl1("Moscow", 2, 13, "Perm", 2, 15, "SU7394"); LinearFlight fl2("Moscow", 2, 15, "Perm", 2, 17, "SU7395"); LinearFlight fl3("Moscow", 2, 13, "P...
e4970559c6ea317b4ddc327ac0806d4e0b31968d
bdb955608bb64c44b8e781abdb90a8d9ef7448c0
sourav9124/Data-Structure
/handling range queries in a segment tree.cpp
C++
cpp
1,575
no_license
#include<bits/stdc++.h> using namespace std; int query(int* tree,int start,int end,int treeNode,int left,int right) { //completely outside the given range if(start >right || end <left) { return 0; } //completely inside the given range if(start >= left && end <=right) { return tree[t...
a323c7614c665361e254e58224895c84f1451a9d
758eef0be5ebb18bbfedff6d0de762a4f792adc0
tfboyd/tensorflow
/tensorflow/core/kernels/data/experimental/indexed_dataset_op.cc
C++
cc
20,235
permissive
/* Copyright 2017 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...
1e750929453c424b712b8df4dec9884c1676413f
a4b00d92ea89a4390462ab7532d7b4db2f9962ee
winnerineast/llvm-project
/llvm/lib/IR/Constants.cpp
C++
cpp
122,599
permissive
//===-- Constants.cpp - Implement Constant nodes --------------------------===// // // 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 // //===---------------------------...
0b68ffbfbeb43fdc0f7f6400ebbdefb10a33213b
9277ac98cf43530a9ee5be11ec28472edc09d4b3
bclzvs/shaguo
/cplus/stl/algorithm/transform.cpp
C++
cpp
464
no_license
#include <algorithm> #include <functional> #include <stdio.h> #include <vector> #include <iterator> using namespace std; int add(int x) { return x + x; } int main(void) { vector<int> v; v.push_back(1); v.push_back(3); v.push_back(7); v.push_back(9); vector<int> v1(v.size()); // must set size transform(v.begin()...
c3e43b934360171ee0635f22169fa12021363c53
c4b6feb4ac55cb1aabfa299f7661c93a3b51136a
chris-wood/IncludeOS
/api/kernel/syscalls.hpp
C++
hpp
928
permissive
// This file is a part of the IncludeOS unikernel - www.includeos.org // // Copyright 2015 Oslo and Akershus University College of Applied Sciences // and Alfred Bratterud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may...
9489160e0ddcdc920af2a9f3001233d55ddfaf1f
0d7baeac2e1c984698f14b04c0ee7080178e9bb5
YJBeetle/QtAndroidAPI
/android-28/android/service/media/MediaBrowserService_Result.hpp
C++
hpp
640
permissive
#pragma once #include "./MediaBrowserService.def.hpp" #include "../../../JObject.hpp" #include "./MediaBrowserService_Result.def.hpp" namespace android::service::media { // Fields // Constructors // Methods inline void MediaBrowserService_Result::detach() const { callMethod<void>( "detach", "()V" )...
c500c82e8c2e362adf38e414e8c31623b3d16be1
b36318d865a9de433b9bc3141012f643a2f43572
solrac3658/CryptoniteTesis
/src/qt/sendcoinsdialog.cpp
C++
cpp
21,078
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "sendcoinsdialog.h" #include "ui_sendcoinsdialog.h" #include "addresstablemodel.h" #include "bitcoinunits.h" #includ...
9045ee2393e2ca875467d2097158ed56be2d7af0
304077b97389480aec809ebe7eba6b3c0144c7f5
NiumXp/Algoritmos-e-Estruturas-de-Dados
/src/cpp/BubbleSort.cpp
C++
cpp
838
permissive
#include <iostream> #include <vector> using namespace std; vector<int> bubbleSort(vector<int> vetor) { for (uint32_t fim = vetor.size()-1; fim > 0; --fim) { for (uint32_t indice = 0; indice < fim; ++indice) { if (vetor[indice] > vetor[indice+1]) { int tr...
dda9497cb74e225031ba27987c40abbb558622dd
c09ff84a7ea8bd931cdd20195f89327ebaf32036
razodactyl/darkreign2
/system/configfile.cpp
C++
cpp
4,543
no_license
/////////////////////////////////////////////////////////////////////////////// // // Copyright 1997-1999 Pandemic Studios, Dark Reign II // // Configuration File Utilities // // 16-JUL-1998 // /////////////////////////////////////////////////////////////////////////////// // // Includes // #include "co...
3fe45f156c635532b15ba24bfa1477e6e20a21d1
a985d441cf44d89ceeacdba144e88073b2164f41
alvaroiporre/ICPC-TRAINING
/SPOJ/PALDR.cpp
C++
cpp
1,311
no_license
#include<bits/stdc++.h> #define MAXN 1000010 #define p 1000007 using namespace std; int H[MAXN]; int r_H[MAXN]; int P[MAXN]; int hash_(int idx, int len) { return H[idx+len-1] - H[idx-1]*P[len]; } int r_hash(int idx, int len) { if (idx-len > 0) return r_H[idx] - r_H[idx-len]; else return r_H[idx]...
a901eecbeafb62ea8e9882a80ed130412a6b1e92
3aca1f265813ecbe6f2cc2350886ca105d00433e
NAU-CS/RcppExports
/packages/predkmeans/src/RcppExports.cpp
C++
cpp
2,637
no_license
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // loglikeCpp double loglikeCpp(arma::mat X, arma::mat b, arma::mat y, int n); RcppExport SEXP _predkmeans_loglikeCpp(SEXP...
dbd0e49970b9dc75d83bc138055e05b5b040189b
c1f60b06a9fa7efa8f04f5fb7704041e21be1cb0
basharovi/Codeforces-Solved
/96A.cpp
C++
cpp
439
no_license
#include <iostream> using namespace std; int main() { string word; cin >> word; auto count_0 = 0; auto count_1 = 0; for (auto c : word) { if (c == '0'){ count_0++; count_1 = 0; } else { count_1++; count_0 = 0; } if(count_0 >= 7 || count_1 >= 7)...
b2395ecf58aadbf6e293814bf45870d9d3564455
4a761efd83d651a2533befa45dd6121a7fab5202
YJL33/LeetCode
/current_session/algorithm/dp/452.cpp
C++
cpp
1,161
no_license
#include <iostream> #include <vector> using namespace std; class Solution { public: int findMinArrowShots(vector<vector<int>>& points) { // similar as 435, handle overlap carefully if(points.size() == 1) return 1; sort(points.begin(), points.end()); int prev_start = points[0][0], prev_end = points[0...
61e5fb6f3f557e7dbd600fc942b9e1918d539d54
ed54cecfef4094e32e32cd6b4143ff958d61819c
szaialt/CppGeometry
/Pascal-tetraeder5c/main.cc
C++
cc
8,290
no_license
#include <SDL.h> #include <SDL_gfxPrimitives.h> #include "global_functions.h" #include <vector> #include <SDL_keyboard.h> #include <SDL_events.h> #include <iostream> #include <time.h> using namespace std; long long min(long long a, long long b){ if (a < b) return a; else return b; } vector<vector<long long> >...
01f16aac7b4422e45ff487f30586f179574089df
79cc5881d83353f7d1b3bdb538d954ab9cab28d4
bentoper/Competitive
/Contests/CF672/c1.cpp
C++
cpp
1,566
no_license
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ff first #define ss second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define pv(x, n) fr(iii, n) printf("%d%c", x[iii], " \n"[iii==n-1]) #define pvv(x, n) frr(iii, n) pri...
624393f9f625ecbebc7d1352280db008d7568f58
0acba16a1cf6595349428b1106e3961cd99ae977
cadviz/AHRUnrealEngine
/Engine/Source/Editor/AnimGraph/Private/AnimGraphNode_Root.cpp
C++
cpp
2,275
no_license
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "AnimGraphPrivatePCH.h" #include "AnimGraphNode_Root.h" #include "GraphEditorSettings.h" ///////////////////////////////////////////////////// // FPoseLinkMappingRecord void FPoseLinkMappingRecord::PatchLinkIndex(uint8* DestinationPtr, int32 Link...
695c7d7a81860b69d00868f4de6ebcbb21a90fdd
d8371e87792fd68c3f95a79b5422b6ad2c3b3a83
SaschaMester/delicium
/components/invalidation/impl/ticl_invalidation_service.cc
C++
cc
15,506
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 "components/invalidation/impl/ticl_invalidation_service.h" #include "base/command_line.h" #include "base/metrics/histogram_macros.h" #include "c...
2840dc07888632f9985efb555f9a425793427521
121c76e4397ec261b613d067832efc1d1d4889dd
Eddie66666666/hello-world
/训练2.6.cpp
C++
cpp
513
no_license
//#include <stdio.h> //int main() //{ // int num=0; // for(printf("love computer");num!=6;) // { // scanf("%d",&num); // } // // // return 0; //} //#include <stdio.h> //int main() //{ // const int FIRST_OZ = 46; // const int NEXT_OZ = 20; // int ounces,cost; // // printf(" ounces cost \n"); // f...
24ed909c45c46b2a3dcbd97eaf3b3518bb746de8
a3f9385e339d9c96ba0d16499a1b818b416cdf93
spraetor/amdis2
/src/experimental/Recovery.cpp
C++
cpp
35,094
permissive
/****************************************************************************** * * AMDiS - Adaptive multidimensional simulations * * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis * * Authors: * Simon Vey, Thomas Witkowski, ...
6e9a316aad67a6e4ffeb2a6e415b1c912653c464
89feaa7dfa995736ee0e982ee2d8b8ef02a15d22
menify/sandbox
/aql/benchmark/lib_86/class_7.cpp
C++
cpp
310
permissive
#include "class_7.h" #include "class_1.h" #include "class_9.h" #include "class_3.h" #include "class_5.h" #include "class_7.h" #include <lib_84/class_7.h> #include <lib_38/class_0.h> #include <lib_8/class_2.h> #include <lib_5/class_8.h> #include <lib_74/class_9.h> class_7::class_7() {} class_7::~class_7() {}
d817b0eba67bf98011d951b4640fddb9137247eb
eac2838e3800bd33e1d0bc259645958fb3be3eec
bravesoftdz/cbuilder-vcl
/Include/Vcl/ixedit.hpp
C++
hpp
3,187
no_license
// Borland C++ Builder // Copyright (c) 1995, 2002 by Borland Software Corporation // All rights reserved // (DO NOT EDIT: machine generated header) 'Ixedit.pas' rev: 6.00 #ifndef IxeditHPP #define IxeditHPP #pragma delphiheader begin #pragma option push -w- #pragma option push -Vx #include <LibHelp.hpp>...
63de9e58da8e492898d6be5780782ef847cc5790
61ccc65097609632566876b90fdd217432dc2334
wuyuhang422/My-OI-Code
/ZROI/343.cpp
C++
cpp
3,376
no_license
#include <algorithm> #include <iostream> #include <cstring> #include <climits> #include <cstdio> #include <vector> #include <cstdlib> #include <ctime> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #define Re register #define LL long long #define U unsigned #define FOR(i,a,b) for(Re i...
08c50520d67e3c698dcd50c160173d8973d8d828
05d1ac9272999662528c7dd8edcaee24e8147e74
Hanaydn/LearningCpp
/15-3sales.cpp
C++
cpp
1,230
no_license
#include"15-3sales.h" using namespace std; Sales::bad_index::bad_index(int ix, const string & s) : logic_error(s), bi(ix){ } Sales::Sales(int yy){ year = yy; for(int i = 0; i < MONTHS; ++i){ gross[i] = 0; } } Sales::Sales(int yy, const double * gr, int n){ year = yy; int lim = (n < MONTHS)? n : MONTHS; int i; ...
8021483968a1ebd08ca64796e18cecb48612377b
e29ccf6c0faf5ff720c769d51b9cac442d755d56
Ironman0505/Spoj-1
/ANARC05B.cpp
C++
cpp
1,417
no_license
#include<stdio.h> #include<string.h> long long int a[1000000],b[1000000],c[1000000],d[1000000],e[1000000],i,j,k; int main() { long long int l,m,n; scanf("%lld",&m); while(m!=0) { memset(e,0,sizeof(e)); memset(d,0,sizeof(d)); l=0; for(i=0;i<m;i++) scanf("%lld",&a[i]); scanf("%lld",&n); f...
e70ca35ac6cd3a463afd74d66a1b5788019cccb8
89bfb7d1e2ca4b0fb9a994e58930392738e8cd20
saihv/UE4-CineCameraCaptureComponent
/CineCameraCaptureComponent.cpp
C++
cpp
12,196
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "CineCameraCaptureComponent.h" #include "Engine/World.h" #include "StereoRendering.h" #include "SceneInterface.h" #include "Logging/MessageLog.h" #include "SceneManagement.h" #define LOCTEXT_NAMESPACE "CineCameraCaptureComponent" ...
8b19036a9063fea13b9940c29fe46e005aef8307
3342d28f028b228bbca6d5c1e11dbc522eeff323
Shoukozumi/sudoku
/sudokucrack.cpp
C++
cpp
3,647
no_license
/************************************************************************* > File Name: sudokucrack.cpp > Author: zj > Mail: zhangjian0395@163.com > Created Time: Sat 27 May 2017 11:52:43 AM CST ************************************************************************/ #include<iostream> #include <random> #include...
b34634f1e6fae67df321a11311dbdc3a7e86ebd9
a4f2ce424bb80a66bfb9dbb156f0aae517da450f
andrascii/spiderpp
/spiderpp/src/load_schedule.cpp
C++
cpp
5,385
no_license
#include "load_schedule.h" #include "service_locator.h" #include "common_constants.h" namespace spiderpp { LoadSchedule::LoadSchedule(QObject* parent) : QObject(parent) , m_limitCrawledLinksCount(-1) { } void LoadSchedule::addUrl(const Url& url, HttpLoadType requestType) { std::lock_guard locker(m_mutex); addUrl...
14625ecc9f8cd2a0053e603f29e08c9be95b8f77
426b6a6dda69c30221a81e4a9167cdbe8500df69
henningkoehlernz/unified
/Plugins/SkillRanks/SkillRanks.hpp
C++
hpp
1,646
permissive
#pragma once #include "Plugin.hpp" #include "Services/Events/Events.hpp" #include "Services/Hooks/Hooks.hpp" #include <bitset> #include <map> using ArgumentStack = NWNXLib::Services::Events::ArgumentStack; namespace SkillRanks { class SkillRanks : public NWNXLib::Plugin { public: SkillRanks(const Plugin::Create...
af62b837f7da28f04fd5c0878e3dc95c4dc59d05
d253ed7fb85268701f390b07dc16a3984bc015c1
Homagn/Pokemon-Go-at-Home
/Texture.cpp
C++
cpp
24,534
no_license
// // Texture.cpp // HCI557_Simple_Texture // // Created by Rafael Radkowski on 10/10/15. // // #include "Texture.h" #ifdef WIN32 string GLTexture::_glsl_names[2] = { "tex", "texture_blend"}; string GLMultiTexture::_glsl_names[4] = { "texture_background","texture_midground", "texture_foreground", "...
a400f592d69237ccf91c665dc69239df72c9a922
5aaa2c0b5cb2e2c17b37a080b678dbc13a8531c8
ashleyvasquez/TecFlixx
/Info.cpp
C++
cpp
3,691
no_license
// // Created by ashley on 26/9/19. // #include "Info.h" Info::Info(QWidget *parent) { this->resize(600,500); QLabel* lbl2 = new QLabel(this); lbl2->setGeometry(50, 105, 300, 30); lbl2->setFont(QFont("Segoe UI", 12)); lbl2->setText("Director:"); QLabel* lbl3 = new QLabel(this); lbl3->...
fedc05b0d910ae6a979c8a885233d8e4f9b39f66
390bdc4517d345d1937544c14f910aa231b12574
Guardian820/chromium
/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
C++
cc
58,003
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h" #include <stddef.h> #include <stdint.h> #include <cstdlib> #includ...
285cfd565b2bb99a5cef50c385fdf59e974a4225
51ab849ab76b36d026b84d5ff942338668b80502
gauravengine/CPP_Freak
/sublime-assets/debug_hint_snippet.cpp
C++
cpp
2,946
no_license
#include<iostream> #include <vector> #include <set> #include <map> using namespace std; /* -------------------This is the part you need to copy ----------------------*/ #if DEBUG && !ONLINE_JUDGE // Author : Nikhil Garg #define debug(args...) (Debugger()) , args class Debugger { ...
f31e193c14ddaebb1cdd1fd843ff487fae4b1d4b
f6caaa0e5032c6fba7c2d6323c4c49b8f1a9779f
ivogeorg/text
/tensorflow_text/core/ops/split_merge_tokenize_op.cc
C++
cc
3,976
permissive
// Copyright 2020 TF.Text 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
98b21d7a792c4bc0778491354e4b5fe0659c1008
86c5e2c92c2f93f929cc3c718ada60edaeda87ce
SREERAGI18/chromium
/chrome/browser/subresource_redirect/https_image_compression_infobar_decider_unittest.cc
C++
cc
5,843
permissive
// Copyright 2020 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/subresource_redirect/https_image_compression_infobar_decider.h" #include <memory> #include "base/command_line.h" #include "base...
5c1e951cf53a01e4a9a180bde77ac0ed281f6ff2
0c443ec823000407c9f1850fd8c4a5254dc44fd2
k22o/algorithm_samples
/dynamic_planning/knapsack_nonLimitNum.cpp
C++
cpp
898
no_license
#include <bits/stdc++.h> using namespace std; using ll = long long int; #define INF 100000000 #define rep(i,a,b) for(int (i)=a;(i)<(int)(b);(i)++) //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=DPL_1_C&lang=jp int main(){ int N,W; cin >> N >> W; vector<ll> v(N,0),w(N,0); rep(i,0,...
8c0cd549b57f47e5082ab24dab354c385e2e55a6
6d3710d85d4507c062f70e89408e85becea05e7b
zhangyy91/StreamLEC
/src/net/random.cpp
C++
cpp
1,239
permissive
/* Copyright (c) 2007-2013 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 ...
1e59ebb1a5ba1ece6badddd4937115a3ed06470a
71357ba03d7d093bc60e7aa78213c88a94e994f9
shubhii0206/LeetcodeSolutions
/closeStrings.cpp
C++
cpp
1,445
no_license
class Solution { public: bool closeStrings(string word1, string word2) { if(word1.size() != word2.size()) return false; unordered_set<char> s1, s2; sort(word1.begin(), word1.end()); sort(word2.begin(), word2.end()); for(char ch: word1) {s...
df12fe94d572cdb69cb5ad493e88de035dc16a37
b9f0c5679089f43fddde48e6ccef2fd5fbf6bd1e
kulup07/hhvm
/hphp/hhbbc/interp.cpp
C++
cpp
145,039
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +---------...
e093ee411ffa5ea4ee21b23a3c4de5abbf5f9163
f5af97f8d519a014c447b61cc7c01d8e54e4cb79
cha63506/urho3d_old_mirror
/Source/Engine/Script/Addons.cpp
C++
cpp
58,799
permissive
// // Copyright (c) 2008-2013 the Urho3D project. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, mod...
739851e9ed166568181896e615368495d01792ac
40641deb9cff9a61303556b851f16481e226110e
Dotosoft/game01-cpp-simple2d
/Classes/simpleshooter/Monster.cpp
C++
cpp
556
permissive
#include "simpleshooter/Monster.h" #include "cocos2d.h" USING_NS_CC; using namespace simpleshooter; Monster::Monster(const std::string& filename, int p_hp, int p_minMoveDuration, int p_maxMoveDuration) { if( initWithFile( filename ) ) { this->hp = p_hp; this->minMoveDuration = p_minMoveDuration; this->maxMoveD...
93a21eb5cb7c643f75c0bfc510440d7051a6cf0b
5da828be31e134f5ed8b47e9013294402d244fa6
yao20570/castle
/Classes/Model/BaseSprite.cpp
C++
cpp
9,436
no_license
#include "BaseSprite.h" #include "Utils/ConfigMgr.h" #include "Skill/SkillMgr.h" #include "Skill/SkillEffectFactory.h" #include "Dlg/Fight/AIMgr.h" #include "Cocos2dEx/SkillEffectAnim.h" BaseSprite::BaseSprite() : _ai(nullptr) , _is_boos(false) , _prePosList() , _arm(nullptr) , _xixue(0) , _hurt_more(0) ...
e9174867475d23ed7117f1578b2fb468fece0a86
c9cbd2022e0a5c114a61c447cce5c28b2bce8952
swift-arm/swift
/lib/IRGen/IRGenDebugInfo.cpp
C++
cpp
71,723
permissive
//===--- IRGenDebugInfo.cpp - Debug Info Support --------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
255ad5347eec9f1494bc99242aa88ab1155524d0
024b6c1ddced8a0a88583b86df51d3df076b058f
yomo11/DS-bonus
/GD03.cpp
C++
cpp
429
no_license
#include<cstdio> #include<cstdlib> #include<cmath> #include<algorithm> #include<cstring> typedef long long lint; using namespace std; int main(){ int n; scanf("%d",&n); int sum=0; int a[n+5]; for(int i=0;i<n;i++){ scanf("%d",&a[i]); } sort(a,a+n); ...
cfc053f5c1752875f9c9cf81a24aca4102bad3e1
1d420e2f1b5fcf7ac602b0f988f2d8f2cc0be3e8
fedeball/Database-Updater-Cpp
/src/main.cpp
C++
cpp
4,151
no_license
#include <iostream> #include <string> #include <fstream> #include <algorithm> #include <chrono> #include <thread> #include <ctime> #include <iomanip> #include <sstream> #include "Parser.h" #include "Stock.h" #include "News.h" using namespace std; /* Notes: the `rv` and `res` variable names stand for `return valu...
4f85d7228a05edf3072c9636e12bc773a0a55faa
fbc9e00384ab97993511aa0e32936dfd0b347a71
niki999922/Algo-DM-laba
/Algo 4 term/solve 1 contest/task_A.cpp
C++
cpp
3,112
no_license
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <queue> #include <map> #define ll long long using namespace std; const int INF = INT32_MAX / 3; struct Edge { int flow; int max_flow; bool live; Edge(int m_f = 0) : flow(0), max_flow(m_f), live(0) {} };...
33a27d0952d4602d9903813faead09ae76b1cd46
be6096862c68f76306483d1fc4590ae9d7c2ce56
iampreetsimar/dsa-practice
/19. Number Theory Basics/3. primeFactorisation_TrialDivision.cpp
C++
cpp
1,228
no_license
#include <iostream> #include <vector> using namespace std; void findFactors_naiveApproach(int n) { // O(N) vector<pair<int, int>> factors; for(int i = 2; i <= n; i++) { if(n % i == 0) { int count = 0; while(n % i == 0) { count++; n /= i; ...
43576529b712e3cc7987721ddee4d5c7fdc3485b
649bf9e2746ff6fb3e88b996a108de5ed34a64f6
Quasrain/QuasDB
/kv/test/recovery_test.cpp
C++
cpp
10,015
permissive
#include "gtest/gtest.h" #include "kv/db/db_impl.h" #include "kv/db/filename.h" #include "kv/db/version_set.h" #include "kv/db/write_batch_internal.h" #include "kv/include/db.h" #include "kv/include/env.h" #include "kv/include/write_batch.h" #include "kv/util/logging.h" #include "kv/util/testhelper.h" namespace QuasDB...
5fa43ecc017c735c2e57134ffa478bb6d1684172
60385037954c9d64bec7c83406acc89c80b396be
zxzql/ouzel
/ouzel/audio/Panner.cpp
C++
cpp
3,222
permissive
// Copyright 2015-2018 Elviss Strazdins. All rights reserved. #include "Panner.hpp" #include "Audio.hpp" #include "scene/Actor.hpp" namespace ouzel { namespace audio { class PannerProcessor final: public Node { public: PannerProcessor() { } ...
67b7ab5dc8ed154d34d975ccbbd3e05815116050
f54a1568c602e62187e2a71945da77334039d2f0
nwjs/chromium.src
/ui/gl/direct_composition_support.cc
C++
cc
29,273
permissive
// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/gl/direct_composition_support.h" #include <dxgi1_6.h> #include "base/command_line.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogr...
34e966f09cd6d319ddbc67bf899bbeefa1c42340
23f76ebc49ddaed0e56216965eeef7fb44067b94
hschuelter/uni-general
/CGR/Robot/Braco.hpp
C++
hpp
408
no_license
#ifndef BRACO_HPP #define BRACO_HPP #include "Antebraco.hpp" class Braco { private: GLUquadricObj *quadric; GLfloat base, top, height; GLint slices, stacks; int sentido, ang, max_ang, min_ang; GLfloat dir_vel; Antebraco *antebraco; public: Braco(GLfloat base, GLfloat top, GLfloat height, G...
e35545f359d1d34166247691f15ad37ca124a447
6cffa3e2465bee4f3cf330a753387e5f16ced25c
gilfredors/dikjstra
/Graph.cpp
C++
cpp
3,403
no_license
/* * Graph.cpp * * Created on: 17 Mar 2018 * Author: gilfredoremon */ #include <random> #include "Graph.h" using namespace std; using namespace dijkstra; static inline double prob() { return rand()/(double(RAND_MAX) + 1.0); } /* Use this function if edges should be double * static inline double fRand(d...
bd46438640b99cb086c672a8f6059eed6e2fc91e
cc5e52b9cbc82e57ebe5d369bb665d117824efa2
ngot/libv8
/v8/src/base/platform/platform-linux.cc
C++
cc
10,358
no_license
#include "include/osconfig.h" #ifdef Linux // Copyright 2012 the V8 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. // Platform-specific code for Linux goes here. For the POSIX-compatible // parts, the implementation is in ...
1de83e1dbecf023e3cf2fff17b5f994adb6e6631
3402fee833bcdad67a03daf002a0e26cae2bfbea
jamezilla/VoronoiBoulder
/sketches/BoulderGatewayTest/BoulderManager.cpp
C++
cpp
1,885
no_license
#include "BoulderManager.h" String RGBToHex(int r, int g, int b) { char hex[7] = {0}; sprintf(hex, "%02X%02X%02X", r, g, b); //convert to an hexadecimal string. Lookup sprintf for what %02X means return String(hex); } BoulderManager::BoulderManager() { } //Boulder Data Functions//////////////////////////////...