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 |
|---|---|---|---|---|---|---|---|---|
567393a105c34023baa64c8a7035ce94c9c63353 | 7c29b927d2cd6f980875b2180e09d857dd2e946c | GLDsuh-a/qt-1 | /LimitMouseAreaDemo/mainwindow.cpp | C++ | cpp | 570 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QTableView>
#include <QVBoxLayout>
#include <QStandardItemModel>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QStandardItemModel *pModel = new QStandardItemModel(3,6);
QTableV... |
0b5714b0c6d89d8183ceb21178145a2fe9588d92 | c4c4fd0d9b2f73c714391fd581da0fa589d1b66a | bittorrent/aws-sdk-cpp | /aws-cpp-sdk-es/source/model/EBSOptions.cpp | C++ | cpp | 2,418 | permissive | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file... |
e339a7395ddcd98053fe064b80c4d001df2a0193 | 9df65dc4508dd53b0a65959e454a55abf2186fd1 | lineCode/wasmdec | /src/parsers/load.cc | C++ | cc | 389 | permissive | #include "parser.h"
using namespace wasmdec;
string wasmdec::parsers::load(Context* ctx, Expression* ex) {
string ret;
// Memory loading
Load* lxp = ex->cast<Load>();
ctx->lastExpr = ex;
ctx->functionLevelExpression = false;
string var = Convert::parseExpr(ctx, lxp->ptr);
ret += util::tab(ctx->de... |
a80417b1d2ec4d1144bf9bd8b9b5cc05587a5f47 | 4036d9369911a5007f48e420dad61a286f48c496 | HekpoMaH/Olimpiads | /grupa C/esenen turnir/2011/C/3-company/author/Solutions/Company.cpp | C++ | cpp | 1,089 | no_license | /*
ID: espr1t
LANG: C++
TASK: Company
COMP: Autumn National Contest, 2011
KEYWORDS: Graph, Tree, Recursion
*/
#include <cstdio>
#include <vector>
#include <algorithm>
#define MAX 1048576
int main(void)
{
FILE* in = stdin; FILE* out = stdout;
// in = fopen("Company.in", "rt"); out = fopen("Company.o... |
80aec754af27814efaac6afc352022a8b28bf06d | 55096e0f7ece8b67f7919aa309b7b8ecdf341f91 | LittleYang0531/CQ-CSP-S-2021 | /CQ-00021/airport/airport.cpp | C++ | cpp | 2,391 | no_license | #include<bits/stdc++.h>
using namespace std;
int n,mgn,mgj,lesgn[100010],lesgj[100010];
pair<int,int> gn[100010],gj[100010];
int vis[100010],vit[100010];
inline int read(){
char c;
int x=0,f=0;
c=getchar();
while(!isdigit(c))
{
if(c=='-') f=1;
c=getchar();
}
while(isdigit(c))
{
x=x*10+c-48;
c=getchar()... |
0537e083cc4ef485fd463a80d430b0a26d33bc46 | d3878de2b68f21929f00b8634bcb9794a0e4f086 | Csineneo/Vivaldi | /chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc | C++ | cc | 19,867 | permissive | // Copyright 2017 The Abseil 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 agre... |
7f69e15ec6740e9af6c9cbb1a46ed66e532cfc56 | 28e770d5e8fd38c4094b1d3b9eac5f18c4cf41cd | lucasxia01/Competitive-Programming-Problems | /Codeforces/Ed CF 69/Ed CF 69/C.cpp | C++ | cpp | 644 | no_license | #include <iostream>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <utility>
#define MOD 998244353
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
long long a[n];
long long diffs[n-1];
for ... |
73b95d0f382dad5e896c2cf458824a5ba8db3bc0 | af724a2320ef67b35285ab9b2ea436b1c374d3b8 | x3ro/tinyos-legacy | /tinyos-0.4.x/tos/tools/mote_prog_win32/AvrCmd.cpp | C++ | cpp | 3,173 | no_license | #include "PCH.h" // common MicroSoft/Borland Headers
/*
cmdAvr.C
command line access to parallel dummy programmer
Uros Platise (c) 1997,1999
This is very fast port from AtmelCMD.C. Some functions like bit
locking is not yet supported.
*/
#include "AvrCmd.h"// this is the header file for this sou... |
7fc82e2b13bfdc7f6f97c77202a911a6880a7ed9 | d12e5149f1e38de8851f2bc701decc2d0f5c1361 | gzmorell/discovering-modern-cpp | /ch_03/errors/main.cpp | C++ | cpp | 540 | no_license | #include <iostream>
#include <complex>
#include <vector>
#include <algorithm>
// Complex ordering error.
int main()
{
std::cout << "Hello C++ World!" << std::endl;
std::vector<float> vf {4, 3, 8, 1, 23, 2};
std::sort(vf.begin(), vf.end());
for (auto x : vf)
std::cout << x << ", ";
std::cout << std::end... |
063a8efbb5728902c272fe3ea5b1c2d67774a619 | 3cef7f2718d6b593f5f98009ff6879a9c9529346 | ELLIEbleu/aliyun-openapi-cpp-sdk | /cdn/src/model/UpdateFCTriggerRequest.cc | C++ | cc | 7,688 | 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... |
000a25a436366362597fceba41698b7b36eed62f | 8e7c65c6825b16592f81506c6d0d24497d515fba | NaiveSolution/PubSub | /custom_lib/isocpp2/org/opensplice/sub/BuiltinSubscriberDelegate.cpp | C++ | cpp | 6,266 | no_license | /*
* Vortex OpenSplice
*
* This software and documentation are Copyright 2006 to ADLINK
* Technology Limited, its affiliated companies and licensors. All rights
* reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in ... |
c71d4e66d763cc17e45d7b56af432de0b5385f66 | e18d7d9b2a3e0f20c89720b098b8c64f790b06c8 | anand873/CP_Codes | /Codeforces/1367.A.cpp | C++ | cpp | 1,635 | no_license | //Author: AnandRaj doubleux
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
typedef pair<ll,ll> pll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vecto... |
b7fcd67ac750e040fdc4d9b3e06871d3d8a666ff | 8cd7dd8c32535791550f7400cd7245a8d11eed89 | mlnotes/machine | /clustering/kmeans.cpp | C++ | cpp | 2,325 | no_license | #include "kmeans.h"
#include "../base/common.h"
#include "../math/hfmath.h"
#include <memory.h>
KMeans::KMeans()
: distance_(NULL)
{
}
KMeans::~KMeans()
{
}
void KMeans::set_distance(Distance *distance)
{
distance_ = distance;
}
void KMeans::cluster(HFMatrix<double> *vertices, int k)
{
srand(time(0));
ASSERT(ver... |
d97591701aaa117525ed10699aed2911531d0e9c | 8e2ef961c701193d100f147aea890b6a7749500f | necroarmoralma/necroarmoalma | /GPGM21あああああ/enemyinfo.cpp | C++ | cpp | 15,952 | no_license | //=============================================================================
// ファイル名: infowindow.cpp
// 説明: 作戦目標と敵ライフの情報
// Author : 山本 壮将
//
//=============================================================================
#include "enemyinfo.h"
#include "main.h"
#include "boss.h"
//***********************... |
3c1bd593226402b700604a698b59148252332d68 | bb4e347034b29a4ef268c73841c970f14e669ba4 | sumitrathawani1810/Data-Structure-Algorithm | /450-DSA-Cracker/Array/Codes/count-pairs-with-given-sum.cpp | C++ | cpp | 867 | no_license | // { Driver Code Starts
//Initial template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
int getPairsCount(int arr[], int n, int k) {
// code here
int cnt = 0;
unordered_map<int,int>m;
for(i... |
7403fa0ea817866547c68cb98fbc933c854270fb | b0aa202eb076bb203e968abe01fa79156906dee7 | jzhang1901/lintcode | /solutions/615. Course Schedule.cpp | C++ | cpp | 1,880 | no_license | /*
Description
There are a total of n courses you have to take, labeled from 0 to n - 1.
Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1]
Given the total number of courses and a list of prerequisite pairs, is it possible for you to... |
faf98acaa18c615e9ce2c66829d2cc1eb9caf28f | 3b75487233437406087d2a0dc2182f5dd2906c5b | vade/chromium | /chrome/browser/ui/ash/multi_user/multi_user_warning_dialog.cc | C++ | cc | 4,050 | permissive | // Copyright 2014 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/multi_user/multi_user_warning_dialog.h"
#include "ash/shell.h"
#include "base/macros.h"
#include "chrome/browser/ui/brows... |
44eec2f79fd4dc59762b3fd79f8bbdb599728053 | fe8e9164d3c8ab38976ecd2475316d83446d56a0 | freeeyes/TMFServce | /TimerMessageFrame/CTMService.cpp | C++ | cpp | 6,396 | no_license | #include "CTMService.h"
void timer_run_execute(void* arg)
{
CTimerInfo* timer_info = (CTimerInfo*)arg;
timer_info->run();
}
CTMService::CTMService() :m_nTimerMaxCount(0)
{
}
int CTMService::Init()
{
//读取配置文件
CXmlOpeation objXmlOperation;
objXmlOperation.Init(XML_CONF_FILE);
objXmlOperation... |
ab7e34c7ff489252f8560b1108899c3eaa2f3bee | e7c6a7b4454c943ea7ba3e62132e7f24e7eb8053 | Brettyoke49/SpookyShooty | /tracker/engine.cpp | C++ | cpp | 4,412 | no_license | #include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <random>
#include <iomanip>
#include "sprite.h"
#include "twoWayMultiSprite.h"
#include "gameData.h"
#include "engine.h"
#include "frameGenerator.h"
Engine::~Engine() {
for(auto i : sprites) {
delete i;
}
std::cout << "Ter... |
bc58c4c2d223ec53f6ba7d4776e2aff4eae70855 | d8dd815d15d6ff3e957e6f0b825ea1269c457468 | LuckyKingSSS/demo | /good/Filmora-Screen-Windows/inc/Externlib/MultiMediaSDK/Interface/C++/Type/guiddef.hpp | C++ | hpp | 1,956 | no_license | /*
*******************************************************************************
guiddef.hpp
Programmer: Hetao
Remark:
*******************************************************************************
*/
#ifndef _MACRO_WONDERSHARE_LIBRARY_GUID_DEF_HPP
#define _MACRO_WONDERSHARE_LIBRARY_GUID_DEF_HPP
... |
6390693d2befcaa115ab4effad015c33e05fb533 | a802ae0f4f3aac8a8f5bd84a4b3f008a3207259a | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/Z6.1+po+dmb.ld+po.c.cbmc_out.cpp | C++ | cpp | 36,578 | no_license | // 0:vars:3
// 3:atom_2_X0_1:1
// 4:thr0:1
// 5:thr1:1
// 6:thr2:1
#define ADDRSIZE 7
#define NPROC 4
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_rng( char from, char to ) {
char ret = __g... |
d178a10944339b9323269ebe22e7397f6aac139d | 1722f428e13653eefb21e9237fbfbaf56914e6e7 | swaphack/CodeLib | /Foundation/Render/Common/Scene/Camera3D.cpp | C++ | cpp | 1,069 | no_license | #include "Camera3D.h"
#include "Graphic/import.h"
#include "Cameras.h"
#include "DebugDraw.h"
#include "Common/Tool/Tool.h"
render::Camera3D::Camera3D()
{
this->setDimensions(DimensionsType::THREE);
this->setViewDistance(0.1f, 1000);
}
render::Camera3D::~Camera3D()
{
}
bool render::Camera3D::init()
{
if (!Camera:... |
d74732414a773df4e229139e558c7275454f2e0a | dc8dd3f5ff15dfbb62581c117ee270560c47ccdf | Luiz-Monad/RingBuf | /RingBuf.cpp | C++ | cpp | 4,472 | permissive | //
// Created by wg on 2021/1/30.
//
#include <cassert>
#include <algorithm>
#include <cstring>
#include "RingBuf.h"
RingBuf::RingBuf(ssize_t size) : mSize(size) {
assert(size > 0);
mBuf = new char[size];
mRIndex = 0;
mWIndex = 0;
mPending = 0;
}
ssize_t RingBuf::write(char *buf, ssize_t size) {
... |
06fdb2c2c63b8861cb247d15fa92de6da3ab0ab1 | a42ad359d1a74ac9c8b391278fbe6bc286f5e253 | hansolj991/2021-2-Study-C | /Youn2014/ch08/소스1.cpp | C++ | cpp | 478 | no_license | #include <stdio.h>
int main(void)
{
int opt;
double num1, num2;
double result;
printf("1.µ¡¼À 2.»¬¼À 3.°ö¼À 4.³ª´°¼À \n");
printf("¼±ÅÃ? ");
scanf_s("%d", &opt);
printf("µÎ °³ÀÇ ½Ç¼ö ÀÔ·Â: ");
scanf("%lf %lf ", &num1, &num2);
if (opt == 1)
result = num1 + num2;
if (opt == 2)
result = num1 - num2;
if (... |
9c77db99eb487444c3113a1c097c4cbb580d26b5 | 9ba9dfcb2172fcea7116be7c5c104eed5f5f1c8b | antonkulikov401/mipt-algorithms-3sem | /task1-C/trie.cpp | C++ | cpp | 2,155 | permissive | #include "trie.hpp"
Trie::Trie(const std::vector<std::string_view>& patterns) :
root(std::make_shared<TrieNode<alphabetSize>>()), currState(root) {
for (size_t i = 0; i < patterns.size(); ++i)
AddString(patterns[i], i);
BuildSuffixLinks();
BuildDictSuffixLinks();
}
void Trie::AddString(std... |
479389c757702c54cb9c95aec749d336b842f90c | 4fd43df68424f4de68810d548dd58cdcf9c90ec4 | aurantst/windows-XP-SP1 | /XPSP1/NT/printscan/print/drivers/usermode/ddk/samples/oemdll/syncset/debug.cpp | C++ | cpp | 8,121 | no_license | // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright 1996 - 1999 Microsoft Corporation. All Rights Reserved.
//
/... |
ed7a3bcbc969a2496244e1ac863d671765d549f8 | 341509f307dc178eed25f9d522b6fe41d6dea843 | Anjudharu/positive4 | /h2pgm1.cpp | C++ | cpp | 673 | no_license | #include <iostream>
#include <string>
#include <iterator>
#include <algorithm>
#include <cctype>
int main()
{
std::string str = " cat cow dog wolf lobster";
std::string result;
auto i = str.begin();
while (i!= str.end())
{
while (i!= str.end() && isspace(*i))
{
result += *i;
... |
5728e60aa5ab53c4445aef431e982724ab240d76 | 608bbcc82fd063fdf954cdfafcaaedc09765beef | ngzHappy/QtQmlBook | /chapter01/firstapplication/main.cpp | C++ | cpp | 4,154 | no_license | #include <QtGui/QtGui>
#include <QtQuick/QtQuick>
#include <QtWidgets/QtWidgets>
#include <QtQuickWidgets/QtQuickWidgets>
inline QUrl getLocalFileFullPath(
const QString & argFileName,
const QString & argBase) {
const QDir varRootDir{ argBase };
const auto varAns = varRootDir.absoluteFilePath(argFileN... |
e298de3035fdac7b0ef65e2c44298ec77206ff0a | 87c6bc9e07921276ad9b9e516e66a92749d6a7bc | yinyangman/colourize | /AwesomeGame/Classes/ColumnLayer.cpp | C++ | cpp | 387 | no_license | #include "ColumnLayer.h"
ColumnLayer* ColumnLayer::create(const ccColor4B& color, GLfloat width, GLfloat height)
{
ColumnLayer *pSprite = new ColumnLayer();
if (pSprite && pSprite->initWithColor(color, width, height)) {
// Set to autorelease
pSprite->autorelease();
return ... |
bc76b1e2c8f1b9f625757c40d9ebf098fcfc9421 | b6b76cc0b3272e17d801f36859999c5819e6fe6f | MatsumotoSatoru/SATOROOT | /programs/meettree2/meettree2.cpp | C++ | cpp | 396 | no_license | #include "TCanvas.h"
#include "TFile.h"
#include "TH1D.h"
#include "TTree.h"
TH1D *meettree2(char *InputRootFileName){
TCanvas *c1 = new TCanvas("c1", "c1") ;
TFile *file = new TFile(InputRootFileName,"READ") ;
TTree *t = (TTree*)file->Get("tree") ;
TH1D *h = new TH1D("h","TDC",100, 0., 8000e-9) ; // 800... |
42c41d6d2a9995812a9efe7344300af62511cc33 | 723aeca53c0869a28888f84f753b2b47bf03ef29 | kr-computer-study/algorithm | /성진/자료구조/10866-덱.cpp | C++ | cpp | 1,174 | permissive | #include <iostream>
#include <string>
#include <deque>
using namespace std;
int main(void) {
deque<int> mydeque;
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
string cmd;
cin >> cmd;
if (cmd == "push_front")
{
int X;
cin >> X;
mydeque.push_front(X);
}
else if (cmd == "push_back")
{
in... |
62a6e5626c1b941389ea6660a8084a8275b066b5 | 30ca3dc23300a4f22b2ec263d9e493f7ceabae34 | JustinKnowles37/Minesweeper | /board.cpp | C++ | cpp | 9,854 | no_license | #include <cstdlib>
#include <string>
#include <sstream>
#include "board.h"
#include "gfx2.h"
using namespace std;
Board::Board()
{
width = 30;
height = 16;
numMines = 99;
numRemSquares = width*height - numMines;
numRemMines = 99;
for (int w = 0; w < width; w++) {
vector<Zone> myZones;
Zone currentZ... |
0e56b6bded3104d116fc74cbfcfe81aaa8625a5d | 423ef908f451c2c29a11452599144635c6cffaa7 | amcadmus/md.error | /shortRange.inhomo/template/tools/error.esti.conf/app/testForce.cpp | C++ | cpp | 5,898 | no_license | #include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <queue>
#include <vector>
#include <cmath>
#include "ForceKernel.h"
int main(int argc, char * argv[])
{
double dxv = 0.1;
i... |
7aadd26018b9fb90387ae870f5a311d7b98dc74a | d2bdddbdc80b21354dadcd029b6e60d068015d58 | Sezoir/Tutorial-Projects | /Training/Recursive Functions.cpp | C++ | cpp | 576 | no_license | #include <iostream>
using namespace std;
unsigned long int factorial(unsigned long int n)
{
if (n < 2) return 1;
//return factorial(n - 1) * n; // The issue with using a recursive function is that for functions with a lot of iterations it can quickly use a lot of resources.
unsigned long int result = n;
while (n ... |
52b8f77c44f253af825d989cf710e4f69eeabaa2 | 45e5acac01b8810100a5262de7b6d056990bf0ec | eyupakayy/EPO_Token | /delele.cpp | C++ | cpp | 11,748 | no_license | // delele.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include "delele.h"
#include <VersionHelpers.h>
#include <tchar.h>
#include <stdio.h>
#include <windows.h>
#include <tlhelp32.h>
#include <tchar.h>
#include <psapi.h>
#include <PowrProf.h>
#include <iostream>
... |
64a1c6a05639c81c59e4b353c3a3f324c6f4da84 | f98404d32b5bbadcc01e1357a2a5a4d958a6fec4 | highlandear/snail | /GlMainApp/GlMainApp/Material.cpp | C++ | cpp | 6,803 | permissive | #include "Impl.hpp"
#include "gdraw.hpp"
GLfloat no_mat[] = { 0.0f, 0.0f, 0.0f, 1.0f }; // 无材质颜色
GLfloat mat_ambient[] = { 0.7f, 0.7f, 0.7f, 1.0f }; // 环境颜色
GLfloat mat_ambient_color[] = { 0.8f, 0.6f, 0.2f, 1.0f };
GLfloat mat_diffuse[] = { 0.2f, 0.5f, 0.8f, 1.0f }; // 散射颜色
GLfloat mat_specular[] = { 1.0f, 1.0... |
fa1c3b1ae210115a46b1828e1dc387ea8760df4f | 2f0acd47718427a54adc88b9759ff5035d4549ff | darrengarvey/operators_on_members | /include/bind_expressions_inline.hpp | C++ | hpp | 731 | no_license |
#ifndef BIND_EXPRESSIONS_INLINE_INCLUDED
#define BIND_EXPRESSIONS_INLINE_INCLUDED
#include <boost/bind.hpp>
template< typename T >
void sort_less_than(T& types)
{
typedef typename T::value_type V;
std::sort( types.begin(), types.end(), boost::bind(&V::s, _1) < boost::bind(&V::s, _2) );
}
template< typename ... |
8962671dc8c305378b4ae88da6203cbd2b3f9858 | aa3cd5d4149c401fc55a535941f3f748150af616 | jiangjiajun/Paddle | /paddle/fluid/operators/allclose_op.cc | C++ | cc | 5,485 | permissive | // Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
2d614ce1e00a15b5f56989435f572c5bf123b364 | 65dfa1a03a2d5b13d44b08cfd2a068d27859da37 | DronesForBlood/DronesForBlood | /software/gcs/src/drone_decon/include/geofunctions.hpp | C++ | hpp | 1,777 | permissive | #ifndef GEOFUNCTIONS_H
#define GEOFUNCTIONS_H
#include <utility>
#include <math.h>
#include <vector>
#include <iostream>
#include "defines.hpp"
namespace GeoFunctions
{
static inline double calcMeterDistanceBetweensCoords(std::pair<double, double> startCoord, std::pair<double, double> endCoord)
{
startCoord.fir... |
57d5c775c07dfbd2217cf21fd31585167e0606d7 | 0c3910d7eed3632c97fd055eadd65a27bc232077 | ptiza-v-nebe/kuka_ws | /youbot_simulation/youbot_gazebo_control/src/steered_wheel_base_controller.cpp | C++ | cpp | 48,132 | no_license | /// \file steered_wheel_base_controller.cpp
///
/// \brief Steered-wheel base controller
///
/// Copyright (c) 2013-2014 Wunderkammer Laboratory
///
/// This file contains the source code for SteeredWheelBaseController,
/// a base controller for mobile robots. It works with bases that have two or
/// more independently... |
f349ccf06726da37b6fb9f182ad88ebbf374b03a | 4393565d14c02ad72814bc477b3de65f03473995 | cbullo/GeometricTools | /GTE/Graphics/GL45/GL45Buffer.cpp | C++ | cpp | 3,675 | permissive | // David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2021
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 4.0.2019.08.13
#include <Graphics/GL45/GTGraphicsGL45PCH.h>
#i... |
5994fc73853a230afa293d0b9f0cfacd31eb64b5 | 6f29640138d0f7abb5563ab507ab39388b4954a0 | sakiib/OnlineJudge-Solutions | /Codeforces Solutions/codeforces 719A.cpp | C++ | cpp | 595 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,ara[100001];
cin>>n;
for(int i=0;i<n;i++){
cin>>ara[i];
}
if(ara[n-1]==15){
cout<<"DOWN"<<endl;
return 0;
}
if(n==1){
if(ara[0]==0||ara[0]==15)
cout<<"UP"<<endl;
else cout<<-1<... |
52b03ed6930b3be08d245b5d767ca33b971caa65 | c2b602f71f476629dd0e5db08321b09306801b6b | JadeLSQ/SFML-Tic-tac-toe | /SFML_game_1/StateMachine.hpp | C++ | hpp | 926 | no_license | //
// StateMachine.hpp
// SFML_game_1
//
// Created by LEI_Siqi on 10/04/2018.
// Copyright © 2018 LEI_Siqi . All rights reserved.
//
#ifndef StateMachine_hpp
#define StateMachine_hpp
#include <memory>
#include <stack>
#include "state.hpp"
namespace n1 {
typedef std::unique_ptr<State> StateRef;
cla... |
eda574d42d35ad8a5e55c4e5f69c9a74bf553eda | d4af947292cbcf9f77643ecf760b76d9c394b8ce | koutheir/KJSONPlusPlus | /src/base85_dec.cpp | C++ | cpp | 2,154 | permissive |
/*
Copyright 2011-2011 Koutheir Attouchi. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the fo... |
19787cba991f700e60c96f23714141a5b535b853 | 360f4f564cda08a2a2dc07a68b9e4a864b3eacea | afazdeen/LogMaskingTool | /LDAL/Core/LDEL/ELInterpretterJSON.cpp | C++ | cpp | 12,333 | no_license | #include "ELInterpretterJSON.h"
#include "DefFileReader.h"
#include "MetaData.h"
#include "ELParser.h"
#include "ELVariable.h"
#include "ELLineTemplate.h"
#include "ELBlockTemplate.h"
#include "MemMan.h"
#include "ELNodeWrapperJSON.h"
#include "Utils.h"
#include "ELBlockElement.h"
#include <iostream>
#include <nlohmann... |
18bf9286eae9190987b201473c8ebee96292f310 | 467cb09cdbc4b53261f58d3e913cf77d44dff92b | trigrass2/buildroot-ltc | /system/hlibispv2505/DDKSource/CI/target/device_interface/slave/device_interface_slave.cpp | C++ | cpp | 22,055 | no_license | /*!
******************************************************************************
@file : device_interface_slave.cpp
@brief
@Author Imagination Technologies
@date 15/09/2005
<b>Copyright 2005 by Imagination Technologies Limited.</b>\n
All rights reserved. No part of this software, eit... |
a52673c10022bd3a937c36b578e5ac877c3b5124 | 01b016f48bf7d066d6566cfb10418262bafa32a8 | Drigax/BabylonNative | /Dependencies/AndroidExtensions/Source/JavaWrappers.cpp | C++ | cpp | 11,636 | permissive | #include <AndroidExtensions/JavaWrappers.h>
#include <AndroidExtensions/Globals.h>
#include <android/asset_manager_jni.h>
using namespace android::global;
namespace
{
void ThrowIfFaulted(JNIEnv* env)
{
if (env->ExceptionCheck())
{
auto jthrowable{env->ExceptionOccurred()};
... |
46c5e0492139eec28766fd9b5a7751038b3efc79 | b69a4b0fd71a058bbf6ddf194e24affd6e28e392 | Kyostar1112/Arbia | /Arbia/SourceCodo/Sp2DMgrResult.cpp | C++ | cpp | 15,474 | no_license | #include "Sp2DMgrResult.h"
#define sFILE_PATH_BLACK "Data\\Image\\Black.png"
#define sFILE_PATH_STEAL "Data\\Image\\ResultSteal.png"
#define sFILE_PATH_RESULT_TIME "Data\\Image\\ResultTime.png"//時間.
#define sFILE_PATH_RESULT_DISCOVER "Data\\Image\\ResultDisc.png"//発見数.
#define sFILE_PATH_RESULT_LIVES "Data\\Image... |
5a6063513061357a9ff292138b8770a1cf028490 | f1e03256214cc82a4c2473ee4972324f2d06abda | hh1985/glycan-pipeline | /GAG/src/GAGPL/GAGLIBRARY/MethodsComparison.cpp | C++ | cpp | 3,089 | no_license | #include <GAGPL/GAGLIBRARY/SequenceSpace.h>
#include <GAGPL/GAGLIBRARY/SequencePrediction.h>
#include <GAGPL/GAGLIBRARY/NaiveMethods.h>
#include <GAGPL/IO/SequenceReader.h>
using namespace std;
using namespace gag;
using namespace gag::io;
int main(int argc, char **argv)
{
try
{
SequenceReader se... |
708886f4b0ec3d4f9abad846c539ec06862a4d5f | 8a34d457eac981875cad0153abbe89f16a65264d | svn2github/cef_2171 | /cef3/tests/unittests/request_unittest.cc | C++ | cc | 17,411 | no_license | // Copyright (c) 2011 The Chromium Embedded Framework 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 <map>
// Include this first to avoid type conflicts with CEF headers.
#include "tests/unittests/chromium_includes.h"
#in... |
1643989c75e5cff13ee86b7cd3d29ef8ade72963 | 01ac6650d5918a8e27cdedf29ca93b621bb60f03 | fgrzeszc/autoware_perception | /shape_estimation/src/corrector/no_corrector.cpp | C++ | cpp | 950 | no_license | /*
* Copyright 2018 Autoware Foundation. 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 b... |
5137a33854a1c8df7b9a51bafa61ebad71f60d42 | 65b50b12341f1b1f7a5119ecaef51e95a13960f7 | kcmonkey/iOS-H264_FFMpeg-VideoToolbox_VideoPlayer | /VideoToolBox_OpenGL/AudioDecoder.hpp | C++ | hpp | 1,764 | no_license | //
// AudioDecoder.hpp
// VideoToolBox_OpenGL
//
// Created by Cong Ku on 12/17/15.
// Copyright © 2015 Cong Ku. All rights reserved.
//
#ifndef AudioDecoder_hpp
#define AudioDecoder_hpp
#import <AVFoundation/AVFoundation.h>
#import <AudioToolbox/AudioToolbox.h>
extern "C" {
#include "libavformat/avformat.h"
#in... |
3b3a783525cb6e6f66e0d5a229dd05a3d2d0acc6 | db0f3582615d1aebfee9c335ba14e2250913c858 | amitsv26/6thsemprojects | /cg/src/point.cpp | C++ | cpp | 296 | no_license | #include "../include/point.h"
Point::Point()
{
setX(0);
setY(0);
}
Point::Point(float x, float y)
{
setX(x);
setY(y);
}
float Point::getX()
{
return x;
}
float Point::getY()
{
return y;
}
void Point::setX(float x)
{
this->x = x;
}
void Point::setY(float y)
{
this->y = y;
}
|
fb26eca1655e3ce48e762872f5aed598eb6cee88 | 3a19f6d8edc1ac111fc1576a3b47f23d93e6921f | WooSeok-03/Embedded-Class | /AVR/Arduino_app/ultrasonic.cpp | C++ | cpp | 981 | no_license | #include "ultrasonic.h"
#include "exti.h"
char echo_pin_num = 0;
char trig_pin_num = 0;
char ultrasonic_finish_flag = 0;
unsigned long measured_distance = 0;
void ultrasonic_init(int int_pin_num, char trigger_pin_num)
{
echo_pin_num = int_pin_num;
trig_pin_num = trigger_pin_num;
pinMode(trigger_pin_num, OUTPUT)... |
e8ca5aef9082ec015e35d08b50265e7ffc2615ca | 22585775ef9cf5701802c832847ac93f1f16753a | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE123_Write_What_Where_Condition/CWE123_Write_What_Where_Condition__connect_socket_84_bad.cpp | C++ | cpp | 4,237 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE123_Write_What_Where_Condition__connect_socket_84_bad.cpp
Label Definition File: CWE123_Write_What_Where_Condition.label.xml
Template File: sources-sink-84_bad.tmpl.cpp
*/
/*
* @description
* CWE: 123 Write-What-Where Condition
* BadSource: connect_socket Over... |
f55590fffe946dc728731e015c48e3e990820f18 | 31fdd74ada54adfe70f0de69e30160f637092ee8 | davinash/arangodb | /3rdParty/rocksdb/v5.6.X/java/rocksjni/ttl.cc | C++ | cc | 5,805 | permissive | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
// This file implemen... |
b6d475f27ff91c703fd3227bad32ca4a8641b953 | 31dcdde884fa3b5a0668a738ed6974a14fee4c01 | eatstreet/gecode | /examples/grocery.cpp | C++ | cpp | 3,514 | permissive | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2001
*
* Last modified:
* $Date$ by $Author$
* $Revision$
*
* This file is part of Gecode, the generic constraint
* developme... |
299acc0bc026ef3a9362c67e138cb39c080305e5 | 59d59d940e94df301f1e5223e38f6a9275043b71 | KnifeParty12/Competitive_Programming_Templates | /Dynamic_Programming/LeetCode/Super_Egg_Drop.cpp | C++ | cpp | 2,086 | no_license | #include <bits/stdc++.h>
#define endl "\n"
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define loop(i, a, b) for (int i = a; i < b; i++)
#define sloop(str, i, a) for (int i = a; str[i] != '\0'; i++)
#define mod 1000000007
#d... |
a44d3f606016e3cfe7a684c9c1ca42a729042a44 | 26fd2cecf25c744e425a74ab23e8803b40b91ddb | karimrhoualem/universityManager | /university_database_manager/UndergraduateStudent.cpp | C++ | cpp | 2,938 | no_license | #include "UndergraduateStudent.h"
// CONSTRUCTORS AND DESTRUCTORS
UndergraduateStudent::UndergraduateStudent() : Student() {
// Initialize each pointer to a nullptr
for (int i = 0; i < m_maxNumCourses; i++) {
m_studentRecord[i] = nullptr;
}
}
UndergraduateStudent::UndergraduateStudent(string studentName, int st... |
89e6d9e0a83799b819e0e06f30f5663d914b501c | 72fab8ffd3cf940195595ed017a7daf6aeac8049 | bb33bb/ActiveX_DCOM_Book_Code | /DCOMShareServer/DCOMShareServer.cpp | C++ | cpp | 2,411 | permissive | // DCOMShareServer.cpp : Implementation of WinMain
// Note: Proxy/Stub Information
// To build a separate proxy/stub DLL,
// run nmake -f DCOMShareServerps.mk in the project directory.
#include "stdafx.h"
#include "resource.h"
#include "initguid.h"
#include "DCOMShareServer.h"
#include "DCOMShareServer_i.c"
#inc... |
c09a8911eebaa3e0d7b90e3ff55c958f66faaba4 | b2189556d3ed5f77af9bc248ca565ed8df9738fd | Fenrisulvur/CPP_Projects | /TRIPLEX/TripleX.cpp | C++ | cpp | 2,180 | no_license | #include <iostream>
#include <ctime>
void PrintIntroduction(int LevelDifficulty)
{
std::cout << "\n\nYou are a secret agent breaking into a [level - " << LevelDifficulty << "] secure server room...";
std::cout << "\nYou need to enter the correct codes to continue...";
}
bool PlayGame(int LevelDifficulty)
{
... |
7d6ad1bfdca571745bc2f2869fab565240e92381 | e04475d42812a2cef23587795ede56d8e112a670 | SiChiTong/libraries | /Planning/TypeGraphManager.cpp | C++ | cpp | 6,448 | no_license | // Copyright 2016 Carrie Rebhuhn
#include "TypeGraphManager.h"
#include <list>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
using std::vector;
using easymath::XY;
using std::list;
using std::string;
using std::set;
using easymath::line_segment;
using easymath::get_n_unique_square_points;
us... |
3f778482914393b6965e635ea57b6a4df07c64d8 | 5c8603b39fdc3e0fe7abac2c2b133a0a6025cbda | TastSong/KinectPictureSynthesis | /KinectPictureSynthesis/MFC类/picture9/picture8/Choose.cpp | C++ | cpp | 4,963 | no_license | // Choose.cpp : 实现文件
//
#include "stdafx.h"
#include "picture8.h"
#include "picture8Dlg.h"
#include "Choose.h"
#include "afxdialogex.h"
// Choose 对话框
IMPLEMENT_DYNAMIC(Choose, CDialogEx)
Choose::Choose(CWnd* pParent /*=NULL*/)
: CDialogEx(Choose::IDD, pParent)
{
}
Choose::~Choose()
{
}
void Choose::DoDataExc... |
c74142b51ff64bc5cee02139b32152424ae2511d | c6f4018b56f89f18ae4aec32d188ee1957a076e4 | LightSecOps/Triton | /src/libtriton/api/api.cpp | C++ | cpp | 43,472 | permissive | //! \file
/*
** Copyright (C) - Triton
**
** This program is under the terms of the BSD License.
*/
#include <triton/api.hpp>
#include <triton/exceptions.hpp>
#include <list>
#include <map>
#include <memory>
#include <new>
/*!
\mainpage Triton: Dynamic Binary Analysis Framework
\tableofcontents
\section descri... |
bd7227a6688e295246490c93df62b29681447996 | d1db036fa613501eddab2d19f2344faa54f1547e | Angel19901/ExamenParte_2 | /Upperbound.cpp | C++ | cpp | 809 | no_license | #include <bits/stdc++.h>
using namespace std;
int upperBound(vector<int> A, int l, int r, int Target)
{
int L = l;
int R = r;
while(L < R)
{
int m = (L + R) / 2;
if (A[m] > Target)
R = m;
else
L = m + 1;
}
return R;
}
int main()
{
int n;... |
a2156c9debf608eded855660a3c5d6b2251b26e7 | 9d710fbac804353668c53ad6216a73d38e3204e2 | coinmenace/perfectcoin | /src/qt/test/paymentservertests.cpp | C++ | cpp | 8,545 | permissive | // Copyright (c) 2009-2017 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <qt/test/paymentservertests.h>
#include <qt/optionsmodel.h>
#include <qt/test/paymentrequestdata.h>
#include <amou... |
86d0ed932b681e6bbf4b3101a7fea9508a9aa9a2 | a7efcc9b2127b9aef364bd7e5bef61ce17107ccb | gianricardo/real-time-cpp | /ref_app/target/micros/xtensa32/startup/int_vect.cpp | C++ | cpp | 525 | permissive | ///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2019.
// 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)
//
#include <array>
#include <cstdint>... |
3e43729573765cad4813d8b78bc8d33ac552ee06 | a150f42c3b98bf071c407315c6a87ccfee8fdca9 | simonace/deep-learning-fpga | /src/hls/mnist_fp32_naive/solution1/.autopilot/db/hls_design_meta.cpp | C++ | cpp | 1,541 | no_license | #include "hls_design_meta.h"
const Port_Property HLS_Design_Meta::port_props[]={
Port_Property("sdata_in_TDATA", 32, hls_in, 0, "axis", "in_data", 1),
Port_Property("sdata_in_TKEEP", 4, hls_in, 1, "axis", "in_data", 1),
Port_Property("sdata_in_TSTRB", 4, hls_in, 2, "axis", "in_data", 1),
Port_Property("sdata_in_TUS... |
de091d0c18fdf44e1d4e7f1fa2db69270cf18691 | cf7030d96a43189c22f17e6da6607b45998f97bc | wofdy/PUBG-SDK | /SDK/PUBG_ControlOptionWidget_Gameapd_classes.hpp | C++ | hpp | 4,563 | no_license | #pragma once
// PLAYERUNKNOWN'S BATTLEGROUNDS (3.7.27.28) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace Classes
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// WidgetBlueprintGe... |
1b3712c69c5e85ff820ecf8069686374db797d5f | cac71196b8a8fc2060bc060a0113ce7c6929559d | hamanmax/Piscine_CPP | /Module_03/ex04/ClapTrap.hpp | C++ | hpp | 1,806 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ClapTrap.hpp :+: :+: :+: ... |
c9ac3251987ab11852f40b66d0368a56d1c17fa3 | b2b2af99555fc3e2b7a4db4b776951258fcebd50 | lbguilherme/duvidovc-app | /java/include/android.renderscript.RSIllegalArgumentException.hpp | C++ | hpp | 2,160 | no_license | #pragma once
#include "../src/java-core.hpp"
#include <jni.h>
#include <cstdint>
#include <memory>
#include <vector>
#include "java.lang.Object.hpp"
#include "android.renderscript.RSRuntimeException.hpp"
namespace java { namespace lang { class String; } }
namespace android {
namespace renderscript {
class RSIllegal... |
44afd509166966a317f70957789e4675525a7e87 | 8ce9c2128bf426cc37b141aa020454a8360a584a | joabda/Commentator | /Parse.cpp | C++ | cpp | 4,123 | permissive | #include "Parse.h"
Parse::Parse()
{
return_ = "void";
}
bool Parse::contains(const vector<string>& functions, const string& aFunction)
{
for(string element: functions)
if(element == aFunction)
return true;
return false;
}
void Parse::generateDocumentation(const string& file, const Hea... |
f6b5a7f3da075f4ad90bc5c63c6a969b87f99351 | e421f8fe1324db46f6cbe8fb03ab3001968d6976 | zwetzel/Shielding | /src/B4dActionInitialization.cc | C++ | cc | 2,903 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
a2cb4c726f4f2f181748823f83bd87685a9e5260 | 9f2bc5a68ed6eb5e4a864ee759877da86692dafb | marlonnardi/alcinoe | /references/WebRTC/modules/remote_bitrate_estimator/test/bwe_test_baselinefile.cc | C++ | cc | 5,851 | permissive | /*
* Copyright (c) 2013 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 contribut... |
965b1eb86d3bd30c3af4ef1e7c19a4e08729cfb6 | d55389dbb0cbc07ec14048a6cde55bf4bf88b371 | msrLi/portingSources | /ACE/ACE_wrappers/TAO/orbsvcs/examples/CosEC/Factory/main.cpp | C++ | cpp | 246 | permissive | // -*- C++ -*-
#include "FactoryDriver.h"
#include "orbsvcs/CosEvent/CEC_Default_Factory.h"
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
TAO_CEC_Default_Factory::init_svcs ();
FactoryDriver driver;
driver.start (argc, argv);
return 0;
}
|
725c2371bc169b53058527e93d63cea275f80a75 | 29ca10728c0fb5f85ce67c328db5140d5e875fe7 | patsonm/intro-to-cs | /Advanced Constructors/MyInteger.hpp | C++ | hpp | 503 | no_license | /*******************************************************
Michael Patosn
November 3rd 2017
Project: HW 7B. The is the myinteger hpp
*******************************************************/
#include<iostream>
using namespace std;
#ifndef MYINTERGER_HPP
#define MYINTERGER_HPP
class MyInteger
{
private:
int *... |
3edc7f7e564db3f578a20e3b77066868f8f8e77e | 6638d6d1c3697cee67bdf3810d3249fde199d27b | haow1990/algorithms | /google-codejam-2015a/seven-segment-display.cc | C++ | cc | 3,646 | no_license | #include <cstdio>
#include <iostream>
#include <bitset>
#include <string>
#include <vector>
using namespace std;
int getBinaryInt()
{
static string tmp;
int result = 0;
cin >> tmp;
for (int j = 0; j < 7; ++j) {
result <<= 1;
if (tmp[j] == '1') {
result |= 1;
}
}
... |
333913ce0379ebb63b6faa5e5bd0debc6323e306 | f54428e4ddcc420ea1537f9b88e483fbd18769a2 | nkirov/nkirov.github.com | /2012/NETB151/sources/ch17/list1.cpp | C++ | cpp | 4,468 | no_license | #include <string>
#include <iostream>
#include <cassert>
using namespace std;
template<typename T> class List;
template<typename T>
class Node {
public:
Node(T s);
private:
T data;
Node<T>* previous;
Node<T>* next;
friend class List<T>;
friend class List<T>::Iterator;
};
template<typename T>
class Lis... |
2a0cf3e4dcc3980b8ea705bf17e1fbb01bf2d10e | b5738f9e1bf1e702fe25fccffed4be0be957bdbf | DreamZhou/LearnCocos2d-x | /Classes/Scenes/AnchorPonitTestScene.cpp | C++ | cpp | 4,032 | no_license | #include "AnchorPonitTestScene.h"
//#include "Utility/playAnimation.h"
using namespace cocos2d;
cocos2d::Scene * AnchorPonitTestScene::createScene ()
{
return AnchorPonitTestScene::create();
}
bool AnchorPonitTestScene::init ()
{
if (!BaseScene::init ())
{
return false;
}
Size visibleSize ... |
7ad8a45277872da90eb48ca6cd9a0c032bebdb0e | d6ccf94271686ce862cede61cba0863ce4907e1d | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_10/Z6.3+fencembonceonce+poreleaserelease+fencembonceonce.c.cbmc.cpp | C++ | cpp | 47,905 | no_license | // Global variabls:
// 4:atom_2_X2_0:1
// 0:vars:3
// 3:atom_2_X0_1:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
#define ADDRSIZE 5
#define LOCALADDRSIZE 3
#define NTHREAD 4
#define NCONTEXT 10
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define ... |
1584c9a18712c387a2eb5c2d4e6f4870555f8ecc | 32088831fffc39a1d430c688040eed81cfeaa361 | leon99adolfo/ContainerStowageProblem | /StackContainer.cpp | C++ | cpp | 899 | no_license | #include "StackContainer.h"
// ------------------------ Properties -------------------------------
void StackContainer::SetLocationId(int pLocationId)
{
_locationId = pLocationId;
}
int StackContainer::GetLocationId()
{
return _locationId;
}
void StackContainer::SetStackId(int pStackId)
{
_stac... |
e3485dd8bcf488951c3da844b9e6af24b14ff864 | ea4c6ee0aa6559704c49d22b49473a93ebc4a798 | Shahahad/cmssw | /Alignment/CommonAlignment/src/AlignableExtras.cc | C++ | cc | 4,026 | permissive | /** \file AlignableExtras
*
* Original author: Andreas Mussgiller, August 2010
*
* $Date: 2010/09/10 10:26:20 $
* $Revision: 1.1 $
* (last update by $Author: mussgill $)
*/
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Utilities/interface/Exception.h"
// Geometry
#include "Geom... |
94b606770ddf6b582d804ed92c022f4d35891709 | c9c6c5e8bcc6cd4bac56090b92ebaf90a9b0c385 | ThePBone/ArduinoStuff | /libraries/ArduinoJson/src/ArduinoJson/JsonVariantComparisons.hpp | C++ | hpp | 4,472 | permissive | // ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2018
// MIT License
#pragma once
#include "Data/IsVariant.hpp"
#include "Data/JsonFloat.hpp"
#include "Data/JsonInteger.hpp"
#include "Polyfills/type_traits.hpp"
#include "Strings/StringTypes.hpp"
namespace ArduinoJson {
class JsonArray;
class JsonOb... |
f83c72a0621e224dc097ff7a40bb542760320213 | bddf880cc99c3d176f439a2a9d3ea70edaecb381 | kangyiS/ProtocolStack_test | /src/datalink_layer/ETHproto.cpp | C++ | cpp | 3,977 | no_license | #include <net/if.h> // if_nametoindex()
#include <linux/if_packet.h> // struct sockaddr_ll
#include <netinet/ip.h>
#include <netinet/ether.h>
#include "Print.h"
#include "ETHproto.h"
#include "HostBase.h"
#include "SockSend.h"
using namespace std;
CETHproto::CETHproto()
{
m_nic = "";
m_src_mac = "";
m_dst... |
5e420de0068640acaddd9bace0b3619e08263e00 | 8e9b80ecb7b897b6f2c7c68fc09a465cc8b99039 | agonsalihu/oRGB | /test/ConvertColorSpace_test.cpp | C++ | cpp | 15,289 | no_license | #include "ConvertColorSpace_test.hpp"
/**
* @brief Construct a new test f object for Image Set
*
*/
TEST_F(ConvertColorSpaceTest, SetImage)
{
cv::Mat img = cv::imread(getPath(), cv::IMREAD_COLOR);
EXPECT_TRUE(ccs.setImage(img));
}
/**
* @brief Construct a new test f object to Get Base Image
*
*/
... |
32c7e5bca19f66607dc1d70e3ca6f00499c1bbb9 | 30104013253fe0ac3850087d67b879eef97d8729 | chenvista/cppstudy | /queue/ring_queue/src/ring_queue.cpp | C++ | cpp | 381 | no_license | #include <iostream>
#include "MyQueue.h"
#include "Customer.h"
using namespace std;
int main(void)
{
MyQueue *p = new MyQueue(4);
Customer c1("ryan",30);
Customer c2("huqq",32);
Customer c3("qiao",33);
p -> EnQueue(c1);
p -> EnQueue(c2);
p -> EnQueue(c3);
p-> QueueTraverse();
Customer c4("",10... |
6de6e55a79713e40ac24dd1edc7f072b56b1dc2b | 8031d146119303d81a58d5f624c78e250276b7f8 | Javozz/UNSA-CS | /Semestre9/Bio/Practica1/mochila.cpp | C++ | cpp | 4,579 | no_license | #include <iostream>
#include "AlgoGen.h"
using namespace std;
vector<int> profits = {6,5,8,9,6,7,3};
vector<int> pesos = {2,3,6,7,5,9,4};
int pesoMaximo = 9;
bool sortFun(Cromosoma a, Cromosoma b){
return a.fit > b.fit;
}
Cromosoma getMayor(vector<Cromosoma> contrincantes){
Cromosoma res;
bool flag = false;
fo... |
e5fb7be61e5d5e7aca0ddc3cf655ecff954de78e | 88b2b70412a85fbbeeef4751facac1dc7c918e3c | aexol/AexolGL | /libraries/BaseLib/include/aex/Timer.hpp | C++ | hpp | 1,569 | permissive | /*
* File: Timer.hpp
* Author: mritke
*
* Created on November 15, 2013, 12:07 PM
*/
#ifndef TIMER_HPP
#define TIMER_HPP
#include <aex/Common.hpp>
#include <aex/ChronoClock.hpp>
#include <aex/Singleton.hpp>
#include <chrono>
#include <mutex>
namespace aex
{
class ChronoClock;
class AEX_PUBLIC_API Aex... |
2c9f32378014d5b41252d574c6e9d41477e9e46d | 6394a52ddd8bace0b42b36c1df0325cd65f0bc1d | Kokan/FALSEInterpreter | /Commands/GetVariableCommand.cpp | C++ | cpp | 425 | no_license | #include "GetVariableCommand.hpp"
#include <stdexcept>
GetVariableCommand::GetVariableCommand( const std::string &varName )
: variableName( varName ) {
}
GetVariableCommand::~GetVariableCommand() {
}
void GetVariableCommand::execute( MemoryInterface *global ) {
Object *value = global->get( variableName );
if ( ... |
cb1545f7c714615a65c2ad0f504be7515f08b5a3 | 0cdec1069dbe3f0890bfe46d755293c84dc057e8 | agrum/cs543 | /main.cpp | C++ | cpp | 566 | no_license | /*
* main.cpp
*
* Created on: Nov 14, 2012
* Author: agrum
*/
#include <QtCore>
#include <QApplication>
#include "src/cNetwork.h"
#include "src/cr/cCR_CIC.h"
#include "src/cr/cCR_CIC_SLAP.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
//cMap map(1, 100, 10);
cMap map("Map_1_100_10.co... |
c1ede190120d9a3bd85e489fe40dd607878f315e | ee8e8125bb5635285d7cca5ea2fa5084dc8f9beb | welflau/creepycrawlies | /src/main.cpp | C++ | cpp | 2,625 | no_license |
#include <AutoHGE.hpp>
#include <GameStateStack.hpp>
#include <hge.h>
#include <CreatureEditorGameState.hpp>
#include <vld.h>
float CREATURE_UPDATE_DT = 1.0f/500.0f;
float CREATURE_OPCODE_TICK_DT = 2.0f/256.0f;
hgeFont * font = NULL;
hgeFont * fontBig = NULL;
HTEXTURE texSprites = NULL;
static... |
7ecb3a599db74a44cdede4d59f782387e28eb70b | e4139cfec360b568486b45484343b6cfeb55a856 | ytz12345/2019_ICPC_Trainings | /Opentrains_Contest/10275/C.cpp | C++ | cpp | 2,508 | no_license | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
inline void ask(int i, int j) {
printf("? %d %d\n", i, j);
fflush(stdout);
}
struct node {
int cmp_l, cmp_r, cmp_sma;
int from_l, from_r;
}a[N];
int cnt, pos[N], pos_t[N];
char str[5];
void work(int *c, int n) {
int last = cnt;
for (int i = 1... |
bd2dd61d77acf85ad4984a0f3e2657b42c2a092d | 3770473a5ef14a67284dcfc490a14a8b99068f02 | quabqi/Vulkan-Hpp | /RAII_Samples/15_DrawCube/15_DrawCube.cpp | C++ | cpp | 9,349 | permissive | // Copyright(c) 2019, NVIDIA CORPORATION. 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 b... |
b15ab8d5bc11a47068f172aa2851116daea58e94 | 89ceb118d54817a66a83ed72124aac81d58b82c9 | cosminvoicu/LearnAlgoritms | /nrPalindorm.cpp | C++ | cpp | 502 | no_license | #include<iostream>
using namespace std;
int inv(int a) {
int inversA = 0;
while (a) {
inversA*=10;
inversA+=a%10;
a/=10;
}
return inversA;
}
int ePalindrom(int a) {
if (a == inv(a)) {
return 1;
} else {
return 0;
}
}
int nrPal (int a, int b) {
int... |
fa81f1307447fb3aa14cce4670cc01c6e3448c84 | 8148f0dc36608d2598124c77eeed05b0534de9c2 | k-sukharev/made-algo-fall-2019 | /hw03/6_1/main.cpp | C++ | cpp | 4,319 | no_license | /* Выведите элементы в порядке pre-order (сверху вниз)
Дано число N < 10^6 и последовательность целых чисел из [-2^31..2^31] длиной N.
Требуется построить бинарное дерево, заданное наивным порядком вставки.
Т.е., при добавлении очередного числа K в дерево с корнем root, если root→Key ≤ K,
то узел K добавляется в право... |
ea088da1803803908658219a0d777b5f88c9c977 | e4bc509213a648b8bcc01188ce35117f08b4eceb | lukedeo/AGILEPack | /yaml-cpp/boost_mod/type_traits/has_greater.hpp | C++ | hpp | 1,844 | no_license | // (C) Copyright 2009-2011 Frederic Bron.
//
// Use, modification and distribution are subject to 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).
//
// See http://www.boost.org/libs/type_traits for most recent version including... |
e784db23b78277249be628a4ac1c33dd50f058b5 | 6c05294653a9892422337939251247f6f60fe6b6 | yarsanich/divi-coin | /src/qt/moc_optionsmodel.cpp | C++ | cpp | 6,318 | permissive | /****************************************************************************
** Meta object code from reading C++ file 'optionsmodel.h'
**
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "qt/optionsmodel.h"
#include <Qt... |
6152e1f4a2a591216cf8aa2828bbb7b5ed675c44 | 65f5bc2362f689df765cf352de4141a3467daa2e | larryScott/hiphop-php | /src/runtime/base/server/http_request_handler.cpp | C++ | cpp | 15,083 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
+---------... |
cd4155d4c0bb5382257d5163e91ada40bfe016e9 | 089ea3dc850979371d13c976c6473d62cfcf45c9 | larics/morus_uav_gazebo | /morus_gazebo/plugins/battery_status/batteryStatus.cpp | C++ | cpp | 3,265 | no_license | #include <morus_gazebo/batteryStatus.h>
#include <string>
using namespace gazebo;
BatteryStatus::BatteryStatus()
{
}
BatteryStatus::~BatteryStatus()
{
event::Events::DisconnectWorldUpdateBegin(this->updateConnection);
if (this->rosnode_)
{
this->rosnode_->shutdown();
}
delete this->ro... |
c85ed7b076936b8f0aad63a2cd8e6b1087cb6291 | 15c7722b17af7cfef1f3b27ce182dede3d8ac01c | visimulator/Win32xx | /samples/CommonDialogs/src/StdAfx.cpp | C++ | cpp | 735 | no_license | /* (28-Aug-2016) [Tab/Indent: 8/8][Line/Box: 80/74] (StdAfx.cpp) *
********************************************************************************
Contents Description: Standard declarations implementation File. This
file is used for precompiled headers. Precompiled headers allow
progra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.