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 |
|---|---|---|---|---|---|---|---|---|
4cf77711a0d924858facff3d6aa9a77efc75075e | 1db0027f9c49e03c734f3375ca727da9c692f914 | yana87gt/procon | /atcoder/abc148/e.cpp | C++ | cpp | 386 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);++i)
typedef long long ll;
int main(void){
ll n;
cin >> n;
if (n % 2 == 1) {
cout << 0 << endl;
return 0;
}
ll res = 0;
ll r = 2;
rep(i,200){
if (r*5LL > n) break;
r *= 5LL;
... |
860ba4a9e105f25d3ef5a0fea800780942a10634 | d263dfbbc1eaea089b4e69d48769faf2e274e050 | szpaku80/SimcomGsmLib | /src/Parsing/DelimParser.cpp | C++ | cpp | 5,220 | no_license | #include "DelimParser.h"
DelimParser::DelimParser(FixedStringBase &line, char separator):
_line(line),
_separator(separator)
{
_position = 0;
_tokenStart = 0;
_currentState = LineParserState::Initial;
}
bool DelimParser::StartsWith(const __FlashStringHelper* commandStart)
{
if (!_line.startsWith(commandStart))... |
b9c8433dbd531b2b85bb73bb82f5dfc16c973cc6 | 30acf4eb83d7dd1de362aaf81611a38482aa03e6 | devsim/devsim | /src/models/NodeSolution.cc | C++ | cc | 2,860 | permissive | /***
DEVSIM
Copyright 2013 DEVSIM LLC
SPDX-License-Identifier: Apache-2.0
***/
#include "NodeSolution.hh"
#include "Region.hh"
#include "Node.hh"
#include "Vector.hh"
#include "Device.hh"
#include "dsAssert.hh"
#include "GeometryStream.hh"
#include "ModelErrors.hh"
#include <sstream>
template <typename DoubleType>... |
cbb70e913ef7c4b19b4a5d332fbd0c2c7abee12d | fab15229177d0e8a397173558ffdccb4d14547ad | 2bite/ARK-SDK | /SDK/ARKSurvivalEvolved_WoodElevatorPlatform_Medium_classes.hpp | C++ | hpp | 878 | permissive | #pragma once
// ARKSurvivalEvolved (332.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_WoodElevatorPlatform_Medium_structs.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------... |
4abf185188b1e280c5adda854a056e24f9c451d2 | fb348a419fc45eb818308ec0e5b18879cc609edb | Shehyaaz/SP2-Frame-rate-up-conversion | /bmc.hpp | C++ | hpp | 2,233 | no_license | /*
****************************************
* This file contains the declaration
* of the Block Matching Correlation
* (BMC) algorithm.
* Author : Shehyaaz Khan Nayazi
****************************************
*/
/*
* NOTE : a) x is in the direction of width, i.e., x will be the number of columns
* b) y is in th... |
4bb4ff02c5a10e1f756a8e5b42c7edded4f40188 | 2adec5b108a2855ee41b33226fe66a80949c7c57 | yelloSA96/DDS | /src/main.cpp | C++ | cpp | 2,947 | no_license | /*
Author: Thomas Suebwicha
Version Control
0.1 - Completed the integration of reading the storage
0.2 - Introducing the Introductory display module for text
*/
#define _CRT_SECURE_NO_WARNINGS
#include "display.h"
#include "manage.h"
#include <iostream>
#include <vector>
#include <io... |
233fe5a9b75d15a5ad8c5cb5958ca7d285bb3e99 | 5a2b5ea253d2351e462be0bd08237154e4f34ee9 | openframeworks/openFrameworks | /addons/ofxEmscripten/src/ofxEmscriptenSoundPlayer.cpp | C++ | cpp | 3,770 | permissive | /*
* ofxEmscriptenSoundPlayer.cpp
*
* Created on: May 15, 2014
* Author: arturo
*/
#include "ofFileUtils.h"
#include "ofxEmscriptenSoundPlayer.h"
#include "html5audio.h"
using namespace std;
vector<float> ofxEmscriptenSoundPlayer::systemSpectrum;
int ofxEmscriptenAudioContext(){
static bool initialized=... |
5b6675c4ac0b72bfe356cf4a02843ae3ed97d2fb | b2de09f8a8e953869479798503aa690269545f97 | adobe/envoy | /source/common/router/scoped_rds.cc | C++ | cc | 12,779 | permissive | #include "common/router/scoped_rds.h"
#include <memory>
#include "envoy/admin/v2alpha/config_dump.pb.h"
#include "envoy/api/v2/srds.pb.validate.h"
#include "common/common/assert.h"
#include "common/common/logger.h"
#include "common/config/subscription_factory.h"
// Types are deeply nested under Envoy::Config::Confi... |
0b3937f86ef288759bebcd3ee7ae3457adf514aa | f349711443aa9ba8efb9464b4140addd1966a130 | skempken/interverdikom | /vendor/cxsc-2.2.3/CToolbox/Modules/matinv.hpp | C++ | hpp | 2,617 | no_license | /*
** CXSC is a C++ library for eXtended Scientific Computing (V 2.2.3)
**
** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
** Universitaet Karlsruhe, Germany
** (C) 2000-2008 Wiss. Rechnen/Softwaretechnologie
** Universitaet Wuppertal, Germa... |
881c7b2ec7e7946bec70ee30d925434aa164827b | dce870753befb93e993c6ad615d0da04ae58f6a0 | wildmichael/ParaView3-enhancements-old | /VTK/Filtering/vtkMutableUndirectedGraph.cxx | C++ | cxx | 7,504 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkMutableUndirectedGraph.cxx,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for detai... |
593fc3a5abf5e11bc45fc385a3714a46fa0c7263 | c963e6247a80d41df6df07888a5b009722fddd90 | gracedotdotdot/exam01 | /sine/main.cpp | C++ | cpp | 670 | no_license | #include "mbed.h"
#include "uLCD_4DGL.h"
AnalogOut Aout(DAC0_OUT);
Serial pc( USBTX, USBRX );
AnalogIn Ain(A0);
uLCD_4DGL uLCD(D1, D0, D2); // serial tx, serial rx, reset pin;
float ADCdata;
int main(){
float i, j;
while(1){
for(j=0; j<=10; j++){
for( i=0; i<2; i+=0.05 ){
Aout = 0.5 ... |
6dea4fa02989a7529007c06054133096ef0d2639 | 5df2c8adb7d61ce30a51d0556be7d3d1ecc45d5f | Tintindu13127/PLT_2020_endless | /src/shared/engine/FInishTurnCommand.cpp | C++ | cpp | 574 | no_license | /*#include "FinishTurnCommand.h"
#include <iostream>
#include <unistd.h>
using namespace engine;
using namespace state;
using namespace std;
FinishTurnCommand::FinishTurnCommand() { this->commandID = FINISH_TURN;}
void FinishTurnCommand::execute(state::State& state)
{
//ajouter les ressources produitent au play... |
a0bc7db3a3a49473195b4bc735d853970add5b81 | 56d168c62ca7de42ed9871f3bf95d2f42e150837 | colleenmacklin/ofxSoso | /src/ofxAnimation.cpp | C++ | cpp | 6,348 | permissive | #include "ofxAnimation.h"
#include "ofUtils.h"
//class ofxTween
ofxTween::ofxTween(ofxObject *iObject, ofxMessage *iMessage)
{
object = iObject;
message = iMessage;
}
ofxTween::~ofxTween()
{
stop();
delete(message);
}
void ofxTween::start()
{
message->setStartTime(ofGetElapsedTimef());
mess... |
fe495cb6b9bcd429a5a2fe3817a5d779dd772055 | 762cb5e744dae89fd97268e2399bdfea474e3844 | pothosware/pothos-serialization | /include/Pothos/serialization/impl/mpl/map/aux_/map0.hpp | C++ | hpp | 2,440 | permissive |
#ifndef POTHOS_MPL_MAP_AUX_MAP0_HPP_INCLUDED
#define POTHOS_MPL_MAP_AUX_MAP0_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENS... |
0e111d56f6ee0d1ae56beb74192e639c0cb62e2d | 3ebd3d730d11738014efeccd431786935219d6b6 | defuyun/Engine | /Engine/doge/control.cpp | C++ | cpp | 2,247 | no_license | #include "control.h"
doge::mainEngineControl::mainEngineControl(int keySize, int mouseSize)
: _keyPressed(keySize, false), _mouseClicked(mouseSize, false) {
_cursorX = _cursorY = _scrollOffsetX = _scrollOffsetY = 0.0;
_sensitivity = 0.5f;
_firstRunFlag = true;
_pitch = 0;
_yaw = -90;
}
void doge::mainEngineCon... |
6931ee4a5713239877cb5d996029b2aee3054bc7 | 8cc22654bc51aff0f7b3381eb5fb7a7ee5c719f8 | zhangqinghua/opengl | /Code/Chapter 8/demo8_4/main.cpp | C++ | cpp | 10,287 | no_license | //==============================================================
//==============================================================
//= main.cpp ===================================================
//= Original coders: Trent Polack (trent@voxelsoft.com) =
//=============================================================... |
689d177690d96e9d0746d064115a58d1fb43c8de | e5771c8fcca137d1d0992fcd6bcff7a1441e6f67 | cnsuhao/galaxy3d | /engine/lib/src/TweenColor.cpp | C++ | cpp | 306 | no_license | #include "TweenColor.h"
namespace Galaxy3D
{
void TweenColor::SetValue(float t)
{
float value = curve.Evaluate(t);
Color color = Color::Lerp(from, to, value, false);
if(on_set_value)
{
on_set_value(this, target, &color);
}
}
} |
1b662d736d79213155b54687e410b9ee89771f51 | 37521c43ac32f095b7f7115ed9b53484da864116 | prashant97sikarwar/leetcode | /Greedy/MergeTripletsToFormTargetTriplet.cpp | C++ | cpp | 1,003 | no_license | //Problem Link:- https://leetcode.com/problems/merge-triplets-to-form-target-triplet/
#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
bool mergeTriplets(vector<vector<int>>& triplets, vector<int>& target) {
int n = triplets.size();
bool flag1 = false,flag2 = false,flag3 = fal... |
6033fe7e97f068aa710ac4ee0e18facb4d7a59ac | 1c6cfd9ccec506dea5c5f40fd3522fc11ac53a0b | MvGaster/esp-gift | /src/main.cpp | C++ | cpp | 3,355 | no_license | #include <Arduino.h>
#include <TaskScheduler.h>
#include <SPI.h>
#include <TFT_eSPI.h>
#include "wifi.h"
#include "ota.h"
#include "filesystem.h"
#include "touchhandler.h"
#include "displaygreeting.h"
#include "displaymessage.h"
#include <FS.h>
#include <LittleFS.h>
#include "defines.h"
#define FlashFS LittleFS
#de... |
f3e9aa408d646b67e34784609c0051890b7d63b8 | 9dc327c74ad8e6dbc9032ba3704925d17095f429 | atherlangga/blowgun | /resources/code/application/02-RainbowTriangle/rainbow_triangle_application.cpp | C++ | cpp | 2,296 | no_license | #include <iostream>
#include <GLES2/gl2.h>
#include <blowgun/types.h>
#include <blowgun/program.h>
#include <blowgun/program_builder.h>
#include "rainbow_triangle_application.h"
static const char * kVertexShaderSource = "\
attribute mediump vec4 a_vertex_position;\
attribute mediump vec3 a_vertex_col... |
9c471b1a33f13e122589d663fb8052c4edc2fc6e | ef21d91d3b7919e1cfac9631308d95ce47e08dc8 | Y77-dj/Y77-dj | /Ch3/Stacklist/Test_StackNode_2022_10_15/main.cpp | C++ | cpp | 3,059 | no_license | #include "stdio.h"
#include "stdlib.h"
#include "io.h"
#include "math.h"
#include "time.h"
#define OK 1
#define ERROR 0
#define TRUE 1
#define FALSE 0
#define MAXSIZE 20 /* 存储空间初始分配量 */
typedef int Status;
typedef int SElemType; /* SElemType类型根据实际情况而定,这里假设为int */
/* 链栈结构 */
typedef struct StackNode
{
SElemType d... |
eba1cacdadeaf0481f035043b748c3b25d97ed42 | 82bb7a9cc19924c1fbbbb6a494472f4a97ff7fdf | urbinna00/FP_Tareas_00350419 | /Suma.cpp | C++ | cpp | 419 | no_license | #include <iostream>
using namespace std;
int main (){
int num1, num2, num3, num4, suma;
cout<<"Ingrese el primer numero\n"; cin>> num1;
cout<<"Ingrese el segundo numero\n"; cin>> num2;
cout<<"Ingrese el tercer numero\n"; cin>> num3;
cout<<"Ingrese el cuarto numero\n"; cin>> num4;
suma = num1... |
ee084520563eb52929a3c09f8a8a82596ea8b8a2 | f7d071743c299ca6ac08f29896f210ed9e4bbaad | HoPe2711/Algorithm | /1421e.cpp | C++ | cpp | 1,572 | no_license | #include <iostream>
#include <math.h>
using namespace std;
int readInt () {
bool minus = false;
int result = 0;
char ch;
ch = getchar();
while (true) {
if (ch == '-') break;
if (ch >= '0' && ch <= '9') break;
ch = getchar();
}
if (ch == '-') minus = true; else result = ch-'0';
while (tru... |
3017dcf23c90a53df58f57da1b33673552ccb134 | 5f0bb64adfd7b50551ecce7554cd37fc7aa4edd7 | monsterji/hikari | /engine/include/hikari/client/game/KeyboardInput.hpp | C++ | hpp | 1,809 | no_license | #ifndef HIKARI_CLIENT_GAME_KEYBOARDINPUT
#define HIKARI_CLIENT_GAME_KEYBOARDINPUT
#include "hikari/core/Platform.hpp"
#include "hikari/client/game/Input.hpp"
#include <SFML/Window/Event.hpp>
namespace hikari {
class KeyboardInput : public Input {
private:
static const bool BUTTON_PUSHED = true;
... |
1ee906ab4c487059851962138f954efe763a5ea4 | eff5d464a38b4e38c73acd94c7b503fcd0a4032c | MedoN11/CompetitiveProgramming | /CodeForces/CF101490-GYM-E.cpp | C++ | cpp | 2,317 | no_license | #include <iostream>
#include <cstdio>
#include<list>
#include<iomanip>
#include<cmath>
#include<queue>
#include <functional>
#include<stdio.h>
#include<assert.h>
#include<stack>
#include <unordered_map>
#include<sstream>
#include <cstdlib>
#include<map>
#include<algorithm>
#include<iostream>
#include<set>
#include<util... |
192e7781a383583ede398f7e75839351d0b96070 | f3898a95eb830d4f033d4880738077b734078e83 | ridik22/practik | /day 1/day 1 (zadasha 257 (6)).cpp | C++ | cpp | 656 | no_license | #include <iostream>
#include <conio.h>
using namespace std;
char s [1024];
int main (void) {
cout << "Input a string: " << endl;
gets(s);
unsigned int n = 0;
while (s[n] != '!') n++;
if (n < 4) {
cout << "Have not 2 pairs." << endl;
getch();
return 0;
}
... |
a3a752659401ca70a08c363c6cbd6f64745663a2 | f268d445e44910ec8c23c9735ea92e6c40f8c358 | ren19890419/urchinEngine | /3dEngine/src/scene/GUI/widget/window/Window.cpp | C++ | cpp | 4,793 | permissive | #include <GL/glew.h>
#include <memory>
#include <utility>
#include "UrchinCommon.h"
#include "scene/GUI/widget/window/Window.h"
#include "scene/InputDevice.h"
#include "utils/display/quad/QuadDisplayerBuilder.h"
namespace urchin
{
Window::Window(Position position, Size size, std::string nameSkin, std::string string... |
62dcc7645f5b947e9450cfc8aac00c3b5c1fba8a | 798a7b6cd9842e2069c303a9cf1f2c5fc84cdba8 | JPenuchot/eve | /test/exhaustive/module/real/core/is_not_finite/regular/is_not_finite.hpp | C++ | hpp | 1,567 | permissive | //==================================================================================================
/*
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
*/
//==================================================================================================
#in... |
0514b5ff193736fa6f04b360ae056452673b47b4 | 7feb2de8a2f05fbb626e7cdf848e306a15f40e84 | Alfenhose/SREProject | /project/Snake/SnakeBody.cpp | C++ | cpp | 576 | permissive | //
// Created by Morten Nobel-Jørgensen on 04/09/2017.
//
#include "SnakeBody.hpp"
int SnakeBody::totalSnakeBodies = 0;
SnakeBody::SnakeBody(int x, int y) {
this->x = x;
this->y = y;
totalSnakeBodies++; // incremented every time a new SnakeBody is created
}
SnakeBody::~S... |
c7451648898e9b009085a37a150cef4f255b6354 | a2639acdf3b86ec7df051c4f3a59d3daf1fc561a | LiamTyler/Progression-old | /src/mesh.cpp | C++ | cpp | 1,398 | permissive | #include "include/mesh.h"
Mesh::Mesh() : Mesh(
0,
0,
nullptr,
nullptr,
nullptr)
{
}
Mesh::Mesh(unsigned int numV, unsigned int numT, glm::vec3* verts,
glm::vec3* norms, glm::ivec3* indices) : Resource(-1) {
numVertices = numV;
numTriangles = numT;
vertices =... |
11d8d0abef2695e53cf89e26076ce8231d0ec062 | 0476d8bb86c9dcc04324711aec9b0b6c2a40c4e6 | vincentma0001/vmTools | /vmCmds/src/CCmdFrame.cpp | C++ | cpp | 1,500 | permissive | /////////////////////////////////////////////////////////////////////////////////////////
//
// File name : CCmdFrame.cpp
// Version : 0.0.0.0
// Brief :
// Author : v.m.
// Create time : 2020/04/20 09:33:44
// Modify time : 2020/04/20 09:33:44
// Note :
//
//////////////////////////////... |
9ad407aa641ea1f758a1108f718337ba149193b1 | 895f1853b0802e0f837f46c46f97de8f0c534d5e | katik/naali | /src/EntityComponents/EC_PlanarMirror/EC_PlanarMirror.cpp | C++ | cpp | 6,475 | permissive | /**
For conditions of distribution and use, see copyright notice in LICENSE
@file EC_PlanarMirror.cpp
@brief Enables one to create planar mirrors. */
#include "Math/MathFwd.h"
#include "EC_PlanarMirror.h"
#include "OgreRenderingModule.h"
#include "Renderer.h"
#include "OgreWorld.h"
#include "Framewo... |
d32e47a66eb558f70d035aaa0ee5649c730398cc | b7b9fe248016ec4bfb18380e9899bbc8469e37a8 | makarenk0/SFML2dGame | /SFML2dGame/QuickMenuBar.cpp | C++ | cpp | 1,149 | no_license | #include "QuickMenuBar.h"
#include <iostream>
QuickMenuBar::QuickMenuBar(GameDataRef data) : _data(data)
{
canvas.create(quickMenuSpriteW, quickMenuSpriteH);
canvas.clear(sf::Color::Transparent);
playButton = sf::Sprite(_data->asset.getTexture("Play Button"));
playButton.setPosition(5, 10);
canvas.draw(pl... |
76390d2a0f55122571730e0a4333a9682b801896 | 4b22371bfec72461f5230cfa4b58f3f55a8d38e6 | jaccen/OpenGLFramework02 | /OpenGL_Framework/OpenGL_Framework/Projects/Sources/C++/Game/ConnectWars/NormalBombChargeEffect.cpp | C++ | cpp | 5,199 | no_license | /* ヘッダファイル */
#include "NormalBombChargeEffect.h"
#include "../../Library/Debug/Helper/DebugHelper.h"
#include "../../Library/Random/RandomGenerator.h"
#include "../../Library/Particle/System/Manager/ParticleSystemManager.h"
#include <sstream>
//-------------------------------------------------------------
//!
//! @b... |
5204044478d78de24374bb5ca1a1da4dc04be87d | 9321a3d0f5a18cd44119c6c7fc8cf7124b47f138 | iamishansharma/Competitive-Programming | /CodeChef/Easy/attic.cpp | C++ | cpp | 724 | no_license | #include <bits/stdc++.h>
#define fastIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
typedef long long int ll;
using namespace std;
void solve()
{
string s;
cin>>s;
vector<int> v;
int i=0;
while(i < s.length())
{
int count = 0;
int j=i;
while(s[j] != '#')
{
count++;
j++;
}
... |
a254cec5c3b8f07bf422c75d19cc60e7763b4d81 | d77816cb0a687f7a77e1dff1ed9cbeb05f4497e7 | soarqin/sdlretro | /src/drivers/sdl2/sdl2_video.cpp | C++ | cpp | 28,373 | permissive | #include "sdl2_video.h"
#include "sdl2_ttf.h"
#include "driver_base.h"
#include "logger.h"
#include "cfg.h"
#include "helper.h"
#include "core.h"
#include <glad/glad.h>
#include <SDL.h>
namespace drivers {
inline uint32_t compile_shader(const std::string &vertex_shader_source,
con... |
64c7d6bc01e95cd55749984aef225a696c7e2cc6 | 88349829b68ee197bb9fce4d2b294634773d5fd0 | SLMRukais99/chromium | /components/arc/session/arc_vm_client_adapter.cc | C++ | cc | 49,213 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/arc/session/arc_vm_client_adapter.h"
#include <inttypes.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <time.h>
#include <u... |
cecacbe582931be791a053f27d387f9e29f56417 | e2d9899502920b0f0c62a4bbbe77166d21266e43 | niansa/xtd | /examples/xtd.forms.examples/hello_worlds/hello_world_label/src/hello_world_label.cpp | C++ | cpp | 633 | permissive | #include <xtd/xtd>
using namespace xtd;
using namespace xtd::drawing;
using namespace xtd::forms;
namespace examples {
class main_form : public form {
public:
main_form() {
text("Hello world (label)");
controls().push_back(label);
label.dock(dock_style::fill);
label.font(drawing::font... |
5e76cdfb30bb2faad7e16328c2ec110bc5e752f0 | ed6c3bd248408510205d750f4a0bc33db7fda3ac | vazj/osockets | /src/imp/mutex.cpp | C++ | cpp | 1,419 | no_license | /***********************************************************
* osockets
***********************************************************/
/**
* @file mutex.cpp
* @brief Mutex class implementation
* @author Kamil Wiatrowski
* @date 06-May-2011
*/
#include "imp/mutex.h"
namespace o... |
9d77792afc8397f00f09aa4a672721568470f964 | a00cd4ebfd343da0d2026d459240636ab42372c1 | vikram-rathore1/competitive_programming | /experiments/test_gate.cpp | C++ | cpp | 322 | no_license | #include <bits/stdc++.h>
using namespace std;
class LogicGate {
};
class AndGate: public LogicGate {
};
class OrGate: public LogicGate {
};
int main() {
OrGate og;
AndGate ag;
vector<LogicGate*> inputs_for_and;
inputs_for_and.push_back(&og);
//ag.set_inputs(inputs_for_and);
return 0;
... |
16831abaae677ef982c7133043a3cc30a7cceee2 | 58d66e9a6cd04412caae6aed42a9d704b259ea41 | hissamus/workspace | /Firewall/FirewallApp.cpp | C++ | cpp | 4,199 | no_license | /*
Name: FirewallApp.cpp
Copyright: Jesús Oliva
Author: Jesús Oliva (jeoliva@telefonica.net)
Date: 25/09/03 20:19
*/
// FirewallApp.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "FirewallApp.h"
#include "MainFrm.h"
#include "FirewallAppDoc.h"
#include "FirewallAppVie... |
52ae9dee599dded89fafcdf054840492d9ff767d | e8d5a5aa358066c31c02bae65e25275bba942afe | Pneumo/AxisJoystick | /src/AxisJoystick.cpp | C++ | cpp | 2,422 | permissive | /**
The class implements a set of methods of the AxisJoystick.h
interface for working with a joystick controller.
https://github.com/YuriiSalimov/AxisJoystick
Created by Yurii Salimov, February, 2018.
Released into the public domain.
*/
#include "AxisJoystick.h"
AxisJoystick::AxisJoystick(
const int SW_pin,
... |
0804a149eebde08b7a69be8242f14c92ac1481ea | 190f1cfa1a017631b31881eb2a8c72b9e171810f | G159w/TigerCompiler | /src/ast/let-exp.hh | C++ | hh | 700 | no_license | /**
** \file ast/let-exp.hh
** \brief Declaration of ast::LetExp.
*/
#pragma once
#include <ast/decs-list.hh>
#include <ast/exp.hh>
#include <misc/contract.hh>
namespace ast
{
/// LetExp.
class LetExp : public Exp
{
public:
LetExp(const Location& location, DecsList* dec, Exp* exp);
virtual ... |
6de6615830a5e683fbc928437c2c06edfaa8ae15 | 15b51c1d8b2ebb790f0fbebe777d6d2117f73609 | zaid-khan/Process-Scheduling-in-C-CPP | /RoundRobinFixedInterval.cpp | C++ | cpp | 28,903 | no_license | //ROUND ROBIN - TIME QUANTUM
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <stdbool.h>
#include <iostream>
#include <random>
#include <map>
using namespace std;
const int BURSTRANGE = 4;
const int ARRIVALRANGE = 3;
const int NOFBURST = 8;
const int NOOFPROCESSES = 10;
const int RRQU... |
31b4de2e4d613b7ea98bbd34fe0af859e2cfebeb | 22eba5fcc6a1911187d449e11f1dbd688b66e536 | ALEHACKsp/RoCo-SDK | /SDK/RoCo_MovieSceneTracks_functions.cpp | C++ | cpp | 11,382 | no_license | // Rogue Company (0.60) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "RoCo_MovieSceneTracks_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//---------------------------------------------------------------------------
// Function... |
b69b27e0b518cc874fb21b292244b297acfb02e9 | 68c1c1e33dde863726b9a5f66c4d1716be8637d6 | da-nie/ShadowMaker | /main.cpp | C++ | cpp | 1,196 | no_license | #include <windows.h>
#include <math.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "copengl.h"
//------------------------------------------------------------------------------
extern HINSTANCE hProjectInstance;
#include "cwnd_main.h"
//-------... |
ba02fcaee2699d45732b3b7f5f7bd5ee02f85bfa | 8bbfed1203f9a1f1b3a41e6a4770b63486417746 | tarek99samy/Datastructure-project | /Restaurant/Rest/Restaurant.cpp | C++ | cpp | 8,038 | no_license | #include <cstdlib>
#include <time.h>
#include <iostream>
using namespace std;
#include "Restaurant.h"
#include "..\Events\ArrivalEvent.h"
Restaurant::Restaurant()
{
pGUI = NULL;
}
void Restaurant::RunSimulation()
{
pGUI = new GUI;
PROG_MODE mode = pGUI->getGUIMode();
switch (mode) //Add a function for each ... |
6a10b296e6b1dc913b1870e9d5c320dbc7f60a50 | 8f7ddc278f1b06ee2cc4202a3f5404a267a58066 | zhaoqike/Android-Augmented-Reality | /jni/Model/triangle.cpp | C++ | cpp | 2,150 | no_license |
#include "triangle.h"
#include <assert.h>
#include "mesh.h"
// retrieve vertices as an array of floats
const float* triangle::getVert1() {return (_mesh->getVertex(_vert1)).getArrayVerts();}
const float* triangle::getVert2() {return (_mesh->getVertex(_vert2)).getArrayVerts();}
const float* triangle::getVert3() {ret... |
26a1c81cffd65df429565d8a3172d468fdd3d2b2 | cb3c6bcec54d30f4081d0743a3dd03023501fc4d | ddemidov/viennacl-dev | /viennacl/scheduler/execute_generic_dispatcher.hpp | C++ | hpp | 5,276 | permissive | #ifndef VIENNACL_SCHEDULER_EXECUTE_GENERIC_DISPATCHER_HPP
#define VIENNACL_SCHEDULER_EXECUTE_GENERIC_DISPATCHER_HPP
/* =========================================================================
Copyright (c) 2010-2014, Institute for Microelectronics,
Institute for Analysis and Scientific ... |
8a620d49671a021065a833e5de36d9dd35406377 | 74e0f57aed92c12820f5e015a6916f8ea6865d13 | jimgao1/competitive-programming | /DMOJ/gcc16p1.cpp | C++ | cpp | 1,631 | no_license | #include <bits/stdc++.h>
#define MAXN 100010
#define ll long long
using namespace std;
int N, A, C, dstream[MAXN], dbusy[MAXN];
vector<int> points;
map<int, int> dict;
vector<pair<int, int>> stream, busy;
void compress(){
sort(points.begin(), points.end());
points.erase(unique(points.begin(), points.end()),... |
d620552f050772e1236a298b762e644b0e7a8ca0 | e79b6652db768c6a78ded6a527a5a74a55c17816 | Dennis-van-Gils/DvG_Arduino_lock-in_amp | /mcu_doc/SAMD_ADC_DMAC/main_cpp_of_ADC_DMAC_example_CortexM0.cpp | C++ | cpp | 9,043 | permissive | /**
* \file
*
* \brief Application implement
*
* Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.
*
* \asf_license_start
*
* \page License
*
* Subject to your compliance with these terms, you may use Microchip
* software and any derivatives exclusively with Microchip products.
* It is you... |
cf19e42a889fe83f24ae9ef5e0f58f16a96c5ce9 | 91cadb4892aeb656b9441600a852acd89e06d0fc | Deba101/Spectrum_Enforcement | /examples/classes.cpp | C++ | cpp | 3,361 | no_license | // illustrate use of process classes and simulate an M/M/1 queue
// (an open queue with exponential service times and interarrival intervals)
#include "cpp.h"
#include <stdio.h>
FILE *fp;
#define SVTM 1.0 /*mean of service time distribution */
#define IATM 2.0 /*mean of inter-arrival time distribution */
#define NAR... |
e535700baf5432cf227f132e9cddcb81796d2441 | 473c98b2834fe3a5937c08ef190779494c98fa64 | mashoujiang/openvino | /ngraph/test/onnx/onnx_import_const_folding.in.cpp | C++ | cpp | 3,544 | permissive | // Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <memory>
#include "default_opset.hpp"
#include "gtest/gtest.h"
#include "ngraph/file_util.hpp"
#include "ngraph/op/util/op_types.hpp"
#include "ngraph/pass/constant_folding.hpp"
#include "ngraph/pass/manager.hpp"
#include ... |
42296eda74832efdfed76cd2f938bf7c59bfbf78 | eda4fbf651a37f5495b4efcb02ad874fbe425705 | choreonoid/choreonoid | /src/MulticopterPlugin/FFCalc_INormalizedFunction.cpp | C++ | cpp | 1,807 | permissive | /**
@author Japan Atomic Energy Agency
*/
#include "MulticopterPluginHeader.h"
namespace Multicopter {
namespace FFCalc {
namespace
{
double findParameter (std::function<double(double)> func, double x1, double x2, double ydest)
{
double y1 = func(x1);
double y2 = func(x2);
for (int count=0; count<10; ++... |
2049f4571723ad3542cc011e917c5e4455b36ef3 | 7e6c0a3f5e1668f0d0e09befca2d8aa0ea9a3a29 | nenuon/CompetitiveProgramming | /Atcoder/ARC057/B4.cpp | C++ | cpp | 1,219 | no_license | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <lim... |
91153065bd7fd99e7cfb52e48967f7cddee23cc6 | 79862feb724496f9b4d4444268f2d2e9c8218752 | fusijie/LearnOpenGL | /LearnOpenGL/50_offScreenMMSA/main.cpp | C++ | cpp | 11,399 | no_license | //
// main.cpp
//
// Created by 傅思杰 on 2020/4/3.
// Copyright © 2020 傅思杰. All rights reserved.
//
#include <iostream>
#include <glad/glad.h>
#include <glfw/glfw3.h>
#include <stb/stb_image.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "common/Utils.h"... |
dc3c9f6cd318f3ff500c17324c706364bca93752 | a2cdad33f5f8d004d6fe8aed066b1809826256d1 | cnovel/kfusion | /test.cpp | C++ | cpp | 7,752 | permissive | /*
Copyright (c) 2011-2013 Gerhard Reitmayr, TU Graz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publi... |
da91283fae1e6a3de22b765d7c13ce8804e67bed | 791b4c260a5522dffb2998a78c0f12e9f2021846 | eirbot/eirbot2018-1A | /software/nucleo_sir/config.hpp | C++ | hpp | 1,409 | permissive |
#ifndef NUCLEO_SIR_HPP
#define NUCLEO_SIR_HPP
#define SIR 2
/* == Software paramters == */
/* Speed PID */
#define PERIOD_PID (0.0052f)
#define PERIOD_POS (0.00004f)
#define NB_COEF_ERR 4
#define NB_COEF_SP 3
#define K1_ERR_L (0.002996f/2.4f)
#define K2_ERR_L (0.005659f/2.4f)
#define K3_ERR_L (0.003105f/2.4f)
#def... |
4e73a18c19e05c8452e98abd261da4670c485275 | d42f670a116b7ae98cb0e04c045ec0c3c82cdea5 | hi2tamzid/Outsbook | /C++/10151 - Is It Square.cpp | C++ | cpp | 1,158 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--)
{
int n, m, a[30] = {0}, total = 0;
cin >> n >> m;
char aa;
for(int i = 0 ; i < n ; i++)
{
for(int j = 0 ; j < m ; j++)
{
... |
1fcea9914c5aa087b9b62685ab80f22ebb3e26a3 | f630e65099b8c254f1437dc77db75be2e7e42311 | ABHISHEK-G0YAL/Competitive-Programming | /contests/Saturnalia_2019/SAT102.cpp | C++ | cpp | 757 | no_license | // https://www.codechef.com/SATA2019/problems/SAT102
#include <bits/stdc++.h>
using namespace std;
int main() {
int t, n, m;
cin >> t;
while(t--) {
cin >> n >> m;
vector<vector<int> > grid(n, vector<int>(m));
for(auto &v : grid)
for(auto &i : v)
cin >> i... |
07ac3c70bdf1f46c906486b25485c0c789e534d1 | 94613ad1deb2cd915e7b78af557ae83ea7f68963 | dr3mro/mountain | /main.cpp | C++ | cpp | 254 | no_license | #include <QApplication>
#include "guiserver.h"
#include "kernel.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setQuitOnLastWindowClosed(false);
Kernel K;
GuiServer Gui(K); Q_UNUSED(Gui)
return a.exec();
}
|
1628be5b39bdc9e115da68d12bec08de12bbd96c | 825d2d46923bbf8c3f317664f82f3c480fe78214 | danilrafiqi/belajarcplusplus | /Bagian 044 Pem Modular.cpp | C++ | cpp | 348 | no_license | #include<iostream>
using namespace std;
int panjang,lebar,luas;
main()
{
cout<<"Input panjang"; cin>>panjang;
cout<<"Input lebar"; cin>>lebar;
int luas_segiempat;
luas=luas_segiempat(int panjang, int lebar);
cout<<luas;
}
int luas_segiempat(int P, int L)
{
int hasil;
int P,L;
main()
hasil =... |
e78059d37193a1d5fa67253a43310e8cf60bcabc | 4eff79d3989047d70a8357013ab3e9c46b7b0a69 | Touhidul121/All_code2 | /The 81 part2/Linked_list_using_stl.cpp | C++ | cpp | 1,387 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
//declaration---------
list<int> l;
//create_list---------
cout<<"Enter the size"<<endl;
int n,a;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>a;
l.push_back(a);
}
//---------Inserting to the front--------
l.... |
b673fd78bc26f06911d0e283935659893268717a | 09f1f0f6d24b0c52b0d56f5036f58f2d3c9bc5e9 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function13846/function13846_schedule_25/function13846_schedule_25.cpp | C++ | cpp | 727 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function13846_schedule_25");
constant c0("c0", 256), c1("c1", 128), c2("c2", 1024);
var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i01("i01"), i02("i02"), i03("i03"), i04("i04"), i05("i05"),... |
6d85310927d9dedb5524bf2f361dd12401f357f3 | bada417532f80b6419e71d3ba5b343210c98ec06 | dannielliu/mirror | /src/EpamPrimaryGeneratorMessenger.cc | C++ | cc | 3,659 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
3954c0c74b903f84a9a571fce3cf3b6ff496090a | c41e0c3b708643c8e313e5b26df069596d238fca | YashTrikannad/planner_library | /map_generation/tests/test_map_generator.cpp | C++ | cpp | 550 | no_license | //
// Created by yash on 8/4/19.
//
#include "../random2d_map_generator.h"
#include "../../common/visualization_utility.h"
#include "convert.h"
int main()
{
// Define Map Generator Object
pl::map::ConstraintMapGenerator<size_t, 0, 1> map_generator;
// Generate a Map
map_generator.generate_map(100, 10... |
d050d39c3c6d2c6e40ec3f383bf66bb38abfb710 | 8218336c9f166bc7b94241780fdb017603584b72 | thormuller/yescoin2 | /src/qt/editaddressdialog.cpp | C++ | cpp | 3,937 | permissive | // Copyright (c) 2011-2013 The Yescoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "editaddressdialog.h"
#include "ui_editaddressdialog.h"
#include "addresstablemodel.h"
#include "guiutil.h"
#includ... |
e9585f15e978760ffba990b2297e3372880f8f6e | 59bbf6724a01173913b080a4b09bb5e223189f6c | juliasanchez/toolbox_pcl | /trimming/main.cpp | C++ | cpp | 2,266 | no_license | //ROUTINE TO REGISTER 2 POINTCLOUDS
#include <pcl/filters/conditional_removal.h>
#include <pcl/filters/passthrough.h>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/common/common.h>
#include <pcl/filters/uniform_sampling.h>
// PCL INCLUDES
typedef pcl::PointXYZ pcl_point;
//..................... |
12fdf0bbda29560518342d5137679be5d5f8d401 | cbf77a8ec916dd7f840459dddf063fd0fd5422a1 | sdecoder/geeksforgeeks | /matrix/inplace-rotate-square-matrix-by-90-degrees.cc | C++ | cc | 1,612 | no_license | // C++ program to rotate a matrix by 90 degrees
#include <bits/stdc++.h>
#define N 4
using namespace std;
void displayMatrix(int mat[N][N]);
// An Inplace function to rotate a N x N matrix
// by 90 degrees in anti-clockwise direction
void rotateMatrix(int mat[][N]) {
// Consider all squares one by one
for (int x ... |
848f2cb76e4be1c8292cd0d00a59478ac6bbba24 | 06a645f3a9b541f8cfad1a51436b41a4021bca2e | ffaawgh/University | /Algorithms/1/Integral.hpp | C++ | hpp | 1,105 | permissive | //
// Created by ed on 10.02.17.
//
#ifndef INTEGRAL_INTEGRAL_HPP
#define INTEGRAL_INTEGRAL_HPP
#include <functional>
#include <algorithm>
#include <type_traits>
namespace Solver {
namespace Integral {
/**
* @brief Calculates an integral by trapezium method
* @tparam T Arithmetic type
* @param func The i... |
3d64d227be4b2a080929c682afe67768d831bfe9 | e178511bee39ff5413e81b14b51002ba808f6f53 | akin666/bolt | /lib/core/resource/dictionary.hpp | C++ | hpp | 1,031 | no_license | /*
* dictionary.hpp
*
* Created on: 26.1.2012
* Author: akin
*
* Service to create unique ID's to aliases.
* Service also includes the service to keep alias-paths.
*/
#ifndef DICTIONARY_HPP_
#define DICTIONARY_HPP_
#include <common>
#include <string>
namespace bolt
{
namespa... |
66a84e9a96907ae256f30f476d64ded029731743 | 2eca234f96e0c24e16eb83c927c3d8c4de920569 | moriarty0405/POJ_Moriarty_Xu | /2952/main.cpp | C++ | cpp | 1,532 | no_license | #include <iostream>
#include <cstring>
#define MAX 61
using namespace std;
char * multiply(const char * strNum1, const char * strNum2)
{
int len1, len2, num1[MAX], num2[MAX], result[MAX], k = 0;
char * r = new char[MAX];
len1 = strlen(strNum1);
len2 = strlen(strNum2);
memset(num1, 0, MAX);
memset(num2, 0, MAX);... |
1de45f0563f38bd69cbb3e612c97ee44d2a0c019 | f90a1b4bb83f925c45676cda051bc1412319ca49 | WarfareCode/afit-swarm-simulation | /OpenEaagles/src/simulation/Gps.cpp | C++ | cpp | 3,189 | no_license | //------------------------------------------------------------------------------
// class: Gps
//------------------------------------------------------------------------------
#include "openeaagles/simulation/Gps.h"
namespace Eaagles {
namespace Simulation {
//=======================================================... |
bae1b3ee70fa542ef9aa4517e948f1ab26e70b8d | 6f33a6a589568120629b4e1c5d41321429d22fff | alexmasterblack/ECS_OpenGl_Comp | /ECS_OpenGl/ECS_OpenGl.cpp | C++ | cpp | 380 | no_license | #include <iostream>
#include <GL/glew.h>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include "ecs/Object.h"
#include "ecs/Core.h"
int main()
{
sf::ContextSettings settings;
settings.depthBits = 24;
settings.stencilBits = 8;
settings.majorVersion = 4;
settings.minorVersion = 3;
settings.attributeF... |
1849b8b00edf436c177ae3172fd928dcf91a79c9 | 227ffbf34c79a8ba8ed5daaf0eeca7b42a9b18d8 | chorman0773/chromium | /chrome/browser/ui/webui/settings/people_handler_unittest.cc | C++ | cc | 43,885 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/settings/people_handler.h"
#include <memory>
#include <string>
#include <vector>
#include "base/bind.h"
#include "base... |
d7878a669020308f8bda0592f20877f90ac2cdfd | a2e797972787585cddcedc0a75a46824fd3f925b | dmerkushov/nanoservices | /ns-skeleton/src/NsSkelRpcReplier.cpp | C++ | cpp | 734 | permissive | /*
* Copyright 2019 dmerkushov.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
0659f24161af1683774f018166202c2a000a5904 | a47103734fe88c324093ac526d2dd066ca385c64 | iridium-browser/iridium-browser | /third_party/libgav1/src/src/obu_parser_test.cc | C++ | cc | 99,286 | permissive | // Copyright 2021 The libgav1 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 law or agre... |
cb6265a3c48f06377633cd08bf9b37871ee6075b | 230eed1c42e23e1b8c592304be82cf33a4b82d22 | dannymato/Renderent | /Sandbox/src/SandboxApp.cpp | C++ | cpp | 5,881 | permissive | #include "Sandbox2D.h"
#include <Renderent.h>
#include <Renderent/Core/Entrypoint.h>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <imgui.h>
class ExampleLayer : public Renderent::Layer {
public:
ExampleLayer() :
Layer("Example"), m_CameraController(1920.0f / 1080.0f, true), m_C... |
0b665d0a94781116de061ee0d64cf18a905de133 | 99cdd1b80ee15c9e617cde442877ab2a5ef60faa | ajfabian/3N1M4-Team-Reference | /code/strings/z.cpp | C++ | cpp | 577 | no_license | /* Z-Algorithm
- Recibe una cadena y devuelve un vector en el que cada posicion i
contiene el lcp entre el sufijo de indice cero y el de indice i.
- Tiempo: O(n)
- Not Tested Yet!!!
**/
vector<int> z_function(string& S){
int N = S.size();
vector<int> z(N);
z[0] = N;
for(int i=1, l=0, r=0... |
af42e67160987d7bad60eaf19b187c89ff40dd66 | acb44e1fedee4e0b76ab45ac3a45c8c2a65767e6 | aloeser/hyrise | /src/lib/optimizer/optimizer.cpp | C++ | cpp | 12,350 | permissive | #include "optimizer.hpp"
#include <memory>
#include <unordered_set>
#include "cost_estimation/cost_estimator_logical.hpp"
#include "expression/expression_utils.hpp"
#include "expression/lqp_subquery_expression.hpp"
#include "logical_query_plan/logical_plan_root_node.hpp"
#include "logical_query_plan/lqp_utils.hpp"
#i... |
b4f2a8c2262de31b80f103651f834ae43a8c32c6 | ea268473db5fc544af7922457936980485a54d42 | colin3dmax/SoundFonts | /SoundFontInfoLib/Tag.hpp | C++ | hpp | 1,615 | permissive | // Copyright © 2020 Brad Howes. All rights reserved.
#ifndef Tag_hpp
#define Tag_hpp
#include <string>
namespace SF2 {
/**
Each RIFF chunk or blob has a 4-character tag that uniquely identifies the contents of the chunk. This is also a 4-byte
integer.
*/
class Tag {
public:
Tag(uint32_t tag) : tag_(tag) {}
... |
ec37b634a367cc356c6231fb71a7a381ab8bafc2 | 2b01b329cb1af2597fa76bbc61ffaa6a0de90010 | googleapis/google-cloud-cpp | /google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_client.cc | C++ | cc | 9,306 | permissive | // Copyright 2023 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
50fb53f44a62710de2dcad11867eaaf0235ce1fd | b60f404df95116c626f34214831e93c8d11b1fed | su8/battleship | /src/ui/GameWindow.cpp | C++ | cpp | 2,784 | no_license | //
// Created by bdardenn on 08/09/17.
//
#include <fstream>
#include "GameWindow.hpp"
#include "HiddenGridWindow.hpp"
#include "VisibleGridWindow.hpp"
#include "../controller/PlaceShipsController.hpp"
#include "../controller/DefaultController.hpp"
#include "../controller/FireController.hpp"
#include "../controller/A... |
943d7779a9ce66777e2b61b362f6aff638e48ba8 | 925e2365ebe4776cbe940a7510f77c853f87de37 | Thuandang297/Security-Information | /Ponoalphabetic/Verman_real.cpp | C++ | cpp | 1,277 | no_license | /*
Name:
Author: Dang Ngoc Thuan
Date: 08/08/21 10:31
Description: This is a program to execute CAESAR algorithm when I have learn Sercurity Information, let get check it!
***********************************************CEASAR*********************************************************************
*/
#include<iostre... |
6721c92ac3a241dbdc9ec3dd782a60d9f4877d45 | a7ada510a2b8de1c9a8eff4c49d2b34733ec633b | serge-sans-paille/pythran | /pythran/pythonic/include/numpy/ndarray/sort.hpp | C++ | hpp | 554 | permissive | #ifndef PYTHONIC_INCLUDE_NUMPY_NDARRAY_SORT_HPP
#define PYTHONIC_INCLUDE_NUMPY_NDARRAY_SORT_HPP
#include "pythonic/include/numpy/sort.hpp"
PYTHONIC_NS_BEGIN
namespace numpy
{
namespace ndarray
{
template <class E>
types::none_type sort(E &&expr, types::none_type);
template <class E>
types::none_... |
45deb51838a7989e5dde82b4bdd3a3333869d35f | 0661344d5743f98d0dec328e4bea903420578060 | 1753262762/CPP | /cpp(还没清理)/P1296 奶牛的耳语.cpp | C++ | cpp | 278 | no_license | #include<bits/stdc++.h>
using namespace std;
int n,d,x[100005],sum=2,ans=0;
int main()
{
cin>>n>>d;
for(int i=1;i<=n;i++)cin>>x[i];
sort(x+1,x+n+1);
for(int i=1;i<=n;i++)for(int j=i+1;j<=n;j++)if(x[i]+d>=x[j])ans++;else break;
cout<<ans<<endl;
}
|
1d17d59e936ad2285674320d3c717ff79c9da943 | 1671e79ace7a02ce736c843c68ae9eace9663d98 | TeamTrickle/Trickle | /trickleLibrary/OG2D/src/OGSystem/Easing/easing.hpp | C++ | hpp | 6,635 | no_license | #pragma once
#define _USE_MATH_DEFINES
#include <math.h>
class Easing
{
private:
float cnt;
bool toplay = false;
public:
enum Name
{
Back,Bounce,Circ,Cubic,Elastic,Expo,Linear,Quad,Quart,Quint,Sine
};
enum Mode
{
In,Out,InOut
};
Easing() { cnt = 0; this->toplay = true; };
void Init() {
cnt = 0;
toplay... |
0e4ff2d7710b0d73c1250af40b2361e8229cd101 | 59ffd5bddf5aaac03bb112e6e8fea20828928df9 | snape/AVO2 | /src/Line.cc | C++ | cc | 1,152 | permissive | /*
* Line.cc
* AVO2 Library
*
* SPDX-FileCopyrightText: 2010 University of North Carolina at Chapel Hill
* SPDX-License-Identifier: Apache-2.0
*
* 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 Li... |
9f5e02c1fa166b2efe9a6847c22f6745b92d2c9d | dcfdcb59bf1aea1ee92f8f32c8d60a5a4bd98dfa | dangermanGls/Lwdp | /Lwdp/code/LwApiLib/ComLib/Zmq/options.hpp | C++ | hpp | 4,114 | no_license | /*
Copyright (c) 2009-2011 250bpm s.r.o.
Copyright (c) 2007-2009 iMatix Corporation
Copyright (c) 2011 VMware, Inc.
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the ter... |
6873b3f77b876765323033c142535dda0e6c7fbc | d78547e5eb07dc3764083206d106f2e190d5af32 | n-inja/kyoupro | /src/abc/018/abc18c.cpp | C++ | cpp | 1,368 | no_license | #include<iostream>
#include<fstream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<math.h>
#include<algorithm>
#include<iomanip>
#include<set>
#include<utility>
using namespace std;
typedef struct {
int y, x, k;
} Node;
bool operator>(const Node &lhs, const Node &rhs) {
return lhs.k ... |
1a71b3159a0643e9cbaabbc1295ea5187301602a | 822f305176101aba1c7f56bd9bff640671a3c484 | DIT4FUN/chromium | /gpu/ipc/service/gpu_watchdog_thread_v2.cc | C++ | cc | 27,287 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "gpu/ipc/service/gpu_watchdog_thread_v2.h"
#include "base/atomicops.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/... |
ee4a3f633e5180fbea21a4d62010ae1e2adac2f3 | e2ee0b2a8b3eac172afc4e4a5fb400d97c82b88c | Tangjiahui26/CrackingCode | /StacksAndQueues/StackOfPlates/main.cpp | C++ | cpp | 2,302 | no_license | #include <iostream>
#include <stack>
#include <climits>
#define MAXSIZE 20
using namespace std;
class MyStack {
stack<int> mystack;
public:
void push(int e){
mystack.push(e);
}
int pop(){
if (!mystack.empty()) {
int k = mystack.top();
mystack.pop();
... |
512903279d867e1543a02c4e03e1269d461ad5d8 | 1d48b529aacd460ec3e4ccd3b41a87ec543d473f | PhoenixGS/Test | /Test000049.cpp | C++ | cpp | 216 | no_license | #include <cstdio>
int f[300];
int main()
{
f[0] = 1;
f[1] = 1;
for (int i = 2; i <= 300; i++)
{
f[i] = f[i - 1] + f[i - 2];
}
int x;
while (scanf("%d", &x) == 1)
{
printf("%d\n", f[x]);
}
return 0;
}
|
563836bcfd7532b331a6dae6ead5de31de513460 | 6cc9cfc1a53c193d1257c2af0fe92120cd1c4742 | lineCode/imtoolkit | /src/canvas/test/test_cairo_context.cpp | C++ | cpp | 3,905 | permissive | /*
* test_cairo_canvas.cpp
*
* Created on: Dec 03, 2020 21:27
* Description:
*
* Copyright (c) 2020 Ruixiang Du (rdu)
*/
#include <memory>
#include "canvas/im_canvas.hpp"
#include "canvas/cairo_context.hpp"
using namespace rdu;
struct DrawArc : public ImCanvas {
DrawArc() {
ctx1_ = std::make_shared<Cai... |
bbf65f06ed3f773b3d593d653cd9825a85365be6 | 646e260d1f4a78c37fc08d70e1b99319b58464ce | xzabg/faster-rcnn-cpp | /caffe/util/io.hpp | C++ | hpp | 5,576 | no_license | #ifndef CAFFE_UTIL_IO_H_
#define CAFFE_UTIL_IO_H_
#ifdef _MSC_VER
#include <io.h>
#include <direct.h>
#else
#include <unistd.h>
#endif
#include <string>
#include "google/protobuf/message.h"
#include "hdf5/hdf5.h"
#include "hdf5/hdf5_hl.h"
#include "caffe/blob.hpp"
#include "caffe/caffe_common.hpp"
#include "caffe/pr... |
37cd74bc03f3db419a7b435f3ccd068f4b768112 | ee3da53eebf98a682b34c2762804d874b574055b | WuLC/LeetCode | /Algorithm/C++/996. Number of Squareful Arrays.cc | C++ | cc | 1,106 | no_license | /*
* Created on Sun Mar 03 2019 23:11:14
* Author: WuLC
* EMail: liangchaowu5@gmail.com
*/
// graph, dfs with counter to deal with duplicate elements
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
class Solution {
public:
int numSquarefulPerms(std::vector<int>& A) {
c... |
e3166dfeb39fcab7dfefba37e9cb02c990950a30 | 58bf0a5b786e33c5ff25c45deb79e97c64e0f2f2 | twinone/upc | /fib-pro1/jutge/consolidation2/src/RomanNumbers2.cc | C++ | cc | 1,105 | no_license | #include <iostream>
/**
Statement:
Write a program that reads Roman numbers and prints their values.
Input
Input consists of several Roman numbers, as explained in the exercise P18298: “Roman numbers (1)”. Every number ends in a period.
Output
For each Roman number, print its value.
*/
using namespace std;
int ... |
81c3be45fd1fabd80b47e4b12b1db92b1637db5b | 67bc7825a6709c72f98a6a85d31d89ce0e7ab895 | saikpr/short_codes | /cpp/interview_practice/rotate_matrix.cpp | C++ | cpp | 1,061 | no_license | /*input
3
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
*/
#include <iostream>
#include <climits>
#include <vector>
using namespace std;
void rotate(vector<vector<int> > &arr);
void print_matrix(vector<vector<int> > &arr)
{
int n = arr.size();
// cout<<n<<endl;
for(size_t i = 0 ; i < n ; i++)
{
for(size_t j = 0 ; j < n... |
a3ced8e43fae16a85295507ab48a2c36bd648763 | 84d25a3d55268447a0e439664c5e19255e23ecd4 | Greeeder/Program | /OpenWAM/Source/Extern/TControlFuel.cpp | C++ | cpp | 7,175 | no_license | /*--------------------------------------------------------------------------------*\
==========================|
\\ /\ /\ // O pen | OpenWAM: The Open Source 1D Gas-Dynamic Code
\\ | X | // W ave |
\\ \/_\/ // A ction | CMT-Motores Termicos / Universidad Politecnica Valencia
\\/ \// M odel ... |
eccaa40fa7d7eef97a2570ecfa6146fc3aea5ada | 0a02c9d4b735cb38b6529c70d537e4ec0a528e4c | Sina-mon/code_MPM_Auxetics | /GraphicsEngine_gameLoop.cpp | C++ | cpp | 1,325 | no_license | #include "GraphicsEngine.h"
// ----------------------------------------------------------------------------
void GraphicsEngine::gameLoop(void)
{
int iSimulationStatus = 0;
while(e_GameState != GameState::EXIT)
{
drawGame();
// save snapshot
if(f_Time - f_TimeSnapshot_LastSave > f_TimeSnapshot_Int... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.