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 |
|---|---|---|---|---|---|---|---|---|
21c7002d436041875b9e6a8dda8167969c2ff312 | be4e8846157135b9bf5822d9d78e4987aa4aa0d2 | fschmidt/C--4J | /Haushaltsbuch-build-desktop-Desktop_Qt_4_8_0_for_GCC__Qt_SDK__Debug/moc_deletecategorydialog.cpp | C++ | cpp | 3,000 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'deletecategorydialog.h'
**
** Created: Tue Jul 10 12:28:24 2012
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.0)
**
** WARNING! All changes made in this file will be lost!
**************... |
3c2232bca3a4b88f9753466a2fb1931500ee83e1 | 223de8e016ac62ea2233edb4419d57e4d33f552d | kylegalloway/lrose-core | /codebase/libs/Mdv/src/Mdvx/Mdvx_xml.cc | C++ | cc | 60,998 | permissive | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... |
b95671ab6f75fb08ead0bbd5cec4565982fa18aa | 80a40287fd9cd29f02cfd32e2016a41a437987d1 | amdj/tasmet | /src/duct/cell/cell.cpp | C++ | cpp | 8,718 | no_license | #include "duct.h"
#include "cell.h"
#include "geom.h"
#include "globalconf.h"
#include "jacobian.h"
#include "weightfactors.h"
#include "energy.h"
#include "solidenergy.h"
#include "utils.h"
#define Ns (gc->Ns())
namespace duct{
using tasystem::var;
using tasystem::Jacobian;
Cell::Cell(us i,const Duct& duct):
... |
43461abefcc749da6221f456b82c307bb2e39090 | 3063abdfcc1f00e928a099c914d4ad8263d08384 | duanbing/WAVM | /Lib/Platform/POSIX/Diagnostics.cpp | C++ | cpp | 3,634 | permissive | #include <cxxabi.h>
#include <dlfcn.h>
#include <cstdio>
#include <string>
#include "POSIXPrivate.h"
#include "WAVM/Inline/Assert.h"
#include "WAVM/Inline/Lock.h"
#include "WAVM/Platform/Diagnostics.h"
#include "WAVM/Platform/Mutex.h"
#if WAVM_ENABLE_RUNTIME
#define UNW_LOCAL_ONLY
#include "libunwind.h"
#endif
using... |
839a0287eb538ca28d5ec629f28c2da2aecfc1a1 | dc51adbf6f0eb63a852a51bcf585c9536afc5f2e | ADozois/GPA789_Lab1 | /XtractL/XtractL/tools/FiniteStateMachine.cpp | C++ | cpp | 5,257 | no_license | #include "FiniteStateMachine.h"
#include <algorithm>
#include <stdexcept>
#include "State.h"
#include "Transition.h"
//#include "BehavioralState.h"
//#include "BehavioralTransition.h"
//#include "TransitionOStream.h"
string FiniteStateMachine::mNoStateName{ "-no current state-" };
FiniteStateMachine::FiniteState... |
420ed25f0bbbab0c37c119fbfbf4aeb92c8c9fca | 5af41b50e2292a294df2d2408901116245796d0a | CharlesE-233/aliyun-openapi-cpp-sdk | /r-kvstore/src/model/ModifyInstanceAttributeRequest.cc | C++ | cc | 3,500 | permissive | /*
* Copyright 2009-2017 Alibaba Cloud 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... |
970c9fe108fecd30802d73d679afd10ff4dcb6c1 | 8d06e77a4a15e22590f903b274945bf35a69904d | lsaca05/Gpufit | /Gpufit/gpufit.cpp | C++ | cpp | 6,659 | permissive | #include "gpufit.h"
#include "interface.h"
#include <string>
std::string last_error ;
int gpufit
(
std::size_t n_fits,
std::size_t n_points,
REAL * data,
REAL * weights,
int model_id,
REAL * initial_parameters,
REAL tolerance,
int max_n_iterations,
int * parameters_to_fit,
int... |
4655fbcc6a338ab1c781a9111cd29454f9264283 | c2ec6b1698fc07bfe6fdf9f5b0147fec180b3f80 | bkahlert/seqan-research | /raw/pmsb13/pmsb13-data-20130530/sources/6ndbc4zuiueuaiyv/2013-04-12T10-22-57.148+0200/sandbox/my_sandbox/apps/graphs_a2/graphs_a2.cpp | C++ | cpp | 875 | permissive | #include <iostream>
#include <seqan/graph_types.h>
#include <seqan/graph_algorithms.h>
#include <seqan/basic/basic_logvalue.h>
using namespace seqan;
using namespace std;
int main ()
{
typedef unsigned int TCargo;
typedef unsigned int TSpec;
typedef Graph<Directed<TCargo, TSpec> > TGraph;
typedef Verte... |
9c0814ad5df164bd7a81750601f0cff51ff5e301 | 756b638d1db6fbbec9754e25d9a3b23e2120a829 | sunshadown/Ashes | /source/Ashes/Gl4Renderer/Src/Image/GlTexture.cpp | C++ | cpp | 3,175 | permissive | #include "Image/GlTexture.hpp"
#include "Command/GlCommandBuffer.hpp"
#include "Core/GlDevice.hpp"
#include "Image/GlTextureView.hpp"
#include "Miscellaneous/GlDeviceMemory.hpp"
#include "Sync/GlImageMemoryBarrier.hpp"
#ifdef max
# undef max
# undef min
#endif
namespace gl_renderer
{
namespace
{
GlTextureType co... |
8cc3968efc07aa918c9c1e58d00c9070cc673f97 | e4e94425227f07e3231e733cd8eb82eabdd4c4da | hbliu80/Smilei | /src/ElectroMagn/ElectroMagn1D.cpp | C++ | cpp | 30,681 | no_license | #include "ElectroMagn1D.h"
#include <cmath>
#include <sstream>
#include <string>
#include <iostream>
#include "Params.h"
#include "Field1D.h"
#include "Patch.h"
#include "Profile.h"
#include "MF_Solver1D_Yee.h"
#include "ElectroMagnBC.h"
using namespace std;
// -------------------------------------------------... |
79e1837d639279b93425360cee7175460cdef7f0 | 6f49c7c0bcef738752a4de9134cc21ad00c950fd | ric2b/Vivaldi-browser | /chromium/ash/services/device_sync/cryptauth_key_creator_impl.cc | C++ | cc | 8,618 | permissive | // Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/services/device_sync/cryptauth_key_creator_impl.h"
#include "ash/services/device_sync/cryptauth_enrollment_constants.h"
#include "ash/services/device_sync/proto/... |
1fb7417b6194270c948f111e89b07ab5e5a6d020 | b3b290e5b918e8ab3f3fb74726d08fb7d2bd3530 | diepquynh/android_hardware_sprd | /hwcomposer/sc8830/SprdUtil.cpp | C++ | cpp | 91,600 | no_license | /*
* Copyright (C) 2010 The Android Open Source Project
*
* 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 app... |
85e06321034ae4863313f722e17ab04a832bd537 | f9674da47063e93e401a11a922f731606f2e2200 | semrich/ds302_20 | /challenge02/solution.cpp | C++ | cpp | 346 | no_license | // Challenge 02: Closest Numbers
// Name: xxxxx
// Brief description:
// This code solves yyyy based on the following idea/implementation...
#include <algorithm>
#include <climits>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
// Main Execution
int main(int argc, char *argv[]) {
... |
6de68b7b76d78f11bc27738f16ed757f0b00e52d | d2b005d5a989dade1818130dd52ab201a45d202a | rgarnov/openvino | /inference-engine/src/low_precision_transformations/src/transformation_context.cpp | C++ | cpp | 994 | permissive | // Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "low_precision_transformations/transformation_context.hpp"
#include "details/ie_cnn_network_iterator.hpp"
using namespace InferenceEngine;
using namespace InferenceEngine::details;
TransformationContext::TransformationCo... |
82d450a7ceec80f75cd020fada27b115f5bc4553 | 734a2769d11f7af1749a46e16c30a78ce2df7a1b | timshen91/llvm-project | /libcxxabi/test/test_fallback_malloc.pass.cpp | C++ | cpp | 5,844 | permissive | //===--------------------- test_fallback_malloc.cpp -----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... |
c80a2c790bd0a96b13464afdff3a447111d90d0d | f885470b055135b85439a2a208b595279d07a341 | w34538y/MFC | /20151654P3_2/20151654P3_2View.cpp | C++ | cpp | 6,089 | no_license |
// 20151654P3_2View.cpp : CMy20151654P3_2View 클래스의 구현
//
#include "stdafx.h"
// SHARED_HANDLERS는 미리 보기, 축소판 그림 및 검색 필터 처리기를 구현하는 ATL 프로젝트에서 정의할 수 있으며
// 해당 프로젝트와 문서 코드를 공유하도록 해 줍니다.
#ifndef SHARED_HANDLERS
#include "20151654P3_2.h"
#endif
#include "20151654P3_2Doc.h"
#include "20151654P3_2View.h"
#ifd... |
5ff73810ba149a895fa1051bcc046519fb93a675 | 38853fe52eb265ac437e23d2fd6d3d413d01d1bf | chuqiuhan/UECS | /src/core/Chunk.cpp | C++ | cpp | 989 | permissive | #pragma once
#include <UECS/detail/Chunk.h>
using namespace Ubpa;
using namespace std;
Chunk::Layout Chunk::GenLayout(const vector<size_t>& alignments, const vector<size_t>& sizes) noexcept {
Layout layout;
// alignment isn't sorted
struct Item {
size_t alignment;
size_t idx;
bool operator<(const Item& y)c... |
449e358b744948d38b8d32822e8e3c786155b9e1 | fe12165841b0732f31d6f1b6e91fcbcd740b52cc | adrigm/RAGE | /src/RAGE/Core/tmx/TmxTileset.cpp | C++ | cpp | 3,705 | no_license | //-----------------------------------------------------------------------------
// TmxTileset.cpp
//
// Copyright (c) 2010-2013, Tamir Atias
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// ... |
32f6be2e51e25c9878e19e7e1d1614b17f4e692d | ad9b2a22ead6088900e3c216c5fadda28a636eba | amartin11/robot-code-public | /third_party/wpilibsuite/allwpilib/hal/src/main/native/sim/Compressor.cpp | C++ | cpp | 3,920 | permissive | /*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
56f95e8a9ea6dad611900d23f3562095954ec40c | 3d75eda7d7c336595fae5c8f01df6cc3f265c076 | oamates/clientmy | /pc-client/classroom-stu_mini_2nd/videovoice/externalcallchanncel.cpp | C++ | cpp | 5,475 | no_license | #include "externalcallchanncel.h"
#include "debuglog.h"
ExternalCallChanncel::ExternalCallChanncel(QObject *parent): QObject(parent)
{
connect(AudioVideoManager::getInstance(), SIGNAL(sigAudioVolumeIndication(unsigned int, int)), this, SIGNAL(sigAudioVolumeIndication(unsigned int, int)));
connect(AudioVideoMa... |
4ba35677defb174e8ef02140e33bafd34bd188d8 | bcecc68f2eac88826701fe712bd675fa98d048e7 | razureladrien/flow_cytometry_analyser | /custompointselection.cpp | C++ | cpp | 9,248 | no_license | #include "custompointselection.h"
CustomPointSelection::CustomPointSelection()
{
}
CustomPointSelection::~CustomPointSelection()
{
}
QVector<QVector<double> > CustomPointSelection::getVerteces()
{
QVector<QVector<double>> verteces;
verteces.append(verteces_x);
verteces.append(verteces_y);
return ve... |
a0daa3a2dafe5c4ab5ef9fcf22aaa86c5dbfe94c | 4029feb23a888f406bd8fea620013cabbac1595e | liulihuogyh/osgall | /prebuild/gdal-svn-cmake4gdal/ogr/ogrsf_frmts/geojson/ogrgeojsonutils.cpp | C++ | cpp | 10,165 | permissive | /******************************************************************************
* $Id$
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Implementation of private utilities used within OGR GeoJSON Driver.
* Author: Mateusz Loskot, mateusz@loskot.net
*
**********************************... |
1a5b8c66ec01efbe562c45a2aabe3003399666c8 | fbb555eb233012af30fc854e7ecd24e25f76b17f | zyex1108/OPS | /apps/c/CloverLeaf_3D/OpenACC/flux_calc_kernelx_openacc_kernel.cpp | C++ | cpp | 8,476 | no_license | //
// auto-generated by ops.py
//
#include "./OpenACC/clover_leaf_common.h"
#define OPS_GPU
extern int xdim0_flux_calc_kernelx;
int xdim0_flux_calc_kernelx_h = -1;
extern int ydim0_flux_calc_kernelx;
int ydim0_flux_calc_kernelx_h = -1;
extern int xdim1_flux_calc_kernelx;
int xdim1_flux_calc_kernelx_h = -1;
extern int... |
fcb3e4154375f77c07ada0080837a71bcd998296 | ec928b1927b0bcd4121384383c79623e8961d58b | mulder93/shooting | /Classes/game/Bullet.hpp | C++ | hpp | 384 | no_license | //
// Bullet.hpp
// shooting
//
// Created by Boris Tsarev on 05/09/2018.
//
#pragma once
#include "PhysicsBody.hpp"
class Bullet : public PhysicsBody
{
public:
CREATE_FUNC(Bullet);
bool init() override;
~Bullet();
void update(float delta) override;
cocos2d::Rect getCollisionBox() const over... |
bfde512757db7e6ee6f9e2de3fb823022dcf621f | 3deb00517ff50dcf14953238b7f36bbe352e931e | Stary2001/godot | /servers/physics_2d/collision_solver_2d_sat.cpp | C++ | cpp | 47,546 | permissive | /**************************************************************************/
/* collision_solver_2d_sat.cpp */
/**************************************************************************/
/* This file is part of: */
/* ... |
a5ca1aa12c03164b6c6b4ae8860c449895f0e0cb | 8093e8cc3a0afd7ec902df6652f996580ea5aed3 | eriser/linAnil | /main.cpp | C++ | cpp | 676 | no_license | #include <windows.h>
#include <mmsystem.h>
#include "Stage.hpp"
Stage *stage = nullptr;
#include "test/Test.hpp"
void onInitContext(void *e) {
App()._().init();
stage = new Stage();
App()._().initAterStage();
ImageLoader()._().setContext(VG_CONTEXT);
_app.onTestProject(nullptr);
testMain();
}... |
b6187421185c3fb6f4738bc33c9b96582bbe1939 | 2c833d8d9a4a4371bdea780ebe63eb9d2e9dd527 | ElliotAlexander/EDSAC-disassembler | /InstructionHandler.cpp | C++ | cpp | 783 | no_license | #include "headers/InstructionHandler.h"
using namespace std;
StructuredInstruction InstructionHandler::parseInstruction(string str_in) {
if(str_in.length() > 35 || str_in.length() < 17){
cout << ((str_in.length() > 35) ?
("\nWarning: Input line:\n\t" + str_in + "\nIs too long, and will be ignored.\n"... |
906768b092e37196bb33f9b8be2cb620be3e908f | 955d71aec6984d8f9c4ba4a8f0525ca35caa899e | robertaramar/pedalboard | /ProgramChangeButton.hpp | C++ | hpp | 994 | permissive | /**
* Implementation of a ProgramChangeButton that knows how to switch on/off the
* drumtrack on the KRONOS.
*
* Author: robert.schneider@aramar.de
*/
#pragma once
#include "PedalBoard.h"
#include "PedalButton.hpp"
enum ProgramChangeMode { ProgramUp, ProgramDown, ProgramNumber };
class ProgramChangeButton : pub... |
c15498fc8851d2a51831ecc92298fed951422b39 | 9773d6e32cc2ab59b92153f97d4e516076e85dfe | ftimyo/ClassicalAlgoCC | /LongestCommonSubsequenceDP.cc | C++ | cc | 3,228 | no_license | /*
* Define subsequence
* Given a sequence X = <x₁,x₂,...,xₘ>, another sequence
* Z = <z₁,z₂,...,zₖ> is a subsequence of X if there exists a
* strictly increasing sequence <i₁,i₂,...,iₖ> of indices of X
* such that for all j = 1,2,...,k, we have X[iⱼ]= zⱼ.
*
* Define common subsequence
* Given two sequences X a... |
f208b9d1ff246be21650a17c224004fe0b8a8cc1 | d474960eef21b1418a5a8a39a25d25cb5e13537e | en30/online-judge | /atcoder/abc080_b.cpp | C++ | cpp | 371 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, N) for (int i = 0; i < (int)N; i++)
#define all(a) (a).begin(), (a).end()
int N;
int f(int x) {
if(x < 10) return x;
return x % 10 + f(x/10);
}
bool harshad(int x) {
return x % f(x) == 0;
}
int main () {
cin >> N;
cout << ... |
baa5ac100961fc70826bf74e85ff57f87ff0db87 | f2e98a15d53b311ee996bf34113186debf6d6a5f | katoun/kg_engine | /Engine/src/core/Log.cpp | C++ | cpp | 2,515 | permissive | /*
-----------------------------------------------------------------------------
KG game engine (http://katoun.github.com/kg_engine) is made available under the MIT License.
Copyright (c) 2006-2013 Catalin Alexandru Nastase
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software ... |
7736725b05857ec3edb73396bb5ac0088f000285 | 729c5bc85d42296cdf4c0ae3e2dca72c7a187ce6 | arowwne/TesraSupernet | /src/script/sigcache.cpp | C++ | cpp | 2,245 | permissive |
#include "sigcache.h"
#include "pubkey.h"
#include "random.h"
#include "uint256.h"
#include "util.h"
#include <boost/thread.hpp>
#include <boost/tuple/tuple_comparison.hpp>
namespace {
/**
* Valid signature cache, to avoid doing expensive ECDSA signature checking
* twice for every transaction (once when acce... |
7b8358b71dda776338a33a1d798e29c777d2a0d1 | 282e92216ea4a58e01caee35ab888b0f0a3161f7 | IFRN-SC/baymax | /Baymax/Calibracao.cpp | C++ | cpp | 5,251 | no_license | #include "Calibracao.h"
#include <Arduino.h>
void Calibracao::tempo(){
Serial.println(F("Pressione C para calibrar"));
Serial.println(F("Espere para não calibrar"));
while(!Serial.available()){
delay(10);
contadorWhile += 10;
if (contadorWhile >= 3500) { break;};
}
resposta = Serial.read();
... |
4183c63cad691294d723104472eb52a22e79bdb9 | e36a2b8dcbeb5039fd25e31e92d4219887f16f37 | dianapaula19/wheres-wally-game | /main.cpp | C++ | cpp | 18,187 | no_license | #include <GL/freeglut.h>
#include <iostream>
#include <cmath>
#define LEG_W 22
#define LEG_H 94
#define ARM_W 16
#define ARM_H 72
#define HEAD 37
#define LEG_SPACE 7
#define ARM_SPACE 8
#define HEAD_SPACE_H 6
#define HEAD_SPACE_W 7
#define MASK_H 15
#define MASK_W 29
#define Waldo_x 750
#define Waldo_y 200
#define WIN... |
07d5f36158f1be503f80557588435af644c5d62b | 6a5a4f8a62782888101bf2f241ebb188ec9dbe37 | andyyin15/forthrepository | /squirearea/squirearea/squirearea.cpp | C++ | cpp | 1,059 | no_license | // squirearea.cpp : 定义控制台应用程序的入口点。
// 设计一个立方体类BOX,它能计算并输出立方体的体积和表面积。
//提示:定义一个BOX类,含有一个私有数据成员(立方体边长length),有两个公有数据函数(构造
//函数Box和计算输出函数show)
#include "stdafx.h"
#include<iostream>
using namespace std;
#include<string>
class SquareData
{
private:
int x, y, z;
public:
int squiraarea(int x, int ... |
19bb67656a202b433dbc0b6b4d2f8fdcb5512c8e | 56accc6d57da7fe7a791d05078d34d5e64b1b845 | wobuhuichangge/C-Plus-Plus | /博客测试/博客测试/test.cpp | C++ | cpp | 3,153 | no_license | #define _CRT_SECURE_NO_WARNINGS 1
#include"test.h"
#include<string>
using namespace std;
#if 0
class Person
{
public:
void print()
{
cout << "name:"<< _name << endl;
cout << "age:" << _age << endl;
}
protected:
string _name = "peter";
int _age = 18;
};
class student :public Person
{
protected:
int _stuid;//... |
edbc37af0856a8c4505e5bbf05084a293f13edbc | b01be5410d6e9ca7dbc67ff064e678993313faac | MagisterLud/SiriusFM_32 | /Test1.cpp | C++ | cpp | 2,319 | no_license | #include"MCEngine1D.hpp"
using namespace SiriusFM;
using namespace std;
int main(int argc, char* argv[])
{
if(argc!=7)
{
return 1;
}
double mu = atof(argv[1]);
double sigma = atof(argv[2]);
double s0 = atof(argv[3]);
long T_days = atof(argv[4]);
int tau_min = atof(argv[5]);
long P = atof(argv[... |
0cc8f9e11a2e74b9b6f519a38646208831f6b150 | e11039f93704a6ac8253d9ea57455afb991832dd | mgh3326/iridium-browser | /third_party/blink/common/mime_util/mime_util.cc | C++ | cc | 7,105 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/public/common/mime_util/mime_util.h"
#include <stddef.h>
#include "base/lazy_instance.h"
#include "base/stl_util.h"
#include... |
3f2232d8d2686b703e6541c530df6add2591fb87 | 0af9eabf1733d920298b168a6774521fd94e685e | rajathans/cp | /CodeChef/fatchef.cpp | C++ | cpp | 662 | no_license | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000009
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n,m;
scanf("%d %d",&n,&m);
char col[100001];
memset(col,'x',sizeof(col));
char temp;
int pos;
int minpos = 100001;
for(int i = 0; i < m; i++)
{
cin>>temp;
scanf("%d",&... |
e4e09f92592aa5497ba8b971176469c54cb26136 | 841da4efb88663a887ceb0c7c22cdb81495dee97 | corewithkanish/Novice-Coding | /LeetCode/Two Sum/2ndOct_mayankfrost.cpp | C++ | cpp | 558 | no_license | #include <iostream>
#include <vector>
#include <map>
using namespace std;
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
int i, j;
map<int, int> m;
vector<int> ans;
cout << nums[1];
int l = nums.size();
for (i = 0; i < l; i++){
... |
85d9f275f47e688a861a265373662d4161db32a6 | ba9dbabe69781e09ac9058589bb3fbcafa1b706f | dbuskariol-org/chromium | /chrome/browser/renderer_context_menu/render_view_context_menu.cc | C++ | cc | 117,072 | 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/renderer_context_menu/render_view_context_menu.h"
#include <stddef.h>
#include <algorithm>
#include <set>
#include <utility>
#... |
d4e80e0bc9aff8dfd63613c02206ce82ddc2b7c3 | af907bb647b6a4f51c0408e83b9423ef3294dcfb | perrozzi/cmg-cmssw | /L1Trigger/RPCTechnicalTrigger/src/RPCData.cc | C++ | cc | 3,107 | no_license | // $Id: RPCData.cc,v 1.3 2009/10/26 12:52:15 aosorio Exp $
// Include files
// local
#include "L1Trigger/RPCTechnicalTrigger/interface/RPCData.h"
//-----------------------------------------------------------------------------
// Implementation file for class : RPCData
//
// 2008-11-18 : Andres Osorio
//-----------... |
90211666ba98923c5747749e592458e682d34129 | d4004cdad0258eea1777f57b4f7ec6c368235b6e | zenoalbisser/chromium | /third_party/pdfium/core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp | C++ | cpp | 999 | permissive | // Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "cmaps_japan1.h"
const FX_WORD g_FXCMAP_EUC_V_1[27 * 3] = {
0xA1... |
387180417d713c5b1ef94f2a2ac20011b8607529 | 20f90b7850f878984e00009cfbf4d9b1decfe9c6 | ShrutiSinghh/Piece-of-code | /stack-operation.cpp | C++ | cpp | 1,591 | no_license | #include<iostream>
#include<stdio.h>
usingnamespace std;
#define MAX 30
class conversion
{
char infix[MAX+1],stack[MAX],postfix[MAX+1],b,top;
public:
conversion()
{
top=-1;
}
void infix_to_postfix(conversion &);
void push(char[],char);
char pop (char[]);
int isop(char);
int priority (char);
void input();
void output(... |
2fa51c7c96463c0bdd0e0bdcc67a6a4f66f9d9a7 | 7f72b359b137d511e5138aeb0ee166f8a47c6f44 | SnowCherish/chromium | /chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.cc | C++ | cc | 17,384 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.h"
#include <algorithm>
#include "chrome/browser/profiles/profiles_state.h"
#i... |
87834db43b149595ce42dbb307b2ed7f32df608a | c076b4605a12a5f1ffd6067c8e37ef36387a9207 | imhdx/My-all-code-of-Vjudge-Judge | /HYSBZ/2431/18515940_AC_2168ms_5272kB.cpp | C++ | cpp | 441 | no_license | #include<bits/stdc++.h>
using namespace std;
int dp[1010][1010];
int main()
{
int n,k;scanf("%d%d",&n,&k);
dp[1][0]=1;for (int i=1;i<=k;i++) dp[1][k]=0;
for (int i=2;i<=n;i++){
for (int j=0;j<=k;j++){
for (int p=0;p<i&&j-p>=0;p++){
dp[i][j]=dp[i][j]+dp[i-1][j-p];
... |
57a3c8e4771992c7e0450b6505f32068670db8e8 | ec0ec324db69faba7ed79c25ee92d2ea173ef64f | profoundsoul/chromium | /components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc | C++ | cc | 32,290 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h"
#include <stddef.h>
#include <utility>
#include "base/bind.h"
#in... |
d99b4929f5d5b7061bf97bae78a5094cc63a79fd | 11e6e10468286314e900ea6c71b1b37c7b6705e3 | MLucien/Hackerrank-Solutions | /Algorithms/Warmup/Time-conversion.cpp | C++ | cpp | 345 | no_license | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int main() {
int h,m,s;
char c[2];
scanf("%d:%d:%d%s",&h,&m,&s,c);
if(!strcmp(c,"PM")&&h!=12) h+=12;
if(!strcmp(c,"AM")&&h == 12) h=0;
printf("%02d:%02d:%02d\n"... |
2ddeca0d42dabb461dd4ec1013fb2b33cdd47bbb | 333ede2b0a2cecf2b477df1e028749f1aff8a7ba | whztt07/osg-specialWindows | /src/osgPlugins/OpenFlight/ExtendedMaterialRecord.cpp | C++ | cpp | 14,167 | no_license | // Copyright (C) 2014 Brian Furtaw (bfurtaw@csc.com)
//
// Support for extended material definitions for OpenFlight v 16.4
//
/*
* 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 res... |
91f3823d34e073080fc8d5af182a3520b7956925 | 0ad20ebeead461e259d427825dcb3eeb755de57b | sneha281/grpc | /test/cpp/util/grpc_tool.cc | C++ | cc | 36,547 | permissive | /*
*
* Copyright 2016 gRPC authors.
*
* 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 agree... |
630f538a8e7b87beb459323d8423e919cc853adf | 2746a27c84e38047675729c5952cf7e93f6a797a | codahq/SoT-SDK | /SDK/SoT_cmn_looted__box_bottles_02_classes.hpp | C++ | hpp | 2,597 | no_license | #pragma once
// Sea of Thieves (2.0) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_cmn_looted__box_bottles_02_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//-------------------------------------------------------------------... |
0700609444c8840babb794a7e96e0b8f221810f2 | 7421b1f18a5496438a4d6585f7094384834b78f5 | chr1shr/am225_examples | /2c_fft+ddecomp/fftw_time.cc | C++ | cc | 1,631 | no_license | #include <cstdio>
#include <cmath>
#include <fftw3.h>
#include "omp.h"
// Maximum size of FFT to test
const int n_max=131072;
/** Measures the time taken for FFTW to perform a DFT on real data.
* \param[in] (f,c) pointers to input and output arrays.
* \param[in] n the number of points in the input array.
* \param[... |
401a6707e906888f5b89d2505a33f20ea57db53b | 1fd6fc8b5c248150892fba0280aa1cd6fbcb96ee | rauwuckl/Spike | /Spike/Backend/CUDA/Plasticity/WeightNormSpikingPlasticity.hpp | C++ | hpp | 2,134 | permissive | #pragma once
#include "Spike/Plasticity/WeightNormSpikingPlasticity.hpp"
#include "Plasticity.hpp"
#include "Spike/Backend/CUDA/Neurons/SpikingNeurons.hpp"
#include "Spike/Backend/CUDA/Synapses/SpikingSynapses.hpp"
#include "Spike/Backend/CUDA/CUDABackend.hpp"
#include <cuda.h>
#include <vector_types.h>
#include <cu... |
c8dcea6788570bd8938632398f1c7f306a1b66f7 | c03a34e3a478b9a7d75f3db8311c4e50b668bd69 | manishgupt12/LAMMPS_Heat_Transfer_Package | /pair_lj_cut_coul_longheat.cpp | C++ | cpp | 35,255 | no_license | /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04... |
1524b0548e9f10c0d7c384cb7c0c033d6837a41f | 0ba2e382f58a549a48eb845915d83e784ca8581c | cjh1/ParaView | /Qt/Core/pqObjectBuilder.cxx | C++ | cxx | 31,109 | permissive | /*=========================================================================
Program: ParaView
Module: pqObjectBuilder.cxx
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the Par... |
4a91edc760206d3e8d33fcaec8594eb807491934 | f872e475fe64b7435db86a3ddae10545eef5c0af | leecr1215/OOP | /Lab05/HW01/hw01.cpp | C++ | cpp | 794 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <memory>
class Animal {
public:
char* name;
int age;
Animal(int age_, const char* name_) {
age = age_;
name = new char[strlen(name_) + 1];
strcpy(name, name_);
}
Animal(Animal& a) { //복사 생성자
age = a.age;
name = new char[strlen(a.name) + 1];... |
a9a565114ba2dcc660afcbab3a9ca507506d1793 | 7fd64579eef0f5d6dabb8c3040daebc9c204ebd6 | prasannabhat/iceoryx | /iceoryx_utils/include/iceoryx_utils/internal/posix_wrapper/timespec.hpp | C++ | hpp | 1,522 | permissive | // Copyright (c) 2019 by Robert Bosch GmbH. 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... |
7d8aa5a60a96e858edb5896a1d0ab2d6fb338993 | eb3e3d35cdd25c53d654e5d7a4b246fd9dc618df | devouring-algorithm-ds/algorithm-study-s2 | /week1/devMS/Problems/ABC127-a.cpp | C++ | cpp | 303 | no_license | /*
* A - Ferris Wheel: O(1)
* https://atcoder.jp/contests/abc127/tasks/abc127_a
*/
#include <iostream>
using namespace std;
int main()
{
int old;
int cost;
cin >> old;
cin >> cost;
if (old >= 13)
{
cout << cost;
}
else if (old > 5)
{
cout << cost / 2;
}
else
cout << 0;
return 0;
} |
8d1df904f4092e974548f8d197ae0f44937bf10d | 9c6a85c9a1aa5d2344017e12640b40678f74b7db | mercera234/cpp-game | /PDCurseControls/GridMenu.cpp | C++ | cpp | 9,894 | no_license | #include <algorithm>
#include <assert.h>
#include "GridMenu.h"
#include "curses.h"
GridMenu::GridMenu()
{
init();
}
GridMenu::GridMenu(WINDOW* win, int rows, int cols)
{
init();
//we're assuming here for now that null windows will not be passed into this constructor!
setWindow(win);
resetItems(rows, cols);
}
... |
f304fee2ace860a90ecb18552ff05d8535b38bc5 | 8c89d22b537a92f18f7fd344f5b8ba0a67331af2 | 2ndcouteau/Piscine-Cpp | /04_day/ex01/main.cpp | C++ | cpp | 1,962 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: ... |
0e23792603366244426bd56ae59bb3f591efa1f4 | 778117761ffa3f2d47dcded28aa09814fc0b01c2 | ciupmeister/Surse | /codeforces 1/132_A/main.cpp | C++ | cpp | 452 | no_license | #include <iostream>
#include <cmath>
using namespace std;
int n,m,mx,nrm;
double a[55],b[55];
int main()
{
cin>>n;
for(int i=1; i<=n; ++i) cin>>a[i];
cin>>m;
for(int i=1; i<=m; ++i) cin>>b[i];
for(int i=1; i<=m; ++i) for(int j=1; j<=n; ++j) if(floor(b[i]/a[j])==ceil(b[i]/a[j])) {
if(b[i]/a... |
74653e77d6eb64c98a81403441ae2b3301bac557 | c22e62cfa5a6dce4530646ca36ee908277ebd041 | Toyohara01/ChatRoom | /Message.cpp | C++ | cpp | 903 | no_license | #include "Message.hpp"
Message::Message()
{
}
Message::Message(string packet, Type messageType)
{
this->packet = packet;
this->messageType = messageType;
this->timestamp = GetTime();
this->messageProperties = MessageProperties(parse(this->packet), this->messageType);
}
Message::~Message()
{
}
vect... |
49ae494a0b7b86165be4640149d2c84820d46836 | c5dfe99af8dd7012579b3c921e20229b827f2d03 | sreedavemuri/CSE-100 | /lab06/svemuri.cpp | C++ | cpp | 1,003 | no_license | #include <iostream>
using namespace std;
int partition(int *arr, int top, int bot){
int x = *(arr+ bot);
int i = top - 1;
for (int j = top; j <= bot - 1; j++){
if(*(arr+ j) < x){
i = i + 1;
int temp = *(arr+ i);
*(arr + i) = *(arr+ j);
*(arr + j) ... |
2812d81ccfd7b79f3416371edaa00a5d688fe024 | 124b94757155d5f65db3189809ff329931102b10 | dungdna2000/gamedev-intro-tutorials | /04-Collision/Platform.cpp | C++ | cpp | 840 | no_license | #include "Platform.h"
#include "Sprite.h"
#include "Sprites.h"
void CPlatform::Render()
{
if (this->length <= 0) return;
float xx = x;
CSprites * s = CSprites::GetInstance();
s->Get(this->spriteIdBegin)->Draw(xx, y);
xx += this->cellWidth;
for (int i = 1; i < this->length - 1; i++)
{
s->Get(this->spriteId... |
ab185eef013d886ad5c7c45ab94768e623e81613 | cb3329dde1ee46f8361e79ef5ba29a9d431913b2 | openharmony/communication_bluetooth | /services/bluetooth/ipc/src/bluetooth_hfp_ag_observer_proxy.cpp | C++ | cpp | 4,767 | permissive | /*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* 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 ... |
4985ada24ec2098afe61adceea45b28f092ccbf5 | 7ded7842452754a3c43bd827418238bd55f6b74e | aviallon/Ashes | /source/ashes/renderer/GlRenderer/Command/Commands/GlClearColourFboCommand.cpp | C++ | cpp | 2,305 | permissive | /*
This file belongs to Ashes.
See LICENSE file in root folder.
*/
#include "Command/Commands/GlClearColourFboCommand.hpp"
#include "Core/GlDevice.hpp"
#include "Image/GlImageView.hpp"
#include "Image/GlImage.hpp"
#include "RenderPass/GlFrameBuffer.hpp"
#include "ashesgl_api.hpp"
namespace ashes::gl
{
void buildCle... |
8fd0ce28bfbaef926eb8915d507ad0e0d25cf0d7 | 3114f56d5af36f3cf7402120adfba13671799772 | flpmko/najdlhsie-slovo | /Najdlhsie_Slovo/Databaza.cpp | C++ | cpp | 1,739 | no_license | #include "Databaza.h"
#include <fstream>
#include <iostream>
using namespace std;
Databaza::Databaza()
{
}
Databaza::Databaza(int paVelkost)
{
if (paVelkost > 0)
{
this->velkost = paVelkost;
this->zoznam = new Slovo* [paVelkost];
}
else
{
this->velkost = 0;
this->zoznam = nullptr;
}
}
void Databaza::n... |
99ca307cb038d65fb148b54009354ff8c20e33b7 | 22ab9c824d04ea53f570af3284710a52db61d8b5 | qianqianjun/DataStruct | /排序/快速排序.cpp | C++ | cpp | 1,015 | no_license | #include<iostream>
#include<vector>
#include<malloc.h>
using namespace std;
int quicksort(int* &v,int low,int high)
{
int i,j,temp;
i=low,j=high;
if(i<j)
{
temp=v[low];
while(i!=j)
{
while(i<j&&v[j]>=temp) j--;
v[i]=v[j];
while(i... |
03c72d8e81e8d2065c660aa6c264e3dadaffdeea | 68c2553df139faaf280dd8e77db1c9fc35326e5e | cualquiercosa327/Game-1 | /Game-build-desktop/moc_mainwindow.cpp | C++ | cpp | 3,194 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'mainwindow.h'
**
** Created:
** by: The Qt Meta Object Compiler version 62 (Qt 4.7.2)
**
** WARNING! All changes made in this file will be lost!
*************************************************... |
8654bb8fa3c5dcd4b3210f6867525f1599712cbc | 6fe1886ce994d7f643d9ef3f23ee859c2cde134e | jaskaran13300/July-Leetcode-Challenges | /20_Remove Linked List Elements.cpp | C++ | cpp | 741 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* removeEleme... |
579a0a24f364264c9e9c7a3887bf7a3b0dbe42b0 | d837620e8fddb7c4c4e704193d430c1a9ae0427c | gottong/gottong-core | /src/Game.cc | C++ | cc | 312 | no_license | #include "common.hpp"
#include "../include/Gottong.hpp"
#include "GameContext.hpp"
namespace Gottong {
unsigned long getTime()
{
auto ctx = getGameContext();
return ctx->getTime();
}
unsigned long getDeltaTime()
{
auto ctx = getGameContext();
return ctx->getDeltaTime();
}
} /* namespace Gottong */
|
7578425bbf32562f4d0b918f034d097a466c7706 | ffad95648a320f950efb5305a31d14ba18e8f507 | Harrm/kagome | /core/crypto/vrf/vrf_provider_impl.hpp | C++ | hpp | 1,516 | permissive | /**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef KAGOME_CORE_CONSENSUS_VRF_VRF_HPP
#define KAGOME_CORE_CONSENSUS_VRF_VRF_HPP
#include "crypto/vrf_provider.hpp"
#include <boost/optional.hpp>
#include "common/buffer.hpp"
#include "crypto/random_generator.hpp"... |
e0234d9b20c9a7d628d215188411d9e730daae42 | 2bfbc38493b3fdff7229175b28830ae5342b9e94 | NearXdu/leetcode | /leetcode95/95.cpp | C++ | cpp | 739 | no_license | class Solution {
private:
vector<TreeNode*> help(int left, int right)
{
vector<TreeNode*>res;
if (left > right)
{
return vector<TreeNode*>(1,NULL);
}
for (int i = left; i <= right; i++)
{
//递归左右子树
vector<TreeNode*>ltree = help(left, i - 1);
vector<TreeNode*>rtree = help(i + 1... |
411869f698c8921fa754f7f0d1c1a530211b8559 | 485c1261811356ad87236d2883759cc6dc1f94ce | KalashRastogi/P3 | /DynamicProgramming/largestSquareMatrix.cpp | C++ | cpp | 689 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int row,col;
cin>>row>>col;
vector<vector<int>> vec2d(row, vector<int>(col, 0));
vector<vector<int>> vecAns(row, vector<int>(col, 0));
for(int i=0;i<row;i++){
for(int j=0;j<col;j++){
cin>>vec2d[i][j];
}
}
fo... |
9ff955e888a9dc0d78d1cb4a6f740051c49e888b | 26b4203e6a0ccc07623ead3fd6e31c45ec77a766 | boonkerz/esp32-snippets | /cpp_utils/BLEDevice.cpp | C++ | cpp | 10,211 | permissive | /*
* BLE.cpp
*
* Created on: Mar 16, 2017
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#include <freertos/FreeRTOS.h>
#include <freertos/event_groups.h>
#include <freertos/task.h>
#include <esp_err.h>
#include <nvs_flash.h>
#include <bt.h> // ESP32 BLE
#include <es... |
58aa771854f313dba9f8f5c7b7d4442168ef466c | 5a94e9a94994198a1574512c322f2adf701d2045 | victorca25/inviwo | /modules/qtwidgets/properties/transferfunctioncontrolpointconnection.cpp | C++ | cpp | 5,065 | permissive | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2014-2017 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
dde2c1965b3934f8f01048d7f408bdb242524cb0 | e223137a8b95d8311f78d4188dbafd92c9cd9dc5 | Sweety4/DS | /Aug-18/Aug-18-1/main.cpp | C++ | cpp | 677 | no_license | #include"Tree.h"
void main()
{
cTree t1;
int ch;
int data;
do
{
cout << "\n\n\t\t1.AddNode\
\n\t\t2.Display\
\n\t\t3.Nonrecrsive Inorder\
\n\t\t4.Nonrecrsive Preorder\
\n\t\t0.Exit\
\n\t Enter your choice :";
cin >> ... |
e979587e5b1c344534a07f016825aa04cc0bc64a | e3d640eea32726ee7b7dde513e5589beae7f1a20 | gnoliyil/fuchsia | /zircon/kernel/lib/kpci/pio.cc | C++ | cc | 3,173 | permissive | // Copyright 2017 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <assert.h>
#include <endian.h>
#include <lib/pci/pio.h>
#include <zircon/types.h>
#include <kernel/auto_lock.h>
#include ... |
8380c712df15ff94033a85f49f7a84fa91d4171e | 0c791a5addb60902d3ba3ad415a3685cabdd0645 | denisenkom/surface-scanner | /Профилометр/Driver.cpp | C++ | cpp | 6,138 | no_license | //---------------------------------------------------------------------------
#include <vcl.h>
#include <string>
#include <map>
#include <vector>
#include <registry.hpp>
#pragma hdrstop
#include "ScanData.h"
#include "Driver.h"
#include "..\common\driver_dll.h"
//-----------------------------------------------------... |
94f809dc40ad0c6f5ba831c6bc7ab2aa45a517c2 | f4eaa3d1ff9ef9929afe896c3200bb0488b0253d | ROOAARR/leechcraft | /src/plugins/aggregator/rss10parser.cpp | C++ | cpp | 4,621 | permissive | /**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2006-2013 Georg Rudoy
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* Permission is hereby granted, free of charge, to any person or organiz... |
3d85388968c156bef1377f878db95568ae9a70b9 | b3d0c43347c379ccb248c82f7accc51fb3fff720 | rjernst/stepanov-components-course | /code/lecture17/test_insertion_sort.cpp | C++ | cpp | 252 | no_license |
#include <functional>
#include "insertion_sort.h"
#include "algorithm.h"
int main() {
int nums[] = {5, 3, 10, 1, 2};
print_range(nums, nums + 5);
binary_insertion_sort_n(nums, 5, std::less<int>());
print_range(nums, nums + 5);
return 0;
}
|
0cd353ac762b2c17f3e3404d919f62c933077e41 | 6031486d5517e75b907bb66d8cbe954c82935582 | gegenschall/visualizationlibrary | /src/vlGraphics/RenderEventCallback.hpp | C++ | hpp | 5,391 | permissive | /**************************************************************************************/
/* */
/* Visualization Library */
/* http://www.visualizationlibrary.org ... |
cb929b4e6d933991d82ccead9be74748c2e603e9 | f171545610ee2e78d15845bfc605d18ac1821874 | pankon/realm-core | /test/test_basic_utils.cpp | C++ | cpp | 1,834 | permissive | /*************************************************************************
*
* Copyright 2016 Realm 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/lice... |
44be5b11ca299f4d83e10520cb24ba82c6792de1 | cf1eb1e7763c7301e227d3394dac6c08758ac114 | PeihongKe/aSTL | /astl/iterator/iterator_traits.hpp | C++ | hpp | 3,648 | no_license | #ifndef _ANOTHERSTL_ITERATOR_TRAITS
#define _ANOTHERSTL_ITERATOR_TRAITS
#include "astl\base\fundamental.hpp"
namespace anotherSTL
{
/*Output iterators are iterators that can be used in sequential output operations, where each element pointed by the iterator is written a value only once and then the iterator is incre... |
4c36f9b73d9f75217c8afd75cf739dc2235d6536 | 21679b679ef94d4deb354d33ace4463fc61a5378 | AgathokakologicalBit/halite-actreess-bot | /bot/bot.cpp | C++ | cpp | 3,947 | no_license | #include "bot.h"
#include "routing/pathfinding.h"
#include "mapping/force_map.h"
#include "debug/gizmos.h"
Bot::Bot (hlt::Metadata data)
: id(data.player_id)
, map(nullptr)
{
Timer $timer_bot_init("bot init");
this->map = &data.initial_map;
this->navmap_force = new ForceMap(*this, data.... |
fc4e855f1afb39a7a3b207b36c46907dc285e433 | dabebf6e23de331d4f034d9933cd3a79f063747f | arunavanag591/Archive | /CppLocal/CppRef/CppRef/main.cpp | C++ | cpp | 1,199 | no_license | #include "helper.h"
void testCase();
int main() {
testCase();
//string s = "new";
return 0;
}
void testCase() {
/********************************/
/*Checking Balance Parantheses using Stack*/
balanceParantheses obj;
obj.checkExample();
cout << endl;
/********************************/
/*Binary Seac... |
570c582a92e3762d0387b4e77414f03d510b653c | 274c4ea87a20ef6256d3897c7a891b5b7dd86517 | xiaoqgao/windows_nt_3_5_source_code | /windows_nt_3_5_source_code/NT-782/PRIVATE/CAIROLE/STG/EXP/DFUNMFCT.CXX | C++ | cxx | 17,392 | no_license | //+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1993.
//
// File: dfunmfct.cxx
//
// Contents: Implementation of CDocfileUnmarshalFactory
//
// History: 25-Jan-93 DrewB Created
//
//-... |
6562932b7731a60b6df345244c2463caf755897c | eeee93b352978e4594fb29772774487ff4562703 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/Z6.4+dmb.sy+dmb.sypa+dmb.sylp.c.cbmc_out.cpp | C++ | cpp | 41,767 | no_license | // Global variabls:
// 4:atom_2_X2_0:1
// 0:vars:3
// 3:atom_1_X2_0: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... |
cb43c5ea6e07599957d67302f5c133bd505469e8 | c69208d53c8abbeae158d2db1bc5b1ea85f313ad | rahulyhg/tzuwei | /Prototype3Dlg.cpp | C++ | cpp | 14,055 | permissive | // Prototype3Dlg.cpp : implementation file
//
#include "stdafx.h"
#include "Prototype3.h"
#include "Prototype3Dlg.h"
#include ".\prototype3dlg.h"
#include "TzuWei.h"
#include "TestTzuWei.h"
#include "TzuWeiChartDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
const TCHAR* profileDelimiter = _T(":");
// CAboutDlg di... |
89174ae511efa1b48560d8a82a876fa06c334d84 | 5ca5971b053a6a37183c1fdf0ceedcfa6f7ee1f0 | jrojer/CompGeomApp | /algos/find_polygon_diameter.cpp | C++ | cpp | 803 | no_license | #include <cstdio>
#include <vector>
std::vector<std::pair<int,int>> ReadInput()
{
std::vector<std::pair<int,int>> return_vector;
char x;
if(scanf("%c",&x) != 1 || x != 'P')
{
printf("unrecognized input\n");
return {};
}
unsigned num_points = 0;
if (scanf("%u",&num_points)... |
19c234fa5dcbce9ac4422b043e55845e77b47f9e | bbcbf4986abac2153947968edc5ca10ce792e2bc | anurag-k/Codes | /QtAssignments/contactList/qappmanager.cpp | C++ | cpp | 1,573 | no_license | #include "qappmanager.h"
#include<QDebug>
#include "qmlapplicationviewer.h"
#include "uicontroller.h"
#include <QtDeclarative>
#include "contactinfo.h"
QAppManager::QAppManager(QObject *parent) :
QObject(parent)
{
registerMetaType();
m_Proxy = new Proxy("com.contact.info","/DemoObject",QDBusConnection::s... |
de85dd60fa20b5da3483c88cfd840526f7467a74 | 5badecb977b2c5078ae66c361f35d83138523449 | brettlungal/Space-Invaders | /Player.hpp | C++ | hpp | 523 | no_license | #ifndef PLAYER_H_
#define PLAYER_H_
class Player{
private:
int posX;
int posY;
int worldHeight;
int worldWidth;
int health;
public:
Player(int width,int height);
void moveLeft();
void moveRight();
void setX(int value);
void setY(i... |
584e5d1f0b1e763ac2114c2c2fd89a39d1a0cb6b | 16e89b9c55ba595330ee0e08723d2b2182be5573 | damucz/librocket | /src/Core/Factory.cpp | C++ | cpp | 19,474 | no_license | /*
* This source file is part of libRocket, the HTML/CSS Interface Middleware
*
* For the latest information, see http://www.librocket.com
*
* Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and assoc... |
729473fcf8c5c36a97bcd8e5212f53e62d913eff | cc11a59bf46ac648cdff950cea631d3c6649dc15 | ClientSelection/chromium | /chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc | C++ | cc | 12,286 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h"
#include <vector>
#include "base/bind.h"
#include "base/callback.h"
#include ... |
e7ceb7b832703810ef4ef7852902cdd69ccba758 | 93c4e9819810532b0dcad390bd72fe1c829a0f67 | marcionicolau/ICPWheatBlast | /src/rcpp_hello.cpp | C++ | cpp | 1,196 | no_license | #include <Rcpp.h>
#include <cstdio>
using namespace Rcpp;
// This is a simple function using Rcpp that creates an R list
// containing a character vector and a numeric vector.
//
// Learn more about how to use Rcpp at:
//
// http://www.rcpp.org/
// http://adv-r.had.co.nz/Rcpp.html
//
// and browse examples of co... |
a746fa49336e3902c626bddc658d15b392c2f622 | 117939a2ffcc22cce5fd45dfaf3916acb80614a8 | mathLab/ITHACA-SEM | /solvers/CompressibleFlowSolver/Preconditioner/PreconCfsBRJ.cpp | C++ | cpp | 14,980 | permissive | ///////////////////////////////////////////////////////////////////////////////
//
// File: PreconCfsBRJ.cpp
//
// For more information, please see: http://www.nektar.info
//
// The MIT License
//
// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
// Department of Aeronautics, Imperial Coll... |
d93fc0f0e8c69672ab1a391d5e1dcf7a524c307b | 0ffbb0f6fee2f80c25d0b445d5b4fa698d16c634 | jaccen/OpenGLFramework02 | /OpenGL_Framework/OpenGL_Framework/Projects/Sources/C++/Game/ConnectWars/BaseBullet.cpp | C++ | cpp | 10,037 | no_license | /* ヘッダファイル */
#include "BaseBullet.h"
#include "CollisionProcess.h"
#include "BulletFireState.h"
//-------------------------------------------------------------
//!
//! @brief コネクトウォーズ
//! @brief コネクトウォーズ関連の名前空間
//!
//-------------------------------------------------------------
namespace ConnectWars
{
/*********... |
a392a555ddd2e0c35c72813f13352dfae84b5872 | f885b20176adcbbf986f0cc27ee57ee9eb3b7046 | 8javitt/Assignment1 | /main.cpp | C++ | cpp | 1,394 | no_license |
/*
* File: main.cpp
* Author: Javier <jrescobara@gmail.com>
*
* Created on September 25, 2017, 3:19 PM
*/
#include <cstdlib>
#include <iostream>
#include "Weapon.h"
#include "WeaponFactory.h"
using namespace std;
/**
* Simulates the behavior of a weapon in the presence and absence of armor, by
* printing i... |
edbfd9d7e760991d3aaa5b4742dd9c33b0d6860a | 1d745880e4050a4d6fe13ba908d7c3003f957f8f | archit120/Visual-Servoing-Drone | /ibvs.cpp | C++ | cpp | 2,639 | no_license | #include <stdio.h>
#include <iostream>
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/xfeatures2d.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include <eigen3/Eigen/Eigen>
#include <eigen3/Eigen/Dense>
#include <eigen3/Eigen/QR>
#include <math.h>
using names... |
00f17457e72d273e6492db4a8e551383745e0f67 | cc89eb73ccc0420a82cabf627e39b3c089f3be35 | ywapple/chromium | /components/autofill/content/renderer/password_form_conversion_utils.cc | C++ | cc | 35,521 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/autofill/content/renderer/password_form_conversion_utils.h"
#include <stddef.h>
#include <algorithm>
#include <set>
#include <strin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.