text string | size int64 | token_count int64 |
|---|---|---|
/**
* Copyright (C) 2015-2019
* Author Alvin Ahmadov <alvin.dev.ahmadov@gmail.com>
*
* This file is part of Dixter Project
* License-Identifier: MIT License
* See README.md for more information.
*/
#include <QDebug>
#include "Utilities.hpp"
#include "Configuration.hpp"
#include "Constants.hpp"
#include "Gu... | 4,649 | 2,025 |
#include "Float3Slider.h"
Float3Slider::Float3Slider(char * name, glm::vec3 min, glm::vec3 max, float * value , glm::vec3 gran) :
min(min), max(max), value(value), gran(gran)
{
sliderLayout = new QHBoxLayout();
vectorLabel = new QLabel(name);
sliderVector[0] = new FloatSlider("X", min[0],max[0],&value[0], gran[0]... | 914 | 367 |
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
#include "globalcontroller.hpp"
GlobalController::GlobalController() : impl(nullptr) {}
GlobalController::~GlobalController() {
Q_ASSERT(impl);
delete impl;
}
StitcherController* GlobalController::getController() const {
Q_ASSERT(impl);... | 557 | 184 |
#include "minsk/analysis/text/span.hpp"
minsk::analysis::text::text_span::text_span(int start, int length)
: m_start(start), m_length(length) {}
minsk::analysis::text::text_span
minsk::analysis::text::text_span::from_bounds(int start, int end) {
return text_span{start, end - start};
}
int minsk::analysis::text... | 750 | 256 |
#include <cctbx/boost_python/flex_fwd.h>
#include <cctbx/xray/scatterer.h>
#include <cctbx/adptbx.h>
#include <cctbx/uctbx.h>
#include <boost/python/class.hpp>
#include <boost/python/dict.hpp>
#include <boost/python/str.hpp>
#include <boost/python/args.hpp>
#include <boost/python/return_arg.hpp>
#include <scitbx/array... | 5,567 | 2,144 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you m... | 3,505 | 1,096 |
//----------------------------------*-C++-*----------------------------------//
/*!
* \file rng/LC_Subrandom_Generator.hh
* \author Kent Budge
* \brief Definition of class LC_Subrandom_Generator
* \note Copyright (C) 2016-2019 Triad National Security, LLC.
* All rights reserved. */
//-----------------... | 2,174 | 634 |
// Copyright Carl Philipp Reh 2006 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef SGE_LIBPNG_ERROR_CONTEXT_REF_HPP_INCLUDED
#define SGE_LIBPNG_ERROR_CONTEXT_REF_HPP_INCLUDED... | 511 | 213 |
#include <iostream>
#include <string>
using namespace std;
int main()
{
string temp;
bool isFirst(true);
while (getline(cin, temp))
{
for (string::iterator iter = temp.begin(); iter != temp.end(); ++iter)
{
if (*iter == '"')
{
if (isFirst)
... | 581 | 160 |
//Game Over State source file
#include "GameOver.h"
//Instantiating static variable gameOverID
const std::string GameOverState::gameOverID = "GAMEOVER";
//GameOver State constructor
GameOverState::GameOverState(std::vector<GameObject*> parameter, void (*callbackFunction)())
{
for (int i = 0; i < parameter.size(); i... | 1,186 | 377 |
#include "ledger/FeeFrame.h"
#include "database/Database.h"
#include "crypto/SecretKey.h"
#include "crypto/SHA.h"
#include "LedgerDelta.h"
#include "util/types.h"
using namespace std;
using namespace soci;
namespace stellar
{
FeeFrame::FeeFrame() : EntryFrame(LedgerEntryType::FEE), mFee(mEntry.data.feeState())
... | 4,188 | 1,521 |
#include "utils.h"
#include <stdio.h>
#include <stdarg.h>
#include <string>
#include <math.h>
#include <iostream>
string StringPrintf(const char *format, ...) {
va_list arg;
char buffer[512]; // TODO(medium): Should check for overflow
va_start(arg, format);
vsprintf(buffer, format, arg);
va_end (arg);
... | 4,979 | 2,046 |
// license:BSD-3-Clause
// copyright-holders:Mirko Buffoni,Nicola Salmoria,Bryan McPhail,David Haywood,R. Belmont,Alex Marshall,Angelo Salese,Luca Elia
// thanks-to:Richard Bush
/********************************************************************
Task Force Harrier 1989 UPL 68000 Z80 YM2203 2... | 445,525 | 264,892 |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/common/content_client.h"
#include "base/logging.h"
#include "base/strings/string_piece.h"
#include "build/build_config.h"
#i... | 3,322 | 1,068 |
#include "xr_scene.h"
#include "xr_scene_ai_map.h"
#include "xr_scene_details.h"
#include "xr_scene_glows.h"
#include "xr_scene_groups.h"
#include "xr_scene_lights.h"
#include "xr_scene_particles.h"
#include "xr_scene_portals.h"
#include "xr_scene_sectors.h"
#include "xr_scene_shapes.h"
#include "xr_scene_sound_envs.h"... | 13,751 | 6,445 |
/*
* Copyright (c) 2018, Bosch Software Innovations GmbH.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the disclaimer
* below) provided that the following conditions are met:
*
* * Redistributions o... | 9,572 | 3,515 |
#ifndef LLARP_DNS_QUESTION_HPP
#define LLARP_DNS_QUESTION_HPP
#include <dns/serialize.hpp>
#include <dns/name.hpp>
#include <net/net_int.hpp>
namespace llarp
{
namespace dns
{
using QType_t = uint16_t;
using QClass_t = uint16_t;
struct Question : public Serialize
{
Question() = default;
... | 1,306 | 444 |
// Copyright 2021, Daisuke Nishimatsu. 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 condi... | 8,080 | 3,623 |
//**************************************************************************\
//* This file is property of and copyright by the ALICE Project *\
//* ALICE Experiment at CERN, All rights reserved. *\
//* *\
//* Prim... | 25,850 | 8,885 |
#ifndef HOG_HPP_
#define HOG_HPP_
#include "types.h"
#include <iostream>
#include "consts.h"
#include <string.h>
#include "math.h"
#define VECTOR_SIZE 3780
using namespace std;
// void computeHOG(unsigned char *inputImage , unsigned char *output);
void hog(int *specs,unsigned char *image0);
//void hog(unsigned int... | 1,203 | 435 |
#include "../../JFloatArray.hpp"
#include "../../JIntArray.hpp"
#include "../../JArray.hpp"
#include "../../JObjectArray.hpp"
#include "./Animator.hpp"
#include "../../JObject.hpp"
#include "../../JString.hpp"
#include "./ValueAnimator.hpp"
namespace android::animation
{
// Fields
jint ValueAnimator::INFINITE()
{
... | 7,583 | 3,163 |
// Copyright (c) Zhirnov Andrey. For more information see 'LICENSE.txt'
#include "CApp.h"
bool CApp::_Test_UpdateBuffer ()
{
// generate data
BinaryArray data; data.Resize( 512 );
BinaryArray data2; data2.Resize( 256 );
FOR( i, data ) {
data[i] = Random::Int<ubyte>();
}
FOR( i, data2 ) {
data2[i] = Rando... | 2,425 | 977 |
//
// BLACK - Bounded Ltl sAtisfiability ChecKer
//
// (C) 2021 Nicola Gigante
//
// 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 righ... | 4,818 | 1,802 |
#include "cl_TCPServer.h"
#include <WS2tcpip.h>
//Set members to default values.
//SOCKET_ERROR is used here to indicate that the socket is closed
SSocks::TCPServer::TCPServer() : sock(SOCKET_ERROR), blocking(true) {
//nothing
}
//invoke the default constructor and then call start()
SSocks::TCPServer::TCPServer(uin... | 4,377 | 1,458 |
#include <driver/disk.h>
#include <utils/log.h>
using namespace driver;
disk_driver_manager* driver::global_disk_manager;
disk_device::disk_device() {
}
disk_device::~disk_device() {
}
void disk_device::read(uint64_t sector, uint32_t sector_count, void* buffer) {
}
void disk_device::write(uint64_t sector, ui... | 2,120 | 893 |
#include "memz.h"
Sound scaryMonsters = { L"data\\12.bin", L"sequencer", L"scarymonsters" };
Sound softonic = { L"data\\11.bin", L"mpegvideo", L"softonic" };
// Why is this even based on MEMZ if I'm using a special payloadHost for almost anything?
PAYLOAD payloads[] = {
{ payloadChangeDesktop, NULL, 20000, 0, 0, 0, ... | 16,426 | 7,919 |
/*!
* \file BLDCM-control-ino.cpp
* \name BLDCM-control-ino.cpp - basic motor control functions for Arduino
* \author Infineon Technologies AG
* \copyright 2020-2021 Infineon Technologies AG
* \version 1.0.0
* \brief This library includes the basic common functions to control ... | 1,444 | 694 |
/*************************************************************************
* *
* Open Dynamics Engine, Copyright (C) 2001-2003 Russell L. Smith. *
* All rights reserved. Email: russ@q12.org Web: www.q12.org *
* ... | 14,358 | 5,926 |
//---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.gi... | 8,839 | 2,695 |
#include "Scene.h"
#include "GameObject.h"
#include "Application.h"
#include "Modules/ModuleTime.h"
#include "Modules/ModuleEditor.h"
#include "Modules/ModuleRender.h"
#include "Modules/ModulePhysics.h"
#include "Modules/ModuleTime.h"
#include "Modules/ModuleCamera.h"
#include "Modules/ModuleWindow.h"
#include "Module... | 24,512 | 8,354 |
#include "grid_controller_base.h"
#include "grid_state.h"
#include "game_grid.h"
#include <stdexcept>
GridControllerBase::GridControllerBase()
: bAcceptingInput(true)
{
}
void GridControllerBase::_bind_methods()
{
ClassDB::bind_method(D_METHOD("init", "owner"), &GridControllerBase::init);
ClassDB::bind_method(D_ME... | 1,606 | 523 |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=2e6+10;
ll m,n,k;
ll f[maxn];
int main()
{
//freopen("in.txt","r",stdin);
int t;
cin>>t;
int T=0;
while(t--)
{
T++;
cin>>n>>m>>k;
cout<<"Case #"<<T<<": ";
if(m<=k){//直接递推
... | 1,761 | 602 |
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2010 Greenplum, Inc.
//
// @filename:
// CDXLColDescr.cpp
//
// @doc:
// Implementation of DXL column descriptors
//
// @owner:
//
//
// @test:
//
//
//----------------------------------------------... | 4,512 | 1,548 |
// Copyright 2020 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 "chromeos/components/local_search_service/search_utils.h"
#include <algorithm>
#include "base/strings/utf_string_conversions.h"
#include "chrom... | 2,828 | 1,005 |
//===-- lib/common/idioms.cc ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//------------------------------... | 1,227 | 430 |
// Copyright 2014 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/password_manager/save_password_infobar_delegate.h"
#include <utility>
#include "base/metrics/histogram.h"
#include "chrome/brow... | 6,031 | 1,949 |
// Copyright Dominic Koepke 2019 - 2022.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)
#include <catch2/catch.hpp>
#include "helper.hpp"
#include "Simple-Utility/unique_handle.hpp"
usi... | 12,938 | 5,016 |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... | 20,060 | 6,005 |
#include <limits.h>
#include <unordered_map>
#include "pfcwdorch.h"
#include "sai_serialize.h"
#include "portsorch.h"
#include "converter.h"
#include "redisapi.h"
#include "select.h"
#include "notifier.h"
#include "redisclient.h"
#include "schema.h"
#include "subscriberstatetable.h"
#define PFC_WD_GLOBAL ... | 34,856 | 11,292 |
/****************************************************************************
Copyright (c) 2013 cocos2d-x.org
http://www.cocos2d-x.org
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 res... | 7,840 | 2,733 |
//===-- AVRTargetInfo.cpp - AVR Target Implementation ---------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | 750 | 233 |
/* file: dt_reg_dense_batch.cpp */
/*******************************************************************************
* Copyright 2014-2019 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of th... | 5,802 | 1,625 |
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/network/web_transport.h"
#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/notreache... | 22,224 | 7,222 |
#ifndef TRIANGLE_HPP
#define TRIANGLE_HPP
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "GameObject.hpp"
#include "Position.h"
#include "Color.h"
//TODO: manage width and color
class Triangle : public GameObject
{
public:
Triangle();
void init() override;
void draw() const override;
void era... | 487 | 172 |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... | 12,997 | 4,225 |
#include "../timer.h"
namespace mesh {
template<typename base_t>
void polyhedron<base_t>::scale(const base_t dim) {
benchmark::timer tmp("scale()");
const bbox bbox = bounding_box();
const glm::vec<3, base_t> cur_size = bbox._max - bbox._min;
for(size_t i = 0; i < _vert... | 5,437 | 1,922 |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "DexClass.h"
#include "Debug.h"
#include "DexAccess.h"
#include "DexDebugInstruction.h"
#include "DexDefs.h"
#include "De... | 46,255 | 17,715 |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/web_contents/web_contents_drag_win.h"
#include <windows.h>
#include <string>
#include "base/bind.h"
#include "base/file_u... | 15,911 | 4,868 |
#include <ros/ros.h>
#include <sensor_msgs/PointCloud2.h>
#include <pcl_ros/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/filters/statistical_outlier_removal.h>
#include <boost/thread/thread.hpp>
#include "strands_movebase/noise_approximate_voxel_grid.h"
ros::Publisher p... | 1,931 | 758 |
/* $Id: DevHDA.cpp 73466 2018-08-03 09:41:27Z vboxsync $ */
/** @file
* DevHDA.cpp - VBox Intel HD Audio Controller.
*
* Implemented against the specifications found in "High Definition Audio
* Specification", Revision 1.0a June 17, 2010, and "Intel I/O Controller
* HUB 6 (ICH6) Family, Datasheet", document numbe... | 196,624 | 77,121 |
// Copyright 2014 Renato Tegon Forti
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_APPLICATION_DETAIL_POSIX_PATH_FROM_ME_HPP
#define BOOST_APPLICATION_DETAIL_POSIX_PATH_FROM_ME_HPP
#include <... | 3,376 | 1,026 |
// Base Application taken from Klusark (GPLv2)
// https://code.google.com/archive/p/mafia2injector/
/*
* Copyright (c) 2010 Barzakh (martinjk 'at' outlook 'dot' com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software... | 3,316 | 1,178 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you... | 12,316 | 4,105 |
//
// Config.cpp
// render/src/task
//
// Created by Zach Pomerantz on 1/21/2016.
// Copyright 2016 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "Config.h"
#include "Task.h"
#includ... | 2,039 | 648 |
#ifndef __RES_INT_H__
#define __RES_INT_H__
#include <Arduino.h>
class ResInt {
public:
const int valor;
const String error;
ResInt(int _valor,
String _error );
ResInt(const ResInt& ref );
const char* valida();
};
#endif
| 271 | 104 |
#include "encryptor.h"
#include <QtCore/QCryptographicHash>
#include <botan/botan.h>
#include <botan/pubkey.h>
#include <botan/pkcs8.h>
#include <botan/pk_keys.h>
#include <botan/rsa.h>
Encryptor::Encryptor(QObject *parent) : QObject(parent)
{
}
QByteArray Encryptor::createRandomString()
{
QByteArray randomStr... | 1,417 | 561 |
/*
Stadium Seating
There are three seating categories at a stadium . For a softball game, Class A seats cost
$15, Class B seats cost $12, and Class C seats cost $9. Write a program that asks how
many tickets for each class of seats were sold, then displays the amount of income
generated from ticket ... | 1,081 | 345 |
/*
@ 0xCCCCCCCC
*/
#include <cstdio>
#include <thread>
#include <errno.h>
#include <unistd.h>
#include <sys/prctl.h>
#include <sys/syscall.h>
pid_t GetCurrentThreadID()
{
return syscall(__NR_gettid);
}
void SetThreadName(const char* name)
{
if (GetCurrentThreadID() == getpid()) {
return;
}
... | 590 | 235 |
/*BEGIN_LEGAL
Intel Open Source License
Copyright (c) 2002-2012 Intel 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 the above copyright noti... | 6,884 | 2,383 |
/*
* Copyright (c) 2020, Rapprise.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of condition... | 10,882 | 3,841 |
#include <Arduino.h>
#include "Dshot600.h"
#define PIN_POS1 7
#define PIN_POS2 4
#define PIN_POS3 2
#define PIN_POS4 3
// Real pins: 5, 6, 7, 8
Dshot600 dshot;
uint32_t lastMillis = 0U;
volatile uint32_t isrCounter = 0;
float commands[4] = {0.0f, 0.0f, 50.0f, 0.0f};
void setup()
{
Serial.begin(9600);
... | 526 | 269 |
/**
* SDL/ImGui-based user interface.
*
* Copyright 2017-2020. Orbital project.
* Released under MIT license. Read LICENSE for more details.
*
* Authors:
* - Alexandro Sanchez Bach <alexandro@phi.nz>
*/
#include "ui.h"
#include "ui/ui_style.h"
#include <orbital/host/graphics/vulkan.h>
#include <SDL2/SDL_vulk... | 12,307 | 4,639 |
#include "../bpt.h"
using namespace bpt;
#include <string.h>
int main(int argc, char *argv[])
{
if (argc < 3) {
fprintf(stderr, "Usage: %s database command\n", argv[0]);
return 1;
}
bpt::bplus_tree database(argv[1]);
if (!strcmp(argv[2], "search")) {
if (argc < 4) {
... | 1,713 | 583 |
//offset 703 + 45056 = B2BF
#include "gbConfig.h"
#include <stdlib.h>
#include <stdio.h>
#include "CPCem.h"
#include "DAA.h"
#include "Z80.h"
#include <string.h>
#include "FDC.h"
#include "CRTC.h"
#include "GA.h"
#include "CRTC.h"
#include "8255.h"
#include "gb_globals.h"
#include "dataFlash/gbrom.h"
... | 529,602 | 395,142 |
class XRM
{
public:
XRM(uint64_t _x, uint64_t _r, uint64_t _m)
: x(_x), r(_r), m(_m)
{}
uint64_t operator()(uint64_t value) const
{
value ^= x;
value = (value>>r) + (value<<(64-r));
value *= m;
return value;
}
const uint64_t x, r, m;
};
| 307 | 141 |
/*************************************************************************\
C O P Y R I G H T
Copyright 2003 Image Synthesis Group, Trinity College Dublin, Ireland.
All Rights Reserved.
Permission to use, copy, modify and distribute this software and its
doc... | 6,448 | 2,335 |
#ifndef _AVOID_NEST_HPP
#define _AVOID_NEST_HPP
#include "BehaviorManager.hpp"
#include "SwarmieSensors.hpp"
#include "Timer.hpp"
#include <cmath>
class AvoidNest : public Behavior
{
private:
int _tagsLeft;
int _tagsRight;
bool _persist;
bool _tooClose;
SwarmieAction _savedAction;
Timer*... | 569 | 224 |
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions 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/LICE... | 15,691 | 5,340 |
#include <sudoku/solution_queue.h>
namespace sudoku
{
SolutionQueue::SolutionQueue(size_t maxSize) : maxSize_(maxSize)
{
}
SolutionQueue::Producer::Producer(SolutionQueue& queue) : queue_(queue)
{
std::lock_guard<std::mutex> lock(queue_.mutex_);
queue_.numProducers_++;
}
S... | 3,843 | 1,145 |
// Copyright 2014 the V8 project authors. 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 ... | 6,634 | 2,236 |
/******************************************************************************
Project: MicroMacro
Author: SolarStrike Software
URL: www.solarstrike.net
License: Modified BSD (see license.txt)
******************************************************************************/
#include "error.h"
#include "strl.h"
#... | 6,040 | 2,535 |
/**
* @file stimulus.cpp
*/
#include "stimulus.hpp"
#include "objection.hpp"
#include "report.hpp"
#include <random>
using namespace sc_core;
namespace {
char const * const MSGID{ "/Doulos/Example/Modern/Stimulus_module" };
}
//..............................................................................
Stimulus... | 1,699 | 554 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1,977 | 547 |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2019, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without m... | 5,461 | 1,669 |
#include <stdint.h>
#include <stdlib.h>
#include <gtest/gtest.h>
#include "Vdecoder.h"
#include "verilated.h"
#include "riscv.h"
#include "decoder_tb.h"
const static int NUM_INSTRUCTIONS = 37;
struct control_signals_t {
std::string instr;
uint32_t (*gen_instr)();
int alu_op;
int a_src;
int b_src;
int b_n... | 7,632 | 4,256 |
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
#include <string>
#include <vector>
#include "thunk/thunk.hh"
#include "thunk/thunk_reader.hh"
#include "util/exception.hh"
#include "util/path.hh"
#include "util/system_runner.hh"
#include "util/util.hh"
using namespace std;
using namespa... | 2,261 | 852 |
#include <ChipObject/tInterruptManager.h>
#include <stdio.h>
#ifndef __NI_CRITICAL_SECTION
#define __NI_CRITICAL_SECTION
#include <OSAL/Synchronized.h>
class ni::dsc::osdep::CriticalSection {
public:
NTReentrantSemaphore sem;
};
#endif
#include <OSAL/Task.h>
namespace nFPGA {
uint32_t tInterruptManager::_globalIn... | 4,001 | 1,496 |
#ifndef MRT_SYSTEM_SYSUTIL_HPP_
#define MRT_SYSTEM_SYSUTIL_HPP_
#include <iostream>
namespace mrt { namespace system {
void pause()
{
const auto old_flags = std::cin.flags();
char wait_char;
std::cin.setf(old_flags & ~std::ios_base::skipws);
std::cout << "Press any ke... | 483 | 186 |
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
int gen_base(const int bef,const int aft)
{
auto seed = chrono::high_resolution_clock::now().time_since_epoch().count();
mt19937 mt_rand(seed);
int base=uniform_int_distribution<int>(bef+1,aft)(mt_rand);
... | 1,665 | 682 |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2006 Ferdinando Ametrano
Copyright (C) 2006 StatPro Italia srl
Copyright (C) 2012 Peter Caspers
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - ... | 2,307 | 695 |
/*
Copyright 2017 Kai Huebl (kai@huebl-sgh.de)
Lizenziert gemäß Apache Licence Version 2.0 (die „Lizenz“); Nutzung dieser
Datei nur in Übereinstimmung mit der Lizenz erlaubt.
Eine Kopie der Lizenz erhalten Sie auf http://www.apache.org/licenses/LICENSE-2.0.
Sofern nicht gemäß geltendem Recht vorgeschri... | 1,609 | 528 |
/*=========================================================================
Program: ParaView
Module: vtkSMGlobalPropertiesProxy.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ... | 9,998 | 3,035 |
#include <iostream>
#include <chrono>
std::chrono::steady_clock::time_point get_time() {
return std::chrono::steady_clock::now();
}
int main(int argc, char** argv)
{
auto start = get_time();
std::cout << "Hello, I'm going to print out some stars I guess\n";
for(int i=0; i<1000; i++) {
std::co... | 742 | 278 |
#include <libsystem/process/Process.h>
#include <libutils/FuzzyMatcher.h>
#include <libwidget/Button.h>
#include <libwidget/Label.h>
#include <libwidget/Window.h>
#include "panel/model/MenuEntry.h"
#include "panel/widgets/ApplicationListing.h"
namespace panel
{
ApplicationListing::ApplicationListing(Widget *parent) ... | 1,357 | 450 |
// ----------------------------------------------------
// AIMP DotNet SDK
// Copyright (c) 2014 - 2020 Evgeniy Bogdan
// https://github.com/martin211/aimp_dotnet
// Mail: mail4evgeniy@gmail.com
// ----------------------------------------------------
#include "Stdafx.h"
#include "AimpDataStorageCommandUserMark.h"
Aim... | 1,146 | 379 |
#include "utils.hpp"
/**
* split the given string with a single token, and return the vector of the splitted strings
*/
std::vector<std::string> split(const std::string& source, const std::string& find) {
std::vector<std::string> res;
std::string haystack(source);
size_t pos = 0;
std::string token;
//... | 3,179 | 1,408 |
// Copyright 2019 Google LLC, Andrew Hines
//
// 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... | 6,542 | 2,226 |
// Copyright (c) Open Enclave SDK contributors.
// Licensed under the MIT License.
#include <openenclave/host.h>
#include <openenclave/internal/tests.h>
#include <cstdio>
#include <thread>
#include "epoll_u.h"
using namespace std;
int main(int argc, const char* argv[])
{
oe_result_t r;
const uint32_t flags =... | 1,218 | 497 |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... | 6,819 | 1,917 |
// Copyright (c) 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://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or a... | 4,869 | 1,707 |
/*
* Copyright 2020 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
//#include <d3dcompiler.h>
#include "src/gpu/ganesh/d3d/GrD3DPipelineStateBuilder.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/d3d/GrD3DTypes.h"
#include... | 27,792 | 10,077 |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... | 6,605 | 2,032 |
#include "SequencerApp.h"
#include "model/Model.h"
#include <pybind11/pybind11.h>
namespace py = pybind11;
void register_sequencer(py::module &m) {
// ------------------------------------------------------------------------
// Sequencer
// -----------------------------------------------------------------... | 16,699 | 4,886 |
//-----------------------------------------------------------------------------
// boost-libs variant/test/rvalue_test.cpp source file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2012
//... | 5,064 | 1,802 |
#include <iostream>
#include <vector>
int main() {
size_t num;
if(!scanf("%zu", &num)) return 0;
std::vector<bool> isPrime(50000, true);
isPrime[0] = isPrime[1] = false;
for(size_t i = 2; i < 50000; ++i) {
if(!isPrime[i]) continue;
for(size_t j = 2 * i; j < 50000; j *= 2) isPrime[j]... | 696 | 317 |
// Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
#ifndef TAO_PEGTL_CONTRIB_PARSE_TREE_TO_DOT_HPP
#define TAO_PEGTL_CONTRIB_PARSE_TREE_TO_DOT_HPP
#include <cassert>
#include <ostream>
#include <string>
#include "parse_tree.hpp"
na... | 3,651 | 1,079 |
/*! \file
\brief A property set.
Copyright (C) 2019-2021 kaoru https://www.tetengo.org/
*/
#include <cstdint>
#include <filesystem>
#include <iterator>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include <stddef.h>
#... | 21,064 | 7,003 |
//===- ExprCXX.cpp - (C++) Expression AST Node Implementation -------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | 71,913 | 21,460 |
namespace ecs
{
template <typename ComponentT>
ComponentWrapper<ComponentT>::ComponentWrapper(const uint64 &entity_id)
: m_component(), m_entityID(entity_id)
{ }
template <typename ComponentT>
ComponentWrapper<ComponentT>::ComponentWrapper(const ComponentT &comp)
: m_component(comp), m_entityID(0)
{ }
template <type... | 1,054 | 313 |
#include <iostream>
#include <vector>
#include <map>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
using namespace std;
//// 83.56% , 100.00%
class Solution {
public:
int slidingPuzzle(vector<vector<int>>& board) {
string final_state = "123450";
unordered_set... | 7,313 | 2,504 |