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 |
|---|---|---|---|---|---|---|---|---|
cad5070fa2c94c521406e7fed4e7495e0384d9e5 | 44c1d7134e65eb6c9d459bf0c46344219d426790 | huajian1069/monte-carlo | /Distribution/Distribution.hpp | C++ | hpp | 620 | no_license | //
// Created by pcsc on 12/2/18.
//
#ifndef MONTE_CARLO_DISTRIBUTION_HPP
#define MONTE_CARLO_DISTRIBUTION_HPP
#include <vector>
/**
* This is an abstract class for probability distributions
*/
class Distribution {
public:
virtual double generate() = 0; //!< Purely virtual generator of one random variable
... |
4028a94a9158f85604cfe81e040ddfe8225fd2b7 | cc7e05ada2910f79181496c560095a1c12c684fb | emboob/SP-lab4 | /pro10/ButtonWindow.cpp | C++ | cpp | 680 | no_license | #include "ButtonWindow.h"
#include <qpushbutton.h>
#include <qapplication.h>
#include <iostream>
ButtonWindow::ButtonWindow(QWidget *parent, Qt::WindowFlags flags ) : QMainWindow(parent, flags)
{
this->setWindowTitle("This is the window Title");
QPushButton *button = new QPushButton("Click Me!", this);
but... |
130a7721b3e3b9a400dbcf4c0faad7ea1444b2a4 | fdafcef8a4fc80add580ae6fdfd7e8369f09b695 | vuonglequoc/a-simple-triangle | /part-04-setup-ios/main/src/main.cpp | C++ | cpp | 2,176 | permissive | #include "core/graphics-wrapper.hpp"
#include "core/sdl-wrapper.hpp"
#include <iostream>
void render(SDL_Window* window, const SDL_GLContext& context)
{
SDL_GL_MakeCurrent(window, context);
glClearColor(0.3f, 0.7f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
SDL_GL_SwapWindow(win... |
fc090267c93ed1bfeea17efc30efa30f75ae123a | 1a0e6ca10d645057168832b526fdc6f79702c768 | SesameOne-Software/ez-apex | /driver-loader/intel_driver.cpp | C++ | cpp | 24,692 | no_license | #include "intel_driver.hpp"
char intel_driver::driver_name[100] = {};
uintptr_t PiDDBLockPtr;
uintptr_t PiDDBCacheTablePtr;
bool intel_driver::IsRunning()
{
const HANDLE file_handle = CreateFileW(L"\\\\.\\Nal", FILE_ANY_ACCESS, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
if (file_handle != nullptr &... |
a4326340394b8a749e223d8b9d667110ca22ccd5 | 73eb1fdad3eaec3c4d0d40dc3e0a9af1b7cc3c01 | yehted/Digraph | /Digraph.cpp | C++ | cpp | 2,559 | no_license | #include "Digraph.h"
#include <stdexcept>
Digraph::Digraph() : V_(0), E_(0), adj_(NULL) {}
Digraph::Digraph(int V) : V_(V), E_(0), adj_(new Bag<int>[V]) {
if (V < 0) throw std::invalid_argument("Number of vertices in a Digraph must be nonnegative");
}
Digraph::Digraph(std::istream& input) {
try {
input >> V_;
... |
efec1211a30cee8616dfe1eb36710279739132b8 | cd58a79e3aa505f25b04d13792f1010e591cd333 | ACCToken/acc | /plugins/mongo_db_plugin/include/eosio/mongo_db_plugin/mongo_db_plugin.hpp | C++ | hpp | 1,054 | permissive | /**
* @file
* @copyright defined in eos/LICENSE
*/
#pragma once
#include <eosio/chain_plugin/chain_plugin.hpp>
#include <appbase/application.hpp>
#include <memory>
namespace eosio {
using mongo_db_plugin_impl_ptr = std::shared_ptr<class mongo_db_plugin_impl>;
/**
* Provides persistence to MongoDB for:
* acco... |
4f63bd8e12a13724b3118dce022e2a4ba46ba8d6 | e4c53f957e267ea4f84b8679fcc1b89e24e3db94 | Allyn69/tensorflow | /tensorflow/python/lib/core/py_func.cc | C++ | cc | 13,585 | permissive | /* Copyright 2015 The TensorFlow 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 by applicable law or a... |
1411d3486746061dbf743c7ad2ba548d641464ac | 6c1513d845ed49ab79337ff8678fbd1140f35748 | jahennen/CSS_343 | /HW3/src/HuffTree.cpp | C++ | cpp | 2,995 | no_license | /*
* HuffTree.cpp
*
* Created on: Feb 4, 2013
* Author: jay
*/
#include "HuffTree.h"
using namespace std;
// Constructs a HuffTree object from a vector of character counts.
HuffTree::HuffTree(vector<int>& types) {
PQueue<HuffNode> queue;
unsigned int k;
for(k = 0; k < types.size(); k++) {
if (types[k... |
fa7ef99f60083db775d41e8078141800898a3aaa | d758e6c06ed085a018b60252700fd43eeaffad66 | simonecid/cmssw | /DetectorDescription/Core/src/DDRoot.cc | C++ | cc | 779 | permissive | #include "DetectorDescription/Core/interface/DDLogicalPart.h"
#include "DetectorDescription/Core/interface/DDName.h"
#include "DetectorDescription/Core/interface/DDRoot.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
DDRoot::DDRoot()
{ }
DDRoot::~DDRoot()
{ }
void DDRoot::set(const DDName & name)
{
r... |
d3825c24e0c207f1cd721fe85c145eaef6f55e97 | 532d81796864ed171b871c18a1d3ee374d61b93c | Vismar/Conure2D | /Src/VkWrapper/CommandPool.cpp | C++ | cpp | 1,235 | no_license | #include "CommandPool.hpp"
#include <Utility/Assert.hpp>
#include <Tracer/TraceScopeTimer.hpp>
using namespace VkWrapper;
// ---------------------------------------------------------------------------------------------------------------------
CommandPool::CommandPool(VkDevice lDevice, uint32_t graphicsFamilyIndex)
:... |
c4343e698c2552d25d3cd27cba8bff4ed45ac9aa | a7d6c9109305a568e9639461d282124a47d2c573 | dimmells/CPP | /day05/ex03/PresidentialPardonForm.cpp | C++ | cpp | 1,988 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PresidentialPardonForm.cpp :+: :+: :+: ... |
4ba4d81539cba21b4b98031a6b13b0ede1a0e544 | 1c7e3db0b2be8fa9b66ca8b185356c5ef3ba19fd | shrey/templates_cpp | /ConceptsAndQuestions/Greedy/778a.cpp | C++ | cpp | 2,582 | no_license |
//Shrey Dubey
#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<list>
#include<iomanip>
#include<queue>
#include<stack>
#include <math.h>
#include<climits>
#include<bitset>
using namespace std;
typedef long long ll;
typedef long do... |
ef3e3cb6cc9fb239d2e9df9eda507badf37a341e | a07b1ce7d11b79985c47abe8cfa7d6f658fb2d34 | Blackbird002/AirMuseum | /src/MQ9.cpp | C++ | cpp | 744 | no_license | #include "CSCIx229.h"
class MQ9{
public:
int mode = 1;
float emission = 0;
MQ9(){
// Load object
obj = LoadOBJ("../Objects/mq9/MQ-9.obj");
}
void drawMQ9(double x,double y,double z, double scale, double thx, double thy, double thz){
// Enable textures
glEnable(GL_... |
f6aab7f12e185225ec8f82623d9428595719bb54 | abd819deee003b83fc9cd6d79aa2fa1fe330989a | Stride-Apollo/proto-TBB | /openmp_etc.cpp | C++ | cpp | 873 | no_license |
#include <string>
#include <iostream>
#include <mutex>
#include <vector>
#include <map>
#include <algorithm>
#include <iterator>
#include <functional>
#include <cassert>
#include <thread>
#include <random>
#include <chrono>
using Clock = std::chrono::high_resolution_clock;
#include <omp.h>
using namespace std;
int ... |
47f5c8228f895ef3482a273fc67d19fe95337cb1 | 6956b0f91a3cfe0f661c4da3be8e39bd98c4da92 | huadongwu/chromium-1 | /chrome/browser/web_applications/bookmark_apps/system_web_app_manager_browsertest.cc | C++ | cc | 9,067 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/web_applications/bookmark_apps/system_web_app_manager_browsertest.h"
#include <vector>
#include "base/bind.h"
#include "base/me... |
d28d3ef03cd5061bcae089e2ec6c1e4af4f27474 | 47d54d30c94ab6b54c97f84b7554775163d7249a | karenfyx/uw-course | /Graphics/A4/GeometryNode.cpp | C++ | cpp | 1,165 | no_license | // Winter 2019
#include "GeometryNode.hpp"
//---------------------------------------------------------------------------------------
GeometryNode::GeometryNode(
const std::string & name, Primitive *prim, Material *mat )
: SceneNode( name )
, m_material( mat )
, m_primitive( prim )
{
m_nodeType = NodeType::Geometr... |
05ad0e96cd427471158d95a4e577120727065846 | 5a01eea76c09a166892594eced5c2e6df2160118 | kit-cpp-course/suhomlinov-vv | /Des/Encryption/keyDES.cpp | C++ | cpp | 601 | permissive | //
// key.cpp
// Des
//
// Created by Виталий on 19.12.18.
// Copyright © 2018 vlad. All rights reserved.
//
#include "keyDES.hpp"
#include "stdafx.hpp"
#include "cryptlib.hpp"
using namespace std;
keyDES::keyDES(char * k, int length) {
setKey(k, length);
}
char * keyDES::getKey() {
return copyKey(fkey,... |
bdc4a689ef837ce0db1f9bc61fe80bb807fedbfc | 98c6251dbcb71bbe25a022d0568f0d2677742099 | a930736/c-object-oriented-programming | /ex03_protected.cpp | C++ | cpp | 513 | no_license | //
// main.cpp
// exercise03
//
// Created by Peter on 2021/1/5.
// Copyright © 2021 Peter. All rights reserved.
//
// protected 應用
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
class Cat{
private:
int Size;
protected:
int Sex;
public:
void setsize(int size) {
S... |
2b142366d538b58e6e4f3392556c30060ef4700b | cef3bd0871706e5d331e2dbde8711bbb9ffcfb18 | pgavlin/llvm | /lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | C++ | cpp | 84,663 | permissive | //===- RewriteStatepointsForGC.cpp - Make GC relocations explicit ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
e2ed92e94dd4200733c297d14cb5b6d2f621477f | d3b965ca00550c41705dc69aa003a3e69db4ffc5 | AntoineJT/BurgWar | /include/CoreLib/ConfigFile.hpp | C++ | hpp | 4,056 | permissive | // Copyright (C) 2020 Jérôme Leclercq
// This file is part of the "Burgwar" project
// For conditions of distribution and use, see copyright notice in LICENSE
#pragma once
#ifndef BURGWAR_CORELIB_CONFIGFILE_HPP
#define BURGWAR_CORELIB_CONFIGFILE_HPP
#include <Nazara/Core/Signal.hpp>
#include <filesystem>
#include <f... |
264ee9f5d083b54fce6af61b0f6c83961945ae9a | 39be51ce6bfff3ba1de2a7998928126f49c13a89 | m0lentum/moleengine-legacy | /src/ME/Input/Keyboard.cpp | C++ | cpp | 917 | no_license | #include <Input/Keyboard.hpp>
#include <iostream>
namespace me
{
std::unordered_map<sf::Keyboard::Key, bool> Keyboard::m_trackedKeys = std::unordered_map<Key, bool>();
void Keyboard::trackKey(Key key)
{
Keyboard::m_trackedKeys[key] = false;
}
bool Keyboard::wasKeyPressed(Key key)
{
if (Keyboard::m_trackedK... |
99ca7cdd445d5c608488a6a959c012066417d0ac | c4b8dccfb2183687ead4c53c21a316b7160141c3 | joschambach/TOF_Software | /mysocketcan/MCU2.cc | C++ | cc | 18,045 | no_license | /* File name : MCU2.cc
* Creation date : 9/12/07
* Author : J. Schambach, UT Physics
* Modified date :
* :
*/
#ifndef lint
static char __attribute__ ((unused)) vcid[] =
"$Id: MCU2.cc 756 2012-07-05 20:44:12Z jschamba $";
#endif /* lint */
/*
* This program is used to re-program the... |
e630a03e7d2d0b8d5594462b7c6d636466def600 | 061fd48ee2c43c61bcdbca3c13aa141bde28dc5f | navigatore/imaginote | /keyboardlayouthelpdialog.cpp | C++ | cpp | 313 | no_license | #include "keyboardlayouthelpdialog.h"
#include "ui_keyboardlayouthelpdialog.h"
KeyboardLayoutHelpDialog::KeyboardLayoutHelpDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::KeyboardLayoutHelpDialog)
{
ui->setupUi(this);
}
KeyboardLayoutHelpDialog::~KeyboardLayoutHelpDialog()
{
delete ui;
}
|
fe4bd3a011b99dc2d2877979471da848227fd960 | 32d8d9c2824086821b9f8bd2233d589cf2b1442b | weimingtom/game11 | /game11/npstring.cpp | C++ | cpp | 12,796 | no_license | #include <string>
#include <sstream>
#include <stdlib.h>
#include "GameLib/Framework.h"
//#include "game.h"
//#include "stage.h"
#include "npstring.h"
int nString::splitChar(char *result , const char* original,const char spliter,const int index) {
int c=0; //要素カウンタ
int ws=0; //マルチバイトのws文字目であることを示す
int p=0; //コピー位... |
0d57e92cbdef2a08694d33c612302eba7be0888d | a3d4cdf5efadffb0d2b9efc2790752ba045159d7 | FelixFelicis555/Data-Structure-And-Algorithms | /CodeChef/CHFINTRO.cpp | C++ | cpp | 250 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,r,a;
cin>>n>>r;
while(n--){
cin>>a;
if(a>=r){
cout<<"Good boi"<<endl;
}
else{
cout<<"Bad boi"<<endl;
}
}}
|
aab98598c034ca110a07408856e1582c367ebfb2 | 92540c0d6634975a9657074a2f7801f2bfd81aea | emmerich-research/new-contaminant-detection | /libcore/config.cpp | C++ | cpp | 1,444 | no_license | #include "core.hpp"
#include "config.hpp"
#include <utility>
NAMESPACE_BEGIN
// impl::ConfigImpl* Config::instance_ = nullptr;
namespace impl {
ConfigImpl::ConfigImpl(const std::string& config_path)
: config_{toml::parse(config_path)}, config_path_{std::move(config_path)} {
DEBUG_ONLY(obj_name_ = "ConfigImpl... |
05d3dcd20440f44642da2da5ebe5eb220c9f45b6 | faecbaa3a166dc2bd6ae7c97ee24461bbb61dcad | yeomii/TSP | /enums.cpp | C++ | cpp | 542 | no_license | #include "ga.h"
const char* getString(SelectionType selectionType)
{
static const char* dic[] = {
"Random",
"Tournament"
};
return dic[(unsigned char)selectionType];
}
const char* getString(CrossoverType crossoverType)
{
static const char* dic[] = {
"PMX",
"EdgeRecombination"
};
return d... |
e2793b4734db4f5dfe134b864aa4c55ff6cea9c5 | afb155ae4c9b6531e266fbeede1ab8d802e33871 | wpilibsuite/allwpilib | /wpiutil/src/test/native/cpp/llvm/SmallStringTest.cpp | C++ | cpp | 5,059 | permissive | //===- llvm/unittest/ADT/SmallStringTest.cpp ------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
d278da1c9aff775b62e70c020630e44187bc3457 | 1bd4df6e254803304829275841b8d07c515ef366 | mark2185/aoc2019 | /day02/2.cpp | C++ | cpp | 1,378 | no_license | #include <iostream>
#include <string>
#include <algorithm>
#include <sstream>
#include <vector>
int calculate(int noun, int verb, std::vector<int> input_tokens) {
input_tokens[1] = noun;
input_tokens[2] = verb;
for (int pc = 0; input_tokens[pc] != 99; pc += 4) {
int command = input_tokens[pc];
... |
46f7c1aeb0e4ffa8af2619370688753b72ef8031 | c35d12360aa4e1173bda48573b73aa3800cdaeb0 | nekonomicon/mainui_cpp | /Scissor.cpp | C++ | cpp | 1,753 | no_license | #include "Scissor.h"
#define MAX_SCISSORS 16
static class CScissorState
{
public:
CScissorState() : iDepth(0), coordStack(), sizeStack() { }
int iDepth;
Point coordStack[MAX_SCISSORS];
Size sizeStack[MAX_SCISSORS];
} scissor;
void CropByPreviousScissors( Point pt, Size sz, int &x, int &y, int &w, int &h )
{
in... |
ba3bfa23ba5ebda5710e4c172da35e98962b7f78 | 504f80986f258ebbfd4e1dc018f0006d2770f82d | Pandinosaurus/PointCloudDonkey | /src/implicit_shape_model/features/features_grsd.cpp | C++ | cpp | 2,723 | permissive | /*
* BSD 3-Clause License
*
* Full text: https://opensource.org/licenses/BSD-3-Clause
*
* Copyright (c) 2018, Viktor Seib
* All rights reserved.
*
*/
#include "features_grsd.h"
#define PCL_NO_PRECOMPILE
#include <pcl/features/grsd.h>
namespace ism3d
{
FeaturesGRSD::FeaturesGRSD()
{
addParameter(m_radius,... |
3f9673c7f113b4a33311a622ef4a09ed70c76692 | be171e57fe127945fac70f9df226618f1feb75b6 | g-sobral/vero | /src/mtig_driver/src/messageMaker.cpp | C++ | cpp | 7,758 | no_license | /**
* @file messageMaker.cpp
* @brief Fills ROS messages with data from the sensor
* @details This class will be constantly used by mtiG in order to publish
* ROS messages containing information about the Xsens device sensors
* data.
* @author Lucas Casanova Nogueira
* @date 2014
*/
#include ... |
f2f85cd8c4c7d55d2bdf4865d835b45e58263586 | de67c8a5f5e1f4890080a91af8e964d6ef32293f | bbmjja8123/chromium-1 | /chromium-courgette-redacted-29.0.1547.57/media/filters/source_buffer_stream.cc | C++ | cc | 63,686 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/filters/source_buffer_stream.h"
#include <algorithm>
#include <map>
#include "base/bind.h"
#include "base/debug/trace_event.h"
#incl... |
4bf36794d0baace93b5c70141ad4882689a765d8 | 0feb98d3a09eb708804d52e70817f5f5d0b91e01 | petrpavlik/rnl | /client/client.cpp | C++ | cpp | 468 | permissive | // client.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <mynetlib/rnl.h>
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
RNL::CController *controller = new RNL::CController;
controller->Init();
RNL::CSocket *socket = new RNL::CSocket;
socket... |
627b04b15a9dfd450afe913117792b7410be0010 | a5458d2aac9bf68b02f004b2323bf0c5c7fe0b0b | xhaihao/libxcam | /modules/ocl/cl_image_360_stitch.cpp | C++ | cpp | 11,173 | permissive | /*
* cl_image_360_stitch.cpp - CL Image 360 stitch
*
* Copyright (c) 2016 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/L... |
650911966aa4e8653a3a40c2cf7b4766f1323392 | 027d39fc3ca0068d30c3804f08c19aab5a1a0739 | caontfuky/Mario | /Technical/Mario3_ver1/CManageAudio.cpp | C++ | cpp | 2,336 | no_license | #include "CManageAudio.h"
#include "CFileUtil.h"
ManageAudio::ManageAudio(void)
{
_Music_Background = true;
_Sound = true;
}
int ManageAudio::init_DirectSound(HWND hWnd)
{
HRESULT result;
//create Direct Manage Sound Object
soundManage = new CSoundManager();
//initializa DirectSound
result =... |
087fcfb8c83b9f4aa35662b0951716f85efe28ca | 059fcc0cf554a16dfac0fe0bfa5a6991e2364119 | Nataraju-S/Interview | /warshall.cpp | C++ | cpp | 445 | no_license | #include<bits/stdc++.h>
/*#include<cstdio>
#include<iostream>
*/
#define fi for(i=0;i<n;i++)
#define fj for(j=0;j<n;j++)
#define fk for(k=0;k<n;k++)
int ma(int a, int b)
{
return a>b?a:b;
}
int main()
{int n,i,j,k,a[10][10];
scanf("%d",&n);
fi
fj
scanf("%d",&a[i][j]);
fk
fi
fj
if(a[i][k]==1 &&a... |
5fc03942569325d5a3bed048261dd3d0f6577c7f | e0d630ac4e9cfca9e600408a48ae317c27167d5e | hwi-jea-cho/UCProject_SourceCode | /Source/UCProject/DataAssets/CDropRateData.cpp | C++ | cpp | 1,672 | no_license | #include "CDropRateData.h"
#include "Global.h"
#include "Actors/CDropItemActor.h"
ACDropItemActor* UCDropRateData::SpawnRandomDropItem(UWorld* InWorld, const FTransform& InTransform)
{
// 랜덤 아이템 얻기
FDropItemData drop;
CheckFalseResult(GetRandomDropItemClass(&drop), nullptr);
// 랜덤 개수 얻기
int32 w = drop.ItemCountM... |
acb6f40c66b06942af7e9e73a6abd76c18c0cc95 | d11c2df308a158f52a9f9a18e54dfef2c22bf15d | JCOutMan/raptor | /core/windows/connection.cc | C++ | cc | 7,725 | permissive | /*
*
* Copyright (c) 2020 The Raptor 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 requ... |
c801811e1d6b5e190194dd470ef15c5171af4268 | b48c1983cb184d1de7894293b08a687569de653d | GPayne/VTK | /IO/ADIOS2/Testing/Cxx/UnitTestIOADIOS2VAR.cxx | C++ | cxx | 19,593 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: UnitTestIOADIOS2.cxx
-------------------------------------------------------------------------
Copyright 2008 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Co... |
13e18cf0751e9452438baf1a443a4c6920a66459 | 7aa3d2c98ce580b929937744c948e257fd894794 | suyinlong/leetcode | /090-Subsets.II.cpp | C++ | cpp | 806 | no_license | class Solution {
public:
void generateSub(vector<int> &nums, int pos, vector<int> ¤t, vector<vector<int>> &result) {
for (int i = pos; i < nums.size(); i++) {
current.push_back(nums[i]);
result.push_back(current);
if (i < nums.size() - 1)
generateSub... |
43b6a70f0731d39b5e9c5fd8f79734190291aced | d974688cea02ea5984de624c872dfce72328eb6a | LeCuong95/Game-Programming-Metroid- | /Metroid/Object.cpp | C++ | cpp | 2,858 | no_license | #include "Object.h"
Object::Object()
{
}
Object::~Object()
{
if (ObjectSprite) delete ObjectSprite;
if (Size) delete Size;
}
int Object::GetID() { return id; }
float Object::GetX() { return x; }
float Object::GetY() { return y; }
float Object::GetWidth() { return Size->FrameWidth; }
float Object::GetHeight() { r... |
f663435399d6770d568081cb7c8f767c63eee6d6 | 2d9526d4466dddbfe532f9deab27adf007df7cd2 | InsightSoftwareConsortium/ITKSphinxExamples | /src/Filtering/ImageIntensity/BinaryANDTwoImages/Code.cxx | C++ | cxx | 2,657 | permissive | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https://www.apache.o... |
9f8a7609ebfc571e39594ef8c82e50b33bc7059b | 7e6e32c9e743c1bfc8847e9b3e67407056e5db4f | alexovidiupopa/Object-Oriented-Programming | /PracticePractic/IulianaPractice/IulianaPractice/UserWindow.cpp | C++ | cpp | 1,762 | no_license | #include "UserWindow.h"
#include <qmessagebox.h>
UserWindow::UserWindow(Controller& c, User u, QWidget *parent)
: c(c),u(u),QMainWindow(parent)
{
ui.setupUi(this);
c.registerObs(this);
update();
QWidget::setWindowTitle((u.getName() + "-" + u.getType()).c_str());
connect(ui.addBtn, SIGNAL(clicked()), this, SLOT(ad... |
a5f20920fac9bcb7faa1f4953f0425517492c460 | 59adbe268e536bec623464c3da5a92ee6a7f7976 | iggcaswy/IMCMCrun | /src/filesAndControl.cpp | C++ | cpp | 52,989 | permissive | #include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <iomanip> // std::setprecision
#include <string>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <errno.h> // To detect mathematical errors
#include <algori... |
b287d0a2b6f00a22aea2abe07904a1ced59a999c | 7f39321b8e4b766d03ff1277307e3d2c5ffdd2cb | asm128/gpk_samples | /klib_renewal/game.cpp | C++ | cpp | 21,161 | permissive | #include "Game.h"
//
#include "Tile.h"
#include "Item.h"
#include "Enemy.h"
#include "Accessory.h"
#include "Armor.h"
#include "Weapon.h"
#include "Profession.h"
#include "Vehicle.h"
#include "Facility.h"
#include "StageProp.h"
#include <iostream>
//#include "gref_definition.h"
#include <ctime>
#include <algorithm>
... |
18529761a1be228d5879c3dacfe8059a96127de2 | f731a8ca68406bcc05fa23dbae71f6f9a827fd88 | cbforks/candor | /src/runtime.cc | C++ | cc | 23,870 | permissive | /**
* Copyright (c) 2012, Fedor Indutny.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, pu... |
ad8db074535bc83550cf660d98b931da4b381eae | 4d1548f67499184a9d00e27eef10fc5ac399cb82 | mostafa-saad/ArabicCompetitiveProgramming | /18-Programming-4kids/08_5.cpp | C++ | cpp | 236 | no_license | #include<iostream>
using namespace std;
int main() {
int x, y;
while (true) {
cin >> x >> y;
if (y == 0)
{
cout<<"Y is zero!!\n";
break;
}
cout << x / y << "\n";
}
cout<<"Bye\n";
return 0;
}
|
bbec22dacdbb832b6dab0665e489e139c564667e | 7146b59a108d48cbfce83ebec069ea466ad381df | syahn/Problem-solving | /HackerRank/CtCI/[2] Trees_Is_This_a_Binary_Search_Tree?.cpp | C++ | cpp | 1,276 | no_license | // # Reflection
// - Improved solution uses boundary check, and it's better. It can be done with
// O(logN)
// # Problem
// Complete the function in your editor below, which has parameter: a pointer to
// the root of a binary tree. It must return a boolean denoting whether or
// not the binary tree is a binary sea... |
fe6c65d7504d98debcad84b0fb8cf072ed3a7eec | 6c8549d36664863245bb5c55e3b9fe85f5259ac4 | kugorang/MMO_TCP_Fighter | /MMOTCPFighterServer/0919_homework_MMOTCPFighterServer/DeadReckoning.cpp | C++ | cpp | 9,305 | no_license | #include "main.h"
#include "Select.h"
#include "Sector.h"
DeadReckoning::DeadReckoning() {}
DeadReckoning::DeadReckoning(WORD startPosX, WORD startPosY)
{
this->startPosX = startPosX;
this->startPosY = startPosY;
checkPosTimer.TimerStart();
checkSameDirectionTimer.TimerStart();
}
DeadReckoning::~DeadReckoning()... |
65141240ca09f585d2ab900268b6a2b3c5e8bb28 | ab30523207f5272395de5bc8548962c377316014 | rmros/swagger | /tizen/client/SamiCloudCacheApi.cpp | C++ | cpp | 24,235 | no_license | #include "SamiCloudCacheApi.h"
#include "SamiHelpers.h"
#include "SamiError.h"
using namespace Tizen::Base;
namespace Swagger {
SamiCloudCacheApi::SamiCloudCacheApi() {
}
SamiCloudCacheApi::~SamiCloudCacheApi() {
}
void
clearCacheProcessor(HttpResponse* pHttpResponse, void (* handler)(void*, SamiError*)) {
i... |
5021c5f56f45678f39c36105db7f11e9592f1f1e | f585d4c4edd0334b81a79d60fac20ecc389de504 | Neilketchum/Compedetive-Programing | /Binnary Search/Excecise/inversionCount.cpp | C++ | cpp | 1,312 | no_license | #include<bits/stdc++.h>
using namespace std;
#define ll long long
int merge(int *a,int s,int e){
int mid = (s+e)/2;
int i = s;
int j = mid+1;
int k = s;
int temp[100000];
int cnt = 0;
while(i<=mid and j<=e){
if(a[i]<=a[j]){
temp[k++] = a[i++];
}els... |
0ddfc1286767461ef80bd87be865205460bf75ce | 203a9a9f24850f041605e9c867cdebfa369e3ac1 | koobonil/Boss2D | /Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/core/kernels/control_flow_ops.cc | C++ | cc | 25,405 | permissive | /* Copyright 2015 The TensorFlow 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 by applicable law or a... |
49986726356a0e3dd41ca8018d4858c459906a8d | 5b49b180338c34a6e2c5db8d5176f0b9d7b27c7a | Clay87/Pyramid | /triangle.cpp | C++ | cpp | 1,262 | no_license | /*
* Clayton Bradford
* CS372 - Fall 2020
* 5th Program
* Triangle Program from PDF
*/
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
ofstream out("triangle.out");
//Prototypes
void space(char);
void line(char, char, char);
void triangle(char, char, char);
//Fu... |
f4aef90ae0bf5b38551e4cefe74429bd4433fc3d | da1928bed51b69444d910542b450d65a0d30c39c | YuThrones/PrivateCode | /LeetCode/206. Reverse Linked List.cpp | C++ | cpp | 720 | no_license | // 简单的链表翻转,注意下节点的链接赋值顺序就行
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:... |
0fc3109d4e02b7958e693f745f7c41b0af5ffe55 | 61cd1213f233f45e0bda91693925c3583ef5c48d | IAM20/baekjoon | /16120_bj/main.cpp | C++ | cpp | 3,654 | no_license | #include <iostream>
#include <string>
#include <stack>
using namespace std;
#define NOTHING pair<int, int>(-1, -1)
#define A 0
#define P 1
#define $ 2
#define GOTO 3
#define accept 100
#define shift 101
#define reduce 500
typedef struct e {
//first -> action, second -> to
pair<int, int> act... |
4b1565039182fb972a5d6ba1e3392f86db405dbc | 9003ba044f26fbb4726b5b552eb3eed4a15c9304 | Longfd/recipes | /muduo/net/Channel.cc | C++ | cc | 1,155 | no_license | #include "Channel.h"
#include "EventLoop.h"
//#define _GNU_SOURCE enable by default
#include <poll.h>
#include <iostream>
#include <assert.h>
const int Channel::kNoneEvent = 0;
const int Channel::kReadEvent = POLLIN | POLLPRI;
const int Channel::kWriteEvent = POLLOUT;
Channel::Channel(EventLoop* loop, int fd)
:loo... |
81de0348602478953ae8b7b7bfb19f5c64d73a86 | 114be94b4912879353743c57e5fed3b07da550f3 | eidheim/jucipp | /tests/stubs/directories.cc | C++ | cc | 268 | permissive | #include "directories.h"
Directories::Directories() : ListViewText(1) {}
Directories::~Directories() {}
void Directories::on_save_file(const boost::filesystem::path &file_path) {}
bool Directories::on_button_press_event(GdkEventButton *event) {
return false;
};
|
fd1bf8e5dd9ea9e8979342a03d5365babce09c85 | 1f0cb19ef93b034b71c38d8c52053e3a5ac603dd | rjrodger/vespa | /storage/src/vespa/storage/distributor/statecheckers.cpp | C++ | cpp | 37,830 | permissive | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "statecheckers.h"
#include "activecopy.h"
#include <vespa/storage/distributor/operations/idealstate/splitoperation.h>
#include <vespa/storage/distributor/operations/idealstate/joinoperation.h... |
f34046c584d6bc4aa29307c02a1c0a0ab7a7264c | 30bb59a70bf5f845c8512677156c7e6a9543edb1 | gzc/leetcode | /cpp/591-600/Minimum Index Sum of Two Lists.cpp | C++ | cpp | 780 | permissive | class Solution {
public:
vector<string> findRestaurant(vector<string>& list1, vector<string>& list2) {
map<string, int> mymap;
for (int i = 0; i < list1.size(); i++) {
mymap[list1[i]] = i;
}
vector<string> result;
int minSum = INT_MAX;
fo... |
c72eae07d383e53df3aeb3652cb32c3af21e8d81 | aa1c08ec9eed215666b6d1124271407c1918f18e | CentauriOS/application-control | /appctl/invoke/command.cpp | C++ | cpp | 439 | permissive | #include <errno.h>
#include <appctl/options.hpp>
#include <appctl/commands.hpp>
using namespace centauri::appctl::common;
using centauri::appctl::common::commands::invokeOpts_t;
namespace centauri {
namespace appctl {
namespace invoke {
int command::run(commandOptions_t *_options) {
... |
82b06e9a6453fe592b92cb01b827e525d788bcef | 724a5943ea7c144e0848cbd9884a8b5def0e1291 | GeorgePapageorgakis/Hackerrank | /C++/STL/Vector-Sort.cpp | C++ | cpp | 452 | no_license | #include <iterator>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
//discard characters until newline is found
cin.ignore (std::numeric_limits<std::streamsize>::max(), '\n');
vector<int> v( std::istream_iterator<int>( std::cin ), std::istre... |
2b7ced74d218cad15291bfb710521e65de541ab1 | 0982cab327acadfd3572cbfb2d17b89994829294 | radix42/SevenSeas | /src/fillediconlabel.cpp | C++ | cpp | 694 | permissive | #include "fillediconlabel.h"
FilledIconLabel::FilledIconLabel(QWidget* parent) :
QLabel(parent) {
this->setMinimumSize(1, 1);
setScaledContents(false);
}
void FilledIconLabel::setBasePixmap(QPixmap pm) {
basePm = pm;
}
/**
* When resized, we re-draw the whole pixmap, resizing it as needed.
*/
voi... |
7588f5de3eeb108a1a1d13e4f747d2ac1365f112 | 5f6bc04f5125cfecc3ba817455f5db994d7ae0a1 | RockyAZ/CPP_PISCINE | /day05/ex05/OfficeBlock.cpp | C++ | cpp | 1,922 | no_license | // ************************************************************************** //
// //
// ::: :::::::: //
// OfficeBlock.cpp :+: :+: :+: ... |
bac5796b4075a09d5a44e6271c891c2d0c9ad5c3 | 1b24c09541df917ebe49160f5aa75803e005b88f | MathProgrammer/CodeForces | /C Programs/C Programs - 7/Pythagorean Triples.cpp | C++ | cpp | 692 | no_license | #include <stdio.h>
int main()
{
int side_1;
long long side_2, side_3, k;
scanf("%d", &side_1);
if(side_1 <= 2)
{
printf("-1\n");
return 0;
}
/*If n is even, n^2 = 4k, then (2k - 1)^2 + 4k = (2k + 1)^2
a = root(4k), b = k - 1, c = k + 1
If n is odd... |
f04f7c069ed27d458b24873a9a460c44989871d7 | cf9bd045b68e9830885d1e3d04d3f37566c5002d | js7217/DX9_2.5D_MonumentValley | /Engine/02.Resources/01.Resources/Resources.cpp | C++ | cpp | 395 | no_license | #include "Engine_Include.h"
#include "Resources.h"
using namespace ENGINE;
CResources::CResources(LPDIRECT3DDEVICE9 pGraphicDev)
: m_pGraphicDev(pGraphicDev)
, m_pRefCnt(new WORD(0))
{
m_pGraphicDev->AddRef();
}
CResources::~CResources()
{
if (0 == *m_pRefCnt)
{
ENGINE::SafeDelete(m_pRefCnt)... |
0f8821adb7e177331b0bb9454a57ca6201d62cf0 | 99d4f3ee0772be7c0b01cb76369fc6e0501f797b | parhelia512/rbfx | /Source/Tools/Toolbox/SystemUI/ResourceBrowser.cpp | C++ | cpp | 10,762 | permissive | //
// Copyright (c) 2017-2019 the rbfx project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, mer... |
33cd09e9a06bbc9036e0494d5946e3c77efd87dd | db18988ff4db084d825202f5ed280ad98a70445d | penghuz/main | /tags/fasset2.3.2/src/building/slurrystore.cpp | C++ | cpp | 11,401 | no_license | /****************************************************************************\
$URL$
$LastChangedDate$
$LastChangedRevision$
$LastChangedBy$
\****************************************************************************/
/****************************************************************************\
Created by NJH ... |
df1e79bb176246461dddb5b63196d2cc4cd668db | 7c563f0ec139abd849e018aa9188bfe5d77fea6c | junxuezheng/chromium | /content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc | C++ | cc | 10,924 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/media/render_frame_audio_output_stream_factory.h"
#include <memory>
#include <string>
#include <utility>
#includ... |
47a31fdc0155d7a3b827639e1dd535966397f580 | 324338ea6c9672ca4ba9264062590e6671ab7fdb | kriti-sc/duckdb | /extension/json/json_functions/json_create.cpp | C++ | cpp | 26,579 | permissive | #include "duckdb/function/cast/cast_function_set.hpp"
#include "duckdb/function/cast/default_casts.hpp"
#include "duckdb/planner/expression/bound_parameter_expression.hpp"
#include "json_common.hpp"
#include "json_functions.hpp"
namespace duckdb {
using StructNames = unordered_map<string, unique_ptr<Vector>>;
struct... |
3714ba0048d5f5437800d2679284db7a923003d7 | 3c1573129b06a42b1b41640904053b119e3d2041 | YathaarthJamwal/Data-Structures-Algorithms--Coursera | /Algorithmic Toolbox/Week 6/GoldBar.cpp | C++ | cpp | 1,029 | no_license | #include <iostream>
#include <vector>
using std::vector;
void print(vector<vector<int>> v)
{
std::cout << "Printing array:\n";
for (auto x : v)
{
for (auto y : x)
{
std::cout << y << " ";
}
std::cout << "\n";
}
std::cout << "\n";
}
int optimal_weight(int W, const vect... |
66c302f1726d48f13185eebc1805132a4b2d4a83 | af0c467caba251f576e95b4fa3ee0576d575943b | FirescuOvidiu/Advent-of-Code-2019 | /Day 24/day24-part1/day24-part1.cpp | C++ | cpp | 1,729 | no_license | #include "../../AOCHeaders/stdafx.h"
void readInput(std::fstream& in, std::vector<std::vector<char>>& map)
{
std::vector<char> v;
std::string line;
while (std::getline(in, line))
{
for (int i = 0; i < line.size(); i++)
{
v.push_back(line[i]);
}
map.push_back(v);
v.clear();
}
}
bool checkInMap(int... |
192072bc73ef67aa670eecc62504a876f7955609 | 6b652519ae031a38f9f75256a8fede083561f5d9 | darkangel-ua/hammer | /driver/src/warehouse_cmd.cpp | C++ | cpp | 1,791 | no_license | #include <iostream>
#include <yaml-cpp/emitter.h>
#include <hammer/core/engine.h>
#include <hammer/core/warehouse.h>
#include <hammer/core/warehouse_manager.h>
#include "warehouse_cmd.h"
#include "build_cmd.h"
using namespace hammer;
namespace {
struct winfo {
const std::string& id_;
YAML::Node info_;
};
}
i... |
c1a8eac9c9f079ea5a9cc9d7c4523f333d2f2860 | 44f8a25b83a63832fd1d041fd67798ef8e77ab61 | Michaelmilk/pat | /1089-Insert or Merge.cpp | C++ | cpp | 2,450 | no_license | #include <iostream>
#include <vector>
#include <string>
#include <iterator>
#include <cmath>
#include <map>
#include <algorithm>
#include <climits>
#include <iomanip>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <set>
#include <fstream>
#include <cstring>
#include <cstdio>
#include <cs... |
204db9e097b685f9d13d68103aa1c8af94edf387 | 83081f92161cf1f83a523eebe6d62164717dd58f | rushioda/PIXELVALID_athena | /athena/TileCalorimeter/TileSimAlgs/src/TileHitToRawChannel.cxx | C++ | cxx | 12,836 | no_license | /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
//*****************************************************************************
// Filename : TileHitToRawChannel.cxx
// Author : Zhifang
// Created : April, 2002
//
// DESCRIPTION:
// Implement the TileHitToRawChannel class
//
... |
e47ee5b9c801c15d340819957ea8cebddf5340bc | ee91c9fce2284704b78dfe2fc45b304fad3ef7a9 | ann1221/P2P-Network | /src/NatPMP.cpp | C++ | cpp | 1,176 | no_license | /*
* Author: Ivan Khodyrev
*/
#include "../includes/NatPMP.h"
#include "../includes/MainInterfaces.h"
#include "../includes/NetSocketWorker.h"
#include <cstring>
using namespace std;
void NatPMP::PortForwarding(int code, int internal_port, int external_port, int life_time){
unsigned char ver = 0;
unsig... |
9fa58aed53af1ef4c896991ab3b6e61e2827741b | 364d3e758d6dccfbeccbe25066fc21c9bb210e90 | caocao/naali | /OgreRenderingModule/OgreSkeletonResource.cpp | C++ | cpp | 2,834 | permissive | // For conditions of distribution and use, see copyright notice in license.txt
#include "StableHeaders.h"
#include "OgreSkeletonResource.h"
#include "OgreRenderingModule.h"
#include <Ogre.h>
namespace OgreRenderer
{
OgreSkeletonResource::OgreSkeletonResource(const std::string& id) :
ResourceIn... |
34713a76134899bf2f3f90a9bdcd14d27865308e | 83a03fb7ed320b5150d337542e6e582cdde0b469 | Milchshakee/SGpp | /base/src/sgpp/base/tools/OperationQuadratureMC.cpp | C++ | cpp | 5,830 | permissive | // Copyright (C) 2008-today The SG++ project
// This file is part of the SG++ project. For conditions of distribution and
// use, please see the copyright notice provided with SG++ or at
// sgpp.sparsegrids.org
#include <sgpp/base/datatypes/DataMatrix.hpp>
#include <sgpp/base/datatypes/DataVector.hpp>
#include <sgpp/b... |
b9abf291aa739d8b322e8f67aff2f2ccdcbb0686 | 541ab93e4dad82b5c41a73c34dd48e609552fa4a | CliffLinTw/gamer | /src/Model_ELBDM/ELBDM_SetTaylor3Coeff.cpp | C++ | cpp | 3,710 | permissive | #include "GAMER.h"
#if ( MODEL == ELBDM )
//-------------------------------------------------------------------------------------------------------
// Function : ELBDM_SetTaylor3Coeff
// Description : Optimize the coefficient of the third-order term in the Taylor expansion
//
// Note : 1. The optimiza... |
f41e133dac61e4fbda820c1b8d35072ced7619bd | 921932469e6a1af63da3dc6478df92983b241ba3 | minblock/timecoin | /src/rpc/blockchain.cpp | C++ | cpp | 103,201 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2019 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 <rpc/blockchain.h>
#include <amount.h>
#include <base58.h>
#include <chain.h... |
9991ebb669f410e00c86d7fea0a89e84dfd1d44b | 35969e650ee9e0a08aa1b960b729dda66efd2fde | IohannRabeson/oglu | /src/Oglu/Window/ContextSettings.cpp | C++ | cpp | 1,639 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ContextSettings.cpp :+: :+: :+: ... |
a61a91efeef1f3320ede648f1afca6a11460f46c | 1208b740831ff489a790a97878146bda635c8a70 | jtg-gg/chromium.src | /chrome/browser/printing/print_preview_dialog_controller_browsertest.cc | C++ | cc | 13,952 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/bind_helpers.h"
#include "base/location.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#inc... |
f38f08a68cb3da797c415b3a1a32ac1f606aa52b | c71cf4b9f62477ce2a48c24bcc0f1dc788852d59 | jfreax/libgdx-cpp | /src/gdx-cpp/utils/XmlReader.cpp | C++ | cpp | 22,567 | permissive |
/*
Copyright 2011 Aevum Software aevum @ aevumlab.com
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 requi... |
44418f9a5ebf44423008175e7a6ddb6b2cdf39ba | 29c27104bcabfe802892c6c489ca4d32df2db0cd | matteodefra/Focproject | /client_main.cpp | C++ | cpp | 5,827 | no_license | ///////////////////////////////////////////////////////////
/////////////////////CLIENT MAIN////////////////////////
///////////////////////////////////////////////////////////
// #ifdef CLIENT_MAIN
#include <iostream>
#include <signal.h>
#include "include/tcp_client.h"
using namespace std;
TcpClient client;
/**
... |
ac17aa467118a50e64af41c2951b12dd9953993e | 61b38f2746aa427a8e26c248101d770409c9ba29 | damody/surgery-navigition-test | /oglMFCDialog/oglMFCDialog/math/Matrix3.cpp | C++ | cpp | 40,577 | no_license | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2009 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obta... |
8d4f3ea5e297ad0547d8861845dfe3ca7bec35c1 | 955771b505c084bc85bbdcfe8f6d0e944fe574ec | green-fox-academy/tothlilla | /week-02/day-2/Ex_01_pointer_type/main.cpp | C++ | cpp | 522 | no_license | #include <iostream>
int main ()
{
// Create a pointer for each variable and print out the memory addresses of that variables
// Print out the values of the pointers
int a = 31;
double b = 432.2;
std::string name = "Bob";
int* p_a = &a;
double* p_b = &b;
std::string* p_name = &name;
... |
13134ef901f51e788fd27798a510e4e761714da2 | 440803f3db93a8cda44ab291c86f435bbe73129a | neilssibug/TI_MSOptimizer | /MSOpt codebase/MSOpt_v4.0_Shihui/BCP32/include/coin/CoinIndexedVector.hpp | C++ | hpp | 25,076 | no_license | // Copyright (C) 2000, International Business Machines
// Corporation and others. All Rights Reserved.
#ifndef CoinIndexedVector_H
#define CoinIndexedVector_H
#if defined(_MSC_VER)
// Turn off compiler warning about long names
# pragma warning(disable:4786)
#endif
#include <map>
#ifndef CLP_NO_VECTOR
#include "Coin... |
4796ddb5e283f37520e35cc8f3578d6bc1fbd07c | f6f3d367341e1e20d8b2a633b29cd7c09eedf4c6 | atapia27/Alien-Attack | /AlienGame.cpp | C++ | cpp | 1,805 | no_license | #include <QApplication>
#include <QFont>
#include <QGraphicsTextItem>
#include <QGraphicsScene>
#include<QGraphicsView>
#include <QTimer>
#include <QLabel>
#include <QString>
#include "AlienGame.h"
#include "SpaceShipPlayer.h"
#include "AlienEnemy.h"
#include <QMediaPlayer>
#include <QPicture>
#include <QB... |
7b856ac69a7b4ebce101a03b0bf476c020764ab7 | 33db1f3c9df4d95fe90c02806f1635d8ac34a49d | baldurk/renderdoc | /renderdoc/android/android_utils.cpp | C++ | cpp | 24,496 | permissive | /******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2019-2023 Baldur Karlsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in... |
eb4854f5bf742b30c18a84a0f1a7d729bb95f387 | 023e20c73c0a41c9459b69b3b2dc697679d50a64 | lumina-desktop/lumina | /src-qt5/core/lumina-desktop/panel-plugins/audioplayer/PPlayerWidget.cpp | C++ | cpp | 10,116 | permissive | //===========================================
// Lumina-DE source code
// Copyright (c) 2015, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#include "PPlayerWidget.h"
#include "ui_PPlayerWidget.h"
#include <QDir>
#includ... |
e18f4216d4dcf95d6cfb42ac20384f389bf7a770 | 0673db1ca77b864559496004bd09bbda05c326be | Stypox/neural-network | /C++/src/deb.hpp | C++ | hpp | 1,061 | no_license | #ifndef _DEB_HPP_
#define _DEB_HPP_
#include <iostream>
#include <cmath>
#include "nn/utils.hpp"
// TODO remove this file, useful only for debugging
inline void deb() {std::cout<<"\n"<<std::flush;}
template<class T, class... Ts> void deb(T t, Ts... args) {
if constexpr(std::is_same_v<T,std::vector<nn::flt_t>> || std... |
dad6e43eb60b6e12e0feb55e1588e76021b31f63 | 4ce61a7746dab1a3185431f948bb04e03fa6bc0b | Ansh-Sarkar/OpenColorIO | /src/bindings/python/PyFileTransform.cpp | C++ | cpp | 2,890 | permissive | // SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.
#include "PyTransform.h"
namespace OCIO_NAMESPACE
{
namespace
{
enum FileTransformIterator
{
IT_FORMAT = 0
};
using FormatIterator = PyIterator<FileTransformRcPtr, IT_FORMAT>;
} // namespace
void bindPyFileTransfor... |
6ecfaadbdcc74ec65980657f97d8ef2ff4c1c4f4 | cbccc1593c5ce10441ee1d69b9a9739b56aec71a | gscept/nebula | /code/foundation/io/zipfs/zipfilestream.cc | C++ | cc | 7,087 | permissive | //------------------------------------------------------------------------------
// zipfilestream.cc
// (C) 2006 Radon Labs GmbH
// (C) 2013-2020 Individual contributors, see AUTHORS file
//------------------------------------------------------------------------------
#include "io/zipfs/zipfilestream.h"
#include "i... |
7038a768eed124050487a34ded92acd8f3c4d169 | d97e9993d88b9538eb90282b7929998d198415d5 | dougnobrega/CodeForces | /div2/552/D.cpp | C++ | cpp | 1,422 | no_license | #include <bits/stdc++.h>
using namespace std;
// Prioridade
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pii> vpi;
typedef vector<pll> vpll;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define RE... |
057a52b82dd0a77e18c177c72d96a9a52ca0a6bc | d399575c6c6552f589ea25169ebe220da78fed7f | StevenLOL/bob | /src/core/test/blitzArray.cc | C++ | cc | 14,210 | permissive | /**
* @date Tue Jan 18 17:07:26 2011 +0100
* @author André Anjos <andre.anjos@idiap.ch>
*
* @brief Extensive Blitz Array tests
*
* Copyright (C) Idiap Research Institute, Martigny, Switzerland
*/
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE Core-BlitzArray Tests
#define BOOST_TEST_MAIN
#include <boost/... |
5f1cef3d9c04c2661136ec2be520fd6d62b726bb | 6c9eb4a3595d25d1ad8969871b59f1139aaabad2 | claq2/adventofcode2018 | /AdventOfCode2018/AdventOfCode2018Lib/Day02/Day02.cpp | C++ | cpp | 2,156 | no_license | #include "stdafx.h"
#include "Day02.h"
Day02::Day02()
{
}
Day02::~Day02()
{
}
int Day02::Part1(vector<string> boxIds)
{
int countOfTwoCharaters = 0;
int countOfThreeCharacters = 0;
for (auto const& s : boxIds)
{
if (HasTwoRepeatedCharacters(s))
{
countOfTwoCharaters++;
}
if (HasThreeRepeatedCharacte... |
4b3e8a39d106c7be6650a26b3c53e7a2166d1895 | 2799ec92ba0658179e2f261fab713926b3d46e04 | jskripsky/ancient | /KOE/KONAS/EFLDWIN.CPP | C++ | cpp | 701 | no_license | #include "EFldWin.H"
#include "EntryFld.H"
//==========================================================
//=== constructors and destructor ========================
//==========================================================
EntryFieldWindow::EntryFieldWindow( Field *field, zWindow *parent ) :
Presentatio... |
9f91773bc50f9fe11c96d030c780d6182c013e77 | b0ac7f0eb9512b5c2c0d0f83ca3139c406243fcd | jwitz54/Halide-2016-HLS | /prog/MultTest/mult.cpp | C++ | cpp | 15,722 | permissive | #include <iostream>
#include <math.h>
#include <float.h>
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include "ap_int.h"
#include "../src/TestTypes.h"
#ifndef HALIDE_ATTRIBUTE_ALIGN
#ifdef _MSC_VER
#define HALIDE_ATTRIBUTE_ALIGN(x) __declspec(align(x))
#else
#define HALIDE... |
e5f9e5fe27554c4326597e7f1b52183904e94b80 | c068753d0b67a48a749aa2af63affe788af798fc | Hryts/myshell2 | /builtins/mpwd.cpp | C++ | cpp | 577 | no_license | //
// Created by heeve on 29.09.20.
//
#include "../headers/builtins.h"
#include <unistd.h>
#include <iostream>
#include <vector>
#define MAX_PATH 128
int mpwd(const std::vector<std::string> &args, bool bHelp) {
if (bHelp) {
std::cout << "myshell: mpwd usage: mpwd [-h|--help]\n";
return 0;
}
... |
1322ce9a456cf8a01bd681edfe489520f44121d4 | df51ab6c94f4ddfa8d136919a2d462d5cb190fcc | ShankarNara/CompetitiveProgrammingSolutions | /codeforces/652C.cpp | C++ | cpp | 854 | no_license | #include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define oo 1000000010
#define mod 1000000007
#define x first
#define y second
using namespace std;
void solve(){
ll n,k,i;
cin >> n >> k;
vector<ll> a(n),w(k);
for(i=0;i<n;i++) cin >> a[i];
for(i=0;i<k;i++) cin >> w[i];
sort(a.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.