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 |
|---|---|---|---|---|---|---|---|---|
7f7f1b98feede8adab8190ae2dbd550af391d805 | d97c57d7f05ecfa494d2eec03c408631756be452 | make1122/tencentcloud-sdk-cpp | /vod/src/v20180717/model/MediaInfo.cpp | C++ | cpp | 17,024 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
8aca2ead3a9a2679baa3bcbcee2c032e9ea4c2a4 | f91cd7567d3d010fa3a8141cbc27d4b6b6e0ecbe | NikolovV/CPP-Language | /SoftUni/C++Programming/3.Inheritance/3.InhInheritance_Homework_solution_2/Student_cpp.cpp | C++ | cpp | 1,983 | permissive | #include <iostream>
#include "Student.hpp"
Student::Student(string name, uint16_t ID, School *newSchool, Course newCourse,
uint16_t point, bool isFirstCourse) :
Person(name, ID, newSchool, newCourse),
_point(point), _isFirstCourse(isFirstCourse)
{
set_mark();
}
void Student::show_ext_info() const... |
151adc33706cf5501288de7eb6e6236c65792517 | 7838bd076dc419e503f2f866d0a49c58bd6f9f2a | murawew64/SQLUserProject | /choosestringlistform.cpp | C++ | cpp | 2,117 | no_license | #include "choosestringlistform.h"
#include "ui_choosestringlistform.h"
ChooseStringListForm::ChooseStringListForm(QWidget *parent, QString labelname1, QString labelname2) :
QWidget(parent),
ui(new Ui::ChooseStringListForm)
{
ui->setupUi(this);
ui->label1->setText(labelname1);
ui->label2->s... |
02f219bbeb2b05093edb240c2c1bf563485b8e8f | fe9d33087e516ecef195b6657de4c312ed456ce8 | gowtham212/ROS-Realsense | /catkin_ws/build/find-object/src/utilite/moc_UPlot.cpp | C++ | cpp | 25,486 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'UPlot.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
***************************************************************... |
d9a2878a27dc99b7091d1e55b83528a187993ec8 | 222e5e5803cf3469f984ec8e26de4e969fe73a48 | ps2dev-llvm/clang | /test/CodeGenCXX/nullptr.cpp | C++ | cpp | 1,222 | permissive | // RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -I%S -emit-llvm -o - %s | FileCheck %s
#include <typeinfo>
// CHECK: @_ZTIDn = external constant i8*
int* a = nullptr;
void f() {
int* a = nullptr;
}
typedef decltype(nullptr) nullptr_t;
nullptr_t get_nullptr();
struct X { };
void g() {
// CHECK: cal... |
19fc145fd6f208d11f6a783caa9aa307645c3b9e | c8775a8e5a34561a1658907eef81efe8962c46b8 | churchlab/seqan | /demos/tutorial/data_journaling/solution_online_search_finder.cpp | C++ | cpp | 9,203 | permissive | //![include]
#include <iostream>
#include <seqan/find.h>
#include <seqan/seq_io.h>
#include <seqan/journaled_set.h>
using namespace seqan;
//![include]
//![searchAtBorder]
template <typename TJournalEntriesIterator, typename TJournal, typename TPattern>
void _searchAtBorder(String<int> & hitTarget,
... |
8cbb7d1a6cc9329f8f0e9377bf575f99cc3a5638 | 4b877a45904175dd4e30b13e6ed9f539b5be81de | yrenelapin/Data_Structures_and_Algorithms-1 | /Competitive_Programming/Codeforces/705-2/B_Planet_Lapituletti.cpp | C++ | cpp | 5,450 | no_license | #include <bits/stdc++.h>
using namespace std;
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
map<int,int> mirror = { {0,0}, {1,1}, {2,5}, {5,2}, {8,8}, {3,-1}, {4,-1}, {6,-1}, {7,-1}, {9,-1} };
pair<int,int> get_reflection(string s){
... |
7c6da4f25a9f2e99b8e87980ea4dcb4b250b9491 | 4e25c442ad85d7c4acce26e08fcba66a961aa210 | Merlot1818/angle | /src/compiler/translator/IntermNode.cpp | C++ | cpp | 124,567 | permissive | //
// Copyright (c) 2002-2014 The ANGLE 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.
//
//
// Build the intermediate representation.
//
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include... |
499a9cd421a827f9174143ba67bfac461a5a5750 | 531ba60c2277201888cd2c3ff6c604473f650593 | lori227/Dark | /KFContrib/KFZConfig/KFBackGroundConfig.cpp | C++ | cpp | 936 | no_license | #include "KFBackGroundConfig.hpp"
namespace KFrame
{
void KFBackGroundConfig::ReadSetting( KFNode& xmlnode, KFBackGroundSetting* kfsetting )
{
kfsetting->_race_list = xmlnode.GetUInt32Set( "RaceLimit", true );
kfsetting->_sex_list = xmlnode.GetUInt32Set( "SexLimit", true );
}
/////////... |
83712b5576711c80d5222e251364317962297808 | 3274e2caea218af87c0b38fe3529f1436df4eeac | adan830/serverv1.0 | /log.cpp | C++ | cpp | 2,184 | no_license | /*************************************************************************
> File Name: log.cpp
> Author: ma6174
> Mail: ma6174@163.com
> Created Time: Mon 01 Jun 2015 09:03:51 PM CST
************************************************************************/
#include "log.h"
#include <stdio.h>
#include <time.... |
22b88110cbcd9e08560e021340331484f410cd09 | c9e8093b639cac428831cf8365c8f52a01da45e5 | scchan/hcc | /tests/Unit/AsyncPFE/async_array_add_multiple_tiled.cpp | C++ | cpp | 2,363 | permissive | // XFAIL: Linux
// RUN: %hc %s -o %t.out && %t.out
#include <iostream>
#include <random>
#include <future>
#include <vector>
#include <algorithm>
#include <utility>
#include <hc.hpp>
// FIXME: HSA runtime seems buggy in case LOOP_COUNT is very big
// (ex: 1024 * 1024).
#define LOOP_COUNT (1)
// test HC with fine-gra... |
5d892f57576673bfe6c8b4bc08c4ba9214eeb8ec | b760cd20b9166e7e0118747201f10862ba94c0b0 | allenapplehead/Competitive_Programming_Solutions | /DMOJ/Uneven_Sand.cpp | C++ | cpp | 464 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false); cin.tie(0);
long long low = 1, high = 2000000000, mean;
string r;
while (low <= high) {
mean = (low + high) / 2;
cout << mean << endl;
cin >> r;
if (r == "SINKS") {
l... |
f4ac5d094c265a041201e8a0dedc6369bd4b4991 | 5ea1024834751b14484dc1d7e416498165a0192e | ArtemisZGL/leetcode | /c++/tencent/3.cpp | C++ | cpp | 2,133 | no_license | /*
把1到2n的数分成两组长为n的,然后分别排序
1.。。n满足 abs(A【i】 - B【i】) < k
有多少中分法
比较暴力,有点分治
分成Apre,Bpre
然后先找比Apre大的往后进行遍历,然后每个找比Bpre和Acur +k 大的,然后往后遍历
或者找比Acur -k小的(因为是绝对值), 然后往前遍历,途中如果比Bpre小就break
遇到remain数组为0结果加1,上面搜索不到的就return
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int c = 0;
int n;
int... |
53f2225f6964a400c5bc9d8b3288bbbab990f057 | 98e254c2d2239d261d61b5add743ba7354aeb044 | gdeioannes/RealTimeRenderingEx1 | /Exercise11/src/Exercise11.cpp | C++ | cpp | 3,014 | no_license | // author : Gabriel De Ioannes
// author : Sagar Nagaraj
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
using namespace std;
class Point2D {
public:
int x;
int y;
};
int ORI(Point2D p1, Point2D p2,Point2D p3);
string Inter(Point2D a, Point2D b,Point2D p, Point2D q);
string Inte... |
23d52cde298e61e24e63ad3a8f65cd63d07ca38a | ff69134def49d2db8145c049960d3e80dabc32bf | Traagen/HoloLensTerrainGenDemo | /HoloLensTerrainGenDemo/HoloLensTerrainGenDemo/Content/RealtimeSurfaceMeshRenderer.cpp | C++ | cpp | 13,382 | no_license | //*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICUL... |
23703f204b149dc7b5db2ed16a8ad139f799203a | c41471c8f55a20219edfb67b72ac8e67e7ce812a | yuandaxing/leetcode | /cpluplus/ispowerof2.cc | C++ | cc | 302 | no_license | #include <iostream>
class Solution {
public:
bool isPowerOfTwo(int n) {
if (n <= 0) return false;
while ((n & 1) == 0) n >>= 1;
return (n >> 1) == 0;
}
};
int main(int argc, char *argv[])
{
Solution sol;
std::cout << sol.isPowerOfTwo(2) << std::endl;
return 0;
}
|
1098163adfab421a80cc848c93bda67782ac9fd5 | 89dbeadf170f81f885e956f762427c4f5f283b24 | novaquark/aws-sdk-cpp | /aws-cpp-sdk-greengrass/source/model/ListGroupsResult.cpp | C++ | cpp | 1,665 | 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... |
9f13fc86e6afb45487f809b0af290135f0e1dc27 | d95444b150d02f45cd1cf42e9f5fc2e8fefd0509 | RollinsonSoftware/CS-151 | /Midterm/Problem02.cpp | C++ | cpp | 1,532 | no_license | /* FileReverse.cpp - Create a sorted index of pointers into an array of Customer structures
* Author: John A. Rollinson
* Module: Midterm
* Project: 2
* Problem statement: Write a program which takes an input an existing text file, then appends
* all of the characters in that file to the end of th... |
88f4c1fa4a22ae845f4e85430dc22296e866e8da | 081b8714d7aa1e2894094df7131d4d6e413334d7 | kwallner/iceoryx | /iceoryx_posh/test/moduletests/test_roudi_memory_manager.cpp | C++ | cpp | 6,370 | permissive | // Copyright (c) 2020, 2021 by Robert Bosch GmbH. All rights reserved.
// Copyright (c) 2021 - 2022 by Apex.AI 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
//... |
ab799fcfea98bf9f5b248da1425b7b659696263a | 79c8069c2701e890aa511d5db1ce3fe11f4aa936 | pietro-butti/scalarYM | /sundir/multiplication_routines_for_SU3.cc | C++ | cc | 2,127 | no_license | inline void mult_C_equals_AB_for_SU3(dc *C, dc *A, dc *B) {
C[0] = A[0]*B[0]
+A[1]*B[3]
+A[2]*B[6];
C[1] = A[0]*B[1]
+A[1]*B[4]
+A[2]*B[7];
C[2] = A[0]*B[2]
+A[1]*B[5]
+A[2]*B[8];
C[3] = A[3]*B[0]
+A[4]*B[3]
+A[5]*B[6];
C[4] = A[3]*B[1]
... |
044d11e85ebabea3f686f746500c32611299ecab | 8dda1d2131ea6ad7021607112d5b684e815c03a9 | rystills/RaiderEngine | /RaiderEngine/libs/PhysX-4.1/kaplademo/externals/resources/shaders/default_fs.cpp | C++ | cpp | 9,275 | permissive |
// scene reflection
uniform float reflectionCoeff = 0.0f;
uniform float specularCoeff = 0.0f;
uniform sampler2DRect reflectionTex;
// Shadow map
uniform float shadowAmbient = 0.0;
uniform sampler2D texture;
uniform sampler2DArrayShadow stex;
uniform sampler2DArrayShadow stex2;
uniform sampler2DArrayShadow stex3;
un... |
5d90015306d0fb5d99e49ecd3e7134df843d5968 | ab75ead56b198fb366c4bec1fa758882a1720352 | Dctaylor/School-Projects | /Formal Specification and Advanced Data Structures/Project 2/main_random.cpp | C++ | cpp | 332 | no_license | //
// main_random.cpp
//
//
// Created by david cameron taylor on 1/19/17.
//
//
#include "random.h"
#include <iostream>
#include <iomanip>
using namespace std;
int main(void) {
RandGen rand(1, 40, 725, 729);
cout<<rand.next()<<endl;
cout<<"new seed"<<endl;
cout<<rand.next()<<endl;
... |
0d654973572b06adfd28b3936b0bb26e2722bb10 | 91701e1b353df7a83b3eae6824fdeb23ebf7b569 | Saunak626/catkin_wsompl | /src/grid_path_searcher/src/demo_node.cpp | C++ | cpp | 11,616 | no_license | #include <iostream>
#include <fstream>
#include <math.h>
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <ros/ros.h>
#include <ros/console.h>
#include <sensor_msgs/PointCloud2.h>
#include <nav_msgs/Odometry.h>
#include <nav_msgs/Path.h>
#include <geometry... |
bc565b7ca80e74cda11ab10f44d3c90cfec33daa | 322407ba56f35156df3de96e9055760c9756f08c | zenoalbisser/chromium | /media/base/android/media_codec_decoder_unittest.cc | C++ | cc | 26,691 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/bind.h"
#include "base/logging.h"
#include "base/thread_task_runner_handle.h"
#include "base/timer/timer.h"
#include "media/base/android/me... |
78829887cb519c23319456e311c5466c3d814685 | acce224582ecf89ed6f181ee5911ff3a4b792d91 | dunnjed/cns3060-dunnjed | /project-4/simulation.cpp | C++ | cpp | 9,818 | no_license | #include <iostream>
#include <cmath>
#include <iomanip>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#define MAX_NUM_OF_TRACKS 100
#define INITIAL_TRACK_POSITION 15
#define PREV_TRACK_POSITION 12
void firstComeFirstServed(int trackNums[], int numOfTracksEntered);
void shortestSeekTimeFi... |
8173f5f785f6e7645b78886154c83808c6a83b26 | 3d12804744125735098420d1d80b87a63a52aff6 | evil-squad/FengYunMobile_Client | /FengYun/frameworks/runtime-src/Classes/managers/UIManager.cpp | C++ | cpp | 1,117 | no_license | /**
* @file UIManager.cpp
* @project FengYun
* @author Bluce Nong <nongjinxia@mokylin.com>
* @Created by BluceNong on 16/01/2017.
* @ Copyright © 2017 MokyLin Bluce Nong <nongjinxia@mokylin.com>. All rights reserved.
*/
#include "UIManager.h"
#include "DebugHelper.h"
USING_NS_CC;
BEGIN_NS_FY
UIManager::UIM... |
4883b262ce341d8d7ec2074405cc8d73c3ab183b | cceb5fe9ea8c61cec3ee347e15a5a162bcda332e | Jtl12/browser-android-tabs | /ash/multi_device_setup/multi_device_notification_presenter.cc | C++ | cc | 7,592 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/multi_device_setup/multi_device_notification_presenter.h"
#include <memory>
#include <utility>
#include "ash/public/cpp/vector_icons/vecto... |
b62c2fef876e90a9c260ca779e7f4dc9c6d1f709 | 5742dfd97b026b8c8d934c07415b4ceb4de75586 | AcademySoftwareFoundation/Imath | /website/examples/Frustum.cpp | C++ | cpp | 531 | permissive | #include <Imath/ImathFrustum.h>
#include <cassert>
void
frustum_example ()
{
float near = 1.7f;
float far = 567.0f;
float left = -3.5f;
float right = 2.0f;
float top = 0.9f;
float bottom = -1.3f;
Imath::Frustumf frustum (near, far, left, right, top, bottom, false);
Imath::M... |
fb20773ef81f198a75677b83a3aa52eb14a0229f | 096e0bb9ee9584f265a928a5880f155da3df13c7 | green-fox-academy/JKatalin | /week-04/day-2/aircraft/f16.cpp | C++ | cpp | 370 | no_license | //
// Created by Kata on 2019. 05. 01..
//
#include "f16.h"
F16::F16() : Aircraft("F16", 8, 30)
{
/* _type = type;
_maxAmmo = maxAmmo;
_currentAmmo = currentAmmo;
_baseDemage = baseDemage; nem jó, mert így felülírható az ősosztály értéke (pl ha már az ősosztály számolt vmt */
}
bool F16:... |
db1d6fbf01efa7bc1e1b9b9dec949025e23157fc | b6a962936d3cf3bf87f70fbb152dd0221ceba6ce | pbem-games/Atlaclient | /source/EditOrderPromoteFrm.cpp | C++ | cpp | 5,777 | no_license | //---------------------------------------------------------------------------
#pragma hdrstop
#include <vcl.h>
#include <stdlib.h>
#include <vector.h>
#include <algorithm>
#include "util.h"
#include "orders.h"
#include "unit.h"
#include "EditOrderPromoteFrm.h"
#include "faction.h"
//-------------------------... |
48b6377dc42e8a44458ebf93ba2207e95273b8a5 | ffa7034d59ce137cbcf7db65bc1d4dd9fa983e38 | MouCoder/C_code | /Project2-11-27/Project2-11-27/test.cpp | C++ | cpp | 615 | no_license | #define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int* singleTwoNumber(int* nums, int numsSize)
{
int a = 0,b = 1;
int numsLength = numsSize;
int ret[2] = {0};
int loc = 0;
while (numsLength)
{
a ^= *(nums++);
numsLength--;
}
nums -= numsSize;
while (1)
{
if (b == (b&a))
break;
... |
6a9d86a0f3712e112d4f729d22228b4bf69d770d | aca4b824c42343f87bd2cb06604408da6a17d1a3 | Specter-13/icp-mqtt-project | /src/dashboard.cpp | C++ | cpp | 3,849 | no_license | /**
* @file dashboard.cpp
*
* @brief Trieda obsahujúca logiku Dashboardu.
* @author Vojtěch Jurka (xjurka08), Dávid Špavor (xspavo00)
*/
#include "dashboard.h"
#include "ui_dashboard.h"
#include "dashboardcard.h"
#include "dashboardcardsetter.h"
#include "dashboardcardswitch.h"
#include "dialogadditem.h"
#include <QtMq... |
d187fb70735e7a0243745b21bc1030221d67563c | 4351f096fd4b708cf12956812d1dc40b7058f81a | aglab2/sm64asm | /Wii/tools/remop/src/pswitch.cpp | C++ | cpp | 1,691 | no_license | #include "pswitch.h"
#include <sm64.h>
enum Actions
{
INIT,
PRESSING,
PRESSED,
};
#define PRESSED_TIME 0xd4
#define TIME_PART 7 / 10
static void Switch()
{
auto coinBehav = SegmentedToVirtual(0x13000934);
auto boxBehav = SegmentedToVirtual(0x13001500);
for (MObject* cur = (MObject*) 0x8033D4... |
c7bb6b2c852c7045d0814a22ced085602689acba | 0205cd786706dc8ce1e88656ddc6026b247ff6f8 | JaheimMao/LeetCode | /0001_Two Sum/0001_Solution.cpp | C++ | cpp | 1,395 | no_license | // 0001_Two Sum
//
#include<iostream>
#include<vector>
#include<unordered_map>
using namespace std;
/*******暴力解法,用两层循环遍历求和**************
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
for(int i = 0; i < nums.size(); i++)
for(int j = i+1; j < nums.size(); j++)
... |
acf5864620a2572d914f60fafc6068fae5589992 | b88a669891b0c2d698f96bc43d5213a4546f40c5 | anwar-arif/acm-code | /lightoj/1036 - A Refining Company.cpp | C++ | cpp | 3,942 | no_license | #include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <queue>
#... |
05b1e6f82f744c2aa43715dbcb64b87eff5c87e7 | fe0ea74a90487dd8d7c8285e96e8cb7a1ea832a9 | aurantst/windows-XP-SP1 | /XPSP1/NT/net/rras/cm/cmdial/ctr.cpp | C++ | cpp | 66,009 | no_license | //+----------------------------------------------------------------------------
//
// File: ctr.cpp
//
// Module: CMDIAL32.DLL
//
// Synopsis: Implements the Ole Container object for the future splash
// Animation control.
//
// Copyright (c) 1998-1999 Microsoft Corporation
//
// Author... |
b7eff62d62eca7e724e9c8b64291e11787c64803 | 6af3f63fd1d4347aef9e26da4b831740fcacd1b5 | alloy/hermes | /lib/BCGen/HBC/SerializedLiteralParserBase.cpp | C++ | cpp | 974 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "hermes/BCGen/HBC/SerializedLiteralParserBase.h"
#include "hermes/BCGen/HBC/SerializedLiteralGenerator.h"
#include "llvm/... |
8f15ec5d02816264faa3da20c917a42f7baaa1f4 | 4e2d0229decc4148867b04337e70b3c0c19968e2 | Kitware/VTK-m | /vtkm/filter/entity_extraction/ExtractGeometry.cxx | C++ | cxx | 2,467 | permissive | //============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURP... |
694a6a0a374d33f5a1aa4d368fa1f46d674ce6e1 | a5e0f3c8e3369cbc5623c2f153114e21e518e35b | DSEF/janus | /deptran/brq/sched.cc | C++ | cc | 13,517 | no_license |
#include "sched.h"
#include "commo.h"
#include "../rcc/dtxn.h"
using namespace rococo;
map<txnid_t, RccDTxn*> BrqSched::Aggregate(RccGraph &graph) {
// aggregate vertexes
map<txnid_t, RccDTxn*> index;
for (auto& pair: graph.vertex_index()) {
RccDTxn* rhs_v = pair.second;
verify(pair.first == rhs_v->i... |
708af15184f82198e582c90cd361a78b4b435728 | 8af18b620f6aab0cc5a98f4693f288776e75f1d5 | MotoAcidic/akikcoin | /src/test/mruset_tests.cpp | C++ | cpp | 2,346 | permissive | // Copyright (c) 2012-2013 The Bitcoin Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "mruset.h"
#include "random.h"
#include "util.h"
#include "test/test_akikcoin.h"
#include <set>
#include <boo... |
5c1aebe714c39fed8122b70e571cb5a773c8a980 | 39e671674b7cc00fe3a06e1f99dfa725e60428a5 | charliekelley21/ECE1574 | /Lab10/lab10.cpp | C++ | cpp | 1,514 | no_license | /*
* Purpose for program:
*
* create program to combine structs and arrays
*
*
* Programmer: Charles Kelley
* Date: October 26, 2018
*
* Honor Code: I have neither given nor received any unauthorized assistance with this program.
*/
#include "lab10.h"
void arrayStruct(string input, string out... |
7182519e4441f16a28e28afa06c6c29971f24ef7 | bf468b87a5a61ef611a9ced49dea4918d0313c34 | yanshengjia/algorithm | /lintcode/Hash Table/488. Happy Number.cpp | C++ | cpp | 689 | permissive | // Author: Shengjia Yan
// Date: 2017年8月20日
// Email: sjyan@seu.edu.cn
// Time Complexity: O(?) undetermined
// Space Complexity: O(1)
class Solution {
public:
/*
* @param n: An integer
* @return: true if this is a happy number or false
*/
int transform(int n) {
int sum = 0;
... |
c9cbf253ffe6798c69a989773334d08c738b5787 | 205a514cb2a6163863043e21767af9d101949384 | TomasBaena/SeeToronto | /arm/o.le-v7-g/.moc/moc_applicationui.cpp | C++ | cpp | 3,042 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'applicationui.hpp'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************... |
f2d0e3ffcae50ab33629d4ced3669d375c2aaf79 | e87a46184718ee066d82e2ba11097c1bf39713c1 | Nishida-Lab/robot_self_filter | /src/shapes.cpp | C++ | cpp | 3,410 | no_license | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... |
3ca5d95f742af52dbb02540bd56c5aa9df4e1cb5 | 577e79d4a7b6ad41cab5a4050a791f533836417a | daisygosorio/Garcia-OsorioDaisy_CISCSC_5_Spring_2018 | /Book/Chapter_4_Making_Decisions/Gaddis_8thEd_Ch.4_Program_2/main.cpp | C++ | cpp | 1,341 | no_license | /*
* File: main.cpp
* Author: Daisy Garcia-Osorio
* Created on May 10, 2018, 1:00 PM
* Purpose: This program averages three test scores
*/
//System Libraries Here
#include <iostream> // I/O LIbrary
#include <iomanip> //Formatting Library
using namespace std;
//User Libraries Here
//Global Constants On... |
c860350a9360c6499495f2db374f406e16eb5708 | a64bdbc62f8a2fcff79f24d0b16159769ae7bf31 | shugo256/AtCoder | /ABC/191_E_Come_Back_Quickly.cpp | C++ | cpp | 2,900 | no_license | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#define amax(a, b) a = std::max(a, b)
#define amin(a, b) a = std::min(a, b)
using ll = long long;
#include <limits>
using namespace std;
// 各点への最短経路 dijkstra
template<typename dist_t>
class Dijkstra {
using elem_t = p... |
b8b5b1fa39014331a58c3aff666e073d058ff22a | cecf3d4444c738a66dd0438adea3b18346aa5b00 | iraandrushko/airline | /airline/Menu.cpp | C++ | cpp | 2,396 | no_license | #include"Menu.h"
#include"PassengerFlight.h"
#include"Error.h"
#include"Date.h"
#include <iostream>
#include <string>
using namespace std;
void Menu::ShowMenu()
{
char userInput;
do {
showMainMenu();
cin >> userInput;
safeHandleUserInput(userInput);
cout << endl;
} while (userInput !... |
d8bea19cba916c2cd248add54d640a1c05862353 | 1c99a71f39dd699ce855000ba7ceee89185a11f1 | cyclothunder/qtwebservice | /examples/QtDeveloperNetworkExample/qdnmain.cpp | C++ | cpp | 4,198 | no_license | /****************************************************************************
**
** Copyright (C) 2011 Tomasz Siekierda
** All rights reserved.
** Contact: Tomasz Siekierda (sierdzio@gmail.com)
**
** This file is part of the QtDeveloperNetwork example.
**
** This file may be used under the terms of the GNU Lesser Gener... |
191bbef7766bf16f818f5553f4958b31af28fa30 | 54f38868b521dfdc2d64331b3d03393611298741 | PFNK/RayTracer | /shapes/Sphere.cpp | C++ | cpp | 2,019 | no_license | /*
* Sphere.cpp
*
*
*/
#include "Sphere.h"
namespace rt{
Sphere::Sphere():Shape(){}
Sphere::~Sphere(){}
Vec3f Sphere::getMaterialColor(Vec3f hitPoint, Vec3f diffuse, float specular, Vec3f is, float dist){
Vec2f uv(-1,-1);
Vec3f point = (hitPoint - center).normalize();
if(material->hasTexture){
flo... |
9268e56acd0ea2348fb9879878d92a749c8493ee | 72bd9835bb24d82f17517bd5dae9055330063bfc | the-reverend/Win32xx | /samples/Threads/src/MyEdit.cpp | C++ | cpp | 866 | no_license | //////////////////////////////////////////////
// MyEdit.cpp
// Definitions for the CMyEdit class
#include "stdafx.h"
#include "MyEdit.h"
CMyEdit::CMyEdit()
// Constructor
{
// Create the font for the Edit window
m_Font.CreateFont(16, 0, 0, 0, FW_NORMAL, 0, 0, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT... |
1bba9569b9f480ad49d8819ed57df7d0a73ec39b | 1b464ce7a9d8612abd11c4ffd66fa0775fb12b02 | apache/openoffice | /main/accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell.cxx | C++ | cxx | 6,314 | permissive | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to yo... |
351dcc2d69ab25892c308fa7a66ec3b9afad09fd | a9b8a2ab2e96cee0df092ba626b3be2c0d0fea93 | RodrigoHolztrattner/Wonderland | /Wonderland/Wonderland/Editor/Modules/HookGui/ReferenceCounter.cpp | C++ | cpp | 906 | permissive | ////////////////////////////////////////////////////////////////////////////////
// Filename: FluxReferenceCounter.cpp
////////////////////////////////////////////////////////////////////////////////
#include "ReferenceCounter.h"
HookGui::ReferenceCounter::ReferenceCounter()
{
// Set the initial data
m_TotalRefer... |
175c7c51a9f8881ed0d8079e2f9df48a31d01fdb | 4c3718a26c57038ca9df845a966bd3077bc983c9 | i-RIC/prepost-gui | /libs/geodata/polyline/private/geodatapolyline_removevertexcommand.cpp | C++ | cpp | 549 | permissive | #include "geodatapolyline_modifyabstractpolylinecommand.h"
#include "geodatapolyline_removevertexcommand.h"
#include "../geodatapolylineimplpolyline.h"
#include <guicore/pre/base/preprocessorgraphicsviewinterface.h>
GeoDataPolyLine::RemoveVertexCommand::RemoveVertexCommand(int vertexId, GeoDataPolyLine* pol) :
GeoDa... |
37fcd9ec8b7e6b458164b322ecc1105f8c8000d2 | c4573ada40425bbe27408e1e7718f571e4550ed8 | 2d-inc/flare_cpp | /flare_skia/src/skr_stroke.cpp | C++ | cpp | 843 | permissive | #include "flare_skia/skr_stroke.hpp"
#include "flare/paint/actor_stroke.hpp"
#include "flare_skia/to_skia.hpp"
using namespace flare;
void SkrStroke::initializeGraphics()
{
m_ActorStroke = dynamic_cast<ActorStroke*>(this);
m_Paint.setStyle(SkPaint::Style::kStroke_Style);
m_Paint.setAntiAlias(true);
asser... |
a3995e87a1a336bd7714285d939c7aa5c5982495 | 6c026af2c016a1653c65ab36a2418bbdf60e1a14 | sukisuso/C-Cpp | /TEST_C++11/TEST_NEW_DELETE/parte3.cpp | C++ | cpp | 3,168 | no_license | /**
*
* @file parte3.cpp
* @Author Jesus Juan Aguilar
* @date 10/11/2014.
* @version 1.0
* @brief: Practica 4 PROA.
*
*/
/**< Includes, namespace y constantes*/
#include <iostream>
#include <vector>
#include <memory>
using namespace std;
const int TAM = 10000;
const int REP = 100;
/**< struct PRUEBA*/... |
53fe93db3f024685ad66e5cc33ca8d7192de9f7d | 7edb4a337827fae14930fccc2f5a693fa88b11e7 | wythern/leetcode | /isNumber.cpp | C++ | cpp | 1,183 | no_license | #include "common.h"
class Solution {
public:
enum{
INTEGER = 1,
DECIMAL = 2,
NOTATION = 4,
SIGNMAKR = 8,
};
bool isNumber(string s) {
int l = s.find_first_not_of(' ');
int r = s.find_last_not_of(' ');
string candidate(s.begin() + l, s.begin() + r + 1);
return isNumberImpl(candidate);
}
b... |
9ab6ac4e02e3568feb2f53cabaa099bb5c01c47f | bb99f8303f88907eaf516911eeafd20e96a1e0fa | shang766/multiview | /multiview/multiview_cpp/src/perceive/pipeline/nodes/input_images.cpp | C++ | cpp | 3,156 | permissive |
#include "input_images.hpp"
#include "perceive/graphics/hist-equalize.hpp"
#include "perceive/pipeline/detail/helpers.hpp"
namespace perceive::pipeline::input_images
{
// ---------------------------------------------------------------------- Params
const vector<MemberMetaData>& Params::meta_data() const noexcept
{
#... |
15411ba32a8db0a71f0eae2f77e147c56510cb68 | 4e1a457a358a46b61f346addb132a093cc7bd778 | chen--oRanGe/thrill | /tests/data/file_test.cpp | C++ | cpp | 13,396 | permissive | /*******************************************************************************
* tests/data/file_test.cpp
*
* Part of Project Thrill.
*
* Copyright (C) 2015 Timo Bingmann <tb@panthema.net>
*
* All rights reserved. Published under the BSD-2 license in the LICENSE file.
*****************************************... |
a3ef632a3a97baadb14e5155fe52eb99ae1d5d10 | b0936dd8e51083b1415ea8760707d2db94d2bd79 | ahndayoung/Algorithm_SWEA | /SWEA_1946(간단한 압축 풀기).cpp | C++ | cpp | 433 | no_license | #include <iostream>
using namespace std;
int main()
{
int t; cin >> t;
for (int T = 1; T <= t; T++) {
string s[10];
int n, num[10] = { 0 };
cin >> n;
for (int i = 0; i < n; i++) {
cin >> s[i] >> num[i];
}
cout << "#" << T << '\n';
int cnt = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < ... |
634e8987e29901592070a45e3fd440da6d01ad07 | dc4c961fd84a03c895e0bb1be38cba61873dc847 | elix22/Urho3D-1 | /Source/Tools/Editor/Inspector/ModelInspector.cpp | C++ | cpp | 2,051 | permissive | //
// Copyright (c) 2017-2020 the rbfx project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, mer... |
cb252cf0c4eba4f1fae816a1d778119eb777269f | 76d1c61cfe0d7369815ef6a82678f1fa1c0030ad | lauer3912/chromium.src | /extensions/common/permissions/permission_message_util.cc | C++ | cc | 5,619 | 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/permission_message_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_... |
22ec5d5c6d412e0802832435edc4cdb220f9e868 | c8bc7e30f4c02851e23f52a106ba9337159067cb | Vivien-Michel/PFSsim | /omnetpp/dserver/lfs/LFS_M.cc | C++ | cc | 4,881 | no_license | //
// This program 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 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will... |
dd8a4f2302a6e76d7ebb17f19a0a9b2402119667 | 8bdf072829864b1dfda5e68a69033ed13c4721a4 | jinzt/SNFrame | /src/core/NetServer.cpp | C++ | cpp | 3,182 | no_license | #include <event.h>
#include <event2/event.h>
#include <event2/event_struct.h>
#include <event2/util.h>
#include <event2/listener.h>
#include <event2/thread.h>
#include <event2/event-config.h>
#include "NetServer.h"
#include <stdint.h>
#include <signal.h>
#include "PbBuf.h"
#include <Log.h>
#include <Netuti... |
c077c5dbc99ba2132b5bd3b6364972c86291d125 | 35fceb08f5eadab954cd25a4b714baa7bcba6d2f | HONEY1b/tuestudy | /acmicpc/2920.cpp | C++ | cpp | 349 | no_license | //2920
#include<stdio.h>
int main(void){
int arr[10];
int as=0;
for(int i=1;i<=8;i++){
scanf("%d",&arr[i]);
}
for(int i=1;i<8;i++){
if(arr[i]<arr[i+1]){
as++;
}else if(arr[i]>arr[i+1]){
as--;
}
}
if(as==7){
printf("ascending\n");
}else if(as==-7){
printf("descending\n");
}else{
printf("... |
b62458cdeeabcd76f7774dd0f84a0696d8172539 | e330150996d35a02792ddcae9ca087b9250c3a4b | BlenderCN-Org/kokko | /src/DebugConsole.hpp | C++ | hpp | 931 | permissive | #pragma once
#include "Queue.hpp"
#include "String.hpp"
#include "StringRef.hpp"
#include "Rectangle.hpp"
#include "TextInputHandler.hpp"
class DebugTextRenderer;
class DebugVectorRenderer;
class DebugConsole : public TextInputHandler
{
private:
struct LogEntry
{
StringRef text;
unsigned lengthWithPad;
int r... |
1baf45101e34e01921a64e3db32d13c9b473b986 | 118e5e0898227fd4cd79fa0d8f754be0d84570b0 | rauls/newscaster | /xerces/include2.5/xercesc/dom/DOMWriterFilter.hpp | C++ | hpp | 7,628 | no_license | #ifndef DOMWriterFilter_HEADER_GUARD_
#define DOMWriterFilter_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided t... |
13dba7e36d5a2ddfc702c9a29655ff8a887beed0 | 3424c5d709ca99141388efeb1872b81849c0684d | djloved/ezOneDocs | /Lib/Mapi2010/ol2010mapisamples-84078/SampleTransportProvider/MRXP/mrxp.cpp | C++ | cpp | 15,889 | no_license | #include "stdafx.h"
TCHAR szBlank[] = _T("");
// Static data for the message store provider configuration property sheets
TCHAR szFilter[] = _T("*"); // "*" to allow any character
// Control description structures
DTBLLABEL DtLabel = {sizeof(DTBLLABEL), fMapiUnicode};
DTBLPAGE DtPage = {sizeof(DTBLPAGE), fMapiUnicod... |
a30da61a32d545b8945c282224b3538f1abaf91f | a24f30278367e73e457b37e5a7ca27469b965664 | justinctlam/MarbleStrike | /game/code/common/engine/render/d3d/d3ddepthstencilstate.hpp | C++ | hpp | 1,054 | permissive | #if defined( RENDER_PLAT_D3D9 )
#ifndef D3D_DEPTH_STENCIL_STATE_HPP
#define D3D_DEPTH_STENCIL_STATE_HPP
//////////////////////////////////////////////////////
// INCLUDES
//////////////////////////////////////////////////////
#include "common/engine/render/depthstencilstate.hpp"
////////////////////////////////////... |
7d3aae39a059b863435571c2794eb1303e408875 | 6cda11f3b2e11d759d2684e26b8380cda7cd4f6e | OscarIdrogo13/TrabajosC | /PRACTICA 1.cpp | C++ | cpp | 761 | no_license | #include <iostream>
using namespace std;
int main(){
//Declaración de las variables
float a,b;
float s,r,m,d;
//Leer valores de entrada
cout<<"Operaciones basicas. \n";
ask_a:
cout<<"Dame el valor de a: ";
cin>>a;
if(cin.fail()){
cin.clear();
cin.ignore();
goto ask_a;}
ask_b:
cout<<... |
bdf65b00bcd0f845e415ae2c4c18aabc626ce38a | d6c5a3fc212fee7b11c0e50fa1d759bce072383b | ynsairam/programming | /c++/1_class.cpp | C++ | cpp | 752 | no_license | // C++ program to demonstrate function
// declaration outside class
#include <bits/stdc++.h>
using namespace std;
class Geeks
{
public:
string geekname;
int id;
// printname is not defined inside class defination
void printname();
// printid is defined inside class defination
... |
7809ef6b3cbfe43eaf2f77b95482ab4339b50f1e | 36b0630d4d437ce0e39bbcf24567b4cfb4817eda | sandeepkapase/examples | /prep_question_sources/cpp/selection_sort_example1.cpp | C++ | cpp | 1,879 | no_license | // [[file:~/github/prep/ds_algorithm/sorting/Questions.org::c++ selection_sort_example1 example.][c++ selection_sort_example1 example.]]
#include <map>
#include <list>
#include <deque>
#include <thread>
#include <typeinfo>
#include <assert.h>
#include <iostream>
#include <numeric>
#include <memory>
#include <algorithm>... |
990d60a86643ef96b55d06433db3b1fb6a47c540 | 5d97246dbbf0c8b91b88a84208fba27be3b6c1e5 | mfkiwl/eve | /benchmarks/module/math/cospi/regular/cospi.hpp | C++ | hpp | 1,047 | permissive | //==================================================================================================
/**
EVE - Expressive Vector Engine
Copyright 2020 Joel FALCOU
Copyright 2020 Jean-Thierry LAPRESTE
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
**/
//=====... |
903c13da60ac22947d41e76ae04b17199706db83 | 7a276e3f8a4fd311df962d2636289fadb309745a | timur-losev/Vulkan-CTS | /external/vulkancts/modules/vulkan/pipeline/vktPipelineTests.hpp | C++ | hpp | 1,716 | permissive | #ifndef _VKTPIPELINETESTS_HPP
#define _VKTPIPELINETESTS_HPP
/*------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
*
* Copyright (c) 2015 The Khronos Group Inc.
* Copyright (c) 2015 Imagination Technologies Ltd.
*
* Permission is hereby gr... |
cb53af8956c488d4eacd529aa6a97003f78290d2 | 21420998d492194540e5f0e286285fc58c9537ba | Xinkai/pdfium | /xfa/fde/cfde_txtedtpage.cpp | C++ | cpp | 18,043 | permissive | // Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa/fde/cfde_txtedtpage.h"
#include <algorithm>
#include "xfa/fde/... |
01d69fd5ed6e684012ffc3080ddc2dfa5fde3296 | 00d386aad1b7ecd62538b0d46c3a6889a2204457 | krowenrao/htcondor | /src/gce_gahp/gceCommands.cpp | C++ | cpp | 64,273 | permissive | /***************************************************************
*
* Copyright (C) 1990-2014, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. Yo... |
1f8909b727f4f362f8bd16ffcc619e459a9027c0 | b0c89863c2f59b1af036434b831e36365483180b | DHaythem/Competitive-Programming-Solutions | /Codeforces/800/A. Replacing Elements.cpp | C++ | cpp | 489 | no_license | //https://codeforces.com/contest/1473/problem/A
#include <bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
int main()
{
IOS;
int t,n,d;
cin>>t;
while(t--){
cin>>n>>d;
int a[n];
for(int i=0;i<n;i++)
cin>>a[i];
... |
a2319a73ff642c93a4f71808342c52541bc8148f | a88a0a6a6464e0f9befb9c7048459d87a8d87776 | apache/openoffice | /main/connectivity/source/inc/resource/sharedresources.hxx | C++ | hxx | 6,548 | permissive | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
83893ff0a4a61bd19b16b48c623c9161de1a4570 | ce6dd1d17042ed04e08a032762e263d1d2ca7259 | patterkr/Starcraft-AI | /Project/ExampleAIModule/Source/ExampleAIModule.cpp | C++ | cpp | 11,789 | no_license | #include "ExampleAIModule.h"
using namespace BWAPI;
bool analyzed;
bool analysis_just_finished;
bool builtBarracks;
bool builtExpansion;
PlayerInfo* player;
BWTA::Region* home;
BWTA::Region* enemy_base;
std::vector <BWAPI::Unit> *workers;
std::vector <BWAPI::Unit> *resourceDepots;
DWORD WINAPI AnalyzeThread()
{
BWT... |
d355cfa05ffdbc13acd3c2f2408c705ebec90e71 | 71ae57c7cb49349d0d18962ac2856b0f0908b759 | cylfsbm/leetcode | /leetcode20190501/src/GenerateParentheses.cpp | C++ | cpp | 1,301 | no_license | #include<iostream>
#include<string>
#include<vector>
#include<stack>
using namespace std;
class Solution {
public:
vector<string> generateParenthesis(int n) {
vector<string> res;
this->generateParenthesisRecursion(n, n, "", res);
return res;
}
/**
* 递归法
* ... |
9d0de732df0acb2e4a514fe4eb8374ac387d3b5d | 7a96420b837ab3521a51cb25a649b774e6d4ce20 | Htrap19/VulkanApi | /src/Core/Fence.cpp | C++ | cpp | 982 | permissive | //
// Created by aeternum on 9/23/21.
//
#include <stdexcept>
#include "Fence.h"
namespace VulkanApi
{
Fence::Fence(const Ref<Device> &device, bool initialize)
: m_Device(device), m_Fence(VK_NULL_HANDLE), m_Initialized(initialize)
{
if (initialize)
{
VkFenceCreateInfo fenc... |
e1dac78b0ae6f3f538389cfc4258339c3d2739f3 | f65e88ee09025ef922d5191a3d41956cd8bc120b | stArl23/onlineJudgeExam | /牛客网浙大/最小长方形.cpp | C++ | cpp | 472 | no_license | #include<iostream>
using namespace std;
int main(){
long long x,y,index=0;
long long maxx=-999999999,maxy=-999999999,minx=999999999,miny=999999999;
while(cin>>x>>y){
if(x==0&&y==0){
if(index==0)break;
cout<<minx<<" "<<miny<<" "<<maxx<<" "<<maxy<<endl;
minx=999999999,maxx=-999999999,miny=999999999,maxy=... |
8b78eac1a6b248013c02ea835ab87262c6f5daa4 | 6478b695eaff12b9644f81fed12a7e02cbee4113 | cr88192/bgbtech_btsr1arch | /jx2vlcore3/core/sim_exunit0.cpp | C++ | cpp | 53,448 | permissive | #include "VExUnit.h"
#include "verilated.h"
VExUnit *top = new VExUnit;
vluint64_t main_time = 0;
#ifdef __linux
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
#endif
#if defined(linux) || defined(__EMSCRIPTEN__)
#include <sys/time.h>
#endif
#ifdef __linux
// #define USE_SDL
#endif
// #define JX2_S... |
8d10fa373ab622c75fb1e3121adbbce6654336e6 | 1bbf57febb1f547c30aafd0883619c38a39cc8b9 | saforem2/chunkwm | /src/core/dispatch/display.cpp | C++ | cpp | 1,151 | permissive | #include "display.h"
#include "event.h"
#include <Carbon/Carbon.h>
#define internal static
/* NOTE(koekeishiya): Get notified about display changes. */
internal void
DisplayCallback(CGDirectDisplayID DisplayId, CGDisplayChangeSummaryFlags Flags, void *Reference)
{
CGDirectDisplayID *Context = (CGDirectDisplayID ... |
fed700c16d0d90c9cd270b1ac2032d96558b77ef | f293fccc2432f53476b0db7edad47a4be8131934 | Nalic/chromium | /chrome/browser/media/native_desktop_media_list.cc | C++ | cc | 11,349 | permissive | // Copyright 2013 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/media/native_desktop_media_list.h"
#include <map>
#include "base/hash.h"
#include "base/logging.h"
#include "base/strings/utf_s... |
8fed43a06c7528e62c007f26a8030502ef4f38d0 | 68e393317f7e793573ab026e96ec0a64704cf209 | Albin-Willman/Vivaldi | /test/validator.cpp | C++ | cpp | 8,124 | permissive | #include "parser.h"
#include "utils/string_helpers.h"
#include <boost/test/included/unit_test.hpp>
#include <boost/test/parameterized_test.hpp>
using namespace std::string_literals;
void check_if_valid(const char* i)
{
BOOST_MESSAGE('"' << vv::escape_chars(i) << '"');
std::stringstream str{};
str << i;
const... |
5217c875f5ea958d173f59a1d63806f56be2599b | 2f1d165abb526d4487e91b329e230ba5885d3aa2 | linquanchen/Intelligent-Scheduling-On-YARN | /phase2/src/FIFOHetergen_server.cpp | C++ | cpp | 17,338 | no_license | /** @file TetrischedService_server
* @brief This file contains implementation of a Tetrischeduler server
*
* @author Ke Wu <kewu@andrew.cmu.edu>
* @author Linquan Chen <linquanc@andrew.cmu.edu>
*
* @bug No known bugs.
*/
#include "TetrischedService.h"
#include <thrift/protocol/TBinaryProtocol.h>
#include <th... |
5be7369fd47fc6fd0f8fb82d1b50d2bda53c2a95 | c98d11dffa88ed20eb14f2afc68396ef944285bb | hsmakkar/LeetCode-Solutions | /1290_Linked_List_Binary_Integer.cpp | C++ | cpp | 742 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
int count(string s)
{
int p=0;
int n=s.siz... |
f2f04988c48e6a8e6c8241fa2ff01859a8e798dd | a7784c0e04b59aeae29521e598d8af55103cdcfa | xuqing-ict/BackupCode | /POJ/1050.cpp | C++ | cpp | 1,225 | no_license | // Last Update:2014-08-06 21:19:03
/**
* @file 1050.cpp
* @brief To the max
* @author Qing Xu, xuqinguestc@163.com
* @version 0.1.00
* @date 2014-08-06
*/
#include <iostream>
#include <vector>
#include <limits.h>
using namespace std;
int helper(const vector<int> &A)
{
const int n= A.size();
int global=A[0]... |
019c418c5320652ba80219e6a302f9380a08ec99 | a81538e82fef3b132cd2313c92a989ec9c441165 | PatrykGregorczyk/projekt | /menu.hpp | C++ | hpp | 411 | no_license | #ifndef MENU_HPP_INCLUDED
#define MENU_HPP_INCLUDED
#include "figura.hpp"
#include <ncurses.h> // getch() // clear() // printw() // keypad() // noecho()
void oProgramie();
void rysujMenuGlowne(int &pozycjaStrzalki, Figura* figura);
void rysujMenuStart(int &pozycjaStrzalki, Figura* figura);
void... |
44741f8cafa87493c957e705b749e01f6e45bee8 | aef714ea039e73bf2586933b60d7f9a7a0886889 | jordandong/myleetcodes | /LC_00573_SquirrelSimulation.cpp | C++ | cpp | 1,697 | no_license | /*
There's a tree, a squirrel, and several nuts. Positions are represented by the cells in a 2D grid.
Your goal is to find the minimal distance for the squirrel to collect all the nuts and put them under the tree one by one.
The squirrel can only take at most one nut at one time and can move in four directions - up, do... |
2046892b6fcdd03562dd13bddc8db41fd651e195 | 85d64f6cf9376f3c359976f6be6da412ef514522 | SolvingProblems/Code4Algorithm | /Daeseok.Youn/GoogleCodeJam/Round1B-2010/FileFixIt/FileFixIt.cpp | C++ | cpp | 3,577 | permissive | #include <iostream>
#include <vector>
#include <limits>
using namespace std;
class FileFixit {
public:
FileFixit() {
// make root directory
mkRootDir("/");
}
typedef struct _dentry {
vector<struct _dentry*> dnode;
string dname;
} dentry;
void mkRootDir(string path... |
6acb85099d4c42868f3128cf976eff9992ed53de | 9e77a42bafdb05bba91bdcc470d08a723a2d9378 | shinesolutions/swagger-aem-osgi | /clients/cpp-qt5/generated/client/OAIComAdobeCqSocialContentFragmentsServicesImplCommunitiesFragmenInfo.cpp | C++ | cpp | 5,660 | permissive | /**
* Adobe Experience Manager OSGI config (AEM) API
* Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API
*
* OpenAPI spec version: 1.0.0-pre.0
* Contact: opensource@shinesolutions.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openap... |
6e50fd7f15f2037cbba7cfee7900cf9825df4b92 | fd51a0a471bc2a0497ff6479d286f13ce1d4f10f | silvest/HEPfit | /LeptonFlavour/src/li_lj_gamma.cpp | C++ | cpp | 6,008 | permissive | /*
* Copyright (C) 2012 HEPfit Collaboration
*
*
* For the licensing terms see doc/COPYING.
*/
#include "li_lj_gamma.h"
#include "LeptonFlavour.h"
mu_e_gamma::mu_e_gamma(const StandardModel& SM_i)
: ThObservable(SM_i)
{}
double mu_e_gamma::computeThValue()
{
double alph = SM.getAle();
double mMU = SM.ge... |
ca6fd87b671aa782591446ce014996abd27625c0 | 8caad7682222a462c7eea23af9792baab0560ff9 | SharefutursLLC/ITCoin-src | /src/rpcmining.cpp | C++ | cpp | 21,087 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include "db.h"
#include "init.h"
#include "bitcoinrpc.h"
using name... |
ad0cd8022811c111fd7ff3ed84f673677a54156c | 5b8e13fde94e9d32c091b208b7e4e51671a44ef2 | QBL-Team/QBL-Station | /Source/SerialPortManager.cpp | C++ | cpp | 3,003 | no_license | //
// Created by Huang on 2016/1/23.
//
#include <QtCore/qtextstream.h>
#include <QDebug>
#include "SerialPortManager.h"
SerialPortManager::~SerialPortManager()
{
thread_work->quit();
thread_work->wait();
delete thread_work;
}
SerialPortManager::SerialPortManager(QObject* parent)
: QObject(parent)
{
... |
21e43154bf4b130adc855c7c067dc40c45ab9ed6 | 56b581a36ad4499fb2f944f579eb14f73db826d8 | sureyeaah/Competitive | /d-worst-case.cpp | C++ | cpp | 1,556 | no_license | // Gear4
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define FOR0(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define FOR(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define FORD(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
... |
411d7ec4a211aa95bb6af27fa3bce9992f3f0431 | bb9ebf6be88bc8be08d8077fd741aff28d95e7ac | niansa/xtd | /examples/xtd.tunit.examples/asserts/assert_contains/src/assert_contains.cpp | C++ | cpp | 1,347 | permissive | #include <xtd/xtd.tunit>
#include <vector>
using namespace std;
using namespace xtd::tunit;
namespace unit_tests {
class test_class_(test) {
public:
void test_method_(test_case_collection_succeed) {
assert::contains(2, {0, 1, 2, 3});
}
void test_method_(test_case_collection_failed) {
... |
c8565bc944adb978164b1cdc89d32ec558b52311 | 60371ffcb5f9c0af479290a9824a8c9c04035385 | HiteshGarg-Coder/Cpp-BootCamp | /Binary Tree/Build Tree From Array.cpp | C++ | cpp | 1,318 | no_license | #include <iostream>
#include<queue>
using namespace std;
class node{
public:
int data;
node*left;
node*right;
node(int d){
data = d;
left = NULL;
right = NULL;
}
};
void bfs(node *root){
queue<node*> q;
q.push(... |
c95cae40dc763d7bf64a64338a1f20095491e498 | c2e4d348d5561f41764d8729141e501bd507ed99 | eshlykov/junk | /school-31/coding/trainings/march-training/03_C_horse.cpp | C++ | cpp | 1,181 | no_license | #include <cstdlib>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <bitset>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <cmath>
#include <cassert>
using namespace std;
const double ... |
6cc46685cfc1034102162aae78334bc81af86bb9 | ec6c98307946dabaeab3975f4d013fbf4d73481f | ProyectoLegus/Legus | /Expresion/ExpresionInstanciaDe.cpp | C++ | cpp | 1,263 | no_license | #include "ExpresionInstanciaDe.h"
#include "Programa/Programa.h"
ExpresionInstanciaDe::ExpresionInstanciaDe(Expresion *expresion, TipoDato tipoDato, int numeroDeLinea)
:Expresion(INSTANCIADE, numeroDeLinea)
{
this->expresion = expresion;
this->tipoDato = tipoDato;
}
Tipo* ExpresionInstanciaDe::validarSema... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.