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 |
|---|---|---|---|---|---|---|---|---|
201248c730773a28addf93161a6c78aadaf97caa | d3ca16638b55e09869d507f96eb52d4093108305 | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function13987/function13987_schedule_1/function13987_schedule_1_wrapper.cpp | C++ | cpp | 854 | no_license | #include "Halide.h"
#include "function13987_schedule_1_wrapper.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>
#include <time.h>
#include <fstream>
#include <chrono>
#define MAX_RAND 200
int main(int, char **){Halide::Buffer<int32_t> buf0(256, 512, 256);
init_buffer(buf0, (int32_t)0);
... |
60f9be01bc1a8cf4aba448ea703c108f3f434b4a | 36f5df552bd23a648bc190290cd643f631e3e338 | boundaryfree/skia | /experimental/graphite/src/TextureProxy.cpp | C++ | cpp | 876 | permissive | /*
* Copyright 2021 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "experimental/graphite/src/TextureProxy.h"
#include "experimental/graphite/src/ResourceProvider.h"
#include "experimental/graphite/src/Texture.h"
namespace skgpu {
... |
69e2fe22c9fe1be71f65171b15a45b1c633216ae | 824b8116d2968b6d7814368169251c2fdd3534f3 | fredwbacon/OpenVSP | /src/geom_core/Vehicle.cpp | C++ | cpp | 90,985 | permissive | //
// This file is released under the terms of the NASA Open Source Agreement (NOSA)
// version 1.3 as detailed in the LICENSE file which accompanies this software.
//
//
//////////////////////////////////////////////////////////////////////
#include "Vehicle.h"
#include "PodGeom.h"
#include "FuselageGeom.h"
#include ... |
afb7d50c20a58944c1e419fe640f7f9d01247008 | 56ea89bb7313e0b87d0335fad05de45c499ed170 | Yukariko/algospot | /DRAGON.cpp | C++ | cpp | 684 | no_license | #include <iostream>
#include <cstring>
#include <vector>
using namespace std;
const char *str[] = {
"+FX","+YF","-FX","-YF"
};
const int next_to[2][4] = {
{0,0,2,2},
{1,3,1,3}
};
char bit[32];
int solve(int pos, int state)
{
if(pos < 0)
return state;
return solve(pos-1, next_to[bit[pos]][state]);
}
int mai... |
7928800541bdeb98b6d047db07c26a9f4fbc8eba | 137fa90aa405ad1fe007ce4ab757f53f299931f6 | wangyiyun/Catmull-Clark-subdivision | /src/math/matrix4d.cpp | C++ | cpp | 17,184 | no_license | #include <memory.h>
#include <math.h>
#include "vect3d.h"
#include "vect4d.h"
#include "matrix4d.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
//constructor
Matrix4d::Matrix4d(float m0,float m1,float m2,float m3,
float m4,float m5,float m6,float m7,
float m8,float m9,float m10,fl... |
f0d0bb27e502d87ba31dc6c191f5ecc8da8076ce | b51de668f7b8bfe95a47b9275c523be0a026d67b | madurodev/maduro-source | /src/qt/bitcoinstrings.cpp | C++ | cpp | 13,112 | permissive | #include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *bitcoin_strings[] = {QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"%s, you must set a rpcpa... |
2192e9b1993e302cab0218efdf189f7a69b27787 | 47346d844e9b2fa2eda9484db1b68d6cb263a015 | SNU-ARC/google-research | /scann/scann/partitioning/kmeans_tree_partitioner.cc | C++ | cc | 33,836 | permissive | // Copyright 2021 The Google Research 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... |
4783f0363b2c88f4e86b92931a6575c8202004ef | 8b0ff3bf07081d19d5b3b0572d02b62920b9382a | mxmz/json-cpp-lib | /jsonlib/examples/v4/jsonreadwrite.cpp | C++ | cpp | 1,982 | no_license | #include <iostream>
using namespace std;
#include "mxmz/json/v4/json_std.hxx"
using namespace mxmz::json::v4::std;
using namespace mxmz::json::v4::util;
void slurp( ::std::istream& in, std::string& data );
::std::string slurp( ::std::istream& in );
template < class D, class C >
typename mxmz::json::v4::json_valu... |
b8f8f8403e24e3801aad278903af60fc1356b018 | 1b9c073df726366ebb45bb3446ad6e120313b847 | sramos30/connectedhomeip | /src/controller/java/CHIPDeviceController-JNI.cpp | C++ | cpp | 18,389 | permissive | /*
* Copyright (c) 2020-2021 Project CHIP 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... |
e9f5eeee2f7dfeb60ec02ee72473cbdb007780d3 | fd9a4b59d3271f5042c281031b8f8861f7953be5 | ArtemGen/xray-oxygen | /code/engine.vc2008/xrRender/xrRender/NvTriStrip.cpp | C++ | cpp | 13,217 | permissive | #include "stdafx.h"
#include "NvTriStripObjects.h"
#include "NvTriStrip.h"
#pragma warning(disable:4018)
////////////////////////////////////////////////////////////////////////////////////////
//private data
static unsigned int cacheSize = CACHESIZE_GEFORCE3;
static bool bStitchStrips = true;
static unsigned int minS... |
749b9fac246e73293a9562e9bcd44b727a3668e1 | b25921f8d41937b241173ddbb0bb1eafe4600177 | ZhenYangIACAS/boost-doc-zh | /libs/spirit/example/scheme/qi/qiexpr_generator.hpp | C++ | hpp | 6,127 | permissive | // Copyright (c) 2001-2010 Hartmut Kaiser
//
// 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)
#if !defined(BOOST_SPIRIT_QIEXPR_GENERATOR)
#define BOOST_SPIRIT_QIEXPR_GENERATOR
#include <string>
#inc... |
8701d5de4e1f618b95f01142f670d4a0658ebf03 | 14c5a9eb6a568887f504df34b4dcc139464f51ab | xGreat/CppNotes | /src/classes/class_destructor.hpp | C++ | hpp | 2,051 | permissive | #ifndef CLASS_DESTRUCTOR_HPP
#define CLASS_DESTRUCTOR_HPP
#include <iostream>
// ==== 1. Function and object destruction
// https://www.geeksforgeeks.org/playing-with-destructors-in-c/
int globalVariable;
class DestructingClass {
public:
~DestructingClass() {
std::cout << "Destructor of DestructingClass... |
076342f5f6f371198e477ba7803c5b2ac57cc3f8 | a157ead02ce3995472ae94073c01045c3c0da994 | caicaiaaaa/bao | /校门外的树.cpp | C++ | cpp | 572 | no_license | //用true标记,不需要计算,最后统计即可
#include <stdio.h>
int main()
{
int L, i, j, n;
bool trees[10001];
for(i = 0; i < 10001; i++)
trees[i] = true; //初始化每一棵树都为true
scanf("%d%d",&L,&n);
for(i = 0; i < n; i++)
{
int begin, end;
scanf("%d%d", &begin, &end);
for(j = begin; j <= e... |
8b5a8f7834019493915a8fc4fb60dbedeb600d15 | 25d58d58aa42a62685563eff1f639ad0d9e79200 | msharsha555/CSN-212 | /Assignment4/quick_hull.cpp | C++ | cpp | 2,726 | no_license | #include <bits/stdc++.h>
using namespace std;
struct mypoint
{
int x, y;
};
bool Compare(mypoint a, mypoint b)
{
return (a.x<b.x);
}
int Orient(mypoint p, mypoint q, mypoint r)
{
return (q.y - p.y)*(r.x - q.x)-(q.x - p.x)*(r.y - q.y);
}
void PartialHull(vector<mypoint> &arr, vector<mypo... |
0fa2567371a149528a09c7145d17f839eb8b33e8 | 7d9f24120fb36f72a39eb9c7ac8b6564748cf579 | lavandalia/babes-info-romana | /Programare orientata pe obiect/Programare orientata obiect/laburi oop/lab6/Lab6/customer.cpp | C++ | cpp | 1,209 | no_license | #include "customer.h"
#include <cstring>
Customer::~Customer(){
delete[] address;
}
Customer::Customer(char* paddress,int pphone){
address = new char[strlen(paddress)+1];
strcpy(address,paddress);
phone=pphone;
}
Customer::Customer(const Customer& from){
address = new char[strlen(from.address)+1];
strcpy(addr... |
566ed5793c9761ad74117bb5db71f67ff3af328f | b0a723c7ca08122292465537f889991853cde574 | naveenmahadevuni/incubator-trafodion | /core/conn/unixodbc/odbc/Common/swap.cpp | C++ | cpp | 5,625 | permissive | // @@@ START COPYRIGHT @@@
//
// (C) Copyright 2003-2014 Hewlett-Packard Development Company, L.P.
//
// 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/lice... |
a76485d4c6809348074d572196fba171a89dd458 | e34ea6f7e01dbe114943f40bf31745d3e6e7a3cf | anylee2021/xo | /xo/Base/Queue.cpp | C++ | cpp | 2,860 | permissive | #include "pch.h"
#include "Queue.h"
#include "Asserts.h"
#include "../Defs.h"
namespace xo {
Queue::Queue() {
}
Queue::~Queue() {
free(Buffer);
}
void Queue::Initialize(bool useSemaphore, size_t itemSize) {
XO_ASSERT(SizeInternal() == 0);
if (itemSize != ItemSize) {
XO_ASSERT(ItemSize == 0);
XO_ASSERT(itemSi... |
17e1af04ddb9e9cc678fdf2557fe6dd861442705 | 924713ab985e06aa58b1a302907ae6ae3ae7fe60 | varsill/drejkii | /LinkedList.cpp | C++ | cpp | 892 | no_license | #include "Graph.h"
#include <iostream>
void add(LinkedList& list, Edge edge)
{
LinkedListNode* buf = list.head;
list.head = new LinkedListNode;
list.head->value = edge;
list.head->next = buf;
}
LinkedListNode* find(LinkedList& list,Edge edge)
{
LinkedListNode* i = list.head;
while (i != nullptr)
{
if (i->valu... |
ce276b05a95ec908a49c1b67a0bb1e8b9f993902 | c94c9aa17866294971e0ed30390c7aa25bbd26fa | jlujan/SMU-CSE5382 | /engine/GameEngine/SimpleGame.cpp | C++ | cpp | 2,350 | no_license | //
// SimpleGame.cpp
// GameEngine
//
// Created by David Lively on 2/3/16.
// Copyright © 2016 David Lively. All rights reserved.
//
#include <vector>
#include <iostream>
using namespace std;
#include "SimpleGame.h"
#include "Mesh.h"
#include "Material.h"
#include "Files.h"
bool Simpl... |
7bef65d372959a75dd210fcf0860695d5f0d4a64 | 83f7a1a949fd5e73cf2b42defc88a012f963b280 | jonntd/gpexport | /include/skeleton.hpp | C++ | hpp | 684 | permissive | /*
* 2004/06/27
* Florian Loitsch
*
* data-structures Skeletons.
*/
#ifndef ___HPP_GPEXPORT_SKELETON
#define ___HPP_GPEXPORT_SKELETON
#include <maya/MMatrix.h>
#include <vector>
#include <string>
namespace GPTranslation
{
struct JointNode
{
std::string name;
std::vector<Join... |
16adf2f241cf2673ca671e13a40cf7d5dde3d5df | 535e26145ba5f074f5e722b521f9a8ad352040ed | chromium/chromium | /base/tracing/perfetto_platform.cc | C++ | cc | 3,884 | permissive | // Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/tracing/perfetto_platform.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/deferred_sequenced_task_ru... |
1a20745e0a38c19d6daa9005dc0e12fb97fe6ca4 | 0e4ba996bc120b7d7e66345fa492fbb75ec80648 | Exchizz/Bachelor_at90can128_firmware | /scheduler.cpp | C++ | cpp | 1,579 | no_license | /*
* scheduler.cpp
*
* Created on: May 10, 2016
* Author: Mathias Neerup
*/
#include "scheduler.h"
Task tasks[MAX_TASKS];
uint8_t task_counter = 0;
uint8_t current_task = 0;
void scheduler_init(){
for(int i = 0; i < MAX_TASKS; i++){
Task task;
tasks[i] = task;
tasks[i].task_state = ST_TASK_NOT_INIT... |
026222bdf0c933df30b7a2269ea0c4cc7a1d64da | add9d9d291b73e7d5dcbf44473243eb87b6a138c | dkirschl/CS307Project | /CS307UPLOAD/bla/old/old3/old/old2/databaseInterface.cpp | C++ | cpp | 4,969 | no_license | //DATABASE INTERFACE CODE
#include "tbinclude.h"
//INPUT: slaveSocket, password, name, alias, age, gender, description
//IDEA: Accept input and create a user based on provided info.
//OUTPUT: Write confirmation back to user if successful.
//RETURN: NONE
void dataCreateUser(int slaveSocket,char * password, char * na... |
ece51eef0952e7625bc3211dbe9fdfbbff050fb8 | 8ce3cd95aa4e07fe2a0368d634769eada4479f48 | intel/compute-samples | /compute_samples/applications/subgroups_visualization_tutorial/include/subgroups_visualization/subgroups_visualization.hpp | C++ | hpp | 961 | permissive | /*
* Copyright (C) 2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#ifndef COMPUTE_SAMPLES_SUBGROUPS_VISUALIZATION_HPP
#define COMPUTE_SAMPLES_SUBGROUPS_VISUALIZATION_HPP
#include <vector>
#include <boost/compute/core.hpp>
#include "application/application.hpp"
namespace compute_samples {
class ... |
e8c1fa93dacad63e10fe6a247c4202440f6c9096 | 9c0787579709901c2d69bc0fc01117802c7e5f92 | sold666/Labworks | /Lab-7/MyString.cpp | C++ | cpp | 4,187 | no_license | #include "MyString.h"
MyString::MyString()
{
size_ = 0;
str_ = nullptr;
}
MyString::MyString(const char* string)
{
this->size_ = strlen(string);
this->str_ = new char[size_ + 1];
for (int i = 0; i < size_; i++)
{
this->str_[i] = string[i];
}
this->str_[this->size_] = '\0';
}
MyString::M... |
8f3daedfad7c271a26eaaf11554eff58409b41f7 | 89343b496a9d508bf3b8af299848d97204a05d59 | MarqusJonsson/bgfx | /3rdparty/spirv-tools/source/fuzz/transformation_replace_id_with_synonym.cpp | C++ | cpp | 7,302 | permissive | // Copyright (c) 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
2c97f1d48fb2479006520a261bdefe0f7f8a90b1 | c51ddd93e4b0f7bb12183b7a179f52b794551b8a | aguinet/Triton | /src/tracer/pin/snapshot.cpp | C++ | cpp | 5,663 | no_license | //! \file
/*
** Copyright (C) - Triton
**
** This program is under the terms of the BSD License.
*/
#include <iostream>
#include "snapshot.hpp"
/*! \page Snapshot_page Snapshot
\brief [**pintool internal**] All information about the snapshot engine.
\tableofcontents
\section snapshot_description Description
... |
8d75da2126099cd77bc1d5a957507a21a357fcb3 | be122cccc7234314ba2ebc8a03350b4834128ccd | AmesianX/SHZPublicDev | /Develop/Server/GameServerOck/main/GCmdHandler_Master_Loot.cpp | C++ | cpp | 2,076 | no_license | #include "StdAfx.h"
#include "GCmdHandler_Master_Loot.h"
#include "CCommandTable_Master.h"
#include "CTransData.h"
#include "GGlobal.h"
#include "GLootSystem.h"
#include "GLootSystemForMasterServer.h"
GCmdHandler_Master_Loot::GCmdHandler_Master_Loot(MCommandCommunicator* pCC) : MCommandHandler(pCC)
{
SetC... |
f1854e2dccfcbd9c7c5d369f924c31764e7a3b1b | 2a5c72161e46c0d309274b3b0094c6f29ea6be65 | intel/llvm | /sycl/test-e2e/KernelAndProgram/undefined-symbol.cpp | C++ | cpp | 1,813 | permissive | // for CUDA and HIP the failure happens at compile time, not during runtime
// UNSUPPORTED: cuda || hip
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
//==--- undefined-symbol.cpp - Error handling for undefined device symbol --==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions... |
5d8dbcc2d03f6a453f32ec80ad6ebd94da9613ee | 13fb5d379480d5e5154345677384e5e7ad70e1dd | 107-systems/107-Arduino-BoostUnits | /src/boost/smart_ptr/detail/sp_counted_base_sync.hpp | C++ | hpp | 3,326 | permissive | #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED
#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// detail/sp_counted_base_sync.hpp - g++ 4.1+ __sync intrinsics
//
// Co... |
c4e7e2ebd8f906bcbd8874f2734f7a5bbd165dd5 | 8157537343677972d532848d7693fd3cf630a2d7 | SirasornT/Hero-Invaders | /shooter/test/model_test.cpp | C++ | cpp | 4,405 | no_license | #include "model.h"
#include <catch.h>
#include <math.h>
//Check that the horizontal velocity of all alive heroes are increased when a hero has been killed
TEST_CASE("Hero moves faster when one hero dies"){
Geometry geometry;
Model m(geometry);
Hero hero1;
hero1.x = 300;
hero1.y = 300;
hero1.wi... |
e102c2acb3108c47d7c31a8dd2b4631758435c8f | cbe1dbb867f79bf8de3cd82d4100642533153ca6 | TheHolyBell/RedneckEngine | /RedneckEngine/IndexBuffer.cpp | C++ | cpp | 1,492 | permissive | #include "IndexBuffer.h"
#include "GraphicsThrowMacros.h"
#include "BindableCodex.h"
namespace Bind
{
IndexBuffer::IndexBuffer(Graphics& gfx, const std::vector<unsigned short>& indices)
:
IndexBuffer(gfx, "?", indices)
{}
IndexBuffer::IndexBuffer(Graphics& gfx, std::string tag, const std::vector<unsigned short>... |
801e76b26212088d7b20eb5fb82f21ee6351842c | 17f9fb43f822cd7efc0bc1492b7472a34b9c769b | thevivs/leet107_algosims2016 | /Week03/w03_h03_problem_C/src/Particles.hpp | C++ | hpp | 483 | no_license | //
// Particles.hpp
// w03_h03_problem_C
//
// Created by Vivian Lee on 9/22/16.
//
//
#pragma once
#include "ofMain.h"
class MyParticles{
public:
// MyParticles();
void draw();
void setup();
void update();
void bounding();
ofPoint pos;
ofPoint vel;
floa... |
6c525904c6c7d1d96e87589d134e1f3a558fd348 | 9ccc2c07534de86492c6ccb095f2d52113d17702 | jobediah/SchoolProjects | /jobediah_project/subclassBluemen.cpp | C++ | cpp | 1,148 | no_license | /*************************************************************
* Author: Jody Hansen
* Date created: 08-24-2014
* Last modified: 08-28-2014
* Filename: subclassBluemen.cpp
*
* Overview: This program simulates a combat scene between two fighters.
* Input: Choice of fighters.
* Outp... |
c54f5e450f5aee46e06039188cbfe33dc4e72758 | 3c900c502955dc63522766b8f70ad02dbf35b443 | manisha884/TechRel-Classes | /Compound Interest55.cpp | C++ | cpp | 645 | no_license | #include<iostream>
#include<math.h>
using namespace std;
int main()
{
float p,r,t,cp,ci;
cout << "\n\n Calculate the Compound Interest :\n";
cout<<" Input the Principle: ";
cin>>p;
cout<<" Input the Rate of Interest: ";
cin>>r;
cout<<" Input the Time: ";
cin>>t;
ci=p*pow((1+r/100),t)-... |
0aa67f17688da27a2d4502a4ef0a9285bef2613a | 8a54adda565a806aac29a7e2da7114bb860d8ac9 | xenerizes/cmc_msu_cpp_course | /problem3/src/IProduct.cpp | C++ | cpp | 1,374 | no_license | #include <algorithm>
#include "IProduct.h"
IProduct::IProduct(const std::string& name, double p) noexcept
: _sales(false)
, _name(name)
, _price(p)
{ }
IProduct::~IProduct()
{
StopSales();
}
double IProduct::GetPrice() const { return _price; }
std::string IProduct::GetName() const { return _name; }
... |
8933e517fe24dbf053c0d5d365a76c89bf8e3c8f | 2db6b59f85f128210101af77a698aab8d54a1079 | Martinkolevbg/CompetitivePrograming | /f87992_4b.cpp | C++ | cpp | 952 | no_license | // Martin Kolev - f87992 & Petar Dudov - f88232
#include <iostream>
#include <set>
#include <stdlib.h>
#include <cstdlib>
using namespace std;
int main()
{
unsigned b;
std::set<unsigned long long> val;
std::set<unsigned long long>::iterator it;
while(cin >> b)
{
srand(b);
... |
17f078b4832a9334352a43d702adf698e2881a81 | f400ece3c38ea6a726f752fb2144f1bac95e8988 | 15831944/vno | /send/main.cpp | C++ | cpp | 897 | no_license | #include "stdafx.h"
#include "CADHelper.h"
#include "ThreadHelper.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
CWinApp theApp;
using namespace std;
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
int nRetCode = 0;
// 初始化 MFC 并在失败时显示错误
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
... |
4f0da598ff11779af83e767bc60d1b77ede41075 | c2baa8a80c08bcf6f56c6bf69c06806ed86a5f04 | pombreda/tms | /src/common/protocol/message/write_records_request.hpp | C++ | hpp | 446 | no_license | #ifndef _TMS_COMMON_PROTOCOL_MESSAGE__WRITE_RECORDS_REQUEST_HPP_
#define _TMS_COMMON_PROTOCOL_MESSAGE__WRITE_RECORDS_REQUEST_HPP_
#include <protocol/message/write_records_request.pb.h>
// boost
#include <boost/shared_ptr.hpp>
namespace tms {
namespace common {
namespace protocol {
namespace message {
typedef boost::sha... |
137756f33cd652731f9783882f64528d4c3a6046 | 31fd594cfeee827a498b9b0238d138ce939bcc1b | SamRuckley/Temp | /main.cpp | C++ | cpp | 2,798 | no_license | /////////////////////////////////////////////////////////////////////////
// Includes
/////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <string>
#include "Players.h"
#include "BattleshipGame.h"
#include "UserInput.h"
const int MainMenuOptionCount = 1; /... |
33b310d15f4598361865031e7df926b75a1b4c4e | fa9819f77278fc4110e379d852ede8e11834be68 | beauby/folly | /folly/experimental/coro/test/CoroBenchmarkAllocator.cpp | C++ | cpp | 8,628 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... |
12096f191ff7cc30cb9374ae6b8fa7e3559c9a34 | fcb4416e9475e7ed4dc43875d6be6f164e9238c7 | tomzhang/Birch | /driver/src/statement/ExpressionStatement.cpp | C++ | cpp | 623 | permissive | /**
* @file
*/
#include "src/statement/ExpressionStatement.hpp"
#include "src/visitor/all.hpp"
birch::ExpressionStatement::ExpressionStatement(Expression* single,
Location* loc) :
Statement(loc),
Single<Expression>(single) {
//
}
birch::ExpressionStatement::~ExpressionStatement() {
//
}
birch::Sta... |
7a5ffb84d59055ffc07a5808e9f52c7178ed8254 | ebb7f7ffa8f7c9128fd21350ec8604a264d3ec6e | LeBenHL/CS184FinalProject | /main.cpp | C++ | cpp | 27,421 | permissive |
#include <vector>
#include <queue>
#include <sstream>
#include <iostream>
#include <fstream>
#include <cmath>
#include <string>
#include <limits>
#ifdef _WIN32
#include <windows.h>
#else
#include <sys/time.h>
#endif
#ifdef OSX
#include <GLUT/glut.h>
#include <OpenGL/glu.h>
#else
#include <GL/glut... |
7358b62d13bfab04065a1450798ba22b7f4033aa | e8a3088961f4730a3d6fa8b7bce5333e8b71ff8b | harrypotter0/algorithm | /leetcode/max-points-on-a-line.cpp | C++ | cpp | 2,713 | no_license | // idea is easy, implementation is hard, need to practice again
#include <limits>
#include "leetcode.h"
struct Point {
int x;
int y;
Point() : x(0), y(0) {}
Point(int a, int b) : x(a), y(b) {}
friend bool operator == (const Point &lhs, const Point & rhs);
};
bool operator == (const Point &lhs, con... |
cc873f13c20d636a7702e209667957261cf4bb70 | 4133e3824ce46a431834ee5eba62d8cc337bcd6e | iwtbam/leetcode | /code/lt1451.cpp | C++ | cpp | 1,001 | no_license | // https://leetcode-cn.com/problems/rearrange-words-in-a-sentence/
// rearrange words in a sentence
class Solution {
public:
string arrangeWords(string text) {
int start = 0;
size_t size = text.size();
vector<pair<int, int>> words;
text[0] = text[0] - 'A' + 'a';
for(int i = 0... |
7a2d6d1df2d6f2fedaac55deedf40e1be106f4b9 | 2632320a793f782776b84cc0332b36b7815e35fc | noesmoral/EEDD | /Practica 1/main.cpp | C++ | cpp | 5,709 | no_license | #include<stdlib.h>
#include<stdio.h>
#include<time.h>
#include<conio.h>
#include<string>
#include "Cola.h"
#include "ColaTelesilla.h"
#include "Esquiador.h"
#include <iostream>
#include <ctime>
using namespace std;
//Declaracion Gobal de las colas para evitar errores en las ejecuciones de las funciones
//creamos l... |
4ca3613cfa2b55b039f939d80a56a292469e1d25 | 92f3fade9e20616d39499ecbfb1fad7b5c00990f | Asratec/VSidoConnServer | /test/VSidoCommand/parser_servoInfo_request.cpp | C++ | cpp | 3,581 | permissive | /*
Copyright (c) 2015, Asratec Corp.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following ... |
7079356db5566814aa5a334b54c800533bc55ac3 | 63dfa57f4c7f6ef1c496bf1d80b791ebb017ef70 | ayush8799/cp-templates | /CSES-ProblemSet/removingDigits.cpp | C++ | cpp | 918 | no_license | #include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define vvi vector<vector<int>>
#define vpii vector<pair<int, int>>
#define pb push_back
#define ff first
#define ss second
#define pii pair<int, int>
#define int long long int
#define el "\n"
#define inf INT_MAX
#define _inf INT_MIN
#define whilet i... |
e9eb57467f66a593b0f5b37d8fc6cc73e56d5066 | 1e162d6008ff636cceefa95dfd8316ea2d2e94b5 | liyoung1992/mediasoup-sfu-cpp | /deps/boost/include/boost/fiber/exceptions.hpp | C++ | hpp | 3,500 | permissive | //
// Copyright Oliver Kowalke 2013.
// 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)
// based on boost.thread
#ifndef BOOST_fiber_errorS_H
#define BOOST_fiber_errorS_H
#include ... |
e8ed097e9b85ea7907a7e828e0b3bf405a2fa0ae | 1aba8d2697b402eb2ec27918d316dfaf94223ded | IngRyabikova/Flat | /main.cpp | C++ | cpp | 19,268 | no_license | #include "TXLib.h"
#include "Lib/Bed.cpp"
#include "Lib/Button.cpp"
#include "Lib/Files.cpp"
#include <fstream>
#include <iostream>
using namespace std;
///рисование области выбора картинки
void drawObl(HDC Krestik)
{
txSetColor(TX_ORANGE);
txSetFillColor(TX_WHITE);
txRectangle(1100, 60, 130... |
d9526b78e8eaaf2e040980e89c30f30c2102fc45 | 638b6f44cd6b25e282c1b9c02aa0841220d77735 | cloudchainblockchain/cloudcoin | /src/qt/askpassphrasedialog.cpp | C++ | cpp | 10,377 | permissive | // Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
#endif
#include "askpassphrasedialog.h"
#include "ui_askpassph... |
ce99022e4b5690c406005f9601b2895c347e68d6 | c8534f10a48b292787026d3677405a46d4197f74 | YuriyRusinov/reper | /io_client/openreport/kksorpcommon/parameterproperties.cpp | C++ | cpp | 8,432 | no_license | /*
* OpenRPT report writer and rendering engine
* Copyright (C) 2001-2011 by OpenMFG, LLC
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or ... |
38a292f75c507aa0ea084aeec4703d484b7ad6e3 | ba8eca279aeab08fe558710a6f488016491ae89e | MartysRepos/CSCI3110 | /OLA4/OLA4/algorithm.cpp | C++ | cpp | 6,326 | no_license | //Martavious Dorsey
//Due Date: 10/24/16
//Description: Implementation of the different sorting algorithms
#include "algorithm.h"
#include <iostream>
using namespace std;
// ---------------------------------------------------
// Sorts the items in an array into ascending order.
// Precondition: theArray is an array... |
dc6e7ee54a47e2bcebcb47251539eb3d5fb6ec7d | ed74f94521420b6b8619828fe763e7eab186b13a | libla/Phoenix3D | /Phoenix3D/PX2AppFrame/PX2ApplicationBase.cpp | C++ | cpp | 3,799 | no_license | // PX2ApplicationBase.cpp
#include "PX2ApplicationBase.hpp"
#include "PX2EngineLoop.hpp"
#include "PX2Project.hpp"
#include "PX2PluginManager.hpp"
using namespace PX2;
//----------------------------------------------------------------------------
bool ApplicationBase::msIsInitlized = false;
ApplicationBase::AppInitli... |
746483ab060bcf9065c30ae72e8e4c1a12021504 | c40a93c7f206663467f9814bf8b2d7e4d244cf6b | ventz-lgtm/Yr2VehicleProject | /enc_temp_folder/d412dcdc5c1c3dde141967b4efc0b64/BTSteeringService.cpp | C++ | cpp | 11,395 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "BTSteeringService.h"
#include <EngineUtils.h>
#include <BehaviorTree/BlackboardComponent.h>
#include "VehicleTemplatePawn.h"
#include "AIWheeledVehicleController.h"
#include <BehaviorTree/BlackboardComponent.h>
#include <BehaviorT... |
0f713c28e0c808d9936161a05b2820e9cc44847d | f999d52416d990c862d4e35304e87044e2b669b8 | feserr/CrossEngine | /Pong/src/main.cpp | C++ | cpp | 333 | permissive | /*
* Copyright 2020 Elías Serrano. All rights reserved.
* License: https://github.com/feserr/crossengine#license
*/
#include <crossengine/bgfx_utils.h>
#include <crossengine/common.h>
#include <crossengine/i_main_game.h>
#include "app.h"
int _main_(int _argc, char** _argv) {
App app;
app.Run(_argc, _argv);
... |
02615211d95de3fba806c71bf1eaff379fa94829 | b2b3394f2ceafef7b3945c8e1e0d66a4777d20fb | jmosborne/Chaste | /cell_based/src/writers/AbstractCellBasedWriter.cpp | C++ | cpp | 3,699 | permissive | /*
Copyright (c) 2005-2021, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
51225465df4c1a9899b1c68205f6f67f1197a3b2 | 0f5e665e8a7626e319d8a1c082548f54273778de | digint/openmptl-reg-arm-cortex | /arm/cortex/Spansion/MB9AFA3xN/include/arch/reg/hdmicec0.hpp | C++ | hpp | 10,345 | no_license | /*
* OpenMPTL - C++ Microprocessor Template Library
*
* This program is a derivative representation of a CMSIS System View
* Description (SVD) file, and is subject to the corresponding license
* (see "License.txt" in the parent directory).
*
* This program is distributed in the hope that it will be useful,
* bu... |
1b8852da6e6a63a37d29b34f85b339864d156daf | f55222fa2c150e9ccf77a559817873b288b84752 | pchintalapudi/virtual-machine | /logues/oheap.cpp | C++ | cpp | 617 | no_license | #include "../memory/oheap.h"
using namespace oops::memory;
void heap::destroy() {
this->allocator.destroy();
this->bootstrap_classloader.destroy();
this->native_references.clear();
this->scratch.clear();
this->vm_executors.clear();
}
bool heap::initialize(const heap_options &options) {
if (this->alloca... |
ddc9ba9bc6c84dba3a5262434b7674bac3981692 | 47e76b5726f73e19dd4cd92acfcb775ee09f6510 | QwantResearch/text-translation | /src/utils.cpp | C++ | cpp | 2,360 | permissive | // Copyright 2019 Qwant Research. Licensed under the terms of the Apache 2.0
// license. See LICENSE in the project root.
#include "utils.h"
#include <iostream>
#include <sstream>
#include <regex>
// void Trim(std::string& s) {
// boost::trim_if(s, boost::is_any_of(" \t\n"));
// }
void Split(const std::string& lin... |
86390fec2c2d04a95d13bb02fef7d401d842fee4 | ed2d8478b0eb2b2402893303c5b4c8c01efb2294 | yanbai/leetcode | /703.kth-largest-element-in-a-stream.cpp | C++ | cpp | 779 | no_license | /*
* @lc app=leetcode id=703 lang=cpp
*
* [703] Kth Largest Element in a Stream
*/
// @lc code=start
class KthLargest {
public:
KthLargest(int k, vector<int>& nums) {
_k = k;
for(auto n: nums) {
minHeap.push(n);
if(minHeap.size()>_k)
minHeap... |
49aeb6c3300e05fa52bdfeb650270cc00b5d7933 | 2fff1b05482720f8b367a45116434aa2b62d02e4 | sajibreadd/Competitive-Programming-Algorithms | /new addition/number_of_component_in_complement_graph(653E).cpp | C++ | cpp | 7,147 | no_license | #include<bits/stdc++.h>
#include <cstring>
#include <iostream>
#define pie acos(-1)
#define si(a) scanf("%d",&a)
#define sii(a,b) scanf("%d %d",&a,&b)
#define siii(a,b,c) scanf("%d %d %d",&a,&b,&c)
#define sl(a) scanf("%lld",&a)
#define sll(a,b) scanf("%lld %lld",&a,&b)
#define slll(a,b,c) scanf("%lld %lld %lld",&a,&b,... |
652cbf934d7cfe84d2ee9b753c39656ccc3adc21 | 2627bb67a0a2ecb0086495e22704b214be633608 | pkuwangh/leetcode | /p071_simplify_path/simplify_path.cc | C++ | cc | 2,941 | no_license | /* Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path.
*
* In a UNIX-style file system, a period . refers to the current directory.
* Furthermore, a double period .. moves the directory up a level. For more information, see: Absolute path vs relative pat... |
102bb0855d6a38b27cf978549d06fd28734f539c | dd02caf80c9afac4828836f83a486b463b023aa2 | mokupnik/MIA | /Contest6/Problem-A/main.cpp | C++ | cpp | 765 | no_license | #include<iostream>
#include <cstdio>
using namespace std;
int main()
{
int n;
cin>>n;
int value;
int p[n];
int sums[n];
for(int i=0; i<n-1; i++)
{
cout<<"? "<<i+1<<" "<<n<<endl;
fflush(stdout);
cin>>sums[i];
}
for(int i=0; i<n-2; i++)
{
p[i] = ... |
cd971d932634fcc59ef74f61068a1d569a7d3eba | 243bb0328361696ba50320ca874d2e538adf4aab | KostyaVeresh/HomeWorkRepo | /Семестр 1/ДЗ 1/задача_5.cpp | C++ | cpp | 453 | no_license | #include <stdio.h>
int main()
{
const int m = 5, n = 3;
int a[m + n];
printf("%s%d%s", "Enter array of ", m + n, " numbers:\n");
for (int i = 0; i < m + n; ++i){
scanf("%d", &a[i]);
}
for (int i = 0; i < m; ++i) {
int t = a[0];
for (int j = 1; j < m + n; ++j) {
a[j - 1]=a[j];
}
a[m + n ... |
640104c7d8da1636613363bad3dd96a8c11ad14a | db937a8085361559eaac2be7e6b64d007684fca2 | mosesjlee/LearnSomeBasicSoundStuff | /LearnSomeBasicSoundStuff/DelayLine.hpp | C++ | hpp | 889 | no_license | //
// DelayLine.hpp
// LearnSomeBasicSoundStuff
//
// Created by Moses Lee on 1/27/16.
// Copyright © 2016 Moses Lee. All rights reserved.
//
#ifndef DelayLine_hpp
#define DelayLine_hpp
#include <stdio.h>
#include "AudioSpec.h"
#include "Utilities.hpp"
#define MAX_DELAY 4000 //Maximum amount of delay in millise... |
9e05ed6f4ba30d7f168e0ddc3c9971964060a25b | c09855c6346765a349d28b8c189aef8aa3fc98ae | novaquark/aws-sdk-cpp | /aws-cpp-sdk-pinpoint/source/model/CreateEmailTemplateRequest.cpp | C++ | cpp | 1,182 | permissive | /*
* Copyright 2010-2017 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" fil... |
52ef618ac30675931c77c7c01dff7b63760815d9 | 01ef818b74a4f1eb24717a492b5188693b684cd9 | samuelbohl/CP | /CF/196-DIV2-B.cpp | C++ | cpp | 787 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){
if(a<0)a=-a;
if(b<0)b=-b;
while(b!=0){
a%=b;
if(a==0)
return b;
b%=a;
}
return a;
}
void solve(){
ll a, b, c, d;
cin >> a >> b >> c >> d;
//scaling to the same size
ll p = a*d*b*d;
ll q = c*b*d*b;
//corn... |
6d2465235f41aaf297dc25b536407dd2b8b042d8 | 47bf9441b10bffcb4303cdb08174d85530a0bbc8 | waterflyfish/cmtTldApp | /src/communications/messagee/TrackedTargetMessage.cpp | C++ | cpp | 782 | no_license | /*
* TrackedTargetMessage.cpp
*
* Created on: Jan 25, 2017
* Author: patrick
*/
#include "TrackedTargetMessage.h"
namespace va {
TrackedTargetMessage::TrackedTargetMessage(string msgId, string loggerName, string targetId) :
StatusMessage(msgId, loggerName, targetId) {
#ifdef DEBUG_BUILD
LOG4CXX_DEBUG(l... |
5ae908e4807ee62868da8c3da16368988c415e58 | bc30ef4ae355225d1652cb5ee9f1c130649d6e79 | mhfan/blend2d | /src/blend2d/pipeline/jit/fetchgradientpart.cpp | C++ | cpp | 39,309 | permissive | // This file is part of Blend2D project <https://blend2d.com>
//
// See blend2d.h or LICENSE.md for license and copyright information
// SPDX-License-Identifier: Zlib
#include "../../api-build_p.h"
#if BL_TARGET_ARCH_X86 && !defined(BL_BUILD_NO_JIT)
#include "../../pipeline/jit/compoppart_p.h"
#include "../../pipelin... |
828cee12b8d0f4697bc3a19eb2b4509e9a8bb4b9 | 1788aca65c84c81623481f17dc7da3bfd6e6c751 | brilee/minigo | /cc/mcts_player.cc | C++ | cc | 12,534 | permissive | // Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
d80c49fe00f0086f34ef7ad643c8bf3e2dd92ddb | 8c9fe7612f871b187d9fcb2780fda35092c8427e | zach2good/atanua | /src/core/chip.cpp | C++ | cpp | 2,775 | permissive | /*
Atanua Real-Time Logic Simulator
Copyright (c) 2008-2014 Jari Komppa
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
in... |
640b8d01251b2bc41a70da0b81b3920cf7c15395 | 03028ee6bfc010b1b0d6ce4731d36b628fb96f74 | tapu1996/codetemplates | /slidingwindow_2D_array_max_SUM_SUBARRAY.cpp | C++ | cpp | 1,233 | no_license |
///time complexity o(n)
#include<bits/stdc++.h>
using namespace std;
main()
{
int n,m;
while(cin>>n){
m=n;
if(n==0 ) break;
int v[n+1][m+1];
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
cin>>v[i][j];
//if(v[i][j]==0)v[i][j]=1;
... |
d648d59e11c4ee746bb49b3c01064156b5fa42a3 | 6fd730b0048e150f18d2494a5231f681797e62bb | liulu1998/CGproject | /CurveCG/CurveCG/CurveCGView.cpp | C++ | cpp | 2,030 | no_license |
// CurveCGView.cpp: CCurveCGView 类的实现
//
#include "pch.h"
#include "framework.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "CurveCG.h"
#endif
#include "CurveCGDoc.h"
#include "CurveCGView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CCurveCGView
I... |
f4d23cddf4966eca169a8e2f2fb6faf64f21db66 | cf9a78b414f45d1d7b0878d0b74f57ed16e6f8d9 | SiFi-CC/sifi-framework | /lib/base/database/SMysqlInterface.cc | C++ | cc | 2,869 | permissive | // @(#)lib/base:$Id$
// Author: Rafal Lalik 18/11/2017
/*************************************************************************
* Copyright (C) 2017-2018, Rafał Lalik. *
* All rights reserved. *
* ... |
e87c6055329527e5aa1e1036895b82e7fa1e6691 | 57344469c99be8690cb69f9b09551b9137289d6a | tankiJong/urban | /projects/arena-ai/interface.cpp | C++ | cpp | 2,015 | no_license | #define ARENA_CLIENT
#include "interface.hpp" // Provided by game master; feel free to change #include path to find this file
#include "src/agent.hpp"
static Master* gMaster;
//-----------------------------------------------------------------------------------------------
int GiveCommonInterfaceVersion() {
return ... |
03c81bcae37054a1beb711eaa71bea3c3270e1db | 9d58dd087ccadfee4f8f9a508e09130e398aac56 | AM-Darshan/Compitaive-Programming | /level2/B_Airport.cpp | C++ | cpp | 2,164 | no_license | #include<bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memse... |
a7f2aaab771b8b25baf060df9df8703ef86c2fd3 | 372abe9af14e50d249f41d56f616793aad7866b2 | SHITIZ-AGGARWAL/chromium | /components/translate/core/browser/translate_manager_unittest.cc | C++ | cc | 55,957 | 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 "components/translate/core/browser/translate_manager.h"
#include <utility>
#include "base/containers/contains.h"
#include "base/json/json_reade... |
bc2eeb1aaa3c663c711d94371d3680329c891b5d | ae84b25763641e244601c041ea6227a6df16b389 | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_old_hunk_2783.cpp | C++ | cpp | 313 | no_license | }
/* getting parameters */
cp++; /* skip the ';' */
cp = zap_sp(cp);
if (cp == NULL || *cp == '\0') {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
"Cannot get media parameter.");
return (NULL);
}
mp = cp;
attribute = NULL;
value = NULL;
|
901b2a71526615de77e6e4946c5dd6378eec7dc8 | 507eddbeb7d53a447ed9e5451e168a422bdfd254 | Muzahid037/Online-Judge-Problems | /uva problem/1230 - MODEX.cpp | C++ | cpp | 531 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll binpow(ll num,ll pow,ll mod)
{
num%=mod;
ll res=1;
while(pow>0)
{
if(pow&1)
{
res=(res*num)%mod;
}
num=(num*num)%mod;
pow>>=1;
}
return res;
}
int main()
{
ios::syn... |
a5866346cf545daa021a2412c9f6af6792564b2e | 7348515234dfc59ca844c1627bc6717cae207522 | mtoan2111/gpssim_server | /firmware/variant.cpp | C++ | cpp | 16,830 | no_license | /*
Copyright (c) 2011 Arduino. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This ... |
22e72442a268759ad486c49c4ed14e1158893118 | 2102b387fab22c52143b7e74115e8583cea82558 | randomize/rdev | /rust/traits/main2.cpp | C++ | cpp | 741 | no_license | #include <iostream>
#include <memory>
#include <algorithm>
#include <vector>
#include <list>
#include <unordered_map>
using namespace std;
}
class Foo
{
public:
int x;
virtual void print();
};
class Bar : public Foo
{
public:
int y;
virtual void print();
};
void Foo::print()
{
std::cout << "x: "... |
57f9331a40b74509c24d9953341e8131150423a7 | c51e5cd302bf228c101930c7e75e3dc9b853e2df | shamohuyang/notes | /src/wayland/proj01/src/gui/WidgetImage.hpp | C++ | hpp | 416 | no_license |
#ifndef _WIDGET_IMAGE_HPP_
#define _WIDGET_IMAGE_HPP_
#include "Widget.hpp"
class WidgetImage : public Widget {
public:
WidgetImage(int x, int y, int w, int h);
virtual int draw();
void SetImage(string filePath);
// touch
virtual int touchDownHandler(int, int);
virtual int touchUpHandler(int, int);
v... |
f218d42c879f6c453c5c8234773a75e148306c4f | 340d863309b9e3f0559bba384e02d0f1bd74df2b | dgong4548/Data-Structures-practice-programs | /hw6/MyMap.cpp | C++ | cpp | 5,732 | no_license | #include "MyMap.h"
#include "Entry.h"
//inserts key-value pair into the map
void MyMap::insert(const string& key, int value)
{
for(vector<list<Entry> >::iterator it = table.begin(); it != table.end(); it++) //loop through vector
{
list<Entry> temp = *it; //remember which list is being... |
06bdedf77684b7d7c1d7315ac14bafed63ca596b | 6dfcce1ac8a30214fbe5cd57aef9a7e9ff8f90a2 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_10/Z6.4+pooncerelease+poonceacquire+poonceacquire.c.cbmc_out.cpp | C++ | cpp | 47,295 | no_license | // Global variabls:
// 4:atom_2_X1_0:1
// 0:vars:3
// 3:atom_1_X1_0: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 ... |
0092efcd8a09b1fd682844c53b98c2cf39fd1b34 | 39d3845728a795ebbbe47a1d8001c577e5108ac0 | Parantido/sipphone | /src/dskphone/ui/xwin/settingui/src/settinguitimeanddatedelegate.cpp | C++ | cpp | 2,012 | no_license | #include "settinguitimeanddatedelegate.h"
#include "settinguiradioitemdata.h"
#include "settinguilogic/src/settinguibasepagedata.h"
#include "settingui/include/itemnamedefine.h"
#include "settinguilogic/include/common.h"
#include "settinguilogic/src/dateandtimecontroller.h"
CSettingUITimeAndDateDelegate::CSettingUITim... |
13951308e7768609318af97a80b8c67d722ffcf5 | 03bf10e28293a8bf91ced198b414dcdb81d71170 | Submitty/Submitty | /more_autograding_examples/cpp_simple_lab/submissions/julian_buggy.cpp | C++ | cpp | 1,303 | permissive | // This program converts a day and month within a given year to the
// Julian day.
#include <iostream>
// This is a constant array of integer values. The array entry
// associated with index i is the number of days in the ith month of
// the year. Since C++ array indices start at 0 and month counting
// star... |
52dba84db69165b008e6c85c4d6816ecf389fe44 | 8019e7a9ec0751c97c72f82adcfb19bb15fe3fc0 | mingfeisun/gazebo | /gazebo/rendering/UserCamera.cc | C++ | cc | 28,754 | permissive | /*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* 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 appl... |
6b973c6e1e53a5b4ee82dc38c07a9062829e76ef | a88fba9de47c81aedb765fbc6bca8e0e6331589d | Jeeppinger/MachineLearningProjects | /Project1/src/knn.cpp | C++ | cpp | 2,742 | no_license | #include "knn.h"
#include <Eigen/Dense>
#include <iostream>
int Predict1toMaxNeighbors(
double *train_inputs_ptr,
double *train_label_ptr,
int nrow, int ncol, int max_neighbors,
double *test_input_ptr, //ncol
//inputs above, outputs below
double *test_prediction_ptr //max neighbors
){
Eigen::VectorX... |
e00ee5cbb8071d0c75868a686081345180db1855 | 6270cd8b3e38ffc4d21d33846a14977463c0748e | yangyefeng/SINYD_SC | /DigitTemplateTool/DigitTemplateTool.cpp | C++ | cpp | 3,631 | no_license | // DigitTemplateTool.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "tinyxml2.h"
#include <iostream>
#include <fstream>
#include <shellapi.h>
#include <conio.h>
#include <string>
using namespace tinyxml2;
using namespace std;
bool CopyFile(TCHAR* pTo, TCHAR* pFrom)
{
SHFILEOPSTRUCT FileOp = { ... |
058beb87809b0104fb7eb9b371c746ee1d547178 | 96eff513949cf32b2f51afdd1b7e955f59c252c4 | Solarius66/WardenEngine | /Warden_lib/include/engine/error/MeshRendererError.hpp | C++ | hpp | 750 | no_license | /*
** EPITECH PROJECT, 2019
** MeshRendererError.hpp
** File description:
** MeshRendererError Class Declaration
*/
#ifndef MESHRENDERERERROR_HPP_
#define MESHRENDERERERROR_HPP_
/// @file /include/engine/error/MeshRendererError.hpp
#include "warden_lib.h"
///
/// MeshRenderer Error Class, Contain a message and a ty... |
2cde0d1317c7c27c8ede6c522a76c8440f3c85cc | 30acec1a0a009feead3a340be3806284f452daf6 | jackmcguire1/Multi-Threaded-Audio-Streaming-Server- | /client/WebClient/ClientApp.cpp | C++ | cpp | 3,253 | no_license | #pragma once
#include "Client.h"
#include "DirectSound.h"
#include "IO.H"
#include <sstream>
#include <fstream>
#include <iostream>
using namespace std;
struct WaveFileNameListAsString {
std::vector<string> waveFileNames;
};
void RandomDelay()
{
this_thread::sleep_for(chrono::milliseconds(rand() % 15... |
ebe36cd6b863b233e76a3648df5ace958ab4aab9 | fb4037296989bb573082789489526f214b7a5c1e | iamtcby5188/work | /idbbondserver-midware/IDBCommon/fastdb/localcli.cpp | C++ | cpp | 102,718 | no_license | //-< LOCALCLI.CPP >--------------------------------------------------*--------*
// FastDB Version 1.0 (c) 1999 GARRET * ? *
// (Main Memory Database Management System) * /\| *
// * / \ *
... |
cf982fcff9ebf8c9f18a60ec314c724e42f87259 | f1cce6d1daac7135c7bcd89fed748bb5b06bee7d | conradjones/ngraph | /src/ngraph/op/fused/mvn.hpp | C++ | hpp | 3,654 | permissive | //*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... |
82b96f47e8d24fd431744d14d513330153b36525 | 572f80e44faa91579938c07d40f6ea979e11c230 | Shell-Wataru/AtCoder | /Codeforces/770/D.cpp | C++ | cpp | 1,913 | no_license | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <deque>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <unordered_map>
#include <unordered_set>
using namespace std;
using ll = long long;
int query(ll i, ll j, ll k)
{
... |
fff0d5f5e6320805af3872878523c3c5309a6e0a | ba28e848799b9522ebbc6bcbb48139ff3baf193d | SoC-OpenGL/soc-assignment-1-ritik02mandal | /Assignment 1/Q1/Square.cpp | C++ | cpp | 2,741 | no_license | #include "GL_Framework/gl_framework.hpp"
#include "Shader/shader_util.hpp"
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 800;
float points[]={
0.8f,0.8f,0.0f,
0.8f,-0.8f,0.0f,
-0.8f,-0.8f,0.0f,
-0.8f,0.8f,0.0f,
-0.8f,-... |
bf82e06f9b42adc6b475802009fb9ac57f993217 | 41a8e02da8ab7e317c16f04667a673843d62c2a0 | WebAssembly/binaryen | /src/passes/Vacuum.cpp | C++ | cpp | 16,358 | permissive | /*
* Copyright 2016 WebAssembly Community Group participants
*
* 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... |
dfeb1b2d8252d07c5bfda8300a95f0a1751e1042 | e91002c03e0fd04e6f9ca97a65e9956891ad80b4 | cxz66666/PEG-DMOJ-Solutions | /a_gameX.cpp | C++ | cpp | 929 | no_license | #include<iostream>
using namespace std;
int origin[1001];
int dp[1001][1001];
int N;
inline int maxx(int a, int b) { return (a > b) ? a : b; }
inline int minx(int a, int b) { return (a < b) ? a : b; }
int game(int i , int j)
{
if (dp[i][j]!=-1)
{
return dp[i][j];
}
else
{
... |
a47f34a5b7915ebaa189a7389a3529962b853a4d | 329fa119d30c9df30365b793762d6993dffe2c03 | JiteshGupta17/LeetCode-Solutions | /Hard/72.EditDistance.cpp | C++ | cpp | 1,297 | no_license | #include <bits/stdc++.h>
using namespace std;
int minCost_recur(string s,string t,int i,int j)
{
if(i==s.length())
{
return t.length()-j;
}
if(j==t.length())
{
return s.length()-i;
}
if(s[i]==t[j]) return minCost_recur(s,t,i+1,j+1);
int ans = INT_MAX;... |
0fb9ffe7a6ba43cccb9e521ac7b961b30e53f071 | 7ab09ed4cfad3a7e23c1cbfd5465cc2c03138dd2 | Hopsan/hopsan | /componentLibraries/defaultLibrary/Signal/Control/SignalPID2.hpp | C++ | hpp | 4,121 | permissive | /*-----------------------------------------------------------------------------
Copyright 2017 Hopsan Group
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.