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 |
|---|---|---|---|---|---|---|---|---|
52d0fd64d67209063a81452e7e8340736b14241c | 387663bb8dd3f78f45cc51eec2c7e19d75fe8210 | wouterboomsma/quickstep | /external/boost_1_60_0/qsboost/mpl/zip_view.hpp | C++ | hpp | 1,566 | permissive |
#ifndef QSBOOST_MPL_ZIP_VIEW_HPP_INCLUDED
#define QSBOOST_MPL_ZIP_VIEW_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2010
// Copyright David Abrahams 2000-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.t... |
ba3937f3831cdc9a7746d33a42ae1bca2df9a665 | 3dce432c3614de92d51b4d211ec15b8ee024e15b | jayirum/ChartProjSvr | /Source/BackupFiles/HDAPI/HDChartHistory/HDFCommClient.cpp | C++ | cpp | 5,535 | no_license |
// HDFCommClient.cpp : 응용 프로그램에 대한 클래스 동작을 정의합니다.
//
#include "stdafx.h"
#include "HDFCommClient.h"
#include "HDFCommClientDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CHDFCommClientApp
BEGIN_MESSAGE_MAP(CHDFCommClientApp, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CHDFCommClie... |
f005f931b04d4046cccb85c1929d367a64d50a9b | 8813b61d33f3f9b0c9d6dd027d022fab6ab97e8a | longcongduoi/libcouchbase | /tests/strerror-unit-test.cc | C++ | cc | 1,336 | permissive | /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2011 Couchbase, 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
*
* ht... |
ca3657b0602d37c610134ad6beccea6a2e7d7f62 | e014e827d05e190514c9e3a4394b89be1a7120be | aparac95/OOP_Cpp_exercises | /stl2/test/test-zad.cpp | C++ | cpp | 3,372 | no_license | #include "gtest/gtest.h"
#include "../src/zadatak.h"
#include <string>
#include <fstream>
#include <stdexcept>
#include <iterator>
using namespace std;
TEST(STL2, procitaj_rijec) {
std::string line = "a, \n";
auto it = line.cbegin();
std::string rijec = procitaj_rijec(it, line.cend());
ASSERT_EQ (rije... |
f683b3b279a141604c6e9123c1a6c3541039adb9 | b582f0f0fd36f7d1b5803747256cfccb0a70c7b9 | WolfireGames/overgrowth | /Projects/bullet3-2.89/examples/MultiBody/SerialChains.cpp | C++ | cpp | 13,399 | permissive | #include "SerialChains.h"
#include "../OpenGLWindow/SimpleOpenGL3App.h"
#include "btBulletDynamicsCommon.h"
#include "BulletDynamics/MLCPSolvers/btDantzigSolver.h"
#include "BulletDynamics/MLCPSolvers/btSolveProjectedGaussSeidel.h"
#include "BulletDynamics/Featherstone/btMultiBody.h"
#include "BulletDynamics/Feathers... |
982a5d80ae3899b20d67e7c34f0f8fc06a38c677 | 613336bf2919e90937c029ba26b2ef5d49c12864 | ManaliSharma/Autonomous_Vehicle | /sdc_gym/box2d-py-2.3.8/Box2D/Dynamics/Joints/b2MotorJoint.cpp | C++ | cpp | 7,848 | permissive | /*
* Copyright (c) 2006-2012 Erin Catto http://www.box2d.org
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose,
* i... |
0cd7849c5c776044d036d3f60756147b32842fb1 | 803ef7b443ea889fb7c8b5f0fb66af13173403b6 | Keyrim/eseo-s1-arduino-self_balancing_bot | /Self_balancing_V2-2/Stepper_moteur.cpp | C++ | cpp | 3,704 | no_license | #include "Arduino.h"
#include "Stepper_moteur.h"
Stepper_moteur::Stepper_moteur(){
}
//Value must be 1, 2, 4, 8, 16 for the microstepping
void Stepper_moteur::set_micro_stepping(byte divider){
micrro_stepping_div = divider ;
for(int p = 0; p < 3; p++)pinMode(MS1 + p, OUTPUT);
byte output ;
switch (divider)... |
f8b99c55f37459b2daf1f7aa05132a7640ec30ed | ed7bf5bc75f3b6080e74f501c0be1833cb025602 | PurdueElectricRacing/ChargerGui | /chargergui.cpp | C++ | cpp | 223 | no_license | #include "chargergui.h"
#include "./ui_chargergui.h"
ChargerGui::ChargerGui(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::ChargerGui)
{
ui->setupUi(this);
}
ChargerGui::~ChargerGui()
{
delete ui;
}
|
75ac7b2d67edecbc110bab7dc370c214a3c7fb59 | 360c9746f024297a6e1057505d07353f984abf23 | veshivan/mytestrepo | /C++ Lang Features/C++ Lang Features.cpp | C++ | cpp | 2,310 | no_license | // C++ Lang Features.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
template<typename X, typename Y>
void foo_auto_1(const X& x, const Y& y)
{
auto z = x * y;
cout << z << endl;
}
void foo_auto_2()
{
auto a = 4.5, b = 5.6;
auto c = 7.0, *p = &c, &r = *p;
// auto d = 8, str = "... |
98d99d33f7dfa5eea72ad9a508d2bcf3c5a76c3b | bbce18a218766c7adc966a0cfa76931441e54de4 | bejado/filament | /samples/sample_full_pbr.cpp | C++ | cpp | 16,405 | 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... |
0c8e2fd07be5d117dcd34db67992c8fa1c176d56 | 68d0173aa52d7ec0e77be6feb947f19b20511ab9 | Parhamic/teeworlds | /src/game/server/lua/lua.cpp | C++ | cpp | 2,540 | permissive | /* (c) MAP94 and Patafix. See www.n-lvl.com/ndc/nclient/ for more information. */
#include "lua.h"
#include "string.h"
#include <engine/serverbrowser.h>
#include <engine/textrender.h>
#include <engine/sound.h>
#include <engine/console.h>
void CLua::Tick()
{
if (m_ConsoleInit == false)
{
m_pServer->Conso... |
9456bb2c55ca4532ae24b3b8cb8f7ba56d8fbe62 | e55547911b22c3138e1eff9bdf2e20077195311e | iontower/node | /deps/v8/test/cctest/wasm/test-run-wasm-exceptions.cc | C++ | cc | 16,945 | permissive | // Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/api/api-inl.h"
#include "test/cctest/wasm/wasm-atomics-utils.h"
#include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/w... |
7c239f54b797f5a37b7ab934128ccdcb45ee80a0 | 3a3771e55c83911127b56faf1adb2a9ad71e180b | i5anoff/VJ_20190611 | /garden_melt/src/flower.hpp | C++ | hpp | 511 | no_license | #pragma once
#include "ofMain.h"
class Flower {
public:
Flower(const glm::vec3 &_pos, const glm::vec3 &_dir);
glm::mat4 translate; //ワールド座標用
float pointSize;
ofFloatColor color;
glm::vec2 pos = glm::vec2(0,0); //ローカル座標用の変数
float angle; //向き
int age;
float lifeSpan;
float ... |
cc453f67c85bf9ba3cd133316eec718e51e1b283 | f075ce0747530c5778527902b9549a7f6bb7c283 | olethrosdc/beliefbox | /src/algorithms/MultiMDPSVI.cc | C++ | cc | 9,620 | no_license | // -*- Mode: c++ -*-
// copyright (c) 2010 by Christos Dimitrakakis <christos.dimitrakakis@gmail.com>
// $Id: ValueIteration.c,v 1.5 2006/11/08 17:20:17 cdimitrakakis Exp cdimitrakakis $
/***************************************************************************
* ... |
7419eda32fd0e26a6029485b815488c7f9ebbe62 | 6482fa0726856175fe8902eaf638a43d27c837cb | xujiazhuan/WarcraftIII_DLL_126-127 | /DotAAllstarsHelper/DotaCustomFrames.cpp | C++ | cpp | 5,844 | no_license | #include "Main.h"
// only for test ( http://i.imgur.com/40qQr8X.jpg )
int DefaultCStatus = 0;
int LoadFramesVar1 = 0;
int LoadFramesVar2 = 0;
pLoadNewFrameDef LoadNewFrameDef_org;
pCreateNewFrame CreateNewFrame;
pShowFrameAlternative ShowFrameAlternative;
pSetFramePos SetFramePos;
pShowThisFrame ShowThisFrame;
pDes... |
9e8ae9afc5619d1c064456362101166364c1b0da | 5f55a8b0ca0bf63b434cafab5ad22118beaf7ccf | merced317/scirun4plus | /src/Packages/BioPSE/Dataflow/Modules/Forward/ApplyFEMElectrodeSource.cc | C++ | cc | 26,403 | permissive | /*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2009 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "So... |
792c41bfc4d1958bfe92064663ab23a9510c43e1 | 9daf1406c49fc641d08c1dfdd932d5ec525063fe | farhanramli/Press-Button | /press_button.cpp | C++ | cpp | 3,223 | no_license | /*
* press_button.cpp
*
* Created on: Feb 14, 2018
* Author: farhan r
*/
#include "press_button.h"
#include "Arduino.h"
SuperButton::SuperButton(int pin):_pin(pin)
{
this->_state = BTN_IDLE;
}
uint8_t SuperButton::check(PRESS_BUTTON_STATE &check_state, uint8_t &response)
{
uint8_t status = 0;
this->_a... |
430ade694b86c8582f86b73edc70358811aadacc | 24d3127a21ab61267e0655a6f6474be84c83bc63 | GaborDrescher/barnes | /nodealloc.cc | C++ | cc | 385 | permissive | #include "nodealloc.h"
//static std::vector<node*> buffer;
void destroyNode(node *n)
{
//buffer.push_back(n);
delete n;
}
node* getNewNode()
{
return new node;
//node *no = 0;
//
//if(buffer.size() == 0) {
// no = new node;
//}
//else {
// no = buffer.back();
// b... |
f9bf4f17b7af7ff41f21ba230296fdf737a9e843 | 87a73073fdf60e300a6ce0305f133fb9d526e175 | yiluohan1234/designPattern | /strategy/BlockEnemy.cpp | C++ | cpp | 504 | no_license | /*************************************************************************
> File Name: BlockEnemy.cpp
> Author: cyf
> Mail: XXX@qq.com
> Created Time: 2016年05月30日 星期一 10时01分05秒
************************************************************************/
#include <iostream>
#include "BlockEnemy.h"
using namespace st... |
fbb1abd89071fe290ffa58e410e9dd7f6b84d549 | 985e9fe7e71ccdca020deb52935b6f35388076b5 | geogebra/giac | /src/giac/cpp/rpn.cc | C++ | cc | 174,859 | no_license | // -*- mode:C++ ; compile-command: "g++-3.4 -I.. -g -c rpn.cc -DIN_GIAC -DHAVE_CONFIG_H" -*-
#include "giacPCH.h"
/*
* Copyright (C) 2001,14 B. Parisse, Institut Fourier, 38402 St Martin d'Heres
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Publ... |
4d7015f803ec043692204bb6c892921fe6353a1f | 11fe4c3bc057493a9ec1a98ef1a9ca7013002fda | templeblock/FlexEngine | /FlexEngine/include/Scene/GameObject.hpp | C++ | hpp | 20,091 | permissive | #pragma once
#include "Audio/AudioCue.hpp"
#include "Callbacks/InputCallbacks.hpp"
#include "Graphics/RendererTypes.hpp"
#include "Graphics/VertexBufferData.hpp" // For VertexBufferDataCreateInfo
#include "Helpers.hpp"
#include "Spring.hpp"
#include "Transform.hpp"
#include "Time.hpp"
#include <set>
class btCollisio... |
69aea7ccdd7038309158405b4c3f220cc19d5dd6 | 02c283b06812216a4b1e71709f56f1e5117452d9 | mrcoder95/codeSamples | /LineTopology/Qt/src/mainlinetopology.cpp | C++ | cpp | 3,833 | permissive | /**
Line Topology simulation execution
Original Code was developed by Ole Sigmund in MATLAB.
Source: https://www.topopt.mek.dtu.dk/Apps-and-software/A-99-line-topology-optimization-code-written-in-MATLAB
The MATLAB code is converted to C++ code.
Created by: Mohamed Imran Peer Mohamed
Email: mr... |
e12dd41208d8d3e557228e035f0a4967e4a95215 | 2846ef2e9aa1d21ddfe3ab5161af2ab8cd7c5c01 | huxian123/mindspore | /mindspore/lite/src/runtime/kernel/arm/fp32/resize.cc | C++ | cc | 6,427 | permissive | /**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* 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... |
ec1aa2a9ba7b7a10ea02a0fdd17278ed77c1bd0e | d93caffa5efc3bb9c65bdcf9fd98f78dc95ef9c0 | pnikic/Hacking-uva | /661.cpp | C++ | cpp | 737 | no_license | #include <iostream>
#include <cstring>
#include <bitset>
using namespace std;
int main()
{
int n, m, c, cnt = 1;
while (cin >> n >> m >> c, n || m || c)
{
bool flag = false;
int N[20], now = 0, max = 0;
memset(N, 0, 20 * sizeof(int));
bitset<32> sw(0);
for (int i = 0; i < n; ++i)
cin >> N[i];
for ... |
837470273707843a5cfabe5617c4c4952a853719 | 7ca6ad16dd8831e5a7e4955a0fc77122c83027f7 | revel8n/MetPrimeTools | /RetroView/include/models/CAreaFile.hpp | C++ | hpp | 2,278 | no_license | #ifndef MREAFILE_HPP
#define MREAFILE_HPP
#include "core/CModelData.hpp"
#include "core/IRenderableModel.hpp"
#include "core/IResource.hpp"
#include "core/GXCommon.hpp"
#include "core/CScene.hpp"
#include "CAreaBspTree.hpp"
#include <vector>
#include <string>
struct SAABB
{
SBoundingBox aabb;
atInt32 unkInde... |
257362362f36b03b8bcc803284d8d1e2b1bc6bf7 | e203e0065f9f688f01d60b5862110d36c322a07e | sudhir45/CPP-Practice-Programs | /quit_while_entering_array_elements_v2.cpp | C++ | cpp | 345 | no_license | #include <bits/stdc++.h>
#include <vector>
using namespace std;
int main(){
int addDigit, i=0;
vector<int> values;
while(cin >> addDigit) {
values.push_back(addDigit);
}
cout << "Elements in array are: ";
for (int i = 0; i < values.size(); ++i) {
cout << values[i]<<" ";
}
cout << "\n" <<... |
0aa54e1319d04d5bf81c756000ebda2ba124445a | 19bd21a51266eb56e29e98dcabd935de820de446 | meteozay/nntrainer | /nntrainer/utils/util_func.cpp | C++ | cpp | 3,888 | permissive | /**
* Copyright (C) 2020 Samsung Electronics Co., Ltd. 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 requ... |
7ff44f58781d47a710ed8510a9855718d8a72e0f | 452d46a47516881bb73f1f8499e8ec230f519d60 | unegare/ClickHouse | /dbms/src/Storages/MergeTree/MergeTreeMarksLoader.cpp | C++ | cpp | 3,445 | permissive | #include <Storages/MergeTree/MergeTreeMarksLoader.h>
#include <Storages/MergeTree/MergeTreeData.h>
#include <IO/ReadBufferFromFile.h>
#include <Poco/File.h>
namespace DB
{
namespace ErrorCodes
{
extern const int CORRUPTED_DATA;
extern const int LOGICAL_ERROR;
}
MergeTreeMarksLoader::MergeTreeMarksLoader(
... |
fa00b69bc9d28725d2ff206b08bb7b65ac25376e | 04f29b615ae009a5befe5b45f1316aeb6bcca335 | TomasRejhons/gpg-source-backup | /2/06 Audio Programming/07 Lewis/Mixer.cpp | C++ | cpp | 3,045 | no_license | /* Copyright (C) Ian Lewis, 2001.
* All rights reserved worldwide.
*
* This software is provided "as is" without express or implied
* warranties. You may freely copy and compile this source into
* applications you distribute provided that the copyright text
* below is included in the resulting source code,... |
5d9d599db7fa5ed1f905a20719b3e067d06f9178 | e711e184062bb976e92d751c8b7041410f22311e | justincely/envoy | /test/server/connection_handler_test.cc | C++ | cc | 38,711 | permissive | #include "envoy/config/core/v3alpha/base.pb.h"
#include "envoy/config/listener/v3alpha/udp_listener_config.pb.h"
#include "envoy/server/active_udp_listener_config.h"
#include "envoy/stats/scope.h"
#include "common/common/utility.h"
#include "common/network/address_impl.h"
#include "common/network/connection_balancer_i... |
70fdff9caf223778e47670d74c2698fab8ead611 | 51fbabb890d4c99f9fa43392af4b8623a7f71999 | eduardotsimoes/timestampFinder | /src/commands/topQuery.cpp | C++ | cpp | 1,604 | no_license |
#include "topQuery.hpp"
#include <unordered_map>
#include <queue>
#include <iostream>
#include <vector>
#include <sstream>
void topQuery(std::istream &file, int timestamp, int to, int numberOfTopQueries)
{
std::unordered_map<std::string, int> distinctQueries;
/// TODO : Ideally the map should be reserved to avoi... |
68681fb4f26f9bb1c09dda3a7abaccedda37b04d | 6971945cbcc40821683d75b27dc1aacbde9e0b67 | Sahilkalamkar/Codeforces_Solutions | /1101B.cpp | C++ | cpp | 819 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
long int ans=0,largest=0;char openbracket='[',closebracket=']',colon=':';
bool opened=false,closed=false;int colons = 0;string smallstr="";
vector<long int> ob,cb;vector< pair<long int, long int > >col;int pipes = 0;
for(long int i=0;i<s... |
687f81a36c8670c190588cf6bfabf4e84201cffb | 5afa035b03e2d09f67f42676c06ed3b94ff4f2bb | urrburu/baekjoon-algo | /3273.cpp | C++ | cpp | 502 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int n, x;
int main() {
cin >> n;
vector<int> v(n);
for (int i = 0; i < v.size(); ++i) {
cin >> v[i];
}
cin >> x;
sort(v.begin(), v.end());
int ans = 0;
int begin = 0; int end = n - 1;
while (begin < end) {
int sum = v[begin] + v[... |
c06a8dc79e1216d1a0733d3ebfc0b1892f2bafdc | 1131840b6ab3eef86b4e2d363f658481347a312a | EVT1982/coolprop | /CoolProp/HumidAirProp.cpp | C++ | cpp | 56,611 | permissive | #if defined(_MSC_VER)
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <stdlib.h>
#include "math.h"
#include "time.h"
#include "stdio.h"
#include <string.h>
#include <iostream>
#include "CoolProp.h"
#include "Ice.h"
#include "HumidAirProp.h"
#include "Solvers.h"
#include "CoolPropTools.h"
#include "purefluids/Water... |
aa92326393843c9fa455fea43fced60d82c965f0 | e5390f798a98cb7eda5a62da2676debcbd4e2f6b | samcom12/IBAMR | /examples/adv_diff/ex4/LevelSetInitialConditionHexagram.cpp | C++ | cpp | 3,523 | no_license | // ---------------------------------------------------------------------
//
// Copyright (c) 2018 - 2021 by the IBAMR developers
// All rights reserved.
//
// This file is part of IBAMR.
//
// IBAMR is free software and is distributed under the 3-clause BSD
// license. The full text of the license can be found in the f... |
77374dc6a86910c2f147b708f59a99a61ac8a842 | 71d9cc90670b0e9f1384112dadb3db7301929660 | pc2/HPCC_FPGA | /FFT/src/host/main.cpp | C++ | cpp | 343 | permissive | //
// Created by Marius Meyer on 04.12.19.
//
#include "fft_benchmark.hpp"
using namespace fft;
/**
The program entry point
*/
int
main(int argc, char *argv[]) {
// Setup benchmark
FFTBenchmark bm(argc, argv);
bool success = bm.executeBenchmark();
if (success) {
return 0;
}
else {
... |
ffc1d91ab00591c1689c08ea72499ecde31a7d32 | 48674b904c87a7ccdacc7738601d6a13373d589c | R3D9477/haxe-basics | /4_ExtLib/4.4_GuiFrameworks/4.4.2_HaxeUI/4.4.2.1_SimpleGui/4.4.2.1.1_HaxeuiBackends/4.4.2.1.1.2_haxeui-hxwidgets/4.4.2.1.1.2.3_Dialogs/SimpleMessageDialog/Export/cpp/debug/src/hx/widgets/Gauge.cpp | C++ | cpp | 9,220 | no_license | // GeneratedByHaxe
#include <hxcpp.h>
#ifndef INCLUDED_1363196d39aeb248
#define INCLUDED_1363196d39aeb248
#include "wx/gauge.h"
#endif
#ifndef INCLUDED_83f71eba104de7a2
#define INCLUDED_83f71eba104de7a2
#include "wx/gdicmn.h"
#endif
#ifndef INCLUDED_eb4c1394ce7c5dd4
#define INCLUDED_eb4c1394ce7c5dd4
#include "wx/objec... |
da3f4d9a3edaee26046912fd61d340ed2060b3ab | 6c71ad702fe6cee3c47ff9948e4f88cdfaa81563 | LeoLiu47/CmakeTest | /Recipe1/example4/Message.cpp | C++ | cpp | 205 | no_license | #include "Message.h"
#include <iostream>
#include <string>
std::ostream &Message::printObject(std::ostream &os) {
os << "This is my very nice message: " << std::endl;
os << message_;
return os;
}
|
a8256d045a2ecbf4a4f5342e12afc423eb8e06d5 | 5f2ca4b3530ab694d86651e9d73d081d2a784ce4 | BackupTheBerlios/fluxbox-svn | /tags/Release-0_9_6/src/Container.hh | C++ | hh | 2,923 | permissive | // Container.hh
// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
// and Simon Bowden (rathnor at users.sourceforge.net)
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
//... |
9356ea41a33eadd5cdbd08ed6f585fb591872ce9 | 6763f1fc721871ceb92d5578682c4ac1ecaf6c36 | cyberbotics/webots | /src/webots/nodes/WbRotationalMotor.hpp | C++ | hpp | 1,304 | permissive | // Copyright 1996-2023 Cyberbotics Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
e0f61e828d5b2de99fc83630532449e6d46c0544 | af9987c3c477cedbf7e198c1bd0341cbf36840ff | PDi-Communication-Systems-Inc/lollipop_external_chromium_org | /components/storage_monitor/media_transfer_protocol_device_observer_linux_unittest.cc | C++ | cc | 6,609 | 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.
//
// MediaTransferProtocolDeviceObserverLinux unit tests.
#include "components/storage_monitor/media_transfer_protocol_device_observer_linux.h"
#include... |
db0b97c11e80a3e343cb7f580397a19352571bfa | db6e2186a4422901dc83f5202a4ca18758837b81 | MahiAlJawad/Competitive-Programming | /Codeforces/CF 1203A.cpp | C++ | cpp | 5,296 | no_license | /***"In the name of Allah(swt), the most gracious, most merciful. Allah(swt) blesses with knowledge whom he wants."***/
/*Header file starts here*/
//#include<bits/stdc++.h>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<algorithm>
#include<iostream... |
e2e6c2fcf3d90b27d0af5800c7ff27481d8f7af1 | e16fc5fe98b96814f3071825a64f3ffaede18513 | gautam417/C-Files | /PointerVar.cpp | C++ | cpp | 1,527 | no_license | // This program demonstrates the use of pointer variables
// It finds the area of a rectangle given length and width
// It prints the length and width in ascending order
// Gautam Mehta
#include <iostream>
using namespace std;
int main()
{
int length; // holds length
int width; // holds width
... |
16098dd9f26694c9b69d807da098616e618d8fc4 | 108a55b36a4143d08db2112f2735dc2ef6dcbf3e | Indumathi1195R/convert-to-pdf-flutter-calendar | /linux/my_application.cc | C++ | cc | 3,742 | no_license | #include "my_application.h"
#include <flutter_linux/flutter_linux.h>
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#endif
#include "flutter/generated_plugin_registrant.h"
struct _MyApplication {
GtkApplication parent_instance;
char** dart_entrypoint_arguments;
};
G_DEFINE_TYPE(MyApplication, my_application, GT... |
8e7578e400d43ce3008ca247e9aae47a3dd1a1a8 | f510713749bc436a2e2a71116cf92c38c9219f43 | YTGhost/PAT | /PAT(甲级)2021年春季考试/7-1 Arithmetic Progression of Primes.cpp | C++ | cpp | 1,393 | no_license | #include <iostream>
using namespace std;
const int N = 100010, M = 15;
int primes[N], st[N], cnt;
int n, m;
int diff;
int res[M];
void getPrimes(int n)
{
for (int i = 2; i <= n; i ++ )
{
if (!st[i]) primes[cnt ++ ] = i;
for (int j = 0; primes[j] <= n / i; j ++ )
{
st[primes... |
d581eb718b82bcb8068700f0c737f88e8e3bf1e5 | 1d3c7d1c5de674b2db6638be0f26fda39b526047 | xqq/BLVM | /src/base/noncopyable.hpp | C++ | hpp | 577 | no_license | #ifndef _BLVM_BASE_NONCOPYABLE_HPP
#define _BLVM_BASE_NONCOPYABLE_HPP
namespace blvm {
namespace base {
class Noncopyable {
public:
Noncopyable() = default;
~Noncopyable() = default;
private:
Noncopyable(const Noncopyable&) = delete;
Noncopyable& operator=(const Noncopyable... |
857914957ead2a4bb0f2024d696ac9484c7e532b | f24cd4463fed4b70490d2a47caaab4312ff48944 | 34234344543255455465/aws-sdk-cpp | /aws-cpp-sdk-connect/source/model/StartOutboundVoiceContactRequest.cpp | C++ | cpp | 2,207 | permissive | /*
* Copyright 2010-2017 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" fil... |
36a806d02af3d6ee63e0f47b085a07a770fe0e44 | a9985bae17076883f80997b79bb0e5e07533bcb8 | Bodheem/ProjetIntegrateur3 | /Client Lourd/Sources/DLL/Global/GlobalesPartie.cpp | C++ | cpp | 15,613 | no_license | ///////////////////////////////////////////////////////////////////////////
/// @file GlobalesPartie.cpp
/// @author The New Ballers
/// @date 2016-01-17
/// @version 1.0
///
/// @ingroup Global
///////////////////////////////////////////////////////////////////////////
#include "GL/glew.h"
#include <gl/GLU.h>
#includ... |
8c8b578db636cc1c46bb7a1077c96aa3aa8077e2 | 6b40765df5cca9ebde87447c863f592589721b2e | thouchi2/CS225 | /lab_dict/fib.cpp | C++ | cpp | 1,083 | no_license | /**
* @file fib.cpp
* Contains Fibonacci-number generating functions both utilizing and not
* utilizing memoization.
*
* @author Matt Joras
* @date Winter 2013
*/
#include "fib.h"
#include <map>
using std::map;
/**
* Calculates the nth Fibonacci number where the zeroth is defined to be
* 0.
* @param n Whi... |
83a42cfeb989df33ad3f17e982f11fe8b83f9893 | a3c466a40ac602c2e69beaa9054b5f18bb27d4f5 | Fugoes/Webe | /src/modules/module_file_server.cpp | C++ | cpp | 4,156 | permissive | #include "module_base.h"
#include "module_utils.h"
#include <string>
#include <list>
#include <map>
#include <iostream>
#include <cstring>
#include <stdio.h>
#include "dirent.h"
static constexpr char p[] = "/static";
static std::map<std::string, std::tuple<const char *, ssize_t, std::string>> filename_to_buffer;
st... |
5db3a95274bb354ff491fece4f84f8fc554ebda9 | 3bb12ae9871ae9d114583c1ef2bd0cb294b399b2 | LeeChanHyuk/Algorithm | /C++/0x0C_BackTracking/6603.cpp | C++ | cpp | 1,094 | no_license | #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <string>
#include <string.h>
#include <vector>
#include <queue>
#include <stack>
using namespace std;
int arr[50];
int isused[50];
int out[6];
int num;
void backtracking(int digits)
{
if (digits == 6)
{
for (int i ... |
efee201216729ac5e103e94eb497873c39b5f46b | 50471f0ce9a35f0d149631c5cbbd3cd4f598792b | phamtec/skweltch | /src/machine/PipeBuilder.hpp | C++ | hpp | 382 | permissive |
#ifndef __PIPEBUILDER_HPP_INCLUDED__
#define __PIPEBUILDER_HPP_INCLUDED__
#include "JsonObject.hpp"
#include <string>
#include <log4cxx/logger.h>
class PipeBuilder {
log4cxx::LoggerPtr logger;
public:
PipeBuilder(log4cxx::LoggerPtr l) : logger(l) {}
JsonObject collect(JsonObject *config, const JsonObject &bloc... |
5745e8824c5881aeed597b1bde2fa08e129c6673 | d2deaffa6c362739ea7595b27355c5b85c46bc9c | BlinkingStar7/Problem_Solving | /Contests/CodeForce/CodeForce#101/B.cc | C++ | cc | 594 | no_license | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
int main () {
int A, X, Y;
cin >> A >> X >> Y;
int ans = -1;
if (Y > 0 && Y < A) {
if (2*X > -A && 2*X < A) {
ans = 1;
... |
b99c1220bbc9f4752c9c41c6575887c3aaa703db | f6df73d2191f463025243cb040c4c8b363ab2aae | kunal-mohta/dsa | /ds/Heaps/heaps-clrs.cpp | C++ | cpp | 1,298 | no_license | /* CLRS algo for heaps ds */
/* TODO -
* minheaps
*/
// This file's functions are included in dsa/algos/heapsort-clrs.cpp
//No problem in keeping the header files as they won't we read twice (I think, because preprocessing gives the same number of lines when including the header files more than once)
#include<iost... |
ea3d4bec7401639deb9848c23f3c80d18fe2470f | 3a85213236473a23e99200a7dc951a7a60114d15 | szorbakir/Plotters_v2 | /allUnc_drawDataMC.cpp | C++ | cpp | 13,974 | no_license | #include <iostream>
using namespace std;
//* ROOT header files
#include <TH1.h>
#include <TF1.h>
#include <TString.h>
#include <TFile.h>
#include <TCanvas.h>
#include <TLatex.h>
#include <TLegend.h>
#include <TStyle.h>
#include <TRatioPlot.h>
#include <TPad.h>
#include <TGaxis.h>
//* Fuction prototype
TH1 *getClonedH... |
949dae7438c2141782ed0db72f3bca65d679fd92 | eef9ccefdaead9dd62f62d1484bfec84f95e4c6a | geocompass/tippecanoe | /text.cpp | C++ | cpp | 3,011 | permissive | #include "text.hpp"
#include <stdio.h>
/**
* Returns an empty string if `s` is valid utf8;
* otherwise returns an error message.
*/
std::string check_utf8(std::string const &s) {
for (size_t i = 0; i < s.size(); i++) {
size_t fail = 0;
if ((s[i] & 0x80) == 0x80) {
if ((s[i] & 0xE0) == 0xC0) {
if (i + 1... |
aea41478e547774a743224f744cd41cfa6319831 | f45f883089885efcc16dab56e4568ae6f035f8cc | zanzo420/SoT-SDK-CG | /Internal/SDK/BP_TT_RitualBone_functions.cpp | C++ | cpp | 867 | no_license | // Name: Sea of Thieves, Version: 2.2.0.2
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//-----------------------------------------... |
ab8088caf1927eb5fd1f04e57f5a12e5837dc795 | 659cdb495f0234a6b1ffb2cc646a7d81c9f087e1 | YanjiaSun/leetcode-3 | /code/540_solution.cpp | C++ | cpp | 409 | no_license | // 0 1 2 3 4 5 6 7 8
// [3,3,7,7,10,11,11,5,5]
// 1 1 1 1 2 3 3 3 3
// 1 2n, 2n+1
// 2 2n
// 3 2n-1, 2n
// m ^ 1
class Solution {
public:
int singleNonDuplicate(vector<int>& nums) {
int l=0, h=nums.size()-1;
while (l < h) {
int m = l + (h - l) / 2;
if (nums[m] == n... |
4ea2941db946fa3fd4421bb0e6b9ef79f8c33b9b | 63d3161d8265999674fb0d8428dd491a5469b9ab | 7UR7L3/DataStructures | /Lab2 - Files, Array of Struct, & stringstream/Lab2.cpp | C++ | cpp | 1,224 | no_license | // g++ -Wall -std=c++11 -o exec Lab2.cpp && ./exec
//#pragma once // Equivalent to header guards.
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstddef>
#include <vector>
#include <algorithm>
using namespace std;
struct Car
{
string model, make, year;
Car( string mo, string ma, string ye )... |
173ce4491c482efa0cb519c8e6e974f1e4056281 | d941f0453f6d00a2dff02fc7a2d9df03ddb82f52 | Team-CTK/Training | /2017Training/8.12/1004E.cpp | C++ | cpp | 3,019 | no_license | #include<cstdio>
#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
#include<map>
#include<cmath>
#include<vector>
#include<stack>
#include<climits>
#include<ctime>
#include<queue>
#define FILEIN freopen("in.txt", "r", stdin)
#define FILEOUT freopen("out.txt", "w", stdout)
#define CLOSEIO ios::sy... |
5265b28e7f8cc32ce470bb2629a9252d4e79884a | 7182a358ac7e04eaae2f1c14fac5b9e99b2f5757 | enaim/Competitive_Programming | /CODEFORCES/Round #696 (Div. 2)/A. Puzzle From the Future.cpp | C++ | cpp | 2,695 | no_license | #include <map>
#include <set>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <bitset>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <sstream>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <algorithm>
using namespace std;
#defi... |
cbc9858d8cb547435add0fe5062a4f4b782f1592 | 79dc7bcceabdda39d4590ebe3fccd5746777ee25 | michielglibert/gevorderdealgoritmen | /TEST2_Opnieuw/Huffmancodering/main.cpp | C++ | cpp | 765 | no_license | #include <iostream>
#include "bitstream.h"
#include "binairetrie.hpp"
#include "stringmetbits.h"
void codeerBestand(const char *bronBestandsNaam, const char *doelBestandsNaam, char *codeBestandsNaam)
{
BinaireTrie trie(bronBestandsNaam);
trie.teken("huffmantrie");
Bincode code = trie.geefCode();
trie.s... |
591315c128e82b645e64cba07b46da9f79b8611e | 44847d9428721427231fd333666b80536a426a3d | JakKopec/Algorithms-data-structures-and-numerical-methods | /Numerical-methods/Interpolacja Lagrangea/InterpolacjaLagrangea.cpp | C++ | cpp | 1,894 | no_license | #include<iostream>
#include<fstream>
#include<string>
#include<stdlib.h>
using namespace std;
void interpolacja_lagrangea(void)
{
fstream file;
file.open("InterpolacjaLagrangea.txt",ios::in);
if(file.good()==false)
{cout<<"Blad pliku tekstowego!\n";}
string temp;
int ilosc_wezlow;
file>>i... |
e21b45ea26ca939036e3a2ed0475c1fc0d93a08f | 8b3d12dcd700db10784c98edb552d7e5d94c50ea | CamiWilliams/pytorch | /aten/src/TH/generic/THTensor.cpp | C++ | cpp | 16,119 | permissive | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "TH/generic/THTensor.cpp"
#else
#include <ATen/InferSize.h>
#include <ATen/NativeFunctions.h>
#include <new>
#include <ATen/NamedTensorUtils.h>
#include <ATen/MemoryOverlap.h>
/**** access methods ****/
THStorage *THTensor_(storage)(const THTensor *self)
{
return THTe... |
12fe14e23885806bcbf322f7d21a5b34c985e96d | 833cf70ccf330a330ce7b72260bde923f62b03a8 | Yuruh/R-Type | /server/src/Game/Collision/CollisionManager.cpp | C++ | cpp | 1,161 | no_license | //
// Created by ossalag on 11/12/16.
//
#include <iostream>
#include <Entities/ANonPlayable.hpp>
#include "CollisionManager.hpp"
CollisionManager::CollisionManager()
{
}
CollisionManager::~CollisionManager()
{
}
uint32_t CollisionManager::checkCollision(AEntity const &player, std::vector<ANonPlayable *> const &en... |
81a8bfd86fc54e3df76c2c1f62b9afe8a6382827 | 11b096e7516049c6c0999411ad73a6ef351237db | oconnellamethyst/csci1113 | /C_C++/examples/shapes2/triangle.cpp | C++ | cpp | 928 | no_license | /* FILE: ./shapes2/triangle.cpp */
#include "triangle.h"
triangle::triangle(point p1, point p2, point p3)
{
setTriangle(p1.getX( ), p1.getY( ), p2.getX( ), p2.getY( ), p3.getX( ), p3.getY( ));
}
triangle::triangle(int px1, int py1, int px2, int py2, int px3, int py3)
{
setTriangle(px1, py1, px2, py2, px3... |
073925bf12f17d91d9d4a99eb800f1c8c7aa2a2f | 1746ef6f96eff9a210b6abac69608e9327dbac4b | Luckily777/C- | /C++OneClass04.cpp | C++ | cpp | 847 | no_license | #include <stdio.h>
#include <iostream>
using namespace std;
//函数重载
//函数名相同,参数不同,且在同一个作用域,C++支持,C不支持
//如果单纯只是返回值不同的话,不能够构成函数重载
int Add(int a = 1, int b = 2) {
return a + b;
}
float Add(float a, float b) {
return a + b;
}
int Add(int a, int b ,int c) {
return a + b + c;
}
int Add(char a, char b) {
return a + b;
}... |
84c39c1953f5ee51ee1ff6f250c6ffc9b768327b | 9fd87041ea2aabdfd6b9d9bdb20a271a949be895 | otilrac/okteta | /kasten/controllers/view/poddecoder/types/utf8.hpp | C++ | hpp | 650 | no_license | /*
This file is part of the Okteta Kasten module, made within the KDE community.
SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <kossebau@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#ifndef KASTEN_UTF8_HPP
#define KASTEN_UTF8_HPP
// Qt
#incl... |
67e3203b2fb19e88f8dd92c544905edb89562ff4 | 0b8e995c19fad33f23c72f9f5df194d5096ff0e0 | foolcodemonkey/chromium | /chrome/browser/ui/webui/favicon_source.cc | C++ | cc | 10,048 | 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/ui/webui/favicon_source.h"
#include <cmath>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/metrics/hi... |
319cc028b65c03584f5ac342f22a0d269feb6571 | 2070e71c98488bec1966412e77d33ef4e43fddda | mdturnerinoz/opengl | /tutorial1/Part5/Lesson21/game.cpp | C++ | cpp | 14,118 | no_license | /* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*... |
d7db4bcc2c2d7ee13ac26215e7f227472a95e55a | b0ea1dbe0ec083eead7cd21e388a58d899b30073 | fareast170/mp2-lab2-matrix | /test/test_tmatrix.cpp | C++ | cpp | 3,701 | no_license | #include "utmatrix.h"
#include <gtest.h>
TEST(TMatrix, can_create_matrix_with_positive_length) {
ASSERT_NO_THROW(TMatrix<int> m(5));
}
TEST(TMatrix, cant_create_too_large_matrix) {
ASSERT_ANY_THROW(TMatrix<int> m(MAX_MATRIX_SIZE + 1));
}
TEST(TMatrix, throws_when_create_matrix_with_negative_length) {
ASSERT_ANY_... |
c8940e353fcfbe5166ffa15cf50b34cabbbf50e1 | b7c87d1f264669363c6ff13df1d660b99e08a7d1 | JY1Lnz/AKOJ | /2647.cpp | C++ | cpp | 595 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
//ifstream cin("test.in");
int n;
cin>>n;
int data[n];
for (int i = 0;i<n;i++)
cin>>data[i];
int key;
for (int i = 0;i<n;i++)
{
key = data[i];
//cout<<key<<' ';
int j = i-1;
for (;j>=0;j--)... |
7b548e0dbae9020d3e48e0cfa90dc09a1311b000 | ee36b5418a2e9d0a23700e899d8a229e1ed02100 | MaxCosta0/CompetitivePrograming | /Neps/Fibonacci.cpp | C++ | cpp | 392 | no_license | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int>> vpii;
typedef long long ll;
int N;
int fib(int x){
if(x == 0) return 0;
if(x == 1) return 1;
return fib(x-1) + fib(x-2);
}
int main(){
ios::sync_with_stdio(fa... |
4921ca483c832347b450cce749f6128a3d5bd4ff | c86db89ca4bd93af0fa927338b10c666a9f2477e | xzjqx/TemplateCode | /质因子分解.cpp | C++ | cpp | 231 | no_license | vector< pair<int,int> > v;
void get_pp( int n ) {
v.clear();
for( int i = 2; i * i <= n; i ++ ) {
int cnt = 0;
while( n % i == 0 ) {
n /= i;
cnt ++;
}
if( cnt != 0 ) {
v.push_back(make_pair(i,cnt));
}
}
}
|
f8f407d033823405961d23ad82c13f54393ab538 | 46a5b61ecbbfa2f5e56c2d640ba01156f49c917c | IgorDzreyev/cefeika | /lib/dmitigr/pgfe/connection_options.cpp | C++ | cpp | 24,716 | permissive | // -*- C++ -*-
// Copyright (C) Dmitry Igrishin
// For conditions of distribution and use, see files LICENSE.txt or pgfe.hpp
#include "dmitigr/pgfe/connection_options.hpp"
#include "dmitigr/pgfe/defaults.hpp"
#include "dmitigr/pgfe/implementation_header.hpp"
#include <dmitigr/util/debug.hpp>
#include <dmitigr/util/ne... |
c77120a32027c46c2bc189a41fce82d97b9d7259 | 902bcc74e1862b4872b72bc9603a11a4f5ee441f | themaplelab/swift | /lib/IRGen/GenProto.cpp | C++ | cpp | 120,620 | permissive | //===--- GenProto.cpp - Swift IR Generation for Protocols -----------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
829af1a81e0e2b28ad56c849ba4f8d822f8ae67a | 14f7e7f0bfa4e1e62bd52f80d9d6ac730419aa24 | mobius/Play- | /Source/ui_win32/MainWindow.cpp | C++ | cpp | 26,473 | permissive | #include <stdio.h>
#include <boost/lexical_cast.hpp>
#include <iomanip>
#include <functional>
#include "string_format.h"
#include "string_cast.h"
#include "StdStreamUtils.h"
#include "PathUtils.h"
#include "win32/FileDialog.h"
#include "win32/AcceleratorTableGenerator.h"
#include "win32/MenuItem.h"
#include "win32/DpiU... |
c05a56cc1b3baf39448e176ccce0b6142fe01c0b | 3eb778abde87f53771c9a7fe441b87c74845d276 | houyideng/ogitor | /qtOgitor/src/main.cpp | C++ | cpp | 13,995 | permissive | /*/////////////////////////////////////////////////////////////////////////////////
/// An
/// ___ ____ ___ _____ ___ ____
/// / _ \ / ___|_ _|_ _/ _ \| _ \
/// | | | | | _ | | | || | | | |_) |
/// | |_| | |_| || | | || |_| | _ <
/// \___/ \____|___| |_| \___/|_| \_\
/// ... |
e1233a02a66c3524d84aa6c2f1c1982309386895 | 9c1a48eb6a28f2731604ba76cecd5a95b96b17e0 | alexandraback/datacollection | /solutions_2463486_1/C++/a180285/GCJ.cpp | C++ | cpp | 2,676 | no_license | /*****************************************
USER: zacdxv1
PROB:
LANG: C++
2013,USACO
*****************************************/
# include <math.h>
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
# include <algorithm>
# include <iostream>
# include <string>
# include <queue>
# include <stack>
# include <m... |
2ced9f705d83864585138ed2d69fa093f8b208fe | e43acb04670f207a3a36993ea053eed2eec5e788 | luanorlandi/codingame-sdk | /src/practice/TheResistance.cpp | C++ | cpp | 10,557 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <ctime>
using namespace std;
enum Morse {
dot,
dash,
root
};
class Trie {
Trie *pred;
Trie *childDot;
Trie *childDash;
Morse morse;
long combinations;
publ... |
7fcc48faee065a964f6a8266e1060a5c3b69b70f | 93729a5757c73c9f37b0fb724944efcfe0439172 | wdvxdr1123/ACM | /Round3/B.cpp | C++ | cpp | 666 | no_license | //Created by Visual Studio Code
//Author: wdvxdr
//Date: 2020-03-04 15:16:11
#include<bits/stdc++.h>
using namespace std;
const int maxn =1e2+7;
int n,m,p[maxn],h[maxn],c[maxn],dp[maxn];
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
memset(dp,0,sizeof(dp));
scanf("%d%d",&n,&m);
... |
e257f9e4d1a4ecc049138f439e1ff529aa77f756 | 849cff0d7aedc8456b4b70f4fab68d0556fcb699 | hbdhj/spoj-cpp | /14972_UOFTAC.cpp | C++ | cpp | 1,856 | no_license | /*
TASK: Foxhole
Input:
2
2 3 4
DDD
TES
R
D
R
L
3 2 6
TE
TE
ET
R
R
L
R
L
R
Output:
1
2
*/
#include <stdio.h>
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int h, w, s;
cin>>h>>w>>s;
vector<string> underground(h);
for(int i=0; i<h; i++)
{
cin>>... |
039c812a4920bd4f5e0427d50a6a7720e0918c78 | d28774f213f683bacd56d721dacdd8c47a76f970 | lwyoo/liveBackGround | /imageScaled/imagecontrol.cpp | C++ | cpp | 4,611 | no_license | #include "imagecontrol.h"
//#include <QDebug>
#include <QImage>
#include <QtWidgets>
#include<math.h>
ImageControl* imageControlInstance;
ImageControl::ImageControl(QObject *parent)
: QObject(parent)
, cImgPath(NULL)
, mNaturalImgWidth(0)
, mNaturalImgHeight(0)
, mReviseLevel(0)
, mlb(NULL)
{
... |
03e49d5ac2ebbc63c0b5fbe384057fa356f7a58f | f98174afd8a783ce8b7e2b8d6bb57d9879d3ee5b | loujc/shufflenetv2_hls | /shufflenetv2_final_solution/acceleartor_hls_final_solution/optimize_conv1/syn/systemc/fc.cpp | C++ | cpp | 64,553 | no_license | // ==============================================================
// RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2017.2
// Copyright (C) 1986-2017 Xilinx, Inc. All Rights Reserved.
//
// ===========================================================
#include "fc.h"
#include... |
40f1a9076c3c1ad0807f2f5d9947bbcdb4112ff3 | 1ac3e33f65059033cd66e33be2587ec730ad089b | XH4869/PatternRecognition | /BayesianClassifier/PR/PR/PRView.cpp | C++ | cpp | 6,460 | no_license |
// PRView.cpp : CPRView 类的实现
//
#include "stdafx.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "PR.h"
#endif
#include "PRDoc.h"
#include "PRView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CPRView
IMPLEMENT_DYNCREATE(CPRView, C... |
34a2ced9243a74ed4fa3deec1a53eacbdf4f3beb | 474fff234fdb7b8f571cf3c750d2abf0eb6e049e | JoshuaBatty/ofxClickDownMenu | /ofxClickDownMenu_Kortex2/src/ofApp.cpp | C++ | cpp | 3,194 | permissive | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetVerticalSync(true);
ofSetFrameRate(60);
ofSetCircleResolution(40);
ofEnableBlendMode(OF_BLENDMODE_ALPHA);
// for(int j = 0; j < 3; j++){
// for(int i=0; i < 3; i++){
// I... |
a2e68f2d5f7254aa4e53a5d19e59449dc0c1bfe1 | 74e6a3aae1e6b3c059a52e95326c019daf10aa64 | zohra051/INFORMATIQUE-GRAPHIQUE | /TP3/src/Camera.cpp | C++ | cpp | 1,662 | no_license | // HARRAT Zohra & DENIS Jimmy
#include "Camera.hpp"
Camera::Camera():
position(Point(0,0,2)),centre(Point(0,0,0)),distance(2)
{}
/*obtention de la position, du centre et de la distance de la caméra */
Point Camera::getPosition() const
{return position;}
Point Camera::getCentre() const
{return centre;}
float Cam... |
f13e54306fb42cb9800f631089146f39ee288522 | 1318e6fe91b78ab94eb8a1d27805a2e1bc487c47 | Evandar1974/Unreal-04_BattleTank | /BattleTank/Source/BattleTank/Private/TankAIController.cpp | C++ | cpp | 1,195 | no_license | // copyright MCo 2016
#include "BattleTank.h"
#include "TankAimingComponent.h"
#include "TankAIController.h"
#include "Tank.h"
void ATankAIController::BeginPlay()
{
Super::BeginPlay();
}
void ATankAIController::SetPawn(APawn* InPawn)
{
Super::SetPawn(InPawn);
if (InPawn)
{
auto PossessedTank = Cast<ATank>(InPa... |
b2ce8e404453432c3ab0aaf8b0391b6c15b041b5 | 16a14e6bc70069e80a08cde701a7f325876725d5 | yujiantao/ClickHouse | /dbms/src/DataStreams/tests/filter_stream.cpp | C++ | cpp | 2,873 | permissive | #include <iostream>
#include <iomanip>
#include <IO/WriteBufferFromOStream.h>
#include <IO/ReadHelpers.h>
#include <Storages/System/StorageSystemNumbers.h>
#include <DataStreams/LimitBlockInputStream.h>
#include <DataStreams/ExpressionBlockInputStream.h>
#include <DataStreams/FilterBlockInputStream.h>
#include <Form... |
58e9d5e87e8b3c64dcda17f3c22dd28cf3bbc3bc | ad6deffc3a7d7e8960c602a95b51e307260cb207 | gavinband/qctool | /genfile/test/test_sample_filtering_cohort_individual_source.cpp | C++ | cpp | 3,331 | permissive |
// Copyright Gavin Band 2008 - 2012.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include "test_case.hpp"
#inc... |
3e50008b2608562612628cc45789beab17bfde01 | 27eae2ebb8652b574e7faaa57d73d0c049660b25 | remoe/bsf | /Source/Plugins/bsfRenderBeast/BsRendererParticles.cpp | C++ | cpp | 14,235 | permissive | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
#include "BsRendererParticles.h"
#include "Particles/BsParticleManager... |
366c9be3eb32f7a839f212c8b2ddd5e43fd13ee0 | e567280cbcb365da89f5c6e2e3d70da32aa002ce | kgarner006/Halatafl | /tests/testSheepMoveNonExistent.cpp | C++ | cpp | 1,873 | no_license | #include "manager.h"
#include <assert.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
// This function will call the manageTestGame function with an input stream.
int main(int argc, char** argv)
{
//// Call the manageTestGame function to retrieve the game status... |
e289eb38dd2673d55dfe1ef1d8167d0db472fa95 | 1c9ef9d138087697d9778f90ccc2aebe6d83638d | denfrost/UE4_SDK_DUMP | /PUBG_ScreenSettingWidget_classes.hpp | C++ | hpp | 5,049 | no_license | #pragma once
// PLAYERUNKNOWN'S BATTLEGROUNDS (2.4.24) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace Classes
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// WidgetBlueprintGener... |
fbe1bcf3b59d925480079fe1c1f4bca1f81d2866 | 8f830006decbeecdadcdd3719dd6cd71d534fd38 | uael/42piscine | /cpp/d01/ex06/Weapon.cpp | C++ | cpp | 230 | no_license | #include "Weapon.hpp"
zob::Weapon::Weapon(const std::string &type) : type(type) { }
const std::string &zob::Weapon::getType() const {
return type;
}
void zob::Weapon::setType(const std::string &type) {
Weapon::type = type;
}
|
17fcc08be9b3821c8bfa529fffb23af24d046a4f | 03ccb32064b41000dd71c22696f0f9a2f85bc847 | ml200586/PAMSI | /prog4/prj/src/funkcje.cpp | C++ | cpp | 4,583 | no_license | #include "sortowanie.hh"
/*!
* \file
* \brief Modul zawierajacy definicje funkcji mnozenia oraz przeciazen
* operatorow dla vectora.
*
*/
ostream& operator << (ostream &out, const Wektor L)
{
for(vector<int>::const_iterator Iter = L._wektor.begin(); Iter < L._wektor.end(); ++Iter)
out << *Iter <<... |
c8d4c060a1fe58d5eedbf13828ce054f11da84d7 | 4bb4cfd886877ecf7e60d6b99644f99ba0592168 | AidanFray/GreenOnion | /crypto/sha1.cpp | C++ | cpp | 5,588 | no_license | /*
sha1.cpp - source code of
============
SHA-1 in C++
============
100% Public Domain.
Original C Code
-- Steve Reid <steve@edmweb.com>
Small changes to fit into bglibs
-- Bruce Guenter <bruce@untroubled.org>
Translation to simpler C++ Code
-- Volker Diels-Grabsc... |
55ef0302ccb060e2e946fcf17e69c8ab8b9eb483 | da88b9eeece21bcaf037cff39f2ceb2d2451d296 | jdoerfert/f18 | /lib/semantics/scope.cc | C++ | cc | 9,727 | permissive | // Copyright (c) 2018-2019, NVIDIA CORPORATION. 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 req... |
20d9b715a0e61efe72eb0c422564bd077888b631 | 598fa3e7d1eca3112962cf7f463dc02256cf1923 | JohanMabille/boost.simd | /bench/function/scalar/if_else/regular.int32_t.m10_10_m10_10_m10_10.cpp | C++ | cpp | 862 | permissive | // -------------------------------------------------------------------------------------------------
// Copyright 2017 - NumScale SAS
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at
// ... |
a3bf32d1bec91369d970c0426a8c162062b997d6 | 7a9a790c5be331132a634373aaebb719ed4cdc60 | JohnLKkk/angle | /src/libANGLE/Surface.cpp | C++ | cpp | 23,285 | permissive | //
// Copyright 2002 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Surface.cpp: Implements the egl::Surface class, representing a drawing surface
// such as the client area of a window, including any back bu... |
474c6492baf952ad9cbbbf93da90cb4d4436d2d5 | 7de0defb667c6730a3a138127c6252d02cd42de1 | alexandraback/datacollection | /solutions_1674486_1/C++/Invader/diamond.cpp | C++ | cpp | 1,208 | no_license | #include<iostream>
#include<vector>
#include<queue>
using namespace std;
int main()
{
int notime;
cin>>notime;
for(int caseno=1;caseno<=notime;caseno++)
{
int n;
cin>>n;
vector<vector<int> > adjlist;
adjlist.resize(n+1);
for(int i=1;i<=n;i++)
{
int no;
cin>>no;
while(no--)
{
int temp;
cin>>temp;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.