text
string
size
int64
token_count
int64
/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * Copyright (C) 2003, 2007, 2010 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as p...
3,062
942
#include "draw_hook.h" #include "../SCBW/api.h" #include "../hook_tools.h" #include "graphics_misc.h" namespace { //-------- Draw hook taken from BWAPI --------// bool wantRefresh = false; void __stdcall DrawHook(graphics::Bitmap *surface, Bounds *bounds) { if (wantRefresh) { wantRefresh = false; ...
782
324
/*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. =================...
1,173
329
#if !defined(ARCADIA_BUILD) # include "config_formats.h" #endif #if USE_PROTOBUF # include <Formats/FormatSchemaInfo.h> # include <Formats/ProtobufSchemas.h> # include <google/protobuf/compiler/importer.h> # include <Common/Exception.h> namespace DB { namespace ErrorCodes { extern const int BAD_AR...
2,798
833
/* hook */ /* Version 1.1 (with Win32 GUI) by Juce. */ #include <windows.h> #include <windef.h> #include <string.h> #include <stdio.h> #include "mydll.h" #include "shared.h" #include "win32gui.h" #include "config.h" #include "hook.h" FILE* log = NULL; // Program Configuration static TAXI_CONFIG con...
18,170
7,873
// // EntityDynamicInterface.cpp // libraries/entities/src // // Created by Seth Alves on 2015-6-4 // Copyright 2015 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 // /* +----------------...
17,520
5,008
#include <string.h> // memcpy #include "rx/core/memory/buddy_allocator.h" #include "rx/core/concurrency/scope_lock.h" #include "rx/core/hints/unlikely.h" #include "rx/core/hints/likely.h" #include "rx/core/assert.h" namespace Rx::Memory { // Each allocation in the heap is prefixed with this header. struct alignas...
7,923
2,657
// Copyright 2014-2016 Open Source Robotics Foundation, 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 ...
2,172
698
/* * Copyright (C) 2018, Xilinx Inc - All rights reserved * Xilinx SDAccel Media Accelerator API * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is located at * * http://www.apache.org/licenses/LIC...
21,660
7,890
#include "graph.h" #include <algorithm> #include <assert.h> #include "store.h" #include "ntcoding.h" #include "seed_filter.h" #include "tbb/scalable_allocator.h" std::atomic<uint64_t> seeder_body::num_seed_hits(0); std::atomic<uint64_t> seeder_body::num_seeds(0); std::atomic<uint64_t> seeder_body::num_hsps(0); std::at...
6,801
2,349
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "ngraph/op/reduce_logical_and.hpp" #include <ngraph/validation_util.hpp> #include "itt.hpp" #include "ngraph/log.hpp" #include "ngraph/op/util/evaluate_helpers.hpp" #include "ngraph/runtime/host_tensor.hpp" #include "ngra...
2,895
981
// Given a string, your task is to count how many palindromic substrings in // this string. // The substrings with different start indexes or end indexes are counted as // different substrings even they consist of same characters. // Example 1: // Input: "abc" // Output: 3 // Explanation: Three palindromic strings...
1,967
714
/** * author: etohirse * created: 26.12.2020 15:54:25 **/ #include <fstream> #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") std::ifstream fin("beyond_the_wall.in"); std::ofstream fout("beyond_the_wall.out"); const int mxn = 4e4; std::pair<int, int> av[mxn]; int main() { int n, q; fin...
640
297
// Copyright 2018 U.C. Berkeley RISE Lab // // 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...
9,657
3,184
/* Copyright (c) 2006, Michael Kazhdan and Matthew Bolitho 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 ...
40,020
15,601
/* * 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...
5,247
1,655
// Distributed under the MIT License. // See LICENSE.txt for details. #pragma once #include <pup.h> #include "Domain/BoundaryConditions/BoundaryCondition.hpp" namespace NewtonianEuler { /// \brief Boundary conditions for the Newtonian Euler hydrodynamics system namespace BoundaryConditions { /// \brief The base cla...
957
280
#include <QtWidgets> #include "IsosurfaceWidget.hpp" #include "SpinWidget.hpp" IsosurfaceWidget::IsosurfaceWidget(std::shared_ptr<State> state, SpinWidget *spinWidget, int i) { this->state = state; this->spinWidget = spinWidget; setAttribute(Qt::WA_DeleteOnClose); // Setup User Interface this->set...
6,487
2,278
#include "SentryThreadMetadataCache.hpp" #if SENTRY_TARGET_PROFILING_SUPPORTED # include "SentryStackBounds.hpp" # include "SentryThreadHandle.hpp" # include <algorithm> # include <string> # include <vector> namespace { bool isSentryOwnedThreadName(const std::string &name) { return name.rfind("i...
1,946
529
#pragma once #include "JsonModelTypes.hpp" #include <fstream> namespace ReliveAPI { // Reads the root fields to read the version/game type (we need to know this so we can create a game specific reader/do an upgrade of the json). class JsonMapRootInfoReader final { public: void Read(const std::string& fileName); ...
491
144
#include <catch2/catch.hpp> #include <iomanip> #include <cannon/math/rootfinding.hpp> #include <cannon/math/nearly_equal.hpp> #include <cannon/log/registry.hpp> using namespace cannon::math; using namespace cannon::log; TEST_CASE("Rootfinding", "[math]") { double r = bisection_method([](double x){ return x ...
1,107
483
/* This file is part of the Pangolin Project. * http://github.com/stevenlovegrove/Pangolin * * Copyright (c) Andrey Mnatsakanov * * 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 withou...
3,646
1,045
#include "qmlhighlighter.h" #include <QColor> void QMLHighlighter::highlightBlock(const QString &text) { QTextCharFormat keywordFormat; keywordFormat.setForeground(QColor("#d7ffaf")); // Identifier QTextCharFormat typeFormat; typeFormat.setForeground(QColor("#afffff")); // Type QTextCharFormat comm...
2,112
642
//------------------------------------------------------------------------------ // // Copyright 2018-2019 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 License at // // ...
6,922
2,259
// // Created by yaoyao.sun on 2019-05-18. // Copyright (c) 2019 Horizon Robotics. All rights reserved. // #include <iostream> #include "bpu_predict/bpu_predict.h" int TestHBCCInfo(int argc, char **argv) { const char *model_file_path = "./models/faceMultitask.hbm"; const char *bpu_config = "./configs/bpu_config.j...
944
380
#include<bits/stdc++.h> using namespace std; /* NAME : DIPU BISWAS JUST CSE 2019 - 2020 PROBLEM CODE : 510A LINK : https://codeforces.com/problemset/problem/510/A */ int main() { int m, n, i = 0, j = 0, k = 2; cin >> m >> n; for(i = 0; i < m; i++){ if(i % 2 == 0) for...
896
339
#include <libsystem/Result.h> #include "kernel/node/Handle.h" #include "kernel/node/Pipe.h" #define PIPE_BUFFER_SIZE 4096 static bool pipe_can_read(FsPipe *node, FsHandle *handle) { __unused(handle); // FIXME: make this atomic or something... return !ringbuffer_is_empty(node->buffer) || !node->writers;...
1,837
696
#include "pattern_fire.h" void Pattern_Fire::init() { clearLEDs(); FastLED.setBrightness(BRIGHTNESS_MAX); } void Pattern_Fire::loop() { uint16_t brightness = max((float) BRIGHTNESS_MAX * (((float) (1024 - analogRead(PIN_POT))) / 1024.0), 5); FastLED.setBrightness(brightness); for (int i = 1; i < N...
750
338
#include<iostream.h> #include<math.h> void main() { const int iPrimeCount=169; const int iPrimeNum[iPrimeCount]={1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103 ,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211 ,223,227,229,233,239,241,251,2...
1,253
1,028
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) | +---------...
7,309
2,634
/** \file RadShockPosn.cc * \author Jonathan Mackey * * This file reads in a series of fits files, which are assumed to be outputs * of radiative shock simulations in 1D or 2D. For each file it determines * the position of the shock in the x-direction, in the 1st y-column, and * writes the (time,position) pair...
4,708
1,706
// GENERATED BY `scripts/gen-visitor-templates.py`; DO NOT MODIFY. // Memory node implementation. // @PENGUINLIONG #pragma once #include "node/reg.hpp" typedef Reference<struct MemoryPatternCapture> MemoryPatternCaptureRef; typedef Reference<struct MemoryFunctionVariable> MemoryFunctionVariableRef; typedef Reference<s...
8,307
2,996
// -*- C++ -*- // Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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 ve...
6,158
2,160
#include "VehicleDirector.h" #include <iostream> namespace core { VehicleDirector::VehicleDirector() { m_builder = nullptr; } void VehicleDirector::ChangeBuilder(VehicleBuilder* builder) { m_builder = builder; } void VehicleDirector::Make(AxleNum type) { if (m_builder == n...
1,243
389
// // Copyright (c) 2017-2020 the rbfx project. // // 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, mer...
35,058
11,831
#pragma once #define PIPE_LOGGING
34
15
///////////////////////////////////////////////////////////////////////////// // Copyright (c) Electronic Arts Inc. All rights reserved. ///////////////////////////////////////////////////////////////////////////// #include "EASTLTest.h" #include "TestMap.h" #include "TestSet.h" #include <EASTL/hash_set.h> #include <...
46,853
20,060
/* */ /* * File: PythonFitness.cpp * Author: virgolin * * Created on May 31, 2019, 12:25 PM */ #include "GPGOMEA/Fitness/PythonFitness.h" using namespace std; using namespace arma; namespace py = boost::python; namespace np = boost::python::numpy; PythonFitness::PythonFitness() { Py_Initialize(); ...
1,393
493
/* GLM header include directives. Please use GLM 0.9.9.3 or greater for known results. Previous versions of GLM are not guaranteed to work correctly. */ #include <glm/vec3.hpp> #include <glm/vec4.hpp> #include <glm/mat4x4.hpp> #include <glm/gtc/matrix_transform.hpp> /* libnoise header include directives. libnoi...
20,900
9,081
/******************************************************************************\ Copyright (c) 2005-2019, 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: 1. Redistributions of source c...
19,548
7,111
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma // de Barcelona (UAB). // // This work is licensed under the terms of the MIT license. // For a copy, see <https://opensource.org/licenses/MIT>. #include "test.h" #include <carla/Buffer.h> #include <carla/BufferPool.h> #include <array> #i...
4,272
1,704
#include "stdafx.h" #include "CppUnitTest.h" #include"..\ManagerEmployeeSystem\Manager.cpp" using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace ManagerEmployeeSystemUnitTest { TEST_CLASS(ManagerUnitTest) { public: TEST_METHOD(ManagerUnitTest_parseManager) { string manEmp = "a->b,c,d...
526
199
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/updater/test/integration_tests_impl.h" #include <cstdlib> #include <memory> #include <string> #include "base/bind.h" #include "base/cal...
18,869
6,161
#include<Core/hash.hpp> #include<gtest/gtest.h> #include<gmock/gmock.h> using namespace core; TEST(HashInt, DoneAtCompile){ static_assert(hashInt(1234) != 1234, "Not evaluted at compileTime"); } TEST(Hash, IsItSalty){ EXPECT_NE(hashInt(1234 ), hashInt(1234,1)); EXPECT_NE(hashInt(1234,1), hashInt(1234,2...
933
397
#define __STDC_FORMAT_MACROS 1 #include "BldDetector.hh" #include <bitset> #include <chrono> #include <iostream> #include <memory> #include <arpa/inet.h> #include <sys/ioctl.h> #include <net/if.h> #include "DataDriver.h" #include "RunInfoDef.hh" #include "psdaq/service/kwargs.hh" #include "psdaq/service/EbDgram.hh" #...
40,214
14,067
#include <bits/stdc++.h> using namespace std; int main() { int sum=1, s,x=1; cout<<"Enter no. of terms"; cin>>s; if (s<=1){cout<<s;} else {for (int i =2;i<=s;i++){ x=x*10; x=x+i; sum=sum+x; } cout<<sum;} return 0; }
217
113
#include "stdafx.h" #include <OdbcConnection.h> #include <OdbcStatement.h> #include <BoundDatumSet.h> #include <QueryPreparedOperation.h> namespace mssql { QueryPreparedOperation::QueryPreparedOperation( const shared_ptr<OdbcConnection> &connection, const size_t query_id, const u_int timeout, const Local<Obje...
1,594
598
/*********************************************************** * FileName: Mapper.cpp * Author: binss * Create: 2015-11-06 11:24:22 * Description: No Description ***********************************************************/ #include "Mapper.h" Mapper * Mapper::mapper = NULL; Mapper * Mapper::GetIns...
1,825
728
/* ============================================================================== This is an automatically generated GUI class created by the Projucer! Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loade...
5,640
2,003
/***************************************************************************************************************************** * Copyright 2020 Gabriel Gheorghe. All rights reserved. * This code is licensed under the BSD 3-Clause "New" or "Revised" License * License url: https://github.com/GabyForceQ/PolluxEngine/bl...
904
272
#include "Project.h" #include <iostream> static void printMat(const Eigen::Matrix4d& mat) { std::cout<<" matrix:"<<std::endl; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) std::cout<< mat(j,i)<<" "; std::cout<<std::endl; } } Project::Project() { } //Project::Project(float angle ,float relatio...
3,752
1,748
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/dbus/fake_shill_profile_client.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/location.h" #include "base/sing...
9,323
2,604
#include "../include/pe19.h" #include <cstdlib> #include <iostream> int pe19(int argc, char **argv) { using namespace std; uint32_t n = 2000; if (argc > 1) { char *end; n = strtoul(argv[1], &end, 10); } cout << "n = " << n << endl; cout << pe::pe19(n) << endl; return 0; }
300
145
// Copyright 2018 the V8 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. #ifndef V8_INTL_SUPPORT #error Internationalization is expected to be enabled. #endif // V8_INTL_SUPPORT #include "src/objects/js-list-format.h" #inc...
14,891
4,793
 // mfcplotDoc.cpp: CmfcplotDoc 类的实现 // #include "pch.h" #include "framework.h" // SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的 // ATL 项目中进行定义,并允许与该项目共享文档代码。 #ifndef SHARED_HANDLERS #include "mfcplot.h" #endif #include "mfcplotDoc.h" #include <utility> #include <propkey.h> #include "CFuncDlg.h" #include "CNormalFuncDlg.h" #...
10,503
5,655
#include <bits/stdc++.h> using namespace std; /// decompose(1, -1) //For 1 rooted tree #define ll long long #define pb push_back #define LN 17 const ll MAX = 1e5; vector <ll> g[MAX + 9]; ll del[MAX + 9], sz[MAX + 9], par[MAX + 9], curSize, depth[MAX + 9], dis[MAX + 9], pa[LN][MAX + 9]; void dfs(ll u, ll p) { ...
2,704
1,267
#include "ComponentManager.hpp" const std::size_t Component::Type = std::hash<std::string>()(TO_STRING(Component)); // All class definitions for components // CLASS_DEFINITION(parent class, sub class) CLASS_DEFINITION(Component, Rotatable) CLASS_DEFINITION(Component, FreeCamera) CLASS_DEFINITION(Component, Renderable...
10,265
3,520
// Copyright (c) 2014, Ruslan Baratov // All rights reserved. #include <leathers/push> #include <leathers/object-layout-change> #include <leathers/c++98-compat> #include <leathers/weak-vtables> #include <leathers/padded> class Foo { public: virtual void foo() { } virtual ~Foo() { } }; class...
804
298
#include "stdafx.h" struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { int vmax; public: int maxPathSum(TreeNode *root) { vmax = INT_MIN; subPath(root); return vmax; } int su...
1,002
331
// ----------------------------------------------------------------------- // RTToolbox - DKFZ radiotherapy quantitative evaluation library // // Copyright (c) German Cancer Research Center (DKFZ), // Software development for Integrated Diagnostics and Therapy (SIDT). // ALL RIGHTS RESERVED. // See rttbCopyright....
2,920
1,285
// Token table - generated by gentoks.py from tokens #include "tokens.h" TokenRegistry tokens[] = { {"*e", T_END}, {"*s", T_STRING}, {"*i", T_IDENT}, {"*n", T_INT}, {"*f", T_FLOAT}, {"*c{", T_OCURLY}, {"*c}", T_CCURLY}, {"*c(", T_OPREN}, {"*c)", T_CPREN}, {"*c,", T_COMMA}, {"*c<", T_LT}, {"audio", T_AUDIO}...
2,693
1,310
#include <cstdlib> #include <cassert> #include <sstream> #include <iostream> #include "affectation.h" #define abs(x) ((static_cast<unsigned int>(x > 0 ? x : -x))) using namespace satsolver; Affectation::Affectation(int nb_var) : aff(std::vector<int>()), nb_aff(0), nb_unknown(nb_var) { for(int i = 0 ; i < nb_var...
2,780
1,076
// // VROPoseFilterLowPass.cpp // ViroKit // // Created by Raj Advani on 2/27/19. // Copyright © 2019 Viro Media. 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 Soft...
2,703
877
// // MapConfigurationTest.cpp // // $Id: //poco/1.7/Util/testsuite/src/MapConfigurationTest.cpp#1 $ // // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #include "MapConfigurationTest.h" #include "CppUnit/TestCaller.h" #include "...
1,363
465
/** * * 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 ...
72,652
22,780
// 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/plugins/plugin_prefs.h" #include "base/at_exit.h" #include "base/bind.h" #include "base/message_loop.h" #include "base/path_...
10,277
3,406
/*! * \file HftMocker.cpp * \project WonderTrader * * \author Wesley * \date 2020/03/30 * * \brief */ #include "HftMocker.h" #include "WtHelper.h" #include <stdarg.h> #include <boost/filesystem.hpp> #include "../Includes/WTSVariant.hpp" #include "../Includes/WTSContractInfo.hpp" #include ...
27,043
11,974
class Operators { public: void* operator new[](size_t size) throw() { return nullptr; } void* operator new (size_t size) throw(){ return nullptr; } int operator+(const Operators& o) const { return 2; } Operators operator++() { return *this; } ...
663
233
#include "Mesh.h" #include "CLog.h" #include "StringFormat.h" using gfx::engine::Mesh; namespace { const char * CLASSNAME = "Mesh"; } // Buffers Vertex data into the VBO void Mesh::init(std::vector<gfx::Vertex_T> * d) { m_data_size = d->size(); glGenVertexArrays(1, &m_vao); glBindVertexArray(m_vao); glGenBuffer...
3,769
1,530
#include <fc/network/udp_socket.hpp> #include <fc/network/ip.hpp> #include <fc/fwd_impl.hpp> #include <fc/asio.hpp> namespace fc { class udp_socket::impl { public: impl():_sock( fc::asio::default_io_service() ){} ~impl(){ // _sock.cancel(); } boost::asio::ip::udp::socket _sock...
5,785
2,060
#include<iostream> #include<stdio.h> #include<stdlib.h> #include<string.h> #include<unistd.h> #include<sys/types.h> #include<sys/socket.h> #include<netinet/in.h> #include<netdb.h> using namespace std; void error(const char *msg) { perror(msg); exit(1); } int main(int argc,char *argv[]) { int sockfd,portn...
1,607
612
#include "tpch.h" #include "Toast/Core/Input.h" #include "Toast/Core/Application.h" namespace Toast { bool Input::IsKeyPressed(const KeyCode keycode) { auto state = GetAsyncKeyState(static_cast<int>(keycode)); return (state & 0x8000); } bool Input::IsMouseButtonPressed(const MouseCode button) { auto sta...
834
345
// 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/profiles/profile_avatar_icon_util.h" #include "grit/theme_resources.h" #include "testing/gtest/include/gtest/gtest.h" #include "...
3,912
1,411
/*############################################################################## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems. 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 ...
81,261
23,326
// 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 "device/fido/auth_token_requester.h" #include <set> #include <utility> #include "base/bind.h" #include "base/containers/contains.h" #include "b...
14,932
4,441
// This file is a part of the IncludeOS unikernel - www.includeos.org // // Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences // and Alfred Bratterud // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // Yo...
14,417
4,111
/** * Copyright (c) 2018, University Osnabrück * 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 li...
13,768
4,450
#define NO_IMPORT_ARRAY #define PY_ARRAY_UNIQUE_SYMBOL pycuda_ARRAY_API #include <vector> #include "tools.hpp" #include "wrap_helpers.hpp" #include <cuda.hpp> #include <mempool.hpp> #include <boost/python/stl_iterator.hpp> namespace py = boost::python; namespace { class device_allocator : public pycuda::cont...
6,900
2,486
#ifndef UNICODE #define UNICODE #endif #include <Windows.h> #include <d2d1.h> #include <thread> #pragma comment(lib,"d2d1") LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); void initD2D(); void updateOverlayLocation(); void readData(); void readWindowInfo(); void checkClo...
5,140
2,269
// 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/performance_monitor/startup_timer.h" #include "base/bind.h" #include "base/logging.h" #include "base/string_number_conversio...
5,042
1,526
//***************************************************************************** // Copyright 2017-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 the License at // // http://w...
137,676
39,366
/* * Copyright 2004-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
6,010
1,865
#include <iostream> #include <cstdio> using namespace std; bool is_prime(int x) { if (x < 4) { return true; } for (int i = 2; i * i <= x; ++i) { if (x % i == 0) { return false; } } return true; } void solve() { int d; cin >> d; int p = d + 1; for (; !is_prime(p); ++p) {} int q =...
456
214
/** * // This is the ImmutableListNode's API interface. * // You should not implement it, or speculate about its implementation. * class ImmutableListNode { * public: * void printValue(); // print the value of the node. * ImmutableListNode* getNext(); // return the next node. * }; */ class Solution { pub...
535
154
// Copyright Carl Philipp Reh 2009 - 2016. // 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 MIZUIRO_COLOR_SET_PERCENTAGE_HPP_INCLUDED #define MIZUIRO_COLOR_SET_PERCENTAGE_HPP_INCLUDED...
678
258
#include "envoy/config/filter/thrift/rate_limit/v2alpha1/rate_limit.pb.validate.h" #include "extensions/filters/common/ratelimit/ratelimit_registration.h" #include "extensions/filters/network/thrift_proxy/filters/ratelimit/config.h" #include "test/extensions/filters/network/thrift_proxy/mocks.h" #include "test/mocks/...
2,551
804
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include "gq.def.hpp"
70
30
#include "AnimNotifyState_SpawnSkinnedMesh.h" UAnimNotifyState_SpawnSkinnedMesh::UAnimNotifyState_SpawnSkinnedMesh() { this->ItemCategory = EItemCategory::PrimaryWeapon; this->UseFirstPersonComponent = false; }
221
81
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <memory> #include <sstream> #include <string> #include <vector> #include "gtest/gtest.h" #include "ngraph/ngraph.hpp" NGRAPH_SUPPRESS_DEPRECATED_START using namespace ngraph; using namespace std; TEST(node_input_output,...
5,546
2,492
#include "interpreter.h" #include <cstring> #include <cmath> #include <algorithm> #include "scanner.h" #include "parser.h" namespace lasm { Interpreter::Interpreter(BaseError &onError, BaseInstructionSet &is, InterpreterCallback *callback, FileReader *reader): onError(onError), instructions(is)...
29,784
8,355
//===- AMDGPUAsmParser.cpp - Parse SI asm to MCInst instructions ----------===// // // 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 // //===---------------------------...
183,449
68,966
#ifndef APYTUU_ENGINE_GEOM_EX #define APYTUU_ENGINE_GEOM_EX namespace apytuu_engine_geom{ class GeomException{ public: private: }; } #endif
144
72
#include "muscle.h" #include "msa.h" #include "tree.h" #include "clust.h" #include "clustsetmsa.h" #include "distcalc.h" static void SaveMSADist(const MSA &msa, MSADist &d, const char *FileName) { FILE *f = fopen(FileName, "w"); if (f == 0) Quit("Cannot create %s", FileName); unsigned n = msa.GetSeqCount(); fo...
2,215
1,016
/* Copyright (c) 2010-2011 mbed.org, MIT License * * 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, pu...
27,933
8,095
/***************************************************************************************************************** * ReelRobotix Inc. - Software License Agreement Copyright (c) 2018-2020 * Authors: Pablo Inigo Blasco, Brett Aldrich * ***************************************************************************...
1,854
510
#include <pybind11/pybind11.h> #include <pybind11/stl_bind.h> #include <pybind11/stl.h> #include <pybind11/numpy.h> #include <FTDCParser.h> #include <vector> #include <filesystem> #include <boost/format.hpp> namespace py = pybind11; using namespace py::literals; using namespace ftdcparser; typedef std::vector<std:...
12,428
3,758
/** * Project Untitled */ #include "Stewart.h" /** * Stewart implementation */ /** * @param boardingCard * @return bool */ bool Stewart::checkBoardingCard(void boardingCard) { return false; } /** * @return void */ void Stewart::sellFood() { return; }
273
96
/* * Copyright 2020 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. */ #include "decoder.h" #include "isa.h" #include "state.h" #include "uop.h" using namespace lc3::core; PIMicroOp IMicroOp::insert(PIMicroOp new_next) { if(...
15,980
6,050
#include <cassert> #include <cstdlib> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <memory> #include <utility> #include <map> #include <unordered_map> #include <functional> #include <algorithm> #include <chrono> #include <sg14/fixed_point> #include <EASTL/vector.h> #include <EASTL/ar...
14,755
5,238
// Copyright 2017 the V8 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. #include <stdlib.h> #include "src/v8.h" #include "src/heap/concurrent-marking.h" #include "src/heap/heap-inl.h" #include "src/heap/heap.h" #include "s...
5,127
1,820