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
6605b62d31cf6448584ed19593929e176786d3a1
407eae25b45f5748150275b12530806904bf82e4
gehrigkeane/EECS560
/lab1/NodeL.cpp
C++
cpp
646
no_license
/* * @file : Node.cpp * @author : Gehrig Keane * @date : 2015.08.24 * Purpose : Node class implementation */ #include "Node.h" Node::Node() { m_value = 0; m_next = nullptr; }//Node Default Constructor Node::Node(int value, Node* next) { m_value = value; m_next = next; }//Node value constructor void Node::setVal...
f1f6d0ed514a87d09b0f4bfdde63c2a65ed8af73
727147ef742106b14fc0106a224f2e2a8de02234
barrett1733/NetworkTest
/packet.cpp
C++
cpp
1,528
no_license
#include "packet.h" #include <iostream> using namespace std; SerializedPacket Packet::serializePacket() { char data[PACKET_SIZE]; for (int i = 0; i < PACKET_SIZE; i++) data[i] = 0; serialize(data); return SerializedPacket(data); } void Packet::unserializePacket(SerializedPacket pck) { unserialize(pck.getData(...
1582501bc5285da6a8994ca3e7b500a01806ff53
f5de31be33267dc046b2d6db19e00aa01fd354be
ale3otik/mipt_2015_sem3_AaDS
/MaxFlow_EdmundsKarp/MaxFlow_EdmundsKarp/MaxFlow_EdmondsKarp.cpp
C++
cpp
4,234
no_license
// // MaxFlow_EdmundsKarp // // Created by Alex on 11.09.15. // #include "MaxFlow_EdmundsKarp.h" using std::vector; using std::queue; Graph::Graph(vector< vector <int> > & edge_info,int get_num_of_vertex): last_max_flow(-1), num_of_vertex(get_num_of_vertex) { edges.resize(edge_info.size()); graph.resize(get...
f365a4ca03cc122c943276b17025bfe63a2010ac
27400f657f065d3ac114fc15a1b21bdc9efa25d9
qomoteam/qtool-kakscalc
/src/base.cpp
C++
cpp
18,149
no_license
/************************************************************ * Copyright (C) 2005, BGI of Chinese Academy of Sciences * All rights reserved. * Filename: base.cpp * Abstract: Definition of base class for KaKs methods. * Version: 1.0 * Author: Zhang Zhang (zhanghzhang@genomics.org.cn) * Date: Feb.2, 2005 ***********...
81e88e8bdc45cb17941cad5bfd29248aec036ff6
23e43a4dca4e2d397e86fe81b4d2402b8cec9e19
rofi93/Codechef
/Sum Queries.cpp
C++
cpp
614
no_license
#include<cstdio> #include<cmath> using namespace std; int main() { long int n,m,q,i,ans; while(scanf("%ld %ld",&n,&m)!=EOF) { for(i=0;i<m;i++) { scanf("%ld",&q); ans=0; if(q<=n+1) { ans=0; printf("%ld\n",ans); ...
424f97469d1fcb5fa670b4cfb3d8fb4218dcda52
32baefbaedb1a9f6d51a1cd9731a5ec0fc153b89
github188/EC700IR
/BasicModule/src/public/SWYUVOverlayFilter/SWJPEGOverlayFilter.cpp
C++
cpp
19,141
no_license
#include "SWFC.h" #include "SWPosImage.h" #include "SWJPEGOverlayFilter.h" CSWJPEGOverlayFilter::CSWJPEGOverlayFilter() : CSWMessage(MSG_OVERLAY_JPEG_BEGIN, MSG_OVERLAY_JPEG_END) , m_fMJPEGDoStrOverlay(FALSE) , m_fDebug(FALSE) { GetIn(0)->AddObject(CLASSID(CSWPosImage)); GetOut(0)->AddObject(CLASSID(...
39cecb8832f14ecf2151cfc77f6b67a84878a6ef
9157825db5725693906857fdc62fe3264ee92267
discos/discos
/Medicina/Servers/MedicinaKBandDualFReceiver/src/MedicinaKBandDualFCore.cpp
C++
cpp
11,254
no_license
#include "MedicinaKBandDualFCore.h" #include <MedicinaVertex.h> #define NUMBER_OF_STAGES 1 // Amplification stages MedicinaKBandDualFCore::MedicinaKBandDualFCore() { voltage2mbar=voltage2mbarF; voltage2Kelvin=voltage2KelvinF; voltage2Celsius=voltage2CelsiusF; currentConverter=currentConverterF; vo...
e561786c587f6ca5f39bf8bc2fb92392189d7b67
eaa762be720d4a1e29e886be381b7a8aaf6ee89a
lutzb91/stm32-homie
/src/util/Simpletimer.cpp
C++
cpp
483
permissive
#include "Simpletimer.h" SimpleTimer::SimpleTimer() { this->start = millis(); this->repeat = true; } bool SimpleTimer::expired() { if((millis() - start) >= interval) { if(repeat) { start = millis(); } return true; } return false; } void SimpleTimer::setRepeat(b...
91f4fc5ea3743f1679b9b63f6e297b6e63388bff
b6c91339afd77c1bb5506582823c921861fe3069
Aspirar/uva
/10920.cpp
C++
cpp
1,049
no_license
#include <iostream> #include <cmath> using namespace std; int main() { while (true) { long long size, p; cin >> size >> p; if (size == 0 && p == 0) break; long long centre = size / 2 + 1; long long complete = sqrt(p); if (complete % 2 == 0) complete--; long...
c542a7ff5ae8def3778daef3f2035c04f504d74f
57d64671013461839bc2303ff47c459e65cf330f
minghuam/macchina.io
/platform/OSP/Web/src/WebServerRequestHandler.cpp
C++
cpp
898
permissive
// // WebServerRequestHandler.cpp // // $Id: //poco/1.6/OSP/Web/src/WebServerRequestHandler.cpp#1 $ // // Library: OSP/Web // Package: Web // Module: WebServerRequestHandler // // Copyright (c) 2007-2014, Applied Informatics Software Engineering GmbH. // All rights reserved. // // SPDX-License-Identifier: Apache-2.0 /...
f52c3d5e896f84f4b8a5649104acdd37dad673fb
721f8e554dc3c596a374856311b6559ea7ea4f1d
RajatSran/dsapractice
/two pointer/icpc.cpp
C++
cpp
1,617
no_license
#include <bits/stdc++.h> #include <iostream> using namespace std; #define vi vector<int> #define pii pair<int,int> #define vii vector<pair<int,int>> #define ll long long #define pb push_back int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif in...
99c3daf0113a5f33f38fe1265e8e83104961c5e4
09ea6d5b6bb01a16d703730af3dd401904d9e4a0
opendarkeden/client
/Client/Packet/Gpackets/GCDeleteEffectFromTile.cpp
C++
cpp
3,153
no_license
////////////////////////////////////////////////////////////////////// // // Filename : GCDeleteEffectFromTile.cpp // Written By : crazydog // Description : // // ////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////...
bc89cd789f39a8bd3db842d32efbd803f03ed190
acac9a42df15a98c4a9612f13397aa0f9f746cd6
dhruvarya/simple-ra
/src/syntacticParser.cpp
C++
cpp
4,714
permissive
#include "global.h" bool syntacticParse() { logger.log("syntacticParse"); string possibleQueryType = tokenizedQuery[0]; if (tokenizedQuery.size() < 2) { cout << "SYNTAX ERROR" << endl; return false; } if (possibleQueryType == "CLEAR") return syntacticParseCLEAR(); ...
004d6e632ac77fdeeda4bbf44788fc3f9e0b1bbf
e6756db58770abf3b477b3babbe4ee48ffbc3f37
vfx-fuhao/WickedEngine
/Editor/main.cpp
C++
cpp
7,457
permissive
#include "stdafx.h" #include "main.h" #include "Editor.h" #include <fstream> using namespace std; #define MAX_LOADSTRING 100 extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; } // Global Variables: HINSTANCE hInst; // current instance WCHAR szTitle[MAX_LOADST...
414cce14f8994d4abdc58c9b6d818698b03609ba
421eed6340ee681f36529d696b0125cc4445d9b2
SLMRukais99/chromium
/components/browser_ui/client_certificate/android/ssl_client_certificate_request.cc
C++
cc
14,519
permissive
// Copyright (c) 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 "components/browser_ui/client_certificate/android/ssl_client_certificate_request.h" #include <stddef.h> #include <utility> #include "base/a...
965a1789850d55056c0493d6e78db47b182aed62
f1c1c86293c8dd2098c2e66671b83b46029b7b61
RipleyTom/llvm-mirror
/unittests/IR/ConstantsTest.cpp
C++
cpp
26,094
permissive
//===- llvm/unittest/IR/ConstantsTest.cpp - Constants unit tests ----------===// // // 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 // //===---------------------------...
49c37abb5645ef7d1e9a0a5bafd546b83e0d4df2
5a12a78eb26f19670002999eac412a022a468ca7
RandGor/mpiaalabs
/mpiaa3lab/main.cpp
C++
cpp
579
no_license
#include "huffman.h" #include <conio.h> #include <iostream> #include <fstream> std::ifstream f; void main() { const auto *tree = buildTree(); std::string input = {}; build_dict(input); try { auto encoded = encode(tree, input); } catch (const std::exception &e) { std::cerr << "Error: " << e.what() << std::e...
cb7f8683e739e080e2e841c403b23ac1d8edc61e
aed9b3d47a1ac26f7a10d5c7f9e5f762d12fb283
darksome/libpw
/src/pw/pw_string.cpp
C++
cpp
15,061
permissive
/* * The MIT License (MIT) * Copyright (c) 2015 SK PLANET. All Rights Reserved. * * 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 r...
080231b22eb43069d1202eba1c88f6b15f5891e4
2d3654cd62fb334a1003e01a62285e0864c1462d
petite-etoile/Codeforces
/630B.cpp
C++
cpp
3,473
no_license
/*    ∫ ∫ ∫    ノヽ   (_  )  (_    ) (______ )  ヽ(´・ω・)ノ     |  /    UU */ #pragma region macro #include <bits/stdc++.h> typedef long long int64; using namespace std; using P = pair<int64, int64>; typedef vector<int> vi; const int MOD = (int)1e9 + 7; const int64 INF = 1LL << 62; const int inf = 1<<30; template<class T>bo...
9a1f613f8cebdde80f173039eabad53c8440a0ba
284544abbfe777a3d2c8ba0b6cb07c0c9bfa45c4
zhihaoy/HiGHS
/src/simplex/HAPI.cpp
C++
cpp
5,262
permissive
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the HiGHS linear optimization suite */ /* */ /* Written an...
57ed49fb20273b33e0ebff5672b23cea13366259
0b9a34cff76551dabd5ce6eaffe85f54f1ab3dff
Rithvik-14/Cplusplus
/strings/removevowels.cpp
C++
cpp
1,095
no_license
/*#include<iostream> using namespace std; int main() { string str ; int i; cout<<"STRING is : "<<endl; getline(cin,str); for(int i=0;i<str.length();i++){ if(str[i] == 'I' || str[i] == 'i' || str[i] == 'U' || str[i] == 'u' || str[i] == 'O' || str[i] == 'o' || str[i] == 'A' || str[i] == 'a' |...
130a0d6513bc0982735b79b9b1be589099170fc8
7ff9ff0cbfd920e1bdc3bac45df12ed7b4af95ba
manhdoi123/homeTestTiki
/source/main.cpp
C++
cpp
4,440
no_license
#include <bits/stdc++.h> using namespace std; int numCells = 0; string line, cellname, expression; // set of cells set<string> setCell; // cells and their expression in input file map<string, string> cells; // cells and value after calculate map<string, double> cellValues; // topo structure map<string, list<string>> ...
116e47c08d33d526462590758f7e5ebf71105c07
71e1595324f6b7140966c82e1e7c0a05976391c9
mrhsce/Golestan-system
/main.cpp
C++
cpp
251
no_license
#include "loginwindow.h" #include "resultexam.h" #include "barnamehaftegi.h" #include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); LoginWindow e; e.show(); return a.exec(); }
459c83e65fccde84ab51ce9ea0a946a8d542ad2c
bf764356d17c8a5d1be2efab10fccf5879640498
farhan-syed/bus-reservation
/Bus Reservation/install/install.cpp
C++
cpp
1,066
no_license
// // install.cpp // Bus Reservation // // Created by Farhan Syed on 5/31/20. // Copyright © 2020 Farhan Syed. All rights reserved. // #include "install.hpp" #include <fstream> void install(){ // Create a text file string busNumber, driverName, departureTime, arrivalTime, destinationFrom, destinationTo; ...
dfaad0746c40db1dfaac9553f23af5fd09b9a714
dddb25edae37cc785f70cfd57b5e15670390a707
luxe/unilang
/source/code/programs/examples/backward_cpp/segfault/main.cpp
C++
cpp
667
permissive
/** * A minimalist example to use library backward-cpp to pretty print * error / stack trace... * * for as standalone build: * g++ -DBACKWARD_HAS_DW=1 -g -I../../external/backward-cpp test_segfault.cpp ../../external/backward-cpp/backward.cpp -ldw * * * backward-cpp is available from https://github.com/bombela...
72c52e146c013c3acd46e8eb304fe114a47a8abc
9557b5990939a5d75e3b708add8cbb2f65068006
GRADO-ULL/AEDA-Practica3-Polimorfismo-Excepciones-1516
/main.cpp
C++
cpp
3,313
no_license
#include "pila.h" #include "numero.h" #include "entero.h" #include "real.h" #include "racional.h" #include "complejo.h" #include <iostream> #include <cstdlib> using namespace std; int main () { cout << "MENU" << endl; cout << "Ejecutando pruebas. Presione enter para ejecutar cada prueba." << endl; cout << "1....
580805e96a250c6edbfbe5ebe4b265437584d755
f3a58fcc506a2b6b1610fb8c382cbec5ed9b4201
ZUFEcsc/Course-code-of-data-structure
/c-code/11(2).cpp
C++
cpp
3,993
no_license
#include <iostream> #include <cstdio> #include <vector> #include <queue> using namespace std; #define maxn 110 //最大顶点个数 int n, m; //顶点数,边数 struct arcnode //边结点 { int vertex; //与表头结点相邻的顶点编号 int weight; //连接两顶点的边的权值 arcnode * next; //指向下一相邻接点 arcnode() {} arcnode(int...
72e5718787572a69e8cdaa76838be347ca1c061c
ca48d7e33624a9fb4baba4a4df8380b99f1a0d21
Scylardor/Monocle2
/source/Core/Log/Private/Policies/Linux/Linux_IdeWritePolicy.cpp
C++
cpp
283
permissive
#include "Core/Log/Policies/IdeWritePolicy.h" #include <iostream> namespace moe { IdeWritePolicy::IdeWritePolicy() : m_redirection(std::cerr) { } void IdeWritePolicy::Write(const std::string& message) { m_redirection.Write(message); } }
d30853f9123e7ed4e9433348063b6110d4a60187
f6fffaa2c43574881e0f32563391f2c36bbe673e
gbrlas/AVSP
/CodeJamCrawler/dataset/14_18982_55.cpp
C++
cpp
694
no_license
#include<stdio.h> #include<stdlib.h> int main() { int T,flag,i,j,k; double C,F,X,time1,time2,tmp,coin,tem,temp,time; FILE *f=fopen("B-large.txt","r"); FILE *fp=fopen("output2.txt","w"); fscanf(f,"%d",&T); for(i=0;i<T;i++) { flag=0; coin=2; time2=0; fscanf(f,"%lf%lf%lf",&C,&F,&X); time1=X/coin; tm...
7e168827ef21f76ef2ecf149d9cac6ee16636d40
1d313b66558bc6bd15c86907b273bf4ff947278f
Dordovel/Other_Project
/src/layout_dispatcher.cpp
C++
cpp
2,040
no_license
#include "../headers/layout_dispatcher.hpp" bool LayoutDispatcher::add_layout(const std::string& id, const std::shared_ptr<DRAWABLE>& object) { std::map<std::string, std::shared_ptr<DRAWABLE>> data{}; auto insert_result = this->_layout.emplace(id, std::make_pair(object, data)); return insert_result.secon...
f8082f19f73b84ef19b2bd4bfbe2c38f5f4ffa92
abcf37dd57df9af516feab3e14e5a1050ccf8326
Naios/MythCore
/dep/acelite/ace/FIFO_Recv.cpp
C++
cpp
2,408
no_license
// $Id: FIFO_Recv.cpp 91286 2010-08-05 09:04:31Z johnnyw $ #include "ace/FIFO_Recv.h" #include "ace/Log_Msg.h" #include "ace/OS_NS_fcntl.h" #if !defined (__ACE_INLINE__) #include "ace/FIFO_Recv.inl" #endif /* __ACE_INLINE__ */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv) void ACE_FIFO_Re...
8a9fd04d2db1e0f62ca02a0c21a386dc75782988
ef2fa4ba9187c83ebc5917cad46d92717c5da8f8
anonyhostvn/Sky-War
/modules/DataPattern/DataPattern.cpp
C++
cpp
483
no_license
#include "DataConstance.h" #include "DataStructure.h" // template <typename _T> // struct CoordVector { // PolarVector<_T> ConvertToPolar () { // PolarVector<_T> Res ; // Res.SetR (Other.GetCoordX() * Other.GetCoordX() + Other.GetCoordY() * Other.GetCoordY()) ; // _T Phi = acos((float) Ot...
33c3957b211ba9b47ca38878bfd0cd3b9e0b65df
a799023d77a22941708a007b3a836d59302d67e3
steven-geo/efergy_v2
/efergy.cpp
C++
cpp
15,648
no_license
//Based on code from: //http://rtlsdr-dongle.blogspot.com.au/2013/11/finally-complete-working-prototype-of.html //http://electrohome.pbworks.com/w/page/34379858/Efergy%20Elite%20Wireless%20Meter%20Hack //DATA Out from Receiver in pin D3 (remember 3.3v!!) #include "Arduino.h" #include <limits.h> //Required for our ...
ac4852d92a610f5ca4c48b8dbebeba72e8135af9
142794d236a790058e83c052e0862beb34a00c05
s00144602/AILabWeek1
/Lab1_2_3/AIGameLab1/SeekerObject.cpp
C++
cpp
726
no_license
#include "stdafx.h" #define _USE_MATH_DEFINES #include "SeekerObject.h" #include "MathsUtil.h" #include "GameConstants.h" SeekerObject::SeekerObject(std::string txFileName): GameObject(txFileName) { //randomly set the position of the ship within the Viewport int offsetForXY = 50; int randomX = rand() % GameConstan...
9c5393c454fcdde9d755149e4adb0cb569c62604
85a56751117addbd87d8a109305f6ecfffc169a7
yulong88888/Esp8266WifiModule
/src/Cron.cpp
C++
cpp
3,362
no_license
#include "Cron.h" #include <TimeLib.h> Cron::~Cron() {} boolean Cron::matchCron(String cronString) { boolean secMatch, minMatch, hourMatch, dayMatch, weekMatch, monMatch, yearMatch; cronString.trim(); char *cronStrs[7] = {0}; int num = 0; split((char *)cronString.c_str(), ".", cronStrs, &num); /...
17766e8156399777adb1cd64aa6703db780bda73
1c0c04649a652dec85f4f3a4735cca31fcda15d2
belveder79/RakNet
/Source/RakThread.cpp
C++
cpp
2,491
permissive
/* * Copyright (c) 2014, Oculus VR, Inc. * 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. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ ...
c1b8b19444e67dd57fa24541498e2d4d6af5c5a0
424ad78ab397d8d5f9f933fc6662072c2ff95f1c
adhintz/openpilot
/selfdrive/camerad/cameras/camera_common.cc
C++
cc
14,567
permissive
#include "selfdrive/camerad/cameras/camera_common.h" #include <unistd.h> #include <cassert> #include <cstdio> #include <chrono> #include <thread> #include "libyuv.h" #include <jpeglib.h> #include "selfdrive/camerad/imgproc/utils.h" #include "selfdrive/common/clutil.h" #include "selfdrive/common/modeldata.h" #includ...
1bcb3debf251eba800916a0a6dd63c29d2e77cc5
615c2c20d282a0f61d3f80aa29d8349dc16ad962
DLTensor/caffe_extractface
/src/caffe/layers/euclidean_loss_layer.cpp
C++
cpp
2,294
permissive
#include <vector> #include "caffe/layer.hpp" #include "caffe/util/io.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/vision_layers.hpp" //#include <iostream> namespace caffe { template <typename Dtype> void EuclideanLossLayer<Dtype>::Reshape( const vector<Blob<Dtype>*>& bottom, vector<Blob<Dtype>*>*...
00e4a93da7756bb62a54d6760739c3f1bdae6e82
5db2e1a1873394707914ca3dc3637d33a62412b5
marromlam/lhcb-software
/Rec/Muon/MuonTrackRec/src/component/MuonCombRec.cpp
C++
cpp
34,372
no_license
// Include files // from Gaudi #include "GaudiKernel/IIncidentSvc.h" #include "GaudiAlg/ISequencerTimerTool.h" // from LHCbKernel #include "Kernel/LHCbID.h" // from TrackEvent #include "Event/Track.h" #include "Event/StateVector.h" #include "Event/State.h" #include "MuonInterfaces/MuonLogHit.h" #include "MuonInterf...
e4668b9de17cc73a715bbd93ce7844bb8a8cd387
7ddf3a54c58a176a3d3cfc6db286e21efbabecdb
pixelpicosean/lp-oxygine-deprecated
/oxygine/src/res/ResStarlingAtlas.cpp
C++
cpp
5,518
permissive
#include "ResStarlingAtlas.h" #include "CreateResourceContext.h" #include "core/file.h" #include "ResAnim.h" #include "Resources.h" #include "core/VideoDriver.h" #include "core/NativeTexture.h" #include "MemoryTexture.h" #include "CreateResourceContext.h" #include "utils/stringUtils.h" namespace oxygine { ...
3eb76084f8e641cd82fa5bc0280ce774007809a4
531d8a6479736d647adfa5d66812fe0f27f5dd93
zte-lhg/webkit
/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_view.cpp
C++
cpp
55,481
no_license
/* Copyright (C) 2012 Samsung Electronics Copyright (C) 2012 Intel Corporation. All rights 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 ...
ee949597e8554f01783e1941514c6d70d14ee569
cc090833f1ed4a06d12ad0d2a8d138affe0649c6
maxulan/ClickHouse
/dbms/src/Storages/MergeTree/MergeTreeThreadSelectBlockInputProcessor.cpp
C++
cpp
4,823
permissive
#include <Storages/MergeTree/MergeTreeReader.h> #include <Storages/MergeTree/MergeTreeReadPool.h> #include <Storages/MergeTree/MergeTreeThreadSelectBlockInputProcessor.h> namespace DB { MergeTreeThreadSelectBlockInputProcessor::MergeTreeThreadSelectBlockInputProcessor( const size_t thread_, const MergeTreeR...
b33ae95f7f2eef354dcd9616c6038f2cdefb8bed
c495bccef6d467b63d532cc0d3335f0b3a0ed563
lmous/WoSeCon
/wordsearchpuzzle/Words.cpp
C++
cpp
1,295
permissive
/* * File: Words.cpp * Author: Lefteris Moussiades <lmous@teiemt.gr> * * Created on January 20, 2020, 12:23 PM */ #include "Words.h" #include "WordInfo.h" #include <iostream> #include <fstream> #include "Settings.h" using namespace std; //loads words from file with fileName Words::Words() { noOfWords = c...
8b7ee49a2b859fdeffc146dddaf7f1a0821ba655
a46869b00db0f4cddef7377228328283c9791797
ThyPandaKing/Final-450
/String/05-check if a is shuffled sub string of b.cpp
C++
cpp
1,004
no_license
#include <bits/stdc++.h> using namespace std; class Solution { public: static bool checkEqual(int a[], int b[]) { for (int i = 0; i < 26; i++) { if (a[i] != b[i]) return false; } return true; } static bool checkShuffledSub(string a, string b) { if (a.size() ...
ed5175afd72d4b82290c787583653dab671a708a
7fa0e243ad862a458900394d866bf0a511b24414
Robien/acharn
/ackTache/src/TacheTalkPnj.cpp
C++
cpp
2,027
no_license
/* * TacheTalkPnj.cpp * * Created on: 2 nov. 2010 * Author: cephise */ #include "../include/TacheTalkPnj.h" #include "../include/PersoManager.h" #include "hasard.h" //type 1= quete, 2=vendeur TacheTalkPnj::TacheTalkPnj(float newx, float newy, float newz, int type, std::string infoJoueur): Tache(0) { _typ...
af5efc0bd2800327d27f85fe913fbdba3e0064b7
253918d44f6bb2a4327fdc7a41fb2c986f261a9b
martinlacza/rotdist
/khash.hh
C++
hh
22,925
permissive
/* The MIT License Copyright (c) 2008, by Attractive Chaos <attractivechaos@aol.co.uk> 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 limita...
3ce60cf4ffcb98a5ab844a218441550bf0faf1b2
32155d18a51db38977d0ee35bb8d920d87bcdec7
Tymec/JimBoy
/JimBoy/Interrupts.cpp
C++
cpp
1,637
permissive
#include "Interrupts.h" #include "MemoryController.h" Interrupts::Interrupts(MemoryController* memoryController) { this->memoryController = memoryController; } Interrupts::~Interrupts() { } void Interrupts::setInterrupt(InterruptTypes i, bool v) { uint8_t reg = memoryController->cpuRead(0xFF0F); uint8_t val = v ?...
f0aa760667526718d4dfe4c9871f53b366053338
3fbbfed35413a7507a2cded0f7f3bc72b39e9621
enotio/Tempest
/Tempest/ui/controls/scrollbar.cpp
C++
cpp
8,589
permissive
#include "scrollbar.h" #include <Tempest/Layout> #include <Tempest/Application> using namespace Tempest; ScrollBar::ScrollBar(Tempest::Orientation ori) { mvalue = 0; msmallStep = 10; mlargeStep = 20; setRange(0, 100); orient = Tempest::Orientation(-1); setupUi(ori); onResize.bind( *this, &ScrollBa...
1e8aae3c21a3223a50b9a7799bc9d9bca206d8c6
842ea9c32290f14487b03e95057368b2c16ba8b7
CIBC-Internal/itk
/Modules/Filtering/ImageGrid/include/itkChangeInformationImageFilter.hxx
C++
hxx
7,444
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
01c9e2d93032e76350b7207ca6e126c21de15412
10de51df7925c111c9d0ce7f8b524f1dc1ee3c9a
ECS-251-W2020/chromium
/third_party/blink/renderer/platform/text/writing_mode_utils_test.cc
C++
cc
11,607
permissive
// Copyright 2017 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 "third_party/blink/renderer/platform/text/writing_mode_utils.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/rende...
979cec9d4e7e7d950afb9d593c321675d16c699e
43b5e2f05a73d1ec885d6b1c964eeb295e8bdaaf
tnie/Algorithms
/sort/BubbleSort/Bubble.cpp
C++
cpp
1,497
no_license
#include "Bubble.h" #include <iostream> #include "Common.h" #include <assert.h> using std::cout; using std::endl; // 第二个参数放大的 int Swap(int& left, int& right) { if(left > right) { int tmp = left; left = right; right = tmp; } } /*要求排序结果是从小到大*/ // 先把小的移到左边 int Bubble_Sort(int* src, const int count,...
affac2f1c1f369cb7d9fe6c27e95c3bd17012806
1dc13072e1d4788103c3fbd7d9d5a31f0506502f
AnastasiyaNovikovaa/Kursach_4
/NastyaKursach/List.cpp
C++
cpp
5,346
no_license
#pragma once #include "List.h" #include <stdexcept> #include <iostream> template <typename T> void List<T>::reset_list() { head = nullptr; tail = nullptr; size = 0; } template <typename T> List<T>::List() { reset_list(); } template <typename T> List<T>::~List() { //clear(); } template <typename T> typename T...
31d9fba307685e99f4aac14bd9e52f58f4c10f7a
8881524645d3f4f45b50388905c2b61c304ff1d2
liyonghelpme/iosApplication
/Classes/HelloWorldScene.cpp
C++
cpp
9,959
no_license
#include "HelloWorldScene.h" #include "AppMacros.h" #include "RedisInterface.h" #include "cocos-ext.h" #include "HttpModel.h" USING_NS_CC; using namespace ui; using namespace extension; CCScene* HelloWorld::scene() { // 'scene' is an autorelease object CCScene *scene = CCScene::create(); // 'layer'...
ddb2bd918b9bd065f24c76fa60f3bf4e93423805
5dca5676e58f5767ccd17bcb7a6048e094e8ed72
jventura1738/COSC320
/SpellCheck/timer.cpp
C++
cpp
607
no_license
// Justin Ventura COSC220 // Used for Lab-3 in COSC320 #include "timer.h" #include <iomanip> Timer::Timer() { start_time = 0; end_time = 0; } void Timer::start_timer() { start_time = clock(); } void Timer::end_timer() { end_time = clock(); } double Timer::get_time() { return 1000*(double(end_time -...
3c371205816bcba67b6735f40fbf05cc4a5810e1
5d904f373bae8651ec9eb3705c28cb7da9ccd1c4
mactkg/ofxThreadedGifLoader
/src/ofxThreadedGifLoader.cpp
C++
cpp
6,318
permissive
// ofxThreadedGifLoader.cpp // ofxThreadedGifLoader // // almost code from jesusgollonet/ofxGifDecoder // MIT // #include "ofxThreadedGifLoader.h" #include <sstream> ofEvent<ofxGifLoadedEvent> ofxGifLoadedEvent::events; ofxThreadedGifLoader::ofxThreadedGifLoader() :ofThread() { nextID = 0; ofAddListener(ofE...
8b1ccd6afcf768a37562992ef6b5a3abb292ec5e
6d2125b8ff301fbca01e4cbbcd804efa566b03cc
CherryYang05/gkccash_core
/src/rpcprotocol.cpp
C++
cpp
11,409
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-licens...
4818d73b63de3d6a893e65cba412bf5255d35f56
465580d2c684b9407d30872ecca174e04e392e83
kobe24o/LeetCode
/程序员面试金典/17.23.max-black-square-lcci.cpp
C++
cpp
1,823
no_license
class Solution { public: vector<int> findSquare(vector<vector<int>>& mat) { if(mat.size()==0 || mat[0].size() == 0) return {}; int m = mat.size(), n = mat[0].size(), i, j, k; vector<vector<int>> sumof0Up(m, vector<int>(n,0));//向上连续0个数 vector<vector<int>> sumof0Left(m, vector<int>(n,0));//向...
ce387222d075f03e7016375f1532ebabee93ec57
e3d3e5f8d806517b59135dd2dca8f8a7118e03c1
pettair/BoostConnect
/sample/sample.cpp
C++
cpp
1,388
no_license
#include <twit-library/protocol.hpp> #include <map> #include <boost/thread.hpp> #include <boost/property_tree/ptree.hpp> int main() { //ただの準備です boost::asio::io_service io_service; boost::asio::ssl::context ctx(io_service,boost::asio::ssl::context_base::sslv3_client); //SSL用 boost::system::error_code ec; const std...
b4cd469461437487409fbfe48760ef08979862b8
880329911874df213142f584d40d13ae87d64e42
nifei/samples
/ListView/dataModel/dllmain.cpp
C++
cpp
984
no_license
#include "MainFrm.h" #include "PostMessageToUIThread.h" static unsigned int s_uiThreadRef = 0; static CMainFrame* s_pWndMain = 0; CMainFrame* MyMain() { CMainFrame* pWndMain = new CMainFrame(); if(pWndMain->CreateEx() == NULL) { ATLTRACE(_T("Main window creation failed!\n")); return 0; } pWndMa...
ff78cfd632cf3eb396381b30f892ed4551650736
d4c2ed141279be58cdd85850a06adfc5fc287278
dumpinfo/DNNCudatest
/02/NEURAL/MESSAGES.CPP
C++
cpp
2,623
no_license
/******************************************************************************/ /* */ /* MESSAGES - All routines for issuing messages to user */ /* ...
d6c9bbd56ce45a0633cd070580f121fdc28d7b7c
945fd0b1deb7389ae67ec02ebe0392334f74039c
Botbusters4635/2018RobotCode
/src/Utilities/EctoCSV.cpp
C++
cpp
16,606
no_license
// // Created by abiel on 4/2/18. // #include "EctoCSV.h" EctoCSV::EctoCSV(string fileName, FileMode fileMode, bool overwrite) { this->fileName = fileName; this->currentFileMode = fileMode; //Reads FileHeader from file if (fileMode == FileMode::Read) { //Checks if file exists if (!checkIfFileExists(fileName)...
c440c7071a0d54a8308f5e4a85fce69e47e296f3
f5cc87985e00d6af424c1f4bf4c1f2b3ea3de5ac
Hannna/robocupsslclient
/ robocupsslclient/Tactics/DribbleToShoot.cpp
C++
cpp
2,376
no_license
/* * DribbleToShoot.cpp * * Created on: Jan 29, 2012 * Author: maciek */ #include "../EvaluationModule/EvaluationModule.h" #include "../Task/Task.h" #include "../Task/GoToPose.h" #include "../Task/KickBall.h" #include "../Task/GoToBall.h" #include "../Task/MoveBall.h" #include "DribbleToShoot.h" DribbleTo...
2737d84ded65272a5dffa3d92622dedd1b9932b9
ab9521dc0bb71d5c76d3f00036f8b02fbea0be5d
GAUTHAMPANDALA/Problem-Solving
/Bit Manuplation/Finding Misssing using sum and xor.cpp
C++
cpp
1,543
no_license
// Here the numbers will be n-1 integers and these integers are in the range of 1 to n and only one missing number. Find that number in o(n) #include<stdio.h> #include<math.h> // Finding missing element by sum method. O(N) and O(1) can have overflow condition void findMissingSum(int a[],int n) { int tota...
68d04f380755358120c10abde5329389b5871c89
84f26ce260786a538e56f9b6d2da200ecde81a6c
sdurmuss/Hyper-Casual-Game
/Library/Il2cppBuildCache/WebGL/il2cppOutput/UnityEngine.AnimationModule_Attr.cpp
C++
cpp
168,499
no_license
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> // System.Char[] struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34; // System.AttributeUsageAttribute struct AttributeUsageAttribute_tBB0BAAA82036E6FCDD80A688BBD039F6FFD8...
64b62f4add268798013d30c73eda49308f338877
1af43726e7c1221d7958533636b7c22de8592f22
IamLupo/mypicross
/include/GridInfo.cpp
C++
cpp
797
no_license
#include "GridInfo.h" /* --- IS --- */ bool isGridInfo_Same(GridInfo* gi_a, GridInfo* gi_b) { unsigned int i, length; length = (*gi_a).length; if((*gi_b).length != length) return false; for(i = 0; i < length; i++) { if((*gi_a).number[i] != (*gi_b).number[i]) return false; } return true; } /* Check...
f879435833324c66ab1ffff627a7c5ce5bd4d751
9f40b1a9acc882657ab9c5898af3d85921a5aadf
CryptoDev-Project/Betty-Coin
/src/rpcblockchain.cpp
C++
cpp
31,232
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017-2018 The BETTY developers // Distributed under the MIT software license, see the accompanying // file COPYING or ht...
7d70154e494bf807fbc77e8e7ea0e8c25d6045ec
8fcd2629d7838356b27c59808242da82d763f822
mrsekut/chainer-compiler
/runtime/ops/pooling.cc
C++
cc
29,542
permissive
#include <math.h> #include <algorithm> #include <numeric> #include <chainerx/kernels/pooling.h> #include <chainerx/routines/creation.h> #include <chainerx/routines/manipulation.h> #include <chainerx/routines/math.h> #include <chainerx/routines/pooling.h> #include <chainerx/routines/statistics.h> #include <common/log...
b03ff8360cccc2486fbca1e3a0822e534b998f94
fc4ed28fd946b5e58f4fb85b2868ad1684679236
ogiroux/libcudacxx
/.upstream-tests/test/std/utilities/time/time.point/time.point.cast/ceil.fail.cpp
C++
cpp
886
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 // //===---------------------------...
960c2b5b0164bbb2272a66470b9b9a650b6be695
d81203e4e0f4dec09c1f5a0aa5bdb3873274b1dc
abenagli/UserCode
/Summer12/VBFAnalysisPackage/src/HiggsMassWindows.cc
C++
cc
2,331
no_license
#include "HiggsMassWindows.h" std::vector<int> GetMasses() { std::vector<int> masses; masses.push_back(200); masses.push_back(250); masses.push_back(300); masses.push_back(350); masses.push_back(400); masses.push_back(450); masses.push_back(500); masses.push_back(550); masses.push_back(600); ...
091768984d6ba89370ff9a4ddc5e1fd0154fd58b
dfba19b8155ee3460855c0b85809fe397f7cc4ed
ImbaCow/cpp_course
/FinalProject/Ver1/HeroTank.cpp
C++
cpp
5,399
no_license
#include "HeroTank.h" #include <cmath> #include <algorithm> void HeroTank::draw(sf::RenderTarget &target, sf::RenderStates states) const { target.draw(body); target.draw(head); target.draw(fullHealth); target.draw(currentHealth); target.draw(cdBar); } void HeroTank::checkWallCollision...
bb343ce4502faaddc7893abf2c43d19f001e16e4
6c5a46b31f008fd537a5e3ab30440a56b458b4e4
rbrugo/units
/example/alternative_namespaces/conversion_factor.cpp
C++
cpp
2,354
permissive
/* Copyright (c) 2003-2020 Andy Little. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License or (at your option) any later version. This program is distributed in th...
f61d8fefae825973b42a52cda527d8d1a56682bc
5addbfb1a9fcf74c93edd1f7ec9ee69fe80a8878
MSC19950601/TinyRay
/TinyRay/Utilities/Matrix.cpp
C++
cpp
1,480
no_license
// // Created by eyefrog on 15/7/15. // #include "Matrix.h" Matrix::Matrix(void) { for (int x = 0; x < 4; ++x) { for (int y = 0; y < 4; ++y) { if (x == y) m[x][y] = 1.0; else m[x][y] = 0.0; } } } Matrix::Matrix(const Matrix &mat) { f...
f11f643f8d70882574b82217335f787fb351804d
e4665c3a7dfd148851480423732eaad2fb6032ac
anirul/ShaderGL-Classroom-1
/ShaderGLLib/Texture.cpp
C++
cpp
1,281
permissive
#include "Texture.h" #include <assert.h> #include <GL/glew.h> #include "Image.h" namespace sgl { Texture::Texture(const std::string& file) { #pragma message ("You have to complete this code!") } Texture::~Texture() { #pragma message ("You have to complete this code!") } void Texture::Bind(const unsigned int...
318a5b7ab60a1435288755188ddbe55be07176c0
8267d5fda7d4f88928f61946c6badf1c4d741f1d
tonytej/CIS22C
/Hash Table/Hash_Table.cpp
C++
cpp
2,673
no_license
/* Antony Tejakusuma CIS22C Hash_Table.cpp */ #include "Hash_Table.h" #include <iostream> #include <assert.h> using namespace std; Hash_Table::Hash_Table(){} Hash_Table::~Hash_Table(){} int Hash_Table::hash(string key){ int index, sum = 0; for(int i = 0; i < key.length(); i++) sum += (int) key[i]; ...
094e353da90305686b0270cfd48979c49299faa8
3f51d4aed9cb94476662110b571f5225b097808e
KunalFarmah98/Interview-Questions
/painter's_partition.cpp
C++
cpp
1,553
no_license
//KUNAL FARMAH //@kunalfarmh98@gmail.com #include<bits/stdc++.h> using namespace std; typedef long long ll; bool check(ll nPainters, vector<ll>& L, ll guess){ ll curPainter = 1; ll curLen = 0; for(auto board: L){ // for every value, check if the crrent painter can paint the board if (bo...
5abb150e4943900fcf80304a05feec530a157a03
ba185eee631ac5eed65eebc1e7226f304843a311
ljegege/publicServer
/PublicServer/PublicServer/ClientVectorTable.cpp
C++
cpp
1,385
no_license
#include "ClientVectorTable.h" // 初始化客户机列表-InitClientTable(); bool CClientVectorTable::InitClientTable() { return true; } // 添加客户机-AddClient bool CClientVectorTable::AddClient(const CClientInfo & paramClientInfo) { clientInfoVec.push_back(paramClientInfo); return false; } // 删除客户机-DeleteClient bool CClientVect...
f84396d227f22d4b42a7d762545295424c3870ab
e1d0b65921f2bc9931520ce5e07bb0dcbbf95105
berber1016/chromium
/ash/components/account_manager/account_manager_unittest.cc
C++
cc
28,819
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 "ash/components/account_manager/account_manager.h" #include <set> #include <string> #include <utility> #include <vector> #include "base/bind.h"...
690b6339ef8b1c1fa79430d24610adb314f35a9b
c47f22f7dc8f21825c93a29d5f869b8703c7fd14
victorburckel/project_euler
/project_euler/problem25.cpp
C++
cpp
906
no_license
#include "euler.h" #include "level1.h" #include <boost/multiprecision/cpp_int.hpp> #include <boost/unordered_map.hpp> #include <boost/range/algorithm/lower_bound.hpp> using namespace boost::multiprecision; namespace { cpp_int fibo( size_t n, boost::unordered_map< size_t, cpp_int >& cache ) { const auto it = cache.i...
e343655113d60c831960b4a16657638198c0b0d3
bbc7aa1d2d0c60ac6c8774908e1106ed1e3532f1
VertexBeat/QEngine
/TiledManager.hpp
C++
hpp
494
no_license
#pragma once #include <vector> #include "Tile.hpp" #include "TSingleton.hpp" #include "tinyxml2.h" #define g_pTiledManager TiledManager::Get() class TiledManager : public TSingleton<TiledManager> { public: TiledManager(); ~TiledManager(); // loads tmx-file std::vector<Tile> loadLevel(const char* fileName); priv...
efbd05514cc80d9d44b71ec46709368658956423
ada6b3c9b7165b7948897bd9508b4feafb8566a0
Marchin/OpenGL
/Practice3/Project2/Source/Renderbuffer.cpp
C++
cpp
608
no_license
#include "../Headers/Renderbuffer.h" #include "../Headers/Renderer.h" Renderbuffer::Renderbuffer(GLenum type, unsigned int width, unsigned int height) { GLCall(glGenRenderbuffers(1, &m_rb)); GLCall(glBindRenderbuffer(GL_RENDERBUFFER, m_rb)); GLCall(glRenderbufferStorage(GL_RENDERBUFFER, type, width, height)); GLCa...
e73f2684f8353b032480115a4f7da150897e0626
9b4b6b1a6918f5d5edad7fafd4897c8ecba7055a
nowayX/Cuby
/ASection.cpp
C++
cpp
1,323
no_license
#include "ASection.hpp" ASection::ASection(eSection _ASection, Ressources *_ressources) { this->section = _ASection; this->ressources = _ressources; } ASection::~ASection() { std::list<AObject *>::iterator it; this->DeleteObjects(); } // Members functions void ASection::AddObject(AObject *item) { this->object...
9c09b6c6c64d5e4eda5184f3af14d88656a0deb9
7f0b2190ce653b36e97e4c7f93624aec062af14a
mel-hamr/cpp
/day08/ex01/span.cpp
C++
cpp
1,570
no_license
#include "span.hpp" Span::Span() { this->_Numbers.reserve(0); } Span::Span(unsigned int N) : _N(N) { this->_Numbers.reserve(N); } void Span::addNumber(int number) { <<<<<<< HEAD if(this->_Numbers.size() + 1 <= this->_N) ======= if(this->_Numbers.size() + 1 < this->_N) >>>>>>> 343becd5283d9dcc4e3d2804482b93...
385bca986efaca0f461ed458b0d589961254bb7c
21f05328c4f552f5cf22bd978ba4092217cbf074
quantumsteve/mantid
/Code/Mantid/Vates/VatesAPI/src/vtkDataSetToScaledDataSet.cpp
C++
cpp
5,534
no_license
#include "MantidVatesAPI/vtkDataSetToScaledDataSet.h" #include <vtkFieldData.h> #include <vtkFloatArray.h> #include <vtkNew.h> #include <vtkPoints.h> #include <vtkUnsignedCharArray.h> #include <vtkUnstructuredGrid.h> #include <stdexcept> namespace Mantid { namespace VATES { /** * Standard constructor for object...
8424d489af5d12edc3d01e5e642a44a9eb213367
90ee435acfb144451673e11d998117d3a9a72c88
TimCRN/bikenet
/src/Packet.cpp
C++
cpp
926
no_license
#include "Packet.h" #include <Arduino.h> Packet::Packet(unsigned int bikeid, float lat, float lon, bool unlockable, bool locked){ this->bikeID = bikeid; this->latitude = lat; this->longitude = lon; this->unlockable = unlockable; this->locked = locked; this->toByte(); } Packet::~Packet()...
4fe06e23c98dc94c8d9ae3d420815fd2272876bb
54b776eb338a84d5aab6deb72c34894756c4f578
PEBBL/pebbl
/src/pebbl/pbb/spReceiver.cpp
C++
cpp
3,395
permissive
/* _________________________________________________________________________ * * Acro: A Common Repository for Optimizers * Copyright (c) 2008 Sandia Corporation. * This software is distributed under the BSD License. * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, * the U.S. Governm...
06732f6716a31d80278cd04f2c0ec234ef031ca3
180cb9b743b1fd14a1d72cd9b43e9b1f77eb12ce
tofuman/C3-PR-MQTT
/src/mqtt_client.cpp
C++
cpp
2,831
no_license
#include <string> #include <vector> #include <mutex> #include "config.h" #include "mqtt_client.h" #define MAX_QUEUED_MESSAGES 20 static std::mutex message_mutex; static std::vector<Message*> messages; // MQTT client static void callback(char *topic, byte *payload, unsigned int length) { Message* new_message = ...
7e30529e835a621152e6fc4f266cef11c4ec95eb
4c08e7ac1c4d64fe605c565b604c417f0c8ce6ef
sdk-team/aliyun-openapi-cpp-sdk
/ecs/src/model/StopInvocationRequest.cc
C++
cc
2,810
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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...
00ca2d1cc1305931c1776727005225a8f7dca0d7
679c99051da0ac367014f751eb9f7eaf24a14372
weblifeio/chromium
/components/sync/test/test_sync_service.cc
C++
cc
8,783
permissive
// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/sync/test/test_sync_service.h" #include <utility> #include <vector> #include "base/time/time.h" #include "base/values.h" #include "components/sync/base/p...
265c5f3eb8db6a9e755c86579eed8f6b1889e68e
bb8d25e7baf829cc2533d49337fa08fd0951fc02
worldgold/rb
/src/qt/guiutil.cpp
C++
cpp
16,482
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <QApplication> #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoin...
7e151046ac8d39e780c7567c5004a34199587cc6
24b80a3bb3d37c6de7930db83276fb89edf368cc
hokein/chromium
/chrome/browser/extensions/extension_keybinding_registry.cc
C++
cc
8,449
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_keybinding_registry.h" #include "base/values.h" #include "chrome/browser/chrome_notification_types.h" #...
e6b725dd03481a6d8e8ffe8a71518c7d8968da71
b0c8526a3aee6c4675a17c282399787a681a5ffd
happybear1234/MFC-StudentManagementSystem
/CInforInsertDlg.cpp
C++
cpp
5,255
no_license
// CInforInsertDlg.cpp: 实现文件 // #include "pch.h" #include "StudentManagementSystem.h" #include "CInforInsertDlg.h" #include "afxdialogex.h" #include <string> #include "mysql.h" #include "CInformationDlg.h" using namespace std; // CInforInsertDlg 对话框 IMPLEMENT_DYNAMIC(CInforInsertDlg, CDialogEx) C...
ca44c8d634a3bd9a1fdeaa6ea479d4b8f2c40c61
aad1638781a94824ae8b466067746f939ebd2377
TheCrashDown/HuffmanArchiver
/main.cpp
C++
cpp
790
no_license
#include "stream.h" #include "encoder.h" #include "decoder.h" #include <iostream> int main() { setlocale(LC_ALL,"Russian"); CInputStream in1; std::string in_str; std::cin >> in_str; //in1.buffer = "Last night. You see in this world there's two kinds of people my friend - those with loaded guns, an...
6643039bc35d3ffc3bb60cdcfccd06cd4a6af0b8
5a4bbaaf23accb1501b2cd13d14be4fb9ecc6bef
prawalgangwar/harp
/harp-daal-app/daal-src/algorithms/kernel/mf_sgd/mf_sgd_default_distri_fpt_dispatcher.cpp
C++
cpp
1,140
permissive
/* file: mf_sgd_dense_default_distri_fpt_dispatcher.cpp */ /******************************************************************************* * Copyright 2014-2016 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You...
483aeb795cd2c7bf49a747b03d17e470c3bfd027
3b4565f9d13dcc6bd312e317276cf038c9735a04
so1e7/game_space
/main.cpp
C++
cpp
8,822
no_license
#include <SFML/Graphics.hpp> #include <time.h> #include <vector> constexpr int STONES_NUMBER = 6; using namespace sf; /** * Обновляет счётчик очков * @param n_k позиции цифр * @param number спрайты цифр */ void update_counter(int *n_k, Sprite *number) { if (n_k[2] > 9) { n_k[2] -= 10; ...
6401e7de4ae1b241c0892891bb72971d013aecf2
dbbe4bc35db732b212e6f6e8ecda94293e1050d8
ca2/app2018
/appseed/sphere/colorertake5/colorertake5_colorertake5.cpp
C++
cpp
352
no_license
#include "framework.h" // previously aura/user/user.h namespace colorertake5 { colorertake5::colorertake5(::aura::application * papp) : object(papp), ::aura::department(papp) { } colorertake5::~colorertake5() { } bool colorertake5::initialize() { return true; } ...
f17e55fe997484e042508db358b8cc427ac494e0
dcf7f29fb6c0174256e492213991ad96754c1092
PyroFlareX/HackySTL
/cpp/Extra/Constexpr/BooleanLogic.hpp
C++
hpp
2,002
permissive
#pragma once #include <type_traits> #include "../../TypeTraits.hpp" namespace hsd { namespace bit { // Basic values struct bitval {}; struct zero : bitval {}; struct one : bitval {}; } // Basic traits template <typename T> using is_bit = ::std::is_base_of<bit...
be6c942f1a74356805aba70cb6e2f49a21a67e55
f2e456097dfcc228de4e37e5e9072743520db082
apple/swift-lldb
/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp
C++
cpp
11,107
permissive
//===-- RegisterContextMinidump_ARM.cpp -------------------------*- C++ -*-===// // // 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 // //===---------------------------...
e081c2a91be9f3130944857762d8ebd4c7c67977
b18af42302dea4105786ed70c4688922720af538
calvin-corp/datacomm-commaudio
/source/Buffer/MessageQueueTest.cpp
C++
cpp
1,195
no_license
#include "MessageQueue.h" #ifdef TEST_MESSAGE_QUEUE DWORD WINAPI producer(void* params) { MessageQueue* msgq = (MessageQueue*) params; int repeat = 10000; int payload; while(--repeat > 0) { payload = repeat; msgq->enqueue(repeat,&payload); } return 0; } DWORD WINAPI con...
748aba2d7f0f694528394f0c6a55dab00efa2e31
46988e34459084fcc527de35dfad10284aef3c68
jiangxinzhou/N3LDG
/N3LDGTest1/N3LDGTest1/multiply1/example1.cpp
C++
cpp
881
no_license
#include "cpu_matrix.h" #include "gpu_matrix.h" #include <iostream> #include <chrono> int main() { cpu_matrix cA; cA.init(200, 10000); cpu_matrix cB; cB.init(200, 10000); cpu_matrix cC; cC.init(200, 10000); gpu_matrix gA; gpu_matrix gB; gpu_matrix gC; gC.init(200, 10000); int count = 10000; auto star...
0d31220e1b80d0c5b6f45acfe540405344a437b7
762e48308f48e81ab5c92fb6774fc46515cb19b8
ggutierrez/cssmozart2-vm
/vm/main/modules/modatom.hh
C++
hh
1,898
permissive
// Copyright © 2011, Université catholique de Louvain // 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...