text string | size int64 | token_count int64 |
|---|---|---|
#ifndef CORE_H
# include "..\..\..\inc\System\Core.h"
#endif
#include "BitArray.hpp"
#include <string.h>
using namespace Structs;
namespace Structs { namespace Collections {
BitArray::BitArray(uint size)
{
_size = size;
}
void BitArray::Destroy(BitArray &p)
{
if (&p =... | 4,910 | 1,601 |
// Office.cpp
// Static field holds rent due date for an office - rents are due on the 1st
#include <iostream>
#include <string>
using namespace std;
class Office
{
private:
int officeNum;
string tenant;
int rent;
static int rentDueDate;
public:
void setOfficeData(int, string, int);
static void showRen... | 1,088 | 393 |
#pragma once
#include "geometry/point2d.hpp"
#include "geometry/polygon.hpp"
#include "geometry/rect2d.hpp"
#include "coding/geometry_coding.hpp"
#include "base/buffer_vector.hpp"
#include "base/geo_object_id.hpp"
#include <cstdint>
#include <vector>
namespace indexer
{
// Class for intermediate objects used to bu... | 2,637 | 994 |
#include <cctbx/boost_python/flex_fwd.h>
#include <boost/python/def.hpp>
#include <boost/python/class.hpp>
#include <boost/python/args.hpp>
#include <boost/python/return_value_policy.hpp>
#include <boost/python/copy_const_reference.hpp>
#include <boost/python/return_internal_reference.hpp>
#include <boost/python/retur... | 2,275 | 837 |
#pragma once
#include <opengl/bind.hpp>
#include <opengl/global.hpp>
#include <opengl/vao.hpp>
#include <opengl/vertex_attribute.hpp>
#include <boomhs/entity.hpp>
#include <common/log.hpp>
#include <common/type_macros.hpp>
#include <optional>
#include <string>
namespace boomhs
{
class ObjStore;
} // namespace boomh... | 3,212 | 1,111 |
#include "operators_c.h"
#include "operators.h"
#include <Eigen/Dense>
#include <iostream>
using namespace std;
static dfloat_t *to_c(VectorXd &v)
{
dfloat_t *vdata = (dfloat_t *)asd_malloc_aligned(sizeof(dfloat_t) * v.size());
#if USE_DFLOAT_DOUBLE == 1
Eigen::Map<Eigen::VectorXd>(vdata, v.size()) = v.cast<dfloa... | 13,467 | 6,733 |
#include "larq_compute_engine/mlir/transforms/padding.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "tensorflow/compiler/mlir/lite/ir/tfl_ops.h"
namespace mlir {
namespace TFL {
namespace {
bool NoBatchAndChannelPadding(Attribute paddings_attr) {
auto paddings = Ge... | 2,337 | 766 |
// Copyright 2000-2021 Mark H. P. Lord
#include "XMLWriter.h"
#include <string.h>
namespace {
// TODO: might be worth finding a common place for this? Or making them static methods so other modules can use them?
inline bool IsXMLWhitespace(char ch)
{
return ch == 0x09 || ch == 0x0a || ch == 0x0d || ch == 0x0c |... | 8,857 | 2,923 |
#include "Engine/LightFroxelationTechnique.hpp"
#include "Engine/Engine.hpp"
#include "Engine/DefaultResourceSlots.hpp"
#include "Core/Executor.hpp"
constexpr const char* kFroxelIndirectArgs = "FroxelIndirectArgs";
constexpr const char* kLightIndexCounter = "lightIndexCounter";
constexpr const char* kActiveFroxelsCou... | 9,821 | 3,277 |
/*
Copyright (c) 2014, Facebook. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be... | 17,620 | 6,263 |
#include "../include/ObstacleDetector.hpp"
#include <climits>
#include <cassert>
void exit_with_help(){
std::cout<<
"Usage: lane-detector [options]\n"
"options:\n"
"-d : Non-zero for debug\n"
"-s : Subscriber topic name\n"
"-p : Publisher topic name\n"
"-l : Maximum distance we need \n"
"-m : Min... | 4,157 | 1,630 |
#include "pch.h"
#include "Room.h"
#include "geom/ModelRepository.h"
using geom::ModelRepository;
#include "tex/TextureRepository.h"
using tex::TextureRepository;
#include "geom/CollisionUtil.h"
#include "geom/Sphere.h"
#include "game/Game.h"
using game::Game;
#include "game/MultimediaPlayer.h"
using game::Multime... | 15,698 | 6,779 |
#include "slt/settings.h"
#include "slt/settings_context.h"
#include <string>
slt::Setting ip_address = slt::Setting_builder<std::string>()
.with_default("localhost")
.with_description("The IP address to operate on")
.with_arg("... | 621 | 194 |
#include "Misc/PKCS1.h"
#include "Misc/pgptime.h"
#include "RNG/RNGs.h"
#include "common/includes.h"
namespace OpenPGP {
std::string EME_PKCS1v1_5_ENCODE(const std::string & m, const unsigned int & k) {
if (m.size() > (k - 11)) {
// "Error: EME-PKCS1 Message too long.\n";
return "";
}
st... | 1,317 | 526 |
#include "EnergyItem.h"
#include "Scene.h"
#include "Thrall.h"
#include "Application.h"
#include "ModuleRender.h"
EnergyItem::EnergyItem()
{
}
EnergyItem::~EnergyItem()
{
}
bool EnergyItem::Start()
{
return true;
}
bool EnergyItem::Act(ModuleItems::ItemEvent event, float dt)
{
switch (event)
{
case ModuleIte... | 1,009 | 422 |
#ifndef QTSL_UdpMessageHandlerInterface_H
#define QTSL_UdpMessageHandlerInterface_H
namespace qtsl{
namespace udp{
struct UdpMessage;
};
class UdpMessageHandlerInterface{
public:
virtual void udpMessageHandler(qtsl::udp::UdpMessage * message)=0;
};
};
#endif
| 297 | 100 |
#include "include/hi/hicalendar.hpp"
////::::::::::::::::::::::::::::::::::::::::::: YearMonthDay
YearMonthDay::YearMonthDay(int _Year, int _Month, int _Day, QObject *parent):
QObject(parent),year(_Year),month(_Month),day(_Day) {}
YearMonthDay::YearMonthDay(const YearMonthDay &other):
QObject(other.parent())... | 28,042 | 9,043 |
/**
* The MIT License (MIT)
* Copyright (c) 2017-2017 Daniel Sebastian Iliescu, http://dansil.net
*
* 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 witho... | 1,686 | 565 |
#pragma once
#include <gl3w/GL/gl3w.h>
#include <scigl_render/shader/shader.hpp>
#include <scigl_render/scene/camera_intrinsics.hpp>
#include <scigl_render/scene/pose.hpp>
#include <vector>
namespace scigl_render
{
/*!
A camera has a position in the world (extrinsics) and projection (intrinsic).
The extrinsics and int... | 2,009 | 651 |
#include <gtest/gtest.h>
#include "telegram_bot.h"
using namespace telegram;
TEST(QueryBuilder,builder_builtin) {
QueryBuilder builder;
int b = 5;
int c = 6;
bool d = false;
builder << make_named_pair(b) << make_named_pair(c) << make_named_pair(d);
std::string json = builder.getQuery();
std:... | 1,792 | 641 |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/services/request/topicSubscription.proto
#include "proto/services/request/topicSubscription.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/io/coded_stre... | 25,960 | 8,742 |
//#include "rString.hpp"
#include <math.h>
#include "AeroSurf.hpp"
#if _DEBUG_AEROSURF
void drawWing(Vector3 pos, Matrix3 rot, float a, float AspectRatio )
{
Matrix4 pose;
pose.SetPosition(Vector3D(pos.X(), pos.Y(), pos.Z()));
pose.SetOrientation(rot);
renderer.DrawBox(Vector3D(0, 0, 0), Vector3(... | 29,949 | 12,117 |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
int n;
for(int i=0;i<t;i++)
{
cin>>n;
int a[n];
int aodd=0;
int aeven=0;
int ieven,iodd;
int ans;
for(int j=1;j<=n;j++)
{
cin>>a[j];
if(a[j]%2==0)
{
aeven=aeven+1;
}
else
{
aodd=aodd+1;
}
}
... | 450 | 297 |
//
// Created by Arseny Tolmachev on 2017/07/21.
//
#include "lattice_format.h"
#include "core/analysis/analyzer_impl.h"
#include "util/logging.hpp"
namespace jumanpp {
namespace jumandic {
namespace output {
Status LatticeFormatInfo::fillInfo(const core::analysis::Analyzer& an,
i3... | 7,997 | 2,845 |
// 6.exercise.10.cpp
//
// A permutation is an ordered subset of a set. For example, say you wanted to
// pick a combination to a vault. There are 60 possible numbers, and you need
// three different numbers for the combination. There are P(60,3) permutations
// for the combination, where P is defined by the formula
/... | 8,221 | 2,543 |
//
// VintageToggleButton.cpp
// GoldRush
//
// Created by Tommi Gröhn on 26.10.2015.
//
//
#include "VintageToggleButton.h"
VintageToggleButton::VintageToggleButton (Colour baseColour, Colour switchColour) : baseColour (baseColour), switchColour (switchColour)
{
}
void VintageToggleButton::setLabel (String s)
{
... | 2,598 | 782 |
#include <stdio.h>
#include <iostream>
#include <algorithm>
using namespace std;
int get (int accumTotal[], int first, int last) {
int permVal = accumTotal[last];
if (first > 0)
permVal -= accumTotal[first-1];
return permVal;
}
int numWays(int len, int accumTotal[], int sons[]) {
int val = 0;... | 1,534 | 612 |
#line 1 "dhcp4_lexer.cc"
#line 3 "dhcp4_lexer.cc"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
/* %not-for-header */
/* %if-c-only */
/* %if-not-reentrant */
#define yy_create_buffer parser4__create_buffer
#define yy_delete_buffer parser4__delete_buffer
#define yy_scan_buffer parser4_... | 177,106 | 92,048 |
/***************************************************************************
File : MatrixSizeDialog.cpp
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2004-2008 by Ion Vasilief
Email (use @ for *) : ion... | 5,362 | 1,684 |
// ObjectTalk Scripting Language
// Copyright (c) 1993-2022 Johan A. Goossens. All rights reserved.
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
//
// Include files
//
#include "ot/function.h"
#include "ot/vm.h"
#include "knob.h"
//
// O... | 4,382 | 1,746 |
#include <string>
#include <iostream>
#include <stdint.h>
#include <stdlib.h>
uint32_t* reverse_array(uint32_t length, uint32_t* input);
void print_array(uint32_t length, uint32_t* input);
int main(int argc, char* argv[]){
std::string str = "This is string";
std::cout << "Length(" << str << ") = " << str.len... | 1,206 | 492 |
#include "p2Defs.h"
#include "p2Log.h"
#include "j1App.h"
#include "j1Render.h"
#include "j1Textures.h"
#include "j1Pathfinding.h"
#include "j1Map.h"
#include <math.h>
#include "j1Input.h"
#include "j1Window.h"
j1Pathfinding::j1Pathfinding() : j1Module()
{
name.create("pathfinding");
}
// Destructor
j1Pathfinding::~... | 7,773 | 3,747 |
#ifndef _DLOAD_HPP
#define _DLOAD_HPP
#include <unordered_map>
#include <string>
#include <dlfcn.h> //加载动态库所需要的头文件
#include "interface.h"
class dynamicLoader
{
class SoWrapper //用来包装指针
{
public:
interface *(*getInstanceFunc)(void);
void *soPtr;
SoWrapper(interface *(*fptr)(void), vo... | 2,516 | 891 |
#include "saber/lite/funcs/saber_deconv_act.h"
#include "saber/lite/net/saber_factory_lite.h"
namespace anakin{
namespace saber{
namespace lite{
SaberDeconvAct2D::SaberDeconvAct2D() {
_conv_func = new SaberDeconv2D;
}
SaberDeconvAct2D::SaberDeconvAct2D(const ParamBase *param) {
_conv_func = new SaberDeconv2D... | 4,865 | 1,838 |
#ifndef REDQUEUE_HH_
#define REDQUEUE_HH_
#include <list>
#include <random>
#include "logging.hh"
#include "Clock.hh"
#include "net/Queue.hh"
#include "net/SizedQueue.hh"
/** @brief An Adaptive RED queue. */
/** See the paper Random Early Detection Gateways for Congestion Avoidance */
template <class T>
class REDQue... | 4,993 | 1,691 |
#include "../../test_utils.hpp"
template <typename T>
void ans_matsub(const monolish::matrix::Dense<T> &A,
const monolish::matrix::Dense<T> &B,
monolish::matrix::Dense<T> &C) {
if (A.get_row() != B.get_row()) {
std::runtime_error("A.row != B.row");
}
if (A.get_col() != B.get_... | 3,208 | 1,495 |
/**********************************************************************
*
* FILE: Viewport.cpp
*
* DESCRIPTION: Read/Write osg::Viewport in binary format to disk.
*
* CREATED BY: Auto generated by iveGenerated
* and later modified by Rune Schmidt Jensen.
*
* ... | 2,024 | 603 |
#include "trick/MessageLCout.hh"
| 33 | 14 |
// $Id$
/**************************************************************************
* This file is property of and copyright by the ALICE HLT Project *
* All rights reserved. *
* *
* Prim... | 9,045 | 3,322 |
//
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trad... | 27,930 | 8,988 |
class Solution {
public:
int removeDuplicates(vector<int>& nums) {
vector<int>::iterator ip;
ip = std::unique(nums.begin(), nums.end());
nums.resize(std::distance(nums.begin(), ip));
return nums.size();
}
}; | 249 | 83 |
#include <aditof/frame_operations.h>
namespace aditof {
bool operator==(const FrameDetails &lhs, const FrameDetails &rhs) {
return lhs.type == rhs.type && lhs.width == rhs.width && lhs.width &&
rhs.height;
}
bool operator!=(const FrameDetails &lhs, const FrameDetails &rhs) {
return !(lhs == rhs);
... | 345 | 119 |
#ifndef ENGINE_HPP_
#define ENGINE_HPP_
class engine {
public:
engine();
engine(engine const &) = delete;
~engine();
void operator=(engine const &) = delete;
};
#endif // ENGINE_HPP_
| 201 | 77 |
#include "DPassLightingModule.h"
#include "../Renderers/ModuleRenderer/ModuleRenderer.h"
#include "../GBufferModule/GBufferModule.h"
#include "../LightsModule/LightsModule.h"
#include "../../../Camera/Camera.h"
#include "../../RendererResourceManagers/RendererShaderManager/RendererShaderData/RendererShaderData.h"
/... | 6,275 | 2,077 |
#include<iostream>
#include<utility>
#include<vector>
#include<algorithm>
using namespace std;
vector<pair<long long int,pair<long long int,long long int>>> v;
long long int P[1000006],S[1000006];
long long int dsu(long long int x,long long int y)
{
long long int i,j;
i=x;
while(i!=P[i])
{
P[i]=P[P[i]];
i=P[i... | 894 | 547 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne... | 12,889 | 4,552 |
// Copyright Epic Games, Inc. All Rights Reserved.
#include "TextureBakerCommands.h"
#define LOCTEXT_NAMESPACE "FTextureBakerModule"
void FTextureBakerCommands::RegisterCommands()
{
UI_COMMAND(OpenPluginWindow, "TextureBaker", "Bring up TextureBaker window", EUserInterfaceActionType::Button, FInputGesture());
}
#u... | 343 | 116 |
#include "imageprocessing/contour.h"
#include <QJsonObject>
#include <QJsonArray>
#include <QFile>
#include <QJsonDocument>
#include <QDebug>
#include <QRectF>
#include <QString>
//#define DEBUG
constexpr auto NAME{ "Name" };
constexpr auto WIDTH{ "Width" };
constexpr auto HEIGHT{ "Height" };
constexpr auto X{ "X" }... | 3,934 | 1,632 |
/*
* File: teleconf.cpp
*/
#include "usermodfx.h"
#include "biquad.hpp"
#define SUBTIMBRE 0
// filter parameters
#define LPF_FC 3000.f
#define HPF_FC 300.f
#define LPF_Q 0.707f
// filters before downsampling
static dsp::BiQuad s_bq_lpf_r;
static dsp::BiQuad s_bq_hpf_r;
static dsp::BiQuad s_bq_lpf_l;
static dsp:... | 4,793 | 2,600 |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... | 2,564 | 713 |
// Autogenerated, do not edit
#include <fonts/GeneratedFont.hpp>
FONT_TABLE_LOCATION_FLASH_PRAGMA
KEEP extern const touchgfx::GlyphNode glyphs_Asap_Bold_12_4bpp[] FONT_TABLE_LOCATION_FLASH_ATTRIBUTE =
{
{ 0, 0x0031, 6, 9, 9, 0, 6, 0, 0, 0x00 },
{ 27, 0x0032, 6, 9, 9, 0, 6, 0, ... | 1,390 | 803 |
#include "InputListener.h"
namespace WGF
{
InputListener::InputListener()
{
//ctor
}
InputListener::~InputListener()
{
//dtor
}
} // namespace WGF
| 191 | 66 |
#include <cstdio>
using namespace std;
typedef long long ll;
const int p=5000011;
const int maxn=1e5+10;
int n,k;
ll f[maxn];
int main(){
scanf("%d%d",&n,&k);
for(int i=0;i<=k;i++) f[i]=(i+1)%p;
for(int i=k+1;i<=n;i++) f[i]=(f[i-1]+f[i-k-1])%p;
printf("%lld\n",f[n]);
}
| 287 | 163 |
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 7,405 | 2,659 |
#include "Region.h"
namespace shapeworks {
IndexRegion& IndexRegion::pad(int padding)
{
for (auto i = 0; i < 3; i++)
{
min[i] -= padding;
max[i] += padding;
}
return *this;
}
std::ostream &operator<<(std::ostream &os, const IndexRegion &r)
{
return os << "{\n\tmin: [" << r.min[0] << ", " << r.min[1] << "... | 1,465 | 647 |
// Copyright 2020 Google LLC. 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... | 5,815 | 2,172 |
#ifndef ETWP_OSTREAM_MANIPULATORS_HPP
#define ETWP_OSTREAM_MANIPULATORS_HPP
namespace ETWP {
class ConsoleOStream;
using OStreamManipulator = void (*)(ConsoleOStream*);
void Endl (ConsoleOStream* stream);
void ColorReset (ConsoleOStream* stream);
void FgColorReset (ConsoleOStream* stream);
void FgColorBlack (Cons... | 1,870 | 618 |
// Print the application's executable filename.
TRACE(_T("Executable filename = %s\n"), AfxGetApp()->m_pszExeName); | 115 | 38 |
#include <iostream>
#include <set>
#include <map>
#include <iterator>
#include <vector>
#include <sstream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <algorithm>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include "nlxml.h"
using namespace nlxml;
/* Read the SWC file (http://research.mssm.e... | 4,833 | 1,979 |
//AUTHOR:
//umiko(https://github.com/umiko)
//Permission to copy and modify is granted under the MIT license
//
//DESCRIPTION:
//A struct to save the last measurement taken, so it can be supplied at a later time again
#ifndef MOISTUREMEASUREMENT_CPP
#define MOISTUREMEASUREMENT_CPP
#include <Arduino.h>
class moistureMe... | 588 | 207 |
#include <Arduino.h>
// On Air Display control
// Light up the On Air sign using a strip of 10 WS2812s
// Button controls if sign is on or off
// Webpage also available to control sign
#include <SPIFFS.h>
#include <WiFi.h>
#include <WiFiManager.h> // For managing the Wifi Connection
#include <ESPmDNS.h> ... | 29,442 | 10,525 |
#pragma once
#include <QString>
struct DeviceReference {
QString _api = "(none)";
QString _name = "(noname)";
int _index = 0;
};
| 141 | 55 |
#pragma once
#include <iostream>
namespace itertools
{
typedef struct
{
template <typename T>
T operator()(T a, T b)
{
return a + b;
}
} add;
template <typename Container,typename Ftor = add>
class accumulate
{
Ftor _fnctor = [](in... | 2,784 | 689 |
#include "linear-octree.hpp"
#include <glm/gtx/norm.hpp>
#include "../common/constexpr-math.hpp"
#include "../common/util.hpp"
template <class Data>
LinearOctree<Data>::LinearOctree(Octree<Data> &octree_root)
{
size_t octree_size = 0, data_size = 0;
octreeSize(octree_root, octree_size, data_size);
if (o... | 5,903 | 1,950 |
#include "LinearizedImplicitEuler.h"
#include "VS3D.h"
// TODO: Save space by creating dx, dv, rhs, A only once.
LinearizedImplicitEuler::LinearizedImplicitEuler()
: SceneStepper()
{}
LinearizedImplicitEuler::~LinearizedImplicitEuler()
{}
bool LinearizedImplicitEuler::stepScene( VS3D& scene, scalar dt )
{
const... | 3,397 | 1,359 |
#include "../../lang/Exception.hpp"
#include "../../../JString.hpp"
#include "./ErrorManager.hpp"
namespace java::util::logging
{
// Fields
jint ErrorManager::CLOSE_FAILURE()
{
return getStaticField<jint>(
"java.util.logging.ErrorManager",
"CLOSE_FAILURE"
);
}
jint ErrorManager::FLUSH_FAILURE()
{
ret... | 1,433 | 620 |
// All content Copyright (C) 2018 Genomics plc
#ifndef VCF_READER_HPP
#define VCF_READER_HPP
#include <utils/logging.hpp>
#include <fstream>
#include <boost/optional/optional.hpp>
#include <map>
#include <set>
#include "vcf/filterDescription.hpp"
#include "vcf/record.hpp"
#include "utils/timer.hpp"
struct shouldPar... | 759 | 263 |
// Copyright (c) 2019 LLambert
//
// 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,
// publish, dist... | 18,446 | 7,853 |
#include <Arduino.h>
#include <config/LaserConfig.h>
Pwm pwm = Pwm(PWM_DEFAULT_PERIOD);
PwmController pwmController = PwmController(
&pwm,
PWM_PIN_RED,
PWM_PIN_GREEN,
PWM_PIN_BLUE);
PwmTimerPotentiometerCallback timerPotentiometerCallback = PwmTimerPotentiometerCallback(PWM_PERIOD_MIN, PWM_PERIOD_MAX,... | 1,364 | 553 |
#include <bits/stdc++.h>
using namespace std;
// function to print the bracket number
void printBracketNumber(string exp, int n)
{
// used to print the bracket number
// for the left bracket
int left_bnum = 1;
// used to obtain the bracket number
// for the right bracket
... | 1,336 | 439 |
#include "pch.h"
#include "MoveLookControllerKinect.h"
MoveLookController^ MoveLookControllerKinect::Create()
{
auto p = ref new MoveLookControllerKinect();
return static_cast<MoveLookController^>(p);
}
MoveLookControllerKinect::MoveLookControllerKinect()
{
}
| 269 | 95 |
/*
* BSD LICENSE
* Copyright (c) 2021 Samsung Electronics Corporation
* 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 th... | 3,465 | 1,343 |
#include <fstream>
#include <string>
#include <sstream>
#include <iostream>
#include <vector>
#include <cmath>
#include <tuple>
#include <regex>
#include <cassert>
#include "file_obj_mesh.hpp"
#include "renderable_info.hpp"
renderable_info_tris file_obj_mesh::calc_renderable_info_tris( file_obj_mesh::data_mesh & dm ... | 6,406 | 2,674 |
// This file is written by Alireza Kamyab 3/30/2021
// Solution to problem projecteuler.net/problem=43
#include <iostream>
#include <vector>
#include <algorithm>
#include <cinttypes>
using namespace std;
bool hasProperty(vector<int> arr);
int primeAfter(int number);
uint64_t convertVectorToNumber(vector<int> numbers);... | 1,311 | 550 |
#define SPX_GITHASH "b8833cd3"
| 31 | 19 |
struct MBC3 : Mapper {
auto second() -> void;
auto read(uint16 address) -> uint8;
auto write(uint16 address, uint8 data) -> void;
auto power() -> void;
auto serialize(serializer& s) -> void;
struct IO {
struct ROM {
uint8 bank = 0x01;
} rom;
struct RAM {
uint1 enable;
uint8 ba... | 644 | 237 |
/*
* BitmapReader.cpp
*
* Created on: Dec 17, 2017
* Author: Antero Nousiainen
*/
#include "BitmapReader.hpp"
using namespace image;
namespace
{
template<typename T>
void read(std::istream & stream, T & t, std::streamsize count = sizeof(T))
{
stream.read(reinterpret_cast<char*>(&t), co... | 1,612 | 552 |
/*-------------------------------------------------------------------------------
BARONY
File: actmagic.cpp
Desc: behavior function for magic balls
Copyright 2013-2016 (c) Turning Wheel LLC, all rights reserved.
See LICENSE for details.
---------------------------------------------------------------------------... | 167,382 | 84,556 |
/*
The MIT License (MIT)
Copyright (c) 2015 Jérémie Bannwarth
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, me... | 1,504 | 537 |
/*
* POCC
*
* Copyright 2017 Operating Systems Laboratory EPFL
*
* 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... | 1,148 | 350 |
//---------------------------------------------------------------------------------
// Copyright (C) 2001 James M. Van Verth
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the Clarified Artistic License.
// In addition, to meet copyright restrictions you must ... | 4,178 | 1,595 |
/*---------------------------------------------------------------------------*\
Copyright (C) 2011-2015 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of CAELUS.
CAELUS is free software: you can redistribute it and/or modify it
... | 6,259 | 1,923 |
// -*- C++ -*-
/*!
* @file FastRTPSOutPort.cpp
* @brief FastRTPSOutPort class
* @date $Date: 2019-01-31 03:08:03 $
* @author Nobuhiko Miyamoto <n-miyamoto@aist.go.jp>
*
* Copyright (C) 2019
* Nobuhiko Miyamoto
* Robot Innovation Research Center,
* National Institute of
* Advanced Indust... | 2,069 | 721 |
#pragma once
namespace xolotl
{
namespace core
{
namespace network
{
template <typename TNetwork, typename TDerived>
KOKKOS_INLINE_FUNCTION
NucleationReaction<TNetwork, TDerived>::NucleationReaction(
ReactionDataRef reactionData, ClusterDataRef clusterData,
IndexType reactionId, IndexType cluster0, IndexType cluster... | 3,955 | 1,332 |
#include "output.h"
std::ostream& V2::operator<<(std::ostream& output, const Leader& leader)
{
output << "leader = {\n";
output << "\tname=\"" << leader.name << "\"\n";
output << "\tdate=\"" << leader.activationDate << "\"\n";
if (leader.isLand)
{
output << "\ttype=land\n";
}
else
{
output << "\ttype=sea\n... | 504 | 201 |
/*
* Copyright Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" f... | 3,387 | 1,261 |
#include <windows.h>
#include <stdio.h>
#include <comdef.h> // for using bstr_t class
#include <vector>
#include <tchar.h>
#define SYSTEM_OBJECT_INDEX 2 // 'System' object
#define PROCESS_OBJECT_INDEX 230 // 'Process' object
#define PROCESSOR_OBJECT_INDEX 238 // 'Processor' object
#define TOTAL_PROCESSOR_... | 10,658 | 4,589 |
/*
------------------------------------------------------------------------------------------
Copyright (c) 2014 Vinyl Games Studio
Author: Mikhail Kutuzov
Date: 5/15/2014 4:14:48 PM
------------------------------------------------------------------------------------------
*/
#include "WeaponC... | 15,209 | 5,885 |
/**
* @file Video.cc
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2017 Intel Corporation
*
* 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 restri... | 3,540 | 1,227 |
//===----------------------------------------------------------------------===//
//
// BusTub
//
// log_manager.cpp
//
// Identification: src/recovery/log_manager.cpp
//
// Copyright (c) 2015-2019, Carnegie Mellon University Database Group
//
//===------------------------------------------------... | 4,914 | 1,869 |
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (... | 10,470 | 3,421 |
// If compiled with -fopenmp, include omp (for multithreading)
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#define omp_get_max_threads() 1
#endif
/* A test driver for the Network class (NetworkDriver.cpp) */
#include <stdio.h>
#include <sys/stat.h>
#include <iostream>
#... | 20,476 | 6,898 |
#include <bits/stdc++.h>
using namespace std;
int factorial(int n) {
if (n > 1) n *= factorial(n - 1);
return n;
}
int main() {
int n;
cin >> n;
cout << factorial(n) << endl;
return 0;
}
// Complexity of the above program is O(n) | 260 | 109 |
/*****************************************************************************
* *
* CIOS Audio Core *
* *
* V... | 11,966 | 2,114 |
#include "R.h"
namespace Elastos {
namespace Droid {
const int R::anim::accelerate_decelerate_interpolator=0x010a0004;
const int R::anim::accelerate_interpolator=0x010a0005;
const int R::anim::activity_close_enter=0x010a000d;
const int R::anim::activity_close_exit=0x010a000e;
const int R::anim::activity_open_enter=0x... | 478,011 | 218,327 |
#pragma once
#include <string>
#include "date.hh"
// ----------------------------------------------------------------------
namespace xlnt
{
class cell;
}
namespace dtra
{
inline namespace v2
{
class Directory;
// --------------------------------------------------
class Reco... | 5,841 | 1,919 |
#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;
//to_string要求C++11
int main()
{
int N;
cin >> N;
for(int i=1;i <= N;i++){
char target;
string input,output;
int count = 0;
cin >> input;
for(int j = 0;j < input.length(... | 921 | 270 |
// This file is part of VSTGUI. It is subject to the license terms
// in the LICENSE file found in the top-level directory of this
// distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
#include "../../../lib/cpoint.h"
#include "../unittests.h"
namespace VSTGUI {
TESTCASE(CPointTest,
TEST(unequal,... | 1,739 | 904 |
// 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"
namespace cv { namespace augment {
UniformNoise::UniformNoise(float _low, float _high)
{
low = _low;... | 658 | 242 |
#define _USE_MATH_DEFINES
#include "constants.h"
#include "server_driver.h"
#include "utils.h"
#include "settings_util.h"
#include "driver.h"
#include "facing_handsolver.h"
#include "ps_ds4_controller.h"
#include "trackable_device.h"
#include <assert.h>
namespace steamvrbridge {
// -- PSDualshock4ControllerConfig -... | 32,654 | 12,577 |