text
string
size
int64
token_count
int64
/***** Vca Sample Server *****/ /******************** ***** System ***** ********************/ #include "Vk.h" /****************** ***** Self ***** ******************/ /************************ ***** Supporting ***** ************************/ #include "Vca_VOneAppMain_.h" #include "Vca_VServerApplic...
2,911
903
#ifndef SHAPE_H #define SHAPE_H #include <memory> namespace gadzhiev { struct point_t; struct rectangle_t; class Shape { public: typedef std::shared_ptr<const Shape> ConstShapePtr; typedef std::shared_ptr<Shape> ShapePtr; virtual ~Shape() = default; virtual double getArea() const ...
684
233
/** Copyright (c) 2015-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. */ #include <plist/Format...
911
287
#ifndef DUALADVANCEDRUNNER_HPP #define DUALADVANCEDRUNNER_HPP #include <math.h> #include <iostream> #include <memory> #include <sstream> #include <string> #include "GameIO.hpp" #include "IPlayer.hpp" #include "NeuralNetwork.hpp" #include "Vec2.hpp" class DualAdvancedRunner : public IPlayer { public: static unsign...
4,767
1,608
#include "camerapathnode.h" CameraPathNode::CameraPathNode(Vec pos, Quaternion rot) { m_mf = new ManipulatedFrame(); // disable camera manipulation by mouse m_mf->removeFromMouseGrabberPool(); m_mf->setPosition(pos); m_mf->setOrientation(rot); m_constraints = new LocalConstraint(); m_constraints->set...
10,499
4,679
// Exercise3.36.cpp // Ad // Write a program to compare two arrays for equality, then write a similar to compare vectors. #include <iostream> #include <vector> #include <iterator> using std::cin; using std::cout; using std::endl; int main() { // to compare two arrays int arr1[10]{}, arr2[10]{}; int *p...
1,023
391
#include "gtest/gtest.h" class GlobalEnv : public ::testing::Environment { public: virtual void SetUp() { if (std::system("docker pull busybox:1.26")) { throw std::runtime_error("Cannot pull busybox"); } std::system("docker run -dt --name test busybox:1.26 > /dev/null 2>&1"); } virtual void Te...
542
192
#include "request_processor.hpp" #include <restinio/helpers/http_field_parsers/content-type.hpp> #include <restinio/helpers/file_upload.hpp> #include <fmt/format.h> #include <stdexcept> namespace crud_example { namespace errors { const int unknow_error = -1; const int json_dto_error = 1; const int sqlite_error = ...
10,418
4,046
//#include <gsl/gsl> #include <vector> #include <string> #include <iostream> std::vector<std::string> splittingString( std::string aFrom, std::string aDelimiter ) { std::vector<std::string> sTo; char * sToken = NULL; sToken = std::strtok...
862
296
#include "../../Includes/State/PausedState.h" PausedState::PausedState() { overlap = sf::RectangleShape(sf::Vector2f(800.f, 600.f)); overlap.setFillColor(sf::Color(0, 0, 0, 185)); } void PausedState::onEnter() { WARN("-----> Paused"); } void PausedState::onLeave() { WARN("<----- Paused"); } void PausedState::dr...
795
302
#include "sorting.h" void mergesort(void *base, size_t count, size_t type, comparator comp) { if (count == 1) return; char *bt_base = (char *) base; size_t lcount = count / 2; size_t rcount = count - lcount; mergesort(bt_base, lcount, type, comp); mergesort(bt_base + lcount * type, rcount, t...
1,280
496
#ifndef __MISSILE_CLASS_HPP__ #define __MISSILE_CLASS_HPP__ #include "GameObject.hpp" #include "Tile.hpp" #include <array> class Missile : public GameObject { public: enum MissileOrigin { MISSILE_ORIGIN_PLAYER, MISSILE_ORIGIN_ENEMY }; Missile(MissileOrigin origin); void update(dou...
607
230
#include "homie.h" Homie::Homie(PubSubClient &client, String deviceID) { this->_mqttClient = &client; this->deviceID = deviceID; this->nodes = NULL; this->nodes_size = 0; } Homie::Homie(PubSubClient &client, String deviceID, const char *nodes[], size_t nodes_size) { this->_mqttClient = &client; ...
3,436
1,188
#include "hypomodel.h" //#include "hypomain.h" //#include "hypopanels.h" OptionPanel::OptionPanel(HypoMain *main, const wxString & title) : wxDialog(NULL, -1, title, wxDefaultPosition, wxSize(450, 450), wxFRAME_FLOAT_ON_PARENT | wxFRAME_TOOL_WINDOW | wxCAPTION | wxSYSTEM_MENU | wxCLOSE_BOX | wxRESIZE_BORDER) { i...
8,576
3,495
// CELLULARDlg.cpp : implementation file // #include "stdafx.h" #include "CELLULAR.h" #include "CELLULARDlg.h" #include <sys/types.h> #include <sys/stat.h> /* #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif */ #include "supercom\supercom.h" #inclu...
122,962
56,499
/* EPANET 3 * * Copyright (c) 2016 Open Water Analytics * Distributed under the MIT License (see the LICENSE file for details). * */ #include "emitter.h" #include "junction.h" #include "pattern.h" #include "Core/network.h" #include <cmath> using namespace std; //-------------------------------------------------...
1,950
623
/* Copyright 2003-2017 GBDI-ICMC-USP <caetano@icmc.usp.br> * * 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 applicabl...
10,585
3,177
// #include <pluginlib/class_list_macros.h> #include "PinholePCLCam.hpp" #include <opencv2/opencv.hpp> #include <pcl/range_image/range_image_planar.h> #include <cassert> #include <cmath> using namespace sensor_msgs; using namespace std_msgs; namespace ap34 { void store_image(std::string fname, cv::Mat& img) { ...
6,845
2,525
// 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/command_buffer/service/transfer_buffer_manager.h" #include "base/memory/scoped_ptr.h" #include "testing/gtest/include/gtest/gtest.h" #i...
4,866
1,365
/* Copyright (c) 2019-2022 Xavier Leclercq Released under the MIT License See https://github.com/nemu-cpp/web-framework/blob/main/LICENSE.txt */ #include "DebugTemplateEngineProfileTests.hpp" #include "DebugTemplateEngineTests.hpp" #include "FileSystemWebRequestHandlerTests.hpp" #include "FunctionWebReques...
1,848
540
#ifdef BITVECTOR_VC #include "../include/main.h" #include "../include/Graph.hpp" #include "../MPI_Modules/MPI_Scheduler.hpp" #include "../include/VC_void_MPI_bitvec.hpp" #include "../include/resultholder/ResultHolder.hpp" #include "../include/BranchHandler.hpp" #include "../include/DLB_Handler.hpp" #include <chrono...
5,053
1,798
// -*- c-basic-offset: 4 -*- #ifndef CLICK_FLOWELEMENT_HH #define CLICK_FLOWELEMENT_HH #include <click/glue.hh> #include <click/vector.hh> #include <click/string.hh> #include <click/batchelement.hh> #include <click/routervisitor.hh> #include <click/pair.hh> #include "flow.hh" CLICK_DECLS #ifdef HAVE_FLOW # if HAVE_C...
16,778
5,707
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2016 ArangoDB GmbH, Cologne, Germany /// /// 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...
4,475
1,335
//----------------------------------------------------------------------------- // Title : JTAG Support //----------------------------------------------------------------------------- // File : xvcDrvAxisFifo.cc // Author : Till Straumann <strauman@slac.stanford.edu> // Company : SLAC National Acceler...
13,005
6,082
#pragma once #include "../defines.hpp" std::string readFromIPCChannel(const std::string); int writeToIPCChannel(const std::string, std::string); #define IPC_END_OF_FILE (std::string)"HYPR_END_OF_FILE" #define IPC_MESSAGE_SEPARATOR std::string("\t") #define IPC_MESSAGE_EQUALITY std:...
1,066
348
/* * Model.cpp * XPlatformGL * * Created by Kristofer Schlachter on 1/2/09. * Copyright 2009 __MyCompanyName__. All rights reserved. * */ #include "Model.h" #include "Platform.h" #include "Globals.h" #include "Mesh.h" #include <stdlib.h> //#include <stdio.h> #include <math.h> /////////////////////////////...
2,009
647
/* PICCANTE The hottest HDR imaging library! http://vcg.isti.cnr.it/piccante Copyright (C) 2014 Visual Computing Laboratory - ISTI CNR http://vcg.isti.cnr.it First author: Francesco Banterle This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed ...
8,737
6,792
//-------------------------------------------------------------------------// // // Copyright 2017 Sascha Kaden // // 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....
1,478
473
/* * algebra.hpp * * Copyright (c) 2020 Carlos Braga * * This program is free software; you can redistribute it and/or modify * it under the terms of the MIT License. * * See accompanying LICENSE.md or https://opensource.org/licenses/MIT. */ #ifndef ATTO_MATH_GEOMETRY_ALGEBRA_H_ #define ATTO_MATH_GEOMETRY_ALG...
19,968
10,261
/* * SceneMonitor.cpp * * Created on: Jul 27, 2015 * Author: richard * * Copyright 2017 Richard Stilborn * Licensed under the MIT License */ #include "SceneMonitor.h" #include <boost/asio/io_service.hpp> #include <boost/bind/bind.hpp> #include <boost/iterator/iterator_facade.hpp> #include <boost/ptr_c...
3,313
1,157
#include "uart.h" #include "board.h" #include "WString.h" #define UARTx_IRQn USART0_IRQn void UART_Init( const uint32_t baud ) { Board_UART_Init( LPC_UART ); Chip_UART_Init( LPC_UART ); Chip_UART_SetBaud( LPC_UART, baud ); Chip_UART_TXEnable( LPC_UART ); } void UART_IRQ_Init() { UART_IntEnable(); Chip_U...
1,854
910
#include <iostream> #include "SPiCall/SPiCall.h" int main() { SPiCall::init(); #ifdef _MSC_VER const auto funcNameHash = SPiCall::syscall::fnv1a_32("NtTerminateProcess"); SPiCall::syscall::nt_syscall(funcNameHash, ~0, 0); #else SPiCall::syscall::nt_syscall("NtTerminateProcess", ~0, 0); #endif retu...
328
140
#include <buffer.hpp> #include <service/Info.hpp> #include <service/address.hpp> #include <cassert> #include <sodium/crypto_generichash.h> namespace llarp { namespace service { bool ServiceInfo::DecodeKey(llarp_buffer_t key, llarp_buffer_t* val) { bool read = false; if(!BEncodeMaybeReadDi...
1,970
663
/************************************************************************ * This file is part of the AREG SDK core engine. * AREG SDK is dual-licensed under Free open source (Apache version 2.0 * License) and Commercial (with various pricing models) licenses, depending * on the nature of the project (commercial, re...
22,627
6,175
/******************************************************************************* * Copyright (c) 2000, 2019 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this * distribution and is available at http://ec...
18,478
5,434
#ifdef ENABLE_PYTROCH_JIT #include "error.hpp" #include "predictor.hpp" #include <algorithm> #include <iosfwd> #include <iostream> #include <memory> #include <string> #include <typeinfo> #include <utility> #include <vector> extern Torch_IValue Torch_ConvertIValueToTorchIValue(torch::IValue value); struct Torch_JIT...
4,874
1,796
#include "stereo_ugv/image_source.h" namespace stereo_ugv { /** * @brief Creates an ImageSource. * @details The function determines the concrete subclass of the layout to be created by looking up the "type" key, and * calls the corresponding initialization function. Currently, "camera", "images" and "video" are sup...
2,191
617
/* * Copyright (c) 2014-2015, Hewlett-Packard Development Company, LP. * 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 versi...
2,325
738
#pragma once #include <iostream> #include <string> #include <Define.hpp> using namespace std; namespace PhantomEngine { namespace DataTypes { static const uint8_t UNDEFINED = 255; static const uint8_t INTEGER = 0; static const uint8_t FLOAT = 1; static const uint...
3,683
1,092
/* Copyright 2017 - BSD-3-Clause * * Copyright Holder (alphabetical): * * Beikirch, Maximilian * Cramer, Simon * Frank, Martin * Otte, Philipp * Pabich, Emma * Trimborn, Torsten * * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * followin...
8,239
2,691
#include <world/abilities/blink.hpp> #include <world/works/blink_work.hpp> #include <world/entity.hpp> #include <logging/logging.hpp> #include <memory> using namespace std::chrono_literals; template<> const std::string NamedAbility<Blink>::name = "Blink"; template<> const AbilityType NamedAbility<Blink>::ability_t...
933
330
#pragma once #ifndef _QI_TESTS_MESSAGING_NETWORKCOMMON_HPP #define _QI_TESTS_MESSAGING_NETWORKCOMMON_HPP #include <algorithm> #include <random> #include <boost/lexical_cast.hpp> /// @file /// Contains functions and types used by socket tests. /// Precondition: With p = reinterpret_cast<unsigned char*>(t), /// writa...
1,004
384
#include "glog/logging.h" #include "gtest/gtest.h" #include "worker/callback_runner.cpp" namespace csci5570 { class TestCallbackRunner: public testing::Test { protected: void SetUp() {} void TearDown() {} }; // class TestCallbackRunner TEST_F(TestCallbackRunner, Init) { CallbackRunner runne...
3,089
1,306
#include "behaviortree_cpp_v3/blackboard_entry.h" namespace BT { Entry::Entry(const Entry& _other_entry, const TypesConverter& _converter) : converter_ ( _converter ) { input_types_ = _other_entry.input_types_; output_types_ = _other_entry.output_types_; checkTypesCompatible(i...
3,141
895
#include "Processor.hpp" using namespace std; void Processor::setEverything(int anID, int amountOfCores, float alpha, float beta, float delta, float gamma, float c){ id = anID; cores = amountOfCores; failureP = 1 / gamma; probRc = c; probRb = 1 - c; TRc = 1 / beta; TRb = 1 / alpha; ...
502
196
/****************************************************************************** Copyright(c) Microsoft Corporation Module Name: end.cpp Abstract: This module terminates the schedule task which is currently running in the system Author: Venu Gopal Choudary 12-...
18,167
5,968
// Copyright 2017 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 "net/tools/transport_security_state_generator/spki_hash.h" #include "base/strings/string_number_conversions.h" #include "testing/gmock/include/gm...
2,202
1,197
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2006-2014 Georg Rudoy * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE...
1,350
517
#include "pass.hpp" void ind_var_discovery(NormalFunc *f) { // TODO: debug dbg << "## ind var discovery: " << f->name << "\n"; auto S = build_dom_tree(f); auto defs = build_defs(f); auto i2bb = build_in2bb(f); std::unordered_set<Reg> la; std::unordered_map<Reg, Reg> mp_reg; dom_tree_dfs(S, [&...
4,088
1,518
// // MIT License // // © ESI Group, 2015 // // 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...
17,000
6,352
#include "lab4_io.h" #include "lab4_mpi.h" #include <stdlib.h> #include "mpi.h" /* Arguments: arg: input filename (consist text, pattern_set) */ int main(int argc, char *argv[]) { if (argc < 2) { printf("\nLess Arguments\n"); return 0; } if (argc > 2) { printf("\nTOO many Arguments\n"); return 0; }...
2,089
798
#include "PlayerWeaponManager.h" #include "qpang/Game.h" #include "qpang/room/session/RoomSession.h" #include "qpang/room/tnl/net_events/client/cg_weapon.hpp" #include "qpang/room/tnl/net_events/server/gc_weapon.hpp" #include "qpang/room/tnl/net_events/server/gc_respawn.hpp" #include "qpang/room/tnl/net_events/serve...
9,164
3,737
#include "../../include/graphics/animation/CMeshAnimatorComponent.h" #include <tuple> namespace TDEngine2 { static const std::string ComponentTypeName = "mesh_animator"; const std::string CMeshAnimatorComponent::mPositionJointChannelPattern = "joint_{0}.position"; const std::string CMeshAnimatorComponent::mRotati...
6,361
2,461
#include <cstdio> #include <cmath> #include <iostream> #include <string> #include <cstring> #include <algorithm> #include <vector> #include <utility> #include <stack> #include <queue> #include <map> #define fi first #define se second #define pb push_back #define mp make_pair #define pi 2*acos(0.0) #de...
1,602
811
#include "aitm.h" #include <chrono> #include <iostream> #include <torch/script.h> int main() { std::unordered_map<std::string, torch::Tensor> inputs; inputs.insert({"101", torch::tensor({56460, 56460})}); inputs.insert({"121", torch::tensor({15, 15})}); inputs.insert({"122", torch::tensor({4, 4})}); inputs....
2,215
1,022
#include "geometry.hh" namespace raytrace { using Vec2 = Eigen::Vector2d; double cross2d(const Vec2 &a, const Vec2 &b) { return (a(0) * b(1)) - (a(1) * b(0)); } bool ray_line_intersection(const Ray &ray, const Line &line, Out<Vec2> intersection) { Eigen::Matrix2d A; A.col(0) = ray.direction; A.col(1) = -lin...
1,443
522
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
1,927
605
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */
88
40
// RUN: %clang_cc1 -std=c++1z -verify %s [[disable_tail_calls, noduplicate]] void f() {} // expected-warning {{unknown attribute 'disable_tail_calls'}} expected-warning {{unknown attribute 'noduplicate'}} [[using clang: disable_tail_calls, noduplicate]] void g() {} // ok [[using]] extern int n; // expected-error {{e...
847
245
// Copyright (c) Andreas Fertig. // SPDX-License-Identifier: MIT #include <cstddef> template<typename T> class Span { T* mData; size_t mSize; public: // constructors }; int main() {}
196
79
/** * \copyright * Copyright (c) 2015-2020, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license */ #include <algorithm> #include <cmath> #include <cstdl...
20,685
6,856
#include "algorithm_list.h" const std::vector<std::pair<std::string, Algorithm>> AlgorithmList::all_algorithms = { {"Path Tracing", Algorithm::PT}, {"Bidirectional Path Tracing", Algorithm::BDPT}, };
209
68
// // Created by 유승우 on 2020/05/15. // #ifndef FIRSTRAYTRACER_RTWEEKEND_HPP #define FIRSTRAYTRACER_RTWEEKEND_HPP #include <cmath> #include <cstdlib> #include <limits> #include <memory> #include <random> #include <time.h> // using statements to make codes more simple using std::shared_ptr; using std::make_shared; us...
2,331
782
#include <cstdio> #include <cstdlib> #define SIZE_OUT (1<<12) #define SIZE_INP (SIZE_OUT*8) int main() { char buff_out[SIZE_OUT]; char buff_inp[SIZE_INP]; while( fread(buff_inp,SIZE_INP,1,stdin) == 1 ) { for( int i=0 ; i<SIZE_INP ; i++ ) { if( buff_inp[i] != '0' && buff_inp[i] != '1' ...
564
244
#include "Matrix2.hpp" namespace Sirius { template<typename T> constexpr Matrix<2, T> operator+(const Matrix<2, T>& mat1, const Matrix<2, T>& mat2) { return Matrix<2, T>(mat1[0] + mat2[0], mat1[1] + mat2[1]); } template<typename T> constexpr Matrix<2, T> operator-(const Matrix<2, T>& ...
1,839
741
//---------------------------------- // (c) Reliable Software 1997 - 2008 //---------------------------------- #include "precompiled.h" #include "CmdVector.h" #include "Commander.h" // Code Co-op Commands namespace Cmd { const Cmd::Item<Commander> Table [] = { { "Program_Update", &Commander::Program_Update, ...
17,785
6,496
#include <queue> #include <vector> #include "ListNode.h" #include "ListNodeUtils.h" #include "gtest/gtest.h" using CommonLib::ListNode; namespace { class Solution { public: ListNode* mergeKLists(std::vector<ListNode*> const &lists) { auto comp = [](ListNode* left, ListNode* right){ return left->val...
1,820
542
#pragma once #include <cstring> #include "containers/utlmap.hpp" #ifdef _WIN32 #define stricmp _stricmp #else #define stricmp strcasecmp #endif inline bool CaselessStringLessThan( const char* const& lhs, const char* const& rhs ) { if ( !lhs ) return false; if ( !r...
1,433
502
// REQUIRES: xocc // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out // TODO should be a Sema test #include <CL/sycl.hpp> #include "../utilities/device_selectors.hpp" using namespace cl::sycl; class add_2; int main() { selector_defines::CompiledForDeviceSelecto...
709
315
// Name: SeaOfThieves, Version: 2.0.23 #include "../pch.h" /*!!DEFINE!!*/ /*!!HELPER_DEF!!*/ /*!!HELPER_INC!!*/ #ifdef _MSC_VER #pragma pack(push, 0x01) #endif namespace CG { //--------------------------------------------------------------------------- // Functions //--------------------------------------------...
1,929
615
#pragma once #include <bstorm/source_map.hpp> #include <string> #include <memory> #include <vector> #include <mutex> namespace bstorm { class LogParam { public: enum class Tag { TEXT, TEXTURE, SOUND, MESH, PLAYER_SHOT_DATA, ENEMY_SHOT_DATA, ITEM_DATA, ...
2,860
954
#include <cstring> #include <ios> #include <iostream> #include <list> #include <map> #include <sstream> #include "hxhim/hxhim.hpp" #include "print_results.h" #include "utils/Blob.hpp" // private header #include "utils/memory.hpp" enum HXHIM_OP { PUT, GET, GETOP, DEL, BPUT, BGET, BGETOP, ...
14,712
5,057
// Based on "Design Patterns: Elements of Reusable Object-Oriented Software" // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm // // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan. #include "maze_prototype_factory.h" namespace creational ...
1,085
374
#include "../../../PrecompiledHeaders/stdafx.h" #include "IndexBuffer.h" namespace dx11 { // Constructors and Destructor: IndexBuffer::IndexBuffer(RenderSystem& renderSystem, const std::vector<uint16>& indices) : count( UINT( indices.size() ) ) { D3D11_BUFFER_DESC index_buffer_desc = {}; index_buffer_desc.Bi...
1,120
437
// // BSD 3-Clause License // // Copyright (c) 2017, Tero Saarni // // // This software re-programs ATtiny85 fuses using the high-voltage // serial programming method. // // // References // // * ATtiny85 datasheet - // http://www.atmel.com/images/atmel-2586-avr-8-bit-microcontroller-attiny25-attiny45-attiny85_da...
4,462
2,224
#include "operators/activation/tanh_op.h" #include "utils/math_functions.h" #include "utils/op_kernel.h" namespace dragon { template <class Context> template <typename T> void TanhOp<Context>::RunWithType() { auto* Xdata = input(0).template data<T, Context>(); auto* Ydata = output(0)->template mutable_data<T,...
1,861
691
//find the area of a circle. //circlearea.cpp //Khaled Mahmoud, 2021. #include <iostream> using namespace std; int main() { float rad; //float type. const float pi = 3.14159F; //const float type. cout<<"Enter the radius of a circle: "; //message display. cin>>rad; //get radius. float area ...
435
187
/* Copyright (C) 2003-2014 by David White <davewx7@gmail.com> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, incl...
4,925
1,972
#include "richtext.hpp" #include <SFML/Graphics.hpp> #include <sstream> static std::map<sf::String, sf::Color> colors; // same as sf::Text styles // define them locally to redefine them for a child class for example #define Regular 0 #define Bold 1 #define Italic 2 #define Underlined 4 // TextChunk ...
8,696
2,793
#include "L1Trigger/L1TMuonEndCap/interface/EMTFTrack2016Tools.h" namespace l1t { void EMTFTrack2016::ImportSP( const emtf::SP _SP, int _sector) { EMTFTrack2016::set_sector ( _sector ); EMTFTrack2016::set_sector_GMT ( calc_sector_GMT(_sector) ); EMTFTrack2016::set_mode ( _SP.Mode() ); ...
17,024
8,561
#include "test.h" #include "runtime/RegEx.h" using namespace snow; TEST_SUITE(RegEx); TEST_CASE(simple_match) { PENDING(); } TEST_CASE(simple_search) { PENDING(); }
169
72
/* Copyright 2016-2019 Intel Corporation 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 in w...
4,047
1,339
#include <iostream> #include <fstream> #include <cassert> #include <string> #include "block.hpp" #include "cartesian.hpp" #include "domain.hpp" #include "fd.hpp" #include "fields.hpp" #include "friction.hpp" #include "interface.hpp" #include "rk.hpp" #include "slipweak.hpp" #include "stz.hpp" #include <mpi.h> using na...
10,569
3,813
#pragma once #include <functional> #include <Eigen/Core> typedef unsigned short ushort; typedef unsigned char uchar; namespace bold { /** Produces a map used in sub-sampling image data. * * A granularity function allows processing fewer than all pixels * in the image. * * Granularity is calculated b...
937
311
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/lakeformation/model/BatchPermissionsFailureEntry.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; na...
1,431
486
#ifndef qd_simple_locked_queue_hpp #define qd_simple_locked_queue_hpp qd_simple_locked_queue_hpp #include<array> #include<cassert> #include<mutex> #include<queue> class simple_locked_queue { std::mutex lock; std::queue<std::array<char, 128>> queue; typedef std::lock_guard<std::mutex> scoped_guard; typedef void(...
2,013
811
/* Port.cpp (c)2005 Palestar, Richard Lyle */ #define NODEPARTICLESYSTEM2PORT_DLL #include "stdafx.h" #include "Port.h" #include "Math/Helpers.h" #include "Tools/ScenePort/ChildFrame.h" #include "Tools/ResourcerDoc/Port.h" //---------------------------------------------------------------------------- IMPLEMENT_FA...
6,878
2,976
#include "ssl_info_action.h" namespace doogie { SslInfoAction::SslInfoAction(const Cef& cef, BrowserWidget* browser_widg) : QWidgetAction(browser_widg), cef_(cef), browser_widg_(browser_widg) { } QWidget* SslInfoAction::createWidget(QWidget* parent) { auto errored_ssl_info = browser_widg_->ErroredSslInfo(); ...
3,883
1,424
#ifndef COMPARETORFACTORY_HPP #define COMPARETORFACTORY_HPP #include "comparetor.hpp" #include "QPointer" /** * @brief The deckType enum,定义了各种牌型的枚举 */ enum deckType{undefined,high_card,one_pair,two_pairs,three_of_a_kind,straight,flush,full_house,four_of_a_kind,straight_flush,royal_flush}; /** * @brief The comparet...
501
224
// Fortnite (1.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function WorkerTooltipStatsWidget.Wor...
2,804
860
#include <boost/python.hpp> #include <boost/cstdint.hpp> #include <Magick++/Drawable.h> #include <Magick++.h> using namespace boost::python; namespace { struct Magick_DrawableMatte_Wrapper: Magick::DrawableMatte { Magick_DrawableMatte_Wrapper(PyObject* py_self_, double p0, double p1, Magick::PaintMethod p2): ...
1,220
428
// SPDX-License-Identifier: Apache-2.0 /** * Copyright (C) 2021 Jihoon Lee <jhoon.it.lee@samsung.com> * * @file unittest_interpreter.cpp * @date 02 April 2021 * @brief interpreter test * @see https://github.com/nnstreamer/nntrainer * @author Jihoon Lee <jhoon.it.lee@samsung.com> * @bug No known bugs except for ...
4,298
1,486
// // Renderer.cpp // // // Created by Narendra Umate on 9/7/13. // // #include "Renderer.h" Renderer::Renderer(const int& width, const int& height) : m_width(width) , m_height(height) , m_clearColor(Color4f(0.5f, 0.5f, 0.5f, 1.0f)) , m_clearDepth(1.0f) , m_clearStencil(1) { } Renderer::~Renderer() { m_width = 0;...
2,495
850
/****************************************************************** * * mUPnP for C++ * * Copyright (C) Satoshi Konno 2002 * * This is licensed under BSD-style license, see file COPYING. * ******************************************************************/ #include <string> #include <sstream> #include <string....
2,759
939
#include "gtest/gtest.h" #include <list> #include <algorithm> #include <string> #include "FastMIDyNet/prior/sbm/edge_count.h" #include "FastMIDyNet/random_graph/erdosrenyi.h" #include "FastMIDyNet/types.h" #include "FastMIDyNet/utility/functions.h" #include "BaseGraph/types.h" #include "fixtures.hpp" using namespace ...
4,990
1,729
#include "foot_step_planner.hpp" #include <iostream> #include <fstream> #include <vector> #include <cmath> #include <Eigen/Dense> #include <Eigen/Geometry> using namespace Eigen; int main(int argc, char const *argv[]) { footStepPlanner(2.0,2.0,0.30); planAlongSpline(); system("sleep 0.1"); system("gnupl...
411
165
#include "gtfo/algorithm/count_if.hpp" #include "gtfo_testing/runtime/runtime_tests.hpp" using namespace gtfo::runtime_test_helpers; namespace { struct Foo { int x; Foo() : x(42) { } explicit Foo(int x) : x(x) { } }; class Bool { private: bool _value; publi...
930
368
//+--------------------------------------------------------------------------- // // Microsoft Forms // Copyright (C) Microsoft Corporation, 1992 - 1996. // // File: headfoot.cxx // // Contents: CHeaderFooterInfo // //---------------------------------------------------------------------------- #...
32,594
9,945
#include "stdafx_u.h" #include "StageSelect.h" #include "ParentSelectPanel.h" #include "InputManager.h" #include "SelectScreen.h" #include "ShakeComponent.h" #include "SelectPlayer.h" #include "SceneChangeAnimation.h" #include "GameSettings.h" #include"PauseManager.h" #include"Header/GameObjects/DefaultGameComponent/Ou...
9,723
3,504
#include "util/Cancellable.h" using namespace BeeeOn; Cancellable::~Cancellable() { }
88
36