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 |
|---|---|---|---|---|---|---|---|---|
4cb441dd1abfdd43e8bccce2c944ab75d4f1afa6 | e3f899de1e718882930a4d4ea9c5f0a649f4277d | RodionSmilovskyi/UnrealCourse_BattleTank | /BattleTank/Source/BattleTank/Private/Tank.cpp | C++ | cpp | 374 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "BattleTank.h"
#include "TankBarrel.h"
#include "Projectile.h"
#include "Tank.h"
// Sets default values
ATank::ATank()
{
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't ne... |
2f1a214257a9a2f39c361a4da8b07d3ba5bad6e1 | 4e0d0d0ae09dbf1d75a156b00532def6dd891bef | Omn1z/OpenIW8 | /workspace/iw8/code_source/libs/demonwareclient/bdcore/bdtiming/bdglobalstopwatch.cpp | C++ | cpp | 2,290 | no_license | /*
==============
bdGlobalStopwatch::pump
==============
*/
void bdGlobalStopwatch::pump(void)
{
?pump@bdGlobalStopwatch@@SAXXZ();
}
/*
==============
bdGlobalStopwatch::start
==============
*/
void __fastcall bdGlobalStopwatch::start(bdGlobalStopwatch *this)
{
?start@bdGlobalStopwatch@@QEAAXXZ(this);
}
/*
====... |
83a2c57b62cf13d06f6ac6e7a8f525de88e85967 | 9163e4f3a0005d6c723093d04f65a09e1f829d7f | sterin/cirkit | /programs/core/cirkit.cpp | C++ | cpp | 5,446 | no_license | /* CirKit: A circuit toolkit
* Copyright (C) 2009-2015 University of Bremen
* Copyright (C) 2015-2017 EPFL
*
* 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, in... |
1b6f98ede35dfd528fa2c6a5b720bfacf4018e51 | ae0b730a3a1f4a92d842c8f43522c922fa883e9a | wendart/RougeLikeGame | /RogueLike/Dagger.cpp | C++ | cpp | 226 | no_license | #include "Dagger.h"
Dagger::Dagger(int min, int max)
{
Type = DAGGER;
DamageMax = max;
DamageMin = min;
}
int Dagger::DealDamage()
{
return RANDOM.BasicDamage(DamageMin,DamageMax);
}
Dagger::~Dagger()
{
delete this;
}
|
ae311bd838414a2c096aa4d06f108e6affffcb45 | 191069420a7d56d71973efccf2c1c9763c08277a | honggui/lullaby | /redux/redux/tools/common/jsonnet_utils.cc | C++ | cc | 2,270 | permissive | /*
Copyright 2017-2022 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed t... |
e9602af229480530c65206a1d51d73ce57436b06 | 991d2fb979fdb0704ae567fea96da81e891a9319 | magic-upenn/magic2010 | /drivers/UAVCom/UAVReceive/ReceiveBluefoxMEX/mvIMPACT_acquire-arm-1.12.56/apps/PowerDownTest/saveimg.cpp | C++ | cpp | 2,355 | no_license | //--------------------------------------------------------------------------
//--------------------------------------------------------------------------
#include <stdio.h>
#include <string.h>
#include "saveimg.h"
//--------------------------------------------------------------------------
//-------------------------... |
8d20184a1242b7fa43f8a77141b7e3a56ef7e15a | 7bfec1ea2b82bf573df985675c18fdf84ee62d77 | Emasoft/opentoonz | /toonz/sources/common/expressions/tgrammar.cpp | C++ | cpp | 37,313 | permissive |
// TnzCore includes
#include "trandom.h"
#include "tutil.h"
#include "tconvert.h"
// TnzBase includes
#include "ttokenizer.h"
#include "tunit.h"
#include "tparser.h"
#include "tdoubleparam.h"
#include "tdoublekeyframe.h"
// STD includes
#include <map>
#include <math.h>
#include <functional>
#include <memory>
// Qt... |
b4f2a1c644449fd83312f02470131238a77ee2c7 | d28142a2a3200dd1ffb536afc1127bdbf5070a32 | fsiddh/ALGORITHMS-1 | /GRAPH ALGORITHMS/DFS_stack.cpp | C++ | cpp | 1,324 | no_license | #include <bits/stdc++.h>
using namespace std;
// Add edge
void addEdge(vector<int> adj[], int s, int d) {
adj[s].push_back(d);
adj[d].push_back(s);
}
// Print the graph
void printGraph(vector<int> adj[], int V) {
for (int d = 0; d < V; ++d) {
cout << "\n Vertex "
<< d << ":";
for (a... |
548e020077b503e6b397ab507ece384867ae95a1 | bb21a17dfe2a635a8f31a16cdabfd20d79b0fe52 | zhangximing/Acid | /Sources/Models/Shapes/ModelSphere.cpp | C++ | cpp | 2,997 | permissive | #include "ModelSphere.hpp"
#include "Maths/Maths.hpp"
#include "Resources/Resources.hpp"
#include "Models/VertexDefault.hpp"
namespace acid
{
std::shared_ptr<ModelSphere> ModelSphere::Create(const Metadata &metadata)
{
auto resource = Resources::Get()->Find(metadata);
if (resource != nullptr)
{
return std::dyna... |
eae6c88b89bbe41e0496b1bc688d3c6b518524de | c526c9ca82b1a6df25bf47b85b8f044cc5edfe8e | Sarwar05/LightOJ | /1108 - Instant View of Big Bang.cpp | C++ | cpp | 2,600 | no_license | #include<bits/stdc++.h>
using namespace std;
#define mx 1002
struct Edge
{
int u;
int v;
int w;
Edge(int _u, int _v, int _w)
{
u = _u;
v = _v;
w = _w;
}
};
vector<Edge> normal, transpose;
vector<int> rev[mx];
int dist1[mx],dist2[mx], arr1[mx],arr2[mx],vis... |
1379086b40f8bd3646f39763576108a82fffd561 | 1d913ef85aae7700500ac19d06b3673f1e5c983e | krishnact/projects | /libccif/src/bp/MAC_addressReport.cpp | C++ | cpp | 3,775 | no_license | //**//
//@Created(date = "Mon Feb 01 22:30:15 EST 2016")
// Copyright (2012) Krishna C Tripathi. All rights reserved.
//
// You are not allowed to read/copy/distribute following code without explicit written authorization from Krishna C Tripathi
//
//**//
#include "stdio.h"
#include "MAC_addressReport.h"
#if... |
6b6d0911c587f1186b3b7e585b0c06407d24f6dc | 7b5d6465674cff34c4e52c191cf5b977ca4dfb22 | archiesharma/muonPhase2 | /RecoTracker/MeasurementDet/src/MeasurementTrackerEvent.cc | C++ | cc | 5,469 | permissive | #include "RecoTracker/MeasurementDet/interface/MeasurementTrackerEvent.h"
#include "RecoTracker/MeasurementDet/src/TkMeasurementDetSet.h"
MeasurementTrackerEvent::~MeasurementTrackerEvent() {
if (theOwner) {
//std::cout << "Deleting owned MT @" << this << " (strip data @ " << theStripData << ")" << std::en... |
a064e449c209e8ce088da5d13bd0cc9b63c783da | cc1c96d3bd1fb9cded80eb2867ff1f19b884db34 | jyomu/atcoder | /ABC113/b.cpp | C++ | cpp | 470 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(void)
{
int n;
cin >> n;
int t, a;
cin >> t >> a;
list<tuple<int, double>> degree;
for(size_t i = 0; i < n; i++)
{
int h;
cin >> h;
degree.push_back(make_tuple(i+1,abs((t-h*0.006)-a)));
}
degree.sort([](t... |
e38c8a1b2cd2ea037e9544256062313ff970eb79 | 1ed56beca4267e7211595e73e098bd3fdba31c1e | zhangwj0101/codestudy | /algorithm/HDU-ACM/ambition0109/20771.cpp | C++ | cpp | 806 | no_license | ////////////////////System Comment////////////////////
////Welcome to Hangzhou Dianzi University Online Judge
////http://acm.hdu.edu.cn
//////////////////////////////////////////////////////
////Username: ambition0109
////Nickname: Ambition
////Run ID:
////Submit time: 2010-08-02 19:08:23
////Compiler: GUN C++... |
e933e56fdced6b5ebb2f81f1698869f55056535f | 4bcfc09488da1f693945c2dac0e4c9c02a87f302 | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/libs/wave/test/testwave/testfiles/t_5_024.cpp | C++ | cpp | 2,459 | permissive | /*=============================================================================
Boost.Wave: A Standard compliant C++ preprocessor library
http://www.boost.org/
Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
Software License, Version 1.0. (See accompanying file
LICENSE_1_0.txt o... |
43a552ec55154cfbe068f605b7e17c871d8725dd | ee7fae627221c8bed5699e26a09b482aa7c3f885 | markgomes96/Data-Structures | /class/base.cpp | C++ | cpp | 443 | no_license |
#include <iostream>
using namespace std;
class Base
{
public :
virtual void iam();
};
void Base::iam()
{
cout << "base" << endl;
}
class One : public Base
{
public :
void iam() { cout << "one" << endl; }
void iam2() { Base::iam(); }
};
int main()
{
Base b; cout << "Calling b.iam() "; b.iam();
... |
62e6ff0de8e65e02ffc7f25263e15760776c7eeb | fd77e519ee9db5b7d6585331ba0b18f224559b70 | anirudhSK/chromium | /ui/app_list/app_list_folder_item.cc | C++ | cc | 7,584 | 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 "ui/app_list/app_list_folder_item.h"
#include "base/guid.h"
#include "ui/app_list/app_list_constants.h"
#include "ui/app_list/app_list_item_list... |
31f5bf624f0efcdb2b516860251ad1c689ae8d4e | ca7ff3b01abb4bfaae4f816df4079e0f226ee286 | svn2github/libicu_full | /tags/coll-prototype/source/layout/ScriptAndLanguageTags.cpp | C++ | cpp | 2,305 | permissive | /*
* %W% %E%
*
* (C) Copyright IBM Corp. 1998 - 2002. All Rights Reserved.
*
* WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
* YOU REALLY KNOW WHAT YOU'RE DOING.
*
*/
#include "LETypes.h"
#include "ScriptAndLanguageTags.h"
#include "OpenTypeLayoutEngine.h"
U_NAMESPACE_BEGIN
const LETag ... |
cc9e45dceb5c358329add264bd55182f2df40419 | b0b7b6f2e76d94cd8d3782d99ae182ccf15beac4 | gitter-badger/Kvasir-1 | /Lib/Chip/CM0+/Freescale/MKL27Z4/ROM.hpp | C++ | hpp | 6,628 | permissive | #pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//System ROM
namespace RomEntry0{ ///<Entry
using Addr = Register::Address<0xf0002000,0x00000000,0x00000000,unsigned>;
///ENTRY
constexpr Register::FieldLocation<Addr,Register::maskFromRange(31,0),Register::Access<Register::... |
0c55603a2f4fdb4afe3b1e04b8d9bf01915eca87 | 854a9366a10a5df0e041225ef06e99efc76ca5a3 | qianhh/libcommon | /libcommon/source/libcommon/OSHelper.cpp | C++ | cpp | 12,254 | no_license | #include "stdafx.h"
#include "OSHelper.h"
#include "FileHelper.h"
#include "StringHelper.h"
#include "ProcHelper.h"
#include "Charset.h"
#include "common.h"
#include "log.h"
#include <Sddl.h>
using namespace std;
namespace eric { namespace common {
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
bool OSH... |
200495f9e7cac0b32906aa742dbbb60364645393 | bf92a756e7df30a960043c5be45728681b07c59d | sanjusss/leetcode-cpp | /0/600/670/670.cpp | C++ | cpp | 1,960 | no_license | /*
* @Author: sanjusss
* @Date: 2022-09-13 07:39:46
* @LastEditors: sanjusss
* @LastEditTime: 2022-09-13 08:00:46
* @FilePath: \0\600\670\670.cpp
*/
#include "leetcode.h"
// class Solution {
// public:
// int maximumSwap(int num) {
// if (num == 0) {
// return 0;
// }
// ... |
abc74630dc37355bd25adf887ad9311528b35504 | 39d26a8bd0b77cfee8ccdf4639f9747aa2011efb | WiViClass/cef-3.2623 | /chromium/src/chrome/browser/safe_browsing/protocol_manager_helper_unittest.cc | C++ | cc | 1,046 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/strings/stringprintf.h"
#include "chrome/browser/safe_browsing/protocol_manager_helper.h"
#include "google_apis/google_api_keys.h"
#include... |
88d4e526cddec1c73744235189b2875bd7f33cf0 | 63241e6c118108dc8dfb94503ac82a7a263f58f5 | morteza-jamali/microsoft-ui-xaml | /dev/dll/XamlControlsResources.cpp | C++ | cpp | 18,760 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
#include "pch.h"
#include "common.h"
#include "XamlControlsResources.h"
#include "RevealBrush.h"
#include "MUXControlsFactory.h"
static constexpr auto c_AcrylicBack... |
a34d09594145f625c799269f2558a39ac90da8d6 | 129040485d0ffedbff7492e47a4b49c21a4c3686 | fatihsezgin/WeeklySchedule | /dbmanager.cpp | C++ | cpp | 3,397 | no_license | #include <dbmanager.h>
#include <QSqlQuery>
#include <QSqlError>
#include <QSqlRecord>
#include <QDebug>
#include <QDir>
DbManager::DbManager()
{
databasePath= QDir::currentPath()+"/myDb.db";
qDebug() << " mypath" << databasePath ;
db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName(database... |
1439c9ef9557182b6a2b23ab233203c8fbde7d82 | 081028f18bc875828df8d9cca9d30f0f33759710 | yancouto/competitive-programming | /ojs/cf/677C.cpp | C++ | cpp | 842 | no_license | #include <bits/stdc++.h>
using namespace std;
#define fst first
#define snd second
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
const ll modn = 1000000007;
inline ll mod(ll x) { return x % modn; }
#ifdef ONLINE_JUDGE
# define LLD "%I64d"
# define debug(args...) ... |
639e4fe2f406ae603cc7496cceb6d1be8e3dc9ad | 9019e32bdd43c5dd9583dfa0a4cf3a420d752d4b | wyrover/soui_gn | /SOUI_gn/src/demos/demo/appledock/SDesktopDock.cpp | C++ | cpp | 4,489 | permissive | #include "SDesktopDock.h"
#include <math.h>
#include <ShellAPI.h>
/*
by 多点
@20150510 qq:4361031
*/
//初始化DOCK工具栏小图标的矩形区域,初始图标大小为65×65,工具栏长度:m_DockLen = 650
SDesktopDock::SDesktopDock()
{
m_Width = 50; //初始宽度
m_Height = 50;
m_DockLen = 500;
m_MaxDisc = 200;
m_MinDisc = 40;
m_MaxRate = 2;
m_MinRate = 1;
m_... |
683e89cba597bc424e5596482a9a6b4136235f7c | b8b4e0acec39b166c263e17483c7b0e2f49d93ba | ZitengGuo/TSP | /TabuSearch.cpp | C++ | cpp | 8,642 | no_license | /*
* 禁忌搜索求解TSP
*/
#include <iostream>
#include <cmath>
#include <time.h>
using namespace std;
constexpr int CITY_SIZE = 31; // 城市规模
constexpr int TABU_SIZE = 25; // 禁忌长度
constexpr int ITERATION = 1000; // 迭代次数
constexpr int NEIGHBOR_SIZE = 200; // 邻域解大小
constexpr double INF = INT_MAX... |
75dc0eb0fa22878426e094ebad94d96b4fc8ded2 | 2b33657f31317be60362cbc0838e7e324bff711b | jnaboz/coding_challenges | /project_euler/C/21_amicable/amicable.cpp | C++ | cpp | 4,258 | no_license | /* 1.0.0 */
/*****************************************************************************************************************************************************************\
* Module Name : Amicable
* Description : Euler Project 21 Source Code
* Original Author : Jake Nabozny
* Date Created : 10/31... |
4855fd7a07064a7d1c03f2bdc14d90d6dbe053c2 | 738ecb4b396fbc63550e8401b6958e9553116ba4 | Dowletgeldi99/C-_project_Taksipark | /OKP_Course/dowlet.cpp | C++ | cpp | 13,544 | no_license | #include "includes.h"
#include "global.h"
#include "functions.h"
using namespace std;
struct dataStud { //Структура данных работы
string variety;
int volume;
double rate;
double price;
int count;
} arrData[70]; //Массив данных работы
struct dataAu { //Структура данных пользователя
string log;
string par;... |
6370e8ddf0fcb907febb96e19f22a4a0e1b71be4 | 9b9b87644b0233542e4597f8780f33a55bfe012d | irishpatrick/mode7-cpp | /src/Camera.cpp | C++ | cpp | 902 | no_license | #include "Camera.hpp"
namespace mode7
{
glm::mat4 Camera::view(1.0f);
glm::mat4 Camera::projection(1.0f);
Object Camera::object;
static float m_w, m_h, m_n, m_f;
void Camera::create(float w, float h, float fov, float n, float f)
{
projection = glm::perspective(glm::radians(fov), w / h, n, f);
m_w = w;
m... |
b90c17d86caa44a1f09427e834c3e0d5fa078c18 | ae21ebfd059489defbe85e644dc146f596893ada | DavidRicardoGarcia/measurement-of-angles | /matlab tests/DH/samples/stringList/test.cpp | C++ | cpp | 2,831 | permissive | /* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| ... |
bed174b3d1908013169365b982e4657ad2ecf1bb | e8dd9d83591c428dea540ab672ceb6fbccbd2c35 | pengjohn/RenRen | /Forms/RenRenForm_UsersGetInfo.cpp | C++ | cpp | 24,023 | no_license | /*!
*@FileName: RenRenForm_UsersGetInfo.cpp
*@Author: zengying@GoZone
*@Date: 2010-12-23
*@Brief: 用户详情Form
*@Log: Author Date Description
*
*@section Copyright
* =======================================================================<br>
* Copyright ? 2010-2012 GOZONE <br>
* All Rights Res... |
70366220995101b7731f988fd2ff37dec8c86a88 | 9c90e9f4a463cf6ef75e6af41b73d31f10984740 | alexandraback/datacollection | /solutions_2700486_0/C++/WindShi/b.cpp | C++ | cpp | 1,307 | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <iostream>
#include <algorithm>
#define forup(i,a,b) for (int i=a;i<=b;i++)
#define fordown(i,a,b) for (int i=a;i>=b;--i)
using namespace std;
int n,T,x,y;
double f[2001][2001];
int main(){
freopen(... |
3358f07dc7da6d309d84c51aebdbff954b0cfb95 | a03eaaf74feb373d686d24da4db62f1d4c0036cc | aliyun/aliyun-openapi-cpp-sdk | /idrsservice/src/IdrsserviceClient.cc | C++ | cc | 63,739 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
1157bc589ff99329c2e8dad8b71610a4a9241975 | df743e1e24c7edf574e884d29ba4ab4b207a1e79 | gilbe2000/LabProject | /LabProject/main.cpp | C++ | cpp | 295 | no_license | #include "LoadFile.h"
#include "Window.h"
#include <QApplication>
//int main() {
//LoadFile lf;
// Window Window(0);
//}
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
LoadFile lf;
Window mainWindow(&lf);
mainWindow.show();
return app.exec();
} |
becda496079fb7c1857b6dfac8578826a40e89be | e32696f7c8b9bf032afc8963e70b2abef111d4c7 | xiapengchng/Ransac-Fit-a-circle | /RansacFitCircle.cpp | C++ | cpp | 3,401 | no_license | #include "RansacFitCircle.h"
RansacFitCircle::RansacFitCircle()
{
}
RansacFitCircle::~RansacFitCircle()
{
}
void RansacFitCircle::getBestFitCircle()
{
getFeaturePoint(ptLeft,ptRight);
pt = ptRight;
randSample();
}
inline void RansacFitCircle::getCircle(cv::Point2d& p1, cv::Point2d& p2, cv::Point2d... |
fea7aaae2f823de5f9ef79afb1fd3282bdb82252 | e20e14abd0097bf0be7bb7285a01af4670b3a8ca | qinting513/Learning-QT | /2016 Plan/数据结构代码/第8章 查找/bo8-3.cpp | C++ | cpp | 3,689 | permissive | // bo8-3.cpp 平衡二叉树的基本操作,包括算法9.9~9.12
void R_Rotate(BSTree &p)
{
BSTree lc;
lc=p->lchild;
p->lchild=lc->rchild;
lc->rchild=p;
p=lc;
}
void L_Rotate(BSTree &p)
{
BSTree rc;
rc=p->rchild;
p->rchild=rc->lchild;
rc->lchild=p;
p=rc;
}
void LR_Rota... |
c89f6006d7847eb491293e64f226fc7242793a60 | 18065cf771bc81c685a4fef8455cdd363449ffbf | st-red-strat/sdpb | /src/sdpb/SDP_Solver_Parameters/ostream.cxx | C++ | cxx | 2,167 | permissive | #include "../SDP_Solver_Parameters.hxx"
std::ostream &operator<<(std::ostream &os, const SDP_Solver_Parameters &p)
{
os << "SDP directory : " << p.sdp_directory << '\n'
<< "out directory : " << p.out_directory << '\n'
<< "checkpoint in : " << p.checkpoint_in << '\n'
<< "checkpoint out : " << p.... |
29c28da5015780433a20791bfc8c0e686fbe27a9 | 139d9b1aea1c265f2f9927b002d46a6169c5d094 | frc1334/Robot-Templates | /OCTObot/src/Commands/ExampleCommand.cpp | C++ | cpp | 814 | no_license | #include "ExampleCommand.h"
ExampleCommand::ExampleCommand()
{
// Use Requires() here to declare subsystem dependencies
// eg. Requires(chassis);
}
// Called just before this Command runs the first time
void ExampleCommand::Initialize()
{
}
// Called repeatedly when this Command is scheduled to run
void ExampleCo... |
c77bb2bb194f159e11a400b5098014fa22f70f07 | c9d7cc5fd5bd8fb640c9d5ae9e710fbdb34517fa | sdk-team/aliyun-openapi-cpp-sdk | /vpc/src/model/CreateSnatEntryResult.cc | C++ | cc | 1,382 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
4be75c54d11000f42ab949f7b72f5e92d48affed | 24196bc6254b2f1b6838651ad394e028a25729b5 | hannes-steffenhagen-diffblue/cbmc | /src/ansi-c/c_typecast.cpp | C++ | cpp | 20,274 | permissive | /*******************************************************************\
Module:
Author: Daniel Kroening, kroening@kroening.com
\*******************************************************************/
#include "c_typecast.h"
#include <algorithm>
#include <cassert>
#include <util/arith_tools.h>
#include <util/c_types.h... |
829392391af389167fdacc8fd2388df70ab3d8b6 | 200626e41a243f699b09baba46300c5656b6aa5e | JohnRCC/P3Group | /functions_main/algNinePointDM.cpp | C++ | cpp | 7,360 | no_license | #ifndef ALGORITHM_FUNCTION
#define ALGORITHM_FUNCTION
#include <iostream>
#include <math.h>
using namespace std;
/* Function for running the five-point difference method algorithm on the main program.
Input:
- 3-Dimensional matrix
- Row size
- Column size
- Chance tolerance (or iteration count)
- "Silence" index - o... |
3a91a3389bce5bc2616e6cbe1eeba9a93f04a92a | ed51758c07076ddf29d536c406a24a29738d312f | mauriciopoppe/competitive-programming | /UVa/11900/11968.in-the-airport.cpp | C++ | cpp | 1,805 | no_license | /*
* in_the_airport.cpp
*
* Created on: Jul 17, 2012
* Author: mauricio
*/
#include<stdio.h>
#include<stdlib.h>
#include<cmath>
#include<cctype>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<bitset>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<lis... |
99da5b7f6cf70b3242194cd7cd9710ec2df43b35 | 2ea909c579e24ad3891987deb4d28e2703e8c58f | hkmangla/cppProgramms | /Algorithms/centroid.cpp | C++ | cpp | 2,085 | no_license | // Name : Hemant Mangla
// username : hkmangla
// Country : India
// College : Deenbandhu Chhotu Ram University of Science and Technology Murthal
// emailId : hemantmangla78@gmail.com
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define rep(... |
488662b2ec32ebc79cef2c303563f9695560e0bb | e93bb7a7ca10831cab036dab03f5346403f45cdc | kumarshikhardeep/Interviewbit-Solution | /Bit Manipulation/Divide bits.cpp | C++ | cpp | 953 | no_license | int Solution::divide(int A, int B) {
long long int dividenD=A;
long long int divisoR = B;
bool divid = 0,divis=0;
if(dividenD<0)
{
divid = 1;
dividenD = -dividenD;
}
if(divisoR<0)
{
divis = 1;
divisoR = -divisoR;
}
... |
760b5c214e637857036ec21986f9bff7bbe82db7 | b62f89f6891cf10a88b889710aea79786d2efa27 | oudream/ccxx | /tools/daemon/daemon_agent.cpp | C++ | cpp | 25,534 | permissive | #include "daemon_agent.h"
#include <ccxx/ccxx.h>
#include "./../../DB/svrglobal.h"
using namespace std;
using namespace rapidjson;
const string f_sDaemonTargetName = "daemon";
const string f_sDb2fileTargetName = "db2file";
string f_sNodeID;
string f_sDaemonFileName;
string f_sDaemonFilePath;
string f_sDaemonLogPath... |
f94d2a468293a36e21492ba50f327bb757b50fc9 | a62a7dddfc10074a925361f7a6ee884d19b03eea | jamil-zaitouny/University | /Semester 2/Object Oriented Programming/Lab3-4.2/Material.cpp | C++ | cpp | 1,598 | no_license | //
// Created by Jamil on 3/27/2019.
//
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include "Material.h"
Material createMaterial(char name[], char supplier[], int quantity, int day, int month, int year){
Material returnedMaterial;
if(strlen(name) > 30 || strlen(supplier) > 30){
char* value... |
67b07a3f0344ccc551574c4fc75762bad8c3190c | 6ef0d3bbea6a8c9b5c1ad26f7beb6e52bacdca53 | mikeash/llvm-project | /mlir/lib/Pass/PassStatistics.cpp | C++ | cpp | 9,122 | permissive | //===- PassStatistics.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
ab5f657787223f43c94c22dcf51e388c14c07fd0 | 922c2df891525315fa74482ae8b614c15ce95fc0 | host1812/scx_plugin_public | /source/ext/common/pegasus/src/Pegasus/ProviderManager2/CMPI/CMPI_SelectExpAccessor_CQL.cpp | C++ | cpp | 7,909 | 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... |
0fe758192f95426b8e48a091ffd43b2acdb9c91c | b04d716e41d73d0d9ed8df6c8698b048e1419ec0 | madkira/terrarium_2015 | /apps/terrarium/Groupe_A_Capteur_luminescence/Embedded/tests/Embedded/CapteurLuminanceTest.cpp | C++ | cpp | 1,314 | permissive | #include "CppUTest/TestHarness.h"
#include "CppUTestExt/MockSupport.h"
extern "C"
{
#include <stdio.h>
#include <unistd.h>
#include "CapteurLuminance.h"
}
#define DELTA 0.01
TEST_GROUP(Embedded)
{
void setup()
{
}
void teardown()
{
}
};
TEST(Embedded, CountTens1)
{
DOUBLES_EQUAL(0.906, BitToTe... |
8b9c5426309c8a5b3c7778a3e026d73a0a5be158 | ee5790020a625b62438b24c171e6e32f296d8a3e | BipinKalra/CPP_Basics_2 | /sorting/bubble sorting/2 level structure.cpp | C++ | cpp | 801 | no_license | #include<iostream>
#include<conio.h>
using namespace std;
struct student
{
char name[10];
int cls;
char sec;
}a[5]={ {"CHINMAY",12,'B'},{"SAHIL",11,'B'},{"SALONI",12,'A'},{"NAMAN",10,'D'},{"DANISH",11,'A'} };
void bubblesort(student a[],int n=5)
{
int i,j,flg;
student temp;
for(i=0;i<5;i++)
{
fl... |
28988e68c6903a6149d8586d3afdea549b0da954 | 588698f57c291199ede886f2c899912420dfeacc | WebGameLinux/chromium | /ui/file_manager/zip_archiver/cpp/volume.cc | C++ | cc | 16,543 | permissive | // Copyright 2014 The Chromium OS 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 "volume.h"
#include <cstring>
#include <sstream>
#include "request.h"
#include "volume_archive_libarchive.h"
#include "volume_reader_javascr... |
0de5f781aee2e9b9af7a43a372763654cd3d7bf5 | 19e37338704ff6629fa189210bcc64da8f7bc781 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-amplifybackend/source/model/BackendAuthSocialProviderConfig.cpp | C++ | cpp | 1,473 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/amplifybackend/model/BackendAuthSocialProviderConfig.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;... |
d5ae6a97c9824f05cd4dc3efcdb3b27079f10322 | a1628b9a7a0ca430715e1a8e09746b8f2e9f0875 | cash2one/important-files | /2011/server_src/Console/Console/GridListCtrlEx/CGridColumnTraitText.cpp | C++ | cpp | 4,156 | no_license | #include "stdafx.h"
#include "CGridColumnTraitText.h"
#include "CGridColumnTraitVisitor.h"
#include "CGridListCtrlEx.h"
CGridColumnTraitText::CGridColumnTraitText()
:m_pOldFont(NULL)
,m_TextColor(COLORREF(-1))
,m_BackColor(COLORREF(-1))
{}
void CGridColumnTraitText::Accept(CGridColumnTraitVisitor& vis... |
722efdf3682b844ed6fdb51a0d4f342845ca80e5 | 7fea29477db85bc6ed97a597f8101217e0962023 | 4quet/ft_vox | /src/Frustum.cpp | C++ | cpp | 2,484 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Frustum.cpp :+: :+: :+: ... |
5045c86b9289995ebeb65f6fadb460b90556dd36 | bf5aaa47e99274d70e2e09b62c2b30e5a54f4e54 | Vaa3D/vaa3d_tools | /hackathon/2010/yinan/neuron_feature/Vector.cpp | C++ | cpp | 9,670 | permissive | #include <iostream>
using namespace std;
#include "Vector.h"
#include <cmath>
Vector::Vector(double xx, double yy, double zz)
{
x=xx;y=yy;z=zz;type=0;
}
Vector::Vector(){
x=0;y=0;z=0;type=0;
}
Vector::Vector(Vector* a){
if(a->getType()==0){
type=0;
x=a->getX();
y=a->getY();
z=a->g... |
6a7cc0d3c6fc40c48c3de098d5f73a4cb901e48d | 0830b1ab8d788eb4dc3e30a01c8788d65c792524 | gheylam/OrangePeel_ICP | /q3.cpp | C++ | cpp | 13,999 | no_license | #include <stdlib.h>
#include <chrono>
#include <iostream>
#include <igl/readPLY.h>
#include <igl/knn.h>
#include <igl/octree.h>
#include <igl/opengl/glfw/Viewer.h>
#include <igl/get_seconds.h>
#include "gnuplot_i.h"
#include <math.h>
#include <random>
/*
* This .cpp file is for experimenting the behaviour of the ICP
... |
cd016660738abe83b5ecf0e850885d836bedfe69 | 8b85b62cddf9ec27d40cf61696820cbddecfcbc0 | pirvandrei/cpp | /APARTENE.CPP | C++ | cpp | 327 | no_license | #include<iostream.h>
void main ()
{int a[10],i,n,x,gasit;
cout<<"n=";
cin>>n;
for(i=1;i<=n;i++)
{cout<<"a["<<i<<"]=";
cin>>a[i];}
cout<<"x=";cin>>x;
gasit=0;
for(i=1;i<=n;i++)
if(a[i]==x)
gasit=1;
if(gasit==1)
cout<<"valoarea "<<x<<" este spusa de catre tine mai inainte ";
else cout<<"valoarea" <<x<<" este proas... |
b492504d87fb6e8bb42ed8f2ab5a136238ff21aa | 56b71666adcd0bdb36366430cb06cc84f9241bce | 10usb/librarian | /libbase/src/basicset.cpp | C++ | cpp | 2,455 | permissive | #include <sunit/librarian/basicset.hpp>
#include <sunit/librarian/hash.hpp>
#include <string.h>
using namespace sunit::librarian;
BasicSet::BasicSet(int capacity){
//this->capacity = hash::makePrime(capacity);
this->capacity = capacity;
_count = 0;
values = new Value[this->capacity];
//table = new... |
fff6a9d27b85b1f6c6d60cefa7d9de9b259efd8a | d6998ca1d078bf6f5b6e446f02ff3de55d8f7770 | goodann/KITRIStudy | /Win32/SingletonFrameManager.cpp | C++ | cpp | 627 | no_license | #include"IncludeAPI.h"
SINGLETON_INIT(SingletonFrameManager);
void SingletonFrameManager::Init(void)
{
m_FPSTimer.SetTimer(1.0f);
m_LimitTimer.SetTimer(0.01f);
}
void SingletonFrameManager::Update(void)
{
FpsCheck();
}
void SingletonFrameManager::FpsCheck(void)
{
if (m_FPSTimer.TimeCheck())
{
m_iFPS = m_iFpsCo... |
687890b4557d493985f483b8c69fe7ba6fbc313c | 830daf8ab9f07b8e232c05db7a3641d519715ae3 | 142296/- | /C++基础/cout/精度 precision.cpp | C++ | cpp | 278 | no_license | #include<iostream>
#include<math.h>
using namespace std;
int main()
{
double result = sqrt(3.0);
cout << "对根号三保留小数点后0~9位,";
for (int i = 0; i <= 9; i++)
{
cout.precision(i); //以下的数保留i位
cout << result << endl;
}
cout << result;
} |
d08cabb8dcb8b04296fd22bbd197888b2aed0a2a | 20fcf50b2401b0047b288a75e6bff02bed61b55e | xijiao/leetcode_practice | /1717.maximum-score-from-removing-substrings.cpp | C++ | cpp | 1,732 | no_license | /*
* @lc app=leetcode id=1717 lang=cpp
*
* [1717] Maximum Score From Removing Substrings
*/
// @lc code=start
class Solution {
public:
// Time Limit Exceeded
// int maximumGain(string s, int x, int y) {
// unordered_map<string, int> dp;
// int res = 0;
// int start = 0;
// for (int i... |
605e3252057a0b3d8d9ddb5614af1b56b1b472be | c7b7699cf0a20fe33f20c8dca79336bd11191c89 | VIXCODE/MUSTA_MASTER_2.0 | /src/bitcoinrpc.cpp | C++ | cpp | 47,732 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... |
b3fc9a3fb4a6759d3f1261ac7cce596270c69d08 | 4e6b7c6409b1bb333426cb06becb783e3500e00e | tatsumack/atcoder | /arc053/C.cpp | C++ | cpp | 1,235 | 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 << " ... |
b34b0f3d44218d95dfb52905388856797a3a767b | 631fea306d092f63ae41387fbd7f4f2ea629c9e6 | itzhp/chromium | /ui/base/ime/win/tsf_text_store_unittest.cc | C++ | cc | 145,021 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/base/ime/win/tsf_text_store.h"
#include <initguid.h> // for GUID_NULL and GUID_PROP_INPUTSCOPE
#include <InputScope.h>
#include <OleCtl.h>... |
df9282809a207ad144f68e21882a1957fb26fe7d | 7a402ef1237798be382fdc28c5c3dd02e57ccd96 | teamurko/Sevastopol-summer-school-2012 | /problems/grimm/validator.cpp | C++ | cpp | 501 | no_license | #include "testlib.h"
using namespace std;
bool isPrime(int n)
{
for (int i = 2; i * i <= n; ++i) {
if (n % i == 0) return false;
}
return true;
}
int main()
{
registerValidation();
int a = inf.readInt(2, 1000 * 1000 * 1000);
inf.readSpace();
int b = inf.readInt(2, 1000 * 1000 * 10... |
8949bc6ef37b0885c747f825e9c73af395c44a29 | 3aed40901f02d7825f99ac2a4a6cd67a257a6fca | M-Rodrigues/Programming | /InterviewBit/12 Tree Data Structure/ZigZag Level Order Traversal BT/main.cpp | C++ | cpp | 885 | no_license | /**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
void build(TreeNode *node, int level, vector<vector<int>> &A) {
if (node == nullptr) return;
if (level == A.size()) A.... |
44699b61872afebc8bc4e855686b7d557983c7bb | fbc35b4013c56b750461ee49f942c3c1cf9c9b8e | Zmorra/REGoth-bs | /src/world/GameWorld.cpp | C++ | cpp | 6,307 | permissive | #include "GameWorld.hpp"
#include "internals/ConstructFromZEN.hpp"
#include <Components/BsCCharacterController.h>
#include <Debug/BsDebugDraw.h>
#include <Scene/BsSceneObject.h>
#include <components/Character.hpp>
#include <components/CharacterAI.hpp>
#include <components/Item.hpp>
#include <components/VisualCharacter.... |
1f6b3833a09eb8ea5139ed54e570de4c5d16663f | 45b425f1b5fd35f0b9c78a3b080154cacd39fff5 | yana87gt/procon | /atcoder/utpc2013_01/a.cpp | C++ | cpp | 527 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);++i)
int main(void){
string s;
cin>>s;
string hole0="CEFGHIJKLMNSTUVWXYZ";
string hole1="ADOPQR";
int cnt=0;
rep(i,hole0.size()){
if(s[0]==hole0[i])cnt++;
}
rep(i,hole0.size()){
if(s[1]==... |
e112b337d1b40e3f2be3e4cb58373aead778a946 | 97146966b4b5e10d6e067d70aa7265fbdb3b9afb | yuxiang9856/HelloCPP | /AllTests/cinTest2.cpp | C++ | cpp | 242 | no_license | #include <iostream>
using namespace std;
int main()
{
int dt;
char ss[10];
cout << "Input data: ";
cin >> dt;
cout << "Data is [" << dt << "]\n";
cout << "Input String: ";
cin >> ss;
cout << "String is [" << ss << "]\n";
return 0;
} |
7da8f979564250b865227fb2a65c06e42eb3488d | 5cc8813958e81cc8bd75583de7d7b38d7db42cd9 | dlefarth/pk2 | /09/Node.hpp | C++ | hpp | 232 | no_license | #ifndef NODE_H
#define NODE_H
template <typename T>
struct Node {
T value;
struct Node<T>* next;
Node(T value, Node* next = nullptr) : value(value), next(next){};
Node() : value(nullptr), next(nullptr){};
};
#endif |
ec2da1b4fc239c7b739fb2bd8192b8ba704b1437 | a010cd17c86ce891a8ed38f0d081e6a4004f1a0c | OpmRain/omniscidb | /Tests/RuntimeInterruptTest.cpp | C++ | cpp | 57,297 | permissive | /*
* Copyright 2020, OmniSci, 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... |
3bb5daec7ae3d187732fca20bbe3a0f53f1807cd | f1fad81c03b18d24cc6b41222584b97dd5bba716 | Kampbell/ISODE | /isode++/test/iso/itu/osi/als/base/addr/SelectorTest.cpp | C++ | cpp | 1,953 | permissive | #include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "als/base/addr/Selector.h"
#include "SelectorTest.h"
namespace ALS {
namespace BASE {
namespace ADDR {
SelectorTest::SelectorTest(const std::string& name) : CppUnit::TestCase(name)
{
}
SelectorTest::~SelectorTest()
{
}
... |
ecc3680c527dbe05b0e2a7219938643450fb220a | 72ac18a1267f024de096cb85ee47a43bc6f4283e | 1m188/playbricks | /playbricks_qt5/src/main.cpp | C++ | cpp | 570 | no_license | #include "QApplication"
#include "Director.h"
#include "Config.h"
int main(int argc, char *argv[])
{
#ifdef RELEASE
QApplication::addLibraryPath("./plugins"); // 发布版本从程序所在目录下寻找相关组件
#endif
QApplication a(argc, argv);
Config::getInstance()->init(); // 先加载设置
Director::getInstance()->se... |
fb1aa54d5bc9f49cc5781f52638da849380e72cd | c1d2f6a8f4947273e380110644350b5201eb18fd | Boinga15/Card-game-cpp | /CardGame/CardGame/main.cpp | C++ | cpp | 10,532 | no_license | #include<iostream>
#include<ctime>
#include<Windows.h>
#include<string>
using namespace std;
void addCard(int amount);
void discardCard(int cardPlace, bool allCards);
int areasLeft = 5;
int section = 1;
int cardsInHand[100] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... |
72127c86464db83b60fb291adc4a9f38b2293593 | 707287a3ea21eb3e3e0c1e6337bb7eda59763df9 | Pandinosaurus/ITK | /Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmJPEGLSCodec.cxx | C++ | cxx | 17,187 | permissive | /*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT A... |
62977e138c8fd3b7f5d026e65b13dea4a1bedcc2 | 7e7987ecacf0226adaf7bcbf0f820bf1a9d687d5 | hrishi7/extraa-assignments | /question4.cpp | C++ | cpp | 763 | no_license |
#include <iostream>
using namespace std;
int searchPosition(int arr[], int element,int start,int end){
if(start > end ){
return -1;
}
int mid = (start + end) / 2;
if(arr[mid] == element){
return mid;
}else if(arr[mid] > element){
return searchPosition(arr,element,start,mid... |
4dc74371a68cf2bcc625922fdd51a4d31ad6fc16 | 05da75d7c4f8cb940cdb2f65085ed8f607e92835 | closedsum/core | /CsCoreDEPRECATED/Source/CsCoreDEPRECATED/Components/CsStaticMeshComponent.cpp | C++ | cpp | 657 | permissive | // Copyright 2017-2019 Closed Sum Games, LLC. All Rights Reserved.
#include "Components/CsStaticMeshComponent.h"
#include "CsCoreDEPRECATED.h"
UCsStaticMeshComponent::UCsStaticMeshComponent(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
}
#if WITH_EDITOR
void UCsStaticMeshComponent::PostEd... |
1082de871187311d92ea9d18be3d03631fde711f | c4562cee17ba7755ec2bbf5af59276a7e64c92aa | AlbertoLameira7/SDL2_project | /Objects/Label.cpp | C++ | cpp | 513 | no_license | #include "Label.h"
#include <iostream>
Label::Label(std::string text, SDL_Color color, int xPos, int yPos) {
_text = text;
_color = color;
_xPos = xPos;
_yPos = yPos;
}
void Label::update() {
}
void Label::setText(std::string text) {
_text = text;
}
std::string Label::getText() {
return _t... |
18467a3a7292af2f367932b7b252179d2aa57d77 | 5f355992f7b06fc643561c375d78b9855dd57346 | pnnl/eom | /units/include/parserTests/BATest.hpp | C++ | hpp | 1,677 | no_license | /*
* BATest.cpp
*
* Created on: Jan 23, 2012
* Author: kglass
*/
#ifndef BATEST_HPP_
#define BATEST_HPP_
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
class BATest {
public:
BATest(BalanceAuthParams (expectedParams[]),
BalanceAuthParams (actualValues[]), int nBAs){
for ... |
e2fd023ad6e2b8bb8f1c622e0495230278816104 | e649bc9f44e08a51c6d50626a77dd62d7a388405 | Alakia/LevelSet | /main.cpp | C++ | cpp | 8,152 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include <GL/glew.h>
#include <cuda_runtime.h>
#include <helper_cuda.h>
//#include <cutil.h>
#include <GL/glut.h>
#include <opencv2/opencv.hpp>
#define IMAGE "/root/car.bmp"
#define MASK "/root/carmask.bmp"
#define I... |
e0d2d480e2a26e8dd36df464b4bb3a7cb27c623e | aab7d8361e8b4123f55c7a305d0b1426526118c1 | Pytrader1x/Cpp_Udacity | /2. Intro to C++/car.cpp | C++ | cpp | 395 | no_license | #include <iostream>
#include "car.h"
// Method definitions for the Car class.
void Car::PrintCarData()
{
cout << "The distance that the " << this->color << " car " << this->number << " has traveled is: " << this->distance << " it's price is: " << this->price << "\n";
}
void Car::IncrementDistance()
{
this->... |
75d48b8c1443f2a166c627f5221722e6bc5ca5b0 | 5de19353f64d57fdb63b436344658bfc582fb596 | ajunlonglive/Hands-On-Design-Patterns-with-Qt-5 | /ch03/SpeedObserverSS/main.cpp | C++ | cpp | 691 | permissive | #include "MainWindow.h"
#include <QApplication>
#include "Speedometer.h"
#include "Vehicle.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
auto speedo = new Speedometer; // (1) create the speedometer object
auto vehicle = new Vehicle; // (2) create the veh... |
7f8cc0445f3b6ef84bb4469665485827dc2042dc | 21c3e4f97eee9acb348a614c1ad67e7d1e78c229 | accb529/Kassiopeia | /Kassiopeia/Bindings/Trajectories/Source/KSTrajControlLengthBuilder.cxx | C++ | cxx | 538 | no_license | #include "KSTrajControlLengthBuilder.h"
#include "KSRootBuilder.h"
using namespace Kassiopeia;
using namespace std;
namespace katrin
{
template< >
KSTrajControlLengthBuilder::~KComplexElement()
{
}
STATICINT sKSTrajControlLengthStructure =
KSTrajControlLengthBuilder::Attribute< string >(... |
380be9ddc4436f3437f2cfa1f90be4e489216721 | 7e9cf710fcbd6845232cc5648f4d5b6f6e976082 | Fneger/ArkPro | /Package/Launcher/x86/moc_EffectWidget.cpp | C++ | cpp | 3,159 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'EffectWidget.h'
**
** Created: Wed Oct 18 10:38:12 2017
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
**********************... |
e49d0852f1cf38badbebd1bb363fcb7029cef9eb | ce65460a64ed989406b989b8cc3e6232e3df803d | penn201500/npg | /src/widget/field_select_dialog.cpp | C++ | cpp | 2,817 | no_license | #include "field_select_dialog.h"
#include "../qresource.h"
FieldSelectDialog::FieldSelectDialog(const std::vector<Field>& optional_fields, QWidget *parent)
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
,m_optional_fields(optional_fields)
,m_ok(false)
{
ui.setupUi(this);
setWindowTitle... |
92c66477e1e22ab8df1478c6161acb63022254ed | 6d106e7addbc31e59c8eaed219f67d5b89984106 | gabrysiam8/labPOI | /template_07/mtest.cpp | C++ | cpp | 1,945 | no_license | // Szablon tablicy asocjacyjnej
//
//
// W zadaniu nalezy napisac szablon klasy tablicy asocjacyjnej gdzie
// typ klucza i typ wartosci sa argumentami szablonu.
//
//
// Implementacja wnetrza moze byc prosta np. dwie tablice
// operacji insert() (badz podczas odwolania sie za pomoca [])
// Moze wewnatrz przydala by s... |
6c42b5ec0a3b6d343968dc54d4e1d2fac9ba5277 | 7b957db1be52bc2bc0b910d9f8c9739419c5dc47 | nqqw/ft_containers | /.history/Map_20210525155307.hpp | C++ | hpp | 11,417 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Map.hpp :+: :+: :+: ... |
205c63eba96838abd0465dbff125199971f2e7bb | 52c962efd9f31c744ee26cbc8913421c437887c3 | carolinebryant/Ray-Tracer-C- | /ray.cpp | C++ | cpp | 1,879 | no_license | /*
CPSC 102
Project 4 Basic Ray Tracer in C++
Name: Caroline Bryant
*/
#include <iostream>
#include <math.h>
#include "ray.h"
#include "vector.h"
#include "sphere.h"
#include "light.h"
using namespace std;
int main () {
VECTOR intersect_pt;
VECTOR normal;
// structure hold red color
COLOR_T obj_color;
obj_... |
771f59864fc9747651761c941767852032126bfa | 55382d4ac6fecff0002828b48e51432d5685a075 | shahzadhashmi/C-Basic-Code | /Simple program.cpp | C++ | cpp | 398 | no_license | #include <iostream>
#include<stdio.h>
#include<conio.h>
using namespace std;
main()
{
int arr[10],no;
int i,j;
cout<<"Size of an array: ";
cin>>no;
cout<<"Enter any "<<no<<" num in array:";
for(i = 0; i <=no; i++)
{
cin>>arr[i];
}
cout<<"Duplicate values are:";
for(i=0; i<no;i++)
{
for(j=i+1;j<no;... |
45504636e2c92e95291fe6f126f8690a1a6539c8 | cf3b8428a2edaddee954385ba02e69402f3a4460 | gaffordb/compiler | /src/lex-yacc-parser/parser.yy.cpp | C++ | cpp | 58,429 | no_license | // A Bison parser, made by GNU Bison 3.0.4.
// Skeleton implementation for Bison LALR(1) parsers in C++
// Copyright (C) 2002-2015 Free Software Foundation, Inc.
// 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... |
538b0cc8cffffb9d9eed6c9839c0dfcb0ef448f5 | 9eceb279ab1ca8ef52f4784ae790b7f99df7d4cb | godoncoke/coke | /src/qt/walletmodel.cpp | C++ | cpp | 26,674 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2017 The IDOPROFITIDOCOKE Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "walletmodel.h"
#include "addresstablemodel.h"
#include ... |
48bef59e9da547acb4281c4b2014d3479e50b84d | eebe9b7ec2996755bc55817012c72eea80a2d572 | zeoneo/opengl | /02-triangle/triangle4.cpp | C++ | cpp | 4,640 | no_license | #include <glad.h>
#include <GLFW/glfw3.h>
#include <util.h>
// settings
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
void render(GLFWwindow *window, unsigned int* VAOs);
const char *vertexShaderSource = "#version 330 core\n"
"layout (location = 0) in vec3 ... |
654054b2b7cba4ae8c13af687b3c3e273bf9a8d4 | 9fb4c86403f6f929b0ca9a95d3fc234152e98f9d | siddharth9820/wait-free-backprop | /cudnn_layers/convolution.cpp | C++ | cpp | 8,574 | no_license | #include "convolution.h"
Convolution::Convolution(int kernel_size[], int input_size[], cudnnHandle_t handle)
{
type = CONV_LAYER;
for(int i=0;i<3;i++)filter_shape[i] = kernel_size[i]; // HxWxOutputChannels
for(int i=0;i<4;i++)input_shape[i] = input_size[i]; // BSXCXHXW
int batch_size = input_shape[... |
f56baca0d41c73b921960aeeca052b986d3097ea | 24848df7c7c479edb679ce46c894b843c768d88e | syllcs/primer | /c7/7.6.cpp | C++ | cpp | 247 | no_license | #include "7.2.h"
#include <iostream>
#include <string>
using namespace std;
istream& read(istream& is, Sales_data& item) {
double price = 0;
is >> item.bookNo >> item.units_sold >> price;
item.revenue = price * item.units_sold;
return is;
}
|
dab20f39de6de6f0c2bf5297e17e6458db02306d | 0236f992639fc3ae0328d5199f8de1c637a4ecd9 | xCrypt0r/Baekjoon | /src/2/2789.cpp | C++ | cpp | 455 | permissive | /**
* 2789. 유학 금지
*
* 작성자: xCrypt0r
* 언어: C++14
* 사용 메모리: 1,984 KB
* 소요 시간: 0 ms
* 해결 날짜: 2020년 9월 5일
*/
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
const string cambridge = "CAMBRIDGE";
string word;
cin >> word;
for (const auto& c : word)
{
if (c... |
1999a94677d3d22e50702904080cb2d0390794a8 | df9d133fbaccc0e74dbdfe11f4d904197388076c | nohal/marnav | /test/marnav/nmea/Test_nmea_msk.cpp | C++ | cpp | 951 | permissive | #include <marnav/nmea/msk.hpp>
#include "type_traits_helper.hpp"
#include <marnav/nmea/nmea.hpp>
#include <gtest/gtest.h>
namespace
{
using namespace marnav;
class Test_nmea_msk : public ::testing::Test
{
};
TEST_F(Test_nmea_msk, contruction)
{
EXPECT_NO_THROW(nmea::msk msk);
}
TEST_F(Test_nmea_msk, properties)
{... |
da19b02364f4537dae5fe4f6d7c45778a8c61cf4 | 78f3901845d6adc91ad9ced95b24988bf7c900e3 | cran/maotai | /inst/include/maoarma.hpp | C++ | hpp | 966 | no_license | // #ifndef MAOTAI_MAOARMA_HPP
// #define MAOTAI_MAOARMA_HPP
//
// #pragma once
#include <RcppArmadillo.h>
#include "procedures/maoarma_basic.h"
// available functions
// (basic:umat) knn : return (n x k) index vector. 0 starting C convention.
// (basic:mat) pdist : return (n x n) distance matrix
// ... |
a81c65c38f34479162cf4f9ff61d44dc137e3406 | d6f41e7d3a7831de4115efea6797f59465f1e390 | trxcllnt/cudf | /cpp/include/cudf/rolling.hpp | C++ | hpp | 15,314 | permissive | /*
* Copyright (c) 2019-2020, NVIDIA 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.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
d62684bd6e92e2a43ac9e544ad9ae530addb0197 | fe25654ff0d4e3a6c891e71f9171b6e44e67b075 | iridium-browser/iridium-browser | /third_party/angle/src/tests/gl_tests/ShaderMultisampleInterpolation.cpp | C++ | cpp | 12,988 | permissive | //
// Copyright 2023 The ANGLE 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.
//
// Test state requests and compilation of tokens added by OES_shader_multisample_interpolation
#include "common/mathutil.h"
#include "test_util... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.