text string | size int64 | token_count int64 |
|---|---|---|
#include "DailyDataEntry.h"
//splits the input string by spaces
//returns a vector of words
vector<string> splitStringBySpaces(string str)
{
//declaration of empty vector
//will contain words
vector<string> singleDayEntry;
//initialized new word
string word = "";
//traverse input string
f... | 2,456 | 703 |
//
// Copyright (c) 2008-2017 the Urho3D project.
//
// 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, m... | 10,105 | 2,883 |
// 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 "core/css/cssom/CSSLengthValue.h"
#include "bindings/core/v8/ExceptionState.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/cssom/... | 2,662 | 811 |
/*
MIT License
Android remote Viewer, GUI ADB tools
Android Viewer developed to view and control your android device from a PC.
ADB exchange Android Viewer, support scale view, input tap from mouse,
input swipe from keyboard, save/copy screenshot, etc..
Copyright (c) 2016-2019 PS
GitHub: ... | 3,101 | 1,109 |
class Solution {
public:
bool wordPattern(string pattern, string str) {
vector<string> words = split(str, ' ');
map<char, string> table;
if (pattern.size() != words.size()) {
return false;
}
for (auto i = 0; i < pattern.size(); ++ i) {
auto c ... | 1,120 | 308 |
// Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and
// other Axom Project Developers. See the top-level COPYRIGHT file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)
#ifndef AXOM_ARRAY_HPP_
#define AXOM_ARRAY_HPP_
#include "axom/config.hpp" // for compile-time defi... | 29,858 | 9,535 |
//
//
//
#ifndef LIBLED_ROW_HELP_HPP
#define LIBLED_ROW_HELP_HPP
namespace libled
{
namespace row
{
template <typename info_t>
struct help_t
{
static std::size_t size (const info_t &info) {return info.size ();}
//
static bool test (const info_t &info, std::size_t index)
{return... | 580 | 212 |
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2021 Scipp contributors (https://github.com/scipp)
/// @file
/// @author Matthew Andrew
#include "scipp/dataset/util.h"
#include "scipp/variable/arithmetic.h"
#include "scipp/variable/misc_operations.h"
#include "scipp/variable/reduction.h"
#include "scipp/varia... | 2,830 | 974 |
#include "unity.h"
#include "UartCom.h"
#include "unity_runner/UnityRunner.h"
#include <stdio.h>
/**
* This is just to have something changed in the output
*/
void PrintIncrementedNumber()
{
static int i {};
static char buf[2+sizeof(i)*10/3];
sprintf(buf, "%d", ++i);
UartCom::SendString(buf);
}
in... | 859 | 299 |
#include "drivers/Battery.hpp"
Battery::Battery()
: lastReadPercentage(0.0f), rawVoltage(0) {
// init analog pin
}
void Battery::update() {
// read analog pin
lastReadPercentage = 100.0;
rawVoltage = 255;
}
float Battery::getBattPercentage() {
return lastReadPercentage;
}
uint8_t Battery::ge... | 428 | 175 |
// This file is automatically generated at compile-time to include some subset of the user-created cpp files.
#include "E:\Unreal Projects\github\DriftGame\Plugins\AdvancedSessions\AdvancedSessions\Intermediate\Build\Win64\UE4Editor\Inc\AdvancedSessions\AdvancedExternalUILibrary.gen.cpp"
#include "E:\Unreal Projects\gi... | 3,893 | 1,320 |
// QoS_Manager.cpp
// $Id: QoS_Manager.cpp 80826 2008-03-04 14:51:23Z wotte $
#include "QoS_Manager.h"
#include "ace/Log_Msg.h"
ACE_RCSID(ace, QoS_Manager, "$Id: QoS_Manager.cpp 80826 2008-03-04 14:51:23Z wotte $")
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_QOS_MANAGER)
ACE_QoS_Manage... | 1,043 | 462 |
/*
* Copyright (c) 2012 Daisuke Okanohara
*
* 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 a... | 1,797 | 626 |
/*
* DbgCliCmdLedSet.cpp
*
* Created on: 01.11.2019
* Author: nid
*/
#include "DbgCliCmdIndSet.h"
#include <string.h>
#include <DbgCliNode.h>
#include <DbgCliTopic.h>
#include <DbgCliCommand.h>
#include <DbgTracePort.h>
#include <DbgTraceContext.h>
#include <DbgTraceOut.h>
#include <DbgPrintConsole.h>
#inc... | 1,807 | 736 |
// Copyright (c) 2013 The Chromium OS 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 "mist/usb_device_event_notifier.h"
#include <limits>
#include <base/logging.h>
#include <base/strings/string_number_conversions.h>
#incl... | 8,350 | 2,665 |
#include "VuMeter.h"
#include <QtGui/QPainter>
namespace Limitless
{
VuMeter::VuMeter(QWidget *parent): QWidget(parent)
{
m_backgroundColor=QColor(0, 0, 0);
m_cellColor=QColor(80, 80, 80);
m_highColor=Qt::red;
m_color=Qt::yellow;
m_lowColor=Qt::green;
m_maxiumValue=1.0f;
m_minimumValue=0.0f;
m_value=0.0f;... | 4,531 | 1,682 |
// Copyright(c) 2013-2019, mCODE A/S
// 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 conditio... | 3,298 | 1,245 |
#include <boost/log/sinks/attribute_mapping.hpp>
| 49 | 18 |
#include "Cadena.h"
Cadena::Cadena(const char * cad)
{
if(!cad)
{
this->vcad = new char[1];
return;
}
this->vcad = new char[strlen(cad)+1];
strcpy(this->vcad,cad);
}
Cadena::~Cadena()
{
delete []this->vcad;
}
Cadena::Cadena (const Cadena & otra) ///constructor de copia
{
t... | 1,378 | 578 |
// Copyright 2019 The Fuchsia 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 <fuchsia/modular/cpp/fidl.h>
#include <fuchsia/sys/cpp/fidl.h>
#include <lib/fidl/cpp/binding.h>
#include <lib/fsl/vmo/strings.h>
#include <lib/mo... | 13,072 | 4,417 |
/*This file is part of the FEBio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio.txt for details.
Copyright (c) 2019 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any person obtaining ... | 7,810 | 4,257 |
#pragma once
auto CALLBACK DirectInput_EnumJoypadsCallback(const DIDEVICEINSTANCE* instance, void* p) -> BOOL;
auto CALLBACK DirectInput_EnumJoypadAxesCallback(const DIDEVICEOBJECTINSTANCE* instance, void* p) -> BOOL;
auto CALLBACK DirectInput_EnumJoypadEffectsCallback(const DIDEVICEOBJECTINSTANCE* instance, void* p) ... | 7,906 | 2,995 |
#include <queue>
#include <arch/mem_space.hpp>
#include <async/recurring-event.hpp>
#include <async/mutex.hpp>
#include <async/result.hpp>
#include <helix/memory.hpp>
#include "spec.hpp"
struct Controller;
struct DeviceState;
struct ConfigurationState;
struct InterfaceState;
struct EndpointState;
// TODO: This cou... | 7,645 | 2,201 |
#include "stdafx.h"
#include "wcx_plugin.h"
#include "winuser.h"
#include "res\resource.h"
namespace wcx {
plugin::plugin()
{
m_module = NULL;
m_main_thread_id = 0;
m_ProcessDataProcW = NULL;
m_packer_count = 0;
m_testmode = false;
m_inited = false;
}
plugin::~plugin()
{
destroy();
}
int plugin::init... | 5,259 | 2,327 |
/**************************************************************************************
Copyright 2015 Applied Research Associates, 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.ap... | 37,992 | 10,719 |
class SpyGlass {
civSlotNumber = 75;
copSlotNumber = 19;
medSlotNumber = 4;
/*
Internal functions, sort by what they are.
Please note any functions you add need the functions named defined and the functions meta name which is the functions name + _meta i.e:
"life_fnc_mycoolfunction","life_fnc_mycoolfunctio... | 87,176 | 33,935 |
/*
Copyright Soramitsu Co., Ltd. 2016 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 by applicable law or agre... | 1,561 | 572 |
#include"dekunobou.hpp"
#pragma once
class Board{
public:
int board[8][8];//先手:1, 後手:-1
bool turn=false;//先手ならfalse, 後手ならtrue
int point[2];//各手番の獲得枚数{先手, 後手}
int flip_limit[8];//縦横斜め8方向どこまでひっくり返していいか
//{横(左), 横(右), 縦(上), 縦(下), 右斜め(上), 右斜め(下), 左斜め(上), 左斜め(下)}
//序盤・中盤・終盤のどれか
//序盤なら0,... | 5,791 | 2,684 |
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/core.hpp>
#include <opencv2/video.hpp>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include "hornSchunck.cpp"
#include "plotFlow.cpp"
void preprocess(cv::Mat imagePrevRaw, cv::Mat imageNextRaw, cv::Mat &... | 5,557 | 1,929 |
#include "Solver.hh"
#include <iomanip>
#include <iostream>
#include <string>
#include "Check.hh"
#include "XML_Node.hh"
using namespace std;
Solver::
Solver(int solver_print,
Solver::Type type):
solver_print_(solver_print)
{
}
void Solver::
print_name(string solution_type) const
{
if (solver_print_... | 2,709 | 869 |
#include "NinthEngine/GLPCH.h"
#include "NinthEngine/GLConstantBuffer.h"
#include "NinthEngine/GLUtils.h"
namespace NinthEngine {
GLConstantBuffer::GLConstantBuffer(const BufferProps& props)
: m_layout(props.layout), m_unitCount(props.unitCount) {
glGenBuffers(1, &m_bufferId);
glBindBuffer(GL_UNIFORM_BUFFER, m_buf... | 931 | 384 |
/*
* Copyright (C) 2009 Martin Robinson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This libra... | 17,148 | 5,294 |
#ifdef HAVE_TRACKING
#include "TrackerMedianFlow.h"
Nan::Persistent<v8::FunctionTemplate> TrackerMedianFlow::constructor;
NAN_MODULE_INIT(TrackerMedianFlow::Init) {
v8::Local<v8::FunctionTemplate> ctor = Nan::New<v8::FunctionTemplate>(TrackerMedianFlow::New);
v8::Local<v8::ObjectTemplate> instanceTemplate = ctor->... | 1,061 | 403 |
/*
* HttpConn.cpp
*
* Created on: 2013-9-29
* Author: ziteng@mogujie.com
*/
#include "HttpConn.h"
#include "HttpParserWrapper.h"
#include "HttpQuery.h"
static HttpConnMap_t g_http_conn_map;
// conn_handle 从0开始递增,可以防止因socket handle重用引起的一些冲突
static uint32_t g_conn_handle_generator = 0;
CHttpConn* FindHttpConn... | 2,236 | 1,058 |
#include "AIPlayer.h"
#include "Utilities.h"
#include <iostream>
short selectedPile = -1;
AIPlayer::AIPlayer()
{
isAI = true;
completed = false;
}
// Asks the user to choose a card and returns its index.
short& AIPlayer::ChooseCard(const PlayPile* playPiles)
{
std::cout << "\n\n Choose the card you want to play ... | 3,422 | 1,156 |
#ifndef LEVIATHAN_CONFIG_H
#define LEVIATHAN_CONFIG_H
#include <functional>
#include <map>
#include <string>
#define DEFAULT_RED 0xFF0000
using LineFunction = std::function<int32_t(int32_t)>;
enum class TempSource { CPU, LIQUID };
inline TempSource stringToTempSource(const std::string &tss) {
return tss == "liqu... | 880 | 345 |
/*
* @author Michael Rapp (michael.rapp.ml@gmail.com)
*/
#pragma once
#include "common/rule_refinement/rule_refinement.hpp"
#include "common/rule_refinement/rule_refinement_callback.hpp"
#include "common/input/feature_vector.hpp"
#include "common/sampling/weight_vector.hpp"
/**
* Allows to find the best refinemen... | 2,281 | 586 |
/**************************************************************************************************************
** Program name: Project 4
** Author: Derrick Li
** Date: Mar. 5, 2017
** Description:
** This class implementation file contains the member function definitions for the Creature base class and its
** 5 deriv... | 18,884 | 4,959 |
int maxsumofSubarray(vector<int>& arr)
{
if (arr.size() == 0)
{
return 0;
}
if (arr.size() == 1)
{
return arr[0];
}
int max = arr[0];
int end_index = 0;
int relink_cost = 0;
for (int i = 1; i < arr.size(); ++i)
{
//判断是否可以续链
if (end_index == i - 1)
{
//判断取 arr[i] 与 max + arr[i] 与 max 的最大值,若取max 则... | 962 | 639 |
// Copyright (c) 2019-2020 Xenios SEZC
// https://www.veriblock.org
// Distributed under the MIT software license, see the accompanying
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
#include "veriblock/entities/vbkblock.hpp"
#include <gtest/gtest.h>
#include "veriblock/arith_uint256.hpp"
#in... | 3,382 | 1,458 |
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2015 Ben Vanik. All rights reserved. ... | 3,227 | 1,050 |
/*=============================================================================
Copyright (C) 2015-2017 DxLibEx project
https://github.com/Nagarei/DxLibEx/
Distributed under the Boost Software License, Version 1.0.
(See http://www.boost.org/LICENSE_1_0.txt)
=====================================================... | 1,426 | 526 |
// file: lopen.cpp
// func: Open lua modules-namespace
// author: ForserX
#include "stdafx.h"
#include "luaopen.hpp"
extern "C"
{
extern const struct luaL_Reg funcs[];
int luaopen_LuaXML_lib(lua_State* L);
int luaopen_lfs(lua_State *L);
}
int lopen::luaopen_ext(lua_State *L)
{
luaL_openlib(L, "mrsh", funcs, 0);
... | 2,632 | 1,197 |
#include <cppunit/TestSuite.h>
#include <cppunit/TestCaller.h>
#include <memory>
#include <UrchinCommon.h>
#include <UrchinPhysicsEngine.h>
#include <AssertHelper.h>
#include <physics/collision/narrowphase/algorithm/gjk/GJKConvexObjectTest.h>
#include <physics/collision/narrowphase/algorithm/gjk/GJKTestHelper.h>
using... | 1,605 | 645 |
#include <iostream>
#include <string>
#include <sstream>
#include <stack>
void copy(const std::string &text, std::stack<std::string> &clipboard, int startIndex, int endIndex) {
startIndex = (int) text.find_last_of(' ', startIndex) + 1;
endIndex = text.find(' ', endIndex);
if (endIndex == -1) {
end... | 1,504 | 489 |
//platform agnostic file
#include "Xml/XmlLibrary.h"
#include "Repository.h"
#include "Xml/XmlNamespace.h"
#include "IXml/IXslNode.h"
#include "IXml/IXmlGrammarContext.h"
#include "Debug.h"
#include "Utilities/strtools.h"
#include <string.h>
#include <sstream>
using namespace std;
//Abstract Factory Method: http://e... | 24,782 | 8,756 |
#include <iostream>
#include <vector>
std::vector<int> findmaxseqinarr(int myarray[], int size)
{
std::vector<int> newarr;
int counter = 0;
int max = 0;
for (int i = 0; i < size-1; i++)
{
while (myarray[i] == myarray[i+1]-1)
{
counter++;
i++;
}
if (counter > max)
{
newarr.clear();
for (int... | 871 | 415 |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/... | 2,833 | 837 |
#pragma once
#include "graphics/CommandQueue.hpp"
#ifdef _WIN32
#include <d3d12.h>
class TAU_DLL DX12CommandQueue final : public ICommandQueue
{
DELETE_CM(DX12CommandQueue);
private:
ID3D12CommandQueue* _d3dQueue;
public:
DX12CommandQueue(ID3D12CommandQueue* const d3dQueue) noexcept
: _d3dQueue(d... | 686 | 258 |
#include <bits/stdc++.h>
using namespace std;
vector <int> v;
bool isPrime(int x){
for(int i = 3 ; i <= (int)sqrt(x) ; i+=2)
if(x%i==0)
return false;
return true;
}
void genPrime(){
v.push_back(2);
v.push_back(3);
for(int i = 5 ; i < 1000001 ; i+=2){
if(i%3 != 0)
... | 615 | 259 |
/****************************************************************************
* modules/audio/components/decoder/decoder_component.cpp
*
* Copyright 2018 Sony Semiconductor Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that th... | 20,541 | 7,796 |
// Boost.Geometry (aka GGL, Generic Geometry Library)
// doxygen_xml2qbk Example
// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.... | 547 | 211 |
int main() {
return 0;
}
/**
; RUN: cd / && %CLANG_EXEC %s -o %s.exe
; RUN: cd %CURRENT_DIR
; RUN: (unset TERM; %MULL_EXEC -test-framework CustomTest %s.exe 2>&1; test $? = 0) | %FILECHECK_EXEC %s --strict-whitespace --match-full-lines --check-prefix=WITHOUT-OPTION
; RUN: (unset TERM; %MULL_EXEC -strict -test-framew... | 847 | 329 |
//// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
//// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
//// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//// PARTICULAR PURPOSE.
////
//// Copyright (c) Microsoft Corporation. All rights reserved
#include "pch.h... | 2,225 | 823 |
/***
* ==++==
*
* Copyright (c) Microsoft 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 re... | 13,357 | 5,103 |
/** @file
@brief Implementation
@date 2015
@author
Sensics, Inc.
<http://sensics.com/osvr>
*/
// Copyright 2015 Sensics, 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 L... | 4,958 | 1,738 |
#include <iostream>
#include "scanner.h"
int main() {
auto const scanners = scanner::parse_file("data/day-19.txt");
auto const corrections = find_scanners(scanners);
auto const beacons = scanner::number_of_beacons(scanners, corrections);
auto const distance = scanner::max_manhatten_distance(corrections);
... | 414 | 154 |
#include "Common.h"
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
class Example_SdkInit {
protected:
float fps;
public:
virtual int run() {
/*SAY("Initializing SDK");
ovr_Initialize();
SAY("De-initializing the SDK");
ovr_Shutdown();
SAY("Exiting");*/
... | 1,752 | 856 |
#ifndef BOOST_SAFE_FLOAT_POLICY_CHECK_DIVISION_UNDERFLOW_HPP
#define BOOST_SAFE_FLOAT_POLICY_CHECK_DIVISION_UNDERFLOW_HPP
#include <boost/safe_float/policy/check_base_policy.hpp>
#ifdef FENV_AVAILABLE
#pragma STDC FENV_ACCESS ON
#include <fenv.h>
#endif
namespace boost {
namespace safe_float{
namespace policy{
temp... | 1,081 | 433 |
/* ========================================
* Average - Average.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#include "AverageProcessor.h"
AverageProcessor::AverageProcessor()
{
paramBindings =
{
{AVERAGE, &A},
{DRY_WET, &B}
};
... | 7,488 | 3,286 |
/**
* Runa C++ Library
* Copyright (c) 2017-2019 walkinsky:lyh6188(at)hotmail(dot)com
*
* 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)
*/
// Created on 2017/11/15
#include "stdafx.h"
#ifndef __NANA_RUNNER_LIB_ALL_... | 1,553 | 593 |
/**
* This file is part of Evoplex.
*
* Evoplex is a multi-agent system for networks.
* Copyright (C) 2018 - Marcos Cardinot <marcos@cardinot.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 Soft... | 6,851 | 2,286 |
#include "instrumentation/converter/convert_to_string/convergence_to_string.h"
#include <iomanip>
#include <sstream>
#include "instrumentation/converter/factory.hpp"
namespace bart {
namespace instrumentation {
namespace converter {
namespace convert_to_string {
namespace {
using OutputTerm = ConvergenceToStri... | 2,683 | 827 |
#include "gtest/gtest.h"
#include "02_geometry/Geometry.h"
#include <string>
#include <iostream>
#include <limits>
#include "cairo.h"
using namespace std;
using namespace Eleusis;
using namespace ::testing;
class GeometryTest : public Test
{
protected:
Geometry* _geometry;
GeometryTest() { }
~Geometry... | 4,843 | 2,086 |
#include <assert.h>
extern "C" void HardFault_Handler() __attribute__ ((noreturn));
extern "C" void __assert_hash_func( assert_hash_type hash )
{
HardFault_Handler();
}
| 175 | 65 |
#include "shaders/spirv/Compiler.h"
#include <cassert>
namespace scapes::foundation::shaders
{
Compiler *Compiler::create(ShaderILType type, io::FileSystem *file_system)
{
switch (type)
{
case ShaderILType::SPIRV: return new spirv::Compiler(file_system);
}
return nullptr;
}
void Compiler::destroy(Com... | 364 | 142 |
#include "demogCombo.h"
#include "demogData.h"
#include <sstream>
#include <string>
#include <assert.h>
#include <iomanip>
//add member functions here
/* print state data - as aggregate of all the county data */
std::ostream& operator<<(std::ostream &out, const demogCombo& ComboD) {
out<<"Combo Info: ";
for(auto ... | 2,205 | 996 |
/**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. The ASF licenses
* this file to you 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
*
* h... | 2,089 | 659 |
/******************************************************************************
* _ _____ __________ *
* | | / / _ | / __/_ __/ Visibility *
* | |/ / __ |_\ \ / / Across *
... | 22,847 | 15,780 |
/* Adaptive forward Euler time stepper class header file.
D.R. Reynolds
Math 6321 @ SMU
Fall 2020 */
#ifndef ADAPT_EULER_DEFINED__
#define ADAPT_EULER_DEFINED__
// Inclusions
#include <cmath>
#include "rhs.hpp"
// Adaptive forward Euler time stepper class
class AdaptEuler {
private:
// private data
... | 1,696 | 533 |
/**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "IS_LOG_EMPTY_onReceived.h"
#include "logdevice/common/Sender.h"
#include "lo... | 6,173 | 2,093 |
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <VegetationProfiler.h>
#include "SurfaceSlopeFilterComponent.h"
#include <AzCore/Componen... | 10,352 | 3,113 |
/* Copyright 2001, 2019 IBM Corporation
*
* 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
* following d... | 6,719 | 2,599 |
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* 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 requir... | 9,890 | 3,803 |
/** This file is generated. Do not edit. */
#include "nodes.h"
namespace lina {
#if !defined(CONVERGENCE_ORDER)
#error CONVERGENCE_ORDER must be set.
#elif CONVERGENCE_ORDER == 2
double const LGLNodes[] = {0.00000000000000000000000000000000, 1.00000000000000000000000000000000};
#elif CONVERGENCE_ORDER == 3
double const... | 20,921 | 19,672 |
/**
* @file Measurement_Arithmetic.cc
* @brief Implementation of measurement arithetics methods
* @author [Yi-Mu "Enoch" Chen](https://github.com/yimuchen)
*/
#ifdef CMSSW_GIT_HASH
#include "UserUtils/MathUtils/interface/Measurement.hpp"
#include "UserUtils/MathUtils/interface/StatisticsUtil.hpp"
#else
#inclu... | 12,021 | 3,725 |
//
// copy.hpp
// atl
//
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
// SPDX-License-Identifier: MIT
// Copyright (c) 2020 Jinlong He.
//
#ifndef atl_detail_finite_automaton_copy_hpp
#define atl_detail_finite_automaton_copy_hpp
#include <atl/detail/finite_automaton/finite_automaton... | 4,255 | 1,351 |
// Copyright 2015 Twin Oaks Computing, Inc.
// Modifications copyright (C) 2017-2018 Twin Oaks Computing, 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.... | 2,107 | 815 |
#include <memory>
#include "gtest/gtest.h"
#include "mathFunctions/functionPointer.hpp"
namespace ablateTesting::mathFunctions {
TEST(FunctionPointerTests, ShouldEvalToScalarFromXYZ) {
// arrange
auto function = ablate::mathFunctions::FunctionPointer([](auto dim, auto time, auto loc, auto nf, auto u, auto ctx... | 3,690 | 1,568 |
#pragma once
#include <vcrate/Alias.hpp>
#include <vector>
#include <string>
namespace vcrate { namespace bytecode {
enum class Operations : ui8 {
ADD, // Add (RRW)
SUB, // Subtract (RRW)
MOD, // Modulo (RRW)
MUL, // Multiply (RRW)
MULU, // Multiply unsigned (RRW)
DIV, // Divide (RRW)
... | 2,443 | 1,000 |
/****************************************************************************
* Copyright (C) from 2009 to Present EPAM Systems.
*
* This file is part of Indigo toolkit.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... | 74,278 | 23,242 |
--- chrome/test/chromedriver/server/chromedriver_server.cc.orig 2020-11-13 06:36:39 UTC
+++ chrome/test/chromedriver/server/chromedriver_server.cc
@@ -283,7 +283,7 @@ int main(int argc, char *argv[]) {
base::AtExitManager at_exit;
base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
-#if define... | 610 | 218 |
#include <rudiments/sys.h>
#include <rudiments/charstring.h>
#include <rudiments/stdio.h>
int main(int argc, const char **argv) {
char *osname=sys::getOperatingSystemName();
stdoutput.printf("OS Name : %s\n",osname);
delete[] osname;
char *release=sys::getOperatingSystemRelease();
stdoutput.printf("OS Release ... | 4,478 | 1,904 |
#include "points.h"
#include "gtest/gtest.h"
TEST(PointsTest, PointsHandling) {
Eigen::Matrix3d directUnitCell;
directUnitCell.row(0) << -5.1, 0., 5.1;
directUnitCell.row(1) << 0., 5.1, 5.1;
directUnitCell.row(2) << -5.1, 5.1, 0.;
Eigen::MatrixXd atomicPositions(2, 3);
atomicPositions.row(0) << 0., 0., 0.;... | 1,716 | 702 |
//xugong5 problem:
//1 tracking miss
//2 tf_old_data and process die
//xugong6 solve tf_old_data problem , tf::TransformListener lr(ros::Duration(100));
// changshu_2 base on xugong6 ,change parameter related with vehicle ,Lidar height
#include <ros/ros.h>
#include <sensor_msgs/point_cloud_conversion.h>
#include <se... | 15,758 | 6,469 |
class Trie {
public:
/** Initialize your data structure here. */
Trie() {
trie.push_back(map<char, int>()); // root
word_end.push_back(false);
}
/** Inserts a word into the trie. */
void insert(string word) {
int pos = 0;
for (char c : word) {
if (!tr... | 1,445 | 469 |
// Copyright Epic Games, Inc. All Rights Reserved.
#include "UE4AndroiEnv.h"
#include "Modules/ModuleManager.h"
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, UE4AndroiEnv, "UE4AndroiEnv" );
| 201 | 81 |
/*
***********************************************************************************************************************
*
* Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associ... | 6,849 | 1,885 |
/**
/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C)2015 Semtech
___ _____ _ ___ _ _____ ___ ___ ___ ___
/ __|_ _/_\ / __| |/ / __/ _ ... | 47,005 | 19,696 |
//------------------------------------------------------------------
// **MEDYAN** - Simulation Package for the Mechanochemical
// Dynamics of Active Networks, v4.0
//
// Copyright (2015-2018) Papoian Lab, University of Maryland
//
// ALL RIGHTS RESERVED
//
// See the MEDYAN web page ... | 25,992 | 7,762 |
/* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Cop... | 2,677 | 1,160 |
/**
* preset-window.hpp
*
* Author: Viktor Fukala
* Created on 2021/03/07
*/
#ifndef PRESET_WINDOW_HPP
#define PRESET_WINDOW_HPP
#include "gtkmm/button.h"
#include "gtkmm/comboboxtext.h"
#include "gtkmm/grid.h"
#include "gtkmm/label.h"
#include "brandy-window.hpp"
#include "config-state-abstr.hpp"
namespace br... | 1,183 | 396 |
#include <bits/stdc++.h>
using namespace std;
/*
复杂度O(N)的根本原因是最后的回文边界mr是单调递增的
从前往后计算每个位置为中心的回文串半径长度
然后用最右边的边界来更新mid
*/
const int N = 2e7 + 10; //double length of original string
int n;
char a[N], b[N];
int p[N]; //max radius of each mid
void init() {
int k = 0;
b[k++] = '$', b[k++] = '#';
for (int i = ... | 1,102 | 641 |
// Copyright Carl Philipp Reh 2009 - 2021.
// 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_SYMBOL_CLASS_HPP_INCLUDED
#define FCPPT_SYMBOL_CLASS_HPP_INCLUDED
#include <fcppt/co... | 1,357 | 524 |
/*
* quad.hpp
*
* Copyright (c) 2020 Carlos Braga
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the MIT License.
*
* See accompanying LICENSE.md or https://opensource.org/licenses/MIT.
*/
#ifndef TEST_ATTO_OPENGL_QUAD_H_
#define TEST_ATTO_OPENGL_QUAD_H_
#inc... | 1,067 | 362 |
#pragma once
#include <frg/eternal.hpp>
#include <frg/macros.hpp>
#include <type_traits>
#include <stddef.h>
namespace frg {
namespace _variant {
// check if S is one of the types T
template<typename S, typename... T>
struct exists : public std::false_type { };
template<typename S, typename... T>
struct exists... | 6,809 | 2,585 |
#ifndef ABSTRACTPRODUCTA_HPP
#define ABSTRACTPRODUCTA_HPP
namespace DP {
class AbstractProductA {
public:
AbstractProductA();
virtual ~AbstractProductA() = 0;
// ADT
virtual void use() = 0;
};
} // namespace DP
#endif // ABSTRACTPRODUCTA_HPP
| 295 | 112 |
#ifndef PARSER_HPP
#define PARSER_HPP
#include <iostream>
#include <string>
#include <cstring>
const int N = 9;
typedef unsigned short int mask;
class Parser {
private:
std::string inputString;
mask unsolvedBoard[N*N];
public:
/**
* Returns integer if char is a digit, 0 ot... | 1,790 | 506 |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... | 6,588 | 2,176 |
// Adapted from an example from Java Foundations
// by John Lewis, Peter DePasquale, & Joe Chase
#include<iostream>
#include<vector>
#include"staffmember.hpp"
#include"salaried.hpp"
#include"hourly.hpp"
#include"volunteer.hpp"
using namespace std;
void print_paystub(const StaffMember * s) {
s->print();
cou... | 1,602 | 629 |