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 |
|---|---|---|---|---|---|---|---|---|
e67670b6c41adb9e8ae4d172dee8a3a5fe751e87 | 96cc376d2fee7ce6b65ab4f5d73734a24ab9a326 | open-space-collective/open-space-toolkit-physics | /test/OpenSpaceToolkit/Physics/Coordinate/Frames/TOD.test.cpp | C++ | cpp | 1,580 | permissive | /// Apache License 2.0
#include <OpenSpaceToolkit/Physics/Coordinate/Frame.hpp>
#include <Global.test.hpp>
namespace iau = ostk::physics::coord::frame::providers::iau;
using ostk::math::geom::d3::trf::rot::Quaternion;
using ostk::physics::time::Scale;
using ostk::physics::time::Instant;
using ostk::physics::time::... |
9e067ed69890a2d8fe78bdf8d6cef9991d1f52e7 | b19a78f09c5901587d16223bf5ee034dc8f8eff4 | mikeando/cxxutils | /include/cxxutils/result.hpp | C++ | hpp | 5,981 | no_license | #pragma once
#include "cxxutils/cxx14shims.hpp"
#include <string>
#include <assert.h>
#include "optional.hpp"
class ResultException {
public:
std::string component;
std::string mesg;
ResultException() : component("unknown component"), mesg("Unknown exception") {}
explicit ResultException(const std:... |
478976524ce3483acff14863a261b235caa6ecaf | ea73e045cc68b7e6ecf4dffc87dc19b74291877d | ArgishtiAyvazyan/DistanceCalculator | /tests/CSVParserBenchmark.cc | C++ | cc | 1,342 | permissive | /**
* @file CSVParserTest.cc
* @author Argishti Ayvazyan (ayvazyan.argishti@gmail.com)
* @brief Tests implementation for Parser.
* @date 31-10-2020
* @copyright Copyright (c) 2020
*/
#define CATCH_CONFIG_MAIN
#define CATCH_CONFIG_ENABLE_BENCHMARKING
#include <catch2/catch.hpp>
#inclu... |
e3e9b307ab286b8dee74afea1f26327ae3c7801d | 741981613bc55e1ded101938924d4eebf091a573 | MihaiBairac/SDA | /MemoryBenchmark.cpp | C++ | cpp | 2,037 | no_license | #include "MemoryBenchmark.hpp"
#include "Allocator.hpp"
#include <cassert>
#include <cstddef> // size_t
#include <iostream>
namespace SDA
{
MemoryBenchmark::MemoryBenchmark()
: mOperationCount(0), mTimer()
{}
MemoryBenchmark::MemoryBenchmark(const std::size_t operationCount)
: mOperationCount(oper... |
3363cf1eb0639c30b325508e863a369725116145 | 6c717da2da66474473d620b02372a39bda3000db | bettiolm/GHEX | /include/ghex/rma/range_factory.hpp | C++ | hpp | 4,321 | permissive | /*
* GridTools
*
* Copyright (c) 2014-2021, ETH Zurich
* All rights reserved.
*
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#pragma once
#include <ghex/rma/locality.hpp>
#include <ghex/rma/handle.hpp>
#include <ghex/rma/access_guard.hpp>
#include <gh... |
3091c9be1520ee2c6bc011fe389b2ab302c1082d | 64006da852a19d46a8323b7392c1fa4e7453ae2e | nicoleyip1876/course-0-assignment-1-v1 | /fix-code-5/main.cpp | C++ | cpp | 279 | no_license | #include <iostream>
#include <string>
using namespace std;
int main() {
int cup_1_vol = 5;
int cup_2_vol = 7;
int cup_3_vol = 6;
int cup_4_vol = 12;
int total_vol = cup_1_vol + cup_2_vol + cup_3_vol + cup_4_vol;
cout << "Total volume is: " << total_vol << endl;
}
|
f61361d980c90b7b204e84ef87f77241a7c2ddef | e7cd7449f112c63e74a6414cc126c5adc194f959 | ttyang/sandbox | /sandbox/contract/libs/contract/example/contracts/contract_failure.cpp | C++ | cpp | 15,159 | permissive |
// Copyright (C) 2008-2013 Lorenzo Caminiti
// Distributed under the Boost Software License, Version 1.0
// (see accompanying file LICENSE_1_0.txt or a copy at
// http://www.boost.org/LICENSE_1_0.txt)
// http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
#include <contract.hpp>
#include <boost/de... |
bdcdef5884d3ee1e27c3adbd1e5bd95b7d91e8da | 49640e2a3a9b460aced436879433c31e9f0705dd | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/W+RWC+po+ctrl+po.c.cbmc_out.cpp | C++ | cpp | 43,115 | no_license | // Global variabls:
// 0:vars:3
// 3:atom_1_X0_1:1
// 4:atom_1_X2_0:1
// 5:atom_2_X2_0:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
#define ADDRSIZE 6
#define LOCALADDRSIZE 3
#define NTHREAD 4
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, ... |
1e57d84be22e7138ab96d2a3cf95c4052a843c81 | d1728b675cd0dcff0e24fa89ed40261d8f351812 | sunny-lan/cpp-contest | /gfssoc3s4.cpp | C++ | cpp | 976 | no_license | #ifdef DMOJ
#include <bits/stdc++.h>
#else
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <math.h>
#endif // DMOJ
using namespace std;
type... |
cce0b93878c4b3ed0ce52fbae1a4babbc29d47d2 | 54d5bfe45b9515de316bd1725e07780a188555bc | dewitast/Hercules-D-Squish | /vz02/point/point.cpp | C++ | cpp | 622 | no_license | /** @file point.cpp
*/
#include "point.h"
Point::Point()
{
absis = 0;
ordinat = 0;
}
Point::Point(int abs, int ord)
{
absis = abs;
ordinat = ord;
}
Point::Point(const Point& P)
{
absis = P.absis;
ordinat = P.ordinat;
}
Point& Point::operator= (const Point& P)
{
absis = P.absis;
ordinat = P.ordinat;
retu... |
10647dbbc6491ae325531a5ae6121bb2e0d5cd09 | 1e8f2a483fc60a3414ce0ce558978b2eb08c0ce6 | dreammes/LiteHack | /LiteHackForm/GObjects/Generator.cpp | C++ | cpp | 9,697 | no_license | #include "Generator.h"
extern ObjectsStore GlobalObjects;
extern NamesStore GlobalNames;
// A fast version of IsA()
std::string GetType(UEProperty prop)
{
std::string className = prop.GetClass().GetName();
std::string cppType = "";
if (className == "StructProperty")
{
cppType = "struct " + UEScriptStruct(UStruc... |
e1eb5be73355086bfde5ad1f8f765a3d49cd1ead | f8940db50ff7c63f91c021b9480135d15548c1c3 | TheRealNox/2015-space-apps-challenge | /Cpp/StellarViews/StellarViewsFinder/GetFireTileRequest.cpp | C++ | cpp | 2,300 | no_license | #include "GetFireTileRequest.h"
GetFireTileRequest::GetFireTileRequest(QNetworkRequest * request, QString key) : Request(request, "Fire All", key)
{
}
GetFireTileRequest::~GetFireTileRequest()
{
}
GetFireTileRequest::GetFireTileRequest(const GetFireTileRequest &request)
{
Request::setRequest(request.getRequest());... |
eaa8ca68035572fbdd54e4eeaba3507c21181cfa | c84e46f1b1527c55cf2266fd0fb68f569a401b52 | ysripath/CPP | /CCI/cci/cci/stringCompression.cpp | C++ | cpp | 1,088 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
int compress(vector<char>& chars) {
if (chars.size() == 0)
return 0;
if (chars.size() == 1)
return 1;
std::sort(chars.begin(), chars.end());
int l = chars.size();
int i = 0;
int count = 1;
int k = i;
while (i < l - 1)
{
... |
02092d2ce166cacdcd3e578ae4e75d67aa4bde4f | bab675ac6b7b39bb68864731a1d818983e115306 | shobhitkrsks/cp | /cf-maxxorsecondary.cpp | C++ | cpp | 1,276 | no_license | /* #include<iostream>
using namespace std;
typedef long long ll;
int main()
{
ll n;
cin>>n;
ll ar[n];
for(ll i=0;i<n;i++)
{
cin>>ar[i];
}
ll mxor=0;
for(ll i=1;i<n;i++)
{
for(ll j=0;j<i;j++)
{
int fmax=ar[i],smax=ar[i];
for(ll k=j;k... |
f4d219b612379864946ffec88578f78f449b0395 | 0368e760e5bbda345d2485d34979f394f5f864f1 | linfso/kdguigl | /skia/src/core/SkPath.cpp | C++ | cpp | 92,278 | permissive |
/*
* Copyright 2006 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkBuffer.h"
#include "SkErrorInternals.h"
#include "SkMath.h"
#include "SkPath.h"
#include "SkPathRef.h"
#include "SkRRect.h"
//#include "SkThr... |
55245dfbaa2580eb70f35acb04cde80aa01f4501 | f4f8e7ca7d533901de776a53a13f7799f1c079be | CreateUNSW/UGV_ROS | /src/ugv_nav/src/controller_get.cpp | C++ | cpp | 3,253 | no_license | #include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <unistd.h>
#include <cstdlib>
#include <cstring>
#include <ros/ros.h>
#include <cmath>
//#include <ctgmath>
#include <ctime>
#include <std_msgs/Float32.h>
#include "ugv_nav/Movement.h"
#define KILL_TIMER 0.0
using namespace std;
in... |
94452ba18e2ad2559f85a7ee23f3d8059a93351a | e6437b0a55f757b82cc610184d8773df3fdc7e92 | fencoin/fencoin | /src/qt/bitcoinunits.cpp | C++ | cpp | 4,270 | permissive | #include "bitcoinunits.h"
#include <QStringList>
BitcoinUnits::BitcoinUnits(QObject *parent):
QAbstractListModel(parent),
unitlist(availableUnits())
{
}
QList<BitcoinUnits::Unit> BitcoinUnits::availableUnits()
{
QList<BitcoinUnits::Unit> unitlist;
unitlist.append(BTC);
unitlist.append(mBT... |
3f0605b19d669876f2fceff5120070104dcb3b63 | 483767a2ce724ab3c9455675d08b53329425bb26 | Mr-WangJin/JK_OPENGL | /src/fire/main.cpp | C++ | cpp | 3,766 | no_license | #include "cookbookogl.h"
#include <GLFW/glfw3.h>
#include <cstdio>
#include <cstdlib>
#include "glutils.h"
#include "scenefire.h"
#include "sceneparticles.h"
#include "sceneparticlesfeedback.h"
#include "sceneparticlesinstanced.h"
#include "scenesmoke.h"
#include "scenewave.h"
#define WIN_WIDTH 800
#define WIN_HEIG... |
33e77f351acd76383b0fefffbafe2806547e58f2 | ce8714615b9b74748d4ac970dd5e6b557ad0c851 | Soarex/Seidon | /Seidon/src/Vendor/Soloud/backend/portaudio/soloud_portaudio.cpp | C++ | cpp | 3,326 | permissive | /*
SoLoud audio engine
Copyright (c) 2013-2014 Jari Komppa
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,
including comm... |
2464761ce123a6e5fcadb194f5f0c1d4b62a18ca | 21843b904926dd370cdc66bb41048a8f35dba92e | orazve/oneDAL | /cpp/oneapi/dal/backend/primitives/stat/test/cov_dpc.cpp | C++ | cpp | 13,316 | permissive | /*******************************************************************************
* Copyright 2021 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
*
* http://www.apache.o... |
b7390d046614c60642a9f947beaaf34289d49fd2 | 84d1ce9aea0ec850d0297077f63ed153e6c8eeba | Rajveer86/function2 | /test/function2-test.hpp | C++ | hpp | 11,236 | permissive |
// Copyright 2015-2019 Denis Blank <denis.blank at outlook dot com>
// 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)
#ifndef FU2_INCLUDED_FUNCTION2_TEST_HPP__
#define FU2_INCLUDED_FUNCTION2... |
aeed1b8280aa6e5a526a88f376adff8775e7f228 | f49430eee8b235a6cd799770bcec0ff852a3cc46 | jdcloud-bds/bds-bch | /src/test/versionbits_tests.cpp | C++ | cpp | 14,049 | permissive | // Copyright (c) 2014-2016 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 "chain.h"
#include "chainparams.h"
#include "consensus/params.h"
#include "test/test_bitcoin.h"
#include "validation... |
1466499a34c4a6eab19e58250016fa7e4099b4af | 155787e31f2a854b105894f5c0aa8bcab82a4ecd | npulgh/polyfem | /src/state/StateInit.cpp | C++ | cpp | 9,804 | permissive | #include <polyfem/State.hpp>
#include <polyfem/auto_p_bases.hpp>
#include <polyfem/auto_q_bases.hpp>
#include <polyfem/RefElementSampler.hpp>
#include <polyfem/Logger.hpp>
#include <polyfem/KernelProblem.hpp>
#include <polysolve/LinearSolver.hpp>
#include <geogram/basic/logger.h>
#include <geogram/basic/command_lin... |
73106a6e5149329930354d9562d266aada30c057 | 7f9786ef57ef0a6ec4f1bc827ac1953843ab0bd4 | EQ4/3DTI-cross-platform | /StereoSpread.cpp | C++ | cpp | 928 | no_license | //
// StereoSpread.cpp
// example-ios
//
// Created by Ragnar Hrafnkelsson on 01/11/2015.
// Copyright © 2015 Reactify. All rights reserved.
//
#include "StereoSpread.h"
StereoSpread::StereoSpread() : width(1.f)
{
printf("StereoSpread Loaded \n");
}
StereoSpread::~StereoSpread()
{
}
void StereoSpread::setWid... |
fd8a15d704c7fa59469161753459f76d00be8f12 | 282154b65ebde4f476a2b693aa9caf1179e016e3 | REO-RAO/coding | /Utility/GetCpuInstructionSet.cpp | C++ | cpp | 9,422 | no_license | #include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <tchar.h>
#if _MSC_VER >=1400 // VC2005才支持intrin.h
#include <intrin.h> // 所有Intrinsics函数
#else
#include <emmintrin.h> // MMX, SSE, SSE2
#endif
// CPUIDFIELD
typedef INT32 CPUIDFIELD;
#define CPUIDFIELD_MASK_POS 0x0000001F // 位偏移. 0~31.
#define CP... |
fb467ced0fa6c29521808c3d3f3c790e5230daea | ff5998736eea185921004ca577e3481591029bdb | igor-dyrov/TuringDebugger | /Turing/mainwindow.cpp | C++ | cpp | 9,774 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include "TM.hpp"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
m_state = Turing::NormalWork;
ui->setupUi(this);
ui->btnStepBefore->setEnabled(false);
QPixmap img(":/img/Mashina_Tjuringa-2.jpg");
ui... |
e89f49b2c31e3a2cbf7ac777c3fceb3a57fe4a68 | 05a5aff22c7415f4412ad0b40e210624e664f66c | IgorDzreyev/cefeika | /lib/dmitigr/dt/types_fwd.hpp | C++ | hpp | 476 | permissive | // -*- C++ -*-
// Copyright (C) Dmitry Igrishin
// For conditions of distribution and use, see files LICENSE.txt or dt.hpp
#ifndef DMITIGR_DT_TYPES_FWD_HPP
#define DMITIGR_DT_TYPES_FWD_HPP
/**
* @brief The API.
*/
namespace dmitigr::dt {
enum class Day_of_week;
enum class Month;
class Timestamp;
/**
* @brief Th... |
efe551a3da259289584cb5661e7a7411e4ceaf66 | bf6870f963dbc405e7c64c3650df157c4f86dc53 | malorin42/42-projects | /Piscine_cpp/day01/ex02/ZombieEvent.cpp | C++ | cpp | 1,463 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ZombieEvent.cpp :+: :+: :+: ... |
6865397cb6786189e6104bdccad0bca5461255a0 | e3ded5f15d2dfbe549485d67567cc0b99bcaba81 | deerportal/deerportal | /src/cardsdeck.cpp | C++ | cpp | 3,424 | permissive | #include "cardsdeck.h"
CardsDeck::CardsDeck(TextureHolder *textures, sf::Font *gameFont, Command *command)
{
commandManager=command;
std::array<std::array<int,2>,4> cardsPos = {
{
{{1087,95}}, {{1225, 95}}, {{1225, 277}}, {{1087, 277}}
}
};
this->textures = textures;
for ... |
996de0a6ea5681e07ea4be82261f821b1b423544 | 21d83a4c18cd341aec0d69ee6d92532f1652eec2 | Tonix22/Athenas | /C_CPP_Proyects/Cointainers/LuisHash.cpp | C++ | cpp | 1,553 | no_license | #include<iostream>
#include<set>
#include <bits/stdc++.h>
using namespace std;
struct tcp_pair {
union {
unsigned int ip;
unsigned char oct[4];// 32 bit
}ip_addr;
int port;
tcp_pair(): tcp_pair{0, 0} {};
tcp_pair(int p, unsigned int address): port{p}, ip_addr{address} {}
};
ostr... |
7fcf50ebc729925c4bf88652c71e06d352d193e2 | f4f749834ffb23031baf06037bb619daeb93aab5 | futre1529/Dsa_Implementations | /btree2.cpp | C++ | cpp | 6,339 | no_license | #include<iostream>
using namespace std;
struct node
{
int tag;
int key[4];
node *child[5];
}*root;
void sort(int ar[5],int size)
{
int i,j,temp;
for(i=0;i<size;i++)
for(j=0;j<size-1;j++)
if(ar[j]>ar[j+1])
{
temp=ar[j];
... |
23bce74eeb48aa949fe0dd08ca659f1baa333629 | 8c8cf60c027ac617b9bde287562ba22dd12fab11 | ravi292/hiphop-php | /hphp/runtime/ext/ext_simplexml.cpp | C++ | cpp | 40,607 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
| Copyrigh... |
46851ecfd588f7d0dd9383107c498c9412420bfd | 4bbc6f0c37b2318c398319ac54844f81577a9ec9 | zeph1912/milkomeda_chromium | /chromeos/components/tether/host_connection_metrics_logger.cc | C++ | cc | 4,781 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/components/tether/host_connection_metrics_logger.h"
#include "base/metrics/histogram_macros.h"
namespace chromeos {
namespace tether... |
a173ae6024c12ce182ef69da6ad770383ed5b96b | 6b250cf9b19bd11440433ba74a91ab260b2f6d88 | rohit3463/data-structures | /binary tree/each-node-is-sumofchildren.cpp | C++ | cpp | 1,369 | no_license | /*
Source:-https://www.geeksforgeeks.org/check-for-children-sum-property-in-a-binary-tree/
*/
#include<iostream>
using namespace std;
struct node{
int data;
node *left, *right;
};
struct node* newNode(int data){
struct node *Node = new node;
Node->data = data;
Node->left= nullptr;
Node->right = nullptr;... |
bbd4da7e8a7861075abfbc03a526f9317516c992 | 26a889542a01e0b9f988122bcf4c3065fc21f848 | GajeraDeep/MiniProject2019 | /Slave ESP/src/main.cpp | C++ | cpp | 2,854 | no_license | #include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
#define SENSOR_ID "2"
const char *ssid = "master";
const char *password = "master123";
String serverHost = "192.168.4.1";
String data;
int sleepInterval = 1;
int failConnectRetryInterval = 1;
int counter = 0;
const size_t cap = JSON_O... |
4125781298b631d8f6d50e2c7f30aa9be0d3c27b | 240f79ef9dad65f13a279d3c22505c81f6695c9a | Huixaing/Project | /Bcode_WintgTerm_V2.6.6_Build_20180929(界面统一版本)/GpcTerms/sharelib/CDunicomm.cpp | C++ | cpp | 575 | no_license | // 计算机生成了由 Microsoft Visual C++ 创建的 IDispatch 包装类
// 注意: 不要修改此文件的内容。如果此类由
// Microsoft Visual C++ 重新生成,您的修改将被改写。
#include "stdafx.h"
#include "CDunicomm.h"
/////////////////////////////////////////////////////////////////////////////
// CUnicomm
IMPLEMENT_DYNCREATE(CDUnicomm, CWnd)
//////////////////////////////... |
cd030f2ad747c1bc34c49c782776d309cc3a184f | 0b488f472aa8fc9a18a9dbe82a5df7573717f1d3 | Kepter/CompetitiveProgramming | /kattis/bangers/speedlimit.cpp | C++ | cpp | 347 | no_license | #include <iostream>
using namespace std;
int main()
{
int sets;
cin >> sets;
while(sets != -1)
{
int dist = 0;
int lastTime = 0;
for(int r=0; r<sets; r++)
{
int speed, time;
cin >> speed >> time;
dist += speed*(time - lastTime);
lastTime = time;
}
cout << dist << " miles" << endl;
cin >... |
48cbed3faf1106b601bc07796e4e34117f3d3942 | c75842502e4ce33ed1aa3f4220ff3a5d8c1852a9 | bobosam/CPlusPlus | /Part.02/Part.02/Part.02.02.exercise02.DateTime/AssemblyInfo.cpp | C++ | cpp | 1,249 | no_license | #include "stdafx.h"
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;
//
// General Information about an assembly is controlled through the following
// set of ... |
6ea4bb7bab1c6821d5240f8776ba15b3236f1b8f | 11385f00aee90264bffa581d87bf643954d8492d | guoyu07/aidp | /src/App.cpp | C++ | cpp | 3,615 | permissive | #include <adbase/Utility.hpp>
#include <adbase/Logging.hpp>
#include <adbase/Lua.hpp>
#include "App.hpp"
//{{{ macros
#define LOAD_KAFKA_CONSUMER_CONFIG(name, sectionName) do {\
_configure->isNewConsumer##name = config.getOptionBool("kafkac_"#sectionName, "isNewConsumer"#name);\
_configure->topicNameConsumer#... |
92a21e5a9b948bb6d3d816f1cfb4284506dbaa68 | 8743a9dd7607a985f74692ae01d62ee7c36a8fe9 | xulunfan/magma | /sparse-iter/testing/testing_cmatrixinfo.cpp | C++ | cpp | 1,953 | no_license | /*
-- MAGMA (version 2.0.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date February 2016
@generated from sparse-iter/testing/testing_zmatrixinfo.cpp normal z -> c, Tue Feb 9 16:06:18 2016
@author Hartwig Anzt
*/
// includes... |
748138101278c884c5570dd26cc451c7e527d314 | 94f81a46733073715ea2b7d72de00c6423154089 | Shkiper2012/1.0007rc1 | /xray/xr_3da/xrGame/ai/stalker/ai_stalker_misc.cpp | C++ | cpp | 6,555 | no_license | ////////////////////////////////////////////////////////////////////////////
// Module : ai_stalker_misc.cpp
// Created : 27.02.2003
// Modified : 27.02.2003
// Author : Dmitriy Iassenev
// Description : Miscellaneous functions for monster "Stalker"
////////////////////////////////////////////////////////////////... |
7b10f903f48e6540fbb8389e4734582901a70423 | 9e6870275ded506646fc2cacdb329a388763f99f | rohannstu/Algorithms | /Backtracking/HackerEarth - Its Confidential with backtrack.cpp | C++ | cpp | 396 | no_license | #include<bits/stdc++.h>
using namespace std;
string s;
void FuN(int lft,int rgt)
{
if(lft > rgt)
return;
int mid = (lft + rgt)/2;
printf("%c",s[mid]);
FuN(lft , mid-1);
FuN(mid+1 , rgt);
}
int main()
{
int n,t,T;
cin>>T;
for(t=1 ; t<=T ; t++){
cin>>n>... |
953b7917866c264346ffd7e7e8b8170e38dc8aa1 | 09d35ef935497c533c75b4b09ce9878b63d510bf | gfdac/AudioTK | /ATK/Tools/DecimationFilter.cpp | C++ | cpp | 515 | permissive | /**
* \file DecimationFilter.cpp
*/
#include <ATK/Tools/DecimationFilter.hxx>
#include <complex>
#include <cstdint>
namespace ATK
{
#if ATK_ENABLE_INSTANTIATION
template class DecimationFilter<std::int16_t>;
template class DecimationFilter<std::int32_t>;
template class DecimationFilter<int64_t>;
template c... |
d11aaef842100e166e926aab48366759a80c43c5 | 887728a1c6bde5fde50966a09c512db74504bdab | HeavenlyStriker/solution02 | /segmentTree/h.cpp | C++ | cpp | 2,550 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<long long, int> pli;
#define inf 1000000009
#define mod 1000000007
#define task "h"
#define maxn 200002
#define B 1000007
string s;
int len[maxn * 4];
ll lt[maxn], h[maxn * 4];
void init(int id, int l, int r){
if(l == r){
h[... |
c990a1546a51356297882e87396ebdd24a8033f7 | 9264b7427e1292e7e862d62b8a7950c0af7a665f | rajat1293/ALL_PROGRAMS | /codechf/NOV13/MCHAIR.cpp | C++ | cpp | 349 | no_license | #include<iostream>
#include<vector>
using namespace std;
#define MOD 1000000007
long long poww(int n,int m)
{
if(m==0) return (1)%MOD;
long long x=poww (n,m/2);
if(m%2==0) return (x*x)%MOD;
else return (((x*x)%MOD)*n) %MOD;
}
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
long long p=poww... |
0f02f80c17109812e240fa6b8c981151e3916843 | 229406bed992af356d249bdb478d1ac340ec8328 | vtns/tsduck | /src/libtsduck/dtv/descriptors/tsMPEG2StereoscopicVideoFormatDescriptor.cpp | C++ | cpp | 4,544 | permissive | //----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2021, Thierry Lelegard
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the f... |
e6c42d8670ce18d895fca7e69fd7c1b6c6f04935 | 7307a057967d1970e3e2448cf8db3116fed8db5a | xiaolongphoenix/test_process | /src/news_process.cpp | C++ | cpp | 36,305 | no_license | #define NDEBUG
#include "news_process.h"
#include <dirent.h>
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/inotify.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <signal.h>
#include <math.h>
#include "string_fun.h"
#inclu... |
2bb9a37fdc803726ef1c9f16288c89bd5ec34ac0 | 1c4c92ab033a20670f1ede8e94e2a616d2e38e2a | QuickRecon/x61keys | /volume/main.cpp | C++ | cpp | 1,154 | no_license | /*
http://stackoverflow.com/questions/11519759/how-to-read-low-level-mouse-click-position-in-linux
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/input.h>
#include <fcntl.h>
//select input here
#define VOLUMEKEYS "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
int main()
{
in... |
ff7ff97a5e824175afeecbe0f21308d7eed825ea | 0b633279b1f742b3bb7dd56d62fdbf4be7964817 | aman955/Competitive-Coding | /Before November 2016/october/palindrome index.cpp | C++ | cpp | 836 | no_license | #include<iostream>
#include<string>
using namespace std;
int check(string l,int n);
int check(string l,int n)
{
for(int i=0;i<(n+1)/2;i++)
{
if(l[i]!=l[n-i-1])
{
return 0;
}
}
return 1;
}
int main()
{
int t;
cin>>t;
long i,n;
string str,k;
while(t--)
{
cin>>str;
n=str.... |
dcbf14cfce513a187949695e296517b457076b1f | aca7e930047ba40d79af77532fc4cb33933ccfb1 | pubgrub/CNCduino | /src/Input.cpp | C++ | cpp | 1,092 | no_license | #include <Arduino.h>
#include <Input.h>
#include <InputList.h>
#include <Bounce2.h>
extern InputList inputList;
void Input::attach( int input) {
bounce = Bounce();
bounce.attach( input);
bounce.interval( 5);
status = INPUT_OFF;
inputList.registerInput( this);
timeAtLastChange = millis();
}
int Input::get... |
936d1e0d2d56319277f2597c404c990565d8ae57 | 2fc550be61a696d79d206a95a2a6acb09f5293f6 | sgzwiz/xbox_leak_may_2020 | /xbox_leak_may_2020/xbox trunk/xbox/private/test/ui/tools/menus/xitem.cpp | C++ | cpp | 1,519 | no_license | /*****************************************************
*** xitem.cpp
***
*** CPP file for our abstract base class for a
*** generic screen of our XDash Config program.
***
*** by James N. Helm
*** November 2nd, 2000
***
*** Modified
*** 12/03/2000 - by James N. Helm for XShell
*** 03/09/2001 - by James N. H... |
f51b0d397dae07a02645d82477d138a0f4139e51 | feec8fb255c3f9b4c15807e22f43e9433aad56d8 | avaneendra/folly | /folly/Format.cpp | C++ | cpp | 3,660 | permissive | /*
* Copyright 2014 Facebook, 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/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
831abc0d33854d436b25e50beee001ecdfb9c5d5 | 1f5a35a9d381623354163eea1fca48bfacbb03ea | thegamer1907/Code_Analysis | /DP/1924.cpp | C++ | cpp | 429 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m,i,v;
while(cin>>n>>m){
int a[n],s[n];
for(i=0;i<n;i++)
{
cin>>v;
a[i]=v;
}
map<int,bool>d;
for(i=n-1;i>=0;i--)
{
d[a[i]]=true;
s[i]=d.size();
}
... |
6fa296843ec4f32dab8486322e66e4078a0b9fb0 | 9a7a3f308e99ddfa6bf1b005bed6b90e15936f16 | mlz000/Algorithms | /leetcode/699.cpp | C++ | cpp | 873 | no_license | const int N = 1005;
vector<int> ans;
int l[N], r[N], h[N];
class Solution {
public:
vector<int> fallingSquares(vector<pair<int, int>>& a) {
int n = a.size();
ans.clear();
memset(l, 0x3f3f3f3f, sizeof(l));
memset(r, -1, sizeof(r));
memset(h, 0, sizeof(h));
for (int i =... |
e8e1263ff3fa21c5173c5175c32f53adc100625a | bd32de6c33da8dd8003b6c4deaaed6da3d8e3494 | TeamVault/tauCFI | /C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-19503.cpp | C++ | cpp | 4,277 | no_license | struct c0;
void __attribute__ ((noinline)) tester0(c0* p);
struct c0
{
bool active0;
c0() : active0(true) {}
virtual ~c0()
{
tester0(this);
active0 = false;
}
virtual void f0(){}
};
void __attribute__ ((noinline)) tester0(c0* p)
{
p->f0();
}
struct c1;
void __attribute__ ((noinline)) tester1(c1* p);
struct c1 : virtual... |
f0856c6e6cd37b50d38bf1430db16379175fb863 | f678d2359603c8b8f58462e10b82dd546d1ff5ee | pan2za/ctrl | /controller/src/dns/agent/agent_xmpp_init.cc | C++ | cc | 1,621 | permissive | /*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include "base/logging.h"
#include "base/contrail_ports.h"
#include "xmpp/xmpp_init.h"
#include "pugixml/pugixml.hpp"
#include "cmn/dns.h"
#include "agent/agent_xmpp_init.h"
#include "agent/agent_xmpp_channel.h"
using namespace boost::asio;
boo... |
48bf68b797af01a864a11b98850a493a827e1184 | fc3806aabe8f0a88c4abffdddb7f64b7fffbf64b | ifeelagood/Game-glfw | /components/ObjModel.cpp | C++ | cpp | 3,441 | permissive | //
// Created by Cod3r Kane on 29/10/2016
//
#include "ObjModel.h"
ObjModel::ObjModel(Shader &shader, const RawModel &rawModel) {
this->shader = &shader;
this->rawModel = &rawModel;
}
void ObjModel::render() {
this->shader->use();
mat4 transformationMatrix = this->maths.createTransformationMatrix(
... |
4ebe00cc47681fb4479d00345c451eb376724943 | b268fede3f648efbcb4b2148e249039593327fae | bokse/koi | /UNION_FIND/2463.cpp | C++ | cpp | 796 | no_license | #include<stdio.h>
#include<algorithm>
using namespace std;
typedef long long ll;
const int MN = 100000 + 5;
int N,M;
int p[MN],sz[MN];
struct EDGE{
int a,b,c;
bool operator <(EDGE A)const{
return c>A.c;
}
}edges[MN];
int par(int n){
if(p[n]==n)return n;
return p[n]=par(p[n]);
}
void merge(int a,int b,ll &cou... |
447acf81739ee92474f33c464f67997b95c3b6ac | debf7854e79cd84d5318372ac12fa8b146d8ba5c | jhyeom26/cpp-practice | /error-code/src/mylib_error.cpp | C++ | cpp | 2,040 | no_license | #include "mylib_error.h"
#include "flights.h"
#include "seats.h"
namespace {
class FailureSourceCategory : public std::error_category
{
public:
const char* name() const noexcept override;
std::string message(int ev) const override;
bool equivalent(
const std::error_code& code,
int condition) const ... |
14222db0fd9540c8e1592398200838ac9abcd066 | 7be50fb3581dcb8b0292079c815e5abdf0e6fb71 | ahmedmanaa21/Projet2A10_SmartCinema | /fady/main.cpp | C++ | cpp | 697 | no_license | #include "fady.h"
#include "connexion.h"
#include <QMessageBox>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
connexion c;
bool test=c.ouvrirConnexion();
if(test)
{
QMessageBox::information(nullptr, QObject::tr("Database is open"),
... |
7ec31df3411b2d1cb4f92517830d88f4c8b9a58f | fc5213a1b49a33248fdb8c8ff8a9ccd5109f0865 | FenixFeather/zooming-presentation | /main.cpp | C++ | cpp | 1,595 | no_license | /*
main.cpp -- An SFML app for making zooming presentations.
*/
#include <iostream>
#include <vector>
#include <string>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include "AbstractMode.hpp"
#include "ViewMode.hpp"
int main(int argc, char* argv[])
{
AbstractMode* viewWindow = new ViewMode(argc > 1... |
d918ee76f164eddd007f012f25c36b83301cbb9f | b51a427ab75f52bf87b9c331e2a48cdc5999663d | herox25000/oathx-ogrex-editor | /YouLe/You_系统模块/系统模块/客户端组件/游戏大厅/GameRoomManager.cpp | C++ | cpp | 8,242 | no_license | #include "StdAfx.h"
#include ".\gameroommanager.h"
CGameRoomManager::CGameRoomManager(void)
{
}
CGameRoomManager::~CGameRoomManager(void)
{
RemoveAllTable();
}
//进入房间
void CGameRoomManager::EnterRoom(CListServer * pListServer)
{
//判断状态
tagGlobalUserData & GlobalUserData=CGlobalUnits::GetSinglet... |
ef75329f7c6886c085839be371e6c0a4a32976c7 | 5b5c69d0cc9cf7c0f9f7501fde5e1d30bdaedc41 | czxxjtu/wxPython-1 | /tags/wxPy-2.8.6.1/src/common/docview.cpp | C++ | cpp | 66,263 | no_license | /////////////////////////////////////////////////////////////////////////////
// Name: src/common/docview.cpp
// Purpose: Document/view classes
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
///////... |
a70926bbfc06567851e7269fb946790e56ffdfbb | c51eb40b14db079ae8db009747439bd9bc2b79ad | st1page/ACMcode | /[stonepage复(切)健(水)][kuangbin带你飞]专题一简单搜索[Cloned]/POJ - 3126.cpp | C++ | cpp | 1,597 | no_license | #include<cstdio>
#include<cstring>
using namespace std;
typedef long long ll;
int gn(){
int x=0,f=1;
char ch=getchar();
while(ch<'0'||'9'<ch){if(ch=='-')f=-1;ch=getchar();}
while('0'<=ch&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return f*x;
}
#define N 11234
int prime[N],tot;
bool mark[N];
int decode(... |
ea2d164449c93dc60cfed4e67fed3a17f4fb6a44 | b18de2c20f07f63aa9ef0fcc92bd482bc0f536fa | aherreraz/UVa-Solutions | /C++/11760 - Brother Arif, Please feed us!.cpp | C++ | cpp | 892 | no_license | #include <bits/stdc++.h>
using namespace std;
map<int, int> X, Y;
int n, m, q, auxX, auxY, x, y;
map<int, int>::iterator itX, itY, it1, it2, it3, it4, it5, it6;
int main()
{
int caso = 1;
while (scanf("%d %d %d", &n, &m, &q) == 3 && (n || m || q))
{
X.clear(); Y.clear();
for (int i = 0; i < q; i++)
scanf("%d ... |
fcdcab75688c3487785433ce9487de4d734d1c24 | 7ec63654706e8423db03aa07edfc93d1e79f608c | mikathesmith/ComputerGraphics | /OpenGl-lab-solutions/lab8/common/Scene.hpp | C++ | hpp | 827 | no_license | /*
* Scene.hpp
*
* Class for representing a scene. Can have multiple child nodes (objects).
* Has a rendering function that takes care of rendering all objects in the scene.
* by Stefanie Zollmann
*
*/
#ifndef SCENE_HPP
#define SCENE_HPP
#include <vector>
#include "Object.hpp"
//! Scene.
/... |
5826e3f4d808767aa36631a7074aa57bac87b9fd | 6998e45e1091f2cd19d06e086b6ec09e3c1ff669 | Praccen/LudumDare49 | /src/Engine/ECS/Components/CollisionComponent.hpp | C++ | hpp | 354 | no_license | #pragma once
#include "Component.hpp"
#include "Engine/Physics/Shape.hpp"
class Entity;
class CollisionComponent : public Component
{
public:
Shape shape;
std::vector<Entity*> currentCollisionEntities; //List of collisions happening right now (this frame)
bool isConstraint;
bool effectMovement;
float allowedClim... |
72f9f9b99faa8d310495845f14a4ace2ab94e570 | 6b4c71261d44e46edf76ac2c348a6a6464359356 | jkl0727/algorithm | /Jungol/1332_naming.cpp | C++ | cpp | 671 | no_license | #include <iostream>
#include <string>
#include <stack>
#pragma warning(disable: 4996)
using namespace std;
void make_pi(string s, int* pi, int N);
int main(void) {
string s;
//freopen("input.txt", "r", stdin);
cin >> s;
int N = s.size();
int *pi = new int[N + 1];
make_pi(s, pi, N);
int i = N;
stack<i... |
86019094ac1842517d9fab9250f5dbd067e03937 | 0040f2417fa6beec5306d4532fdc00bf7adcfa4c | brindosch/hyperion.ngBeta | /libsrc/utils/JsonUtils.cpp | C++ | cpp | 3,758 | permissive | //project include
#include <utils/JsonUtils.h>
// util includes
#include <utils/jsonschema/QJsonSchemaChecker.h>
//qt includes
#include <QRegularExpression>
#include <QJsonObject>
#include <QJsonParseError>
namespace JsonUtils {
bool readFile(const QString& path, QJsonObject& obj, Logger* log, bool ignError)
{
... |
92f007adc9248ab9190894b0735a43095a1fb6a3 | 18861a7e97ccfdffd2068a9ba54ee2918c34b3ee | dqthebt24/opencv_grpeach_mbed | /opencv_3_1/opencv2/objdetect/src/haar.cpp | C++ | cpp | 109,818 | permissive | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
c71e4dc5466f1e18c7fd346e04bc1026a1680d7a | 5b4cd4485b71f7abf869d70a470bc4f87b9aa95b | liruqi/topcoder | /POJ/3249/3271064_AC_4063MS_14456K.cc | C++ | cc | 1,256 | no_license | #include<vector>
#include<algorithm>
using namespace std;
typedef vector<int> VI;
#define mx 100001
VI adj[mx];
int prf[mx], idgr[mx], odgr[mx], dp[mx];
int n,m;
char vst[mx];
int stk[mx],top;
void dfs(int u){
int i;
VI &cur=adj[u];
vst[u]=1;
for(i=0;i<odgr[u];i++)
if(!vst[cur... |
8404be8697a1a78ad961d22a6ec3b6dde6939051 | 3dfeb99fdc1f001ecbeff84c2550ecffebc5674d | thibaultspriet/CPP_projects | /BE/YeuxDecorator.cpp | C++ | cpp | 2,661 | no_license | #include "YeuxDecorator.h"
#include <iostream>
#include <random>
#include <cmath>
using namespace std;
const double YeuxDecorator::ALPHA_MIN = M_PI / 6.0;
const double YeuxDecorator::ALPHA_MAX = M_PI;
const double YeuxDecorator::DIST_MIN = ICreature::LIMITE_VUE;
const double YeuxDecorator::DIST_MAX = ICreature::LIM... |
148bbc012194710b9b6eb6ff81d1a5bf2c1f0f88 | c045f9fb4d8239d010cdb05bedcf8181cd71929b | Lan-ce-lot/overflow | /训练赛/华/题解/c/text.cpp | C++ | cpp | 1,370 | no_license | /*************************************************************************
> FileName:
> Author: Lance
> Mail: lancelot_hcs@qq.com
> Date: 9102.1.8
> Description:1.Ê÷µÄ±éÀú
************************************************************************/
//#include <bits/stdc++.h>
#pragma comment(linke... |
7492772f769aaa00c91033d445d9a8ad1e792579 | c90e50ab03ffe802274464b12a1f6e40e2005385 | Jyf624761709/Luogu | /AC/P1553.cpp | C++ | cpp | 1,424 | no_license | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
char s[25],t;
int l,pd=1,xb=0,tx=0;
bool p=1;
gets(s);
l=strlen(s);
for(int i=0;i<l;i++){
if(s[i]=='.'){
pd=2;
xb=i;
}
if(s[i]=='/'){
pd=3;
xb=i;
}
if(s[i]=='%')
pd=4;... |
ee059b7373e265e566d9d2d5264a44c860f28219 | 45ed73f9c65e4d32a56e81c45496b39779ddc0be | kevycheng/brokkr | /src/core/transform-manager.cpp | C++ | cpp | 3,736 | permissive | /*
* Copyright(c) Ferran Sole (2017-2019)
*
* This file is part of brokkr framework
* (see https://github.com/fsole/brokkr).
* The use of this software is governed by the LICENSE file.
*/
#include "core/transform-manager.h"
#include <algorithm>
using namespace bkk::core;
handle_t transform_manager_t::createTransform... |
5a4b8c67aed8a827f7d3c8ab61327d4416b317d5 | 23143e6559dfca89ef974ab9cc5770f4d63c6121 | seahorn/crab | /tests/domains/test9.cc | C++ | cc | 1,885 | permissive | #include "../common.hpp"
#include "../program_options.hpp"
using namespace std;
using namespace crab::cfg;
using namespace crab::cfg_impl;
using namespace crab::domain_impl;
z_cfg_t *cfg1(variable_factory_t &vfac) {
/*
i := 0;
x := 1;
y := 0;
while(i <= 99) {
x = x + y;
y = y + 1;
i = ... |
d128ae5df366fdaba883e7dc94c0fbc14e5381b0 | 733c42cf622daccf9709c56cc20401ab14076a19 | vpsetter/HW-2sem | /HW 3 (15)/3.4.cpp | C++ | cpp | 5,466 | no_license | #include <functional>
#include <iostream>
#include <string>
#include <set>
#include <iomanip>
#include <random>
#include <chrono>
#include <vector>
#include <map>
std::set < std::string > make_random_words(std::size_t N, std::size_t length)
{
std::uniform_int_distribution <> letter(97, 122);
std::default_random_engi... |
2099e5cc7d380a768d5968c151760774a9d735f5 | 7e97c89ff0c25d71e37b88da4049ebcabda180d4 | ngthvan1612/Codeforces | /584B.cpp | C++ | cpp | 1,395 | no_license | ///created: 29/Jun/2019 18:17:04
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int modulo = 1e9 + 7;
#ifdef LOCAL_DEBUG_NTV1612
template<class __Ty>
string to_string(__Ty a) {
string res = "[ ";
bool f = true;
for (auto &p : a) { res += (f ? string("") : str... |
fbe6c7f3ea20f88012a3966cd46ed24669abb143 | 504ef23e0c9cafd519e9b59182afd3287eaeee97 | rpuntaie/c-examples | /cpp/thread_shared_mutex.cpp | C++ | cpp | 2,080 | permissive | /*
g++ --std=c++20 -pthread -o ../_build/cpp/thread_shared_mutex.exe ./cpp/thread_shared_mutex.cpp && (cd ../_build/cpp/;./thread_shared_mutex.exe)
https://en.cppreference.com/w/cpp/thread/shared_mutex
*/
#include <iostream>
#include <mutex>
#include <shared_mutex>
#include <thread>
class ThreadSafeCounter {
public:
... |
b34e66f0916cbc00d33ca5f563792830e3b7bf37 | a1d3f2d858e273116e29c263573a35124e8069d6 | govg/podcuda | /magma-1.5.0/testing/testing_spotf2_gpu.cpp | C++ | cpp | 4,871 | no_license | /*
-- MAGMA (version 1.5.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date September 2014
@generated from testing_zpotf2_gpu.cpp normal z -> s, Tue Sep 2 12:38:28 2014
*/
// includes, system
#include <stdlib.h>
#include <stdio.h>
#... |
ee7aad9285c4ed36d2a6ff1264c6da49a2e4b754 | 0c0a9eaf2747f0c75c4372ed83e273b1acd94f75 | bdepardo/libdadiCORBA | /core/utils/SSHTunnel.cc | C++ | cc | 15,290 | permissive | /**
* @file SSHTunnel.cc
*
* @brief DIET forwarder implementation - SSH Tunnel implementation
*
* @author Gaël Le Mahec (gael.le.mahec@ens-lyon.fr)
*
* @section Licence
* |LICENCE|
*/
#include "SSHTunnel.hh"
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <fstream>
#i... |
d15330db33654c872b5a47648c0ad41338ad112a | e2c4f049d38e43a3fc460c12d64815294b44bfbf | jukha/LinkedListRelatedProgramsC- | /addToHead.cpp | C++ | cpp | 687 | no_license | #include<iostream>
using namespace std;
struct node
{
int num;
node *next;
}*head,*tail;
//AddToHead
void addToHead()
{
node* n = new node;
cout << "Enter the value: ";
cin >> n->num;
n->next = NULL;
if(head == NULL)
{
head = n;
tail = n;
}
else
{
n -> next = head;
hea... |
61b4b50217c0ed3251d50e0baacb19117ef23e2d | dd0f04ec25bc71774c917ef1cdfcf52928fde68e | traderwerks/node-webkit | /src/shell_content_client.cc | C++ | cc | 2,076 | permissive | // Copyright (c) 2012 Intel Corp
// Copyright (c) 2012 The Chromium Authors
//
// 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 righ... |
ddff9e47d956857b879b2225c6b4f2be1b1498f7 | bfeae894a4a6354ae7e806e8b74c3669629ecca3 | Laguland/memkind | /test/memkind_pmem_tests.cpp | C++ | cpp | 49,387 | permissive | /*
* Copyright (C) 2015 - 2019 Intel Corporation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice(s),
* this li... |
b7d813d27e968afd574a951a919882f3e4931c1e | b260798f464a9f7bbe729087cb869aa3a1fd1a9f | lazymonday/PS | /baekjoon/10845_queue/main.cpp | C++ | cpp | 1,267 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
const int MAX = 2e4;
const int INF = 2e9;
typedef long long ll;
int n;
int a[MAX + 1];
int front_ = 0;
int back_ = 0;
int size_ = 0;
int size() {
return size_;
}
int front() {
if (size_ == 0) return -1;
return a[front_];
}
int back() {
i... |
b06d5dead880bf8e94c6ab27e3b7eb39030776b2 | 2bf65c1f3097d388263f6997f1bc3a4e86e46b98 | moteesh-in2tive/chromium | /chrome/browser/enterprise/connectors/device_trust/mock_device_trust_service.cc | C++ | cc | 489 | permissive | // Copyright 2021 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/enterprise/connectors/device_trust/mock_device_trust_service.h"
namespace enterprise_connectors {
namespace test {
MockDeviceTr... |
fb1cf510d51ae5a5637dca92b423f9edc256e735 | 05784d99469fb092868ddf078d64a7c7f499985f | CppFundamentalsPart1/set5 | /34/copycat/nelements.cpp | C++ | cpp | 209 | no_license | #include "copycat.ih"
size_t CopyCat::nElements(char const *const *const arr)
{
size_t size = 0;
while (arr[size] != 0) // increment size until null byte is found
++size;
return size;
} |
b6df63c062709f2e2dd406c4fb7b119070421984 | ff086e4038acc457db683381918dd664526d2c77 | ddNTP/My-Code | /PAT甲级题解/1054.cpp | C++ | cpp | 547 | no_license | #include<iostream>
#include<map>
using namespace std;
typedef long long ll;
int main() {
int m, n;
cin >> m >> n;
map<ll, int>a;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
int t;
cin >> t;
if (a.find(t) == a.end())a[t] = 1;
else a[t]++;
}
}
int max=0;
for (auto i... |
8ceeee8c0c7d33ee4465ef26af9609aecb7cb91e | efe290c85ee760bab26164cd3505069795c1d03c | dahahua/pap_wclinet | /client/Client/CEGUI/CEGUI/src/CEGUIVector.cpp | C++ | cpp | 399 | no_license | /************************************************************************
filename: CEGUIVector.cpp
created: 14/3/2004
author: Paul D Turner
purpose: Implements Vector class methods
*************************************************************************/
#include "CEGUIVector.h"
// Start of CEGUI na... |
21ccd6cfb95969825df6e10c549e411f33db1693 | 4d831cd3001cf80b66d267a576d3f3e21de6e674 | sx-aurora-dev/tensorflow | /tensorflow/compiler/xla/tests/array_elementwise_ops_test.cc | C++ | cc | 111,471 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
e1f899b7f50086824314eabaf4798599109fc1b7 | ccdc4e647a9ba94d85756e0a9e9558f9c7ddce99 | sheride/axion_pheno | /optimization/pta_maa_optimization/tight_analyses/analysis_tight_pta150_maa250/Build/SampleAnalyzer/User/Analyzer/user.cpp | C++ | cpp | 8,742 | permissive | #include "SampleAnalyzer/User/Analyzer/user.h"
using namespace MA5;
bool user::Initialize(const MA5::Configuration& cfg,
const std::map<std::string,std::string>& parameters)
{
// Initializing PhysicsService for MC
PHYSICS->mcConfig().Reset();
// definition of the multiparticle "hadronic"
... |
0c06f05203771168af17cfe33c2259802772630d | 5c3a96b09e0645fa025419c99ad53ec160b359ac | epsilon-0/wayfire | /plugins/decor/decoration.cpp | C++ | cpp | 2,229 | permissive | #include <wayfire/per-output-plugin.hpp>
#include <wayfire/view.hpp>
#include <wayfire/matcher.hpp>
#include <wayfire/workspace-manager.hpp>
#include <wayfire/output.hpp>
#include <wayfire/signal-definitions.hpp>
#include "deco-subsurface.hpp"
#include "wayfire/plugin.hpp"
#include "wayfire/signal-provider.hpp"
class... |
d7f95b4eea1e35307c20c07ed8968ab7810d5f92 | 9988d993859033f692ae3cae5e3972e650743b67 | prakharvk/Tenet | /Simulation Codes/pursuit.cpp | C++ | cpp | 805 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
vector<float> xf(12),yf(12),xb(12), yb(12);
float vf;
printf("Enter Target path, xb[t] & yb[t]:");
for(int i=0;i<12;i++) cin>>xb[i]>>yb[i];
printf("Enter Fighter's Initial path, xf[0] & yf[0]:");
cin>>xf[0]>>yf[0];
printf("... |
6751a973dbb0d6dd60899529ffffab9bf964055f | abd79ce99f29eaadd48932a556b54d06116e4585 | AyahElsayed/data-structure | /pointer.cpp | C++ | cpp | 366 | no_license | #include <iostream>
using namespace std;
int main()
{
int x = 20;
int* ptr = &x;
cout << *ptr <<"\n"; // 20
cout << ptr <<"\n"; // address
*ptr = 25;
cout << *ptr <<"\n" ; // 25
// create pointer in one line
// ======================
int* ptr2 = new int(50) ;
cout... |
67bfd408af1c8ce9da9939f7f3a4a65a783ec8f6 | 66491bf6fd9b037322614ff483b231dbd33c0e4c | Intel-Media-SDK/MediaSDK | /_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_dpb_report.cpp | C++ | cpp | 2,714 | permissive | // Copyright (c) 2019-2020 Intel Corporation
//
// 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,... |
4290f9a965e41bfc4aeb5c10934ad04ba1a1347f | 521598bb0c39f7ccd585fd2f97807778cf0fa8d7 | efranzis/AliPhysics | /PWGCF/EBYE/NetLambda/AliAnalysisTaskNetLambdaTrad.cxx | C++ | cxx | 17,387 | no_license |
// For: Net Lambda fluctuation analysis via traditional method
// By: Ejiro Naomi Umaka Apr 2018
// Updated Mar 3
#include "AliAnalysisManager.h"
#include "AliInputEventHandler.h"
#include "AliESDEvent.h"
#include "AliAODEvent.h"
#include "AliMCEvent.h"
#include "AliAODTrack.h"
#include "AliESDtrack.h"
#include "Ali... |
d183eefb001cf7297d32932e9f8f1b13e9897b0a | 1d3072cf104be9da059988adf17aaa9280777929 | samyakshah/selenium | /cpp/iedriver/IECommandExecutor.cpp | C++ | cpp | 43,155 | permissive | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the "License");
// you may... |
4c48be5550326d898fa69110876281a153655b8e | 1f852018571877aa31f0903b43e1890767e38c67 | dmagiccys/pfmabe | /ABE/examGSF/examGSF.cpp | C++ | cpp | 89,838 | no_license |
/*********************************************************************************************
This is public domain software that was developed by the U.S. Naval Oceanographic Office.
This is a work of the US Government. In accordance with 17 USC 105, copyright protection
is not available for any work o... |
b19e0b934c6ca0d56b1cfe30ab6b1e13eb2fa80d | cc53c0c738751486b6c4babd41213d78cbda5a5a | Hard3r/HellsBalls | /Private/Bot.cpp | C++ | cpp | 9,297 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "HellsBalls.h"
#include "Bot.h"
#include "Perception/PawnSensingComponent.h"
#include "HellsBallsCharacter.h"
#include "AIControllerCPLUS.h"
#include "AIController.h"
#include "Engine.h"
#include "Weapon.h"
#include "Drop.h"
// ... |
d3296af2c150b781050097123587992589d5817e | 89bfb4e2760a0a2997eb41b5a77000a184f08c07 | ITC-Vanadzor/ITC-7 | /Araksya_Hambaryan/Homework/C++/Homework_04_11_2015/Astichan.cpp | C++ | cpp | 435 | no_license | #include <iostream>
int ast(int n, int m) {
if (m==1) {
return n;
}
if (m==2) {
return n*n;
} else {
if (m%2==0) {
return ast(n*n, m/2);
} else return ast(n*n, (m-1)/2)*n;
}
}
int main () {
int n=0;
do {
std::cout << "n= ";
std::cin >> n;
} while (n<1);
int m=0;
do {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.