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
8a673d5474f4a033075ae93e0bf68f5c26f9cba6
1d6afefdf0a86647f874d0363b2119e2bceee050
UASLab/RAPTRS
/software/src/node/configuration.cpp
C++
cpp
974
permissive
/* Copyright (c) 2016 - 2019 Regents of the University of Minnesota and Bolder Flight Systems Inc. MIT License; See LICENSE.md for complete details Author: Brian Taylor */ #include "configuration.h" /* Load configuration from EEPROM */ void AircraftConfiguration::Load() { uint16_t EepromLocation = 0; Serial.prin...
dfb08881b5c875c16336108efeae2e55fc5f9a17
2134c78a6d0250d893698e5b09642f516c553640
jtlap/nt2
/modules/core/base/exhaustive/simd/hypot.cpp
C++
cpp
1,573
permissive
//============================================================================== // Copyright 2009 - 2013 LRI UMR 8623 CNRS/Univ Paris Sud XI // Copyright 2013 MetaScale SAS // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICEN...
eee85a230ed2e271eacfef0847f7addadb8714b0
d0a2e9c41771618d6731e0d547a2ec5eb0e70995
imhdx/My-all-code-of-Vjudge-Judge
/CodeForces/349C/19563245_WA_92ms_788kB.cpp
C++
cpp
543
no_license
#include<bits/stdc++.h> using namespace std; #define int long long int a[100005]; int n; bool check(int x) { int sum=0; for (int i=1;i<=n;i++) sum+=x-a[i]; return sum>=x; } signed main() { scanf("%I64d",&n); for (int i=1;i<=n;i++) scanf("%I64d",&a[i]); int l=*max_element(a+1,a+1+n); int r=1...
f9075250e7e10a5e33a82d353f82fa1fcfee267c
5eaf83986c2391ce6a1d6e7c0fc1b15929bb40d3
nikkolaii/ros_detection
/src/ros_detection/src/get_tf.cpp
C++
cpp
3,070
no_license
#include "ros/ros.h" #include "nav_msgs/Path.h" #include "geometry_msgs/PoseStamped.h" #include "geometry_msgs/PointStamped.h" #include "std_msgs/Header.h" #include "tf/transform_broadcaster.h" #include <tf/transform_listener.h> class getTF { public: getTF(){ dist_sub = nh.subscribe("/Optimized_person_distance",1, &g...
fc261309f58bf0bd3abad6a3db0793c4da62d593
4c36703012d2a2969472c5d1af4eeca878f6fc30
nikolapesic2802/Programming-Practice
/Vudu/main.cpp
C++
cpp
1,081
no_license
/* - Subtract p from every element, and calculate prefix sums. - We need to map every prefix sum value to a new value in range [1,n] and use fenwick tree to calculate the number of left borders that are good for every right border */ #include <bits/stdc++.h> #define ll long long #define pb push_back using nam...
39398d91e5e2b9b0099ca47681709d0837e49d8c
82ba4a0a173a301ce5abfc2d20f57c0e7528bc25
kinson/DSSearchEngineProject
/code/Query.cpp
C++
cpp
1,516
no_license
#include "Query.h" using namespace std; Query::Query() { } //returns requested vector std::vector<std::string> Query::getandArgs() { return andArgs; } std::vector<std::string> Query::getorArgs() { return orArgs; } std::vector<std::string> Query::getnotArgs() { return notArgs; } std::vector<std::string> Query:...
a6031b58e4feadc65978070c93a143e5036b27ea
d248b7e63ada5931370bf18f5b2f5c5e5ddfc94d
NChipanaUTEC/Bicas-En-La-UTEC
/Scenes/BossScreen/Include/BossScreen.cpp
C++
cpp
9,892
no_license
// // Created by chip on 23/06/18. // #include "BossScreen.h" int BossScreen::Draw(RenderWindow &window, Event &evento, GenerarPersonaje& gp) { srand(time(nullptr)); SetPena(); gp.GetDataProta(ProtaData); Texture BGTexture; BGTexture.loadFromFile("../Scenes/BossScreen/Graphics/auditorio...
b0a01a327ea37203c8ff3214ded4b299152f998c
8a673621b3751844353480820cf4178cb536cd1a
MohamedElfeky/mscsim
/src/gui/WidgetGDU.cpp
C++
cpp
7,339
permissive
/****************************************************************************//* * Copyright (C) 2020 Marek M. Cel * * 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, ...
cef668dffa4bc1ee0d2d42bcb857f6c8b2ea7931
69e653b8e683cb8d89f68183fc3fd7c441ce1331
Chillee/pytorch
/aten/src/ATen/native/LinearAlgebra.cpp
C++
cpp
116,395
permissive
#include <ATen/ATen.h> #include <ATen/core/grad_mode.h> #include <ATen/Dispatch.h> #include <ATen/ExpandUtils.h> #include <ATen/NamedTensorUtils.h> #include <ATen/OpMathType.h> #include <ATen/native/mkldnn/Matmul.h> #include <ATen/native/CPUBlas.h> #include <ATen/native/IndexingUtils.h> #include <ATen/native/LinearAlge...
c4dc3572a48256b34f941a7c099917f531d347fa
7fca097a92bd08c022c2249f1880a3f58de36769
iridium-browser/iridium-browser
/third_party/blink/renderer/modules/screen_orientation/screen_screen_orientation.cc
C++
cc
1,579
permissive
// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/modules/screen_orientation/screen_screen_orientation.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "thir...
9e47dca85600537563a16ecd7a59bd161aab41f9
ed32766069c8b5a3a4e1251eb3cf59ceadd1867b
asomeJay/algorithm
/Acm_icpc/C,C++/bj2579.cpp
C++
cpp
408
no_license
#include <iostream> #include <algorithm> #define TABLE 310 using namespace std; int dp[TABLE]; int arr[TABLE]; int main(void) { int n, i, j, maxi = 0; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &dp[i]); } arr[0] = dp[0]; arr[1] = dp[0] + dp[1]; for (i = 2; i < n; i++) { arr[i] = max(dp[i] + ...
ae024e7a57335f24c78641a217e6ea6925a53955
14279f8976de8357b06253dcc0be9cca02833ad3
Lamoreauxaj/competitive-programming
/CSES/Building II/main.cpp
C++
cpp
3,697
no_license
#include <bits/stdc++.h> using namespace std; const int INF = 1000000000; struct SegmentTree { struct Node { int v; Node() { v = INF; } Node(int vv) { v = vv; } Node(Node l, Node r) { v = min(l.v, r.v); } }; vector...
e2fdd12fbbf1d980c8ace96d43f69eb0e9cfb8c1
6adc2acdebd93e703af3c982b59f40e861342b50
cyverse/irods_client_rest_cpp
/StreamGetApiMainServer.cpp
C++
cpp
627
permissive
/** * iRODS REST API * This is the iRODS REST API * * OpenAPI spec version: 1.0.0 * Contact: info@irods.org * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ #include "pistache/endpoint.h" #include "pi...
76801bf46d30a36e4bf5b6e70ba89d1c62219928
5656789c5e264d2c02a5a96e87237787b2af307d
GRIDAPPSD/gridappsd-state-estimator
/state-estimator/include/SharedQueue.hpp
C++
hpp
1,445
permissive
// // Copyright (c) 2013 Juan Palacios juan.palacios.puyana@gmail.com // Subject to the BSD 2-Clause License // - see < http://opensource.org/licenses/BSD-2-Clause> // #ifndef SHAREDQUEUE_HPP #define SHAREDQUEUE_HPP #include <queue> #include <thread> #include <mutex> #include <condition_variable> template <typename ...
4f2e2511097fe6315b827de6ca4e9bd38b7be07e
4461e85da933060ee01d2d8c534901a28ecfffea
DLR-TS/SUMOLibraries
/gdal-3.4.0/ogr/ogrsf_frmts/wasp/ogrwaspdriver.cpp
C++
cpp
4,461
permissive
/****************************************************************************** * * Project: WAsP Translator * Purpose: Implements OGRWAsPDriver. * Author: Vincent Mora, vincent dot mora at oslandia dot com * ****************************************************************************** * Copyright (c) 2014,...
c2a1a8a272876df1e7d2c31d2d2ee4674a809b19
d90938cfeb9cec9bf652030f85f93df213a1e266
yuri410/rpg
/external/DirectXShaderCompiler/lib/DXIL/DxilTypeSystem.cpp
C++
cpp
20,951
permissive
/////////////////////////////////////////////////////////////////////////////// // // // DxilTypeSystem.cpp // // Copyright (C) Microsoft Corporation. All rights reserved. ...
26c89039c9f580b044ff270ca24f13bb08fa94b3
b73de6b334cd7491baa68a9c2048dd77e1ea5e6e
yevhenii-sir/C_Cpp
/Study/C/8_Array/Part_1/Maximum.cpp
C++
cpp
449
no_license
//#include <iostream> #include <stdio.h> #include "../Array_Func.cpp" using namespace std; int main() { int array[20], size_array = 20, max, min; ZapRand(array, &size_array); Vivod(array, size_array); max, min = array[0]; for (int i = 0; i < size_array; i++) { max = ((max < array[i]) ? arra...
abf75ff023bec82f58657913051f7929c9e29b40
773dbcc181a1bd169edd6cc26d9b8a697a3e6555
meniossin/src
/content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
C++
cc
17,413
permissive
// Copyright (c) 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. // Unit test for VideoCaptureBufferPool. #include "media/capture/video/video_capture_buffer_pool.h" #include <stddef.h> #include <stdint.h> #include...
74283b06de697db4356d5880973582ec5292f729
d0fff3cc15be5b11086ff10bdcabadba74b75bb6
aditya81070/Data-Structures-and-Algoritham
/Codechef-solutions/MARCHA1.cpp
C++
cpp
678
no_license
#include<bits/stdc++.h> using namespace std; // TODO - this problem will be solved by dynamic programming // Tags: dynamic programming bool isSubset(int *arr, int n, int sum) { if (sum == 0) { return true; } if (n == 0 && sum !=0) { return false; } if(arr[n-1] > sum) { isSubset(arr, n-1, sum); }...
2b81a3eb125764b2c0b9f156dc832442ed65648d
ed1410aa1bc404d0c6de9b3d69ed4afe4072ce19
Ash-ik/Programming-Problems-Solutions
/UVA-Online-Judge-Solved-problems/Volume 102 (10200-10299)/UVA 10226.cpp
C++
cpp
784
no_license
#include<stdio.h> #include<map> #include<vector> #include<algorithm> #include<string> #include<string.h> #include<iostream> using namespace std; int main() { int t; scanf("%d",&t); getchar(); getchar(); while(t--) { map<string,int>data; vector<string>save; string str; ...
1ce752e307fe647017a3c55ff9e52e91a1da910d
eceeccc4fcc34949d7fdd824daf900b8c4db9136
CHROMIETeledaq/cmssw
/L1Trigger/L1THGCal/src/fe_codecs/HGCalBestChoiceCodecImpl.cc
C++
cc
8,317
permissive
#include "L1Trigger/L1THGCal/interface/fe_codecs/HGCalBestChoiceCodecImpl.h" /*****************************************************************/ HGCalBestChoiceCodecImpl::HGCalBestChoiceCodecImpl(const edm::ParameterSet& conf) : nData_(conf.getParameter<uint32_t>("NData")), dataLength_(conf.getParameter<uint...
8747f04ab4d5f08b7e20010112df2ff8fd04b040
6ea18446ea3f3714cd7435410ac3013fb3ff9c99
kufan/muduo
/contrib/hiredis/Hiredis.cc
C++
cc
5,114
permissive
#include "Hiredis.h" #include <muduo/base/Logging.h> #include <muduo/net/Channel.h> #include <muduo/net/EventLoop.h> #include <muduo/net/SocketsOps.h> #include <hiredis/async.h> using namespace muduo; using namespace muduo::net; using namespace hiredis; static void dummy(const boost::shared_ptr<Channel>&) { } Hire...
291922cfc2c8b2ca65960dddacf8aa8963df6007
2d607bfaa335429712fcdc08b33c917f283d2669
samuelharroch/Pandemic-CPP
/sources/Researcher.cpp
C++
cpp
1,137
no_license
#include "Player.hpp" #include "Researcher.hpp" #include "City.hpp" #include "Color.hpp" #include <iostream> #include <string.h> using namespace std; using namespace pandemic; const unsigned int cards_to_cure_r = 5; Researcher::Researcher(Board& board, City city):Player(board, city){ } Researcher& R...
ce614cd5fa2d3cce552e664d3cc2a42c9030175b
2a3cfb05ba67f2bd3ba268db013563bcd5d8843b
nemo-park/SW-Pro
/SW-Pro/(중)[연습A-0026] 지은이가 지은 집.cpp
C++
cpp
907
no_license
#include <iostream> #include <string> #include <cstring> #include <algorithm> using namespace std; int arr[1000001]; int holeSize, cnt; string ans; void twoPointer() { int start = 0; int end = cnt - 1; while (start < end) { if (arr[start] + arr[end] == holeSize) { ans = "yes " + to_string(arr[start]) + " "...
a2309a5ce613317fbc175511033dd3a8d3e285a5
9d339245c378b34e7729504be8a137d77b6f9e45
HoldenCaulfieldRye/scratch_cpp
/nullint.cpp
C++
cpp
395
no_license
#include<iostream> using namespace std; int main() { int *a = new int; a[0] = 1; a[1] = 2; a[2] = '\0'; char *b = new char; b[0] = 'a'; b[1] = 'b'; b[2] = '\0'; cout << b << endl; cout << a << " " << &a[0] << endl; //both are same! for(int i=0; a[i]!='\0'; i++) cout << a[i]; cout << en...
dcc324e97c624493c5b1ee7900e8be4d997149a5
3fc5edccfae901d3dca850ab2c5a17da2a975bde
SurrealSky/PcapAnalyzer
/PcapWindow/AnalysisView.cpp
C++
cpp
4,235
no_license
// AnalysisView.cpp : 实现文件 // #include "stdafx.h" #include "PcapWindow.h" #include "AnalysisView.h" #include"include.h" #include"PcapWindowDoc.h" // CAnalysisView IMPLEMENT_DYNCREATE(CAnalysisView, CListView) CAnalysisView::CAnalysisView() { } CAnalysisView::~CAnalysisView() { } BEGIN_MESSAGE_MAP(CAnalysisView,...
a7810b2183d38490b053cd468e2ae34cfb1ad52f
fc40a4e47a1ffaee3ad6ae405e67f2266d2e2602
nimee/c-_study
/c++_code_myself/cheapter3/course.cpp
C++
cpp
1,745
no_license
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<ios> #include<iomanip> using namespace std; using std::cin; using std::cout; using std::endl; using std::sort; using std::streamsize; using std::vector; //using std::precision; using std::setprecision; using std::string; int main() { ...
277e300ca667740aaf68d4e4fe893da1dcdd3cfa
94bc2fb0a1027f702cd6506b29865b35248431aa
joelnl74/INFOMOV3_GOOD
/INFOMOV-3/Mesh.cpp
C++
cpp
1,919
no_license
#include "Mesh.h" #include <algorithm> Mesh::Mesh(EruptionMath::vec3 vposition, std::string filename) { position = vposition; shader = new BasicShader(); ObjParser parser; verticies = parser.LoadObj(filename); toDraw.reserve(verticies.size()); // CHANGED PRE ALLOCATE for (int i = 0; i < verticies.size(); i++)...
5d94661a7c9208f7bd6db7a5f4f8c0f7b013c703
2d70d548e0b24587bb7446e9709dc01816ff0fed
nicobou/neopixels-ring-clock
/DemoPattern.cpp
C++
cpp
3,004
permissive
#include "DemoPattern.h" #include "Arduino.h" void DemoPattern::init() { ClockPattern::init(); } void DemoPattern::tick() { ClockPattern::tick(); // Detect the changes we are interested in reacting to if ( clock->now.hours12 != clock->last.hours12 ) { patternState = DemoPattern::HOUR_CHANGE; } else if ...
7e60bc8c441fbf20fd20ec864da7b5abfd11cc7c
f658d826cdd7d7b3f07402d1b73b1c74fe0b18eb
wbsantos/historical
/C++/Execícios Faculdade/Aulas/Aulas 01-05/gameover/main.cpp
C++
cpp
295
no_license
#include<iostream> using namespace std; int main() { int min=0, max=100, valor; cout << "Game Over 1.0" << endl; cout << "\nDigite o valor de HP: "; cin >> valor; if (valor<min) cout << "Game Over"; else cout << "Voce sobreviveu"; cin.get(); cin.get(); return 0; }
27495b39d019bf02100e546591ecfd7cd9d55ca2
2bec4dfcecca79037402af007ff0c8ee883d2672
gowinder/chromium
/components/offline_pages/background/remove_requests_task_unittest.cc
C++
cc
6,950
permissive
// Copyright 2016 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 "components/offline_pages/background/remove_requests_task.h" #include <memory> #include "base/bind.h" #include "base/test/test_simple_task_runn...
8e8dc83fd88b38844df6fa79828839c10f244f54
627d4ac01f52a6e55907565203acb950e12f7bb5
Matt-HJ-Bailey/TinyRenderer
/src/tgaimage.cpp
C++
cpp
12,617
permissive
#include <iostream> #include <fstream> #include <cstring> #include <ctime> #include <cmath> #include "tgaimage.h" TGAImage::TGAImage() = default; TGAImage::TGAImage(int w, int h, int bpp) : data(nullptr), width(w), height(h), bytespp(bpp) { unsigned long nbytes = width*height*bytespp; data = new unsigned char...
7cec00c98209114e6ffc0cf850af9335a6fc65da
1b616e0ee7b35ac6f18cf97a7ac925ec69a576cf
YerkinBS/PP1_2020
/lab11/sanzh.cpp
C++
cpp
979
no_license
#include <bits/stdc++.h> using namespace std; typedef string str; typedef vector<int> vi; typedef vector<bool> vb; #define pb push_back #define all(x) (x).begin(), (x).end() #define fr(i, n) for(int i = 0; i < n; i++) #define rall(x) (x).rbegin(), (x).rend() void solve(){ int n; cin >> n; vector<int> v; for(int i = 0...
b43573caf62e740d0b75d0ae98ba105e2b09a1fd
6fcca2c5d32cfad5148787a8715ea3b425cec7a6
junes7/CPPalgorithm
/KOISTUDY/1717.cpp
C++
cpp
512
no_license
// 2차원 배열 지그재그 채우기 1 // fill 2D array with zigzag pattern # include <iostream> int main(){ int n,i,j,t=1,d[110][110]={}; scanf("%d",&n); for(i=1;i<=n;i++){ if(i%2==1){ for(j=1;j<=n;j++){ d[i][j]=t++; } }else{ for(j=n;j>0;j--){ ...
5ba0ca0bf01fc15e0be9e6f0aebd1f8ac108444e
cb6edeac490b35bed2e8bb9d956977e9b9302032
Mohammad-Yasser/harwest
/codeforces/976/D.cpp
C++
cpp
1,241
no_license
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define popCnt(x) (__builtin_popcountll(x)) typedef long long Long; const int N = 303; struct Edge { int u, v; Edge(int u, int v) : u(u), v(v) { } }; vector<Edge> edges; v...
35f008767cde2d5fe05ecb822fa7f12b395b29aa
3f1cfca404f122a77a8347c3e14cd7e231eb4166
rochaporto/jupyter-tensorflow
/tensorflow_serving/core/manager_test.cc
C++
cc
6,488
no_license
/* Copyright 2016 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
eeea8182577de9314df68bc4272e6631d821017c
6151d6cd093f331a2f601b9082154be4679dd26f
pratikmankawde/Graphics
/Fabrik IK/OperationData/OperationDataFactory.cpp
C++
cpp
775
no_license
/* * OperationFactory.cpp * * Created on: 15-Feb-2017 * Author: Pratik Mankawde */ #include "OperationDataFactory.h" namespace operations_data { OperationDataFactory::OperationDataFactory() { mCameraOperationData = new CameraOperationData(); mRigOperationData = new RigMotionOperationData(); }; Operati...
cd83b5dbd32fb7882872fb343579903f87ca7b0f
3e6da6dcbf6f9a60d59112305d7f4f622202cdd4
PointCloudLibrary/pcl
/tools/ply2vtk.cpp
C++
cpp
3,436
permissive
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2012-, Open Perception, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condition...
0cc478cb8e60e73f586e326d9bcd532c0d366ac3
ef50539eaaaa1f62cf13970a26f0577af7661319
Fissuras/mugenformation
/Color.cpp
C++
cpp
1,330
no_license
/** * Implementation of the Color class. * * @author Francis BISSON */ // INCLUDES //////////////////////////////////////////////////////////////////// #include "Color.h" #include "Debug.h" #include "Types.h" // STATIC MEMBERS INITIALIZATION /////////////////////////////////////////////// const Color...
60cd954b0bf06119551ae5d17d4d904f1295e438
6f38c7f06d1d84df804cd5dfa9cb64e93a2dee4b
jomei/data_structures
/03/build_heap.cpp
C++
cpp
1,320
no_license
#include <iostream> #include <vector> #include <algorithm> using std::vector; using std::cin; using std::cout; using std::swap; using std::pair; using std::make_pair; class HeapBuilder { private: vector<int> data_; vector<int> tmp; vector< pair<int, int> > swaps_; void WriteResponse() const { cout << sw...
ee3bcc3d62172ad551b541a8142305b1d3538cb4
74afc42cc3515099d364dced86ca3212af86ab99
yuedaregone/wogui
/wogui/3rd/imgui/src/imgui_impl_win32.cpp
C++
cpp
11,614
permissive
// dear imgui: Platform Binding for Windows (standard windows API for 32 and 64 bits applications) // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) // Implemented features: // [X] Platform: Clipboard support (for Win32 this is actually part of core imgui) // [X] Platform: Mouse curs...
6f5323410af3c71ac678a8c88b9043dd4f8e5e24
33cb60ff22f536f28158d125f1147848160b9244
quanxinglong/chromium
/base/trace_event/trace_buffer.cc
C++
cc
12,777
permissive
// Copyright 2015 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 "base/trace_event/trace_buffer.h" #include "base/trace_event/trace_event_impl.h" namespace base { namespace trace_event { namespace { class T...
90b32d55c06200816aef5f52a8613bfb9c6f1817
be7b069ccc5fed018f5cd324f13b0ef199a48e77
dementrock/acm
/poj/Archives/3308/7254426_WA.cc
C++
cc
1,963
no_license
#include<stdio.h> #include<string.h> #include<math.h> #define MAXN 301 #define MAXE 3001 #define oo 1e8 #define EPS 1e-8 struct Edge{ int v; double w; Edge *next,*pair; } *edge[MAXN],mempool[MAXE]; int M,N,L,S,T,found,layer[MAXN],counter[MAXN],memnum; double ans,minf; inline double min(double a, double...
60cecd17f38e9ff914a5668ce9cd0b6a449fbf1a
4e2f9921ca699fc4a98da315029155878ee65e14
ricardperez/MelonGames
/libs/jsoncpp/src/lib_json/json_writer.cpp
C++
cpp
19,497
no_license
// Copyright 2011 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(JSON_IS_AMALGAMATION) #include <jsoncpp/writer.h> #include "json_tool.h" #endif // if ...
a3b619edade2f06bc9ed068e422a60a4f092767e
5c3e759afe179202e437d6d4e8c6ebf430323711
bino7/chromium
/third_party/WebKit/Source/core/dom/DOMURLUtils.cpp
C++
cpp
4,144
permissive
/* * Copyright (C) 2011 Google Inc. All rights reserved. * Copyright (C) 2012 Motorola Mobility Inc. * * 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...
cb1b9efceb9e9594b9e21719c14481543bdc1b52
5172d5bb1887952e3e530ea5f6db3034670a9c15
kirayamato4/Wolf
/Engine/include/wind/dll.hpp
C++
hpp
321
permissive
#pragma once #ifndef __WIND_DLL_H__ #define __WIND_DLL_H__ #ifdef WIND_PLATFORM_WINDOWS #ifdef WIND_DLL_BUILD #define WIND_API __declspec( dllexport ) #define DLLEXPORT_TEMPLATE #else #define WIND_API __declspec( dllimport ) #define DLLEXPORT_TEMPLATE extern #endif #else #error Wind only support windows #endif #endi...
b6840da70ee36db2f28571211ffc6292d500f5bb
40680f378ee3ecba1465cc2f6998283fee6cb9ba
sibermaxim/OpenGlTriangle
/MFCApplication2/MFCApplication2.cpp
C++
cpp
6,132
no_license
// This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface // (the "Fluent UI") and is provided only as referential material to supplement the // Microsoft Foundation Classes Reference and related electronic documentation // included with the MFC C++ library software. // License ...
ea517c4650ef172093a647e4c401cf723206fc66
e211e3308ff773661259f5ad17b4401bf50a2211
daviddw/oss-public
/Upnp/ControlPoint/Services/Cpp/Std/CpLinnCoUkMediaTime1Std.cpp
C++
cpp
3,031
no_license
#include <Std/CpLinnCoUkMediaTime1.h> #include <CpProxy.h> #include <CpiService.h> #include <Thread.h> #include <AsyncPrivate.h> #include <Buffer.h> #include <Std/CpDevice.h> #include <string> using namespace Zapp; class SyncSecondsLinnCoUkMediaTime1Cpp : public SyncProxyAction { public: SyncSecondsLinnCoUkMedi...
ea0d887eb32fb57686bbafe86f5d9e10977a014b
9ff6b51ebb7e9ef59e0b3e579ff3628f186d9290
SeboCode/ETHZ-AlgoLab-2020
/exercise_2/search_snippets/main_improved.cpp
C++
cpp
1,733
no_license
#include <iostream> #include <vector> #include <algorithm> void testcase() { int n; std::cin >> n; std::vector<int> wordCount(n); for (int i = 0; i < n; i++) { int m; std::cin >> m; wordCount[i] = m; } std::vector<std::pair<int, int>> wordPositions{}; for (int i =...
b6296ea8ac11621d66438b15edfaae24d9ab43f9
1ac57244b57a15880d1b9f152f41861c606e3868
SmartNetAR/microwave
/clrTest/Microwave.cpp
C++
cpp
385
no_license
#include "Microwave.h" Microwave::Microwave() { } Microwave::~Microwave() { } char* Microwave::GetStateName() { return stMachine.State()->GetName(); } void Microwave::OpenDoor() { stMachine.OpenDoor(); } void Microwave::CloseDoor() { stMachine.CloseDoor(); } void Microwave::PressButton() { stMachine.PressBu...
031dc1fa47f2697f2cbc53b81616e9b29c769fe8
d5b81d87828311e832a1ac381e8bae47523bce02
bobpiece/intelRSD
/PSME/common/agent-framework/src/action/task_creator.cpp
C++
cpp
5,460
no_license
/*! * @brief * * @copyright * Copyright (c) 2016-2017 Intel Corporation * * @copyright * 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 * * @copyright * http://www.apache.org/lice...
de6c43316a5ac4ced617ae7791fa364770f849e7
2b5389a388e80eb060eba46ff3aa88847d13ab80
Vovamzur/OOP
/AdventuresOfLolo/bullet.cpp
C++
cpp
1,069
no_license
#include "bullet.h" Bullet::Bullet(int x, int y, int trajectoryX, int trajectoryY, BulletAnimation *an) : StaticGameObject(x,y) { this->m_x = x; this->m_y = y; this->m_trajectoryX = trajectoryX; this->m_trajectoryY = trajectoryY; this->animation = an; } Bullet::~Bullet() { delete this->animati...
149c45c76667df8819df4480740e1468b44ddfa3
6a823e040feb9b2cff5a694ed76c39390c5c4661
GypsyBaron/Coursera
/Course 1/week 3/Task_4.cpp
C++
cpp
501
no_license
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> using namespace std; int main() { int n; long long temp; long long answer = 0; vector<long long> a; vector<long long> b; cin >> n; for (int i = 0; i < n; i++) { cin >> temp; a.push_back(temp); } for (int i = 0; i < n; i++) { ...
96ec0ee960c8af739311d6c938b050b3ec496cb6
04e0056b650e3e1d211cdf6c3b838982298f638b
SetsunaChyan/OI_source_code
/USST/34/D.cpp
C++
cpp
619
no_license
#include <cstdio> typedef long long ll; ll a[300005],dif[300005],now,ans=-0x3f3f3f3f; int n; inline ll abs(ll x){if(x<0) return -x; else return x;} inline ll max(ll a,ll b){return a>b?a:b;} int main() { scanf("%d",&n); for(int i=0;i<n;i++) scanf("%lld",&a[i]); for(int i=0;i<n-1;i++) dif[i]=abs(a[i+1]-a[i]); ...
be1dcec6ef346755b552e3865c0bdcd3a70707da
0e24df451b1081af93a6044d3a6e3ba1911b9ba3
mflehmig/OMEdit
/OMEdit/OMEditGUI/Modeling/ModelicaClassDialog.cpp
C++
cpp
81,432
no_license
/* * This file is part of OpenModelica. * * Copyright (c) 1998-2014, Open Source Modelica Consortium (OSMC), * c/o Linköpings universitet, Department of Computer and Information Science, * SE-58183 Linköping, Sweden. * * All rights reserved. * * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE...
08789e6b5651a3e22d9986a8a74ed92c43409cee
2542eaac644916627c589b86ad223dbbd0afe9c8
haitong/myleetcode
/wordSearchII.cpp
C++
cpp
5,673
no_license
/* Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once in a word. For example, Given...
4e07e9086809bb61d7eec3c81f9093a0f640f839
785889090a362eb3be8feb84f9ce52e7f1373323
matt2005/esp8266_milight_hub
/lib/Settings/Settings.cpp
C++
cpp
4,277
no_license
#include <Settings.h> #include <ArduinoJson.h> #include <FS.h> #include <IntParsing.h> void Settings::deserialize(Settings& settings, String json) { DynamicJsonBuffer jsonBuffer; JsonObject& parsedSettings = jsonBuffer.parseObject(json); deserialize(settings, parsedSettings); } void Settings::deserialize(Settin...
a1bc7b09c9e4806fd632929ae519fa2de1c21b15
7a25193b88e03ab131ac8dd31fde981466519986
zhuqiweigit/leetcode
/code/73.cpp
C++
cpp
1,268
no_license
#include <iostream> #include <vector> #include <limits> using namespace std; class Solution { public: void setZeroes(vector<vector<int>>& matrix) { if(matrix.size() == 0 || matrix[0].size() == 0) return; int m = matrix.size(), n = matrix[0].size(); bool mm = false, nn = false; ...
550eff305ed941f68f8d0d876e167ac208936ada
11592bb42fd68da5616974d05f287fbd32dfc6ff
lopeta01/GraphControl
/graphrender/FontResolver.cpp
C++
cpp
4,794
permissive
#include "precompiled_headers.h" #include "FontResolver.h" namespace hpcc { #if defined FB_WIN #define DEFAULT_FONTPATH "C:/WINDOWS/FONTS;C:/WINNT/Fonts;C:/winnt/fonts" #define DEFAULT_FONT "ArialUni;Arial;Verdana" #elif defined FB_X11 /* default fontpath for unix systems - whatever happened to standards ! */ #defin...
c8824a6de3180cee4753edb593579ca3c3f04486
c827a8dc33cacccb0f81c1b4ea1c39496e4eca04
squidrpi/pifba
/cpu/z80/z80daisy.cpp
C++
cpp
2,016
no_license
/*************************************************************************** z80daisy.c Z80/180 daisy chaining support functions. ***************************************************************************/ #include "z80daisy.h" #define CLEAR_LINE 0 #define ASSERT_LINE 1 void z80daisy_reset...
ac5b82f958c2d1564daf937508060b0fd9107b77
8434cb4936241b5ada945ac4e866d66061a4596d
huzhengdong/Ve280
/p2.cpp
C++
cpp
7,893
no_license
#include<iostream> #include<cstdlib> #include "p2.h" using namespace std; int size(list_t list) { if(list_isEmpty(list)) return 0; else return 1+size(list_rest(list)); } bool memberOf(list_t list, int val) { if(list_isEmpty(list)) return 0; else if(val==list_first(list)) return 1; else return memberO...
f0a778c06bfd13bb4406b9229d07686db0beef0b
5ece47176831e87878ef90183ea427a03b9a9aa2
zenoalbisser/chromium
/content/renderer/usb/web_usb_client_impl.cc
C++
cc
6,664
permissive
// Copyright 2015 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/renderer/usb/web_usb_client_impl.h" #include "base/bind.h" #include "base/callback.h" #include "base/memory/scoped_ptr.h" #include "bas...
5015f8a773f0878bde4b60afa94cc828b004f543
4a51a38421773763d0dee0f990069228d4ef2e82
shadowapril/hziee
/list5_fifth_semester/3_QT图形界面编程/works/task2/zqd/zqd.cpp
C++
cpp
839
no_license
#include "zqd.h" #include "ui_zqd.h" #include <QDebug> #include <QDialog> #include <QMessageBox> #include <QLabel> #include "user_info.h" #include "point.h" ZQD::ZQD(QWidget *parent) : QMainWindow(parent), ui(new Ui::ZQD) { ui->setupUi(this); poi = new Point(); // connect(ui->showChildButton,&QPush...
dec0fda9c7d0bf9d8cede3ab93bbae14b27573ed
be80b80b165b44998b55b6f5c03bcafce08d5c54
roatis2/Computer-Science-Data-Structures
/lab_inheritance/circle.cpp
C++
cpp
3,094
no_license
/** * Copyright 2011 University of Illinois at Urbana-Champaign * CS 225 Lab 04 C++ Object Oriented Programming * Authors: * Simon Krueger <skruege2@illinois.edu> * * Please see circle.h for documentation of the Circle class */ #include "circle.h" #include <cassert> #include <cstdio> #include <cmath> const ...
ba820c5475ceac2d9288132c6fec91742b71eee4
1618f30c66dd1048a1670fee9f63de8dd836d6b0
CyberSet/AlgAndDataStruct_4Sem_TermWork
/pushRelabelMaxFlow/Source.cpp
C++
cpp
766
no_license
#include <fstream> #include <iostream> #include "graph.h" using namespace std; int main() { graph test; setlocale(LC_ALL, "RUS"); try { fstream in("F:\\Универ\\Прога 4 сем\\AlgAndDataStruct_4Sem_TermWork\\pushRelabelMaxFlow\\incorrectTest.txt"); test.inputVertex(in); in.open("F:\\У...
0ffa494c57d7357730499222e35d2034a1804a62
7078b1e6ed177a9cdccb8392b65cbc2875429d47
sraihan73/Lucene-
/core/src/test/org/apache/lucene/util/TestSentinelIntSet.cpp
C++
cpp
1,747
no_license
using namespace std; #include "TestSentinelIntSet.h" namespace org::apache::lucene::util { using org::junit::Test; // C++ TODO: Most Java annotations will not have direct C++ equivalents: // ORIGINAL LINE: @Test public void test() throws Exception void TestSentinelIntSet::test() { shared_ptr<SentinelIntSet> set =...
f031edcc7b987a6b6491fa8cbcab0301995fa9c2
3ea66a40eb40ebac761cc425195e83c8e0c341ed
Gaetz/opengl-training
/SimpleEngineWithOpenGL/SimpleEngineWithOpenGL-022/BackgroundSpriteComponent.cpp
C++
cpp
1,577
no_license
#include "BackgroundSpriteComponent.h" #include "Actor.h" #include "Rectangle.h" BackgroundSpriteComponent::BackgroundSpriteComponent(Actor* ownerP, const vector<Texture*>& texturesP, int drawOrderP): SpriteComponent(ownerP, *texturesP[0], drawOrderP), scrollSpeed(0.0f), screenSize(Vector2(WINDOW_WIDTH, WINDOW_HEIG...
739476ac5f5267fbb5c57fbaeb214551237ae819
8a88f7f97d8062a5eb8c663c086d8a46d15910e2
DinhTuanAnh2k1/C-plus-plus
/Hoc C++/so bi lap lai dau tien.cpp
C++
cpp
465
no_license
#include<bits/stdc++.h> //Dinh Tuan Tinh using namespace std; int main(){ int t; cin>>t; while(t--){ long long n;cin>>n; long long a[n]; for(long long i=0;i<n;i++){ cin>>a[i]; } long long d[100005]; for(long long i=0;i<100005;i++) d[i]=0; for(long long i=0;i<n;i++){ d[a[i]]++; } int count=0;...
cf7242cebfceac81e07ebfef5d8a439510f4b30c
ea39f2a6309be26ea2beec094eb8b4a860950cf0
jwickowski/IsTabeBusy
/src/Device.ESP2866/IsTableBusy.Device.ESP2866/lib/ArduinoJson/src/ArduinoJson/Polyfills/isInteger.hpp
C++
hpp
399
permissive
// Copyright Benoit Blanchon 2014-2017 // MIT License // // Arduino JSON library // https://bblanchon.github.io/ArduinoJson/ // If you like this project, please add a star! #pragma once #include "./ctype.hpp" namespace ArduinoJson { namespace Polyfills { inline bool isInteger(const char* s) { if (!s) return false...
6546e78155ee8703fc23f5d8e291ce9667aa030c
386ab2ebf907ac0cd8033466afd759e71eac9285
shahinsafaroff/cpp
/_classes_plus_pointers_plus_methods/main.cpp
C++
cpp
822
no_license
#include <iostream> using namespace std; class Student { private: string name; int number; //ENCAPSULATION public: void setName(string enteredName){ if(enteredName.size() >= 3){ name = enteredName; }else { cout<<"Please enter the valid Student Name!!!"<<endl; ...
0e9b77a0a3b9776588a89501e3235543c22d1698
b85bee132f6db4848343b0cf9744d48d6d43351a
SaschaNes/hardware_qcom-caf_sm8350
/display/sde-drm/drm_crtc.cpp
C++
cpp
37,355
no_license
/* * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list o...
04122300df0cf39ccfe0f2aba027987dfba30445
c44f83509505413263aaf4244d46fbee2f6ffe61
yjbong/problem-solving
/boj/2233/2233.cpp
C++
cpp
1,635
no_license
#include <cstdio> typedef struct node{ int idx1,lc,rc,pa,lv; }NODE; NODE v[4444]; char sq[4444]; int main(void){ int n,x,y,vx,vy; scanf("%d",&n); scanf("%s",sq); scanf("%d %d",&x,&y); for(int i=0; i<=2*n; i++){ v[i].idx1=-1; v[i].lc=-1; v[i].rc=-1; v[i].pa=-1;...
2cef355d9c4dbe0dc7fb95b4fba16bc6659af657
1a8ec5d7520749121b93f1f3272a627cf6818196
EricDDK/leetcode_brush
/algorithms/413_Arithmetic Slices/main_dp_4ms.cpp
C++
cpp
951
no_license
//A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same. // //For example, these are arithmetic sequence : #include <sstream> #include "iostream" #include <cstdint> #include <vector> #include <list> #include <unordere...
9c232040eba4602d12647c9bce502f3c8d550a3d
7adf95d37172a983c6ba61d6a1b0a28da1939436
jamboree/dir_monitor
/include/windows/basic_dir_monitor_service.hpp
C++
hpp
14,561
permissive
// // Copyright (c) 2008, 2009 Boris Schaeling <boris@highscore.de> // // 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) // #pragma once #include "dir_monitor_impl.hpp" #include <boost/asio.hpp> #include <boost/threa...
355ee5b32c23775dfc4475add4ac72d3da9470c6
04693f6a1993b769ef8e0f1b0089fcc6809b31a9
babuveld/development
/dev/cpp/test/src/test_hmap.cpp
C++
cpp
9,257
no_license
/* *------------------------------------------------------------------ * Google Test for the hashmap API's *------------------------------------------------------------------ */ #include <iostream> #include <gtest/gtest.h> #include <hmap.hpp> #include <string.h> #include <ctime> hashmap<unordered_htbl_t> hmap; has...
6ef931289fba987dfef5dbd3721405af8b16e78d
22daee944bc16617866f9ac6fec34e3a880c3760
zhubofei/15462-p3
/src/scene/sphere.hpp
C++
hpp
579
no_license
/** * @file sphere.hpp * @brief Class defnition for Sphere. * * @author Kristin Siu (kasiu) * @author Eric Butler (edbutler) */ #ifndef _462_SCENE_SPHERE_HPP_ #define _462_SCENE_SPHERE_HPP_ #include "scene/scene.hpp" namespace _462 { /** * A sphere, centered on its position with a certain radius. */ class ...
b33c33b05e61ae637e652e97d92033326a81a2f2
f0cc73a5acc0a2b1c3eed717ece89ba2fa9c6e99
eighteight/CinderEight
/Audio2NodeBasic/src/Audio2NodeBasicApp.cpp
C++
cpp
1,468
permissive
#include "cinder/app/AppNative.h" #include "cinder/gl/gl.h" #include "cinder/audio2/NodeInput.h" #include "cinder/audio2/NodeEffect.h" using namespace ci; using namespace ci::app; using namespace std; class Audio2NodeBasic : public AppNative { public: void setup(); void mouseDrag( MouseEvent event ) override; voi...
51a708a8cd800a9765a2f79b234637e57e1838de
9dfade3fce014e5a03a01d0a033822de745539f0
boulangg/phoenix
/kernel/src/driver/PCI/PCIManager.cpp
C++
cpp
7,198
permissive
#include "PCIManager.hpp" #include <cstdio> #include <asm/io.h> #include <core/Console.hpp> #include "PCIDriver.hpp" #include "../Disk.hpp" PCIDevice::PCIDevice(uint8_t bus, uint8_t slot, uint8_t function) { this->bus = bus; this->slot = slot; this->function = function; PCIManager::readPCIConfigSpace(bus, sl...
02f4deb93a62dba10d05dad05f768346e4b17b56
6234265b3d206bea378fab186cb3a2216fd20a3c
SOliasS/Ender5plusSKRv1.3
/Marlin-bugfix-2.0.x/Marlin-bugfix-2.0.x/Marlin/src/gcode/calibrate/M665.cpp
C++
cpp
3,447
permissive
/** * Marlin 3D Printer Firmware * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General...
feb526d0a8570414230046c8325f72e0f17f2319
b97ca3918f60686d5f4831a0cd91bf044073c67d
ahsannaqvii/Car-Rental-System-OOP
/GariKro GUI/driverreceiveamount.cpp
C++
cpp
4,270
no_license
#include "driverreceiveamount.h" #include "ui_driverreceiveamount.h" #include "mainwindow.h" #include "cstdlib" #include <QMessageBox> #include <QFile> #include <QTextStream> #include <QDebug> DriverReceiveAmount::DriverReceiveAmount(QWidget *parent) : QDialog(parent), ui(new Ui::DriverReceiveAmount) { ui-...
f4bd5da84bb2bdafcdf9c4a2017435ca648ce8bf
27372e415b0101fe78559b404653045bd845aae3
isabella232/pa-blink
/Source/WebKit/chromium/tests/WebViewTest.cpp
C++
cpp
31,939
permissive
/* * Copyright (C) 2011, 2012 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 of source code must retain the above copyright * notice, this list of co...
233c7143a7a06dca1723d0e680f54f29c0c3bbac
82f09e70f79dd2cfc22cd4e4389337c5e6fe81f5
willvitorino/IFCE
/S6/CAA/codCad/32.cpp
C++
cpp
907
permissive
#include<bits/stdc++.h> using namespace std; void zeros(string aux){ string _aux; bool sequencia = false; for(int i=0;i<aux.size();i++){ if(aux[i]=='0'){ sequencia = true; } if(aux[i]=='0'&&sequencia==true){ if(aux[i+1]!='0'){ sequencia = f...
6abc32b2039fb28e8acde574ef0c7f38c28c0194
a68579dca6f8d174013387ab14fb38517e86ad9e
BerntA/tfo-code
/game/server/hl2/antlion_dust.cpp
C++
cpp
1,296
permissive
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ // //=============================================================================// #include "cbase.h" #include "antlion_dust.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0...
1963059a8ab3eb6a1c1a9286bd1d2fbbeb31b508
6a1ee54ecb1f4c92cd49fd2851ea07a27df89b21
francis-clairicia/NanoTekSpice-Enhanced-Edition
/src/Exception/InputValueException.cpp
C++
cpp
322
no_license
/* ** EPITECH PROJECT, 2021 ** NanoTekSpice-Enhanced-Edition ** File description: ** Exception */ #include "InputValueException.hpp" namespace nts { InputValueException::InputValueException(const std::string &value) noexcept: Exception("Unknown input value \"" + value + "\"") { } } // namespace nt...
b05e0749005290bade574ccb942d989aee6e3c86
270b7113c5c5a6e6b070cb58ae3ae9a53890c243
royaltm/node-murmurhash-native
/src/murmurhash/PMurHash.cpp
C++
cpp
7,812
permissive
/*----------------------------------------------------------------------------- * MurmurHash3 was written by Austin Appleby, and is placed in the public * domain. * * This implementation was written by Shane Day, and is also public domain. * * This is a portable ANSI C implementation of MurmurHash3_x86_32 (Murmur...
b8816bb6d38003b21cfed64513fe3b0949f9ae5b
bf8165f86b35b6edb77c208583693cbef6b242bd
LukePrzyb/Acid
/Sources/Files/Zip/ZipArchive.cpp
C++
cpp
13,678
permissive
#include "ZipArchive.hpp" #include <random> #include "Helpers/String.hpp" #include "ZipException.hpp" namespace acid { ZipArchive::ZipArchive(const std::filesystem::path &filename) : m_archivePath(filename) { std::ifstream f(filename.c_str()); if (f.good()) { f.close(); Open(filename); } else { f.close(); ...
dcf59c4310a5277581baaf667f2a6c86c8d13a43
6aa35ae2d4ccd05ee6166b8636943a088ba13b04
bxgaillard/dicomsel
/3rdparty/dcmtk-3.5.4/dcmjpeg/djencext.cc
C++
cc
3,088
permissive
/* * * Copyright (C) 1997-2005, OFFIS * * This software and supporting documentation were developed by * * Kuratorium OFFIS e.V. * Healthcare Information and Communication Systems * Escherweg 2 * D-26121 Oldenburg, Germany * * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRA...
3b7b272291d66d6a8e9b0f86dbe8758c4527c06b
cd6d0c5f6a6fada3c9fb9bdc85972b9523d7c607
suryakiran/Mp3Db
/TagRename/Include/TagRename/Mp3Config.hxx
C++
hxx
1,032
no_license
#ifndef Mp3Config_hxx_INCLUDED #define Mp3Config_hxx_INCLUDED #include <Signals/SignalBase.hxx> #include <Stl/Set.hxx> #include <Stl/Map.hxx> #include <boost/filesystem/path.hpp> namespace fs = boost::filesystem; class Mp3Config; namespace YAML { class Node; } namespace signal { namespace mp3 { namespace c...
17ff57146858bb4876be84af2e37584d9308d49d
9ca792336cc7912bea34ac03e29ffd79e43603ba
jwebbed/udep
/source/helpers.cpp
C++
cpp
2,580
permissive
/* Copyright (c) 2014 Jonathan Webb 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, distrib...
e144ba95be9710dcf88fe9792a0e9aea4431b1cd
f0304955b8f93dd5d09de7822c564da5c9f7ac04
funjm/parallel-algorithm
/odd-even-sort/odd_even.cpp
C++
cpp
5,232
no_license
#include "mpi.h" #include <cstdio> #include <algorithm> #include <cmath> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #define BLOCK 1024*1024LL using namespace std; typedef long long __int64; int Compute_partner(int phase,int my_rank,int comm_sz){//根据趟数的奇偶性以及当前编号的...
350ae1c86b591c71c9f8e97847211127c65c5f92
2cd31f99e8e7ed27f0eb825008fa7a613f18f29e
frankieliu/problems
/leetcode/python/583/sol.cpp
C++
cpp
897
no_license
C++ 6 lines DP https://leetcode.com/problems/delete-operation-for-two-strings/discuss/103221 * Lang: cpp * Author: zefengsong * Votes: 0 C++ version of this [post](https://discuss.leetcode.com/topic/89285/java-dp-solution-longest-common-subsequence). `dp[i][j]`: The longest common subsequence at `word1[i - 1...
ffffda255b19cbfcfe1fa0d60f3ecaa989c96695
db2b29b84788a3add5d07e86b15285b0b27b0c0a
ExpLife/Norton_AntiVirus_SourceCode
/Consumer/trunk/src/Tools/MachineInfo/Report.cpp
C++
cpp
917
no_license
//////////////////////// // // PROPRIETARY / CONFIDENTIAL. // Use of this product is subject to license terms. // Copyright © 2006 Symantec Corporation. // All rights reserved. // ///////////////////////////////////////////////////////////////////////////////////////////////// // Report.cpp: implementation of...
4eba7dc057b3d00027ca11f5eb3071240d31fd66
86f0a4cdadddf2decbd936e27ba695c9235f2890
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE23_Relative_Path_Traversal/s03/CWE23_Relative_Path_Traversal__wchar_t_connect_socket_fopen_09.cpp
C++
cpp
6,542
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__wchar_t_connect_socket_fopen_09.cpp Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-09.tmpl.cpp */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: connect_socket Read data ...
0e4d69da44ce2399e6d6be04962db7b3042d37bb
4fcf9d6a2a691a2bfd8cb9d1ebe38b8bc1e74ce6
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_repos_function_3839_httpd-2.2.19.cpp
C++
cpp
938
no_license
static void *findMain(void) { struct ld_info *lp; char *buf; int size = 4 * 1024; int i; void *ret; if ((buf = malloc(size)) == NULL) { errvalid++; strcpy(errbuf, "findMain: "); strcat(errbuf, strerror(errno)); return NULL; } while ((i = loadquery(L_GETINFO, buf, size)) == -1 && err...
5d7a4fbee9dfa446c9ac24af89fdd92d844e3fd8
7ef4bbea01531ece5939fb265a1b92c0e50a7df4
grayasm/git-main
/world/HeadFirstDesignPatterns/c_plusplus/Silver/ChainOfResponsibility/GumballEMailHandler/ComplaintHandler.hpp
C++
hpp
1,419
no_license
#ifndef _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_COMPLAINT_HANDLER_HPP_ #define _HFDP_CPP_CHAIN_OF_RESPONSIBILITY_COMPLAINT_HANDLER_HPP_ namespace HeadFirstDesignPatterns { namespace ChainOfResponsibility { namespace GumballEMailHandler { class ComplaintHandler : public Handler { public: explicit ComplaintHandler( const H...
715605decbcad1da81017455e89ba0c26e9cc216
fb2b16e49d7655493fc2305940151b585cb940ac
sinashan/optimized-ALU
/Bus Invert/Sender/Buffer/buffer_tb.cpp
C++
cpp
631
no_license
// A Simple TestBench for SystemC // By: Pourya Gohari #include <systemc.h> #include "buffer.h" int sc_main (int argc, char* argv[]) { sc_core::sc_report_handler::set_actions( "/IEEE_Std_1666/deprecated", sc_core::SC_DO_NOTHING ); sc_signal< sc_logic > in, enable, out; ...
d532aed38baf1d0791eef4629efa0549f34219bc
d80bb90d88c7e99d81e4f7919fdd85e22d93eec5
cj9208/USACO
/codes/chapter 3/stamps_DP.cpp
C++
cpp
668
no_license
/* ID: cjdyx202 PROG: stamps LANG: C++ */ #include <stdio.h> #include <iostream> #include <string> #include <math.h> using namespace std; int dp[2000001]; bool can[2000001]; int main() { freopen("stamps.in","r",stdin); freopen("stamps.out","w",stdout); int i,j,N,K,v; cin>>...
e0f897a0d557343a1498b12d36aafc567ecef639
23079acd5768d4713cd5f2dca844b5e33bf1463e
patricknitschke/Ground_Station
/Relekontrol4_Gr.Station/fueling.cpp
C++
cpp
6,399
no_license
#include "Arduino.h" #include "xbee_GS.h" #include "weight.h" #include "fueling.h" #define outDumpPin 5 #define outFillPin 6 #define outArmPin 7 #define outPyroPin 8 #define outOxPin 9 #define outAirPin 10 int armingStatus = 0; int fillStatus = 0; int dumpStatus = 0; int airingStatus = 1; #define wait 1000 #define o...
7905a3aa8b0bc601928e75946c9c45ab377c7ff3
af0ffd0f346b9b3bb8ac1a9593e8e3b8cbaf2869
massenz/SimpleApiServer
/src/api/rest/ApiServer.cpp
C++
cpp
6,507
permissive
// Copyright (c) 2017 AlertAvert.com. All rights reserved. // Created by M. Massenzio (marco@alertavert.com) on 10/17/17. #include <glog/logging.h> #include <iostream> #include "api/rest/ApiServer.hpp" namespace api { namespace rest { // Mark: CONSTANTS const char *const kApiVersionPrefix = "/api/v1"; const char *c...
3d7a7a6c3b960d1ccdd853214fa2941139d4d211
f9738a9ed0f96bbef5bee0b0368e704c4d5f7c5e
qdzhaov/f18
/lib/evaluate/common.cc
C++
cc
1,274
permissive
// Copyright (c) 2018, NVIDIA CORPORATION. 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...