text string | size int64 | token_count int64 |
|---|---|---|
/**
* \file logic/wire_get_inputs.cpp
*
* \brief Get the number of input connections on this wire.
*
* \copyright Copyright 2020 Justin Handville. All rights reserved.
*/
#include <homesim/wire.h>
using namespace homesim;
using namespace std;
/**
* \brief Get the number of input connections associated with thi... | 435 | 138 |
//
// Created by Rui Zhou on 30/3/18.
//
/*
* https://leetcode.com/problems/power-of-two/description/
*
*/
#include <codech/codech_def.h>
using namespace std;
//这题目好像不对
//namespace yt {
// int Count(const vector<int>& nums)
// {
// int count = 0;
// for (int i = 0;i < nums.size();i++) {
// ... | 999 | 406 |
/*******************************************************************************
* Copyright (C) 2017 Udacity Inc.
*
* This file is part of Robotic Arm: Pick and Place project for Udacity
* Robotics nano-degree program
*
* All Rights Reserved.
*********************************************************************... | 5,404 | 2,002 |
#include <iostream>
#include "String.h"
#include "String.cpp"
using namespace std;
using namespace HomeMadeString;
int main()
{
// Test the default constructor
String s1;
// Test the conversion constructor
String s2="Hello, hello!";
// Let's see the results
cout<<endl<<"TESTING s1: "<<endl;
... | 1,540 | 595 |
// Copyright (c) 2015 Francois Doray.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditio... | 3,604 | 1,212 |
#include "class_4.h"
#include "class_6.h"
#include "class_1.h"
#include "class_0.h"
#include "class_3.h"
#include "class_4.h"
#include <lib_6/class_6.h>
#include <lib_5/class_9.h>
#include <lib_6/class_2.h>
#include <lib_3/class_1.h>
#include <lib_3/class_7.h>
class_4::class_4() {}
class_4::~class_4() {}
| 307 | 153 |
/**
* Copyright 2014-2017 Steven T Sell (ssell@vertexfragment.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | 2,747 | 756 |
/* ========================================================================= *
* *
* OpenMesh *
* Copyright (c) 2001-2015, RWTH-Aachen University *
... | 10,511 | 3,211 |
// Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | 7,196 | 2,218 |
#include "Elite/Translater/PassManager.h"
#include "Elite/CodeGen/ICodeGenContext.h"
PassManager::PassManager () {
}
PassManager::~PassManager () {
}
void PassManager::NewPassList(const string& name, const vector<Pass*>& vec) {
NewPassList(name, list<Pass*>(vec.begin(), vec.end()));
}
void PassManager::Ne... | 1,723 | 594 |
#include "driver.h"
#if EPSYSTEM_DRIVER == EPDRIVER_NULL
#include "hal/library.h"
bool epLibrary_Open(epLibrary *pLibrary, const char *filename)
{
return false;
}
bool epLibrary_Close(epLibrary library)
{
return false;
}
void *epLibrary_GetFunction(epLibrary library, const char *funcName)
{
return nullptr;
}... | 437 | 170 |
#include "process_start.h"
pid_t start_process(set_prog_start &program) {
pid_t process_pid;
// create new process
process_pid = fork();
if (process_pid == -1) {
// error of creation process
LOG("Error in process_start. Function fork(), couldn't do fork, for "
"program_name: " +
pro... | 2,975 | 931 |
#include <bits/stdc++.h>
using namespace std;
// Complete the maximizingXor function below.
int maximizingXor(int l, int r) {
// get xor of limits
int LXR = L ^ R;
// loop to get msb position of L^R
int msbPos = 0;
while (LXR)
{
msbPos++;
LXR >>= 1;
}
// construct... | 827 | 327 |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkToneMappingPass.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This softwa... | 6,641 | 2,294 |
// Copyright (c) 2000-2022, Heiko Bauke
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of ... | 3,179 | 1,284 |
#ifndef PacDispCyl_HH
#define PacDispCyl_HH
#include <stdio.h>
#include <Rtypes.h>
#define STRINGSIZE 100
struct PacDispCyl {
virtual ~PacDispCyl() {;}
Double_t radius,thickness,lowZ,hiZ;
Int_t imat;
PacDispCyl():radius(-1.0),thickness(-1.0),lowZ(-1.0),hiZ(1.0){}
static const char* rootnames() {
return ... | 401 | 193 |
#include <algorithm>
#include "GitCommit.h"
GitCommit::GitCommit(GitRepository *repo) :
GitObject(repo, "commit")
{
}
GitCommit::GitCommit(GitRepository *repo, const std::string &fmt) :
GitObject(repo, fmt)
{
}
std::vector<unsigned char>
GitCommit::serialize()
{
return kvlm_serialize();
}
void
GitCommit::deseri... | 3,592 | 1,478 |
/*
*
* Copyright 2006-2022, Andrea Anzani.
* Distributed under the terms of the MIT License.
*
* Authors:
* Andrea Anzani <andrea.anzani@gmail.com>
*/
#include "SamplerPanel.h"
#include "Sample.h"
#include "SamplerTrackBoost.h"
#include "GlobalDef.h"
#include "GfxMsg.h"
#include "SamplerTrack.h"
#include "Xed... | 6,128 | 2,903 |
/**
* urls/resolver.cpp
*
* Copyright (c) 2019-2021 Yuriy Lisovskiy
*/
#include "./resolver.h"
__URLS_BEGIN__
std::function<std::unique_ptr<http::IResponse>(http::IRequest*, conf::Settings*)> resolve(
const std::string& path, const std::vector<std::shared_ptr<IPattern>>& urlpatterns
)
{
std::function<std::uni... | 700 | 284 |
#include <gtest/gtest.h>
#include <srrg_system_utils/parse_command_line.h>
#include <srrg_system_utils/shell_colors.h>
#include "srrg_solver/solver_core/instances.h"
#include "srrg_solver/solver_core/internals/linear_solvers/instances.h"
#include "srrg_solver/solver_core/solver.h"
#include "srrg_solver/variables_and_... | 6,580 | 2,365 |
///////////////////////////////////////////////////////////////////////////////
// File: DDTECModuleAlgo .cc
// Description: Creation of a TEC Test
///////////////////////////////////////////////////////////////////////////////
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <string>
#include <utility... | 26,955 | 10,743 |
#include "../main/catch.hpp"
#include "config/device/DeviceConfigParser.hpp"
#include <typeinfo>
#include <iostream>
#include <string.h>
using namespace std;
TEST_CASE("DeviceConfigParser")
{
DeviceConfigParser parser;
SECTION("should parse semicolon-separated-values to DeviceConfig") {
// given:
... | 1,328 | 463 |
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 ... | 4,795 | 1,544 |
#include <L/src/engine/Engine.h>
#include <L/src/rendering/Renderer.h>
#include <L/src/system/System.h>
#include <L/src/system/Window.h>
#include <L/src/text/String.h>
#include "xlib.h"
static class XWindow* instance(nullptr);
L::Symbol xlib_window_type("xlib");
class XWindow : public L::Window {
protected:
::Dis... | 3,740 | 1,326 |
#include "../../Engine/Input/InputEvent.h"
#include "../../Engine/Input/InputManager.h"
#include "../Components/CWeapon.h"
#include "../../Engine/Math.h"
#include "../UI/WLifebar.h"
#include "../Components/HeadersComponents.h"
#include "../../Engine/Audio/Audiosource.h"
#include "../../Engine/Input/Controller.h"
#inclu... | 5,620 | 1,767 |
/*problem C*/
#include<stdio.h>
#include<string.h>
int main(){
int n;
scanf("%d",&n);
int a[n];
int sum=0;
for(int i=0;i<n;i++){
scanf("%d",&a[i]);
sum+=a[i];
}
float tbc=(float)sum/n;
int kq=0;
for(int i=0;i<n;i++){
if(a[i]>tbc){
kq+=a[i];
}
}
if(kq==0){
printf("-1");
return 0;
}
printf("%... | 330 | 200 |
/**
* @file
* @author __AUTHOR_NAME__ <mail@host.com>
* @copyright 2021 __COMPANY_LTD__
* @license <a href="https://opensource.org/licenses/MIT">MIT License</a>
*/
#ifndef ZEN_RENDERER_PIPELINES_EVENTS_BIND_HPP
#define ZEN_RENDERER_PIPELINES_EVENTS_BIND_HPP
#include <string>
namespace Zen {
namespace Events {... | 702 | 265 |
#include<Windows.h>
#include"MyGame.h"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MyGame *game = new MyGame(nCmdShow);
game->InitGame();
game->GameRun();
return 0;
} | 226 | 92 |
/* **********************************************************
* Copyright (c) 2017-2020 Google, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following ... | 7,724 | 2,518 |
#include "C:/opencv/opencv-4.5.1/modules/imgproc/src/precomp.hpp"
#include "C:/opencv/opencv-4.5.1/modules/imgproc/src/color_hsv.simd.hpp"
| 140 | 68 |
/**********************************************
Parker Dunn (pgdunn@bu.edu)
EC 504 Final Project
Testbench for my first version of rp_heap.h
***********************************************/
#include <iostream>
#include "rp_heap.h"
using namespace std;
int main() {
rp_heap* myHeap = new rp_heap();
int siz... | 1,212 | 486 |
/*
Copyright (c) 2002-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
Use is subject to license terms.
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.
Th... | 7,616 | 2,708 |
/**
* @file fisheyeStereoCalibrate.cpp
* @brief mex interface for cv::fisheye::stereoCalibrate
* @ingroup calib3d
* @author Amro
* @date 2017
*/
#include "mexopencv.hpp"
#include "opencv2/calib3d.hpp"
using namespace std;
using namespace cv;
namespace {
/** Create a new MxArray from stereo calibration results.
... | 4,124 | 1,558 |
// Copyright (c) 2018-2020, The TurtleCoin Developers
//
// Please see the included LICENSE file for more information.
#include <emscripten/bind.h>
#include <stdio.h>
#include <stdlib.h>
#include <turtlecoin-crypto.h>
using namespace emscripten;
struct Keys
{
std::string publicKey;
std::string secretKey;
};
... | 11,359 | 3,675 |
//
// GPUAttributeValueVec1Float.cpp
// G3M
//
// Created by DIEGO RAMIRO GOMEZ-DECK on 1/4/19.
//
#include "GPUAttributeValueVec1Float.hpp"
GPUAttributeValueVec1Float::GPUAttributeValueVec1Float(IFloatBuffer* buffer,
int arrayElementSize,
... | 724 | 171 |
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2018 IBM Corp.
#include "config.h"
extern "C" {
#include "test/mbox.h"
#include "test/system.h"
}
#include "vpnor/test/tmpd.hpp"
#include <cassert>
#include <experimental/filesystem>
#include "vpnor/backend.h"
static const auto BLOCK_SIZE = 4096;
static cons... | 2,465 | 1,150 |
#ifndef _YGP_RNG_HPP_
#define _YGP_RNG_HPP_
#include"configure.hpp"
#include<cstdint>
BEGIN_NAMESPACE_YGP
template<typename _Tp>
class rng/*range*/
{
public:
using t=_Tp;
struct iterator
{
t tc,td;
iterator(t B,t D):tc{B},td{D}{}
t operator++(){return tc+=... | 958 | 349 |
/*
* Copyright (c) 2016, Yung-Yu Chen <yyc@solvcon.net>
* BSD 3-Clause License, see LICENSE.txt
*/
#include <cstdint>
#include <type_traits>
#include <gtest/gtest.h>
#include "march/core/types.hpp"
using namespace march;
TEST(typesTest, TypeId) {
DataTypeId val;
val = type_to<bool>::id;
EXPECT_EQ(va... | 2,327 | 1,066 |
#if !defined(DLM_CL_SKIP_VENDOR_NVIDIA)
#include "dlm/env/macro.h"
DLM_CMODULE_START
#include "cl/cl_ext_nvidia.h"
DLM_CMODULE_END
#include "dlm/cl/device.hpp"
#include "dlm/cl/controllers.hpp"
using namespace dlmcl;
static void getPCITopology(DeviceInfo &info, cl_device_id device) noexcept
{
// undocumented Nvid... | 1,913 | 768 |
#include "nmos/node_resource.h"
#include "cpprest/host_utils.h"
#include "cpprest/uri_builder.h"
#include "nmos/is04_versions.h"
#include "nmos/resource.h"
namespace nmos
{
// See https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2/schemas/node.json
nmos::resource make_node(const nmos::id& id, c... | 2,051 | 667 |
//Leetcode Problem No 1002 Find Common Characters
//Solution written by Xuqiang Fang on 5 Mar, 2019
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <queue>
using namespace std;
class Solution{
public:
vector<str... | 1,187 | 499 |
#include "include/MMVII_all.h"
namespace MMVII
{
/* ========================== */
/* cDataIm2D */
/* ========================== */
template <class Type> cDataIm2D<Type>::cDataIm2D(const cPt2di & aP0,const cPt2di & aP1,Type * aRawDataLin,eModeInitImage aModeInit) :
cDataTypedIm<Type,2> (aP0,a... | 2,268 | 1,066 |
#include "stdafx.h"
/*
* Copyright (c) 2007-2012 SlimDX Group
*
* 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, ... | 1,944 | 709 |
#include <QtTest>
#include <circuits/nand2.h>
#include <circuits/nor2.h>
#include <circuits/or2.h>
#include "circuittest.h"
#define TEST_ELEMENT(CLASS_NAME, FUNCTION) \
CLASS_NAME circuit;\
const bool i[] = {true, true, false, false};\
const bool j[] = {true, false, true, false};\
\
const QList<QSt... | 1,031 | 413 |
/*---------------------------------------------------------------------------*\
Copyright (C) 2011 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of CAELUS.
CAELUS is free software: you can redistribute it and/or modify it
under... | 4,503 | 1,456 |
#include "adlik_serving/framework/manager/boarding_loop.h"
#include "adlik_serving/framework/manager/boarding_functor.h"
#include "cub/env/concurrent/auto_lock.h"
namespace adlik {
namespace serving {
BoardingLoop::BoardingLoop() {
// auto action = [this] { this->poll(); };
// loop.reset(new cub::LoopThread(acti... | 816 | 302 |
/*
* Copyright (c) 2014 Hackdirt Ltd.
* Author: David Petrie (david@davidpetrie.com)
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the
* use of this software. Permission is granted to anyone to use this so... | 3,564 | 1,130 |
//Author:LanceYu
#include<cstring>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstdlib>
#include<ctime>
#include<vector>
#include<iostream>
#include<string>
#include<queue>
#include<set>
#include<algorithm>
#include<complex>
#include<stack>
#include<bitset>
#include<iomanip>
#define ll long long
using na... | 1,005 | 497 |
/*
* Copyright (c) 2020 International Business Machines
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
* Authors: Nikolas Ioannou (nio@zurich.ibm.com),
* Kornilios Kourtis (kou@zurich.ibm.com, kornilios@gmail.com)
*
*/
#include <stdio.h>
#include <signal.h>
#include "util/de... | 3,519 | 1,473 |
#pragma once
#include "vnh.hpp"
namespace vuh {
class core {
public:
core() : _res(vhn::Result::eSuccess) { }
explicit core(vhn::Result res) : _res(res) { }
public:
virtual vhn::Result error() const { return _res; };
virtual bool success() const { return vhn::Result::eSuc... | 517 | 165 |
#include "Currency.hpp"
using namespace std;
Currency::Currency()
{
type = ItemType::ITEM_TYPE_CURRENCY;
symbol = '$';
status = ItemStatus::ITEM_STATUS_UNCURSED;
status_identified = true;
}
Currency::~Currency()
{
}
// Currency is always generated uncursed and shouldn't ever be set to another
// status.
voi... | 848 | 304 |
#include "../../_Interface.hpp"
#include "../EnvironmentHeader.hpp"
template<typename Ty>
class shadow_class
{
public:
using DataType = volatile Ty;
DataType _data;
};
atom<s64>::atom()
{
assert(_mem_sz >= sizeof(shadow_class<s64>));
new (_mem) volatile s64(0);
}
atom<s64>::atom(const atom<s64>& rh... | 6,617 | 2,724 |
/*
* Copyright (c) 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 <proxygen/lib/http/codec/compress/HPACKDecodeBuffer.h>
#include <limits>
#include <memory>
... | 4,200 | 1,531 |
#include <c10/core/dispatch/KernelRegistration.h>
#include "caffe2/operators/experimental/c10/schemas/concat.h"
#include "caffe2/utils/math.h"
#include "caffe2/core/tensor.h"
using caffe2::BaseContext;
using caffe2::CPUContext;
using caffe2::Tensor;
using caffe2::TensorCPU;
using std::vector;
namespace caffe2 {
names... | 3,489 | 1,290 |
#include "SyntaxHighlighter.h"
// TODO http://www.kate-editor.org/syntax/3.9/isocpp.xml
SyntaxHighlighter::SyntaxHighlighter(QTextDocument* parent)
: QSyntaxHighlighter(parent)
{
HighlightingRule rule;
{
QTextCharFormat quotationFormat;
quotationFormat.setForeground(Qt::darkRed);
... | 5,335 | 1,782 |
// This is the initialisation support code for the QtCore module.
//
// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt6.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundati... | 3,908 | 1,326 |
//*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... | 3,457 | 882 |
#include "kazbase/logging.h"
#include "spindash.h"
#include "character.h"
#include "world.h"
void sdCharacterLeftPressed(SDuint character) {
Character* c = Character::get(character);
c->move_left();
}
void sdCharacterRightPressed(SDuint character) {
Character* c = Character::get(character);
c->move_ri... | 10,164 | 3,432 |
/*
system2 runs a shell command in the background and return the PID.
I stole this piece of code from https://stackoverflow.com/questions/22802902/how-to-get-pid-of-process-executed-with-system-command-in-c and modified it a little bit to fit my needs
system2() does not pauses like system(). It is theref... | 1,523 | 583 |
#include "Graphics.hpp"
#include "../PHL.hpp"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../Resources.hpp"
PHL_Surface db = {0};
PHL_Surface backBuffer = {0};
PHL_Surface dbAlt = {0};
PHL_Surface backBufferAlt = {0};
const int cWidth = 320;
const int cHeight = 240;
Screen scrnTop = {
GF... | 13,271 | 4,969 |
#include "Color.h"
Color::Color(Mesh *mesh): MeshDecorator(mesh)
{
}
Color::~Color()
{
}
void Color::AddMeshProperties()
{
MeshDecorator::AddMeshProperties();
ColorFeatures();
}
void Color::ColorFeatures()
{
std::cout << "Added the Color Features" << std::endl;
} | 289 | 113 |
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<cstring>
using namespace std;
int dots, cons, start;
bool is_visited[1001];
int matrix[1001][1001];
/*
const int MAX = 1000 + 1;
int N, M, V;
int adjacent[MAX][MAX];
bool visited[MAX];
queue<int> q;
void DFS(int idx)
{
cout << ... | 1,988 | 732 |
#include "header/basic/test_macro.h"
#include "header/model/wtg_models/wt_turbine_model/wt_turbine_model_test.h"
#include "header/basic/utility.h"
#include "header/steps_namespace.h"
#include "header/model/wtg_models/wt_generator_model/wt3g0.h"
#include "header/model/wtg_models/wt_aerodynamic_model/aerd0.h"
#include <c... | 26,783 | 10,234 |
#include <boost/spirit/home/qi/auxiliary/attr_cast.hpp>
| 56 | 24 |
/*
* Copyright (c) 2012-2019 Devin Smith <devin@devinsmith.net>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS I... | 9,153 | 3,618 |
/*
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related docum... | 6,620 | 3,209 |
/**
* This file is part of ORB-SLAM3
*
* Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez Rodríguez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
* Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
*
* ORB-SLAM3 is free software: y... | 8,354 | 3,588 |
#include "DataStreamException.h"
DataStreamException::DataStreamException(const char * message) :
BaseException(message)
{
}
| 131 | 39 |
// Copyright (c) 2016 Vittorio Romeo
// License: AFL 3.0 | https://opensource.org/licenses/AFL-3.0
// http://vittorioromeo.info | vittorio.romeo@outlook.com
#pragma once
#include "./static_if.hpp"
namespace impl
{
namespace action
{
struct a_continue
{
};
struct a_break
... | 2,346 | 732 |
#include "manager.h"
#include "commonhdr.h"
#include "log.h"
#include "caseinfomodel.h"
#include "monitor.h"
#include "iocontextwrapper.h"
#include "datamanager.h"
#include "logtext.h"
#include "caseinfomodel.h"
Manager::Manager(QObject *parent)
: QObject(parent)
{
dataMgr_ = std::make_shared<DataManager>();... | 2,924 | 1,043 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#include "Constants.hh"
#include <fstream>
#include <string>
#define DEFINE_STRING(name, value) const std::string name { value }; const std::wstring name ## W { L ## value };
uint64_t Constants::_UniqueId { 0 };
namespac... | 2,211 | 857 |
#include <iostream>
#define SAMPLE_RATE 44100
using namespace std;
/* Buffer Lineare ---------------------------------------------------------- */
float D_LinBuffer(float *buffer, int D, float x)
{
int i;
for(i = D-1; i >= 1; i--)
buffer[i] = buffer[i-1];
buffer[0] = x;
return b... | 967 | 421 |
// (C) Copyright Gennadiy Rozental 2005-2014.
// Use, modification, and distribution are subject to 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)
// See http://www.boost.org/libs/test for the library home page.
//
// ... | 2,910 | 1,002 |
// File MCORE/MSynchronizer.cpp
#include "MCOREExtern.h"
#include "MSynchronizer.h"
#include "MException.h"
#if !M_NO_MULTITHREADING
MSynchronizer::Locker::Locker(const MSynchronizer& s)
:
m_synchronizer(const_cast<MSynchronizer&>(s)),
m_locked(false)
{
m_synchronizer.Lock();
m_locked = true;
}
MSynchr... | 3,236 | 1,096 |
// Copyright 2018 The Dawn Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | 13,250 | 3,955 |
#include "statsmodel.h"
StatsModel::StatsModel(QObject *parent) : QObject(parent)
{
}
| 88 | 34 |
#include <cfloat>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <map>
#include <algorithm>
#include <random>
#include <chrono>
#if defined _MSC_VER
#include <direct.h>
#elif defined __GNUC__
#include <sys/types.h>
#include <sys/stat.h>
#endif
#include "../lib/confi... | 14,880 | 5,370 |
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | 3,239 | 989 |
#include <unistd.h>
#include <cctype>
#include <sstream>
#include <iostream>
#include <string>
#include <vector>
#include "process.h"
#include "linux_parser.h"
using std::string;
using std::to_string;
using std::vector;
// TODO: Return this process's ID
int Process::Pid() { return pid_; }
// TODO: Return this proce... | 1,097 | 339 |
/*=============================================================================
Copyright (c) 2001-2014 Joel de Guzman
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)
====================================... | 10,622 | 3,011 |
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | 4,189 | 1,474 |
#include <string>
#include <regex>
#include <iostream>
#include "grammar.hpp"
// [START] Include nodes
#include "nodes/node.hpp"
#include "nodes/node_list.hpp"
#include "nodes/boolean.hpp"
#include "nodes/scope_fn.hpp"
#include "nodes/scope.hpp"
#include "nodes/line.hpp"
#include "nodes/value_list.hpp"
#include "node... | 10,313 | 3,571 |
#include <iostream>
//#include <boost/gil/gil_all.hpp>
#include <OpenEXR/ImfRgbaFile.h>
#include <OpenEXR/ImfArray.h>
/*
template <typename View>
void apply(const View& view) {
Imf::RgbaInputFile file ( "sample.exr" );
Imath::Box2i dw = file.dataWindow();
int width = dw.max.x - dw.min.x + 1;
int height = dw.max... | 1,400 | 597 |
// Copyright 2013 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 "content/browser/media/capture/aura_window_capture_machine.h"
#include <algorithm>
#include <utility>
#include "base/logging.h"
#include "base/... | 15,353 | 4,877 |
#include "Playlist.h"
Playlist::Playlist(const std::string &name) { // Custom consructor.
static int playlistId = 1;
this->name = name;
this->shared = false;
this->playlistId = playlistId;
playlistId += 1;
}
int Playlist::getPlaylistId() const { // Returns playlist ID.
return this->playlis... | 2,121 | 707 |
//===- unittests/BuildSystem/TempDir.cpp --------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICE... | 1,331 | 436 |
// Copyright (c) 2017-2018, Cryptogogue Inc. All Rights Reserved.
// http://cryptogogue.com
#include <padamose/AbstractVersionedBranch.h>
#include <padamose/BranchInspector.h>
namespace Padamose {
//================================================================//
// BranchInspector
//==============================... | 2,691 | 679 |
#include <arpa/inet.h>
#include <array>
#include <condition_variable>
#include <cstring>
#include <liburing.h>
#include <netdb.h>
#include <signal.h>
#include <string>
#include <sys/socket.h>
#include <thread>
#include <unistd.h>
#include <uring/relay.hpp>
#include <vector>
#define ENABLE_FIXED_BUFFERS 1
#define ENABL... | 15,219 | 5,915 |
#ifndef SQL_PARSER_FUSION_COMMON_HPP
#define SQL_PARSER_FUSION_COMMON_HPP
#include "sql/ast/common.hpp"
#include <boost/fusion/include/adapt_struct.hpp>
#endif //SQL_PARSER_FUSION_COMMON_HPP
| 194 | 91 |
#include "std_lib_facilities.h"
int main()
try{
//1
// !!Cout << "Success!\n";
//cout << "Success!\n";
//2
// !!cout << "Success!\n;
//cout << "Success!\n";
//3
// !!cout << "Success" << !\n"
//cout << "Success" << "!\n";
//4
// !!cout << success << '\n';
//cout << "Success" << '\n';
//5
/* !!string res=7... | 3,244 | 1,753 |
#include "image.h"
#include <stdio.h>
#ifndef max
#define max(a, b) (((a)>(b))?(a):(b))
#endif
#ifndef min
#define min(a, b) (((a)<(b))?(a):(b))
#endif
unsigned char getByte();
char fileOpen(const char *);
void decodeQTable(int);
void strmSkip(int n);
void decodeBlock();
void fileClose();
void g... | 15,059 | 7,049 |
--- client/mysql.cc.orig 2021-08-02 10:58:55 UTC
+++ client/mysql.cc
@@ -61,8 +61,8 @@ static char *server_version= NULL;
extern "C" {
#if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
-#include <curses.h>
-#include <term.h>
+#include <ncurses/curses.h>
+#include <ncurses/term.h>
#else
#if defined(HAVE_TERMIOS_H... | 572 | 279 |
// Copyright (c) 2015-2020 Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/sequences/
#include <tao/seq/integer_sequence.hpp>
#include <tao/seq/select.hpp>
#include <type_traits>
int main()
{
using namespace tao::seq;
using S = integer_sequence< int, 4, 7, -2, 0, 3 >;
using... | 874 | 362 |
// Copyright 2021 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/ash/drive/drive_integration_service.h"
#include "chrome/browser/ash/drive/drivefs_test_support.h"
#include "chrome/browser/ash/fi... | 3,612 | 1,132 |
//
// ActiveSelector.hpp
// GameBT
//
// Created by River Liu on 15/1/2018.
// Copyright © 2018 River Liu. All rights reserved.
//
// ActiveSelector is a Selector that actively rechecks
// its children.
#ifndef ActiveSelector_hpp
#define ActiveSelector_hpp
#include "Selector.hpp"
namespace BT
{
class A... | 1,160 | 346 |
//******************************************************************************
//
// Copyright (c) Microsoft. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARR... | 59,826 | 16,495 |
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "openvino/op/op.hpp"
#include "openvino/op/util/attr_types.hpp"
namespace ov {
namespace op {
namespace util {
/// \brief Base class for color conversion operation from NV12 to RGB/BGR format.
/// Input:
/... | 3,729 | 1,215 |
#include "BFLuaRuntimeRegistry.h"
#include <utility>
namespace BlackFox
{
BFLuaRuntimeRegistry::BFLuaRuntimeRegistry()
{
registerComponent<Components::BFLuaRuntimeComponent>();
}
unsigned int BFLuaRuntimeRegistry::identifier()
{
static auto next = runtimeComponentId;
return next++;
}
unsigned int BFLua... | 3,657 | 1,252 |
/*
* PathNetwork.cpp
*
* Created on: Dec 15, 2015
* Author: jcassidy
*/
#include "PathNetwork.hpp"
#include "OSMDatabase.hpp"
#include <boost/container/flat_map.hpp>
using namespace std;
const char* OSMWayFilterRoads::includeHighwayTagValueStrings_[] = {
"residential",
"primary",
"primary_li... | 16,233 | 5,097 |
#include "pandar_pointcloud/decoder/pandar64_decoder.hpp"
#include "pandar_pointcloud/decoder/pandar64.hpp"
namespace
{
static inline double deg2rad(double degrees)
{
return degrees * M_PI / 180.0;
}
}
namespace pandar_pointcloud
{
namespace pandar64
{
Pandar64Decoder::Pandar64Decoder(Calibration& c... | 10,076 | 4,025 |