text
string
size
int64
token_count
int64
#include <iostream> using namespace std; int main() { int a,b,x,i=0,cx; cout<<"a= "; cin>>a; cout<<"b= "; cin>>b; x=a; cx=x; for(x; x<=b; x++) { cx=x; while(cx!=0) { if(cx%10==0) { i=i+1; cx=0; ...
485
195
/** * particle_filter.cpp * * Created on: Dec 12, 2016 * Author: Tiffany Huang */ #include "particle_filter.h" #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector> #include "helper_functions.h" using std::string;...
10,586
3,131
#define CATCH_CONFIG_MAIN #include "hfn/config.hpp" #include "hfn/cxstring.hpp" #include "hfn/digest.hpp" #include "hfn/fnv1a.hpp" #include "hfn/murmur3.hpp" #include "hfn/rhid.hpp" #include "hfn/type_hash.hpp" #include "hfn/wyhash.hpp" #include "hfn/xxhash.hpp" #include <catch2/catch.hpp> #include <iostream> class ty...
4,509
1,852
#include "WebUrl.h" using namespace std; WebUrl::WebUrl() {} WebUrl::~WebUrl() {} string WebUrl::CutParam(string url, string param) { int index = url.find("?" + param + "="); if (index < 0) { index = url.find("&" + param + "="); } if (index < 0) return string(); int index2 = index + 1 + (param + "=").lengt...
511
208
/* Copyright (c) 2018-2019 Xavier Leclercq 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, me...
4,786
1,732
#include <bits/stdc++.h> using namespace std; #include "../helpers/string_helpers.cpp" typedef long long int ll; struct Tile{ ll id; vector<string> pattern; int width, height; Tile(){ throw runtime_error("No Way!"); } Tile(ll id, vector<string> pattern) : id(id), pattern(pattern){ height = pattern.size()...
8,129
4,241
#include "./line.hpp" const png::rgba_pixel Line::WHITE_PIXEL = png::rgba_pixel(255, 255, 255, 255); const png::rgba_pixel Line::BLACK_PIXEL = png::rgba_pixel(0, 0, 0, 255); const png::rgba_pixel Line::TRANSPARENT_PIXEL = png::rgba_pixel(0, 0, 0, 0); const png::rgba_pixel Line::RED_PIXEL = png::rgba_pixel(255, 0, 0, 2...
2,663
1,012
#include "ppm_image.h" #include <string> #include <fstream> #include <iostream> #include <cmath> #include <algorithm> using namespace agl; using namespace std; ppm_image::ppm_image() { imageWidth = 0; imageHeight = 0; pixelArray= nullptr; } ppm_image::ppm_image(int w, int h) { imageWidth = w; imag...
15,323
5,804
/** * RocksServer plugin * https://github.com/valmat/queueServer */ #include "../include.h" #include "RequestMoveFirstPref.h" #include "RequestFirstPref.h" #include "RequestGetIncr.h" using namespace RocksServer; /* * Create plugin * * @param extension object of Extension * @param rdb wrapped ob...
608
201
/* Copyright (c) 2003, Xentronix Author: Frans van Nispen (frans@xentronix.com) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright ...
3,739
1,275
#pragma once #include <RadonFramework/IO/ConsoleUI/Component.hpp> #include <RadonFramework/IO/ConsoleUI/ComponentOperator.hpp> #include <RadonFramework/IO/ConsoleUI/State.hpp> namespace RadonFramework::IO::ConsoleUI { template <class T> struct With : public ComponentOperator { template <int N> With(char const (&...
708
261
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" /*====== This file is part of PerconaFT. Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. PerconaFT is free software: you can redistribute it and/or modif...
4,967
1,742
#include "../header.h" class Solution { public: vector<string> letterCombinations(string digits) { if (digits.length() == 0) { return {}; } unordered_map<char, string> m; m['2'] = "abc"; m['3'] = "def"; m['4'] = "ghi"; m['5'] = "jkl"; m['6']...
1,205
420
/* Cafu Engine, http://www.cafu.de/ Copyright (c) Carsten Fuchs and other contributors. This project is licensed under the terms of the MIT license. */ #ifndef CAFU_TREE_NODE_HPP_INCLUDED #define CAFU_TREE_NODE_HPP_INCLUDED #include "Node.hpp" #include "Plants/Tree.hpp" struct PlantDescriptionT; class PlantDescrMan...
2,071
627
#ifndef RANDAR_RENDER_GEOMETRY_HPP #define RANDAR_RENDER_GEOMETRY_HPP #include <randar/Render/Primitive.hpp> #include <randar/Render/ShaderProgram.hpp> #include <randar/Render/VertexBuffer.hpp> namespace randar { class Geometry : public GraphicsContextResource { public: VertexBuffer vertices; ...
3,247
827
/* The copyright in this software is being made available under the BSD * License, included below. This software may be subject to other third party * and contributor rights, including patent rights, and no such rights are * granted under this license. * * <OWNER> = British Broadcasting Corporation (BBC). * <ORGA...
13,240
4,698
/** * @file TransitionHandler.cpp * @author MacaroniDamage * @brief Executes state machine that handel transitions to different * stages * @version 0.1 * @date 2020-12-18 * * */ #include "TransitionHandler.h" /** Configures the instace so that * it triggers the wished state machine **/ void Transiti...
5,545
1,709
/* Copyright (c) 2007 Cyrus Daboo. 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 ...
7,076
2,668
/*****************************************************************************/ /* SOURCE CONTROL VERSIONS */ /*---------------------------------------------------------------------------*/ /* ...
111,478
42,734
/* Problem statement: Given a binary tree, find if it is height balanced or not. A tree is height balanced if difference between heights of left and right subtrees is not more than one for all nodes of tree. Constraints: 1<= N <= 10^4 Approach: To check if a tree is height-balanced, get the height of left and right...
1,283
398
// // model.cpp // // Created by Clsrfish on 08/10/2020 // #include "./model.h" #include "../gl/gl_utils.h" model_loading::Model::Model(const std::string &modelPath) { loadModel(modelPath); } void model_loading::Model::Draw(const Shader &shader) { for (unsigned int i = 0; i < Meshes.size(); i++) { ...
4,718
1,581
/** * \file NLine.hpp * \author fcaillaud * \version 1.0 * \date 2 Avril 2014 * \brief Fichier décrivant la classe NLine. * \details Classe utilisée pour représenter une ligne ou colonne de matrice (plus ou moins un vecteur). * \todo Réfléchir à une meilleure approche pour toute la classe. */ #...
7,042
3,270
#include <jni.h> extern "C" jstring Java_com_example_morrita_hellondk_MainActivity_hello( JNIEnv* env, jobject thiz) { return env->NewStringUTF("Hello from JNI!"); }
173
67
// Copyright Carl Philipp Reh 2006 - 2019. // 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) #include <sge/charconv/fcppt_string_to_utf8.hpp> #include <sge/charconv/fcppt_string_to_utf8_file.h...
1,141
446
// // Point.cpp // MathTools // // Created by Richard Chien on 14-1-31. // Copyright (c) 2014年 Richard Chien. All rights reserved. // #include "Point.h"
158
68
#include <cstdio> // perror #include <iostream> // cout, cin #include <cstdlib> // exit, EXIT_FAILURE #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> // inet_ntoa() #include <arpa/inet.h> // inet_ntoa() #include <cstring> // memset() - zero padding #include <unistd.h> // close() - closing the so...
2,724
1,081
#include "QBtAuxFunctions.h" #ifdef Q_OS_WIN32 bool QBtAuxFunctions::InitBthSdk() { if ( sdkInitializationCounter == 0) /* not connected with BlueSoleil */ { if (Btsdk_Init() != BTSDK_OK) return false; if (Btsdk_IsBluetoothReady() == BTSDK_FALSE) Btsdk_StartB...
1,233
475
// // 343.cpp // LeetCode // // Created by Narikbi on 23.02.17. // Copyright © 2017 app.leetcode.kz. All rights reserved. // #include <stdio.h> #include <iostream> #include <vector> #include <string> #include <algorithm> #include <deque> #include <queue> #include <set> #include <map> #include <stack> #include <cma...
610
277
#include "pooling.h" pico_cnn::naive::Pooling::Pooling(std::string name, uint32_t id, pico_cnn::op_type op, uint32_t *kernel_size, uint32_t *stride, uint32_t *padding) : Layer(name, id, op) { if (kernel_size) { kernel_size_ = new uint32_t[2](); std::memcpy(kernel_...
1,456
531
#include "swarmAgentInterface.h" #include "RvizInteractiveMarkerDisplay.h" SwarmAgentInterface::SwarmAgentInterface(int idDrone_in) { idDrone = idDrone_in; return; } SwarmAgentInterface::~SwarmAgentInterface() { return; } void SwarmAgentInterface::open(ros::NodeHandle &nIn) { n = nIn; loc...
2,605
978
// // CMakeFile.cpp // mbuild // // Created by mooming on 2016. 8. 15.. // // #include "CMakeFile.h" #include "StringUtil.h" #include <iostream> #include <fstream> #include <string> #include <vector> using namespace std; using namespace Builder; namespace { void AddFrameworks(ostream& os, string projName, cons...
6,279
2,713
/*ckwg +29 * Copyright 2018 by Kitware, 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: * * * Redistributions of source code must retain the above copyright notice, * this list of...
3,980
1,278
/* * Copyright (c) 2021 MariaDB Corporation Ab * * Use of this software is governed by the Business Source License included * in the LICENSE.TXT file and at www.mariadb.com/bsl11. * * Change Date: 2025-12-13 * * On the date above, in accordance with the Business Source License, use * of this software will be g...
3,606
1,252
#ifndef _CLIENT_CONSOLE_ #define _CLIENT_CONSOLE_ #include "core/client.hpp" struct Writer : Task { Writer( asio::io_service & ioService, #ifdef SERVER_SSL ssl::stream< ip::tcp::socket > & socket, #else ip::tcp::socket & socket, #endif int argc, ...
2,706
820
// Copyright (c) Peter Hillerström (skipifzero.com, peter@hstroem.se) // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for ...
17,059
6,472
#include "logging.hpp" #include <LIEF/PE.hpp> #include <QBDL/Engine.hpp> #include <QBDL/arch.hpp> #include <QBDL/loaders/PE.hpp> #include <QBDL/utils.hpp> using namespace LIEF::PE; namespace QBDL::Loaders { std::unique_ptr<PE> PE::from_file(const char *path, TargetSystem &engines, B...
4,848
1,615
/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Qt Software Information (qt-info@nokia.com) ** ** Copyright (C) 2011 www.hanxuantech.com. The Gix parts. ** Written by Easion <easion@hanxuantech.com> ** **...
3,927
1,286
#include <iostream> #include <vector> using namespace std; vector<int> solution(vector<int> &A, int K) { const int size = A.size(); if(size != 0 && K % size != 0) { vector<int> result(size); for (int i = 0; i < size; i++) { result[(i + K) % size] = A[i]; } return re...
637
256
// // Created by 30349 on 2021/11/7. // #include "Window_control.h" #include "opencv2/opencv.hpp" #include "SafeQueue.hpp" namespace wc { SafeQueue<cv::Mat> queue_ch1; SafeQueue<cv::Mat> queue_ch2; std::mutex cv_mtx; [[noreturn]] void onFrame_ch1() { cv::Mat frame; // blocking ...
1,017
338
#include <iostream> #include <cctype> #include <cmath> #include <string> using namespace std; int get_minimum_distance(char src, char dest) { int distance; src = tolower(src); dest = tolower(dest); // if the distance between the pointed charecter and the destination charecter is greater than 13, then...
916
302
// Copyright (C) 2018 Vincent Chambrin // This file is part of the Yasl project // For conditions of distribution and use, see copyright notice in LICENSE #include "yasl/gui/pen.h" #include "yasl/common/binding/class.h" #include "yasl/common/binding/default_arguments.h" #include "yasl/common/binding/namespace.h" #inc...
5,307
2,059
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. /*============================================================ ** ** Source: test1.cpp ** ** Purpose: Test for SetThreadDescription. Create a thread, call ** SetThreadDescription, ...
2,958
922
/* * Copyright (c) 2014 - 2017, John O. Woods, Ph.D. * West Virginia University Applied Space Exploration Lab (2014 - 2015) * West Virginia Robotic Technology Center (2014 - 2015) * Intuitive Machines (2017) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * mo...
12,227
4,556
#include "Rect2D.h" #include <utility> #include <assert.h> using namespace Geometry; /** Default constructor. All members initialized to zero. */ CRect2D::CRect2D() { _left = _right = _top = _bottom = 0.0; } /** Constructs an object from the four side of the rectangle. */ CRect2D::CRect2D(double left, ...
2,096
710
#include <catch.hpp> #include "game.hpp" #include <numeric_range.hpp> #include <boost/optional/optional_io.hpp> using Aronda::Board; using Aronda::Game; using Aronda::InvalidMove; using Aronda::Square; using Aronda::SquareState; template <class T> bool contains(const std::vector<T>& container, const T& value) { ...
2,802
940
#include "collisionmodel.h" #include "../graphics/objects/model.h" CollisionModel::CollisionModel(Model* model) : model(model) {}
132
46
// // Created by varnie on 2/23/16. // #include <gtest/gtest.h> #include "../include/Giraffe.h" TEST(StorageTest, CheckRetrievingAllEntities) { struct Foo { Foo() { } }; using StorageT = Giraffe::Storage<>; using EntityT = Giraffe::Entity<StorageT>; StorageT storage; for (int i = 0...
736
290
#include <iostream> using namespace std; class Rectangle { private: double length; double width; public: void setLength(double len) { length = len; } void setWidth(double wid) { width = wid; } double getLength() { return length; } double getWidth() { r...
1,231
428
// Copyright ii887522 #ifndef TEST #define ALLOCATOR_IMPLEMENTATIONS #include <nitro/nitro.h> #include <SDL.h> #include <viewify/viewify.h> #include <iostream> #include <stdexcept> #include <filesystem> #include "../ViewGroupFactory/TexturePackerViewGroupFactory.h" #include "../Any/CommandLine.h" #include <SDL_image...
1,949
702
#include "Interactable.h" #include "Component.h" #include "Mouse.h" #include "MouseEventArg.h" #include "Transform.h" namespace LLWP { Interactable::Interactable() { Mouse::OnHitTest += (*this, &Interactable::OnHitTest); } bool Interactable::OnHitTest(Interactable*& hitted, const MouseEventArg...
982
294
/*============================================================================== Copyright (c) 2017, 2018, 2019 Matt Calabrese 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) =======================================...
1,441
558
// Copyright The Authors 2018. // Distributed under the 3-Clause BSD License. // (See accompanying file LICENSE or copy at // https://opensource.org/licenses/BSD-3-Clause) #if defined(__clang__) #pragma clang diagnostic push // Catch2 uses a lot of macro names that will make clang go crazy #if (__clang_...
4,968
1,781
/* Allegro Wrapper Functions Written by Adel Talhouk in FA21 Colour.cpp */ #include "Colour.h" //Constructor - without alpha Colour::Colour(unsigned __int8 r, unsigned __int8 g, unsigned __int8 b) { mR = r; mG = g; mB = b; mA = 255; } //Constructor - with alpha Colour::Colour(unsigned __int8 r, unsigned __int8 g...
436
195
#include "graphics/libOpenglRender/dll.h" #include "graphics/graphic_calls.hh" #include "base/misc.hh" #include <pthread.h> #include<ctime> #include<X11/Xlib.h> #include <SDL/SDL.h> #include <SDL/SDL_syswm.h> #include "graphics/serialize_graphics.hh" #define RENDER_API_NO_PROTOTYPES 1 #include "graphics/libOpenglRend...
5,847
2,109
//=================================================================================================================== // // mmu-loader.cc -- Functions related to managing the Paging Tables // // Copyright (c) 2017-2021 -- Adam Clark // Licensed under "THE BEER-WARE LICENSE" // See License.md for ...
10,260
3,925
#pragma once #include "get_vertex_location.hpp"
49
19
#include "tic_tac_toe_manager.h" void TicTacToeManager::save_game(std::unique_ptr<TicTacToe> & b) { update_winner_count(b->get_winner()); games.push_back(std::move(b)); } ostream& operator << (ostream& out, const TicTacToeManager& manager) { for(auto& x : manager.games) { out << *x; } ...
1,023
414
#ifndef INPUT_H #define INPUT_H #include <iostream> typedef enum InputType { MOUSE, KEYBOARD } InputType; typedef enum KEY { KEY_ENTER } KEY; typedef enum MOUSE_BUTTON { MB_MIDDLE, MB_LEFT, MB_RIGHT } MOUSE_BUTTON; class Input { private: InputType type; int x, y; // mouse position MOUSE_BU...
671
268
#pragma once #include <Windows.h> #include <string> #include "../../Def.hpp" class Element { public: // Type of the element( Button, TextEdit and etc. ) INT type; // Visible element or not bool visible; // ID of the element INT ID; // Position of the lement FLOAT x, y; // Size of the element FLOAT width, ...
604
217
// Generated from /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar #pragma once #include <fwd-POI.hpp> #include <java/awt/fwd-POI.hpp> #include <java/lang/fwd-POI.hpp> #include <java/lang/Object.hpp> #include <java/awt/Stroke.hpp> struct default_init_tag; class java::awt::BasicStroke ...
2,080
775
#pragma once #ifndef _ENTITYSYSTEMGENERATOR_COMPONENTMAPSSOURCEGENERATOR_HPP_ #define _ENTITYSYSTEMGENERATOR_COMPONENTMAPSSOURCEGENERATOR_HPP_ #include "CodeGenerator.hpp" #include "ComponentDefinitions.hpp" namespace Fnd { namespace EntitySystemCodeGeneration { class ComponentMapsSourceGenerator: ...
487
188
// // Created by kaiser on 18-12-17. // #include <algorithm> #include <iostream> #include <list> #include <string> void elim_dups(std::list<std::string>& words) { words.sort(); words.unique(); } int main() { std::list<std::string> vs{"a", "a", "c", "c", "b"}; elim_dups(vs); for (const auto& s : vs) { s...
349
152
#include <iostream> #include <math.h> using namespace std; const int INTMAX = pow(2, 30); bool is_prime(const int n) { for (int i = 2; i <= sqrt(n); i++) { if (n % i == 0) { return false; } } return true; } int main(int argc, char *argv[]) { int m, n; int count1 = 0, ...
850
285
// // Copyright (C) 2018 Dr. Michael Steffens // // SPDX-License-Identifier: BSL-1.0 // #include "Model/Header.h" namespace Model { Header::Header() { } Header::Header(const std::string& name, const std::string& value) : name(name), value(value) { } Header::Header(const JXXON::Json& json) : name(json.get<decltype...
531
210
/* All modification made by Intel Corporation: © 2016 Intel Corporation All contributions by the University of California: Copyright (c) 2014, 2015, The Regents of the University of California (Regents) All rights reserved. All other contributions: Copyright (c) 2014, 2015, the respective contributors All rights rese...
3,553
1,252
#include <iostream> #include "../fdstream.hxx" #include "../pipe.hxx" int main() { try { mrr::posix::pipe successful_auth; mrr::posix::fd_ostream write_end(successful_auth.write_end()); mrr::posix::fd_istream read_end(successful_auth.read_end()); int received[2]; write_end << 5 << std::endl; write_end...
621
265
/*============================================================================= Copyright (c) 2011-2019 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the sprout Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) ...
1,473
641
/*- * $Copyright$ -*/ #ifndef _FRAME_FILTER_HPP_3532115b_b86b_48e5_a4c1_810606f79dfe #define _FRAME_FILTER_HPP_3532115b_b86b_48e5_a4c1_810606f79dfe #include <tasks/Task.hpp> #if defined(__cplusplus) extern "C" { #endif /* defined(__cplusplus) */ #include "FreeRTOS/FreeRTOS.h" #include "FreeRTOS/queue.h" #if defined...
1,764
710
/*Santiago Zubieta*/ #include <iostream> #include <numeric> #include <fstream> #include <climits> #include <cstring> #include <cstdio> #include <cmath> #include <queue> #include <list> #include <map> #include <set> #include <stack> #include <deque> #include <vector> #include <string> #include <cstdlib> #include <casser...
1,180
500
#include <Eigen/Core> #include <gtest/gtest.h> #include <maplab-common/test/testing-entrypoint.h> #include "vi-map/test/vi-map-generator.h" namespace vi_map { class VIMapTest : public ::testing::Test { protected: VIMapTest() : map_(), generator_(map_, 42) {} virtual void SetUp() { pose::Transformation T_G_...
1,774
704
// ========================================================================== // // Copyright (c) 2017-2018 The University of Texas at Austin. // // All rights reserved. // // ...
10,484
3,767
#pragma once namespace OpenAutoIt { enum class TokenKind { NotAToken, EndOfFile, // '\0' NewLine, // '\n' Comment, // ; Comment VariableIdentifier, // $var FunctionIdentifier, // my_func /* Literals */ IntegerLiteral, // 123 FloatLi...
10,436
3,552
/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors ...
2,118
766
// @Title: 爬楼梯 (Climbing Stairs) // @Author: Singularity0909 // @Date: 2020-06-11 21:10:10 // @Runtime: 0 ms // @Memory: 5.6 MB class Solution { public: int ans[50] = { 0 }; int climbStairs(int n) { if (n <= 3) return n; return ans[n] ? ans[n] : ans[n] = climbStairs(n - 1) + climb...
344
172
// The MIT License (MIT) // Copyright 2015-2020 Vitalii Minnakhmetov <restlessmonkey@ya.ru> // 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 limi...
2,181
725
/* * Copyright (C) 2015-2021 Swift Navigation Inc. * Contact: https://support.swiftnav.com * * This source is subject to the license found in the file 'LICENSE' which must * be be distributed together with this source. All other rights reserved. * * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY ...
51,295
23,242
#include "stdafx.h" #include "DsSetShaderWithIfaces11_0.h" #include "..\Streamer\CodeGenerator.h" #include "D3DDeviceWrapper.h" #include "ShaderWrapper.h" namespace Commands { void DsSetShaderWithIfaces11_0::UpdateDeviceState( D3DDeviceWrapper *pWrapper, D3DDeviceState* pState ) { pState->DS.m_Shader = this; p...
1,680
766
/* * Copyright 2010, The Android Open Source Project * * 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...
57,052
17,427
#include "ConnectOptionDialog.h" #include "ui_ConnectOptionDialog.h" #include "QFileDialog" #include "QApplication" ConnectOptionDialog::ConnectOptionDialog(QWidget *parent) : QDialog(parent), ui(new Ui::ConnectOptionDialog) { ui->setupUi(this); connect(ui->checkBoxWillFlag, SIGNAL(toggle...
8,462
2,799
/* * config_test.cc * */ #include "util/config.h" #include <iostream> int main() { kit::Config config; config.Init("./test/example_conf"); std::string str_value; int ret = config.GetStr("str", &str_value); if (ret == 0) { std::cout << "get str: " << str_value << "\n"; } else { ...
1,446
583
/** * @file * @author Jason Lingle * @brief Makes C automatic/static arrays accessible to trusted Tcl. */ /* * array.hxx * Make C arrays accessible to trusted Tcl. * * Created on: 12.07.2010 * Author: jason */ #ifndef ARRAY_HXX_ #define ARRAY_HXX_ #include <stdexcept> #include <exception> #include "...
2,307
788
class Solution { public: bool isValid(string s) { list<char> stack; for( char c : s ) { switch ( c ) { case '(': case '{': case '[': stack.push_back(c); break; case ')': ...
799
201
/* -*- c++ -*- */ /* * Copyright 2002,2006 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio 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, or (at your o...
6,782
2,612
/* CODE SAMPLE # 002: Disparity panorama This code will grab the basic stereo panoramas (left and right images) and ALSO the Disparity panorama, and all these 3 images are displayed in an opencv window >>>>>> Compile this code using the following command.... g++ 002_disparity_panorama.cpp ../lib/libPAL.so `pkg-con...
4,210
1,664
// // Created by Alex Chi on 2019-07-01. // #include "gtest/gtest.h" #include "Instruction.hpp" TEST(Instruction, CorrectSize) { EXPECT_EQ(sizeof(Instruction), 4); } TEST(Instruction, InstructionR) { // 10987654321098765432109876543210 InstructionR inst(0b10101010101010101010101010101010...
2,493
1,562
/* * Shader class header * * This file is part of the "SoftPixel Engine" (Copyright (c) 2008 by Lukas Hermanns) * See "SoftPixelEngine.hpp" for license information. */ #ifndef __SP_SHADER_CLASS_H__ #define __SP_SHADER_CLASS_H__ #include "Base/spStandard.hpp" #include "Base/spInputOutput.hpp" #include "Base/spB...
13,179
3,672
// Copyright (c) 2007-2012 Hartmut Kaiser // Copyright (c) 2011 Bryce Adelstein-Lelbach // // 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) #if !defined(HPX_EXAMPLES_STUBS_TEMPLATE_FUNCTION_ACCUMULATOR_JUL_...
3,942
1,127
#include "types.h" #include "fat32.hh" static void strip_char(char *buf, char s) { assert(buf); char *lastch = buf; while (*lastch) lastch++; lastch--; while (lastch >= buf && *lastch == s) { *lastch = '\0'; lastch--; } } u32 fat32_dirent::cluster_id() { return ((u32) cluster_id_high << 16u)...
7,189
2,964
// Paste me into the FileEdit configuration dialog #include "assert.h" #include "ctype.h" #include "float.h" #include "math.h" #include "stdio.h" #include "string.h" #include "stdlib.h" #include "stdarg.h" #include "time.h" #include "algorithm" #include "numeric" #include "functional" #include "utility" #include "bits...
7,356
3,166
#include "pcheader.h" #include "Components.h" namespace OverEngine { SerializationContext* SpriteRendererComponent::Reflect() { static bool initialized = false; static SerializationContext ctx; if (!initialized) { initialized = true; if (!Serializer::GlobalEnumExists("TextureWrapping")) { Seri...
4,046
1,552
#ifndef JEFF_NATIVE_AGENT_TYPE_HPP #define JEFF_NATIVE_AGENT_TYPE_HPP #include <jni.h> #include <jvmti.h> #include "Object.hpp" class Type : Object { public: Type(); Type(const std::string signature); virtual ~Type(); private: const std::string signature; public: static const Type *const from...
552
213
/* ColorTransformer.hpp the base class for all color transfomers Li-Yi Wei 09/26/2009 */ #ifndef _COLOR_TRANSFORMER_HPP #define _COLOR_TRANSFORMER_HPP #include <vector> using namespace std; class ColorTransformer { public: typedef vector<float> Vector; // each basis vector component can be either...
657
221
// // camera.cpp // Goby // // Created by Jonathan Graham on 8/18/19. // #include "camera.hpp" namespace Goby { } // namespace Goby
142
60
#include "io_count_fixture.hpp" #include <boost/serialization/export.hpp> #include <boost/serialization/map.hpp> #include <boost/test/unit_test.hpp> #define NVP(name) BOOST_SERIALIZATION_NVP(name) using boost::serialization::make_nvp; namespace { // used to detect when base_diamond class is saved multiple times int d...
12,908
4,852
#include <iostream> #include <string> // to_string #include <iomanip> // setprecision using namespace std; bool stop = false; long long amount = 0; string password; clock_t start; const char Alphabet[62] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', ...
2,275
832
#pragma once #include <cstddef> #include "detail/index_sequence.hpp" namespace mil { namespace utils { template <std::size_t... Idx> using index_sequnece = detail::index_sequnece<Idx...>; template <std::size_t N> using make_index_sequence = typename detail::make_index_sequence<N>::type; } // namespace utils } /...
336
117
/* mbino - mbed APIs for the Arduino platform * Copyright (c) 2017, 2018 Thomas Kemmer * * mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * 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 ...
4,627
1,642
/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors...
3,614
1,080
/* Copyright 2016 Gleb Popov <6yearold@gmail.com> 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, this list of conditions and the f...
4,202
1,478
// Include CBT #include "cbtBufferLayout.h" NS_CBT_BEGIN cbtU32 GetByteSize(cbtBufferDataType _dataType) { switch (_dataType) { case cbtBufferDataType::CBT_S8: case cbtBufferDataType::CBT_U8: return 1; case cbtBufferDataType::CBT_S16: case cbtBufferD...
675
251