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 |
|---|---|---|---|---|---|---|---|---|
12f2528ab4d6ab4bda3b56b3f2eb3912e944cb8e | 13c4d0445886f73e2f8803c84ff020179c295138 | downor/intel-graphics-compiler | /IGC/Compiler/Optimizer/OpenCLPasses/DeviceEnqueueFuncs/TransformBlocks.cpp | C++ | cpp | 115,887 | permissive | /*===================== begin_copyright_notice ==================================
Copyright (c) 2017 Intel Corporation
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, includi... |
ace000572007d4b2329f7814ed48f58e8828b63a | c66073e7a5cc241a54763cecbbeba526451e27ad | Shulikov-v/OpenPapyrus | /Src/PPEquip/Bnkterminal.cpp | C++ | cpp | 4,068 | no_license | // BNKTERMINAL.CPP
// Copyright (c) A.Sobolev 2012, 2013, 2015, 2016, 2017
//
#include <pp.h>
#pragma hdrstop
int BnkTermArrAdd(StrAssocArray & rArr, int pos, int value)
{
SString str;
return rArr.Add(pos, str.Cat(value), 1);
}
int BnkTermArrAdd(StrAssocArray & rArr, int pos, const char * pValue)
{
return rArr.Add... |
f75e6280ecf141a078aa0065dd3ff4150d9adcf3 | b7ab206e32a112a59fea47f8197fd24d18140f08 | sakiib/OnlineJudge-Solutions | /Codeforces Solutions/codeforces 474A.cpp | C++ | cpp | 1,093 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
typedef unsigned long long uLL;
typedef pair< int,int > ii;
typedef pair< int,ii > iii;
const int inf = 1e9;
const LL INF = 1e18;
const int N = 100005;
const int MOD = 1e9+7;
const double EPS = 1e-6;
const double PI = acos(-1.0);
string s[] = {"q... |
5bd1dbe72bee152e47e4cd2a0657184d99265c2c | 522b33e7d80f841ac445c0c460cc3afb18c416bd | jackyho30/Assignments | /QuickSort.cpp | C++ | cpp | 2,314 | no_license | int partition(int data[], const int lo, const int hi){
if (lo < 0){
return -1;
}
if (lo == hi){
return -1;
}
int pivot = data[hi];
int i = lo;
int pivoti = lo;
int temp = 0;
while (i < hi){
if (data[i] < pivot){
temp = data[i];
data[i] = data[pivoti];
data[pivoti] = temp;
p... |
2119585f8fb559a0f03b81fa156e32f6d1ac4457 | 6dd98027f87f5c5ce38efbba130be81761cdbb91 | fboehm/openFHDQR | /src/padmm.cpp | C++ | cpp | 3,472 | permissive | #include "update_beta_padmm.h"
#include "update_theta.h"
#include "update_z.h"
#include "check_criteria.h"
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]
using namespace Rcpp;
//' Perform proximal ADMM for weighted L1-penalized quantile regression
//'
//' @param beta0 initial value of beta
//' @pa... |
2b12b24b97b13bad99cd96ef89fa75f3106a57ef | c58b189fbbe2a5d81f4cbbbd3abeb987c98ca792 | happcode/SortAlgorithm- | /ShellSort/ShellSort.cpp | C++ | cpp | 1,897 | no_license | // ShellSort.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
using namespace std;
#define ARRAY_LENGTH 10
///////////////////////////////////////////////////////////////////////////////////////////
///
/// 希尔排序:就是优化版的直接插入排序
///
/// 将数组分成n组,对每组数据进行直接排序;
/// 然后继续将数组分成n/2组 在进行直接排序;直到n/2 = 0
///
/////... |
3e4f80a08f8cb89e44ec36eda8d7e95d11887e81 | 2777de1fe15f844823c746737e1189259a090139 | alexrobomind/tinylr | /test.cpp | C++ | cpp | 1,208 | permissive | #include <tinylr/tinylr.hpp>
#include <tinylr/test.hpp>
#include <iostream>
int main(int argc, char** argv) {
auto mat = tinylr::make_matrix<
double,
tinylr::pivot::absmax,
true
>(
tinylr::dim::fixed<3>()
//tinylr::dim::dynamic(4)
);
std::cout << sizeof(mat) << std::endl;
std::cout << sizeof(mat.data... |
5627a42b6e0478258e6ad6330ab8d9c6f6f713fd | c3ffa1818a7d631c8702e817c0a09f8e7701b32f | opendarkeden/client | /Client/Packet/Cpackets/CGStoreCloseHandler.cpp | C++ | cpp | 1,789 | no_license | //////////////////////////////////////////////////////////////////////////////
// Filename : CGStoreCloseHandler.cp p
// Written By :
// Description :
//////////////////////////////////////////////////////////////////////////////
#include "Client_PCH.h"
#include "CGStoreClose.h"
#ifdef __GAME_SERVER__
#i... |
eae4218ec060848e715ba8abc1f668a06b2f38aa | 14a385cb3d06033b3c23395f77ba143cb44554f0 | NikitaNikson/X-Ray_Renewal_Engine | /ogsr_engine/Layers/xrRenderDX10/dx10SH_RT.cpp | C++ | cpp | 8,031 | permissive | #include "stdafx.h"
#pragma hdrstop
#include "../xrRender/ResourceManager.h"
#include "../xrRender/dxRenderDeviceRender.h"
#include "dx10TextureUtils.h"
CRT::CRT ()
{
pSurface = NULL;
pRT = NULL;
pZRT = NULL;
#ifdef USE_DX11
pUAView = NULL;
#endif
dwWidth = 0;
dwHeight = 0;
fmt = D3DFMT_UNKNO... |
03df6d50d5ed7bde5246a761110a88e0b41ddfaf | 9a73ba00d615af75203ebbeebf2d5f61d3fab40e | vegaka/Galois | /libdist/src/NetworkIOLWCI.cpp | C++ | cpp | 5,165 | permissive | /*
* This file belongs to the Galois project, a C++ library for exploiting parallelism.
* The code is being released under the terms of the 3-Clause BSD License (a
* copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
cc41607d5f0af916a0b65d1247c55c2cbba4125f | a5f9fa9e181913bc47940662f5755eaab282f030 | dengyijia/envoy-wasm | /source/extensions/filters/network/sni_dynamic_forward_proxy/config.cc | C++ | cc | 1,665 | permissive | #include "extensions/filters/network/sni_dynamic_forward_proxy/config.h"
#include "envoy/registry/registry.h"
#include "envoy/server/filter_config.h"
#include "extensions/common/dynamic_forward_proxy/dns_cache_manager_impl.h"
#include "extensions/filters/network/sni_dynamic_forward_proxy/proxy_filter.h"
namespace En... |
5200ad425ed3c7e1398f4b74ad31d9220f01eecc | cafa9cfc68075109b7c7f62dd226eeea4e0c3f20 | gonany/swift | /stdlib/public/runtime/Enum.cpp | C++ | cpp | 16,850 | permissive | //===--- Enum.cpp - Runtime declarations for enums ------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
3e9c0da1b9bec680422d00e16f127e401c417a4c | 0d4cd7e5a2fcee68d1cf6501c956b62d511063f4 | NTUwanderer/PECaveros | /contest/Shanghai/l.cpp | C++ | cpp | 3,277 | no_license | / eddy1021
#include <bits/stdc++.h>
using namespace std;
typedef double D;
typedef long double LD;
typedef long long ll;
typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;
typedef pair<LD,LD> Pt;
#define mod9 1000000009ll
#define mod7 1000000007ll
#define INF 1023456789ll
#define INF16 100000000... |
17138058729f681e15c06e5f101f362cda298418 | efa30b7a58016fcd7a1d7aa8d7b7ee6cfa65584f | Matszs/project-robotica-team-6 | /nodes/kobuki_walker/include/kobuki_walker/walker_controller.hpp | C++ | hpp | 17,598 | no_license | /*****************************************************************************
** Ifdefs
*****************************************************************************/
#ifndef WALKER_CONTROLLER_HPP_
#define WALKER_CONTROLLER_HPP_
/*****************************************************************************
** Inc... |
2367e5b373f47def4b0ce23b80e91cee88009ccf | a263c2515013b44bcb0b66234c525865889fc87c | piffs1/QT_Progress | /IteratorSTL/main.cpp | C++ | cpp | 370 | no_license | #include <QCoreApplication>
#include <QVector>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QVector<int> vnNumbers;
for(int i = 0;i < 6; i++)
vnNumbers.push_back(i);
for(QVector<int>::iterator it = vnNumbers.begin(); it != vnNumbers.end(); ++it) {
... |
9d853cd68aa2a257be347557e190df6e16488630 | f1199d4c270b3d8dc47b60dce0c822e4a2a1b236 | dtram52/CS165 | /week2/testFile2b.cpp | C++ | cpp | 249 | no_license | #include<iostream>
#include<fstream>
using name space std;
int main()
{
int int1 = 10;
int int2 = 50;
ofstream outputFile;
outputFile.open("demo2b.txt");
outputFile << int1 <<endl;
outputFile << int2 << endl;
outputFile.close()
return 0;
}
|
13868af94a700b301690d728d14f9292ccba58ae | d0fd027c1578169efd28ba09168c464a808ba48c | JacobLCarter/Doodlebugs | /Ant.hpp | C++ | hpp | 246 | permissive | #ifndef ANT_HPP
#define ANT_HPP
#include "Critter.hpp"
class Ant : public Critter
{
public:
Ant();
Ant(int, int);
~Ant();
virtual void critMove(Critter***, int, int);
virtual void critBreed(Critter***, int, int);
};
#endif
|
30236e56956177a64c92118f1e4b2c1a86977c40 | be0fd2461885cc1df92296e4b57b010aac9cff82 | totalkyos/AWS | /aws-cpp-sdk-waf/source/model/GetSizeConstraintSetResult.cpp | C++ | cpp | 1,409 | permissive | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file... |
50fdcd17bf5648894ad7d7866778bc30749d8b92 | cb8a557cedd44826a065dbf9ef408f62079d1037 | LangeraertPepijn/Minigin | /QBertGame/GridComponent.cpp | C++ | cpp | 2,704 | no_license | #include "QBertPCH.h"
#include "GridComponent.h"
#include "CoilyMoveComponent.h"
#include "GameObject.h"
#include "HealthComponent.h"
#include "ScoreComponent.h"
void GridComponent::Update(float)
{
}
GridComponent::GridComponent(std::weak_ptr<GameObject> parent, const glm::ivec2& gridCount, const glm::vec2& gridSize... |
016bbabc398d2a581f229df2867ace754ecdf707 | eed6f69856cee034ff34c3e808c7b01d452bbeeb | Milerius/NanoRange | /test/algorithm/is_heap3.cpp | C++ | cpp | 571 | permissive | // Range v3 library
//
// Copyright Eric Niebler 2014
//
// Use, modification and distribution is subject to 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)
//
// Project home: https://github.com/ericniebler/range-v3
//
#def... |
9dd6486f15808c6fd7949aa87abc339d5e4d6e51 | 851d569ca2b91c043cdbe675e2e14892447711b0 | studentBC/justExercise | /dotProductOfTwoSparseVectors1570.cpp | C++ | cpp | 2,650 | no_license | /*
Given two sparse vectors, compute their dot product.
Implement class SparseVector:
SparseVector(nums) Initializes the object with the vector nums
dotProduct(vec) Compute the dot product between the instance of SparseVector and vec
A sparse vector is a vector that has mostly zero values, you should store the sparse... |
1737f34b92b2e2c3e38d9f94fea4dbc7b9cc02f1 | 7f3893e3940998ecb2f774dd97c045659217599f | iridium-browser/iridium-browser | /v8/src/codegen/code-reference.cc | C++ | cc | 4,359 | permissive | // Copyright 2018 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/codegen/code-reference.h"
#include "src/codegen/code-desc.h"
#include "src/common/globals.h"
#include "src/handles/handles-inl.h"
#includ... |
8b38714d188cba19e39bf975b660ae025f26c55c | 5c230d527486e247434dee683027b310a12cb25a | nhthucdtvt/CPP | /1000btC_Cpp/s2/source_421.cpp | C++ | cpp | 645 | no_license |
#include<stdio.h>
#include<conio.h>
void nhapn(int &n)
{
do{
printf("\nNhap vao so nguyen duong n=");
scanf("%d",&n);
if(n<0)
printf("\nSo ban nhap vao khong hop le!Xin vui long nhap lai!\n");
else
break;
}while(n<0);
}
float tong(int n)
{
if(n==0)
return 0;
return ((n*1.0)/(n+1)+... |
3fe4e4a410cb41cea0c98a8bc97b7da8d32b494c | 2cc44e85638835db689957ca66c5224a0c8676f7 | Lyph/CSE | /OOP (CSE165)/Lab 02/Manipulation.cpp | C++ | cpp | 947 | no_license | #include <iostream>
#include <string>
#include <fstream>
#include <iomanip>
#include <stdlib.h>
#include <bitset>
#include <vector>
#include <math.h>
using namespace std;
void binary_decimal(int x){
int result = 0, i = 0;
while(x != 0)
{
if (x%10 == 1)
{
result += pow(2,i);
}
x... |
76b3c7d53a38c02f1eeea5aa205419022c54e568 | 5323e619e11934a5d92e85d917a7b138e5890c67 | WhiZTiM/coliru | /Archive2/1b/1fe7c6d2509a97/main.cpp | C++ | cpp | 298 | no_license | template <typename T>
struct Base
{
template <typename S>
Base(S x) {}
};
template <typename T>
struct Child : Base<T>
{
using Base<T>::Base;
};
template <>
struct Child<int> : Base<int>
{
using Base<int>::Base;
};
int main()
{
Child<int> child(8.0f);
} |
606862908dc834cce4d66b0982caf3114c8fe7b5 | b59f24a6acadff94d816f1f6d9a3baff0fd4339a | 20191844340/G35 | /c3/3.3/3333.cpp | C++ | cpp | 250 | no_license | // 3333.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <math.h>
int main(int argc, char* argv[])
{
float d=300000, p=6000, r=0.01,m;
m=log10(p/(p-d*r))/log10(1+r);
printf("m=%.1f\n",m);
return 0;
}
|
d296f940a0d2f6ad07fa073fd2cdf65b76b2b126 | bf5055b9da1b2eaf9fcccc0183777ed9a79110e1 | anacarolinacv/cDoublePlus | /cpp/funcoes/aula23.cpp | C++ | cpp | 316 | no_license | #include <iostream>
using namespace std;
// sobrecarga de funcoes;
int soma();
int soma(int n1, int n2);
int main () {
soma();
soma(1, 2);
return 0;
}
void soma(int n1, int n2) {
int re;
re = n1 + n2;
cout << re << "\n";
}
void soma() {
int n1, n2;
cout << n1 + n2 << "\n";
} |
462a958af285f5bee4d10ad09b955937278a6327 | 7e2c6af260ffaa7a5bffeaec33893c65131de4e8 | zenkovich/o2 | /Framework/Sources/o2/Events/KeyboardEventsListener.cpp | C++ | cpp | 528 | permissive | #include "o2/stdafx.h"
#include "KeyboardEventsListener.h"
#include "o2/Events/EventSystem.h"
namespace o2
{
KeyboardEventsListener::KeyboardEventsListener()
{
EventSystem::RegKeyboardListener(this);
}
KeyboardEventsListener::~KeyboardEventsListener()
{
EventSystem::UnregKeyboardListener(this);
}
void Ke... |
9fedc349832a0aab93701a184afbe7bd5c704104 | fc89834e2c1cb47febb53c31a601f6cccf1402a3 | vermosen/xlObjectTools | /bot/factory/frequency/frequencyFactory.cpp | C++ | cpp | 1,989 | no_license | /*
* xlObjectTools
*
* Created by Jean-Matthieu VERMOSEN on 28/10/09
* Copyright 2009. All rights reserved.
*
*/
#include <bot/factory/frequency/frequencyFactory.hpp>
namespace ObjectHandler {
frequencyFactory::frequencyFactory() {
idObject = "" ;
}
QuantLib::Frequency frequencyFactor... |
0cf617b720f13550082250e2e387f18422c4aa12 | 60312ad8e360809ac95a6ada8c73a85764d5ec2f | cdossantos15/NachenBlaster | /StudentWorld.cpp | C++ | cpp | 4,384 | no_license | #include "StudentWorld.h"
#include "GameConstants.h"
#include "Actor.h"
#include <string>
#include <algorithm>
#include <vector>
#include <random>
using namespace std;
GameWorld* createStudentWorld(string assetDir)
{
return new StudentWorld(assetDir);
}
// Students: Add code to this file, StudentWorld.h, Actor.h a... |
c0a01c99bf5dfe28b1f962590cd5748fbc2d46ea | 76ab95b93485b3e6701dca6224ce2a5f7a8b3df7 | AnBaolei1984/Paddle-Lite | /lite/kernels/arm/mul_compute_test.cc | C++ | cc | 4,805 | permissive | // Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
6da8466e03ab5bac95197ac7429450532c965bc4 | a783dc6941bc9cbb9d9a6f76363a8397e267d401 | mkay1375/chromium | /ash/components/arc/lock_screen/arc_lock_screen_bridge_unittest.cc | C++ | cc | 2,992 | permissive | // Copyright 2021 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 "ash/components/arc/lock_screen/arc_lock_screen_bridge.h"
#include "ash/components/arc/test/connection_holder_util.h"
#include "ash/components/a... |
250ed7a0a460eef4c253729282ab43daea14a6b9 | 40ca29c4d8fb7da6f3328594f2fed60613ac761a | MedicaicloudLink/Rosetta | /main/source/src/ObjexxFCL/floops.hh | C++ | hh | 1,904 | no_license | #ifndef INCLUDED_ObjexxFCL_floops_hh
#define INCLUDED_ObjexxFCL_floops_hh
// Fortran Compatible DO Loop Support
//
// Project: Objexx Fortran Compatibility Library (ObjexxFCL)
//
// Version: 3.0.0
//
// Language: C++
//
// Copyright (c) 2000-2009 Objexx Engineering, Inc. All Rights Reserved.
// Use of this source cod... |
966bcbb35a813528ec8e0c95736e8cec14a19c99 | 0c5432877cc82a66cf4c9e0d2e5d2d97dcd5d683 | iridium-browser/iridium-browser | /buildtools/third_party/libc++abi/trunk/test/catch_class_04.pass.cpp | C++ | cpp | 4,411 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
4f60731bce2cef0530523a25c35ffcb596d8d179 | 4ee3728527c4cfe33b984a5bb8f54fd1553e911c | AbdoOkasha/CompetitiveProgramming | /library/DataStructures/MonotonicQueue.cpp | C++ | cpp | 1,255 | no_license | template <typename T>
class MonotonicQueue{
private:
stack<pair<T , T> > st[2];
public:
int getsz(){
return st[0].size() + st[1].size();
}
void add(T x){
T pre = (st[0].empty() ? x : max(x , st[0].top().second));
st[0].push({x , pre});
... |
6e9543d83d48a10fcae23834e978fa7102f6e3c8 | 084363c6f915a4c3f8c800a8ae4557d80cd91f38 | crysisfarcry222/DirectXShaderCompiler | /tools/clang/unittests/HLSL/LinkerTest.cpp | C++ | cpp | 8,563 | permissive | ///////////////////////////////////////////////////////////////////////////////
// //
// LinkerTest.cpp //
// Copyright (C) Microsoft Corporation. All rights reserved. //
//... |
6ae7d83d29208f29d263330c17a1083bc4d7603d | 1c0c2a3da1ca1afbc7367fa80e2a52d1161740a6 | saroj31/Python-Interpreter-CPSC8270 | /ScopeResolution/newscanner/parse.tab.cpp | C++ | cpp | 94,908 | no_license | /* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by... |
97cf009b7e98ae39b31ac610634be76190359bac | ea4d59fb2a2dc4bc6dffa368dd7b4ab21b83b88a | Mayank-Parasar/leetcode | /removeConsecutiveSumTo0.cpp | C++ | cpp | 3,039 | no_license | //
// Created by Mayank Parasar on 2019-12-18.
//
/*
* Given a linked list of integers, remove all consecutive nodes that sum up to 0.
Example:
Input: 10 -> 5 -> -3 -> -3 -> 1 -> 4 -> -4
Output: 10
*/
#include <iostream>
#include <vector>
using namespace std;
struct node {
int val;
node* next;
node(... |
8271cc98dec3a2c4ccb9e9f5c251f4d0ef1df808 | 36607331dfd4077007025506a6254e69b6e8f84f | nazarov-yuriy/contests | /gvzhf/p17/p1728.cpp | C++ | cpp | 1,332 | no_license | #include <iostream>
#include <set>
using namespace std;
int main() {
int n, re, rk, m;
cin >> n;
set<string> t2, t3;
for (int i = 0; i < n; i++) {
string a, b, c;
int cnt;
cin >> cnt;
cin >> a;
if(cnt > 1) cin >> b;
if (cnt == 3) {
cin >> c;
... |
6502361c7d04b7a81551df3c8f2871e1932dad2a | 41525e3d7deb52b5087c524e2c9aeafaf465180f | qin901102/caffe-hash | /src/caffe/layers/video_sigmoid_label.cpp | C++ | cpp | 931 | permissive | #include <vector>
#include "caffe/blob.hpp"
#include "caffe/video_layers.hpp"
#include "caffe/layer.hpp"
namespace caffe {
template <typename Dtype>
void VideoSigmoidLabelLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
n_cate_ = 101;
vector<int> shape;
shape.push... |
287f2a668e65014d824c4a4d60a84875c15bbdd5 | db50ce9d53a3127c54918ac7438c391ea5fccd0d | iOranges/KoalaWY | /NOIP真题/提高组/【15NOIP提高组】运输计划.cpp | C++ | cpp | 2,236 | no_license | #include<cstdio>
#include<iostream>
#define N 300005
#define SIZ 1<<10|1
using std::max;
struct edge{
int to,nxt,v;
}e[N << 1];
struct node{
int dis,u,v,lca;
}len[N];
struct query{
int to,nxt,id;
}q[N << 1];
bool vis[N];
int h[N],tot,w[N],n,m,f[N],h2[N],tot2,d[N],res,s[N],num,maxlen;
char buf[SIZ],*S = buf,*T = buf;... |
77f564eaf20651b2ade4669d1ef8c1057a2cccc9 | be20711e151fc7a2ceef833bc1656c77ee80a49d | DynBoxClonk/openclonk | /tests/DirectExecTest.cpp | C++ | cpp | 2,812 | permissive | /*
* OpenClonk, http://www.openclonk.org
*
* Copyright (c) 2013, The OpenClonk Team and contributors
*
* Distributed under the terms of the ISC license; see accompanying file
* "COPYING" for details.
*
* "Clonk" is a registered trademark of Matthes Bender, used with permission.
* See accompanying file "TRADEMA... |
316c396a8002bf19ab6a6b72a7321d74b72863c6 | 5ab2a6578e24876de1acaccd4a25cf70a1095d2a | jbuckmccready/CavalierContours | /src/cavaliercontours.cpp | C++ | cpp | 9,421 | permissive | #include "cavaliercontours.h"
#include "cavc/polylinecombine.hpp"
#include "cavc/polylineoffset.hpp"
#include <iostream>
#include <memory>
#include <stdexcept>
#define CAVC_BEGIN_TRY_CATCH try {
#define CAVC_END_TRY_CATCH \
} ... |
77041bfa702177dbfe935eae5863685609409415 | 5efec95192a4c5255e95bf912373b8d6f7793d92 | chris1201/multi-layer-convnet | /src/result_predict.cc | C++ | cc | 3,082 | permissive | #include "result_predict.h"
using namespace cv;
using namespace std;
Mat
resultPredict(const vector<Mat> &x, const vector<Cvl> &CLayers, const vector<Fcl> &hLayers, const Smr &smr){
int nsamples = x.size();
// Conv & Pooling
vector<vector<Mat> > conved;
convAndPooling(x, CLayers, conved);
Mat c... |
65fecc2a44178212393eafa49693b1280113b45b | 1922a8c1e0e6c927db9072dea3ec547d8f9ee06f | dake0805/DataStructureExperimentNwpu2019 | /Exercise2_Stack_Queue/LeetCode739.cpp | C++ | cpp | 1,293 | no_license | //
// Created by zy on 4/3/2019.
//
/**
* LeetCode 739
*
根据每日 气温 列表,请重新生成一个列表,对应位置的输入是你需要再等待多久温度才会升高的天数。如果之后都不会升高,请输入 0 来代替。
例如,给定一个列表 temperatures = [73, 74, 75, 71, 69, 72, 76, 73],你的输出应该是 [1, 1, 4, 2, 1, 1, 0, 0]。
提示:气温 列表长度的范围是 [1, 30000]。每个气温的值的都是 [30, 100] 范围内的整数。
*/
/**
* Run Input Example
* 8
* 73 74 ... |
37a061d7f97546007b8b0cc154ce38ea43f6ecfc | eb49a9a16c6de9c492ae6ee335d089417faa01d5 | jtagjr/lathe-grinder-controller | /TM1637/Font_7Seg.cpp | C++ | cpp | 6,821 | permissive | /* mbed LED Font Library, for TM1637 LED controller
* Copyright (c) 2016, v01: WH, Initial version, Test in CATALEX
* 2017, v02: WH, Added RobotDyn 6 Digit module,
* Added Eyewink 6 Digit + 5 Keys module,
* Constructor adapted to 2 pins: dio, clk ... |
7968146db5b236c638d4c578e86726e617ba6a52 | fcec6ff951e5a0b23dfed476ef472e648b04f7ff | taxmanmt5/Venture | /src/qt/addressbookpage.cpp | C++ | cpp | 11,566 | permissive | #include "addressbookpage.h"
#include "ui_addressbookpage.h"
#include "addresstablemodel.h"
#include "optionsmodel.h"
#include "Venturegui.h"
#include "editaddressdialog.h"
#include "csvmodelwriter.h"
#include "guiutil.h"
#include <QSortFilterProxyModel>
#include <QClipboard>
#include <QMessageBox>
#include <QMenu>
... |
820919e806f5eb12401017d38e43c41b17883254 | 1ad29857d065c81ed955099c62fbb500edc9f7e0 | rtohid/blaze | /blazetest/src/mathtest/tdvecdmatmult/V7aM7x13b.cpp | C++ | cpp | 3,733 | permissive | //=================================================================================================
/*!
// \file src/mathtest/tdvecdmatmult/V7aM7x13b.cpp
// \brief Source file for the V7aM7x13b dense vector/dense matrix multiplication math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
/... |
ef7fe3d42966f1ef441b9244a4eaf22a41ac8f2b | 85aa0a422928dcd9f63266c77e0d4a5a9cbcfd35 | alinasuon23/ProgrammingDataStructure | /L19_stringArray/main(7).cpp | C++ | cpp | 2,174 | no_license | /* Sean Masterson
Alina Susan
November 15, 2018
Purpose: Create and display String objects representing a dynamic array of strings.
Inputs: strings to add to String object.
Output: What is stored in the String object and any errors that happen.
*/
#include <iostream>
#include "String.h"
int main(... |
8783e3c0cece30c31b05167ebc94f5745fa96aa7 | a53ef1621cf4c858ba4ac8c3a67ebc8a2082c136 | smart-make/boost | /libs/range/test/iterator_range.cpp | C++ | cpp | 8,416 | permissive | // Boost.Range library
//
// Copyright Thorsten Ottosen & Larry Evans 2003-2005. Use, modification and
// distribution is subject to 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)
//
// For more information, see http://www.boost... |
e3b084f7dbb22fd29235d605538abc10f0c8ffa6 | 919d272d39a6217ce49816d593f4219f4bda7f03 | arceciemat/GAMOS | /source/GamosCore/GamosAnalysis/src/GmEventClassifierByGammaInteraction.cc | C++ | cc | 3,778 | no_license |
#include "GmEventClassifierByGammaInteraction.hh"
#include "GmTrajPoint.hh"
#include "GmTrajStep.hh"
#include "GamosCore/GamosUtils/include/GmGenUtils.hh"
#include "GamosCore/GamosUtils/include/GmG4Utils.hh"
#include "GamosCore/GamosBase/Base/include/GmGetParticleMgr.hh"
//-------------------------------------------... |
486d29879f0bde2444c3a57ab27ce8085e8369d0 | bbdb2f70d7fd323fab854240fe4e5932c4346a29 | jiweibo/Paddle | /paddle/phi/tests/api/test_sparse_conv_api.cc | C++ | cc | 6,706 | permissive | /* Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
df3a6f45acb6b054a868d05dfac5df0c90993449 | 4c3a720fc37779ef6299d06428d574b30b58c699 | GeomaticsAndRS/flow123d | /src/reaction/first_order_reaction_base.hh | C++ | hh | 4,449 | no_license | /*!
*
* Copyright (C) 2015 Technical University of Liberec. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 3 as published by the
* Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html... |
959a7406a6f4e53e464e0225dc5bee52237ec71f | 2a0adbcb658428c060625f55f554ef900549cb92 | UFZ-MJ/OGS_mHM | /MathLib/EarClippingTriangulation.cpp | C++ | cpp | 7,707 | no_license | /*
* EarClippingTriangulation.cpp
*
* Created on: Feb 23, 2011
* Author: TF
*/
// STL
#include <vector>
// BASELIB
#include "swap.h"
#include "printList.h"
#include "uniqueListInsert.h"
// MATHLIB
#include "EarClippingTriangulation.h"
namespace MATHLIB {
EarClippingTriangulation::EarClippingTriangulatio... |
571d63c84ee0b04094731727c722110544c5ca2b | fd612f65fd92b0a8a28e9758610d47709503dc2b | tenup-coin/TenUp | /src/libzerocoin/Commitment.cpp | C++ | cpp | 7,139 | permissive | /**
* @file Commitment.cpp
*
* @brief Commitment and CommitmentProof classes for the Zerocoin library.
*
* @author Ian Miers, Christina Garman and Matthew Green
* @date June 2013
*
* @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green
* @license This project is rele... |
408f53c23a6fbcc66a999aa9b840f97a51914c9a | 426e3b8a524ff28cf5cddff921dd7586676bf86f | pankajgupta3/Coding-Ninjas--Data-Structures-and-Algorithms-in-Cpp | /Recursion 2/Return all codes - String.cpp | C++ | cpp | 1,822 | no_license | /* Code: Return all codes - String
Assume that the value of a = 1, b = 2, c = 3, ... , z = 26. You are given a numeric string S. Write a program to return the list of all possible codes that can be generated from the given string.
Note : The order of codes are not important. And input string does not contain 0s.
Input ... |
7c8afce1a95ef0c4837f0f5253e1659c6b3f4567 | fc9076b68e84128abf311ed17437ab33aff5f577 | xcode2010/saurik-svn-mirror | /menes/trunk/menes/api/locks.hpp | C++ | hpp | 2,324 | no_license | /* Menes - C++ High-Level Utility Library
* Copyright (C) 2002-2003 Jay Freeman (saurik)
*/
/*
* 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 t... |
25a2a3b40d3f7ba558c7c374c61834809eaf0ded | 05be94eeccb2461fff12ff547a1bf16eac54485a | yash2322/COMPETITIVE_CODING | /CP/hacker blocks/test/unique number 3.cpp | C++ | cpp | 808 | no_license | #include<bits/stdc++.h>
#define FORS(i,a,b) for(long long int i=a;i<b;i++)
#define FORE(i,a,b) for(long long int i=a-1;i>=0;i--)
#define MAX 1000000
#define FS ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define out(a) cout<<a;
#define pb(a) push_back(a)
#define pbp(a,b) push_back({a,b})
//#define out_pair(a(i))... |
bd31efc8c58805d9cfcfe27aa22bbac4e7016cd6 | 1a36bb316559589b6694c29e9f7d1b035090ac2b | paper-mat-refs/GenerativeFaceCompletion_Windows | /src/caffe/solvers/sgd_solver.cpp | C++ | cpp | 13,117 | permissive | #include <string>
#include <vector>
#include "caffe/sgd_solvers.hpp"
#include "caffe/util/hdf5.hpp"
#include "caffe/util/io.hpp"
#include "caffe/util/upgrade_proto.hpp"
namespace caffe {
// Return the current learning rate. The currently implemented learning rate
// policies are as follows:
// - fixed... |
40fa3dbbdfeb2dd80d0acef52ae18765f189bd46 | dc22496ef6995706d41aa28fbc7e6c73a921b3fa | theofficialgman/Webserver | /WebserverVS/Webserver.UWP.WRL/App.xaml.cpp | C++ | cpp | 16,640 | permissive | #include "App.xaml.h"
#include "MainPage.xaml.h"
#include <ppltasks.h>
#include <robuffer.h>
#include <wrl.h>
#include <unordered_map>
#include <fstream>
#include <openssl/err.h>
#include <../../../Http/ErrorCode.h>
#include <../../../Http/Connection.h>
#include <../../../Http/Stream.h>
#include <../../../H... |
7f347a332f10bc6fcf15062252fed1092742904e | 9a8a05cee1c7cae2688c68afe0fdf40962cee273 | ALEHACKsp/cooperware | /features/ragebot.cpp | C++ | cpp | 12,407 | no_license | #include "ragebot.hpp"
#include "../hooks/hooks.hpp"
#include "autowall.hpp"
#include "..\globals\globals.hpp"
#include "misc.hpp"
#include "animfix.h"
#include "lagcomp.h"
#include "resolver.hpp"
#include "predictionsystem.h"
#include "antiaim.h"
float SynchronizeHitchance( ) {
auto me = g_LocalPlayer;
auto cmd =... |
3be67049cd8b837aa1cdf3b3cba041104728f7c6 | 8e143bf1bccd9dc4cac0235751af8e392c952f71 | chancez/CS261 | /unit1/lab1/inventory.cpp | C++ | cpp | 4,122 | no_license | /*
* =====================================================================================
*
* Filename: inventory.cpp
*
* Description:
*
* Version: 1.0
* Created: 06/30/2012 07:56:57 PM
* Revision: none
* Compiler: gcc
*
* Author: Chance Zibolski (CZ), zibol... |
5f125307d03981fcba63b19542df1d6097b18ab6 | fa8f316af163b96fcb2af48c22bd82748ea4b7e3 | AkVaya/CP_Solutions | /Spoj/BYTESM2.cpp | C++ | cpp | 1,398 | no_license | #include<iostream>
#include<math.h>
#include<algorithm>
#include<stdlib.h>
#include<stack>
#include<set>
#include<string.h>
#include<map>
#include<vector>
#define pb push_back
#define ins insert
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define max3(a,b,c) max(c,max(a,b))
#define mi... |
6ad5e89a0c0fa6083d0fd635ba1117060fd34367 | 0d4ed9b650973de970215649b4897b5ce3e54c58 | aluaces/chrono | /src/chrono_vehicle/tracked_vehicle/ChTrackedVehicle.cpp | C++ | cpp | 17,547 | permissive | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of t... |
6b2785c22d474d325e2fb782f2ee6c7f57dbea65 | 9ba15c1f73bd22a668f8e67c7de03fe7ffa71fef | lz1287209575/PSS | /purenessscopeserver/FrameCore/CppUnit/Unit_BaseHandler.cpp | C++ | cpp | 9,887 | permissive | #include "Unit_BaseHandler.h"
#ifdef _CPPUNIT_TEST
void CUnit_Basehandler::setUp(void)
{
m_nBaseHandlerID = 1;
}
void CUnit_Basehandler::tearDown(void)
{
m_nBaseHandlerID = 0;
}
void CUnit_Basehandler::Test_Tcp_Common_File_Message(void)
{
bool blRet = false;
_File_Message_Param obj_File_Message_Para... |
507c698d0afd200dd6ac85be2b5fb6428e1bfdb9 | 18c74b7bb97aaa9513a8308f7c295c26be06740a | NCAR/lrose-core | /codebase/apps/radar/src/TsArchive2Dsr/Args.cc | C++ | cc | 4,731 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
e41ad6614480f666ca9d69dae7057f917f5a149a | 04bab8b084a17974b159eeed63ea5ed3ca49f649 | YILINQ/CSC418 | /computer-graphics-ray-tracing/src/PointLight.cpp | C++ | cpp | 370 | no_license | #include "PointLight.h"
void PointLight::direction(
const Eigen::Vector3d & q, Eigen::Vector3d & d, double & max_t) const
{
////////////////////////////////////////////////////////////////////////////
// Add your code here:
d = (p - q) / (p - q).norm();
max_t = (p - q).norm();
/////////////////////////////... |
8e46c355cac0d16386be86afc402a4d5d4c5dcf6 | ae48b2d90226ebf3ae898897c8afbe82d2435644 | btccom/bitcoin-abc-1 | /src/wallet/db.cpp | C++ | cpp | 26,385 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "db.h"
#include "addrman.h"
#include "fs.h"
#include "hash.h"
#include ... |
16accd60bd78991c7eb596441f2983af572b3fe4 | 11a3ec20b14ce809ecab7eb1e76a3d4c89413974 | netarch/neo | /src/protocols.hpp | C++ | hpp | 4,171 | permissive | #pragma once
#include <string>
enum proto {
tcp,
udp,
icmp_echo
};
static inline std::string proto_str(int n) {
return n == proto::tcp ? "TCP"
: n == proto::udp ? "UDP"
: n == proto::icmp_echo ? "ICMP"
: "(unknown)";
}
static inl... |
db919a401685c7cb676344998c6732e0accb2e5e | b15e6f9ad4a16348067bff7155325494ae372a40 | Shekharrajak/Language-Processor-LP-Course2 | /LR_lab_other/LP/SLR.cpp | C++ | cpp | 13,208 | no_license | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define set_item set<pair<char,string> >
vector<string>V[1001];
vector<char>Sym;
set<char>null;
set<set<pair<char,string> > >C;
map<set_item,int >State;
set<char>Term;
char start;
set_item start_state;
int vis[100];
... |
94dfaf971db24a189c07c3cfdbfb8f86890012ea | 9a03b9767082d3a47e7d724f670c464e0083e11d | LuizFernandoVieira/SDL_ECS_Engine | /src/GameState.cpp | C++ | cpp | 19,008 | no_license | #ifdef __APPLE__
#include <SDL2/SDL.h>
#else
#include "SDL.h"
#endif
#include <vector>
#include <unordered_map>
#include <exception>
#include "../include/Game.hpp"
#include "../include/GameState.hpp"
#include "../include/Camera.hpp"
#include "../include/InputHandler.hpp"
#include "../include/InputSystem.hpp"
#includ... |
e5c521b16702ca7455d52222f5c745e74fdac946 | 0b20747b867b9462fa0b8aea5be0b2ff109e6081 | xmniu/MiniBacon | /DataFillers/src/FillerVertex.cc | C++ | cc | 2,408 | no_license | #include "MiniBacon/DataFillers/interface/FillerVertex.hh"
#include "FWCore/Framework/interface/Event.h"
#include "DataFormats/Common/interface/Handle.h"
#include "MiniBacon/DataFormats/interface/TVertex.hh"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include <TClonesArray.h>
using namespace baconhep;
//---... |
123c6716366b64f4a990ee7854ea7fd714002ce1 | 0a0d50ac8f45555f388b278bf80ad47fb03bd56f | stormageddon/serpent | /Serpent.cpp | C++ | cpp | 48,473 | no_license | #include <cstdio>
#include <iostream>
#include <bitset>
#include <map>
#include <string>
#include <cstring>
#include <tuple>
#include <vector>
#include <fstream>
#include <sstream>
class Serpent
{
private:
int ip[128]; //initial permutation
int fp[128]; //fin... |
abc318c3c21af740e63f39bbaf7de110a962b02f | 319d05db1abedc548d12fc0df92d6f2e3ece2ef3 | Chance516/catboost | /catboost/libs/data/load_and_quantize_data.cpp | C++ | cpp | 36,250 | permissive | #include "load_and_quantize_data.h"
#include "baseline.h"
#include "cat_feature_perfect_hash.h"
#include "data_provider_builders.h"
#include "proceed_pool_in_blocks.h"
#include "quantization.h"
#include "util.h"
#include "visitor.h"
#include <catboost/libs/column_description/cd_parser.h>
#include <catboost/libs/helpe... |
62d9efa70a8017bf4f744d4c94b089c4d9c11288 | c68bab3daf606bfeb7e55dbf08873ed558585499 | fouronnes/jupiter-rings-tomography | /planetarium/src/calibration.cpp | C++ | cpp | 1,147 | permissive | #include <iostream>
#include <cmath>
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
typedef unsigned char uchar;
int main() {
cv::namedWindow("Calibration", cv::WINDOW_NORMAL);
cv::Mat image = cv::Mat::zeros(1080, 1920, CV_32FC1);
// Parameters
int origin_x = 400;
int origin_y = 300;
... |
5d3a29f5ab2ff173ecdeb70f09ee6211c246566e | bee10e566da4038e53866b27382469cafbcce686 | RathanakSreang/APongGame | /background.cpp | C++ | cpp | 10,559 | no_license | #include"Button.h"
#include"Timer.h"
#include"save.h"
#include <fstream>
//#include"SDL_net.h"
void DoLoading(int i){
loadingWidth[0].w=i;
set_display(0,0,loadingPic,screen);
set_display(155,470,loadingKey,screen,&loadingWidth[0]);
MessageGame(655,466, Tostring((int)i*100/488)+"... |
d759e3c080d2331ec1648eac854dd055c51f7050 | 871b6713c56dd515c7e1b33ff345e40c649db8b6 | huangtianhua/impala | /be/src/runtime/io/disk-io-mgr-test.cc | C++ | cc | 66,757 | permissive | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
2711544e1e1215ffb0601b593839cb82bc717ec5 | a839b83c8906c356da236b4552e52ce7ee156f2e | ranon-rat/esp32-video-streaming | /src/streaming.hpp | C++ | hpp | 2,443 | no_license | #include <WiFi.h>
#include "esp_camera.h"
#include "esp_http_server.h"
//#include <AsyncTCP.h>
//#include <ESPAsyncWebServer.h>
//
//macros
#define PART_BOUNDARY "123456789000000000000987654321"
#define STREAM_CONTENT_TYPE "multipart/x-mixed-replace;boundary=" PART_BOUNDARY
#define STREAM_BOUNDARY "\r\n--" PART_BOUND... |
e8a72e2368b294da5f16101b110ad053d39d02db | 9355b8e76b319a076b568450a71b8022c6d72956 | kfengbest/Pattens | /TestPattens/TestPattens/Interfaces2.cpp | C++ | cpp | 639 | no_license | //
// Interfaces2.cpp
// TestPattens
//
// Created by Kaven Feng on 8/27/13.
// Copyright (c) 2013 Kaven Feng. All rights reserved.
//
#include "Interfaces2.h"
using namespace Interfaces2;
void* InterfaceID::GetInterface(int tag)
{
return nullptr;
}
DEFINE_INTERFACE_ID(InterfaceID, Object, eObject)
void Ob... |
0200b0c8ce143ab403fad6cab635286e118b093b | 0fa7ee82508ae80db5b87e5a0f53867639431990 | pengge/C_program | /26/26.3/AnimateIconSample/AnimateIconSample.cpp | C++ | cpp | 4,253 | no_license | // AnimateIconSample.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "AnimateIconSample.h"
#include "MainFrm.h"
#include "AnimateIconSampleDoc.h"
#include "AnimateIconSampleView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
... |
8ad778692c500b25912a5ef84de044b33e6c9bdd | 6b1ec1a8378e8fb21d36566d5433858ee5881dd1 | crepererum/GraBaSS | /src/grabass/cliquesearcher.cpp | C++ | cpp | 4,201 | no_license | #include <algorithm>
#include <atomic>
#include <cassert>
#include <iostream>
#include <memory>
#include <set>
#include <unordered_set>
#include <vector>
#include <tbb/blocked_range.h>
#include <tbb/parallel_reduce.h>
#include "cliquesearcher.hpp"
namespace gc = greycore;
typedef std::vector<std::vector<std::size_t... |
7780c593c64e787b53675ae8bc0f46021c671d55 | 1b8791a3c3ee587b2de72900b720dae06e1d0df9 | eagletmt/procon | /gcj/2016/Qual/B.cc | C++ | cc | 530 | permissive | #include <iostream>
#include <vector>
using namespace std;
int main() {
int T;
cin >> T;
for (int Ti = 1; Ti <= T; Ti++) {
string line;
cin >> line;
vector<int> pancakes;
for (char c : line) {
pancakes.push_back(c == '+' ? 0 : 1);
}
const int N = pancakes.size();
int ans = 0;
... |
23b848c3079c72397adb81d8e3d90f94ad2a7aff | 4e2439c5d76aac570dd21f01720c4d76f2a2a9f2 | rgayatri23/Brookathon-GoT | /FF/ff.cpp | C++ | cpp | 5,448 | no_license | #include "../ComplexClass/CustomComplex.h"
void achsDtemp_Kernel(int number_bands, int ngpown, int ncouls, int *inv_igp_index, int *indinv, \
CustomComplex<double> *aqsntemp, CustomComplex<double> *aqsmtemp, double *vcoul, \
CustomComplex<double> &achsDtemp, CustomComplex<double> *I_epsR_array)
{
d... |
777b3fa8da3d6f63e18d17391944d252a3c14f7e | b650b66ef34e305289a2876a98cf28e7862ca853 | bjornd/couchbase-lite-core | /tools/cblite/cbliteTool+revs.cc | C++ | cc | 4,791 | permissive | //
// cbliteTool+revs.cc
//
// Copyright (c) 2017 Couchbase, 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
//
/... |
934c41bd03b7897468a4daa39584acdbea05d18e | 8dfb7afc62104a67277e846ff4c4e1f060f9feb6 | marcomalabag/GAMEENG3_RENDERER | /Basic_renderer/Bunnyobj.cpp | C++ | cpp | 4,073 | no_license | #include "Bunnyobj.h"
#include "SwapChain.h"
#include "GraphicsEngine.h"
#include <Windows.h>
#include "Vector3D.h"
#include "VertexBuffer.h"
#include "IndexBuffer.h"
#include "AppWindow.h"
#include "EngineTime.h"
#include "Matrix4.h"
#include "InputSystem.h"
#include "Vector2D.h"
#include <iostream>
#include "Mesh.h"
... |
74181031894d75c411fedbc7c67d003dafa21beb | 9f3f96285a7fbc4a7b9ac7e6a603780190586031 | ElMoustaphaoui/Nine-Mens-Morris-AI | /Nine_Mens_Morris_AI_SDL/master/Node.cpp | C++ | cpp | 777 | no_license |
#include "Node.h"
int Node::positionsDeleted = 0;
int Node::positionsGenerated = 0;
//constructor : init on point (Node)
Node::Node(int location)
:up(NULL), down(NULL), left(NULL), right(NULL),player(NEUTRAL)
{
positionsGenerated++; //add one to the counter
this->location = location; //the check is outside
}
//sets... |
7bbf2ef542ffb32a360937457dd67cef30d98f11 | 97b59169e1847ade8bb135ee199798e6c437e129 | jesuswr/cp-codes-and-problems | /B.color_the_fence.cpp | C++ | cpp | 1,534 | no_license | #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <math.h>
#include <string>
#include <cstring>
#include <set>
#include <map>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, pair<int, int>> piii;
type... |
7a16991653b4ebea2f6daccae435b36fcb3a9903 | f750cd0cb619807be14e99e83acbc9064c7dea8b | traplol/malang | /src/ast/ast_fn.cpp | C++ | cpp | 396 | permissive | #include <stdio.h>
#include <sstream>
#include "ast_fn.hpp"
Fn_Node::~Fn_Node()
{
for (auto &&p : params)
{
delete p;
}
params.clear();
delete return_type;
return_type = nullptr;
for (auto &&n : body)
{
delete n;
}
body.clear();
PRINT_DTOR;
}
Type_Info *Fn_N... |
73194e49115147d456b56c0d006c14fc58ad80d5 | 0222daa07b2cda1992d14a12b4d70b921c61c243 | junmin-zhu/chromium-rivertrail | /chrome/browser/ui/gtk/tab_modal_confirm_dialog_gtk.cc | C++ | cc | 3,829 | 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/gtk/tab_modal_confirm_dialog_gtk.h"
#include "base/message_loop.h"
#include "base/utf_string_conversions.h"
#include "chr... |
7223ac8311140e7f1c0d3819c535979e13f524ec | 3511444caac809f241bd5f251f9b32728f261e20 | LuisTG/COJ-Problems | /milhouse-p2623-Accepted-s608775.cpp | C++ | cpp | 570 | no_license | #include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
main(){
string x;
cin>>x;
string a,b,aux;
if(x.length()%2==0){
a=x.substr(0,x.length()/2);
b=x.substr(x.length()/2,x.length());
x="";
for(int i=a.length()-1;i>-1;i--){
x=x+a[i];
}
for(int i=b.length()-1;i>-1;i--){
x=x+b[i];
}
cou... |
f6679f9054aeca867626a7ed58adbb75763eafbb | bfedd71b758d825a42d2bb52954ce7e30d59b118 | huningxin/ngraph | /src/ngraph/runtime/gpu/cuda_emitter.cpp | C++ | cpp | 140,890 | permissive | //*****************************************************************************
// Copyright 2017-2018 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://w... |
099f8a63cebb07d664efe2110cf61e282a303eb3 | 3ff2a7154a258426b07e3ce3f1d829bed51783f2 | LineageOS/android_external_skia | /tests/AdvancedBlendTest.cpp | C++ | cpp | 2,736 | permissive | /*
* Copyright 2019 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "Test.h"
#include "GrContextPriv.h"
#include "GrPaint.h"
#include "GrProcessorSet.h"
#include "effects/GrCustomXfermode.h"
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(Advanc... |
8d1204f3d47208ff807186e06949e4c4e1f7edbf | 44c74456924840a69c8cf74601f2f4106660aac6 | C8PAN/copycatting | /semantic_mapping/src/core/engine/main_engine.cpp | C++ | cpp | 7,943 | no_license | #include "main_engine.h"
using namespace semantic_mapping::engine;
MainEngine::MainEngine(const Settings* settings, const RgbdCalibration* calib,
Vector2i image_size_rgb, Vector2i image_size_d) {
static const bool create_meshing_engine = true;
if((image_size_rgb.x==-1) || (image_size_rgb.y=... |
0f4019ef8353b902e7117f7fb9735af67ca03f7c | fb57adad121755113d224dc171d3b37fe6d55ff9 | steve-o/Hilo | /src/rfaostream.hh | C++ | hh | 16,956 | no_license | /* RFA output streaming.
*/
#ifndef __RFA_OSTREAM_HH__
#define __RFA_OSTREAM_HH__
#pragma once
/* RFA 7.2 */
#include <rfa/rfa.hh>
namespace rfa {
namespace common {
inline
std::ostream& operator<< (std::ostream& o, const RFA_String& rfa_string) {
o << rfa_string.c_str();
return o;
}
inline
std::ostream&... |
8deeb12bd162106c11c51120e8bc5a11cf852681 | 2acde7ca1fce6cdf042c3cc380d754490b1d40ed | MatillaMartin/Arcanoid | /src/KeyboardInputComponent.cpp | C++ | cpp | 605 | no_license | #include "KeyboardInputComponent.h"
KeyboardInputComponent::KeyboardInputComponent(char left, char right, char up, char down, char use)
:
m_left(left),
m_right(right),
m_up(up),
m_down(down),
m_use(use)
{
}
bool KeyboardInputComponent::parse(char input, UserCommand & command)
{
if (input == m_left)
{
comman... |
51107932e5d547aea72dcac6205c41e01cc0a2cc | c20e675f9f6f7aa489049c0877d5a32aa28e0e2b | hans511002/erydb_rep | /utils/funcexp/func_time_to_sec.cpp | C++ | cpp | 4,002 | no_license | /* Copyright (C) 2014 EryDB, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITH... |
ec851de7760cdfd72a5e708344f65069604c7d1e | 15ebbf95b28e5b07754b63825de0d0a451aa7621 | zyex1108/OPS | /apps/c/CloverLeaf_3D/OpenACC/update_halo_kernel2_xvel_minus_2_left_openacc_kernel.cpp | C++ | cpp | 6,748 | no_license | //
// auto-generated by ops.py
//
#include "./OpenACC/clover_leaf_common.h"
#define OPS_GPU
extern int xdim0_update_halo_kernel2_xvel_minus_2_left;
int xdim0_update_halo_kernel2_xvel_minus_2_left_h = -1;
extern int ydim0_update_halo_kernel2_xvel_minus_2_left;
int ydim0_update_halo_kernel2_xvel_minus_2_left_h = -1;
ex... |
602f374cb6a90afeea48fe2ccffe3ca24658b30e | 4e335cc7164ac4d3ce9ed782d4f72dc32b0db6b1 | audiofilter/spuc_fixed | /test_ints/tb_int_types.cpp | C++ | cpp | 2,966 | permissive | #include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <cstdlib>
#include <cassert>
#include <spuc/spuc_int_types.h>
#include "get_type_info.h"
using namespace std;
using namespace SPUC;
int main(int argc, char* argv[]) {
const int INT_BITS = 6;
double d;
spuc_int<INT_BITS> s_a,... |
5b0d723bd413a88a84350e41f78d84d0117beb9b | 126a93919184342bce799fc3f276babcd3c58bc9 | arian153/Engine5th | /Source/System/Core/OS-API/Win32/GamePadInputWin32.hpp | C++ | hpp | 696 | permissive | #pragma once
#include <windows.h>
#include <Xinput.h>
namespace Engine5
{
struct PadState;
class GamePadInputWin32
{
public:
GamePadInputWin32();
~GamePadInputWin32();
protected:
void ProcessButtons(XINPUT_GAMEPAD* game_pad, PadState& pad_state) const;
void ProcessL... |
57544a3df56ae740b66dc378931f4bfa62610529 | 22dc7f07edc5555b8dc4ad33a3cb07108504613b | gateway2000/serenity | /Kernel/Graphics/VGACompatibleAdapter.cpp | C++ | cpp | 3,225 | permissive | /*
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Graphics/Console/ContiguousFramebufferConsole.h>
#include <Kernel/Graphics/Console/TextModeConsole.h>
#include <Kernel/Graphics/GraphicsManagement.h>
#include <Kernel/Graphics/VGACompatibleAdapter... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.