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
7a7a96090e8329943c2a310a0b1f2b7bf84db482
fcb037f07c0707f55f76d76c9b4141addd114c45
AdrianoDee/cmssw
/HeterogeneousCore/AlpakaCore/src/alpaka/EDMetadata.cc
C++
cc
2,484
permissive
#include "FWCore/Utilities/interface/EDMException.h" #include "HeterogeneousCore/AlpakaCore/interface/alpaka/EDMetadata.h" namespace ALPAKA_ACCELERATOR_NAMESPACE { #ifndef ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLED EDMetadata::~EDMetadata() { // Make sure that the production of the product in the GPU is // complete ...
f2c3b1a4e0a3c52c018f460cec03eedfa8f789b1
1430bf8a096671558a9bfbcc10e5f4eb617265c1
plusk01/tests
/threads/src/main.cpp
C++
cpp
1,407
no_license
/** * Producer-Comsumer example, written in C++ May 4, 2014 * Compiled on OSX 10.9, using: * g++ -std=c++11 producer_consumer.cpp **/ #include <iostream> #include <thread> #include <mutex> #include <condition_variable> #include <chrono> std::mutex mtx; std::condition_variable...
dc7d07e80f6d4536976f93e43e6719e6972c7a33
0fa5b6d38a7851ba386b984649842c5418a47f60
open-space-collective/open-space-toolkit-physics
/src/OpenSpaceToolkit/Physics/Coordinate/Frame.cpp
C++
cpp
15,455
permissive
/// Apache License 2.0 #include <OpenSpaceToolkit/Core/Error.hpp> #include <OpenSpaceToolkit/Core/Utilities.hpp> #include <OpenSpaceToolkit/Physics/Coordinate/Frame.hpp> #include <OpenSpaceToolkit/Physics/Coordinate/Frame/Manager.hpp> #include <OpenSpaceToolkit/Physics/Coordinate/Frame/Providers/CIRF.hpp> #include <O...
477cec3bb7971d8324fa34d85d86b2e83d2bc136
1f0e1a0bd6df3653c5765181725281da004c1205
aghiles/microexr
/src/scanlineblock.cpp
C++
cpp
1,135
no_license
/******************************************************************************/ /* */ /* Copyright (c) 2011, DNA Research, the 3Delight Developers. */ /* All Rights Reserved. ...
c52dd2ae4888fda4bbf08edae99b6cffb1bf2be2
98d0947b7eabe8df8ed24efb49f6f3c5df06a0c7
ronggangzhishen/hw
/C/parellel/lab2/lab2.cpp
C++
cpp
3,719
no_license
#include <stdio.h> #include <mpi.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <time.h> #define v_max 20 //车辆最高速度 #define car_num 1000000 //车辆数 #define cycle 300 //周期数 #define p 0.5 //随机减速的概率 int main(int argc, char* argv[]) { int size, rank; //int car_num = 100, cycle ...
272439fbc18f92a56690f8dfb3421411c81227aa
01cfdcd323cda136605e208dba9b119c05687ece
kaclok/GravityEngine
/GEngine/GDxRenderer/Private/GDxRenderer.cpp
C++
cpp
151,066
no_license
#include "stdafx.h" #include "GDxRenderer.h" #include "GDxRendererFactory.h" #include "GDxTexture.h" #include "GDxFloat4.h" #include "GDxFloat4x4.h" #include "GDxFilmboxManager.h" #include "GDxMesh.h" #include "GDxSceneObject.h" #include "GDxInputLayout.h" #include "GDxShaderManager.h" #include "GDxStaticVIBuffer.h" #...
3955afcbf262fd2c84e0b37541a05625b71b4388
fd59ff30ae68e2420d0c54f7e5c8a36632516827
sasadirin/Jackpot-Game
/Labaratornaya4/Labaratornaya4/Labaratornaya4/CMainDlg.cpp
C++
cpp
8,112
no_license
// CMainDlg.cpp : файл реализации // #include "stdafx.h" #include "Labaratornaya4.h" #include "CMainDlg.h" #include "afxdialogex.h" #include <ctime> #include <cstdlib> #include <string> #ifdef _DEBUG #define new DEBUG_NEW #endif // Диалоговое окно CAboutDlg используется для описания сведений о приложении class CAb...
0ed8c1580c0c4c1889b7e7008b2280664839a538
bc04acb2599a695267bcb0b888c373715a5ced1e
ydk1104/PS
/boj/10000~10999/10825.cpp
C++
cpp
692
no_license
#include<stdio.h> #include<string.h> #include<algorithm> using namespace std; class students{ public: char name[15]; int score[3]; // korean, english, math void scan(){ scanf("%s", &name); for(int i=0; i<3; i++)scanf("%d", &score[i]); } bool operator <(students &x){ for(int i=0; i<3; i++){ if(this->sco...
6792877e772a6c61d62d7ae76854d2b6625e093c
788b7250308031b3583537ac23e2d8d8ef073666
lycion/genex-project
/src/qt/paymentrequestplus.cpp
C++
cpp
7,987
permissive
// Copyright (c) 2011-2017 The Genex Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // // Wraps dumb protocol buffer paymentRequest // with some extra methods // #include <qt/paymentrequestplus.h> #include <ut...
3725015cf9841470066691d5025a08cb4fdb5e87
d7351f8e64ac7f4f4f73545ce39d3ad330491004
InsightSoftwareConsortium/itk-wasm
/include/itkWasmMesh.hxx
C++
hxx
1,098
permissive
/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.o...
df3b3f8af8fabb0a235d882c1b8a4d21456aa358
55c4e5e0cd711e2819f2faef640346c13ff5ce8e
Nanatysy/CPPbasics
/cpp01/ex03/Weapon.hpp
C++
hpp
276
no_license
#ifndef CPP01_WEAPON_H #define CPP01_WEAPON_H #include <string> class Weapon { private: std::string _type; public: Weapon(); Weapon(std::string type); ~Weapon(); void setType(const std::string &type); const std::string &getType() const; }; #endif //CPP01_WEAPON_H
0bd8e56efa1f381872578e7d70e9e90f392a9ff3
491f4cffcc162ab218b4fef69193ef644beada4f
gKevinK/LeetCode
/864_Shortest_Path_to_Get_All_Keys.cpp
C++
cpp
1,507
no_license
class Solution { public: int shortestPathAllKeys(vector<string>& grid) { int dir[] = { -1, 0, 1, 0, -1 }; int M = grid.size(), N = grid[0].size(), K = 0; queue<pair<int, int>> q; for (int i = 0; i < M; ++i) for (int j = 0; j < N; ++j) { if (grid[i][j] == '@') q.push({ i *...
b70262db362d900761ba5b9c274b5bd923740935
5e600bff65ac3b23aa67424cbe1b1baa535b6344
OctopusLian/Dictionary-of-function-algorithms
/17_12/17_12.cpp
C++
cpp
893
no_license
#include <iostream> #include <set> using namespace std; void IsElem(set<char> s,char,char); void NotElem(set<char>,char,char); void main () { set<char> myset; set<char>::iterator it; int i; //初始化集合:A C E G I for (i=0; i<10; i+=2) myset.insert(i+'A'); cout<<"集合中的元素:"; for(it=myset.begin();it!=m...
fbf45040c4cb8965944e25fea9f72854881fb0b1
02e4262c2a7f39825f08242ef184ac965e63b6c9
zaccone/algorithms
/stack/stack.cc
C++
cc
1,529
permissive
#include <iostream> using namespace std; namespace maro { struct node { int val; node* next; node* prev; }; class Stack { private: size_t size_; node* head; public: Stack() { size_ = 0; head = new node; ...
7683e1dedeb567aaa4c12c5af59391b71b9a7717
4e97ac1fcc8480f195067485a5daf96e7ccf8ea2
gopa810/SamskaraTimes
/RichEditResults.cpp
C++
cpp
4,083
no_license
// RichEditResults.cpp : implementation file // #include "stdafx.h" #include "vcal5beta.h" #include "RichEditResults.h" #include "FrameMain.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// ...
edade9b42d4725d8022cd62458e56a14a5fb60b1
9816071bd3656a6f6874b3590f19144cbe2e43b8
WhiZTiM/coliru
/Archive2/25/cac5a0238b1f85/main.cpp
C++
cpp
700
no_license
# include <chrono> # include <iostream> # include <thread> # include <mutex> void displayDataFromFile() { std::cout << "FROM file!" << std::endl; } bool askContinueWaiting(const char * message) { std::cout << message << std::endl; return true; } void f() { std::timed_mutex fileMutex; // … whil...
9ead2ce950ff92185b854d60c61ccd4a01ddbf69
16d07a88dea8f133dfd8bba2e7666dd413b7d593
jamiepg1/Smoothieware
/src/modules/tools/laser/Laser.cpp
C++
cpp
5,066
no_license
/* This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, eithe...
db590da25e5ed7c969c596991fcaca72bb500c37
8579951e6e042d4f881f2682e1a1cb307afb122a
github1youlc/short_msg
/client/client_emulator.cpp
C++
cpp
558
no_license
#include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; //#ifdef __cplusplus //extern "C" { //#endif //#include "socketConnect.h" // //#ifdef __cplusplus //} //#endif int main(){ //int port = 8000; //int client_sockfd = createClientSocket("localhost", port); if (client_sockfd == -1) { p...
dee7f59383848e49dc8b1ee95acffbec81ad9b22
1e83bc97ecb693c684ded26a06e46e579f5086a9
ric2b/Vivaldi-browser
/chromium/third_party/blink/renderer/core/paint/object_painter.cc
C++
cc
4,909
permissive
// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/paint/object_painter.h" #include "third_party/blink/renderer/core/layout/layout_block.h" #include "third_party/blink/renderer/core/la...
70761af4668552f3f42d39d495249af8ac8092f5
957e557d34dfd5f45a465529021c9664ab9fdfdc
AFGhazy/prep
/design.cpp
C++
cpp
9,524
no_license
#include<bits/stdc++.h> using namespace std; class LRUCache { public: const int capacity; list<pair<int,int>> l; unordered_map<int, list<pair<int,int > >::iterator> m; int remove(list<pair<int,int > >::iterator it) { int key = it->first; int val = it->second; l.erase(it); ...
7d21e4342c85fc5289adb6018b8f5f9e278229a4
3f4cc66fe0a2659f28ea4432e6f8b62ad57ad0c0
jackgopack4/pico-blast
/source/src/app/cn3d/command_processor.hpp
C++
hpp
3,088
no_license
/* $Id: command_processor.hpp 103491 2007-05-04 17:18:18Z kazimird $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government...
9728d85aeb7e920789bcaae6b11c7c74473fb355
4fe9e4f2e9ca6b4fdcbd4065cd820b46e954f48d
alexandraback/datacollection
/solutions_2463486_1/C++/kobra/main.cpp
C++
cpp
1,205
no_license
#include <iostream> #include <cstdio> #include <cmath> #include <queue> #include <stack> #include <vector> #include <map> #include <set> #include <algorithm> #include <deque> #include <memory.h> #include <string> #include <cstring> #include <regex> using namespace std; bool isPalindrom(long long a){ vector<int> p...
bc12492b73be776b59e9d889ee8687c6d8b76dc7
8f58daf050a54808838148f220bdcb7820e11ea9
david-antiteum/consulcpp
/src/Catalog.cpp
C++
cpp
1,835
permissive
#include "consulcpp/Catalog.h" #include "consulcpp/Service.h" #include "consulcpp/Consul.h" #include "internal/HttpClient.h" struct consulcpp::Catalog::Private { consulcpp::Consul & mConsul; explicit Private( Consul & consul ) : mConsul( consul ) { } std::string api() const { return fmt::format( "{}/{}/c...
0146759eb55445d0401e782280c55c355be42371
013f4d7380f1788157ce8838f0d41ec3738fb8d6
ksspb/curler
/src/curl_client.cc
C++
cc
4,355
no_license
#define CURL_CLIENT #include "curl_client.h" CurlClient::CurlClient() {} CurlClient::~CurlClient() {} curl_response CurlClient::Request(curl_request request) { curl_response response; CURL *curl_handle = curl_easy_init(); /* set request URL */ curl_easy_setopt(curl_handle, CURLOPT_URL, request.url.c_str()); ...
703b9f6d083af38b8ee1f4cefb6b9fc4296f00fa
0a5984dda7e086558af0d919b0875d2cf745adc6
higgsch/CS6300
/Optimizations/MaximizeBlocks/MaximizeBlocks.cpp
C++
cpp
1,717
no_license
#include <algorithm> #include "MaximizeBlocks.hpp" #include "AST/BasicBlock.hpp" #include "AST/ThreeAddressInstruction.hpp" #include "VisitedBlocks.hpp" #include "NumParents.hpp" void cs6300::maximizeBlocks(cs6300::FlowGraph& original) { // traverse the blocks auto vb = VisitedBlocks::instance(); vb->reset(); ...
31a0cd20a8b2b7616e000422ed9b2bc94af197a2
da0b8673659bfc5e9135fa1f7d5879a1684b5994
brucezhang80/simple-cpp-win32
/inc/simple-win32/wdf_fs.cpp
C++
cpp
3,630
permissive
#include <cassert> #include <memory> #include <windows.h> #include <shlwapi.h> #include "simple/string.h" #include "wdf.h" #include "wdf_fs.h" WDF_FileSystem::WDF_FileSystem(bool bUseOSFile) : use_os_file_(bUseOSFile) { } bool WDF_FileSystem::GetUsingOSFile() { return use_os_file_; } void WDF_FileSystem::...
7f6b5b97b763d4f36dae89c2f7378c3f84a62bc7
ed7a35d987b5a6e6944025ded2b5b330db36d605
egor2116x/Database
/DataBase/DataBase/main.cpp
C++
cpp
3,872
no_license
#include "DataBase.h" #include "IReadWriter.h" int main() { try { // create data base and table example std::unique_ptr<DataBase> base(new DataBase("testBase")); TableInfo info = { base->GetValidTableId(), "TestTable" }; std::unique_ptr<Table> table(new Table(info)); ...
65f608927eccde5ed05658bb485d70d165ace654
843b14eb336639732ea7dd112ba62db8d16046e5
xinqiaozhang/ahir
/v2/libAhirV2/src/vcControlPath.cpp
C++
cpp
113,375
permissive
// // Copyright (C) 2010-: Madhav P. Desai // All Rights Reserved. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal with the Software without restriction, including // without limitation the rights to...
1618eb9f2e91dd612c274d14b6085ebb692a16aa
28e8956821499420d704382e6638a0f7f6de8575
jinrongsyb17/homework-space
/郭明君/第5次-2017310232-郭明君-金融实验17/8-7.cpp
C++
cpp
1,101
no_license
// 8-7.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std; class Point { public: Point&operator++(); Point operator++(int); Point&operator--(); Point operator--(int); Point() { _x = _y = 0; } int x() { return _x ; } int y() { return _y ; } ...
7da635018bf0c3b81259749cc724e40281c0ae0d
9fe1b23064ceabd2a2255512112da7a4b3dc0f85
goelashwin36/coding-interviews-prep
/Trees/BT/rightView.cpp
C++
cpp
1,427
permissive
/* * Author: Ashwin Goel */ #include <bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) : ...
6da70142196c733456dbafaddf4bfdeb61be8b8f
7aac7cebda92042665ec55f10140bd74119a76a5
kdhgus92/CPP-programming
/ch11/ConvToObject.cpp
C++
cpp
436
no_license
#include <iostream> using namespace std; class Number { private: int num; public: Number(int n = 0) : num(n) { cout << "Number(int n=0)" << endl; } Number& operator=(const Number& ref) { cout << "operator=()" << endl; num = ref.num; return *this; } void ShowNumber() { cout << num << endl; } }; int mai...
1ee533ae6ed271895a7c56bf962a96879a39c653
54b7c901b2b9ef8bb38ba5f33af141a5634d009e
hemeraos/hyperdrive
/transports/http/httptransportcallbackmanager.cpp
C++
cpp
3,652
permissive
#include "httptransportcallbackmanager.h" #include "httptransportcallback.h" #include "httptransportcallbackhost.h" #include <cachemessage.h> #include <QtCore/QLoggingCategory> #include <QtNetwork/QNetworkAccessManager> #include <QtNetwork/QNetworkReply> #include <HemeraCore/CommonOperations> #include <HemeraCore/...
6d52322f297d155f20191ad5878fcd5d963da747
e6d7ea8e2e7bc907a36e58bd12a7552d2c47831d
majidini/libed2k
/src/peer_connection.cpp
C++
cpp
78,188
no_license
#include <boost/foreach.hpp> #include <boost/format.hpp> #include <boost/algorithm/string/join.hpp> #include "libed2k/storage.hpp" #include "libed2k/peer_connection.hpp" #include "libed2k/session_impl.hpp" #include "libed2k/transfer.hpp" #include "libed2k/file.hpp" #include "libed2k/util.hpp" #include "libed2k/alert_t...
5c260219f820f8f3ad171c22b5c5e77d6a4ef0af
fa8addcad6fabbf2f4f789ba0733c050b51a6c44
rochowiak86/AFE-Firmware
/core/lib/AFE-APIs/AFE-API-HTTP.cpp
C++
cpp
27,890
permissive
/* AFE Firmware for smarthome devices, More info: https://afe.smartnydom.pl/ */ #include "AFE-API-HTTP.h" AFEAPIHTTP::AFEAPIHTTP() {} /* Initializing class */ #ifdef AFE_CONFIG_API_DOMOTICZ_ENABLED void AFEAPIHTTP::begin(AFEDevice *Device, AFEWebServer *HTTPServer, AFEDataAccess *Data, AFEAPIM...
a70642342f64308c8a7604e410530cdaeffc8e42
ff2f431139a45c2eb592f356f4739b563f5e2812
KanadeSiina/PracticeCode
/201906_practice/sa/cc.cpp
C++
cpp
1,156
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; #ifndef ONLINE_JUDGE #define dbg(x...) do{cout << "\033[32;1m" << #x << "->" ; err(x);} while(0) void err(){cout << "\033[39;0m" << endl;} template<template<typename...> class T,typename t,typename... A> void err(T<t> a,A... x){for (auto v:a) cout << v...
aa25d7ce3d1eea4742073600cf196ff49ef5b062
88b061b6c2197a669310cc6dbb6ae181af03d2cf
Ezekieldor/Problems-URI
/2729.cpp
C++
cpp
446
no_license
#include <bits/stdc++.h> using namespace std; int main () { string str; map <string, int> mp; map <string, int>::iterator it; int t; char c; scanf ("%d", &t); while (t--) { while (true) { cin >> str; mp[str]++; c = getchar (); if (c == '\n' || c == EOF) break; } it = mp.begin (); cou...
a63bed61ca4a550b47b7a476d409233287d7fa9b
6c80d4266ef299a12fd4dfee16949c9ad8a7f694
gautam1858/tensorflow
/tensorflow/compiler/aot/codegen.cc
C++
cc
33,113
permissive
/* Copyright 2017 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...
ddb9df7b1fcf6024048476b294eab0885960deda
607d346c6e3421b2c07eecbfce6c94d5b384f9e9
narisu/gotcloud
/src/bamUtil/src/TrimBam.cpp
C++
cpp
8,695
no_license
/* * Copyright (C) 2010-2012 Regents of the University of Michigan, * Hyun Min Kang * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of ...
77079c93c8296be60f4e05e6a2432f650da0aebe
4b6963772cf42e9f6cea2bf771209028d382d493
hw233/xiangjingchuangshuo_server-c-
/SuperServer/SuperServer.cpp
C++
cpp
4,186
no_license
#include <iostream> #include "SuperServer.h" #include "RegCmd.h" #include "xXMLParser.h" #include "xNetProcessor.h" #include "xExecutionTime.h" #include "RegCmd.h" #include "SystemCmd.pb.h" #include "GateInfo.h" #include "MsgManager.h" //SuperServer *thisServer = 0; SuperServer::SuperServer(OptArgs &args):ZoneServer(...
66e6a49dc120b26c88a5c1f3ccf1aa8cfd25c780
1adbb51424a6df3db4a40b1d6f27889ca62f9893
MichaelHDesigns/HDLC
/src/test/rpc_wallet_tests.cpp
C++
cpp
8,563
permissive
// Copyright (c) 2013-2014 The HodlCash Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpcserver.h" #include "rpcclient.h" #include "base58.h" #include "wallet.h" #include <boost/algorithm/string...
54c3c8674a247b964dfca09c2f840663970f635d
59ef47cc0166ef21f9ad1317b1838a1d9e436d75
smeenai/llvm-project
/clang/lib/Tooling/CommonOptionsParser.cpp
C++
cpp
7,243
permissive
//===--- CommonOptionsParser.cpp - common options for clang tools ---------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
251ba01782a3da9ace87fa31f47ed40bdf898962
ec4965d960ba95c802c72522d123d5b4535b8940
woeesky/STM32_12Way_Irrigation_Controller
/STM32_12Way_Irrigation_ControllerV2.0.0_beta/ModbusSerial.cpp
C++
cpp
6,490
no_license
/* ModbusSerial.cpp - Source for Modbus Serial Library Copyright (C) 2014 André Sarmento Barbosa */ #include "ModbusSerial.h" //自己加的 unsigned char G_modbusPacket[20] = { 0x00 }; int G_modbusPacket_Length = 0; ModbusSerial::ModbusSerial() { } bool ModbusSerial::setSlaveId(byte slaveId){ _slaveId = slave...
8c8d6ef9ca3085e7edc4cfa6998ff21a1e72615d
ec6a5a73fb817b57246f03b0375e9e98ac5515bd
jairoMolina9/csc381-cpp
/Project 5/SM.cpp
C++
cpp
2,675
no_license
#include "SafeArray.cpp" template <class T> class SM { private: int low_, high_, sa_low_, sa_high_; SA<T>* matrix_; public: // default constructor // allows for writing Matrix a; SM() { low_ = sa_low_ = 0; high_ = sa_high_ = -1; matrix_ = NULL; } // 2 parameter constructor let us w...
70311b70a10f97097362ca8e2ed2700b69629bfd
3cd39f2a14aaaeb3bcff5e65e346d445464609be
wichtounet/eddic
/src/asm/StringConverter.cpp
C++
cpp
2,790
permissive
//======================================================================= // Copyright Baptiste Wicht 2011-2016. // Distributed under the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //======================================================================= #include ...
16030ddea505c0d3edba865386720b09e9a81ade
1d3180e807560d2fe704dd7888fa486308e78dbe
h2oai/daal
/algorithms/kernel/neural_networks/layers/pooling2d_layer/forward/maximum_pooling2d_layer_forward_fpt.cpp
C++
cpp
3,241
permissive
/* file: maximum_pooling2d_layer_forward_fpt.cpp */ /******************************************************************************* * Copyright 2014-2017 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ob...
9faea79bf58fe73d7e5c1ca9554d78c9fbccb357
e3c38a3220eb2d5d43d71950ab70a3ac87c480de
Beasalman/mef
/mef02-c07/ensmat.cpp
C++
cpp
705
no_license
#include "ensmat.h" /* -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- */ void ensmat (vector <int> ind, Matrix2d aelt, SparseMatrix <double> &a) { /* ENSMAT: Ensamblado de una matriz hueca. Entradas: - ind: índices de las posiciones en la matriz global...
e52393ef046a75c82af3efd3d9d039eab03c8e8a
9b9f91932f7933f31ad51495f9796c4c7e1a3c1a
Damdoshi/LibLapin
/src/sound/load_music.cpp
C++
cpp
1,538
permissive
// Jason Brillante "Damdoshi" // Hanged Bunny Studio 2014-2018 // // Bibliotheque Lapin #include <string.h> #include "lapin_private.h" #define PATTERN "%s -> %p" t_bunny_music *bunny_read_music(t_bunny_configuration *cnf) { t_bunny_sound *pc = NULL; if (bunny_set_sound_attribute(NULL, &pc, &cnf, true) ==...
305874962059da227f48c44b9d362c13d5c5dcc2
b9b1a815126bbfe1275d8298ec0b49e14232f2a9
jonasfj/libreoffice-writer
/sw/source/core/layout/colfrm.cxx
C++
cxx
16,142
no_license
/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * Open...
3897dba209bb0dd1fc99d69a3320198e5c88d6c3
1894cdbd7c5153f276ebd7e6618558bc499bb11f
alihitawala/CompetitiveProgramming
/Vim/SEAVOTE.cc
C++
cc
557
no_license
#include <iostream> using namespace std; int main() { size_t T; cin >> T; for (size_t caseNum = 1; caseNum <= T; ++caseNum) { size_t N; cin >> N; size_t free = N; size_t total = 0; for (size_t i = 0; i < N; ++i) { size_t cur; c...
df4213dc17b271fcb9f182278f241dcc5092b570
1ea4acda14e750cc139d4a7b7d3c85a3572e2096
crouchingtigre/turicreate
/test/fileio/s3api_test.cxx
C++
cxx
2,286
permissive
#define BOOST_TEST_MODULE #include <boost/test/unit_test.hpp> #include <core/util/test_macros.hpp> #include <core/storage/fileio/s3_api.hpp> BOOST_TEST_DONT_PRINT_LOG_VALUE(turi::s3url) using namespace turi; struct s3api_test { public: void test_parse_s3url(void) { s3url out; // {access_key_id, secret_key, bu...
0638697019e154294998f07981958a0c25f17ff0
d0990c0586b47942504175a12949fb772da3b62c
zslwyuan/LLVM-9-for-Light-HLS
/LLVM_src/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp
C++
cpp
3,544
permissive
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
b27a9812525c2e87cd2d2228bde5d09a0adfae49
0cb06352638040b89dd377dc72dce31341a68749
Topstack-first/20210521_directx_laghaim
/start_project/Laghaim_Client/LoadEffectSound.cpp
C++
cpp
19,041
no_license
#include "stdafx.h" #include "DirtSnd.h" #include "LoadEffectSound.h" #include "IndexedTexture.h" #include "country.h" extern DWORD g_dwClientCountry; extern BOOL g_ThaiClient; extern BOOL g_bUseMatrixCountry; // 매트릭스(뫼비우스 아레나)가 도입된 나라인가의 플래그.(도입 안된나라는 뫼비우스 데이터를 패치 안해주기 때문에 이게 FALSE여야한다.) ///해외뫼비우스 int g_EffectSoun...
4643f478b3cb0c1696179d851c746676e47a2749
e07f3f653be89f2f96bb240cdfeb249fb1e9137a
pach/ofLaserLiveTool
/src/AnimatedStuff.cpp
C++
cpp
4,092
permissive
// // AnimatedStuff.cpp // LaserAnimTool // // Created by pach on 29/05/14. // Copyright (c) 2014 __MyCompanyName__. All rights reserved. // #include "AnimatedStuff.h" AnimatedStuff::AnimatedStuff(){ } AnimatedStuff::~AnimatedStuff(){ delete gui; } void AnimatedStuff::showGui(bool show){ gui->...
0b9d046796f654421cfc8f0aeb45bb7f38691e03
a356473173e618a7f919213bc319163f6f87928d
BalzGuenat/Envision
/OOInteraction/src/commands/CAddCalleesToView.cpp
C++
cpp
2,488
permissive
/*********************************************************************************************************************** ** ** Copyright (c) 2015 ETH Zurich ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ** following c...
4855912c5ec684b7d3e6d60e9f3631c67551ff24
8e7de63dfefa4a8f39a5d214b2034d84c362c22b
connectthefuture/psdmrepo
/pypdsdata/trunk/pyext/types/cspad/ElementV1.cpp
C++
cpp
5,786
no_license
//-------------------------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Class ElementV1... // // Author List: // Andrei Salnikov // //------------------------------------------------------------------------ //----------------------- // This Clas...
e704934a55b3d6697c2d1686c9d4d229e176bb00
f5d1d433bfa555f30c5f3aa55a0a0ccd99aa7081
zeph1912/milkomeda_chromium
/components/offline_pages/core/model/get_pages_task_unittest.cc
C++
cc
10,701
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/offline_pages/core/model/get_pages_task.h" #include <stdint.h> #include <utility> #include "base/memory/ref_counted.h" #include "b...
4545f666d64ef6ab98b72ef468eee04bdc685e7b
ff5f316aaa57e3d0a9b6eaddff04f38e317811bc
PMArkive/Project_CTR
/ctrtool/deps/libtoolchain/src/crypto/Sha256Generator.cpp
C++
cpp
471
permissive
#include <tc/crypto/Sha256Generator.h> const std::array<byte_t, tc::crypto::Sha256Generator::kAsn1OidDataSize> tc::crypto::Sha256Generator::kAsn1OidData = {0x30, 0x31, 0x30, 0x0D, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20}; void tc::crypto::GenerateSha256Hash(byte_t* has...
83fafc758979811f46cd85819c782774d5abdffa
e0e147c956cea020c539fc76caccc8d17c321b3b
PcloD/imsss
/GgPointShader.cpp
C++
cpp
1,199
permissive
/* ** 点を球として表示する */ #include "GgPointShader.h" // コンストラクタ gg::GgPointShader::GgPointShader(const char *vert, const char *frag, const char *geom, GLint nvarying, const char **varyings) : GgShader(vert, frag, geom, nvarying, varyings) { // プログラム名 GLuint program = get(); // 変換行列の uniform 変数の場所 loc.mc = glGet...
c01f92cabeab6ab5e6f766747c4187e901e9281e
b0cd8d9030e95672aae3d37cb3e4632b4c5b0632
mikehelmick/teaching
/uc/computerScience2/fall2013/liveDemos/week05/copy.cpp
C++
cpp
774
permissive
#include <iostream> #include <string> using namespace std; class StringWrapper { public: StringWrapper(string &str) { data = str; } StringWrapper(StringWrapper &that) { data = that.data; } void append(string &additional) { data.append(additional); } void inspect() { cout << "&data: " <...
5e43b2cc2ef879c354ab43e1510da8e45668c7e5
5b5fcf32e7db5c95198e1008b4806e89c4548090
tiankonguse/leetcode-solutions
/problemset-new/009/00993-cousins-in-binary-tree/993.cpp
C++
cpp
4,303
no_license
#include <bits/stdc++.h> #include "base.h" using namespace std; typedef __int128_t int128; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int, int> pii; typedef vector<pii> vpii; typedef long long ll; typedef pair<ll, ll> pll; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<pll> vpll...
64a9b417c5dfe49314e6a84d30186163eebe5993
bef710ad6d573d5ed99e499dabdcf1eb1ff687dd
SinimaWath/homework
/Информатика_И_Основы_Программирования/lab9/print.cpp
C++
cpp
1,012
no_license
#include "print.h" void print_matrix(long double **matrix, int nrow, int ncol, int prec, Format_Print format){ int w; switch (format){ case FIXED: cout << fixed; w = prec + 5; break; case SCIENTIFIC: cout << scientific; w = prec + 9; ...
a004f1ec1f4cf1d51b214fad268de11babfeb4dc
e1d6e3c13c86d5588bc42e0a9755b1a5939337f4
mizutoki79/AOJ
/ITP_IntroductionToProgramming/ITP1_7_D_MatrixMultiplication.cpp
C++
cpp
1,065
no_license
//$g++ main.cpp - compile //$./a.out - run #include <iostream> #include <string> using namespace std; int main(){ int size = 100; long matrixA[size][size]; long matrixB[size][size]; long matrixC[size][size]; for(int i = 0; i < size; i++){ for(int j = 0; j < size; j++){ matrixA[i...
842832f8bcfcb3804620b18c792f717ea48f7416
ae992a8a6c42b7bd66ad00ef1cac3342edcb98af
phuang/chromium
/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc
C++
cc
70,406
permissive
/* * Copyright (C) 2011 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: * * 1. Redistributions of source code must retain the above copyright * notice, this list of condit...
ac2fa736c75e74d40f31c952d1979ef6b8b26d59
ccfc950677af15ef5b49ab99fe4eea0d7314953a
hex-hex/ZxLib
/GDAL/include/xercesc/dom/deprecated/DOMStringImpl.hpp
C++
hpp
3,226
permissive
#ifndef DOMStringImpl_HEADER_GUARD_ #define DOMStringImpl_HEADER_GUARD_ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses thi...
7dfe1e925b410e74144a7c018801c5606ff4d7d0
e9b19786cdc3e2707afeccd6343bd8089b5982f0
A-Ribeiro/OpenGLStarter
/src/mini-gl-engine/StartEventManager.cpp
C++
cpp
950
permissive
#include "Component.h" #include "Transform.h" namespace GLEngine { //std::vector<Component *> componentList; StartEventManager* StartEventManager::Instance(){ static StartEventManager startEventManager; return &startEventManager; } void StartEventManager::registerNewComponent(Componen...
5acb85a5ec1a031717f0119af74c52aa5b6a3eda
a4cfd0284810e13fd10867c245693c9b059e5775
haojile/mozc
/src/base/file_util.cc
C++
cc
13,125
permissive
// Copyright 2010-2016, 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...
71dfd7a0de8cfbde5aed79043595134716836521
e66ab14c8f80a1e416bf226963527bd6def6375d
FRCTeam1987/Robot2016
/src/Commands/Autonomous/AutoMain.cpp
C++
cpp
2,527
no_license
#include "AutoMain.h" AutoMain::AutoMain() { /* * Since all of the child objects are static we just * have to call this constructor once at some point. * After this then we can scope into the class and * utilize any of our commands. */ commandObjects = new CommandObjects(); autoCommandObjects = new AutoCo...
8d1938e02a09861629421ebecb6e8037dbdd908d
66abced876a227fc3e3ccf67c03f0b637a44dff1
j-jorge/signals
/signal-slot-benchmarks/benchmark/lib/jeffomatic/jl_signal/src/ObjectPool.cpp
C++
cpp
4,951
permissive
#include <stddef.h> #include "ObjectPool.h" namespace jl { // Some helper routines namespace { bool IsBounded( const void* pObject, const unsigned char* pObjectBuffer, unsigned nCapacity, unsigned nStride ) { const unsigned char* const pFirst = pObjectBuffer; const ...
279105daa92f48aeff52b8736c3287821008644a
a2526f5720ff35795e0ba72125051c05277570aa
njoy/resonanceReconstruction
/src/resonanceReconstruction/rmatrix/SpinGroup/src/evaluate.hpp
C++
hpp
4,530
permissive
/** * @brief Evaluate the cross sections at the given energy * * @param[in] energy the incident energy * @param[in,out] result a map containing the accumulated cross sections */ void evaluate( const Energy& energy, std::map< ReactionID, CrossSection >& result ) { // penetrability, Coul...
4652e872593249c4ec12e41af3115c0e47f356c5
de05f56fbc03d2a92af6cf407aa80d796e697eb7
Ajaysinghadiya/pythagorien-triplet.cpp
/pythagorien triplet.cpp
C++
cpp
1,044
no_license
#include <iostream> using namespace std; bool check(int a, int b, int c)//the return type is bool because we want values in only true and false { int p; p = (a > b) ? ((a > c) ? a : c) : ((b > c) ? b : c);//finding the max number by using turnary opeator int q, r; if (p == a) { q = b; ...
9ebe14850b650f8bc9eaa51e494cda3716abc4b2
c1a0b38e4284fe262c05849ecc035427868df345
Amazing95/ObjectARXMod
/2004/samples/graphics/acgisamp/acgisamp.cpp
C++
cpp
9,966
permissive
// // (C) Copyright 1996,1998 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, // provided that the above copyright notice appears in all copies and // that both that copyright notice and the limited ...
3ee957edd92b0a2b3fc0a4f968f1c00934209563
cbb46b5cabfddb557c60abec4e8f57e6a8a18ed4
gimntut/gimntut-scite
/src/scintilla/lexers/LexSQL.cxx
C++
cxx
22,992
permissive
// Scintilla source code edit control /** @file LexSQL.cxx ** Lexer for SQL, including PL/SQL and SQL*Plus. **/ // Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org> // The License.txt file describes the conditions under which this software may be distributed. #include <stdlib.h> #include <string.h> ...
fd0ef2753b8aabe01c40d4b99caf99ecb1c8f9be
f691a471f22cbf8f406aad7a7fc09e0b3479e44e
kiloecho78/CS4865
/CardGame/main.cpp
C++
cpp
585
no_license
#include "gameboard.h" #include "aboutdialog.h" #include "winningdialog.h" #include "help.h" #include "preferencespage.h" #include <QtPlugin> #include <QApplication> gameboard *MainApp; WinningDialog *WinBox; AboutDialog *About; PreferencesPage *Prefs; Help *help; int main(int argc, char *argv[]) { ...
ccc27080e2e877552b5838896ef52958fa40e3dd
22bf1165ba8b1bff64750111c302eab2f9ba4a2a
ppv-vldmr/ITMO
/Algorithms and Data Structures/term-2/greedy-bruteforce-hash-lab/5.cpp
C++
cpp
1,279
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct sas { int up; int down; int ind; sas(int a, int b, int c) { this->down = a; this->up = b; this->ind = c; } }; bool comp(sas a, sas b) { return a.down < b.down; } bool comp2(sas a, ...
b2b9eaf43a7fd811fb4dcd2f14ac630039df0019
be88c4413a946ed1274273817c2dd795abea9630
xycruise/3D_Hair_Rendering
/mitsuba/src/libcore/thread.cpp
C++
cpp
10,489
no_license
/* This file is part of Mitsuba, a physically based rendering system. Copyright (c) 2007-2011 by Wenzel Jakob and others. Mitsuba is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation. ...
11fe6d7d4ff1878dbaa8c5be3d5b554226d85887
749d60f476e2a4471f4fdb68b8d0f37abdf06ae4
roca12/gpccodes
/Resueltos/Edwin Villarraga/13131_Uva.cpp
C++
cpp
702
no_license
#include <bits/stdc++.h> #include <cstdlib> #define MAX 256 typedef long long int ll; using namespace std; int main(int argc, char** argv) { ll a, b,cont=0; int n; scanf("%d",&n); for(int j=0;j<n;++j){ scanf("%lld %lld",&a,&b); vector <ll> vec; for(int i = 1; i <= sqrt(a); i++){ ...
9ed3832b705d418981ce43dcbb8edc0406703ddb
de676be2b924ccd32da924c6cc469b276ff46a46
Ranggawaskita/Tugas-Struktur-Data1
/struktur data no C4.cpp
C++
cpp
737
no_license
Nama : Rangga Waskita Dewa NIM : 20051397055 KELAS : 2020A // C.Stack 4 #include <iostream> using namespace std; int main(){ string kata; int n, i; bool palindrome = true; cout << "Program Mengecek Kata - Kalimat Palindrom atau Bukan" << endl; cout << "source code by hobingoding...
76db916efc477e464b96456aa6c382912c492b63
065cb99d8bc0b825d5b410e17143250070e1d916
tommybutler/mlearnpy2
/home--tommy--mypy/mypy/lib/python2.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat/fun/get_lp.hpp
C++
hpp
481
permissive
#ifndef STAN_MATH_PRIM_MAT_FUN_GET_LP_HPP #define STAN_MATH_PRIM_MAT_FUN_GET_LP_HPP #include <boost/math/tools/promotion.hpp> #include <stan/math/prim/mat/fun/accumulator.hpp> namespace stan { namespace math { template <typename T_lp, typename T_lp_accum> inline typename boost::math::tools::promote_arg...
232e8c64ab422a61926da836820a49bf055fe11e
dc1ae26ef9bfe6b9d8664043fcd4f6d92b505d5d
UTurista/SpaceInvaders
/Space_Invaders/src/Material.cpp
C++
cpp
7,029
no_license
#include "Material.h" #include <iostream> Material::Material() {}; //Funçao que actualiza as componentes do material void Material::editMaterial(float* amb, float* dif, float* espc, float* emiss, float shine) { mat_ambient[0] = amb[0]; mat_ambient[1] = amb[1]; mat_ambient[2] = amb[2]; mat_ambient[3] ...
ddeac0dde2dd576d059114cbcf360154908719a7
cf2d50e67f6f3718931cb121cb0a4ae995485a27
awgn/codes
/trunk/codes.cpp11/thread_interrupt.hpp
C++
hpp
3,152
no_license
/* $Id$ */ /* * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * <bonelli@antifork.org> wrote this file. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think * this stuff is worth ...
73b6c3d1bf73f4ee9aa9f089085c380fcbda0891
3b924096980e836c2ad2287a82b7081d22e82453
saikrishnassk/2Yrs_of_coding
/VillageAndTribes.cpp
C++
cpp
1,646
no_license
/* There are n villages in a line in an area. There are two kinds of tribes A and B that reside there. A village can be either empty or occupied by one of the tribes. An empty village is said to be controlled by a tribe of village A if it is surrounded by villages of tribes A from the left and from the right. Same goes...
2f75881bb411d21318f890211d09b53ad3e8a178
aeb6c07093d51e0287efc9739b4d09cc2966e04f
decltypeme/mlpack
/src/mlpack/methods/ann/layer/conv_layer.hpp
C++
hpp
9,876
permissive
/** * @file conv_layer.hpp * @author Marcus Edel * * Definition of the ConvLayer class. */ #ifndef __MLPACK_METHODS_ANN_LAYER_CONV_LAYER_HPP #define __MLPACK_METHODS_ANN_LAYER_CONV_LAYER_HPP #include <mlpack/core.hpp> #include <mlpack/methods/ann/layer/layer_traits.hpp> #include <mlpack/methods/ann/convolution_ru...
205f051513ca55a7b1deffac826a7b90d4b27ac3
960b5a0215f3920149190ebc233c71e4550f6108
nrose171/OpenCV_Projects
/sobelVideo/sobelVideo.cpp
C++
cpp
1,493
no_license
#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" //using namespace cv; int main( int argc, char ** argv ) { cv::namedWindow( "Raw Video", cv::WINDOW_AUTOSIZE ); cv::namedWindow( "Sobel Video", cv::WINDOW_AUTOSIZE ); cv::VideoCapture cap; cap.open( 0 ); while( true ) { cv::Mat f...
20db06e76bd0aec6ae120c6c3235231963c32f8b
2d0e1844085c26daa13a9c57be0b920f0bcc38a0
wpilibsuite/opencv
/modules/video/test/test_trackers.cpp
C++
cpp
4,035
permissive
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #include "test_precomp.hpp" //#define DEBUG_TEST #ifdef DEBUG_TEST #include <opencv2/highgui.hpp> #endif namespace opencv_t...
1541830c449c6eb0be7e0e2248097b008896d3e4
e29f907b6b30707008e17cbe7c5af8b4ed191238
folm/Version-2
/src/test/script_tests.cpp
C++
cpp
91,048
permissive
// Copyright (c) 2011-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <test/data/script_tests.json.h> #include <core_io.h> #include <key.h> #include <keystore.h> #include <script/script...
391fb4e6ad368915f4f39e958b59f80d15378d77
38b4260e55c0d9790c7b033e80ffe2186491ff68
ptitbgdu80/ProjetPbInverse
/Chaleur2D.cpp
C++
cpp
6,415
no_license
#include "Chaleur2D.h" using namespace Eigen; using namespace std; //Constructeur : Chaleur2D::Chaleur2D() {} //Destructeur : Chaleur2D::~Chaleur2D() {} void Chaleur2D::Initialize(DataFile data_file) { _CL_droite = data_file.Get_CL_droite(); _CL_gauche = data_file.Get_CL_gauche(); _CL_haut = data_file.Get_CL_h...
ab0562859a929469b01a06356e3f80e7fb603835
ba02ab8afd5881b10077d48bd64d84b6dc10f1e2
zero4drift/Cpp-Primer-5th-Exercises
/chapter-6/factMain.cpp
C++
cpp
294
permissive
#include <iostream> #include "Chapter6.hpp" using std::cout; using std::cin; using std::endl; int main() { cout << "Enter a integer above 0 to competer its fraction: "; unsigned i; cin >> i; unsigned result = fract(i); cout << "The fraction of " << i << " is " << result << endl; }
ef8426919ae1e2837d092a1b4282c7bd9721a2aa
589b6789f8641a72f147aba6b0e2f4ae0bba5d0a
wuzhen247/ACM-ICPC
/OJ/POJ1/POJ1845.cpp
C++
cpp
1,150
no_license
//求a^b的约数之和 #include<iostream> #include<cstring> #include<cstdio> #define N 50000 typedef long long ll; using namespace std; const int mod=9901; int p[N],np,n; bool prime[N]; ll a[10000],b[10000],A,B; void getprime() { int i,j; memset(prime,true,sizeof(prime)); prime[0]=prime[1]=0; np=0; for(i=2;i<N;i++) { if(p...
1908a2c6f908eaa8f3b9fd0b189b1bca43ed74d2
24771428c5ac63cb5998b4c74c7d416b1d62ed2a
tmikov/smalls
/cxxp1/src/smalls/parser/utest/TestSymbolTable.cpp
C++
cpp
1,264
permissive
/* Copyright 2012 Tzvetan Mikov <tmikov@gmail.com> 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 r...
0299e19dc70d011f03f7cb7ce237b10932c6625d
34326504007380244fa95ecfd9793b59d1ea51ab
wzhiliang/chromium
/chrome/browser/chromeos/attestation/machine_certificate_uploader_impl_unittest.cc
C++
cc
12,546
permissive
// Copyright (c) 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 <stdint.h> #include <string> #include "base/bind.h" #include "base/bind_helpers.h" #include "base/location.h" #include "base/run_loop.h" #i...
4b713d5ba89f953f89612b96905c3b3dcf74a59a
2f5dc3306ae05c56dcf6f6cb9d760269b260cb85
illuminationt/Tama2D
/Tama2D_ver4.4/winmain.cpp
C++
cpp
3,246
no_license
#include<Windows.h> #include<iostream> #include"Graphics.h" #include"Root.h" #include<sstream> //プロトタイプ宣言 bool CreateMainWindow(HWND&, HINSTANCE, int); LRESULT WINAPI WinProc(HWND, UINT, WPARAM, LPARAM); //グローーーーバル変数 Root* g_root; HWND hWnd = NULL; int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance...
2a0396f579b33638fc10769459a58d4fae4973e6
cf2d7213ec52eb62eed9fd85e266d16a6e214750
sbaa2014/MFCApplication1
/ext/Xenos-master/ext/blackbone/src/BlackBone/Process/MemBlock.cpp
C++
cpp
7,366
permissive
#include "MemBlock.h" #include "ProcessMemory.h" #include "ProcessCore.h" #include "../Subsystem/NativeSubsystem.h" namespace blackbone { /// <summary> /// MemBlock ctor /// </summary> /// <param name="mem">Process memory routines</param> /// <param name="ptr">Memory address</param> /// <param name="size">Block size</...
3aa90fdefb1f7676c3edf1d44fd3e064be5b1a98
977afca3e10e4ded217a0970f954ddbd60d4351d
MAPSWorks/Procedural-Terrain-Estimator
/Renderer/TerrainRenderer/EngineAsset.cpp
C++
cpp
1,491
permissive
#include "EngineAsset.hpp" #include "GLShader.hpp" #include "GLTexture.hpp" #include <filesystem> template <> std::shared_ptr<GLShader> make_shared_from_list(iList<std::string>&& list); template <> std::shared_ptr<GLShader> make_shared_from_list(iList<std::string>&& list); template <> std::shared_ptr<GLTexture> mak...
52a06562f0e4cb97115daf85c5cfb54396357afe
35d57aec2460c8a5c5f2b679d04a4eb61e1e3684
Ynjxsjmh/PracticeMakesPerfect
/LeetCode/p0018/I/18-4sum.cpp
C++
cpp
1,800
no_license
#include <vector> #include <cstdlib> #include <algorithm> #include <iostream> using namespace std; class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { sort(nums.begin(), nums.end()); vector<vector<int>> result; if(nums.size()<4) return result;...
146fda1f3992b98b06b546786abb6485f89ecc8c
b1b740cb0fe006773c471e02cab652ca613e6d63
blur-network/blur
/tests/unit_tests/blockchain_db.cpp
C++
cpp
11,194
permissive
// Copyright (c) 2014-2018, The Monero Project // // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this list o...
4192744d8b7f492c49650775d43e8aab9334a138
95caa991b62aab054c780da3dfe10cb5f7dafa37
Shubzedm007/Hactoberfest-accepted
/CPP/Prims Algorithm/prims.cpp
C++
cpp
1,948
no_license
#include <iostream> #include <conio.h> using namespace std; #define ROW 7 #define COL 7 #define infi 5000 class prims { int graph[ROW][COL], nodes; public: prims(); void createGraph(); void primsAlgo(); }; prims::prims() { for (int i = 0; i < ROW; i++) for (int j = 0; j < COL; j++) ...
01ce6db321b121008a0ee813a77514be555f8beb
8e8f2b0d754aceb3f7a80e5f96c6f42446c413ef
vladimirsukiasyan/park_mail_algo
/ALGO/Vane/main.cpp
C++
cpp
1,021
no_license
#include <iostream> using namespace std; int main() { int a_size, b_size, i, k, d = 0, count = 0; cin >> a_size; int *a = new int[a_size]; for (i = 0; i < a_size; i++) cin >> a[i]; cin >> b_size; int *b = new int[b_size]; ...
17d346a7016ab7bcb4de7521c5f64a02a94f746b
5b1633a0ebab5f6c2df440de80cc66c2ff8841d7
jcooke92/ProcessScheduler
/Computer.cpp
C++
cpp
7,632
no_license
#include <stdlib.h> #include <istream> #include <queue> #include <vector> #include "Process.cpp" #include <string> #include <tuple> #include <algorithm> typedef std::tuple<int, std::string, int> event; struct eventComparator { bool operator()(event a, event b) { return std::get<2>(a) > std::get<2>(b...
a0f0aa6472c92352b1d6a46d15d029057a99d633
fd2df1cdebadb2dea17f5eba5f7c77654ec3164c
meonBot/cvmfs
/test/unittests/t_cache_tiered.cc
C++
cc
3,441
permissive
/** * This file is part of the CernVM File System. */ #include <gtest/gtest.h> #include "cache.h" #include "cache_ram.h" #include "cache_tiered.h" #include "hash.h" #include "statistics.h" using namespace std; // NOLINT class T_TieredCacheManager : public ::testing::Test { protected: virtual void SetUp() { ...
139fc22a120383484fa07f55b29cf8b8566e1d30
f5e5ce72ee329671b78cc728cb844d3a37034264
Orion545/OI-Record
/Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0242/road/road.cpp
C++
cpp
721
no_license
#include <cstdio> #define PROGRAM "road" const int INF = 0x3fffffff; inline int min(int a, int b) { return a<b?a:b; } inline int max(int a, int b) { return a>b?a:b; } inline int read() { int x = 0; char c = getchar(); while (c<'0' || c>'9') c = getchar(); while (c>='0' && c<='9') { x = (x<<3) + (x<<1) + (c^'0');...