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 |
|---|---|---|---|---|---|---|---|---|
53516ae023b5767418726f1afbe9827c6d21d5d3 | 95889126c5106434d633097dfcd6b541a4b98ca6 | kirwinia/ares-emu-v121 | /ares/ares/scheduler/scheduler.cpp | C++ | cpp | 4,068 | permissive | inline auto Scheduler::reset() -> void {
_threads.reset();
}
inline auto Scheduler::threads() const -> u32 {
return _threads.size();
}
inline auto Scheduler::thread(u32 uniqueID) const -> maybe<Thread&> {
for(auto& thread : _threads) {
if(thread->_uniqueID == uniqueID) return *thread;
}
return {};
}
//... |
6b5498cc293270e523987560ee48723066984e07 | a447b5b57a42410ec7ffdfcf16debe9bc7bfccdb | mschwartz/evade2-ldk-game-1 | /Evade2/src/main.cpp | C++ | cpp | 335 | permissive | #include "Game.h"
BViewPort *gViewPort;
BGameEngine *gGameEngine;
GGame *gGame;
TOptions *gOptions;
/** @file
* \brief Main entry point for game engine.
*
* Initializes the engine and runs the main event loop.
*/
extern "C" void app_main() {
gGame = new GGame();
gGame->Run();
}
int main() {
app_main();
... |
6fc39819e6fdc3a5fa9650e87e36418d004140a4 | 9e2c352e213337cdaa966ef368d44e727d388ee2 | suhokimHEP/cmssw | /CalibTracker/SiPixelLorentzAngle/src/SiPixelLorentzAnglePCLWorker.cc | C++ | cc | 34,984 | permissive | // -*- C++ -*-
//
// Package: CalibTracker/SiPixelLorentzAnglePCLWorker
// Class: SiPixelLorentzAnglePCLWorker
//
/**\class SiPixelLorentzAnglePCLWorker SiPixelLorentzAnglePCLWorker.cc CalibTracker/SiPixelLorentzAnglePCLWorker/plugins/SiPixelLorentzAnglePCLWorker.cc
Description: [one line class summary]
Imple... |
4a37a3952a691841b6d99ece6c79c139cb609080 | 398a1675422a98604db3f1cf7070b3a073feccf1 | euroelessar/FBReader | /zlibrary/ui/src/qt/time/ZLQtTime.cpp | C++ | cpp | 1,405 | no_license | /*
* Copyright (C) 2004-2013 Geometer Plus <contact@geometerplus.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later ver... |
c6b40b413643ea7a0db00e86bdbe04f1643f49ff | 50db4b7446c617d6b42736235903627021143933 | mwt-0722/QtStudy | /Socket/SendFileClient/sendfile.cpp | C++ | cpp | 1,646 | permissive | #include "sendfile.h"
#include <QFile>
#include <QFileInfo>
#include <QHostAddress>
#include <QThread>
#include <QDebug>
SendFile::SendFile(QObject *parent) : QObject(parent)
{
}
void SendFile::connectServer(QString ip, unsigned short port)
{
qDebug() << "连接服务器线程:" << QThread::currentThread();
m_tcp = new Q... |
e06cf8676a0824842518b8032ba408a696240e7f | 26c37de3b2b351cf4ccb57a8202566e9296c06b8 | sukeesh/Algorithm-Implementations | /StronglyConnectedComponents.cpp | C++ | cpp | 1,013 | no_license | #include "bits/stdc++.h"
using namespace std;
#define N 100000
vector<int> graph[N], rgraph[N];
stack<int> S;
bool visited[N];
inline void pre()
{
memset(visited,0,sizeof(visited));
}
inline void fillOrder(int node)
{
visited[node]=true;
for(int i = 0 ; i < graph[node].size(); i++ )
{
if(!visited[graph[node][... |
4cd6865833c0558eec00fa059d6ec4d9dd72fd6c | 802ebf839d2af516e5e6f2699fcddc606464fa51 | TheEndeavor/Sample-Math | /COR/Common/Comparable.hpp | C++ | hpp | 1,314 | no_license | #include "StdAfx.h"
#include "Comparable.h"
namespace CommonObjectRepository
{
template <typename TYPE>
template <typename COMPARE>
bool Comparable<TYPE>::operator==(const COMPARE& toCompare) const
{
return compareReferred(toCompare) == 0;
}
template <typename TYPE>
template <typename COMPARE>
bool Co... |
225ac29102d67e6ade4549e2ed9983d49a8b82f3 | ea46ab1824efcc41ce167661895453ebacca357c | irods/aws-sdk-cpp | /aws-cpp-sdk-securityhub/source/model/AwsNetworkFirewallFirewallDetails.cpp | C++ | cpp | 5,098 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/securityhub/model/AwsNetworkFirewallFirewallDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
... |
1b43f43bb91146451dec2ec46ece9d1200f7dbe4 | a34ca33672c7bc943ebb7fc5203764f95162d3a3 | dhivyadharshin/pytorch | /test/cpp/jit/test_custom_operators.cpp | C++ | cpp | 8,617 | permissive | #include <gtest/gtest.h>
#include <test/cpp/jit/test_utils.h>
#include <torch/csrc/jit/ir/alias_analysis.h>
#include <torch/csrc/jit/ir/irparser.h>
#include <torch/csrc/jit/passes/dead_code_elimination.h>
#include <torch/csrc/jit/runtime/custom_operator.h>
#include <torch/csrc/jit/runtime/register_ops_utils.h>
#inclu... |
4bd8a0aadaba345a4f81a954310f114425f0c8b8 | db281d1cbb4ded7e37889c71584421852ebd0864 | Jgardea/gpgpu-sim | /src/intersim2/dsent/electrical/TestModel.cc | C++ | cc | 9,194 | permissive | #include "electrical/TestModel.h"
#include <cmath>
#include "std_cells/StdCell.h"
#include "std_cells/StdCellLib.h"
#include "electrical/RippleAdder.h"
#include "electrical/Multiplexer.h"
#include "timing_graph/ElectricalNet.h"
#include "timing_graph/ElectricalDriver.h"
#include "timing_graph/ElectricalLoad.h"
#inclu... |
cceb10b0765b9fd1a8fb534bb8c922e35364382e | 46609e8363c97dd5c3a7a15afc7440451394e159 | compTAG/reconstruction | /bindings/python/reconstruction.cpp | C++ | cpp | 929 | no_license |
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "ctag/types.h"
#include "ctag/constructor.h"
#include "ctag/compiler_stats.h"
namespace py = pybind11;
void init_reconstruction_runner(py::module&);
double min_angle(std::vector<double> coords) {
typedef ctag::Types Types;
typedef Types::Poi... |
94e0b0a5d2f3202f8f3277b23bd294f25a61fb6c | 27e93b0ea996d2f0996d0413300ec014c95ea2d6 | ckskylight/ComputationalPhotography | /pset2/asst/Image.cpp | C++ | cpp | 12,802 | no_license | /* -----------------------------------------------------------------
* File: Image.cpp
* Created: 2015-08-29
* -----------------------------------------------------------------
*
* The 6.815/6.865 Image class
*
* ---------------------------------------------------------------*/
#include "Image.h"
using na... |
526cd31ba38deb16e622506efc64c905bcb21bbe | bd60b407fd8f5496b971b57d26bc61244cc2f024 | paxex/paxchange | /src/test/netbase_tests.cpp | C++ | cpp | 6,828 | permissive | // Copyright (c) 2012-2014 The Bitcoin Core developers
// Copyright (c) 2014-2015 The Dash Core developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "netbase.h"
... |
1570b2b888f7816834ad85966c28ba96eb0925a4 | c4d593e6c6e4f8b42113e26abb0a9c11eccfe74c | shang766/multiview | /multiview/multiview_cpp/src/gui/interface/tabs/floor-histogram-viewer.cc | C++ | cc | 28,871 | permissive |
#include "stdinc.hpp"
#include "floor-histogram-viewer.hh"
#include "gui/app-state.hh"
#include "gui/interface/interface-helpers.hpp"
#include "gui/qt-helpers.hpp"
#include "gui/widgets/image-viewer-2.hh"
#include "gui/widgets/labeled-slider.hh"
#include "perceive/movie/movie-utils.hpp"
#include "perceive/movie/ren... |
e490b782b82a2868c29650b1cbb0df47e3cdff64 | c1fa1a52c1d626ad1b2caa5957a4e387384af5b5 | carmichaelong/opensim3-scone | /OpenSim/Simulation/Model/Model.cpp | C++ | cpp | 73,763 | permissive | /* -------------------------------------------------------------------------- *
* OpenSim: Model.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
... |
f0c947a0cc9479355944b07a1e7a4fcd1049a43f | 69f1f1aa23e741e02f5b40f694f4910d8049420e | xxl534/dx11Practice | /Chapter/tessellation_13/basicTessellation/Vertex.cpp | C++ | cpp | 1,287 | no_license | #include "Vertex.h"
#include "Effects.h"
#pragma region InputLayoutDesc
const D3D11_INPUT_ELEMENT_DESC InputLayoutDesc::Basic32[3] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "NORMAL", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
{ "TEXCO... |
46645d33476af8468502fedb034f275f8400e425 | d26313f9dbbe99f966920e3ddb73a94f629bdfc2 | wzpyh/PUBG-SDK | /SDK/PUBG_P_MotoDrive_Dirt_BP_functions.cpp | C++ | cpp | 2,011 | no_license | // PlayerUnknown's Battlegrounds (2.5.39.19) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace Classes
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Functi... |
6fed7354ffb53a10fb876c44d90c8ba907b8e101 | 52b35bc946594cc847b7afe58cd235d8b5053c32 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14549/function14549_schedule_14/function14549_schedule_14.cpp | C++ | cpp | 1,454 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14549_schedule_14");
constant c0("c0", 512), c1("c1", 1024), c2("c2", 64);
var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i01("i01"), i02("i02"), i03("i03"), i04("i04");
input i... |
c8e3c485a2532b0f7dc3eac8efa1f1be558320bc | 5b8ad5f9f6429ec6e4e191d345f985cacced95ef | JSUYA/rive-tizen | /example/rive_viewer.cpp | C++ | cpp | 7,794 | permissive | #include <thread>
#include <dirent.h>
#include <algorithm>
#include <Elementary.h>
#include <rive_tizen.hpp>
#include "animation/linear_animation_instance.hpp"
#include "artboard.hpp"
#include "file.hpp"
#include "tvg_renderer.hpp"
using namespace std;
#define WIDTH 1000
#define HEIGHT 700
#define LIST_HEIGHT 200
s... |
2b708cefc29aaa32d9dc7af20db3274850193e33 | 71d73cb30de046fbdd6b377761e67ac0550b95f9 | snyderek/floating_temple | /engine/live_object_node.cc | C++ | cc | 3,097 | permissive | // Floating Temple
// Copyright 2015 Derek S. Snyder
//
// 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 applicab... |
b98483e4c1fa120e8e364e6f55dacccfe58179b8 | d3d91b6deeba7fbb8023e3f96e6cb6cce8180d85 | mritzing/School | /Applied/project1/track.hpp | C++ | hpp | 2,193 | no_license | #ifndef TRACK_HPP
#define TRACK_HPP
#include <list>
#include <forward_list>
#include "event.hpp"
#include <iostream>
/** A Track represents a sequence of Events ordered by thier MIDI tock time.
* Events can be added to the Track based on type of event. Events can be accessed
* using a constant iterator in order, fir... |
96f25a0cc32eccf6d2b1bf41676089cce39952ff | be028ee788b6c74d07620012c3461f2a61fe8c30 | stevenstong/adobe-tools | /AdobeInDesignCCProductsSDK.2020/source/sdksamples/codesnippets/SnpPerformNoteFunction.cpp | C++ | cpp | 22,018 | no_license | //========================================================================================
//
// $File: //depot/devtech/15.0/plugin/source/sdksamples/codesnippets/SnpPerformNoteFunction.cpp $
//
// Owner: Adobe Developer Technologies
//
// $Author: pmbuilder $
//
// $DateTime: 2019/10/11 10:48:01 $
//
// ... |
246ef5627577e6e15464f64c14076490f8a07e1a | 96d664982a427d9f5d8a3240a545aa36f8ea68c0 | poby123/studyDatastructure | /이진검색트리/avl.cpp | C++ | cpp | 5,592 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
// An AVL tree node
class Node
{
public:
Node(int x = 0) : key(x) {}
int key;
int height;
Node *left;
Node *right;
};
// A utility function to get the
// height of the tree
int height(Node *N)
{
if (N == nullptr)
return 0;
... |
c1dcbb98880f10a3608217382d313994f71efaa6 | c51bcb276fe096658d30b08b20b72f91fa945695 | ccdxc/logSurvey | /data/crawl/git/old_hunk_2630.cpp | C++ | cpp | 406 | no_license | static void dissociate_from_references(void)
{
static const char* argv[] = { "repack", "-a", "-d", NULL };
if (run_command_v_opt(argv, RUN_GIT_CMD|RUN_COMMAND_NO_STDIN))
die(_("cannot repack to clean up"));
if (unlink(git_path("objects/info/alternates")) && errno != ENOENT)
die_errno(_("cannot unlink temporary ... |
b684da463fb88c099946b78f638d0e3b5bdf1285 | ca8608fa90e37e5d9567c19d48f7f3525762607b | gbrlas/AVSP | /CodeJamCrawler/dataset/14_11651_10.cpp | C++ | cpp | 1,210 | no_license | #include <iostream>
#include <map>
#include <sstream>
#include <vector>
#include <stack>
#include <queue>
#include <cstdio>
#include <climits>
#include <algorithm>
#include <cmath>
using namespace std;
void solve() {
int n;
int ans = 0;
cin >> n;
vector<string> data(n);
vector<int> s(n);
for (int i=0; i<n; i++) ... |
9332be8d172beb51b74eb1de8b9cdd1f0c811eb3 | a352c3dca54dc0e0587eb00c099a4e16552806e8 | crashdemons-external/kerukuro-cppcrypto | /cppcrypto/sm3.cpp | C++ | cpp | 4,820 | permissive | /*
This code is written by kerukuro for cppcrypto library (http://cppcrypto.sourceforge.net/)
and released into public domain.
*/
#include "cpuinfo.h"
#include "portability.h"
#include "sm3.h"
#include <memory.h>
//#define CPPCRYPTO_DEBUG
#ifdef _MSC_VER
#define inline __forceinline
#endif
namespace cppcrypto
{
sm3... |
8a9470cb5efee1fc5b24d80d4a94d12271375ef7 | fe6f4c4ddb1ad65a5b1c526a449a5a58448a2320 | jitsuCM/MemoryProfiler | /MemoryCrawler/UnityProfiler/main.cpp | C++ | cpp | 17,285 | permissive | //
// main.cpp
// UnityProfiler
//
// Created by larryhou on 2019/5/5.
// Copyright © 2019 larryhou. All rights reserved.
//
#include <sys/stat.h>
#include <unistd.h>
#include <iostream>
#include <fstream>
#include "utils.h"
#include "Crawler/record.h"
using std::cout;
using std::endl;
std::ifstream *stream;
v... |
6ad216616425eca3bf34b44089d29bcd604f1f25 | 92c1cf110412a967fd613ec4622be466b3dbd084 | sunho/algorithms | /old/codeup/2016.07.27 기초입출력 정수 한 개 입력받아 나누어 출력하기.cpp | C++ | cpp | 1,453 | no_license | /**************************************************************
# 문제 설명
다섯 자리의 정수 한 개를 입력받아 각 자리별로 구분해 출력한다.
# 입력
다섯자리로 이루어진 한 개의 정수를 입력받는다.
(단, 10,000 <= 입력받는 수 <= 99,999 )
# 출력
각 자리의 수를 분리해
한 줄에 하나씩 [ ]속에 넣어 출력한다.
# 입력 예시
75254
# 출력 예시
[70000]
[5000]
[200]
[50]
[4]
# 도움말
scanf("%1d%1d%1d%1d%1d", &... |
7ac52c68d5326dd16562a0884dcd13bdc6023c16 | 04c0d99ceb747330a0e56b9802b48b8c63c199da | caomw/Theia | /src/theia/vision/sfm/transformation/gdls_similarity_transform_test.cc | C++ | cc | 15,069 | no_license | // Copyright (C) 2013 The Regents of the University of California (Regents).
// 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... |
1b242410c22b2a76ffba9cf5c8cf44069399e3b0 | 4133626284e89bde789a82bd00482731bd61f9fe | morimoto0606/procon | /atcoder/contest20201101/D.cpp | C++ | cpp | 2,455 | no_license | #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
int main() {
vector<string> list2 {
"16",
"32",
"40",
"48",
"56",
"72",
"80",
"96"
};
vector<string> list8 {
"112",
... |
277c40b3bb29028147148e5fdd5440603b6a7d39 | bed21ac9f8337e85692f0451351767616ea77a95 | memset0/OI-Code | /洛谷/P1847 轰炸II.cpp | C++ | cpp | 658 | no_license | #include <bits/stdc++.h>
#define boom(x, y, a, b, c, d) (a <= x && x <= c && b <= y && y <= d)
using namespace std;
const int maxn = 2010;
int n, m;
struct Group {
int x1, x2, y1, y2;
} a[maxn];
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
scanf("%d%d%d%d", &a[i].x1, &a[i].y1, &a[i].x2, &a... |
c792e8fa13cef28d2d2df52507275472477c75c5 | 1dd8b745c08cfb488f92fd7fbc4883ee5788c630 | truongphucanh/game-match-three | /Classes/View/CookieLayer.cpp | C++ | cpp | 15,056 | no_license | #include "CookieLayer.h"
#include "Global/Converter.h"
#include "Controller/GameController.h"
#include "SimpleAudioEngine.h"
#include "Global/VisibleRect.h"
CookieLayer::CookieLayer()
{
this->reset();
}
/**
* \brief success or not
* \return called automatically
*/
bool CookieLayer::init()
{
if (!Layer::init())
... |
4a7e6af9c84d524bcff37788e4a0c66fb936dd69 | da8569efd444b35b3f2d0780c603bb14dbce6a09 | shafik/llvm-project | /lldb/source/Utility/Log.cpp | C++ | cpp | 13,336 | permissive | //===-- Log.cpp -----------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
1f81e2122ae58365e9a16fb184c26464d0a33896 | 1e7098c48eb7a83d562be7319bce5e63fe0d43da | ShoumaNakajima/BATTLE-OF-ATMOSPHERE1 | /BATTLE-OF-ATMOSPHERE/BATTLE-OF-ATMOSPHERE/Main.cpp | C++ | cpp | 4,320 | no_license | #include "Main.h"
#include "DirectX.h"
#include "TitleScene.h"
#include "HelpScene.h"
#include "GameScene.h"
#include "ResultScene.h"
#include "Stage.h"
#include "Collision.h"
#include "Create.h"
//ここ出来ればなくしたい
DIRECTX directx;
DRAW draw;
TITLE title;
HELP help;
GAME game;
RESULT result;
STAGE stage;
SPACEMAN spacema... |
0a0fa71380d4a6fbbf9328923dec92515e1b6fc7 | ce09894033d0b0e4f99adc554f0e45906f7f9cb8 | sokolovp/BraveMining | /src/components/password_manager/sync/browser/sync_credentials_filter.cc | C++ | cc | 4,942 | permissive | // Copyright 2015 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/password_manager/sync/browser/sync_credentials_filter.h"
#include <algorithm>
#include "base/macros.h"
#include "base/metrics/field... |
199e280beb64f8e44d5c1e8c47a2fda224037a0f | 107e03dab08ebd8bca99663564c76a5c4e71890c | TTLIUJJ/MyLearning | /apue/chapter14/14.3.1.cpp | C++ | cpp | 1,429 | no_license | #include <iostream>
#include <fcntl.h>
#include "apue.h"
using namespace std;
int lock_reg(int fd, int cmd, int type, off_t offset, int whence, off_t len)
{
struct flock lock;
lock.l_type = type;
lock.l_start = offset;
lock.l_whence = whence;
lokc.l_len = len;
return (fcntl(fd, cmd, &lock));
}
pid_t lock_test... |
c1978c1b7db3ab32e6ebb13ed5f7f60403cccb58 | bf2c1a674ab1950d3553d6c038e3bbe0a1bfe934 | Wahed08/ACM-Problem-Solving | /The New Year: Meeting Friends.cpp | C++ | cpp | 217 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
int arr[5];
for(int i=0; i<3; i++){
cin>>arr[i];
}
sort(arr,arr+3);
cout<<arr[2]-arr[0]<<endl;
return 0;
}
|
45af6f160d6f7552c29a0ec934278dec18aff9e0 | c4ebbecdca46f47c33d1e9f47cb8d1c05ad1de84 | Ovishake1607066/SGIPC-materials | /Solved problems on contest/Businessmen Problems.cpp | C++ | cpp | 848 | no_license | #include<bits/stdc++.h>
#define ll long long
using namespace std;
class c
{
public:
int c1,c2;
}cc[1000000];
bool ValueCmp(c const & a, c const & b)
{
return a.c1 < b.c1;
}
int main()
{
ll n,m,i,a,b,d,e,s=0;
cin>>n;
for(i=0;i<n;i++)
{
cin>>cc[i].c1>>cc[i... |
7d6a20c22fa00c922eb19767e95908dbbc6fbba3 | 6756a8928bb3b6c10d8f726adddf3effb050ff79 | alex-dengx/functionsimsearch | /graphhashes.cpp | C++ | cpp | 1,841 | permissive | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
a4605bdb802195b2fbb2446cb20024beab96060c | 4eb891eebed45ec1b674aed22502d3263228cf7d | JAlthea/Algorithm | /Tree/BOJ 1167 트리의 지름.cpp | C++ | cpp | 886 | no_license | #include <bits/stdc++.h>
using namespace std;
vector<vector<pair<int, int>>> edge;
vector<bool> visited;
int e, maxLength;
void dfs(int v, int length)
{
visited[v] = true;
if (maxLength < length)
{
maxLength = length;
e = v;
}
for (int i = 0; i < edge[v].size(); ++i)
{
int next = edge[v][i].first;
in... |
f363803def9d65d8733e0fa3da45d9048a5892bc | bb7ce2f1a157eabb1e2483a7f22d81ba35722bb8 | cpkt9762/SCUM-SDK | /SDK/SCUM_Working_pants_01_classes.hpp | C++ | hpp | 682 | no_license | #pragma once
// SCUM (0.1.17.8320) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SCUM_Working_pants_01_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
/... |
bce248c4f05d16a5540c61b8327b0ad671403215 | 8452a699f330004137ece469f3935197332fc2d6 | zyxave/baba | /public_html/asset/submission_files/4a231985cefafed5c156217bb030dfc7.cpp | C++ | cpp | 1,270 | permissive | #include<bits/stdc++.h>
#define fs first
#define sc second
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define mod 1000000007
using namespace std;
/*inline void scan(int* p) {
static char c;
while ((c = getchar_unlocked()) < '0');
for (*p = c-'0'; (c = getchar_unlocked()) >= '0'; *p... |
ff7f03e21fa5133ef100cf77f5cfdf38146d22cc | 1c76cf0e490bd34b485ff2d487039424a2b68af2 | travelping/vpp | /extras/vom/vom/l2_vtr_cmds.cpp | C++ | cpp | 1,708 | permissive | /*
* Copyright (c) 2019 Cisco and/or its affiliates.
* 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 applicabl... |
bceb8179f56ccd742a7539473bbb64bc217c3551 | f8b6c1b97d849c2ad184d56701547732f78b261c | RaphaelK12/IceRay | /src/IceRay/camera/camera.cpp | C++ | cpp | 309 | permissive | #include "./_pure.cpp"
#include "./_parent.cpp"
#include "./cylinder/cylinder.cpp"
#include "./dof/cone.cpp"
#include "./dof/focus.cpp"
#include "./flat/orthogonal.cpp"
#include "./flat/perspective.cpp"
#include "./flat/super.cpp"
#include "./sphere/sphere.cpp"
#include "./transform/transform.cpp"
|
daa956a163579ff14e71e485f06fb1fc40fb161f | 86f230af54715f4bdf82fd5dd951dd4d2fa620dc | thedavidperkins/Kerfuffle | /src/Loadout.cpp | C++ | cpp | 5,180 | no_license | #include "Loadout.h"
#include "Player.h"
#include "Creature.h"
#include "Ring.h"
int Loadout::counter = 0;
Loadout::Loadout(WEAPON_TYPE wep, Player* owner, bool prof, bool shield, WEAPON_TYPE dual, bool dualProf, bool usingTwoHanded) :
m_wepType(wep),
m_dualWepType(dual),
m_atkBonus(0),
m_dualAtkBonus(0),
m_dmgB... |
349971a527fa50fa5281f7c93f209450231dd253 | fa05e4f3d7fd9bd21a21995bb48893cefe32d6e0 | jbruce2112/swift | /lib/ClangImporter/ClangImporter.cpp | C++ | cpp | 126,671 | permissive | //===--- ClangImporter.cpp - Import Clang Modules -------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
083e64e71a7c17f3425428f5c7ece5de36508860 | 6a4197121c00af5b712de66584ff8c84cc79a807 | paul1522/Adafruit_FONA_Library | /Adafruit_FONA.cpp | C++ | cpp | 28,188 | permissive | /***************************************************
This is a library for our Adafruit FONA Cellular Module
Designed specifically to work with the Adafruit FONA
----> http://www.adafruit.com/products/1946
----> http://www.adafruit.com/products/1963
These displays use TTL Serial to communicate, 2 pins are r... |
44910026c7843706d0784b08577db80de7b3590f | 3a76dc536c6bc3a917c9c109b96f8665d2b92290 | weimingtom/duibrowser | /src/EAWebkit/EAWebKitSupportPackages/coreallocatorEAWebKit/local/source/newdelete.cpp | C++ | cpp | 2,992 | no_license | /*
Copyright (C) 2009 Electronic Arts, Inc. 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 list of condition... |
f9a81751f5a1dd31ff32b9b8ce6164a08b33c52c | f468edfb43aa1210e98f324b6e2d1177bf2b0be6 | Hao-github/C-Primer-chapter-14 | /manyfmd.cpp | C++ | cpp | 598 | no_license | // manyfrnd.cpp -- undound template friend to a template class
#include <iostream>
using std::cout;
using std::endl;
template <typename T>
class ManyFriend
{
private:
T item;
public:
ManyFriend(const T& i) : item(i) {}
template <typename C, typename D> friend void show2(C&, D&);
};
template<typename C, typename D>... |
04f20625809a4ad69e18d1ef8dc55dc8b0e0ff3a | 0d54d8d41402468277536e884689e301c7b6260d | slayzz/projectBro | /src/server/RequestHandler.hxx | C++ | hxx | 324 | no_license | #ifndef WEBSOCKET_REQUESTHANDLER_HXX
#define WEBSOCKET_REQUESTHANDLER_HXX
#include <string>
#include <functional>
#include "Request.hxx"
class RequestHandler {
public:
virtual ~RequestHandler() {};
virtual void handle(Request) = 0;
virtual std::string getUrl() const = 0;
};
#endif //WEBSOCKET_REQUESTHANDLER_... |
94180cc5be3273797d9346a8677582ae4f30edf3 | 2342982943657a76488b9eef6de8b07b9211c368 | scto/external_skia | /src/gpu/ops/GrAAHairLinePathRenderer.cpp | C++ | cpp | 41,853 | permissive | /*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrAAHairLinePathRenderer.h"
#include "GrBuffer.h"
#include "GrCaps.h"
#include "GrClip.h"
#include "GrContext.h"
#include "GrDefaultGeoProcFactory.h"
#include "GrDra... |
c866f89a9b0f07192dea341a15217b0dbe3184fe | 375109a26d62d1f06a0ab46db2e7593853b3bb36 | ProframFiles/FancyDraw | /src/akjFrameBufferObject.cpp | C++ | cpp | 4,347 | permissive | #include "akjFrameBufferObject.hpp"
#include "akjOGL.hpp"
#include "akjHWGraphicsContext.hpp"
namespace akj
{
cFrameBufferObject::
cFrameBufferObject(cHWGraphicsContext* context,
const Twine& name,
ivec2 size, pix::eFormat pix_format)
: cHWGraphicsObject(context, name)
, mTexture(context, n... |
54c75b9e4f3f16875baf9fbd77410ac172887f1e | e621ecaf0af6454708b0816b90a673e9169d0e1a | angelacoelho01/FEUP-AEDA | /TPs/TP07/src/Tests/dictionary.cpp | C++ | cpp | 1,597 | no_license | #include <iostream>
#include <string>
#include <fstream>
#include <algorithm>
#include "dictionary.h"
#include "bst.h"
using namespace std;
BST<WordMeaning> Dictionary::getWords() const {
return words;
}
//TODO
bool WordMeaning::operator < (const WordMeaning &wm1) const {
return word < wm1.getWord();
}
//TO... |
486e1561e5c8103264703ac761ab5596d0d77ecf | 7b91d92121a76770d7722de46e7133f98726eb25 | Ch3y/USMC-MARPAT-WD-Loadouts | /Norwegean Taskforce/lmg.hpp | C++ | hpp | 1,583 | no_license | removeAllWeapons player;
removeAllItems player;
removeAllAssignedItems player;
removeUniform player;
removeVest player;
removeBackpack player;
removeHeadgear player;
player forceAddUniform "tacs_Uniform_Combat_LS_BS_DGP_BB";
for "_i" from 1 to 3 do {player addItemToUniform "ACE_fieldDressing";};
for "_i" fro... |
925865738cf8c309b2c4661bbe806b617341bd20 | b656d6b8559f89a17aa1077abfbc5b83bd09e37c | PravosudD/New-Kurcach | /CortexLib/AbstractHardware/Registers/STM32F303/FieldValues/syscfgcompopampfieldvalues.hpp | C++ | hpp | 142,283 | no_license | /*******************************************************************************
* Filename : syscfgcompopampfieldvalues.hpp
*
* Details : Enumerations related with SYSCFG_COMP_OPAMP peripheral. This
* header file is auto-generated for STM32F303 device.
*
*
***********************************... |
cfa1824956c9a88a6677a40ad12c09afdb12212b | b452cac0ed016d1ee409ae158a91b32d4d044d46 | maharjun/Grid2D | /Headers/GridTransform.hpp | C++ | hpp | 2,254 | no_license | #ifndef TRANSFORM_HPP
#define TRANSFORM_HPP
#include "Point.hpp"
#include "RegionExc.hpp"
#include <MexMemoryInterfacing/Headers/GenericMexIO.hpp>
#include <cmath>
#include <type_traits>
template<typename T,
typename B = typename std::enable_if<std::is_floating_point<T>::value>::type>
struct GridTransform {
... |
c0d974478b0ac6da496cbbcaf507cfe20acf93ec | 2da1da0eb65d95c68a9b665744fa290561f7fa04 | Anzsley/My_Juliet_Test_Suite_v1.3_for_C_Cpp | /C/testcases/CWE415_Double_Free/s01/CWE415_Double_Free__new_delete_array_class_53a.cpp | C++ | cpp | 2,703 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE415_Double_Free__new_delete_array_class_53a.cpp
Label Definition File: CWE415_Double_Free__new_delete_array.label.xml
Template File: sources-sinks-53a.tmpl.cpp
*/
/*
* @description
* CWE: 415 Double Free
* BadSource: Allocate data using new and Deallocae data using d... |
4e0930745d209dad4d5be58ce0ed58a2b6d08973 | 920133dad11995e26ea087bd96c2816576989dad | bigcookieliu/binapi | /src/reports.cpp | C++ | cpp | 24,032 | permissive |
// ----------------------------------------------------------------------------
// Apache License
// Version 2.0, January 2004
// http://www.apache.org/licenses/
//
// This file is part of binapi(https://github.com/niXman/binapi) project.
//
// Co... |
c817ea87af4f96a65e6ffeaf2aa2a93a38263773 | fb4c5b4b7db165d62790c58aa8caac9f0bb9a194 | puresteelzhang/chromium | /device/fido/virtual_ctap2_device.cc | C++ | cc | 96,488 | 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 "device/fido/virtual_ctap2_device.h"
#include <algorithm>
#include <array>
#include <memory>
#include <string>
#include <utility>
#include "bas... |
b03add54cc91f1167bd5761862acffc6f6f5fa9b | a89e78c3a12bf5172da6e74190896770b8aec1e9 | andy489/Object_Oriented_Programming_with_CPP | /HW.3.SE.18-19/Task1/Environment.cpp | C++ | cpp | 3,177 | no_license | #include "Environment.h"
Environment::Environment() {}
const Environment & Environment::operator=(const Environment & env)
{
return *this;
}
Environment::~Environment()
{
for (size_t i = 0; i < entities.size(); i++)
{
delete entities[i];
}
}
Environment * Environment::getInstance()
{
if (nullptr == environme... |
3a43f963d98004e93507c08cb751b3cbba002d72 | baecc8484c1a497ca3a5cf11c02f5f1e9a073b47 | zowhair/chromium | /ui/arc/notification/arc_notification_content_view.cc | C++ | cc | 24,694 | 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 "ui/arc/notification/arc_notification_content_view.h"
#include "ash/wm/window_util.h"
#include "base/auto_reset.h"
#include "base/memory/ptr_uti... |
3732750f5039d2b323ea4a95514cd35c7329af93 | ab9fb0d73f89ace6f9e679f0af0d7d0ad61ef8c5 | MinhTranCA/art | /runtime/stack.cc | C++ | cc | 37,065 | permissive | /*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
04f1fa8b8be4bfa3517b42e013243cec2a94b68f | dce6397e2ba6ddad43d53ae4ad04ea1f29748132 | infiniteoverflow/contribute_ur_code | /CPP/goingPostal.cpp | C++ | cpp | 1,344 | no_license |
#include <string>
using namespace std;
#include "h09.h"
string codeForDigit(int digit)
{
string result;
switch(digit)
{
case 1: result = ":::||";
break;
case 2: result = "::|:|";
break;
case 3: result = "::||:";
break;
... |
797e32c31a7bf7b62fc105222c85d8be8cdd5e96 | 049e456594995c0f5bd3cfbb1b82f02a111dbffc | ssentine/CPP_modules | /day_07/ex00/whatever.hpp | C++ | hpp | 349 | no_license | #ifndef WHATEVER_HPP
# define WHATEVER_HPP
#include <iostream>
template <typename T>
void swap (T & a, T & b)
{
T temp;
temp = a;
a = b;
b = temp;
}
template <typename T>
const T &min (T const & a, T const & b)
{
return (a < b ? a : b);
}
template <typename T>
const T &max (T const & a, T const & b)
{
retur... |
d6d2eec6ce9bf3e49ce94ee8d97ac44d2c6e499f | caa600a235448d9374dda00291dcda1457ff645d | SandWind/convertJsonToCsd | /converter/DictionaryHelper.cpp | C++ | cpp | 7,620 | no_license | /****************************************************************************
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
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 Sof... |
5adf41b2fb524da46207095ea634e89b570cf831 | 35ea471821c11b2eaff5a5068ccc2c9c3cd5ebe6 | Feven0/AAU-CS-PROJECT-2018-2019-car-game | /Car_Race.cpp | C++ | cpp | 6,005 | no_license | //#include<mmsystem.h>........ p.s. we will add audio file later
#include<graphics.h>
#include<stdlib.h>
#include<stdio.h>
#include<windows.h>
#include<conio.h>
using namespace std;
void makecar(int x, int y) // creating the car
{
rectangle(x+1,y,x+49,y+100);
rectangle(x+1,y+25,x+49,y+... |
8bbc2af51cfe17ebcd4e63e5853730924670bca4 | 6ae9bd2e1594a095275b27d035dac1202336bc01 | ajinkya933/onnxruntime | /onnxruntime/core/mlas/lib/platform.cpp | C++ | cpp | 8,284 | permissive | /*++
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
Module Name:
platform.cpp
Abstract:
This module implements logic to select the best configuration for the
this platform.
--*/
#include "mlasi.h"
//
// Stores the platform information.
//
MLAS_PLATFORM Ml... |
2cb72f24ce732ae95f29f7adcfa6a611b13a3d34 | e03babdaafc8d85afacfc22596ea1e2cf385c314 | ni/dldt | /inference-engine/thirdparty/mkl-dnn/src/common/binarization.cpp | C++ | cpp | 2,723 | permissive | /*******************************************************************************
* Copyright 2019 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... |
197628e05d878e520d8875ccdb5dc873e23e56f0 | 4c12c99e9caea528aed460273abdee041de069f8 | YinXinLION/Cpp | /practice/1.cpp | C++ | cpp | 1,960 | no_license | /*************************************************************************
> File Name: 1.cpp
> Author:YinXin
> Mail:yinxin19950816@gmail.com
> Created Time: 2015年12月15日 星期二 17时02分59秒
************************************************************************/
#include<iostream>
#include<cstring>
#include<vector>
... |
71683bd8709b18dc41d1c0c33541efe2e5a09764 | 11cceba49841b7f7dede2ee964d800020fa8b95e | pt2pham/cs488 | /A4/A4.cpp | C++ | cpp | 4,439 | no_license | // Fall 2019
#include <glm/ext.hpp>
#include "A4.hpp"
#include "GeometryNode.hpp"
#include "Debug.hpp"
using namespace glm;
using namespace std;
void A4_Render(
// What to render
SceneNode * root,
// Image to write to, set to a given width and height
Image & image,
// Viewing parameters
const gl... |
ba34b1e9046b260589cf1b14278cf95c171499d8 | 0b9322e249fb9e518215913a068ca3ac955cf11d | ritesh96310/dexandroid | /frameworks/base/libs/surfaceflinger/tests/overlays/overlays.cpp | C++ | cpp | 1,478 | permissive | #include <binder/IPCThreadState.h>
#include <binder/ProcessState.h>
#include <binder/IServiceManager.h>
#include <utils/Log.h>
#include <ui/Surface.h>
#include <ui/ISurface.h>
#include <ui/Overlay.h>
#include <ui/SurfaceComposerClient.h>
using namespace android;
namespace android {
class Test {
public:
static co... |
7c7cc33ec8cbeb8df6b88677659c421499009394 | 8b59c7769d971d6fdde8c9e344ca666301cb25ab | antttty/leetcode | /925.cpp | C++ | cpp | 490 | no_license | #include <string>
using namespace std;
bool isLongPressedName(string name, string typed) {
int index1 = 0, index2 = 0;
while(index1 < name.length() || index2 < typed.length()){
if (name[index1] == typed[index2]){
index1++;
index2++;
}else if(index... |
3aa611814d26b5b9a8f7ef83bb910c13c30547bf | 3f97c80a52fda8e0fbf96aa17c735e1d68653de9 | m-iDev-0792/HJGraphics | /src/IBLManager.cpp | C++ | cpp | 8,308 | permissive | //
// Created by 何振邦 on 2022/1/25.
//
#include "IBLManager.h"
#include "OpenGLCache.h"
#include "Log.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <utility>
static glm::mat4 captureProjection = glm::perspective(glm::radians(90.0f), 1.0f, 0.1f, 10.0f);
static ... |
d4c2351a4232783d26b3d39c4d263e5f5c3d7b1f | 89b573801bb4d0cb692001bdb328ed4e0df44f21 | kasa2001/gre-protocol | /src/cpp/package/PackageFactory.cpp | C++ | cpp | 3,968 | no_license | #include "../../hpp/package/PackageFactory.h"
#include "../../hpp/package/EchoReply.h"
#include "../../hpp/exception/CannotCreatePackage.h"
#include "../../hpp/package/EchoRequest.h"
#include "../../hpp/package/IncomingCallConnected.h"
#include "../../hpp/package/IncomingCallRequest.h"
#include "../../hpp/package/Incom... |
a6ac552a6f61f53a9149a3ddda0b0ce4c07ebc62 | c61fd7f2aa153f3d148cd22f4146e5991c334713 | BCLab-UNM/MPFA-MeshNet | /old_mpfa/Static_MPFA/source/CPFA/CPFA_controller.cpp | C++ | cpp | 35,651 | no_license | #include "CPFA_controller.h"
#include <unistd.h>
CPFA_controller::CPFA_controller() :
RNG(argos::CRandom::CreateRNG("argos")),
isInformed(false),
isHoldingFood(false),
isUsingSiteFidelity(false),
isGivingUpSearch(false),
ResourceDensity(0),
MaxTrailSize(50),
SearchTime(0),
MPFA_state(DEPARTING),
LoopFunction... |
5e8306a5a08a6c6b66ede122fb80aa3fba96e1aa | 06c948f0fcd8f6aa1d9601002d37adbaba406a5f | Valhally/uwp-cpp-examples | /MRCentennial/ScreenCapture/ScreenCapture.cpp | C++ | cpp | 2,682 | no_license | // ScreenCapture.cpp : Defines the exported functions for the DLL application.
//
// Source code derived from https://msdn.microsoft.com/en-us/library/windows/desktop/dd183402(v=vs.85).aspx
#include "stdafx.h"
#include "ScreenCapture.h"
DllExport void ScreenCapture_GetScreenSize(int& width, int& height)
{
width =... |
71e19a885c2e2a18f2b50a3cb362ee5c38c6f5fb | 5dc0f30f2a39cfcfc533bdbe1caae56e4d6d9989 | genkinanodesu/competitive | /AtCoder/ABC/abc113/abc113a.cpp | C++ | cpp | 1,300 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const double EPS = (1e-7);
const ll INF =(1e13);
const double PI = (acos(-1));
const ll MOD = ll(1e9) + 7;
#define REP(i, n) for(ll i = 0; i < (ll)(n); i++)
#define REPR(i, n) for(ll i = n;... |
2c81db39cdb488ebb5002b14114709b75168fc64 | d3f72425455c9fc5b7a4de988788ef3d7a0ecda5 | 2bite/ARK-SDK | /SDK/ARKSurvivalEvolved_Buff_BiglyPostProccess_structs.hpp | C++ | hpp | 411 | permissive | #pragma once
// ARKSurvivalEvolved (332.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_Basic.hpp"
#include "ARKSurvivalEvolved_ShooterGame_classes.hpp"
#include "ARKSurvivalEvolved_CoreUObject_classes.hpp"
#include "ARKSurvivalEvolved_UMG_classes.hpp"
#include "ARKSurvivalEvolved... |
fe657519ba50841f485f7f55bd36d42006441e50 | d3430d724651d7f3d08dc99e323ea8f65c106763 | lioujheyu/llvm-project | /flang/lib/Semantics/check-omp-structure.cpp | C++ | cpp | 25,967 | permissive | //===-- lib/Semantics/check-omp-structure.cpp -----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
bea3b53d146cc6d9fd5199aea457cc63c481fbf7 | c50427e5b2988a5b92246f8ee3b364739dbf6bef | iam1mPerec/BusinessAssistant | /ViewEvent.cpp | C++ | cpp | 1,004 | no_license | #include <QMessageBox>
#include "ViewEvent.h"
#include "ui_ViewEvent.h"
#include "event.h"
#include "statics.h"
ViewEvent::ViewEvent(Event *Event, QWidget *parent) :
QDialog(parent),
event(Event),
ui(new Ui::ViewEvent)
{
ui->setupUi(this);
setFocusPolicy(Qt::FocusPolicy::ClickFocus);
ui->Name-... |
65d868835e33afd49da256a7abe2bf06d4b0c0aa | 3bd6cfc142917f87d34c37649367fa2bfaa8a26d | vcflib/vcflib | /src/vcfgenosamplenames.cpp | C++ | cpp | 1,408 | permissive | /*
vcflib C++ library for parsing and manipulating VCF files
Copyright © 2010-2020 Erik Garrison
Copyright © 2020 Pjotr Prins
This software is published under the MIT License. See the LICENSE file.
*/
#include "Variant.h"
using namespace std;
using namespace vcflib;
int main(int argc, char** a... |
a348d67d26f01d2bd29e161555752d58461600e5 | 7eebe47188ee6c454117b402fca3e9bd6d1fef8b | orxshi/common | /src/sp_cellmover.cpp | C++ | cpp | 41,830 | no_license | #include "sp_cell_mover.h"
namespace Common
{
void SpCellMover::add_arrival_info(size_t size, int disp_begin, int disp_end)
{
arrival_info_.add_size(size);
arrival_info_.add_disp(disp_begin, disp_end);
}
const Tag& SpCellMover::tag() const
{
return tag_;
}
void SpC... |
5cbdaa1d21909934c48853c1c4ed28c85f613935 | b0d9bbe95f5d98db08d9d1464944892d80d6d7e8 | prince-chrismc/Simple-Socket | /src/ActiveSocket.cpp | C++ | cpp | 7,340 | permissive | /*---------------------------------------------------------------------------*/
/* */
/* CActiveSocket.cpp - Active Socket Implementation */
/* ... |
4804e6bac95e47dbd0eebb7c8b8273588c296a1b | 06f82c6f9288b015d4e6d7c4502a0913991c603d | RichChanCN/DNAAlgorithm | /DNAAlgorithm/main.cpp | C++ | cpp | 4,553 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include "Ops.h"
using namespace std;
void randomArray(int a[], int n) //洗牌算法
{
int index, tmp, i;
for (i = 0; i<n; i++)
{
index = rand() % (n - i) + i;
if (index != i)
{
tmp = a[i];
a[i] = a[index];
a[index] = tmp;
}
}
}
void run(){
system(... |
18a3b70c29ecedf9f9a3e389ea5153a561399803 | 2e3fe1962e77e605c67f8c54290e1500de8b9f0b | Ludaxord/ConceptEngine | /ConceptEngine/ConceptEngine/ConceptEngineRenderer/Boot/CEDebugRuntime.cpp | C++ | cpp | 1,601 | permissive | #include "CEDebugRuntime.h"
#include "Debug/CEProfiler.h"
#include "Graphics/CEGraphics.h"
#include "Platform/CEPlatform.h"
#include "Platform/Generic/Console/CETypedConsole.h"
#include "Project/CEProject.h"
#include "Project/CEProjectSerializer.h"
#define TEST_RUNTIME 1
CEDebugRuntime::CEDebugRuntime(CEEngineConfig... |
233697123b944366312f158e82aaa85848f478a1 | adfdaa4bfbd2aa10ab8fdfe0f5c5f8c18ce5d636 | dtbinh/AOJ | /Volume_05/0513_Shuffle_The_Cards.cpp | C++ | cpp | 1,261 | permissive |
#define _USE_MATH_DEFINES
#define INF 100000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
usin... |
b669e10f4a7e2dc543e8f52dbddae7d3a883c012 | 22083514ccd3dc1ddaac035727dbaad9c8006d3e | kavilan-nair/Cosmic-Journey | /test-source-code/testEnemy.cpp | C++ | cpp | 2,425 | no_license | #include "Enemy.h"
#include "Grid.h"
#include "EntityType.h"
#include <memory>
#include "vector"
using std::shared_ptr;
using std::make_shared;
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest/doctest.h>
TEST_CASE("Enemy is initialized with correct attributes")
{
Grid grid{800, 600};
shared_ptr<I... |
ae1c717e88f206d867aabe7e30ea67e9fcf079b3 | d2d55d8422ab486e7dbecbd4f05d583fbf81c1af | DoomHammer/ohNetGenerated | /OpenHome/Net/Bindings/C/ControlPoint/Proxies/CpAvOpenhomeOrgPlaylist1C.cpp | C++ | cpp | 92,441 | permissive | #include "CpAvOpenhomeOrgPlaylist1.h"
#include <OpenHome/Net/Core/CpDevice.h>
#include <OpenHome/Net/C/CpProxyCPrivate.h>
#include <OpenHome/Net/Core/FunctorAsync.h>
#include <OpenHome/Types.h>
#include <OpenHome/Buffer.h>
#include <OpenHome/Exception.h>
#include <OpenHome/Functor.h>
#include <OpenHome/Net/Core/CpProxy... |
fad14228850408678551db560b7a20177f38b351 | 16d7ee72af7e62617035c15b82fe00791ecae3d2 | erickzhao/neutralinojs | /core-macos/src/main.cpp | C++ | cpp | 3,674 | permissive | // MIT License
// Copyright (c) 2018 Neutralinojs
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, me... |
ae67873963f0109eee7f5b699e0c8d3c07f82dd3 | 21f30b46002fe2f7186109914d4d2782f5c08231 | Bartleby2718/UVa-OJ-Solutions-in-CPP | /441/main.cpp | C++ | cpp | 1,432 | permissive | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
void print6(const vector<int> &values)
{
int numValues = values.size();
// generating combinations: https://stackoverflow.com/a/9430993/4370146
vector<bool> booleans(numValues);
fill(booleans.begin(), booleans.begin() + 6,... |
e240ef0b78068ec3ac4d091c7ab9ee5163b56742 | 55ae40ef9a4d4bdd7def6dfcc041c245b32543a9 | rohan-more/Portfolio | /CaptureTheFlag/Code/Game/MyGame/EntryPoint.cpp | C++ | cpp | 665 | no_license | /*
WinMain() is the entry point of a Windows program
(instead of the familiar main() in a console program)
*/
// Header Files
//=============
#include "cMyGame.h"
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#endif // _DEBUG
#include <crtdbg.h>
// Entry Point
//============
int WINAPI WinMain( HINS... |
d8edf017dee03046304f94f0bd33599c31dec35c | c8c40fde3f98aead537c6c9936e0f7a4fafa89aa | tpfcoins/tpfholdings-src-2.0 | /src/test/getarg_tests.cpp | C++ | cpp | 4,569 | permissive | // Copyright (c) 2012-2013 The Bitcoin Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "util.h"
#include <string>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp... |
74f1a13629e1898f03b958c5068e8986cd731827 | c2b95d97083f39b9a882b008f06383d295aa3303 | aaaaaaag/bmstu_AA | /lab_01_qt/main.cpp | C++ | cpp | 2,979 | no_license | #include <QApplication>
#include <QPushButton>
#include "inc/TimeTablePrinter.h"
#include "QtGraphic.h"
void printMenu()
{
std::cout << "Actions" << std::endl;
std::cout << "1) Release mode" << std::endl;
std::cout << "2) Debug mode" << std::endl;
std::cout << "3) Get graphic" << std::endl;
std::c... |
ca5409f6856a1e04a1ce678201d927503ae3537f | d2935de3ce1db7d5638af1b5199737c1a63ec5ae | naveenmahadevuni/incubator-trafodion | /core/sql/comexe/ComTdbTimeout.cpp | C++ | cpp | 2,330 | permissive | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// (C) Copyright 1999-2014 Hewlett-Packard Development Company, L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You m... |
36ca6211acd3b530007e2a2805c5b59057e61071 | ae97b096065704884656a44b51033ab3e861b354 | EugenyN/TanksKombat | /proj.win32/main.cpp | C++ | cpp | 1,905 | permissive | /****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... |
fb9af6654b82fb5fa43a1f35358398ecdc16493b | a18261bdf8f9f2777cd313d3d180edf96443570a | neariot/Object_Tracking | /multipleObjectTracking.cpp | C++ | cpp | 12,029 | no_license | //Written by Kyle Hounslow 2013
// modified by: Ahmad Kaifi, Hassan Althobaiti
//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 rig... |
bee2c0d47b26381ed622663535315e08399d28cf | e37cbc95ae9029779735274426061995bbe1fd92 | DDUC-CS-Sanjeet/generate-permutations-WazidKhan-2001 | /perm.cpp | C++ | cpp | 620 | no_license | #include <bits/stdc++.h>
using namespace std;
void swap( char *char_1, char *char_2);
void permutation(char* array, int lower, int size)
{
if(lower==size)
{
cout << array << "\n";
}
else
{
for(int count=lower;count<=size;count++)
{
swap((array+lower),(array+count));
permutation(array,... |
f271a407953da52d0d171a2bec17b940d5fddaeb | ce28107284ed0fc1ea68bc56dbe843dd0661b596 | frankbozar/Competitive-Programming | /Barcelona Bootcamp/Day8/C.cpp | C++ | cpp | 312 | no_license | #include<cstdio>
int solve(int k, int a, int b)
{
int p=a/k;
int q=b/k;
if( p==0 && b%k!=0 )
return -1;
else if( q==0 && a%k!=0 )
return -1;
else
return p+q;
}
int main()
{
int k, a, b;
scanf("%d%d%d", &k, &a, &b);
printf("%d\n", solve(k, a, b));
}
|
0d0c5dc6e0a8e68cc3cffee169ebb91b4f713a7c | b0cc994ce86a7e3e5168c6f0df1c2d043ab7e448 | dellaquilamaster/OSCARUNPACKER | /OscarAnalysisVector.cc | C++ | cc | 2,743 | permissive | #include <stdio.h>
#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <Rtypes.h>
#include <TTree.h>
#include "OscarAnalysisVector.h"
#include "FAIRTree.h"
#include "EventoBruto.h"
#include <stdio.h>
OscarAnalysisVector::OscarAnalysisVector() :
PedSuppression(0),
InputData(0)
{}
OscarAnalysisVector:... |
b1b2b8d1f17036a0f4dd9c16f423c373d407dfa4 | bd65af62ee5026c03aedab03826a4f2be811b6d4 | yuaom/PUBG-SDK-3.7.19.10- | /SDK/PUBG_LobbyHUD_Default_classes.hpp | C++ | hpp | 697 | no_license | #pragma once
// PLAYERUNKNOWN BATTLEGROUND'S ( EDITED BY PHYSXCORE, THANKS TO KN4CKER ) (3.7.19.10) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "PUBG_LobbyHUD_Default_structs.hpp"
namespace Classes
{
//---------------------------------------------------------------------------
//Classes
//---------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.