text string | size int64 | token_count int64 |
|---|---|---|
// pch_std.cpp
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// pch_std.cpp -- pre-compiled headers -- non-clr compiles
// =========== ----------------------------------------
//
//
///////////////////////... | 501 | 119 |
// Copyright(c) 2019, NVIDIA CORPORATION. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required b... | 5,922 | 1,850 |
/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*/
#include "schema/vnc_cfg_types.h"
#include <pugixml/pugixml.hpp>
#include "base/logging.h"
#include "ifmap/ifmap_server_parser.h"
#include "ifmap/ifmap_server_table.h"
#include "testing/gunit.h"
using namespace std;
class DisplayNameTest : pub... | 1,367 | 469 |
#include "pch.h" // enable for visual studio version >= 2019
// #include "stdafx.h" // enable for visual studio version < 2019
#include "GetLastErrorToString.h"
GetLastErrorToString::operator CString()
{
CreateMsg();
return m_msg;
}
GetLastErrorToString::operator LPCTSTR()
{
CreateMsg();
return (LPCTSTR)m_msg;
... | 800 | 350 |
#include <QCoreApplication>
#include <QString>
#include <QDateTime>
#include <QDebug>
#include "core.h"
#include "commonutil.h"
int main(int argc, char** argv)
{
// Q_UNUSED(argc);
// Q_UNUSED(argv);
//
qInstallMessageHandler(myMessageOutput);
QCoreApplication app(argc, argv);
Core::getInstan... | 361 | 133 |
#define CATCH_CONFIG_PREFIX_ALL
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#include "perceive/contrib/catch.hpp"
#include "perceive/optimization/kz-filter.hpp"
namespace perceive
{
// ------------------------------------------------------------------- TEST_CASE
//
CATCH_TEST_CAS... | 545 | 193 |
#include "qak_plugin.h"
#include "maskedmousearea.h"
#include "propertytoggle.h"
#include "resource.h"
#include "store.h"
#include <qqml.h>
void QakPlugin::registerTypes(const char *uri)
{
// @uri Qak
qmlRegisterType<MaskedMouseArea>(uri, 1, 0, "MaskedMouseArea");
qmlRegisterType<Resource>(uri, 1, 0, "Res... | 446 | 173 |
#include <utility>
#include <vector>
#include <gtest/gtest.h>
#include <entt/signal/sigh.hpp>
struct sigh_listener {
static void f(int &v) { v = 42; }
bool g(int) { k = !k; return true; }
bool h(const int &) { return k; }
void i() {}
// useless definition just because msvc does weird things if bo... | 10,237 | 4,193 |
/*
* 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 m... | 9,980 | 3,289 |
/** @file ImmutableListTests.cpp
*
* Unit tests for pistis::util::ImmutableList
*/
#include <pistis/util/ImmutableList.hpp>
#include <pistis/exceptions/OutOfRangeError.hpp>
#include <pistis/testing/Allocator.hpp>
#include <gtest/gtest.h>
#include <sstream>
#include <stdint.h>
using namespace pistis::exceptions;
u... | 11,142 | 4,441 |
#include <iostream>
#include "funciones.h"
using namespace std;
int main()
{
//initialize values
// State variable X is [position, velocity]
double y = 8.5 ;
double t = 0;
double dt = 0.1;
while(y>0){
cout<<y<<" "<<t<<endl;
y = rungeKutta(t,0.1,20,y)[0];
t = rungeKutta(t,0.1,20,... | 345 | 156 |
#include "main.h"
#include <natus/application/global.h>
#include <natus/application/app.h>
#include <natus/tool/imgui/sprite_editor.h>
#include <natus/device/global.h>
#include <natus/gfx/camera/pinhole_camera.h>
#include <natus/graphics/shader/nsl_bridge.hpp>
#include <natus/graphics/variable/variable_set.hpp>
#i... | 9,138 | 3,062 |
//
// Copyright (C) 2004 Andras Varga
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program i... | 7,019 | 2,321 |
#include "gtest/gtest.h"
#include <string>
#include "csimsbw.h"
#include "csim/error_codes.h"
// generated with test resource locations
#include "test_resources.h"
TEST(SBW, model_string) {
char* modelString;
int length;
int code = csim_serialiseCellmlFromUrl(
TestResources::getLocation(... | 505 | 177 |
// Copyright © 2017-2020 Khaos Wallet.
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
#include "Signer.h"
#include "Address.h"
#include "../Publi... | 1,822 | 557 |
/*
Given an integer array of size n, find all elements that appear more than ? n/3 ? times.
Note: The algorithm should run in linear time and in O(1) space.
Runtime: 16 ms, faster than 87.33% of C++ online submissions for Majority Element II.
Memory Usage: 10.7 MB, less than 50.89% of C++ online submissions for Majori... | 748 | 287 |
#include "PCU.h"
#include "parma_dcpart.h"
#include "parma_commons.h"
#include "parma_convert.h"
#include <maximalIndependentSet/mis.h>
#include <pcu_util.h>
typedef std::map<unsigned, unsigned> muu;
namespace {
bool isInMis(muu& mt) {
unsigned seed = TO_UINT(PCU_Comm_Self()+1);
mis_init(seed);
misLuby:... | 2,934 | 1,129 |
/*
*
* Copyright (C) 1997-2010, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
*
* OFFIS e.V.
* R&D Division Health
* Escherweg 2
* D-26121 Oldenburg, Germany
*
*
* Module: ofstd
*
* Author: Andreas Ba... | 2,457 | 1,031 |
//=============================================================================================================
/**
* @file gpuinterpolationitem.cpp
* @author Lars Debor <lars.debor@tu-ilmenau.de>;
* Matti Hamalainen <msh@nmr.mgh.harvard.edu>
* @version 1.0
* @date October, 2017
*
* @section LICEN... | 9,172 | 2,468 |
/// @file
///
/// Copyright Matus Chochlik.
/// 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
///
#include <eagine/app/context.hpp>
#include <eagine/extract.hpp>
#include <eagine/integer_range.hpp>
#include <eag... | 25,800 | 7,141 |
#include "FontCache.h"
using Gdiplus::FontStyleRegular;
using Gdiplus::UnitPixel;
using Gdiplus::UnitPoint;
using Gdiplus::FontCollection;
namespace PRImA
{
/*
* Class CFontCache
*
* Static cache for fonts used in Aletheia
*
* CC 05.10.2011 - created
*/
const wchar_t * CFontCache::FONT_ALETHEIA_SANS = _T("Ale... | 5,891 | 2,347 |
/**
* \date 2014-08-04
* \brief Implementation of OpenGeoSys simulation application
*
* \copyright
* Copyright (c) 2012-2020, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.o... | 9,544 | 2,840 |
/*
Dwarf Therapist
Copyright (c) 2018 Clement Vuchener
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, pub... | 2,289 | 754 |
#include "duckdb/execution/operator/set/physical_recursive_cte.hpp"
#include "duckdb/common/vector_operations/vector_operations.hpp"
#include "duckdb/common/types/chunk_collection.hpp"
#include "duckdb/execution/aggregate_hashtable.hpp"
#include "duckdb/parallel/pipeline.hpp"
#include "duckdb/storage/buffer_manager.h... | 4,989 | 1,679 |
class MedicalLarge
{
name = $STR_ZECCUP_MedicalLarge;
// EAST
class Hospital_CUP_O_TK {
name = $STR_ZECCUP_MilitaryDesert_MedicalLarge_Hospital_CUP_O_TK; // Credit: 2600K
icon = "\ca\data\flag_rus_co.paa";
side = 8;
class Object0 {side = 8; vehicle = "TK_WarfareBFieldhHospital_Base_EP1";... | 13,904 | 6,827 |
#include <mud/core.h>
#include <19_multi_viewport/19_multi_viewport.h>
#include <03_materials/03_materials.h>
using namespace mud;
size_t viewport_mode(Widget& parent)
{
std::vector<size_t> num_viewer_vals = { 1, 2, 4 };
ui::label(parent, "num viewports : ");
static uint32_t choice = 1;
ui::radio_switch(parent,... | 2,170 | 1,025 |
// Distributed under the MIT License.
// See LICENSE.txt for details.
/// \file
/// Defines function for taking the determinant of a rank-2 tensor
#pragma once
#include "DataStructures/Tensor/Tensor.hpp"
#include "Utilities/Gsl.hpp"
namespace detail {
template <typename Symm, typename Index, typename = std::nullptr... | 5,922 | 2,383 |
#include <iostream>
#include <string>
#include "gtest/gtest.h"
#include "sequential-search.h"
#include "binary-search-tree.h"
#include "red-black-tree.h"
TEST (SEQUENTIAL, TEST_CASE_001) {
BaseSearch *search = new SequentialSearch();
EXPECT_EQ(0, 0);
}
TEST (BINARY_SEARCH_TREE, TEST_CASE_001) {
int sear... | 1,861 | 764 |
#include "ws.h"
#include "WL_DEF.H"
ws_GBuffer ws_gbuffer;
std::vector<ws_PointLight> ws_active_lights;
GLuint ws_create_sphere()
{
GLuint handle;
glGenBuffers(1, &handle);
glBindBuffer(GL_ARRAY_BUFFER, handle);
ws_Vector3 *pVertices = new ws_Vector3[WS_SPHERE_VERT_COUNT];
int hseg... | 8,040 | 3,251 |
/*
* Copyright 2020-2021 AVSystem <avsystem@avsystem.com>
*
* 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 ap... | 4,155 | 1,357 |
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
proto_model.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2007-03-08.
Revision History:
--*/
#include"proto_model.h"
#include"model_params.hpp"
#include"ast_pp.h"
#include"ast_ll_pp.h"
#include"var_subst.h"
#include"array_dec... | 23,026 | 7,571 |
// Copyright 2015 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 "remoting/test/app_remoting_service_urls.h"
#include "base/logging.h"
#include "base/strings/stringprintf.h"
namespace {
// The placeholder is ... | 2,703 | 786 |
// file: send_message.cpp
//
// LCM example program.
//
// compile with:
// $ g++ -o send_message send_message.cpp -llcm
//
// On a system with pkg-config, you can also use:
// $ g++ -o send_message send_message.cpp `pkg-config --cflags --libs lcm`
#include <ctime>
#include <lcm/lcm-cpp.hpp>
#include <unistd.h>
#inc... | 681 | 273 |
// Copyright 2017 Google LLC
//
// 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 wr... | 45,964 | 28,216 |
/**
* \copyright
* Copyright (c) 2012-2017, 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 "VectorMatrixAssembler.h"
#include <cass... | 5,491 | 1,978 |
/**
* Copyright (c) 2012 - 2014 TideSDK contributors
* http://www.tidesdk.org
* Includes modified sources under the Apache 2 License
* Copyright (c) 2008 - 2012 Appcelerator Inc
* Refer to LICENSE for details of distribution and use.
**/
#include <tide/tide.h>
#include "resultset_binding.h"
#include <Poco/Data/M... | 7,426 | 2,196 |
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Curves_on_surface_topology.h>
#include <CGAL/Path_on_surface.h>
#include <CGAL/squared_distance_3.h>
#include <CGAL/draw_face_graph_with_paths.h>
#include <fstream>
using Mesh = CGAL::Surface_mesh<CGAL::Simple_cartesian<doubl... | 2,091 | 823 |
#include "PrimitiveMesh.h"
#include "Geometry.h"
namespace Havana::Tools
{
namespace
{
using namespace Math;
using namespace DirectX;
using primitive_mesh_creator = void(*)(Scene&, const PrimitiveInitInfo& info);
void CreatePlane(Scene& scene, const PrimitiveInitInfo& info);
void CreateCube(Scene& scene, ... | 9,253 | 4,498 |
/***************************************************************************
XML Configuration File Handling.
Load Settings.
Load & Save Hi-Scores.
Copyright Chris White.
See license.txt for more details.
***************************************************************************/
// see: http://... | 16,935 | 5,783 |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/tabs/tab_strip_model_stats_recorder.h"
#include <algorithm>
#include <utility>
#include "base/check.h"
#include "base/memory... | 5,428 | 1,775 |
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Damien P. George
*
* 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 th... | 3,130 | 1,183 |
/* Ricochet - https://ricochet.im/
* Copyright (C) 2014, John Brooks <john.brooks@dereferenced.net>
*
* 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 ... | 22,847 | 6,401 |
//! @file Font.hpp
#pragma once
#include "../main.hpp"
class Font {
private:
Font() = default;
Font(const char* _name);
Font(const Font&) = delete;
Font(Font&&) = delete;
virtual ~Font();
Font& operator=(const Font&) = delete;
Font& operator=(Font&&) = delete;
public:
//! built-in font
static const char* ... | 1,136 | 396 |
// Copyright (c) 2020 [Your Name]. All rights reserved.
#include <sudoku/sudoku_parser.h>
#include <iostream>
#include <fstream>
void HandleFile(std::string puzzle);
int main(int argc, char** argv) {
// There is always at least 1 argument -- the name of the program which we
// don't care about
if (argc == 1) {... | 876 | 315 |
/**
* \file
*
* \copyright
* Copyright (c) 2012-2019, 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 "PorousMediaProperties.h"
na... | 1,733 | 534 |
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int foo_1_6_11z() {
double a, b, c, d, e, f, x, y;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> f;
x = (e*d - b*f) / (d*a - b*c);
y = (a*f - e*c) / (d*a - b*c);
cout << x << " " << y <... | 329 | 162 |
#include <imgui/imgui.h>
#include "terrain_editor.h"
#include "editor/asset_browser.h"
#include "editor/asset_compiler.h"
#include "editor/entity_folders.h"
#include "editor/prefab_system.h"
#include "editor/studio_app.h"
#include "editor/utils.h"
#include "engine/crc32.h"
#include "engine/crt.h"
#include "engine/engi... | 53,038 | 23,625 |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
#include "extern/beatsaber-hook/shared/utils/byref.hpp"
// Including type: UnityEngine.Ne... | 21,971 | 5,974 |
#include "estimators.h"
| 24 | 11 |
////////////////////////////////////////////////////////////////////////////////
// TensionFieldTheory.hh
////////////////////////////////////////////////////////////////////////////////
/*! @file
// Implements a field theory relaxed energy density for a fully generic,
// potentially anisotropic, 2D "C-based" energy ... | 11,956 | 4,179 |
#include "XBaseParser.h"
#include <vector>
#include <string>
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <io.h>
#else
#include <unistd.h>
#endif
#include <fcntl.h>
#include <osg/Notify>
namespace ESRIShape
{
void XBaseHeader::print()
{... | 8,119 | 2,513 |
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* 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 ... | 7,764 | 2,933 |
/* This file is part of LeagueSkinChanger by b3akers, licensed under the MIT license:
*
* MIT License
*
* Copyright (c) b3akers 2020
*
* 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 ... | 3,624 | 1,289 |
/*
* Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
*/
#include "base/os.h"
#include "testing/gunit.h"
#include <base/logging.h>
#include <io/event_manager.h>
#include <io/test/event_manager_test.h>
#include <tbb/task.h>
#include <base/task.h>
#include <cmn/agent_cmn.h>
#include "cfg/cfg_init.h"
#... | 6,573 | 2,593 |
/**
* Copyright (c) 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... | 2,298 | 783 |
#include <stdio.h>
char word[1005][1005];
int main() {
int n, m, i, j;
int idx[1005];
while(scanf("%d %d", &n, &m) == 2) {
while(getchar() != '\n');
gets(word[0]);
idx[0] = 0;
for(i = 1; i < n; i++) {
int cnt = 0;
gets(word[i]);
for(j = 0;... | 601 | 266 |
#pragma once
#include "../base_def.hpp"
#include "LolLootPlayerLoot.hpp"
namespace lol {
struct LolLootPlayerLootMap {
int64_t version;
std::map<std::string, LolLootPlayerLoot> playerLoot;
};
inline void to_json(json& j, const LolLootPlayerLootMap& v) {
j["version"] = v.version;
j["playerLoot"... | 551 | 226 |
#include <stdio.h>
#include <unistd.h>
#include "tool/cli/CliRecv.h"
#include "tool/cli/CliSend.h"
int
main(int argc, char* argv[])
{
int pid = getpid();
air::CliResult* cli_result = new air::CliResult{};
air::CliSend* cli_send = new air::CliSend{cli_result, pid};
air::CliRecv* cli_recv = new air::Cl... | 629 | 262 |
// Copyright 2019 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 "google_apis/gaia/core_account_id.h"
#include "base/check.h"
namespace {
// Returns whether the string looks like an email (the test is
// crud... | 2,488 | 803 |
// Copyright 2014 MongoDB Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... | 3,328 | 1,011 |
#include <gtest/gtest.h>
#include <eigenml/decision_tree/decision_tree_traits.hpp>
#include <eigenml/decision_tree/splitting/find_thresholds.hpp>
#include <eigenml/decision_tree/splitting/criteria.hpp>
using namespace eigenml;
using namespace eigenml::decision_tree;
typedef tree_traits<ModelType::kSupervisedClassifie... | 2,320 | 891 |
// Copyright 2020 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... | 5,021 | 1,588 |
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/system/unified/unified_system_tray_view.h"
#include "ash/public/cpp/app_list/app_list_features.h"
#include "ash/system/tray/interacted_by_t... | 7,348 | 2,405 |
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
#include "export.hpp"
#include "videoReader.hpp"
#include "netStreamReader.hpp"
#include "avWriter.hpp"
#include "libvideostitch/logging.hpp"
#include "libvideostitch/output.hpp"
#include "libvideostitch/plugin.hpp"
#include "libvideostitch/ptv... | 4,150 | 1,298 |
// Copyright (C) 2019 Google LLC
//
// 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... | 29,450 | 11,514 |
/* ***** 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... | 21,557 | 9,958 |
/**
* PowerMeter API
* API
*
* The version of the OpenAPI document: 2021.4.1
*
* NOTE: This class is auto generated by OpenAPI-Generator 4.3.1.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "PinEnergy.h"
namespace powermeter {
namespace model {
PinEnergy::PinEnergy()
{
... | 26,817 | 9,751 |
/*************************************************************************
* *
* Vega FEM Simulation Library Version 4.0 *
* *
* "getopts" library... | 7,643 | 2,167 |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html
#include "precomp.hpp"
#include "opencl_kernels_core.hpp"
namespace cv { namespace hal {
#if CV_NEON
template<typename T> s... | 25,244 | 8,300 |
#ifndef acommon_filter_char_hh
#define acommon_filter_char_hh
// This file is part of The New Aspell
// Copyright (C) 2002 by Kevin Atkinson under the GNU LGPL license
// version 2.0 or 2.1. You should have received a copy of the LGPL
// license along with this library if you did not you can find
// it at http://www.... | 1,464 | 490 |
// container-with-most-water
// Problem Statement: https://leetcode.com/problems/container-with-most-water
#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
int maxArea(vector<int>& height) {
if(height.size() < 1)
return 0;
int left = 0;
int right =... | 704 | 221 |
/*
* Copyright (c) 2021 Florian Dollinger - dollinger.florian@gmx.de
* All rights reserved.
*/
// Copyright (c) 2018 - for information on the respective copyright owner
// see the NOTICE file and/or the repository https://github.com/boschresearch/fmi_adapter.
//
// Licensed under the Apache License, Version 2.0 ... | 15,681 | 5,345 |
/*
* Copyright (c) 2008-2016, Integrity Project Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list ... | 3,559 | 1,313 |
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2019.
#include "FMODEvent.h"
#include "FMODStudioModule.h"
#include "fmod_studio.hpp"
UFMODEvent::UFMODEvent(const FObjectInitializer &ObjectInitializer)
: Super(ObjectInitializer)
{
}
/** Get tags to show in content view */
void UFMODEvent::Get... | 2,229 | 700 |
// This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2016 Daniele Panozzo <daniele.panozzo@gmail.com>
//
// 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 with this file, You can
// obtain one at ht... | 1,379 | 557 |
#include <boost/coroutine/all.hpp>
#include <cstdlib>
#include <iostream>
#include <boost/bind.hpp>
#include "X.h"
typedef boost::coroutines::asymmetric_coroutine< X& >::pull_type pull_coro_t;
typedef boost::coroutines::asymmetric_coroutine< X& >::push_type push_coro_t;
void fn1( push_coro_t & sink)
{
for ( in... | 994 | 396 |
// $flisboac 2018-01-14
#include "adl_catch.hpp"
#include "adl/oct/cpu/closure_oper.hpp"
#include "adl/oct/cpu/add_cons_close_oper.hpp"
#include "adl/oct/cons.hpp"
#include "adl/oct/system.hpp"
#include "adl/oct/cpu/dense_dbm.hpp"
#include "adl/oct/cpu/seq_context.hpp"
using namespace adl::oct;
using namespace adl::o... | 2,841 | 1,143 |
// Copyright Carl Philipp Reh 2006 - 2019.
// 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)
#include <sge/opengl/call.hpp>
#include <sge/opengl/check_state.hpp>
#include <sge/opengl/color_bas... | 2,032 | 807 |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "droplabel.h"
#include "processdialog.h"
#include "preferencesdialog.h"
#include "aboutdialog.h"
#include "processmodemodel.h"
#include <QFileDialog>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
m_settings... | 4,818 | 1,458 |
#include "pch.h"
#include "DependencyDestructor.h"
DependencyDestructor::DependencyDestructor(UniqueFunction<void(Object&, void*)> aDestroyFunc) noexcept
: myDestroyFunc(std::move(aDestroyFunc))
{}
void DependencyDestructor::Destroy(Object& aObject, SComponent& aComponent)
{
myDestroyFunc(aObject, &aComponent);
}
... | 454 | 160 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2017 Sylko Olzscher
*
*/
#ifndef CYNG_ASYNC_TASK_BUILDER_HPP
#define CYNG_ASYNC_TASK_BUILDER_HPP
#include <cyng/async/task/task.hpp>
#include <cyng/async/mux.h>
#include <chrono>
namespace cyng
{
namespace async
{
/**
* Create a new task class
*/
t... | 1,991 | 882 |
// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited.
// Edits need to be made to the proto files
// (see
// https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/action_server/action_server.proto)
#include <iomanip>
#include "action_server_impl.h"
#include "plugins/action_server/action_serve... | 6,281 | 1,908 |
#include <GL/glut.h>
#include <stdlib.h>
#include <time.h>
#include <ctime>
#include "spaceship.hpp"
MySpaceShip::MySpaceShip()
{
//Setup Quadric Object
pObj = gluNewQuadric();
gluQuadricNormals(pObj, GLU_SMOOTH);
posx = 0.0f;
posy = 10.0f;
posz = 2.0f;
roty = 0.0f;
//initial velocity (in u... | 4,753 | 2,769 |
#pragma once
#include <graphene/chain/protocol/base.hpp>
#include <graphene/chain/sidechain_defs.hpp>
#include <fc/safe.hpp>
namespace graphene { namespace chain {
struct son_wallet_withdraw_create_operation : public base_operation
{
struct fee_parameters_type { uint64_t fee = 0; };
asset fe... | 2,006 | 667 |
// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... | 2,633 | 916 |
/*
Idea:
- Dynamic Programming
- If you reach the base case in the recursion, then
you have an answer, so print it.
- This method work if the dynamic programming answer
is true or false.
*/
#include <bits/stdc++.h>
using namespace std;
int const N = 1e5 + 1;
int n, a[N], dp[N][6];
vector<in... | 1,305 | 592 |
//*****************************************************************************
// Copyright 2017-2020 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://w... | 1,987 | 494 |
#include "../../include/gui/PlayingScreen.h"
/* Derived-screen-specific additional frame processing for display*/
void PlayingScreen::processFrame(Mat& frame, const TrackingInfo& tracker) const {
drawTrackingMarker (
frame,
tracker.current()
);
}
void PlayingScreen::drawTrackingMarker(Mat& fra... | 555 | 169 |
/**
* @brief Parallel TDMA test subroutine
* @author Ji-Hoon Kang (jhkang@kisti.re.kr), Korea Institute of Science and Technology Information
* @date 15 January 2019
* @version 0.1
* @par Copyright
Copyright (c) 2019 by Ji-Hoon Kang. All rights reserved.
* @par ... | 2,233 | 1,052 |
// Copyright (c) 2020-2021 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <bench/bench.h>
#include <coins.h>
#include <dsproof/dsproof.h>
#include <key.h>
#include <primitives/transaction.h>
#inc... | 2,787 | 1,017 |
#include "CameraController.h"
#include "GraphicsSystem.h"
#include "OgreCamera.h"
#include "OgreWindow.h"
using namespace Demo;
namespace Demo
{
CameraController::CameraController( GraphicsSystem *graphicsSystem, bool useSceneNode ) :
mUseSceneNode( useSceneNode ),
mSpeedMofifier( false ),
... | 4,650 | 1,478 |
/************************************************************
************************************************************/
#include "fft.h"
/************************************************************
************************************************************/
/******************************
*********************... | 2,075 | 803 |
/*
Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters.
Letters are case sensitive, for example, "Aa" is not considered a palindrome here.
Example 1:
Input: s = "abccccdd"
Output: 7
Explanation:
One longest palindrome ... | 1,132 | 361 |
/* GammaTable.cpp */
//----------------------------------------------------------------------------------------
//
// Project: CCore 3.00
//
// Tag: Desktop
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
// Copyr... | 1,385 | 489 |
/*
* This file is part of lslidar_c16 driver.
*
* The driver 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 later version.
*
* The driver is ... | 10,695 | 3,898 |
/*---------------------------------------------------------------------------*\
Copyright (C) 2011 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of CAELUS.
CAELUS is free software: you can redistribute it and/or modify it
under... | 10,047 | 3,228 |
//
// FILE NAME: GenProtoS_CallResponse.cpp
//
// AUTHOR: Dean Roddey
//
// CREATED: 11/24/2003
//
// COPYRIGHT: Charmed Quark Systems, Ltd @ 2020
//
// This software is copyrighted by 'Charmed Quark Systems, Ltd' and
// the author (Dean Roddey.) It is licensed under the MIT Open Source
// license:
//
// https://op... | 5,797 | 2,043 |
#include "ltr559.hpp"
#include <algorithm>
namespace pimoroni {
lookup::lookup(std::initializer_list<uint16_t> values) : lut(values) {
}
uint8_t lookup::index(uint16_t value) {
auto it = find(lut.begin(), lut.end(), value);
if(it == lut.end())
return 0;
return it - lut.begin();
}
uint16... | 8,607 | 4,126 |
#include<iostream>
using namespace std;
int main()
{
int ncase;
cin>>ncase;
while(ncase--)
{
int q1,r1,q2,r2;
cin>>q1>>r1>>q2>>r2;
int divisor[2000] = {},smaller,larger;
if(q1 - r1 > q2 - r2)
{
larger = q1 - r1;
smaller = q2 - r2;
... | 749 | 278 |
#include "widget.h"
Widget::Widget(QWidget *parent): QWidget(parent)
{
QVBoxLayout *l = new QVBoxLayout(this);
le = new QLineEdit(this);
label = new QLabel("Placeholder",this);
labelTime = new QLabel(this);
le->setValidator(new QIntValidator(0,100000,this));
l->addWidget(le);
l->addWidget(... | 916 | 353 |