text
string
size
int64
token_count
int64
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> using namespace std; #define MAX_NUM_ 10000001 // 6bits = 1parity bit + 32 different offsets in the same int int P_[(MAX_NUM_>>6) + 1]; // negative logic...
3,083
1,275
/** * @file feature_variations.hpp * * @brief FeatureVariations の定義 * * @author myoukaku */ #ifndef BKSGE_CORE_FONT_OTF_FEATURE_VARIATIONS_HPP #define BKSGE_CORE_FONT_OTF_FEATURE_VARIATIONS_HPP #include <bksge/core/font/otf/read_big_endian.hpp> #include <bksge/core/font/otf/types.hpp> #include <bk...
3,941
1,624
#include "Game.hpp" #ifdef PPDEBUG #include <iostream> #endif ppGame::ppGame(){ this->mainWindow = NULL; this->renderer = NULL; this->graphics = NULL; this->backgroundColor = new ppColor(); this->gameInput = new ppInput(this); this->gameIO = new ppIO(); this->randomizer = new ppRandomizer(); this->ims = NULL...
16,020
6,808
/* * Copyright 2007 Google Inc. All Rights Reserved. * * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. * * ***** BEGIN LICENSE BLOCK ***** * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. ...
53,245
16,377
// LCPOperatorQL.cpp // // Breannan Smith // Last updated: 09/03/2015 #include "LCPOperatorQL.h" #include "ImpactOperatorUtilities.h" #include "scisim/Utilities.h" #include "scisim/Math/QL/QLUtilities.h" #include <iostream> #ifndef NDEBUG #include <typeinfo> #endif LCPOperatorQL::LCPOperatorQL( const scalar& eps )...
3,510
1,338
#include "stdafx.h" #include "GenotypeParser.h" #include <iostream> using namespace evc; using namespace evc::genotype_parser; using namespace std; genotype_parser::CGenotypeParser::CGenotypeParser() { m_pScan = new CGenotypeScanner(); m_IsTrace = false; m_IsErrorOccur = false; } genotype_parser::CGenotypePars...
13,909
6,563
#include "nWrappedVariantMap.h" #include "../util/nIODefines.h" #define nWRAPPED_VARIANT_MAP_VERSION 1 nWrappedVariantMap::nWrappedVariantMap(QObject *parent) : QObject(parent) { } nWrappedVariantMap::nWrappedVariantMap(QIODevice * device, QObject *parent) : QObject(parent) { load(device); } void nWra...
1,813
664
#include "matrix.h" using namespace std; Matrix::Matrix(string matrixName) { // logger.log("Matrix::Matrix"); this->sourceFileName = "../data/" + matrixName + ".csv"; this->matrixName = matrixName; } bool Matrix::load(){ // logger.log("Matrix::load"); fstream fin(this->sourceFileName, ios::in); ...
4,370
1,599
/* * If not stated otherwise in this file or this component's LICENSE file the * following copyright and licenses apply: * * Copyright 2020 RDK Management * * 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 cop...
2,706
863
#include <predef.hpp> template <class Iter, class T> Iter remove(Iter first, Iter last, const T& value) { for (auto iter = first; iter != last; ++iter) { if (*iter != value) *first++ = *iter; } return first; } int main() { std::string str = "hey, *****."; assert(std::stri...
434
149
#pragma once #ifndef OpacityFunctionGeneration_hxx #define OpacityFunctionGeneration_hxx template <typename TInputImage> OpacityFunctionGeneration<TInputImage>::OpacityFunctionGeneration(HistogramType::Pointer histogram, float *binWidth, float *binMinimum) { this->max_g = -100000; this->min_g = 100000; this->max_h ...
8,713
3,954
/* NMEA0183AISMsg.cpp Copyright (c) 2019 Ronnie Zeiller, www.zeiller.eu Based on the works of Timo Lappalainen NMEA2000 and NMEA0183 Library Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software withou...
8,868
3,564
#include <algorithm> #include <glm/common.hpp> #include "core/formations/Column.h" using namespace rharel::efficient_reformation::core; Column::Column(const unsigned int row_size, const glm::vec2& spacing) : row_size(std::max(row_size, 1u)), spacing(glm::max(spacing, glm::vec2(1, 1))) ...
2,156
669
#include "solve.hpp" #include <euler/digits.hpp> #include <range/v3/algorithm.hpp> #include <range/v3/view.hpp> using namespace ranges; using namespace euler; uint8_t family_size(Prime &primes, uint64_t prime, uint64_t digit) { auto is_prime = [&primes](uint64_t num) { return primes.check(num); }; // replace all ...
2,143
705
#include "HanoiTower.hpp" using namespace std; using namespace clever; HanoiTower::HanoiTower(HanoiTowerData const &data): d_(data), interrupt_(false) { pauselock_ = unique_lock<mutex>(pausemutex_, defer_lock); return; } HanoiTower::~HanoiTower() { free_(); return; } HanoiTower &HanoiTower::run(int ...
3,595
1,802
#include <chrono> #include <gtest/gtest.h> #include <sdeventplus/event.hpp> #include <sdeventplus/source/event.hpp> #include <sdeventplus/utility/future.hpp> #include <stdplus/util/future.hpp> #include <utility> namespace sdeventplus { namespace utility { namespace { using namespace std::chrono_literals; class CallW...
4,132
1,572
//#include "ModulePlayer_Legs.h" // //#include "Application.h" //#include "ModuleTextures.h" //#include "ModuleInput.h" //#include "ModuleRender.h" //#include "ModuleParticles.h" //#include "ModuleCollisions.h" //#include "ModuleAudio.h" //#include "ModuleFadeToBlack.h" // //#include "SDL/include/SDL_scancode.h" // // ...
5,447
2,657
#pragma once #include <time.h> #include "stdafx.h" #include "CUCT.h" #include "OthelloCBoard.h" #include "OXOCBoard.h" #include "GobangCBoard.h" void* CUCT::getCNode(const void *list, int index) { return ((CList<CNode*>*) list)->get(index); } void CUCT::exchangeCNode(const void *list, int i, int j) { CNode* m = (C...
4,133
1,728
/************************************************************* * > File Name : P1637.cpp * > Author : Tony * > Created Time : 2019/08/26 16:20:04 * > Algorithm : [DataStructure]BIT **************************************************************/ #include <bits/stdc++.h> using namespa...
1,670
765
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "AddContentDialogPCH.h" #include "FeaturePackContentSourceProvider.h" #include "FeaturePackContentSource.h" #include "ModuleManager.h" class FFillArrayDirectoryVisitor : public IPlatformFile::FDirectoryVisitor { public: virtual bool Visit(const ...
4,266
1,323
/* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. NVIDIA CORPORATION and its licensors retain all intellectual property and proprietary rights in and to this software, related documentation and any modifications thereto. Any use, reproduction, disclosure or distribution of this software and related docum...
1,362
460
#if !defined( _FILE_IO_ ) #define _FILE_IO_ #include "io.hxx" #include "hmem.hxx" #include "secrun.hxx" DECLARE_CLASS( FILE_IO ); class FILE_IO : public IO_OBJECT { public: NONVIRTUAL FILE_IO( ) { _file_handle = INVALID_HANDLE_VALUE; _buffer_size = 0; }; ...
1,422
498
CMap<int, int, CPoint, CPoint> myMap; // Add 10 elements to the map. for (int i = 0; i < 10; i++) myMap.SetAt(i, CPoint(i, i)); // Remove the elements with even key values. POSITION pos = myMap.GetStartPosition(); int nKey; CPoint pt; ...
766
252
#include <iostream> using namespace std; class Number { public: int n; void getNumber() { cin>>n; } }; class Square:public Number { public: void getSquare() { cout<<(n*n)<<endl; } }; class Cube:public Number { public: void getCube() { cout<<((n*n)*n)<<endl; ...
478
192
#include "34coins.hpp" #include <fstream> #include <vector> #include <string> using std::cout; std::string saveFile = "/.config/unity3d/noio/Kingdom/storage_v34_AUTO.dat"; std::string findCoins(const std::string &input) { auto sc = input.find(':', input.find("coins", input.find("lostCrown"))); auto ec = input.f...
2,038
784
#pragma once #include <boost/describe/enum.hpp> namespace profitview { BOOST_DEFINE_ENUM_CLASS(OrderType, Limit, Market) }
126
50
#ifndef __COMPOSITE_SCENE_ELEMENT__ #define __COMPOSITE_SCENE_ELEMENT__ #define CompositeSceneElementNull (CompositeSceneElement*)0 #include <SceneElement.hpp> #include <list> typedef std::list<SceneElement*>::iterator ElementsIterator; class CompositeSceneElement: public SceneElement { public: Composit...
560
172
/* * Automatically Generated from Mathematica. * Fri 5 Nov 2021 09:01:51 GMT-04:00 */ #ifndef J_SWING_TOE_LINEAR_VELOCITY_Z_RIGHTSTANCE_HH #define J_SWING_TOE_LINEAR_VELOCITY_Z_RIGHTSTANCE_HH namespace frost { namespace gen { void J_swing_toe_linear_velocity_z_RightStance(double *p_output1, const doubl...
394
176
//+-------------------------------------------------------------------------- // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1994 - 1996. // // File: editschd.cxx // // Contents: Task schedule page for hidden schedules // // Classes: CEditSchedPage // // History: 15-Mar...
15,898
5,327
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pii = pair<int, int>; #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define all(x) (x).begin(),(x).end() #define m0(x) memset(x,0,sizeof(x)) int dx4[4] = {1,0,-1,0}, dy4[4] = {0,1,0,-1}; int main(){ mu...
1,220
449
// Distributed under the BSD 2-Clause License - Copyright 2012-2021 Robin Degen #include <aeon/tracelog/tracelog.h> #include "context.h" namespace aeon::tracelog { namespace detail { [[nodiscard]] auto add_entry(const char *func) -> trace_log_entry * { return detail::trace_log_context::get_singleton().add_scope...
810
299
#ifndef INCLUDED_RCH #include "rch.h" #define INCLUDED_RCH #endif // Library headers. #ifndef INCLUDED_SSTREAM #include <sstream> #define INCLUDED_SSTREAM #endif #ifndef INCLUDED_IOSTREAM #include <iostream> #define INCLUDED_IOSTREAM #endif #ifndef INCLUDED_IOMANIP #include <iomanip> #define INCLUDED_IOMANIP #endif...
9,141
3,712
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // #include "net/quic/quic_write_blocked_list.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { namespace test { namespace { TEST(QuicWr...
4,426
1,465
/* * ktimer.cpp * * Created on: May 19, 2017 * Author: Paul */ #include "ktimer.hpp" #include "irq.hpp" #include "schd.hpp" #if defined(CONFIG_KTIMER_TICKLESS) && defined(CONFIG_KTIMER_TICKLESS_VERIFY) #include "tickless-verify.h" #endif namespace f9 { DECLARE_KTABLE(ktimer_event_t, ktimer_event_table, CO...
9,609
4,415
#include <iostream> #include <string> #include <vector> constexpr int INDEX = 30; constexpr int MONEY = 1000; namespace Program { struct Cashier { char nameCashier[INDEX], item[INDEX]; long double price, total, subTotalPrice, inputPrice; int input; }; class Cashier...
2,922
901
/* ************************************************ username : smmehrab fullname : s.m.mehrabul islam email : mehrab.24csedu.001@gmail.com institute : university of dhaka, bangladesh session : 2017-2018 ************************************************ */ #include<bits/stdc++.h> using namespa...
1,844
628
/* * Compute fib(0) + ... + fib(n) % 10. * * The key is that fib(0) + ... + fib(n) = fib(n+2) - 1. */ #include <iostream> #include "reuse_util.h" int main() { long num, ans; while (std::cin >> num) { ans = (fast_fib_mod(num+2, 10) + 9) % 10; std::cout << ans << std::endl; } }
299
146
// Copyright (c) 2012-2017 VideoStitch SAS // Copyright (c) 2018 stitchEm #include "../../../gpu/image/sampling.hpp" #include "../kernel.hpp" namespace { #include "sampling.xxd" } INDIRECT_REGISTER_OPENCL_PROGRAM(sampling, true); #define BLOCK_SIZE 16 namespace VideoStitch { namespace Image { /** * Subsample a ...
8,402
2,769
#include <bits/stdc++.h> using namespace std; unsigned long long N; int main () { while ( cin >> N && N != -1 ){ cout << ((N>0)? N-1 : 0) << '\n'; } return 0; } /* unsigned long long you dump bitch! input:- ----------- inline string ToString( int n ){ stringstream s; s << n; return s.str(); } int ToInt( ...
600
333
#include <cpplogger/cpplogger.h> #include <cstring> #include <ppltasks.h> #include <roapi.h> #include <robuffer.h> #include <wrl.h> #include "context.h" #include "util.h" #include "voiceinfo.h" using namespace Microsoft::WRL; using namespace Windows::Media::SpeechSynthesis; using namespace concurrency; using namespac...
2,451
847
/*========================================================================= Library: VesselView Copyright 2010 Kitware Inc. 28 Corporate Drive, Clifton Park, NY, 12065, USA. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the...
5,680
1,556
#include <ionWindow.h> #include <ionGraphics.h> #include <ionGraphicsGL.h> #include <ionScene.h> #include <ionApplication.h> using namespace ion; using namespace ion::Scene; using namespace ion::Graphics; int main() { //////////////////// // ionEngine Init // //////////////////// Log::AddDefa...
6,349
2,300
#include "stdafx.h" #include "RemoteExplorerServer.h" #include "ListenSocket.h" #include "ClientSocket.h" CListenSocket::CListenSocket() { } CListenSocket::~CListenSocket() { } void CListenSocket::OnAccept(int nErrorCode) { CClientSocket* clientSocket = new CClientSocket; if (Accept(*clientSocket)) { ...
5,092
1,835
/***************************************************************************** * Qwt Polar Examples - Copyright (C) 2008 Uwe Rathmann * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ #include "Plot.h" #include <QwtS...
9,159
3,057
// https://github.com/trevor-makes/uMon.git // Copyright (c) 2022 Trevor Makes #pragma once #include "z80/asm.hpp" #include "z80/dasm.hpp" #include "uCLI.hpp" namespace uMon { namespace z80 { template <typename API> bool parse_operand(Operand& op, uCLI::Tokens tokens) { // Handle indirect operand surronded by par...
3,058
1,194
// Based on https://github.com/RAKWireless/WisBlock/blob/master/examples/RAK4630/communications/LoRa/LoRaWAN/LoRaWAN_OTAA_ABP/LoRaWAN_OTAA_ABP.ino // Note: This program needs SX126x-Arduino Library version 2.0.0 or later. In platformio.ini, set... // lib_deps = beegee-tokyo/SX126x-Arduino@^2.0.0 /** * @file LoRaW...
9,919
4,287
/** * @file bit.hpp * * @brief bit の定義 * * @author myoukaku */ #ifndef BKSGE_FND_UNITS_BIT_HPP #define BKSGE_FND_UNITS_BIT_HPP #include <bksge/fnd/units/base_dimensions/information.hpp> #include <bksge/fnd/units/detail/quantity.hpp> #include <bksge/fnd/units/detail/si_prefix.hpp> #include <bksge/...
738
350
///////////////////////////////////////////////////////////////////////////// // Name: src/osx/carbon/nonownedwnd.cpp // Purpose: implementation of wxNonOwnedWindow // Author: Stefan Csomor // Created: 2008-03-24 // Copyright: (c) Stefan Csomor 2008 // Licence: wxWindows licence //////////////...
56,134
16,923
#ifndef UTRIG_MATRIX_HH #define UTRIG_MATRIX_HH /* Copyright (c) 2005-2015, Sylvain Ouellet 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...
4,636
1,835
// ************************************************************* // File: vk_image_barrier.cc // Author: Novoselov Anton @ 2020 // URL: https://github.com/ans-hub/gdm_framework // ************************************************************* #include "vk_image_barrier.h" #include "render/vk/vk_image.h" #inclu...
8,467
3,481
#include "priminitial.h" #include "ui_priminitial.h" #include "testfilegraph.h" #include "manualgraphscreen.h" #include "prim.h" int initialPrim = 0; int getInitialPrim(){ return initialPrim; } PrimInitial::PrimInitial(QWidget *parent) : QDialog(parent), ui(new Ui::PrimInitial) { ui->setupUi(this); ...
1,399
470
#include "details/http_service.h" #include <sstream> namespace { std::string GetLastWord(const std::string &input) { std::stringstream s(input); std::string last_word; while (!s.eof()) { std::string t; s >> t; if (!t.empty()) { last_word = std::move(t); } } return last_word; } } // na...
2,203
726
/* * Copyright (C) 1998,1999 Microsoft Corporation. All rights reserved. * */ #ifndef _IE4NODEFACTORY_HXX #define _IE4NODEFACTORY_HXX #ifndef _XML_OM_NODEDATANODEFACTORY #include "nodedatanodefactory.hxx" #endif class IE4NodeFactory : public _NDNodeFactory { public: // (De)Constructors IE4NodeFa...
1,637
655
// (c) Copyright 2008 Samuel Debionne. // // Distributed under the MIT Software License. (See accompanying file // license.txt) or copy at http://www.opensource.org/licenses/mit-license.php) // // See http://code.google.com/p/fsc-sdk/ for the library home page. // // $Revision: $ // $History: $ /// \fi...
1,040
417
// Copyright (c) Facebook, Inc. and its affiliates. // // This source code is licensed under the MIT license found in the // LICENSE.md file in the root directory of this source tree. #include <dispenso/detail/per_thread_info.h> namespace dispenso { namespace detail { PerThreadInfo& PerPoolPerThreadInfo::info() { ...
451
138
#include <QtPlugin> Q_IMPORT_PLUGIN(QQmlNativeDebugConnectorFactory)
69
28
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
6,915
3,289
#include "PostTagCribFile.hpp" #include "boost/format.hpp" using PostTagSystem::TagState; PostTagCribFile PostTagCribFileReader::read_file() { uint8_t file_magic = read_u8(); PostTagFileMagic format_magic = CribFileMagic; if (file_magic != format_magic) { throw std::runtime_error((boost::format("File magi...
1,320
453
/* * fut_cpp.cpp * * Created on: 23 Nov 2018 * Author: Bruce Belson */ using namespace scheduling; upromise ufuture<int32_t> delayed_light(int32_t delay) { return } extern "C" int fut_test() { return 0; }
225
103
#include "Blinker.h" void Blinker::play(const uint16_t *playTimes, int repeat = -1) { /*debug("Blinker::play() "); debugvar("repeat = ", repeat); debugvar("playTimes = ", (int)playTimes); debugln("");*/ _playTimes = playTimes; _repeat = repeat; on(); } void Blinker::loop(uint32_t now =...
1,162
442
#include<cstdio> long long go(long long x) { if(x<3)return x; if(x<5)return x-1; for(long long i=3;i*i<=x;i++) if(x%i==0)return x-x/i; if(x%2==0)return x-2; return x-1; } main() { long long i,j,k,T; scanf("%lld",&T); while(T--) { scanf("%lld %lld",&i,&k); whil...
434
210
//Seung Hoon Lee - A01021720 //Tarea 4 - Equalization CPU version //g++ -o equalization_CPU equalization_CPU.cpp -lopencv_core -lopencv_highgui -lopencv_imgproc -std=c++11 #include <iostream> #include <cstdio> #include <cmath> #include <chrono> #include <cstdlib> #include <opencv2/core/core.hpp> #include <opencv2/high...
3,230
1,358
#include "RandomColorGenerator.h" namespace { std::vector<glm::vec4> MakePalette() { // Превращает rgb(255, 0, 128) в vec4{ 1, 0, 0.5, 1 } auto rgb = [](unsigned red, unsigned green, unsigned blue) { return glm::vec4(float(red) / 255.f, float(green) / 255.f, float(blue) / 255.f, 1); }; // Цвета подобраны на сай...
865
470
/*! \headerfile Model.hpp "include/Model.hpp" * "Model.hpp" contains the class definition encapsulating the * data structure interface for a Model in swSim. */ // Copyright 2020 United States Government as represented by the Administrator of the National // Aeronautics and Space Administration. No copyright is claim...
4,113
1,205
// // Created by Víctor Ortiz on 14/06/2021. // #include "Pacientes.hpp" #include <iostream> #include <string> Pacientes::Pacientes(int id, std::string dni, std::string nombre, std::string apellido1, std::string apellido2, int edad, char sexo) { IdPaciente = id; Dni = dni; Nombre = nombre; ...
846
337
class Solution { public: vector<vector<int>> XXX(int numRows) { vector<vector<int>>f; for(int i=0;i<numRows;i++){ vector<int>res(i+1); res[i]=res[0]=1; for(int j=1;j<i;j++){ res[j]=f[i-1][j-1]+f[i-1][j]; } f.push_back(res);...
359
140
#include "standinLocatorNode.h" //#include <maya/MFnStringData.h> //#include <maya/MFnDependencyNode.h> //#include <maya/MGlobal.h> //#include <maya/MDoubleArray.h> //#include <maya/MSelectionList.h> //#include "utilities/pystring.h" MObject StandinLocatorNode::bboxMin; MObject StandinLocatorNode::bboxMax; MObject ...
5,483
2,309
#include <iostream> #include <string> struct car { std::string make; //use std::string if you do not want to claim the name space here. int year; }; //';' after struct. int main() { using namespace std; int ncars; cout << "How many cars do you wish to catalog? "; cin >> ncars; cin.get(); car * info = new car[n...
761
304
class Solution { public: int numIdenticalPairs(vector<int> &nums) { int count = 0; vector<pair<int, int>> vec; int i = 0, j = 1; while (i < nums.size() - 1) { if (nums[i] == nums[j]) { count++; } j++; ...
821
283
#ifndef RELOCATION_TABLE #define RELOCATION_TABLE #include <iostream> #include <string> #include <vector> #include <iomanip> #include <sstream> #include <memory> #include <unordered_map> #include "section.hpp" using namespace std; class RelocationTable { public: enum class RelocationType { UNDEFINED, ...
1,574
505
#include "base.h" #include "interface\font.h" #include "interface\distance-field.h" #include "game.h" #include "texture.h" #include <ftbitmap.h> bool CachedGlyph::operator<( const CachedGlyph &rhs ) const { return width*rows > rhs.width*rhs.rows; } CFont::CFont() { m_cacheFace = 0; m_cachedArea = 0; m_fontFileN...
12,085
4,914
#include "_core.h" void wrapper_78fa594811935c2ea4b4905d733f141f(pybind11::module& module) { pybind11::enum_< enum ::statiskit::size_error::size_type > enum_78fa594811935c2ea4b4905d733f141f(module, "size_type"); enum_78fa594811935c2ea4b4905d733f141f.value("INFERIOR", ::statiskit::size_error::inferior); e...
562
325
#include "gtest/gtest.h" #include "../src/binary_quadratic_model.hpp" #include "../src/binary_polynomial_model.hpp" #include "../src/binary_quadratic_model_dict.hpp" #include "test_bqm.hpp" #include <nlohmann/json.hpp> #include <unordered_map> #include <utility> #include <vector> #include <cstdint> #include <string...
55,896
24,949
/************************************************************** * * 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...
2,867
750
#include <QCoreApplication> #include <QEasyDownloader> int main(int argc, char **argv) { QCoreApplication app(argc, argv); /* * Construct */ QEasyDownloader Downloader; /* * By Default Debug is false , make it true to print the download progress and * other stuff! */ Downlo...
1,095
368
#define CV_CPU_SIMD_FILENAME "/home/epasholl/opencv/opencv-master/modules/core/test/test_intrin512.simd.hpp" #define CV_CPU_DISPATCH_MODE AVX512_SKX #include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" #define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, BASELINE #undef CV_CPU_SIMD_FILENAME
303
141
#pragma once #include <string> #include <vector> // All token types. enum token_type_t { // Special tokens. tk_identifier, tk_lit_integer, tk_lit_string, tk_lit_character, tk_eof, // Reserved words. tk_if, tk_int, tk_else, tk_while, tk_return, tk_break, tk_continue, // Punctuation. tk_left_parenthesis,...
2,787
1,307
#include <iostream> using namespace std; const int mod = 1e9 + 7; const int N = 1e6 + 11; int prime[N + 10]; long long f[N + 10], ok[N + 10]; void init() { for (int i = 2; i <= N; i++) { prime[i] = 1; ok[i] = 0; } for (int i = 2; i <= N; i++) { if (prime[i]) { for (i...
1,207
516
// Copyright 2019 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 "components/signin/internal/identity_manager/account_info_util.h" #include <map> #include <string> #include "base/values.h" #include "component...
4,395
1,412
#include <iostream> #include <vector> using std::vector; /** * find minimum number in rotated array * * @since 2020-10-21 Wednesday 10:27 - 11:10 */ class Solution { int findPivot(vector<int> v) { int size = v.size(); int l = 0, r = size - 1; while (l <= r) { int mid = l + ...
1,408
587
#include <cstring> #include <deque> #include "Common/Time.h" #include "Config/Config.h" #include "DDraw/DirectDrawPalette.h" #include "DDraw/Surfaces/PrimarySurface.h" #include "Gdi/AccessGuard.h" namespace DDraw { void DirectDrawPalette::setCompatVtable(IDirectDrawPaletteVtbl& vtable) { vtable.SetEntries = &SetE...
1,340
560
#ifndef __HOT__COMMONS__PARTIAL_KEY_MAPPING_BASE_HPP___ #define __HOT__COMMONS__PARTIAL_KEY_MAPPING_BASE_HPP___ #include "hot/commons/include/hot/commons/DiscriminativeBit.hpp" namespace hot { namespace commons { /** * A Base class for all partial key mapping informations * A Partial key mapping must be able to ex...
1,441
457
/* * Copyright (c) 2014-2022 The Voxie Authors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, mer...
39,335
11,424
// ECT_Driver.cpp,v 1.8 1999/07/21 03:41:16 coryan Exp #include "ECT_Driver.h" #include "ace/High_Res_Timer.h" #if !defined (__ACE_INLINE__) #include "ECT_Driver.i" #endif /* __ACE_INLINE__ */ ACE_RCSID(EC_Throughput, ECT_Driver, "ECT_Driver.cpp,v 1.8 1999/07/21 03:41:16 coryan Exp") ECT_Driver::~ECT_Dri...
338
179
// // Created by chj on 2020/7/3. // // https://leetcode-cn.com/problems/the-kth-factor-of-n/ #include <algorithm> #include <cmath> #include <iostream> #include <vector> // 先计算 n 的所有因子,然后排序 class Solution { public: int kthFactor(int n, int k) { std::vector<int> v; const int K = std::sqrt(n); for (int ...
723
350
#include <iostream> using namespace std; int main() { string prev = " "; string curr; int numOfWords = 0; while (cin >> curr) { numOfWords++; if (prev == curr) { cout << "word number " << numOfWords << '\n'; cout << "repeated word: " << curr << '\n...
376
128
#include "Graphics/glHeaders.hpp" namespace Graphics { struct Rect { GLfloat width; GLfloat height; GLfloat x; GLfloat y; Rect(GLfloat x, GLfloat y, GLfloat width, GLfloat height) { this->width = width; this->height = height; this->x = x; this->y = y; ...
352
118
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) Microsoft Corporation. All rights reserved. ///////////////////////////////////////////////////////...
1,933
526
#pragma once // --------- Graphics -------- // #include "Texture/Texture.hpp" #include "Image/Image.hpp" #include "Sprite/Sprite.hpp" #include "Shape/Rect/Rectangle.hpp" #include "Shape/Line/Line.hpp" #include "Text/Text.hpp" namespace ml { class Image; class Sprite; class Rectangle; class Line; class Text; st...
612
229
#include <GFX/2D/Sprite.h> namespace Stardust::GFX::Render2D{ Sprite::Sprite() { tex = -1; offset = { 0, 0 }; scaleFactor = { 1.0, 1.0 }; rotation = {0, 0}; } Sprite::~Sprite() { model.deleteData(); } Sprite::Sprite(unsigned int t) { rotation = {0, 0}; tex = t; Texture* tex2 = g_TextureManag...
5,216
2,954
#include "serialization.h" #include "Model.h" // ****************************** Model ****************************** void Serializer::write(std::ofstream& os, const Model& model) { write(os, model.name); write(os, model.position); write(os, model.scale); write(os, model.rotation); // Number of SubMes...
2,326
840
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04...
4,991
1,920
#include <iostream> using namespace std; void read( int n,char num[10][5]); int main() { char num[10][5] = {"ling","yi","er","san","si","wu","liu","qi","ba","jiu"}; cout<<"please input a num:"<<endl; int count = 0,n; int t = getchar(); while( t !='\n' ) { n = t - '0'; ...
735
312
/* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certain so...
35,615
13,227
/* linphonecore_jni.cc Copyright (C) 2010 Belledonne Communications, Grenoble, France 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 v...
65,710
27,548
// Distributed under the MIT License. // See LICENSE.txt for details. #pragma once #include "Time/StepControllers/BinaryFraction.hpp" #include "Utilities/TMPL.hpp" namespace StepControllers { /// Typelist of standard StepControllers using standard_step_controllers = tmpl::list<BinaryFraction>; } // namespace Trigge...
323
101
/** * Copyright (C) 2017 IBM Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
2,756
1,024
// Copyright Nezametdinov E. Ildus 2021. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) // #ifndef H_639425CCA60E448B9BEB43186E06CA57 #define H_639425CCA60E448B9BEB43186E06CA57 #include <type_traits> #include ...
23,246
6,886
#include <core/sys/sim_thread.h> #include <render/sim_canvas.h> #include <render/sim_driver.h> #include "Application.h" #include "Game.h" CApplication::CApplication() { m_simarian = SIM_NEW CSimarian("simarian"); O.simarian = m_simarian; O.driver = m_simarian->GetDriver(); O.effect = m_simaria...
2,100
939
#pragma once #include <typed-geometry/types/mat.hh> #include <typed-geometry/types/vec.hh> #include <typed-geometry/detail/scalar_traits.hh> namespace tg { template <int D, class T> [[nodiscard]] constexpr mat<D + 1, D + 1, T> translation(vec<D, T> const& v) { auto m = mat<D + 1, D + 1, T>::identity; m[D] = ...
1,001
459