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 |
|---|---|---|---|---|---|---|---|---|
14c5284b918d237e8c509854bd099d23c89e155d | fdb48318e84800441c8087f44f820ec038c64c03 | Tomicyo/third_party | /glslang/LibCompiler/LibCompiler.cpp | C++ | cpp | 3,129 | no_license | #include "./../glslang/Include/ShHandle.h"
#include "./../glslang/Include/revision.h"
#include "./../glslang/Public/ShaderLang.h"
#include "../SPIRV/GlslangToSpv.h"
#include "../StandAlone/ResourceLimits.h"
static char * TestLibHLSL = R"(
#pragma pack_matrix( row_major )
struct VS_IN
{
float3 inPos... |
dd1514f4dc6a9ddc34b9fe964b54cd6244283675 | 5bdfae57601677d23854e758035115147cdba9d8 | intrepid249/MathLibrary | /Matrix4.cpp | C++ | cpp | 4,408 | no_license | #include "Matrix4.h"
#include <Vector3.h>
#include <memory.h>
#include <math.h>
template <class T>
Matrix4<T>::Matrix4() {
*this = createIdentity();
}
template <class T>
Matrix4<T>::Matrix4(T *a_ptr) :
x1(a_ptr[0]), x2(a_ptr[1]), x3(a_ptr[2]), x4(a_ptr[3]),
y1(a_ptr[4]), y2(a_ptr[5]), y3(a_ptr[6]), y4(a_ptr[7]),
... |
484011b23acf37eeaa8ff92ac9188ec6401896d6 | 21b7cacc2c26fb001dc60a381bd238eab39a8645 | Quant2017/Design3D | /Intermediate/Build/Win64/Design3D/Inc/Engine/DecalActor.gen.cpp | C++ | cpp | 18,210 | no_license | // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
==============================================================... |
1f8d9d3dbb27b751fc9a7b1969179116be224b1b | a1c1521743416a3832f67114209e047eff99b417 | mlekena/CppStarter | /CppGoogleTestStarter/tests/SampleTests.cpp | C++ | cpp | 320 | permissive | #include <CppDllStarter/Sample.h>
#include <gtest/gtest.h>
#include <vector>
TEST(SampleTests, intMultiplyByTwoMethod) {
CppDllStarter::Sample sample;
EXPECT_EQ(sample.MultiplyByTwo(2), 4);
}
TEST(SampleTests, templateSquareMethodFloat) {
CppDllStarter::Sample sample;
EXPECT_EQ(sample.Square(2.5f), 6.25);
}
|
29c217aa20f6d9af5e096f70bebbe1ead35f0d89 | f63aefe2803a575e851ffb0cb9d1d5196a41bc66 | bartholmberg/openvino | /inference-engine/tests/ngraph_functions/include/ngraph_functions/utils/ngraph_helpers.hpp | C++ | hpp | 6,048 | permissive | // Copyright (C) 2019 Intel Corporationconvert2OutputVector
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#endif
#include <vector>
#include <memory>
#include <ngraph/opsets/opset1.hpp>
#include <ngraph/runtime/tensor.hpp>
#include <backend_manager.hpp>
... |
284cda2cdd1350c25c5fe384441e66e018a16ba6 | 2ec959ba7ce5b02e61c8f5cdda1c60802b15dde7 | Vaa3D/vaa3d_tools | /hackathon/XuanZhao/getNodeLength/getNodeLength_plugin.cpp | C++ | cpp | 10,074 | permissive | /* getNodeLength_plugin.cpp
* This is a test plugin, you can use it as a demo.
* 2020-6-13 : by YourName
*/
#include "v3d_message.h"
#include <vector>
#include "getnodelengthdialog.h"
#include "getNodeLength_plugin.h"
#include "function.h"
#include <fstream>
#include <sstream>
using namespace std;
Q_EXPORT_PLUGIN... |
9c40e6cf5415d0e4882ef1630c1f276cb33837cd | da1ef79d170c70139b5681d88e5dfb457c02313a | dulton/53_hero | /MFDUI/MediaBars/tSDKThread.cpp | C++ | cpp | 27,099 | no_license | /*****************************************************/
// Copyright © 2007-2012 Navico
// Confidential and proprietary. All rights reserved.
/*****************************************************/
#include <StdAfx.h>
#include "tSDKThread.h"
#include "tModuleConfig.h"
#include "tChannelInfo.h"
#include "tChannelRe... |
43ca181ef21aee3757943272ba0a9d3b43aff5aa | fd46e409d8363de558b833ce95aaab343cf43a95 | Khairul-Anam-Mubin/UVa-Solutions | /11747 - Heavy Cycle Edges.cpp | C++ | cpp | 4,042 | no_license | /***
** Author: Khairul Anam Mubin
** Bangladesh University of Business and Technology,
** Dept. of CSE.
***/
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <string>
#include <sstream>
#include <iterator>
#include <vector>
#include <map>
#include <set>
#include <queue... |
3d5f0907944f1ebc6cc9b53cc556521461418ca2 | c684bda1f300d7ea99eb2e4cd3e03dc0282ce0c8 | NanPaiUncle3/oap-mllib | /mllib-dal/src/main/native/OneDAL.cpp | C++ | cpp | 6,654 | permissive | /*******************************************************************************
* Copyright 2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.a... |
c92675a39ed3293b1c6e09f55192796d08c22c93 | 77116edb02fefcf74467c377d4d4226387287781 | HarshitKaushik/ds-algorithms-revision | /array/miscellaneous-3.cpp | C++ | cpp | 2,518 | permissive | #include <iostream>
using namespace std;
// Double the first element and move zeroes to end
// Given an array of integers of size n. Assume ‘0’ as invalid number and all
// other as valid number. Convert the array in such a way that if next valid
// number is same as current number, double its value and replace the n... |
0a9c589ee1fd8ded2faff44ccc50b274204503a1 | 81479b5128e23737e9578886c37bc573a80da3c2 | ess-dmsc/kafka-to-nexus | /src/tests/JsonConfig/FieldHandlerTest.cpp | C++ | cpp | 4,347 | permissive | // SPDX-License-Identifier: BSD-2-Clause
//
// This code has been produced by the European Spallation Source
// and its partner institutes under the BSD 2 Clause License.
//
// See LICENSE.md at the top level for license information.
//
// Screaming Udder! https://esss.se
#include "JsonCon... |
9c68093dc88a5823e42522dc8ccf3e97535463f7 | 560a7fc40528c6d4f75c618b3faa2e959ba02e59 | Griizz/Fortnite-Hack | /SDK/FN_Targeting3PCamera_LongRange_classes.hpp | C++ | hpp | 680 | no_license | #pragma once
// Fortnite SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass Targeting3PCamera_LongRange.Ta... |
c91eae0a8d6935dc792854acf69e9cc4b400e765 | b9b52778e1b55e9765eee229a363e2d383482386 | msupernaw/ATL1 | /Utilities/MemoryPool.hpp | C++ | hpp | 1,995 | no_license |
#ifndef MEMORYPOOL_HPP
#define MEMORYPOOL_HPP
#include <vector>
#include <stdint.h>
#include <iostream>
#include <atomic>
#include <mutex>
namespace util {
template<class T>
class MemoryPool {
std::vector<T> pool; //actual heap of objects
std::vector<T* > free_list; //available objects
... |
7046f62e2e5befde5b186235d71c5969291c40bc | 5db448448f03a9a54431d5684f5fb0bf7ecb86db | mhochsteger/blaze | /blazetest/src/mathtest/smatsmatmult/SCaLCa.cpp | C++ | cpp | 5,123 | permissive | //=================================================================================================
/*!
// \file src/mathtest/smatsmatmult/SCaLCa.cpp
// \brief Source file for the SCaLCa sparse matrix/sparse matrix multiplication math test
//
// Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved
//
// Th... |
6aa473f20b8b902585d69b403dded08ffbe6aad4 | 70ce1aa4658a3a3a6bca879e808f057119a59e72 | rodc87/CityBuilder | /Buildings/Assets/BusStop/SimpleBusStop.cpp | C++ | cpp | 2,116 | no_license | #include "SimpleBusStop.hpp"
SimpleBusStop::SimpleBusStop()
{
style = CLASSIC; // a titre d'exemple
}
void SimpleBusStop::setBuiltIn()
{
bv = new AABB(height, width, depth);
Cylinder* c1 = new Cylinder(0.05, 0.3);
c1->translateOf(0, depth/4+depth*0.2, 0);
addObject(c1);
Cylinder* c2 = new... |
3cfe6051bf3f70e81c6905a05819956ecfb9dc4c | b13862003dffa1b540d1bf1d18d2d7718a8e0cb3 | apastor/ads-chain-cpp-library | /lib/test/HttpRequestsTests.cpp | C++ | cpp | 1,672 | permissive | #include <catch2/catch.hpp>
#include <iostream>
#include "adschain/network/HttpRequests.h"
using namespace adschain;
TEST_CASE("Https get request tests", "[network]") {
SECTION("retrieve the publisher website") {
try {
std::string publisherResponse = HttpGetRequest("https://dsp.com/bid", "?hello-there"... |
6cec5ef96315148586a2f846c2f04a19e36303e1 | 99ff99e3881e1523fd7ca3b188eae88db6083dc7 | EyeOfPython/bitcoin-cash-node | /src/test/finalization_header_tests.cpp | C++ | cpp | 12,016 | permissive | // Copyright (c) 2020 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/test/unit_test.hpp>
#include <chain.h>
#include <chainparams.h>
#include <config.h>
#include <consensus/merkle.h>
#inc... |
b8a6fd8714a4f9524b13ba76b2a8c8f049d461c4 | bda14e357e606351a4788fa05fc641638d477249 | lxc-anonymous/INT_Probe | /system/lib/udp.cpp | C++ | cpp | 2,255 | no_license | #ifndef _UDP_H_
#define _UDP_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <iostream>
#include "udp.h"
using namespace std;
class udp
{
public:
udp();
~udp();
void addBind(... |
2265f450e84f0de567d1c3a977f1fa42d4a293f1 | 4d28e763bd96a66ab479aa7b845522615ebdc4b4 | AlexisWilke/cpp-driver | /src/auth_requests.cpp | C++ | cpp | 953 | permissive | /*
Copyright (c) DataStax, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... |
053c818f2c889d32c4f58a8b466533f30303022c | 359429b55e6f19e1d9cbbe11a2277fca4b375f74 | ca2/app | /acme/operating_system/apple/nano_http/http.cpp | C++ | cpp | 1,417 | no_license | //
// Created by camilo on 26/07/2023 23:23 <3ThomasBorregaardSorensen!!
//
#include "framework.h"
#include "http.h"
#include "_nano_http.h"
namespace apple
{
nano_http::nano_http()
{
}
nano_http::~nano_http()
{
}
void nano... |
8a5a38ad0544bf59116f6a77f2bd26ad23082aa3 | d10ea1199f85499818d180be0c5f3c410ddef42c | mgaunard/boost.simd | /include/boost/simd/function/simd/ulpdist.hpp | C++ | hpp | 721 | permissive | //==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
@copyright 2016 J.T. Lapreste
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
... |
1742159d03600b583a8ce144f28b3ab247383ce3 | 5f5acef8e8b881a779cf8a902e4659314ab84ec2 | tz01x/Algorithm | /maz_path_finding.cpp | C++ | cpp | 1,912 | permissive | #include<iostream>
using namespace std;
int arr[50][50];
int mark[50][50];
int visited[50][50];
void display_mark(int n){
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cout<<mark[i][j]<<" ";
}
cout<<endl;
}
}
void display_arr(int n){
for(int i=0;i<n;i++){
for(int j=0;j<n;j... |
00195cc92b77d6fb40708a5713155babc12c2141 | 8d6012660fa3b0ec3492e2d6598cf19afa32dde8 | eduperz05/ReconocimientoGestos | /main.cpp | C++ | cpp | 3,797 | no_license | #include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/video/background_segm.hpp>
#include <stdio.h>
#include <string>
#include <iostream>
#include "MyBGSubtractorColor.hpp"
#include "HandGesture.hpp"
using namespace std;
using na... |
4748c2d16f18245b5afafb22e702781e87969ec3 | 2802e9dc110a6a6dc7fba3e307408c623594e914 | metashell/headers | /headers/boost/1.24.0/boost/regex/detail/regex_kmp.hpp | C++ | hpp | 2,815 | no_license | /*
*
* Copyright (c) 1998-2000
* Dr John Maddock
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission... |
df28eae04d75fa544647e82955df20e6908011cb | cf034cf848578d4204ef92092ea105b2a22066bd | miflck/ColorWindow | /src/Apps/TestClassController.cpp | C++ | cpp | 12,097 | no_license | //
// TestClassController.cpp
// ColorWindows
//
// Created by Michael Flueckiger on 06.09.12.
// Copyright (c) 2012 Ich. All rights reserved.
//
#include <iostream>
#include "TestClassController.h"
#include "ApplicationController.h"
TestClassController::TestClassController(){
init();
}
TestClassController... |
5692493a04f1b5ef7c7633b18bcdbfa0b806bbcd | 398f14b24b31baa08dbbe20900c20fdb3294a279 | krzysztofszczurek/TasmaProdukcyjna | /Wagomierz.hpp | C++ | hpp | 579 | no_license | //
// Wagomierz.hpp
// Projekt ostateczny
//
// Created by Jacek Stankiewicz on 02.06.2017.
// Copyright © 2017 DziuCoilJaca. All rights reserved.
//
#ifndef Wagomierz_hpp
#define Wagomierz_hpp
#pragma once
#include <stdio.h>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <ti... |
d72c3913f5b6e8fbbce2f6c23e0ece524c0bf40d | 08db72b62fd273396354436bf75de58418694678 | jsee23/udacity-nanodegree | /term2/CarND-Extended-Kalman-Filter-Project/src/FusionEKF.cpp | C++ | cpp | 4,065 | permissive | #include "FusionEKF.h"
#include "tools.h"
#include "Eigen/Dense"
#include <iostream>
using namespace std;
using Eigen::MatrixXd;
using Eigen::VectorXd;
using std::vector;
/*
* Constructor.
*/
FusionEKF::FusionEKF() {
is_initialized_ = false;
previous_timestamp_ = 0;
// initializing matrices
//measurement... |
3db84c7f4867da70e7649a2fe19355f84857f326 | e6c6fa363e6adf88dfd72749d9d6fa2aa5f6ed61 | UCLA-IRL/dledger | /dfi-app/dfi-test.cpp | C++ | cpp | 1,458 | permissive | //
// Created by Tyler on 10/21/20.
//
#include "dynamic-function-runner.h"
#include <ndn-cxx/name.hpp>
using namespace ndn;
int main() {
DynamicFunctionRunner runner;
{ // example of running a module
runner.setCallback("GETB", [](std::vector<uint8_t> buf) -> std::vector<uint8_t> {
std::s... |
1dda89dde35e2ff57bd6dd6482a358cfd21bfbb7 | 04cd685c134fb638467e3d1259596f2eb54a75d8 | google/perfetto | /src/profiling/symbolizer/filesystem_windows.cc | C++ | cc | 2,370 | permissive | /*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
0f33cb50edced607fbd7835844996cc086771d3c | 26eae5cb041b658af30506645eb7e93e27d08c2a | 42somoim/42somoim5 | /dju/plzrun - 이런저런 문제들 2/골드바흐의 추측.cc | C++ | cc | 507 | no_license | #include<cstdio>
#include<vector>
#include<bitset>
using namespace std;
bitset<1000000> prm;
int n;
int main() {
for (int i = 3; i < 999999; ++i) {
if (prm[i]) continue;
for (int j = i + i; j < 999999; j += i)
prm[j] = 1;
}
while (scanf("%d", &n)) {
if (!n) break;
bool found = 0;
for (int p = 3; p + p ... |
26c799f312862a284a00bf81145e05ffcce05b6c | 255f20f7b6058b89fa156cbcccea58daf89abd48 | etsiry/Pubg-mobile-bullet-tracking | /SDK/PUBGM_Intl_structs.hpp | C++ | hpp | 1,201 | no_license | #pragma once
// PlayerUnknown's Battle Ground Mobile (1.4.0) SDK
#include "PUBGM_Basic.hpp"
#include "PUBGM_CoreUObject_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Enums
//---------------------------------------------------------------------------
// ... |
3191f0e6a72901e82a3166df321427591f9f4407 | e5ffb60c87915bb35342fd12c192c6806a75e6a1 | sellung/BSB | /OOStubs/loesung/usergame/road.cc | C++ | cc | 1,464 | no_license | #include "usergame/road.h"
#include "device/cgastr.h"
#include "syscall/guarded_semaphore.h"
void Road::draw_road(int x, int y, char color){
kout.setpos(x, y);
//kout.print("________________________________________________________________________________", width, color);
//kout.print("______________0_______________... |
d021259a1008a33f25705adb2a1d3e544caf662f | 68facd528558b89460914ddd017b19e724b0139a | townsste/CS162 | /Lab 10/Main.cpp | C++ | cpp | 3,439 | no_license | /****************************************************************************
** Program Filename: Lab 10
** Author: Stephen Townsend
** Date: 12/3/16
** Description: This is the Main.cpp. This program demonstrates the time
difference from recursion and iteration algorithms, by
using the Fibonacci seq... |
385b2d3110c8d856ec92c87a01cd1dd71fe80dec | d7af5b78beb05782bd2f78228aa53a53076938d6 | rajulrs13/SPOJ | /NGM_1419.cpp | C++ | cpp | 227 | no_license | // Rajul Saxena
// rajulrs13@gmail.com
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int k = n % 10;
if (k != 0) {
cout << 1 << endl << k;
}
else{
cout << 2;
}
return 0;
} |
06d49d8ff009ec4a3b26da132bd7d61ef5828479 | b9f400d2fad67530afef01d088afd864c55036af | zhudzh/USACO | /Party Lamps_Bits.cpp | C++ | cpp | 4,169 | no_license | /*
ID: zdzapple
LANG: C++
TASK: lamps
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <string>
#include <climits>
#include <fstream>
#include <math.h>
#include <iomanip>
#include <stdlib.h>
#include <stdio.h>
... |
c025a55cc364b170f84f8f743f6a45e0016c585b | 20fffc0b91829784c5385bcc81abd0deb6333c86 | uvbs/gameengine | /Development/Src/LibBase/DDLReflect.cpp | C++ | cpp | 25,124 | no_license | #include "ZionBase.h"
#include "ConfusedNumber.h"
namespace DDL
{
_U16 StringLength(const char* src)
{
assert(src);
_U16 length = 0;
while(src != NULL && *src++ != '\0') ++length;
return length;
}
}
namespace DDLReflect
{
static bool call_jsonread(DDL::MemoryReader& buf, _U8 type, const STRUCT_INFO* de... |
176dc774a78fe792deed419380ddb196c3f9cb51 | b00f7d34e78db110d27f7de528b7c929ebdca0ef | karthikabinav/SHSTRA14 | /kabinav/tests/laplacian/generator.cpp | C++ | cpp | 2,082 | no_license | #include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
#define MAXN 500
int graph[MAXN][MAXN];
double laplacian[MAXN][MAXN];
int deg[MAXN];
int main()
{
srand(time(NULL)) ;
cout<<"20"<<endl;
int cnt = 0;
while(cnt<20)
{
int i,j;
int n = 300 - cnt;
for(i=0;i<n;i++)
... |
2869a102f91c274f7ce5eefe846e06b868de3e29 | 440796079247a2b310dc9bbb91d4d4e1efb22ced | engyebrahim/CompetitiveProgramming | /UVA/10058.cpp | C++ | cpp | 1,904 | no_license | #include<bits/stdc++.h>
using namespace std;
//Do not copy and paste the output statement. The ASCII code for the apostrophe is different.
string name[]={"tom","jerry","goofy","mickey","jimmy","dog","cat","mouse"},
ver[]={"hate" , "love" , "know" , "like" , "hates" , "loves" , "knows" , "likes"},
ch[]={"a","the"},k;
... |
6e36e1cc4224b69ed81a9be283faeca79fd71375 | 6ba75686f94ffe10000cfbdcb5210f57e20f7a01 | yuan-yuan-jia/algorithm_learning | /sort/bubble_sort.cpp | C++ | cpp | 618 | no_license | #include "sortPublic.h"
void bubble_sort(int a[],int n)
{
if(a==nullptr||n<=0)
{
return;
}
bool isChange = false;
for(int i=0;i<n;i++)
{
for(int j=0;j<n-1-i;j++)
{ if(a[j]>a[j+1])
{
int tmp = a[j];
a[j] = a[j+1];
... |
ace3309930ba63332cc08cf1bec50044abd26f62 | c1f76596e2f4ccc8cc269336faa6c76bd73dd27e | rayenkkj/Travel-Agency | /Hamed 12 12 2019/Atelier_Connexion/mainmenu.cpp | C++ | cpp | 883 | no_license | #include "mainmenu.h"
#include "ui_mainmenu.h"
#include "mainwindow.h"
#include "typedegestion.h"
#include "affectation.h"
#include "song.h"
#include <QMessageBox>
MainMenu::MainMenu(QWidget *parent) :
QDialog(parent),
ui(new Ui::MainMenu)
{
ui->setupUi(this);
connect = new MainWindow(th... |
27f1cd469c68ba1aafc882526f4ba50b8541738c | 0d0ef5ece17f45717a407a285be0f1c8588ba76a | catherinecscst/UofT-Projects | /CSC418/A2__computer-graphics-ray-casting/main.cpp | C++ | cpp | 2,969 | no_license | #include "Object.h"
#include "Ray.h"
#include "Camera.h"
#include "Sphere.h"
#include "Plane.h"
#include "read_json.h"
#include "write_ppm.h"
#include "viewing_ray.h"
#include "first_hit.h"
#include <Eigen/Core>
#include <vector>
#include <iostream>
#include <memory>
#include <limits>
#include <functional>
int main(i... |
6b59ce2a86c48ce25083062a26ba2499b0830fdb | b41e8c9dbd49c3698689bc04d5edcb3b2f2202b7 | shreeshkatyayan/cvCodes | /CVcodes/meanFilter.cpp | C++ | cpp | 1,039 | no_license | #include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
using namespace cv;
int main(int argc, char *argv[])
{
Mat orig_img, img_gray, img_filter;
orig_img = imread(argv[1]);
cvtColor(orig_img, img_gray, CV_RGB2GRAY);
Mat mean_filter(5, 5, CV_32F)... |
7b6a69e6cc05068b1901558aab1cda71572f60f2 | 63c6119ab7f4fe324bb5980c9fd1a370b367ab25 | sitRyo/templateCpp_atcoder | /AtCoder/template.cpp | C++ | cpp | 910 | no_license | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <map>
#include <unordered_map>
#include <set>
using namespace std;
typedef long long ll;
#define INF ... |
9c7d1f761c44e0d5a3aed3377b87263a2ad0aa0d | 96e624ddf0c175ef8ea74fa3d2d11814994cb650 | RcppCore/RcppNT2 | /inst/include/nt2/predicates/functions/is_ngtz.hpp | C++ | hpp | 1,172 | no_license | //==============================================================================
// Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
e063a42db172e5dbc2a16dff2827063f8a080497 | baa38fa03724ea8fc143bf7339d1f7acb855235d | qlcchain/qlcchain-classic | /rai/node/wallet.hpp | C++ | hpp | 8,288 | permissive | #pragma once
#include <rai/blockstore.hpp>
#include <rai/common.hpp>
#include <rai/node/common.hpp>
#include <rai/node/openclwork.hpp>
#include <mutex>
#include <queue>
#include <thread>
#include <unordered_set>
namespace rai
{
// The fan spreads a key out over the heap to decrease the likelihood of it being recover... |
bf77038b3864cf7c3fe0f90da7633e75ba4a806f | ed116d9dd1082fc69dea0395f0ec273e2dc35803 | d1m0nh/LaborDjinni | /android/Greeter/app/src/main/cpp/GreeterImpl.cpp | C++ | cpp | 252 | no_license | //
// Created by Dmitri Hammernik on 08.05.17.
//
#include "GreeterImpl.h"
std::shared_ptr<Greeter> Greeter::create_greeter() {
return std::make_shared<GreeterImpl>();
}
std::string GreeterImpl::welcomeFromCpp() {
return "Hello from c++";
}
|
c581bd49083c5796def79ffca2a43334ec919651 | 4677b6d3b36e2d2cb214d3ceceb0760fb36683db | fengjixuchui/deoptfuscator | /android/art/libartbase/base/variant_map_test.cc | C++ | cc | 6,138 | permissive | /*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
fb863aa43ec07342a667828a8008e428368775cc | 255eb8614d65b5dc793199f1b4e9e37b5af1eae6 | zevenonly/cprimer | /ch03/3-22.cpp | C++ | cpp | 454 | no_license | //
// Created by zhangyw15486 on 2018-01-20.
//
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
vector<string> text;
string in;
while(getline(cin,in))
{
text.push_back(in);
}
cout<<text.size();
for (auto i = text.begin(); i != text.end() ... |
fefb38e355a8159db415f646da2f9de8b48cfbb3 | 757692ce5f918bc31ee8008b31747819b134f0ae | kjbartel/magma | /src/dormqr.cpp | C++ | cpp | 8,967 | no_license | /*
-- MAGMA (version 1.6.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date January 2015
@author Stan Tomov
@author Mark Gates
@generated from zunmqr.cpp normal z -> d, Fri Jan 30 19:00:16 2015
*/
#include "common_mag... |
0cb0294cae1fcae52a13e3e3abc6cc1f34a732fa | a51e93616490a2ec444a6e54a57b5210fb87ee72 | SarthakArora23/xicpp | /swtuch_demo.cpp | C++ | cpp | 555 | no_license | #include<iostream>
using namespace std;
int main(){
int dno;
cout<<"\n Enter day number :";
cin>>dno;
system("cls"); //clrscr();
switch(dno){
cout<<"Hello chetan...Thoda saa dhyan de";
case 1: cout<<"Monday";
break;
case 2: cout<<"Tuesday";
break;
case 3: cout<<"Wednesday";
break;
case... |
c97f19ca8e45d6df07b148c2c720aec9c4dcd46e | 50af92e283f15db862c3f07d7b8fc75b0cf76f4f | a1103688841/Qt-Creator-quick-start | /10/10-07/mydrawing2/widget.cpp | C++ | cpp | 538 | no_license | #include "widget.h"
#include "ui_widget.h"
#include <QPainter>
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
}
Widget::~Widget()
{
delete ui;
}
void Widget::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
QPainterPath path;
path.addEl... |
3f1b0c7c0147f2369cea5312b76bb680a762d0b8 | cbf057a6e0fbbdea56ab1897e75512b5983cca3e | ufwt/Protocol-Analyzer | /test/test_common.cpp | C++ | cpp | 1,006 | permissive | // This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// ============================================================================
// Copyright (c) 2017-2018, by Vitaly Grigoriev, <Vit.link420@gmail.com>.
// Th... |
976d966874086beb3f92131d89e3dbb586bce4d3 | fc21603aba91c0e0d5a4f8220674d083006fccb0 | Eyre-S/OICpp | /src/main/noiac/NC-CT-S01 模拟赛第二场/- C 对称/symmetry.cpp | C++ | cpp | 856 | permissive | #include <iostream>
using namespace std;
bool space[20001][20001];
int dim = 0;
int dotNum = 0;
int change = 0;
int getLink (int);
int main () {
cin >> dotNum >> dim;
register int posx;
register int posy = 0;
for (register int i = 0; i < dotNum; i++) {
// 输入
if (dim == 1) {
cin >> posx;
posx += 100... |
27244f5c8a44b60a4fcf8157070aa79f55a94c99 | 32e3658f0bc5f7e0724e73058d839bd9bb358d41 | malaifa/source | /src/protocols/simple_filters/NMerSVMEnergyFilter.cc | C++ | cc | 8,339 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
11fbb9b6c10086ac8417534804c48f41884b0445 | 35cbb2a931e75ac0143be70545741f75b33fa61c | Bmikelange/Animation | /animation de personnage/graphe d'état/tutos/M2/tuto_mdi_count.cpp | C++ | cpp | 9,678 | no_license |
//! \file tuto_mdi_count.cpp
#include <chrono>
#include "mat.h"
#include "program.h"
#include "uniforms.h"
#include "wavefront.h"
#include "texture.h"
#include "orbiter.h"
#include "draw.h"
#include "app.h"
#include "text.h"
// representation des parametres
struct alignas(4) IndirectParam
{
unsigned int v... |
a423504fa7e04a7171bf6921b10d4f972ce757b2 | 147bd17b82e6fd8d0222dd0e59ffaf1508bec894 | markthomas93/tempwork | /net/tools/quic/quic_server.cc | C++ | cc | 6,654 | no_license | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/tools/quic/quic_server.h"
#include <errno.h>
#include <features.h>
#include <netinet/in.h>
#include <string.h>
#include <sys/... |
d34b1ed768cdd95ebf68a93d61e14e2aecb00003 | 39cb822a1f89dbb3c3bf5a6b8f1e16eee436cca7 | luckyplusten/graphanalytics | /ext/xilinx_apps_common.hpp | C++ | hpp | 3,043 | permissive | /*
* Copyright 2021 Xilinx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
5e5d67d8943816bb739418db0566e1d08378dca7 | a4d6c7cfc1d271d8c7463e6d55d7894e6db8221b | radtek/software-emancipation-discover | /model_server/api_ui/src/client.cxx | C++ | cxx | 10,437 | permissive | /*************************************************************************
* Copyright (c) 2015, Synopsys, Inc. *
* All rights reserved. *
* *
* Redistribution and... |
8001f0cffc18871b617b4b96823123a32d52a1eb | 1ae17f62f5076232b020be78041a9f15fd42a85e | joaovsq/Cross | /Source/Cross/Cross2D/Light2D.cpp | C++ | cpp | 22,137 | permissive | //
// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC 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
// in the Software without restriction, including without limitation the rights
//... |
edc65d63b6f83bff9b7884117085c787d92cd4ee | bbf2c341749b3717607107323ac8abcbddf1c1c1 | FRENSIE/FRENSIE | /packages/monte_carlo/collision/electron/src/MonteCarlo_DecoupledElasticElectroatomicReaction.cpp | C++ | cpp | 1,474 | permissive | //---------------------------------------------------------------------------//
//!
//! \file MonteCarlo_DecoupledElasticElectroatomicReaction.cpp
//! \author Alex Robinson
//! \brief The decoupled scattering elastic electroatomic reaction class
//! instantiations
//!
//--------------------------------------... |
f6c86554e1791e98ffe4af5b3f9674a88bb472a0 | 7a0c0b73b964759643fbdaaa29909c1c79960dbd | MasterMind90/cppractice | /codeforces/336/A.cpp | C++ | cpp | 1,068 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(){
long long x , y ;
cin >> x >> y ;
if ( x > 0 && y > 0 ) {
pair<int,int> p1 = {0,x+y} ;
pair<int,int> p2 = {x+y,0} ;
cout << p1.first << " " << p1.second << " " << p2.first << " " << p2.second << endl;
}
else if ( x > ... |
07bec1becbc2925f961029a439511253ae8844d5 | eb48038e2eede36355e1142ffa1090ba4f82eac3 | TencentCloud/tencentcloud-sdk-cpp | /dsgc/src/v20190723/model/DspaDiscoveryTaskDbResult.cpp | C++ | cpp | 16,640 | 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
... |
aa2bc81a652bbf1ff49edabd81198fefefbe6b94 | 416bc25ec4956ab53257019ae2d697cc84d2d3bb | fahadkhaanz/Competitive-Programming | /B_Frog_2.cpp | C++ | cpp | 2,591 | no_license | //git pull --rebase origin master
#include<bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x) scanf("%d",&x)
#define sl(x) scanf("%lld",&x)
#define ss(s) scanf("%s",s)
#define pi(x) ... |
c620e373113c202c98eb0fcc10e04ca111c3c003 | d7cbee73e4c8d342e4e2d8104773d52f42ffa440 | amitkg29/contrail-controller | /src/vnsw/agent/oper/test/test_intf.cc | C++ | cc | 94,737 | permissive | /*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include "base/os.h"
#include <sys/socket.h>
#include <net/if.h>
#ifdef __linux__
#include <linux/netlink.h>
#include <linux/if_tun.h>
#include <linux/if_packet.h>
#endif
#ifdef __FreeBSD__
#include <sys/sockio.h>
#include <ifaddrs.h>
#endif
... |
05b8fbc99a3ed43eb989a86b243e7ce55540d344 | a2925f853b75116004399f2cebc4b4f4dd9e024b | JieyangChen7/DVFS-MAGMA | /test/magma-1.6.0/src/ssygst_m.cpp | C++ | cpp | 40,034 | no_license | /*
-- MAGMA (version 1.6.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date November 2014
@author Raffaele Solca
@author Azzam Haidar
@generated from zhegst_m.cpp normal z -> s, Sat Nov 15 19:54:10 2014
*/
#include "co... |
52ed4fa4b8df377ea05f00fd79afa9eccaed749b | 10ce26b5b668ebe31b39a080ada7b8a1d4bcda72 | rsura-edu/CPSC350_FA21_ASSIGNMENT3_SURA | /MirrorMode.cpp | C++ | cpp | 3,309 | no_license | /**
* Implementation File: MirrorMode.cpp
*
* Full Name: Rahul Sura
* Student ID: 2371308
* Chapman email: sura@chapman.edu
* Course: CPSC 350-03
* Assignment: Assignment 3
*/
#include "MirrorMode.h"
using namespace std;
/**
* Default constructor:
* Creates a doughnut mode simulation where the starting map ... |
66b01c5878f59957b0c138fd7772f1934222812c | 7d6d02dd714684b674fbda7ec7729cf63fd3305b | mksy/st_hunter | /trunk/SieGet/url_input.cpp | C++ | cpp | 7,827 | no_license | /*******************************************************************************
Диалог ввода URL
*******************************************************************************/
#include "include.h"
#include "inet.h"
#include "url_input.h"
#include "gui.h"
#include "log.h"
#include "daemon.h"
#include "rect_... |
7b9e9cb3006e068ad33ccc203caafcce97187a83 | 039713e5d6ffad81d74078b160b18d123d661732 | buihuy17/Test | /C++/demtu.cpp | C++ | cpp | 381 | no_license | #define ll long long
#include <bits/stdc++.h>
using namespace std;
main()
{
int t;
cin >> t;
cin.ignore();
while (t--)
{
int dem = 0;
string s;
getline(cin, s);
stringstream p(s);
string tmp;
while (p >> tmp)
{
dem++;
}
... |
a31a3fa9fb1c8b7abd76ffe8263af85fbfed1b28 | 3dc00ff1337b49f465e9421593ab4dd46f302f4d | wanicca/datastruct | /maze.cpp | C++ | cpp | 3,465 | no_license | #include <iostream>
#include <queue>
#include <map>
using namespace std;
class Maze
{
public:
const int m;
const int n;
Maze(int _m,int _n):m(_m),n(_n){
mazemap = new int*[m];
for (int i = 0; i < m; i++)
{
mazemap[i]=new int[n];
}
}
~Maze() {
fo... |
1a7397c888dc33f58e61ea591a958c324f9a3ee3 | 8f53ce6bdf5383ffe311e8864bb18ff1ac3c9170 | luisdavid24/c- | /combinatoria.cpp | C++ | cpp | 381 | no_license | #include <iostream>
float C,FAC1,FAC2,FAC3,fac;
int m,n,i;
using namespace std;
void factorial(int x)
{ fac=1,i=2;
while (i<=x)
{ fac=fac*i;
i=i+1;
}
}
int main(int argc, char** argv){
cout<<"M:";
cin>>m;
cout<<"N: ";
cin>>n;
factorial(m);
FAC1=fac;
factorial(m-n);
FAC2=fac;
factorial(n);
FAC3=fac;
C... |
c9e95c73cf49f9ec0ad0747ecb5d45422e9887d6 | 42c5479bd1a28255cf6c70527ff292a3f73b3c9b | xibeilang524/ota_linux | /ota/dll/skyota/src/SkyOTAUpgrade.cpp | C++ | cpp | 4,571 | no_license | #include "SkyOTAUpgrade.h"
#include "SkyOtaDownloader.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "debug_log.h"
using namespace skyota::net;
using namespace skyota::io;
using namespace skyota::facade;
static SkyOtaDownloader* prDownloader = NULL;
static int s_i4VersionHasBeenC... |
286342d2f1e68eeb20ba639733730e7569bd433f | ac9823e5ca0fde43e3484f40771a1c210dde30f2 | arachchi/valhalla | /test/astar.cc | C++ | cc | 62,640 | permissive | #include "midgard/logging.h"
#include "test.h"
#include <cstdint>
#include <fstream>
#include "baldr/graphid.h"
#include "baldr/graphreader.h"
#include "baldr/location.h"
#include "baldr/rapidjson_utils.h"
#include "baldr/tilehierarchy.h"
#include "filesystem.h"
#include "loki/search.h"
#include "loki/worker.h"
#inclu... |
a50d5cd7871a598727e20726ac7592e91aa4cdd7 | 3d374a0413023e57eb81355c6578bdf5ed1b520c | universeroc/cpp_programmer | /algorithm/algorithm.cpp | C++ | cpp | 3,553 | no_license | // algorithum.cpp : Defines the entry point for the console application.
//
#include "tchar.h"
#include <iostream>
//#define TEST_QUICK_SORT
//#define TEST_MATRIX_TRANSFORM
#define TEST_LINKED_NODE
//#define TEST_STRING_UTIL
#ifdef TEST_QUICK_SORT
#include "quick_sort.h"
#endif
#ifdef TEST_MATRIX_TRANSFORM
#include... |
40aac6775ad6edea6885de503f995af647a04e20 | c7d637c427fcf80ebc46a5a1d3d188da924286cc | fortressforever/fortressforever | /external/boost/include/boost/iostreams/detail/error.hpp | C++ | hpp | 1,529 | permissive | // (C) Copyright Jonathan Turkanis 2003.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
// See http://www.boost.org/libs/iostreams for documentation.
#ifndef BOOST_IOSTREAMS_DETAIL_ERROR_HPP_INCLUDED
#def... |
67af5c03e4cdadb3b7350ab31ed1f30085a81630 | da0c4def26216ff8462ce85c4799c802a5662e2f | VL4Dyan/FPSomething | /Source/FPSomething/Private/Characters/Abilities/AttributeSets/AttributeSetBase.cpp | C++ | cpp | 5,122 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "Characters/Abilities/AttributeSets/AttributeSetBase.h"
#include "Characters/CharacterBase.h"
#include "GameplayEffect.h"
#include "GameplayEffectExtension.h"
#include "Net/UnrealNetwork.h"
UAttributeSetBase::UAttributeSetBase()
... |
c296ecd7c4e3e0db6b427c89861c11bb9a23ff54 | d18a9da7d814a1817aab635c6da7cff0ea4363b0 | budsan/Biribit | /TestClient/Console.cpp | C++ | cpp | 6,924 | permissive | #include "Console.h"
#include <cstdarg>
#include <cstdlib>
Console::Command::Command()
: name("blah"), parser(NULL), data(NULL)
{
}
Console::Command::Command(const std::string &name, Parser parser, void* data)
: name(name), parser(parser), data(data)
{
}
Console::Command::Command(const Command &other)
: name(oth... |
eaccc069fe5e1f5df45196d324758b8c773531f5 | c78f3cc0ecbf174acdeecc330cf5770c113be074 | ELFoglalt/aimotive-project | /src/neuralnet.cpp | C++ | cpp | 2,184 | no_license | /**
! A note on these implementations:
* The NeuralNet class was written for a
* neural network which is known at compile time,
* and does not implement any sanity checks during
* runtime. An in-formatted network will most likely
* fail with out_of_range in deubg mode.
*
* The neural net written in config.h is... |
9ef4eacd89cf9b4431ca356c5de7eb26d1434d7e | bf1276d17967b25e5fc7d4a82a6afcfa1f17ef51 | ywang021/catboost | /catboost/libs/algo/data.cpp | C++ | cpp | 15,697 | permissive | #include "data.h"
#include "approx_dimension.h"
#include <catboost/libs/data_new/borders_io.h>
#include <catboost/libs/data_new/quantization.h>
#include <catboost/libs/helpers/exception.h>
#include <catboost/libs/helpers/restorable_rng.h>
#include <catboost/libs/labels/label_converter.h>
#include <catboost/libs/metr... |
2f7b9200c82709afd924d05fcf0cd702a6708495 | cad7321328617f7a1a2d847c24540b11939496ed | marcclintdion/PARTICLE_GPU_MAY_09 | /_MODEL_FOLDERS_/_modelNameHere/load_3ds.cpp | C++ | cpp | 6,635 | no_license | /*
* ---------------- www.spacesimulator.net --------------
* ---- Space simulators and 3d engine tutorials ----
*
* Author: Damiano Vitulli <info@spacesimulator.net>
*
* ALL RIGHTS RESERVED
*
*
* 3ds models loader
*
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include... |
799c0ba59f916f40c4de11511993616d1ba4c35b | 11bb16334bfe9c0df383ecdd3c300600c258348f | yy147379138/local_IOC | /src/function.cpp | C++ | cpp | 1,123 | no_license | #include <iostream>
#include <cstdlib>
#include <math.h>
using namespace std;
pair<int,int> dimens(490,321);
pair<double,double> center(-3.82,-1.93);
double scale = 0.04;
pair<int, int> realToGrid(double x, double y, int factor) {
pair<int, int> point;
point.first = ((int)floor((x-center.first)/scale+ceil(d... |
203af3bf62e7a221c94729522de05a18dbdc8f9d | 899cb45c5a1471f53ec7620c30c57af70e7a3d51 | MartinMReed/XenDLL | /d3d8.DLL/Built-in Extension Files/Screenshot Files/Screenshot.cpp | C++ | cpp | 11,401 | permissive | #include "../../CustomDevice Files/CustomDevice.h"
#include "Capture Files\blit.h"
#include "Capture Files\BMP Functions.h"
//#include "Capture Files\DIB Functions.h"
#include "Capture Files\JPG Functions.h"
Screenshot* g_Screenshot = NULL;
//-------------------------------------------------------
// adapt... |
71f254064f7cfe212604ca56673b996f9f93b1b1 | 828807fd5db47c89aa3ae24f336a0f155799c6d8 | wingo/webkit | /Source/WebKit2/UIProcess/DrawingAreaProxy.cpp | C++ | cpp | 2,461 | no_license | /*
* Copyright (C) 2010 Apple 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 conditions a... |
ec254cd6a8834c81c75eaccb37bc40f8876759e0 | 42961da72f1652b209952b57643ecaf54d6a64de | oddcard2/codeforces | /educational/10/B/main.cpp | C++ | cpp | 1,850 | no_license | #include "bits/stdc++.h"
using namespace std;
////////////
const int mod = 1000000007;
template<typename T>
inline int add(T a, T b) { return a + b >= mod ? a + b - mod : a + b; }
template<typename T>
inline void inc(T& a, T b) { a = add(a, b); }
template<typename T>
inline int sub(T a, T b) { return a - b < 0 ? a ... |
bfbc7354a17117d3127693ba67b530bc7a0eb9c2 | a6f47cd9c2f5e195edbfcf5cb2fadc72484fdef1 | yuntk/algorithm | /baekjoon/stepByStep/21_back_tracking/15651.cpp | C++ | cpp | 810 | no_license | /*
* https://www.acmicpc.net/problem/15651
* 자연수 N과 M이 주어졌을 때, 아래 조건을 만족하는 길이가 M인 수열을 모두 구하는 프로그램을 작성하시오.
*
* 1부터 N까지 자연수 중에서 M개를 중복 허용하여 고른 수열
* 고른 수열은 오름차순이어야 한다. 사전순
*
* : dfs, backtracking
*/
#include <iostream>
#include <vector>
using namespace std;
int N, M;
void dfs(int pos, int remain, vector<int> &... |
ae4a7f4550f5bdf13add9d1359874dd64af4cef1 | 20a9de3da530fcd2548fd75f2570ce23bc2737a0 | DBerger31/CS235 | /project1B/CourseMember.cpp | C++ | cpp | 657 | no_license | /*
@file CourseMember.cpp
Project 1A
Created by Daniel Berger on 2/03/19
Implementation of CourseMember
Returns id, first name and last name
*/
#include "CourseMember.hpp"
#include "Student.hpp"
#include <iostream>
#include <string>
CourseMember::CourseMember(int num, std::string name, std::string su... |
7ce0df298f3e262aad65227f17c4a8718b6e290f | 17143da4f4bdc8d062e21d494853883865684460 | perhapsRay/Jamie-Ray-GameDev-Software | /RogueProject/RogueProject/Source.cpp | C++ | cpp | 6,425 | no_license | #include <windows.h>
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <sstream>
#include "player.h"
#include "gamemanager.h"
using namespace std;
unsigned int itemPosX;
unsigned int itemPosY;
unsigned int enemyPosX = 18;
unsigned int enemyPosY = 3;
string potion = "Health potion.";
... |
189d5b4d34a10dfb2a02d1885131cdec3fc8c2db | 2ab3230c517e06623729ac1988160a46abf1824f | zinsmatt/Programming | /HackerRank/Algorithms/easy/QuickSort-1-Partition.cxx | C++ | cxx | 719 | no_license | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n;
cin >> n;
vector<int> tab(n);
for(int i=0;i<n;i++) cin>>tab[i];
int p = tab[0];
... |
70f1be6125a2a8283854bf487b7358454dd9d154 | 8850c74ca7a9933eb304ac6e862a8e0a13c9ae66 | lagner/backbone | /backbone/src/pagepresenter.cpp | C++ | cpp | 1,266 | no_license | #include <backbone/pagepresenter.h>
#include <QtQuick/QQuickItem>
#include <QtQml/QQmlProperty>
namespace Backbone {
PagePresenter::PagePresenter(QObject * parent)
: Presenter(parent)
{
}
void PagePresenter::onCreate(QQuickItem * view, const QVariantMap &)
{
QQmlProperty stackViewProperty(view, "StackVie... |
3665f96f9034bee30cde0aae44456670ec501f32 | 1832e10af10326fd0d58db5fe54a8f62238dfdc4 | yangzhengxing/luxrender | /luxmax/LuxMax.cpp | C++ | cpp | 23,127 | no_license | /***************************************************************************
* Copyright 1998-2015 by authors (see AUTHORS.txt) *
* *
* This file is part of LuxRender. *
* ... |
4c84f081fd1e4ed9ec2749b5ad34f29959c59218 | 644576272d02cd2b3d1d9e4e535a868770bf6235 | liang0/ClickHouse | /dbms/src/Storages/StorageDistributed.cpp | C++ | cpp | 20,093 | permissive | #include <Storages/StorageDistributed.h>
#include <DataStreams/OneBlockInputStream.h>
#include <DataStreams/materializeBlock.h>
#include <Databases/IDatabase.h>
#include <DataTypes/DataTypeFactory.h>
#include <DataTypes/DataTypesNumber.h>
#include <Storages/Distributed/DirectoryMonitor.h>
#include <Storages/Distrib... |
d794bbd93f638a1111e26de0676c20a260f7e407 | 3b255197a8c095b26b65860fd8e6f0d44b35be64 | amzeratul/halley | /src/engine/core/src/api/halley_api.cpp | C++ | cpp | 4,809 | permissive | #include <utility>
#include "halley/api/halley_api.h"
#include <halley/plugin/plugin.h>
#include "halley/audio/audio_facade.h"
#include "halley/support/logger.h"
#include "halley/entry/entry_point.h"
using namespace Halley;
void HalleyAPI::assign()
{
Expects(coreInternal != nullptr);
Expects(systemInternal != nullp... |
1bd5942af0e3b7639a50a401c92d954ec73c5000 | d2ac474fc18a12fa704758d8b54e4f88a3d4b6a0 | SlimDX/slimdx | /source/direct3d9/ParameterDescription.cpp | C++ | cpp | 3,127 | permissive | #include "stdafx.h"
/*
* Copyright (c) 2007-2012 SlimDX Group
*
* 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, ... |
bf7a82dcd1402de5cc7fbf47dbe4aefc9b78692c | 8db2bcb6743e2580e6040a106cc6787c4677d4ea | khanny17/game | /src/model/chunk.hpp | C++ | hpp | 1,108 | no_license | #pragma once
#include "util/vector2.hpp"
#include "model/tile.hpp"
#include "object.hpp"
#include <memory>
#include <vector>
#include <SDL2pp/Texture.hh>
/**
* A section of the world
*/
class Chunk
{
public:
/**
* Creates a new chunk with no neighbors
*/
Chunk(SDL2pp::Texture &texture, Vector2<int... |
0166aa431dea28f0e443aa157ada397ac84020c2 | 8a1632b58ffd876b7f23e2c9f56357dc2c1b25aa | Violet26/msdn-code-gallery-microsoft | /OneCodeTeam/How to intercept JavaScript alert in WebView in universal Windows apps/[C++]-How to intercept JavaScript alert in WebView in universal Windows apps/C++/CppUnvsAppWebViewJSInterceptor/CppUnvsAppWebViewJSInterceptor.WindowsPhone/MainPage.xaml.cpp | C++ | cpp | 3,030 | permissive | /****************************** Module Header ******************************\
* Module Name: MainPage.xaml.cpp
* Project: CppUnvsAppWebViewJSInterceptor.WindowsPhone
* Copyright (c) Microsoft Corporation.
*
* This code sample shows you how to intercept JavaScript alert in WebView and
* display the alert message ... |
24aff4b2ec4fccedd799abefd0de3ca950b59468 | 177fff952a5cb7e461b334d2f85f803c7c71d91c | motxx/cpro-mochinocha-library | /Graph/min_cost_flow.cpp | C++ | cpp | 1,329 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define MAX_V 1001
#define MAX_M 10001
#define INF 1e9
struct edge {
int to, cap, cost, rev;
edge(int to, int cap, int cost, int rev) :
to(to), cap(cap), cost(cost), rev(rev) {}
};
int V;
vector<edge> G[MAX_V];
int dist[... |
6de134eaa1ed0ebdb5ee55fb88976b33e73667fd | 640f2888c6cd214fe4b86715a05932e3fe7517c8 | Vlazze/genetic | /algorithm/lesson.cpp | C++ | cpp | 204 | no_license | #include "lesson.h"
lesson::lesson(group *grp, subject *sbj, teacher *tchr, room *rm, int time)
{
m_group = grp;
m_subject = sbj;
m_teacher = tchr;
m_room = rm;
m_timeIndex = time;
}
|
84ad251acde88d0ca544c4322dfe496124a367ba | c37258403f225673b207142ac53712141368dc83 | mgh3326/iridium-browser | /components/arc/test/fake_clipboard_instance.cc | C++ | cc | 758 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/arc/test/fake_clipboard_instance.h"
namespace arc {
FakeClipboardInstance::FakeClipboardInstance() = default;
FakeClipboardInstanc... |
764f669013f85473dddf73bce71480728ae68822 | dca5d9edf26aeb2cf241c55e4cd341511fafa7c1 | MadhuriMane/ios-djvu-reader | /trunk/DjvuViewerApp/External/djvulibre-3.5.24/libdjvu/DjVuDocument.cpp | C++ | cpp | 54,865 | no_license | //C- -*- C++ -*-
//C- -------------------------------------------------------------------
//C- DjVuLibre-3.5
//C- Copyright (c) 2002 Leon Bottou and Yann Le Cun.
//C- Copyright (c) 2001 AT&T
//C-
//C- This software is subject to, and may be distributed under, the
//C- GNU General Public License, either Version 2 of ... |
2ff14b11a242e8e8c370c2e0d80fa7cd62e73d8f | 7c9e65474bcf2885e5c25146449e461a9d32b127 | INORI-HANABI/object-detection-TYcamera | /video-collect/sample/common/common.hpp | C++ | hpp | 12,911 | permissive | #ifndef SAMPLE_COMMON_COMMON_HPP_
#define SAMPLE_COMMON_COMMON_HPP_
#include "Utils.hpp"
#include <opencv2/opencv.hpp>
#include "DepthRender.hpp"
#include "MatViewer.hpp"
#include "TYThread.hpp"
#include "TyIsp.h"
static inline int parseFrame(const TY_FRAME_DATA& frame, cv::Mat* pDepth
... |
077a10082d99853fa3456f79770fbfca62bf786d | 9ac4732971c62f79a7d522aa89843665fe970e16 | ungi/OpenIGTLinkIF | /MRML/vtkMRMLIGTLConnectorNode.cxx | C++ | cxx | 48,536 | no_license | /*=auto=========================================================================
Portions (c) Copyright 2009 Brigham and Women's Hospital (BWH) All Rights Reserved.
See Doc/copyright/copyright.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Program: 3D Slicer
Module: $RCSfile: vtkMRMLGradientA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.