text string | size int64 | token_count int64 |
|---|---|---|
#include "ParserSIVOP.h"
ParserSI::kaStatus
ParserSIVOP::Parse(GDT_HW_GENERATION hwGen, Instruction::instruction32bit hexInstruction, Instruction*& instruction, bool, uint32_t, int iLabel /*=NO_LABEL*/ , int iGotoLabel /*=NO_LABEL*/)
{
kaStatus retStatus = ParserSI::Status_32BitInstructionNotSupported;
VOPIn... | 7,212 | 2,506 |
#include <torch/csrc/jit/codegen/cuda/dispatch.h>
#include <torch/csrc/jit/codegen/cuda/fusion.h>
#include <torch/csrc/jit/codegen/cuda/ir_all_nodes.h>
#include <torch/csrc/jit/codegen/cuda/ir_cloner.h>
#include <torch/csrc/jit/codegen/cuda/ir_printer.h>
#include <torch/csrc/jit/codegen/cuda/mutator.h>
#include <torc... | 5,801 | 2,126 |
// Copyright 2021 The Pigweed Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | 919 | 282 |
/*
author: Susmoy Sen Gupta
email: susmoy.cse@gmail.com
github: github.com/SusmoySenGupta
Judge: Codeforces
problem no: 1618A
problem name: Polycarp and Sums of Subsequences
problem link: https://codeforces.com/problemset/problem/1618/A
Status: ____
Solved at: __
*/
#include <iost... | 791 | 330 |
#include "flow_driver.h"
#include <algorithm>
#include <limits>
#include "../common/logging.h"
#include "packet.h"
namespace ncode {
namespace htsim {
void ManualFlowDriver::AddData(const std::vector<AddDataEvent>& events) {
add_data_events_.insert(add_data_events_.end(), events.begin(), events.end());
std::sta... | 7,462 | 2,556 |
//! \file tao/algorithm/adjacent_swap.hpp
// Tao.Algorithm
//
// Copyright (c) 2016-2021 Fernando Pelliccioni.
//
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef TAO_ALGORITHM_ADJACENT_SWAP_HPP_
#define TAO_ALGORITHM_ADJ... | 37,463 | 14,576 |
//=---------------------------------------------------------------------=
//
// $Id$ $Name$
//
// The contents of this file are subject to the AAF SDK Public Source
// License Agreement Version 2.0 (the "License"); You may not use this
// file except in compliance with the License. The License is available
// in AAFSD... | 26,218 | 8,992 |
#include<cstdio>
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<vector>
#define UNDEF 9999
using namespace std;
class Data {
public:
Data(size_t s) {
_cols = new int[s];
}
const int operator[] (size_t i) const { return _cols[i]; }
int& operator[] (size_t i) { r... | 5,321 | 1,976 |
#pragma once
#include <array>
#include <cstdint>
#include "state_structs.hpp"
#pragma pack(push, 1)
struct SaveGameArenaRuleset
{
uint8_t unknown1;
uint8_t unknown12;
uint8_t timer;
uint8_t timer_ending;
uint8_t wins;
uint8_t lives;
uint8_t unknown7;
uint8_t unknown8;
std::array<... | 4,318 | 1,657 |
#include "boost/sml/back/policies.hpp"
#include "boost/sml/front/actions/defer.hpp"
template <class T>
struct thread_safe : aux::pair<back::thread_safety_policy__, thread_safe<T>> {
using type = T;
};
template <template <class...> class T>
struct defer_queue : aux::pair<back::defer_queue_policy__, defer_queue<T>> {... | 614 | 223 |
#include <bits/stdc++.h>
using namespace std;
int n; char A[120][120];
int dfs(int y, int x, char c) {
if (A[y][x] != c) return 0;
A[y][x] = -1;
int r = 1;
if (x > 0) r += dfs(y, x-1, c);
if (x<n-1) r += dfs(y, x+1, c);
if (y > 0) r += dfs(y-1, x, c);
if (y<n-1) r += dfs(y+1, x, c);
re... | 1,132 | 504 |
#ifndef NETWORK_EVENT_H_
#define NETWORK_EVENT_H_
#include <vector>
#include "Types.hpp"
#include "ClientHandle.hpp"
#include "ServerHandle.hpp"
#include "RemoteConnectionHandle.hpp"
namespace ice_engine
{
namespace networking
{
enum EventType
{
UNKNOWN = 0,
SERVERDISCONNECT,
CLIENTDISCONNECT,
SERVERCONNEC... | 772 | 290 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* _______ _ *
* ( ____ \ ( \ |\ /| *
* | ( \/ | ( ( \ / ) *
* | (__ ... | 4,031 | 1,131 |
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation... | 5,637 | 1,904 |
//=======================================================================
// Copyright 2015 - 2020 Jeff Linahan
//
// 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)
//===============================================... | 33,384 | 11,546 |
#include "TestDefs.h"
#include "Meteorites.CpuSolvers/GoldSolver.h"
TEST_CLASS(GoldSolverTests)
{
public:
TEST_METHOD(Vacuum_VerticalSpeed)
{
GoldSolver solver(GoldSolver::ONE_STEP_ADAMS);
solver.Configure(dt_sim, 3600.0f);
Case problem(1.0f, 0.0f, 2000.0f, 0.0f, 0.0f,
1.... | 9,417 | 3,886 |
//===----------------------------------------------------------------------===//
// Copyright (c) 2020 PolarAI. All rights reserved.
//
// Licensed under MIT license.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
//... | 21,399 | 6,049 |
/*
* HexitecThresholdPlugin.cpp
*
* Created on: 11 Jul 2018
* Author: Christian Angelsen
*/
#include <HexitecThresholdPlugin.h>
#include "version.h"
namespace FrameProcessor
{
const std::string HexitecThresholdPlugin::CONFIG_THRESHOLD_MODE = "threshold_mode";
const std::string HexitecThr... | 14,232 | 4,692 |
#include <gtest/gtest.h>
#include "1663-Smallest-String-With-A-Given-Numeric-Value.cpp"
#define LEETCODE_TEST(SolutionX) \
TEST(SmallestStringWithAGivenNumericValueTest, SolutionX) { \
SolutionX s; \
EXPECT_EQ("aay", s.getSmallestStri... | 490 | 184 |
#include "LinkQueue.h"
LinkQueue::LinkQueue() {
this->head = nullptr;
this->tail = nullptr;
this->length = 0;
}
int LinkQueue::len() {
return this->length;
}
void LinkQueue::push(int value) {
Node *appendElement = new Node();
appendElement->value = value;
if (this->length == 0) {
... | 928 | 299 |
#define _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS 1
#include <vector>
#include <Windows.h>
#include "WinHttp.hpp"
#include "testmessage.pb.h"
#pragma comment(lib, "winhttp.lib")
int main(int argc, char** args)
{
TestMessage ts;
ts.set_sometext("poop");
WinHttp::WinHttpWebSocket ws(L"https://127.0.0.1", 51... | 893 | 341 |
/*
** EPITECH PROJECT, 2019
** OOP_arcade_2019
** File description:
** Vector.hpp
*/
#ifndef _VECTOR_HPP_
# define _VECTOR_HPP_
struct posVector {
posVector() = default;
posVector(const posVector& other) = default;
posVector& operator=(const posVector& other) = default;
~posVector() = default;
fl... | 351 | 135 |
#include "Player.h"
Player::Player(std::string name, Color color, bool is_bot) : name(name), points(0), color(color), is_bot(is_bot) {}
std::string Player::GetName() {
return name;
}
int Player::GetPoints() {
return points;
}
void Player::AddPoints(int point) {
points += point;
}
Color Player::GetColor() {
... | 1,331 | 512 |
#include "precompiled.h"
#pragma hdrstop
#include "GLGraphicsContext.h"
#include <spdlog/spdlog.h>
#include "Modules/Graphics/GraphicsSystem/FrameStats.h"
#include "Exceptions/exceptions.h"
#include "options.h"
GLGraphicsContext::GLGraphicsContext(SDL_Window* window)
: m_window(window)
{
spdlog::info("Creating... | 14,820 | 5,131 |
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "TopDownARPGGameMode.h"
#include "TopDownARPGPlayerController.h"
#include "TopDownARPGCharacter.h"
#include "UObject/ConstructorHelpers.h"
#include "TopDownARPG.h"
#include "Engine/World.h"
ATopDownARPGGameMode::ATopDownARPGGameMode()
{
// use our... | 1,620 | 599 |
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <Eigen/Dense>
#include <vtkPolyDataReader.h>
#include <vtkPolyDataWriter.h>
#include <vtkPolyData.h>
#include <vtkCellArray.h>
#include <vtkDoubleA... | 3,705 | 1,271 |
#include "StdAfx.h"
#ifdef _SS_UNITTESTS
#include ".\indexstorage_test.h"
#include ".\test_const.h"
#include ".\console.h"
#include ".\index_storage.h"
#include ".\data_storages_factory.h"
CPPUNIT_TEST_SUITE_REGISTRATION(SS::UnitTests::NdxSE::NdxDataStorage::CIndexStorage_test);
typedef HRESULT (*CREATE_INSTANCE)(c... | 2,516 | 936 |
// Copyright (c) 2018 - 2019 AccelByte Inc. All Rights Reserved.
// This is licensed software from AccelByte Inc, for limitations
// and restrictions contact your company contract manager.
#include "Api/AccelByteItemApi.h"
#include "Core/AccelByteError.h"
#include "JsonUtilities.h"
#include "Core/AccelByteRegistry.h"
... | 9,142 | 3,294 |
/*****************************************************************/
/* NAME: Michael Benjamin */
/* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */
/* FILE: FldNodeComms.cpp */
/* DATE: Dec 4th 2011 ... | 27,285 | 9,419 |
/**
* @file
* Simple transform components.
*
*
*/
#include "engine/engine.h"
#include "serverbase/model.h"
/// base class for all transforms which sets up common parameters
class SimpleTransformComponentType : public ComponentType {
public:
SimpleTransformComponentType(const char *name) : ComponentType(nam... | 3,738 | 1,217 |
//
// Created by zeph on 11/25/16.
//
/*
* In the interview prep at coogle, Sam Greenfiled pointed out that
* o map's basic operations run in O(log n) since it's backed by a BST
* while
* o unordered_map's is a true hash table with O(1) operations
*
* Let's test this theory out.
*/
#include <iostream>
#i... | 4,005 | 1,379 |
#ifndef _DESTINATION_
#define _DESTINATION_
enum Destination
{
EARTH,
VULCAN,
ROMULUS,
REMUS,
UNICOMPLEX,
JUPITER,
BABEL
};
#endif | 153 | 85 |
#include "com_trolltech_qt_webkit0.h"
#include <PythonQtConversion.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtSignalReceiver.h>
#include <QGraphicsScene>
#include <QVariant>
#include <qaction.h>
#include <qbackingstore.h>
#include <qbitmap.h>
#include <qbytearray.h>
#include <qcoreevent.h>
#include <qcursor.h... | 228,084 | 76,205 |
#include <vector>
#include <iostream>
#include <type_traits>
#include "string_sim.hpp"
using namespace std;
namespace rj = rapidjson;
StringSim::StringSim() {
input.insert(pair <string, rj::Value> ("Double", rj::Value()));
output.insert(pair <string, rj::Value> ("String", rj::Value(rj::kObjectType)));
ou... | 9,013 | 3,263 |
#include <QString>
#include <QtTest>
#include <QSqlQuery>
#include "../../components/metadataengine.h"
#include "../../components/databasemanager.h"
class MetadataEngineTest : public QObject
{
Q_OBJECT
public:
MetadataEngineTest();
~MetadataEngineTest();
private Q_SLOTS:
void testCollectionI... | 15,956 | 4,540 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT
#include "gtest/gtest.h"
#include <http/http.hpp>
#include <string>
#include <vector>
using namespace Azure::Core;
TEST(Http_Request, getters)
{
Http::HttpMethod httpMethod = Http::HttpMethod::Get;
std::string url = "htt... | 4,051 | 1,482 |
#include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> vi{1,2,3,4,5};
auto iter = vi.begin();
while(iter != vi.end() ){ //endless loo
iter = vi.insert(iter, *iter);
cout << *iter << endl;
}
++iter;
return 0;
}
| 258 | 116 |
//======== (C) Copyright 1999, 2000 Valve, L.L.C. All rights reserved. ========
//
// The copyright to the contents herein is the property of Valve, L.L.C.
// The contents may be used and/or copied only with the written permission of
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in
// the ... | 1,116 | 383 |
/*******************************************************************************
* Copyright (c) 2015-2017 Vanamco AG, http://www.vanamco.com
*
* The MIT License (MIT)
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software... | 11,860 | 4,051 |
/// \headerfile SBProxy.hpp "SBProxy.hpp"
#include "SBProxy.hpp"
/// \headerfile SEDSDNACreatorEditor.hpp "SEDSDNACreatorEditor.hpp"
#include "SEDSDNACreatorEditor.hpp"
// Class descriptor
// SAMSON Element generator pro tip: complete this descriptor to expose this class to SAMSON and other SAMSON Elements
SB_CLAS... | 614 | 256 |
/*
Name: Prop.cpp
Author: Faure Systems <dev at faure dot systems>
Editor: https://github.com/fauresystems
License: MIT License (c) Faure Systems <dev at faure dot systems>
Base class to make prop sketch for Escape Room 2.0 (connected).
*/
#include "Prop.h"
#if defined(__AVR__)
#include <avr/wdt.h>
#en... | 4,771 | 1,817 |
#include "dd3d.h"
#include "connection.h"
#include "crypt.h"
#include "m_user.h"
#include "log.h"
#include "c_handshake.h"
bool c_handshake_handler(void* message, uint32_t message_size) {
bool rv = false;
if (message_size == 4 + RSA_SIZE) {
uint8_t key[RSA_SIZE];
int key_size = crypt_rsa_private_decrypt(utils_p... | 881 | 421 |
//#####################################################################
// Copyright 2002-2007, Robert Bridson, Ronald Fedkiw, Eran Guendelman, Geoffrey Irving, Nipun Kwatra, Neil Molino, Andrew Selle, Jonathan Su, Joseph Teran.
// This file is part of PhysBAM whose distribution is governed by the license contained in ... | 5,715 | 2,227 |
// Copyright Carl Philipp Reh 2009 - 2018.
// 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 FCPPT_MATH_MATRIX_HAS_DIM_HPP_INCLUDED
#define FCPPT_MATH_MATRIX_HAS_DIM_HPP_INCLUDED
#in... | 1,300 | 562 |
/*
* Copyright (C) 2020 Jaslo Ziska
*
* This file is part of cuda-wrapper.
*
* This software may be modified and distributed under the terms of the
* 3-clause BSD license. See accompanying file LICENSE for details.
*/
#define BOOST_TEST_MODULE stream
#include <boost/test/unit_test.hpp>
#include <algorithm>
#i... | 6,482 | 2,292 |
/* Copyright (c) 2005, Regents of Massachusetts Institute of Technology,
* Brandeis University, Brown University, and University of Massachusetts
* Boston. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... | 44,789 | 17,447 |
#pragma once
#include <raylib.h>
#include <algorithm>
#include <vector>
#include "raymath.hpp"
struct Sprite
{
enum Type { Unused, Alien, Player, ColonyShip, AlienShot, AlienBomb, PlayerShot, DotParticle };
Type _type{Unused};
Vector2 _pos{};
Vector2 _velocity{};
Rectangle _sprite{};
Rectangle... | 2,807 | 984 |
/*
* Copyright (c) 2006, Ondrej Danek (www.ondrej-danek.net)
* 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, ... | 6,514 | 2,022 |
/* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2015, xuewen.chu
* 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 sourc... | 8,868 | 3,891 |
//
// video_two_pass_effect.cpp
// DTLiving
//
// Created by Dan Jiang on 2020/4/15.
// Copyright © 2020 Dan Thought Studio. All rights reserved.
//
#include "video_two_pass_effect.h"
#include "video_texture_cache.h"
namespace dtliving {
namespace effect {
VideoTwoPassEffect::VideoTwoPassEffect(std::string name... | 4,342 | 1,483 |
//
// Created by andrew on 2020/12/13.
//
#include <iostream>
extern "C" {
#include <libavformat/avformat.h>
#include <libavutil/log.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avio.h>
#include <libavutil/file.h>
#include <cstdio>
}
using namespace std;
// 为mmap buffer定义一个结构体指针用户管理数据
struct buffer_data... | 3,962 | 1,535 |
/**
* MIT License
*
* Copyright (c) 2018–2019 Shunsuke Kanda
*
* 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, c... | 13,585 | 4,995 |
class Solution {
public:
string getSmallestString(int n, int k) {
//initialising a string of length n and filling it with 'a'
string result(n, 'a');
//numeric value of 'a' = 1, the numeric value of the resulting string will become k-n as we have
//filled all with 'a', so k = k - (1... | 926 | 303 |
/*
* ReprojectionError3DImpl.hpp
*
* Copyright(C) 2014, University of Oulu, all rights reserved.
* Copyright(C) 2014, NVIDIA Corporation, all rights reserved.
* Third party copyrights are property of their respective owners.
* Contact: Daniel Herrera C. (dherrera@ee.oulu.fi),
* Kihwan Kim(kihwank@nvidia... | 4,076 | 1,730 |
#include "BlastActorFactory.h"
#include "BlastMesh.h"
#include "BlastMeshActor.h"
#include "BlastMeshComponent.h"
#define LOCTEXT_NAMESPACE "Blast"
/*-----------------------------------------------------------------------------
UActorFactoryBlastMesh
-------------------------------------------------------------------... | 1,935 | 690 |
/*
* Copyright (C) 2013, British Broadcasting Corporation
* All Rights Reserved.
*
* Author: Philip de Nier
*
* 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 t... | 10,258 | 4,197 |
#ifndef EXPLICIT_MODEL_HPP_b3428474_754b_11e0_a55e_8fd394202658
#define EXPLICIT_MODEL_HPP_b3428474_754b_11e0_a55e_8fd394202658
/**
* \file explicit_model.hpp
* \brief EXPLICIT Initialization model
* \author Sergey Miryanov (sergey-miryanov), sergey.miryanov@gmail.com
* \date 03.05.2011
* ... | 799 | 363 |
/*
* Copyright (C) 2010 The Android Open Source Project
*
* 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 applic... | 28,716 | 11,972 |
// Copyright (c) 2013, The Toft Authors.
// All rights reserved.
//
// Author: Ye Shunping <yeshunping@gmail.com>
#include "toft/storage/sharding/sharding.h"
namespace toft {
ShardingPolicy::ShardingPolicy() : shard_num_(1) {
}
ShardingPolicy::~ShardingPolicy() {
}
} // namespace util
| 292 | 112 |
#include <iostream>
using namespace std;
double sum_recursive(int n)
{
if (n <= 0) {
return 0.0;
} else {
cout << "1/" << n << (n!=1 ? " + " : " = "); // just for debugging
return (1.0 / double(n)) + sum_recursive(n-1);
}
}
int main()
{
int x;
cin>>x;
cout... | 387 | 149 |
#include <header.hpp>
int main() {
const int L1 = 128;
const int L2 = 12288;
int *values = new int(9);
int k = 16;
filling_arr(values, count(L1, L2), k);
values[8] = pow(2, 20)*3;
print(values, count(L1, L2), std::cout);
delete(values);
// apple silicon 2 уровня кэша, первый = 128кб, второй = 8мб
... | 392 | 199 |
//【AT3918】Infinite Coins - 洛谷 - Wa
#include <iostream>
int main() {
int n, m;
std::cin >> n >> m;
std::cout << (n % 500 <= m ? "Yes" : "No") << std::endl;
} | 161 | 81 |
#include "type/comparison.hpp"
#include "irt/size-analyser.hpp"
#include "irt/translator/utils.hpp"
#include "irt/translator/expr.hpp"
#include "irt/translator/bool-expr.hpp"
#include "irt/translator/lvalue.hpp"
ExprTranslator::ExprTranslator(Generator& gen, Map<IRTStruct>& structs) :
gen(gen),
structs(structs),
r... | 7,389 | 3,108 |
#include "everything.h"
using namespace diy;
int main(int argc, char* argv[]) {
//
// reverse the stream of numbers coming in..
}
| 135 | 47 |
#include "LoadedSQLData.h"
QMap<int, QString> IzSQLUtilities::LoadedSQLData::indexColumnMap() const
{
return m_indexColumnMap;
}
void IzSQLUtilities::LoadedSQLData::setIndexColumnMap(const QMap<int, QString>& indexColumnMap)
{
m_indexColumnMap = indexColumnMap;
}
void IzSQLUtilities::LoadedSQLData::addRow(s... | 1,002 | 354 |
#include <iostream>
using namespace std;
//PAT Advanced No.1010 “一元多项式求导”
int main() {
int c, i;
bool flag = false;
//利用输入动作触发输入循环
while (cin >> c >> i) {
if (c != 0 && i != 0) {
if (flag)
cout << ' ';
else
flag = true;
cout << c * i << ' ' << i - 1;
}
//注意题设中的指数递降,也就是如果第一次就输入指数为0即触发零多项式判断
... | 409 | 255 |
// Copyright (c) 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 <memory>
#include "base/command_line.h"
#include "base/macros.h"
#include "components/component_updater/configurator_impl.h"
#include "testi... | 1,683 | 564 |
#pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//General Purpose Input_Output Port (PG)
namespace PgData{ ///<PG Data Register
using Addr = Register::Address<0x400c0600,0xfffffffe,0x00000000,unsigned>;
///PG0
constexpr Register::FieldLocation<Addr,Register::maskFromRange... | 2,353 | 847 |
#include "SonarControl.h"
SonarControl::SonarControl(ros::NodeHandle* n){
ros::NodeHandle nh("~");
nh.param("cloudSubscribeTopic_", cloudSubscribeTopic_, string("/Sonar/Scan/SonarCloud"));
nh.param("cloudPublishTopic_", cloudPublishTopic_, string("/SonarControl/Cloud"));
}
int main (int argc, char** argv){
}
| 317 | 124 |
#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4530) // C++ exception handler used, but unwind semantics not enabled
#endif
#include "DEMRenderTarget.h"
#include <Render/GPUDriver.h>
#include <UI/CEGUI/DEMGeometryBuffer.h>
#include <glm/gtc/matrix_transform.hpp>
namespace CEGUI
{
CDEMRen... | 3,780 | 1,519 |
#include "readrope.h"
int main(int argc, char** argv)
{
/*
************************************************************
Initialize read rope system
*************************************************************
*/
//initialize read rope system
ReadRope::InitReadRopeSystem();
/*
****************... | 4,367 | 1,618 |
/*================================================================================
code generated by: java2cpp
author: Zoran Angelov, mailto://baldzar@gmail.com
class: android.text.InputFilter
================================================================================*/
#ifndef J2CPP_INCLUDE_IMPLEME... | 6,940 | 2,754 |
#include "Precomp.h"
#include "NStatLogFile.h"
#include "VM/NativeFunc.h"
#include "Engine.h"
void NStatLogFile::RegisterFunctions()
{
RegisterVMNativeFunc_0("StatLogFile", "CloseLog", &NStatLogFile::CloseLog, 0);
RegisterVMNativeFunc_0("StatLogFile", "FileFlush", &NStatLogFile::FileFlush, 0);
RegisterVMNativeFunc... | 1,372 | 511 |
/********************************************************************
* DAF.cpp: define DAF *
* 2018 Hui *
********************************************************************/
#include "DAF.h"
#include "time.h"
//... | 14,090 | 5,532 |
#include <string.h>
#include "sscapi.h"
#include "vartab.h"
#include "core.h"
#include "tcs_trough_physical_input.h"
using namespace std;
/**
* Custom Testing Handler that does nothing
*/
void var(var_table* vt, string name, string value){
var_data* vd = new var_data(value);
vt->assign(name, *vd);
}
void var(v... | 2,269 | 1,192 |
#include <boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp>
| 63 | 27 |
#include <iostream>
#include "functions.h"
/**
*
* https://en.wikipedia.org/wiki/Divided_differences
*/
double dividedDifference(double (*f)(double), double *x, int n) {
double sum = 0.0;
for(int j = 0; j < n; ++j) {
double product = 1.0;
for(int k = 0; k < n; ++k) {
if(k != j) ... | 884 | 353 |
//Runtime: 132 ms, faster than 5.57% of C++ online submissions for Insertion Sort List.
//Memory Usage: 8.6 MB, less than 100.00% of C++ online submissions for Insertion Sort List.
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next... | 1,348 | 418 |
#include "stdafx.h"
int main()
{
printf("CppConsoleApp\n");
return 0;
}
| 75 | 37 |
/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/DOM/AbortSignal.h>
#include <LibWeb/DOM/DOMEventListener.h>
#include <LibWeb/DOM/IDLEventListener.h>
namespace Web::DOM {
DOMEventListener::DOMEventListener() = default;
DOMEventListener::~D... | 351 | 140 |
/*
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 ... | 3,195 | 1,204 |
//--------------------------------------------------------------------------
// File and Version Information:
// $Id: AbsDetEnv.cc 483 2010-01-13 14:03:08Z stroili $
//
// Description:
// Class AbsDetEnv
//
// Abstract class for detector envirnoments. Individual
// detectors' environment classes will inheri... | 2,155 | 606 |
/* VKGL (c) 2018 Dominik Witczak
*
* This code is licensed under MIT license (see LICENSE.txt for details)
*/
#include "OpenGL/entrypoints/GL3.0/gl_uniform_2ui.h"
#include "OpenGL/context.h"
#include "OpenGL/globals.h"
static bool validate(OpenGL::Context* in_context_ptr,
const GLint& in_lo... | 2,256 | 653 |
#include "day19.h"
#include "../utils/aocutils.h"
#include <iostream>
#include <fstream>
int main(void)
{
std::ifstream ifs("input.txt");
std::vector<std::string> path = AOCUtils::parseByLines<std::string>(ifs, [](const std::string& s) -> std::string {return s;});
std::pair<std::string, int> result = Day19::so... | 430 | 164 |
#include <iostream>
using namespace std;
int main()
{
int h1 = 0;
int m1 = 0;
int s1 = 0;
int h2 = 0;
int m2 = 0;
int s2 = 0;
int a = 0;
cin >> h1 >> m1 >> s1 >> h2 >> m2 >> s2;
a = abs((h1 * 3600 + m1 * 60 + s1) - (h2 * 3600 + m2 * 60 + s2));
cout << a;
} | 286 | 163 |
/*
==============================================================================
This file is part of the juce_core module of the JUCE library.
Copyright (c) 2013 - Raw Material Software Ltd.
Permission to use, copy, modify, and/or distribute this software for any purpose with
or without fee is... | 29,668 | 8,937 |
#include "StringUtils.h"
#include <Windows.h>
std::string toUtf8(const std::wstring & aSrcWide)
{
auto srcLength = static_cast<int>(aSrcWide.length()) + 1;
auto len = WideCharToMultiByte(CP_UTF8, 0, aSrcWide.c_str(), srcLength, nullptr, 0, 0, nullptr);
std::string res(len, '\0');
WideCharToMultiB... | 751 | 332 |
#include <iostream>
using namespace std;
int main()
{
int x;
for (x = 1; x <=20; x++)
{
if (x == 3 || x == 11 || x == 16)
{
continue;
}
cout << x << endl;
}
return 0;
}
| 258 | 103 |
/* * * * *
* AzTET_Eval_Dflt.hpp
* Copyright (C) 2011, 2012 Rie Johnson
*
* 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 3 of the License, or
* (at your option) any... | 4,241 | 1,644 |
// Generated by Haxe 4.1.5
#include <hxcpp.h>
#ifndef INCLUDED_openfl_ui_Keyboard
#include <openfl/ui/Keyboard.h>
#endif
HX_LOCAL_STACK_FRAME(_hx_pos_410ccb691917537a_815___getCharCode,"openfl.ui.Keyboard","__getCharCode",0x5c5ae14e,"openfl.ui.Keyboard.__getCharCode","openfl/ui/Keyboard.hx",815,0x5fb867bb)
namespace ... | 8,559 | 4,113 |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode*... | 939 | 281 |
#include "cilk.hpp"
double sum_array_cilk(double* __restrict__ a, uint64_t lo, uint64_t hi) {
cilk::reducer_opadd<double> sum(0);
cilk_for (uint64_t i = 0; i != hi; i++) {
*sum += a[i];
}
return sum.get_value();
}
int main() {
size_t nb_items = taskparts::cmdline::parse_or_default_long("n", 100 * 1000 *... | 644 | 303 |
#include <pch_test.h>
#include <util/math.h>
using namespace msdb::core;
TEST(util_math, msb_char)
{
// 0111 1000
EXPECT_EQ(msb<char>(120, 1), 7);
EXPECT_EQ(msb<char>(120, 2), 6);
EXPECT_EQ(msb<char>(120, 3), 5);
EXPECT_EQ(msb<char>(120, 4), 4);
EXPECT_EQ(msb<char>(120, 5), 0);
// 0101 0101
EXPECT_EQ(msb<cha... | 5,158 | 3,072 |
#define HELPER_OVERLAPPED_SESSION_CALL_C_0( )
#define HELPER_OVERLAPPED_SESSION_CALL_A_0( )
#define HELPER_OVERLAPPED_SESSION_CALL_P_0( )
#define HELPER_OVERLAPPED_SESSION_CALL_I_0( )
#define HELPER_OVERLAPPED_SESSION_CALL_M_0( )
#define DECLARE_OVERLAPPED_SESSION_CALL_0( XCallNameFN_T ) \
struct XCallNameFN... | 31,717 | 13,619 |
//
// FILE NAME: TestCIDLib_PerThreadData.cpp
//
// AUTHOR: Dean Roddey
//
// CREATED: 01/29/1998
//
// COPYRIGHT: Charmed Quark Systems, Ltd @ 2019
//
// This file is part of a demonstration program of the CIDLib C++
// Frameworks. Its contents are distributed 'as is', to provide guidance on
// the use of the CIDLi... | 7,905 | 2,627 |
#include "Log/Log.h"
#include "Window/DesktopWindow.h"
#include "Render/SoftRasterizer.h"
#include "Render/SoftTriangle.h"
#include "Geometry/Vertex.h"
#include "Geometry/Triangle.h"
#include "Geometry/Sphere.h"
#include "Geometry/Tetrahedra.h"
#include "Geometry/MeshOperation/Delaunay3D.h"
using namespace Rocket;
#... | 6,256 | 2,348 |
/*
* MainWindow.cpp
* !CHOAS
* Created by Bisegni Claudio.
*
* Copyright 2012 INFN, National Institute of Nuclear Physics
*
* 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... | 15,548 | 4,713 |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... | 7,082 | 2,369 |
/*
**
** Copyright 2009, The Android Open Source Project
**
** 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 appl... | 104,341 | 35,274 |
#include <salmap_rv/include/salmap_rv_interface.hpp>
#include <salmap_rv/include/salmap.hpp>
#include <salmap_rv/include/itti_salmap.hpp>
#include <salmap_rv/include/param_set.hpp>
#include <salmap_rv/include/util_functs.hpp>
using namespace salmap_rv;
int salmap_vers( )
{
return salmap_rv::SalMap::VERSION;
}
vo... | 2,824 | 1,128 |