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 |
|---|---|---|---|---|---|---|---|---|
34a66e278e5749acb25f4f37d65537449c6fc9fd | ffc767ef5506f31a6f1e818ca7cb03508cbd8e06 | Tomspiano/PAT-Advanced-Level-Practice | /code/1050.cpp | C++ | cpp | 364 | permissive | #include<bits/stdc++.h>
#define N 10005
using namespace std;
#define rep(i,a,b) for(int i=(a); i<(b); ++i)
unordered_set<char> us;
//set<char> us;
char s[N], c;
int main() {
cin.getline(s, N);
while(c=getchar(), c!='\n')
us.insert(c);
int len = strlen(s);
rep(i,0,len) {
if(us.find(s[i]) != us.end())
cont... |
e0721554b3519a93237a37478249435dbfc12e60 | acfa9f9a148f3c72fd5c76313255a34fea8cd1dd | proaholic/Win2K3 | /NT/shell/shell32/netfind.cpp | C++ | cpp | 19,120 | no_license | #include "shellprv.h"
#pragma hdrstop
#include "shellids.h" // new help ids are stored here
#include "findfilter.h"
#include "netview.h"
#include "prop.h"
#include "ids.h"
STDAPI CNetwork_EnumSearches(IShellFolder2 *psf2, IEnumExtraSearch **ppenum);
class CNetFindEnum;
class CNetFindFilter : public IFindFilter
{
... |
98c8992d5b9c3bead6f2ade142e1077e8da6b29c | dd517919539b1e1a0e0c3b767df24769e7a13a7a | lipeiyuuuuuu/PTA- | /PTA code/7-13 单身狗.cpp | C++ | cpp | 5,650 | no_license | //-----------------------------------------------------------------------
/*
#define _CRT_SECURE_NO_WARNINGS
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<malloc.h>
void sort(unsigned long *pnot, unsigned long not);
long search(unsigned long *p, unsigned long n, unsigned long id);
int j... |
4381bdcabbe5b82b8fb934ac6277f09a4a5ec4e2 | d33afb3c680e0b1af8b8937e1f24a7a41ab2e615 | foolhuang/Helium | /Framework/Entity.cpp | C++ | cpp | 8,259 | no_license | #include "FrameworkPch.h"
#include "Framework/Entity.h"
#include "Framework/Layer.h"
HELIUM_IMPLEMENT_OBJECT( Helium::Entity, Framework, 0 );
using namespace Helium;
/// Constructor.
Entity::Entity()
: m_position( 0.0f )
, m_rotation( Simd::Quat::IDENTITY )
, m_scale( 1.0f )
, m_layerIndex( Invalid< size_t >() )
, ... |
8fb0bc952e3083ed0e3097327b3ba91d74fb44a3 | 2876972867dff0a7b8206000faee89143d4cd0b6 | whguo/LeetCode | /C++/Math/263.Ugly Number.cpp | C++ | cpp | 445 | no_license | /*
判断一个数是否是Ugly Number,定义为因数只包含2,3,5的。
特殊的,1是Ugly Number。
*/
#include <iostream>
using namespace std;
class Solution {
public:
bool isUgly(int num) {
if (num==0) return false;
while (num%2==0) num /= 2;
while (num%3==0) num /= 3;
while (num%5==0) num /= 5;
return n... |
634c46141948265e066102747036562843486060 | d1df9331aa9f3edffcaa7b381ce062726c03e724 | schectms/CS162 | /Lab 7- Circular Linked List/DynIntQueue.cpp | C++ | cpp | 2,607 | no_license | /*
* Shifra Schectman
* May 20, 2018
* CS162 - Lab 7
*Dynamic Queue Class Source File
*/
#include "DynIntQueue.hpp"
/*
default constructor, sets head to null
*/
DynIntQueue::DynIntQueue()
{
head = NULL;
}
/*
destructor, deletes memory
*/
DynIntQueue::~DynIntQueue()
{
if(isEmpty()==false)
... |
4038da3de9d5faa70af3a318980e513d29f6c241 | 949790e1e0f504704d1cca5acae6cefae76d34e7 | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_new_hunk_562.cpp | C++ | cpp | 454 | no_license | p_conn->close += 1;
}
if ( r->status != HTTP_CONTINUE ) {
received_continue = 0;
} else {
received_continue++;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
"proxy: HTTP: received 100 CONTINUE");
}
/* we ... |
857b8d939f74ae9af42384d6f910434e8d09922f | 32586dd3681ef4ee37517fd0d19998d467eaf8b0 | openvinotoolkit/openvino | /src/core/include/openvino/op/roi_align.hpp | C++ | hpp | 7,271 | permissive | // Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "openvino/op/op.hpp"
namespace ov {
namespace op {
namespace v3 {
/// \brief ROIAlign operation.
///
/// \ingroup ov_ops_cpp_api
class OPENVINO_API ROIAlign : public Op {
public:
OPENVINO_OP("ROIAlign", "... |
62ea2122e6cdda0d86ecff2f3ced27f04db5eb2c | afdc71ee0cf1d36b0c427ded3bd08aeb7731c2d5 | DRoMarin/FurutaControlG1 | /PID.cpp | C++ | cpp | 1,262 | no_license | /* Recuerde iniciar antes todas las variables en cero */
float ek = 0; //error
volatile float ik = 0; //accion integral y de memoria
volatile float dk = 0; //accion integral y de memoria
float KP = 1;
float KI = 1;
float KD = 1;
float acc = 0;
float mk = 0; //accion de control
float posicion = 0;
float posi... |
bdd22fc067cb78c98ade3c06145244b59e4ad372 | f9515f96983b7dd68fd46cead4324e3324ac9494 | baiyfcu/PUBG-SDK | /SDK/PUBG_P_Vehicle_PunkTire_BP_classes.hpp | C++ | hpp | 665 | no_license | #pragma once
// PLAYERUNKNOWN BattleGrounds SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace Classes
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass P_Vehic... |
b626e254fbac195d196902c85ef50f8177f66b82 | 611c9f341a052976eee37d506c5a45e243556d2c | dixonwi3/UMLWars | /Project1/GraderPen.cpp | C++ | cpp | 943 | no_license | /**
* \file GraderPen.cpp
*
* \author Team Hoare
*/
#include "pch.h"
#include "GraderPen.h"
#include "playingArea.h"
#include "UmlGame.h"
#include <iostream>
#include <memory>
#include <chrono>
#include <thread>
#include <cstdlib>
#include <ctime>
#include <algorithm>
/// File name for the pen
const std::wstr... |
e34f59fd4b6aec19d74000587e6c12fe41fe8f0c | e08ba4e5efb7eb8ee445e2d066a4ce6f6e69a647 | kmjp/procon | /leetcode/biweekly/081-120/084/2364.cpp | C++ | cpp | 852 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0... |
406cea62a6ee11fbcdc8d042e31999516c3f7d71 | d7c9f6d7a50c17477370ab958e6bd1bc9ee75c83 | borisgin/nvcaffe | /src/caffe/common.cpp | C++ | cpp | 18,055 | permissive | #include <glog/logging.h>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <ios>
#include <memory>
#include "caffe/common.hpp"
#include "caffe/util/device_alternate.hpp"
#include "caffe/util/gpu_memory.hpp"
#include "caffe/util/rng.hpp"
#if defined(USE_CUDNN)
#include "caffe/util/cudnn.hpp"
#endif
namespa... |
fae80f9c41aa9e431249a2f875f65204f7870849 | 836ff9311692f27ed369785defc1c263c3bd3b5b | Yoiro/Chessk | /config/resourcesconfig.hpp | C++ | hpp | 544 | no_license | #ifndef RESOURCESCONFIG_HPP
#define RESOURCESCONFIG_HPP
#include "Configuration.hpp"
#include "res/ResourceManager.hpp"
namespace chesspp{
namespace config {
class RessourcesConfig: public Configuration{
res::ResourceManager res;
public:
RessourcesConfig(): Configuration{"c... |
faa41c6bb428a6ce027c1c4dfba575a4719e7365 | d51d2d52239651a2f9d754b76c661dcb99af0cff | Samsung/TizenRT | /external/libcxx-test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.mod/release.pass.cpp | C++ | cpp | 1,327 | permissive | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... |
63adb55ac08eba0b865badf2ceba0da4ab504bb6 | ab9a9f58cd6bad6ede49bbddf9e7c87e4f71f7b1 | jasondlee/javavision | /src/main/library/source/tvision/nmwindow.cpp | C++ | cpp | 588 | permissive | /*------------------------------------------------------------*/
/* filename - nmwindow.cpp */
/* */
/* defines the streamable name for class TWindow */
/*----------------------------------------------------------... |
b94904c9922ce8ecba91cc4803be598eb986c17e | 4238abcba089ef5beb03824ce951d4b375e75c3d | george-e-shaw-iv/CS311 | /WheatHarvest/Ticket.cpp | C++ | cpp | 1,936 | no_license | /*
* File Name: Ticket.cpp
* Author: George Shaw
* Student ID: G829G576
* Assignment Number: 1
*/
#include "Ticket.h"
const double AVG_LBS_PER_BUSHEL = 60;
const double AVG_MOISTURE_LEVEL = 12;
bool Ticket::setNumber(std::string input) {
if(input == "") {
return false;
}
this->number = input;
return true... |
c08b8ccd119f5295386097627eee5619e488e5f9 | 510187d5b5da6cb95404b28263d7b3cf02e6a330 | kashimmirza/Problem-Solving | /UVa/10130 SuperSale.cpp | C++ | cpp | 2,120 | no_license |
/*######## IN THE NAME OF ALLAH ##########*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MAX 999999999999999999
#define nl cout<<endl
#define r0 return 0
#define r1 return 1
#define sf1(x) scanf("%lld",&x)
#define sf2(x,y) scanf("%lld %lld",&x,&y)
#define sf3(x,y... |
e935677d41a384f16f559927b7e1a607d3d77c16 | c7faef29725e96cbb0a8b212a5e6c5db69f078c6 | wanghanxiao123/Semester4 | /prog-verf/assignment1/sketch-1.7.5/sketch-frontend/test/sk/seq/miniTestb500_test.cpp | C++ | cpp | 569 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <iostream>
#include "vops.h"
#include "miniTestb500.h"
using namespace std;
void main__Wrapper_ANONYMOUSTest(Parameters& _p_) {
for(int _test_=0;_test_< _p_.niters ;_test_++) {
try{
ANONYMOUS::main__WrapperNospec();
ANONYMOUS::main__W... |
366dd14a66ee4e1f3446b9df5ffb81625c972219 | eee50e516ae2fe72766d16947ddf8f08cdc56393 | chrisdembia/simbody | /Simbody/tests/adhoc/RattleBack_ReverseEllipsoid.cpp | C++ | cpp | 9,432 | permissive | /* -------------------------------------------------------------------------- *
* Simbody(tm) - Rattleback using ellipsoid mobilizer *
* -------------------------------------------------------------------------- *
* This is part of the SimTK biosimulation toolkit originating from *
... |
904983c53d79b87a4b607201001846084b5f792f | 67bae89041eb30748144c6b880f14f77eb962483 | oO777Oo/LeetCode | /Number Theory/XofaKindinaDeckofCards914/main.cpp | C++ | cpp | 701 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main() {
cout << "Hello, World!" << endl;
return 0;
}
bool hasGroupsSizeX(vector<int>& deck) {
int arr[10000] = {};
// Init array
for (int i = 0; i < size(deck); i++) {
arr[deck[i]] ++;
}
int ans = -1;
for (int i ... |
bae09e8bbb9caf6a2cad8b8d476e09c3fc3cc2cb | 2dd0ca3e4cf1cf2047739ce7eb0476aed6de427d | sos0911/PS_Cpluslplus | /Cppcont/src/ch10/p10_1_2.cpp | C++ | cpp | 664 | no_license | #include <iostream>
using namespace std;
class point{
int y, x;
public:
point(int y, int x):y(y),x(x){}
friend bool operator==(const point& p1, const point& p2);
};
bool operator==(const point& p1, const point& p2){
return (p1.y==p2.y && p1.x==p2.x);
}
bool operator!=(const point& p1, const point& p2){
return !(p... |
efc9a41b20b3f8406210796cd291c92712d305f8 | ff0228a30b00e1315bbf480e3a06950e7c9bb4d6 | lucifer1004/codeforces | /1277/c/c.cc | C++ | cc | 998 | permissive | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typedef long long ll;
class Solution {
public:
v... |
b5fe26b55b3a394c7fe5d455b8b399ac9431cdb7 | 0098824846d9347cf74b9d46aaac60e67f835137 | ktekchan/Summer | /OOD/jukebox.cpp | C++ | cpp | 1,871 | no_license | /*
* Khushboo Tekchandani
* OOD for a jukebox.
* Assumptions:
* 1. Computer Simulation. Contains only songs.
* 2. Does not require currency
* 3. Possible features: Make playlist and modify, queue songs, play song
* User information
*/
#include <iostream>
#include <queue>
#include <string>
#inclu... |
5b06b08afc51d91ed10039e8bfcee4de1aceecd3 | db3ef2fed2bcd963f641f12356b716c9a425acf5 | kiwipxl/super-hexagon-haxe | /bin/windows/cpp/obj/src/core/build/game/managers/AssetManager.cpp | C++ | cpp | 16,949 | no_license | #include <hxcpp.h>
#ifndef INCLUDED_Std
#include <Std.h>
#endif
#ifndef INCLUDED_core_build_game_managers_AssetManager
#include <core/build/game/managers/AssetManager.h>
#endif
#ifndef INCLUDED_flash__Vector_Vector_Impl_
#include <flash/_Vector/Vector_Impl_.h>
#endif
#ifndef INCLUDED_flash_display_BitmapData
#include ... |
1aa7320c0ed9c8bd6f9bb13cc8e3ad7279e6d37a | 61a83fc0cd496328531379fac0360ef5dfdf6ddb | djbhsys/UE4 | /samples/Projects/Shooter - Test/Source/Shooter/Test/IsolatedComponent0897.cpp | C++ | cpp | 1,046 | no_license |
#include "IsolatedComponent0897.h"
UIsolatedComponent0897::UIsolatedComponent0897()
{
PrimaryComponentTick.bCanEverTick = true;
MovementRadius = 0.0f;
}
void UIsolatedComponent0897::BeginPlay()
{
Super::BeginPlay();
AActor* Parent = GetOwner();
if (Parent)
{
Parent->SetActor... |
33ec47cb60c35361cb89d92951ea5121485b9c0f | b0acdd9598d9b1465a9b4c99bee2a906d0766798 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/MP+dmb.sy+ctrl-ctrl-rfi-pos-ctrlisb.c.cbmc.cpp | C++ | cpp | 53,214 | no_license | // 0:vars:4
// 4:atom_1_X0_1:1
// 5:atom_1_X6_1:1
// 6:atom_1_X7_1:1
// 7:atom_1_X8_0:1
// 8:thr0:1
// 9:thr1:1
#define ADDRSIZE 10
#define NPROC 3
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get... |
89c270ac20fb240a4740e3044ff1de00966902c3 | 217eb9b8d09016ce1f1791eeab0c6b34064aa308 | svn2github/angelscript | /branches/2.7.1/sdk/tests/test_feature/source/test_suspend.cpp | C++ | cpp | 3,310 | no_license | //
// Tests releasing a suspended context
//
// Test author: Andreas Jonsson
//
#include "utils.h"
namespace TestSuspend
{
#define TESTNAME "TestSuspend"
#ifdef __GNUC__
#define STDCALL __attribute__((stdcall))
#else
#define STDCALL __stdcall
#endif
static int loopCount = 0;
static const char *script1 =
"string g... |
d772bc00629b92959030967c2d0a7aa3aed039ac | c6459166895787d7bf7f6439f081aba2c3bb1034 | Bjornir90/AgeOfWar | /Catapult.cpp | C++ | cpp | 1,506 | no_license | //
// Created by bjornir on 09/01/19.
//
#include "Catapult.hpp"
#include "Battlefield.hpp"
#include "Unit.hpp"
const Catapult Catapult::instance = Catapult();
bool Catapult::resolveAttack(Unit &u) const {
BattlefieldAccessor &bf = u.owner.getBf();
int reward = 0;
for(int i = u.position+2; i < BF_SIZE &&... |
3d34f363c5a9b561d51d9fea0b3d3523d31da16e | 8ecd05fa634210db8d5f2ac81e98e47cec8a3413 | HuangJingGitHub/PracMakePert_C-Cpp | /leetcode/two_sum/leetcode_284.cpp | C++ | cpp | 769 | permissive | * int next();
*
* // Returns true if the iteration has more elements.
* bool hasNext() const;
* };
*/
class PeekingIterator : public Iterator {
public:
PeekingIterator(const vector<int>& nums) : Iterator(nums) {
// Initialize any member here.
// **DO NOT** save a copy of nums and manipulate it dire... |
2bc885afab7d8c7384bc68890a39d11a43017487 | 92edb711d22c9e4c0ec276a2fd283e6ae72c6c0c | advaitraut/ny | /src/ny/common/egl.cpp | C++ | cpp | 14,565 | permissive | // Copyright (c) 2017 nyorain
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
#include <ny/common/egl.hpp>
#include <ny/log.hpp>
#include <EGL/egl.h>
#ifndef EGL_VERSION_1_4
#error "EGL Version 1.4 is required at compile t... |
2d0d6a6c4a2cbcc600f30d52b6e3271da57ca266 | 38d3970072cfc69e0e89a398c8c5be27e0606b56 | ORG-MARS/Fast-DDS | /src/cpp/utils/Host.hpp | C++ | hpp | 3,182 | permissive | // Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... |
ab74448be3cd3ea6d36b3214221784971fe05ac7 | 44181fa36f5b49947033bd5ba0055878a592d0c5 | shivral/cf | /1000/90/1093a.cpp | C++ | cpp | 303 | permissive | #include <iostream>
void answer(size_t v)
{
std::cout << v << '\n';
}
void solve(size_t x)
{
answer((x + 6) / 7);
}
void test_case()
{
size_t x;
std::cin >> x;
solve(x);
}
int main()
{
size_t t;
std::cin >> t;
while (t-- > 0)
test_case();
return 0;
}
|
75fda51be728743f8f4c3f20c49bd4f09b59c44e | 95007f4f133595089f88a002c58a9ae6a6f4eeca | paulherman/Competitive-Programming | /infoarena/disjoint.cpp | C++ | cpp | 1,511 | no_license | #include <cstdio>
const int MAX_SETS = 100005;
int set_search(int set_parent[MAX_SETS], int e) {
int root = e;
while (set_parent[root] != root)
root = set_parent[root];
while (e != root) { // path compression
int e_parent = set_parent[e];
set_parent[e] = root;
e = e_parent;
}
return root;
}... |
263173e53ce6acfb6653bfd89c4aee40106cb28a | a1dccf521ca2e38f303538d4853662edfb5211ed | wjhssfs/myLeetcode | /300/313SuperUglyNumber.hpp | C++ | hpp | 2,561 | no_license | // 313 Super Ugly Number
// Write a program to find the nth super ugly number.
// Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes of size k. For example, [1, 2, 4, 7, 8, 13, 14, 16, 19, 26, 28, 32] is the sequence of the first 12 super ugly numbers given primes = [2,... |
79b583d539ad8aa0d4a2e324887f7b9baa483473 | e190709a3c8767cda238172194f0500b9c017473 | fabio-gomes/xml-inference | /C++ Projects/SaxParser/xerces-c-3.1.1-x86_64-windows-vc-8.0/include/xercesc/sax/DocumentHandler.hpp | C++ | hpp | 10,367 | 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 ... |
ae754aa8d163f724c08d1dd81dc86f60f327e74b | bb68ff60df57b5faa5e25afd345ad7835e982c1b | blazezhazha/tensorflow | /tensorflow/core/tfrt/saved_model/saved_model.cc | C++ | cc | 48,749 | permissive | /* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
18dbf00e60fee8302bc80a18a47db37027e77682 | 99618d1147bc0cd64fa1e0cad9ce4108d5be76da | doomsday861/Allofit | /rounda2019A.cpp | C++ | cpp | 999 | no_license | /**
* roundA2019 a
**/
#include<bits/stdc++.h>
#define ll long long
#define testcase ll t;cin>>t;while(t--)
#define pb push_back
#define fi first
#define se second
#define vll vector<ll>
#define for0(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define for1(i, n) for (ll i = 1; i <= (ll)(n); ++i)
#define run ios_base::sync_... |
575a29d281c90f14e697659cc0dadaefe54e9ac8 | 06998544c2cb733d31c6fef7b9a3d203fbe6146b | francescog/nt2 | /modules/ieee/include/nt2/toolbox/ieee/function/scalar/prev.hpp | C++ | hpp | 2,293 | permissive | //////////////////////////////////////////////////////////////////////////////
/// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand
/// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI
///
/// Distributed under the Boost Software License, Version 1.0
/// ... |
346e22a4228fd9019bdd14c1765f769398bdbe2d | 2970e1ac23ad298dcb9cfe487a5565f739b35984 | TheTypoMaster/ElastosRDK5_0 | /Sources/Elastos/Frameworks/Droid/Base/Services/Server/src/wm/AppWindowToken.cpp | C++ | cpp | 6,780 | permissive |
#include "wm/AppWindowToken.h"
#include <elastos/core/StringBuilder.h>
#include <elastos/utility/logging/Slogger.h>
using Elastos::Utility::Logging::Slogger;
using Elastos::Core::StringBuilder;
using Elastos::Droid::View::IWindowManagerLayoutParams;
using Elastos::Droid::Content::Pm::IActivityInfo;
namespace Elastos... |
2fad92a6fbc83444a6977ff725751901cb73a299 | 78c3ac75c7552d29accaeba83adc368ece65d4a9 | stir001/DirectX12Library | /DirectX12/DrawObject/Primitive3D/PrimitiveCube.cpp | C++ | cpp | 2,895 | no_license | #include "stdafx.h"
#include "PrimitiveCube.h"
#include "PrimitivePlane.h"
unsigned int PLANE_VAERTEX_NUM = 4;
unsigned int PLANE_NUM = 6;
unsigned int PLANE_INDICES_NUM = 6;
PrimitiveCube::PrimitiveCube(float length): PrimitiveObject("PrimitiveCube") , mLength(length), mPos(0,0,0)
{
InitCube();
}
PrimitiveCube::~P... |
911c3edeb472203fe88564d52c1f2aea8f1bf406 | 33b60dddd76632507aa69604b517192bb02cf03f | Orange-Hii/ndnSIM-nom-rapid-car2car | /extensions/v2v-tracer.cc | C++ | cc | 4,797 | no_license | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012-2013 University of California, Los Angeles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundat... |
fc01251312ef745a80168f09386e844174dd033a | 4622a9dd19d2f84abb7b9c7aa0f6a8fa90a9f4ad | azusalee/MyCustomMars | /marsksim/boost/mpl/sizeof.hpp | C++ | hpp | 866 | no_license |
#ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED
#define BOOST_MPL_SIZEOF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/... |
e3c944c290fceb203bb9570a38e77d3c7e84e421 | fc3560f336153e0121ff1ce045d70e2fc0abfeba | agottipati9/empower-enb-agent | /lib/src/empoweragentproto/io.cpp | C++ | cpp | 16,547 | permissive | #include <empoweragentproto/io.hh>
#include <empoweragentproto/protocol.hh>
// For read(2) and write(2)
#include <unistd.h>
// For socket(2), bind(2), listen(2)
#include <sys/socket.h>
#include <sys/types.h>
// To pause for some time while we wait for all the data
#include <chrono>
#include <thread>
// For std::str... |
6f0b43641e3339aada8134033e76efd02f5a6f26 | 9cdd72a460a645317a226f31ed9624d2136f87d4 | jnn1991/study-cpp | /TextQuery/get_print.cc | C++ | cc | 817 | no_license | #include "Query.h"
#include "TextQuery.h"
#include <iostream>
#include <string>
#include <fstream>
#include <stdexcept>
using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::ifstream;
using std::runtime_error;
TextQuery get_file(int argc,char ** argv)
{
ifstream infile;
if(argc==2)
... |
893443494d666701657c4ee17eb9bd38e84f27c8 | 332ee6128129826441093aed4df6ee87bcf97636 | krispasillas/AlgoritmosEstructuraDatos | /7_EjercicioClass_Sueldo.cpp | C++ | cpp | 1,379 | no_license | #include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;
/*
El sueldo de un empleado de la empresa “La Bodeguita” es de la suma de su sueldo
mensual más 4% de comisión sobre las ventas mensuales realizadas; después al
total obtenido hay que descontarle un 16% de IVA. Realizar un TA... |
cbf51ba828e032b0993940bfac9d88d5f600f9f1 | a26e35d7dc06125c1a9bd6e363d74f37dc769201 | DoubleDawn/Tutorials | /Samples/Login/C++/Src/ElementExtensions.cpp | C++ | cpp | 6,083 | no_license | ////////////////////////////////////////////////////////////////////////////////////////////////////
// NoesisGUI - http://www.noesisengine.com
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////
... |
ff4736b6295e4cfbb325bc54c1ba8ce213dadbbb | a1b5aadadbb66997734f4b8c09301e0a61b80e7b | laksh10-stan/C-C-programs | /Assignment Unit 3/search array.cpp | C++ | cpp | 369 | no_license | #include <stdio.h>
#include <conio.h>
main()
{
int a[20],i,x,f=0;
for (i=0;i<5;i++)
{
scanf ("%d",&a[i]);
}
printf ("Array Display:\n");
for (i=0;i<5;i++)
{
printf("%d\t",a[i]);
}
printf ("Element to be searched:\n");
scanf ("%d,&x");
for (i=0;i<5;i++)
{
if (x==a[i])
{
f=1;
}
}
if (f==1)
pri... |
1aa901b178c07661d229c75c1f7e60980ebd2001 | e36d821e178c049c1c66286a760009668dcfd053 | camil0palacios/Competitive-programming | /solutions/codeforce/Codeforces Round #762 (Div. 3)/g.cpp | C++ | cpp | 1,949 | no_license | #include <bits/stdc++.h>
#define endl '\n'
#define ll long long
#define fori(i,a,b) for(int i = a; i < b; i++)
#define forr(i,a,b) for(int i = a; i >= b; i--)
#define fore(i,a,b) for(int i = a; i <= b; i++)
#define ft first
#define sd second
#define all(v) v.begin(), v.end()
#define sz(v) (int) v.size()
#define mp make... |
bffc988c31857e6b7831ad1dc58e63b3d29d3edb | 303d01c15c6484befeabe9d237208a07d7109881 | alexandraback/datacollection | /solutions_5686313294495744_0/C++/vinamilk/main.cpp | C++ | cpp | 1,059 | no_license | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
const int nm = 30;
int n;
string a[nm], b[nm];
bool kt(int mask) {
set<string> x, y;
for (int i = 1; i <= n; ++i) {
if (((mask >> (i - 1)) & 1) == 0) {
x.insert(a[i]);
y.insert(b[i]);
}
}
for (... |
899332fa4dad33f7797bec4764e7dac3cc46f741 | 8b36125e61262d2ad24f20b188c86f339377d277 | Cherum/OculusRiftInAction | /source/Example_5_2_1_Undistorted.cpp | C++ | cpp | 1,497 | permissive | #include "Common.h"
using namespace std;
using namespace gl;
using namespace OVR;
#define DISTORTION_TIMING 1
class PostProcessDistortRift : public RiftGlfwApp {
protected:
Texture2dPtr textures[2];
GeometryPtr quadGeometry;
ProgramPtr program;
public:
void initGl() {
RiftGlfwApp::initGl();
glDisab... |
1ed21b1dbde76d1fc863924e14189364708bbb4a | ccf423d5773e680bc7b880b6a565706a66b5d94c | niyaznigmatullin/nncontests | /utils/IdeaProject/archive/unsorted/2019.06/20190601_yach_final/h.cpp | C++ | cpp | 1,137 | no_license | /**
* Niyaz Nigmatullin
*/
#include <bits/stdc++.h>
using namespace std;
vector<long long> a;
void add(int x, long long y) {
for (int i = x; i < (int) a.size(); i |= i + 1) {
a[i] += y;
}
}
long long getSum(int x) {
if (x >= (int) a.size()) x = (int) a.size() - 1;
long long ret = 0;
f... |
672c93b1e9523a35f20fbb6070851f66c5fffebd | 660178aaaa1f3dac612e468c250f62bc4b3ed8f8 | NolanJos/vespa | /vespalib/src/vespa/vespalib/text/utf8.cpp | C++ | cpp | 7,021 | permissive | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "utf8.h"
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/exceptions.h>
#include <cassert>
#include <vespa/log/log.h>
LOG_SETUP(".vespalib.utf8");
namespace vespalib... |
424fc311ae0632b5ac77f601b7c908c51f4578b6 | 287a7219d4ed5420b86a72de4b325983dfbc8bba | martamk/algorytmy_kombinatoryczne | /cwiczenia9/zad4.cpp | C++ | cpp | 1,054 | no_license | #include <iostream>
#include <vector>
using namespace std;
vector<int> p;
vector<int> p_sp;
int k, g_n;
void podzial_sp(int m) {
int n_prim = p[1];
for (int i = 1; i <= n_prim; i++) {
p_sp[i] = 1;
}
for (int i = 2; i <= g_n; i++) {
if (i <= m) {
for (int j = 1; j <= p[i]; ... |
39cc6d0edd6d0ccd5b322c7bae8594aa9bbdbfc0 | 1079c563f5b325321d3104ff7a17bd432d436537 | kaikrueger/ec2-api | /tests/livetest.hpp | C++ | hpp | 2,545 | permissive | /*
* @file livetest.hpp
* @date 2011-09-28
*
* Created by Kai Krueger <kai.krueger@itwm.fraunhofer.de>
*
* Copyright (c) 2011 Fraunhofer ITWM
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... |
fe406aae397e5ff3551ffbaeccb3c2e58127cc4c | 7de9028e6f44b269ccc9bb5d7d6016a7ce11397b | PCanyi/chromium_ui | /chrome/ui/omnibox/omnibox_edit_controller.cc | C++ | cc | 1,012 | no_license | // 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/ui/omnibox/omnibox_edit_controller.h"
#include "chrome/browser/chrome_command_ids.h"
#include "chrome/browser/command_updater.h"
voi... |
b3fd37acd35ff65cadf4c1ec511e54b77dcb6c09 | 74a8032fae271a30f78008680c05054427a6fd42 | litkinger/media_test | /src/framequeue.cpp | C++ | cpp | 1,900 | no_license | #include "framequeue.h"
#include <QMutexLocker>
FrameQueue::FrameQueue()
{
}
//************************************
// Method: enQueue
// FullName: FrameQueue::enQueue
// Access: public
// Returns: bool
// Qualifier: 帧队列入队
// Parameter: const AVFrame * frame
//************************************
bool FrameQ... |
889d066b087a6b578a388a97e8fe412bbf246984 | fe68f064f66a0aa0f992db397d1de1379e30c418 | liyandong1/WebServer | /common/src/EventLoopThread.cpp | C++ | cpp | 1,212 | no_license |
#include <assert.h>
#include "Global.h"
#include "EventLoop.h"
#include "EventLoopThread.h"
#include <iostream>
EventLoopThread::EventLoopThread():loop_(nullptr),\
thread_(std::bind(&EventLoopThread::threadFunc, this)),
mutex_(),cond_(),existing_(false)
{
}
//for call loop.loop()
//创建事件循环对象,并开启事件循环
void Even... |
33dd988c2ee4309a4729e3cfed897599183f5cc4 | 0cc150c78c98fed7e219aebeb14095c92d4ba6b9 | agarwalutkarsh554/OpenSpace | /src/properties/matrix/mat2x3property.cpp | C++ | cpp | 5,571 | permissive | /*****************************************************************************************
* *
* OpenSpace *
* ... |
d7ea08d4891297e2f29054fc34e5de075ed1dda4 | 4bc1ad440adea3e803b04aa1e3923983978c29a0 | kyx0r/FA_Patcher | /boost_lib/boost/chrono/io/duration_style.hpp | C++ | hpp | 1,046 | permissive | // (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are 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).
//
// This code was adapted by Vicente from How... |
84c3b1524a95bfbc85f4ab2230fe195ceae08334 | fd8a4b9882739843ae1157907ea5ccb5c3c1a4d9 | xwzhangcs/LEGO | /LEGO_NOGUI/simp/EfficientRansacSimplification.cpp | C++ | cpp | 12,051 | no_license | #include "EfficientRansacSimplification.h"
#include "../util/ContourUtils.h"
#include <boost/math/distributions/normal.hpp>
#include <boost/geometry/geometries/segment.hpp>
#include <boost/geometry/algorithms/intersection.hpp>
#include <boost/polygon/polygon.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/... |
6ab9b2c1855e32b2b3758d31f0e343ee28579733 | 21814b6598c20e0bd2ecfe694766cc6e0fe29e34 | NilsHolger/cppplayground | /Documents/Visual Studio 2013/Projects/cppplayground/cppplayground/streams.cpp | C++ | cpp | 727 | no_license | #include "headers.h"
using namespace std;
//auto main() -> int
//{
// cout << "text" << 42 << " " << false << '\n';
// cout << boolalpha;
// cout << true << " " << false << '\n';
//
// int width; float height;
// cout << "enter width: ";
// cin >> width;
// cout << "enter height ";
// cin >> height;
// auto area =... |
ed9f1a436954f92c582bca6a966cfc2b0d1b9c37 | f6c1463eb5ab49398177e262b5ecc02d73fd67ee | checksummaster/depthmovie | /opencv/src/opencv/modules/calib3d/test/test_fundam.cpp | C++ | cpp | 52,955 | permissive | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, i... |
57d3aaec8fcc2d1c46bd9d2d0781b438d2328e53 | f3a4ae3e552652873d566f18a320de8edd680493 | STEllAR-GROUP/had_amr | /amr/unigrid_mesh.hpp | C++ | hpp | 3,371 | no_license | // Copyright (c) 2007-2012 Hartmut Kaiser
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#if !defined(HPX_COMPONENTS_RK_MESH_FEB_25_2010_0312PM)
#define HPX_COMPONENTS_RK_MESH_FEB_25_2010_0312PM
#include <h... |
57f2782f46ec08c8d058a7f930ca5ff8a408f4c6 | 67a3421cf6ad3717c599197ee4e1ceba57ad0bab | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/ISA2+dmb.sy+po+ctrl.c.cbmc_out.cpp | C++ | cpp | 43,783 | no_license | // Global variabls:
// 0:vars:3
// 3:atom_1_X0_1:1
// 4:atom_2_X0_1:1
// 5:atom_2_X2_0:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
#define ADDRSIZE 6
#define LOCALADDRSIZE 3
#define NTHREAD 4
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, ... |
25f2d60f2a6d778837ccf0cf77e469d00c3b8665 | aecbdb030dce503743914705a65de49edacbda8a | hatboyzero/zen-plugin | /include/Zen/Plugin/I_StartupShutdownParticipant.hpp | C++ | hpp | 3,227 | permissive | //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
// Zen Plugin Framework
//
// Copyright (C) 2001 - 2016 Raymond A. Richards
//-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
#ifndef ZEN_PLUGIN_I_STARTUP_SHUTDOWN_PARTICIPANT_HPP_INCLUDED
#define ZEN_P... |
0fea631e2d649cfd01f63838d6c3a62c374e1b31 | 70852827799512330d11c2ee27c0e7fb67ef96e5 | mlogix/chromium | /content/browser/devtools/protocol/network_handler.cc | C++ | cc | 107,542 | permissive | // Copyright 2014 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/devtools/protocol/network_handler.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include "base/barrier_closure.... |
ed04961bdb4fef98a86237960249baf503db1f76 | 83a53937771bb19e9e448ac0aa8812aa0decda13 | GabrielOprea/Elemente-de-Grafica-pe-Calculator | /Laborator3/Laborator3.cpp | C++ | cpp | 4,216 | no_license | #include "Laborator3.h"
#include <vector>
#include <iostream>
#include <Core/Engine.h>
#include "Transform2D.h"
#include "Object2D.h"
using namespace std;
Laborator3::Laborator3()
{
}
Laborator3::~Laborator3()
{
}
void Laborator3::Init()
{
glm::ivec2 resolution = window->GetResolution();
auto camera = GetScene... |
ad378ed707d4a652330ab1ab7f3edb5238ed5f16 | ea241ce026f8985975beaf7466abb986e45c6393 | MarkoTopalovic/FemCon | /PAKFExp.cpp | C++ | cpp | 15,328 | no_license | // PAKTExp.cpp: Functions for export to PAK's DAT file.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "FemCon.h"
#include "ModelData.h"
#include "PAKFExp.h"
#include "BlockIDs.h"
#include "PakExpOpt.h"
#include "math.h"
extern int m_iExFNSTAC;
extern int m_iExPe... |
f9e5afb694029c6f5d52ab6e4bf600206fcdf397 | 4c584b609caed51367d862995a9d3cb0ec506de9 | tlsharkey/Spacsui | /spacsui/App/Il2CppOutputProject/Source/il2cppOutput/Bulk_UnityEngine.DirectorModule_0.cpp | C++ | cpp | 24,539 | no_license | #include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include <stdint.h>
#include "il2cpp-class-internals.h"
#include "codegen/il2cpp-codegen.h"
#include "i... |
8c55eeca661ab322c11bc0d1d0b530c89dc5b5a2 | 6e79412e5c086ad125fc63bc7ffe670571627580 | c0re100/libtorrent | /src/stack_allocator.cpp | C++ | cpp | 4,128 | permissive | /*
Copyright (c) 2017-2019, Arvid Norberg
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... |
3a8185610b72e52e0080a876156aeeb71f1e2911 | 8ca658e4040fc51d6acff365a0d00cefc9b30474 | steccami/palestradialgoritmi | /graphs/shortestpath1.cpp | C++ | cpp | 1,646 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
typedef vector<ii> vii;
int main(void)
{
int n, m, q, s;
while(cin >> n >> m >> q >> s) { // input
if(n == 0 && m == 0 && q == 0) break;
vector<vii> grafo(n, vii()); //grafo
for(int i = 0; i < m; i++)
{
... |
1b7bc4ad70ed06d3ebe443a942de2949377d744e | b04d0774cd7fa2d68ea1d3bee3ebcc348c30f999 | jaynamm/Programmers | /Level 2/2_스택,큐_쇠막대기.cpp | C++ | cpp | 559 | no_license | #include <string>
#include <vector>
using namespace std;
int solution(string arrangement) {
int answer = 0;
vector<char> arr;
for(int i=0; i<arrangement.size(); i++){
if(arrangement[i] == ')'){
if(arrangement[i-1] == ')'){
arr.pop_back();
... |
9d46b7867a6963eaf40b556b91d07082651cff8d | e5bfe320f829d2bec28366bd2b46fd65fcdf6668 | havogt/dawn | /dawn/test/unit-test/dawn/CodeGen/reference/laplacian_stencil_opt.cpp | C++ | cpp | 3,541 | permissive | #define DAWN_GENERATED 1
#undef DAWN_BACKEND_T
#define DAWN_BACKEND_T CXXOPT
#ifndef BOOST_RESULT_OF_USE_TR1
#define BOOST_RESULT_OF_USE_TR1 1
#endif
#ifndef BOOST_NO_CXX11_DECLTYPE
#define BOOST_NO_CXX11_DECLTYPE 1
#endif
#ifndef GRIDTOOLS_DAWN_HALO_EXTENT
#define GRIDTOOLS_DAWN_HALO_EXTENT 3
#endif
#ifndef BOOST_P... |
576cf5ecc642e30db3056b097abde0e14b8df1b7 | aa9a8f793cfb0b119b111e0fa5d89e9bec21200e | docclaus/Programacion-UD2 | /CPPs/sumatorianum.cpp | C++ | cpp | 1,148 | no_license | // Programa para calcular la sumatoria de un número
#include <iostream>
using namespace std;
int main(){
int x, n, sumatoria=0, apoyo=0; //x es el número que introduce el usuario, n la variable de los productos de la sumatoria, y sumatoria es el resultado total.
bool ejecutado=false; // valor bandera para saber ... |
34809c23e74403b033acc9fed96a6f980e729fd2 | 8b81b81dc74f10a4302c8ad8bbbb0cd55e0920af | SatoshiONE/SatoshiONE | /src/qt/askpassphrasedialog.cpp | C++ | cpp | 10,266 | permissive | #include "askpassphrasedialog.h"
#include "ui_askpassphrasedialog.h"
#include "guiconstants.h"
#include "walletmodel.h"
#include <QMessageBox>
#include <QPushButton>
#include <QKeyEvent>
extern bool fWalletUnlockStakingOnly;
AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
QDialog(parent),... |
9e49bf787bbaf0addaf37a3c24d32ee394b98932 | 03cf5f4facf82cd8daf2e9e2acc853819ff701a5 | smeenai/llvm-project | /mlir/test/lib/IR/TestOperationEquals.cpp | C++ | cpp | 1,928 | permissive | //===- TestOperationEquals.cpp - Passes to test OperationEquivalence ------===//
//
// 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
//
//===---------------------------... |
8db9c7979542da58b32c8b4e19b4bfd08dd25642 | 3e9abf59cc8d199dc52cff3512b3c8065f3b5e3e | MaxCarlson/Qt-Chess | /ai_logic.cpp | C++ | cpp | 9,241 | no_license | #include "ai_logic.h"
#include <stdlib.h>
#include <time.h>
#include <iostream>
//best overall move as calced
std::string bestMove;
//holds board state before any moves or trys
std::string board1[8][8];
//holds state of initial board + 1 move
std::string board2[8][8];
Evaluate *eval = new Evaluate;
moveGenerati... |
6e1b4077c785515ff799c5284004b66cf1ff4539 | 14fd30a11f87d98948bb14ef5fddbc9036764c5e | agrohn/ARX | /Source/ARX/Private/Tracker2D.cpp | C++ | cpp | 539 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "Tracker2D.h"
// Sets default values
ATracker2D::ATracker2D()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;... |
2328f7cd04caaa8a51c96b53ef9a657cdde3c2a4 | a764b91ce42e7bfc5058e1f548c7049681d124d6 | dlgkrwns213/algorithm | /문자열23 (baekjoon2800 - 괄호 제거) .cpp | C++ | cpp | 1,228 | no_license | #include <iostream>
#include <vector>
#include <stack>
#include <algorithm>
using namespace std;
struct Parentheses
{
int open, close;
};
string make2(int vs, int n);
int main()
{
cin.tie(NULL);
cout.tie(NULL);
ios_base::sync_with_stdio(false);
string s;
cin >> s;
vector<Parentheses> vp;
stack<int> tmp;
... |
96656ac6d7cabd3abc3350873e40674910edfd50 | e5b2514fd415da1e2cc1c0ef15c4f880f2a933a7 | meniossin/src | /third_party/blink/renderer/bindings/tests/results/modules/v8_void_callback_function_modules.cc | C++ | cc | 4,724 | permissive | // Copyright 2014 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.
// This file has been auto-generated from the Jinja2 template
// third_party/blink/renderer/bindings/templates/callback_function.cpp.tmpl
// by the script... |
69503a268313e88f51020ad0064811d15501dfa2 | 934a32194281c26548d543cc64dca9178478209d | raiyanla/compute-runtime | /shared/source/os_interface/linux/drm_query.cpp | C++ | cpp | 547 | permissive | /*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/linux/drm_engine_mapper.h"
#include "drm_neo.h"
namespace NEO {
void *Drm::query(uint32_t queryId) {
return nullptr;
}
bool Drm::queryEngineInfo() {
return true;
}
bool Drm::query... |
215b94dadf7b22c505df1d5244d6f4f270bc78d7 | e23f484d9afd2b57baeb229f94a7ec495c529e32 | patrikhuber/eos | /include/eos/video/Keyframe.hpp | C++ | hpp | 5,238 | permissive | /*
* eos - A 3D Morphable Model fitting library written in modern C++11/14.
*
* File: include/eos/video/Keyframe.hpp
*
* Copyright 2016, 2017 Patrik Huber
*
* 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 co... |
94dffaf5f31047d5be20f8cb3a461af3047bce6b | 3610a1f53db08cd908e4012d30beeed9e8c34346 | RenanTashiro/URI | /code/Strings/p-level-2/2588.cpp | C++ | cpp | 752 | permissive | /*
Nome: Jogo dos Palíndromos
ID: 2588
Resposta: Accepted
Linguagem: C++ (g++ 4.8.5, -std=c++11 -O2 -lm) [+0s]
Tempo: 0.000s
Tamanho: 556 Bytes
Submissao: 14/06/17 20:02:58
*/
#include <bits/stdc++.h>
using namespace std;
int main()
{
string word;
while(cin >> word)
{
i... |
28c08863dab4f22da46fee95bca128c2b7aa8dec | ac7af8fa0743b8573d6ad35c247fe00f30b85c54 | CoreSheep/PAT-Online-Test | /P1001_add_format.cpp | C++ | cpp | 349 | no_license | #include <string.h>
#include <iostream>
using namespace std;
int main() {
int a, b;
cin>> a>> b;
string s= to_string(a+ b);
int len= s.length();
for (int i= 0; i< len; ++i) {
cout<< s[i];
if (s[i] == '-')
continue;
if ((i + 1) % 3 == len % 3 && i != len - 1)
... |
16faa2140276a6c7be7fb8957c1855877ebfed6f | 34153e5febab63ff53527dd957559506f574e0b7 | r-map/rmap | /platformio/stima_v4/test/nucleo_uavcan/uavcan-master/test/test_main.cpp | C++ | cpp | 8,650 | no_license | #include <Arduino.h>
#include <unity.h>
#include "bxcan.h"
#include "canard.h"
#include "canard_dsdl.h"
#include "stm32_def.h"
//********** FUNCTION DECLARATIONS **********
static void* canardAllocate(CanardInstance* const ins, const size_t amount);
static void canardFree(CanardInstance* const ins, void* const pointe... |
6dbea721e824eed196fae8104266a65e027e4a89 | a6226b5e350ea484448e869feed2da85c13e0701 | thalium/icebox | /third_party/retdec-3.2/src/llvmir2hll/semantics/semantics/compound_semantics_builder.cpp | C++ | cpp | 1,829 | permissive | /**
* @file src/llvmir2hll/semantics/semantics/compound_semantics_builder.cpp
* @brief Implementation of CompoundSemanticsBuilder.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include "retdec/llvmir2hll/semantics/semantics/compound_semantics.h"
#include "retdec/llvmir2hll/semantics/semantic... |
61586d74299b57691c115df81bc243a4a189bd3c | 806648cd7a7f484708e85a4eda8404f6add7c938 | NIRALUser/COST | /COST_newVersion/ODFReconstructor.cxx | C++ | cxx | 15,325 | no_license | #include <itkImageDuplicator.h>
#include <itkImageRegionIterator.h>
#include "vtkMath.h"
#include <itkImageFileWriter.h>
#include "ODFReconstructor.h"
#ifndef M_PI
#define M_PI 3.141592653589793
#endif
typedef itk::ImageDuplicator< ODFReconstructor::ODFImageType > DuplicatorType;
typedef itk::ImageRegionIterator<... |
8fd1214ece9a248026b80afec3790583c53006db | 241eb795f3e748a15ce42007dfaadb5815832199 | Huijuan2015/MyLeetcodeSolutions | /second time/Lintcoded-Minimum Subarray.cpp | C++ | cpp | 515 | no_license | class Solution {
public:
/**
* @param nums: a list of integers
* @return: A integer denote the sum of minimum subarray
*/
int minSubArray(vector<int> nums) {
// write your code here
if(nums.empty() || nums.size() == 0) return 0;
int minRes = INT_MAX;
int p... |
36d9ea9133b10d5443dc14a4c1c3e6a59abaa302 | 30f309ebfb147d4871c62ab6aea1b362d4ff08cc | asroy/Kratos | /applications/DEM_application/custom_python/add_custom_strategies_to_python.cpp | C++ | cpp | 7,661 | no_license | //
// Author: Miquel Santasusana msantasusana@cimne.upc.edu
//
// External includes
#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <boost/timer.hpp>
#include "spaces/ublas_space.h"
// Project includes
#include "custom_python/add_custom_strategies_to_python.h"
//... |
a9efac294a67d5480d02ea47c2ddef355b52e3d8 | 4211ceae05499e864e704c9e90a3cd3b3e34291f | matthijsvk/RaytracingInOneWeekend | /RayTracingInOneWeekend/Src/main.cpp | C++ | cpp | 1,999 | no_license | #include "svpng.inc"
#include <iostream>
#include "sphere.h"
#include "hitable_list.h"
#include <float.h>
#define W 2560
#define H 1440
/* shere equation at origin: R^2 = x^2 + y^2 + z^2
with center C = (cx,cy,cz): R^2 = (x-cx)^2 + (y-cy)^2 + (z-cz)^2
in vector form, p=(x,y,z): R^2 = dot( p - C , p - C )
ray eq... |
c2168ee37ea429be59fa24ac010042474ec71ebf | ae7c7240d68da30064dcd2c015770a69033b6e35 | byumjin/Vulkan-ValidationLayers | /layers/object_tracker_utils.cpp | C++ | cpp | 54,625 | permissive | /* Copyright (c) 2015-2019 The Khronos Group Inc.
* Copyright (c) 2015-2019 Valve Corporation
* Copyright (c) 2015-2019 LunarG, Inc.
* Copyright (C) 2015-2019 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 m... |
2715dd61524af7d0f41f8553e0287e95dcaf9b48 | 748789e1206cd279dd7419f0f793ed4d0fd76dd5 | Dante3085/OldCppTutorials | /C++Tutorial 30 hashError/C++Tutorial 30 hashError/OwnUtil.cpp | C++ | cpp | 315 | no_license | #include <iostream>
#define WIN
void programmende() {
#ifdef WIN
system("pause");
#endif
#ifndef WIN
int ende;
std::cout << "Zahl + Enter zum beenden . . ." << std::endl;
std::cin >> ende;
return 0;
#endif
} |
944ef08b6adf671589d0fce1c469235e5f7f8b36 | e85ad17a142ce9234e635bfb001b13cfb417b301 | y12uc231/IITBOMBAYX_COURSE | /Graded_Program1.cpp | C++ | cpp | 1,883 | no_license | #include <iostream>
using namespace std;
// Please write your code, within the "BEGIN-END" blocks given below.
// A "BEGIN-END" block is identified as follows :
//
// "//// BEGIN: Some string DONT_ERASE_xx_yy"
//
//
// "//// END: Some other string DONT_ERASE_xx_yy"
//
// where "xx" is the block number and "yy" is the
... |
7e7e40e69cd343b941e3f425cd8389f08bc9dea8 | a4e59a922f47a50f336ad1271c18ebd074c5f121 | cbosoft/rlp | /src/test/vec/angle.cpp | C++ | cpp | 918 | permissive | #include "vec.hpp"
VectorAngleBetweenTest::VectorAngleBetweenTest(bool is_quiet)
: TestRunner("Vector test (angle between)", is_quiet)
{
this->input_data = {
std::make_pair(Vec3({1.0, 0.0, 0.0}), Vec3({0.0, 1.0, 0.0})),
std::make_pair(Vec3({1.0, 1.0, 0.0}), Vec3({0.0, 1.0, 0.0})),
std::make_pair(Vec3(... |
af44fc44a448d490445701bc5125aab643e7922e | 36ab609d4e46928fcacee8672bde23d7fddcbbae | R-forks-to-learn/colourvalues | /inst/include/colourvalues/palettes/oranges.hpp | C++ | hpp | 1,005 | no_license | #ifndef R_COLOURVALUES_ORANGES_H
#define R_COLOURVALUES_ORANGES_H
#include <Rcpp.h>
using namespace Rcpp;
namespace colourvalues {
namespace palette {
const Rcpp::NumericVector oranges_red = {
1,0.996078431372549,0.992156862745098,
0.992156862745098,0.992156862745098,0.945098039215686,
0.85098039215686... |
74c644771afae04438fb54dcead26a1642404632 | 838596b29a70aa5da88f35a18a5522c517ff9b6b | spraetor/amdis2 | /lib/mtl4/boost/numeric/mtl/interface/vpt.cpp | C++ | cpp | 26,109 | permissive | #include <boost/numeric/mtl/interface/vpt.hpp>
#ifdef MTL_HAS_VPT
namespace mtl {
/// Namespace for Vampir Trace interface
namespace vpt {
// Categories:
// Utilities + very small functions: 0000
// Static size operations: 1000
// Vector operations: 2000
// Matrix Vector & single matrix:... |
fe51b98f44d2f40274992bf69f70c88994c3bb48 | 2815372d842f70c0d321007b0d5fceb5365a2c2d | barathum000/AMDMIGraphX | /src/include/migraphx/functional.hpp | C++ | hpp | 4,430 | permissive | #ifndef MIGRAPHX_GUARD_RTGLIB_FUNCTIONAL_HPP
#define MIGRAPHX_GUARD_RTGLIB_FUNCTIONAL_HPP
#include <utility>
#include <migraphx/config.hpp>
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
struct swallow
{
template <class... Ts>
constexpr swallow(Ts&&...)
{
}
};
template <class T>
auto tup... |
28f11c822a9bdad49119c390ea59be9a10e7ba97 | e99a0feda944a00c9d9242f48ce6e312d5ca8d1a | vpetry/OpenFPGA | /openfpga/src/fpga_spice/spice_submodule.cpp | C++ | cpp | 1,439 | permissive | /*********************************************************************
* This file includes top-level function to generate Spice primitive modules
* and print them to files
********************************************************************/
/* Headers from vtrutil library */
#include "vtr_assert.h"
#include "vtr_... |
d8b3054516d59e48d4b009122cbae2df62d52eab | d3f3d00e2850d3717d4cef8de6878fdf09d8c5be | hexiay/chromium | /third_party/blink/renderer/modules/peerconnection/media_stream_video_webrtc_sink.cc | C++ | cc | 13,524 | permissive | // Copyright 2014 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 "third_party/blink/renderer/modules/peerconnection/media_stream_video_webrtc_sink.h"
#include <algorithm>
#include <memory>
#include "base/bind... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.