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 |
|---|---|---|---|---|---|---|---|---|
a2df80c918a77be3e5a04b1f2f95a7d4fbfdfde6 | 68a984d4708f75b6e0de7c08d4d5087054dd0740 | nevilparmar11/CompetitiveProgramming | /Codeforces/1012E.cpp | C++ | cpp | 1,306 | no_license | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
const int mxN=2e5;
int n, s, a[mxN];
map<int, int> mp1;
map<int, vector<int>> mp2;
vector<vector<int>> ans;
void dfs(int u) {
while(!mp2[u].empty()) {
int i=mp2[u].back();
mp2[u].pop_back();
dfs(a[i]);
ans.back().push_back(i);
... |
390a49b1b1c2192bb483750315010ae1ecafb8a2 | d6534d2f1fb965da6e99cef01cb9d02fe56b505d | paulopina21/plxJukebox-11 | /xbmc/filesystem/ISO9660Directory.cpp | C++ | cpp | 2,336 | no_license |
#include "ISO9660Directory.h"
#include "iso9660.h"
#include "Util.h"
#include "utils/URIUtils.h"
#include "URL.h"
#include "FileItem.h"
using namespace XFILE;
CISO9660Directory::CISO9660Directory(void)
{}
CISO9660Directory::~CISO9660Directory(void)
{}
bool CISO9660Directory::GetDirectory(const CStdString& strPath... |
ea9f2796f34d5baa98fae0ff51198dd2328787c1 | 6e2f2eb1adc8c5e07aef8e24d22bff369420f61f | tmuttaqueen/MyCodes | /Online Judge Code/codeforces/Codeforces Round #246 (Div. 2)/D.cpp | C++ | cpp | 4,623 | no_license | /*
-------------------------------> SUFFIX ARRAY + LONGEST COMMON PREFIX (LCP) <-------------------------------------------
suffix array in O(nlogn)
lcp from suffix_array via kasai algo in O(n)
*/
#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793;
#define xx firs... |
cc39207d4971cde4547d4d8e87512762cdbd0ad0 | 3fba2b6f33b7e4601fd5ff65c26c15fe135f43b3 | i300/RBE1001-Team-L | /src/Sensors/LineFollower/LineFollower.hpp | C++ | hpp | 471 | no_license | #include "Arduino.h"
#include "../../Utilities.h"
#ifndef LINEFOLLOWER_H
#define LINEFOLLOWER_H
enum LineFollowerReading { DETECT_LEFT, DETECT_RIGHT, DETECT_BOTH, DETECT_NONE };
class LineFollower {
int8 leftSensorPin, rightSensorPin;
static const int8 LEFT_SENSOR = (1 << 0);
static const int8 RIGHT_SENSOR = ... |
5b6a3c74ffeef74bceae8ccde1d21e8f21c0124d | 19c3f34b1a5cbaf94cdf86c8e8c61960a48f4406 | TB989/Fierce-Engine | /OpenGLRenderer/src/openGLObjects/GL_Shader.cpp | C++ | cpp | 1,256 | permissive | #include "GL_Shader.h"
#include <fstream>
GL_Shader::GL_Shader(GLenum type) {
id = glCreateShader(type);
CHECK_GL(glGetError(), "Failed to create shader.");
}
GL_Shader::~GL_Shader() {
glDeleteShader(id);
CHECK_GL(glGetError(), "Failed to delete shader.");
}
void GL_Shader::create() {
glCompileShader(id);
GL... |
c05f2b80044157bbdac44339e60c4384c47a50c1 | 587b978151c3f0b0ffbfeb7250b89c550fe1b0fb | QuentinSauvage/50-Inside | /Source/FiftyMinInside/PhoenixWeapon.cpp | C++ | cpp | 1,643 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "PhoenixWeapon.h"
#include "Engine/World.h"
#include "Bullet.h"
#include "TimerManager.h"
APhoenixWeapon::APhoenixWeapon()
{
bHRotation = true;
}
void APhoenixWeapon::FireProjectile() {
if (BulletClass)
{
if (bUseMunition &... |
69ff39fd53558a5d9e5ae2a8c0688a80f4bfce72 | 4d7b105a8cd9ca056aa8e9a82a879f307925ce75 | beardnick/my_acm | /hdu/hdu1092.cpp | C++ | cpp | 235 | no_license | #include<stdio.h>
int main()
{
int a,n,sum;
while(scanf("%d",&n)&&n)
{
sum=0;
while(n--)
{
scanf("%d",&a);
sum+=a;
}
printf("%d\n",sum);
}
return 0;
}
|
bda412e36e6341072eafb70bffbff62b13870148 | 0d435326e54cfe7c00451fbb36bec886ced10cf1 | GPKyte/CSCI220 | /AVLex/main.cpp | C++ | cpp | 1,234 | permissive | //C++ program to Implement AVL Tree
// Editted from http://www.sanfoundry.com/cpp-program-implement-avl-trees/
#include<iostream>
#include<cstdio>
#include<sstream>
#include "AVLtree.h"
using namespace std;
int main()
{
int choice, item;
avlTree avl;
while (1)
{
cout<<"\n---------... |
e365ded5e7bb54ee9fe27af6adf42a02f51b5f24 | 7bba56c8da979dcbec152b562af995d096ee0ea7 | yassin64b/competitive-programming | /AtCoder/dp/C.cc | C++ | cc | 689 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
vector<vector<int>> act(N, vector<int>(3));
for (int i = 0; i < N; ++i) {
cin >> act[i][0] >> act[i][1] >> act[i][2];
}
vector<vector<int>> dp(N... |
b87bc6c7ca6ea0145e0e5fb08bda74174460fc7e | 6b7e6d6c5d20343fcd3c0f6a7a5d22dceae7902e | ue4sdk/DRG-SDK | /DRG-SDK/SDK/DRG_OnScreenIndicator_MiniMule_Build_functions.cpp | C++ | cpp | 1,864 | no_license | // Deep Rock Galactic (0.22) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "DRG_OnScreenIndicator_MiniMule_Build_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//--------------------------------------------------------------------... |
5fe900b6bdec1f1a40120246b830d41d7f239c03 | 5ad730cc2bd92a18f7ef48d5d24080f00f289891 | acannie/AtCoder | /src/abc/abc141/abc141d.cpp | C++ | cpp | 605 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int N, M;
cin >> N >> M;
priority_queue<int> q;
for (int i = 0; i < N; i++)
{
int a;
cin >> a;
q.push(a);
}
for (int i = 0; i < M; i++)
{
// find the max
int max = q.top();
q.p... |
0e34ecd60636184bb9ff486478a9df89158e2831 | cb0570354cf64df8684d0ba85fe0d7890c7ae09a | OlivierLDff/Qaterial | /tests/Loader/QaterialTestLoader.cpp | C++ | cpp | 1,903 | permissive | #include <Qaterial/Qaterial.hpp>
#include <QtCore/QCommandLineParser>
#include <QtGui/QGuiApplication>
#include <QtQml/QQmlApplicationEngine>
int main(int argc, char* argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
// ──── REGISTER APPLICATION ────
QGuiApplication::setOrgani... |
5f08463908cabc657591eb3233780fda53024d8d | 030ac5989b201809af1d0b8f2a44fdbbef498edd | dawnbreaks/taomee | /pea/online/cli_proto.hpp | C++ | hpp | 1,533 | no_license | /**
*============================================================
* @file cli_proto.hpp
* @brief client protocol definations and package sending functions
*
* compiler gcc4.1.2
* platform Linux
*
* copyright: TaoMee, Inc. ShangHai CN. All rights reserved.
*
*================================... |
fab2db53f5b352eecd0d5f4c86e76191b4708d4a | 493f8504bc021e4f7a22e69086b38b710be5a0c7 | FlynnMcG/CS100_Lab_7 | /iterator.cpp | C++ | cpp | 2,196 | no_license | #include "iterator.h"
//--------------------------------------------------------------------------
// Operator Iterator Class
//--------------------------------------------------------------------------
void OperatorIterator :: first() { current_ptr = self_ptr->getleft(); };
void OperatorIterator :: next(){
if (curre... |
fe429f827b48bdfcce6ffff80d64ced3840367f7 | 3fcd28df2f22228fe751651b79019b7a057dfe5e | Ryan0v0/ACM-codes | /codeforces/ecf69/c.cpp | C++ | cpp | 802 | no_license | //
// Created by 赵婉如 on 2019-07-23.
//
#include <bits/stdc++.h>
#define F(i,s,t) for(int i=(s);i<=(t);i++)
#define D(i,s,t) for(int i=(s);i>=(t);i--)
#define mec(a,x) memset(a,x,sizeof(a))
using namespace std;
typedef long long LL;
inline LL read()
{
LL x=0LL,f=1LL;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch... |
9b75e777be8059b7645a5f3bcd5107f5aba5d5d1 | ef47e1e01b5ee6d7aa311a372f2dfaefdcecaa0c | krithiva/node-http-demo1 | /deps/icu-small/source/i18n/numfmt.cpp | C++ | cpp | 48,265 | permissive | // © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 1997-2015, International Business Machines Corporation and
* others. All Rights Reserved.
*******************... |
18b6a41650d59ff943728c53406c064cb7b3b513 | 29c68002cd829943ad11b55514f816ef74c7935b | Simon-McDonald/Code | /C++/OpenGL_Platformer/src/RenderableText.cpp | C++ | cpp | 1,908 | no_license | /*
* RenderableText.cpp
*
* Created on: Dec 27, 2017
* Author: Simon
*/
#include "RenderableText.hpp"
RenderableText::RenderableText(TextImage *textImage, std::string renderableString, GLfloat xPos, GLfloat yPos,
GLfloat textSize, GLfloat textSizeWidth, TextImage::TextAlignment hAlignment, Te... |
9a1f76e30ece3c90898af8be4f9ed8aa1aafbc87 | d41109c8bb61e04fecac7c8c0e2e66da0832facb | lion38925/kit | /array/find_duplicate_number.cpp | C++ | cpp | 616 | no_license | // C++ code to find
// duplicates in O(n) time
#include <bits/stdc++.h>
using namespace std;
// Function to print duplicates
void printRepeating(int arr[], int size)
{
int i;
cout << "The repeating elements are:" << endl;
for (i = 0; i < size; i++)
{
if (arr[abs(arr[i])] >= 0)
arr[abs(arr[i]... |
e281da3ba9d17babb12b1b467babfd1bddbc143c | 7b74824c37fdc61cf250397ff110cfc279e2ccd0 | czxxjtu/wxPython-1 | /tags/wxPy-2.9.0.1/tests/scopeguard/scopeguardtest.cpp | C++ | cpp | 6,236 | no_license | ///////////////////////////////////////////////////////////////////////////////
// Name: tests/scopeguard/scopeguardtest.cpp
// Purpose: Test wxScopeGuard and related macros
// Author: Vadim Zeitlin
// RCS-ID: $Id$
// Copyright: (c) 2005 Vadim Zeitlin
// Licence: wxWidgets licence
///////////... |
35a842f1744c7e417a1876c825e2423ecc89eea8 | 80fecca973a9992d5267e6f7fbd1ff8b420f34b7 | 2bite/ARK-SDK | /SDK/ARKSurvivalEvolved_PrimalItemConsumable_BeerJarAlt_classes.hpp | C++ | hpp | 876 | permissive | #pragma once
// ARKSurvivalEvolved (332.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_PrimalItemConsumable_BeerJarAlt_structs.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Classes
//-----------------------------------------... |
d7838f7370bf3e6ba7936c9efd59259e6d5c0d4b | 5e8932a4b21aae3a03ad7718ddd865ab7d19983f | NCAR/lrose-core | /codebase/apps/filters/src/stratiform_filter/StratiformFilter.cc | C++ | cc | 20,899 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
3a15e0dc4ab00905ca6823ff9c27d66853ccb5ed | 0ecc89fe5ed409e8391c57fd9bd3c1bbe151b570 | keryell/llvm | /lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | C++ | cpp | 124,957 | permissive | //===----- LegalizeIntegerTypes.cpp - Legalization of integer types -------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
e73f623a4e62f4cfd6ff8f604880dadbef63925e | c373c73338344507cc8e106c42825659f27335ed | wesen1/ac-demo-processor | /source/src/demoparser/MessageStream/Messages/Flagmsg.cpp | C++ | cpp | 508 | permissive | /**
* @author wesen
* @copyright 2021 wesen <wesen-ac@web.de>
*/
#include "Flagmsg.h"
// Public Methods
/**
* Extracts the values for this message from a given buffer.
*
* @param ucharbuf _buffer The buffer to extract the message values from
*/
void Flagmsg::extractDataFromBuffer(ucharbuf* _buffer)
{
flagI... |
c39eca478e294d106781c0ca759408c61791ed37 | 6897686b73c6bd16a13390487b92eb2af3daa88f | amitkumar-panchal/ChQuestiions | /c++/q31/Untitled1.cpp | C++ | cpp | 2,941 | no_license | #include<iostream>
using namespace std;
struct Element{
Element *next;
Element *prev;
int data;
};
class Array{
protected:
Element *front;
Element *back;
int size;
public:
virtual void decreaseSize() = 0;
virtual void increaseSize() = 0;
virtual void print() = 0;
virtual void insert(int ) = 0;
};
... |
2e45cf8e43f0f7f1ff578e85dc849f2152324a45 | cd818f7f1e6f687b7018dea5ef92f848444a1672 | extratorsion/STLL | /source/vector.hpp | C++ | hpp | 6,882 | no_license | #ifndef VECTOR_HPP
#define VECTOR_HPP
#include <initializer_list>
#include <stdexcept>
#include "algorithm.hpp"
#include "allocator.hpp"
#include "iterator.hpp"
#include "memory.hpp"
__STLL_NAMESPACE_START__
template <class Tp, class Alloc = allocator<Tp>>
class vector {
public:
typedef Tp value_type;
typedef ... |
c90c78af9e382c472f8020a560668f28e5dcc061 | 84cefdcfd656d4eb099b5c9dcb2988b8c966b031 | aqoleg/ktoolu | /src/updater.cpp | C++ | cpp | 388 | no_license | #include <ArduinoOTA.h>
#include "updater.h"
bool started = false;
void loopUpdater() {
if (started) {
ArduinoOTA.handle();
}
}
bool startUpdater() {
if (started) {
return false;
}
started = true;
ArduinoOTA.setPassword("password"); // enter this password in arduino
ArduinoOTA.begin(); // does ... |
e90c60c572a3aa9ca3a0d575a87fb6f9e8f11935 | 8060def75217fb509e807b044bae14080a1754c4 | HeikoPlate/hpmidifile | /Examples/create_song/create_songDlg.cpp | C++ | cpp | 6,189 | permissive | #include "stdafx.h"
#include "create_song.h"
#include "create_songDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCreate_songDlg Dialogfeld
CCreate_songDlg::CCreate_songDlg(CWnd* p... |
1d0dd7c9ceeb4c40b9c882b9fa95ad2352923477 | ce4c2bd0a0292964c09922632d4a75b56f65576e | WopsS/RED4ext.SDK | /include/RED4ext/Scripting/Natives/Generated/game/OnLootAllEvent.hpp | C++ | hpp | 604 | permissive | #pragma once
// clang-format off
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/Scripting/Natives/Generated/red/Event.hpp>
namespace RED4ext
{
namespace game
{
struct OnLootAllEvent : red::Event
{
static constexpr const char* NAME = "... |
955b9080ba921092c94499fa71ebbd2db496d68f | 118b94a4315335db673aa8b8a9190429542f2b69 | GridTools/gridtools | /include/gridtools/common/cuda_is_ptr.hpp | C++ | hpp | 1,419 | permissive | /*
* GridTools
*
* Copyright (c) 2014-2023, ETH Zurich
* All rights reserved.
*
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include "defs.hpp"
#ifdef GT_CUDACC
#include "cuda_runtime.hpp"
#include "cuda_util.hpp"
namespace gridtools {
... |
bb10c33a4d60d54832d022e9e488b0100c685262 | aacffcd2947a49f3db28c7813e2fc8e443a0ee6c | basuki57/Codeforces | /274B.cpp | C++ | cpp | 798 | permissive | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
vector<ll> adj[100100];
ll val[100100], vis[100100], inc[100100], de[100100];
void dfs(ll x){
vis[x] = 10;
for(auto &i: adj[x]) if(!vis[i]){
dfs(i);
inc[x] = max(inc[i], inc[x]);
de[x] = max(de[i], de[x]);
}
... |
350642e5b520144f4a2e78f9512da1115d66ad85 | 8fc8e13d74e716a829fcc5b4c661268d560406d4 | ghsecuritylab/N14 | /components/asio/asio/asio/include/asio/thread_pool.hpp | C++ | hpp | 7,425 | permissive | //
// thread_pool.hpp
// ~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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)
//
#ifndef ASIO_THREAD_POOL_HP... |
097b88c48524de1744b1bc5197182560f562e903 | bf462f38d7b9ec66db79532fae3764a61193b4ff | tonyaryan/CPP-Programs | /cppp/file17.cpp | C++ | cpp | 1,389 | no_license | // TO IDENTIFY RECORDS BY NO. PRESENT IN FILE
#include<fstream>
#include<iostream>
using namespace std;
class Student
{ private:
char name[20];
int age;
double salary;
public :
void getData() { cout<<"\n Enter name "; cin>>... |
0c9eaefe9c5d7aa360d32acdbd752f3914e016e4 | 725bd3cdce5572599d141578fb44e0a26daf2955 | Aamir1551/MWorld | /render/utils/world_initializer.cpp | C++ | cpp | 2,048 | no_license | #include <iostream>
#include <string>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <shader.hpp>
#include <world_initializer.hpp>
namespace render_utils
{
void FramebufferSizeCallback(GLFWwindow *window, int width, int height)
{
glViewport(0, 0, width, height);
};
WorldProperties ... |
733aa14c2016363db5b723e3ca02918cd9bc3a38 | 9d8328296e87b9064ae06969428477ecaad3be5d | Mdananda/Competitive-Programming | /Online Judge/Math Problems/A. Berland Poker.cpp | C++ | cpp | 550 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define sc scanf
#define pf printf
#define pb push_back
int main()
{
int ts;
cin>>ts;
while(ts--)
{
int nm, nk, mn, to, tmp, ans;
sc("%d%d%d", &nm, &mn, &nk);
to = nm/nk;
if(to >= mn)
cou... |
e39db925a0cec3705c1bddb41318d8ce0902367d | 6db9668de836074f7e121963b24d69b0e1c914b7 | Langjieciren-code/cpp-basic-code | /6.深浅拷贝.cpp | C++ | cpp | 1,417 | no_license | #include<iostream>
using namespace std;
class Person
{
public:
Person()
{
cout << "无参函数调用" << endl;
}
Person(int age,int height)
{
cout << "有参函数的调用" << endl;
m_age = age;
Height = new int(height);
}
~Person()
{
cout << "析构函数的调用" << endl;
if (Height != 0)
{
//浅拷贝会致使堆区的内存重... |
3be38078d22a243d42c0db16d9249a531ab3b335 | 387500f8062c11c235dae4dc1d99d9c7beadef2e | rushioda/PIXELVALID_athena | /athena/Trigger/TrigT1/TrigT1RPClogic/src/CMAtrigger.cxx | C++ | cxx | 4,890 | no_license | /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "TrigT1RPClogic/CMAtrigger.h"
#include "TrigT1RPClogic/CMApatterns.h"
CMAtrigger::CMAtrigger(Lvl1RPCalgo emulation,TrigType type,Threshold thres,
bool overlap,float width, const CMApatterns* patterns,
const RPCdigit* t... |
3f8d901ecf8827f0d05620fee3ef1fa7f593944c | 862bc2b6ae3627541694f77316fe0a5e668f357b | lgsvl/chromium-src | /cc/output/renderer_pixeltest.cc | C++ | cc | 147,377 | permissive | // Copyright 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 <stddef.h>
#include <stdint.h>
#include <memory>
#include "base/memory/aligned_memory.h"
#include "base/message_loop/message_loop.h"
#include "c... |
9d88ea0f087cc24bcbab70e36482fc43723133a2 | 5998fb55264ad54b94d5f5427dc42f1df1dab880 | mkay1375/chromium | /components/viz/service/display_embedder/skia_output_surface_impl.cc | C++ | cc | 53,708 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/viz/service/display_embedder/skia_output_surface_impl.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/bind... |
bda13d0ebd553328657cf72ab4128c9b38df8fa0 | a42278a5be214bfb0bb89eb3b9432bde4b63ba69 | dr5trange/openrasp | /agent/php7/openrasp_log.cc | C++ | cc | 27,764 | permissive | /*
* Copyright 2017-2018 Baidu Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... |
b2a5611bd28de2dead1e99fe4b483ab58a0f48b5 | 8dbc848facbd5e03782aee32e513419a4a33cad6 | hernancppteran/Cpp_Tutorial | /Lesson_02.cpp | C++ | cpp | 2,479 | no_license | // Hernan Teran 1/18/2021
#include <iostream>
#include <string>
#include <cmath> // [ 1 ]
#include <iomanip>
// [ 2 ]
std::string get_SI_Unit();
char get_SI_Abbrev();
double getInitialPos();
double getFinalPos();
double calculate_displacement(double, double);
void displayResult(double, std::string, char);
int raiseTo... |
5ac1af977fb8d8f2adc6cd2ca3f16cd923e4351f | 2e4d3c35cea9492bf698b9ae3c79b3cb271f7e4e | StormPhoenix/kaguya | /include/ext/glm/gtx/handed_coordinate_space.hpp | C++ | hpp | 1,413 | no_license | /// @ref gtx_handed_coordinate_space
/// @file glm/gtx/handed_coordinate_space.hpp
///
/// @see core (dependence)
///
/// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space
/// @ingroup gtx
///
/// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system... |
39df2102100e66942e9b128ba470b26bdd5a4fb1 | e4b214ad9c02b16c04b1f48b42194d837cc368a2 | plaidml/tensorflow | /tensorflow/compiler/mlir/tfr/integration/tfr_decompose_ctx.cc | C++ | cc | 9,342 | permissive | /* Copyright 2020 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... |
715aea39de676dbcbda5d9088c28638beddfa9be | fcadc3a87015478cd94e1f21ae3209c7d06acb83 | darkloz/EDA | /acm/1461-RotationsandReflections.cpp | C++ | cpp | 2,730 | no_license | //============================================================================
// Author : Carlos Eduardo Guillen Davila
//============================================================================
#include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <set>
#include <bitset>
#include... |
435d3ee4d53a2b812ad4156c73674371dc126673 | 95306b21d82b0cfc03e11eae34881b8382cbc76b | chargen/ncbi_tk | /src/sra/data_loaders/bam/test/test_bam_loader.cpp | C++ | cpp | 22,765 | no_license | /* $Id$
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act.... |
fd3b60d429f703d569551a97e9928cd2410707fb | aaad60da3e4d4d5c6de1b512e9683a41a87a3d3c | hoanghuysonuit/GameCastlevania | /GameDx/GameDx/Class/Game/Entity/Bonus/BonusManager.cpp | C++ | cpp | 323 | no_license | #include "BonusManager.h"
CBonusManager::CBonusManager()
{
}
CBonusManager::~CBonusManager()
{
}
void CBonusManager::pushEnvent(int event_item)
{
m_EventList.push_back(event_item);
}
void CBonusManager::popEnvent(int event_item)
{
m_EventList.pop_back();
}
void CBonusManager::handleEnvent(float deltaTime) {
... |
b531da7caa91fe31dfb1d4ff5e78805585f49661 | 7dc902cda899661d2230e94f0b28d27ffb0c70b4 | giovaneaf/CompetitiveProgramming | /URI/2041.cpp | C++ | cpp | 917 | no_license | #include <iostream>
using namespace std;
int main()
{
string num,tmp;
int N,i,j,k;
char cont;
while (!(cin >> N).eof())
{
num = "13";
if (N == 1)
cout << 3 << endl;
else if (N == 2)
cout << 13 << endl;
else
{
for (k=2;k<N;k... |
811a167fd03c17d8112516c9f37c3c3bd8427e22 | d516caaf6db06bb74dbe81098ff3d5d547af8028 | sarthak-saxena/cef_node_webkit | /libcef_dll/cpptoc/test/translator_test_cpptoc.cc | C++ | cc | 47,092 | permissive | // Copyright (c) 2021 The Chromium Embedded Framework 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 was generated by the CEF translato... |
387f400fca8f3f85ca2e7a859c4d6e96e2f9becb | f5505dc7bf79cb416ff3293fced58831d47e762c | stevenchen1976/MyBrowser | /Src/Browser/PerfTest.cpp | C++ | cpp | 4,110 | no_license | #include "stdafx.h"
#include "ClientAppRenderer.h"
#include "PerfTest.h"
#include <algorithm>
#include <string>
#include "include/wrapper/cef_stream_resource_handler.h"
#include "StdString.h"
#include "EncryptByMd5.h"
#include "Globals.h"
namespace Browser
{
namespace PerfTest
{
const char arrGetMachineCode[] = "... |
7a6e48a3564687a47dc99fe9cbfd8d088b8eae98 | 71efe48e0a825f1a69710a7f2861a51d83973b78 | LittleDrogon/MFC-Examples | /wfc/SRC/CNetFile.cpp | C++ | cpp | 6,272 | no_license | #include <wfc.h>
#pragma hdrstop
/*
** Author: Samuel R. Blackburn
** Internet: wfc@pobox.com
**
** You can use it any way you like as long as you don't try to sell it.
**
** Any attempt to sell WFC in source code form must have the permission
** of the original author. You can produce commercial executables with
** W... |
aaede91b89dce914d893ef04b0e2393b4aa1a2f3 | 1ef88866d94ab21726a822528c447d052a08642d | nanbansenji/ElonaFoobar | /src/elona/testing.cpp | C++ | cpp | 5,623 | permissive | #include "testing.hpp"
#include <sstream>
#include "../version.hpp"
#include "character.hpp"
#include "config.hpp"
#include "ctrl_file.hpp"
#include "data/types/type_item.hpp"
#include "data/types/type_music.hpp"
#include "data/types/type_sound.hpp"
#include "draw.hpp"
#include "gdata.hpp"
#include "i18n.hpp"
#includ... |
44c7456fad0caeec80949e0b88536b60cb7caa4e | ae0952d77a817a13fe300d1f441061bdaffbe3ac | ric2b/Vivaldi-browser | /chromium/chromeos/ash/services/libassistant/grpc/grpc_client_thread.cc | C++ | cc | 2,818 | permissive | // Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/ash/services/libassistant/grpc/grpc_client_thread.h"
#include <memory>
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include... |
7eed099fd5080112cacf57336637f2acc44fa754 | 2b866c626248f6ac23a0c07b06ab98ccc8a94ce2 | ma-vysotskiy/arm.trace.analizer | /Packet/PTM/PTMAtomPacket.hpp | C++ | hpp | 1,016 | no_license | /*
* PTMAtomPacket.hpp
*
* Created on: Apr 23, 2013
* Author: mvis
*/
#pragma once
#include "../../Defines.hpp"
#include "../../Packet/Packet.hpp"
#include "../../Exceptions/enumerror.hpp"
#undef enumBody
#define enumBody \
e_begin(field) \
e_member(F, %at) \
e_member(Count, %cc) \
e_end
class CPTMAtom... |
310e24d7cb2dfdec1cccae811687ed894145ef26 | aeaa5bcdf33705db338e73ab788a12f5ad336ce2 | Floodnik/BTree | /IO.cpp | C++ | cpp | 717 | permissive | #include <fstream>
#include <iostream>
#include <sstream>
#include "IO.h"
using namespace std;
IO::IO(const std::string& _name)
: name(_name) {}
bool IO::write(byte* data, const unsigned& suffix, unsigned size)
{
std::stringstream ss;
ss << name << suffix;
fstream file(ss.str(), ios::out | ios::bina... |
53233acb4d71515b9b682417a82eb5fc4a1c21ea | b7c5122b84c07ea4fa8e8c5b968ff635997bc561 | techtronics/ohack-svn | /OBruteForce/OBruteForceGui/OMachinesDialog.cpp | C++ | cpp | 860 | no_license | #include<OMachinesDialog.h>
OMachinesDialog::OMachinesDialog(QWidget *parent):QDialog(parent)
{
setupUi(this);
MachinesModel=new QStandardItemModel(parent);
OMachinesTableView->setModel(MachinesModel);
OMachinesTableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
connect(OMachineAddPushButton,SIGNAL(clicked(... |
be825de9e0fd7e3a986ffbbba798de69409177e1 | a216ebaf92e3062efe6b3b09a150083ac2482927 | inovativestar/algolia-react-react-native-app | /kalemat/ios/Pods/gRPC-Core/src/core/ext/filters/client_channel/http_connect_handshaker.cc | C++ | cc | 15,256 | permissive | /*
*
* Copyright 2016 gRPC authors.
*
* 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 la... |
2ed06ef6995aff4e1df691f7e3abce4e33e65729 | 1d6d59c6b375bd3d065d14273b9d02053816803c | djblooky/blackjack | /Blackjack/Blackjack/Deck.cpp | C++ | cpp | 1,416 | permissive | #include "pch.h"
#include "Deck.h"
#include "Card.h"
#include <random>
#include <ctime>
void Deck::createDeck() //adds 4 cards of each value to 52 card deck
{
Card ace("Ace", 11);
Card two("Two", 2);
Card three("Three", 3);
Card four("Four", 4);
Card five("Five", 5);
Card six("Six", 6);
Card seven("Seven", 7);... |
df3872e21c61e39fe0f3357c37e7221c00a9e5ac | c1f105f11b9cfbb09171cc95faf648289c44b26b | NemeSnz/uplink-nodejs | /functions/download_operations.cc | C++ | cc | 12,544 | permissive | // Copyright 2020 Storj Storj
/** @mainpage Node-js bindings
* It uses napi for creating node module
*
*/
#include "download_operations.h"
#include <string>
/*!
\fn napi_value download_infoc(napi_env env, napi_callback_info info)
\brief download_infoc function is called from the javascript file
download_info re... |
fae90d702e78fe788a2cb624b7bcc7391451296e | 43332280e8c6da5f07ccb00caec41df75dbe5f00 | shaunstanislauslau/yugabyte-db | /src/yb/tablet/operations/operation_driver.cc | C++ | cc | 17,481 | 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... |
470e81d16f9e8ebd59211ed9ac76008ab201b685 | fe4501ae9da6d84b4ff0da5ab77de933f4ec7a74 | luosch/13-cpp-hw | /Week_06/1004/GuanErDai.cpp | C++ | cpp | 455 | no_license | #include "GuanErDai.h"
GuanErDai::GuanErDai(): Account() {
name_ = "";
}
GuanErDai::GuanErDai(const string& n, const string& dadName, double bal)
:Account(dadName, bal) {
name_ = n;
}
string GuanErDai::getName() const {
return name_;
}
double GuanErDai::getBalance() const {
return Account::getBalance();... |
14b748d8ff3f0c52befa14c27349549c83b0dff9 | 785bf348fcb5c89e34a5f59c6807352f8b268261 | KonradSchieban/4InARow | /main.cpp | C++ | cpp | 240 | no_license | #include "mainwindow.h"
#include <QApplication>
#include <QCoreApplication>
#include <QDebug>
using namespace std;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
|
c4a2693bd7df4fde80bda358d4a1716575d806aa | 99ce8efc5d76256523a15d0eefdf64a116b66c32 | ryanyogan/rubinius | /vm/capi/array.cpp | C++ | cpp | 14,596 | permissive | #include "builtin/array.hpp"
#include "builtin/fixnum.hpp"
#include "builtin/object.hpp"
#include "builtin/proc.hpp"
#include "builtin/thread.hpp"
#include "builtin/lookuptable.hpp"
#include "objectmemory.hpp"
#include "arguments.hpp"
#include "dispatch.hpp"
#include "exception_point.hpp"
#include "capi/capi.hpp"
#in... |
5b282b6abe135bd9bb67a87e1b49a96f7146fa66 | b1543bb3d00d7532bbffd7208d9290c940326b1f | otgaard/zap | /third_party/asio/src/tests/unit/completion_condition.cpp | C++ | cpp | 622 | permissive | //
// completion_condition.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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)
//
// Disable autolink... |
405aa4a6ae5603d228cd5cb1dd58d3249767030f | b93d3dd5b19032ae8c0653c7a98c98492114dbd2 | AgentLouisiana/Loops_Exercise | /Loops_Exercise/loops.cpp | C++ | cpp | 2,668 | no_license | #include <iostream>
#include "loops.h"
int main()
{
//#1
/*Using a for loop to iterate backward, print the values 100 to 0.
- Modify the for loop to include 0 and include 100
- Modify the for loop to include 0 and not 100
- Modify the for loop to not include 0 and include 100
- Modify the for loop to de... |
f7d3e31606b5e7fe352ed19f3f2c28d074ce9665 | 8ce9c3aebe4eb74bb58d6d1849ae48153992004e | gammasoft71/xtd_forms | /src/xtd_forms/src/xtd/forms/theme.cpp | C++ | cpp | 1,726 | permissive | #include "../../../include/xtd/forms/theme.h"
using namespace xtd::forms;
const theme theme::empty {};
theme theme::current_theme_;
theme theme::theme_from_name(const std::string& name) {
if (name == default_theme_name()) return theme(default_theme_name(), theme_style::system_auto, true);
if (name == "gnome") re... |
ac0245f36bfbeba8a25f1c9a97fe0027c4e7617d | 2effdbed29e3a2f7af32a722b558edf8b2b15a0d | plus2047/ITPC | /itpc/06_Basic_Graph/1258_Agri_net.cpp | C++ | cpp | 3,134 | no_license | // ===== programing contest template ======
// ===== using standrod: C++ 11 =====
// #undef __LOCAL__
#include <cassert>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <map>
#includ... |
ca629ba65460eeee2bef87ee3a3f4eb4f815771a | 40c8bb8989894536b53a49d0f4ae1c7a25aebaec | china-liweihong/sdk | /runtime/vm/stub_code_mips.cc | C++ | cc | 86,095 | permissive | // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "vm/globals.h"
#if defined(TARGET_ARCH_MIPS)
#include "vm/assembler.h"
#include "vm/code_gene... |
cd5b387f7e9ae207c27a4a68ab0f1b47f401565a | 6c642e5d802ad5bd4a746326c71d4bdcf2dbf768 | surarijit/DSA_ALGO | /countoccurenceofk.cpp | C++ | cpp | 1,338 | no_license | /*
ARIJIT SUR
@duke_knight
@surcode
@comeback
IIT ISM
*/
#include<bits/stdc++.h>
#define SIZE (ll)(1e6)
#define mod (ll)(1e9+7)
#define va(x) ((x)%mod)
#define vi vector<int>
#define reset(a,n,val) a.clear(),a.resize(n,val)
#define INF 0x3f3f3f3f
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
#define ... |
cb0cbc2eb9bdc4132c6d689cfa1e96a7ce50b85d | f7dc20be74214826c21804df9982b2622bf17ade | dreamtraveler/sscc | /src/union_ptr_item_tree.cpp | C++ | cpp | 1,310 | no_license | #include "union_ptr_item_tree.h"
void UnionPtrItemTree::parse(Parser *parser) {
std::shared_ptr<Token> token = parser->cur();
if (!token->is_iden()) {
log_expect(token->loc(), "identifier");
}
parser->eat();
std::shared_ptr<Tree> tree;
tree = parser->symbols().get(token->text());
if (!tree) {
l... |
f30273a79ac86359c577ecbd872cd01e351a85c5 | 2b3e2413b58dd1bd729ddb8c25c610661976e7dd | Qui-Gon173/AiSD-2020 | /ISTbd-22/Iskhakov T. I/lab8.2/main.cpp | C++ | cpp | 2,008 | no_license | #include <iostream>
#include <algorithm>
#include "Node.h"
#include "Queue.h"
#include "GeometricProgressionGenerator.h"
using namespace std;
void print(Queue queue) {
std::cout << "Elements of Queue:" << std::endl;
for (auto& item : queue) {
std::cout << item << " ";
}
std::cout << std::endl;
}
void sum(Q... |
c7719f810e01d73c191c58f33e76eb9ae9973497 | a63d0839c2b5d66bcdec3e7b72d720ff8e5d7c42 | XbitCC/xbitcoin | /src/node/coin.cpp | C++ | cpp | 784 | permissive | // Copyright (c) 2019 The XBit Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <node/coin.h>
#include <node/context.h>
#include <txmempool.h>
#include <validation.h>
void FindCoins(const NodeContext& n... |
07eb6e693e862e90f64a288649d41150ab5a4b81 | 352732fe7595cf4b6c1d9854ef6e2c6e8d05040e | jasveen18/CP-krle-placement-lag-jayegi | /450 DSA Questions/01 Arrays/4MinSwapsToGroupK.cpp | C++ | cpp | 781 | no_license | int minSwap(int *arr, int n, int k)
{
// Count number of valid numbers in the array
int validNums = 0;
for (int i = 0; i < n; i++)
{
if (arr[i] <= k)
validNums++;
}
// Count the non-valid nums in a window of count len
int nonValidNums = 0;
for (int i = 0; i < validNu... |
f693b0100d9bc969195ae6b6a26b87cdbef2f195 | 78169a3999b21dc89632b47f406d4f3cb64b444f | ianw3214/Heaven-s-Edge-Awakening | /HeavensEdge/src/entities/enemy.hpp | C++ | hpp | 578 | no_license | #pragma once
#include "QcEngine.hpp"
#include "gameObject.hpp"
#include "../util.hpp"
#define ENEMY_WIDTH 64
#define ENEMY_HEIGHT 128
#define ENEMY_DEATH_TIME (2000)
class Enemy : public GameObject {
public:
Enemy();
Enemy(int x, int y);
~Enemy();
void update(Uint32 delta);
void render();
private:
// mo... |
3d59c02e0c358a498b87530da79769ec88b09df1 | 1ea526f82c4ee9104013269caabb5764f470d31f | mariaderda/lab | /lab/src/B3PhysicsList.cc | C++ | cc | 2,944 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
547c1f0ffd56246787fa66c900758972e6302329 | ab1d7272c502bee5bbc501a485691a4c8edf22f8 | zk2013/SoT-SDK | /SDK/SoT_BP_fod_Pondie_05_BrightUndercooked_00_a_ItemDesc_classes.hpp | C++ | hpp | 879 | no_license | #pragma once
// Sea of Thieves (2.0) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_BP_fod_Pondie_05_BrightUndercooked_00_a_ItemDesc_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------... |
c16ec591d603006b76c7897797579837f5189217 | 5548fa97b8519cd13400838ab3927d9b48745efb | ksvcng/code | /documents/codeforces/457_ii/2.cpp | C++ | cpp | 361 | no_license | #include<iostream>
#include <vector>
#include <algorithm>
#include<string>
#include<math.h>
#include<bits/stdc++.h>
using namespace std;
int main()
{ long int n,k;
cin>>n>>k;
long long arr[61];
for(int i=0;i<61;i++){arr[i]=pow(2,i);}
if(n<k){}
else {
int i=0;
while(k*arr[i]<=n){i++;}
int j=i;
wh... |
f6a470c372896ad6672f167eacdd5ce86e594bca | b373ab61be9d2d407251a3f437d9a341a8d8ed96 | martinappo/robotiina2015 | /refereeCom.cpp | C++ | cpp | 4,581 | permissive | #include "refereeCom.h"
RefereeCom::RefereeCom(FieldState *pFieldState, const std::string &name) : ConfigurableModule(name), m_pFieldState(pFieldState)
{
AddSetting("Field", [this]{return std::string(1,this->FIELD_MARKER);}, [this]{this->nextField();});
AddSetting("Team", [this]{return std::string(1,this->TEAM_MARK... |
971eebc2a5963ceb2d59761fe432c43b51185deb | e60de11f5556e5934930370a19ab35d2a70679d2 | swfrench/rma-async | /include/async_internal.hpp | C++ | hpp | 2,726 | no_license | #pragma once
#include <chrono>
#include <thread>
/// @cond INTERNAL_DOCS
// generic byte type used throughout
typedef unsigned char byte;
/****************************
* Macros for repeated idioms
*/
#ifndef mpi_assert
#define mpi_assert(X) assert(X == MPI_SUCCESS);
#endif
#define wait_exp(cycle, t0, tmax) ... |
979b16b704a44ec295338c5a6d615a799b60c311 | 15b1a4abf3c1a497f81605d4b9937a3d1cb68909 | AlexAUT/Kroniax-Mapeditor-old | /include/initGui.hpp | C++ | hpp | 7,041 | permissive | #include "AwGUI/gui.hpp"
void initGui(AwGui &gui)
{
//Add layers
//0 = NEW|OPEN|SAVE
gui.addLayer();
gui.setLayerActive(0, true);
//1 = SETTINGS|DESIGN|SCRIPTS
gui.addLayer();
gui.setLayerActive(1, true);
//2 = SETTINGS frame
gui.addLayer();
//3 = DESIGN frame
gui.addLayer();
//4 = Script frame
gui.addLa... |
492bdbebebe73b107628e7427a8b051a0b3dfa72 | 7884fe2a2f9f7f8d42c0521d7d9824a9427209b2 | jangellx/TMProLWPlugIns | /Workspaces/Lightwave/Motify/MotifyForNewTek/Motify-FromLWChannelScan.cpp | C++ | cpp | 3,851 | no_license | //
// Motify-FromLWChannelScan.cpp
//
#include "Motify-FromLWChannelScan.h"
// Constructor
LWChannelScan::LWChannelScan( LWChannelInfo *_chan_info, LWChanGroupID _root_group,
LWItemInfo *_item_info,
LWItemID _item, bool _skip_bones )
: chan_info( _chan_inf... |
7928f48f3af450c79f233f041cc96149da0d7fec | 0702567192c45bb0527eb4cd2683e3b3adff5755 | apushpar/SFND_Lidar_Obstacle_Detection | /src/quiz/cluster/cluster.cpp | C++ | cpp | 5,187 | no_license | /* \author Aaron Brown */
// Quiz on implementing simple RANSAC line fitting
#include "../../render/render.h"
#include "../../render/box.h"
#include <chrono>
#include <string>
#include "kdtree.h"
#include <unordered_set>
// Arguments:
// window is the region to draw box around
// increase zoom to see more of the area... |
71241648628f66d14e47a0af358f20b7ef7a129f | f2a6c4fca2eae1f9ee9a227ada0e8f927899c4f1 | stdstring/leetcode | /Algorithms/Tasks.0001.0500/0067.AddBinary/solution.cpp | C++ | cpp | 1,240 | permissive | #include <algorithm>
#include <string>
#include "gtest/gtest.h"
namespace
{
class Solution
{
public:
std::string addBinary(std::string const &a, std::string const &b) const
{
std::string buf;
const size_t maxSize = std::max(a.size(), b.size());
std::div_t dv{};
char carry = 0;... |
f7ba3d01bf88556a23c64e16fc58ab8b804a4b7b | 5284b8391da0e0d1721ad61cf73ce52f1526c426 | xtblock/chromium | /third_party/blink/renderer/modules/mediastream/webmediaplayer_ms.cc | C++ | cc | 54,446 | permissive | // Copyright 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 "third_party/blink/public/web/modules/mediastream/webmediaplayer_ms.h"
#include <stddef.h>
#include <limits>
#include <memory>
#include <string... |
5bb3b88d194139086236ff77856d0e40987d9020 | 1d24c0d54919f655408e8b7354f6253f4260294b | waffle-iron/Atraxian | /Atraxian/Taskbar.hpp | C++ | hpp | 569 | permissive | #ifndef TASKBAR_HPP
#define TASKBAR_HPP
#include <SFML\Graphics.hpp>
class Environment;
class Pane;
class Taskbar
{
public:
Taskbar(Environment *environment_);
~Taskbar();
sf::RectangleShape bar;
sf::RectangleShape start_button;
sf::RectangleShape div;
sf::Text time;
bool is_start_open;
bool is_hidden;
v... |
a4e3c70811d2905957e959fd06f9082d1c9bf632 | ba5af275e837575a92d9ae1c011d5ebc7e631bf8 | aliyun/aliyun-openapi-cpp-sdk | /es-serverless/src/Es-serverlessClient.cc | C++ | cc | 23,041 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud 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... |
4563b4fd1e9c66f20a87a2402619b4be82eaecb6 | dd823d6e5e9acf1d4db562a2d46e37fc5b048a8c | jjzhang166/WinNT5_src_20201004 | /NT/ds/adsi/winnt/cserv.hxx | C++ | hxx | 3,971 | no_license | //---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1995
//
// File: cserv.hxx
//
// Contents: Contains definitions for the following objects
// CWinNTService, CWinNTServiceConfig, and
// CWi... |
fa1a84ad756cd77914b0cec9a1641ba323fd1bcb | fe454ae0e19947ff71ac8b293e8afaa6b6f29f49 | TEJASWI-TEJASWI/Data-Structure-Codes | /reverse_word.cpp | C++ | cpp | 1,389 | no_license | // C++ program to print reverse
// of words in a string.
//Given a String of length S, reverse the whole string
// without reversing the individual words in it. Words are separated by dots.
#include<iostream>
using namespace std;
string wordReverse(string str)
{
int i = str.length() - 1;
int start, end =... |
3f03e8c462254fa1620f0e0207b5c7bfbdd9e30e | 6f8e193d0b81e59119317689a545f808b5107d16 | xuyanbo03/Algorithm | /CSP/201612-1/main.cpp | C++ | cpp | 508 | no_license | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn=1000;
int a[maxn];
int main() {
int n;
scanf("%d",&n);
for(int i=0; i<n; i++) {
scanf("%d",&a[i]);
}
sort(a,a+n);
int mid=n/2;
int l=mid;
int r=n-mid-1;
for(int i=mid-1; i>=0; i--) {
if(a[i]==a[mid]) {
l--;
} e... |
72b5902dcbf78cce079d9284b718b04f937bfc8b | a2b344970e1d16b6cb79afe33c00513b62b08652 | Blackstate/Sot-SDK | /SDK/cmn_torch_b_functions.cpp | C++ | cpp | 1,808 | no_license | // Name: SoT, Version: 2.1.0.1
#include "../SDK.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//----------------------------------------------------... |
a3b4f1bb30f46988e7aea333b4744e19ee03d053 | d020e9c942bfb5b36bcf88ebc8545f145b5b4667 | windystrife/UnrealEngine_NVIDIAGameWorks | /Engine/Source/Editor/SequenceRecorder/Private/PropertiesToRecordForClassDetailsCustomization.cpp | C++ | cpp | 1,568 | permissive | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "PropertiesToRecordForClassDetailsCustomization.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Engine/GameViewportClient.h"
#include "PropertyHandle.h"
#include "IDetailChildrenBuilder.h"
#include "DetailWidgetRow.h"
#include "IDetailPro... |
183a6196c8e81b30bb2bfcbd606b8224c623d289 | 4c0af9070d44780c76bc47b11dd6cc6a45ed79a8 | wangpengcheng/MNN | /include/MNN/ImageProcess.hpp | C++ | hpp | 5,468 | permissive | //
// ImageProcess.hpp
// MNN
//
// Created by MNN on 2018/09/19.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef ImageProcess_hpp
#define ImageProcess_hpp
#include <MNN/ErrorCode.hpp>
#include <MNN/Matrix.h>
#include <MNN/Tensor.hpp>
namespace MNN {
namespace CV {
enum ImageFormat {
RGBA =... |
0c5e0a4e0f35bb80265d593ad2de8e3f29782583 | 9c61acb65aa0d9d59a49375fa6d43e88d3244752 | zenoalbisser/chromium | /cc/trees/tree_synchronizer.cc | C++ | cc | 8,947 | permissive | // Copyright 2011 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 "cc/trees/tree_synchronizer.h"
#include <set>
#include "base/containers/hash_tables.h"
#include "base/containers/scoped_ptr_hash_map.h"
#includ... |
ae88e1a5f3e3a9bbc40d00fac89e79c67531518e | 0deed371455162bd18336d83268bd13f8c2c7f78 | quinnrong94/TNN | /test/test_utils.cc | C++ | cc | 5,949 | permissive | // Tencent is pleased to support the open source community by making TNN available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy o... |
89d4cbc49d89f882e0b7a8e740db35999b57a57b | 79055a0ca5b6761d064bde83945f1471bb505b70 | rileylyman/opengl-renderer | /Renderer/src/sources/Shader.cpp | C++ | cpp | 2,987 | no_license | #include "Shader.h"
#include "OpenGL.h"
#include <iostream>
#include <fstream>
#include <sstream>
Shader::Shader(const std::string &path) : id(0), filepath(path) {
ShaderProgramSource shaderSource = ParseShader(filepath);
CreateShader(shaderSource.VertexSource, shaderSource.FragmentSource);
}
Shader::~Shader() {
G... |
73839a6714624de765ec97844314de89662343fa | 9b9dd76e8e502a6ca0931e34efe30b98f87b24a2 | git-Charlie/ARK-SDK | /SDK/ARKSurvivalEvolved_PrimalItem_RecipeNote_FriaCurry_functions.cpp | C++ | cpp | 1,170 | permissive | // ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_PrimalItem_RecipeNote_FriaCurry_parameters.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Functions
//--------------------------------------------------... |
6bcba3602f6c9335461dcb6e3a18046dd427820d | f866f4dd9febc5d9a934bf966f5703f9968840dd | guilhermetoda/tetris | /Tetris/src/Games/Tetris/TextBox.cpp | C++ | cpp | 1,770 | no_license | //
// TextBox.cpp
// Tetris
//
// Created by Guilherme Toda on 24/03/20.
// Copyright © 2020 Guilherme Toda. All rights reserved.
//
#include "TextBox.h"
#include "screen.h"
#include "BitmapFont.h"
#include "App.h"
#include "Score.h"
void TextBox::Init(const AARectangle& boundary)
{
mBox = boundary;
}
//void ... |
aa7bbb4db79f90ab11c28195e4c4adcfdae8d784 | 09097a51673a30414a6258eaf1d2ae43d78bf19d | Scalevo/TCP_Server | /src/old/imu_server.cpp | C++ | cpp | 4,549 | no_license | /**
C++ client example using sockets
*/
#include <iostream> //cout
#include <stdio.h> //printf
#include <string.h> //strlen
#include <string> //string
#include <sys/socket.h> //socket
#include <arpa/inet.h> //inet_addr
#include <netdb.h> //hostent
#include <sstream>
#include <signal.h> //crtl+c
#includ... |
bc7a965cae056a11c561ee55778800b377e29baa | 9087d0035cb97be61870f33149a0c7c1d01818dc | zhushaoben/training | /2020暑假训练/2020 Multi-University Training Contest 6/1001.Road To The 3rd Building.cpp | C++ | cpp | 682 | no_license | #include<bits/stdc++.h>
using namespace std;
const int mo=1e9+7,N=2e5+5;
int qpow(int a,int b){
int ans=1;
while(b){
if(b&1)ans=1ll*ans*a%mo;
a=1ll*a*a%mo,b>>=1;
}
return ans;
}
void Inverse(int p,int a[],int n){
a[1]=1;
for(int i=2;i<=n;i++){
a[i]=1ll*(p-p/i)*a[p%i]%p;
}
}
int w[N];
void work(){
int n,x,... |
b04e505462297a0da12415b7e9d2dc166250c638 | 73eca0b9044cf794c25042dafd31f0f0d2178d2a | Kourin1996/CompetitiveProgramming | /AtCoderProblems/ARC/039/a.cpp | C++ | cpp | 782 | no_license | #include <iostream>
#include <sstream>
#include <algorithm>
inline int toInt(std::string s){int v; std::istringstream iss(s);iss>>v;return v;}
std::string A, B;
int main(void){
std::cin >> A >> B;
int ans0 = toInt(A) - toInt(B);
int ans1 = 0;
std::string A1 = A;
if(A1[0] < '9'){
A1[0] =... |
bf0ab8830bf659b7e772c42f0085f33fd188f668 | 979ce4591c7cb8ebe9e629a673ca07e3b95e2258 | Xala/MEX-Quad | /ekz-public-lib/src/core/RGBDFrame.cpp | C++ | cpp | 2,519 | permissive | #include "RGBDFrame.h"
#include "math.h"
#include "ros/ros.h"
#include <fstream>
int frame_id_counter = 0;
RGBDFrame::RGBDFrame(){}
RGBDFrame::RGBDFrame(FrameInput * fi, FeatureExtractor * extractor, RGBDSegmentation * segmenter, bool verbose){
struct timeval start, end;
gettimeofday(&start, NULL);
id... |
9390c52cbe754ee62192931e21c1ce2f91d12cfa | fd5a62d6293f3aab6c2fca630b8c716584a15f95 | pczerkas/JamTaba | /src/Common/vst/Utils.cpp | C++ | cpp | 991 | no_license | #include "Utils.h"
QString Vst::utils::getPluginVendor(AEffect *plugin)
{
if (!plugin)
return QString();
char temp[128]; //kVstMaxVendorStrLen]; // some dumb plugins don't respect kVstMaxVendorStrLen
plugin->dispatcher(plugin, effGetVendorString, 0, 0, temp, 0);
return QString::fromUtf8(temp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.