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
6c9c6e9ffc6ef8252a1e3b5b9a938c2be1f41d2f
16f09857d35dd74bab0a589c76625b72953575ac
gcamargo96/Competitive-Programming
/problem-solutions/codeforces/487/B.cpp
C++
cpp
1,008
no_license
#include <bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f #define M 1000000007 #define For(i,a,b) for(int (i)=(a);(i) < (b); ++(i)) #define mp make_pair #define pb push_back #define fi first #define se second #define endl "\n" #define PI acos(-1) #define fastcin ios_base::sync_with_stdio(false); typedef lon...
6657fd4c3557bac1df9dd77e9d7189a324183d30
6a1ab38d36a4e24cf6a02d7b2889091522eabed2
mashoujiang/openvino
/inference-engine/tests_deprecated/behavior/vpu/shared_tests_instances/plugin_tests/vpu_test_data.hpp
C++
hpp
10,813
permissive
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "behavior_test_plugin.h" #include "vpu/myriad_config.hpp" // correct params #define BEH_MYRIAD BehTestParams("MYRIAD", \ convReluNormPoolFcModelFP16.model_xml_str, \ ...
a3134b28fabb3bb557a93cd0cf8b4b696f919108
ad1ce6307692a7c8be878951aa8e4e833c84323d
tommybee/zelda-series
/ZeldaNSQ_US-src-linux/src/game/content/link/Inventory.cpp
C++
cpp
10,669
no_license
#include "Inventory.h" #include "../../../engine/resources/ResourceManager.h" #include "../../../engine/window/WindowManager.h" Inventory::Inventory(Save* save) { loadFromSave(save); setCurrent((Equipment)0); inventaire = ResourceManager::getInstance()->loadImage("data/images/status/inventaire.png...
7eedd4dc8e00db5064b46c4e4344cd317f1f14de
28a4be0e8895e26743f4985c48bd61b718af8ee4
Whwitpohe/redPlum
/frameworks/runtime-src/proj.android-studio/app/assets/src/cCode/GameOverLayer.cpp
C++
cpp
312
no_license
#include "GameOverLayer.h" using namespace cocos2d; GameOverLayer::GameOverLayer(void) { } GameOverLayer::~GameOverLayer(void) { } bool GameOverLayer::init() { bool bRct = false; do { CC_BREAK_IF(! CCLayerColor::initWithColor(ccc4(255, 255, 255, 255))); bRct = true; } while (0); return bRct; }
a32066675c83eb3dff4b38816f625f78288455c0
d827f4ee0370848c381a221db7008d6fb1880b37
DunaevYaroslav/SiriusFM-22
/MCEngine1D.hpp
C++
hpp
4,012
no_license
#pragma once #include "MCEngine1D.h" #include <cassert> #include <random> #include "Time.h" namespace SiriusFM { template < typename Diffusion1D, typename AProvider, typename BProvider, typename AssetClassA, typename AssetClassB, typename PathEvaluator > template<bool IsRN> inline void MCEngi...
97bd1166e84830bb0af23c9b763886bc089f23c8
c2b8c7f3eac4f6822480fc6e768f0c66f06a69e9
shineyruan/Project0-Getting-Started
/dxr-support/src/D3D12RaytracingHelloWorld/D3D12RaytracingHelloWorld.cpp
C++
cpp
42,169
no_license
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICUL...
7199997b85629171cc7ead9a7ba6f341370534bb
92fd75795f329746b8f4888c98df16c7997537ac
Duandi11/C
/OJ/math/huiwenzhishu.cpp
C++
cpp
711
no_license
#include<iostream> #include<cstdio> #include<math.h> using namespace std; bool isH(long long int a){ int tmp = 0; long long int b = a; while(a){ tmp = tmp*10 + a%10; a/=10; } if(b ==tmp) return true; return false; } bool isZ(long long int a){ ...
dfef43c2156c3b12433a2a282408b735366ee77f
bd0af6e25d0af7a64701e8a7ea140e7af28c0737
bugobliterator/sockimg
/client/client1.cpp
C++
cpp
4,080
no_license
#include <stdio.h> #include <sys/socket.h> #include<sys/resource.h> #include <arpa/inet.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <netinet/in.h> #include <opencv2/opencv.hpp> //#include<iostream.h> #define BUFFSIZE 32 using namespace cv; using namespace std; void Die(char *mess)...
2e1dd6b44b2bd0b1e90dd2d4b299223046ef0d6b
89bc69aa52c7b05544e2c07080da7c9374a96473
Elarose/Coffee
/Tools/ADT/Ground Doodad Fixing/4-9-12/src/wowfiles/cataclysm/AdtCataTextures.cpp
C++
cpp
3,065
no_license
#include <iostream> #include <fstream> #include <vector> #include <cstring> #include <string> #include <wowfiles/cataclysm/AdtCataTextures.h> #include <wowfiles/Chunk.h> #include <wowfiles/cataclysm/McnkCataTextures.h> #include <utilities/Utilities.h> AdtCataTextures::AdtCataTextures(const std::string & adtFileName) :...
2ce301a6ec783be1863b3e2a5ecd142e268dd386
632de4fade54099402ed90c4a5a93fcfec3cef97
jay-github/T3000_Building_Automation_System
/MBPoll/TestTool/MyAboutDlg.cpp
C++
cpp
1,678
no_license
// MyAboutDlg.cpp : implementation file // #include "stdafx.h" #include "TestTool.h" #include "MyAboutDlg.h" #include "afxdialogex.h" // CMyAboutDlg dialog IMPLEMENT_DYNAMIC(CMyAboutDlg, CDialogEx) CMyAboutDlg::CMyAboutDlg(CWnd* pParent /*=NULL*/) : CDialogEx(CMyAboutDlg::IDD, pParent) { } CMyAboutDlg::~CMyAbou...
f353719aeaffe509e77a09dfd89f3dc09af98bad
2c23901587d5a13db813b008de274520224ed286
Beisenbek/PP12017
/W8/T3/midterm/f_2.cpp
C++
cpp
269
no_license
#include <iostream> #include <algorithm> using namespace std; int main(){ int n,k,x; cin >> n >> k; int a[n+1]; for(int i = 1; i <= n; ++i){ cin >> a[i]; } a[k] = -10000; for(int i = 1; i <=n; ++i){ if(a[i] >= 0) cout << a[i] << " "; } return 0; }
246bf994f0b2f3a71afccaf67fdee90dd7a31307
ee703490436ab9a677431d4d84e9daa1c40936ee
chittunoo/swift
/lib/SIL/DynamicCasts.cpp
C++
cpp
37,219
permissive
//===--- DynamicCasts.cpp - Utilities for dynamic casts -------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
c2b0186e557ea5a098630d08c0b3ee080ecf9251
b7a139daf0ce40ba33934648f1fbb053fc70829a
BankaiNoJutsu/allods-v4-repacker
/Developer.cpp
C++
cpp
709
no_license
#include "Manager.h" void ShowConsole() { if (AllocConsole()) { freopen("CONOUT$", "w", stdout); SetConsoleTitleA("Console"); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); printf("Dll Succefull Attached!\n"); printf("Debug Console Sta...
0060a56077c60cdc53e07a3d46fb7e04ff775ab5
5e98e9d0571c3e049d2405df33d1e4231bd3649c
ccdxc/logSurvey
/data/crawl/tar/new_hunk_419.cpp
C++
cpp
379
no_license
count = maximum < BLOCKSIZE ? maximum : BLOCKSIZE; status = full_write (STDOUT_FILENO, cursor, count); if (status < 0) FATAL_ERROR ((0, errno, _("Cannot write to compression program"))); if (status != count) { ERROR ((0, 0, _("Write to compression program short %lu bytes"), (unsign...
75a32aabde947782359c2fe748619103353e956c
4063f964d565c7bb5cd369b7f7a3bab0dce13aa9
trigrass2/flight
/cow/src/cow.cpp
C++
cpp
59,832
no_license
/* cow (previously known as narsil): GUI commanding front-end * * This software is copyright (C) 2002-2011 University of Toronto * Parts of this software are copyright 2010 Matthew Truch * * This file is part of cow. * * cow is free software; you can redistribute it and/or modify * it under the terms of the GNU...
1f24c2d89b7e35433ec4b417754aa42dc6be6f85
4eda51dab151d2f708df9110fd1e74616f1d1354
Mr4sR/RakMagic
/RakMagic/playbackGUI.cpp
C++
cpp
6,932
permissive
#include "main.h" namespace Interface { namespace PlaybackGUI { bool bEnabled = false; char szInput[128]; char szFile[128]; char szFileSaveAs[128]; char szInfo[128] = "Playback"; int iRecordType = Playback::PLAYBACK_TYPE_ONFOOT; //bool bUseHotkey = false; static void LoadPlayback() { char errmsg[...
bdfb5e1fbfdcad6a93e8b6d11f98b532bf057430
501445fd44de69014aea43b2494995014668a270
ajaykumar649/exo-diphoton-limits
/exost/workdir/Nspectra/workspaces/.wscode.6cc8e118-618f-11e3-9717-dfd28a89beef.myWS/RooCFAuto003Pdf.cxx
C++
cxx
1,571
no_license
/***************************************************************************** * Project: RooFit * * * * This code was autogenerated by RooClassFactory * ...
8cb9b8f23e1e50df45f1cb9f2e9e1eea1a1e9a79
0f51447e23b09faafb7ac8fc4502fbc097363659
monman53/labutils
/src/histo.cpp
C++
cpp
930
no_license
#include <iostream> #include <algorithm> #include <vector> #include <gsl/gsl_histogram.h> #include <cmath> int main() { std::vector<double> data; double x; while(std::cin >> x) { data.push_back(x); } int n = 1 + log2(data.size()); double xmin = *std::min_element(data.begin(), data.end...
489b744cfad358164f29a5a530091e61a28d1c86
cea8c184980b83d8aea72a9c69b8a84fa9d98216
hccde/AlgorithmPractice
/common/lib/xml/tinyxml2-test.cpp
C++
cpp
386
no_license
#include <iostream> #include "tinyxml2.h" #include "tinyxml2.cpp" using namespace tinyxml2; using namespace std; int main(int argc,char** argv){ XMLDocument doc; XMLElement* ele = doc.NewElement("mydiv"); doc.NewDeclaration(); ele->SetAttribute("test",10); doc.InsertEndChild(ele); if(!doc.Save...
66bf1af40f86c16576d7f4919a1e693425edaf14
ae80c7fb855c9a85757e168da6612737a085dc91
jayeshkrt/LearnCpp
/vectors.cpp
C++
cpp
1,275
no_license
#include<iostream> #include<vector> using namespace std; int main(){ vector <int> v1 = {1,2,3,4,5}; // append elements to vector v1.push_back(4); // append to the beginning v1.insert(v1.begin(),0); // append to the second (index 1) v1.insert(v1.begin()+1, 9); // pop the last element ...
db2fd6d7397fcd1c4b216bb0cebdb3cbd7022b97
c678d3def3d3a5ffb3afe134c4b17c1454986ef8
EvgenyVRN/VTK
/Filters/Hybrid/vtkImplicitModeller.cxx
C++
cxx
33,920
permissive
/*========================================================================= Program: Visualization Toolkit Module: vtkImplicitModeller.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This softw...
5c4e93baf4d0a36cd9f5aa1ee8ac69deb196f9e4
3c6b8cd8e5827895e746a91fccec48c91bc79f8b
ladinu/CSClasses
/cs261/lab5/main.cpp
C++
cpp
3,845
no_license
#include "airplane.h" #include "car.h" #include "bst.h" #include "list.h" #include "passenger.h" #include "magicschoolbus.h" #include "xwing.h" #include "fleet.h" #include <iostream> using namespace std; int main() { Car car; Airplane airplane; Xwing xwing; Magicschoolbus bus;...
fe95bef90d75c1988490163fd52d620732721024
2663c190c7eddc39bd28e8d3f71f34faecc1ca23
nalinimsingh/ITK_4D
/Modules/Numerics/Optimizers/test/itkLBFGSBOptimizerTest.cxx
C++
cxx
9,586
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * ...
36930656c20c9fc2c63b929b787c392cae640a4e
7eac21c96c2e801c2255878d9cd1c5b6d1f35112
HappyVVlnaJIe/red_belt
/Поисковая система/main.cpp
C++
cpp
5,900
no_license
#include "search_server.h" #include "parse.h" #include "test_runner.h" #include "profile.h" #include <algorithm> #include <iterator> #include <map> #include <vector> #include <string> #include <sstream> #include <fstream> #include <random> #include <thread> using namespace std; void TestFunctionality( const vector<...
855f626e6b3d300f92e3913b7b496921fa8b4c16
7239233d54aa269416b1da768ff6327bfdf1d2b8
jabathehutprogramer/acc_cpp_ch4
/readWord.cpp
C++
cpp
649
no_license
#include <string> #include <iostream> #include "readWord.h" #include "displayWords.h" using std::cin; using std::cout; using std::vector; using std::string; using std::endl; int readWord(vector<words_count>& wordList) { string word; cout<< "Enter words. Enter . when done" << endl; words_count local_struct; // d...
b50ab4d9c5d0486a9459cf0b1b6da2ae4ba507bd
17bea32d18ce1b9a8a4d190d3535a5aec4edc392
GraphicsCoder/renderdoc
/renderdoc/driver/gl/wrappers/gl_draw_funcs.cpp
C++
cpp
127,152
permissive
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2015-2017 Baldur Karlsson * Copyright (c) 2014 Crytek * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (t...
d42c6eb11a0d52c84cb9f1eaf566981cc36b49d4
4e5d00be2fa1e40dd4cef80354bb3a373c2de854
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_5/MP+dmb.sypl+dmb.stap.c.cbmc_out.cpp
C++
cpp
29,837
no_license
// Global variabls: // 0:vars:2 // 2:atom_1_X0_1:1 // 3:atom_1_X2_0:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 #define ADDRSIZE 4 #define LOCALADDRSIZE 2 #define NTHREAD 3 #define NCONTEXT 5 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b...
3eeb1dc7122981adb0125f7e561bfc539866f393
ef006ac864066dd479fb6bebfc28cf016c2a4859
moximo13/fabric-material
/deliboard/node_modules/pkcs11js/src/main.cpp
C++
cpp
446
permissive
#include <nan.h> #include <node.h> #include "const.h" #include "node.h" NAN_MODULE_INIT(init) { Nan::HandleScope scope; WPKCS11::Init(target); declare_objects(target); declare_attributes(target); declare_ket_types(target); declare_mechanisms(target); declare_flags(target); declare_certificates(target); dec...
02903d0c035341c988b4c78e468776520ef07a1a
31d4040e8f4490d4bfdf7238c9ecc4382bd574ce
zhwh/Dubins
/Dubins.cpp
C++
cpp
14,052
no_license
#include "Dubins.h" DubinsTrajectory Dubins::DubinsShortestPath(const double& _minTurnRadius, const double& _wheelbase, const AgentState& _start, const AgentState& _goal){ Circle agentLeft; Circle agentRight; Circle queryLeft; Circle queryRight; m_start = _start; m_goal = _goal; m_maxSteering = asin(_whee...
08f0cdbade91056c616b47478d6ec69415db4d80
6b67582fd69123a60c4eb6a89f3b113b68644482
AndersEllinge/Linux-2-F19
/engineDev/engine1/main.cpp
C++
cpp
11,173
no_license
#include <iostream> #include "engine.h" #include <algorithm> using namespace std; struct vec3d { float x, y, z; }; struct triangle { vec3d p[3]; Pixel rgb; }; struct mesh { std::vector<triangle> tris; }; struct mat4x4 { float m[4][4] = { 0 }; }; class rotatingCube : public Engine { private: ...
bfd2d6e6148b69afcbb77cb586161c47733753ee
c740d166129bc673995dc771b83c5378b603fea9
troshko111/spectator-cpp
/spectator/timer.cc
C++
cc
1,526
permissive
#include "timer.h" #include "atomicnumber.h" namespace spectator { Timer::Timer(IdPtr id) noexcept : id_(std::move(id)), count_(0), total_(0), totalSq_(0.0), max_(0) {} IdPtr Timer::MeterId() const noexcept { return id_; } std::vector<Measurement> Timer::Measure() const noexcept { std::vector<Measurement> res...
908b9dc1c37e42c413d52cc2ff69945ba41e6bf0
64707589176af5a52d644fe212841f1c1badadc1
CyFI-Lab-Public/RetroScope
/external/chromium_org/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
C++
cc
13,794
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 "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" #include "base/message_loop/message_loop.h" #include "base/prefs/pref_servic...
6e43feea1b056dc25d4194e91e5178d016fa5b20
5b61e1864ffcf7852ff578b31036fa5bd5be0152
imikejackson/SMTK
/smtk/extension/vtk/operators/testing/cxx/DeleteSmtkCell2.cxx
C++
cxx
4,610
permissive
//========================================================================= // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
52e6769e6d1bea81ba92e6bdf32985ec81a66dbc
174a29b67325f04ee58eece27675e6b936116855
ratea/abc
/arc/arc005/a.cpp
C++
cpp
318
no_license
#include<iostream> using namespace std; int main(){ int n; cin>>n; int ans = 0; for(int i = 0;i<n;i++){ string s; cin>>s; if(s=="TAKAHASHIKUN"||s=="Takahashikun"||s=="takahashikun")ans++; if(s=="TAKAHASHIKUN."||s=="Takahashikun."||s=="takahashikun.")ans++; } cout<<ans<<endl; return 0; }
ca9635c08bb3ebb1432c684a597b439f1ac7a105
c12b1ec77a1b164c1d7c35bee6434519b847510a
dlyr/globjects
/source/globjects/source/Resource.cpp
C++
cpp
4,031
permissive
#include <globjects/Resource.h> #include <glbinding/gl/functions.h> #include "registry/ImplementationRegistry.h" #include "implementations/AbstractBufferImplementation.h" #include "implementations/AbstractFramebufferImplementation.h" #include "implementations/AbstractTextureImplementation.h" using namespace gl; ...
e29e02f8a2689eb408ac777f2ca3c55651b995d3
407db62310eb7a981f0db218b30d5421560a1121
mohammedalasmar/omnetpp-data-transport-model-ndp
/omnetpp-5.2.1/src/nedxml/nedsyntaxvalidator.cc
C++
cc
22,319
no_license
//========================================================================== // nedsyntaxvalidator.cc // // OMNeT++/OMNEST // Discrete System Simulation in C++ // // Contents: // class NEDSyntaxValidator // //========================================================================== /*...
898bba1f90244bd4cdca954cdb530ce832ab56ae
4a1ec864e1388dba1f282bc9fd7a6a5bcd81317d
TheNamlessGuy/Innovativ-Programmering
/TDP005/SquareHead/source/PlayState.cc
C++
cc
4,903
no_license
#include <SDL2/SDL.h> #include <random> #include "../headers/PlayState.h" #include "../headers/Door.h" #include "../headers/Grenade.h" #include "../headers/SquareHead.h" using namespace std; const SDL_Rect PlayState::PLAYING_FIELD {40, 40, 720, 500}; PlayState::PlayState(SDL_Renderer* const& r, TTF_Font* const& fon...
f3be37d4bdca60d07ad0468edfdfde371b22fd95
97df7e726e76dcbaa69bb90001019a911af9e422
wcysai/Continued-Story
/Petrozavodsk Winter-2021. Nordic+ Contest/tempCodeRunnerFile.cpp
C++
cpp
1,495
no_license
#include<bits/stdc++.h> #define MAXN 10005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int,ll> P; int n,m,q; vector<P> G[MAXN]; ll val[MAXN]; int color[MAXN]; vector<ll> basis; void dfs(int v,int p,int d) { color[v]=1; pa...
ad2f66ceae68c55b6748e49078d1ab1683fe4436
1868f22f23195d31ded914759e3e92304831edee
skyformat99/MultiMonitor
/src/CStatusGraphCtrl.cpp
C++
cpp
6,150
no_license
#include "stdafx.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// UINT UpdateGraph(LPVOID); void DrawPoint(CStatusGraphCtrl*,long int,bool=true); // used to display the current value abo...
d4b61da6df02020d349880e9e136393c0bfa3ad5
ce022ab3cb51a0b2b484010e1ebf7f67561079ae
chen--oRanGe/thrill
/thrill/core/losertree.hpp
C++
hpp
31,543
permissive
/******************************************************************************* * thrill/core/losertree.hpp * * Many generic loser tree variants. * * Extracted from MCSTL * http://algo2.iti.uni-karlsruhe.de/singler/mcstl/ * Copyright (C) 2007 Johannes Singler <singler@ira.uka.de> * * copied and modified from ...
89047d4d43012ddac6b4fbcdf28a6fbf6a71407f
002440256066fa3aadf6aa5e9ffd3abe7ecfd379
shubhamkr2020/algorithms
/Trie/simple string insertion.cpp
C++
cpp
3,388
permissive
// https://codeforces.com/contest/271/problem/D // 2D array Implementation of trie..................... #include<bits/stdc++.h> using namespace std; #define gc getchar #define rep(i,j,k) for(i=j; i<k; i++) #define rrep(i,j,k) for(i=j; i>=k; i--) #define repmat(i,j,n,m) for(i=0; i<n; i++) for(j=0; j<m; j++)...
6720fa68dad98df9c88ebcdf97797aab39964ec7
9ddeb8ee9788f9dd7c01a0e5e58cb99b2c8d97e1
DharahasGanapathiraju/Shopping-cart
/pp lab assign 6 shopping list.cpp
C++
cpp
2,805
no_license
#include<iostream> #include<cstring> using namespace std; int n; class bill { int quantity[50],code_no[50]; float price[50]; char item_name[50][50]; float sum; public: void create(); void remove(); void display(); void modify(); }; void bill::create() { int i; cout<<"Enter no of ite...
c8dc7a6e20a62cf78b15308eaea6259466be5b46
036fd899f8b26f418b41a0f29168dc2e7739252d
bmtfc/ss_tasks
/task2/src/AnyType.cpp
C++
cpp
5,164
no_license
// // Created by Mac on 05.01.2021. // #include "AnyType.h" const int NUMBER_OF_DATA_TYPES = 9; const char *DATA_TYPES_NAMES[NUMBER_OF_DATA_TYPES]{"bool", "int", "unsigned int", "long int", "float", "double", "long double", "char", "none"}; AnyType::AnyType(bool dat...
b1a24757056eccd8412f43f019e553110697c4e4
dd6ae43cdebd680586b89fc0eec0bcf7eb9d0278
pombreda/metamorphosys-desktop
/metamorphosys/META/src/CAD2CyPhy/UdmApp.cpp
C++
cpp
7,184
permissive
/* Copyright (C) 2013-2015 MetaMorph Software, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this data, including any software or models in source or binary form, as well as any drawings, specifications, and documentation (collectively "the Data"), to deal in the Data withou...
b318ea554307aef759b36414da12af83715e88c8
0a1c6ffa8d5fe6331f0ca62dfddbde85316921d8
v1ka5/socorro
/minidump-stackwalk/stackwalker.cc
C++
cc
11,943
no_license
// Copyright (c) 2011 The Mozilla 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...
a16572f4999326870f630719145f32f101f5f900
d36259719ffb2c94f5244994ceb1f4e7c096eda5
Wang-Shiyu/Bplus-Tree
/Main/BPlusTest/source/BPlusQUnit.cc
C++
cc
12,798
permissive
#ifndef BPLUS_TEST_H #define BPLUS_TEST_H #include "MyDB_AttType.h" #include "MyDB_BufferManager.h" #include "MyDB_Catalog.h" #include "MyDB_Page.h" #include "MyDB_PageReaderWriter.h" #include "MyDB_Record.h" #include "MyDB_Table.h" #include "MyDB_TableReaderWriter.h" #include "MyDB_BPlusTreeReaderWriter.h" #incl...
7fca388dfd69f6501610bfaf2ea1bdfc4fd4c6cc
991133b1c3fdf111d6a7bf7d1f7405eeabb79be1
peetw/htcondor
/src/condor_dagman/dagman_metrics.cpp
C++
cpp
13,633
permissive
/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. Y...
9f82a90ca62cd3f122ec800fa83673a273990f6e
ba95cb84fd90b4ea4e32024df24c13d83bcdf234
dorian-gabIer/szkopul
/a7f_main.cpp
C++
cpp
232
no_license
#include <bits/stdc++.h> using namespace std; int main() { int n, sum = 0, temp; cin >> n; while(n--) { cin >> temp; if(temp % 2 == 0 or temp >= 0) sum += temp; } cout << sum; return 0; }
53b87c95b00a8bce0549abc1dec2e42fc83fd35b
2f1d9a6635cf845b76fae387b783feb6d2d7b03d
Alfred-Chillitupa/CCOMP2-1-1_Lab_Cap_10-12_Chillitupa_Alfred
/12.14/main.cpp
C++
cpp
3,321
no_license
// Fig. 12.17: fig12_17.cpp // Processing Employee derived-class objects with static binding // then polymorphically using dynamic binding. #include <iostream> #include <iomanip> #include <vector> #include "Employee.h" #include "SalariedEmployee.h" #include "CommissionEmployee.h" #include "BasePlusCommissionEmployee.h...
ffd9219000f510c892facff159070a35d2b2b632
91f5fcfc9ddc429b18febb78b825c2e803b95bef
galilio/qindie-gl
/src/d3d_blend.cpp
C++
cpp
7,374
no_license
/*************************************************************************** * Copyright (C) 2011-2012, Chain Studios. * * This file is part of QindieGL source code. * Please note that QindieGL is not driver, it's emulator. * * QindieGL source code is free software; you can redistribute it and/or * modify it under t...
104e9bf9dd877c5137c7a79115670f7892b624f8
75039ca5a69c7ce1e6d7157bf269e3a812465a3a
ParadoxGameConverters/Vic2ToHoI3
/Vic2ToHoI3/Source/V2World/V2Leader.cpp
C++
cpp
1,692
permissive
/*Copyright (c) 2019 The Paradox Game Converters Project 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, mer...
9736322808c1a79d8ae1132a28e956baf6bb72e7
1c19b3cc00e71272880f329d99be73888c5aec09
lintaoqm/dreamfarmgdk
/Source/third_party/boost_1_44_0/libs/wave/samples/custom_directives/custom_directives.hpp
C++
hpp
3,458
permissive
/*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library http://www.boost.org/ Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0...
517b85972c3a6d02443ee920920b5fe84a79b394
ddddd5bbfb4058b10d6cb21f69216b5fd5940e21
LiamKapeel/chromium
/chrome/installer/util/additional_parameters.cc
C++
cc
11,697
permissive
// Copyright 2021 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/installer/util/additional_parameters.h" #include <windows.h> #include "base/check.h" #include "base/notreached.h" #include "base/string...
47a234d6ff29fb5917b29bfd62250500c656316a
30c4a45c072e6d060e01cfd75702a05ebcd2013f
rodea0952/competitive-programming
/AtCoder/Informal/pakencamp-2019-day4/A.cpp
C++
cpp
1,088
no_license
#pragma GCC optimize("O3") #include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include...
d759a19acbc0d0ee00f68899e113a6ae7e1d43c4
061895509bdbb7afa10c5b3426b51cd834f0dde8
aristotle9/qt_generator-output
/qt_widgets/c_lib/src/qt_widgets_c_QLineEdit.cpp
C++
cpp
10,324
no_license
#include "qt_widgets_c_QLineEdit.h" QLineEdit* qt_widgets_c_QLineEdit_G_dynamic_cast_QLineEdit_ptr(QWidget* ptr) { return dynamic_cast<QLineEdit*>(ptr); } QLineEdit* qt_widgets_c_QLineEdit_G_static_cast_QLineEdit_ptr_QObject(QObject* ptr) { return static_cast<QLineEdit*>(ptr); } QLineEdit* qt_widgets_c_QLineEdit...
02ca22fe2dd56fab7ba0275b98f9f74fd13b5ea3
e8d6d78d4668582116f2e65a3dc6ba4b19c85041
gorangrubic/UtilityComponents
/src/GainSlider.cpp
C++
cpp
2,551
no_license
#include "UtilityComponents/GainSlider.hpp" #include "UtilityComponents/Lerp.hpp" #include "juce_audio_basics/juce_audio_basics.h" namespace gain_transform { static const auto skew_factor = std::log(0.5) / std::log((-10.0 - db_minimum) / (db_maximum - db_minimum)); double db_gain_to_proportion(doubl...
c6d59cea44924e9e825a3fa677263b0e991bdb53
32ce8ac832b325d196126c30dabbeb84c3a9975e
Toinoux/Epitech
/cpp_indie_studio/src/Object/ABomb/ABomb.hpp
C++
hpp
1,431
no_license
// // EPITECH PROJECT, 2018 // ABomb // File description: // Abstract // #pragma once #include <utility> #include <string> #include <vector> #include <unordered_map> #include <memory> #include "Object/AObject.hpp" #include "Character/ACharacter.hpp" #include "Object/APowerUp/APowerUp.hpp" namespace bbm { class ABomb...
43f426ab9bca2bf2b61a2c505ead3637badbcd7d
affe23b9f155517502364837219132e480be1412
Doelia/Xmlia
/Projet/Xmlia/texthighlighter.cpp
C++
cpp
3,216
no_license
/*=============================================== * nom : texthighlighter.cpp projet : xmlia *=============================================*/ #include "texthighlighter.h" using namespace std; TextHighLighter::TextHighLighter(QTextDocument *parent) : QSyntaxHighlighter(parent) { this->tabNumber = 0;...
104632376ea7f67e5026fb98ce9c4101d1fe63b9
258014800a3b28ba711d5b55d080b8ca69975d3d
jameslarrue/enzo-e
/src/Cello/mesh_Hierarchy.cpp
C++
cpp
7,300
permissive
// See LICENSE_CELLO file for license and copyright information /// @file mesh_Hierarchy.cpp /// @author James Bordner (jobordner@ucsd.edu) /// @date Tue Sep 21 16:12:22 PDT 2010 /// @brief Implementation of the Hierarchy class #include "cello.hpp" #include "mesh.hpp" #include "charm_mesh.hpp" //-----...
e467e4d8e7251c20a5e5542d7002a46147b367ab
ef5df9cb3f10310c1509c5673fac022995a7656b
0xABADCAFE/ancient-amigaos-exng2
/libsource/utilitylib/poll.cpp
C++
cpp
2,889
no_license
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // File: utilitylib/poll.cpp // Tab Size: 2 // Max Line: 120 // Description: Poll classes // Comment(s): // Library: utility // Created: 2007-04-07 // Updated: ...
d78a60d5a5a54e0dd8cad285127be90d34eae951
a0c45deec370029863614adeb5918f993dcf5501
Gi133/Honours-Project
/Angel/Infrastructure/Preferences.cpp
C++
cpp
7,440
no_license
////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2008-2014, Shane Liesegang // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistrib...
90dd20abcbf6c3aaae66db0d2273f8db12e42463
972c6fd9eb224a691a8a86c9b44a542bcb1822c5
alvaroufmg/silvver
/libsilvver_client/doc/cpp/simpleAbstractCamera.cpp
C++
cpp
653
no_license
#include <iostream> #include <vector> #include <silvver/silvverTypes.hpp> #include <silvver/abstractCamera.hpp> using namespace silvver; using namespace std; int main(int argc, char *argv[]) { AbstractCamera<Pose> camera(AbstractCameraUid(1,1)); CameraReading<Pose> reading; std::vector<Identity<Pose> >::iterat...
4ca6fb50b186c0a540b963eee4bdebcb4bc8a6bb
d713cac2ec82803f99832dcb379244674db51b00
seesealonely/leetcode
/disjoint-set/1202.SmallestStringWithSwaps.cc
C++
cc
2,470
no_license
/* You are given a string s, and an array of pairs of indices in the string pairs where pairs[i] = [a, b] indicates 2 indices(0-indexed) of the string. You can swap the characters at any pair of indices in the given pairs any number of times. Return the lexicographically smallest string that s can be changed...
f899165fc8eaf928076b55026cc89490c93a2bd7
eb0dad0f218a38fdeccd1002bddcdae04a2fd6a1
TeamVault/tauCFI
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-3840.cpp
C++
cpp
2,405
no_license
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 { bool ac...
312aa646e14c80870646e6d325a4c15473cd8a32
51558c35e53b4eb994d168e7ddcc678b538209dc
alexandraback/datacollection
/solutions_5731331665297408_1/C++/ah1926/main.cpp
C++
cpp
3,306
no_license
#include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <ctime> #include <cassert> #include <iostream> #include <iomanip> #include <fstream> #include <algorithm> #include <vector> #include <string> #include <stack> #include <queue> #include <unordered_map> #include <unordered_...
2eeffe6c3e8e4356a6381b440134d6178567515b
aa75537fda018b7da79b2c4624eeb97e25ce2fa6
DexianZhao/PhantomGameEngineV1
/PhantomEditor/ListBoxIcon.cpp
C++
cpp
5,962
permissive
/* 幻影游戏引擎, 2009-2016, Phantom Game Engine, http://www.aixspace.com Design Writer : 赵德贤 Dexian Zhao Email: yuzhou_995@hotmail.com Copyright 2009-2016 Zhao Dexian ------------------------------------------------------------------------------------------------- ------------------------------------------------------...
f29d9e612333eb254537aca2c18ca70f763c98da
52cd37dd47eb5c66b14a815f57e7ba94d257c6f8
dynnoil/gameproject
/Gun.cpp
C++
cpp
273
no_license
#include "stdafx.h" #include "Gun.h" Gun::Gun() : GameObject(Core::resourceManager.Get<Render::Texture>("Turret")) , _rotation(0.0f) { } float Gun::GetRotation() const { return _rotation; } void Gun::Rotate(float angle) { _rotation += angle; } void Gun::Move() { }
34f40c8c1c539276d758d389c2cf25e77c8e4a4e
afa64ed3837b0a189594525004efa11e7e307629
6Axel9/Protodev
/Source/Protodev/FluxCapacitor.cpp
C++
cpp
2,333
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Protodev.h" #include "Avatar.h" #include "GUI.h" #include "FluxCapacitor.h" //========================================== Constructor AFluxCapacitor::AFluxCapacitor() { Action = "The flux capacitor is broken, find a way to fi...
855dd0b34c3edadbbbbe6fe261dc9fa73b6ede52
5c926c7d50a2b359fc25f8319e5d88ff469042d4
daniel-levy/cpsc221
/pa2/stack.cpp
C++
cpp
1,938
no_license
/** * @file stack.cpp * Implementation of the Stack class. * */ /** * Adds the parameter object to the top of the Stack. That is, the element * should go at the beginning of the list. * * @note This function must be O(1)! * * @param newItem The object to be added to the Stack. */ template<class T> void Stac...
ecc3df301157dede2a65ed20cd43f9bed80c6ee7
2ad136df23fa098dcd5d344b254b4908191d91b2
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_1/ISA2+poonceonce+poacquireonce+poonceacquire.c.cbmc.cpp
C++
cpp
42,575
no_license
// 0:vars:3 // 3:atom_1_X0_1:1 // 4:atom_2_X0_1:1 // 5:atom_2_X2_0:1 // 6:thr0:1 // 7:thr1:1 // 8:thr2:1 #define ADDRSIZE 9 #define NPROC 4 #define NCONTEXT 1 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) char __get_rng(); char get_rng( ch...
f0968ec0fc6b47d525f87c67dcb764a1871f1298
f20e0737e271dbb142066730f10924b196578eda
massnetwork/mass-browser
/ui/events/keycodes/keyboard_code_conversion_android.cc
C++
cc
22,801
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/events/keycodes/keyboard_code_conversion_android.h" #include <android/keycodes.h> namespace ui { namespace { const int kCombiningAccent = ...
20219e1033697ad5dda417781fe735c25fa81bff
6e84d7b5ecd50eeafec0fb0da085ccd60dd1297d
agangzz/feature-extraction--serial-
/util.cpp
C++
cpp
1,042
no_license
#include "util.h" double difftime_ms(struct timeval finish,struct timeval start) { return (double)(finish.tv_sec-start.tv_sec)*1000+(double)(finish.tv_usec-start.tv_usec)*1.0/1000; } double sum(double *data,int length) { double s=0; for(int i=0;i<length;i++) { s+=data[i]; } return s; }...
e7087c636def760d0ed32e1e8cb849925e78256b
ad9de846b2bfd8ac5644d223731f218e15f10b39
gangwar1234/CP
/New_Codeforces/20.cpp
C++
cpp
1,557
no_license
#include <bits/stdc++.h> using namespace std; typedef long long lo; typedef vector<lo> vl; typedef vector<vl>vll; #define MOD 1000000007 #define all(v) (v).begin(), (v).end() #define debug(x) cerr<<#x<<" = "<<x<<endl; #define REPV(a, b, c) for (lo(a) = b; (a) < (c); (a)++) #define REP(a,b) for(lo i =(a) ;i<(b);i++) t...
1ad4d98bbc59191c6c4312883b80114f49ffa26d
58dfdc2a2c544d2ff997fc14a27275ec3bec972a
Witek-/filtracja_Warszawa
/filtracja8.cpp
C++
cpp
18,646
no_license
#include "poligon.h" #include "statystyka.h" #include <locale.h> //normalizacja prędkości //wszystkie prędkości w kierunku przejścia są dodatnie, a w przeciwnym ujemne //ujemne opóźnienie oznacza faktyczne hamowanie //pozycje też są normalizowane //dla kier POW oryginalnie prędkości są ujemne a opóźnienia dodatnie, po...
ea7774446b20807391fddf5ac3739d8ad4f81ceb
db73d5938f03b2bf5dd039ae83e8de25df5881aa
cwmagnus/bsf
/Source/Plugins/bsfRenderBeast/BsRendererView.cpp
C++
cpp
32,949
permissive
//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// #include "BsRendererView.h" #include "Renderer/BsCamera.h" #include "R...
c5a296a1ce3802754767273130422f66a558c01e
4d9c619fc0dc3ddbde81c90e33137bb84fa213bd
chenna1199/Data-Structures-Algorithms-Handbook
/Strings/Slowest-Key-1629.cpp
C++
cpp
3,143
permissive
// A newly designed keypad was tested, where a tester pressed a sequence of n keys, one at a time. // You are given a string keysPressed of length n, where keysPressed[i] was the ith key pressed in the // testing sequence, and a sorted list releaseTimes, where releaseTimes[i] was the time the ith key was // releas...
639aa717120f33f9a9fcc5baa7258dd7fc488ac4
2af9b193d2f195344e12def9dc7632f3a5f0fcc3
Zagoshipda/Algorithm
/boj/done/1958.cpp
C++
cpp
2,829
no_license
/* LCS 3 : LC-Subsequence of 3 strings https://www.acmicpc.net/problem/1958 optimizing space complexity https://www.acmicpc.net/source/20164195 (0ms) https://www.acmicpc.net/source/3044536 (0ms) */ #include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); co...
8973710aa21a118098c3a3cdab1f3cdee39b01e9
7e4f36c11bd51d4bc3b73cad9871d0a5699a5002
C00196266/3rd_Year_Project
/GroupProject/Group Project/src/MainMenu.cpp
C++
cpp
1,478
no_license
#include "MainMenu.h" MainMenu::MainMenu() { } MainMenu::MainMenu(sf::Font &thefont):Menu() { buttonsVector.push_back(std::shared_ptr<Button>(new Button(sf::Vector2f(600, 225), std::string("Play Game"), thefont, "assets/button.png"))); buttonsVector.push_back(std::shared_ptr<Button>(new Button(sf::Vector2f(600,...
99e44a28055b7da3b265e19456c67eba0ab7d01b
477633f664a5c20aca28452534864f32db7d0105
michaelbrave/System_Monitor_CPP
/src/CpuModule.cpp
C++
cpp
5,384
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* CpuModule.cpp :+: :+: :+: ...
70a9210f3e0f902217c902b9bb5b18e55409dcdc
2fdef0949edf1092d60c273c01c5e2a19db93167
Baconfu/Pavement
/paintstructural.cpp
C++
cpp
2,755
no_license
#include "paintstructural.h" PaintStructural::PaintStructural(QQuickItem * parent): QQuickItem (parent), m_lineWidth(1) { setFlag(ItemHasContents,true); } PaintStructural::~PaintStructural() { } QSGNode * PaintStructural::updatePaintNode(QSGNode * oldNode,UpdatePaintNodeData *) { QSGGeometryNode ...
58d99daf154a894fbe400af7c6be98dfdf1d7923
3d4603f62cb6c4b47111fe215797ea7b70ff76a2
yuzhishuo/cpp
/regular/test1.cpp
C++
cpp
409
permissive
/************************************************************************* > File Name: test1.cpp > Author: aoumeior > Mail: aoumeior@outlook.com > Created Time: 2018年02月25日 星期日 14时05分26秒 ************************************************************************/ #include <iostream> #include "status.h"...
2a67f26bbc4476a3d26c6d3e08a1f4c98f47dfc0
f5562dc6b79e12872aa21a386b423d657a0f986f
multifacet/ASAP
/src/mem/ruby/network/MessageBuffer.cc
C++
cc
15,658
permissive
/* * Copyright (c) 2019 ARM Limited * All rights reserved. * * The license below extends only to copyright in the software and shall * not be construed as granting a license to any other intellectual * property including but not limited to intellectual property relating * to a hardware implementation of the func...
6652df0d989090dd9bca02edab42abd5f7c067cd
0d26ebfc0a3fa9d776550c9bc40dada3a7355e50
MyCaffe/onnxruntime
/onnxruntime/test/providers/cpu/math/element_wise_ops_test.cc
C++
cc
72,992
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "gtest/gtest.h" #include "test/providers/provider_test_utils.h" #include "test/util/include/default_providers.h" #include "core/util/math.h" #include <algorithm> #include <cmath> namespace onnxruntime { namespace ...
fbd4cc6be327efff7c145d0d73240100ad61dd70
9a0602034322f20d4bfc34f9f37d4cdd4845130c
ji-one/algorithm-study
/baekjoon_study_wook/문자열/1786_dw.cpp
C++
cpp
1,207
no_license
//1786 찾기 /* 솔루션 봄 KMP 알고리즘 */ #include <iostream> #include <string> #include <vector> using namespace std; string t,p; int fail[1000001]; // fail(j) 접두사와 접미사가 일치하는 길이. vector<int> rst; int main(){ getline(cin,t); getline(cin,p); int n = t.size(); int m = p.size(); // 실패함수 구하는 법 ...
93941ab11eca0c3ff2624fad05dc582b65603819
514d0b7a73145d4ddd819f3f87c14c458baa2583
Sears-Tian/Laboratory
/MFC/CharsMap/CharsMap/CharsMap.cpp
C++
cpp
5,273
no_license
 // CharsMap.cpp: 定义应用程序的类行为。 // #include "stdafx.h" #include "afxwinappex.h" #include "afxdialogex.h" #include "CharsMap.h" #include "MainFrm.h" #include "CharsMapDoc.h" #include "CharsMapView.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CCharsMapApp BEGIN_MESSAGE_MAP(CCharsMapApp, CWinAppEx) ON_COMMAND(ID...
75ac3cc3840d8ce93a90ce2f36d229393ae06c95
2641ce28af25705c62083bc0e77a64832425b45a
AlessandroCermenati/LaboratorioSimulazioneNumerica
/es9/Minimize.cpp
C++
cpp
13,916
no_license
#include <iostream> #include <fstream> #include <ostream> #include <cmath> #include <iomanip> #include "Minimize.h" using namespace std; int main() { Input(); for(int a=1; a<=iterations; a++){ if(a%print == 0){ cout <<"Iterazione numero "<<a<<"/"<<iterations<<endl; } ...
0da027cfa342961869b6f4eee871ae212a6d9ac2
9688bd704f3917aa0ede2cced97577d43b4cd1b8
andreqi/programming
/SPOJ/NWERC11C.cpp
C++
cpp
902
no_license
#include <cstdio> #include <cstring> #define repn(i, a, b) for(int i=(int)a ; i <(int) b ; i++) #define rep(i, n) repn(i, 0, n) #define clr(x, y) memset(x, (y), sizeof x) using namespace std; const int MAXN = 100011; const int MAXT = 200011; int wei[MAXN]; int tree[MAXT]; int sum(int idx) { int ans = 0; while (i...
d707148f71546fa06129c4e5df077e87a87d7aa2
2c99002522d43549f909d3d38d42a9a378de5f83
olimpiadi-informatica/oii
/2010/nazionali/numeri/sol/sol_scema.cpp
C++
cpp
811
no_license
#include <cstdio> #include <cstdlib> #include <algorithm> #include <numeric> #include <vector> #include <cassert> using namespace std; #ifdef EVAL freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int main() { int S, N; assert(scanf("%d %d", &S, &N) == 2); vector<int> numeri(N); ...
26eed436bd699cd5c91625ae1f19152febbc3201
f18340f37d30ab285638a74b17b51bb86ffbbe99
OloieriAlexandru/Competitive-Programming-Training
/codeforces/1195D1.cpp
C++
cpp
712
no_license
#include <bits/stdc++.h> #define lld unsigned long long #define mod 998244353LL using namespace std; lld pows[20], ans, add; int x, n; vector<int>cif; int main() { scanf("%d",&n); pows[0] = 1; for (int i=1;i<=19;++i) pows[i] = pows[i-1] * 10LL; for (int i=1;i<=n;++i) { cif.clear(); ...
23c88688c5f463ffb4976385e561c5380fd56543
2d9ec87329e38122510dd58ecf2c83d529c87d9c
KU-t/Prac-Socket_Programming
/Chap5/Char 5 Server method/TCPServer_Variable.cpp
C++
cpp
6,684
no_license
/* TIME_WAIT 상태 : closesocket()함수를 호출한 소켓의 TCP 포트가 바로 파괴되지 않고 잠시 머무르는 상태 - 대략 5분정도 대기 */ #pragma comment(lib, "ws2_32") #include <winsock2.h> #include <stdio.h> #include <stdlib.h> #define SERVERPORT 9000 #define BUFSIZE 512 // --- Fixed // 소켓 함수 오류 출력 후 종료 - [프로그램 실행] void err_quit(const char *msg) { LPVOID ...
5353a343f496f1c0f67699b412791a17dfa3ecba
2adc383271bcf7618300855937ccb5379fecec02
tunip3/Xbox-ATG-Samples
/Kits/DirectXTK/Audio/WAVFileReader.cpp
C++
cpp
22,250
permissive
//-------------------------------------------------------------------------------------- // File: WAVFileReader.cpp // // Functions for loading WAV audio files // // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // // http://go.microsoft.com/fwlink/?LinkId=248929 // http:/...
8655f4e15036b610a27567269bfe28020e8966e8
ef1595f0a4b3a5401a94a25abcbb5cd62db95df5
vpuzyrev/diskpp
/core/quadratures/quad_generic.hpp
C++
hpp
13,784
no_license
/* * /\ * /__\ Matteo Cicuttin (C) 2016 - matteo.cicuttin@enpc.fr * /_\/_\ École Nationale des Ponts et Chaussées - CERMICS * /\ /\ * /__\ /__\ DISK++, a template library for DIscontinuous SKeletal * /_\/_\/_\/_\ methods. * * This Source Code Form is subject to the terms...
6a7101c6813c264ba8b32c6d0927012707e1af53
74749a6320aac8beeff4e287a9507c9686e2a7f5
qc2105/QHash
/test-QHash/tst_test0.cpp
C++
cpp
1,174
no_license
#include <QtTest> #include <QCoreApplication> #include <QString> // add necessary includes here #include "../hasher.h" class Hasher; class test0 : public QObject { Q_OBJECT public: test0(); ~test0(); private slots: void initTestCase(); void cleanupTestCase(); void test_calculateFileHash(); ...
62be2cb6dadb546c2f71218ad5dc82eca8ce4388
f48599c00eca65b6b6abd08857b5403f1654e630
RyanSwann1/ConnectV2-With-AI
/Board.cpp
C++
cpp
3,202
no_license
#include "stdafx.h" #include "Board.h" #include "GameLogic.h" Board::Board() { initBoard(); } void Board::initBoard() { std::vector<char> rows(ROWS, EMPTY); m_board = std::vector<std::vector<char>>(COLUMNS, rows); } void Board::display() { int rowText = 1; std::cout << "\n"; std::cout << "...
824dde4309565555814e121fc823ab4ff04002fe
8966ef3cf0c6a188002f721ac19d0dbf15ecb56c
jafo2128/powerkey-j1939
/powerkey_j1939.cpp
C++
cpp
4,017
no_license
#include "powerkey_j1939.h" void bounceFrame0(CAN_FRAME *frame) { PowerKeyPro0.receiveFrame(frame); } void bounceFrame1(CAN_FRAME *frame) { PowerKeyPro1.receiveFrame(frame); } POWERKEYJ1939::POWERKEYJ1939(int chan) { if (chan == 0) { channel = &Can0; } else { channel = &Can1; } for (int x = 0; x < 15; x...
b97c0d81f68e8c24b6b2f0d4a481ab53cd851efe
0cacca998bbe10fa7ef040fb63899226c749ed50
HiriczkoDavid/Info
/TOMBOS Fibonacci/main.cpp
C++
cpp
374
no_license
#include <iostream> using namespace std; int main() { int v[1000],n,i; cout << "n=" ; cin >> n; for ( i=2; i<=n; i++) { v[i]=v[i-1] + v[i-2] ; } for (i=0; i<n; i++) { cout << v[i] << " " ; } cout << endl; cout << "A fibonacci sor n. tagja" << v[n]...
5509f659da49cfb26bf8e4955074485ce5884af2
704dea4d6fe263253b2791286bc7e04a30d6bb1f
daniel-riehm/burn-out
/library/object_detectors/Templates/osd_recognizer_instances.cxx
C++
cxx
397
no_license
/*ckwg +5 * Copyright 2012-2015 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #include <object_detectors/osd_recognizer.txx> template class vidtk::osd_recognizer<vxl...
8779d24adbbee97506fc97a367911a0e32c570fd
741d1c97580a5d58e0f5d8d59a6889c910f85fd6
ptitSeb/freespace2
/src/hud/hudlock.cpp
C++
cpp
36,777
no_license
/* * Copyright (C) Volition, Inc. 1999. All rights reserved. * * All source code herein is the property of Volition, Inc. You may not sell * or otherwise commercially exploit the source or things you created based on * the source. */ /* * $Logfile: /Freespace2/code/Hud/HUDlock.cpp $ * $Revision: 193 $ * $Da...
beb8f7278179ec92be917eabec083e634664705a
6c703c90a08d3fa78b96c5d9576c1e6dcbed1141
dan-kerry/Spaceship
/drawing.cpp
C++
cpp
29,398
no_license
#include "drawing.hpp" #include "subdivision.hpp" //All materials used are standardised in array, to prevent repetition and ensure consistency float materials[11][5][4] = { //0: White Metal { {.1f, 0.1f, 0.1f, 1.f}, {.5f, 0.5f, 0.5f, 0.5f}, {0.8f, 0.8f, 0.8f, 0.5f}, {120.0f}, {0.0f, 0.f,...
b6a4407785b6f8b9639805fd9cff47ca03700150
b46c87f188045f7dac27fa6fa586938e0f49d13b
Nextdoor/envoy
/source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.cc
C++
cc
42,717
permissive
#include "source/extensions/filters/network/thrift_proxy/twitter_protocol_impl.h" #include "envoy/common/exception.h" #include "source/common/buffer/buffer_impl.h" #include "source/extensions/filters/network/thrift_proxy/buffer_helper.h" #include "source/extensions/filters/network/thrift_proxy/thrift_object_impl.h" #...