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 |
|---|---|---|---|---|---|---|---|---|
689702f1469c894b4c3be519749ab4c8b69011c8 | d666825420bbdba48e5f457a5ccd47003bb4b239 | bhumitra/columbine-mod-doom | /zdoom-2.7.1-src/src/p_lnspec.cpp | C++ | cpp | 82,552 | no_license | /*
** p_lnspec.cpp
** Handles line specials
**
**---------------------------------------------------------------------------
** Copyright 1998-2007 Randy Heit
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following condi... |
94535caff76093d1595e54a54f092539ea3bf08b | 7c8e000e3d5c6617a61ae878eccb890e5c4e4bf4 | adirkuhn/lib-iec61850 | /Part7/CommonDataClasses/FCDAs/Severity_ST.cpp | C++ | cpp | 369 | no_license | ///////////////////////////////////////////////////////////
// Severity_ST.cpp
// Implementation of the Class Severity_ST
// Created on: 15-Apr-2014 2:52:46 PM
// Original author: adirkuhn
///////////////////////////////////////////////////////////
#include "Severity_ST.h"
Severity_ST::Severity_ST... |
398b8c8ccb94114a1bb6c0276ae031885e8306bf | d83f9877cfec83b1c28bb0332155b75d2afc6122 | jtomar24/100-days-of-code | /Day 38/Binary Search.cpp | C++ | cpp | 977 | no_license | #include <bits/stdc++.h>
using namespace std;
// C++ program to implement recursive Binary Search
// A recursive binary search function. It returns
// location of x in given array arr[l..r] is present,
// otherwise -1
int binarySearch(int arr[], int l, int r, int x)
{
if (r >= l) {
int mid = l + (r - l) / 2;
/... |
9c535ca276a7db8d2b9be959f8d23f947deaf438 | fc370222722706bd776619afa273932d48e67eac | liyancas/Paddle | /paddle/fluid/operators/mkldnn/expand_v2_mkldnn_op.cc | C++ | cc | 6,320 | permissive | /* Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
b3d074de97f8c107fb3a88c03b47d1a3a1f24894 | 30343233b75276cd67f81013c77d786d9fce985f | thegamer1907/Code_Analysis | /Implementation/1708.cpp | C++ | cpp | 319 | no_license | #include<iostream>
#include<string>
using namespace std;
int main ()
{
string s;
cin>>s;
size_t pos,pos1;
pos=s.find("0000000");
pos1=s.find("1111111");
if(pos != string::npos)
cout<<"YES";
else if(pos1 != string::npos)
cout<<"YES";
else cout<<"NO";
return 0;
}
|
42e512c8bc8ca732c56b19817e12f88938ece974 | bf552c9cc5b5e8439d39566c9ab5862587f4fac0 | fzn7/rts | /tools/output/stubs/Lua/LuaUnsyncedCtrl_stub.cpp | C++ | cpp | 25,156 | no_license | #include <iostream>
/* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
#include "LuaUnsyncedCtrl.h"
#include "LuaHandle.h"
#include "LuaHashString.h"
#include "LuaInclude.h"
#include "LuaOpenGLUtils.h"
#include "LuaTextures.h"
#include "LuaUtils.h"
#include "ExternalAI/EngineOutHandler.... |
8a470d17de82ce9f063174a071ccc928047dde29 | 1b74f7db6b7c656fbfb48be61b481d47014af1a8 | susheelgupta7/codes | /dijkstra.cpp | C++ | cpp | 1,013 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define INF 0x3f3f3f3f
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL)
vector <pair<int,int>> graph[100005];
bool visited[100005];
ll dist[100005],V;
void Dijkstra(int vertex)
{
for(int ... |
37145c3f17f2376124bcc081e92d4b03bd2ec64e | 86f081cf6eb83e3c1d310288be1a48d22abbb238 | bmildner/aws-sdk-cpp | /aws-cpp-sdk-rds/source/model/DeleteOptionGroupRequest.cpp | C++ | cpp | 1,192 | permissive | /*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file... |
0bdc0406ade9a7abff20bdbd1b10230eaab15956 | 19ac4b5c0fbd5d59b244015ca5ff2bf2d2a7c048 | sunnyqueen/peercoin | /src/qt/walletview.cpp | C++ | cpp | 12,625 | permissive | // Copyright (c) 2011-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/walletview.h>
#include <qt/addressbookpage.h>
#include <qt/askpassphrasedialog.h>
#include <qt/bitcoingui.h>
#i... |
00c86f8c4a02c274c6b6b0a8758348db156c061f | ac8c3a62763c295b70ab7dd63fbd4087d97e3dc4 | mengtest/Mahjong | /Classes/Net/command/SendNetWork.cpp | C++ | cpp | 2,927 | no_license | //
// SendNetWork.cpp
// Mahjong
//
// Created by tiki on 14/10/31.
//
//
#include "SendNetWork.h"
#include "Net/data/NetData.h"
#include "Tools/HMessage.h"
#include "CommonCommand.h"
//#include "RequestEnterGame.h"
//#include "MThread.h"
using namespace std;
SendNetWork::SendNetWork()
:isRuning(false)
,isRunHead... |
d4856b78f5f5d638a94bb466bac3232b250b0ec6 | c23bf9287585f3ac01e3a7d253bf11e05f45eef1 | mnewhouse/tselements | /src/resources/start_point.hpp | C++ | hpp | 317 | permissive | /*
* TS Elements
* Copyright 2015-2018 M. Newhouse
* Released under the MIT license.
*/
#pragma once
#include "utility/vector2.hpp"
namespace ts
{
namespace resources
{
struct StartPoint
{
Vector2i position;
std::int32_t rotation = 0; // degrees
std::uint32_t level = 0;
};
}
}
|
8a370f1bceba0f83a441d51bca8318d0819dc72d | 88089c443fb098418a876b0b9e768fd56c6e05f9 | alexisylchan/KinectArray | /src/SensorDevice.cpp | C++ | cpp | 1,468 | no_license | // SensorDevice: Abstract class to encapsulate OpenNI devices
#include <iostream>
#include "SensorDevice.h"
SensorDevice::SensorDevice(){}
SensorDevice::~SensorDevice(){}
void SensorDevice::AlignSensors()
{
XnStatus nRetVal = XN_STATUS_OK;
//Align depth image to RGB Camera image
XnBool isSupported = depthG_.... |
2c321c3400d6d0d9ba01f7ecf08286c84bf9b14a | 7d7fcf274290e61bb3c52e5c139ce6956cc2d103 | ezhangle/XieXie-2 | /sources/Compiler/Optimizer/CopyPropagation.cpp | C++ | cpp | 3,503 | permissive | /*
* CopyPropagation.cpp
*
* This file is part of the "XieXie 2.0 Project" (Copyright (c) 2014 by Lukas Hermanns)
* See "LICENSE.txt" for license information.
*/
#include "CopyPropagation.h"
#include "TACCopyInst.h"
#include "TACModifyInst.h"
#include "TACRelationInst.h"
#include "TACReturnInst.h"
#include "TAC... |
2596e5f3dfea9f843eed5f4060a0f85124437616 | 430eba0b35567dbf005adedd9daae5067829b683 | zhoujiayingvana/TMZPlayer | /TMZPlayer/build/debug/moc_historicalcontent.cpp | C++ | cpp | 7,465 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'historicalcontent.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.2)
**
** WARNING! All changes made in this file will be lost!
**************************************************... |
df83c01bad54a8bbd4b28981ac7dae514a8c270a | b2d279bc94b57ad9692de796723e6f4a132c1f7a | Oldes/npp-community | /scintilla/tests/testBase.cpp | C++ | cpp | 983 | permissive | // This file is part of notepad++
// Copyright (C)2010 The Notepad++ Team
//
// 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 2 of the License, or (at your option) any later ... |
ca2880a46ae4a310389d933296eb1bdb536c6af9 | 6c338239c7dfe91167800eeeddc396fd655125e8 | Alon-Katz/Robotics-Final | /BehaviorsProj/Location.cpp | C++ | cpp | 712 | no_license | /*
* Location.cpp
*
* Created on: 10 July 2015
* Author: Liron Bilya, Yaron Elhadad, Ran Amar
*/
#include "Location.h"
Location::Location()
{
this->_x = 0;
this->_y = 0;
this->_yaw = 0;
}
Location::Location(double x, double y, double yaw)
{
this->_x = x;
this->_y = y;
this->_yaw = yaw;
}
Location::... |
d4ba4ad7f13f2118f85f080da3d322c5b231494d | e671105d8443a22e2047f4af8bf449f066c9a4d0 | 15831944/barry_dev | /src/TorturerExamples/Tester/main.cpp | C++ | cpp | 1,725 | no_license | ////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2005
// Packet Engineering, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification is not permitted unless authorized in writing by a duly
// appointed officer of ... |
c3cba781810a408c4f3665bdf8ffa85b0e32199e | cb5087037a40b1fd099083f26d24494170cc653e | CCNYRoboticsLab/cata | /cata_simulation/simple_simulation/src/simulation_odom_test.cpp | C++ | cpp | 13,505 | no_license | // odom_test.cpp
// ======================================================================
// Assignment # 1 - Estimating robot’s position and ICC from differential drive
//
// Written by: Carlos Jaramillo
// G3300 Advanced Mobile Robotics (Spring 2011, Prof. Jizhong Xiao)
//
// ========================================... |
b29f01374a66be4506e411099f1efe2e96ac5b4f | 1f174b131c7d4ad5252f7803a8b0c3f76be3a293 | at-wat/neonavigation | /track_odometry/test/src/test_tf_projection_node.cpp | C++ | cpp | 3,687 | permissive | /*
* Copyright (c) 2019, the neonavigation authors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, ... |
f9a76ba6b99ec787b8ff7da9c531e5065f8874e2 | e8375429de6f2e6aad4fbf210adffef06592be1e | romanheros/Ripes | /test/tst_riscv.cpp | C++ | cpp | 6,469 | permissive | #include <QDir>
#include <QProcess>
#include <QStringList>
#include <QtTest/QTest>
#include "processorhandler.h"
#include "processorregistry.h"
#include "assembler/rv32i_assembler.h"
#ifndef VSRTL_RISCV_TEST_DIR
static_assert(false, "VSRTL_RISCV_TEST_DIR must be defined");
#endif
/** RISC-V test suite
*
* For now... |
545a0b0d52a47e8482fbe20f66b6258b8eeeef93 | ba9118e5e5cdcc15fcec32b8f9bd891393b36ab6 | victoraavila/robotica_ufu | /src/movement/movement_util/src/State.cpp | C++ | cpp | 945 | no_license | #include "movement_util/State.h"
JointState::JointState()
{
}
JointState::JointState(int nJoints,int type,int source)
{
this->nJoints = nJoints;
pos = Eigen::VectorXd::Zero(nJoints);
vel = Eigen::VectorXd::Zero(nJoints);
acc = Eigen::VectorXd::Zero(nJoints);
torq = Eigen::VectorXd::Zero(nJoin... |
5fab2700fd60cda3bb01dfba4c471078e91f7ada | 7e42ea25d8e007b8d4ed052c3b2389fd5c88ba27 | zhenqin95/FBGEMM | /fbgemm_gpu/src/permute_pooled_embedding_ops_gpu.cpp | C++ | cpp | 5,419 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <ATen/ATen.h>
#include <ATen/Parallel.h>
#include <ATen/core/op_registration/op_registration.h>
... |
f92cbad8319d07f577e303910206a8fc9f979e41 | b7ff3e0ae3b1869bda999715531c978dc29be476 | space2/NodeEditor | /src/core/Slot.cpp | C++ | cpp | 1,787 | no_license | /*
* Slot.cpp
*
* Created on: Mar 22, 2014
* Author: Pal Szasz <pal.szasz@gmail.com>
*/
#include <string.h>
#include <stdlib.h>
#include "Slot.h"
Slot::Slot(const char * name)
: _type(Undefined), _name(strdup(name)), _changed(0), _int_val(0), _float_val(0)
{
}
Slot::~Slot()
{
free(_name);
}
void Slot:... |
ad35cd09bb17d98066b73afeadd33f6de17ae2df | 81c3ac387c3c63ce5483b512de7eb713700f5cea | cramja/quickstep | /query_optimizer/rules/TopDownRule.hpp | C++ | hpp | 2,988 | permissive | /**
* Copyright 2011-2015 Quickstep Technologies LLC.
* Copyright 2015 Pivotal Software, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org... |
0a5be8557a0d511f489bec24cbf0fbf40b54cd8b | 2d71e25d83dfd6ffd4c4dfb86f13b471755bb19d | anirul/ShaderGL-Classroom-7 | /ShaderGLTest/TextureTest.cpp | C++ | cpp | 3,626 | permissive | #include "TextureTest.h"
namespace test {
TEST_F(TextureTest, CreateTextureTest)
{
EXPECT_EQ(GLEW_OK, glewInit());
EXPECT_FALSE(texture_);
texture_ = std::make_shared<sgl::Texture>(
"../Asset/CubeMap/PositiveX.png");
EXPECT_TRUE(texture_);
EXPECT_NO_THROW(error_.Display());
}
TEST_F(TextureTest, Get... |
420201be627168e5fb43bc1e650b827b3e0045c9 | 1b2ed01637ea8371207837560d900b7dbeb8fdc0 | arduino731/ITSE-1307-Intro-to-C- | /6.1_Intro_to_Void_Functions/6.1_Intro_to_Void_Functions/6.1b_sample_Pass_by_Value.cpp | C++ | cpp | 1,587 | no_license | #include <iostream>
using namespace std;
// Function prototypes
void printDescription();
void calPaycheck(float, int);
int main()
{
float payRate;
int hours;
cout << "Welcome to the Payroll Program." << endl;
printDescription(); // Call to the printDescription function
cout << endl << "Please input the pay per h... |
8454f8d7e7609d14b8319135a6f36fb570295715 | 2c6532dab9fefc25950f2681b5965633da2ce333 | sheleg/AsyncNotificator | /test_single_message_thread_sync.cpp | C++ | cpp | 1,259 | no_license | #include"single_message_notifier.h"
#include "log_helper.h"
#include <set>
#include <iostream>
#include <cassert>
#include <iterator>
#include <algorithm>
#include <sstream>
constexpr int worker_call_count = 50;
constexpr int worker_sleep_in_milliseconds = 5;
constexpr int main_wait_in_milliseconds = 5000;
using noti... |
b9215d87f3984f2c0633be900b4c292b65696c09 | 53c60d48a674425e9241db579bb6efb64752bb71 | ilhamfp/competitive-programming | /Codeforce/982/a.cpp | C++ | cpp | 1,472 | no_license | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define _FAST ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
using namespace std;
int main()
{
int n;
cin>>n;
string s;
cin>>s;
bool one... |
6a86c1155e8b1b0b3def56e007cacf7c44a866ff | 9116554ce32d5686743216d568b2a94ce5f42034 | xccdev/cobaltcash | /src/netbase.cpp | C++ | cpp | 42,370 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-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.
#ifdef HAVE_CONFIG_H
#include "config/cobaltcash-config.h"
#endif
#include "netba... |
bf69a14a22e5da069f7fe41ea382f6e4d0f00b7d | f01cee8d86d90975fde716841b452a5b2cbea630 | stlcours/flexui | /include/flexui/Nodes/ContainerNode.hpp | C++ | hpp | 580 | permissive | #pragma once
#include <string>
#include "flexui/Nodes/Node.hpp"
namespace flexui {
// A ContainerNode allows nodes to hold other nodes
class ContainerNode : public Node {
public:
void appendChild(Node* child_node);
void removeChild(Node* child_node);
Node* getFirstChild() const { return m_FirstChild; }
... |
b0bdadda361abaa04c75bb64c05a9c875335895f | 7fb0f09d7f8ba49ed8c0a5bed95a1dca4c6b2531 | victor-anisimov/Umpire | /tests/integration/allocator_accessibility.cpp | C++ | cpp | 6,295 | permissive | //////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2016-20, Lawrence Livermore National Security, LLC and Umpire
// project contributors. See the COPYRIGHT file for details.
//
// SPDX-License-Identifier: (MIT)
////////////////////////////////////////////////////////////////... |
91d70dcb560cbc93a6216f264ebbb4717bd813ab | c628a16fc31d58ad6476d4f1eb6c0241d09d3b4f | jeffreyhanson/spThin | /src/rarefy_algorithm.cpp | C++ | cpp | 1,069 | no_license | #include <Rcpp.h>
// [[Rcpp::plugins(cpp11)]]
using namespace Rcpp;
#include <vector>
#include <algorithm>
#include <limits>
#include <random>
#include <chrono>
#include <string>
#include <iostream>
#include <cmath>
#include "functions.h"
#include "Random.h"
// [[Rcpp::export]]
Rcpp::List rcpp_rarefy_algorithm(Rcp... |
828a443fdfcc59769050be08be864305916ac8a3 | 9a913f70d17e2e92dff9edca1d18febb7a449b77 | Flip120/flywire-dev-learning-game-dev | /src/Game.cpp | C++ | cpp | 2,989 | no_license | #include <iostream>
#include <chrono>
#include "SDL.h"
#include "SDL_image.h"
#include "Entity.h"
#include "Game.h"
#include "core/Event.h"
Game::Game(int width, int height, const char* title){
this->m_LastTime = std::chrono::high_resolution_clock::now();
this->width = width;
this->height = height;
this->title... |
d1f60c443f44082b49d7e4fae227f1b5ceff9034 | 5276709a73ec67bcaf2ab952f41c795ee2820d2d | connectthefuture/psdmrepo | /PSXtcInput/tags/V00-15-03/src/XtcInputModuleBase.cpp | C++ | cpp | 22,951 | no_license | //--------------------------------------------------------------------------
// File and Version Information:
// $Id$
//
// Description:
// Class XtcInputModuleBase...
//
// Author List:
// Andrei Salnikov
//
//------------------------------------------------------------------------
//---------------------... |
e8df65ae4b2dee67c3d69bf7fcf627a8b1793cff | 6b5647aee4cb0c22818b64175c8aa6db835eb084 | Gimb0/UniversityWork | /ObjectOrientatedProgramming/Prac6/task6.1.cpp | C++ | cpp | 284 | no_license | #include <iostream>
using namespace std;
class someClass {
static int numOfObjects;
public:
someClass();
};
int someClass::numOfObjects = 0;
someClass::someClass() {
numOfObjects++;
cout << numOfObjects;
}
int main() {
someClass a;
someClass b;
someClass c;
return 0;
}
|
e6fafb1b8a15ec931e97fbc2b5fa1155e7ba88de | 29ecb47d484b3947d260b2af7c6fb631baa52f67 | Igorjan94/CF | /2022/snws5/C.cpp | C++ | cpp | 3,346 | no_license | // Igorjan94, template version from 13 October 2017. C++17 version, modified 18 march 2020 (writeln<tuple>, whole->all) {{{
#include <bits/stdc++.h>
#ifdef ONLINE_JUDGE
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#endif
using namespace std;
#define FOR(i, m, n) for (int i = m; i < (int) (n); ++i)
#define ROF(i,... |
6f956499053eb0598002f49b6c8984c4fd9db353 | bfc8e14673e001ee77b6365846c7be58eadf6f46 | random-builder/design_cadquery_ocp | /src-linux/BRepToIGES_pre.cpp | C++ | cpp | 2,430 | no_license |
// pybind 11 related includes
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
// Standard Handle
#include <Standard_Handle.hxx>
// user-defined inclusion per module before includes
// includes to resolve forward declarations
#include <IGESData_IGESEntity.hxx>
#include <TopoDS_Sha... |
297c6c23947b4768376136fb4e9e7f2ff81d1f46 | fdad5805309c2657b02f702d2336522a4c08a50c | moekaz/Heroes-Always-Die- | /Template/Sniper.cpp | C++ | cpp | 1,529 | no_license | #include "Sniper.h"
Sniper::Sniper(sf::SoundBuffer* buff)
{
type = 103;
position = sf::Vector2f(0, 0);
fireDelay = 0; //delay between shots
maxDelay = 200; //max delay reset value
damage = 70; //damage caused by weapon
textDirRight = "assets/gun05.png";
textDirLeft = "assets/gun06.... |
62764674b5e2b8740e76ffcf365505544ec7c19e | 4b2b6248e68b31501e3dc3f1cb403a938b0fc826 | thatoddmailbox/duck_hero | /gui_bg.cpp | C++ | cpp | 897 | permissive | #include "gui_bg.hpp"
namespace duckhero
{
GUIBG::GUIBG()
{
_bg_texture = nullptr;
_bg_rect = { 0, 0, 0, 0 };
_bg_x = 0;
}
GUIBG::~GUIBG()
{
if (_bg_texture)
{
SDL_DestroyTexture(_bg_texture);
}
}
bool GUIBG::Update(SDL_Renderer * r)
{
if (_bg_rect.w > 0)
{
_bg_x++;
if (_bg_x > _bg_r... |
4eea15983d21e28520aca6b47d17cc09aaf0a376 | 252444445a0f496e8795408cde2d53a733e999b5 | YukihoAA/araltrans02 | /Filter/FixLine/SubFunc.cpp | C++ | cpp | 4,733 | no_license | #include "stdafx.h"
#include "SubFunc.h"
void atoh(LPSTR szDest,LPCSTR szSource)
{
int nTemp=0;
while((BYTE)*szSource)
{
nTemp += sprintf_s(szDest+nTemp,STRLEN-nTemp,"%02X",(BYTE)*szSource);
szSource++;
}
}
string atoh(string strSource)
{
//±ÍÂú...
char szTemp[STRLEN]="";
atoh(szTemp,strSour... |
30deb55b113254714416e87d3737c48c87866809 | 1f49cc69cc8dd1f4e3674206448a834106cc5f4d | kyelin/ClanLib | /Sources/CSSLayout/PropertyValues/css_value_visibility.cpp | C++ | cpp | 2,175 | permissive | /*
** ClanLib SDK
** Copyright (c) 1997-2013 The ClanLib Team
**
** 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 a... |
2dc9f9656913d769edd2b9426bcc40761d08af53 | 5a02e67d18f5dc95439a1456743bac8e3ca8eab5 | lacrymose/3bem | /unit_tests/test_numbers.cpp | C++ | cpp | 414 | no_license | #include "catch.hpp"
#include "numbers.h"
using namespace tbem;
TEST_CASE("Range", "[numbers]") {
auto nats5 = range(-1, 8);
double correct[] = {-1, 0, 1, 2, 3, 4, 5, 6, 7};
REQUIRE_ARRAY_EQUAL(nats5, correct, 9);
}
TEST_CASE("Linspace", "[numbers]") {
auto vals = linspace(0.0, 1.0, 10);
REQUIRE(... |
101664e69c709058193d83589378b3ba0c0731db | bd463aece22880d258d0678b0b9088969a5b0901 | professorlineu/Exercicios_Resolvidos | /CPP/Estruturado/CAP03/EX2_B.CPP | C++ | cpp | 793 | no_license | #include <iostream>
#include <conio.h>
#include <iomanip>
#include <locale.h>
#include <cstdlib>
using namespace std;
int main()
{
float nota1, nota2, nota3, soma, media;
//Limpa a tela
system("cls");
// Ativa acentuação
setlocale(LC_ALL,"");
//Formata a saída para duas casas deci... |
a778d7d4b0502ce20eb478faafe0d1780cfd621f | 80902d13d12829d99cbbbae26737504d2ca0f8ea | PengJi/Algorithms | /weekly_contest/218/leetcode_5620_concatenation-of-consecutive-binary-numbers.cpp | C++ | cpp | 661 | no_license | /**
* 5620. 连接连续二进制数字
* https://leetcode-cn.com/problems/concatenation-of-consecutive-binary-numbers/
*/
class Solution {
public:
// https://leetcode-cn.com/problems/concatenation-of-consecutive-binary-numbers/solution/lian-jie-lian-xu-er-jin-zhi-shu-zi-by-ze-t40j/
int concatenatedBinary(int n) {
in... |
7dfbc006e7603d8fddbe42f377409c913c880817 | f5702470c92cd999650eff24a03280c2104f4d3e | DmytroMyloserdov/Codeforces-Problems | /327A.cpp | C++ | cpp | 753 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n; cin >> n;
bool a[n] = {};
int max_one = 0;
for (int i = 0; i < n; ++i)
{
bool t; cin >> t;
a[i] = t;
max_one += t;
}
if (n == 1)
{
cout << !a[0];
return 0;
}
if(n == max_one)
{
cout << n - 1;
return 0;
}
int dp[n][n] = {}... |
b9b2c5a19078661f2aa184f2e61310a5d5932865 | 08d00c557512ce2298fb19010fa0ee941b12dfc8 | lex16000/LBv1.2 | /src/functors/lattice/blockReduction2D2D.cpp | C++ | cpp | 1,086 | no_license | /* This file is part of the OpenLB library
*
* Copyright (C) 2018 Adrian Kummerländer
* E-mail contact: info@openlb.net
* The most recent release of OpenLB can be downloaded at
* <http://www.openlb.net/>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the ... |
2727148a5f2fe010e084fec24855fdc927d7af92 | a995534594d57ef2227d2892ba0f823c0434a8d2 | github-cloud-corp/aws-sdk-cpp | /aws-cpp-sdk-ssm/source/SSMClient.cpp | C++ | cpp | 39,130 | permissive | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file... |
a0e16b311c8c2452484f83ec8563ba27319ec5dc | bc30cb4b38bac7a4d0583af73b275fa784ff95a9 | TGier/TinyEngine | /TinyEngine/tinymath.cpp | C++ | cpp | 11,082 | no_license | #ifndef TINYMATH
#define TINYMATH
#include <cmath>
#include <vector>
#include <map>
// Forward references of each of the structs
struct Vector2D;
struct Matrix2D;
class TinyMath;
// Vector2D performs vector operations with 3-dimensions
// The purpose of this class is primarily for 2D graphics
// applications.
struct... |
bd83ca2e3adbecdd2f0a1e736d517d093855c1bf | 6631d5a1a1dcdbd947fb25ee42f7a8b0bd6125a7 | codesniper99/Coding-Competitions | /March Long Challenge 2.3.18/Chef and Easy queries/main.cpp | C++ | cpp | 2,374 | no_license | #include <iostream>
#include<stdio.h>
#include<bits/stdc++.h>
#define ll long long int
#define li long int
using namespace std;
struct element
{
ll no_of_zeros;
ll no_of_ones;
};
int main()
{
ios::sync_with_stdio(0);
ll n,q;
cin>>n>>q;
vector<ll>a(n);
for(ll i=0;i<n;i++)
ci... |
af045c1234cced6e1e8de6e811012d9ece4ced98 | b534a4d4c5c1eeeba59e8a8b11b267a4ef7af6e2 | baozibaoxinyu/baobaodaren | /CPlusPlus/17-fileIO/Exec_2.cpp | C++ | cpp | 658 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
using ulong = unsigned long long;
int main()
{
std::string filename{ "E:\\LearnC++\\16-fileIO\\exercise\\Exercise_File\\primes.txt" };
std::ifstream inFile{ filename };
if (inFile.fail()) {
std::cout << "Failed to open file." <... |
84735e3a24bb49798c8e51c74d58df0e66806e14 | 4d0ea8b9e9c3ad11b933077fb29d8f98c5e4b7e2 | elhmn/spaceInvaderLike | /src/Obstacle.class.cpp | C++ | cpp | 1,973 | no_license | // ************************************************************************** //
// //
// ::: :::::::: //
// Obstacle.class.cpp :+: :+: :+: ... |
d09d1ba49963a5aa22f358bb2a360604f01bf72f | e436a19a852e453d3125a86dd5967819ddd9e1fd | dilmanpreet/algorithms-data-structure | /lab11/CashPayment/CashPayment.cpp | C++ | cpp | 441 | no_license | // Author : Dilmanpreet nandu
// date: 22 November 2018
#include "CashPayment.h"
#include "Payment.h"
#include<sstream>
using namespace std;
CashPayment::CashPayment()
{
setPayment(0);
}
CashPayment::CashPayment(double amount)
{
setPayment(amount);
}
string CashPayment::paymentDetails()
{
string paid = "An amount... |
cce2f7d9eae6acdd6b82623b39ef36e4a6252b4d | ea9e1fe593378394ca0750ef1390a71c98badac6 | AdminAbhi/MyCodeLib | /CodeForces/Div 3/642/c.cpp | C++ | cpp | 2,077 | no_license | // @abhi_admin FB UserId: abhiavisekkr Email Id: abhiavisekkr@gmail.com
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<VI> VVI;
typedef pair<int, int> PI;
typedef vector<PI> VPI;
#define endl "\n"
#define fst first
#define s... |
0c196f97767e62f871e1585c57bc034214e82f5b | 537e40da2f71dd7593c7a80bb0cc5029dba32c5d | cnceo/myhistoryprojects | /trunk/WinInet/搜狗邮箱注册/ListCtrlColore.cpp | C++ | cpp | 54,463 | no_license | // ListCtrlColore.cpp : implementation file
//
#include "stdafx.h"
#include "ListCtrlColore.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//带颜色的ListCtrl
CListCtrlColore::CListCtrlColore()
{
columns.SetSize(0);
columns.RemoveAll();... |
bd9963f3b7f57b74da3a0ebe5aa001bd9580921f | 0f9397a3ad9ffa4295e4fd00726b203bea0ad29a | chandanmishra655/c- | /c++/learn2.cpp | C++ | cpp | 652 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(){
int n=5,e=6;
int adj_matrix[n][n];
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
adj_matrix[i][j]=0;
}
}
/*
{0,1},{0,3},{1,3},{1,2},{2,4},{3,4}
*/
pair<int,int> edge[] = {{0,1},{0,3},{1,3},{1,2},{2... |
a0c0e4de338f6ac2472ba30af5ece279408cd31e | 9ba95ea669b67352233bf944071a4db694e35526 | jacques/pkgsrc-wip | /libreoffice/patches/patch-writerfilter_source_dmapper_DomainMapperTableManager.cxx | C++ | cxx | 642 | no_license | $NetBSD$
--- writerfilter/source/dmapper/DomainMapperTableManager.cxx.orig 2012-03-27 16:22:01.000000000 +0000
+++ writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -442,7 +442,7 @@ void DomainMapperTableManager::endOfRowA
double nFullWidth = m_nTableWidth;
//the positions have to be distibuted in ... |
776225ebef98cbddafcdd52a0a2eff523b3433cd | f0ea665053067720282caca8be52a0de37641467 | harshitha-reddy/MissionRnD-C-Basics | /src/isOlder.cpp | C++ | cpp | 2,372 | no_license | /*
OVERVIEW: Given date of births of two persons as inputs, return 1 if person one is elder,
2 if person two is elder, 0 if both are of same age.
Example: isOlder("24-07-2000", "25-07-2000") should return 1 as person one
is elder than person two.
INPUTS: DOBs of two persons as parameters in the format "DD-MM-YYYY".
... |
3c6ee37d18638fed8e493b7ee81c1e808c92aaa2 | 1f800438e540f765528be5d6d85313756736f1fc | samahuja642/competitive-programming | /practice/aug 21/5 aug/array_manipulation.cpp | C++ | cpp | 529 | no_license | #include<iostream>
#include<climits>
using namespace std;
typedef long long ll;
const ll size = 1e7 + 10;
ll arr[size];
int main(){
ios_base::sync_with_stdio(false);
cin.tie();
cout.tie();
ll n,m;
cin>>n>>m;
while(m--){
ll a,b,k;
cin>>a>>b>>k;
arr[a-1]+=k;
arr[b]-... |
9b2e9276858a5a6a266ccf70cf59e2e39f875769 | f8763f50794e2cdcdf304dc103c3fb5facb2f517 | kevinic/bgfx | /examples/12-lod/lod.cpp | C++ | cpp | 13,104 | permissive | /*
* Copyright 2013 Milos Tosic. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include "common.h"
#include <bgfx.h>
#include <bx/timer.h>
#include <bx/readerwriter.h>
#include "entry.h"
#include "dbg.h"
#include "fpumath.h"
#include "processevents.h"
#include "imgui/imgui.h"
... |
d3f21191565a11537286273bcd2f992ce0b6be1e | 2dffc938641818ae0119a658e5655020705ce64b | yecol/aws-sdk-cpp | /aws-cpp-sdk-snowball/source/model/JobResource.cpp | C++ | cpp | 2,919 | permissive | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
161155f58e494ca0017f900d54123371b72df24b | b00bc559f71a869ba1a19dea3e4a5302f3e3e73e | radtek/software-emancipation-discover | /gala_clients/integrator/msdev/integrator/integratorserver/serveradapter.cpp | C++ | cpp | 16,610 | permissive | /*************************************************************************
* Copyright (c) 2015, Synopsys, Inc. *
* All rights reserved. *
* *
* Redistribution and... |
d53ece721c58e3cc68fe88585776fab92ab7b16c | 82053afbed0e654ffcb13aedb0fccfbcde2494bb | Tzupy/ObEngine | /extlibs/TGUI/include/TGUI/Widgets/Slider.hpp | C++ | hpp | 15,983 | permissive | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// TGUI - Texus' Graphical User Interface
// Copyright (C) 2012-2017 Bruno Van de Velde (vdv_b@tgui.eu)
//
// This software is provided 'as-is', without any express or implied warranty.
/... |
05d711c38131a02b2215fae08e6bbf6a8fa64d8c | 3f731fc74abf821b2684ec1d03800dfc533ded0b | CaseyCooper/Arma-2-Epoch | /MPMissions/DayZ_Epoch_24.Napf/custom/CfgServerTrader/Category/Attachments.hpp | C++ | hpp | 1,943 | no_license | class Category_693 {
class Attachment_BELT {
type = "trade_items";
buy[] = {4,"ItemGoldBar"};
sell[] = {2,"ItemGoldBar"};
};
class Attachment_SA58RIS {
type = "trade_items";
buy[] = {4,"ItemGoldBar"};
sell[] = {2,"ItemGoldBar"};
};
class Attachment_Ghillie {
type = "trade_items";
buy[] = {2,"ItemGo... |
75fef8d61365fc99498eacf16b210fe787840e3a | da06d3c68b2256cac471e0b8f4b25397d9fd472e | MrBigDog/Geo3DML | /src/vtkExtending/vtkCellLocator.cxx | C++ | cxx | 49,797 | no_license | /*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkCellLocator.cxx,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
T... |
fe8bbcd2dd7f16a01ab9e80ed6e13b59c2edab63 | 5dcd96c63ef3938f1a9de5d8b4d6e7c87217b77e | BaeJuneHyuck/BaekJune | /Baekjoon/BJ2798.cpp | C++ | cpp | 450 | no_license | #include <iostream>
using namespace std;
int main() {
int N, M;
int input[101];
cin >> N >> M;
for (int i = 0; i < N; i++) {
cin >> input[i];
}
int best = 0;
int c1, c2, c3;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
for (int l = j + 1; l < N; l++) {
int sum = input[i] + input[... |
76b001973a414ad6883cdf76e8eca9450104d465 | c626cff72ffc6f2ea6be9862fbe6923f592e7bef | fyzfx/webots | /src/webots/gui/WbWrenWindow.hpp | C++ | hpp | 2,502 | permissive | // Copyright 1996-2018 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
1cdd4667a049dd2742473a146e1105cdbb7d2df0 | a06e18bf1bba5e478528a84fb7ff77b9b681739f | brian1bolger/ffead-cpp | /ffead-server/src/SerializeBase.cpp | C++ | cpp | 55,009 | no_license | /*
Copyright 2010, Sumeet Chhetri
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... |
f1c739f791c7514b17b1151f01ad284183284534 | 0681e94e2b04a259b83e2ef69a376c8745c75ae1 | tectronics/azerothnuitdelune | /src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp | C++ | cpp | 10,872 | no_license | /* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* 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 2 of the License, or
* (at your option) any l... |
f86379d54d793d2566a4ee8ceb79027f0fd243fe | 15b4e3f81648cbf145d21921e2f43ac4c67b995f | hbdlyao/HVDC-MT | /Code/xbApp/CxbResult.cpp | C++ | cpp | 414 | no_license | ///////////////////////////////////////////////////////////
// CxbResult.cpp
// Implementation of the Class CxbResult
// Created on: 05-4ÔÂ-2017 18:22:15
// Original author: Administrator
///////////////////////////////////////////////////////////
#include "CxbResult.h"
CxbResult::~CxbResult()
{
Clear();
}
... |
4e868c7c02f22bc9e4709f6d4bd8a99377e4e35a | 969c208e7708fd83281725c7129b6ec64cfe4fc5 | SNU-ARC/google-research | /scann/groundtruth.cc | C++ | cc | 2,580 | permissive | // g++ -shared -o groundtruth.so -fPIC groundtruth.cc
#include <vector>
#include <stdio.h>
#include <utility>
#include <math.h>
#include <algorithm>
#include <iostream>
using namespace std;
bool compare_descending (pair<int, float> first, pair<int, float> second)
{
if (first.second > second.second)
return true;... |
72bee5f8f28518162392355be160abd60d412f6a | 82af3a2ebce3651cca49f7eda40c64b1224e92f3 | poohpaintii/book-source-codes | /C++/CPP_Programs_from_Book/Chap04/BitTest/main.cpp | C++ | cpp | 1,477 | no_license | // BitTest - initialize two variables and output the
// results of applying the ~,& , | and ^
// operations
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int nNumberofArgs, char* pszArgs[])
{
// set output format to hexadecimal
cout.unsetf(cout.dec);... |
54f1dd13a4e8ec643566b23c21e1137db3f5d6bf | 0d22f90287d03e4729149901a320abe48aea3997 | libreliu/cmake-u3d | /Source/RTL/Component/Bones/IFXVertexWeight.cpp | C++ | cpp | 1,338 | no_license | //***************************************************************************
//
// Copyright (c) 1999 - 2006 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 may obtain a copy of the License at
//
// ... |
14e89ce7af3f933cebccca916c7bf823f7e072be | c54319225a49df9d886a003cae0b9f07853dd805 | antzdote/school-stuff | /c++/dowhile.cpp | C++ | cpp | 604 | no_license | #include <iostream>
using namespace std;
int main()
{
float score1, score2, score3, score4, score5, score6, score7;
float average;
char response;
do
{
cout<<"Enter 7 scores for a student: ";
cin>>score1>>score2>>score3>>score4>>score5>>score6>>score7;
average = (score1 + scor... |
a20678af7c0390bfb3ec546f89f62e0afb26c175 | d343e47e81f781c2eae0204daa78bc6505cb2810 | mindmastre/DX11-Framework | /DX11BaseFramework-NOCOLLADA/VolumetricFog/VolumetricFog.cpp | C++ | cpp | 7,466 | no_license | #include "VolumetricFog.h"
using namespace std;
const int iMaxColorInterval = 1000;
inline float OpticalLength(float fLineDensity)
{
return OPTICAL_LENGTH_FACTOR * fLineDensity;
}
float Phase( Vector3 vIn, Vector3 vOut )
{
vIn = vIn.normalize();
vOut = vOut.normalize();
float dotP = vIn*vOu... |
512abd196593f71de47af9e32b9b70e1f54e1620 | e6a6d5860a66209a0370e1be09599c911146fb55 | ywhwang/cpp-lazy | /include/Lz/detail/JoinIterator.hpp | C++ | hpp | 7,151 | permissive | #pragma once
#ifndef LZ_JOIN_ITERATOR_HPP
#define LZ_JOIN_ITERATOR_HPP
#include "LzTools.hpp"
#ifdef LZ_STANDALONE
#ifdef LZ_HAS_FORMAT
#include <format>
#else
#include <sstream>
#endif // LZ_HAS_FORMAT
#else
#include <fmt/ostream.h>
#endif // LZ_STANDALONE
namespace lz {
namespace internal {
#if... |
02b455821b06f439a85c94ccbaa7ce76beab0c30 | 5d741d018d94631ee72177ee41c9a08b21e6b0bf | itohdak/Competitive_Programming | /Codeforces/Div3/605/E.cpp | C++ | cpp | 1,654 | no_license | #include <bits/stdc++.h>
#include <print.hpp>
using namespace std;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(i,n) RREP(i,(n)-1,0)
#define all(v) v.begin(), v.end()... |
96968c0c6be8b302e60c53182e8df0a9de1e11f2 | dc8bde74fc77fb4f43e342fcd4d419537667df54 | kspine/referance_solution | /empery_center/src/player/legion_building.cpp | C++ | cpp | 47,680 | no_license | #include "../precompiled.hpp"
#include "common.hpp"
#include "../mmain.hpp"
#include "../mongodb/legion.hpp"
#include "../msg/cs_legion_building.hpp"
#include "../data/legion_building_config.hpp"
#include "../account.hpp"
#include "../legion.hpp"
#include "../legion_building.hpp"
#include "../singletons/legion_map.hpp... |
22334eb5dd21b79cb9c3f0587f6cc367947375f5 | 0262ba168a399fa43da6f3a82158f7713c89aa8a | danderson2794/2DGame | /tracker/ioMod.cpp | C++ | cpp | 2,270 | no_license | #include <SDL_image.h>
#include "ioMod.h"
#include "gamedata.h"
#include "renderContext.h"
IoMod& IoMod::getInstance() {
static IoMod instance;
return instance;
}
IoMod::~IoMod() {
TTF_CloseFont(font);
TTF_Quit();
}
IoMod::IoMod() :
init(TTF_Init()),
renderer( RenderContext::getInstance()->getRenderer... |
431587d24cd99e3db170b0b40766a50cc9987b7c | 15bb74cc46631aaf78f8e2cd4afe912732749063 | STEllAR-GROUP/hpx | /libs/core/algorithms/tests/unit/algorithms/rotate_copy.cpp | C++ | cpp | 14,441 | permissive | // Copyright (c) 2007-2014 Hartmut Kaiser
// Copyright (c) 2021 Chuanqiu He
//
// SPDX-License-Identifier: BSL-1.0
// 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 <hpx/algorithm.hpp>
#include <hpx/exe... |
34e01cabcb05dcb942b004a3c4b144d1df2fbf53 | 9eb3325ad4aac361bd005cf8861719223799937f | okwh/xtp | /src/tests/test_gnode.cc | C++ | cc | 3,805 | permissive | /*
* Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
a1f74cde55507407a0be2a9a888ab43ef0c8db4a | a777b5b0a5cf38ac3ef2bbb2e0890dba480fe058 | silveryfu/magma | /lte/gateway/c/oai/tasks/mme_app/mme_app_state_converter.cpp | C++ | cpp | 34,441 | permissive | /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the terms found in... |
0db65fcee01a16c17d7de3401a517c1d5938ddc1 | 400c773128aa6da72b169b75bbad1704d4f88de8 | afanfani/usercode | /JPsiPiPiPAT53/src/X3872FilterPAT.cc | C++ | cc | 3,011 | no_license | #include "../interface/X3872FilterPAT.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/Common/interface/RefToBase.h"
#include "DataFormats/Candidate/interface/ShallowCloneCandidate.h"
#inc... |
bfdee9c9c56fd2bcf9620674f2c2b1573e5c111f | fc4c81c29ecfece7f0978b437d0c812f1353fbc8 | mayl/mull | /tests-lit/tests/cxx-frontend/supported-mutations/cxx_rem_assign_to_div_assign/sample.cpp | C++ | cpp | 1,119 | permissive | extern "C" {
extern int printf(const char *, ...);
}
int rem_assign(int a, int b) {
int res = a;
res %= b;
return res;
}
int main() {
if (rem_assign(5, 2) == 1) {
printf("NORMAL\n");
return 0;
} else {
printf("MUTATED\n");
return 1;
}
}
// clang-format off
/**
RUN: %clang_cxx %sysroot -f... |
059c7bcb7393c60014b350e30f1f856c414bc726 | aa3587a133b01d4afba180f6f048b0f6e18391cc | EOSLaoMao/abi_cache_plugin | /exceptions.hpp | C++ | hpp | 510 | permissive | #pragma once
#include <eosio/chain/exceptions.hpp>
#include <fc/exception/exception.hpp>
#include <appbase/application.hpp>
#include <boost/core/typeinfo.hpp>
namespace eosio {
namespace chain {
FC_DECLARE_DERIVED_EXCEPTION( abi_cache_plugin_exception, chain_exception,
3230009, "abi... |
84b2040feaa18e2b6869bdc046d354b4d90b174a | 4b0bc436ea68514ecb8871ff6f90c99c62ec602f | zdy333666/cxx | /robot/src/odometry/odometry_publisher.cpp | C++ | cpp | 3,333 | no_license | //
// Created by zdy on 19-5-20.
//
#include <math.h>
#include "rclcpp/rclcpp.hpp"
#include "rclcpp/time_source.hpp"
#include "rclcpp/clock.hpp"
#include "geometry_msgs/msg/transform_stamped.hpp"
#include "tf2/LinearMath/Quaternion.h"
#include "tf2_ros/transform_broadcaster.h"
#include "nav_msgs/msg/odometry.hpp"
in... |
fed9e66f595a1bfdb4784f5cef36aaa2c3984ae7 | 29412d05e44a55498a9b3b822abd6137b74e4648 | yashgupta-7/Competitive_Coding | /CodeForces/a.cpp | C++ | cpp | 388 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
# define INF 2000000000
#define rep(i,a,b) for (int i = a; i <= b; i++)
#define repr(i,a,b) for (int i = a; i >= b; i--)
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t;cin>>t;
rep(j,1,t){
int s,i,e;... |
4ae91151ed6b4b0e083ce758985f74fc681d986f | 657f5ddd21dec624c69496fb0f143e0eb915852c | vishal1991/SPOJ | /Basics/pcross1.cpp | C++ | cpp | 382 | no_license | #include <iostream>
int main()
{
int t = 0;
std::cin >> t;
while (t--)
{
int m, n, ci, cj;
std::cin >> m >> n >> ci >> cj;
for (int i=1; i<=m; i++)
{
for (int j=1; j<=n; j++)
{
if (i == ci || j == cj)
{
std::cout << '*';
}
else
{
std::cout << '.';
}
}
std::co... |
a6c009f036ec50ec0ef62053388b720529b7c918 | abc53940efe4c45aafb228e10892bc8af992c29d | unofficial-mirror/v8 | /test/unittests/compiler/instruction-sequence-unittest.cc | C++ | cc | 16,530 | permissive | // Copyright 2014 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/base/utils/random-number-generator.h"
#include "src/compiler/pipeline.h"
#include "test/unittests/compiler/instruction-sequence-unittest.h... |
4460a8238daa2dc547e7760d2016e90c8246ba1d | 962551aa577006d473bed3883dcac1e96d694827 | Pranavpaharia/cyberpunk | /Plugins/ThoughtfishCoalaPlugin/Source/ThoughtfishCoalaPlugin/CenterOfMass.cpp | C++ | cpp | 3,634 | no_license | // Copyright Thoughtfish GmbH, 2019
// http://www.thoughtfish.de
#include "CenterOfMass.h"
#include "CoalaArea.h"
#include <cmath>
UCoalaGPSCoordinates*
CenterOfMass::Get( const TArray<FVector>& vertices )
{
TArray<UCoalaGPSCoordinates*> tmp;
for( int i = 0; i < vertices.Num(); ++i )
{
UCoalaGPSCoordinates* pos... |
dd7a402fdc1a6c2acec6beca3d33d4e821eb0759 | 27e1d5c3fc0f79a7c23ecff4baf05313a47254e7 | serebbb/GBN_SDR | /qwt_linux/src/moc/moc_qwt_analog_clock.cpp | C++ | cpp | 3,659 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'qwt_analog_clock.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.11.3)
**
** WARNING! All changes made in this file will be lost!
***************************************************... |
08f4642a3faad6eeb2f40b7ed3de6bbe81b32aba | 818ce06e81b56f429d05b4c54439f8b4d01e414b | kalex1994/UVA | /434.cpp | C++ | cpp | 1,343 | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <bitset>
#include <algorithm>
#include <iomanip>
#include <iterator>
using namespa... |
864a314494a8c0fc50eaf54ed9558a1f5ac62959 | c614dfd3b08e009b4dfdfb3652ed39f19e1d28f5 | ue4sdk/DRG-SDK | /DRG-SDK/SDK/DRG_ClothingSystemRuntime_functions.cpp | C++ | cpp | 2,863 | no_license | // Deep Rock Galactic (0.22) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "DRG_ClothingSystemRuntime_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
//... |
b7532428854ee032820d591673fcd1e45cf980a5 | 13d602fa2d2b95f1f331a622c30a543bf4217cec | harsimrats/COL380 | /4/New folder/main.cpp | C++ | cpp | 8,736 | no_license | #include <cstdio>
#include <cstdlib>
#include <vector>
#include <iostream>
#include <omp.h>
#include <algorithm>
#include <mpi.h>
using namespace std;
#define COUNT 4
int max_rows, max_cols;
int world_size, world_rank;
int row_start, row_end;
int col_start, col_end;
typedef struct node {
int row, col;
int key_int... |
76c3273b224ac7c66b75ba9236f1797d720499a3 | 43ebe27c18a5a514d6749794714b6b6431e7f065 | demonsaw/Code | /ds3/3_ds_mobile/model/chat_model.cpp | C++ | cpp | 6,565 | permissive | //
// The MIT License(MIT)
//
// Copyright(c) 2014 Demonsaw LLC
//
// 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, c... |
4e7238278f8a90b8da8d4f77f60b73ab91ddd277 | f50780d5fe88b29f84b02d3bc79653c4aa2ad55f | molinadejan/DX3D9 | /cCubePNT.cpp | C++ | cpp | 2,499 | no_license | #include "cCubePNT.h"
cCubePNT::cCubePNT()
{
}
cCubePNT::~cCubePNT()
{
}
void cCubePNT::Setup()
{
std::vector<ST_PNT_VERTEX> vecVertex;
vecVertex.resize(8);
vecVertex[0].p.x = -0.5f; vecVertex[0].p.y = -0.5f; vecVertex[0].p.z = -0.5f;
vecVertex[1].p.x = -0.5f; vecVertex[1].p.y = 0.5f; vecVertex[1].p.z = -0.5f... |
da4f5052a2966f0972ce76c4093b29a168217734 | a552d37537e1425ddc8a9b2b586b7a06179d1851 | pcharest2000/ttyMorphClock | /src/digit.cpp | C++ | cpp | 9,181 | no_license | #include "digit.h"
const uint8_t sA = 0;
const uint8_t sB = 1;
const uint8_t sC = 2;
const uint8_t sD = 3;
const uint8_t sE = 4;
const uint8_t sF = 5;
const uint8_t sG = 6;
const int segHeight = 6;
const int segWidth = segHeight;
const int transDelay = 100000;
uint8_t digitBits[] = {
0B11111100, // 0 ABCDEF--
... |
9ddd62fd9164888a8af56d4fbb08e8dd14de9726 | 12210dd61cd341cc028cce9445eeac5d95f3d104 | Plorax/UE4-Maze | /Maze/Source/Maze/MazeClass.cpp | C++ | cpp | 490 | no_license |
#include "Maze.h"
#include "MazeClass.h"
UMazeClass::UMazeClass(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
}
AStaticMeshActor* UMazeClass::Get(FInt3 Coordinate)
{
return MazeGrid.FindChecked(Coordinate);
}
void UMazeClass::Set(FInt3 Coordinate, AStaticMeshActor * Tile)
{
Maz... |
8192b7c3b9ba651b31e403dd464306b80cdf9c8f | 290a43731ff94bcc17b3f9bc60350e9b897cb8d1 | hirocsingh/OOP224-Winter2016 | /Mile5/Item.cpp | C++ | cpp | 3,366 | no_license | #define _CRT_SECURE_NO_WARNINGS
// Lib includes
#include<iostream>
#include <cstring>
// inlcude Item and POS header files
#include "Item.h"
#include "POS.h"
using namespace std;
namespace ict{
// class Item implementaion
void Item::sku(const char* csku)
{
if (csku){
strncpy(m_sku, csku, MAX_SKU_L... |
096bb7aa52e4f55249ec38b36ddc9b3ff95f66c7 | 328d754c387bf20a00c0196796e22ce7130136b4 | manutalcual/generator | /src/base_parser.hh | C++ | hh | 1,377 | no_license | //
// Clase: base_parser Copyright (c) 2010 SISDETEC
// Autor: Manuel Cano Muņoz
// Fecha: Mon Aug 30 13:22:40 2010
// Time-stamp: <2010-09-06 12:20:05 manuel>
//
// 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... |
52764ac776e08dd452600e8a663faaee889ea8a4 | 504f5d61509aa25e4c62e1e92f1c8c73f985897c | freebsd/freebsd-ports | /devel/regexx/files/patch-examples__simple.cc | C++ | cc | 245 | permissive | --- examples/simple.cc.orig Tue Mar 13 23:42:21 2001
+++ examples/simple.cc Sun Dec 22 03:09:56 2002
@@ -30,6 +30,7 @@
#include <regexx.hh>
using namespace regexx;
+using namespace std;
//
// This is the function to pass to replace() in
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.