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
a41fe4e70905517fd30c5f4aa47e6b4485ca38cd
c654c973bb4a963df660c8992d1c8e13c22833c8
zasoniak/Gierek_XAML
/Gierek/Common/SuspensionManager.cpp
C++
cpp
16,290
no_license
// // SuspensionManager.cpp // Implementation of the SuspensionManager class // #include "pch.h" #include "SuspensionManager.h" #include <algorithm> using namespace Gierek::Common; using namespace concurrency; using namespace Platform; using namespace Platform::Collections; using namespace Windows::Foundation; usi...
6792cadd6e619adea930ef5941d93dff120112c2
1e52c264efc9bf0beafaa32e7940425cc4477de2
hanzh015/ImageWarping
/MiniImageFrame/RBFWarp.cpp
C++
cpp
1,895
no_license
#include "RBFWarp.h" RBFWarp::RBFWarp(void) { } RBFWarp::RBFWarp(vector <Line*> point,int offsx,int offsy):ImageWarp(point,offsx,offsy) { //We assume the affine part is identical //using Guassians as basis functions MatrixXf equations_; VectorXf temp_sol; VectorXf q_vec_x; VectorXf q_vec_y; int xi,yi,xj,yj; ...
d16a0740de7749eba6b02ec7438e46d0379d8dc8
4eae1b7366ca311e5aa4c0da4455af98ba5b3ff5
yoruhi/QT
/firstQtProject/main.cpp
C++
cpp
271
no_license
#include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton bouton("Salut les Zéros, la forme ?"); bouton.show(); bouton.setToolTip("coucou tooltip"); return app.exec(); }
8a66c3186fa73903f4c33351f6d8273ffa02f1ea
9f915aeb99ba2d75af8f50c711f8bdfcf7f7c329
nishu112/Geek-Codes
/GeeksforGeeks/Largest prime factor.cpp
C++
cpp
602
no_license
//incomplete #include<iostream> using namespace std; int checkprime(long long int n) { if(n==1) return 0; for(int i=2;i*i<=n;i++) { if(n%i==0) return 0; } return 1; } int main() { int t; cin>>t; while(t--) { long long int n,i,x; cin>>n; //int a[n+1]; x=n; int last; if(checkprim...
eb5b149ea2cade89d7f5cfc7a45f02f32872f251
a0d71a6e6b89c253854394f70cf17c31d382f377
jozadaquebatista/DQBIX-Game-Engine
/src/Text.cpp
C++
cpp
1,640
permissive
#include "../include/Text.h" #include "../include/GameWindow.h" void Text::draw(SceneTree* tree) { if (!m_font) return; Vector3 sc = getTransform()->getScale(); if (!(sc.y < 0)) getTransform()->setScale(Vector3(sc.x, sc.y*-1, sc.z)); m_font->use(); glActiveTexture(GL_TEXTURE0); if (m_sh...
99b9e850c542d3234429209b6984b1e7171c537f
ff9ff8b31fbf63efa7bdd6b052a236b0ef0ce925
brunolauze/openpegasus-providers
/src/Providers/UNIXProviders/AverageRateMeterService/UNIX_AverageRateMeterService_ZOS.hxx
C++
hxx
1,829
permissive
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor lice...
9b0a1086bcf4b699a2a649cf1b4e2734f8a35581
b30530350ee2c86ad2381a0f223ab9d09ebe60a6
henrybee89/HeroWars
/test11/Paladin.cpp
C++
cpp
581
no_license
#include"Paladin.h" Paladin::Paladin() { } Paladin::~Paladin() { } std::string Paladin::attack() { unsigned int size = _Paladins.size(); if (_Paladins.size() > 0) { for (unsigned int i = 0; i < size; i++) { std::cout << std::endl << _Paladins[i]->getName() << " swings his holy hammer!" << std::endl; } ...
3e01b38a3555c18c985aecc44366ca534ad71830
04c6d27b7b5c532c4a29c81a986f0a4e29377a73
szhsunshine/Old_1_Core
/src/server/game/Server/WorldSession.cpp
C++
cpp
45,127
no_license
/* * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either ver...
462b64f29ce4565a48c7912078eedd019c3884e1
21aed4ececb579b5c0bfe87ea110f9c928477626
opencor/llvmclang
/lib/Target/AMDGPU/SIRegisterInfo.cpp
C++
cpp
103,639
permissive
//===-- SIRegisterInfo.cpp - SI Register Information ---------------------===// // // 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 // //===----------------------------...
a2c9f4c35b5b6383d25d1711a37fd95ab4a2935f
3ab9305fa5aca3f1f5bed364a9461a4e08f6909f
TasFIa003/Discrete-lab
/descrete/cplx3.cpp
C++
cpp
624
no_license
#include<bits/stdc++.h> using namespace std; int main() { int counter=0,n,a[100]; cin>>n; for(int i=0; i<n; i++) { cin>>a[i]; } int key,j; for (int i = 1; i < n; i++) { key = a[i]; j=i-1; while (j >= 0 && a[j] > key) { ...
86f8c845ef7ae060a2cddf18cbbaf127a224c6ed
153db0d80a6cb75478f56bcd1466216432c17084
CadQuery/OCP
/opencascade/FairCurve_BattenLaw.hxx
C++
hxx
2,163
permissive
// Created on: 1996-01-26 // Created by: Philippe MANGIN // Copyright (c) 1996-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GN...
a3511b0ef33c4aa8b6d4ece12b9cd08a4710027c
9b8937706dd15b030b1b83f4fbdd3b2c904f98e2
ISISComputingGroup/EPICS-utilities
/utilitiesApp/src/getProcessUptime.cpp
C++
cpp
1,902
no_license
#include <windows.h> #include <tlhelp32.h> #include <string> #include <epicsMutex.h> #include <epicsGuard.h> #include <epicsExport.h> #include "utilities.h" /// filetime uses 100ns units, returns difference in seconds static double diffFileTimes(const FILETIME& f1, const FILETIME& f2) { ULARGE_INTEGER u1, u2; u1...
9bf86c49757366de8bdb1561888b1a056f8d958d
456c0a3477ece6e95060eff6ed60193216cc9cbe
ksaveljev/UVa-online-judge
/11513.cpp
C++
cpp
1,776
no_license
#include <iostream> #include <algorithm> #include <queue> #include <map> #include <sstream> using namespace std; int nums[9]; map<string,bool> visited; map<string,string> result; void precalculate() { pair<string,string> tmp; queue< pair<string,string> > q; tmp.first = "123456789"; tmp.second = ""; visited...
83bf40cb57cd3c844a67cc5ca77e67fed3d07bad
1356aab0bcad1e05bb32c5b8b4abea83773f2450
absir/Rose
/apps-src/apps/librose/color_range.cpp
C++
cpp
5,294
permissive
/* $Id: color_range.cpp 47838 2010-12-05 18:09:54Z mordante $ */ /* Copyright (C) 2003 - 2010 by David White <dave@whitevine.net> Part of the Battle for Wesnoth Project http://www.wesnoth.org/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public ...
5e04ca57ab018ee72a295e27b48a385944386210
5e5f7c49176aa3c4780e4b20f03fdf203e0dda3d
ahuizxc/heterogeneity-aware-lowering-and-optimization
/tests/unittests/lit_cases/test_dnnl/test_log_example_dnnl.cc
C++
cc
1,763
permissive
//===-test_log_example_dnnl.cc-----------------------------------------------------------===// // // Copyright (C) 2019-2020 Alibaba Group Holding Limited. // // 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 o...
b59d8781c51a542762840adfd149ce9444f863d2
e1cbbc4f756509bb95bab547305e219ff658871c
Projects-stack/100DaysOfCoding
/Data Structures/DoublyLinkedList.cpp
C++
cpp
1,210
no_license
#include<iostream> using namespace std; struct Node { int data; struct Node *next; struct Node *prev; }; struct Node *head; void insert(int newdata) { struct Node *newnode = new Node; newnode->data = newdata; newnode->prev = NULL; newnode->next = head; if(head != NULL) head->prev = newn...
2084d1b3f0dcadade4e14b6b3fbac3e6c6185fbc
62b34afcd267e8a7e235cfc97e806e577a4aae62
saiful130104/Problem-Solving
/UVA-Problem Solutions/Solutions In C++/543.cpp
C++
cpp
1,171
no_license
///problem link:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=484 #include <cstdio> #include <cmath> #include <cstring> #include <iostream> using namespace std; #define MAX 1000001 char prime[MAX]; int primenum[MAX]; long long int i,j,x; void prime_generat...
bd9468d2e25f46bc2590d1e32eeb09b430ea731a
98537de4eb1f07dbaa66014d5a34f09ba30bfb8b
pandevim/Code-Archive
/Author/Highway_to_Hell/main.cc
C++
cc
275
permissive
#include <bits/stdc++.h> unsigned long long ways ( int n ) { return (n <= 1) ? 1 : ways(n - 1) + ways(n - 2); } int main ( void ) { int t; std::cin >> t; for ( int i = 0; i < t; ++i ) { int n; std::cin >> n; std::cout << ways(n) << " "; } puts(""); return 0; }
b16a55c9a4515ff9a33ab8ade8b5adeb347fa482
fa28d3790f11823d342cc554b517cbfca2aa0f65
Ymarji/cpp_picine
/day03/ex03/Character.hpp
C++
hpp
525
no_license
#ifndef CHARACTER_HPP #define CHARACTER_HPP #include "ICharacter.hpp" class Character: public ICharacter { public: Character(); Character(std::string); Character(Character const &); Character& operator= (Character const &); std::string const & getName() const; void equip(AMateria* m); void unequip(int ...
127527ba1342651b185936c3f48b6a251c52efb4
cb038b4438aa67b3102dd3c618ac698d659cb744
hbt19860104/libgo
/test/gtest_unit/stack_rollback.cpp
C++
cpp
794
permissive
#include <iostream> #include <gtest/gtest.h> #include <chrono> #include <atomic> #include <boost/thread.hpp> #include "gtest_exit.h" #include "coroutine.h" using namespace std; using namespace co; std::atomic_int rollback{0}; struct A { ~A() { ++rollback; } }; TEST(testRollback, testRollback) { E...
76195b0b85a07ba155daf743769decb932d83ac4
212f10009b45401467e1174ab5713249c1e12315
VladislavRomanuik/Game-Arkanoid-
/GameObject.cpp
C++
cpp
10,050
no_license
#include "GameObject.h" #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" extern unsigned int texture[25]; string GameObject::GetPath(string nameFile) { string s = __argv[0]; string::size_type pos = s.find_last_of("\\/"); path = s.substr(0, pos) + "\\" + nameFile; return path; } v...
2f951698924dfa19d0deb7c1f5936631e0ef021a
dd249e874073d0e7891ab99f973832db8b379027
QPC-database/aws-sdk-cpp
/aws-cpp-sdk-eks/source/model/TagResourceResult.cpp
C++
cpp
801
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/eks/model/TagResourceResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #include <aws/core/uti...
7153773219ca9a4fd0e3046425a0e80265284bcb
62c05efd0f89b6b0dc44741613fa42879a23f5dc
kamyu104/LeetCode-Solutions
/C++/longest-common-subsequence-between-sorted-arrays.cpp
C++
cpp
1,693
permissive
// Time: O(m * n) // Space: O(l), l is min(len(arr) for arr in arrays) class Solution { public: vector<int> longestCommomSubsequence(vector<vector<int>>& arrays) { const auto min_cit = min_element(cbegin(arrays), cend(arrays), [](const auto& a, const auto& b) { ...
ab91babbd7aadfb07db958896433810da52fe3e9
ec4aa4ae1fb78bf634f66ac1bf8a79a094b50e7d
radtek/MTI_WINCE317_BSP
/PUBLIC/PowerVR-SDK/OGLES2/TrainingCourse/23_AnisotropicLighting/OGLES2/Content/SlowFragShader.cpp
C++
cpp
2,861
no_license
/****************************************************************************** @File SlowFragShader.cpp @Title @Copyright Copyright (C) 2000 - 2008 by Imagination Technologies Limited. @Platform @Description **************************************************************************...
b3c9fe5a7a526f99d1516e061fc804286a15e974
712b00f23ff27afa32599386992d29c75b0c500f
kenongit/sequencing
/ncbi-blast-2.2.27+-src/c++/src/objects/seqfeat/OrgName.cpp
C++
cpp
3,384
permissive
/* $Id: OrgName.cpp 371868 2012-08-13 15:10:25Z rafanovi $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work...
1e039902296c6215a8cb3bd57123da6641dd808f
ffef182a39a78b83a78b3e8f14042500510141c3
wmoore28/clas12-epics-third-party-libs
/smixx_v47r1/x86/src/translator/state.hxx
C++
hxx
1,043
no_license
//----------------------------------------------------------------------- // State Class // B. Franek // 28 March 1999 //----------------------------------------------------------------------- // #if...
ab9b0e03ed07cb7866692f3b57ca0720c70ad981
9d28951d5aa92e094bfa68a034e2ebbb799e0656
dpkay/fingerglass
/src/afterglowbubble.cpp
C++
cpp
1,703
no_license
#include "afterglowbubble.h" #include <QLineF> int AfterGlowBubble::_life_span = 0; // -------------------------------------------------------- const QRectF & AfterGlowBubble::bubbleRect() const { Q_ASSERT(hasBubble()); return *_bubble_rect; } // -------------------------------------------------------- const QTime...
633a3e991367b88f7c619d2e73e08ca16c815149
a18046c7bdac3332f1c5ba54c3b12873ba711165
cms-sw/cmssw
/FWCore/ParameterSetReader/src/ParameterSetReader.cc
C++
cc
1,084
permissive
#include "FWCore/ParameterSetReader/interface/ParameterSetReader.h" #include "FWCore/PythonParameterSet/interface/PyBind11ProcessDesc.h" #include "FWCore/PythonParameterSet/interface/MakePyBind11ParameterSets.h" std::unique_ptr<edm::ParameterSet> edm::getPSetFromConfig(const std::string& config) { return PyBind11Pro...
dc6010eef7a67fdb4e93ffe666653a378ac94232
1361455c5cdde35f8462c64cdb8f2847f449cfe5
osoyoo/Osoyoo-development-kits
/Arduino Libraries/Fingerprint-Sensor/DYE_Fingerprint.cpp
C++
cpp
13,112
no_license
#include "DYE_Fingerprint.h" #if defined(__AVR__) || defined(ESP8266) #include <SoftwareSerial.h> #endif //#define FINGERPRINT_DEBUG #if ARDUINO >= 100 #define SERIAL_WRITE(...) mySerial->write(__VA_ARGS__) #else #define SERIAL_WRITE(...) mySerial->write(__VA_ARGS__, BYTE) #endif #define SERIAL_WRITE_U16(v) ...
24a5f060165f93959b7e45163046cec8867eeac9
c35813085ff774820d9ef7a60d2655b6f0d290a1
harryprabowo/engifarm-destructor
/src/main.cpp
C++
cpp
13,323
permissive
#include <iostream> #include "class/renderables/obj/Player.h" using namespace std; string mainScreen(Map *m, Player *p) { cout << endl << "WELCOME TO ENGI::~FARM()" << endl; cout << "=====================================================" << endl; m->print(); p->printInventory(); cout << endl; ...
a4b59bcbdbec0631fd6d6d7ad24b2e1b01839716
cb2eab3a636bc43cbc6f89a8e71942a9108fb471
Robert-Ordis/info.robert-ordis.b2component-test
/frameworks/runtime-src/Classes/ro-library/fake-3d/component/FakeZPhysicsComponent_IMPLS/FakeZPhysicsComponent_UPDATE.cpp
C++
cpp
6,550
no_license
/** * @file FakeZPhysicsCoponent_UPDATE.cpp * @brief FakeZPhysicsCoponentクラスupdate部分寄せ集め * @author Robert_Ordis * */ #include "../FakeZPhysicsComponent.h" #include "../../world/FakeZPhysicsWorld.h" #include <cocos2d.h> #define FLOAT_ISINCALCULABLE(val) (isnan(val) || isinf(val)) USING_NS_CC; float FakeZPhysicsCo...
9daeeb8b672a2a9f8330a71fa217e4a1f33516b7
35d80bc7826b2280ca8b19f3bbacb4e97154a311
juanmarcus/ibi
/other/plugins/texture_loader_transfer_func.cpp
C++
cpp
1,377
no_license
/* * texture_loader_qt.cpp * * Created on: Nov 2, 2009 * Author: juanmarcus */ #include "ibi_internal.h" #include "ibi_texturemanager/TextureManager.h" #include "ibi_gl/Texture.h" #include "ibi_error/Exception.h" #include <boost/any.hpp> #include <QtGui/QImage> #include <QtOpenGL/QGLWidget> using BEGIN_NAM...
c631e7b7caee70823174b9a22a7835841be0e087
a924bb00096a385304c752ddec84cbb4802003bc
evan-hossain/competitive-programming
/contests/Codeforces Round #280 (Div. 2)/C.cpp
C++
cpp
3,018
no_license
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmat...
af9278013cb16aebfca52a112043cbb497061524
c19acb094cd7eb8c7c537e596f617c7a4722da57
Prophetto/xray-oxygen
/code/engine.vc2008/xrEngine/Text_Console.cpp
C++
cpp
6,690
permissive
#include "stdafx.h" #include "Text_Console.h" #include "line_editor.h" extern char const * const ioc_prompt; extern char const * const ch_cursor; CTextConsole::CTextConsole() { m_pMainWnd = NULL; m_hConsoleWnd = NULL; m_hLogWnd = NULL; m_hLogWndFont = NULL; m_bScrollLog = true; m_dwStartLine = 0; m...
6cd6e4d73c8a0d81e424db4b24d5d5121497e9a3
7168dd0f7e33cb8f77012964865eda9ac5974d33
Bairuo/Cryptography
/src/rsagenerator/main.cpp
C++
cpp
1,600
no_license
#include<iostream> #include<fstream> #include<sstream> #include<stdlib.h> #include<time.h> #include"GenUtilities.h" using namespace std; #if defined(_WIN32) static const string helpFilePath = "..\\..\\doc\\rsagen-help.txt"; #else static const string helpFilePath = "../../doc/rsagen-help.txt"; #endif int main() { ...
8301ce0d0799ad7d0d1d1f3593ca44586ecf3f10
b6f3253590babbcf9621f47041f14f21f1525b6f
ultimatelife/Zino-by-BAEKJOON_Algorithm
/1967.cpp
C++
cpp
1,031
no_license
#include <iostream> #include <vector> #include <queue> #include <map> #include <algorithm> using namespace std; typedef pair<int, int> P; int maxNode = 0, maxNodeValue = 0; int num, result = 0; vector<P> edge[10001]; void findMaxNodeDFS(int node, int beforeNode, int sum){ if (edge[node].size() == 1 && node != be...
e3058752daddb01c18c356cdf2607152fbf2db16
bcd070d5fa79182d56588e721f495a1501af6c8e
demonpi/SIMS
/SIMS/DatabaseOperate.cpp
C++
cpp
885
no_license
#include "DatabaseOperate.h" DatabaseOperate* DatabaseOperate::m_singleton = nullptr; DatabaseOperate * DatabaseOperate::getInstance() { if (m_singleton == __nullptr) { m_singleton = new DatabaseOperate(); } return m_singleton; } DatabaseOperate::DatabaseOperate() { //TODO:由数据库控制类读入配置文件 } DatabaseOperate:...
5023cfa03e32822dc63601424f8fe710e80fd0ac
b9ae656690ca3608a01a5158472562091c6cf422
PixelExperience/external_icu
/icu4c/source/test/intltest/caltest.cpp
C++
cpp
142,832
permissive
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /************************************************************************ * COPYRIGHT: * Copyright (c) 1997-2016, International Business Machines Corporation * and others. All Rights Reserved. ***********...
d8e0b90e3ec8912c9abafc9858b9663023431a26
a55411fc0e251cc4788c9b04f06c75f272d32abf
cubeapp/unit-dmkit
/src/remote_service_manager.cpp
C++
cpp
14,365
permissive
// Copyright (c) 2018 Baidu, Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by app...
460313760ed509881567f02915caee1ca8f3ecff
04d4ac85dba672e9ac90925d43197314078d27c6
DDan1l232/SoT-SDK
/SDK/SoT_BP_FishingFish_Battlegill_05_Colour_02_Sky_functions.cpp
C++
cpp
888
no_license
// Sea of Thieves (2.0.17) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_BP_FishingFish_Battlegill_05_Colour_02_Sky_parameters.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //---------------------------------------------------------...
5da252f606ab177f214f639f17807c70be592151
0d0f0ad05bc9f9f5e1cc86ce27dbdf77fb893384
rudaoshi/huge_lr
/vowpalwabbit/sender.cc
C++
cc
2,953
no_license
#include <vector> #ifdef _WIN32 #include <WinSock2.h> #ifndef SHUT_RD # define SHUT_RD SD_RECEIVE #endif #ifndef SHUT_WR # define SHUT_WR SD_SEND #endif #ifndef SHUT_RDWR # define SHUT_RDWR SD_BOTH #endif #else #include <netdb.h> #endif #include "io_buf.h" #include "cache.h" #include "simple_label.h" #include "...
72a5b47a51ee9e3bbaefeb7affa5176ed3be23ba
1640c5ef266861138b75536d741db82a1743ac4b
like98100/ComputerGraphics_3
/Tuto(0507~)/Tutorial15/Tutorial/main.cpp
C++
cpp
7,188
no_license
//windows 운영 프로그램(.exe) //////////////////////////////////////////////////////////////////////////////// // Filename: main.cpp //////////////////////////////////////////////////////////////////////////////// #include "systemclass.h" #include <fstream> typedef struct { float x, y, z; }VertexType; typedef struct { in...
41d15e01616f83187c9ffb891f1c469814af1cac
cf341b1a47b7791db2854012bf0986ce665d093c
chanlil/CS162
/assignment-4-chanlil-master/assignment-4-chanlil-master/Event.hpp
C++
hpp
530
no_license
/********************************************************************* ** Program Filename: Event.hpp ** Author: Lilian Chan ** Date: 3/2/2019 ** Description: This is the event template ** Input: N/A ** Output: N/A *********************************************************************/ #ifndef EVENT_HPP #define EVENT_H...
a5337592377a28ca6458f23edd5e029a4eb6c94e
79e3617d849b0b161818721eed5f6e70b697b780
googleapis/google-cloud-cpp
/google/cloud/bigquery/v2/minimal/internal/project_options.cc
C++
cc
2,100
permissive
// Copyright 2023 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
c912ebf7566a90c1bb9b48bd3bd6dbfd189d7891
50f792e07a86631a93400434f1d8fd345b7a647d
Pyk017/Important-Algorithms
/Activity_Selection_Problem/C/Algorithm02.cpp
C++
cpp
733
no_license
#include<stdio.h> #include<stdlib.h> void sort(int n, int a[], int b[], int c[]){ int temp; for (int i=0; i<n; i++){ for (int j=0; j<(n-i-1); j++){ if (a[j] > a[j+1]){ temp = a[j]; a[j] = a[j+1]; a[j+1] = temp; temp = b[j]; b[j] = b[j+1]; b[j+1] = temp; temp = c[j]; c[j]...
8b9cc7a57a2f77b2fce1e691a518e732ef252a7c
62432946bc4c13099048994820a0a63cf449b056
PlasmaLotus/Jetpack-Platformer
/src/More/things/Testing/UnitTesting/main.cpp
C++
cpp
1,029
no_license
#include <string> #include <stdio.h> #include <math.h> //#include <tuple> #include "gmock\gmock.h" #include "gtest\gtest.h" using ::testing::Return; using ::testing::Eq; //using ::testing::Ex class BaseC{ public: BaseC(int ok=0): _lmao(ok){} virtual ~BaseC(); int lmao(); protected: int _lmao; }; class BaseI...
f03877706dc1404efb46cc5afa9ec35d8cd0136f
ce3a09a657fa280921a4a8c7f81a5ffbf1a7ff48
mushfiq-906/cp__training
/Codeforces__Problems/contest/810/b/52486651_wrong_answer_14.cpp
C++
cpp
2,674
permissive
/*Author : Abdallah Hemdan */ /**************************/ /* Dear online judge: * I've read the problem, and tried to solve it. * Even if you don't accept my solution, you should respect my effort. * I hope my code compiles and gets accepted. * ___ __ * |\ \|\ \ * \ \ \_\ \ * \ \ ___ \emdan * \ \ \\ \ \ *...
6bebfc0f7f407dad685ccec4f7970705e040cb5d
b064c288222928b8329c0dc9dbce66fe83027ce9
gjhbus/sh_project
/p2pserver_v2/track/sources.bak.20141029/liveproxy/src/lnduser.cpp
C++
cpp
1,649
no_license
#include "netio/netio.h" #include "p2p/p2p.h" #include "lnduser.h" #include "fproxyprocess.h" #include "fproxyworker.h" extern IPTranslator IPTRANSLATOR; LndUser::LndUser(ProxyProcess *process, ProxyWorker *worker) : ProxyUser(process, worker, TRACK_TYPE_LIVE) { endType_ = P2P_END_LND; wan_ip_ = ""; ...
6d06b615da6581d40fffe866097e36074d3eaaf2
4ff082123507541881808e22f2c7eed576a81853
gao2010ji/sample_framework
/attr_sort.cpp
C++
cpp
637
no_license
#include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include "work_manager.h" using namespace zsummer::log4z; int main(int argc, char *argv[]) { ILog4zManager::getInstance()->setLoggerPath(LOG4Z_MAIN_LOGGER_ID, "./log"); ILog4zManager::getInstance()->setLoggerLevel(LOG4Z_MAIN_LOGGER_ID, ...
95d70db4c9813da8c066c92367d6a988db785dff
e7e1a6fbd1ddbf55805d10b4d73d71735481354a
vittorios87/MyFMODsolution
/MyWrapper/MyLoop.cpp
C++
cpp
10,771
no_license
#include "pch.h" #include "MyLoop.h" using namespace FmodStaticLib; namespace MySmallRadioApp { MyLoop::MyLoop() { menuOptions = new std::wstring(); menuOptions->append(L"LOADING COMMANDS\n"); menuOptions->append(L"L. load sound\n"); // key code 76 - L menuOptions->append(L"l. load sound in the first empty...
f6ed1482b3faccaa0c8b36682f30bd1b74229ee9
30815b3b8644bd79f9463b851527e769f919ff5e
Flyteas/StorageSim
/tlb.cpp
C++
cpp
3,370
no_license
#include "tlb.h" TLB::TLB(PageTable *PageTable_Input, int TLBSize_Input, int TLBTime_Input, int ReplaceAlgorOption, int ReplaceStratOption) //构造函数 { this->TLBSize = TLBSize_Input; this->PageTable_Obj = PageTable_Input; this->TLBTime = TLBTime_Input; this->FIFOPos = 0; this->ReplaceAlgorOption = Rep...
e59e75e45a4cd00ca908302e64d4e2d16776a50b
1f6a039c38f51e9affd39052e303f5bb1bfc4a1b
ronenrozen/AI-FinalProject
/vs2017test/Player.cpp
C++
cpp
6,434
no_license
#include "Player.h" #include "Const.h" extern int maze[MSZ][MSZ]; extern bool done; Player::Player(Point2D* pos, int target, int otherPlayer) :Target(pos->getX(), pos->getY(), target) { bullet = new Bullet(double(x), double(y), false, 0.1, 0.1); this->health = 100; this->ammo = 100; this->otherPlayer = otherPlaye...
f71475364a2f28ccfa0b5ba588b24cc59c454c27
20316d6ee0020c9962750ea6f1d5d75409b06558
sally11131114/1092_ComputerNetwork
/step_123/server.cpp
C++
cpp
9,203
no_license
#include <cstdio> #include <cstdlib> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/stat.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <iostream> #include <ctime> #include <cmath> #include <fstream> #include <fcntl....
1f68e559a7066414c09b5592a97aa9f342db9b77
38032356e15abd5511fd658a24f59300330760c0
amarsharma1997/Graphics
/C-Graphics/CLOCK.CPP
C++
cpp
1,552
no_license
#include<conio.h> #include<stdio.h> #include<graphics.h> #include<math.h> #include<dos.h> int main() { struct date d; getdate(&d); char *number[12]; number[0]="12"; number[1]="1"; number[2]="2"; number[3]="3"; number[4]="4"; number[5]="5"; number[6]="6"; number[7]="7"; number[8]="8"; number[9]="9"; number...
aee60f4093cd92918cc1cb07a92e8c567a213bde
21881e54a012e0d721d9a1fd1821867b9aa289fa
nysanier/cf
/cf/problem/dp1029/919B.cpp
C++
cpp
853
no_license
#include <stdio.h> #include <assert.h> #include <algorithm> #include <vector> #include <set> std::vector<int> vec; void f(int pre, int sum, int p) { // printf("f(%d, %d, %d)\n", pre, sum, p); assert(!(sum == 10 && p == 1)); int i = 0; if (sum == 10) { i = 1; } if (p == 1) { i...
743a2cd5d503bda35870e030ade2c3192f79d90c
5d4529b80a4f10e7e246a91daa8e56f978404680
Yefri97/Competitive-Programming
/Contests/Codeforces/September 18/Manthan Codefest 18/A.cpp
C++
cpp
458
no_license
#include <bits/stdc++.h> #define endl '\n' #define debug(X) cout << #X << " = " << X << endl #define fori(i,b,e) for (int i = (b); i < (e); ++i) #define SZ(v) (int)v.size() using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; const int oo = 1e9; int main() { ios_base::sync_...
fdb417686503b2d3b85fe5d1a4d75b4add5f3839
a607a1070bc0e84dd3d91e809d9c231c6381efd7
Vizionnation/chromenohistory
/android_webview/browser/aw_browser_main_parts.cc
C++
cc
5,660
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "android_webview/browser/aw_browser_main_parts.h" #include <memory> #include <set> #include <string> #include <utility> #include "android_w...
91c0ddb34eda5d9f000e1de6e536f50cca9ef3c8
d1357a136c5a5cce9d81bd5502b5ca55224b09b6
hjhan/LANQIAO-1
/基础练习/BASIC-9 特殊回文数.cpp
C++
cpp
476
no_license
#include <iostream> using namespace std; int main(){ int n; cin>>n; for(int i=10000;i<=99999;i++){ int a=i/10000; int b=i%10000/1000; int e=i%1000/100; int c=i%100/10; int d=i%10; if(a==d && b==c && (a+b+c+e+d)==n) cout<<i<<endl; } for(int i=100000;i<=999999;i++){ int a=i/100000; int b=i%100000/100...
2e029340ad465dae0692bef7efc82e64bd0f4d1c
2ca590669bd57b10760bf10e0e8ce7e1958aa941
Ricky-Ting/coding-in-NJU
/C++/2018_practice/OJ3-13(矩阵运算)/Bref.cpp
C++
cpp
1,961
no_license
#include <cstdio> #include <algorithm> #include <cmath> #include <cstring> using namespace std; const double eps=1e-9; const int MAXN=220; double a[MAXN][MAXN],x[MAXN];// a和x分别为方程的左边的矩阵和等式右边的值,求解之后x存的就是结果 int equ,var;// 方程数和未知数个数 // 返回0表示无解,1表示有解 int N,M,u,v; int Gauss(){ int i,j,k,col,max_r; for(k=0,col=0;k...
08311aa6574d977f45f8b55e344ae0882f2157c3
7137449222e3404887e59a9e3cf5f091ea639c59
ghsecuritylab/android_platform_sony_nicki
/external/webkit/Source/WebKit/win/DOMCoreClasses.cpp
C++
cpp
35,503
permissive
/* * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of...
2f190793a55bda5680728a009a0dd25f65d8a8bc
46ec4947d26eac402f5b4f8c64be24b13a70291a
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-redshift-serverless/source/model/TagResourceResult.cpp
C++
cpp
1,097
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/redshift-serverless/model/TagResourceResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #inclu...
cb98db2177ad60d2da94d74a8640da2701505b36
7dfbccd1220a542eb1f3b50b5efbd9160f6a0b7f
santiagoom/vtk-examples
/code/cpp/mhd_resample/Mainwindow.cpp
C++
cpp
7,765
no_license
#include "MainWindow.h" #include "ui_MainWindow.h" #include "ESResample3D.h" #include "ESGPUResample3D.h" #include "imagereader.h" #include "imageexporter.h" #include <QFileDialog> #include <QDir> #include <QDirIterator> #include <QDebug> #include <QTime> #include <QCheckBox> #include <iostream> MainWind...
2fbe2014ce547f95acae2b0cf20cc79f3590059d
a705b2717652fde7c43315924ab40d5d15ef15c8
WhiZTiM/coliru
/Archive2/5d/a5c584e514bc6a/main.cpp
C++
cpp
2,650
no_license
// // 可测试Boost.Lockfree的single-producer/single-consumer、 // multiple-producer/multiple-consumer所耗费的时间, // 使用C++11实现。 // #define SPSC #include <pthread.h> #include <chrono> #include <atomic> #include <iostream> #ifdef SPSC #include <boost/lockfree/spsc_queue.hpp> #else #include <boost/lockfree/queue.hpp> #endif...
d6ff85207958270c2547c592e6a3e76235481ca6
10a17d7dc8f101d11cd05e8f7d1af957298fbf6d
maslovsa/asteroids
/Classes/game/Ship.cpp
C++
cpp
745
no_license
#include "Ship.h" #include "Painter.h" #include "Game.h" Ship::Ship() { } void Ship::init() { angle = 0; size = Game::getInstance().getWidth() / 10; scale = 1.0f; Vertex vertex; direction = vec2(0, 1); vertex.Color = vec4(1, 1, 1, 1); MakePoint(0, size / 2); MakePoint(sin(2 * M_PI / 3...
f196beaf1ed6f751c93ed039b793322d57e639a0
d9022f7f7a7daa0cc467e4cf6e0090f96e7302e4
thomas-mahon/TestProgramming11082020
/ActionRPG/Intermediate/Build/Win64/UE4Editor/Inc/ActionRPG/RPGDamageExecution.gen.cpp
C++
cpp
3,844
no_license
// Copyright Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ========================================================================...
cdabad5781129ccc6bbd77f6a9f95ba3e8762642
18d8ee3d82d8fda36c4c1421e615360b35a64fc2
muscleJoah/Algorithm-Study
/LeetCode/Hard/Largest Multiple Of Three.cpp
C++
cpp
1,434
no_license
//https://leetcode.com/problems/largest-multiple-of-three/ //3의배수 판정법. // 모든 자릿수를 더했을대 3으로 나누어떨어지면됨. //if total % 3 == 0 -> do nothing //total % 3 == 1 -> reduce 1,4,7 or reduce 2,5,8 twice //total % 3 == 2 -> reduce 2,5,8 or reduce 1,4,7 twice class Solution { public: string largestMultipleOfThree(vector<...
88c1aabe3b16feb1071616653f0e4fbc31edd042
8947d8e59711eeab45b6ff1814557af41c1c6ce8
leafnsand/xEngine
/code/Module/Renderer/Util/MeshUtil.cpp
C++
cpp
18,451
no_license
#include "Renderer/Util/MeshUtil.h" #include <AzCore/Math/Vector3.h> namespace Module { static struct { // left-top point of face AZ::Vector3 p[6] = { AZ::Vector3(-1.0f, 1.0f, -1.0f), // top AZ::Vector3(-1.0f, -1.0f, 1.0f), // bottom AZ::Vector3(-1.0f, 1.0f, ...
ac1e5b6c8513eb613e021bd7e6e3914e3966430d
43c58f697c9eec0c374264086e638d09de192265
sr3dna/opentoonz
/toonz/sources/toonz/lipsyncpopup.cpp
C++
cpp
19,366
permissive
#include "lipsyncpopup.h" // Tnz6 includes #include "tapp.h" #include "iocommand.h" #include "menubarcommandids.h" // TnzQt includes #include "toonzqt/menubarcommand.h" #include "toonzqt/icongenerator.h" // TnzLib includes #include "toonz/toonzscene.h" #include "toonz/txsheet.h" #include "toonz/tscenehandle.h" #in...
f6e8d1bbd941cc6c905ee7d3d60062299aeed014
e92b3a3907ca9bcf7bee1f5b38fac2b9178dc91f
jimpark/unsis
/unicode-src/Source/ShConstants.cpp
C++
cpp
2,072
permissive
/* * ShConstants.cpp * * This file is a part of NSIS. * * Copyright (C) 1999-2015 Nullsoft and Contributors * * Licensed under the zlib/libpng license (the "License"); * you may not use this file except in compliance with the License. * * Licence details can be found in the file COPYING. * * This softw...
28ccdb1bb26650808120e61d7b8831ee00f5d455
71bbca490de19612be80b7bd8ff00db491ad46dc
rohantalesara/cpp-events
/EventsPublisher.cpp
C++
cpp
388
no_license
#include "EventsPublisher.h" #include <iostream> EventsPublisher::EventsPublisher() { timer.Tick.add([this](char c) { std::cout << "Emitting " << c << std::endl; ReceiveCharacter(c); },[](char c){return true;}); } EventsPublisher::~EventsPublisher() { } void EventsPublisher::Start() { timer.Start(1000); // 1 ...
1baa043fab569662a6361a81ed2b0fd7a50cf609
e203d6c2859558b86777dc4999cad1a3c094e80c
smartree/notepad2
/scintilla/lexers/LexPerl.cxx
C++
cxx
56,605
permissive
// Scintilla source code edit control /** @file LexPerl.cxx ** Lexer for Perl. ** Converted to lexer object by "Udo Lechner" <dlchnr(at)gmx(dot)net> **/ // Copyright 1998-2008 by Neil Hodgson <neilh@scintilla.org> // Lexical analysis fixes by Kein-Hong Man <mkh@pl.jaring.my> // The License.txt file describes ...
b1ebdc33d3d2b281e40a1863cce80197b7e8ccbc
ceacca8fcec9394c5f6e0a266698355185f7d396
Nuos/metal
/include/metal/list/drop.hpp
C++
hpp
1,190
permissive
// Copyright Bruno Dutra 2015-2018 // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt #ifndef METAL_LIST_DROP_HPP #define METAL_LIST_DROP_HPP #include "../config.hpp" #include "../list/range.hpp" #include "../list/size.hpp" n...
5e708484f370bac93732d720f2660c0d8cd44045
93fb9612da329b0ce82530c5eab6ffa5e53b911c
KyleKern/algorithmsHW
/workspace/homework6/ts.cpp
C++
cpp
7,347
no_license
/* * Title: ts.cpp * Abstract: program takes in number of vertexes, number of edges, and the * start and end point of each edge. using this it finds if it is a DAG graph. * if it is then it continues to find the starting nodes and finds the topological * order of the graph using dfs and prints that out along with...
41eb6a280b497d9d4877e8a32e6e6fbc52b56afa
b54eaa9f94728cffd73e7a614c4fbab7ad33fcc2
Elf-Diao/OFEC_Alpha
/instance/problem/continuous/global/classical/non_continuous_scaffer_F6.cpp
C++
cpp
2,102
no_license
/************************************************************************* * Project:Open Frameworks for Evolutionary Computation (OFEC) ************************************************************************* * Author: Changhe Li * Email: changhe.lw@gmail.com * Language: C++ ******************************************...
a6d9673651c795bfe2220c9ed430fbcf118d1374
03e21c0a9290583d643d12aaa71f4c8f8dc63762
dbecaj/ZombieGameServer
/packets/packetkick.cpp
C++
cpp
675
no_license
#include "packetkick.h" PacketKick::PacketKick(QByteArray data) : Packet(data) { valid = validate(); } PacketKick::PacketKick(QString username) : Packet(PacketType::KICK) { writeKick(username); } PacketKick::PacketKick() : Packet(PacketType::KICK) { valid = false; } void PacketKick::writeKick(QString us...
69a1b82c1ebe117c4693bb647591e41c007cbf22
400612bb6dcaafb33f86ebf7cb2695c542cea356
Hide-on-bush2/leetcode
/leetcode746.cpp
C++
cpp
577
no_license
#include<iostream> #include<vector> using namespace std; //自顶向下版本 class Solution { public: int map[1001]; int dp(int index, vector<int>& cost){ if(map[index] != 0){return map[index];} if(index == 0 || index == 1){return cost[index];} int dp1 = dp(index - 1, cost), dp2 = dp(index - 2, cos...
051f70628d7db524c7546e79eda4981e15c53050
7b6a383784fe93ff576c3845aa98cff2978a4d15
kozhukalov/archive
/experiments/cpp_matrix_transpose/main.cpp
C++
cpp
905
no_license
#include <iostream> #include <vector> std::vector<std::vector<int> > transpose(std::vector<std::vector<int> >& mat){ std::vector<std::vector<int> > transposed; transposed.resize(mat[0].size()); for (int i = 0; i < mat[0].size(); i++){ transposed[i].resize(mat.size()); for (int j = 0; j < mat.size(); j++)...
18a308418f547a953d576393ea154946daccafde
f201d18628810a0cfc130d175e90e273f58ca9f7
huangbo1221/coding_interviews
/素数对.cpp
C++
cpp
916
no_license
/*********************************************** 给定一个正整数,编写程序计算有多少对质数的和等于 输入的这个正整数,并输出结果。输入值小于1000。 如,输入为10, 程序应该输出结果为2。(共有两对质 数的和为10,分别为(5,5),(3,7)) *************************************************/ #include<iostream> #include<math.h> using namespace std; bool judgeSuShu(int n) { int end = int(sqrt(n)...
c0bfe32896b38ad575a60822d74a13a5ad93ca07
995f56a2291b54753b00152de7896059ffd8047b
John300696/AlgoritmosGeneticos
/P1/Test Graphics.cpp
C++
cpp
856
no_license
#include<graphics.h> #include<conio.h> #include<dos.h> #include <stdlib.h> #include <time.h> main() { int A[10]; char et[5]; srand(time(NULL)); /* cargo array con valor igual al indice mas 10*/ for (int i=0;i<10;i++) { A[i]=rand() % 51; } int gd = DETECT, gm; initgraph(&g...
b3e430bf660e04c8f251ab0163d3664c68772a32
d3e6a55524515548944e70414b30bc8ec9a554da
erinmaus/autonomaus
/ARDEN/touchstone/source/trace/discreteCall.cpp
C++
cpp
2,203
no_license
// This file is a part of ARDEN. // // Look, but don't touch. // // Copyright 2017 [bk]door.maus #include "touchstone/trace/call.hpp" #include "touchstone/trace/discreteCall.hpp" touchstone::DiscreteCall::DiscreteCall(const Call* call) : data(new Data(call)) { // Nothing. } const touchstone::Call* touchstone::Disc...
5ed85d936a0091bfaba0ae7e8ede2aa96458242d
35744bc03feb1efd3726ab2b43f15233a495c7e8
proteanx/devault
/src/qt/coincontroldialog.cpp
C++
cpp
31,053
permissive
// Copyright (c) 2011-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "coincontroldialog.h" #include "ui_coincontroldialog.h" #include "addresstablemodel.h" #include "bitcoinunits.h" #i...
ef0f8259ae6341536eed5c6a567b753940d13942
9c827983fd6a52fdb1c7aa9a10c0f23d2e605d45
julapy/ofxAfterEffects
/template/Skeleton.cpp
C++
cpp
6,545
no_license
/*******************************************************************/ /* */ /* ADOBE CONFIDENTIAL */ /* _ _ _ _ _ _ _ _ _ _ _ _ _ */ /* ...
782c39e9f8fdddfe8bf64b7ff02cc4d2c13344fc
c91a8b7aea3dd3b123463d93a95c155bff038c12
Crasader/Cheetah
/Classes/Services/APIs/APIAbilityUpdate.cpp
C++
cpp
1,007
no_license
// // APIAbilityUpdate.cpp // Cheetah // // Created by Plus Pingya Avalable on 1/9/2558 BE. // // #include "APIAbilityUpdate.h" using namespace std; APIAbilityUpdate *APIAbilityUpdate::create(Building* building, Ability* ability, ...
d7a5b4eb04a2e45d8ccfdd919628b78b36a33f42
b1cc6904cff93e276dec9708d262f021da6b48f4
Ddock2/DesignPattern
/project/DesignPatternExamples/code/Command Pattern/class/MonitorCommands.cpp
C++
cpp
1,044
no_license
#include "MonitorCommands.h" MonitorPowerOnCommand::MonitorPowerOnCommand(Monitor * monitor) { this->monitor = monitor; } void MonitorPowerOnCommand::Execute() { monitor->PowerOn(); } void MonitorPowerOnCommand::PrintSelf() { printf("Monitor Power On"); } MonitorPowerOffCommand::MonitorPowerOffCommand(Monitor *...
fbb5dc88c160dd8361b09d70bbca7530306c53aa
5b7d0706da8afb6f034a73c7398e77bd5b26cf0d
Cruel/freeShop
/src/States/StateStack.cpp
C++
cpp
2,893
permissive
#include "StateStack.hpp" #include <cassert> namespace FreeShop { StateStack::StateStack(State::Context context) : m_stack() , m_pendingList() , m_context(context) , m_factories() { } void StateStack::update(float delta) { // Iterate from top to bottom, stop as soon as update() returns false for (auto itr = m_sta...
817b3ba489d5943894938ce9b05f33fafbedce40
6fac716a5e54e9d6f5440c08f3c29928f1e7bbcf
ishanrai05/chainer
/chainerx_cc/chainerx/routines/logic.cc
C++
cc
2,839
permissive
#include "chainerx/routines/logic.h" #include "chainerx/array.h" #include "chainerx/backprop_mode.h" #include "chainerx/device.h" #include "chainerx/dtype.h" #include "chainerx/routines/creation.h" #include "chainerx/routines/manipulation.h" #include "chainerx/shape.h" namespace chainerx { namespace { template <typ...
3bc75a36d247ff0938c1a06fe2b931778ce7d23e
fb0c256da8409fc8b1ab048c228e8e6752bce8e5
mkprz/samples
/datastructs/lifo_fifo.cpp
C++
cpp
4,216
permissive
// Basic Data Types // Home-study problem. // Duration 60 minutes // Please return the solution via email within an hour of receipt of this request arriving in your email box. // Please implement this in one of C or C++. // The following are not good answers: // 1. copied solutions from the internet/...
616de3c8a1dc153da611fff9a7cc6b483b49c69b
91d87f802257073ca47ff16438c16c4c571ac690
Db0t16o1/Cpp-Doubts
/sliding_window_worked.cpp
C++
cpp
1,353
no_license
#include<bits/stdc++.h> using namespace std; class Solution { public: string minWindow(string s, string t); }; string Solution::minWindow(string s, string t) { map <char,int> count; set <char> tset; set <char> curr; pair <int,int> answer(0,0); for(auto i:t){ count.insert(pair<char,int>(...
301ad7ab44bc49fe5b19050717c085768de3bd5f
4910d4a87ea9ecad0147300ff7428e96855818c2
cyan-at/grips
/base/PathStatistics.hpp
C++
hpp
2,550
permissive
#pragma once #include <QtCore/Qt> #include <QtGui/QColor> #include <utility> struct PathStatistics { double planningTime{0}; double ourSmoothingTime{-1}; double omplSmoothing1Time{-1}; double omplSmoothing2Time{-1}; double omplSmoothing3Time{-1}; double omplSmoothing4Time{-1}; bool pathFou...
3c7ec328ea768d65e6e262da4857c6002b2f3576
4e2afbeb02c74c57703c93b9c41d9e5367b5a695
WLFJ/Codeforcess-water-cooler
/1300/1294C.cpp
C++
cpp
1,010
no_license
//这里使用了分解质因数的思想,只要遇到乘法、能否组成之类的问题,都往这个方面取考虑。 #include<iostream> #include<vector> #include<algorithm> using namespace std; int main(void){ int t; cin >> t; while(t --){ int num; cin >> num; vector<int> arr; for(int i = 2; i * i <= num; i ++){ if(num % i == 0){ ...
d00af2876e1e18c6c6b25cd818dd5da0803c28a1
1cd31a77ffabca5481d514d7ddcf48f83719a945
shreyas-nimishe/algorithm_implementations
/LinkedList/queue.cpp
C++
cpp
1,451
no_license
#include<bits/stdc++.h> using namespace std; struct node { int data; struct node *next; }; struct queue_node { struct node *front, *rear; }; struct node *createnode() { struct node *temp = (struct node *)malloc(sizeof(node)); temp->next = NULL; return temp; } struct queue_node *createqueue() { struct queue_n...
0fa97794a34adfe90b8fc40a537c7874792c73f7
011a0e92f1d4ad647e15ef786cc475111a898be6
BookOfRevelation/PureImagination
/pureimage.cpp
C++
cpp
563
no_license
#include "pureimage.h" #include <QDebug> PureImage::PureImage() : PureData() { clear(); } int PureImage::getImageCount() const { return images.count(); } QImage& PureImage::getImage(int i) { return images[i].first; } QString PureImage::getName(int i) const { return images[i].second; } void PureI...
3dc365c8e57ce25c96ef16fe13a3fc46ba452a0f
885f6eb3e77cdcce4bca45e513a77509a2ccc22c
kaddyd/teeworlds
/src/game/server/gamecontext.cpp
C++
cpp
31,487
permissive
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ #include <new> #include <base/math.h> #include <engine/shared/config.h> #include <engine/map.h> #include <engine/console.h> #inc...
e9cdc2a9fd47968e8a158621564014b3c609c9eb
9534b0723b659992b2826df03150d283bfee4c05
stenstad/qlcplus
/engine/test/sequence/sequence_test.cpp
C++
cpp
19,520
permissive
/* Q Light Controller Plus - Unit test sequence_test.cpp Copyright (c) Massimo Callegari 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....
d6d44525ed1aa177b5bbdf06d98f5b95ee96fc31
d81581174dc023be0b0ac7b708a6506d930de347
GuillaumeShareWithYou/tetris
/piece.cpp
C++
cpp
340
no_license
#include "piece.h" namespace app { Piece::Piece(){} Piece::Piece(Piece& other){ *this = other; } Point& Piece::operator[](int i){return points[i];} Piece& Piece::operator=(Piece& other) { for(int i = 0; i < 4; ++i) points[i] = other[i]; return *this; } ...
e8f6a2eb0640e8012a2241733f33d5df81ae68ff
a8b344d6dd1b9692f9c06005d999775ffbf2f53e
eurogiciel-oss/Tizen_Crosswalk
/src/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc
C++
cc
7,484
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/api/system_indicator/system_indicator_manager.h" #include "base/memory/linked_ptr.h" #include "base/strings/utf_s...
c9f355990ff0f90947a48a88f64c68e0f8355987
586432d128649ee75dc684dec50872f735dbd7eb
leaveitout/inviwo
/modules/discretedata/connectivity/connectivity.cpp
C++
cpp
2,847
permissive
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2012-2018 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the f...
5bcf8315e9090249ecc0da5b1eb7a38d63348979
7d32eb1070418ca586affb5cbdf87cd6aeab4b9d
putnampp/clotho-dev
/src/cchmc/StatisticFactory.cpp
C++
cpp
2,688
permissive
/******************************************************************************* * Copyright (c) 2013, Patrick P. Putnam (putnampp@gmail.com) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: ...
798d1245fca4cecf199be489294c65b87f841f63
d5bfeb1af939b99ef0b43952ba8b0070505349f6
nguyenvietquoc2569/AudioSurveillance
/bufferfeature.cpp
C++
cpp
785
no_license
#include "bufferfeature.h" #include <QObject> #include <QList> #include <QQueue> bufferFeature::bufferFeature(QObject *parent) : QList<double*>() { pmaxlength=1; pminlength=0; } void bufferFeature::psetpmaxlength(qint64 length) { pmaxlength = length; } qint64 bufferFeature::pgetpmaxlength() { retu...
e201c125430af13b9cffad243910a641fe87f82d
27da7fc13bff110bf71b7dd0984f20090cda83ad
BarryHook1/ImMiraclela
/ImMiracleUsermode/memory.cpp
C++
cpp
498
no_license
#include "memory.hpp" ULONG memory::get_process_id_by_name(const char* process_name) { ULONG process_id = 0; HANDLE ss = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); if (ss) { PROCESSENTRY32 pe; pe.dwSize = sizeof(PROCESSENTRY32); if (Process32First(ss, &pe)) { do { //miracle if (!str...