blob_id
stringlengths
40
40
content_id
stringlengths
40
40
repo_name
stringlengths
5
114
path
stringlengths
5
318
language
stringclasses
5 values
extension
stringclasses
12 values
length_bytes
int64
200
200k
license_type
stringclasses
2 values
content
stringlengths
143
200k
abfdd3f4897960e2d91eabf8c5efe2dd0cfbf209
5a1e5e42cafa0b6c99253d1a664f41bfef6c9793
niuxu18/logTracker-old
/second/download/collectd/gumtree/collectd_repos_function_545_collectd-5.0.4.cpp
C++
cpp
3,763
no_license
int ps_read_process (int pid, procstat_t *ps, char *state) { char filename[64]; char buffer[1024]; char *fields[64]; char fields_len; int buffer_len; char *buffer_ptr; size_t name_start_pos; size_t name_end_pos; size_t name_len; derive_t cpu_user_counter; derive_t cpu_system_counter; long long unsi...
5b28024d980ff86522ee78b517a612fe82f7ad98
30b6bb9026a19a85f3c8f9fe6aafb2697086e8c7
Alex-Tsvetanov/Testing-Scripts
/NOI/sols/extracted/noi2018-1-smg/E/BHM/contest.cpp
C++
cpp
359
no_license
#include<iostream> using namespace std; int main(){ long long n,t,f,x; cin>>n>>t>>f>>x; t--; n-=f; if(n*x<t*60){ cout<<"YES\n"<<t*60-n*x; } if(n*x==t*60){ cout<<"EXACT!"; } if(n*x>t*60){ cout<<"NO\n"<<n*x-t*60<<"\n"; } if((n*x-t*60)%x==0){ cout<<(n*x-t*60)/x; }else{ cout<<(n*x-t*6...
770800ee57647ef24afa3004c1eddc6ca30a5899
a9b60c963cd050e9694efa30039f9501cc975285
SymbianSource/oss.FCL.sf.mw.uiresources
/skins/AknSkins/rlpluginsrc/AknsRlEffectPluginNoise.cpp
C++
cpp
11,974
no_license
/* * Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-...
79d70281b11e3ca35a0f2c06590178682fc8e0f8
0e9da7f504549467e8cfcbe29fa1ec075ef1d6a3
melfaiz/CPP-projects
/project3-PACMAN/src/source/corona.cpp
C++
cpp
3,230
no_license
#include "../include/corona.hpp" #include <iostream> #include <time.h> void corona::restart(){ sickness_counter = 0; srand(time(NULL)); which_monster = rand()%3; time_virus = 0; time_random = LATEST_VIRUS; set_v = false; blinky_time = 0; pinky_time = 0; inky_time = 0; clyd...
6ba17ce83b4bba0ecacca51db57582bcc168e02e
8507b50031eb158467141574039db8237caaba2e
gearwheels/OOP
/ЛР3/hexagon.hpp
C++
hpp
1,082
no_license
#pragma once #include "figure.hpp" #include <cmath> class Hexagon: public Figure { private: int length; public: Hexagon() : Figure() { length = 0; } Hexagon(double x1, double y1, int length); double S() override; Pair Center() override; std::vector<Pair> Coord() ...
41769b8e7802259fb522e8761d4e59fca7acd80c
e9f10bcdef408b19c04b1051244f5d300bcba861
xariniov9/Competitive-programming
/Competitive Playlist/ssums.cpp
C++
cpp
1,185
no_license
#include<bits/stdc++.h> using namespace std; long long a[2* 1000005]; long long b[2* 1000005]; long long dp[2* 1000005]; long long solveDP(int n){ dp[0] = a[0]; dp[1] = a[0] + a[1]; long long res = -1e18; int s = 0; for(int i=2; i<n; i++){ if(i-s+1 <= n){ dp[i] = max(a[i], dp[i-...
6db7c8db0efcef2bfb81abfeb14ad8dca06f1db2
d8cd472b430a0d93b4200f403a8919d32a2c2963
WopsS/RED4ext.SDK
/include/RED4ext/Scripting/Natives/Generated/quest/ToggleSwitchSeatsForPlayer_NodeType.hpp
C++
hpp
697
permissive
#pragma once // clang-format off // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/Scripting/Natives/Generated/quest/IVehicleManagerNodeType.hpp> namespace RED4ext { namespace quest { struct ToggleSwitchSeatsForPlayer_NodeType : quest::IVehi...
557d2138cd29f025e7bcae916500fcc6f453baac
ef2418f4d8f50f067c54b5cad1d7057c7faf93cb
WopsS/RED4ext.SDK
/include/RED4ext/Scripting/Natives/Generated/game/IMarketSystem.hpp
C++
hpp
663
permissive
#pragma once // clang-format off // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/Scripting/Natives/Generated/game/ScriptableSystem.hpp> namespace RED4ext { namespace game { struct IMarketSystem : game::ScriptableSystem { static constex...
3aaa39fdf3941d9c2cc4ce2a6215676cf098e2db
cf7e986ae7a10b5b2a3a917c536f5c388c7f86d0
coffeine-009/MarioIsReturning
/src/Library/Coffeine/Configuration/Ini/Section.cpp
C++
cpp
7,187
no_license
/// *** Configuration :: Ini :: Section *** *** *** *** *** *** *** *** *** /// /** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** * * * * @copyright (c), 2013 by Vitaliy Tsutsman * * @author Vitaliy Tsutsman ...
219acc839bc68c4d16d04aff655fd23804634801
de532c687c8b618d4bb59f03b114bf95ecacf281
rahulmehta87/CarND-Extended-Kalman-Filter-Project
/src/kalman_filter.cpp
C++
cpp
1,832
no_license
#include "kalman_filter.h" #include <iostream> using namespace std; using Eigen::MatrixXd; using Eigen::VectorXd; // Please note that the Eigen library does not initialize // VectorXd or MatrixXd objects with zeros upon creation. const double pi = 2 * acos(0.0); KalmanFilter::KalmanFilter() {} KalmanFilter::~Kalm...
8840d50c849230ea55ce2a2dbad84b9169c551fa
9c8db2a3fc6d4022770238ea44b80e81c4a69d7c
konistehrad/framework-arduino-samd-sparkfun
/cores/arduino/main.cpp
C++
cpp
1,514
no_license
/* Copyright (c) 2015 Arduino LLC. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version...
40907cd16d97ac88f169241d0138c48f7af0eccb
810bd44c31a9c5a7c29d00e90fd5e01bd01a2687
Haoyang-Chen/C-Learn
/100以内质数/100以内质数/main.cpp
C++
cpp
520
no_license
// // main.cpp // 100以内质数 // // Created by Haoyang Chen on 2020/10/30. // #include <iostream> using namespace std; int main(int argc, const char * argv[]) { int b=0; for(int a = 1;a<=1000;a++) { int c=0; for(int b=2; b<a;b++) { if (a%b==0) { ...
259f2036a927854482ef4abb0f1e53487758bbbb
ed28d999bd065ba05dc907a732951b69b5ec6b6a
GanXueJun/Samples
/ascendbase/src/Base/CommandParser/CommandParser.cpp
C++
cpp
7,730
no_license
/* * Copyright (c) 2020.Huawei Technologies Co., Ltd. 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 ...
53e6c3029eef983c054c3789cae556a243dd143f
7c49f4f75f3f8d1394d160d66e104bdecb6e2a35
suryakiranmg/Coding_Prep
/Geek4Geeks/Vector.cpp
C++
cpp
991
no_license
///////------------// CPP implementation for Adding one to number represented by digits //------------------///// #include <bits/stdc++.h> using namespace std; // function for adding one to number void incrementVector(vector<int> &A) { int carry; //Remove any zero's at the beginning while((A.size() ...
ad35ea8b9aae4df6f95e5ed2188c694b0f8e98d2
0cea0e21542fd138255ceece865bb628db622990
derek-012/clabs
/Lab7/lab7_2/is_number.cpp
C++
cpp
386
no_license
// // Created by Andrew on 07.05.2021. // #include <string> #include "is_number.h" // Проверка на число bool is_number(std::string str) { int size = str.length(); if (size == 0) return false; for (int i = 0; i < size; i++) { if (str[i] < '0' || str[i] > '9') { ret...
1a5e56af16f417bb542accbb70c5b11b2e6becf2
8a3d4f63b96af502867472e95d96f21357077bed
PeterZhouSZ/Sketchware
/untitled/OpenGLDisplayWidget.cpp
C++
cpp
6,531
no_license
#include "OpenGLDisplayWidget.h" #include <QKeyEvent> #include <QMouseEvent> #include <qkeyeventtransition.h> #include <cmath> #include <cstdlib> #include <../kt84/graphics/graphics_util.hh> //#include <kt84/zenity_util.hh> #include <../kt84/tinyfd_util.hh> #include <boost/algorithm/string.hpp> #include "SketchRetopo\S...
12647f257c07d7e713a6bb70425542dcb91e3bc7
4ca771016c2dea3ef5542e1728001ee9e25a8c86
idcodeoverflow/ACMSolvedProblems
/Problems/1180bijele.cpp
C++
cpp
462
permissive
//David Israel García Alcázar //ID_codeoverflow //bijele #include <stdio.h> int main() { int pieces[5], t = 0, j = 0; scanf("%d",&t); for(j = 0; j < t; j++) { scanf("%d %d %d %d %d %d", &pieces[0],&pieces[1],&pieces[2],&pieces[3],&pieces[4],&pieces[5]); printf("%d %d %d %...
921661c391b76b7ebdfe25a88bd70b5b69d31aa8
f75aea8c786cbe9359d9c8a3b9977c5c599a3e8e
pokjnb/WDL
/WDL/wingui/virtwnd-iconbutton.cpp
C++
cpp
30,637
no_license
/* WDL - virtwnd-iconbutton.cpp Copyright (C) 2006 and later Cockos Incorporated 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 us...
49a146be35ed6647025ca24752bed39e3e161e1e
1ea2338b5b042acfffd5f7c794825c9ed442a428
dbermond/intel-graphics-compiler
/IGC/Compiler/CISACodeGen/HalfPromotion.cpp
C++
cpp
8,617
permissive
/*========================== begin_copyright_notice ============================ Copyright (C) 2017-2021 Intel Corporation SPDX-License-Identifier: MIT ============================= end_copyright_notice ===========================*/ //===----------------------------------------------------------------------===// //...
fe3bb74d2f9ddc6d8baaaec983321c054e294765
0ddb6d78df433ab903d10e11a14b0155aee72279
arichardson/juliet-test-suite-c
/testcases/CWE401_Memory_Leak/s01/CWE401_Memory_Leak__char_malloc_43.cpp
C++
cpp
3,047
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE401_Memory_Leak__char_malloc_43.cpp Label Definition File: CWE401_Memory_Leak.c.label.xml Template File: sources-sinks-43.tmpl.cpp */ /* * @description * CWE: 401 Memory Leak * BadSource: malloc Allocate data using malloc() * GoodSource: Allocate data on the...
7051bb7476d9af5ddfdbbb08de79d3e5cb729221
e2908ebe42520f43fae8899cbd1e877e1a17a733
gustavo-iniguez-goya/openambit
/src/movescount/movescountlogchecker.cpp
C++
cpp
4,240
no_license
#include "movescountlogchecker.h" #include "movescount.h" MovesCountLogChecker::MovesCountLogChecker(QObject *parent) : QObject(parent), running(false), cancelRun(false) { this->moveToThread(&workerThread); workerThread.start(); } MovesCountLogChecker::~MovesCountLogChecker() { cancel(); workerThr...
e9e6cc52147282a11acae03d20a322b0f4c5cbf9
736a9110ddc7624cf983263fb058b93f9e087196
s00500/esphome
/esphome/components/custom/sensor/custom_sensor.cpp
C++
cpp
324
permissive
#include "custom_sensor.h" #include "esphome/core/log.h" namespace esphome { namespace custom { static const char *TAG = "custom.sensor"; void CustomSensorConstructor::dump_config() { for (auto *child : this->sensors_) { LOG_SENSOR("", "Custom Sensor", child); } } } // namespace custom } // namespace esph...
18fbc62b27588f770ec176352ed4d19cd5a50a53
ebc938652733235dc3dad76f1b71b3fa18fe536c
Twinklebear/libbat
/bat/bat_handle.cpp
C++
cpp
6,707
permissive
#include "bat_handle.h" #include "bat_file.h" #include "pbat_file.h" #include "util.h" BATHandle::BATHandle(const std::string &fname) { if (get_file_extension(fname) == "bat") { ba_tree = std::make_shared<BATree>(map_ba_tree(fname)); attributes = ba_tree->attributes; } else { pba_tree =...
0ad45c92b5a53eaa35cf1e05add493970a95dbc5
007de8e3e55a0703b234925c32204b9712b61d63
TUE-EE-ES/ParetoCalculator
/src/ParetoCalculatorLibrary/src/quantity.cpp
C++
cpp
12,216
permissive
// // The MIT License // // Copyright (c) 2008-2019 Eindhoven University of Technology // // 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 ...
a7c0e143b87dbfd583697d42a40c15409b525301
9d2bfa97c2d1b01f65ebbdbfd80fa02661129786
andyrobert3/UVa-Online-Judge
/midtest prep/main.cpp
C++
cpp
891
no_license
#include <bits/stdc++.h> using namespace std; int main() { int num, cs; cin >> num >> cs; vector<int> soldiers; // insertion for (int i = 0; i < num; i++) soldiers.push_back(i); int start, endTroops; while (cs--) { cin >> start >> endTroops; vector<int>::iterato...
4642080803b957660e46f613de5e3d78096dfe03
1f17afcd70015ab82add9ea0dc1c0841dc2298fb
MrZZZZ1993/RPGGame
/Isaac/Isaac/NewGame.cpp
C++
cpp
3,710
no_license
#include "stdafx.h" #include "NewGame.h" CNewGame::CNewGame() { m_pNewGame = nullptr; m_pOption = nullptr; m_speed = 0; } CNewGame::~CNewGame() { delete m_pNewGame; delete m_pOption; } void CNewGame::Init() { TiXmlDocument *doc = new TiXmlDocument("Data.xml"); doc->LoadFile(); TiXmlElement*element = doc->Fi...
e7b75d1eed1319c060d576a61cb1a0b94d446ad2
dec343d5d57dc1b3efe5437dfa2e97b2df04c4ef
sifeng666/M-loam
/src/laserOdometry.cpp
C++
cpp
21,956
no_license
// // Created by ziv on 2020/10/26. // #include "helper.h" #include "utils.h" #include "lidar.h" #include "tools/calibration.hpp" using namespace tools; static const int odom_sleep = 2; // 2ms class LidarInfo { public: using Ptr = std::shared_ptr<LidarInfo>; public: int i; ...
e997e28ee1392ffc7a292ebc20f7c5b6eb45e221
20afb67a1532b1da37747c29f5c4392e933ba6dd
altwajre/scal
/src/benchmark/std_glue/glue_ts_cas_deque.cc
C++
cc
735
permissive
// Copyright (c) 2012-2013, the Scal Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #include <gflags/gflags.h> #include "benchmark/std_glue/std_pipe_api.h" #include "datastructures/ts_ti...
1e3068bff15e875c863edbd8122caba3e8d41b60
7a523fd409c98cf043699151ba4b3e9f2a3cab80
fly19920820/3D-Tetris
/program/201302_Project_Tetris/source/BaseApplication.cpp
C++
cpp
17,829
no_license
/* ----------------------------------------------------------------------------- Filename: BaseApplication.cpp ----------------------------------------------------------------------------- This source file is part of the ___ __ __ _ _ _ /___\__ _ _ __ ___ / / /\ \ (_) | _(_) // // _` ...
7fd0c3fe1633460e5c375ed08e2e56b4882abe0e
0a1c3e95c3c02f14dbca01efc86e3d4d220488cb
brunovergilio/Vulkan-Demos
/Vulkan/Internal/VulkanRenderer/Skybox.cpp
C++
cpp
6,302
no_license
#include "Skybox.h" #include "VulkanPipelineLayout.h" #include "VulkanPipeline.h" #include "VulkanShader.h" #include "VertexLayout.h" #include "VulkanImageView.h" #include "VulkanFence.h" #include "Primitives.h" #include "VulkanCommandPool.h" #include "VulkanQueue.h" Skybox::Skybox() { } Skybox::~Skybox() { } voi...
87c7d10f8d6bd8966f2e2d2f6eda8e561db786aa
63c13790706ba87778b5dd66804a57d68b571863
yakuizhao/intel-vaapi-driver
/android/android_9/hardware/qcom/display/msm8909/libcopybit/copybit_c2d.cpp
C++
cpp
63,941
permissive
/* * Copyright (C) 2008 The Android Open Source Project * Copyright (c) 2010-2015, The Linux Foundation. All rights reserved. * * Not a Contribution, Apache license notifications and license are retained * for attribution purposes only. * * Licensed under the Apache License, Version 2.0 (the "License"); * you m...
7afcb6ec1a8c9e5abc5f6ae16a5af58a32b276a8
ba281c2fc19d18f2c4f5b167502073e598bd4adf
dmitry-a-bogdanov/bolgenos-ng
/kernel/x86/src/irq.cpp
C++
cpp
5,547
no_license
#include <bolgenos-ng/irq.hpp> #include <algorithm.hpp> #include <atomic.hpp> #include <bolgenos-ng/error.h> #include <bolgenos-ng/interrupt_controller.hpp> #include <ext/scoped_format_guard.hpp> #include <x86/cpu.hpp> #include <logger.hpp> #include "traps.hpp" LOCAL_LOGGER("irq", lib::LogLevel::NOTICE); irq::In...
248c096638f1432ddc967e0306484ce7c9d65cfb
8ea2a00afe8b0a34039c680937662c3761e3daaf
MillsWJack/TicTacToe
/TicTacToe2/Source.cpp
C++
cpp
6,344
no_license
// Plays the game of tic-tac-toe against a human opponent // Uses pointers instead of refernces for function parameters #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; // global constants const char X = 'X'; const char O = 'O'; const char EMPTY = ' '; const char TIE ...
536de02c461a66f0d033dbe6f6f2833bff60807e
c60ad768328b9d524d007265f7fc551b89b5b519
DongChengrong/ACM-Program
/UVA/1500-1599/1584_error.cpp
C++
cpp
3,170
no_license
#include<cstdio> #include<cstring> using namespace std; const int maxn=100+10; char s[maxn]; int A[maxn],B[maxn],C[maxn],D[maxn],temp[maxn]; int An,Bn,Cn,Dn,n; int less(char c) { switch(c) { case 'A' : { int i=1; while(A[n]!=1) { char c=s[A[0...
4c14c749db60891eb6c8d5a06fb57c1706ef94ee
749a91b05afacbb072127280ea596b5f4d50945a
arunjeetsingh/apl-core-library
/unit/component/unittest_flexbox.cpp
C++
cpp
50,872
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "license" ...
4679fa3831effced5e0b14a9b240a5cb1258fd81
6aca9af17ba3245d12c9bf8ea35fbc258914bba6
alongoria/mines
/CSCI261_programming_concepts_c++/28_movingSquares/src/main.cpp
C++
cpp
459
no_license
/* CSCI261 Homework 28: movingSquares * * Author: ADAM LONGORIA * * This program is an object-oriented implementation of animating * eight colored squares whose movement is determined by the output * of a sin() function. */ #include "ofMain.h" #include "testApp.h" #include "ofAppGlutWindow.h" #include "test.h" ...
9ef2328cb03117614d81f4f469c4a2288020f6f4
eadb504b093cc9a91cdd172dc8ee419c9b7c70e6
Surbhi-Kohli/DSandAlgo
/Hashing/LengthOfLongestSubarrayWithSumK.cpp
C++
cpp
1,983
no_license
/* Longest sub-array having sum k Given an array arr[] of size n containing integers. The problem is to find the length of the longest sub-array having sum equal to the given value k. Examples: Input : arr[] = { 10, 5, 2, 7, 1, 9 }, k = 15 Output : 4 The sub-array is {5, 2, 7, 1}. Input : arr[] = {-5, 8...
7b041c2d0e91e2fc6ae8f5d1d8a6fbc389727537
92e898672ce0b7dc00919628974b25c433c1418d
pylaterreur/mirror
/include/mire/mirror/reg/std.hpp
C++
hpp
1,119
permissive
/** * @file mire/mirror/reg/std.cpp * @brief Pre-registering of the std namespace * * Copyright 2012-2013 Matus Chochlik. Distributed under the Boost * Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ #ifndef MIRROR_REG_STD_131104211...
ad44b7df4685f700d8fe54015557ff55915c1eca
f3542786fe4cb7157195793072d6d491f03e09fe
jersnetwork/inventions
/projects/C++/sniffer/thread_decs.cpp
C++
cpp
2,269
no_license
#ifndef _TDECS_CPP_ #define _TDECS_CPP_ #include <set> #include <string> #include "sniffer.h" #include "qtcpstack.h" #include "thread_decs.h" template <class T1, class T2> StackBuilder<T1, T2>::StackBuilder(T1& sr1, T2& sr2, threading::lock& l1, threading::lock& l2, threading::condi...
d465209acf444b24e0062b0de5ad7bd3ec7f9a16
fc297f49e5c4087d5000dc37e6cb5c29a1ca89b9
BilhaqAD07/AlgoritmaPemrograman
/SEMESTER 1/ALPROM 1/PRAKTIKUM/Praktikum 3/P3_120140141_02.cpp
C++
cpp
521
no_license
/* ============================================ NIM/Nama : 120140141/Bilhaq Avi Dewantara Nama file : LP3_120140141_Fw Tanggal : 14 November 2020 Deskripsi : Program Forbidden Word ============================================ */ #include <iostream> using namespace std; int main () { string w; cin >> w; while(...
f7eea2a37eb4af9d64d21b574e58f930ef2c2618
c520e2c708bd0149b58ac258e16004c4567fd4e6
MarianoCinalli/tallerDeProgramacionI
/server/src/controller/actions/ChangeActivePlayer.cpp
C++
cpp
387
no_license
#include "controller/actions/ChangeActivePlayer.h" ChangeActivePlayer::ChangeActivePlayer() { } void ChangeActivePlayer::execute(Pitch* pitch, std::string user) { log("ChangeActivePlayer: Cambiando el jugador activo.", LOG_DEBUG); pitch->changeActivePlayer(user); } bool ChangeActivePlayer::valid(Pitch* pitch...
f70127ecbe6ef233225b5878cd43ffdf22277a40
53dc98d2ae6d0d728a80943045f7fcaba49f9bd8
HanxiLiu/sensor_platform
/Adafruit_BMP280.cpp
C++
cpp
12,075
no_license
/*! * @file Adafruit_BMP280.cpp * * This is a library for the BMP280 orientation sensor * * Designed specifically to work with the Adafruit BMP280 Sensor. * * Pick one up today in the adafruit shop! * ------> https://www.adafruit.com/product/2651 * * These sensors use I2C to communicate, 2 pins are requ...
5979626768a110cb6e649e2135eb08b3d0dad9ea
557993c1003786fd819c770791287bef63f59ac4
lc19890306/Exercise
/leetcode/Largest_Number.cc
C++
cc
606
no_license
class Solution { public: string largestNumber(vector<int>& nums) { vector<string> strs; string ret; for (auto &&num : nums) strs.push_back(to_string(num)); sort(strs.begin(), strs.end(), greater()); for (auto &&str : strs) ret += str; // case: {}, {0,...
69f846337b6468c370f4884eef6ab16be7e4ff5a
73d81f6c5b8d82bce3491b6c43b9965a59c3e9a5
WillowOfTheBorder/boost.simd
/test/function/scalar/erfc.cpp
C++
cpp
3,698
permissive
//================================================================================================== /*! Copyright 2015 NumScale SAS Copyright 2015 J.T. Lapreste Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //=====...
43dc95d2b9dc9a4a2ea7bd2c5509d255c2afe4cc
38c6dd4d8a0a91e5a0f905dfd0004d6a1207258f
Taj-Coin/tajcoin
/src/qt/guiutil.cpp
C++
cpp
16,325
permissive
#include <QApplication> #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #...
43e94178db63e0fffe6325c8b94b7a8894c2f875
a1f8135a398a727ee7059cbe5473a31a799fef43
ciencute/DATA-STRUCTURES--ALGORITHM
/DATA-STRUCTURES/Stack/Stack_b1/Stack_b1/main.cpp
C++
cpp
220
no_license
// // main.cpp // Stack_b1 // // Created by vutrungkien on 15/05/2021. // #include <iostream> int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n"; return 0; }
7b3a582b002dfb2590279d4a44d31c739156d616
002a24777892343395f8c4db7fae320a57af2763
dash-project/dash-apps
/cowichan/baSrcPaper/cilk/winnow/expertseq/main.cpp
C++
cpp
2,629
no_license
/* * winnow: weighted point selection * * input: * matrix: an integer matrix, whose values are used as masses * mask: a boolean matrix showing which points are eligible for * consideration * nrows, ncols: the number of rows and columns * nelts: the number of points to select * * output: * point...
6d287f9dc57594dc5650477b9408cea75f3f0671
8b75bcb9e1c58f98fba813a02613a4e4874e5ea0
bbom16/study_algorithm
/algorithm_2019_cplus/algorithm_2019_cplus/14501.cpp
C++
cpp
1,073
no_license
// // 14501.cpp // algorithm_2019_cplus // // Created by bomin jung on 2019. 5. 30.. // Copyright © 2019년 bomin jung. All rights reserved. // #include <stdio.h> #include <iostream> #include <vector> #include <utility> using namespace std; int main(int argc, char * argv[]){ std::ios_base::sync_with_stdio(fals...
86c8a65fb3771b20d68c684a9a84ce846bdfc7aa
d5b9d960964698b094abe9bd021d6fcc6586fec9
mattmatt0/bac-a-sel
/src/ofApp.cpp
C++
cpp
2,399
no_license
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ RigidBody body(20,800,200,200); // On crée un RigidBody, body this->personnage = body; // Qui devient notre personnage // "this->..." signifie que l'on accède à un attribut (variable) ou à une // mé...
62100552d8d304c26537e7ddc95da5a87cc82a0f
08d2f9483cacc0a453d2a4c79d39edc0936c503d
cnirgdev/librdkafka
/src-cpp/KafkaConsumerImpl.cpp
C++
cpp
7,276
permissive
/* * librdkafka - Apache Kafka C/C++ library * * Copyright (c) 2015 Magnus Edenhill * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the a...
ab386ff87431a1c1f17bf784c29af34e3b8fd6f1
0536d16aa48457013ba520eb681ff8b1c42a17ed
PsychoLogicAu/GPUSteer
/plugins/ChokePointGroup.cpp
C++
cpp
52,133
permissive
// ---------------------------------------------------------------------------- // // // OpenSteer -- Steering Behaviors for Autonomous Characters // // Copyright (c) 2002-2003, Sony Computer Entertainment America // Original author: Craig Reynolds <craig_reynolds@playstation.sony.com> // // Permission is hereb...
10b5ab5e9f9b06cf1a9ea8c8f8842228062918e4
b8096d110501c7b7e37dc84404ba45961ad19799
15831944/airengine
/AirClient/AirEnginePlugin/AirAIRecast/ConvexVolumeTool.cpp
C++
cpp
7,497
no_license
// // Copyright (c) 2009-2010 Mikko Mononen memon@inside.org // // 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 any purpose...
f13496bb8133e632cf5d3b8200f767527604846c
d821d751ad346e30571d28cbbf6b7e63f584fcb9
kchen445/cmpt-106-checkers
/ml/tsafe_ptr.hpp
C++
hpp
8,836
no_license
// // tsafe_ptr.hpp // process // // Created by Jeremy S on 2017-11-17. // Copyright © 2017 Jeremy S. All rights reserved. // #pragma once #include <cstdlib> #include <thread> #include <chrono> #include "__mem.hpp" #ifndef PTR_DELAY_TIME_NANO #define PTR_DELAY_TIME_NANO 100 #endif namespace lang { // T...
4c10b70d579cd819a3ea11f1192ffaa7d0e06950
7c55c1579320a74dc1191eac8ba0075f9485916a
PCharlie/AMICI
/models/model_jakstat_adjoint/model_jakstat_adjoint_root.cpp
C++
cpp
426
permissive
#include <include/symbolic_functions.h> #include <string.h> #include <include/udata.h> #include <include/udata_accessors.h> #include "model_jakstat_adjoint_w.h" int root_model_jakstat_adjoint(realtype t, N_Vector x, realtype *root, void *user_data) { int status = 0; UserData *udata = (UserData*) user_data; realtype *...
8d7dd73750b0f45e7e13423aaa7797829dd1b21c
6191299a5cf5b3eb976c52585381038cfb6bd10b
koosaga/olympiad
/POI/Potyczki/pa15_neo.cpp
C++
cpp
1,309
permissive
#include <bits/stdc++.h> using namespace std; typedef long long lint; typedef pair<int, int> pi; const int mod = 1e9 + 7; const int MAXN = 100005; const int MAXM = 12; int n, m, k; char s[MAXN], t[MAXM]; lint l[MAXM][MAXN], r[MAXM][MAXN]; lint solve(int s, int e){ if(s == e) return 0; int mi = (s+e)/2; lint ret = ...
4c4dc8bb4cccb91b32aa1f1840d0a64aaaffb34e
d51f1476b55df2cab607f7ef784eb8b9741967de
PACGlobalOfficial/PAC
/src/chainparams.cpp
C++
cpp
44,923
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Copyright (c) 2014-2020 The Dash Core developers // Copyright (c) 2018-2020 The PACGlobal developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/...
d382880e7ca059de5359c7ec17929290b471ab71
ab9a77eb3626cbda75d971f0c19e57350945f0ba
DoubleJump/gblib
/font_generator/src/primitive_types.cpp
C++
cpp
348
no_license
#define internal static #define local_persist static #define global_var static typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typedef int8_t i8; typedef int16_t i16; typedef int32_t i32; typedef int64_t i64; typedef i32 b32; typedef float f32; typedef double f64...
93931c72e49425f8dc2fd1562a467dbc1aa39b00
188e5f80e3d37827082779a74d334ddcf975172e
rakesh-iiest/ScaffCC
/llvm/lib/Transforms/Scaffold/GenOpenQASM.cpp
C++
cpp
35,351
permissive
//===- GenOpenQASM.cpp - Generate OpenQASM output -----------===// // // The LLVM Scaffold Compiler Infrastructure // // This file was created by Scaffold Compiler Working Group // //===----------------------------------------------------------------------===// #include <sstream> #include <algorith...
af73496695a0b533c80754053792cadfacfb83fe
0ad2120db1a994354e543ef749edc82c21cb7970
boothc27/CS473-Project-3
/Vec3d.cpp
C++
cpp
268
no_license
// -- // -- // -- // Vec3d.cpp // -- // -- // -- // #include "Vec3d.h" Vec3d::Vec3d() { this->x = 0.0; this->y = 0.0; this->z = 0.0; } Vec3d::Vec3d(double ix, double iy, double iz) { this->x = ix; this->y = iy; this->z = iz; }
268784e7f389754cbe16a4d0a0871ad1c9a8e825
19b96ba3d8ead40b3b7a0e45f14c2904e2345026
salvomob/Esercitazioni_Prog2
/esercizi_contest/area esercizi contest/livello 3/ins/insert.cpp
C++
cpp
1,999
no_license
#include<iostream> #include<fstream> #include"BST.cpp" using namespace std; int main() { ifstream in; ofstream out; in.open("input.txt"); out.open("output.txt"); for(int task=0; task<100; task++) { string tipo; in >> tipo; int n; in >> n; string visita; ...
489c447b0e663d2ccfcd2ff43ec8707a782830a1
7bd0bf2f4f9aecd4243ad3304cc248e2685ba37f
mono/coreclr
/src/binder/inc/utils.hpp
C++
hpp
1,466
permissive
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // // ============================================================ // // Utils.hpp // // // Declares a bunch of binder auxilary functions // // ====================...
fe6071d5e87a41116568049f2f71eed35b2d7103
9f7182b4fb1e4d11d2e8c717c6b404de7627e173
mbravofuentes/Codingpractice
/C++/kattisolutions/Quadrant Selection/quadrant selection.cpp
C++
cpp
271
permissive
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if(x > 0 && y >= 0) { cout<< "1"; } else if(x < 0 && y > 0) { cout << "2"; } else if(x < 0 && y < 0) { cout << "3"; } else if (x > 0 && y < 0) { cout << "4"; } return 0; }
88395a8dd57064959f3b39a6581dbaa6047b90d0
59d92973a8883d9d636ae5282e4c3b2ad3456364
cubazis/cpp
/src1/week3/1.cpp
C++
cpp
242
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> v {1, 3, 5, 1, 6, 2}; cout << count_if(begin(v), end(v), [](int x){ if(x > 2){ return true; } else{ return false; } }); }
d2acada0e65039a40fd9dcfdb61af33bd9968fc3
6f7f0f3f16ae5f25472b2a1cdf2e2b54bbea448e
BackupTheBerlios/fluxbox-svn
/tags/Release-0_9_14/src/ArrowButton.cc
C++
cc
4,631
permissive
// ArrowButton.cc for Fluxbox Window Manager // Copyright (c) 2002 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org) // // 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 restrictio...
5a97db5f41f4ce8dbab6b873d99706b0c04ebadf
29d25802ea198f1021fb8d61f0c74423e4d6949a
srijan-singh/Hacktoberfest-2021-Data-Structures-and-Algorithms
/Leetcode/CPP/46. Permutations.cpp
C++
cpp
742
no_license
//https://leetcode.com/problems/permutations/ //Solved using backtracing approach class Solution { public: //Utility function void permutationUtil(vector<vector<int>>&ans,vector<int>&nums,int n,int start){ if(start==n){ ans.push_back(nums); return; } for(int i=st...
6b24fe509f25171659ceff13bb484737a92ef640
f3fd60498ca76073f246818169ce11edf0e7bc66
vsajip/clang
/lib/CodeGen/CGExprScalar.cpp
C++
cpp
128,530
permissive
//===--- CGExprScalar.cpp - Emit LLVM Code for Scalar Exprs ---------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
71a2b8b21165165ae5a6f5dabb3b31730213f961
990f73ca7cef93c8cfcdb4275860785efc0d22e0
PengJi/Algorithms
/weekly_contest/324/2509_cycle-length-queries-in-a-tree.cpp
C++
cpp
750
no_license
class Solution { public: int get_depth(int x) { int res = 0; while (x) { x >>= 1; res ++ ; } return res; } vector<int> cycleLengthQueries(int n, vector<vector<int>>& queries) { vector<int> res; for (auto& q: queries) { int ...
34529ad24787202885e9454eb0b75a4e20a72ea6
0ca98cc3a35c8865a78e9e1dba9789f562a05136
mikosz/rastertek-tutorials-solutions
/RastertekTutorials/graphics/A3DCamera.cpp
C++
cpp
399
permissive
#include "A3DCamera.hpp" using namespace tutorials; using namespace tutorials::graphics; void A3DCamera::initialise(const Properties& properties) { D3DXMatrixLookAtLH(&viewMatrix_, &properties.position, &properties.lookAt, &properties.up); D3DXMatrixPerspectiveFovLH( &projectionMatrix_, properties.fieldOfView, ...
0587d77702d77bbc74a6ab4d128026b864abc7fc
1bd8f5f5acde3a84be80c8e7073469217b951cf2
remymuller/boost.simd
/test/function/simd/atand.cpp
C++
cpp
2,171
permissive
//================================================================================================== /** Copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) **/ //====================================...
5e9688257b1a8eafe3702fb03ab6994e07f8fc35
1c3bbaa415912d9c30f8912f0f0734ee748c77bb
juslee/boost-svn
/libs/intrusive/example/doc_sg_set.cpp
C++
cpp
2,677
permissive
///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2007-2012 // // 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) // // See http://www.boost...
610b26b6ebf542434e3459c17723ca74fef9d2e3
e832d145d9310fb37d10a0df95a3df529d37e862
bozhink/VSP
/Projects/LearningTests/Coord/coord.cpp
C++
cpp
1,246
no_license
#include <iostream> using namespace std; class coord { int x, y; public: coord() { x=0; y=0;} coord(int xx, int yy) { x=xx; y=yy; } friend ostream &operator<<(ostream &stream, coord &ob); friend istream &operator>>(istream &stream, coord &ob); }; ostream &operator<<(ostream &stream, coord &ob) { s...
ef5cfd39d1fd8c7e7422582c66a69043d6592984
88ef6598e51719c7a2aa3630733427360a6d50db
tgarciai/BlingFire
/blingfirecompile.library/src/FALad_dist.cpp
C++
cpp
14,137
permissive
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ #include "blingfire-compile_src_pch.h" #ifndef BLING_FIRE_NOAP #include "FAConfig.h" #include "FALad_dist.h" #include "FALadLDB.h" #include "FAUtf8Utils.h" #include "FAUtils_cl.h" FALad_dist::FAL...
5c93dc83636a5bcb7fba2ec7b737b91e47ee00e4
ef1ab91e09457b13fb638634c89ee7d2c342d21d
leoscalco/cracking-the-code-interview-python
/chapter 5/insertion.cpp
C++
cpp
423
no_license
// #include <bits/stdc++>; #include <iostream> using namespace std; int updateBits(long long int n, int m, int i, int j){ int allOnes = ~0; int left = allOnes << (j+1); int right = ((1 << i) - 1); int mask = left | right; int n_cleared = n & mask; int m_shifted = m << 1; return n_cleare...
62d166bcbbdf07743f79f8657daca88ee798d71f
51d220666eb7b703bc7eb1e30e00caa9093e966a
sreedhr92/Leetcode-Submissions
/codes/accepted_codes/Construct Binary Tree from Preorder and Inorder Traversal_481845352.cpp
C++
cpp
1,109
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
96a367012d8f56f0e746a559afd969bfad5718eb
eb499f9f44ea26a7e425b1666ed4f0e41c6d9a60
fshabir/dsnalgo
/c++/stack/min.cpp
C++
cpp
806
no_license
#include <iostream> #include <stack> using namespace std; class myStack { private: stack<int> *st; int _min; public: myStack(int size) { st = new stack<int>(); } void push (int val) { if (st->empty() || val < _min) { _min = val; } st->push(val); } int pop() { int top = - 1; stack<int> temp; ...
f111235f25df5292429c2f7aef4126bf25fc4f46
6ee45a8e56f63b493ca9a3774fa896e8e8d4a408
aidinabedi/avs4unity
/vis_avs/laser/laser.cpp
C++
cpp
3,701
no_license
/* LICENSE ------- Copyright 2005 Nullsoft, 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 o...
1189ca7b4f37cd607849658d348a842f881c073d
646451adadcc2565f1dd1a1621d3c9c100fbe690
santiagomariani/Portal2DGame
/libs/Box2D/Collision/Shapes/b2PolygonShape.cpp
C++
cpp
10,728
no_license
/* * Copyright (c) 2006-2009 Erin Catto http://www.box2d.org * * 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 any purpose, * i...
411770bf389089206a422d70974b66c4f49cceb7
2ceffb5a81b2312e7bed196e71bbafb366ab95fd
visualitysoftware/AudioKit
/AudioKit/Common/Nodes/Mixing/Automation/Fader/AKFaderDSP.hpp
C++
hpp
1,189
permissive
// // AKFaderDSP.hpp // AudioKit // // Created by Ryan Francesconi, revision history on Github. // Copyright © 2019 AudioKit. All rights reserved. // #pragma once #import <AVFoundation/AVFoundation.h> #import "AKParameterRamp.hpp" typedef NS_ENUM (AUParameterAddress, AKFaderParameter) { AKFaderParameterLeftG...
3d17206e7f49443d9e26f5187e0191a2a69284e6
a5eefc0dfef39d45ccb3be27a9385bb1a79cd1bb
Pressio/pressio
/tests/functional_small/ops/ops_eigen_level2.cc
C++
cc
4,507
permissive
#include <gtest/gtest.h> #include "pressio/ops.hpp" #define OPS_EIGEN_DENSEMATRIX_VEC_PROD(VECIN) \ using M_t = Eigen::MatrixXd; \ M_t M(3,3); \ M << 1.,0.,2.,2.,1.,3.,0.,0.,1.; \ Eigen::VectorXd myR(3); \ myR(0) = std::nan("0"); /* simulate uninitialized NaN */ \ constexpr auto...
f88c6e873c6e0a2e12789a8ffa151b2eefb94643
84e98600d2bb7c3a0b01cb9816bfc9357b7c0e84
Mike-Leo-Smith/Learning-OpenGL
/Chap-1/Textures/main.cpp
C++
cpp
1,564
no_license
#include "ThirdParty/GLAD/glad.h" #include "Framework/Window/Window.h" #include "Framework/Graphics/Graphics.h" int main() { Window window("Textures", 800, 600); Shader shader("shader.vert", "shader.frag"); Texture2D texture1("container.jpg"); Texture2D texture2("awesomeface.png"); float verti...
9de63029fa2b5c4ed5008458ba4a5e736a4b0a23
abb61b2bdf0851f3ef043a9605226d03b601c626
Zaladim/Tek2_OOP
/OOP_nanotekspice/C4011.hpp
C++
hpp
420
no_license
/* ** EPITECH PROJECT, 2019 ** NANO TEK SPICE ** File description: ** 4011 Four Nand */ #ifndef C4011_HPP_ #define C4011_HPP_ #include "Gate.hpp" class C4011 : public AGate { public: C4011(); ~C4011(); // === COMPUTE === virtual nts::Tristate compute(std::size_t pin = 1) override; virtual void dump() cons...
4ce17326dd7f236790c0c33b4a2730c94809f565
2cf0df215230e85435650d9999b95ab76a429dab
PavloNaichuk/Projects
/PacMan/PathFinding/Path.cpp
C++
cpp
528
no_license
#include "Path.h" #include <cassert> Path::Path(const std::vector<const GraphNode*>& nodes) : m_Nodes(nodes) , m_CurrNodeIndex(0) { } Path::Path(std::vector<const GraphNode*>&& nodes) : m_Nodes(std::move(nodes)) , m_CurrNodeIndex(0) { } const GraphNode* Path::GetCurrentNode() const { return m_Nodes[m_CurrNodeIn...
019a5e1dde3a0b808bff4b0b0bbd38a21068325a
6544bf62808fee8bf7b93af2edc6f5685dfa40f8
FacuLitterio/Algoritmos
/Ejercicio_38.cpp
C++
cpp
793
no_license
#include <iostream> #include <conio.h> using namespace std; int EdadAGrupoEtario(int edad) { if (edad <= 14) { return 1; } if (edad >= 15 && edad <= 21) { return 2; } if (edad >= 22 && edad <= 28) { return 3; } if (edad >= 29 && edad <= 35) { ...
67b18c159a341c7be53cad515c610ececdd72b73
f7251fd1d0743cb6bdd0d6a4f396337108506527
elsantodel90/cses-problemset
/permutation_inversions.cpp
C++
cpp
2,093
permissive
#include <iostream> #include <algorithm> #include <numeric> #include <cassert> #include <vector> using namespace std; #define forn(i,n) for(int i=0;i<int(n);i++) #define forsn(i,s,n) for(int i=int(s);i<int(n);i++) #define dforn(i,n) for(int i=int(n)-1;i>=0;i--) #define dforsn(i,s,n) for(int i=int(n)-1;i>=int(s);i--) ...
d01a18634adce52b2429d6bf6454b6df9a757c50
91b71e6ccd77955e90489cecfebedccc650e584c
Xilinx/Vitis_Libraries
/ultrasound/L2/tests/divVS/test.cpp
C++
cpp
713
permissive
/* * Copyright 2021 Xilinx, Inc. * * 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...
01acb2b42f3c0e2690d36ef86be3cde5c90ea189
26fd1eef53ed3c257955bfcb2476395ac5a66596
intel/llvm
/sycl/test-e2e/AtomicRef/add_generic_local_native_fp.cpp
C++
cpp
227
permissive
// RUN: %{build} -o %t.out // RUN: %{run} %t.out #define SYCL_USE_NATIVE_FP_ATOMICS #define FP_TESTS_ONLY #define TEST_GENERIC_IN_LOCAL 1 #include "add.h" int main() { add_test_all<access::address_space::generic_space>(); }
312b2419bf4ba06891aab19b1011f7ccadd324c0
4604025f626dc8bcdd243243211fda6756616e45
iAxweel/Practicas_Estructura_de_Datos
/Practica 4/Ejercicio_4B.cpp
C++
cpp
307
no_license
#include <iostream> using namespace std; int fibo(int valor){ if (valor < 2) return valor; else return fibo(valor - 1) + fibo(valor - 2); } int main(){ int valor; cout<<"Ingrese el valor: "<<endl; cin>>valor; for (int i = 1; i <= valor; ++i) { cout<<fibo(i)<<", "; } }
a54524c9ce64399c86ebc6b3b09d22fc1a904d44
de978c9b8b60c2000eaafca3b32686f265fa5e82
jwdinius/point-registration-with-relaxation
/src/registration.cpp
C++
cpp
9,804
no_license
//! c/c++ headers #include <cmath> #include <iostream> #include <limits> #include <memory> #include <tuple> #include <unordered_map> #include <utility> //! dependency headers #include <mlpack/core.hpp> #include <mlpack/methods/neighbor_search/neighbor_search.hpp> //! project headers #include "registration/registration....
5af92a9de412cddf635f7a3bab81bd1ae3c74c9b
403d5010d6dfdaf4c5e601501d8d23ed2885185c
MrSlosh/NewYorkCoin-AuxPow
/src/rpcnet.cpp
C++
cpp
17,682
permissive
// Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpcserver.h" #include "clientversion.h" #include "main.h" #include "net.h" #include "netbase.h" #include "protocol...
77a50bb057d0a468f932faa0b90bc02dc7c3013e
d6ea9597eab064f3e2b60b69c657681b6144d690
Jupiter0026/Open-Text-Engine
/main.cpp
C++
cpp
263
no_license
#include <iostream> #include <string> #include <cstdlib> #include "page.h" #include "player.h" #include "extra.h" #include "parser.h" int main(){ parse("C:\\Users\\Syd\\Desktop\\Various\\Open Text Engine\\Versions\\v4\\game.ote"); startgame("start"); }
d942ddbfbbbdd44f4a1f85e899727b2d5be76248
3fb3e9dcc4306a604b3969c87c005f3dbe60bfae
antlechner/cbmc
/src/cbmc/bmc.cpp
C++
cpp
20,160
permissive
/*******************************************************************\ Module: Symbolic Execution of ANSI-C Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ /// \file /// Symbolic Execution of ANSI-C #include "bmc.h" #include <chrono> #include <io...
4c4e0f8eb7d3cf8bc3efa0e18719520478791508
3dcc15b6e71982f85b49c3aac04b7ade7423ecc6
lostjared/acidcamGL
/source/plugin/fast_mono_color_trails/mono.cpp
C++
cpp
787
permissive
#include"ac.h" extern "C" void filter(cv::Mat &frame) { static ac::MatrixCollection<16> collection; collection.shiftFrames(frame); cv::Mat *frames[3]; frames[0] = &collection.frames[1]; frames[1] = &collection.frames[7]; frames[2] = &collection.frames[15]; auto callback = [&](cv::Mat *fram...
6f51bcc76f29cff54a4f66c01cdf91acfaa6b0e5
3635f9f5128d39cbc6b99bb04511dc0460ea3f22
fjq123456/Elastos.RT
/Sources/Elastos/LibCore/src/org/apache/harmony/xml/dom/CCDATASectionImpl.cpp
C++
cpp
12,966
permissive
//========================================================================= // Copyright (C) 2012 The Elastos 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 // // ...
425d411a2a4a67ffd96a6ae3f4020410ef00768a
649da76e2a5f98b3237cd2fac5863601779bc9d6
PPMTF/PPMTF
/cpp/ProcessingTime.hpp
C++
hpp
1,189
permissive
#include<iostream> #include<string> #include<chrono> class ProcessingTime{ public: ProcessingTime(const std::string& name = "Process", bool start = true) : m_name(name), m_isActive(start) { if (start) { this->restart(); } ...
2c6e63796976fceab3f42486b88e65453cba1cd6
74884c7dd6c53117f202a7200d845e16ec0a10b7
tongxingwy/chromium-1
/net/test/cert_test_util_nss.cc
C++
cc
3,203
permissive
// 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/test/cert_test_util.h" #include <pk11pub.h> #include <secmodt.h> #include "base/files/file_path.h" #include "base/files/file_util.h" #incl...
c744d88da548aa756ae807cb270afbd7b45fd426
f2de5e6ac599f046072300b38b2774fdecc8471b
pamd/foo
/faq/rand_p.cpp
C++
cpp
1,664
no_license
/* Facebook question: given a random() function that returns 0 or 1 with probabibily of * 1/2 for either value. Define a random(double p) which should return 0 with probability of * p, and return 1 with probability of 1-p. * Refer to: * http://www.mitbbs.com/article_t/JobHunting/32113865.html */ /***************...
7b78d820f7ff1eaeb59b79bdbce21e0bf33be7fa
68351cca52d5535c3eb4436c0b9e9870429d9028
UnrealCourseCPP/04_BattleTank
/BattleTank/Source/BattleTank/Private/TankAimingComponent.cpp
C++
cpp
2,033
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "BattleTank.h" #include "TankBarrel.h" #include "TankTurret.h" #include "TankAimingComponent.h" // Sets default values for this component's properties UTankAimingComponent::UTankAimingComponent() { // Set this component to be in...
e3b75527dd31abed4ee98e811054a0018953b029
e67de4ffd4c99c2af827cdd157471e9f6cba4f5f
AGthe2nd/GalvanAlbert_2681749
/Hmwk/Assignment_2/Galvan,Albert_A2_48101_Gaddis_P5/main.cpp
C++
cpp
2,404
no_license
/* * File: main.cpp * Author: Albert Galvan * Created on September 28, 2016, 1:17 PM * Purpose: Calculate Gender Percentages. */ //System Libraries Here #include <iostream> using namespace std; //User Libraries Here //Global Constants Only, No Global Variables //Like PI, e, Gravity, or conversions //Functi...
37ba65e0d0ef0d95b56544bd6431c6ee3010b2b8
e8f5f77dfda1897c85106b7ea1cc580bc55e46f4
xlxfoxxlx/platform_hardware_interfaces
/media/omx/1.0/vts/functional/master/VtsHalMediaOmxV1_0TargetMasterTest.cpp
C++
cpp
7,666
permissive
/* * Copyright (C) 2017 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 app...
462b165c7d324680d92ac82fb1fde1982416985c
f80c80b2b748a92820c3d5518006e67be2042f3e
TheBearmachine/IsometricRogueLike
/IsometricRogueLike/CharacterAttributes.cpp
C++
cpp
3,186
no_license
#include "CharacterAttributes.h" CharacterAttributes::CharacterAttributes() : mBaseCharisma(0), mModifiedCharisma(0), mBaseEndurance(0), mModifiedEndurance(0), mBaseMemory(0), mModifiedMemory(0), mBasePerception(0), mModifiedPerception(0), mBaseStrength(0), mModifiedStrength(0), mUnallocatedPoi...