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
e4b91dfe33c5332777b9fdc334b5f66e9be39413
68e0c37b06d1738c4790b697bb867cd8b4550a60
blegal/Fast_LDPC_decoder_for_ARM15
/src/CDecoder/template/CDecoder.cpp
C++
cpp
541
no_license
/* * ldcp_decoder.h * ldpc3 * * Created by legal on 02/04/11. * Copyright 2011 ENSEIRB. All rights reserved. * */ /*----------------------------------------------------------------------------*/ #include "./CDecoder.h" CDecoder::CDecoder() { fast_stop = false; nb_iters = 0; } CDecoder::~CDecoder...
fbbae4b4b935d42693b4fb32f6f2c710da2a153f
64d6e403e924827c0407b370b14bb91696a25d92
aLagoG/kygerand
/ger/lessThan10/three.cpp
C++
cpp
992
permissive
#include<iostream> #include<string> #include<unordered_map> using namespace std; typedef unordered_map<string,int> strIntMap; typedef unordered_map<int,string> intStrMap; strIntMap months ({ {"January", 0}, {"February", 1}, {"March", 2}, {"April", 3}, {"May", 4}, {"June", 5}, {"July", 6}, {"August", ...
148d7e7935bd7cf56344f35bffb7fb36ddd988d8
bb47e2b9af089f8573c794575faf1c662a6e6c22
HiDaN4/chamberslabyrinth
/src/main.cpp
C++
cpp
376
permissive
#include "Game.h" #ifdef SFML_STATIC #pragma comment(lib, "glew.lib") #pragma comment(lib, "freetype.lib") #pragma comment(lib, "jpeg.lib") #pragma comment(lib, "opengl32.lib") #pragma comment(lib, "winmm.lib") #pragma comment(lib, "gdi32.lib") #endif // SFML_STATIC int main(int argc, char *argv[]) { ...
81ebb53cace31939ff0b89ae35401bf25ce61b9b
b957411cc109e735edff0edcfa106d4611d2bd0d
DrSh4dow/lifish
/src/ui/UI.hpp
C++
hpp
2,897
permissive
#pragma once #include "LoadScreen.hpp" #include "WindowContext.hpp" #include <SFML/Graphics.hpp> #include <memory> #include <sstream> #include <unordered_map> namespace lif { struct SaveData; namespace ui { class Screen; /** High-level interface to UI. It's a singleton class */ class UI final : public lif::Window...
d386b35ba563b8446437f56417fa48178707db59
b2c24ecadb559ee162ef86c70e10c8a9a4e9d282
naturalatlas/node-gdal
/deps/libgdal/gdal/frmts/fits/fitsdataset.cpp
C++
cpp
22,851
permissive
/****************************************************************************** * * Project: FITS Driver * Purpose: Implement FITS raster read/write support * Author: Simon Perkins, s.perkins@lanl.gov * ****************************************************************************** * Copyright (c) 2001, Simon...
93f2995aa42127ffd5adf37e9fcfe09a43c94173
5edcbfc838b119db48c736824ae242d13cb2c113
kzcashteam/kzcash
/src/test/limitedmap_tests.cpp
C++
cpp
2,709
permissive
// Copyright (c) 2012-2015 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 "limitedmap.h" #include "test/test_kzcash.h" #include <boost/test/unit_test.hpp> BOOST_FIXTURE_TEST_SUITE(limited...
6c10df71a6149dc24d5d31491944123be54d1108
7908f61d910c8ff27da5086ed0f6d599ee2ce1d9
iamshambhavi/Codeforces
/Codeforces Round #655 (Div. 2)/A. Omkar and Completion.cpp
C++
cpp
322
no_license
#include<bits/stdc++.h> #define MOD 1000000007 #define long long ll using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); //freopen("input.txt","r",stdin); //freopen("output.txt","r",stdout); int t; cin>>t; while(t--){ int n; cin>>n; for(int i=0;i<n;i++) cout<<"1"<<" "; cout<<endl; } ...
c7ed01e25e04cad3a1fb598a42c8460bd0850409
134dad692d47e305e917bd162e1d362695f413a3
laughmetal/GoogleCodeJam
/2014/QualificationRound/CookieClickerAlpha/CookieClickerAlpha.cpp
C++
cpp
1,019
no_license
//============================================================================ // Name : CookieClickerAlpha.cpp // Author : Xuanchen Tang // Version : // Copyright : // Description : Google Code Jam, Qualification Round 2014, Problem B. Cookie Clicker Alpha //=========================================...
c49b961f2258aace58ec72ebdcff225a3e372be7
e1db48b32a5e7a640690414f7ea9100adceb271c
ancin/testdlljvm
/library.cpp
C++
cpp
793
no_license
#include "library.h" #include <iostream> void hello() { std::cout << "Hello, World!" << std::endl; } JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *jvm, char *options,void *reserved) { printf("=====jvm call staring======"); jvmtiEnv *jvmti; jint result = jvm->GetEnv((void **) &jvmti, JVMTI_VERSION_1_0);...
18c1afabee5ee70021fd5294685bb38540299de0
dca30dea540738ddbcb2db22786a5da1738c4229
mahdijemal/smart_wedding_reception
/New folder/azertyjklm/revenus.cpp
C++
cpp
7,387
no_license
#include "revenus.h" #include <QString> #include <QSqlQuery> #include <QSqlQueryModel> revenus::revenus() { int id_client =0; QString nom_client =""; int numero_transation = 0; QString type =""; int montant =0; } revenus::revenus(int id_client ,QString nom_client ,int...
d7ab064a70a4b47ee4be83a35050b954203adcd4
fc6ac4f948132561d5a1bd7a27ef1619baf16cfa
jocodoma/coding-interview-prep
/LeetCode/Problems/0581_Shortest_Unsorted_Continuous_Subarray/shortest_unsorted_continuous_subarray.cpp
C++
cpp
1,450
permissive
class Solution { public: int findUnsortedSubarray(vector<int>& nums) { // return sortAndCheck(nums); return twoPointers(nums); } // Reference: // https://leetcode.com/problems/shortest-unsorted-continuous-subarray/discuss/123732/Two-c%2B%2B-solution // time complexity: O(nlogn), sp...
f27347f4e0488193735249becccaa498c64e4c0f
f5445a15e84d6082b4e7e7002304511f476065c8
zjj6029/chromium
/remoting/protocol/ice_transport_unittest.cc
C++
cc
11,893
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "remoting/protocol/ice_transport.h" #include <memory> #include <utility> #include "base/bind.h" #include "base/location.h" #include "base/macro...
7592e636ac95bd6c0c0b47147aa2e9557836a76c
b31bf089c27a4578d7de6d2c47ece8e51564d7a1
ITC-Vanadzor/ITC-7
/Anush_Qalashyan/C++/Homework/11.11.2015/battle.cpp
C++
cpp
889
no_license
#include <iostream> int main () { int N = 10; int a[10][10]; for (int i = 0; i < N; ++i) { for (int j = 0; j < N; ++j) { a[i][j]=0; } } a[1][1]=1; a[1][2]=1; a[1][3]=1; a[2][4]=1; a[3][5]=1; a[4][2]=1; a[4][3]=1; a[5][2]=1; a[5][3]=1; int count = 0; for (int i = 0; i < N; ++i) { for (in...
e3f34a23765930650c6c56101c43067e28ad9e4a
dd8e143258b739bffba03bef3a89bfa62d94e177
jjzhang166/WinNT5_src_20201004
/NT/multimedia/wmdm_sr1/mdsp/lyrasp/mdsputil.cpp
C++
cpp
19,966
no_license
// // Microsoft Windows Media Technologies // © 1999 Microsoft Corporation. All rights reserved. // // Refer to your End User License Agreement for details on your rights/restrictions to use these sample files. // // MSHDSP.DLL is a sample WMDM Service Provider(SP) that enumerates fixed drives. // This sam...
383c4614e1c7ef22257bc9e9d8e99824118db16b
ad1f0716fd8316a9705c2af6c83fe497dba40938
palestar/darkspace
/Tools/UniverseContextPort/UniverseContextPort.cpp
C++
cpp
1,499
permissive
// UniverseContextPort.cpp : Defines the initialization routines for the DLL. // #define UNIVERSECONTEXTPORT_DLL #include "stdafx.h" #include <afxdllx.h> #include "Port.h" #include "PortView.h" #include "ChildFrame.h" #include "Resource.h" //-------------------------------------------------------------------------...
bf357e28261b240c2285bc514472642af954b527
4cd01eb21b11e12c3469faa1984f20ca96cfc13c
dmitry-saprykin/wjrpc
/examples/calc/api/multiplies_json.hpp
C++
hpp
857
no_license
#pragma once #include "calc/api/multiplies.hpp" #include <wjson/json.hpp> #include <wjson/name.hpp> namespace request { struct multiplies_json { JSON_NAME(first) JSON_NAME(second) typedef wjson::object< multiplies, wjson::member_list< wjson::member<n_first, multiplies, int, &mul...
1bee95289c685afe5905aac3b12da715027081bd
acf6786f9c78bd7b1f70d7459ba6556e5adfcd6b
yanyushr/fuchsia
/zircon/system/ulib/io-scheduler/scheduler.cpp
C++
cpp
3,076
permissive
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <io-scheduler/io-scheduler.h> #include <fbl/auto_lock.h> namespace ioscheduler { zx_status_t Scheduler::Init(SchedulerClient* client, uint32_t ...
810f8c4ace88a9509404da01eb1c7e5e2401ea83
a66c6aaa699eb10f5fb78c0a1dcb9a3545b78a43
paulyc/perfetto
/src/profiling/memory/main.cc
C++
cc
5,860
permissive
/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
2b0e3359ed43543e0db94342e0a3a9804ebcf53f
dddb500b0a7c3362cdb1c5dcbaeb7bbd587951cc
wjhssfs/myLeetcode
/200/225ImplementStackusingQueues.hpp
C++
hpp
1,696
no_license
// 225 Implement Stack using Queues // Implement the following operations of a stack using queues. // push(x) -- Push element x onto stack. // pop() -- Removes the element on top of the stack. // top() -- Get the top element. // empty() -- Return whether the stack is empty. // Notes: // You must use only standard opera...
86ea948df4912efd5d4111c72b7f113ef804b6da
49952056fd349a3d3f88d1ad3addad4e213ea7e8
qweasdd136963/OXR_CoC
/src/xrGame/ui/UITextVote.cpp
C++
cpp
1,925
permissive
#include "StdAfx.h" /* #include "UITextVote.h" #include "UIVotingCategory.h" #include "UIXmlInit.h" #include "xrUICore/Buttons/UI3tButton.h" #include "UIEditboxEx.h" #include "Level.h" #include "game_cl_teamdeathmatch.h" #include "xrEngine/xr_ioconsole.h" CUITextVote::CUITextVote(){ bkgrnd = new CUIStatic(); bkgrn...
3fdb2821390fa0ed9a50fd69584e38896e18ace8
b6dfbb032e6e95865738b9c4e88fbfeaa342ffc9
pooyaniazi/vuo
/compiler/VuoCompilerType.cc
C++
cc
16,638
no_license
/** * @file * VuoCompilerType implementation. * * @copyright Copyright © 2012–2016 Kosada Incorporated. * This code may be modified and distributed under the terms of the GNU Lesser General Public License (LGPL) version 2 or later. * For more information, see http://vuo.org/license. */ #pragma clang diagnostic ...
2c5f90cc44b67d91114280fd6dd58ba309dd1364
25e04b1d6e70ac36f82895492103ecb4bce7a37c
Jesus05/oxygine-framework
/oxygine/src/res/Resources.cpp
C++
cpp
9,682
permissive
#include "Resources.h" #include "Resource.h" #include "pugixml/pugixml.hpp" #include "core/file.h" #include <algorithm> #include "core/log.h" #include <stdio.h> #include "CreateResourceContext.h" #include "ResAnim.h" #include "ResFont.h" #include "utils/stringUtils.h" #include "core/log.h" #include <stdarg.h> //#d...
465e24379b600781d94a07a8aff522f40fbfd3a7
fc9e062e7f997948243e0f277e884927ed7a8e35
Yaossg/misc
/timezone.cpp
C++
cpp
455
no_license
#include <utility> #include <ctime> #include <cstdio> using namespace std; pair<short, short> getLocalTimeZone() { time_t t = 0; //1970-1-1 00:00:00 in UTC struct tm* l = localtime(&t); short h = l->tm_hour, m = l->tm_min; if(l->tm_year + 1900 < 1970) { h -= 24; if(m != 0) { h++; m = 60 - m; } } ...
65070f25b09a8b2df4052aaee46a2cda39798e28
f9f614089d59a95fe5b1148191c3a23c95ed75b6
shillyshaly/Fraction
/src/main.cc
C++
cc
324
no_license
#include <iostream> #include <cstdlib> #include "fraction.h" using namespace edu::vcccd::vc::csv15; using namespace std; int main(){ Fraction obj1(0,0); cout << obj1.getDenominator() << endl; cout << obj1.getNumerator() << endl; // cout << obj1.getRealValue() << endl; obj1.output(); return 0;...
b7238f896279dd516e01a114fddbb16da8e85b7c
527e4ba19c94ce6043e11d512da6f17776396e80
ramirezpulidojavier/INFORMATICA-GRAFICA
/PRACTICAS/skeleton/sistema_escaleras.cc
C++
cc
1,396
no_license
#include "sistema_escaleras.h" _sistema_escaleras::_sistema_escaleras(){ } void _sistema_escaleras::draw_fill(bool flat, bool smooth){ glMatrixMode(GL_MODELVIEW); glPushMatrix(); glTranslatef(0,0,1); escaleras.draw_fill(flat, smooth); glPopMatrix(); glPus...
0ad2cba8c1599514e5c1975712a9da0ab59e8c26
aea1cd66caeab052b36d71278179d5ec300bebae
guoruihan/RISC-V
/main.cpp
C++
cpp
1,186
no_license
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include"init.h" #include"IF.h" #include"ID.h" #include"EX.h" #include"MEM.h" #include"WB.h" using namespace std; void nextstep() { /* IF::pro();x[0]=0; ID::pro();x[0]=0; EX::pro();x[0]=0; MEM::pro();x[0]=0; WB::pro();x[0]=0;*/...
dd73878cfe87829ce72c0133c859c6ad4d636185
615a5cc4f581e3e61d7ac735aa658cece407841b
1093842024/glenngit
/motion_detection_track_related_code/meanshift_tracking/MY_MEANSHIFT_CHOOSE/Meanshift_Clustering/cpp_test.cpp
C++
cpp
2,292
no_license
#include <stdio.h> #include <stdlib.h> #include "MeanShift.h" using namespace std; vector<vector<double> > load_points(const char *filename) { vector<vector<double> > points; FILE *fp = fopen(filename, "r"); char line[50]; while (fgets(line, sizeof(line), fp) != NULL) { double x, y; ch...
18619fb3d5180ba084a69235c8fe8fb3f443f852
198ef5492a5b1f940415f60836d5b0a1a826a04f
RoadRaz/FirstProject
/Source/FirstProject/ColliderMovementComponent.cpp
C++
cpp
1,086
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "ColliderMovementComponent.h" void UColliderMovementComponent::TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) { Super::TickComponent(DeltaTime, TickType, ThisTickFu...
17b6ea1881328558f273343615eb4c5ed442a7a5
50239196a7db2f63e46e834f10bcb90b2dc9d7eb
gabkyo/Computa-o-Gr-fica-2019-02
/trabalho.cpp
C++
cpp
7,156
no_license
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include <cstring> #include <list> #include <algorithm> #include <cmath> #include "tinyxml2.h" #include "tinyxml2.cpp" #include <GL/glut.h> #include <GL/freeglut.h> #include <limits.h> #include <iterator> using namespace std; using namespace ...
eaf109e22a3c959805dc79e564b67ca9a8b27278
ef9c8df532d81117848af25b0a4677f7b1d27c5c
unclebob/tddrefcpp
/CSlim/tests/Com/TcpComLinkTest.cpp
C++
cpp
310
no_license
#include "CppUTest/TestHarness.h" extern "C" { #include "TcpComLink.h" } TEST_GROUP(TcpComLink) { TcpComLink* tcpComLink; void setup() { tcpComLink = TcpComLink_Create(0); } void teardown() { TcpComLink_Destroy(tcpComLink); } }; TEST(TcpComLink, Create) { }
e7969f147e1172c2720a2d37a0f2f7dd9dfdf85a
36cf3bee88e4901614ea1d73e1e6c48e0b334c6b
sanusiyad135/lab-linkedlist
/lab2.2.cpp
C++
cpp
3,575
no_license
//include library #include<iostream> using namespace std; //creation of linked list //by declaring pointers and another variable to store the data class Node{ public: //declaration for storing datadata int data; //the pointers next and previous Node * next; Node * prev; //contructor t...
00d2580cc97b6eae12a46b0a4f39340ee4b5732c
fbcf1e958c676f9461a13d7692fa5fda7e966654
jhueckelheim/force
/tests/summation_reproducibility/test_sum.cpp
C++
cpp
4,328
no_license
#include <iostream> #include <iomanip> #include "force.hpp" #include "mpfrcpp_tpl.h" #include "quadhelper.hpp" #include "randomhelper.hpp" #include <random> #include <algorithm> #include <chrono> #include <ctime> #include <cstdlib> #include <unistd.h> #include <random> #include <iostream> template<typename T> T addup(...
ac318e4a780b78d1b378bdeeafb0e0aa66b01a51
c5f60c9ca70d23c7346d46594914427300008662
realm/realm-core
/test/test_util_overload.cpp
C++
cpp
2,518
permissive
/************************************************************************* * * Copyright 2017 Realm Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lice...
c9d59be4f175cb0023c2ef773283151e1b4e4443
a4e22b43d8feafe9089c2f884063e2d78ee674d2
TheChayo/gunz-the-tps-mmorpg
/Gunz_The_MMORPG/CCMatchServer_OnCommand.cpp
C++
cpp
52,994
no_license
#include "stdafx.h" #include "CCMatchServer.h" #include "CCSharedCommandTable.h" #include "CCErrorTable.h" #include "CCBlobArray.h" #include "CCObject.h" #include "CCMatchObject.h" #include "CCAgentObject.h" #include "CCMatchNotify.h" #include "Msg.h" #include "CCMatchStage.h" #include "CCCommandCommunicator...
01a4acbd3f85edac576d974d9305330fdcea3213
f29b60925d4dcc8778b511c6f88eb0a157b8baa9
weixitong2/SPARTAN
/R/costfunction.cpp
C++
cpp
328
no_license
#include <RcppArmadillo.h> //[[Rcpp::depends(RcppArmadillo)]] using namespace arma; // [[Rcpp::export]] mat costfunction(mat a, mat b,int k = 2){ mat cost; cost.zeros(a.n_rows,b.n_rows); for(int i=0;i<a.n_rows;i++){ for(int j=0;j<b.n_rows;j++){ cost(i,j) = norm(a.row(i)-b.row(j),k); } } return c...
b2dbd8179636b073cdcef0ca10974cabdeda20a8
641ef7030a057edd2e434e23dfaa7995d6dffb13
mauricechristopher/cpp-piscine
/rush01/Sfml.cpp
C++
cpp
4,143
no_license
#include "Sfml.hpp" Sfml::Sfml( std::vector<bool> arr ) : _arr(0), _winmaxY(2500), _winmaxX(1000), _curY(0), _window(sf::VideoMode(_winmaxX, _winmaxY), "ft_gkrellm") { IMonitorModule *ref[MODULE_COUNT] = { new HostnameModule("Hostname/Username"), new OsInfoModule("OS Info"), new DateTimeModule("Date/Time"), ...
cad9a48639247f390dc10b9d4459142bba0a0cc7
2abe509f80d5d373ccbffae4301f323623079aeb
live-for-dream/proto-quic
/src/net/quic/core/quic_client_session_base.cc
C++
cc
6,366
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/quic/core/quic_client_session_base.h" #include "net/quic/core/quic_client_promised_info.h" #include "net/quic/core/quic_flags.h" #include "...
0f0ed8a3804108266dd1e9277f24fda0ebaf1d33
38ff5ffb2ddd9aecbe45d68e2f31ac4ffaf975a8
Xenon1357/Space-Invaders
/SFML2/EnemyEasy.cpp
C++
cpp
1,748
no_license
#include "EnemyEasy.h" sf::Texture EnemyEasy::texture; EnemyEasy::EnemyEasy(float x, float y, int level, int id) : BasicEnemy(id) { if (level == 1) { speed = 0.1; shootSpeed = 1; randShootDelay = 2000; sprite.setScale(0.45, 0.45); hitbox1.setScale(0.5, 0.3); hitbox1pos.x = -60; hitbox1pos.y = 0; ...
0da86bfed59d68a6387fabfebe49430dd5da85e7
a7372ba1b55bf077dc4a75964af4e103b1f92708
MatthieuCoquelin/fightGame
/CRogue.cpp
C++
cpp
5,378
no_license
#include "CRogue.h" #include "CDagger.h" using namespace std; //constructeur par defaut par defaut CRogue::CRogue() { m_weapon = NULL; m_name = ""; m_life = 0.0f; m_dodge = 0.0f; m_speed = 0.0f; m_attack = 0.0f; m_defence = 0.0f; m_agility = 0.0f; m_intelligence = 0.0f; m_stateProvocation = 0; m_statePoiso...
c8218865c93d3ae46aefe92371ac5e8d409b9b4d
64e48cc9d4a38a02d0712b7a0a25c5583481a32d
ransomar3/INFO450PIG
/INFO450PIG/INFO450PIG.cpp
C++
cpp
1,566
no_license
#include "stdafx.h" #include <iostream> #include <stdio.h> #include <string> using namespace std; bool isAVowel(char); string translateToPigLatin(string); int main() { string fromEnglish; cout << "Please enter a word you would like to translate:\n " << endl; cin >> fromEnglish; cout << fromEnglish << "\nThat woul...
edc36989bdf53753b0399b96b792cd28e1ee880c
3fb6ccc3b9d145e7be8ccf79b60324184b678f8d
feiyunwill/Atlas-Fate-Between-Light-and-Darkness
/source/modules/system/module_scene_manager.cpp
C++
cpp
13,793
no_license
#include "mcv_platform.h" #include "module_scene_manager.h" #include "handle/handle.h" #include "entity/entity.h" #include "entity/entity_parser.h" #include "modules/game/module_game_manager.h" #include "components/comp_group.h" #include "components/lighting/comp_light_point.h" #include "components/comp_render.h" #incl...
de8084596031e8b1a778f88eea922d15da343651
a87fa89c96b14ac3500263ce339a028a8860071f
janetuk/shibboleth-xmltooling
/xmltooling/encryption/impl/Decrypter.cpp
C++
cpp
12,863
no_license
/* * Copyright 2001-2007 Internet2 * * 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 agree...
b346d6af4d08b2b3d56fcbbfba6d17751b75b4d1
aac124cb70d8d9ed87b19bede1603696e62c4cd3
adrianjmejias/Compe
/DONE/SPOJ_ACT.cpp
C++
cpp
302
no_license
#include <stdio.h> #include <iostream> #include <cstring> int main(){ //freopen("entrada.in","r", stdin); int N; scanf("%d\n", &N); char buff[50005]; while(N--){ scanf("%*d "); scanf("%s\n", buff); printf("%c\n", buff[strlen(buff)-1]); } return 0; }
7d2f3b443863934c7f28bdfeadc15de92fe9ba83
5501b090229b603dde1fb3310c828dac7d97ac2a
KutieKat/Castlevania
/Source Code/Castlevania/Game.cpp
C++
cpp
7,666
no_license
#include "Game.h" #include "Utilities/Debug.h" #include "Libraries/TinyXML/tinyxml.h" #include "Scenes/PlayScene.h" #include "Scenes/IntroScene.h" #include "Scenes/CutScene.h" CGame* CGame::instance = nullptr; /* Initialize DirectX, create a Direct3D device for rendering within the window, initial Sprite library for ...
df6f6b0eb6163619b5496c06525df829b18c0b96
75fd4a23b260bf042ee4cc9e865a84f686ba009e
knowsys/VLog-cpp-API
/VLog-API.cpp
C++
cpp
22,783
permissive
#include <jni.h> #include <vlog/concepts.h> #include <vlog/edb.h> #include <vlog/seminaiver.h> #include <vlog/cycles/checker.h> #include <vlog/reasoner.h> #include <vlog/utils.h> #include <kognac/utils.h> #include <kognac/logs.h> #include <iostream> #include <fstream> #include <cstring> #include <cstdint> #define IS...
4616cfcc746dae353f230d03f7badfb6c1399065
41e26361e8f0dad2c905a5e97f52085beeb446e1
yuanLink/AppContainer-Study
/AppContainer/AppContainer.cpp
C++
cpp
8,932
no_license
#include"AppContainer.h" #define CHECKRTL if (!NT_SUCCESS(status)) { std::cout << "Error with error code " << std::hex << status << std::endl;goto END; } const SIZE_T SIA_Length = sizeof(SID_IDENTIFIER_AUTHORITY); SID_IDENTIFIER_AUTHORITY SIA_NT = SECURITY_NT_AUTHORITY; SID_IDENTIFIER_AUTHORITY SIA_IL = SECURITY_MAN...
74b50f7efe5a67f44f233d5c91bbc1f8f475969e
d2e202d0609ddfc0523db46124c4f62063657341
cmrnprry/ComputerGraphics
/Assignment6_SceneGraphOrParticleSystem/ParticleSystem/Renderable.cpp
C++
cpp
5,723
no_license
#include "Renderable.h" #include <QtGui> #include <QtOpenGL> #include <iostream> Renderable::Renderable() : vbo_(QOpenGLBuffer::VertexBuffer), ibo_(QOpenGLBuffer::IndexBuffer), texture_(QOpenGLTexture::Target2D), numTris_(0), vertexSize_(0), rotationAxis_(0.0, 0.0, 1.0), rotationSpeed_(0.25) { rotationAngle_ = 0.0;...
d7c1133f46bcb3b5e0134821c13d8398c1c65718
b99aaeaf188ba5c16e5ed0d2289071d01f5d14cc
519984307/slicOutDoorParallelCollection.Spiral
/trunk/ProjectCode/SGVcode/CuiLib/QT_THREAD_MODULE/QtThreadPlcSimulatorClient.cpp
C++
cpp
3,692
no_license
#include "QtThreadPlcSimulatorClient.hpp" /*-------------------------------------*/ /** * * */ /*-------------------------------------*/ QtThreadPlcSimulatorClient::QtThreadPlcSimulatorClient(QObject *parent ):QtThreadPlcNetClient(parent) { this->mBlock = 0; this->mEvent = "PLC Simulator"; } /*-----------...
c8fd60604f27b5cd9ebfaf62496ace12d49d2cbd
5af249ebc9c4d44da14603f3f4bf5c01e164a324
StaVan28/Onegin
/Error.cpp
C++
cpp
1,312
no_license
#include "global.h" //----------------------------------------------------------------------------- void print_error(void) { switch(errno) { case SUCCESS: break; case FILE_OPENING_ERROR: printf("FILE OPENING ERROR 1 in file (%s)", __FILE__); br...
1bce8e7c8a6a6bd7751f6fa795e135c75eab3d09
4ebe4451436415938940f5b417e03c646d4cd67b
tarotene/procon-archive
/atcoder.jp/abc104/abc104_a/Main.cpp
C++
cpp
505
no_license
#include <bits/stdc++.h> using namespace std; void solve(long long R) { if (R < 1200) { cout << "ABC" << endl; } else if (R < 2800) { cout << "ARC" << endl; } else { cout << "AGC" << endl; } } // Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-to...
f29566f2fd3d61f20308584ca34b52c11abb0bc0
3aefeac4d20962e790e0e16b37b416bcc50b078d
TheEryk/Grafika-Komputerowa
/lab3 08.03.2018 Szymek/Project1/common.cpp
C++
cpp
784
no_license
#include "common.h" //------------------------------- SHARED VARIABLES -------------------------------------- char err_msg [1024]; extern HWND hListBox; //-------------------------------------------------------------------------------------------- // dodaje komunikat message do dziennika (LOG void PrintLog(char *me...
035b1126b0c64038d3c17a627cd7388e6823d4ae
f52dba6135e4000efaf09bd2975487c8f2165b00
FrancisKoo/AMP
/lib/amp/rpc/services/service_data.hpp
C++
hpp
216
no_license
#pragma once #include <amp/context.hpp> #include <memory> namespace amp { namespace rpc { namespace service { class ServiceData { protected: std::shared_ptr<amp::Context> mContext; }; } } // namespace rpc }
103224319cee55d7bc70f0db5cc05dbc03497420
2f1ab19e382310437d3c0007d1f2ae62e00f4a41
RussellJerome/DeepRockGalacticSDK
/SDK/FSD_Basic_BG_CutCorner_W_Image_parameters.hpp
C++
hpp
3,164
no_license
#pragma once // DeepRockGalactic SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "FSD_Basic_BG_CutCorner_W_Image_classes.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------...
0d5a1b84faf2ed331de550f7031af70fe6c7061f
2640587c7a32cfb8132079266213511fdcc6fc2d
blusno1/chromium-1
/chrome/install_static/google_chrome_install_modes.cc
C++
cc
6,816
permissive
// Copyright 2016 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. // Brand-specific constants and install modes for Google Chrome. #include <stdlib.h> #include "chrome/app/chrome_dll_resource.h" #include "chrome/common...
552a7ac52cd8c9e94e814816c71917593e5956c5
a1c8031692ab3ec59a14d47288009b8d81d05d92
jhlegarreta/ITKTextureFeatures
/test/CoocurrenceTextureFeaturesImageFilterTestSeparateFeatures.cxx
C++
cxx
4,230
permissive
/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.o...
66addb59e8538cc8e6d172beec10530adc2243e7
16cd4e676180eb603ae2be2739b0bdd0200fc468
Pc127/ToyEngine
/Engine/gameplay/Table.cpp
C++
cpp
569
no_license
#include "Table.h" Table::Table() { Initialize(); } Table::~Table() { } bool Table::Initialize() { // 注册 Register(); bool result; m_GraphicsComponent = new GraphicsComponentClass; m_GraphicsComponent->Initialize("../Engine/data/Table.txt", L"../Engine/data/Table.dds"); this->a...
dd4051a654f76b230d409232b5ea1deec0d51861
ee33ebcbcddf198189829166d044f3e3d59c62d3
amitzohar/greyscale_extractor
/ManuscriptTests/BinarizeTest/BinarizeTest/BinarizeTest.cpp
C++
cpp
933
no_license
// BinarizeTest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <opencv/cv.hpp> #include <DImage.h> #include <BinarizerNiblack.h> #include <BinarizerKabir.h> #include <StrokeWidthRandom.h> using namespace cv; int main(int argc, char* argv[]){ Mat mat; mat = imread("D:/D...
f306e4a431542dca12dd6bdd9b616d2703840394
f58eb66549bce776bc586e5f4570bbead48e64b8
Glebozavr/StudyCrypto
/Task2/Modules/AES.cpp
C++
cpp
2,220
no_license
#include <iostream> #include <string> #include <cstdlib> #include <unistd.h> #include <fstream> #include "AES.h" AES_Cryptor::AES_Cryptor(const string& Input, const string& Output, const string& Pass) { FileIn = Input; FileOut = Output; psw = Pass; } bool AES_Cryptor::AES_Encrypt () { SecByteBlock key(32); ...
1a9830787748496bbad96d3d0381fbaf782ef1e4
9bcd61445997fca7b495c8f358223bf0b8f9dd6e
saidbouig/PDPTW
/src/Vehicule.cpp
C++
cpp
815
no_license
//#include "stdafx.h" #include "Vehicule.h" int Vehicule::number_vehicules=1; int Vehicule::MAX_Capacity; Vehicule::Vehicule() { capacity = 0; numV = number_vehicules++; } Vehicule::~Vehicule() { //number_vehicules--; } int Vehicule::getNumV() { return numV; } int Vehicule::getNumber_vehicules() { return ...
ef4cb676c30cafe73ff192cd023fa75ff5c3738e
57b75f5d673e29dee648c0be6f8109839a9e2db3
totalkyos/AWS
/aws-cpp-sdk-cloudsearch/source/model/UpdateScalingParametersRequest.cpp
C++
cpp
1,371
permissive
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file...
1eab145fa1ae14481b3d3c618cbcdfb038cbd5e8
87a12f5a858564f2077ed9acc56139fee998125c
niuxu18/logTracker-old
/second/download/CMake/CMake-old-new/CMake-old-new-joern/Kitware_CMake_old_new_new_function_62.cpp
C++
cpp
5,823
no_license
static int parse_keyword(struct archive_read *a, struct mtree *mtree, struct archive_entry *entry, struct mtree_option *opt, int *parsed_kws) { char *val, *key; key = opt->value; if (*key == '\0') return (ARCHIVE_OK); if (strcmp(key, "nochange") == 0) { *parsed_kws |= MTREE_HAS_NOCHANGE; return (ARCHIV...
92040a36c60d409f2a27235fe4a18c2c962610e7
b1ee737f089eaa02de2e473a04cd8b324dca4705
radtek/earnsmart
/sewebmodels/CPwd.cpp
C++
cpp
2,436
no_license
/* * File: CPwd.cpp * Author: santony * * Created on August 12, 2015, 2:30 PM */ #include "CPwd.h" #include "../seadmin/seadminapi.h" using namespace se; using namespace se::admin; CPwd::CPwd() { } CPwd::CPwd(const CPwd& orig) { } CPwd::~CPwd() { } void CPwd::Check() { // verity email SP<IAdminA...
621f1e531db3f6a785f2be2cd808ef66d82f6d1b
4985e3c72feb42fc829fc8751e812509b7e5990f
ryankumar/vt_practice_docs
/c++_practice/STL/pair/copy_pair.cpp
C++
cpp
295
no_license
#include<iostream> using namespace std; int main() { pair<int,char> p1(10,'M'); pair<int,char> p2(p1); pair<int,char> p3=p1; cout<<"p1: "; cout<<p1.first<<" "<<p1.second<<endl; cout<<"p2: "; cout<<p2.first<<" "<<p2.second<<endl; cout<<"p3: "; cout<<p3.first<<" "<<p3.second<<endl; }
9a973e43ca046003575419b72a0d5b26142497b6
07711cb4816e3472d0eac06ad8c5dd7f080b0396
DaryaKhod/L8
/8/8/8.cpp
C++
cpp
2,762
no_license
#include <stdio.h> #include <conio.h> #include <Windows.h> #include <stdlib.h> #include <queue> #include <iostream> using namespace std; int BFS(int** A, int* M, int i, int N) { queue <int> Q; int j; Q.push(i); M[i] = 0; while (Q.empty() != true) { i = Q.front(); Q.pop(); for (j = 0; j < ...
84dd5bb4ad250c95f809f596a67f8e56ab384ffb
8d2d975b824e1670ad4a375ca7a300492ae54779
thngkaiyuan/chromium
/content/renderer/media/media_devices_event_dispatcher_unittest.cc
C++
cc
7,820
permissive
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/renderer/media/media_devices_event_dispatcher.h" #include <stddef.h> #include <memory> #include <string> #include "base/memory/ref_co...
c6f0d8d2711606633d0cc9fc8c2b21d12a98fa1d
076ff3b8920145511720191cb5e7251e9bb5aa2f
ucsb-seclab/autofacts
/llvmstuff/llvmpasses/FactsInserter/src/ModuleHelper.cpp
C++
cpp
26,259
permissive
// // Created by machiry on 12/8/18. // #include "ModuleHelper.h" #include "FactsSelector.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Instructions.h" #include "llvm/Analysis/CFG.h" #include <algorithm> #include <llvm/Analysis/LoopInfo.h> #define MAXRETRIES 20 #define MAXPATHRETRIES 8 unsigned long ModuleHel...
ecc2369b7ff797216d7d9b025b43acd869774e57
d2b1799632dda15b1b9c42de1c7723a0bd45d6d1
obitel-forks/bitcoin
/src/wallet/wallet.cpp
C++
cpp
121,250
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 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 "wallet/wallet.h" #include "base58.h" #include "checkpoints.h" #include...
aa0ea9a28b6a5461734d4019024eb739863f56dd
bb92013bb519b48b308d4a9e8773954b6dd41ada
raymon1/data-structures-and-algorithms
/3 graphs/week5_mst/1_connecting_points/connecting_points.cpp
C++
cpp
1,426
no_license
#include <algorithm> #include <iostream> #include <iomanip> #include <vector> #include <cmath> #include <queue> #include <functional> using std::pair; using std::priority_queue; using std::queue; using std::vector; typedef pair<double, int> pdi; double minimum_distance(vector<int> x, vector<int> y) { double result...
037893ca95fdbe9a00fea50f1b7504c149952398
3d7413a39fe3a9ca28cb64b02e2d24317619a41b
syncle/Open3D
/cpp/tests/test_utility/Rand.cpp
C++
cpp
11,766
permissive
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018-2021 www.open3d.org // // Perm...
e6f2b0f1cebd05842523d8cc0aa704da587ddd51
43745bd6964ccee003a970e171fefa1a54002bf4
thaakur/CipherSchools_Assignment
/Day 1 22 June/majorityElement.cpp
C++
cpp
459
no_license
class Solution { public: int majorityElement(vector<int>& nums) { int cnt=1; int n=nums.size(); int maj=nums[0]; for(int i=1;i<n;i++) { if(maj==nums[i]) { cnt++; } else { cnt--; ...
d068d25eeeb34894449233d473c46f535164bd9e
c805a1696ab95a5dfa80ce8a9f7f7dc6d57c548e
saideepch/Learnings
/CPP/explicit_implicit.cpp
C++
cpp
860
no_license
#include <iostream> using namespace std; //Not good practise!! //using String = std::string; //This works, so do this for cout endl etc. to avoid prefixing std:: class Entity { private: string m_Name; int m_Age; public: Entity(const string& name) : m_Name(name), m_Age(-1) {} e...
a6560ede00fb83b4db201b49321359acb860d1f5
806a0b1a47f4cb6b8fcfadd8a9ddd3f6aaf13152
a-sidorova/computer_graphics_course
/Lab1/Lab1/Includes/TopHatMorphology.cpp
C++
cpp
726
no_license
#include "TopHatMorphology.h" #include "OpeningMorphology.h" #include "Utils.h" QImage TopHatMorphology::calculateNewImagePixMap(const QImage& _photo, const Mask& _mask) { QImage result(_photo); OpeningMorphology* opening = new OpeningMorphology(); QImage openingPhoto = opening->calculateNewImagePixMap(_photo, _mas...
bb34474b166df133f61507d3f7e0c9cab1c2ba67
ce5c919872d06d9f388b3581dcaaa1c85c02f17f
Ynjxsjmh/PracticeMakesPerfect
/LeetCode/p0082/I/82-remove-duplicates-from-sorted-list-ii.cpp
C++
cpp
915
no_license
ListNode* deleteDuplicates(ListNode* head) { ListNode* dummy = new ListNode(0); dummy->next = head; ListNode* prev = dummy; ListNode* start = dummy->next; bool isDulicated = false; while (start != nullptr) { if (start->next == nullptr) { prev = prev->next; star...
653bf024948a52a2f7fb1daaa28e5b03292a5ac1
087385242c8ee9805d832587f3e02665008cb338
sbhawani/DLM
/CATS_CMake_Example2/main.cpp
C++
cpp
3,621
no_license
#include <iostream> #include "CATStools.h" #include "CATS.h" #include "DLM_Potentials.h" #include "DLM_Source.h" #include "TGraph.h" #include "TFile.h" using namespace std; void Cat1(){ const unsigned NumMomBins=100; const double kMin=0; const double kMax=400; //keep in mind the units are always MeV or ...
a2e30ec5e5fcf3e670795d6fd56fb79bffaeb296
846ac6aa08dfdc907d0f413939e8c099df77eef5
Hugomguima/FEUP
/1st_Year/2nd_Semestre/PROG/Visual Studio/Programação orientada por classes/Exercicio_1/Exercicio_1/main.cpp
C++
cpp
737
no_license
#include<iostream> #include<string> #include<vector> #include<cmath> #include"Class.h" using namespace std; int main() { Date d1(2020,2,29), d2(2020,2,15) ,d3; bool k = d2 < d1; cout << "d1 < d2 : " << k << endl; cout << "IsValid == " << d1.isValid() << endl; cout << "GetYear == " << d1.getYear() << endl; cout...
aed35e6fe040b6bef0cff33d5ab26ede3a9da4ad
30c18573e858dabbee435c7dc4e030782df0cbc2
ditachev/DSA-Homeworks
/6_BST/SixthHomework/Parent/Parent.cpp
C++
cpp
1,024
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; class Node { public: Node* parent; Node(Node* parent) { this->parent = parent; } }; bool isParent(Node* parent, Node* child); int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); ...
a78c787302066bcb3d679bfe635b4deff4b97474
595034e50746ee03e165d1fa814be1df6497e5ff
CadQuery/pywrap
/opencascade/Graphic3d_ClipPlane.hxx
C++
hxx
18,982
permissive
// Created on: 2013-07-12 // Created by: Anton POLETAEV // Copyright (c) 2013-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 GNU Lesser General Public License version 2.1 a...
cf9729103aaf85a0ede25241e7f63acdc9bc20fd
c4b4e106f9958169d5a0c8b4adc9099a5e4dd72d
KallerLong1/Tensorflow-windows-dll
/extra/tensorflow-r1.2/google/protobuf/util/internal/protostream_objectsource.cc
C++
cc
42,120
no_license
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: ...
8845e847100cd81d6b8da29439a3e5f7d41a95ac
1acd28b55e6c860cd72443d5c0f812dad26b53ec
RESQ-Chain/pyro
/src/rpcmisc.cpp
C++
cpp
39,008
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2017-2018 The PYRO Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/...
1b522f626983d2f8545649ad20420cba33030dda
c6233d9cac2ef3cdb5c48b1a91581f6e032c9025
sswygert/Local-Chromatin-Fiber-Folding-Represses-Transcription-and-Loop-Extrusion-in-Quiescent-Cells
/src/count_interactions_over.cpp
C++
cpp
1,830
no_license
/* count_interactions_over.cpp * Seungsoo Kim * January 15, 2018 * */ #include <vector> #include <sstream> #include <fstream> #include <iostream> #include <map> using namespace std; int main(int argc, char** argv) { int MINLEN = 500; int MAXLEN = 10000; // read and process chromosome sizes ifstream ...
9dc3460f00a23e7643386ce0730ae9116d8d65fb
ba3601df7959a76639adcc2fd63077dac235ac2f
pradeepkumawat93/TextualSTL
/DataStructureUtilities/main_st.cpp
C++
cpp
427
no_license
#include "Interface.h" using namespace std; int main() { cout << "-------------Stack--------" << endl; Stack<int> s(1); s.push(1); s.push(2); s.print(); cout << "Empty::" << s.empty() << ", size::" << s.size() << endl; cout << "hii" << endl; /*cout << "-------------OrdinaryQueue--------" << endl; { Ordinary...
b6944b2cf71b2039f0b63b5c4d3a8fe4c86efba6
b457296c17b26492bc1c73e280184b7edc099c8f
SREERAGI18/chromium
/weblayer/browser/safe_browsing/url_checker_delegate_impl.cc
C++
cc
4,805
permissive
// Copyright 2019 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 "weblayer/browser/safe_browsing/url_checker_delegate_impl.h" #include "base/bind.h" #include "components/no_state_prefetch/browser/no_state_pref...
393ed3df10a9f5aafce03e2e469bde5f662cc7af
7ab843115fc6ccb803cef1906a5b4f6d9fadd06d
dyplm123/GraduationProject
/SCAN/SCAN/TCPSYNDialog.cpp
C++
cpp
536
permissive
// TCPSYNDialog.cpp : 实现文件 // #include "stdafx.h" #include "SCAN.h" #include "TCPSYNDialog.h" #include "afxdialogex.h" // CTCPSYNDialog 对话框 IMPLEMENT_DYNAMIC(CTCPSYNDialog, CDialogEx) CTCPSYNDialog::CTCPSYNDialog(CWnd* pParent /*=NULL*/) : CDialogEx(CTCPSYNDialog::IDD, pParent) { } CTCPSYNDialog::~CTCPSYNDialog...
6a07cea549b5892922059f24ba6c2680b79e7c45
988d5f97069d41f9037a285c7640dadd696b909f
TrebbleAngel/Project10
/proj10.cpp
C++
cpp
5,310
no_license
/** * @brief CS-202 Project 10 proj10.cpp (Test Driver) * @author Angel Lazcano (angelglazcano15@gmail.com) * @date December 4, 2018 * * The purpose of this file is to provide the tests necessary to enure our * NodeStack & ArrayStack classes function properly. * The NodeStack & Array classes are to templated...
4a77e1b45720aa42699396d8ff4d8413472d66ea
ec060ff83dbb8a4420a972d0ae3746c94e33da69
vrcordoba/Klondike
/src/controllers/ManualGameController.hpp
C++
hpp
664
no_license
#ifndef CONTROLLERS_MANUALGAMECONTROLLER_HPP_ #define CONTROLLERS_MANUALGAMECONTROLLER_HPP_ #include "GameController.hpp" namespace Models { class Game; } namespace Controllers { class GameControllerVisitor; class Command; class ManualGameController final : public GameController { public: explicit ManualGameCon...
b5d0d5ee235eaf89a266f82bf8af3eca4903d286
b1c24c94c7a84b4ff23c702b824b677a64419f3c
tedouni/CPSC-121
/01/ProbFour/main.cpp
C++
cpp
1,208
no_license
// // main.cpp // WeekOneExFour // // Created by Tayseer Edouni on 1/18/14. // Copyright (c) 2014 Tayseer Edouni. All rights reserved. // #include <iostream> #include <iomanip> using namespace std; int main(void) { const double PRICE_PER_CUBIC_YD=22.00; double squareFeet; //square feet of land to be cove...
a1ed70b611b9866154f8948ac98bec9636d20076
a22873c4891a11df95d5edd737f09769d8ea0e49
jborza/cuddly-waffle
/TodoItemView.cpp
C++
cpp
2,099
permissive
#include "TodoItem.h" #include <string.h> typedef void Item; typedef struct TodoItemView { Item* container; Item* checkbox; Item* label; Item* editBox; Item* saveButton; int editing = 0; } TodoItemView; #define true 1 #define false 0 //TODO definitions! void add_child(Item* container, Item* child); Item* cr...
77c6aa2525053d7dae0efe1f5235cb3af59097f6
1659fef9d462c27833d6df7badf2d7f1a459782a
iridium-browser/iridium-browser
/buildtools/third_party/libc++/trunk/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
C++
cpp
2,368
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 // //===---------------------------...
7c4d9872c7b0eb12bbc6e4747e18e682752b790e
40653ae5713c32de71b4898b8c811c1633d6bed9
EricBotter/WebReplication
/TCP/ServerConnection.cpp
C++
cpp
1,442
no_license
#include <sys/socket.h> #include <netinet/in.h> #include <sys/errno.h> #include <iostream> #include <cstring> #ifdef __APPLE__ #include <unistd.h> #else #include <sys/unistd.h> #endif #include "ServerConnection.h" #include "../Utilities/Log.h" ServerConnection::ServerConnection(uint16_t port) { sockfd = socket(AF_INE...
523fd7ebc06a26bfdff6e5d559fd484c24df4deb
ec3b4e9d6856db63119c075b37aefb1c51a53f74
Ashwani-JIIT62/hacktoberfest1
/15.Select 3 numbers with maximum product.cpp
C++
cpp
652
no_license
#include<iostream> #include<algorithm> using namespace std; int findMaxProduct(int *a,int n){ int product =1; int countp =0 , countn=0; int i,Min = -10000; for(i=0;i<n;i++){ if(a[i]>0) countp++; else if(a[i]<0){ countn++; } } sort(a,a+n); /*Cases: All positive - Greedy 2 pos...
73cd5a76d515d996f52ed15f53d161d7567a78bf
f04830325fe4b9d3684877ce64fc241bf9c7b8dc
OlehKSS/DigitalBits
/src/overlay/test/TrackerTests.cpp
C++
cpp
3,287
no_license
// Copyright 2014 DigitalBits Development Foundation and contributors. Licensed // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 #include "crypto/ByteSlice.h" #include "crypto/SHA.h" #include "lib/catch.hpp" #include "ma...
4847c1ee3c625c41779e3dd7280a6d68db5f8a6a
ee3e541ef8cffa5e114371cdc3bc2b2921fe2931
ps-group/cg_course_examples
/chapter_2/libchapter2/src/FilesystemUtils.cpp
C++
cpp
3,586
permissive
#include "FilesystemUtils.h" #include "filesystem_alias.h" #include "libchapter2_private.h" #include <codecvt> #include <fstream> #ifdef _WIN32 #include <Windows.h> #include <sdkddkver.h> #endif namespace { const size_t FILE_RESERVE_SIZE = 4096; const size_t MAX_PATH_SIZE = 4096; // Возвращает путь к текущему исполня...
e45cda66e1b6f41b09cdf3dea777226f4388269d
75ee8ebd5473763d1659263423d6bd7134a16a40
Compelson/libaroma
/libs/minui/resources.cpp
C++
cpp
13,363
permissive
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
93a94f541d125a1d1d819eabcf4fdd42b9ca5fec
580d1f65bf7744cf3c0023de97cee02848c9278f
tyzljf/MicroService_Auth
/src/framework/common/StackTrace.cpp
C++
cpp
3,279
no_license
/***************************************************** StackTrace.cpp --- 进程异常退出时,捕获堆栈信息 Author: tanyouzhang Date: 2017/05/04 /****************************************************/ #include <signal.h> #include <execinfo.h> #include <stdlib.h> #include <sstream> #include <string.h> #include <unistd.h> #include <iost...
b4d0b901eb1cb525aa7ebe836d0d99cdd4af4239
a80892f012dc6f2df0a748970ffce94dc2932d67
jiangtao1234ji/ACM-code
/TSOJ/lanqiao9.cpp
C++
cpp
396
no_license
#include<iostream> #include<string> #include<algorithm> using namespace std; int main() { int n, m; int a[1100]; while(cin>>n) { int count=0; for(int i=1; i<=n; i++) { cin>>a[i]; } cin>>m; for(int i=1; i<=n; i++) { if(a[i]==m) { cout<<i<<endl; count++; br...
df5baf89890f8be9ecdfc574ab76c369fed5fc9f
3a1b16e6a49b2f7743c9eebe1aa78185f13e0adb
msxxxp/main
/LIB/basis/include/basis/simstd/~iterator/reverse_iterator.hpp
C++
hpp
3,941
no_license
#ifndef BASIS_ITERATOR_REVERSE_ITERATOR_HPP_ #define BASIS_ITERATOR_REVERSE_ITERATOR_HPP_ #include <basis/simstd/~iterator/base.hpp> #include <basis/simstd/utility> namespace simstd { template<typename Pointer> class reverse_iterator { typedef Pointer iterator_type; ...
0ebef343317456f020126226a2cceae9b6989eb0
28134fc21b45af5240747b5d3c419969ec58f56c
zhgzhg/LoRaPacketForwarder
/tools/TempMon/tempmon.cpp
C++
cpp
6,680
no_license
/** * A tiny temperature monitor program. In response to a certain numeric * (temperature) level the output GPIO pins can be set or cleared. */ #include <iostream> #include <ctime> #include <chrono> #include <thread> #include <csignal> #include <cmath> #include <fstream> #include <string> #include <vector> #includ...
23928fddfcdb3da9619a9a1df8ed288451243999
9b8a1c8f2c673a71f61615ccadcd154e9bebd98c
ecmwf/atlas
/atlas_io/src/atlas_io/detail/Encoder.cc
C++
cc
847
permissive
/* * (C) Copyright 2020 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an intergo...
b52c0520cad9ab4a7ff1f9fb52eb62896e40fde8
1317d5b046cd0bee2b4617c3a72eaf347dc502cf
Prause/irc-web-bot
/server/WebSocketConnection.cpp
C++
cpp
4,265
permissive
#include "WebSocketConnection.h" #include <iostream> #include <cstring> #include <openssl/sha.h> #include "base64.cpp" const std::string WebSocketConnection::wsKey_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; WebSocketConnection::WebSocketConnection( int connection_fd ) : TCPSocketConnection( connection_fd ) { ...
879b39b2e70d042d4d439d4eea3008b9cc2f5d04
fb007fa9c1044fdd0ca51c978bc640fba13d4afe
Amos-zq/PAT
/PAT/PATWavelet.cpp
C++
cpp
4,349
permissive
// // PATWavelet.cpp // PAT // // This code is distributed under the MIT Licence. // See notice at the end of this file. // #include "PATWavelet.h" void PATWavelet::set_up(int stretch, float scale, float orientation, int nPeaks) { // controls width of gaussian window (default: scale) float sigma = scale; ...