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
0260d80030f107f8321a0bc782bed61534d76be5
a8ebbb168a9a3fe6a63d6a60fdca276abaa33184
Pronomuos/CodeWars-Solutions
/Two_diffirence/two_diffirence.cpp
C++
cpp
481
no_license
#include <utility> #include <vector> #include <set> using namespace std; vector<pair<int, int>> twos_difference(const vector<int> &vec) { vector<pair<int, int>> ans; vector<int> temp_vec = vec; sort (temp_vec.begin(), temp_vec.end()); for (int i = 0; i < temp_vec.size(); i++) for (int j = i + ...
7b32111fac271366eb1b7414cf28b7c0e420a0b6
d45fad65ab0f735fc38ca97f13d92beb71017036
j1249845202/chromium
/third_party/crashpad/crashpad/util/misc/metrics.cc
C++
cc
4,163
permissive
// Copyright 2016 The Crashpad 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-2.0 // // Unless required by ...
1582facceeec198490ebf634982495255622d493
727de77e7f7568eb162195990489082313178d8c
Zeppelin5/Nowcode
/把数组排成最小的数.cpp
C++
cpp
711
no_license
#include<iostream> #include<sstream> #include<string> #include<algorithm> #include<vector> using namespace std; bool compare(string& s1, string& s2) { string str1 = s1 + s2; string str2 = s2 + s1; return str1 < str2; } void MinCombination(vector<int> ary, int length) { vector<string> sary(length); for (int i =...
f58b0321c8fa1b48844c1c22f82db631a0a39c80
506adbd3cab8d53ac5cef5dd943027ec0b106640
azhi/BSUIR_labs
/5sem/IT/lab5/BigNum.cpp
C++
cpp
10,853
no_license
#include "BigNum.h" #include <math.h> #include <sstream> #include <stdexcept> #include <iostream> #include <time.h> BigNum::BigNum(long long base) : base(base) {} BigNum::BigNum(long long base, vector<long long> nums) : base(base) { set_numbers(nums); } BigNum::BigNum(long long base, string str_nums) : base(base)...
6662e56500d62cdac43b1a00a06b8de9ee1b02f8
b34782ccd5c027a6984988e1ca6926ea26be0ca1
herobbq/YENGINE
/YEngine/src/SourceTool/YLoadShader.cpp
C++
cpp
4,552
no_license
#include"YLoadShader.h" #include <fstream> #include <iostream> #include <sstream> #include "hfileinclude.h" using namespace std; YShader::YShader(const char* vertexPath, const char* fragmentPath, const char*geometryPath) :ID(-1) { char ErrorLog[512]; string vertexCode; string fragmentCode; string geometryCode; ...
eefb22544a79e09e633d0d399b49dfee61c39f07
c9c35e5a357c6932b56fed5b7cc31f211c553fc7
Oliver-Focke/Oliver_private_Bude
/CodeBlocks/Projects/Udemy_C1_T1/main.cpp
C++
cpp
306
no_license
#include <iostream> using namespace std; int main() { string greeting; cin >> greeting; cout << greeting << endl << endl; cout << greeting << endl << endl; greeting = "Hallo MARS!!!"; cout << greeting << endl << endl; cout << greeting << endl << endl; return 0; }
24535d27e91c749f9964bf9bfdb7d8cb7b542703
d029ac728707a95ba8023dd04ca645f2ce039d71
vscroll/sitl_gazebo
/src/gazebo_mavlink_interface.cpp
C++
cpp
19,665
no_license
/* * Copyright 2015 Fadri Furrer, ASL, ETH Zurich, Switzerland * Copyright 2015 Michael Burri, ASL, ETH Zurich, Switzerland * Copyright 2015 Mina Kamel, ASL, ETH Zurich, Switzerland * Copyright 2015 Janosch Nikolic, ASL, ETH Zurich, Switzerland * Copyright 2015 Markus Achtelik, ASL, ETH Zurich, Switzerland * * L...
ef8aba5747c0016eebb478b4a91308cabb6deac1
1c0a7d0897524527ee09811a4038fda84f8522cd
Codenoob-lpy/Codenoob-lpy
/blacksmith.cpp
C++
cpp
1,982
no_license
#include "functions.h" infostruct blacksmith (infostruct character, int rngoutput) { srand(rngoutput); string name; int stringsize = rand() % 10 + 1; char vowel[] = {'a','e', 'i', 'o', 'u'}; for (int i = 0; i < stringsize; i++) { char x; if (i == 0) { x = '...
bbe84c99321890643b9dfb60710d3c113f3bcdc6
95a91950d31b8457f09ef61458ed2cbe003c9fc4
deeplearning4j/deeplearning4j
/libnd4j/include/graph/execution/impl/LogicNextIteration.cpp
C++
cpp
1,691
permissive
/* ****************************************************************************** * * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * * See the NOTICE file distributed wit...
78d82adc1268938c22bd57ee4870cc429b1242e8
0b39cc89d64202b34bd63ac49fddf394ac363198
xjliu1204/ttk
/examples/vtk-c++/main.cpp
C++
cpp
4,164
permissive
/// \defgroup examples examples /// \brief The Topology ToolKit - Example programs. /// @{ /// \author Julien Tierny <julien.tierny@lip6.fr> /// \date October 2017. /// /// \brief Minimalist VTK-based TTK example pipeline, including: /// -# The computation of a persistence curve /// -# The computation of a persisten...
f0d6411906e56b856321b8fa9c98e91c597b4473
970d83854bc17f59b38225f2b58e2987823f9d79
Cj-bc/playground
/cpp/EzoeRyou_cpp_intro/5_using_vector.cpp
C++
cpp
278
no_license
#include <vector> #include <iostream> int main() { std::vector<int> v; for (int i=0;i != 10; ++i) { std::cout << "pushing: " << i << "\n"; v.push_back(i); } std::cout << "size of v: " << v.size() << "\n"; std::cout << "5th item: " << v.at(4) << "\n"; }
c189033e529714d7336e4ba65e2fcb8194778a20
df563a88aef2469cd7f66516ae1f2124cc644a14
arrg0m/problem-solving
/atcoder/abc188/abc188B.cc
C++
cc
499
no_license
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> a, b; int tmp; for(int i=0; i<n; i++) { cin >> tmp; a.push_back(tmp); } for(int i=0; i<n; i++) { cin >> tmp; b.push_back(tmp); } long sum = 0L; ...
3a2c723d4a51ce4daa5c3e2e80fa52c37fb79bd9
ecafba496d141e8626aac68fe68fba0d080e612a
Sanzo00/ACM
/solution/2019牛客多校/标程/第十场标程/h.cpp
C++
cpp
1,517
no_license
#include <bits/stdc++.h> using namespace std; typedef array<pair<int, int>, 5> molecule; molecule isomer[] = { { { {1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6} } }, // n-hexane { { {1, 3}, {2, 3}, {3, 4}, {4, 5}, {5, 6} } }, // 2-methylpentane { { {1, 4}, {2, 3}, {3, 4}, {4, 5}, {5, 6} } }, // 3-methylpen...
ab5dc1ee614ea69695aea267b4f02b4c1830cca5
d388b17cebf0e692371de742257b2418b6e8912d
T353007/LeetCode-1
/solutions/1055. Shortest Way to Form String/1055.cpp
C++
cpp
430
no_license
class Solution { public: int shortestWay(string source, string target) { int ans = 0; for (int i = 0; i < target.length();) { const int prevIndex = i; for (int j = 0; j < source.length(); ++j) if (i < target.length() && source[j] == target[i]) ++i; // all chars in source ...
e501e49fb2ec7a5c6c268b0ae7af24f7b1a75d0b
fe25d195fce74c351e9c1c87fe5960cc02634776
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14368/function14368_schedule_0/function14368_schedule_0_wrapper.cpp
C++
cpp
1,258
no_license
#include "Halide.h" #include "function14368_schedule_0_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(64); Halide::Buffer<int32_t> buf01(16384,...
bd450f852e0d1c7525d360174b6248cde289c782
0dbb1ad86dfaee4072d517438f37f25bedc37e3d
MaticVrtacnik/ProceduralnaAnimacija
/timer/GUI/GUITextBox.hpp
C++
hpp
7,757
permissive
/* MIT License Copyright (c) 2019 MaticVrtacnik 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, ...
62eeb83e765eaf3d412f97cc99d225a568b58bfb
b53eb2dda5666a7548a3cfdf4fa98a1abee70ec6
WiViClass/cef-3.2623
/chromium/src/chrome/browser/memory_details.cc
C++
cc
14,225
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 "chrome/browser/memory_details.h" #include <algorithm> #include <set> #include "base/bind.h" #include "base/file_version_info.h" #include "...
60d4767de39e928836b3a49ca75a988fe2664cb1
3af6dc9703373f7188abf7474daa63a43c99b0fa
szeged/TyGL
/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp
C++
cpp
4,697
no_license
/* * Copyright (C) 2011 Samsung Electronics. 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 above copyright * notice, this list of co...
5c573e08fcfe3820d8b446ea6891fc532ec24660
5a22cccccd7b95af35d904a2cb3844c08dbd0436
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_patch_hunk_5317.cpp
C++
cpp
1,622
no_license
*/ while (1) { #if !APR_HAS_OTHER_CHILD rv = WaitForMultipleObjects(num_events, (HANDLE *)child_events, FALSE, INFINITE); cld = rv - WAIT_OBJECT_0; #else + /* THIS IS THE EXPECTED BUILD VARIATION -- APR_HAS_OTHER_CHILD */ rv = WaitForMultipleObjects(num_events, (HANDLE *)c...
1d14486ddc84d7ae0a74e34374f96d67ae2ed0ab
188a27c9f9750f7fa6f880f75d5394d18dff94d4
DHUer/Algorithm-and-Data-Structure
/2017-2018s_Summer/LCS_recursive.cpp
C++
cpp
566
no_license
//c[i][j]=0 (i=0,j=0) // c[i-1][j-1] (xi==yj) // max{c[i][j-1],c[i-1][j]}(xi!=yj) #include<iostream> #include<vector> #define M 8 #define N 9 using namespace std; char x[M+1], y[N+1]; int LCS_recursive(int i,int j) { if(i==0||j==0) return 0; if(x[i]==y[j]) return LCS_recursive(i - 1,...
ee41ac43049ea429d8be9e17bd04a2278d5edd7a
25ef8defbb9d78171c2999358b6b021af718ea89
sensebox/senseBoxMCU-core
/arduino/samd/libraries/phyphox-arduino/src/separator.cpp
C++
cpp
1,065
permissive
#include "phyphoxBleExperiment.h" void PhyphoxBleExperiment::Separator::setHeight(float h) { char tmp[10]; sprintf(tmp, "%f", h);; ERROR = (strcmp(ERROR.MESSAGE, "")==0) ? err_checkLength(tmp, 10, "setHeight") : ERROR; sprintf(HEIGHT, " height=\"%.2f\"", h); } void PhyphoxBleExperiment::Separator::setColor(const ...
ca75f803373398ad57b848d2bcdfd362aa053a67
756f84ab1e38927dfb320bc2cf1dba7fcb227ecf
Hydrorastaman/PDFOut-SDK
/source/ImageImpl.cpp
C++
cpp
7,021
permissive
#include <ImageImpl.h> #include <ResourceUid.h> #include <InternalTools.h> #include <UserObjectHash.h> #include <UserObjectManager.h> #include <graphics/ImageDictionary.h> #include <graphics/image/ImageJpegEncoder.h> #include <graphics/image/ImageTiffEncoder.h> #include <graphics/image/ImageIndexedEncoder.h...
517eedbd7b42f377d6708590df672cc0549e97d1
0a4bcbf7865d8a8dc85811d7b10687eca2245bca
unclephilevans/wrapirrlicht-for-android
/jni/COGLES2SLMaterialRenderer.cpp
C++
cpp
21,109
no_license
// Copyright (C) 2009-2010 Amundis // Heavily based on the OpenGL driver implemented by Nikolaus Gebhardt // and OpenGL ES driver implemented by Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in Irrlicht.h #include "IrrCompileConfig...
a9f0126b888d842734ecabd5a30521fea7c62e55
737e94a93517d506a7c9d216bbe9959a0dd1f610
svn2github/angelscript
/tags/2.17.0/sdk/tests/test_feature/source/test_addon_scriptarray.cpp
C++
cpp
12,358
no_license
#include "utils.h" #include "../../../add_on/scriptarray/scriptarray.h" namespace Test_Addon_ScriptArray { static const char *TESTNAME = "Test_Addon_ScriptArray"; static const char *script1 = "array<string> b; \n" "array<int> g_a(3); \n" "void TestArray() ...
74aef5f8f847390bf373ebd114631334f800bf26
cc79751f8483c5776accfeb2628bb0efff34883a
SUIIKA/C-Learning
/C_byHB/if常见错误解析_2.cpp
C++
cpp
212
no_license
# include <stdio.h> int main(void) { if (3 > 2) //4行 如果这里加分号,则会导致程序编译到6行时就会出错 printf("哈哈!\n"); else //6行 printf("嘿嘿!\n"); return 0; }
5c7125297d8e1e62f3f683c191495bf75ee4c964
90d8ece4ece192b8e4d8f0bbf0de789537a2a22b
RolandTaverner/ctp2
/ctp2_code/gfx/spritesys/directorevent.cpp
C++
cpp
9,617
no_license
//---------------------------------------------------------------------------- // // Project : Call To Power 2 // File type : C++ source // Description : Director events // Id : $Id$ // //---------------------------------------------------------------------------- // // Disclaimer // // THIS FILE IS ...
768dcf88c2c574afc4db83fbe81caf7e17096473
1dc432242f4df1bf3af39597090c045ee3a649e0
yeyangkit/pcl
/apps/cloud_composer/src/project_model.cpp
C++
cpp
21,546
permissive
#include <pcl/apps/cloud_composer/project_model.h> #include <pcl/apps/cloud_composer/tool_interface/abstract_tool.h> #include <pcl/apps/cloud_composer/commands.h> #include <pcl/apps/cloud_composer/work_queue.h> #include <pcl/apps/cloud_composer/items/cloud_item.h> #include <pcl/apps/cloud_composer/cloud_view.h> #includ...
0cde2dde1b3a6d5f4a243edeb8f76f39990a36c1
c7cee654174d52545ced3956a3224d901040ca9d
joyhuang-game/leidota
/Classes/MessageDispatcher.cpp
C++
cpp
763
no_license
#include "MessageDispatcher.h" #include "EntityManager.h" MessageDispatcher* MessageDispatcher::_instance = nullptr; /** 向某个人发出一个消息 */ void MessageDispatcher::disCharge(BaseGameEntity* pReceiver, Telegram& msg) { if (pReceiver == nullptr) { // 此时接受者已经不存在了 return; } pReceiver->handleM...
ab777e7b44e8eff6cfda60d277a88daa415a57cf
acdcd053acdc6fe9acee031034d544ecb782c892
jtg-gg/chromium.src
/chrome/browser/media/cast_transport_host_filter.cc
C++
cc
10,476
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 "chrome/browser/media/cast_transport_host_filter.h" #include "base/thread_task_runner_handle.h" #include "chrome/browser/browser_process.h" #inc...
be190dc903f49d02a67883a7245ac1d12de8d658
f03b3ba9f5cae74ff8981a93029fb6cbf3e23da3
AJMartel/guide-modular-firmware
/fade_demo_05/Buttons.hpp
C++
hpp
616
permissive
#pragma once #include <Arduino.h> // Warning: This is a code example for the article "guideline for modular firmware". // It is code in a transition phase, do not use it as it is! /// A module to handle button presses. /// namespace Buttons { /// The callback function. /// typedef void (*Function)(); /// ...
ddf7a66197ad7c3191142168c05081bb46880a7f
42a7f4cb97c37c54825e34d352a20477890eb02a
dframework/cpp-common
/lib/io/LocalFs.cpp
C++
cpp
5,145
no_license
#include <dframework/base/System.h> #include <dframework/io/LocalFs.h> #include <dframework/io/File.h> #include <dframework/http/HttpContentType.h> #include <fcntl.h> #include <sys/stat.h> #include <dirent.h> #include <errno.h> #include <sys/time.h> namespace dframework { DFW_DECLARATION_SAFE_COUNT(LocalFs); ...
efd7bb5c77d7f651178a19e50bad3b408db3e2f2
a0a3a3487bcf54b639f850a502366d989c3d736e
Holzhaus/spleeterpp
/src/spleeter_filter/model.cc
C++
cc
639
permissive
#include "spleeter_filter/model.h" namespace spleeter { std::vector<std::string> GetOutputNames(SeparationType type) { // Found using the command // $> saved_model_cli show --dir _deps/spleeter-build/exported/Xstems --all switch (type) { case TwoStems: return {"strided_slice_11", "strided_slice_19"}; ca...
9cb54467171fcde5a24029c6c5fb8b1bac1b816e
e166b000f791ebad39895a3df3acd8fdfa8e962c
luziferk/Ros-D3D
/main.cpp
C++
cpp
22,006
no_license
/* * Ros D3D 1.2b by n7 How to compile: - compile with visual studio community 2017 (..\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe) - select Release x86 - click: project -> properties -> configuration properties -> general -> character set -> change to "not set" - compile with CTRL + Shift + B ...
e1e1bb77ed305485d882710e3fc247296771df26
a21f234afbe575ccf4a3143a827bd65bef0f2c52
amov-lab/Prometheus
/Modules/simulator_utils/include/ode/boost/numeric/odeint/util/unwrap_reference.hpp
C++
hpp
1,472
permissive
/* [auto_generated] boost/numeric/odeint/util/unwrap_reference.hpp [begin_description] unwrap_reference [end_description] Copyright 2009-2011 Karsten Ahnert Copyright 2009-2011 Mario Mulansky Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http:/...
194884d1bcd05b03b6147efe159ebcdeeb3e8405
6b5985ad05c144ca4a5e7ba6c8e5b43c7c35bf51
blmarket/icpc
/2016/721cf/D.cc
C++
cc
1,823
no_license
#include <iostream> #include <algorithm> #include <unordered_set> #include <unordered_map> #include <cstdlib> #include <cstring> #include <cstdio> #include <sstream> #include <numeric> #include <iterator> #include <queue> #include <set> #include <map> #include <vector> #define mp make_pair #define each(it, v) for(auto...
4a11507d011b226d7ae55cb90c469b4ee0f5d42d
da0cf91f710928a7ad81a90b5cb2822a85a6e179
HCFlight/Firmware
/src/examples/segway/blocks.cpp
C++
cpp
3,727
permissive
/**************************************************************************** * * Copyright (C) 2012 PX4 Development Team. 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. Redistri...
98d6366d38cfc387376ec76dbcb8db6d31df1ffd
bf3e6ecf702d7d677a639d2d14e146fcc83eee2f
CurtisNewbie/cpp-stuff
/chap_03/hexoct1.cpp
C++
cpp
662
no_license
#include <iostream> // using namespace std; // this time, we don't use namespace int main() { int chest = 42; int waist = 42; // will be in hex int inseam = 42; // will be in octal // we can use operator to display decimal numbers in hex or octal std::cout << "Monsieur cuts a striking figure!\n"...
f169a9ba05d746f98183df4ee996a72d3d706492
09e9ca03359d70c41f841504031a831794109513
jcnorby/FROST
/frost-dev/export/sim/u_vec_acrobot.cc
C++
cc
3,227
permissive
/* * Automatically Generated from Mathematica. * Wed 7 Mar 2018 18:11:57 GMT-05:00 */ #ifdef MATLAB_MEX_FILE #include <stdexcept> #include <cmath> /** * Copied from Wolfram Mathematica C Definitions file mdefs.hpp * Changed marcos to inline functions (Eric Cousineau) */ inline double Power(double x, double y) { ...
b725d9d7ccee21075d01636af346bfaed86fc7c4
47457f89051ae8cd4d71cff794c3a131700dfdba
uv-xiao/uvcc
/src/IR/utils.cpp
C++
cpp
1,274
no_license
#include "utils.h" #include <iostream> #include <cstdio> #include <sstream> #include <assert.h> namespace utils{ std::vector<std::string> split(const std::string &s, char sep) { std::stringstream sin(s); std::vector<std::string> ret; // sin.str(s); std::string part; char ch; while (sin.get(ch...
849c62fac348076f39466547beb0388b7ee72f04
7cddd3a2c574bafb7b6eb4a0d9a445942999cd4b
iCodexDev/td
/td/telegram/WebPagesManager.cpp
C++
cpp
67,410
permissive
// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #include "td/telegram/WebPagesManager.h" #include "td/telegr...
81dcf4d659f8858dd48493b75c034f1ff7167c5c
3f1bb4befdc9b7b05056574f65d31f3bc6be17e4
kimphg/Peter
/QT_Peter/c_config.cpp
C++
cpp
2,970
no_license
#include "c_config.h" //CConfig mGlobbalConfig; double CConfig::shipHeadingDeg=5; double CConfig::shipSpeed=0; double CConfig::antennaAziDeg=0; QHash<QString, QString> CConfig::mHashData = CConfig::readFile(); volatile long long int CConfig::time_now_ms = 0; void CConfig::setValue(QString key, double value) {...
3fadbd26962444c161db3bae38cd2284930e00a5
1595c980ad22fc478ab5a190ec306bdc00cb1f2f
c-s-n-v-7-7/TestGit
/CP/LSSwithk.cpp
C++
cpp
346
no_license
#include<iostream> using namespace std ; int main() { int t ; cin >> t ; while(t--) { string s ; cin >> s ; int k ; cin >> k ; int freq[26]={0} ; for ( int i=0 ; s[i]!='\0' ; i++ ) { freq[s[i]-97]++ ; } int l=0 ; for ( int i=0 ; i<26 ; i++ ) { if(freq[i]>=k) l+=freq[i] ; } cout << l ...
656b000c87ab04e7b9c5f54af62396685aad5e82
dc447e1e70f8878f261081cebde84755808c7062
KremaktalanA/Jutge-Problems
/X16803.cpp
C++
cpp
1,984
no_license
/*#include <iostream> #include <vector> using namespace std; int main() { unsigned long long int x_1, r_1, n_1; int x; bool comp1 = true; cin >> x_1; r_1 = x_1; for (int i = 2; i*i <= x_1; ++i){ if (x_1 % i == 0) { comp1 = false; break; } } int n = 0; while (x_1 != 0) { ...
819db7e5adae5a7fc8a04cdce67bc960dc4d1389
34bc21f5e2b0822023a4ba83f58931bbe7eb1e25
AsanX/Koulukodaus
/SKR/4/h4_tehtava_1.cpp
C++
cpp
821
no_license
#include <iostream> #define alipaino 20.7 #define normaali 26.4 #define lieva_ylipaino 27.8 #define ylipaino 31.1 int main() { // painoindeksi float indeksi, paino, pituus; char tulkinta[20] = { '\0' }; std::cout << "Paino: "; std::cin >> paino; std::cout << "\n"; std::cout << "Pituus: "; std::cin >> pituus...
260c52259f8f64f2c9917df47849774f99e87710
fa6c53b7ee924e7e699902538a9dd70b15681b00
VeriSilicon/tensorflow
/tensorflow/compiler/xla/service/hlo_module_dce.cc
C++
cc
5,592
permissive
/* Copyright 2018 The TensorFlow 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-2.0 Unless required by applicable law or a...
d4b5283b1181821c1916c0af304a0f84dee8b379
6d3562aa63d43bc6ba34d1bea8f2c365edd4bf06
Stamek/nxboost
/src/test/Checkpoints_tests.cpp
C++
cpp
1,291
permissive
// Copyright (c) 2011-2013 The Bitcoin Core developers // Copyright (c) 2017 The PIVX developers // Copyright (c) 2018-2019 The NXBoost developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // // Unit tests for block-ch...
9a7604b14dd4823ba5d780d05b39cee20f7cfc47
1bf58df03ad21876ac4a68fa424eea0e986d353c
david-guerrero/MITK
/MITK/Modules/Bundles/org.mitk.gui.qt.peripheralconfig/ToFProcessing/Testing/mitkToFDistanceImageToPointSetFilterTest.cpp
C++
cpp
9,496
no_license
/*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: $ Version: $Revision: $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.tx...
3cd58ad300549d52c2c707841797e1cc2ca59142
d6afa009ef9e90bfd783f7a62ac21b163f0dd790
GLP90/Xbb
/HelperClasses/KinFitter/TKinFitter.cc
C++
cc
32,692
no_license
// Classname: TKinFitter // Author: Jan E. Sundermann, Verena Klose (TU Dresden) //________________________________________________________________ // // TKinFitter:: // -------------------- // // Class to perform kinematic fit with non-linear constraints // #include <iostream> #include <iomanip> #include "He...
2b263bf8f64dbcceb8ab229fedae87d7bf996325
e25268b50b66d20ba8f8214a3177603355387c2f
ObamaQt/ObamaQt
/src/rpcwallet.cpp
C++
cpp
54,868
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 "wallet.h" #include "walletdb.h" #include...
d7c45ee39f16d85380f3b64e3b41054c58091986
920a1ea0c681b4dc70a1f668b5291baf4e0fd5b3
wzyy2/chromium-browser
/content/browser/blob_storage/blob_url_loader_factory.cc
C++
cc
10,893
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/blob_storage/blob_url_loader_factory.h" #include <stddef.h> #include <utility> #include "base/bind.h" #include "base/logging.h"...
eb18afc59381d0d65f11a259aac3c647d7a4b582
1069c4905c2e3b9fde2496b595a982deb0cb85ab
vishalbelsare/arangodb
/3rdParty/boost/1.77.0/libs/geometry/test/algorithms/detail/sections/range_by_section.cpp
C++
cpp
3,627
permissive
// Boost.Geometry (aka GGL, Generic Geometry Library) // Unit Test // Copyright (c) 2010-2012 Barend Gehrels, Amsterdam, the Netherlands. // This file was modified by Oracle on 2020-2021. // Modifications copyright (c) 2020-2021, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on beha...
090d47b3e5ae090380d8c79a46de72b7038c1d0b
0ad459dc3f3d37b59fd1456650f42b7ca30a4c48
chrzmmr/Laser-interaction-in-fields
/Main Code/Field.cpp
C++
cpp
22,916
no_license
#include "Field.h" #include <math.h> #include "constantes_SI.h" #include "algorithmes.h" // ------------ // Constructors // ------------ Field::Field() // Constructeur par défaut { F0.set(0.,0.,0.); F1.set(0.,0.,0.); F2.set(0.,0.,0.); Fn.set(0.,0.,0.); n = 3; ...
f1a134b608e41e8f6fd0377a31d69fe28e6ec3da
cbdc83a2b6a813e5d5b458581c0311b78bbfd7d2
ChristianKniep/hexabus
/hostsoftware/hexadisplay/libhexadisplay/value_provider.cpp
C++
cpp
2,782
no_license
#include "value_provider.hpp" #include <QSettings> #include <boost/algorithm/string.hpp> #include <boost/filesystem.hpp> #include <libklio/error.hpp> namespace bfs = boost::filesystem; using namespace hexadisplay; ValueProvider::ValueProvider(const std::string& configfile) { /** * Read the config file. */ //...
7f4a6be89c65a35410ed9db4ba6ba4b7dcd0ac8e
7b8e583a1514f8132e72370eed5575f87209d655
N00byEdge/Neohuman
/DrawingManager.cpp
C++
cpp
21,108
permissive
#include "DrawingManager.h" #include <iomanip> #include <array> #include "BaseManager.h" #include "BuildingQueue.h" #include "FAP.h" #include "Neohuman.h" #include "ResourceManager.h" #include "SquadManager.h" #include "SupplyManager.h" #include "UnitManager.h" #include "BWAPI.h" #include "bwem.h" const std::array<...
094972f6ec9e4c02062a1b919bc76b370ac2da0a
62795e9237544e8ae284796c98d18b223dcba22d
crskycode/Mind-Team
/Src/MetaHook/metahook.cpp
C++
cpp
19,295
no_license
#include "metahook.h" #include "LoadBlob.h" #include "Detours\detours.h" #include "interface.h" #include <IPluginsV1.h> struct hook_s { void *pOldFuncAddr; void *pNewFuncAddr; void *pClass; int iTableIndex; int iFuncIndex; HMODULE hModule; const char *pszModuleName; const char *pszFuncName; struct hook_s *pN...
946815b19527aee100a84ca4b23353692514c339
0f2190a17d9746c4c327e76b2da507ae210206f7
mloves0824/envoy
/test/extensions/filters/network/ext_authz/ext_authz_test.cc
C++
cc
23,797
permissive
#include <memory> #include <string> #include <vector> #include "envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.h" #include "envoy/extensions/filters/network/ext_authz/v3/ext_authz.pb.validate.h" #include "envoy/stats/stats.h" #include "source/common/buffer/buffer_impl.h" #include "source/common/json/json_...
1f103c9b206e631ce73c2aa98fb1fe130b7d7826
dc9e37a998803e546bbe8419a3cc5fc635de6cea
klapeto/Zeta-Engine
/Zeta/include/Zeta/Core/MapClasses/Quadtree.hpp
C++
hpp
2,242
permissive
/* * Quadtree.hpp * * Created on: 20 Μαρ 2014 * Author: klapeto */ /* This file is Part of Zeta Engine * * The MIT License * * Copyright (c) 2014 Ioannis G. Panagiotopoulos (AKA Klapeto) * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated *...
00f8aff846d98c304c7f32a6691daa399ee1ec81
bb77c93471598af2779e686c82c0dd3d4d78b9df
AspidT/Zerlight
/guichan/gui/ZListBox.cpp
C++
cpp
8,389
no_license
// // Created by tatiana on 28.09.18. // #include "ZListBox.h" #include "Graphics.h" #include "ListModel.h" #include "KeyEvent.h" #include "MouseEvent.h" #include "SelectionEvent.h" #include "SelectionListener.h" namespace gui { ZListBox::ZListBox() :ZWidget() { } void ZListBox::init() {...
40d07b2cd35e6bbfd048260c0a5e57d4363b2210
cc9aa22822bed76847b412ba43eec3ac3877330d
CKeddie/Breakout
/NK_CodeTest_Breakout/Breakout/DefaultGameState.cpp
C++
cpp
7,264
no_license
#include "Application.h" #include "Components.hpp" #include "LevelBuilder.h" #include "GameStates.hpp" #include <sstream> #include <iostream> #include <algorithm> DefaultGameState::DefaultGameState(Application & app, LevelSchema blueprint) : BaseGameState::BaseGameState(app) { m_border = app.GetFrame(); float offs...
0124da07e29602fd876207b2f9187545f3811fb3
c6eed8252551a7171a18c02aeb88da3e667319c9
Dryg/NoPixel
/@nopixel/addons/sl_client/cfgSounds.hpp
C++
hpp
939
no_license
class CfgSounds { sounds[] = {}; class bankAlarm { name="bankAlarm"; sound[]= {"\sl_client\sounds\bankAlarm.ogg",1,1,100}; titles[] = {0,""}; }; class fireAlarm { name="fireAlarm"; sound[]= {"\sl_client\sounds\fireAlarm.ogg",1,1,100}; titles[] = {0,""}; }; class shopAlarm { name="shopAlarm"; ...
7469d00a518027407388170e3f8963e05d8d1403
8b0b62a9894eba93d076bb058e982bce8160af5d
jitnirmal/Tester
/IO/test.cpp
C++
cpp
463
no_license
#include <iostream> #include <thread> #include <string> #include <vector> #include <map> #include <unordered_map> #include <fstream> #include <sstream> #include <iomanip> #include <memory> #include <filesystem> #include "CSVRW.h" #include "WordCount.h" int main(int argc, char *argv[]) { std::cout<...
9d339a9518e1d6f83e38d8948fac36028dda638f
0e2f54b202109d12b6ce1953f50b65b071b0a3d4
tgarciai/BlingFire
/blingfirecompile.library/src/FAIwMapPack.cpp
C++
cpp
6,407
permissive
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ #include "blingfire-compile_src_pch.h" #include "FAConfig.h" #include "FAIwMapPack.h" #include "FAEncodeUtils.h" #include "FAUtils.h" FAIwMapPack::FAIwMapPack (FAAllocatorA * pAlloc) : m_pOldIws...
f77bce36f39de03298b533fb61cb4fd605e4b5e8
0dbb042a7b24b48b9046cf82da78f870a1a51bfe
2bite/ARK-SDK
/SDK/ARKSurvivalEvolved_Dino_Character_BP_Pack_classes.hpp
C++
hpp
8,693
permissive
#pragma once // ARKSurvivalEvolved (332.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_Dino_Character_BP_Pack_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------...
b1c9d995d247d4a9778280b1ee085b88d352c24d
ca5cb576e271b6831f95799a88f97aa057baf5ec
Kawser-nerd/CLCDSA
/Source Codes/AtCoder/agc012/B/1886810.cpp
C++
cpp
1,834
no_license
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <sstream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <cmath> #include <cctype> #include <cstring> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> #include <algorithm> #in...
233d3375d8e046f8692b8a8cb6a89bc1b027289c
cf4c6130400c969bf1a73cf8104467086af6c6dc
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-appflow/source/model/TrendmicroMetadata.cpp
C++
cpp
773
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/appflow/model/TrendmicroMetadata.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { na...
9f6aba8764586f65c7e3cfa9878d4c7ed3e773d2
be34b33119a4d0300ed9f040359823f4a2fc00e1
khmilevoi/khmilevoi.github.io
/c++/advanced/lesson_1/3/3.cpp
C++
cpp
715
no_license
#include <iostream> #include <vector> std::vector<int> prices = {1, 5, 8, 9, 10, 17, 17, 20, 24, 30}; std::vector<int> results(prices.size(), -1); int cut(size_t number_of_cuts) { results[0] = 0; size_t result = 0; auto max = [](size_t a, size_t b) -> int { return a > b ? a : b; }; for(size_t i = 1...
920091a4a6ee3567bbb3be8f41ccc649ee0efd01
cc2a2c2fea4eaf62a4fffa4c230c641034f20f12
MukhinAlexey/iroha
/irohad/torii/processor/impl/transaction_processor_impl.cpp
C++
cpp
4,399
permissive
/** * Copyright Soramitsu Co., Ltd. 2017 All Rights Reserved. * http://soramitsu.co.jp * * 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/LICENS...
a69506f7ca32e50de4b7c2635c984ffa6544805e
430bf498306017bcaea50b04f1d9aeda8c1239b6
ThickEmperor/Fundamentos-De-Programaci-n
/Zodiaco/Zodiaco.cpp
C++
cpp
3,476
no_license
// Zodiaco.cpp : Este archivo contiene la función "main". La ejecución del programa comienza y termina ahí. // #include <stdio.h> #include <stdlib.h> int main() { int dia, mes; char opc; scanf_s("%d %d", &dia, &mes); switch (mes) { case 1: if (dia >= 20) { pr...
0c3388eeb80e0dee6656593fba8b8e3654807127
f0e39d28bfb7ecf4367f8136e6634722e430d8fc
KernelPanic-OpenSource/Win2K3_NT_ds
/security/csps/wfsccsp/pintool/helpers.cpp
C++
cpp
1,193
no_license
#include <windows.h> #include <winscard.h> #include <string.h> #include <stdlib.h> #include "basecsp.h"// // Function: CspAllocH // LPVOID WINAPI CspAllocH( IN SIZE_T cBytes) { return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cBytes); } // // Function: CspFreeH // void WINAPI CspFreeH( IN LPVOID pMem) ...
cc0efb5b499a27f8e9d9dcfe5899d73ce438fb2e
3fa78a319667a211056230fc761aa3af32fac73f
fzzjj2008/leetcode
/0016.cpp
C++
cpp
1,437
no_license
class Solution { public: int threeSumClosest(vector<int>& nums, int target) { if (nums.size() < 3) { return target; } sort(nums.begin(), nums.end()); int min_ret = 0x7fffffff; for (int left = 0; left < nums.size() - 2; left++) { if (min_ret == 0) { ...
1361b34ffe97fad8f0bce3f20568a6f7ed5a409b
8b460638054d8d71c676150ba583c549e882781d
monteiroricardo/Documentos_FATEC
/Algoritmos/Lista 2 - Algoritmos/Exercício-1.cpp
C++
cpp
294
permissive
#include <stdio.h> #include <locale.h> main(){ int v1,v2; setlocale(LC_ALL,"Portuguese"); printf("1º valor: "); scanf("%i",&v1); printf("2º valor: "); scanf("%i",&v2); if(v1==v2){ printf("Soma: %i",v1+v2); } else if(v1!=v2){ printf("Multiplicação: %i",v1*v2); } }
3e4b28e2cff47afa4670c82e21895af6c3961b2b
7b8986e7cc854a3a5bc92dda2d06d51f59140c7f
glennlunder/HippoPlayer
/src/external/toolwindowmanager/src/ToolWindowManager.cpp
C++
cpp
42,995
permissive
/* * The MIT License (MIT) * * Copyright (c) 2014 Pavel Strakhov * * 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 us...
0c3fca7ced1bf1afc299efdab37b878a3f47641d
a17652260c2026049f7fb37324bce2b96211992a
ricfrr/laboratory_of_applied_robotics
/labor_18_1_19/exam_franceschini/exam/Source/Cell.cpp
C++
cpp
15,576
no_license
#include "../Headers/Cell.hpp" Cell::Cell() { setEmpty(); } Cell::~Cell() { // nada } std::vector<cv::Point> Cell::getCorners() { std::vector<cv::Point> corners; corners.push_back(Cell::getTopLeft()); corners.push_back(Cell::getTopRight()); corners.push_back(Cell::getBottomRigh...
cd147b992dbdc0f8306248c3f20bcea122aa3394
b4e5fc9be40ea1a8a65dc5161563ae1704d46fbe
proaholic/Win2K3
/NT/inetsrv/msmq/src/lib/mmt/test/group.cpp
C++
cpp
2,919
no_license
/*++ Copyright (c) 1995-97 Microsoft Corporation Module Name: group.cpp Abstract: group stub for Mmt test Author: Shai Kariv (shaik) 27-Aug-00 Environment: Platform-independent, --*/ #include <libpch.h> #include <mqwin64a.h> #include <qformat.h> #include "Ex.h" #include "MmtTestp.h" #inclu...
253b79c01844110853cae659fb0ddcbf4ed2f39d
dfdc475d2eab81964815b8eba5a88bff2851fd77
Mr-Second/The-sword-refers-to-offer
/67.cpp
C++
cpp
627
no_license
/* https://www.nowcoder.com/practice/12d959b108cb42b1ab72cef4d36af5ec?tpId=13&&tqId=11196&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking */ #include <iostream> #include <string> using namespace std; class Solution { public: string LeftRotateString(string str, int n) { if(str.s...
db2baa2414b7676d0f963290c469e0a3fb28d46a
f077d0651c5864ee69de86417924fc510a764157
mdoi/contrail-controller
/src/vnsw/agent/cfg/interface_cfg_listener.cc
C++
cc
4,117
permissive
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include <base/parse_object.h> #include <ifmap/ifmap_link.h> #include <ifmap/ifmap_table.h> #include <vnc_cfg_types.h> #include <cmn/agent_cmn.h> #include <cfg/interface_cfg_listener.h> #include <cfg/interface_cfg.h> #include <oper/agent_types.h...
ef5c713e9c926c2c953eae08cea4453c0b8f839c
e06789bfeb9940159cf252d3918fba57fda2a3a4
akhikolla/TestedPackages-NoIssues
/VeryLargeIntegers/inst/testfiles/zerosvC/AFL_zerosvC/zerosvC_DeepState_TestHarness.cpp
C++
cpp
975
no_license
// AUTOMATICALLY GENERATED BY RCPPDEEPSTATE PLEASE DO NOT EDIT BY HAND, INSTEAD EDIT // zerosvC_DeepState_TestHarness_generation.cpp and zerosvC_DeepState_TestHarness_checks.cpp #include <fstream> #include <ctime> #include <RInside.h> #include <iostream> #include <RcppDeepState.h> #include <qs.h> #include <DeepState.h...
560af2dbbfa1fcbdaf78e4451a50160ea2341ab7
5294d35a966bae27e25313245f0536bea3bae2f6
cp731/CSCI222-Group-Project-master
/Assignment 2/build-BugTrackingSystem-Desktop_Qt_5_7_0_clang_64bit-Debug/moc_profilepage.cpp
C++
cpp
2,663
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'profilepage.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0) ** ** WARNING! All changes made in this file will be lost! *********************************************************...
a6133279138782a3d85f2f744267eaa3fcda3faa
0b13ef910d3bbe636142128854857f1fcdf2495f
ahmedammar/platform_frameworks_base
/core/jni/android_view_ViewRoot.cpp
C++
cpp
2,927
permissive
/* * Copyright (C) 2008 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...
bae9dacd42fb1891b4f99dcc8bcdb54df8160cd9
93dc643bcc4de8d8f9b8774ecabfcfa532f51907
isabella232/intel-graphics-compiler
/IGC/Compiler/CISACodeGen/VariableReuseAnalysis.hpp
C++
hpp
19,424
permissive
/*===================== begin_copyright_notice ================================== Copyright (c) 2017 Intel Corporation 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, includi...
63a9e272ba3ca0b46c7de3c2752181275c8f7a75
34b544d4cd4db4409387d623797576d9d509d5b9
ifsmirnov/game-solver
/Solver/TriggerImpl/triggerinternalstate.cpp
C++
cpp
624
no_license
#include "triggerinternalstate.hpp" TriggerInternalState::TriggerInternalState(int height, int width) { field_.resize(height); for(int i = 0; i < height; i++) { field_[i].resize(width, 0); } height_ = height; width_ = width; } void TriggerInternalState::setField(int x, int y, int data...
7ce8dda23257959cee40efd405ff45d78fe52cb2
e4ec93eadfcc03336352dd73b7407c65d7e9c8d0
romeoyacobs/HackerRank
/DataStructures/Easy/insert-a-node-into-a-sorted-doubly-linked-list.cpp
C++
cpp
3,454
no_license
#include <bits/stdc++.h> using namespace std; class DoublyLinkedListNode { public: int data; DoublyLinkedListNode *next; DoublyLinkedListNode *prev; DoublyLinkedListNode(int node_data) { this->data = node_data; this->next = nullptr; this->prev =...
e303df3fe6cd11ae4c7c9bcbb66d0cc610c1a04c
a32f97e3e8dbecfefb7b23890b406be4afab95e0
jiaaaaaaaqi/ACM_Code
/HDU/3342/13844360_WA_0ms_0kB.cpp
C++
cpp
1,061
no_license
#include<map> #include<queue> #include<string> #include<vector> #include<math.h> #include<ctype.h> #include<stdio.h> #include<string.h> #include<iostream> #include<algorithm> #define inf 0x3f3f3f3f typedef long long int ll; using namespace std; const int maxn = 105; int n, m; int ind[maxn]; vector<int> maps[maxn]; ...
51545379dec38a26599ffae4ad26e21e4c450673
ab363c4571e309a344b4938f2c83312c3df12e44
YuhanSun/MinHop
/Universe.cpp
C++
cpp
4,653
no_license
#include "Universe.h" bool Location_In_Rect(Location m_location, MyRect m_rect) { if (m_location.x<m_rect.left_bottom.x || m_location.x>m_rect.right_top.x || m_location.y<m_rect.left_bottom.y || m_location.y>m_rect.right_top.y) return false; else return true; } void ReadEntity(int &node_count, vector<Entity> &e...
4b47a3fb649a294a43fd04d91e80492c9b594d7a
cd311e9d5deed7afba5ec77775215381bcbb1358
yakimov464/cpp
/cpp1.4/square_equation.cpp
C++
cpp
382
no_license
#include <cstdio> #include <cmath> int main() { std::puts("please enter a,b,c for 'ax^2+bx+c=0' "); float a = 0; float b = 0; float c = 0; std::scanf("%f %f %f", &a, &b, &c); float d = b * b - 4 * a * c; float x1 = (-b + std::sqrt(d)) / (2 * a); float x2 = (-b - std::sqrt(d)...
e30446907f930fd5dbecaf44f9c336f1ad27ab91
f081799f7146976cb019d2ee7d5357776acedd6b
applelooking/leetcode
/325.cpp
C++
cpp
572
no_license
class Solution { public: int maxSubArrayLen(vector<int>& nums, int k) { unordered_map<int, int> mapping; mapping[0] = -1; if (nums.empty()) return 0; int sum = 0; int result = 0; for (int i = 0;i < nums.size();++i) { sum += nums[i]; if (mapping...
b5d6885e0eceeb6ac7df416f6e1d60da6b03512b
a5d984ae31275efec0e747b91f6368507f03a504
chisom360/C
/code_examples/ch22/Fig22_25/Fig22_25.cpp
C++
cpp
1,764
no_license
// Fig. 22.25: Fig22_25.cpp // Standard Library adapter priority_queue test program. #include <iostream> #include <queue> // priority_queue adapter definition using namespace std; int main() { priority_queue< double > priorities; // create priority_queue // push elements onto priorities priorit...
b55ccb526e90b5c34ec0768c2f12662d38d68ba4
e8d31e95d6df3ae5850192851d86cbc8acf10678
SimJung/Baekjoon_20190704
/p9020.cpp
C++
cpp
489
no_license
#include <iostream> using namespace std; bool arr[10001]; int main(void) { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin >> t; arr[1] = 1; for (int i = 2; i <= 10000; i++) { if (!arr[i]) { for (int j = 2; j <= 10000 / i; j++) { arr[i*j] = 1; } } } while (t--) ...
763f74702a229653ccd74cf299659279635800b8
056190363dd190b46b09686a4332122abbc847e1
subhash1-0/thirstyCrow
/src/org/mpisws/p2p/transport/table/TableTransprotLayerImpl_requestValue_1.cpp
C++
cpp
2,862
no_license
// Generated from /pastry-2.1/src/org/mpisws/p2p/transport/table/TableTransprotLayerImpl.java #include <org/mpisws/p2p/transport/table/TableTransprotLayerImpl_requestValue_1.hpp> #include <java/io/IOException.hpp> #include <java/lang/Exception.hpp> #include <java/lang/NullPointerException.hpp> #include <java/lang/Obje...
03bb3cc445873f27496098f51cbee686c3c3999a
4593f477aa7184040692bbb84cfe1d744166d16f
skinnari/cmssw
/SimTracker/SiPhase2Digitizer/plugins/PSSDigitizerAlgorithm.cc
C++
cc
3,831
permissive
#include <iostream> #include <cmath> #include "SimTracker/SiPhase2Digitizer/plugins/PSSDigitizerAlgorithm.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ServiceRegistry/interface/Service.h" // Geometry #include "Geometry/Records/i...
865968ad905aff522caab6a11d5b3ec2e00f0773
76df127c7f4e3497682ab9b6f1febcf07d23a4f5
rafaelcanoguitton/CCOMP2
/Calendario xd/main.cpp
C++
cpp
4,644
no_license
#include <iostream> #include <cstdlib> #include <iomanip> using namespace std; int firstDayofNewYearAndMonth (int ); int numOfDaysInAMonth (int); void printHeader (int); void printMonth (int, int&); void skipToDay (int); int main () { int year, firstDayInCurrentMonth; int currentMonth = 1; int numDays...
cc35b242c594a6e356eb57ea800224f1702d02c8
1893fcc85adee056d3c0576ef0ae2e3eca1826d8
arichardson/juliet-test-suite-c
/testcases/CWE789_Uncontrolled_Mem_Alloc/s01/CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_72b.cpp
C++
cpp
3,844
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE789_Uncontrolled_Mem_Alloc__malloc_wchar_t_rand_72b.cpp Label Definition File: CWE789_Uncontrolled_Mem_Alloc__malloc.label.xml Template File: sources-sinks-72b.tmpl.cpp */ /* * @description * CWE: 789 Uncontrolled Memory Allocation * BadSource: rand Set data t...
ea01e91871137e4c0b2527be166b3efcf119dfd6
3d4217e53eed83a56c9fe5bbcc7066faaea6835d
k8w/pixi-animate-extension
/src/ThirdParty/xerces/win/xerces-c-3.1.1/tests/src/UtilTests/CoreTests_CountedPointer.cpp
C++
cpp
2,796
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
adf22c1693fc81808234a2c5891f9dfd3dee9420
f8889f5db63cc14a2ca4a5ec2de97b38b3153c50
ChristopherRabotin/GMAT
/src/gmatutil/util/interpolator/CubicSplineInterpolator.hpp
C++
hpp
2,939
permissive
//$Id$ //------------------------------------------------------------------------------ // CubicSplineInterpolator //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool // // Copyright (c) 2002 - 2020 United States Government a...
854db4b04b6b66789d89731514fc3ad6b432be9c
21ccedc61bb59e31d303f3e9139abd1d90d26f6e
mbed-Infineon-XMC/mbed-os
/features/cellular/UNITTESTS/at/at_cellulardevice/test_at_cellulardevice.cpp
C++
cpp
3,707
permissive
/* * Copyright (c) 2018, Arm Limited and affiliates. * SPDX-License-Identifier: Apache-2.0 * * 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/LICEN...
56c212288d77a7d7c78d3194c6b7b3e70aa11d59
18cf9ae61419fd8b6b45524851e4ad2e12b327f7
ngzHappy/OpenGLSuperBible
/BaseTest/main.cpp
C++
cpp
1,705
no_license
#include <memory> #include <QApplication> #include <QImage> #include <QDir> #include <QDebug> #include <QTextCodec> #include <QFile> #include <QTextStream> #include <QFileInfo> #include "MainWindow.hpp" namespace { inline QStringList addSearchPath(QStringList base,QString path) { base.detach(); for (auto & i:...
81c28caa36b22888c7076abad8c60ed777f3f1c5
245bb24bcdf1ea3edd0307ec546a0ef6e78c97d4
paroj/ogre
/RenderSystems/GLSupport/src/EGL/X11/OgreX11EGLWindow.cpp
C++
cpp
12,264
permissive
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2008 Renato Araujo Oliveira Filho <renatox@gmail.com> Copyright (c) 2000-2014 Torus Knot Softwa...
906a3351e7c1e452fbd259a18457870c624f4057
e08db2a5a66df1fc8316dab88d1bf73e0880f229
jufusong/BoringLife
/2017-11/2017-11-17 - Codeforces Round 446 (Div. 1)/B-Gluttony.cc
C++
cc
433
no_license
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { int n; cin >> n; vector<int> a(n), vec; for (int i = 0; i < n; i++) { cin >> a[i]; vec.push_back(a[i]); } sort(vec.begin(), vec.end()); for (auto x : a) { auto it = upper_bound(vec.begin(), vec.end(), x); if...
b73b3b3c406f2b9aecb983782a8d5c24e68f3761
dadb7bdb9b9aafba87bbe534454ee65897503cf3
newts7/Online_Judge_Solutions
/codeforces/415/C[ Mashmokh and Numbers ].cpp
C++
cpp
26,202
no_license
head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="X-Csrf-Token" content="e88ee89342bd0fc4792bed6323d388e8"/> <meta id="viewport" name="viewport" content="width=device-width, initial-scale=0.01"/> <script type="text/javascript" src="http://st.codeforces.com/s/37239/js/...
0308bfe2fa1df63fd23300792149537841cfcae5
81c895e8a0b4d909d4c97991753ffdf94f14fe25
lordgunshaw/kreditcoin
/src/net.cpp
C++
cpp
57,396
permissive
// Copyright (c) 2009-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 "irc.h" #include "db.h" #include "net.h" #include "init.h" #include "addr...