text string | size int64 | token_count int64 |
|---|---|---|
#include <iostream>
#include "Account.h"
namespace sict {
Account::Account(double bal) {
if (bal > 0)
bala = bal;
else
bala = 0;
}
bool Account::credit(double add) {
if (add > 0){
bala += add;
return true;
}
else
return false;
}
bool Account::debit(double sub) {
if (sub > 0) {
bal... | 433 | 206 |
#ifndef AMARA_TWEENBASE
#define AMARA_TWEENBASE
#include "amara.h"
namespace Amara {
class Tweener;
class Tween: public Amara::StateManager {
public:
Amara::GameProperties* properties = nullptr;
bool finished = false;
bool deleteOnFinish = true;
doubl... | 851 | 230 |
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <string>
#include <tuple>
std::tuple<int, int> parse_coord (const std::string& str) {
auto idx = str.find(',');
return std::make_tuple(
std::stoi(str.substr(0, idx)),
std::stoi(str.substr(idx + 1)));
}
std::ostream& operat... | 2,138 | 819 |
#include <iostream>
#include <stdlib.h>
#include <iomanip>
/*====================================
* eXcript.com
* fb.com/eXcript
* ====================================*/
using namespace std;
int main() {
//obj cin3
//obj cout
cout << "Estudando a entrada e saida de dados." << endl;
... | 635 | 264 |
#ifndef PATHFINDING_PACMAN_AGENT_HH
#define PATHFINDING_PACMAN_AGENT_HH
#include "../agent.hh"
#include "../../state/direction.hh"
#include "../../pathfinding/bfs.hh"
#include "../../pathfinding/wsp.hh"
#include <cmath>
class Pathfinding_Pacman_Agent: public Agent {
// In this case ghost_id can be ignored
in... | 907 | 328 |
#define PIN_ENA 9 //вывод управления скоростью вращения мотора №1
#define PIN_IN1 10 //вывод управления направлением вращения мотора №1
#define PIN_IN2 11 //вывод управления направлением вращения мотора №1
#define PIN_Left 7 //вход с расбери для скорости
#define PIN_Right 12 //вход с расбери для скорости
#define ... | 4,614 | 1,636 |
#include "stdafx.h"
#include "CppUnitTest.h"
#include "../huffman/bit_string.hpp"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace unit_test_for_huffman
{
TEST_CLASS(unit_test_for_bit_string)
{
public:
TEST_METHOD(ctor)
{
cpr::huffman::BitString<char> b... | 3,971 | 1,344 |
#include "MarbleAction.h"
MarbleAction::MarbleAction(hkpRigidBody* r, const hkVector4& forward, const hkVector4& resetPosition, hkReal impulseScale) : hkpUnaryAction(r), m_forward(forward), m_resetPosition(resetPosition), m_rotationIncrement(0.01f) {
m_forwardPressed = false;
m_backwardPressed = false;
m_leftP... | 2,624 | 1,066 |
#include <Kaleido3D.h>
#include "GLSLangUtils.h"
#include <glslang/MachineIndependent/gl_types.h>
using namespace ::glslang;
using namespace ::k3d;
void sInitializeGlSlang()
{
#if USE_GLSLANG
static bool sGlSlangIntialized = false;
if (!sGlSlangIntialized) {
glslang::InitializeProcess();
sGlSl... | 13,626 | 5,499 |
#include "Pch.h"
#include "Character/Character.h"
#include "Character/Chassis.h"
#include "Data/AugmentData.h"
#include "Data/CharacterData.h"
#include "Data/ComponentData.h"
#include "Data/ChassisData.h"
#include "Data/EquipmentData.h"
#include "Data/UpgradeData.h"
#include "Data/PartData.h"
#include "Parts/Item.h"
#i... | 3,288 | 1,205 |
/******************************************************************************
* _ _____ __________ *
* | | / / _ | / __/_ __/ Visibility *
* | |/ / __ |_\ \ / / Across *
... | 1,699 | 482 |
// Copyright (c) 2017-2021 Chris Ohk
// We are making my contributions/submissions to this project solely in our
// personal capacity and are not conveying any rights to any intellectual
// property of any third parties.
#include <Rosetta/Battlegrounds/Models/Battle.hpp>
#include <effolkronium/random.hpp>
using Ran... | 12,307 | 3,980 |
// Copyright 2015 Patrick Putnam
//
// 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 o... | 1,447 | 500 |
/*
GUIDO Library
Copyright (C) 2004 Torben Hohn
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library ... | 21,839 | 7,637 |
// This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include "swganh/social/social_service.h"
#include "anh/logger.h"
#include "anh/plugin/plugin_manager.h"
#include "anh/service/service_manager.h"
#include "anh/database/database_manager.h"
#... | 2,372 | 749 |
#pragma once
#include <cmath>
namespace utils
{
// TODO remove M_PI and M_2PI replace them with PI and PI2
#ifdef M_PI
#undef M_PI
#endif // M_PI
constexpr double M_PI = 3.14159265358979323846;
#ifdef M_2PI
#undef M_2PI
#endif // M_2PI
constexpr double M_2PI = 2.0 * M_PI;
constexpr double PI... | 388 | 196 |
// MusicXML Class Library
// Copyright (c) by Matthew James Briggs
// Distributed under the MIT License
#include "mxtest/control/CompileControl.h"
#ifdef MX_COMPILE_CORE_TESTS
#include "cpul/cpulTestHarness.h"
#include "mxtest/core/HelperFunctions.h"
#include "mxtest/core/PropertiesTest.h"
#include "mxtest/core/Edito... | 12,071 | 3,678 |
int stringnumber(string s){
int i=0;
int n=s.length();
int face=1;
int answer=0;
for(i=n-1;i>=0;i--){
answer+=(s[i]-'0')*face;
face*=10;
}
return answer;
}
bool isValid(string s){
int i,j;
int n=s.length();
int number;
int start=0;
string temp="";
while(start < n){
... | 1,363 | 554 |
#include "publish_trajectory/publish_trajectory_to_quadrotor.hpp"
namespace hdi_plan {
PublishTrajectory::PublishTrajectory(const ros::NodeHandle &nh, const ros::NodeHandle &pnh)
:nh_(nh),
pnh_(pnh){
arm_bridge_pub_ = nh_.advertise<std_msgs::Bool>("bridge/arm", 1);
start_pub_ = nh_.advertise<std_msgs::Empty>("a... | 5,398 | 2,220 |
// Copyright (c) 2020, Tobias Rapp
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditi... | 14,722 | 5,559 |
#ifndef BOOK_PLAYER_HPP
#define BOOK_PLAYER_HPP
#include <SFML-Book/ActionTarget.hpp> //ActionTarget
#include <SFML-Book/Entity.hpp> //Entity
namespace book
{
class Player : public Entity , public ActionTarget<int>
{
public:
Player(const Player&) = delete;
Player& operator=(con... | 774 | 225 |
#ifndef UTILS_TYPES_H
#define UTILS_TYPES_H
#include <memory>
#include <vector>
#include "../graphs/undirected_weighted_graph.hpp"
struct algo_result {
int minCutVal;
std::vector<bool> cut;
};
struct algo_input {
std::shared_ptr<graphs::weighted_graph> graph;
std::vector<bool> minCut;
int minCutV... | 437 | 178 |
class Solution {
public:
int lengthOfLIS(vector<int>& nums) {
int n = nums.size();
vector<int> dp(n, 1);
int res = dp[0];
for(int i = 0; i < n; i++){
for(int j = 0; j <= i; j++){
if(nums[i] > nums[j]){
dp[i] = max(dp[j] + 1, dp[i]);
... | 422 | 161 |
#include "stdafx.h"
#include <Core/HoldItem.h>
#include <Core/ResNode.h>
void HoldItem::InitNode(suic::IXamlNode* pNode)
{
pNode->Reset();
InitNode(this, pNode);
}
void HoldItem::Clear()
{
for (int i = 0; i < children.GetCount(); ++i)
{
Clear(children.GetItem(i));
}
attrs.Clear();
... | 2,802 | 1,002 |
#pragma once
#include <set>
#include <chrono>
#include "stl.hpp"
#include "stmt.hpp"
namespace mx3 { namespace sqlite {
// single param helpers for sqlite3_mprintf
string mprintf(const char * format, const string& data);
string mprintf(const char * format, int64_t data);
string libversion();
string sourceid();
int li... | 3,708 | 1,222 |
#include "stdio.h"
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string.h>
//#include <math.h>
#include <sstream>
//Use existing lossless compressors
#include "lz4.h"
/*static int * pfs1;
static int dimx1, dimy1, dimz1;
static int header_size1, scalar_fields1;
static double field_len1;*/
// Th... | 14,920 | 5,798 |
/**
* C++ class for a game of the Tower of Hanoi puzzle.
*
* @author
* Wade Fagen-Ulmschneider <waf@illinois.edu>
*/
#include "Game.h"
#include "Stack.h"
#include "uiuc/Cube.h"
#include "uiuc/HSLAPixel.h"
#include <iostream>
using std::cout;
using std::endl;
// Solves the Tower of Hanoi puzzle.
// (Feel free... | 1,263 | 504 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "stdafx.h"
//
// Class to store information about command-line arguments to the host.
//
class CommandLineArguments
{
public:
bool breakOnNextLine;
bool enableDebugging;
bool help;
bool enableConso... | 21,740 | 6,385 |
#ifndef EE_BACKEND_SDL2_WMINFO_HPP
#define EE_BACKEND_SDL2_WMINFO_HPP
#include <eepp/window/backend/SDL2/base.hpp>
#include <eepp/window/windowhandle.hpp>
namespace EE { namespace Window { namespace Backend { namespace SDL2 {
class EE_API WMInfo {
public:
WMInfo( SDL_Window* win );
~WMInfo();
#if defined( EE_X... | 488 | 201 |
// OptFrame - Optimization Framework
// Copyright (C) 2009-2015
// http://optframe.sourceforge.net/
//
// This file is part of the OptFrame optimization framework. This framework
// is free software; you can redistribute it and/or modify it under the
// terms of the GNU Lesser General Public License v3 as published by... | 2,664 | 1,081 |
/**
* @file taskmanager.cpp
* @brief Implementation of TaskManager.h
* @author Frederic SCHERMA (frederic.scherma@dreamoverflow.org)
* @date 2009-10-05
* @copyright Copyright (c) 2001-2017 Dream Overflow. All rights reserved.
* @details
*/
#include "o3d/core/precompiled.h"
#include "o3d/core/taskmanager.h"
#in... | 5,786 | 2,074 |
#include <rosbag/bag.h>
#include <rosbag/view.h>
#include <sensor_msgs/Image.h>
#include <sensor_msgs/CompressedImage.h>
#include <sensor_msgs/image_encodings.h>
#include <cv_bridge/cv_bridge.h>
#include <opencv/cvwimage.h>
#include <opencv/highgui.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>... | 4,325 | 1,689 |
/**
* @file BInteger.cpp
* @copyright (c) 2014 by Petr Zemek (s3rvac@gmail.com) and contributors
* @license BSD, see the @c LICENSE file for more details
* @brief Implementation of the BInteger class.
*/
#include "BInteger.h"
#include "BItemVisitor.h"
namespace bencoding {
/**
* @brief Constructs the int... | 883 | 319 |
/*Criado por Davi Augusto - BCC - UNESP Bauru*/
/*
Resolvido com Backtracking:
1 - "Escolhas"
2 - "Restrições"
3 - "Objetivo"
Escolhas: Colocar dígitos de 0 a 9 na senha com base nas "regras" (# e 0)
Restrições: Regras e o dígito (ex: #0). O '#' ficará a palavra e o dígito '0' os números de 0 a 9. Printar ... | 4,048 | 1,407 |
#include "hunspell/hunspell.hxx"
#include <windows.h>
#include <locale.h>
#include <mbctype.h>
#include "NHunspellExtensions.h"
#include "EncodingToCodePage.h"
#define DLLEXPORT extern "C" __declspec( dllexport )
class NHunspell: public Hunspell
{
// The methods aren't multi threaded, reentrant or whatev... | 10,895 | 4,329 |
/**
* This file defines the "ariel" namespace for the assignment.
* the namespace contains a single function which returns a String representing a modular snowman print.
* each different input ([1-4], LENGTHgth = 8) returns a different snowman.
* each input of 8 numbers in [1-4] represents a sequence of compenents:... | 5,108 | 1,853 |
#pragma once
#include <deip/protocol/base.hpp>
#include <deip/protocol/block_header.hpp>
#include <deip/protocol/asset.hpp>
#include <deip/protocol/eci_diff.hpp>
#include <fc/utf8.hpp>
namespace deip {
namespace protocol {
struct fill_common_tokens_withdraw_operation : public virtual_operation
{
fill_common_token... | 11,886 | 3,487 |
version https://git-lfs.github.com/spec/v1
oid sha256:dc05769835c1662878111c8555c4d59f668a9a3a8ca31f2cb035da4016f33b2e
size 737
| 128 | 92 |
#pragma once
#include <memory>
#include <Core/CoreApi.hpp>
#include <Core/Containers/UniquePointer.hpp>
#define FADE_MAKE_PIMPL \
private: \
class CImpl; \
__pragma(warning(push)) \
__pragma(warning(disable : 4251)) \
TPimpl<CImpl> m_Impl; ... | 1,230 | 456 |
/*!
\file json_value_parser-inl.hpp
\author Sho Ikeda
\brief No brief description
\details
No detailed description.
\copyright
Copyright (c) 2015-2021 Sho Ikeda
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
*/
#ifndef ZISC_JSON_VALUE_PARSER_INL_HP... | 11,108 | 3,537 |
#include "Value.h"
#include <stdexcept>
#include <boost/format.hpp>
#include <cmath>
namespace
{
bool FuzzyEquals(double left, double right)
{
return std::fabs(left - right) >= std::numeric_limits<double>::epsilon();
}
std::string ToPrettyString(double value)
{
std::string result = std::to_string(value);
... | 7,937 | 2,585 |
//
// Created by roundedglint585 on 3/11/19.
//
#include "TotalGeneralizedVariation.hpp"
TotalGeneralizedVariation::TotalGeneralizedVariation(const std::vector<TotalGeneralizedVariation::Image> &images)
: m_images(images), m_result(m_images[0]), m_width(m_result[0].size()), m_height(m_result.size()) {
in... | 4,100 | 1,500 |
// Autogenerated from CppHeaderCreator on 7/27/2020 3:10:45 PM
// Created by Sc2ad
// =========================================================================
#pragma once
#pragma pack(push, 8)
// Begin includes
#include "utils/typedefs.h"
// Including type: System.Object
#include "System/Object.hpp"
// Including type... | 2,254 | 721 |
#ifndef ORNSTEINUHLENBECK_HPP
#define ORNSTEINUHLENBECK_HPP
#include <vector>
namespace bib {
template<typename Real>
class OrnsteinUhlenbeckNoise {
public:
OrnsteinUhlenbeckNoise(uint action_size, Real sigma_=.2, Real theta_=.15, Real dt_=0.01) : x_t (action_size, 0) {
sigma = sigma_;
theta = theta_... | 965 | 434 |
/*
* ----------------------------------------------------------------------------
* Copyright (c) 2014-2015 BigObject Inc.
* All Rights Reserved.
*
* Use of, copying, modifications to, and distribution of this software
* and its documentation without BigObject's written permission can
* result in the violation o... | 1,959 | 761 |
// Copyright 2018 The Chromium OS 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 "shill/dbus/chromeos_modem_simple_proxy.h"
#include <base/bind.h>
#include "shill/cellular/cellular_error.h"
#include "shill/error.h"
#inclu... | 3,171 | 959 |
#include <iostream>
using namespace std;
void draw_characters(int count, char c) {
for (int i = 0; i < count; ++i) {
cout << c;
}
}
void christmas_tree(char main_character, int times) {
for (int row = 1; row <= times; ++row) {
draw_characters(times - row, ' ');
draw_characters(row * 2 - 1, main_cha... | 409 | 163 |
#include "tablemodel.h"
TableModel::TableModel()
{
}
| 55 | 23 |
#include "stdafx.h"
#include "AnimationFactoryReader.h"
#include "FileLogger.h"
#include "LoadContentException.h"
#include "ContentManager.h"
#include "pugixml/pugixml.hpp"
std::shared_ptr<AnimationFactory> AnimationFactoryReader::Read(std::string filePath, ContentManager& contentManager)
{
auto xmlDocument = pugi::x... | 1,640 | 518 |
#include <windows.h>
#include "dynamic_funcs.h"
// Since this code requires Win2000 or later, we'll load it dynamically
static HMODULE dll_gdi32 = 0;
GetGlyphIndicesA_t fGetGlyphIndicesA = 0;
GetGlyphIndicesW_t fGetGlyphIndicesW = 0;
GetFontUnicodeRanges_t fGetFontUnicodeRanges = 0;
void Init()
{
#if... | 929 | 413 |
#ifndef COLORSYMGS_HPP
#define COLORSYMGS_HPP
#include "SparseMatrix.hpp"
#include "Vector.hpp"
#include "KokkosSetup.hpp"
int ColorSYMGS(const SparseMatrix & A, const Vector & x, Vector & y);
#endif | 201 | 82 |
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
#include "pch.h"
TEST_CLASS(CanvasImageSourceUnitTests)
{
public:
TEST_METHOD_EX(CanvasImageSourceConstruction)
{
//
// On constructio... | 26,695 | 7,460 |
#include "Candle.hh"
Candle::Candle(const char* textureUrl, sf::Vector2f position,
float scale, float width, float height, int col, int row,
sf::RenderWindow*& window, b2World*& world) :
GameObject(textureUrl, position, scale, width, height, col, row, b2BodyType::b2_staticBody, window, world)
{
animationsManager = n... | 595 | 206 |
// Fill out your copyright notice in the Description page of Project Settings.
#include "NativeEnemyPlayerStart.h"
| 127 | 40 |
//
// Created by adrian on 11/6/21.
//
#include <list>
#include "examples.h"
int get_number(const string& s, const list<Entry>& phone_book)
{
for(auto p=phone_book.begin();p!=phone_book.end();++p)
if(p->name == s)
return p->number;
return 0; // number not found
}
int main()
{
list<Entry> contacts = {
{"Adri... | 475 | 211 |
#include "argparse.hpp"
#include <iostream>
#include "cxxopts.hpp"
namespace cli
{
RaytracerOptions parseArguments(int argc, char *argv[])
{
RaytracerOptions raytracerOptions;
cxxopts::Options options(argv[0], "A toy raytracer by Nicolas Hollmann.");
options.add_options("General")
... | 2,757 | 811 |
#include "shared.h"
using namespace scene_graph::controllers;
int main ()
{
printf ("Results of fall_test:\n");
try
{
PhysicsManager manager (DRIVER_NAME);
physics::Scene* scene (new physics::Scene (manager.CreateScene ()));
Shape sphere_shape (manager.CreateSphereShape (1.f));
... | 1,638 | 564 |
#include <os.h>
/*
Static objects
*/
Io io; /* Input/Output interface */
Architecture arch; /* Cpu and architecture interface */
Vmm vmm; /* Virtual memory manager interface */
Filesystem fsm; /* Filesystem interface */
Module modm; /* Module manager */
Syscalls syscall; /* Syscalls manager */
Syste... | 351 | 134 |
/*
* Test1.cpp
*
* This file is part of the "MercuriusLib" project (Copyright (c) 2017 by Lukas Hermanns)
* See "LICENSE.txt" for license information.
*/
#include <Merc/Merc.h>
#include <iostream>
#include <cstdlib>
static void PrintHostAddresses(const std::string& hostName)
{
try
{
auto addres... | 4,166 | 1,254 |
#include <ros/ros.h>
#include "stopper.h"
int main(int argc, char **argv) {
// Initiate new ROS node named "stopper"
ros::init(argc, argv, "stopper");
// Create new stopper object
Stopper stopper;
// Start the movement
stopper.startMoving();
return 0;
}
| 272 | 109 |
/// @file
/// @copyright The code is licensed under the BSD License
/// <http://opensource.org/licenses/BSD-2-Clause>,
/// Copyright (c) 2012-2015 Alexandre Hamez.
/// @author Alexandre Hamez
#pragma once
#include <functional> // hash
#include <list>
#include <utility> // forward
#include "s... | 2,588 | 717 |
#define _TCSTYPEINTERFACE_
#include "tcstype.h"
//#include "htf_props.h"
#include "sam_csp_util.h"
#include <cmath>
using namespace std;
/*
************************************************************************
Object: Generic solar model
Simulation Studio Model: Type260
Author: Michael J. Wagner
Date: May ... | 71,675 | 26,251 |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
cam.setDistance(2500);
gui.setup();
gui.add( toggle_0.setup("inside box",false));
gui.add( toggle_1.setup("outside box1",false));
gui.add( toggle_4.setup("outside box2",false));
gui.add... | 5,682 | 1,974 |
//
// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "SimpleBenchmark.h"
#include "BufferSubData.h"
#include "TexSubImage.h"
#include "PointSprites.h"
#include <iostream>
#include <r... | 7,971 | 2,583 |
class Solution {
public:
int minimumDeviation(vector<int>& nums) {
set <int> s;
// Storing all elements in sorted order
//insert even directly and odd with one time multiplication
//and it will become even
for(int i = 0; i<nums.size() ; ++i)
{
... | 1,054 | 305 |
#include "../../SVICores.h"
#include "../../Slide/SVIBaseSlide.h"
#include "../../Slide/SVIProjectionSlide.h"
#include "../../Slide/SVIRenderPartManager.h"
#include "../SVITexture.h"
#include "../SVITextureManager.h"
#include "../SVIProgramManager.h"
#include "../SVIDebugRenderer.h"
#include "../SVIViewport.h"
#incl... | 4,810 | 1,890 |
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
string zad4_3()
{
string line;
vector<string> content;
fstream file("../dane/sygnaly.txt");
// wczytywanie danych z pliku do vectora
if (file.is_open())
{
while (getline(... | 1,415 | 519 |
#include "stdafx.h"
#include "renderer.h"
const char* vertexShaderSource = "#version 330 core\n \
layout (location = 0) in vec3 inputPosition;\
layout (location = 1) in vec3 inputColor; \
out vec3 myColor; \
void main() \
{ \
gl_Position = vec4(inputPosition, 1.0f); \
myColor = inputColor; \
}";
const char* fragmentS... | 3,690 | 1,426 |
#include "stdafx.h"
using namespace std;
bool Pred(const int &i, const int &g)
{
return i == g;
}
int main()
{
system("color 70");
setlocale(0, "Russina");
SetConsoleTitle("034.STL_Unique Unique_Copy");
vector<int> vec{ 1,3,4,4,4,4,67,4,55,2,2,2,2,4,1,5 };
//отсортируем вектор дл¤ стабильной работы алгоритма... | 1,587 | 685 |
#include "windows.h"
#include "../minizip-ng/mz.h"
#include "../minizip-ng/mz_strm.h"
#include "../minizip-ng/mz_zip.h"
#include "../minizip-ng/mz_zip_rw.h"
typedef struct mz_zip_reader_s {
void *zip_handle;
void *file_stream;
void *buffered_stream;
void *split... | 4,639 | 1,932 |
#ifndef ORGANIZATION_MODEL_ORGANIZATION_MODEL_STATISTICS_HPP
#define ORGANIZATION_MODEL_ORGANIZATION_MODEL_STATISTICS_HPP
#include <stdint.h>
#include <base/Time.hpp>
#include <moreorg/organization_model/InterfaceConnection.hpp>
#include <moreorg/organization_model/ActorModelLink.hpp>
namespace owl = owlapi::model;
... | 1,549 | 526 |
class CfgRemoteExec
{
class Functions
{
mode = 2;
jip = 0;
class fnc_AdminReq { allowedTargets=2; };
class ExileServer_system_network_dispatchIncomingMessage { allowedTargets=2; };
class ExileExpansionServer_system_scavenge_spawnLoot { allowedTargets=0; };
};
clas... | 365 | 153 |
#include "game_ui_teleporter.hpp"
#include "../ui_text_element.hpp"
#include "../ui_button.hpp"
#include "../game_ui_manager.hpp"
#include "../../game/items/teleporter.hpp"
#include "../../engine.hpp"
#include "../../game_session.hpp"
#include "../../game/character.hpp"
namespace space
{
void GameUITeleporter::i... | 1,535 | 445 |
#include "L1Trigger/TrackFindingTracklet/interface/Projection.h"
#include "L1Trigger/TrackFindingTracklet/interface/Settings.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <algorithm>
using namespace std;
using namespace trklet;
void Projection::init(Settings const& settings,
... | 5,059 | 1,934 |
/*
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in th... | 1,191 | 431 |
#include <iostream>
#include "code/utilities/program/wrappers/git/lib.hpp"
#include "code/utilities/program/call/lib.hpp"
#include "code/utilities/filesystem/paths/lib.hpp"
#include "code/utilities/program/call/lib.hpp"
#include "code/utilities/random/lib.hpp"
#include "code/utilities/random/files/random_files.hpp"
#in... | 3,514 | 1,275 |
#include <save/save.hpp>
#include <server.hpp>
#include <singleton.hpp>
#include <thread_pool.hpp>
#include <exception>
#include <utility>
using namespace MCPP;
namespace MCPP {
static const Word priority=1;
static const String name("Save Manager");
static const String debug_key("save");
static const String s... | 3,553 | 1,522 |
/* $Id: log.cpp 48725 2011-03-02 21:40:59Z mordante $ */
/*
Copyright (C) 2003 by David White <dave@whitevine.net>
2004 - 2011 by Guillaume Melquiond <guillaume.melquiond@gmail.com>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
This program is free software; you can red... | 4,250 | 1,630 |
#include <map>
#include <string>
#include <vector>
#include "third_party/gflags/include/gflags.h"
#include "third_party/glog/include/logging.h"
// Problem:
// https://leetcode-cn.com/problems/remove-sub-folders-from-the-filesystem/
// Solutions:
// https://leetcode-cn.com/problems/remove-sub-folders-from-the-filesyst... | 2,679 | 1,111 |
// Copyright 2017 Nest Labs, 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 t... | 4,154 | 1,506 |
#include <unistd.h>
#include <cstddef>
#include <set>
#include <string>
#include <vector>
#include "process.h"
#include "processor.h"
#include "system.h"
#include "linux_parser.h"
using std::set;
using std::size_t;
using std::string;
using std::vector;
using std::to_string;
/*You need to complete the mentioned TODOs... | 2,366 | 656 |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FAST1 ios_base::sync_with_stdio(false);
#define FAST2 cin.tie(NULL);
#define allsort(a) sort(a.begin(),a.end())
ll n,k;
void solve(){
cin>>n>>k;
if(k==0){
cout<<"Yes"<<endl;
cout<<0<<endl;
return;
}
if(k%2... | 980 | 421 |
class Solution {
private:
const int invalid = -1;
int getAnswer(vector<int>& answer, vector<int> &nums, int idx) {
int max = 0;
if (answer[idx] != invalid) {
return answer[idx];
}
for (int i = idx + 1; i < answer.size(); ++i) {
if (nums[idx] >= nums[i]) {... | 887 | 285 |
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
#include "ProblemList.h"
/*
*********************
*MADE BY MICHAEL LApAN
*********************
*this program is a help desk mock up
*it proccesses helkp desk tickets,
*sorts and stores them. then shows top
*25 then bottem 25
*/
int main()
... | 837 | 282 |
#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker,"/stack:1024000000,1024000000")
#define db(x) cout<<(x)<<endl
#define pf(x) push_front(x)
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define ms(x,y) memset(x,y,sizeof x)
typedef long long LL;
const double pi=acos(-1),eps=1e-9;
const LL ... | 562 | 315 |
#include "Core/MessageBus.h"
#ifdef TRISTEON_EDITOR
#include "TristeonEditor.h"
#include <ImGUI/imgui_impl_glfw_vulkan.h>
#include "Core/Engine.h"
#include "Core/Rendering/Vulkan/HelperClasses/CommandBuffer.h"
#include "Core/Rendering/Vulkan/RenderManagerVulkan.h"
#include "Asset Browser/AssetBrowser.h"
#include "Scen... | 9,089 | 4,303 |
#include <iostream>
#include "Exer13_28_BinStrTree_point.h"
using std::cout;
using std::endl;
int main()
{
TreeNode t1("t1");
TreeNode t2 = t1;
t1.read(cout) << endl;
t2.write("t2");
t2.read(cout) << endl;
{
TreeNode t3(t2);
t3.read(cout) << endl;
t3.write("t3");
... | 567 | 253 |
//================================================================================
// Copyright (c) 2013 ~ 2020. HyungKi Jeong(clonextop@gmail.com)
// All rights reserved.
//
// The 3-Clause BSD License (https://opensource.org/licenses/BSD-3-Clause)
//
// Redistribution and use in source and binary forms,
// with or ... | 10,622 | 4,642 |
#include "bruneton_probe_renderer.h"
#include "../renderer.h"
#include "../resource_manager.h"
#include "../logger.h"
#define _USE_MATH_DEFINES
#include <math.h>
#include <gtc/matrix_transform.hpp>
namespace nimble
{
// --------------------------------------------------------------------------------------------------... | 11,536 | 4,915 |
/* ---------------------------------------------------------------------
*
* Copyright (C) 2013 - 2021 by the deal.II authors
*
* This file is part of the deal.II library.
*
* The deal.II library is free software; you can use it, redistribute
* it, and/or modify it under the terms of the GNU Lesser Gene... | 18,714 | 9,143 |
#include <iostream>
using namespace std;
//base class
class shape{
protected:
int width;
int height;
public:
void setwidth(int w)
{
width=w;
}
void setheight(int h)
{
height=h;
}
};
//drived class
class rectangle:public shape
{
public:
int get_area(){
re... | 480 | 169 |
//
// https://open.kattis.com/problems/ummcode
#include <vector>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <stack>
#include <cmath>
#include <map>
#include <utility>
#include <queue>
#include <iomanip>
#include <deque>
#include <set>
#define Forcase int __t;cin>>__t;for(int... | 1,405 | 561 |
/**
* \file
* \brief File descriptor wrapper
*
* \date 2018/04/01
* \author Vaclav Krpec <vencik@razdva.cz>
*
*
* LEGAL NOTICE
*
* Copyright (c) 2017, Vaclav Krpec
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provi... | 3,234 | 1,198 |
// Soma de Casas
// https://neps.academy/lesson/173
#include <iostream>
using namespace std;
#define MAXN 100000
int N, K, casas[MAXN];
int busca(int x) {
int ini=0, fim=N-1, meio;
while (ini<=fim) {
meio = (ini+fim)/2;
if (casas[meio] > x) fim = meio-1;
if (casas[meio] < x) ini = meio+1;
if (c... | 611 | 300 |
void add_lane_disturbance_v2(
beacls::FloatVec& lane,
const std::vector<size_t> shape,
beacls::FloatVec range,
beacls::FloatVec gmin,
beacls::FloatVec gmax,
FLOAT_TYPE vehicle_width,
FLOAT_TYPE fill_Value,
size_t dim){
FLOAT_TYPE x_unit = (static_cast<float>(shape[0])-1)/(gmax[0]-gmin[0]);
FLOA... | 2,808 | 1,296 |
#include <atomic>
#include <chrono>
#include <codecvt>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <locale>
#include <mutex>
#include <modbox/log/log.hpp>
static std::recursive_mutex lbfMutex;
std::recursive_mutex logMutex;
static std::wstring cachedLineBegin;
static std::atomic... | 1,619 | 612 |
#include "test.h"
#include "player/PlayFramesAction.h"
TEST(playFramesAction_tests, afterDeclaration){
PlayFramesAction playFramesAction;
playFramesAction.printInfo("pre:");
EXPECT_FALSE(playFramesAction.isActive());
}
TEST(playFramesAction_tests, afterInit){
PlayFramesAction playFramesAction;
RawPoiComman... | 7,173 | 3,022 |
#include <openrave-core.h>
#include <vector>
#include <cstring>
#include <sstream>
#include <stdio.h>
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/format.hpp>
using namespace OpenRAVE;
using namespace std;
int main(int argc, char ** argv)
{
if( argc < 3 ) {... | 1,879 | 705 |
////////////////////////////////////////////////////////////////////////////////
// Filename: BaseWindow.cpp
////////////////////////////////////////////////////////////////////////////////
#include "BaseWindow.h"
#include "imgui.h"
#include "..\imgui_extension.h"
Jani::Inspector::BaseWindow::BaseWindow(InspectorManag... | 16,727 | 5,710 |
#include <lbmemcheck.hpp>
#include <srs_kernel_log.hpp>
#ifndef lbtrace
#define lbtrace srs_trace
#endif
#ifndef lberror
#define lberror srs_error
#endif
lbmemcheck_ctx* g_pmcc = NULL;
lbmemcheck_ctx* lbmemcheck_initialize()
{
lbmemcheck_ctx* pmcc = (lbmemcheck_ctx*)::calloc(1, sizeof(lbmemcheck_ctx));
pmcc->... | 5,000 | 1,996 |