text
string
size
int64
token_count
int64
// Copyright (c) 2019 Intel Corporation. // // 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, pub...
9,863
3,164
#include "dac.h" #include "ui_dac.h" #include <QStyleFactory> #include <QDesktopServices> #include <QUrl> #include "protocoldialog.h" /* DAC——WinForm */ DAC::DAC(QWidget *parent) : QMainWindow(parent), ui(new Ui::DAC) { ui->setupUi(this); currentPort = new BaseSerialComm(); this->init...
22,520
8,624
/**************************************************************************** * ==> PSS_ProcedureSymbolBP -----------------------------------------------* **************************************************************************** * Description : Provides a procedure symbol for banking process * * Devel...
117,939
33,045
/* * Copyright 2009, Google 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: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
3,614
1,328
#pragma once #include "Layer.hpp" #include "Camera.hpp" struct RenderBuffer { std::vector<std::unique_ptr<RenderScript>> scriptDestructQueue; bool resetTextureCache{ false }; Camera camera; std::vector<RenderLayer> layers; };
231
74
//========================================================================= // Copyright (C) 2012 The Elastos Open Source Project // // 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 // // ...
1,900
626
#include <iostream> #include <vector> int main(){ const int L = 26; const int N = 100; std::ios_base::sync_with_stdio(false); std::vector<std::string> a(N); for(long p = 0; p < N; p++){a[p] = ('A' + (p / L)); a[p] += ('a' + (p % L));} int n, k; std::cin >> n >> k; std::vector<bool> eff(n ...
708
334
/* This file is distributed under MIT License. Copyright (c) 2018 draghan 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...
2,843
932
#ifndef __CPU_VPRED_LVP_PRED_HH__ #define __CPU_VPRED_LVP_PRED_HH__ #include "cpu/vpred/vpred_unit.hh" #include <vector> #include "base/statistics.hh" #include "base/sat_counter.hh" #include "base/types.hh" #include "cpu/inst_seq.hh" #include "cpu/static_inst.hh" #include "params/FCMVP.hh" #include "sim/sim_object.hh...
1,670
537
#pragma once #include "estest/protoground-test.hpp" #include "es/graphics/image/png/PngFileDecoder.h" #include "es/graphics/image/IImageDecodeCallback.hpp" namespace es { namespace test { namespace internal { std::shared_ptr<IImageDecodeCallback> newSimpleImageListener() { class PngImageListener ...
2,732
971
#include <bits/stdc++.h> using namespace std; vector<int> v; int main(){ //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int t, co = 0, len, a; for(scanf("%d", &t); t--; ){ scanf("%d", &len); for(int i = 0; i < len - 1; scanf("%d", &a), v.push_back(a), i++); int g = v[0], m...
1,032
446
#include "Est.h" Est::Est(Id^ i, Expr^ x) { id = i; expr = x; if (comprobar(id->tipo, expr->tipo) == nullptr) error("Error de tipo"); } Tipo^ Est::comprobar(Tipo^ p1, Tipo^ p2){ if (Tipo::numerico(p1) && Tipo::numerico(p2))return p2; else if (p1 == Tipo::Bool && p2 == Tipo::Bool) return p2; else return nullptr;...
413
185
#ifndef STAN_MATH_REV_MAT_FUNCTOR_ODE_SYSTEM_HPP #define STAN_MATH_REV_MAT_FUNCTOR_ODE_SYSTEM_HPP #include <stan/math/rev/core.hpp> #include <stan/math/prim/arr/fun/value_of.hpp> #include <iostream> #include <sstream> #include <string> #include <vector> namespace stan { namespace math { /** * Internal rep...
6,268
2,081
#if !defined WATER_PHYSICS_OBJECT_INCLUDED #define WATER_PHYSICS_OBJECT_INCLUDED // Engine headers. #include <GameComponents/Collider.hpp> #include <GameComponents/GameObject.hpp> // Engine namespace. namespace water { /// <summary> /// An abstract class for physics objects. Any object which the physics sys...
3,570
816
 #ifdef _WIN32 # include "zlib/zlib.h" # include "bzip2/bzlib.h" #else # include <zlib.h> # include <bzlib.h> #endif #include "UnAlz.h" #ifdef _WIN32 # pragma warning( disable : 4996 ) // crt secure warning #endif // utime 함수 처리 #if defined(_WIN32) || defined(__CYGWIN__) # include <time.h> # include <sys/utime.h>...
49,995
23,550
namespace { /// This uses fewer arithmetic operations than any other known /// implementation on machines with fast multiplication. /// It uses 12 arithmetic operations, one of which is a multiply. /// http://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation /// uint64_t popcount_mul(uint64_t x) { const ...
2,767
1,284
/*========================================================================= Library: CTK Copyright (c) Kitware 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.ap...
10,244
3,021
/* Problem Statement: https://www.hackerrank.com/challenges/acm-icpc-team/problem */ #include <iostream> #include <string> #include <vector> #include <bitset> #define M 500 using namespace std; vector<int> acmTeam(vector<string> topic) { int known; vector<int> ans(2); for (int i = 0; i < topic.size() - 1; i++) { ...
814
388
// // FileController.cpp // Vector // // Created by Bonilla, Sean on 2/5/19. // Copyright © 2019 CTEC. All rights reserved. // #include "FileController.hpp" using namespace std; vector<CrimeData> FileController :: readCrimeDataToVector(string filename){ vector<CrimeData> crimes; string currentCSVLine; ...
1,867
554
extern "C" { #include <xhook.h> } #include <nfcd/hook/IHook.h> #include <nfcd/hook/impl/XHook.h> #include <nfcd/hook/impl/ADBIHook.h> #include <nfcd/helper/System.h> /* static */ bool IHook::useXHook = false; void IHook::init() { // Pie = 28 IHook::useXHook = System::sdkInt() >= System::P; } IHook *IHook::h...
827
328
// Copyright David Stone 2020. // 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) #pragma once #include <tm/move/max_moves_per_pokemon.hpp> #include <containers/static_vector.hpp> #include <tm/generation.hpp> n...
728
262
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" /*====== This file is part of PerconaFT. Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. PerconaFT is free software: you can redistribute it and/or modif...
18,447
6,692
// Copyright 2019 Google LLC // SPDX-License-Identifier: Apache-2.0 // // 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 requ...
10,473
4,348
#include "loss_mmod.h"
22
11
#ifndef MODEM_SCMA_HPP_ #define MODEM_SCMA_HPP_ #include <complex> #include <vector> #include "Tools/Code/SCMA/modem_SCMA_functions.hpp" #include "../Modem.hpp" namespace aff3ct { namespace module { template <typename B = int, typename R = float, typename Q = R, tools::proto_psi<Q> PSI = tools::psi_0> class Modem_S...
2,075
850
#include "Variable.h" using namespace std; Variable::Variable(Alloymaker &alloymaker) { setAlloymaker(alloymaker); } void Variable::setAlloymaker(Alloymaker &value) { alloymaker = &value; } Alloymaker &Variable::getAlloymaker() { return *alloymaker; } double Variable::composition(Standard &std) { v...
1,180
409
#pragma once #ifndef BE_CORE_SERVICE_LOG_HPP_ #define BE_CORE_SERVICE_LOG_HPP_ #include "service.hpp" #include "service_ids.hpp" #include "console_log_sink.hpp" #include "log.hpp" namespace be { /////////////////////////////////////////////////////////////////////////////// template <> struct SuppressUndefinedServic...
1,107
319
// // Created by nvuletic on 8.8.19.. // #include "CountMessage.h" namespace simulator { CountMessage::CountMessage(int count, double percentage) : m_count(count), m_percentage(percentage) {} int CountMessage::getCount() const { return m_count; } double CountMessage::getPercentage() cons...
365
122
/* IFTTTWebhook.cpp Created by John Romkey - https://romkey.com/ March 24, 2018 */ #ifndef ESP32 #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> #endif #ifdef ESP32 #include <WiFi.h> #include <HTTPClient.h> #endif #include "IFTTTWebhook.h" IFTTTWebhook::IFTTTWebhook(const char* api_key, const cha...
4,862
2,737
#include <iostream> #include <string> #include <unordered_map> #include "string_utils.h" bool Check(std::unordered_map<std::string_view, int> const &known_facts, std::vector<std::string_view> const &tokens) { for (int i = 2; i < tokens.size(); i += 2) { auto const thing = Trim(tokens[i], ":,"); a...
2,169
851
/* * vim:ts=4:sw=4:expandtab * * i3 - an improved dynamic tiling window manager * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ #include "libi3.hpp" #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> /* * Checks if the given path exists by calling stat(). * */ bool path_ex...
404
158
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/iotsitewise/model/CreateAccessPolicyRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::IoTSiteWise::Model; using namespace Aws::Utils::J...
1,590
536
#ifndef OFX_SWIZZLE_DETAIL_FUNCTIONAL_INCREMENT_DECREMENT_HPP #define OFX_SWIZZLE_DETAIL_FUNCTIONAL_INCREMENT_DECREMENT_HPP #include <utility> namespace ofxSwizzle { namespace detail { struct pre_increment { template <typename T> constexpr auto operator()(T& t) const -> decltype(++t) { return ++t...
875
328
#include <benchmark/benchmark.h> #include <shadowmocap/message.hpp> #include <algorithm> #include <random> #include <vector> std::vector<char> make_random_bytes(std::size_t n) { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<int> dis(-128, 127); std::vector<char> buf(n...
1,172
481
#include <iostream> #include <vector> #include <queue> using namespace std; class Solution { private: struct Element { int val; int idx; int row; Element(int val, int idx, int row): val(val), idx(idx), row(row) {} bool operator <(const Element &a) const { return ...
1,221
416
#include "dvd_reader.h" #include "ifo_types.h" #include "ifo_read.h" #include "nav_read.h" #include "cdrom.h" #include "dvdinfo.h" int detect_media_type(const char *psz_path) { int i_type; char *psz_dup; char psz_tmp[20]; dvd_reader_t *dvd; vcddev_t* p_cddev; WIN32_FIND_DATA FindFileData; HANDLE hFind; if (...
1,485
785
#include "TimeoutTaskManager.hpp" namespace s3d::aoba { size_t TimeoutTaskManager::addTask(const std::function<void()>& task, double ms, bool threading) { m_timeouts.emplace_back(task, ms, threading); return m_timeouts[m_timeouts.size() - 1].id(); } bool TimeoutTaskManager::isAlive(size_t...
1,540
468
// Copyright (c) FRC Team 3512. All Rights Reserved. #include <frc/trajectory/constraint/MaxVelocityConstraint.h> #include <frc/trajectory/constraint/RectangularRegionConstraint.h> #include <wpi/numbers> #include "Robot.hpp" namespace frc3512 { void Robot::AutoRightSideIntake() { // Initial Pose - Right in line...
1,577
565
// Copyright (c) 2019-2020 Nicholas Corgan // SPDX-License-Identifier: BSD-3-Clause #include "Utility.hpp" #include <Pothos/Framework.hpp> #include <Pothos/Object.hpp> #include <Pothos/Testing.hpp> #include <arrayfire.h> #include <string> #include <typeinfo> namespace GPUTests { template <typename Type1, typename...
3,915
1,463
#include "dragoncello.h" void DRAGONCELLO::solveTridiagonalSystem(vector<double>& a, vector<double>& b, vector<double>& c, vector<double>& r, vector<double>& u, int n) { int j = 0; double bet = 0.0; vector<double> gam(n,0.); //double gam[n]; // One vector of workspace, gam, is needed. if (b[0] == 0.0) ce...
4,064
1,574
// r_c_shortest_paths.hpp header file // Copyright Michael Drexl 2005, 2006. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://boost.org/LICENSE_1_0.txt) #ifndef BOOST_GRAPH_R_C_SHORTEST_PATHS_HPP #define BOOST_GRAPH_R_C_SHORTEST_PATHS_HPP #i...
28,491
8,940
#include "ep/cpp/platform.h" #include "ep/cpp/plugin.h" #include "kernelimpl.h" #include "components/stdiostream.h" #include "components/lua.h" #include "components/logger.h" #include "components/timerimpl.h" #include "components/pluginmanager.h" #include "components/pluginloader.h" #include "components/nativepluginl...
35,559
11,416
/* Copyright (c) 2018 Inverse Palindrome Apophis - GameScene.hpp InversePalindrome.com */ #pragma once #include <cocos/2d/CCScene.h> cocos2d::Scene* getGameScene(const std::string& level);
193
82
#include <flapGame/Core.h> #include <flapGame/GLHelpers.h> // clang-format off #define STBI_MALLOC(sz) PLY_HEAP.alloc(sz) #define STBI_REALLOC(p, newsz) PLY_HEAP.realloc(p, newsz) #define STBI_FREE(p) PLY_HEAP.free(p) // clang-format om #define STB_IMAGE_IMPLEMENTATION #define STBI_ONLY_PNG #inclu...
1,875
757
// https://practice.geeksforgeeks.org/viewSol.php?subId=58bdb4aa62394291d57f659e2c839932&pid=703402&user=tomarshiv51 // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: int lps(string s) { // Your cod...
973
440
// ExtendedCPU5Intel.cpp : implementation file // #include "stdafx.h" #include "resource.h" #include "ExtendedCPU5Intel.h" #include "CPUIDx86.h" #include "ReportRegs.h" // CExtendedCPU5Intel dialog IMPLEMENT_DYNCREATE(CExtendedCPU5Intel, CLeaves) CExtendedCPU5Intel::CExtendedCPU5Intel() : CLeaves(CExtendedCP...
1,764
640
// 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. // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! #include "config.h" #include "V8Path2D.h" #include "bindings/core/v8/V8Path...
20,926
7,290
// Copyright 2017 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/media/router/discovery/media_sink_service_base.h" #include "base/test/mock_callback.h" #include "base/timer/mock_timer.h" #includ...
5,430
1,958
// Copyright (C) 2019 Max Planck Gesellschaft // Author : Vincent Berenz #pragma once #include <memory> #include "command.hpp" #include "controller.hpp" #include "o80/states.hpp" #include "time_series/multiprocess_time_series.hpp" namespace o80 { template <int NB_ACTUATORS, int QUEUE_SIZE, class STATE> class Control...
1,591
491
// Copyright 2014 The Chromium Authors. All rights reserved. // Copyright 2015 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/rtp/rtp_sender.h" #include "base/big_endian.h" #include "base/logger.h" #include ...
5,470
1,803
#include "instructions.h" #include <algorithm> #include <fstream> #include <iomanip> #include <iostream> #include <string> #include "cmanip.h" #include "game_model.h" #include "global.h" #include "main_utils.h" #include "scene_manager.h" #include "windows.h" const long long MAX_TIME = (long long)1e18; int PADDING_I...
3,140
1,236
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: c_peer2peer_netmessages.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "c_peer2peer_netmessages.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/once.h> #include <google/pro...
83,097
31,287
#include "header.h" int main() { }
36
18
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* CentralBureaucracy.cpp :+: :+: :+: ...
3,163
1,207
/* Author: Isaac Asante * HackerRank URL for this exercise: https://www.hackerrank.com/challenges/making-anagrams/problem * Original video explanation: https://www.youtube.com/watch?v=05mznZNMjvY * Last verified on: May 19, 2021 */ /* IMPORTANT: * This code is meant to be used as a solution on HackerRank (link ...
818
307
#include "pch.h" #include "dataFTP.h" struct older_file { bool operator()(const fs::directory_entry& p, const fs::directory_entry& p2) { return p.last_write_time() > p2.last_write_time(); } }; std::string value(std::string line) { return line.substr(line.find(',') + 1, line.length() - line.find(','...
8,133
3,613
// Copyright (c) 2017-2019 Filipe Verri <filipeverri@gmail.com> #ifndef JULES_ARRAY_MATH_H #define JULES_ARRAY_MATH_H #include <jules/array/functional.hpp> #include <jules/base/math.hpp> #include <cmath> namespace jules { template <typename Array> auto normal_pdf(const common_array_base<Array>& array, typename Arr...
1,396
500
/** * Unit Tests for TicTacToeBoard **/ #include <gtest/gtest.h> #include "TicTacToeBoard.h" class TicTacToeBoardTest : public ::testing::Test { protected: TicTacToeBoardTest(){} //constructor runs before each test virtual ~TicTacToeBoardTest(){} //destructor cleans up after tests virtual void SetUp(){} //se...
1,114
506
/*======================================================================== VES --- VTK OpenGL ES Rendering Toolkit http://www.kitware.com/ves Copyright 2011 Kitware, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. Y...
7,686
2,428
#include <stdio.h> #include <unistd.h> #include <stdint.h> #include <errno.h> #include <fcntl.h> #include <sys/stat.h> #include <stdlib.h> #include <syslog.h> #include <iostream> #include <sstream> #include <string> #include <exception> using namespace std; #include <log.h> #include <safe_storage_imp.h> #include <saf...
33,561
13,461
#include "UIElement.hpp" #include <GUI/BsCGUIWidget.h> #include <GUI/BsGUIPanel.h> #include <Image/BsSpriteTexture.h> #include <RTTI/RTTI_UIElement.hpp> #include <exception/Throw.hpp> #include <gui/skin_gothic.hpp> #include <log/logging.hpp> #include <original-content/OriginalGameResources.hpp> namespace REGoth { UI...
2,540
884
#include <iostream> using namespace std; int main(void) { int T; cin >> T; while (T-- > 0) { int N; cin >> N; int n2 = 0; for (int base = 2; base <= N; base *= 2) { n2 += N/base; } int n5 = 0; for (int base = 5; base <= N; base *= 5) { n5 += N/base; } cout << min(n...
354
164
#pragma once #include <sam.h> #include <stdint.h> #include <vector> namespace cigar { std::vector<uint32_t> parse_string_to_cigar_vector(char const* cigar_string); int32_t calculate_right_offset(bam1_t const* record); int32_t calculate_right_offset(char const* cigar); int32_t calculate_left_offset(bam1_t const* rec...
379
149
#include "KPrintf.h" #include "../utils/Math.h" #include "../Types.h" #include "../driver/VGAGraphics.h" #include "Serial.h" namespace IO{ void kinfo(const char * info){ Driver::VGAGraphics::vga_driver.colour(Driver::VGAGraphics::vga_green); kprintf("[INFO] "); kprintf(info); } void kwarn(cons...
2,181
1,100
#pragma once // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/REDhash.hpp> #include <RED4ext/CName.hpp> #include <RED4ext/DynArray.hpp> #include <RED4ext/Types/generated/world/GlobalNodeID.hpp> namespace RED4ext { namespace community { stru...
752
269
#include <array> #include <chrono> #include <iostream> #include <thread> #include <unistd.h> #include <vector> #include <mblcxx_scope_exit.h> #include <mbltrc_trace.h> #include <mdbnet_client.h> #include <mdbnet_serialization.h> int main() { melinda::mbltrc::trace_options trace_config(std::filesystem::path("../...
2,587
819
#include "Crane.h" #include "Resource.h" #include <cmath> spSprite Crane::doThrowBlock() { if (_state != States::Working) { return nullptr; } _block->detach(); _block->setPosition(_view->getPosition()); // return crane to base auto t = _view->addTween(TweenDummy(), 50); t->addEventListener(TweenEve...
2,329
918
// Logger thread #include <stdio.h> #include <signal.h> #include <time.h> #include <unistd.h> #include <mqueue.h> #include "devices.h" #include "drv_ioport.h" #include "tetris.h" Buttons::Buttons(const int id) { _port = ioport_open(BUTTONS); for (int i = 0; i < BUTTON_COUNT; ++i) { _switchIsUp[...
3,520
1,244
/* * Copyright (C) 2010, 2011 Apple 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: * 1. Redistributions of source code must retain the above copyright * notice, this list of condit...
3,543
1,175
#pragma once #include <fstream> #include <string> #include <sstream> #include <iostream> namespace Seer { class Log { std::string outputFilename; public: std::stringstream log; Log(){ outputFilename = "untitled.log"; } Log(std::string _outputFilename): outputFilename(_outputFilename){ } ~Log(); void s...
1,359
454
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor lice...
8,702
2,936
#ifndef SIGMA_TYPES_HASH_MAP_H #define SIGMA_TYPES_HASH_MAP_H #include <Sigma/common.h> #include <Sigma/types/linked_list.h> #include <klibcxx/utility.hpp> #include <Sigma/arch/x86_64/misc/spinlock.h> namespace types { template<typename T> struct nop_hasher { using hash_result = T; hash_re...
1,589
504
#include "driver_base.h" #include "logger.h" #include "cfg.h" #include "video_base.h" #include "buffered_audio.h" #include "input_base.h" #include "throttle.h" #include "util.h" #include <variables.h> #include <core.h> #include <cstring> #include <cmath> #include <memory> #include <fstream> namespace libretro { ex...
19,369
6,818
#include "evolvo/chromosome.hpp" #include "evolvo/crossover.hpp" #include "evolvo/individual.hpp" #include "evolvo/population.hpp" #include "evolvo/selection.hpp" #define CATCH_CONFIG_MAIN // This tells the Catch2 header to generate a main #include "catch.hpp" #include <random> #include <vector> #include <map> #incl...
4,835
1,805
/** * UGENE - Integrated Bioinformatics Tools. * Copyright (C) 2008-2020 UniPro <ugene@unipro.ru> * http://ugene.net * * 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 2 * ...
2,690
775
#pragma once #include "array.hpp" #include "assert.hpp" #include "common.hpp" #include "hash.hpp" #include "iterator.hpp" #include "kernel/mm/allocator.hpp" #include "formatter.hpp" #include "memory.hpp" #include <utility> namespace util { /// \brief compair two string /// \return 0 if equal int strcmp(const char *st...
9,860
3,372
//------------------------------------------------------------------------------ #include "stdneb.h" #include "contentbrowserwindow.h" #include "contentbrowserapp.h" #include "extlibs/libqimg/qdevilplugin.h" Q_IMPORT_PLUGIN(qdevil); //------------------------------------------------------------------------------ /**...
622
205
/* This file belongs to Ashes. See LICENSE file in root folder */ #pragma once #include "renderer/TestRenderer/TestRendererPrerequisites.hpp" namespace ashes::test { class Event { public: Event( VkDevice device ); /** *\copydoc ashes::Event::getStatus */ VkResult getStatus()const; /** *\copydoc ashes...
503
204
/* * Copyright (C) Volition, Inc. 1999. All rights reserved. * * All source code herein is the property of Volition, Inc. You may not sell * or otherwise commercially exploit the source or things you created based on * the source. */ /* * $Logfile: /Freespace2/code/UI/RADIO.cpp $ * $Revision: 307 $ * $Date:...
6,280
3,191
#include <nori/integrator.h> #include <nori/scene.h> #include <nori/bsdf.h> NORI_NAMESPACE_BEGIN class lightDepthAreaIntegrator : public Integrator { public: lightDepthAreaIntegrator(const PropertyList &props) { } void preprocess(const Scene *scene) { emitterMeshes = scene->getEmitterMeshes(); ...
2,097
763
/** * @file * implementation of methods described in ClipsExtensions.h * @copyright * syn * Copyright (c) 2013-2017, Joshua Scoggins and Contributors * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condition...
14,983
5,583
#ifndef ARGOS_CORE_SYNTAX_SYNTAXPARENTHESIZEDEXPRESSION_H #define ARGOS_CORE_SYNTAX_SYNTAXPARENTHESIZEDEXPRESSION_H #include <string> #include "argos-Core/argos_global.hpp" #include "argos-Core/Syntax/ExpressionKinds.hpp" #include "argos-Core/Syntax/ISyntaxParenthesizedExpression.hpp" #include "argos-Core/Syntax/Synt...
4,837
1,289
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/ui/ws/window_server_test_impl.h" #include "services/ui/public/interfaces/window_tree.mojom.h" #include "services/ui/ws/server_window.h...
2,091
650
// Copyright 2015 Maitesin #include <string> #include <vector> #include <iostream> #include "./TST.h" template <class T> const T &TST::tst<T>::find(const std::string &key) { node_ptr node(find(root, key, 0)); if (node != nullptr) { aux_ret = node->value; node.release(); return aux_ret; } else { r...
11,642
4,412
////////////////////////////////////////////////////////////////////////////// /*++ Copyright (C) Microsoft Corporation, 1998 - 1999 Module Name: IASStringAttributeEditor.cpp Abstract: Implementation file for the CIASStringAttributeEditor class. Revision History: mmaguire 06/25/98 - created ...
20,333
9,366
#ifndef _TSTRINGS_T_ #define _TSTRINGS_T_ #include <iostream> #include <stdio.h> #include <math.h> #include <string.h> using namespace std; int length(string s) { int i; for (i = 0; s[i] != '\0'; i++) { } return i; } int charCount(string s, char c) { int i, veces; veces = 0; for (i = 0; i ...
8,551
3,687
// // OptionParser.hpp for paranoidRM in /home/aracthor/programs/projects/paranoidRM // // Made by Aracthor // Login <aracthor@epitech.net> // // Started on Mon Jun 8 20:05:10 2015 Aracthor // Last Update Mon Jun 8 20:10:50 2015 Aracthor // char OptionParser::getFlag() const { return (mFlag); } const char* O...
432
184
#include "PhotonBox/component/SpotLight.h" #include "PhotonBox/core/system/Lighting.h" #include "PhotonBox/resource/shader/ForwardSpotLightShader.h" #ifdef PB_MEM_DEBUG #include "PhotonBox/util/MEMDebug.h" #define new DEBUG_NEW #endif void SpotLight::init() { Lighting::addLight(this); } void SpotLight::destroy() {...
563
226
#include <mcRootData/McEvent.h> #include <commonRootData/RootDataUtil.h> #include "Riostream.h" #include "TROOT.h" #include "TFile.h" #include "TTree.h" #include "TRandom.h" /** @file testMcClasses.cxx * @brief This defines a test routine for the Monte Carlo ROOT classes. * * This program create a new Monte Carlo ROO...
3,079
1,096
#include "clientData.hpp" #include "Logger.hpp" #include "task_force_radio.hpp" #include "antennaManager.h" #include <iomanip> #define logParam(x) str << #x << " " << (x) << "\n" #define logParamN(n,x) str << #n << " " << (x) << "\n" void LISTED_INFO::operator<<(std::ostream& str) const { logParamN(over, static_...
19,257
5,965
#include <string> #include <iostream> #include "cadef.h" bool CACheck(int r_status, std::string r_op, std::string r_pv) { if(r_status != ECA_NORMAL) { std::cerr << "CA Error: "; if(r_pv.compare("") != 0) std::cerr << r_op << " failure for PV: " << r_pv << std::endl; else std::cerr << r_op <...
387
164
#include <leviathan/leviathan.h> class CustomLayer : public lv::Layer { public: explicit CustomLayer(lv::Application& app) : Layer("Custom"), app(app), window(app.get_window()), ctx(app.get_render_context()), ent_registry(app.get_ent_registry()), camera(ent_registry....
5,309
1,795
#include <catch2/catch.hpp> #include <replay/math.hpp> #include <replay/matrix2.hpp> #include <replay/minimal_sphere.hpp> #include <replay/vector_math.hpp> #include <boost/math/constants/constants.hpp> #include <random> namespace { // FIXME: this is somewhat generically useful - lift it to a visible namespace? replay...
8,066
3,279
#include "utils.h" #include <windows.h> extern cl_enginefuncs_s gEngfuncs; void cGetFunc::Init(){} pfnCommand cGetFunc::GetAddCommand(PCHAR name){ PBYTE address=(PBYTE)gEngfuncs.pfnAddCommand+0x1B; command_t *uml=*(command_t**)(*(PDWORD)((address+*((PDWORD)address)+4)+0x0D)); while(uml){ if(!strncmp(uml->n...
983
458
/* * Copyright (c) 2011 Google 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: * * * Redistributions of source code must retain the above copyright * notice, this list of condit...
4,059
1,388
// This file has been generated by Py++. #ifndef vector_less__bool__greater__hpp__pyplusplus_wrapper #define vector_less__bool__greater__hpp__pyplusplus_wrapper void register_vector_less__bool__greater__class(); #endif//vector_less__bool__greater__hpp__pyplusplus_wrapper
275
90
// // Renderer2D.cpp // // // Created by Siddharth on 09/07/20. // #include "Renderer2D.hpp" #include <glm/gtc/matrix_transform.hpp> #include <EndGame/Src/SubSystems/RenderSubSystem/RenderCommand.h> #include <EndGame/Src/SubSystems/RenderSubSystem/RenderApiFactory.hpp> namespace EndGame { Renderer2DStorage *R...
6,232
1,906
// knight scape #include <iostream> #include <cmath> #include <vector> #include <algorithm> const int dimension = 8; const int num_pieces = 9; void findKnightMoviments(int row, int col, std::vector<std::pair<int, int> >& movements) { for (int r = -2; r <= 2; r++) { for (int c = -2; c <= 2; c++) { if ((abs...
1,923
721
/*Copyright 2016-2018 hyperchain.net (Hyperchain) Distributed under the MIT software license, see the accompanying file COPYING or https://opensource.org/licenses/MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this  software and associated documentation files (the "Software"), to...
4,264
1,577
/** * Copyright (c) 2021 OceanBase * OceanBase CE is licensed under Mulan PubL v2. * You can use this software according to the terms and conditions of the Mulan PubL v2. * You may obtain a copy of Mulan PubL v2 at: * http://license.coscl.org.cn/MulanPubL-2.0 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BAS...
26,432
11,366