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
175bcc911208387ebfebdaa751a4d313f80e7e54
002f215c409f1add616afb9e044bc37f1a779e6f
Joker-Jerome/cpp
/simulation/moving_agent.cpp
C++
cpp
429
no_license
#include "moving_agent.h" namespace cs427_527 { MovingAgent::MovingAgent(const World& w) : AbstractAgent(w), goal(w.randomLocation()) { } MovingAgent::MovingAgent(const World& w, const Hex& start, const Hex& g) : AbstractAgent(w, start), goal(g) { } void MovingAgent::update() { if (pos...
5034c8b09aebdc68044ad18f6f0082a75d9636b8
6f45c4477a77a3c6bd4cebead70d87834345bb16
CProgExpert/algos
/search.cpp
C++
cpp
1,849
no_license
#include <iostream> #include <cstdlib>//for "exit()" on some systems #include <vector> #include <string> using namespace std; /** \fn linearSearch \brief Search data for the first occurrence of key \param [in] key The value being searched for \param [in] data The data set that will be searched \returns location of ke...
391acc21e9ca2a19544d376380f5afea303317b5
ca489bc1d9f9e405226240d5b630851d96912ba2
peterjc123/magma
/testing/testing_zgemv_batched.cpp
C++
cpp
9,280
no_license
/* -- MAGMA (version 2.5.4) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date October 2020 @precisions normal z -> c d s @author Mark Gates @author Azzam Haidar @author Tingxing Dong */ // includes, system #includ...
a1dd1dafe77942730d23ada2979ae355f48a00f3
eddc83944cb6e3ac37ba67082415daae741a1530
wesbz/flashlight
/app/asr/criterion/backend/cpu/CriterionUtils.cpp
C++
cpp
1,934
permissive
/** * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include "flashlight/app/asr/criterion/CriterionUtils.h" #include "flashlight/ext/common/Distribute...
e0f13483d1bceec18dfd3a34e4d320b3fa3c5b93
a6eced43f3ac6ca7c274a9a119228c274dc8210a
ossimlabs/ossim
/src/base/ossimKeyword.cpp
C++
cpp
2,297
permissive
//******************************************************************* // // License: See top level LICENSE.txt file. // // Author: David Burken // // Description: // // Contains class definition for Keyword.h //******************************************************************* // $Id: ossimKeyword.cpp 9963 2006-11...
9e85e6f8b2a6fd3edc484e20f64bf18b2377c2de
3f9976a607497786d12dc332b389977ad81ff14e
ezehy/adzcoin
/src/drafted/governance-keys.cpp
C++
cpp
1,216
permissive
// // Copyright (c) 2014-2018 The Adzcoin Core developers // // Distributed under the MIT/X11 software license, see the accompanying // // file COPYING or http://www.opensource.org/licenses/mit-license.php. // #ifndef GOVERNANCE_KEYS_H // #define GOVERNANCE_KEYS_H // #include <string> // #include <vector> // #includ...
180b7dd797245f72180b3d075899c5374a700c15
0bd9e28b0f95f74f55e88f8a6161a02a89e964ef
xl2401/Video-Genetics-2014
/VideoEvolution/Frame.cpp
C++
cpp
631
no_license
#pragma once #include "cv.h" #include "highgui.h" #include "Frame.h" #include <vector> Frame::Frame(Mat img,string vname, int vid, int fid, int realfid) { this->img=img; this->videoName=vname; this->vid = vid; this->fid = fid; this->label=fid; this->height=this->img.rows; this->width=this->img.col...
69df7a169484c7818f037fc33900d12ab3c1ee17
dd1803dd9baeed2478ac267514d5ceb9027289d6
switchpiggy/Competitive_Programming
/CodeForces/1200 - 1400/binaryStringReconstruction.cpp
C++
cpp
659
no_license
#include <bits/stdc++.h> using namespace std; typedef long long int ll; ll t, a, b, c; int main() { cin >> t; while(t--) { cin >> a >> b >> c; if(b == 0) { if(a) { cout << string(a + 1, '0') << endl; } if(c) { cout << string(...
129c8a7e8e1eff236bf04db73cc410a6fcebb7b6
7d974bd3ea32f034d1b1727dfe553366a3dd4cf1
KamskovEM/IiP_381808-1
/Sandalov.KY/Task3/Dictionary.cpp
C++
cpp
7,798
no_license
#include "Dictionary.h" Dictionary::Dictionary() // конструктор по умолчанию { count = 0; realCount = 0; ArrDict = new Word[realCount]; } Dictionary::Dictionary(const Dictionary& _dict) // копирования { count = _dict.count; realCount = _dict.realCount; for (int i = 0; i < count; ++i) { ArrDict[i] = cop...
4a480f18ffbd3961aefb948cdd61f06c7b1a58ed
55386efbc75b9743597f164f967c704595aeffd6
Synkar/find-object
/tools/tcpClient/TcpClient.cpp
C++
cpp
5,642
permissive
/* Copyright (c) 2011-2014, Mathieu Labbe - IntRoLab - Universite de Sherbrooke All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright ...
f6d45231c264a0ea6b981014e3c9d811ab354f5a
ab2e9c15cf42d5b6b6b8e2f89631b3612adb31a8
Shrey97B/CS610_Programming_For_Performance
/Assignment_04/20111060-p3.cpp
C++
cpp
2,789
no_license
// g++ -std=c++11 -fopenmp 20111060-p3.cpp -o 20111060-p3 -ltbb #include <chrono> #include <cmath> #include <iomanip> #include <iostream> #include <limits> #include <omp.h> #include <tbb/tbb.h> using std::cout; using std::endl; using std::chrono::duration_cast; using HR = std::chrono::high_resolution_clock; using HRT...
1f439241eb3083015356142862919a9bcd93cdb1
275fa9ff2fcb7799172a71770725efc9fda166e3
Eracage/SchoolPhysics
/SchoolPhysics/Physics/src/PhysicsObject.cpp
C++
cpp
1,555
no_license
#include <PhysicsObject.h> #include <World.h> PhysicsObject::PhysicsObject() : M_Velocity(0.f,0.f), M_ConstantForce(0.f,0.f), M_Position(0.f,0.f), M_Bounciness(0.8f), M_Friction(0.02f), M_StaticCollision(false), m_shape(nullptr) {} PhysicsObject::~PhysicsObject() {} void PhysicsObject::PreColUpd...
8cc771eb9e003453180ce760c84d85e71f4a6003
eefd86c17425b365b6de5481fe09aba0dab879f0
meniossin/src
/third_party/angle/src/tests/gl_tests/FramebufferRenderMipmapTest.cpp
C++
cpp
5,033
permissive
// // Copyright 2015 The ANGLE 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. // #include "test_utils/ANGLETest.h" using namespace angle; class FramebufferRenderMipmapTest : public ANGLETest { protected: FramebufferR...
c0f3621883a95f776e1970a4fe339c8185de10a7
dfce4b4a352409090083e49cfacefa5f48ddc9c1
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_new_hunk_4230.cpp
C++
cpp
3,334
no_license
if (acquired) { apr_threadkey_private_set(NULL, thread_lock); apr_thread_mutex_unlock(m->lock); } } static void beam_leave(void *ctx, apr_thread_mutex_t *lock) { leave_mutex(ctx, 1); } static apr_status_t beam_enter(void *ctx, h2_beam_lock *pbl) { h2_mplx *m = ctx; int acquired; ...
67041efe7fcf120eb79a1d20ac8e5ed269d2c1c6
4e4378bd16b1aa0212803f4438b03c0954d6dcc6
ix-labs/codacom
/src/libquality/quality/ConductanceSCQF.hpp
C++
hpp
4,215
permissive
// Copyright GREYC - UMR 6072 ; Université de Caen Normandie // Esplanade de la paix // CS 14032 // 14032 Caen CEDEX 5 // contributeur : // Jean Creusefond, 2015 // // jean.creusefond@unicaen.fr // // Ce logiciel est un programme informatique servant à la comparaison et à l'analyse d'outils de détection de communauté...
252e1bd790119e548289e9087c52ffb3d2412576
c4b63b4730d367eb2ac1ed650328c1b3dc6545bc
ketoo/NoahGameFrame
/NFComm/NFBluePrintPlugin/BluePrintNode/NFExecutor.cpp
C++
cpp
4,421
permissive
/* This file is part of: NoahFrame https://github.com/ketoo/NoahGameFrame Copyright 2009 - 2021 NoahFrame(NoahGameFrame) File creator: lvsheng.huang NoahFrame is open-source software and you can redistribute it and/or modify it under the terms of the License; besid...
76158f62756257e4141f5cdd2a80ebd0f791ef12
34545032893ad6b4d9a27ebe77f81742b57d4edf
rokrepo/pomdog
/src/SoundSystem.OpenAL/AudioEngineAL.cpp
C++
cpp
606
permissive
// Copyright (c) 2013-2020 mogemimi. Distributed under the MIT license. #include "AudioEngineAL.hpp" #include "ErrorCheckerAL.hpp" #include "Pomdog/Utility/Assert.hpp" namespace Pomdog::Detail::SoundSystem::OpenAL { AudioEngineAL::AudioEngineAL() { } AudioEngineAL::~AudioEngineAL() = default; float AudioEngineAL::...
94bbf45a87c5f4d900d139eff6164f96ab9ee7bd
dd0a101bbc044e947ba1de78c82ae64fae5ffdf7
qujianbiao/v8
/test/cctest/test-serialize.cc
C++
cc
82,711
permissive
// Copyright 2007-2010 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this lis...
40c83cd768bd4beab31953d73e804cee6526954c
76aed2cb35d3568a7cc5a9c08d74e1bd33df1dc5
Xaymar/BlitzNext
/ide/blitzide.cpp
C++
cpp
696
permissive
#include "blitzide.h" #include "about.h" #include "libs.h" #include "mainframe.h" #include "prefs.h" #include "resource.h" #include "stdafx.h" BlitzIDE blitzIDE; BOOL BlitzIDE::InitInstance() { #ifdef _DEBUG AfxEnableMemoryTracking(true); #endif AfxInitRichEdit(); prefs.open(); initLibs(); mainFrame = new ...
6a23d956fcec67767ea7d992a1678835c9c314f8
1f5439df14e5d84a569f54161185aaa967359ab8
luyen1989/stepcoin
/src/rpcmisc.cpp
C++
cpp
7,612
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "base58.h" #include "init.h" #include "main.h" #include "net.h" #include "netb...
02e06446b6284a97ef55dec18511bae76d045473
567a13518df918a199efa8d4aea59f52a7af7c78
lonelyagegeek/tensorflow
/tensorflow/compiler/mlir/xla/transforms/legalize_tf_control_flow.cc
C++
cc
7,644
permissive
/* Copyright 2019 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...
650a8acabd1eac36fe676c373b474152dfa913e5
8195346f88f4f8abd8cf2411f3a373995270b0e0
chromium/chromium
/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_win_unittest.cc
C++
cc
11,955
permissive
// Copyright 2019 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/browser/safe_browsing/chrome_cleaner/reporter_runner_win.h" #include "base/base_switches.h" #include "base/command_line.h" #include "base/files/file.h" #inclu...
f2e7c1436e164af654c6f2dbffd1bbe29aa79da1
8e469247b751ede0351d0b54be3f5eabee006d90
superolelli/Dig-Deeper-revival
/src/main.cpp
C++
cpp
213
no_license
#include"Game\InitialState.hpp" int main() { //start the engine CGameEngine engine; engine.Init("Dig Deeper"); engine.PushStateImmediately(new CInitialState()); engine.Run(); engine.Quit(); return 0; }
905235b3a5e8b0fd09968cbc342534ec335f83f5
01e697bd0e84708483d7500103a2958706808df7
Datedate/HyperCasualGame_homework
/Classes/GameScene/GameScene.cpp
C++
cpp
2,529
no_license
#include "GameScene.h" #include "GameLayer.h" #include "SimpleAudioEngine.h" #include "TouchLayer.h" #include "SceneLayer.h" #include "SceneType.h" USING_NS_CC; GameScene* GameScene::createScene() { GameScene *ret = new (std::nothrow) GameScene(); if (ret && ret->initWithPhysics()) { ret->autorelease(); retur...
55f4d72dac4ddf1ec6f237415331e9376fce8424
ecba5be22ace2a4fe42d0f8d798c6d8eb7facc25
yang3000/cegui
/cegui/src/NamedElement.cpp
C++
cpp
9,061
permissive
/*********************************************************************** created: 30/10/2011 author: Martin Preisler purpose: Implements the NamedElement class *************************************************************************/ /*************************************************************...
f6aebd6ff303450fc2b836a64a7b3c5766a15fb6
4e41dce1108f5b9a10270236ffa144ad1d24a1f1
gabybarsky/cc3k
/board.cc
C++
cc
20,090
no_license
#include "board.h" #include "chamber.h" #include "players/shade.h" #include "players/drow.h" #include "players/goblin.h" #include "players/vampire.h" #include "players/troll.h" #include "enemies/dwarf.h" #include "enemies/elf.h" #include "enemies/halfling.h" #include "enemies/human.h" #include "enemies/merchant.h" #inc...
7393ac243e2405ea72f0d2d7427dbf5937891872
7160ee06849c3dbf366f86062e9cb2755cabf061
JRBenson01/CPS271
/mp2/Account.cpp
C++
cpp
2,427
no_license
#pragma once #include "Account.h" #include <iostream> using namespace std; Account::Account(double bal) : balance(bal) { cout << "Account Opened with a starting balance of $" << bal << endl; } double Account::getBalance() { return balance; } void Account::printBalance(char act) { if (act == 's') cout << "Savin...
bf1873192091e117cac69c3b5728eb310aa1f495
559b4aeb4e75c39937e1f078bff02eda7c95a042
karunmatharu/Android-4.4-Pay-by-Data
/external/chromium_org/chrome/browser/chromeos/language_preferences.cc
C++
cc
1,362
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 "base/prefs/pref_registry_simple.h" #include "chrome/browser/chromeos/language_preferences.h" namespace chromeos { namespace language_prefs ...
c3182c3ab4a3be349706196065f8ad67b8437a02
75d2daac0a972669a1f04b312453d8315440bcb0
antonfirsov/mango
/source/mango/image/block_yuv.cpp
C++
cpp
6,232
permissive
/* MANGO Multimedia Development Platform Copyright (C) 2012-2016 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/core/bits.hpp> #include <mango/image/compression.hpp> namespace { using namespace mango; union RGB9E5 { enum { EXPONENT = 5, ...
c9891257b5de7800393ddf1752b703f224acd055
b2ad806d07ebe97135d9bec4bc0b64b4acaa92a5
ECS-251-W2020/chromium
/android_webview/browser/aw_variations_seed_bridge.cc
C++
cc
1,908
permissive
// Copyright 2018 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_variations_seed_bridge.h" #include <jni.h> #include <stdint.h> #include <memory> #include <string> #include <vector>...
377e7aef5a2947d566e36ae613c48e332865ae32
d90928e9c25b97679db3afdda1760f819f065de7
MauMontano/Polynomial-Product
/polynomials_product.cpp
C++
cpp
18,391
no_license
#include <bits/stdc++.h> using namespace std; typedef struct Queue{ int coefficient; int priority; struct Queue *ant; struct Queue *next; }Coefi; Coefi *front_1 = NULL;//First element 1 Coefi *front_2 = NULL;//First element 2 Coefi *front_prod = NULL;//First element product Coefi *back_1 = NULL;//Last...
920ea16a89b31d4449ebabd5b460798f1675ab75
41c24d61da826985461250738c9b2a279b6e50a5
cookish/deeptile
/include/BoardHandler.hh
C++
hh
1,453
permissive
// // Created by Martin Cook on 2018/11/28. // #ifndef MLTWO_BOARDHANDLER_HH #define MLTWO_BOARDHANDLER_HH #include "RowHandler.hh" #include <memory> #include <cstdint> #include <vector> using std::vector; #include <string> using Board = uint64_t; using TileList = uint64_t; struct BoardAndMove { Board board; ...
fdf337ed8c86d36503f3c52fc7cbc7271df68847
26846c6e11da1a8fb671287302247b2dd9966a2c
Kathamala/LPI
/aula10_atividade/src/Diary.cpp
C++
cpp
3,003
no_license
#include "../include/Diary.h" #include "../include/Helper.h" #include <sstream> #include <fstream> #include <iostream> Diary::Diary(const std::string& name) : filename(name), messages(nullptr), messages_size(0), messages_capacity(10) { messages = new Message[messages_capacity]; //Carregar as mensagens previam...
2237a41c95e51ccb522f7da04795ae7be3b85a24
42bf849946dfa7401a25cbe7bdfba98dc07b2d13
bitf15m557/arry
/Array.cpp
C++
cpp
1,282
no_license
#include<iostream> #include<stdio.h> #include<unistd.h> #include<sys/types.h> int main(){ int count=0; int total=0; int a[100]; for (int i=0;i<100;i++){ a[i]=i+1; } pid_t p1; int array=0; fork(); fork(); if(p1==0){ for (int j=0;j<25;j++){ total=total+a[array]; array++...
12fd7bc37f874e7f5b8a5bdc15f8fa1ad12cc81d
d191ca5465f5976b0b644c8f8135cf03f7169741
alvls/mp1-2019-2
/samburova_mi/task0/Source.cpp
C++
cpp
1,640
no_license
#include <stdio.h> #include "math.h" #include "locale.h" void main() { double r1, r2, a, q, x1, y1, x2, y2; setlocale(LC_ALL, "Russian"); printf("Введите координаты центров окружностей"); scanf_s("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); q = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)); printf("Введите радиусы окруж...
42b534c64c8ca473330e46017d67acc61bf8a1f8
773ca919f157bee26b4ade253e96019684cc0570
chuxuewen/Avocado
/depe/v8/src/heap/mark-compact.cc
C++
cc
143,973
permissive
// 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. #include "src/heap/mark-compact.h" #include "src/base/atomicops.h" #include "src/base/bits.h" #include "src/base/sys-info.h" #include "src/code-stubs.h...
e7830424c501347d3de3529f59176f58ef52b538
b88feed9e79d12639f029ec83fd50903e9f0f044
Pentagon03/competitive-programming
/project-euler/volume04/191.cc
C++
cc
659
no_license
#include <bits/stdc++.h> using namespace std; typedef long long LL; LL dp[50][3][2]; LL run(int n) { memset(dp, 0, sizeof(dp)); dp[0][0][0] = 1; for (int i = 0; i < n; ++i) { for (int a = 0; a < 3; ++a) { for (int l = 0; l < 2; ++l) if (dp[i][a][l]) { dp[i + 1][0][l] += dp[i][a][l]; if...
76b827d9fe7309d7768259fe4d51b04845be9300
1b150a8ddd542bcc27a806815f13f1f9e35fab9e
Itsposs/cppprimer
/ch09/iterator.cc
C++
cc
365
no_license
#include <vector> #include <typeinfo> #include <iostream> void test() { std::vector<int> ivec = {1,3,5,7,9}; auto beg = ivec.crbegin(); auto end = ivec.crend(); std::cout << typeid(beg).name() << std::endl; while (beg != end) { std::cout << *beg++ << " "; } std::cout << std::endl; } int main(int argc,c...
bf634f5355840c5cc52fa0ec89e80d36add7c704
e9e4c5453411dbbc2d04a2634a72b0772ca45650
Samsung/Castanets
/native_client_sdk/src/examples/demo/flock/frame_counter.cc
C++
cc
1,275
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 <time.h> #include <limits> #include "nacl_app/flock.h" void FrameCounter::BeginFrame() { struct timeval start_time; gettimeofday(&start_tim...
f34d862a8f85ca8627d18ceefecf159fcfa8a0ab
e2d92fb0ee475cc50c6419039df16ea9e4a3e549
honglianglv/dailylearn
/cpp/testArg.cpp
C++
cpp
472
no_license
#include <cstdlib> #include <cstdio> int convertCharToInt(char c) { return c - 48; } int main(int argc, char** argv) { char testArray[] = {'H', 'e', 'l', 'l', '0', '\0'}; char testAraay[] = "Hello"; printf("argc : %d\n", argc); //char num= '1'; //int num1 = convertCharToInt(num); //printf("n...
d60b963f114ae705f6ade64b0c073326f3370327
ad6b9b79c7803a85cfb20a03b9e10deff423f08c
tatsumack/codeforces
/div2/658/EMastermind.cpp
C++
cpp
566
no_license
#include <bits/stdc++.h> #define int long long #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i) #define REV(i, a, b) for (int i = (a); i >= (b); --i) #define CLR(a, b) memset((a), (b), sizeof(a)) #define DUMP(x) cout << #x << " ...
8535a8f3ad2f22c6460676cf2d770d22222dcbb7
33f5e2b867c1c8ec672bd890f63dfa86d9565a8c
eudora-jia/CIDLib
/Source/AllProjects/CIDLib/CIDLib_ResourceName.cpp
C++
cpp
8,817
permissive
// // FILE NAME: CIDLib_ResourceName.cpp // // AUTHOR: Dean Roddey // // CREATED: 05/01/1997 // // COPYRIGHT: Charmed Quark Systems, Ltd @ 2019 // // This software is copyrighted by 'Charmed Quark Systems, Ltd' and // the author (Dean Roddey.) It is licensed under the MIT Open Source // license: // // https://opens...
2e2c0a51bdace73ea07529889e9615c21ff19d1c
cb5056b3a0274a908ded851f70ab360274ac4be4
tylerwolverton/SD2-MP2Notes
/sd2/c28/assignments/a06_lighting/src/GPUMesh.hpp
C++
hpp
1,614
no_license
//------------------------------------------------------------------------ // GPUMesh.hpp //------------------------------------------------------------------------ class GPUMesh // A04 { public: // ... // Changed in A06 void CreateFromCPUMesh( CPUMesh const *mesh, eGPU...
673fd722d9b887ddc3e75bb6b720ae8da03f2d0d
07f2d7617b6c8eb817604d75f6c1fcfec58b5665
ahsanMuzaheed/debugable-unlua
/Source/UnLua/Private/UnLuaManager.cpp
C++
cpp
33,456
no_license
// Tencent is pleased to support the open source community by making UnLua available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the MIT License (the "License"); // you may not use this file except in compliance with the License. You may obtain a copy of the...
0829a26ebfc9b2768e98e304fe2383375a947d19
c6ebc0c0c4af8a53cc2f292affc930097317c1fd
pto8913/KyoPro
/yukicoder/5/数字のブロック.cpp
C++
cpp
371
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define rep(i, a, n) for(int i = a; i < (n); ++i) int main(){ int l, n; cin >> l >> n; vector<int> w(n); rep(i, 0, n) cin >> w[i]; sort(w.begin(), w.end()); int count = 0; rep(i, 0, n) { if (l-w[i] < 0) break; l -...
4cab244db9fa26350c2d64e6b8b86e56fd865ada
358e04e49bea79a8861f72429f64504c2d49c55b
komh/qtex
/TimeTable/main.cpp
C++
cpp
852
no_license
/**************************************************************************** ** ** main.cpp ** ** Copyright (C) 2015 by KO Myung-Hun ** All rights reserved. ** Contact: KO Myung-Hun (komh@chollian.net) ** ** This file is part of Time Table. ** ** $BEGIN_LICENSE$ ** ** This program is free software. It comes without an...
067d2ab09a43d52c15512100afd3a2e55b3284a2
55ad664be7398de279892bd0603b2a59d64136a9
briancpark/deitel-cpp
/VCB600ENU1/MSDN_VCB/SAMPLES/VC98/MFC/GENERAL/ROWLIST/RLISTDOC.CPP
C++
cpp
2,176
no_license
// RListDoc.cpp : implementation of the CRowListDoc class // // This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1998 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and rel...
b33d5515262ff236cdc8db33912c9b99059b553e
781b598462c2749298948767d5062fac721222c5
RazorCMS/RazorAnalyzer
/Tools/SyncTools/src/ntp1.cc
C++
cc
7,668
no_license
#define ntp1_cxx #include "ntp1.hh" #include <TH2.h> #include <TStyle.h> #include <TCanvas.h> //C++ INCLUDES #include <fstream> #include <cmath> #include <math.h> void ntp1::Loop() { std::ofstream ofs ("test.txt", std::ofstream::out); if (fChain == 0) return; Long64_t nentries = fChain->GetEntriesFast(); ...
95cc442bcdfbf1297ceaa044a4955a3cb0a04b1f
04d15e34a124fb984e3a5c90a8ab01055032f2f9
qawbecrdtey/BOJ-sol
/problems/acmicpc_7586.cpp
C++
cpp
660
permissive
#include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int a[4]; while(true) { for(int &i : a) cin >> i; if(!a[0] && !a[1] && !a[2] && !a[3]) return 0; switch((!a[0]) | ((!a[1]) << 1) | ((!a[2]) << 2) | ((!a[3]) <<...
0c30362132c5474bcd8697542a3abded6b77d641
b73ea4af3b96433565fdf5375c22c3b4e28c81de
syedaliawaissabir/BGPaaS
/controller/src/bgp/inet/inet_route.cc
C++
cc
3,898
permissive
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include "bgp/inet/inet_route.h" #include <algorithm> #include "bgp/inet/inet_table.h" using std::copy; using std::string; using std::vector; int Ip4Prefix::FromProtoPrefix(const BgpProtoPrefix &proto_prefix, Ip...
685a85fd0f2bda562a60400d9955ac81a15caf15
785743b90a8b423d02f6ff3b9b353838c3612e37
tokitsu-kaze/tokitsukaze-ACM-Template
/c++/图论/二分图匹配/二分图最大权完美匹配.cpp
C++
cpp
1,816
no_license
struct Kuhn_Munkres { #define type int const type inf=INF; static const int N=; int n,mx[N],my[N],pre[N]; type slk[N],lx[N],ly[N],w[N][N]; bool vx[N],vy[N]; void init(int _n) { n=_n; for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) { /* - 允许不完美匹配, 虚边边权=0 - 不允许不完美匹配, 虚边边权=-inf, 这样求出来的匹...
d790e266349fe54261e5d1fc943e1fe1e7cacbde
c002ec52e7c8b7340d4c7253fda4a878aa4bd438
DiegoVinasco/DA-POM-VilleUnity
/src/CityGMLTool/CityGMLTool.hpp
C++
hpp
1,076
no_license
#ifndef CITYGMLTOOL_HPP #define CITYGMLTOOL_HPP #include <iostream> #include <vector> #include "../Modules/Module.hpp" #include "../Modules/XMLParser/XMLParser.hpp" #include "../Modules/GMLtoOBJ/GMLtoOBJ.hpp" #include "../Modules/GMLtoOBJ/DataProfile.hpp" #include "../Modules/GMLCut/GMLCut.hpp" #include "../Modules/G...
11f58e28e3989c1b730c5bf7896cde18ff201394
97743c1cb6bf145c8eb4d7a249fd31d210c9a7b3
KeyTech/KeyTech
/lockservice/src/DataBaseConnector.cpp
C++
cpp
8,842
no_license
/* * File: dbconnector.cpp * Author: torisuta * * Created on May 9, 2012, 9:53 AM */ #include "DataBaseConnector.h" DataBaseConnector::DataBaseConnector() { const char *server = "localhost"; const char *user = "keytech"; const char *password = "appelmoes"; const char *database = "lockservice";...
ec6ff16f2e1b10f22c78124c6ef9a261668a0b2d
d7479281d9c017fec136c51f5c584fd62d04c8a5
MikeCampito/Milestone-1
/Simplex_17-18_Spring-master/Nick Octree/AppClass.cpp
C++
cpp
1,913
permissive
#include "AppClass.h" using namespace Simplex; void Application::InitVariables(void) { //Set the position and target of the camera m_pCameraMngr->SetPositionTargetAndUp( vector3(0.0f, 0.0f, 100.0f), //Position vector3(0.0f, 0.0f, 99.0f), //Target AXIS_Y); //Up m_pLightMngr->SetPosition(vector3(0.0f, 3.0f,...
a3ce40ed06614a6f4550b810defbb18cc17ba50f
d56aa954be5b1c6e39dd1b95ff1def208cf77977
ECS-251-W2020/chromium
/chrome/browser/dom_distiller/dom_distiller_service_factory.cc
C++
cc
4,572
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" #include <utility> #include "base/sequenced_task_runner.h" #include "base/task/p...
82d78a9b80321565fd9d203c83630d5254e80bb9
c46575e441c474c325d1acea263a032ef3631e30
SSPKUZX/cpp-comm
/exp/test/mpmcq_test.cpp
C++
cpp
4,914
no_license
/* Copyright (c) 2016 Erik Rigtorp <erik@rigtorp.se> 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, modify, merge, publi...
85ac12600ee82059b8ec532ad7b716a20d3dd6d5
e17aee0d9228840d5e054ed3f562a8dd92c9259a
PinSk04/c-
/Ex6_04.cpp
C++
cpp
1,091
no_license
// Passing arrays and individual element to function #include <iostream> using namespace std; void ModifyArray(int Temp[]); void ModifyElement(int Temp); int main() { int Data[] = { 1, 2, 3, 4, 5 }; cout << "Effects of passing entrie array pass-by-reference.\n"; cout << "Original array's value : "; for(int ...
831909c829378ca6a1993e2955f72d09b7b36b4f
106603944f8ba3f3cb241526d1a969b82e825fc9
BeezBeez/GPGUI-Pictura
/Pictura/Sources/Core/Rendering/Text/FontFamily.cpp
C++
cpp
2,173
no_license
#include "PicturaPCH.h" #include "FontFamily.h" namespace Pictura::Graphics::Text { PMap<PString, FontFamily*> FontFamily::loadedFonts = PMap<PString, FontFamily*>({ {"null1", nullptr}, {"null2", nullptr} }); FontFamily::FontFamily(PString name, PVector<PString> weights, Window& ownerWindow) : fontName(name) { P...
cbd06f4be5fd37b245d253ffe8eac6fd10d24a20
e6da2deb2bdb734df84f504e0cf9ea7d74966859
stevebraveman/Code
/LOJ/多项式求立方根.cpp
C++
cpp
6,156
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <map> #include <cmath> #define MAXN 400010 #define MOD 998244353 #define G 3 #define I 86583718 void read(int &x) { int f = 1; x = 0; char c = getchar(); while (c < '0' || c > '9') {if (c == '-') f = -1; c = getchar();} while (c...
c864a2808926031556021ef81e11acab406b8c8b
ba3eec25cee091b651e4e3044b173622b6cb461d
zetrax1/POS
/src/model/Mapa.cpp
C++
cpp
461
no_license
#include "Mapa.hpp" #include <SFML/Graphics.hpp> #include <iostream> namespace model { Mapa::Mapa(/* args */) { } Mapa::~Mapa() { } Mapa& Mapa::operator=(Mapa &x) { *this = x; return (*this); } sf::Texture Mapa::getTexture() { sf::Texture texture; if (!texture.loadFromFile("sfml-icon-small.png"...
265f8b47c6f3a8ff8e8647e124d1cd9bcd92ebe8
355b9c8d7fe81ef334f66755a696dbe684d57bca
yasriady/wxProjects
/wxCodes/wxflatnotebook/contrib/src/wxFlatNotebook/wxFlatNotebook.cpp
C++
cpp
44,274
no_license
/////////////////////////////////////////////////////////////////////////////// // Name: wxFlatNotebook.cpp // Purpose: generic implementation of flat style notebook class. // Author: Eran Ifrah <eranif@bezeqint.net> // Modified by: Priyank Bolia <soft@priyank.in> // Created: 30/12/2005 // Modified: 0...
fa71e4f53f81f434d44fdf3a5e2c6f5a47fd34c8
fa9185b9de153d90c6147da2f4acf509ad52f91f
MohamedAhmedHeeba/JAVA-Compiler-Phase2
/Phase2/CFG_Reader.cpp
C++
cpp
3,141
no_license
#include "CFG_Reader.h" #include "Rule.h" #include "CFG.h" #include <bits/stdc++.h> using namespace std; CFG_Reader::CFG_Reader() { //ctor } CFG_Reader::~CFG_Reader() { //dtor } /*start state ==> "METHOD_BODY"*/ /** read the CFG form file build each rule add the rule to static map CFG_map */ vo...
354cfe6bf398970be8f70aba99da2188cc77ab4f
8ce7b7221071b0e1ac41e29e826052a3ee941bbf
sstefan/opengm
/src/examples/image-processing-examples/interpixel_boundary_segmentation.cxx
C++
cxx
7,901
no_license
#include <iostream> #include <iomanip> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <opengm/opengm.hxx> #include <opengm/datastructures/marray/marray.hxx> #include <opengm/graphicalmodel/space/simplediscretespace.hxx> #include <opengm/graphicalmodel/graphicalmodel.hxx> #include <o...
0b857d0b936c2491f5e9ab892086afae23e4d7aa
2b7e5a7e8a53cec4ef2b21f8fa53c78e73e4d3c3
hc0121/1082_PCCU_CSIE_ObjectOrientedProgramming
/第九章/Q6.cpp
C++
cpp
1,654
no_license
/*========================================== 第六題-成績print ==========================================*/ #include <iostream> using namespace std; // 類別 Score class Score { public: // 建構子 Score(string newName, int newMath); // 設定名字 void setName(string newName); // 取得名字 string getName(); // 設...
a5cb0264e21bd85cc80106fcd0ea0ba833f9d68e
872435e15e4f0a7e8e3e03fdd6e8503bfb962ada
saurabhhack123/instaedu
/mark/vec.cpp
C++
cpp
4,279
no_license
/*Mark Acevedo Professor Sokol This is my fifth program assigment for this course. A very complex program and must use IPO comments. */ #include <iostream> #include <fstream> #include <cstdlib> #include <vector> using namespace std; //prototypes for functions........ int readSATscores(vecto...
cd5d6e42c08d1db7206da852190a9b519fe313e5
d12c7844f1dfa61746ce8da9de1863f69aeb9e52
2ee2ee2ee/Competitive_Programming
/ecoo 2016/1.cpp
C++
cpp
650
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int wt, wa, wp, wq; for(int i = 0; i < 10; i++){ scanf("%d %d %d %d", &wt, &wa, &wp, &wq); float awt = wt/100.0, awa = wa/100.0, awp = wp/100.0, awq = wq/100.0; int something; scanf("%d", &something); int p...
3e75e5fde58bd9eb17673d91a67a650d64f7863d
c7db9df1bb961f79738c2f24f2285072ea1d1092
ecsantana76/iroha
/irohad/ametsuchi/impl/k_times_reconnection_strategy.cpp
C++
cpp
1,219
permissive
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #include "ametsuchi/impl/k_times_reconnection_strategy.hpp" using namespace iroha::ametsuchi; // -------------------- | KTimesReconnectionStrategy | ----------------------- KTimesReconnectionStrategy::KTimesReconnec...
98384acd9b1158eb5b1d24ed7cfe83ec8608f657
462230ac230c91048d41e781d8ca512ebb11d1f5
NightTerror1721/bps2
/Puzzle Bubble Shotter/Puzzle Bubble Shotter/scenario_props.cpp
C++
cpp
3,817
no_license
#include "scenario_props.h" #include "bub_board.h" BinBubble::BinBubble(const std::string& model, const BubbleColor& color) : model{ model }, color{ color } {} BinBubbleRow::BinBubbleRow(const std::vector<BinBubble>& bubs) : _bubbles{ bubs } {} BinBubbleRow::BinBubbleRow(const u8& columns) : _bubbles{ columns }...
ba8c579d55b01dde55602408f0d56e6d23f36cd2
e17c04825696a195654a5f88f995fbb616f1c75a
5l1v3r1/Privexec
/vendor/bela/src/bela/str_replace.cc
C++
cc
2,133
permissive
// #include <bela/str_replace.hpp> #include <bela/strcat.hpp> namespace bela { namespace strings_internal { using FixedMapping = std::initializer_list<std::pair<std::wstring_view, std::wstring_view>>; // Applies the ViableSubstitutions in subs_ptr to the std::wstring_view s, and // stores the result in *result_p...
3ee136d8418d3906dec6214149343ae477bac238
1670d06ea0efcdacd6ea8bf65df568a837acf812
huali85/GLES
/Framework/Game.cpp
C++
cpp
679
no_license
// // Created by lihua_000 on 3/1/2017. // #include "Game.h" Game* g_game = nullptr; void Game::Resize(int width, int height) { _timer.Reset(); _width = width; _height = height; glViewport(0, 0, width, height); } void Game::Step() { double dt = _timer.GetDeltaTime(); Update((float)dt); } vo...
ae2868e556f6d435c284e79e3145fd8a44da9d1f
c3e2377b89e9f2c830af5652e409d7f3476be687
IAmAnubhavSaini/cryptoAlgorithm-nt5src
/Source/XPSP1/NT/printscan/faxsrv/src/service/rpc/configtest/dlgtiff.cpp
C++
cpp
2,104
no_license
// DlgTIFF.cpp : implementation file // #include "stdafx.h" #include "ConfigTest.h" #include "DlgTIFF.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif typedef unsigned long ULONG_PTR, *PULONG_PTR; typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; #include "..\..\..\inc\fxsa...
221244b4983b8957a74ae9532b56e30eb0dee279
e07dad13789c84219451c1eb13044e052a00da5f
AviNagosa/Cpp_WarGame
/Soldier.hpp
C++
hpp
951
permissive
#pragma once #include <iostream> #include <vector> #include <stack> #include <math.h> using namespace std; class Soldier { protected: uint playerNumber; int currentPoint; int damage; int maxPoint; std::string type; public : Soldier(uint mPlayerNumber, int c_p, int m_P, int mDamage,string type) :...
63a035fcf0c7b45f55bb19206fb63dbf5ed9f00f
0d761dad0af54a19c35fd086f75e4d227c1bdb0e
rapyuta-robotics/rclUE
/ThirdParty/ros/include/visualization_msgs/msg/detail/image_marker__rosidl_typesupport_fastrtps_cpp.hpp
C++
hpp
2,230
permissive
// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em // with input from visualization_msgs:msg/ImageMarker.idl // generated code does not contain a copyright notice #ifndef VISUALIZATION_MSGS__MSG__DETAIL__IMAGE_MARKER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ #define VISU...
9ebfce9ffb7af5e07273e240378a205c4bd39d23
04b4177929b4d80f9c9a9feed16091db50d81e4f
Ravaut123/SysTools
/source/hpp/Win64/Release/StVArr.hpp
C++
hpp
4,089
no_license
// CodeGear C++Builder // Copyright (c) 1995, 2016 by Embarcadero Technologies, Inc. // All rights reserved // (DO NOT EDIT: machine generated header) 'StVArr.pas' rev: 31.00 (Windows) #ifndef StvarrHPP #define StvarrHPP #pragma delphiheader begin #pragma option push #pragma option -w- // All warnin...
88b718375c9740b831dc5087954e34bd1f0331d1
1716fc2674cf75cb6b95242ad7f2d18a5ab757c1
vladimir-kirillovskiy/misc
/C++/cpp/readFile/readFile.cpp
C++
cpp
573
no_license
#include <iostream> #include <string> #include <fstream> using namespace std; int main() { ifstream fin; string strLine = ""; string strWord = ""; fin.open("Stats.txt"); if(fin.fail()) { cout << "File doesn't exist" << endl; return 1; } while(fin >> strWord) cout << strWord << endl; fin...
894c8125118e52cd00b33f7a0c36d897fdfda7a6
bc580147800738362425647bc03459b0af7b7c9b
pagarba/hope-box
/arduino/hardware/esp32/1.0.2/libraries/Wire/src/Wire.cpp
C++
cpp
9,502
permissive
/* TwoWire.cpp - TWI/I2C library for Arduino & Wiring Copyright (c) 2006 Nicholas Zambetti. All right reserved. This library 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 2.1 ...
2eeaa699840400785490becf394cb8d036dcaf9d
73a48e7cb37d8d7a8af5b4cbf0676e78b1881134
Nadezhda-Frantseva/Object-oriented-programming
/CarInsoles.cpp
C++
cpp
940
no_license
#include <iostream> #include <string> #include "CarInsoles.hpp" #pragma warning (disable:4996) CarInsoles::CarInsoles(): material(materials::carpets) { this->product_name = product::carInsoles; } CarInsoles::CarInsoles(const std::string& mark, const double& price, const unsigned int& count, const materials& material...
defb927f9879650e4ccd989a6ddff13b75bc2f99
ca178b2ea8f34bb36911434d48095d1c175a15cd
yip-jek/RevenueAudit
/src/task/src/ydtaskdb2.cpp
C++
cpp
11,202
no_license
#include "ydtaskdb2.h" #include "log.h" YDTaskDB2::YDTaskDB2(const DBInfo& db_info) :base::BaseDB2(db_info.db_inst, db_info.db_user, db_info.db_pwd) { } YDTaskDB2::~YDTaskDB2() { Disconnect(); } void YDTaskDB2::SetTabTaskSche(const std::string& tab_tasksche) { m_tabTaskSche = tab_tasksche; } void YDTaskDB2::SetT...
a168e78d68bf445ea274a9f5f7e3f40d7ab4da33
b1459c9862f8b963d13b23899dca2173e3a20251
X547/webkit
/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp
C++
cpp
8,493
no_license
/* * Copyright (C) 2019-2020 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 conditi...
d01731d4297a704a30b454cd340ec0dd8aae35fc
37231aed669ca6d721c33d624b609e2c8b709915
Lumaio/Redux
/Redux/main.cpp
C++
cpp
563
no_license
#include <iostream> #include "hooker.hpp" void start(HMODULE module) { AllocConsole(); AttachConsole(GetCurrentProcessId()); freopen("CON", "w", stdout); printf("Lumai/o's #1 internal hack just $99 bitcoin.\n"); initHook(); } BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { if(dwReason ...
d525463a98ab4a32b247c43fd20d09dc4f583d74
3d91d70dee1ec5d0d533052fc2894f0768282f9a
K-Wu/libcxx.doc
/test/libcxx/containers/sequences/deque/pop_back_empty.pass.cpp
C++
cpp
710
permissive
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
43a57697809f75cda81f096c7d6e1330aaa9d4bd
a65efea87086780a743b25f77d2ef22a5cad26b2
bkmgit/megamol
/plugins/OSPRay_plugin/src/OSPRayPKDGeometry.cpp
C++
cpp
5,674
permissive
/* * OSPRayPKDGeometry.cpp * Copyright (C) 2009-2017 by MegaMol Team * Alle Rechte vorbehalten. */ #include "stdafx.h" #include "OSPRayPKDGeometry.h" #include "mmcore/Call.h" #include "mmcore/moldyn/MultiParticleDataCall.h" #include "mmcore/param/EnumParam.h" #include "mmcore/param/FloatParam.h" #include "mmcore/p...
108bbb0d7bfa51c3837a4cb6f3bf5421e34f045b
2aff96ce9a7d328a03d3ba7948038fefb1e33ceb
oudream/vc_example_official
/MFC/general/dynamenu/dynamenu.cpp
C++
cpp
5,411
no_license
// dynamenu.cpp // // This is a part of the Microsoft Foundation Classes C++ library. // Copyright (c) Microsoft Corporation. All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the li...
16beaa06c20c20f4214d9398c8cf4e8d2f783674
050dfb68b7159f5f04b6ad3f21b0e6fcbdc83c5d
lzufalcon/utensor_cgen
/tests/relu/main.cpp
C++
cpp
1,255
permissive
#include "relu_ctx.hpp" #include "uTensor/loaders/tensorIdxImporter.hpp" #include "uTensor/util/uTensor_util.hpp" #include "TESTS/test.hpp" #include <mbed.h> #include <FATFileSystem.h> #include <SDBlockDevice.h> class ReluTest : public Test { Context ctx; TensorIdxImporter t_import; public: void runAll(vo...
4c3fd571d9f0bf6a873537b17c3cb65ebf7ced0a
f88c23c21e8c57eeb97a6bda15d6ca61b154ee6f
ivilab/kjb
/lib/gr_cpp/gr_primitive.cpp
C++
cpp
8,034
no_license
/* $Id: gr_primitive.cpp 21596 2017-07-30 23:33:36Z kobus $ */ /* =========================================================================== * | | Copyright (c) 1994-2010 by Kobus Barnard (author) | | Personal and educational use of this code is granted, provided that this | header is kept intact, an...
59477d12f8c6ac9f75262819723e4eae0ae5ad0a
57d215eb0a23842c465f03c5fbd46a8d6638f79a
KiyotakaYokoyama/pacman
/Solution/Pacman/Enemy.cpp
C++
cpp
12,612
no_license
#include "Enemy.h" #include "Game.h" #include "SceneStage.h" #include "Map.h" static const int MOVE_SPEED = 2; static const int MAX_SPEED = 1; static const int MAX_CEARCH_LENGTH = 10; static const int INIT_HIDE_TIME = 150; static const int POP_TIME = 30; static const int MAX_CEARCH_CHIP_NUM = 200; Enemy::Enemy( const...
376878ef9a08915ae8b0e32308ebd59d0634bdac
61c4d02d1c0e4e5b28fed35aaab4fffd58b7481b
Qt-Widgets/ClothingPatternDesignSystem
/main.cpp
C++
cpp
249
no_license
#include "mainwindow.h" #include "splash/splash.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); Splash s; s.show(); MainWindow mainWin; s.waitFor(&mainWin,500); return a.exec(); }
03fe69d5f30f8aac54cb5948a1b0d4b98ff2162f
f45ad936c0998aac23098f02f45e7963ad258bb1
wangfeilong321/OSGAddOnsGV
/Bindings/Python/OSGDrawable/module/generated/Surface.pypp.hpp
C++
hpp
1,241
no_license
// This file has been generated by Py++. // PyOpenSG is (C) Copyright 2005-2009 by Allen Bierbaum // // This file is part of PyOpenSG. // // PyOpenSG 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; ...
8f7a0dfdf67a1ef82f3f1f61c7a3f34d409acd9b
5e54f23874831e6adf4d83fa35cf76cccfdfc270
vogel005/HackerRank
/AllSubmissions/InterviewPrep/Arrays/newYearsChaos.cpp
C++
cpp
591
no_license
#include <bits/stdc++.h> using namespace std; void minimumBribes(vector<int> q) { int minBri=0; //minimum number of bribes needed for(int i = q.size()-1; i >= 0; i--) { if(q[i] - (i+1) > 2) { // ticket number - position > 2 swaps. as people can only swap twice. cout << "Too chaotic" << endl; r...
7fbc202252862047e12d1c7b8edfcb5dbd228348
1e0778451212354677b301f058602210d8d58b3c
eti-p-doray/PolyProject
/ArmController/model.cpp
C++
cpp
4,808
no_license
#include "model.h" #include <iomanip> Model::Model() { objective_ = {}; instructions_ = {}; } Model::~Model() { } void Model::updateLeap(const Leap::Controller & controller) { Leap::Frame frame = controller.frame(); if (frame.isValid() != true) { return; } Leap::HandList hands = fram...
f61cc13896a8758db6b88d642d84845371ee49e9
b95ad3c75f10d0e78f38715016e7577490db0335
EdwardHarriss/C-Compiler-and-C-to-Python-Translator
/Python_Translator/common/src/parser.tab.hpp
C++
hpp
3,978
no_license
/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. 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 t...
2e0e23ec94f180892a8c1ff4508ffe56294b0694
a3096cdffd3c4719afdd08b4b1519827a981715d
ramonvermeulen/cplusplus
/week5/headers/Game.hpp
C++
hpp
439
no_license
#ifndef GAME_HPP #define GAME_HPP #include "Constants.hpp" class Game { private: char currentPlayer = X; char board[MAX]; bool checkWinScenario(BP A, BP B, BP C); public: Game(); void makePlay(int position); void resetBoard(); GameState checkGameState(); char getNextPlayer(); c...
450f287b05223515507787b524bd507e2265df36
01f46e6235ff7e209ac530998e72937bac3bd0ef
Lwt-ymm/My-C-language-learning-process
/Project_21-3-17/源.cpp
C++
cpp
2,331
no_license
#include<iostream> #include<fstream> using namespace std; int main() { return 0; } //template<typename T> //void myswap(T& a, T& b) //{ // T temp = a; // a = b; // b = temp; //} // //int main() //{ // int a = 1, b = 2; // myswap<int>(a, b); // swap(a, b); // cout << a << ' ' << b << endl; ...
f07a9afe24f701b847a9c9cd8e4e6d428e70dd43
4d143a887035d565ceca7e1aebea3ba2341fb6c6
ProgramFan/hana
/include/boost/hana/core/convert.hpp
C++
hpp
4,984
permissive
/*! @file Defines `boost::hana::to` and related utilities. @copyright Louis Dionne 2015 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_CORE_CONVERT_HPP #define BOOST_HANA_CORE_CONVERT_HPP #include <boost...
ab1847413a20ae8addaac9779b92603f1359830a
56f0464b1ce16e42301c3bad444facfcc78a1658
hansw1204/FlyWithLua
/src/FloatingWindows/FLWIntegration.cpp
C++
cpp
26,624
permissive
/* * Floating Windows with imgui integration for FlyWithLua * Copyright (C) 2018 Folke Will <folko@solhost.org> * Released as public domain code. * */ #include <vector> #include <memory> #include <stdexcept> #include <sol.hpp> #include <iostream> #ifdef __APPLE__ #include <OpenGL/gl.h> #else #include <GL/gl....
81c2a000675bc8fba5c7db1d2767bff9fcede398
625bad3262efc78425f6bf50d8edef2b504e0442
Cryoscopic-E/Intelligent-Robitics-Attention-System
/icub/source/ImageAnalysis.cpp
C++
cpp
11,038
no_license
/* ** Heriott Watt University, 2019 ** Intelligent Robotics ** Authors: Dale Carter, Rohit Chakraborty, Lucas Dumy, Solène Navaro, Emanuele De Pellegrin */ #include "ImageAnalysis.hpp" #include "Transition.hpp" ImageAnalysis::ImageAnalysis() { } ImageAnalysis::~ImageAnalysis() { _feedPort.close(); _thPort.cl...
22b593ce31934806ef1df2b2045bc4c5569cb49f
ad6680f6b756fb8bf60fbd5055d7d454910b891b
RomainPerche/CPP1
/src/test_op_plus_egal_scal.cpp
C++
cpp
306
no_license
#include "Dvector.h" #include "main.h" #include <assert.h> int test_op_plus_egal_scal(){ Dvector a = Dvector(3, 4); double d = 2; stringstream str1; a+=d; a.display(str1); assert(str1.str() == "6\n6\n6\n"); std::cout << "Opérateur += avec un scalaire OK !\n"; return 0; }
345266d7e486cc6eed45ada87e0cd3ed4912f5cc
7336d12244c8ebc1a174e73d37c33654acbe1bb7
elsys/oop-2016-2017
/11a/2016-12-19/binary.cpp
C++
cpp
788
no_license
/* * binary.cpp * * Created on: Dec 15, 2016 * Author: lubo */ #include "binary.h" #include "context.h" #include "calculator_error.h" using namespace std; BinaryOperation::BinaryOperation(string symbol) : Operation(symbol) { } void BinaryOperation::execute(Context& context) const { if (context...
80705c58dae2c92a61f9ad156dc25fc90c0f3e5f
b02717d8b570573f256787ba3a2969f60ad3b76d
rafael877/Programas_exercicios
/URI/Exercicios C - Uri #1/1065.cpp
C++
cpp
217
no_license
#include <stdio.h> int main(){ int cont, n, quant = 0; for(cont = 1; cont <=5; cont++){ scanf("%d",&n); if (n % 2 == 0){ quant++; } } printf("%d valores pares\n",quant); return 0; }
4201805de463e0cc5348a0243686fb0d08e8c044
cef1077bdfe4b661069df55440b4bd100776b6f8
HemaSriBusi/MRNDSUMMER
/day2/permutation.cpp
C++
cpp
535
no_license
#include "iostream" #include "stdlib.h" using namespace std; void printArray(int *a, int n) { for (int i = 0; i < n; i++) cout << a[i]; cout << endl; } void printPermute(int *a, int n, int idx) { if (idx == n) { printArray(a, idx); return; } printPermute(a, n, idx + 1); for (int i = idx + 1; i < n; i++) ...