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 |
|---|---|---|---|---|---|---|---|---|
8aba4f4583617d59c634db0592994345c538ff52 | 71970b94905130ae78845c4e0acda4c8ccec18f6 | SEESAI/Firmware | /src/modules/simulation/simulator_mavlink/SimulatorMavlink.cpp | C++ | cpp | 52,528 | permissive | /****************************************************************************
*
* Copyright (c) 2015 Mark Charlebois. All rights reserved.
* Copyright (c) 2016 Anton Matosov. All rights reserved.
* Copyright (c) 2017-2020 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and bi... |
c8a527369d6a59f91f52edef579236a15bb78809 | d0c88e431dddae2ed8a52d164d85c17066f9de9f | dzl0971/Meet-Zooki | /SFML1/SFML1/TitleScreen.cpp | C++ | cpp | 1,031 | no_license | #include "TitleScreen.h"
TitleScreen::TitleScreen()
{
font.loadFromFile("Data/arial.ttf");
gameStart = "Welcome! Press Space to Play!";
levelClear = "Level Clear! Press Space to Continue";
lavaDeath = "Don't Touch the Lava! Press Space to Retry";
timerDeath = "Out of Time! Press Space to Retry";
gameClear = "Co... |
a925075ad5f6623bb06585d9d5bf6727f9d4a6fb | cd8b537616f31c90732299fd9eb1f604ee3f2f0b | linghutf/topcoder | /2016/alibaba/topk.cc | C++ | cc | 2,571 | no_license | /**
* 从100万个数中找到最大的10个数
* 使用size为10的最小堆
*
* 测试使用1000个在(0-10000)数字,找到最大的20个数
* 使用sort验证正确性
* 并且使用bitmap验证
* 结论:思路正确
*/
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <bitset>//验证
#include <cstdlib>
#include <ctime>
using namespace std;
#define K 20
#define UP 10000
... |
445e778727a2916d7a9a0d1158173a0ba84142f0 | a1b31012aeb791618a078cc4f7bdcb803875251f | hertrste/mythos | /kernel/host/host-common/util/assert.hh | C++ | hh | 398 | permissive | #pragma once
// note: the mythos host should not depend on the implementation in base/assert.cc
// but we can add host/assert.cc one day...
#include <assert.h>
#define ASSERT(expr) assert(expr)
#define ASSERT_MSG(expr, message) assert(expr)
#define OOPS(expr) assert(expr)
#define OOPS_MSG(expr, message) assert(expr)
#... |
e0e1727f48be6e8ab153f2dd042eeb141d6ebbf6 | a6517fafb00cb387ddbdc3c506a857bf1218da36 | apple/swift-lldb | /source/Host/macosx/cfcpp/CFCMutableSet.cpp | C++ | cpp | 1,935 | permissive | //===-- CFCMutableSet.cpp ---------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
5d514974c40f29fbbcee429cec6000b6dc3c9971 | bef345556f8b0cbddc0fae4d2c8630036c31fd7c | tiwason/practice | /Trees/checkingAndPrinting/sumTree.cpp | C++ | cpp | 1,318 | no_license | #include <iostream>
#include <vector>
using namespace std;
struct Node
{
int data;
Node* left;
Node* right;
};
Node* getNewTreeNode(int data)
{
Node* newNode = new Node();
newNode->data = data;
newNode->left = NULL;
newNode->right = NULL;
return newNode;
}
bool isLeafNode(Node* node... |
9bfa85088b1422c593d6c226bb76f57f7a438188 | 22e46da5f7c2dd337d007a4433c46de68f813e7b | dyg540/chromium | /chromeos/components/phonehub/camera_roll_manager_impl_unittest.cc | C++ | cc | 28,539 | permissive | // Copyright 2021 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 "chromeos/components/phonehub/camera_roll_manager_impl.h"
#include "base/callback.h"
#include "base/strings/utf_string_conversions.h"
#include "... |
87537bb7fa3f359bdd83a33b05a3a24f17adfaac | 8574324a5139f4c577a42f28ea1551fe2ef21c95 | Soul-Bruteflow/cpp_pool | /d00/ex01/inc/Contact.hpp | C++ | hpp | 504 | no_license | #ifndef _CONTACT_HPP
#define _CONTACT_HPP
#include "defines.hpp"
#include <string>
class Contact
{
public:
//Fields
std::string tmpStr[FILED_STATIC_LEN];
Contact();
~Contact();
// Mutator functions
bool addFieldData(int field_index, std::string data);
bool createContact(std::string data[MAX_CONTACTS... |
77334997a0bac5b0a1aee00c80ccedba90379def | 69c3c4ca1a8d185c7f0330446465e9a67c4566db | biswanathTewari/DailyDSA | /Graph/CircleOfStrings.cpp | C++ | cpp | 1,180 | no_license | #include<bits/stdc++.h>
using namespace std;
#define M 26
void DFS(vector<int> g[],vector<int> &vis,int index){
vis[index] = 1;
for(auto i=g[index].begin();i!=g[index].end();i++)
if(!vis[*i])
DFS(g,vis,*i);
}
int isStronglyConnected(vector<int> g[],vector<int> mark,int index){
vector<int> vis(M,... |
948ae897b168a501853a16cf3c4cb68c3ea5af06 | 73b32a69d3c51b2ba6920c0db026bd86a0715b0a | PeterAlfonsLoch/app | /appseed/aura/aura/install/windows/install_windows_boot.cpp | C++ | cpp | 2,496 | no_license | //#include "framework.h"
#ifdef WINDOWSEX
/*
int32_t spaboot_registry_register(const char * lpszFile)
{
reg_delete_tree_dup(HKEY_CLASSES_ROOT, ".spaboot");
HKEY hkey;
if(ERROR_SUCCESS != ::RegCreateKey(
HKEY_CLASSES_ROOT,
".spaboot",
&hkey))
return 1;
char strValue[2048];
strcpy_dup(... |
fb2c9782f4b07113bd550b3600d5385cd199d0b6 | b7771d57aefdb48db0e5cdf106fcfebf97ebc87d | ddcc/llvm-project | /lldb/source/Utility/UriParser.cpp | C++ | cpp | 2,043 | permissive | //===-- UriParser.cpp -----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
81a0ac1a53f5508b82da799109c9bfaa8fb6f009 | 2bcc146306e77729a5ef2fbb16113d3a5ce5f1d3 | nasserbek/bek | /NZZ/FB.cpp | C++ | cpp | 7,265 | no_license | #include "FB.h"
#include "headers.h"
#define FIREBASE_HOST "bekiot.firebaseio.com" //Your Firebase Project URL goes here without "http:" , "\" and "/"
#define FIREBASE_AUTH "Zu8TzSH0rAq9NREWBbsW7tgLh6mQ9AWJIUQAoSJp" //Your Firebase Database Secret goes here
#include <FirebaseESP32.h>
Fireba... |
696bcbcf732c85ac941f54e9d1dce9c1a9c3f47d | 99a81922fc4489defedf3812e9f096cc214448ec | soft-koko/Heaven3D | /H3D/H3DCoreLib/h3d_file.cpp | C++ | cpp | 4,082 | no_license | #include "h3d_pch.h"
#include "h3d_string.h"
#include "h3d_debug.h"
#include "h3d_file.h"
// 类
namespace Heaven3D
{
bool H3DFile::open()
{
debug_assert(file_name_.size() != 0, "No filename provided");
return open(file_name_, file_access_);
}
bool H3DFile::open(const H3DString& file_name, uint32_t access_righ... |
e62bee21c8bc813d3710f4e3a02f68d3e6ee337a | aa7cf7bd038d429a382ce501eb08c2a97a1de6c3 | shafik/llvm-project | /clang/test/OpenMP/declare_target_codegen.cpp | C++ | cpp | 9,601 | permissive | // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -DLOAD
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fvi... |
1d5eedb059e5f6784c2350c41e885b2f4e936879 | ed8768ba3e28e290922fb22c774518d429f1d672 | gpersia/Computacion-1 | /Parciales/Segundo Parcial/2parcial/main.cpp | C++ | cpp | 2,349 | no_license | #include <iostream>
#include <string>
// Formularios html
#include "getpost.h"
#include <typeinfo>
#include "persona.h"
#include "organizacion.h"
#include "myconnection.h"
using namespace std;
int main (int argc, char* const argv[]) {
Persona persona;
Organizacion organizacion;
map<string,string> Post;
initi... |
a65eef6a2e232eb8c0ee25b38d5dd5dd073a6f6c | 4a11867ed2adc41d0b6b27f586a40ada90a3630c | apple/swift-libcxx | /test/std/containers/unord/unord.set/merge.pass.cpp | C++ | cpp | 4,470 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
da84b03f1f0190958330aafb917870d576621d51 | 5a0ba9f2e8c260798908f17f91d4b6d3a2cf4180 | aroskuski/CS4404-AITF | /src/HostFilter.cpp | C++ | cpp | 6,506 | no_license | //
// HostFilter.cpp
// Acquiring IP Address
//
// Created by Alexander W. Witt on 4/28/15.
// Copyright (c) 2015 ___Alexander W. Witt & Andrew J. Roskuski___. All rights reserved.
//
#include "HostFilter.h"
HostFilter::HostFilter(){
}
HostFilter::~HostFilter(){
}
/**
* This method is used spawning a thread... |
16cd6c3edefecf97918b5c8d2233e9eabd606bea | ac2cd75c487b5d9422cce9ec404cc881570e8379 | skeel3r/cpp_astar | /test.cpp | C++ | cpp | 204 | no_license | #include <vector>
#include <iostream>
using namespace std;
vector< vector<int> > image;
vector<int> row;
int main(){
int *pointer = 0;
int test = 2;
pointer = &test;
cout << *pointer;
return 0;
}
|
73c8e66ec320bd2fa28e6149b1f62bd6dc5bf82a | d39a23c3e8faa76acd09978f0d6d72dac33a672f | zhouxs1023/GTE | /Samples/Intersection/IntersectBoxSphere/IntersectBoxSphereWindow3.cpp | C++ | cpp | 6,090 | no_license | // David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2020
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 4.0.2020.01.10
#include "IntersectBoxSphereWindow3.h"
#include... |
667c0ebfa561b89246a78db8fbd836cdd653ffa8 | e0df64f81b00267d116ef0b4b539f1f92c8b4a6d | bbod-USU/CS5500_Parallel_Prog | /Parallel_Mandelbrot/main.cpp | C++ | cpp | 4,562 | no_license | #include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <mpi.h>
#include <string>
#include <vector>
///
/// http://wili.cc/blog/mandelbrot-mpi.html
///
#define MCW MPI_COMM_WORLD
using namespace std;
const int Master = 0;
struct Color {
int red;
int green;
int blue;
};
struct ... |
9899ea3e01fba474f20f58148cadea882e8aae7d | 639dff2bcf74f493a8cdc03b9f780dec4ea0ece2 | VIKAL009/DSA_FOR_INTERVIEW_PREP | /HEAP/9_sum_k1_k2.cpp | C++ | cpp | 672 | no_license | // sum of elements between k1 smallest and k2 smallest numbers;
#include<bits/stdc++.h>
using namespace std;
int ksmallest(int arr[],int k,int n){
priority_queue<int>maxh;
for(int i=0;i<n;i++){
maxh.push(arr[i]);
if(maxh.size()>k){
maxh.pop();
}
}
return maxh.top();
}... |
20c7657edd149c982b560388329a309c4c7f0789 | f4a8ba628c42338a9bfdf044589eaaba57b9f919 | agendek78/openthread | /src/core/meshcop/leader.hpp | C++ | hpp | 5,443 | permissive | /*
* Copyright (c) 2016, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this ... |
38104fa59bcfc5039e79ce421c836b7da75748e9 | d7197ba41646b45ddc10b886cc9b0c1aba44fd9a | milanxiaotiejiang/MYPlayer_C | /MYPlayer/src/MYPlayer/MYPlay.cpp | C++ | cpp | 9,242 | no_license | #include "MYPlay.h"
#include <QDebug>
#include <QSettings>
#include <QFileInfo>
#include <QPointer>
#include "MYDemuxThread.h"
#include "MYVideoOutput.h"
#include "MYSubTitle.h"
static QScopedPointer<MYDemuxThread> dt;
static QScopedPointer<MYSubTitle> st;
MYPlay::MYPlay()
{
dt.reset(new MYDemuxThread);
st.re... |
4ff2d15150a7c55750d69277a714ab17ef46d108 | 44f85716cff608ab52286fa19cb1607432d1b9c1 | ddneprov/algorithms | /sort_by_width/main.cpp | C++ | cpp | 573 | no_license | #include "ReadWriter.cpp"
//Можно добавлять любые методы для решения задачи.
//Задача - реализовать данный метод, решение должно быть в переменной result
void solve(std::vector<Node>& graph, int start, std::vector<std::string>& result){
//TODO
}
int main() {
std::vector<Node> graph;
std::vector<std::stri... |
3ce11f8a4134c7f08941cf95ca22e62e542369b3 | e5f97cec67ac678f62f11df3244bf9005a7542cd | WalteR-MittY-pro/Gazebo-MPI | /gazebo7_7.14.0_exercise/plugins/CartDemoPlugin.cc | C++ | cc | 6,163 | permissive | /*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* 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... |
25486490738b4918e6ff9e1fb021558a90417684 | 22ea3cfc59e61493b6ea10b3f8ddb4bafe584880 | ufz/ogs | /MaterialLib/SolidModels/MFront/MFront.cpp | C++ | cpp | 485 | permissive | /**
* \file
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#include "MFront.h"
namespace MaterialLib
{... |
8344c18a491a6d3a58dfefd9b8131f32bc468730 | 64e551761cb70656ab2c6d7132841cfe12df72b6 | ramishnadeem/CS250 | /Labs/Lab 01-Exploring STL/project5.cpp | C++ | cpp | 616 | no_license | #include <iostream>
#include <string>
#include <map>
using namespace std;
int main() {
while ( true )
{
map<string , string> colors;
string color;
cout << endl << "Enter a color, or QUIT to stop: ";
cin >> color;
if (color == "QUIT")
{
break;
... |
48967fc52a391d50ec0ac56c3c3f06dbe925a1a6 | 4d10704c10c9185bc1e4825c806f44174f67f6c1 | WaykiChain/wicc-wasm-cdt | /wasm_llvm/tools/llvm-mca/llvm-mca.cpp | C++ | cpp | 18,810 | permissive | //===-- llvm-mca.cpp - Machine Code Analyzer -------------------*- C++ -* -===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
2a102d40b157278856dbb8a0dd8de88bad665858 | df1e166736504536825ae11ea2693ffacaeb18b1 | jxdms/alioth-dev | /inc/typeuc.hpp | C++ | hpp | 5,948 | permissive | #ifndef __typeuc__
#define __typeuc__
#include "agent.hpp"
#include "nameuc.hpp"
namespace alioth {
class typeuc;
class ClassDef;
class nameuc;
using $typeuc = agent<typeuc>;
using TypeID = unsigned long long;
using $ClassDef = agent<ClassDef>;
/**
* @class typeuc : type use case, 类型用例
* @desc :
* 用于描述数据类型的类型用例... |
961689a7335db28cee1631609f7c0a255f449127 | c647ed91ab06f72a0438eca0b3775d4847ec8742 | Wouter-Engelen/VPW-opgaves | /2019/cat3/kerstmis/cpp/WouterE.cpp | C++ | cpp | 2,327 | no_license | #include <bits/stdc++.h>
using namespace std;
#define int long long
vector<int> power10(11, 1);
set<int> quad;
vector<vector<int>> result_v;
vector<string> words;
void solve(vector<int> current, int char_index, int index, const set<int>& free, const map<char, int>& mapping) {
if(index == words.size()){
re... |
83174a508a3e0e7af6301e94ece7ec28aa65871f | 0eef5bdd9acb7d3990e93eceae2e598e1063d081 | ranrandeyu/PATE | /PAT/树/树的遍历/1090. Highest Price in Supply Chain.cpp | C++ | cpp | 950 | no_license | /*遍历&&dbs
提供经销商(树),生产商为根结点,给出生产商的价格以及比率r,每一级价格都会张r%
求经销商(叶子节点)最高销售(层级越多),并算出有多少人卖这样的价格 */
#include<iostream>
#include<cmath>
#include<vector>
using namespace std;
vector<int> t[100001];
int n,maxdepth=0,maxnum=0;
void dfs(int index,int depth)
{
//没有孩子结点,即叶子结点
if(t[index].size()==0)
{
if(maxdepth==depth)
{
... |
84705919136492deeb4ae0ef1c0f0189e8e0b98e | 097041dd357501b656600faac83a046e60a0da8b | rzr/iotivity | /test/src/tc/re/gtest/src/stc/REResourceWrapperAPITest.cpp | C++ | cpp | 48,243 | permissive | //******************************************************************
//
// Copyright 2016 Samsung Electronics All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance... |
f007a0338b38e37079d7ec70765bdea776f5983e | 82acbfc47b06ed2a45e06ea38fcc5ea5f2a9c501 | brycelelbach/nt2 | /modules/cephes/include/nt2/toolbox/cephes/function/simd/common/i0e.hpp | C++ | hpp | 1,345 | permissive | //////////////////////////////////////////////////////////////////////////////
/// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand
/// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI
///
/// Distributed under the Boost Software License, Version 1.0
/// ... |
460f02936aa356814d8f43c1a113515bc35904f7 | 00c206cf8c9366811cb849f359541f6044c1ab62 | aman212yadav/COMPETETIVE-PROGRAMMING | /string/Lapindromes.cpp | C++ | cpp | 890 | no_license | //solution written by Aman yadav, codechef username aman212yadav
// problem link https://www.codechef.com/problems/LAPIN
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t,i;
cin>>t;
while(t--)
{
string s;
cin>>s;
int arr[26]= {},n=(int)s.size();
... |
c459c139631ead1220cc57dd231a461c310fbc08 | 95daed1e3e22ab8c8ca14bf59f7406325a476701 | c3358/gecko-dev-comments-removed | /security/sandbox/chromium/sandbox/linux/seccomp-bpf/syscall_iterator_unittest.cc | C++ | cc | 2,852 | permissive |
#include "sandbox/linux/seccomp-bpf/syscall_iterator.h"
#include <stdint.h>
#include "sandbox/linux/seccomp-bpf/linux_seccomp.h"
#include "sandbox/linux/tests/unit_tests.h"
namespace sandbox {
namespace {
const SyscallSet kSyscallSets[] = {
SyscallSet::All(),
SyscallSet::InvalidOnly(),
};
SANDBOX_TEST... |
2d33b36ed6b149516bf8e2f45d0dd32d5dbe64ff | eceabab6651de4bdd45e5dd987e554070151dcc9 | AndyAyersMS/runtime | /src/coreclr/jit/lowerloongarch64.cpp | C++ | cpp | 27,624 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XX ... |
44d72312e6b5d2c2d7c9c7374c93f55a51708e90 | 4c5c15d04cc63f34600b3f72239254c9203af625 | apcarroll/portfolio | /assortedProjects/bsearch-dictionary.cpp | C++ | cpp | 3,238 | no_license |
// Implementation of a dictionary using an array and binary search
// It will inherit from the ArrayDictionary
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "bsearch-dictionary.h"
Heap::Heap(int maxSize){
this->maxSize=maxSize;
heap=new ArrayDictionaryNode[maxNumber];
last=0;
}
bool Heap::... |
f64c8304612e8428285b5ae625b076c8aab0dd40 | 293269ba60aa2c095fdbf2c88df33c0f41554cd6 | roussukke/Yorozuya | /library/ATF/LPCHOOSEFONTW.hpp | C++ | hpp | 263 | permissive | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <tagCHOOSEFONTW.hpp>
START_ATF_NAMESPACE
typedef tagCHOOSEFONTW *LPCHOOSEFONTW;
END_ATF_NAMESPACE
|
30cdd375c7c0b5c603d24ac95a158e6c2f149c7b | e54e0e7836f046e409f52b3ee3d96a2ff6f3d708 | WarlockD/Mil-std-1750A-Emulator-C20 | /operations/Operation_br.cpp | C++ | cpp | 355 | no_license |
#include "Operation_br.h"
namespace {
const std::string opName = "BR";
}
Operation_br::Operation_br() :
AbstractOperation(opName)
{
}
Operation_br::~Operation_br()
{
}
void Operation_br::execute() const
{
if (*m_v1 < 128)
{
m_instructionCounter.increment(*m_v1);
}
else
{
m_instructionCount... |
1b5394ea71ca41ab4945a915656f1b65b3268953 | 5192922c8be64400e990eb23ce7671aeeaf80581 | deleted/visionworkbench | /src/vw/Plate/index_server.cc | C++ | cc | 5,124 | permissive | // __BEGIN_LICENSE__
// Copyright (C) 2006-2011 United States Government as represented by
// the Administrator of the National Aeronautics and Space Administration.
// All Rights Reserved.
// __END_LICENSE__
#include <vw/Plate/Rpc.h>
#include <vw/Plate/IndexService.h>
#include <vw/Core/Stopwatch.h>
#include <vw/Plat... |
718717acff9ed85f41dc90c51601cc4d7be1f9fc | 5306548fda99178b06493c02e3c2e6dcdbf4dc28 | gilbert0571/nt2 | /modules/core/reduction/cover/simd/posmax.cpp | C++ | cpp | 3,113 | permissive | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
175113cd11cdc92135cb288e6a84ac3a450c7c78 | 11ab95508f368482aac44d25cd3841fc8777b8c6 | yjl9903/XLor-LibreOJ | /6583.cpp | C++ | cpp | 2,827 | no_license | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <utility>
#include <queue>
#ifdef XLor
#define dbg(args...) do { cout << #args << " -> "; err(args); } while (0)
void err() { std::cout << std::endl; }
template<t... |
c320e6a3490aaca55d470945e16a2491e73e6ede | 58f7fbc32a7f1044b284632fe9866d30862ac07a | Ivanhan2018/wh6602_zhuque | /Game/扎金花/游戏客户端/GameScoreView.cpp | C++ | cpp | 5,806 | no_license | #include "StdAfx.h"
#include "GameScoreView.h"
#include "ImageNums.h"
//////////////////////////////////////////////////////////////////////////
//BEGIN_MESSAGE_MAP(CScoreView, CWnd)
// ON_WM_PAINT()
// ON_WM_CREATE()
// ON_WM_LBUTTONDOWN()
// ON_WM_ERASEBKGND()
// ON_WM_MOVE()
//END_MESSAGE_MAP()
//////////////////... |
f3711c5d24db11e52df9701c1431ff191ec3e4aa | fe90199e537fe0e861e80269fc090565ece7f846 | Super-Teachers/stl_cxx_base | /examples/tuple1.cpp | C++ | cpp | 372 | no_license | #include <iostream>
#include <tuple>
#include <utility>
constexpr auto cast_to_all(int value)
-> decltype(std::make_tuple(int(), double(), float())) {
return std::make_tuple(value, static_cast<double>(value),
static_cast<float>(value));
}
int main(int argc, char **argv) {
std::c... |
78593febb0288b13caabddcb0c3c6242cdd566d3 | 91f9259815807b4157ae4fc7eaf535cbf5ebf69a | mihinsumaria/genex | /pygenex/GENEXBindings.cpp | C++ | cpp | 15,492 | permissive | #include <boost/python.hpp>
#include "GenexAPI.hpp"
using namespace genex;
namespace py = boost::python;
GenexAPI genexAPI;
/* Helpers for converting C++ types to Python types */
py::list timeSeriesToPythonList(const TimeSeries & ts)
{
py::list pl;
for (int i = 0; i < ts.getLength(); i++)
{
pl.append(ts[... |
8a93e4fe56fb3447e3ada6efe2439a1104078dde | f2b9546eb42bb3d2e7d980239a3fc9ad1d8ce847 | ULL-InformaticaIndustrial-Empotrados/TFG_Beneharo_agua | /BBB_I2C_LCD.hpp | C++ | hpp | 6,105 | no_license | #ifndef _BBB_I2C_LCD_
#define _BBB_I2C_LCD_
#include <cstdint>
#include <string>
// commands
#define LCD_CLEARDISPLAY 0x01
#define LCD_RETURNHOME 0x02
#define LCD_ENTRYMODESET 0x04
#define LCD_DISPLAYCONTROL 0x08
#define LCD_CURSORSHIFT 0x10
#define LCD_FUNCTIONSET 0x20
#define LCD_SETCGRAMADDR 0x40
#define LCD_SETDD... |
558eaa8d34981b796c00b5fdf0a6d7068b0f750d | 99f133f1a60324c883055c5b5e46670cec4c2c07 | HashCash-Consultants/HCNet-Core-CentOS | /src/history/InferredQuorum.cpp | C++ | cpp | 11,142 | permissive | #include "history/InferredQuorum.h"
#include "crypto/SHA.h"
#include "util/BitsetEnumerator.h"
#include "util/Logging.h"
#include "xdrpp/marshal.h"
#include <fstream>
#include <sstream>
namespace HcNet
{
void
InferredQuorum::noteSCPHistory(SCPHistoryEntry const& hist)
{
for (auto const& qset : hist.v0().quorumSet... |
e9b87a5c4d5845dd7f96f9e1b5d5a13187bbb766 | 4e88e654ee80866803c340f7d710cca61512f562 | coderark/Algo-DS | /A & D/C3/Week 2/strongly_connected.cpp | C++ | cpp | 1,357 | no_license | #include <algorithm>
#include <iostream>
#include <vector>
#include <list>
using namespace std;
int c=0;
bool exp1=false;
vector<int> porder, vorder;
void reach(vector<list<int>> &adj, vector<bool> &visited, int x){
visited[x]=true;
for(list<int>::iterator it=adj[x].begin(); it!=adj[x].end(); it++){
i... |
c3e02bb6d2aeda71064fa018695a243ed5c71803 | 1b25521459b8c6c2e3e92d1df2163f1ad2c234d1 | rubycho/flickr-dataset-cpp | /components/check.hpp | C++ | hpp | 956 | permissive | #ifndef FLICKR_DATASET_CHECK_H
#define FLICKR_DATASET_CHECK_H
#include <map>
#include <string>
#include <vector>
#include <QtWidgets>
#include "../utils/config.hpp"
class CheckWidget: public QWidget {
Q_OBJECT
public:
explicit CheckWidget(Config& c, QWidget *parent = nullptr);
~CheckWidget();
private:
s... |
d229d5996440903d314497edb30aa373c2946517 | bbe336852bd85b57f76d6e39d40d5ac6ec8ffad4 | marcelacsr/OpenSplice | /HDE/x86_64.win64/examples/protobuf/isocpp2/src/publisher.cpp | C++ | cpp | 930 | no_license | /*
* Vortex OpenSplice
*
* This software and documentation are Copyright 2006 to ADLINK
* Technology Limited, its affiliated companies and licensors. All rights
* reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except i... |
13fd4712efe21e93e642ede94fbc2b65271d572e | 32925c422468dc5683d773e14e058771aafad6a7 | kmjp/procon | /gcj/gcj15/q_a.cpp | C++ | cpp | 1,375 | no_license | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<to;x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.... |
9f314659794b7b352fa4b8772bf3330d38ca9682 | 40b356d8ee9ca68db447b58222922ded4098f8b1 | sawamotokai/competitive-programming | /AtCoder/ABC/150/c.cpp | C++ | cpp | 1,152 | no_license | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef set<int> si;
typedef map<string, int> msi;
typede... |
7effdaa60c1e806d4304a857f924637c73f00187 | 16c91031953220ee44c7c74e9df7486b85a586b2 | bani-intelaipg/openvino | /inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/reduce_ops.cpp | C++ | cpp | 6,485 | permissive | // Copyright (C) 2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "single_layer_tests/reduce_ops.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
... |
de7eebb59fcef52a3a67af5c1c2d81ec07e6e4f4 | 07dfadf216221fa0b404a84ee5d0d72b0a710ce6 | vikashkumarjha/missionpeace | /lc/lc/2021_target/binary_search/lc_162_find_peak_element.cpp | C++ | cpp | 1,349 | no_license | /*
A peak element is an element that is strictly greater than its neighbors.
Given an integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks.
You may imagine that nums[-1] = nums[n] = -∞.
Example 1:
Input: nums = [1,2,3,1]
Output:... |
bc599c212fb54e08a50efbb48aea668589536ae3 | de8dc44d6e7cc5c31696ed582902393129ee4411 | MrTutao/protobuf | /src/google/protobuf/compiler/command_line_interface.cc | C++ | cc | 93,864 | permissive | // Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// ... |
11f1c87a8f7a4a26953a01d9c2f4526c6b2324b3 | f4d2c85f8e2d3cba9d6682caeb09d5d62ad05c80 | kcoms555/ML-in-cpp | /source/Batch.cpp | C++ | cpp | 1,072 | permissive | void Batch::init(void){size;count=0;position=0;m_arr=NULL;is_allocated=false;}
Batch::Batch(void){
init();
}
Batch::~Batch(){
if(m_arr){
for(int i=0;i<count;i++)
if(m_arr[i])
delete m_arr[i];
delete[] m_arr;
}
}
void Batch::allocate(int size){
this->size = size;
m_arr = new Matrix*[size];... |
421e376780b24fe897104f56c40eaadacf15e5fa | a7b3719df93bb655389efa739113f9b44a9b5f78 | marco-c/gecko-dev-wordified-and-comments-removed | /third_party/libwebrtc/rtc_base/numerics/mod_ops_unittest.cc | C++ | cc | 3,790 | permissive | #
include
"
rtc_base
/
numerics
/
mod_ops
.
h
"
#
include
<
stdint
.
h
>
#
include
"
test
/
gtest
.
h
"
namespace
webrtc
{
class
TestModOps
:
public
:
:
testing
:
:
Test
{
protected
:
static
const
unsigned
long
ulmax
=
~
0ul
;
}
;
TEST_F
(
TestModOps
Add
)
{
const
int
D
=
100
;
ASSERT_EQ
(
1u
Add
<
D
>
(
0
1
)
)
;
ASSE... |
4f54ac191ca2a652556337b276eaf74fb25b999d | 15f6df1a92220efeb57f3f88ced53c0017b2d362 | feiyangqingyun/QWidgetDemo | /third/designer/form/mainwindow.cpp | C++ | cpp | 15,320 | permissive | /****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Designer of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** ... |
0a4f41930883118d32bb7194bf05f22c74f93312 | d4113fe42ae02c86a4643a6c23768ff83e2103f6 | praartr/6160 | /Project3/tracker.start/manager.cpp | C++ | cpp | 3,829 | no_license | #include <iostream>
#include <string>
#include <iomanip>
#include "multisprite.h"
#include "sprite.h"
#include "gamedata.h"
#include "manager.h"
#include "twowaysprite.h"
Manager::~Manager() {
// These deletions eliminate "definitely lost" and
// "still reachable"s in Valgrind.
for (unsigned i = 0; i < sprites.s... |
4e12b4c4770f8348d35bd109de9ad1f6e5dc61b3 | a682191c470711021893cea61356fe73f58bd5ae | jjzhang166/WinNT5_src_20201004 | /NT/admin/snapin/certentp/compdata.cpp | C++ | cpp | 70,896 | no_license | //+---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1997-2002.
//
// File: compdata.cpp
//
// Contents: Implementation of CCert... |
6e07d94ab55a72cd4ede370b93cd6a149cfb78e8 | ad2cb2cd219430909a299aa8595536b7ae9af58d | rust3128/iMposOld | /FuelNameWizard/showfuelnamepage.cpp | C++ | cpp | 11,433 | no_license | #include "showfuelnamepage.h"
#include "passconv.h"
#include "ui_showfuelnamepage.h"
#include "pagelist.h"
#include "LoggingCategories/loggingcategories.h"
#include "ProgressBarDelegate/progressbardelegate.h"
#include "GetFuelNameClass/getfuelnameclass.h"
#include <QTableWidgetItem>
#include <QThread>
#include <QIcon>... |
5c4c723b36df3eef8d5c90e03fdb2e5c5dcdb190 | 7f38632a55d191f8db9cef377a168d9d79a89ca7 | liuliang321/BasicUI | /ui/src/main/cpp/compress-lib.cpp | C++ | cpp | 6,245 | no_license | #include <string.h>
#include <android/bitmap.h>
#include <android/log.h>
#include <stdio.h>
#include <setjmp.h>
#include <math.h>
#include <stdint.h>
#include <time.h>
//统一编译方式
extern "C" {
#include "jpeglib.h"
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
#include "jversion.h" /*... |
d38b62062f0e003315921cefe393e276cb6fe20c | c08fd82d56c70804d5442863d0c17d55e46e8f60 | lijiaxin-dut/leetcode | /leetcode_train/Solution_223.cpp | C++ | cpp | 746 | no_license | #include<algorithm>
using namespace std;
//Find the total area covered by two rectilinear rectangles in a 2D plane.
//
//Each rectangle is defined by its bottom left corner and top right corner as shown in the figure.
//判断两个矩形是否相交
//不相交直接返回求和
//若相交,减去交集
//注意越界
class Solution_223 {
public:
int computeArea(int A,... |
8bf8ad27c9df91ce0c329e2b0a3ef769a74fe229 | cc5ab73cb494058b809395ccabc8d0338678c076 | Candice-z/treasure-chest | /加法模拟器.cpp | C++ | cpp | 306 | no_license | #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <string>
using namespace std ;
int main ( )
{
int a,b;
scanf("%d%d",&a,&b);
printf("%7.d\n",a);
printf("+%6.d\n",b);
printf("-------\n");
printf("%7.d",a+b);
return 0 ;
}
|
c4132456d503cfe5c593370d0563219f2f1bc45f | 2e7691e089cd836cefec304018abe0f76d195dbf | jgrigg002/JonathanGrigg-CSCI020-Fall2016 | /lab15/lab15.cpp | C++ | cpp | 1,526 | no_license | //By: Jonthan Grigg
//Lab: 14-food menue selection
//Date: 10.26.16
#include <iostream>
#include <string>
using namespace std;
const int NUM_ELEMENTS = 99; //number of elements
int main(){
string item[NUM_ELEMENTS]; //array for menue items
int i= 1; //Item count
int j= 1; ... |
653557f9b55950c50c1a8bae4ba4faca9746ebbf | c2acc3b4b69651c5268ec76e18181e4ee1b957b8 | onexnet/onexcore | /src/qt/bantablemodel.cpp | C++ | cpp | 4,626 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bantablemodel.h"
#include "clientmodel.h"
#include "guiconstants.h"
#include "guiutil.h"
#include "sync... |
ce8ee7326fb6b99e7d8cc8453f3d747799b4f127 | 5a5e1fa23a124fa46b5132b61d3418d1e0c84b5c | maloel/librealsense | /unit-tests/live/mur/l500/test-sanity.cpp | C++ | cpp | 1,672 | permissive | // License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2021 Intel Corporation. All Rights Reserved.
//#test:tag max-usable-range
//#test:device L500*
#include "../../live-common.h"
// Test group description:
// * This tests group verifies depth sensor max usable range option restrictions,
... |
e0aacca64ded486061a894232914de2c00c966e1 | 6a5115f5591b4e8e15ff463c94989528d87ea002 | MLAB-project/radio-observer | /src/WFTime.cpp | C++ | cpp | 892 | no_license | /**
* \file WFTime.cpp
* \author Jan Milík <milikjan@fit.cvut.cz>
* \date 2013-04-26
*
* \brief Implementation file for the WFTime class.
*/
#include "WFTime.h"
/**
* \note This function uses the `strftime` function as declared in the
* ctime (time.h) header.
* \note Implementation of this functi... |
fa2f58eb87c1a63772b4118f61ed6ecf6fa4d5ba | dcd5667c153e34bee21a11a5cd428d511a6fd3fb | Kiritow/OJ-Problems-Source | /HDOJ/4831_autoAC.cpp | C++ | cpp | 3,264 | no_license | #include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
const int MAXN = 100010;
long long c[MAXN];
int lowbit(int x)
{
... |
0bc2a5f8ed04ef6cf75a81ec577ea23e2f44167d | 2fa91f797ed4ed619e9c933b080ad020b4526c88 | joking7898/Solved-Algorithm | /1297.cpp | C++ | cpp | 228 | no_license | #include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
int a,b,c;
float total,t1;
cin >> a >> b >> c;
total = a/sqrt(b*b + c*c);
cout << int(b*total) <<" "<< int(c*total) ;
} |
f4ff48c2c6a20cf8be68e369066e4971b821e019 | fe6894440f1e65f48b510ba9157ef8e39f205e28 | phamkhactuy/DUT_GAME1 | /returns/Classes/GUI/CocosWidget/Widget.cpp | C++ | cpp | 11,282 | permissive | /****************************************************************************
Copyright (c) 2014 Lijunlin - Jason lee
Created by Lijunlin - Jason lee on 2014
jason.lee.c@foxmail.com
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated ... |
6e434f86b24fbc055966f49f4e23c6c546bcefca | 19dfe5a5cae6346bf7366f38a82259c9b5e18d67 | UniStuttgart-VISUS/OcclusionCulling | /AABBoxMaskedRasterizerAVXST.cpp | C++ | cpp | 3,027 | permissive | ////////////////////////////////////////////////////////////////////////////////
// Copyright 2017 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
//
// http://www.apac... |
2f3f70e57610ab0b92b1c960fb0beacd179cb01e | 9a248a453f8ee823b9b791f29e7c07479909e53d | Aschen/minestorm | /client/Display.cpp | C++ | cpp | 4,479 | no_license | #include "Display.hh"
#include "Ship.hh"
Display::Display(const QSize &size, QObject *parent)
: QObject(parent),
_isRunning(false),
_size(size),
_client(QSharedPointer<Client>(new Client)),
_elements(nullptr)
{
DEBUG("Display::Display()", false);
connect(_client.dat... |
31c18efafb0a8c19e794588aa058312558dbcc4f | 104651d159fb405948b90bf1a1f7243363867dc1 | msisov/chromium | /chrome/browser/ui/extensions/hosted_app_browsertest.cc | C++ | cc | 103,729 | 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 <memory>
#include <string>
#include <utility>
#include "base/callback.h"
#include "base/callback_forward.h"
#include "base/command_line.h"
#incl... |
908d4204b56a463281e9ba24cbff6d8bb0427b9b | d26bdd925d55e883fcf29c8daf328d8212dc7dca | jspotter/teaching_samples | /340/5/matrixStuff/matrix_example.cpp | C++ | cpp | 844 | no_license | #include "matrix.h"
#include <iostream>
#include <time.h>
using namespace std;
int main() {
srand(time(NULL));
Matrix m1;
Matrix m2(3, 4);
Matrix m3(3, 4);
Matrix m4(4, 3);
m2.set(0, 0, 3);
m2.set(0, 1, 4);
m2.set(0, 2, 5);
cout << m2 << endl;
cout << "-----" << endl;
m2.set(2, 2, -6);
m3 = m2;
m2.se... |
f7eef26995869330663626267779a80e767c4d23 | c508930e8c19b9a019c60f2386b769c61b072776 | yijunyu/bi-tbcnn | /code/linkedlist/cpp/655.cpp | C++ | cpp | 2,166 | no_license | #include<iostream>
#include<cstdlib>
using namespace std;
struct node
{
int data;
node *next;
};
void inputdata(node *&l);
void addatbegin(node *&l);
void addatend(node *&l);
void addafter(node *&l);
void addbefore(node *&l);
void delete_el(node *&l);
void printlist(node *l);
int main()
{node *lst,*x,*startp... |
61c6bfecf58e34c8c079835719f5e3b92a94b21e | 18ef695cee0a423406c6d3705c5238301097d1e2 | karelz/WarPlusPlus | /src/GameServer/Civilization/Src/LogFile/LogFile.cpp | C++ | cpp | 8,438 | permissive | // LogFile.cpp: implementation of the CLogFile class
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "LogFile.h"
IMPLEMENT_DYNAMIC(CLogFile, CObserver)
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////... |
ab95523ca699f52be8ec0017c2327ec5a3905298 | 8d5e820ec861c2e056a82ad31f106ebe25f31b0b | shuzhifeng/logcabin | /Server/Consensus.cc | C++ | cc | 1,327 | permissive | /* Copyright (c) 2012 Stanford University
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DI... |
eb54ea59dd4473d66c980e35d5f355b8d703e7d2 | c6259e894d1f28356bb503d6a19d571fb8e367cf | useafter/PPTShell-1 | /PPTShell/PPTShell/DUI/RightBarItems/Layout/ListBarSelectChapterLayout.cpp | C++ | cpp | 843 | no_license | #include "stdafx.h"
#include "ListBarSelectChapterLayout.h"
CListBarSelectChapterLayout::CListBarSelectChapterLayout()
{
}
CListBarSelectChapterLayout::~CListBarSelectChapterLayout()
{
}
void CListBarSelectChapterLayout::DoInit()
{
__super::DoInit();
m_nType = -1;
m_pSelectChapterBtn = dynamic_cast<CButtonUI ... |
449aefb4abc1f91ff94e95c943d660eb01418703 | 2565ed121abbb5ace40f8b16d6422e7b481c0685 | pandareen/chromium | /net/quic/chromium/quic_http_stream_test.cc | C++ | cc | 98,031 | 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 "net/quic/chromium/quic_http_stream.h"
#include <stdint.h>
#include <memory>
#include <utility>
#include "base/memory/ptr_util.h"
#include... |
3a9bc06edcf5128aaa872b5d6376d4c96decf081 | 4d6c51adf22a78af6ae0af889ac0d0e664ddd717 | bluebambu/Leetcode_cpp | /33. Search in Rotated Sorted Array/33. Search in Rotated Sorted Array/_ConsoleApplication1.cpp | C++ | cpp | 3,119 | no_license | // _template4.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include <list>
#include <vector>
#include <algorithm> // std::for_each
#include <unordered_map>
#include <queue>
#include <stack>
#include <unordered_set>
#incl... |
8d604f91c3c5324f3684e51dd6222d644d0202cf | 849a6b09e37eb673fa69973b9f1b5652978cf1a5 | R0b3rtX99/leaktrap | /LeakTrap.cpp | C++ | cpp | 2,090 | no_license | /*
leaktrap.cpp - main entry point
user mode GDI and USER handle leak tracker project
Copyright (c) 2008 Dmitri Shelenin (deemok@gmail.com)
This program 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 Softwa... |
aca0aa87e19ec6fb672133887058f35a61106cfa | 709bd566fa98f7b6ff884e01df96dfabfe9d9576 | jdh8/onnx-mlir-dialect | /lib/Conversion/ONNXToKrnl/Tensor/Constant.cpp | C++ | cpp | 1,964 | permissive | //===---------------- Constant.cpp - Lowering Constant Op -----------------===//
//
// Copyright 2019 The IBM Research Authors.
//
// =============================================================================
//
// This file lowers the ONNX Constant Operator to Krnl dialect.
//
//===---------------------------------... |
89fbd5a3e35c8d7c8c3af214adae1779622d91ce | 0302bf875d437f6ceda8c39dab9a17f89340d8d5 | noscripter/cefode-chromium | /chrome/browser/profiles/profile.cc | C++ | cc | 5,725 | 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/profiles/profile.h"
#include <string>
#include "base/prefs/pref_service.h"
#include "build/build_config.h"
#include "chrome... |
d181bb33751ad0e77a1475e81e3c458fd34dbbc6 | 1b7362cce128d774ee0ff3539dce2ded240c3f4b | filipeguimaraes/VC_Tutorial2 | /old_stuf/old_code/src/main.cpp | C++ | cpp | 8,090 | no_license | #include <iostream>
#include <string>
#include <algorithm> // std::sort
#include <numeric> // std::accumulate
#include <opencv2/core.hpp>
#include "TrialData.hpp"
#include "CVUtils.hpp"
#include "FeetDetector.hpp"
#define CLOSE_KEY 27 // 'ESC'
using SensorID = asbgo::vision::TrialData::SensorID;
using ... |
3f0c2b7f25423acf7c41862224213f1de7f4c670 | 0ff65d2af88b86002430662ca01aa2ec5717348a | aaasz/SHP | /llvm/lib/Target/ARM/ARMMCAsmInfo.cpp | C++ | cpp | 1,720 | permissive | //===-- ARMMCAsmInfo.cpp - ARM asm properties -------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
02c2db37e1288b11933c458ecbf37c011edcb61e | 4b52a6bd09453510cb3ea08a0ce886837b6712f1 | sun6202/lab4-team | /build-QTCPClient-Desktop_Qt_5_14_2_GCC_64bit-Debug/moc_mainwindow.cpp | C++ | cpp | 6,115 | permissive | /****************************************************************************
** Meta object code from reading C++ file 'mainwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
**
** WARNING! All changes made in this file will be lost!
*********************************************************... |
2f47a0e84ed20ff5db8c69a032ef393581bf6b9f | c7b9d67d6b77f3c45e96901e1c1f67c8ba655b4e | Jyf624761709/Luogu | /AC/CF984B.cpp | C++ | cpp | 1,656 | no_license | #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<queue>
#include<map>
#include<set>
#include<cmath>
const int inf=2147483647;
const int ine=-2147482647;
using namespace std;
#define in() freopen("t.in","r",stdin)
#define out() freopen("t.out","w",stdout)
#define m(a) memset(a,0,sizeof(... |
637aeed6a07b7ae4e19ae5894bda1291764c813f | 6fde91f020906d9458c0d43605aff7c6748b2cc7 | kiam123/qt-tutorial | /book/Chapter11/Ch11-XMLQXmlStreamWriter/main.cpp | C++ | cpp | 1,600 | no_license | #include <QCoreApplication>
#include <QFile>
#include <QXmlStreamWriter>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QFile file("D:/QtProjects/QtProject/qt-tutorial/book/Chapter11/Ch11-XMLQXmlStreamWriter/bookindex.xml");
if (!file.open(QFile::WriteOnly | QFile::Te... |
31cbcf363b9131798ed3f2b13b9f06f321e6fb17 | 16b99831d055cfeb7cf86a7c13b88df2853ade89 | mrelich/IceBlockAna | /src/TreeMaker.cxx | C++ | cxx | 9,335 | no_license |
#include "TreeMaker.h"
using namespace std;
//--------------------------------------------------//
// Constructor
//--------------------------------------------------//
TreeMaker::TreeMaker(string infname,
string outfname) :
m_reader(NULL),
m_outfile(NULL)
{
// Initialize the reader object
m_reader =... |
506db66c8b232a2ede5805aba1f13db6578cb31f | 03fd1f3b5e04f89e94ce615a0ba7a4a15ea67ece | thagberg/another-vulkan | /VulkanTest/UserApp.cpp | C++ | cpp | 33,558 | no_license | #include <math.h>
#include <algorithm>
#include "UserApp.h"
#include "vulkanapp.h"
#include "InputManager.h"
#include "imgui\imgui.h"
#include "vulkan-util.h"
#include "GpuManager.h"
#include "types.h"
#include "HvkUtil.h"
#include "renderpass-util.h"
#include "image-util.h"
#include "command-util.h"
#include "framebu... |
be5f25755393a1717400f3005908ae14230b0fab | 41e88e7effcfeb8dc17f19a7d3a72c026e497d2c | MoraxAlvizo/Direct3D2016B | /Direct3D2016B/Graphics/DXManager.cpp | C++ | cpp | 9,010 | no_license | #include "stdafx.h"
#include "DXManager.h"
CDXManager::CDXManager()
{
m_pContext = NULL;
m_pDevice = NULL;
m_pSwapChain = NULL;
m_pRTV = NULL;
m_pDSV = NULL;
m_pDepthStencil = NULL;
}
CDXManager::~CDXManager()
{
Uninitialize();
}
IDXGIAdapter* CDXManager::EnumAndChooseAdapter(HWND hWnd, wchar_t* name)
{
IDXGI... |
eb39c064eaa74e0e4abb7dae1951493f9844561b | 64b0370dc6e49b2581fb9ccfc797059b6c93599d | manasvi-26/Competitive-Programming | /sorting/bubblesort.cpp | C++ | cpp | 1,374 | no_license | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
typedef vector <ll> vi; // Vector of long long
typedef vector <vi> vvi; // Vector of vi
typedef vector <pair<ll,ll>... |
0922cf5f3499d324dc203b343128658c4b0963d7 | 0e33046e6d90253894b09c14b5bed5e76090360a | liebercanis/MaGeLAr | /mjdemonstrator/src/MJVDemoPart.cc | C++ | cc | 4,698 | no_license | //---------------------------------------------------------------------------//
//bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu//
// //
// MaGe Simulation //
... |
cddff64aa5c424290b8c846ef2adde06efcf87f7 | e9f69624555c5b033ba2dbc0ed699e8800877843 | aurantst/windows-XP-SP1 | /XPSP1/NT/net/ias/services/util/portparser.cpp | C++ | cpp | 4,801 | no_license | //##--------------------------------------------------------------
//
// File: portparser.cpp
//
// Synopsis: Implementation of CPortParser class responsible
// for obtaining port information for the Radius
// protocol component
//
//
// History: ... |
f49ae719dc56a9d4f5a69e73d5f6c59c050cd888 | b8dd12d87021e58ccb76f0cfadb1561f97822f81 | webosce/chromium53 | /src/chrome/browser/android/banners/app_banner_data_fetcher_android.cc | C++ | cc | 4,300 | 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 "chrome/browser/android/banners/app_banner_data_fetcher_android.h"
#include <utility>
#include "base/bind.h"
#include "base/callback.h"
#includ... |
500df5c88540e96a9bac73a585ede0a2a4b8b672 | 04b165776005f8e1fda2267b7dadff4456b8d98b | yogach/QT-Experiment | /65-SIGNALS_And_SLOTS/moc_RxClass.cpp | C++ | cpp | 2,303 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'RxClass.h'
**
** Created: Thu Jul 22 09:40:31 2021
** by: The Qt Meta Object Compiler version 62 (Qt 4.7.4)
**
** WARNING! All changes made in this file will be lost!
***************************... |
8d3fb3ebf2d4651157e9c7c3fb6c419a48adbc3e | d0633a22c999a19f95a1af49f0d0346b49ee7258 | ranglang/vespa | /logd/src/logd/watcher.cpp | C++ | cpp | 11,569 | permissive | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "config_subscriber.h"
#include "exceptions.h"
#include "forwarder.h"
#include "watcher.h"
#include <vespa/log/log.h>
#include <vespa/vespalib/util/sig_catch.h>
#include <fcntl.h>
#include <gl... |
8373ad643d29388bdce90f9a4b6e764b6d981363 | e19714a8a96f8a5eef4e7b586915e9d53ae42923 | KDE/plasma-nm | /libs/editor/simpleiplistvalidator.cpp | C++ | cpp | 3,630 | no_license | /*
SPDX-FileCopyrightText: 2018 Bruce Anderson <banderson19com@san.rr.com>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "simpleiplistvalidator.h"
#include <QStringList>
#include <QVector>
SimpleIpListValidator::SimpleIpListValidator(AddressStyle style, Add... |
790bcf289fadf3109f1404949830de9e9488d445 | 0df9792c2ebd297eba9be43df01da0f9f87b7e8a | aminya/build2 | /libbuild2/bash/rule.cxx | C++ | cxx | 14,188 | permissive | // file : libbuild2/bash/rule.cxx -*- C++ -*-
// license : MIT; see accompanying LICENSE file
#include <libbuild2/bash/rule.hxx>
#include <cstring> // strlen(), strchr()
#include <libbuild2/scope.hxx>
#include <libbuild2/target.hxx>
#include <libbuild2/algorithm.hxx>
#include <libbuild2/diagnostics.hxx>
#inc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.