text string | size int64 | token_count int64 |
|---|---|---|
// Ouzel by Elviss Strazdins
#include "core/Engine.hpp"
#include "MainMenu.hpp"
#include "SpritesSample.hpp"
#include "GUISample.hpp"
#include "RTSample.hpp"
#include "AnimationsSample.hpp"
#include "InputSample.hpp"
#include "SoundSample.hpp"
#include "PerspectiveSample.hpp"
using namespace ouzel;
using namespace in... | 5,303 | 1,642 |
/*******************************************************************************
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
******************************************************************************/
#ifndef QPL_TEST_SOURCE_PROVIDER_HPP
#define QPL_TEST_SOURCE_PROVIDER_HPP
/* Must... | 2,910 | 996 |
#include "AppCUI.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
const unsigned char __lower_case_table__[256] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59... | 17,995 | 6,959 |
/* @file command_manager.h
* @date <date>
* @brief <Descriptions>
*
* Copyright (C) 2020 NIIC EDA
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#i... | 4,542 | 1,428 |
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/contain... | 2,990 | 1,087 |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011 Bryce Adelstein-Lelbach
// Copyright (c) 2011-2013 Hartmut Kaiser
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_... | 71,550 | 23,028 |
#include <kernel/mutex.h>
mutex::mutex()
: locked(ATOMIC_FLAG_INIT)
{
}
void mutex::lock()
{
// For now we have no way to tell, so keep this in.
if (locked.test_and_set(std::memory_order_acquire)) {
// We'd rather not be woken up by a signal
queue.wait(0, [&]() {
return !locked... | 473 | 178 |
#include "CORE_Audio.h"
#include "CORE_Resources.h"
#include "SDL_Mixer.h"
#include <string>
std::map<std::string, Mix_Chunk*> sounds;
std::map<std::string, Mix_Music*> music;
namespace CORE_Audio
{
Mix_Chunk* getSound(std::string name)
{
Mix_Chunk* ret = NULL;
if (sounds.find(name) != sounds.e... | 2,576 | 1,121 |
/**************************************************************************************/
/* */
/* Visualization Library */
/* http://www.visualizationlibrary.org ... | 17,742 | 4,997 |
/* Shiny Hunt - Legendary Reset
*
* From: https://github.com/PokemonAutomation/Arduino-Source
*
*/
//#include "CommonFramework/InferenceInfra/VisualInferenceRoutines.h"
#include "CommonFramework/InferenceInfra/VisualInferenceSession.h"
#include "PokemonLA/Inference/Objects/PokemonLA_BubbleDetector.h"
#include "P... | 1,911 | 628 |
/*=========================================================================
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied ... | 5,357 | 1,979 |
////////////////////////////////////////////////////////////////////////////
//
// Crytek Engine Source File.
// Copyright (C), Crytek Studios, 2001-2004.
// -------------------------------------------------------------------------
// File name: EntityObject.cpp
// Version: v1.00
// Created: 18/5/2004 by... | 12,992 | 4,758 |
#include "PCH.h"
#include "DiffuseBSDF.h"
#include "Math/SamplingHelpers.h"
namespace rt {
using namespace math;
const char* DiffuseBSDF::GetName() const
{
return "diffuse";
}
bool DiffuseBSDF::Sample(SamplingContext& ctx) const
{
const float NdotV = ctx.outgoingDir.z;
if (NdotV < CosEpsilon)
{
... | 1,688 | 626 |
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include <stdint.h>
#include "codegen/il2cpp-codegen.h"
#include "il2cpp-object-internals.h"
template ... | 844,873 | 452,927 |
#ifndef PYTHONIC_STR_STARTSWITH_HPP
#define PYTHONIC_STR_STARTSWITH_HPP
#include "pythonic/utils/proxy.hpp"
#include "pythonic/types/str.hpp"
namespace pythonic { namespace __builtin__ {
namespace str {
bool startswith(types::str const& s, types::str const& prefix, long start=0, size_t end=std::string::... | 587 | 207 |
#include <iostream>
#include <sstream>
using namespace std;
string shrinkString(string s) {
stringstream ss;
int count=0;
char current=0, reg=0;
for(int i=0; i<s.length(); i++) {
current = s[i];
if (current == reg) {
count++;
continue;
} else if (reg != ... | 866 | 295 |
#include<iostream>
using namespace std;
int main(){
int numb1;
int numb2;
int numb3;
int sum;
cout<<"Enter numb1"<<endl;
cin>>numb1;
cout<<"Enter numb2"<<endl;
cin>>numb2;
cout<<"Enter numb3"<<endl;
cin>>numb3;
sum=(numb1+numb2+numb3);
cout<<"the value of sum:"<<s... | 347 | 150 |
// 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 "chrome/browser/ui/app_list/app_list_client_impl.h"
#include <stddef.h>
#include <utility>
#include <vector>
#include "ash/public/cpp/menu_uti... | 11,473 | 3,592 |
// Copyright 2015, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Author: Björn Buchhold (buchhold@informatik.uni-freiburg.de)
#include "./ResultTable.h"
#include <cassert>
// _____________________________________________________________________________
ResultTable::ResultTable()
: _sorted... | 1,299 | 381 |
#include "ParamedicCommander.hpp"
using namespace std;
// .כמו חובש, אבל כשהוא זז, כל החובשים של אותו שחקן מרפאים את החיילים שנמצאים לידם
void ParamedicCommander :: attack(vector<vector<Soldier *>> &board, pair<int, int> location) {
Soldier *prmdComndr_src = board[location.first][locati... | 2,035 | 639 |
// Copyright 2015 Emilie Gillet.
//
// Author: Emilie Gillet (emilie.o.gillet@gmail.com)
//
// 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 limitatio... | 11,331 | 4,004 |
#include "rar.hpp"
int ToPercent(int64 N1,int64 N2)
{
if (N2<N1)
return 100;
return ToPercentUnlim(N1,N2);
}
// Allows the percent larger than 100.
int ToPercentUnlim(int64 N1,int64 N2)
{
if (N2==0)
return 0;
return (int)(N1*100/N2);
}
| 257 | 134 |
#if PLATFORM != PLATFORM_WINDOWS
#include "NetworkManager.hpp"
namespace PrEngine
{
bool InitializeSockets()
{
#if PLATFORM == PLATFORM_WINDOWS
WSADATA WsaData;
return WSAStartup( MAKEWORD(2,2),
&WsaData )
== NO_ERROR;
#else
... | 5,716 | 1,805 |
// (C) Copyright Gennadiy Rozental 2005-2014.
// Use, modification, and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// ... | 1,421 | 512 |
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION. 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 ... | 36,470 | 11,733 |
#include "config.h"
#include "Scene_triangulation_3_item.h"
#include "Scene_surface_mesh_item.h"
#include "Scene_spheres_item.h"
#include <QVector>
#include <QColor>
#include <QPixmap>
#include <QApplication>
#include <QPainter>
#include <QtCore/qglobal.h>
#include <QGuiApplication>
#include <QSlider>
#include <QWidge... | 66,373 | 25,048 |
#include "linux_parser.h"
#include "procstat.h"
#include <dirent.h>
#include <unistd.h>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
#include <iostream>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <filesystem>
using std::stof;
using std::stol;
using std::string... | 10,951 | 3,688 |
/*
* cmd_option_value.cpp
*
* Created on: 2011-12-29
* Author: OWenT
*
* 应用程序命令处理
*
*/
#include "cli/cmd_option_value.h"
#include <algorithm>
namespace util {
namespace cli {
namespace detail {
static char tolower(char c) {
if (c >= 'A' && c <= 'Z') {
... | 4,843 | 1,696 |
/* Copyright (c) 2014, The Linux Foundation. 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 con... | 12,929 | 4,380 |
//-----------------------------------------------------------------------------
// Copyright (c) 2013 GarageGames, LLC
//
// 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 restr... | 11,784 | 3,599 |
/************************************************************************************
Copyright (C) 2021 by Nicholas LaCroix
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 restrictio... | 5,719 | 2,316 |
/*
Copyright (c) 2020-21 Project re-Isearch and its contributors: See CONTRIBUTORS.
It is made available and licensed under the Apache 2.0 license: see LICENSE
*/
/*@@@
File: unisock.hxx
Version: 1.02
Description: Multiplatform TCP/IP socket code.
Author: Kevin Gamiel, kevin.gamiel@cnidr.org
Edward C. Zimmer... | 5,514 | 2,255 |
#include "server.h"
Nan::Persistent<v8::Function> Server::constructor;
Server::Server() {
}
Server::~Server() {
}
void Server::Init(v8::Local<v8::Object> exports) {
// Prepare constructor template
v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
tpl->SetClassName(Nan::New("Server").... | 1,078 | 401 |
// A C++ program to sort an array according to the order defined
// by another array
#include <iostream>
#include <algorithm>
using namespace std;
/* A Binary Search based function to find index of FIRST occurrence
of x in arr[]. If x is not present, then it returns -1 */
int first(int arr[], int low, int high, int x... | 2,034 | 883 |
//
// Created by wangrl on 20-6-2.
//
#include <jni.h>
#include <string>
#include "entt/entt.hpp"
#include <android/log.h>
#include <android/asset_manager.h>
#include <unistd.h>
#define TAG "Renderer"
extern "C" {
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavutil/avutil.h"
#includ... | 5,577 | 1,846 |
#include <bits/stdc++.h>
/*
Problem: 11926 - Multitasking
Link : https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=3077
Solution by: Mohamed Hisham El-Banna
Gmail : Mohamed00Hisham@Gmail.com
Github : www.github.com/Mhmd-Hisham
LinkedIn: www.linkedin.com/i... | 1,508 | 535 |
#include <iostream>
#include "ToyUtility/Prerequisites/PreDefine.h"
#include "ToyUtility/DataStream/MemoryDataStream.h"
#include "ToyUtility/DataStream/FileDataStream.h"
#include "TRL/details/TRLSL/TRLSLParser.h"
#include "TRL/details/TRLSL/TRLSLTokener.h"
using namespace ToyUtility;
using namespace TRL;
int main(... | 1,505 | 544 |
// Copyright (c) 2014-2017 Thomas Fussell
//
// 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, pu... | 5,148 | 1,653 |
#include "r1Model.h"
#include "ExternalTools/Assimp/include/Importer.hpp"
#include "ExternalTools/Assimp/include/scene.h"
#include "ExternalTools/Assimp/include/postprocess.h"
#include "ExternalTools/MathGeoLib/include/Math/Quat.h"
#include "Modules/m1Objects.h"
#include "Objects/Object.h"
#include "Objects/Componen... | 11,088 | 4,853 |
//
// Copyright (c) 2009 Rutger ter Borg
//
// 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 BOOST_NUMERIC_BINDINGS_BLAS_LEVEL1_HPP
#define BOOST_NUMERIC_BINDINGS_BLAS_LEVEL1_HPP
#include <boost/numer... | 1,245 | 511 |
/* The MIT License (MIT)
*
* Copyright (c) 2017 Andrew Yeung <azy.development@gmail.com>
*
* 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 limitat... | 2,241 | 787 |
#using <System.Xml.dll>
#using <System.dll>
using namespace System;
using namespace System::IO;
using namespace System::Xml;
using namespace System::Xml::Xsl;
int main()
{
//<snippet1>
// Create a resolver with default credentials.
XmlUrlResolver^ resolver = gcnew XmlUrlResolver;
resolver->Cr... | 682 | 219 |
#include "../include/calcutron.h"
#include <iostream>
namespace calcutron
{
map<TokenType, regex> tokenRegExMap =
{
{VALUE, regex("[0-9]*[.,]?[0-9]*") },
{OPERATOR, regex("[<*/a-zA-Z+>=-]+")},
{LP, regex(R"([(\x5b{])")}, // проверяем на соответствие только левые скобки - для входа в парсер
{RP, regex(R"([)... | 1,116 | 509 |
#pragma once
/* inclusions =============================================================== */
#include <cassert>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <mutex>
#include <queue>
#include <random>
#include <signal.h>
#include <sys/time.h>
#include <thread>
#include <unordered_... | 12,945 | 4,331 |
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/fast_ink/laser/laser_pointer_controller.h"
#include <memory>
#include "ash/fast_ink/laser/laser_pointer_view.h"
#include "ash/public/cpp/s... | 5,887 | 1,806 |
#include "StdAfx.h"
#include "CGUseAbility.h"
uint CGUseAbilityHandler::Execute(CGUseAbility* pPacket,Player* pPlayer)
{
__ENTER_FUNCTION
return PACKET_EXE_CONTINUE;
__LEAVE_FUNCTION
return PACKET_EXE_ERROR;
}
| 219 | 100 |
// Copyright (C) 2017 Jérôme Leclercq
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_BASIC_MATERIAL_HPP
#define NAZARA_BASIC_MATERIAL_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Graph... | 2,486 | 918 |
/*
timer.cpp - Implementation file for the Timer class.
*/
#include <nodate.h>
#include "quadratureTimer.h"
/*---------------------------------------------------------------------------*/
/** @brief TIMER PWM Timer Initialization
This configures a timer perpheral in PWM output mode.
*/
QuadratureTimer::Quadr... | 3,322 | 1,385 |
// Copyright 2017 Daniel Parker
// Distributed under the Boost license, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See https://github.com/danielaparker/jsoncons for latest version
#ifndef JSONCONS_CBOR_CBOR_PARSER_HPP
#define JSONCONS_CBOR_CBOR_PARSER_HP... | 66,054 | 18,261 |
#include<iostream>
#include"node.h"
int main()
{
node<int> mynode1(10);
node<int> mynode2 (20);
std::cout << mynode1.get_data() << "," << mynode2.get_data() << std::endl;
if (mynode1==mynode2){
std::cout << "EQUAL" << std::endl;
}
else{
std::cout << "NOT EQUAL" << std::endl; ... | 923 | 350 |
#include "DAINO.h"
//-------------------------------------------------------------------------------------------------------
// Function : Output_Flux
// Description : Output the flux of a single patch
//
// Parameter : lv : Targeted refinement level
// PID : Targeted patch ID
//... | 3,719 | 1,453 |
#pragma once
/* kinfu incldues */
#include <kfusion/cuda/tsdf_volume.hpp>
#include <kfusion/safe_call.hpp>
/* sobfu includes */
#include <sobfu/reductor.hpp>
#include <sobfu/scalar_fields.hpp>
#include <sobfu/vector_fields.hpp>
/*
* SOLVER PARAMETERS
*/
struct SolverParams {
int verbosity, max_iter, s;
fl... | 4,953 | 1,814 |
#pragma once
#include<utility>
namespace pnc {
template <
typename TVectorRef,
typename TVector = std::remove_reference_t<TVectorRef>,
typename TConstant = typename TVector::data_type,
typename TSize = typename TVector::size_type
>
struct Location {
Location(
TVectorRef&& location,
TVectorRef&& ... | 1,301 | 524 |
#include "check_adaptation.hpp"
double stan::test::unit::stod(const std::string& val) {
char tmp[val.length()];
strcpy(tmp, val.c_str());
return atof(tmp);
}
void stan::test::unit::check_adaptation(
const size_t& num_params, const std::vector<double>& param_vals,
stan::test::unit::instrumented_writer& r... | 3,431 | 1,292 |
/// @ref gtx_normal
namespace args::core::math::detail::glm
{
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal
(
vec<3, T, Q> const& p1,
vec<3, T, Q> const& p2,
vec<3, T, Q> const& p3
)
{
return normalize(cross(p1 - p2, p1 - p3));
}
}//namespace args::core::math::detail::g... | 323 | 153 |
#include "unit_test/UnitTest++.h"
#include "rrLogger.h"
#include "rrRoadRunner.h"
#include "rrException.h"
#include "rrStringUtils.h"
using namespace UnitTest;
using namespace rr;
extern RoadRunner* gRR;
extern string gSBMLModelsPath;
extern string gCompiler;
extern string g... | 704 | 233 |
#pragma once
#include <filesystem>
#include <string>
#include <string_view>
enum class LexerState;
enum class TokenType
{
__eof__,
__jam__,
__nothing__,
secondToken,
};
std::string ToString(TokenType type, const std::string& text);
class full
{
public:
full(const std::filesystem::path& path);
... | 617 | 218 |
/*
Copyright (c) 2011 Yahoo! Inc. All rights reserved. The copyrights
embodied in the content of this file are licensed under the BSD
(revised) open source license
This creates a binary tree topology over a set of n nodes that connect.
*/
#include "config/cli_help_formatter.h"
#include "config/option_builder.h"
#... | 2,787 | 1,009 |
#include <src/board/board.h>
#include <src/board/i2c/i2c.h>
#include <src/board/i2c/multiplexers/i2c_multiplexer.h>
#include <src/config/satellite.h>
#include <src/sensors/i2c_sensors/rtc.h>
#include <src/util/msp_exception.h>
#include <src/util/runnable_time_source.h>
#include <src/util/satellite_time_source.h>
#inclu... | 1,735 | 565 |
/*
This file is part of Mitsuba, a physically based rendering system.
Copyright (c) 2007-2014 by Wenzel Jakob and others.
Mitsuba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.
... | 15,463 | 4,640 |
#pragma once
#include "../../JObject.hpp"
namespace android::app
{
class Activity;
}
namespace android::content
{
class Intent;
}
namespace android::os
{
class Bundle;
}
namespace android::view
{
class Window;
}
class JString;
namespace android::app
{
class LocalActivityManager : public JObject
{
public:
//... | 1,292 | 417 |
//
// Created by JJJai on 12/18/2021.
//
#include <iostream>
#include <utilities/assert.h>
#include "shader_library.h"
std::shared_ptr<scratch::Shader>
scratch::ShaderLibrary::addShader(const std::string &name, const std::string &vertexPath, const std::string &fragPath) {
std::cout << "Loading Shader: " << name <... | 1,514 | 514 |
// Copyright 1996-2018 Cyberbotics Ltd.
//
// 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 agr... | 9,312 | 3,095 |
#include <utt/Configuration.h>
#include <utt/IBE.h>
#include <xassert/XAssert.h>
#include <xutils/Log.h>
#include <xutils/Utils.h>
using namespace std;
using namespace libutt;
int main(int argc, char *argv[]) {
libutt::initialize(nullptr, 0);
//srand(static_cast<unsigned int>(time(NULL)));
(void)argc;
... | 1,972 | 781 |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without m... | 17,156 | 5,030 |
//******************************************************************************************
// File: IS_DoorControl.h
// Authors: Dan G Ogorchock & Daniel J Ogorchock (Father and Son)
//
// Summary: IS_DoorControl is a class which implements the SmartThings "Door Control" device capability. It features
// an ... | 5,853 | 2,098 |
#include <iostream>
#include <array>
#include "department.hpp"
int main(int argc, char *argv[])
{
Employee lastemp;
std::string id_number, name, history;
std::cout << "Enter the name of the department: ";
std::getline(std::cin, name);
std::cout << "Enter the department's identification number: ";
... | 2,807 | 855 |
//=== Convert Point vector to Mat===
vector<Point2f> pt_vec;
Mat pt_mat = Mat(pt_vec).clone();
//==== Convert Mat to vector ===
Point *pts = (const Point*) Mat(contour).data;
//=== Warp image ====
warpPerspective ( src, dst, T, Size(w,h), INTER_LINEAR, BORDER_CONSTANT);
//=== Points Transformation
perspectiveTrans... | 699 | 247 |
/*
* Copyright (c) 2015 Andrew Kelley
*
* This file is part of zig, which is MIT licensed.
* See http://opensource.org/licenses/MIT
*/
#ifndef ZIG_BUFFER_HPP
#define ZIG_BUFFER_HPP
#include "list.hpp"
#include <assert.h>
#include <stdint.h>
#include <ctype.h>
#include <stdarg.h>
#define BUF_INIT {{0}}
// Note... | 5,053 | 2,016 |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it
under the terms of the... | 7,405 | 2,695 |
#include "openmi/pb/attr_value.pb.h"
using namespace openmi;
int main(int argc, char** argv) {
proto::AttrValue av;
av.set_i(10);
switch (av.value_case()) {
case proto::AttrValue::kI:
std::cout << "kI. value: " << av.i() << std::endl; break;
case proto::AttrValue::VALUE_NOT_SET:
std::cout << ... | 362 | 143 |
//
// SVDetectBase.cpp
// SVEngine
// Copyright 2017-2020
// yizhou Fu,long Yin,longfei Lin,ziyu Xu,xiaofan Li,daming Li
//
#include "SVDetectBase.h"
#include "SVPerson.h"
SVDetectBase::SVDetectBase(SVInst *_app)
:SVListenBase(_app) {
}
SVDetectBase::~SVDetectBase() {
}
void SVDetectBase::update(f32 _dt){
}
void S... | 511 | 230 |
#include <iostream>
#include <vector>
#include <unordered_set>
#include <stdlib.h> // srand y rand
#include <algorithm> // advance
#include <time.h>
using namespace std;
int CALLS=0; // Llamadas a evaluación
const int LIMIT=100000; // Límite de evaluaciones
// Lee la entrada y la almacena en una matriz
void r... | 5,343 | 1,835 |
//===- include/pstore/core/hamt_map_types.hpp -------------*- mode: C++ -*-===//
//* _ _ _ *
//* | |__ __ _ _ __ ___ | |_ _ __ ___ __ _ _ __ | |_ _ _ _ __ ___ ___ *
//* | '_ \ / _` | '_ ` _ \| __| | '_ ` _ \ / _` | '_ \ | __| | | |... | 38,558 | 9,370 |
// This file is made available under Elastic License 2.0.
// This file is based on code available under the Apache license here:
// https://github.com/apache/orc/tree/main/c++/src/RleDecoderV2.cc
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOT... | 15,111 | 4,789 |
//
// DBEndpoint.hh
//
// Copyright (c) 2017 Couchbase, Inc All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unl... | 3,631 | 1,119 |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applicab... | 1,339 | 401 |
#include<fast_io.h>
#include<fast_io_device.h>
int main()
try
{
fast_io::obuf_file pf(u8"example.txt",fast_io::open_mode::app);
fast_io::file_lock_guard g(file_lock(pf.handle),fast_io::flock_request_l64{});
fast_io::io_flush_guard g2(pf);
for(std::size_t i{};i!=1000000;++i)
{
print(pf,"Hello ");
print(pf,"Wo... | 384 | 195 |
/*=============================================================================
Copyright (c) 2015 Joel de Guzman
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)
==============================================... | 3,529 | 1,198 |
/*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2015-2018 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... | 5,412 | 1,613 |
/*
* Copyright (C) 2008 Alp Toker <alp@atoker.com>
* Copyright (C) 2010 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at you... | 6,214 | 2,046 |
//$Id$
//------------------------------------------------------------------------------
// NonlinearConstraint
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool.
//
// Copyright (c) 2002 - 2017 United States Governmen... | 7,671 | 1,911 |
/* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Cop... | 41,979 | 18,680 |
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from constants.djinni
#include "NativeConstantsInterface.hpp" // my header
#include "NativeConstantRecord.hpp"
namespace djinni_generated {
em::val NativeConstantsInterface::cppProxyMethods() {
static const em::val methods = em::val::ar... | 3,003 | 923 |
/****************************************************************************/
/// @file NIImporter_MATSim.cpp
/// @author Daniel Krajzewicz
/// @author Jakob Erdmann
/// @author Michael Behrisch
/// @date Tue, 26.04.2011
/// @version $Id$
///
// Importer for networks stored in MATSim format
/*****************... | 10,555 | 3,547 |
#include <sstream>
#include <cmath>
#include <windows.h>
#include "Time.h"
#include "Logger.h"
namespace renderer
{
Time::Time()
:m_tStart(),
m_tEnd(),
m_dt(0),
m_systemTimer(0),
m_numFrames(0),
m_fps(0)
{
}
Time::~Time()
{
}
void Time::OnTim... | 882 | 325 |
/*
* Copyright (C) 2014 Patrick Mours. All rights reserved.
* License: https://github.com/crosire/reshade#license
*/
#pragma once
#include "runtime.hpp"
namespace reshade::vulkan
{
class device_impl;
class command_queue_impl;
class swapchain_impl : public api::api_object_impl<VkSwapchainKHR, runtime>
{
sta... | 1,300 | 518 |
// StringSet C++ class
#include "burner.h"
int __cdecl StringSet::Add(TCHAR* szFormat,...)
{
TCHAR szAdd[256];
int nAddLen = 0;
TCHAR* NewMem;
va_list Arg;
va_start(Arg, szFormat);
_vstprintf(szAdd, szFormat, Arg);
nAddLen = _tcslen(szAdd); // find out the length of the new text
NewMem = (TCH... | 963 | 444 |
// __BEGIN_LICENSE__
// Copyright (C) 2006-2010 United States Government as represented by
// the Administrator of the National Aeronautics and Space Administration.
// All Rights Reserved.
// __END_LICENSE__
// TestConvolution.h
#include <gtest/gtest.h>
#include <vw/Image/Convolution.h>
#include <vw/Image/ImageView... | 7,492 | 3,436 |
// Author: wwylele
// https://github.com/wwylele
// Forked by pbsag/tcadr
// https://github.com/pbsag/tcadr
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
#define short_miss -32767
#define long_miss -2147483647
#define flt_miss -3.402823466e+38F
#define dbl_miss -1... | 4,892 | 1,865 |
/** private imeplementation.
* https://github.com/azadkuh/qhttp
*
* @author amir zamani
* @version 2.0.0
* @date 2014-07-11
*/
#ifndef QHTTPSERVER_REQUEST_PRIVATE_HPP
#define QHTTPSERVER_REQUEST_PRIVATE_HPP
///////////////////////////////////////////////////////////////////////////////
#include "httpreader.hxx... | 1,417 | 390 |
#include <bits/stdc++.h>
using namespace std;
int ara1[10001], ara2[10001];
int main()
{
// freopen("myInput.txt","r",stdin);
// freopen("myOutput.txt","w",stdout);
int tcase;
scanf("%d",&tcase);
for(int t=1; t<=tcase; t++) {
int n,m;
scanf("%d %d",&n,&m);
f... | 1,151 | 440 |
#include <thread>
#include <Poco/Format.h>
#include <common/DigitalOut.hpp>
#include "Agp01Relays.hpp"
using namespace std;
Agp01Relays::Agp01Relays( int id ) :
DigitalOut(id) ,
myEN{gpiod::find_line("pioB21") } ,
myOHCL{ gpiod::find_line("pioB20") } ,
myOLCH{ gpiod::find_line("pioB19") } ,
m... | 1,957 | 754 |
#include "defines.h"
#include "log.h"
#include "Hardware/Timer.h"
#include "Recorder/Sensor.h"
#include <usbh_cdc.h>
#include <usbh_core.h>
#include <usbh_def.h>
static USBH_HandleTypeDef handle;
static int requestForReceive = 0;
#define RX_BUFF_SIZE 0x400
static uint8 bufferRX[RX_BUFF_SIZE];
static void USBH_... | 1,452 | 578 |
////////////////////////////////////////////////////////////////
// MSDN -- August 2000
// If this code works, it was written by Paul DiLascia.
// If not, I don't know who wrote it.
// Largely based on original implementation by Michael Lemley.
// Compiles with Visual C++ 6.0, runs on Windows 98 and probably NT to... | 5,297 | 1,989 |
#include <sstream>
#include <fstream>
#include <codecvt>
#include <vector>
std::wstring tokenize(const std::wstring& s, int n) {
if (!s.size()) {
return s;
}
std::wstringstream ss;
ss << s[0];
for (int i = 1; i < s.size(); i+=n) {
ss << ' ' << s[i];
}
return ss.str();
}
sta... | 1,302 | 510 |
#include "thread.h"
#include <QDebug>
Thread::Thread(QStringList list, QStringList vList, QThread *parent) : QThread(parent), directories(list),virusList(vList) {
}
void Thread::run() {
emit scanStart();
foreach (QString element, directories) {
QDirIterator directory(element, QDirIterator... | 737 | 203 |
//--------------------------------------------*-C++-*---------------------------------------------//
/*!
* \file RTT_Format_Reader/CellFlags.cc
* \author B.T. Adams
* \date Mon Jun 7 10:33:26 2000
* \brief Implementation file for RTT_Format_Reader/CellFlags class
* \note Copyright (C) 2016-2020 Triad Nation... | 3,514 | 996 |
//
// BasicObjects.hh
// Copyright (C) 2021 Richard Bradley
//
// Definitions for primitive object classes
//
#pragma once
#include "Object.hh"
// **** Types ****
class Disc final : public Primitive
{
public:
// SceneItem Functions
std::string desc() const override { return "<Disc>"; }
// Object Functions
... | 3,816 | 1,236 |
// set insertion points for each work area
CPoint rgptWork[4];
for (int i = 0; i < 4; i++)
{
rgptWork[i].x = rcWorkAreas[i].left + 10;
rgptWork[i].y = rcWorkAreas[i].top + 10;
}
// now move all the items to the different quadrants
for (int i = 0; i < 20; i++)
{
m_WorkAreaListCtrl.SetItemPosition(i, rgptWork[i ... | 423 | 174 |