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 |
|---|---|---|---|---|---|---|---|---|
0c30232a747bfaae0f2191aef265a733f8ae291b | d50cf922b626265777387f8f4eeeb741168409c4 | imace/ElastosRDK5_0 | /Sources/Elastos/LibCore/src/elastos/utility/CPropertyResourceBundle.cpp | C++ | cpp | 3,997 | no_license |
#include "CPropertyResourceBundle.h"
#include "CProperties.h"
#include "CStringWrapper.h"
using Elastos::Core::ICharSequence;
using Elastos::Core::CStringWrapper;
namespace Elastos {
namespace Utility {
//==========================================================
// CPropertyResourceBundle::_Enumeration
//===... |
7a0a5fdb9eb997a2a836b1360171c557b3ae1855 | b7717819b0656dd937e97f8d33b802b12e59b8c5 | eglrp/Algorithm-of-Beauty | /算法之美--2.3.2大整数乘法问题.cpp | C++ | cpp | 928 | no_license | /*!
* \file 算法之美--大整数乘法问题.cpp
*
* \author ranjiewen
* \date 2016/12/04 15:58
*
*
*/
#include <iostream>
using namespace std;
#define SIZE 14
int *multi(int *_num1, int size1, int *_num2, int size2)
{
int *ret=nullptr;
int size = size1 + size2;
ret = new int[size];
memset(ret, 0, sizeof(int)*size);
... |
13ad98737be15eb1ac6e30d19e996d5de77f7381 | dc87c4a2d35b1a9a13ea4a08aeb1e5e096abab76 | sun-yryr/Contest | /abc129/b.cpp | C++ | cpp | 630 | no_license | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <stack>
using namespace std;
#define REP(i, n) for(int (i)=0; (i)<(n); (i)++)
#define OUT(a) cout << (a) << "\n"
#define ll long long
ll MOD = 10e9 + 7;
int main() {
int n;
cin >> n;
in... |
f9a52ed41b14cebef8014cb7bc7098f617ad52ff | 366a14549d2ed08574a062d73e7eca63efc4a08b | Xilinx/Vitis_Libraries | /utils/L1/include/xf_utils_hw/uram_array.hpp | C++ | hpp | 10,166 | permissive | /*
* Copyright 2019 Xilinx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
09d17ed63c6e08ea190189ac92a29c0d74f6f274 | ff15c89f24e24e9bbd4d8676d792f8fe94cc3037 | Naruton94/robot_identification | /QT_code/para_window.cpp | C++ | cpp | 2,045 | no_license | #include "para_window.h"
#include "ui_para_window.h"
#include <QFile>
#include <QDebug>
para_window::para_window(QWidget *parent) :
QWidget(parent),
ui(new Ui::para_window)
{
ui->setupUi(this);
}
para_window::~para_window()
{
delete ui;
}
void para_window:: parameters_read(QString filename)
{
QF... |
3e817bacbc200f3fdda3fdadd274e9574eb76517 | fbfca6e6bb329a771bbbd4d73c8dfa11db4c2fae | farizrahman4u/deeplearning4j | /libnd4j/include/ops/declarable/generic/parity_ops/cross.cpp | C++ | cpp | 1,000 | permissive | //
// @author raver119@gmail.com
//
#include <op_boilerplate.h>
#if NOT_EXCLUDED(OP_cross)
#include <ops/declarable/headers/parity_ops.h>
#include <ops/declarable/helpers/cross.h>
namespace nd4j {
namespace ops {
OP_IMPL(cross, 2, 1, false) {
auto a = INPUT_VARIABLE(0);
auto b = INPUT_VARIABLE(1... |
3b7b2d88d9a331547a7e98ca40c7b01aad8cb2b3 | 8f6006e357335d5f36b0cbf63b1e4eb0f94a8567 | P79N6A/dp | /src/log_server/log_server.cpp | C++ | cpp | 781 | no_license | /**
**/
#include "log_server.h"
#include "util/log.h"
#include "util/func.h"
#include "monitor_api.h"
#include "protocol/src/poseidon_proto.h"
#include "process_log.h"
#include "process_stat.h"
#include "log_server_attr.h"
#include <unistd.h>
#include <algorithm>
#include <string>
#include <iostream>
namespace poseid... |
ea6c7d21bb0e1036f4a1802e52cce3e5bc293e2a | 624d1d375da45dc71183e9a5d8e1d97b700e4ab4 | TseplyaevAF/TrapezoidMethod | /Численное интегрирование/main.cpp | C++ | cpp | 1,871 | no_license | #include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
using namespace std;
float f1(float x) {
return 1 / sqrt(pow(x,2) - 4);
}
float f2(float x) {
return log10(pow(x,2) + 7) / (pow(x,2) - 2);
}
// вторая производная функции f1
float f1_xx(float x) {
return (3 * pow(x, 2) - 5 / 3) / pow((... |
ba1b72f084856cf0545ac4eed6ae4f81bc875722 | c61414e6f7152fe30f7036892fc8b5ac31be8615 | c-ber/cber | /vscode/wg/sdk/UClothingSimulationFactoryNv.hpp | C++ | hpp | 931 | no_license | #pragma once
#include "UClothingSimulationFactory.hpp"
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
namespace PUBGSDK {
struct alignas(1) UClothingSimulationFactoryNv // Size: 0x30
: public UClothingSimulationFactory // Size: 0x30
{
private:
typedef UClothingSimulationFactoryNv t_struct;
typedef ... |
8db0652b3860f6c2cfa81b8bddf4d141fc955e08 | 4fcd8199e437ada90c116e920bd8b964c09f231b | MaxMartST/OOP | /Lw 1/lab1.3 invert/lab1.3 invert/main.cpp | C++ | cpp | 4,135 | no_license | #include <array>
#include <assert.h>
#include <exception>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <optional>
#include <sstream>
#include <stdio.h>
#include <string>
const unsigned int MATRIX_SIZE = 3;
using Matrix = std::array<std::array<double, MATRIX_SIZE>, MATRIX_SIZE>;
std::optional<std... |
7f2876a27bfc7b9acc1bff4f2b39d94fcdba3748 | 5c43afd491a010bc3929ed7e2b629b09df6fe4bd | hnhoangdz/general_ocr | /general_ocr/ops/csrc/parrots/roi_align_rotated_parrots.cpp | C++ | cpp | 5,228 | no_license | // Copyright (c) GeneralOCR. All rights reserved
#include <parrots/compute/aten.hpp>
#include <parrots/extension.hpp>
#include <parrots/foundation/ssattrs.hpp>
#include "roi_align_rotated_pytorch.h"
using namespace parrots;
#ifdef GENERAL_OCR_WITH_CUDA
void roi_align_rotated_forward_cuda_parrots(CudaContext& ctx,
... |
fece3baed10b55cddf142a42a7dbff7f947e0a09 | 4e6fb3f858af1d80624787365dbea1e15266de8b | pfrommerd/Fast-BVH | /BVH.cpp | C++ | cpp | 7,314 | permissive | #include <algorithm>
#include "BVH.h"
#include "Log.h"
#include "Stopwatch.h"
//! Node for storing state information during traversal.
struct BVHTraversal {
uint32_t i; // Node
float mint; // Minimum hit time for this node.
BVHTraversal() { }
BVHTraversal(int _i, float _mint) : i(_i), mint(_mint) { }
};
//! -... |
aa32100e0d0b3311c73d02e3cbce4d17958c12e7 | 5b5e03b64bb6250070c0a3a475b580c965e5e6b8 | Sourav9063/Cpp-All-codes | /programmes codeforces/CardGame.cpp | C++ | cpp | 1,536 | no_license | // Name: https://codeforces.com/problemset/problem/1270/A
#include<bits/stdc++.h>
using namespace std;
#define ll long long int //lld
#define ull unsigned long long int //llu
#define pt cout<<"*"<<"\n";
#define nl cout<<"\n";
#define deb(x) cout << #x << "=" << x << "\n";
#define pb(a) emplac... |
d49f25549cc0076ab254c1b18ecac7caced9b76b | 65d1734b3157888e8f0860fdbefd72548e5faca4 | g0lem/Babel | /Project Babel/Project Babel/common/Combat/Combat.hpp | C++ | hpp | 1,539 | no_license | #ifndef COMBAT_HPP
#define COMBAT_HPP
#define MIN_AQUIRE_DISTANCE 8.0f
class Combat
{
void SetPlayerTarget(Player * player, EnemyManager * enemies);
void PlayerAttack(SplashScreen *sc, SoundManager * sm, Controller * ctrl, GameObject * g_obj, Player * player, EnemyManager *enemies, M... |
c0f40a0fb1f9502ccb87762d33149bc4d416491b | da044f250ddbc55baedd6e545a75c4d6fc29a9d2 | vipproxikea3/Mr.Gimmick | /Mr.Gimmick/Mr.Gimmick/FinalBoss.cpp | C++ | cpp | 23,462 | no_license | #include "FinalBoss.h"
#include "Utils.h"
CFinalBoss::CFinalBoss()
{
nx = -1;
SetState(FINALBOSS_STATE_CAPE);
}
void CFinalBoss::Update(DWORD dt, vector<LPGAMEOBJECT>* coObjects)
{
CGameObject::Update(dt, coObjects);
vx += ax * dt;
vy -= FINALBOSS_GRAVITY * dt;
LimitPosition();
DetectPlayer();
CalculateSpee... |
90bda127879b3ae8d02e11a94cd5c7ddf5770e3d | c9c9aaad89c93d39bf91c859d41195e719dc44de | alvaroprat97/AR-Drone- | /include/arp/Frontend.hpp | C++ | hpp | 2,391 | no_license | /*
* Frontend.hpp
*
* Created on: 8 Dec 2016
* Author: sleutene
*/
#ifndef ARDRONE_PRACTICALS_INCLUDE_ARP_FRONTEND_HPP_
#define ARDRONE_PRACTICALS_INCLUDE_ARP_FRONTEND_HPP_
#include <memory>
#include <vector>
#include <map>
#include <Eigen/Core>
#include <AprilTags/TagDetector.h>
#include <AprilTags/Tag36h... |
1cdd1ec06156766cccd4a7f0fc11fcb38fe00197 | f356ecafc8fd411ebdf07a575c02359f322cf4ac | INTICOIN/INTICOIN_BETA | /src/version.cpp | C++ | cpp | 2,587 | permissive | // Copyright (c) 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 <string>
#include "version.h"
// Name of client reported in the 'version' message. Report the same name
// for both bitco... |
8014e2d9679973223484db12712a277eaf79ee93 | f63775c824abb959e16ee24aa3f9af6e8cecaa86 | abdur-rahman-mbstu/LightOj-Solution | /1294 pos neg sign.cpp | C++ | cpp | 246 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long T,t,i,n,m,ans;
cin>>T;
for(t=1;t<=T;t++)
{
cin>>n>>m;
ans=(n/2)*m;
cout<<"Case "<<t<<": "<<ans<<endl;
}
return 0;
}
|
51e05d3be3adf6b2b4dc39b4bb0a1ebb9df4b190 | 2da9bf9b4993ae19c9270704a402b82963b1bc9b | alokprince/CPP | /DP/LCS/Print_SCS.cpp | C++ | cpp | 1,318 | no_license | #include<bits/stdc++.h>
using namespace std;
string print_SCS(string x,string y,int n,int m){
int t[n+1][m+1];
for(int i = 0 ; i < n+1 ; i++){
for(int j = 0 ; j < m+1; j++){
if(i == 0 || j == 0)
t[i][j] = 0;
}
}
for(int i = 1; i < n +1 ; i++){
for(int j ... |
d0a3e16dd8d390f08dab2e772c442c5f89a72803 | 5b3bcb483e44f01c2ab1d00e11b06759aca9f0e1 | PsymonLi/sw | /nic/apollo/api/impl/apollo/rfc/rfc_utils.hpp | C++ | hpp | 1,097 | no_license | /**
* Copyright (c) 2019 Pensando Systems, Inc.
*
* @file rfc_utils.hpp
*
* @brief RFC library internal helper functions
*/
#if !defined (__RFC_UTILS_HPP__)
#define __RFC_UTILS_HPP__
#include "nic/apollo/api/impl/rfc/rfc.hpp"
#include "nic/apollo/api/impl/rfc/rfc_tree.hpp"
namespace rfc {
/**
* @brief ... |
d95cdc3134f396d559e5774cb89ad03f92b2f0bb | 78189e0616facd200b98b7eaada8a2d47444ff4a | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE401_Memory_Leak/s02/CWE401_Memory_Leak__new_array_int64_t_67a.cpp | C++ | cpp | 3,015 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE401_Memory_Leak__new_array_int64_t_67a.cpp
Label Definition File: CWE401_Memory_Leak__new_array.label.xml
Template File: sources-sinks-67a.tmpl.cpp
*/
/*
* @description
* CWE: 401 Memory Leak
* BadSource: Allocate data using new[]
* GoodSource: Point data t... |
b3e11aed6ae5ccc8b04d01b45ce92b3f52ddf1ec | c0d79d3889bbbf80e6fbae0a6115bc72c37ef746 | XinyanGT/ROSZMPWalker | /src/matahari/adaptedZMP/AtlasKinematics_Extra.cpp | C++ | cpp | 462 | no_license | /**
* @file AtlasKinematics_Extra.cpp
* @brief
*/
#include "AtlasKinematics_Extra.h"
/**
* @function KState
*/
Eigen::Affine3d KState::xform() const {
Eigen::Affine3d xform = Eigen::Affine3d::Identity();
xform.linear() = body_rot.toRotationMatrix();
xform.translation() = body_pos;
return xform;
}
/*... |
5c9642f723e81dceabacc174dcf58d5f37e18bf2 | 1e4107d69e9e87b58c7f63487a9d9e588d3febfa | RakibRayans/Algorithm | /toss.cpp | C++ | cpp | 472 | no_license | #include<iostream>
using namespace std;
int flip( );
int main( void )
{
int s,t,H=0,T=0;
for ( t=1;t<=100;t++){
printf( "%d\n", flip( ));
if (flip( ) == 0)
H++;
else
T++;
}
cout<<"heads was flipped %d times"<<H<<endl;
cout<<"tails was flipped %d times"<<T<<endl;
return 0... |
3e2f840e6e0ec1b5c7e422edd92d04776f925bfe | f1fbcc06c989676878e2352f0feb4ba5656e2946 | kaneki-ken01/playground | /solutions/uri/1150/1150.cpp | C++ | cpp | 270 | permissive | #include <cstdint>
#include <cstdio>
int main() {
int16_t x, s = 0, z, n = 0;
scanf("%d", &x);
while (scanf("%d", &z) && z <= x) {
}
for (int16_t i = x; s <= z; i++) {
s += x++;
n++;
}
printf("%d\n", n);
return 0;
}
|
eb908575cb976a809777a5dd498857c82b80235c | 87081e6c603a655ce451c0301c50ce94977183fd | SREERAGI18/chromium | /chromeos/memory/pressure/system_memory_pressure_evaluator_unittest.cc | C++ | cc | 4,844 | 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 "chromeos/memory/pressure/system_memory_pressure_evaluator.h"
#include <unistd.h>
#include <string>
#include "base/bind.h"
#include "base/files... |
3aea1b6d3959e4811642d11232abbbce14959726 | e0e8f3b04c508a08e9ab1d1fc52eab1151875f61 | mdmuneerhasan/competitive | /hack/finding.cpp | C++ | cpp | 2,573 | no_license | /* This code is submitted by Muneer Hasan
* Computer-scince student ( @ Jamia Millia Islamia : New Delhi)
* Email : md.muneerhasan@gmail.com
* 17:59:20 Wednesday 22-July:2020*/
#include<bits/stdc++.h>
using namespace std;
#define int long long int
#define SF(v) sort(v.begin(),v.end())
#define F ... |
91618add3d6755cfc3cdbcf716a616246d4afaa2 | 6685c9b88650045ce76709ccf90e10364c37fd32 | Sally27/backup_cmtuser_full | /DaVinci_v39r1/Phys/DecayTreeTuple/src/TupleToolVertexCCPippMuMu.cpp | C++ | cpp | 40,377 | no_license | // Include files
// from Gaudi
#include "GaudiKernel/ToolFactory.h"
// local
#include "TupleToolVertexCCPippMuMu.h"
#include <Kernel/GetIDVAlgorithm.h>
#include <Kernel/IDVAlgorithm.h>
#include <Kernel/IDistanceCalculator.h>
#include <Kernel/IVertexFit.h>
#include <Kernel/ILifetimeFitter.h>
#include "Ke... |
8333db712ab7deb91affbdc54e0e4a9d38144d3b | 6c7dee460236c2bb46e903df53deb65beaf00997 | delcypher/llvm | /lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp | C++ | cpp | 80,658 | permissive | //===-- AMDGPUAsmParser.cpp - Parse SI asm to MCInst instructions ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
d6cb150a557d4aa5860b28018a38a9db8687166f | 30dc37111d8963fe66660e77d329fc5dbb6feace | jaiskid/Linklist | /mergesortlink.cpp | C++ | cpp | 1,331 | no_license | #include<bits/stdc++.h>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x): val(x), next(NULL) {}
};
void intail(ListNode*&head, int data) {
if (head == NULL) {
head = new ListNode(data);
return;
}
ListNode*tail = head;
while (tail->next != NULL) {
tail = tail->next;
}
tail-... |
c9867aa94fa02e72491f4b4295bbf8ffe7fe4af5 | c2b214b5e1ee86ef0679729a401edde1440a541f | jiapei100/triSYCL | /include/triSYCL/detail/alignment_helper.hpp | C++ | hpp | 1,112 | permissive | #ifndef TRISYCL_SYCL_DETAIL_ALIGNMENT_HELPER_HPP
#define TRISYCL_SYCL_DETAIL_ALIGNMENT_HELPER_HPP
/** \file
A simple trait to help generate the appropriate alignment data for a
SYCL type when specified appropriately. Currently only used and specialized
for the vec classes which have SYCL spec required ali... |
53290304c915d03cf36837fefe568fd451e015bf | 89eae6e4fa3fe84fad4ce780e128f931e7034fda | IHR57/Competitive-Programming | /Algorithm Source Code/Hash/Single_Polynomial_Hash.cpp | C++ | cpp | 1,451 | no_license | //Date: 28/10/19
#include <bits/stdc++.h>
#define pb push_back
#define mk make_pair
#define ff first
#define ss second
#define PI acos(-1)
#define pi 3.1415926535897932384
#define INF 2147483647
#define EPS 1e-8
#define MOD 1000000007
#define MAX 100005
using namespace std;
typedef long long ll;
typedef pair<int, int>... |
68209fb79363a80a43030e36433653c01ac098c8 | c89ea0c59e9b27de20ccc8106138fca1c9a55ca5 | Aidan79225/Leetcode | /Medium/646. Maximum Length of Pair Chain.cpp | C++ | cpp | 483 | no_license | class Solution {
public:
int findLongestChain(vector<vector<int>>& pairs) {
sort(pairs.begin(), pairs.end(),[&](vector<int> a, vector<int> b){
return a[1] < b[1];
});
int stackT = 0;
for(auto& it : pairs){
if( pairs[stackT][1] <... |
13220c7513d8402ca8123b19b9d2e7841ed0b258 | 91aaf26563b955fd49205163cb8893fccd14b634 | liupengsyk/UTS_NEW | /Framework/UTSMain/RightDlg.cpp | C++ | cpp | 13,236 | no_license | // ControlDlg.cpp : 实现文件
//
#include "stdafx.h"
#include "UTSMain.h"
#include "RightDlg.h"
#include "afxdialogex.h"
#include "MainFrm.h"
const int POINT_SIZE_MESSAGE = 140;
const int POINT_SIZE_SN = 140;
const int POINT_SIZE_ERRORCODE = 140;
#define GET_HEIGHT_BY_POINT_SIZE(x) ((x) / 5)
// CControlDlg 对话框
IMPLEME... |
7b99304f55518d19eebe6d3873ddd14683190c88 | c1c0f281f7f3d2e4f53f23cb86311d959bbba89a | carterjfowler/CSCI_261 | /A9/Assignment9/bubble.cpp | C++ | cpp | 1,383 | no_license | /* CSCI 261 Assignment 9: Multiple Bubble Animation
*
* Author: Carter Fowler
*/
#include "bubble.h"
#include <SFML/Graphics.hpp>
using namespace sf;
Bubble::Bubble() {
_posX = 0;
_posY = 0;
_radius = 30;
_velocityX = 1;
_velocityY = 2;
_color.push_back(255);
_color.push_back(255);
... |
ab53e755304fedcba129f0890a9dbfcc8c5801a0 | 70987f095603be6ceab99749fe651ca02a90b3e9 | chengjunlu/intel-graphics-compiler | /IGC/Compiler/Optimizer/OpenCLPasses/WIFuncs/WIFuncsAnalysis.cpp | C++ | cpp | 7,944 | permissive | /*========================== begin_copyright_notice ============================
Copyright (c) 2000-2021 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, inc... |
183b71df2b0e70fd8502488fd8d5e6cb45193047 | eec8217c6ab98a4804cae598300184f219a9dfa0 | xsy1996/C_algorithm_codes | /ural/1001.cpp | C++ | cpp | 268 | no_license | #include<stdio.h>
#include<stdlib.h>
#include<math.h>
long long a[200001];
int main(){
long long i,n=0;
while(scanf("%I64d",&a[++n])!=EOF);
for(i=n-1;i>=1;i--)
printf("%0.4lf\n",sqrt(a[i]*1.0));
system("pause");
return 0;
}
|
275dda4b16d7dc226d43c5cf64a46a919f567a9c | 57c69a603aca6ac6017439b2f1b222a4e6082eea | clivic/C-code-examples | /_C++ tests and problem solving/try1/try1Doc.cpp | C++ | cpp | 2,515 | permissive |
// try1Doc.cpp : Ctry1Doc 類別的實作
//
#include "stdafx.h"
// SHARED_HANDLERS 可以定義在實作預覽、縮圖和搜尋篩選條件處理常式的
// ATL 專案中,並允許與該專案共用文件程式碼。
#ifndef SHARED_HANDLERS
#include "try1.h"
#endif
#include "try1Doc.h"
#include <propkey.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// Ctry1Doc
IMPLEMENT_DYNCREATE(Ctry1Doc, CDocument)
... |
8e8ac73d2d9af98fc11f1c7c644d3f9c33e31a45 | c025da51ada0ff339a19fa126fd8211492347daf | yogesh1202/ENSC-251-Object-Oriented-Programming | /L8/lab8.cpp | C++ | cpp | 6,767 | no_license | /**
* @file lab8.cpp
* @author YOGESH MUNDHRA
* @Date 20th July 2018
* @version 1.0
* @section This program reads a comma delimited .csv file which contains historic stock info for
* Apple from Yahoo! Finance. It then outputs two files sorted in ascending and descending
* order of the high values. It also displ... |
1c4f88a2654376ecb8653bb7292bb0ed4b70d598 | e8a331b4f50ca962a761c56b3659c98445938c92 | cmbruns/osgpyplusplus | /src/modules/osgSim/generated_code/ShapeAttribute.pypp.cpp | C++ | cpp | 6,444 | no_license | // This file has been generated by Py++.
#include "boost/python.hpp"
#include "wrap_osgSim.h"
#include "ShapeAttribute.pypp.hpp"
namespace bp = boost::python;
void register_ShapeAttribute_class(){
{ //::osgSim::ShapeAttribute
typedef bp::class_< osgSim::ShapeAttribute > ShapeAttribute_exposer_t;
... |
2fb8e71a74dcb3e23726354ca13b14c045d8b1cc | fcb8667c82d13383e285880e00e2ff31890b9de1 | magic-upenn/magic2010 | /common/XMLConfig/XMLConfig.cc | C++ | cc | 27,414 | no_license | //source XMLConfig.cc (gazebo)
#include <assert.h>
#include <float.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <sstream>
#include <libxml/xinclude.h>
#include <libxml/xpointer.h>
#include "GazeboError.hh"
#include "Global.hh"
#include "XMLConfig.hh"
using namespace gazebo;
///////////////... |
b9f5673c4da3a6200a775ab4d4a0bd4b6f74088d | 2117c86572fa120de7ecdbcbfb9df332e3df5de5 | pafh99/XeytanWin32-Async-RAT | /shared/ConcurrentLib/signals/Win32EventSignal.cpp | C++ | cpp | 611 | no_license | #include "stdafx.h"
#include "Win32EventSignal.h"
#include <Windows.h>
#include <string>
Win32EventSignal::Win32EventSignal()
{
hEvent = CreateEventA(NULL, TRUE, FALSE, "Win32EventSignal");
}
Win32EventSignal::Win32EventSignal(const std::string& eventName)
{
hEvent = CreateEventA(NULL, TRUE, FALSE, eventName.c_str... |
7d6f89f5b3c866f643805ef8bbc7eedb3dc28549 | 1bbe3d167cffe34f3c2256fd0fec694f794694d5 | eb163/aargRL | /aargRL/pdcurses/curseutil.cpp | C++ | cpp | 4,876 | no_license | #include "curseutil.h"
void delcstr(char* &cstr)
{//deletes contents of a c-string pointer for working with dynamic memory
if (cstr != nullptr)
{
delete[] cstr;
cstr = nullptr;
}
}
void mvprintitc(int y, int x, int num)
{//converts int to cstring and writes at location passed as argument
/*
int i=0;
double ... |
64a50bb5ad0166732a8e3030a3dc9f237cc0170c | 59c0b2f764c8849489fb35856d999a0d9a781c31 | games-programming-1-master/gp3-coursework-submission-Ruari026 | /EntranceExitRoomFactory.cpp | C++ | cpp | 2,861 | no_license | #include "EntranceExitRoomFactory.h"
// 1 Door Room Prefabs
#include "Room_1Door_Entrance.h"
#include "Room_1DoorExit.h"
// 2 Door Straight Room Prefabs
#include "Room_2DoorStraight_Entrance.h"
#include "Room_2DoorStraight_Exit.h"
// 2 Door Corner Room Prefabs
#include "Room_2DoorCorner_Entrance.h"
#include "Room_2D... |
e45f02b32ae30aa99f84e3a005c568cb6ab11481 | e0510e2ca0d5a9f22b3d30d7d082888033246536 | craigsapp/humextra | /cli/mvspine.cpp | C++ | cpp | 9,099 | no_license | //
// Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu>
// Creation Date: Thu Nov 15 08:55:35 PST 2001
// Last Modified: Thu Nov 15 08:55:40 PST 2001
// Filename: ...sig/examples/all/spinemv.cpp
// Web Address: http://sig.sapp.org/examples/museinfo/humdrum/spinemv.cpp
// Syntax: C++; museinfo
//... |
8e51cd4cf8df96f851705bd2cd7d3fa458c4bbc6 | a1bf5e8fd616fbd2748db70fb05278b45a184669 | bowhan/gclib | /GStr.cpp | C++ | cpp | 37,146 | permissive | //---------------------------------------------------------------------------
#include "GStr.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "GBase.h"
#include <stdarg.h>
#include <errno.h>
//---------------------------------------------------------------------------
GStr::Data GStr::null_data;
... |
c78efef930cdd6eecbb8236467a77cfd02159ba4 | a04f4d462ff1bde6d1143f7cf53c24a0543a5982 | InfinityTheCool/CSCI-2350-Programming-Assignment-5-Team-4 | /CSCI 2350 Programming Assignment 5/TransactionReader.cpp | C++ | cpp | 3,299 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include "Transaction.h"
#include "TransactionList.h"
using namespace std;
TransactionList transactionList;
void processLine(string line)
{
if (line.find(",") < 0)
{
cout << "Error processing transaction: " << line << endl;
return;
}
... |
503cec21755aec5024f139e13e38dc7b70672098 | 925d2a51495b7c4b3c54fd90c4f88a79ec7f06d6 | KqSMea8/sstd_library | /sstd_boost/sstd/boost/qvm/gen/vec_mat_operations4.hpp | C++ | hpp | 6,234 | permissive | //Copyright (c) 2008-2017 Emil Dotchevski and Reverge Studios, Inc.
//Distributed under the Boost Software License, Version 1.0. (See accompanying
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_QVM_187092DA6454CEB1853E6915F8466A4
#define BOOST_QVM_187092DA6454CEB1853E6915F8466A... |
54ac1dceb588fc9cb326f3ab91d68f123da308ce | 2de7daae81bb39a6e845205ca6699e43c796f465 | awesome-security/osquery | /osquery/filesystem/tests/fileops_tests.cpp | C++ | cpp | 8,495 | permissive | /*
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#in... |
873908d1e71c24799bb28c36767306d3a6879249 | e6fe13de9f34a438256b62f4168078dc03d2fbbc | xreic/UCR-CS12 | /Program 07-01/BBoard.cpp | C++ | cpp | 3,520 | no_license | #include "BBoard.h"
#include "User.h"
using namespace std;
BBoard::BBoard(): title(), inFile(), currentUser(0){
userList.clear();
messageList.clear();
}
BBoard::BBoard(const string& title): title(title), inFile(), currentUser(0){
userList.clear();
messageList.clear();
}
BBoard::~BBoard(){
for(unsigned int i = ... |
8152d944e52af49d508bafacc33cc10ed01c7851 | 0a141ca6b5edc5c24e673031d65aec4f55537552 | niuxu18/logTracker-old | /second/download/git/gumtree/git_repos_function_2008_git-2.10.3.cpp | C++ | cpp | 856 | no_license | static int write_pack_data(int bundle_fd, struct rev_info *revs)
{
struct child_process pack_objects = CHILD_PROCESS_INIT;
int i;
argv_array_pushl(&pack_objects.args,
"pack-objects", "--all-progress-implied",
"--stdout", "--thin", "--delta-base-offset",
NULL);
pack_objects.in = -1;
pack_objects.out = ... |
f4fd7344b29ef3bc2da15f4e06cc3b135e14ec4c | a222e88de892a8160a78abeee72ac4d19f693ac2 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/Z6.2+dmb.ld+dmb.ld+dmb.st.c.cbmc.cpp | C++ | cpp | 39,558 | no_license | // Global variabls:
// 4:atom_2_X0_1:1
// 0:vars:3
// 3:atom_1_X0_1:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
#define ADDRSIZE 5
#define LOCALADDRSIZE 3
#define NTHREAD 4
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define m... |
c5e9298bfef048427936718511c2f2670af873cc | 9cabc0f2a906637cb4f9c3858a3936335db38bc9 | mitchute/EnergyPlus | /tst/EnergyPlus/unit/WaterToAirHeatPumpSimple.unit.cc | C++ | cc | 63,531 | permissive | // EnergyPlus, Copyright (c) 1996-2022, The Board of Trustees of the University of Illinois,
// The Regents of the University of California, through Lawrence Berkeley National Laboratory
// (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
// National Laboratory, managed by UT-Batt... |
02b90d24701574a4b2f2886e47e3d83bf3c698c1 | 73dd7e9302833f2c7d991ace409b3635a1cbf233 | SapphireCoreCoin/SAPP | /src/qt/winshutdownmonitor.cpp | C++ | cpp | 2,359 | permissive | // Copyright (c) 2014 The Bitcoin developers
// Copyright (c) 2017 The PIVX developers
// Copyright (c) 2019 The SapphireCore developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "winshutdownmonitor.h"
#if de... |
37a69d42129ececdfece8d99221f9cc83eb63f04 | 00af559c63e3d66e3d676ba667a353b83204e71e | AGistinger/Udemy_Beginning_CPP_Programming | /InheritanceChallenge/InheritianceChallengeSavings.cpp | C++ | cpp | 1,005 | no_license | #include "InheritanceChallengeSavings.h"
Savings_Account::Savings_Account(std::string name, double balance, double int_rate)
:Account{name, balance}, int_rate{int_rate}
{
}
/* *
* Deposit:
* Amount supplied to deposit will be incremented by (amount * int_rate/100)
* and then the updated... |
afbec7a726d3ac5e1053074908e1f5ef9c2bd6d2 | fe221adaf5b335c69a0e9400206717924aa3d417 | inet-framework/oversim | /src/common/cbr/globalViewBuilder/AreaDataContainer.cc | C++ | cc | 314 | no_license | /*
* AreaDataContainer.cc
*
* Created on: 10.08.2010
* Author: user
*/
#include "common/cbr/globalViewBuilder/AreaDataContainer.h"
AreaDataContainer::AreaDataContainer() {
// TODO Auto-generated constructor stub
}
AreaDataContainer::~AreaDataContainer() {
// TODO Auto-generated destructor stub
}
|
b04ccd6b6636a0bc7e8086a5c01134b7d1faa806 | f987ec92a5857ce327d7220a23f65732d93c0a21 | wangxl1029/mb_server_ruteng_demo_v1 | /CommonLib/DataProvider/include/DPProvRoot.hpp | C++ | hpp | 440 | no_license | #pragma once
#include "DPProv.hpp"
class CDPProvRoot :
public CDPProv
{
public:
CDPProvRoot() : m_bDbSwitching(false) {}
virtual ~CDPProvRoot() {}
RESULT Initialize(SmartPointer< CDPDBConnectionPool > spclDBConnectionPool);
public:
SmartPointer< CDPDBConnectionPool > m_spclDBConnectionPool;
C... |
8cb55e5137a9de1e3334bcb9915b567b79e9af29 | fee63482e6e2788cbc053da7d6064f7ffa708d5b | bunsanorg/process | /tests/unix/process.cpp | C++ | cpp | 5,764 | permissive | #define BOOST_TEST_MODULE process
#include <boost/test/unit_test.hpp>
#include <bunsan/test/exec_test.hpp>
#include <bunsan/test/filesystem/read_data.hpp>
#include <bunsan/test/filesystem/tempfile.hpp>
#include <bunsan/test/filesystem/tempfiles.hpp>
#include <bunsan/test/filesystem/write_data.hpp>
#include <bunsan/pr... |
1be7a0bee02ca2189353d2c34113544c3adb3a9e | a45f24ca4cbecd93ce960de39a77c4492d705bec | iridium-browser/iridium-browser | /chrome/browser/dips/dips_browser_signin_detector_unittest.cc | C++ | cc | 10,921 | permissive | // Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/dips/dips_browser_signin_detector.h"
#include <cstddef>
#include <cstring>
#include <memory>
#include <string>
#include "base/allocator/partition_all... |
d14d6c2c661a0fc8305a2e0817d7485d62815193 | fa85f949fe9f093da34dae02e030ac07bc33288b | OrigenesZhang/-1s | /codeforces/NEERC Southern Subregional Qualiication 2017/CF847F.cpp | C++ | cpp | 1,760 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
struct Candidate{
int v, lst, index, state;
bool operator < (const Candidate& rhs) const{
if(v!=rhs.v) return v>rhs.v;
return lst<rhs.lst;
}
}c[110];
inline bool cmp(Candidate c1, Candidate c2){
return c1.index<c2.index;
}
int... |
c3d210be7ea1750c82b61f64aaffc453b7bead85 | 0added0ea2ad67ca5cbdf15a4f06e50bb0cfa38a | Djjojo1217/2021_Winter_CSC_CIS_5 | /Lab/Lab_Assignment_4/TruthTable/main.cpp | C++ | cpp | 2,737 | no_license | /*
* File: main.cpp
* Author: Joseph Ramirez Jr
* Created on January 14, 2021, 10:48 AM
* Purpose: Truth Table
*/
//System Libraries
#include <iostream> //I/O Library
using namespace std;
//User Libraries
//Global Constants
//Math, Science, Universal, Conversions, High Dimensioned Arrays
//Function Protot... |
347a259801740df35dfafa56aee70684381f5306 | 73f9e768f87338860fab1035e895eba8b26381df | Watch-Later/ncbi-cxx-toolkit-public | /src/objtools/align_format/unit_test/vectorscreen_unit_test.cpp | C++ | cpp | 4,484 | no_license | /* $Id$
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act.... |
1e086284d8bdaf27f728f327993362acf23f0a9a | bd0f3bebdd6cbb750bffad80b83195a6d9bdd34f | albertollamas-GII/ED | /PRACTICAS/PRACTICA 3/Practica3/usovd.cpp | C++ | cpp | 1,397 | no_license | #include <iostream>
#include <vector_dinamico.h>
using namespace std;
void cargar_indices(Vector_Dinamico& v)
{
for (int i=0;i<v.size();++i)
v[i]= i;
}
float maximo(const Vector_Dinamico& v)
{
float max;
if (v.size()==0) {
cerr << "Upsss máximo de???? asignamos cero" << endl;
max= 0.0;
}
else {
... |
fbadfd7f0b1675509f72ebfd8b68a84d45d152a6 | 217fd48513b259d6d5d3b398c783ffee12b774d1 | amar1323/Stanford106b | /Assignement_2/RecursionProblems/src/recursionmain.cpp | C++ | cpp | 4,293 | no_license | /**
* By Amar EL OUAZANI
* 106b Stanford assignement Reccursion Training
*/
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <string>
#include "console.h"
#include "filelib.h"
#include "gbufferedimage.h"
#include "gevents.h"
#include "ginteractors.h"
#include "gob... |
9d0f6a1e05105609fc72b01027f326ff0eb110b7 | 358b717eec10de029d747c50212aa1570aa849dd | markusfisch/PieDock | /src/ArgbSurfaceSizeMap.cpp | C++ | cpp | 1,253 | permissive | #include "ArgbSurfaceSizeMap.h"
#include "Resampler.h"
using namespace PieDock;
/**
* Initialize object
*
* @param s - some ARGB surface
*/
ArgbSurfaceSizeMap::ArgbSurfaceSizeMap(const ArgbSurface *s) :
surface(*s) {
}
/**
* Clean up
*/
ArgbSurfaceSizeMap::~ArgbSurfaceSizeMap() {
clear();
}
/**
* Return a ... |
0f1fb9394f27e4af292bd9b873bc749d3c896bff | 6492ea0e9f5873ecfb486d7bffa5790cfbd430b8 | liu-jianhao/leetcode | /code/4.寻找两个有序数组的中位数.cpp | C++ | cpp | 1,019 | no_license | /*
* @lc app=leetcode.cn id=4 lang=cpp
*
* [4] 寻找两个有序数组的中位数
*/
class Solution {
public:
double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) {
int len1 = nums1.size();
int len2 = nums2.size();
if(len1 > len2)
return findMedianSortedArrays(nums2, nums1);
... |
19ecbeb8b58328ffcfdcfe2f16084696904aeae0 | 8c03cffe941804b938afe53d27479ce14a2245f4 | Walli77/llvm-project | /mlir/lib/Dialect/Vector/VectorTransforms.cpp | C++ | cpp | 161,627 | permissive | //===- VectorTransforms.cpp - Conversion within the Vector dialect --------===//
//
// 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
//
//===---------------------------... |
de38fc28131c870f761ad42bd5283e7f544684bf | b517838855c307321ce3b58d2d8632cb42eea1bb | CowPlay/irrgame_player | /src/MacOSX/CIrrDeviceMacOSXold.cpp | C++ | cpp | 48,407 | no_license | // Copyright (C) 2005-2010 Etienne Petitjean
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in Irrlicht.h
#include <objc/message.h>
#if 0
#import <Cocoa/Cocoa.h>
#import <OpenGL/gl.h>
#import <Carbon/Carbon.h>
#include "CIrrDeviceMacOSX.h"
... |
15bd8e863873612d5caad2789ec9421532d2fbd9 | 47bd5a58926f99469e2bd4ea1d36049c21f6ef01 | CMS-LUMI-POG/ZCounting | /ZCountAnalyze/plugins/CountEventAnalyzer.cc | C++ | cc | 2,471 | no_license | #include <iostream>
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Framework/interface/Mak... |
cc5e339715aa0ba4f35e3ee08f037f66c927b97c | cdabca8ce3b9cc7c685c014edd222613bed56198 | jdcloud-bds/bds-bch | /src/core_write.cpp | C++ | cpp | 8,720 | permissive | // Copyright (c) 2009-2016 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 "core_io.h"
#include "dstencode.h"
#include "primitives/transaction.h"
#include "script/script.h"
#include "script/... |
526d7609da1fdf21d47f3678404520dbffbda48c | c375bdfcf19d8daaa9e1ed813a5450b67b32a7ce | kopoden/Common-Storage | /[ded]Akinator/akinator_main.cpp | C++ | cpp | 1,180 | no_license | #include "akinator.h"
int main() {
//=====================================================
FILE* data_base = fopen("data_base.txt", "r");
FILE* logs = fopen("logs.txt", "w");
//===========PREPARATION===============================
fprintf(logs, "===============TREE CREATION=============\n");
node* tr... |
4ebad231e6c57a8d15b4bb032fc2e681ef86f2d4 | 4fa2566e7f693907bd7186c584bad6677da5d1c0 | sukantomondal/cplusplus | /v1/array/remove_duplicate_from_unsorted_array.cpp | C++ | cpp | 690 | no_license | /* Author : Sukanto Mondal */
#include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
void remove_duplicate(vector<int> &arr){
unordered_map<int,bool> temp;
for(int i = 0; i< arr.size(); i++){
if(temp.find(arr[i]) != temp.end()){
}else{
temp[arr[i]]= true;
cout << arr[i] << ... |
ccd9fef0c052d61b731161b53fa6cfecc3ea9b67 | 8bdce34b570595201810438afadc42920b7e078a | stardog-union/boost | /boost/stacktrace/stacktrace_fwd.hpp | C++ | hpp | 859 | permissive | // Copyright Antony Polukhin, 2016-2017.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_STACKTRACE_STACKTRACE_FWD_HPP
#define BOOST_STACKTRACE_STACKTRACE_FWD_HPP
#include <cstddef>
#... |
13c5e3f251e1905b6b45ee41415d026d64239cbf | 690a3e2db2f19b22e7911bb535c4356a12c41342 | ltndch190120/hackerrank | /Project5/Source.cpp | C++ | cpp | 1,132 | no_license | #include <iostream>
#include <stdlib.h>
#include <string>
#include <xstring>
using namespace std;
int main()
{
string s;
getline(cin, s);
int x = s.size() -1;
string b = s.substr(x - 1);
if (b == "PM")
{
for (int i = 0; s[i] != ':'; ++i)
{
if (s[i] < '1' &&s[i+1] <'8')
{
s[i] = s[i] + 1;
... |
adc9c2939bd249a1c284dc9f0fcaf4fb8cd587e0 | c4c509aa2994a06e3bcd885d5529080df10ddfc0 | 911gt3/tensorflow | /tensorflow/core/grappler/costs/op_level_cost_estimator.cc | C++ | cc | 115,992 | permissive |
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... |
a2133a9469555c2760b5d5d10da122df9250d72b | 53c90673a48a4892e5b53d4e4306021d3bb37075 | zzrpsd/Cad_Contest_C | /includes/def/defiDefs.hpp | C++ | hpp | 5,359 | no_license | //*************************************************************************
// Copyright 2012, Cadence Design Systems
//
// This file is part of the Cadence LEF/DEF Open Source Distribution,
// Product Version 5.8.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file excep... |
983d73754bdb0b054876a1f1672bbeb3c22c1444 | 46d89ba47dbf643900b5471963df400d3bb0b4f1 | Pengjq0000000/ICPC | /UESTC 2019 WinterTraning/UESTC 2019 Winter Training #03/M/sol.cpp | C++ | cpp | 358 | no_license | #include<bits/stdc++.h>
#define LL long long
#define MEM(x,y) memset(x,y,sizeof(x))
#define MOD(x) ((x)%mod)
#define mod 1000000007
#define pb push_back
using namespace std;
int main()
{
double n,m,k;
scanf("%lf%lf%lf",&n,&m,&k);
double tmp=min(m,(k-1));
double ans=1.0/k*(tmp+(m-tmp)/(m-tmp+n));
p... |
e9de511ac00ee48bff29ed2232ffc199e167e382 | 2b72c761b85af77bf6b58bfab4164103e26c1d52 | HindrikStegenga/Ascension-Core-DX11 | /Ascension Core/D3D11TexturedDiffuseShaderSet.cpp | C++ | cpp | 3,481 | no_license | #include "D3D11TexturedDiffuseShaderSet.h"
#include <DDSTextureLoader.h>
#include <WICTextureLoader.h>
#include "D3D11RenderSystem.h"
#include "Engine.h"
#define START_SLOT 0
#define NUM_BUFFERS 1
D3D11TexturedDiffuseShaderSet::D3D11TexturedDiffuseShaderSet(wstring fileName) : ps(L"TexturedDiffusePS.cso"), vs(L"Textu... |
a91300117f64aad59a67a6802edce8448162e97f | d07dc1875e402dd1036603a3468210f75d1f1b62 | kazunetakahashi/atcoder | /2017/1106_ABC074/A.cpp | C++ | cpp | 1,030 | permissive | #include <iostream>
#include <iomanip> // << fixed << setprecision(xxx)
#include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ;
#include <vector>
#include <string> // to_string(nnn) // substr(m, n) // stoi(nnn)
#include <complex>
#include <tuple> // get<n>(xxx)
#include <queue>
#include <stack>
#include <... |
66ca1111c1314648173ca68af8fb562824a7a1f4 | 0d3809e432410f134c0d45858977ae6c13400d50 | pablolucas890/PAA-ex10 | /cidade.cpp | C++ | cpp | 10,319 | no_license | // C / C++ program for Dijkstra's
// shortest path algorithm for adjacency
// list representation of graph
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
// A structure to represent a
// node in adjacency list
struct AdjListNode
{
int dest;
int weight;
struct AdjListNode* next;
};
// A str... |
22f14d3ed8fab79b61275f95b2e725fea82cb46b | 6a2fa5714d57046b6eaf4d27661f209abfdb4806 | bigdoods/OpenInfraPlatform | /IfcAlignment/src/OpenInfraPlatform/IfcAlignment/entity/IfcCircleProfileDef.cpp | C++ | cpp | 3,529 | no_license | /*! \verbatim
* \copyright Copyright (c) 2015 Julian Amann. All rights reserved.
* \author Julian Amann <julian.amann@tum.de> (https://www.cms.bgu.tum.de/en/team/amann)
* \brief This file is part of the BlueFramework.
* \endverbatim
*/
#include <sstream>
#include <limits>
#include "OpenInfraPlatform/IfcAlignmen... |
7ce5eff9ad23f3d7d0ca5a7e44f79ddebe51390d | a01803bc00b5a62c2b8e32a695783addcca8cfd4 | PiotrKowandy/Coders_sch | /codeStyles/MozillaStyle.cpp | C++ | cpp | 417 | no_license | #include <iostream>
using namespace std;
int
func(int a)
{
return 0;
}
int
main()
{
int a, b, c;
cout << "Enter value of a: ";
cin >> a;
cout << "Enter value of b: ";
cin >> b;
c = a;
a = b;
b = c;
cout << "After swaping a: " << a << " b: " << b;
return 0;
}
/*
OUTPUT:
Enter value of a: 5
Ent... |
306240774893081637a0fed29f64b635b14d64d9 | 23980bac1883ea05a1e7f59093b8a032e27d1bb2 | alphaprime/nt2 | /modules/core/base/cover/arithmetic/scalar/iround.cpp | C++ | cpp | 1,948 | 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.
// ... |
d5287c5cf1edc38db0b5476161ad3e78a5eebc9a | b9b482b21ee2e36ff92ba07660656d715f8ad552 | apple/swift-libcxx | /test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/destroy.pass.cpp | C++ | cpp | 1,286 | 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
//
//===---------------------------... |
aae90f443678f0511841416beac6198dc8cca65d | dfa7802b01db8532b996a8b0a0aebaa9cee27add | louis925/kaggle-santa-gift-matching-challenge | /max_flow_search/santa_global.cpp | C++ | cpp | 17,933 | no_license | #include <cstdlib>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <cstdio>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include "santa_par.h"
#include "santa_global.h"
using namespace std;
////////// GLOBAL VARIABLES //////////
vector<vec... |
b4928ceb8452e4dce96dfeefa12d64eec531e37f | c549f7ed6436045fec709bf71a850003d6770427 | chenhui-bupt/leetcode | /202206/315.计算右侧小于当前元素的个数.cpp | C++ | cpp | 3,045 | no_license | /**
* 数据结构一:数组
* 算法一:归并排序,O(nlogn)
* 思路一:
* 第一步:我们可以利用归并排序逆序对的方法,统计右边小于该数的个数
* 所以需要从小到大归并,这样才能找到有多少是逆序的,可以仔细想想。
* 第二步:归并完成后将排序结果更新到原数组中,同时更新下标索引(便于下次计算逆序数)
*/
class Solution {
public:
vector<int> tmp_nums;
vector<int> tmp_idx;
vector<int> idx;
vector<int> res;
public:
vector<int> countSmalle... |
cd26255bc330ddd91a2b73a1730368cdda8ccad7 | 6d22a7fc39f4d7ebea41b960eb2c5aa2634fc6e6 | cha63506/chromium-6 | /chrome/browser/autofill/password_autofill_manager.cc | C++ | cc | 3,192 | 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/autofill/password_autofill_manager.h"
#include "chrome/common/autofill_messages.h"
#include "content/public/browser/render_vi... |
f50583436cf5d9deb98d3adac2a04c5fd4141027 | 4c6a748c4e1217ea6492853a8d01a9c3f8094ab6 | ausomely/w2-multiplayer-support | /src/PixelType.cpp | C++ | cpp | 6,391 | no_license | /*
Copyright (c) 2015, Christopher Nitta
All rights reserved.
All source material (source code, images, sounds, etc.) have been provided
to University of California, Davis students of course ECS 160 for educational
purposes. It may not be distributed beyond those enrolled in the course
without ... |
30217f0fb97bd519a6f8985dd84be6cca422bfe8 | 46a5297e32e9c33fb89400750fc99cd36484f851 | alexhein189/code-plagiarism-detector | /data/spb-team-f/sources/107-f-1.cpp | C++ | cpp | 791 | no_license | #pragma comment(linker, "/STACK:10000000000000")
#include <iostream>
#include <fstream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#define problem "gcm"
#define sort stable_sort
#define ll long long
#define INFll 1e18 + 7
#define mp make_pair
#define pb p... |
46ed5994352abe8adb36dac43326d90b7d84e9e0 | d91984d44f3a2dd45ce64da509698814340f00c3 | HarryChow01/cpp11 | /src/test/regix.cpp | C++ | cpp | 4,087 | no_license |
#include <cstdlib>
#include <cstdio>
#include <cstring>
//判断一个正规pattern和str是否匹配
//其中?类似于.,匹配任何字符,只含有*?和普通字符
//http://zhidao.baidu.com/link?url=trAqd4aAMt3BQ9kMkG_J55fZrVwsSUehDfo809m7VyjXOrVlnnPLGJ8rNY0M0aOSgSLVDwFs2GDxpKz5VdYnsK
bool IsMatched(const char* pattern, const char* str);
bool IsStarMatched(int ch, const... |
881d6b343ded2e953dc9be8a073f0b4f3488006b | 576f0061db56fd4b8afc14598f96bbfdc733b8af | ChuangYang/coreclr | /src/vm/vars.hpp | C++ | hpp | 27,304 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// vars.hpp
//
// Global variables
//
#ifndef _VARS_HPP
#define _VARS_HPP
// This will need ifdefs for non-x86 ... |
06b1fbe378f8667af179b1d2130a6e5b1d1c533b | 031d047fbcaa514a51d75ac45ddad764644fdd98 | rtlopez/arduino-mjx-f645 | /MjxController.cpp | C++ | cpp | 5,602 | no_license | #include "MjxController.h"
float mapFloat(float x, float in_min, float in_max, float out_min, float out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
/*
int multiMap(int val, const int* _in, const int* _out, uint8_t size)
{
// take care the value is within range
val = constrai... |
6e9da11a317c7de53605bc5cae4a59c125519ccd | 2ce69d0bd6c319eb70d6100fc3549eff5f4b26c7 | mjcarl/Algorithms | /递归_回溯_动态规划/最小编辑代价.cpp | C++ | cpp | 1,003 | no_license | #include <iostream>
#include<vector>
#include<string>
using namespace std;
int min(int a, int b, int c);
int main()
{
string str1, str2;
cout << "输入两个字符串:" << endl;
cin >> str1 >> str2;
int M, N, i, j, maxLen = 0;
M = str1.size();
N = str2.size();
vector<vector<int>>dp(M+1); //dp[i][j]表示str1[i]与str2[j]当作公共子串最... |
217c657ee733b1b75041c58347c5d7b2ef10edfa | 630b5fdccdf59de31dfb590ea52f6f2cb716fc25 | wlc10086/DataStructure | /ch02-linearList/staticLinkList/main.cpp | C++ | cpp | 207 | no_license | #include "StaticLinkList.h"
int main()
{
StaticLinkList L;
InitList(L);
ListInsert(L, 1, 'A');
ListInsert(L, 2, 'B');
ListTraverse(L, printElem);
ListInsert(L, 1, 'C');
ListTraverse(L, printElem);
} |
da5e61a95f8c1471fb75cb6aba4c20704cf217e1 | b47aa1e73f4883b95511761c4a56f455cdfd7f4c | ChuxiongMa/TextAdventure | /include/ui/FormHelper.hpp | C++ | hpp | 2,593 | no_license | #ifndef FORM_HELPER_H
#define FORM_HELPER_H
#include <string>
#include <vector>
#include <assert.h>
#include <functional>
#include <deque>
#include <form.h>
#include <ncurses.h>
#include <uvpp/GlobalLoop.hpp>
#include "FormField.hpp"
#include "FormLabel.hpp"
namespace textadventure {
class FormHelper {
public:
... |
35c40e7939324a49b37a8805bf5721d7db9f78ef | 8bbc98b019cbbf61ef1430c7304e050435901754 | quinsmpang/foundations.github.com | /build/pc/ACDK_4_14_0/acdk/acdk_core/src/acdk/io/ConsoleWriter.cpp | C++ | cpp | 2,797 | no_license | // -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
//
// Copyright (C) 2000-2005 by Roger Rene Kommer / artefaktur, Kassel, Germany.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public License (LGPL).
//
//
// Th... |
a8e66f8f56e049e163368acb8a0fb2872653cc7c | d0fbf9d4db77178cce8ec67af6d5e7d49fced4aa | sethrj/swig-fortran-dev | /generated/stdstrFORTRAN_wrap.cxx | C++ | cxx | 7,952 | no_license | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.0
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do... |
fb1efba36c98b65a0e309247401e0a87df425942 | 0287dde867e02b328701331cefeb1d38acf7da70 | karayuumac/atcoder-archive | /atcoder.jp/abc107/abc107_a/Main.cpp | C++ | cpp | 386 | no_license | #include <bits/stdc++.h>
#define copy(from, to) copy(from.begin(), from.end(), back_inserter(to));
#define sort(a) sort(a.begin(), a.end())
typedef long long ll;
using namespace std;
template<class T>
void load(vector<T> &v, int n) {
for (int i = 0; i < n; ++i) {
T t;
cin >> t;
v.push_back(t);
}
}
i... |
2c699ce6555928093c72256da16ab7e1236805a9 | b98aa0d1176f9c82c2f6d9a66e27b7d82c02e5be | KevinMuyaoGuo/PAT_levelB | /1078.cpp | C++ | cpp | 2,087 | no_license | /*
*文本压缩有很多种方法,这里我们只考虑最简单的一种:把由相同字符组成的一个连续的片段用这个字符和片段中含有这个字符的个数来表示。例如 ccccc 就用 5c 来表示。如果字符没有重复,就原样输出。例如 aba 压缩后仍然是 aba。
解压方法就是反过来,把形如 5c 这样的表示恢复为 ccccc。
本题需要你根据压缩或解压的要求,对给定字符串进行处理。这里我们简单地假设原始字符串是完全由英文字母和空格组成的非空字符串。
输入格式:
输入第一行给出一个字符,如果是 C 就表示下面的字符串需要被压缩;如果是 D 就表示下面的字符串需要被解压。第二行给出需要被压缩或解压的不超过 1000 个字符的字符串,以回车结尾。题目保证... |
8aa0c91af64e9d388e1a470b4d6ec87ac8f8649f | 8397960c957ec4d12fee2d55871bd0d1a692424e | OVlasiuk/RieszEnergyOptimization | /L-BFGS_parallel.cpp | C++ | cpp | 9,992 | no_license | // TODO add multiprecision arithmetic with either https://gmplib.org/, or http://www.mpfr.org/
// TODO use an autodifferentiation library like CppAD, http://www.coin-or.org/CppAD/
//
//
//
#include <fstream>
#include <Eigen/Dense>
#include <Eigen/Core>
#include <iostream>
#include <iomanip>
#include "meta.h"
#include "... |
5e1419836dbf4db727652a4f9edecd930f486787 | 2e67c82cf44a84de4f11ab63ae0a7cbb79a485b7 | joshfernandez/cmpt373_combatgame | /src/game-model/protocols/DisplayMessage.cpp | C++ | cpp | 949 | no_license | #include <glog/logging.h>
#include "game/protocols/DisplayMessage.hpp"
namespace protocols
{
const std::string MESSAGE_KEY = "msg";
const std::string SENDER_KEY = "sender";
ResponseMessage createDisplayResponseMessage(const DisplayMessage& message)
{
YAML::Node data;
data[MESSAGE_KEY] = message.message;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.