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 |
|---|---|---|---|---|---|---|---|---|
b3250535d5c5644c8835c43e79f024cdf639bb31 | 141eb82a186fe664e0d026f98dd451f983bf7cdc | c3d/gmmlib | /Source/GmmLib/Utility/GmmUtility.cpp | C++ | cpp | 18,312 | permissive | /*==============================================================================
Copyright(c) 2017 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files(the "Software"),
to deal in the Software without restriction, including w... |
ccda894099084b04ffeca58e08f34334f8251f14 | 707099438356a75748a0a86f030be68e5ceb5a05 | bhupkas/Spoj | /spoj/WEBISL.cpp | C++ | cpp | 1,552 | no_license | /* bhupkas */
using namespace std;
#include "bits/stdc++.h"
#define SIZE 100005
vector < int > adj[SIZE],rev[SIZE];
int n,m;
vector < int > v;
bool B[SIZE];
int cnt;
vector < int > SCC[SIZE];
int FINAL[SIZE];
void dfs(int x)
{
B[x] = true;
for(int i = 0 ; i < adj[x].size() ; ++i)
... |
f845f9fef5177dc0d0f2cf47b753488ce0d592a2 | 846752d2cc98e72c9f06f028934547035ad45f14 | boostorg/hana | /include/boost/hana/fwd/basic_tuple.hpp | C++ | hpp | 2,333 | permissive | /*!
@file
Forward declares `boost::hana::basic_tuple`.
Copyright Louis Dionne 2013-2022
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_FWD_BASIC_TUPLE_HPP
#define BOOST_HANA_FWD_BASIC_TUPLE_HPP
#include ... |
e3f3e61be0f8a92a7eef023b3e80b097466ac510 | f2073dde935a173b2c62e4a698375d1a46a09e5c | hirokuni/mozc | /src/base/win_util.cc | C++ | cc | 17,230 | permissive | // Copyright 2010-2018, Google 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:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of condit... |
2cbf8d81f32764b55087d18e1252304a2293234b | 4b3120434914d21302bee292579a7f9659bc7369 | MammothCoin/MammothCoin | /src/wallet.cpp | C++ | cpp | 83,814 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txdb.h"
#include "wallet.h"
#include "walletdb.h"
#include "crypter.h"
#... |
074c819a60244b2ab6ccf4915511979f2575c62a | 3498283c3e28e177c2b5daf2e9836b277f0febca | voronindim/OOD | /lab_3/task_1/TestCondimects.cpp | C++ | cpp | 1,593 | no_license | //
// Created by Dmitrii Voronin on 19.09.2020.
//
#include "catch.hpp"
#include "CCoffee.h"
#include "CChocolate.h"
#include "Cream.h"
#include "CLiquor.h"
TEST_CASE("Test cream")
{
auto latte = std::make_unique<CLatte>(CoffeePortionType::Double);
auto latteWithCream = std::make_unique<CCream>(std::move(latt... |
b768bf47bd850e46f873bde339964bb8e5b01d0d | 2d0e662f6a6d7ba159e6437c3d2b581394c78268 | xeonye/QPainter | /FourthOne/dpjPart/vector-editor/src/veselectionrect.cpp | C++ | cpp | 329 | no_license | #include "veselectionrect.h"
#include <QPen>
#include <QBrush>
VESelectionRect::VESelectionRect(QObject *parent) :
QObject(parent)
{
setBrush(QBrush(QColor(158,182,255,96)));
setPen(QPen(QColor(158,182,255,200),1));
}
VESelectionRect::~VESelectionRect()
{
}
int VESelectionRect::type() const
{
return... |
c4b71fd9fab840f84155d74bd1acdb81cada332b | 456d28eb48f8d68b47ffa5b311ae481a22a731f8 | Chase07/Cpp-Primer-Exercise | /Chapter3/3-14-15.cpp | C++ | cpp | 310 | no_license | #include<iostream>
#include<string>
#include<vector>
using std::cin;
using std::cout;
using std::string;
using std::vector;
int main()
{
vector<string> v;
for ( string str ; cin >> str ; )
{
v.push_back( str );
}
/*vector<int> v;
for ( int t ; cin >> t ; )
{
v.push_back( t );
}*/
return 0;
} |
b465863b955f9e9d5bf47f425f4572f68ab0cb01 | a41aa7f114b6f0b34352ff929a4b31c793a708bd | jchen-96/book2 | /chapter3/selectSort.cpp | C++ | cpp | 704 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
//打印出排序后的数组和交换的次数
using namespace std;
int main() {
int n;
vector<int> arr;
cin>>n;
for(int i=0,t=0;i<n;i++){
cin>>t;
arr.push_back(t);
}
int times=0;
for(int i=0;i<n;i++){
int minIndex=i;
for(int j=... |
1580768a5ab80534e1469e90e122dc0901c3ff00 | e119699c1bb546203c11cf2c3aaf3b109e662f91 | webosce/chromium53 | /src/chrome/installer/setup/app_launcher_installer.cc | C++ | cc | 5,189 | 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.
#if defined(GOOGLE_CHROME_BUILD)
#include "chrome/installer/setup/app_launcher_installer.h"
#include "base/strings/string16.h"
#include "base/version.h"... |
1ee195e8e158d5439d1cb26fa6493d5b0294022d | 59b881f4c4a11465b443727196fe62f257e01bdb | kungfu-monkey/Supernova | /Supernova/projects/devices/audioamp/device_audio_amp_STA335.cpp | C++ | cpp | 10,301 | no_license | //<MStar Software>
//******************************************************************************
// MStar Software
// Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
// All software, firmware and related documentation herein ("MStar Software") are
// intellectual property of MStar Semiconduc... |
b4a891ea723778fc121f130c92bf780e72524101 | fd5a02528e7202f4f32699bbd37136b17bda5f71 | eugeneoca/chatnetwork | /main.cpp | C++ | cpp | 4,447 | no_license | // Libraries
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <unistd.h>
using namespace std;
// Method Initialization
int welcome_screen();
string getIPAddress();
string getSubnet();
int settings();
// Global Variables
string client_ip;
string client_subnet;
int port = 2000;
st... |
93074c2fdd775b73d0cbc67ef9baaf3048286cb4 | fb71a0010a7be271d2a1333b37c7c0451b54881f | dark-glich/C-Practice | /Advanced/Memory.cpp | C++ | cpp | 596 | no_license | #include <iostream>
int main(){
// Heap Allocation : This memory is allocated during the execution of instructions written by programmers.
// new Operator : new operator is used to allocate memory dynamically for any data-type.
double *value = NULL;
value = new double; // allocating memory for a doub... |
579980b5b356a3d26bf0c95c5b13689f75891119 | 102b1e65b43ef290c7252d9d1250e8852ae19fb4 | akshaymarch7/chromium | /chrome/browser/ui/views/hats/hats_web_dialog.cc | C++ | cc | 10,142 | 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/hats/hats_web_dialog.h"
#include <algorithm>
#include "base/bind.h"
#include "base/strings/string_util.h"
#include "ch... |
402f1b694ca0153bf8ebeb5f0c0d77fba1c58034 | 37b15049475f6f924a9279457551f6aa5087394c | tehKaiN/node3d | /shared/Common/src/ThreadBase.cpp | C++ | cpp | 3,180 | no_license | // 线程基类
// 仙剑修,2001.11.15
#include "ThreadBase.h"
//*********************************************************
//default constructor for class CThread
//*********************************************************
CThreadBase::CThreadBase()
{
m_hThread = NULL;
m_hCloseThreadEvent = NULL;
}
//*************... |
04d06896811461d9646fd1103194c1c23d799718 | 6ad5756db10176bc337ad4851eb093e00f54df9f | SREERAGI18/chromium | /net/nqe/socket_watcher.cc | C++ | cc | 4,637 | 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 "net/nqe/socket_watcher.h"
#include "base/bind.h"
#include "base/location.h"
#include "base/task/single_thread_task_runner.h"
#include "base/tim... |
22a04e4a77a340353acb6bd06f9ea7caac9784f6 | ed3417937c0f848e17286a57aa8f2a000104ded2 | shauryashekhar/CodingPractice | /Leetcode/repeatedNTimes.cpp | C++ | cpp | 417 | no_license | class Solution {
public:
int repeatedNTimes(vector<int>& A) {
int size = A.size();
int limit = size/2;
map<int, int> m;
for(int x : A) {
if(m.count(x)) {
m[x] = m[x] + 1;
if(m[x] == limit) {
return x;
}
... |
ee219d8f94f64db9358af26fb434b2a7f95b6e94 | f2f452dae733014dd9427e91e4a40794ce23d307 | VictorDebray/Spider | /Spider/Common/Print.cpp | C++ | cpp | 1,405 | no_license | #include <iostream>
#include "AData.hpp"
#include "Header.hpp"
#include "LogInput.hpp"
#include "Command.hpp"
#include "LogMouse.hpp"
void spider::Header::print()
{
std::cout << "[HEADER]" << " Magic number: " << magicNumber_ << "\n"
<< "Packet size: " << dataSize_ << " of type: " << type_ << "\n"
... |
c94a19be05322cc1127329f439d672ed1afb7305 | 275f2ad8e07f187e7c32fd674fa976c6a0f91c47 | lcskrishna/pytorch | /torch/csrc/jit/frontend/error_report.cpp | C++ | cpp | 3,051 | permissive | #include <torch/csrc/jit/frontend/error_report.h>
#include <c10/util/Logging.h>
#include <c10/util/Optional.h>
#include <torch/csrc/jit/frontend/tree.h>
#include <torch/csrc/utils/cpp_stacktraces.h>
#include <torch/csrc/utils/memory.h>
namespace torch::jit {
// Avoid storing objects with destructor in thread_local f... |
e24f51843e77a8a0b8289b3babdd663e87cbb24b | fb310fbcbb5f7eba518e1eb4114dc9d7e90a489c | alexkish/NaI | /3inch_noDent/include/NaIHit.hh | C++ | hh | 2,487 | no_license | #ifndef __NaIHit_H__
#define __NaIHit_H__
#include <G4VHit.hh>
#include <G4THitsCollection.hh>
#include <G4Allocator.hh>
#include <G4ThreeVector.hh>
class NaIHit: public G4VHit
{
public:
NaIHit();
~NaIHit();
NaIHit(const NaIHit &);
const NaIHit & operator=(const NaIHit &);
G4int operator==(const NaIHit &) const;... |
6d37597e12eaa718f095e5b01c6cefc73999c6af | 8e4199b1d78ba5109325dd0ac7bde46b2bbfc688 | alexandraback/datacollection | /solutions_1480487_1/C++/xiaodao/A.cpp | C++ | cpp | 17,921 | no_license | /** ` Micro Mezzo Macro Flation -- Overheated Economy ., **/
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#incl... |
854a07f7b31682a312228d0103b3ca15a3164888 | d0b60d9667690cd11de11a483b79f9d26d324644 | ngzHappy/QtQmlBook | /sstd_library/runtime/sstd_private_runtime_cast_gcc.cpp | C++ | cpp | 1,004 | no_license | #if !defined(_MSC_VER)
#include <typeindex>
#include <typeinfo>
/*
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/dyncast.cc
*/
#include <cxxabi.h>
namespace sstd {
extern void * private_runtime_dynamic_cast(
void * argInput/*dynamic_cast<void *>*/,
const std::type_... |
a743970341cc6c496c5ec0ce1c59b57b2d06553d | a4516f54ec065917672e70b2313a2f54cf5aa132 | chromium/chromium | /ash/display/null_mouse_warp_controller.cc | C++ | cc | 382 | permissive | // Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/display/null_mouse_warp_controller.h"
namespace ash {
bool NullMouseWarpController::WarpMouseCursor(ui::MouseEvent* event) {
return false;
}
void NullMouseWa... |
084c92c7c00d755021141d576abf868f38c1b53b | 947a29a630e4d271ff1355ac9b0aa2d7d8e5dddc | aliyun/aliyun-openapi-cpp-sdk | /drds/src/model/RemoveDrdsInstanceResult.cc | C++ | cc | 1,394 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud 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... |
9823ff9431fd877e176357f85ae6714a217ae074 | ede2f5863c120eb9a07909ee9e9020d86adcad25 | zhp006/Review-Schedule | /review.cpp | C++ | cpp | 10,417 | no_license | #include<iostream>
#include<string>
#include<vector>
#include<fstream>
#include<windows.h>
using namespace std;
/*
* This function print out the welcome message to the screen
*/
void Welcome(){
cout << " __ __ ______ __ ______ ______ __ __ ______ " << e... |
688ba9ff7786b2d18af88cf7712677bb4a7c0b7f | 3d514c8b8836cdf728b9fc11c341e3467bccc7a2 | tcztl/chromium | /net/dns/dns_transaction_unittest.cc | C++ | cc | 168,838 | permissive | // Copyright (c) 2012 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 "net/dns/dns_transaction.h"
#include <stdint.h>
#include <limits>
#include <memory>
#include <utility>
#include <vector>
#include "base/ba... |
4c4cabb59493dba52ca1298c8ed0945712c5de8b | 555eb842b59ee05a8db50bbd1568cad22e9ca5bf | anton-potapov/openvino | /inference-engine/src/vpu/graph_transformer/src/middleend/passes/propagate_dynamism_to_outputs.cpp | C++ | cpp | 2,801 | permissive | // Copyright (C) 2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "vpu/middleend/pass_manager.hpp"
#include <set>
#include <memory>
namespace vpu {
namespace {
class PassImpl final : public Pass {
public:
explicit PassImpl(StageBuilder::Ptr stageBuilder) : _stageBuilder(std::move(stage... |
659f8d93165501ae9cc64c0ac1fd94cc4865a798 | 559519e72b8bf5714756bd91ad6e2b688179826f | avtomaton/blast-ncbi | /c++/src/objtools/format/dbsource_item.cpp | C++ | cpp | 24,783 | no_license | /* $Id: dbsource_item.cpp 399305 2013-05-13 19:13:43Z grichenk $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Wor... |
e472cc9f6ce3a6eca7da9c5badb33fd73d0f4724 | 7fd05ee495c1db05ea83c1c405188cd5b6fa662f | jjzhang166/WinNT5_src_20201004 | /NT/inetcore/mshtml/src/core/cdutil/taskman.cxx | C++ | cxx | 16,626 | no_license | //+---------------------------------------------------------------------------
//
// Microsoft Forms
// Copyright (C) Microsoft Corporation, 1994-1995
//
// File: taskman.cxx
//
// Contents: Lightweight task manager
//
//----------------------------------------------------------------------------
... |
23d65bb78eab7f53aee0212fdd18eff1acec05ac | ba5af9f8dd9dda0779554dd158a46f3e69cd7896 | naman949/HTML-to-LaTeX-Conveter | /latextreetostring.cpp | C++ | cpp | 8,638 | no_license | #include<iostream>
#include<string>
#include<vector>
#include<stack>
#include "ast.h"
#include "latextreetostring.h"
using namespace std;
string newLatexCode;
bool noLine;
void writeLine(vector<astNode*> list)
{
vector<astNode*>::iterator it;
for(it = list.begin(); it != list.end(); it++)
{
if((*it)->nodeType ==... |
5f028249901adf34a70d3023cd904c55e30b8bf7 | 9a414850937c43dbaedb57ba3c382ed07a2a9e8f | evvaletov/snakegame | /src/snake.cpp | C++ | cpp | 2,167 | no_license | #include "snake.h"
#include <cmath>
#include <iostream>
void Snake::Update(std::promise<bool> &&prms) {
SDL_Point prev_cell{
static_cast<int>(head_x),
static_cast<int>(
head_y)}; // We first capture the head's cell before updating.
UpdateHead();
SDL_Point curren... |
6122426dc0860ddd0aacfb91b78f540b61455e68 | 8f30968de92d8271401e48e207a960c7219337bf | henne90gen/graphics_playground | /src/core/Main.cpp | C++ | cpp | 6,371 | no_license | #include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <thread>
#if OpenMP_ENABLED
#include <omp.h>
#endif
#if EMSCRIPTEN
#include <emscripten.h>
#include <emscripten/html5.h>
#endif
#include "Scene.h"
#include "util/ImGuiUtils.h"
#include "util/InputData.h"
#include "util/OpenGLUtils.h"
#ifde... |
3fe5ff979aeed5dacb72d8efc2be7a8dee7b4f2b | 3273c66155330a8f99e1875919b8e6cc988ad346 | jkrempus/llvm | /lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | C++ | cpp | 116,527 | permissive | //===- InstCombineAndOrXor.cpp --------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
76cce09cfb62e93c23cfa52a38cbe6b921966062 | 3ebe13d6154f094ad5bb769a7e92ed0e6f7b1a48 | CMS-TMTT/cmssw | /DataFormats/CaloRecHit/test/testCaloCluster.cppunit.cc | C++ | cc | 2,006 | permissive | /* Unit test for CaloCluster
Stefano Argiro', Dec 2010
*/
#include <cppunit/extensions/HelperMacros.h>
#include "DataFormats/CaloRecHit/interface/CaloCluster.h"
#include "DataFormats/Math/interface/Point3D.h"
#include "DataFormats/CaloRecHit/interface/CaloID.h"
#include "DataFormats/DetId/interface/DetId.h"
cla... |
ea969bc594060bdafc9cd8e2bcaf3d95d59d3785 | ae04c155d1a63e822e1e9b76f235d1ec8c992f0a | gaopj/leetcode | /leetcode101_150/102_Binary Tree Level Order Traversal/源.cpp | C++ | cpp | 1,241 | no_license | #include<vector>
#include<stdio.h>
#include<queue>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
vector<vector<int>> res;
vector<int> res0;
queue<TreeNode*> q;
queue<int> l... |
f59d7c984feac137c78795988eaad094602ff26f | dce57262058e6f7f8f6be191c0de85b55102cfb4 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_10/Z6.5+dmb.sy+dmb.ld+dmb.ld.c.cbmc_out.cpp | C++ | cpp | 42,759 | no_license | // Global variabls:
// 0:vars:3
// 3:atom_2_X2_0:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
#define ADDRSIZE 4
#define LOCALADDRSIZE 3
#define NTHREAD 4
#define NCONTEXT 10
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
... |
db7d332c3be8b3f9730c06b533ff14f9375ef896 | dc0cbde59437ffb237b098b793f4d893519b263b | thebeet/online_judge_solution | /poj.org/2155/2491166_PE.cc | C++ | cc | 2,106 | no_license | #include <stdio.h>
#include <iostream>
using namespace std;
#define SIZE 1010
class t_TreeList
{
public:
t_TreeList(const int n)
{
memset(data, 0, sizeof(int) * n);
size = n - 1;
}
virtual ~t_TreeList()
{
}
void add(int k, int newdata)
{
while (k <= size)
{
data[k] += newdata;
k += lowbit(k);... |
686fa4513a395ffbca3dfa8340ec5928e7d511bc | afab2103e24cdd02d040402d7011279d615deb20 | AztecProtocol/barretenberg | /cpp/src/msgpack-c/test/msgpack_vref.cpp | C++ | cpp | 6,500 | permissive | #include "msgpack.hpp"
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <deque>
#include <set>
#include <list>
#include <limits>
#define BOOST_TEST_MODULE MSGPACK
#include <boost/test/unit_test.hpp>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
using namespace std;
#define GEN_TEST_VR... |
f89a9a3f35432d418a50494e18a3d2826e3c7ccb | 7ecac8fbe16d52d373f4204acadac76a5f47a135 | Bojanovski/Interactive-Graphics-Course-University-Project | /Engine/Geometry/InstancedModel.cpp | C++ | cpp | 1,347 | no_license | #include <Engine/Geometry/InstancedModel.h>
using namespace glm;
using namespace std;
namespace engine
{
void InstancedModel::LoadToGPU()
{
Model::LoadToGPU();
glGenBuffers(1, &transforms_VBO);
glBindBuffer(GL_ARRAY_BUFFER, transforms_VBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(... |
b306a07652d09e1357fe3102890378cda08748c2 | e98d4525ec07067e2f539c85cf3a8bbb02eb6951 | GISU2KM/LEAF | /src/leaf/wrapper/java/lang/String.cxx | C++ | cxx | 3,911 | permissive | /*************** <auto-copyright.rb BEGIN do not edit this line> **************
*
* Copyright 2012-2013 by Ames Laboratory
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License version 2.1 as published by the Free Software Foundat... |
bb2ed0d6eafbdee08145cf697b9a973f4e15e9a4 | cef7232c5a94a084a8a2a3396e5749529f629b8d | eryeden/GLFW_tmp | /World2/main.cpp | C++ | cpp | 4,442 | permissive | #include <iostream>
#include <vector>
#include <map>
#include <string>
// Include GLEW
#ifdef __APPLE__ //For OSX
#define _CRT_SECURE_NO_WARNINGS
#define GL_GLEXT_PROTOTYPES
#include <gl/glew.h>
#endif
// Include GLFW
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtx/transform.hpp>
//Free type
#includ... |
f68f3b5c863cf41ce7df869fd624cf5d91b3fa9a | 5e4f5746eb91fc5d85a6aac3a0f848dc3c5a7e83 | Honkhat/TrepxeTideHcir | /duilib/Control/UIScrollBar.cpp | C++ | cpp | 27,049 | no_license | #include "stdafx.h"
#include "UIScrollBar.h"
namespace DuiLib
{
CScrollBarUI::CScrollBarUI() : m_bHorizontal(false), m_nRange(100), m_nScrollPos(0), m_nLineSize(8),
m_pOwner(NULL), m_nLastScrollPos(0), m_nLastScrollOffset(0), m_nScrollRepeatDelay(0), m_uButton1State(0), \
m_uButton2State(0), m_uThumbState(0), m_... |
992aebc0091bbcc2cf21cbc3d8769c48fc9c3857 | d551e9e37d677f1b192ad1235854e1c375c6b047 | reezer/maplibre-gl-native | /src/mbgl/renderer/layers/render_circle_layer.hpp | C++ | hpp | 1,090 | permissive | #pragma once
#include <mbgl/renderer/render_layer.hpp>
#include <mbgl/style/layers/circle_layer_impl.hpp>
#include <mbgl/style/layers/circle_layer_properties.hpp>
namespace mbgl {
class RenderCircleLayer final : public RenderLayer {
public:
explicit RenderCircleLayer(Immutable<style::CircleLayer::Impl>);
~Re... |
18fcd944494957051485c822bf322b5947adbe35 | a350049370e7c51e6f7e22274bf392943a48e6e1 | chromium/chromium | /ui/gfx/linux/client_native_pixmap_dmabuf.cc | C++ | cc | 9,408 | permissive | // Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/linux/client_native_pixmap_dmabuf.h"
#include <fcntl.h>
#include <stddef.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <xf86drm.h>
#include <utili... |
f687461cea48e4c79f691b542c0d6af15c47a419 | 61f6f850098b17b613cf5f3acd2009dca834fa79 | sroy96/Attack | /All_subarray_Recursion_contiguos/main.cpp | C++ | cpp | 557 | no_license | #include <iostream>
#include <vector>
using namespace std;
void printSubarrays(vector<int>vec,int start,int end){
if(end>vec.size()-1){
return;
}
else if(start>end){
printSubarrays(vec,0,end+1);
}
else{
vector<int>temp;
for(int i=start;i<=end;i++){
tem... |
ed0f73877e76a0836fb8e5bcf9a9372df4144c15 | 0267afb6b00f41021e4785df8654a890a11b8793 | kosmaks/drill | /src/coursework/views/billet.cpp | C++ | cpp | 2,577 | no_license | #include "engine/core.h"
#include "billet.h"
billet_view::billet_view() : drill::view() {
texture_path = "dist/textures/billet.png";
position = { 0, 0, 0 };
rotation = { 0, 0, 0, 0 };
size = { 30, 10, 25, 0.015 };
c_program = nullptr;
c_object = nullptr;
object = nullptr;
}
billet_view::~billet_view()... |
f44e437add924bfe914e6c27ce66561d0412ed0b | 79fb86c3ca802b03dbfaab96ad2dd91e7bf938ed | PhysShell/inexplicable_engine | /inex/core/sources/memory_multi.cpp | C++ | cpp | 305 | permissive | #include "pch.h"
#include "memory_platform.h"
namespace inex {
namespace memory {
namespace platform {
pvoid allocate_raw_arena ( size_t const size )
{
pvoid arena;
return ( arena = std::malloc ( size ) ) ? arena : nullptr ;
}
} // namespace platform
} // namespace memory
} // namespace inex |
12ba0d56a59d95c3f46acf7ff5cbb7d6c1acfdd6 | 5d3006d61e0464888894b48f0043eb477c0b89f0 | anonpoolxyz/Scryt | /src/qt/paymentserver.cpp | C++ | cpp | 28,004 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2020 The Dash Core developers
// Copyright (c) 2014-2020 The ScrytExchange developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "payment... |
3b5aa3476350ffd3e85f6395d697c6bcf34b1c73 | e7c41172b300c3fef363114205c2bf0ca4066a32 | czisimba/playground | /c++/cpp_primer/12/friend3.cpp | C++ | cpp | 464 | no_license | #include <iostream>
#include <string>
using namespace::std;
class Girl;
class Boy {
public:
void display(Girl &);
};
class Girl {
friend void Boy::display(Girl &);
public:
Girl(const string &nm, const int ag):name(nm),age(ag) {
}
private:
string name;
int age;
};
void Boy::display(Girl &g) {... |
26396e64a4731994d7fd4bbb78c2616a53c9658b | 0f467a8e1137eb6e2649b12910e280e0f0d45562 | huaweicloud/huaweicloud-sdk-cpp-v3 | /vod/src/v1/model/PreheatingResult.cpp | C++ | cpp | 2,143 | permissive |
#include "huaweicloud/vod/v1/model/PreheatingResult.h"
namespace HuaweiCloud {
namespace Sdk {
namespace Vod {
namespace V1 {
namespace Model {
PreheatingResult::PreheatingResult()
{
url_ = "";
urlIsSet_ = false;
status_ = "";
statusIsSet_ = false;
}
PreheatingResult::~PreheatingResult() = defau... |
9ea1667415b80533e8665668dfe50efeb769c4c8 | 3744cbb1a1f0db496a47ba6f453a2bbf06e8b6ef | QPC-database/aws-sdk-cpp | /aws-cpp-sdk-apprunner/source/model/DescribeCustomDomainsResult.cpp | C++ | cpp | 1,565 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/apprunner/model/DescribeCustomDomainsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#inclu... |
4740dd3619be9bbbfc166c37e1d38bb0e2fd84ed | 61311d74bd0fb1481a8b89e8f75abdfdfb722629 | moorecoin/MooreCoinService | /src/rocksdb2/db/table_properties_collector.cc | C++ | cc | 2,208 | permissive | // copyright (c) 2013, facebook, inc. all rights reserved.
// this source code is licensed under the bsd-style license found in the
// license file in the root directory of this source tree. an additional grant
// of patent rights can be found in the patents file in the same directory.
#include "db/table_properti... |
2c67650de3c4fb06ad232c16559e748f748de17e | 152466ada4b9972c82d562f8bf5047ea7a245afd | divkakwani/Puzzles | /codejam/brattleship.cpp | C++ | cpp | 1,107 | no_license |
#include <bits/stdc++.h>
using namespace std;
/* Author: Divyanshu Kakwani */
/** Boilerplate */
// type aliases
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector< vector<int> > vvi; // for unweighted graph
typedef vector< vector< ii > > vvii; // for we... |
95deb9d3f446f3677f5c4fc1c819936ea211ed24 | 789e765f0dd06118677fedf9ceb4824cb7c0a577 | SparshJain2000/GFG_Solutions | /Arrays/max-circular-subarray-sum.cpp | C++ | cpp | 1,411 | no_license | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
// arr: input array
// num: size of array
//Function to find maximum circular subarray sum.
int kadane(int A[], int n, int f) {
int m = INT_MIN;
int sum = 0;
... |
5e1e8420aef6b7d9efc0119297a494ec9abf05c9 | 523385b8da5f0aa0221184f401eeb95e58e26939 | zero24x/Xinard | /src/qt/bip38tooldialog.cpp | C++ | cpp | 9,094 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The Xinard developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-l... |
0757bd7f52cc15afe876e0c7ddec47306b421b8b | f21593f688d251f17757c4a16a88baa73a8b8817 | HowarXie1995/Cocos-Graduation | /proj.win32/MenuLayer.cpp | C++ | cpp | 1,971 | no_license | #include "MenuLayer.h"
#ifdef WIN32
#pragma execution_character_set("utf-8")
#endif // WIN32
bool MenuLayer::init()
{
//Node * node = CSLoader::createNode(""); //可直接添加scene的控件运行场景界面
//this->addChild(node);
if (!Layer::init())
{
return false;
}
//1、获取窗口大小
Get_Screen_winSize;
//2、添加一个标签
Label * label = La... |
0c189a378499861a137c1ffd0e9c1d7e96f07178 | 9a971d9f2f909dc28602596ae6b4d94e8169fb5b | jasonwnorris/AceOfSpace | /src/Powerup.cpp | C++ | cpp | 895 | permissive | // Powerup.cpp
// STL Includes
#include <algorithm>
// AOS Includes
#include "Powerup.hpp"
#include "Projectile.hpp"
#include "WeaponType.hpp"
Powerup::Powerup(const std::string& p_Keyname) : Item(p_Keyname)
{
m_Type = p_Keyname;
}
void Powerup::InflictBonus(GameObject* p_GameObject)
{
if (m_Type == "ItemHealth"... |
5e0e1b8ffe02a538e9c29f0773877a03b2d01649 | e8d0b4c57f1a342b0fd085b561d686d4e660d5c5 | zcth428/hpctoolkit111 | /src/lib/support/PathFindMgr.cpp | C++ | cpp | 18,498 | no_license | // -*-Mode: C++;-*-
// * BeginRiceCopyright *****************************************************
//
// $HeadURL$
// $Id$
//
// --------------------------------------------------------------------------
// Part of HPCToolkit (hpctoolkit.org)
//
// Information about sources of support for research and development of
//... |
e773b0c533c85389ac48e3bdc91a7fc6f713bc1b | cc8b2b5d1d11ac5b62e985a064d8562fc8016c85 | nitishkumar07/Competitive-Programming | /codeforces/adadish.cpp | C++ | cpp | 537 | no_license | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
int a[n],i;
for(i=0;i<n;i++)
cin>>a[i];
if(n==1)
{
cout<<a[0]<<"\n";
}
else if(n==2)
{
cout<<max(a[0],a[1])<<"\n";
}
else
{
sort(a,a+n,greater<int>());
int sum... |
f109dc8084f9833fa2b4dd1d403a983ba2c7b8c3 | 322d4d87c07b9c9b5204d26052005df938b434e0 | Edwardo2014/Open-Transactions | /include/otapi/ot_otapi_ot.hpp | C++ | hpp | 7,765 | no_license | #ifndef _H_OT_OTAPI_OT
#define _H_OT_OTAPI_OT
#include "OTCommon.hpp"
#include <string>
#include <iostream>
#ifndef OT_USE_CXX11
#include <cstdlib>
#endif
#include <OTStorage.hpp>
#include <OTAPI.hpp>
#include <OT_ME.hpp>
#define OT_OTAPI_OT
#pragma warning(disable: 4503)
using std::string;
inline string c... |
3e9e89b5885ae44badf4dff68e466f75f75f502a | 10568300e0ec8886caca0c93a9b0281eaa445b71 | tc214/WebRTC_linux | /base/allocator/partition_allocator/page_allocator.cc | C++ | cc | 16,198 | no_license | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/allocator/partition_allocator/page_allocator.h"
#include <limits.h>
#include <atomic>
#include "base/allocator/partition_allocator/a... |
f0fc3c5b12ac455e45805c2816cae28c6ac7dcac | a1e228e15bd0f0914cb8ee1d5c51a16d6dd738b1 | LeFroid/ungoogled-qtwebengine-chromium | /chromium/chrome/renderer/chrome_content_renderer_client_browsertest.cc | C++ | cc | 8,332 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/chrome_content_renderer_client.h"
#include <string>
#include <vector>
#include "base/bind.h"
#include "base/command_line.h"
#i... |
3cab0253e78e81f4c0e6e8a65b32889c84c75512 | 869cdc945d793118ee08e6cef7e6abb71fd72319 | devosoft/Empirical | /demos/Slideshow.hpp | C++ | hpp | 6,007 | permissive | /**
* @note This file is part of Empirical, https://github.com/devosoft/Empirical
* @copyright Copyright (C) Michigan State University, MIT Software license; see doc/LICENSE.md
* @date 2015-2017
*
* @file Slideshow.hpp
*
*/
#ifndef DEMOS_SLIDESHOW_HPP_INCLUDE
#define DEMOS_SLIDESHOW_HPP_INCLUDE
#include <s... |
f4b28196ea03f1a7278d545abc779117ea1386a5 | f9e7a2bb29e197c689efad9d31471c3f2f8be180 | highperformancecoder/ecolab | /test/complex_tcl_args.cc | C++ | cc | 406 | permissive | /*
@copyright Russell Standish 2000-2013
@author Russell Standish
This file is part of EcoLab
Open source licensed under the MIT license. See LICENSE for details.
*/
#include <ecolab.h>
#include "arrays.h"
using namespace ecolab;
#include "complex_tcl_args.h"
#include "complex_tcl_args.cd"
#include "ecolab_ep... |
05ab8da13ac39d60ba75f139ade2677964761128 | e4f5b1b50c686531413c1ce73da6e36386c3a17b | funic/UnrealEnginePython | /Source/UnrealEnginePython/Private/UEPyEngine.cpp | C++ | cpp | 32,554 | permissive | // Copyright 20Tab S.r.l.
#include "UnrealEnginePythonPrivatePCH.h"
#include "Kismet/KismetSystemLibrary.h"
#include "Kismet/KismetMathLibrary.h"
#include "Developer/DesktopPlatform/Public/IDesktopPlatform.h"
#include "Developer/DesktopPlatform/Public/DesktopPlatformModule.h"
#if WITH_EDITOR
#include "PackageTools.h... |
5ddb76f178e73675e11896d93be2d1a43c67cf32 | 6990ebac6de10d3b6ab24f35b118fd9359fd2224 | ShivaniKaripe/cdac-ncr-work | /dsassignments/trees/BST/BST/BST.cpp | C++ | cpp | 2,252 | no_license | #include<iostream>
#include<algorithm>
using namespace std;
struct node
{
int data;
struct node *left;
struct node *right;
};
class BST
{
struct node *start;
public:
BST();
node* insert(int,node *);
void delete_element(int);
void inorder();
void preorder();
void postorder();
~BST();
int findMax(node *);
in... |
a8e31da39b1e5ca6e65f1b0e9cf7d4077c82d259 | 32847cffe924a8ec760745fbaf74507cf128dae2 | veelken/SVfit | /plugins/SVfitTauToLepBuilder.cc | C++ | cc | 3,292 | no_license |
/** \class SVfitTauToLepBuilder
*
* Auxiliary class reconstructing tau --> e/mu decays and
* building SVfitTauToLepHypothesis objects;
* used by SVfit algorithm
*
* \author Evan Friis, Christian Veelken; UC Davis
*
*/
#include "FWCore/Utilities/interface/Exception.h"
#include "DataFormats/TauReco/interface/P... |
0c6272132176a3bfa95d3c65e0a241501bd4712e | b315eeb3eb48b2729fe95d85a3cc236935b16cf3 | paulmadore/luckyde | /acc/shamrock-browser/mailnews/compose/src/nsMsgCopy.cpp | C++ | cpp | 16,681 | no_license | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsMsgCopy.h"
#include "n... |
224a10f0078d5dd2f810f9b05b5339a63342b488 | ea04be0136c06dcbb6742b02cf8f412c1cceff81 | gourytch/bezzabot | /src/parsers/page_game_dozor_gotvictim.cpp | C++ | cpp | 5,524 | no_license | #include <QWebElement>
#include <QWebElementCollection>
#include <QRegExp>
#include <QDebug>
#include "tools/tools.h"
#include "page_game_dozor_gotvictim.h"
////////////////////////////////////////////////////////////////////////////
//
// Page_Game_Dozor_GotVictim
//
//////////////////////////////////////////////////... |
96a82f5504518c445e4a69ffcbc8497fd001294b | 135ecb14bab6b7d0cefbf99e4a4cfc62abd04ba0 | projectgoav/serenity | /Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp | C++ | cpp | 8,188 | permissive | /*
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/QuickSort.h>
#include <LibJS/Runtime/Accessor.h>
#include <LibJS/Runtime/IndexedProperties.h>
namespace JS {
constexpr const size_t SPARSE_ARRAY_HOLE_THRESHOLD = 200;
constexpr const size_t L... |
55b4685f894f1a815baf75076cb71ce8ed1431a5 | e620c2ea391986f6fe1c5dbc01e7f774969851bb | ston1x/UNARetail | /uaMobi/qzxing-master/src/zxing/zxing/oned/rss/expanded/RSSExpandedReader.cpp | C++ | cpp | 22,578 | permissive | #include "RSSExpandedReader.h"
#ifndef Q_NULLPTR
#define Q_NULLPTR nullptr
#endif // ! Q_NULLPTR
namespace zxing {
namespace oned {
namespace rss {
using ::zxing::common::detector::MathUtils;
static const std::vector<int> SYMBOL_WIDEST = { 7, 5, 4, 3, 1 };
static const std::vector<int> EVEN_TOTAL_SUBSET ... |
2b369d9eb8f394fbc37bf6f3f235ae30a8703dc8 | 3605997ae4b7f151fa4582bb11147636940203ad | YarSav/CPP_pool | /rush00/Bullet.hpp | C++ | hpp | 338 | no_license | #ifndef BULLET_HPP
#define BULLET_HPP
#include "SpaceObject.hpp"
class Bullet : public SpaceObject {
public:
Bullet();
Bullet(int x, int y, int damage);
Bullet(const Bullet &bullet);
virtual ~Bullet();
void moveUp(int distance);
};
std::ostream &operator<<(std::ostream &os, const Bullet &b);
#en... |
589dfa1a6ea141461ee76f000e08d1fd9cb4b09a | e1a65b46cde07d044f4ee3245024b10189c8da82 | kamilkolodziejczyk/Game-Tank | /Utility.cpp | C++ | cpp | 4,538 | no_license | #include "Utility.hpp"
#include <SFML/Graphics/Sprite.hpp>
#include <SFML/Graphics/Text.hpp>
#include <random>
#include <cmath>
#include <ctime>
#include <cassert>
namespace
{
std::default_random_engine createRandomEngine()
{
auto seed = static_cast<unsigned long>(std::time(nullptr));
return std::default_ran... |
55c52246a88540fe65b447612767623d9ddfc24c | d0fa05d87a62ab8c291c8fe2580943745267b0dd | MatheusFerreiradeOliveira/Codes | /Questões Aleatórias/Bingo CODCAD.cpp | C++ | cpp | 1,326 | no_license | //inicia um vetor com todos os numeros ate n e dps vai cehcando se der igual, se der igual coloca um -1 la sla fodc
#include <bits/stdc++.h>
using namespace std;
int Change(int x, int y)
{
if(x > y)
return x-y;
if(y > x)
return y-x;
else
return 0;
}
int main()
{
int n, bolas;
... |
92c52ce07bdcd7575ac70c0e053bbcba6da554e5 | 652f6efc4b48ec12d4db645445cdc06176523c2a | ethanlarochelle/GamosCore | /GamosBase/Filters/src/GmParticleProcessFilter.cc | C++ | cc | 4,086 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The GAMOS software is copyright of the Copyright Holders of *
// * the GAMOS Collaboration.... |
e40ea725e61e74a9c454b2e24fbc255a79a19d7f | e1ef6d7f7f440682e61430b92cf369cc669a343c | MrHankey/TanksV | /Code/Entities/Gameplay/Weapons/Rifle.cpp | C++ | cpp | 1,650 | no_license | #include "StdAfx.h"
#include "Rifle.h"
#include "Game/GameFactory.h"
class CRifleRegistrator
: public IEntityRegistrator
{
virtual void Register() override
{
CGameFactory::RegisterGameObject<CRifle>("Rifle");
RegisterCVars();
}
void RegisterCVars()
{
REGISTER_CVAR2("w_rifleBulletScale", &m_bulletScale, ... |
396ddcc2d17f567da68e4f1f4a0f9a64ed8186f2 | e031d3f2dbd270b30cf2fd5db2a9cc8d9c40c642 | victorgorgonho/Roteiro2LabLP1 | /Questao 5/TrabalhadorAssalariado.cpp | C++ | cpp | 361 | no_license | #include "TrabalhadorAssalariado.h"
TrabalhadorAssalariado::TrabalhadorAssalariado()
{
nome = " ";
salario = 0;
}
TrabalhadorAssalariado::TrabalhadorAssalariado(std::string nome, double salario){
setNome(nome);
setSalario(salario);
}
double TrabalhadorAssalariado::calcularPagamentoSemanal(... |
0240fafcc84f963de68ae453a2f46bcbac952646 | 23080a402a56d60356becc1472d09c16f1c0a7a9 | comrob/cetsp-bezier-gsoa | /crl/crl.gui/src/view_transform.cc | C++ | cc | 6,616 | permissive | /*
* File name: view_transform.cc
* Date: 2009/02/21 16:06
* Author: Jan Faigl
*/
#include <cmath>
#include <cstdlib>
#include <sstream>
#include <crl/logging.h>
#include <crl/gui/view_transform.h>
using namespace crl::gui;
static crl::CLoggerPtr loclog = 0;
/// ---------------------------------------... |
f0c9d0560f5338d5c01d4aa3a805985cf219fffd | 3b0595ef2a6d8d9f7d24cfcc4270fe1d9e0d8f92 | SKARTEI/OOP_MFC_lecture | /mfc_source/VS2015/Chapter04/MetaFileDC/MainFrm.cpp | C++ | cpp | 1,932 | no_license |
// MainFrm.cpp: CMainFrame 클래스의 구현
//
#include "pch.h"
#include "framework.h"
#include "MetaFileDC.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMainFrame
IMPLEMENT_DYNAMIC(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_WM_CREATE()
ON_WM_SETFOCUS()
END_MESSAGE_MAP(... |
9f158c74b3d13eff7745d96aa1d2a3b4dd01a68a | 6eed854304716adf20d5d22b601d6ac28dabb934 | mi-wada/AtCoder | /ABC164/D.cpp | C++ | cpp | 1,853 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<deque>
#include<cmath>
#include<map>
#include<cstring>
using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LLINF = 1LL<<60;
#define P pair<ll, ll>
#define rep(i, n) for (int i = 0; i < (int)(n... |
e9132ce78c481d8b25ad507a22ad167e6df6d26d | b463432482620f1bb07429c1203535843294b2ae | Sangil-Lee/RefCode | /kstar/siteApp/VBS/VBSApp/src/VBSMain.cpp | C++ | cpp | 403 | no_license | /* VBSMain.cpp */
/* Author: Marty Kraimer Date: 17MAR2000 */
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include "epicsExit.h"
#include "epicsThread.h"
#include "iocsh.h"
int main(int argc,char *argv[])
{
if(argc>=2) {
iocsh(argv[1]);
... |
5c0837a19f4e6a24488b7ac7dfc0ec1038a84dd7 | b231c1de9da675a49fbc1cae59cd3e856e3b085e | ThoseBygones/ACM_Code | /POJ/POJ 3417.cpp | C++ | cpp | 1,997 | no_license | //树形dp + LCA Tarjan
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAXN 100010
struct Edge
{
int to;
int next;
} e[MAXN<<2];
int head1[MAXN];
int head2[MAXN];
int vis[MAXN];
int par[MAXN]; //父结点
int dp[MAXN]; //dp[i]表示i和它父亲相连的那条边被覆盖的次数
int cnt;
i... |
b288f94441e2762275903c909317ccd4f430c54c | b263703a3172ea8d8d8c37ef20a44d73c32c5513 | ansumanm/Interview | /cplusplus/src/privateDesEx.cpp | C++ | cpp | 499 | no_license | // CPP program to illustrate
// Private Destructor
#include <iostream>
// A class with private destuctor
class Test {
private:
~Test() {}
friend void destructTest(Test*);
};
// Only this function can destruct objects of Test
void destructTest(Test* ptr)
{
std::cout << "Calling private destruct... |
7bf552fa48ab579ec56e5bfcd2804729988fca78 | 895d1d403eecd25a35a5ff414f885e931381061e | capeanalytics/aws-sdk-cpp | /aws-cpp-sdk-ec2/source/model/DescribeVpcClassicLinkDnsSupportResponse.cpp | C++ | cpp | 2,480 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
28ec898d23789449e629cc5d4d9746762c726775 | cd6855288e3d64271a3bfa76c501db67edd9c80c | meniossin/src | /third_party/android_ndk/sources/third_party/shaderc/third_party/spirv-tools/source/validate_capability.cpp | C++ | cpp | 4,109 | permissive | // Copyright (c) 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
ceeb3a26cd5ab7b864abc7131875e0121cac1b5d | b258909cfa0bf5a3a901ebd279bcb5dfb5824088 | emileb/JK3 | /code/game/bg_slidemove.cpp | C++ | cpp | 15,989 | no_license | // this include must remain at the top of every bg_xxxx CPP file
#include "common_headers.h"
#include "../game/b_local.h"
#include "q_shared.h"
#include "bg_public.h"
#include "bg_local.h"
#include "g_vehicles.h"
//#include "../game/b_local.h"
extern qboolean PM_ClientImpact( trace_t *trace, qboolean damageSelf );
ex... |
575386a55b783075be2e4c4b9f1d7aa125e1d513 | b790f8a61cf2ebbf100bfebb17e3d66e476292e0 | aiderzcx/topurl | /src/url_info.cpp | C++ | cpp | 1,137 | no_license | #include "url_info.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "define.h"
CUrlInfo::CUrlInfo() {
m_buf = NULL;
m_size = 0;
m_len = 0;
m_count = 0;
}
CUrlInfo& CUrlInfo::operator=(const CUrlInfo &url){
if (this == &url){
return *this;
}
const char *str = url.Ge... |
a2902548059e7229cce4825fb8831ef432d34c7a | 628ca6f6af0ed8687be46833257425e3accca062 | yoshipaulbrophy/nxt-standalone | /examples/HelloIndices.cpp | C++ | cpp | 3,789 | permissive | // Copyright 2017 The NXT Authors
//
// 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... |
28e18d8ae9af9da417893a8581e847da5bc00a34 | b991ec21805c3690724ba7813bdf4b44fcd300e4 | snyh/dui | /Source/WebCore/html/HTMLLegendElement.cpp | C++ | cpp | 3,331 | no_license | /*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
* Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
* (C) 2006 Alexey Proskuryakov (ap@nypop.com)
*
* This library is free sof... |
6005f26c0dbd7a69d9de73ee88fa25c7c6125b36 | 166604e75adb2317141ab7ade4250b65da251131 | nikephoroscoin/nikephoroscoin | /src/util.cpp | C++ | cpp | 36,723 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 Litecoin 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 "sync.h"... |
1921157151cfa5d057aabf4c3ff93de86cfa3506 | 7564e4286d68fe7fdd5f268781dac73c885a9bfa | Bugin10/Code-Clone-Analyzer | /Tokeniser/codes/apiad_0_1/A.cpp | C++ | cpp | 711 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define fi first
#define se second
typedef vector<int> VI;
typedef long long l... |
a584bec199db0e104d390e1861d5f30dec803911 | bcbcacc2bfb11802fb7d51d0fe1b077060807bc9 | hiramekun/CompetitiveProgrammingContests | /contest/agc/agc007/a.cpp | C++ | cpp | 1,492 | no_license | #include <cstring>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <cmath>
#include <queue>
#include <set>
#include <stack>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++... |
683518eb93544a74a1951ee4a58a4aa7268d9202 | 289ec81ddbd1315fb98cf4e04ad3a24e48a3668b | getshameer/Chaste | /cell_based/src/population/writers/population_writers/VertexT3SwapLocationsWriter.hpp | C++ | hpp | 4,129 | permissive | /*
Copyright (c) 2005-2014, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
ecee200924d9e6d9b69e0e83afe374d1fff81559 | 848f16944f82dfb2c23ce88d8317b0985d253f7e | rlrs/HumanoidRobotics2015 | /src/load.hpp | C++ | hpp | 382 | no_license | // Group C: Rasmus
#ifndef _LOAD_HPP_
#define _LOAD_HPP_
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <eigen3/Eigen/Eigen>
using namespace std;
using namespace Eigen;
typedef vector<vector<Vector3d> > target_sequence;
void load_msr_skeleton(string fname, tar... |
a681ae16a1cbeb5a08d430af918cf35cad18571b | 8329101c242852f8f90882a244121605e4a6ca5f | keegancsmith/watercomp | /code/verifiers/atomextract.cpp | C++ | cpp | 980 | no_license | #include "pdbio/DCDReader.h"
#include "pdbio/DCDWriter.h"
#include "pdbio/Frame.h"
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char ** argv) {
assert(argc == 4);
char * in_path = argv[1];
char * out_path = argv[2];
int natoms... |
f2a18d50b44d4557f4589447f584a4c39adf4be5 | 6a655c7340eeb715132dfd9ab5d050156afdc3a0 | laristra/flecsi | /tools/flecstan/example/21-task-compile-argument-too-few.cc | C++ | cc | 607 | permissive |
// Error (compile time).
#include "execution/execution.h"
namespace A {
// This task takes 2 arguments...
void
foo(const int i, const double d) {}
flecsi_register_task(foo, A, loc, single);
} // namespace A
namespace flecsi {
namespace execution {
void
driver(int, char **) {
// So, what if we send 1 argument?
/... |
b28a544f5f712c0e78b368e99ba580e150632a08 | b0f52382057b575d27f41ee697065d3e163bf0cb | mjaimin/DesignPatterns | /Structural/Bridge/Bridge-2/Main.cpp | C++ | cpp | 1,850 | no_license | #include <iostream>
using namespace std;
/* Implementor*/
class DrawingAPI {
public:
virtual void drawCircle(double x, double y, double radius) = 0;
virtual ~DrawingAPI() {}
};
/* Abstraction*/
class Shape {
public:
virtual ~Shape() {}
virtual void draw() = 0;
... |
689ef5d45596586c63d5e893f42195bf4a4b60e4 | 69a0f64d975c2d1790ebc329e42a9ccb525e4b6e | himanshkukreja/competitveProgramming | /dynamic programming/cnc/Easy_Tiling.cpp | C++ | cpp | 1,120 | no_license | #include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
using namespace std;
#define ll long long int
//#define bint cpp_int
#define pii pair<int, int>
#define mod 1000000007
#define REP(i, a, b) for (int i = a; i < b; i++)
#define maxN 10001
#define endl "\n"
#de... |
cc3a27e1cc215af6858519497961302921079c78 | 31a0f2fa787c41ef80aa03edd2b4b02ffa63c951 | truedeity/BoyCoin | /src/util.cpp | C++ | cpp | 38,052 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 Litecoin Developers
// Copyright (c) 2014 Boycoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.... |
fc7ec187e03d8b1b5e8c0975a2abd5661d66528b | a4c1d9c592f13076614f663f32d37f9525247977 | safari-k/dog_picker | /kinect_aux_1473/src/kinect_upload_fw.cpp | C++ | cpp | 7,604 | no_license | /*
* Copyright 2011 Drew Fisher <drew.m.fisher@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:
*
* 1. Redistributions of source code must retain the above copyright
* no... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.