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
5bb533f0b073dd7b22500a965f11c042d4fa90ae
79b4ee33be2a59eeb753bd52065e551097642cd0
PainKillor/EncryptionProgram
/EncryptionProgram/Sung.cpp
C++
cpp
397
no_license
#include "Sung.h" Sung::Sung() { strcpy(key, ""); } Sung::Sung(char key[]) { strcpy(this->key, key); } void Sung::encrypt (char data[]) { for (int i = 0,j=(BLOCK_SIZE-1); i < BLOCK_SIZE; i++, j--) { data[i] = (data[i]+'~') + key[j]; } } void Sung::decrypt (char data[]) { for (int i = 0,j=(BLOCK_SIZE-1);...
ed63e60bcc5ebd556c98bff598b6742d0eaa4d3b
357708f7951a23f2e69c8e2ff137c01f502a1163
15831944/uppgit
/uppsrc/Geom/Draw/hrr.cpp
C++
cpp
53,825
permissive
////////////////////////////////////////////////////////////////////// // hrr: high resolution raster. #include "GeomDraw.h" #pragma hdrstop #include "hrr.h" #include <plugin/jpg/jpg.h> #include <plugin/gif/gif.h> #include <plugin/png/png.h> NAMESPACE_UPP #define LLOG(x) // LOG(x) void CalcBitMasks(int bpp, const...
678ba2d3b566207c5969ed87f81328135053c115
644a5230046edf09761b6dab58b571c1ded80b00
mercurier/TemplePlus
/TemplePlus/mainloop.cpp
C++
cpp
16,526
permissive
#include "stdafx.h" #include <graphics/device.h> #include <graphics/textengine.h> #include <graphics/dynamictexture.h> #include <graphics/shaperenderer2d.h> #include <debugui.h> #include "mainloop.h" #include <temple/dll.h> #include "mainwindow.h" #include "tig/tig_console.h" #include "tig/tig_mouse.h" #include "ti...
7d39ec9f021ba3ebd851472f815c5d6d0e3f2e1d
ecccb508ee9a324eee3e7ed3575781cb03193068
evehour/SGADHLee
/D3DGame_181002_041_1_Changed_Shader_Material/Landscape/Terrain.cpp
C++
cpp
3,340
no_license
#include "stdafx.h" #include "Terrain.h" Terrain::Terrain(ExecuteValues * values) : values(values) { ReadHeightMap(Contents + L"HeightMaps/HeightMap256.png"); CalcNormalVector(); AlignVertexData(); } Terrain::~Terrain() { } void Terrain::CopyVertices(void * vertices) { memcpy(vertices, this->vertices, sizeo...
433f67d5a4dab85f3c63c06c9f15cf04f33362c9
8bf02d65f31f35cf371ce3afde029a1215da2a97
FrenchCoinOfficial/FrenchCoin
/src/qt/sendcoinsentry.cpp
C++
cpp
4,618
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 "sendcoinsentry.h" #include "ui_sendcoinsentry.h" #include "guiutil.h" #include "bitcoinunits.h" #include "addressbo...
7b42fbc308920dd1fcbaba4a0b52714492208701
dc2efcf970eae27a67e5683c2c1feb164fa9bd85
jafffy/VKGL
/src/OpenGL/entrypoints/GL3.0/gl_framebuffer_texture_1d.cpp
C++
cpp
3,892
permissive
/* VKGL (c) 2018 Dominik Witczak * * This code is licensed under MIT license (see LICENSE.txt for details) */ #include "OpenGL/entrypoints/GL3.0/gl_framebuffer_texture_1d.h" #include "OpenGL/context.h" #include "OpenGL/globals.h" #include "OpenGL/utils_enum.h" static bool validate(OpenGL::Context* in_context_ptr, ...
58338c4aa5fecf49eb6c594257a8bf9d48e40f35
04e1d6b0d4031c1add20cfc113e9040a02295b2f
chmnchiang/bcw_codebook
/codes/Data_Structure/Heap/extc_heap.cpp
C++
cpp
319
no_license
#include <bits/extc++.h> typedef __gnu_pbds::priority_queue<int> heap_t; heap_t a,b; int main() { a.clear(); b.clear(); a.push(1); a.push(3); b.push(2); b.push(4); assert(a.top() == 3); assert(b.top() == 4); // merge two heap a.join(b); assert(a.top() == 4); assert(b.empty()); return 0; }
481f832516bea9fb6ed8742a7686e1acb689ddc8
b329a59798d492da235c61ffc1f4666dcb07a7e8
Global19/tfx-bsl
/tfx_bsl/cc/sketches/misragries_sketch.cc
C++
cc
13,810
permissive
// Copyright 2020 Google LLC // // 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 applicable law or agreed to in ...
08799e52bb12064f508124a97455e5190ab31a7e
77934cc41ed730379cb1885b1dcf933ee33eefaf
xtblock/chromium
/content/browser/service_worker/service_worker_test_utils.cc
C++
cc
37,505
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 "content/browser/service_worker/service_worker_test_utils.h" #include <algorithm> #include <map> #include <memory> #include <string> #include <u...
c5bb4a30b639468069032648b9818e4f9c3211b8
ef43d1455404b7c0a124276c33f1542f6a106262
BixBite-project/Bixbite-blockchain-explorer
/src/rpccalls.cpp
C++
cpp
10,047
permissive
// // Created by mwo on 13/04/16. // #include "rpccalls.h" namespace xmreg { rpccalls::rpccalls(string _deamon_url, uint64_t _timeout) : deamon_url {_deamon_url}, timeout_time {_timeout} { epee::net_utils::parse_url(deamon_url, url); port = std::to_string(url.port); timeout_...
58ad6710409aca1ab7c202553a006858fd697bfa
65290be256d3c4709f95aacb36b13a87cb503595
prem-chand/Cassie_Controller_AngularMomentum
/CustomCodes/utils/funcs/KinDyn200511_221619/kin/mex/Jb_LeftRotationJoint_mex.cc
C++
cc
10,005
no_license
/* * Automatically Generated from Mathematica. * Mon 11 May 2020 22:18:43 GMT-04:00 */ #ifdef MATLAB_MEX_FILE #include <stdexcept> #include <cmath> #include<math.h> /** * Copied from Wolfram Mathematica C Definitions file mdefs.hpp * Changed marcos to inline functions (Eric Cousineau) */ inline double Power(doub...
c142adbb41e987be67f65e371793125f2e100747
ecb8c9b3779816dda73b13803647b5c86ce63e96
hhgxx123/pytorch
/torch/csrc/jit/test_jit.cpp
C++
cpp
31,938
permissive
#ifdef USE_CATCH #define CATCH_CONFIG_MAIN #include "catch.hpp" #else #define REQUIRE JIT_ASSERT #endif #include "torch/csrc/jit/assertions.h" #include "torch/csrc/jit/fusion_compiler.h" #include "torch/csrc/jit/code_template.h" #include "torch/csrc/jit/ir.h" #include "torch/csrc/jit/attributes.h" #include "torch/...
a5745b910dc6bf889ef6b5a2dee8240e200585f8
fb8d33b22798b91a55bf0e9ed6853c5db0c778fb
Csineneo/Vivaldi
/chromium/components/chrome_cleaner/public/constants/constants.cc
C++
cc
3,424
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/chrome_cleaner/public/constants/constants.h" namespace chrome_cleaner { // Command line switches. const char kChromeChannelSwitch[]...
f6b60acbc33673a27970b6a9bb2737e0b4c32899
a1c1c8ba81155a65bdafdfa5396bc8b942a631ff
Idoavital/My-Projects
/OS/factory/circle.cpp
C++
cpp
405
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: circle.cpp * Author: stav * * Created on March 12, 2018, 9:57 AM */ #include "circle.h" namespace ilrd { circ...
362da874cbcf9ee552dd2bce5740603a3203496a
d9a840ffc4be7646026a62dead165ac9fc9fb392
Kerisys/Design-Patterns
/Design-Patterns/Observer Pattern/WeatherData.cpp
C++
cpp
758
no_license
#include "WeatherData.h" WeatherData::WeatherData() { } WeatherData::~WeatherData() { observers.clear(); } // 옵저버 등록 void WeatherData::registerObserver(IObserver* const o){ observers.push_back(o); } // 옵저버 해제 void WeatherData::removeObserver(IObserver* const o){ observers.remove(o); } // 변경사항 전달 void WeatherDa...
9cadd5e1419252c2331016427cfa580f4829c4d2
0cb92ef554639daf36b600d7fe189183a20b05d8
otcshare/chromium-src
/content/public/test/mock_download_manager.cc
C++
cc
5,808
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/public/test/mock_download_manager.h" #include "components/download/public/common/download_create_info.h" #include "content/browser/...
f5278331a16963d46e4c846a0319990e61997932
9bd3df5a2e47fac2ae73aee632d6a92c5c018859
kartikmadhira1/turtlebot_walker
/include/turtlebot_walker/turtle_walker.hpp
C++
hpp
2,644
permissive
/** * MIT License * * Copyright (c) 2019 Kartik Madhira * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without * limitation the rights to use, ...
7b34ad51c89f04e8dc6ad94618af696e228c33ca
1c2a242edf43e97a18ff567a366183979bc59925
pmem/libcxx
/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
C++
cpp
1,548
permissive
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
4d2a920a417040e0a830c5ea37622aaa7be551ef
bd41c5d3db39fb0cc228340d9102860fc58935ee
183amir/bob.learn.mlp
/bob/learn/mlp/backprop.cpp
C++
cpp
21,320
no_license
/** * @author Andre Anjos <andre.anjos@idiap.ch> * @date Tue 6 May 12:32:39 2014 CEST * * @brief Bindings for an MLP * * Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland */ #define BOB_LEARN_MLP_MODULE #include <bob.blitz/cppapi.h> #include <bob.blitz/cleanup.h> #include <bob.learn.mlp/a...
9867abdf691f302d1101c8e750f82262e879ede1
8896b2585cb730218ec8ee502d38053d3ed23b3d
gnosis23/algorithm-problems
/math/cf0478B.cc
C++
cc
1,035
no_license
/** * author: BohaoWang (bj050323@gmail.com) * id: https://codeforces.com/problemset/problem/478/B * tag: */ #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <string> #include <vector> #include <map> #include <unordered_map> #include <set> #inc...
8778367f285da023db191df772112d5326b1147b
387ac9d7a6b433ae90641898705463de658248bd
chosungmann/book-examples
/Professional C++, 5th Edition/Code/c21_code/05_RegularExpressions/09_regex_replace_2.cpp
C++
cpp
484
no_license
import <iostream>; import <string>; import <regex>; import <format>; using namespace std; int main() { const string str{ "<body><h1>Header</h1><p>Some text</p></body>" }; regex r{ "<h1>(.*)</h1><p>(.*)</p>" }; const string replacement{ "H1=$1 and P=$2" }; string result{ regex_replace(str, r, replace...
7a75e8b51b51a82b97af81112219f1122a0411ee
a854d1003b7db89479e4e6f29cac0150d0aaa8d7
YazeedNO/mfcmapi
/Interpret/SmartView/VerbStream.cpp
C++
cpp
3,259
permissive
#include "stdafx.h" #include "VerbStream.h" #include <Interpret/SmartView/SmartView.h> #include <Interpret/ExtraPropTags.h> VerbStream::VerbStream() { m_Version = 0; m_Count = 0; m_Version2 = 0; } void VerbStream::Parse() { m_Version = m_Parser.Get<WORD>(); m_Count = m_Parser.Get<DWORD>(); if (m_Count && m_Cou...
fb2a55c1f0193f391f9b7aeadab8e8c550a7e6ef
a20c9f39346e1fb566b34a673524d035d664f02a
falgon/SrookCppLibraries
/srook/algorithm/searching.hpp
C++
hpp
627
permissive
// Copyright (C) 2011-2020 Roki. Distributed under the MIT License #ifndef INCLUDED_SROOK_ALGORITHM_SEARCHING_HPP #define INCLUDED_SROOK_ALGORITHM_SEARCHING_HPP #include <srook/algorithm/searching/binary_search.hpp> #include <srook/algorithm/searching/boyer_moore.hpp> #include <srook/algorithm/searching/boyer_moore_ho...
78ce6d1a19a0aca629d8af05349b3c2febe8ee7f
eda0d4501977138da8c3f94111bffc6ca74ee69d
joshua-stone/ros-teleop
/src/teleop_node.cpp
C++
cpp
711
no_license
#include "ros/ros.h" #include "std_msgs/String.h" #include "sensor_msgs/LaserScan.h" #include "geometry_msgs/Twist.h" ros::Publisher pub; void teleopCallback(const sensor_msgs::LaserScan::ConstPtr& msg) { ROS_INFO("Angle-z: %f", msg->ranges[0]); } void joystickCallback(const geometry_msgs::Twist::ConstPtr& joy){ ...
fee81f395c09b5047cfe2ca67ec7392ea6ee67bf
42d3002c0e3cc853c56808dff0a6e20c8f8bef0a
StChCa/Schoolwork
/visAndGraphics/mod1/ModuleOneTest/ModuleOneTest.cpp
C++
cpp
1,173
no_license
/* * ModuleOneTest.cpp * * Created on: Mar 4, 2020 * Author: Stephen Cardone */ #include <GL/freeglut.h> // Include the freeGLUT header file /* Implements Display Callback Handler*/ void displayGraphics() { /*Specify the red, green, blue, and alpha values used when the color buffers are cleared. Color is se...
7baa5c32dd10139afeff7289ad9845c816b4b636
b3d0f187295f3a4dc8d715c535f6e5b1309c3c53
inaugust/lb
/lb/lb.cc
C++
cc
16,061
no_license
#include <Lightboard_i.hh> #include <Dimmer_i.hh> #include <Instrument_i.hh> #include <Fader_i.hh> #include <CueFader_i.hh> #include <CrossFader_i.hh> #include <LevelFader_i.hh> #include <stdio.h> #include <dlfcn.h> #include <expat.h> /**** Globals... ****/ LB::Lightboard_ptr lb; CORBA::ORB_ptr orb; CosNaming::Naming...
d078610a7658cf595c4d0cd57f345a2f512c7c52
3aaf9ae88ce9a5c76760d8e7f308abf88338fc07
M4th3m4tic4l/wow-emulator-archive
/SWEmu/TownHall/Settings.cpp
C++
cpp
7,497
no_license
#include "Settings.h" #include "Globals.h" #include "TCPSocket.h" CSettings::CSettings(void) { DefaultSettings(); } CSettings::~CSettings(void) { //Free all to avoid any warning #define DelString(destvar) {if (destvar) free((void *)destvar);} DelString(server_welcome_message); DelString(server_owner...
7cae718f36fcd56da0dddbf86a5c0601251d869c
359c94431c3203a65d39eaf38d57923126e04bce
lcj2018/projectx
/ChangeInfoDLG.cpp
C++
cpp
4,443
no_license
// ChangeInfoDLG.cpp : 实现文件 // #include "stdafx.h" #include "Project X Beta.h" #include "ChangeInfoDLG.h" #include "afxdialogex.h" using namespace std; // CChangeInfoDLG 对话框 IMPLEMENT_DYNAMIC(CChangeInfoDLG, CDialogEx) CChangeInfoDLG::CChangeInfoDLG(CWnd* pParent /*=NULL*/) : CDialogEx(IDD_CHANGEINFO, pParent) { ...
f62406c23f77291eeab68103d18e4279ff454a48
acfb36eb8c1a55b3d17ab1162e4a7548316a1c78
Unknow-man/mfc-4
/iocpframework/include/IOCP/WinException.cpp
C++
cpp
705
no_license
#include "stdafx.h" #include "WinException.hpp" #include <sstream> namespace async { namespace IOCP { Win32Exception::Win32Exception(const std::string &apiName, unsigned long dwErrCode) { std::ostringstream oss; char *buffer = NULL; ::FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |...
7a33180cb4851c5fffd1817c2202b3931eb72892
0aa712ac2b6829807ecd67521de14308480155ba
taj8zg/CS2150-PDR
/Lab1/Inlab/LifeCycle.cpp
C++
cpp
1,184
no_license
//Name: Ashley Nguyen - apn2my //InLab01 - LifeCycle.cpp //1.26.16 #include <iostream> #include <string> #include "LifeCycle.h" using namespace std; //---------------------------------------------------- static variables int MyObject::numObjs = 0; // static member for all objects in class static MyObject staticObj(...
b2bf52a591c8197d10b0a65058634116b1287ed2
3d3f462b4c7355aaa916d8780e3ba15eeee5b928
SMiles02/CompetitiveProgramming
/CodeChef/UWCOI 2021/A.cpp
C++
cpp
884
no_license
#include <bits/stdc++.h> #define ll long long #define sz(x) (int)(x).size() using namespace std; //mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); //uniform_int_distribution<int>(1000,10000)(rng) ll binpow(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res = r...
f098d1843d9b5aa01c81be648ae075548570b1ed
9885ca9a834eeafa223686d3fdea855e07f52f7d
msk4862/DS-Algo
/Practice/DP/JobScheduling.cpp
C++
cpp
1,772
no_license
// https://www.geeksforgeeks.org/weighted-job-scheduling/ #include<bits/stdc++.h> using namespace std; #define ll long long int #define FASTIO \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullptr); int dp[100]; bool comp(int jobA[], int jobB[]) { return jobA[1] < jobB[1]; } // ne...
3942abb793b142133b761a61e5739127e8f4125c
0b5b24b62e0572e6bbee022ff120df6e38262542
Jeyster/vehicules-tuto-zero-cpp
/src/Vehicule.cpp
C++
cpp
480
no_license
#include "Vehicule.h" using namespace std; Vehicule::Vehicule(string marque, int prix, int anneeFabrication) : m_marque(marque), m_prix(prix), m_anneeFabrication(anneeFabrication) { } Vehicule::~Vehicule() { } void Vehicule::affiche() const { cout << endl << "Vehicule : " << m_marque << endl; cout << "P...
fd0e678d5a5f66805f2a51164004b37f34590826
79d5cb31e98d4b549319cb2ee44ece7a06407359
sswroom/SClass
/src/SSWR/AVIRead/AVIRGISSearchForm.cpp
C++
cpp
3,646
no_license
#include "Stdafx.h" #include "SSWR/AVIRead/AVIRGISSearchForm.h" #include "Text/MyString.h" #include "Text/StringBuilderUTF8.h" void __stdcall SSWR::AVIRead::AVIRGISSearchForm::OnTextChg(void *userObj) { UTF8Char sbuff[512]; SSWR::AVIRead::AVIRGISSearchForm *me = (SSWR::AVIRead::AVIRGISSearchForm*)userObj; ...
b839c450c8258e6db15be6e78e3152686a994601
79b28b9094066c89375d8fa2637557f04b36280d
kevin20x2/acmcode
/fft/a.cpp
C++
cpp
3,015
no_license
/* *File: a.cpp *Date : 2015-03-15 10:54:32 */ #include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<vector> #include<algorithm> typedef long long LL; #define clr(x) memset((x),0,sizeof(x)) #define inf 0x3f3f3f3f using namespace std; const double pi= acos(-1.0); const int maxn = 400040; ...
36c88aafaad7b708d13f8da5091fe760807405ea
ac6024807e75ad8b27258667090a18115f5e910a
cozek/code-practice
/cpp/marbles.cpp
C++
cpp
877
permissive
#include <bits/stdc++.h> using namespace std; class dreamer{ private: long long num_marbles; long long num_colors; public: dreamer (long long n, long long k){ num_marbles = n; num_colors = k; } long long nChooseK(long long n, long long k){ unsigned long long result = n; if (2*k>n) k = n-k;...
1ad0bae49b81d53e01ab0e2af9eb6070e971502e
3b09ddabb766436a670304be81b804bc8900c02f
Frank112/BP38Ergonomie
/view/documentationView/bodyPostureView/bodypostureview.cpp
C++
cpp
46,331
no_license
#include "bodypostureview.h" #include "../../flickcharm.h" #include "../../separator.h" #include <QVBoxLayout> #include <QScrollArea> #include <QHBoxLayout> const QVector<int> BodyPostureView::TRUNK_TILT_VALUES = QVector<int>()<<-45<<-20<<0<<20<<45<<90<<110; const QVector<int> BodyPostureView::TRUNK_TILT_SIDEWAYS_VALU...
c233451c31e50f90a3e7a5080984265ff31791b5
5ea7755a3d69e0be28fbc899050fb0ac24817ece
irdanish11/Cpp_Algorithms
/Stack/postfix_eval.cpp
C++
cpp
1,136
no_license
#include <iostream> #include <stack> using namespace std; int evaluate(int oprnd1, int oprnd2, char op){ int value; if(op=='^'){ value = oprnd2^oprnd1; } else if(op=='/'){ value = oprnd2/oprnd1; } else if(op=='*'){ value = oprnd2*oprnd1; } else if(op=='+'){ ...
a455abfa8aa3a83bbf928b979f856df6bf868d66
5251569505e5c76624bdd3c180bec03bab77cf51
TCeason/ClickHouse
/src/Core/Settings.cpp
C++
cpp
5,622
permissive
#include "Settings.h" #include <Poco/Util/AbstractConfiguration.h> #include <Columns/ColumnArray.h> #include <Columns/ColumnMap.h> #include <Common/typeid_cast.h> #include <cstring> #include <boost/program_options/options_description.hpp> namespace DB { namespace ErrorCodes { extern const int THERE_IS_NO_PROFILE...
30ea21772a507346e7a2c86d2b502d80fefc0319
cf49b9ed4bb72e7d22cff649ec10d417913bac8b
jpbida/MiSeq_Scripts
/cpp/demos/graph_algo_path_floydwarshall.cpp
C++
cpp
1,274
permissive
///A tutorial about the Floyd-Warshall algorithm. #include <iostream> #include <seqan/graph_algorithms.h> using namespace seqan; int main() { typedef Graph<Directed<> > TGraph; typedef VertexDescriptor<TGraph>::Type TVertexDescriptor; typedef EdgeDescriptor<TGraph>::Type TEdgeDescriptor; typedef Size<TGraph>::Typ...
ee6060e91beeb96bf5d2d224c0242361939babe1
b24f5e5e65bfb38972e70911a365c4c306a1c5e3
orlandoaceto/UVaOnlineJudge
/10199.cpp
C++
cpp
2,477
no_license
//10199 - Tourist Guide //Problem at UVa Online Judge //Solution by Orlando Aceto - contact: ova@cin.ufpe.br //Feel free to use this code if you wish #include <bits/stdc++.h> using namespace std; #define fr(a, n) for(a = 0; a < n; a++) #define fr1(a, n) for(a = 1; a <= n; a++) #define frR(a, n) for (a = n; a >= 0; a...
64fb24818706b626da7afa8a6996c5208053c708
770dff588dfb66524f933a8dbe6f58ac97c52f47
maxbachmann-university/ComplexNumberShell
/include/CliFuncs/PrintFunc.hpp
C++
hpp
1,184
no_license
#pragma once #include "CliFunc.hpp" #include <iostream> /** * @brief Print complex number in cartesian form. */ class PrintFunc : public CliFunc { public: PrintFunc() : CliFunc(std::vector<std::string>{"print", "cartesian_print"}, 1, 1) {} call_result call_impl(const arg_list& args) const override { ...
8fe378a932998c2f995962f6d31556a9023be0eb
b1b5bc2624bbd72c1c855a5426d2d872d2d5fd95
shtanriverdi/CS487-Introduction-to-Competitive-Programming-Progress
/Day 25/Maximum Depth of N-ary Tree - Iterative.cpp
C++
cpp
712
permissive
// Question Link ---> https://leetcode.com/problems/maximum-depth-of-n-ary-tree/ // Day #25 class Solution { public: int maxDepth(Node* root) { if (root == NULL) { return 0; } int depth = 0; queue<Node*> nodes; nodes.push(root); while (!nodes.e...
fa78d5e8e9590d77590b0fa56d97e88506ae55bd
4f4e25bbcc091a2c788f4b164b400ebf34ef4e2b
August0830/my_NJU_OJ_DataStructure
/NJUOJ/NJUOJ/矩阵判断.cpp
C++
cpp
667
no_license
#include <iostream> using namespace std; int main() { int n; cin >> n; bool diag = true,upper=true,lower=true; int** matrix = new int* [n]; for (int i = 0; i < n; ++i) matrix[i] = new int[n]; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { cin >> matrix[i][j]; if (matrix[i][j] != 0) { ...
55dc527e3f7eedfbcc9d181caf3b340a2da4b1d1
fdb13393d588fe642b285d5b7f5808f3eaf2b3fd
AaronNGray/GenomeWorkbench
/src/algo/gnomon/variations.cpp
C++
cpp
30,000
permissive
#include <ncbi_pch.hpp> #include <algo/gnomon/variations.hpp> #include <algo/gnomon/id_handler.hpp> #include <algo/gnomon/glb_align.hpp> #include <objmgr/bioseq_handle.hpp> #include <objmgr/scope.hpp> #include <objmgr/seq_vector.hpp> #include <sstream> BEGIN_NCBI_SCOPE BEGIN_SCOPE(gnomon) TLiteInDels GroupInDels(con...
f2f602f7eebb0dbf4efb87c5f106bd0b6b6e3906
cb297b945494e27f47d5e8b3a82402b359574477
fiedukow/SRInt
/DB.cpp
C++
cpp
9,603
no_license
#include "DB.h" #include "protobuf.pb.h" #include <sstream> #include <iostream> #include <algorithm> DB::DB(Message_State* baseState, const Message_NodeDescription* owner) : state_(baseState, owner), owner_node_(owner) { } DB::~DB() { } void DB::setState(Message_State* state) { StateHelper new_state(state, owner_n...
ff8a9f995c5e3b25d6b32276386366baaf34f985
54da40b8031cdd44e3dca57fd1b1c53347ef3d53
manu05X/ProgramFiles
/CSES/TwoKnight.cpp
C++
cpp
1,055
no_license
//https://cses.fi/problemset/task/1072 #include<bits/stdc++.h> #define SQ(a) ((a)*(a)) using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll k; cin >> k; for (ll n = 1; n <= k; n++) { cout << n * n * (n * n - 1) / 2 - 4 * (n - 1) ...
1567d0bad957a99179f2cdfc6b2fb8381f76b96c
802156c69cc9e342662a23c4d47c6f763730f35b
yuatpocketgems/aws-sdk-cpp
/aws-cpp-sdk-states/source/model/ListTagsForResourceResult.cpp
C++
cpp
1,152
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/states/model/ListTagsForResourceResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #include <a...
a7cb22450f83f3f24ade51b164579b29a6494442
123d698f7e680ff157ddc83688fa434f35b4f061
xuerhuo/LogCollector
/base64.cpp
C++
cpp
3,063
no_license
// // Created by root on 17-5-7. //from http://blog.csdn.net/sky04/article/details/6881649 // #include "base64.h" static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; static inline bool is_base64(unsigned char c) { ...
adc95850d2624777de9c235ba7e912f41e87c78e
ad0c5ddef6a8246bbf3888dbd0c96772d2795926
goodinges/HPC-Final-Project
/openMPRecTiledMatMul.cc
C++
cc
3,151
no_license
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <time.h> #include <sys/time.h> //TODO #define MIN_BL_SIZE 128 //TODO int MIN_BL_SIZE = 128; void mul(long n, double* a, double* b, double* s); int main(int argc, char *argv[]) { long n; double* a; double* b; double* c; if(argc < 2) { ...
af74c7a1a5f6a03d8684323c8a7359347d37c74f
77cec25f597caf26b48f50e28365dd121a6670f0
Tamiflu9/ED
/5.arboles binarios/E33 - perfil izquierdo de un arbol binario/perfil_iz.cpp
C++
cpp
2,362
no_license
// Nombre del alumno: Tamara Huertas Smolis // Usuario del Juez: A78 #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include "bintree_eda.h" using namespace std; /* tenemos una cola de pares para guardar ir guardando el arbol con el nivel correspondiente y un vector de pares para guar...
29e87c7502e129ee29e74d851316c4ed4cbaf91a
a12ff17c2312871cda0261cca3628d2536f53da4
mikal09/competitive-programming
/binary indexed tree.cpp
C++
cpp
297
no_license
int bit[N]; void update(int idx, int val) { for (; idx <= n; idx = idx | (idx + 1)) bit[idx] += val; } int pref(int r) { int ret = 0; for (; r > 0; r = (r & (r + 1)) - 1) ret += bit[r]; return ret; } int rsum(int l, int r) { return pref(r) - pref(l - 1); }
867fe55a1de3e5d330f37bbc534d88a8eaadbd72
22fa283dd89d45eea1c0d0c8eaf01eb24f32aeff
ethanlarochelle/GamosCore
/GamosData/Data/include/GmDataFinalPrimMinusSecoKineticEnergy.hh
C++
hh
2,102
no_license
// // ******************************************************************** // * License and Disclaimer * // * * // * The GAMOS software is copyright of the Copyright Holders of * // * the GAMOS Collaboration....
52fffa4e8a8bd1eaa89fc80973e6cbb06d2f9ddf
5e0cac50463129db9e1d727643044e215c0840a2
garfiaslopez/competitive_programming
/UVA/00272 - TEX Quotes/main.cpp
C++
cpp
717
no_license
// compile & run: g++ main.cpp -o main && ./main < input.txt > out.txt // Problem Url: // https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=208 // © Jose Garfias Lopez // #include <cstdio> #include <iostream> using namespace std; int main() { char char...
5d4b5c61ab39f5c5d4c42b6bf4cdf3024d19d172
23d7bf90293a626dc92dc674554c4f0e3d612332
sxs-collaboration/spectre
/tests/Unit/NumericalAlgorithms/Interpolation/Test_LagrangePolynomial.cpp
C++
cpp
1,415
permissive
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Framework/TestingFramework.hpp" #include <array> #include <cstddef> #include "NumericalAlgorithms/Interpolation/LagrangePolynomial.hpp" #include "Utilities/Gsl.hpp" SPECTRE_TEST_CASE("Unit.Numerical.Interpolation.LagrangePolynomial", ...
4fd3dc9458a33735898d9fd673bddfb6f2b0620b
a2d0bed8d09ee4a866c9ecd644052e6c5a813b77
raihankhan/ACM_Problem_Solving
/codeforces/552/B.cpp
C++
cpp
3,669
no_license
#include<bits/stdc++.h> ///...................................*****................................................./// /// Author : Raihan Khan Raka ( raihankhanraka@gmail.com ) /// /// Department of Computer Science /// /// ...
d73bb87e7f79ba6b953a4eb7ed098050bb1c7109
8d4c29b772159d50037c82c2a3c748723de98b4f
phil65/pvr.vdr.vnsi
/src/client.cpp
C++
cpp
22,756
no_license
/* * Copyright (C) 2010 Alwin Esch (Team XBMC) * http://xbmc.org * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version....
a241a3497a7a6381671140f4c5b4c71e175af039
7c1b0473c681a7329fc6d4286ce08c6272c69db6
robbelouwet/Elixir
/src/txrequest.cpp
C++
cpp
35,653
permissive
// Copyright (c) 2020 The Elixir Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <txrequest.h> #include <crypto/siphash.h> #include <net.h> #include <primitives/transaction.h> #include <random.h> #inclu...
283eaf25dea9912cc080aed4e3076f99a9a6f8bb
7ca3b2a033f94045793eedad2a009c719ed83471
cubetrain/CubeTrain
/libraries/fc/include/fc/rpc/cli.hpp
C++
hpp
1,272
permissive
#pragma once #include <fc/io/stdio.hpp> #include <fc/io/json.hpp> #include <fc/io/buffered_iostream.hpp> #include <fc/io/sstream.hpp> #include <fc/rpc/api_connection.hpp> #include <fc/thread/thread.hpp> #include <iostream> namespace fc { namespace rpc { /** * Provides a simple wrapper for RPC ca...
73ce602bf6394caadeb4eaf0e30a5cb10cfe2b1f
5566de92af1825f83215ae2f43d1d9517cfc0685
Mentos-/Mordhau_SDK
/SDK/Mordhau_BP_PointyLeatherShoes_parameters.hpp
C++
hpp
527
no_license
#pragma once // Mordhau (Dumped by Hinnie) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- ...
9632489f6e91770ef0cc5c7cf0af782eea6ff626
6bec53dbe739ad39056dbc8ad1a54ecbd870d359
csugulo/leetcode-solutions
/105_Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal/Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.cpp
C++
cpp
1,386
no_license
#include "leetcode_solutions.h" class Solution { public: TreeNode* buildTree(vector<int>& preorder, vector<int>& inorder) { if(preorder.empty() || inorder.empty()) return nullptr; return build(preorder, inorder, 0, preorder.size() - 1, 0, inorder.size() - 1); } TreeNode * build(vector<int>...
14194c037faa3efae53d1c270be0934bb232b23a
d450f68f9d734a53af37013a6261f2a59c3d2dc9
SHAREVIEW/GenXSource
/Other/N2F/Src/Next2Friends.Social/src/independent/source/N2FMessage.cpp
C++
cpp
12,781
no_license
#include "N2FMessage.h" #include "N2FMessageOwner.h" #include "LibPhotoItem.h" #include "FileSystem.h" #include "ApplicationManager.h" N2FMessage::N2FMessage() { type = EMT_EMPTY; text[0] = new char16[ENP_MAX_QUESTION_SIZE]; text[1] = new char16[ENP_MAX_ADDTEXT_SIZE]; text[2] = new char16[ENP_MAX_ADDT...
e00dc33e6fbd3e93b236b9724bdf720d82d04581
868536fdf1d7c41981784eab8ec773e69622c979
EimantasMorkunas/special-snowflake
/Compiler/AST/ExpressionOp.hpp
C++
hpp
507
no_license
#pragma once #include <iostream> #include <string> #include "CodeGenContext.hpp" #include "Identifier.hpp" using namespace std; class ExpressionOp : public Expression { public: string* op; Expression* right; ExpressionOp(Identifier* var, string* op, Expression* exp) { first = var; this->op...
b29a82368d1ae488786f109fb531652a36b9bcea
11533e3cad8d285814918bb9a2800a9a9a635014
webpolis/opencv
/modules/highgui/test/test_grfmt.cpp
C++
cpp
23,416
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ea338217bdd82adffd13602145eaa382fb7f00a1
2c8f963110a5749f056879880b0f407953559fdb
wzpyh/PUBG-SDK
/SDK/PUBG_RoadRuntime_functions.cpp
C++
cpp
19,002
no_license
// PlayerUnknown's Battlegrounds (2.5.39.19) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace Classes { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Functi...
69c96f1786c1e44184527ef7b5006bf248407305
83d833c62e1a09151025bade5432e5c11ead3573
pebble2015/cpoi
/ext/src/java/util/Formatter_FormatString.hpp
C++
hpp
554
permissive
// Generated from /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar #pragma once #include <fwd-POI.hpp> #include <java/lang/fwd-POI.hpp> #include <java/util/fwd-POI.hpp> #include <java/lang/Object.hpp> struct java::util::Formatter_FormatString : public virtual ::java::lang::Object {...
53fb17256a6f5d9ec5c3fbd81186b54a60fc6904
0bbdc98125e5217002a5a350d7d517f8c0d2b47e
mornage/Maemo-pingus
/src/res_descriptor.hpp
C++
hpp
1,573
no_license
// $Id: res_descriptor.hpp 2986 2007-08-17 16:20:09Z grumbel $ // // Pingus - A free Lemmings clone // Copyright (C) 1999 Ingo Ruhnke <grumbel@gmx.de> // // 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 Soft...
1a18b2993445d533f45c0d20c3049d11f0724b93
37befaaafb8c8d7e65320ec6ca485ec7700b5fe3
mikesimb/cocos2d-patch
/CCFontFreeType.cpp
C++
cpp
18,137
no_license
/**************************************************************************** Copyright (c) 2013 Zynga Inc. Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ...
3bd28ed446adf3538cdc3d88624104f744f98ebd
173cb982608b06ba272d78c59c4307e6492d5dac
isl-org/Open3D
/cpp/open3d/ml/pytorch/misc/RadiusSearchOps.cpp
C++
cpp
5,418
permissive
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // Copyright (c) 2018-2023 www.open3d.org // SPDX-License-Identifier: MIT // ---...
789ab412938dfe3e04f22ed84613119a12257a2e
6c5be5bea7038e5ef6c1bff7c3025c8a535bf4c3
akihoo/adamantine
/source/ElectronBeamHeatSource.hh
C++
hh
1,434
permissive
/* Copyright (c) 2020 - 2021, the adamantine authors. * * This file is subject to the Modified BSD License and may not be distributed * without copyright and license information. Please refer to the file LICENSE * for the text and further information on this license. */ #ifndef ELECTRON_BEAM_HEAT_SOURCE_HH #defin...
4d982fc4fec89bd73909f325ab4e30c70fce7a6b
4dad29b69a8fede32462b70306993075b50543a8
ClundXIII/timepix-data-crunching
/src/util/split.hh
C++
hh
850
permissive
#ifndef PDC_split_hh_included #define PDC_split_hh_included #include <vector> #include <string> #include <sstream> namespace PDC { inline std::vector<std::string> split(const std::string& s, char delimiter) { std::vector<std::string> tokens; std::string token; std::istringstream tokenStream(s); while...
b1a5fb8946d158df888a35b03a7c22736294fd07
addb2b45f3b5f4a90849b1f3dd8c81e3344d24eb
SolidTeamDev/SolidEngine
/Game/BossRush/Code/Include/Rotate.hpp
C++
hpp
614
permissive
#include "ECS/types.hpp" #include "Build/solidAPI.hpp" #include "ECS/Components/script.hpp" #include "Core/Maths/solidMaths.hpp" #include "EngineGenerated/EntityMacros.h" #include "EngineGenerated/Rotate.sld.hpp" namespace Solid SLDNamespace() { class SOLID_SCRIPT_API SLDClass() Rotate : public Script { public: ...
3d03b94001b855753539fbdd042c300512ff1b5d
79ca29b6eb8b21a6396d5a6e09878d309cc108ba
Codechef-SRM-NCR-Chapter/30-DaysOfCode-March-2021
/answers/ArghyaDas21112001/Day 11/Question 1.cpp
C++
cpp
495
permissive
#include <bits/stdc++.h> using namespace std; bool palindromeornot(string str) { int count[256]={0} ; for (int i = 0; str[i]; i++) { count[str[i]]++; } int odd = 0; for (int i = 0; i < 256; i++) { if (count[i] & 1) odd++; if (odd > 1) return...
09d2075e99be368d2498dc53558d93128089f816
62153034d358cff1ecff6f1c006a77143132ee13
chmodawk/fbthrift
/thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/ExtraServiceAsyncClient.cpp
C++
cpp
71,333
permissive
/** * Autogenerated by Thrift for src/extra_services.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ #include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/ExtraServiceAsyncClient.h" #include <thrift/lib/cpp2/gen/client_cpp.h> namespace extra { namespace svc ...
08d71ddf286919dd552f6fd7032a5c19463d074d
4fc09de556df9ba7b57f7bf9271f2e77be281263
jhxqy/designpattern
/Singleton/modern C++ design/Singleton.hpp
C++
hpp
660
permissive
// // Singleton.hpp // Singleton // // Created by 贾皓翔 on 2018/12/22. // Copyright © 2018 贾皓翔. All rights reserved. // #ifndef Singleton_hpp #define Singleton_hpp #include <mutex> #include <stdio.h> template<typename T> class SingleThreaded{ std::mutex m; public: typedef T VolatileType; typedef std::loc...
cf51a54e89bee9e136f50f0c92227d3d21b28502
6b2af0c2534ebf251cdf0d47c9416213440f9982
JeffersonLab/hcana_gem
/src/GEMEvioParser.cc
C++
cc
2,204
no_license
#define NOEVIO #include "GEMEvioParser.h" #include "GEMDataHandler.h" #include "GEMDataStruct.h" #include "datastruct.h" #include "GEMConfigure.h" #ifndef NOEVIO #include <evioUtil.hxx> #include <evioFileChannel.hxx> #endif #include "EventUpdater.h" #define HEADER_SIZE 2 using namespace std; #ifndef NOEVIO using nam...
b6e6783931a1088e6608ab2981080e1744ac076a
4728d71c9f873a95db2e54c316501931e7b20ed9
aliaby/ProcStats
/ProcStatsCalculator.cpp
C++
cpp
613
no_license
// // Created by ali on 2020-12-06. // #include "ray/core_worker/ProcStats/ProcStatsCalculator.h" void ProcStatsCalculator::start() { measurements_.push_back(std::pair<ProcStats, ProcStats> (ProcStats(pid_, utilization_, memory_, net_, true), ProcStats(pi...
34b2b9d7ccb9af65a2b4bd2b16790e525d1b21e5
a38bb3bfebbf9c70ebf33b71fe3f421e15decb8a
hoojaoh/taichi
/tests/cpp/compiler_basics.cpp
C++
cpp
18,045
permissive
#include <taichi/lang.h> #include <taichi/testing.h> #include <numeric> #include <taichi/visual/gui.h> TLANG_NAMESPACE_BEGIN TC_TEST("compiler_linalg") { CoreState::set_trigger_gdb_when_crash(true); Program prog(Arch::x86_64); Global(a, i32); auto i = Index(0); layout([&]() { root.dense(i, 128).place(a); ...
f0d466ad1fc9a4170c7950b92624c192cdc6467d
567121863162a6cca6d4d4b9f33944091589f42a
LinesYao/Coding_Solutions
/kickstart/2020/Round F/B.cpp
C++
cpp
973
no_license
#include <vector> #include <cstdio> #include <iostream> #include <algorithm> using namespace std; typedef pair<int, int> pii; int main() { int T; scanf("%d", &T); int cas = 0; int N, K, r; while(T--) { scanf("%d%d", &N, &K); vector<pii> intervals(N); for(int i=0; i<N; ++i) { ...
72784a8e1bedbfd36ae7f6126da9607f93c4bdd7
987a51b8effe6fed1071277044967dec12502c30
mogoweb/chromium-crosswalk
/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc
C++
cc
17,128
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/bind.h" #include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/memory/ref_counted.h" #include "base/memory/...
4c182c77b36da4db4bbb40de9c31645704b9bd85
8cf0addbf4f383fa67101f41d45408ee01a0467d
Yeolar/coral-proxygen
/proxygen/httpserver/SignalHandler.cpp
C++
cpp
894
permissive
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #include <pr...
3fb0b2545f9cbef39db9f85bb3739b359be9ab9c
1c57570ab1a3b0559cb7e2a3c3ab670db9238846
habib302/leetcode-1
/71. Simplify Path.cpp
C++
cpp
926
no_license
class Solution { public: string simplifyPath(string path) { stack < string > st; int len = path.size(); if( path[len - 1] != '/' ) { path += "/"; len++; } string prv = ""; for( int i = 0 ; i < len ; i++ ) { if( path[i] == '...
4593ad4fed6d34ee4bea89ffe5a414871b67939f
e992ee25ad7905c0cdb2c4275d7e3daa2ca8313b
TencentCloud/tencentcloud-sdk-cpp
/waf/src/v20180125/model/DescribeUserClbWafRegionsResponse.cpp
C++
cpp
4,229
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
7a6f8933382091bb31874e7e068d58532341e532
b1f9f0bc9df4039c72a0149624033958494bb36c
Innovationzk/FruitNinja_with_SDL
/Fruit Ninja/main.cpp
C++
cpp
13,141
no_license
#include "MyTexture.h" #include "Fruit.h" #include "knife.h" #include "MyFont.h" #include <ctime> #include <fstream> #include <string> const int SCREEN_WIDTH = 640; //screen dimension const int SCREEN_HEIGHT = 480; int score,lose,bestScore; INTERFACE interface = INTERFACE_MENU; SDL_Window *window=NULL; SDL_Renderer ...
e97e61850eb43477fefc6153d2dac40cf01b332c
0c5f436b9bd4d01142622f16d7c773e081f71731
likewatchk/python-pcl
/VTK-7.1.1/Filters/Core/Testing/Cxx/TestDelaunay2DMeshes.cxx
C++
cxx
6,186
permissive
/*========================================================================= Program: Visualization Toolkit Module: TestDelaunay2DMeshes.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This soft...
68ac5299f91b1c1c90c006857e006b275a4615dc
05be0f20d831a8c13dec1b38cc22970700963172
CaduRomaniello/GJR
/UNIT/unit_ticket.cpp
C++
cpp
5,448
no_license
#include "unit_ticket.h" #include <cassert> void unit_ticket_constructor(){ cout << "TEST 1 - Default Ticket constructor test"; Ticket* ticket1 = new TicketHandle(); // Making assertion to verify if all properties were initialized with the default data. assert(ticket1->getId() == -1); asser...
808428fb750a49714fb7999707d729e6145279e5
e9ebc29216a08d58ea0f4ad97d832e86d981a478
milram/ogre-1.7.4-osx
/Tools/MaterialEditor/MaterialEditor/src/CgEditor.cpp
C++
cpp
3,458
permissive
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2011 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person obta...
4705b6591b62a8b1e629f1687a2b1a324f9a7c6c
0d54758a56ad49e09678bd4437ab2a219098db45
MikhailGorobets/FaceGenBaseLibrary
/source/LibFgBase/src/MurmurHash2.cpp
C++
cpp
9,877
permissive
//----------------------------------------------------------------------------- // MurmurHash2 was written by Austin Appleby, and is placed in the public // domain. The author hereby disclaims copyright to this source code. // Note - This code makes a few assumptions about how your machine behaves - // 1. We can read...
837a9f848a76b0b065f92e6ffd3b027aeeb0f77d
cd77880b3cfbb7382dd356c44e7b989acb17af38
rosoareslv/SED99
/c++/ClickHouse/2015/4/ReadBufferFromPocoSocket.cpp
C++
cpp
1,599
no_license
#include <Poco/Net/NetException.h> #include <DB/Core/Exception.h> #include <DB/Core/ErrorCodes.h> #include <DB/IO/ReadBufferFromPocoSocket.h> namespace DB { bool ReadBufferFromPocoSocket::nextImpl() { ssize_t bytes_read = 0; /// Добавляем в эксепшены более подробную информацию. try { bytes_read = socket.imp...
c3cd06549ed1c45ca63a0e21a2f423d0688af0dd
0ea12dc30b951ed1e5271e9d0c36407a094408ed
hard-mode/Carla
/source/native-plugins/distrho-mverb/DistrhoUIMVerb.cpp
C++
cpp
9,202
no_license
/* * DISTRHO MVerb, a DPF'ied MVerb. * Copyright (c) 2010 Martin Eastwood * Copyright (C) 2015 Filipe Coelho <falktx@falktx.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either v...
36ab56e2e29d046f4e2ce0892693cef1556b737a
c45c199f555a558437c2867fdd1a8533d4e35121
LearnSphere/WorkflowComponents
/AnalysisBkt/program/standard-bkt-public-standard-bkt/FitBit.cpp
C++
cpp
21,689
permissive
/* Copyright (c) 2012-2015, Michael (Mikhail) Yudelson 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 condi...
9aa889d8decec1132abf2df43c967175c1f71ad6
4662a7648ccfd3818b9a17540ac81c793689a804
JefferSun/openvino
/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/convolution_transformation.cpp
C++
cpp
4,861
permissive
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <vector> #include "low_precision_transformations/convolution_transformation.hpp" #include "low_precision_transformations/convolution_with_incorrect_weights.hpp" #include "common_test_utils/test_constants.hpp" using namesp...
a4ae76a342b2bdce65128fb4823f8aa3dfeed1cc
b7374b8de5e8c275114c365ed90498d62356ac6c
birchtree2/Codeforces-Template
/动态规划(DP)/状压DP/旅行商问题(TSP-朴素TSP,MTSP,双调TSP)/朴素TSP(模板).cpp
C++
cpp
1,796
permissive
//朴素TSP /*问题:假设有一个旅行商人要拜访N个城市,他必须选择所要走的路径, 路径的限制是每个城市只能拜访一次,而且最后要回到原来出发的城市(哈密顿环路), 要求路径的总和最小 */ /*分析:状态压缩 点集s 把集合s中第i个点删除: s&=~(1<<i) 判断第i个点是否属于集合s: if(s&(1<<i)==0) return false; else return true; 状态dp[s][i]:以s为点集,当前在第i个节点的最小总和 状态转移方程:dp[i][j]=min(dp[s&~(1<<i)][j]+dis[j][i],dp[i][j]) j为点集s中不...
5baf8cf190e13002fbe209c157eaebefd44d621e
7edebe8ba80511785009881f2a691a979ea04b1a
sai913887834/Game-Graphic-3
/MainProject/Game/Source/GameObjects/Material.cpp
C++
cpp
345
no_license
#include"GamePCH.h" #include "Material.h" #include"Base/Mesh.h" Material::Material(fw::ShaderProgram shader, fw::Texture texture) { m_Shader = &shader; m_Texture = &texture; } Material::~Material() { } fw::ShaderProgram* Material::GetShader() { return m_Shader; } fw::Texture* Material::GetTexture() { ...
d828643ffefa49a1efb25997527995df7447df94
175455e9fe0600da4c4ee91ea201cf3061703eef
SuperNodeLibs/supernode-core
/src/history/HistoryTestsUtils.cpp
C++
cpp
25,159
permissive
// Copyright 2017 SuperNode Development Foundation and contributors. Licensed // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 #include "history/HistoryTestsUtils.h" #include "bucket/BucketManager.h" #include "crypto/Hex...
b426586c8e176ef4d9f79e1ed5fa97cae2e5788d
93ac9b380fd8bafd3e1f200da6c7a61bcf1168de
ybouret/upsylon
/src/main/y/geometry/iso3d/facets.cpp
C++
cpp
441
no_license
#include "y/geometry/iso3d/facets.hpp" namespace upsylon { namespace geometry { namespace Iso3D { Facet_:: ~Facet_() throw() { } Facet_:: Facet_(const Point &A, const Point &B, const Point &C) throw() : a(A), b(B), ...
c4723fb040ee06828792dad86796015787cd5b0d
520d74de3d1bf6930986c1d70c2688eba52a6968
danzaleta/c_cpp
/cpp/ex9/ex9.cpp
C++
cpp
735
no_license
#include <iostream> using namespace std; // 9. Arrays /* Nota cuando ponemos un limite a un array (por ejemplo 5 espacios) y declaramos 6, muchos lenguajes nos masrcan directamente error pero C++ no. El programa se ejecutara y si declaramos espacios mas, fuera del limite que pusimos, pueden ocurrir cosas como que el...
3f3360a89769fe19e3a81a076c0b01120431a34f
de156ee71803b21244e759643605243c7671527d
seuzht/Torque6
/src/scene/components/postProcess/hdrComponent.cc
C++
cc
12,686
permissive
//----------------------------------------------------------------------------- // Copyright (c) 2015 Andrew Mac // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, inc...
725cdb0fae14e3bfc33968a589346ef543c8c024
14a3a29588640562d1f2f73d4ad7cfb71c7abaf0
ras0219/PEGTL
/src/example/pegtl/uri_trace.cpp
C++
cpp
622
permissive
// Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #include <iostream> #include <tao/pegtl.hpp> #include <tao/pegtl/contrib/trace.hpp> #include <tao/pegtl/contrib/uri.hpp> namespace pegtl = TAO_PEGTL_NAMESPACE; using grammar = pegt...
cc51eb701b4c80821046647cfdf24481a25b1ad7
2ff355e65aa810f12106c8094b78e3ff6cd17204
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function13907/function13907_schedule_32/function13907_schedule_32_wrapper.cpp
C++
cpp
933
no_license
#include "Halide.h" #include "function13907_schedule_32_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(256, 512, 512); Halide::Buffer<int32_t> buf0(...