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 |
|---|---|---|---|---|---|---|---|---|
49f6a2c04cdf4f2eb341b41b73e9a594bf2dd9d2 | 07ea2dd13856d316dff0e68523829602f87d3043 | benson31/lbann | /include/lbann/utils/memory.hpp | C++ | hpp | 659 | permissive | #ifndef LBANN_MEMORY_HPP_
#define LBANN_MEMORY_HPP_
#include <lbann_config.hpp>
#include <memory>
namespace lbann {
#ifdef LBANN_HAS_STD_MAKE_UNIQUE
using ::std::make_unique;
#else
/** @brief Local definition of make_unique for non-C++14 compilers.
* @ingroup stl_wrappers
*/
template <typename T, typename... T... |
4bedc82e67e9f65a4bb8f858c4b2ff1e3decff14 | 5d35d7ba7348111ada914958a555c016f53a53a2 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-finspace-data/source/model/ListPermissionGroupsRequest.cpp | C++ | cpp | 1,113 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/finspace-data/model/ListPermissionGroupsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
... |
e7086821bb8d4b25efaba9def79cb27441779645 | 38c7eb6647147da8e0fe8fa9699d702d58c48d66 | Estard/TGA | /examples/computeTest/computeTest.cpp | C++ | cpp | 2,848 | permissive | #include "tga/tga.hpp"
#include "tga/tga_vulkan/tga_vulkan.hpp"
#include <chrono>
#include <sstream>
#include <thread>
#include <random>
#include <future>
#include <list>
#include "tga/tga_math.hpp"
static std::vector<char> readFile(const std::string& filename) {
std::ifstream file(filename, std::ios::ate | std:... |
dc9a5cc5e063f9e439228d1b13afb9bd47e47628 | 0af37f3cdc329fd9a2fdb3f6ddfd5a80421455f3 | Brazilian-Institute-of-Robotics/pylon_camera | /src/pylon_camera/pylon_camera_node.cpp | C++ | cpp | 57,631 | permissive | /******************************************************************************
* Software License Agreement (BSD License)
*
* Copyright (C) 2016, Magazino GmbH. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following co... |
779115158ad7d90bbfa006b1430f9f62fc8b5710 | 6a3ee07fabf2df6b38fa379a75df1bc475c1438c | minblock/NWAcoin | /src/qt/intro.cpp | C++ | cpp | 10,928 | permissive | // Copyright (c) 2011-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#include <fs.h>
#include <qt/intro.h>
#include <qt/form... |
8e77cce864b4687f33d8a4da779d36c90d051d23 | d0f8dd9415c2b960aad5121846a1806aa044d226 | MintSummer/TYC | /uoj/349/rts.cpp | C++ | cpp | 835 | no_license | #include "rts.h"
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int vis[300010];
void play(int n, int T, int dataType)
{
int now=1;
if(dataType==3)
{
int mx[2];//分别指两个方向的端点,两端点中间的显然均已访问过
mx[0]=1,mx[1]=1;... |
526fb9420206356ff8c051042f62473627356f3f | 331133737b58220e82432692ca2adee289458697 | bepahol/SilverKing | /src/lib/dhtclient/SKSnapshotException.cpp | C++ | cpp | 504 | permissive | #include "SKSnapshotException.h"
#include "jace/proxy/java/lang/String.h"
using jace::proxy::java::lang::String;
#include "jace/proxy/com/ms/silverking/cloud/dht/client/SnapshotException.h"
using jace::proxy::com::ms::silverking::cloud::dht::client::SnapshotException;
SKSnapshotException::SKSnapshotException(Snapshot... |
58e5a79bbf9e5fbad3c5a563cccc116e2a51b0f6 | db30c11002ddfc1f625dc029937d289b81334618 | Jiynto/CIPSO | /CILab3Plus/AntennaArray.cpp | C++ | cpp | 3,176 | no_license | #include "AntennaArray.h"
#include <string>
#include <algorithm>
#include <cmath>
#include <limits>
#include <exception>
#include<iostream>
const double AntennaArray::MIN_SPACING = 0.25;
AntennaArray::AntennaArray(unsigned int n_ant, double steering_ang)
: n_antennae(n_ant), steering_angle(steering_ang), MAX_APER... |
295307c27356c7950e2e02b152cef1acf7e93cd6 | 8c3a1253df243c0ce618918a1d6dbf5d97dbeb71 | justin-nguyen-1996/Real-Time-Interfacing-Labs | /Lab7-FinalProjectHardware/GameRules.cpp | C++ | cpp | 13,135 | no_license |
extern "C"{
#include <stdint.h>
#include "../inc/tm4c123gh6pm.h"
#include "ST7735.h"
#include "Graphics.h"
#include <stdlib.h>
#include "Thumbstick.h"
#include "Accel.h"
#include "Buttons.h"
#include "bmp.h"
#include "Dac.h"
}
#include "GameRules.h"
#define NULL 0
#define INVALID -... |
b3271087be1be162965487960e6377e394eb72c7 | f75a06e7e10f0b903193ad82bec00679b4d650ac | zrt/algorithm | /bzoj/bzoj2151.cpp | C++ | cpp | 821 | no_license | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
using namespace std;
int n,m;
int a[200005];
bool del[200005];
struct N{
int x,w;
N(int a=0,int b=0){
x=a,w=b;
}
friend bool operator < (N a,N b){
return a.w<b.w;
}
};
priority_queue<N> q;
int pre[200005],nxt[200005];
int main(){
scanf("%d... |
b72deaf652497dc5d7610bd18ff8a0806a492b18 | 09cb5fc679bae2ca74f22c6bcc219227e8211292 | alijuma/chromium | /ui/events/blink/web_input_event_builders_win.cc | C++ | cc | 13,067 | 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/events/blink/web_input_event_builders_win.h"
#include "ui/display/win/screen_win.h"
#include "ui/events/blink/blink_event_util.h"
#include "... |
f146ba33eb97c703bd8b887ff94440963b3b1feb | 5089bdc3b5eb6a2604f93b9fc37fd3a529d870d3 | Andrew90/langepas | /Units/Defectoscope/Compute/Automat.hpp | C++ | hpp | 12,730 | no_license | #pragma once
#include "templates\typelist.hpp"
#include "App\AppBase.h"
#include "PerformanceCounter\PerformanceCounter.h"
#include "tools_debug\DebugMess.h"
#include "ControlMode.h"
#include "Automat.h"
#include "Log\LogMessages.h"
namespace AutomatN
{
struct ExceptionTimeOut{};
struct Exception—ontrol—ircuitsOff{}... |
ccd518d86d27cc5e2555117596debeea33db00fb | 75399fe33640cae728f72db12653c36a62fddf64 | jjzhang166/WinNT5_src_20201004 | /NT/ds/security/gina/snapins/gpedit/browser.cpp | C++ | cpp | 141,213 | no_license | //+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1994 - 1998.
//
// File: browser.cpp
//
// Contents: implementation of the general GPO browser pane
//
// Classes: CBrowserPP
//
// Functions:
//
//... |
9a2b06fe104439b3503697b382a960a02984c9ad | b54733f078991861f0a82854a6c335268b88f47f | shihab122/Competitive-Programming | /Uri/Uri1151.cpp | C++ | cpp | 474 | no_license | #include<iostream>
using namespace std;
int main(){
int N,first=0,second=1,sum;
cin>>N;
for(int i=1;i<N;i++){
if(i==1)
cout<<"0 ";
else if(i==2)
cout<<"1 ";
else{
sum=first+second;
first=second;
second=sum;
cou... |
e6f9680d348e50205936024933dc41a3ff1487e1 | 26d4523fc3ce0d4d8fb15aa02b12f335dc33884a | mosemb/C- | /Tommassia/Chapter3/LinkedLists/DoubleLinkedList.cpp | C++ | cpp | 1,213 | no_license | // Created by root on 2017/08/24.
#include "DoubleLinkedList.h"
DoubleLinkedList::~DoubleLinkedList() {
while(!isEmpty()){
removefront();
}
delete header;
delete trailer;
}
DoubleLinkedList::DoubleLinkedList() {
header = new DoubleNode;
trailer = new DoubleNode;
header->next = tr... |
e1a92e7e6f5743d620b80f9862586a32d5f6cb12 | 59ea1b97642901848f28a2242336ffc6801c1af9 | degarashi/boomstick | /tests/narrow_test.cpp | C++ | cpp | 5,694 | permissive | #ifdef WIN32
#include <intrin.h>
#endif
#include "test2D.hpp"
namespace boom {
namespace test2d {
void Narrow::SetUp() {
base_t::SetUp();
Narrow_t::Initialize();
}
TfSP GenRNode(int id) {
#define MAKENODE(typ) case typ::GetCID(): return MakeAsNode<typ>();
switch(id) {
MAKENODE(geo2d::AABB)
... |
13368ab48a0cd836dcec536d11c06b267f50652a | ab5f71e7a3a882c00906fcd2256dc8d8ad4540e0 | zeiger589/video-chat | /webrtc/rtc_base/byte_buffer.cc | C++ | cc | 4,532 | no_license | /*
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contrib... |
556bc10b3de8e8c58419163db10f56fd2185c994 | 91704339b3d9d5c88c7830a47ca09141d81a688f | JamesZhang1974/SB3204C | /Serial.cpp | C++ | cpp | 5,929 | no_license | /*!
\file Serial.cpp
\brief Asynchronous Serial Port Handler for Comms
\author J Cole-Baker (For Smartest)
\date Jul 2018
*/
#include <memory>
#include <QSerialPort>
#include <QDebug>
#include "globals.h"
#include "Serial.h"
Serial::Serial(QObject *parent)
{
serialPort = std::unique_ptr<... |
7eb97b85a905be02bcc6dbb31795ded3cf3bae8c | 08b55b4311432dd740a7fae61bc389b9f41c852d | ThinhPTran/OpendTect | /src/uiPreStackProcessing/uiprestackmute.cc | C++ | cc | 2,211 | no_license | /*+
* (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
* AUTHOR : K. Tingdahl
* DATE : April 2005
-*/
#include "uiprestackmute.h"
#include "uiprestackprocessor.h"
#include "prestackmute.h"
#include "prestackmutedeftransl.h"
#include "uiioobjsel.h"
#include "uigeninput.h"
#include "u... |
670d3e5d400e346dd122689d935a863f7217283e | dc70d5067764729f9bbb782db5d6c6948a3798fa | crosswalk-project/crosswalk-efl | /test/base/xwalk_test_launcher.cc | C++ | cc | 2,436 | permissive | // Copyright (c) 2013 Intel Corporation. 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/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/memory/linked... |
f0a587c59ff4e9d33eeb2dca8cad1fe8500c1f3b | 1f459b14ed5128b334789212f562ebd7a2824c98 | Lorenzo1459/prog3cppEarte | /prog3cppEarte/src/br_ufes_inf_prog3_trab20152/io/Exceptions.cpp | C++ | cpp | 299 | no_license | #include "Exceptions.h"
namespace br_ufes_inf_prog3_trab20152_io {
InconsistenciaException::InconsistenciaException(string motivo) {
this->motivo = motivo;
}
const char* InconsistenciaException::what() const noexcept {
return motivo.c_str();
}
} /* namespace br_ufes_inf_prog3_trab20152_io */
|
a8bed209e5114409598a2fd3a52160837dfc3f74 | 9762f3da8ff6f4dece73d4be9c3397e73cffc54c | hansenms/gadgetron | /toolboxes/deblur/MFIOperator.cpp | C++ | cpp | 6,029 | permissive | #include "MFIOperator.h"
#include "hoNDArray_utils.h"
#include "cuNDArray_utils.h"
#include "hoArmadillo.h"
#include "cuNDArray_elemwise.h"
#include "cuNDArray_operators.h"
#include "sense_utilities.h"
#include "b1_map.h"
namespace Gadgetron{
//constructor
MFIOperator::MFIOperator()
{
is_prepared = false;
}
//Cons... |
6a40717f1296bb16158d0eeec87aba474330e49c | 120fa2d806d54d8f22f1770a5a928158a3a51b97 | fcccode/interview-1 | /cpp/opengl_game/0.3.2/oorion/osl_makeiichan.cpp | C++ | cpp | 6,038 | no_license | #include "stdafx.h"
#include "font.h"
#include "texture.h"
#include "misc.h"
#include "config.h"
#include "draw.h"
#include "gui.h"
#include "osl_types.h"
#include "osl_lexems.h"
#include "osl_misc.h"
#include "osl_makeiichan.h"
#include "iichan.h"
extern GUI* gui;
extern config cfg;
extern IICHAN* iichan;
void... |
7fc9487e657380eb6d987d2d480c09b42131fc9c | 0ee54375d6a0660972d003eebe72d178938f08ca | capriciousZihao/robust-backend-distance-based | /include/RRR.hpp | C++ | hpp | 141,514 | no_license | // RRR - Robust Loop Closing over Time
// Copyright (C) 2014 Y.Latif, C.Cadena, J.Neira
// 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 th... |
5d15d599ade9ae88f6d804ac7334f5701e8bf2d2 | 3fd3cae11e28e4ea94226f63d1b882083e701ab6 | x805/ONEA | /src/qt/paymentserver.cpp | C++ | cpp | 4,497 | permissive | // Copyright (c) 2011-2013 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 <QApplication>
#include "paymentserver.h"
#include "guiconstants.h"
#include "ui_interface.h"
#include "util.h"
#i... |
f8c8a366ce4a11dec1251f966971190286a40d26 | b3d5ae780ad76402fe0b9caf19132bf5dee84a41 | rockzhuang/tensorflow | /tensorflow/compiler/xla/runtime/custom_call_test.cc | C++ | cc | 52,700 | permissive | /* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
554b55b64996e74c139179d004a2f564ca7f4bec | cffd34eb3f6d0379d2cac8496f83c7ed441474d4 | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/multimedia/directx/dxg/swrast/rgb/setup/line.cpp | C++ | cpp | 7,929 | no_license | //----------------------------------------------------------------------------
//
// line.cpp
//
// Line processing.
//
// Copyright (C) Microsoft Corporation, 1997.
//
//----------------------------------------------------------------------------
#include "rgb_pch.h"
#pragma hdrstop
#include "d3dutil.h"
#include "se... |
1fcc69c87a39f0187d8f460ad17d7f18944f15f5 | a1dca8cc5307ec54419191c722255d7501cc614e | museng/FingerShip | /jni/screens/screen_game_finished.cpp | C++ | cpp | 4,109 | permissive | /* (c) Alexandre D�az. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at fingership.redneboa.es */
#include "screen_game_finished.h"
#include "../engine/game_core.h"
#include "../engine/locale.h"
#include "../engine/effe... |
1665272d38fdd85a68ecc99c29021f06c327a734 | 36e12744c1a3fc411f2817670dce5f13cdf8cb05 | MausGames/core-engine | /source/components/audio/coreSound.cpp | C++ | cpp | 10,152 | permissive | ///////////////////////////////////////////////////////////
//*-----------------------------------------------------*//
//| Part of the Core Engine (https://www.maus-games.at) |//
//*-----------------------------------------------------*//
//| Copyright (c) 2013 Martin Mauersics |//
//| Released under t... |
521178dedbf7eef8a9555b6d1d7d018455042bca | 76d14c6d03aa5470dcf56bdd3cf8e4dc6039c1bb | AdityaShekharTiwary/Cracker-Sheet | /merge_without_extra_space.cpp | C++ | cpp | 1,171 | no_license | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
void merge(int arr1[], int arr2[], int n, int m) {
// code here
int i=n-1,j=0;
while(i>=0 && j<m)
{
if(arr1[i]>=arr2[j])
... |
5c438918e58bbb054f3aaa22f77ffe8147d795d6 | 1f5011884e346e5c7c2cc0101fd019df99d5ac97 | pocketberserker/opentoonz | /toonz/sources/toonz/sceneviewer.cpp | C++ | cpp | 87,696 | permissive |
#ifdef LINUX
#define GL_GLEXT_PROTOTYPES
#endif
// Toonz includes
#include "tapp.h"
#include "viewerpane.h"
#include "onionskinmaskgui.h"
#include "viewerdraw.h"
#include "menubarcommandids.h"
#include "ruler.h"
#include "locatorpopup.h"
// TnzTools includes
#include "tools/cursors.h"
#include "tools/cursormanager.h... |
cbb50c4becc8859cc3b6627fa54832e0d327e667 | 9658b58103d4fca8cd1ce75bf01a6edf14bcac24 | dibrova/cpp | /Source15.2.cpp | C++ | cpp | 3,063 | no_license | /*15.2.Дана матрица порядка MxN(M строк, N столбцов).
Необходимо заполнить ее значениями и написать функ -
цию, осуществляющую циклический сдвиг строк и / или
столбцов массива указанное количество раз и в указан -
ную сторону.*/
#include <iostream>
#include <conio.h>
using namespace std;
enum Dir { UP = 72,... |
6fd99373b801c1766a7a00799f74c170e6f24cb6 | c287a576b44b4dd7a02c72abe56926f51431331f | leraye/Kick-Start | /2020/Round a/p3.cpp | C++ | cpp | 2,913 | no_license | // Workout
// Problem
// Tambourine has prepared a fitness program so that she can become more fit! The program is made of N sessions. During the i-th session, Tambourine will exercise for Mi minutes. The number of minutes she exercises in each session are strictly increasing.
// The difficulty of her fitness progra... |
933a5e5a86b87d9be146a1611364fece13b65163 | 083e581b6f7db1aa8f33dc08f1fb8404836c8110 | przemq20/Mownit-lab | /lab5/lab5/NumCpp/Roots/Brent.hpp | C++ | hpp | 10,999 | no_license | /// @file
/// @author David Pilger <dpilger26@gmail.com>
/// [GitHub Repository](https://github.com/dpilger26/NumCpp)
/// @version 1.3
///
/// @section License
/// Copyright 2019 Benjamin Mahr
/// Copyright 2020 David Pilger
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this
//... |
fa8621daa85eda618bf74160106bd3582157e4e3 | 54d0be70beea690b6e1be0d49751dab0689a9008 | da-foxbite/KSU121 | /C++/Lab3C/lab3Cp4/lab3Cp4-6/Source.cpp | C++ | cpp | 676 | permissive | /*
Автор проекту: Суптеля Владислав
Дата: 18.10.2019
6.Якщо середня частота ударів серця людини 1 в секунду, скільки ударів серце зробить за 78 років? (За n років?).
*/
#include <iostream>
using namespace std;
int hbeat(int years);
int hbeat(int years)
{
int sec = 1;
int min = sec * 60;
int hour = min * 60;
int ... |
804dc3b69d3b97b4df55b366900de1aaa9dea078 | 9c1ffb15d9b42d1cddf4328892e3f969b2999831 | Hengle/RenderGround | /PostMaterial.cpp | C++ | cpp | 1,944 | no_license | #include "PostMaterial.h"
PostMaterial::PostMaterial()
{
}
void PostMaterial::CreateDescriptorSet()
{
VulkanResourceManager* RM = VulkanResourceManager::GetResourceManager();
VkDescriptorBufferInfo bufferInfo = {};
bufferInfo.buffer = buffer;
bufferInfo.offset = 0;
bufferInfo.range = VK_WHOLE_SIZE;
VkDescript... |
916c2058a41521e9840385137fba5da659510014 | 435a7a8996e30dde6289d82c6467e4c283778302 | mikedn/runtime | /src/coreclr/md/enc/stgtiggerstorage.cpp | C++ | cpp | 32,217 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//*****************************************************************************
// StgTiggerStorage.cpp
//
//
// TiggerStorage is a stripped down version of compound doc files. Doc ... |
a9e3034b39ed97c06f0cf8df2d11e930689f5c3a | c690acb56001dbd14dcaba2a9c7159ed945bce33 | xiabofei/leetcode | /2018/179_LargestNumber.cpp | C++ | cpp | 758 | no_license | #include <vector>
#include <iostream>
#include <string>
#include <unordered_set>
#include <unordered_map>
#include <stack>
#include <queue>
#include <map>
#include <set>
using namespace std;
// https://blog.csdn.net/feliciafay/article/details/42969511
// 转化成字符串比较
// a1+a2 < a2+a1
class Solution {
public:
bool stat... |
312d3d4bda0496077d9acf09fe979be8f2295055 | ce0f307f8b92650969435ff0060dbe49abf69157 | hemangdtu/DSAlgo | /Graphs/5_GraphTraversalDFS.cpp | C++ | cpp | 755 | no_license | #include<bits/stdc++.h>
using namespace std;
template<typename T>
class Graph
{
private:
map<T, list<T>> l;
public:
void addEdge(int x, int y)
{
l[x].push_back(y);
l[y].push_back(x);
}
void dfsHelper(T source, map<T, bool>& visited)
{
cout << source << " ";
visited[source] = true;
for(a... |
3d288d9c1691d50b9b1472321ae6afdfbd2e4821 | db0dac0870a8fbc654443c603b26004fbb70423f | mattyjams/maya-usd | /lib/mayaUsd/render/pxrUsdMayaGL/batchRenderer.cpp | C++ | cpp | 49,418 | permissive | //
// Copyright 2016 Pixar
//
// 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 in wri... |
803c12095b8c985c7007175f401046a54fc680e2 | e42d0eee31354eba7a463c59b9ef085caaf3e52e | niuyinmei/llvm | /lib/Analysis/LazyValueInfo.cpp | C++ | cpp | 39,697 | permissive | //===- LazyValueInfo.cpp - Value constraint analysis ----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
7e8d9457fd042ad3daca491ace956b78dc3c632c | cc3be59c8a105a9b7831f3a65b3817fe40ece175 | robot-aquila/wquik | /CWQuik/Trade.cpp | C++ | cpp | 3,888 | no_license | #include "wquik/Trade.h"
namespace wquik {
Trade::Trade(double number, double orderNumber, const char* classCode,
const char* secCode, double price, long qty, double value,
bool isSell, long descriptor, ITrans2QuikAPI* quik)
:
_number(number), _orderNumber(orderNumber), _classCode(classCode),
_secCode(se... |
3cdb6ca22c2e91a2aae980ec7816799c45cc1975 | c44ef3838a162845eba7fca34ac815802824b026 | dizuo/QVP_Kernal | /data protocol/process.hh | C++ | hh | 3,681 | no_license | // file:Provide the process factory.
#ifndef PROCESS_HH
#define PROCESS_HH
#include "aprocess.hh"
#include "inputs.hh"
#include "outputs.hh"
// To have a working process, you only have to write these methods:
// - slot_name , public
// - slot_type , public
// - name , public
// - type_check_in , protected
// - ... |
36ad874d7bcd14c446f4e01ca501676f4ce2b1f8 | 8c91ac078a0bbd1eb5ca6563ecb4c5665c871103 | hyerynn0521/CS32 | /Project 1/City.cpp | C++ | cpp | 6,432 | no_license | //
// City.cpp
// Project 1
//
// Created by Hyerin Lee on 4/5/21.
//
#include "City.h"
#include <iostream>
using namespace std;
City::City(int nRows, int nCols)
: m_rows(nRows), m_cols(nCols), m_player(nullptr), m_nFlatulans(0), m_history(nRows, nCols)
{
if (nRows <= 0 || nCols <= 0 || nRows > MAXROWS ... |
892b78662e4e33e0777dd42572bf5c4c113f917c | 6c6a67c4b43f294c7a761816805c39f88e0ebc5a | metal32/tutorial_c | /singleton.cpp | C++ | cpp | 641 | no_license | #include<iostream>
//Constructor has been made private to stop anyone making more than one object of it
using namespace std;
class Singleton {
static Singleton* instance;
int data;
Singleton() : data(0){}
public:
static Singleton* getInstance() {
if (instance == nullptr) {
instance = new Singleton;... |
03eafa3215a4d5e5094f216bd51a77e339df4442 | deaa337a1d1a6067195c41128e167c7e605910b2 | dogecash/dogecash | /src/core_write.cpp | C++ | cpp | 8,556 | permissive | // Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2017-2020 The PIVX Developers
// Copyright (c) 2020 The DogeCash Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "core_io.h"
#include "... |
ed4a4a52c2395446e2f5179d3a92dc633836357a | 0581df4044354b228b82dc3aac9ed5903dd03ca9 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-customer-profiles/source/model/GetWorkflowResult.cpp | C++ | cpp | 2,195 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/customer-profiles/model/GetWorkflowResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include... |
75ae7642f44b1b537e1bde7d0efd62000e6e424c | b523f790814e1a9b42ab66ce1f25f3628efc1b7a | RichardBruce/RAPTor | /RAPTor/convex_decomposition/regression_tests/voxel_no_pca_hull_approx_tests.cc | C++ | cc | 15,349 | no_license | #ifdef STAND_ALONE
#define BOOST_TEST_MODULE regression test
#endif /* #ifdef STAND_ALONE */
/* Standard headers */
/* Boost headers */
#include "boost/test/unit_test.hpp"
/* Convex Decomposition headers */
#include "convex_decomposition.h"
/* Test headers */
#include "regression_fixture.h"
namespace raptor_conv... |
580257aece6d79d08e211616e5568f2ce95eaf8d | 383345a8b474403ac4810cc02dc60cb899613cd5 | ECS-251-W2020/chromium | /third_party/abseil-cpp/absl/random/internal/nanobenchmark_test.cc | C++ | cc | 2,446 | 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... |
c422f878abd2d1058baab502fc6d776c4d6f870a | 2eb3e9768fd86ea1398e03110de7db0217a67b1e | simonask/snow-llvm | /snow/runtime/boolean.cpp | C++ | cpp | 907 | no_license | #include "snow/object.hpp"
#include "snow/boolean.hpp"
#include "internal.h"
#include "snow/class.hpp"
#include "snow/function.hpp"
#include "snow/str.hpp"
namespace snow {
namespace bindings {
static VALUE boolean_inspect(const CallFrame* here, VALUE self, VALUE it) {
return snow::create_string_constant(value_t... |
72521f362b4a5f16316859e52eb47eba53baa9c7 | 86349ef598a4ea24e29ec75daca6fd717512bc8f | OpenWaterAnalytics/epanet-rtx | /src/SineTimeSeries.cpp | C++ | cpp | 527 | permissive | #ifdef _WIN32
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#include "SineTimeSeries.h"
using namespace RTX;
using namespace std;
SineTimeSeries::SineTimeSeries(double magnitude, time_t period) {
_period = period;
_magnitude = magnitude;
}
time_t SineTimeSeries::period() {
return _period;
}
double Si... |
c50506ac7f9659d3c206d34483624a0acbbde117 | 7e54bf8e77436a744e3334b7aa97f6c0744068b8 | arthurepc/Competitive-Programming | /problems/URI/thepronalanciapuzzle.cpp | C++ | cpp | 209 | no_license | #include <stdio.h>
using namespace std;
int main() {
long long int n;
scanf("%lld", &n);
while (n != 0) {
printf("%d", n % 10);
n /= 10;
}
printf("\n");
return 0;
}
|
0a8169d91e772bd60c53cd4618cb4ece9093022f | 92f24bb7e067c1e384829d9fb332f16f7ea93a76 | zqrtalent/MercuryUI | /Framework/Menu_/MenuXP.cpp | C++ | cpp | 38,676 | no_license | ///////////////////////////////////////////////////////////////////////////////
//
// MenuXP.cpp : implementation file
//
///////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "../_platformCompat/PlatformDeviceContext.h"
#include "../Utility/StringHelper.h... |
c19d48bf0d6603aace65088b3e36d595e51b951f | 19ff49cd8f789fcfc7657db5d8f08896eed8d2c6 | meteoritt/llvm-mirror | /lib/MC/MCContext.cpp | C++ | cpp | 13,219 | permissive | //===- lib/MC/MCContext.cpp - Machine Code Context ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
4aeb26865dd4d1ef4b731dd9e5cd4ac864a6b3ac | f2cf0e8c583dbb37e7e219f53edbffeeea542bd4 | wiwi2018/Programacion-C | /Parte2/Ejemplo3.cpp | C++ | cpp | 347 | no_license | // Programa que muestra el manejo de arrays y punteros
#include <iostream>
using namespace std;
int main ()
{
int numeros[5];
int * p;
p = numeros; *p = 10;
p++; *p = 20;
p = &numeros[2]; *p = 30;
p = numeros + 3; *p = 40;
p = numeros; *(p+4) = 50;
for (int n=0; n < 5; n ++)
cout << numeros[... |
febc1703e85c3a1d47b8196f40d0e9f28799c0ce | 0c665d2c7eb89bce719c38475e850dfda69845eb | zhs007/porcupine | /Classes/AppDelegate.cpp | C++ | cpp | 1,927 | permissive | #include "AppDelegate.h"
#include "HelloWorldScene.h"
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
//if you want a different context,just modify the value of glContextAttrs
//it will takes effect on all platforms
void AppDelegate::initGLContextAttrs()
{
//set OpenGL context attr... |
76d970ab8b4d0b4d420bfb1fccfd4c59514be8dc | dfb801b73d1b2baf1dff014fdf027af2c6215285 | luismoax/Competitive-Programming---luismo | /My Implementations (luismo)/SegmentTree MinMax - PointUpdate.cpp | C++ | cpp | 1,099 | no_license | // MIN / MAX SegmentTree - Point Update
struct SegmentTree
{
vector<ll> mx;
vector<ll> mn;
int SZ;
SegmentTree(int len)
{
SZ = len;
mx.resize(len << 2 + 3, 0);
mn.resize(len << 2 + 3, 0);
}
void update(int ii, ll upd)
{
update(0, 0, SZ - 1, ii, upd);
}
void update(int idx, int L, int R, int ii, ll... |
377ef0a84f76b049f13d1fbabd70d12317b357a5 | 83c5a3faa7170f3f4892a269dc5f3ddcbdf3d129 | duality-solutions/libbdaptorrent | /test/dht_server.cpp | C++ | cpp | 4,497 | permissive | /*
Copyright (c) 2013, Arvid Norberg
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the f... |
db5be323512b4105d59e5fc76d879689698e4add | 0118adeee2416172836262161747539dbc079b14 | aliyun/aliyun-openapi-cpp-sdk | /vpc/src/model/ModifyIPv6TranslatorAclListEntryResult.cc | C++ | cc | 1,347 | 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... |
2f00b6ad164917d5d77015dc9051a3251a8d6ecb | 038e8bf309f7868c9b16164501d38e9f28061a55 | KhloyannareK/UniAlgoCodeVisualizer | /vvector.cpp | C++ | cpp | 5,132 | no_license | #include "vvector.h"
#include "mainwindow.h"
#include "Utils.cpp"
#include <QGraphicsRectItem>
#include <QGridLayout>
#include <QTime>
#include <QCoreApplication>
void delay()
{
QTime dieTime= QTime::currentTime().addMSecs(8);
while (QTime::currentTime() < dieTime)
QCoreApplication::processEvents(QEve... |
7ee115b3d07512c7cebb8ba174561ca96db19480 | 2c452f3d475da984b193bee542d6dbb05364f597 | ccdxc/logSurvey | /data/crawl/squid/old_hunk_4248.cpp | C++ | cpp | 212 | no_license | break;
case 'm':
p = err->auth_user_request->denyMessage("[not available]");
break;
case 'M':
p = r ? RequestMethodStr(r->method) : "[unknown method]";
break;
|
6ab511ca22b0f3334bd460776dd4bf31a35907c6 | 169b70851aa535fb7bb7423d8d959300de6dda15 | Gohan/aws-sdk-cpp | /aws-cpp-sdk-cloudsearch/source/model/DateOptions.cpp | C++ | cpp | 5,430 | 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... |
3ecefc79179db666d8f5356620c4b44f5e55c7b6 | a01f3e8d411d060d22412d9a3011a238f3bae233 | fcvalise/AnOctonautOdyssey | /Menu/ControlMenu.cpp | C++ | cpp | 1,296 | no_license | #include "ControlMenu.hpp"
#include "Progress.hpp"
ControlMenu::ControlMenu(void) :
m_isCreatedMoveMap(false),
m_isCreatedRepair(false),
m_isCreatedJump(false),
m_isCreatedDoubleJump(false),
m_isCreatedSlowFall(false)
{
}
void ControlMenu::createMenus(void)
{
addMenu(L"Déplacement : Left/Right", nullptr);
addM... |
6f2e83fe1a50f89e404bfb90031a5b4bcaa99f03 | 1bd3999fce7727a2b7dd8512ff4c9549ba78e741 | GXhua/puno | /.libs/puno_automatic_generated/inc/types/com/sun/star/chart2/XChartTypeContainer.hpp | C++ | hpp | 1,438 | no_license | #ifndef INCLUDED_COM_SUN_STAR_CHART2_XCHARTTYPECONTAINER_HPP
#define INCLUDED_COM_SUN_STAR_CHART2_XCHARTTYPECONTAINER_HPP
#include "sal/config.h"
#include "com/sun/star/chart2/XChartTypeContainer.hdl"
#include "com/sun/star/chart2/XChartType.hpp"
#include "com/sun/star/uno/XInterface.hpp"
#include "com/sun/star/uno/... |
711ce0b627fbf62801ba0f4ad39fbe39fb6afd84 | 6b7a02e18385a544247e59fd31a050125b46bd50 | yupeifengyannis/programming_pearls | /chapter1/test/gen_data.cpp | C++ | cpp | 859 | no_license | #include <iostream>
#include <set>
#include <vector>
#include <cstdlib>
#include <fstream>
#include <algorithm>
#include <random>
#include <chrono>
using namespace std;
int main(){
std::set<long> data_set;
long num = 5200000;
while(data_set.size() < num){
long tmp_data = rand();
if(tmp_data > 0){
d... |
6fa8b3a0be8616816d9c1010db1fdd0ccf7b9af5 | 7844517b9f8a8e8c9b1dcc5586f46eb24fed3a55 | pkuzw/LeetCode-Zhao-Wei- | /Reorder List.cpp | C++ | cpp | 6,637 | no_license | ///@file Reorder List
/*
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to {1,4,2,3}.
*/
///@author zhaowei
///@date 2015.08.03
///@version 1.0
////@date 2015.08.20
///@versi... |
43d96f5598e75c9221d145a42f49653a55347531 | 0d1c16ec75eb0c30404bee1b93dd8b2ca28adae0 | kryptBlue/mirus | /source/kernel/hardware/rtc.cpp | C++ | cpp | 6,832 | permissive | // Copyright 2013 Mirus 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 applicable law or agreed to in writing,... |
041d8d876294a4a6ce74097114d89c4d90f854fc | 860f0ee929ccb2b65f6dc439a27144ff931a4693 | e12exp/ucesb | /eventloop/multi_chunk.hh | C++ | hh | 6,264 | no_license |
#ifndef __MULTI_CHUNK_HH__
#define __MULTI_CHUNK_HH__
#include "error.hh"
#include "multi_info.hh"
#include "../common/signal_id.hh"
#define SINGLE(name,ident) name ident;
#if !USING_MULTI_EVENTS
template<typename T,typename T_map>
class multi_chunks;
template<typename T>
class ptr;
#endif//!USING_MULTI_EVENTS
... |
3431e102455c7379573485a9b1244b3100780e2a | 761b4d8148cee864da5ec79dc6459365cdcacdfe | Linktime/WinAPIGame | /WinAPIGame/WinAPIGame/DrawBoard.cpp | C++ | cpp | 744 | permissive | #include "GameHead.h"
#ifndef DRAWBOARD
#define DRAWBOARD
class Board {
private:
int xl,yt,xr,yb;
public :
Board(int xl,int yt,int xr,int yb) : xl(xl),yt(yt),xr(xr),yb(yb){};
int getXl(){
return xl;
}
int getYt() {
return yt;
}
int getXr(){
return xr;
}
int getYb() {
return yb;
}
HDC & draw(HDC & me... |
002cfafe9d7cd39bd4a6da2359196bc21af503f4 | dc5be1ae4d641266c046f974fe09e039caf6b79b | jsenn/ifcplusplus | /IfcPlusPlus/src/ifcpp/IFC4/lib/IfcSystemFurnitureElementTypeEnum.cpp | C++ | cpp | 2,540 | permissive | /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
#include <sstream>
#include <limits>
#include <map>
#include "ifcpp/reader/ReaderUtil.h"
#include "ifcpp/writer/WriterUtil.h"
#include "ifcpp/model/BasicTypes.h"
#include "ifcpp/model/BuildingException.h"
#include "ifcpp/IFC4/include/IfcSyst... |
9a17aac99aa51aea61a219afc6b78706959a9ee8 | fca1fe1e137ba733ac8c3f0d82dcc4074e1e51d6 | LalitTyagi/Hackerrank-Algorithms-solutions-using-Cpp | /Migratory Birds.cpp | C++ | cpp | 381 | no_license | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int i,n,a,max;
cin>>n;
int arr[n],arr1[n];
for(i=0;i<n;i++)
{
cin>>arr[i];
arr1[i]=arr[i];
}
for(i=1;i<n;i++)
{
arr[arr[i]%n]+=n;
}
max=arr[0];
a=0;
for(i=1;i<n;i++)
{
if(max<arr[i])
{
... |
0f0297a8c16c638ac9cd6e2a5c6b31594000d004 | 154c428663b42b0d135a92a2df060e6728d9f882 | liang0/chromium | /chrome/test/payments/payment_request_platform_browsertest_base.cc | C++ | cc | 8,235 | permissive | // Copyright 2020 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/test/payments/payment_request_platform_browsertest_base.h"
#include <algorithm>
#include <iostream>
#include <list>
#include <memory>
#i... |
5c7064536e856b7afe3baff106d4d4020e01e4fa | 0312e02b7e14e30286d7ed05bf370fe391fa5990 | lanybass/VideoPlayer-SingleQueue | /videoCapturer.cpp | C++ | cpp | 5,749 | no_license | #include <cstdlib>
#include <cstring>
#include <iostream>
#include <thread>
#include <string>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "Windows.h"
#include <opencv2\opencv.hpp>
#include <time.h>
#include <process.h>
#include <omp.h>
... |
2e8636ac7273d83d1abd2bd19ab8319ff2992109 | 52112ff6e065be351acf28194c9425f32de0c484 | CzapkaCzoczo/CMake | /Source/cmQtAutoGeneratorInitializer.cxx | C++ | cxx | 34,915 | permissive | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQtAutoGeneratorInitializer.h"
#include "cmAlgorithms.h"
#include "cmCustomCommandLines.h"
#include "cmFilePathChecksum.h"
#include "cmGeneratorTarget.h"
#inclu... |
ff607e05f5ea3fa16ca5f1586041e40419e17ea2 | 1101751a33c0467344050e06e1025929f904d1d6 | ric2b/Vivaldi-browser | /chromium/chromeos/ash/components/login/hibernate/hibernate_manager.cc | C++ | cc | 2,305 | permissive | // Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/ash/components/login/hibernate/hibernate_manager.h"
#include "base/bind.h"
#include "base/logging.h"
#include "chromeos/ash/components/cryptohome/userdataau... |
8ceb1315d8fe91be18388d6b10a5b1bad54b19ac | 8ffcc948e105b880622eae7fa82e4e04f29422ec | yajunjiao/HOWARD11 | /src/FSM/FSMHelper.hxx | C++ | hxx | 667 | no_license | //
// FSMHelper.h
// MarXsCube
//
// Created by SeconDatke on 1/24/15.
// Copyright (c) 2015 MarXsCube Staff. All rights reserved.
//
#ifndef MarXsCube_FSMHelper_h
#define MarXsCube_FSMHelper_h
#include "FSMCommon.hxx"
#include "FSMLogger.hxx"
namespace Howard {
namespace FSMHelper {
using L = FSMLevel;
exter... |
177b8252750177e995af5b408bc9dac9fd9bfadc | dd6eade2f81404f0a40aba41e47e90cd94ea6c58 | proaholic/Win2K3 | /NT/shell/shell32/enumuicommand.cpp | C++ | cpp | 13,376 | no_license | #include "shellprv.h"
#include "enumuicommand.h"
#include "datautil.h"
HRESULT CWVTASKITEM::_get_String(const WVTASKITEM* pTask,
DWORD dwIndex,
LPWSTR * ppsz,
DWORD cchMin,
BOOL bIsIcon)... |
dc134f35230ffcb83a390a015b0b9502c8e31202 | 403e336944c098fe37f9e95fcc03d11fc35fca6d | panicmilos/MnozenjeMatrica | /MnozenjeMatrica/MnozenjeMatrica/src/MultiplierFactory.cpp | C++ | cpp | 1,288 | no_license | #include "MultiplierFactory.h"
#include <functional>
#include "ParallelForMultiplier.h"
#include "ParallelTaskPerElementMultiplier.h"
#include "ParallelTaskPerRowMultiplier.h"
#include "ParallelTaskPerThreadMultiplier.h"
#include "SerialMultiplier.h"
MultiplierFactory::MultiplierFactory() noexcept
{
registerMultipl... |
5280c087d611fffd4597b7a0f1e88e539d3af7a8 | 68dfb33459e888d95b2b523e32729c5a2925ace6 | ishgum/Robocup | /Tidying2/state_michael2/PID.cpp | C++ | cpp | 586 | no_license |
#include "PID.h"
PID::PID(int desired)
{
desiredValue = desired;
sweepDirection = 0;
error = 0;
scaledError = 0;
ignore = false;
}
// Updates a single sensor using a MAF
float PID::findError (float currentValue) {
if (ignore == false) {
error = desiredValue - currentValue;
}
}
void PID::setDesi... |
830d3109a8187e27c4a0a6fc633082d5ed905242 | b6ca7dcf4676ce2a78b58068db42df845228c666 | Chengyanliang/mongo-cxx-driver | /benchmark/parallel/gridfs_multi_export.hpp | C++ | hpp | 4,017 | permissive | // Copyright 2017 MongoDB 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 in wri... |
7639f923fac5aa0ce3e3b3c347b96f3b33c4eeba | e280b2b028216e1d61632927e64c43d45dc99947 | Turon42/hepics | /socs/src/socs/opencl/OpenCL.cpp | C++ | cpp | 11,139 | no_license | #include <vector>
#include <fstream>
#include "OpenCL.h"
namespace socs {
namespace opencl {
using namespace std;
static auto get_platform_ids() {
auto np = cl_uint { 0 };
if (clGetPlatformIDs(0, nullptr, &np) != CL_SUCCESS) {
throw OpenCL_exception { };
}
if (np == 0) {
throw No_platform { };
}
auto ids ... |
96e09640dfaa4638233bab80dc2e3ee62083b7e7 | 1e1793621457eaf9d1e63ec9f121216d25215ba5 | Laeeth/libdynd | /src/dynd/kernels/string_assignment_kernels.cpp | C++ | cpp | 13,751 | permissive | //
// Copyright (C) 2011-15 DyND Developers
// BSD 2-Clause License, see LICENSE.txt
//
#include <stdexcept>
#include <sstream>
#include <dynd/type.hpp>
#include <dynd/diagnostics.hpp>
#include <dynd/kernels/string_assignment_kernels.hpp>
#include <dynd/types/string_type.hpp>
#include <dynd/kernels/base_kernel.hpp>
... |
d2ba97731f4e698142c733370ed91bbc50d27a5a | 38517608f2540f97dcffcb95672aaa3d6db4a345 | chandanbose/IBAMR | /examples/IBLevelSet/ex0/LSLocateGasInterface.cpp | C++ | cpp | 4,506 | no_license | // ---------------------------------------------------------------------
//
// Copyright (c) 2019 - 2020 by the IBAMR developers
// All rights reserved.
//
// This file is part of IBAMR.
//
// IBAMR is free software and is distributed under the 3-clause BSD
// license. The full text of the license can be found in the f... |
4c207cd4180f80f636acb8c2982f6448c6ade30b | 4bc77fce1ff083e4dc7347d38634db1721a31162 | manishSRM/solvedProblems | /MyFiles/BubSort.cpp | C++ | cpp | 480 | permissive | #include<iostream>
#include<algorithm>
using namespace std;
void bubbleSort (int ar[], int n) {
int i, j;
for (i = 0; i < n - 1; ++i) {
for (j = 0; j < (n - 1 - i); ++j) {
if (ar[j] > ar[j + 1])
swap (ar[j], ar[j + 1]);
}
for (j = 0; j < n; ++j)
cout << a... |
64d4496701ea2034c9ddf4ea3a573608361644d2 | e33b9c449aaed7430a8ba23d3213cb70af20c3e1 | HavenDV/AutoSegment | /ImageProcessing/Segment.cpp | C++ | cpp | 4,607 | no_license | // Segment.cpp : creating a segmented image where all disjunct spots have different pixel values
// (serial number of spot)
//
#include "stdafx.h"
#include "ImageProcessing.h"
#include <math.h>
//------------------------------------------------------------------------------
namespace ImageProcessing
{
//------... |
a342aac793b5f78894b496d7244afb04357b10c7 | e0c32ca592b53ca9607f7c7f95a0347aa190cc2c | jxianglonggg/SourceCodeGameTLBB | /Game/boost/boost/test/detail/workaround.hpp | C++ | hpp | 2,029 | permissive | // (C) Copyright Gennadiy Rozental 2005.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile: workaround.hpp,v $
/... |
b5959af79df2f93229b6a99c1a2d065270fdb278 | 57235c10bbb848069b5ac784a4440ff9cf783653 | ColacX/SuperSoup | /SuperSoup/shared/CircularBuffer.hpp | C++ | hpp | 1,278 | no_license | //non-blocking-queue, ideal for one producer and one consumer, can r/w at the same time without blocking.
//take caution when using this class.
//some things to read about:
//CAS compare and swap atomic operation.
//volatile keyword assures that there is no reordering when compiler does optimization, assures that a wri... |
adf18b9944fe33aa5edd5b33d25ebfaf60e3a7ca | f7a49285326760f2e840302743c16bd385bce139 | Unknow-man/mfc-4 | /Advanced MFC Programming/Chap8/8.9/Gdi/GDIView.cpp | C++ | cpp | 2,356 | no_license | #include "stdafx.h"
#include "GDI.h"
#include "GDIDoc.h"
#include "GDIView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
IMPLEMENT_DYNCREATE(CGDIView, CView)
BEGIN_MESSAGE_MAP(CGDIView, CView)
//{{AFX_MSG_MAP(CGDIView)
//}}AFX_MSG_MAP
ON_COMMAND... |
1de626a905b10fa08d3f2f15e6de5041f26e36e8 | 9d390b03de3926fbf9224985e37cb681c4cffb44 | yeates/ACM | /各大OJ/CodeForces/#403 Div.2/2.cpp | C++ | cpp | 1,423 | no_license | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORD(i, a, b) for (int i = (a); i >= (b); i--)
#define MS(vis) memset(vis, 0, sizeof(vis));
#define REP(i, a) FOR(i, 0, (int)(a) - 1)
#define pb push_back
#define pi acos(-1)
#define Max(a, b) a > b ? a: b
#def... |
6ff695103e2a3f4e9a01d9d562c926068a471299 | 50c6e102f44a5f3c6b1ece0769a0427625526bc4 | nikobockerman/pioneer-dreamteam | /competition/src/common/functions.cpp | C++ | cpp | 2,508 | no_license | /*
Copyright (c) 2012, <copyright holder> <email>
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, ... |
85e5ceaa83ad30a5f600c08ac42d124467554103 | 8ce6de3b37712b7b7ad1ce8e90b1e8f21ec2fbb4 | hazelnusse/MoreConcurrentThinking | /class_files/msqueue.cpp | C++ | cpp | 2,157 | no_license | #include <atomic>
#include <optional>
#include <chrono>
#include <thread>
#include <iostream>
template <typename T> class queue {
struct node {
std::optional<T> value;
std::atomic<node *> next{nullptr};
};
std::atomic<node *> head, tail;
public:
queue() : head(new node), tail(head.load()) {}
void pu... |
28ec701be6b42cac8a015fd7ee32d3028f07fb39 | 7cec98233dc5f4984b35997ba2f706f89e9d6a55 | benedikttomaselli/volvis | /visualisierung1_vs2013/src/VolumeRender.cpp | C++ | cpp | 3,723 | no_license | #include "VolumeRender.h"
#include "Volume.h"
#include "GradientShading.h"
using namespace std;
VolumeRender::VolumeRender(GradientShading* grad)
{
gradient = grad;
}
VolumeRender::VolumeRender(){
}
//draws the volume
void VolumeRender::drawVolume(QImage* image, QLabel* label, bool invert, bool alt, int step, Vi... |
0f34c9c04d5b8aa2f685674843a88d51852d18ea | 770aed7ac0b8deabd5261993721e696c38aec2bd | avocadoboi/AvoExplorer | /Source/utilities.hpp | C++ | hpp | 1,085 | no_license | #pragma once
#include <AvoGUI.hpp>
#include <Windows.h>
#undef max
#undef min
//------------------------------
namespace ThemeColors = Avo::ThemeColors;
namespace ThemeEasings = Avo::ThemeEasings;
using Avo::Id;
//------------------------------
constexpr float operator "" grid(long double p_value)
{
return p_valu... |
4d1b0f27451b71ab1a97e665484ce237d65dacee | fe6e7981bbded7e647af7125c6294c128d679494 | alfaceor/programming-examples | /Cpp/Dlib/bayes_net_ex.cpp | C++ | cpp | 13,062 | no_license | // The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt
/*
This is an example illustrating the use of the Bayesian Network
inference utilities found in the dlib C++ library.
In this example all the nodes in the Bayesian network are
boolean variables. That is, ... |
11fc6cfb0b27c58e2ba48fa4b115ce3af4b6ad26 | b899f0ca1b9e25ace9bcc63474067568045ab31a | vslavik/poedit | /deps/boost/libs/hana/test/index_if.cpp | C++ | cpp | 1,342 | permissive | // Copyright Louis Dionne 2013-2017
// Copyright Jason Rice 2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/index_if.hpp>
#include <boost/hana/integral_constant.hpp>
#include <cstddef>
#include <s... |
2ccde04d3574c4e768e1db6d96d7ea0d56568153 | 225174cb82efdbe1c4b107b1c3b25f09b0a9a5d0 | AndyAlpha/chromium-crosswalk | /chrome/common/crash_keys.cc | C++ | cc | 11,028 | permissive | // 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 "chrome/common/crash_keys.h"
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/l... |
ccbae74403b40e2096f3c92115f04883866e2543 | 1d21d0d639306dc7ddab65b1d29ba7b6335965ab | jrefsgaard/neural | /source/neural/Teacher.cpp | C++ | cpp | 383 | no_license | #include <neural/Teacher.h>
using namespace std;
namespace neural {
Teacher::Teacher(string cost)
{
costFunction = unique_ptr<CostFunction>(CostFunction::Create(cost));
}
void Teacher::SetCostFunction(std::string cost)
{
costFunction = unique_ptr<CostFunction>(CostFunction::Create(cost));
}
CostFunction & Teac... |
c6c1729acc4903253e88a0a0c9a03aeac563cf03 | 00d872beb5e7cbb64ca9cbc46e3ea1e55f3165b8 | eaglexmw/seafile-client | /src/rpc/rpc-client.cpp | C++ | cpp | 23,534 | permissive | extern "C" {
#include <searpc-client.h>
#include <ccnet.h>
#include <searpc.h>
#include <seafile/seafile.h>
#include <seafile/seafile-object.h>
}
#include <QtDebug>
#include "seafile-applet.h"
#include "configurator.h"
#include "settings-mgr.h"
#include "utils/utils.h"
#include "local-repo.h"
#include "clone-task.h... |
e83b4f8ceb5d53e9ddaeded118446d373ff154ef | a89bac973df4a8d98d6e62d7f19fefcadd6933c0 | UT-LCA/scale-cnn | /vtr/small/layers/tdf10/r4_o1/tdf10.cpp | C++ | cpp | 13,533 | permissive | #include "global_defines.h"
#include "tdf10_impl_defines.h"
#include <stdbool.h>
#include <assert.h>
#include "tdf10_conv_stages.h"
// Multiplies the intermediate feature maps with the second-layer
// filters. OCHAN_SCALE_FACTOR is an integer factor of the number
// of input channels. The k parameter tells us which gr... |
68e90245bee6b4b85a8536eb12b354d32ff7496f | 4e0027600135c9645cca7a17ffa655b7abd5b201 | sxs-collaboration/spectre | /tests/Unit/Parallel/Test_AlgorithmNodelock.cpp | C++ | cpp | 14,699 | permissive | // Distributed under the MIT License.
// See LICENSE.txt for details.
#include "Framework/TestingFramework.hpp"
#include <algorithm>
#include <cstddef>
#include <optional>
#include <string>
#include <tuple>
#include <unordered_set>
#include <vector>
#include "DataStructures/DataBox/DataBox.hpp"
#include "DataStructu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.