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 |
|---|---|---|---|---|---|---|---|---|
90ca0fd3a4625b815892274a76ff7012938f4aa5 | 0bf3ab6a03d849b5e57100474e715376ffd6b723 | juhyupLee/RedBlackTree | /RedBlackTree/MemoryTracer.cpp | C++ | cpp | 4,941 | no_license | #include "MemoryTracer.h"
#include <stdio.h>
#include <iostream>
#include <Windows.h>
#include <time.h>
class CMemoryTracer
{
private:
struct stMemory
{
void* m_Pointer;
const char* m_FileName;
int m_FileLine;
size_t m_Size;
bool m_bArray;
bool m_bUsed;
};
public:
enum
{
ARRAY_SIZE = 500,
FILE_N... |
f16bf8f4b39c681848e9cb6e784d2908ab9e48ac | adc905a9f44dee8332cceca4812b6a7a144a4020 | conan513/mangosbot-bots | /playerbot/strategy/shaman/RestorationShamanStrategy.cpp | C++ | cpp | 43,192 | no_license | #include "botpch.h"
#include "../../playerbot.h"
#include "ShamanMultipliers.h"
#include "RestorationShamanStrategy.h"
using namespace ai;
class RestorationShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
RestorationShamanStrategyActionNodeFactory()
{
creators["earthli... |
5167b7ead4e7ed1000a465bfcfc6ff450f421161 | de164f7ffc0e838ed81cc5dba3be6efe6235e41e | sherifff/SyntaxAnalyzer | /SyntaxAnalyzer/SyntaxAnalyzer.cpp | C++ | cpp | 8,239 | no_license | #include "stdafx.h"
#include "SyntaxAnalyzer.h"
SyntaxAnalyzer::SyntaxAnalyzer(void)
{
}
SyntaxAnalyzer::~SyntaxAnalyzer(void)
{
}
SyntaxAnalyzer::SyntaxAnalyzer(string CFGfilePath)
{
FILE* GrammerFile = fopen(CFGfilePath.c_str(),"r");
if (GrammerFile==NULL)
{
cout << "Can't open file" << endl;
}
... |
a2c04f105a56ffd2e10c51456b76a06d00ea4cd2 | cb7b0dc2fa18202dc69645b48133935a015e63f0 | skfo763/Problem_Solving | /backjoon/dp/5582.cpp | C++ | cpp | 473 | no_license | #include <iostream>
#include <string.h>
using namespace std;
int dp[4001][4001];
int main(void) {
char str1[4001], str2[4001];
scanf("%s %s", str1, str2);
int i, j, s1, s2;
s1 = strlen(str2);
s2 = strlen(str1);
int max = 0;
for(i=1; i<=s1; i++) {
for(j=1; j<=s2; j++) {
if(str2[i-1] == str1[j-1]) d... |
62e4e8cb3f5a6f391ad7bae2b85ccb1e0d13d2b4 | f86cf66ad51bb14cac07bc9f1a3f3309bbc75dfd | saw235/MuhCprograms | /EulerProject/ProjectE Problem7 (10001st Prime)/Project1/Source.cpp | C++ | cpp | 367 | no_license | #include <iostream>
#include "isPrime.h"
int main()
{
using namespace std;
int upperlimit = 10001;
int startingnumber = 3;
int number = startingnumber;
int latestprime = 0;
for (int index = 2; index <= upperlimit; number = number + 2)
{
if (isPrime(number))
{
index++;
latestprime = number;
}
}
co... |
3b512795758b48c7e592d37c9ff57b32340c039d | 4c9fef638869a14c16b09acee665c635418093d1 | Bakser/My_Algorithm_Templates | /数据结构/可并堆/左偏树.cpp | C++ | cpp | 1,523 | no_license | //bzoj2809
#include<cstdio>
#include<iostream>
#define N 100100
#define MAX(a,b) (((a)>(b))?(a):(b))
typedef unsigned long long LL;
template<class T>
T read(T &x)
{
x=0;
static char c(0);
for(;c<'0'||c>'9';c=getchar());
for(;c>='0'&&c<='9';c=getchar())(x*=10)+=c-'0';
return x;
}
class node
{
public:
int val,di... |
0cef0904630176ee3693035987cc9db03267dfb9 | 07fc837310914583526fa05c432e22a8e6d7ce20 | AlstonXiao/chrono | /src/chrono_models/vehicle/m113/M113_Idler.cpp | C++ | cpp | 4,946 | permissive | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of t... |
fb693f17cd8b4cbebf5f305cc6fa5a9f39b93262 | 18063dfe13c7e009ea7eeb90178cf91a249645d1 | UWPR/Comet | /MSToolkit/src/mzIMLTools/CResidue.cpp | C++ | cpp | 258 | permissive | #include "CResidue.h"
using namespace std;
CResidue::CResidue(){
code=' ';
mass=0;
}
void CResidue::writeOut(FILE* f, int tabs){
int i;
for (i = 0; i<tabs; i++) fprintf(f, " ");
fprintf(f, "<Residue code=\"%c\" mass=\"%.6f\" />\n", code,mass);
} |
173014e21fdb63a521b43d7fda9ae94509b06aee | 3944ba0a26377e462b15a48fdea3a0b3654e87a9 | zhouyuxaing/Assignment_03 | /201816040319/Ex03_15/Ex03_15.cpp | C++ | cpp | 666 | no_license |
// Create Date objects.
#include <iostream>
using namespace std;
#include "Date.h" // include definition of class Date
// function main begins program execution
int main()
{
int Month;
int Day;
int Year;
cout <<"plese input your number"<<endl;
cout <<"Month(1~12)"<<endl;
cin >>Month;
cou... |
780082425ea938d67e9049646478141344f4ad22 | 6e8a7eb3bc3ac201f21cd3361015413c67596e52 | kesireddyadarsh/ME791 | /HomeWork_1.cpp | C++ | cpp | 6,469 | no_license | //
// main.cpp
// HomeWork_1
//
// Created by adarsh kesireddy on 1/26/17.
// Copyright © 2017 AK. All rights reserved.
//
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <ctime>
#include <cmath>
#include <time.h>
#include <vector>
#include <string>
#include <assert.h>
using namespace std;
//... |
f3670e7bba12f5ab032812e27e9f9f5fda15b49e | c7cd7cfafa2946dc6cc7dbddf7167962706a4e9a | avinfinity/UnmanagedCodeSnippets | /src/core/include/openOR/Plugin/detail/interfacePtr.hpp | C++ | hpp | 3,031 | permissive | //****************************************************************************
// (c) 2008, 2009 by the openOR Team
//****************************************************************************
// The contents of this file are available under the GPL v2.0 license
// or under the openOR comercial license. see
// /Doc... |
9fdf369d25542db0b55d9809bcbc246783ba38ab | e03f6fb2d39053f1d26f6fbe13a9285080f09b30 | roaz1801/project1 | /code/spec_algo.cpp | C++ | cpp | 2,034 | no_license | #include <iostream>
#include <cmath>
#include <fstream>
#include <string>
#include <iomanip>
#include <time.h>
using namespace std;
//Functions
inline double f(double x){return 100.0*exp(-10.0*x);
}
inline double u_val(double x){return 1.0-(1-exp(-10))*x-exp(-10*x);}
ofstream ofile;
int main(int argc, char *argv[])... |
1968fd37c1a1612c287d2c57ee9f3d2764566b93 | f4791149337c6589903c2822509737bf17e74c04 | anastasiamut/programming | /learning/OOP/Конструктор копирования.cpp | C++ | cpp | 895 | no_license | // Конструктор копирования
#include "pch.h"
#include <iostream>
#include <string>
using namespace std;
class MyClass
{
public:
int* data;
MyClass(int size)
{
this->size = size;
this->data = new int[size];
for(int i=0; i<size; i++)
{
data[i] = i;
}
cout << "Constructor. " << this << endl;
};
My... |
5935574c54c73203fda16fad8c00a66396ddc2c0 | 8200ba49c17671290939e24e44ef3219abf60e40 | chrisolston/serving | /tensorflow_serving/core/simple_loader_test.cc | C++ | cc | 5,718 | permissive | /* Copyright 2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
dbd10718436bcef02f5eb27c161009a69a40147d | e38555ce7f7e7fdab0f982a013106606b862c502 | adityavs/chromium-1 | /ash/public/cpp/app_list/app_list_config.cc | C++ | cc | 4,037 | 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 "ash/public/cpp/app_list/app_list_config.h"
#include "ash/public/cpp/app_list/app_list_features.h"
#include "base/macros.h"
#include "ui/gfx/col... |
6f68fa0c9a192ac3d4fe9e33c4907e1360b442c9 | 7297295a22753ef0683736c32989e42e26ec4157 | TeamVault/tauCFI | /C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-15231.cpp | C++ | cpp | 2,911 | no_license | struct c0;
void __attribute__ ((noinline)) tester0(c0* p);
struct c0
{
bool active0;
c0() : active0(true) {}
virtual ~c0()
{
tester0(this);
active0 = false;
}
virtual void f0(){}
};
void __attribute__ ((noinline)) tester0(c0* p)
{
p->f0();
}
struct c1;
void __attribute__ ((noinline)) tester1(c1* p);
struct c1 : virtual... |
8da9024efbe57e42aa40a9e6b9107abda24ba8c7 | 5f1a038e90494f16df9502196bb990a825c5ca7f | alexvonduar/gtec-demo-framework | /DemoFramework/FslBase/UnitTest/source/FslBase/UnitTest/Math/Pixel/Test_PxThicknessU.cpp | C++ | cpp | 3,351 | permissive | /****************************************************************************************************************************************************
* Copyright 2020 NXP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the fo... |
984f5aa0be537a60d56932a238b74aca40aaddde | a55b4b4fe2dccd061da556d1023670c409eae6b8 | allywarner/SCIRun | /src/Interface/Modules/Base/CustomWidgets/CodeEditorWidgets.cc | C++ | cc | 10,744 | permissive | /*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2015 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to de... |
8c2bc45da15ce621151ddcf8fb5b6c4fd6e260e8 | 79d0a47699ed781efaf46f7073a217f0a90e9777 | jjzhang166/WinNT5_src_20201004 | /NT/base/fs/utils/format/parse.hxx | C++ | hxx | 1,297 | no_license | VOID
DisplayFormatUsage(
IN OUT PMESSAGE Message
);
BOOLEAN
DetermineMediaType(
OUT PMEDIA_TYPE MediaType,
IN OUT PMESSAGE Message,
IN BOOLEAN Request160,
IN BOOLEAN Request180,
IN BOOLEAN Request320,
IN BOOLE... |
b701352d4089e1b1a558989727848f2c964eb732 | d209bbfd50806b0b213eb636b3955f1618197cf0 | Qiyd81/RGA | /RadeonGPUAnalyzerBackend/Src/beProgramBuilderVkOffline.cpp | C++ | cpp | 30,217 | permissive | //=================================================================
// Copyright 2017 Advanced Micro Devices, Inc. All rights reserved.
//=================================================================
// C++.
#include <sstream>
// Infra.
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable:4309)
#en... |
8218a7ba397cf40c9aea94f19157f9f5827e21e9 | 12249cf1de73d5bd0d6209fd774345d8e5dda83f | cha63506/chromium-efl | /ewk/unittest/utc_blink_ewk_notification_title_get_func.cpp | C++ | cpp | 3,050 | permissive | // Copyright 2014 Samsung Electronics. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/* Define those macros _before_ you include the utc_blink_ewk.h header file. */
#include "utc_blink_ewk_base.h"
class utc_blink_ewk_notification_title_get... |
cea708134eb52fb8c5b05ee1410435e5e8ab200c | 45917934a7ded06e1c4f7bffc2c6494e66b863cc | osherson/OTSSA | /Ph2_ACF/tools/CMTester.cc | C++ | cc | 30,569 | no_license |
#include "CMTester.h"
// This has no bad-strip masking and does not take a reduced number of active strips into account yet!
// PUBLIC METHODS
CMTester::CMTester() : Tool()
{}
CMTester::~CMTester()
{}
void CMTester::Initialize()
{
// gStyle->SetOptStat( 000000 );
// gStyle->SetTitleOffset( 1.3, "Y" );
... |
7218379210450abceb939bbad3408cb35d4ead46 | c5cb720ebfb2ae17f354b28feef76616af74c4d8 | WhiZTiM/coliru | /Archive2/ad/30532efbb8b0a9/main.cpp | C++ | cpp | 458 | no_license | #include <iostream>
#include <type_traits>
class A {};
template <class T>
T f(T i)
{
static_assert(std::is_integral<T>::value, "Integer required.");
return i;
}
int main()
{
std::cout << std::boolalpha;
std::cout << std::is_integral<A>::value << '\n';
std::cout << std::is_integral<float>::valu... |
6cc54ae3ef666590357bb5f0b8a26a1fcd732bf5 | 999aff19b11a542c2f2fa53a9f8b3603af740e93 | gustavo-candido/ONLINE-JUDGE | /URI/1477.cpp | C++ | cpp | 2,856 | no_license | #include <bits/stdc++.h>
#define F first.first
#define S first.second
#define T second
#define left(x) x << 1
#define right(x) (x << 1) + 1
#define mid(x, y) (x+y) >> 1
#define _n 100005
using namespace std;
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
iii tree[4*_n];
int lazy[4*_n];
iii join(iii a, iii b) ... |
582d147c32ef36b1fc8eccb6c0a44aa2b2dafaf2 | 3cd578ac88365b24864efdaf96fc2958b50a39d4 | theNded/Open3D | /src/Open3D/IO/FileFormat/FileSTL.cpp | C++ | cpp | 6,111 | permissive | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
f39fd5bcd59b4cf359a6efc195f4a94eccde0f1f | 9431e79c53db88b7a1a9ef6d722ccbc4f8caeab0 | lerolynn/homeServiceRobot | /add_markers/src/add_markers.cpp | C++ | cpp | 7,064 | no_license | #include <ros/ros.h>
#include <visualization_msgs/Marker.h>
#include <nav_msgs/Odometry.h>
#include <math.h>
float pickupX = 0.0;
float pickupY = 1.0;
float dropoffX = 0.0;
float dropoffY = 2.0;
//robot odom positions
float robotX;
float robotY;
//initially show marker at pickup zone
//hide marker once robot reaches ... |
14389eba4623ebd6e07ac4be01aa2f9bbb94f319 | 5f8443f854e0c31e2f0bc91c56e38d7c687d9ac9 | data4pass/sysfex | /src/sysfex.cpp | C++ | cpp | 4,640 | permissive | #include <sys/utsname.h>
#include <iostream>
#include <pwd.h>
#include <cmath>
#include <unistd.h>
#include <string.h>
#include <fstream>
#include <sstream>
#include <filesystem>
#include <algorithm>
#include <filesystem>
// For config stuffs
#include <map>
// For screen information
#include <X11/Xlib.h>
using std::c... |
ee9c1f37253672bc0594cad445d6177fa44f476a | dba4510848a711a80df2c80c345658af31d410d6 | HNarayana-youCanDoIt/Testproject | /x451/ProjectBase/Diagnostic/CDiagnosticAdaptor.cpp | C++ | cpp | 4,262 | no_license | /*****************************************************************
* Project Harman Car Multimedia System
* (c) copyright 2018
* Company Harman/Becker Automotive Systems GmbH
* All rights reserved
* Secrecy Level STRICTLY CONFIDENTIAL
***************************************... |
3fd52193d19e2e0bf2516055a4741e0f691b19bd | 61d83855bbda8a51d63d21ffb8da87174acddd71 | LazyerIJ/Algorithm | /Problem/Algospot/picnic.cpp | C++ | cpp | 1,147 | no_license | /*
https://algospot.com/judge/problem/read/PICNIC
*/
#include <iostream>
#include <cstring>
using namespace std;
bool pairs[10][10];
int num_friends;
int num_pairs;
int countPairs(bool taken[10]){
int firstpoint = -1;
for(int i=0; i<num_friends; i++){
if(!taken[i]){
firstpoint=i;
... |
08ee42efae213fddca152e12a21b171afd16d6ea | 8a7b5f52dce9a278a925310b249818294f02f06d | wael9823/ReversedWords | /fourth_approach.cpp | C++ | cpp | 1,138 | no_license | #include <iostream>
#include <string>
using std::cout;
using std::cin;
using std::endl;
using std::string;
using std::getline;
void reverseString(string &sen, int start, int end){
for(int i=start,j=end-1; i<(start+end)/2; i++,j--){
char temp = sen[i]; // function that reverses a string from given start... |
4d5387f88ee762049ca01e1e12f197075f142bcf | e5de22a240fe4031ef34567738d45b737b9fd615 | sky58/TopcoderSRM_AcceptedCodes | /281-1e.cpp | C++ | cpp | 1,335 | no_license | //SRM281DIV1-250 IntegerGenerator
#include<vector>
#include<cmath>
#include<map>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<set>
#include<stack>
#include<bitset>
#include<functional>
#include<cstdlib>
#include<ctime>
#include<q... |
27d0609e0d359a0223e05a5c78088e9fb062806e | e7e96976d8af79a2a9cb0016af5209b7d651fac8 | windirstat/llfio | /test/tests/symlink_handle_create_close/kernel_symlink_handle.cpp.hpp | C++ | hpp | 2,122 | permissive | /* Test kernel for symlink_handle create and close
(C) 2018 Niall Douglas <http://www.nedproductions.biz/> (5 commits)
File Created: Jul 2018
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 in the acc... |
be4373b6756d7b03a5217de96194f384ea385a55 | 5c3a71f6ffeb1a178ee9557277df302a209663c0 | frozeman/AndroidToken-reloaded | /src/version.cpp | C++ | cpp | 2,664 | permissive | // Copyright (c) 2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <string>
#include "version.h"
// Name of client reported in the 'version' message. Report the same name
// for both bitco... |
e3fa4f733b4debabf4755d340649d41f5446cc3c | eb9cafbdc7c98468a1315fb18c6cb2ebb56811ea | nsgomez/sc4fix | /EASTL/test/source/TestRingBuffer.cpp | C++ | cpp | 36,429 | permissive | /////////////////////////////////////////////////////////////////////////////
// Copyright (c) Electronic Arts Inc. All rights reserved.
/////////////////////////////////////////////////////////////////////////////
#include "EASTLTest.h"
#include <EASTL/bonus/ring_buffer.h>
#include <EASTL/bonus/fixed_ring_buffer.h>
... |
8875e17074b3898cddb5064f505d19f916daac73 | 93aaa67cca0eadbaf91e40df30ddc16f59734453 | RaphaelK12/softgl | /rast_reference/kernels/rast_tex_dst_src.cpp | C++ | cpp | 313 | no_license | #include "../kernel.h"
#define DEPTH_TEST 1
#define DEPTH_WRITE 1
#define COLOR_WRITE 1
#define DEPTH_CMP _mm_cmple_ps
#define SRC_BLEND GL_DST_COLOR
#define DST_BLEND GL_SRC_COLOR
#define KERNEL_NAME rast_tex_dst_src
#if USE_APROX_TEMPLATE
#include "template_aprox.h"
#else
#include "template.h"
#endif
|
5329576b6250ac9b2d45994256f2d58432306c92 | 8a6e1e6ff276417b0402341899f583fd1e27b464 | sbatururimi/path-planning | /src/main.cpp | C++ | cpp | 15,381 | permissive | #include <fstream>
#include <math.h>
#include <uWS/uWS.h>
#include <chrono>
#include <iostream>
#include <thread>
#include <vector>
#include "Eigen-3.3/Eigen/Core"
#include "Eigen-3.3/Eigen/QR"
#include "json.hpp"
#include "spline.h"
#include <cfloat>
#include "bestLane.hpp"
using namespace std;
// for convenience
... |
d06cdf8e3b306e308747251a75918aa89e1b0683 | 75135499c9f9239e39ec052be5276d18ed93631a | orangeturtle739/tako | /c/testsrc/test_typestest/test_bakery.cc | C++ | cc | 6,547 | permissive | // Copyright 2020 Jacob Glueck
//
// 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 to in ... |
b9a5a51022267a030f5e1e80e00cf27363dab3e7 | 707e265fa7fcdad5cad7fdd3bb1e90a3331d785b | martinivanco/DIP | /src/argparse.hpp | C++ | hpp | 1,664 | no_license | #ifndef __ARGPARSE__
#define __ARGPARSE__
#include <iostream>
#include <filesystem>
#include <vector>
#include <string>
#include <opencv2/core.hpp>
#include <opencv2/videoio.hpp>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "logger.hpp"
using namespace std;
class ArgParse {
private:
static const string HELP... |
541475041b8a5ef91e0357b9f8a5b71e79941874 | 85d8ecc635784215c63e405a4cd002f9e2ea76d9 | gp-akf/bmcweb | /include/sessions.hpp | C++ | hpp | 13,056 | permissive | #pragma once
#include "logging.hpp"
#include "random.hpp"
#include "utility.hpp"
#include <openssl/rand.h>
#include <boost/container/flat_map.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <dbus_singleton.hpp>
#include <nlohmann/json.hpp>
#inc... |
4a3308415f8a377b3610341fe8532d8b0c3d9af7 | 55da98b32d706d6176850f0012b775dc38c5f1f2 | gibtang/CCNSCoding | /samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceAllocTest.cpp | C++ | cpp | 12,084 | permissive | /*
*
*/
#include "PerformanceAllocTest.h"
#include <algorithm>
// Enable profiles for this file
#undef CC_PROFILER_DISPLAY_TIMERS
#define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers()
#undef CC_PROFILER_PURGE_ALL
#define CC_PROFILER_PURGE_ALL() Profiler::getInstance()->releaseAllTimers()
#u... |
c2ba409c465b65abbc8aa64fe553c5d9ea957f12 | 2d97f8c9e63ac530ff4ef6dccd43f3f797ac932b | junmin-zhu/blink | /Source/web/WebPasswordFormData.cpp | C++ | cpp | 7,056 | permissive | /*
* Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
45cb0166aed13d59029fdb6478491ca1e1d14fd2 | c0440b98881a6cf1165486001536d50cd934c663 | n1nj4n/boma | /Source/boma/Private/BMPickup.cpp | C++ | cpp | 1,311 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "BMPickup.h"
#include "components/SphereComponent.h"
#include "components/StaticMeshComponent.h"
#include "Kismet/GameplayStatics.h"
// Sets default values
ABMPickup::ABMPickup()
{
// setup collision object
Collision = CreateDef... |
33dda521cef4a0e9a6647833bf473c6915c255e1 | c1f6bc25685cc5ea8944c338f5ccbdc001056a52 | AIBluefisher/EGSfM | /ext/openMVG/software/SfM/main_ComputeMatches.cpp | C++ | cpp | 20,313 | permissive | // This file is part of OpenMVG, an Open Multiple View Geometry C++ library.
// Copyright (c) 2012, 2016 Pierre MOULON.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.... |
e57f9a8b3c5973ee7ffc31829277529524716671 | 68cc3217ea338b3fd76e6ce0ffb0c0d5691b8221 | kalachand/codes | /codechef/Bigo/date.cpp | C++ | cpp | 3,141 | no_license | /*******************
Akash Agrawall
IIIT HYDERABAD
***********************/
#include<cstdio>
#include<iostream>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<climits>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stack>
#include<queue>
#include<stdio.h>... |
a95a7cd16c4fe426d2b952be1c952f2058978061 | f342e5faf29980374dc5fecf732e014fb1cae0a5 | guidebee/irobot | /src/util/log.hpp | C++ | hpp | 811 | permissive | //
// Created by James Shen on 24/3/20.
// Copyright (c) 2020 GUIDEBEE IT. All rights reserved
//
#pragma ide diagnostic ignored "OCUnusedMacroInspection"
#ifndef ANDROID_IROBOT_LOG_HPP
#define ANDROID_IROBOT_LOG_HPP
#if defined (__cplusplus)
extern "C" {
#endif
#include <SDL2/SDL_log.h>
#if defined (__cplusplus)
... |
097950b654511978c0b0e4df5dec7876f54b6d96 | 30cddf2cb49140b8ce4648ea0dac64240cb5a7b0 | 1priyanshi/DSA | /array/SumOfArrays.cpp | C++ | cpp | 806 | no_license | #include<iostream>
using namespace std;
int main(){
int n, a[1000];
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
}
int m, b[1000];
cin>>m;
for(int i=0;i<m;i++){
cin>>b[i];
}
int c[1000]={0},carry=0;
int p=min(n,m);
int h= max(n,m);
for(int i=0;i<p;i++){
... |
95f525e8390c43ddb399c39333ab9a1789df41a2 | 98dd33f6c80e25fd6793ce4afd366d253721e457 | megatontech/osrm-backend | /unit_tests/extractor/graph_compressor.cpp | C++ | cpp | 8,741 | permissive | #include "extractor/graph_compressor.hpp"
#include "extractor/compressed_edge_container.hpp"
#include "extractor/restriction_map.hpp"
#include "util/node_based_graph.hpp"
#include "util/typedefs.hpp"
#include <boost/test/test_case_template.hpp>
#include <boost/test/unit_test.hpp>
#include <iostream>
BOOST_AUTO_TEST_... |
abe6e5206d946187e03d4d693fd4fe5565b58f18 | c6d9b0b6b355208f32f9627a19b508c8f2564904 | kroq-gar78/cascade | /src/ui/term/term_view.cc | C++ | cc | 3,115 | permissive | // Copyright 2017-2018 VMware, Inc.
// SPDX-License-Identifier: BSD-2-Clause
//
// The BSD-2 license (the License) set forth below applies to all parts of the
// Cascade project. You may not use this file except in compliance with the
// License.
//
// BSD-2 License
//
// Redistribution and use in source and binary fo... |
1e3cc7326c3cc758f4ac84377ebcb3fc29ae6203 | 287ba344ceea028311462599c1150349ae87e62b | shilpade/LeetCode | /Swap Nodes in Pairs.cpp | C++ | cpp | 538 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* swapPairs(ListNode* head) {
ListNode *p = head, *q;
if(head == NULL)
return NULL;
... |
897f1fb0317159a98e4c74f6e3ee937923beaeb0 | f2299db6ee821393d27ef4ed8d6808968e776fca | mahaitao617/simple-code-by-C.C- | /将字符串用八进制保存.cpp | C++ | cpp | 760 | no_license | #include<stdio.h>
void writeStr(const char* str,const char* file)
{
FILE* fp1 = fopen(file,"w");
if(fp1)
{
while(*str)
{
fprintf(fp1,"%02x",*str+128);
str++;
}
fclose(fp1);
}
}
void readStr(char* str,const char* file,bool print=0)
{
FILE* fp1 = fopen(file,"r");
if(fp1)
{
int a;
char *p_str = ... |
4b350a3a09c7c8d0d0b9b39086453d011ad12dcf | dff86d81db8126e25faa10c5ef89baecdfb354fe | KDE/libkgapi | /autotests/calendar/freebusyqueryjobtest.cpp | C++ | cpp | 2,742 | permissive | /*
* SPDX-FileCopyrightText: 2018 Daniel Vrátil <dvratil@kde.org>
*
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include <QObject>
#include <QTest>
#include "calendartestutils.h"
#include "fakenetworkaccessmanagerfactory.h"
#include "testutils.h"
#include "account... |
1714f167f0367ec2f99b0dfc77dc32319cdcc5f3 | 4edb19a9b4aa64ddeaf4034458edad4531353d4f | Takechiyoo/C-Code | /LeetCode/LeetCode/LeetCode/Find Minimum in Rotated Sorted Array.cpp | C++ | cpp | 675 | no_license | #include <iostream>
#include <vector>
using namespace std;
class Solution{
public:
int findMin(vector<int>& nums){
int length = nums.size();
int minNumber = nums[0] < nums[length - 1] ? nums[0] : nums[length - 1];
for (int i = 0, j = length - 1; i < j; i++, j--)
{
if (nums[i + 1] < nums[i])
{
minNu... |
b450fc3e6988d19a3f73e798baac4b7007a263c0 | 6c26d30b5174577b160b689787dd0c2bf3e3aa9f | maxcoolmakarov/mipt-mips | /simulator/modules/core/perf_sim.cpp | C++ | cpp | 3,174 | permissive | /*
* perf_sim.cpp - mips performance simulator
* Copyright 2015-2018 MIPT-MIPS
*/
#include "perf_sim.h"
#include <infra/memory/elf/elf_loader.h>
#include <chrono>
#include <iostream>
template <typename ISA>
PerfSim<ISA>::PerfSim(bool log) :
CycleAccurateSimulator( log),
memory( new Memory),
fetch( l... |
ac3ec0a826534099967d4e938815083e3181432f | 0be925b1ee731d1dff1d064ce6e0a934d0d77499 | ludioao/servidorHttp | /Cache.cpp | C++ | cpp | 6,579 | no_license | #include <iostream>
#include <time.h>
#include <fstream>
#include "HttpRequest.h"
#include "Cache.h"
using namespace std;
/*
* Cache Struct
*/
Cache::Cache()
{
this->Data.clear();
this->Url.clear();
this->HeaderAll.clear();
//this->HostName.clear();
//this->Path.clear();
this->Size = 0;
... |
f5cabbe892ae1baa87b4b3002cc680aa6a0c2829 | 738229325fd038e7f716c3000ba67a1988e811c5 | kyliau/playground | /leetcode/BinarySearchTreeIterator.cpp | C++ | cpp | 1,200 | no_license | // Implement an iterator over a binary search tree (BST).
// Your iterator will be initialized with the root node of a BST.
// Calling next() will return the next smallest number in the BST.
// Note: next() and hasNext() should run in average O(1) time and
// uses O(h) memory, where h is the height of the tree.
/**
*... |
879b97e2bcdae2b39452405c640bc01a1e257f3b | 605cd11a6d6d9919746c1e388907745c0fb83543 | ankprogramming13/week5-decision-Thanawat123 | /lab_5_3.cpp | C++ | cpp | 489 | no_license | #include <iostream>
using namespace std;
int main() {
int score;
cout << "Enter your score(0-100) : ";
cin >> score;
cout << endl;
if(score > 80) {
cout << "Grade 4" << endl;
} else if (score > 70) {
cout << "Grade 3" << endl;
} else if (score > 60) {
cout << "Gra... |
4da4b3008fbba4d368c8d046e799292dedd0f636 | d68cf467f7b0c6157dc1f69571e5d0c0b3c70348 | abhinavarora/Paddle | /paddle/fluid/operators/detail/sendrecvop_utils.cc | C++ | cc | 8,398 | permissive | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
4252a43e10f22c3b36f98e230abfc01158b124ae | d540ce7f337e05e708feaabd0763e9a903152ca8 | clintg6/networkit | /include/networkit/ext/ttmath/ttmathuint.hpp | C++ | hpp | 78,331 | permissive | /*
* This file is a part of TTMath Bignum Library
* and is distributed under the (new) BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2006-2011, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitt... |
5123fa5421fd9937eb8b79b73cc6729799290197 | 63c751f0aa1b93c2a3df2831ece8094cd3d55671 | sissyVI/NMSL-Proj1 | /src-client/personnelpage_2.cpp | C++ | cpp | 5,905 | no_license | #include "systemcenter.h"
#include "ui_systemcenter.h"
#include "sqltool.h"
#include <QDebug>
#include <QTableWidget>
#include <QAbstractItemView>
#include <QVector>
#include <QStringList>
#include <QList>
#include <QComboBox>
#include <QMessageBox>
#include <QFileDialog>
#include <QByteArray>
#include <QDataStream>
... |
a2a1e0160d9d6f616a5f7c8ca83a47137ce922ad | e3c11cda295d7a554aa073a155bc50d8985cd4ae | ulido/smoldyn_fork | /source/libmoleculizer-1.1.2/src/libmoleculizer/mzr/pythonRulesManager.hh | C++ | hh | 3,018 | no_license | //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
// This file is part of Libmoleculizer
//
// Copyright (C) 2001-2009 The Molecular Sciences Institute.
//
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//
// Moleculizer is free software; you can... |
e01ed7d0aaa156c75483e9602c190e6895fd93f0 | b5d73c49cd1acf34fbe6d09d75082c929c1a2bb8 | bluePlayer/practices | /GangOfFour/Behavioral Patterns/Command/code/PasteCommand.cpp | C++ | cpp | 369 | no_license | class PasteCommand: public Command {
public:
PasteCommand(Document*);
virtual void Execute();
PasteCommand::PasteCommand (Document* doc) {
_document = doc;
}
void PasteCommand::Execute () {
_document->Paste();
}
... |
18753fdbe1b294a02eae0555cad59af4122b8ac0 | ef27fc9d259ccb032230681067856117260233f9 | x-mat-studio/HeartsOfGreed | /Hearts Of Greed/Project_HeartsOfGreed/ResourcesPortrait.cpp | C++ | cpp | 2,191 | permissive | #include "ResourcesPortrait.h"
#include "Player.h"
#include "Textures.h"
#include "Render.h"
ResourcesPortrait::ResourcesPortrait(float x, float y, UI* parent, bool interactable) :
UI({ x, y }, parent, UI_TYPE::RESOURCES_COUNTER, { 0, 0, 0, 0 }, interactable, false, nullptr),
texture2(nullptr),
texture3(nullptr)
... |
8038639187d419dd5b77bf4e195a02389bf70cec | f43281b76db3151e19e6afcbc29f7df9a0deab82 | pradeep1288/leetcode | /hard/lru-cache/c++/lru-cache.cpp | C++ | cpp | 1,907 | permissive | struct cacheData {
int key;
int value;
cacheData *next;
cacheData *prev;
};
class LRUCache{
private:
std::map<int, cacheData*> _myMap;
cacheData *_myCache;
cacheData *_head;
cacheData *_tail;
int _freeIndex;
int _maxCapacity;
public:
LRUCache(int capacity): _freeIndex(0... |
bb45e17a337f9133ad2508afeaf919bf14f9ee60 | 668c20331861c013c347026e0731a6047f7c7f64 | Victor-Y-Fadeev/qreal | /plugins/robots/interpreters/trikKitInterpreterCommon/src/robotModel/real/parts/speaker.cpp | C++ | cpp | 1,314 | permissive | /* Copyright 2007-2015 QReal Research Group
*
* 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... |
f1436b6d48ff007c2ed8b06b0f3bac00f1253735 | ecfce2b746564fcf674b9b040bf1e498cbc58eb7 | xieyxpro/cvpr | /three/colorToGray.cpp | C++ | cpp | 1,010 | no_license | #include "CImg.h"
#include <iostream>
#include <string>
#include <strstream>
using namespace std;
using namespace cimg_library;
void colorToGray(CImg<unsigned char>& img, CImg<unsigned char>& result);
int main(void)
{
/*CImg<unsigned char> src;
src.load_bmp("12.bmp");
int width = src._width;
int height = src._he... |
859ae770e8580dcdc8f9185d0f8b8c7383a86582 | 98250d50cd4cd661dfce508092298468c4f65822 | szledan/gepard | /src/gepard.cpp | C++ | cpp | 22,579 | permissive | /* Copyright (C) 2015-2017, Gepard Graphics
* Copyright (C) 2015-2016, Kristof Kosztyo <kkristof@inf.u-szeged.hu>
* Copyright (C) 2015-2017, Szilard Ledan <szledan@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... |
b0dc36847cf3294d82757427a4ba9d9d301b8378 | 4d3c5e5a7acf1b7fb566b6bbb561d331c0007da3 | nrichgels/ClassCode | /C252/Assignments/818a12/person.cpp | C++ | cpp | 1,641 | no_license | // Author: Nathan Richgels
// File: person.cpp
// Date: 3/28/2012
// Class: CSIS252
// Assignment 9
#include "date.h"
#include "person.h"
#include <iostream>
#include <iomanip>
using namespace std;
Person::Person(string Name, Date BirthDate)
{
bdate = BirthDate;
name = Name;
}
Person::Person()
{}
void Person::... |
e673f86b3a8c5a91af6677f6dbbeff66408222bd | 64e0f927836dea20a740350fdb30e30c8bdb355c | ThoseBygones/ACM_Code | /CodeForces/CodeForces 1465E.cpp | C++ | cpp | 2,287 | no_license | /*
********************************************************************************
* Author: ThoseBygones
* Version: V1.0
* Date: 2021-06-24
* Subject: ACM-ICPC
* Language: C/C++14
* OJ: CodeForces
* Algorithm: 数学公式 + 贪心
********************************************************************************
... |
fffc73a0ac42c5dc53724fb231828ae2c1ffd953 | 46b4847c44dd828a20f42ef63368f15b598dfd90 | mymoon89/SPKT_TRANTHITHUY | /GiaoTrinh/DoHoa/SuperBible4/examples/src/chapt09/pointsprites/pointsprites.cpp | C++ | cpp | 7,818 | no_license | // pointsprites.c
// OpenGL SuperBible
// Demonstrates point sprites
// Program by Richard S. Wright Jr.
#include "../../shared/gltools.h" // OpenGL toolkit
#include "../../shared/glframe.h"
#include <math.h>
// Array of small stars
#define SMALL_STARS 100
M3DVector2f vSmallStars[SMALL_STARS];
#define MEDIUM_STARS ... |
4989fb1c3f06546fe1e77a6dcdb5c951d101db16 | 60d39ac694a35481d6b037b4beffe54f39710de7 | sld666666/cpp_small_code | /boost/spirit_example/spirit_example.cpp | C++ | cpp | 289 | no_license | // spirit_example.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "NumericOpreatorTestor.h"
//#include "JsonParserTestor.h"
#include "JsonParser.h"
#include "Roman.h"
int _tmain(int argc, _TCHAR* argv[])
{
parseRoman();
return 0;
}
|
7be3643a276cd76d6f0b04b180ae51cc20a37a52 | 651612f6f70d8eb4ec4c3ca5beee359ae12ec9ee | dnunesbrito/Icalib | /VisualCalib/NoiseDiamwin.hpp | C++ | hpp | 1,184 | no_license | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: NoiseDiamwin.hpp
* Author: darlan
*
* Created on 22 de Setembro de 2016, 11:16
*/
#ifndef NOISEDIAMWIN_HPP
#define... |
d87cf9cf93788b8914be7375239cd8ca3ff389a0 | 6cf0cca98c1baeb61fff4e5d7008b8f4b859a068 | hourglasscc/algorithm_code-1 | /拉斯维加斯算法之n后问题17计科3班170201104643陈晓晴.cpp | C++ | cpp | 3,013 | no_license | #include <iostream>
#include <cmath>
#include <time.h>
#include <stdlib.h>
using namespace std;
class Queen
{
friend bool nQueen(int,int);
private:
bool Place(int k);//测试皇后k置于第x[k]列的合法性
bool Backtrack(int t);//解n后问题的回溯法
bool QueensLV(int stopVegas);//随机放置n个皇后拉斯维加斯算法
in... |
350a6169c47d417fac386c41f52550e3c4d6fbf6 | ce853c1fe6f5c8b3b32bc83e0c735972b3bc2253 | neuroidss/NyuziToolchain | /lib/Target/Nyuzi/NyuziTargetObjectFile.cpp | C++ | cpp | 846 | permissive | //===-- NyuziTargetObjectFile.cpp - Nyuzi Object Info
//-----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===---------------------------------------------------------... |
64465c16562d2bbfd49c3f11e31d3dbcece77d9b | 06d28b7116161e8692f84471bb7eae6053aae16d | najibarbaoui/academic_project_2 | /C++/Application/EtatAction/EtatActionRectangleElastique.cpp | C++ | cpp | 2,757 | permissive | //////////////////////////////////////////////////////////////////////////////
/// @file EtatActionRectangleElastique.cpp
/// @author Olivier Cotte
/// @date 2014-02-06
/// @version 1.0
///
/// @addtogroup inf2990 INF2990
/// @{
//////////////////////////////////////////////////////////////////////////////
#include ... |
02a1c1af387fd80752d3258c9aed3211dffa0f0e | 17d15eefbb3ea8fb1ff1c9454bf411850be3b51c | tokitsu-kaze/ACM-Solved-Problems | /nbut/1617.cpp | C++ | cpp | 476 | no_license | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <climits>
#include <map>
#include <iomanip>
using namespace std;
int main()
{
int n,m,a,count,i;
map<int,int> map;
while(cin>>n>>m)
{
count=0;
map.clear();
... |
db271ba00d9f813d1206f9a8c4eb588c01ef89d2 | fd12c7f8c4f7608d6eb9d64277746c98c359a1ee | Chandrima-04/Object_Oriented_Programming | /friendbasederived.cpp | C++ | cpp | 373 | no_license | #include <iostream>
using namespace std;
class A
{
private:
int x;
void show()
{
cout<<"\n This is the base class";
}
public:
A()
{
x = 0;
}
friend class derived;
};
class derived: public A
{
int y;
public:
void disp()
{
show();
}
};
... |
e29501e040421beafbc9441de4da19f557af13ea | cae58ade21a8a2f4807fbfae92269ff15cbe87ef | unbornchikken/arrayfire | /src/backend/cuda/kernel/harris.hpp | C++ | hpp | 12,418 | permissive | /*******************************************************
* Copyright (c) 2015, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... |
1adeb502d915532650b2d6461b747feee7e2776e | 730f653b9dcd9413e4f327c5b1d5f5097d35e90f | lrocha3/FaceRecognition | /src/FaceDetector.cpp | C++ | cpp | 3,937 | no_license | /*
* FaceDetector.cpp
*
* Created on: 20/05/2017
* Author: Luis Rocha
*/
#include "FaceDetector.h"
using namespace std;
using namespace cv;
/* FACE_XML_CLASSIFIER is set in the cmake */
const string face_cascade_name = FACE_XML_CLASSIFIER;
void DetectAndDisplayFaces(Mat frame, CascadeClassifier face_cascade)
{
... |
8b66063d30a23485b51f1ae635a4224128235b99 | d2177438472d7e10d9d791816dc11cb449583178 | R-penguins/Kattis-Solutions | /mausa19D.cpp | C++ | cpp | 1,019 | no_license | /**
* Pixelated
* TLE
*/
#include <bits/stdc++.h>
using namespace std;
using Pt = pair<int, int>;
struct Pulse
{
int t, m, a;
Pulse(int t = 0, int m = 0, int a = 0) : t(t), m(m), a(a) { }
bool operator<(const Pulse &rhs)
{
return a < rhs.a;
}
};
int main()
{
int n;
cin >> n;
vector<Pulse> hs, vs;... |
a4de1b723afe38e666352f7c96d36547d2968775 | 98af5a579d86d7269b411cd5845520967e9fb337 | jfmherokiller/TheOuterWorldsSdkDump | /Indi/SDK/Indi_Armor_CorpTacOrdTech_Cleo_Phy_T2_parameters.hpp | C++ | hpp | 379 | no_license | #pragma once
// TheOuterWorlds SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "Indi_Armor_CorpTacOrdTech_Cleo_Phy_T2_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------... |
66e8f4c505fed012f993223e42a58ee5b9595028 | 13085bfee4b387aa635a8bd949dce55147c272d5 | melik-a/LexicalAnalyzer | /LexicalAnalyzer/Scanner.cpp | C++ | cpp | 7,779 | no_license | #include "Scanner.h"
LexicalScanner::LexicalScanner(std::string& file)
{
_file.open(file);
if (!_file)
{
std::cout << "\nsomething went wrong. invalid file name or path" << std::endl;
throw "error -> invalid file name or path";
}
_current_state = States::START;
}
LexicalScanner::~LexicalScanner()
{
if (_f... |
6655966722186c0929ea6577fac608cac2ab05f0 | 0c1f5334de0e28376f1945e062a758cacf378e47 | wxxhub/graduationCLient | /src/port/port_handler.cpp | C++ | cpp | 570 | no_license | #include "port/port_handler.h"
#if defined (_WIN320) || defined (_WIN64)
#include "port/port_handler_windows.h"
#elif defined(linux)
#include "port/port_handler_linux.h"
#else
#pragma message("Have't adpter yout system...")
#endif
using namespace port_control;
PortHandler *PortHandler::getPortHandler... |
2bb918a734b039dea44b1f99b580fbf0d2b88090 | 11a5d582e1d51706e0cbe4abf68b72b2129df42f | HeliumProject/Engine | /Source/Tools/Editor/Controls/MenuButton.cpp | C++ | cpp | 6,146 | permissive | #include "Precompile.h"
#include "MenuButton.h"
#include "Editor/App.h"
#include "Editor/ArtProvider.h"
#include "Editor/Utilities.h"
#include "Editor/Settings/EditorSettings.h"
using namespace Helium;
using namespace Helium::Editor;
//-----------------------------------------------------------
// macros
//---------... |
da7902d253d815c4c4770d962fd26e93187774f2 | cae956393ffacd8dd9664908330ed4ef1fe0bea3 | ajunlonglive/flexcpp | /flexc++/ranges/inspectstate.cc | C++ | cc | 222 | no_license | #include "ranges.ih"
void Ranges::inspectState(State const &state)
{
size_t type = state.type();
if (type < UNDETERMINED_)
add(type);
else if (type == CHARSET)
add(state.data().str());
}
|
a83294d52481304185055a03e0ef31cdc70f078e | a2bb7011593c5442ded6c5b7bd2b4782f69ddda6 | SimonCSmith/DSS | /QHTML_Static/qhtm/htmldocument.cpp | C++ | cpp | 3,160 | permissive | /*----------------------------------------------------------------------
Copyright (c) 1998 Gipsysoft. All Rights Reserved.
Please see the file "licence.txt" for licencing details.
File: HTMLDocument.cpp
Owner: russf@gipsysoft.com
Purpose: HTML document.
----------------------------------------------------------------... |
a062f8fbe0e8bf4d6bc1f28e55833711167e5d5d | 219dfe61c9e0f730beaf5e0cac8860e003704f1a | kkbwilldo/all-problems | /extra/correct/2027 대각선 출력하기/file.cpp | C++ | cpp | 239 | no_license | #include <iostream>
#define endl '\n'
using namespace std;
int main (){
ios::sync_with_stdio(false);
cout.tie(0);
for(int i=0;i<5;i++){
for(int j=0;j<5;j++){
if(i==j) cout<<"#";
else cout<<"+";
}cout<<endl;
}
return 0;
}
|
707cb077fb66080abf4ed6ed7d2b59dfeb072540 | fae123f7087c739db697ae464d7e4892144946b0 | geoffreywperkins/CSE-335-Project-2 | /Testing/CImageDrawableTest.cpp | C++ | cpp | 762 | no_license | #include "stdafx.h"
#include "CppUnitTest.h"
#include "ImageDrawable.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace Testing
{
TEST_CLASS(CImageDrawableTest)
{
public:
TEST_METHOD_INITIALIZE(methodName)
{
extern wchar_t g_dir[];
::SetCurrentDirectory(g_dir);
}
TEST_METHO... |
658953b5db5e1dcf88a0da3a8d65126f74d2eaaf | 0953695366db85c7ca17d7763ad2696dc1fa1a34 | khairulTonu/Codeforces_Solutions | /513A. Game.cpp | C++ | cpp | 201 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n1,n2,k1,k2;
cin>>n1>>n2>>k1>>k2;
if(n2>=n1)
{
cout<<"Second";
}
else
{
cout<<"First";
}
}
|
98ae57b7d1fbab7405252ea28f5d9a1356ed6b3e | e760704f9d9c6789f0f6d2577693fa490b6ade6d | Greenwicher/Competitive-Programming | /LeetCode/495.cpp | C++ | cpp | 418 | no_license | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
class Solution {
public:
int findPoisonedDuration(vector<int>& timeSeries, int duration) {
int ans = 0, stop = 0;
for (vector<int>::size_type i = 0; i < timeSeries.size(); ++i){
ans += duration - max(stop - time... |
5800c8513a011f063998c2e06d9c446235bc487a | 6f9dba1b95643ea610b490b73f8e4bb097732b1d | suchto/ElastosRT | /Sources/Elastos/LibCore/src/elastos/utility/regex/CSplitter.cpp | C++ | cpp | 6,657 | permissive | //=========================================================================
// Copyright (C) 2012 The Elastos 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
//
// ... |
9879b154d3f63bc3d5112055e31fc93cb5cbdd01 | 2430602a83e9fceaf142982b4ae21fb89edf6eb0 | xeonye/L0Learn | /src/CDL012KSwapsExh.cpp | C++ | cpp | 8,127 | permissive | #include "CDL012KSwapsExh.h"
#include "CDL012Cons.h"
#include "CDL012Swaps.h"
CDL012KSwapsExh::CDL012KSwapsExh(const arma::mat& Xi, const arma::vec& yi, const Params& Pi) : CD(Xi, yi, Pi) {MaxNumSwaps = Pi.MaxNumSwaps; P = Pi; K = ModelParams[3];}
template <typename Iterator>
bool next_combination(const Iterator fi... |
033637fbe173a5b9056332b2a6e76cf569fb0111 | f2a350cf9087bd2658cb281e794c3b3c3228e131 | pauljoo28/llvm-project | /clang/lib/CodeGen/MicrosoftCXXABI.cpp | C++ | cpp | 181,230 | permissive | //===--- MicrosoftCXXABI.cpp - Emit LLVM Code from ASTs for a Module ------===//
//
// 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
//
//===---------------------------... |
7f0d0a6a0ee6e6422b09dae5020a3c02861d4b9f | 3bcf2c3b846a8421c2f62421f6222437d1f6b547 | xLLLxLLLx/xLLLx | /vp/2/t.cpp | C++ | cpp | 3,549 | no_license | #include <bits/stdc++.h>
#define rep(_i, _j) for(int _i = 1; _i <= _j; ++_i)
const int inf = 0x3f3f3f3f;
typedef long long LL;
typedef double DB;
using namespace std;
const int maxm = 20 + 2;
const int maxn = 400 + 20;
const int maxlen = 140 + 10;
struct big_num {
int d[maxlen], len;
big_num() {
memset... |
7f30e8b4b8edb334fd25f210faaeb49f09c3969f | 29bf0289b1f1dbbf9de6b87b9a2d0746a4dff71e | timofeevmg/CPP_piscine | /CPP_Module_01/ex03/HumanA.hpp | C++ | hpp | 287 | no_license | #ifndef HUMANA_HPP
#define HUMANA_HPP
#include <iostream>
#include <string>
#include "Weapon.hpp"
class HumanA
{
private:
std::string name;
Weapon &weapon;
public:
HumanA(std::string const &str, Weapon &type);
void setWeapon(Weapon const &type);
void attack(void);
};
#endif
|
0040c00e5ac731885913b977c42ba92c3877e87c | bbc7dd6278eb2fbca95161940ddb8a19a6a9be62 | jsharp83/KAIR | /example_source/Sick/SickLMS200.cpp | C++ | cpp | 20,335 | no_license | #include "SickLMS200.h"
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
//#include <stdio.h>
//#include <sys/time.h>
//#include <time.h>
#include <signal.h>
//#include <getopt.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#incl... |
ef3fa76b215a5c210dd49c1101311ba02c55fccb | 4bb2bb2246aa038b7cc1cbf31baecd1411c20f68 | bcoles/serenity | /Userland/DevTools/GMLPlayground/main.cpp | C++ | cpp | 13,383 | permissive | /*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Julius Heijmen <julius.heijmen@gmail.com>
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/... |
feff11812d6f6fa41abe4afbd45d19f79fd20d16 | d605c30ef30329aad99ff792807bd693d1e070ba | thhyj/bzoj-ACcode | /bzoj2194.cpp | C++ | cpp | 1,836 | no_license |
#include <bits/stdc++.h>
using namespace std;
inline void R (int &v) {
static char ch;
v = 0;
bool p = 0;
do {
ch = getchar();
if (ch == '-') p = 1;
} while (!isdigit(ch));
while (isdigit(ch)) {
v = (v + (v << 2) << 1) + (ch^'0');
ch = getchar();
}
if (p) v = -v;
}
int n, m;
inline void R (double &v) {... |
e7950362ad030bfbcf7e8b11d6edb853289676f2 | f7da6640a11553f61b32b309a1361efeed6e36fb | SuperiorOS/android_external_perfetto | /src/profiling/memory/shared_ring_buffer.cc | C++ | cc | 9,806 | permissive | /*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
ee69dcf8cafb387ad67fe38e47c2830aa863e99c | 9ad2e3c80ede01a58b0ebb4c12aba929c8de19e0 | gan74/Vulkan | /examples/multiview/multiview.cpp | C++ | cpp | 31,370 | permissive | /*
* Vulkan Example - Multiview (VK_KHR_multiview)
*
* Uses VK_KHR_multiview for simultaneously rendering to multiple views and displays these with barrel distortion using a fragment shader
*
* Copyright (C) 2018 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://ope... |
ca2a3c1283ed402f77e81d9731ba8226e85308ac | 76b327895dadcf9e2ac458a1fb82465884bb105c | comzyh/ICPCcode | /POJ/1077.cpp | C++ | cpp | 1,756 | no_license | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const char Target[3][3]={{1,2,3},{4,5,6},{7,8,0}};
const int dx[]={-1,1,0,0},dy[]={0,0,-1,1};
const char oper[]={'u','d','l','r'};
int op[10000];
inline int abs(int x){return x>0?x:-x;}
struct State
{
char n[3][3];
inline int g(int &x,int &... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.