text string | size int64 | token_count int64 |
|---|---|---|
#include <bits/stdc++.h>
using namespace std;
/*
最优解一定满足两个性质:
1. 长宽高排序之后答案不变
2. 答案就是排序之后每个长方体最大值之和(可以构成单调子序列的那些长方体)
*/
class Solution {
public:
int maxHeight(vector<vector<int>>& cuboids) {
int n = cuboids.size();
// 一定要用引用
for (auto& c : cuboids) {
sort(c.begin(), c.end());... | 890 | 411 |
/// @file
/// @brief Contains Switch::System::Windows::Forms::BorderStyle enum.
#pragma once
#include <Switch/System/Enum.hpp>
namespace Switch {
namespace System {
namespace Windows {
namespace Forms {
/// @brief Specifies the border styles for a form.
enum class FormBorderStyle {
... | 1,683 | 479 |
#include "com_wiyun_engine_actions_grid_Waves3D.h"
#include "wyWaves3D.h"
extern jfieldID g_fid_BaseObject_mPointer;
JNIEXPORT void JNICALL Java_com_wiyun_engine_actions_grid_Waves3D_nativeInit
(JNIEnv * env, jobject thiz, jfloat duration, jint gridX, jint gridY, jfloat amplitude, jint waves) {
wyWaves3D* g... | 474 | 196 |
// PUBG FULL SDK - Generated By Respecter (5.3.4.11 [06/03/2019]) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "PUBG_ReplayEditorStepperWidget_parameters.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Functions
//----------------------------------... | 5,248 | 1,671 |
#include "gui.hpp"
namespace K {}
| 35 | 14 |
#include "chunks.h"
#include <util/stream/output.h>
using namespace NSrvKernel;
template <>
void Out<TChunk>(TOutputStream& o, const TChunk& p) {
o.Write(p.Data(), p.Length());
}
template <>
void Out<TChunkList>(TOutputStream& o, const TChunkList& lst) {
for (TChunkList::TConstIterator it = lst.Begin(); it ... | 368 | 140 |
// Copyright 2015 Victor Smirnov
//
// 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... | 10,715 | 3,571 |
#include <assert.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <NTL/GF2X.h>
#include <NTL/GF2XFactoring.h>
#include <NTL/GF2E.h>
#include <NTL/GF2EX.h>
#include <NTL/GF2EXFactoring.h>
#include "gcm.h"
using namespace std;
using namespace NTL;
#defin... | 2,899 | 1,320 |
/****************************************************************************************
* @author: kzvd4729 created: Mar/22/2019 21:42
* solution_verdict: Accepted language: GNU C++14
* run... | 818 | 236 |
#include "stdafx.h"
#include "dio.h"
/*++
Routine Description:
Initializes WSA data / Winsock
Parameters:
None
Return Value:
None
--*/
void dio::InitializeNetwork()
{
WSAData WsaData;
WSAStartup(MAKEWORD(2, 2), &WsaData);
}
/*++
Routine Description:
Starts the Debug Server, which interfaces with the D... | 6,155 | 2,072 |
#include "Line.h"
/// <summary>
/// Construct a line from 2 Points.
/// </summary>
/// <param name="p1">point 1</param>
/// <param name="p2">point 2</param>
Line::Line(Point* p1, Point* p2) {
this->p1 = p1;
this->p2 = p2;
}
/// <summary>
/// Construct a line from the coordinate of 2 points.
/// </summary>
//... | 1,142 | 428 |
#include "luanics/testing/Tutorial.hpp"
#include <type_traits>
BEGIN_CHAPTER(Expressions)
// As a reminder...
// Decltype
//
// X (input) -> decltype(X) (output)
// =================================================
// identifier of type T -> T
// ----------------------------------------... | 1,385 | 489 |
#include "idtableproxymodel.hpp"
#include <vector>
#include "idtablebase.hpp"
void CSMWorld::IdTableProxyModel::updateColumnMap()
{
mColumnMap.clear();
if (mFilter)
{
std::vector<int> columns = mFilter->getReferencedColumns();
const IdTableBase& table = dynamic_cast<const IdTableBase&>... | 1,539 | 485 |
/*
* Copyright 2015 Your Name <your@email.address>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "GithubIssuesWindow.h"
#include "GithubRepository.h"
#include "Constants.h"
#include "IssuesContainerView.h"
#include <interface/MenuBar.h>
#include <interface/MenuItem.h>
#include... | 1,197 | 459 |
#include <sealib/flow/separator.h>
#include <gtest/gtest.h>
#include <sealib/iterator/dfs.h>
#include <cstdio>
#include <cstdlib>
#include <random>
#include <sealib/collection/bitset.h>
#include <sealib/graph/graphcreator.h>
namespace Sealib {
static uint64_t n = 50;
static uint64_t deg = 4;
TEST(SeparatorTest, VSep... | 4,013 | 1,489 |
//
// Copyright (C) 2004-2011 by Autodesk, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of version 2.1 of the GNU Lesser
// General Public License as published by the Free Software Foundation.
//
// This library is distributed in the hope that it will be use... | 1,826 | 550 |
/** \file NxOgreSimpleShape.cpp
* \see NxOgreSimpleShape.h
* \version 1.0-21
*
* \licence NxOgre a wrapper for the PhysX physics library.
* Copyright (C) 2005-8 Robin Southern of NxOgre.org http://www.nxogre.org
* This library is free software; you can redistribute it and/or
* ... | 2,818 | 812 |
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2015 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as p... | 2,225 | 708 |
// Copyright (c) 2021 Qizhou Guo
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "chtho/logging/Logger.h"
#include "chtho/logging/LogFile.h"
#include <memory>
#include <unistd.h>
std::unique_ptr<chtho::LogFile> logfile;
void outputFunc(const char* msg, int le... | 762 | 329 |
#include <bits/stdc++.h>
using namespace std;
//Identifica se é um palindromo
int main () {
string s; cin >> s;
int n = s.size();
//checo se é palindromo
bool ans = true;
for(int i = 0, j = n-1; i < j; i++, j--){
if(s[i] != s[j]){
ans = false;
}
}
if(ans) cout << "Palindromo\n";
else cout << "Nao eh\... | 325 | 160 |
#include "RtmpConnection.h"
#include "RtmpServer.h"
#include "RtmpPublisher.h"
#include "RtmpClient.h"
#include "net/Logger.h"
#include <random>
using namespace xop;
RtmpConnection::RtmpConnection(std::shared_ptr<RtmpServer> rtmp_server, TaskScheduler *task_scheduler, SOCKET sockfd)
: RtmpConnection(task_s... | 27,263 | 10,783 |
#ifndef YAKOVLEV_BASE
#define YAKOVLEV_BASE
#include <ios>
struct point_t
{
double x;
double y;
};
bool operator==(const point_t &lhs, const point_t &rhs);
bool operator!=(const point_t &lhs, const point_t &rhs);
std::ostream& operator<<(std::ostream &os, const point_t &point);
double getDistanceBetweenPoints... | 573 | 219 |
/**
* Copyright (c) 2009 Carnegie Mellon University.
* 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... | 4,497 | 1,384 |
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cstring>
#include <getopt.h>
using namespace std;
#include "utils.h"
#include "tree_reader.h"
#include "relabel.h"
#include "tree_utils.h"
#include "log.h"
void print_help() {
cout << "Taxon relabelling for trees." << endl;
... | 5,294 | 1,722 |
/// Copyright (c) 2019,2020 Lijiancong. All rights reserved.
///
/// Use of this source code is governed by a MIT license
/// that can be found in the License file.
#include "my_log/lazy_string.hpp"
#include <catch2/catch.hpp>
#include "profiler.hpp"
TEST_CASE("lazy_string", "[my_log][lazy_string]") {
{
PROFI... | 1,320 | 550 |
#include "g2oEdgeSE3Self.h"
#include "g2o/core/factory.h"
#include "g2o/stuff/macros.h"
namespace g2o
{
using namespace std;
using namespace Eigen;
//G2O_REGISTER_TYPE_GROUP(expmap2);
//G2O_REGISTER_TYPE(EDGE_SE3:EXPMAP2, EdgeSE3ProjectXYZRight2);
//G2O_REGISTER_TYPE(EDGE_SE3:EXPMAP2, EdgeSE3ProjectXYZRight);
//Edg... | 4,247 | 1,856 |
#include "libpre.h"
#include "fn_d3d.h"
#include "libpost.h"
#include "ogm/interpreter/Variable.hpp"
#include "ogm/common/error.hpp"
#include "ogm/common/util.hpp"
#include "ogm/interpreter/Executor.hpp"
#include "ogm/interpreter/execute.hpp"
#include "ogm/interpreter/display/Display.hpp"
#include "ogm/geometry/Ve... | 17,835 | 7,476 |
// mfcSimpleView.cpp : implementation of the CSimpleView class
//
// Copyright (c) 2001-2011 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//
#include "stdafx.h"
#include "mfcSimple.h"
#include "mfcSimpleDoc.h"
#include "mfcSimpleView.h"
bool CreateScene();
void CleanupScene();
// Heade... | 9,026 | 3,625 |
//
// Created by jakob on 09.03.22.
//
#include "ui_test.h"
| 61 | 34 |
// Copyright 2020 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/page_load_metrics/observers/javascript_frameworks_ukm_observer.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include... | 1,580 | 499 |
// ----------------------------------------------------------------------------
// ___ ___ ___ ___ ___ ____ ___ _ _
// /__/ /__/ / / /__ /__/ /__ / /_ / |/ /
// / / \ /__/ ___/ ___/ ___/ / /__ / / emulator
//
// -----------------------------------------------------------------... | 11,393 | 8,536 |
#include "router.hpp"
#include "route.hpp"
void Router::route(const std::string address, const std::function<std::string(void)> func) {
routes.emplace_back(address, func);
}
std::string Router::execute(const std::string address) const {
for (const auto& route : routes)
if (route.matches(address))
return route.... | 394 | 136 |
#include <mohansella/serial/Writer.hpp>
#include <mohansella/serial/ByteSerialType.hpp>
namespace mohansella::serial
{
Writer::Writer()
{
}
Writer::~Writer()
{
}
Writer & Writer::putNull()
{
std::uint8_t nullEnVal = ByteSerialType::BSTYPE_NULL;
return this->putRaw(&nullEnVal, sizeof(nullEnVal));
}
... | 2,547 | 1,051 |
//
// Created by 11409 on 2021/4/17.
//
#include <iostream>
#include <cstring>
#include "Game.hpp"
Game::Game(PointPtr* points, PArVecPtr* around, PDiVecPtr* diagonal)
{
this->allBoardPoints = points;
this->allAround = around;
this->allDiagonal = diagonal;
this->targetBlock = new GoBlock();
this->... | 9,998 | 3,191 |
#include <iostream>
int core(void)
{
std::cout << "This is a called function in vim" << std::endl;
std::cout << "This means I can just write code once and run it multiple times without hassle" << std::endl;
return 0;
}
int main()
{
core();
core();
bool condition;
condition = true;
if (condition = true) {
core... | 329 | 118 |
#include <cstdio>
#include "dlist.h"
using namespace std;
DListRet print_int(void *ctx, void *data, bool is_first)
{
if (is_first) {
printf("%d", *(int *)data);
} else {
printf(" - %d", *(int *)data);
}
return OK;
}
void print(DList *thiz) {
printf("size: %d, list: ", dlist_size(th... | 1,902 | 831 |
//Runtime error(MLE)
//209 / 211 test cases passed.
//time: O(N*k), space: O(k)
class Solution {
public:
int maxProfit(int k, vector<int>& prices) {
int n = prices.size();
//0th element for padding
vector<int> holds(k+1, INT_MIN);
vector<int> cashs(k+1, 0);
int ans = 0;
... | 5,651 | 1,875 |
/* ----------------------------------------------------------------------------
** Copyright (c) 2016 Austin Brunkhorst, All Rights Reserved.
**
** CursorType.cpp
** --------------------------------------------------------------------------*/
#include "Precompiled.h"
#include "CursorType.h"
CursorType::CursorType(co... | 1,142 | 364 |
/*
Copyright (c) 2012, SMB Phone Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the ... | 6,760 | 1,970 |
/*******************************************************************************
* Filename : fpbregisters.hpp
*
* Details : FPB. This header file is auto-generated for MSP432P401Y
* device.
*
*
*******************************************************************************/
#if !defined(FPB... | 6,890 | 3,181 |
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
//
#include "stdafx.h"
#include "../../../Source/Math/QuantizedOperations.h"
#include "../../../Source/Math/Helpers.h"
using namespace Microsoft::MSR::CNTK;
names... | 2,110 | 1,037 |
// ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_ProjPoop_parameters.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Functions
//-------------------------------------------------------------------------... | 1,286 | 444 |
/*
* Copyright (c) 2015 - 2022, Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "config.h"
#include <memory>
#include <fstream>
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "geopm_sched.h"
#include "geopm_test.hpp"
#include "Admin.hpp"
#include "geopm/Helper.hpp"
using geopm::A... | 6,103 | 2,306 |
//
// Created by Zen Liu on 2018-10-6.
//
#include "go_server.h"
#include "goserver.h"
bool GoServer::start(std::string port) {
return static_cast<bool>(goStartServer(const_cast<char *>(port.c_str())));
}
int GoServer::enableHttpServer(std::string dir) {
return int(goUseHttpServer(const_cast<char *>(dir.c_s... | 1,672 | 615 |
// borgwin2.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
#include <sstream>
namespace po = boost::program_options;
namespace bp = boost::process;
std::string cygwinDir = R"(c:\cygwin64\bin)";
std::string workingDir = "";
std::string pa... | 7,356 | 2,768 |
// Copyright Stefan Strasser 2010.
// Copyright Vicente J. Botet Escriba 2010.
// 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_TRANSACT_DETAIL_TAG_RESOURCE_PAIR_HPP
#defin... | 6,406 | 1,862 |
#include "ProcessFolders.h"
#include <cstdlib>
#include <io.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <set>
#include <fstream>
#include <boost/algorithm/string.hpp>
#if !defined (S_IWUSR)
#define S_IWUSR 00200 /* write permission: owner. */
#endif /* !S_IWUSR */
using namespace s... | 7,146 | 3,077 |
#include <FalconLibrary.h>
#include <benchmark/benchmark.h>
static void BM_ArcParam(benchmark::State& state) {
const fl::Pose2d initial{0.0, 0.0, fl::Rotation2d::FromDegrees(0.0)};
const fl::Pose2d final{10.0, 10.0, fl::Rotation2d::FromDegrees(45.0)};
const auto spline = std::make_shared<fl::ParametricQuin... | 535 | 237 |
#include <cassert>
#include <sstream>
#include <stdint.h>
#include <iostream>
#include <cerrno>
#include <stdexcept>
#include "circuit_data.hh"
#include "debug_utils.hh"
#include "mpnops.hh"
#include "prng.hh"
#include "utility.hh"
using namespace std;
static Prng &prng = Prng::global;
#define RETURN_IF_FALSE(file,... | 6,670 | 2,618 |
#include "graphics_bootstrapper.h"
#include "engine.h"
#include "graphics_glfw.h"
namespace engine {
void GraphicsBootstrapper::CameraMove(Point2Df position)
{
g_log("Calling bootstrapper function (graphics subsystem call before the graphics subsystem was bootstrapped): " __FUNCTION__, log::kError);
}
void Graphi... | 2,596 | 775 |
#include <streams/SentenceStringOutputStream.h>
namespace tokenize
{
}
| 71 | 24 |
// Ex10_02.cpp
// Dropping bricks safely from a tall building using valarray objects
#include <numeric> // For iota()
#include <iostream> // For standard streams
#include <iomanip> // For stream manipulators... | 2,262 | 716 |
#include <iostream>
using namespace std;
class Motor
{
public:
void SwitchIgnition()
{
cout << "Ignition On" << endl;
}
void PumpFuel()
{
cout << "Fuel in Cylinders" << endl;
}
void FireCylinders()
{
cout << "Boom" << endl;
}
};
class Car: private Motor
{
public:
void Move()
{
Sw... | 447 | 182 |
#include "Engine.h"
#include <exception>
Model::Model()
{
isLoaded = false;
scale = Vec3 (1,1,1);
originOffsetPos = Vec3 (0,0,0);
forward = Vec3 (0,0,-1);
strafe = Vec3 (1,0,0);
up = Vec3 (0,1,0);
azemuth = elevation = 0;
vbo = new cbmini::cbfw::VertexBuffer;
SetModelType(MODEL_TYPE_VTN);
}
Model::Model... | 8,336 | 3,977 |
#ifndef VALUE_STORE_VERBOSEVALUESTORE_HPP_
#define VALUE_STORE_VERBOSEVALUESTORE_HPP_
#include <memory>
#include <functional>
#include "ValueStore.hpp"
namespace sm {
namespace value_store {
namespace internal {
template <typename Base>
class VerboseValueStoreT : public Base {
public:
VerboseValueStoreT(std::shar... | 2,540 | 781 |
#include "Invocacion.h"
Invocacion :: Invocacion(string pNombre,string pNivel,string pNombrem,string pEspecie,string pHabilidad, string pTipo) : Poder(pNombre,pNivel){
nombrem=pNombrem;
especie=pEspecie;
}
string Invocacion::getNombrem(){
return nombrem;
}
string Invocacion::getEspecie(){
return especie... | 518 | 202 |
/**
* Copyright (C) JoyStream - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Bedeho Mender <bedeho.mender@gmail.com>, February 3 2017
*/
#include "PeerPluginStatus.hpp"
#include "libtorrent-node/utils.hpp"
#include "libt... | 1,184 | 442 |
#include "uchitelski-sustav.h"
#include <iostream>
using namespace std;
int main()
{
system("chcp 1251");
CUSustav uchSustav;
int c;
do {
cout <<endl;
cout << "0. Изход от програмата"<<endl;
cout << "1. Добавяне на нов учител"<<endl;
cout << "2. Покажи учител"<<endl;
cout << "... | 1,046 | 417 |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "host_api/impl/host_api_impl.hpp"
#include "crypto/bip39/impl/bip39_provider_impl.hpp"
#include "crypto/ed25519/ed25519_provider_impl.hpp"
#include "crypto/hasher/hasher_impl.hpp"
#include "crypto/pbkdf2/impl... | 18,125 | 6,335 |
/*
* Copyright (C) 2005 - 2012 MaNGOS <http://www.getmangos.com/>
*
* Copyright (C) 2008 - 2012 Trinity <http://www.trinitycore.org/>
*
* Copyright (C) 2010 - 2012 ArkCORE <http://www.arkania.net/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General P... | 570,872 | 261,401 |
#include <iostream>
#include "SEPUtil/Documents/JSON.h"
#include "SEPCore/ObjectModel/SR_SEPCore_Object.h"
#include "SEPCore/ObjectModel/SR_SEPCore_Property.h"
#include "SEPCore/ObjectModel/Serialization/SR_SEPCore_JSONObjectSerializer.h"
namespace sr {
namespace serialization {
using namespace sr::documents;
... | 4,632 | 1,098 |
// mojo/public/interfaces/bindings/tests/new_endpoint_types.test-mojom-shared.cc is auto generated by mojom_bindings_generator.py, do not edit
// 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 "... | 8,200 | 2,534 |
#include "Rotor.hpp"
Rotor::Rotor(string file_content)
: map_encode(ALPHABET_SIZE), map_decode(ALPHABET_SIZE), offset(0) {
// Initialise
istringstream content(file_content);
string num;
// Set map to input file given
for (int i = 0; i < ALPHABET_SIZE; i++) {
getline(content, num, INPUT_DELIM);
i... | 720 | 296 |
//Copyright (c) 2015 Christopher Johnstone(meson800) and Benedict Haefeli(jedidia)
//The MIT License - See ../../LICENSE for more info
#include "OrbiterDockingPort.h"
DockingPortStatus OrbiterDockingPort::returnStatus()
{
DockingPortStatus output;
output.docked = docked;
output.dockedTo = dockedTo;
ret... | 334 | 123 |
#include "pch.hpp"
#include <future>
#include <algorithm>
#include "include/Strings/Strings.hpp"
#include "include/Error/Error.hpp"
#include "include/WinHttp/WebSockets/AsyncWebSocket.hpp"
namespace Boring32::WinHttp::WebSockets
{
void AsyncWebSocket::StatusCallback(
HINTERNET hInternet,
DWORD_PTR dwCo... | 10,188 | 4,857 |
#include "Globals.h"
#include "Application.h"
#include "ModuleWindow.h"
ModuleWindow::ModuleWindow(Application* app, bool start_enabled) : Module(app, start_enabled)
{
window = NULL;
screen_surface = NULL;
}
// Destructor
ModuleWindow::~ModuleWindow()
{
}
// Called before render is available
bool ModuleWindow::In... | 2,037 | 894 |
#include <SignalObjectDoubles.hpp>
#include <Console.hpp>
#include <SimulinkInterface.hpp>
#include <SignalManager.hpp>
#include <Common.hpp>
SignalObjectDoubles::SignalObjectDoubles(){
this->numSamplesPerFile = 0;
this->numSignals = 0;
this->labels = "";
this->started = false;
this->filename = ""... | 6,958 | 2,317 |
#ifdef ZIMG_X86
#include <cstdint>
#include <immintrin.h>
#ifdef __clang__
#include <x86intrin.h>
#endif
#include "common/align.h"
#include "common/ccdep.h"
#define HAVE_CPU_SSE2
#define HAVE_CPU_AVX2
#include "common/x86util.h"
#undef HAVE_CPU_SSE2
#undef HAVE_CPU_AVX2
namespace zimg {
namespace depth {
namesp... | 16,496 | 8,029 |
#include <iomanip>
#include <iostream>
#include <opencv2/opencv.hpp>
#include "gist.h"
#include "standalone_image.h"
using namespace std;
using namespace cv;
using namespace cls;
const GISTParams DEFAULT_PARAMS{true, 32, 32, 4, 3, {8, 8, 4}};
int main(int argc, char *argv[]) {
Mat src = imread(argv[1]);
if (src... | 601 | 245 |
#include "IPointerUp.h"
LLWP::IPointerUp::IPointerUp()
{
}
| 60 | 31 |
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... | 7,726 | 3,258 |
#pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/NativeTypes.hpp>
#include <RED4ext/Scripting/Natives/Generated/HDRColor.hpp>
#include <RED4ext/Scripting/Natives/Generated/IAreaSettings.hpp>
namespace RED4ext
{
struct CBitmapTex... | 3,502 | 1,384 |
#include "LeetCodeLib.h"
class MyQueue {
public:
/** Initialize your data structure here. */
stack<int> reverse, order;
MyQueue() {
}
/** Push element x to the back of queue. */
void push(int x) {
restoreReverseElements();
reverse.push(x);
}
/** Removes the element from in front of queue and return... | 1,053 | 389 |
#include <QCoreApplication>
#include <QFile>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QFile file("../myxmlstream/my2.xml");
if (!file.open(QFile::WriteOnly | QFile::Text))
{
qDebug(... | 790 | 259 |
#include "proto/core/entity-system/interface.hh"
namespace proto {
// for doing things, that are usually done compile time, runtime
// i.e. type erasure at its best
struct _Runtime {
template<size_t I>
using CompAt = typename CompTList::template at_t<I>;
// get
template<t... | 2,323 | 712 |
//--------------------------------------------------------------------------
// File and Version Information:
// $Id: TrkDeadMaker.cc 104 2010-01-15 12:13:14Z stroili $
//
// Description:
//
// Environment:
// Software developed for the BaBar Detector at the SLAC B-Factory.
//
// Authors: Steve Schaffner
//
/... | 1,275 | 365 |
#include "arch/arm/registers.hh"
| 33 | 14 |
#include "AggressorOscSection.h"
//construction/destruction
AggressorOscSection::AggressorOscSection()
{
//init member variables:
slideTime = 0.5; //init slieTime to 0.5 seconds
sampleRate = 44100;
slideSamples = slideTime*sampleRate;
slideSampCount = 0;
syncMode = 0;
modulationMode = 0;
cur... | 29,688 | 12,516 |
#include "BasicCircular.h"
#include "../../Utils.h"
#include <cmath>
using namespace DNest4;
BasicCircular::BasicCircular(double x_min, double x_max,
double y_min, double y_max,
double mu_min, double mu_max)
:x_min(x_min)
,x_max(x_max)
,y_min(y_min)
,y_max(y_max)
,size(sqrt((x_max - x_min)*(y_max - y_min)))... | 2,209 | 1,114 |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... | 3,710 | 1,307 |
#include "programs/humsensor/humsensor.cpp" | 43 | 17 |
#pragma once
#include <jln/mp/algorithm.hpp>
#include <jln/mp/error.hpp>
#include <jln/mp/functional.hpp>
#include <jln/mp/list.hpp>
#include <jln/mp/number.hpp>
#include <jln/mp/utility.hpp>
#include <jln/mp/value.hpp>
| 221 | 99 |
#include <utility>
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>
#include <d3d11.h>
#include <dxgi.h>
#include <wrl.h>
using Microsoft::WRL::ComPtr;
static ComPtr<IDXGIFactory> s_DXGIFactory;
static ComPtr<ID3D11Device> s_D3D11Device;
static ComPtr<IDXGIOutput> s_CachedOutput;
extern "C" __dec... | 3,113 | 1,121 |
// Author: Wes Kendall
// Copyright 2011 www.mpitutorial.com
// This code is provided freely with the tutorials on mpitutorial.com. Feel
// free to modify it for your own use. Any distribution of the code must
// either provide a link to www.mpitutorial.com or keep this header intact.
//
// Ping pong example with MPI_S... | 1,874 | 689 |
/*
*
* HoughTransformAlgorithm.hh header template generated by fclass
* Creation date : Thu Mar 14 21:55:13 2013
* Copyright (c) CNRS / IPNL
* All Right Reserved.
*
* Use and copying of these libraries and preparation of derivative works
* based upon these libraries are permitted. Any copy of these libraries
*... | 3,835 | 1,575 |
#include "../../template.hpp"
bool IsPrime(int n) {
if (n <= 1) return false;
if (n <= 3) return true;
if (n % 2 == 0 or n % 3 == 0) return false;
for (int i = 5; i * i <= n; i += 6) {
if (n % i == 0 or n % (i + 2) == 0) {
return false;
}
}
return true;
}
bool IsCom... | 1,082 | 428 |
// Copyright (c) Microsoft Corporation and contributors. All Rights Reserved. See License.txt in the project root for license information.
#include "THSTorch.h"
#include "torch/torch.h"
#include "torch/cuda.h"
void THSTorch_seed(const int64_t seed)
{
torch::manual_seed(seed);
}
int THSTorchCuda_is_available()
... | 1,536 | 613 |
#include <World/World.hpp>
namespace ant{
World::World()
: id(0)
, eventQueue(std::make_shared<EventQueue>())
, entityManager(std::make_shared<EntityManager>())
, systemManager(std::make_unique<SystemManager>()){}
World::World(int id)
: id(id)
, eventQueue(std::make_shared<EventQueue>()... | 1,485 | 472 |
#include <stan/services/error_codes.hpp>
#include <stan/services/sample/standalone_gqs.hpp>
#include <stan/callbacks/stream_writer.hpp>
#include <stan/callbacks/stream_logger.hpp>
#include <stan/io/empty_var_context.hpp>
#include <stan/io/stan_csv_reader.hpp>
#include <test/test-models/good/services/bug_2390_gq.hpp>
#i... | 2,256 | 876 |
//customer.cpp
#include "customer.h"
Demo::Demo()
{
cout << "2. Now the constructor is running\n";
} | 103 | 38 |
//---------------------------------------------------------------------------
#include "parser/Parser.hpp"
#include <cassert>
#include <vector>
#include <memory>
//---------------------------------------------------------------------------
namespace pljit {
//------------------------------------------------------------... | 24,939 | 6,994 |
//
// main.cpp
// 310. Minimum Height Trees
//
// Created by 边俊林 on 2019/11/13.
// Copyright © 2019 边俊林. All rights reserved.
//
#include <map>
#include <set>
#include <queue>
#include <string>
#include <stack>
#include <vector>
#include <cstdio>
#include <numeric>
#include <cstdlib>
#include <utility>
#include <i... | 3,440 | 1,245 |
#include <array>
#include <iostream>
#include <utility.hxx>
#include <test_helpers.hxx>
#include <test_utility.hxx>
void test_utility()
{
int fail = 0;
fail = test_swap(fail);
fail = test_exchange(fail);
fail = test_forward(fail);
fail = test_move(fail);
fail = test_move_if_noexcept(fail);
if (fail ==... | 3,938 | 1,593 |
/**************************************************************
*
* 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 y... | 25,494 | 7,631 |
#include <cstring>
#include <mm_malloc.h>
#include <nnet/types.hpp>
nnet_float *nnet_malloc(size_t length)
{
return (nnet_float *)_mm_malloc(sizeof(nnet_float) * length, 32);
}
void nnet_free(nnet_float *ptr)
{
_mm_free(ptr);
}
void nnet_shuffle_instances(nnet_float *features, nnet_float *labels, size_t length, s... | 1,134 | 445 |
// T. M. Kelley (c) 2011 LANS LLC
#include "Particle.hh"
#include "RNG.hh"
#include "gtest/gtest.h"
#include "meshes/mesh_common/Vector.h"
TEST(nut_Particle, instantiation)
{
// for a very simple test, we can use a totally bogus RNG
typedef uint32_t rng_t;
typedef double fp_t;
using Vector = nut_mesh::Vector... | 634 | 311 |
// The MIT License (MIT)
//
// Copyright(c) 2015 huan.wang
//
// 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, ... | 2,859 | 989 |
/*
==========================================
Copyright (c) 2021 dynamic_static
Licensed under the MIT license
http://opensource.org/licenses/MIT
==========================================
*/
#include "dynamic_static/vulkan/framebuffer-utilities.hpp"
namespace dst {
namespace vk {
} // namespace vk
} //... | 335 | 97 |
//*******************************************************************
// Copyright (C) 2000 ImageLinks Inc.
//
// License: MIT
//
// See LICENSE.txt file in the top level directory for more details.
//
// Author: Oscar Kramer
//
//*******************************************************************
// $Id: ossimSlopeU... | 12,130 | 4,308 |
#include "graph_scene.h"
#include <opencv2/imgproc/imgproc.hpp>
#include <QGraphicsSceneMouseEvent>
#include <QtCore>
#include <opencv2/highgui.hpp>
#include <iostream>
#include <unistd.h>
using std::string;
using namespace cv;
void GraphScreen::add_text(int mx,int my, int size,QString text_content){
std::cout<<"... | 968 | 360 |