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 |
|---|---|---|---|---|---|---|---|---|
c3b890022d35dce0fc1fa0b7b1932722a3b815b8 | d2e8c7951a8dd1035edd7187a06c42778bbac04d | ItzKaserine/Dovelet | /jump/401200_AC_2.24SEC.cpp | C++ | cpp | 949 | no_license | #include<stdio.h>
#include<stdlib.h>
struct A {
int x,jump,spring;
};
int dp[501][501];
A spring[501];
int n;
int main() {
scanf("%d",&n);
int i,j,k;
for(i=1;i<=n;i++) {
scanf("%d%d%d",&spring[i].x,&spring[i].jump,&spring[i].spring);
}
dp[1][1]=1;
if(spring[2].x-spring[1].x <= spring[2].jump && s... |
b764877a5dfa59832f53cb5945774333e2194673 | 1adb1ae334e96987205b896ea8c498b1783ab7c5 | evgeniy-mh/the-weather | /src/CO2Meter/CO2Meter.cpp | C++ | cpp | 631 | no_license | #include "CO2Meter.h"
MHZ19 MHZ19_Obj;
// SoftwareSerial MHZ19Serial(MHZ19_TX_PIN,MHZ19_RX_PIN);
// Serial.
void CO2Meter::initCO2Meter(){
// Serial.println("MHZ19b::: Initializing...");
// MHZ19Serial.begin(MHZ19_BAUDRATE, SWSERIAL_8N1,MHZ19_TX_PIN, MHZ19_RX_PIN);
Serial.begin(MHZ19_BAUDRATE,SERIA... |
1f083f4462b74edbb5f7cf664367d1e54b4c508e | c1642b1980da4d6be40b708a4c65bb6331f7491f | lucasLMT/v8 | /src/full-codegen.cc | C++ | cc | 54,258 | permissive | // Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/v8.h"
#include "src/code-factory.h"
#include "src/codegen.h"
#include "src/compiler.h"
#include "src/debug.h"
#include "src/full-codegen.... |
ba01dbc5f940ccf5f749076901e84d26879f2200 | bc9d8b4f2723cd9a0b25e804bcd66fb5c7bb6d98 | LMazilu/Progetti-delle-superiori | /C/Programmi C/programmi C seconda parte/Temperatura/v2.cpp | C++ | cpp | 12,946 | no_license | #include<iostream>
#include<conio2.h>
#include<stdio.h>
#include<stdlib.h>
#include<windows.h>
#include<time.h>
int main() {
int const n=4;
int scelta,tc,i,ang1,ang2,ang3,ang4,orr,vert,X,Y,orr1,vert1;
float V[n],tmin,tmax,media;
char risp;
ang1 = 201;
ang2 = 187;
ang3 = 188;
ang4 = 200;
orr = 205;
vert = 1... |
999d839bc9f099119ad4023b1548a0200cd54e05 | 21bce1bb8ef9e44f337c25a3dbb6457ce3eaa3df | mickpr/B2V | /B2V/main.cpp | C++ | cpp | 4,385 | no_license | #include <Magick++.h>
#include <iostream>
#include <string>
// sudo apt-get install libjsoncpp-dev - https://en.wikibooks.org/wiki/JsonCpp
#include <jsoncpp/json/json.h>
#include <map>
#include <fstream>
#include "Weft.h"
#include "TimeCounter.h"
#include "Trapezoid.h"
using namespace std;
using namespace Magick;
i... |
69f295657cccbac50f9836b200a2378cfa7b2edb | 97bb76cf52cbeed143907b3741331fc962507fc0 | nwoeanhinnogaehr/Flosion | /ui/core/include/Flosion/UI/Core/ArgumentParser.hpp | C++ | hpp | 2,639 | no_license | #pragma once
#include <memory>
#include <optional>
#include <sstream>
#include <string>
#include <vector>
namespace flui {
class ArgumentParser {
public:
template<typename T>
void add(T& target);
template<typename T>
void add(T& target, std::initializer_list<T> permittedValu... |
643a4f0b62cc43d18633cef04aae9a5ac48863d6 | 67ca153e216cf8aa2a668b33b810d28720923978 | msskii/Well-Informatik-ned-eso-informativ-isch | /Informatik/Informatik/graphics/overlay/PopupText.hpp | C++ | hpp | 594 | no_license | //
// PopupText.hpp
// Informatik
//
// Created by Aaron Hodel on 04.12.18.
// Copyright © 2018 Aaron Hodel. All rights reserved.
//
#ifndef PopupText_hpp
#define PopupText_hpp
#include "Menu.hpp"
class PopupText : public Menu
{
private:
const char* text;
int decayTimer, maxDecay;
public:
PopupT... |
749be985d1fc957af1f99ce78a8a5470f0ed296e | 2d50c6dd700b5caaf31f6eea5cfa89646b1810b5 | mahim007/Online-Judge | /uva/11364.cpp | C++ | cpp | 471 | no_license | #include<bits/stdc++.h>
using namespace std;
#define i64 long long int
int main()
{
i64 T,t,n,i;
scanf("%lld",&T);
for(t=1;t<=T;t++)
{
scanf("%lld",&n);
i64 data;
i64 maxx=0,minn=100;
for(i=0;i<n;i++)
{
scanf("%lld",&data);
if(data>maxx)
... |
29859576030885763fefa407ffae53efa25abac8 | 46d8ccf31cea57652f11d8d570ba533e91b2a312 | madera/Moneta | /tests/core/moneta/traits/member_name_test.cxx | C++ | cxx | 3,502 | permissive | // [===========================================================================]
// [ M o n e t a ]
// [---------------------------------------------------------------------------]
// [ ... |
a71907a724904bd9dc2aec57033e5d69bac2fccf | 3b84fccdd9a45101218b2cdb1387a115510d5b4e | Vidachain/Vida-Project | /src/test/miner_tests.cpp | C++ | cpp | 11,195 | permissive | // Copyright (c) 2011-2014 The Bitcoin Core developers
// Copyright (c) 2016-2019 The PIVX developers
// Copyright (c) 2020 The VIDA developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "main... |
2ece5de1550901d9a436445e59fc8ba0e8785f4c | 8fba1c449e7fb234c02668912718bf7c48209934 | rockduan/androidN-android-7.1.1_r28 | /WORKING_DIRECTORY/bionic/tests/malloc_test.cpp | C++ | cpp | 14,115 | no_license | /*
* Copyright (C) 2013 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... |
93c43913bb4e5b2ac297a01818083cd963dfed26 | 8591e515e80a914ddbff673844e84ef7f40998b0 | couchbaselabs/txn_server_c- | /src/Handle.cpp | C++ | cpp | 26,884 | no_license | /*
* Handle.cpp
*
* Created on: May 11, 2012
* Author: mnunberg
*/
#include "sdkd_internal.h"
#include "txn_server.grpc.pb.h"
namespace CBSdkd {
extern "C" {
void Handle::VersionInfoJson(Json::Value &res) {
Json::Value caps;
Json::Value config;
Json::Value rtComponents;
... |
892d1d12437930d5faf24b67595da77713cc4ed3 | 3600511bb3e983dd017a641b2bf1b0088886931a | petersohn/sokoban | /src/BackupSaver.hpp | C++ | hpp | 683 | no_license | #ifndef BACKUPSAVER_HPP
#define BACKUPSAVER_HPP
#include <boost/filesystem.hpp>
#include <fstream>
namespace sokoban {
class BackupSaver {
public:
BackupSaver(const std::string& filename):
filename(filename), temporaryFilename(filename + "~"),
stream(temporaryFilename, std::ios::out | st... |
349272e1771240784ff762952f4772e621d783af | 42b2a90fbd17e3c97d2e4bb6d5813b9af942a8f1 | 0xbabayaga/AquariumStory | /c++/androidnotification.cpp | C++ | cpp | 1,594 | no_license | #include "androidnotification.h"
#include <QtAndroid>
AndroidNotification::AndroidNotification(QObject *parent) : QObject(parent)
{
}
void AndroidNotification::setTitle(const QString &title)
{
_title = title;
}
void AndroidNotification::setMessage(const QString &message)
{
_message = message;
}
void Android... |
76afc527e86c43e548a6c6a58c14159bf7d3c3f1 | cbc1f0459124c7a7f462455df601f731bf3a807b | Grestrom/Goal-Boundling-exam | /ConsoleApplication2/ConsoleApplication2.cpp | C++ | cpp | 3,721 | no_license | #include "stdafx.h"
#include <iostream>
#include <string>
#include <stdlib.h>
#include <vector>
using namespace std;
char web[28][50];
bool web_nwse[4][28][50];
int web_way[28][50];
vector <int> x;
vector <int> y;
void out_web()
{
system("cls");
for (int i = 0; i < 28; i++)
{
for (int j = 0; j < 50; j++)
{
... |
168d23319a645c11368489e4c25bf511700e068e | f432c8b55da9589f46f48a9aa8564eff44691061 | Cyrus531/15666_game1 | /StoryMode.cpp | C++ | cpp | 7,306 | permissive | #include "StoryMode.hpp"
#include "Sprite.hpp"
#include "DrawSprites.hpp"
#include "Load.hpp"
#include "data_path.hpp"
#include "gl_errors.hpp"
#include "MenuMode.hpp"
Sprite const *sprite_room = nullptr;
Sprite const *sprite_self = nullptr;
Sprite const *sprite_street = nullptr;
Sprite const *sprite_cafe= nullptr;
S... |
8c30efdd243250fa88819d5b7782c68a5b01b6f8 | 20c245b6704b698fb1bdb700bbfd9ba61c190073 | T-ani/Basic_Algorithms | /ShortestPathAlgorithms/dijkstra_sAlgorithm/main.cpp | C++ | cpp | 4,807 | no_license | #include <iostream>
#include <vector>
#define infinity 1000
#define size 6
using namespace std;
/*
Dijkstra's shortest path algorithm for single source is used to determine the minimum
path length needed to be traversed to get to each vertex from the source vertex.
A slightly updated version of this algorithm can also... |
ca4aaba2bd58a9a93a4e4987d9b2225a35d286eb | c4621eaf9097b56e55e7bbe2b4b3dbbb23180587 | tpltnt/binnavi | /debug/client/DebugException.hpp | C++ | hpp | 1,333 | permissive | // Copyright 2011-2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... |
8fda284184ac0f6ea2d37af0bbcd757609cced6c | cfc208975de0db91135e02d393a21f11930da4ea | KeiHasegawa/ISO_IEC_14882 | /14_Templates/0_Templates/test150.cpp | C++ | cpp | 298 | no_license | #include <stdio.h>
template<class C> struct S {
C m;
template<class C2> void f(C2 c2);
};
template<class C> template<class C2> void S<C>::f(C2 c2)
{
printf("S<C>::f(C2> called\n");
printf("m = %f, c2 = %d\n", m, c2);
}
int main()
{
S<double> sd;
sd.m = 0.5;
sd.f(5);
return 0;
}
|
b454939bf92d695032b9e2ff0e2e30f693373306 | 5b9de29c04ffa6b4fb001ad8415f38202122dc79 | syllcs/primer | /c6/6.39.cpp | C++ | cpp | 251 | no_license | #include <iostream>
using namespace std;
void calc(int a, int b) {
cout << "1" << endl;
}
void calc(const int a, const int b) {
cout << "2" << endl;
}
int main() {
calc(1,2);
int a = 0, b = 1;
const int c = 0, d = 1;
calc(a, b);
calc(c, d);
}
|
c382970923907f88151a8f0d00f5b6595da87ee0 | fb645ae38aeb72fde22d52366792cc48ef814d55 | cabb99/openmm | /openmmapi/src/CustomResiduePairForce.cpp | C++ | cpp | 10,458 | no_license | /* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from *
... |
f162872d16cba9f12cf5979976f4c7f225f9ef81 | e1a690e192f7f2f97af6d430da3e617737b52522 | stanleywxc/chromium-noupdator | /src/chrome/browser/notifications/scheduler/internal/notification_scheduler.cc | C++ | cc | 14,764 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/notifications/scheduler/internal/notification_scheduler.h"
#include <set>
#include <string>
#include <utility>
#include <vector>... |
597b9a53a19b64a75b0de4f7dd2100fc05226352 | aeb824c9420102133d6feb857516cbe5815ce73b | thecodingwizard/competitive-programming | /UVA/UVa 10503 - The dominoes solitaire.cpp | C++ | cpp | 1,437 | no_license | #include <iostream>
#include <string>
#include <utility>
#include <sstream>
#include <algorithm>
#include <stack>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <cmath>
using namespace std;
#define INF 1000000000
#define LSOne(S) (S & (-S))
typedef vector<int> vi;
int n, ... |
87e12179a6e7713452e893660c5f33431ed80633 | bedcc90f61ca1a0913bf2553575b9be42c25e5dd | iut62elec/HELICS-src | /src/helics/cpp98/Core.hpp | C++ | hpp | 3,321 | no_license | /*
Copyright © 2017-2018,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC
All rights reserved. See LICENSE file and DISCLAIMER for more details.
*/
#ifndef HELICS_CPP98_CORE_HPP_
#define HELICS_CPP98_CORE_HPP_
#pragma once
#include "../shared_api_library/hel... |
b2b8b90becf06dfb74a886aa49f7fddbffdd01f9 | 32bae3e4492cc601bb41f4a16e783a56172d9f9a | Wesleylin0312/homework18 | /homework18.cpp | C++ | cpp | 434 | no_license | #include <stdio.h>
int main()
{
const int number = 10;
int x;
int i;
int count[number];
printf("輸入數字:");
printf("輸入-1開始計算");
for (i = 0; i < number; i++)
{
count[i] = 0;
}
scanf("%d", &x);
while (x != -1)
{
if (x >= 0 && x <= 9)
{
count[x]++;
}
scanf("%d", &x);
}
... |
5b329b1b3b07696ad630df228f5904b30506f469 | 1a0b9f073f433304773a7973461f7ade8d7b5b28 | wangzilong2019/text | /算法练习/合并排序.cpp | C++ | cpp | 1,269 | no_license | //归并排序
//先分解,排序,然后再合并 ,不一定合并
#include<stdio.h>
#define MAX 100
void merge(int a[], int low, int mid, int high) {
int temp[MAX]; //用于临时存放排序好的元素
int i = low; //左指针
int j = mid + 1;
int k = 0;
while (i <= mid && j <= high) {
//从小到大放入辅助数组temp中
if (a[i] < a[j]) {
temp[k++] = a[i++];
}
else {
temp[k++]... |
2d45e01746e4486fd33cab56f4d165ad49187505 | 35e33755de68a660bcf95cdaccd3376cf16ca9c4 | islem-teboub/Introduction-To-NS3-Simulator | /Simulation 4 - (Adhoc and P2P Client Server Topology).cc | C++ | cc | 4,190 | no_license | /// client1 (App1)----------liaison Adhoc------Access Point (SERVER)----------liaison p2p---------- client2(App2)
/// 192.168.1.2 192.168.1.1 & 192.168.2.2 192.168.2.1
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3... |
c3d2a99fcfb547ce6eafd72b42ca8e55c5a884d1 | a633a25c50a071cdc48567c69082beccf7a248df | ms31dc/LeetCode | /Algorithms/Stone Game/StoneGame.cpp | C++ | cpp | 1,025 | no_license | class Solution
{
public:
bool stoneGame(vector<int>& piles)
{
int i = 0;
int j = piles.size()-1;
int alexSum = 0, leeSum=0;
bool alexTurn = true;
while(i <= j)
{
if(alexTurn)
{
if(piles[i] >= piles[j])
... |
612f8991820fed91c5f6f3c6e5d424e04f89403c | c894d4a058c316e9c9fa4c05799e04833f51c7b8 | nuruddinansari/opencv-portrait-facedetection | /portraitFaceDetection/src/main/jni/include/opencv2/core/va_intel.hpp | C++ | hpp | 2,890 | no_license | // This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2015, Itseez, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
... |
6955ac65d3ce5c62af6b8cece4de74f508e33567 | 9a95fb84e5f4e0d6ebe2601b8ac27e3d21dda2bf | marc-hanheide/cogx | /subarchitectures/vision.sa/trunk/src/c++/vision/components/PeopleDetector/PeopleDetector.hpp | C++ | hpp | 2,029 | no_license | #include <Ice/Ice.h>
#include <Laser.hpp>
#include <cast/core/CASTComponent.hpp>
#include <cast/architecture/ManagedComponent.hpp>
#include <VideoClient.h>
#include <VisionData.hpp>
#include <highgui.h>
#include <cvaux.h>
namespace cast
{
/**
* Written by Costas Cristofi at Birmingham.
*/
class People... |
dc59a4a20f5fad64dcedd46574551b8281adc3f7 | 041787014a44eaf85251632563d44a42c18fabf3 | brunolauze/openpegasus-providers-old | /src/Providers/UNIXProviders/tests/UNIXProviders.Tests/UNIX_PointingDeviceFixture.cpp | C++ | cpp | 2,796 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
7c17b8e63a972f36d36a6deefc4c8a5c83c183b7 | 455bddaa70f5bc3a9fb063234af7ed72c5cfffc8 | WitoldKaczor/cpp_repo | /ScientificComputing/Chapter10_LinearSystemSolver/Chapter10_LinearSystemSolver/LinearSystem.cpp | C++ | cpp | 1,639 | no_license | #include "LinearSystem.hpp"
#include <cassert>
LinearSystem::LinearSystem(const Matrix& A, const Vector& b)
{
// check of the system dimensions
assert(A.GetNumRows() == A.GetNumCols()); //matrix is square
assert(A.GetNumRows() == b.GetSize()); //matrix and vector
// check of nonsingularity
assert(fabs(A.determin... |
ef82cbb1b3c103b1912fe75bc489f9a2dd3faec9 | 75a3b1b5c9444a2ee1f2809b51b2845ac414bf66 | super-nova/NovaRepo | /PlayerView.cpp | C++ | cpp | 41,447 | no_license | /*************************************************************************
Crytek Source File.
Copyright (C), Crytek Studios, 2001-2004.
-------------------------------------------------------------------------
$Id$
$DateTime$
Description:
The view specific code (First person, Third person, followCharacterHead etc).
... |
0f944e471dbfe491377e1a4810c57561d757d948 | 3fd9a1db59180293a7507f38cbc0ac9bb346cc35 | junxuezheng/chromium | /components/feed/core/feed_networking_host.cc | C++ | cc | 13,494 | 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/feed/core/feed_networking_host.h"
#include <utility>
#include "base/bind.h"
#include "base/metrics/field_trial_params.h"
#include "... |
3399141af3d0ed8dda2e67337b0b288ec83c99a5 | 03951de688469223addc5d83465e4e9c6200ab0a | BocMaN77703/sem1 | /T1.2/T1.2.cpp | C++ | cpp | 1,079 | no_license | /*T1.2
В массиве строк найти большее слово и вывести его.*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n, m, num=0, l1, max=0;
char** str;
int l = 0;
scanf_s("%d%d", &n, &m);
m++;
str = (char**)calloc(n, sizeof(char*));
rewind(stdin);
for (int i = 0; i < n; i++)
{
str[i] = (char*... |
fd363a8d4c566b9d278c580da99a7c69a6bf4726 | d5295cc86c775e80782428410e8520bfe16e2263 | giserfly/mobile-sdk | /all/native/styles/StyleSelectorContext.cpp | C++ | cpp | 4,430 | permissive | #ifdef _CARTO_GDAL_SUPPORT
#include "StyleSelectorContext.h"
#include "graphics/ViewState.h"
#include "geometry/PointGeometry.h"
#include "geometry/LineGeometry.h"
#include "geometry/PolygonGeometry.h"
#include "geometry/MultiGeometry.h"
#include "geometry/MultiPointGeometry.h"
#include "geometry/MultiLineGeometry.h"
... |
6bbb8a83c18cc437604a62a759aa1653ba8c4b8d | b62a5c1016525e0b945846fa1d6085f430718ade | parnurzeal/CMatrix | /main.cpp | C++ | cpp | 2,056 | permissive | #include<iostream>
#include<vector>
#include<stdio.h>
#include<ctime>
#include<sys/ioctl.h>
#include<map>
#include<deque>
using namespace std;
typedef struct{
char c;
int live;
}Code;
void render(deque<map<int, Code> > &matrix);
int msleep(unsigned long milisec)
{
struct timespec req={0};
time_t sec=(int... |
fab4df84cc8e9da422806ae2c988eeb06f91fb78 | 2b8d90fae9c21f283dbe695675ccdfbc7735a29d | tumerlvn/progs | /stepik/alg/insertsort.cpp | C++ | cpp | 496 | no_license | #include <iostream>
#include <ctime>
#define L 10
using namespace std;
int main()
{
int a[L];
srand(time(0));
for(int i = 0; i < L; i++)
{
a[i] = rand()%100;
cout << a[i] << endl;
}
for(int i = 1; i < L; i++)
{
for(int j = i - 1; j >= 0 && a[j+1] < a[j]; j--)
... |
440dbf785bc0901200b855495ab005f4fee598ee | 0049b0c17e7c45392b619031c03d41590ca165bc | CreativeLabs0X3CF/Sprout | /sprout/math/lcm.hpp | C++ | hpp | 3,581 | permissive | /*=============================================================================
Copyright (c) 2011-2016 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
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.tx... |
932c6011963b58db6150a9b452865164d8dedba2 | 8df770ab988f1724f53de28d031db4ff6765eaed | nugabom/ACL-lowp | /tests/validation/CL/ArithmeticDivision.cpp | C++ | cpp | 7,921 | permissive | /*
* Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
* 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
* ri... |
6ce306f2e5617a39d41a730891906a58d96ca892 | 6580f43719a9f0f6594c0258e854bfae34eb15f0 | mouhgh96/TreeBasics | /generatorsAndValidators/richTreeGen.cpp | C++ | cpp | 2,263 | no_license | #include "testlib.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
/*
Generates a random tree.
First arguement: n, the number of nodes
Second arguemnt: type of tree, as follows:
1: rope
2: almost rope
3: balanced binary tree
4: almost balanced binary tree
5: random MST
*/
struct Di... |
eda1b6b6311dd8a272d8bdab3a054e3742bdedc0 | b4c3e56099afa027f64d6cd4b0170267bbdd9b08 | SGpp/SGpp | /datadriven/src/sgpp/datadriven/algorithm/DBMatOfflinePermutable.cpp | C++ | cpp | 10,784 | permissive | // Copyright (C) 2008-today The SG++ project
// This file is part of the SG++ project. For conditions of distribution and
// use, please see the copyright notice provided with SG++ or at
// sgpp.sparsegrids.org
#include <sgpp/base/exception/algorithm_exception.hpp>
#include <sgpp/datadriven/algorithm/DBMatOfflinePermu... |
2ddb023ff793aa930bcff9a501e1a290912ad900 | ea0fe268342c324141bbd9a916914e056793017f | jjzhang166/WinNT5_src_20201004 | /NT/com/rpc/runtime/mtrt/precomp.hxx | C++ | hxx | 1,118 | no_license | /*++
Copyright (C) Microsoft Corporation, 1995 - 1999
Module Name:
precomp.hxx
Abstract:
Precompiled header for the RPC runtime. Pulls in all the
system headers plus local header appearing in >15 files.
Author:
Mario Goertzel (mariogo) 30-Sept-1995
Revision History:
--*/
... |
52731757a9edb4b34b6982994750752930080c61 | 755cc847e87d75b701611233bc441592379c235b | pargles/IPPD | /src/ParallelImageLoaderPthread.cpp | C++ | cpp | 1,270 | no_license | /*
* Created on 9 de Junho de 2013, 22:02
*/
#include "../inc/ParallelImageLoaderPthread.h"
void *zerar(void *p){
int iMax=((ARGSI *)p)->iMax;
int jMax=((ARGSI *)p)->jMax;
unsigned short **mat=((ARGSI *)p)->mat;
for (int i=((ARGSI *)p)->i; i <iMax; i++)
for (int j=((ARGSI *)p)->j; j <jMax;... |
6506e07d29c97be23dc535613be7730a4696e7ea | 87b93a0639b24173b1f24085394eccb27eddfc5a | HalalaiMircea/CG-Course | /Project2D/src/utils/glUtils.hpp | C++ | hpp | 494 | permissive | #pragma once
#include "Color.hpp"
#include "math/Vector.hpp"
#include <GL/gl.h>
void glVertex(const Vector2 &v);
void glVertex(const Vector2 &v, const Color &c);
void glVertex(const Vector3 &v);
void glVertex(const Vector3 &v, const Color &c);
void glColor(const Color &color);
void glTranslate(co... |
7c5873553a56ae023bf8e01465a5f595362158bc | 8d65701e72fb850cc478fd9404998510c20f5556 | rachit7645/EFIOS | /kernel/src/BasicRenderer.cpp | C++ | cpp | 2,780 | no_license | #include "BasicRenderer.h"
BasicRenderer* GlobalRenderer;
BasicRenderer::BasicRenderer(FrameBuffer* TargetFrameBuffer, PSF1_FONT* PSF1_Font) {
this -> TargetFrameBuffer = TargetFrameBuffer;
this -> PSF1_Font = PSF1_Font;
this -> Colour = 0xFFFFFFFF;
this -> CursorPosition = {0, 0};
}
void BasicRenderer::Clear()... |
2f293a33719f61d3ffa24c30e1f0b923921555bc | 1599e4cf05941518d6d0dd8e48b20cbe2523be7f | Mu2e/Offline | /ExtinctionMonitorFNAL/Analyses/src/EMFRawHitsValidator_module.cc | C++ | cc | 4,782 | permissive | // Printout ExtMonFNAL raw hits
//
// Andrei Gaponenko, 2012
#include <iostream>
#include "cetlib_except/exception.h"
#include "fhiclcpp/ParameterSet.h"
#include "art/Framework/Core/EDAnalyzer.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Run.h"
#include "Offline/RecoDataProducts/in... |
011d70147954d973809d7ee2e56e5c1df002e3ef | 8672bbc4cae4af463bf541a566d8c1b7150fb6ab | cyenyxe/ledger | /libs/ml/include/ml/ops/max_pool_2d.hpp | C++ | hpp | 7,808 | permissive | #pragma once
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI Limited
//
// 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 Licen... |
f4c674f6fabcb71e77ea62ada375b28483e72dd8 | 1632250d86c07f83c314461501d9ab90f809947b | Bucher-Jeremy/jb2523887 | /Projects/Project 1/Wheel of Fortune/main.cpp | C++ | cpp | 7,901 | no_license | /*
* File: main.cpp
* Author: Bucher Jeremy
* Created on July 20, 2014, 4:02 PM
*/
//System Libraries
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
using namespace std;
//User Libraries
//Global Constants
//Function Prototypes
//Execution Starts Here
int main(int argc, char** arg... |
d2a62cfcd025612810ef84029c3ffb270fdd27a0 | 45207d996792c3a117ffe648e1da0e274e362d99 | versalinyaa/vk-gl-cts | /external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp | C++ | cpp | 160,262 | permissive | /*-------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
*
* Copyright (c) 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ob... |
bd4c3dd6fdb95408d8bc7f4708003b536ddcd320 | 65b356f6c6c5041e04b36add7217bee43852786f | Matheus7OP/Notebook | /Strings/meuHash.cpp | C++ | cpp | 1,523 | no_license | /*
* Matheus Oliveira
* 07/02/2018
* hash.cpp
*/
#include <bits/stdc++.h>
using namespace std;
#define MAXN
#define mp make_pair
typedef long long ll;
typedef pair<ll, ll> pll;
struct DoubleHash {
// do precalc of powers outside of struct if necessary
ll powers1[MAXN], powers2[MAXN], values1[MAXN], values2[MAX... |
5af3874ce4200c168082a07869d19d4ad3110531 | 4f1182124313b79032c9b7dcfbb1f3833301b99a | moteesh-in2tive/chromium | /content/browser/broadcast_channel/broadcast_channel_service.cc | C++ | cc | 5,064 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/broadcast_channel/broadcast_channel_service.h"
#include "base/bind.h"
#include "content/browser/broadcast_channel/broadcast_chan... |
c435c66039afbb1a103dbf9fb15cde3484f9ca2f | a7d067fc455a6aca845b9adb399ed54e1abf2900 | Floral/Study | /C++/C++Primer_5th_Code/Chapter12/practice12_16.cpp | C++ | cpp | 211 | no_license | #include<iostream>
#include<string>
#include<memory>
int main()
{
std::unique_ptr<std::string> p1(new std::string("test"));
// std::unique_ptr<std::string> p2=p1;
p1.reset(nullptr);
return 0;
} |
4e9713b9d68018398ff3ba07ae9fe7a2aaf9447f | e4babc2ea8f23c9db6a56f40eea203c0bf4fd5e6 | lynxnake/TurboPower-Orpheus | /source/ovcdbnf.hpp | C++ | hpp | 7,361 | no_license | // CodeGear C++Builder
// Copyright (c) 1995, 2014 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'ovcdbnf.pas' rev: 27.00 (Windows)
#ifndef OvcdbnfHPP
#define OvcdbnfHPP
#pragma delphiheader begin
#pragma option push
#pragma option -w- // All war... |
9519e6ea21d8f52d6b20eac6306bd69edfb50618 | aa7110eabd8e7743bd1406e7e128eb101800706f | peplopez/El-Rayo-de-Zeus | /dependencies/Ogre/Samples/Fresnel/src/Fresnel.cpp | C++ | cpp | 519 | permissive | #include "SamplePlugin.h"
#include "Fresnel.h"
using namespace Ogre;
using namespace OgreBites;
#ifndef OGRE_STATIC_LIB
SamplePlugin* sp;
Sample* s;
extern "C" _OgreSampleExport void dllStartPlugin()
{
s = new Sample_Fresnel;
sp = OGRE_NEW SamplePlugin(s->getInfo()["Title"] + " Sample");
sp->addSa... |
9d4dbe7caea34c70f5dd4fe746b6801786ac54ad | d273ee7b4d17fd49257b835b89e21ddd6bd0839b | csagan5/kiwi | /chrome/browser/ui/signin_view_controller_delegate.cc | C++ | cc | 3,427 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/signin_view_controller_delegate.h"
#include "base/bind.h"
#include "base/values.h"
#include "chrome/browser/ui/browser.h"
#in... |
78da38d9776b70d1a8ca0f104bfefedaee0a1a0c | b1b5d5799e9aba4e5002d71535fa5cf2583a9178 | Youw/Compiler | /src/syntax/ruleentityterminal.cpp | C++ | cpp | 1,801 | no_license | #include "ruleentityterminal.h"
#include "syntaxtree.h"
#include <plsqllexem.h>
#include "plsqltypes.h"
RuleEntityTerminal::RuleEntityTerminal(LexemPtr lexem):
lexem(lexem)
{
}
RuleEntityTerminal::~RuleEntityTerminal()
{
}
RuleEntityType RuleEntityTerminal::ruleType() const
{
return RuleEntityType::TERMINAL;
... |
aa8900172d748cea04d4f838ff16a675810bb4e0 | 11f6d5acfe5f96b01202be379905636272819b1a | rakeshpmali/hackathon | /release/TXqtApp/mainwindow.cpp | C++ | cpp | 7,597 | no_license | /****************************************************************************
**
** Copyright (C) 2012 Denis Shienkov <denis.shienkov@gmail.com>
** Copyright (C) 2012 Laszlo Papp <lpapp@kde.org>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtSerialPort module of the Qt Toolkit.
**
** ... |
5bae9993236308f77f8f604e6c5e235376427d67 | 3be9910f5c5a9b6e325a53d2771da1717848403d | GenKnight/quickfix-core | /src/lib/quickfix/DataDictionary.cpp | C++ | cpp | 20,236 | no_license | /****************************************************************************
** Copyright (c) quickfixengine.org All rights reserved.
**
** This file is part of the QuickFIX FIX Engine
**
** This file may be distributed under the terms of the quickfixengine.org
** license as defined by quickfixengine.org and appearin... |
f7aada5529b5519d7eb6b2d29689fb368fbe4aa0 | 67541e2e1ba8e324c82a16e17cf11196d9674542 | csgvsjay1000/workspace | /TeamTalk_V2_20170422/msgServer/msg_server.cpp | C++ | cpp | 424 | no_license | #include "SZBaseSocket.h"
#include "SZEventDispatch.h"
#include "SZMsgConn.h"
#include "SZDBServConn.h"
void* msg_conn_callback(void* pParam)
{
return new SZMsgConn();
}
int main()
{
printf("server start...\n");
SZBaseSocket socket;
int listenFd = socket.Listen("127.0.0.1",8000,&msg_conn_callback);
//init_db_s... |
d46742eb20bcdd789a7194bc7d3227a1dad0e43d | 14722c4ee5bca22e2ab67fd6e95f732ca14b23be | Heloput/ChannelMontage | /Source.cpp | C++ | cpp | 400 | no_license | #include <iostream>
#include <Windows.h>
#include <ctime>
using namespace std;
int main() {
srand(time(0));
string god = "Start program - universe.exe";
system("CLS");
Sleep(700);
cout << "God joined.\n";
Sleep(1000);
for (int i = 0; i < sizeof(god)+5; i++) {
cout << god[i];
Sleep(rand()%10... |
142453c3346e1a3c758264a2cc6be983218b4452 | 3d122e5502ef5d529ea6cfa27b7835f7a605f618 | johnBuffer/ZombieV | /include/System/Utils.hpp | C++ | hpp | 490 | no_license | #ifndef UTILS_HPP_INCLUDED
#define UTILS_HPP_INCLUDED
#include <SFML/Graphics.hpp>
#include "UnitedEngine/Vec2.h"
float getRand();
float getRandUnder(float max);
int getRandInt(int min, int max);
float getRandFloat(float min, float max);
float getRandomAngle();
float getRandomAngle(float min, float max);
float getAng... |
2757978c36fe3712249117cc9414b36fb53b8686 | c41a17d3b35f719af04044bc598b8a1b03b4bb62 | whik/Wave_Generate | /Sine_Wave_Generate/main.cpp | C++ | cpp | 1,870 | no_license | #include "main.h"
void GetTime(void)
{
//时间戳
time_t t;
struct tm *pt ;
time(&t);
pt = localtime(&t) ;
printf("/* Generate time: %4d-%02d-%02d %02d:%02d:%02d */\n",
pt->tm_year+1900, pt->tm_mon, pt->tm_mday, pt->tm_hour, pt->tm_min, pt->tm_sec);
}
//传入参数: x点数x_N,y范围y1-y_max
void Sin... |
60ae86678c7a16ebe56206743456e49ea87b32b8 | 75483c5e2ae7d2907031934cf948e7ce5bcccef2 | pgregory/giselle | /luagl/luagl.cpp | C++ | cpp | 145,841 | permissive | /*************************************************
* LuaGL - an OpenGL binding for Lua
* 2003-2004(c) Fabio Guerra, Cleyde Marlyse
* http://luagl.sourceforge.net
*-------------------------------------------------
* Description: This file implements the OpenGL
* binding for Lua 5
*---------------------... |
a76014a3ab00add28826d57bb9d82da2c1001ece | 965c3577978ac63b63c86c8777ebc466e828d950 | cr88192/bgbtech_engine | /libpdgl/rift/ovr_glue.cpp | C++ | cpp | 2,917 | permissive | #include <pdgl.h>
#include <pdglui.h>
// #define PDGLUI_HASRIFT
#ifdef PDGLUI_HASRIFT
#include "OculusSDK/LibOVR/Include/OVR.h"
using namespace OVR;
extern "C" {
char *pdgl_rift_monitorName;
float pdgl_rift_eyeDistance;
float pdgl_rift_distortionK[4];
float pdgl_rift_chromaAb[4];
SensorFusion *pdgl_rift_SFusion=... |
c93a88e935b9a68b07b813b47488e701c8bf68c4 | af805afe6258b301e7246a2d981bd143d7162cad | qianlanwyd/graphics-program | /editdialog.cpp | C++ | cpp | 1,137 | no_license | #include "editdialog.h"
#include "ui_editdialog.h"
#include "editlinedialog.h"
#include"editcircledialog.h"
#include"editellipsedialog.h"
#include"editcurvedialog.h"
editDialog::editDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::editDialog)
{
ui->setupUi(this);
}
editDialog::~editDialog()
{
del... |
0a9d885709bfb9b373feecf56cf23b52dff25ae5 | 0e632c7bcb23e82a79b54fdb2636b29fdc8035cb | TianZerL/Anime4KCPP | /core/include/ACRegister.hpp | C++ | hpp | 2,335 | permissive | #ifndef ANIME4KCPP_CORE_AC_REGISTER_HPP
#define ANIME4KCPP_CORE_AC_REGISTER_HPP
// Helper macro
//---------------------------------------
#define REGISTER_PROCESSOR_IF(C, P, A) REGISTER_PROCESSOR_IF_IMPL(C, P, A)
#define REGISTER_PROCESSOR_IF_IMPL(C, P, A) REGISTER_PROCESSOR_IF_##C(P, A)
#define REGISTER_PROCESSOR... |
c958f6b1539d809f8a7860dd9fed24212d1cf990 | 442de444b468fb03c34080c79605fdc7d72e0cda | oguzzkilic/chromium | /chrome/browser/ui/ash/chrome_keyboard_ui.cc | C++ | cc | 20,402 | permissive | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/ash/chrome_keyboard_ui.h"
#include <set>
#include <string>
#include <utility>
#include "ash/public/cpp/shell_window_ids.... |
9e6a69c9f54637293a4fe2dfd7815f044edc9ee6 | 50825f496ddc0086370902c434f91706cf5eedfc | xiawei0000/indoorMonitorwithKinectV2 | /blockdetect/blobtrackingmsfg.cpp | C++ | cpp | 36,064 | permissive |
#include "precomp.hpp"
#include <opencv/highgui.h>
#ifdef _OPENMP
#include "omp.h"
#endif
// Uncomment to trade flexibility for speed
//#define CONST_HIST_SIZE
// Uncomment to get some performance stats in stderr
//#define REPORT_TICKS
#ifdef CONST_HIST_SIZE
#define m_BinBit 5
#define m_ByteShift 3
#endif
typedef... |
07e71b9bf228d67ad0838d08bb498e77a497c7f4 | ed819a057f55207d4d20fc5bfc92b002ebe5f77f | ianchen0119/IoTDevicesPlatforms | /lab11/Arduino-master/libraries/AM232X/AM232X.cpp | C++ | cpp | 6,129 | permissive | //
// FILE: AM232X.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.3
// PURPOSE: AM232X library for AM2320 for Arduino.
//
// HISTORY:
// 0.1.0 2017-12-11 initial version
// 0.1.1 2017-12-12 added CRC checking
// 0.1.2 2017-12-12 get and set functions.
// 0.1.3 2017-12-19 added ESP8266 - issue #86
// ... |
68c7d3a99bc8ee6cff05d4132cebe0a78a95550e | 12a7d67f5c2e7eda124b39074361595e3bc9be93 | GeoffreyV/Robotic_tutorial_2019 | /main.cpp | C++ | cpp | 32,149 | no_license | /** Main Test Board
*
* \brief Programme de tests pour le robot NCR 2017
* \author H. Angelis
* \version alpha_1
* \date 15/05/17
*
*/
#include "mbed.h"
#include "PwmIn.h"
#include "Nucleo_Encoder_16_bits.h"
#define BOUSSOLE_adress 0xC0
#define PIXY_adress 0x54
#define CC_BLOCSIZE ... |
1fcacc803384d99267700f39d68d5b49a5089840 | b2bc8b122b23706a4601012adff87faf8124e69e | anilkagak2/network-lab | /lab-02/instantMessenger/server/src/server.cpp | C++ | cpp | 8,615 | no_license | /*
* IM-Ak2 1.0
* server.cpp: Definitions of server class function
*
* Anil Kag
* a.kag@iitg.ernet.in
*/
#include "server.h"
#define _PORT_ 5555
/* Initialize the server parameters. */
Server::Server () {
master_socket = -1; // Initial value
port = _PORT_; // Port number
}
/* Release the resources occupie... |
e0807278af97aaebb8f8d2339d751075fe6f6405 | 690a7296517c1767d0499f8ee6c14c0bb4ed725f | Moontasir65/Algorithm | /coin changing/coin change Ga 1.cpp | C++ | cpp | 977 | no_license | #include<iostream>
using namespace std;
void Sort(int ara[],int n)
{
int i,j,p;
for(i=0;i<n;i++)
{
for(j=0;j<n-1-i;j++)
{
if(ara[i]>ara[i-1])
{
p=ara[i+1];
ara[i+1]=ara[i];
ara[i]=p;
}
... |
b141c76917c940d8273d5f3a8ebda0911efd73e3 | 5e1d07121c046e15a6461ccad0b5cd8030d4b671 | PhilippKopp/FeatureDetection | /libSupervisedDescent/src/superviseddescent/utils.cpp | C++ | cpp | 2,860 | no_license | /*
* utils.cpp
*
* Created on: 29.07.2014
* Author: Patrik Huber
*/
#include "superviseddescent/utils.hpp"
#include "logging/LoggerFactory.hpp"
#include <fstream>
using logging::LoggerFactory;
using cv::Mat;
using std::string;
namespace superviseddescent {
// todo remove stuff and add perturbMean(...). ... |
aa00d362578cfe9be401bab28e3d7bc1120c1fb9 | 7a241d6af2e708b1a83dd31acce250e68419ed88 | harry-dev98/CompetitiveCodingSolutions | /graphs/floydWarshal_copy.cpp | C++ | cpp | 680 | no_license | #include <iostream>
using namespace std;
int main() {
int t; cin>>t;
while(t--){
int V; cin>>V;
int graph[V][V]; int d[V][V];
for(int i=0;i<V;i++){
for(int j=0;j<V;j++){
cin>>graph[i][j];
d[i][j]=graph[i][j];
}
}
for(int k=0;k<V;k++){
for(... |
fcef6faadedf844ff90b5a74d86b33957e77bd31 | 919f9e5eba275b939fb010d897d24cffe24789bc | nafSadh/scire | /playg/L33tC0d3/palindrome-partitioning-ii.hpp | C++ | hpp | 1,041 | no_license | /* Given a string s, partition s such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of s.
For example, given s = "aab",
Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut. */
#include <vector>
#include <string>
usi... |
65bbaa99d468d9e04b60c5c8f19fd26cef9a70cb | 7bec25479f3445ea9291496ca5ba8a461e258e35 | ZalkinV/MTP.Labs | /Lab3MatrixMul/Main.cpp | C++ | cpp | 2,584 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <stdexcept>
#include "MatrixMulImpls.h"
#include "Tests.h"
#include "TimeMeasurer.h"
using namespace std;
/*
* Useful links:
* Инструкция по настройке проекта в Visual Studio для работы с OpenCL - https://www.notion.so/Visual-Studio-OpenCL-cad4d748972b4464b... |
f1748ced840e9bcb0ea37113a406d24e51f599b0 | be9c8412e187f800d218fdf064fc16442a01dc0c | Deaod/RingBufferBenchmark | /spsc_queue_release.hpp | C++ | hpp | 41,962 | no_license | /*******************************************************************************
Copyright (c) 2019, Lukas Bagaric
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 m... |
de0e90c46e9577ec1b6e8fde873a8e172e7346fa | 0c1396db36046530eba7a17e2bc233adf557d918 | Lleeshen/COEN-79 | /Lab9/bagexam.cpp | C++ | cpp | 12,719 | no_license | // FILE: bagexam.cxx
// Written by: Michael Main (main@colorado.edu), Nov 8, 2000
// Non-interactive test program for the bag class
// with improved test for heap leaks.
//
// DESCRIPTION:
// Each function tests part of the bag class, returning some
// number of points to indicate how much of the test was passed.
// A ... |
72fbab7ff800957ac75b95b7db02579850f98345 | eb766a657673a71691f5f3e0ec21f475d32208a5 | dsm501/Heston-Stochastic-Volatility | /source code/heston.cpp | C++ | cpp | 2,280 | no_license | //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// heston.cpp with heston function definitions. 1423101
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include "heston.h"
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... |
00fcb1cae56e79d6727bc6d277a62cef0c8eb496 | d8e3bec0ba3def276fff431ef836785329c12721 | luchy0120/codelibrary | /cpp/strings/suffix-array.cpp | C++ | cpp | 2,745 | permissive | #include <bits/stdc++.h>
using namespace std;
// build suffix array in O(n*log(n))
vector<int> suffix_array(const string &S) {
int n = S.length();
// Stable sort of characters.
// Same characters are sorted by their position in descending order.
// E.g. last character which represents suffix of lengt... |
567f4e3abda23699b92e5695c8f975dca4f51b7b | 07f77298153fe523127d3ff2b1a5bb73e9832833 | ryancheung/chromium | /services/tracing/tracing_service_unittest.cc | C++ | cc | 15,632 | 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 <memory>
#include <utility>
#include "base/bind.h"
#include "base/json/json_reader.h"
#include "base/macros.h"
#include "base/run_loop.h"
#inclu... |
c060d9c248a8bf55eaf83a336b25a6ab1f7ba001 | 6d705cd514b55121b16d075a2fd3173a76cf16aa | Keshav612/Project | /Op_Ov_Binary.cpp | C++ | cpp | 1,444 | no_license | #include<iostream>
using namespace std;
class MATRIX
{
int a[100][100],R,C;
public:
void setdim(int r,int c)
{
R=r;
C=c;
}
void input()
{
cout<<"Enter element:\n";
int i,j;
for(i=0;i<R;i++)
{
for(j=0;j<C;j++)
cin>>a[... |
05bedf51a1df695a3e52c30629e219393d563fee | c7b7a8691ff71f2b01b7eba2416e246d61ab94f6 | alja/cmssw | /Fireworks/Geometry/src/FWRecoGeometryESProducer.cc | C++ | cc | 23,393 | permissive | #include <fstream>
#include <streambuf>
#include "Fireworks/Geometry/interface/FWRecoGeometryESProducer.h"
#include "Fireworks/Geometry/interface/FWRecoGeometry.h"
#include "Fireworks/Geometry/interface/FWTGeoRecoGeometry.h"
#include "Fireworks/Geometry/interface/FWRecoGeometryRecord.h"
#include "DataFormats/Geometry... |
23259edfa8baa9fe464b1701ff42327e0f58d346 | b7ae37d6e3a6522d5084c0fe255bd0b77ce0ad30 | CryptoCoinLabs/darknetspace | /tests/core_tests/alias_tests.cpp | C++ | cpp | 6,749 | no_license | // Copyright (c) 2012-2013 The Boolberry developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chaingen.h"
#include "chaingen_tests_list.h"
#include "alias_tests.h"
using namespace epee;
using namespace curr... |
38922ce5cb0e96b84883584d4585bef08a742fe8 | c5b10943283dd9f59b5c2146fdc032ac70209a33 | uber/neuropod | /source/neuropod/bindings/java/src/main/native/com_uber_neuropod_NeuropodTensor.cc | C++ | cc | 7,216 | permissive | #include "com_uber_neuropod_NeuropodTensor.h"
#include "jclass_register.h"
#include "neuropod/neuropod.hh"
#include "utils.h"
#include <exception>
#include <functional>
#include <memory>
#include <stdexcept>
#include <string>
#include <jni.h>
namespace njni = neuropod::jni;
// NOLINTNEXTLINE(readability-identifier... |
f020ca0477e90328d3614aac60aac250a3a774ea | b0b01a38ecff0e27e353ce6879b8b8ae524a995a | stevenkim18/CPP_Module | /cpp01/ex03/Zombie.cpp | C++ | cpp | 1,411 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Zombie.cpp :+: :+: :+: ... |
60b624ec48eea78327d83a2c17d5d78098e4a100 | 18aef2aefecc98e63e16b0281ff10b3886cb5f44 | kakason/UVa | /p10557/XYZZY.cpp | C++ | cpp | 2,990 | no_license | #include <iostream>
#include <string.h>
#include <queue>
#include <vector>
using namespace std;
struct Pair {
int to, energy;
Pair(int first, int second) : to(first), energy(second){}
};
int main() {
int n, value, leave,
next, current, isFinal, isCyclic, total,
i, j;
while (cin >> n && n != -1) {
isFinal =... |
462e0026384ad4df452d6420f352fdba25af4e7a | 1380b238a2a9d2d0f15ab09bbfc0cf621f0f70ce | roche-emmanuel/sgt | /sources/plug_land/src/luna/bind_proland_EditGraphOrthoLayer_VertexData.cpp | C++ | cpp | 17,188 | no_license | #include <plug_common.h>
class luna_wrapper_proland_EditGraphOrthoLayer_VertexData {
public:
typedef Luna< proland::EditGraphOrthoLayer::VertexData > luna_t;
inline static bool _lg_typecheck___eq(lua_State *L) {
if( lua_gettop(L)!=2 ) return false;
if( !Luna<void>::has_uniqueid(L,1,71059590) ) return ... |
d34d3c7b100f119942b553486d918236aa00540f | 6d8ea29d79c722ab154418817fae25fe8b67cd66 | sfalexrog/gpgpu_gles | /gles_demos/src/gfx/UndistortedMesh.cpp | C++ | cpp | 2,698 | no_license | #include "UndistortedMesh.h"
#include <opencv2/opencv.hpp>
namespace Gfx
{
Mesh createUndistortedMesh(const Mesh& original, const sensor_msgs::CameraInfoConstPtr &ci)
{
std::vector<cv::Point2d> sourcePoints;
for(const auto& vtx : original.vertices)
{
sourcePoints.emplace_back(vtx.vpos[0], vtx.vpos... |
0e9376946486526c657a7c094cdd1db1469b3c94 | 5a452c5013f749b92938b74e72804420851f3676 | colorhistory/cplusplus-general-programming | /STL/queue.hpp | C++ | hpp | 6,300 | permissive | #ifndef QUEUE_HPP
#define QUEUE_HPP
#include "bits/stdc++.h"
namespace GP {
template <class T, class Container = deque<T>>
class queue {
public:
typedef Container container_type;
typedef typename container_type::value_type value_type;
typedef typename container_type::reference ... |
a4ea28c7f135984ce773e563a9ca434353201413 | 5a2c6eb02d3a680a56dd11438bca47521aab46a2 | heesok2/MFC | /Skeleton/src/BF_LIB/BFBaseFileIO.cpp | C++ | cpp | 3,379 | permissive | #include "stdafx.h"
#include "BFBaseFileIO.h"
#include "BFBaseFileDef.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CBFBaseFileIO::CBFBaseFileIO(void) : m_pFile(nullptr)
{
}
CBFBaseFileIO::~CBFBaseFileIO(void)
{
}
BOOL CBFBaseFileIO::FileOpen(CS... |
37d4a9190269cb7a539cb4be9ce1c27c84afeb18 | fb637afbb76c67fcc07de6432ca8ca7298919ac2 | knickers/makinator | /texture.cpp | C++ | cpp | 4,289 | no_license | #include <iostream>
using namespace std;
#include "texture.h"
#include "Tga.h"
void LoadTextures()
{
gliGenericImage *image[num_textures];
int n=0;
//image[n++] = readTgaImage("fruit.tga");
if(n!=num_textures)
{
printf("Error: Wrong number of textures\n");
system("pause");
exit(1);
}
glG... |
ad16d71121fae58324a0b784852c2dff26bd369b | 3eae5605930ef8a991b45b95d768c470f26c5fd6 | lubomyr/freespace2 | /freespace2/src/object/collidedebrisweapon.cpp | C++ | cpp | 3,791 | no_license | /*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on
* the source.
*/
/*
* $Logfile: /Freespace2/code/Object/CollideDebrisWeapon.cpp $
* $Revisio... |
5961ad2c1e58b61fd7e54194bfda8d255c0a0325 | 0adf7e72d1d16ba8e72dd1b9691a784732f64419 | sachinsom93/100DaysOfCode | /Graph/kahnAlgorithm.cpp | C++ | cpp | 2,558 | no_license | // 1. kahn's algorithm basically worked for DAG(directed acyclic graph)
// 2. A graph should contain atleast one vertieces that have in degree zero
// 3. kahn algo recursivly traverse to each of the vertices that have indegree equal to zero and remove
// decrease indegree of all the adjancy vertices of that verti... |
7dbd5d5e9343ab201dcc6dc7b348ad7ac50da685 | 54ed7eec94741ae1f2a2240ed196df2ba2a47e13 | CapOM/ChromiumGStreamerBackend | /chrome/browser/ui/libgtk2ui/g_object_destructor_filo.cc | C++ | cc | 3,032 | 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 "chrome/browser/ui/libgtk2ui/g_object_destructor_filo.h"
#include <glib-object.h>
#include "base/logging.h"
#include "base/memory/singleton... |
cdc830196cd97502bffdd046724c80877548864e | 2a2db985c998e3a95a69199ca621d77f12ec1d97 | chrisballinger/OLMKit | /tests/test_olm_decrypt.cpp | C++ | cpp | 2,167 | permissive | #include "olm/olm.hh"
#include "unittest.hh"
const char * test_cases[] = {
"41776f",
"7fff6f0101346d671201",
"ee776f41496f674177804177778041776f6716670a677d6f670a67c2677d",
"e9e9c9c1e9e9c9e9c9c1e9e9c9c1",
};
const char * session_data =
"E0p44KO2y2pzp9FIjv0rud2wIvWDi2dx367kP4Fz/9JCMrH+aG369HGymkFt... |
39ffc0734e71af3569932e27690534efc3e3b93b | e6a147eda25c77097a8d2e310deb3adb9d12e9fc | danAllmann/wgtf | /src/core/lib/core_reflection/object_handle_storage.cpp | C++ | cpp | 953 | no_license | #include "object_handle_storage.hpp"
#include "object_handle.hpp"
namespace wgt
{
ObjectHandleStorageReflectedCast::ObjectHandleStorageReflectedCast(
const std::shared_ptr< IObjectHandleStorage > & storage,
const TypeId & typeId,
const IDefinitionManager & definitionManager )
: storage_( storage )
, typeId_( type... |
26f4ef756deaa9a41ecd384ef4e47ede41c5c3bf | d2ac532eb45bcb321ed2a53518625c04806d3d02 | ShriBatman/myCodes | /cc/xennyandcoinrankings.cpp | C++ | cpp | 312 | no_license | //i am vengence i am the night i am Batman
//ios_base::sync_with_stdio(false);cin.tie(NULL);
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int i,j,k,l,m,n,r,t;
cin>>t;
for(i=0;i<t;i++)
{
cin>>m>>n;
l=m+n;
k=(l*(l+1))/2;
k=k+(m+1);
cout<<k<<"\n";
}
return 0;
}
|
83d95642ffcf3e4e51c8ec3281a13a67c14dcca7 | 6badb98d34bbd40aa674d515ae17df1c7afd2a69 | cw100/SoT-SDK | /SDK/SoT_BP_ipg_hair_42_Desc_classes.hpp | C++ | hpp | 709 | no_license | #pragma once
// Sea of Thieves (1.4) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_BP_ipg_hair_42_Desc_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//--------------------------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.