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 |
|---|---|---|---|---|---|---|---|---|
5faa9fecdb54aab97757e6b139dd4f8b7f46e4e8 | d558803b5a66f91acfa161f662ef8d699bb2cb80 | snowflakedb/libsnowflakeclient | /deps/arrow-0.17.1/cpp/src/arrow/vendored/variant.hpp | C++ | hpp | 103,300 | permissive | // Vendored from v1.4.0, from single-header branch at https://github.com/mpark/variant/commit/d1cdfdd3f2ed80710ba4d671fe6bffaa3e28201a
// MPark.Variant
//
// Copyright Michael Park, 2015-2017
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.o... |
44d367a8e264ad958554a0a30fb17e13f698af3a | 765cfd43a85666e03eafc83d3ba5422dcf0ee089 | muttleyxd/chromium | /components/autofill/core/browser/payments/test_payments_client.cc | C++ | cc | 7,744 | 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/autofill/core/browser/payments/test_payments_client.h"
#include <memory>
#include <unordered_map>
#include "base/json/json_reader.h... |
7331a8213405e7c28884c83aee719e0a412d7a78 | ad5a1d7a4faf4bf9a300b552662462f747d33505 | ngvanoverbeke/CS201-Group-Project | /Project/encodedecode.cpp | C++ | cpp | 1,163 | no_license | //This cpp file holds the functions to encrpyt and decrypt the passwords and addresses when necessary
#include "Main.hpp"
string decrypt(string& toDecrypt, string& masterPass){
string key = masterPass;
string cipher = toDecrypt;
byte iv[AES::BLOCKSIZE] = "CA8A8878F14RFB7";
string recovered;
CBC_M... |
309e1aa3f0ced75cc334583c5e922b5cff2808cf | 8cf10141fdd15906f7ce754699c4d3ddacd60ab5 | murugan89/box2d-samples | /Source/Application.cpp | C++ | cpp | 12,736 | no_license | #include "Application.h"
#include "Graphics.h"
#include "World.h"
#include "Body.h"
#include "Joint.h"
namespace
{
Body bodies[200];
Joint joints[100];
Body* bomb = NULL;
float timeStep = 1.0f / 60.0f;
int iterations = 10;
Vec2 gravity(0.0f, -10.0f);
int numBodies = 0;
int numJoints = 0;... |
8c0a166eefcaa8651f014f364cd35674cce319a8 | 7e1ba0c3e56acd61433ec5ba0076c0e438815b15 | PLLUG-Community-C-Qt-Roadmap/file-server | /configuration.cpp | C++ | cpp | 574 | permissive | #include "configuration.h"
Configuration::Configuration():mIpAddress("0.0.0.0"),mPort(0),mDocRoot("")
{
}
void Configuration::setIpAddress(std::string ipAddress)
{
mIpAddress = ipAddress;
}
void Configuration::setPort(int port)
{
mPort = port;
}
void Configuration::setDocRoot(std::string d... |
da55c6b34fc6f7093ef52e2d3207a51f3ef47ede | c6acc593372e9c39d6996f5448aa095e86038e51 | Pepeiam/Lista2-LPI | /mainHospital.cpp | C++ | cpp | 782 | no_license | #include "Medico.h"
#include "Cirurgiao.h"
#include "Oftalmologista.h"
#include "Otorrino.h"
#include "Ginecologista.h"
#include <iostream>
#include <string>
#include <windows.h>
//std::string nome, std::string formacao, double peso, double altura
int main(){
Cirurgiao ciru1 = Cirurgiao("Toinho do T... |
cbc1d5fc493df2c738cf4fbb63fbd7039fa0e673 | 1cc4daf2b1f2567512aac5ab827d3472800b99f9 | ArthoPacini/blockchaincpp | /Block.hpp | C++ | hpp | 4,517 | permissive | #ifndef BLOCK_HPP_
#define BLOCK_HPP_
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include "Transaction.hpp"
#include "sha256.hpp"
#include "nlohmann/json.hpp"
#include "timestamp_as_string.hpp"
class Block
{
private:
std::uint64_t index;
std::string bl... |
0394839d14c2809335c6433b87c5b4f9bb4effba | ae46b33fddce51126dcb9954550c5e762d9615e0 | oskarirauta/RS485_library | /master/RS485.cpp | C++ | cpp | 15,315 | permissive | /* RS485 library ( Master version )
written by Oskari Rauta
*/
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <math.h>
#include "RS485.h"
/* Helper functions */
void RS485::begin(char *deviceNode, uint32 baud) {
strcpy((char *)devFile, (char *)deviceNode);
fd = serialOpen((char *)devFi... |
75e26afd67eb768f6e89220161b218bb1e9e01d6 | df546a6cd5ed01f4b3fa16d71ae9cf8f2a91ff7e | crawler99/RemotePharmacist | /SessionServer/SessionServer/server/DBCmd_AddDealOfSpecialDrug.cpp | C++ | cpp | 4,534 | no_license | #include "DBCmd_AddDealOfSpecialDrug.h"
#include "../logger/Logger.h"
#include "../util/Utils.h"
#include <sstream>
namespace sserver { namespace server {
DBCmd_AddDealOfSpecialDrug::DBCmd_AddDealOfSpecialDrug
(Poco::UInt32 updateDealId,
Poco::UInt32 storeId,
const st... |
633ccfdb476baaed3970a8b80c64536721f9dfde | 11b6a5eb0ce6f74c5e27f316bbe7ec50037794a0 | mshahmirkhan/GPA-CGPA-Criteria_teller.cpp | /GPA-CGPA-teller.cpp | C++ | cpp | 98,047 | no_license | #include <stdio.h>
#include <stdlib.h>
#include<iostream>
#include <conio.h>
using namespace std;
main()
{
char repeat;
cout<<"\n\n\n\t\t\t *********************";
cout<<"\n\n\t\t\t * GPA TELLER *";
cout<<"\n\n\t\t\t *********************";
do{//for repretition
//universities names.
cout<<"\n\n\n\n\... |
b04ae6a6f774a3c22f3ba5aea8451f4e27135cbc | 72be97ad14686000a41a8b9978bd8b5e8bf0b702 | ValeevGroup/Umpire | /src/umpire/op/HostMemsetOperation.hpp | C++ | hpp | 1,010 | permissive | //////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2016-19, Lawrence Livermore National Security, LLC and Umpire
// project contributors. See the COPYRIGHT file for details.
//
// SPDX-License-Identifier: (MIT)
////////////////////////////////////////////////////////////////... |
205ee42d0a8eb5ce43182a99c5a3a598d2c93731 | c890a1e72dd0e1a73860855d5ae7ebd223f84e04 | Brenn10/gvg | /gvg_planner/src/Planner.cpp | C++ | cpp | 32,561 | permissive | #include <gvg_planner/SelectBearing.h>
#include "Planner.h"
#include <gvg_mapper/RetrieveBearings.h>
#include <gvg_mapper/RetrievePath.h>
#include <gvg_mapper/CheckRelocalize.h>
#include <localizer/MinUncertainty.h>
#include <localizer/MaxUncertainty.h>
#include <gvg_mapper/GVGEdgeMsg.h>
#include <gvg_mapper/RetrieveEd... |
02f39a73606d314a6d2677a0dde67cd18fa51abc | fa5d325b774540e4674965166767fac53b257475 | Ru311/100-days-of-code | /max gap.cpp | C++ | cpp | 1,016 | permissive | /*Given an unsorted array Arr of length N.
Your task is to find the maximum difference between the successive elements in its sorted form.
Return 0 if the array contains less than 2 elements.*/
// { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function... |
449d6cf45f403086a552dfd46ebd178b039d4881 | cf1183a453385847adf5e1c6557f2dcdca0b2fec | kmvisscher/shaderGen | /shaderGen/source/main.cpp | C++ | cpp | 845 | no_license | #include "shaderGen.h"
#include "ast/abstractSyntaxTree.h"
#include "ast/abstractSyntaxFunction.h"
#include "ast/abstractSyntaxDeclaration.h"
#include "ast/abstractSyntaxLoop.h"
#include "lex/zsl/lexer.h"
int main()
{
/*
ASTDriver driver;
ASTFunction *function = driver.Create< ASTFunction >( 0, "TEST", A... |
72ae2570d27c65b9e7896bbe20b0136a468102d8 | 1e5d61831ccbe67fa3069131590e8a9f3dd1050d | zishengye/compadre | /kokkos/core/src/Qthreads/Kokkos_QthreadsExec.hpp | C++ | hpp | 22,763 | permissive | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... |
d6c830147c2cc55a393bf9ce64bdf76c73e5366a | a26384cb13834feae1de66bb3a74e9b4877c7592 | piquepq/HiGHS | /src/mip/HighsLpRelaxation.cpp | C++ | cpp | 19,024 | permissive | #include "mip/HighsLpRelaxation.h"
#include "mip/HighsCutPool.h"
#include "mip/HighsDomain.h"
#include "mip/HighsMipSolver.h"
#include "mip/HighsMipSolverData.h"
#include "mip/HighsPseudocost.h"
#include "util/HighsCDouble.h"
HighsLpRelaxation::HighsLpRelaxation(const HighsMipSolver& mipsolver)
: mipsolver(mipsol... |
c7989510f2ff7147e564daf90d65de8db229e3f2 | b3f2f93a3cd18f79514344866f67452ecd205b0c | Grumbel/fontgen | /src/fontgen.cpp | C++ | cpp | 9,239 | no_license | #include <set>
#include <sstream>
#include <stdexcept>
#include <algorithm>
#include <stdlib.h>
#include <string>
#include <stdexcept>
#include <vector>
#include <iostream>
#include <fstream>
#include "utf8.hpp"
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "bitmap.hpp"
FT_Library library... |
982569b9a5215098701f8131b84e82453d60a4d9 | 25e5a7302aefcac8392efc652693c0504c6a6178 | WiViClass/cef-3.2623 | /chromium/src/chrome/browser/ui/ash/session_state_delegate_chromeos_unittest.cc | C++ | cc | 11,556 | 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 "chrome/browser/ui/ash/session_state_delegate_chromeos.h"
#include <string>
#include <vector>
#include "base/macros.h"
#include "base/memory/sc... |
be882052709269afeba1662ef6c7a1769963277f | dc0e3b6e65303c0b898ec640edde543c550f8b84 | hmans/gosu | /GosuImpl/Graphics/TexChunk.hpp | C++ | hpp | 1,195 | permissive | #ifndef GOSUIMPL_GRAPHICS_TEXCHUNK_HPP
#define GOSUIMPL_GRAPHICS_TEXCHUNK_HPP
#include <Gosu/Fwd.hpp>
#include <Gosu/ImageData.hpp>
#include <Gosu/TR1.hpp>
#include "Common.hpp"
#include <memory>
#include <vector>
#include <stdexcept>
class Gosu::TexChunk : public Gosu::ImageData
{
Graphics& graphics;
DrawOpQ... |
d4f6fcae87bcc66c34d40a355aa9712c274a596e | 0289f24f45ee7533094bcef07a9f52d7c25c88ee | xulunfan/magma | /src/dsygst.cpp | C++ | cpp | 15,079 | no_license | /*
-- MAGMA (version 2.0.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date February 2016
@author Raffaele Solca
@author Azzam Haidar
@author Mark Gates
@generated from src/zhegst.cpp normal z -> d, Tue Feb 9 1... |
41ef25c3f50f783ee30bc432b7d4b0ed0273e69c | 4ca33125eee11bb8c0649f90c2ce426e2c642f90 | BanSheeGun/Learning | /Cpp/ATM/Accounts.cpp | C++ | cpp | 2,246 | no_license | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
class Account {
protected:
int ID;
string Password;
string Name;
string Email;
string PersonID;
double Balance;
double Loan;
public:
Account() {
static int NID = 1... |
f3904b2bdcfcd276c5d31b4180d3c256a8da968f | 1ae0394e56a5d931c67da56f9349656830c08a5c | pgrawehr/golgotha | /loaders__load.cpp | C++ | cpp | 1,935 | permissive | /********************************************************************** <BR>
This file is part of Crack dot Com's free source code release of
Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
information about compiling & licensing issues visit this URL</a>
<PRE> If that doesn't help, ... |
baa799370a9b5fb4d8c91accf63116cf44663837 | 787d3b4200c24b4f6c2e9551385d601026efff83 | gansidui/gobang | /C++/MyFive/AIThread.cpp | C++ | cpp | 1,557 | permissive | // AIThread.cpp : implementation file
//
#include "stdafx.h"
#include "MyFive.h"
#include "AIThread.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAIThread
IMPLE... |
dc57305e3a92e671377b30b51903b87260071f65 | 7f0fbf364315b2e0dd9077e80e6c19f4881a3067 | Ayanbho/sp2020 | /sp2020/e32-a35/devices/ecc/rm_codes/combination_geekforgeeks.cpp | C++ | cpp | 1,678 | permissive | // C++ program to print all combination
// of size r in an array of size n
#include<bits/stdc++.h>
using namespace std;
void combinationUtil(int arr[], int data[],
int start, int end,
int index, int r);
// The main function that prints
// all combinations of size r
// in arr[] of size n. This funct... |
d250ca7cfd85e80e74303f47a8327e67578aafa6 | a2820a77aaffa26d4d4d4034a02e64796ab0859d | Underdog-113/3D_portfolio | /Editor/EffectTool/Code/SkyBoxShader.cpp | C++ | cpp | 1,078 | no_license | #include "EngineStdafx.h"
#include "SkyBoxShader.h"
USING(Engine)
CSkyBoxShader::CSkyBoxShader()
{
}
CSkyBoxShader::~CSkyBoxShader()
{
}
CShader * CSkyBoxShader::Create(void)
{
CSkyBoxShader* pInstance = new CSkyBoxShader;
pInstance->Awake();
return pInstance;
}
void CSkyBoxShader::Free(void)
{
__super::Free... |
23b13e26eedee9a24f383b9b70b1697cdc19398d | 49279f811bdcd5dff5fe86f89a13d8581b0b06ca | leikong/service-fabric | /src/prod/src/Common/Environment.Test.cpp | C++ | cpp | 3,684 | permissive | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
#include ... |
588ffac8802d7c3ce4e9a633c94df76c8ac32991 | ff7934db6893b11e711ef29cda79334c3499d395 | bart-kneepkens/PTT3 | /Gpio/LedController.cpp | C++ | cpp | 554 | no_license | #include "LedController.hpp"
LedController& LedController::getInstance() {
static LedController instance;
return instance;
}
LedController::LedController() {
path = "/sys/class/gpio/";
exportFile.open((path + "export").c_str());
exportFile << 14;
exportFile.close();
directionFile.open((p... |
697433f9d984e4a6b701f69ac921bcca95f1c30d | 4379e198dfe889579a5f276b0a7a28da899bf7ba | christian-vigh/sharpvroom | /Sources/xmmfuncs.cpp | C++ | cpp | 12,056 | no_license | /**************************************************************************************************************
NAME
xmmfuncs.cpp
DESCRIPTION
Fast memory functions usings the SSE instructions.
AUTHOR
Christian Vigh, 09/2012.
HISTORY
[Version : 1.0] [Date : ... |
de7520512f252fb27403f949811a6d16c2ae128b | a27f1697867e3c6348fcd08b73a6b6f91d0db25b | terrordrummer/safebikesimframework | /FrameworkCanBus/sources/CANCallbackManager.cpp | C++ | cpp | 14,200 | no_license | #include "FrameworkCanBus/CANCallbackManager.h"
using namespace FrameworkCanBus;
/*
____ _ _ _ ____ _ _ _ _ __ __
/ ___| / \ | \ | |/ ___|__ _| | | |__ __ _ ___| | _| \/ | __ _ _ __ __ _ __ _ ___ _ __
| | / _ \ | \| | | / _` | | | '_ \ / _` |/ __| |/ / |\... |
d45bb89e8748ffcadf78c9294267a2f5a32dda0e | 5e74f4a80a273fbd12ef5ea1eadbdf57388acecd | marco-c/gecko-dev-wordified | /third_party/libwebrtc/modules/audio_processing/aec3/suppression_gain_unittest.cc | C++ | cc | 6,148 | permissive | /
*
*
Copyright
(
c
)
2017
The
WebRTC
project
authors
.
All
Rights
Reserved
.
*
*
Use
of
this
source
code
is
governed
by
a
BSD
-
style
license
*
that
can
be
found
in
the
LICENSE
file
in
the
root
of
the
source
*
tree
.
An
additional
intellectual
property
rights
grant
can
be
found
*
in
the
file
PATENTS
.
All
contributing... |
2c95d649e4c2171ead49da8dd93284606eff3b27 | b921a39261015ebe25cf02a75656e5f468daeb0f | darthur30/CurrencyConverter | /source/mainwindow.cpp | C++ | cpp | 6,290 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include "programutilities.h"
#include "resultdialog.h"
#include "aboutdialog.h"
#include <QDebug>
/********************************************/
/*** CONSTRUCTORS ***/
/********************************************/
MainWindow::MainWindow(QWi... |
0dff94ad1f4cc045811c4577d3cd5721e4caf478 | e6d9a34edacc9d2e400281c8445a14a2c78be19e | jrtomps/spectcl | /5.0dev/SpecTclPackage/DataSourceFactoryTest.cpp | C++ | cpp | 6,054 | no_license | // Template for a test suite.
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/Asserter.h>
#include "Asserts.h"
#define private public // Hack to get at internals for white box tests.
#include "CDataSourceFactory.h"
#undef private
#include "CDataSource.h" // For my own test data sources
#include "CDat... |
55d8986628be1df88eee8156ff472377c481f008 | 22f712348b41aec2bdedf4d9e33ec02afa5757af | alooftr/Dynamism | /main.cpp | C++ | cpp | 12,417 | no_license | #include <ShlObj.h>
#include <ShlObj_core.h>
#include "includes.hpp"
#include "utils\ctx.hpp"
#include "utils\recv.h"
#include "utils\imports.h"
#include "nSkinz\SkinChanger.h"
#include <Kit_parser.h>
#include "utils/anti_debug.h"
#include "cheats/lagcompensation/animation_system.h"
#include "cheats/visuals/player_esp.... |
0a7e7b409745c6c23897b89ec715ee6e2f2ba006 | 76a3899c9b6d6b1f2c813cc373b3330b33e823d0 | PhillBenoit/C-Data-Structures-spring- | /269 - Homework 13 - file compare/269 - Homework 13 - file compare/269 - Homework 13 - file compare.cpp | C++ | cpp | 686 | no_license | // Phillip Benoit
// CIS269
// Homework 13
// 269 - Homework 13 - file compare.cpp : Defines the entry point for the console application.
#include "Util.h"
#include "fileCompare.h"
int main() {
setbuf(stdout, NULL);
printStart();
printf("* This program compares two files. *\n"
"* Lines tha... |
f68b0b61f4862c8ecab6b2fab163cdcc9ef8cf89 | 3f1f30cf20705e8147df5518d02b7fabef89dcc8 | amkalsi/cmssw | /Alignment/CocoaModel/src/OptOCameraDetector.cc | C++ | cc | 997 | permissive | // COCOA class implementation file
//Id: OptOCameraDetector.cc
//CAT: Model
//
// History: v1.0
// Pedro Arce
#include "Alignment/CocoaModel/interface/OptOCameraDetector.h"
#include "Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h"
#include "Alignment/CocoaUtilities/interface/GlobalOptionMgr.... |
07224ee6be8a8be509b84ea2d2a2bccc132f5685 | de3ef0bb817385a26d267e25237e52d01703fe91 | fhaust/event-driven | /src/obsolete/emorph_lib/src/eventBottle.cpp | C++ | cpp | 7,672 | no_license | // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
/**
* Data buffer implementation for the event-based camera.
*
* Author: Francesco Rea
* Copyright (C) 2010 RobotCub Consortium
* CopyPolicy: Released under the terms of the GNU GPL v2.0.
*/
#include <iCub/emorph/eventBottle.h>
#define word... |
89fc9e37cf50a61ff863935837d3d79ae2803b2d | 20512e31ac452c88ba4161e7baeaa677d8c520d7 | Jaboxx/grpc | /src/core/lib/iomgr/ev_epollsig_linux.cc | C++ | cc | 59,529 | permissive | /*
*
* Copyright 2016 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
f24d5d44347a14b754bc95fee686a8178f2cd9ca | 461f10704cf5ec7a3f47adff393fb11a61782617 | AnatolyDomrachev/karantin | /is28/shishmakova28/CPP/lab1_zad5.cpp | C++ | cpp | 552 | no_license | /*vozrast = int(input('сколько вам лет? '))
kurs = int(input('На каком ты кóрсе?'))
print('Ваш возраст, когда вы закочите инститóт,',vozrast + (4-kurs))*/
#include <iostream>
using namespace std;
int main()
{
int vozrast, kyrs, vupysk;
cout << "сколько вам лет?\n";
cin >> vozrast;
cout << "на каком ты кóрсе?\n";
cin... |
ebf3f6296131e89271c0826754ef8aa03b19e8a5 | dcc931520390195ce789041cc19d80187c6416c5 | vyas007kapil/temp | /Floyd/floyd.cpp | C++ | cpp | 2,145 | no_license | /*
* fw.cpp
*
* Created on: 03-Feb-2016
* Author: pinku
*/
#include<iostream>
#include<iomanip>
#define INF 32768
using std::cout;
using std::cin;
class flo
{
int **a,n,**next;
public:
flo(int num=0)
{
n=num;
a=new int*[n];
next=new int*[n];
for(int i=0;i<n;i++)
{ a[i]=new int[n];
ne... |
1d9d1b5446df66ae44301a75b3c0662e4d782dc9 | e76d7fbfd0ccf8d2b5b6fda551e9fd32b03c949c | luis-guilherme/VC4C | /src/intrinsics/Intrinsics.cpp | C++ | cpp | 62,803 | permissive | /*
* Author: doe300
*
* See the file "LICENSE" for the full license governing this code.
*/
#include "Intrinsics.h"
#include "../SIMDVector.h"
#include "../analysis/ValueRange.h"
#include "../intermediate/Helper.h"
#include "../intermediate/TypeConversions.h"
#include "../intermediate/VectorHelper.h"
#include "..... |
9e6dd229f3051a39e3ec1698516ab1dd23b6513c | 94a9b98d32dfccbb189629ab97665c2faaa78ec5 | lewes6369/mkl-dnn | /src/cpu/nspc_batch_normalization.cpp | C++ | cpp | 18,062 | permissive | /*******************************************************************************
* Copyright 2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... |
5be7fc409b91d3fd20cf4e6a955c06bc9d912431 | fe0762044f1584275f341c7955b98dc1075b6a9c | jansennathan/PHY-905 | /HW1/Harmonic_series.cpp | C++ | cpp | 3,420 | no_license | //************************************************************************
// file: Harmonic_series.cpp (HW # 1 PHY905 MSU Spring 2020)
//
//
// Program to sum harmonic series either up from 1 or down from N
//
//
// Programmer: Nathan Jansen, jansenn1@msu.edu
//
// Revision history:
// 03-Feb-2020 ... |
377a8461ab49ab18e1870debd2a77eee1bb526e1 | 73adf39c3e14ce81a1e2817bc40ecae8c9ddd9d5 | rvbelapure/comparch | /a1/temp/lab1/sim.cpp | C++ | cpp | 12,162 | no_license | #include "common.h"
#include "sim.h"
#include "trace.h"
#include <stdlib.h>
/*******************************************************************/
/* Simulator frame */
/*******************************************************************/
bool run_a_cycle();
void init_structures();
/* uop_pool related variables *... |
f765969a3186bd529500087fc1eb4e817dac3c6f | d228f20825cacbd65298b666b1194a07404342ca | wisest30/AlgoStudy | /source/leetcode/1713/신입.cpp | C++ | cpp | 1,046 | no_license | class Solution {
public:
int fenwick[1'00000+5];
int N;
void update(int idx, int newVal)
{
for(;idx<=N;idx+=(idx&(-idx))) fenwick[idx] = max(fenwick[idx], newVal);
}
int getMx(int idx)
{
int ret = 0;
for(;idx>0;idx-=(idx&(-idx)))
{
ret = ... |
7a041c25ac07a0c925704f024a6012571ffa8c0a | f5860c322b8faf3ba226a3c8fa7ae8a5228710bc | mementum/codeeval | /03-hard/0053-repeated-substring/0053-repeated-substring.cpp | C++ | cpp | 4,598 | no_license | /*
Copyright (C) 2015, 2016 Daniel Rodriguez
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 version 3 of the License, or
(at your option) any later version.
This program is distr... |
f64681a38f56e3c53f2f95ab51d29166481ba7c3 | d7c97d5ff84504a0257346194b1b2a3608f8e16d | UtopiaBeam/competitive | /Com'O/Com'O BUU 2 2017/Set 1/19 MST/19 MST.cpp | C++ | cpp | 767 | no_license | #include <cstdio>
#include <queue>
#define P pair<int,int>
#define PP pair<double,P>
#define F first
#define S second
using namespace std;
priority_queue<PP> q;
int n, m, s, e, rs, re;
int r[1002];
double w, ans = 0;
int fd(int u) {
if(u == r[u]) return u;
return r[u] = fd(r[u]);
}
int main() {... |
447f0fab189592defe67d501a1c1e91838f3994b | 59c09b56accbf1e98435a1b5ba692ed7988cf46f | Colecf/SDL-base-code | /GameScene.cpp | C++ | cpp | 5,540 | no_license | #include "GameScene.h"
#include "RenderManager.h"
#include "NetworkManager.h"
#include "ColeTileset.h"
#include "StrToInt.h"
#include "BulletClient.h"
#include "MathHelper.h"
#include <vector>
GameScene::GameScene(std::string name, std::shared_ptr<Player> thePlayer)
{
p = thePlayer;
p->name = name;
p->game... |
819ae282d8c61e0a34923f8a448155e62f7ce749 | 57de065701aa2342879ebb90686626c1afcf72d5 | udit8k/New_work | /src/read_fermi.cpp | C++ | cpp | 624 | permissive | #include"main.h"
double read_fermi()
{
FILE *fid;
char line[1000];
double dummy,fermi;
int dumm;
fid = fopen("DOSCAR", "r");
if (fid==NULL)
cout<<"DOSCAR is not present";
else
{
fgets(line, 1000, (FILE*)fid);
fgets(line, 1000, (FILE*)fid);
fgets(line, 1000, (F... |
eef887afe16a6a9ef0d59c348e6a1f99cd1d2eda | b63df22b44b6a3bd1da6defe1212b098f265ca89 | yupyub/Algorithm | /boj/Tree/1167_1.cpp | C++ | cpp | 679 | no_license | #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
vector<pair<int,int> > g[100001];
int visit[100001];
int pos,maxi;
void dfs(int n,int d){
for(auto nxt : g[n]){
int nx = nxt.first;
int nd = nxt.second;
if(visit[nx] == 0){
visit[nx] = 1;
dfs(nx,d+nd);
}
}
if(d>maxi){
maxi ... |
4703dbac9adc32ec021e6709db3af7c04af5b61f | 92f1da9914e4b35cbacc61b8652524b9848b0e5e | bijas/rdkservices | /Bluetooth/Bluetooth.cpp | C++ | cpp | 77,317 | permissive | /**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2020 RDK Management
*
* 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 th... |
402eb7c3da6c1e9d3bf099222e6eaba04db77f0e | b10c60eea0605ed0b6ad6ffea4901c610829a0bb | tatsumack/atcoder | /abc190/BMagic3.cpp | C++ | cpp | 878 | no_license | #include <bits/stdc++.h>
#define int long long
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " ... |
166aa32b82dc5866c025cd61b9855d9402c024e2 | 820ccf38411326ac4cb61054f215f4baa6475eb7 | HalfonLab/SCRMshaw_HD | /src/hexmcd/src/listop.cpp | C++ | cpp | 3,563 | no_license | #include "listop.h"
#include <string>
#include <cstring>
#include <stdlib.h>
#include <cstdlib>
#include <algorithm>
std::list<char *> *Split(char *toks, char * str)
{
std::list<char *> *L = new std::list<char *>;
if (str == NULL) return L;
char *head = strtok(str,toks);
L->push_back(head);
while (char... |
9438c52d8764b5a1f83f68dd338e5a77194cfed1 | 7ae5cd9d712230e421085805a7fd6d6e19cf9f2f | Orcuslc/Learning | /LeetCode/1.two_sum.cpp | C++ | cpp | 1,955 | no_license | class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
vector<int> indices;
vector<pair<int, int> > tmp = construct(nums);
quicksort(tmp, 0, nums.size());
for(int i = 0; i < nums.size(); i++) {
pair<int, int> res = bi_search(tmp, i+1, nums.size()-1, ... |
4cdee7eb4f79fc144fa3d1d963ef77a6e75760e8 | 003a449fa77ec094d68cd798ede3b3067af54d67 | xBece/DGIIM | /FP/Sesión 4/Clase/Tres enteros.cpp | C++ | cpp | 1,202 | no_license | /* Escribid un programa en C++ para que lea tres enteros desde teclado y nos diga si están
ordenados (da igual si es de forma ascendente o descendente) o no lo están. */
#include <iostream> // Inclusión de los recursos de E/S
using namespace std;
int main () { // Programa principal
// DECLARACIÓN D... |
219c6033c84ce181d0aafafd217795f1b25172ba | dd54d49d5a15e7a9ad69cd16173ba35bc87c2df9 | annie31123/candycrush | /three.cpp | C++ | cpp | 5,854 | no_license | #include "three.h"
three::three()
{
}
three::~three()
{
}
int three::condiction(basic *a[Row][Col], basic *focus)
{
int i=focus->row;
int j=focus->col;
int num=focus->color%10;
if(num!=0&&num!=50){
if(i<Row-2&&num==a[i+1][j]->color%10&&num==a[i+2][j]->color%10)
return... |
f4074a64af3952742e46e393213cdb927a65215c | 17c081b7a83d7e54735a1d89ae8dc5245a32cfab | eglrp/DataStructuresAlgorithmAndApplicationInCpp | /19_02_03_iterativeDPKnapsack_my/iterativeDPKnapsack.cpp | C++ | cpp | 3,705 | no_license | // iterative dynamic programming knapsack
#include <iostream>
#include <iterator>
#include <math.h>
//#include "make2dArrayNoCatch.h"
template <class T>
inline T min(const T& lhs, const T& rhs) { return lhs < rhs ? lhs : rhs; }
template <class T>
inline T max(const T& lhs, const T& rhs) { return lhs < rhs ? rhs : lhs;... |
41b98a9e0067f2c98877e5d0534eb8ae9210cce7 | d38a00c789f8e37ea7ec8709c8434c58f2e8425a | iridium-browser/iridium-browser | /buildtools/third_party/libc++/trunk/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp | C++ | cpp | 2,649 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
1519f7bd40c93041853d5cf6fc2867f9750311d3 | 6508d0c0736b05c29875508302ad4110895572fd | kitribob-nulleekh/deauth-attack | /src/main.cpp | C++ | cpp | 2,669 | no_license | #include <cstdio>
#include <pcap.h>
#include "packet.h"
#include "mac.h"
void Usage(char* arg) {
printf("syntax: %s <interface> <ap mac> [<station mac>]\n", arg);
printf("sample: %s mon0 00:11:22:33:44:55 66:77:88:99:AA:BB\n", arg);
}
void SendBroadcastDeauth(pcap_t* handle, Mac apMac) {
int res;
DeauthAttackPa... |
95fa5c76a6f4ad421602d8fdb635987ddd636eb2 | c6b32c138369cf9ba31729ab18a12363b6e993fe | lhariff-uni/cpp-advanced-game | /src/Shot.cpp | C++ | cpp | 1,166 | no_license | #include "header.h"
#include "Shot.h"
#include "PsylhaEngine.h"
Shot::Shot(PsylhaEngine* pEngine, int iStartX, int iStartY, int iEndX, int iEndY, int time)
: PsylhaObject(iStartX, iStartY, pEngine, 16, 16)
{
int diffX = iEndX > iStartX ? iEndX - iStartX : iStartX - iEndX;
int diffY = iEndY > iStartY ? iEndY - iStar... |
3aefe9982153f60a49d7464156e39b78f66c32a3 | 97fcf6f23cdde3f9cd989f669231e49bc910252b | akhikolla/InformationHouse | /EWGoF/src/GoFMI.cpp | C++ | cpp | 825 | no_license | #include<Rcpp.h>
using namespace Rcpp;
// [[Rcpp::export]]
NumericVector GoFMI(NumericVector x,double a) {
const double pi = 3.14159265358979323846;
double n = x.size();
double e = n/sum(x);
NumericVector y = e*x;
NumericVector res(2);
NumericVector A1(n*n);
NumericVector A2(n*n);
double W1=0;
d... |
7badfa9db93d15cb02c4159e1a00c3c0ae491633 | 8958f445079f3577fada02e8493b40d7a89c26e3 | sp1k31973/dequant | /src/qt/transactiontablemodel.cpp | C++ | cpp | 28,078 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2016 The Dash developers
// Copyright (c) 2016-2018 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "transactiontablemodel.... |
b69ca1c5ef08e512afde47b82dba1762aba2ad05 | f9fdcd8fffa8db89968f1ab0f4540ee35cbc4584 | NaabZer/AlgorithmicProblemSolving | /aaps/weekly_assignments/week12/finished/happyprime.cpp | C++ | cpp | 2,555 | no_license | #include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <math.h>
using namespace std;
const int MAX_VAL = 10001;
vector<bool>isprime(MAX_VAL , true);
vector<int>prime;
vector<int>SPF(MAX_VAL);
vector<int>ishappy(MAX_VAL, -1);
void manipulated_seive(int N){
... |
b163979d1e550c0617a3afb774750986497b07bb | f18ccefc22629bc4cb65353c771886fddaf2011e | WhiZTiM/coliru | /Archive2/f6/9a3fbc0a5a9474/main.cpp | C++ | cpp | 418 | no_license | #include <iostream>
struct Foo {
void boo(const char*) {
std::cout << "call: const char*" << std::endl;
}
template <class T>
void boo(T) {
std::cout << "call: template T" << std::endl;
}
};
int main() {
Foo foo;
std::cout << "argument: char*" << std::endl;
char* a = nullptr;
foo.boo(a)... |
c328772f55ad1e5a5957776028d39785784f1ebd | afd6ec030c0fdbe76be4bfd48203d6ddfc4bba3d | ACPLMaverick/Wawrzonowski_Samples | /SSDO/SSDO/Src/Font.cpp | C++ | cpp | 4,298 | no_license | #include "stdafx.h"
#include "Font.h"
#include "System.h"
#include <ft2build.h>
#include FT_FREETYPE_H
#define Lib() System::GetInstance()->GetFreeTypeLibrary()
void Font::LoadFont(std::wstring fileName)
{
std::string sFileName(fileName.begin(), fileName.end());
sFileName = "./Resources/Fonts/" + sFileName + ".ttf... |
e2957e2af6d3cfca94709437961b23c21d085ddf | d33fded507a153063bd47dd8a309091ae735df7d | zwjwz/ogre | /RenderSystems/GLES2/src/OgreGLES2RenderSystem.cpp | C++ | cpp | 89,708 | permissive | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org
Copyright (c) 2000-2014 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person o... |
18edacbe6bd1a9c6bcc625adc4a61e35927766e2 | d49d12cdcd390874334579b49ed8a1d2a775eefd | aliosmanulusoy/Probabilistic-Volumetric-3D-Reconstruction | /contrib/brl/bbas/bsta/tests/test_spherical_histogram.cxx | C++ | cxx | 4,913 | no_license | //:
// \file
#include <iostream>
#include <cmath>
#include <testlib/testlib_test.h>
#include <vcl_compiler.h>
#include <vnl/vnl_math.h>
#include <bsta/bsta_spherical_histogram.h>
//: Test bsta spherical_histograms
void test_spherical_histogram()
{
//test default constructor
bsta_spherical_histogram<double> dsh;
... |
2dd824a56fc9a3bdb0f2fb7acd8cdf2220900270 | b6039e048176f4508027fe391722154fac81103e | voei/megamol | /plugins/pwdemos/src/AbstractQuartzRenderer.cpp | C++ | cpp | 2,274 | permissive | /*
* AbstractQuartzRenderer.cpp
*
* Copyright (C) 2018 by VISUS (Universitaet Stuttgart).
* Alle Rechte vorbehalten.
*/
#include "stdafx.h"
#include "AbstractQuartzRenderer.h"
#include "mmcore/param/BoolParam.h"
#include "mmcore/param/StringParam.h"
#include "mmcore/utility/ColourParser.h"
namespace megamol {
na... |
635f9f7035e5a3d9952349deed81a70ab69a7ce1 | ef39201beeb0fc38a1118de050916bee1d31cfc7 | rlaxodnjs199/practice-C--Algorithms | /Leetcode/141.LinkedlistCycleDetection.cpp | C++ | cpp | 1,021 | no_license | /*
1. Idea
1) When we can manipulate LinkedList
Declare new ListNode on the stack and manipulate head->next to point it
after visiting it.
2) When we can't manipulate LinkedList
Declare two ListNode pointers: fast and slow. Let fast moves two times
faster than slow that eventually two pointers meet when there is a cycl... |
1c7fdea398948dc3ff48d28e8f8db40d9e18d7ea | e76fabb0c1e75af839c746ddb31ea6f90080d34a | jdleesmiller/twenty48 | /ext/twenty48/merge_state_probabilities.hpp | C++ | hpp | 282 | permissive | #ifndef TWENTY48_MERGE_STATE_PROBABILITIES_HPP
#include <string>
#include <vector>
namespace twenty48 {
size_t merge_state_probabilities(
const std::vector<std::string> &input_pathnames,
const char *output_pathname);
}
#define TWENTY48_MERGE_STATE_PROBABILITIES_HPP
#endif
|
8d22a6444ac3d59da29393cc1de3d52e61328216 | 00086afaa695eb46fede0bb4e8f207684e934767 | foundations/qcache | /tests/main.cpp | C++ | cpp | 3,420 | permissive | #include <gtest/gtest.h>
#ifdef TEST_WITH_BOOST_SHARED_POINTER
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#endif
#include "Cache.hpp"
TEST(CacheTest, Create)
{
sc::Cache<std::string, double> cache;
ASSERT_EQ(cache.totalCost(), 0);
ASSERT_EQ(cache.maxCost(), 100);
}
TEST(CacheTest, ... |
8070bba30b167bc751e8e572d313a219cb1286fa | 55a2667f83813825cea47b6af2033100e54f115c | RafaelMri/Pretzel | /pretzel.hpp | C++ | hpp | 4,877 | no_license | // Pretzel types and I/O.
#ifndef H_PRETZEL
#define H_PRETZEL
#include <iosfwd>
#include <utility>
#include <vector>
// A pretzel is a representation of a link, given as a sequence of twists of N
// strands. We represent the "pretzel" type as a sequence of twists, where a
// "twist" is represented as a pair of a str... |
88183721752d1fbfeeccaba3732abf6ec8d9eda0 | af6ac132354d05f9f2b47bdcb875b913383beb2c | zuyuxia/OScode | /producers_and_consumers/producers_and_consumers_condition.cpp | C++ | cpp | 3,015 | no_license | #include <iostream>
#include <pthread.h>
#include <unistd.h>
using namespace std;
const int kConsumers = 2;
const int kProducers = 2;
const int kMaxSize = 10;
int g_buffer[kMaxSize];
pthread_t g_threadID[kConsumers + kProducers];
pthread_cond_t g_empty;
pthread_cond_t g_full;
pthread_mutex_t g_mutex;
unsigned int... |
98e8d0e78d5b561a46d775b1781ddfa358c30834 | 43617b213518466997a5c4a5692907d5b7000958 | ThiagoSoutoGit/Q3DSurface | /widget.cpp | C++ | cpp | 900 | no_license | #include "widget.h"
#include "./ui_widget.h"
Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
ui->setupUi(this);
surface->setFlags(surface->flags() ^ Qt::FramelessWindowHint);
QSurfaceDataArray *data = new QSurfaceDataArray;
QSurfaceDataRow *dataRow1 = new QSurfaceData... |
9c5dae29757f64841546bb8a1392688318afd6b3 | 502a40119e5fef0916718f3e1b4ce969e46e9f1d | ajaysharma388/Online-Platform-s-Compitetive-Coding | /codechef/codechef-CIELRCPT.cc | C++ | cc | 478 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define endl "\n"
int findsetbits(int n){
int bit=0;
if(n>2048) bit=n/2048;
n%=2048;
while(n){
if(n&1) bit++;
n>>=1;
}
return bit;
}
int main(){
#ifndef ONLINE_JUGDE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
... |
47d3df14340f60c618bb724c20d3fdc4787c764c | fcc1f9dbc0b502a865b9893edec81b82ea159831 | jzhousz/iano | /iano/ROI_annotator/svm.cpp | C++ | cpp | 62,623 | no_license | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <float.h>
#include <string.h>
#include <stdarg.h>
#include "svm.h"
int libsvm_version = LIBSVM_VERSION;
typedef float Qfloat;
typedef signed char schar;
#ifndef min
template <class T> static inline T min(T x,T y) { return (x<y)?x:y; }
... |
ebfe9eeeaee544c1ee7287252febe63947b2ab90 | f829fcb6d216983c4e729b41a2f583a6d0c12710 | BGCX067/faint-graphics-editor-svn-to-git | /tags/release-0.6/gui/tabcontrol.cpp | C++ | cpp | 7,015 | permissive | // Copyright 2012 Lukas Kemmer
//
// 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 wri... |
343cc6cccbd6e56aaaf51a5d0cdc3183737d536c | e3ff70916ba82aff2be3acda0939af3caddf7c2b | npkhang99/Competitive-Programming | /CodeChef/CHSHIFU.cpp | C++ | cpp | 942 | no_license | // CodeChef
#include <bits/stdc++.h>
using namespace std;
const int N = 29;
int n, m, f[N]={};
int main(){
int TC; scanf("%d",&TC);
while(TC--){
scanf("%d%d",&n,&m);
for(int i=0; i<n; i++)
f[i] = 0;
for(int i=0; i<m; i++){
int x, y; scanf("%d%d",&x,&y); x-=1; y... |
4af84f850584f2f0fc276baeabbf26466923821b | f6db65fc919f0f7c53c27961c81411587fff6fab | sdownin/sequencer | /R-Portable-Mac/library/BH/include/boost/asio/bind_executor.hpp | C++ | hpp | 17,248 | permissive | //
// bind_executor.hpp
// ~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_ASIO_BIND_EXECUTOR_... |
47b631db263b92a85731317cd19027cad376a55d | 1978517d3f96ba94d96647d88a5afe3aff338351 | ITensor/ITensor | /unittest/matrix_test.cc | C++ | cc | 47,142 | permissive | #include "test.h"
#include "itensor/util/autovector.h"
#include "itensor/util/iterate.h"
#include "itensor/tensor/algs.h"
#include "itensor/global.h"
#include "itensor/util/print_macro.h"
using namespace itensor;
using namespace std;
template<typename T>
autovector<T>
randomData(long first, long last)
{
auto... |
a29ae501abfc1f383fab3a23ed7319796768604e | 7a11eed9c8c65585d27ee3d5ed215c006b24f257 | morellid/featureBasedScheduling | /Algoritmi/opencl/cpp_cl/EigenValue/EigenValue.hpp | C++ | hpp | 9,442 | no_license | /**********************************************************************
Copyright ©2013 Advanced Micro Devices, 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 co... |
acb00ee871456cc6cec6e78594af26ab8ffdae19 | 980d4eda71ae350f85c92a3c8c0a47f9f7eb879f | Aden2018/Cplusplus-Source-Code | /DangQun_contribution/QiuXpButton.cpp | C++ | cpp | 6,992 | no_license | // QiuXpButton.cpp : implementation file
//
#include "stdafx.h"
#include "QiuXpButton.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CQiuXpButton
CQiuXpButton::CQiuXpButton()
{
m_Bou... |
9531eb215c6db7efdbaeb054fc8f173b2b49b4be | 28fff2bf11125350e3a684cf3e708e723a48f6bd | chisom360/C | /code_examples/ch04/Fig04_08_10/fig04_10.cpp | C++ | cpp | 1,557 | no_license | // Fig. 4.10: fig04_10.cpp
// Create GradeBook object and invoke its determineClassAverage function.
#include "GradeBook.h" // include definition of class GradeBook
int main()
{
// create GradeBook object myGradeBook and
// pass course name to constructor
GradeBook myGradeBook( "CS101 C++ Programming... |
f29ef7eb8ad3a090f549876342c6f190aba7db5a | 7cf9730f8d451b18e4d7797c606a5eeb8c23d4d4 | preritj/path-planning | /src/map.cpp | C++ | cpp | 5,379 | no_license | #include <sstream>
#include "map.h"
#include "utils.h"
using namespace std;
using namespace tk;
int ClosestWaypoint(double x, double y,
vector<double> map_waypoints_x,
vector<double> map_waypoints_y) {
double closestLen = 100000; //large number
int closestWaypoint = 0;
... |
1f97a51fd93049beaff70f81ff85ee3103a0e1d7 | 36c4811a8b5bb388e5e6b0b25bc795ca42c46fc5 | mohammedowez/c- | /Ds/Dynamic programming/unbounded knapsnack/Rod Cutting .cpp | C++ | cpp | 558 | no_license | Input:
N=8
Price []={3, 5, 8, 9, 10, 17, 17, 20}
Output: 24
Explanation:
The maximum obtainable value is
24 by cutting the rod into 8 pieces
of length 1, i.e, 8*3=24.
int cutRod(int price[], int n)
{
int length[n];
for(int i = 0; i < n; i++) length[i] = i+1;
int size = sizeof(length)/sizeof(int);
in... |
aa0dccc1597860be8a32574662bc628c2cf1fef3 | 2e4f177ef1d259d3a1142a5c76fad76a619b3929 | jiangsuliji/crack_the_coding_interview_cpp | /chapter09/9.2.cpp | C++ | cpp | 567 | no_license | /*
* TASK: Given an array of strings, sort them in a way which groups anagrams
* together. As an example, given { "abc", "def", "bca", "fed", "ace" },
* the result will be { "abc", "bca", "ace", "def", "fed" }.
*/
#include <iostream>
using namespace std;
bool cmp(string a, string b){
sort(a.begin(),a... |
cf0e63df1d8eb975633cda5f4df4eb81ee864176 | 44756aa6030371343b85786e1ea69f5f27351239 | Lakshit-Chiranjiv/hacktoberfest2021-4 | /C++ Programs/reverse_linked_list.cpp | C++ | cpp | 1,381 | no_license | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node *next;
};
Node *head = NULL;
void addnode(int data)
{
Node *temp = new Node;
temp->data = data;
temp->next = NULL;
if (head == NULL)
head = temp;
else
{
Node *ptr = head;
while (pt... |
ebdec830a7e8f27d996439f5e2d4b2eeb33d00f2 | 969c1e7425f9b96a46e0aea1ee14b24b8b25732a | cnceo/casual_game | /water/componet/example/format.cpp | C++ | cpp | 1,412 | no_license | #include "test.h"
#include "../format.h"
#include <sstream>
using namespace water;
using namespace componet;
class T
{
public:
void appendToString(std::string* str) const
{
char buf[128];
snprintf(buf, 128, "%s", "class_T");
str->append(buf);
}
};
void formatTest()
{
s... |
44da1061a9cdaea7d6cc993cb444b50dff5173ad | 3deb1fc9c4d95bd84bb1a0c8865e1ca50de56e95 | shu8h1t/My-Work | /postfix evaluation.cpp | C++ | cpp | 1,183 | no_license | //============================================================================
// Name : postfix.cpp
// Author : Shubhit Chouhan
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//=========================================================================... |
311b2837cea424c8ca270df70903e46e3f892b25 | 5ee58456bf887c195076635dd7207b1c950048a2 | spillerrec/AnimeRAster | /lib/src/planes/ValuePlane.cpp | C++ | cpp | 3,521 | no_license | /* This file is part of AnimeRAster.
AnimeRAster is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
AnimeRAster is distributed in the hop... |
a410ef00576c2aa1b964feac08de1ee66be18230 | 6d67b878cb46dc1da71f995494abb4e8750da4cc | hennesseyr14/EECS-280 | /p2-cv/Image.cpp | C++ | cpp | 5,241 | no_license | #include <cassert>
#include "Image.h"
#include <string>
// REQUIRES: img points to an Image
// 0 < width <= MAX_MATRIX_WIDTH
// 0 < height <= MAX_MATRIX_HEIGHT
// MODIFIES: *img
// EFFECTS: Initializes the Image with the given width and height.
// NOTE: Do NOT use new or delete here.
void Imag... |
245469cef58564abcd87618eca90783d15d085c3 | 3a6a8dd9805676aba3f484248bff4df4da6c3bc3 | ResonanceGroup/GMSH304 | /Graphics/gl2ppm.cpp | C++ | cpp | 834 | permissive | // Gmsh - Copyright (C) 1997-2017 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@onelab.info>.
#include "gl2ppm.h"
void create_ppm(FILE *outfile, PixelBuffer *buffer)
{
if(buffer->getFormat() != GL_RGB || buf... |
0f8cb7268818651379795db6e691cffab2144149 | ce8a9a8646361441aafe53613e2d919744c7a0c3 | casterbn/my_program | /NewRTK_CAN_RTH/openrtk_qt/src/LogModuleUI.cpp | C++ | cpp | 1,312 | no_license | #include "LogModuleUI.h"
#include "LogicCenter.h"
#include <QDateTime>
LogModuleUI::LogModuleUI(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
connect(LogicCenter::getInstance(), SIGNAL(sgnResultLog(QString,QString)),this,SLOT(onAppandLog(QString,QString)));
connect(LogicCenter::getInstance(), SIGNAL(sgnO... |
7ef4ecb6adc67a63c142924a03cf27f6d4ac8b78 | 02e73a1df33592a63ce42041845597949c560de9 | naushad-rahman/CIDLib | /Source/AllProjects/CIDKernel/Win32/CIDKernel_RawMemory_Win32.cpp | C++ | cpp | 5,847 | no_license | //
// FILE NAME: CIDKernel_RawMemory_Win32.Cpp
//
// AUTHOR: Dean Roddey
//
// CREATED: 09/13/1998
//
// COPYRIGHT: $_CIDLib_CopyRight_$
//
// $_CIDLib_CopyRight2_$
//
// DESCRIPTION:
//
// This file provides the Win32 specific implementation for the raw memory
// interface.
//
//
// CAVEATS/GOTCHAS:
//
// LOG:
//
/... |
9863d70abc677dde435da4fc17672c72d710dbf4 | a6db1d789906b6cfc8152bffe96609e83fb021c1 | ankprogramming/week10-file-Jantakan27 | /lab10_1.cpp | C++ | cpp | 381 | no_license | #include <iostream>
#include <fstream>
using namespace std;
int main() {
/* code */
ofstream myfile ("example.txt");
if (myfile.is_open())
{
myfile << "This is a line. \n";
myfile << "This is another line.\n";
myfile.close();
}
... |
ba154a77625b9969a647b11eabed6bf3b145a784 | 9de73bb96ce4d168356258e1f0512d5470bd0c2a | MedicaicloudLink/Rosetta | /main/source/src/core/io/silent/ScoreJumpFileSilentStruct.hh | C++ | hh | 4,320 | no_license | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... |
f3ea287239076377f1c286c6b63bb66611c22542 | ebcac52fa9abab058c7992c6aac184ef0b12006c | alphaprime/nt2 | /modules/boost/simd/base/bench/arithmetic/scalar/toints.cpp | C++ | cpp | 2,999 | 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.
// ... |
5c066c7e9a23377905c14a0e4f83b82777c97ea8 | e62472d72124d25213bb8cd83eb07331ede02aa9 | vishgoel007/Leetcode-problems | /Trees/Minimum Height Trees.cpp | C++ | cpp | 1,269 | no_license | // https://leetcode.com/explore/challenge/card/november-leetcoding-challenge/564/week-1-november-1st-november-7th/3519/
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
class Solution {
pub... |
ecbcf02a046632b79f50852870260a5362e395eb | 1085d4a749641814969f77284ab8f2cb80dd86ee | jjzhang166/WinNT5_src_20201004 | /NT/sdktools/nmake/init.cpp | C++ | cpp | 7,619 | no_license | // INIT.C -- routines to handle TOOLS.INI
//
// Copyright (c) 1988-1990, Microsoft Corporation. All rights reserved.
//
// Purpose:
// Module contains routines to deal with TOOLS.INI file. Functions in TOOLS.LIB
// have not been used because NMAKE needs to be small and the overhead is too
// much.
//
/... |
003bc67a0496f18f56fc42f50d169da7444da245 | 0b7947aba767fc693864d943c603a761670d7cbe | narodo/lisa-donations | /reader/src/reader.cpp | C++ | cpp | 2,875 | no_license | #include "MFRC522.h"
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#define RST_PIN 4 // RST-PIN for RC522 - RFID - SPI - Modul GPIO5
#define SS_PIN 5 // SDA-PIN for RC522 - RFID - SPI - Modul GPIO4
const char* ssid = "iwalel";
const char* password = "Emmaschatz1";
const char* mqtt_server = "192.168.0.23";
... |
c4cb9460351902547aa88b4b0fe6caeb18df768f | 61a2553d8d3da36c4fecbd0ae2b7831e1b05055f | aroig/magnum | /src/Magnum/Platform/Implementation/OpenGLFunctionLoader.cpp | C++ | cpp | 3,861 | permissive | /*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016
Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.