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
23d1f1c75bd298c5f65dc7047545a4470779de25
91761450e5e75b1f259dbc402fb1d9472e3c2ed1
lgl107u/ITCA-math
/c_mm35.cpp
C++
cpp
315
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> int main(void) { int input; while(cin >> input) { if( (input%4==0 && input%100!=0) || input%400==0) cout << "Bissextile Year\n"; else cout << "Common Year\n"; } return 0; }
67e75138717b9f370637b984af00e67fdadf3d7b
5cdfaee5fc71331f29bdfa683ddf42e8a6a03986
Dashark/Simd
/src/Test/TestSynetScale.cpp
C++
cpp
14,588
permissive
/* * Tests for Simd Library (http://ermig1979.github.io/Simd). * * Copyright (c) 2011-2020 Yermalayeu Ihar. * * 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, inclu...
81057bc9bd0ccf47ce4164778693055e046af4e9
8d647de051a92f3764a67f8e02af87f8675e03ef
PaddyReid/Scheduling_Simulator
/SchedulingSim/SchedulingSim/Job.hpp
C++
hpp
1,939
no_license
#pragma once #include <iostream> #include <string> #include <list> struct Jobs { std::string name; int arrival; int duration; float turnaround; float turnaround_1; float turnaround_2; float turnaround_3; float turnaround_4; bool operator <(const Jobs & playerObj) const { return arriv...
eeaec38d7a8598e551d7eb9c7f49649afa33cb2d
a29a88dedd7afbca37b7a4b33f908aaa2e9cfcd3
xrLil-Batya/gitxray
/xrStalkerOld/xrGame/attachable_item.cpp
C++
cpp
3,399
no_license
//////////////////////////////////////////////////////////////////////////// // Module : attachable_item.cpp // Created : 11.02.2004 // Modified : 11.02.2004 // Author : Dmitriy Iassenev // Description : Attachable item //////////////////////////////////////////////////////////////////////////// #include...
d8860042a4d4e91cca44c5bc1f4590c830526286
2d9bc21ac0bf2f451e3095d6771446cd065141a3
akhil14shukla/CP-Files
/LinkedList.cpp
C++
cpp
3,851
no_license
#include <iostream> using namespace std; template <typename T> class Node { public: T data; Node<T> *next; }; template <typename T> class LinkedList { private: Node<T> *first; public: LinkedList() { first = NULL; } // constructor LinkedList(T A[], int n); ~LinkedList(); ...
4019a528bcf5359eab35f31b5243fd6277268189
ca972cda92bdb7f7846789f0953910b342cbd07e
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function13829/function13829_schedule_43/function13829_schedule_43_wrapper.cpp
C++
cpp
1,263
no_license
#include "Halide.h" #include "function13829_schedule_43_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(128); Halide::Buffer<int32_t> buf01(128)...
00746b137a36a05f0fbb7c54bbcc5b80516b7d47
8ae3bd061833838337ab89db002b99efa476c9c5
lineCode/Avatar
/Avatar/CPostProcessEdge.cpp
C++
cpp
2,390
no_license
//================================================ // Copyright (c) 2020 周仁锋. All rights reserved. // ye_luo@qq.com //================================================ #include "CPostProcessEdge.h" #include "CEngine.h" /** * 初始化后处理对象 */ bool CPostProcessEdge::Init(int width, int height) { const char* edge = "\ unif...
f42a72442045dab56462fdd7f82e8eaf19701704
d089ab0ae98b621440570e17dbe98627edcc9bb5
Formlabs/tbb
/examples/graph/binpack/binpack.cpp
C++
cpp
14,124
permissive
/* Copyright (c) 2005-2019 Intel Corporation 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 la...
8dbbc492a4e23f213427f5e9ce87a7aa7df4101a
0634ea7a7606fcfbcfdc86009fba44e76e178145
bmtp-project/bmtp
/src/qt/askpassphrasedialog.cpp
C++
cpp
10,293
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2018 The BMTP developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-lice...
2a7f63d788f0478914da0bd8e6f26060d40ef275
403ea5aa47c1c41f66b986a85746e9fd4bdae4e3
ispras/webkit-aotc
/Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
C++
cpp
16,628
no_license
/* * Copyright (C) 2010 Apple 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: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
b71eaba9fa184bfb7a8a0771dfa6960473840073
5d9cac2b21caf6b48b616b918dd40ead1279b8e1
maxerMU/bmstu
/sem_04/cg/lab_08/figures.cpp
C++
cpp
4,520
no_license
#include <QPen> #include <math.h> #include "figures.h" void point::paint(QPainter &painter) const { painter.setPen(QPen(fg)); painter.drawPoint(x, y); } void line::paint(QPainter &painter) const { painter.setPen(QPen(fg)); painter.drawLine(p1.get_x(), p1.get_y(), p2.get_x(), p2.get_y()); QString ...
ca59e8f3b9fd837b143d8ed54bad6d52f696dbb5
9760b8bb2acbd8affae97791a3a2cbd666b16924
Try/OpenGothic
/lib/edd-dbg/include/dbg/throw.hpp
C++
hpp
2,820
permissive
// Copyright Edd Dawson 2012 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef THROW_HPP_1250_23062012 #define THROW_HPP_1250_23062012 #include "dbg/config.hpp" #include "dbg/impl/raise.hpp" #include <io...
947425baf0f5a632ff2013841beef9d0c9932e42
92d9cd3757f35281eb7ec253c694500be8c5098e
pablovela5620/CarND-Extended-Kalman-Filter-Project
/src/tools.cpp
C++
cpp
2,033
no_license
#include <iostream> #include "tools.h" using Eigen::VectorXd; using Eigen::MatrixXd; using std::vector; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { /** TODO: * Calculate th...
8cb6f0026b63d30a1f3cd18b075bd614855d96c1
fb7af2ec87f811b332faba446130b68e18077136
ciusji/simdjson
/tests/ondemand/ondemand_error_location_tests.cpp
C++
cpp
8,819
permissive
#include "simdjson.h" #include "test_ondemand.h" using namespace simdjson; namespace error_location_tests { bool array() { TEST_START(); auto json = R"( [1,2,3] )"_padded; ondemand::parser parser; ondemand::document doc; ASSERT_SUCCESS(parser.iterate(json).get(doc)); ...
4cdf49eaccec9b9ac0a9673332b45e60dd507603
c9a879f8a48bccaa9e4872084cc77833f0e9bf5d
DAPPNetworkLabs/edgeos
/wasm/processes/fstest/process.cpp
C++
cpp
600
permissive
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <math.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <syscall.h> #include <iostream> #include "../include/libedgeos.h" int main(int argc, const char **argv){ ...
600785841824307118e3264bfbc9633d07524b28
f11f9f55571ca1f92b10085c74e2229fb53c097f
aws/aws-sdk-cpp
/generated/src/aws-cpp-sdk-macie2/source/model/SeverityLevel.cpp
C++
cpp
1,656
permissive
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/macie2/model/SeverityLevel.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespac...
3283ab8e1369c648b88a0c494d74a5ae897717aa
cce455970c401c443dff3bc408d330bc10b8f0c9
Jakub-Golinowski/hpx
/hpx/lcos/async.hpp
C++
hpp
14,024
permissive
// Copyright (c) 2007-2017 Hartmut Kaiser // // 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) #if !defined(HPX_LCOS_ASYNC_SEP_28_2011_0840AM) #define HPX_LCOS_ASYNC_SEP_28_2011_0840AM #include <hpx/config.hpp> #...
98d4780aa7cbacbd7d5530afd4bc278de46269fa
9801c8fd1e79ade77da1932af6302344349e5912
TrellixVulnTeam/Knowledge_8K66
/CAcode/main.cpp
C++
cpp
1,612
no_license
#include <iostream> #include <string.h> #include <fstream> using namespace std; #define length 10 const int gs2[32] = { 5, 6, 7, 8, 17, 18, 139, 140, 141, 251, 252, 254, 255, 256, 257, 258, 469, 470, 471, 472, 473, 474, 509, 512, 513, 514, 515, 516, 859, 860, 861, 862 }; void PRNCodeGenerator(int SateNum,int *CA_Code...
d79ef353696ef21a71e52cface7541a4b9bc2129
7c4418cc5fad944fda7aea2f4fb2cadb109e6da4
phil65/pvr.vdr.vnsi
/src/VNSIData.cpp
C++
cpp
32,110
no_license
/* * Copyright (C) 2010 Alwin Esch (Team XBMC) * http://www.xbmc.org * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later vers...
de34ce89a761954fa46bffb562205df1bbdc7036
97609e86bf3acf2b84bf0dbe058d1a568371b4e1
davehorner/Prelude
/third_party/deqp/src/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp
C++
cpp
21,627
permissive
/*------------------------------------------------------------------------ * Vulkan Conformance Tests * ------------------------ * * Copyright (c) 2017 The Khronos Group Inc. * Copyright (c) 2017 Codeplay Software Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this fi...
75c82ae0ecd54f648ba316cdeaf2893b67b317ac
abffb5db7961d424666938476d8d4f2a6ecebe48
jouve/urbi
/sdk-remote/src/libuco/urbi-main.cc
C++
cc
1,278
no_license
/* * Copyright (C) 2008-2010, Gostai S.A.S. * * This software is provided "as is" without warranty of any kind, * either expressed or implied, including but not limited to the * implied warranties of fitness for a particular purpose. * * See the LICENSE file for more information. */ /// \file libuco/urbi-main....
2d7c9744ef4486c68fb7e18d877ba817ef25f636
8bf6e3fb3b301048797a0fc24ce5341b96a982df
gusanoloco/DungeonRun
/LD28/Map.cpp
C++
cpp
2,508
no_license
#include "Map.h" #include <stdlib.h> int Map::randomIntInRange(int min, int max) { return min + (rand() % (int)(max - min + 1)); } // this constructor can be used to generate a map with the // given rows and columns Map::Map(int rows, int cols) { generateMap(rows, cols); } // constructor calls delete map to rele...
83818ba4d078f2ed889988857efd659fe381def5
e7bf217629a924aad944bf053210f26e33dc47be
ChrMlg/-FP-_Laboratorio-05_00110219
/Archivos .cpp/F.FIBONACCI.cpp
C++
cpp
416
no_license
#include <iostream> #include <stdlib.h> using namespace std; int main(){ cout<<"programa de funcion de fibonacci:"<<endl; cout<<"digite numero de elementos:"<<endl; cout<<""<<endl; int a=0; int b=1; int c; int n=0; cin >> n; cout << "0, "; for (int i=0;i<n;i++){ c=a...
368b47f2964d69498e4fd0aa95b2aa7aa3e41bf9
9905643830ed3400010ea14bd1257479d91caa22
Ajay35/spoj
/big_mod.cpp
C++
cpp
319
no_license
#include <bits/stdc++.h> #define ll long long using namespace std; ll pow(ll a,ll b,ll c){ ll res=1; while(b){ if(b&1) res=(res*a)%c; a=(a*a)%c; b=b>>1; } return res; } int main(int argc, char const *argv[]) { ll a,b,c; while(cin>>a>>b>>c){ printf("%lld\n",pow(a,b,c)); } return 0; }
efa014c98832207c4e46fe47aaaf736f7773f0fa
bd6a5215e4cf54f267557183eeb9dcf370f132ad
tjdghks6033/SunghwanPF
/MapEditor/Framework/Renders/Texture.cpp
C++
cpp
13,789
no_license
#include "framework.h" #include "Texture.h" using namespace DirectX; vector<TextureDesc> Textures::descs; Texture::Texture(wstring file, D3DX11_IMAGE_LOAD_INFO* loadInfo) : file(file) { bool b = Path::IsRelativePath(file); if (b == true) this->file = L"../../_Textures/" + file; Textures::Load(this, loadInfo)...
a9fe2f1191cea98e0956f98a82c30aed8285ea0b
b70f9c6a531075dacdef7570a090c158e15a6b7b
LTNGlobal-opensource/bmsdk
/10.1/Win/DirectShow/Samples/DecklinkIngest/ClipList.cpp
C++
cpp
9,602
no_license
// ClipList.cpp : implementation file // #include "stdafx.h" #include "DecklinkIngest.h" #include "ClipList.h" //----------------------------------------------------------------------------- // CClipList //----------------------------------------------------------------------------- //-------------------------------...
d07ec8bc7fe6e1bfe46a4a8c6f00dfdf51a00fad
6b0e19cba6ab58b5ca6a1c8bb166aaa3ae8e9bdd
santalex/swoole-src
/src/network/socket.cc
C++
cc
20,816
permissive
/* +----------------------------------------------------------------------+ | Swoole | +----------------------------------------------------------------------+ | This source file is subject to version 2.0 of the Apache license, | | that is bundled wi...
f9527b8300449951f7f7ff2dc2079c78df4beef0
7737fd0d7681b5f3d7d245703a88683c1bda85fe
vladdumitriu01/RakNet-Slither.Io-Copy
/client/GameScreen.cpp
C++
cpp
2,735
no_license
#include "GameScreen.h" #include <sstream> extern Client * c; GameScreen::GameScreen() { cameraPosition.x = 0; cameraPosition.y = 0; } GameScreen::~GameScreen() { for (auto &p : players) { SAFERELEASE(p); } } void GameScreen::KeyDown(int keyId) { } bool GameScreen::Update() { //send a server an update of th...
43d8c849b9c51114f1d78e444048e987dca1ed4c
2f59baa13a078ef20edc78bb312765b741dfabc7
gyf821/chromium
/ash/system/tray_accessibility.cc
C++
cc
19,099
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 "ash/system/tray_accessibility.h" #include <memory> #include <utility> #include "ash/accessibility_delegate.h" #include "ash/accessibility_...
e3d0541de22954c72746359df446126d1914a0ef
d88c42229167301c215b66e368706c412caf9d9d
coodie/quant
/src/Quantizer.cpp
C++
cpp
4,112
no_license
#include "Quantizer.hpp" #include "KDTree.hpp" #include <iostream> class Solution { public: VectorType updateDistortion() { VectorType res = 0; #pragma omp parallel for reduction(+:res) for (size_t i = 0; i < trainingSet.size(); i++) { const auto &x = trainingSet[i]; const auto &c = codeVect...
1f3a3d91bb7011a8e9bfae7e02af394abcf86f85
9321c64a7e453f7759556de4a3a969e34028103d
cheng102e/CCF
/201809-2.cpp
C++
cpp
612
no_license
#include<iostream> #include<cstring> #include<cmath> using namespace std; int Num = 1000000; int time[1000000]; int main() { int n; cin>>n; int max=0; for(int i=0;i<Num;i++) time[i]=0; for(int i=0;i<n;i++) { int a,b; cin>>a>>b; if(b>max) max = b; for(int j=a;j<b;j++) t...
666b59d6cd9e9b9d8ffdaab5175a6d272745f715
ab80db4c4bcdeba8711619a00661ec37139f615f
joker-ht/backup-llvm
/lib/CodeGen/TargetInstrInfo.cpp
C++
cpp
49,257
permissive
//===-- TargetInstrInfo.cpp - Target Instruction Information --------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
213e9f12b2afaecbb876a1a119d60cd8f5daca47
badcfbecdc31ad7bf6d27b5eee802ad00a1c4ecd
zhangbo/lldb
/source/Interpreter/OptionGroupString.cpp
C++
cpp
1,983
permissive
//===-- OptionGroupString.cpp ----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===--------------------------------------------------------...
bed75d57c40d9aa5bcd3420c25d7c45205437478
912f5b5a9e324d04d086cb810605c139cb616074
zhengziqiang/todo
/shi/code/传类的数组.cpp
C++
cpp
668
no_license
/*============================================================================== > File Name: 传类的数组.cpp > Author: zzq > Mail: zhengziqiang1@gmail.com > Created Time: 2016年08月25日 星期四 10时11分13秒 ==========================================================================*/ #include<iostream> using namespa...
f06ec32537d16a942671f9a18d5f64261e6af756
eb5aefdafa49370aa65ed93e850c771926f0933d
jhaslowh/DG-2D_Ray_Casting
/src/UIValueSlider.cpp
C++
cpp
2,892
permissive
#include "UIValueSlider.h" UIValueSlider::UIValueSlider() : UITransitionObject() { down = false; hovered = false; sliderLoc = 0.0f; value = 0.0f; minValue = 0.0f; maxValue = 1.0f; sliderWidth = 16.0f; sliderHeight = 16.0f; width = 100.0f + sliderWidth; height = sliderHeight; sliderOriginX = 12.0f; sliderO...
21665ccd845937dc68113fcb1c7d5e2da0641985
f2d67495269b2386f6c578d2b5758fe60291763c
vreznov/codes
/ks7reader.cpp
C++
cpp
7,179
no_license
#include "ks7reader.h" Q_LOGGING_CATEGORY(s7reader, "s7reader") enum class reg_type //寄存器类型 { mBit = 0x01, mByte = 0x02, mWord = 0x04, mDouble = 0x06 }; KS7Reader::KS7Reader(QObject *parent) : QObject(parent) { KInit(); } int KS7Reader::cnnt() { int ret = clt.ConnectTo(_ip.toStdString().c_str...
7df1046550b795fee3d31b62f89f465c0cecd963
96822fd22ed947ad581cd093277e9ab768915d02
OpenWoS/ReMix
/src/randdev.cpp
C++
cpp
546
no_license
//Class includes. #include "randdev.hpp" //Required STD includes. #include <random> //Required Qt includes. #include <QDateTime> RandDev* RandDev::device{ nullptr }; std::mt19937_64 RandDev::randDevice; RandDev::RandDev() { randDevice.seed( static_cast<std::random_device::result_type>( this->getSeed() ) ); } ...
d69b88c1f62d033ddd9fda40f46d9a0f1645ede3
853a5daccd161c8b8f003bf0a2a43a11448d2fa8
fatmingwang/TestProject
/TestProject/Src/Core/Math/Collision.cpp
C++
cpp
22,324
no_license
#include "../stdafx.h" #include "Collision.h" namespace UT { //http://www.gamedev.net/community/forums/topic.asp?topic_id=501718 //float fTimeDelta = 0.016; // //object1.SetPosition(object1.GetPosition().x + int(float(object1.GetVelocity().x) * fTimeDelta), // object1.GetPosition().y + int(float(object1.GetVe...
d6baf1be1c6a3b7af0f66434e1aa91c61d2a47a4
57f6eaf5fb225be78ce072875a07cab301838ec9
yisunfc/tsinsen_basic
/a1083.cpp
C++
cpp
1,592
no_license
#include <iostream> #include <algorithm> #include <cmath> #include <cstdio> using namespace std; struct SortIndex { SortIndex() : index(100) {} int index; int row; bool operator<(const SortIndex &r) const { return index < r.index || row < r.row; } }; SortIndex non0[10]; double a[10][11], t[10][11], b[10]; int...
66a75f234f87e37cbabefcbaf5eb4302e551a264
ee391b615896f3ea37f7a1d1dc05b9997faeaf89
urmyfaith/ZLMediaKit
/src/Rtmp/RtmpProtocol.cpp
C++
cpp
28,510
permissive
/* * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved. * * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit). * * Use of this source code is governed by MIT license that can be found in the * LICENSE file in the root of the source tree. All contributing project authors ...
548cf94f95f9dd6c9c74932f34127696c8f8e8d6
8ee537096ee1bbc3adbdc7cb9b5f8d9ba9310686
laslauk/basic_rpg_exercise_UE4
/Source/MyProjectkk/Private/Critter.cpp
C++
cpp
1,947
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Critter.h" #include "Components/SkeletalMeshComponent.h" #include "Camera/CameraComponent.h" #include "Components/InputComponent.h" // Sets default values ACritter::ACritter() { // Set this pawn to call Tick() every frame. Yo...
88c02c76c86bf32445fcb43337aec2ac422a59f7
01027db06ca825b379f75ab7dba4b31a9b7e50e2
cyosp/MPA
/src/com/cyosp/mpa/api/rest/v1/Provider.cpp
C++
cpp
4,405
permissive
/* * Provider.cpp * * Created on: 17 April 2015 * Author: cyosp */ #include <com/cyosp/mpa/api/rest/v1/Provider.hpp> namespace mpa_api_rest_v1 { string Provider::URL_STRING_PATH_IDENTIFIER = "providers"; Provider::Provider(HttpRequestType httpRequestType, ActionType actionType, const map<string, ...
52da9399b2e1031a004dbf123199e2d1d3b01da5
be7ede1765202af8302301b537777afd4ba291e4
phani653/fresh-water
/clg_programs/stack/sortStack.cpp
C++
cpp
567
no_license
#include<bits/stdc++.h> using namespace std; void printStack(stack<int> s1){ while(!s1.empty()){ cout << s1.top() <<" "; s1.pop(); } cout <<"\n"; } stack<int> sortStack(stack<int> s1){ stack<int> s2; while(!s1.empty()){ int tmp= s1.top(); s1.pop(); while(!s2.empty() and s2.top()<tmp){ int ...
b8d872b1b9e46f9c18880b88e3849883b028a7a0
e421acfc9e751497442a589ee14ca2d6ee71e674
aditya0212jain/Slate
/src/transformations2D.cpp
C++
cpp
1,612
permissive
#include "classes.h" #include "primitive.h" #include<Eigen/Core> #include<iostream> #include<math.h> #define PI 3.14159265 using namespace Eigen; using namespace std; void view2D::translate2D(double x,double y){ Matrix3d trans2D; trans2D<<1,0,0, 0,1,0, x,y,1; int i; vertex2D* u; //vertex2D...
6d7f39560cda73ad85a70de3fe36f79c880a2b5c
427d592990b5b02f50eb18519a3530954f1be63f
DatabasesWorks/AvisionR---Windows-GUI-Application
/ARVision/log.cpp
C++
cpp
5,005
no_license
#include "log.h" #include "ui_log.h" #include "database.h" #include "manual.h" Log::Log(QWidget *parent, QString name) : QDialog(parent), ui(new Ui::Log) { ui->setupUi(this); QPixmap windowIconPix("/pixMap/eye.png"); QIcon windowIcon(windowIconPix); this->setWindowIcon(windowIcon)...
82eb081b038657bba4401f2e02b25b8a42081303
464065a0c417e8b656c3d3e50e41baa17044d438
brioche1703/VulkanLearning
/src/base/VulkanTools.cpp
C++
cpp
10,284
no_license
#include "VulkanTools.hpp" namespace VulkanLearning { namespace tools { std::string errorString(VkResult errorCode) { switch (errorCode) { #define STR(r) case VK_ ##r: return #r STR(NOT_READY); STR(TIMEOUT); STR(EVENT_SET); ...
8a359dab5e12b9534fdc46593d51f9822528694e
fed3053ae1b03867e88220ec8be1a3ce0eb6c1c2
mdpfeiffer/Ion-Core
/src/util.cpp
C++
cpp
41,319
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2017 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "util.h" #include "amount.h" #include "chainparams.h" #include "sync.h" #inc...
737fd4b8937f76c77c0663645105f1f9ebaf394e
5192b31e85a54ca1d181d4393b49d8d72604f1f8
littlebugyang/CPP_practice
/leetcode/solution/1382. Balance a Binary Search Tree.cpp
C++
cpp
7,175
no_license
#include <vector> #include <unordered_map> #include <algorithm> #include <cmath> using std::abs; using std::max; using std::unordered_map; using std::vector; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; class Solution { priva...
24312bb29cbebca5f862e2fc168e56d6354cedb8
874f4c20cebb2ef7d1260b79f691ab8dc51c45dd
Shivamy2/C-C-Projects
/PracticeArea/Array Operations/Programs/kth_min.cpp
C++
cpp
774
no_license
#include <bits/stdc++.h> using namespace std; int main() { //code #ifndef ONLINE_JUDGE freopen("D:/Projects/C(C++) Zone/PracticeArea/Array Operations/input.txt", "r", stdin); freopen("output.txt", "w", stdout); ...
f0eabc050f530b89e7ea2a2ec2d7640d8a9847b0
2634aa4a545fef71c6a7eb5726d6d267e83622a8
ZhouWeikuan/KingdomRush
/Classes/Soldier/DeathKnight.cpp
C++
cpp
4,548
no_license
#include "DeathKnight.h" #include "GameManager.h" DeathKnight* DeathKnight::createDeathKnight(Point point) { auto deathKnight = new DeathKnight(); if (deathKnight && deathKnight->init()) { deathKnight->setLocation(point); deathKnight->setMaxHp(250); deathKnight->setCurrHp(250); deathKnight-...
73f21bb019eba76ceeff59a8cc7e49245c3b2c8d
53d1aaf6aaa990db7c71057e849c8036b45a94c9
tdiliberto19/cpp-practice
/Starting_Out_Games_Graphics/Source_Code/Chapter 02/AverageScore/AverageScore/AverageScore.cpp
C++
cpp
586
no_license
#include <iostream> #include <cmath> using namespace std; int main() { double test1, test2, test3; // To hold the scores double average; // To hold the average // Get the three test scores. cout << "Enter the first test score: "; cin >> test1; cout << "Enter the second test score: "; ...
45c6b985163fcefcf479ac05d1bf0290f2b6e2eb
1ccfcb5eede08624b7a68db8eb14f08f39a50478
DarkC343/MyCPP
/Ch7/array_08.cpp
C++
cpp
1,195
no_license
// coded by DarkC343 // This code is showing the use of range-based for statement and reference method to modify it's elements. #include <iostream> #include <array> #include <iomanip> using namespace std; int main( int argc, char ** argv ) { /* IMPORTANT * - If we don't need to access subscripts of an array,...
f76e4d618e2bf5cd757091d7f4fd25cbea1760a3
ce3f8070754c22486d0ac57b188e9d29c24dfc67
mehranagh20/ACM-ICPC
/warmup/second-selective-icpc-local-iut/b/b.cpp
C++
cpp
1,362
no_license
//In The Name Of God #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<string> vs; typedef pair<int, int> ii; typedef pair<int, ii> iii; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<double> vd; typedef vector<vd> vvd; typedef vector<vv...
ce5cc1f6d069b926e6c871cbb42c95efee7c4735
3448ac8a54c3c32a5aa6236d480d5363ff416128
niansa/xtd
/src/xtd.forms.native.wxwidgets/src/xtd/forms/native/wxwidgets/system_information.cpp
C++
cpp
4,719
permissive
#include <wx/settings.h> #include <wx/frame.h> #if defined(__WXMSW__) #include <Windows.h> #undef max #undef min #endif #define __XTD_FORMS_NATIVE_LIBRARY__ #include <xtd/forms/native/arranged_direction_window.h> #include <xtd/forms/native/system_information.h> #undef __XTD_FORMS_NATIVE_LIBRARY__ using namespace xtd; ...
dd382204d69fc38f56e8c75ab1ee2561f6bfb512
4a4fb299ea006803505da0dbd3f080871ff704dc
TKLabStudio/C-plus-plus
/巨匠 2010/HW_04.cpp
C++
cpp
350
no_license
#include <stdio.h> #include <stdlib.h> #include <conio.h> int main() { int ch; scanf("%d",&ch); int en; scanf("%d",&en); int math; scanf("%d",&math); printf("\chinese grade is %d\n",ch); printf("\English grade is %d\n",en); printf("\Math grade is %d\n",math); system...
e22c0d84ed166bfdf57ddd3a378485cbcf21a0ac
a6787cf72a048701cb517746024d2e3bc3ac1fe8
cnsuhao/fcppt
/test/optional/combine.cpp
C++
cpp
1,400
permissive
// Copyright Carl Philipp Reh 2009 - 2016. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <fcppt/optional/combine.hpp> #include <fcppt/optional/object.hpp> #include <fcppt/optiona...
17a9e777a626d0f077cc3ce8c557a82fa2a9d520
3d64b514bad38668fd6c7b2a21c6abcc84debd14
shirecoin/shirecoin
/src/util.cpp
C++
cpp
42,997
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef WIN32 // for posix_fallocate #ifdef __linux__ #define _POSIX_C_SOURCE 2001...
124f3b85a6ddf8caab57fea88a07b34226fc521a
180d8014fd1b2720538d9ccb2124180fabef5cea
hitu1304/100DaysCodingChallenge
/Day-44/Smallest-Positive-missing-number.cpp
C++
cpp
429
no_license
/* Approach-> use hashtable to find the missing element.*/ int missingNumber(int arr[], int n) { int m=*max_element(arr,arr+n); int i; int h[m+2]={0}; for( i=0;i<n;i++) { if(arr[i]>=0) { h[arr[i]]++; } }for(i=1;i<=m+1;i++) ...
73f23da22667286324c1a1c54466c6daae5aa2e4
38903f5acb2ff4042c5c363cdea1860ad5a1dd61
MKesenheimer/tensorflow
/tensorflow/lite/kernels/activations_test.cc
C++
cc
31,277
permissive
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
42cca7e6ea271b617c11bf0fb5fc6805eafb277b
4aa10bd2bd3edb9c87faa456e64715fd550d9fe5
ShahjalalShohag/ProblemSolving
/codeforces/1355/B.cpp
C++
cpp
432
no_license
#include<bits/stdc++.h> using namespace std; const int N = 3e5 + 9; int a[N]; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while (t--) { int n; cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; sort(a + 1, a + n + 1); int ans = 0, cur = 0; for (int i = 1; i <= n; i++) { ...
d825e3f3047f4a643974585568ddf30498f0790d
860f50839abb61e83de40638ec17a3fbc0439e59
T71M/cpp_labs
/lab3/ex_1/ExpressionEvaluator.hpp
C++
hpp
509
no_license
// // ExpressionEvaluator.hpp // ex_1 // // Created by 71M on 30.08.2021. // #pragma once #include <stdio.h> #include "ILoggable.hpp" #include <string> using namespace std; class ExpressionEvaluator:public ILoggable { public: ExpressionEvaluator(); ExpressionEvaluator(int n); virtual double calculate() ...
86516fbbd743497e08008a68e0a02ef9483636b9
1537efe971ead7253631f9e8be664608f369f801
MLauper/AF_image-test
/AFImagetest.cpp
C++
cpp
2,986
no_license
// AFImagetest.cpp : Defines the entry point for the console application. // #include "stdafx.h" /******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: ...
790f766151d89f26f54b4ec1a1c2e3183bb7ff37
9a77f78456bcbb84eb2413db3ad7b74b135b53a8
enger/EngerLib
/datashenyang/ShenYangData.cpp
C++
cpp
9,295
no_license
#include "ShenYangData.h" #include <boost/threadpool.hpp> #include <boost/algorithm/string.hpp> #include <boost/lexical_cast.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/local_time_adjustor.hpp> #include <boost/date_time/c_local_time_adjustor.hpp> #include <algorithm> #include <gl...
e7f7650716ed24ba2f823dd8afe3722034c8bd79
e2f89a1b07ed1d3ef0e355dddb4247cb86df976c
hienmv/v8
/src/ppc/deoptimizer-ppc.cc
C++
cc
9,824
permissive
// Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/assembler-inl.h" #include "src/deoptimizer.h" #include "src/register-configuration.h" #include "src/safepoint-table.h" namespace v8 { nam...
1bd415b989c00b2c38f206e34fbd76af62dd2bf6
a166f318e05b2a563de177879c237cbc6a3552bf
QuickCharger/Qt
/demo/cbuildindlg.cpp
C++
cpp
5,761
no_license
#include "cbuildindlg.h" #include <QtGui/QtGui> #include <QtPrintSupport/QtPrintSupport> #include <QtWidgets/QtWidgets> CBuildinDlg::CBuildinDlg(QWidget *parent) : QWidget(parent) { displayTextEdit = new QTextEdit(tr("Qt Standard Dialog")); colorPushBtn = new QPushButton(tr("color")); errorPushBtn = n...
682eb7bc2b568f6ff187113788975f22b1fa9ab7
de0ca6f887c94cc1ea21f7ba6a14bd62677f35a4
capalvarez/xDelynoi
/xDelynoi/src/lib/polypartition.cpp
C++
cpp
41,559
no_license
//Copyright (C) 2011 by Ivan Fratric // //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, di...
71ce941f54ef8232998fd50ab657704d7eb31be8
7b111b49d217c624abd41b6949e6ca05c78238e9
DanOkoro17/SummerRepository
/Project_23-30.cpp
C++
cpp
1,301
no_license
#include <iostream> #include <stdio.h> #include <math.h> using namespace std; int main() { double budget = 150; double height; double width; double length; cout << "Your budget is: " << budget << "$" << endl; cout << "Enter wall height (feet): "; cin >> height; c...
5946eaffffe11d48e1111894ee975b9ec91d6758
f910b51a550de2fed67096cf751c19fd6a857ca7
marcelra/plingtheory
/TestSuite.cpp
C++
cpp
52,727
no_license
#include "TestSuite.h" #include "Exceptions.h" #include "GlobalParameters.h" #include "IPlotFactory.h" #include "RootUtilities.h" #include "TestMath.h" /// TODO: handle these items. bool checkTodos = false; //////////////////////////////////////////////////////////////////////////////// /// runCurrentDevelopmentTest...
c7a945f358549965448a9d3c11b3dc16693373a1
3e7524f3017c4a35f06c10819ad492639ac21a37
kyushucoin/KyushuCoinV1.0.2
/src/qt/signverifymessagedialog.cpp
C++
cpp
8,788
permissive
#include "signverifymessagedialog.h" #include "ui_signverifymessagedialog.h" #include "addressbookpage.h" #include "base58.h" #include "guiutil.h" #include "init.h" #include "main.h" #include "optionsmodel.h" #include "walletmodel.h" #include "wallet.h" #include <string> #include <vector> #include <QClipboard> Sign...
4f6ca0345cf5e5b998f7ac65a0f2c93eed4636bc
22d743fb316396a2f8ccabbc39103fadf2972065
BenJamesbabala/Trinity
/google_codec.cpp
C++
cpp
32,182
permissive
#include "google_codec.h" #include "docidupdates.h" #include <compress.h> #include <memory> #include <ansifmt.h> #pragma mark ENCODER void Trinity::Codecs::Google::Encoder::begin_term() { auto out{&sess->indexOut}; curBlockSize = 0; lastCommitedDocID = 0; prevBlockLastDocumentID = 0; hitsData.clear(); termDocu...
2160f36c9f098a97cc9013a54c1465719ccb240f
3e36466e781b853d2ab4726d71c0acfdea54cf93
FRCTeam1073-TheForceTeam/robot14
/Subsystems/Elevator.cpp
C++
cpp
3,674
no_license
#include "Elevator.h" #include "../Robot.h" #include "../Robotmap.h" #include "SmartDashboard/SmartDashboard.h" #include "LiveWindow/LiveWindow.h" static const double elevatorUpDft = 3.24; static const double elevatorDownDft = 2.02; static const double elevatorShootPosDft = 1.74; double Elevator::elevatorUp = 0.0; doub...
e0aabbb23365af5aedb1ecd78bc161b2594a1965
9870a686a2394f3757f2b9a3353337bdad50e1f8
aydanufuk/CPP
/oop/default_constructor_sample.cpp
C++
cpp
336
no_license
#include<iostream> using namespace std; class Rectangle { private: int length; int breadth; public: Rectangle() { length=1; breadth=1; } int area() { return length*breadth; } }; int main() { Rectangle r1; cout<<r1.area()<<endl; retur...
6fb3ec36a9ad293ef335a1bc6e2cb6438f4eb2b9
44c9f79c899cd838dd0dd1b6e79d426be8000733
Ajisaputrars/swift
/lib/Serialization/Serialization.cpp
C++
cpp
174,744
permissive
//===--- Serialization.cpp - Read and write Swift modules -----------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
2f6153558c5015feca36ffc07f9887b4ab07b923
fa0934494adc1909378f689d914bf83ab0fce07b
gamedevtech/Wendy
/include/wendy/Transform.hpp
C++
hpp
2,237
permissive
/////////////////////////////////////////////////////////////////////// // Wendy - a simple game engine // Copyright (c) 2005 Camilla Berglund <elmindreda@elmindreda.org> // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any // damages a...
4b81c541ea23ee9e430931ff29e3872f1f9af426
e38b8368f1eca1eeb1a7f563a61ef6f5d7ffa4dc
offjangir/Drone_Landing_PP
/PX4-Autopilot/build/px4_sitl_default/msg/topics_sources/ekf_gps_drift.cpp
C++
cpp
3,019
permissive
/**************************************************************************** * * Copyright (C) 2013-2016 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Red...
ac86cbffcedd2f165af36ecc067caa92e4b9fa95
0577b1b9b672b333a9ae85eb256acf5c13dd4707
David-Badiane/BigDaddyFMsynth
/Source/MyBandPass.cpp
C++
cpp
1,531
no_license
/* ============================================================================== MyBandPass.cpp Created: 27 May 2020 8:52:33pm Author: jacop ============================================================================== */ #include <JuceHeader.h> #include "MyBandPass.h" //=========================...
df7773b683a51ff590f25c964bf898b028a1fa0c
5813269a65f2073b3a8a996b4aefb03bdc43efa0
TaylanUB/higan
/higan/sfc/cartridge/cartridge.hpp
C++
hpp
3,253
no_license
struct Cartridge : property<Cartridge> { enum class Region : unsigned { NTSC, PAL }; auto sha256() const -> string { return _sha256; } auto region() const -> Region { return _region; } readonly<bool> hasICD2; readonly<bool> hasMCC; readonly<bool> hasNSSDIP; readonly<bool> hasEvent; readonly<bool> hasS...
13ce29cf7ed36753165cd7e5b4bce0126ee4f779
a10100e2ac6aa3b89236f24b6d9c5d3709b1d55b
Azalea-oz/GAZ
/GUI/src/CLOCK/clock.hpp
C++
hpp
370
no_license
#ifndef _CLOCK_HPP_ #define _CLOCK_HPP_ #include<windows.h> #include<string> #include<vector> #include"../SINGLETON/singleton.hpp" namespace AZ{ namespace GUI{ namespace CLK{ class CLOCK : protected SINGLETON::Singleton<CLOCK>{ public: CLOCK(); ~CLOCK(); GetTime(); ...
fdca24fe60fb35df95bfae881ecae886a4dbfa8b
2eb683b13f94ef23907c98cb3d7757695a1cddaa
jiangyinzuo/icpc
/exercise/vj/c.cpp
C++
cpp
817
no_license
// // Created by Jiang Yinzuo on 2020/5/30. // #include <cstdio> #include <algorithm> long long a[100009] = {0}; int main() { int n, s; scanf("%d %d", &n, &s); a[0] = 1; int t; int real_n = -1; for (int i = 1; i <= n; ++i) { scanf("%d", &t); a[i] = a[i-1] * t; if (real_n...
527c788f76ce7eb4ce05351221a38310b8867dcd
c9d146a475ab08989f736359acc5d44c203f4b0f
shoolic/wasmabi
/src/Compiler/Compiler.hpp
C++
hpp
497
no_license
#ifndef WASMABI_COMPILATOR_HPP #define WASMABI_COMPILATOR_HPP #include <string> namespace wasmabi { class Compiler { public: Compiler(std::string filename_, std::string target_, std::string wasiSysrootPath_, bool dumpAST_); void compile(); private: std::string filename; std::string target; std:...
7001818cb9f07bb52fe784a5b6555ca6a11b51e7
2d2eef9c24cca02508229fe67f78c202b382bae9
cmu-db/noisepage
/src/main/noisepage.cpp
C++
cpp
2,786
permissive
#include <csignal> #include <unordered_map> #include <utility> #include "common/managed_pointer.h" #include "gflags/gflags.h" #include "loggers/loggers_util.h" #include "main/db_main.h" #include "settings/settings_manager.h" /** * Need a global pointer to access from SignalHandler, unfortunately. Do not remove from ...
27ba1047d359926bd888b4a50b83324ab06476f7
5fada95531223a33ce8f94f1e8f56eed60200763
bartnowa/LO11
/Klasa2/Lekcja 024/main.cpp
C++
cpp
6,542
no_license
#include <iostream> #include <iomanip> #include <cmath> /* Niniejszy listing zawiera materiały do nauki na pierwszy duży sprawdzian z programowania pt: "Podstawy programowania". Zagadnienia skupiają się na: we/wy, zmienne, stałe, instrukcje warunkowe i iteracje. */ using namespace std; int main() { /* //Zad ...
70117b46854d95e0d4576427d9f1a55ed2943391
1c8fcebc2ff5fa2862f5c5f8595092e6cf01faba
newdeal123/BOJ
/Topological Sort(위상 정렬)/1516_게임 개발.cpp
C++
cpp
1,245
no_license
#include<bits/stdc++.h> using namespace std; int N; vector<int>adj[1001],ans,buildTime; bool visited[1001]; void dfs(int now) { if(visited[now]) return ; visited[now]=true; for(auto next:adj[now]) dfs(next); ans.push_back(now); } vector<int> dfsAll() { vector<int>time; memset(visited,...
c389433551b6004ad27a6ef3c8728b1adf5098ee
7389a21f12dff2bffd79fe6bd3ae79183cf846f9
syberia-project/platform_hardware_interfaces
/health/2.1/default/impl.cpp
C++
cpp
1,936
permissive
/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
d859841b306272f49a04fcc9e5134aa800d85d56
d27c4ceeab13ccf575480d6429e449133e68a4f3
jprendes/arrow
/src/expressions/IdentifierExpression.hpp
C++
hpp
559
permissive
/// (c) Ben Jones 2019 - present #pragma once #include "Expression.hpp" #include "lexer/Token.hpp" #include <memory> namespace arrow { class IdentifierExpression : public Expression { public: IdentifierExpression(long const lineNumber); std::shared_ptr<ExpressionEvaluator> getEval...
fefcd84e7aece1bbb1c8d0b45ade0f460b18af8c
0c5cc397d8b053fc0686729e267fd0a62ff79fae
BeeswaxIO/opentelemetry-cpp
/sdk/test/trace/tracer_test.cc
C++
cc
24,345
permissive
// Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 #include "opentelemetry/sdk/trace/tracer.h" #include "opentelemetry/exporters/memory/in_memory_span_exporter.h" #include "opentelemetry/sdk/resource/resource.h" #include "opentelemetry/sdk/trace/samplers/always_off.h" #include "opentelemetry...
21f433bd5e484e72a5451f6a06752b6d8fe809bb
d0b2a3e335fd32e589425c51581c11a54b32e0ce
shnst/Minecraft_CPP
/Minecraft/core/world/Entity.cpp
C++
cpp
284
permissive
// // Entity.cpp // Minecraft_CPP // // Created by Shun Sato on 8/17/18. // Copyright © 2018 ShunSato. All rights reserved. // #include "Entity.hpp" #include "AABB.hpp" Entity::Entity() { } Entity::~Entity() { } const AABB* Entity::getAABB() const { return aabb; }
3a313e77b333b65565d868c2bb08d2e127137865
b45c2f8358ab4374588baff39f065ccdbce72961
RadchenkoRV/SICP-1
/ch2/huffmantree_test.cpp
C++
cpp
877
no_license
#include <iostream> using namespace std; #include "huffmantree.h" int main() { vector<SymbolInfo> testSample; testSample.push_back(SymbolInfo("A", 8)); testSample.push_back(SymbolInfo("B", 3)); testSample.push_back(SymbolInfo("C", 1)); testSample.push_back(SymbolInfo("D", 1)); testSample.push...
bed28099c94dbbc060c5e7b45ad0f6463882da03
52f3f31d2a21009148e5498765e95aa81736dc47
coldGingerAle/HackerRank
/Algorithms/Implementation/lisaWorkbook.cpp
C++
cpp
1,557
no_license
/* The problem can be found at https://www.hackerrank.com/challenges/lisa-workbook */ #include <iostream> #include <vector> using namespace std; int main() { int chapters, maxProblems, specialProblems = 0; cin >> chapters >> maxProblems; vector<int> problems(chapters); for (int i = 0; i < c...
5ab25493108f5bff9e0c7119d2ab8b6021152c06
e356ceba14545571b6d43f85e44f61f43eae9e31
jacobottalam/COMP575_F2017
/MAS_Project/mobility.cpp
C++
cpp
18,995
no_license
#include <ros/ros.h> // ROS libraries #include <angles/angles.h> #include <random_numbers/random_numbers.h> #include <tf/transform_datatypes.h> // ROS messages #include <std_msgs/Int16.h> #include <std_msgs/UInt8.h> #include <std_msgs/String.h> #include <sensor_msgs/Joy.h> #include <sensor_msgs/Range.h> #include <geo...
261d3979356f8583d5daf923bcc9ef9d352645aa
dcfefa6fb5c58a9e3f3688f807e6d85ecb6b53c6
aris-koning/duckdb
/test/sql/simple/test_between.cpp
C++
cpp
5,150
permissive
#include "catch.hpp" #include "test_helpers.hpp" using namespace duckdb; using namespace std; TEST_CASE("Test between statement", "[between]") { unique_ptr<QueryResult> result; DuckDB db(nullptr); Connection con(db); con.EnableQueryVerification(); // test constant BETWEEN statement // simple between result = ...
22140d28d9526bf8f5d53094000a6c915968658b
d03aee4a73fb1216f1680e520c47f94d42282995
aidanlw17/ECE454_hw4
/randtrack_list_lock.cc
C++
cc
4,018
no_license
#include <pthread.h> #include <stdio.h> #include <stdlib.h> #include "defs.h" #include "hash_list.h" // Global constants #define SAMPLES_TO_COLLECT 10000000 #define RAND_NUM_UPPER_BOUND 100000 #define NUM_SEED_STREAMS 4 team_t team = { "LOL", /* Team name */ "Zexuan Wang", ...
feed569b0230e454f564afca827d9ece6e4b8d13
0e53b4997bbdc463e114fcfd16772071fb42a181
linmx0130/QtCubes
/mainwindow.cpp
C++
cpp
1,434
permissive
/* * mainwindow.cpp * Main window implementation. * * Copyright (c) Mengxiao Lin <linmx0130@gmail.com> * All rights reserved. * * This source code is licensed under the BSD license found in the * LICENSE file in the root directory of this source tree. */ #include "mainwindow.h" #include <QVBoxLayout> MainWin...
84e8a72cb70cd8f9130ebabdb335fcea30616d13
4f4160da5b2f367e4f6a1583609a4b1a59a909cc
ll1163993961/-MFCBank
/MFCBankDlg.cpp
C++
cpp
6,403
no_license
// MFCBankDlg.cpp : 实现文件 // #include "stdafx.h" #include "MFCBank.h" #include "MFCBankDlg.h" #include "afxdialogex.h" #include"AddDlg.h" #include"ChangeDlg.h" #include<fstream> #include<iostream> #include<list> #include<string> using namespace std; #ifdef _DEBUG #define new DEBUG_NEW #endif ...
769cabc4af623cab6df9fbf508e43358febbf050
71c9e57ac368e7ff13f5fda9db6db24ae3fd4803
djangdal/SocketCom
/helper.cpp
C++
cpp
662
no_license
std::vector<std::string> parse_messages(std::string buffer) { std::vector<std::string> messages; std::string message = ""; for (int i = 0; i < buffer.length(); ++i) { if (buffer[i] == '#') { // Message delimiter messages.push_back(message); message = ""; } else { message += buffer[i];...
444a989e80b5393ec5da5ac3675f997efe9a7f78
21de195b145e01baae048ca359305b354c23ea89
aristk/static-analyser
/src/analyzer/exceptions.hpp
C++
hpp
3,623
permissive
using namespace std; class notNFunctionDeclaration: public exception { const char* what() const throw() override { return "Root item is not NFunctionDeclaration."; } }; class NotNVariableDeclaration: public exception { const char* what() const throw() override { return "Argument of...
4326256627614c2174d8c0cd0001dc0ca862106a
f2c8610ffbd7a27b0e8eab8e5bec55c02000998b
Sornaensis/a3-realtimetactics
/RTS_Mode/RTS_defines.hpp
C++
hpp
775
permissive
#include "../RTS_Mission_Defines.hpp" #define RTS_Greenfor_Enemy east #define RTS_Greenfor_Green west #define RTS_Greenfor_EnemyColor [1,0.25,0.25,1] #define RTS_Greenfor_GreenColor [0.25,0.25,1,1] #ifndef RTS_SingleCommander #define RTS_SingleCommander false #endif #ifndef RTS_Spectator #define RTS_Spectator fals...
29dcb9a8ec9ca76e90756c30de41fee37ae074d7
21f5ef16fd12cde9839e610281fb3238b09822b1
scottxu77/Youtube
/eclipsec++/eclipsec++02/src/eclipsec++02.cpp
C++
cpp
449
no_license
//============================================================================ // Name : eclipsec++02.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #incl...
cd419bd21ab5b77987050d8d6f2cfdace1f46ad1
e402d4fa196da9e85cabbbf2a8d382756fd002e9
GaelReinaudi/LabExe
/src/Sequencer/GInstruction.cpp
C++
cpp
549
no_license
#include "GInstruction.h" #include "GChannel.h" #include "GChannelGraphicsItem.h" #include "GInstructionGraphicsItem.h" #include "GObjectFactory.h" G_REGISTER_IN_FACTORY_WITH_PARENT_TYPE(GInstruction, GSynchEvent) GInstruction::GInstruction(GSynchEvent* parentEventSynchro, GChannel* pAssignedChannel /*= 0*/) ...
685d93f1e34c75ed9677cc0674bb5f3ac1c37a4b
3e0a39d065523dbe20a098c0272d8943e3905493
DekareDreik/ShootThemUp
/Source/ShootThemUp/Private/Weapon/STULauncherWeapon.cpp
C++
cpp
1,213
no_license
// Shoot Them Up Game. Created by DekareDreik #include "Weapon/STULauncherWeapon.h" #include "Weapon/STUProjectile.h" #include "DrawDebugHelpers.h" #include "Kismet/GameplayStatics.h" void ASTULauncherWeapon::StartFire() { MakeShoot(); } void ASTULauncherWeapon::MakeShoot() { if (!GetWorld() || IsAmmoEmpty()) re...