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
fe389c4cf48d9c19759a872d55f1d516b4bd4428
637ac658fb7259c31f656bbe9444ec797319e67b
veinyyxy/IDP_OLD2
/DBManager/sqlitemanager.cpp
C++
cpp
9,381
no_license
#include <QCoreApplication> #include <QDate> #include <QDebug> #include <QDateTime> #include <QMutexLocker> #include <QSettings> #include <QMessageBox> #include "sqlitemanager.h" SqliteManager::SqliteManager() { m_db_sqlite=QSqlDatabase::addDatabase("QSQLITE","QSQLITE"); //添加数据库驱动 QString iniPath = QCoreApp...
cf06e995efca88614d004fbb76584e21790c2700
0b9308c39ddf01e2b316576f6b0009269733ba59
mauricioyui/DesignPatterns
/13-Command/Root/Command.cc
C++
cc
731
no_license
#include "Classes.h" int main() { std::cout << "Start Design Pattern Demonstration: Command" << std::endl; Context context1, context2; ContextContainer contextContainer; std::cout << std::endl; contextContainer.add(new ProcessContext(&context1)); contextContainer.add(new ProcessContext(&context2)); ...
dd9086eb314b23a19980423da6f92b79b71109c8
a1645d6c1e7442f5400530892bdbb69ac6d4b501
byunghl/ClassProject
/hashit/src/ArrayList.cpp
C++
cpp
3,552
no_license
// ArrayList.cpp /** * Author: Byung Ho Lee * Student ID# 60626811 * * ArrayList Class * * Note: This is generalized arraylist. Its possible to reuse for all data types. ** */ #ifndef ARRAYLIST_CPP #define ARRAYLIST_CPP #include "ArrayList.hpp" #include <iostream> namespace { const unsigned int initialC...
acc8cdaad47b6a795dedc0219c076b1fdd59bee0
cb00f5f79dd5476f80dd142fb13a6ac64d27478b
cryptolog/Wildfire
/src/rpcwallet.cpp
C++
cpp
55,073
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/list_of.hpp> #include "wallet.h" #include "walletdb.h" #include...
f0619ec5c67771c34f6ba88cfe11f6a1bfa774de
1d8a9c6fb95c15367b9e23770fdf8d94eed75e62
getdatcrypto/katana
/src/rpcrawtransaction.cpp
C++
cpp
20,208
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/list_of.hpp> #include "base58.h" #include "bitcoinrpc.h" #inclu...
600a13cc928d1ecb21cdaefdd85a2ce329ee0a87
e2f315008eb2b44ce893583fc9d0217a9916b1da
anuragroy11/GeeksForGeeks
/SudoPlacements/Arrays/28.MaxSumIncreasingSubsequence.cpp
C++
cpp
730
no_license
#include <bits/stdc++.h> using namespace std; int max (int a, int b) { if (a > b) return a; else return b; } int main() { int t; cin >> t; while (t--) { int n, temp; vector<int> a, b; cin >> n; for (int i = 0; i < n; i++) { ...
9daa731522d819de69ac76f96cbeda953cb82a4c
144e936dc9a65d6e56228d75cbe3dba036c6cbfc
Mu2e/Offline
/RecoDataProducts/inc/ZRotStrawHitMap.hh
C++
hh
4,661
permissive
#ifndef RecoDataProducts_ZRotStrawHitMap_hh #define RecoDataProducts_ZRotStrawHitMap_hh // // index to access to the StrawHit by z ID position and by AbsSttn ID, it is the input for the final pattern recognition // stage in the fast pattern recognition // // // Original author G. Tassielli // // C++ includes #include ...
5aa04b9fc253e93324c17c01e5b01e21bcfa5cbe
70ed6234b100a5a02b46f7855ceb14ee2bc13f18
project-chip/connectedhomeip
/examples/lock-app/cc32xx/main/DeviceCallbacks.cpp
C++
cpp
1,759
permissive
/* * * Copyright (c) 2022 Project CHIP Authors * 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...
52ee078f5c3e5fcea63abf4522ce1e35727b124d
1d169c6abfcf5377f10919d13d0dc77d10f2d1f4
ChiaCheng-Tsai/oneAPI-DirectProgramming
/word2vec_sycl/cbow.cpp
C++
cpp
8,748
permissive
#include <stdio.h> #include <assert.h> #include "cbow.h" #define __syncthreads() item.barrier(access::fence_space::local_space) extern real *syn0; extern int * table; extern int vocab_size, layer1_size , layer1_size_aligned; extern int negative , window; extern int table_size; // To batch data to minimize data transf...
b1a58556b79f3ac2b8621670a26a3d7a18ad04f4
d41ff496036c4bf4e71cdef7dccd7b776d9f3a4a
simonfink/VTDelta
/scara1/Software/Robot-Control/ScaraControlSystem.cpp
C++
cpp
8,507
no_license
#include "ScaraControlSystem.hpp" #include "ScaraSafetyProperties.hpp" #include <eeros/math/Matrix.hpp> #include <iostream> #include <unistd.h> #include <eeros/core/Fault.hpp> #include <eeros/hal/HAL.hpp> #include <eeros/core/Executor.hpp> #include <eeros/task/Periodic.hpp> #include <eeros/core/PeriodicCounter.hpp> #in...
a84978cf35062d53c004b2c1cc53a63a55765305
4a9911ebd9e97a44d98772bcfbbb2ea5f76cfb8e
Hengle/DEngine
/Engine/Engine/DLight.cpp
C++
cpp
4,344
no_license
#include "DLight.h" #include "DShader.h" #include "DSystem.h" DLight::DLight() : DSceneObject() { m_shadowMap = 0; m_shadowShader = 0; m_far = 100.0f; //m_size = 30.0f; m_isProjChanged = false; m_node = 0; m_layerMask = D_LAYERMASK_DEFAULT; m_isShadowActive = true; } DLight::~DLight() { } void DLight::Re...
df39491d1394dc564cd15d03647dac5e395e4069
59471a63e4ff4890cdbdd8a0aa0f5e32b950baee
noamgrinch/USocial
/Application.cpp
C++
cpp
1,071
no_license
#include "USocial.h" #include "User.h" #include <exception> #include <iostream> #include "Audio.h" #include "Photo.h" #include "Message.h" int main()// Example program from assignment. { USocial us; User* u1 = us.registerUser("Liron"); User* u2 = us.registerUser("Yahav"); User* u3 = us.registerUser("Shachaf"); Use...
0877ab75e5f041760147338861debdc264cf132e
2733f6a5b56d9d4dda85e619f1e5ea77507a5aa1
buf1024/monthproj
/hellodiary/linux/my_application.cc
C++
cc
3,718
no_license
#include "my_application.h" #include <flutter_linux/flutter_linux.h> #ifdef GDK_WINDOWING_X11 #include <gdk/gdkx.h> #endif #include "flutter/generated_plugin_registrant.h" struct _MyApplication { GtkApplication parent_instance; char** dart_entrypoint_arguments; }; G_DEFINE_TYPE(MyApplication, my_application, GT...
b2d0299c8115f7d54a956c7cd255288be8af6a1e
a2d8e36cec27063650381ba99316b12630283897
JamesNK/grpc
/src/core/ext/xds/xds_bootstrap.cc
C++
cc
22,779
permissive
// // Copyright 2019 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
5f462ca4480dc85d3fa8442310b1fa86f4662142
17abe256b0e94e0730dfdf6013590cbaf0ac16c4
gbrlas/AVSP
/CodeJamCrawler/dataset/13_20454_80.cpp
C++
cpp
1,196
no_license
#include<iostream> #include<stdio.h> #include <math.h> using namespace std; bool pd(long long int num); int fns(long long int x); int main() { freopen("C-small-attempt1.in","rt",stdin); freopen("op2.txt","wt",stdout); long long int TT,l,h; cin>>TT; long long int count = 0; long l...
4d58a7ecb433b6f252d5601c3118e0974474fef5
e2d66f2f9583d1ab78097fd35a1d5346d72d7f4d
Jin-Myung/cpp_study
/stl_algorithm/modifying_sequence/replace_copy.cpp
C++
cpp
345
no_license
#include <iostream> #include <algorithm> #include <vector> #include <functional> #include <iterator> using namespace std; int main() { vector<int> arr{0, 1, 4, 5, 8, 9, 2, 3, 6, 7}; replace_copy_if(arr.begin(), arr.end(), ostream_iterator<int>(cout, " "), bind(less<int>(), placeholders::_1, 5), 10); cout ...
17e7331142db70f8f5ca4a065663d2635c4db738
35091b43f9241d37960ff2460326df488d458071
ivan-dives/elance-tests
/sandbox/cpp/2.cc
C++
cc
1,560
no_license
#include <algorithm> // std::find_if, std::sort #include <cstdio> // scanf #include <iostream> // std::cout, std::endl #include <utility> // std::pair #include <vector> // std::vector class student_records : public std::vector<std::pair<int, int> > { public: typedef std::pair<int, int> pair_t; // for std::find_...
2a11fbbac97e1008bb8ced100298c96e67cc0f71
674b745c5f0fa3857557edf7187e7e002313058c
kasparia/audio-foolery
/NeinFilter/Source/PluginEditor.cpp
C++
cpp
3,635
no_license
/* ============================================================================== This file contains the basic framework code for a JUCE plugin editor. ============================================================================== */ #include "PluginProcessor.h" #include "PluginEditor.h" #include "...
bee2cc6f4b6908230bac8a7b0be4c6ac90495b62
bb9a043e05e86d6af0bef5e02e75100e6d058574
cyz1901/winsock-lab
/project_one/1.2.cpp
C++
cpp
671
no_license
#include <iostream> #include <WinSock2.h> #pragma comment(lib,"ws2_32.lib") int main() { WSADATA wsaData; if (WSAStartup(MAKEWORD(1, 1), &wsaData)) { puts("Could not load windows sockets DLL"); return 0; } char hostname[256]; gethostname(hostname, 256); strcpy_s(hostname, "DE...
fec77d925a35e796e8b3be82ba62ce315a1b844b
772f3ebc805d27528b93f05c673f31b5ff6109b2
green-fox-academy/GerBer1234
/week-02/day-2/appendletter/main.cpp
C++
cpp
753
no_license
#include <iostream> #include <string> #include <vector> std::vector<std::string> appendA(const std::vector<std::string> &temp); int main(int argc, char* args[]) { std::vector<std::string> animals = {"bo", "anacond", "koal", "pand", "zebr"}; // Create a function called "appendA()" that adds "a" to every strin...
0430ba152cdd539871b3cb10bf05a2768ec46446
0b326dbd50e450d5af5017905b7b21978922229a
MarcelRaad/convert
/include/boost/convert/detail/has_member.hpp
C++
hpp
3,861
no_license
// Copyright (c) 2009-2014 Vladimir Batov. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. See http://www.boost.org/LICENSE_1_0.txt. #ifndef BOOST_CONVERT_HAS_MEMBER_HPP #define BOOST_CONVERT_HAS_MEMBER_HPP #include <boost/type_traits/remove_const.hpp> #include <boost/...
20d4195ed91f0889f5d039fc364f4725c4cc06df
0570082c8aa05d217db506e651ea34ae11916d39
zlq1052750492/ICRA_guard
/MLP_pose/MLP_pose.cpp
C++
cpp
1,620
no_license
// // Created by demon on 2021/3/17. // #include "MLP_pose.h" PositionPredict::PositionPredict(const std::string& model_path, const torch::DeviceType& device_type): device_(device_type) { try { // Deserialize the ScriptModule from a file using torch::jit::load(). module_ = torch::jit::load(mode...
dba1a2e004bd237c600cf8e75a301337050536ed
d2d24f655e48dad5ebaa191b81973ed17b582965
mk101/IaP-labs
/2 semester/Tasks/3/Source.cpp
C++
cpp
6,174
no_license
#include "TextEditor.h" #define MENU_SIZE 5 // Parse unsigned short BOOL tryParse(const LPTSTR str, PSHORT res) { PTCHAR end; DWORD a; PTCHAR minus = _tcsrchr(str, TEXT('-')); if (minus != NULL) { return FALSE; } a = _tcstol(str, &end, 10); if (*end != TEXT('\0')) { return FALSE; } *res = a; return TRUE...
b4f9013450ce3d76e63188ae371b65e8a15065a0
79864860379624ffddf0fd5238464926d4a28a9b
kevinmiles/Workspace
/FreeRTOS_STM32F103/src/Timer.cpp
C++
cpp
2,080
no_license
/* * This file is part of the µOS++ distribution. * (https://github.com/micro-os-plus) * Copyright (c) 2014 Liviu Ionescu. * * 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 ...
5cbfac13f31e0c8b67a0697b2a80f0e3490205ee
5768d28ea4e6fda93a1a54b9c951638105de799d
wsgan001/SIGMOD-2014-Programming-Contest
/5th place/vida-sigmod2014/query1.cpp
C++
cpp
9,396
no_license
//---------------------------------------------------------------------------- // // Copyright (C) 2014, NYU Polytechnic School of Engineering. // All rights reserved. // Contact: fchirigati@nyu.edu, kien.pham@nyu.edu, // tuananh@nyu.edu, huy.vo@nyu.edu // // This file is part of the VIDA team submission for ...
95f2f5d76bcf32250828becc525a318dafb020c2
cfbc318ac5b8ac239d2f94e476de76ddfc7e052a
lunar-mining/darkrenaissance_tui
/old/gui3.cpp
C++
cpp
5,002
no_license
#include <stdio.h> #include <iostream> #include <ncurses.h> #include <panel.h> #include <string.h> #define NLINES 20 #define NCOLS 50 int startx = 0; int starty = 0; void print_menu(WINDOW *menu_window, int highlight); void init_wins(WINDOW **wins, int n); void win_show(WINDOW *win, char *label, int label_co...
1cc7a4b46f619b41dde2e9e9225b459aa2fdc4b6
cad4127a81347088d9a512951ef1b95f7fb63aae
pwittchen/Electromechanical-analogies
/Unit1.cpp
C++
cpp
177,276
no_license
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //----------------------------------------...
158f33ed2065b9ee457a47a6f89f036bc72a5d1a
5e4c5293bb09d05b65cb7192878f1377ed8bc7d3
KPO-2020-2021/zad5_3-DamianJanusz3
/prj/inc/flat.hh
C++
hh
1,213
permissive
#pragma once /*! * \file * \brief Definicja klasy Flat * * Plik zawiera definicję klasy Flat */ #include "solid.hh" #include "obstacles.hh" /*! * Flat dziedziczy po klasie Solid i Obstacles * Zawiera tylko zmienne z klas rodziców */ class Flat: public Solid, public Obstacles { public: /*! * Ko...
9e591c29c3561540052239586623fb7d139b1832
bb638e979f4f6b8b752068194b93bd0f76049072
WillowOfTheBorder/boost.simd
/include/boost/simd/arch/common/scalar/function/logical_andnot.hpp
C++
hpp
2,040
permissive
//================================================================================================== /*! @file @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) ...
48a826815023d823917875c9a2676466f5db0844
e512b94ffc140b3675f5e522d59e123c04610a14
Approved233/angle
/src/libANGLE/renderer/d3d/TextureD3D.cpp
C++
cpp
164,619
permissive
// // Copyright 2014 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // TextureD3D.cpp: Implementations of the Texture interfaces shared betweeen the D3D backends. #include "libANGLE/renderer/d3d/TextureD3D.h" ...
f238c720f4f1a917f0b9b903bc5753e8f0aaabbf
9f2e99a6157802b6edd4dccb9618436e70a0eb47
qicosmos/ScriptX
/test/src/PressureTest.cc
C++
cc
6,028
permissive
/* * Tencent is pleased to support the open source community by making ScriptX available. * Copyright (C) 2021 THL A29 Limited, a Tencent company. 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 ...
52bf243720e36b7d0c32ea60bf28b091353270a7
f3a69f9cea2c0e85c2a6eee814ba591ca1adc201
JLL/dominionrules
/src/dominion/character/character.cpp
C++
cpp
2,740
permissive
// Copyright(C) 2015 kittikun // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distri...
fcf0ea4148dc88369e865e5a976c953cbd611258
deb4eedcc07604e6b58d8efbcf2cd53aa6467a54
georgest32/ARTTECH-3135
/Assignment2/src/Blob.cpp
C++
cpp
462
no_license
#include "Blob.h" Blob::Blob() { // x = mouseX; // y= mouse } Blob::~Blob() { // x = mouseX; // y= mouse } void Blob::grow() { if(a > 0){ width += growthRate; height += growthRate; a -= fade; hue += hueChange; } else { growthRat...
6f9d17584812c432d6b099b9b5acc18fe99bab03
bb8d050a5e6d118de189528bdf3a36fa0d73ca81
ArtyomAdov/learning_sibsutis
/learning/thirdparty/САОД/Двор/laba8.cpp
C++
cpp
1,761
no_license
#include<stdio.h> #include<stdlib.h> #include<time.h> #include<graphics.h> int M=0,C=0; void PrintMas(int n,int *A){ int i; for (i=0;i<n;i++) printf("%d ",A[i]); } void Fillinc(int n,int *A){ int i,b=0; for (i=0;i<n;i++) {b=b+2;A[i]=b;} } void Filldec(int n,int *A){ int i,b=0; for (i=n-1;i>=0;i--) {...
ab84bd684edd871349331d2f80c9b24c6285d2ce
684a37cfad3556f576669d982020e59cb8d4c479
teams2ua/lib-ledger-core
/api/core/react-native/LibLedgerCore/android/binding/android/jni/jni/jni/Wallet.hpp
C++
hpp
1,182
permissive
// AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from wallet.djinni #ifndef DJINNI_GENERATED_WALLET_HPP_JNI_ #define DJINNI_GENERATED_WALLET_HPP_JNI_ #include "../../include/Wallet.hpp" #include "djinni_support.hpp" namespace djinni_generated { class Wallet final : ::djinni::JniInterface<::le...
a2d0c1fa76df774cde518f9e5b5abbbf58c64e0b
559e37fcf063c0d1ea32c11b0ff3f9a597c2e075
SJoshua/Nula-Lilio
/src/scenes/Confirm.cpp
C++
cpp
1,910
permissive
#include "Confirm.h" extern SceneManager scenes; extern ResourceManager resources; extern SDL_Renderer *renderer; extern bool running; Confirm::Confirm(bool &ret, std::string text): ret(ret) { yesBtn = Button(WINDOW_WIDTH / 10 * 3, WINDOW_HEIGHT / 10 * 6, resources.text(" Yes ", resources.font(DEFAULT_FONT, 60)),...
1939c252972363866546dcf7670e4abccb620016
8142e74b02b5d87d71c4262a426291b1d94aede5
gisogrimm/labstreaminglayer
/LSL/liblsl/lslboost/boost/archive/xml_oarchive.hpp
C++
hpp
3,682
permissive
#ifndef BOOST_ARCHIVE_XML_OARCHIVE_HPP #define BOOST_ARCHIVE_XML_OARCHIVE_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_oarchive.hpp // (C) Copyright 2002 Robert Ramey - http://www...
fdcd93c1129e5fe0df76646f0f6338cf88af6e74
1d8e88a308a88498c1d4ca2fc9830e3e894f257d
exb-hxd/Enrico_beneduce_exercises
/es01-2.cpp
C++
cpp
1,321
no_license
#include <iostream> #include <cmath> #include "random.hpp" #include <string> #include <fstream> using namespace std; int main (int argc, char * argv[]){ unsigned int cumulatives [] = {1, 2, 5, 10, 100, 0}; size_t M = 10000; //here should be instruction to create the folder for output files! -to be fixed later- stri...
3959af967a2b8a38b69e661acc3480b3c4d459f8
8e2d510d9275bdc4b85aa48cbb3f3e73f17cf456
wangjiahong/DearPyGui
/DearPyGui/src/core/AppItems/basic/mvCheckbox.cpp
C++
cpp
3,750
permissive
#include <utility> #include "mvCheckbox.h" #include "mvApp.h" #include "mvItemRegistry.h" #include "mvImGuiThemeScope.h" #include "mvFontScope.h" namespace Marvel { void mvCheckbox::InsertParser(std::map<std::string, mvPythonParser>* parsers) { parsers->insert({ s_parser, mvPythonParser({ {mvPythonDataType::Op...
f33efaaf831cef40ceaa488e91b27bd741ca4058
8e7fc43dd9bc988c611043ab0b2426d26b4e7e2c
shreyas-mante/Codeforces
/CFBetaRoundDiv2A.cpp
C++
cpp
454
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long int #define MOD 1000000007 #define nuke ll t; cin>>t; while(t--) #define nuke_google ll t; cin>>t; for(ll i_1=1;i_1<=t;i_1++) #define imback ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); signed main() { imback; // nuke // { ll n; cin>>n; if(...
4c248dd31337a8f22b10bd4188ca87863df01ae0
c1857b91c47a6f3c272fad87bf1a8b1f00931a1f
RocherKong/MPCBE
/src/filters/transform/MPCVideoDec/MSDKDecoder/MSDKDecoder.cpp
C++
cpp
30,717
no_license
/* * Copyright (C) 2010-2016 Hendrik Leppkes * http://www.1f0.de * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later ...
075e025749c48c5fe896ba9b6304cd46eaa2beb1
17b6359f7daa1024385a6b6bd0ef53a317266f7c
zowhair/chromium
/content/shell/renderer/layout_test/test_media_stream_renderer_factory.cc
C++
cc
2,105
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 "content/shell/renderer/layout_test/test_media_stream_renderer_factory.h" #include "content/shell/renderer/layout_test/test_media_stream_video_r...
fb88a82f759ab521e92a1a142fb8179d4d42d3f7
fb0f67cab02f88a2cf5b5d8635eba88d66cceee7
BuzDiz/TNDS
/Es 2.1/Es 2.1/Vettore.cc
C++
cc
454
no_license
#include "Vettore.h" #include <iostream> using namespace std; Vettore::Vettore() { value = new double[0]; } Vettore::Vettore(int x) { value = new double[x]; index = 0; } int Vettore::getIndex() const { return index; } double Vettore::getValue(int a) { return value[a]; } void Vettore::addValue(double ve...
956a172c393605f5f156c3d2c696e0ff1ab5c2b8
e45e611e815fbd43fb9d567e896f084dd2cf2b55
WhiZTiM/coliru
/Archive2/89/6fc02018487985/main.cpp
C++
cpp
544
no_license
#include <type_traits> template <typename T> class TTest{ public: T data; bool operator!=(const TTest& other) const { return not_equal_to(other, typename std::is_unsigned<T>::type()); } private: bool not_equal_to(TTest const&, std::true_type) const { return true; } bool not_equal_t...
16f456d8f943512f9e713d05df13a7c087e25cf9
4f1266fcfddc7972b73e9cce3594568399db5c6e
JeremiasBaez/mne-cpp
/MNE/inverse/dipoleFit/fwd_coil.cpp
C++
cpp
6,363
permissive
//============================================================================================================= /** * @file fwd_coil.cpp * @author Christoph Dinh <chdinh@nmr.mgh.harvard.edu>; * Matti Hamalainen <msh@nmr.mgh.harvard.edu> * @version 1.0 * @date December, 2016 * * @section LICENSE * ...
0f0287495177e3720d4878018542fd984669a5ac
dae3a0653a7ab31c85c64be0bea7bf273a74dc74
Moreys/wdCAdd
/190530/iterator/ostream_iterator.cc
C++
cc
737
no_license
/************************************************************************* @FileName: ostream_iterator.cc @Author: morey @Email: zymorey@gmail.com @Time: Fri 31 May 2019 08:28:33 PM CST ************************************************************************/ #include <iostream> #include <vector> ...
1b2af207830c2b9f3f6b6dab1b55e65e12e36b31
3fa5bcd6f21a561282bcb519f72c7b51087979f2
YhgzXxfz/leetcode
/additive_number.cpp
C++
cpp
814
no_license
class Solution { public: bool isAdditiveNumber(string num) { int len = num.size(); for (int i = 1; i <= len/2; ++i) { for (int j = 1; max(j, i) <= len-i-j; ++j) { if (isValid(i, j, num)) return true; } } return false; } private: bool i...
b27f18eaeb215a00c57af2504c662016099ed5d8
85a476536821c6cbc9d66cb37a38a571b94d41ba
amanpreet-github/CompetitiveProgrammingPlayground
/BIT_Manipulation/singleNumber2.cpp
C++
cpp
1,066
no_license
/* * * Given an array of integers, every element appears thrice except for one which occurs once. Find that element which does not appear thrice. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? Example : Input : [1, 2, 4, 3, 3, 2, 2, 3, 1, 1] Outpu...
0d3979538e4f6cd327199a0d5fa48ef778ec71cc
cf871324a8b9028a24fcdb24a9160bbaa22c2fcb
adurie/code-base-realistic-tight-binding
/ldos_gsl.cpp
C++
cpp
5,069
no_license
#include <iostream> #include <cmath> #include <fstream> #include <eigen3/Eigen/Dense> #include "TB.h" #include "cunningham_spawn.h" #include <gsl/gsl_integration.h> using namespace std; using namespace Eigen; typedef complex<double> dcomp; typedef Matrix<dcomp, 9, 9> dmat; typedef Vector3d vec; struct a_struct{ Vect...
30b57bc56a984dda93aa9e76bb59cfd109c891de
2205cd688ddd2847a9d9dff060e8c12439666dcd
xuchanglong/XMoon
/misc/xmn_threadpool.cc
C++
cc
5,644
no_license
#include "xmn_threadpool.h" #include "xmn_func.h" #include "xmn_global.h" #include "xmn_memory.h" #include "xmn_lockmutex.hpp" #include <errno.h> #include <unistd.h> XMNThreadPool::XMNThreadPool() { threadpoolsize_ = 0; threadrunningcount_ = 0; allthreadswork_lasttime_ = 0; queue_recvdata_count_ = 0; ...
f30c751a775cb5b99cc306a6b9cfab804f3c7bef
1983b8ecffc6d6becf692f86640501b6c80c99ac
AmritKumal/cpp_projects
/Lab_work/lab4_object_&_classes/Studentinfo.cpp
C++
cpp
882
no_license
#include<iostream> using namespace std; class student { public: char name[30]; int roll; char address[30]; double percentage; void input() { cout<<"enter name:"<<endl; cin>>name; cout<<"enter roll:"<<endl; cin>>...
97e096c11de0fec2e04c390b1ca8ce9d08837ab6
8ed23e4a625f323bb9ee588f99f93e5ebca30dcd
mikelikespie/treelights
/src/loop.cpp
C++
cpp
2,948
no_license
#import "Context.h" #include "clock.h" #include "ExampleSequence.h" #include "Control.h" #include "SinWaveSequence.h" static const int stripCount = 8; static const int stripLength = 64; static const int dmxChannels = 16; /// 16 channels of DMX values uint8_t dmxValues[dmxChannels] = {0}; // Pin layouts on the tee...
157807e6ec6c97ac92fdd122ced5e9d7a837b737
cc0ae84d743fc46cadddfde181717eebd538033e
nuzumglobal/Elastos.Trinity.Alpha.Android
/src/content/browser/url_loader_factory_getter.cc
C++
cc
8,964
permissive
// 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 "content/browser/url_loader_factory_getter.h" #include "base/bind.h" #include "base/feature_list.h" #include "base/lazy_instance.h" #include "co...
2b10c4c30745a493ad2e36f7e6381fef2803afc1
d4ecb1be8f0e86b1342a70994e573e570320f5b6
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE23_Relative_Path_Traversal/s01/CWE23_Relative_Path_Traversal__char_connect_socket_open_08.cpp
C++
cpp
6,897
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__char_connect_socket_open_08.cpp Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-08.tmpl.cpp */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: connect_socket Read data usin...
e55a7c5315a3cc7abf6f12246119c8ee7639ed14
ef312ac9b86405c3408ccb48594eef58071a7cfd
chetan-anand/coding
/forces_71A.cpp
C++
cpp
258
no_license
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; while(n--) { char s[102]; scanf("%s",s); if(strlen(s)>10) { printf("%c%d%c\n",s[0],strlen(s)-2,s[strlen(s)-1]); } else { printf("%s\n",s); } } return 0; }
6b85463988aa35d47d70ce9594df7db362cc2945
e0f76d46f4f557f8df63da23dbd7aee07fb65245
v-vskv-v/CGRL
/Env.cpp
C++
cpp
16,695
no_license
#include "Env.h" void Env::DrawBackground(Image &screen) { for (int i = 0; i < blockHeight; i++) { for (int j = 0; j < blockWidth; j++) { for (int x = coords.x; x < coords.x + tileSize; x++) { for (int y = coords.y; y < coords.y + tileSize; y++) { Pixel pix =...
521801d7914b9ac77830789018fdbf9b0aee21de
d3f238b688a0e20951fd09fa96ea849267e8e4c6
sailesh2/CompetitiveCode
/2020/lcContest143D.cpp
C++
cpp
2,267
no_license
class Solution { private: char delimeter = ','; string extractBracket(string s){ string inner=""; for(int i=2;i<s.length()-1;i++) inner.push_back(s[i]); return inner; } vector<string> split(string exp, char del){ vector<string> tokens; s...
1505e274b9f94612047a87c4c3976cd260ab5371
8ea4d4940b7bf07285e8ef360d65d3d49c6301a4
hikki7/picuturebook
/pictureBook04/src/woman.cpp
C++
cpp
244
no_license
// // woman.cpp // pictureBook04 // // Created by 引田祐樹 on 2018/12/20. // #include "woman.hpp" woman::woman(){ int num=30; woman::num=20; cout<<num<<endl;//30 cout<<woman::num<<endl;//20 cout<<::num<<endl;//10 }
d09547e9f9131d78b2dd25a9ee694ffffb501c93
7bbb909e138661100d55f17bb9215293ca2838c1
dreamflyings/fpga-demo
/src/main/cc/sim/simif.cc
C++
cc
6,760
permissive
// See LICENSE for license details. #include "simif.h" #include <fstream> #include <algorithm> #include "endpoints/counters.h" #include "endpoints/fpga_memory_model.h" midas_time_t timestamp(){ struct timeval tv; gettimeofday(&tv, NULL); return 1000000L * tv.tv_sec + tv.tv_usec; } double diff_secs(midas_time_t...
1fa55551b6d5b4cea3927e2d589a38fe770ee5cc
9ce54ed34f24b1b935031032c43094bd0ae18fbe
DatZach/Swift
/Source/IDE/src/include/Dialogs/NewProjectDialog.hpp
C++
hpp
535
permissive
/* * NewProjectDialog.hpp * New Project Dialog */ #ifndef __NEW_PROJECT_DIALOG_HPP #define __NEW_PROJECT_DIALOG_HPP #include <QDialog> namespace Ui { class NewProjectDialog; } class NewProjectDialog : public QDialog { Q_OBJECT private: Ui::NewProjectDialog* ui; void SetupUi(); void SetupC...
f892d113a63a878094e4ff3413d07fb1a15a24db
99e49c0c1aa23e57aa0c0cea1ad52659276db2d9
chkn/clang
/lib/Parse/ParseCLI.cpp
C++
cpp
10,703
permissive
//===--- ParseCLI.cpp - C++/CLI Parsing -----------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
0ad4f17912b7aebd31964f13a5fc7ddbe93745bb
60856167db63d287b6277cfde14a14db228c7651
chemiczny/automateusz_gto_d2
/src/d2_ee_pdpp_CD.cpp
C++
cpp
1,973
no_license
#include "gto_d2_kit/d2_ee_pdpp_CD.hpp" #include "gto_d2_kit/d2_ee_pppd_AB.hpp" void second_derivative_ee_1211_34( const double ae, const double xA, const double yA, const double zA, const double be, const double xB, const dou...
9d7262b47c500e9923e3999ca04898a875b33fc0
13fdd5f2676bc68f38c59fb61e6bf03b66431659
Deividy/lab
/cc/calculator/calculator.cc
C++
cc
2,309
no_license
#include "calculator.h" #include "token.cc" using namespace std; using namespace calculator; double Calculator::error(const string& s) { no_of_errors++; cerr << "error: " << s << '\n'; return 1; } double Calculator::prim (bool need_get) { if (need_get) { ts->get(); } switch (ts->curr...
447bf98389f76ee785fa7da9cd3f0ab6470f8270
ec35dee7ebf39f5d905b0766e2c0ae55d8786c95
ha-yi/q-uma
/dialoglinkchecker.cpp
C++
cpp
4,577
no_license
#include "dialoglinkchecker.h" #include "ui_dialoglinkchecker.h" #include <QProcess> #include <QDir> #include <QDebug> DialogLinkChecker::DialogLinkChecker(/*QStringList l,*/ QWidget *parent) : QDialog(parent), ui(new Ui::DialogLinkChecker) { ui->setupUi(this); // setModal(true); // setLinks(l); // ...
b62af724168a345325603236435c0b1c3e42a523
460992ee7cd448fbaa15e735fc99c5d8d19a89bd
Joshua-Ashton/xgl
/icd/api/vk_display_manager.cpp
C++
cpp
1,805
permissive
/* *********************************************************************************************************************** * * Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associ...
bfe41114381d8f8793e9bb969f19c05dcefb32d7
4b5d788b15c8aabd2be3f60b720771f1a4483c45
0yeap95d/Algorithm
/Baekjoon/17626_Four Squares/BOJ_17626_Four Squares.cpp
C++
cpp
467
no_license
#include <iostream> #include <cmath> #include <algorithm> #define MAX 50001 using namespace std; int n; int dp[50001]; void setDpTable() { for (int i = 0; i < MAX; i++) { if (i <= sqrt(MAX)) dp[i * i] = 1; if (dp[i] == 0) dp[i] = MAX; } dp[0] = dp[1] = 1; for (int i = 2; i < MAX; i++) { for (int j = 1; j *...
175b9c6b34c9cde606cc505bba67ec2504c79cef
a659c818eac3a0893bc73afcc9c270e4b48252b2
miles84/gesture
/projects/keyboard/src/keyboard.cpp
C++
cpp
2,766
no_license
#include <ros/ros.h> #include <signal.h> #include <termios.h> #include <stdio.h> #include "std_msgs/String.h" #include <move_base_msgs/MoveBaseAction.h> #include <actionlib/client/simple_action_client.h> #include <geometry_msgs/Quaternion.h> //#include <conio.h> #define KEYCODE_0 0x30 #define KEYCODE_1 0x31 #define K...
95b7641aec95ea26c8e8d0365a4a7c754898f268
374483d44d0b6a550abf8c4763fd16de8bf6b7ce
ModelingMan/gtalc-dinput8
/dinput8/src/CScrollBarHack.cpp
C++
cpp
6,699
no_license
#include "CScrollBarHack.h" #include <cmath> #include <cstring> #include "Globals.h" #include "vcclasses.h" static char ScrollBarTime[22] = "THE TIME IS 12:34 "; static char *ScrollBarMsgs[55] = { #include "ScrollBarMessages.inc" }; void CScrollBarHack::Update() { char *currentMsg = text; float x = VCGlobals::T...
3c4be5c8605bd25b8ff54f3b9a864a68e367bca5
faaf7b5f6d31b8dc33c384318aa9d981718182ff
ChronoTensai/sdl2tetris
/Project1/Project1/Tetrimino.cpp
C++
cpp
4,901
no_license
#include "Tetrimino.h" Tetrimino::Tetrimino(const int * tileSize, const int * nextX, const int * nextY) { _tileSize = tileSize; logicMatriz = new int[SIZE_MATRIZ * SIZE_MATRIZ]; orginalMatriz = new int[SIZE_MATRIZ * SIZE_MATRIZ]; spriteMatriz = new Sprite[TILES_PER_ITEM]; nextSpriteMatriz = new Sprite[TILES_PER_I...
8964a784e7e0ef57220874649c3565932f112849
a220695f7d6901b9fd06cfb2d8775008547ddf9d
hinnie123/PWND_SDK
/SDK/PWND_TargetsSpawner_BP_functions.cpp
C++
cpp
2,351
no_license
// PWND (4.17.2.0) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function TargetsSpawner_BP.TargetsSp...
ddcb1c5e5d96e5db7c3d362e69297198e6f31739
46226ffc3ae5daa3b68118d9c073c25165582cb4
damson/SafeCpp
/src/main.cpp
C++
cpp
2,288
no_license
#include <cstdlib> #include <iostream> #include "SafeQueue.hpp" #include "Thread.hpp" Mutex cout_mutex; class Prod : public Thread { public: static const int NB_PRODUCT = 10; static const int PRODUCTS = 100; private: static int ct; int id_prod; int res; public: Prod() : Thread() { this->id_prod = +...
1f103887ee03d0fe4debf9c4ea4c0a9adf22a5ab
fa0d66b478f55492a2e79d1b7c59983fd240bccd
vladium/vrt
/vr/vr_rt/apps/ref_tool/src/vr/ref_tool/op_make_loc.cpp
C++
cpp
11,850
permissive
#include "vr/ref_tool/ops.h" #include "vr/enums.h" #include "vr/io/dao/object_DAO.h" #include "vr/io/files.h" #include "vr/io/net/utility.h" // hostname() #include "vr/io/sql/sql_connection_factory.h" #include "vr/io/stream_factory.h" #include "vr/market/ref/asx/instrument.h" #include "vr/market/ref/asx/locate.h" #in...
68191211f624e09b4b3b0ab85c51797e0b623123
9ef21f37a5210c89cad2659eb17984f6d535234b
june-bui/jds
/jds/jiterator.cpp
C++
cpp
1,947
no_license
#include "jiterator.h" #include <iostream> using namespace std; namespace jds { template<typename T> jiterator<T>::jiterator() { this->it_next = NULL; this->it_prev = NULL; } template<typename T> jiterator<T>::jiterator(T m_element, jiterator* m_next, jiterator* m_prev) : element(m_element) , next(m_ne...
65645e6949ee92779d2387a7eb563823f272f13f
48259ccafaefea525891c4300ed4ec39e236bb98
jmintser/chemfiles
/include/chemfiles/Residue.hpp
C++
hpp
5,284
permissive
// Chemfiles, a modern library for chemistry file reading and writing // Copyright (C) Guillaume Fraux and contributors -- BSD license #ifndef CHEMFILES_RESIDUE_HPP #define CHEMFILES_RESIDUE_HPP #include <cstdint> #include <string> #include <vector> #include <algorithm> #include "chemfiles/exports.h" #include "chemf...
af8c9933375743d1bf543b42d6c9e0510acb6364
c634499a95a0f51d501cfccd067935311a167e8f
leaveitout/inviwo
/modules/qtwidgets/filepathlineeditqt.cpp
C++
cpp
6,325
permissive
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2016-2018 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
f4250454db79bac0c0bb7b30180f75b04621873c
b284818a0fe32a1d18176599cf62fa3c38a1e72b
pineal/chromium
/printing/backend/printing_restrictions.cc
C++
cc
1,745
permissive
// Copyright 2018 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 "printing/backend/printing_restrictions.h" namespace printing { const char kAllowedColorModes[] = "allowedColorModes"; const char kAllowedDuple...
f5e1cd40c6d392f80c396c9c332964f30efa018f
fc81a6626e205e9605af65b5ceab14d29a50aa2b
PepeMax/Raymaxime-display
/src/main.cpp
C++
cpp
2,569
permissive
#include <M5Stack.h> #include <Display.h> #include <Network_Management.h> #include <WiFiParameters.h> #include <SnigalK_Sentences.h> #include <Setup.h> float True_heading; float Wind_direction; float Wind_speed; float Target_heading; bool is_btnA_Pressed_1500 = false; bool is_btnA_Pressed_5000 = false; bool is_btnC_P...
1ec5a2a4da1a471b2565ebe723091a488deadbaf
773b9fa6feba9068e898354d8d81a0fb11a91fa9
STORM-S314/HandControlMeeting
/HandControlMeeting_QT/main.cpp
C++
cpp
780
no_license
#include "mainwindow.h" #include "logindailog.h" #include "bootanimation.h" #include <QApplication> #include <QDialog> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; //登录对话框 LoginDailog login; BootAnimation *boot = new BootAnimation("点击启动",QPoint(40,40),40); boot->...
f1e1ca9685cdf4ee0df7737bb157f5bd8d9b79f3
48bf5700af9c9bab8effb15013281ac83fbc036a
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14380/function14380_schedule_21/function14380_schedule_21.cpp
C++
cpp
2,146
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function14380_schedule_21"); constant c0("c0", 128), c1("c1", 8192), c2("c2", 64); var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i01("i01"), i02("i02"), i03("i03"), i04("i04"), i05("i05"), ...
ff7d3d3ac356970ae32ad463e5170e101852d0a5
dcb1cc8cba9d1ec643c2d81fbcf77bc0132ed1f6
baldurk/renderdoc
/renderdoc/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp
C++
cpp
75,036
permissive
// // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2015-2018 Google, 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 ...
b6ab933b881aef7de0b633d8691e0fd825e6cae2
70103a87f34c730f80bc40674a3a4b29f4ada1d9
hoseogame/20101925.SDL
/TimerManager.cpp
C++
cpp
1,603
no_license
#include "TimerManager.h" #include <stdio.h> TimerManager* TimerManager::mInstance = 0; TimerManager::TimerManager() { //Initialize the variables startTicks = 0; pausedTicks = 0; paused = false; started = false; this->start(); puts("TimerManager »ý¼º"); } void TimerManager::start() { //Start the TimerManag...
e0b7f72a82f7515c938667adc8bb719fe8c93625
37ef5b3edd0f1097ed15a0aba5a3c2f0238064ae
alexandraback/datacollection
/solutions_5731331665297408_0/C++/OcoToOo/C.cpp
C++
cpp
4,052
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <map> #include <set> #include <limits.h> #include <time.h> #include <ctype.h> #include <math.h> #include <sstream> #include <list> #include <queue> #include <deque> #include <stack> #include <bitset> #include <function...
e2a5d5126fcd9e1106334b98d05a8af99e1088a7
c8c3ccea32130981bcdc551eef4611c9a8751947
SenorGato/script_bot
/src/executor/binary_comp.cpp
C++
cpp
2,430
permissive
#include "executor.hpp" #include "conversion.hpp" #include "debug.hpp" #include "object.hpp" #include "operation_type.hpp" #include "string_util.hpp" #include <optional> #include <stdexcept> #include <string> #include <type_traits> #include <variant> using namespace std::string_literals; namespace executor { tem...
9b156288e234aee53ac350e0e532f28a777d6ca7
9f67cf6971610f23067dc5d39d9ceefde0b2f319
mangchiandjjoe/envoy
/test/integration/ssl_integration_test.cc
C++
cc
6,829
permissive
#include "ssl_integration_test.h" #include <memory> #include <string> #include "common/event/dispatcher_impl.h" #include "common/network/utility.h" #include "common/ssl/context_config_impl.h" #include "common/ssl/context_manager_impl.h" #include "test/integration/ssl_utility.h" #include "test/test_common/network_uti...
08879cfc1897322cecb5118985fe34ef9d1d44ee
5f14a0e1cf00710c05d3e9c10943820ae39d427a
mhcchang/chromium30
/src/chrome/utility/media_galleries/itunes_library_parser.cc
C++
cc
7,166
permissive
// Copyright 2013 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/utility/media_galleries/itunes_library_parser.h" #include <string> #include "base/logging.h" #include "base/stl_util.h" #include "base/...
817efdb2da859f28274d4b608246af343fbbd5a8
bc194b457a4c1d02e6ba2eb00cb0089c2d553681
michalsvagerka/competitive
/arch/cf/goodbye2019/EDividePoints.cpp
C++
cpp
1,678
no_license
#include "../../../l/lib.h" class EDividePoints { public: void solve(istream& cin, ostream& cout) { int N; cin >> N; vector<pii> A(N); cin >> A; while (true) { vector<int> Odd, Even; for (int i = 0; i < N; ++i) { if ((A[i].x+A[i].y)%2 == 0) { ...
782d6604a2502416d283d19661a6b5689b9a5a3e
3a8b1862459d1e1125c59f1a44872e8725068512
realjay007/hacker_rank
/HLRadioTransmitters/sol.cpp
C++
cpp
798
no_license
#include <cstdio> #include <algorithm> #include <vector> using namespace std; void printv(vector<int>&); int main() { int n, k, t, s, i, j; scanf("%d %d", &n, &k); vector<int> x; x.reserve(n); for(i = 0; i < n; ++i) { scanf("%d", &t); x.push_back(t); } sort(x.begin(), x.end()); //printv(x); t = 0; wh...
c8df75f32700433c2b012272ffc431ab55e59370
63916c9b7c72f9abe0a06125fe6802624c705ffb
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_1/R+wsi-popl+wsilp-popa.c.cbmc_out.cpp
C++
cpp
36,067
no_license
// 0:vars:2 // 2:atom_0_X5_2:1 // 3:atom_1_X3_0:1 // 4:thr0:1 // 5:thr1:1 #define ADDRSIZE 6 #define NPROC 3 #define NCONTEXT 1 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) char __get_rng(); char get_rng( char from, char to ) { char re...
c765f7188d0ffa4f42119dcf2680166b732eec80
72780ee3c613fb51586de24518c753fc19c827a0
shihaocao/lodestar
/lib/common/ArduinoJson/extras/tests/MixedConfiguration/enable_progmem_1.cpp
C++
cpp
4,311
permissive
// ArduinoJson - arduinojson.org // Copyright Benoit Blanchon 2014-2020 // MIT License #include "progmem_emulation.hpp" #define ARDUINOJSON_ENABLE_PROGMEM 1 #include <ArduinoJson.h> #include <catch.hpp> TEST_CASE("Flash strings") { DynamicJsonDocument doc(2048); SECTION("deserializeJson()") { ...
161af1c45a5028f24e90a84a603e5a4ab6b5fbdf
d33b426a007fe0ed9c335cb6fb64442430785dd9
mfkiwl/flexran-rtc
/src/network/protocol_message.cc
C++
cc
2,084
permissive
/* The MIT License (MIT) Copyright (c) 2016 Xenofon Foukas 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...
cabaed7e6d4cece646cf011aa469271e88b611c3
f9da91b34a8c3143ee9d55cdd169d32b184a9e7f
sebastiencs/R-Type
/common/includes/Paquet/PaquetFirstUDP.hh
C++
hh
773
no_license
// // PaquetFirst.hh for epitech in /home/chapui_s/rendu/ // // Made by chapui_s // Login <chapui_s@epitech.eu> // // Started on Fri Nov 13 21:34:17 2015 chapui_s // Last update Fri Nov 13 21:34:17 2015 chapui_s // #ifndef PAQUETFIRSTUDP_H_ # define PAQUETFIRSTUDP_H_ # include "Paquet.hh" class PaquetFirstUDP : ...
6a62f8b57a35faf615f0f062b71cbcd8ed8ffd4f
1c5c7af418ddc3fbee6205692c8ff88e78ba1cbc
mmelqonyan/Stepanavan
/Aren Grigoryan/22_02/bajvek.cpp
C++
cpp
1,527
no_license
#include <iostream> #include <cmath> #include <stdlib.h> #include <vector> using namespace std; vector<int> tesq(int num); vector<int> baj_3 (vector<int>arr,vector<int>arr2); int main() { vector<int> array; vector<int> array2; vector<int> array3; vector<int> array4; int num,tmp = 1; cout<<"Մուտքագրեք թիվ ...
7ee8a5cecc09cb5ebb92bf8cfd64f9d019e57acc
5ea0ebf14a8f16871cd4eedc4eaef5346c80c904
Amaayezing/ECS-40
/tar files/lecture11/lecture11/badvector2.cpp
C++
cpp
294
no_license
// // badvector.cpp // #include<vector> #include<list> using namespace std; // class A has no default constructor // because a constructor with parameter is defined class A { public: A(int x) : val(x) {} private: int val; }; int main() { list<A> alist; vector<A> avec(10); }
1e142755e76b497cfc409c8dc11bc29ae5c3947e
93f9088f6a88886d9c7199771dede2cbbcb1e10d
PDi-Communication-Systems-Inc/lollipop_external_chromium_org
/sync/engine/syncer_proto_util_unittest.cc
C++
cc
11,299
permissive
// Copyright (c) 2012 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 "sync/engine/syncer_proto_util.h" #include <string> #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/message...
d4fef610c593e75e096272b5364a5ae96f449e9b
0c2fae8f2c8ea4b21c08744dd040ae3d75208fd0
yujinqiu/memory
/arena/arena.hpp
C++
hpp
24,853
permissive
/* * Copyright (C) 2020 Beijing Jinyi Data Technology 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
d7f4326935a926e83abbe0f398b0325364425171
535011463d7fd645002af6aaca99bb55546cef6d
jefarrell/NatureOfCode_Cinder
/Ch1_Vectors/VectorMotion_AccelerateToMouse/src/VectorMotion_AccelerateToMouseApp.cpp
C++
cpp
979
no_license
#include "cinder/app/App.h" #include "cinder/app/RendererGl.h" #include "cinder/gl/gl.h" #include "Mover.hpp" using namespace ci; using namespace ci::app; using namespace std; class VectorMotion_AccelerateToMouseApp : public App { public: void setup() override; void mouseDown( MouseEvent event ) override; void up...
7f7276232ed928ef8e9440007e869eeaf924957d
b4dcd137c354d525e0d6b2c9069a120bbc7e6fcb
RoseAlice2018/Leetcode
/hot100/208.cpp
C++
cpp
984
no_license
class Trie { private: bool isEnd; Trie* next[26]; public: Trie() { isEnd = false; memset(next, 0, sizeof(next)); } void insert(string word) { Trie* node = this; for (char c : word) { if (node->next[c-'a'] == NULL) { node-...
55ed3f97c572cb5815fe2989c1d929fe4e0e2e4c
3152c314708c2616a7629d7831e605a8f7c4231f
kFYatek/clang
/test/CodeGenCXX/microsoft-abi-typeid.cpp
C++
cpp
3,293
permissive
// RUN: %clang_cc1 -emit-llvm -O1 -o - -triple=i386-pc-win32 %s -fexceptions -fcxx-exceptions | FileCheck %s struct type_info; namespace std { using ::type_info; } struct V { virtual void f(); }; struct A : virtual V { A(); }; extern A a; extern V v; extern int b; A* fn(); const std::type_info* test0_typeid() { ret...
59cf2db98e6bb518ad78b4633f7d2d3bbcf11b98
53074536527ac4e2a7b424f43eaa6b8d19889188
suicvne/MTechEngine
/src/LuaCameraWrapper.cpp
C++
cpp
898
no_license
#include "LuaCameraWrapper.h" LuaCameraWrapper::LuaCameraWrapper(lua_State *L) { actualCamera = (Camera2d*)lua_touserdata(L, 1); } LuaCameraWrapper::~LuaCameraWrapper() {} void LuaCameraWrapper::setObject(lua_State *L) { actualCamera = (Camera2d*)lua_touserdata(L, 1); } int LuaCameraWrapper::getCameraX(lua_...
165fda37a9f66eb8b1f433a66471f00341c0783c
57a26af754921fc80059f0f4949756d3b29b8eb0
Nukem9/LinkerMod
/components/radiant_mod/undo.cpp
C++
cpp
302
no_license
#include "stdafx.h" void(*Undo_Start_o)(const char *undoName); void(*Undo_End_o)(); void hk_Undo_Start(const char *undoName) { //if (!_stricmp(undoName, "create entity")) // Remote_AddEntityCreate(nullptr); Undo_Start_o(undoName); } void hk_Undo_End() { Undo_End_o(); Remote_CommitChanges(); }