text
string
size
int64
token_count
int64
#include "/home/zhoushuxin/gem5/build/X86/mem/ruby/system/VIPERCoalescer.hh"
77
37
#include "question1.h" bool test_config() { return true; } double get_kinetic_energy(double mass, double velocity) { double kineticEnergy; kineticEnergy = 0.5 * mass * velocity * velocity; return kineticEnergy; }
239
87
#include <QtWidgets> #include <QVector> #include <QDebug> #include "vedit.h" #include "vnote.h" #include "vconfigmanager.h" #include "vtableofcontent.h" #include "utils/vutils.h" #include "utils/veditutils.h" #include "utils/vmetawordmanager.h" #include "veditoperations.h" #include "vedittab.h" #include "dialog/vinsert...
40,892
12,197
/*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * h...
5,812
2,123
//==========================================================================; // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR // PURPOSE. ...
34,267
11,966
#include "Si7006.h" #include <WireUtil.h> int Si7006::configure(Resolution res, bool enable_heater, HeaterPower heater_power) { if(WireUtil::writeRegister(kSi7006Addr, kSi7006RegWriteUserRegister1, kSi7006UserRegister1Default | uint8_t(res) | uint8_t(enable_heater ? HeaterEnable::kEnable : HeaterEnable::kDisable)) ...
1,015
451
#include "sock.h" #ifdef GLib_UNIX class TSocketTimer : public TTTimer { private: int SockId; public: TSocketTimer(const int TimeOut, /*PSock &_Socket*/ const int _SockId) : TTTimer(TimeOut), SockId(_SockId) {} ~TSocketTimer() {} void OnTimeOut(); }; #endif ///////////////////////////////////////////////// //...
52,096
21,461
#include "drape/oglcontextfactory.hpp" namespace dp { ThreadSafeFactory::ThreadSafeFactory(OGLContextFactory * factory) : m_factory(factory) { } ThreadSafeFactory::~ThreadSafeFactory() { delete m_factory; } OGLContext *ThreadSafeFactory::getDrawContext() { threads::MutexGuard lock(m_mutex); return m_factory...
511
179
#define STB_IMAGE_IMPLEMENTATION #include <stb_image.h> #include "Texture.hpp" #include <string> unsigned char * Vermilion::Core::loadTextureData(const std::string& path, size_t * width, size_t * height, size_t * channels){ *width = 0; *height = 0; *channels = 4; Vermilion::Core::flipLoading(); ret...
576
217
/* ADT AVL Tree www.geeksforgeeks.org */ #include<stdio.h> #include<stdlib.h> // An AVL tree node struct Node { int key; struct Node *left; struct Node *right; int height; int texture; }; // A utility function to get maximum of two integers int max(int a, int b); // A utility f...
4,093
1,465
/* * CPianoKeyboard (CPianoKeyboard.cpp) * MobiTracker * * Created by Marcin Skoczylas on 09-11-26. * Copyright 2009 Marcin Skoczylas. All rights reserved. * */ #include "CPianoKeyboard.h" #include "VID_Main.h" #include "CGuiMain.h" #include "CLayoutParameter.h" #define OCT_NAME_FONT_SIZE_X 8.0 #define OCT...
11,255
4,826
#ifndef SPRITE_HPP_ #define SPRITE_HPP_ #include <string> #include <SDL2/SDL.h> #include <SDL2/SDL_pixels.h> #include <SDL2/SDL_image.h> #include "window/Window.hpp" #include "entity/Entity.hpp" class Sprite : public Entity { public: Sprite(std::string id, std::string spritePath, Window *window, int x, in...
1,340
458
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2022 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
7,804
2,453
//-------------------------------------------------------------------------- // Copyright (C) 2014-2018 Cisco and/or its affiliates. All rights reserved. // Copyright (C) 2002-2013 Sourcefire, Inc. // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public...
9,151
3,102
// AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from interface_inheritance.djinni #include "NativeInterfaceEncapsulator.hpp" // my header #include "NativeBaseCppInterfaceInheritance.hpp" #include "NativeBaseObjcJavaInterfaceInheritance.hpp" #include "NativeSubObjcJavaInterfaceInheritance.hpp" ...
4,916
1,778
#pragma once #include <QtWidgets/qwidget.h> #include <QtCore/qtimer.h> #include <RTTI/RTTI.hpp> #include <Utils/Logger.hpp> using namespace Poly; // This is base class for all controls for core types such as int, string or vector. // @see Poly::RTTI::eCorePropertyType class IControlBase { public: // Assigns given ...
837
264
#include <CQPropertyViewTree.h> #include <CQPropertyViewFilter.h> #include <CQPropertyViewModel.h> #include <CQPropertyViewDelegate.h> #include <CQPropertyViewItem.h> #include <CQHeaderView.h> #include <QApplication> #include <QHeaderView> #include <QMouseEvent> #include <QClipboard> #include <QMenu> #include <set> #i...
21,384
7,739
#include <iostream> #include <bits/stdc++.h> using namespace std; long long int n, temp; int main() { cin>>n; if(n<10 && n>0) { cout<<n<<endl; } else if(n>9 && n<190) { n=n-9; temp=n%2; n=9+n/2; if(temp==0) { cout<<n%10<<endl; } ...
755
303
#include <string> #include "format.h" using std::string; // INPUT: Long int measuring seconds // OUTPUT: HH:MM:SS string Format::ElapsedTime(long seconds) { string format; long minutes = seconds / 60; long hours = minutes / 60; long h = hours;// (hours % 24) ; string hs = (h < 10) ? "0" + std::to...
606
251
#ifndef luacxx_QLocalServer_INCLUDED #define luacxx_QLocalServer_INCLUDED #include "../stack.hpp" #include "../enum.hpp" #include <QLocalServer> #include "../Qt5Core/QObject.hpp" // http://qt-project.org/doc/qt-5/qlocalserver.html#details LUA_METATABLE_INHERIT(QLocalServer, QObject) LUA_METATABLE_ENUM(QLocalServer...
443
188
// Copyright (c) 2007 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL$ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Laurent Rineau #include <iostream> #include <string> #include <vector> #include...
6,164
2,240
#ifndef OBJTOOLS_FORMAT___FTABLE_FORMATTER__HPP #define OBJTOOLS_FORMAT___FTABLE_FORMATTER__HPP /* $Id: ftable_formatter.hpp 103491 2007-05-04 17:18:18Z kazimird $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National...
2,378
737
#include <mart-common/experimental/Optional.h>
46
15
#include "renderer.h" Renderer::Renderer(ID3D11Device *direct3DDevice, const std::wstring &defaultFontFamily) : direct3DDevice(direct3DDevice), immediateContext(nullptr), inputLayout(nullptr), vertexShader(nullptr), pixelShader(nullptr), fontFactory(nullptr), fontWrapper(nullptr), defaultFontFamily(d...
11,362
4,550
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> using namespace std; const int di[] = { -1, 0, 1, 0 }; const int dj[] = { 0, 1, 0, -1 }; string dir = "NESW"; int getDir(char c) { return dir.find(c);...
2,276
995
#include <iostream> #include <vector> int passingCars(std::vector<int> & someVec) { if(someVec.size() == 1) return 0; int counter = 0, result = 0; for(int i = someVec.size() - 1; i >= 0; i--) if(someVec[i] == 1) counter++; else if(someVec[i] == 0) { result += counter; if(result > 1000000000) r...
475
240
// // chorusmodel.cpp // MDStudio // // Created by Daniel Cliche on 2017-05-08. // Copyright © 2017-2020 Daniel Cliche. All rights reserved. // #include "chorusmodel.h" #define _USE_MATH_DEFINES #include <math.h> #include <stdio.h> #include <string.h> #define GRAPH_SAMPLE_RATE 44100 #define ROUND(n) ((int)((floa...
5,668
2,011
// This code is part of the project "Experimental Analysis of Space-Bounded // Schedulers", presented at Symposium on Parallelism in Algorithms and // Architectures, 2014. // Copyright (c) 2014 Harsha Vardhan Simhadri, Guy Blelloch, Phillip Gibbons, // Jeremy Fineman, Aapo Kyrola. // // Permission is hereby granted, fr...
14,190
5,718
#pragma once #ifndef TILE_DATABASE_HEADER #define TILE_DATABASE_HEADER extern const tileInfo_t tileID[]; #endif // TILE_DATABASE_HEADER
144
64
#if defined(__ICC) #include <stdio.h> int main(int, char **){ printf(__FILE__ " Icc (through version 18) doesn't fully support gcc's 'vector' extensions."); return 0; } #else #pragma GCC diagnostic ignored "-Wunknown-warning-option" #pragma GCC diagnostic ignored "-Wpsabi" // see comments in simd_threefry.hpp #...
3,619
1,579
#include "Index.h" Index::Index(std::string new_name, std::string new_table_name, std::string new_attr_name, attr_type new_type): name(new_name), table_name(new_table_name), attr_name(new_attr_name), type(new_type) { } Index::~Index() { }
244
98
static const char RCS_Id[]="$Id: solarmail.cxx,v 1.1 2007/05/15 15:47:29 edz Exp $"; /* ######################################################################## Usenet News Folder Doctype Basis Systeme netzwerk Brecherspitzstr. 8 D-81541 Munich, Germany File: sunfolder.cxx Description: Cl...
1,462
558
// Copyright 2015-2020 Tier IV, Inc. 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 app...
4,163
1,406
#pragma once #include <iostream> #include <string> struct Resource { virtual ~Resource() = default; virtual void print() const = 0; }; struct File : Resource { std::string_view filename; virtual void print() const override { std::cout << __PRETTY_FUNCTION__ << std::endl; }; };
293
92
/*NEXUS IRC session BNC, by Subsentient. This software is public domain.*/ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <ctype.h> #ifdef WIN #include <winsock2.h> #else #include <fcntl.h> #endif #include <list> #include <string> #incl...
15,115
5,771
//segédfgv length_help(L,N) = N+L hossza, N-ben tárolom az addigi elemek számát int length_help(list l, int n){ if(nil == l) return n; return length_help(tl(l), n+1); } //length(L) = L lista hossza int list_length(list l){ return length_help(l, 0); } //insert_nth(L,N,E) L lista olyan másolata, amelyben ...
3,491
1,551
namespace RTCLI { namespace System { // ******************* Managed<T> *************************// template<typename T> RTCLI_FORCEINLINE Managed<T>::operator const T&() const RTCLI_NOEXCEPT { if(!object) { return null; } return *static_cast<const T*>(object...
1,955
664
#include "xi/core/resumable.h" #include "xi/core/abstract_worker.h" namespace xi { namespace core { namespace v2 { thread_local resumable_stat RESUMABLE_STAT; } void resumable::attach_executor(abstract_worker* e) { _worker = e; } void resumable::detach_executor(abstract_worker* e) { assert(_wor...
862
337
// Xiaoyan Wang 9/8/2016 #include <iostream> // #include <vector> using namespace std; // arry stores 0, 9^1, 9^2 ... 9^8 int arry[] = {1, 9, 81, 729, 6561, 59049, 531441, 4782969, 43046721/*, 387420489*/}; // input range: 1 to 10^10 int main() { ios::sync_with_stdio(false); int n; while(cin >> n && n) { int res...
555
308
#include <boost/geometry/formulas/thomas_inverse.hpp>
54
20
#include <include/DomainSocketsTransport.h> #include <include/TcpTransport.h> #include <include/SharedMemoryTransport.h> #include "include/RdmaTransport.h" #include <array> #include <vector> #include <thread> #include "util/bench.h" #include "util/ycsb.h" #include "util/Random32.h" #include "util/doNotOptimize.h" usin...
4,001
1,262
// --------------------------------------------------------------- // server.cpp // // multi-threaded router server done right ! // // // -> ROUTER socket -> main-thread -> in-proc socket -> delegate to worker // /* * ON MULTITHREADING WITH ZeroMQ * * Remember: * * Do not use or close sockets except ...
7,410
2,229
// This code is based on Jet framework. // Copyright (c) 2018 Doyub Kim // CubbyFlow is voxel-based fluid simulation engine for computer games. // Copyright (c) 2020 CubbyFlow Team // Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo // AI Part: Dongheon Cho, Minseo Kim // We are making my contributions/subm...
3,639
1,501
/* link: https://practice.geeksforgeeks.org/problems/alien-dictionary/1 sol: https://www.geeksforgeeks.org/given-sorted-dictionary-find-precedence-characters/ video: https://youtu.be/wMMwRK-w0r4 steps: 1. form graph from given words by comparing (as given they are sorted) 2. so form graph suc...
1,504
532
#pragma once #include "data/data_constants.hpp" namespace pgl { constexpr version_type api_version = 0; }
109
41
/*---------------------------------------------------------------------------------------- * Copyright (c) Jinan Tony Robotics Co., Ltd. All rights reserved. * Author: Sun Liang * 带权的二维地图路径搜索方法 *--------------------------------------------------------------------------------------*/ #include "AutoPolyLine.h" name...
14,146
6,869
// The MIT License (MIT) // Copyright (c) 2013-2016 Rapptz, ThePhD and contributors // 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 limitati...
11,933
4,719
// This file is part of libnosync library. See LICENSE file for license details. #include <algorithm> #include <chrono> #include <fcntl.h> #include <functional> #include <gtest/gtest.h> #include <memory> #include <nosync/ppoll-based-event-loop.h> #include <nosync/type-utils.h> #include <system_error> #include <vector> ...
5,453
1,990
/* * Copyright (c) 2016, 2017 ARM Limited. * * 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 without limitation the * r...
2,072
669
// Copyright (c) 2014-2015 Ryan Leckey, All Rights Reserved. // Distributed under the MIT License // See accompanying file LICENSE #include <algorithm> #include "arrow/pass/analyze-usage.hpp" #include "arrow/match.hpp" namespace arrow { namespace pass { void AnalyzeUsage::visit_conditional(ast::Conditional& x) { ...
719
258
/* Author: Stefano Di Paolo License: MIT, https://en.wikipedia.org/wiki/MIT_License Date: 2017-12-31 Library: IEC60063 series resistors. Sources repository: https://github.com/microentropie/ */ #include "E-series.h" const char E12Tolerance[] = "10%"; #define E12size 12 static const unsigned short ...
639
316
#include <bits/stdc++.h> #define D(x) cout << #x << " = " << x << endl; #define ios ios_base::sync_with_stdio(0), cin.tie(0); #define forn(i, n) for (int i = 0; i < (int)n; ++i) #define all(v) v.begin(), v.end() #define formap(map) for (const auto &[key, value] : map) #define ms(ar, val) memset(ar, val, sizeof ar) typ...
1,503
467
// // MainPage.xaml.cpp // Implementation of the MainPage class. // #include "pch.h" #include "MainPage.xaml.h" using namespace WheresMyElement; using namespace Platform; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Windows::UI::Xaml; using name...
1,700
500
#include <Rcpp.h> using namespace Rcpp; //This function returns the sign of a given real valued double. // [[Rcpp::export]] double signDblCPP (double x){ double ret = 0; if(x > 0){ret = 1;} if(x < 0){ret = -1;} return(ret); } //Tested to be 6x faster(37 us vs 207 us). This operation is done from 2...
2,035
744
#include<iostream> #include<string> #include<algorithm> #include<cstring> #include<string.h> #include<math.h> #include<cmath> using namespace std; typedef long long int ll; class Point{ private : double x,y; public: Point(double a,double b) { x=a;y=b; } double Distance( Point const ...
604
293
// // LinearColorCalibrator.cpp // LEDColorCalibrator // // Created by Tomas Laurenzo on 4/20/13. // // #include "LinearColorCalibrator.h" LinearColorCalibrator::LinearColorCalibrator(){ gammaCorrecting = false; isCalculated = true; } void LinearColorCalibrator::useGamma() { gammaCorrecting = tr...
6,004
2,743
// Fill out your copyright notice in the Description page of Project Settings. #include "CBattlePC.h" #include "CBattleGM.h" #include "CPlayer.h" #include "CAirplane_C130.h" #include "CFlyingViewer.h" #include "CResult_Widget.h" #include "CClientMain_Widget.h" #include "CWorldMap_Widget.h" #include "Animation/WidgetAn...
5,756
2,222
/** * @file * @copyright defined in DA-DAPPS/LICENSE */ #pragma once #include <DA-DAPPSio/chain/block.hpp>
112
48
/* * Frame3D.cpp * * Created on: 15 Nov 2015 * Author: Morris Franken @ 3DUniversum */ #include <fstream> #include <sstream> #include <string> #include <vector> #include <iostream> #include <stdexcept> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgcodecs/imgcod...
5,677
2,146
#include "v110/export_class_110.h" #include "v141/export_class_141.h" #include "v142/derived_class_142.h" #include "v110_static/class_110.h" int main() { // stack object construction - destruction works well export_class_110 ec; // we cannot deallocate memory were allocated in another module // it seems like wron...
877
333
#include <imgui.h> #include <imgui_internal.h> #include <openvr.h> #include "../VR.hpp" #include "D3D11Component.hpp" #ifdef VERBOSE_D3D11 #define LOG_VERBOSE(...) spdlog::info(__VA_ARGS__) #else #define LOG_VERBOSE #endif namespace vrmod { vr::EVRCompositorError D3D11Component::on_frame(VR* vr) { if (m_left_ey...
14,624
5,126
//Language: MS C++ #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <map> #include <vector> #include <stack> #include <queue> #include <set> #include <cassert> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; typedef long long ll; type...
912
476
//################################################################################################## // // uart - userspace UART driver. // //################################################################################################## #include <stdio.h> #include <string.h> #include <assert.h> #include "sys_uti...
14,894
7,332
#include "staticimage.h" StaticImage::StaticImage() { } void StaticImage::inSertPicture(QString filePath,QGraphicsScene *parent) { QPixmap pixmap =QPixmap::fromImage(QImage(filePath)); this->setPixmap(pixmap); setFlag(QGraphicsItem::ItemIsMovable); }
319
109
#include "QuickClustering.h" #include "PMCSQS.h" #include "auxfun.h" // the sim matrix stores the similarity distances computed between clusters int num_sim_matrix_spectra = 0; unsigned char * sim_matrix = NULL; unsigned char * max_sim_addr = NULL; void print_byte(unsigned char byte) { int i; ...
1,522
636
#include "pch.hpp" #include "stmt.hpp" #include "db.hpp" #include "result_code.hpp" #include "sqlite.hpp" #include <cassert> #include <limits> namespace be::sqlite { /////////////////////////////////////////////////////////////////////////////// /// \brief Compiles the provided SQL query against the provided databas...
2,280
661
#ifndef CUST_DEBUG #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("unroll-loops") #endif #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ALL(x) x.begin(),x.end() #define PB ...
7,611
3,212
#include <boost/mpl/aux_/type_wrapper.hpp>
43
19
#include "Modules/UI/Macro Elements/Options_Graphics.h" #include "Modules/UI/Basic Elements/Slider.h" #include "Modules/UI/Basic Elements/SideList.h" #include "Modules/UI/Basic Elements/Toggle.h" #include "Engine.h" Options_Graphics::Options_Graphics(Engine& engine) : Options_Pane(engine) { // Title m_title->setTe...
7,932
2,999
// Copyright 2017-2020 The Verible Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law o...
3,951
1,408
#include <iostream> #include <unistd.h> #include <sys/stat.h> #include "utils.hpp" #include "Setting.hpp" #include <cstring> // for linux namespace utils { std::vector<char> read_file(std::string filename) { std::vector<char> buf; int fd; char* line; ...
9,450
3,224
#pragma once #include <texturize.hpp> #include <analysis.hpp> #include <codecs.hpp> #include <string> #include <iostream> namespace Texturize { /// \brief class TEXTURIZE_API EXRCodec : public ISampleCodec { public: virtual void load(const std::string& fileName, Sample& sample) const override; virtual vo...
604
197
#include<iostream> using namespace std; struct Node { int data; Node* link; }; //declated glboally struct Node * front = NULL; struct Node * rear = NULL; //Enqueue from front & Dequeue from rear both take O(1) time here. //Enqueue from rear void Enqueue(int x) { Node* temp = new Node(); temp->data...
1,757
559
#include <cassert> #include <sstream> #include <condition_variable> #include <deque> #include <iostream> #include <map> #include <mutex> #include <thread> #include <vector> #include <fstream> #include <streambuf> #include <atomic> #include <string.h> #include "loadgen.h" #include "query_sample_library.h" #include "sy...
34,117
11,929
#include "pwpch.h" #include "Renderer.h" #include "Renderer2D.h" namespace Paperworks { Unique<Renderer::SceneData> Renderer::s_SceneData = CreateUnique<Renderer::SceneData>(); void Renderer::Init() { RenderCmd::Init(); Renderer2D::Init(); } void Renderer::Shutdown() { Renderer2D::Shutdown(); } void...
1,004
402
#include "rcsCommandLib.h" #include <avr/wdt.h> int btEnableValue = 0; // bt chip enable voltage after restart //SoftwareSerial mySerial(rxPin, txPin); // RX, TX // wdt_enable(WDTO_15MS); #define soft_reset() \ do \ { \ wdt_enable(WDTO_15MS);...
5,343
2,153
#include <algorithm> #include <iostream> #include <iterator> #include <string> namespace { using It = std::string::const_iterator; // Helper for common_length(const std::string&, const std::string&). inline int common_length(const std::string& s, It t_first, const It& t_la...
1,212
401
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <memory> #include <type_traits> #include <utility> #include "base/bind.h" #include "base/callback.h" #include "base/command_line.h" #include "ba...
13,748
4,323
// // SDLJoystickInput.cpp // TetraTable // // Created by Ben La Monica on 3/23/15. // Copyright (c) 2015 Benjamin Alan La Monica. All rights reserved. // #include "SDLJoystickInput.hpp" #include "../util/SDLUtil.hpp" #include <syslog.h> #include <SDL2/SDL.h> #include "../util/TimeUtil.hpp" SDLJoystickInput::SDLJ...
2,817
975
#include "bmp.h" BMP::BMP(int _x, int _y, int _colorNumber) { x = _x; y = _y; colorNumber = _colorNumber; } int BMP::GetColorNumber(){ return colorNumber; } int BMP::GetX(){ return x; } int BMP::GetY(){ return y; } BMP::~BMP() { }
259
120
// IfeIfAnidado.cpp // Programa para saber si el numero introducido es par o impar utilizando un bucle if #include <iostream> #include <stdlib.h> int main() { int n; std::cout << "Introduce un numero: "; std::cin >> n; if(n%2 == 0) // Calculamos el residuo del numero al dividirlo entre 2. Si el residuo...
506
197
// MESSAGE SERIAL_UDB_EXTRA_F2_A support class #pragma once namespace mavlink { namespace matrixpilot { namespace msg { /** * @brief SERIAL_UDB_EXTRA_F2_A message * * Backwards compatible MAVLink version of SERIAL_UDB_EXTRA - F2: Format Part A */ struct SERIAL_UDB_EXTRA_F2_A : mavlink::Message { static const...
7,883
2,811
#include "fem_submesh.hpp" #include "exceptions.hpp" #include "constitutive/constitutive_model_factory.hpp" #include "geometry/projection.hpp" #include "interpolations/interpolation_factory.hpp" #include "material/material_property.hpp" #include "mesh/material_coordinates.hpp" #include "mesh/dof_allocator.hpp" #incl...
12,027
3,604
/////////////////////////////////////////////////////////////////////////////// // BSD 3-Clause License // // Copyright (c) 2019, Nefelus 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: //...
20,003
9,259
#ifndef STAN_LANG_AST_NODE_OMNI_IDX_DEF_HPP #define STAN_LANG_AST_NODE_OMNI_IDX_DEF_HPP #include <stan/lang/ast.hpp> namespace stan { namespace lang { omni_idx::omni_idx() { } } } #endif
212
105
/** * @file logging_test.cc * @author Bartek Kryza * @copyright (C) 2018 ACK CYFRONET AGH * @copyright This software is released under the MIT license cited in * 'LICENSE.txt' */ #include "helpers/logging.h" #include "testUtils.h" #include "boost/algorithm/string.hpp" #include <gtest/gtest.h> #include <sstream...
886
302
#include "InputHandler.h" static constexpr unsigned int MAX_KEYS = 1024; static constexpr unsigned int MAX_MOUSEBUTTONS = 32; static bool keys[MAX_KEYS] = {false}; static bool mousebuttons[MAX_MOUSEBUTTONS] = {false}; static int mouse_x; static int mouse_y; bool InputHandler::isKeyPressed(unsigned int key) { if...
1,144
388
/* * Copyright 2019 The Project Oak Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
2,745
857
#include <fluffy/api/context.hpp> #include <fluffy/api/modules.hpp> #include <fluffy/graphics/shader.hpp> #include <fluffy/graphics/texture.hpp> #include <fluffy/input/input.hpp> #include <fluffy/resources/resource_library.hpp> using namespace Fluffy; void ModuleRegistry::registerModule(BaseModule* module) { Modu...
1,991
555
#include "testall.h" #include "cworkplace.h" #include <iostream> #include "cworkerbuilder.h" #include "cluaworker.h" namespace KOT { void TestWorker() { std::cout << "===========TestWorker==========" << std::endl; CLuaWorkerBuilder builder; builder.SetWorkerPath("../script/test/"); // builder.AddEnvPa...
634
200
#include "precomp.h" #include "Game.h" using namespace std; CL_GraphicContext *Game::gc; string Game::winner; Game::Game(CL_DisplayWindow &window) { gc = &window.get_gc(); board = &Board::GetInstance(); startMessage = new string("Press [1] to start first, or\n\n\nPress [2] to start with computer"); whichPlayer[0]...
3,454
1,416
/** * Copyright (c) 2016 Xavier R. Guerin * * 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, p...
6,302
2,379
#pragma once #include "foundation/axis.SystemBase.hpp" #include "domain/fwd/numerical_model.hpp" #include "foundation/memory/RelativePointer.hpp" #include "Foundation/Axis.CommonLibrary.hpp" namespace axis { namespace domain { namespace analyses { class ModelOperatorFacade; /** * Implements a version of the numerica...
2,616
738
// 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 "core/css/cssom/CSSNumericValue.h" #include "bindings/core/v8/ExceptionState.h" #include "core/css/CSSPrimitiveValue.h" #include "core/css/cssom...
2,426
743
/*--------------------------------------------------------------------------- (c) 2004 Scorpio Software 19 Wittama Drive Glenmore Park Sydney NSW 2745 Australia ----------------------------------------------------------------------------- $Workfile:: ...
37,357
10,799
#include <iostream> #include <fstream> using namespace std; #include "address.h" #include "student.h" void generateStudentFile() { Student students[5]; for (int i = 0; i < 5; ++i) { students[i].name = NULL; readStudent(students[i]); } fstream file("students.dat...
1,654
579
#pragma once namespace thor { void initializeTimers(); void initTimerOnThisCpu(); } // namespace thor
105
32
#include <stdio.h> #include <sys/utsname.h> #include <string> #include <vector> #include <any> using namespace std; typedef unsigned short int ushort; void run(vector<string>); utsname getUname() { utsname uts; if (uname(&uts) < 0) throw "uname() failed"; return uts; } int main(int argc, char** ...
1,956
629
#include "gkpch.h" #include "Input.h" #include "Window.h" namespace Gecko { void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods); void cursor_position_callback(GLFWwindow *window, double xpos, double ypos); void mouse_button_callback(GLFWwindow *window, int button, int action,...
2,000
708
/****************************************************************************** Copyright (c) 2015 Teardrop Games 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 wit...
11,406
4,376