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 |
|---|---|---|---|---|---|---|---|---|
bbbe4c35ca839271407711500cb832274dd97b42 | 7d39b21a312645bdd8e87aa3040ddad07bca4f7c | DimDem/TestGenerator | /Gen_test.cpp | C++ | cpp | 31,430 | no_license |
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <cstdlib>
#define IN_ANAL_
#include "../../../include/dvm.h"
#undef IN_ANAL_
#include "../../../include/aks_structs.h"
#include <map>
#include <string>
using namespace std;
SgFile *current_file;
int current_file_id;
int RezervLabel... |
b1692d9709fefb48466615219e30261966db813e | 246ad2da552b690b2982b1e92059d938a8332943 | markguozhiming/ParSim | /Vaango/src/CCA/Components/Peridynamics/BondBasedFailureModels/PeridynamicsFailureModel.cc | C++ | cc | 3,331 | no_license | /*
* The MIT License
*
* Copyright (c) 2013-2014 Callaghan Innovation, New Zealand
*
* 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 t... |
4a445be718da6339f729dec83e9ef308ecae4cb2 | 6035a8e7014283a92c2243cf9f8cffa2b13390a6 | pthaike/coder | /hiho/hiho101.cpp | C++ | cpp | 3,881 | no_license | /**
http://hihocoder.com/contest/hiho101/problem/1
跳舞链
输入
第1行:1个正整数t,表示数据组数,1≤t≤10。
接下来t组数据,每组的格式为:
第1行:2个正整数n,m,表示输入数据的行数和列数。2≤n,m≤100。
第2..n+1行:每行m个数,只会出现0或1。
输出
第1..t行:第i行表示第i组数据是否存在解,若存在输出"Yes",否则输出"No"。
样例输入
2
4 4
1 1 0 1
0 1 1 0
1 0 0 0
0 1 0 1
4 4
1 0 1 0
0 1 0 0
1 0 0 0
0 0 1 1
样例输出
No
Yes
*/
#include ... |
f29065dcd0f71818e573b09246a4fa8e3356ee32 | 93aa42c8b00db74e7838ae037bf5b3a261b0276d | jarski4/Object-Oriented-Programming | /Project/main.cpp | C++ | cpp | 1,807 | no_license | #include <SFML/Graphics.hpp>
#include <time.h>
using namespace sf;
int
main()
{
srand(time(0));
RenderWindow app(VideoMode(400, 400), "Minesweeper!");
int w = 32;
int grid[12][12];
int sgrid[12][12]; // for showing
Texture t;
t.loadFromFile("/home/jarski44/Pictures/tiles.jpg");
Sprite s(t);
for (... |
e2ed291319ecddb7be2bfa83cd98a1fb0f35603e | e6e5f9a5a7eca9d07362ee73538f780a9bc7a80a | dasmysh/sgct | /src/sgct/ShaderManager.cpp | C++ | cpp | 17,025 | no_license | /*************************************************************************
Copyright (c) 2012-2015 Miroslav Andel
All rights reserved.
For conditions of distribution and use, see copyright notice in sgct.h
*************************************************************************/
#include <sgct/ogl_headers.h>
#inclu... |
54360b0d0748536d30b4ca1107a8aaef3ddf17f0 | 2db3c82ed8b0b94592dbfcdd52f56ffe81146fdb | zakuro9715/OpenSiv3D | /Siv3D/src/Siv3D/Print/CPrint.hpp | C++ | hpp | 1,755 | permissive | //-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2022 Ryo Suzuki
// Copyright (c) 2016-2022 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include <Siv3D/Font.hpp>
# incl... |
63c536353031266f7bf66c6b4cfb6ebb89976def | 5770c2109e294700772c8c17a6398d5daa566931 | projectceladon/compute-runtime | /unit_tests/command_queue/enqueue_kernel_two_ioq_tests.cpp | C++ | cpp | 3,564 | permissive | /*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_queue/command_queue.h"
#include "runtime/event/event.h"
#include "test.h"
#include "unit_tests/fixtures/hello_world_fixture.h"
#include "unit_tests/helpers/hw_parse.h"
using namespace NEO;
struct TwoIO... |
12c25c11e3489f6c411492850f24c743a98163a2 | 4f035a3b7597b5c0490a4d1235e1cff9ea0782e9 | bt0DotNinja/moead | /geneticOperators.cpp | C++ | cpp | 3,964 | no_license | #include <vector>
#include <cmath>
#include <iostream>
#include <limits>
#include <random>
#include <functional>
#include <omp.h>
#include <algorithm>
#include "decomp.h"
#include "pfront.h"
#include "geneticOperators.h"
long double GENOPS::repara(long double val, long double min, long double max){
long double X=val... |
8765bb67d0b5e24e5ef63ca63a08bfae031312cb | 3aae3245ff5aea3f6dc5e3c8fcd50e049d701f0e | deejayslay/Graphing-Algorithms | /main.cpp | C++ | cpp | 6,779 | no_license | #include "project3.h"
#include <cmath>
#include <fstream>
#include <iostream>
#include <locale.h>
#include <stdio.h>
#include <string>
#include <vector>
#include <cstdio>
#include <random>
#include <numeric>
#include <algorithm>
#include <math.h>
#include "graph_algorithms.cpp"
#include "node.cpp"
#include "graph.cpp"
... |
2d1bf1de675e185b26219649dcf65b93f5ec4419 | 4e7b2a68c9c2a4f56d96750fb4171296c10ad6aa | DistinctWind/OI | /old/Balanced Lineup.cpp | C++ | cpp | 1,284 | permissive | #include <cstdio>
using namespace std;
const int MAXN=5e4+1;
const int LOGN=16;
int n,q,h[MAXN],log[MAXN];
int f[MAXN][LOGN+1],g[MAXN][LOGN+1];
int max(int a,int b)
{
return a>b?a:b;
}
int min(int a,int b)
{
return a<b?a:b;
}
inline void read(int &x)
{
x=0;
char a=getchar();
while (a<'0'||a>'9') a=getchar();
whi... |
dd6cab2474a99ed03ec572f96869f296bb9304a8 | 5f90d3e6566de1d8001ab9c7408cc1d5c89dd6ad | vincent-picaud/LinearAlgebra | /src/LinearAlgebra/dense/matrix_crtp_fwd.hpp | C++ | hpp | 271 | no_license | #pragma once
#include "LinearAlgebra/dense/vmt_crtp_fwd.hpp"
#include "LinearAlgebra/utils/crtp.hpp"
namespace LinearAlgebra
{
template <typename IMPL = Crtp_Final_Impl>
class Matrix_Crtp;
template <typename IMPL = Crtp_Final_Impl>
class Dense_Matrix_Crtp;
}
|
0fbf4042b5c531a477fbd5545494fa909d5e623c | 8097a4c01b6f8eb6081577b07c5f23827dc9ec2c | WhiZTiM/coliru | /Archive2/41/878310d2c6adce/main.cpp | C++ | cpp | 521 | no_license | #include <iostream>
#include <type_traits>
class A {};
int main()
{
std::cout << std::boolalpha;
std::cout << std::is_fundamental<A>::value << '\n';
std::cout << std::is_fundamental<int>::value << '\n';
std::cout << std::is_fundamental<int&>::value << '\n';
std::cout << std::is_fundamental<int*... |
3e75b5c48f6bca6b6b4e0121f1034cd92aa7b281 | 47ffc998dbe83919a81c06e4016b8e4d23c57a29 | AmigaPorts/devilutionX | /Source/gendung.cpp | C++ | cpp | 11,998 | permissive | /**
* @file gendung.cpp
*
* Implementation of general dungeon generation code.
*/
#include "all.h"
DEVILUTION_BEGIN_NAMESPACE
BYTE dungeon[DMAXX][DMAXY];
BYTE pdungeon[DMAXX][DMAXY];
char dflags[DMAXX][DMAXY];
int setpc_x;
int setpc_y;
int setpc_w;
int setpc_h;
BYTE *pSetPiece;
BOOL setloadflag;
... |
33589f2bc086ee2ddbddae518b5fe24edba046d0 | f3e3b6ec5fa4539688c6865a8af3cf395f3d5e0b | SimonMarie/coolfluid3 | /cf3/solver/actions/Proto/NodeLooper.hpp | C++ | hpp | 6,979 | no_license | // Copyright (C) 2010-2011 von Karman Institute for Fluid Dynamics, Belgium
//
// This software is distributed under the terms of the
// GNU Lesser General Public License version 3 (LGPLv3).
// See doc/lgpl.txt and doc/gpl.txt for the license text.
#ifndef cf3_solver_actions_Proto_NodeLooper_hpp
#define cf3_solver_act... |
2595164fc9710e0ae50159632adfa5121b23933b | 9ce9d33a67250bb9ed0e4b28277f788210a3447f | Mrhero-web/leetcode-pp | /code/ch17/17.5.1.poorPigs.cpp | C++ | cpp | 265 | permissive | #include <cstdlib>
#include <cmath>
class Solution {
public:
int poorPigs(int buckets, int minutesToDie,
int minutesToTest) {
int cnt = 0;
while (pow(minutesToTest / minutesToDie + 1, cnt) <\
buckets)
cnt += 1;
return cnt;
}
};
|
c6e56fc58b7bf90c8e2463b0946f089fa68e92db | 8c2aeec2a98ff294cbae1150ddfe01b658e314dc | firebolt55439/libairplay | /src/airplay_browser.cpp | C++ | cpp | 4,166 | permissive | #include <iostream>
#include <exception>
#include <netdb.h>
#include <dns_sd.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include "common.hpp"
#include "airplay_browser.hpp"
const std::string airplay_browser::AIRPLAY_REGTYPE = "_airplay._tcp";
airplay_browser::airplay_browser() {
CH... |
ed49ce99b520ac6985d20eaa7da64e2b48c17b47 | 3d8a7e4349ac07608799343a51f3e45065e64a8d | PLkolek/CosmicShooter | /src/Systems/StandsOnSystem.cpp | C++ | cpp | 3,164 | no_license | /*
* File: StandsOnSystem.cpp
* Author: kolzi
*
* Created on 8 czerwiec 2013, 14:09
*/
#include "StandsOnSystem.hpp"
/*
* File: CollisionSystem.cpp
* Author: marzena
*
* Created on 20 luty 2013, 00:06
*/
#include "Systems/CollisionSystem.hpp"
#include "Components/BoundingBoxComponent.hpp"
#include ... |
fbacf7d3493efaa09c51e97cd7e6a75e252352bd | 946c5bad5081f0c397b408d0260915f979ba4fc6 | shaynachhari/basic_c- | /unions.cpp | C++ | cpp | 377 | no_license | #include<iostream>
using namespace std;
union ic
{
int rollno;
char namestarts;
int uid;
};
int main(){
union ic nitin;
nitin.namestarts='N';
nitin.rollno=51;
cout<<nitin.rollno<<endl;
cout<<nitin.namestarts<<endl;
nitin.uid = 2412;
cout<<nitin.uid<<endl;
cout<<nitin.rollno... |
a12a10fe21f10c615a87bb0e402b6ba234c2b608 | cdcc2806d4426ef4743fa94e16c9e1ee67646ae8 | skyrich62/PEGTL | /include/tao/pegtl/internal/path_to_string.hpp | C++ | hpp | 790 | permissive | // Copyright (c) 2020-2022 Dr. Colin Hirsch and Daniel Frey
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
#ifndef TAO_PEGTL_INTERNAL_PATH_TO_STRING_HPP
#define TAO_PEGTL_INTERNAL_PATH_TO_STRING_HPP
#include <st... |
5a078c28c231302747a2194b7875aa9b7077ebcd | eb8dd9e66a817c5c4f85b7596e0a725270d684f2 | jclouise/stellar-core | /src/catchup/CatchupWork.cpp | C++ | cpp | 16,882 | permissive | // Copyright 2017 Stellar Development Foundation and contributors. Licensed
// under the Apache License, Version 2.0. See the COPYING file at the root
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
#include "catchup/CatchupWork.h"
#include "catchup/ApplyBucketsWork.h"
#include "catchup/ApplyL... |
9c81256a8a3976eabf354abdd5e4764fe067158f | ae8bdadbf065d0902c727c286adb99537a1b52d6 | liamkf/fastbuild | /Code/Tools/FBuild/FBuildCore/BFF/Functions/FunctionUsing.cpp | C++ | cpp | 4,297 | permissive | // FunctionUsing
//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
#include "Tools/FBuild/FBuildCore/PrecompiledHeader.h"
#include "FunctionUsing.h"
#include "Tools/FBuild/FBuildCore/FLog.h"
#in... |
03b92123b7170b1876e90de8d33f9152c77581c7 | b8948128ef1c44c6106fd3cb7953e83793287e36 | ArtemGomer/ProgrammingOnCpp_NSU | /Semester1/Lab1/test.cpp | C++ | cpp | 3,708 | no_license | //
// Created by Gomer on 09.10.2019.
//
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "tritset.h"
TEST_CASE("Creating set") {
tritset set1(5);
REQUIRE(set1.size() == 2);
REQUIRE(set1.capacity() == 5);
tritset set2(0);
REQUIRE(set2.size() == 0);
REQUIRE(set2.capacity() == 0);
REQUIR... |
263b9caa38f34b374f416119e11e3366a85486cb | 3f31d68d977a2c47b6a846daf5a1e1b4cf9dae70 | kite874/test | /GWToolbox/GWToolbox/Windows/MaterialsWindow.cpp | C++ | cpp | 25,001 | no_license | #include "MaterialsWindow.h"
#include <imgui_internal.h>
#include <GWCA\GWCA.h>
#include <GWCA\Managers\ItemMgr.h>
#include <GWCA\Managers\MerchantMgr.h>
#include <GWCA\Managers\StoCMgr.h>
#include <GWCA\Context\GameContext.h>
#include "GuiUtils.h"
#include <logger.h>
#include <Modules\Resources.h>
void MaterialsWi... |
39d598e10f34e2f76059d6bfd0667cf6747b2ceb | 773ac9edc18f6cdeb525dca5029c38160d745000 | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/ComputerSystemNodeCapabilities/tests/ComputerSystemNodeCapabilities.Tests/main.cpp | C++ | cpp | 2,113 | 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... |
1b8489cb1b1b85029acd264898525ba78cbe534b | 786d4f4d8e67cc1e40143afc53356b8094a90de4 | ourarash/cpp-template | /src/main/main_undefined_behavior_sanitizer.cc | C++ | cc | 2,192 | no_license | // Demo of undefined behavior Sanitizer.
// By Ari Saif
// Run with this command:
// bazel run --config=ubsan //src/main:main_undefined_behavior_sanitizer \\
// -- --choice=[choice]
// , where choice is one of the values from 0 to 6. See the main function below.
#include <iostream>
#include <string>
#include <vector>
... |
49d92c13e427515cf6f0ea1a54a445018859147f | 5759b129fb7f52055c4acc3d5e7d9fcc4d52fa95 | wpumacay/dart | /dart/dynamics/detail/RevoluteJointAspect.hpp | C++ | hpp | 3,149 | permissive | /*
* Copyright (c) 2011-2022, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, w... |
d34dcc718be49f09e8970c62184ac1f6f608210c | 2edf390add0194867c80e6a8e0b6598f71355da1 | grasingerm/PL | /inher2.cc | C++ | cc | 766 | no_license | #include <iostream>
class Base
{
protected:
int alpha;
public:
Base() {}
Base(int a) : alpha(a) {}
virtual int da() { return 2*alpha; }
int db() { return 2; }
};
class Derived : public Base
{
protected:
int beta;
public:
Derived() {}
Derived(int a, int b) : beta(b) { alpha = a;... |
eeeacf0961a925623f4e724634590f0ef7992864 | d76d46a6017c44bc114ac89aa350d27cfb2d7304 | furkandinc/Engine | /Engine/Src/Core/Object/ObjectHandler.cpp | C++ | cpp | 1,179 | no_license | #include "ObjectHandler.h"
ObjectHandler::ObjectHandler() {
this->count = 0;
this->size = 128;
this->list = (Object **)malloc(sizeof(Object *) * this->size);
}
void ObjectHandler::add(Object * object) {
checkSize();
if (indexOf(object) == -1) {
this->list[count++] = object;
}
}
int ObjectHandler::indexOf(Obj... |
9f43808410d9591c8afe94a187eb606ab009a94a | bb281d78dbc475d896d6629258a8ae73e0501cf6 | mmha/sycl-blas | /test/unittest/blas1_swap_test.cpp | C++ | cpp | 2,819 | permissive | /***************************************************************************
*
* @license
* Copyright (C) Codeplay Software Limited
* 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
*... |
9382597dc645da8cd0530a3ae69bfc55c7a5c229 | 401952a57d603edd4447379ef05d813bcee4bc87 | pixeldust-project-caf/android_frameworks_av | /media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp | C++ | cpp | 33,392 | permissive | /*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
13b2151654b01fda316b2f7c31b91e4a3a32dc92 | 3b30401d8639385c6555c671c87a47960266548f | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/ImagingWorkStatisticalData/UNIX_ImagingWorkStatisticalData_FREEBSD.hxx | C++ | hxx | 1,839 | 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... |
f3e65eb4ba8f3aead19fe385fa5fd469f38afe5a | 6f8288721f6903d578fd63fac1eb57d49c3b4265 | vitco/demos | /DemoFMP4/Bento4/Core/Ap4Processor.cpp | C++ | cpp | 31,086 | no_license | /*****************************************************************
|
| AP4 - File Processor
|
| Copyright 2002-2008 Axiomatic Systems, LLC
|
|
| This file is part of Bento4/AP4 (MP4 Atom Processing Library).
|
| Unless you have obtained Bento4 under a difference license,
| this version of Bento4 is Bento... |
9660d59b8219991fac60d41c37fe74e22496bee8 | c374b5728a697c67b6453bc33adb86855fd0eee6 | vkkhare/NachOS | /nachos/code/userprog/exception.cc | C++ | cc | 9,525 | permissive | // exception.cc
// Entry point into the Nachos kernel from user programs.
// There are two kinds of things that can cause control to
// transfer back to here from user code:
//
// syscall -- The user code explicitly requests to call a procedure
// in the Nachos kernel. Right now, the only function we support is
... |
c45955c67eb410f1516eefd92cb77b1a6892b613 | 4249afbd0527294df85afcb858ad0e3931ccfc1d | vovanhuy/codeforces-code | /intel-code-2016/E.cpp | C++ | cpp | 2,968 | no_license | // #include <bits/stdc++.h>
#include <iostream>
#include <limits>
#include <iomanip>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <sstream>
using namespace std;
#... |
9cd94d0fae912f8fa12beb58ddde43a446aa37c2 | 91ee8ca4c14ea47be85e51d07102c88c93ac6de4 | agatacsomething/BallKalman | /src/BallKalman.cpp | C++ | cpp | 10,019 | no_license | #include <iostream>
#include <numeric>
#include <opencv2/opencv.hpp>
typedef cv::vector<cv::Point2f> Pointlist;
void GetBallCenter (Pointlist ¢ers, cv::Mat &frame, int &rad_new);
void CombineImages (cv::Mat &frame1, cv::Mat &frame2, cv::Mat &out_image);
void GetKalmanPredict (cv::Point ¢er);
int main(int arg... |
d5e134f541ad5240c04f6897f65ac84df76b23e2 | ffaad5507601dd3781fede1edd9f8b98a3f75ac5 | byrantwithyou/PhysBAM | /Public_Library/OpenGL/OpenGL/OPENGL_MAC_VELOCITY_FIELD_3D.cpp | C++ | cpp | 8,833 | no_license | //#####################################################################
// Copyright 2004-2009, Eran Guendelman, Andrew Selle.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#######################################################... |
92e9bcd993f30a583a90f637ad83786d43403a04 | 10f583909dd088ae1f56298161ae3f1b7a7ea95e | big-guy/cpp-demo | /lib5impl/src/main/cpp/lib5implimpl2api1.cpp | C++ | cpp | 1,003 | no_license | // GENERATED SOURCE FILE
#include "lib5impl_private.h"
#include "lib5impl_impl.h"
#include "lib5core1.h"
#include "lib6api1.h"
#include "lib5core2.h"
#include "lib6api2.h"
#include "lib6api3.h"
#include <iostream>
#include <stdio.h>
/*
* Here is a function.
*/
int lib5implimpl2api11(int a, int b) {
return a + b;... |
05fb559574d32028a2f9371b5ea8b5009ec73588 | 279314c98c4c1b320919d6179c497aff1cb1d3fb | bugsnag/bugsnag-cocos2dx | /examples/example-cpp-app/cocos2d/extensions/GUI/CCControlExtension/CCControlSwitch.cpp | C++ | cpp | 13,511 | permissive | /*
* Copyright (c) 2012 cocos2d-x.org
* http://www.cocos2d-x.org
*
* Copyright 2012 Yannick Loriot. All rights reserved.
* http://yannickloriot.com
*
* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software a... |
0420e8a765647876857002462f0616039281b2f1 | 1beb86acf5680c2fda7e72891a2a87eecc5dbd03 | ondrej-vesely/GEO1004-hw3 | /cpp/tree-RANSAC/external/magnum/src/Magnum/ShaderTools/AbstractConverter.cpp | C++ | cpp | 36,318 | permissive | /*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Softwa... |
2231e91d956bc7b0fbcef0ef643323c3622c45b9 | 6baf22377667377ff898895557f9c60cb398aa41 | arhipovo/neodash-testing | /src/qt/transactionrecord.cpp | C++ | cpp | 11,145 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2016 The Neodash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "transactionrecord.h"
#include "base58.h"
#include "consensu... |
f1a49d0a3a24116c1eebc80fbe7fb4f7165cf976 | 1b566d7c3f2cb238f1424f5fa176f9de3b624201 | EasonZhu/rcc | /vxl/vxl-1.13.0/contrib/rpl/rgtl/tests/test_octree_dual_visit.cxx | C++ | cxx | 2,387 | permissive | //:
// \file
// Copyright 2006-2009 Brad King, Chuck Stewart
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file rgtl_license_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <testlib/testlib_test.h>
#include <rgtl/rgtl_octree_dual_visit.hxx>
#include <rgtl/rgtl_... |
e1d744081be38ae3fe451ee245bb2201e3ff7347 | 4be06ae51decc4c82965fb6d4d6c70823a01fbb4 | developercyrus/skmobile | /SKMobile/skcore/sort.cpp | C++ | cpp | 13,710 | no_license | /* BEGIN LICENSE */
/*****************************************************************************
* SKCore : the SK core library
* Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr>
* $Id: sort.cpp,v 1.6.4.7 2005/02/17 15:29:20 krys Exp $
*
* Authors: Mathieu Poumeyrol <poumeyrol @at@ idm .dot. fr>
* ... |
9ae8d8a749fc66a40cf40dd57d597474da57a546 | e5431d43254013c12c83266e7e76dbf215f2bff2 | ankita462/August-Leetcode-challenge | /26_Fizz Buzz.cpp | C++ | cpp | 509 | no_license | class Solution {
public:
vector<string> fizzBuzz(int n) {
vector<string> v;
int i=1;
while(i<=n) {
if(i%3==0 && i%5==0) {
v.push_back("FizzBuzz");
}
else if(i%5==0) {
v.push_back("Buzz");
}
else if(i%... |
63e3c90217738eed42aa4bffca2c4ff9de2ed0cc | 748381262a2138743d48a7884c9c2a4e05b6c5d2 | Eisweinjlee/c-programming-pracitce | /C language/Codes/9.5_LinkList3_ope.cpp | C++ | cpp | 1,789 | no_license | #include<stdio.h>
#include<stdlib.h>
struct Node
{
int value;
struct Node *next;
};
void insertNode(struct Node **head, int value)
{
struct Node *previous;
struct Node *current;
struct Node *insert;
current = *head;
previous = NULL;
while(current != NULL && current->value < value)
{
previous = current;... |
9ba5313d9318283388aeec985e23756f6f4f108c | 683b278a1148512508d81d455bf8e33fe30e31f3 | orestonce/SnakeGame-qt | /core/Point.cpp | C++ | cpp | 419 | no_license | #include "Point.h"
namespace restonce {
Point::Point(int x, int y)
: m_x(x), m_y(y)
{
}
int Point::getX () const
{
return m_x;
}
int Point::getY () const
{
return m_y;
}
void Point::setX (int x)
{
m_x = x;
}
void Point::setY (int y)
{
m_y = y;
}
bool operator == (const Point& p1, const Point&... |
e21cb768959c71e4ff688aba025463d81195d357 | 30d0ed0b2e8682c6701698dd6e747a7b8c97730a | Radiation-Physics-Group-of-Alexandria/GeantV | /physics/particle/src/generated/CreateParticle0003.cxx | C++ | cxx | 11,237 | no_license | // This files was autogenerated by geant::ParticleOld::ReadFile
#if defined(__clang__) && !defined(__APPLE__)
#pragma clang optimize off
#endif
#include "ParticleOld.h"
#ifdef VECCORE_CUDA
#include "base/Vector.h"
template <typename T>
using vector = vecgeom::Vector<T>;
#else
using std::vector;
#endif
namespace geant... |
9f9eb4779267a7357aec14307a8586ac88087594 | c46d27bed4ff965eb4f2460f9777161fa4ebb7e7 | thesunisgas/aws-sdk-cpp | /aws-cpp-sdk-eks/source/model/InvalidRequestException.cpp | C++ | cpp | 2,134 | permissive | /*
* Copyright 2010-2017 Amazon.com, 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://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
f38e073136755831d39f9db87adaf9f391ab160e | 0c36f954b2456330a5e49757c458e4d27da4ae3f | helloqirun/webkit | /Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp | C++ | cpp | 58,015 | no_license | /*
* Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of ... |
7ceee5455c21d4f71ec2c0c98a133c7dfd4bf9ac | 1adffb11632ca94f9732443ee880c043a9475693 | pgeorgiev98/hexed | /app/hexviewinternal.cpp | C++ | cpp | 24,056 | permissive | #include "hexviewinternal.h"
#include "bufferededitor.h"
#include "gotodialog.h"
#include "findwidget.h"
#include "byteinputwidget.h"
#include <QPainter>
#include <QPaintEvent>
#include <QMouseEvent>
#include <QWheelEvent>
#include <QKeyEvent>
#include <QtGlobal>
#include <QFontDatabase>
#include <QMenu>
#include <QAc... |
670b8f849557d9f1163ba07aafaa5ce87beb81f1 | cb3295308359fbcff2b84d16de7848618cde84ed | satoshikumano/CarND-Kidnapped-Vehicle-Submission | /src/particle_filter.cpp | C++ | cpp | 8,960 | no_license | /*
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: Tiffany Huang
*/
#include <random>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <math.h>
#include <iostream>
#include <sstream>
#include <string>
#include <iterator>
#include "particle_filter.h"
using namespace std;
/... |
8bc28b1a8c51cdf7cccbe9eb2889b3e88600a658 | 4d012124046d6273c32ac2d8285028915761363c | ConorStokes/boondoggle | /boondoggle/audio.cpp | C++ | cpp | 18,479 | permissive | #include "audio.h"
#include <windows.h>
#include <mmdeviceapi.h>
#include <audioclient.h>
#include "../common/boondoggle_helpers.h"
#include <float.h>
#include <assert.h>
#define _USE_MATH_DEFINES
#include <math.h>
namespace
{
const float NOISE_FLOOR = -120.0f;
const uint32_t MIN_REQUIR... |
2ec95d787b4307694faf2048fa03fe613f347d6e | 57cdb051a44e6020dc7d58e23d038b5009c3a0a4 | Shirish111/LeetCode | /3SumClosest/a.cpp | C++ | cpp | 1,466 | no_license | // 3Sum Closest
// Given an array nums of n integers and an integer target, find three integers
// in nums such that the sum is closest to target. Return the sum of the three
// integers. You may assume that each input would have exactly one solution.
// Example:
// Given array nums = [-1, 2, 1, -4], and target = 1.... |
250ae3789433799699bf6bab40217a739ef9af5e | acb1c1b433aa9b11dd95e3ad8fdd1573cac3da8a | Tyler-Lentz/DungeonProject | /DungeonProject/equipment.cpp | C++ | cpp | 2,986 | no_license | #include "equipment.h"
#include "item.h"
#include "mapobject.h"
#include "game.h"
#include "player.h"
#include "virtualwindow.h"
#include "colorstring.h"
void Equipment::action(Player* player, unsigned int inventoryIndex)
{
std::string output;
if (esid == EquipSlotId::ARMOR)
{
player->getArmorMemo... |
e856b610caf5efb8454e60d618324a014d4b3472 | 2408c9323ab0b734831492550c67d22a2f261659 | MMPavlv/YA.examples | /fsm/LexicalAnalyzer.cpp | C++ | cpp | 4,863 | no_license | #include "LexicalAnalyzer.hpp"
#include <locale>
#include <cctype>
char FSM::LexicalFSM::getNextChar()
{
if (++index == expr.end())
return '\n';
return *index;
}
std::vector<FSM::lexem> FSM::LexicalFSM::Parse()
{
initHandler();
return lexems;
}
FSM::LexicalFSM::symbol FSM::LexicalFSM::getT... |
734e5547650ab4234f4f75bb4ace90828834562a | 4aa7d6de9216a98cb3f1926d09dd55ed8c23d5d2 | aaaaliyun/apollo | /modules/map/tools/map_xysl.cc | C++ | cc | 19,558 | permissive | /******************************************************************************
* Copyright 2017 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
... |
7e2ef40de8289f1999eb8db39912e487e6afb8cd | 434bb7fe5356613ef5ac35bf1880ed460983078e | mcellteam/mcell | /libmcell/generated/gen_surface_class.cpp | C++ | cpp | 8,048 | permissive | /******************************************************************************
*
* Copyright (C) 2021 by
* The Salk Institute for Biological Studies
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*
***********... |
69c639b72409c513756dc2b134cd9c6c02c595c0 | 6ba5694920e4acc5258135666e7e5e1a475ec306 | congnima/Leetcode | /Pow(x, n).hpp | C++ | hpp | 625 | no_license | //Pow(x, n)
//
//Implement pow(x, n).
class Solution
{
public:
double myPow(double x, int n)
{
if (0 == n)
return 1;
bool bNegative = false;
if (n < 0)
{
bNegative = true;
n = -1 * n;
}
if (1 == x)
return 1;
else if (0 == x && !bNegative)
return x;
else if (0 == x && bNegative)... |
b5326f274c4fdd535bf95d5060cd8144f632039f | bbedeec684caf448b9fd62ec4cd7fb85ded98b6d | lineCode/xcikit | /src/xci/graphics/Primitives.cpp | C++ | cpp | 894 | permissive | // Primitives.cpp created on 2018-08-03, part of XCI toolkit
// Copyright 2018 Radek Brich
//
// 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... |
0a1e7c98419e8f070b41f4763def153419896f08 | c62ee4b864c18f5ed01e576c626b931328c62ca5 | terryschhoracverni/Phylogenetic_comps | /coding/parallelPhylo/treeBuilders/maximumLikelihoodClimb.cpp | C++ | cpp | 13,394 | no_license | //maximmLikelihood.cpp
//Given an aligned sequences and options, it creates a tree topology
//that explains the evolutionary history of sequences.
#include "maximumLikelihoodClimb.h"
#include "../util/species.h" /* MutationMap() */
#include <iostream>
#include <math.h> /* exp() */
Tre... |
62a3f40272c02a1777c188b89ec8d9ba0d2dd2ec | 8d5f0c6a81655ce1c6b06e416ca51ad0e864264b | 2003pro/code-of-acm | /summer training selection/Great Qiushi and Intergal Tree/main.cpp | C++ | cpp | 1,602 | no_license | #include <cstdio>
#include <string>
#include <iostream>
struct Tree{
int left,right;
long long ma,sum;
}t[400003];
int a[100003];
using namespace std;
void build(int id,int l,int r);
void update(int id,int x,int v);
long long query(int id,int l,int r);
int main()
{
int l,r,c,m,n;
scanf("%d",&n)... |
2484a9cd6f23e7ddf8de01a4a8ade91bbb5790c5 | e6aa4feded262470363d161f4dd6d6d6472ac004 | pmadhikar/xtp | /src/libxtp/aomatrices/aomomentum.cc | C++ | cc | 24,030 | permissive | /*
* Copyright 2009-2017 The VOTCA Development Team
* (http://www.votca.org)
*
* 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
*
* ... |
e7a88fb50358a60819c2370beac5a720869ff98b | ea551ae26242d7b7c44cea58cbe02207489106ab | Daruria/CopyProject | /MyDungreed/MyDungreed/EffectManager.cpp | C++ | cpp | 3,588 | no_license | #include "stdafx.h"
#include "EffectManager.h"
#include "NormalEffect.h"
#include "RotateEffect.h"
#include "Effect.h"
#include "FontEffect.h"
DEFINITION_SINGLE(CEffectManager);
CEffectManager::CEffectManager()
{
}
CEffectManager::~CEffectManager()
{
Release();
}
void CEffectManager::Initialize()
{
}
int CEffect... |
a686df9113f713abb57197226da2d74500090b0a | af5e419a64af416183e7a15b642e1a38afb75e58 | SipsCo/Sips | /src/spork.cpp | C++ | cpp | 6,876 | permissive | // Copyright (c) 2015 The SIPS developers
// Copyright (c) 2009-2012 The Darkcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bignum.h"
#include "sync.h"
#include "net.h"
#include "key.h"
#include "... |
8d63d27c18726c009248efbfe0568de0981e5016 | 2177f2c953b2e108aac4755fa3f820868ab52766 | Treefold/LFA | /2_L-NFA_to_DFA.cpp | C++ | cpp | 8,780 | no_license | #include <iostream>
#include <fstream>
#include <set>
#include <map>
#include <queue>
#include <string>
using namespace std;
class Automat
{
static const char lambda = '.';
int nrStates, nrSimbols, nrFinalStates, nrTranzitions, initialState;
set <int> states;
set <char> simbols;
set... |
0310b57c92f70080e4e8688003c33d4feadf431c | ccdf5cf4fc8d9ccd858f1707528bc6a48b0b0a29 | thejosess/Informatica-UGR | /2ºAÑO/1ºCuatrimestre/ED/relacionED3/wuolah-free-ejercicios4b/Ejercicio15.cpp | C++ | cpp | 2,350 | no_license | /*
Implementa una función bintree<int>::node ancestro_comun
(bintree<int>::node n1) que devuelva el nodo que sea el primer ancestro
común a los nodos n1 y n2. La eficiencia debe ser proporcional a la altura
del árbol.
*/
#include <iostream>
#include "bintree.h"
using namespace std;
template <typename T>
void ... |
6391394a7d992ce894d12e7b06179826d7346b7b | 91e0007a34c5269ef9632a884bc514f7d6055446 | freean2468/scrap_irons | /ver_development/Engine_System/LightEffect.cpp | C++ | cpp | 547 | no_license | #include "../BaseHeader.h"
CLightEffect::CLightEffect(COrgan* t_pOrgan):CBaseEffect(LIGHT){
// 상태기계를 설정한다.
m_pStateMachine = new CStateMachine<CLightEffect>(this);
LoadEntityData("./script/Effect/LightEffect.txt", this);
// 처음 상태를 초기화
m_pStateMachine->SetCurrentState(LightEffectUsual->Instance());
m_pStateMac... |
23d8369182f25d698713d2f2a00242d1df12d0c1 | a5568255d2d4be4acec0f9b92c5367b9e7ae773c | dammj/UdemyCpp | /6_STLContainerUndIteratoren/ListVsVector.cc | C++ | cc | 787 | permissive | #include <iostream>
#include <vector>
#include <list>
#include <numeric>
void vec_time()
{
std::vector<int> data(100, 0);
std::iota(data.begin(), data.end(), 0);
std::vector<int> my_data(data.begin(), data.end());
auto it = my_data.begin();
for (int i = 0; i < 2000; ++i)
{
it = my_dat... |
9463e2a56471edced3bb31da030c11f495a59663 | 19fbd402bac45f4d7f7d3a6816454f2be1964ca9 | ashok2811/CP_OLD | /Learning/Linked List/linked_list_del.cpp | C++ | cpp | 1,101 | no_license | #include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
Node* next;
};
Node* head;
void Insert(int data, int n){
Node* temp1 = new Node();
temp1 -> data = data;
temp1 -> next = NULL;
if (n==1)
{
temp1 -> next = head;
head =temp1;
return;
}
Node* temp2 = head;
for (int i = 0; i < n-2... |
9b78ac136c54057c5c3c9047ba76a59d133fd2b8 | 88a9868f5ba3c81db898be8edc44f8d65134958b | agicy/OI | /Luogu/P2120.cpp | C++ | cpp | 1,182 | no_license | #include<bits/stdc++.h>
using namespace std;
#define reg register
typedef long long ll;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
static char buf[1<<21],*p1=buf,*p2=buf;
inline int read(void){
reg bool f=false;
reg char ch=getchar();
reg int res=0;
while(!isdigit(ch)) f|=(c... |
35e2f903b86bfd3c37e5b864614f87e8cb0cf296 | 42a814d5c6fd8995a12a9299370e1632f5cf3b66 | tthhee/xiangyu | /Algorithm/Sort/QuickSort.cpp | C++ | cpp | 1,934 | permissive | #include <iostream>
#include <algorithm>
#include <time.h>
#include <windows.h>
using namespace std;
template<typename ElementType>
ElementType Median3(ElementType (&array)[10], int left, int right)
{
int center = (left + right) / 2;
if (array[left] > array[center])
{
swap(array[left], array[center]);
}
if (arr... |
a5a85dc6f6ec0155a17607d48b1d5fc073526ad8 | cc9e95481733342e67399df0bc0da7a2cde68ac9 | cju5025/Antagonizer-Remake | /Source/PluginEditor.cpp | C++ | cpp | 632 | no_license | #include "PluginProcessor.h"
#include "PluginEditor.h"
AntagonizerRemakeAudioProcessorEditor::AntagonizerRemakeAudioProcessorEditor (AntagonizerRemakeAudioProcessor& p)
: AudioProcessorEditor (&p), audioProcessor (p)
{
setSize (MAIN_PANEL_WIDTH, MAIN_PANEL_HEIGHT);
mMainPanel = std::make_unique<Main... |
fbb72a718937629833ad719e0deaff661d163e35 | 3b70d9c3cdfc9fca0f6c3ec7d8a5c8fc00ebcb62 | grayasm/git-main | /tutorial/andrew_krause_gtk+/11_custom_widgets/ipaddresstest.cpp | C++ | cpp | 1,082 | no_license | #include <gtk/gtk.h>
#include "myipaddress.hpp"
void ip_address_changed (MyIPAddress*);
int main (int argc, char** argv)
{
gint address[4] = { 1, 20, 35, 255 };
gtk_init (&argc, &argv);
GtkWidget* window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "GtkIPAddress");
gt... |
0e7d3ce2ca42b79e4bfffd6ad6ca214a35e90408 | fd2e1cb2d9fe4345450120585a40adad39927d1d | stardog-union/boost | /libs/thread/test/sync/mutual_exclusion/null_mutex/try_lock_for_pass.cpp | C++ | cpp | 1,747 | permissive | //===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===---------------------------------... |
11d62373ffca114a7e67cf3453d0673298ae931d | 1fe696045bba28ab8370bba158be3b740aefffb6 | jjmaldonis/Scintillator-Project | /Gate/John's program/include/RootIO.hh | C++ | hh | 2,475 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
51cebb3bd37d33b3f21e8d9f7117a1752cfa1e52 | c4856b61c06a700675b9247fcfb2cdb58de8afd5 | pauljoo28/llvm-project | /libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp | C++ | cpp | 7,242 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
a68c4f994baed0c3c6e3c9ef1fff717f8c0c7cce | e1bbe551129e1f27dd1d74315c4523455babd55e | jcrudy/chessai | /easy_profiler-1.3.0/easy_profiler_core/profile_manager.cpp | C++ | cpp | 66,538 | permissive | /************************************************************************
* file name : profile_manager.cpp
* ----------------- :
* creation time : 2016/02/16
* authors : Sergey Yagovtsev, Victor Zarubkin
* emails : yse.sey@gmail.com, v.s.zarubkin@gmail.com
* ----------------- :
* descr... |
3f71d17ae5c2d5ac0bcf48086a8d8797d31ca912 | d6f1d195c15f8309e131298deed132517a5d35cd | Cutehacks/duperagent | /response.cpp | C++ | cpp | 5,154 | permissive | // Copyright 2016 Cutehacks AS. All rights reserved.
// License can be found in the LICENSE file.
#include <QtCore/QRegExp>
#include <QtCore/QTextCodec>
#include <QtNetwork/QNetworkReply>
#include <QtQml/QQmlEngine>
#include <QJsonObject>
#include "response.h"
#include "serialization.h"
#include "duperagent.h"
names... |
26a8768bbdb20d7a7735f933ea91e723a26d1814 | bd4e2fdf268dc677e8b18c63df9fef201a17cd73 | infotron/chromium-src-chrome-browser | /browsing_data/browsing_data_remover.cc | C++ | cc | 43,461 | 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 "chrome/browser/browsing_data/browsing_data_remover.h"
#include <map>
#include <set>
#include "base/bind.h"
#include "base/bind_helpers.h"
... |
d205f3f3c5c89bc68949dd5ae68a80688f1f95b0 | d670be8ed235f979672e31945455f539612fe853 | mittalprince/DSA | /cb/Topic/sorting/bubble-sort.cpp | C++ | cpp | 478 | no_license | #include<iostream>
using namespace std;
void bubbleSort(int arr[], int n){
for(int i=0; i<=n-2; i++){
for(int j=0; j<n-i-1; j++){
if(arr[j] > arr[j+1]){
swap(arr[j], arr[j+1]);
}
}
}
}
int main(){
int n;
cin>>n;
int arr[n];
for(int i=0; ... |
41853b8b9ff8fdc4b19e47b178bc5e20a0d733bb | aa641084485ce6bf2e09688e9b8669ff78c0c00d | ccdxc/logSurvey | /data/crawl/make/old_hunk_1569.cpp | C++ | cpp | 916 | no_license | {
register struct file *f = d->file;
if (f->double_colon)
{
do
{
if (f->deps == 0 && f->cmds != 0)
{
/* This makefile is a :: target with commands, but
no dependencies. So, it will always be remade.
This might well cause an infinite loop, so don't
try to rem... |
e746cbb92892319ac2b215af07dfdc45e44f372d | dce8d0dce9f78b4ff2ca0841969493ad48162a21 | AumBhatt/aura-zmote | /test/tcps.cpp | C++ | cpp | 2,474 | no_license | #include <iostream>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <boost/algorithm/string.hpp>
#include <boost/asio.hpp>
#define buff_size 4096
#define PORT 4998
int main(int argc, char *argv[]) {
int new_socket;
// Socket Descriptor
... |
9f25b9762c72c19aa88b07efd76b0e29a0bd1add | 168e56a65584a598dd1684533b755bb879f66f93 | grpc/grpc | /src/core/ext/xds/xds_audit_logger_registry.cc | C++ | cc | 4,206 | permissive | //
// Copyright 2023 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
4581d6e7c57cd5d57cc8d5565f87c1192ea3bdcc | 1d40aa71457165a18b87666ad4d05b09897dae58 | qnyblog/opentoonz | /toonz/sources/toonzlib/txshsimplelevel.cpp | C++ | cpp | 79,414 | permissive | #include "toonz/txshsimplelevel.h"
#include "imagebuilders.h"
// TnzLib includes
#include "toonz/txshleveltypes.h"
#include "toonz/imagemanager.h"
#include "toonz/studiopalette.h"
#include "toonz/hook.h"
#include "toonz/toonzscene.h"
#include "toonz/levelproperties.h"
#include "toonz/levelupdater.h"
#include "toonz/fu... |
614d69b8e3761fc719bd5458c6c087d03c99f91d | 44270ed78f56ba10dd0396f8fa7670a071493545 | jtlap/nt2 | /modules/type/complex/base/unit/predicates/simd/is_invalid.cpp | C++ | cpp | 2,260 | permissive | //==============================================================================
// Copyright 2003 - 2013 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2013 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
e1584fc9fb8f9431b8c34cfcf46e93d7fdd7548e | a85f35bc1bb10a57318d339646a5b6ccb822276a | alexhilton/miscellaneous | /cc-work/basics/oop-in-cpp/chap05/tradeperson2.cc | C++ | cc | 1,133 | permissive | /*
* tradeperson2.cc
*
* another demonstration about Polymophism mechinism supported by
* c++.
*/
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
class TradePerson {
public:
virtual void sayHi() {
cout << "Just Hi, from class TradePerson" << endl;
}
};
class Tinker : public T... |
00455da7326a962343ff6d862c5949f00034d86c | 6a9b57b3116a7f97d38d7b992e7914d79541bc5e | ShuaifeiJi/Heima_cpp_note | /lesson05C++核心编程-内存-引用-函数高级/p84c++核心编程/p84c++核心编程/p90引用-引用的注意事项.cpp | C++ | cpp | 824 | permissive | /*
引用注意事项:
1、引用必须初始化
例如:int &b; // 错误的
2、引用在初始化后,不可以改变
例如: int &b = a;则不能再让b是变量c的别名了;
*/
#include <iostream>
using namespace std;
int main90() {
int a = 10;
// 1、引用必须初始化
// int &b; 报错:必须初始化引用
int &b = a;
cout << "b的地址: " << &b << endl;
cout << "a的地址: " << &a << endl; // 地址相同,相当于b和a是这块地址的不同名字
// 2、引用在... |
19662a7ab2e291c02c78ecfd0d7fab1d9d91ead0 | 70e787b3231d14bf885e1995b7a77ba9c4691db1 | KUNPL/KEBII | /source/base/KBRun.cc | C++ | cc | 30,379 | permissive | #include "KBRun.hh"
#include "TEnv.h"
#include "TSystem.h"
#include "TStyle.h"
#include "TApplication.h"
#include "TRandom.h"
#include "TGraph.h"
#ifdef ACTIVATE_EVE
#include "TEveViewer.h"
#include "TGLViewer.h"
#include "TEveGeoNode.h"
#include "TEveManager.h"
#include "TEveScene.h"
#include "TEveWindow.h"
#include... |
3c7c4d7e74f994fc2e5756cc64963fdaeab6f959 | af354e7ea61000e9d096c1a66dfa0f10a8655c5e | captainys/FM | /7/util/RS232CTapeBIOS/bioshook_bufferedCOM1.cpp | C++ | cpp | 725 | no_license | #include "bioshook_bufferedCOM1.h"
const char * const clientBinary_bufferedCOM1[]=
{
"S12360002004FBB0FC2034771A50108EFD00BEFBFAAF8C64AF8C72CC0510A72CE72BC60A4F",
"S1236020CE06F46FC05A26FB6F22A72F308C4DC681EE8CCEEF8C3811A38CC9270F308C4DF3",
"S1236040C6708D19308C1EEE8CBAC6178D0F867EB700DEAE8CAEBF00DFA62F35F7A680A7EF... |
bedd4e1da59e70fa585505887408ee70bdd2211d | e6eb3a5da5f3d0157091029ef202339177317df5 | kryssb/SySal2000 | /Thin3DTracker/Thin3DTrk.cpp | C++ | cpp | 39,590 | no_license | // Thin3DTrk.cpp : Implementation of CThin3DTracker
#include "stdafx.h"
#include "Thin3DTracker.h"
#include "Thin3DTrk.h"
#include <math.h>
#include <stdio.h>
#include "EditConfig.h"
const double PI_CONV = atan(1.) / 45.;
/////////////////////////////////////////////////////////////////////////////
// CThi... |
38a4f64dca4a7e32e1b3643ee9dbd8e59811578d | 2013b67e6aa32b403a6e097638cf7176068f6ae8 | dlftls38/algorithms | /since2018/integrated_algorithm/16637_2.cpp | C++ | cpp | 2,457 | no_license | #include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <limits.h>
#include <functional>
#include <math.h>
#include <fstream>
#define INF 987654321
#define MAX_VALUE 1000000000
#define MO... |
dcc2034e0232bf8ad76e7fb5868fbcb4b6825f68 | d27395f2ae0f3f110f8434d531380c3e2c50b9fd | jimmy128bit/llvm | /tools/llvm-objcopy/llvm-objcopy.cpp | C++ | cpp | 8,510 | permissive | //===- llvm-objcopy.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
e5bf4220b3dc2e4832b4bd89a3964539523da70e | 07f2faa7feaba86334ecd7d1892ab0cef81383a9 | DerickMasters/COP4534_P4 | /GenBatchDataSet.cpp | C++ | cpp | 5,767 | no_license | //-----------------------------------------------
// Derick Masters
// COP4534_Data_Structures
// GenBatchDataSet.cpp
//
// This file will define the class in
// GenBatchDataSet.hpp
//
// ----------------------------------------------
#include"GenBatchDataSet.hpp"
/***************************************************... |
d0384464ccb6d0b3c5c751d04e1d3e78052b0f1f | 4321c3ec03d6272496e19ab93fc1fe2aa487d971 | luckyzahuo/Snorlax | /leetcode-retag/heap/1792-Maximum-Average-Pass-Ratio.cpp | C++ | cpp | 3,190 | no_license |
/*
* 题目是在是太 TM 长了,所以直接放链接:
* - https://leetcode-cn.com/problems/maximum-average-pass-ratio/
* - https://leetcode.com/problems/maximum-average-pass-ratio/
*
* Input: classes = [[1,2],[3,5],[2,2]], extraStudents = 2
* Output: 0.78333
*
* Explanation: You can assign the two extra students to the first class.
... |
fe36ec7bd1cd898806e3ca1770895165968da2f4 | 630066122165c192adcf8d14ffd4cc5544fd07c8 | fanal1st/licode | /erizo/src/erizo/rtp/RtcpForwarder.cpp | C++ | cpp | 7,477 | permissive | /*
* RtcpForwarder.cpp
*/
#include "RtcpForwarder.h"
#include <string.h>
namespace erizo{
DEFINE_LOGGER(RtcpForwarder, "rtp.RtcpForwarder");
RtcpForwarder::RtcpForwarder (MediaSink* msink, MediaSource* msource, uint32_t maxVideoBw):
RtcpProcessor(msink, msource, maxVideoBw), defaultVideoBw_(maxVideoBw/2){
... |
09cb9c2a8c8837d9299f7cb66bd719789f243127 | 559ba3bdca0e80a1a95b5e6dd5d6b2b8c66e124d | xyh-cosmo/GMAT | /plugins/EstimationPlugin/src/base/estimator/SequentialEstimator.hpp | C++ | hpp | 5,300 | permissive | //$Id: SequentialEstimator.hpp 1398 2011-04-21 20:39:37Z $
//------------------------------------------------------------------------------
// SequentialEstimator
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool
//
// ... |
e6558ef0ad1d2ab0c58fb56dde531bfcc5dcb910 | c22f3a70d3920bfc91ca6f4cb3ed00797783fcdf | hollobit/CHITOS | /IoTivityServerForRPI3/device/temperature5.cpp | C++ | cpp | 6,669 | permissive | #include "iotivity_config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#include <signal.h>
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
#include "ocstack.h"
#include "logger.h"
#include "ocpayload.h"
... |
4949d3d56fbbb0059997aa8c572612a51f053061 | b60d442cef95eba808e302127bdb0d95b10152b0 | GGBone/WM4 | /GeometryTool/SamplePhysics/RoughPlaneFlatBoard/RoughPlaneFlatBoard.cpp | C++ | cpp | 3,071 | no_license | // Geometric Tools, Inc.
// http://www.geometrictools.com
// Copyright (c) 1998-2006. All Rights Reserved
//
// The Wild Magic Version 4 Restricted Libraries source code is supplied
// under the terms of the license agreement
// http://www.geometrictools.com/License/Wm4RestrictedLicense.pdf
// and may not be copie... |
231979a39bcce9b611f0553176d3b03e14332638 | fa0882b6416742e27fd0f34e3a642a0ae4235572 | tokitsu-kaze/ACM-Solved-Problems | /nowcoder/牛客练习赛33/308E - tokitsukaze and Similar String.cpp | C++ | cpp | 2,835 | no_license | #include <bits/stdc++.h>
using namespace std;
/************* debug begin *************/
string to_string(string s){return '"'+s+'"';}
string to_string(const char* s){return to_string((string)s);}
string to_string(const bool& b){return(b?"true":"false");}
template<class T>string to_string(T x){ostringstream sout;sout<<x... |
eaa7b2f6c7a91224892ab55832b1420e65f74e4f | eb9d92964951f8667394c53c183edc80ab9f7934 | KentoNishi/POJ-Solutions | /solutions/4sum0/main.cpp | C++ | cpp | 1,209 | no_license | // http://poj.org/problem?id=2785
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int N;
vector<vector<int>> vals;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> N;
vals = vector<vector<int>>(4, ve... |
ab62d0d4f21af33a1de3127c84d36a28f469c895 | 21fba0c95365ed33f75ad46c8c156459e13145e6 | PranakBarua/CodeForces | /919a.cpp | C++ | cpp | 337 | no_license | #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n,m,a,b,i;
double x,y,z=0.0;
cin>>n>>m;
for(i=1;i<=n;i++){
cin>>a>>b;
x=(double)a/(double)b;
y=(double)m*x;
if(i==1)
z=y;
if(y<z)
z=y;
}
printf("%0.8lf\n",z);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.