text
string
size
int64
token_count
int64
/* * Video mode file * * This file is part of the "ForkENGINE" (Copyright (c) 2014 by Lukas Hermanns) * See "LICENSE.txt" for license information. */ #include "Video/Core/VideoMode.h" namespace Fork { namespace Video { /* --- VideoMode structure --- */ VideoMode::VideoMode(const Math::Size2ui& vmResolution...
2,260
735
#include "Bullet.h" #include "Game.h" Bullet::Bullet(glm::vec3 position, glm::vec3 rotation, glm::vec3 direction) : Object("arrow.bmf") { this->setType(ObjectType::Object_Bullet); this->position = position; this->rotation = rotation; this->movement = glm::normalize(direction) * speed; this->name = "Bullet"; this...
1,511
576
/* Copyright 2015 Esri Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed un...
10,414
3,683
#include <bits/stdc++.h> using namespace std; #define le 1003 vector <int> v[le]; vector<int> ct; int dis[le]; bool vis[le]; void bfs(int a){ memset(vis, false, sizeof(vis)); vis[a] = true; dis[a]++; queue<int> q; q.push(a); while(!q.empty()){ int p = q.front(); q.pop(); for(int i = 0; i < v[p]....
1,061
510
// Copyright 2008 The RE2 Authors. All Rights Reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Tested by search_test.cc. // // Prog::SearchOnePass is an efficient implementation of // regular expression search with submatch tracking for // what I cal...
23,481
7,394
#ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif #if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS) #include "config.h" #endif #include "AEUtil.h" #include "TimeUtils.h" #include <cassert> extern "C" { #include "libavutil/channel_layout.h" } NS_KRMOVIE_BEGIN /* declare the rng seed and initial...
19,303
8,635
/* * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * 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 ...
6,500
2,270
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
109,583
34,907
/** * 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. */ // -*- c++ -*- #include <faiss/utils/distances.h> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #inc...
25,380
11,499
/* * expr/detail/driver.cpp * solver * * Created by Alexandre Martin on 03/02/2016. * Copyright © 2016 scalexm. All rights reserved. * */ #include "driver.hpp" #include <sstream> namespace expr { namespace detail { result<generic_expr> driver::parse(const std::string & str) { begin_scan(str); ...
720
241
//============================================================================= // // Adventure Game Studio (AGS) // // Copyright (C) 1999-2011 Chris Jones and 2011-20xx others // The full list of copyright holders can be found in the Copyright.txt // file, which is part of this source code distribution. // // The AGS ...
80,934
26,988
#include <cassert> #include <cstdlib> #include <iostream> #include <chrono> #ifdef MEM_STATS #include <string> #endif #include <wasi/libc-environ.h> // TODO: remove these once the warnings are fixed #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #include "js/CompilationAndEvaluat...
17,161
5,600
#include <iostream> #include <vector> #include <cstdio> #include <string> #include <algorithm> using namespace std; int main() { int n, k; cin >> n >> k; vector<float> v(n + k + 10, 0.0); vector<float> s(n + k + 10, 0.0); vector<float> dp(n + k + 10, 0.0); float tmp; for (int i = 1; i <= n...
1,003
506
/* * BM3D denoising filter - VapourSynth plugin * Copyright (C) 2015 mawen1250 * * 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, either version 3 of the License, or * (at your option) any later...
7,034
2,609
#include "MemBuffer.h" //-------------------------------------------------------------------------------------------- // MemBufferDynamic //-------------------------------------------------------------------------------------------- MemBufferDynamic::MemBufferDynamic() : m_cursor(0) , m_memblock(s_defaultSize) ...
2,912
1,032
/* -- MAGMA (version 1.6.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2015 @generated from zpotrf_mgpu.cpp normal z -> c, Fri Jan 30 19:00:13 2015 */ #include "common_magma.h" /** Purpose ------- CPOTRF c...
5,880
2,120
#include <stdio.h> #include <string.h> #include "wrect.h" #include "cl_dll.h" #include "cl_util.h" #include "cl_entity.h" #include "const.h" #include "parsemsg.h" // BEGIN_READ(), ... #include "voice_status.h" static CVoiceStatus *g_pInternalVoiceStatus = NULL; // ------------------------------------------------...
10,031
4,306
/*************************************************************************** * Copyright 1998-2020 by authors (see AUTHORS.txt) * * * * This file is part of LuxCoreRender. * * ...
9,514
3,178
/** * \file PnlWzskShtDetail.cpp * job handler for job PnlWzskShtDetail (implementation) * \copyright (C) 2016-2020 MPSI Technologies GmbH * \author Emily Johnson (auto-generation) * \date created: 5 Dec 2020 */ // IP header --- ABOVE #ifdef WZSKCMBD #include <Wzskcmbd.h> #else #include <Wzskd.h> #endif #incl...
8,854
4,228
//==- UnreachableCodeChecker.cpp - Generalized dead code checker -*- C++ -*-==// // // The LLVM37 Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-----------------------------------------------------...
9,377
2,952
# Python program for implementation of heap Sort # To heapify subtree rooted at index i. # n is size of heap def heapify(arr, n, i): largest = i # Initialize largest as root l = 2 * i + 1 # left = 2*i + 1 r = 2 * i + 2 # right = 2*i + 2 # See if left child of root exists and is # greater than root if...
1,134
504
/*! * Copyright (c) 2018 by Contributors * \file random/sgx_random_engine.h * \brief SGX trusted random engine */ #include <dmlc/logging.h> #include <sgx_trts.h> #include <algorithm> #include <cmath> #include "../../runtime/sgx/common.h" namespace tvm { namespace contrib { /*! * \brief An interface for generati...
16,227
12,981
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
4,120
1,303
#include <args/parser.hpp> #include <iostream> #include <string_view> using namespace std::literals; struct test { const char* title; int (*callback)(); int expected{0}; std::string_view output{}; }; std::vector<test> g_tests; template <typename Test> struct registrar { registrar() { ::g_tests.push_back( ...
24,236
9,592
/** * @author : Maruf Tuhin * @College : CUET CSE 11 * @Topcoder : the_redback * @CodeForces : the_redback * @UVA : the_redback * @link : http://www.fb.com/maruf.2hin */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long llu; ...
6,505
2,433
/** * Vapor Compiler Licence * * Copyright © 2017-2019 Michał "Griwes" Dominiak * * 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 ...
5,748
1,690
#include "cbase.h" #include "hud.h" #include "hud_macros.h" #include "c_baseplayer.h" #include "hud_hull.h" #include "iclientmode.h" #include "vgui/ISurface.h" using namespace vgui; #include "tier0/memdbgon.h" #ifndef DBR DECLARE_HUDELEMENT (CHudHull); #endif # define HULL_INIT 80 //-----------------------...
3,036
1,078
/*========================================================================= Program: Visualization Toolkit Module: vtkVRRenderWindow.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 software is distribute...
19,308
6,379
#include "Ticker.hpp" BEGIN_INANITY Ticker::Ticker() : lastTick(-1), pauseTick(-1) { tickCoef = 1.0f / Time::GetTicksPerSecond(); } void Ticker::Pause() { // if already paused, do nothing if(pauseTick >= 0) return; // remember pause time pauseTick = Time::GetTick(); } float Ticker::Tick() { // get curren...
732
321
#include "core.h" #include "rodinbtnodeuseresource.h" #include "configmanager.h" #include "Components/wbcomprodinresourcemap.h" #include "Components/wbcomprodinbehaviortree.h" #include "wbentity.h" RodinBTNodeUseResource::RodinBTNodeUseResource() : m_Resource() , m_ForceClaim( false ) { } RodinBTNodeUseResource::~Rod...
1,851
678
#include <power.h> #include <pci/acpi.h> #include <interrupts/panic.h> #include <stivale2.h> //#do_reboot-doc: Reboot FoxOS void do_reboot() { uint8_t good = 0x02; while (good & 0x02) { good = inb(0x64); } outb(0x64, 0xfe); asm("hlt"); interrupts::Panic p = interrupts::Panic((char*) "Reboot failed!"); p.do_...
331
170
#include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "DataFormats/DetId/interface/DetId.h" #include "Calibration/Tools/interface/calibXMLwriter.h" #include "Calibration/Tools/interface/CalibrationCluster.h" #include "Calibration/Tools/interface/Househol...
45,547
19,513
#include <iostream> #include <functional> #include <unistd.h> #include "Command_Client_Engine.h" #include "state.h" #include "render.h" #include "engine.h" using namespace client; using namespace render; using namespace engine; using namespace state; using namespace std; Command_Client_Engine::Command_Client_Engine(...
14,142
4,094
/* * Copyright (C) 2015, UChicago Argonne, LLC * All Rights Reserved * * Generic IO (ANL-15-066) * Hal Finkel, Argonne National Laboratory * * OPEN SOURCE LICENSE * * Under the terms ...
62,983
24,363
#include "ppl/nn/engines/x86/kernels/onnx/constant_kernel.h" using namespace std; using namespace ppl::common; namespace ppl { namespace nn { namespace x86 { RetCode ConstantKernel::DoExecute(KernelExecContext* ctx) { auto output = ctx->GetOutput<TensorImpl>(0); GetDevice()->CopyFromHost(&output->GetBufferDes...
423
142
class Solution { public: bool isdigit(char ch) { return (ch <= '9' && ch >= '0'); } int myAtoi(string str) { #define int long long int pos = 0, ret = 0, fl = 1; char ch; while(pos < (int)str.length() && !isdigit(ch = str[pos++])) if(ch == '-') (fl = -1); for(r...
572
215
extern "C" { #include <lai/host.h> #include <acpispec/tables.h> } #include <memory/page_table_manager.h> #include <memory/page_frame_allocator.h> #include <utils/abort.h> #include <utils/log.h> #include <utils/string.h> #include <utils/port.h> #include <pci/pci.h> #include <timer/timer.h> #include <acpi/acpi.h> ext...
3,898
1,838
/* * SimpleIniParser * Copyright (c) 2020 Nichole Mattera * * Permission to use, copy, modify, and/or 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...
4,160
1,328
// run error mitigation with mitiq with // $ qcor -qpu aer[noise-model:noise_model.json] -shots 4096 -em mitiq simple_mitiq.cpp // $ ./a.out __qpu__ void noisy_zero(qreg q) { for (int i = 0; i < 100; i++) { X(q[0]); } Measure(q[0]); } int main() { qreg q = qalloc(1); noisy_zero(q); st...
374
174
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /*++ Module Name: virtual.cpp Abstract: Implementation of virtual memory management functions. --*/...
62,359
20,147
/** * Marlin 3D Printer Firmware * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General...
44,075
17,985
#include "port_posix.h" #include <netdb.h> #include <pthread.h> #include <string.h> #include <sys/syscall.h> #include <unistd.h> #define OS_LINUX namespace handy { namespace port { #ifdef OS_LINUX struct in_addr getHostByName(const std::string &host) { struct in_addr addr; char buf[1024]; struct hostent h...
1,282
516
#include "Worker.h" Worker::Worker(char **argv, int cpu_num, int rank, int size) { this->job_name = std::string(argv[1]); this->num_reducer = std::stoi(argv[2]); this->delay = std::stoi(argv[3]); this->input_filename = std::string(argv[4]); this->chunk_size = std::stoi(argv[5]); this->output_di...
10,359
3,472
/* Copyright (c) 2005-2022, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
3,501
1,191
#include "GameObjectPool.h" #include <iostream> #include "GameObjectManager.h" GameObjectPool::GameObjectPool(string tag, APoolable* poolableCopy, int poolableSize, AGameObject* parent) { this->tag = tag; this->objectCopy = poolableCopy; this->maxPoolSize = poolableSize; this->parent = parent; } GameObjectPool::~...
3,499
1,222
/////////////////////////////////////////////////////////////////////// // Doubly Linked List // // This file should contain you implementation of the doubly-linked // list data structure as described in the project documentation. // // Some functions are provided for you - use these as guides for the // implem...
7,261
2,309
#include "exahype/solvers/CellWiseCoupling.h" exahype::solvers::CellWiseCoupling::CellWiseCoupling(double time, double repeat): SolverCoupling( SolverCoupling::Type::CellWise, time, repeat) { }
198
78
// AMD AMDUtils code // // Copyright(c) 2018 Advanced Micro Devices, Inc.All rights reserved. // 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 limitat...
5,034
1,761
// ./CSGNodeTest.sh #include <vector> #include <iomanip> #include <iostream> #include <glm/glm.hpp> #include <glm/gtc/type_ptr.hpp> #include "sutil_vec_math.h" #include "CSGNode.h" #include "Sys.h" void test_copy() { glm::mat4 m0(1.f); glm::mat4 m1(2.f); glm::mat4 m2(3.f); m0[0][3] = Sys::int_as_floa...
2,110
940
class Solution { public: void setZeroes(vector<vector<int>>& matrix) { if (matrix.empty() || matrix[0].empty()) return; int n = matrix.size(), m = matrix[0].size(); bool lastRowZero = false; for (int j = 0; j < m; ++j) if (matrix[0][j] == 0) { ...
1,101
368
// Copyright 2019 Nobleo Technology // // 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 ...
6,054
2,035
#ifndef HTMLHEADELEMENT_H #define HTMLHEADELEMENT_H #include "HTMLElement.hpp" class HTMLHeadElement : public HTMLElement { public: HTMLHeadElement(); }; #endif
176
67
// 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 "chrome/browser/ui/network_profile_bubble.h" #include <windows.h> #include <wtsapi32.h> // Make sure we link the wtsapi lib file in. #pragm...
6,496
2,017
/************************************************************************* * libjson-rpc-cpp ************************************************************************* * @file stubgenerator.cpp * @date 01.05.2013 * @author Peter Spiess-Knafl <dev@spiessknafl.at> * @license See attached LICENSE.txt ********...
2,087
581
#include <GL/Command/Buffer.hpp> #include <GL/QueryPool.hpp> OCRA_DECLARE_HANDLE(OCRA::Command::Buffer); OCRA_DECLARE_HANDLE(OCRA::QueryPool); namespace OCRA::Command { void BeginQuery( const Command::Buffer::Handle& a_CommandBuffer, const QueryPool::Handle& a_QueryPool, const uint32_t& ...
866
277
#include "../test.h" #include <rxcpp/operators/rx-publish.hpp> #include <rxcpp/operators/rx-connect_forever.hpp> #include <rxcpp/operators/rx-ref_count.hpp> #include <rxcpp/operators/rx-map.hpp> #include <rxcpp/operators/rx-merge.hpp> SCENARIO("publish range", "[!hide][range][subject][publish][subject][operators]"){ ...
18,192
5,469
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "AIModulePrivate.h" #include "AI/Navigation/NavigationSystem.h" #include "AI/Navigation/NavAgentInterface.h" #include "EnvironmentQuery/Contexts/EnvQueryContext_Querier.h" #include "EnvironmentQuery/Items/EnvQueryItemType_VectorBase.h" #include "Env...
9,256
3,125
AAClip* create_aa_clip() { AAClip *clip = malloc(sizeof(AAClip)); clip->bounds.setEmpty(); clip->run_head = nullptr; return clip; } AAClip* create_aa_clip(const AAClip& src) { AAClip* clip = malloc(sizeof(AAClip)); clip->run_head = nullptr; *clip = src; return clip; } void delete_aa_clip(AAClip* clip)...
352
151
/** * Copyright (c) 2011 10gen Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOU...
2,892
936
--- src/core/CLucene/util/BitSet.cpp.orig 2011-03-17 00:21:07 UTC +++ src/core/CLucene/util/BitSet.cpp @@ -32,6 +32,25 @@ const uint8_t BitSet::BYTE_COUNTS[256] = 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8}; +const uint8_t BitSet::BYTE_OFFSETS[256] = { + ...
2,407
1,495
// Copyright 2012 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 ...
376,712
178,459
/* * Copyright 2011 University of Sheffield. * Author: Dr Paul Richmond * Contact: p.richmond@sheffield.ac.uk (http://www.paulrichmond.staff.shef.ac.uk) * * University of Sheffield retain all intellectual property and * proprietary rights in and to this software and related documentation. * Any use, reproduct...
6,771
2,879
/** * MIT License * * Copyright (c) 2021 Markus Worchel * * 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...
5,045
1,764
//g++-5 --std=c++11 -Wall -g -o ds_list_missing_number ds_list_missing_number.cc /** * @file Find Missing Number from Array * @brief Given array containing n distinct integers [0, n) find missing integer */ // https://leetcode.com/problems/missing-number/ #include <iostream> /* std::cout ...
2,412
812
/* This source file is part of GIMPACT Library. For the latest info, see http://gimpact.sourceforge.net/ Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371. email: projectileman@yahoo.com This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable fo...
4,137
1,674
/*************************************************************************** # Copyright (c) 2018, NVIDIA 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 sourc...
6,047
2,141
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: TreeNode *buildTree(vector<int> &preorder, vector<int> &inorder) { i...
823
264
// Copyright 2018-2020 VMware, all rights reserved // // KV Blockchain replica implementation. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/param.h> #include <unistd.h> #include "ReplicaImp.h" #include <inttypes.h> #include <algorithm> #include <cassert> #include <chrono> #include <cstdlib>...
12,220
3,936
#ifndef _DIYEXT_SCATTER_HH #define _DIYEXT_SCATTER_HH #include <ftk/external/diy/mpi.hpp> #include <ftk/utils/serialization.hh> #include <numeric> namespace diy { namespace mpi { template <typename Obj> inline void scatterv(const communicator& comm, const std::vector<Obj> &ins, Obj &out, int root = 0) ...
1,139
472
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
13,324
4,349
#include <tst/set.hpp> #include <tst/check.hpp> #include <morda/gui.hpp> #include <morda/widgets/group/column.hpp> #include "../../harness/util/dummy_context.hpp" namespace{ tst::set set("get_all_widgets", [](tst::suite& suite){ suite.add("get_all_widgets_function", []{ morda::gui m(make_dummy_context()); au...
1,229
684
//--------------------------------------------------------------------------- // // FCST: Fuel Cell Simulation Toolbox // // Copyright (C) 2013 by Energy Systems Design Laboratory, University of Alberta // // This software is distributed under the MIT License. // For more information, see the README file in...
15,362
4,605
/* * Copyright 2007 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
2,437
798
/** * @file bksge_core_render_frame_buffer.cpp * * @brief FrameBuffer の実装 * * @author myoukaku */ #include <bksge/fnd/config.hpp> #if !defined(BKSGE_HEADER_ONLY) #include <bksge/core/render/inl/frame_buffer_inl.hpp> #endif
243
120
// 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 "third_party/blink/renderer/core/scroll/scrollbar_theme_overlay_mobile.h" #include "third_party/blink/public/platform/platform.h" #include "thir...
2,691
775
// keypatterntests.cpp - Tests for the KeyPattern class // /** * Copyright (C) 2012 10gen Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * Th...
4,881
1,487
/* * (C) Copyright 1996- 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 interg...
5,565
1,752
/* * urAPI.c * urMus * * Created by Georg Essl on 6/20/09. * Copyright 2009 Georg Essl. All rights reserved. See LICENSE.txt for license details. * */ #include "urAPI.h" #include "urGraphics.h" #include "MachTimer.h" //TODO//#include "RIOAudioUnitLayer.h" #include "urSound.h" #include "httpServer.h" // Mak...
99,824
43,197
/* * * Copyright 2016 gRPC 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 agree...
10,817
3,431
#include "glew.h" #include "freeglut.h" #include "glm.hpp" #include "Path.h" #include "Renderer\RenderableManager.h" #include "Renderer\Camera.h" #include "Renderer\ShaderLoader.h" #include "Renderer\WindowManager.h" #include "Game\InputManager.h" #include "Game\GameManager.h" #include <iostream> #include <vector>...
2,552
1,002
#pragma once //------------------------------------------------------------------------------ // // Copyright 2019-2020 Fetch.AI Limited // // 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 Licen...
21,270
7,029
auto SA1::IRAM::conflict() const -> bool { if(configuration.hacks.coprocessor.delayedSync) return false; if((cpu.r.mar & 0x40f800) == 0x003000) return cpu.refresh() == 0; //00-3f,80-bf:3000-37ff return false; } auto SA1::IRAM::read(uint address, uint8 data) -> uint8 { if(!size()) return data; address = bus...
1,009
384
#include <stan/math/prim/scal.hpp> #include <stan/math/rev/core/var.hpp> #include <gtest/gtest.h> #include <boost/typeof/typeof.hpp> #include <type_traits> using stan::math::promote_elements; using stan::math::var; TEST(MathFunctionsScalPromote_Elements, int2double) { int from; promote_elements<double, int> p; ...
909
342
// Generated from /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar #pragma once #include <fwd-POI.hpp> #include <java/lang/fwd-POI.hpp> #include <java/lang/Number.hpp> #include <java/lang/Comparable.hpp> struct default_init_tag; class java::lang::Integer final : public Number ...
4,101
1,602
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2013, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * R...
3,665
1,188
#include "App.hpp" namespace Tetris { #define MIN_SIZE_WIDTH 600 #define MIN_SIZE_HEIGHT 400 App::App(/* args */) : m_strTitle("Tetris"), m_iWidth(800), m_iHeight(600) { } App::~App() { } App::App(std::string title, int width, int heig...
4,441
1,564
#include <iostream> #include <stdio.h> using namespace std; int main(){ float a,b,c; cin>>a>>b>>c; printf("NUMBER = %.0f\n",a); printf("SALARY = U$ %.2f\n",b*c); return 0; }
178
84
/* * Copyright 2018 Universidad Carlos III de Madrid * * 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 appl...
2,228
791
/* $Id$ */ // Copyright (C) 2004, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). #ifndef ClpDynamicExampleMatrix_H #define ClpDynamicExampleMatrix_H #include "CoinPragma.hpp" #include "ClpDynamicMatrix.hp...
6,914
1,743
// Distributed under the MIT License (See // accompanying file "LICENSE" or the website // http://www.opensource.org/licenses/mit-license.php) #include "NodeGraph.h" namespace GraphLanguage { const std::string s_resultName = "result"; const std::string ParameterName_NodeInstantiation = "<instantiation>"; NodeGra...
8,093
2,169
#include<iostream> #include<cmath> #include<iomanip> using namespace std; int main() { unsigned long orig,i,j,tmp; cin >> orig; tmp = orig; if (orig == 1){ cout << "1=1"<<endl; goto endapp; } cout << orig << '='; for (i = 2; tmp != 1 && i<=orig; ++i){ while (tmp%i == ...
496
190
/** * ScriptDev3 is an extension for mangos providing enhanced features for * area triggers, creatures, game objects, instances, items, and spells beyond * the default database scripting in mangos. * * Copyright (C) 2006-2013 ScriptDev2 <http://www.scriptdev2.com/> * Copyright (C) 2014-2022 MaNGOS <https://getma...
11,416
3,590
// // PauseLayer.hpp // TurboRace // // Created by Carlos Eduardo Pinan Indacochea on 21/02/22. // #ifndef PauseLayer_hpp #define PauseLayer_hpp #include "cocos2d.h" enum PauseButtons { kTagPauseResumeGame = 0, kTagPauseGoHome = 1, kTagPausePlayAgain = 2 }; class PauseLayer : public cocos2d::LayerCol...
441
189
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
6,335
2,399
#include "TaskRunner.h" #include <stdexcept> #include <string.h> #include <sys/wait.h> #include <unistd.h> std::vector<TaskPtr> TaskRunner::getResults() { int status; pid_t child; std::vector<TaskPtr> result; while ((child = waitpid(-1, &status, WNOHANG)) > 0) { TaskPtr task = getResult(child);...
1,918
678
/* Copyright (c) 2008, Arvid Norberg 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 conditions and the f...
3,882
1,546
// Copyright (c) 2014 Baidu, 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 law or agreed...
9,822
3,338
#pragma once #include "../../../JObject.hpp" namespace android::app { class NotificationChannel; } namespace android::content::pm { class ShortcutInfo; } class JString; class JObject; class JString; namespace android::service::notification { class NotificationListenerService_Ranking : public JObject { public: ...
1,658
568
/** * Copyright 2020 Huawei Technologies Co., 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...
7,119
2,406
// 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 "base/callback_helpers.h" #include "base/run_loop.h" #include "chrome/browser/ui/autofill/payments/virtual_card_selection_dialog_controller_impl....
4,070
1,240