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 |
|---|---|---|---|---|---|---|---|---|
18e20a0140bf33a86ab54456e29b5492d5f84597 | 1a5cc882ad80bc0f83e77a162034a8183d80f5b5 | joseoyeon/Algorithm | /BOJ/1655_queue.cpp | C++ | cpp | 1,272 | no_license | #include<iostream>
#include <queue>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
priority_queue<int> maxheap;
priority_queue<int, vector<int>, greater<int>> minheap;
int n;
cin >> n;
int x;
for (int i = 0; i < n; i++) {
cin >> x;
... |
5c3a5af70ae7b3227df08b351a412b109a22944c | 455b2e9cc2b543765aa4cd79d7b3f32c15ba41b2 | epapatzikou/nexta | /Version1_01/NEXTA-GUI/TLite.cpp | C++ | cpp | 15,840 | no_license | // TLite.cpp : Defines the class behaviors for the application.
//
// Portions Copyright 2010 Xuesong Zhou (xzhou99@gmail.com)
// If you help write or modify the code, please also list your names here.
// The reason of having Copyright info here is to ensure all the modified version, as a whole, under the GP... |
65087229744f97e9b83f990c8cc1693a480dc63e | 5e9ed0b62f1c08d3d26c2b768742eeab22d30b9d | d42/libcommuni | /tests/auto/irccommandparser/tst_irccommandparser.cpp | C++ | cpp | 17,393 | permissive | /*
* Copyright (C) 2008-2016 The Communi Project
*
* This test is free, and not covered by the BSD license. There is no
* restriction applied to their modification, redistribution, using and so on.
* You can study them, modify them, use them in your own program - either
* completely or partially.
*/
#include "i... |
37939bf489e2e3e1fb6794a226cd3cfe79a6b725 | be1ef0fa041ca8f0bc9bdb4f8664494c1e95cb58 | andyprowl/snake-overflow | /terrain_serialization/export/include/snake_overflow/serialization/terrain_layer_set_delegating_reader.hpp | C++ | hpp | 519 | no_license | #pragma once
#include "snake_overflow/serialization/terrain_layer_set_reader.hpp"
namespace snake_overflow { namespace serialization
{
class terrain_layer_reader;
class terrain_layer_set_delegating_reader : public terrain_layer_set_reader
{
public:
terrain_layer_set_delegating_reader(terrain_layer_reader& lay... |
cc41ee1b43dba0b28cc19f8f585b63dcb1da3f86 | 3281f2d5f3af21cee15c1ee143068d29314656cf | wsydehub/iot_ids | /ConfigParser.cpp | C++ | cpp | 6,087 | no_license | /**
* \file ConfigParser.cpp
* \brief Parse file with configuration of unirec field.
* \author Dominik Soukup <soukudom@fit.cvut.cz>
* \date 2018
**/
/*
* Copyright (C) 2018 CESNET
*
* LICENSE TERMS
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided ... |
580b3f7921c4e6c5626fe6076d8fa8dd96d07a64 | c725562515203147c4eaee49b2bbf0a919a90e34 | cudarrays/cudarrays | /tests/unit/utils.cpp | C++ | cpp | 4,490 | permissive | /*
* CUDArrays is a library for easy multi-GPU program development.
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2015 Barcelona Supercomputing Center and
* University of Illinois
*
* Developed by: Javier Cabezas <javier.cabezas@gmail.com>
*
* Permission is hereby granted, free of ... |
57a5392824d6eea5aada798f3e9d2e4c10d923b8 | fac9b1d959f85460676f2fb40c804eeaa6145817 | alexesprit/aimp_vis_aura | /aimp_vis_aura/AuraVisualization.cpp | C++ | cpp | 7,437 | permissive | #include "stdafx.h"
#include "AuraVisualization.h"
#include "PluginData.h"
#include "Colors.h"
#define avg(a,b) (((a) + (b)) / 2)
#define max3(a,b,c) (max((a), (b)), (c))
AuraVisualization::AuraVisualization(IAIMPCore* core) {
aimpCore = core;
aimpCore->AddRef();
LoadVisualizationColor();
... |
fca12ff5f6daf5384ab37986e8774ffa373e0536 | 7a1897ee3c75992ad72f42457dbbae1d96397d5e | joechenchen/tinylink-lib | /LinkIt One/TL_DISPLAY/GROVE_LCD_RGB/Grove_LCD_RGB_Display_LinkIt_One.cpp | C++ | cpp | 822 | no_license | #include <Arduino.h>
#include <Wire.h>
#include "TL_Config.h"
#include "Grove_LCD_RGB_Display_LinkIt_One.h"
GROVE_LCD_RGB_DISPLAY::GROVE_LCD_RGB_DISPLAY():state(0){
}
void GROVE_LCD_RGB_DISPLAY::show(const char* data){
if(state == 0){
lcd.begin(16, 2);
//lcd.setRGB(255, 0, 0);
lcd.print("hello, mas... |
d453699c40017e7b79cb6975911f1318484fc0f6 | d3ee306e32ed413e4d2af7ec757bab5e28a1e40d | chmodawk/fboss | /fboss/agent/hw/sai/switch/tests/FdbManagerTest.cpp | C++ | cpp | 5,047 | permissive | /*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... |
994ff0eccc984698a2c46fe254800b78dc58d1b6 | 7bd12ce337439c982262d6e8045def5f2c769cd3 | jaupe/uwotm8 | /UWotM8/UWotM8/Parser.cpp | C++ | cpp | 4,678 | permissive | #include "stdafx.h"
#include <iostream>
#include <vector>
#include "NumExpr.h"
#include "NumToken.h"
#include "Parser.h"
#include "Token.h"
#include "UnrExpr.h"
#include "VecExpr.h"
#include "BinExpr.h"
Parser::Parser(const std::string &cmd) : lexer(cmd)
{
}
Parser::~Parser()
{
}
std::shared_ptr<Expr> Parser::parse... |
4e3e7ee757f6e5c4d2661e0cd26cb238cc9d2a31 | b3caa63e461e54d85c859bbaaf4290d553730eff | avplayer/tinyrpc | /third_party/boost/libs/math/tools/lambert_w_low_reference_values.cpp | C++ | cpp | 9,599 | permissive | // lambert_w_test_values.cpp
// Copyright Paul A. Bristow 2017.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
// Write a C++ file J:\Cpp\Misc\lambert_w_1000_test_values\lambert_w_mp_values.ipp
// cont... |
483d5e3146a735455dfe73d35306f780804847c1 | 2897c943f8c6906e345d7c422cf55f10e7ed4fb4 | blockspacer/test-cpp | /stroustroup/24/multi_arg_concepts.cpp | C++ | cpp | 1,225 | no_license | template<typename Iter, typename Val>
Iter find(Iter b, Iter e, Val x);
template<typename T, typename U>
constexpr bool Equality_comparable() {
return Common<T, U>()
and Totally_ordered<T>()
and Totally_ordered<U>()
and Totally_ordered<Common_type<T, U>>()
and Has_less<T, U>() and B... |
2c468ed8327008b581dccf5ede3164464ee6f20d | 60d79cbd20e318f81a19e9959caffde8085c66e8 | nadyop/CPPBasic | /ganjil.cpp | C++ | cpp | 261 | no_license | //menentukan bilangan ganjil sampai n
#include<bits/stdc++.h>
using namespace std;
int ganjil(int n){
if(n%2!=0){
cout<<n<<" ";
}
}
int main()
{
int ganjil(int n);
int i,m;
cin>>m;
for(i=0;i<=m;i++){
ganjil(i);
}
cout<<endl;
}
|
9df42e0c29b9726fed1976368c6030f32bb89365 | 577c7f993fab04edc1d85fab78626c46eaf4c60b | Xenakios/mrp2 | /source/reaper_action_helper.cpp | C++ | cpp | 2,902 | no_license | #include "header/utilfuncs.h"
#include "WDL/lice/lice.h"
#include "reaper_plugin_functions.h"
#include <functional>
#include <string>
#include <memory>
#include <vector>
#include "header/reaper_action_helper.h"
extern reaper_plugin_info_t* g_plugin_info;
action_entry::action_entry(std::string description, std::stri... |
a3890775c68eb3471b668254fb73aa56c5c04fab | d162c98e037edb88d4a462d8c537f27de6e29009 | mkk96/HackerEarth | /Counting Frog Paths.cpp | C++ | cpp | 224 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int x,y,s,t;
cin>>x>>y>>s>>t;int count=0;
for(int i=x;i<=x+s;i++)
{
for(int j=y;j<=y+s;j++)
{
if(i+j<=t){count++;}
}
}
cout<<count<<endl;
return 0;
}
|
fc5b1880cc683547c74010a1f1f98ef0bb9bba3e | b5ad4c0ba4c1b9d9a09716cee787f4d361557c76 | yutaHiguchi0204/GJCharaMaking | /Product/Classes/IModel.cpp | C++ | cpp | 1,199 | no_license | /* =====================================================================
//! @param 「IModel」class src
//! @create Yuta Higuchi
//! @date 17/09/27
===================================================================== */
// including header
#include "IModel.h"
// namespace
using namespace std;
// method
// =======... |
85385b86f7c8d3164be6366f76803a090fa69b5e | f0fec4ae5153bc525ae9ceb4b00a3801c61085d6 | CharlieHong/Success-Ejia | /src/EnergyPlus/TARCOGDeflection.cc | C++ | cc | 13,526 | permissive | // EnergyPlus, Copyright (c) 1996-2018, The Board of Trustees of the University of Illinois,
// The Regents of the University of California, through Lawrence Berkeley National Laboratory
// (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
// National Laboratory, managed by UT-Batt... |
a7f2cb610b03b74ce3cbca600b9724eb9bf9c48f | 030974a3f06f8d48bb54b888d91ceeab46f9ffa3 | heinezen/IPcurve | /src/1.1-next/RakNet/Source/DS_BytePool.cpp | C++ | cpp | 2,998 | permissive | #include "DS_BytePool.h"
#include <assert.h>
#ifndef __APPLE__
// Use stdlib and not malloc for compatibility
#include <stdlib.h>
#endif
using namespace DataStructures;
BytePool::BytePool()
{
pool128.SetPageSize(8192*4);
pool512.SetPageSize(8192*4);
pool2048.SetPageSize(8192*4);
pool8192.SetPageSize... |
85b96b2bdcd8a801e99e9e024d2d03533c53a2b1 | 5597324580cfb25f61b118afe1d56e6baabdf633 | soizensun/c-prog-solution | /C++ Code Example/12-destructor/TimeMain.cpp | C++ | cpp | 340 | no_license | #include <iostream>
#include <string>
#include "Time.h"
using namespace std;
int main() {
// -----------------------------------
// Destructor
// - Destructor is called in reverse order of
// constructor
// -----------------------------------
Time t1(1);
Time t2(2);
{
Time t3(3);
Time t4(4);
} ... |
8201facf20c13808dac72b94fccc2b078509c68b | 39e3cfbc565a79114c7985d613846490cbb85b24 | kitesoft/Roomer-PMS-1 | /Extras/DevExpress VCL/ExpressPrinting System/Demos/CBuilder/Common/DemoBasicMain.cpp | C++ | cpp | 5,050 | no_license | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DemoBasicMain.h"
#include "AboutDemoForm.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "cxDrawTextUtils"
#pragma link "cx... |
5f1dccab898f728c84924f2efb600055798b1c85 | f78a16f4b0ce339fd5757812d2cb9761096a55d0 | bDunph/Sculpture2_avr | /src/Visual/Graphics.cpp | C++ | cpp | 43,681 | no_license | #include <vector>
#ifdef _WIN32
#include <windows.h>
#endif
#include <cmath>
#include <stdlib.h>
#include "lodepng.h"
#include "Graphics.hpp"
#include "ShaderManager.hpp"
#include "Log.hpp"
#include "SystemInfo.hpp"
#ifndef _countof
#define _countof(x) (sizeof(x)/sizeof((x)[0]))
#endif
#define PI 3.14159265
//**... |
bb9031aa9f94e864ea90054d74438249035ad613 | a08822384ab12daf88f4cff0d8d2735248030198 | sandrofonseca/usercode | /FastSimulation/EventProducer/src/FamosManager.cc | C++ | cc | 9,642 | no_license | // CMSSW Header
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/Run.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Utilities/interface/RandomNumberG... |
1d7d5c1e44321fe8c9d00b1053bacdb28f55b0b2 | 4cdb4fbdf443111f0b39aaa3e8ca890fa70d4267 | Emile442/Epitech | /Tek2/CPP_Pool/Rush-2/Box.hpp | C++ | hpp | 378 | no_license | /*
** EPITECH PROJECT, 2019
** Box.hpp
** File description:
** Box Header
*/
#ifndef _BOX_HPP_
#define _BOX_HPP_
#include "Wrap.hpp"
#include "Object.hpp"
class Box : public Wrap, public Object
{
public:
Box(const std::string &Title);
~Box();
virtual bool BoxIsOpen();
bool WrapMeT... |
c2fff8e2c8950a7f831762ca6e7caf87443b583b | 4ac6c0c177c51727f0f5c0a050405a4afb1a0f4e | bogdanov-d-a/PRRIS | /SOLID/SOLID/ItemDataProvider.cpp | C++ | cpp | 938 | no_license | #include "ItemDataProvider.h"
#include <vector>
#include <algorithm>
void EnumerateItems(ItemFunc const& itemFunc)
{
const std::vector<char> items = { 'A', 'B', 'C', 'B', 'A', 'D', 'D', 'E', 'E', 'E', 'F', 'G', 'K', 'L', 'M', 'A', 'A' };
for (auto &item : items)
{
itemFunc(ItemId::CreateFromChar(item))... |
7771ee2d6f3640399b625cfc39014b5cb69f1988 | ed57a8b2c314aa09ff49e232698790aea794be32 | SW-H/Game-PickingStones | /hw1_pickingStones.cpp | C++ | cpp | 5,173 | no_license | #include <stdio.h>
#include <math.h>
#include <cstring>
#include <vector>
#include <stdlib.h>
struct Node
{
float alpha = -1111.f;
float beta = 1111.f;
// 노드의 현재 깊이
int curDepth = 0;
// 돌을 의미
int curStone = -1;
// MaxPlayer의 턴인지 확인
bool isMaxTurn = true;
// 상위 NODE
Node* rootNode;
// 하위 NODE
std::vector<N... |
662a6153542546f923c70e91bacb50e0dbeb5dff | 246289db3233c0040b3eae0823921ae202787e53 | jankalinowski233/C-AI | /src/Map.cpp | C++ | cpp | 7,930 | no_license | #include "..\include\Map.h"
Map::Map()
{
//initialize map
for (int i = 0; i < rows; i++)
{
for (int j = 0; j < columns; j++)
{
n = new Node(xOffset + width * j, yOffset + height * i, width, height, i, j);
mapGrid[i][j] = n;
}
}
}
void Map::notPath(int x, int y)
{
//set the nodes around a point to be ... |
dd49439343a11c4f1b427bb4f624e7db5db1e7d8 | 49853cbf4d9048c4f40e1b3d892ddd438bab5bd5 | nicain/prDetect | /polarityDis2.cpp | C++ | cpp | 540 | no_license | #include<iostream>
#include<fstream>
#include<sstream>
#include<cmath>
using namespace std;
int main()
{
ifstream fin(string("PosNegNeutal").c_str());
ofstream fout(string("polarityDisFeature2").c_str());
string line;
while(getline(fin,line))
{
double p1, n1, p2, n2,e1,e2, dis;
for(int i=0;i<line.length();i++)
i... |
6e6e607c0f5d2d3e791332f6c080b673e86e56f8 | 56cdf9c11eadcdb6ea42cf7f15369753b7bdc092 | META-DREAMER/Edmonton-Navigation | /map.cpp | C++ | cpp | 10,194 | no_license | #include <Arduino.h>
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include "lcd_image.h"
#include "map.h"
// #define DEBUG
/* m
Module to handle the display of map, cursor, and path information
on the screen.
It assumes that all of the map inform... |
743a4e9f2261c49f7732ffe38eb1321a6b0334ee | 28c9133e7d1364e357b2594f867b9f33a96fc0be | RMRobotics/FTC_2017-18_5421 | /libs/roborio/cpp/examples/navXMXP_CPP_FieldCentricDrive/src/Robot.cpp | C++ | cpp | 3,692 | permissive | #include "WPILib.h"
#include "AHRS.h"
/**
* This is a demo program showing the use of the navX MXP to implement
* field-centric ("field-oriented") drive system control of a Mecanum-
* based drive system. Note that field-centric drive can also be used
* with other Holonomic drive systems (e.g., OmniWheel, S... |
4d2012c77061aee634f849cf2c1115e92d2cbe9a | 4cff67387a3dd26baaa83458395442204156951c | gauravengine/CPP_Freak | /Dynamic_Programming/edit_distance.cpp | C++ | cpp | 3,890 | no_license | #pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define db1(x) cout<<#x<<"="<<x<<'\n'
#define db2(x,y) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<'\n'
#define db3(x,y,z) cout<<#x<<"="<<x<<","<<#y<<"="<<y<<",... |
c8076622b44a709ec3d8888971e35aab202475bf | ef21397f3585b7ecdfec850f9e2781977fc1f936 | malensek/3RVX | /3RVX/MeterWnd/Meters/HorizontalEndcap.cpp | C++ | cpp | 2,427 | permissive | // Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#include "HorizontalEndcap.h"
HorizontalEndcap::HorizontalEndcap(
std::wstring bitmapName, int x, int y, int units) :
Meter(bitmapName, x, y, units),
_lMargin(-1),
_rMargin(-1) {
using namespac... |
f6a638e6dfeed659d1555358a9984d1a9f266ba2 | e13d70b949c07700611d8844d5815a710c565aa6 | tzayuan/AlgorithmCodes | /A04.13.cpp | C++ | cpp | 488 | no_license | //Algorithm 4.13 (P107-8)(A04.13.cpp)
//快速排序算法
#include "headers.h"
void quickSort(int A[], int low, int high)
{
if (low < high) {
int k = pivotDivision(A,low,high);
quickSort(A,low,k-1);
quickSort(A,k+1,high);
}
}
void quickSortTest(int n)
{
int *a = new int[n];
printf("测试快速排序算法:\n");
randRangeArr(n, 0, 500... |
38bcfe962e9bda7835afbef9c9eef93edc4ee6f7 | 0d91660bbe2f27de3287f07f5ed33e9ecf0e5331 | Haruka0522/Small-Programs | /APG4b/structure_test.cpp | C++ | cpp | 346 | no_license | #include <bits/stdc++.h>
using namespace std;
struct MyPair{
int x;
string y;
MyPair(int _x,string _y){
cout << "constructor called !!!" << endl;
x = _x;
y = _y;
}
void print(){
cout << "x = " << x << endl;
cout << "y = " << y << endl;
}
};
int main(){
MyPair p(6789,"hikisu");
//p.x = 12345;
//p.... |
e4abfe6cf603b91d70c84bb0366604320b0a7ca1 | 8f9b686483f2cab5de3cf8d60aa8c68f19f305a0 | Myriad-Dreamin/Tango | /Tango/scene/PlaySubScene.cpp | C++ | cpp | 986 | no_license | #include "PlaySubScene.h"
#include <QPushButton>
#include <QGridLayout>
#include <QVBoxLayout>
#include <QLineEdit>
#include <QMessageBox>
#include <QLabel>
PlaySubScene::PlaySubScene(QWidget *parent): Scene(parent)
{
user_ret = new QLineEdit;
answer_button = new QPushButton;
answer_button->setText("回答");... |
a289504fbd186751ae2eb37cffaa833ae2860469 | 5adb7a2259117b0c661682cddbe8c7e22a7eacfc | IndianShifu/Compiler-Lab | /LAB3/q9.cpp | C++ | cpp | 12,718 | no_license | #include<iostream>
#include<string>
#include<map>
#include<fstream>
using namespace std;
string terminals = "e", nonterminals; // e is epsilon
struct parseEntry
{
//terminal,production
string production;
string input;
};
string dupliRemove( string a )
{
string w;
for( int i=0; i<a.le... |
95d954710bc2b5664b239e26f9ff83d59a9c5b50 | 601fdb5c855dc68792a59183088bf70a15735a2c | bkahlert/seqan-research | /raw/pmsb13/pmsb13-data-20130530/sources/qhuulr654q26tohr/2013-04-17T15-18-04.517+0200/sandbox/PMSB_group6/apps/cluster/cluster.cpp | C++ | cpp | 3,910 | permissive | #include <iostream>
#include <seqan/sequence.h>
#include <seqan/arg_parse.h>
#include <seqan/align.h>
#include <seqan/seq_io.h>
using namespace seqan;
using namespace std;
/*struct MasterSequence {
CharString id;
Dna5String seq;
MasterSequence(CharString i, Dna5String s) :
id(i), seq(s) {
}
};*/
template<typen... |
e0af628a04fc10d97e82cc2d4bc36172b52cdf54 | ec4934908d7c834d9ae3dc9fcac63911615a3232 | hynra/android_smarthome-appliance | /Source Code/CGI/TurnOff/TurnOff.cpp | C++ | cpp | 749 | no_license | // TurnOn.cpp : Defines the entry point for the console application.
//
#define STRICT
#include "stdafx.h"
#include <tchar.h>
#include <Windows.h>
#include "Serial.h"
#include <iostream>
using namespace std;
int main(HINSTANCE, HINSTANCE, LPTSTR, int)
{
CSerial serial;
serial.Open(_T("COM8"));
s... |
72ac23c8c622fe82d9218b9b1510fa1e19270a36 | aa6b96ff607299d80677eef772664c5f898dd640 | Kitware/kwiver | /track_oracle/file_formats/track_kwxml/file_format_kwxml.cxx | C++ | cxx | 34,538 | permissive | // This file is part of KWIVER, and is distributed under the
// OSI-approved BSD 3-Clause License. See top-level LICENSE file or
// https://github.com/Kitware/kwiver/blob/master/LICENSE for details.
#include "file_format_kwxml.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdio>
#include <ut... |
e53ae253960cee613ad15bdd3c7dc660c09637d4 | 8d47c5da95b04b68625638f8bac405c3804661f2 | anflorea/courses | /ppd/lab1/main.cpp | C++ | cpp | 2,559 | no_license | #include <QCoreApplication>
#include "primaryvariable.h"
#include "mythread.h"
#include "verifythread.h"
#include <QList>
#include <QDebug>
#include <QTime>
#include <QThreadPool>
//#define LOGGING
#define MAX_THREAD_COUNT 5
#define PRIM_VARS_NO 8
int main(int argc, char *argv[])
{
QCoreApplication a(argc, arg... |
1ea874c728e0a82d60d3645774af7ce99e8500a8 | 70db0ffc06262fb6e0142bc9af35e95ba98dbfe4 | reginakim/ANTS | /Examples/MemoryTest.cxx | C++ | cxx | 6,588 | permissive | /*=========================================================================
Program: Advanced Normalization Tools
Module: $RCSfile: MemoryTest.cxx,v $
Language: C++
Date: $Date: 2008/11/15 23:46:06 $
Version: $Revision: 1.18 $
Copyright (c) ConsortiumOfANTS. All rights reserved.
See accompa... |
c2fbac551a40dae74aab1a35088ca1d91bacfdb5 | a73797ed369eab142db91ee3ca9500f911d4415d | ryao/VK9 | /VK9-Library/RealSurface.cpp | C++ | cpp | 10,933 | permissive | // This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/*
Copyright(c) 2018 Christopher Joseph Dean Schaefer
This software is provided 'as-is', without any express or implied
warranty.In no event will the authors... |
334d5f2d6a13636f02230aad677fcb70a108ec5e | b3a6305cc44da79d09d53e509afb3b4cb00a66f4 | Feynman27/code_HI | /code/plotDecorCorrectionFactorsMptSystematics.cxx | C++ | cxx | 3,324 | no_license | #include "TGraph.h"
#include "TGraphAsymmErrors.h"
#include "TFile.h"
#include "TString.h"
#include "TCanvas.h"
#include "TAxis.h"
#include "TLegend.h"
#include "TStyle.h"
#include "TLatex.h"
#include <iostream>
void plotDecorCorrectionFactorsMptSystematics(){
TFile *_fileNom = TFile::Open("CorrectionFactorFiles... |
d127d60a03707e63ba29d57b0309096eef3d80a2 | f8dc05c70d28fbd80d954705e2545038cf4f5fde | quanghuy0497/Competitive-Programing | /Vitaly and Strings_518A_Codeforces.cpp | C++ | cpp | 371 | no_license | //http://codeforces.com/problemset/problem/518/A
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s, t;
getline(cin, s);
getline(cin, t);
string st=s;
for (int i = s.size() - 1; i >= 0; --i)
if (s[i]=='z')
st[i]='a';
else
{
st[i]= s[i] + 1;
break;
}
if (st<... |
ebdc4a1855c2ea0efb247fb26be28b9c59ab7ef3 | 695a8916e1ba869e4312bff464af426bbec8f9fc | riz1-ali/Codeforces_Solutions | /507B.cpp | C++ | cpp | 237 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long int r,x,y,w,z;
cin>>r>>x>>y>>w>>z;
double ans,dist;
long long int a=abs(w-x),b=abs(y-z);
dist=sqrt(a*a+b*b);
ans=ceil(dist/(2*r));
cout<<ans<<endl;
return 0;
} |
30bf78a52717a935e1bb77b37ac6ea6865e1f2e4 | 6065a0fc83dec955b7127bb40f52da2404495997 | VaibhavVerma16113108/Competitive-Programming | /Codeforces/Numbers-On-Whiteboard.cpp | C++ | cpp | 456 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
cout << 2 << endl;
int arr[n + 5];
for (int i = 1; i <= n; i++)
arr[i] = i;
for (int i = n - 1; i >= 1; i--)
{
... |
95ae68614ebc77183b7bc86f192135d5747c0d6c | 5270b619bb6cb210ba958513b86be08b6d9cc283 | Adil-sc/Batman-vs-Riddler-Adventure-Game | /ArkhamEast.cpp | C++ | cpp | 7,597 | no_license | /*********************************************************************
** Program Name: Final Project
** Author: Adil Chaudhry
** Date: 3/11/2019
** Description: Class implementation file for the derived ArkhamEast class
*********************************************************************/
#include "ArkhamEast.h"
Ark... |
0a74b1a2c8a9dc681db33a7b6da94ab8499fcff6 | 1eccaa9f8e66afbf2b0c0811a72bdd89f913a926 | BuloZB/bitcoin | /src/qt/askpassphrasedialog.cpp | C++ | cpp | 8,952 | permissive | #include "askpassphrasedialog.h"
#include "ui_askpassphrasedialog.h"
#include "guiconstants.h"
#include "walletmodel.h"
#include <QMessageBox>
#include <QPushButton>
#include <QKeyEvent>
AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
QDialog(parent),
ui(new Ui::AskPassphraseDialog),
... |
b51f38046f4ba403152fff0517d3f1659fe71a43 | a55a072179189bde04ca6452eb8fc6b9e0cb3db7 | DeKerwer/spacefortress | /src/ship/modules/weapon.cpp | C++ | cpp | 1,766 | permissive | #include "weapon.hpp"
using namespace module;
Weapon::Weapon(const std::string &name, const double &hull,
const double &rate_of_fire, const double &output_vel,
const double &shoot_energy)
: Module(name, "Weapon", hull),
rate_of_fire(rate_of_fire),
output_vel(output_vel),
... |
53802f8cc4bfb9b0a8a00dd9019056f93a3821cd | cd3dff82560b4fadcdb38aecc86cfa49a8278114 | blueskin90/piscine_cpp | /d01/ex03/ZombieHorde.cpp | C++ | cpp | 449 | no_license | #include "ZombieHorde.hpp"
ZombieHorde::ZombieHorde(int value)
{
srand(time(NULL));
srand(rand());
if (value <= 0)
{
std::cout << value << "is less than 1, defaulted to 1" << std::endl;
value = 1;
}
this->_size = value;
this->_zombies = new Zombie[value];
}
ZombieHorde::~ZombieHorde(void)
{
delete[] this... |
f64a5bccc4d5ca72d58788891622351445488a5f | 6ee100b93e4648b41c7e76bd16f10770d57851ba | bshanae/ft_vox | /sources/engine/main/system/time/timer/timer.cpp | C++ | cpp | 474 | no_license | #include "timer.h"
#include "application/common/debug/debug.h"
using namespace engine;
timer::timer() : finish_time(0)
{
}
timer::timer(float duration) : finish_time(get_finish_time(duration))
{
}
bool timer::is_running() const
{
return (float)glfwGetTime() <= finish_time;
}
bool timer::did_fi... |
01dc5d235e45690470af252701a7aa4b8ddbd03e | 43d4da8e8b5b43e52be7c951abf22b9093599059 | Gegel85/SlingShotOpenGL | /FrameWork/MyFiles/Physics/Forces/MyAnchoredSpring.cpp | C++ | cpp | 460 | permissive | #include "MyAnchoredSpring.h"
cyclone::MyAnchoredSpring::MyAnchoredSpring(cyclone::Vector3* anchor, double springConstant, double restLenght) : AMyAnchoredForce(anchor)
{
this->springConstant = springConstant;
this->restLength = restLenght;
}
void cyclone::MyAnchoredSpring::updateForce(Particle* p, real duration)
{... |
7f6a8c582fe4cc0ff4ad355a4734ea0462518b5d | 94236ad1fca681008fd0971152eac9f2ffa58705 | AmnesiacGarden/Qt-Training-project | /Iot/QQ/chat.cpp | C++ | cpp | 5,504 | no_license | #include "chat.h"
#include "ui_chat.h"
Chat::Chat(QWidget *parent) :
QWidget(parent),
ui(new Ui::Chat)
{
ui->setupUi(this);
//窗口属性
this->setWindowTitle(QString("主菜单"));
QIcon windowIcon = QIcon(QPixmap(QString(":/new/prefix1/icon1.jpg")));
this->setWindowIcon(windowIcon);
this->setMax... |
7616d29d1d35b696d9ea10dffed4e93261b07443 | 8dc7865a611b206f7736df2ad7d2d43d0132aa63 | r96922081/Competitive-Programming | /ACM/uva1237.cpp | C++ | cpp | 1,391 | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <limits>
#include <cstddef>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cmath>
#include <map>
#include <vector>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <tuple>
#include <sstream>
#include <cassert>
#inc... |
71bb228efbbffaa54e4bb4091eed214b34c90759 | 373186981abc81bbec14fa9d37792a8ce83b0316 | toggl-open-source/toggldesktop | /third_party/poco/Util/samples/SampleApp/src/SampleApp.cpp | C++ | cpp | 4,606 | permissive | //
// SampleApp.cpp
//
// This sample demonstrates the Application class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Util/Application.h"
#include "Poco/Util/Option.h"
#include "Poco/Util/OptionSet.h"
#incl... |
0ad94a665ffe87d208117b02083feef4c1cf315f | 6a425b614c1f67bb1807f45414b761886a87b016 | Hosseinabady/ZynqDynamicEnergyManagemen | /applications/correlation/software/correlation-fpga/correlation.cpp | C++ | cpp | 9,339 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <unistd.h>
/* Include polybench common header. */
#include "polybench.h"
#include "accel.h"
extern "C" {
#include <measurement.h>
#include <set_frequency.h>
#include <fpgacl_memory.h>
#include <monitoring.h>
}
#include <sys/time.... |
d014665232c042ba098fa044f2a18a5e2eb84b2c | da8840587c826290d93d65f573c38d4f5d4e1843 | enaim/Competitive_Programming | /CODEFORCES/Round #638 (Div. 2)/A. Phoenix and Balance.cpp | C++ | cpp | 1,359 | no_license | #include <map>
#include <set>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <bitset>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <sstream>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <algorithm>
using namespace std;
#defi... |
212bc038df1ce3f07976bed2c8a4269cbf35b996 | 9d90b057bd9591451c9c6a7a53c26b86e6a2f61a | dterei/Scraps | /cpp/static_order.cc | C++ | cc | 534 | permissive | #include <stdio.h>
#include <stdlib.h>
int p( const char * str )
{
return puts( str );
}
const int cglobal1 = p("const global variable 1");
int global2 = p("global variable 2");
const int cglobal3 = p("const global variable 3");
int f1( void )
{
static int x = p( "static local variable" );
return x++;
}
int f... |
a82f69a206aac6d927e1dfca4df22b09ad5e7911 | db044eacd8610ac613c46c54c8295fab518282b0 | alissastanderwick/OpenKODE-Framework | /01_Develop/libXMIrrlicht/Source/video/Null/CNullDriver.cpp | C++ | cpp | 70,280 | permissive | // Copyright (C) 2002-2011 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "../Null/CNullDriver.h"
#include "../../irr/os.h"
#include "CImage.h"
#include "../../io/CAttributes.h"
#include "IReadFile.h"
#include "IWr... |
aee03ddb5617b87cb07fad7701e51e555e12c0a9 | 44d0e14220a51bfc1f8c3c71eb933d0e40b6fe49 | wyaadarsh/LeetCode-Solutions | /C++/1429-First-Unique-Number/soln.cpp | C++ | cpp | 707 | permissive | class FirstUnique {
public:
FirstUnique(vector<int>& nums) {
idx_ = 0;
nums_ = nums;
for(int num : nums) ++counter_[num];
}
int showFirstUnique() {
while(idx_ < nums_.size() && counter_[nums_[idx_]] > 1) {
++idx_;
}
return idx_ < nums_.size() ... |
26ddcd44910a2b6f7d8aa7d47f366adc050db9c4 | a41f29fecedcc0c3635f563f57ded7279aa33b59 | lcls-daq/ami | /event/RayonixHandler.hh | C++ | hh | 315 | no_license | #ifndef Ami_RayonixHandler_hh
#define Ami_RayonixHandler_hh
#include "ami/event/FrameHandler.hh"
namespace Ami {
class RayonixHandler : public FrameHandler {
public:
RayonixHandler(const Pds::DetInfo& info);
void _configure(Pds::TypeId, const void* payload, const Pds::ClockTime& t);
};
};
#endif
|
fc59ed43b1b91e492dbab7244e2b2e4b8d18ca3d | ebe68ec9f3b5624628450dbe78de370d51e8fe0a | linuxaged/FBX-glTF | /IO-glTF/gltfWriter-Shaders.cpp | C++ | cpp | 4,991 | permissive | //
// Copyright (c) Autodesk, Inc. All rights reserved
//
// C++ glTF FBX importer/exporter plug-in
// by Cyrille Fauvel - Autodesk Developer Network (ADN)
// January 2015
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// p... |
b90ed9fab24265742e6c71fa58880a320f9615a9 | c9686d0ae90fae1d34da8119c0cf99bcc0e761a7 | saribekyan/competitive-programming | /UVa/108 Maximum Sum.cpp | C++ | cpp | 523 | no_license | #include <stdio.h>
int d[101][100];
int main()
{
int n, m, p, i, j, k;
while (scanf("%d", &n) == 1)
{
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
{
scanf("%d", &p);
d[i+1][j] = d[i][j]+p;
}
m = 0;
for (i = 0; i < n; i++)
for (j = i+1; j <= n; j++)
{
p = 0;
... |
db09d5b64b6968d6e053823cda36c214b02caae7 | b932e5e27ba9657236b7f0b18b7cdf61f31d6ccb | SerenityOS/serenity | /AK/StackInfo.cpp | C++ | cpp | 3,382 | permissive | /*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Assertions.h>
#include <AK/Platform.h>
#include <AK/StackInfo.h>
#include <stdio.h>
#include <string.h>
#ifdef AK_OS_SERENITY
# include <serenity.h>
#elif defined(AK_OS_LINUX) or defined(AK_OS_MACOS) o... |
b22b98ccf0402a9f047d15b707f1fcd236705cda | c7d14b0bd64ea57c34d66289645c52b1df5f41e6 | tensorflow/io | /tensorflow_io/core/ops/kinesis_ops.cc | C++ | cc | 1,828 | permissive | /* Copyright 2019 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... |
32786b8b8596a01abf7c56ae3b7442df09803c2e | 95aa54a028e13db000eaf19e64ebd760978a77c0 | pointstablecoin/point | /src/rpcrawtransaction.cpp | C++ | cpp | 32,945 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 PIVX Developers
// Copyright (c) 2018 -2019 POINT Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://ww... |
db41ae0e472d3a28d76f59d076fa164957e60147 | 958806df111872cd2509caa50280cea3c40bdf04 | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/libs/regex/test/regress/test_regex_search.hpp | C++ | hpp | 18,283 | permissive | /*
*
* Copyright (c) 2004
* John Maddock
*
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
*/
/*
* LOCATION: see http://www.boost.org for most recent version.
* ... |
dfcd4c6e28e4974ad74cbc27a18b07c1f3538cce | ecd6fbcbdf619c294a88a789f20ccafd4b12500c | nealwu/UVa | /volume119/11985 - Prime Independence[v3].cpp | C++ | cpp | 4,749 | no_license | #include <cstdio>
const int V = 40010;
const int E = V*200*2;
const int INF = 1<<29;
typedef struct Edge{
int v, cap, flow;
Edge *next, *re;
}Edge;
class MaxFlow{
public:
Edge edge[E], *adj[V], *pre[V], *arc[V];
int e, n, d[V], q[V], numb[V];
void Init(int x){
n = x;
for (int i =... |
1988787fd1be6abd04fdc1363534a1cab3ad5943 | 55c420f83ce5d9a26406899c793d059518689f4c | samutronics/robohome | /manager/project/metatype/metairrigation.hpp | C++ | hpp | 5,659 | no_license | // =============================================================================
//! \file
//! \brief
//! \author Norbert Toth
//! \date 28.02.2015.
//! \note
// =============================================================================
#ifndef _METAIRRIGATION_HPP_
#define _METAIRRIGATION_HPP_
#include "a... |
9b98af17f30b0f212c5b237ae40cd4a6e74ff999 | 51f9c473bf0bf547df4218c8e27073551c3f5e7d | killvxk/powershell_cpp | /powershell_cpp.cpp | C++ | cpp | 2,954 | permissive | #using <mscorlib.dll>
#include <vcclr.h>
#include <memory>
#include <powershell_cpp/string.hpp>
#pragma managed
using namespace System;
using namespace System::Management::Automation;
ref class PSOutHelper
{
public:
void OnDataAddedDebug(Object ^sender, DataAddedEventArgs ^args)
{
ConsoleColor origi... |
38d9bc9f2437e57d52ae11f80ada0931fa72a1b0 | 0a27ddf03d0145c87dbe15b5b2ad93b6b9a0d299 | caiwaifung/algo | /cf/30/e2.cc | C++ | cc | 2,853 | no_license | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <limits>
#include <memory>
#include <queue>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
#define all(a) (a).begin(), (a).end()
#define sz(a) stati... |
0e5b592f039ceb66cb497602c52f2809dff0d9c8 | 97a85c0d379792189184e502a376253c70731854 | david-german-tri/drake | /drake/multibody/test/parser_urdf_test/parser_urdf_test.cc | C++ | cc | 7,258 | permissive | #include "drake/multibody/parser_urdf.h"
#include <iostream>
#include <fstream>
#include <memory>
#include <string>
#include <gtest/gtest.h>
#include "drake/common/drake_path.h"
#include "drake/multibody/joints/floating_base_types.h"
#include "drake/multibody/rigid_body_tree.h"
using std::endl;
using std::ifstream;... |
f41b7f1e9622aaa828622ee2a16a1ea03d1a6e8d | debce1cdac4ed5c79906cd00ef60738a2b139246 | ashreya111/CP1_CIPHERSCHOOLS | /Contains Duplicate.cpp | C++ | cpp | 278 | no_license | class Solution {
public:
bool containsDuplicate(vector<int>& nums) {
sort(nums.begin(),nums.end());
for(int i=1;i<nums.size();i++)
{
if(nums[i]==nums[i-1])
return true;
}
return false;
}
};
|
ae60b02cf2ae8b4c27459d1bdbfbf15e5d9a86ee | 8e771a8ea011bad662f39512d0406ecc4a6694d9 | booleanbanana/meta | /src/test/parallel_test.cpp | C++ | cpp | 2,083 | permissive | /**
* @file parallel_test.cpp
* @author Sean Massung
*/
#include "test/parallel_test.h"
namespace meta
{
namespace testing
{
template <class Type>
void hard_func(Type& x)
{
x = std::sin(x) + std::exp(std::cos(x)) / std::exp(std::sin(x));
}
template <class Type>
void easy_func(Type& x)
{
if (x != 1.0)
... |
e562c4644b0a7167b97e68d0f87755eecb0b1b00 | cd3886345023ccbd0a0bc8a6500390b8def73a21 | longtao05/opencv_face | /face/build-signal_test-Desktop-Release/moc_picture.cpp | C++ | cpp | 3,670 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'picture.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1)
**
** WARNING! All changes made in this file will be lost!
*************************************************************... |
ff64d4ba2c8b686fd99ed8748d1064aef5f09151 | 30e594e60de418f5b6af92d24ebd25e625e67563 | hrishikesh713/libdart | /test/buffer_abi_unit_tests.cc | C++ | cc | 39,840 | permissive | // XXX: Bool to int conversion warnings are too noisy otherwise
#if DART_USING_MSVC
#pragma warning(push)
#pragma warning(disable: 4805)
#endif
/*----- Local Includes -----*/
#include <cstring>
#include <iostream>
#include "../include/dart/abi.h"
#include "../include/extern/catch.h"
/*----- Types -----*/
template <... |
74916f226468e35292b11800975e35d5e0d49d09 | fedd8705cdc92d946926e7150084bdb06fe40837 | robert-ancell/libhybris | /hybris/egl/platforms/hwcomposer/hwcomposer_window.cpp | C++ | cpp | 14,942 | permissive | /*
* Copyright (C) 2013 libhybris
*
* 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 ... |
5a580bfd4d12745cc854fdd3f89984cbcde6a78e | 2093854d74a9794b303c3c56a43f9adfddfcce9e | the-locksmith/fuchsia | /garnet/lib/debug_ipc/helper/regex.cc | C++ | cc | 1,198 | permissive | // Copyright 2019 The Fuchsia 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 "garnet/lib/debug_ipc/helper/regex.h"
#include "lib/fxl/logging.h"
namespace debug_ipc {
Regex::Regex() = default;
Regex::~Regex() {
if (han... |
a5d5f3e918566eda15cb3f42aa52df5fb29d52ed | 5bb74ab21088852c75e92a0bf56e7516895d8b32 | Quitintmian/Liuchengtu | /mergepass.cpp | C++ | cpp | 1,339 | no_license | #include<iostream>
using namespace std;
void display(int a[],int n)
{
cout<<"\t\ta[i]:";
for (int i = 0; i < n; i++)
{
cout<<a[i]<<" ";
}
cout<<endl;
}
void Merge(int a[],int low,int mid,int high){
cout<<"\t\tlow:"<<low<<" mid:"<<mid<<" high:"<<high<<endl;
int *tmpa;
int i=low;... |
34ba5944545f94d719307168a61aec7ed6b924a2 | 9a8bc1425afc4188b1bf5d205c1c50a3b59fa756 | pyliu/tank | /DIBITMAP.CPP | C++ | cpp | 5,496 | no_license | // DIBitmap.cpp: implementation of the DIBitmap class.
//
//////////////////////////////////////////////////////////////////////
#include "DIBitmap.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
////////////////////////////////////////////////////////////... |
9ae59fd169ff636c5ad424df257605d82cb36c4b | 4bbdfb2ee0d68de3044b6d1e3948308e0648e527 | Carlosedo/DieKurve | /SDL_OnRender.cpp | C++ | cpp | 2,041 | no_license | #include "SDL_Base.h"
#include "Player.h"
#include "World.h"
/**
* @brief OnRender: draws the surfaces on every loop of the game.
*/
void SDL_Base::OnRender() {
SDL_Rect rect;
rect.x = GAME_WIDTH - SCORE_WIDTH;
rect.y = 0;
SDL_BlitSurface(Scoreback, NULL, Surf_Display, &rect);
char string[30];
... |
434fa167ce85edb912b464652976ec5ee31393ad | db47e783a24f6d9313e0ee8519a1dbe7a5847b8f | WymA/PathPlanning | /RobotView.cpp | C++ | cpp | 14,946 | permissive | // RobotView.cpp : implementation of the CRobotView class
//
#include "stdafx.h"
#include "Robot.h"
#include "RobotDoc.h"
#include "RobotView.h"
#include "MainFrm.h"
#include "SetPara.h"
#include "MyGA.h"
#include "string.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#en... |
24cf80e71a9d14d4a50d20e6e98ca1386e678121 | a584102036b794d8e215f0b39c877fa5db8db689 | RoeeXu/leetcode-cn | /0085.cpp | C++ | cpp | 2,932 | no_license | /***************************************************
* Copyright (c) 2019 Roee Xu. All Rights Reserved
****************************************************
* File: 0085.cpp
* Author: roeexu
* Date: 2019-11-25 15:55:58
* Brief:
****************************************************/
static auto s = [](){ ios::s... |
e308bb0e473f8cc68088bed1007e2a0ed8b35221 | 031ba0a729c6cc43ef973ea5ecde7ab0b7348b7a | humbertodias/Final-Fight | /src/cliente/pantallas/PantallaJuego.cpp | C++ | cpp | 522 | permissive | //
// Created by sebas on 6/11/19.
//
#include "PantallaJuego.h"
PantallaJuego::PantallaJuego (IdPantalla id, InterpreteCliente * interprete, EntradaUsuario * entradaUsuario, Vista * vista):
Pantalla (id, interprete, entradaUsuario,
vista)
{
}
void
PantallaJuego::iniciar ()
{
Pantalla::iniciar ();
receptor.r... |
24b247abd2350052298a1b34729149b203e895ed | bf66781c039a9123ba65c9370bc6dc728299d379 | nmlabku/SnorGen | /pcapReader.cc | C++ | cc | 3,903 | no_license | #include "include.h"
#include "util.h"
#include "pcapReader.h"
#include "ethernet.h"
#include "tcp.h"
#include "udp.h"
#include "ip.h"
//#######################################################################
void PcapReader::offlineFileOpen(char *infile)
{
char ebuf[MAXSTR];
// printf("void Pc... |
ba1ff5b80143b8e3af365e41ec047042713e65ae | 9d0b43b513433be112460308c75dd1a304f2fe22 | septem9907/CppPrimer | /chapter7/Screen.cpp | C++ | cpp | 968 | no_license | #include <iostream>
#include <string>
using namespace std;
class Screen
{
private:
unsigned height = 0, width = 0;
unsigned cursor = 0;
string contents;
public:
Screen() = default;
Screen(unsigned ht, unsigned wd) : height(ht), width(wd),
contents(ht * wd, ' ... |
4132ea651725d7cfb2636a13e877e7c2441d21c0 | 5d99dc0814c2f6783a6aed1053ce673e22cbf859 | truenas/ports | /databases/mysqlwsrep57-server/files/patch-sql_binlog.cc | C++ | cc | 1,072 | permissive | --- sql/binlog.cc.orig 2021-06-16 10:56:53 UTC
+++ sql/binlog.cc
@@ -10149,8 +10149,8 @@ void MYSQL_BIN_LOG::report_missing_purged_gtids(const
char* missing_gtids= NULL;
char* slave_executed_gtids= NULL;
- gtid_missing.to_string(&missing_gtids, NULL);
- slave_executed_gtid_set->to_string(&slave_executed_gtid... |
8a06bda447806801a3ff33100198689893744d2f | 6a49bc23bdc659f020e5c6f41372bc5ead97d13b | thomasleyer/irods | /iRODS/server/re/include/reDataObjOpr.hpp | C++ | hpp | 4,974 | permissive | /*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
/* reDataObjOpr.h - header file for reDataObjOpr.c
*/
#ifndef RE_DATA_OBJ_OPR_HPP
#define RE_DATA_OBJ_OPR_HPP
#include "rods.hpp"
#include "objMetaOpr.hpp"... |
db34f77e79210f896f807cf465a2a721df795231 | 101c57ed1912eb6f36f59eb23ae6229c024f8dcb | 13739601330/CPP | /第1部分 C++新增关键字/3.2namespace/namespace.cpp | C++ | cpp | 428 | no_license |
//using NS1::func2; //2
//using namespace NS1; //3
void func1(void);
namespace NS2
{
extern void func2(void);
extern void func3(void);
}
using namespace NS2;
void func3(void);
int main(int argc, char const *argv[])
{
//func1();
//NS1::func2(); //1 作用域解析符
//func2();
//NS2:func2();
NS2::func3();
return 0;
}... |
a1d38d4d6e4860b014047de170b3f502c9b42734 | 56805328220d0a89b2755bdd23fe955d93c0f644 | prutskov/omniscidb | /QueryEngine/ExecutionKernel.cpp | C++ | cpp | 15,325 | permissive | /*
* Copyright 2020 OmniSci, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... |
bafc9943eeff058a7da1ba4706afebf02dc9a9d4 | 55b911462403b17c6f43581f2a3c3ba4ae08a8cd | mychangle123/Chromium-WebCL | /chromium-webcl/src/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc | C++ | cc | 7,989 | 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 "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
#include "apps/app_launcher.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#i... |
57c1dfde6e9d132ab54ed51f5e461aeaef4f1d94 | 84837c8ae166ff3b59cacb151962cac8160a173a | SohrabRoohi/Codeforces | /591A.cpp | C++ | cpp | 869 | no_license | /*
Sohrab Roohi
*/
#include <bits/stdc++.h>
using namespace std;
const double pi=acos(-1.0);
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<PII> VII;
typedef vector<VI> VVI;
typedef map<int,int> MPII;
typedef set<int> SETI;
typedef multiset<int> MSETI;
typedef long in... |
13277c6b030fe45ee1ee9c3613a3428c54eb8eda | 9f0b660a62d070e88f58079b1967eeccb87b09e7 | Sayter99/Rosserial86 | /rosserial_86duino/src/ros_lib/vortex86/utilities/uart.cpp | C++ | cpp | 25,566 | no_license | /*
uart.cpp - DM&P Vortex86 UART library
Copyright (c) 2013 DY Hung <Dyhung@dmp.com.tw>. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2... |
287c5be7b1d519bb2b07e27881f21d704cb0d706 | 68e0dc98ba04ce6e346b69cd1e0ae6de210275ef | AslikyanZhora/Diploma | /XorGate.cpp | C++ | cpp | 539 | no_license | #include "XorGate.h"
XorGate::XorGate(EnumType type) : Gate(type)
{
}
void XorGate::execute()
{
wires[0]->setValue(wires[1]->getValue());
for (size_t i = 0; i < wires.size(); ++i)
{
wires[0]->setValue(wires[0]->getValue() xor wires[i]->getValue());
}
}
Wire* XorGate::getOutput()
{
return wires[0];
}
void Xor... |
52a0c88c2d4633f6bc5835d59534e34ff0edfa7c | 0a192cdce73bf6223f58d7fe8c70774f95c5b90b | ambiesoft/OpenGLPractice | /25/uniformfaster/fileshader/Shader.cpp | C++ | cpp | 4,110 | no_license |
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <iostream>
#include <GL/glew.h>
#include "Renderer.h"
#include "Shader.h"
Shader::Shader(const std::string& filepath)
:m_FilePath(filepath),m_RedererID(0)
{
ShaderProgramSources source = ParseShader();
... |
575c7297c6f11844ae5f50cd45d48e12e218e74a | ba0a1e0ba562eda738dab6a39c7476d4c177f9f7 | ansono/arnold-usd | /render_delegate/basis_curves.cpp | C++ | cpp | 11,742 | permissive | // Copyright 2022 Autodesk, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
5c3c0b12c84baf367fe9346d8970bb3737acd5d4 | 73b129420a40c56c1e0ae66c397e56b954b0f6fd | KimBoWoon/HomeWork | /Visual Studio 2013/Projects/Graphics/ViewportTest/ViewportTest.cpp | C++ | cpp | 756 | no_license | #include <glut.h>
#include <gl\GL.h>
#include <gl\GLU.h>
void MyDisplay() {
glClear(GL_COLOR_BUFFER_BIT);
glViewport(0, 0, 300, 300);
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_POLYGON);
glVertex3f(-0.5, -0.5, 0.0);
glVertex3f(0.5, -0.5, 0.0);
glVertex3f(0.5, 0.5, 0.0);
glVertex3f(-0.5, 0.5, 0.0);
glEnd();
glF... |
2dc98aa5e40aadfc715fb5e855549c8a04aefef8 | 1825b825379d9aeb69d10765b842831fea96c3ac | thedch/SFND_Lidar_Obstacle_Detection | /src/environment.cpp | C++ | cpp | 5,697 | no_license | #include "sensors/lidar.h"
#include "render/render.h"
#include "processPointClouds.h"
// using templates for processPointClouds so also include .cpp to help linker
#include "processPointClouds.cpp"
std::vector<Car> initHighway(bool renderScene, pcl::visualization::PCLVisualizer::Ptr& viewer)
{
Car egoCar( Vect3(0,... |
ad00fcc122e2a7e63dba12282dec9e719ed07398 | ebc1cf822e3775df1893c5692120939a55ef97c7 | rahulgyawali/Algorithms | /Dynamic_Programming/lisubarray.cpp | C++ | cpp | 560 | no_license | #include <bits/stdc++.h>
using namespace std;
int lis(int a[],int n)
{
int i;
int j;
int len=1;
int max=1;
int index = 0;
for(i = 1; i < n; i++) {
if(a[i] > a[i-1]) {
len++;
}else {
if(max < len) {
max = len;
index = i - max;
}
len = 1;
}
}
if(max < len) {
max = len;
... |
54bc5173d4785aea5c343e3836ee87a5e80db4b4 | 155354526238c85c893383eafdc6cc5560570da2 | GusteSL/SingleDog | /139.单词拆分.cpp | C++ | cpp | 958 | no_license | /*
* @lc app=leetcode.cn id=139 lang=cpp
*
* [139] 单词拆分
*/
// @lc code=start
class Solution {
public:
bool wordBreak(string s, vector<string>& wordDict) {
vector<int> tmp_dp(s.size()+1, 0);
tmp_dp[0] = 1;
for(size_t i = 0; i < s.size(); ++i) {
// cout << s[i] <<... |
8bb7b6a31e46a777fdf4066aefb30bd6b06a24f6 | b2fe3c1272d584ec34a74f70c5f3c5fddd1a2d9a | coderTong/aws-sdk-cpp | /aws-cpp-sdk-ec2/source/model/UserIdGroupPair.cpp | C++ | cpp | 5,052 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.