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 |
|---|---|---|---|---|---|---|---|---|
2450216aaaf67315858d46f32591de18ac73ed1a | ceec986f1af97946a544f5f40f82087b43bf36ae | dacaizhao/Design | /OCAndCPP/OCAndCPP/DCCPP.hpp | C++ | hpp | 257 | no_license | //
// dacai.hpp
// zzzz
//
// Created by point on 2017/3/23.
// Copyright © 2017年 dacai. All rights reserved.
//
#ifndef DCCPP_hpp
#define DCCPP_hpp
#include <stdio.h>
class DCHello
{
public:
static void sayHello();
};
#endif /* dacai_hpp */
|
d2e85c27b93dc58dffc8d4cc2f6ca23dac5ab0c3 | 2532719bd8d95b5cc8874a917549948c723d7b35 | iankona/teardrop | /tools/Editor/ObjectBrowser/IconViewDelegate.cpp | C++ | cpp | 1,807 | permissive | /******************************************************************************
Copyright (c) 2015 Teardrop Games
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 wit... |
4273338ec5d7fed9e7ea5109dab934e9abfd649c | 9235db3a4fcf1b09ea4979da761f762eae3e9060 | harshana95/robofest-2017 | /OLD_sliit-stepper-robot2017/stepperDriver/StepperDriver.cpp | C++ | cpp | 6,770 | no_license | /*
Generic Stepper Motor Driver Driver
Indexer mode only.
Copyright (C)2015-2017 Laurentiu Badea
This file may be redistributed under the terms of the MIT license.
A copy of this license has been included with this distribution in the file LICENSE.
Linear speed profile calculations based on
- Ge... |
f0a8f88fc2cae03ae4db797bf1fbc371c302d514 | 8d01499122eccc8312c22f7fc15f6a9a7e805a2f | radix-io-archived/iofsl | /src/iofwdutil/bmi/BMIException.hh | C++ | hh | 427 | no_license | #include "ZException.hh"
#include <string>
namespace iofwdutil
{
namespace bmi
{
//===========================================================================
struct BMIException : virtual public ZException {};
typedef boost::error_info<struct tag_bmi_error, int> bmi_error_code;
std::string to_string (const b... |
2fe54751c53eeab0341c062a4e3d9ec9af7187c4 | a166c164e2eccbff7c3cea86ac9e1b8389dd5ffe | mizoxes/MapGenerator | /MapGenerator/Terrain.cpp | C++ | cpp | 2,079 | no_license | #include "Terrain.h"
#include "ppm.h"
using namespace std;
using namespace DirectX;
constexpr float MAX_PIXEL_COLOR = 256.0f * 256.0f * 256.0f;
constexpr float MAX_HEIGHT = 40.0f;
static ppm s_image;
Terrain::Terrain(const std::string& heightmap) {
s_image.read(heightmap);
int count = s_image.height * s_im... |
31f7f1bfb1564ea22e4f32e92961fea3a2a5a7c4 | e03f3cd17f9d4bee6b7ee8444327e6128a6a1608 | BunnyBrewery/terrier | /util/execution/tpl.cpp | C++ | cpp | 11,277 | permissive | #include "execution/tpl.h"
#include <gflags/gflags.h>
#include <unistd.h>
#include <algorithm>
#include <csignal>
#include <cstdio>
#include <iostream>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "execution/ast/ast_dump.h"
#include "execution/exec/execution_context.h"
#include "... |
282254212c1d9a001043b9c98f75b28954c9f37a | 9d6ad49155b3988c22f745922c66ce8cadb4840a | BackupTheBerlios/sems-svn | /branches/wb/apps/dsm/DSMStateDiagramCollection.cpp | C++ | cpp | 2,327 | no_license | /*
* $Id$
*
* Copyright (C) 2008 iptego GmbH
*
* This file is part of SEMS, a free SIP media server.
*
* sems 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 of the License, or
* (at... |
112ee4f6db268bb1c7279d396210a1e617928bda | 0576c5554b6fbebcf46b0b3eccb9301901a3ac1d | aurantst/windows-XP-SP1 | /XPSP1/NT/admin/activec/core/assert.cpp | C++ | cpp | 17,206 | no_license | //+---------------------------------------------------------------------------
// Copyright (C) 1991-1994, Microsoft Corporation.
//
// File: assert.cpp
//
// Contents: Debugging output routines
//
// History: 23-Jul-91 KyleP Created.
// 09-Oct-91 KevinRo Major changes ... |
a7b2608cb31a38aa4a7cb4456467d8908037020f | 55120ba3be3c23782f9701c2f022d7e42b68a5b4 | 100sarthak100/DataStructures-Algorithms | /Code/string/minDeletionCostToavoidRepeatingChar.cpp | C++ | cpp | 1,613 | no_license | // Given a string s and an array of integers cost where cost[i] is
// the cost of
// deleting the character i in s.
// Return the minimum cost of deletions such that there are no two
// identical letters next to each other.
// Notice that you will delete the chosen characters at the same time,
// in other words, ... |
fbc6a4026df9ce77098b7f5cdeadac4605739a08 | aba99accf4949cacedc46a777cc68a5f7ea8043d | ChilliKirby/Projects | /Project1/Project1/Calculator.cpp | C++ | cpp | 1,973 | no_license | #include <cstdio>
#include <iostream>
#include <string>
int first_input = 0;
int second_input = 0;
int choice = 1;
std::string input;
int restart = 0;
void check_digit(std::string input);
int main()
{
while (choice != 0)
{
std::cout << "Enter an integer to choose: \n 1: Addition \n 2: Subtraction \n 3: Multipl... |
954d477d0458740f347807dcecdf70b1e5582c54 | ed989ad4205a9f705e1ad44ad05af768ebc5d49b | dct328/OpenSeesWithoutTcl | /SRC/system_of_eqn/linearSOE/fullGEN/FullGenLinSOE.cpp | C++ | cpp | 11,334 | no_license | /* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... |
68ca2aa8034ddea9223d511ea766fe231a13a5d3 | b1de70d33f5d72f4f19df7c3a20ee1914625b24c | twentylemon/flow | /flow/test/repeat_n.cpp | C++ | cpp | 495 | permissive |
#include "stdafx.h"
BOOST_AUTO_TEST_CASE( repeat_n )
{
using namespace flow;
std::vector<int> ex = { 1, 1, 1 };
auto s = repeat(1, 3) | to_vector();
BOOST_CHECK_EQUAL_COLLECTIONS(s.begin(), s.end(), ex.begin(), ex.end());
ex = { 4, 4, 4, 4 };
s = repeat(4, 4) | to_vector();
BOOST... |
876aa0c0c27164c52d76799a7a7e489f21c16874 | 417c66a609fe930ca2ff5574b8273c956f151a41 | spammydavis/HZDCoreEditor | /hzd_test/RTTICSharpExporter.cpp | C++ | cpp | 10,385 | no_license | #include "common.h"
#include "RTTICSharpExporter.h"
using namespace HRZ;
RTTICSharpExporter::RTTICSharpExporter(const std::unordered_set<const HRZ::RTTI *>& Types) : m_Types(Types)
{
}
void RTTICSharpExporter::ExportAll(std::string_view Directory)
{
CreateDirectoryA(Directory.data(), nullptr);
// Build a list of ... |
09bd8ae939afe9c904ad5892c91d449478cb645c | 718b4d5ce9133e8898333ab5dc475606a9dacd56 | boti/DiligentCore | /Graphics/GraphicsEngineD3D11/src/Texture2D_D3D11.cpp | C++ | cpp | 10,640 | permissive | /* Copyright 2015-2019 Egor Yusov
*
* 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
*
* THE SOFTWARE IS PROVIDED "AS IS", ... |
338ad7afdc0bc2da1c371495cbc8667f44812d03 | 7a05ce8c999be6ac6ad4452431bae592e4a1b8ed | yagee97/algorithm | /BOJ/boj15686_치킨배달.cpp | C++ | cpp | 1,032 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
int n, m, map[55][55];
int ret = 1000000000;
class position {
public:
int x, y;
position(int a, int b) {
this->x = a;
this->y = b;
}
};
vector<position> home;
vector<position> chicken;
vector<int> v;
void cal(int... |
e400f629d43338a41979b9bbbb039088664b9534 | 2299e291d89b8b128746b74f52d886d2ff2e7f79 | khotilov/cmssw | /CalibTracker/SiStripRunSummary/src/GlobalFlagTxt.cc | C++ | cc | 2,519 | no_license | // Author : Samvel Khalatian (samvel at fnal dot gov)
// Created: 07/27/07
// License: GPL
#include <ostream>
#include "CalibTracker/SiStripRunSummary/interface/ClassID.h"
// Include all subflags that current one may have
#include "CalibTracker/SiStripRunSummary/interface/DAQFlagTxt.h"
#include "CalibTracker/SiStrip... |
61221c8a0950c14677db3d7048b20dc6adfb4c22 | d6a3712fd920e7c422f1dbcc2bf4530e22b9b61c | aranajhonny/chromium | /mojo/examples/demo_launcher/demo_launcher.cc | C++ | cc | 1,428 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/run_loop.h"
#include "mojo/public/cpp/application/application_connection.h"
#include "m... |
b00294a1abdea9ea97e24cd836b474788b6e066b | 4d566731ca0f6b8abd71e918948f37cbe1cbfb76 | yannmu/Rizalina-peaksearch | /GammaCountAnalysis.cxx | C++ | cxx | 10,168 | no_license | #include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include "getopt.h"
#include "TROOT.h"
#include "TStyle.h"
#include "TString.h"
#include "TObject.h"
#include "TF1.h"
#include <TSystem.h>
#include <ctime>
#include <pthread.h>
#include "GammaLineFit.cxx"
#include "Gam... |
601a28e5108d20ea5ee524c1366b4e97aa364707 | d4f40d1f14f392f697bd41ebb2469286aad5a21f | MagnusCardell/HammingCode-Simulator | /hamming2.cpp | C++ | cpp | 4,847 | no_license | /** Hamming code generator and checker. Can generate hamming codes and check if inputed hamming codes
are OK.
-Magnus Cardell 10/13/2016
*/
#include <iostream>
using namespace std;
int INPUTLENGTH = 16;
int OUTPUTLENGTH = 21;
/** Function: Paritygenerator
Purpose: calculate even or odd bits by incre... |
f036af9a06c9eeb90b4cc287dcef94d070989a48 | 477deeeb78a6f3606f96a0b37c87a374c1d29aa8 | asimali246/Spoj-solutions | /372.cpp | C++ | cpp | 1,345 | no_license | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <set>
#include <cstring>
#include <iomanip>
#include <map>
#include <algorithm>
#include <stack>
#include <queue>
#include <list>
#include <string>
#include <vector>
#include <new>
#include <bitset>
#include <ctime>
#include <cassert>
#i... |
44736d8ceaf3da8ada217fb98840c8f67ee48e3a | 42cbac97631ade6491f9c75ede02d699f5a01c15 | nathan87007/intro-c-plus-plus | /Exam1Tadych/Exam1Tadych/main.cpp | C++ | cpp | 498 | no_license | #include <iostream>
#include <conio.h>
#include <iomanip>
using namespace std;
int main()
{
//declare variables
float miles = 47.3;
float gallons = 3;
float mpg = miles / gallons;
int colw = 20;
int colw2 = 10;
//output
cout << "Enter the miles driven:\t\t" << miles <<endl;
cout << "Enter ... |
dad9943fe182153fa3145b73dd077a35486796ea | c70c6b1c9e6f544f74cde254b8185e0243d0a90d | ChhYoung/Coding_Diary | /LeetCode&PAT/LEETCODE/20.valid-parentheses.cpp | C++ | cpp | 1,733 | no_license | /*
* @lc app=leetcode id=20 lang=cpp
*
* [20] Valid Parentheses
*/
#include<stack>
#include<string>
class Solution {
public:
bool isValid(std::string s) {
std::stack<char> res;
for(int i=0;i<s.length();++i){
if(s[i]=='{' || s[i]=='[' || s[i]=='('){
res.push(s[i]);
... |
d7b0627bc5fcda86e476a091fcde21d1a7bd8b2a | e4cc2005746e611c55da3aa11d6efe68b875e7b9 | pawel-kieliszczyk/step-out-group-signatures | /group-privacy-server/group_privacy/step_out_group_signatures/SignProcedureOutput.hpp | C++ | hpp | 1,858 | no_license | /**
* @file SigProcedureOutput.hpp
* @author Pawel Kieliszczyk <pawel.kieliszczyk@gmail.com>
* @version 1.0
*
* @section LICENSE
*
* Copyright (C) 2011 Pawel Kieliszczyk
*
* This file is part of Group Privacy.
*
* Group Privacy is free software: you can redistribute it and/or modify
* it under the terms of ... |
cfda5ff178539b791dd8759af86a774af89e3762 | 376a904bf95ef062a5a155a554d2e1fa1a9064a8 | xuleiming/fbthrift | /thrift/perf/cpp/LoadHandler.cpp | C++ | cpp | 2,691 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... |
6e568fa70678b099565e53a28e97cef17fec4815 | 3896a1af416daf8deade65366019838194c3f0c0 | aaronamk/Pong | /src/player_view.cpp | C++ | cpp | 1,671 | no_license | #include <SFML/Graphics.hpp>
#include "view.h"
#include "player_view.h"
#include "actor.h"
#include "paddle.h"
#include "ball.h"
PlayerView::PlayerView(Paddle& paddle)
: View(paddle) {
// create main window
Game.create(sf::VideoMode(View::SCREEN_WIDTH, View::SCREEN_HEIGHT, 32), "Pong!", sf::Style::Titlebar | sf... |
c4052450fe1a1f2bcaa6a54d04c1c88dcb34ceb0 | 1245a4ee8e3daf709695086de0da4ce0b7944274 | nTopology/lib3mf | /Source/Common/NMR_Exception.cpp | C++ | cpp | 30,904 | permissive | /*++
Copyright (C) 2015 Microsoft Corporation
Copyright (C) 2015 netfabb GmbH (Original Author)
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 ... |
d6d7302a46e39ba973933561da7e8cfa8dfc1461 | ee09d2999c72373f6d9f1bf16cbae17ad5e21d20 | MintSummer/TYC | /bzoj/2718/2718.cpp | C++ | cpp | 1,734 | no_license | #include<bits/stdc++.h>
using namespace std;
const int inf=0x3f3f3f3f;
const int MAXN=410;
int n,m,cnt=1,S,T,Head[MAXN],G[210][210],dep[MAXN],cur[MAXN],q[MAXN];
int read()
{
int x=0;
char ch=getchar();
while(ch<'0'||ch>'9') ch=getchar();
while(ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar();
return x;
}... |
43aea0e6259145f98d6c485515a5ddbf6ab34f39 | cc3ab665f97b78ecb1eaf55c69f54d539f38a563 | GRSEB9S/bnetTool | /mainwindow.cpp | C++ | cpp | 27,884 | no_license | /**
* \author trungvv1
*
* \date 3/24/2015
* \class MainWindow
*
* \brief write something about your class
*
*
*/
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QGraphicsEllipseItem>
#include <QMessageBox>
#include <QInputDialog>
#include <QDir>
#include <QFile>
#include <QFileDialog>
#include ... |
f8ee89bafa0cc06bccd9c9b33e10405418acdeae | 0014dc226887cd4cca05d78124e71247f971930a | nadya-chernyavskaya/geant4 | /EEShashlikSimulation/H4OpticalSmall_Ideal2016_APD/src/EEShashEventAction.cc | C++ | cc | 11,162 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
e148ad26226e2259944eb04c8739d0247d470853 | 47236b59a5317d94fe425d9318344545d6d0221a | zevebe/Bitx | /src/test/main_tests.cpp | C++ | cpp | 1,636 | permissive | // Copyright (c) 2014 The Bitcoin Core developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "primitives/transaction... |
f19b29dcafbe82ccec70553b684eb9b26b137d61 | 0286369fec7e1b1e9d742d3ad8a94f979ec5d34e | MaxDerouet/learncpp | /1.11a/test/main.cpp | C++ | cpp | 223 | no_license | #include <iostream>
void CallC()
{
std::cout << "C called" << std::endl;
}
void CallB()
{
std::cout << "B called" << std::endl;
CallC();
}
void CallA()
{
CallB();
CallC();
}
int main()
{
CallA();
return 0;
}
|
37da2e2eb03efd368b3e960b792bfdedcf1ebe29 | e251c257447b6aa9d588b8c2bd261a2436f63168 | yuzzjj/onnxruntime_backend | /src/onnxruntime.cc | C++ | cc | 83,825 | permissive | // Copyright (c) 2019-2021, NVIDIA CORPORATION & AFFILIATES. 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, ... |
3ee3edda49441d50893e01b1da0e7b3b2a036003 | a4ec4e891facdd62f6e7e601e04018257fef4a3c | hwcarr/winscoin5 | /src/wallet/test/wallet_tests.cpp | C++ | cpp | 20,883 | permissive | // Copyright (c) 2012-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/wallet.h>
#include <memory>
#include <set>
#include <stdint.h>
#include <utility>
#include <vector>
#inclu... |
d801904cd52ed94fe6eef599748f241bbcd8cb57 | ee4d77c3a307a89107aba006c8ce4dccf478087d | horsicq/XDisasm | /dialogdisasmlabels.cpp | C++ | cpp | 3,494 | permissive | // copyright (c) 2019-2023 hors<horsicq@gmail.com>
//
// 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, ... |
826853e39a701230b761d4f3b3cd781311b65e81 | 039211c360fe7b9c1b42fa08220b05a514312bee | badosu/rubinius | /vm/builtin/proc.hpp | C++ | hpp | 1,330 | permissive | #ifndef RBX_BUILTIN_BLOCK_WRAPPER_HPP
#define RBX_BUILTIN_BLOCK_WRAPPER_HPP
#include "builtin/object.hpp"
#include "type_info.hpp"
namespace rubinius {
class BlockEnvironment;
class Proc : public Object {
public:
const static object_type type = ProcType;
private:
BlockEnvironment* block_; // slot
... |
36012285a18736004eeb6ae638de4f2e1e9dee1a | 67e2876fa10d602353aa96f178afc66b99bd1d3d | zhenghongpeng/usacoepcpp | /usacoepcpp/Fibbonacci/main.cpp | C++ | cpp | 206 | no_license | #include <iostream>
using namespace std;
int Fibb(int n) {
if (n==0) {return 0;} if (n==1) {return 1;}
return Fibb(n-1)+Fibb(n-2);
}
int main() {
int n; cin >> n;
cout << Fibb(n) << endl;
} |
79002a44c86e84a1b044cd59319cfddddfb6a4a8 | fb4c53f67d09126518bd9416d29bf39acebc2628 | pjediny/contrail-controller | /src/bgp/bgp_xmpp_channel.cc | C++ | cc | 116,085 | permissive | /*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include "bgp/bgp_xmpp_channel.h"
#include <boost/assign/list_of.hpp>
#include <boost/foreach.hpp>
#include <boost/regex.hpp>
#include <limits>
#include <sstream>
#include <vector>
#include "base/task_annotations.h"
#include "bgp/bgp_config.h"... |
fb6d20281c1248992013ecb020a7c0862ec593aa | 5e340b7dc5cf230aa48cfa10e8a2b539cc4d6303 | AdrianJHerskind/Bachelor6thSem | /davinci_suturing/src/trajectory_listener.cpp | C++ | cpp | 1,581 | no_license | #include <cstdlib>
#include <iostream>
#include <string>
#include "ros/ros.h"
#include "moveit_msgs/MoveGroupActionResult.h"
void chatterCallback(const moveit_msgs::MoveGroupActionResult::ConstPtr& msg)
{
int axesUsed = 5;
double startArray[axesUsed];
double viaPointArray[msg->result.planned_trajectory.joint_trajec... |
f00480afa18f3433349567c5ebcf778434b7e739 | 0fa9fff184d6262ad947d9d40d07b8fca99371f9 | LearnProgrammingFromC/kurokotetsuya | /27养兔子/养兔子.cpp | C++ | cpp | 554 | no_license | // 养兔子.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
int main(int argc, char* argv[])
//{为何i小于等于38,会有40个月
//int f1=1,f2=1,f3;
//int i;
//printf("%12d\n%12d\n",f1,f2);
//for(i=1;i<=38;i++)
//{
// f3=f1+f2;
// printf("%12d\n",f3);
// f1=f2;
// f2=f3;
//}
//return 0;
//}
... |
2b7ed5bd773aeed65862c82f09732e98088d8fae | 6a12d973b3d71ff36c927cbc02a549f97765fb60 | trixnz/SLED | /wws_lua/extras/Lua.Utilities/LuaInterface-5.1.4.cpp | C++ | cpp | 3,962 | permissive | /*
* Copyright (C) Sony Computer Entertainment America LLC.
* All Rights Reserved.
*/
#include "stdafx.h"
#include "LuaInterface.h"
#ifndef _MANAGED
extern "C"
{
#endif
#include <wws_lua\lua-5.1.4\src\lua.h>
#include <wws_lua\lua-5.1.4\src\lualib.h>
#include <wws_lua\lua-5.1.4\src\lauxlib.h>
#ifndef _MANAGED
... |
e04440547377a6d76a5d3e55befe6e853dfa4b17 | 4dd04f814944b9741458f6fa167f9186e2a71598 | ohsolution/HPS | /OpenContest/SUAPC 2021 Winter/I.cpp | C++ | cpp | 1,846 | no_license | //================code===================//
#define TLE
#ifdef TLE
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#endif
#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <ctime>
#define ci(t) cin>>t
#define co(t) cou... |
70420d7fcfacb44a96a86d12346f257fbc33f634 | 5e5fdb40cf31c60fb13cca61c1ff69b76409b6ee | BogGyver/openpilot | /selfdrive/ui/qt/maps/map.cc | C++ | cc | 18,517 | permissive | #include "selfdrive/ui/qt/maps/map.h"
#include <cmath>
#include <QDebug>
#include <QPainterPath>
#include <QFileInfo>
#include "selfdrive/common/swaglog.h"
#include "selfdrive/ui/ui.h"
#include "selfdrive/ui/qt/util.h"
#include "selfdrive/ui/qt/maps/map_helpers.h"
#include "selfdrive/ui/qt/request_repeater.h"
cons... |
ce1864c86d17174e1bcbe76dae84bee2f975e4e5 | 2ac4d6282c7e743584742bc419b8bcf27159f18b | MahirSez/problem-solving | /codeforces/1182/D.cpp | C++ | cpp | 3,103 | no_license | #include <bits/stdc++.h>
#define ll long long int
#define PI acos(-1)
#define read freopen("in.txt","r",stdin)
#define uu first
#define vv second
#define write freopen("out.txt","w",stdout)
#define pii pair<int,int>
#define pll pair<ll,ll>
#defin... |
530959dd8d05bcb0056be50aea0523821f7c4e02 | 8a9c57ef0ab330750d93fac265a0861a69b46d67 | Ivansquark/Bigprog | /qtsrc/mainwindow.cpp | C++ | cpp | 8,415 | no_license | //*************************** Первое окно *********************************
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow) //конструктор MainWindow (инициализируется QWidget,QMainWindow-родители и выделяется па... |
098d7322ef5a55018c44aee031498563c89ad108 | 8309a686e68a6f556286e52688cb3cb71d9aa791 | a86792208/mantid | /Code/Mantid/Framework/DataHandling/src/LoadILLIndirect.cpp | C++ | cpp | 13,093 | no_license | #include "MantidDataHandling/LoadILLIndirect.h"
#include "MantidAPI/FileProperty.h"
#include "MantidAPI/RegisterFileLoader.h"
#include "MantidKernel/UnitFactory.h"
#include "MantidGeometry/Instrument/ComponentHelper.h"
#include <boost/algorithm/string.hpp>
#include <nexus/napi.h>
#include <iostream>
#include <iomanip... |
b5e42c7c81518110815a029a4e6beb232e00a71b | 6cc5e1e98c395239f6cd53121358e2d207070be1 | ducvuongcity/Documents | /Exercise2/DBus/Client2/main.cpp | C++ | cpp | 946 | no_license | #include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QtQuick>
#include "contactmodel.h"
#include "contactmanager.h"
#include "Client2.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qmlRegisterType<ContactModel>();
Client2 client2;
clie... |
80c0515196c998f72db3f5242bf71a6e9a2a0334 | 09670d6fa514d92f5e2a7c4a921c76dff9ca1203 | aayam07/Demo-App | /src/main.cpp | C++ | cpp | 735 | no_license |
#include "rectangle.h"
#include "triangle.h"
#include<iostream>
using namespace std;
int main()
{
point p1;
p1.setcoordinates(1,6);
point p2;
p2.setcoordinates(1,2);
point p3;
p3.setcoordinates(6,2);
point p4;
p4.setcoordinates(6,6);
rectangle r1(p1,p2,p3,p4,4);
r1.setce... |
3942913c0f48253eba49684c7a6836520ef5669b | 28723428e6ea74a06591519bceb2431cc03780a9 | pluskid/mxnet | /src/executor/graph_executor.cc | C++ | cc | 56,002 | permissive | /*!
* Copyright (c) 2015 by Contributors
* \file graph_executor.cc
* \brief graph executor
*/
#include <mxnet/base.h>
#include <nnvm/graph.h>
#include <nnvm/pass_functions.h>
#include <vector>
#include <algorithm>
#include "../common/nnvm_utils.h"
#include "./exec_pass.h"
#include "./graph_executor.h"
#include ".... |
2c268dca2c48bc592888806a925ca6a0f95c90a3 | 90acabe4763a0571fc4ea386b8f0d57dd5cefeb9 | drlongle/leetcode | /algorithms/problem_0299/solution.cpp | C++ | cpp | 582 | no_license | class Solution {
public:
string getHint(string secret, string guess) {
int n = secret.size();
map<char, int> cnt;
for (char c : secret)
++cnt[c];
int bulls{0}, cows{0};
for (int i = 0; i < n; ++i) {
if (secret[i] == guess[i]) {
++b... |
b7dde0333e32da17377155f417aa34bc91819cea | 245afad939351b16f2f17b868d8e49e37fc8f94d | hhc2tech/mpm-optimization | /src/sphere.cpp | C++ | cpp | 1,944 | permissive | // Copyright (c) 2016 University of Minnesota
//
// MPM-OPTIMIZATION Uses the BSD 2-Clause License (http://www.opensource.org/licenses/BSD-2-Clause)
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
// 1. Redistributio... |
9527a58aea80065415c58468c1acf25166dd7440 | ab2f050400a6ba3964dea75828486a503f28670c | chromium/chromium | /components/system_media_controls/mock_system_media_controls.cc | C++ | cc | 464 | permissive | // Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/system_media_controls/mock_system_media_controls.h"
namespace system_media_controls {
namespace testing {
MockSystemMediaControls::MockSystemMediaContro... |
008e9dbf1c675d87f490af9fcb1904e7452eabed | d3567777db843688e3d8b7449807b88fee33714b | huynguyen2412/CS45 | /lab4/lab4.cpp | C++ | cpp | 29,761 | no_license | #include <iostream>
#include <vector>
#include <cstdlib>
#include <bitset>
#include <string>
#include <array>
#include <fstream>
#include <algorithm>
#include <iterator>
using namespace std;
bool illegalSet(string input);
int whoIsFirst(const string &incoming);
bool precedence(const string &incoming, const string... |
f9093763b6b7b6563968de663daffae5cc6b577a | 0d94c8ca1d95910bcaa9b6cf420dd20f8a706811 | alex43dm/trafficligth | /controld/src/Thread.cpp | C++ | cpp | 1,835 | no_license | #include <unistd.h>
#include <stdlib.h>
#include "Thread.h"
Thread::Thread() :
fExit(false)
{
m_mtx = new pthread_mutex_t;
pthread_mutex_init(m_mtx, NULL);
m_cond = new pthread_cond_t;
pthread_cond_init(m_cond, NULL);
}
//###########################################################################
Thread... |
2a639ef25d50f5b65c6036f866e233494558c053 | 3d2b8fd41d0e67403ee813d0e7e8beb8be011b60 | lspatial/spstatics_parallel | /ParBayes/ParBayes/include/pnlPersistGraph.hpp | C++ | hpp | 1,648 | no_license | /////////////////////////////////////////////////////////////////////////////
// //
// INTEL CORPORATION PROPRIETARY INFORMATION //
// This software is supplied under the terms of a license agreement or //
// ... |
b7200a00fc86fb9786f23489b561de98af0f7641 | 2cc1662010d632b38bb79dac74e2c9cb68a7c595 | jongkukpark/FollowStudyCPP | /4. VARIED_VARIABLE_SCOPE/AutoTypeInferrence/Source.cpp | C++ | cpp | 304 | no_license | #include <iostream>
// template
auto add(int x, int y) // 파라미터에는 auto 사용 불가
{
return x + y;
}
auto add(double x, double y) -> double
{
return x + y;
}
int main()
{
using namespace std;
auto a = 123;
auto d = 123.0;
auto c = 1 + 2.0;
auto result = add(1, 2);
return 0;
} |
84bf2dc48cce49290c16f1cbf5be6cadfd505d49 | 09aadbb9b32bf537f44875fdc7c288cbaf809a66 | merde-libertas/merdecoin | /merdecoin-v0.01/src/test/compress_tests.cpp | C++ | cpp | 1,840 | permissive | // Copyright (c) 2012-2018 The Merdecoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <compressor.h>
#include <util/system.h>
#include <test/test_merdecoin.h>
#include <stdint.h>
#include <boost/tes... |
1a4d24960ad2ef04da184920bb955e4620d6498c | 0aa8a4a412084d508d15e9d8d0f39ce933a8e4a9 | TencentCloud/tencentcloud-sdk-cpp | /dc/src/v20180410/model/AccessPoint.cpp | C++ | cpp | 13,075 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
69a1fb28b8306619e63cf7b6ea07ec673d4226b6 | 32eae1b5474a4a0098c789766b3d1feb470fb104 | qqkookie/devilutionX | /test/animationinfo_test.cpp | C++ | cpp | 19,567 | permissive | #include <gtest/gtest.h>
#include "nthread.h"
#include "engine/animationinfo.h"
using namespace devilution;
/**
* @brief Represents a Action in the game_logic or rendering.
*/
struct TestData {
virtual ~TestData() = default;
};
/**
* @brief Represents a call to SetNewAnimation
*/
struct SetNew... |
faefefd6900b3dc87fa332b0c022a27efd7a3fd5 | c200cb7068b0fb6e49a142eedfebaea78819234d | peterjc123/magma | /sparse/src/sbicg.cpp | C++ | cpp | 8,971 | no_license | /*
-- MAGMA (version 2.5.4) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date October 2020
@generated from sparse/src/zbicg.cpp, normal z -> s, Thu Oct 8 23:05:51 2020
@author Hartwig Anzt
*/
#include "magmasparse_internal.h"
... |
975f59dce7af1d6e77d003e8974c58ac22b901e1 | a51ecbd7badf11be565ef716bf7958d385fb9c0c | brunolauze/openpegasus-providers-old | /src/Providers/UNIXProviders/ProtocolService/UNIX_ProtocolServiceMain.cpp | C++ | cpp | 2,198 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
c60c3a40b7f7b289f8dc935ac3e8aae215a7771a | 7708c6e3c36853bc0ce76c83b30576f66d05a8d4 | fujunwei/chromium-src | /gpu/command_buffer/service/gr_cache_controller.cc | C++ | cc | 1,759 | permissive | // Copyright 2018 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 "gpu/command_buffer/service/gr_cache_controller.h"
#include "gpu/command_buffer/service/raster_decoder_context_state.h"
#include "ui/gl/gl_conte... |
7f10e3fcca32a2a2ecbe37ec790369fd5e8d61f8 | bf4e7b195f1a7f04538755e9c314b0625acbcc3b | Virusxxxxxxx/Qt | /Calculator/mainwindow.cpp | C++ | cpp | 2,630 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include "moudle.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
current_num = "";
m = new Moudle;
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_btn_0_clicked()
{
... |
d7d4a7a397c106812cf91ba5460f9830e8f82888 | 3311b77864644f6a4a9b67dd257cf78c37404c2b | AlbinMartinsson/master_thesis | /Programming/mbed-os-example-sockets/mbed-os/features/frameworks/utest/source/utest_greentea_handlers.cpp | C++ | cpp | 5,161 | permissive | /****************************************************************************
* Copyright (c) 2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You ma... |
4c7dd021f781d30a980128559d406a134d382dfc | 3aeac7c3a76bd971c4e1da0cb7ebb4359e7e8049 | meniossin/src | /services/ui/test_wm/test_wm.cc | C++ | cc | 8,213 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <utility>
#include "base/threading/thread_task_runner_handle.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "servic... |
dcd864774fd77028afcd680c73af465a2a7d91be | 827cc678ae7e36e3053a65dfdbc2d3a6daf943d4 | AdoenLunnae/ED | /Practica-3/arbolbinarioordenadoenlazado.hpp | C++ | hpp | 7,810 | no_license | #ifndef __ARBOLBINARIOORDENADO_HPP__
#define __ARBOLBINARIOORDENADOENLAZADO_HPP__
#include <iostream>
#include <string>
#include <cassert>
#include "arbolbinarioordenado.hpp"
#include "operadornodo.hpp"
using namespace std;
/*!
\brief Espacio de nombres para la asignatura Estructura de datos.
*/
namespace ed
{
/*!\b... |
c2f35394201c4765ec13c981ecbb8b5ea528c17b | 4e643403141b555ec93c14a391b98bcbef1bb4a5 | crazyandroidcoder/books | /network/Windows网络编程 - 源代码/Chapter03/Server2/Server2.cpp | C++ | cpp | 3,392 | no_license | // Module Name: Server2.cpp
//
// Purpose:
// This application demonstrates how to write a more advanced
// mailslot server that works around a Windows 9x problem with
// canceling blocking I/O requests. Mailslot servers use the
// ReadFile() API to receive data. If a mailslot is created
// ... |
6909d57760079339c2259ae612992a53244489af | fa32b1f62579d9d33f195fb6c59eccbc25f26294 | zhweiwei/apue | /10/test.cpp | C++ | cpp | 272 | no_license | #include "apue.h"
using std::endl; using std::cout; using std::cin;using std::string;
void my_alrm(int value){
cout <<"this is my_alrm"<<endl;
}
int main(){
if(signal(SIGALRM,my_alrm) == SIG_ERR){
cout <<"signal error"<<endl;
}
alarm(1);
pause();
}
|
487e1add054cc237d786683bc99e37e807c596af | 00cc6b00f530930f284d1da51dcca01eaab5a355 | picktek/LinGEO | /lingeo/espeak/espeak-src/klatt.cpp | C++ | cpp | 36,376 | permissive |
/***************************************************************************
* Copyright (C) 2008 by Jonathan Duddington *
* email: jonsd@users.sourceforge.net *
* *
* Based ... |
b3cf0864c923ff9ad6a0684c43c93042e91413c5 | 69e523703ff4cea0c783a42bf764f57c7dc959f9 | ArthurBoschet/NeuroAlgo | /Cpp/wpli.cpp | C++ | cpp | 4,757 | no_license | #include <iostream>
#include <armadillo>
using namespace std;
using namespace arma;
// Armadillo documentation is available at:
// http://arma.sourceforge.net/docs.html
// NOTE: the C++11 "auto" keyword is not recommended for use with Armadillo objects and functions
int
main(int argc, char** argv)
{
// Load E... |
dad41ede0f3be45f54c80d786123ae5ca5b3faa2 | 1c632011d118a3006930bf1fb3d60f0f16be54f0 | xiaoyifeibupt/Algorithms | /leetcode/implement-strstr.cpp | C++ | cpp | 936 | no_license | /**
*
*Implement strStr().
*Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
*Update (2014-11-02):
*The signature of the function had been updated to return the index instead of the pointer. If you still see your function signature returns a char * or String, ple... |
7e8454f1a8d3b3f99ebb25c04aee2b03110cd39c | fd7ef2b57e20ced68cdb5385c4d110b43a6a55a3 | IgorYunusov/Mega-collection-cpp-1 | /WSP/00_WSP/02_파일 콘솔/01_파일/9_비동기1.cpp | C++ | cpp | 2,266 | no_license | /****************************************************************************
4) Sample1
비동기 I/O(중첩된 입출력)
: 주로 네트워크 프로그램이나 병령통신(시리얼)에 사용
대용량 파일 서버에서 주로 사용
- 대용량 파일 서버 주스레드에서는 accept와 비동기로 Send를 하고 두번째
스레드에서는 Send작업들의 Event를 받아 Socket을 닫는 역활을 한다
1. 비동기 요청하는 법
2.... |
af51bb1ab9263b4bffcf25e4d6cafc22bdb4902d | 4e49d94238956ddd00f2a5f2b56980bec2600a8f | cjxgm/stdwrap | /src/stdwrap/clang/translation_unit.hh | C++ | hh | 1,379 | no_license | #pragma once
#include "c.hh"
#include "internal.hh"
#include "unsaved_file.hh"
#include "index.hh"
#include "cursor.hh"
#include "diagnostic.hh"
#include <vector>
#include <utility>
namespace clang
{
struct translation_unit : public internal::guard<c::translation_unit::type>
{
using self_type = translation_unit;
... |
d0b67910bf2f3db3f699c6606bed8d73e74f79fe | a0b8d77df32fa0013a8ebe5fc0fcae82387b1222 | liquanhai/cxm-hitech-matrix428 | /郭鑫程序交接/source.code.2012.06.11/source.code/segd/segd.viewer/segd.viewer.cpp | C++ | cpp | 8,405 | no_license | // segd.viewer.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "../../common/config.h"
#include "../../common/log.h"
#include "../../common/utility.h"
#include "segd.viewer.h"
#include "segd.listview.h"
#include "segd.editctrl.h"
#include "segd.treeview.h"
#include "segd.f... |
b686c9c05eb5bf4e36e24e8ad3f3aede3dbe2264 | 9680096e23efd9860bd209d8ed5da7693346414a | SaadNoor555/cp-practice | /B_CatchCheater.cpp | C++ | cpp | 744 | no_license | #include<bits/stdc++.h>
using namespace std;
int dp[5001][5001], n, m;
string a, b, ans= "";
void f()
{
for(int i=1; i<=n; i++)
for(int j=1; j<=m; j++)
{
if(a[i-1]==b[j-1]) dp[i][j]= dp[i-1][j-1]+1;
else dp[i][j]= max(dp[i-1][j], dp[i][j-1]);
}
int ns= n, nt= ... |
ff9a9153c1ba06c36eae37a96425b139c2bc67c0 | f978540ee6bbbe91ddc25e80360ea1ee31a2ea6c | changmu/StructureAndAlgorithm | /POJ/1017/13630157_AC_16MS_132K.cpp | C++ | cpp | 481 | no_license | #include <stdio.h>
#include <string.h>
int main() {
int a, b, c, d, e, f, ans, tmp;
const int sam[] = {0, 5, 3, 1};
while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f), a|b|c|d|e|f) {
ans = f + e + d + (c + 3) / 4;
tmp = d * 5 + sam[c % 4];
if(b > tmp) ans += (b - tmp + 8) / 9;
... |
55690523ce0ef2b171f5a5368aa98188c711ce27 | e7e216aed0b467d33b4b6c37f717ad59ccd7722a | salvAuri/optimisationRefactoring | /refactoringOptimisation/differentiatedCAD/occt-min-topo-src/src/StepGeom/StepGeom_RationalBSplineCurve.cxx | C++ | cxx | 2,315 | no_license | // Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with spe... |
ec0a8138446f13b50843d2e62b1961ef63d13370 | b55a3c16285c6bbfa11668c883f73d42e13d6cf9 | calendreco/mapbox-gl-native | /src/mbgl/renderer/painter_debug.cpp | C++ | cpp | 4,292 | permissive | #include <mbgl/renderer/painter.hpp>
#include <mbgl/renderer/debug_bucket.hpp>
#include <mbgl/tile/tile.hpp>
#include <mbgl/tile/tile_data.hpp>
#include <mbgl/shader/plain_shader.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/gl/debugging.hpp>
#include <mbgl/gl/gl.hpp>
#include <mbgl/gl/gl_values.hpp>
#include <mb... |
3cedee9ed852a4f0e5c9f01ab3a684313308c841 | 222abb9b085e87ebcbdef781680d4d98ee39f540 | Ensiss/pokebot | /src/main.cpp | C++ | cpp | 2,265 | permissive | #include <iostream>
#include <SDL.h>
#include "../vbam/gba/GBA.h"
#include "../vbam/gba/Globals.h"
#include "../vbam/gba/armdis.h"
#include "../vbam/sdl/SDLGlobals.h"
#include "../vbam/sdl/debugger.h"
#include "Data.hh"
#include "Script.hh"
#include "ThumbDisas.hh"
#include "PrintUtils.hh"
#include "Bot.hh"
#inc... |
6cc30ce701b30163f883f49a53cfd0c5ab004bd8 | 017863f84a77e7941da2e35c5c3111f47312adc7 | akshayrajp/Competitive-Programming | /Codeforces/313A.IIyaAndBankAccount.cpp | C++ | cpp | 403 | no_license | #include <iostream>
using namespace std;
int main()
{
long long ip, ult, penult;
cin >> ip;
if (ip == -10)
cout << 0;
ult = ip, penult = ip;
ult /= 10;
short t = penult % 10;
penult /= 10;
penult += t;
if (ip > ult && ip > penult)
cout << ip;
else if (ult > ip && ... |
fae6406441d340484ebadeb333df6353fb56eda5 | 7b8fd59e31cef93f140c754f00217dbecfc3ab58 | arabindamoni/cci | /cci/ch4/6.cc | C++ | cc | 1,667 | no_license | #include<iostream>
#include<cstdlib>
using namespace std;
class bstree_6{
protected:
class node{
public:
int data;
node *left;
node *right;
};
node *root;
int size;
node *makeNode(int data){
node *p = new node();
p->left=NULL;
p->right = NULL;
p->data = data;
return p;
}
node *insert(int data,node... |
0c0b098d49c500f665d1634609ef2fb9ed04aeee | 2973aba1409ec8304a8d7cddc9bb2fe30aea5735 | alabuzhev/FarManager | /far/common/base64.hpp | C++ | hpp | 5,687 | permissive | #ifndef BASE64_HPP_C0835DDC_DB5A_4C40_A84C_146D6CFE6BFD
#define BASE64_HPP_C0835DDC_DB5A_4C40_A84C_146D6CFE6BFD
#pragma once
/*
base64.hpp
*/
/*
Copyright © 2020 Far Group
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following c... |
892892bb63c5872d0b0223e7e9f2c0433662e2d3 | 2679c39911e1a12e43ba373e2dab42dcafb05fcc | cuneytakinlar/pupil-ellipse-fit-error | /EllipseFitError/EllipseFit.cpp | C++ | cpp | 31,164 | no_license | #include <stdio.h>
#include <math.h>
#include <string.h>
#include "EllipseFit.h"
struct Pixel{int r, c;};
///-----------------------------------------------------------
/// Allocate a 2D array of noRows rows and noColumns columns
///
static double **AllocateMatrix(int noRows, int noColumns){
double **m = new double... |
2e2f09535e9445366b9314477ee4a03295fe49d2 | 76490c025e4f51501600c0de468da02a4b4b4707 | liubq98/Cpp_exercises | /code/BinaryTree.cpp | C++ | cpp | 6,430 | no_license | #ifndef BT_TREE
#define BT_TREE
#include <iostream>
using namespace std;
struct node {
int ele;
node* left;
node* right;
node(int e):left(0), right(0){
ele = e;
}
};
class BinaryTree {
private:
node* root;
// 此处四个函数均为辅助函数
static void MemoryDelete(node* p); // 内存处理的辅助函数
... |
76b19eda5fc009e635115766a4db6ce30b587782 | b4d28a9ac2868510f45689867647618a9e43e42b | happyscene/cpp | /jmuduo/muduo/net/Buffer.cc | C++ | cc | 1,706 | no_license | // Copyright 2010, Shuo Chen. All rights reserved.
// http://code.google.com/p/muduo/
//
// Use of this source code is governed by a BSD-style license
// that can be found in the License file.
// Author: Shuo Chen (chenshuo at chenshuo dot com)
//
#include <muduo/net/Buffer.h>
#include <muduo/net/SocketsOps.h>
#in... |
b05a8e76175f3844d1f5b2b5fd242126c4a4a9f8 | 90dc8aed116130177b0a4003a5f7a41ddebecdcc | Cccceb/UvaCode | /子集生成-二进制法.cpp | C++ | cpp | 542 | no_license | #include<iostream>
#include<algorithm>
#pragma warning(disable:4996)
#define LOCAL
#ifdef LOCAL
FILE *fin = freopen("子集生成in.txt", "r", stdin);
//FILE *fout = freopen("子集生成out.txt", "w", stdout);
#endif //LOCAL
using namespace std;
void subset(int n, int s) {
cout << s << " : ";
for (int i = 0; i < n; i++)
if (s&(... |
d20d23750c358b357a1d9076094042e0a1e6bc1f | 4265e0b1b3a2d7331c477edcf8f37ab6add186f6 | nmostafa/ngraph | /src/ngraph/op/one_hot.hpp | C++ | hpp | 6,196 | 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... |
a77a61516126bc5f006737363f5c1165a96b786e | 9c4f08873fe1d42a326069c263c0e1478d3fdd69 | QPC-database/aws-sdk-cpp | /aws-cpp-sdk-alexaforbusiness/source/model/DeleteContactRequest.cpp | C++ | cpp | 921 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/alexaforbusiness/model/DeleteContactRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::AlexaForBusiness::Model;
using namespace Aws::Uti... |
08ddad9f7fa9b12c8f4773f6e9da248530c01182 | e49829d998691ad658962255c67b27115d6e0edf | klangfreund/jucePlayground | /tooltip/JuceLibraryCode/modules/juce_gui_basics/widgets/juce_ComboBox.cpp | C++ | cpp | 18,588 | no_license | /*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2013 - Raw Material Software Ltd.
Permission is granted to use this software under the terms of either:
a) the GPL v2 (or any later version)
b) the Affero GPL... |
71dbf721fcd20fdd10d29a822b162d96ee027acf | e23b9ec4ff3a8e411b8e1200ec4f75a7b994ddd2 | meniossin/src | /net/url_request/url_request_context.cc | C++ | cc | 7,120 | 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 "net/url_request/url_request_context.h"
#include <inttypes.h>
#include "base/compiler_specific.h"
#include "base/debug/alias.h"
#include "b... |
562b78b64963877ecd9cb120ad2d47eba7fea0cd | 0c02cf67375beb0e31139d742a66bb57901917e2 | jcombitsis17/UCLA-CS32 | /Project 2/Sequence.cpp | C++ | cpp | 9,242 | no_license | #include "Sequence.h"
#include <iostream>
using namespace std;
Sequence::Sequence() //NOTE: m_head->next is position 0 in Sequence (head is dummy node)
: m_size(0)
{
m_head = new Node;
m_head->prev = m_head;
m_head->next = m_head;
}
// Create an empty sequence (i.e., one with no items)
Sequence::Sequence(... |
f21a51d8176f3cf7aef8c93b2f512915868594f4 | 0c7b18bff021cef23356cf95b2d80c83edb6b29f | dbwls89876/Ru | /BAEKJOON/Step/7. string/1316_grop_word_checker.cpp | C++ | cpp | 557 | no_license | #include <iostream>
#include <cstring>
using namespace std;
int main(){
int n, count;
cin>>n;
for(int i = 0; i<n; i++){
char arr[100];
int alphabet[26] = {0};
cin>>arr;
for(int j = 0; j<strlen(arr); j++){
if(alphabet[arr[j]-'a']==0)
alphabet[arr[j]-'a']++;
else if(alphabet[arr[j]-'a']>0){
... |
c9c7192ceade25b3e9901cc99fef80ae2545bf42 | f640cfcc6f391c603f2e418d42e64175e7d9e0be | GValiente/butano | /games/butano-fighter/src/bf_circle_generator.cpp | C++ | cpp | 1,775 | permissive | /*
* Copyright (c) 2020-2023 Gustavo Valiente gustavo.valiente@protonmail.com
* zlib License, see LICENSE file.
*/
#include "bf_circle_generator.h"
#include "bn_cstring.h"
#include "bn_display.h"
namespace bf
{
void circle_generator::set_radius(bn::fixed radius)
{
BN_ASSERT(radius >= 0, "Invalid radius: ", r... |
be42ddaac27a14dc9dea17cf83f9ccff5d53e6ca | 2a78b8b243be68c5e0e4e93373fb2dec7314b70f | edisonhello/waynedisonitau123 | /Contest/AsiaPacific/Seoul2020/C.cpp | C++ | cpp | 750 | no_license | #include <bits/stdc++.h>
using namespace std;
vector<int> g[100005];
int mark[100005];
void dfs(int now, int pa) {
int init = mark[now];
for (int i : g[now]) if (i != pa) {
dfs(i, now);
mark[now] += mark[i];
}
if (!init && mark[now]) ++mark[now];
}
int main() {
int n, m; cin >> n... |
399f96de63869ce34c273258bfa899726f8c2528 | e7a451b70e49bf5fb4a85cfe6b1e168572e747b8 | fsps60312/old-C-code | /C++ code/HSNU Online Judge/240(6).cpp | C++ | cpp | 3,709 | no_license | #include<cstdio>
#include<set>
#include<map>
#include<vector>
#include<string>
#include<algorithm>
#include<cassert>
using namespace std;
const char emptychar=' ';
struct State
{
char *up;
vector<char>down;
int n;
vector<int>remain;
State(){}
State(const int len):n(len),up(new char[len]){for(int i=0;i<n;i++)up[i]... |
cd8e16b0570e65213c26e9e58a4da46c5b83e16f | ad6986c4c22efd07dcd166dce58b7ea418c0341b | niall-d-tw/envoy | /test/extensions/filters/network/common/fuzz/uber_per_readfilter.cc | C++ | cc | 9,026 | permissive | #include "envoy/extensions/filters/network/direct_response/v3/config.pb.h"
#include "envoy/extensions/filters/network/local_ratelimit/v3/local_rate_limit.pb.h"
#include "envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.h"
#include "extensions/filters/common/ratelimit/ratelimit_impl.h"
#include "extensi... |
c06b7737e918c88899206ced29b85910500b225d | 9fe53066ff81fb83262571b12b9fbf2125f5c2d5 | amiremadz/UdacityCppNanoDegree | /4-concurrency/3-mutex_locks/example_3.cpp | C++ | cpp | 1,331 | no_license | #include <iostream>
#include <thread>
#include <vector>
#include <future>
#include <algorithm>
#include <mutex>
double result;
void printResult(int denom)
{
std::cout << "for denom = " << denom << ", the result is " << result << std::endl;
}
void divideByNumber(double num, double denom)
{
try
{
/... |
5955991966e14cf9b11f73d1edaa4c624ea6fb9e | e1e51b26779503290f954e84f7ab021c8db33005 | kevinbyrom/FootballPoC | /src/Source/SelectGameModeStage.cpp | C++ | cpp | 711 | no_license | #include <windows.h>
#include "SelectGameModeStage.h"
#include "Football.h"
void SELECT_GAME_MODE_STAGE::Opening()
{
//////////////////////////
// //
// Opening of the stage //
// //
//////////////////////////
OutputDebugString("OPENED :: SELECT GAME MODE STAGE\r\n");
}
void SELECT_GAME_MODE_... |
45f72d1fa97c84da2ff48e35eecf65a2bd20abc9 | 737da2bf3d45c3d401c9d3e82f34e6b4cc646633 | SPriyal/work | /github/c++/Bank/main.cpp | C++ | cpp | 598 | no_license | #include <iostream>
#include "Bank.h"
using namespace std;
char currentTime[20];
int main()
{
Bank * bank = new Bank();
Customer * customer = bank->CreateCustmer("Json","Whright","2010-10-10");
cout<<"CUSTOMER"<<endl;
cout<<customer<<endl;
unsigned long accountId1 = customer->OpenAccount(ACOUNT_TYPE_CHEQUE,1000)... |
8996871568a0bc3471b8055a3605de474aa564c9 | ce6e8bf51198b79ef8039002884d4fc3693292f0 | CozartKevin/CS-480_Artificial_Intelligence_SSU | /Project1/Node.cpp | C++ | cpp | 588 | no_license | //
// Created by Raggdoll on 1/25/2020.
//
#include <iostream>
#include "Node.hpp"
Node::Node(std::vector<int> v)
{
vector = v;
number = convertVector(v);
parent;
}
long long Node::convertVector(const std::vector<int> &v)
{
long long temp = 0;
for (int i = 0; i < v.size(); i++)
{
temp... |
80193dedf47dab0dee26eaa4d4fb5c7b1db83ff0 | 61b1159ab92d71997705fbcf46732ddf3a883795 | johnathan79717/competitive-programming | /Facebook/Checkpoint/kelvin.cc | C++ | cc | 881 | no_license | #include <stdio.h>
#include <map>
#define MAXVAL 10000050
using std::map;
const int inf=1000000000;
int ways;
int cm[2][MAXVAL+1];
int cmap[MAXVAL+1]={0};
inline void pre() {
cmap[1]=1;
for(int i=0;i<=MAXVAL;i++) {
int ii=i&1;
int pi=!ii;
cm[ii][0]=cm[ii][i]=1;
for(int j=1;j<i;j++) {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.