text string | size int64 | token_count int64 |
|---|---|---|
//
// Created by secondwtq <lovejay-lovemusic@outlook.com> 2015/05/18.
// Copyright (c) 2015 SCU ISDC All rights reserved.
//
// This file is part of ISDCNext.
//
// We have always treaded the borderland.
//
#ifndef IOJXD_COMMON_HXX
#define IOJXD_COMMON_HXX
#include "context.hxx"
#endif //IOJXD_COMMON_HXX
| 310 | 147 |
#include "gray_image.hpp"
#include <opencv2/imgcodecs.hpp>
GrayImage::GrayImage(ColorImage &s) : data(s.N), w(s.w), h(s.h), N(s.N) {
for (int i = 0; i < N; i++) data[i] = (s.data)[i].l;
}
void GrayImage::r_solve(const float *d, int r) {
const int iters = 30;
int k, x, y;
for (k = 0; k < iters; k++) {
//... | 1,961 | 864 |
#include "ComponentTransform.h"
#include "GameObject.h"
#include "Assimp/include/scene.h"
#include "GameObject.h"
#include "Application.h"
ComponentTransform::ComponentTransform(const aiMatrix4x4 * t, GameObject* par)
{
SetBaseVals();
SetFromMatrix(t);
parent = par;
SetLocalTransform();
}
void ComponentTransform... | 6,505 | 2,665 |
/*-------------To print all the natural numbers between n and m------------*/
#include <stdio.h>
int main()
{
int n=0, m=0;
int i=0;
printf("Enter n: ");
scanf("%d", &n);
printf("Enter m: ");
scanf("%d", &m);
if(m<0 || n<0)
printf("Input positive values only.\n");
... | 447 | 169 |
//-----------------------------------------------------------------------------
// VuforiaAdapter.cpp
//
// Copyright © 2010 - 2013 Wave Coorporation. All rights reserved.
// Use is subject to license terms.
//-----------------------------------------------------------------------------
#include "VuforiaAdapter.h"
in... | 16,419 | 6,209 |
//
// Created by Filippo Vicentini on 20/12/2017.
//
#ifndef SIMULATOR_THREADEDTASKPROCESSOR_HPP
#define SIMULATOR_THREADEDTASKPROCESSOR_HPP
#include "Base/TaskProcessor.hpp"
#include "Libraries/concurrentqueue.h"
#include <chrono>
#include <stdio.h>
#include <queue>
#include <vector>
#include <thread>
class Settin... | 3,199 | 1,108 |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <set>
#include <algorithm>
using namespace std;
int main() {
set<int> Set;
set<int>::iterator it;
int Q, y, x;
scanf("%d", &Q);
for (int i = 0; i < Q; i++) {
scanf("%d %d", &y, &x);
if (y == 1) {
... | 624 | 229 |
//
// Created by jiaruiyan on 1/19/21.
//
#include "AppWriter.h"
#include <igl/writeOBJ.h>
void AppWriter::write_anim_seq(int frame_id, std::string& filename,
Eigen::MatrixXd& X, Eigen::MatrixXi& BTri){
// Fill the boundary structure -- it should also have a wiser way to output used X and BTri... | 441 | 165 |
#include "stdafx.h"
#include "HttpCookieStorage.h"
| 53 | 23 |
// Load relevant libraries
#include <Arduino.h> //Base framework
#include <ESP_WiFiManager.h> // AP login and maintenance
#include <AsyncTCP.h> // Generic async library
#include <ESPAsyncWebServer.h> // ESP32 async library
#include <ArduinoOTA.h> // Enable OTA updates
#include <ESPmDNS.h> // Connect by hostname
#inclu... | 8,793 | 2,925 |
#ifndef CPREPROCESSOR_H
#define CPREPROCESSOR_H
#if !defined(BOOST_WAVE_CUSTOM_DIRECTIVES_HOOKS_INCLUDED)
#define BOOST_WAVE_CUSTOM_DIRECTIVES_HOOKS_INCLUDED
#include <cstdio>
#include <iostream>
#include <ostream>
#include <string>
#include <algorithm>
#include <utility>
#include <unordered_map>
#include <boost/alg... | 7,001 | 2,106 |
#include "pch.h"
#include "Vector4D.h"
namespace lptm {
Vector4D::Vector4D()
{
x = 0.0f;
y = 0.0f;
z = 0.0f;
w = 0.0f;
};
Vector4D::Vector4D(float x, float y, float z, float w)
{
this->x = x;
this->y = y;
this->z = z;
this->w = w;
}
Vector4D& Vector4D::Add(const Vector4D& other)
{
x += oth... | 920 | 460 |
//
// FileServConn.cpp
// public_TTServer
//
// Created by luoning on 14-8-19.
// Copyright (c) 2014年 luoning. All rights reserved.
//
#include "FileServConn.h"
#include "FileHandler.h"
#include "util.h"
#include "ImUser.h"
#include "AttachData.h"
#include "RouteServConn.h"
#include "MsgConn.h"
static ConnMap_t g_... | 6,586 | 2,680 |
// This file is part of PolyMPC, a lightweight C++ template library
// for real-time nonlinear optimization and optimal control.
//
// Copyright (C) 2020 Listov Petr <petr.listov@epfl.ch>
//
// 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 distribute... | 21,059 | 7,659 |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/renderer/plugins/pdf_plugin_placeholder.h"
#include "chrome/common/pdf_uma.h"
#include "chrome/common/render_messages.h"
#include "chrom... | 2,495 | 780 |
#include "CompositorBase.h"
#include "Session.h"
#include "FrameList.h"
#include "OVR_CAPI.h"
#include "microprofile.h"
#include <vector>
#include <algorithm>
#include <winrt/Windows.Graphics.Holographic.h>
using namespace winrt::Windows::Graphics::Holographic;
MICROPROFILE_DEFINE(WaitToBeginFrame, "Compositor", "W... | 5,730 | 2,180 |
//
// CIE1960UCS.hpp
// Spectral Clara Lux tracer
//
// Created by Fabrizio Duroni on 24/12/15.
// Copyright © 2015 Fabrizio Duroni. All rights reserved.
//
#ifndef CIE1960UCS_hpp
#define CIE1960UCS_hpp
#include "Vector3D.hpp"
struct CIEUCSChromaticities {
/// u coordinate.
float u;
/// v coordi... | 1,522 | 555 |
// ITP2_5_D
#include <algorithm>
#include <iostream>
#include <numeric>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n);
iota(v.begin(), v.end(), 1);
do {
for (int i = 0; i < n; i++) { // cout<<(i?" ":"")<<v[i];
if (i) { /... | 689 | 261 |
// Copyright (c) 2020 Matthew J. Smith and Overkit contributors
// License: MIT (http://opensource.org/licenses/MIT)
#ifndef OVK_CORE_REGION_HASH_HPP_INCLUDED
#define OVK_CORE_REGION_HASH_HPP_INCLUDED
#include <ovk/core/Array.hpp>
#include <ovk/core/ArrayView.hpp>
#include <ovk/core/Box.hpp>
#include <ovk/core/Field.... | 3,204 | 1,170 |
int create_work4(
DB_WORKUNIT& wu,
const char* result_template_filename,
SCHED_CONFIG& config_loc
) {
int retval;
wu.create_time = time(0);
// check for presence of result template.
// we don't need to actually look at it.
//
const char* p = config_loc.project_path(result_template... | 7,517 | 3,093 |
//-----------------------------------------------------------------------------
// llreplace - Replace file data or Grep.
//
// Author: Dennis Lang - 2015
// http://landenlabs.com/
//
// This file is part of LLFile project.
//
// ----- License ----
//
// Copyright (c) 2015 Dennis Lang
//
// Permission is hereby granted... | 52,456 | 17,057 |
#ifndef UPROAR_CONFIG_VERSION_HPP
#define UPROAR_CONFIG_VERSION_HPP
#define UPROAR_VERSION_MAJOR 0
#define UPROAR_VERSION_MINOR 1
#define UPROAR_VERSION_PATCH 0
#endif | 169 | 73 |
// ResourcePreview.cpp : implementation file
//
#include "stdafx.h"
#include "..\MapEditor.h"
#include "ResourcePreview.h"
#include "Common\Map\Map.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//////////////////////////////////////////////////////////////////////... | 1,736 | 669 |
/* C-lang interface to DXVK's C++ implementation */
#include "config.h"
extern "C" {
#include "dxvk.h"
void dxvk_get_options(struct DXVKOptions *opts)
{
dxvk::Config config(dxvk::Config::getUserConfig());
config.merge(dxvk::Config::getAppConfig(dxvk::getExePath()));
opts->nvapiHack = config.getOption<... | 562 | 223 |
/********************************************************************
Created: 2016/07/18 19:15
Filename: HttpRequest.cpp
Author: rrrfff
Url: http://blog.csdn.net/rrrfff
*********************************************************************/
#include <RLib_Import.h>
//----------------------------------------... | 1,013 | 311 |
#include "zui.h"
#ifdef _DEBUG
#undef CreatePen
#undef CreateSolidBrush
HPEN MyCreatePen(int fnPenStyle, int nWidth, COLORREF crColor)
{
HPEN hPen = CreatePen(fnPenStyle, nWidth, crColor);
if (!hPen) {
_asm {int 3};
}
return hPen;
}
HBRUSH MyCreateSolidBrush(COLORREF crColor)
{
HBRUSH hBr = C... | 411 | 195 |
/*
* File: menu.hpp
* --------------------
* @author Matyalatte
* @version 2021/09/14
* - initial commit
*/
#pragma once
#include <GL/glut.h>
#include "2dpoly_to_3d/2dpoly_to_3d.hpp"
#include "2dpoly_to_3d/utils.hpp"
namespace openglHandler {
//functions for popup menu in glut
void menu(int item);
void menu... | 574 | 226 |
#pragma once
#include <libadb/libadb.hpp>
#include <string>
namespace adb::api
{
/**
* @brief Rate Limit Scope
* @details https://discord.com/developers/docs/topics/rate-limits#header-format
*/
enum class RateLimitScope
{
/// per bot or user limit
User,
/// per bot o... | 551 | 176 |
#include "VelocitySideCar.h"
#include <boost/tokenizer.hpp>
#include <cryptopp/sha.h>
#include <cryptopp/hex.h>
#include <cryptopp/files.h>
VelocitySideCar::VelocitySideCar()
{
}
VelocitySideCar::~VelocitySideCar()
{
}
const std::string& VelocitySideCar::get_sha() const
{
return _source_sha;
};
bool VelocitySideCa... | 5,071 | 1,864 |
#include <cmath> //floor
#include "Snake.hpp"
#include "Game.hpp"
#include "View.hpp"
Snake::Snake(Game& game) :
game_(game) {
}
void Snake::changeDirection(int keyCode) {
int deltaX = 0, deltaY = 0;
switch (keyCode) {
case SDLK_UP:
case SDLK_w:
deltaX = 0;
deltaY... | 5,117 | 1,784 |
#ifndef MAZENET_CLIENT_MESSAGEHANDLER_HPP
#define MAZENET_CLIENT_MESSAGEHANDLER_HPP
#include <string>
#include <player/IPlayerStrategy.hpp>
#include "../messaging/mazeCom.hxx"
#include "../player/GameSituation.hpp"
#include "../util/logging/Log.hpp"
#include "MessageDispatcher.hpp"
#pragma GCC diagnostic push
#pra... | 1,534 | 524 |
// SPDX-License-Identifier: MIT
// Copyright (c) 2019-2021 Thomas Vanderbruggen <th.vanderbruggen@gmail.com>
#ifndef SCICPP_CORE_META
#define SCICPP_CORE_META
#include <Eigen/Dense>
#include <array>
#include <complex>
#include <ratio>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#inclu... | 7,215 | 2,096 |
#include "path.h"
namespace mini::io {
string
path::combine(
const string_ref p1,
const string_ref p2
)
{
string result = p1;
if (!p1.ends_with(directory_separator) && !p1.ends_with(alternative_directory_separator))
{
result += directory_separator;
}
result += p2;
return result;
}
string_col... | 2,332 | 862 |
#include <boost/assign.hpp>
#include <glog/logging.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <vector>
#include "caffe/internode/configuration.hpp"
#include "caffe/serialization/BlobCodec.hpp"
#include "caffe/test/test_caffe_main.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
namesp... | 11,070 | 4,379 |
#include "utils/math.h"
namespace util{
namespace math{
template<>
float_t Fun<FunName::alog>(float_t x){auto one=decltype(x){1}; return std::log(std::abs(x)+one);}
template<>
float_t Fun<FunName::d_alog>(float_t x){auto one=decltype(x){1}; return one/(std::abs(x)+one);}
template<>
float_t Fun<FunName::tanh>(float_t ... | 935 | 391 |
#include <sys/time.h>
#include "macro.hpp"
#include "types.hpp"
#include "functions.hpp"
#include "hash.hpp"
#include "hashmap.hpp"
#include "serialization.hpp"
#define ELEM_SEPARATOR "\n\t\t\t"
namespace dbtoaster {
/* Definitions of auxiliary maps for storing materialized views. */
struct CUSTDIST_entry {
... | 24,133 | 10,972 |
// a216 : 數數愛明明
#include <cstdio>
#define N 30010
int main()
{
// f[n] = n + f[n-1], g[n] = f[n] + g[n-1], f[1] = g[1] = 1
// f[i], g[i] is on day i !!!
long long int f[N] = { 0 , 1 , 3 }, g[N] = { 0 , 1 } ;
for( int i=3 ; i<N ; i++ )
{
f[i] = i + f[i-1] ;
g[i-1] = f[i-1] + g[i-2] ;
}
int n;... | 412 | 266 |
// © 2019 John Adriaan. Licensed under the "3-clause BSD License"
///
/// \file ARM/NXP/Flash/FCB.cc
///
/// This file defines and instantiates the Flash Control Block at a known address.
/// The FCB is used by the i.MX RT10xx to best configure the Flash for use.
/// Note that this is completely self-contained - no ext... | 7,317 | 2,987 |
#ifndef FEATUREMODULES_HH
#define FEATUREMODULES_HH
#include <vector>
#include "ModuleConfig.hh"
#include "FeatureModule.hh"
#include "BaseFeaModule.hh"
#include "AudioFileModule.hh"
#include "FFTModule.hh"
namespace aku {
class FeatureGenerator;
//////////////////////////////////////////////////////////////////
... | 8,747 | 2,806 |
/* ----------------------------------------------------------------- */
/* The Toolkit for Building Voice Interaction Systems */
/* "MMDAgent" developed by MMDAgent Project Team */
/* http://www.mmdagent.jp/ */
/* -------------------------... | 7,212 | 2,287 |
//*********************************************************
// Table_Process.cpp - Trip Table Processing
//*********************************************************
#include "ConvertTrips.hpp"
//---------------------------------------------------------
// Table_Processing
//-------------------------------------------... | 5,777 | 2,661 |
/*
* GPUImage-x
*
* Copyright (C) 2017 Yijin Wang, Yiqian Wang
*
* 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... | 3,009 | 1,020 |
// ----------------------------------------------------
// AIMP DotNet SDK
// Copyright (c) 2014 - 2020 Evgeniy Bogdan
// https://github.com/martin211/aimp_dotnet
// Mail: mail4evgeniy@gmail.com
// ----------------------------------------------------
#include "Stdafx.h"
#include "InternalAimpDataFilterGroup.h"... | 4,250 | 1,334 |
#ifndef COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_GENERATED_LUA_COCOS2DX_PHYSICS_MANUAL_H
#define COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_GENERATED_LUA_COCOS2DX_PHYSICS_MANUAL_H
#if CC_USE_PHYSICS
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
#include "cocos2d.h"
#incl... | 540 | 305 |
// This program demonstrates that when a derived class function
// overrides a base class function, objects of the base class
// still call the base class version of the function.
#include <iostream>
using namespace std;
class BaseClass
{
public:
void showMessage()
{ cout << "This is the Base class.\n"; }
};
... | 549 | 165 |
#include <ctime>
#include <random>
#include <numeric>
#include <algorithm>
#include "memory.h"
#include "cpu.h"
#include "functions.h"
#include "operators.h"
namespace Functions
{
int _nestedCount = -1;
double _umin = 0.0;
double _umax = 0.0;
double _ulen = 0.0;
double _ustp = 1.0;
uint16_t ... | 105,100 | 30,932 |
// cont/multi.cc
#include <stapl/containers/multiarray/multiarray.hpp>
#include <stapl/views/multiarray_view.hpp>
#include <stapl/containers/type_traits/default_traversal.hpp>
#include <stapl/algorithms/algorithm.hpp>
#include <stapl/algorithms/functional.hpp>
#include "viewhelp.hpp"
using namespace std;
typedef int... | 1,983 | 866 |
/*
* backend_descriptors.hpp
*
* Created on: Dec 5, 2021
* Author: Maciej Kozarzewski
*/
#ifndef AVOCADO_BACKEND_BACKEND_DESCRIPTORS_HPP_
#define AVOCADO_BACKEND_BACKEND_DESCRIPTORS_HPP_
#include "backend_defs.h"
#include <type_traits>
#include <array>
#include <vector>
#include <stack>
#include <algorithm... | 17,513 | 7,465 |
/*
* Copyright 2020 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 ... | 1,925 | 608 |
#include <iostream>
#include "Soldier.hpp"
class FootCommander : public Soldier
{
public:
FootCommander(int player) : Soldier(150,20,player){}
~FootCommander();
};
| 175 | 66 |
// MdiDemoView.cpp : implementation of the CMdiDemoView class
//
#include "stdafx.h"
#include "MdiDemo.h"
#include "MdiDemoDoc.h"
#include "MdiDemoView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMdiDemoView
IMPLEMENT_DYNCREATE(CMdiDemoView, CView)
BEGIN_MESSAGE_MAP(CMdiDemoView, CView)
... | 1,975 | 803 |
class Solution {
public:
int countSubstrings(string s) {
int num = 0;
int n = s.size();
for(int i=0;i<n;i++)//遍历回文中心点
{
for(int j=0;j<=1;j++)//j=0,中心是一个点,j=1,中心是两个点
{
int l = i;
int r = i+j;
while(l>=0 && r<n &&... | 396 | 164 |
#include<iostream>
#include<vector>
using namespace std ;
template<typename T>
void printVector(vector<T> n) {
for (auto &&i : n)
{
cout << i << " ";
}
cout << endl ;
}
class Fibonacci
{
private:
double series = 0;
vector<double> store;
public:
void getThe... | 706 | 262 |
/*
* File: TestCCType.cpp
* --------------------
* This program tests the set-based implementation of the <cctype>
* interface.
*/
#include <iostream>
#include <string>
#include "cctype.h"
#include "simpio.h"
#include "console.h"
using namespace std;
int main() {
while (true) {
string st... | 1,214 | 415 |
#include<bits/stdc++.h>
using namespace std;
// considering maximum no. of vertices to be 100000.
const int N = 1e5;
int parent[N];
// find the root(ancestor) of the vertex u and returns the no. of vertices in that path
int findpar(int *u){
int rank = 0;
while(*u != parent[*u]){
*u = parent[*u];
... | 1,943 | 626 |
/*
* Varian,Inc. All Rights Reserved.
* This software contains proprietary and confidential
* information of Varian, Inc. and its contributors.
* Use, disclosure and reproduction is prohibited without
* prior consent.
*/
/* DISCLAIMER :
* ------------
*
* This is a beta version of the GALAXIE integrat... | 1,712 | 625 |
/*
* BrioMessage.cpp
*
* Created on: 09.05.2018
* Author: wmarkowski
*/
#include <Arduino.h>
#include "BrioMessage.h"
void brio_message_dump(BrioMessage* brioMessage)
{
switch (brioMessage->channel)
{
case BRIO_CHANNEL_A:
Serial.print(F("channel A, "));
break;
case BRIO_... | 1,219 | 442 |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
namespace... | 3,643 | 949 |
#include <boost/test/unit_test.hpp>
#include <boost/test/data/test_case.hpp>
#include <boost/test/data/monomorphic.hpp>
#include <sstream>
#include "lineside/signalflash.hpp"
char const* flashNames[] = { "Steady", "Flashing" };
Lineside::SignalFlash flashes[] = { Lineside::SignalFlash::Steady,
Lineside::Sign... | 1,346 | 528 |
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<queue>
using namespace std;
const int M = 1111111;
struct Edge
{
int tow,nxt,dat;
};
Edge e[2 * M];
int n,m,s,sume = 0,dis[2 * M],vis[2 * M],hea[2 * M];
queue <int>q;
void add(int u, int v, int w)
{
sume++;
e... | 1,366 | 629 |
/*
* Copyright 2021 Assured Information Security, 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 a... | 1,849 | 623 |
/*
Next player to play: X
Previous player: O
A board is a 16-tuple/list of 0,1,2
e.g.: (0,0,0,1, 1,2,0,0, 0,1,2,0, 2,1,2,1) means that the board is
...X
XO..
.XO.
OXOX
0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15
*/
#include <iostream>
#include "global4.h"
#include "state4.h"
#include <uno... | 1,417 | 581 |
#include <ZigBeeCommandLineProcessor.h>
#include <GlobalPresets.h>
int StringSplit(String sInput, char cDelim, String sParams[], int iMaxParams)
{
int iParamCount = 0;
int iPosDelim, iPosStart = 0;
do {
// Searching the delimiter using indexOf()
iPosDelim = sInput.indexOf(cDelim,iPosStart... | 7,036 | 2,163 |
#include "common.hh"
#include "auth.hh"
#include "base64.hh"
#include "cgi.hh"
#include "http.hh"
#include "strutils.hh"
namespace stuff {
bool Auth::auth(CGI* cgi, const std::string& realm, const std::string& passwd,
std::string* user) {
auto auth = cgi->http_auth();
auto pos = auth.find(' '... | 1,428 | 475 |
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
#pragma once
#include "io.hpp"
#include "libvideostitch/logging.hpp"
#include <fstream>
#include <ostream>
#include <vector>
#include <setjmp.h>
#include <jpeglib.h>
namespace VideoStitch {
namespace Input {
void my_output_message(j_common... | 3,042 | 1,107 |
// Copyright 2020 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 <base/bind.h>
#include <base/command_line.h>
#include <base/files/scoped_file.h>
#include <base/macros.h>
#include <brillo/daemons/daemon.h>
... | 2,037 | 743 |
#ifndef STAN_LANG_AST_FUN_VAR_DECL_DIMS_VIS_DEF_HPP
#define STAN_LANG_AST_FUN_VAR_DECL_DIMS_VIS_DEF_HPP
#include <stan/lang/ast.hpp>
#include <vector>
namespace stan {
namespace lang {
var_decl_dims_vis::var_decl_dims_vis() { }
std::vector<expression> var_decl_dims_vis::operator()(const nil& /* x */)
... | 2,546 | 804 |
#include <chartwork/ColorPalette.h>
#include <chartwork/Design.h>
namespace chartwork
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// ColorPalette
//
////////////////////////////////////////////////////////////////////////////////////////////////////
Colo... | 3,698 | 874 |
// MIT License
// Copyright (c) 2021 laferenorg
// 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, merg... | 1,827 | 609 |
//
// "$Id: list_fonts.cxx 5958 2007-10-17 20:21:38Z spitzak $"
//
// _WIN32 font utilities for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2006 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// Lice... | 6,958 | 2,673 |
/*
Plutonium library
@file Overlay.hpp
@brief TODO...
@author XorTroll
@copyright Plutonium project - an easy-to-use UI framework for Nintendo Switch homebrew
*/
#pragma once
#include <pu/overlay/Overlay.hpp>
namespace pu::overlay
{
class Toast : public Overlay
{
public:
... | 636 | 193 |
/*
KAST - Kmer Alignment-free Search Tool
Version 0.0.34
Written by Dr. Martin Vickers (martin.vickers@jic.ac.uk)
*/
#include <iostream>
#include <seqan/sequence.h>
#include <seqan/stream.h>
#include <seqan/file.h>
#include <seqan/arg_parse.h>
#include <seqan/seq_io.h>
#include <math.h>
#include <string>
#include <th... | 3,324 | 1,092 |
//
// Copyright (c) 2016 Dado Colussi
//
// 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, publis... | 3,057 | 1,259 |
#include "resampleProcess.h"
#include <dtkCore/dtkAbstractProcessFactory.h>
#include <medAbstractDataFactory.h>
#include <medAbstractProcess.h>
#include <medMetaDataKeys.h>
#include <medUtilitiesITK.h>
#include <itkResampleImageFilter.h>
#include <itkBSplineInterpolateImageFunction.h>
// /////////////////////////////... | 5,062 | 1,652 |
#pragma once
#include "dbs_base_impl.hpp"
#include <vector>
#include <set>
#include <functional>
#include <deip/chain/schema/expertise_allocation_proposal_object.hpp>
#include <deip/chain/schema/expertise_allocation_proposal_vote_object.hpp>
#include <deip/chain/schema/expert_token_object.hpp>
namespace deip {
names... | 6,219 | 1,808 |
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <pqrs/environment_variable.hpp>
TEST_CASE("find") {
REQUIRE(pqrs::environment_variable::find("PATH"));
REQUIRE(pqrs::environment_variable::find("UNKNOWN_ENVIRONMENT_VARIABLE") == std::nullopt);
}
| 265 | 105 |
#include "common.h"
#include "Factory.h"
#include "Plugin.h"
const IID CFactory::SupportedIIDs[] = {IID_IUnknown, IID_IClassFactory};
CFactory::CFactory()
: CUnknown<IClassFactory>(SupportedIIDs, 2)
{
}
CFactory::~CFactory()
{
}
STDMETHODIMP CFactory::CreateInstance(IUnknown *pUnkOuter, REFIID riid, void **ppvObje... | 858 | 391 |
/*************************************************************************
* Copyright (c) 2015, Synopsys, Inc. *
* All rights reserved. *
* *
* Redistribution and... | 5,624 | 1,866 |
#include<iostream>
#include<algorithm>
using namespace std;
double arr[101];
int main(){
double a,ave=0;
cin>>a;
for(int i=0;i<a-1;i++) cin>>arr[i];
int tmp=a-1;
sort(arr,arr+tmp);
for(int i=a-2;i>0;i--) ave+=arr[i];
ave/=a-2;
if(ave>=50) cout<<"0"<<endl;
else{
ave-=arr[1]/(a-2);
for(int i=0;i<=100;i++){
... | 421 | 242 |
/* Exercise 3.2: Write a program to read the standard input
* a line at a time. Modify your program to read a word at
* a time
*/
// Xiaoyan Wang 10/26/2015
#include <iostream>
#include <string>
using namespace std;
int main() {
string line;
while (getline(cin, line))
cout << line << endl;
return 0;
}
| 318 | 115 |
#include "register_types.h"
#include "object_type_db.h"
#include "core/globals.h"
#include "ios/src/godytics.h"
void register_godytics_types() {
Globals::get_singleton()->add_singleton(Globals::Singleton("Godytics", memnew(Godytics)));
}
void unregister_godytics_types() {
}
| 281 | 116 |
// -----------------------------------------------------------------------------
// Copyright 2020 Rui Liu (liurui39660) and Siddharth Bhatia (bhatiasiddharth)
//
// 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 co... | 5,943 | 1,513 |
/*
#include <iostream>
#include <iomanip>
#include "dogdefs.h"
#include "IniParams.h"
*/
#include "DogSolverCart2.h"
#include <string.h> // For strcpy and strcat (some compilers don't need this)
#include "IniParams.h"
// Function that is called after initial condition
void AfterQinit(DogSolverCart2& solver)
... | 947 | 362 |
#pragma once
#if defined(Ava_X86) \
|| defined(__i386__) \
|| defined(__i486__) \
|| defined(__i586__) \
|| defined(__i686__) \
|| defined(_M_IX86)
# ifndef Ava_X86
# define Ava_X86 1
# endif
# define Ava_32 1
# define Ava_ARCH x86
#elif defined(Ava_X64) \
|| defined(__x86_64) \
|| defined(__x86_64__) \
||... | 691 | 371 |
#include <iostream>
#include <stdio.h>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
/* Offer */
/* Type: */
/* 题目信息 */
/*
*剑指 Offer 39. 数组中出现次数超过一半的数字
数组中有一个数字出现的次数超过数组长度的一半,请找出这个数字。
你可以假设数组是非空的,并且给定的数组总是存在多数元素。
示例 1:
输入: [1, 2, 3, 2, 2, 2, 5, 4, 2]
输出: 2
限制: 1 <= 数组长度 <=... | 841 | 483 |
#include <gtest/gtest.h>
#include <gen/floodfill.hpp>
using namespace eXl;
TEST(DunAtk, FloodFillTest)
{
AABB2Di box(Vector2i::ZERO, Vector2i::ONE * 8);
{
Vector<char> testVec =
{ -1, -1, -1, -1, -1, -1, -1, -1,
-1, 0, 0, -1, -1, 0, 0, -1,
-1, 0, 0, 0, -1, -1, 0, 0,
-1, -1, -... | 1,205 | 715 |
#include "RecoLocalCalo/HGCalRecAlgos/interface/ClusterTools.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/ForwardDetId/interface/ForwardSubdetector.h"
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
#include "Geometry/HGCalGeometry/interface/HGCalGeometry.h"
#include "FWCore/Fr... | 6,096 | 2,214 |
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrVkGpuCommandBuffer.h"
#include "GrMesh.h"
#include "GrPipeline.h"
#include "GrRenderTargetPriv.h"
#include "GrTextureAccess.h"
#include "GrTexturePriv.h"
#include "GrV... | 18,592 | 5,484 |
#include <unistd.h>
#include <string.h>
#include "iostream"
#include "stdio.h"
#include "stdint.h"
#include "fillsize.h"
#include "mergebin.h"
#include "alignbin.h"
#include "ddbin.h"
using namespace std;
int usage(void)
{
cout << "Usage: fillsize <filename> [address]" << endl;
return 0;
}
int usage_merge(vo... | 3,151 | 1,152 |
// Copyright (c) 2015-2015 The e-Gulden developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <math.h>
#include "chain.h"
#include "chainparams.h"
#include "primitives/block.h"
#include "uint256.h"
#include "... | 3,632 | 1,252 |
class Item_TFAR_rf7800str: Item_Base_F {
scope = PUBLIC;
scopeCurator = PUBLIC;
displayName = "RF-7800S-TR";
author = "Nkey";
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(TFAR_rf7800str,1);
};
#include "\z\tfar\addons\static_radios\edenAttributes.hpp"
};
HIDDEN_C... | 414 | 170 |
#include <iostream>
using namespace std;
#define MAX 3001
int dp[MAX][MAX];
int main()
{
string s, r;
int a, b, c;
cin >> a >> b >> c >> s >> r;
for (int i=1; i<MAX; ++i)
dp[i][0] = dp[0][i] = i*b;
for (int i=1; i<=s.length(); ++i) {
for (int j=1; j<=r.length(); ++j) {
if (s[i-1] == r[j-1])
dp[i][j]... | 499 | 291 |
#pragma once
#include <application.hpp>
#include <graphics.hpp>
struct RunExampleAppInfo {
std::string_view title;
std::function<void( )> on_init = []( ) {};
std::function<void( )> on_update = []( ) {};
std::function<void( int, int )> on_present;
std::function<void( )> on_cleanup = []( ) {};
};
c... | 2,052 | 638 |
/* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from *
... | 10,679 | 3,047 |
#include "playaction.h"
#include "game.h"
#include "playerstate.h"
void PlayAction::PrintAction (Game& g, const PlayAction* a, int bg) {
int ofcolor = CLI::getFcolor (), obcolor = CLI::getBcolor ();
CLI::setColor (CLI::COLOR::LIGHT_GRAY, bg);
const int width = 5;
std::string str = a?a->input:"";
int leadSpace = ... | 1,227 | 519 |
#include "ege3d/window/GLError.h"
#include <ege3d/window/RenderingState.h>
#include <ege3d/window/SystemEvent.h>
#include <ege3d/window/Renderable.h>
#include <ege3d/window/Renderer.h>
#include <ege/debug/Logger.h>
#include <GL/gl.h>
class MyRenderable : public EGE3d::Renderable
{
public:
virtual void render(EGE3... | 2,236 | 835 |
#include "apic.h"
APIC apic;
void APIC::init(uint64_t *apic_address)
{
if(apic_address == NULL) Exceptions::panic("No APIC table found!");
else this->apic = (struct MADTDescriptor*)apic_address;
log.log("APIC::init", "MADT table located at 0x");
log.logln(String((uint64_t)this->apic, HEXADECIMAL));
... | 696 | 304 |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI
// Copyright 2012 - 2014 MetaScale SAS
//
// Distributed under the Boost... | 2,380 | 780 |
//******************************************************************************
// Copyright (c) 2005-2013 by Jan Van hijfte
//
// See the included file COPYING.TXT for details about the copyright.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the i... | 2,569 | 845 |
/**
* \file PnlWznmNavJob.cpp
* API code for job PnlWznmNavJob (implementation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author Alexander Wirthmueller (auto-generation)
* \date created: 5 Dec 2020
*/
// IP header --- ABOVE
#include "PnlWznmNavJob.h"
using namespace std;
using namespace Sbecore;
usin... | 21,058 | 8,981 |