text
string
size
int64
token_count
int64
#include "MaterialLibrary/MaterialLibrary.h" #include <iostream> #include <GL/glew.h> #include "lodepng/lodepng.h" MaterialLibrary::MaterialLibrary() { //ctor } MaterialLibrary::~MaterialLibrary() { //dtor } void MaterialLibrary::addMaterial(const Material& material) { std::string materialName = materia...
2,328
764
#pragma once #include <pch.hpp> #include <vulkan/geometry/Geometry.hpp> #include <vulkan/texture/Texture.hpp> #include <vulkan/util/Invalidatable.hpp> class cMesh : public cInvalidatable { private: cGeometry* ppGeometry; cTexture* ppTexture; cTexture* ppMaterial; public: cMesh(cGeometry* pGeometry, c...
1,179
431
#include <vs/base/util/FileException.h> namespace vs { namespace base { namespace util { FileException::FileException(string fileOfOccuredError, string placeOfOccuredError, string description, string badFile) :Exception(fileOfOccuredError, placeOfOccuredError, description), corruptedFile(badFile) {} ...
688
221
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { vector<int> left; vector<int> right; vector<int> sol; int leftProduct = 1; int rightProduct = 1; int sz = nums.size(); left.resize(sz); right.resize(sz); for(int i = 0...
755
261
//---------------------------------------------------------------------------- // Copyright (c) 2016, Codalogic Ltd (http://www.codalogic.com) // All rights reserved. // // The license for this file is based on the BSD-3-Clause license // (http://www.opensource.org/licenses/BSD-3-Clause). // // Redistribution and use i...
4,543
1,650
#include <bits/stdc++.h> using namespace std; int main( void ) { set<long int> collection; long int s; int count = 0; for(int i = 0; i < 4; i++ ) { cin >> s; collection.insert( s ); } cout << 4 - collection.size() << endl; return 0; }
289
115
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: echo_test.proto #include "echo_test.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google...
30,521
10,366
#include <iostream> #include "john.hpp" void john () { std::cout << "John, "; }
83
37
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <limits> #include "vm/CachedCCWBase.h" #include "utils/New.h" // System.Collections.Generic.Dictionary`2<Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointer,System.UInt32> struct Dict...
438,576
225,868
// Copyright 2021 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
1,526
571
#include "common/types.h" #include "utils/file.h" #include "utils/utils.h" #define DEBUG_LEVEL 5 #include "common/debug.h" int main(int argc, char *argv[]) { auto lines = File::readAllLines(argv[1]); { Point<int> position; int angle = 90; for (auto &l : lines) { int distance = utils::toInt(l.substr(1))...
2,279
1,195
#include<bits/stdc++.h> #define rg register #define rep(i,x,y) for(rg int i=(x);i<=(y);++i) #define per(i,x,y) for(rg int i=(x);i>=(y);--i) using namespace std; typedef long long LL; inline LL sqr(LL x){return x*x;} LL ansd,ansx; int main(){ int n;scanf("%d",&n); rep(d,1,n)if(sqr(LL(sqrt(d)))!=d){ for(LL y=1;;++y){...
526
302
/*F****************************************************************************** * * openSMILE - open Speech and Music Interpretation by Large-space Extraction * the open-source Munich Audio Feature Extraction Toolkit * Copyright (C) 2008-2009 Florian Eyben, Martin Woellmer, Bjoern Schuller * * * Institu...
7,123
2,246
#pragma once #include <any> #include <unordered_map> #include <type_traits> #include "functype.hpp" namespace utils { class methods { private: using method_type = std::function<std::any(std::any)>; template <typename R, typename F> struct invoker { static R invoke(const F& f, std::any any) { ...
1,939
618
// This file is generated by Ubpa::USRefl::AutoRefl #pragma once #include <USRefl/USRefl.h> template<> struct Ubpa::USRefl::TypeInfo<Ubpa::Utopia::CullMode> : Ubpa::USRefl::TypeInfoBase<Ubpa::Utopia::CullMode> { static constexpr AttrList attrs = {}; static constexpr FieldList fields = { Field{"NONE", Ubpa::Uto...
5,210
2,394
#include "SpeedLimiter.h" #include "ScriptSettings.hpp" #include "VehicleData.hpp" #include "Input/CarControls.hpp" #include "Util/MathExt.h" #include "Util/UIUtils.h" #include <inc/enums.h> #include <inc/natives.h> extern CarControls g_controls; extern ScriptSettings g_settings; extern Vehicle g_playerVehicle; exte...
1,157
447
#include "Algorithms/algorithm-factory.hh" #include "Algorithms/algorithm.hh" #include "Algorithms/DPOP/dpop.hh" #include "Kernel/agent.hh" #include <string> #include <vector> Algorithm* AlgorithmFactory::create (Agent& a, std::string type, std::vector<std::string> params) { if (type.compare("DPOP") == 0 or type.co...
390
144
#include <EEPROM.h> #include "DataStore.h" DataStore ds; #define DS_ADDR_SERVO_OFF 0 #define DS_ADDR_SERVO_ON 1 #define DS_ADDR_SERVO_CUR 2 #define DS_ADDR_POWER_ON 3 void DataStore::setup() { this->setUiStage(UI_STAGE_RUNNING); uint8_t value; value = EEPROM.read(DS_ADDR_SERVO_OFF); this->setServoOffValue(v...
1,225
536
// Copyright 2021 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 "third_party/blink/renderer/modules/webtransport/datagram_duplex_stream.h" namespace blink { void DatagramDuplexStream::setIncomingMaxAge(absl:...
1,120
411
#include "Player.hpp" Player::Player() { // arrow keys and Home, End, PageUp, PageDn keyBinding[sf::Keyboard::Left] = Action::MoveLeft; keyBinding[sf::Keyboard::Right] = Action::MoveRight; keyBinding[sf::Keyboard::Up] = Action::MoveUp; keyBinding[sf::Keyboard::Down] = Action::MoveDown; keyBinding[sf::Ke...
2,376
868
#include "EtcdManager.h" #include <unistd.h> int main(int argc, char *argv[]) { std::vector<std::string> address; address.push_back("11.11.11.11:20002"); address.push_back("22.22.22.22:20002"); address.push_back("33.33.33.33:20002"); EtcdManager etcdWatcher(address); etcdWatcher.startMultiWat...
407
186
#include "Settings.h" #include "j1Gui.h" #include "j1Textures.h" #include "j1Render.h" #include "p2Log.h" #include "j1Window.h" #include "j1App.h" #include "Menu.h" #include "Brofiler/Brofiler.h" Settings::Settings() { name.create("credits"); } Settings::~Settings() {} bool Settings::Awake(pugi::xml_node& conf) { ...
1,716
769
// // BlobManager.hpp // OSCReceiverSendero // // Created by Christian Bouvier on 11/20/16. // // #ifndef BlobManager_hpp #define BlobManager_hpp #include <stdio.h> #include "ofxOsc.h" #define EXPIRATION_TIME 5 #define OSC_PORT_BLOBS 12345 #define BlobManager (*BlobManagerClass::instance()) struct blob { in...
1,070
371
#include "tool.h" //================================================================ // Variables //================================================================ static cham_t_set_callback_t cham_t_set_callback; static cham_t_get_rank_data_t cham_t_get_rank_data; static cham_t_get_thread_data_t cham_t_get_...
11,909
4,049
[[eosio::action]] void wps::init() { require_auth( get_self() ); const name ram_payer = get_self(); check( !_state.exists(), "already initialized" ); auto state = _state.get_or_default(); auto settings = _settings.get_or_default(); _state.set( state, ram_payer ); _settings.set( settings, ...
1,438
459
/*** Copyright (c), The Regents of the University of California *** *** For more information please refer to files in the COPYRIGHT directory ***/ /* procStat.h - This dataObj may be generated by a program or script */ #ifndef PROC_STAT_HPP #define PROC_STAT_HPP /* This is a Object File I/O API call */ ...
4,057
1,401
/** * @author Tomas Polasek * @date 26.4.2021 * @version 1.0 * @brief Python wrapper for TreeIO. */ #include "treeio.h" #include <iostream> int testIntegration(const std::string &s) { std::cout << "Hello World: " << s << std::endl; return 42; } treeio::ArrayTree *treeConstruct() { return new tre...
1,624
573
\* Author: allannozomu Runtime: 24 ms Memory: 11.5 MB*\ class Solution { private: int minimun_removed; public: string buildFromMask(string& s, vector<int>& mask){ string res = ""; for (int i = 0 ; i < mask.size(); ++i){ if (mask[i]){ res += s[i]; } ...
2,116
666
#include <fl/Headers.h> int main(int argc, char** argv){ //Code automatically generated with fuzzylite 6.0. using namespace fl; Engine* engine = new Engine; engine->setName("sltbu_fl"); engine->setDescription(""); InputVariable* distance = new InputVariable; distance->setName("distance"); distance->setDescription("...
2,110
736
#include <iostream> #include <fstream> #include <string> #include "TextsHelper.h" std::string getNextToken(std::ifstream &file,char delim){ std::string token; while(true){ char ch; file.get(ch); if(ch==delim){ break; } else{ token+=ch; } ...
603
212
//===----------------------------------------------------------------------===// // DuckDB // // duckdb/function/scalar/regexp.hpp // // //===----------------------------------------------------------------------===// #pragma once #include "duckdb/function/function_set.hpp" #include "re2/re2.h...
1,218
369
#include "Pits/Unicode.hpp" #include "Pits/Timer.hpp" #include <uchar.h> #include <cassert> #include <string_view> #include <iostream> #include <codecvt> #include <vector> using namespace std::literals; #if __cplusplus <= 201703L namespace std { using u8string = basic_string<char>; } #endif template <class Job...
8,221
3,454
#include "external_force/external_force.hpp" #include "kdl_wrapper/kdl_wrapper.h" #include <urdf/model.h> #include <rclcpp/rclcpp.hpp> #include <future> #include <unistd.h> // Ctr+C handler void signal_callback_handler(int signum) { std::cout << "Caught signal " << signum << std::endl; // Terminate ros node rcl...
1,160
468
#pragma once #import <Cocoa/Cocoa.h> #include "WindowMac.hh" @interface WindowDelegate : NSObject<NSWindowDelegate> - (WindowDelegate*)initWithWindow:(jwm::WindowMac*)initWindow; @end
187
65
/***************************************************************************** * PlanarCut - software to compute MinCut / MaxFlow in a planar graph * * Version 1.0.2 * * * * ...
5,138
2,051
#pragma once #include "sequences/sequence.hpp" inline size_t edit_distance(Sequence s1, Sequence s2) { size_t left_skip = 0; while(left_skip < s1.size() && left_skip < s2.size() && s1[left_skip] == s2[left_skip]) { left_skip++; } s1 = s1.Subseq(left_skip, s1.size()); s2 = s2.Subseq(left_sk...
1,771
814
// Copyright (c) 2016-2020 Jan Kelling // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt #include <vpp/bufferOps.hpp> #include <vpp/queue.hpp> #include <vpp/vk.hpp> #include <dlg/dlg.hpp> #include <cstring> namespace vpp { v...
1,629
609
/* * Author: Janis Born */ #pragma once #include <HomologyInference/Types.hh> #include <HomologyInference/Utils/ExternalProperty.hh> #include <set> namespace HomologyInference { using BlockedEdgeProperty = ExternalProperty<EH, bool>; using BlockedVertexProperty = ExternalProperty<VH, bool>; template<typename M...
2,142
717
/* Copyright 2020 Google LLC 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 in writing, software dist...
9,013
2,808
#include <iostream> #include <string> using namespace std; char arr[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; int main() { int m, n; string ans, a; cin >> m >> n; while (m) { a = ans; ans = arr[m%n]; ans += a; m /= n; } if (ans == "") ans = "0"; cout <...
328
172
/* * Copyright 2014 Google 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 applica...
6,488
2,078
/* * MIT License * * Copyright (c) 2021 Jimmie Bergmann * * 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, m...
3,775
1,199
#include "ResourcePack.h" #include <sys/stat.h> #include <cstring> #include <iostream> bool FileExists(const std::string& filepath) { struct stat buffer; return (stat(filepath.c_str(), &buffer) == 0); } long GetFileSize(const std::string& filepath) { struct stat stat_buf; int rc = stat(filepath.c_...
10,161
3,588
// ========================================================================== // // hwlib::string demo // // (c) Wouter van Ooijen (wouter@voti.nl) 2017 // // 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) // // ...
822
310
#include <glimac/Controls.hpp> namespace glimac { const void moveCamera(const SDL_Event &e, FreeFlyCamera &camera) { switch(e.key.keysym.sym) { case SDLK_z: camera.moveFront(1); break; case SDLK_s: camera.moveFront(-1); break; case SDLK...
4,145
1,485
#include "AtIncludes.h" #include "AtMimeReadWrite.h" #include "AtImfReadWrite.h" #include "AtMimeGrammar.h" #include "AtMimeQuotedPrintable.h" namespace At { namespace Mime { // FieldWithParams void FieldWithParams::ReadParam(ParseNode const& paramNode, PinStore& store) { // Name Pa...
14,240
6,168
#include "html_benchmark_reporter.h" #include <chrono> #include <unordered_map> #include <algorithm> #include <iterator> #include "html_document.h" #include "utils.h" #include "devices/device_interface.h" #include "devices/platform_interface.h" #include "fixtures/fixture_id.h" #include "indicators/duration_indicator....
5,504
1,675
/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees hol...
9,589
3,091
#include "smplx/sequence.hpp" #include <fstream> #include <iostream> #include <cnpy.h> #include "smplx/util.hpp" #include "smplx/util_cnpy.hpp" namespace smplx { namespace { using util::assert_shape; } // namespace // AMASS npz structure // 'trans': (#frames, 3) // 'gender': str // 'mocap_framer...
3,731
1,252
/*************************************************************** * Name: ThreadGestion.cpp * Purpose: Code for Fu(X) 2.0 * Author: David Lecoconnier (david.lecoconnier@free.fr) * Created: 2010-05-07 * Copyright: David Lecoconnier (http://www.getfux.fr) * License: *************************************...
6,020
1,975
#include "freevariablesofterm.h" #include "store.h" namespace snl { FreeVariables GetFreeVariablesCore(Store& store, TermPtr term) { using Tag = term::Tag; const static FreeVariables empty_fvs; switch (term->tag) { case Tag::Abstraction: { auto abstraction = term_cast<term::Abstraction...
4,782
1,364
#ifndef FRAME_RENDERABLE_HPP #define FRAME_RENDERABLE_HPP /**@file * @brief Define a class to render the world frame. * * This file defines the class FrameRenderable to render the world frame. */ #include "../HierarchicalRenderable.hpp" #include <vector> #include <glm/glm.hpp> /**@brief Render the world frame. * ...
5,015
1,337
// Copyright (c) 2021 The Orbit 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 <gtest/gtest.h> #include "OrbitGgp/Account.h" #include "TestUtils/TestUtils.h" namespace orbit_ggp { using orbit_test_utils::HasError; using ...
2,475
792
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * The version of the OpenAPI document: 1.1.2-pre.0 * Contact: blah@cliffano.com * * NOTE: This class is auto generated by OpenAPI-Generator 5.4.0. * https://openapi-generator.tech * Do not edit the class manually. */ ...
206,623
59,887
//Programa que calcula la raiz de un entero positivo N. //Sin utilizar la libreria math.h //Alumno: Castillo Gardea Mariano //No Control: 01070097 #include <iostream.h> #include <conio.h> #include <stdio.h> void captura(int &); void validacion(int &); void raiz(int &); void main() {int numero; clrscr(); captura(numer...
646
276
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.h" #include "chrome/browser/browser_process.h" #include "chrome/browser...
4,895
1,426
/* * Damping Demo */ #include <cyclone/cyclone.h> #include "../ogl_headers.h" #include "../app.h" #include "../timing.h" #include <stdio.h> #include <cstdlib> class DampingDemo : public Application { struct ParticleObject { cyclone::Particle particle; unsigned startTime; void render() { cyclone::Vec...
1,517
683
#include "stdafx.h" #include <cassert> #include <memory> #include "ArgHelper.h" template <typename T> //for both const and non-const T *TrimStart(T *str) { assert(str != nullptr); while (str[0] == _T(' ')) { ++str; } return str; } //There is no CommandLineToArgvA(), so we rely on the caller t...
4,061
1,696
#include <bits/stdc++.h> #define FR(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; ll dp[3][3005]; int n; vector<ll> C, S; const ll INF = 10e9; ll f(int i, int t) { if (t == 3) return C[i]; if (dp[t][i]) return dp[t][i]; ll...
1,359
694
#include "searchResultsLv.h" #include "Resource.h" LRESULT SearchResultsLv::OnDblClick(DWORD fwKeys, int X, int Y) { LVHITTESTINFO hti = {}; hti.pt.x = X; hti.pt.y = Y; int idx = HitTest(&hti); if (idx != -1) { SendMessageW(GetParent(Handle), WM_COMMAND, ID_OPENROM, idx); } return 0; }
298
143
#ifdef _debug #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; typedef long long ll; #ifndef _debug int main() { int n, q; cin >> n >> q; string s; cin >> s; vector<int> l(q), r(q); for(int i = 0; i < q; i++) cin >> l[i] >> r[i]; vector<int> sum(n + 1, 0)...
621
283
#include "ScriptScene.h" #include "Core/MTileManager.h" USING_NS_CC; ScriptScene* ScriptScene::create(ScriptPtr script) { ScriptScene *pRet = new ScriptScene(); if (pRet && pRet->init(script)) { pRet->autorelease(); return pRet; } else { delete pRet; pRet = NU...
998
325
#include "../defines/tc_defines.h" #include "../math/tc_math.h" #include "../sdl/sdl.h" #include <iostream> #include <iomanip> #include <vector> using Vertex = std::pair<int, int>; using Line = std::pair<Vertex, Vertex>; //! Grow the snowflake one level deeper. std::vector<Line> grow_koch_snowflake(const std::vect...
3,112
1,325
#include "trie-pool.hpp" // ---------------------------------------------------------------------------- #define ROTA_USE_CUSTOM_ALLOCATOR 1 // ---------------------------------------------------------------------------- /// Note: Could also have used "__declspec(selectany)" in the header, but this is ...
3,714
1,350
#include "Collision.h" bool Collision::CheckCollisonAABB(const SDL_Rect & RectA, const SDL_Rect & RectB) { return (RectA.x + RectA.w >= RectB.x && RectB.x + RectB.w >= RectA.x && RectA.y + RectA.h >= RectB.y && RectB.y + RectB.h >= RectA.y); }
247
111
// -- // Includes // -- #include <jni.h> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #include "utfstring.h" // -- // Constants, enum, struct and utility functions for markdown symbols // -- typedef enum { MARKDOWN_SYMBOL_INVALID = 0, MARKDOWN_SYMBOL_ESCAPE, MARKDOWN_SYMB...
11,078
3,257
#define MPT_LOG_LEVEL WARN #include "planner_integration_test.hpp" #include <mpt/pprm_irs.hpp> #include <nigh/gnat.hpp> #include <nigh/linear.hpp> using namespace unc::robotics; using namespace mpt; using namespace mpt_test; TEST(pprm_irs_until_solved) { testSolvingBasicScenario<PPRMIRS<>>(); } TEST(pprm_irs_unt...
1,320
526
#include "argparser.h" #include "gtest/gtest.h" #include "string.h" class TestArgParserFixture : public ::testing::Test { public: std::string param0 = "program"; std::string param1 ="arg0"; std::string param2 ="arg1"; const char* args [3] = {param0.c_str(),param1.c_str(),param2.c_str()}; ArgP...
644
249
// Copyright Yamaha 2021 // MIT License // https://github.com/yamaha-bps/cbr_drivers/blob/master/LICENSE #include <cbr_drivers/keyboard.hpp> #include <thread> #include <chrono> #include <iostream> int main(int argc, char ** argv) { if (argc != 2) { std::cerr << "usage: keyboard_example <device>" << std::endl; ...
706
289
/******************************************************************************* * Copyright (c) 2014 Varuna L Amachi. All rights reserved. * * 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 ...
19,759
5,966
#include "extended.h" int extended(int a, int b){ LOG(INFO) << "Hey"; return a - b; }
99
42
//--------------------------------------------------------------------------- // csved_fmerge.cpp // // merge multiple sorted csv files // // Copyright (C) 20011 Neil Butterworth //--------------------------------------------------------------------------- #include "a_base.h" #include "a_collect.h" #include ...
4,892
1,405
#ifndef TEXTNET_LAYER_PRODUCT_LAYER_INL_HPP_ #define TEXTNET_LAYER_PRODUCT_LAYER_INL_HPP_ #include <mshadow/tensor.h> #include "../layer.h" #include "../op.h" #include "../../utils/utils.h" namespace textnet { namespace layer { // this layer elem-wise products bottom representations on the last 2 dimensions template...
6,034
2,267
/* * File: ServiceDelegate.cpp * Author: Anuj * * Created on 29 November, 2015, 10:13 AM */ #include "ServiceDelegate.h" ServiceDelegate::ServiceDelegate() { } void ServiceDelegate::didWriteToCharacteristic(char id, int len, char * value) {} void ServiceDelegate::didReadFromCharacteristic(char id, int len,...
402
130
#include "literals.hh" #include "../visitors/visitor.hh" #include "variables.hh" void LiteralAST::accept(ASTvisitor &V) { V.visit(*this); } void IntegerLiteralAST::accept(ASTvisitor &V) { V.visit(*this); } void BooleanLiteralAST::accept(ASTvisitor &V) { V.visit(*this); } void StringLiteralAST::accept(ASTvisitor &V...
342
131
// Copyright (c) Csaba Molnar & Daniel Butum. All Rights Reserved. #include "NYLoadingScreenSettings.h" #include "UObject/ConstructorHelpers.h" #include "Engine/Font.h" #include "INYLoadingScreenModule.h" #define LOCTEXT_NAMESPACE "LoadingScreen" /////////////////////////////////////////////////////////////////////...
4,314
1,189
/** * UGENE - Integrated Bioinformatics Tools. * Copyright (C) 2008-2017 UniPro <ugene@unipro.ru> * http://ugene.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * ...
14,845
4,882
// Copyright (c) 2009 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 <stdio.h> #include "assembler.h" int main(int argc, char** argv) { char buf[1024]; CodeBuffer cb(buf); // Branching tests first so ...
1,817
957
#include "aquila/global.h" #include "aquila/transform/Dct.h" #include "UnitTest++/UnitTest++.h" #include <cstddef> #include <vector> SUITE(Dct) { TEST(AlternatingOnes) { const std::size_t SIZE = 4; const double testArray[SIZE] = {1.0, -1.0, 1.0, -1.0}; std::vector<double> vec(testArray...
1,348
586
#include "Boss.h" #include "App.h" #include "Textures.h" Boss::Boss() : Entity(EntityType::BOSS) { } Boss::Boss(BossClass bClass) : Entity(EntityType::BOSS) { bossClass = bClass; // LIFE -> ((x / 1.5) + 20) // STRG -> ((x / 2) + 8) // DEFS -> ((x / 4) + 2) nose // EXPR -> expActLvl + expNextLvl / 2 } Boss::~Bos...
605
285
#include <vector> #if defined(HAVE_CONFIG_H) #include "config.h" #endif #include "resip/stack/Contents.hxx" #include "rutil/ParseBuffer.hxx" #include "rutil/Logger.hxx" #include "resip/stack/OctetContents.hxx" #include "rutil/MD5Stream.hxx" #include "rutil/WinLeakCheck.hxx" using namespace resip; using namespace std...
20,493
6,457
////////////////////////////////////////////////////// // potencialFieldMap.cpp // // Created on: Jul 3, 2013 // Author: joselusl // // Last modification on: Oct 26, 2013 // Author: joselusl // ////////////////////////////////////////////////////// #include "potencialFieldMap.h" using namespace std; ...
11,209
4,115
/* * Copyright (C) 2012-2016 Open Source Robotics Foundation * * 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...
8,973
2,743
#include <cstdio> #include <iostream> using namespace std; bool check(int a, int b, int c){ if((a > 999) || (b > 999) || (c > 999)) return false; int i; int t[10] = {0}; t[a % 10] = 1; t[(a % 100) / 10] = 1; t[a / 100] = 1; t[b % 10] = 1; t[(b % 100) / 10] = 1; ...
731
381
/* Source - https://leetcode.com/problems/course-schedule-ii/ Author - Shivam Arora */ #include <bits/stdc++.h> using namespace std; bool dfs(vector<vector<int>>& graph, unordered_set<int>& visited, vector<bool>& recStack, stack<int>& st, int src) { visited.insert(src); recStack[src] = true; for(in...
3,775
1,338
/* * Copyright (C) 2021 Huawei Device 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 ...
4,586
1,678
#include <iostream> #include <map> #include <vector> #include <utility> #include <string> #include <algorithm> #include <fstream> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> #include <opencv2/opencv.hpp> #include <opencv2/features2d.hpp> #include <illust_image_similarity.hpp> using namespace illust_im...
4,671
2,072
#include "stdafx.h" #include "Processes.h"
43
20
#include "nofx_ofGetUsingCustomTextureWrap.h" #include "ofTexture.h" namespace nofx { namespace ClassWrappers { NAN_METHOD(nofx_ofGetUsingCustomTextureWrap) { NanReturnValue(ofGetUsingCustomTextureWrap()); } // !nofx_ofGetUsingCustomTextureWrap } // !namespace ClassWrappers } // ...
335
115
/* * CCString.cpp * * Created on: 21.01.2019 * Author: jan */ /** * @file CCString.cpp * * @brief Implementierung von CCString, CCString::SplitIterator und anderen zusammenhängenden Funktionen. * * @author Jan Alexander Stiehl */ #include "CCString.hpp" #include <iomanip> #include <limits> #in...
10,525
3,719
/* kwset.c - search for any of a set of keywords. Copyright 1989, 1998, 2000, 2005 Free Software Foundation, Inc. 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, or (at ...
21,317
7,998
/********************* */ /*! \file sorting_network.cpp ** \verbatim ** Top contributors (to current version): ** Makai Mann ** This file is part of the smt-switch project. ** Copyright (c) 2020 by the authors listed in the file AUTHORS ** in the top-level source...
5,867
2,133
#include <rack++/module/smooth_param.h> #include <rack++/module/channel.h> #include <snd/misc.h> #include "zap.h" using namespace rack; using namespace std::placeholders; Zap::Zap() : BasicStereoEffect("Zap") { param_spread_ = add_smooth_param(0.0f, "Spread"); param_spread_->set_transform([](const ml::...
2,264
1,022
// 1 tab = 8 spaces /** * ID: GoogleEarthPath.hpp * EDITED: 23-09-2014 * AUTOR: Andres Gongora * * +------ Description: -----------------------------------------------------------+ * | | * | Class to store GPS coordinates in a Google Earth compatible KML file. | * | This can then be loaded a...
5,174
2,050
#include <iostream> using namespace std; /* https://hackaday.com/2019/06/19/abusing-a-cpus-adders-to-optimize-bit-counting/ */ unsigned char count_set_bits(unsigned int x) { unsigned char ret = 0; while(x) { ret++; x &= x - 1; } return ret; } int main() { cout << "Count the set bits." << endl; cout << ...
411
190
#include <cpplib/stdinc.hpp> int32_t main(){ desync(); int t; cin >> t; while(t--){ int n, x, y; cin >> n >> x >> y; int lo = min(n, 1+max((int)0, (x+y)-n)); int hi = min(n, x+y-1); cout << lo << ' ' << hi << endl; } return 0; }
294
128
#include <vector> #include <catch/catch.hpp> #define private public #include "../src/puzzle.h" SCENARIO("getting available moves", "[puzzle]") { GIVEN("a puzzle with a valid 9x9 board") { std::vector<int> expected_moves{}; puzzle new_puzzle(std::vector<int>{ 5, 3, -1, -1, 7, -1, -1...
4,112
1,660
// 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/properties/CSSPropertyAPIWebkitLineClamp.h" #include "core/css/parser/CSSPropertyParserHelpers.h" class CSSParserLocalContext; namesp...
939
290
#include <iostream> using namespace std; int main(void) { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 1; i < n; i++) { int temp = a[i]; int j = i - 1; while (j >= 0 && a[j] > temp) { a[j + 1] = ...
473
204
#include <iostream> #include <fstream> #include <climits> using namespace std; int main(){ ifstream f("betasah.in"); int n,d,k; f >> n >> d >> k; int mat[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ mat[i][j]=0; } } for(int i=0;i<n;i++){ for(int j=n-1;j>i;j--){ mat[i][j]=9; } } in...
2,588
1,845