text
string
size
int64
token_count
int64
#include <jni.h> #include <lowladb.h> extern "C" JNIEXPORT jobject JNICALL Java_io_lowla_lowladb_LDBObjectId_generate(JNIEnv *env, jclass jClazz) { char buffer[CLowlaDBBson::OID_SIZE]; CLowlaDBBson::oidGenerate(buffer); jbyteArray answer = env->NewByteArray(CLowlaDBBson::OID_SIZE); env->SetByteArrayRe...
1,572
616
// Code by KSkun, 2018/3 #include <cstdio> #include <cmath> #include <algorithm> const int MAXN = 105; const double EPS = 1e-10; int n; double mat[MAXN][MAXN]; /* * Gauss-Jordan Elimination. */ inline bool gauss() { for(int i = 1; i <= n; i++) { int r = i; for(int j = i + 1; j <= n; j++) { if(std::fabs(m...
1,063
577
/******************************************************************************* * string_sorting/util/string_set.cpp * * Copyright (C) 2018 Florian Kurpicz <florian.kurpicz@tu-dortmund.de> * * All rights reserved. Published under the BSD-2 license in the LICENSE file. ********************************************...
4,490
1,568
// // Calculator.cpp // ToyCalculatorCPP // // Created by makdon on 31/10/2018. // Copyright © 2018 makdon. All rights reserved. // #include <stdio.h> #include <string> #include <regex> #include <map> #include "Calculator.h" #include "structs.h" #include "AstNode.hpp" using namespace std; map<string, string> toke...
4,704
1,512
#include <srook/mutex.hpp> #include <iostream> int main() { using namespace srook::mutexes::includes; srook::timed_mutex m; m.lock(); m.unlock(); if (m.try_lock_for(chrono::seconds(3))) { m.unlock(); } else { std::cerr << "time outed" << std::endl; return EXIT_FAILURE; } if (m.try_lock_until(chrono:...
460
214
#pragma once #include <barPerSeconds.hpp> #include <fstream> #include <vector> #include <sstream> namespace nextDwmStatus { const std::string battery_file = "/sys/class/power_supply/"; const std::string power = "/current_now"; const std::string stat = "/status"; const std::string full = "/charge_full"; const std::st...
3,615
1,145
#include "terrainlab/FullView3dRenderer.h" #include <SM_Calc.h> #include <unirender/Device.h> #include <unirender/ShaderProgram.h> #include <unirender/DrawState.h> #include <unirender/Context.h> #include <shadertrans/ShaderTrans.h> #include <renderpipeline/UniformNames.h> #include <painting0/ModelMatUpdater.h> #includ...
4,225
1,693
/* * spoj.3110.cpp * Copyright (C) 2021 Woshiluo Luo <woshiluo.luo@outlook.com> * * 「Two roads diverged in a wood,and I— * I took the one less traveled by, * And that has made all the difference.」 * * Distributed under terms of the GNU AGPLv3+ license. */ #include <cstdio> #include <cstdlib> #include <cstring...
2,372
1,211
/* Copyright 2020 Glen Joseph Fernandes (glenjofe@gmail.com) Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include <boost/core/allocator_access.hpp> #include <boost/core/lightweight_test.hpp> template<class T> struct A1 { typedef T value_type; typedef st...
1,210
477
// Copyright 2008 by BBN Technologies Corp. // All Rights Reserved. #include "Generic/common/leak_detection.h" #include "English/parse/en_DescOracle.h" #include "Generic/parse/ParserTags.h" #include "English/parse/en_STags.h" #include "Generic/common/UnexpectedInputException.h" #include "Generic/common/UTF8T...
5,442
2,177
#include "pcheader.h" #include "Collider2D.h" #include "RigidBody2D.h" #include "OverEngine/Scene/TransformComponent.h" #include <box2d/b2_polygon_shape.h> #include <box2d/b2_circle_shape.h> namespace OverEngine { Ref<BoxCollisionShape2D> BoxCollisionShape2D::Create(const Vector2& size, const Vector2& offset, float...
3,377
1,395
/***************************************************************************** Copyright (c) 1995 by Advanced Visual Systems Inc. All Rights Reserved This software comprises unpublished confidential information of Advanced Visual Systems Inc. and may not be used, copied or made available to anyone, excep...
8,200
2,861
/********************************************************************** obmmff94validate.cpp - Validate the MMFF94 implementation This program assumes that the following files are in the current working directory: MMFF94_dative.mol2 MMFF94_opti.log Both these files are from the MMFF94 validation suite ...
1,960
603
// Time complexity - O(n) // Space complexity - O(n), where n = number of intervals int minMeetingRooms(vector<Interval>& intervals) { int len = intervals.size(); int count = 0, maxCount = 0; vector<pair<int, int>> table; // total len of table should be 2xlen since we have both start and end for(int i=0...
2,345
790
#include <optional> #include <string> #include <vector> #pragma once namespace r3 { namespace tiled { typedef enum class Tiled_CustomPropertyType { UNKNOWN, BOOLEAN, INTEGER, FLOAT, STRING, COLOR, OBJECT, FILE, } CustomPropertyType; typedef struct Tiled_CustomPropertyDefn { std::s...
4,163
1,698
#include "GeneralizedSolver.h" #include "matlabOutputs.h" #ifdef EOLC_MOSEK #include "external/SolverWrappers/Mosek/QuadProgMosek.h" #endif #ifdef EOLC_GUROBI #include "external/SolverWrappers/Gurobi/Gurobi.h" #endif using namespace std; using namespace Eigen; namespace EOL { GeneralizedSolver::GeneralizedSolver...
4,553
1,970
#pragma once #include <cstddef> #include <cstdint> namespace member_thunk::details { struct memory_layout { std::uint32_t page_size, allocation_granularity; static memory_layout get_for_current_system(); }; void flush_instruction_cache(void* ptr, std::size_t size); void* virtual_alloc(void* address, std::si...
541
205
/* * CarsonIce.cpp * * Created on: May 8, 2015 * Author: Andy Y.F. Huang (azneye) */ #include <bits/stdc++.h> using namespace std; void make_case() { const int N = 200; freopen("input.txt", "w", stdout); printf("%d %d\n", N, N); for (int r = 0; r < N; r++) printf("%s\n", string(N, r % 2 ? 'S' ...
3,361
1,435
/** * nat API * nat API generated from nat.yang * * OpenAPI spec version: 1.0.0 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/polycube-network/swagger-codegen.git * branch polycube */ /* Do not edit this file manually */ #include "RulePortForwardingAppendInputJs...
3,775
1,340
#include <iostream> using namespace std; inline bool even(int n) { return n % 2 == 0; } int main() { int n = 0; while (cin >> n) { int step = 0; while (n != 1) { if (even(n)) n /= 2; else n = (3 * n + 1) / 2; ++step; } if (n ...
370
148
#include "a13.h" int main() { A a; a.foo(); return 0; }
63
37
#include "ReadByteStrategyFactory.h" ReadByteStrategyFactory * ReadByteStrategyFactory::_pInstance = 0; ReadByteStrategyFactory::ReadByteStrategyFactory() { } void ReadByteStrategyFactory::destroy() { delete _pInstance; } ReadByteStrategyFactory & ReadByteStrategyFactory::Instance() { static bool __initialized = ...
1,042
313
#include "command_log.h" namespace raft { CommandLog::CommandLog(const std::vector<std::string>& peer_ids) : commit_index_(-1), last_applied_(-1) { for (auto peer_id:peer_ids) { next_index_[peer_id] = 0; match_index_[peer_id] = -1; } } void CommandLog::AppendLog(const rpc::LogEntry& entry...
1,969
689
// // Core: JsonHelper.cpp // NEWorld: A Free Game with Similar Rules to Minecraft. // Copyright (C) 2015-2018 NEWorld Team // // NEWorld is free software: you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation, either vers...
2,254
674
#include <stdio.h> /* g++ 64 bit int size is 4 bytes or operator table 1|1 = 1 1|0 = 1 0|1 = 1 0|0 = 0 */ int main() { int a = 15; /* 60 = 0000 0000 0000 0000 0000 0000 0000 1111 */ int b = 13; /* 13 = 0000 0000 0000 0000 0000 0000 0000 1101 */ int c = -1; /* -1 = 1111 1111 1111 1111 1111 1111 1111 1111...
662
439
#include "ocl.hpp" #include <cstring> #include <iostream> #include "types.hpp" OCL* OCL::m_instance = nullptr; // Singleton instance uint OCL::possible_pawn_moves = 12; uint OCL::possible_piece_moves = 30; #define QUOTE(name) #name #define STR(macro) QUOTE(macro) #define KERNEL_DIR STR(__DIR__) #define EVALKERNEL "...
18,465
8,129
/* * Copyright 2019 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
2,849
935
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #include "...
8,832
3,040
#include <GL/glew.h> #include <GLFW/glfw3.h> #include "interface_renderer.h" #ifdef _WIN32 #undef APIENTRY #define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WGL #include <GLFW/glfw3native.h> #endif #include "../rendering/render_window.h" #include <glm/mat4x4.hpp> #include <glm/gtc/type_ptr.h...
18,104
6,507
#include <mntRegridAxis.h> extern "C" int mnt_regridaxis_new(RegridAxis_t** self) { *self = new RegridAxis_t(); (*self)->spline = vtkCardinalSpline::New(); // let the the spline estimate the second derivative at the boundaries (*self)->spline->SetLeftConstraint(3); (*self)->spline->SetRightConst...
2,502
877
#include "MoCrNetMessage.h" MO_NAMESPACE_BEGIN MO_NAMESPACE_END
67
32
#include "pch.h" #include "CGraphMan.h" int CDataGroup_3::nPos[]{ nMargin, nMargin + nColumnWidth + nGap, nMargin + (nColumnWidth + nGap) * 2 }; //DWORD CDataGroup_3::clrColors[]{ 0x00ff5252, 0x0069f0ae, 0x448aff };
218
111
#include "copentimelineio/deserialization.h" #include <opentimelineio/deserialization.h> OTIO_API bool deserialize_json_from_string( const char *input, Any *destination, OTIOErrorStatus *error_status) { std::string str = input; return OTIO_NS::deserialize_json_from_string( str, ...
764
252
#pragma once #include "i_warper.hpp" namespace vva { class OperationStrategy { public: OperationStrategy(IOperationWarper& warper); int16_t operator()(const int16_t& a, const int16_t& b); private: IOperationWarper& warper_; }; } // namespace vva
260
100
#ifndef CARPI_WIRING_UTILS_JSNSR04T_DISTANCE_HPP #define CARPI_WIRING_UTILS_JSNSR04T_DISTANCE_HPP #include <thread> #include <memory> #include <cstdint> #include <common_utils/log.hpp> #include "gpio.hpp" namespace carpi::wiring { class JSNSR04TDistanceSensor { LOGGER; public: struct Measurem...
1,263
462
#include <limits> #include <exemodel/poll_tools.hpp> #include "srv_dev_mng.hpp" #include <iostream> #include <fstream> #include <string.h> #include <openssl/md5.h> namespace svcDevMng { svcDeviceManager::svcDeviceManager(uint16_t port) : serverExt(port) , m_pkgc(0) { register_callback<bmid_t::sendUpdateData>( [t...
1,360
658
#include <cstdio> #include <cstdlib> #include <SDL2/SDL.h> #include "glsys.h" #include "FileUtil.h" #define WINDOW_SIZE 640 void printShaderInfoLog(GLuint shaderHandle) { GLint logLength; glGetShaderiv(shaderHandle, GL_INFO_LOG_LENGTH, &logLength); if (logLength > 0) { char* logBuf...
3,266
1,184
// 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 "carla/Exception.h" // ==============================================================...
1,482
406
/* * Copyright (C) 2022 Frank Mertens. * * Distribution and use is allowed under the terms of the zlib license * (see cc/LICENSE-zlib). * */ #include <cc/Point> #include <limits> namespace cc { template class Vector<double, 2>; /** Get positive angle of vector \a v * \return Angle in range [0, 2*PI) */ do...
900
371
// // Created by rika on 16/11/2019. // #include "../Analyser.h" #include "Signal/Resample.h" using namespace Eigen; void Analyser::resampleAudio(double newFs) { x = std::move(Resample::resample(x, fs, newFs, 50)); fs = newFs; }
240
109
/********************************************************************************************************* * ContainerEvolved.cc * Note: Phoenix Container Evolved * Date: @2015.05 * Author: Force Charlie * E-mail:<forcemz@outlook.com> * Copyright (C) 2015 The ForceStudio All Rights Reserved. ***************************...
401
92
#include "scalar_wave.hpp" #include "fields/algorithms.hpp" #include "fields/selector.hpp" #include "real3_operators.hpp" #include <cmath> #include <numbers> #include <sol/sol.hpp> #include "operators/discrete_operator.hpp" #include <range/v3/algorithm/max_element.hpp> #include <range/v3/view/transform.hpp> namespa...
8,253
2,807
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include <cstdint> #include "QirTypes.hpp" #include "QirRuntime.hpp" QirRange::QirRange(int64_t st, int64_t sp, int64_t en) : start(st) , step(sp) , end(en) { // An attempt to create a %Range with a zero step should cause a run...
545
198
// // Created by cds on 2020/9/23. // #include "message.h" #include <event2/buffer.h> #include <event2/bufferevent.h> #include <event2/event.h> #include <event2/listener.h> #include <event2/util.h> #include <stdio.h> #include <time.h> #include <iostream> #include <map> #include <string.h> #include <vector> #include <...
5,534
2,134
#include "precomp.h" #include "rsop.h" #include <tchar.h> ///////////////////////////////////////////////////////////////////// void InitSecAuthDlgInRSoPMode(HWND hDlg, CDlgRSoPData *pDRD) { __try { BOOL bImport = FALSE; _bstr_t bstrClass = L"RSOP_IEAKPolicySetting"; HRESUL...
9,569
3,192
#pragma once #include "./exception.hpp" namespace member_thunk { class region_not_empty final : public exception { public: constexpr region_not_empty() noexcept : exception("This region has been destroyed before being emptied.") { } }; }
245
76
#include "circballmesh.h" #include <Qt3DRender/qbuffer.h> #include <Qt3DRender/QAttribute> #include <Qt3DRender/QGeometry> #include <qmath.h> QByteArray createCirclesVertexData(float radius, int resolution) { QByteArray bufferBytes; // vec3 pos, vec3 normal, vec4 color const quint32 elementSi...
5,721
1,996
#include <sstream> #include "AliAnalysisTaskEmcalOutliersGen.h" #include "AliAnalysisManager.h" #include "AliEmcalJet.h" #include "AliJetContainer.h" #include "AliMCEvent.h" #include "AliParticleContainer.h" #include "AliVParticle.h" ClassImp(PWGJE::EMCALJetTasks::AliAnalysisTaskEmcalOutliersGen) using namespace PWGJ...
4,173
1,488
// MadronaLib: a C++ framework for DSP applications. // Copyright (c) 2013 Madrona Labs LLC. http://www.madronalabs.com // Distributed under the MIT license: http://madrona-labs.mit-license.org/ /* Portions adapted from Oscbonjour: Copyright (c) 2005-2009 RÈmy Muller. Permission is hereby granted, free of charg...
4,568
1,589
#include <boost/graph/spectral_embedding_3d_layout.hpp> #include "graph_types.hpp" #include <boost/graph/python/point2d.hpp> #include <boost/graph/python/point3d.hpp> #include <boost/graph/python/graph.hpp> #include <boost/python.hpp> namespace boost { namespace graph { namespace python { template <typename Graph> vo...
1,148
386
/* ProviderUdpSSL.cpp * * MIT License * * Copyright (c) 2021 awawa-dev * * Project homesite: https://github.com/awawa-dev/HyperHDR * * 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 with...
11,044
4,636
#pragma once #include "simlib/string_view.hh" #include <optional> // Returns an absolute path that does not contain any . or .. components, // nor any repeated path separators (/). @p curr_dir can be empty. If path // begins with / then @p curr_dir is ignored. std::string path_absolute(StringView path, std::string c...
2,598
977
// Copyright (C) 2018-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "behavior_test_plugin_layout.hpp" layout_test_params activ_test_cases[] = { // layout_test_params(CommonTestUtils::DEVICE_GNA, "FP32", Layout::C, power_params({ { 3 } }, 1, 2, 2)), layout_test_params(CommonTestUtils...
757
321
// ----------------------------------------------------------------------------- // Fern © Geoneric // // This file is part of Geoneric Fern which is available under the terms of // the GNU General Public License (GPL), version 2. If you do not want to // be bound by the terms of the GPL, you may purchase a proprietary...
22,362
7,274
//------------------------------------------------------------------------------ // Helper method for the GenerateCylindricalNodeDistribution3d node generator // to generate the spun node distribution. //------------------------------------------------------------------------------ #ifndef __Spheral_generateCylDistribu...
1,148
263
/******************************************************************************* + + LEDA 6.3 + + + geowin_poly.c + + + Copyright (c) 1995-2010 + by Algorithmic Solutions Software GmbH + All rights reserved. + *******************************************************************************/ #inc...
1,159
470
#include <iostream> #include <unordered_set> #include "ft_api.h" #include "tools/stringstools.h" using std::unordered_set; TEST_F(FTApi, CompositeSelect) { Add("An entity is something|", "| that in exists entity as itself"); Add("In law, a legal entity is|", "|an entity that is capable of something bearing legal righ...
2,126
885
#include "CounterProcessors.hpp" #include <utility> namespace inexor::visual_scripting { CounterProcessors::CounterProcessors(CounterIntProcessorPtr counter_int_processor, CounterFloatProcessorPtr counter_float_processor) : LifeCycleComponent(counter_int_processor, counter_float_processor) { this->counter_in...
624
181
using regular_policy = RAJA::KernelPolicy< RAJA::statement::For<0, thread_exec, RAJA::statement::For<1, RAJA::simd_exec, RAJA::statement::Lambda<0> > > >; void star1(const int n, const int t, matrix & in, matrix & out) { RAJA::Ra...
20,714
10,898
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. #pragma once /*! \file rx-multicast.hpp \brief allows connections to the source to be independent of subscriptions. \tparam Subject the subject to multicast the source Observa...
3,832
1,168
/***************************************************************************** * * ftpefe.cpp - IEnumFORMATETC interface * *****************************************************************************/ #include "priv.h" #include "ftpefe.h" #include "ftpobj.h" /**************************************...
10,420
3,594
/* Escreva um programa que recebe uma lista de números e a apresenta. A seguir, os números são organizados em duas listas: pares e ímpares. As duas listas devem ser apresentadas em ordem crescente. marco.mangan@pucrs.br */ #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { ...
1,393
509
#ifndef REGRADOS_H_INCLUDED #define REGRADOS_H_INCLUDED #include <string> #include <vector> #include <memory> class Membro { public: std::string nome; }; class RegraDos3 { public: Membro membro; Membro* aloc1; Membro* aloc2; std::vector<Membro> membros; RegraDos3(); // Aplicando regra do...
1,013
439
/* ********************************************************************************************************* * * 模块名称 : ColorSensor类库 * 文件名称 : AR_ColorSensor.cpp * 版 本 : V1.0 * 说 明 : * 修订记录 : 2017-3-13: 类内方法不可以被赋值给函数指针,必须将方法声明为static,但一旦将属性也改为static就失去了这个传感器类的意义 * 2017-3-14: 将数据属性全部public,主函数操作这些属性 * ...
6,980
3,053
/* * Copyright (C) 2016 Quantum ESPRESSO group * This file is distributed under the terms of the * GNU General Public License. See the file `License' * in the root directory of the present distribution, * or http://www.gnu.org/copyleft/gpl.txt . */ /* ---------------------------------------------------...
13,981
10,785
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2015, xuewen.chu * 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...
8,648
3,443
/* * TS Elements * Copyright 2015-2018 M. Newhouse * Released under the MIT license. */ #include "terrain_library.hpp" #include <algorithm> namespace ts { namespace resources { void TerrainLibrary::define_terrain(const TerrainDefinition& terrain) { terrains_[terrain.id] = terrain; } const...
445
157
#pragma once // Fortnite (1.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function Bedroom_Dress...
1,041
374
#include "Term.h" #include "TermStorage.h" #include "TermStorageAvl.h" #include "TermStorageVector.h" #include "XTerm.h" Term::Term() { #if 0 static int cnt = 0; if (cnt == 12237) { int stop = 1; MyTerm = this; } cnt++; //Log::PrintLogF(0, "C:%d:%x\n", cnt++, this); #endif COSTR("ter...
6,619
2,545
#include "AppClass.h" using namespace Simplex; void Application::InitVariables(void) { } void Application::Update(void) { //Update the system so it knows how much time has passed since the last call m_pSystem->Update(); //Is the arcball active? ArcBall(); //Is the first person camera active? CameraRotation();...
770
276
#include <stdio.h> #include <string.h> #include "Client.hpp" #include "render/Renderer.hpp" #include <sstream> //#define CONNECTION_TIMEOUT 5000 #define CONNECTION_TIMEOUT 100000 #define NUMBER_CHANNELS 2 #define SPEED 25 Client::Client() : m_host(nullptr), m_server(nullptr) { createClient(); } Client::~Client...
7,991
2,648
/************************************************************ ************************************************************/ #include "sj_common.h" /************************************************************ ************************************************************/ /******************** ********************/ int ...
4,823
1,913
// $Id$ // vim:tabstop=2 /*************************************************...
8,255
2,255
#include "./cone.hpp" #include "IceRay/utility/random.hpp" #include "math/function/function.hpp" using namespace GS_DDMRM::S_IceRay::S_camera::S_dof; GS_DDMRM::S_IceRay::S_utility::S_table::GC_hexagon GC_cone::M2s_hexagon( 20 ); GC_cone::GC_cone() :GC_cone( &Fs_child(), 1, 0, 1 ) { } GC_cone::GC...
3,648
1,762
// Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
9,075
3,153
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QDebug> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); //设置根结点的三态属性 ui->wives->setTristate(true); // 当父结点状态改变后,子结点也要相应改变(只有全选或全未选两种状态) // 为了避免信号冲突,捕获clicked信号 // 需...
2,953
1,144
#include <iostream> #include <map> using namespace std; int countDynamic(int n, map<int,int>& mm) { if (n < 0) return 0; else if (n == 0) return 1; else if (mm[n] > 0) return mm[n]; mm[n] = countDynamic(n-1, mm) + \ countDynamic(n-2, mm) + \ countDynamic(n-3, mm); return mm[n]; } int main() { map<in...
607
313
// Fill out your copyright notice in the Description page of Project Settings. #include "StateMng_AI_EnemyE3.h" #include "StateRoot_AI_EnemyE3.h" #include "../AIC_EnemyE3.h" UStateMng_AI_EnemyE3::UStateMng_AI_EnemyE3() { } UStateMng_AI_EnemyE3::~UStateMng_AI_EnemyE3() { } void UStateMng_AI_EnemyE3::Init(class AAI...
1,177
525
/*--------------------------------------------------------------- The Board, where each tetromino is stored, and the collusion detection takes place. ---------------------------------------------------------------*/ #ifndef _BOARD_ #define _BOARD_ #include "tetromino.hpp" #define BOARD_HEIGHT 15 #define BOARD_WIDTH...
1,926
626
/* @copyright Louis Dionne 2014 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #include <boost/hana/detail/assert.hpp> #include <boost/hana/integral.hpp> #include <boost/hana/list/instance.hpp> using namespace boost::hana; ...
580
264
// Copyright (c) 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 "bravo/bindings/v8_opengl_es2.h" #include "base/strings/stringprintf.h" #include "bravo/bindings/util.h" #include "bravo/plugin/instance.h" ...
50,109
18,567
// 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 "chromecast/media/cma/backend/media_pipeline_backend_wrapper.h" #include "base/logging.h" #include "base/memory/ptr_util.h" #include "chromecast...
3,503
1,180
#include<iostream> using namespace std; class Student { private: char* name; int age; const int id; const int personalID; static int noStudents; Student():id(1),personalID(0) { Student::noStudents += 1; this->age = 18; this->name = new char[strlen("John")+1]; strcpy(this->name, "John"); } public: St...
1,481
612
#ifndef SIILI__KZ__DATA_OBJECT_VECTOR_LIST_IMPL_HPP #define SIILI__KZ__DATA_OBJECT_VECTOR_LIST_IMPL_HPP #include <algorithm> #include <kanzi/core.ui/data/data_object.hpp> #include <kanzi/core.ui/data/data_object_list.hpp> #include <memory> #include <siili/kz/data_object_dynamic_list.hpp> #include <utility> #include <v...
2,942
973
/************************************************************** * * 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...
15,112
5,191
#include "Queue.h" std::mutex Queue::s_queueBlock; bool Queue::s_creationProcessFinished = false; void Queue::ChangeQueueStatus(bool canRead, bool canWrite) { _canRead = canRead; _canWrite = canWrite; } bool Queue::AddElement(std::array<int, 100000> newElement) { if (_canWrite) { s_queueBlock.lock(); _taskQue...
632
268
#include <napi.h> #include <iostream> #include "rtp_to_ogg_opus.h" #include "helpers.h" Napi::FunctionReference RtpToOggOpus::constructor; Napi::Object RtpToOggOpus::Init(Napi::Env env, Napi::Object exports) { Napi::HandleScope scope(env); Napi::Function func = DefineClass(env, "RtpToOggOpus", { ...
6,489
2,039
/* Copyright (c) 2021 M.A.X. Port Team * * 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, ...
12,726
4,016
#include <iostream> using namespace std; int main(){ cout << "My name is Aditya Sharma." << endl; cout << "My UserID is a273shar." << endl; cout << "I am in Electrical Engineering" << endl; cout << "I like programming because it is a very intellectually stimulating process. When you are solving a question, its...
460
136
#pragma once #include <map> #include "FileExistException.cpp" #include "FileNotFoundException.cpp" #include "OutOfMemoryException.cpp" #include "CustomFile.cpp" #define FILE_NOT_FOUND 0 #define DEFAULT_TOTAL_MEMORY 1024 using namespace std; class InterfaceFileSystem { private: map<string, CustomFile *> *nameTo...
2,676
746
#include "Month_enum.h" // class (controls acc) class Date { public: int day() const; // const member: can't modify object Month month() const; // const member can't modify object int year() const; // const member can't modify object void add_day(int n); // non-const member: can modify void ad...
736
258
//----------------------------------------------------------------------------- // Copyright (c) 2012 GarageGames, LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restrictio...
4,556
1,487
#include "Paddle.h" void Paddle::move(int key, unsigned int delta_time) { update_location(m_h_velocity * key, m_v_velocity * key, delta_time); }
147
58
#include <X-GSD/ComponentSprite.hpp> using namespace xgsd; ComponentSprite::ComponentSprite(const sf::Texture& texture) : mSprite(texture) { // Load resources here (RAII) // If this constructor is used and no texture rect is specified it will be as big as the texture } ComponentSprite::ComponentSpri...
1,332
462
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2011 New Dream Network * 2016 Red Hat * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Les...
30,733
14,941
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "SubmixEffects/AudioMixerSubmixEffectEQ.h" #include "Misc/ScopeLock.h" #include "AudioMixer.h" static int32 DisableSubmixEffectEQCvar = 0; FAutoConsoleVariableRef CVarDisableSubmixEQ( TEXT("au.DisableSubmixEffectEQ"), DisableSubmixEffectEQCvar, ...
8,650
3,281
#include "realm/realm.h" #include <cstdio> #include <cstdlib> #include <cassert> #include <cstring> #include <csignal> #include <cmath> #include <time.h> #include <unistd.h> using namespace Realm; using namespace LegionRuntime::Accessor; Logger log_app("app"); // Task IDs, some IDs are reserved so start at first a...
7,517
2,969
/***************************************************************************** * * PROJECT: HoloInjector - https://github.com/Romop5/holoinjector * LICENSE: See LICENSE in the top level directory * FILE: managers/draw_manager.hpp * **********************************************************************...
2,503
670
#ifndef HARDWARE_INTERFACE_EXTENSIONS_SENSOR_STATE_INTERFACE_HPP #define HARDWARE_INTERFACE_EXTENSIONS_SENSOR_STATE_INTERFACE_HPP #include <string> #include <hardware_interface/internal/hardware_resource_manager.h> #include <ros/common.h> // for ROS_ASSERT() #include <sensor_msgs/BatteryState.h> namespace hardware_i...
1,375
465
#include "Solver.h" #include <ctime> #include <chrono> #include <iomanip> //#include <eigen3/Eigen/CholmodSupport> //#include <gurobi_c++.h> typedef std::chrono::high_resolution_clock Clock; //static GRBModel static_model; void LinearVec::set_label(int label){ this->label = label; } void LinearVec::set_ab(doub...
18,262
7,112