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 |
|---|---|---|---|---|---|---|---|---|
31c716cec118db7d12930c1ac86b762f638033ab | 62c168392b3c27610aeb8c66eaada6a695763e31 | DatabasesWorks/MBRClient-Nice-Project | /MBRClient/Common/ProgressIndicator.cpp | C++ | cpp | 2,264 | no_license | #include "progressindicator.h"
#include <QPainter>
QProgressIndicator::QProgressIndicator(int width, int height, QWidget* parent)
: QWidget(parent)
, m_angle(0)
, m_width(width)
, m_height(height)
, m_timerId(-1)
, m_delay(40)
, m_displayedWhenStopped(false)
, m_color(Qt::white)
{
setSizePolicy(QSizePolicy::... |
dbd5dd572ce49b5d651c034a0b5c3709b8ffc64e | 1b84fa82a8e4c48c410a24bfdccf07c821ca8286 | jamiekhoi/NewDat220 | /genericwave/AudioPlayer.cpp | C++ | cpp | 1,349 | no_license | //
// Created by Jack on 14.10.2017.
//
#include <iostream>
#include "AudioPlayer.h"
AudioPlayer::AudioPlayer() {
// load all sound effects
sf::SoundBuffer* buffer = new sf::SoundBuffer;
if (!buffer->loadFromFile("Audio/Effects/Kingdom Hearts Select.ogg")){
std::cout << "Failed to load sound effec... |
4b42ba5ed21ce3617f1542e86abd64d692918610 | 01051aa61fd752e37e163d4e2e2aa2e5602afc46 | sajid-mohamed/imacs | /src/ReversiblePipeline/src/auto_scheduler_generate_rev.cpp | C++ | cpp | 7,180 | permissive | // Halide tutorial lesson 21: Auto-Scheduler
#include "Halide.h"
namespace {
using namespace Halide;
///////////////////////// We will define a generator to auto-schedule.
class AutoScheduled : public Halide::Generator<AutoScheduled> {
public:
Input<Buffer<uint8_t>> in_patch {"in_patch" , 3};
Input<Buff... |
661f250249a39ff293614604dfdfdf437ddc1097 | 344a4b5b21ff08721d300e859c7307b88767eea8 | juxtin/yarnu | /ios/Pods/Folly/folly/dynamic.cpp | C++ | cpp | 12,579 | permissive | /*
* Copyright 2011-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
13903115636a16fdc79aa71e89358d3bcc25c159 | 879f75962577c34e154e5629ed70a2cdc7ff8b15 | badotter/badotter-ogitor-physx | /Ogitor/src/EcstasyMotion/fbx/fbxMain.cpp | C++ | cpp | 22,995 | permissive | /**************************************************************************************
Copyright (C) 2001 - 2009 Autodesk, Inc. and/or its licensors.
All Rights Reserved.
The coded instructions, statements, computer programs, and/or related material
(collectively the "Data") in these files contain unpublished i... |
051a79afbfa7e474893d96bc8f3e2c12824121bc | 69b96d2b519fc0da2c0e488b4de29fd9af1432ac | JHUISI/auto-tools | /CharmCPP/SS1536sig/benchBBsu.cpp | C++ | cpp | 3,686 | no_license | #include "TestBBsu.h"
#include <fstream>
#include <time.h>
void benchmarkBB(Bbssig04 & bb, ofstream & outfile0, ofstream & outfile1, ofstream & outfile2, int ID_string_len, int iterationCount, CharmListStr & keygenResults, CharmListStr & signResults, CharmListStr & verifyResults)
{
Benchmark benchS, benchV; // , benc... |
a76d6570b79cf7c77d3d3495f57dcc0e865e439b | e5ce79e6efcc9e91d8459bd1762fc0ae6f1e07a1 | hahgiraffe/code | /offer/66构建乘积数组.cc | C++ | cc | 791 | no_license | /*
* @Author: haha_giraffe
* @Date: 2020-03-02 23:20:51
* @Description: 给定一个数组 A[0,1,…,n-1],请构建一个数组 B[0,1,…,n-1],其中 B 中的元素 B[i]=A[0]×A[1]×…×A[i-1]×A[i+1]×…×A[n-1]。不能使用除法。
*/
/*
解题思路:这道题目在不能用乘法的情况下,两边往中间遍历,时间复杂度和空间复杂度都是O(n)
*/
class Solution {
public:
vector<int> constructArr(vector<int>& a) {
int n ... |
fbde1920e1a51b73dc8ddb351c8460c94ee9757e | 98c8c68a086046684da8efd6d5e2640c743a84cf | ben-whitten/ICS3U-Assignment-2-CPP | /icosahedron.cpp | C++ | cpp | 605 | no_license | // Copyright (c) 2019 St. Mother Teressa HS All rights reserved.
//
// Created by: Ben Whitten
// Created on: September 2019
// This is a program which can find the volume of an icosahedron.
#include <iostream>
#include <cmath>
int main() {
int length;
int volume;
// This is what finds the volume of the icosa... |
b2ba70998d0f39852fbed1be1874c38b532d5648 | 47f3782d12a0bdf25da03bc869efe6d30f39f33e | akhikolla/testpackages | /fuzzedpackages/IOHexperimenter/src/Headers/f_discus.hpp | C++ | hpp | 2,341 | no_license | /// \file f_Discus.hpp
/// \brief cpp file for class f_Discus.
///
/// A detailed file description.
/// Refer "https://github.com/numbbo/coco/blob/master/code-experiments/src/f_discus.c"
///
/// \author Furong Ye
/// \date 2019-09-10
#ifndef _F_DISCUS_H
#define _F_DISCUS_H
#include "IOHprofiler_problem.h"
#include "co... |
02dc3f01e8d1e798cc39d05af695f84828eae007 | 8437612236370f44a8b541171a05fea8283a3463 | hehol/t38modem | /pmutils.cxx | C++ | cxx | 6,085 | no_license | /*
* pmutils.cxx
*
* T38FAX Pseudo Modem
*
* Copyright (c) 2001-2006 Vyacheslav Frolov
*
* Open H323 Project
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the L... |
99e9bd8be6bdc44f1bf6fc28367b613686e11796 | ed9c9fa85a485a73973047766b0513b845649bbf | SathyaSaagar/JNI- | /Android/jni/hellojni.cpp | C++ | cpp | 382 | permissive | #include<jni.h>
extern "C" {
JNIEXPORT jstring JNICALL Java_com_dynamsoft_HelloJNI_stringFromJNI(JNIEnv* env, jobject thiz);
JNIEXPORT void JNICALL Java_com_dynamsoft_HelloJNI_nativePrint(JNIEnv* env, jobject thiz);
}
/*non-static method*/
JNIEXPORT jstring JNICALL Java_com_dynamsoft_HelloJNI_stringFromJNI(JNIEnv* ... |
088d7a7ab9b4c7c5a08b5f0b8c58b5712f3cffc2 | b0a0c1b0a4e3a4922da764af44fe327204a56748 | aqizhou/EzCourse | /StudentWindow.cpp | C++ | cpp | 4,632 | no_license | #include "StudentWindow.h"
#include <QMessageBox>
#include <QDebug>
#include <QtSql/QSqlQueryModel>
#include <QtSql/QSqlQuery>
#include <QtSql/QSqlError>
#include <QAbstractProxyModel>
#include <QSortFilterProxyModel>
StudentWindow::StudentWindow(QWidget* parent)
: QWidget(parent)
{
ui.setupUi(this);
}
StudentWindo... |
2e9cbddaa3de700f3c1c0b60f5f71973b15af49b | 15a333e10789f53503e3beab7ab4175dfb5638c2 | indigogem/ethanon | /toolkit/Source/src/engine/Physics/ETHPhysicsEntityController.cpp | C++ | cpp | 10,007 | permissive | /*--------------------------------------------------------------------------------------
Ethanon Engine (C) Copyright 2008-2012 Andre Santee
http://www.asantee.net/ethanon/
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Softwar... |
57f36607f1e6e3f7a479cd2833b8a5c0b2234222 | 6451a9d0c0dda51d95ea076a0bf50e3c6969c6f0 | songenjie/ClickHouse | /src/Parsers/IAST.cpp | C++ | cpp | 4,470 | permissive | #include <IO/WriteBufferFromString.h>
#include <IO/WriteHelpers.h>
#include <IO/Operators.h>
#include <Common/SipHash.h>
#include <Parsers/IAST.h>
namespace DB
{
namespace ErrorCodes
{
extern const int TOO_BIG_AST;
extern const int TOO_DEEP_AST;
extern const int BAD_ARGUMENTS;
extern const int UNKNOW... |
fd91c91fa55bd6fcd035c0d6675bbc33a7f58425 | 135c98a9eeb4f40bcfbddf1fdc3654fdd574ed85 | irl-game/irl | /server/sim_server.cpp | C++ | cpp | 832 | permissive | #include "sim_server.hpp"
#include "client.hpp"
#include "private_key.hpp"
#include "world.hpp"
#include <chrono>
#include <log/log.hpp>
#include <net/conn.hpp>
#include <proto/proto.hpp>
#include <sched/sched.hpp>
#include <ser/overloaded.hpp>
using namespace std::chrono_literals;
SimServer::SimServer(Sched &sched, W... |
d62faaf3b40c8722bae12ffd12e834dcb966e2c3 | 1293567dd2117f38cdea6d781970853da07c7c37 | phinguyenphuoc/Managerapps-cplus | /Project1/Project1/ctkh.cpp | C++ | cpp | 1,190 | no_license | #include <iostream>
#include "ctkh.h"
using namespace std;
CongTrinhKhoaHoc::CongTrinhKhoaHoc() {
this->id = "";
this->year = 0;
this->isForeign = 0;
}
void CongTrinhKhoaHoc::setId(string id) {
this->id = id;
}
void CongTrinhKhoaHoc::setYear(int year) {
this->year = year;
}
void CongTrinhKhoaHoc::setIsForeign(bool... |
88337381654b25e63c54a7d872174e680ed27e5d | 4963fb29b60a6ee544b14619f464a2b2049dbcaf | oconnerj/devilutionX | /Source/diablo.cpp | C++ | cpp | 58,513 | permissive | /**
* @file diablo.cpp
*
* Implementation of the main game initialization functions.
*/
#include <array>
#include <fmt/format.h>
#include <config.h>
#include "DiabloUI/selstart.h"
#include "automap.h"
#include "capture.h"
#include "cursor.h"
#include "dead.h"
#ifdef _DEBUG
#include "debug.h"
#i... |
a99012e693c601e3d939849a2e0db6e1a34ed418 | fdc55b5ab547af20a97023e55af21d2be498fd03 | 1InfinityDoesExist/OOPS | /Memory Leak.cpp | C++ | cpp | 790 | no_license | #include<bits/stdc++.h>
using namespace std;
class Solution
{
private:
public:
Solution();
void memoryLeak();
};
Solution::Solution(){}
//Memory leaf occur when programmer create a memory in heap and forget to delete it .........
void Solution::memoryLeak()
{
int sz (5);
int *ptr = (in... |
a70b7b913c7837cdd098da6c736a4ccc33d50cbd | 19387b97e186fc199b32ecd1694692d7154ca8f1 | CryptoNeverSleeps/core | /src/rpcwallet.cpp | C++ | cpp | 158,987 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php... |
332709c73e4eac96ee20242f3823929dc35581a3 | f59dcfad1f342d5b46f3bbd72021aa5dbe624e77 | KernelPanic-OpenSource/Win2K3_NT_admin | /display/proppage/admin/forestversion.cxx | C++ | cxx | 31,815 | no_license | //+----------------------------------------------------------------------------
//
// Windows NT Directory Service Property Pages
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 2001
//
// File: ForestVersion.cxx
//
// Contents: Dialogs and supporting code for displaying and raising th... |
cf838466726d46ba699a93ddd5922d65c7d21588 | ca8bbe934720082cba1c06c049bfdf81fd0b9b88 | sadrulhc/chromium | /chrome/common/profiler/main_thread_stack_sampling_profiler.cc | C++ | cc | 1,800 | permissive | // Copyright 2019 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/common/profiler/main_thread_stack_sampling_profiler.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/threading/pl... |
0a3adf1295884e72802cbff9832701cf18c74bed | 42099d4e0d2e96c207a8fc9ec71787d58cc6a49b | mavileo/ft_containers-42 | /vector.hpp | C++ | hpp | 18,649 | no_license | #include "stack.hpp"
namespace ft {
template < class T >
class vector_iterator {
public :
typedef T value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef value_type* pointer;
typedef const value_type* const_pointer;
typedef typename std::ptrdi... |
6d85e7a0622086608dd4b0aeb8b1f0ac89f44033 | 88b59d59b4ca4bc89ce551cdf9177584139eb633 | Yinzhao-Huang/riscv-vectorized-benchmark-suite | /_jacobi-2d/src/jacobi-2d.cpp | C++ | cpp | 5,092 | permissive | /**
* This version is stamped on May 10, 2016
*
* Contact:
* Louis-Noel Pouchet <pouchet.ohio-state.edu>
* Tomofumi Yuki <tomofumi.yuki.fr>
*
* Web address: http://polybench.sourceforge.net
*/
/* jacobi-2d.c: this file is part of PolyBench/C */
/*************************************************************... |
3437a8bb771d0ae139814e93b0845e113fdc9703 | 52ba5075da42d3248276fd25009d308d27d7191d | Annovae/artiboard | /Artiboard/artilib/feat_program.cpp | C++ | cpp | 1,443 | no_license | #include "feat_program.h"
#include <stdlib.h>
#include "log.h"
namespace arti {
int name_index = 0; // used for generting new names
string create_sequenced_name() {
return string_from_format("e_%d",name_index++);
}
FeatureProgram::~FeatureProgram() {
FOR_EACH(E, _formulaMap) delete E->second;
FO... |
f36780f36ada2de04ab5c18e54b171307abdd8ff | 8558da41ff494f56cdca61765fa76a683efb4a7d | larcane97/algorhtim_problem_solving_strategies | /0.permutation,combination.cpp | C++ | cpp | 1,129 | no_license | #include <iostream>
#include <vector>
using namespace std;
//#define MAX 5
//int Arr[MAX];
//bool Select[MAX];
//
//
//void Print() {
// for (int i = 0; i < MAX; i++) {
// if (Select[i] == true)
// cout << Arr[i] << " ";
// }
// cout << endl;
//}
//
//
//void DFS(int idx, int cnt) {
// if (cnt == 3) {
// Print();... |
297a48e6afbac5fd340750d37325b45033f24f45 | a2982dc38c0d86014775454a210a8fd295d4a5d5 | SunHoJeong/algorithm | /2023.cpp | C++ | cpp | 837 | no_license | //
// 2023.cpp
// Algorithm_2017
//
// Created by 수노 on 2017. 3. 2..
// Copyright © 2017년 수노. All rights reserved.
//
#include <cstdio>
using namespace std;
const int MAX = 100000000;
bool prime[MAX]; //false면 소수
int n;
void back(int depth, int x){
if(depth == n-1){
printf("%d\n",x);
return;... |
55852c112845a15ac7f0c669cd69249b06efae9d | 4a11ff200c355991b32fe221cf64e1c4c8818987 | riverlike14/Cplusplus_Programming | /Chapter10/10-2/Prob10-2-2.cpp | C++ | cpp | 549 | no_license | #include <iostream>
using namespace std;
class Point
{
private:
int xpos;
int ypos;
public:
Point(int x=0, int y=0)
: xpos(x), ypos(y)
{ }
Point(const Point &pnt)
: xpos(pnt.xpos), ypos(pnt.ypos)
{ }
void ShowPosition() const
{
cout << '[' << xpos << ", " << ypos << ']' << endl;
}
Point operator-()
... |
c7b55eb1fb1d5c2e0a460336f9c70b80ff0315ad | 8fcebd8281a35bc06b8c71ec7de6c4569670d352 | bazelhpc/oneDAL | /cpp/oneapi/dal/algo/decision_forest/detail/infer_ops.cpp | C++ | cpp | 1,958 | permissive | /*******************************************************************************
* Copyright 2020 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.apache.o... |
e83ffcf42bad27d7307c380526b98109f6644be2 | 43e66518f646e5b0d5dd5a2590b5205df5714b06 | SoftwareKiller/ubuntu | /linux/protobuf/opt/protobuf/include/google/protobuf/compiler/csharp/csharp_reflection_class.cc | C++ | cc | 11,439 | no_license | // 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:
... |
274a8f9f4407b479f7a46c4b01d4e35b749199eb | 107df1d15caa0a45f7d5a9bde0551811e29b7fc6 | ghsecuritylab/android_platform_sony_nicki | /external/webkit/Source/WebKit2/Shared/WebPageGroupData.cpp | C++ | cpp | 1,920 | permissive | /*
* Copyright (C) 2010 Apple Inc. 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 list of conditions a... |
2fe8d324a244442a9d0d5d369168a6184be7e4cc | b0287429cd9a8430afcc78cabf8ec8e52e192d02 | chongtianfeiyu/Rose | /apps-src/apps/external/live555/liveMedia/FileSink.cpp | C++ | cpp | 5,443 | permissive | /**********
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
This librar... |
6723d0babfcc3111642d85135e5716de5a808334 | a6fdaafcc61a87fb2dd702efa0df022434a3b7ef | AsmaaSobhyy/Graph-Centrality | /main.cpp | C++ | cpp | 6,536 | no_license |
#include <iostream>
#include <vector>
#include <limits>
#include <queue>
#include <iomanip>
#include <cstdio>
using namespace std;
//----------------------------------------Degree------------------------------------
void Degree(vector<vector<pair<int,int> > > adj_list,int nodes){
//to get degree
for(int i=0... |
5086b2837b1007a8c7a62dca89f8b82f571aa932 | 453be04725bb5be1ee9991982f5a0a94d3658a2a | AlfredoCubitos/notescli | /mnotesnetwork.cpp | C++ | cpp | 3,181 | no_license | #include "mnotesnetwork.h"
#define PATH QString("/index.php/apps/notes/api/v0.2/notes")
MNotesNetwork::MNotesNetwork()
{
MNotesConnect();
}
void MNotesNetwork::initConnect(const QHash<QString,QString> params)
{
account = params;
// qDebug() << params;
MNotesRequestAuth();
}
void MNotesNetwork::MN... |
0f760ef56c480d480d942e5545decbb7163fc436 | c794c6d868f3810318705db26c2cafdd002e6432 | vampcoder/Online-Programmes | /lightoj/graphs/bfs&dfs/1111.cpp | C++ | cpp | 1,540 | no_license | #include<bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi > vvi;
#define pb push_back
vvi g;
int t, k, n, m;
int people[1002];
int c[1002];
int visit[1002];
int bfs(){
for(int i = 1 ;i <= n; i++){
if(people[i] == 1){
memset(visit, 0, sizeof(visit));
q... |
2838334f46243964abd94ef6f2b680b7a7db4d9c | 67d8718e87a3116e63d818b9c6b4a38d8d66a940 | hfinger/pcl | /test/surface/test_concave_hull.cpp | C++ | cpp | 11,438 | permissive | /*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condition... |
5ac69027dce98551c00c3d87c14035c524595e5e | d78f4eb18fc508236d90a5baba12241e0024e1b5 | huwade/hello-opencv | /hello-opencv/test.cpp | C++ | cpp | 5,114 | no_license | // This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html
// https://stackoverflow.com/questions/23506105/extracting-text-opencv?noredirect=1&lq=1
#include "opencv2/core.hpp"
#include... |
b774a4bba7e28deb4d6308deb390a28a5ba1b307 | c3b9e07f0d5c9a470a08f0950f105dc76eff515f | mikhailyumanov/compilers_course_4sem_2020 | /milestone8_blocks/include/visitors/PrintVisitor.cpp | C++ | cpp | 8,094 | no_license | #include "visitors/PrintVisitor.hpp"
#define GO_DOWN GoDown(); if (!as_plugin_) {
#define GO_UP GoUp(); }
PrintVisitor::PrintVisitor(const std::string& filename, bool as_plugin)
: stream_(filename), as_plugin_{as_plugin} {
}
PrintVisitor::PrintVisitor(const std::string& filename)
: PrintVisitor(filename, false)... |
9ead68190933fb63f807249dc151a37e21b08757 | a912384ccf7693ee713f6214219030a20f96743d | Gericom/teak-llvm | /clang/test/CXX/class/class.compare/class.spaceship/p2.cpp | C++ | cpp | 4,336 | permissive | // RUN: %clang_cc1 -std=c++2a -verify %s
namespace std {
class strong_ordering {
int n;
constexpr strong_ordering(int n) : n(n) {}
public:
static const strong_ordering less, equal, greater;
bool operator!=(int) { return n != 0; }
};
constexpr strong_ordering strong_ordering::less{-1},
str... |
be82f4ac1797ccf18be0f8810abd8eac51a248f3 | 61e38aafe00ce206f91f557314762d33f9d69cd6 | dkniffin/virtualscape | /HeroscapeEditor/GameActionView.cpp | C++ | cpp | 4,848 | no_license | // GameActionView.cpp : implementation file
//
#include "StdAfx.h"
#include "GameActionView.h"
#include "GameDoc.h"
#include "HeroscapeEditor.h"
#include "SocketMessageId.h"
IMPLEMENT_DYNCREATE(CGameActionView, CFormView)
// The constructor
//
CGameActionView::CGameActionView()
:
// Call the base class
CFormView(CG... |
22186df651e7a521aa441075001598c0e2e97670 | 2d2962b64d700f036bc19c9689cf3178faddf622 | kmowery/address-leak | /WebKit-r151611/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp | C++ | cpp | 37,961 | no_license | /*
* Copyright (C) 2010, 2012 Apple Inc. 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 list of condit... |
b5bc69faab57cf5c5e24ca4e2de6e4e5f275b4c1 | ac793bb705d62b9f02279cfd79ca86f11cee3850 | yveslox/Genesisras | /practice-code-purple/cpp-programming/srt-insertion-sort2.cpp | C++ | cpp | 618 | no_license | #include<iostream>
using namespace std;
int insertion_sort(int n,int array[])
{
int j;
for(int i = 0;i<n;i++)
{
int temp=array[i];
j = i-1;
while(j>=0 && array[j]>temp)
{
array[j+1]=array[j];
j--;
}
array[j+... |
9e548742396ee3fa2f21dd3c477901cbd36e3565 | 11d41c685b387510e4b1ad3d3f57db41a5aefc19 | stanleywxc/chromium-noupdator | /src/chrome/browser/ui/webui/chromeos/arc_graphics_tracing/arc_graphics_tracing_handler.cc | C++ | cc | 18,174 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/chromeos/arc_graphics_tracing/arc_graphics_tracing_handler.h"
#include <map>
#include <string>
#include "ash/public/cp... |
0510dc28356f7d7d88bf6bb68da23c085831b91b | e51c5935e9eb28fb2ca7f76b4c56725f37ec5219 | youtube/cobalt | /net/spdy/platform/impl/spdy_mem_slice_impl.cc | C++ | cc | 1,158 | permissive | // Copyright 2017 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/spdy/platform/impl/spdy_mem_slice_impl.h"
#include <utility>
namespace spdy {
SpdyMemSliceImpl::SpdyMemSliceImpl() = default;
SpdyMemSli... |
6d720b2c9984b298ef11ea21a12df4f0633a53b8 | 34c37b7fed7d2b68c5c56ab0659db6bdec60f5e8 | ComputerStudyBoard/chromiumos-platform2 | /shill/cellular/modem.cc | C++ | cc | 6,039 | permissive | // Copyright 2018 The Chromium OS 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 "shill/cellular/modem.h"
#include <base/bind.h>
#include <base/strings/stringprintf.h>
#include "shill/cellular/cellular.h"
#include "shill/... |
fbd99679dd13c983869001afe605cdb9bd994a43 | 757189eb607c3a8e570f72134c58e34798537ba6 | metux/chromium-suckless | /chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.cc | C++ | cc | 936 | 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 "chrome/browser/chromeos/login/supervised/supervised_user_creation_controller.h"
namespace chromeos {
// static
const int SupervisedUserCreatio... |
410bfe8792437ad67c3136122ddd189c9f6f7482 | 68546aee8f10a66e93bf1d6d6df6afa7e8b07bd0 | UM-ARM-Lab/Traversability-Based-Contact-Space-Planner | /traversability_cpp_utility/src/Drawing.cpp | C++ | cpp | 12,337 | no_license | #include "Utilities.hpp"
// using namespace OpenRAVE;
DrawingHandler::DrawingHandler(OpenRAVE::EnvironmentBasePtr _penv):penv(_penv)
{
foot_corners.resize(4);
foot_corners[0] = OpenRAVE::RaveVector<OpenRAVE::dReal>(FOOT_HEIGHT/2,FOOT_WIDTH/2,0.01);
foot_corners[1] = OpenRAVE::RaveVector<OpenRAVE::dReal>(-FOOT_HEIG... |
6cf39fd1797f593f35482b247eb5948cfe833d05 | 99c004a7a802b88a58979e8601d298168e9e4621 | Micadurp/Half-Life-4 | /Source/GravityGun/GravityGunComponent.cpp | C++ | cpp | 705 | no_license | // Nicholas De Young 2019
#include "GravityGunComponent.h"
// Sets default values for this component's properties
UGravityGunComponent::UGravityGunComponent()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if ... |
f77837a3679441a044dc7932f8a227641db1482a | 8ce43e81155327855e7e8783c6f4fe108f89499e | OpenCMISS-Dependencies/netgen | /libsrc/csg/csg.hpp | C++ | hpp | 1,017 | no_license | #ifndef FILE_CSG
#define FILE_CSG
/* *************************************************************************/
/* File: geoml.hpp */
/* Author: Joachim Schoeberl */
/* Date: 21. Jun. 98 ... |
d09c45593dca3372f65f37c7fed96972f74d23dc | 8ccb593378ae80ad857fed379f07d78851b270d6 | Kitware/VTK | /Filters/Generic/Testing/Cxx/TestGenericContourFilter.cxx | C++ | cxx | 4,053 | permissive | // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause
// This example demonstrates how to implement a vtkGenericDataSet
// (here vtkBridgeDataSet) and to use vtkGenericDataSetTessellator filter on
// it.
//
// The command line arguments are:
// -I ... |
6ed95427431f9f16387d960bed2620bd34b70bd5 | 239fa3a148d0dab2e23645b6b7f454e0a8d840ae | haydane/C-Year-2 | /simple.cpp | C++ | cpp | 299 | no_license | #include <iostream.h>
#include <string.h>
void swap(int a,int b){
int t;
t=a;
a=b;
b=t;
cout<<a<<"\t"<<b<<endl;
}
void swap(char st1[10],char st2[10]){
char t[10];
strcpy(t,st1);
strcpy(st1,st2);
strcpy(st2,t);
cout<<st1<<"\t"<<st2<<endl;
}
void main(){
swap("A","B");
swap(2,3);
} |
cedbe0aed927bc888002260b8fa0638fb8fe49a8 | af4640860eaf5a4db3cc7d2d829a959ceb808ad1 | dzm2018/rk-deviceio | /DeviceIO/src/linux/InfoLed.cpp | C++ | cpp | 24,577 | no_license | /*
* Copyright (c) 2005-2017 Fuzhou Rockchip Electronics Co.Ltd
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that copyright
* notice and ... |
83ccdc32f4ac070a894c29916bbb43bec3cc916c | 04e1b57c19ffe67018265d2561d685c33cb16652 | favalex/StratoTracker | /mapview.cpp | C++ | cpp | 2,406 | no_license | #include "mapview.h"
#include <QtLocation/QGeoServiceProvider>
#include <QtLocation/QGraphicsGeoMap>
#include <QtLocation/QGeoMappingManager>
#include <QtLocation/QGeoCoordinate>
#include <QtLocation/QGeoMapPolylineObject>
#include "map.h"
#include "marker.h"
#include <QDebug>
QTM_USE_NAMESPACE
namespace
{
boo... |
2312e2e29b8ffa150d7e76f498148b0f487c78bf | 941d40324c37c2b8dc40aa61d46cb52f6c837608 | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/DiskPartitionBasedOnVolume/tests/DiskPartitionBasedOnVolume.Tests/UNIX_DiskPartitionBasedOnVolumeFixture.cpp | C++ | cpp | 3,581 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
a757840e75622a00692040de51de57ffbd459bb4 | 1c61e6dfbb1fcc850545a134f2a40355571a8781 | Maciej-Poleski/PN | /F/filter.cpp | C++ | cpp | 3,557 | no_license | #include <cstdint>
#include <cassert>
#include "filter.h"
typedef float v4f __attribute__((vector_size(16)));
typedef int32_t v4si __attribute__((vector_size(16)));
typedef int16_t v8hi __attribute__((vector_size(16)));
typedef char v16qi __attribute__((vector_size(16)));
typedef char v8qi __attribute__((vector_size(... |
e8eebfd33f0931b99a64672b583eb0e0cb5b417e | 92b48ef902e596f2914dcfa470f1f08a4a23cb5b | stardog-union/boost | /libs/hana/test/set/cnstr.move.cpp | C++ | cpp | 1,718 | permissive | // Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/bool.hpp>
#include <boost/hana/fwd/hash.hpp>
#include <boost/hana/set.hpp>
#include <boost/hana/type.hpp>
#i... |
24c6ff800fa417123a7ca6c4418a9f68c7ffade2 | c6d8fca218dd3407e5c81b1088aa201a51a79a80 | jrl-umi3218/mc_rtc_ros | /mc_rtc_rviz_panel/src/VisualWidget.cpp | C++ | cpp | 4,400 | permissive | #include "VisualWidget.h"
namespace mc_rtc_rviz
{
VisualWidget::VisualWidget(const ClientWidgetParam & params, visualization_msgs::MarkerArray & markers)
: ClientWidget(params), markers_(markers), visible_(visible()), was_visible_(visible_)
{
auto layout = new QHBoxLayout(this);
if(!secret()) { layout->addWidget(... |
1f18d7e079814f50077bc248767f8074d7f65ae1 | a5a18dcce801f73c0e2d04b599b76725634bf8b4 | Taiwei-Sun/mscc-brsdk-source-2019.02.7-232-stage1_servalt_build | /host-cmake-3.8.2/Source/CPack/cmCPackProductBuildGenerator.cxx | C++ | cxx | 8,393 | permissive | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCPackProductBuildGenerator.h"
#include <map>
#include <sstream>
#include <stddef.h>
#include "cmCPackComponentGroup.h"
#include "cmCPackLog.h"
#include "cmGen... |
d61668356c9559a7aeaab486d391e6ab8d1c3b41 | 7efd6f25086fcd2a5006d620e6f97565d98e75e6 | rapyuta-robotics/rclUE | /ThirdParty/ros/include/geometry_msgs/msg/detail/twist_with_covariance_stamped__builder.hpp | C++ | hpp | 1,855 | permissive | // generated from rosidl_generator_cpp/resource/idl__builder.hpp.em
// with input from geometry_msgs:msg/TwistWithCovarianceStamped.idl
// generated code does not contain a copyright notice
#ifndef GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_COVARIANCE_STAMPED__BUILDER_HPP_
#define GEOMETRY_MSGS__MSG__DETAIL__TWIST_WITH_CO... |
51e8c59eb1b3f440924a54aaea65862b45cb1fc5 | e9b092f328b60371a2ec5e5cec9aa4c8a4ed261d | KaSt/emircoin | /src/test/fuzz/script_flags.cpp | C++ | cpp | 2,434 | permissive | // Copyright (c) 2009-2019 The Emircoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <script/interpreter.h>
#include <script/script.h>
#include <streams.h>
#include <version.h>
#include <test/fuzz/fu... |
063383ebc3049d8206817397384bdb9637800c98 | 3737c947b750a60170529ef69a4f6dc7a19a5b9b | haydennix55/chicken_dinner | /chicken_dinner_ui/build-chicken_dinner-Desktop_Qt_5_10_1_clang_64bit-Release/moc_playwindow.cpp | C++ | cpp | 4,803 | permissive | /****************************************************************************
** Meta object code from reading C++ file 'playwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.1)
**
** WARNING! All changes made in this file will be lost!
*********************************************************... |
3bb74f152e5bde10ba4c46a6e976db31e6442a77 | 56bc2e0e31e56d7eeefd8e87a49d5900ca090ad6 | MorrisJobke/Empire | /src/FunctionType.cc | C++ | cc | 3,390 | no_license | /* FunctionType.cc
* @Author: kabum
* @License: GPL
* @Created: 2012-01-18
* @Editor: Sublime Text 2
*/
#include "FunctionType.h"
/////////////////////////////// PUBLIC ///////////////////////////////////////
/*============================= LIFECYCLE ==================================*/
/** ... |
ee14451420ab958c3ee9f021b602e3f6a2af07e9 | 701934a525426ff3789504afe046713c6d0111f3 | owenl19880929/study | /designpattern/6-adapter/objectmode/src/Adapter.cpp | C++ | cpp | 429 | no_license | //
//
// Generated by StarUML(tm) C++ Add-In
//
// @ Project : objectadapter
// @ File Name : Adapter.cpp
// @ Date : 2017/12/14
// @ Author : Owen.Li
//
//
#include <iostream>
#include "Adapter.h"
Adapter::Adapter(Adaptee* _adaptee) {
adaptee = _adaptee;
}
Adapter::~Adapter() {
}
vo... |
4a765dfb5d7082b2345e54015bcc6fd20b8f1f08 | aee21e5032e1e0c2f814139ac09a044e1b212883 | usherfu/zoj | /unpassed/1077.other.cpp | C++ | cpp | 3,518 | no_license | #include <iostream.h>
#include <string.h>
int matching[24][4] = {{0,1,2,3},{0,1,3,2},{0,2,1,3},{0,2,3,1},{0,3,1,2},{0,3,2,1},{1,0,2,3},{1,0,3,2},{1,2,0,3},{1,2,3,0},{1,3,0,2},{1,3,2,0},\
{2,0,1,3},{2,0,3,1},{2,1,0,3},{2,1,3,0},{2,3,0,1},{2,3,1,0},{3,0,1,2},{3,0,2,1},{3,1,2,0},{3,1,0,2},{3,2,0,1}... |
10912e9c1f973747392a515c70117aac744f0b27 | a1bb148aa0f5eb4a668a901f4166d4eed23cbf3f | irods/aws-sdk-cpp | /aws-cpp-sdk-macie2/source/model/OriginType.cpp | C++ | cpp | 1,782 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/macie2/model/OriginType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
na... |
7967743877a2e6eb0ba5b52b57604c022d31ae81 | 67da006ec12afc0b7d9924e4ff4adf7630f3ac5b | ZeusAFK/MikuMikuStudio | /engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionObject.cpp | C++ | cpp | 6,376 | no_license | /*
* Copyright (c) 2009-2010 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of ... |
7f12eee9f057263f180dd5b7b9b157e03524e249 | 1304d08974d2c03901f82aef974fe82b672755a0 | YuanqiH/RenderProject | /RenderProject/lab001/Mesh.hpp | C++ | hpp | 546 | no_license | #ifndef SGE_MESH_HPP
#define SGE_MESH_HPP
#include <iostream>
#include <GL/glew.h>
#include <GL/glu.h>
#include <GL/gl.h>
#include <string.h>
#include <vector>
class Mesh
{
private:
GLuint vbo;
GLuint nbo;
GLuint ibo;
int numVerts;
int numTris;
GLfloat* vboData;
GLfloat* nboData;
u... |
e8d02c52c4e96aa66d48dde5ded925d56ee1d9ab | c6acc13507e2ce8d749ffcbb155c204b1698b5a3 | alibaba/MNN | /source/backend/tensorrt/backend/TRTType.hpp | C++ | hpp | 1,687 | permissive | //
// TRTType.hpp
// MNN
//
// Created by MNN on b'2020/08/10'.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef MNN_TRTType_H
#define MNN_TRTType_H
#include <MNN/MNNDefine.h>
#include <NvInfer.h>
#include <vector>
namespace MNN {
class TRTLogger : public nvinfer1::ILogger {
public:
void log(nvi... |
590d8836109d028dd729618a0dbd91c573df77d8 | 15cbba04cad451b1c87d776c94b1c2ee496d5fb3 | tst-ccamp/earthenterprise | /earth_enterprise/src/fusion/autoingest/tools/genewmapdatabase.cpp | C++ | cpp | 4,798 | permissive | // Copyright 2017 Google Inc.
// Copyright 2018 the Open GEE Contributors
//
// 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
//
// Unles... |
25edd8cb89375f75080afa4bcbb3ef77473f6a31 | 62c1c61dc27924efd1f5429f7d427c2d408871f1 | hiyoung-asr/clDNN | /src/gpu/eltwise_gpu.cpp | C++ | cpp | 9,818 | permissive | /*
// Copyright (c) 2019 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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... |
52d6b616c398bd1446e296eac67c855b1326d583 | 36cf42d045c7074607995788fa6e7aa2ee600f09 | sunzenshen/exercism-submissions | /cpp/beer-song/beer_song_test.cpp | C++ | cpp | 2,175 | no_license | #include "beer_song.h"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
using namespace std;
BOOST_AUTO_TEST_CASE(prints_an_arbitrary_verse)
{
string expected = "8 bottles of beer on the wall, 8 bottles of beer.\n"
"Take one down and pass it around, 7 bottles of beer on the wall.\n";
BOOST... |
5ff3e7277b2d0dcb6c50cef5e6bd115b7f77ae35 | 25eb72f862cd66fa0317649e9aa946953c2be47d | ThePhD/llvm-project | /lldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp | C++ | cpp | 29,745 | permissive | //===-- ABISysV_arm64.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
//
//===---------------------------... |
5e5e0e05ec6147e02979053684fc16684e4dd18f | f233579bf821898ca1288592a8e0e518fd427280 | Ectohex/Learning-C-Plus-Plus | /classes.cpp | C++ | cpp | 350 | no_license | #include <iostream>
class Rectangle {
int width, height;
public:
void set_values (int,int);
int area() {return width*height;}
};
void Rectangle::set_values (int x, int y) {
width = x;
height = y;
}
int main () {
Rectangle rect;
rect.set_values (3,4);
std::cout << "area: " << ... |
9059831e1109d7000ab7955d28257be4716090a4 | 6289583b1093220e6074d1aa154c908795f05e7f | jonathanpchan/SchoolWork | /CS3A/CH13/13-3/13-3/polynomial.cpp | C++ | cpp | 12,740 | no_license | #include "polynomial.h"
#include "node.h"
#include <cstdlib>
#include <iostream>
using namespace std;
polynomial::polynomial()
{
head=NULL;
cursor = NULL;
}
polynomial::~polynomial()
{
}
polynomial operator +(const polynomial &p1, const polynomial &p2)
{
polynomial p3;
node* walker1 = p1.head, *wal... |
a8dfd2f982e54b89ebd93ca1c1575f1f91588505 | cb2821e2c04ae82a20f836f6522eafef22ddb1d9 | joechamm/GamePractice | /Sources/Code/Application/Game/GameTimer.hpp | C++ | hpp | 746 | no_license | #ifndef __GAME_TIMER_HPP__
#define __GAME_TIMER_HPP__
#include "Core/SystemLogic.hpp"
#include "Core/ETTasks.hpp"
#include "Game/ETGame.hpp"
#include "Core/ETPrimitives.hpp"
#include "Core/TimePoint.hpp"
class GameTimer : public SystemLogic,
public ETNode<ETGameUpdateTask>,
public ETNode<ETGameTimer> {
public... |
6cb5aabddce4f7106be0d150420ba683eb5b7052 | 6dcea795d3de0aa5ae45488da734dfa7b7f11855 | imane-jym/gp2 | /pitayaserver/transition/I18nString.cpp | C++ | cpp | 5,029 | no_license | #include "I18nString.h"
#include "Defines.h"
#include <boost/regex.hpp>
#include "Log.h"
#include "Util.h"
std::string I18nTagString::strDefaultLang = "en";
I18nString::~I18nString()
{
}
/* I18nConstString */
I18nConstString::I18nConstString( const std::string& content ):m_content( content )
{
}
I18nStringPtr I18... |
e2beeb9865d8266abeb23866e6b5555ae1890d66 | 8f73968f992410fd1f32c0835138306ad135781e | achyun/MIVisionX | /rocAL/rocAL/source/node_crop.cpp | C++ | cpp | 3,969 | permissive | /*
Copyright (c) 2019 - 2020 Advanced Micro Devices, Inc. All rights reserved.
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, ... |
855cd6b664fcd3db2212a6e16098b5491f6a6ffc | 9117fd8846f676566728d2dd20d337f0149ef710 | prashulstha/Data_Structures_and_Algorithms_CSCI301 | /CSCI 301/Project 6 - Linked List Recursively Concordance/implement.cpp | C++ | cpp | 2,112 | permissive | #include <iostream>
#include <fstream>
#include<cstdlib>
#include <iomanip>
#include <string.h>
#include "llist.h"
using namespace std;
void Concordance::insert(ifstream& in_File)
{ Word fileacc;
//Sending each string cHAR Array to the Insert Function
in_File>>fileacc;
help_insert(first, fileac... |
f8261a82b2057fcf4c55024807761e6ec529b9bc | 38b5ef0bf15fb2f20d85b0ad692b296c93000a0c | Fraukman/TineEngine | /src/Entity.cpp | C++ | cpp | 927 | no_license | //
// Entity.cpp
// TineEngine
//
// Created by Juan Souza on 30/04/20.
// Copyright © 2020 Juan Souza. All rights reserved.
//
#include <iostream>
#include "./Entity.h"
Entity::Entity(EntityManager& manager): manager(manager){
this->isActive = true;
}
Entity::Entity(EntityManager& manager, std::string name, ... |
5cdc284f13c8907e023b9d1eb732d215bac7b917 | 09efb1fd8f7fb26739418086291b6b925abaa1c7 | jssosa10/maratones | /uniandes/a.cpp | C++ | cpp | 669 | no_license | /*
* I won't be broken
* I won't be tortured
* I won't be beaten down
* I have the answer
* I can take the pressure
* I will turn it all around
* Lift me up above this
* The flames and the ashes
* Lift me up and help me to fly away
*/
#include <bits/stdc++.h>
using namespace std;
int n,m;
vector<int> g[50000];... |
2586aa5d4c9e5c9b8eea008e49d558509e2d3ef8 | 7f1b99e7157e6e8a88731b034fd676d72e90d744 | allgreed/esp8266-tts-clock | /test/unit.cpp | C++ | cpp | 1,247 | permissive | #include "../main/business.h"
#include "gtest/gtest.h"
TEST(Time, computeRemainingSleepTime)
{
Timedelta t = computeRemainingSleepTime(Moment(9,0,0));
EXPECT_EQ(t.hours, 24);
EXPECT_EQ(t.minutes, 0);
EXPECT_EQ(t.seconds, 0);
t = computeRemainingSleepTime(Moment(1,0,0));
EXPECT_EQ(t.hours, 8... |
ddd7314468d38b33a1344dd138c73fbfa054de2b | e9acd9673ddb04d3ff7954034a616c1f56b6c0b8 | Xiaojin-Lu/pytorch | /aten/src/ATen/native/Convolution.cpp | C++ | cpp | 44,783 | permissive | #include <ATen/ATen.h>
#include <ATen/Parallel.h>
#include <ATen/native/ConvUtils.h>
#include <ATen/native/cpu/DepthwiseConvKernel.h>
#include <ATen/native/utils/ParamUtils.h>
#include <ATen/native/xnnpack/Engine.h>
#include <ATen/NativeFunctions.h>
#include <c10/util/accumulate.h>
#include <ATen/Config.h>
#include <c... |
1157a114e1c360f5f6586bf68f36478dac06a89e | 6d85cc9cbe14589cccab4ac4fb0e4b26f8963a78 | jsj2008/rhodes | /lib/commonAPI/coreapi/ext/shared/NetworkImpl.cpp | C++ | cpp | 27,672 | permissive | #include "common/RhoPort.h"
#include "INetworkDetect.h"
#include <list>
#if (defined OS_WINCE || defined OS_WP8 || defined(OS_UWP))
#if (defined OS_WINCE)// && !defined(OS_PLATFORM_MOTCE)
#include "../platform/wm/src/ConnectionManager.h"
#endif
#endif
#if (defined OS_ANDROID)
#include "../platform/android/jni/Network... |
9b1dcfd53e74e6336796a80a3c378bd868ed127e | 226f712963ca1e29b571032c9b698cebf85cdfe6 | EstebanFS/Competitive-Programming | /Judges/LeetCode/752. Open the Lock/752.cpp | C++ | cpp | 1,460 | no_license | #define umsi unordered_map<string, int>
#define uss unordered_set<string>
#define SLOTS 4
class Solution {
public:
char rotateUp(char x) {
if(x == '9') return '0';
return x + 1;
}
char rotateDown(char x) {
if(x == '0') return '9';
return x - 1;
}
umsi bfs(u... |
4d37138cc43f66a517940f75ea00c18eee186902 | 061b6fb69b1df7af0e7d4e1c2da73375879c8dc0 | brunolauze/openpegasus-providers | /src/Providers/UNIXProviders/MorePersonInfo/UNIX_MorePersonInfoProvider.cpp | C++ | cpp | 3,384 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
743987daf1a5c466300d3e8391169f00baa79d5f | 7e8c1ebdd71bbf1ecb780d0c72bae1ca93ed93c4 | SinghGaganpreet/IPT | /src/image_conversion_node-old.cpp | C++ | cpp | 3,516 | permissive | #include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "opencv2/core/core.hpp"
#include <iostream>
#include <stdio.h>
#include <ctime>
#include "I... |
826f0ecb5740069fc6a3aadd3f645d9b83e18251 | f6536f037ff679377842abd85a1a154473507576 | hubitor/progs | /sandbox/vtk/plotwidget/HistogramXYPlot.cpp | C++ | cpp | 3,805 | permissive | #include <vtkVersion.h>
#include <vtkSmartPointer.h>
#include <string>
#include <vtkActor.h>
#include <vtkImageAccumulate.h>
#include <vtkImageData.h>
#include <vtkImageExtractComponents.h>
#include <vtkJPEGReader.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkRenderer.h>
#include... |
9dff0845b3a070ea1a022daaaf797dda9c7633ee | eb9856bca034fb65b385e2d09f023a2a72c9872b | qiucontra/qs | /Simulator/action/protocol.cpp | C++ | cpp | 2,194 | no_license | #include "stdafx.h"
#include "protocol.h"
#include "../option.h"
//#define _USE_UDP
Protocol::Protocol(char * pszIp, unsigned int nPort)
{
m_sock.ConnectServer(pszIp, nPort);
}
Protocol::~Protocol()
{
m_sock.Close();
}
int Protocol::SetWorkMode(unsigned int nWorkMode)
{
char buff[64];
SPRINTF(buff, "workmode %d... |
096f09abddc551759e28d3a072265c7092e92f02 | 9e6b86045bbd56dd24cfac5b4c99690c2955aa94 | XiaoFengXiong/epanet-rtx-1.1-public_beta_dhc | /src/SineTimeSeries.cpp | C++ | cpp | 779 | permissive | #ifdef _WIN32
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#include "SineTimeSeries.h"
using namespace RTX;
using namespace std;
SineTimeSeries::SineTimeSeries(double magnitude, time_t period) {
Clock::sharedPointer clock(new Clock(600));
clock->setName("RTX SYNTHETIC 600s");
setClock(clock);
_peri... |
af4912f8eda1b552378d3abda387e4cff30a40ba | 19a5a04ac08af6e75f15d30b71bc72ee473811cc | noise23/Potcoin-pow | /src/checkpoints.cpp | C++ | cpp | 6,624 | permissive | // 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 <boost/assign/list_of.hpp> // for 'map_list_of()'
#include <boost/foreach.hpp>
#include "checkpoints.h"
#include "m... |
ea4ad6618904997208cca2d3863df7b66bd906fb | c569c2eb7f2cab431fc43945850a6de738ad5f46 | sabinzero/various-cpp | /problema 1/main.cpp | C++ | cpp | 210 | no_license | #include <iostream>
using namespace std;
int main()
{
int n=30, k=2, i=1;
while (i<=n/4)
{
cout << k++ << " ";
k=n/k + n%k;
i=i+1;
}
return 0;
}
|
9b309682c0f5a82d7731da5c659b8f6eb841014d | ad74ff0ffa79ed801410f8894ed1de9fbb6220f9 | ConnorZhong/ACM | /Codeforces/CF 1307B.cpp | C++ | cpp | 1,665 | no_license | #include <iostream>
#include <cstdio>
#include <vector>
#include <cstring>
#include <map>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <set>
#include <stack>
#include <queue>
#include <utility>
#include <cassert>
#include <bitset>
#define all(x) (x).begin(),(x).end()
#define SZ(x)... |
775c487a1e5a4e3537061782e9b1adfd4ddad334 | e842c91ff72386f40eb4d9b3c4cb78a0b4729228 | wuhengzhi/chromium-crosswalk | /media/audio/cras/cras_input.cc | C++ | cc | 10,477 | 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 "media/audio/cras/cras_input.h"
#include <math.h>
#include "base/logging.h"
#include "base/macros.h"
#include "base/time/time.h"
#include "... |
531222f5c618855b592177e6753bf9a25b6b4cc6 | 6fedce47dee16be8b4cbd9d81d02b90d1773c4cf | jpleasu/libdft64 | /src/ins_clear_op.cpp | C++ | cpp | 2,325 | no_license | #include "ins_clear_op.h"
#include "ins_helper.h"
namespace {
struct clear_instrumentation : public instrumentation_base<clear_instrumentation> {
template <char code0, size_t sz>
static void HOOK_DECL unary(THREADID tid, typename Tagset<code0>::arg_type op0) {
Tagset<code0> tags0(tid, o... |
81982a4a117150eb533f572890bea4c9e1080812 | 5835861c6b98e87402a06ddd0b71de5e38c1efeb | EstebanFS/Competitive-Programming | /Contests/Intern CCPL Contests/2014/CCPL - May 17/Triple Doubles/triples.cpp | C++ | cpp | 1,016 | no_license | //Esteban Foronda Sierra
using namespace std;
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <vector>
#include <c... |
17c203d3c0695053061a59ae7fcdf2aa32b0149e | 765fb64b28f464d5e5d8f9ee3e302c329ae2af88 | Hicks1523/Asteroids_lab | /Project2/cGame.cpp | C++ | cpp | 8,870 | no_license | /*
==================================================================================
cGame.cpp
==================================================================================
*/
#include "cGame.h"
cGame* cGame::pInstance = NULL;
static cTextureMgr* theTextureMgr = cTextureMgr::getInstance();
/*
=================... |
dd451647ee3265505658d01100818d3db123707d | de81c0e4e7e2f21885297a9b40a61451dd46209f | lenxn/chess | /King.cpp | C++ | cpp | 602 | no_license | #include "King.h"
#include "Game.h"
//------------------------------------------------------------------------------
const std::string King::UTF_SYMBOL = "\u2654";
//------------------------------------------------------------------------------
void King::getAccessibleFields(
Position initial_position,
Field boar... |
6c798df7d418bc5094f48015da7bb02e94d983d5 | 3a4a74943ccca9003cb5dadb590a8f5d71c6f506 | danielZhang0601/family_iOS | /RJSDK/RJSDK/common/rj_base/src/hashtab.cpp | C++ | cpp | 4,508 | no_license | /*
* Implementation of the hash table type.
*
* Author : Stephen Smalley, <sds@epoch.ncsc.mil>
*/
//#include <linux/kernel.h>
//#include <linux/slab.h>
//#include <linux/errno.h>
//#include <linux/sched.h>
#include "util/hashtab.h"
#include "sys/sys_mem.h"
#include <stdlib.h>
#include <errno.h>
#include <assert.h>... |
80eec74a91404620b8179d42797192963aad6e27 | d0e63ded83a95a019a9499bc93557a425a746dfb | UnnamedOrange/Contests | /Source Code/李沿橙 2018-3-27/source/李沿橙/xjz.cpp | C++ | cpp | 2,709 | no_license | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <cassert>
#include <cctype>
#include <climits>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset... |
7cc4a29802be0faee7726992e30fd92b766a04d7 | ddd561567b657af369663eaa7620ee0e88eeac31 | mleonetti/actasp | /src/AspFluent.cpp | C++ | cpp | 3,078 | no_license | #include <actasp/AspFluent.h>
#include <sstream>
#include <cstdlib> //for atoi
using namespace std;
namespace actasp {
AspFluent::AspFluent(const std::string& formula) throw (std::invalid_argument) :
timeStep(),
cachedBase(){
//this used to be nice, but it turned out to be a major bottleneck, s... |
52eb507c903a02ad20d9fed76a0b5fe74c64f954 | 425e50aec1b96c6ed6435b5a3df84a4f5867426f | KDE/libksieve | /src/ksieveui/vacation/vacationscriptextractor.cpp | C++ | cpp | 5,831 | permissive | /*
SPDX-FileCopyrightText: 2013-2023 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "vacationscriptextractor.h"
// TODO: add unittests for VacationDataExtractor
using namespace KSieveUi;
VacationDataExtractor::VacationDataExtractor()
: KSieve::ScriptBuilder()
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.