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 |
|---|---|---|---|---|---|---|---|---|
dccc3c90aa7da2761934cd77a5ff03d73e38271c | 05027570dcb1aee950932639d018d0095ab21fa4 | muren400/muren_modular | /uhr/src/ClockMultiplier.cpp | C++ | cpp | 733 | no_license | #include "ClockMultiplier.h"
ClockMultiplier::ClockMultiplier() {
}
ClockMultiplier::ClockMultiplier(int multiplier, int outputPin) : ClockPart(outputPin) {
this->multiplier = multiplier;
}
void ClockMultiplier::executeStep() {
if (isInitialized() == false) {
return;
}
setHigh();
milliSe... |
6ccee1a895be4d500908ec8e3a75bc58550f35ed | daf6b399ba1d0c1a25b0814cac8226d4927559e3 | mohilkhare1708/Competitive-Programming | /Codechef/marchlong2020/CHPINTU.cpp | C++ | cpp | 633 | no_license | #include <bits/stdc++.h>
#include <assert.h>
#include <iostream>
#define ll long long int
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
for (int u = 0; u < t; u++) {
int m, n;
cin >> n >> m;
int f[n], p[n], total[m];
memset(total, -1, sizeof(total));
... |
5592088c5a3561370885e6c23931d0e7429e6343 | d5bb97805375e5bc664ba315758d642f0fdeaed5 | redscarf2/sinstar_client | /skineditor/CPropertyGrid_Src/CPropertyGrid/PropertyGridItemFlagBits.cpp | C++ | cpp | 7,478 | permissive | #include "stdafx.h"
#include "PropertyGridInplaceEdit.h"
#include "PropertyGridInplaceButton.h"
#include "PropertyGridInplaceList.h"
#include "PropertyGridItem.h"
#include "PropertyGridItemFlagBits.h"
#include "PropertyGrid_DrawHelpers.h"
// 标志位的分隔符
const TCHAR FLAG_BITS_SEPARATOR = _T('|');
////////////////////////... |
afb1f5c1695780516632d9f96b75034494a30b1c | 1674805d409a0b9535a63f3588abe516625e7d24 | Algospecial/practice | /week1/basic/bfs_16397/whaeun25_16397.cpp | C++ | cpp | 1,507 | no_license | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
int visited[100000] = {0, };
queue<pair<int,int>> num;
int n, t, g;
int button_b(int x){
int result = 0;
int alpha = 10000;
result = x * 2;
if(result > 99999){
return -1;
}
... |
093ed4783ece14eeeb28c70e0a116f3d0d0de130 | 1b6c29f133b76e5613476926dd8394fad4e223ad | YutaTachibana0310/taiyo3Dgame | /camera.cpp | C++ | cpp | 4,381 | no_license | //=============================================================================
//
// カメラ処理 [camera.cpp]
// Author : GP11A_341_22_田中太陽
//
//=============================================================================
#include "camera.h"
#include "player.h"
#include "input.h"
#include "debugproc.h"
//****************... |
62676c3ccafb591e95beb3a59c52349e58f7aeaf | 3141865ae6e06bf9d3e5893fcfcbda1c1ba434c9 | pbridd/RobotSoccer | /computer/vision/src/vision/src/Robot.cpp | C++ | cpp | 9,557 | no_license | //============================================================================
// Name : Robot.cpp
// Author : Luke Hsiao, Clover Wu
// Version :
// Copyright : Copyright 2015 Team Vektor Krum
// Description : Implementation of Robot methods
//============================================================================... |
d42260dfbf2f731c007e8e419bc5e15f7f3ef3ec | 0f8956b4a186b16807d840265fb27808e0fcf090 | Simeonone/Desktop-Application-project | /build-Project001-Desktop_Qt_5_1_0_MinGW_32bit-Debug/debug/moc_dero.cpp | C++ | cpp | 2,554 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'dero.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.1.0)
**
** WARNING! All changes made in this file will be lost!
**********************************************************... |
2e57d05e25eb3a4e9a10783b6c518695c1fdaef4 | 984da3ffbf5fc4627f1ae0b62e7c410dff78da14 | EvAn-HuAngBiu/Leetcode | /LeetCode-CPP/363.cpp | C++ | cpp | 1,366 | no_license | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
class Solution {
public:
inline int max(int a, int b) {
return a > b ? a : b;
}
int subMax(const vector<int>& arr, int k) {
int m = INT_MIN, sum;
for (int i = 0; i < arr.size(); ++i) {... |
2ccd5e41d94187d9c0eb26e3ad984cb216ec2444 | 4b19e10712e343db68b5639b90c8d4b74d3b4505 | hsuloong/leetcode-solutions | /1453. Maximum Number of Darts Inside of a Circular Dartboard/1453_solution.cpp | C++ | cpp | 4,557 | no_license | #include <iostream>
#include <vector>
#include <utility>
#include <cmath>
#include <algorithm>
#include <limits>
using namespace std;
class Solution {
public:
int numPoints(vector<vector<int>>& points, int r) {
const auto problemSize = points.size();
std::vector<std::vector<int>> dpArray(problemSi... |
37e1020f37d6ece036d940b566de35cfcc65b815 | 6901166382e88b648da2f328d6737279b4c2e120 | windcry1/My-ACM-ICPC | /CodeForces/1287 B.cpp | C++ | cpp | 2,112 | permissive | /*************************************************************************
>>> Author: WindCry1
>>> Mail: lanceyu120@gmail.com
>>> Website: https://windcry1.com
>>> Date: 12/30/2019 11:03:37 PM
*************************************************************************/
//#pragma GCC optimize(3)
//#pragma GCC diagnostic ... |
45b1ab9a76f3626aa7d75f00b368408c2613ed1f | 819c2660c6ae932dabfd2cc21cded2d6fa800804 | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/boost/beast/http/write.hpp | C++ | hpp | 24,981 | permissive | //
// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// 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)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_... |
445fe1a0e6da3f904684b3ff7f5aa8db2dbc51f4 | 043c23c69d38bcbda821aa9186ee55a21ed545f0 | mcoder2014/myNotes | /sources/Leetcodes/src/153_find_minmum_in_rotated_sorted_array.cpp | C++ | cpp | 706 | permissive | #include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int findMin(vector<int>& nums) {
int len = nums.size();
int left = 0 ;
int right = len-1;
while(left < right){
int mid = (right + left)/2;
if(nums[mid] < nums[right]){
... |
05a4c5abe6cd7332cdd2fd0ab59c37a6d5f83e51 | c4349871e92c8735b0adec6fbc44068502ecae04 | ludamad/lanarts | /libs/net-lib/tests/util_tests.cpp | C++ | cpp | 576 | no_license | // Simple tests for utility classes
#include <SDL.h>
#include <lcommon/unittest.h>
#include "../impl/PacketQueue.h"
static int writer_thread(void* _queue) {
PacketQueue& queue = *(PacketQueue*)_queue;
for (long i = 0; i < 1000; i++) {
queue.queue_packet((ENetPacket*)i);
}
return 0;
}
TEST(packet_queue) {
Pac... |
7a366a24932e93998611d1ec8d9ac7474b7795c7 | 3d266aacc8ccbf69837c4781c2acc3c0aacc3cd9 | LiamNCAT/GameEngine | /lib/Nadia-CPP/Utils/String Handler/string_handler.cpp | C++ | cpp | 663 | no_license | //
// string_handler.cpp
// Nadia-CPP
//
// Created by Kwang Je Lee on 5/5/20.
// Copyright © 2020 Dean Lee. All rights reserved.
//
#include "string_handler.hpp"
string String_Handler::stringTrim(string& str)
{
string whitespace = " \n\r\t\f\v";
str.erase(0, str.find_first_not_of(whitespace));
str.er... |
7f1bd17e298e3ce17e53b43234e6577e0792d605 | d930a853297430ddd5f5561961a4ebfb0bd495d3 | AlessandroPdaSilva/Atividades_Estacio | /C++/Atividade 1/questao 4 dv5.cpp | C++ | cpp | 406 | permissive | #include <iostream>
using namespace std;
int main()
{
float n1,n2,n3,m;
cout << " nota dos alunos ";
cout << " digite a primeira nota do aluno " << endl ;
cin >> n1;
cout << " digite a segunda nota do aluno " << endl ;
cin >> n2;
cout << " digite a terceira nota do aluno " << endl ;
cin >... |
04f262d1437890e579c404dd346e7203a8ac96f9 | 71201fa5da1ff228119d32113dd62bb8f0c886a8 | TiffanyAnn/sst-elements | /src/sst/elements/zodiac/zrecvevent.cc | C++ | cc | 1,311 | permissive | // Copyright 2009-2018 NTESS. Under the terms
// of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2018, NTESS
// All rights reserved.
//
// Portions are copyright of other developers:
// See the file CONTRIBUTORS.TXT in the top level directory... |
e5c265f827f128ef0e083994adfcb427a1eddf80 | b3f9bd5b40eb7f870d53fbea5d4dbb3c16141473 | ChenWrenChen/apollo | /modules/canbus/vehicle/neolix_edu/protocol/vcu_vehicle_fault_response_201.cc | C++ | cc | 12,366 | permissive | /******************************************************************************
* Copyright 2019 The Apollo 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
... |
f785ba7a17aec3262dd3c57c15af08446113e924 | 3dc3986bac50fed4fec6270e2b3fdfa250924152 | Kbij/homecontrol | /Server/HomeControlTest/src/TimerTest.cpp | C++ | cpp | 1,626 | no_license | /*
* TimerTest.cpp
*
* Created on: Apr 2, 2018
* Author: koen
*/
#include "Comm/TimeListenerIf.h"
#include "Logic/Timer.h"
#include "Logic/SystemClockIf.h"
#include "Logic/SystemClock.h"
#include "gtest/gtest.h"
#include "glog/stl_logging.h"
#include "glog/logging.h"
#include <thread>
class TimeListenerStu... |
cd1bbc53921855deb0606f9ee1892043cf4023f9 | 6fb089e535c552f8402e67085fcb16de376e38e0 | jpl917/GeometricSLAM | /peac/AHCPlaneFitter.hpp | C++ | hpp | 40,026 | no_license | //
// Copyright 2014 Mitsubishi Electric Research Laboratories All
// Rights Reserved.
//
// Permission to use, copy and modify this software and its
// documentation without fee for educational, research and non-profit
// purposes, is hereby granted, provided that the above copyright
// notice, this paragraph, ... |
42696666f687b5a6dfa63e9339f510e327a444b5 | 2d0c9dc7840afe84bb76c132d1c76ec01a5b04c9 | mirek190/x86-android-5.0 | /vendor/intel/hardware/camera3hal/jpeg/EXIFMaker.cpp | C++ | cpp | 26,368 | no_license | /*
* Copyright (C) 2012,2013 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 l... |
4b5885fb3a3b573f7bf467901713bd9900bec8ae | ca46c181a4f846d0899dd1334a6677f432b94140 | QinGuo/Kinectv2Until | /Kinect2Sample-master/Sample/Body/Body.cpp | C++ | cpp | 7,303 | permissive | // Body.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
// This source code is licensed under the MIT license. Please see the License in License.txt.
// "This is preliminary software and/or hardware and APIs are preliminary and subject to change."
//
#include "stdafx.h"
#include <Windows.h>
#include <Kinect.h>
#include <opencv2... |
32219ef106373784e70d2653b90390f95816af7e | d330c3da2885026aae64dbe60f7d9ac8f5194ea7 | DrizztDoUrden/GPUtils | /Source/GPUtils/Private/ImageLoader.cpp | C++ | cpp | 5,820 | permissive | #include <GPUtils/ImageLoader.h>
#include <Async/Async.h>
#include <Engine/Texture2D.h>
#include <IImageWrapper.h>
#include <IImageWrapperModule.h>
#include <Misc/FileHelper.h>
#include <Modules/ModuleManager.h>
#include <RenderUtils.h>
// Change the UE_LOG log category name below to whichever log category you want t... |
b93cde16e8cbeef31829004af400c62e2a0ead5d | f9addb4eabbb5d49b76b00f2c16bf121b0cec344 | hajimehoshi/Catch | /projects/SelfTest/ApproxTests.cpp | C++ | cpp | 2,590 | permissive | /*
* ApproxTests.cpp
* Catch - Test
*
* Created by Phil on 28/04/2011.
* Copyright 2011 Two Blue Cubes Ltd. All rights reserved.
*
* 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 "catch.... |
b75ec6d02da2212d85dacadd6a57719db0cfef91 | 9ec8959ee7c4787163ffc3d6c155b0eae60f296d | Gamza-park/opencv_programing | /chapter3/3-1.cpp | C++ | cpp | 507 | no_license | #include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main()
{
Mat dstImage(512,512,CV_8UC3,Scalar(255,255,255));
rectangle(dstImage,Point(100,100),Point(400,400), Scalar(0,0,255),2);
line(dstImage, Point(400,100), Point(100,400),Scalar(0,255,0));
line(dstImage, Point(400,100),... |
8cd5198fd068e3bde96128985e0e37749ec66cae | 0ca9796f5c00c655c56fb2d46e279b070d785349 | cherudim9/SPOC | /SPOC18_cond.cpp | C++ | cpp | 2,339 | no_license | /*
thread work1: in charge of producing frames
thread work2: in charge of producing wheels
thread consumer: in charge of producing bikes, using two wheels and one frame
cur_frames: currently produced and not used frames
avail_frames: number of frames to produce until now (work1 will stop once this reduces to 0)
cur_w... |
fa7a72d5463ba823c88f364029955ccae1ca771b | 70ae179fdb0004ac219716efa1d388f1a5c4ba29 | xming/EBT | /src/main.cpp | C++ | cpp | 160,323 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "alert.h"
#include "checkpoints.h"
#include "db.h"
#include "net.h"
#incl... |
d2ce8ca32bcee7e652345b048b3d2a08ccbf0bfb | 65341e7dcc1804ae5655b8548a1157eac725d059 | elumenati/omnimap | /SourceCode/Source/renderType/OGL/omnimapShaderGL.cpp | C++ | cpp | 13,977 | no_license | // OmniMap Geometry Correction Libs
// (c)2006, 2007, 2010 Elumenati
#define MIRROR_BALL 1
#include <string>
#include <vector>
#include "omnimap.h"
#include <assert.h>
#include <math.h>
#include "tools/GLShader.h"
#include "Shaders/MirrorShaderFrag.h"
#include "Shaders/MirrorShaderVert.h"
#include "S... |
9a02fb2aabf6709f2d0de2d35c27fb4ca787557d | 2a9028d24184ce8246d935a6cee835593252094f | FingerKeyboard-jh-sm/FingerKeyboard | /src/Single Camera/Core/FkKeyButtonEventListener.cpp | C++ | cpp | 3,747 | no_license | /**
* @file FkKeyButtonEventListener.cpp
* @author 한성대학교 컴퓨터공학과 강진혁(jinhuk1313@gmail.com)
* @brief 키 버튼에 발생하는 이벤트에 대한 처리
*/
#include"FkPostProcessor.h"
FkKeyButtonEventListener::FkKeyButtonEventListener(FkHand* userHand_1,FkHand* userHand_2){
userHand[0] = userHand_1;
userHand[1] = userHand_2;
inputAvailable = true... |
6a2f45857aa715146ace876411c01b0abc95bffc | 0fc2d7fc20a8d77185c2a6c9d4dc730169d8778a | tiretrak/audioFX | /mdmaArbiter.cpp | C++ | cpp | 5,122 | no_license | /*
* MdmaArbiter.cpp
*
* Created on: Dec 10, 2017
* Author: Dean
*/
#include "mdmaArbiter.h"
#include "audioFX.h"
volatile struct mdmaJob MdmaArbiter::jobBuf[MAX_JOBS];
volatile struct mdmaJob *MdmaArbiter::head = MdmaArbiter::jobBuf;
volatile struct mdmaJob *MdmaArbiter::tail = MdmaArbiter::jobBuf;
volati... |
2e6f884581e82fd1274b931ba953bc25366a8c12 | 4d55b4288ed25001437b148f6c4503a690ca46b3 | sswroom/SClass | /src/Math/FFT.cpp | C++ | cpp | 7,617 | no_license | #include "Stdafx.h"
#include "MyMemory.h"
#include "Data/ByteTool.h"
#include "Math/FFT.h"
#include "Math/Math.h"
Bool Math::FFT::Forward(Double *complexData, UOSInt sampleCount)
{
if (sampleCount == 1)
return true;
if (sampleCount <= 0)
return false;
if (sampleCount & 1)
return false;
UOSInt... |
f6de5aea48f5b6dbe370a9c54c28d6162b9e21e7 | 00dab21fecbe4aac8a0a7863971c8c455851113c | azazel7/Compilation | /PrimaryExpressionIdentifierOperation.cpp | C++ | cpp | 1,952 | no_license | #include "PrimaryExpressionIdentifierOperation.hpp"
#include <stdexcept>
#include "StackSymboleTable.hpp"
#include "TypeOperationConversion.hpp"
const char PrimaryExpressionIdentifierOperation::dec = '+';
const char PrimaryExpressionIdentifierOperation::inc = '-';
PrimaryExpressionIdentifierOperation::PrimaryExpressio... |
03690d2d62b501f29c015f4aa7a1080e341fd1af | 63a725f84a9b6515b1ed22dce6a2108a3ed683fd | DivyaMunot/Geeksforgeeks | /Strings/Sum of numbers in string.cpp | C++ | cpp | 1,273 | no_license | /*
Given a string str containing alphanumeric characters, calculate sum of all numbers present in the string.
Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains a string containing alphanumeric characters.
Output:
Print the sum of ... |
09d87e0413e34dd6573c0cada7c335a4b010eb10 | 7ffeb81155f2f541455b4cd2f2919da0ffb9579d | mattvchandler/graph3 | /src/main.cpp | C++ | cpp | 2,630 | permissive | // main.cpp
// application start point
// Copyright 2018 Matthew Chandler
// 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
... |
fb66c2d1b8f322002ec8d8664d307a88b1372683 | a4ba6d78ba53f9e711b6c5010134ffc4eb3aea6b | lucbettaieb/witness | /witness/server/webcam/actions/calibrate.cpp | C++ | cpp | 1,769 | permissive | #include "witness/server/webcam/actions/calibrate.h"
#include <vector>
#include "witness/server/file_operations/file_operations.h"
namespace witness {
namespace server {
namespace webcam {
namespace actions {
Calibrate::Calibrate(std::shared_ptr<witness::webcam::Webcam> webcam,
const witness::ser... |
f29f7acdc16a7ec59e4de571be0e731d70190f7d | d5a58d43047d551e551552dc697f5434989247bc | robertd15/Apple-Bottom-Jeans | /Final Project/Final Project/Final Project.cpp | C++ | cpp | 12,883 | no_license | //Apple Bottom Jeans: A Database of Apple Computers over the years
//Manish Goel , CIS 22C Winter 18
//Group 1: Robert Dyer, Frankie Ranallo, John Le, Tran Nguyen, and Charles Canasa
//Final Project
//
//Main written by: Tran Nguyen
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream... |
ae368399201e2bde983d8ea325a79dc2a76c117a | 2bf37d658fdeb29e5353989b253e55f6a9c8824b | luada/GameEngine | /inc/boost/mpl/vector/aux_/at.hpp | C++ | hpp | 2,685 | no_license |
#ifndef BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED
#define BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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)
//
// See http://www.boost.... |
88e00fe6d0edc34d71e80e6d75a95890ee877533 | d89e4de58996673c6579b73f2bde99ac3665139a | chachabai/cf | /contest/1384/b1/b1.cpp | C++ | cpp | 845 | no_license | #include <bits/stdc++.h>
#define watch(x) std::cout << (#x) << " is " << (x) << std::endl
using LL = long long;
int main() {
//freopen("in","r",stdin);
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int cas;
std::cin >> cas;
while (cas--) {
int n, k, len;
std::cin >> n >> k >> len;
int d[n];
bo... |
cbca0a081538d44df62349e1ca035c331ec272ee | 6d6f3a7f0b8824769dfa4fdabc3f2f6a5f85d859 | Muskan4010/CPP | /string Algorithms/rollingHash.cpp | C++ | cpp | 603 | no_license | //rolling hash
#include<iostream>
#include <bits/stdc++.h>
#define lli long long int
#define mod 1000000007
using namespace std;
int getHash(string key){
lli value=0;
lli p=31;
lli p_power =1;
for(char ch : key){
value=(value+(ch -'a'+1)*p_power)%mod;
p_power=(p_power *p)%mod;
}
... |
c3d872a744a815d8bf2b41f16e5d8468cf61d95d | f52767d6fa44ec6d75a68dcc01b568477769a03b | opentreasury/upscale.bank | /tests/System/TimerTests.cpp | C++ | cpp | 7,982 | no_license | // Copyright (c) 2011-2016 The UpscaleCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <thread>
#include <System/Context.h>
#include <System/Dispatcher.h>
#include <System/ContextGroup.h>
#include <Sy... |
00034dfcad528ab3d2328402480d55b116a8ee51 | 1eefec1a974fafa8d939aa414f1fda690e0d4624 | whlizhongming2009/-OpenCV | /OpenCV/14周教程/week14_testproject/week14_testproject/还没有写/实验四:数据转换(cvtColor、convertTo).cpp | C++ | cpp | 496 | permissive | #pragma warning(disable: 4819)//warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
#include <opencv2\opencv.hpp>
#include <iostream>
#include <string>
using namespace cv;
using namespace std;
//懒得写了,自己看吧
//重点掌握cvtColor、convertTo这两个函数
int main()
{
Mat camera_img = imread("相机.JPG");
if (camera_img.emp... |
e549722e0ced166fbd5d451d26be30fdeec9855d | 9acaefe5379d5f88c8fb3725dced7a00058fc9bd | parsa/blaze | /blazetest/src/mathtest/operations/dvecdvecmax/VUbVHb.cpp | C++ | cpp | 3,995 | permissive | //=================================================================================================
/*!
// \file src/mathtest/operations/dvecdvecmax/VUbVHb.cpp
// \brief Source file for the VUbVHb dense vector/dense vector maximum math test
//
// Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
//
// T... |
96d010328c0de05fcec4cfb04840141e75e180bb | d22bcb52828911751e8f0f9f2b7e05a058526089 | git-yogesh/Practice | /Algorithms/Sorting/selectionSort.cpp | C++ | cpp | 456 | no_license | #include <bits/stdc++.h>
using namespace std;
int arr[999];
int n;
void sSort() {
int min;
for(int i=0; i<n; i++) {
min = i;
for(int j=i+1; j<n; j++) {
if(arr[min] > arr[j]) min = j;
}
swap(arr[i], arr[min]);
}
}
void input() {
for(int i=0; i<n; i++) {
cin>>arr[i];
}
}
void outpu... |
41fdea5d8ef639b5c67957ebcbc5a459a8fd8229 | 444a317d2caebe2e62b32f82de5ef91b0d803444 | moslisnas/RenderEngine | /OpenGL 4.3/Windows x86/RenderEngineV0.0/RenderEngineV0.0/Shader.cpp | C++ | cpp | 5,554 | no_license | #include "Shader.h"
#pragma region Constructor & destructor
/// <summary>
/// Constructor of <c>Shader</c> class.
/// </summary>
Shader::Shader()
{
this->file_path = NULL;
this->num_uniforms = 0;
this->num_attribs = 0;
}
/// <summary>
/// Destructor of <c>Shader</c> class.
/// </summary>
Shader::~Shader()
{
}
#prag... |
3ff2028e85d0c9a844f35d6bba3ec379aa9444c8 | de3f91a14afe163db5941524245175b0fe787c81 | andrewameri/ROS_Project_2_Ball_Chaser_Robot | /ball_chaser/src/process_image.cpp | C++ | cpp | 1,995 | no_license | #include "ros/ros.h"
#include "ball_chaser/DriveToTarget.h"
#include <sensor_msgs/Image.h>
//Define global client that can request services
ros::ServiceClient client;
//This function calls the command_robot service to drive the robot
void drive_robot(float lin_x, float ang_z)
{
//Request a service and pass velocitie... |
5d32454ee3f8772899922c8c6f801259848849da | 7b6c7c76a250ed41e15ec028b4f6eb5301d16456 | git-Charlie/ARK-SDK | /SDK/ARKSurvivalEvolved_ProjArrow_Tranq_TekBow_parameters.hpp | C++ | hpp | 886 | permissive | #pragma once
// ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_ProjArrow_Tranq_TekBow_classes.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Parameters
//-----------------------------------------------... |
9a947cf41674c6cb4f13fb7c8d21dcac4105f0da | c988398d0a8a14c9bb1a1885a6de65f7e0aab781 | Exr0nProjects/learn_cpp | /problems/cses/range/x_range_minimum_queries_i/main_range_minimum_queries_i.cpp | C++ | cpp | 2,493 | no_license | /*
* Problem range_minimum_queries_i (cses/range/range_minimum_queries_i)
* Create time: Tue 01 Dec 2020 @ 21:42 (PST)
* Accept time: [!meta:end!]
*
*/
#include <set>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <utility>
#include <cstring>
#include <iostream>
#include <algorithm>
#define ll l... |
fca36e10dd966ebdff6309e2b012de8094b7994c | 23adf87e359863d362f6bd0a3ac7878becc9a163 | ZhangYongChang/payroll-project | /src/payrollGUI/changenamedialog.cpp | C++ | cpp | 449 | no_license | #include "changenamedialog.h"
#include "ui_changenamedialog.h"
ChangeNameDialog::ChangeNameDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::ChangeNameDialog)
{
ui->setupUi(this);
}
ChangeNameDialog::~ChangeNameDialog()
{
delete ui;
}
int ChangeNameDialog::GetID() const
{
return this->ui->lineEd... |
62e8cbf06a39d2ab2b471db8a879b4a218d22bf3 | e16cca06313827f34c8b0cc4e74dc81595b01a45 | verloren-droom/cpp | /exercise/10_crazy_practice/copy/clock.cpp | C++ | cpp | 602 | no_license | #include <iostream>
#include "clock.h"
void Clock::SetTime(int a, int b, int c)
{
// 这里加不加this->都一样
a = this->hour;
b = this->min;
c = this->seconds;
}
void Clock::ShowTime()
{
std::cout << this->hour << " h " << this->min << " m " << this->seconds << " s." << std::endl;
}
Clock::~Clock()
{
s... |
f12cbd28a403cc6197516467d72cd783c6346874 | d03ef1214104ba53b04f087c39c0955c3c320bf5 | abiraja2004/daily-dose-of-code | /CPP/01_BankAccClass/main.cpp | C++ | cpp | 4,141 | no_license | /* ==================================================================
* A program to implement the bank account class with a/c holders
* name, number, a/c type, balance amount.
* ==================================================================
*/
#include <iostream>
#include <stdlib.h>
#include <string.h>
#d... |
4575747b397729c9dbbfe6e8c2aa6e27cad0084f | 1df523b11f7ccb5f977e898db5cc586d85dc257d | elklai/Systems-Programming | /ass1/src/Directory.cpp | C++ | cpp | 8,098 | no_license | #include "../include/Files.h"
#include <algorithm>
#include <iostream>
#include "../include/GlobalVariables.h"
using namespace std;//why does we need to include it when it already been included in files
Directory::Directory(string name, Directory *parent):BaseFile(name) , children(), parent(parent)
{
//children... |
db197b6260e2c0a9d26f7f4e10385e87cd7906be | 2672763566cbf9bfe20148ab1ec9633bf8590f6f | GeorgeZhuo/execise | /DM/project1/LR.cpp | C++ | cpp | 3,791 | no_license | #include "LR.h"
using namespace std;
// Initialize learning_examples, testing_examples from file.
LR::LR(const char* learning_dataset, const char* testing_dataset):
train_filename(learning_dataset), test_filename(testing_dataset) {
for (int i = 0; i < THETA_NUM; ++i) {
theta[i] = 1;
}
}
// Release... |
7a0727912d5170fe1c34f79ccd6bf3c60dd17f30 | d1dc9d79913e98b4b5b962180093739b7feef6ed | sillybowen/Heuristic | /hw6/bowen_prey.cpp | C++ | cpp | 238 | no_license | #include "bowen_prey.h"
Bowen_Prey::~Bowen_Prey() { }
void Bowen_Prey::output() const {
}
bool Bowen_Prey::isHunter() const { return false; }
Moveable::HuntPreyOutput Bowen_Prey::tryMove() {
return Moveable::HuntPreyOutput(1, 1);
}
|
8cdcfa145ab3abf78f288612d40456d033336d02 | 32b0c7dd61bd6c64f12ca70e9302170f661e9122 | sourajeetmohanty/Algos | /C++/include/algorithm/dynamic_programming/longest_bitonic_subsequence.hpp | C++ | hpp | 1,634 | permissive | #ifndef LONGEST_BITONIC_SUBSEQUENCE
#define LONGEST_BITONIC_SUBSEQUENCE
/*
Longest Bitonic Subsequence
---------------------
This algorithm finds the length of the longest bitonic subsequence in a sequence of numbers
Time complexity
----------------
O(n^2) where n is the number of elements in the initial list
Space ... |
91533710d21a71682b1796c7bc92829c51acbbbe | 3db3aa8bf204af47094abab53ff76e3ab913e386 | lijinbio/MMULT | /include/stan/math/prim/fun/autocovariance.hpp | C++ | hpp | 3,859 | no_license | #ifndef STAN_MATH_PRIM_FUN_AUTOCOVARIANCE_HPP
#define STAN_MATH_PRIM_FUN_AUTOCOVARIANCE_HPP
#include <stan/math/prim/fun/Eigen.hpp>
#include <stan/math/prim/fun/autocorrelation.hpp>
#include <stan/math/prim/fun/variance.hpp>
#include <vector>
namespace stan {
namespace math {
/**
* Write autocovariance estimates fo... |
458032497b8654b9ccfa376612db926527ec10f7 | 74ebf6e6586cd6f5bb876c5e988c912f79be58ba | zsfr/zhangshuo2 | /1.cpp | C++ | cpp | 8,262 | no_license | //这是一个用来给用户自测四则运算的程序
//需要用户自行输入题量,并填写答案,结果会显示正确题数
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
//结构体,编号,运算符,级别
struct symble
{
int _num;
char _sym;
int level;
}sym[4]={{0,'+',1},{1,'-',1},{2,'*',2},{3,'/',2}};
int chu(int a,int b)//除法
{
if(b!=0)
return a/b;
else
return (0);
}
//复杂运算函数
int comple... |
3c6c120d48e6c69a12f9a2d7a8ae55e1eadfa453 | f95a707d990ae439d5df8741a28ab9682bafb8b0 | jrood-nrel/amr-wind | /amr-wind/wind_energy/ABL.cpp | C++ | cpp | 6,309 | permissive | #include <memory>
#include "amr-wind/wind_energy/ABL.H"
#include "amr-wind/wind_energy/ABLFieldInit.H"
#include "amr-wind/wind_energy/ABLBoundaryPlane.H"
#include "amr-wind/equation_systems/icns/source_terms/ABLForcing.H"
#include "amr-wind/equation_systems/icns/source_terms/ABLMeanBoussinesq.H"
#include "amr-wind/equ... |
049a5e1772cf97aef4f499d8d389661496d23a95 | dc6eac1a0d246c07b8c2a34c7d278711771cf271 | G8XSU/ns3-pmipv6 | /ns-3.19/scratch/lena-x2-handover-measures-ipv6.cc | C++ | cc | 14,714 | no_license | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Fre... |
ed41ce56c2ad016786b3177300dde4dee67977a0 | 77c5933a03991cb66487fafbe88c8bc7753095f6 | MarcDumouchel/Mock | /PlaceDescriptorServiceTest.cpp | C++ | cpp | 1,375 | no_license | #include <gmock/gmock.h>
#include <iostream>
#include <string>
#include "PlaceDescriptionService.h"
#include "Http.h"
using namespace std;
using namespace testing;
class APlaceDescriptionService : public Test
{
public:
static const string ValidLatitude;
static const string ValidLongitude;
};
const string APl... |
27c019f5d01eeffd1332bd7d4f500ca14a72b283 | f68d2479f33bcf831aa498127a009cf37ab04e7e | jerrychen44/cci_algorithm_fundamentals_cpp | /Ch03-Stacks-and-Queues/3.3-StackOfPlates_FU_jerry/stacknode.hpp | C++ | hpp | 238 | no_license | #ifndef STACKNODE_H
#define STACKNODE_H
class StackNode
{
public:
StackNode(int data, StackNode *nextnode);
friend class Stack;
//private:
int data;
StackNode *nextnode;
};
#endif // STACKNODE_H
|
cd08ba8672e135a9034b8d7f132962ed20e91cbe | 7766e6d20c0ed288c0404dc7c9db6bb1a6c3e98f | leomeloo/C-language | /LISTA 4/Activity 3.cpp | C++ | cpp | 1,781 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
//Ler a altura e o sexo de 15 pessoas e mostrar as informaçoes abaixo:
//a) a maior e a menor altura
//b) a média de altura das mulheres e a dos homens.
//c) a quantodade de homens e mulheres em porcentagem.
int main()
{
char sexo;
float altura, ... |
18fc6a54edbd09781450ab9283f7a45fef1e74d6 | 07d5fe37d353db1bbdc7017b2646f6a14fdc5d8d | fakecoinbase/PivxLiteDevslashPivxLite | /src/test/test_zerocoin.cpp | C++ | cpp | 679 | permissive | // Copyright (c) 2017-2019 The PIVX developers
// Copyright (c) 2019-2023 The PIVXL developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#define BOOST_TEST_MODULE Zerocoin Test Suite
#define BOOST_TEST_MAIN
#include "... |
6f7a2f062ab6bb15313cc86fcc23ca2a225ba50a | adb2b08362f2976f43e470182571b227c152623b | smogpill/core | /src/math/collision/intersection/coIntersectRayCapsule_f.cpp | C++ | cpp | 5,845 | permissive | // Copyright(c) 2021 Jounayd Id Salah
// Distributed under the MIT License (See accompanying file LICENSE.md file or copy at http://opensource.org/licenses/MIT).
#include "math/pch.h"
#include "coIntersectRayCapsule_f.h"
#include "coIntersectRaySphere_f.h"
// PT: ray-capsule intersection code, originally from the old ... |
437e17bd0dba4bfe5d460cf026ace068020fd3e2 | ab8ffb264c4e4b9804a1b59cd675006a18776189 | WIZARD-CXY/pl | /leetcode/clonegraph_bfs.cpp | C++ | cpp | 1,292 | permissive | /**
* Definition for undirected graph.
* struct UndirectedGraphNode {
* int label;
* vector<UndirectedGraphNode *> neighbors;
* UndirectedGraphNode(int x) : label(x) {};
* };
*/
// bfs solution
#define UNode UndirectedGraphNode
class Solution {
public:
UndirectedGraphNode *cloneGraph(Undirected... |
9a95a75341fbaffafe4a68e2042396b1c207863a | cbf76ab91b791ef0009c3c892213e7c622ea8399 | yasharmaster/codemonkv2 | /stacks-and-queues/monk-and-prisoner-of-azkaban.cpp | C++ | cpp | 2,213 | no_license | #include <iostream>
#include <cstdio>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#define LOG(x) cerr << "*** " << x << " ***" << endl;
#define wi(x) what_is(x, '\n')
#define wisp(x) what_is(x, ", ")
#define what_is(x, terminator) cerr << #x << " = " << x << terminator;
typedef long long ll... |
0c1264d784838a89185b57e2e828e012c8ab7879 | 9618a379412a8761391ec5c6df0e1a4875a9874d | GBuella/ngraph | /src/ngraph/pass/opset1_upgrade.cpp | C++ | cpp | 28,674 | permissive | //*****************************************************************************
// Copyright 2017-2020 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://w... |
87d954613b2ec867962d7a99cd3b21e326afb404 | eb64dd8e217596759fdfb111d97d06d18dba4c6a | metalhacker/CityU-OJ | /278-Above-Average.cpp | C++ | cpp | 541 | no_license | //UVa 10370
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int cases;
cin >> cases;
while (cases > 0)
{
cases--;
int num;
cin >> num;
int cnt = 0;
double av = 0.0;
double* students = new double[num];
for (int i = 0; i < num; i++)
{
cin >> students[i];
av += students[i... |
2b7b44fcc46cdea2da0ebd2907e16918606aa9a9 | 08ec2aa29a80d82ba0fd8da9889e0338e28b0b16 | greshem/lmyunit | /lmyunit/compile_bench/MSrvCommUnit__RecvSocketFrameTemp/test.cpp | C++ | cpp | 315 | no_license | #include <unitcode/msrvcomm.h>
int main(int argc, char *argv[])
{
tagFrameHead OutHead;
char OutBuf [] = {
'A',
'B',
'C',
'D',
'\0'};
MSrvCommUnit::RecvSocketFrameTemp(
(long) 0,
&OutHead,
OutBuf,
4); //target call
return 0;
}
|
47ac4e6bb43b4a581785faa6734c123b8c16486f | 057d680dc62aa251ebb84e1e936d6f5d206e4e87 | henrical/CG | /OpenGL/Projects/projCGv2.0/projCGv2.0/Camera.cpp | C++ | cpp | 276 | no_license | #include <iostream>
#include "Camera.h"
Camera::Camera(double near, double far){
_near = near;
_far = far;
}
Camera::~Camera(){
}
void Camera::update(){
}
void Camera::computeProjectionMatrix(){
}
void Camera::computeVisualizationMatrix(){
} |
ae27941af00aaf70524e86a7281a5cabee329190 | 7e5207412dd85bbe70f69d8e57763f6cb2264f63 | justpwned/Tetris | /src/game.hpp | C++ | hpp | 1,878 | no_license | #ifndef GAME_HPP
#define GAME_HPP
#include "SDL.h"
#include "SDL_ttf.h"
#include "graphics\graphics.hpp"
#include "board.hpp"
#include "piece.hpp"
#include "stats.hpp"
#include "game_utils.hpp"
namespace core
{
class Game
{
private:
i32 m_gameWidth;
i32 m_gameHeight;
... |
641f7fd197fa609cef141e8d8c864f9c14c4d836 | cfd7a8890297c217c2655be067c669a1f4df4237 | OverDriveMC/leetcode | /WildcardMatching/recursion2.cpp | C++ | cpp | 1,875 | no_license | #include<bits/stdc++.h>
using namespace std;
/**
*剪枝回溯
*每次只回溯到最近的*
*/
class Solution {
public:
bool isMatch(string s, string p) {
int presp,press;
bool flag=false;
int i=0,j=0;
while(i<s.length()){
///不需要判断j是否超出长度
///假如判断的话可能j有一个*匹配了s的所有串、
///不会出现越界,匹配不了的时候会自动退出
... |
f87df5fbb19b0caf2b3eee4cdd2fc45656520225 | 85a5463e020cdebc6bf0df4ad58621613a36a018 | tejusadiga2004/mesa | /src/mesa/drivers/dri/i965/brw_fs.cpp | C++ | cpp | 106,221 | no_license | /*
* Copyright © 2010 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, pub... |
cd6a3cf02af43846500050164745a32fe7bd9f0f | b302d68e352d622da462d8a8c075b5141292016b | dawmlight/communication_nfc | /interfaces/native_cpp/nfc_standard/test/unittest/sdk-test/src/isodep_tag_test.cpp | C++ | cpp | 2,051 | permissive | #include "isodep_tag.h"
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "tag_data.h"
using namespace OHOS::nfc::sdk;
using namespace OHOS::nfc::reader;
using namespace testing;
class IsoDepTagTest : public ::testing::Test {
public:
virtual void SetUp() override
{
std::cout << " SetUpTestC... |
7066c4b26e2eb9af31125e2cdb8d9210e23055ef | 2dd7358286e412406d2dac8ef93c3a153af9b0d3 | apolloaotc/src | /unittests/block_timestamp_tests.cpp | C++ | cpp | 1,011 | permissive | /**
* @file
* @copyright defined in bes/LICENSE.txt
*/
#include <boost/test/unit_test.hpp>
#include <besio/chain/block_timestamp.hpp>
#include <fc/time.hpp>
#include <fc/exception/exception.hpp>
using namespace besio;
using namespace chain;
BOOST_AUTO_TEST_SUITE(block_timestamp_tests)
BOOST_AUTO_TEST_CASE(c... |
84dfd78bcb93f98c7f5025739765244e40bb6a29 | 56f5b386d8a52b0ea7c9b3428b3d8942a32d9b46 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14510/function14510_no_schedule/function14510_no_schedule_wrapper.cpp | C++ | cpp | 857 | no_license | #include "Halide.h"
#include "function14510_no_schedule_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> buf0(512, 256, 256);
init_buffer(buf0, (int32_t)0);
... |
70ab5a1bebf5918e52d0c0b99769571a1cfa056b | c61f997057801b78781b65aab6b08467058ba154 | akubera/dbxx | /src/exceptions.hpp | C++ | hpp | 252 | permissive | /*
* \file exceptions.hpp
* \author Andrew Kubera
* \date March 20, 2014, 5:21 PM
*/
#pragma once
#include <exception>
#include "namespace_macros.h"
CPPDB_NAMESPACE_BEGIN
class NoDriverException : public std::exception {};
CPPDB_NAMESPACE_END
|
94552478d63c887b74e75628c97c620d49c96e0c | 449b632687d661ad3c04d79701509f64751aee04 | adzhou/oragle | /WebKit/Source/WebCore/html/HTMLTrackElement.cpp | C++ | cpp | 12,464 | permissive | /*
* Copyright (C) 2011, 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condi... |
4b2ce44a41fb676151b2e0f84b2be92b13965367 | d5267cd045555159609a4c43b1aa71951690676c | rahulrawat09/Codeforces-Solutions | /1276A - As Simple as One and Two .cpp | C++ | cpp | 895 | no_license | #include<bits/stdc++.h>
#define ll long long
#define MOD int(1e8)
#define mp make_pair
#define sortv(v) sort(v.begin(),v.end())
#define pb push_back
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
//t=1;
cin>>t;
while(t--)
{
string s;
... |
b2f3a27c35c41a32c3cc45de2abadb9bc99a525b | d485b054f7599e4be8e562e6d2625af12223ddc6 | griels/kv_engine | /daemon/timing_histogram.cc | C++ | cc | 6,047 | no_license | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2015 Couchbase, Inc.
*
* 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
*
* ... |
73736870ff9471df6ecd2826d2c60e6fed0e831d | 503bbff7e75e35758e66761fd1e469a5c63b0fbe | tbronchain/school | /cpp/zia/Core/defines.hpp | C++ | hpp | 691 | no_license | #ifndef _ZIA_API_DEFINES_H_
#define _ZIA_API_DEFINES_H_
#define _BOF_ZIA_API_ namespace zia { namespace api {
#define _EOF_ZIA_API_ } }
_BOF_ZIA_API_
enum {
/*!
* \brief Fatal ERROR.
*
* FATAL ERROR, stop the current flow.
*/
ZIA_ERR = -1,
/*!
* \brief OK
... |
7bfa2831a06d19a9183fe296e00a74027ef71542 | 9f279f1ac95615233e3e699c9ec968c941a54901 | YoungForever222/CubismUP_3D | /source/operators/AdvectionDiffusion.cpp | C++ | cpp | 28,095 | permissive | //
// Cubism3D
// Copyright (c) 2018 CSE-Lab, ETH Zurich, Switzerland.
// Distributed under the terms of the MIT license.
//
// Created by Guido Novati (novatig@ethz.ch).
//
#include "AdvectionDiffusion.h"
#include "../obstacles/ObstacleVector.h"
#include <functional>
CubismUP_3D_NAMESPACE_BEGIN
using namespace ... |
94cb0bd7861ff6af87f17d1df3392b6cf563f02f | 32722cf5da9028dffb3d1ba1ed6bd474af54b858 | sehrawatsunny/Show_Binary_Tree | /main.cpp | C++ | cpp | 10,374 | no_license | #include <iostream>
#include <queue>
#include <cmath>
using namespace std;
int ndig(int n){ // Function to find the number of digits in a number.
int ans=0;
while(n){
n/=10;
ans++;
}
return ans;
}
class node{ // Data type of the Binar... |
58fda01eae0d3e26727f822c3724474c64219813 | 36746588e17d0db9842a9d9259d479406b1c9d70 | skakri09/FrozenEngine--as-delivered---school- | /FrozenEngine/Frozen Engine/CharacterObject.cpp | C++ | cpp | 769 | no_license | #include "CharacterObject.h"
// P U B L I C F U N C T I O N S
CCharacterObject::CCharacterObject(
std::string surfaceName,
std::string playerName/* = "noname"*/,
float PositionX /*= 0.0F*/,
float PositionY /*= 0.0F*/,
int HP /*= 1*/,
int DMG /*= 1*/,
float RunForce /*= 250*/,
float JumpForce /*... |
49c120adda5105d3ce89634f0e2eaa0edea91779 | ca3d704350e8c6ff93b30784daf77d2617e12573 | wrpaape/cmake_tutorial | /include/cmake_tutorial/cmake_tutorial.hpp | C++ | hpp | 2,512 | no_license | #ifndef CMAKE_TUTORIAL_CMAKE_TUTORIAL_CMAKE_TUTORIAL_HPP
#define CMAKE_TUTORIAL_CMAKE_TUTORIAL_CMAKE_TUTORIAL_HPP
// EXTERNAL DEPENDENCIES
// =============================================================================
#include "cmake_tutorial/cmake_tutorial_base.hpp"
#include <string>
template <typename T>
class Cm... |
0500d778833304b30c992b98dd0466537bc86528 | 6b901a5bf9543cdd2d07d696cd0e2bc7da609e61 | lvanderwall/LearnCpp | /tutorial_09_06/car.cpp | C++ | cpp | 550 | no_license | #include <iostream>
#include "car.h"
bool operator==(const Car &c1, const Car &c2)
{
return (c1.m_make == c2.m_make &&
c1.m_model == c2.m_model);
}
bool operator!=(const Car &c1, const Car &c2)
{
return !(c1 == c2);
}
bool operator< (const Car &c1, const Car &c2)
{
if(c1.m_make == c2.m_mak... |
9c49f484f11dd904488718962e5e5410de1f45a8 | 7e4b5aac611352250861183187dffc8e0b6462ee | zhaowen28/xag-core | /src/ripple/app/paths/Flow.cpp | C++ | cpp | 5,194 | permissive | //------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby ... |
1906e256cba76eb8d8ff14bde6e5f8b6f1da7639 | a91f9faef9dc8f78981e2e2017010078525d061e | WhiZTiM/coliru | /Archive2/d7/8d763e865a644d/main.cpp | C++ | cpp | 392 | no_license | #include <iostream>
#include <type_traits>
using namespace std;
template<typename T>
void f(T v)
{
cout << __PRETTY_FUNCTION__ << endl;
//typename remove_reference<T>::type x = v; // copy of v
auto x = v;
T y = v; // maybe copy of v; maybe a reference to x
++x; //increment local variable
++y;
}... |
03e75fd965bc1cab08c7028749fbfa9db94bc8e0 | e5ec5861e8cfecd987a9d307998be94fda797160 | fatihkurcenli/Learning | /englcon.cpp | C++ | cpp | 1,695 | no_license | //englcon.cpp
//kurucu fonksiyon ornegi,uye fonksiyon kullanarak nesneleri toplar
#include <iostream>
using namespace std;
class Distance //ingiliz uzunkluk olcüsü sinifi
{
private: //veriler
int feet;
float inches;
public:
Distance() : feet(0), inches(0.0) //kurucu fonksiyon argumani yok
... |
bbceb371b0c3591020ae43753459b242bd1d1a40 | 3213cbd2b44c0c105703bac9b5e9e82a66bbb6fb | anjrtz/bforce8583 | /4.0.8a/ISO8583Server/ISO8583IssuerGatewayFE/ISO8583IssuerGatewayFETCPProtocol.cpp | C++ | cpp | 2,510 | no_license | /*
MultiX Network Applications Development Toolkit.
Copyright (C) 2007, Moshe Shitrit, Mitug Distributed Systems Ltd., All Rights Reserved.
This file is part of MultiX.
MultiX is free software; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Fre... |
a58b4c7d65edb72a91e9ecadbc1444aaf3f66ec7 | 9e92fc9c34c45435fbde49ae9ea5fc550812494d | SharifulCSECoU/competitive-programming | /light-online-judge/accepted-solutions/1013 - Love Calculator.cpp | C++ | cpp | 2,667 | no_license | //============================================================================
// Author : LAM PHAN VIET
// Online Judge : LightOJ
// Problem Name : 1013 - Love Calculator
// Time Limit : 2.000s
// Description : dp
//============================================================================
#include <algori... |
2534b2c7aaced27e82d744f7905d6c16e414d5a6 | 3ab73ce31f43e842bb3e5f6d6e32c3442a92453d | dingshiyu/aliyun-openapi-cpp-sdk | /dds/src/model/DescribePriceRequest.cc | C++ | cc | 4,710 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud 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... |
f480e4c6ba09a36e022e18334bf25eb2a99e8244 | 99a9bb15af8cddc85d482d56a453ff48541b6253 | gs2io/gs2-cpp-sdk | /src/gs2/money/request/DepositByStampSheetRequest.hpp | C++ | hpp | 6,598 | no_license | /*
* Copyright 2016 Game Server Services, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*... |
8fffea03eee8e5c4ecc8e62c35dad2d8616add6a | d1487807e343da11a84dccb180e9bb07368c04f1 | dig9074vijay/LearnCPP | /P-Patterns & Sequence/PascalsTriangle.cpp | C++ | cpp | 858 | no_license | #include<iostream>
#include<vector>
#define pb push_back
using namespace std;
class Solution {
public:
vector<vector<int>> generate(int numRows) {
vector<vector<int>> r; //resultant vector
for(int i=0;i<numRows;i++){
vector<int> r1(i+1,1);
r.pb(r1);
... |
c012b100bafda146a160a483948a8c599cd4c55a | 85fdeb447a84fc9fd55590833181addfda51acc0 | mhhuang95/LeetCode | /leetcodec++/leetcode238.cpp | C++ | cpp | 440 | no_license | //
// Created by 黄敏辉 on 2019-09-15.
//
class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
vector<int> res;
int p = 1;
for (int i = 0; i < nums.size(); i++){
res.push_back(p);
p *= nums[i];
}
p = 1;
for (int i = nums.si... |
0bcbfd065d5934b1b6b64e6e2fb02cf9845c418e | 2481ae87649b84040d1177e01388a106e0df8fdd | Mapotempo/osrm-backend | /third_party/libosmium/test/t/basic/test_types_from_string.cpp | C++ | cpp | 4,460 | permissive | #include "catch.hpp"
#include <osmium/osm/types.hpp>
#include <osmium/osm/types_from_string.hpp>
TEST_CASE("set ID from string") {
REQUIRE(osmium::string_to_object_id("0") == 0);
REQUIRE(osmium::string_to_object_id("17") == 17);
REQUIRE(osmium::string_to_object_id("-17") == -17);
REQUIRE(osmium::strin... |
e678f6e3b1ec375c9de2b99384091d59964cbc67 | 30bab80e84dbe4a6f126624dde3cd9651d0f2072 | kwdx/LeetCode-Practise | /Cpp/1034.边框着色.cpp | C++ | cpp | 2,471 | no_license | /*
* @lc app=leetcode.cn id=1034 lang=cpp
*
* [1034] 边框着色
*/
#include <iostream>
#include <vector>
using namespace std;
// @lc code=start
class Solution {
private:
int m = 0, n = 0;
vector<vector<bool>> visited;
vector<pair<int, int>> borders;
void dfs(vector<vector<int>>& grid, int x, int y, in... |
308c47b1ad7a50369fd51cddb4cf2b670d3785dc | 1a5a3f6cab42888b75ef22cdb123746e704c92ed | seoulcoin/seoulcoin | /src/qt/moc_macnotificationhandler.cpp | C++ | cpp | 2,456 | permissive | /****************************************************************************
** Meta object code from reading C++ file 'macnotificationhandler.h'
**
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "qt/macnotificationhan... |
249231dc70784bfa3adfdc3d15065369b63097fa | 8cfd7991fa2c0c5ad101faa1c8f7d1288b2c59a5 | nnn1590/mozc | /src/renderer/win32/win32_renderer_util.cc | C++ | cc | 91,248 | permissive | // Copyright 2010-2021, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of condit... |
34cacff778e03387dd6fa88fc4dd72a0da306b06 | 1148c8f85f8354a071c3b02aa993bfdf5f324471 | ShubhamS156/daaGFG | /temp/trees/NodesAtKrecur.cpp | C++ | cpp | 686 | no_license | #include <iostream>
#include "Node.h"
using namespace std;
/*
* Print all the nodes at level k. Root node is at level 0
* IDEA: use recursion
* recursively traverse every node and as you go one level down decrease k by 1
* when k becomes 0 you are at the correct level then print the key and dont
* call furthe... |
011e823916b4f67024a1d559029b87fc229640d8 | 4b45c6d1e6bc4e25040506331f7772c625dc5893 | XU-zzy/CS244b_final_project | /PBFTservice/client_main.cc | C++ | cc | 3,376 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <unistd.h>
#include <vector>
#include <string>
#include "th_assert.h"
#include "Timer.h"
#include "libbyz.h"
#include "Statistics.h"
#include "simple.h"
#include "../libbyz/libbyz.h"
int main(int argc, char **argv) {
std::s... |
cd7a88e8c562ca6e609b3810eb8d309abb3471d5 | 72a0591ec18315af0af8bcc2aa1b43fa9de69254 | YangyangFu/SOEP-QSS | /src/QSS/fmu/FMU_Variable.hh | C++ | hh | 3,710 | permissive | // QSS FMU Variable Specifications
//
// Project: QSS Solver
//
// Developed by Objexx Engineering, Inc. (http://objexx.com) under contract to
// the National Renewable Energy Laboratory of the U.S. Department of Energy
//
// Copyright (c) 2017 Objexx Engineerinc, Inc. All rights reserved.
//
// Redistribution and use ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.