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 |
|---|---|---|---|---|---|---|---|---|
0c3e4204cc5aa211046a6c4d02ff1c06e9c36bc9 | 992c55bb0d85eb857985c36aa82e14005c481177 | tomeh2/PiSynth | /PiSynth/FileOut.cpp | C++ | cpp | 399 | no_license | #include "FileOut.h"
#include "Encoder.h"
FileOut::FileOut(std::string filename)
{
this->fileOut = std::ofstream(filename, std::ios::binary);
}
FileOut::~FileOut()
{
this->fileOut.close();
}
void FileOut::writeOut(float* buffer, int size)
{
char codedSignal[size * 2];
Encoder::formatToPCM16(buffer, codedSignal, ... |
cb7d4da9ee5d931e6f5d9b30867c2c1cedf5341f | bb91500aa4703078e57e51ac650df888581f43a1 | ranma1234/obs-ffmpeg-encoder | /source/ui/nvenc_h264_handler.cpp | C++ | cpp | 7,823 | permissive | // FFMPEG Video Encoder Integration for OBS Studio
// Copyright (c) 2019 Michael Fabian Dirks <info@xaymar.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, incl... |
dc0ef7ebc442d0c49e9310022764048f38679eba | 7482fec105b803c1251a799c05a965c730761a48 | getsonm/SMSIServer | /LogFile.cpp | C++ | cpp | 8,386 | no_license | // LogFile.cpp: implementation of the CLogFile class.
//
//
//////////////////////////////////////////////////////////////////////
/*
'=======================================================================================
'= Arquivo: logfile.cpp
'= Função:
'=
'= Autor: Getson Miranda
'= Data: 20/... |
57251c6db06b00081e3cb9ea47a7572111d99971 | 2ca02c5481e563bb23e299ed15fb96487ce07bd9 | 15831944/ditto-cp | /About.cpp | C++ | cpp | 2,984 | no_license | // About.cpp : implementation file
//
//Main branch test
#include "stdafx.h"
#include "cp_main.h"
#include "About.h"
#include "InternetUpdate.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
///////////////////////////////////////////////////////////... |
2b0fe9a36b43c0050fa2f69246197fcf6e15058d | 633f64de7e895412b2b144ec5c121e2f8786a5c2 | joshuabezaleel/cp | /uncategorized/cpp/bobo.cpp | C++ | cpp | 1,245 | no_license | #include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;
#ifdef DEBU... |
939082f672a9fd7e4c65667b4c0abb3473b3e550 | a5ce487b2bc5bd16edda4f85197ad806b3aec171 | Kra1o5/android_frameworks_av | /media/libmedia/ToneGenerator.cpp | C++ | cpp | 75,721 | permissive | /*
* Copyright (C) 2008 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... |
6a393a2deb915dec62beecd5a2ee2719009b5402 | 285cdd43dabf96a6e6dabd3e459e8ff7743ce3f3 | halak/halak-plusplus | /Codes/Halak/Vector2RangeSequence.cpp | C++ | cpp | 2,414 | no_license | #include <Halak/PCH.h>
#include <Halak/Vector2RangeSequence.h>
#include <Halak/SequenceTemplate.h>
namespace Halak
{
Vector2RangeKeyframe::Vector2RangeKeyframe()
: Value(Vector2::Zero, Vector2::Zero),
Duration(0.0f),
StartTime(0.0f)
{
}
Vector2RangeKeyframe::Ve... |
c196cda9d3b76e3676c350407010574fe02edb27 | 67f2023092b17474ca1d5f80dc3e6265f3fa7114 | martinbenes1996/bc | /collector/extlib/nlohmann/detail/exceptions.hpp | C++ | hpp | 20,952 | no_license | #pragma once
#include <exception> // exception
#include <stdexcept> // runtime_error
#include <string> // to_string
#include "input/position_t.hpp"
namespace nlohmann
{
namespace detail
{
////////////////
// exceptions //
////////////////
/*!
@brief general exception of the @ref basic_json class
This class is an e... |
3d46ed9df4800218e5c1bd32b1d3b8ef10e2925a | 5ebe649128cd112008392f291c02d6f0e12dc574 | victorca25/inviwo | /modules/dh2320lab1/cubeanimator.cpp | C++ | cpp | 1,691 | permissive | /*********************************************************************
* Author : Himangshu Saikia
* Init : Thursday, October 12, 2017 - 11:11:30
*
* Project : KTH Inviwo Modules
*
* License : Follows the Inviwo BSD license model
*********************************************************************
*/
... |
1c427d35be0c42f6b4ff4b86b5bde8cddcd559d3 | 70d125be815355f617321a411159480e01d895b8 | junjiecjj/Data-Structure-And-Algorithm | /数据结构/IO_1.cpp | C++ | cpp | 826 | no_license | /*************************************************************************
>> File Name: IO_1.cpp
>> Author: chenjunjie
>> Mail: 2716705056qq.com
>> Created Time: 2019.03.14
************************************************************************/
#include<iostream>
using namespace std;
#include<cstdlib>
#include<cstd... |
2475930ee816764086574d6e7a3685dee433bf01 | 13c8195de312e7ad080b982f1d6a891e3176b3e5 | gergelyc/DesignPatternsMakefile | /src/Parameters.cpp | C++ | cpp | 895 | no_license | #include "Parameters.h"
#include <cmath>
Parameters::Parameters(const ParametersInner& innerParameter)
: InnerObject{ innerParameter }
{
}
double Parameters::Mean(double time1, double time2) const
{
return InnerObject->Integral(time1, time2) / (time2 - time1);
}
double Parameters::RootMeanSquare(double time1, doub... |
9ccea73139ae5fa029d73e181d154a93d3f266f9 | 8a653d93d694bb7d86f7713fcd04239a4e6d13f0 | OutOfTheVoid/OakC | /src/Parsing/Language/OakExpressionStatementConstructor.cpp | C++ | cpp | 2,598 | permissive | #include <Parsing/Language/OakExpressionStatementConstructor.h>
#include <Parsing/Language/OakASTTags.h>
#include <Parsing/Language/OakExpressionConstructor.h>
#include <Tokenization/Language/OakTokenTags.h>
#include <Utils/GlobalSingleton.h>
OakExpressionStatementConstructor & OakExpressionStatementConstructor :: I... |
1cb36a238a4270df8bb66039589d6d6763841c56 | 5ee1e599b6ae15b1ec721a7fc5d85a10bba05793 | fanghuixing/NetworkProgramming | /GetHost/源.cpp | C++ | cpp | 1,896 | no_license | #include <winsock2.h>
#include <ws2tcpip.h>
#include <stdio.h>
#include <windows.h>
#pragma comment(lib, "ws2_32.lib")
int main(int argc, char **argv)
{
//-----------------------------------------
// Declare and initialize variables
WSADATA wsaData;
int iResult;
DWORD dwError;
int i = 0;
struct hostent *remo... |
f74695cdebea613f7fda2598590f57ad630294be | cd6d9a6e6b35ac8c0dd3db74489bdeb0f4364986 | carcasanchez/ALinkBetweenAges | /Motor2D/TestScene.cpp | C++ | cpp | 1,147 | no_license | #include "TestScene.h"
#include "Scene.h"
#include "p2Defs.h"
#include "p2Log.h"
#include "j1App.h"
#include "j1SceneManager.h"
#include "j1Input.h"
#include "j1Map.h"
#include "j1PathFinding.h"
#include "j1Render.h"
TestScene::TestScene() {}
bool TestScene::Load(std::string _data)
{
bool ret = true;
data = _data;... |
83d33ade133b4c4f4b3d1714ffe50d2861fe2bc4 | c0d6fc1a9cf8cd2ee0deb45de795db6eebc28fc2 | Saifu0/Competitive-Programming | /CP/1500/cutting_out.cpp | C++ | cpp | 2,141 | no_license | // ----- In the name of ALLAH, the Most Gracious, the Most Merciful -----
#include<bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > stru... |
00c59010a033c816e1fb886e91d25be9f267cb7a | c581b1f0b1f13de643275199b33a624dd54a4ce7 | hl23889909/hi3515a-lsdvs | /lsdvs/flash/flash.cpp | C++ | cpp | 23,658 | no_license | /********************************************************************************
** Copyright (c) 2013, 深圳市动车电气自动化有限公司
** All rights reserved.
**
** description : 此文件实现了对flash进行读写操作的函数
** date : 2013.11.11
**
** version : 1.0
** author : sven
******************************... |
d4ab325ef76b73a1329375807c8627fa06633360 | 152e6ca80e821b7218d7a3f1819d708723523fcf | shaihitdin/CP | /Olymp/Sbory_11_2014/4/K_sancho.cpp | C++ | cpp | 1,380 | no_license | #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <math.h>
#include <map>
#include <time.h>
#include <assert.h>
using namespace std;
#define forn(i, x, n) for(int i = int(x); i <= int(n); ++i)
#define for1(i, n, x) for(int i = int(n); i >= int(x); --i)
#... |
a0ffba1f8079dd6e81268e6d6cb0a111fab042be | d8a6709378936e249a442f4d558fce5715f199e7 | junming403/Multi-Pivots-Quicksort-Experiment | /source/optimzed-quick-sort-multiple-pivot-standard.cpp | C++ | cpp | 5,839 | no_license | #include <iostream>
#include <vector>
#include <stdlib.h>
#include <time.h>
#include <ctime>
using namespace std;
typedef vector<int> vi;
bool debug = 0;
const int MAX_PIVOTS = 20;
void printVector(vi arr, int start, int end) {
for (int i = start; i < end; i++) {
printf("%d, ", arr[i]);
}
prin... |
5eac99e0e8442ed69ed873223cf74ca3106fde0b | ed9c2c94e18d0be69d0b41661b6346ca4a18e142 | Pandamonium-san/Project_Imminent | /Source/Project_Imminent/Checkpoint.cpp | C++ | cpp | 1,065 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "Project_Imminent.h"
#include "Checkpoint.h"
// Sets default values
ACheckpoint::ACheckpoint()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTic... |
0935cb28ba8d3a6de6d1af5edda1432aac61b1da | 2d6d107a5529b2b887b71e16786af8b8d251634b | amir5200fx/AutMarine-v4.2.0 | /AutMarine v4.2.0/AutLib/HydroDynamics/CFD/BC/Specifications/FvBCSpecification_VelocityMethodConst.hxx | C++ | hxx | 610 | no_license | #pragma once
#ifndef _FvBCSpecification_VelocityMethodConst_Header
#define _FvBCSpecification_VelocityMethodConst_Header
#include <Geom_Pnt2d.hxx>
#include <FvBCSpecification_VelocityMethod.hxx>
namespace AutLib
{
namespace FvLib
{
class FvBCSpecification_VelocityMethodConst : public FvBCSpecification_VelocityMe... |
c9b1f362ff0f2ea5bc5237b379dfd6cf82822805 | 3467bdf2d8c6653104e66fe2c1afc43019d68990 | elbow95/cpp | /C++Primer/class11_3.cpp | C++ | cpp | 2,252 | no_license | #include <iostream>
#include <vector>
#include <map>
#include <utility>
#include <fstream>
#include <sstream>
using namespace std;
void ques11_15()
{
map<int, vector<int>> m;
//mapped_type是vector<int>
//key_type是int
//value_type是pair<const int,vector<int>>
}
void ques11_18()
{
map<string, int>::it... |
503eb7d7cba95fabbae4d396c1fa59d0cf386cb1 | 2fff592ddeb1e2d82c8e2aa925ac505321a280a4 | akia/hiphop-php | /src/system/gen/php/classes/directory.cpp | C++ | cpp | 15,965 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
+---------... |
e8c6983c1f95e53e07e2f8da7cb7ceb197201274 | 15836b17a9dfc4948a0d00e9be67404f616472fa | syohex/exercism | /cpp/binary-search/binary_search_test.cpp | C++ | cpp | 2,708 | permissive | #include "binary_search.h"
#include "test/catch.hpp"
#include <stdexcept>
#include <vector>
#include <cstddef>
using namespace std;
// Binary-Search exercise test case data version 1.3.0
TEST_CASE("finds_a_value_in_an_array_with_one_element") {
const std::vector<int> data{6};
const std::size_t actual = bina... |
0e69e8dce2421efb988d7b4ba1809c8d33997fb6 | 29bdbba3bf8db52152a65e2774c91ef609e11bdf | Exr0nProjects/learn_cpp | /problems/luogu/x_P3919/main_P3919.cpp | C++ | cpp | 1,152 | no_license | /*
* Problem P3919 (luogu/P3919)
* Create time: Mon 22 Jun 2020 @ 11:22 (PDT)
* Accept time: [!meta:end!]
*
*/
#include <cstdio>
using namespace std;
const int MX = 1000111;
int N, D, Q, val[MX<<5];
int alc=1, lc[MX<<5], rc[MX<<5], rt[MX];
void update(int q, int setv, int &k, int tl=1, int tr=N)
{
lc[alc] = lc[... |
8a5bffaca001bd1699465e2fda148b5d7f92164d | 7ebe3b6063586fd01d54511ccdd5fa3dc14f76ad | gabrielrussoc/competitive-programming | /uva/12486.cpp | C++ | cpp | 849 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
ll memo[20][12][2][2];
char str[24];
ll dp(int i, int ult, int pre, int f){
if(str[i] == 0) return f;
ll &me = memo[i][ult][pre][f];
if(me != -1) return me;
me = 0;
for(int d = 0; d < 10; d++){
if(pre && d > str[i... |
6995c54a6c6b25558c3534d147d87d8b1d887f04 | a4e0d35e094cb20901d74a77bbbfa7099ffb5968 | anshuman-aaa/Basic_Image_Processing | /Morphologicaloperations/Assignment5.cpp | C++ | cpp | 8,044 | no_license | #include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;
using namespace cv;
#define BINARY_THRESHOLD 127
/*Function to create a diagonal 3x3 structuring element
The function checks for the flag if it is Dilate or Erode... |
9e6a17cc499ca1c48f23fc8a69423dff3df55f40 | 53b573d52c35bf791e331789dd2e48ed694b81d1 | toandv/IFinder | /compiler/Engines/reference-engine/generic/src/PriorityItf.cpp | C++ | cpp | 1,942 | permissive | /**
* Copyright Verimag laboratory.
*
* contributors:
* Marc Pouhliès
* Jacques Combaz (jacques.combaz@univ-grenoble-alpes.fr)
*
* This software is a computer program whose purpose is to generate
* executable code from BIP models.
*
* This software is governed by the CeCILL-B license under French law and... |
4ade38647f26ba6dd28d9ea998a4539766ff42d4 | b6280bee2bb307d7b9da72927aecb46f6e5a279d | chrinide/xtp | /src/libxtp/qmapemachine.cc | C++ | cc | 13,336 | permissive | /*
* Copyright 2009-2019 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
*
* h... |
80dbdb128bf21abc22c01713ed3da798ac0b0fe4 | 46828b86c67da0e51270fa7b5293ac49f2185972 | rachelsqh/intel-graphics-compiler | /IGC/Compiler/CISACodeGen/VertexShaderCodeGen.hpp | C++ | hpp | 4,129 | permissive | /*===================== begin_copyright_notice ==================================
Copyright (c) 2017 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, includi... |
f743de40d5fa2bcb937a18639d09c9f7ccc266cc | 9cd8b0429d98342e72f271e1c7742b1417c2902b | andeaseme/ft_retro | /src/Collidable.cpp | C++ | cpp | 4,569 | no_license |
#include <math.h>
#include "Collidable.h"
#include "Level.h"
Collidable::Collidable()
{
this->_location = 0;
this->_sprite = 'E';
this->_hp = 1;
this->_damage = 0;
this->_x = -1;
this->_y = -1;
this->_dx = 0;
this->_dy = 0;
this->_ready = false;
this->_killable = false;
Level::addObject(this);
}
Collidabl... |
e11164383ca55b55a4f2a70a74785ea014a6826a | 4745c25c530e3488256662287462b02c4209f813 | crosswalk-project/chromium-crosswalk-efl | /components/dom_distiller/core/dom_distiller_service_unittest.cc | C++ | cc | 20,342 | permissive | // Copyright 2013 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 "components/dom_distiller/core/dom_distiller_service.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/containers/hash_tables.... |
a2f96495ca62d183d9a1217580219d4f9eaa060b | ee0bd00b6e0b96d0bf2cf5d2efbbe2376c7980a4 | jovanivanovic/chromium | /chrome/installer/setup/setup_util_unittest.cc | C++ | cc | 34,472 | 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/installer/setup/setup_util_unittest.h"
#include <shlobj.h>
#include <windows.h>
#include <ios>
#include <memory>
#include <string>
... |
8f09142453f9593b70e38a6f99f2a8af1d867b4e | df5d6c6911444f75c60154d82ab2fb8b7ab6ccae | lulugyf/metro | /src/sendcmd.cpp | C++ | cpp | 3,710 | permissive | // 这个程序是向 服务器发送指令的 独立程序
/*
参数: <redis_addr> <target_id> <pkt_yaml_file>
处理过程:
连接redis
从redis查询到 <target_id> 服务器的地址
连接服务器端口
读取 <pkt_yaml_file> 中的文件内容, 拼装报文 P1999
向服务器发送该报文
等待应答
关闭连接
关闭 redis连接
退出
*/
#include "pkt_def.h"
#include "comm.h"
#include "util.h"
#include "loguru.hpp"
#include <iostream>
#... |
923e1355e36f711d9bc1e35332177f5b190faf2d | b8cbe3dbd9600051d368b5ce2521f43e9e1972a1 | Uyen144/PigAndOreo | /Library/Il2cppBuildCache/iOS/il2cppOutput/System.Core_Attr.cpp | C++ | cpp | 57,621 | no_license | #include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <limits>
#include <stdint.h>
// System.Char[]
struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34;
// System.Type[]
struct TypeU5BU5D_t85B10489E46F06CEC7C4B1CCBD0E01FAB6649755;
// System.Reflection.Ass... |
e9c322deaaa32bdd74586fc13067327b8120d6a3 | 1a5ef1e69ad1533d6acbdd50257fd5b5b9880417 | anonymouss/my-leetcode-cpp | /src/0297-Serialize-and-Deserialize-Binary-Tree.cpp | C++ | cpp | 4,000 | no_license | /**
* Serialization is the process of converting a data structure or object into a sequence of bits so
* that it can be stored in a file or memory buffer, or transmitted across a network connection link
* to be reconstructed later in the same or another computer environment.
*
* Design an algorithm to serialize an... |
2669f8b73ac10f141bbe3d8d815b48426ecc4d07 | f00617cf5dfbb13c0aace788fc36baf1ad51598c | bagua0301/red_slg | /OriginalPlan/trunk/server/trunk/server/sharelib/src/sharelib_script_auto_gen_class.cpp | C++ | cpp | 51,676 | no_license | #include "sharelib_script_auto_gen_class_header.h"
bool sharelibAutoBindClass(CScriptEngineCommon::TScriptState* pState)
{
/*
using namespace luabind;
module(pState)
[
class_<_AttrBackupBase>("_AttrBackupBase")
,
class_<_RoleAttrBackup, _AttrBackupBase>("_RoleAttrBackup")
.def("getLevel", &_RoleAttrBackup::getLevel... |
b325bf1c89c6fa504914abd9be0b734e2ea3a665 | 7b143ad04cd0ae5782c73437be5b87842712f814 | gem5/gem5 | /src/systemc/dt/fx/sc_fxval_observer.cc | C++ | cc | 2,555 | permissive | /*****************************************************************************
Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
more contributor license agreements. See the NOTICE file distributed
with this work for additional information regarding copyright ownership.
Accellera licenses... |
4a442126b59236c2a1501d1984e571eb05011a4a | e4655dd96e4959cf34db524fae4594a1a9c59ccc | NAVITALAL/cs-assignment3 | /Lab3.Question15.cpp | C++ | cpp | 235 | no_license | #include <iostream>
using namespace std;
int main() {
// your code goes here
float x,y,z;
cin>>x>>y>>z;
if((x+y>z)||(y+z>x)||(x+z>y))
{cout<<"\nit is a triangle";}
else
{cout<<"\nit is not a triangle.";}
return 0;
}
|
a3569f0d31519d2519f671eff8adc3b742ca99dd | 56520ae4eb2f3fdd982ad91afdb76b4b59fdd716 | rlarla915/baekjoon_mil | /exercise/baekjoon_1904.cpp | C++ | cpp | 396 | no_license | #include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
int main()
{
int dp[1000001] = {0};
int num;
scanf("%d", &num);
dp[0] = 1;
dp[1] = 2;
if (num < 3)
{
cout << dp[num-1];
}
else
{
for (int i = 2; i < num ; i++)
{
dp[i] = dp[i-1] + dp[i-2];
if (dp[i] > 15746)
... |
b0dc870106532bd2c13be7f2a59833c398c08229 | ff9438511d1c3455b9bf1310e1d343df0d2e8c93 | stanleywxc/chromium-noupdator | /src/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc | C++ | cc | 8,545 | permissive | // Copyright 2017 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 "components/offline_pages/core/prefetch/prefetch_service_test_taco.h"
#include <memory>
#include <utility>
#include "base/macros.h"
#include "b... |
19be40ed6deb26ed3180ca645fc27557574ea584 | 0fbe3aac42848fadad200bdb68e17c3c7c14f8b9 | uel-dataexchange/Opencascade_uel | /inc/Handle_TFunction_DataMapNodeOfDataMapOfLabelListOfLabel.hxx | C++ | hxx | 941 | no_license | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _Handle_TFunction_DataMapNodeOfDataMap... |
c7cefeca4823e27405e2cce132ac4da028e0510a | 0dbbab56700578d54576ac0586a57f3946047f7f | TheAmbiaFund/Belacoin | /src/qt/bitcoinstrings.cpp | C++ | cpp | 13,614 | permissive | #include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *bitcoin_strings[] = {
QT_TRANSLATE_NOOP("bitcoin-core", ""
"%s, you must set a rpcpassword in the configuration file:\n"
"%s\n"
"It is recomme... |
24a42cd78ea7341ee70559118a1bd2f76d075f0d | 6f078a27f3177ea6ebb0fea7da76fb52cd681e93 | 15ers/Solve_Naively | /epikjjh/baekjoon/2217.cpp | C++ | cpp | 490 | permissive | #include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0),cin.tie(0);
int n;
cin >> n;
vector<int> rope(n);
for(int i=0;i<n;i++) cin >> rope[i];
sort(rope.begin(),rope.end(),greater<int>());
int max_weight = rope[0], min_tolerable = rope[0];
for(int i=1;i<n;i++){
int tmp = min(min_to... |
d7fde56edbb01739744801dd937adf941de5ba1f | ea08d32e44c440814421dbe9d72786c7234315ff | zqgs/CppAdvanced | /EffectiveCpp/Clause16_Same_From_Of_New_And_Delete.hpp | C++ | hpp | 1,071 | no_license | //
// Created by 曾庆国 on 2021/7/19.
//
#ifndef EFFECTIVECPP_CLAUSE16_SAME_FROM_OF_NEW_AND_DELETE_HPP
#define EFFECTIVECPP_CLAUSE16_SAME_FROM_OF_NEW_AND_DELETE_HPP
#include <string>
//条款16:成对使用new和delete时要采取相同形式
/*了解new和delete的实现过程:
* 1.使用new时有两件事发生:第一,内存被分配出来(通过operator new的函数)。
*第二,针对此内存会有一个(或多个)构造函数被调用。
* 2.使用del... |
b1cb95a343cd1c867cb3d034b76f88e3fa04984b | af0c444769078405399cce712b7d4d530f8b8bfd | klzgrad/naiveproxy | /src/net/third_party/quiche/src/quiche/quic/core/crypto/null_decrypter.cc | C++ | cc | 3,740 | 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 "quiche/quic/core/crypto/null_decrypter.h"
#include <cstdint>
#include "absl/numeric/int128.h"
#include "absl/strings/string_view.h"
#inclu... |
bf9e742130ad7e29354c05ab5595e1b98894b528 | 8ae17f82357a0e79743ec3458b4bd96150cc722d | andras-szabo/MagicTorch | /Source/Magic_Torch/Magic_TorchHUD.cpp | C++ | cpp | 1,064 | no_license | // Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "Magic_TorchHUD.h"
#include "Engine/Canvas.h"
#include "Engine/Texture2D.h"
#include "TextureResource.h"
#include "CanvasItem.h"
#include "UObject/ConstructorHelpers.h"
AMagic_TorchHUD::AMagic_TorchHUD()
{
// Set the crosshair texture
static Cons... |
603d09e8a1fdb61446af090d449815d38e62233e | 2a4fc2c613a595a1049613c59bb481b70aafcfc6 | phongnq-ptit/CPP_PTIT_2021 | /RAN01.cpp | C++ | cpp | 631 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int a; cin>>a;
while(a--){
long long n,soCauHoi; cin>>n>>soCauHoi;
long long arr[n];
// nhap mang
for(long long i = 0; i < n; i++){
cin>>arr[i];
}
while(soCauHoi--){
long long l,r; ... |
4347cd8ce0106f3b48e5ffa23cf77507e1585fd1 | 9290f45c0c320b478098d7f5e65fd33e5464f917 | Barathan-Somasundram/Epitech | /Tek2/B3-semestre/piscine_cpp/piscine_cpp_d07m/ex03/Borg.hh | C++ | hh | 1,473 | no_license | //
// Borg.hh for in /home/somasu_b/rendu/piscine_cpp_d07m/ex01
//
// Made by SOMASUNDRAM Barathan
// Login <somasu_b@epitech.net>
//
// Started on Tue Jan 13 19:00:36 2015 SOMASUNDRAM Barathan
// Last update Wed Jan 14 09:01:42 2015 SOMASUNDRAM Barathan
//
#ifndef BORG_H_
# define BORG_H_
#include <iostream>
#... |
336cfdabc148975bd90484a22c827c905d52a466 | 963facea5a0c3c9c9005a306200d904c5b5af15b | jangellx/TMProLWPlugIns | /Workspaces/Lightwave/AllKeyer/AllKeyer-StandAlone/ProcessThread.cpp | C++ | cpp | 6,621 | no_license | // ProcessThread.cpp : implementation file
//
#include "stdafx.h"
#include "AllKeyer.h"
#include "ProcessThread.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CProcessThread
IMPLEMENT... |
e874f999a56a32be69c5976815522edb4b2b9170 | 9819b341657187cfaecc371eeb6f99974e11f0a6 | jyasskin/chromium | /ui/app_list/views/folder_header_view.cc | C++ | cc | 6,307 | permissive | // Copyright (c) 2013 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 "ui/app_list/views/folder_header_view.h"
#include "base/strings/utf_string_conversions.h"
#include "grit/ui_resources.h"
#include "grit/ui_s... |
56092a19284e20a979f984d964e200668d30a6d7 | 1557b2dd0381563a4098f5496678a4cf07ed34ac | bobbart/Arma3ExileTanoa | /mpmissions/Exile.Tanoa/infiSTAR_AdminMenu.hpp | C++ | hpp | 10,536 | no_license | /*
Antihack & AdminTools - Christian Lorenzen - www.infiSTAR.de
#14637
*/
class RscListBox_infiSTAR {
access=0;
type=5;
style=0;
font="PuristaLight";
sizeEx=0.03;
rowHeight=0;
colorText[]={1,1,1,1};
colorScrollbar[]={1,1,1,1};
colorSelect[]={0,0,0,1};
colorSelect2[]={1,0.5,0,1};
colorSelectBackground[]={0.6,0.6,0.6,1};... |
750b9ce390f6783361486482428f84a3aafa3631 | bdc0adb568360b136be800eed04730550983f706 | JD2xor/competitive-programming | /ABC057/ABC057A.cpp | C++ | cpp | 534 | no_license | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define ALL(a) begin((a)), end((a))
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define RFOR(i, a, b) for (int(i) = (a); (i) > (b); (i)--)
#define debug(x) cerr << #x << " : " << x << '\n'
const int INF = 1e9;
const int MOD ... |
e59a0de9a50f0bbf65b773353a5665ad1d53e485 | 9d1f3c334d72576d3ec4c501444314fa08d9c88d | dzxs/ATH9KFixup | /ATH9KFixup/kern_start.cpp | C++ | cpp | 848 | permissive | //
// kern_start.cpp
// ATH9KFixup
//
// Copyright © 2017 lvs1974. All rights reserved.
//
// This kext is made based on lvs1974's NvidiaGraphicsFixup.
//
#include <Headers/plugin_start.hpp>
#include <Headers/kern_api.hpp>
#include "kern_ath9k.hpp"
static ATH9K ath9k;
static const char *bootargOff[] {
"-ath9ko... |
9ed9ffa9b13769708f23614783f2b0e2ae54b56d | 9ffe4eb680900a7f4cad1feb3504ad04a9e79313 | ddwivedi08/ats | /src/xlib/c/ats_clm_driver.cc | C++ | cc | 21,909 | permissive | /* -*- mode: c++; c-default-style: "google"; indent-tabs-mode: nil -*- */
/* -------------------------------------------------------------------------
ATS
License: see $AMANZI_DIR/COPYRIGHT
Author: ??
Effectively stolen from Amanzi, with few modifications.
------------------------------------------------------------... |
5704b613c8b2707985dc31337f63254b20fd9114 | 23be97c96c1522ded71642643c75147f4784aeb6 | makarenk0/InfoSearch | /Engine/Btree.cpp | C++ | cpp | 1,197 | no_license | #include "pch.h"
#include "Btree.h"
Btree::Btree()
{
}
Btree::~Btree()
{
for (auto i : nextNodes) {
delete i.second;
}
}
Btree* Btree::getNextNode(const char& symbol)
{
std::map<char, Btree*>::iterator it = nextNodes.find(symbol);
if (it == nextNodes.end()) {
return nullptr;
}
return it->second;
}
Btree... |
c2c6fbb2d619c152081a7f3817f14d80639d6fe6 | 068e94936aaad10ffc84c6491530f53cdf7dce7f | HrNilsson/SystemC-TIHSC | /Examples/Buttons/src/main.cpp | C++ | cpp | 988 | no_license | //----------------------------------------------------------------------------------------------
// main.cpp (systemc)
//
// Danish Intsitute of Technology (Copyright)
//
// Author: KBE / 2007.09.07
//----------------------------------------------------------------------------------------------
// Debounce... |
5ff1bace2ee2e2a3ecdb3183178e675622bca0e0 | 06105fe5365166e7ecb82a53a5ba8b75075b1611 | Jorjor70/meuh | /math/lcp.cpp | C++ | cpp | 376 | no_license | #include "lcp.h"
#include <math/error.h>
#include <math/qp.h>
namespace math {
lcp::lcp(const mat& M) : M(M) {
if(M.rows() != M.cols()) throw error("need a square matrix");
}
lcp::lcp(mat&& M) : M(std::move(M)) {
if(M.rows() != M.cols()) throw error("need a square matrix");
}
... |
00cc4ae444aa7a5fa614bc502fa9c5ac52848ef8 | b639002a300c03f13736386c18bf5eef42307d59 | Andrey-programmer/My_Large_Window | /LargeWindow/main.cpp | C++ | cpp | 488 | no_license | #include "myApplication.h"
#include "my_MainWindow.h"
int main(int argc, char *argv[])
{
WINDOW::MyApplication appl(argc, argv);
//WINDOW::MyApplication::setQuitOnLastWindowClosed(false);//запрещаем выходить из приложения при
//нажатии крестика будет с... |
e64961039b6ac397c524379f2c289bae6aeca0ad | 31a2f3d9e83e280b0220361f5743161cfedd6092 | lifestory/CatapultGame | /Classes/module/gamePlayingScene/Controller/ItemController/ItemController.cpp | C++ | cpp | 4,084 | no_license | #include"ItemController.h"
ItemController* ItemController::itemController = NULL;
ItemController::ItemController(){}
ItemController::~ItemController(){
if (itemController != NULL) {
itemController->removeFromParentAndCleanup(true);
itemController = NULL;
}
}
ItemController* ItemController::getInstance() {
if... |
ede25b57f0008ae760b1be4056e2b317910e7d51 | 5ccfb5bcb97ab518bedf0cb0bd9312aa2ca67a09 | staring/unistdx | /src/test/spin_mutex_test.cc | C++ | cc | 1,228 | permissive | #include "basic_mutex_test.hh"
#include "thread_mutex_test.hh"
#include "make_types.hh"
#include <mutex>
#include <unistdx/base/recursive_spin_mutex>
#include <unistdx/base/spin_mutex>
using sys::u64;
template <class T>
struct MutexTest: public BasicMutexTest<T> {};
TYPED_TEST_CASE(MutexTest, MAKE_TYPES(sys::spin_m... |
f8953f2b9cb349ab08f65c9846e3388c2d788f9d | 8e99f7666e83f3619032ea5a8680119de654bd93 | Hengle/filament | /filament/backend/src/opengl/GLUtils.cpp | C++ | cpp | 4,427 | permissive | /*
* Copyright (C) 2015 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... |
abc4ca2e955d2f0d4fbc31d4ef56f13bdfeb7307 | 605ad25043642f223ce5dc7b83b7cd11fc8164a8 | Niek-Okido/WaterMarker | /MainApp.cpp | C++ | cpp | 18,770 | no_license | #include "MainApp.h"
// IMPLEMENT_APP(MainApp)
IMPLEMENT_APP_CONSOLE(MainApp)
bool MainApp::OnInit()
{
if (!wxApp::OnInit())
return false;
// Create the main application window
MyFrame* frame = new MyFrame(
_("WaterMarker"), wxPoint(1, 1), wxSize(600, 182),
wxDEFAULT_FRAME_STYLE & ~(wxRESIZE_BORDER | wxMAX... |
914fa6439c40bf36623fc8f3f655b13abaa1120a | 355ba0c45f7082eff3accd01e4103523f442011d | joker-eph/nt2 | /modules/boost/simd/arithmetic/unit/simd/max.cpp | C++ | cpp | 3,916 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
fbdce62b557afa628f3b8933d7d159e37e827863 | 1ffa2f88e50329f505e035020e8b64becb9547d6 | fedetft/tdmh | /network_module/stream/stream_collection.cpp | C++ | cpp | 15,510 | no_license | /***************************************************************************
* Copyright (C) 2019 by Federico Amedeo Izzo *
* *
* This program is free software; you can redistribute it and/or modify *
* it unde... |
2dd1e3140557bea43969e33ef232ae1572f27c17 | 6c4f2eb78fd48aeaa22e88904382d92335cd6279 | In-Ki-Kim/viennamesh-dev | /plugins/color_based_refinement/pragmatic_mesh.hpp | C++ | hpp | 1,316 | no_license | #ifndef VIENNAMESH_ALGORITHM_PRAGMATIC_MESH_HPP
#define VIENNAMESH_ALGORITHM_PRAGMATIC_MESH_HPP
#include "viennameshpp/plugin.hpp"
#include "Mesh.h"
#include "external/PragmaticWrapper.h"
namespace viennamesh
{
namespace pragmatic_wrapper
{
//typedef Mesh<double> pragmatic_mesh;
typedef Pragma... |
5a021e52141fe9135572de74bc4661d2fbb8faec | 420e064101aa0db7824a95d6fc9c24ca5222bdbc | devblin/datalgo | /c&cpp/array.cpp | C++ | cpp | 1,139 | no_license | #include <iostream>
using namespace std;
int main()
{
/*
ARRAY:
A[3]
A[ ][ ][ ] <- array memory blocks
0 1 2 <- index
*/
int A[4];
int B[3] = {55, 2, 5};
/*
MAIN MEMORY
------------------
Heap Memory
------------------
Stack Memory
A[32][-23][-999][0] (fixed memory is allocated in stack for array... |
30a81a257c65abc10991c30b410c464748363523 | 36c0e4d18b522bc4aaa0ab9bb0632d31f1ba8792 | nmhung1210/ChakraCore | /lib/Backend/InliningDecider.cpp | C++ | cpp | 40,680 | permissive | //-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... |
e4f6e5d546c08a83c3e3a76f5d31b8ba34db8938 | cfca6bdf23beed8c0dc5fdcf38ac0fca6be8ed4c | amassiro/AdvancedMultifit | /NewMultifit/PulseChiSqSNNLS.cc | C++ | cc | 14,146 | no_license | #include "PulseChiSqSNNLS.h"
#include <math.h>
#include <iostream>
void eigen_solve_submatrix(PulseMatrix& mat, PulseVector& invec, PulseVector& outvec, unsigned NP) {
using namespace Eigen;
switch( NP ) { // pulse matrix is always square.
case 10:
{
Matrix<double,10,10> temp = mat.topLeftCorner<10,1... |
2cd1a37818283ee88f74c0e746a85eebb1a4f01a | 8d0d40317df164d0d046cfbf0a109fb93262a24f | dguest/susy-analysis | /analysis/include/constants_tagging.hh | C++ | hh | 282 | no_license | #ifndef CONSTANTS_TAGGING_HH
#define CONSTANTS_TAGGING_HH
namespace btag {
// log(pc / pu) selection minimum
const double JFC_MEDIUM_ANTI_U_CUT = 0.95;
// log(pc / pb) selection minimum
const double JFC_MEDIUM_ANTI_B_CUT = -0.90;
const double TAG_ETA = 2.5;
}
#endif
|
a0930423688d28e0bdae02aeeffbe1336180d561 | 28c9b04d4c1744d6dbbeb568182faba5c38eae73 | celery1798/coder201207 | /c++/new_delete.cpp | C++ | cpp | 243 | no_license | #include <iostream>
#include <cstring>
using namespace std;
int main()
{
char *p = new char[128];
if(p == NULL)
{
cout << "new error" << endl;
return -1;
}
strcpy(p,"Alan");
cout << p << endl;
delete []p;
return 0;
}
|
1c0e979c831643205d7fbe9a893a571e75aaa48b | fe797aaddf0dc21fd9d3b3375434e0fe1b01d48c | neuroimaging-mug/relaxometry | /src/includes/ezOptionParser.hpp | C++ | hpp | 70,932 | permissive | /*
This file is part of ezOptionParser. See MIT-LICENSE.
Copyright (C) 2011,2012,2014 Remik Ziemlinski <first d0t surname att gmail>
CHANGELOG
v0.0.0 20110505 rsz Created.
v0.1.0 20111006 rsz Added validator.
v0.1.1 20111012 rsz Fixed validation of ulonglong.
v0.1.2 20111126 rsz Allow flag names start with... |
a54c3b14d05c97857f940b73c6b824ea80438985 | bf8625660421981a401bcb2073f4ff88cd707ddc | Batagonya83/BeyondHuman | /Source/BeyondHuman/BeyondHumanCharacter.cpp | C++ | cpp | 9,375 | no_license | // Copyright Epic Games, Inc. All Rights Reserved.
#include "BeyondHumanCharacter.h"
#include "Gun.h"
#include "Public/MyGameplayAbility.h"
#include "AbilitySystemGlobals.h"
#include "Net/UnrealNetwork.h"
#include "HeadMountedDisplayFunctionLibrary.h"
#include "Camera/CameraComponent.h"
#include "Components... |
214a3bceef9377caa05ec4e43d03a76d02ad03cb | b10b357a36c4eeb32ea8fd601bb232fb5c3fc35a | hailongfeng/zhishiku | /Android/第三方完整APP源码/mogutt/TTWinClient/core/TTLogic/Observer.cpp | C++ | cpp | 1,641 | no_license | /*******************************************************************************
* @file Observer.cpp 2014\7\23 13:55:19 $
* @author ¿ìµ¶<kuaidao@mogujie.com>
* @brief
******************************************************************************/
#include "stdafx.h"
#include "TTLogic/Observer.h"
#i... |
08f0798d339902c2f8cdf45dba8d1feaa261ca2a | 5f440e5290e033eafe6b0ea646780c92fe646128 | josephtonyraj/forestdb | /src/filemgr_ops.cc | C++ | cc | 1,340 | permissive | /* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2010 Couchbase, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... |
1d3140e70d5b6ab96036477bde8e7e1989223502 | 5dabbb6c1f976f81db46c4125dd3862efecc5a2c | lineCode/phantom-1 | /projects/Phantom/phantom/lang/VirtualMethodTable.hxx | C++ | hxx | 2,547 | permissive | #pragma once
// haunt {
#include "VirtualMethodTable.h"
#if defined(_MSC_VER)
# pragma warning(push, 0)
#elif defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wall"
# pragma clang diagnostic ignored "-Wextra"
#endif
#include <phantom/namespace>
#include <phantom/package>... |
e3f86982ed70d1d0e1fd080a758a5b375318570c | 6ee5c299726f57923b60afcb03ba331b9996d85f | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/VLANSystemSettingData/UNIX_VLANSystemSettingData_HPUX.hxx | C++ | hxx | 1,826 | 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... |
98b335901e36068c73a5d93f20e3f306305f0441 | d17cee8330b8e204a886121b3903631cdd2b2e8a | evilquinn/projeul | /test/crypto_test.cpp | C++ | cpp | 1,050 | no_license | #include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <bint.hpp>
#include <crypto.hpp>
#include <utils.hpp>
using ::testing::Eq;
class CryptoTest : public ::testing::Test
{
public:
CryptoTest() = default;
~CryptoTest() override = default;
protected:
};
TEST_F( CryptoTest, testEnc )
{
bin... |
6d67a5a5f2632c74f8f0162d24e266e12e6ff32b | 3cdea8f36842db6b2fd01f1aa3d5a75241ff6e87 | wwllww/LiveStream_MultiIntance | /AudioPlugin/V1.0/AudioPlugin.cpp | C++ | cpp | 27,893 | no_license | /********************************************************************************
Copyright (C) 2012 Hugh Bailey <BLive.jim@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either vers... |
29d8106168443650352ac44486d3dddfc60c560c | 3295b3c84cd0ff16f4bd0a4849a3a95a322d7cce | dapetcu21/Porkholt | /Examples/SoundPlayer/main.cpp | C++ | cpp | 6,703 | no_license | /* Copyright (c) 2012 Marius Petcu, Porkholt Labs!. All rights reserved. */
#include <Porkholt/Core/PHWindowing.h>
#include <Porkholt/Core/PHViewController.h>
#include <Porkholt/Sound/PHSound.h>
#include <Porkholt/Sound/PHSoundManager.h>
#include <Porkholt/Sound/PHRawDecoder.h>
#include <Porkholt/Sound/PHAudioBuffer.h... |
da6b172a918269d18cf686830e8ee12ffc16c95c | 2a1dec404a8c9666e9f1e24dc2b406726507c3ce | winestone/hs-space-frontier | /CApp_OnInit.cpp | C++ | cpp | 10,769 | no_license | #include "CApp.h"
bool CApp::OnInit() {
debug = fopen("debug.txt", "w");
settings = fopen("settings.txt", "r");
if(SDL_Init(SDL_INIT_EVERYTHING) < 0) {
return false;
}
//Spam make ships V1.0, implement something to keep track of keydowns for improved version
//SDL_... |
f49887647a57f291cd2363618dc905ce315cbc3b | b9d55ff942feb5b8b71174910b18f24d23868a87 | eglxiang/cip | /main.cpp | C++ | cpp | 1,625 | no_license | //////////////////////////////////////////////////////////////////////
// Video Capture using DirectShow
// Author: Shiqi Yu (shiqi.yu@gmail.com)
// Thanks to HardyAI@OpenCV China
// Last modification: April 18, 2008
//////////////////////////////////////////////////////////////////////
//////////////////////... |
c92ffa80e5e12633f921359880ffae795cb3a1bf | 29109a2b60a5ec066d04fdaa3adb9153ffeae5e0 | Adecrem/CSE335 | /Project2Part2/CanadianExperience\MachineLib\Source.cpp | C++ | cpp | 561 | no_license | /**
* \file Source.cpp
*
* \author Andrew Decrem
*
* Source class that represents the source.
*
*/
#include "pch.h"
#include "Source.h"
#include "Sink.h"
/**
* Constructor
*/
CSource::CSource()
{
}
CSource::~CSource()
{
}
/**
* Add sink
* \param sink
*/
void CSource::Ad... |
4b95cdaf8a44208e2450fadb6c55a9291ce1645f | 14966eb61bc46cece712b614c235eb69cd321fbd | ayeshaAK/CLASH-OF-THE-TITANS-GAME-C- | /Shape.cpp | C++ | cpp | 402 | no_license | #include "Shape.h"
namespace std {
Shape::Shape() {
// TODO Auto-generated constructor stub
color = " ";
}
Shape::Shape(const string &c)
{
color = c;
}
const string& Shape::getColor() const {
return color;
}
void Shape::setColor(const string& c) {
this->color = c;
}
string Shape::toString()
{
return color;
}
S... |
5d610fef4110aa441181699bfadcd5aa298c33f3 | 5044a5b8b2fa4c004dbda1442406fd31e3cdf775 | MicrosoftDocs/visualstudio-docs | /docs/snippets/cpp/VS_Snippets_Winforms/DesignerTransactionCloseEventArgsExample/CPP/designertransactioncloseeventargsexample.cpp | C++ | cpp | 954 | permissive | #using <system.dll>
using namespace System;
using namespace System::ComponentModel;
using namespace System::ComponentModel::Design;
namespace MiscCompModSamples
{
public ref class DesignerTransactionCloseEventArgsExample
{
public:
DesignerTransactionCloseEventArgsExample()
{
}
//<Sni... |
b363b3c5ce1ee7d79ca77cec220e2f3fbdd55924 | ce0e7ae003fc10e0812fddde7b68515d78194057 | liza-jahan/newCodeforce-solution-all | /CF.A. I Wanna Be the Guy.cpp | C++ | cpp | 520 | no_license | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{ int a,p,q,b[250],x[200],i,cont=0;
cin>>a>>p;
for(i=0;i<p;i++)
{
cin>>b[i];
}
cin>>q;
for(i=p;i<p+q;i++)
{
cin>>b[i];
}
sort(b,b+(p+q));
for(i=0;i<p+q;i++)
{
if(b[i]!=b[i+1]... |
8f67d57da4358c24806ceba2b9af6e6ba7b4c132 | d8d2dfe7ef995b0b4ca7238068ab939ea895920a | Mu2e/Offline | /Filters/src/FilterG4Out_module.cc | C++ | cc | 22,335 | permissive | // Given a set of "interesting" hits, write out all SimParticles
// making the hits and all their parents. Also write out all hits
// made by the selected particles in a specified set of "extra"
// collections, preserving the original collection instance names.
//
// E.g:
// "interesting" = TS3Vacuum, DS2Vac... |
3b2281747801dfc062cfca55827b2e2d4afb3f73 | b23edc0e5913092afdc361c6ac80a90a89152757 | hejajama/nlobkfitter | /src/ic_special.hpp | C++ | hpp | 487 | no_license |
/*
* BK equation solver
* Heikki Mäntysaari <heikki.mantysaari@jyu.fi>, 2012
*/
#ifndef _BK_MV_SPECIAL_
#define _BK_MV_SPECIAL_
/*
* Special IC
*/
#include <string>
#include <tools/config.hpp>
#include "ic.hpp"
#include "amplitude.hpp"
/*
* Special class which can be used when BK equation is solved using
*... |
af939078c2b695580ba96ab9bddf0cc41575bd4a | 9889d2740864eeb644ae4a7beb93dbb2a0338bcb | laurenam/meas_algorithms | /src/shape/SdssShape.cc | C++ | cc | 37,676 | no_license | // -*- LSST-C++ -*-
/*
* LSST Data Management System
* Copyright 2008, 2009, 2010 LSST Corporation.
*
* This product includes software developed by the
* LSST Project (http://www.lsst.org/).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Publi... |
0ff5709c614baf99cdb4e08fd24f5416efa66dc8 | b5153f840c373d663b1abc4332dccd3e2cb4abd8 | fengjixuchui/LIEF | /include/LIEF/PE/LoadConfigurations/LoadConfiguration.hpp | C++ | hpp | 6,041 | permissive | /* Copyright 2017 - 2022 R. Thomas
* Copyright 2017 - 2022 Quarkslab
*
* 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 req... |
01e7e4589b6141461d1e1fe150f6424e2c6a55b5 | c558098fb2500c02b6fddd27ab0aa87f22ca3fcf | project-asap/swan_clang | /lib/Sema/SemaExceptionSpec.cpp | C++ | cpp | 43,060 | permissive | //===--- SemaExceptionSpec.cpp - C++ Exception Specifications ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
49991e1933c18b5dfae308dc9e923461ba5e01b2 | 21c3a8b9cfce4afe35d506addefbf84e09325727 | AswathSuriya/project-euler-hackerrank | /#8: Largest product in a series.cpp | C++ | cpp | 741 | no_license | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int T;
cin>>T;
while(T--){
int N,K,prod=0;
cin>>N>>K;
char t[N];
int A[N];
cin>>t;
for(int i=0;i<N;i++){
A[i]... |
4cf85679e269e40fbb81bdda446a5dabe2bc7122 | ad35974b5a5b6f2ec1572bfa4d66549b3ebcf8fc | krems/z_function | /zfunction.cc | C++ | cc | 1,805 | no_license | // Author: Krems
#include <iostream>
#include <string>
#include <vector>
using std::string;
using std::vector;
using std::endl;
using std::cin;
using std::cout;
// Longest common prefix of sourceString's substrings starting from lhsIndex
// and rhsIndex
size_t calculateNaiveLCP(const string& sourceString, size_t lhs... |
26bed9fd5c1b3305edc45645b18ea17a8d1401c1 | a7f1895f61b434d8a24afa84bbff7fb8c9a74bb2 | ammarfaizi2/test-ipc-crash | /boost/geometry/algorithms/detail/overlay/handle_colocations.hpp | C++ | hpp | 28,690 | no_license | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
// This file was modified by Oracle on 2017-2020.
// Modifications copyright (c) 2017-2020 Oracle and/or its affiliates.
// Contributed and/or m... |
390d158da5fff88ddc130023807345811825ec3b | a2ba4f266448bec434c7d1959ed1afb1c953a03e | accb529/Kassiopeia | /KGeoBag/Source/Math/SpaceTree/Include/KGBallCloud.hh | C++ | hh | 1,128 | no_license | #ifndef KGBallCloud_HH__
#define KGBallCloud_HH__
#include <vector>
#include "KGBall.hh"
namespace KGeoBag
{
/*
*
*@file KGBallCloud.hh
*@class KGBallCloud
*@brief
*@details
*
*<b>Revision History:<b>
*Date Name Brief Description
*Sat Aug 24 14:27:45 CEST 2013 J. Barrett (barrettj@mit.edu) First Version
*
*/
temp... |
e84730ed111f3e8fe39ade2224e5fbe03d020ec6 | 52773f23e8d87c21640c206bd4883b4d06ebe888 | memorais/TC2_impl | /mozilla-central-4420f27742c7/gfx/layers/composite/ContentHost.cpp | C++ | cpp | 13,553 | permissive | /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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.0/. */
#include "mozilla/layers/ContentH... |
f2f4d9bc82b00279f4acfa625f376d89a16b2c49 | dd3485f3939f16efddae7c68ba51727ceeadd797 | CCCVLMAlgorithmStudy/AlgorithmStudy_1st | /SooHwan/Code/4thWeek/wordSort.cpp | C++ | cpp | 477 | no_license | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
int main(){
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
int N;
std::cin >> N;
std::string str;
std::set<std::pair<int, std::string> > S;
for (int i = 0; i < N; i++)
{
std::cin >> str;
S.insert( std::... |
3a7c86a45a2cc6d6d9c891a96fbeb18a8c4f4079 | c100f04c5599a493bab340727fda697571a71d20 | 20cmdingding/QChartist | /QChartist/indicators/TSCD.cpp | C++ | cpp | 7,059 | no_license | //+------------------------------------------------------------------+
//| TSCD.mq4 |
//| Copyright © 2007 Mulyadi |
//| Time Series Convergen Divergen |
//| indi ini menunjukkan Conv.Div. ... |
992e05c80db770f4067e3ba0e1dbf06663da17bc | e3a92a3c19f68752245ae20c9198ed6581ea94f6 | TaishiRoy/CP | /Commonly Asked/QuickSelect.cpp | C++ | cpp | 1,137 | no_license |
// function to find the kth largest element
// O(n^2) time complexity but O(n) for randomised
int partition(int *arr, int low, int high)
{
swap(arr[high], arr[low+rand()%(high-low+1)]);
int pivot=arr[high];
int i=low-1;
for(int j=low; j<high; j++)
{
if(arr[j]<pivot)
{
... |
c33e9772a2362796ee3f5dd10036bead91a22193 | 4e4ed57c638dc9a95a37560d8d96f89ef3164d97 | lionco-in/lioncoin | /src/qt/test/wallettests.cpp | C++ | cpp | 11,678 | permissive | #include <qt/test/wallettests.h>
#include <qt/test/util.h>
#include <init.h>
#include <interfaces/chain.h>
#include <interfaces/node.h>
#include <base58.h>
#include <qt/bitcoinamountfield.h>
#include <qt/optionsmodel.h>
#include <qt/platformstyle.h>
#include <qt/qvalidatedlineedit.h>
#include <qt/sendcoinsdialog.h>
#i... |
8798c02b257a926e38ff59690bada027a66f5648 | 4c2ca04f2afb34cf58a310fac7f87463763d19a2 | fivehao0919/cpp_primer_plus | /9/twofile2.cpp | C++ | cpp | 504 | no_license | // twofile2.cpp -- variables with internal and external linkage
#include <iostream>
extern int tom; // tom defined elsewhere
static int dick = 10; // overrides external dick
int harry = 10; // external variable definition
// no conflict with twofile1 harry
void remote_access()
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.