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 |
|---|---|---|---|---|---|---|---|---|
456c75ff1ca23577bdca1b74842aa0bf5b4804c7 | 723a6b7da97c37d70e3ca2f6830b2e1c8cecdab5 | FrankNaets/chrono | /src/demos/irrlicht/demo_emit_cluster.cpp | C++ | cpp | 10,744 | permissive | //
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2010-2011 Alessandro Tasora
// Copyright (c) 2013 Project Chrono
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file at the top level of the distribution
// and at http://pro... |
1d660c66f7e815484d1b42a2a2d64bbf081d5a44 | 1ae0259d9196bd049a5e3db4ef9f5c6b5caa7b87 | llSourcell/block_grasp_generator | /src/robot_viz_tool_test.cpp | C++ | cpp | 3,119 | no_license | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2013, University of Colorado, Boulder
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... |
34b2bba46becaeb9e970f23e58678481bd587f14 | 1145d6529811eb720a680d203e4dd102199e6bb3 | fengwang/larbed-refinement | /include/f/template/type_at.hpp | C++ | hpp | 670 | no_license | #ifndef MTYPE_AT_HPP_INCLUDED_DSPOFIHSADLFKJASFDJKLAS9483IASDFUHAKSDFJHDFSJVKJNF
#define MTYPE_AT_HPP_INCLUDED_DSPOFIHSADLFKJASFDJKLAS9483IASDFUHAKSDFJHDFSJVKJNF
#include <cstddef>
namespace f
{
template< std::size_t N, typename T, typename... Types >
struct type_at
{
static_assert( N < sizeof...... |
cece09612ff744eedc6f7dc3d98a52fc7b0539d1 | bcf029cf2b9776d7d3bf362af692abd486549c8e | kotfranek/wavgen | /src/main.cpp | C++ | cpp | 5,420 | permissive | /*
* Copyright (c) 2016, Przemysław Podwapiński <p.podwapinski@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyrig... |
d904a25391c0554ba372cf5cd67b9bc22973b4fc | 8f20cdceef45e4f8e694260832787557b2bb48b8 | REXJJ/uva-judge-solutions | /10908/src.cpp | C++ | cpp | 738 | no_license | #include <bits/stdc++.h>
using namespace std;
void print(){}
template<typename T,typename... Args>
void print(T Contents, Args... args)
{
#ifdef DBG
std::cout<< (Contents) << std::endl;print(args...);
#endif
}
int main()
{
int t;
cin>>t;
for(int tt=0;tt<t;tt++)
{
int m,n,q;
cin>>m>>n>>q;
vector<string> s... |
742f62d1f0a3cdca5e90dd490502caf0162f844d | c40ef798769e0eb5069ee504ceb84c5583401b01 | JieyangChen7/DVFS-MAGMA | /magma-1.3.0/testing/testing_sgeqrf_mgpu.cpp | C++ | cpp | 6,279 | no_license | /*
-- MAGMA (version 1.3.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
November 2012
@generated s Wed Nov 14 22:54:21 2012
*/
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include ... |
f14281e49d8f6813b5fa453c68f53ae40d6fa188 | 8e112765b0453396430881a7ccfebc80f1cd9cf1 | shruthi015/c-codes | /cocubes.cpp | C++ | cpp | 666 | no_license | #include <iostream>
#include<math.h>
using namespace std;
int main()
{
int i,n,count=0,min,pos;
cin>>n;
int arr[n],a[n],x,z,sum=0;
cout<<"Enter array:";
for(i=0;i<n;i++)
cin>>a[i];
cout<<"enter element:";
cin>>x;
cout<<"enter limits:";
cin>>z;
for(i=0;i<n;i++)
{
... |
62936c102c59cbc71df78bf13fdbb90a5dcfe1b5 | cc5bdc24fa7938e998f9dfd2227d89f1218b3341 | lemontreehuang/system | /客户端组件/游戏控件/UserItemElement.cpp | C++ | cpp | 26,537 | no_license | #include "StdAfx.h"
#include "UserItemElement.h"
//////////////////////////////////////////////////////////////////////////////////
//常理定义
#define MAX_EXPERIENCE 5 //最大经验
//////////////////////////////////////////////////////////////////////////////////
//静态变量
CUserItemElement * CUserItemElement::m_pUser... |
e524ae928e292a6182724f38809bd0c1460c0274 | e8d6f5d1a8c3768cbdad3af6578b35ea254dc057 | gucx13/data-analysis | /数据分析-课程/project/geant/Bbkg/exampleB3b.cc | C++ | cc | 4,318 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
031a2a751e507fef9a8ac511da1d31e8d1541c30 | da3a5d8ea9679e1244f1d89140b9631ebd057cb1 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-wafv2/source/model/XssMatchStatement.cpp | C++ | cpp | 2,116 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/wafv2/model/XssMatchStatement.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
names... |
36e645456af5b537d81d4430fbec92f6f7b9c940 | 829e55269312fae70a81b1199b901a279c8f688f | jooo000hn/Intrinsic | /IntrinsicRendererVulkan/src/IntrinsicRendererVulkanResourcesFramebuffer.cpp | C++ | cpp | 2,412 | permissive | // Copyright 2017 Benjamin Glatzel
//
// 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... |
f1569676f2cd8df3545f658246bb543062e35214 | 92a3589556288a79ba1cc88c23c0422f999c8f4b | sanshigo345/movie_library_system | /LibrarySystem.cpp | C++ | cpp | 5,756 | permissive | #include "LibrarySystem.h"
#include <fstream>
using namespace std;
extern ofstream outputFile;
void LibrarySystem::addMovie(const int movieId, const std::string movieTitle, const int year){
Movie movie = Movie(movieId, movieTitle, year);
movie.setStatus("not checked out");
if (moviesEverywhere.... |
3a97b84ff50f9ac578a450f2b5ad9e4c014960ad | 03a647da5e51180199f8a159bd782c25db6fcbf1 | ast2017/ast | /1st/13305/rdd6584.cpp | C++ | cpp | 502 | no_license | // DP라지만 좀더 그리디함.
#include <cstdio>
int dis[100000];
int cost[100000];
int main() {
int n, minc = 1111111111;
long long dp = 0;
scanf("%d", &n);
for (int i = 1; i < n; i++)
scanf("%d", &dis[i]);
for (int i = 0; i < n; i++)
scanf("%d", &cost[i]);
for (int i = 1; i < n; i++) { // 여태까지 방문했던 지점 중 가장 저렴한... |
aedd6c6d9010b27298d364b5c27dbaecc351d74a | 96f3d0d1e4647929613d15fd92165852d7c03ff5 | GrantMackey/genz_tools_network_monitoring | /sst-core-7.1.0/src/sst/core/simulation.cc | C++ | cc | 27,876 | permissive | // Copyright 2009-2017 Sandia Corporation. Under the terms
// of Contract DE-NA0003525 with Sandia Corporation, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2017, Sandia Corporation
// All rights reserved.
//
// This file is part of the SST software package. For license
// ... |
d1a2628e5f49b5a262309993cd910f180ab2ab4d | b7e4d5c1c46df757e838a3d1123a3e37d51e5878 | kitounliu/ledger | /libs/oef-base/include/oef-base/conversation/OutboundEndpoint.hpp | C++ | hpp | 2,457 | permissive | #pragma once
//------------------------------------------------------------------------------
//
// Copyright 2018-2020 Fetch.AI Limited
//
// 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 Licen... |
78967b8ffc532b7941c75c2b03f05ba31a6e5547 | 697684dc823e92470992353eeae152e28719009e | raghavanv97/chromium | /third_party/blink/renderer/core/css/media_query_evaluator.cc | C++ | cc | 40,524 | permissive | /*
* CSS Media Query Evaluator
*
* Copyright (C) 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>.
* Copyright (C) 2013 Apple Inc. All rights reserved.
* Copyright (C) 2013 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitte... |
fa27bf623f0d7c9240ef88d67b348faa558e2627 | e7df3c9249d57d069ece5433102cf89e3660f0d4 | lenhart/gr-test-msg-passing-block-issue | /lib/testblock_impl.cc | C++ | cc | 1,945 | no_license | /* -*- c++ -*- */
/*
* Copyright 2021 M.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This software is distributed in the hope... |
39278802e067e8cdef98571fff659bf82d48a916 | 67d236d349b772fbfe5314880ddcce90d38a94fc | hellios78/mldb | /testing/sql_expression_test.cc | C++ | cc | 44,199 | permissive | // This file is part of MLDB. Copyright 2015 Datacratic. All rights reserved.
/** sql_expression_test.cc
Jeremy Barnes, 25 January 2015
Copyright (c) 2015 Datacratic Inc. All rights reserved.
Test of row expressions.
*/
#include "mldb/sql/sql_expression.h"
#include "mldb/sql/sql_expression_operations.h"... |
2b5c85f8e6c0e6579851b9ed818bf2a401d0c731 | 9fcc6e9a8df0488c1b63f8e5268f8f2de92f515b | meniossin/src | /remoting/host/security_key/fake_security_key_ipc_server.cc | C++ | cc | 5,094 | permissive | // Copyright 2016 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 "remoting/host/security_key/fake_security_key_ipc_server.h"
#include <cstdint>
#include <memory>
#include <string>
#include "base/callback.h"
#... |
d8a6f435bf3a28cf3c7b3ebaf3a8cd24df637608 | ab440982932fcd2f57a8694408e0c169598e609b | xinsuinizhuan/dll | /test/src/misc/dyn_conv.cpp | C++ | cpp | 5,614 | permissive | //=======================================================================
// Copyright (c) 2014-2020 Baptiste Wicht
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//==================================================================... |
fdf6cf2a806a2ba75d82945014b4fe3ca3369275 | 6cc631a83e77fbe0631b2537e961bd5a3a1d98a5 | Kampfgnom/LBDatabaseEditor | /lib/LBDatabase/src/attribute.cpp | C++ | cpp | 6,353 | no_license | #include "attribute.h"
#include "attribute_p.h"
#include "attributevalue.h"
#include "column.h"
#include "context.h"
#include "entity.h"
#include "entitytype.h"
#include "row.h"
#include "storage.h"
#include "table.h"
#include <QStringList>
namespace LBDatabase {
/***************************************************... |
8e9d111b133d33fcc435f241da202727b2b1844b | 0787bed57dd1ddf1e0490b000083c275b15155fd | zanzo420/zSoT-SDK | /External/SDK/ADS_LocomotionAlternateNative_functions.cpp | C++ | cpp | 503 | no_license | // Name: SoT, Version: 2.2.0.2
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//----------------------------------------------------... |
19187add78320ca5d70da7e64d92fb14035778ae | 2bcbf103ea7848c1fbf1b630b5b40cc4533a942c | blossom2017/Interviewbit | /Graphs/level_order.cpp | C++ | cpp | 733 | no_license | /**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
vector<vector<int> > Solution::levelOrder(TreeNode* A) {
vector<vector<int>> ans;
if(!A)return ans;
queue<TreeNode *> q;... |
8cf92462cb4b15780fce257e2135e1377b663b45 | 5ab8610daec9d67d083c956aa98f48c0809e3bd3 | MichelleAthens/Programming-Language-and-Concepts | /LexicalSyntax/p2lex.cpp | C++ | cpp | 2,569 | no_license | #include <cctype>
#include <map>
#include "p2lex.h"
using namespace std;
map<TokenType, string> TokenNames = {
{ ID, "id" },
{ STR, "str" },
{ INT, "int" },
{ PLUS, "plus" },
{ STAR, "star" },
{ LEFTSQ, "leftsq" },
{ RIGHTSQ, "rightsq" },
{ PRINT, "print" },
{ SET, "set" },
{ SC, "sc" },
{ LPAREN, "lparen" ... |
0ba73e34faec18aaa2c2c472891da5edc0ef3b12 | 920d1f21554bc6f49b26c255acd50b7e1de3f195 | ClaytonCalabrese/BuiltRos2Eloquent | /build/geometry_msgs/rosidl_typesupport_c/geometry_msgs/msg/wrench__type_support.cpp | C++ | cpp | 2,923 | no_license | // generated from rosidl_typesupport_c/resource/idl__type_support.cpp.em
// with input from geometry_msgs:msg/Wrench.idl
// generated code does not contain a copyright notice
#include "cstddef"
#include "rosidl_generator_c/message_type_support_struct.h"
#include "geometry_msgs/msg/rosidl_typesupport_c__visibility_cont... |
57003cececdfe606ebcb2905dbe94f6c0d35d991 | a479593f1ba75186443f072cd98d90c613358fcc | georghe-crihan/mthasher | /threadpool.hpp | C++ | hpp | 596 | permissive | #ifndef THREADPOOL_HPP
#define THREADPOOL_HPP
struct threadPool {
private:
typedef boost::movelib::unique_ptr<boost::asio::io_service::work> basio_worker;
boost::asio::io_service ioS;
basio_worker work;
boost::thread_group tg;
public:
threadPool(size_t numThreads) :ioS(), work(new basio_worker::element_type(io... |
fa0c51a9c8bbb1e11384e19300c12a3d18385cb3 | 01e6bf686cbb5aecb98ec0d9e1c0ab707a49ea3f | rituraj0/OtherCompetitions | /Z Algorithm/Hackerrank String Similairty.cpp | C++ | cpp | 1,434 | no_license | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define sz size()
#define bg begin()
#define en end()
#define Y second
#define X first
typedef long long ll;
#define fi freopen("input.txt","r",stdin)
#define fo freopen("output.txt","w",stdout)
const double pi = acos(-1.0);
c... |
93c07a4a7e4156b525486261c391fdab94523778 | 1d28381326af64194bf5274bb479f75f60cfd1be | geniiii/3DStris | /src/states/menu/sprintselect.cpp | C++ | cpp | 1,877 | permissive | #include <3dstris/states/game/sprint.hpp>
#include <3dstris/states/menu/sprintselect.hpp>
SprintSelect::SprintSelect()
: State(),
title(game.translate("sprintselect.title")),
twentyButton(gui.add<Button>(Pos{BSCREEN_WIDTH / 4 - 50, 40}, WH{100, 50},
game.translate("sprintselect.twenty"))),
fortyB... |
887102af2131a4c89335017b21b4143b81b292bf | 3034e3900f731913f03b80b393177b3daa7f6471 | tibsys/AtelierQt | /SignalPerso/main.cpp | C++ | cpp | 556 | no_license | #include <QCoreApplication>
#include "Controleur.h"
#include "Rectangle.h"
//Choisir le TP
#define TP 2
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
//Compléter le code pour que l'émission de signal fonctionne
Controleur c;
#if(TP == 1)
QObject::connect(&c, &Controleur::si... |
0dd13f65edfe455aea0f21aa95ede0240b2bfad0 | f2df456357e67248174a5e7a34f455475f0c1fb2 | kantamRobo/Xbox-GDK-Samples | /Samples/Live/PlayFabMatchmaking_Desktop/Main.cpp | C++ | cpp | 9,573 | permissive | //--------------------------------------------------------------------------------------
// Main.cpp
//
// Entry point for Microsoft Game Development Kit for Desktop
//
// Advanced Technology Group (ATG)
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------... |
d733d81baa0286f82a7b339b70aae81e88901d84 | 61f4e866524aa14f360a4f833a626e6760aa6af8 | nobled/clang | /lib/Basic/SourceManager.cpp | C++ | cpp | 69,641 | permissive | //===--- SourceManager.cpp - Track and cache source files -----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
bde8f29f67185c54d4d220f516dcc50586bf970f | f121980dfd6e69103e6b0bad62d41f7c3bf3ff4d | Vaa3D/vaa3d_tools | /hackathon/2010/hang/ct3d/coseg/AT3D/widgets/glwidget.cpp | C++ | cpp | 11,804 | permissive | /*
* untitled.h
*
*
* Created by XIAO Hang ,PH.D STUDENT,Group tangkun on 6/28/10.
* Copyright 2010 __MyCompanyName__. All rights reserved.
*
*/
#include <QtGui>
#include <QtOpenGL>
#include <math.h>
#include <map>
#include <iostream>
#include "glwidget.h"
using namespace std;
GLWidget::GLWidget(QWidget ... |
cc353428084bfa61d8cfb441826355aea155f31c | cece6b39cc66f98ce2188eac2dfedcc9f6ba503e | Raizadaji/Doubly-linked-list-insert-anywhere- | /doubly linked list.cpp | C++ | cpp | 1,850 | no_license | #include<iostream>
using namespace std;
struct node{
int data;
node *prev;
node *next;
};
node * eol(node *,node *);
node * fol(node *,node *);
char mol(node *,node *,int);
main(){
node *temp, *head=NULL,*tail=NULL;
char ch;
int o;
cout<<"where to add next nodes \n1. Front\n2. Back\t";
cin>>o;
o==1?(c... |
6fefa01ea89788f4559e7f80538b30ee94e92ab4 | d9931ae102936a9c51944afc76a54e3ad2a07b73 | NuclearRazor/xserial | /src/xserial.hpp | C++ | hpp | 17,032 | permissive | /*
* xserial - library for working with serial port.
*
* Copyright (c) 2018 Elektro Yar. Email: git.electroyar@gmail.com
*
* 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,... |
a4111297dfc058c70735349550a3b366963cd673 | f752183db034171b3cb9a3e7d2d18b84aa9c2a6f | mdsudara/mockturtle | /include/mockturtle/algorithms/experimental/window_resub.hpp | C++ | hpp | 18,621 | permissive | /* mockturtle: C++ logic network library
* Copyright (C) 2018-2022 EPFL
*
* 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... |
a571b0af9dfc942c79b26f7038aa433f8d67c290 | 562c6cf831e0403de270a9239aac90abf12d87d4 | shubhamwert/practice_and_recalls | /C++/codeforces/800/reversecheck.cpp | C++ | cpp | 393 | no_license | #include<iostream>
// #include<bits/stdc++.h>
#include<string>
using namespace std;
int main(){
string s,t;
cin>>s;
cin>>t;
if(s.length()!=t.length()){
cout<<"NO";
return 0;
}
int size=s.length();
for(int i=0;i<size;i++){
if(s[i]!=t[size-i-1]){
cout<<"NO"... |
2d44eda900716a685c291823fcc46fd0952b515f | 297b6bce11b2a7e7443b8b944e91675da03d73cc | Cyfem/CCF-competition | /Crontab.cpp | C++ | cpp | 12,004 | no_license | #include <string.h>
#include <iostream>
#include <vector>
#include <stdio.h>
using namespace std;
struct Data
{
vector<string> minutes;
vector<string> hours;
vector<string> day;
vector<string> month;
vector<string> week;
string todo;
vector<int> iday;
vector<int> imonth;
vector<int> iweek;
vector<int> iminu... |
ed5190d02eed83206d39e347af1007eb03c6323b | c9587a799070149c4f38ad67c0bd8d8c48272301 | anallen/armnn | /src/backends/aclCommon/ArmComputeTensorUtils.hpp | C++ | hpp | 10,077 | permissive | //
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
#include <armnn/Tensor.hpp>
#include <armnn/DescriptorsFwd.hpp>
#include <arm_compute/core/ITensor.h>
#include <arm_compute/core/TensorInfo.h>
#include <arm_compute/core/Types.h>
#include <arm_compute/core/Size2D.h>
... |
84866c09124b474331c23010846b5dfad19a5e8f | 87538062e9690b8c46c667c09ec476c555e004c4 | zhengxuLee/leetcode | /leetcode106_buildTreeInorderPostOrder.cpp | C++ | cpp | 744 | no_license | #include "include.h"
TreeNode* buildTree2(vector<int>& inorder, vector<int>& postorder)
{
if (inorder.empty() && postorder.empty())return NULL;
int root = postorder.back();
vector<int>leftInorder(inorder.begin(), find(inorder.begin(), inorder.end(), root));
vector<int>rightInorder(find(inorder.begin(), inorder.end... |
e85a58f670fab7ffa45738c30d5924c85301a53f | ae40c3bdcaae72c93310963d31ef1ea73d497d46 | epics-extensions/ChannelArchiver | /Tools/Guard.cpp | C++ | cpp | 1,091 | no_license | // System
#include <stdlib.h>
// Base
#include <epicsThread.h>
// Tools
#include "MsgLogger.h"
#include "Guard.h"
void epicsMutexGuard::check(const char *file, size_t line,
const epicsMutex &the_one_it_should_be)
{
if (&mutex == &the_one_it_should_be)
return;
if (getenv("ABO... |
dd1b2ad4d3ea02181dfeafe84c1a5b460a44ba22 | 6b7163c73e6ad13ea2d570a25c3747e280437cd6 | SmileyJs/Learning | /cppPrimer/06/6_21.cpp | C++ | cpp | 313 | no_license | #include "chapter6.h"
int
main(int argc, char const *argv[])
{
int i =0, j = 0;
cout << "Please input two positive integer" << endl;
while (cin >> i >> j) {
cout << "The bigger one is " << compareInt(i, &j) << endl;
}
return 0;
}
int compareInt(const int j, const int *p)
{
return j > *p ? j : *p;
} |
44295700dd7cd5eb40947318509d7cf5f36d51a8 | 341a7b5ee4b166508dbc33a2c3ec85863c1c27b5 | KqSMea8/sstd_library | /sstd_boost/sstd/libs/regex/test/regress/test_regex_search.hpp | C++ | hpp | 18,292 | permissive | /*
*
* Copyright (c) 2004
* John Maddock
*
* Use, modification and distribution are subject to 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)
*
*/
/*
* LOCATION: see http://www.boost.org for most recent version.
*... |
0a09778fcf45cea63aaa070494b910428ad5ecdb | b2b4a32b73c487d4b8f26ac1c55305ca4fdc854c | Leo8a29/EjercicioDeClase | /EjercicioClase5MRot.cpp | C++ | cpp | 10,794 | no_license | //Semestre 2019 - 1
//***** Lab. Computacion Gráfica ************//
//***************** Visual studio 2017 ***********//
//************** Alumno (s): Ochoa Nava Jose Leonardo **********//
//************* Practica 5: Ejercicio Clase ******//
//************* C... |
f0b3028b411332a6e52ac2e8725dfc796b7746c7 | 34c11726ad577c0bdfbab3f935ece3ff1776e075 | hmkc/GameEngineFromScratch | /Framework/Common/GfxConfiguration.hpp | C++ | hpp | 2,488 | permissive | #pragma once
#include <cstdint>
#include <iostream>
namespace My {
struct GfxConfiguration {
/// Inline all-elements constructor.
/// \param[in] r the red color depth in bits
/// \param[in] g the green color depth in bits
/// \param[in] b the blue color depth in bits
/// \param[in] a the alpha colo... |
abec243e37c2f26d70b89b99a7848d1ec0fac347 | 097a6d3a3a5119a096e0f2e5b84f0d9f96b82f43 | bouffalolab/bl_iot_sdk | /components/network/thread/openthread/src/core/backbone_router/ndproxy_table.hpp | C++ | hpp | 10,483 | permissive | /*
* Copyright (c) 2020, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this ... |
2706f32e157267cdfa6f63a78fbbc890d06bfad1 | 22c2e4eab127ee4ddffe884ede95a1730c870409 | cupim000/Binary_Tree | /Class Arvore Final New.cpp | C++ | cpp | 8,527 | no_license | #include <iostream>
#include<cstdlib>
#include <time.h>
#include<ctime>
#include <queue>
#include <fstream>
#include <windows.h>
using namespace std;
/*
Trabalho de AEDES 2 - Classe Arvore
Abraao Duarte Barbosa
Thiago Ramos Gomes
*/
template <class T>
class No
{
public:
No *esq;
No *dir;
... |
863e61d2434dd21986cf80ce56ad180badb6701a | 4ed6852cdbff7f96d079987e08826e124d90679d | MatTerra/Assembler | /src/utils/operations/addoperation.cpp | C++ | cpp | 306 | no_license | //
// Created by mateusberardo on 28/02/2021.
//
#include "addoperation.h"
std::string AddOperation::getOutput() {
std::ostringstream output;
output << std::setfill('0') << std::setw(2) << opCode << " "
<< std::setfill('0') << std::setw(2) << operands[0];
return output.str();
} |
dfcce0c6f5b9dc8d8f4df8c33cc34fdfd10d9d6e | 7b7b1e4cb977e4086e40f09f5a7f25e984f714bb | cnedwards/LivingNeuralNets | /NeuralNet/TextureHolder.cpp | C++ | cpp | 365 | no_license | #include "TextureHolder.hpp"
TextureHolder::TextureHolder()
{
kelp.loadFromFile("Resource/Entities/Plant/Kelp.png");
ramachandra.loadFromFile("Resource/Entities/Monster/Ramachandra.png");
tPlayButton.loadFromFile("Resource/GUI/Buttons/PlayButton.png");
tMainMenu.loadFromFile("Resource/MainMenu.png");
placeHolde... |
f6148f25f27e64761983234d5421b07a8a3b779e | f383caeffe9ed0ea7d490104ab1af6fedd80dc32 | knut0815/hpxcl | /opencl/component_definitions.cpp | C++ | cpp | 2,570 | permissive | // Copyright (c) 2013 Martin Stumpf
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <hpx/hpx.hpp>
#include <hpx/config.hpp>
#include "server/create_devices.hpp"
#include "server/device.hpp"
#incl... |
8b81c5d4bba0122f25fddafec9b68805da3c9973 | 5c0b76865eac64267cabea95c02c471b50ea597e | emersonweslley/MESH | /src/LoRaMESH.cpp | C++ | cpp | 12,945 | no_license | /* ---------------------------------------------------
Radioenge Equipamentos de Telecomunicações
---------------------------------------------------
This library contains a set of functions to configure
and operate the EndDevice LoRaMESH Radioenge
Date: 13/12/18
*/
#include "LoRaMESH.h"... |
157321ef6347c4465dcc6d9b50cd8fa240384148 | 7dae44e769caca10ea7cfedded6454f6c50bc32a | zszyellow/leetcode | /Cpp/1217.play-with-chips.cpp | C++ | cpp | 401 | permissive | /*
* @lc app=leetcode id=1217 lang=cpp
*
* [1217] Play with Chips
*/
// @lc code=start
class Solution {
public:
int minCostToMoveChips(vector<int>& chips) {
int odd = 0, even = 0;
for (int i = 0; i < chips.size(); i ++) {
if (chips[i] % 2 == 0) even ++;
else odd ++;
... |
7a39087b44ebd03780c11e6eaf4f5684d492249b | e3dddc7dc47ce5c551bba92390af7b50400b9fae | Rud156/Pong | /Pong/Src/Common/Flasher.cpp | C++ | cpp | 817 | permissive | #include "Flasher.h"
namespace Common
{
void Flasher::startFlash()
{
if (!this->_start_flash)
{
this->_current_flash_count = this->_flash_count;
this->_flash_on = false;
this->_current_flash_time = this->_flash_time;
this->_start_flash = true;
}
}
void Flasher::flashScreenUpdate()
{
if (!this... |
0c42690f87db224cf097f14a45ea33a782ce8a75 | ec3461fd8b2f359ba7372621bb15ab29b38fb1a0 | nattee/data2015 | /lab03/exercise/e2.cpp | C++ | cpp | 336 | no_license | #include<iostream>
#include<vector>
using namespace std;
int main()
{
int n,d;
cin>>n;
cout<<"Please Enter "<<n<<" integer"<<endl;
vector<int> a;
for(int i=0; i<n; i++)
{
cin>>d;
a.push_back(d);
}
for (size_t i = 0;i < a.size();i++) {
cout << a[i] << endl;
}
... |
cd38ae8e63c9c879da84ad8bc4e58048bbcf7cdc | 2e0a9cf76deeb43d354d71937ba020eb36852819 | IMCG/LockFreeStructs | /MultiCache.hpp | C++ | hpp | 21,104 | no_license | #pragma once
/*
* MultiCache.hpp
*
* Created on: Dec 13, 2018
* Author: rcasita
LockFreeBoundedBufferSPSC Single Block BB. Maintains strict coherence.Used Internally for Hydra Queue.
MultiBoundedBufferSPSC Growable Buffer Queue. Maintains strict coherence. Used Internally for
Hydra Queu... |
05d687b0011d8be25bf88c8e7943c6fbf4fb8dd7 | 86fce7a1ed3da51fbfb2b29b18266155b5e08639 | AaronNGray/GenomeWorkbench | /src/gui/packages/pkg_sequence_edit/remove_srcnotes.cpp | C++ | cpp | 4,740 | permissive | /* $Id: remove_srcnotes.cpp 42188 2019-01-09 21:48:14Z asztalos $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Governm... |
a8a6015e1589c92149c031b9d808a217a50f76b1 | 64898e27d2ce4e59b1bf289084a797cd612d486d | vvaltchev/tilck | /tests/unit/itoa_test.cpp | C++ | cpp | 7,600 | permissive | /* SPDX-License-Identifier: BSD-2-Clause */
#include <iostream>
#include <limits>
#include <random>
#include <string>
#include <type_traits>
#include <inttypes.h>
#include <gtest/gtest.h>
using namespace std;
extern "C" {
#include <tilck/common/string_util.h>
#include <tilck/kernel/test/itoa.h>
}
// Wrapper d... |
da8003a7273d60d8597d9e0232bc92edba450b93 | ad8dfcde478f15038b9a051134289b1998b340fc | hkrn/MMDAI | /obsoletes/VPVM/src/dialogs/FrameSelectionDialog.cc | C++ | cc | 3,128 | no_license | /**
Copyright (c) 2010-2013 hkrn
All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the foll... |
5c3290597dbfb4c7262692bf93ae0bee4e4fc376 | ec650bbd6c7324689873a54dc7752002983cf902 | KatherineTsareg/summer-practice | /obfuscator/obfuscator/CVariables.cpp | C++ | cpp | 4,078 | no_license | #include "stdafx.h"
#include "CVariables.h"
using namespace std;
const vector<string> delimeters = {",", ":", ";", "-", "+", "*", "/", "=", "(", ")", "[", "]"};
std::vector<std::pair<std::string, std::string>>::iterator FindVal(std::string & val, std::vector<std::pair<std::string, std::string>> & vec)
{
for (std... |
cbf19186363f841bdc92a98ee88f49dc9039779c | 3af51fcad3d8aa936886420f95cb29ebe73c58c7 | hinnie123/ZeroCaliber_SDK | /SDK/ZC_BP_WeaponCase_Base_parameters.hpp | C++ | hpp | 488 | no_license | #pragma once
// ZeroCaliber (0.6.0 EA) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
// Function BP_We... |
6cac0bc9210faa882a4794d9f1a9e408110ee2ed | b077f5bac414d5c09cb98c32e857503f277112ea | newbie1988/CPlusPlusTest | /c11/enum/main.cpp | C++ | cpp | 251 | no_license | #include <iostream>
enum class Color : char
{
White = 0,
Black,
Green,
Red,
};
void printColor(Color color)
{
std::cout<<"color: "<<static_cast<int>(color)<<std::endl;
}
int main()
{
Color color = Color::Red;
printColor(color);
return 0;
}
|
fddd25774ac6fb9dfc4af72aa9e410b7d669e650 | b45ba8bf0bc48e3367a0ca4c6b97f2263045228e | bunsanorg/yandex_contest_system | /src/unistd/Exec.cpp | C++ | cpp | 1,615 | no_license | #include <yandex/contest/system/unistd/Exec.hpp>
#include <boost/assert.hpp>
namespace yandex {
namespace contest {
namespace system {
namespace unistd {
namespace {
std::vector<char> stringPairToVectorChar(
const std::pair<std::string, std::string> &p) {
if (p.first.find('=') != std::string::npos)
BOOST_T... |
7090febf4a038cce3a66994f215443ff14510bde | 402797b0dc4e72d86e8f113421655eeb76a38eb4 | wildmichael/ParaView3-enhancements-old | /VTK/IO/vtkUnstructuredGridReader.cxx | C++ | cxx | 11,585 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkUnstructuredGridReader.cxx,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for detai... |
475ad5d7ec0041c0cd7d5a95a6ff14ccaffd9d94 | 7609aae505e3e0ec1bef1318a77b7fc4e3fd855e | rollfatcat/ProblemSet | /基礎題目/陣列練習/基底轉換/c705.cc | C++ | cc | 276 | no_license | #include<iostream>
using namespace std;
int main(){
ios::sync_with_stdio(0),
cin.tie(0), cout.tie(0);
unsigned int x, base=(1<<8)-1, N[4];
while(cin>>x){
for(int i=3;i>=0;i--)
N[i]=x&base, x>>=8;
cout<<N[0]<<'.'<<N[1]<<'.'<<N[2]<<'.'<<N[3]<<'\n';
}
} |
232774574afe6adf8816ac8ee28df058b54aec7b | fd9a9ca59ea92d781c508efadfaf68f3031844fe | FrancisBacon95/BaekJoon | /19237 어른상어(2회차).cpp | C++ | cpp | 4,409 | no_license | #include <iostream>
#define _SHARK 0
#define _SMELL 1
#define EMPTY 0
using namespace std;
int N, M, k, num, ret;
int board [2][20][20];
int tmp_board[2][20][20];
int d_row[5] = {0, -1, 1, 0, 0};
int d_col[5] = {0, 0, 0, -1, 1};
struct SHARK{
int row, col, dir;
int prior[5][4] = {0, };
... |
8f5fd343b02c8c2a3eac8d7a5f49cfb02abf25b7 | da259b72377b30e54e9cb5fc43038330699d6285 | DTennant/markdown-parser | /ast.cc | C++ | cc | 2,313 | permissive | #include "ast.hpp"
#include "debug.hpp"
vector<Ast> tree_list;
void Ast::add_child(Ast &tree){
tree_list.push_back(tree);
this->child.push_back(tree_list.size() - 1);
}
string Ast::eval(){
string return_string;
switch(this->tree_type){
case HEAD_AST:
return_string += eval_head(*this);
break;
case SPLITS... |
0126c2c8b52398fded418411d81d0468a81a7fd1 | 80187f798696d144ce39181e56fc8478abc5de19 | ShinNoNoir/gdal-1.11.5-vs2015 | /gdal/frmts/hdf5/iso19115_srs.cpp | C++ | cpp | 5,997 | permissive | /******************************************************************************
* $Id$
*
* Project: BAG Driver
* Purpose: Implements code to parse ISO 19115 metadata to extract a
* spatial reference system. Eventually intended to be made
* a method on OGRSpatialReference.
* Author: Frank... |
5c075c763580e6f2213950cff4fc12583cfb586d | 97f0ceeffabd97309b99abb18638919fdb146c5c | pkong0414/Projects | /kongpatrick1.cpp | C++ | cpp | 2,575 | no_license |
#include <iostream>
#include <iomanip>
#include <cstdlib>
using namespace std;
//prototype functions
int distanceToClosest(int [], const int, int);
int main()
{
const int SIZE = 5; //size of the array
int numbers[SIZE] = {200, 400, 600, 800, 1000}; //the correct numbers
int input = 0; //user in... |
1e755961cbbf72b9d468967b6c168d5f6951189f | 14410373624be04a537baa16ab943e1741f79cf9 | Nubbin72/networking_sfml | /Client/source/Network.cpp | C++ | cpp | 5,683 | no_license | #include "Network.h"
Network::Network(sf::IpAddress& ip, unsigned short& port) : m_connected(false)
{
if (connection.connect(ip, port, sf::seconds(5)) != sf::Socket::Done)
{
std::cout << "Error connecting to server" << std::endl;
}
else
{
connection.setBlocking(false);
std::cout << "Connected"... |
a3efcef55df2c7fadbd51cf94e11a714e9d71ac2 | 1fc4f10fa78adebd44a3cf56adabf00f12e92bfa | romanzes/chromium | /chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc | C++ | cc | 4,496 | 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 "chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h"
#include "base/feature_list.h"
#include "build/build_config.h"
#incl... |
55c48e4efa42ac38cd469e81b9e16d9f261eafae | 0826b7c60133af223cf3dd2ac02ec575a840934a | niuxu18/logTracker-old | /second/download/curl/gumtree/curl_old_log_1645.cpp | C++ | cpp | 525 | no_license | fputs(
" the time the server needs to calculate the\n"
" result.\n"
"\n"
" size_download The total amount of bytes that were downloaded.\n"
"\n"
" size_upload The total amount of bytes that were uploaded.\n"
"\n"
" ... |
97023729e626d2283309e1f3f241aa4ec105e808 | d123537297936010a67eb607e6ea44bb8614d9a8 | GridEyes-2010/algebraic-shape-operator | /figures/src/PCP/Curvature/Methods/Barycenter.cpp | C++ | cpp | 1,062 | permissive | #include <PCP/Curvature/Curvature.h>
#include <PCP/Curvature/Weight.h>
#include <PCP/SpacePartitioning/KdTree.h>
#include <PCP/Geometry/Geometry.h>
namespace pcp {
PointWiseEstimationData CurvatureComputer_Barycenter::compute(const Geometry& points, int i, Scalar r) const
{
Vector3 sum_pos = Vector3::Zero();
... |
9fc76c64e190a43e20d8dc7edbb5cd70aaa8570f | 1add1886e5a4f354a5005bf85598897faa23a5d2 | LearnEarn-Fun/Competitive-Programming-Solutions | /C++ Solutions/Other/Binary_Search/Find_Element_in_Sorted_Rotated_Array.cpp | C++ | cpp | 1,453 | permissive | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define MOD 1e9+7
#define deb(x) cout << #x << "=" << x << endl
bool BinarySearch(vector<int> &value,int start, int end, int number)
{
int mid=start+((end-start)/2);
int n;
while(start<=end)
{
cout<<".";
if(va... |
2e1ccbc6b238442b80dd0a6d692aef3c6e822f64 | 586d72181e0b4212bf002b2c325372ba4b57d7ec | pqrkchqps/MusicBrowser | /src/dart/runtime/vm/scavenger.cc | C++ | cc | 22,773 | permissive | // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "vm/scavenger.h"
#include <algorithm>
#include <map>
#include <utility>
#include "vm/dart.h"... |
63667086ff81e2f4def96161c0e061fdf09d355f | 0019d5041a390fc86675c3679cbaa47c662e4d26 | rdfong/CmakeWPILib_EnviroVision | /libraries/ntcore/ntcore/src/main/native/cpp/LoggerImpl.cpp | C++ | cpp | 2,539 | no_license | /*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2015. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
adeef3f682af01ab23cc0a523990c6c56c25f9ca | 3b3d7933c66be9c8501d94104d9573cfdd21d1bd | KCreate/skybison | /runtime/under-collections-module-test.cpp | C++ | cpp | 5,131 | permissive | // Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
#include "under-collections-module.h"
#include "gtest/gtest.h"
#include "builtins-module.h"
#include "builtins.h"
#include "objects.h"
#include "runtime.h"
#include "test-utils.h"
namespace py {
namespace testing {
using UnderCollections... |
dbbaa25c43b52f0a4d6dd8858a533c30e86ec74b | bf36ae055b77a5522a50750335a83d1ea0262ac7 | sdukshis/syslog-amqp | /src/Decoder.cpp | C++ | cpp | 1,599 | permissive | #include "Decoder.h"
#include <iterator>
#include <algorithm>
#include "Message.h"
Decoder::Decoder()
: recv_host_{"", 0} { }
Decoder::Decoder(Decoder &&other)
: recv_buffer_{other.recv_buffer_}
, recv_host_{other.recv_host_}
, tag_{other.tag_} { }
Decoder & Decoder::operator=(Decoder &&other) {
... |
e3d581866167f2e556869cd493a503d6784c82f8 | 2c4d05d33a56da12f8b45659d593bb4f4ba4f8ee | demetoir/ps-solved-code | /lg code monster/lg code monster 5.cpp | C++ | cpp | 4,123 | no_license | //code moster 2
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <math.h>
#include <functional>
using namespace std;
#pragma warning(disable:4996)
#define LL long long
#define pii pair<int, int>
#define si(a) scanf("%d", &(a))
#define sc(a) scanf("%c", &(a)... |
a55deae22971b2e180588444e6afd02a43d08996 | 5ff936a6df039a00ec67b4afbe885de0301b8775 | canonical-robots/DomainModelsRepositories | /CommNavigationObjects/smartsoft/src-gen/CommNavigationObjects/CommCdlRobotBlockedEventResultACE.hh | C++ | hh | 1,651 | permissive | //--------------------------------------------------------------------------
// Code generated by the SmartSoft MDSD Toolchain
// The SmartSoft Toolchain has been developed by:
//
// Service Robotics Research Center
// University of Applied Sciences Ulm
// Prittwitzstr. 10
// 89075 Ulm (Germany)
//
// Information abo... |
5e56accd204b713b8e615251d649b4233059be0c | 2fe8a40a2ce0f0c0557d23c24074afd2af8887b8 | deeparac/Algorithms | /Symposium/String Serialization.cpp | C++ | cpp | 1,082 | no_license | class Solution {
public:
/*
* @param strs: a list of strings
* @return: encodes a list of strings to a single string.
*/
string encode(vector<string> &strs) {
// write your code here
string rst = "";
for (string& str : strs) {
int len = str.size();
... |
c2d6ca3dee7e6dfa9356c59f7033ae7fc51da2b1 | e23a2f2023cff0ec7928115c83f91ac038869e8f | GAIL-4-BARK/bark | /bark/models/behavior/rule_based/lane_change_behavior.cpp | C++ | cpp | 7,895 | permissive | // Copyright (c) 2020 Julian Bernhard, Klemens Esterle, Patrick Hart and
// Tobias Kessler
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include "bark/models/behavior/rule_based/lane_change_behavior.hpp"
#include "bark/models/behavior/idm/bas... |
99974053a7cb0249cc7e3d1589ff95deaf1f7744 | 4b12bb3f5ab4d1a021a72dcd4c060a54feabedc3 | wyx150137/wyx-infinity37-ac-code-on-BZOJ | /2962_wyx.cpp | C++ | cpp | 3,528 | no_license |
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
const int mod = 19940417;
const int N = 60000+5;
const int M = 140000+5;
typedef long long LL;
using namespace std;
int b[25];
int C[N][21];
bool rev[M];
int lazy[M];
int a[N];
inline int read()
{
int x=0,f=1;char ch = getchar();
whil... |
d4430b320d46011df48d3569c9937f85a7beda2c | 036fe4eed1294b22654724ee121e186b6fe847c8 | lanl/NuT | /lib/meshes/spherical/Spherical_Mesh.cc | C++ | cc | 431 | permissive | // Spherical_Mesh.cc
// Jun 27, 2019
// (c) Copyright 2019 Triad National Security, all rights reserved
#include "spherical/Spherical_Mesh.h"
namespace nut_mesh {
/* Note, using this value to distinguish from accidental roll-over cases. */
const Spherical_1D_Mesh::Face Spherical_1D_Mesh::null_face_{0xFFFF'FFFC};
con... |
ea374971c16ce331502f5a8591fb61979fe09e4c | ae25c47fb1826b388769326ccf56cac41bdc2064 | yaso9/libqsim | /src/utils.cpp | C++ | cpp | 554 | no_license | #include <arrayfire.h>
__attribute__((visibility("hidden"))) af::array kron(af::array &lhs,
af::array &rhs) {
// This isn't very readable, but it implements the kronecker product with GPU
// acceleration
af::array arr = af::tile(lhs, rhs.dims(1));
arr = af::... |
037bdeffb242ea9c4a458171fc4315bf0a1dcb89 | 072f10ac968d60dc828b5dfc72c157286db8b737 | NeverGX/webserver | /threadpool/test_threadpool.cpp | C++ | cpp | 2,145 | no_license | //手写线程池单例模式
#include <unistd.h>
#include <list>
#include <cstdio>
#include <exception>
#include <pthread.h>
#include <assert.h>
#include "../lock/locker.h"
template<class T>
class threadpool{
private:
threadpool(int thread_number);
static threadpool<T>* m_instance;
public:
static threadpool<T>* create_thre... |
d6b3e06eec8a0ecac8ab3ca2a31d3333a048e96b | 9af0a73ba6b7a51faab8637d760c9c66d13a01c9 | JHSDF01/simutrans | /simlinemgmt.cc | C++ | cc | 5,552 | permissive | /*
* part of the Simutrans project
* @author hsiegeln
* 01/12/2003
*/
#include <algorithm>
#include "simlinemgmt.h"
#include "simline.h"
#include "simconvoi.h"
#include "gui/simwin.h"
#include "simworld.h"
#include "simtypes.h"
#include "simintr.h"
#include "dataobj/schedule.h"
#include "dataobj/loadsave.h"
#inc... |
0ab9f1bf5745601a604b5aac4a37eb53aeb73653 | dcdcdc63ce790bd1588c95ea2715bd739a20e1ea | hallzhang/HearthStoneRobot | /Robot/OutputInfo.cpp | C++ | cpp | 549 | no_license | #include "OutputInfo.h"
//#include<Windows.h>
#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
using namespace std;
COutputInfo::COutputInfo(std::string outputFile)
:m_coutFile(outputFile.c_str())
{
/*HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SMALL_RECT rc = { 1400, 0, 120, 30 };
SetCons... |
f13076e9af607b51de93e4b630999a92ab457913 | 048d4cdc526155b39e74e34e3944d10267e87631 | anurags288/dss | /q7.cpp | C++ | cpp | 870 | no_license | #include<iostream>
using namespace std;
int BinarySearch(int [], int, int, int);
int main()
{
int a[20], sa, ele, st, ls;
cout<<"\nEnter the size of the array you want to see:";
cin>>sa;
cout<<"\nEnter the elements of the array.";
for(int i=0;i<sa;i++)
{
cout<<"\nEnter the element number "<<i+1<<":";
cin>... |
6b43ffcc5b15d1c31bf410d15a64189f85558262 | b1e6e13718458fd597e9ead5bd16880616ebea02 | watashi/AlgoSolution | /zoj/26/2609.cpp | C++ | cpp | 6,360 | no_license | #include <queue>
#include <cstdio>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
using namespace std;
const int MAXN = 1024;
const int MAXM = 4096;
inline int RE(int i) { return i ^ 1; }
struct Edge {
int v;
int c;
};
struct ExtFlowNetwork {
int n, m, source, sink;
vect... |
693e902fe4863bad7772155550caadd516444fc0 | e8bfe63d3c684603970b7e2552e2b4d1e36fa423 | marynate/HoudiniEngineForUnreal | /Source/HoudiniEngineRuntime/Private/HoudiniAssetParameterFolderList.cpp | C++ | cpp | 2,976 | no_license | /*
* PROPRIETARY INFORMATION. This software is proprietary to
* Side Effects Software Inc., and is not to be reproduced,
* transmitted, or disclosed in any way without written permission.
*
* Produced by:
* Mykola Konyk
* Side Effects Software Inc
* 123 Front Street West, Suite 1401
* Toro... |
77794a9ed3065f264dba28a5b0c9fb99cc8730a0 | 87d95586ca454711d0caa727c20cf1635d87bf33 | owgee/mapbox-gl-native | /src/mbgl/renderer/line_bucket.hpp | C++ | hpp | 2,075 | permissive | #ifndef MBGL_RENDERER_LINEBUCKET
#define MBGL_RENDERER_LINEBUCKET
#include <mbgl/renderer/bucket.hpp>
#include <mbgl/tile/geometry_tile.hpp>
#include <mbgl/geometry/vao.hpp>
#include <mbgl/geometry/elements_buffer.hpp>
#include <mbgl/geometry/line_buffer.hpp>
#include <mbgl/layer/line_layer.hpp>
#include <vector>
na... |
c26b4397297ef2e46870804c22a88023f3fcca62 | e6d76f448df32cb5b25d377888c7662d4055f0cd | skyqinsc/CppPrime | /ch14/ex14_16_StrBlobTest.cpp | C++ | cpp | 247 | permissive | #include "ex14_16_StrBlob.h"
#include <iostream>
int main()
{
StrBlob sb{ "Hello", "World", "Pezy" };
for (ConstStrBlobPtr iter = sb.cbegin(); iter != sb.cend(); iter.incr()) {
std::cout << iter.deref() << " ";
}
std::cout << std::endl;
}
|
d4ca1c21d919637d1969bb6dad01c61fc1da1edc | 764a213e458b5ec9e33751e7bf9459ac8d414a5a | aashimawadhwa/cpp-programs | /armstrong_number.cpp | C++ | cpp | 527 | no_license | #include <iostream>
using namespace std;
int main() {
int num, originalNum, remainder, result = 0;
cout << "Enter a three-digit integer: ";
cin >> num;
originalNum = num;
while (originalNum != 0) {
remainder = originalNum % 10;
result += remainder * remainder * re... |
e753a3bc034b0cc05720424bc6563a8c7ea82ffe | 527346fe766657e78a3b87216e725b1b40464ff2 | sohang3112/generic-table | /DataTable.cpp | C++ | cpp | 8,360 | no_license | #include <iostream>
#include <cstring>
#include "DataTable.hpp"
bool DataTable::allocHeader() {
header = new String[table_info.n_cols];
if (!header) {
cerr << ERR_MSG << "Out of Memory";
close();
status = ERR_TABLE_INVALID;
}
return header != nullptr;
}
void strip(String str) { //... |
c96a3ca212d93ac6d91f20d12f4db19699fa3140 | fcfd27b3f64857801abaa3d8131f8f4c7a05c689 | svn2github/libicu_full | /branches/andy/6910a-testfw/source/test/perf/howExpensiveIs/howExpensiveIs.cpp | C++ | cpp | 19,285 | permissive | /*
**********************************************************************
* Copyright (c) 2011-2012,International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
#include <stdio.h>
#include "sieve.h"
#include "unicode/utime... |
5547a6fec7cbd3e9d5c406eceae5135f6e42e346 | aec2b2f0bf7dd87dca3bfa04941d5cc980cc6492 | kcwzzz/KCW | /Project 모음/170825/Classes/CBackgroundLayer.cpp | C++ | cpp | 2,000 | no_license | #include "CBackgroundLayer.h"
#include "CActor.h"
#include "GameScene.h"
#include "Define.h"
using namespace cocos2d;
void CBackgroundLayer:: Create()
{
mpSpriteA = Sprite::create("BackGround_0.jpg");
mpSpriteA->retain();
mpSpriteB = Sprite::create("BackGround_1.jpg");
mpSpriteB->retain();
mpSpriteC = Sprite... |
cde85e6e27081e6dfda1ca46c6fa64a1a8afbe4b | 08bbb41f6cb1d68ea674c3be59a11629500d72b9 | MelvinRook/Diversia | /QtOgreEditor/source/Graphics/OgreWidget.cpp | C++ | cpp | 4,310 | no_license | /*
-----------------------------------------------------------------------------
Copyright (c) 2008-2010 Diversia
This file is part of Diversia.
-----------------------------------------------------------------------------
*/
#include "Platform/StableHeaders.h"
#include "Graphics/OgreWidget.h"
#include "Input/QtInpu... |
0b8f19a2b4486f6dd74d1f974797d5a583622a04 | bf5b709376927d7a9433498d0d60b79e5a5f9f42 | vv9gagner/EnergyPlus | /src/EnergyPlus/ThermalISO15099Calc.hh | C++ | hh | 16,589 | permissive | // EnergyPlus, Copyright (c) 1996-2017, The Board of Trustees of the University of Illinois,
// The Regents of the University of California, through Lawrence Berkeley National Laboratory
// (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
// National Laboratory, managed by UT-Batt... |
f375e256186bb7f825bf857aa4bce983658312f5 | 1796e67cbedbed168a98c0fe57e79839909dea30 | youtube/cobalt | /third_party/v8/src/heap/cppgc/marking-state.cc | C++ | cc | 930 | permissive | // Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/heap/cppgc/marking-state.h"
#include <unordered_set>
namespace cppgc {
namespace internal {
void MutatorMarkingState::FlushNotFullyCons... |
de44f74c31e7773a7d73bef751dc299fac4f2975 | f4010557847ee8d3a39fd79c496018685225a658 | Arisego/PhysxTest | /Source/TC_Blank/MyStaticMeshComponent.cpp | C++ | cpp | 2,142 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "TC_Blank.h"
#include "MyStaticMeshComponent.h"
#include "PhysXIncludes.h"
#include "PhysicsPublic.h"
#include "Runtime/Engine/Private/PhysicsEngine/PhysXSupport.h"
UMyStaticMeshComponent::UMyStaticMeshComponent()
{
PrimaryCo... |
70ae65343d6eb443c0759a7519b32f73a767cc84 | 8725528157dc72b3fc2259667e701494c2e858e8 | ue4sdk/DRG-SDK | /DRG-SDK/SDK/DRG_ITM_CampaignProgress_functions.cpp | C++ | cpp | 6,312 | no_license | // Deep Rock Galactic (0.22) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "DRG_ITM_CampaignProgress_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.