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 |
|---|---|---|---|---|---|---|---|---|
5cf8cff9ba2fbcf8e300e148827068608e826293 | 263a9ac2ac4626e905bec2d7501311b54a2079a0 | agrechnev/cpp-course-2020 | /examples/11/e11_2/main.cpp | C++ | cpp | 3,079 | no_license | // Example 11.1 Template : variadic, metaprogramming
// Created by Oleksiy Grechnyev 2017
#include <iostream>
#include <string>
#include <vector>
#include <type_traits>
using namespace std;
//==============================
// Template functions
//==============================
// Variadic
// Size of the variadic pack... |
233c57e1213c356feb9a5d91cca8d9d5b7ec5ed1 | 5375f72fe9b4968135b8af171ee5e36c79ce6e4c | ysiraichi/ProgrammingContests | /uri/success/1235.cpp | C++ | cpp | 450 | no_license | #include <string>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int tests;
cin >> tests;
cin.ignore(100, '\n');
for (int t = 0; t < tests; t++) {
string s, front, back;
getline(cin, s);
front = s.substr(0, s.length()/2);
back = s.substr(s.length()/2, s.length... |
435f15037836c53ee08f11a7313de95144379520 | 009a2f38f28dbe91c835c3fc9da879b384a63f0d | stefan2904/sweb | /utils/sweb-img-util/tasks/UtilTask.cpp | C++ | cpp | 1,975 | no_license | /**
* Filename: UtilTask.cpp
* Description:
*
* Created on: 01.09.2012
* Author: chris
*/
#include "UtilTask.h"
#include "fs/VfsSyscall.h"
#include "fs/device/FsDeviceFile.h"
#include "Program.h"
#include "PartitionInfo.h"
#include "ImageInfo.h"
#include <iostream>
#include <assert.h>
UtilTask::UtilTask(Program... |
618c06e2caefbce752dfdd9545b6cdd0954fb5b0 | b4cb8ee77a0408f7a247acdfcca94e980dae8adb | KSHS-POINTER-28th/Algorithm-Seminar-Material | /1 - Time complexity and analysis/BOJ1436.cpp | C++ | cpp | 616 | no_license | #include <iostream>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n = 0;
cin >> n;
int cnt = 0;
for (int i = 1; i <= n*10000; i++) {
int i_t = i;
int cnt2 = 0;
while (i_t != 0) {
if ((i_t % 10) == 6) {
... |
fe20baad92afc8c54ba7ae2ef8bb5db42b88e234 | 98b64069fd658eb8c5b12eb38e9fadf3e67461eb | jurdan21/ReVir-UFPe | /nsis-ka/sessionauth/src/auth_attr_hmac_trans_id.cpp | C++ | cpp | 3,013 | no_license | #include "auth_attr_hmac_trans_id.h"
#include "logfile.h"
namespace nslp_auth {
auth_attr_hmac_trans_id::auth_attr_hmac_trans_id(uint16 id) : auth_attr(AUTH_ENT_ID, HMAC_SIGNED),ie_name("HMAC transform ID"),transId(id) {
}
/*
* Destructor
*/
auth_attr_hmac_trans_id::~auth_attr_hmac_trans_id(){
}
auth_attr_hmac_... |
f40dbb32d26dae3439b87d57d092fe4999a0442b | 61f659add609ea095e3572380c59113b0ed76834 | cacarolita/prueba | /tpi-template-alumnos/tests/ej3TEST.cpp | C++ | cpp | 487 | no_license | #include "gtest/gtest.h"
#include "../ejercicios.h"
TEST(esReunionValida, reunionNoCuadrada) {
int prof = 8;
int freq = 10;
senial Sig1 = { 17, -128, 128 , 18, 15, -16, 0, 17, -20, 19, -18};
senial Sig2 = { 17, -128, 127 , 18, 15, -16, 0, 17, -20, 19, -18};
senial Sig3 = { 17, -128, 127 , 18, ... |
44fd6c5c4963882e46c0aa8b8b85d3c492e0c3cd | 593539d3eee7bddfcb469b9cb039210e009f113d | Mo-Abdelgawad/armnn | /src/armnn/LoadedNetwork.cpp | C++ | cpp | 29,624 | permissive | //
// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "LoadedNetwork.hpp"
#include "Layer.hpp"
#include "Graph.hpp"
#include "Network.hpp"
#include <Processes.hpp>
#include "Runtime.hpp"
#include "Profiling.hpp"
#include "HeapProfiling.hpp"
#include <armnn/B... |
0ab0924bac81e612b8a2d3b1ec18e744b1001803 | e6bca16765c2c580b82c72cfe15f216578d3f201 | rrnewton/temp-data-structure-benchmark | /cds-0.8.0/tests/unit/map/map_insdel_item_string_mt.cpp | C++ | cpp | 11,904 | no_license | /*
This file is a part of libcds - Concurrent Data Structures library
See http://libcds.sourceforge.net/
(C) Copyright Maxim Khiszinsky [khizmax at gmail dot com] 2006-2011
Version 0.8.0
*/
#include "map/map_types.h"
#include "cppunit/thread.h"
#include <vector>
namespace map {
# defin... |
aaf82d8810762fd8967d722d447affe41ebca752 | 23201398bbe1145f3926f4cff049b47833a298f1 | denis-gubar/Leetcode | /Binary Search/1337. The K Weakest Rows in a Matrix.cpp | C++ | cpp | 451 | no_license | class Solution {
public:
vector<int> kWeakestRows(vector<vector<int>>& mat, int k) {
vector<int> result;
for (int i = 0; i < mat.size(); ++i)
result.push_back(i);
sort(result.begin(), result.end(), [&mat](int a, int b)
{
int A = accumulate(mat[a].begin(), mat[a].end(), 0);
int B = accumulate(mat[b]... |
3440f77c1259e57e5648913e99e57412f7f88b19 | d7c9431b2090e992fd7f3a83d29132550421f69f | maaraujo94/cmssw | /RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByIsolationContainer.cc | C++ | cc | 32,384 | permissive | #include <functional>
#include "RecoTauTag/RecoTau/interface/TauDiscriminationProducerBase.h"
#include "DataFormats/Candidate/interface/LeafCandidate.h"
#include "RecoTauTag/RecoTau/interface/RecoTauQualityCuts.h"
#include "RecoTauTag/RecoTau/interface/RecoTauVertexAssociator.h"
#include "RecoTauTag/RecoTau/interface/C... |
9441d5d061b3c5630746084fd8f9f5270c00774d | 0d4e314d0f0ce737add19af3c06dad918a89ec7b | zhenghuadai/codelibrarydzh | /algorithms/dp/pascal_triangle_test.cpp | C++ | cpp | 521 | no_license | /*
* =====================================================================================
*
* Filename: pascal_triangle_test.cpp
*
* Description:
*
* Version: 1.0
* Created: 06/10/2015 8:57:07 PM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
... |
56a8458589e76973ffdaf31d6bea2052ee436747 | e9d4b0f4eccd537b1323833dc089ebe48f1e3103 | ArthurREGNARD/AquaMan | /LedRampe/src/Sensors.cpp | C++ | cpp | 2,069 | no_license | #ifndef SENSORS_cpp
#define SENSORS_cpp
#include "Sensors.h"
#define ADC_PS2 _BV(ADPS0)
#define ADC_PS4 _BV(ADPS1)
#define ADC_PS8 _BV(ADPS1) | _BV(ADPS0)
#define ADC_PS16 _BV(ADPS2)
#define ADC_PS32 _BV(ADPS2) | _BV(ADPS0)
#define ADC_PS64 _BV(ADPS2) | _B... |
64e60f638c3e50d8bd9287e4822c04c97bb55087 | da7a9c5c77e80544393a852dc7279946b3fdebf4 | kevyin/small-query-database | /testrecord.cpp | C++ | cpp | 3,981 | no_license | #include "record.h"
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE const_string test
#include <boost/test/unit_test.hpp>
#include <cassert>
#include <fstream>
#include <sstream>
#include <string>
#include <utility>
using namespace std;
#include "utility.h"
#include "fraction.h"
template<class Value>
void ... |
e58f71199bb5d30860aa0109f7fff42e28121b69 | 6bccf13ff3d7456ba907b88a55aaf09f88f2c09f | thegamer1907/Code_Analysis | /Graphs/1982.cpp | C++ | cpp | 1,024 | no_license | #include <iostream>
#include <vector>
using namespace std;
const int mn = 100007;
int ans = 0;
vector<bool> used(mn, false);
vector<int> cat(mn);
vector<vector<int>> edges(mn);
void dfs(int e, int now, int m){
used[e] = true;
if (cat[e] == 1){
++now;
if (m == now... |
d3eba4782d1874df4db687002eda0b43a74dc720 | 13e5e7873057df4d013e3c3705dcfbfec3d0f348 | tinitis0/Simple-Calculator | /Arithmetic Calculator/simpleCalculator P2447902.cpp | C++ | cpp | 3,597 | no_license | #include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
//Defining and initializing variables
int choice; // this is for the menu where user gets a choice of adding, subtracting, multiplying, dividing and exit.
int num1, num2, ans; // these variables will be used when user has tp ... |
5e349aa6091be8a326ed564b86e4376b13354344 | ef82b158342412f9922b846687edee725b0329f5 | imclab/JamomaAudioGraph | /extensions/AudioGraphUtilityLib/AudioGraphUtilityLib.cpp | C++ | cpp | 709 | permissive | /*
* AudioGraphUtilityLib
* Extension Class for Jamoma DSP
* Copyright © 2010, Timothy Place
*
* License: This code is licensed under the terms of the "New BSD License"
* http://creativecommons.org/licenses/BSD/
*/
#include "TTDSP.h"
#include "TTAudioGraphJoin.h"
#include "TTAudioGraphOffset.h"
#include "TTAu... |
45e538390153fa7b1310e003d5fcccaf16786f81 | 50281f8747e753facb687e82667c9c4021f7054f | sadrulhc/chromium | /third_party/blink/renderer/core/html/portal/portal_post_message_helper.cc | C++ | cc | 4,242 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/html/portal/portal_post_message_helper.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/p... |
4f7398fbc72cf93e66a8a422d106415d17b9c151 | 6cf6c06a7f2c83fdae197e0f8852e0e66a0955a5 | st4ll1/effetball | /src/Field.cpp | C++ | cpp | 698 | no_license | /*
Effet Ball - QPT1
Andreas Stallinger - Programmer
MultiMediaTechnology
FH Salzburg
*/
#include "Field.h"
Field::Field(Vector position, Vector sizeofField) : pos(position), size(sizeofField) {}
float Field::GetXmin() const
{
return pos.x;
}
float Field::GetYmin() const
{
return pos.y;
}
floa... |
68f2de2a708627f82b682d4aa72b3ee941fd2e5e | 08af4ad7e6d09c9b7e86b2f7ce01a9dd1a1d48a2 | andonghun/portfolio | /SW Expert Academy/swea_6/4014_송하영.cpp | C++ | cpp | 1,717 | no_license | #include <stdio.h>
int main(void) {
int T, tc = 0, N, X, ans, i, j, k, use;
scanf("%d", &T);
int map[20][20];
while (T--) {
scanf("%d %d", &N,&X);
ans = N << 1;
for (i = 0; i < N; ++i) {
for (j = 0; j < N; ++j)
scanf("%d", &map[i][j]);
use = -1;
for (j = 0; j < N - 1; ++j) {
if (map[i][j]>map... |
17ceeb09be8a876eee8b025f740f9cfe43d83edc | 92974153e4760d0bd58f90275ae382de6f53d685 | Taxod/PD2017Fall | /hw12-1-a.cpp | C++ | cpp | 1,660 | no_license | #include <iostream>
using namespace std;
class Time
{
private:
static bool hourIn12;
int hour;
int minute;
int second;
void printTwoDigits(int n);
public:
Time(int h, int m, int s);
static void print12Hour(bool in12);
bool isEarlierThan(Time t);
void print();
void printNicely();
int earlierBySec(... |
c2af3664924e41a63e9287237abf7a83ced54bcf | e9235819c5ca14ed50b0efc20a88b547dc88af89 | holyhope/Synthese-3D-Project-2015 | /Project/sources/camera.cpp | C++ | cpp | 1,259 | no_license | /*
* camera.cpp
*
* Created on: 28 avr. 2015
* Author: pperonne
*/
#include <camera.hpp>
#include <GL/gl.h>
#include <math.h>
static long int lastx, lasty;
static float xpos = 0., ypos = 0., zpos = 0.;
static float xrot = 0., yrot = 0., zrot = 0.;
void initCamera() {
xpos = ypos = zpos = 0.;
xrot = yrot... |
b32cf033f2504001dfb18c67d658bfaff4197f2e | dbb8b5c0f239156d23049f33c21e4e1231d8178c | motel-on-jupiter/GracefulRain | /src/main.cc | C++ | cc | 851 | permissive | /**
* Copyright (C) 2014 The Motel on Jupiter
*/
#include "core/GracefulRainApp.h"
#include "mojgame/catalogue/log_emitter/DebuggerConsoleLogEmitter.h"
#include "mojgame/catalogue/log_emitter/FileLogEmitter.h"
#include "mojgame/includer/crtdbg_include.h"
#include "mojgame/logging/Logger.h"
#define kDebugAlloc (-1)
... |
872af34a5158a93ae7a170eac2dc06dd3c847244 | da24e6de610e3c2e0b0a4cc3eaca513c3ca5fcf4 | InsightSoftwareConsortium/ITKSphinxExamples | /src/IO/TransformBase/ReadTransformFromFile/Code.cxx | C++ | cxx | 1,560 | permissive | /*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.o... |
6671968aca40bceb08b2cd94b23c90b0287a7373 | 5d9e2b8fe11324576e2a51bcddbf3d4c2df118b0 | RemedyIT/ciaox11 | /connectors/dds4ccm/impl/dds4ccm_state_listener_control_t.cpp | C++ | cpp | 1,038 | permissive | // -*- C++ -*-
/**
* @file dds4ccm_state_listener_control_t.cpp
* @author Marcel Smit
*
* @brief Implementation of the DDS4CCM connector
*
* @copyright Copyright (c) Remedy IT Expertise BV
*/
#include "dds4ccm/logger/dds4ccm_log.h"
template <typename BASE_TYPE>
CCM_DDS_StateListenerControl_T<BASE_TYPE>::... |
d00f8d1b70bad570008929ee992084c35ee3fd47 | 5b64b549fdbaf7ec85c59925d1501b739bf24798 | sbha2431/Abstractions-Learning | /NaoCodeBackup/core/localization/LocalizationConfig.cpp | C++ | cpp | 409 | no_license | #include <localization/LocalizationConfig.h>
LocalizationConfig::LocalizationConfig() {
use_field_edges = false;
mix_line_intersections = true;
}
void LocalizationConfig::deserialize(const YAML::Node& node) {
YAML_D(use_field_edges);
YAML_D(mix_line_intersections);
}
void LocalizationConfig::serialize(YAML::... |
03f1fe80ddf7e4058b8c936d809bb21879214df9 | b9601e06d614c2536376432ec3abb69e29d937e4 | CaichaoGitHub/LLGL | /sources/Renderer/GLCommon/Texture/GLTexSubImage.cpp | C++ | cpp | 8,709 | permissive | /*
* GLTexSubImage.cpp
*
* This file is part of the "LLGL" project (Copyright (c) 2015-2018 by Lukas Hermanns)
* See "LICENSE.txt" for license information.
*/
#include "GLTexSubImage.h"
#include "../GLTypes.h"
#include "../GLImport.h"
#include "../GLImportExt.h"
#include <array>
#include <algorithm>
namespace ... |
ccc4c227d0ddfc7eed077935594a6e167dd1db96 | ca8503e8854d5c05becf1e40330d166da6347642 | PX4/libcxx | /test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp | C++ | cpp | 1,785 | permissive | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... |
ef334e2d74ed9ecba460d02a43f251014c288aa7 | 6164ed42f813bb76099814ae68c8c127394bc871 | killerbobjr/video_capture | /src/videocapture/decklink/DecklinkCallback.cpp | C++ | cpp | 1,912 | permissive | #if defined(__linux)
# define __STDC_LIMIT_MACROS
#endif
#include <stdint.h>
#include <stdio.h>
#include <videocapture/decklink/DecklinkCallback.h>
namespace ca {
DecklinkCallback::DecklinkCallback()
:fc(NULL)
,user(NULL)
{
}
DecklinkCallback::~DecklinkCallback() {
fc = NULL;
... |
eb59669af360da78eea7999d516ec7dc132712d4 | 78a869692175eadf5eead091eb8bb65c5d84f843 | wuyu-olivia/wuyu-olivia.github.io | /OperatingSystem/P4_Address changing mechanism/test5/test.cpp | C++ | cpp | 629 | no_license | #include"define.h"
int main(){
int symbol;
while(1){
cout<<"========================================"<<endl;
cout<<"== 地址变换机构及其变换方法 =="<<endl;
cout<<"========================================"<<endl;
cout<<"== 1)分页存储管理 2)分段存储管理 =="<<endl;
cout<<"== 3)退出 ... |
152e27310eb4834baa2452bce254c8ac6c154043 | 1a9c27baafcc401be4cb125d1c16778a285a619b | Mr-lidajun/learncpp | /30-hours-mastering-cpp/30-菱形继承/30-菱形继承/main.cpp | C++ | cpp | 620 | permissive | #include <iostream>
using namespace std;
// 没有使用虚继承(92):10 * 2 + 3 = 23
// 使用虚继承(60):10 + 3 + 2 = 15
struct Person {
int m_age = 1;
/*int m_age1 = 1;
int m_age2 = 1;
int m_age3 = 1;
int m_age4 = 1;
int m_age5 = 1;
int m_age6 = 1;
int m_age7 = 1;
int m_age8 = 1;
int m_age9 = 1;*/
};
struct Student : virtual ... |
892ca335e3e651e8638d9df407a34ba8ce0b8694 | cc71e9ff15bfa9811db47abf81527406e3efce6e | kakitgogogo/Bauble | /kakui/kakui/base/Condition.cpp | C++ | cpp | 613 | no_license | #include "Condition.h"
#include <errno.h>
bool kakui::Condition::waitForSeconds(double seconds)
{
struct timespec abstime;
clock_gettime(CLOCK_REALTIME, &abstime);
const int64_t kNanoSecondsPerSecond = 1e9;
int64_t nanoseconds = static_cast<int64_t>(seconds * kNanoSecondsPerSecond);
abstime.tv_sec += static_ca... |
1faa4752308008099a4218f9f70bdb12fc2a8f3b | 767a9bd3b8844b7e97a58e95b277694e409a164e | RitheshKumar/StereoPlugin | /Upmixer/Source/Mono2StereoNotWorking.cpp | C++ | cpp | 7,175 | no_license | /*
==============================================================================
Mono2StereoNotWorking.cpp
Created: 1 May 2016 7:15:56pm
Author: Liang Tang
==============================================================================
*/
#include "Mono2StereoNotWorking.h"
Error_t Mono2... |
23109ba888c4134e5f5dad3a0942bc24da674b17 | 75f4f6139f2f6873bdd78b7f2ab3adb0cd9accfd | luqmanarifin/cp | /wf/coba.cpp | C++ | cpp | 821 | no_license | #include <bits/stdc++.h>
using namespace std;
string str;
string trim(const string& str)
{
size_t first = str.find_first_not_of(' ');
if (string::npos == first)
{
return str;
}
size_t last = str.find_last_not_of(' ');
return str.substr(first, (last - first + 1));
}
vector<string> spl... |
4407a9c48df485cf2cccdc611794a9e14a5e27e9 | ea69e8101278f4bee1d1f482d5c76d5e25ce714e | souravchatterjee/swarm | /src/swarm/swarm.cpp | C++ | cpp | 19,380 | no_license | #include <iostream>
#include <boost/program_options.hpp>
#include <boost/program_options/positional_options.hpp>
#include "swarm.h"
#include "query.hpp"
#include "snapshot.hpp"
#include "stopwatch.h"
int DEBUG_LEVEL = 0;
using namespace swarm;
using namespace std;
namespace po = boost::program_options;
using boost::... |
5d856df565ce44d19a05a917415faab7a08ba20c | 093dbd225c012164e3bbccfc08be85eed6f249fc | ElderDelp/xictools | /xic/src/display/dsp_render.cc | C++ | cc | 42,528 | permissive |
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (... |
c2f1548a1d2d93d56e99edb618ed16a9c1131424 | 065f0861c8cc7e9cad576447177eb63f372d77b1 | eddyashton/eEVM | /samples/hello_world/main.cpp | C++ | cpp | 2,496 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "evm/simpleglobalstate.h"
#include "include/opcode.h"
#include "include/processor.h"
#include <iostream>
std::vector<uint8_t> create_bytecode(const std::string& s)
{
std::vector<uint8_t> code;
constexpr uint8... |
ef2ce0aaa5790433999bad6c963cfdd06641ba0c | 495f87204ceadf860bf6da7441d95faaf2fe3bc6 | jcsodelta/bcc2010-yukon | /yukon02/yukon.cpp | C++ | cpp | 845 | no_license | #include "yukon.h"
YUKON::YUKON(){
embaralhaCartas();
}
void YUKON::embaralhaCartas(){
CARTA c;
int i,j;
for(i=1;i<=6;i++){
for(j=1;j<=i;j++){
c =baralho.getCartaRand();
montes[i].add(c);
}
for(j=1;j<=5;j++){
c=baralho.getCartaRand();
c.setVisivel(true);
montes[i].add(c);
}
}
// Carta... |
b7426227890b96100d7e20920cb2ef710147f141 | ac98cc2c6727fe6e426125a355a8a67697fd64b5 | moooncloud/4s | /TClient/TClient/TCraftQuestDlg.cpp | C++ | cpp | 22,787 | no_license | #include "stdafx.h"
#include "TCraftQuestDlg.h"
#include "TClientGame.h"
#include "TClientChar.h"
#include "resource.h"
TComponent* CTCraftCategory::m_pTempCategoryBar = NULL;
TComponent* CTCraftCategory::m_pTempCategoryName = NULL;
TComponent* CTCraftCategory::m_pTempCategoryPlusBtn = NULL;
TComponent* CTCraftCategor... |
3f3757e1aa45d262997419cb683d95f623c70be8 | fed423f94e54ec05012a2e5847121a332ac30da6 | MurielSoftware/MurielBackup | /Muriel/MuMS3DModel.cpp | C++ | cpp | 12,100 | permissive | #include "stdafx.h"
#include "MuMS3DModel.h"
#include "MuVertexPosNormTex.h"
#include "MuVertexBuffer.h"
#include "MuIndexBuffer.h"
#include <cfloat>
namespace Muriel
{
MS3DModel::MS3DModel(const string& name)
: Model(name)
{
_vertices = NULL;
_triangles = NULL;
_meshes = NULL;
_materials = ... |
7e131777f8cd36963888cdff14ccdcff39c413e5 | 7ebcf5d66d96dd6d9d0766ef6c0afe20c9a4f253 | Quanteek/nt2 | /modules/complex/reduction/include/nt2/toolbox/reduction/functions/complex/generic/nbtrue.hpp | C++ | hpp | 2,041 | permissive | //==============================================================================
// Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI
// ... |
edffd59b63428b1dede3b72e7a07ad660a6c4c11 | 2732ae9b5d61463a045229a9e74f593d39ba17bb | shauryaagg/Competitive-Programming | /ICO Online Judge/RANKFRAUD.cpp | C++ | cpp | 1,069 | no_license | //RANKFRAUD
#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <list>
#include <string>
#include <algorithm>
using namespace std;
vector<vector<int> >ar;
bool vis[2005];
list<int>q;
int n;
int a,m;
void dfs(int node, int md){
if(vis[node])return;
if(a==n||md==n){
a=n;
q.pus... |
dd9b5d213a03ce072315fa88657a82523c1f9f8d | 9d650a812519f96ae6f6dbec29d8c1556a5be4ad | eusuntoly/BSc | /Algorithms and Data Structures/Tema 5/1/main.cpp | C++ | cpp | 1,033 | no_license | #include <cstdio>
using namespace std;
struct nod{
int x;
nod *next;
} *Q;
bool empty(nod *Q){
return Q == NULL ? true : false;
}
void push(int a){
nod *q;
q = new nod;
q->x = a;
q->next = Q;
Q = q;
}
int pop(){
int x = -1;
nod *q;
q = Q;
if(!empty(Q))... |
14425d4430fc7f02b2e4c9d42ec6ac1b2a8e9c1a | 5144e77aa708f5c5f776eadbabdfdccf56b22a72 | samp-incognito/samp-audio-server-plugin | /include/boost/thread/win32/recursive_mutex.hpp | C++ | hpp | 1,734 | permissive | #ifndef BOOST_RECURSIVE_MUTEX_WIN32_HPP
#define BOOST_RECURSIVE_MUTEX_WIN32_HPP
// recursive_mutex.hpp
//
// (C) Copyright 2006-7 Anthony Williams
//
// 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)
#inclu... |
5103c8b3f93f35a3de2a95ab9ef26b55830b1532 | ce377efeb6f99113a78c8376b77329325c587429 | giomasce/FEX | /Source/Tests/LinuxSyscalls/Syscalls/Sched.cpp | C++ | cpp | 3,632 | permissive | /*
$info$
tags: LinuxSyscalls|syscalls-shared
$end_info$
*/
#include "Tests/LinuxSyscalls/Syscalls.h"
#include "Tests/LinuxSyscalls/x64/Syscalls.h"
#include "Tests/LinuxSyscalls/x32/Syscalls.h"
#include <stdint.h>
#include <sched.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/syscall.h>
#include <un... |
dacd0535579a8a0477928c442349ac2126e27ac1 | 4b5de16e0493a18594f32e5c4f34771ba45e17fe | daniel258/ICcalib | /src/CoxLogLikNoBeta.cpp | C++ | cpp | 1,346 | no_license | #include <RcppArmadillo.h>
using namespace Rcpp;
// This is a simple example of exporting a C++ function to R. You can
// source this function into an R session using the Rcpp::sourceCpp
// function (or via the Source button on the editor toolbar). Learn
// more about Rcpp at:
//
// http://www.rcpp.org/
//... |
04f714f4859c79e2186580e44df6fd467bb60db0 | 4bb5711bc3a0729a55c55a528a4175954629d8a2 | pierre23/Nanotekspice | /include/C4017.hpp | C++ | hpp | 226 | no_license | /*
** EPITECH PROJECT, 2018
**
** File description:
**
*/
#ifndef C4017_HPP
#define C4017_HPP
#include "chipset.hpp"
class C4017 : public AChipset
{
public:
C4017(std::string alias);
~C4017() = default;
};
#endif
|
4d54fa5870f8b0742e9bc1b03805e1e2cd4b2cee | f9ca97a94703200c6a2e5f531828e48d7c2434b1 | chromium/chromium | /extensions/common/extension.cc | C++ | cc | 28,161 | permissive | // Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/common/extension.h"
#include <stddef.h>
#include <algorithm>
#include <iterator>
#include <memory>
#include <string>
#include <utility>
#include "base/b... |
7a080b78394ffdab6afa5b1a5f131f55f6c8992a | fb359788a3456f0de383ab9c374bd46e21342763 | Nicole20/SnakeGame | /snake.cpp | C++ | cpp | 604 | no_license | #include "stdafx.h"
#include "snake.h"
snake::snake()
{
srand(time(NULL));
tail.push_back(54);
move = rand() % 4;
switch (move)
{
case 0:
move = 10;
break;
case 1:
move = -10;
break;
case 2:
move = 1;
break;
case 3:
move = -1;
break;
default:
break;
}
add();
}
void snake::add()
{
egg... |
f80db67a03e007a84ca56fd102ec0cbe049af797 | 925b807205a59fd189ebfa8b5509efea0093e60a | wyc25013/leetcode | /179_Largest_Number/179.cpp | C++ | cpp | 679 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
//customised sort
class Solution {
public:
string largestNumber(vector<int>& nums) {
int len = nums.size();
if(!len) return "";
vector<string> snums;
for(int i = 0; i < len; i++)
snums.push_back(to_string(num... |
8e0ecffc7dc9108926ef4a80a553d533ac2cee3b | d32a01b0c9f6894a5d90e97b44ef673ee5b5ed16 | Parent5446/hiphop-php | /hphp/runtime/ext/ext_fb.cpp | C++ | cpp | 51,080 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
| Copyrigh... |
ca3a170b955c124dbd60fcb9088440538be00b85 | a5ccfad8da3ceae3410707623df6f2e6938b4049 | RidvanErenEldem/C-Plus-Plus | /Dönemin İkinci Yarısı/örnek (28).cpp | C++ | cpp | 388 | no_license | // sort(baş,bitiş,comp)
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
char *isimler[] = {"Ahmet", "Tuğran" , "Hanife", "Selami", "Büşra", "Ramazan"};
bool karsilastir (char *s1, char *s2)
{
return (strcmp(s1,s2)<0) ? true: false;
}
int main()
{
sort(isimler, isimler +6,karsilas... |
b659a1c4187a4a926b9a7c0bdc213360d1f6dcaf | a552717a1ec45f2c3f5e34f1d72e5071274a1462 | gnoliyil/fuchsia | /src/lib/chunked-compression/header-reader-test.cc | C++ | cc | 10,346 | permissive | // Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <zircon/assert.h>
#include <zircon/types.h>
#include <fbl/algorithm.h>
#include <fbl/array.h>
#include <src/lib/chunked-compression/chunked-archi... |
cf14dcd6cd77cc48ed8c08443f3201269ae93fbe | 18c3d1ff55ef2fff843f2b85787b260418e8ec18 | NamHoaiNguyen/chat-1 | /mock_stream/MockStream.cpp | C++ | cpp | 421 | permissive | #include "MockStream.hpp"
MockAsyncWriteStream::MockAsyncWriteStream(
boost::asio::io_context::executor_type& ex
, std::byte * buffer
, size_t size
)
: m_executor { ex }
, m_buffer { buffer }
, m_size { size }
{}
MockAsyncReadStream::MockAsyncReadStream(
boost::asio::io_context::executor_t... |
bfcd7536557deba24493c57c10cbb131d30a2389 | 4335ed1840a8ce4ef027fe87823989e76451c567 | karolylakatos/RTKLIB_Touchscreen_GUI | /RTKBASE/choixstr2str.cpp | C++ | cpp | 6,170 | no_license | #include "choixstr2str.h"
#include "ui_choixstr2str.h"
#include "optionsstr2str.h"
#include <QFile>
#include <QInputDialog>
#include <iostream>
#include "clavier.h"
ChoixStr2Str::ChoixStr2Str(int _save_load, QWidget *parent) :
QDialog(parent),
ui(new Ui::ChoixStr2Str)
{
ui->setupUi(this);
save_load=_sa... |
044f1cfa66b39b67bd568d2612f68d12d5ec95a6 | 16e54957b94dc216cacf8581263c0cf9fd0a448d | saphirus87/SGA_ProjectRPG | /FlowerEngine/Engine/ComCollider.cpp | C++ | cpp | 1,628 | no_license | #include "stdafx.h"
#include "ComCollider.h"
ComCollider::ComCollider(CString szName) :
Component(szName),
minPos(Vector3(-1.0f, -1.0f, -1.0f)),
maxPos(Vector3( 1.0f, 1.0f, 1.0f)),
m_pCube(NULL)
{
}
ComCollider::~ComCollider()
{
}
bool ComCollider::IsIntersected(ComCollider & box)
{
if (GetMinPos().x > bo... |
73cd83c3bdb095640207e4533f80ed69b3568d93 | e66ce5b2a2960bb8c98f14201ae8e7cfe0c94bc3 | konradkiss/meshloop | /Engine/source/T3D/fps/guiClockHud.cpp | C++ | cpp | 3,630 | no_license | //-----------------------------------------------------------------------------
// Torque 3D
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
#include "platform/platform.h"
#include "gui/core/guiControl.h"
#include "console/consoleTypes.h"
... |
d9259d25a8fe41707e2f6604798aba12d9d0de2c | 9e4c2c591039e697169ca5d55623bc6446a8ab3e | tnsr1/Qt5xHb | /codegen/Qt3DAnimation/QChannelMappingSlots.cpp | C++ | cpp | 411 | permissive | %%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%
$project=Qt5xHb
$module=Qt3DAnimation
$header
$includes
$beginSlotsClass
$slot=|channelNameChanged( QString channelName )
$slot=|targetChange... |
691ec937dcb81ff8c861905ebe62f46c95382bd4 | a2ef828e95489e785bed7e46779f44183bbb85bd | zahirtezcan/sticks | /test/algorithm/TestSortedSymmetricDifference.cpp | C++ | cpp | 1,469 | permissive | #include <stx/algorithm/SortedSymmetricDifference.h>
#include <gtest/gtest.h>
#include <vector>
#include <iterator>
TEST(SortedSymmetricDifference, Empty)
{
std::vector<int> v;
std::vector<int> u;
std::vector<int> o;
stx::SortedSymmetricDifference(v.begin(), v.end(), u.begin(), u.end(),
... |
0e8a861daeb09a65e17081e1a53ea9836a0907f4 | 38daa810b800d0a40a668e4cdffcd0286c5aa57f | dev-zero/SIRIUS | /src/spline.hpp | C++ | hpp | 28,555 | permissive | // Copyright (c) 2013-2017 Anton Kozhevnikov, Thomas Schulthess
// 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, ... |
efcaa81619f39a654719294092951514c19dd0de | 71ac058c71b8f6db1507511c11ef3ba62ecf2233 | VB6Hobbyst7/wxAutoExcel | /samples/window/window.cpp | C++ | cpp | 4,294 | no_license | /////////////////////////////////////////////////////////////////////////////
// Author: PB
// Copyright: (c) 2012 PB <pbfordev@gmail.com>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/****************************************************... |
208034218da0d4557bac70d552812c159f5afef5 | 2e7d25286546e4a80d3116ae7640d763ce939d37 | ryu1127/Problem_Solving | /Baekjoon_Algorithm/Unknown/1406.cpp | C++ | cpp | 1,170 | no_license | #include<cstdio>
#include<vector>
using namespace std;
int main() {
char str[600000] = {};
int index=0;
char choice;
vector<char> left;
vector<char> right;
//input string
while (1) {
scanf("%c", &str[index]);
if (str[index] == '\n') {
str[index] = '\0';
break;
}
else {
left.push_back(str[inde... |
3b339e2b672f7d4acf82ae5e12d6b06f08253f9a | b8d6836834f637cc195d543dff5ae02be493f9d8 | h2oai/daal | /lang_service/java/com/intel/daal/algorithms/linear_regression/train_partialresult.cpp | C++ | cpp | 2,077 | permissive | /* file: train_partialresult.cpp */
/*******************************************************************************
* Copyright 2014-2017 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 t... |
525ad2e186cc56fbe69dfd5084b5a885a9231930 | 0df0bed6514691766823d571342e84d1ad3976ed | zhouxianggen/chromium-src-chrome-browser | /ui/views/toolbar/toolbar_view.cc | C++ | cc | 29,930 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/i18n/number_f... |
e344779d36b40a36d17f2bce2db4a962ed826127 | f1098911c1df42cba69f8562a246dd8b9a037530 | DanielAlbl/Paint | /event.cpp | C++ | cpp | 5,462 | no_license | #include "event.h"
/***************************************************************************//**
* @author Daniel Albl/Lindsay
* @brief calls keyboard functions
*
* @param[in] key - keyboard button
* @param[in] x - screen x coordinate
* @param[in] y - screen y coordinate
*
***********************************... |
a43b4eeebe75d77bb4d765fa27b16959283755a3 | a16bcd11563f88a1c73afc7664fc0c883159a546 | syalon/bitshares-core | /libraries/chain/include/graphene/chain/withdraw_permission_object.hpp | C++ | hpp | 6,062 | permissive | /*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the... |
0a446dedd8bbe9482e60a82b02f2486871a0f0ba | 05c68697e121e8ffd024a0c9b42b70182789832b | youtube/cobalt | /components/metrics_services_manager/metrics_services_manager_client.cc | C++ | cc | 416 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/metrics_services_manager/metrics_services_manager_client.h"
namespace metrics_services_manager {
bool MetricsServicesManagerClient:... |
d60aefae12e36567b9fb6391bb1385a932e3917a | 50c41c2ad1e62c5c10dfff2f221eb46496074d80 | mohammedik2005/chromium | /media/gpu/ipc/service/vda_video_decoder_unittest.cc | C++ | cc | 12,783 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/ipc/service/vda_video_decoder.h"
#include <stdint.h>
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/memor... |
f8180d6fbc30d4184fcf935a0da1cc9e223fcf80 | c03a59daf66f5c1793966c79400611491d548c15 | ailyanlu1/ACM-ICPC-OJ-Code | /ICPC.Regional/2005.Central_Europe/3524.cpp | C++ | cpp | 1,195 | no_license | // CII 3524
// 2005 Central Europe: The Cow Doctor
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define M 305
struct SET {
long long s[5];
int k;
void init() {
memset(s, 0, sizeof(s));
}
void setbit(int x) {
int i, j;
i = x >> 6, j = x & 63;
s[i] |= (1LL << j);
}
bool op... |
dcc585825e3b85e51ac42b6220495037d27f1ce0 | 93df3e04a3750178ce698d1eb2163845b38218e5 | videogamepreservation/blood2 | /ObjectDLL/Gremlin.cpp | C++ | cpp | 15,856 | no_license | // ----------------------------------------------------------------------- //
//
// MODULE : GremlinAI.cpp
//
// PURPOSE : GremlinAI - Definition
//
// CREATED : 1/29/99
//
// ----------------------------------------------------------------------- //
#ifdef _ADD_ON
#include <stdio.h>
#include "Gremlin.h... |
6a0df9e85ff9f8bd46f64383a35109b9bfb63618 | baf4c7c602fcf5a026f2008bc896012cfdbd76c0 | sbusso/Trio | /Source/PresetWindow.cpp | C++ | cpp | 2,601 | no_license | //
// PresetWindow.cpp
// Trio
//
// Created by Matthias Pueski on 18.11.16.
//
//
#include "PresetWindow.h"
PresetWindow::PresetWindow(ComboBox* presetBox, Model* model) {
this->presetBox = presetBox;
this->model = model;
label = new Label("nameLabel","Enter a name");
label->se... |
6d18ae4967eb5e5a09c3a6c315ad36a43a1180c2 | 7368e470a68764693bc835c511cac0abbb9925d8 | Liroo/Spider | /msu/include/plugin/timestamp.hpp | C++ | hpp | 470 | no_license | #ifndef TIMESTAMP_HPP
# define TIMESTAMP_HPP
# include <string>
# include <map>
# include <boost/uuid/uuid.hpp>
# include "plugin.hpp"
static std::map<boost::uuids::uuid, std::string> lastTimestamp;
class Timestamp: public MSU::Plugin {
public:
Timestamp();
~Timestamp();
public:
std::string name;
public:
v... |
1ded50c26919db7a15122e09e8e67ae3f2e1fb64 | e806854e92c79404aa6679c3002c5cc1ba9035f1 | vectrum-core/vectrum | /wasm-spec-tests/generated-tests/start.cpp | C++ | cpp | 3,132 | permissive | #include <wasm_spec_tests.hpp>
const string wasm_str_start_3 = base_dir + "/wasm-spec-tests/generated-tests/wasms/start.3.wasm";
std::vector<uint8_t> wasm_start_3= read_wasm(wasm_str_start_3.c_str());
BOOST_DATA_TEST_CASE(start_3_pass, boost::unit_test::data::xrange(0,1), index) { try {
TESTER tester;
tester.pr... |
89b0eec5a2f7cec6901650e4c882009309e47377 | a4dc17bab59192be28b122ad904999a435231ee7 | zning1994/EDIFIER | /EDIFIER/FP_tree.cpp | C++ | cpp | 7,539 | no_license |
#include "FP_tree.h"
void FPGrowth(vector<vector<SString>> transRecords, vector<SString> postPattern)
{
LOG << "Start...1" << endl;
cout << "growth...1" << endl;
// 构建项头表
LOG << "Get header table...2" << endl;
cout << "get header table...2" << endl;
vector<STreeNode> headerTable = buildHeaderTable(transRecords)... |
457b48429ead62ca973267f129ce54b67cddb8e7 | 806b249cf6236fe469d6c6a760f4da01bdb06200 | TreeHU/Codinginterview | /Codinginterview/10.3.cpp | C++ | cpp | 970 | no_license | #include<iostream>
using namespace std;
/*
void bs(int* arr, int begin, int end, int &ans) {
int mid = (begin + end) / 2;
if (begin >= end) {
return;
}
if (arr[mid] == 5) {
ans = mid;
}
bs(arr, begin, mid,ans);
bs(arr, mid + 1, end, ans);
}
*/
int bs(int* arr, int left, int right, int x) {
int mid... |
cd29070a9161ff6d30a5ebcdb0a032cbebe6f383 | f4ca028e574257981aa79d4209a041ead7864b3c | jizhihang/ThesisCode | /tools/DetectionCommon/reduce.cc | C++ | cc | 2,464 | no_license | #include <math.h>
#include <assert.h>
#include <string.h>
#include "mex.h"
// reduce(im) resizes im to half its size, using a 5-tap binomial filter for anti-aliasing
// (see Burt & Adelson's Laplacian Pyramid paper)
// reduce each column
// result is transposed, so we can apply it twice for a complete reduction
void ... |
4ef804f25799bd1af944948301f362d2636d3468 | 32fdba44c1c9f2a3f297a65d8aeb6fb578f5b81a | codingClaire/hello-world | /table(recommit).cpp | C++ | cpp | 1,948 | no_license | #include <iostream>
#include<string>
using namespace std;
struct TA
{
int interger;
string str;
int intset;
};
/*template <class T>
void set(int c, int r, T a);*/
class Table
{
public:
Table()
{
for (int i = 0; i < 10; i++)
{
for (int j = 0; j <10; j++)
{
table[i][j].str= "none";
//table[i][j].i... |
f2001ebf715a9e5634ee5095dce475cdd45a1a96 | 26cdf4444139681c701cf564e5449f90863d4dbd | MilanAnderson/CIS108-Cpp-class | /Lab 4/SecuritySystem/VideoDoorbell.cpp | C++ | cpp | 1,881 | no_license | /* (c) 2019 Reno Technology Academy, Multnomah University */
/*
Course: CIS108 - Introduction to Software Development
Author: Kory William Herzinger
Description: Lab Assignment #4 / Exercise #1
Security System
Purpose: Implements the smart video doorbell IoT device
*/
#include "VideoDoorbell.h"
#define... |
107f77bb51c535e3e6e69e3aebad8bde360b46af | f60facae766a9a1ef1be49b7ea269144a394ae9a | eduamf/CTranslate2 | /src/layers/attention.cc | C++ | cc | 10,035 | permissive | #include "ctranslate2/layers/attention.h"
#include <algorithm>
#include <cmath>
namespace ctranslate2 {
namespace layers {
StorageView make_relative_positions(dim_t length, dim_t max_position, bool with_cache) {
StorageView positions({with_cache ? 1 : length, length}, DataType::INT32);
auto* positi... |
221bc6a89d4cd2048a0e76787abc037703dc5236 | f93cba1575085c60451c22666079ee16ed09f657 | Charlyhash/LeetCode | /55. Jump Game.cpp | C++ | cpp | 1,033 | no_license | /*
leetcode 55. Jump Game
Given an array of non-negative integers, you are initially positioned
at the first index of the array.
Each element in the array represents your maximum jump length at that
position.
Determine if you are able to reach the last index.
For example:
A = [2,3,1,1,4], return true.
A = [3,2,1,0,... |
cbbcd476be49239da4dfd671966538adaa38040d | e52b75d54ac728b8bcb03e8948534e4f5713e989 | aydar-sheffield/Chaste | /heart/test/TestHeartFileFinder.hpp | C++ | hpp | 4,880 | permissive | /*
Copyright (c) 2005-2019, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
88b0686551a5564b7f0ba75d5a3eaffd7f212720 | 55468d8aabd633b44de4b3819eb8914eeff3d3be | mlbrock/MlbDev | /Utility/C_String.cpp | C++ | cpp | 5,273 | permissive | // ////////////////////////////////////////////////////////////////////////////
// ////////////////////////////////////////////////////////////////////////////
// MLB Utility Library Module File for C Language Support (string.h)
// ////////////////////////////////////////////////////////////////////////////
/*
File Na... |
e2d4324c665ac8abb1906c1563a051f20205608c | beb0d3744ed29c41a247ac2ecb373abe2c0027e2 | raphaelzulliger/actor-framework | /libcaf_core/src/detail/set_thread_name.cpp | C++ | cpp | 1,073 | permissive | // This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#include "caf/detail/set_thread_name.hpp"
#include "caf/config.hpp"
#ifndef CAF_WINDOWS
... |
87a7fbd192a5ff7efa7855681227e90125e97516 | 243a8ec2733aa9edcc905c9f5989251b84bfadc1 | zachmakesgames/StackAllocator | /main.cpp | C++ | cpp | 1,217 | no_license | #include <iostream>
#include <chrono>
#include <assert.h>
#include "StackAllocator.h"
int main()
{
int outter = 10000;
int inner = 1000;
std::cout << "Timing stack allocator for a " << outter << "x" << inner << " nested loop\n";
auto start_time = std::chrono::high_resolution_clock::now();
StackAllocator sta... |
4fed767478d69286a490f7cd3084ad8adfe550ec | 2f757c3ac2cac1df4615b803bfeb43d60733dcfe | Adam-Petersen/PokeAI-vba-m | /src/libretro/UtilRetro.cpp | C++ | cpp | 7,693 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libretro.h>
#include "NLS.h"
#include "System.h"
#include "Util.h"
#include "common/Port.h"
#include "common/ConfigManager.h"
#include "gba/Flash.h"
#include "gba/GBA.h"
#include "gba/Globals.h"
#include "gba/RTC.h"
#include "gb/gbG... |
61b8d64d3de4edcdfbbf2f4dcd812a8610a3b735 | 651fbc1165ddfc1f13d4dbedf121324c6846ce64 | jankeesvw/sparkle-display | /firmware/examples/Spark-HelloSparky.cpp | C++ | cpp | 2,047 | no_license | #include "application.h"
/*
LiquidCrystal Library - Hello Sparky
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.
This sk... |
060ac000747f0ad8b09fde2aecd1523df611cb47 | 310579c39ab57bcf023200eace2c96d2a5b6aa2e | ravikiranmara/ProgrammingChallenges | /hackerrank/problemSolving/birthdayChocolate.cpp | C++ | cpp | 2,020 | permissive | #include <bits/stdc++.h>
using namespace std;
string ltrim(const string &);
string rtrim(const string &);
vector<string> split(const string &);
// Complete the birthday function below.
int birthday(vector<int> s, int d, int m) {
int count = 0;
if (s.size() < m) {
return count;
}
int rbeg... |
7c17072afa7e21166d9b23ff0f23426b97968565 | e04041fdac262cd9f4b045ebefb425d97e6b5fb8 | mge-engine/mge | /src/modules/python/python_context.cpp | C++ | cpp | 4,517 | permissive | // mge - Modern Game Engine
// Copyright (c) 2017-2023 by Alexander Schroeder
// All rights reserved.
#include "python_context.hpp"
#include "mge/core/contains.hpp"
#include "mge/core/stdexceptions.hpp"
#include "mge/core/trace.hpp"
#include "python_binder.hpp"
#include "python_engine.hpp"
#include "python_error.hpp"
... |
b03446afebc13883452cf69e07ac9ee9bfaa176c | 31f377085b1a9dfd891da42cad33cffb084ecb6c | sophiemiddleton/Offline | /Mu2eG4/inc/Mu2eSensitiveDetector.hh | C++ | hh | 1,904 | permissive | #ifndef Mu2eG4_Mu2eSensitiveDetector_hh
#define Mu2eG4_Mu2eSensitiveDetector_hh
//
// Defines a generic Mu2e sensitive detector
//
// $Id: Mu2eSensitiveDetector.hh,v 1.2 2013/08/28 05:58:17 gandr Exp $
// $Author: gandr $
// $Date: 2013/08/28 05:58:17 $
//
// Original author KLG
//
// Mu2e includes
#include "Mu2eG4/in... |
c949b190299581bb477c91e2662d064c18e4507c | 407efe0cd61ed515cf9c8a112d2257a2f8f1f8d1 | rovinski/LSOracle | /lib/Galois/lonestardist/experimental/on_demand/sgd/gen_sync.hh | C++ | hh | 1,963 | permissive | /*
* This file belongs to the Galois project, a C++ library for exploiting parallelism.
* The code is being released under the terms of the 3-Clause BSD License (a
* copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
9cf3a9c63fce34ad003fa1d514d496d6c5d43638 | cebf14a27f4dd192617afdeac429b2b8e071eb5a | Hadouweb/Piscine_CPP | /D04/ex00/Victim.cpp | C++ | cpp | 840 | no_license | #include "Victim.hpp"
Victim::Victim(Victim const &src) {
*this = src;
}
Victim::Victim(std::string pName) : _name(pName) {
std::cout << "Some random victim called " << this->_name << " just popped !" << std::endl;
}
Victim::~Victim(void) {
std::cout << "Victim " << this->_name << " just died for no apparent reas... |
5e0d57419208df2344ad9bbd31bbcf28e6de5f0b | 662ce075061a50911a7a2ed85ea50cf9d2b51245 | grayasm/git-main | /world/apache_stl/tests/numerics/26.partial.sum.cpp | C++ | cpp | 13,416 | permissive | /***************************************************************************
*
* 26.partial.sum.cpp - test exercising 26.4.3 [lib.partial.sum]
*
* $Id: 26.partial.sum.cpp 772579 2009-05-07 10:01:33Z faridz $
*
***************************************************************************
*
* Licensed to th... |
f53a4704057fd11c5428c9e2fb2db2ba6d36be35 | 91fff4464e67e02ea975be3977f36fccaf4afaa0 | pguzowski/HPSgen_for_uboone | /FluxReaderNuMI.cxx | C++ | cxx | 5,543 | no_license | #include "FluxReaderNuMI.h"
#include "dk2nu/tree/dk2nu.h"
#include "nusimdata/SimulationBase/MCFlux.h"
hpsgen::FluxReaderNuMI::FluxReaderNuMI(fhicl::ParameterSet const& p, CLHEP::HepRandomEngine& fRNG)
: FluxReader(p, fRNG, "dk2nuTree", "pots", "dkmetaTree"), dk2nu(0),
beampos(-31387.58422, -3316.402543, -60100.2... |
9e01cc209a7ea9e253f27cda3981d17629ea5c80 | 9b8d1d2cb12acc31f89cc74689159a2097a68468 | akhikolla/testpackages | /fuzzedpackages/OpenMx/src/ComputeNM.cpp | C++ | cpp | 48,689 | no_license | /*
* Copyright 2007-2019 by the individuals mentioned in the source code history
*
* 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.... |
f85dc706c0123f0d547dce140fbcac8480dda224 | ae080f279af8b3c9975178e07acd0261c2cdc1ff | mindspore-ai/akg | /src/poly/schedule_pass/compute_inner_band_dependency.cc | C++ | cc | 1,264 | permissive | /**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
74e845a738ce0c7bfeee48926dc579aab287ee6f | 06591e4ae6e46eafb495a515969ddfa548deeea6 | lyapinvi/SFML_sandbox | /snake/Snake.cpp | C++ | cpp | 4,261 | permissive | #include <stdexcept>
#include "Snake.h"
const int MIN_COLLISION_LEN = 4;
Snake::Snake(int blockSize) {
m_size = blockSize;
// TODO: doesn't look to be a responsibility of this class
m_bodyRect.setSize(sf::Vector2f(m_size - 1, m_size - 1));
Reset();
}
Snake::~Snake() {}
void Snake::Reset() {
m_snakeBody.clear... |
e6cb565ca92c213d3bf2f37ace60b63aec63c920 | 94a84ea8512e340d9c13b72408d2faacf118cf6f | SakshiAgarwal/linefollower.pid | /src/theta.cpp | C++ | cpp | 3,918 | no_license | #include "ros/ros.h"
#include "std_msgs/Empty.h"
#include "geometry_msgs/Twist.h"
#include "quad/perpendicular.h"
#include <sstream>
#include <math.h>
#include "geometry_msgs/Point.h"
quad::perpendicular msg_in;
geometry_msgs::Point node_point;
void read_position(const quad::perpendicular::ConstPtr& msg)
{
msg_in.... |
7b9fd21eb7ff9df49d122cffc683d2fc8528bee4 | d9c760e2e7ab109db6f4c1ea77be4124a9c61cf4 | MalkeshDalia/napoca | /winguest/winguestdll/event_timer.cpp | C++ | cpp | 10,027 | permissive | /*
* Copyright (c) 2020 Bitdefender
* SPDX-License-Identifier: Apache-2.0
*/
/** @file event_timer.cpp
* @brief Event timer to enable running scheduled repeating tasks
*/
#include <ntstatus.h>
#define WIN32_NO_STATUS
#include <windows.h>
typedef _Return_type_success_(return >= 0) long NTSTATUS;
#in... |
cd54f2c657eb2c65ace7c1cc62d1f35426e2d40b | 778d3a6528e63dffeb3d748aeed9a0aa9a022eb9 | vsemp/database | /sql.tab.cpp | C++ | cpp | 64,884 | no_license | /* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
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... |
19cf44c1675d9cdbb07b2a31fc24a649a876b6a8 | 4e3c6de8e1b12cc07eeceb8e9dfaff81c857fa79 | MaverickMiles/Competitive_Programming | /Contests/InformaticaCodeathon/jailbreak.cpp | C++ | cpp | 670 | permissive | /* Read input from STDIN. Print your output to STDOUT*/
#include <iostream>
using namespace std;
typedef long long ll;
ll go(ll, ll , ll);
int main()
{
ll x,y,n;
ll i;
cin>>x;
cin>>y;
cin>>n;
int arr[n];
for(i=0;i<n;i++)
{
cin >> arr[i];
}
ll t=0;
for(i=0;i<n;i++)
... |
4ed047c06f146f3010e023b4f368b6b952db97d6 | 4d090b5fb9edc36a8e264ef22fcd425b61cc669c | ItachiEU/University | /MIA/Contest12/a.cpp | C++ | cpp | 854 | no_license | #include<bits/stdc++.h>
using namespace std;
const int maxn = 1e3+5;
int x;
bool git;
vector<pair<int, int> > G[maxn];
int visited[maxn];
void dfs(int start, int end, int color){
visited[start] = x;
if(start == end){
git = true;
return ;
}
for(int i=0; i<G[start].size(); i++){
if(visited[G[start][i].first] !... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.