text string | size int64 | token_count int64 |
|---|---|---|
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <deque>
#include <algorithm>
#include <climits>
#include <chrono>
#include "InstructionScheduler.h"
std::string getInputAsString(std::string);
std::vector<std::string> getInputPerLines(std::string);
... | 2,726 | 966 |
/*
* Copyright 2008-2013 NVIDIA Corporation
* Modifications Copyright© 2019 Advanced Micro Devices, Inc. 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
*
* ... | 2,215 | 813 |
/*
* An example of an asynchronous C++ node addon.
* Provided by paulhauner https://github.com/paulhauner
* License: MIT
* Tested in node.js v4.4.2 LTS in Ubuntu Linux
*/
#include <nan.h>
#include <node.h>
#include <uv.h>
#include <iostream>
#include <unistd.h>
#include <string.h>
using namespace std;
n... | 4,218 | 1,552 |
#include<bits/stdc++.h>
#define fo(i, n) for(int i = 1; i < n; i++)
using namespace std ;
#define deb(x) {cout << #x << " " << x << endl ;}
int max_contiguos_subarray(vector<int> &nums) {
stack<int> cached ;
cached.push(nums[0]) ; int n = nums.size() ;
int cnt = INT_MIN, t = 0 ;
if(is_sorted(nums.begi... | 947 | 396 |
/*!
@brief value<void>
@file nodamushi/svd/value/void_value.hpp
*/
/*
* These codes are licensed under CC0.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
#ifndef NODAMUSHI_SVD_VALUE_VOID_VALUE_HPP
#define NODAMUSHI_SVD_VALUE_VOID_VALUE_HPP
# include "nodamushi/svd/value.hpp"
namespace nodamushi{... | 1,209 | 439 |
// -*- C++ -*-
//
// $Id: OS_NS_sys_select.inl 2179 2013-05-28 22:16:51Z mesnierp $
#include "ace/OS_NS_errno.h"
#include "ace/OS_NS_macros.h"
#include "ace/Time_Value.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// It would be really cool to add another version of select that would
// function like the one we're defending... | 1,938 | 851 |
/*
High Performance Astrophysical Reconstruction and Processing (HARP)
(c) 2014-2015, The Regents of the University of California,
through Lawrence Berkeley National Laboratory. See top
level LICENSE file for details.
*/
#include <harp_mpi_internal.hpp>
using namespace std;
using namespace harp;
mpi_spec... | 2,713 | 999 |
// Copyright 1996-2020 Cyberbotics Ltd.
//
// 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 agr... | 9,825 | 3,880 |
/*
* Copyright 2009-2017 Alibaba Cloud 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... | 2,892 | 896 |
/* Copyright (c) 2018 PaddlePaddle 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 applic... | 11,794 | 3,916 |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/lambda/model/UpdateEventSourceMappingRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Lambda::Model;
using namespace Aws::Utils::Json;... | 3,721 | 1,210 |
#include <limits>
#include <random>
#include "llvmUtils.h"
#include "utils/graphUtils.h"
#include "daikon-inst/comments.h" //todo: move to utils
#include <boost/algorithm/string.hpp>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
// pr... | 130,429 | 47,733 |
#include <stan/math/mix/mat.hpp>
#include <gtest/gtest.h>
#include <test/unit/math/rev/mat/fun/util.hpp>
using stan::math::fvar;
TEST(AgradMixMatrixOperatorSubtraction,fv_scalar_matrix_1stDeriv) {
using stan::math::subtract;
using stan::math::matrix_fv;
matrix_fv v(2,2);
v << 1, 2, 3, 4;
v(0).d_ = 1.0;
... | 46,697 | 25,581 |
// solution to 71A
#include <iostream>
#include <string>
using namespace std;
int main()
{
string arr[100];
int n;
cin >> n;
for (int i = 0; i < n; i++){
cin >> arr[i];
}
for (int i = 0; i < n; i++){
if ( arr[i].size() > 10){
cout << arr[i][0] << arr[i].size() - 2 << arr[i].back() << endl;
... | 376 | 167 |
//============================================================================
//
// This file is part of GPSTk, the GPS Toolkit.
//
// The GPSTk is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; ei... | 3,331 | 1,077 |
/**
* MIT License
*
* Copyright (c) 2018-2019 Kravchenko Artyom
*
* 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... | 2,507 | 802 |
#include <string>
#include <iostream>
#include <aocmaxnoe2020/aocmaxnoe2020.h>
#include <aocmaxnoe2020/day10.h>
using namespace aocmaxnoe2020;
int main() {
std::string input = get_input(10);
auto numbers = day10::parse_input(input);
uint64_t part1 = day10::part1(numbers);
std::cout << "Solution 1: "... | 432 | 187 |
// Wiaeditproprange.cpp : implementation file
//
#include "stdafx.h"
#include "wiatest.h"
#include "Wiaeditproprange.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWiaed... | 2,161 | 851 |
// | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Martin Fusseder, https://github.com/MFusseder
//
... | 14,919 | 4,749 |
// Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... | 1,489 | 505 |
#include <string>
#include <vector>
#include <libpy/autofunction.h>
#include <libpy/automodule.h>
#include <libpy/ndarray_view.h>
#include <libpy/numpy_utils.h>
namespace libpy_tutorial {
std::int64_t simple_sum(py::array_view<const std::int64_t> values) {
std::int64_t out = 0;
for (auto value : values) {
... | 1,696 | 634 |
#include <cstdio>
#include <chrono>
#include "nl_means.h"
#include "nl_means_auto_schedule.h"
#include "halide_benchmark.h"
#include "HalideBuffer.h"
#include "halide_image_io.h"
using namespace Halide::Runtime;
using namespace Halide::Tools;
int main(int argc, char **argv) {
if (argc < 7) {
printf("Usa... | 1,570 | 590 |
/*!
* Copyright 2017-2020 XGBoost contributors
*/
#include <dmlc/filesystem.h>
#include <gtest/gtest.h>
#include <xgboost/predictor.h>
#include "../helpers.h"
#include "test_predictor.h"
#include "../../../src/gbm/gbtree_model.h"
#include "../../../src/gbm/gbtree.h"
#include "../../../src/data/adapter.h"
namespace ... | 9,045 | 3,394 |
version https://git-lfs.github.com/spec/v1
oid sha256:8aa5ed706dca5c634da572b1fb1bbb853d4587e7f5852d746790690c0ed3cd7e
size 396
| 128 | 88 |
#include "platform_macro.h"
#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_IA32)
#include "core/modules/assembler/assembler-x86-shared.h"
using namespace zz::x86shared;
void Assembler::jmp(Immediate imm) {
buffer_->Emit8(0xE9);
buffer_->Emit32((int)imm.value());
}
uint64_t TurboAssembler::CurrentIP() {
r... | 376 | 165 |
#include "stdafx.h"
#include "ReInstructionGenerator.h"
#include "ReExpression.h"
#include "ReInstruction.h"
#include "ReBinaryOperationExpression.h"
#include "ReIfExpression.h"
#include "ReDeclarationExpression.h"
#include "ReAssociationExpression.h"
#include "ReValueExpression.h"
#include "ReIdentifierExpres... | 6,510 | 2,008 |
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2023-01-01
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... | 2,222 | 780 |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... | 11,625 | 3,790 |
// Copyright 2019 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... | 8,771 | 2,540 |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
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 condit... | 3,535 | 1,158 |
/***************************************************************************
*
* $Id$
*
**************************************************************************/
/**
* @file $HeadURL$
* @author $Author$(hoping@baimashi.com)
* @date $Date$
* @version $Revision$
* @brief
*
**/
#include <gumbo-query/Se... | 8,377 | 4,002 |
/*
* Buffer.cpp
*
* Created on: Sep 26, 2012
* Author: sofa1011
*/
using namespace std;
#include "../includes/Buffer.h"
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <unistd.h>
Buffer::Buffer( int bufferSize) {
size = bufferSize;
buffer1 = new char[bufferSize];
buffer2 = new char... | 2,257 | 888 |
/**
* @file
*
* @brief Tests for the Backend builder class
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*
*/
#define ELEKTRA_PLUGINSPEC_WITH_COMPARE
#include <backendbuilder.hpp>
#include <backend.hpp>
#include <backends.hpp>
#include <plugindatabase.hpp>
#include <algorithm>
#in... | 22,786 | 8,813 |
//
// Created by __author__ on 18/01/2022.
//
#include <FairWindSdk/settings/FairComboBox.hpp>
#include <FairWindSdk/settings/FairLineEdit.hpp>
#include <FairWindSdk/settings/FairCheckBox.hpp>
#include <FairWindSdk/settings/DisplaysBrowser.hpp>
#include <FairWindSdk/settings/LayersBrowser.hpp>
#include "Settings.hpp"
... | 2,278 | 666 |
/* ---------------------------------------------------------------------------
*
* Matrix2x2 class - Michael Brandon Williams
*
* Matrix2x2.cpp
*
* ---------------------------------------------------------------------------
*/
#include "Matrix3x3.h"
Matrix3x3::Matrix3x3()
{
elements[0][0] =... | 14,982 | 6,796 |
/*
// Copyright (c) 2016 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 o... | 4,054 | 1,250 |
// IPCLog.hpp - IOS to PowerPC logging through IPC
// Written by Palapeli
//
// Copyright (C) 2022 Team Saoirse
// SPDX-License-Identifier: MIT
#pragma once
#include <System/OS.hpp>
#include <System/Types.h>
class IPCLog
{
public:
static IPCLog* sInstance;
static constexpr int printSize = 256;
IPCLog(... | 600 | 219 |
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "lib/vfs/cpp/service.h"
#include <fidl/examples/echo/cpp/fidl.h>
#include <lib/fdio/vfs.h>
#include <lib/fidl/cpp/binding_set.h>
#include "lib/gt... | 5,049 | 1,879 |
// Copyright (c) OpenMMLab. All rights reserved.
// clang-format off
#include "catch.hpp"
// clang-format on
#include "mmdeploy/core/logger.h"
#include "mmdeploy/core/model.h"
#include "mmdeploy/core/model_impl.h"
#include "test_resource.h"
using namespace mmdeploy;
TEST_CASE("model constructor", "[model]") {
SECT... | 2,175 | 719 |
#include <SPI.h>
#include "LedMatrix.h"
#define NUMBER_OF_DEVICES 1
#define CS_PIN PB8
SPIClass SPI_2(PA7, PA6, PA5);
LedMatrix ledMatrix = LedMatrix(NUMBER_OF_DEVICES, CS_PIN);
int x = 0;
void setup()
{
ledMatrix.init();
ledMatrix.setIntensity(3);
ledMatrix.setText("MAX7219 Animation Demo");
led... | 584 | 241 |
/*=========================================================================
medInria
Copyright (c) INRIA 2013 - 2018. All rights reserved.
See LICENSE.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.... | 8,709 | 2,147 |
#include <iostream>
#include <sstream>
#include <ios>
#include <iomanip>
#include <functional>
#include <algorithm>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring... | 1,152 | 587 |
#include <bits/stdc++.h>
using namespace std;
#define endll "\n"
int baseTwo(int n){
int left,a[100];
left=n;
int i=0;
while(left>0){
a[i+1]=left%2;
left=left/2;
i++;
a[0]= left==1? 0:1 ;
}
for(int j=i;j>0;j--){
cout<<a[j];
}
}
main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
f... | 377 | 221 |
#include "stack.hpp"
#include <stack>
#include <vector>
#include <deque>
# define G "\e[92m\e[1m"
# define D "\e[39m\e[0m"
# define R "\e[91m"
# define Y "\e[93m"
int main() {
try {
/****** CONSTRUCTOR ********/
{
std::cout << Y "My constructor\n" D;
std::deque<int> m... | 5,358 | 1,739 |
/******************************************************************************
Copyright 2017-2019 object_database 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:/... | 11,551 | 3,843 |
// Copyright (c) 2013-2020 Vittorio Romeo
// License: Academic Free License ("AFL") v. 3.0
// AFL License page: https://opensource.org/licenses/AFL-3.0
#pragma once
namespace hg {
// Allow us to represent the game's version in a major.minor.micro format
struct GameVersion
{
int major;
int minor;
int micr... | 1,121 | 368 |
// IOStream_T.cpp,v 4.20 2000/04/19 02:49:34 brunsch Exp
#ifndef ACE_IOSTREAM_T_C
#define ACE_IOSTREAM_T_C
#include "ace/IOStream_T.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
ACE_RCSID(ace, IOStream_T, "IOStream_T.cpp,v 4.20 2000/04/19 02:49:34 brunsch Exp")
... | 6,153 | 2,304 |
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
using namespace std;
vector<string> split(const string &s, char delim) {
vector<string> elems;
stringstream ss;
string item;
ss.str(s);
while (getline(ss, item, delim)) {
elems.push_back(item);
... | 568 | 209 |
#include <gtest/gtest.h>
#include "lcd/backlight/Backlight.h"
#include "hardware/lcd/MockBacklightDriver.h"
#include "freertos/MockThread.h"
int main( int argc, char **argv)
{
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
TEST( BacklightConstructor, Create )
{
hardware::lcd::MockBa... | 432 | 155 |
// Copyright 2015 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "attestation/server/pkcs11_key_store.h"
#include <map>
#include <string>
#include <vector>
#include <base/logging.h>
#include <base/strings/... | 28,928 | 12,796 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
#include "GeoMesh.h"
#include "GeoElementSide.h"
///\cond
#include <stdio.h>
#include <algorithm>
///\endcond
GeoElementSide::GeoEl... | 6,695 | 2,297 |
// PX2CURLDownload.inl
//----------------------------------------------------------------------------
inline CURLDownload::DownType CURLDownload::GetDownType () const
{
return mDownType;
}
//----------------------------------------------------------------------------
inline char *CURLDownload::GetDownloadMemory ()
{
... | 913 | 177 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be us... | 9,241 | 2,983 |
//
// $Id$
//
//
// Original author: Darren Kessner <darren@proteowizard.org>
//
// Copyright 2007 Spielberg Family Center for Applied Proteomics
// Cedars-Sinai Medical Center, Los Angeles, California 90048
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except i... | 2,534 | 834 |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2019, Robótica de la Mixteca
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the follow... | 3,084 | 1,017 |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
// Including type: System.Net.ICredentials
#include "System/Net/ICredentials.hpp"
#inclu... | 5,015 | 1,687 |
// Version information for the "UsageEnvironment" library
// Copyright (c) 1996-2016 Live Networks, Inc. All rights reserved.
#ifndef _USAGEENVIRONMENT_VERSION_HH
#define _USAGEENVIRONMENT_VERSION_HH
#define USAGEENVIRONMENT_LIBRARY_VERSION_STRING "2016.10.11"
#define USAGEENVIRONMENT_LIBRARY_VERSION_INT 1476144000... | 329 | 135 |
/*
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <stack>
#include <string>
#include <cstring>
using namespace std;
stack<int> st;
int main(){
string s;
cin>>s;
//cout<<"F@ck you";
for(int i=0;i<s.length();i++){
if(s[i]=='(') st.push(i);
if(s[i]==')... | 396 | 167 |
#include "Runtime/MP1/CSamusFaceReflection.hpp"
#include "Runtime/CStateManager.hpp"
#include "Runtime/GameGlobalObjects.hpp"
#include "Runtime/Camera/CFirstPersonCamera.hpp"
#include "Runtime/World/CPlayer.hpp"
#include "Runtime/World/CWorld.hpp"
#include "TCastTo.hpp" // Generated file, do not modify include path
... | 4,759 | 1,842 |
/****************************************************************************
** Meta object code from reading C++ file 'pic.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************... | 5,160 | 2,092 |
// Copyright (c) Iwer Petersen. All rights reserved.
#include "SumoNetworkAssetFactory.h"
#include "SumoNetworkAsset.h"
#include "SumoNetworkParser.h"
USumoNetworkAssetFactory::USumoNetworkAssetFactory( const FObjectInitializer& ObjectInitializer )
: Super(ObjectInitializer)
{
SupportedClass = USumoNetworkAsset:... | 1,423 | 372 |
/*
This file is part of solidity.
solidity 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, either version 3 of the License, or
(at your option) any later version.
solidity is distributed in the hope that i... | 15,341 | 5,194 |
/* Copyright (c) 2019, isaponsoft (Isao Shibuya) All rights reserved. *
* Use of this source code is governed by a BSD-style license that *
* can be found in the LICENSE file. */
unsigned char vulkan_textureshader_frag_spv[] = {
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x... | 4,888 | 4,615 |
//blackScholesAnalyticEngine.cpp
//Functions for running black scholes using the analytic engine (from Quantlib) on the GPU
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <sys/time.h>
#include <time.h>
#define NUM_DIFF_SETTINGS 37
//needed for optionInputStruct
#include "blackScholesAnalyticEngine... | 12,463 | 5,609 |
/*
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the
following condition... | 10,865 | 3,902 |
/*******************************************************************************
* Copyright 2016 -- 2022 IBM 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:/... | 40,625 | 13,439 |
/******************************************************************************
* Copyright 2015-2020 Xilinx, 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/li... | 19,921 | 6,630 |
/**
* @file lldrawpoolterrain.cpp
* @brief LLDrawPoolTerrain class implementation
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of t... | 31,543 | 13,263 |
/***************************************************************************
* Software License Agreement (BSD License) *
* Copyright (C) 2012 by Markus Bader <markus.bader@tuwien.ac.at> *
* *
* Redistr... | 8,242 | 2,721 |
#include <glfw/include/glfw.h>
#include <windowsystem.h>
#include <webgl.h>
#include "canvas/src/stb_image.h"
#include <exout>
#if defined(TARGET_OS_MAC) || defined(__linux__)
#define MAIN_THREAD_POLLING 1
#endif
namespace glfw {
thread_local NATIVEwindow *currentWindow = nullptr;
std::mutex windowHandleMutex;
NATI... | 59,237 | 24,539 |
/****************************************************************************************
* @author: kzvd4729 created: Jun/28/2019 19:22
* solution_verdict: Accepted language: GNU C++14
* run... | 955 | 314 |
//package toolbox
#include "Maths.h"
/*
static void printMatrix(glm::mat4& m, string name)
{
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
cout << name << "[" << i << "," << j << "] = " << m[j][i] << " ";
}
cout << endl;
}
cout << endl;
}
*/
glm::mat4 createTransformationMatrix(glm::vec3& ... | 1,120 | 539 |
/**
* Copyright (C) 2018-present MongoDB, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but W... | 9,870 | 2,848 |
/*
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; eit... | 4,161 | 1,400 |
// RUN: %clangxx -fsycl -fsyntax-only -Xclang -verify %s -Xclang -verify-ignore-unexpected=note,warning
// expected-no-diagnostics
//==--------------- id_ctad.cpp - SYCL id CTAD test ----------------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LI... | 895 | 340 |
#include <JCDT_Lib/internal/ast/AstImportDeclaration.h>
#include <JCDT_Lib/internal/ast/AstAnnotationDeclaration.h>
#include <JCDT_Lib/internal/ast/AstPackageDeclaration.h>
#ifndef AstCompilationUnit_def_INCLUDED
#define AstCompilationUnit_def_INCLUDED
#include "JCDT_Lib/internal/ast/CompilationUnitDeclaration.h"
#incl... | 5,183 | 1,861 |
#define STATIC_CHECK(expr) { char unamed[(expr) ? 1 : 0]; }
template <class To, class From>
To safe_reinterpret_cast(From from)
{
STATIC_CHECK(sizeof(From) <= sizeof(To));
return reinterpret_cast<To>(from);
}
int main() {
int intValue = 5;
char c = safe_reinterpret_cast<char>(intValue);
return 0;... | 323 | 128 |
// FEM_2D_Plane_Stress.cpp (Main)
#include "pch.h"
#include "FEM_Input.h"
#include "FEM_GNUPlot.h"
#include <Eigen/Dense>
#include <Eigen/Sparse>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
//Element data type
struct Element
{
void CalculateStiffnessMatrix(const Eigen::M... | 11,278 | 4,547 |
#include "runtime.h"
#include <math.h>
int Call_int_ref_double_double_double_double_int_(double x1, double x2, double x3, double x4, int y, void* __context)
{
#define fpart(x) (x - floor(x))
double xgap = fpart(x1 + 0.5);
return int(xgap * 10.0) == 1 && y && x2 == 2.0 && x3 == 3.0 && x4 == 4.0;
#undef fpart
}
| 315 | 149 |
#include "GPUBasedProperty.h"
| 30 | 13 |
#include <Scheduler.h>
#include <System.h>
#include <IDT.h>
#include <Logging.h>
#include <APIC.h>
#include <Fs/Filesystem.h>
#include <Device.h>
#define KEY_QUEUE_SIZE 256
namespace Keyboard{
uint8_t keyQueue[KEY_QUEUE_SIZE];
unsigned short keyQueueEnd = 0;
unsigned short keyQueueStart = 0;
unsigned short ke... | 1,971 | 674 |
/*!
@file
Defines `boost::hana::detail::variadic::foldr1`.
@copyright Louis Dionne 2014
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_VARIADIC_FOLDR1_HPP
#define BOOST_HANA_DETAIL_VARIADIC_FOLDR1_... | 4,136 | 1,590 |
/*
* (C) Copyright 2013 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an intergo... | 2,945 | 1,082 |
#include "tensorflow/cc/examples/mcts.h"
#include <boost/coroutine2/coroutine.hpp>
#include <boost/fiber/all.hpp>
#include <chrono>
#include <list>
#include <thread>
#include "tensorflow/cc/saved_model/loader.h"
#include "tensorflow/cc/saved_model/tag_constants.h"
#include "tensorflow/core/platform/test.h"
namespace... | 7,251 | 2,668 |
/*
* Copyright (c) 2020 Razeware LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publis... | 3,011 | 969 |
#include <cassert>
#include <cstdio>
#include <fstream>
#include <libff/algebra/curves/mnt753/mnt4753/mnt4753_pp.hpp>
#include <libff/algebra/curves/mnt753/mnt6753/mnt6753_pp.hpp>
#include <libff/algebra/scalar_multiplication/multiexp.hpp>
#include <libff/common/profiling.hpp>
#include <libff/common/rng.hpp>
#include <... | 23,161 | 10,645 |
// INTERFACE / DEFINITION
#include "orario.h"
// ==== Costruttori
orario::orario(){
sec = 0;
}
orario::orario(int o){
if(o<0 || o>23) sec = 0; // Controllo di sanità
else sec = o*3600;
}
orario::orario(int o, int m){
if(o<0 || o>23 || m < 0 || m > 59) sec = 0; // "
else sec = o*3600 + m*60;
}
orario::orari... | 1,271 | 606 |
class Solution {
public:
int XXX(int n) {
if (n == 1) {
return 1;
}
if (n == 2){
return 2;
}
int m1 = 1, m2 = 2;
int i = 3;
int sum = 0;
while (i <= n) {
sum = m1 + m2;
m1 =... | 405 | 144 |
auto HotkeySettings::create() -> void {
setIcon(Icon::Device::Keyboard);
setText("Hotkeys");
layout.setPadding(5);
mappingList.setBatchable();
mappingList.setHeadered();
mappingList.onActivate([&] {
if(assignButton.enabled()) assignButton.doActivate();
});
mappingList.onChange([&] {
auto batche... | 2,611 | 821 |
#ifndef _GDI_WINDOW_
#define _GDI_WINDOW_
namespace Guarneri
{
static LRESULT event_callback(HWND, UINT, WPARAM, LPARAM);
static bool closed;
class GDIWindow
{
public:
void* framebuffer;
int width;
int height;
float aspect;
LPCSTR title;
LPCSTR name;
bool initialized;
int buffer_size;
HWND wind... | 5,214 | 2,281 |
#include "Engine.h"
#include <thread>
namespace mion
{
Engine * Engine::s_pInstance = nullptr;
Engine::Engine() :
m_bRunning( false ),
m_pWindow( nullptr )
{
}
Engine::~Engine()
{
}
Engine * const Engine::getInstance()
{
return s_pInstance;
}
void Engine::renderLoop()
{
const std::chrono::high_res... | 1,006 | 382 |
#include <string>
#include <sstream>
#include "exception.h"
MugenException::MugenException():
Exception::Base("", -1),
reason("unspecified"),
where("?"),
line(0){
}
MugenException::MugenException(const std::string & reason, const std::string & where, int line):
Exception::Base(where, line),
reason(reason),
where(whe... | 1,688 | 518 |
/*
==============================================================================
Copyright 2007-2013 William Andrew Burnson. 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. Redistribut... | 5,420 | 1,890 |
/*
* Copyright (c) 2012-2020 MIRACL UK Ltd.
*
* This file is part of MIRACL Core
* (see https://github.com/miracl/core).
*
* 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... | 1,794 | 858 |
/*
* kaze
*__________________
* @file CPUInfo_Private.cpp
* @author Clement Berthaud
* @brief This file provides the definition for the FCPUInfo_Private tools.
* @copyright Copyright 2021 Clement Berthaud.
* @license Please refer to LICENSE.md
*/
#include "System/CPUInfo/CPUInfo_Private.h... | 5,177 | 2,474 |
//AC
#include <bits/stdc++.h>
#define LLI long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
LLI t;
cin >> t;
while (t--) {
LLI x;
cin >> x;
if (x > 45) {
cout << -1 << "\n";
continue;
}
s... | 584 | 219 |
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#define MAX 4000
using namespace std;
int n, s, peso[MAX], valor[MAX], dp[MAX][MAX];
int main() {
memset(dp, -1, sizeof(dp)); // dp[all i] = -1
cin >> s >> n;
for (int i=1; i<=n; i++) {
... | 836 | 458 |
//-----------------------------------------------------------------------------
// File : asdxShader.h
// Desc : Shader Set Module.
// Copyright(c) Project Asura. ALl right reserved.
//-----------------------------------------------------------------------------
//-----------------------------------------------... | 38,083 | 11,614 |
// $Id: debug.cpp,v 1.2 2014-05-08 18:07:04-07 - - $
#include <cassert>
#include <climits>
#include <iostream>
#include <vector>
using namespace std;
#include "debug.h"
#include "util.h"
vector<bool> debugflags::flags (UCHAR_MAX + 1, false);
void debugflags::setflags (const string& initflags) {
for (const char f... | 1,182 | 412 |
#include "path.h"
#include "../container/symbol_tracker.h"
#include "../../discretization/util/util.h"
#include "../util/util.h"
#include "../../util/util.h"
namespace critter{
namespace internal{
namespace decomposition{
void path::exchange_communicators(MPI_Comm oldcomm, MPI_Comm newcomm){
// Accumulate the compu... | 50,009 | 18,831 |