text
string
size
int64
token_count
int64
#include "db.h" Db::Db() { m_db = QSqlDatabase::addDatabase("QPSQL"); m_db.setHostName("localhost"); m_db.setDatabaseName("template1"); m_db.setPort(5432); m_db.setUserName("postgres"); m_db.setPassword(""); } bool Db::isNumber(const std::string& s) { std::string::const_iterator it = s.b...
4,083
1,234
version https://git-lfs.github.com/spec/v1 oid sha256:be80c5d3aa7630ec26446c50687042c447392f0e383d7d5c046d90a089c2bc11 size 14155
130
94
#include "localTotalEnergy.hpp" #include <cmath> #include "Misc/integrator.hpp" #include "PhysicalConstants.hpp" #include "Misc/poisson.hpp" extern "C" { void zeropt_(Real *ezpt, Real *tpzpt, Real *atvol, Real *ztotss); } /** * Calculates the total energy `energy` for each site * * @param lsms system parameters...
6,355
2,742
/* * Copyright 2004-2011, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: * John Scipione <jscipione@gmail.com> */ #include "ClockView.h" #include <Alignment.h> #include <Box.h> #include <Catalog.h> #include <CheckBox.h> #include <ControlLook.h> #include <Layout...
5,745
2,371
#include <iostream> #include <iomanip> #include <string> using namespace std; const int MONTHS = 12; string monthName(int monthNumber){ string monthNames[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; return monthNames[monthNumber - 1]; } void PrintHeader (int yearColWidth, ...
1,164
424
#ifndef NOX_CONFIG_HH #define NOX_CONFIG_HH const char* pkgdatadir = PKGDATADIR; const char* pkgsysconfdir = PKGSYSCONFDIR; const char* pkglibdir = PKGLIBDIR; const char* version = NOX_VERSION; const int buildnr = BUILDNR; #endif // -- NOX_CONFIG_HH
274
110
/* Program Link: https://www.hackerrank.com/challenges/a-very-big-sum/problem Ques. In this challenge, you are required to calculate and print the sum of the elements in an array, keeping in mind that some of those integers may be quite large. Function Description Complete the aVeryBigSum function in the editor below...
2,420
897
// // Created by pcvii on 11/24/2021. // #ifndef MYPROJECT_FF8MENU_HPP #define MYPROJECT_FF8MENU_HPP #include "Fields.hpp" #include "Menu.hpp" namespace ff8 { class FF8Menu { public: FF8Menu(); void OnUpdate(float) const; void OnRender() const; void OnImGuiUpdate() const; void OnEvent(const glengine::Event...
691
277
// Problem: https://leetcode.com/problems/word-break/ #include <vector> #include <string> #include "utils.h" namespace word_break { class Solution { public: // Time: O(n^2 * d), Space: O(n), Recursion depth <= n + 2 // n - length of the string, d - length of the dictionary // // Note: The worst case ...
3,605
1,265
/************************************************************************** * * Copyright (c) 2002 - 2011 by Computer Architecture Department, * Universitat Politecnica de Catalunya. * All rights reserved. * * The contents of this file may not be disclosed to third parties, * copied or duplicated in any form, in...
71,350
20,642
/** * Copyright 2020 Huawei Technologies Co., Ltd * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or ag...
4,163
1,377
#include "gtest/gtest.h" #include "Boat.h" #include "Position.h" #include "Globe.h" #include "Utility.h" using namespace Position; using namespace Utility; namespace { position kynance_cove = {49.97480, -5.23198, 5.0}; Globe globe; class BoatTest : public ::testing::Test { protected: BoatTest...
2,383
923
/******************************************************************************** * Copyright 2009 The Robotics Group, The Maersk Mc-Kinney Moller Institute, * Faculty of Engineering, University of Southern Denmark * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce...
4,112
1,097
#include <cISO646> #include <math.h> #include "../include/TimeMgr.h" #include "../include/ObjectInstance.h" #include "dxdefines.h" #include "DxTools.h" #include "../../falclib/include/mltrig.h" #include "dxengine.h" #ifndef DEBUG_ENGINE // This function just assign a PMatrix object to a DX Compliant Matrix void Assig...
11,132
4,382
#include "gtest/gtest.h" extern "C" { #include "anchor/console/console.h" }; #include <stdio.h> #define CONSOLE_COMMAND_GET_INT_ARG(NAME) ({ \ int _arg; \ const bool _res = console_command_get_int_arg(NAME, &_arg); \ ASSERT_TRUE(_res); \ _arg; \ }) #define CONSOLE_COMMAND_GET_STR_ARG(NAME) ({ \ ...
2,644
1,040
#include <iostream> #include <cmath> using namespace std; float trianglePDFunction(float x) { if (((x - 3.0) < 0) && ((x - 2.0) >= 0)) return 0.5 * (x - 2.0); if (((x - 6.0) <= 0) && ((x - 3.0) >= 0)) return 0.5 * (2.0 - (x / 3.0)); return 0.0; } int randGenAB(int x) { return abs((16...
929
421
/** * @file IXWebSocketPluginSetting.cpp * @author Group(SW_Browser) <gsw_browser@humaxdigital.com> * @brief Session to manage the client based on WebSocket * * (c) 2017 Humax Co., Ltd. * This program is produced by Humax Co., Ltd. ("Humax") and * the proprietary Software of Humax and its licensors. Huma...
6,791
1,875
#include "SourceGenerator.hpp" void UBT::generateGame() { auto game = std::ofstream(path + static_cast<std::string>("Source/Game.hpp")); game << "// Do not edit this file! This file was generated by the UVKBuildTool and will be overridden the next time you run regenerate!" << std::endl; game << "#include ...
1,761
612
/* Copyright (c) 2018, Sanaxn All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #ifndef _DNN_UTIL_HPP #define _DNN_UTIL_HPP #define NOMINMAX #pragma warning( disable : 4244) #pragma warning( disable : 4267) #pragma warning( push ) #pragma warni...
21,165
9,523
// Copyright Benoit Blanchon 2014-2015 // MIT License // // Arduino JSON library // https://github.com/bblanchon/ArduinoJson #ifndef ARDUINO #include "../../include/ArduinoJson/Arduino/String.hpp" #include <stdio.h> // for sprintf() String::String(double value, unsigned char digits) { char tmp[32]; sprintf(tmp...
464
182
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */ #include <cstdio> using namespace std; const int NUM[] = {137, 1315, 73, 136, 255, 1384, 16385, 0}; void print(int N) { int e, p; for (e = 0, p = 1; 2*p <= N; e++, p*=2); if (e == 0) { printf("2(0)"); return; } pr...
623
295
// This project includes Wireframe extrucion from VideoGrabber, midi-controlling the mesh and screen capturing the images // Base of this code is based on Tim Gfrerer and James George OF cameraMesh -example // I used for the final version OpenFrameworks and Touchdesigner. //file for the Touchdesigner is in the bin...
8,824
2,741
/* Copyright (c) 2019-2022 Hans-Kristian Arntzen for Valve Corporation * * SPDX-License-Identifier: MIT * * 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 ...
46,277
17,852
// Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include <cassert> #include <cmath> #include <cstdint> #include <limits> #include <random> #pragma warning(disable : 4984) // if constexpr is a C++17 language extension #ifdef __clang__ #pragma clang diagnost...
2,694
973
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_ProjDragonFireBall_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //---------------------------------------------------...
850
266
//FileName: ViewModel.cpp //Programmer: Dan Cliburn, Cody Balos //Date: 11/15/2015 //Purpose: Define the methods for the World ViewModel class. //The Init() method needs to set up OpenGL and GLEW and prepare all objects (and their shaders) to be rendered. //The Draw() method positions and renders all objects in the...
12,519
4,792
/* BSD 3-Clause License Copyright (c) 2022, SudoCpp 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,...
3,156
1,013
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Layouts module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding val...
4,770
1,564
#include "j1EntityElementsScene.h" #include "Soldier.h" #include "j1Item.h" #include "j1Player.h" #include "j1DynamicObjects.h" #include "j1Scene.h" #include "j1App.h" #include "j1Input.h" #include "p2Log.h" #include "Geodude.h" #include "Sudowoodo.h" #include "Golem.h" #include "PokeTrainer.h" #include "j1Textures.h" ...
13,690
5,579
extern "C" { #include "../pla.h" } #include <gtest/gtest.h> #include <iostream> class Linear_Algebra_Scale_ : public testing::Test { void SetUp() {} void TearDown() {} public: const float tolerance = 0.00000001f; mat2x2 Mat2_zero {{0,0},{0,0}}; mat3x3 Mat3_zero {{0,0,0},{0,0,0},{0,0,0}}; ma...
11,923
6,037
#include "plotNormal.h" PlotNormal::PlotNormal(DataFactory* tdata,BamData* tbdata,wxSize tcavanseSize,std::vector<bool>* tvector) :PlotBase(tdata,tbdata,tcavanseSize,tvector){ //posNulciedTable=new char[200];// //200ๆ˜ฏไธ€่กŒๆŸ“่‰ฒไฝ“ๅฏ่ƒฝ็š„ๆœ€ๅคš็š„ๆ•ฐ็›ฎ minHeight=3; } PlotNormal::~PlotNormal(){ } void PlotNormal::NucliedSi...
19,329
7,070
/* ----------------------------------------------------------------------------------- * * File CCShaderCache.cpp * Ported By Young-Hwan Mun * Contact xmsoft77@gmail.com * * ----------------------------------------------------------------------------------- * * ...
10,761
3,578
#ifndef SIMTOOLS_FACTORY_HPP #define SIMTOOLS_FACTORY_HPP #include <array> #include <vector> #include "simtools_config.hpp" #include "matrix.hpp" #include "tuple_math.hpp" namespace simtools::factory { template<dim_t N> constexpr inline matrix<N> make_matrix(std::vector<dim_t>::const_iterator it) { i...
1,165
430
/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * Copyright (C) 2000 Frederik Holljen (frederik.holljen@hig.no) * Copyright (C) 2001 Peter Kelly (pmk@post.com) * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) * Copyright (C) 2004, 2008 Apple Inc. All rights reserved. * * This library is free software...
2,283
742
#include <iostream> class Point { int x; int y; public: Point(int a, int b){ x = a; y = b;} //Point() = default; }; class NumberWrapper { int * ptr; public: NumberWrapper(int num): ptr(new int{num}){} ~NumberWrapper() { delete ptr; } //NumberWrapper(const NumberWrapper& w) = delete; }; ...
448
158
/* Project : Wolf Engine. Copyright(c) Pooya Eimandar (http://PooyaEimandar.com) . All rights reserved. Source : Please direct any bug to https://github.com/PooyaEimandar/Wolf.Engine/issues Website : http://WolfSource.io Name : main.cpp Description : This sample shows how to interact lua as script en...
2,185
746
#include <iostream> #include <string> #include <vector> #include <sstream> #include <algorithm> #include <map> #include <hash_map> #include <hash_set> #include <queue> using namespace std; class Solution { public: bool isPowerOfTwo(int n) { return (n > 0) && !(n & (n - 1)); } };
289
110
// 1436. ์˜ํ™”๊ฐ๋… ์ˆŒ // 2020.07.03 // ํƒ์ƒ‰ #include<iostream> using namespace std; bool check(int num) { while (num != 0) { if (num % 1000 == 666) { return true; } num /= 10; } return false; } int main() { int num = 666; int cnt = 0; int n; bool fl...
570
246
#include "Globals.h" #include "Application.h" #include "ModulePlayer.h" #include "ModuleTextures.h" #include "ModulePhysics.h" #include "ModuleRender.h" #include "ModuleInput.h" #include "ModuleAudio.h" #include "ModuleSceneIntro.h" ModulePlayer::ModulePlayer(Application* app, bool start_enabled) : Module(app, start_e...
2,064
863
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n, t, a; cin >> n >> t >> a; vector<int> h(n); rep(i, n) cin >> h[i]; int ans = 0; double mn = 1e9; rep(i, n) { double tem = t - h[i] * 0.006...
442
211
#include "tile.h" #include <gtest/gtest.h> #include <sstream> #include <stdexcept> namespace { class TileTest : public testing::Test { protected: _2048::Tile tile_0_; _2048::Tile tile_2_; _2048::Tile tile_2048_; void SetUp() override { tile_0_ = _2048::Tile(); tile_2_ = _2048::Tile(...
1,296
620
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2000-2001 Microsoft Corporation // // Module Name: // StandardInfo.cpp // // Description: // CStandardInfo implementation. // // Maintained By: // Galen Barbee (GalenB) 02-FEB-2000 // /////...
11,609
4,010
// P1422 ๅฐ็މๅฎถ็š„็”ต่ดน // https://www.luogu.org/problemnew/show/P1422 #include <iostream> using namespace std; int main(){ // Input Quantity int quantity; cin >> quantity; double price; // Calculate Price if(quantity <= 150) { price = quantity * 0.4463; } else if (quantity > 150 && quant...
595
273
#include "s3/mouse.hpp" #include <s3/window.hpp> namespace s3 { mouse::mouse(window& w) : m_window(w) { } glm::vec2 mouse::get_pos() { double xp, yp; glfwGetCursorPos(m_window.handle(), &xp, &yp); return glm::vec2(xp, yp); } mouse::state mouse::left_btn() { return (state)glfwGetMouseButton(m_window.handle(), ...
685
294
#include "types.h" /* * --INFO-- * Address: ........ * Size: 00009C */ void _Error(char*, ...) { // UNUSED FUNCTION } /* * --INFO-- * Address: ........ * Size: 0000F4 */ void _Print(char*, ...) { // UNUSED FUNCTION } /* * --INFO-- * Address: 80086CC4 * Size: 0002DC */ void Cylinder::get2dDist(Vector3f&...
90,237
58,746
#include <vector> #include <list> #include <iostream> using namespace std; class MinStack { public: /** initialize your data structure here. */ MinStack() { _M_val = new list<int>(); _M_min_val = new list<int>(); } ~MinStack() { delete _M_val; _M_val = ...
1,562
566
#include "dialoglogenter.h" #include "ui_dialoglogenter.h" #include "dialogreg.h" #include "ui_dialogreg.h" #include "ui_mainwindow.h" #include "mainwindow.h" DialogLogEnter::DialogLogEnter(QWidget *parent) : QDialog(parent), ui(new Ui::DialogLogEnter) { ui->setupUi(this); connect(ui->p...
1,545
589
// // Created by xuche on 2020/4/27. // #ifndef PROGRAMSTUDY_LEETCODE_872_LEAF_SIMILIAR_TREES_HPP #define PROGRAMSTUDY_LEETCODE_872_LEAF_SIMILIAR_TREES_HPP #include "../SourceCode/structs.hpp" #include "vector" using namespace std; vector<int> v1; void goDeeper(TreeNode* root){ if(!root) return; if(root->le...
673
305
//--------------- svmPropertyPlotXY.cpp ----------------------- //----------------------------------------------------------- #include "precHeader.h" //----------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include "svmPropertyPlotXY.h" #include "macro_utils.h" #include "PLi...
11,999
4,830
// -*- C++ -*- // Copyright (C) Dmitry Igrishin // For conditions of distribution and use, see files LICENSE.txt or pgfe.hpp #ifndef DMITIGR_PGFE_SQL_STRING_HPP #define DMITIGR_PGFE_SQL_STRING_HPP #include "dmitigr/pgfe/basics.hpp" #include "dmitigr/pgfe/dll.hpp" #include "dmitigr/pgfe/parameterizable.hpp" #include ...
8,278
2,541
#ifndef CPP_PROJECT_COMMON_TIME_UTILS_H #define CPP_PROJECT_COMMON_TIME_UTILS_H #include <chrono> #include <functional> namespace cpp_project::common { template<typename precision = std::chrono::microseconds, typename clock = std::chrono::high_resolution_clock> precision time_since(const typename clock::tim...
742
248
/** * @file FrgCommon.hpp * @author Finn Lasse Buessen * @brief Hub for central objects in pf-FRG calculations. * * @copyright Copyright (c) 2020 */ #pragma once #include "FrequencyDiscretization.hpp" #include "CutoffDiscretization.hpp" #include "Lattice.hpp" /** * @brief Hub for central objects in pf-FRG ca...
1,251
433
void baz(bool); void foo(bool t) { if (t) baz(t); }
59
30
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Charts module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:GPL$ ** Commercial License Usage ** Licensees holding valid comme...
4,888
1,564
/////////////////////////////////////////////////////////////////////////////// // This source file is part of Hect. // // Copyright (c) 2016 Colin Hill // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal ...
4,469
1,492
/* * Observer.cpp */ #include <time.h> #include <boost/regex.hpp> #include "Observer.h" Observer::Observer(std::string name, SDPReceiver *receiver) : pc_(new PC(name)), name_(name), receiver_(receiver) { this->init(); } Observer::~Observer() { } void Observer::wait() { m_Thread_.join(); } void Observer::init...
3,018
1,178
#ifndef __YUGONG_DEBUG__ #define __YUGONG_DEBUG__ #include <cstdio> #define YG_DEBUG #ifdef YG_DEBUG #define yg_debug(fmt, ...) fprintf(stdout, "YG DEBUG [%s:%d:%s] " fmt,\ __FILE__, __LINE__, __func__, ## __VA_ARGS__) #else #define yg_debug(fmt, ...) #endif // YG_DEBUG #endif // __YUGONG_DEBUG__
310
135
/* Copyright (c) 2009-10 Qtrac Ltd. All rights reserved. This program or module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later v...
4,486
1,681
//=--ABounds.cpp--------------------------------------------------*- C++-*-===// // // 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 // //===---------------------------...
5,335
1,742
#include "filtertool.h" #include "gaussianblur.h" #include "boxblur.h" #include <QtMath> #include <QtConcurrent/QtConcurrent> #include <QFutureSynchronizer> QImage FilterTool::splot(QImage &img, FILTER choose, Matrix userKernel) { Matrix kernel; QImage res; switch (choose) { case LAPLACE_FILTER: ...
5,256
1,856
#ifndef __TOKENIZATION_PROVIDER_HH__ #define __TOKENIZATION_PROVIDER_HH__ #include "token/crypto/base.hh" #include "token/crypto/encryption_key.hh" #include "token/crypto/hmac_key.hh" #include <boost/program_options.hpp> #include <map> #include <memory> #include <string> namespace token { namespace crypto { /*...
2,388
672
// Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published ...
1,240
447
#include "SerialVariables.h" // Initialize class variables Mode Serial_Variables::mode = ModeNormal; HardwareSerial* Serial_Variables::hardwareSerial; SoftwareSerial* Serial_Variables::softwareSerial; char Serial_Variables::assigner = '='; bool Serial_Variables::verbose = false; uint8_t Serial_Variables::numb...
6,520
2,176
/* privacyListWindow Copyright (c) 2008 by Rustam Chakin <qutim.develop@gmail.com> *************************************************************************** * * * This program is free software; you can redistribute it and/or modify...
4,946
1,741
#include "device.h" #include <cstdint> enum gpioPullMode : uint8_t { GPIO_PULL_OFF, GPIO_PULL_UP, GPIO_PULL_DOWN }; enum gpioDirection : uint8_t { GPIO_DIRECTION_OFF, GPIO_DIRECTION_IN, GPIO_DIRECTION_OUT }; enum gpioPort : uint8_t { GPIO_PORTA = 0, GPIO_PORTB = 1, GPIO_PORTC = 2, GPIO_PORTD = 3, GPIO_PORTE = 4 }; enu...
2,957
1,316
/* This file is part of CAUS. Copyright (c) 2019 by Breno Viana CAUS is a free software; you can redistribute it and/or modify it under the terms of the MIT License. */ #ifndef __CAUS_SIMULATOR_HPP__ #define __CAUS_SIMULATOR_HPP__ #include <iostream> #include <memory> #include <random> #include <string> #in...
1,657
561
// 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! // This file has been generated from the Jinja2 template in // third_part...
8,757
2,522
// // Copyright yutopp 2013 - . // // 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 RILL_SYNTAX_ANALYSIS_MAKE_SYNTAX_TREE_HPP #define RILL_SYNTAX_ANALYSIS_MAKE_SYNTAX_TREE_HPP #include "../ast/ast.hpp...
579
244
#include "loottableeditordock.h" #include "ui_loottableeditordock.h" #include "mainwindow.h" #include "loottablepool.h" #include "loottablefunction.h" #include "globalhelpers.h" #include <QDebug> #include <QJsonArray> #include <QAction> #include <QItemSelection> #include <QJsonDocument> #include <QListView> LootTabl...
3,706
1,188
#include <iostream> #include <vector> using namespace std; int min(int a, int b) { return a < b ? a : b; } int main() { int cap; cout << "Enter bucket capacity: "; cin >> cap; int bw; cout << "Enter output bandwidth: "; cin >> bw; int time; cout << "Enter burst time: "; cin >> time; vector<int> in(time...
992
460
#include <ThreadPool.h> namespace ladder { ThreadPool::ThreadPool(size_t capacity) : capacity_(capacity), stopped_(false) { Init(); } void ThreadPool::Init() { for (size_t i = 0; i < capacity_; ++i) threads_.emplace_back(std::thread([this]() { Callback cur_task; while (1) { { st...
1,117
381
#include <cstdio> #include "TempPrivKeyFile.h" TempPrivKeyFile::TempPrivKeyFile() : fileName(std::tmpnam(nullptr)), file(fileName, "w") { file << "-----BEGIN EC PARAMETERS-----" << '\n'; file << "BggqhkjOPQMBBw==" << '\n'; file << "-----END EC PARAMETERS-----" << '\n'; file << "-----BEGIN EC PRIVATE K...
693
351
#pragma once #include "PhysicsEngineMath.hpp" #include "RigidBody.hpp" namespace PhysicsEngine { extern const phyflt MINIMUM_NATURAL_LENGTH; // These constraints are treated as having no mass or volume, and cannot collide with any objects class Constraint { public: Constraint(); Constraint(RigidBody* _a, Rig...
1,449
614
/* * Copyright (C) 2016-2021 Intel Corporation. * SPDX-License-Identifier: MIT */ #include <assert.h> #include <iostream> #include <fstream> #include "pin.H" using std::cerr; using std::cout; using std::endl; using std::flush; using std::string; /* ===================================================================...
5,502
1,801
// Copyright (c) Lawrence Livermore National Security, LLC and other Conduit // Project developers. See top-level LICENSE AND COPYRIGHT files for dates and // other details. No copyright assignment is required to contribute to Conduit. //----------------------------------------------------------------------------- ///...
3,631
920
/**************************************************************************/ /** @file radial-stat.cpp produce annotated radial files Syntax: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ radial-stat input_file output_file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
3,896
1,214
#include "reconstruction.h" #include "simulation.h" #include <Eigen/Core> #include <atomic> #include <chrono> #include <igl/opengl/glfw/Viewer.h> #include <igl/writeOBJ.h> #include <iostream> #include <random> #include <thread> #include <atomic> #include <mutex> #include <condition_variable> #include <sstream> double r...
10,072
3,840
/* * Copyright (c) 2014-2015, Hewlett-Packard Development Company, LP. * 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 of the License, or (at your option) * any later versi...
5,363
1,907
// Implementation of distributed control related functions #include "dist_control.h" /*-------Variable definition--------*/ // LDR calibration const float m[3] = {-0.67, -0.72, -0.718}; // LDR calibration float b[3] = {1.763, 1.763, 1.763}; // LDR calibration float k[3] = {0.0, 0.0, 0.0}; // Gains // Control related...
11,529
4,540
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include "json.hpp" #include "../simple_http.hpp" using namespace SimpleHttp; // TODO: Replace these with custom Catch2 matcher static void CHECK_SUCCESS_STATUS(const HttpResult &result, const HttpStatusCode &statusCode) { result.template match<void>( [](const H...
7,859
2,415
/* * Copyright (C) 2020 Centre National d'Etudes Spatiales (CNES) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
7,547
1,778
// SPDX-License-Identifier: Apache-2.0 /** * Copyright (C) 2020 Jijoong Moon <jijoong.moon@samsung.com> * * @file lstm.cpp * @date 17 March 2021 * @brief This is Long Short-Term Memory Layer Class of Neural Network * @see https://github.com/nnstreamer/nntrainer * @author Jijoong Moon <jijoong.moon@samsun...
33,371
11,537
#define CATCH_CONFIG_MAIN #include "Catch/single_include/catch2/catch.hpp" #include "sgpl/operations/actions/TerminateIf.hpp" TEST_CASE("Test TerminateIf") { // TODO flesh out stub test sgpl::TerminateIf{}; }
217
82
#include "XmlRpc.h" using namespace Upp; void Compute(XmlRpcData& rpc) { int n1, n2; String op; rpc >> n1 >> op >> n2; DUMP(n1); DUMP(op); DUMP(n2); switch(*op) { case '+': rpc << n1 + n2; break; case '-': rpc << n1 - n2; break; } } struct TestMap { String a; int b; ...
1,781
905
//||||||||||||||||||||||||||||||||||||||||||||||| #ifndef OGRE_FRAMEWORK_HPP #define OGRE_FRAMEWORK_HPP //||||||||||||||||||||||||||||||||||||||||||||||| #include <OgreCamera.h> #include <OgreEntity.h> #include <OgreLogManager.h> #include <OgreOverlay.h> #include <OgreOverlayElement.h> #include <OgreOverlayManager.h...
1,782
767
/* The MIT License (MIT) Copyright (c) 2018 James Boer 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...
2,932
1,075
#ifndef GEAROENIX_CORE_ALLOCATOR_HPP #define GEAROENIX_CORE_ALLOCATOR_HPP #include "gx-cr-static.hpp" #include <map> #include <memory> #include <optional> namespace gearoenix::core { class Allocator final { /// size, offset (within itself) typedef std::pair<std::size_t, std::size_t> SizeOffset; /// allocat...
1,443
530
#include<bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) #define endl "\n" #define ll long long #define PI 3.1415926535897932384626 #define deb(x) cout << #x << " = " << x << endl; #define deb2(x, y) cout <...
1,514
681
#if defined(LOCAL) // #define RANDOM_TEST #define PROBLEM_NAME "F" const double _max_double_error = 1e-9; #include "testutils.h" #endif #include <bits/stdc++.h> using namespace std; using vi = vector<int>; using vvi = vector<vi>; using ii = pair<int,int>; using vii = vector<ii>; using l = long long; using vl = vector...
3,699
1,647
#include "ScriptSystem.h" #include "World/Components.h" #include "Script/ScriptLib_Core.h" #include "Mod/ModLoader.h" void ScriptSystem::OnScriptUpdated(entt::registry& r, entt::entity e) { auto& scriptAsset = r.get<Script>(e).Asset; if (!scriptAsset.IsValid()) { return; } std::string scriptPath = "Mods/"; s...
1,299
503
//ๆญคๆบ็ ่ขซๆธ…ๅŽๅญฆ็ฅžๅฐนๆˆๅคง้ญ”็Ž‹ไธ“ไธš็ฟป่ฏ‘ๅˆ†ๆžๅนถไฟฎๆ”น //ๅฐนๆˆQQ77025077 //ๅฐนๆˆๅพฎไฟก18510341407 //ๅฐนๆˆๆ‰€ๅœจQQ็พค721929980 //ๅฐนๆˆ้‚ฎ็ฎฑ yinc13@mails.tsinghua.edu.cn //ๅฐนๆˆๆฏ•ไธšไบŽๆธ…ๅŽๅคงๅญฆ,ๅพฎ่ฝฏๅŒบๅ—้“พ้ข†ๅŸŸๅ…จ็ƒๆœ€ๆœ‰ไปทๅ€ผไธ“ๅฎถ //https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 //โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” /* ...
1,910
1,152
#include<iostream> #include<string> #include<algorithm> #include<set> void test_case() { int n; cin>>n; vector<string>they(n); for(int i=0;i<n;i++) { cin>>they(i); string moves; for(int pos=0;true;pos++) { set<int>chars; for(string s:they) { chars.insert[s[pos%s.length()]]; } If(...
860
468
#include <iostream> #include <math.h> using namespace std; int main() { float x, y, znamSum, chislSum, i, j, k, n, m; cout << "n= "; cin >> n; cout << "m= "; cin >> m; cout << "x= "; cin >> x; y = 0; znamSum = 0; chislSum = 0; for(i=1;i<=n;i++) { for(j=1;j<=m;j++...
575
256
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
5,765
2,181
/* Remove element from an array -in place and return the length of the resultant array */ #include "headers.h" class Solution { public: int removeElement(vector<int>& nums, int val) { int index = 0; for(int i=0; i < nums.size(); i++) { if(nums[i] != val) ...
807
280
/* * Message.cpp * * Created on: 07/11/2013 * Author: Wendell */ #include <message.h> namespace ayvu { Message::Message() { m_header.timestamp = 0; m_header.sequence = 0; m_data = new QByteArray(); m_receive_timestamp = 0; } Message::Message(QByteArray& data, qint64 seq) { m_header.timestamp = QDat...
1,797
699
#include <gtest/gtest.h> #include <carl/core/VariablePool.h> #include <carl/core/UnivariatePolynomial.h> #include <carl/core/polynomialfunctions/Chebyshev.h> #include <carl/core/polynomialfunctions/RootBounds.h> #include "../Common.h" using UPoly = carl::UnivariatePolynomial<Rational>; template<typename T> class R...
1,514
669
class Solution { public: vector<vector<int>> generateMatrix(int n) { vector<vector<int>> arr(n, vector<int>(n)); int dir = 0, rowStart = 0, rowEnd = n - 1, colStart = 0, colEnd = n - 1, num = 1; while (rowStart <= rowEnd && colStart <= colEnd) { if (dir == 0) { for (int j = colStart; j <= colEnd; ++j) { ...
780
394
#include<string> #include<memory> #include<iostream> int main() { int n(2); std::allocator<std::string> s_m; auto const p = s_m.allocate(n); std::string s; auto q = p; while (std::cin >> s && q != p + n) { s_m.construct(q++, s); } const size_t size = q - p; while (q != p) { s_m.destroy(--q); } s_m.d...
338
165
//===- llvm/unittest/Bitcode/NaClAbbrevErrorTests.cpp ---------------------===// // Tests parser for PNaCl bitcode instructions. // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===---...
4,022
1,598