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 |
|---|---|---|---|---|---|---|---|---|
541997d2010d30b8e1e9eadcc6368b701bb142b3 | b2511ebdb70e59ebfa72b8f59001bfe147ac2d97 | unidevop/sjtu-project-pipe | / sjtu-project-pipe/thirdparties/VTK.Net/src/Common/vtkTypeInt16ArrayDotNet.cxx | C++ | cxx | 3,051 | permissive |
// managed includes
#include "vtkDotNetConvert.h"
#include "vtkTypeInt16ArrayDotNet.h"
#include "vtkObjectDotNet.h"
// native includes
#include "strstream"
#include "vtkTypeInt16Array.h"
#include "vtkObject.h"
using namespace System;
namespace vtk {
System::String^ vtkTypeInt16Array::GetClassName(... |
e15dd89e1f623bfcf4e39fa210ae1109f13cea58 | 41cad3163820edef2c990f3579695152341570d0 | Dilaz/WC3-Mousecapture | /wc3mousecapture.cpp | C++ | cpp | 2,608 | no_license | #include "wc3mousecapture.h"
WC3MouseCapture::WC3MouseCapture(QWidget *parent)
: QWidget(parent), m_icon(QIcon(ICON_NAME), this), m_timer(this), m_menu(this),
m_exitAction(EXIT_ACTION_TITLE, this), m_isDisabled(false) {
// Set up trayicon
m_icon.show();
// Hide widget
//QTimer::singleShot(0, this, SLOT(h... |
19ae6e88e0d16701c742e6c3beadc0eb19b5b3f0 | 02eb0e619aa885f9c50fb5d7c8ff8409577477cf | lye/bx | /tests/tokenizecmd.cpp | C++ | cpp | 1,407 | permissive | /*
* Copyright 2012-2014 Branimir Karadzic. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include "test.h"
#include <bx/tokenizecmd.h>
#include <string.h>
TEST(tokenizeCommandLine)
{
#if 0
const char* input[] =
{
" ",
"\\",
// "\"a b c\" d e",
"\"ab\\\"c\" \"\\\... |
4e3c163a5474f63d08a009480d6e39d4f926b445 | e8d89677d723a916df61ab2d5ac22c03b010d788 | vishalbelsare/pwsafe | /src/os/mac/mem.cpp | C++ | cpp | 791 | permissive | /*
* Copyright (c) 2003-2021 Rony Shapiro <ronys@pwsafe.org>.
* All rights reserved. Use of the code is allowed under the
* Artistic License 2.0 terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license-2.0.php
*/
/**
* \file MacOS-sp... |
36fe48fc9525cee1fd9ed345e234bf1fe939e636 | 1adcf4a5b1c595b0c48307f373b034f5499de964 | wendellalves/wendellalves.github.io | /trocaregioes.cpp | C++ | cpp | 1,371 | no_license | #include <iostream>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main(int, char**){
Mat image, imageAux;
Vec3b val;
image= imread("biel.png",CV_LOAD_IMAGE_GRAYSCALE);
imageAux = image.clone();
if(!image.data)
cout << "nao abriu biel.png" << endl;
namedWindow("janela"... |
24dbc8e03f7bb09a0fb1f6d1714c912deb0de6c1 | 92f1caa873ac93e05fb0882ecacf73701944703f | ExpLife0011/libcommon | /src/io/FdType.hxx | C++ | hxx | 2,063 | no_license | /*
* Copyright 2007-2017 Content Management AG
* All rights reserved.
*
* author: Max Kellermann <mk@cm4all.com>
*
* 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 reta... |
829ae906afb1f5c3668d70fd4cf4f2036f7854ac | 9ca2855c43c6b0296e63afc538cab3058cab9576 | lfisher5/CPSC-122 | /calcTst.cpp | C++ | cpp | 234 | no_license | #include <iostream>
using namespace std;
#include "calc.h"
int main(int argc, char* argv[])
{
Calc* C = new Calc(argc, argv);
C->DisplayInFix();
C->InFixToPostFix();
C->DisplayPostFix();
C->Evaluate();
delete C;
return 0;
}
|
902a53404ad2c66cfca1fd4db2c042337fbc8dc5 | cc06c25b68e0625a2e036d2d7c2168d49b0c48b1 | Guardian820/Teal | /include/def/systemdef.hpp | C++ | hpp | 546 | permissive | // Copyright (C) 2019 Samy Bensaid
// This file is part of the Teal project.
// For conditions of distribution and use, see copyright notice in LICENSE
#pragma once
#ifndef SYSTEMDEF_HPP
#define SYSTEMDEF_HPP
namespace Def
{
constexpr int RandomMovementSystemUpdateOrder { 1 };
constexpr int AISystemUpd... |
a73f89c09fb1e792deb15c7dc4769f772fc11d66 | 0ee3d6a5e977b2bc26ca4f9fa2bf478032e19048 | J-N/swganh | /src/swganh_core/spawn/spawn_service.cc | C++ | cc | 1,468 | permissive | // This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include "spawn_service.h"
#include <algorithm>
#include <memory>
#include "swganh/logger.h"
#include "swganh/service/service_manager.h"
#include "swganh_core/simulation/simulation_service... |
995441ac38ffb80498fff572b7ea098cec629838 | 3437d68cee2be5d9f9c31a22d9d0af9ecca21a49 | patflick/dcpu-cc | /astnodes/declaration/TypeNameSpecifier.cpp | C++ | cpp | 1,502 | no_license | ///
/// @addtogroup LibDCPU-CI-Lang-C/AST-Nodes
/// @{
///
///
/// @file TypeNameSpecifier.cpp
/// @brief Definition of the TypeNameSpecifier AST node.
/// @author Patrick Flick
///
#include "TypeNameSpecifier.h"
using namespace dcpucc::astnodes;
// calls acceptPreRecursive(visitor) for all children ... |
7f440df7b8762b805490af84d0edf4baaa6e0224 | 8301931b8e436a4283107c3f53bd72ba8d46e8f9 | ldkars/qt_data_base_client | /clientwindow.cpp | C++ | cpp | 7,007 | no_license | #include "clientwindow.h"
#include "ui_clientwindow.h"
ClientWindow::ClientWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::ClientWindow)
{
ui->setupUi(this);
categoryDevice = new QSqlQueryModel(this);
bookDevice = new QSqlQueryModel(this);
feedBackDevice = new QSqlQueryModel(this);
}
... |
65483b8c80378d6dad4ba6812b246bb046dcffcf | 2b84488e2142e3596b180b76aa26d676a0746d33 | RaresCristescu/Jocuri | /Mini_joc/main.cpp | C++ | cpp | 1,286 | no_license | #include <iostream>
#include<time.h>
#include<stdlib.h>
using namespace std;
class joc
{
static int a;
public:
joc(){
a=rand()%13+1;}
friend bool operator >(joc j,int a);
friend bool operator <(joc j,int a);
int get_a(){return (*this).a;}
void roll(){
a=rand()%13+1;}
};
int joc::a;
... |
1655ab798b5aaed6e441e674015800f81f20eee1 | 7bbad22fb623305ed5ef15bc0e2019d9659dc16d | AntoineMeckert/Lab3 | /OpenCVDefault/Traitement.cpp | C++ | cpp | 12,747 | no_license | #include "stdafx.h"
#include "device_launch_parameters.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/types_c.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
#include "Traitement.h"
#include <math.h>
using namespace std;
using namespace cv;
CTraitem... |
cc986e00a5ce81ca71da7698602d773bfda97f94 | 1502b70408c425981e55940a788b2af18c32590b | sadrulhc/chromium | /chrome/browser/sharesheet/sharesheet_action_cache.cc | C++ | cc | 2,188 | permissive | // Copyright 2020 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/sharesheet/sharesheet_action_cache.h"
#include "chrome/browser/sharesheet/share_action.h"
#include "chrome/browser/sharesheet/sh... |
057b41beb551a23cc897cee2a0c5eb1eb2353b77 | d77d8db4900e89aec253430f3d9f389f8bd11a77 | Zeta115/Comodines | /L10_Project_Gamepad_and_Fullscreen_handout/Source/ModuleAudio.cpp | C++ | cpp | 2,791 | permissive | #include "ModuleAudio.h"
#include "Application.h"
#include "SDL/include/SDL.h"
#include "SDL_mixer/include/SDL_mixer.h"
//#pragma comment( lib, "SDL_mixer/libx86/SDL2_mixer.lib" )
ModuleAudio::ModuleAudio(bool startEnabled) : Module(startEnabled)
{
for(uint i = 0; i < MAX_FX; ++i) soundFx[i] = nullptr;
}
ModuleAud... |
e2a7c83849a41f9c905746850d2017dd5e60d798 | 20edef3e6016fe68d587ad847c56b6f8424c1eac | ChandanKSingh/cpp-taskflow | /unittests/serializer.cpp | C++ | cpp | 22,098 | permissive | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest.h>
#include <taskflow/utility/serializer.hpp>
#include <random>
// ----------------------------------------------------------------------------
// Random generator utilities
// ----------------------------------------------------------------------------
//... |
aac975901da65010d1843b4489b41a40459a635c | aad42c46b0dafd64eb55801f77bb86f542f610df | Xrysnow/LuaSTG-x | /frameworks/LuaBindings/lua_Triangles_auto.cpp | C++ | cpp | 15,619 | permissive | #include "lua_Triangles_auto.hpp"
#include "../Classes/XTriangles.h"
#include "scripting/lua-bindings/manual/tolua_fix.h"
#include "scripting/lua-bindings/manual/LuaBasicConversions.h"
#include "Util/UtilLuaConversion.h"
using lstg::lua::luaval_to_native;
using lstg::lua::native_to_luaval;
#define color4b_to_luaval lst... |
dc303e665101e024383090eb3c345f9d2790fb10 | fd59525d13d4a3f1bb1776eb6ee3d27e857fabcd | stden/olymp | /ru-olymp-train-winter-2009/Submits/081225/11_37_45_15_B_3452.cpp | C++ | cpp | 2,451 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <deque>
using namespace std;
typedef long long int64;
typedef vector<int> tlong;
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; i--)
#define... |
15112e488314928a6fdba0c65534df882a463e74 | af31c3faac6a4d14aee679672b667cd9a0e93bd8 | slava77/emu | /base/src/common/utils/Cgi.cc | C++ | cc | 7,253 | no_license | // $Id: Cgi.cc,v 1.3 2012/06/21 12:22:03 banicz Exp $
#include "emu/utils/Cgi.h"
#include "cgicc/HTMLClasses.h"
#include "toolbox/regex.h"
#include "xdaq/Application.h"
#include <exception>
#include <sstream>
#include <iostream>
std::multimap<std::string, std::string>
emu::utils::selectFromQueryString( std::vector... |
13178501d1ef4c419acbdc929d6c372f0906ad8b | 40f07680466514d6c3f1495ca46ddf305f1ca14a | md143rbh7f/competitions | /acm-icpc/nordic/06/shoot-out.cpp | C++ | cpp | 2,109 | no_license | #include <cmath>
#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<double> vd;
#define range(i,a,b) for(auto i=(a);i<b;i++)
#define rep(i,n) range(i,0,n)
#define CLR(i,x) memset(i,x,sizeof(i))
#define clr(i) CLR(... |
28947e03305a615de414b3225ddb943f05efd159 | f4b4fae5b14f25aa611092b371307ad0b12bcbf7 | google/or-tools | /ortools/lp_data/lp_decomposer.cc | C++ | cc | 6,692 | permissive | // Copyright 2010-2022 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... |
c8600611443d7261ec0a7d8e8006d32f94aeb5e6 | 035aaeffaf358ca51dc6eed971f64be7155de5a5 | zidoshare/cocos2dx-project | /winmine/Classes/stack.cpp | C++ | cpp | 753 | no_license | #include "stack.h"
#define size 100
stack::stack()
:top(0), length(0)
{
sck = new mp*[size];
/*if (!sck)
return ;*/
//ÉêÇëÄÚ´æÊ§°Ü²Ù×÷
}
stack::~stack()
{
}
stack* stack::create(){
auto s = new stack();
return s;
}
void stack::destroyStack(){
delete[] sck;
}
bool stack::clearStack(){
destroyStack();
sck... |
9a25b43423767a40b816f2ff95af40eae6fd0314 | 23a411d3907b07b5dde9d11ecb9135a638114e7e | JosueULL/ull_mdv_poptv_dx12 | /src/GameUI.cpp | C++ | cpp | 1,966 | no_license |
#include "GameUI.h"
#include "TestScene.h"
#include "Scene.h"
#include "System.h"
#include "LevelMap.h"
#include "Window.h"
GameUI::GameUI(Scene* scene, LevelMap* map) :
numKeys_(0)
{
matKey_ = scene->AddSpriteMaterial("key", "Assets/Textures/keyUI.png");
matNoKey_ = scene->AddSpriteMaterial("noKey", "Assets/Tex... |
81f5b17e0a95976e60646f4c9da41eebf589c1ea | 9a50ade2743fb274ddb9fa5e173a871843f4eb98 | Aloalo/Trayc | /EngineTester/DebugView.cpp | C++ | cpp | 3,709 | permissive |
#include "DebugView.h"
#include <Engine/Engine/Renderer.h>
#include <Engine/Engine/ShadowProjectionRenderPass.h>
#include <Engine/Engine/ShadowRenderPass.h>
#include <Engine/Engine/DebugDraw.h>
#include <Engine/Utils/Setting.h>
#include <easylogging++.h>
using namespace engine;
using namespace glm;
DebugView::DebugV... |
b7290335d6e8f257fe4c5a19b1f5e66b6f6ebc8e | a49b46ca06222c40d1dec6e434078122544d1661 | isliulin/ZKCD | /Package/Launcher/arm/moc_ImageLoadingWidget.cpp | C++ | cpp | 2,591 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'ImageLoadingWidget.h'
**
** Created: Mon Dec 11 15:59:03 2017
** by: The Qt Meta Object Compiler version 62 (Qt 4.7.4)
**
** WARNING! All changes made in this file will be lost!
****************... |
6e1cbab68cee969dcbf8a0fb6d671445d6e0ca7f | 24bb6de61e5346aa5164a96d95a55933656b2f0c | riyagoel192/gfg_codes | /max_XOR.cpp | C++ | cpp | 760 | no_license | // { Driver Code Starts
//Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function Template for C++
class Solution
{
public:
int max_xor(int arr[] , int n)
{
//code here
int max=0;
for(int i=0;i<n;i++)
{
for(... |
4ef368a88270cf7ae43522d0afa20ffea826251d | 19e43e06769fd9a88dd51f715864b344d484ace5 | Ppoinsinet/cpp | /cpp4/ex01/Enemy.hpp | C++ | hpp | 465 | no_license | #ifndef ENEMY_HPP
#define ENEMY_HPP
#include <iostream>
#include <string>
class Enemy
{
protected:
int HP;
std::string type;
public:
Enemy(void);
Enemy(const Enemy &tmp);
Enemy(int hp, std::string const& type);
virtual ~Enemy();
Enemy &operator=(const Enemy &tmp);
int getHP() const;
... |
60132e3fd7c721f8186932dea4c27aaf1c1d81a5 | 6e849c254cd0fba538e456a43065c8b7decce039 | talhacali/Orbit | /Orbit/Dependencies/Renderer/Texture.cpp | C++ | cpp | 893 | no_license | #include "Texture.h"
namespace Orbit
{
Texture::Texture(std::string textureFilePath, GLenum internalFormat, GLenum format,
GLenum wrapS, GLenum wrapT, GLenum filterMin, GLenum filterMax)
{
data = stbi_load(textureFilePath.c_str(), &this->width, &this->height, &fileChannels, 0);
glGenTextures(1, &this->ID);
... |
0b69c885842c4120c517f0a9d8945bd8cb3d1833 | 9e69238b180aa16fb31a63796638d09b9a763175 | edianfranklin/ClustGClosed2 | /KmerStream/RepHash.hpp | C++ | hpp | 2,846 | no_license | #ifndef REPHASH_H
#define REPHASH_H
#include <stdint.h>
#include <cassert>
#include <time.h>
static const unsigned char twin[32] = {
0, 20, 2, 7, 4, 5, 6, 3,
8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 1, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31
};
struct state_t {
uint64_t hi;
uint64_t lo;
state_... |
9f0721b4536eb1888c7738a71909a5eec968837f | 26c76ed9a04c859a5554c2fb58a7fd2b7c1a31ac | foreverlei/qnmahjongclient | /dev/cocos2d-x-2.2.6/CocosEasy/Utility/MVC/CCIModule.cpp | C++ | cpp | 1,498 | permissive | #include "CCIModule.h"
#include "Mvc.h"
namespace Engine
{
void CCIModule::registerMediator( const string &name )
{
m_vecMediatorName.push_back(name);
}
void CCIModule::registerCommand( const string &name )
{
m_vecCommandName.push_back(name);
}
void CCIModule::registerProxy( const string ... |
41b23ef5adbfc52f56c2bcd4b2b1c2ce84d684b7 | 0624628e9d61e051ae8a8f693c4a75ebd803e5cb | gianlucafiacco/RoboCup | /Src/Modules/Perception/PenaltyMarkPerceptor.cpp | C++ | cpp | 10,966 | no_license |
#include "PenaltyMarkPerceptor.h"
#include "Tools/Debugging/DebugDrawings.h"
#include "Tools/Debugging/Annotation.h"
#include "Tools/Math/Transformation.h"
#include "Representations/Perception/BallPercept.h"
#include <algorithm>
#include <vector>
void PenaltyMarkPerceptor::update(PenaltyMarkPercept& penaltyPoint)
{
... |
12703c98cee16776884126c362ea85ffaccef57a | 9589cb59d417901fadc05e7c82f16f31f5a24912 | albf/PINocchio | /PINocchio.cpp | C++ | cpp | 24,307 | permissive | /* PINocchio.cpp
*
* Copyright (C) 2017 Alexandre Luiz Brisighello Filho
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
// Sync related
#include "sync.h"
#include "trace_bank.h"
// Pin related
#include <unistd.h>
#include <iostream>
... |
a895b3829c3fa1a7bbe1367cb5312bc3a857ab22 | 71f8f5e3cce32bb4b5074f64cc61518f5ac46fde | alicanalbayrak/javolution | /test-cpp/src/main/c++/javolution/osgi/ServiceAImpl.hpp | C++ | hpp | 934 | permissive | /*
* Javolution - Java(TM) Solution for Real-Time and Embedded Systems
* Copyright (C) 2012 - Javolution (http://javolution.org/)
* All rights reserved.
*/
#ifndef _JAVOLUTION_OSGI_SERVICE_A_IMPL_HPP
#define _JAVOLUTION_OSGI_SERVICE_A_IMPL_HPP
#include "javolution/lang/Object.hpp"
#include "javolution/osgi/Service... |
9ecc03de5c16b3f7b14c8b7dec98c41d954db138 | d9c6014a6b5e1722266be171c898e0f3f30683e1 | hotkeysoft/digitalsim | /DigiLib/BasicGates/DFlipFlopSR.cpp | C++ | cpp | 3,377 | no_license | #include "stdafx.h"
#include "NANDGate.h"
#include "NOTGate.h"
#include "DFlipFlopSR.h"
namespace DigiLib {
namespace BasicGates {
using namespace DigiLib::Core;
DFlipFlopSR::DFlipFlopSR() noexcept : CompositeGate("dflipflopsr")
{
}
void DFlipFlopSR::Init()
{
GateBase::Init();
Ad... |
819bd3c4e7a11ab101fee993952e4311837dc852 | d043f560ee7884287be4113eb4aed6f8dd7eb933 | justvdlinde/Heavy-OOP | /Opdracht 5/main.cpp | C++ | cpp | 259 | no_license | #include "BankAccount.h"
#include <iostream>
using namespace std;
int main() {
BankAccount account;
Transaction* t = new Transaction(1337);
account + *t;
t = new Transaction(-337);
account + *t;
delete(t);
cout << account << endl;
return 0;
}
|
9551c8bb8cca529bbf387e17cef078cca6f91435 | 5106124f25074370122213a6d5fc20e73a4c2ba8 | niuxu18/logTracker-old | /second/download/curl/gumtree/curl_repos_function_432_curl-7.15.0.cpp | C++ | cpp | 1,451 | no_license | CURLcode Curl_http_done(struct connectdata *conn,
CURLcode status)
{
struct SessionHandle *data;
struct HTTP *http;
data=conn->data;
http=conn->proto.http;
/* set the proper values (possibly modified on POST) */
conn->fread = data->set.fread; /* restore */
conn->fread_in = data->... |
4a021992d0faaf9ec7b6a0b97a44676e0ef1ff61 | 717cbe24f937f029e2150cb0b9eb51f9211fa626 | martinhetschel/Biegemaschine1 | /mainwindow.cpp | C++ | cpp | 1,041 | no_license | #include <iostream>
#include <QMessageBox>
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(testMH()));
connect(ui->... |
203e44cec498480d62686b9f2ec49e8489a47184 | 29e7a2288b1db523730b17d079c6738a8c600644 | cnxtech/Fluff | /src/interfaces/javascript_interface_chakra.cc | C++ | cc | 1,705 | permissive | #include "fuzz_target.h"
#if FUZZ_CHAKRA == 1
#include <string>
#include "ChakraCore.h"
#include "javascript_interface.h"
#define FAIL_CHECK(cmd) \
do { \
JsErrorCode errCode = cmd; \
if (errCode != JsNoError) { ... |
c364b43d004b2d2b4b534aa6d7e9784c4b84b24f | 5c5171236d33f4c3f64cea4d7031f26547cc7f7e | WPISmartmouse/2016_Solvers | /lib/common/commands/StepSolveMaze.cpp | C++ | cpp | 790 | no_license | #include "StepSolveMaze.h"
#include "Forward.h"
#include "Turn.h"
#include "WaitForStart.h"
StepSolveMaze::StepSolveMaze(Solver *solver) : CommandGroup("step_solve"), solver(solver) { }
void StepSolveMaze::initialize(){
solver->setup();
}
void StepSolveMaze::execute(){
CommandGroup::execute();
}
bool StepSolveM... |
b61e4ff4494034a5023a48078f27b2eb5e49d9db | a6f3ab1efaf6ea7d33282c5b3de1cd650bc39df7 | Chikdolman/Castanets | /third_party/WebKit/Source/core/paint/ThemePainter.cpp | C++ | cpp | 15,515 | permissive | /**
* This file is part of the theme implementation for form controls in WebCore.
*
* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published ... |
0110660b4e6a4f58589decf47a076b10ae4eda98 | 42171c0091d654586ba107f1e278a6e4b581479e | xiaoruiguo/incubator | /libcaf_net/src/network_socket.cpp | C++ | cpp | 6,740 | no_license | /******************************************************************************
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor *
... |
181e6bb2fab38390bb08d5d64eafe0426ca72d27 | ffc22051239a9ec86dd6ae4197917f0ba90e215e | Satoex/Sato | /src/chainparamsbase.cpp | C++ | cpp | 2,807 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2017-2019 The Sato Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparamsbase.h"
#inc... |
49f43b65aae4b3a96ec7b3997ecfa50016fa4864 | a2bcea29663b3b004778118f6ebb0ab2bfe53984 | rbakker96/CPP | /D08/ex01/main.cpp | C++ | cpp | 3,091 | no_license | /* ************************************************************************** */
/* */
/* :::::::: */
/* main.cpp :+: :+: ... |
282568099dc6a43e15190e3220d88f9e0fc3b525 | b65f167daeb348afb5d033b72bad53f38de1cbb9 | erlhermit/v8 | /src/types.cc | C++ | cc | 44,566 | permissive | // Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <iomanip>
#include "src/types.h"
#include "src/ostreams.h"
#include "src/types-inl.h"
namespace v8 {
namespace internal {
// NOTE: If code... |
78d18ef5131c8cef66b8a64cfc22a8f50f9a2446 | 9bb8446ac378edfff63ccce0e5f0afdc77830719 | sjkelleyjr/codeforces | /622/A/A.cc | C++ | cc | 542 | no_license | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#define debug(args...) {dbg,args; cerr<<endl;}
#else
#define debug(args...) // Just strip off all debug tokens
#endif
struct debugger
{
template<typename T> debugger& operator , (const T& v)
{
cerr<<v<<" ";... |
59ce4b78822b1eb50db4b5df168b465bbf9e61dd | d25c70007ada823ab48ba78e406470d2f8c21b1b | bigbang87/Titac- | /Titac++/main.cpp | C++ | cpp | 889 | no_license | #include <SFML/Graphics.hpp>
#include <string>
#include <iostream>
#include "GameDelegate.h"
#include "Scenes.h"
#include "UIImage.h"
#include "DummyClass.h"
#include "Canvas.h"
int main()
{
std::string windowName = "TEST";
sf::RenderWindow window(sf::VideoMode(512, 512), windowName, sf::Style::Default);
std::cout... |
c8f6b8b73623a50ce479ddffcff745ddf09d0e27 | fb01871b05129baed1001e391cd72ec7d12cd8c0 | Wall-js/tensorflow | /tensorflow/lite/kernels/select.cc | C++ | cc | 9,830 | permissive | /* Copyright 2018 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... |
b98b87703d9b11e2c23f1d6c89c083bc6f4a7171 | d5fff0211e14f91bab010f2d9b753a2d37e5ff47 | TUXCMD/learning-reverse-engineering | /C++ Objects/2_class_virtual_functions.cpp | C++ | cpp | 350 | no_license | #include <stdio.h>
#include <iostream>
using namespace std;
class Ex2
{
int var1;
public:
virtual int get_sum(int x, int y){
return x+y;
}
virtual void reset_values(){
var1 = 0;
}
};
int main(int argc, char ** argv, char **envp) {
Ex2 *e = new Ex2();
e->get_sum(1,2);
e->r... |
b602493a3bbc10f8b9418a50c5450735ef9a1d68 | 7cf49ffe96ef1107c6c36224b04a2a34204c8ba3 | protocolbuffers/protobuf | /src/google/protobuf/dynamic_message_unittest.cc | C++ | cc | 13,135 | permissive | // Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// ... |
252a1b54c77673326ef551f63772f01583506088 | f8749389c5315d53376cd550d83ff4376a1a0169 | HeartCoder/CompetitiveProgramming | /CodeChef/DecemberChallenge2013/MagicPairs.cpp | C++ | cpp | 250 | no_license | #include<iostream>
using namespace std;
int main()
{
int t,n,input;
cin>>t;
while(t--)
{
long long count=0;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>input;
}
for(int i=1;i<=n-1;i++)
count+=i;
cout<<count<<endl;
}
return 0;
}
|
a33ae1e5306b595ee5b80516336c4f3904726cba | b4643641b77201fff9abe65765be57c38b1ea28e | DustinSchimel/DataStructures | /DataStructures/Testers/RecursionTester.cpp | C++ | cpp | 1,307 | no_license | //
// RecursionTester.cpp
// DataStructures
//
// Created by Schimel, Dustin on 3/5/18.
// Copyright © 2018 Schimel, Dustin. All rights reserved.
//
#include "RecursionTester.hpp"
int RecursionTester :: fib(int number)
{
if ( number == 0 || number == 1 )
{
cout << "Reached a base case" << endl;
... |
53a991af9e5b445cb51b4e3d01eba6366b5105f7 | 9768d7d075820447cbb3310d2815e19d57bbfa4f | mo-bay/oasis | /src/bloom.cpp | C++ | cpp | 7,892 | permissive | // Copyright (c) 2012-2014 The Bitcoin developers
// Copyright (c) 2017-2019 The oasis developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bloom.h"
#include "chainparams.h"
#include "hash.h"
#include "libzeroc... |
a98c407ffa1423cb99a0d0089de2613546355139 | 76f25622e439fbc6418e9f00d9fa7f9061a93f2a | tenspeed/Robotics_Projects | /328_Code/TWI_Master.cpp | C++ | cpp | 1,926 | no_license | //======================================================================================
/** \file TWI_Master.cpp
* Revisions:
* \li 03-12-14 Began working on TWI_Master.cpp
*
* License:
* This file released under the Lesser GNU Public License. The program is intended
* for educational use only, bu... |
c18f52dd88d8f42da5a4c96240a5c0b14dc0e725 | e4f4044e8013509875760755a6adabf05edc117c | MagicSHX/CarND-Extended-Kalman-Filter-Project-master | /src/kalman_filter.cpp | C++ | cpp | 1,953 | permissive | #include "kalman_filter.h"
using Eigen::MatrixXd;
using Eigen::VectorXd;
// Please note that the Eigen library does not initialize
// VectorXd or MatrixXd objects with zeros upon creation.
KalmanFilter::KalmanFilter() {}
KalmanFilter::~KalmanFilter() {}
void KalmanFilter::Init(VectorXd &x_in, MatrixXd &P_in, Matri... |
0b14bc896ba676dca2910951677509225d659147 | 866801599744143c7df508ef221c14a1f5d5c602 | stevethibault/DifferenceFormatter | /src/sdks/poco-1.5.3/Foundation/src/Timer.cpp | C++ | cpp | 4,092 | permissive | //
// Timer.cpp
//
// $Id: //poco/1.4/Foundation/src/Timer.cpp#3 $
//
// Library: Foundation
// Package: Threading
// Module: Timer
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Timer.h"
#include "Poco/Threa... |
b7fee5a978c59b16b90685bdc21af10d73bbeab3 | 32da225980f4266c3ad9b8863aecf5f37c23bd4b | HummaWhite/c2019 | /level1/p05_allPrimes/allPrimes.cpp | C++ | cpp | 545 | permissive | #include<cstring>
#include<cstdio>
#include<ctime>
const int L = 1002;
bool isPrime[L];
void getPrime() //ΟίΠΤΙΈ
{
for (int s = 0; s < L; s++) isPrime[s] = 1;
isPrime[0] = isPrime[1] = 0;
for (int s = 2; s < L; s++)
if (isPrime[s])
for (int t = 2; t*s < L; t++)
isPrime[s*t] = 0;
}
int main()
{
cl... |
dbc56058f2b238c773d9a1a39041f6d0491507da | 11ee5556d467dd8d67a74671d060c6a88c1a29f4 | hust-diangroup/LabelMark | /mainwindow.cpp | C++ | cpp | 2,628 | permissive | #include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
flag = ui->radioButton->isChecked();
qDebug()<<flag;
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow:... |
721cbea717a4cd9e770b8f86ec3aa85e945a74cc | e4c94c5383a0bd6d059cd92b1d002806255d705f | PaleAle0704/tdp | /TDP/Esercizi/TCPCpp/server.cpp | C++ | cpp | 374 | no_license | #include "Socket.hpp"
#define SRV_IP "0.0.0.0"
#define PORT 8989
int main(){
Address* mio;
ServerTCP* mySelf;
ConnessioneServer* cl;
char* msg;
mio = new Address(SRV_IP, PORT);
printf("ciao");
mySelf = new ServerTCP(mio);
cl = mySelf->accetta();
msg = cl->ricevi();
printf("%s\... |
1eb8fc63115a4caeff5f8a69c63f57b9d1bb09d9 | 10aa00e6fbef4b3c915e1a30e7b3c2cd93579571 | otcshare/chromium-src | /chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc | C++ | cc | 5,101 | 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 <memory>
#include <utility>
#include "base/test/values_test_util.h"
#include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h... |
d99a988a0bc30a53b688bdaa055a8fbf31e3fe99 | 36d426d96ea993ebf0ad2ce150afe41a63f54114 | jj4jj/pbdc | /pbdc/templates/cex.hpp | C++ | hpp | 16,376 | permissive | #ifndef _PB_{{file}}_CEX_AUTO_GEN_H_
#define _PB_{{file}}_CEX_AUTO_GEN_H_
//This file is generated auto by pbdc library , dont edit it directly .
//Any problem meet when using it , please contact mail:hex@gamesci.com.cn
{%for pkg in imports%}
#include "{{pkg}}.cex.hpp"
{%-endfor%}
#include "{{file}}.pb.h"
#inc... |
6ce34137c4d2735a6bbe23354b6200cbda17acfb | f1584c89d81fd3add1ab4af02a6792298b89d653 | Kansept/SanPasport | /SanPasport/ViewPlot/dialog/dialog_confizgraph.cpp | C++ | cpp | 2,763 | no_license | #include "dialog_confizgraph.h"
#include "ui_dialog_confizgraph.h"
#include <QDebug>
#include <QShowEvent>
Dialog_ConfizGraph::Dialog_ConfizGraph(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog_ConfizGraph)
{
ui->setupUi(this);
stngViewPlot = new QSettings((QCoreApplication::applicationDirPath... |
3398d18a45182b85b76550c20d7642baad817782 | 4dbb06874b3063783d3eb259ccaef5b8769bdfde | cronosdeveloper/Cronos | /src/init.cpp | C++ | cpp | 92,497 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2018 The Cronos developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or h... |
aa75297c18c16309c8cac229bae573b9ff90a087 | 784ac378c449d0d34cbf067ced30617a9d9a91c9 | averrin/hellfrost | /include/lss/game/content/weapons.hpp | C++ | hpp | 3,690 | permissive | #ifndef __WEAPONS_H_
#define __WEAPONS_H_
#include "lss/game/content/spells.hpp"
#include "lss/game/item.hpp"
namespace Prototype {
const auto SWORD = std::make_shared<Item>(
"iron sword", "ONE_HAND",
Effects{std::make_shared<MeleeDamage>(
DamageSpec(R::I(-2, 2), R::I(2, 4), R::I(2, 4), DamageType::WE... |
a05b142e795c73858c125dbe972f3d1e2e32a38e | 8066ce81b66b7a09975f83c4bf69412b98a2562b | AsmaaHailane/llvm2cpg | /lib/ProtoWriter/CPGEmitter.cpp | C++ | cpp | 52,037 | permissive | #include "CPGEmitter.h"
#include "CPGProtoBuilder.h"
#include "CPGProtoNode.h"
#include "CPGTypeEmitter.h"
#include "llvm2cpg/CPG/CPGFile.h"
#include "llvm2cpg/CPG/CPGMethod.h"
#include "llvm2cpg/CPG/CPGOperatorNames.h"
#include "llvm2cpg/Logger/CPGLogger.h"
#include <iomanip>
#include <llvm/IR/DebugInfoMetadata.h>
#in... |
3f57a83ffa8aeace82634375fbeb8debb5f27c73 | f1154e0f3a859cf08f5a0568e7f9875bba4c7b10 | pengdu/bubblefs | /src/utils/toft_storage_path_path_test.cc | C++ | cc | 2,930 | permissive | // Copyright (c) 2012, The Toft Authors. All rights reserved.
// Author: Liu Xiaokang <liuxk02@gmail.com>
// toft/storage/path/path_test.cpp
#include "utils/toft_storage_path_path.h"
#include <string>
#include <vector>
#include "gtest/gtest.h"
namespace bubblefs {
namespace mytoft {
TEST(Path, ToAbsolute)
{
c... |
f543fd3ba2846fe7e7354134984387887c3e7908 | c2754c1ed6756cf81a0cd8836af5ab8279c7f204 | mnlsm/upp_vc | /thirdpart/marisa/lib/marisa/grimoire/trie/louds-trie.cc | C++ | cc | 26,645 | no_license | #include <algorithm>
#include <queue>
#include <functional>
#include "lib/marisa/grimoire/algorithm.h"
#include "lib/marisa/grimoire/trie/header.h"
#include "lib/marisa/grimoire/trie/range.h"
#include "lib/marisa/grimoire/trie/state.h"
#include "lib/marisa/grimoire/trie/louds-trie.h"
namespace marisa {
namespace grimo... |
21f3bc988b1275c594868dc7b394ad9954eb1f3c | c5a00cf023b669791b8ca39b591d5fff568ce9c4 | weilewei/terarkdb | /terark-tools/batch-write-bench/batch_write_bench.cc | C++ | cc | 10,703 | permissive | // Copyright (c) 2020-present, Bytedance Inc. All rights reserved.
// This source code is licensed under Apache 2.0 License.
//
// This bench tool is used for batch writing bench.
//
// guokuankuan@bytedance.com
//
#include <rocksdb/db.h>
#include <rocksdb/filter_policy.h>
#include <rocksdb/iostats_context.h>
#include... |
72f724cf8e616bc847cf172386d1b4992ad1f35b | 92e84f31e2a7e21a202ee41a6dae4c7980a49c07 | ZhenyingZhu/ClassicAlgorithms | /src/CPP/src/pratice/SlidingWindowMedian.cpp | C++ | cpp | 2,265 | no_license | #include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <climits>
using namespace std;
// [Source]: https://leetcode.com/problems/sliding-window-median/#/description
// http://www.1point3acres.com/bbs/thread-226035-1-1.html
class Solution {
public:
vector<double> medianSlidingWindow(ve... |
9cbff73e35f28527734f514696c003a76d32a979 | 50401af1874c5130556c649836d0f540115f3ef3 | blighli/graphics2017 | /21651173杜晓晴/21651173杜晓晴第二次作业/Light.cpp | C++ | cpp | 2,614 | no_license |
#include "Angel.h"
class Light {
private:
vec4 light_position;
vec4 light_ambient;
vec4 light_diffuse;
vec4 light_specular;
vec4 material_ambient;
vec4 material_diffuse;
vec4 material_specular;
float material_shininess;
vec4 ambient_product;
vec4 diffuse_product;
vec4 specula... |
4dc8b2658de20a00b6298faa3588b6eafc0168f6 | 2202b75bb826ea1e769a0edeb88e4d331bd687c2 | treert/script_language | /src/onemore/mgc.cpp | C++ | cpp | 11,606 | no_license | #include "mgc.h"
#include "mtable.h"
#include "mfunction.h"
#include "mupvalue.h"
#include "mstring.h"
#include "muser_data.h"
#include <assert.h>
#include <time.h>
namespace oms
{
GCObject::GCObject()
: next_(nullptr), generation_(GCGen0), gc_(0), gc_obj_type_(0)
{
}
GCObject::~GCObject()
... |
ad67f4998ad32b65ad3f710fb00dd557aba62e02 | b47e484ace179eede3e52ad7bfbb09f71289e994 | AndresDuque/IoC-pattern-in-C- | /src/Examination.cpp | C++ | cpp | 530 | no_license | #include <ExaminationMapper.h>
Examination::Examination(){
m_id = 0;
interface = std::make_shared<ExaminationMapper>();
}
Examination::Examination(std::string examination_date, std::string comment, int id) {
m_examination_date = examination_date;
m_comment = comment;
m_id = id;
}
std::string Examination::ge... |
3ed032c80603ded5a6e7ac14581fbb8783005d1a | 76eb157f8e32395e16481a6ba535e789a7529347 | myousefi2016/MicrovesselChaste | /src/population/cell/properties/mutations/CancerCellMutationState.cpp | C++ | cpp | 1,985 | no_license | /*
Copyright (c) 2005-2016, 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... |
8c73762d3362e18d1e42a5f9f9a17f5d0798301a | d0eff1bd915059a64a70ae6a02929415efd0eb69 | supratim1/7-Day-Dsa-Challenge | /strings/toggle.cpp | C++ | cpp | 444 | no_license | #include<bits/stdc++.h>
using namespace std;
void toggleChars(char str[])
{
for (int i=0; str[i]!='\0'; i++)
{
if (str[i]>='A' && str[i]<='Z')
str[i] = str[i] + 'a' - 'A';
else if (str[i]>='a' && str[i]<='z')
str[i] = str[i] + 'A' - 'a';
}
}
int main()
{
char st... |
dbfe5a77f4bf3dd615c3837779d26786e2953d24 | 66e6c858a87ec64f9d4a9f5591087e164b9cace8 | dimalit/dialog-quest | /dq_project/LuaTimer.cpp | C++ | cpp | 861 | no_license | #include "PlatformPrecomp.h"
#include "LuaTimer.h"
void Callback::operator()(){
timer->fire();
}
LuaTimer::LuaTimer(luabind::object cb, float dt)
:Timer(Callback(this), dt)
{
this->cb = cb;
}
void LuaTimer::luabind(lua_State* L, const char* classname){
luabind::module(L) [
luabind::class_<LuaTimer... |
f2367397da41baeba6b0a3dfc59a34eb4c720d18 | 2839f8ad9a489b910b230e3ad313d264cfb9b1b3 | Lord-Surovtsev/3D_Point_Viewer | /scene.cpp | C++ | cpp | 2,617 | no_license | #include "scene.h"
#include <fstream>
#include <iostream>
using namespace std;
#include "stdlib.h"
#include "MathImplimintation.h"
#include "PointIsNotVisible.h"
Scene::Scene()
{
}
Scene::~Scene()
{
}
void Scene::addNewPoint(Point3D<double> p)
{
_points.insert(_points.end(),p);
}
int Scene::getCount()
{
... |
57e6a9d1415326fd6c9e430503a936ac52fd6a04 | 2e768f341b962571770fe2993cd601a5181ef92d | rathoresrikant/competitive-programming-solutions | /Codeforces/499B.cpp | C++ | cpp | 474 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long a, b;
cin>>a>>b;
map<string, string>M;
string s1, s2, ans = "";
long long l1, l2;
for(long long i=0;i<b;i++)
{
cin>>s1;
l1 = s1.size();
cin>>s2;
l2 = s2.size();
if(l1 <= l2)
M[... |
a24518c4ee2bdb2ac1ce120c12bd34f92caeda1b | 26576dcf2cd37e7f9b16727b85c899f37a349f08 | ruved/codingpractice | /vcontest/15a.cpp | C++ | cpp | 1,790 | no_license | /*A. Three swimmers
time limit per test1 second
memory limit per test512 megabytes
inputstandard input
outputstandard output
Three swimmers decided to organize a party in the swimming pool! At noon, they started to swim from the left side of the pool.
It takes the first swimmer exactly a minutes to swim across the enti... |
4968831cc97cf188d5f1e29994febfa891c22c76 | 2d55c2c59e249492a7104a660e1f12324e2eb32f | lucky529/Leetcode | /卡片分组/卡片分组/test.cpp | C++ | cpp | 681 | no_license | //24ms通过 使用map统计各卡牌的数量,并且判断两两之间是否存在最大公约数
class Solution {
public:
int getgys(int p, int q){
if (q == 0) return p;
return getgys(q, p%q);
}
bool hasGroupsSizeX(vector<int>& deck) {
map<int, int> mp;
for (auto& e : deck)
{
mp[e]++;
}
if (mp.size() == 1 && mp.begin()->second >= 2)
return true;
els... |
a246779a0f1be2134af2d14bfd7c321284cc775a | 81dbc1fb4aee1fc9f5fde3632cebcb9ebe9d4602 | Anjali2901/Launchpad_18Codes | /Lecture-09/Nqueen.cpp | C++ | cpp | 990 | no_license | // Nqueen
#include <iostream>
using namespace std;
bool isSafeToPutHere(int board[][10],int i,int j,int n){
for(int k=0;k<n;k++){
if(board[i][k]==1 || board[k][j]==1){
return false;
}
}
int r=i,c=j;
while(r>=0 && c>=0){
if(board[r][c]==1){
return false;
}
r--;
c--;
}
r=i;c=j;
while(r>=0 && c<... |
7fd24c5e025e509572cfa8dc011277feca6ba3d8 | b9e066d8358d354790d4c9ef6526873757fcb2c7 | svn2github/cpp-sp | /tags/2.2.1/shibsp/handler/impl/StatusHandler.cpp | C++ | cpp | 16,829 | no_license | /*
* Copyright 2001-2009 Internet2
*
* 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... |
ebca71b293fc338d6146026a0bd7647f3d3ef558 | 1c88cf8e62ac843f64218aec44e7772cf27988c3 | TianyiChen/rdcpp-data | /data/752.cpp | C++ | cpp | 13,677 | permissive | int XKHT
,
//6Ij
i5H
,
MCnvU,
WapC ,oG
, /*yio*/
MQf ,Cb7X,bjm,/*qAz*/
YFc0k, //
s8y,qk756, nx,/*tt8z*/ uENTp ,
Sh ,
y3p,L,
VUS ,
CzVJ,nIJ
,
FvVp ,
WV ,s5YV0H,H
,Xu,zL0
, u//s
,MCa ,atH /*Qv*/
,WP , k6x
, KBlE ,hW ,
sFdY,dYPN,
CTzz,
pwHf
,
Mk
,
LbJL7,
wL ,ee,wFc, Ll ,
//5Cr
Oi ,
G8, ngGipmzd
, NE,... |
51891b4590e206b427d105c20c7a1e440e64c6c9 | 7e34eab714d79ed7d8dcac434f58a60310e56f65 | suyashsachdeva/CPP-DSA-practise | /Call phor phun/DSA/Queue/Basics.cpp | C++ | cpp | 1,198 | no_license | // Queue is also a datastructure which works on First in First out
// This means that the element that is pushed first will also get popped first
#include<iostream>
using namespace std;
#define n 20
class Queue{
int* arr;
int front;
int back;
public:
Queue(){
arr = new int[n];
... |
b0080bb67270a786dfadf612a8dc3c9bf6d17e98 | 36d17919dea8319579739aaed382eb396f3bda5d | igor-laevsky/llvm-simple-backend | /lib/DebugInfo/DWARFDebugLoc.cpp | C++ | cpp | 2,884 | permissive | //===-- DWARFDebugLoc.cpp -------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
98dea970dcc966f0ac0424a7944cb83d6c7dbe18 | f4df34e13ad0c46e7576e6e15d05000b4e17add6 | xiaochenyang-bob/Console-Amazon | /product.cpp | C++ | cpp | 947 | no_license | #include <sstream>
#include <iomanip>
#include "product.h"
using namespace std;
Product::Product(const std::string category, const std::string name, double price, int qty) :
name_(name),
price_(price),
qty_(qty),
category_(category)
{
}
Product::~Product()
{
}
double Product::getPrice() const
{
... |
3b8b08ade26e340795c242a1649534be9dfd8d9d | 26e4ceeb999d964c64cdf86bc313e2146972950f | CU-0xff/juliet-cpp | /000/106/965/CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_static_63a.cpp | C++ | cpp | 2,546 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE590_Free_Memory_Not_on_Heap__delete_array_wchar_t_static_63a.cpp
Label Definition File: CWE590_Free_Memory_Not_on_Heap__delete_array.label.xml
Template File: sources-sink-63a.tmpl.cpp
*/
/*
* @description
* CWE: 590 Free Memory Not on Heap
* BadSource: static Data buf... |
4e4edd392d80025c3b4f454033cdd48159a123af | 84f3e29bca0af82d1c5c5306a843489352b320c8 | smile-vampire/CPP | /不要二/test.cpp | C++ | cpp | 2,179 | no_license | //题目描述
//二货小易有一个W* H的网格盒子,网格的行编号为0~H - 1,网格的列编号为0~W - 1。
//每个格子至多可以放一块蛋糕,任意两块蛋糕的欧几里得距离不能等于2。
//对于两个格子坐标(x1, y1), (x2, y2)的欧几里得距离为:
//((x1 - x2)* (x1 - x2) + (y1 - y2) * (y1 - y2)) 的算术平方根
//小易想知道最多可以放多少块蛋糕在网格盒子里。
//解题思路:
//本题本质就是在二维数组中每个坐标去放蛋糕,
//一个坐标位置放了蛋糕,跟他欧几里得距离为2的位置不能放蛋糕,对于两个格子坐标
//(x1, y1), (x2, y2)的欧几里得距离为: ((x1... |
5ea25e58f4e4e08767fe9e8568f10e54aa2d3300 | c19ef2a03e37b83e8c6775ed2de0562dcace47b3 | tlemo/darwin | /core/sim/camera.cpp | C++ | cpp | 6,218 | permissive | // Copyright The Darwin Neuroevolution Framework 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 ap... |
928476e92b995bfb93fa2c114d5da61d2f47feda | 9d9523cdbb258192199e5e922ff2b0b29d556940 | ImKogane/Breakout_CPP | /HelloSFML/Balls.cpp | C++ | cpp | 507 | no_license | #include "Balls.h"
Balls::Balls(int size, int damage)
{
BallsSize = size;
BallsDamage = damage;
}
int Balls::GetBallsSize()
{
return BallsSize;
}
int Balls::GetBallsDamage()
{
return BallsDamage;
}
std::list<Ball*>& Balls::GetBallList()
{
return BallList;
}
int Balls::GetCurrentBallCount()
{
return countB... |
d92f6ffe1a30c9c041f77c9f6c050b7964b625eb | 4092d3d0c9fa2fb766bb433ca24480a07dab912a | dig9074vijay/Analysis-of-Algorithms-Lab-CSL4403 | /1906188_CSL4403_Assignment - 8.cpp | C++ | cpp | 1,764 | permissive | // C++ Program for Floyd Warshall Algorithm
// Digvijay Srivastava (1906188)
#include <bits/stdc++.h>
using namespace std;
#define V 4
#define INF 99999
void displayDistanceMatrix(int dist[][V]);
//Function to implement all pairs shortest path Algorithm
void floyd (int graph[][V])
{
int dist[V][V], ... |
4a192603c2f3febf4a4a9957f8d8242c600ccb6d | 8748c897a4dca351ed17e9576dfa0b08c5f16fa9 | eric-f/mixedWarpedCurves2 | /src/class_pars.cpp | C++ | cpp | 21,686 | no_license | // [[Rcpp::depends(RcppArmadillo)]]
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppGSL)]]
#include <RcppGSL.h>
#include <gsl/gsl_bspline.h>
// [[Rcpp::depends(BH)]]
#include <boost/math/special_functions.hpp>
#include "class_pars.h"
#include "class_curve.h"
#include "util.h"
// Constructor
Pars::Pars(Rcpp::List par... |
5c938d3923ad7a49cd1bcfdd0b4fade1d0d1afaa | c1df25c339a916450259b37787cc4f9beae92662 | kks227/BOJ | /9200/9226.cpp | C++ | cpp | 323 | no_license | #include <cstdio>
#include <cstring>
using namespace std;
int main(){
while(1){
char S[43] = {0};
scanf("%s", S);
if(S[0] == '#') break;
int i = 0, N = strlen(S);
for(; i<N && S[i]!='a' && S[i]!='e' && S[i]!='i' && S[i]!='o' && S[i]!='u'; i++) S[N+i] = S[i];
S[N+i] = 'a';
S[N+i+1] = 'y';
puts(S+i);
... |
7a1b212fdddfd89f9cec14687efceb50025c55e3 | fd0ca1909d86a2d40670a7f7b03178d86fce91c4 | minthantsin/tower | /IrLibProtocols_BugFix/IrLibSAMD51.cpp | C++ | cpp | 3,783 | no_license | /* IRLibSAMD51.h
* Part of IRLib Library for Arduino receiving, decoding, and sending
* infrared signals. See COPYRIGHT.txt and LICENSE.txt for more information.
*
* This type of content is normally stored in IRLibHardware.h but we have
* moved at her because the SAMD51 support is significantly different than the... |
de8d07c990de568cc38d6526b373477bd59bec77 | 036bc663d0f6de22b4420ddd40d2069c2c028d61 | koko91kon/Proglab-jegyzetek | /Proglab5.4.cpp | C++ | cpp | 851 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
typedef struct orszagzaszlo{
char orszagnev[46];
int szinszam;
}orszagzaszlo;
int main(){
char s[500];
int i=0;
orszagzaszlo tomb[100];
int j;
int count=0;
int bcount=0;
int maxcount=0;
int seged=0;
while(gets(s)... |
022a6b9429afdbd457774834849b057cf873f61d | 6f923c547905f58b25661cd1e37dc6378942fc31 | exoscale/aws-sdk-cpp | /aws-cpp-sdk-swf/source/model/RespondActivityTaskCompletedRequest.cpp | C++ | cpp | 1,541 | permissive | /*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
1f65ccd64c0d7ea97af8e49e41af91aa4dc1e98e | 59027ecc27489b9624e3ccf163610b04cb5e1bb2 | allenkim/algorithm-work | /Google/GoogleJam/2016/Google Jam Qualifier/Allen/qualification_round/hard-jamcoins.cpp | C++ | cpp | 601 | no_license | #include <cstdio>
#include <cstring>
void print_result(int* A, int size){
for (int i = 0; i < size; i++){
printf("%d",A[i]);
}
printf(" %d %d %d %d %d %d %d %d %d\n",3,4,5,6,7,8,9,10,11);
}
int main(){
const int N = 32;
const int J = 500;
int nums[N];
int count = 0;
printf("Case #1:\n");
for (int i = 1;... |
d014f5de7e1c8cfa1da4972606a955b2131716fd | a1f591db4161420dafcdfe6e186fdf4378d05057 | Buerner/laproque | /src/FilteredMultiDelay.cpp | C++ | cpp | 2,540 | permissive | //
// FilteredMultiDelay.cpp
// laproque - https://github.com/Buerner/laproque
//
// Copyright © 2017 Martin Bürner. All rights reserved.
// Licensed under the MIT License. See LICENSE.md file in the project root for full license information.
//
#include "FilteredMultiDelay.hpp"
laproque::FilteredMultiDelay::Fi... |
13a7f96a197774c9fd68fd9a9a1060d1af8fbfe6 | 95ec2c5c1f9d5e78d134769ca1581c92185681e7 | gaspar09/snap-dev-64 | /snap-core/Snap.cpp | C++ | cpp | 1,882 | no_license | /////////////////////////////////////////////////
// SNAP library
#include "stdafx.h"
#include "Snap.h"
#include "base.cpp"
#include "gnuplot.cpp"
#include "linalg.cpp"
#include "gbase.cpp"
#include "util.cpp"
#include "attr.cpp" // sparse attributes
// graph data structures
#include "graph.cp... |
4ffbcbd459a90639d622ac80f113257566e80799 | c830a2078c59acb6583fb35fb34f11fe9cb70605 | karthiksubraveti/magma | /lte/gateway/c/session_manager/SessionStore.cpp | C++ | cpp | 11,656 | permissive | /**
* Copyright 2020 The Magma Authors.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
... |
7852426db386ef7e320ea731c5666427eb430d6f | 3c6cc197474f69a37591c9950f46b6758c88aecd | SleepySquash/minEH-Vulkan | /VulkanTesting2/minEH/Engine/Drawable/Mesh3D.hpp | C++ | hpp | 1,815 | no_license | //
// Mesh.hpp
// VulkanTesting2
//
// Created by Никита Исаенко on 18.03.2020.
// Copyright © 2020 Melancholy Hill. All rights reserved.
//
#ifndef Mesh_hpp
#define Mesh_hpp
#include <iostream>
#include <fstream>
#include <vector>
#include "Drawable.hpp"
#include "Camera.hpp"
namespace mh
{
struct Mesh3D :... |
e28aa671f48310245ce63443df7faf761c37843a | fa5002c0a3546eb4f99f50f3b662d1dc7dda10cc | jackellenberger/RotationGL | /rotationGL/src/render.cxx | C++ | cxx | 3,980 | no_license | #include "render.hxx"
#include <map>
/* The path to the shaders; this is usually set from the compiler command-line.
* but it defaults to a path relative to the build directory.
*/
#ifndef SHADER_DIR
# define SHADER_DIR "../shaders/"
#endif
cs237::vec3f colors[3] = {cs237::vec3f(1.0f,0.0f,0.0f),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.