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 |
|---|---|---|---|---|---|---|---|---|
becd61c4fe8f0a4b64e704133efc52025bf68310 | f62e864aa18ae9d73b5d883801ddfda2a54e09e4 | serivt/competitive-programming | /codeforces/contest/Codeforces Round #166 (Div. 2)/A/main.cpp | C++ | cpp | 1,094 | no_license | #include <bits/stdc++.h>
using namespace std;
/* Utilities */
#define fr(i, n) for (int i = 0; i < n; i++)
#define forin(i, k, n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define foreach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define in(a, b, c) a <= b && b <= c
#define clr(x) memset(x, 0, sizeof(x))
#define... |
923a0f08e5323420228887f6de5f38a9faecb58f | 1438ed9f88ad389bc4eee0ab08fcd71a427a33dc | sadrulhc/chromium | /tools/json_schema_compiler/test/generated_schemas_unittest.cc | C++ | cc | 926 | 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 "tools/json_schema_compiler/test/generated_schemas.h"
#include "base/json/json_reader.h"
#include "base/optional.h"
#include "testing/gtest/incl... |
655b3421f2f91901b5847908d49f9d7e8d808cfd | c4d28f154adf361914ca82d63f22d3c5e409f265 | ljzhu/LAScarSeg | /src/ScarSegmenter.cxx | C++ | cxx | 1,796 | no_license | /**
* Given the blood pool of the left atrium, segment the scar tissue
*/
#include "ScarSegmenterCLP.h"
#include <iostream>
#include <string>
#include "localChanVeseWallSegmenter3D.h"
#include "utilities.hxx"
//itk
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
int main(int argc, char** arg... |
583ff2deb798362e8f92259535e1de9fcd4704bd | 5c16c3d8b577a3d40aaccec94f0e38773c4a309e | mrafayfarooq/CPP-Codes | /CP Codes/Exception handling.cpp | C++ | cpp | 1,163 | no_license | /*k112257-M.Rafay Farooq
Program Mechanim:Exception HAndling of different types*/
#include<iostream>
#include<conio.h>
#include <string>
#include<cassert>
using namespace std;
string message="Length out of Bound";
string what()
{
return message;
}
int main()
{
cout<<" Dividend Zero Error Exception "<<endl... |
b2a799bbb6b06e747bd83d3f2341d0d8ab4319a1 | 8a367c930406cec9ae7ab90e20fe97629bc9a76e | MikeSofaer/sirikata | /liboh/plugins/collada/ColladaSystem.cpp | C++ | cpp | 2,301 | permissive | /* Sirikata liboh -- COLLADA Models System
* ColladaSystem.cpp
*
* Copyright (c) 2009, Mark C. Barnes
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of sour... |
41d7cac9cb96e583e3652ac0461de919e7496647 | ae6e69c95f7d6e45f69831df433cf947f759336d | bitzrichcoin/bitzrich | /src/qt/aboutdialog.cpp | C++ | cpp | 1,024 | permissive | #include "aboutdialog.h"
#include "ui_aboutdialog.h"
#include "clientmodel.h"
#include "clientversion.h"
// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source
const int ABOUTDIALOG_COPYRIGHT_YEAR = 2013;
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent),
... |
3e335b4612504276da45d7de47ce86344c5d917f | ed0eb3f7bb972b9a9a90d2f0d8b4e40287bdf643 | devin-dominguez/zenPop | /src/Gameplay.cpp | C++ | cpp | 3,705 | no_license | #include "Gameplay.h"
//--------------------------------------------------------------
void Gameplay::setup(ofTrueTypeFont *font){
Colors::setup();
player = new Player();
this->font = font;
init();
}
//--------------------------------------------------------------
void Gameplay::init() {
Bullet::numComplet... |
2747d7d439db5e2217e458a2e6c1f195cbe15f61 | 8102b8851f1dc77cfbe3239c2b86c8018d0407a7 | RDTCREW/SoT-SDK_2_0_7_reserv | /SDK/SoT_bp_fire_bin_a_classes.hpp | C++ | hpp | 1,326 | no_license | #pragma once
// Sea of Thieves (2.0) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_bp_fire_bin_a_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// ... |
f033d2a4a46f3dcc0b77aa62d372394bbc143a5e | 60afab4707b6b15a0f1089b1995f46f80307a10a | gaokewoo/ds | /test/ListTest.cc | C++ | cc | 1,308 | no_license | #include <iostream>
#include <fstream>
#include "gtest/gtest.h"
#include "alg/List.hh"
using namespace std;
class ListTest:public testing::Test
{
protected:
virtual void SetUp()
{
arr = new int[DATA_NUM];
ifstream in_file;
in_file.open("../data/data.txt",ios::i... |
d56dd94fb5d10a545ddb7b5ab6409f9abf96fde3 | fd8cf65fd8d21ddc77eedbca55532ee6fee9d753 | theycallmesimba/Chess_game | /chessgame.cpp | C++ | cpp | 5,212 | no_license | //Copyright Brandon Buonacorsi
//Date: 4/10/2014
//Property of Turtle Labs Inc.
#include <iostream>
#include <string>
#include "board.cpp"
#include "piece.cpp"
#include "moves.cpp"
using namespace std;
void welcomeScreen(void);
void playerTurn(Board* board, int player);
int getPosition(string pieceInput);
int return... |
0997539d713471c7e9708341f068ff4ab6b85a4e | 42bc4809dc26fc141ca55f159f797e38143f9458 | alexandraback/datacollection | /solutions_2464487_1/C++/Berezin/a.cpp | C++ | cpp | 875 | no_license | #include <iostream>
#include <fstream>
using namespace std;
long long rr, tt, T, l, r, s, x, t;
int main()
{
freopen("input.txt", "r", stdin);
freopen("output1.txt", "w", stdout);
cin >> T;
for (int test = 1; test <= T; test++)
{
cout << "Case #" << test << ": ";
cin >> rr >> t;
l = 1;... |
bdafa376668f0754d05091073e207f790ee9121b | c833994636854846e6a92407645381f66f5bd355 | craigsapp/MazurkaPlugins | /src-plugin/MzSpectralFlux.cpp | C++ | cpp | 44,521 | no_license | //
// Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu>
// Creation Date: Mon Dec 18 20:37:48 PST 2006
// Last Modified: Wed Jan 3 06:09:24 PST 2007
// Last Modified: Sun May 6 01:48:58 PDT 2007 (upgraded to vamp 1.0)
// Filename: MzSpectralFlux.cpp
// URL: http://sv.mazurka.org.uk/src/MzSpec... |
8d3086c263783d46e98b5a0cab6a54ed3dd83481 | 79e1ef1144d206f43a7f2f76f3ff431b1c4476d3 | tmijieux/display3r | /src/Renderer3D.cpp | C++ | cpp | 6,130 | permissive | #include <cmath>
#include <iostream>
#include "display3r/Color.hpp"
#include "display3r/Renderer.hpp"
#include "display3r/Window.hpp"
#include "display3r/Object3D.hpp"
#include "display3r/Object2D.hpp"
using namespace std;
using namespace display3r;
// return the vector between camera.O and the intersection of
// (A... |
3b716d2c1a1062e4d2c0f22b76350147687060ad | 038430429cada17447812393f80ebd16112061b8 | shiv32/Qt_5_Widgets_Classes | /mtable/mytableviewExamle/moc_widget.cpp | C++ | cpp | 2,582 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'widget.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.13.2)
**
** WARNING! All changes made in this file will be lost!
*************************************************************... |
2a8229ac8a588062aa49de207173631e07f0d694 | 1df81d4e623a25366334225a0261ff7f7a832bac | AlexNewtown/pbrt-v4 | /src/pbrt/cpu/render.cpp | C++ | cpp | 14,471 | permissive | // pbrt is Copyright(c) 1998-2020 Matt Pharr, Wenzel Jakob, and Greg Humphreys.
// The pbrt source code is licensed under the Apache License, Version 2.0.
// SPDX: Apache-2.0
#include <pbrt/cpu/render.h>
#include <pbrt/cameras.h>
#include <pbrt/cpu/accelerators.h>
#include <pbrt/cpu/integrators.h>
#include <pbrt/film... |
a3dfb5015dec3a1a6d1d3f3ffaec92722b49bf40 | d0d1b7112136bf53d589c6092ae47d35a874e89a | meniossin/src | /v8/test/unittests/compiler/code-assembler-unittest.cc | C++ | cc | 7,011 | permissive | // Copyright 2017 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 "test/unittests/compiler/code-assembler-unittest.h"
#include "src/code-factory.h"
#include "src/compiler/node.h"
#include "src/interface-descr... |
04973110029a56fc6f020a0a4730cc2a735085d6 | fd7284f9b366cc38b1d942dfebfca94eefddc13d | horance-liu/mnn | /src/mnn/core/optimizer/adam.cc | C++ | cc | 920 | permissive | /*
* Copyright (c) 2021, Horance Liu and the respective contributors
* All rights reserved.
*
* Use of this source code is governed by a Apache 2.0 license that can be found
* in the LICENSE file.
*/
#include "mnn/core/optimizer/adam.h"
namespace mnn {
Adam::Adam() : alpha(Float(0.001)), b1(Float(0.9))... |
478d378ada6971ea602ba7e624da56a75e3007eb | cb00c96fb185eaf7f5c7dcc5ef12088d133d7e7c | kirwinia/ares-emu-v121 | /ares/sfc/coprocessor/competition/competition.cpp | C++ | cpp | 2,556 | permissive | Competition competition;
#include "serialization.cpp"
auto Competition::main() -> void {
if(scoreActive && scoreSecondsRemaining) {
if(--scoreSecondsRemaining == 0) {
scoreActive = false;
}
}
if(timerActive && timerSecondsRemaining) {
if(--timerSecondsRemaining == 0) {
timerActive = fals... |
b7c9212b5115b49bb2308a7a9c846ed652a535ee | 5c680e05b44adbd5a108ce5ff44d884e58bad57f | sefirakarina/Final-Project | /final final/main.cpp | C++ | cpp | 2,953 | no_license | // main.cpp
// Final Project
// Sefira Karina-2001586155-Batch 2020
// Copyright © 2016 Sefira Karina. All rights reserved.
#include<iostream>
#include <string>
#include "finalproject.hpp"
using namespace std;
int main()
{
int humans,choice ;
int num=20;
string namee[num] ;
float score[num],average,remedyScore... |
42ec13ce093d62af2fdbeb0a58835672d2ee23ac | a84592ad133af7c2911b71e0f8d1c5c26b6866e0 | jakubsuchybio/magnum | /src/Platform/WindowlessGlxApplication.cpp | C++ | cpp | 4,640 | permissive | /*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, inc... |
2991aa95e469350df25c434fab3aae6c0e863fca | 1adb5ebb8c40e89cbfbdb73b7be5cde13eebfec2 | shaobinspire/nexus | /Applications/Spire/Include/Spire/KeyBindings/SimplifiedKeyBindingsDialog.hpp | C++ | hpp | 1,716 | no_license | #ifndef SPIRE_SIMPLIFIEDKEYBINDINGSDIALOG_HPP
#define SPIRE_SIMPLIFIEDKEYBINDINGSDIALOG_HPP
#include <Beam/Pointers/Ref.hpp>
#include <QDialog>
#include "Spire/KeyBindings/KeyBindings.hpp"
#include "Spire/Spire/Spire.hpp"
class Ui_SimplifiedKeyBindingsDialog;
namespace Spire {
/*! \class SimplifiedKeyBindingsDialo... |
0bfea89770b7ec9ba5422ba766adaf34d18dc436 | 5ea794aa51f6cb683a7134e43d142f40363a5ce2 | woongseob12/Algorithm | /동적 프로그래밍/14501.cpp | C++ | cpp | 470 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int dp[17];
int main()
{
int N;
cin >> N;
vector<pair<int, int>> schedule(N + 1);
for (int i = 1; i <= N; i++) {
cin >> schedule[i].first >> schedule[i].second;
}
for (int i = N; i >= 1; i--) {
if (i + schedule[i].first - 1 <... |
00c86b95bef9d8eff6b52390e982306394b34c45 | ff2c4e408d2e06628a14ec1eefc98f6f0160b360 | yadiqian/Codeforces | /339B.cpp | C++ | cpp | 886 | no_license | /*
Yadi Qian
*/
#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 int i... |
8c799c335ad3b0f1babf3a6643e7760c99ac90f9 | 211d541f511d9538caac1584a11b2a2863a985ec | fero29/POS_HAD | /src/ClientLogic.cpp | C++ | cpp | 3,223 | no_license | #include "ClientLogic.h"
ClientLogic::ClientLogic(): client(ADDRESS, PORT)
{
std::thread(&ClientLogic::messageReader, this).detach();
std::thread(&ClientLogic::readKey, this).detach();
gameRuntime();
}
void ClientLogic::readKey()
{
char cl;
while(!gameRunning);
while(gameRunning)
... |
77fceaf620fe9247b4c1550fb0546a95b307864f | 0018e95722e897c192da14d1c6e3a191aff58898 | novaquark/aws-sdk-cpp | /aws-cpp-sdk-securityhub/source/model/LoadBalancerState.cpp | C++ | cpp | 1,710 | 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... |
d881025b5aeb23766ce726648a6102d334a94100 | ec1b08a9aa92adfe3ea321fba75949529b43d260 | JetAr/ZNginx | /Book/3dlearn/DirectX/3DGraphicsProgrammingCD/chap06/multipass_spotlight/render_dx10.cpp | C++ | cpp | 8,335 | no_license | #ifdef _ENABLE_DX10_
#include <d3d10.h>
#include "render_data.h"
#include "Gut.h"
#include "GutTexture_DX10.h"
static ID3D10Device *g_pDevice = NULL;
static ID3D10InputLayout *g_pVertexLayout = NULL;
static ID3D10Buffer *g_pVertexBuffer = NULL;
static ID3D10Buffer *g_pVertexBufferFullScreen = NULL;
static... |
fcd84519847a96ef68ba76df48b9d02d7c241383 | 629ef45858cb120202c044de213ebde17751aa8b | mprobst/bazel | /src/main/cpp/startup_options.cc | C++ | cc | 22,260 | permissive | // Copyright 2014 The Bazel 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 appl... |
be07f7b4eab1e403173da93698c5f9ffc0beae0e | 5976b66a992913cce93d602d542d7a175ca4bde0 | Zecca-hub/Project | /Langevien.cpp | C++ | cpp | 10,417 | no_license | #include <cstdint>
#include <iostream>
#include <vector>
#include <cmath>
#include <fstream>
#include <string.h>
#include <random>
#include "langevien_sim.h"
#include "vector_help.h"
#include "simulation.h"
#include "optimize.h"
#define URAND() ((double)rand() / ((double)RAND_MAX+1))
// Evaluation of foundamental st... |
6a078893dad530c9165aad9e8a47516a8660830f | cbe98f64128c3619fe539e76d5f72d105d87be5b | pineal/chromium | /components/safe_browsing/android/safe_browsing_api_handler_bridge.cc | C++ | cc | 8,173 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/safe_browsing/android/safe_browsing_api_handler_bridge.h"
#include <memory>
#include <string>
#include <utility>
#include "base/and... |
d59c29bd45e97e00969832ca6d6d7817e00462da | 1a6ff542ac5c4a1303dec5a0868942cbcbf41459 | el-bart/ACARM-ng | /src/commons/Commons/CmdLineArgs.hpp | C++ | hpp | 1,935 | no_license | /*
* CmdLineArgs.hpp
*
*/
#ifndef INCLUDE_COMMONS_CMDLINEARGS_HPP_FILE
#define INCLUDE_COMMONS_CMDLINEARGS_HPP_FILE
/* public header */
#include <vector>
#include <boost/shared_array.hpp>
#include <boost/scoped_array.hpp>
#include "Commons/Exception.hpp"
namespace Commons
{
/** \brief class making copy of comm... |
abffc06c4903734191abbcb3a453caa5511c9c6a | 1ac115c2451047ddedd0c0dcc09d0a7f3079c521 | marszalek-m/OpenIGTLink | /Examples/Lab_PWP/NowySerwer.cxx | C++ | cxx | 19,298 | permissive | /*=========================================================================
Program: OpenIGTLink -- Example for Data Receiving Server Program
Language: C++
Copyright (c) Insight Software Consortium. All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty... |
405573bf98bd0e9c1b67eed0ce727fffa2cc58f6 | 121f9db580c6377169fd048a9e091c0457e09352 | BeNsAeI/CS575 | /Assignments/Project 4/main.cpp | C++ | cpp | 10,678 | no_license | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <omp.h>
#include <time.h>
#include <algorithm>
#include "OMPUtil.h"
#include "color.h"
#include "const.h"
#define MAXDAYS 72 /*378*/
class Agent{
public:
int GR; //GrothRate
... |
ddeb993b1b3ba0ef60fcad161bc89a1c252d7069 | aaa78187dac1c3307bc36d42dbf730d51954435b | malasip/mineserver | /plugins/commands/commands.cpp | C++ | cpp | 23,855 | no_license | /*
Copyright (c) 2011, The Mineserver Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of condition... |
8d55918c7a9dd34eec32c5dc9ef224d7755604c6 | a2c934738050e865ede3abbd8fbdb6800cb50eb3 | Wiserlightning/1104a_comp_code | /src/subsystem_files/intake.cpp | C++ | cpp | 813 | permissive | #include "subsystem_headers\globals.hpp"
#include "subsystem_headers\intake.hpp"
using namespace okapi;
std::shared_ptr<AsyncVelocityController<double, double>> intake_controller = AsyncVelControllerBuilder()
.withMotor(intake_grp)
.build();
void intake_op(void) {
intake_grp.setBrakeMode(BRKE_HOLD);
... |
42b2d6ba9fa0f85fa6a52346e2346122cfa13099 | c976f68e7c537ef0bea483acbe17744f22b8316e | illperipherals/RAK4631-LoRa-BLE-Config | /nrf52-LoRaP2P-Config-BLE/ble.cpp | C++ | cpp | 4,390 | no_license | /**
@file ble.cpp
@author Bernd Giesecke (bernd.giesecke@rakwireless.com)
@brief BLE initialization & device configuration
@version 0.1
@date 2021-01-10
@copyright Copyright (c) 2021
*/
#include "main.h"
/** OTA DFU service */
BLEDfu ble_dfu;
/** BLE UART service */
BLEUart ble_uart;
/** Device in... |
fed714f5b53b9ae629445c739a3905bf7816212e | 3a912d89b66bbcb117984edf67b952f1badc18cb | shaival141/Practice_Old | /Arrays/Array_Rearrangement/SortedSubSequenceOfSize3InLinearTime.cpp | C++ | cpp | 1,155 | no_license | // C/C++ program to find a sorted subsequence of size 3
#include<stdio.h>
// A function to fund a sorted subsequence of size 3
void find3Numbers(int arr[], int n)
{
int greater[n];
int smaller[n];
int i;
for(int i=0;i<n;i++)
{
greater[i]=-1;
smaller[i]=-1;
}
//find smaller ... |
ff75ad907651802b39942424eb213154dcae967e | 0974ff8552382daf17a20336dc052b5ff5310358 | rzr/chromium-crosswalk | /extensions/common/permissions/socket_permission_entry.cc | C++ | cc | 6,542 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/common/permissions/socket_permission_entry.h"
#include <cstdlib>
#include <sstream>
#include <vector>
#include "base/logging.h"
#in... |
2c3486bdb3cc30ce816c2407ea0ca052e377b5b9 | efbeba43f3a95d8c26d5786a99d3abe370365ae6 | kimnahee1529/CppPracticalProblem | /4_3.cpp | C++ | cpp | 479 | no_license | #include <iostream>
#include <string>
using namespace std;
int main() {
cout << "문자열 입력>>";
string s;
getline(cin, s, '\n');
int index = s.find('a');
int num = 0;
for (int i = 0; i < s.length(); i++) {
if (s.at(i) == 'a')
num++;
}
cout << num;
}
/*int main() {
cout << "문자열 입력>>";
string s;
getline(cin... |
f60ca8472071c182e8bdd2c95112e32a452c63bd | d18caa23346095fdaaf6ec673d2b76df3289ad1a | hustwarhd/pal | /src/core/layers/interfaceLogger/interfaceLoggerLogContextStruct.cpp | C++ | cpp | 80,372 | permissive | /*
***********************************************************************************************************************
*
* Copyright (c) 2016-2018 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associ... |
75ac5cdd1c34d8d7547ef3b35a95a97300aaa0f2 | 2f95b2028ed455324ad9c072698bf797415a17fd | dominic162/sorting | /merge_intervals.cpp | C++ | cpp | 1,697 | no_license | /*
Given intervals. Merge overlapping intervals;
*/
#include<iostream>
#include<vector>
using namespace std;
class interval{
public:
int start;
int end;
};
class solution{
public:
vector<interval> add_interval(int n);
vector<interval> merge_interval(vector<interv... |
c0e2509efad8ec4fc655105cf61f031bf9192be7 | dbba322844e5971945dd37937fb8cddb20b8a8f5 | simright/VTK | /Filters/HyperTree/vtkHyperTreeGridDepthLimiter.cxx | C++ | cxx | 7,194 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: vtkHyperTreeGridDepthLimiter.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
T... |
ee92920561674d8a76ddb68d8e46efb38d805f89 | 13365bf696ecf2accf028c41528fdaa1325f00bd | MaticVrtacnik/ProceduralnaAnimacija | /timer/PostProcessing/CombineEffects.cpp | C++ | cpp | 2,253 | permissive | /*
MIT License
Copyright (c) 2019 MaticVrtacnik
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... |
c682d4cb08c1713273f415dcd91f1fede4c152a6 | e887f3f724e5a9ef2ba107eb306493af022de955 | ossimlabs/ossim | /src/base/ossimFpt.cpp | C++ | cpp | 2,252 | permissive | //*******************************************************************
//
// License: See top level LICENSE.txt file.
//
// Author: David Burken
// Description:
//
// Contains class definitions for ossimFpt.
//
//*******************************************************************
// $Id: ossimFpt.cpp 11399 2007-07-... |
9ca5c2f2b8f2dd1ff0d3c2afc30d1bc40064bccd | 71d86904fc304ad654e25e8d1003cda0f6da46bf | dguenms/Dawn-of-Civilization | /CvGameCoreDLL/Boost-1.32.0/include/boost/spirit/core/composite/optional.hpp | C++ | hpp | 2,829 | permissive | /*=============================================================================
Copyright (c) 1998-2003 Joel de Guzman
Copyright (c) 2001 Daniel Nuffer
Copyright (c) 2002 Hartmut Kaiser
http://spirit.sourceforge.net/
Use, modification and distribution is subject to the Boost Software
Lic... |
8ca55ba9e2b455c12e1e43a6830fcb13c9753c86 | 92a1e3735cde17c53cc30994c13714f856e55a94 | dkwkekzz/algorithms | /source/else/Algorithms/JLIS.cpp | C++ | cpp | 879 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
const long long NEGINF = numeric_limits<long long>::min();
int lis1[100], lis2[100], cashe[101][101];
int n, m;
int jlis(int indexA, int indexB) {
int &ret = cashe[indexA + 1][indexB + 1];
if (ret != -1) return ret;
ret = 0;
long long a = (indexA == ... |
be931696246851efffa121445049385ff4ee08d5 | cf4123bcc1c15052934330e6851688c26f9e6c06 | Spenson/Basic-Hide-and-Seek-Game | /Degen/Engine/Component/Firefly.cpp | C++ | cpp | 252 | no_license | #include "Firefly.h"
#include "../FileReading/JsonHelpers.h"
namespace Degen
{
namespace Component
{
Firefly::Firefly() :iComponent(FIREFLY_COMPONENT)
{
}
bool Firefly::Deserialize(Json::Value& json)
{
return false;
}
}
}
|
be1ff4ff60dec2d7e7c6b20a0b6ef6710c1930ec | 40bbed6ddd1354106d3d56f6a845141f695ec846 | strategist614/ACM-Code | /刷题比赛/算法/线段树/BZOJ3211.cpp | C++ | cpp | 1,549 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 100010;
ll a[N],n,m,ans;
struct stree
{
int l;
int r;
ll sum;
int add;
}tree[N<<2];
void pushup(int rt)
{
tree[rt].sum = tree[rt<<1].sum + tree[rt<<1|1].sum;
tree[rt].add = tree[rt<<1].add & tree[rt<<1|1].add;
}
void build(... |
43dc36e393fd7e3c47222da7408c5aae0fd49452 | 10db4b61259fb4596a4e1af01fe414d9b07d39d5 | kartikjagdale/CPP-Exercise-Codes-From-Lynda-and-Random-CPP-Codes | /Lynda Programs/funcmem_const_safe.cpp | C++ | cpp | 624 | no_license | /*
Name: Demo of const safe function
Author: Kartik Jagdale
*/
#include<iostream>
using namespace std;
class A{
int ia;
public:
void setA(const int a);
int getA();
int getA() const;
};
void A::setA(const int a) {
ia = a;
}
int A::getA(){
cout<<"This is mutable version of getA"<<endl;
retur... |
c8b53166b8118d75703fa7f37afa7075a9f2b007 | 7bbbfee28f9daec837268729d92da8588502e7d2 | unbelievable0525/Agilent | /CentrifugeControl/CentrifugeControlDlg.cpp | C++ | cpp | 3,583 | no_license |
// CentrifugeControlDlg.cpp: 实现文件
//
#include "pch.h"
#include "framework.h"
#include "CentrifugeControl.h"
#include "CentrifugeControlDlg.h"
#include "afxdialogex.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
class CAboutDlg : public CDialogEx
{
public:
CAbou... |
006aec5577178fd42b452182bf28e67629422b48 | ca9fdf2449cb618982ac7b4f211158d3a44bcd5d | lgsvl/chromium-src | /content/renderer/origin_trials/web_trial_token_validator_impl.cc | C++ | cc | 1,067 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/origin_trials/web_trial_token_validator_impl.h"
#include "base/time/time.h"
#include "content/common/origin_trials/trial_token... |
44e2d37117c24685a14bb67b7db6519d8691a2e1 | 2adc344531de3bfe993408802fb92cdc9c78233a | banxiashiguang/LeetCode | /Tree/breadthFirstTravel/breadthFirstTravel.cpp | C++ | cpp | 1,173 | no_license | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x):val(x),left(nullptr),right(nullptr) { }
};
class Solution
{
public:
vector<vector<int> > breadthFirstTravel(TreeNode *root)
{
vector<vector<int> > res;
if(r... |
f4a27e5d7bb06d23ae733551d91436887c0736ef | 7df7b604c59dfb1fa8c5a0ef5e29a82ddac55711 | DRG-Modding/Header-Dumps | /Current/CoreUObject.hpp | C++ | hpp | 9,567 | no_license | #ifndef UE4SS_SDK_CoreUObject_HPP
#define UE4SS_SDK_CoreUObject_HPP
#include "CoreUObject_enums.hpp"
struct FARFilter
{
TArray<FName> PackageNames;
TArray<FName> PackagePaths;
TArray<FName> ObjectPaths;
TArray<FName> ClassNames;
TSet<FName> RecursiveClassesExclusionSet;
bool bRecursivePaths;
... |
2ccd9fd61368776f135bbcbf496c2dff0d1bcbf9 | abc0f40df374a32b1d62a34fec6ffed0e4934b12 | Engin-Boot/environment-case-s1b8 | /EnvironmentMonitoring/Receiver/ReceiverMain.cpp | C++ | cpp | 450 | permissive | #include "stringInputParser.h"
#include"rangeChecker.h"
#include"alertWithLight.h"
#include"alertWithNotification.h"
#include"Receiver.h"
int main()
{
iInputParser* stringInputparserObj=new(nothrow)stringInputParser;
iAlerter* alerterObj = new(nothrow)alertWithNotification;
rangeChecker rangeCheckerObj(alerterObj)... |
283a4ab9c263b7b4a2efeb1e32e228f7c315d8ce | e484617dc5c84c426b8c1f0b0a4ea6acc9b2ea95 | GoeSysWare/AiwSys | /modules/test/test_torch/test_torch.cpp | C++ | cpp | 546 | no_license |
#include <torch/torch.h>
#include <iostream>
int main() {
torch::Tensor tensor = torch::rand({2, 3});
std::cout << tensor << std::endl;
torch::DeviceType device_type = torch::kCUDA; //torch::kCUDA and torch::kCPU
torch::Device device(device_type, 0);
torch::Tensor tensor_rotation = torch::tensor({ 0.999832,... |
6c20a3118c7943333379720eb7906a2d51d50b35 | 63f92c4f696ce5c26a87d5a4e3a53fcc53d3f582 | xueer2422/swift-1 | /lib/Basic/StringExtras.cpp | C++ | cpp | 30,234 | permissive | //===--- StringExtras.cpp - String Utilities ------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
402b2a468b6a80ca98ad8f27248d381fefaa2e89 | 7b5275577335a7f819fb2e20c6fb9f027e982587 | hwx0000/LearnCharacterAnimationWithDirect3D | /Chapter 14/Example 14.3/skinnedMesh.cpp | C++ | cpp | 18,315 | no_license | #include "skinnedMesh.h"
#include <fstream>
#include <queue>
#include <map>
#pragma warning(disable:4996)
extern IDirect3DDevice9* g_pDevice;
extern ID3DXEffect *g_pEffect;
extern ofstream g_debug;
extern D3DXVECTOR3 g_rayOrg;
extern D3DXVECTOR3 g_rayDir;
void PrintMeshDeclaration(ID3DXMesh* pMesh)
{
//Get vertex d... |
646dd8889d06def2598eda0ce292754605d3423c | 3fb044a4379fddb4ff993338253f381a506ef18d | tomasarrufat/cppcourse | /advancedCpp/FunctionPointersExample/src/FunctionPointersExample.cpp | C++ | cpp | 1,200 | no_license | // Name : FunctionPointersExample.cpp
#include <iostream>
#include <algorithm>
#include <vector>
void testPrint(std::string input)
{
std::cout << "Hello " << input << std::endl;
}
bool matchLength(const std::string input, int lenght)
{
return input.size() == lenght;
};
int countStrings(const std::vector... |
987561d4c568a17818e8344a2e992df8c47f066c | a8c88aea3256f37459ca3fda5ad7361439f2a397 | BPI-SINOVOIP/BPI-A83T-Android6 | /android/external/deqp/framework/common/tcuThreadUtil.hpp | C++ | hpp | 6,143 | permissive | #ifndef _TCUTHREADUTIL_HPP
#define _TCUTHREADUTIL_HPP
/*-------------------------------------------------------------------------
* drawElements Quality Program Tester Core
* ----------------------------------------
*
* Copyright 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version ... |
dac53904ede87d381c230035a014ede4bfc919bc | 47097420e1ce94fb91308509857aaa78f85e0e62 | airplaneForGroundUseOnly/prog2 | /integer.cpp | C++ | cpp | 811 | no_license | #include <cstdlib>
// Integer class
class Integer{
public:
Integer(int);
int get();
void set(int);
int fib(int);
private:
int val;
};
Integer::Integer(int n){
val = n;
}
int Integer::get(){
return val;
}
void Integer::set(int n){
val = n;
}
int Integer::fib(int n){
if(n <= 1) {
... |
fadd0b798fe4e063bb9156622b18b6d2dcb15a95 | e03c9e8924d9a0d14103b598d3789892e22d2e19 | theresistant/socketsandboost | /main.cpp | C++ | cpp | 5,407 | no_license | #include <iostream>
#include <WS2tcpip.h>
#include <sstream>
#include <conio.h>
#include <string>
#include <fstream>
#include <ctime>
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/state_machine_def.hpp>
#include <boost/msm/front/functor_row.hpp>
using namespace std;
namespace {
namespace msm ... |
8870b5d32a0e433487740931e0fe23b09000e5a5 | db393df2e315a4abdf089a286e2b36a1124256d0 | dgquintas/libmpplas | /src/sources/tests/units/MatrixRTest.cpp | C++ | cpp | 1,280 | no_license | /*
* $Id$
*/
#include "MatrixRTest.h"
#include "aux.h"
using namespace mpplas;
using namespace com_uwyn_qtunit;
MatrixRTest::MatrixRTest()
: funcs( MethodsFactory::getReference() )
{
funcs.getFunc(rnd) ;
addTest(MatrixRTest, testInverse);
addTest(MatrixRTest, testSolve);
}
void MatrixRTest::setUp(){
... |
7715ac961aad9b2b11b3bc76b73134c00edfc5db | 9773c56748eb4a7ebb530c3735c74e7dfe934da8 | FrauBluher/ShR2 | /ESP8266/ESP8266_SDK/include/xcc/c++/ext/pb_ds/detail/splay_tree_/traits.hpp | C++ | hpp | 3,887 | permissive | // -*- C++ -*-
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either v... |
d451878af3681c1d4a232448304d5a8bea5ed874 | 2487d1184d14e52fb3f5bfd778f555ff082cdd39 | Divyalok123/LeetCode_Practice | /Practice/Minimum One Bit Operations to Make Integers Zero.cpp | C++ | cpp | 632 | no_license | /*
https://leetcode.com/problems/minimum-one-bit-operations-to-make-integers-zero/
*/
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
class Solution {
public:
int minimumOneBitOperations(int n) {
if(n <= 1) return n;
if(n == 2) return 3;
if(n == 3) return 2;... |
150aff1c3204306024183aee11e5cda1cd9c4989 | a4218b6ce1951164a1b12cec62c028f97277c071 | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_repos_function_2388_httpd-2.4.25.cpp | C++ | cpp | 260 | no_license | static int ngn_update_window(void *ctx, void *val)
{
ngn_update_ctx *uctx = ctx;
h2_task *task = val;
if (task && task->assigned == uctx->ngn
&& output_consumed_signal(uctx->m, task)) {
++uctx->streams_updated;
}
return 1;
} |
4a94029fb03fb7688ae113e4db9605508825b3b9 | 9d0439c2828e9f582fc831643279a3f6d70a6ef7 | xlm04322/android-4.3 | /external/clang/test/Misc/diag-template-diffing-cxx98.cpp | C++ | cpp | 897 | permissive | // RUN: %clang_cc1 -fsyntax-only %s -std=c++98 2>&1 | FileCheck %s
namespace PR14342 {
template<typename T, char a> struct X {};
X<int, 1> x = X<long, 257>();
// CHECK: error: no viable conversion from 'X<long, [...]>' to 'X<int, [...]>'
}
namespace PR15513 {
template <int x, int y = x+1>
class A {};
voi... |
f5d17d8b36a50b1293ed740501253a3ae474890a | 33778a1c6259813e743baff8d9a33fe17d7896c8 | mozhuxlan/X | /main.cc | C++ | cc | 307 | no_license | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "server.h"
#include "config.h"
int main(int argc, char *argv[])
{
CConfig cfg;
if(-1 == cfg.Load(argv[1]))
{
return 0;
}
CServer server;
if(server.Init(cfg) != 0)
{
return 0;
}
server.Start();
server.Destroy();
return 0;
}
|
0bb5d5bcfca18c36560fb2fa5f96ffab4d12cc01 | 76ef5336fba30e705f38bcadb1a64c2285985695 | krishnashah921/Linked-list | /intersection point usingone loop.cpp | C++ | cpp | 2,475 | no_license | #include<stdio.h>
#include<stdlib.h>
struct node {
int data;
struct node *next;
};
void create(struct node **start);
void display(struct node **start);
void intersectionpoint(struct node **start1,struct node **start2);
int main()
{
int ch=1;
struct node *start1=NULL,*start2=NULL;
while (ch==1)
{
... |
b30006533121880c049ac042b9d8f143af6c53f1 | a1ef63faf008de53d978f28293cd2a8215dda216 | ppiecuch/flowed | /modules/akima/fem/utils/string_to_double.hpp | C++ | hpp | 5,312 | permissive | #ifndef FEM_UTILS_STRING_TO_DOUBLE_HPP
#define FEM_UTILS_STRING_TO_DOUBLE_HPP
#include "../utils/char.hpp"
#include "../utils/simple_streams.hpp"
#include "../tbxx/optional_copy.hpp"
namespace fem { namespace utils {
template <size_t Size>
struct string_to_double_ad_hoc_limts;
// Simple upper estimates, not g... |
f81502252371c85404cf595d25cc812eea474cdd | 11ada59750145768e5435448753fb4c2dbc6a0de | Krisania/parallella-1dfft | /src/main.cpp | C++ | cpp | 3,175 | no_license | #include <stdlib.h>
#include <stdio.h>
#include <e-hal.h>
#include <iostream>
#include <fstream>
#include "kiss_fft.h"
#include "common.h"
#include <vector>
#include <queue>
#include <map>
#include <algorithm>
#include <string>
#include <cassert>
#include <e-loader.h>
using namespace std;
int main(int argc, char *arg... |
c7f67473e300a196ac5d18dd5113c092203651d1 | 5f58a2d163f6c6781ed862ab26149b8b9efddd87 | yyko11/nebula | /src/storage/test/StorageHttpAdminHandlerTest.cpp | C++ | cpp | 3,998 | permissive | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include <gtest/gtest.h>
#include <folly/json.h>
#include "webservice/WebService.h"
#include "web... |
e349c567678258957a4b6a368e4b358c12e474d1 | ffb7f3e7d82e15d1239ca6d40a3cde98616404a0 | Bluarggag/hhvm | /hphp/runtime/ext/icu/ext_icu_iterator.cpp | C++ | cpp | 2,795 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
| Copyrigh... |
38ec76bf676c96b8b44483c32d24fa455bc3c612 | 0366bbf8ac42ba2f79722c2cc915aa76a486b808 | vscroll/pendulum | /ros/pendulum_ros/src/pendulum_pos_control/pendulum_ros.cpp | C++ | cpp | 897 | no_license | #include <ros/ros.h>
#include "pendulum_ctrl_pos.h"
#define CTRL_MODULE_ATT 0
#define CTRL_MODULE_POS 1
int main(int argc, char **argv) {
ros::init(argc, argv, "pendulum_pos_control");
ros::NodeHandle nh("~");
/*
int ctrl_module = 0;
nh.param<int>("ctrl_module", ctrl_module, CTRL_MODULE_ATT);
*/
PendulumCtrlPo... |
babb9b91bfd4bfb41559b24f6d7c62323a95f8c2 | 720ca0229559a98c117846ae7d115f289d12704d | priorpeak/Developer | /Algorithms/HW3/zigger.cpp | C++ | cpp | 618 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<int> vec = {3, 1, 4, 5, 3, 7, 2};
for (int i = 0; i < vec.size(); i++)
cout << vec[i] << " ";
cout << endl;
for (int i = 0; i < vec.size() - 1; i++)
{
if (i % 2 == 0)
{
if (vec.at(... |
d2ed00a115f77c7987f0c46ded336d2de071c153 | 2cae80b7322d5f1aff6facc2ddf754fa39f42467 | hokein/chromium | /chrome/browser/ui/views/frame/opaque_browser_frame_view.cc | C++ | cc | 37,692 | 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/views/frame/opaque_browser_frame_view.h"
#include <algorithm>
#include <string>
#include "base/compiler_specific.h"
#inc... |
3437754047d375f2b7fa5f82c5587cefcdd8947f | 5e3e3c03c50ac6f2fe58813d85f3241675bb3a97 | Gabriel-Fronio/Graph | /headers/SparseMatrix_headers/Avl_headers/Node.hpp | C++ | hpp | 3,098 | no_license | #ifndef NodeClass
#define NodeClass
template <class T>
class Node{
private:
T info;
Node<T>* left;
Node<T>* right;
Node<T>* rotateLeft() {
Node<T>* auxNode = this->right->left;
Node<T>* ret = this->right;
ret->left = this;
ret->left-... |
258082b9ab01e259e838d6d1e2773231f4921607 | 68ff3f5525634117d92681faf65743bf4d950b3d | janjongboom/mbed-os-dev-lorawan | /features/lorawan/lorastack/phy/LoRaPHYCN470.cpp | C++ | cpp | 15,242 | permissive | /**
* @file LoRaPHYCN470.cpp
*
* @brief Implements LoRaPHY for Chinese 470 MHz band
*
* \code
* ______ _
* / _____) _ | |
* ( (____ _____ ____ _| |_ _____ ____| |__
* \____ \| ___ | (_ _) ___ |/ ___) _ \
* _____) ) ____| | | || |_| ____( (_... |
dd79ec6589bd4fd5169a9697e5c7c33d25f34026 | 5b8710db244cb8de85d546bdc8fff18c93ffe15b | yzdxs/LibSpacey | /test/test_srsengine.cpp | C++ | cpp | 5,358 | permissive | #include <iostream>
#include <chrono>
#include "gtest/gtest.h"
#include "flashcard.h"
#include "srsengine.h"
TEST(srsengine, grade_0_response) {
unsigned int grade = 0;
unsigned long long october_23_2016 = 1477207892;
float expectedEasinessFactor = 2.5;
Flashcard card = Flashcard();
card.setPre... |
1fd336d5b99c0d467eb45a480ae9c984a6570d7b | c18f02e8392f39d00e01fee853810320228b59f7 | nv-legate/legate.core | /tests/integration/collective/src/library.cc | C++ | cc | 1,310 | permissive | /* Copyright 2023 NVIDIA Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... |
440f34243b21c3e7a766c1800fbcf0dd4a70bca1 | 98533bde3388cf257ac00b70999f14def95d3098 | sachinpro/sachinpro.github.io | /tensorflow/core/graph/graph_partition_test.cc | C++ | cc | 12,613 | permissive | /* Copyright 2015 Google Inc. 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 agreed to in ... |
34d67a6d367bd6b65cfd7bc771259b68260b9ddc | 803e81d8904b601ce61bd8103faa9140ebabbf4c | Kneerk/Sanntid | /Elevator.cpp | C++ | cpp | 8,326 | no_license | #include "OrderManager.h"
#include "Elevator.h"
#include "elev.h"
#include "channels.h"
#include "io.h"
#include "sendrec.h"
#include <stdlib.h>
#include <stdbool.h>
#include <iostream>
#include <unistd.h>
#include <deque>
#include <algorithm>
using namespace std;
Elevator::Elevator(){
currentState = DOWN;
directio... |
a1a1fe2bd3eb511a37f718bbbec2b6f731a369e6 | 441129b5057abc6b4544dcd566839e1ceb00e885 | CadQuery/OCP | /opencascade/TColGeom2d_Array1OfCurve.hxx | C++ | hxx | 979 | permissive | // Created on: 1993-04-15
// Created by: Philippe DAUTRY
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GN... |
d51e8730675dcc11747aab38896f87205d4ab802 | ab7d3f16a655a8b96aca07d176cb7ee1da675fae | yangco-le/LeetCode | /夏令营准备/复数集合/main.cpp | C++ | cpp | 818 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
using namespace std;
struct Complex {
int real;
int imag;
Complex(int a, int b) {
real = a;
imag = b;
}
bool operator< (const Complex& c) const {
return real * real + imag * imag < c.real* c.real + c.imag * c.imag;
}
}... |
17848aa7d629102e5d44453ba2c5c11acc8497d1 | 78daf8bf350fcf50afa66065fba163ef72bbfc03 | ssheikho/uPredictor | /upredictor/uPredictor/UBCCamera/CameraModel.cpp | C++ | cpp | 611 | no_license | #include "CameraModel.h"
#include "FrameDesc.h"
#include <iostream>
using namespace std;
CameraModel::CameraModel(
libfreenect2::Freenect2Device::IrCameraParams *params
, FrameDesc &fd)
{
update(params, fd);
}
CameraModel::~CameraModel() {}
void CameraModel::update(libfreenect2::Freenect2Device::IrCameraParams ... |
fc9db2cd188d07ce2ce5b463e2882127734451ec | ea71c406b3b05fcdf2b27b316b6975d6c3c79947 | vindared/aarith | /experiments/dsp_packing/DUT.hpp | C++ | hpp | 6,205 | no_license | #pragma once
#include "DSP.hpp"
#include "util.hpp"
#include <functional>
namespace dsp_packing {
/**
* @brief Helper function the extracts the individual results from the DSP's output bitstring
* @param result The result computed by the DSP
* @return The individual extracted results
*/
template <size_t WWidth =... |
c4eaad667c8d3828e1dd4a4cc64fb211e989e546 | c01701774e302e9e273bda8df875dd3b48b63444 | Felicia56/cpluspluscourse | /code/move/solution/NVector.sol.hpp | C++ | hpp | 4,021 | permissive | #include <ostream>
#include <assert.h>
#include <algorithm>
#include <numeric>
template <int N, typename T=float>
class NVector {
public:
typedef T BaseType;
NVector();
NVector(T initialValue, T inc);
NVector(const NVector &other);
NVector(NVector &&other);
~NVector();
NVector& operator-(... |
b8d313f7db952a62b31f7bb07308ac2c18319ce9 | 434f3e440cb106a231429a22092687273fcba4e6 | niuxu18/logTracker-old | /second/download/rtorrent/gumtree/rtorrent_repos_function_68.cpp | C++ | cpp | 390 | no_license | torrent::Object
apply_f_path(torrent::File* file) {
if (file->path()->empty())
return std::string();
torrent::Object resultRaw(*file->path()->begin());
torrent::Object::string_type& result = resultRaw.as_string();
for (torrent::Path::const_iterator itr = ++file->path()->begin(), last = file->path()->end()... |
fb4b03efbaf7d46c2eebc2ab8e9bc5392968436c | 4b74a577c7ac01c4954406763e8cae70810d8179 | hotpoor/kagome | /test/core/runtime/runtime_external_interface_test.cpp | C++ | cpp | 20,625 | permissive | /**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "runtime/impl/runtime_external_interface.hpp"
#include <binaryen/wasm-s-parser.h>
#include <boost/format.hpp>
#include "core/extensions/mock_extension.hpp"
#include "core/runtime/mock_memory.hpp"
using ::tes... |
3378e5043eabbe9713251607262028d356a3ac4b | 2cb6468ff30416532e4da4b950171442d3d51685 | alaneos777/club | /project euler/293.cpp | C++ | cpp | 900 | no_license | #include <bits/stdc++.h>
using namespace std;
using lli = long long int;
vector<bool> is;
vector<int> primes;
void sieve(int n){
is.resize(n+1, true);
is[0] = is[1] = false;
for(int i = 2; i <= n; ++i){
if(is[i]) primes.push_back(i);
for(int p : primes){
int d = i*p;
if(d > n) break;
is[d] = false;
... |
0b2ac10dd2adad82c2c7f9e03e5ec9930bb8d251 | d2fbcd5fddd6bfcc993c1003ce2f9d2066776889 | BackupTheBerlios/fluxbox-svn | /tags/Release-0_9_15/src/Slit.cc | C++ | cc | 42,671 | permissive | // Slit.cc for fluxbox
// Copyright (c) 2002 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
//
// Slit.cc for Blackbox - an X11 Window manager
// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net)
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and as... |
43d984462c302661548329fef7b811787a36e3e6 | a48ef8e5904caff84334b18f9e3e830dedfa0e68 | SixShoot/season2.5mu | /_startGS/offsystem.cpp | C++ | cpp | 5,190 | no_license | #include "stdafx.h"
//==================================================================================================
// Offline Trade System
//==================================================================================================
CRITICAL_SECTION criti;
COFFTrade OFFTrade;
OFFLINETRADE OfflineShop[OBJ... |
a67d03f90afefe66e7e2a4990e7ca090b5632c55 | 7da7d8523d50de6ed98b5c2f2ff1e51760a58b41 | yyt12345/learn_cpp | /design_pattern/3_abstract_factory/AbstratFactory.cpp | C++ | cpp | 2,822 | no_license | /*
* 抽象工厂模式实例:
* Jungle想要进行户外运动,它可以选择打篮球和踢足球。但这次Jungle不想弄脏原本穿的T恤,所以Jungle还需要穿球衣,打篮球就穿篮球衣,踢足球就穿足球衣。篮球保管室可以提供篮球和篮球衣,足球保管室可以提供足球和足球衣。Jungle只要根据心情去某个保管室,就可以换上球衣、拿上球,然后就可以愉快地玩耍了。
* 抽象产品类:AbstractBall、Shirt
* 具体产品类:Basketball、Football BasketballShirt、FootballShirt
* 抽象工厂:AbstractFactory
* 具体工厂类:BasketballFactory Shi... |
c4b41d24380ac92af114da1703775cbb225c3709 | 9fe33b3a1885243f25b91ee206f4f62c52485e6b | jfurtner/PowerToys | /src/modules/powerrename/unittests/PowerRenameRegExBoostTests.cpp | C++ | cpp | 16,606 | permissive | #include "pch.h"
#include "CppUnitTest.h"
#include "powerrename/lib/Settings.h"
#include <PowerRenameInterfaces.h>
#include <PowerRenameRegEx.h>
#include "MockPowerRenameRegExEvents.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace PowerRenameRegExBoostTests
{
struct SearchReplaceExpecte... |
976fa5df696cd355a3da277802b8efb5abfc6869 | d814b571222c89977d42a60ffa2b168f9dd71217 | ComputationalBiomechanicsLab/opensim-creator | /src/oscar/Tabs/ErrorTab.hpp | C++ | hpp | 807 | permissive | #pragma once
#include "oscar/Tabs/Tab.hpp"
#include "oscar/Utils/CStringView.hpp"
#include "oscar/Utils/UID.hpp"
#include <exception>
#include <memory>
namespace osc { template<typename T> class ParentPtr; }
namespace osc { class TabHost; }
namespace osc
{
class ErrorTab final : public Tab {
public:
... |
ff63305f60aedf9bbe96eeebe0682cd0c3e897d3 | 25049e09b1b39f6db4323c20a5093e1d98f0a33b | ubiquity6/aws-sdk-cpp | /aws-cpp-sdk-email/source/SESClient.cpp | C++ | cpp | 91,457 | 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... |
1fe2b06e4eeeaf287bd3257ec0b60e332ccd6127 | 26f3d69609e10136366c182cbbe60b98903d354b | jpfeuffer/OpenMS | /src/openms/source/SYSTEM/File.cpp | C++ | cpp | 27,142 | permissive | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
62b20df976f6877561b20e89960b7eb3ed210fe2 | 841153366c664d3bc773f6217c0ae979ea00c7d8 | whatisor/mediasoup-client-android | /mediasoup-client/deps/webrtc/src/modules/desktop_capture/win/screen_capture_utils.cc | C++ | cc | 5,144 | permissive | /*
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
2e93cfce44c5f7e7ca4d17b3f349eb35245d395e | f5649d3f863c3802419f33966ad8aafe28ea3eba | MechanicalDragon0687/3dsUI | /source/gui/Panel.cpp | C++ | cpp | 1,370 | no_license | #include "gui/Panel.hpp"
#include "gui/DataTypes.hpp"
#include "gui/Container.hpp"
#include "gui/Element.hpp"
#include "gui/Theme.hpp"
#include "gui/drawingHelper.hpp"
#include <string>
Panel::Panel(Vector3f location, Vector2f size, std::string id, std::string label, uint32_t flags) : ContainerElement(locati... |
19d78ba81109e1016f26ad34eb5436579a615026 | 8d9d427b6e482d3a4cd431eb781f9c2d79eb360f | EarthaH/BomberMan | /src/bomb.cpp | C++ | cpp | 943 | no_license | #include "../includes/bomb.hpp"
Bomb::Bomb() : _time(1), _active(false)
{
this->_type = BOMB;
}
Bomb::Bomb(int x, int y) : _time(1), _active(false)
{
this->_position.x = x;
this->_position.y = y;
this->_position.oldX = x;
this->_position.oldY = y;
this->_type = BOMB;
}
Bomb::Bomb(Bomb const & copy)
{
this->_t... |
16abd65e84550a8b54e4c359ad79b6aa34d3277f | daf1913fc22c09f8a19b90a5d5e8339812e19f66 | ALEHACKsp/RoCo-SDK | /SDK/RoCo_CinematicCamera_structs.hpp | C++ | hpp | 10,326 | no_license | #pragma once
// Rogue Company (0.60) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "RoCo_Basic.hpp"
#include "RoCo_CinematicCamera_enums.hpp"
#include "RoCo_Engine_classes.hpp"
#include "RoCo_CoreUObject_classes.hpp"
namespace SDK
{
//------------------------------------------------------------------... |
6cf1cafa5acba96bdd553626c9195237b1b5b8ed | df110024908afec06a6979e38d576e91c0210321 | farukshin/stepik | /task_cpp/ch4/ch4_3_5.cpp | C++ | cpp | 710 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ios_b \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
typedef long long ll;
typedef long double ld;
void solve()
{
int a, b, k = 0, ans = 0;
cin >> a >> b;
for (int i = 1; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.