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 |
|---|---|---|---|---|---|---|---|---|
64254689cc03942fdbefa17b4a6723ef339d411b | 70ccbde31c15f3649051a1f5eaad04914e3fcc8e | mikedouglas/SkipListAdv | /skipList.cc | C++ | cc | 4,793 | permissive | #include <iostream>
#include <cstdlib>
#include <cstring>
#include <set>
#include "skipList.h"
#include "randBit.h"
/*
* returns a new skipList
*/
skipList *skipCreate()
{
skipList *head = new skipList;
head->key = NULL;
head->height = 0;
return head;
}
/*
* returns a new node
*/... |
e57648b2d77101a68931fb2da727c6a61ba0f2b5 | 1ed6ee0e5220779eab5881d039c04221636deb74 | ThePotato97/SoT-SDK | /SDK/SOT_Title_GH_HoarderOfTheCaptainsGold_classes.hpp | C++ | hpp | 755 | no_license | #pragma once
// SOT: Sea of Thieves (1.0) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x4)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass Title_GH_Hoar... |
e2d673fab79ef872148e54e9fee71c018d9d11fb | 403eb79bb312b1d7424016be6e8432d67cf991e0 | therocode/blocks | /src/utilities/namedenum.hpp | C++ | hpp | 1,432 | no_license | #pragma once
#include <iostream>
#include <algorithm>
inline int32_t getNthIndexOf(const std::string& line, char character, int32_t occurrences)
{
int pos = 0;
while(pos < line.length() && occurrences + 1)
{
if(line[pos++] == character)
occurrences--;
}
return pos - 1;
}
inli... |
b337c411db6dfe16cdf2563f087901dc94cacda9 | bb8608c74649fd9b5e21791349308733b919064d | otaviobertucini/mptcp-ns3 | /src/mesh/model/flame/flame-protocol.cc | C++ | cc | 12,220 | no_license | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 IITP RAS
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distribu... |
103c83d49e0f158f24453ca8a07057210e1d45a0 | ea41f084b5a10984ff902360d2c6b72a4b529cc0 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_1/Z6.4+poreleaseonces.c.cbmc.cpp | C++ | cpp | 40,596 | no_license | // 0:vars:3
// 3:atom_1_X1_0:1
// 4:atom_2_X1_0:1
// 5:thr0:1
// 6:thr1:1
// 7:thr2:1
#define ADDRSIZE 8
#define NPROC 4
#define NCONTEXT 1
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
char __get_rng();
char get_rng( char from, char to ) ... |
4a7a2ed423d9113477eff3709ebb795640f36bee | a9c0955ddd2f73cd592f12e603c0b5f32c0f296f | iynaur/3DTK | /src/calibration/PictureHandler.cc | C++ | cc | 6,301 | no_license | //
// PictureHandler.cpp
// CameraCalibration
//
// Created by Joschka van der Lucht on 04.09.15.
// Copyright (c) 2015 Joschka van der Lucht. All rights reserved.
//
#include "calibration/PictureHandler.h"
#include <tag36h10.h>
#include <tag36h11.h>
#include <tag25h9.h>
#include <iostream>
using namespace std;
... |
be83e0b11388530ed4f053fb5d99dfa26ca1c221 | 3f0cf3b35687937e92bb2e3543592154dcaa3378 | vsrinivas/zircon | /kernel/dev/interrupt/arm_gic/common/arm_gic_hw_interface.cpp | C++ | cpp | 1,348 | permissive | // Copyright 2016 The Fuchsia Authors
// Copyright (c) 2012-2015 Travis Geiselbrecht
//
// 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 <dev/interrupt/arm_gic_common.h>
#include <dev/interru... |
e3d77fcaef36f4c8dead9bfe24f21648b2595974 | 7d1f05c68383bdf34105ea3a10a3ec5559377db9 | berkaydeniz/rtabmap | /corelib/src/OdometryF2F.cpp | C++ | cpp | 8,930 | no_license | /*
Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... |
89473b212babc8fc2a3f955fe70c2410da1e439a | 8debf910ddaf659b6efa83df26159fb0dde9f843 | nigulo/cpp | /pcdl/SnapshotLoader.cpp | C++ | cpp | 4,310 | no_license | /*
* SnapshotLoader.cpp
*
* Created on: Jan 26, 2017
* Author: nigul
*/
#include "SnapshotLoader.h"
#include "utils.h"
#include <cassert>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
using namespace utils;
using namespace boost;
using namespace boost::filesystem;
using namespace pc... |
0d5df49f172777d1b4dff8c7c64a87bbdcb821f3 | 71e614861e7722bbec62aac660e656977d113195 | bigdoods/OpenInfraPlatform | /IfcRoad/src/OpenInfraPlatform/IfcRoad/entity/IfcTubeBundleTypeEnum.cpp | C++ | cpp | 1,973 | 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 OpenInfraPlatform.
* \endverbatim
*/
#include <sstream>
#include <limits>
#include <map>
#include "OpenInfraP... |
22190cade2ae5315e69c778ee049550088fca7e1 | 59e0bd358497a9a5000e374109069a89f108b38e | fool404/Firestorm | /ThirdParty/LLGL/sources/Renderer/OpenGL/GLCommandQueue.cpp | C++ | cpp | 6,319 | permissive | /*
* GLCommandQueue.cpp
*
* This file is part of the "LLGL" project (Copyright (c) 2015-2018 by Lukas Hermanns)
* See "LICENSE.txt" for license information.
*/
#include "GLCommandQueue.h"
#include "../CheckedCast.h"
#include "RenderState/GLFence.h"
#include "RenderState/GLQueryHeap.h"
#include "../GLCommon/GLExt... |
c6a2fcae76a600f307b86526e4b2564587132ad2 | 461c26c323c557a7beddf98933aae8ba9ce60b6c | mehditlili/gazebo_ros_link_attacher | /src/gazebo_ros_link_attacher.cpp | C++ | cpp | 6,989 | no_license | #include <gazebo/common/Plugin.hh>
#include <ros/ros.h>
#include "gazebo_ros_link_attacher.h"
#include "gazebo_ros_link_attacher/Attach.h"
#include "gazebo_ros_link_attacher/AttachRequest.h"
#include "gazebo_ros_link_attacher/AttachResponse.h"
#include <ignition/math/Pose3.hh>
namespace gazebo
{
// Register this plu... |
2c2c3fee1d0a04ce7fc69d05897cc8d180cca696 | b562339fc9483d9875bb092f125a707d5673b2b4 | 0x01be/coriolis | /hurricane/src/analog/Cascode.cpp | C++ | cpp | 3,561 | no_license | // -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2009-2018, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | H u r r i c a n e A n a l o g ... |
d91acd87d14397ba9fba10e0261ad56230e0e381 | f1d0bcfe877042891ee8512d0e076ae83f1e91cf | splunk/pion | /include/pion/http/response.hpp | C++ | hpp | 8,726 | permissive | // ---------------------------------------------------------------------
// pion: a Boost C++ framework for building lightweight HTTP interfaces
// ---------------------------------------------------------------------
// Copyright (C) 2007-2014 Splunk Inc. (https://github.com/splunk/pion)
//
// Distributed under the ... |
7dc1e0cd25f2648568b64e2293b493871b1c2080 | 3a75a851d01c1961b62f0360d4f4fd1749be0238 | kevinwu/cv-marker-tracker | /Sheet3/main.cpp | C++ | cpp | 8,596 | no_license | #include <iostream>
#include <opencv2/opencv.hpp>
#include "MarkerIdentification.h"
#include "MarkerTracking.hpp"
#include "../PoseEstimation.h"
#include <iomanip>
using namespace cv;
using namespace std;
int main(int argc, const char * argv[]) {
//create heap on startup
CvMemStorage* memStorage =cvCreat... |
63dcc453b2f0dc7d8d66cbd9b37772e69059c41b | e217aed5ac5d3e6fb5de176fd3129494f4732677 | skynet29/rpi | /balancing/src/rear/NovaVoltageSensor.cpp | C++ | cpp | 301 | no_license | #include "NovaVoltageSensor.h"
NovaVoltageSensor::NovaVoltageSensor(const string& name, NovaMotor& nova) :
Sensor(name)
{
this->nova = &nova;
this->type = "voltage";
}
double NovaVoltageSensor::GetRealValue()
{
NovaMotor::MonitorData data;
nova->GetMonitorData(data);
return data.voltage;
}
|
e10273969eadab9b3a69c6b4b02c9a5bc40c3565 | e0286f76c76ccaf8b161668b40c47307eefd8ba2 | Steven1207/stackoverflow | /questions/54695106/54695106-1/main.cpp | C++ | cpp | 1,110 | permissive | #include <QtQuickWidgets>
class Widget: public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent=nullptr):
QWidget(parent),
m_widget(new QQuickWidget)
{
m_widget->setResizeMode(QQuickWidget::SizeRootObjectToView);
QPushButton *button1 = new QPushButton("show 1");
QPu... |
f9c4a85b1ec5f3fbf4223737be8606bf36b21713 | f0231b47c844903b2fee4076fe20703ea4273605 | tonystone/geofeatures | /boost/boost/geometry/strategies/comparable_distance_result.hpp | C++ | hpp | 5,731 | permissive | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2014-2015, Oracle and/or its affiliates.
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
#ifndef BOOST_GEOMETRY_STRATE... |
51367bf6710b6b64e1b34041e9fbf78070df4100 | 52e50079eac1859cea682229465ee5dddae8fca5 | janahvitalicio/Cpp-Object-Oriented-Software-Development | /WS06/in-lab/Autoshop.cpp | C++ | cpp | 696 | no_license | // Name: Janah Vitalicio
// Date of completion: October 31, 2019
#include <vector>
#include "Autoshop.h"
#include "Car.h"
namespace sdds {
Autoshop& Autoshop::operator+=(Vehicle* theVehicle) {
m_vehicles.push_back(theVehicle);
return *this;
}
void Autoshop::display(std::ostrea... |
bcef32f9187df2248cb0fb6648e32d9f9fb6cab2 | 16848ab6c6911f72871608d60c24c599140f5b5c | w1r2p1/strategy | /src/oms_ipc.cpp | C++ | cpp | 3,194 | no_license | #include <sstream>
#include <boost\archive\text_oarchive.hpp>
#include <ipc.h>
#include <order.h>
#include <oms.h>
#include <iostream>
namespace msim{ // trader
void trader_report_thread(ipc_client*);
TraderOMS_IPC::TraderOMS_IPC(const char* market_host, const char* order_port, const char* report_po... |
7c2eaf1339d03ed12e6f18288123a7cc2f1916c5 | 927762b2b008a1720fa8fe9aae395d72b44d8177 | jkammerl/opencv | /modules/gpu/test/test_objdetect.cpp | C++ | cpp | 13,167 | no_license | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, i... |
becf4d19d02a3c9e972a41009b3b731775a51b8d | 215685dd856df9bdfcb219ae3c9a2fbb4df14584 | vihowe/nnfusion | /src/nnfusion/core/operators/op_define/fused.cpp | C++ | cpp | 7,472 | permissive | //*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... |
d4f17c6099902783ccc5dcd7c3599d3c30431e03 | 1e68480fd88dec81050265d65b49fbd263d47922 | hafizhMo/Algoritma-Programming | /Session 10/collage-list2.cpp | C++ | cpp | 13,568 | no_license | #include <stdio.h>
#include <string.h>
#include <conio.h>
#include <time.h>
#ifdef _cplusplus_
#include <cstdlib>
#else
#include <stdlib.h>
#endif
struct str_mahasiswa
{
int mh_nim;
char mh_name[20];
char mh_category[20];
int mh_dd;
int mh_mm;
int mh_yyyy;
} MAHASISWA;
struct str_mahasiswa2
{... |
c4ed141d9fdcaf348ab2d4b54f6258ddac0d50ab | 47713733916aa538d6ff017219da9f4593f43d93 | ahsanzam/sudoku_solver | /sudoku_solver.cpp | C++ | cpp | 1,772 | no_license | #include "sudoku_solver.h"
void Sudoku::setval(int i, int j, int val){
board[i][j] = val;
}
int Sudoku::printval(int i, int j){
return board[i][j];
}
Sudoku::~Sudoku() {
}
bool Sudoku::isValid(int row, int col) {
int value = board[row][col];
for (int i=0; i<9; i++) {
if (i == row) {
continue;
... |
fedf08423ee60794a638cba64a89dc26b3c34e9c | 3c0b77721d87c8aaa057a6ed0a42b43a6b9b4200 | taspr/WidgetDialpad | /countriesprefixitem.cpp | C++ | cpp | 654 | no_license | #include "countriesprefixitem.h"
CountriesPrefixItem::CountriesPrefixItem(int flag, int prefix, QString countryName)
{
this->flag = flag;
this->prefix = prefix;
this->countryName = countryName;
}
int CountriesPrefixItem::getFlag() const
{
return flag;
}
void CountriesPrefixItem::setFlag(int value)
{... |
a84f3867c7be3ecb80b3dee16db1818145e782d9 | 490d76507b0fb7b55b6605a67a8d2e313e980d45 | pluciro/VCSamples | /VC2008Samples/Attributes/General/COMMap/COMMap.cpp | C++ | cpp | 1,042 | permissive | // COMMap.cpp : Implementation of DLL Exports.
//
// This is a part of the Active Template Library.
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This source code is only intended as a supplement to the
// Active Template Library Reference and related
// electronic documentation provided with the ... |
1effa934d6ab29fb4ab935169436dd8828da10bf | ba17bb5621b724da992afe7dc1721d3d18f0bef3 | leed21542/Algorithm | /백준/문자열/1120 문자열.cpp | C++ | cpp | 463 | no_license | #include <iostream>
#include <string>
using namespace std;
string A;
string B;
int main(){
cin >> A >> B;
int differ = int(B.size() - A.size());
int min = 1234567;
for(int i=0; i<differ+1; i++){ //한칸씩 이동하면서 최소값 구한다.
int dif=0;
for(int j=i, k=0; j<i+int(A.size()); j+... |
e62cdece00329747c210b75816427670032910b2 | 25df6ffe61ef04e1c17081829ebec12fe7998942 | jjzhang166/WinNT5_src_20201004 | /NT/base/busdrv/acpi/hidbatt/hidbatt.cpp | C++ | cpp | 20,210 | no_license | /*
* title: hidbatt.c
*
* purpose: wdm kernel client interface between HID class and power class
*
* Initial checkin for the hid to battery class driver. This should be
* the same for both Win 98 and NT 5. Alpha level source. Requires
* modified composite battery driver and modified battery clas... |
d2342408548140766d1dd0cfed9e9033d8e7bcfc | 2f8a50d227671a34180fdc60fe66a1d250159db7 | trucnguyenlam/steroids | /include/stid/action_stream.hh | C++ | hh | 2,610 | no_license |
#ifndef __STID_ACTION_STREAM_HH_
#define __STID_ACTION_STREAM_HH_
#include "action.hh"
#include "replay.hh"
#include "../../rt/rt.h"
namespace stid {
class action_streamt;
class action_stream_itt
{
public:
inline bool operator== (const action_stream_itt &other) const
{ return trace.evptr == other.trace.ev... |
4f1ac1b4a79664d3e9cc43f8193ca73f236bc704 | 5aa3464f77d1e042a722fe27b1897954a8534cdb | Playfish/cafe_demo | /rocon_concert/graveyard/graveyard_rocon_qorchestra/src/main.cpp | C++ | cpp | 1,153 | no_license | /**
* @file /src/main.cpp
*
* @brief Qt based gui.
*
* @date November 2010
**/
/*****************************************************************************
** Includes
*****************************************************************************/
#include <QtGui>
#include <QApplication>
#include "../include/ro... |
d9230a00d73e21b345e7e8c56da67faba419c0bb | ea2b161faed13395f0890535ce8bedb8621ccdb2 | CodeMechanix/Online-Judge-Problem-Solutions | /UVa Archive/10365 - Blocks.cpp | C++ | cpp | 438 | no_license | #include<bits/stdc++.h>
#define INF 1000111222
using namespace std;
int main()
{
int T,n;
cin>>T;
for(int k=1; k<=T; k++)
{
int res=INF;
cin>>n;
for(int i=1; i*i<=n; i++)
if(n%i==0)
for(int j=1; j*j<=n/i; j++)
if(((n/i... |
fbcec15a225503b0b20a5a5bea8e3fca3989bccb | 6f2aae63f418157d27a01b614fd920fe9bf860a3 | TencentCloud/tencentcloud-sdk-cpp | /iotvideoindustry/src/v20201201/model/DescribeDeviceListRequest.cpp | C++ | cpp | 3,950 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... |
2d0e0029af9cefa979a1b7ef3fc4b6e97067d1f1 | fff1808b0b92ff6b0932cce0c4f69d693ccd174a | Miguna/ALSE2110MAGNA | /ex7/filtro_lista/Dato.cpp | C++ | cpp | 473 | no_license | /**
* Project Untitled
*/
#include "Dato.h"
#include <iostream>
/**
* Dato implementation
*/
Dato::Dato() {
_dato = 0.;
_siguiente = NULL;
}
/**
* @param a
*/
Dato::Dato(float a) {
_dato = a;
_siguiente = NULL;
}
/**
* @return Dato*
*/
Dato* Dato::getSig() {
return _siguiente;
}
/**
... |
56aa261a7dd0a25c0ddd37beb4cf9850011ac4b9 | 225a7b1320c878d5f13b1f9249144fde94f3073d | moonmile/gyakubiki-cpp | /gcc/ch03/func252.cpp | C++ | cpp | 630 | no_license | #include <stdio.h>
#include <string.h>
int main( void )
{
int i;
char *p;
char str[] = "Hello C world.";
struct point {
int x,y,z;
};
struct point pt, *ppt;
printf( "sizeof int: %d\n", sizeof( int ));
printf( "sizeof i: %d\n", sizeof( i ));
printf( "sizeof double: %d\n", sizeof( double ));
printf( ... |
35e5176e736815e80e09352d1dfe1498d9d0356b | 2f0d7fb23853d4e4b53f45561b18ebfb849b4c8a | m561247/nvm_leveldb | /table/format.cc | C++ | cc | 4,621 | permissive | // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "table/format.h"
#include "leveldb/env.h"
#include "port/port.h"
#include "table/block.h"
#in... |
467809cc5ca87c3ae9b41d70316a48fe3608343e | 34d9c4e7508fc63182e9db06915be0d0221b5ed0 | harshp8l/deep-learning-lang-detection | /data/train/cpp/34d9c4e7508fc63182e9db06915be0d0221b5ed0LightSample.cpp | C++ | cpp | 722 | permissive | #pragma once
#include "LightSample.h"
#include "Sample.h"
#include "RNG.h"
namespace Solstice {
LightSampleOffsets::LightSampleOffsets(int p_count, Sample* p_sample){
nSamples = p_count;
componentOffset = p_sample->Add1D(nSamples);
posOffset = p_sample->Add2D(nSamples);
}
LightSample::LightSample(const Sam... |
f178ff3bb7f05a5c876f2880db8153e901a1eaf0 | 02a241aec6866ab58f625d14b803540b63e0607c | eeeeeeeelias/cpp_hw_quarter2 | /contest_2/3_is_palindrome.cpp | C++ | cpp | 555 | no_license | #include <iostream>
#include <string>
std::string IgnoreSpacesInput() {
std::string s = "";
char c;
while (std::cin >> c) {
if (c != ' ') {
s += c;
}
}
return s;
}
bool IsPalindrome(const std::string& s) {
for (size_t i = 0; i < s.size() / 2; ++i) {
if (s[i]... |
f2693d5626159555567f8822e4bd2301811a2147 | 072ce76bdb49e9dbb2776ef340c56d7121c9d0e8 | return19/All-C-Codes | /g4g/dp/longest_palindromic_substr.cpp | C++ | cpp | 1,553 | no_license | #include<bits/stdc++.h>
using namespace std;
char str[1100];
int n;
int dp[1100][1100];
int flag[1100][1100];
int max2(int x,int y)
{
if(x>y)
return x;
return y;
}
int find_long_palin()
{
int i,j,k;
n=strlen(str);
for(i=0;i<n;i++)
{
dp[i][i]=1;
flag[i][i]=1;
}... |
36e67835d787aefe5416c3a984d45ed6973f678b | 332326ceb01191f9deecd4437623ac125b1b666e | lyoz/contest | /atcoder/archive/soundhound2018/C.cpp | C++ | cpp | 4,028 | no_license | #include <bits/stdc++.h>
using namespace std;
#define dump(...) do{print_vars(cout<<"# "<<#__VA_ARGS__<<'=',__VA_ARGS__);cout<<endl;}while(0)
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define all(c) beg... |
3b04280362d07e19180b3b61765819d1619bb158 | 5b0184ddfb649029ebd894902618f4fe74d1c6f8 | shivamgoel008/Data-Structure-and-Algorithms | /Rounds/codeforces/Practice/Problem A/Kids_Seating.cpp | C++ | cpp | 652 | no_license |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
#define fo(i,n) for(i=0;i<n;i++)
#define set(a) memset(a,0,sizeof(a))
#define MOD 1000000007
#define test() ll t; cin>>t; while(t--)
int main ()
{
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
f... |
cd576d06e026c770880f823176ed91af11287197 | c7318a0f8de5ae65c2617559035235990f471621 | ArtemKudryavtsev/radar_characteristics | /radarcharacteristics.cpp | C++ | cpp | 10,303 | no_license | #include "radarcharacteristics.h"
#include <cmath>
#include <complex>
#include <QtDebug>
#include <fstream>
// ДН по азимуту
QVector<double> RadarCharacteristics::DN_beta(double Nx, double dx, double f,
double beta_target, const QVector<double> & beta)
{
// Nx - Количе... |
7e6a5898f1a88908fc348479749af4e34b860b55 | 21e0560f9ae922ee31276f3e77d566659f55e606 | mrayy/mrayGStreamerUnity | /Plugin/sources/GstCustomDataPlayer.cpp | C++ | cpp | 9,793 | permissive |
#include "GstCustomDataPlayer.h"
#include <gst/app/gstappsink.h>
#include <gst/gst.h>
#include <memory>
#include "GstPipelineHandler.h"
#include "stdafx.h"
//#include "ILogManager.h"
#include "IMutex.h"
#include "IThreadManager.h"
//#include "GZipCompress.h"
namespace mray {
namespace video {
class GstCustomDa... |
c105d5bd9e87161f907b82aa6702abbbbb66fa5f | b4c1b0b4e33afaf67316525fe96e8e946ef40235 | ReyVega/C--course | /Functions/Ejercicio1.cpp | C++ | cpp | 412 | no_license | #include<iostream>
#include<stdlib.h>
using namespace std;
double n1,
n2;
void mult(double n1, double n2) {
cout << "El resultado de la multiplicacion es: " << n1 * n2 << endl;
}
void pedirDatos() {
cout << "Ingresar primer numero: ";
cin >> n1;
cout << "Ingresar segundo numero: ";
cin >>... |
a3d93705143cb98d0a75a7e00428d65fbac95527 | ccb9b26861129a2c7456e8ef28e7ddd952e1242a | PimenovAlexander/corecvs | /utils/fileformats/qtFileLoader.cpp | C++ | cpp | 6,045 | no_license | /**
* \file QTFileLoader.cpp
* \brief Add Comment Here
*
* \date Jun 24, 2010
* \author alexander
*/
#include <QImage>
#include <QImageWriter>
#include <QTemporaryFile>
#include <QStandardPaths>
#include <QDebug>
#include "qtFileLoader.h"
#include "g12Image.h"
#include "qtHelper.h"
using std::string;
using name... |
623d2fad28c1d09ce7b38d3cfe1bb966831a73ef | 0bff7b82ba8a43224c7882637b74f2a7cd864708 | tensor-compiler/taco | /src/lower/lowerer_impl.cpp | C++ | cpp | 3,152 | permissive | #include <taco/lower/mode_format_compressed.h>
#include "taco/lower/lowerer_impl.h"
#include "taco/index_notation/index_notation.h"
#include "taco/index_notation/index_notation_nodes.h"
#include "taco/index_notation/index_notation_visitor.h"
#include "taco/index_notation/index_notation_rewriter.h"
#include "taco/index... |
e099be94488614d2dc575e52ae8131034534ff57 | f9f37f75dc9d3adc82694565f8a11a867e28c688 | QuantumCoderQC/GithubArmoryTest | /Kha/Backends/Kore/khacpp/project/libs/regexp/RegExp.cpp | C++ | cpp | 7,308 | permissive | #ifndef STATIC_LINK
#define IMPLEMENT_API
#endif
#include <hx/CFFI.h>
#include <string.h>
#ifndef PCRE_STATIC
#define PCRE_STATIC
#endif
#include <pcre.h>
#define PCRE(o) ((pcredata*)val_data(o))
typedef struct {
value str;
pcre *r;
int nmatchs;
int *matchs;
} pcredata;
DEFINE_KIND(k_regexp... |
241f07584e9d56727846d082172234101a1572e3 | 3eaf54f82bf9cc446ce18fbf02e19266b16611ac | jeff830107/UVA | /10346 - Peter's Smoke.cpp | C++ | cpp | 383 | no_license | #include <stdlib.h>
#include <stdio.h>
#include <iostream>
using namespace std;
int main() {
int sum, emp, tmp, i;
while (cin >> emp >> i) {
sum = emp;
while (emp >= i) {
sum += emp / i;
tmp = emp % i;
emp /= i;
emp += tmp;
... |
7545479423f391d945ec3b614cfaa17920a44ab6 | 5e19c79771b1e46627cebf6f36ab95025c016f33 | Vikas-Jethwani/Geeks4Geeks-Solutions | /Recursion/04 - Special Keyboard.cpp | C++ | cpp | 698 | no_license | // Fall 7 times and Stand-up 8
#include <bits/stdc++.h>
// StAn
using namespace std;
int ans[76];
// f(n) = max( n, 1 + f(n-1), f(n - i) * (i - 1) )
// i >= 3; if i == 2: f(n-i)*(i-1)=>f(n-i); No use
void pre()
{
for (int i=0; i<76; i++)
ans[i] = i;
for (int i=3; i<76; i++)
{
ans[i] = max... |
9b47763f6883b04f40ada0a33ad42519119c83ab | 661c03d4a10a015db5551da7cd3c6a572b508d41 | Mithileysh/inet-hnrl | /src/applications/udpapp/UDPVideoStreamSvrWithTrace.cc | C++ | cc | 10,192 | no_license | //
// Copyright (C) 2010 Kyeong Soo (Joseph) Kim
// Copyright (C) 2005 Andras Varga
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your o... |
5520c3d486faede87cb044c1ed794b7797f0a28f | 4f3427c1632cfda7b27c29e25379e66f391052e2 | otcshare/chromium-src | /base/debug/asan_invalid_access.cc | C++ | cc | 3,323 | 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 "base/debug/asan_invalid_access.h"
#include <stddef.h>
#include <memory>
#include "base/check.h"
#include "base/debug/alias.h"
#include "build... |
dc74cc04f6e1a6662dcee9d7ab9ce46f29a27779 | ec6f8a8df7982d24462b5439dbca799b7824c923 | banzecrew/skia | /modules/canvaskit/canvaskit_bindings.cpp | C++ | cpp | 93,759 | permissive | /*
* Copyright 2018 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/android/SkAnimatedImage.h"
#include "include/codec/SkAndroidCodec.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkBlurTypes.h"
#include "inc... |
ac58a76d8b42ec02c04fffc31327f083d9ab6149 | 26e20820a0d2b9abd97fc4ac9a94b58538728597 | tgbudd/DT | /thetamodel_snapshots.cpp | C++ | cpp | 3,484 | no_license | #include <iostream>
#include <sstream>
#include <iomanip>
#include "Simulation.h"
#include "Triangulation.h"
#include "DualCohomologyBasis.h"
#include "ThetaModel.h"
#include "CirclePattern.h"
#include "BitmapDrawer.h"
class Snapshot : public Observable {
public:
Snapshot( Triangulation * triangulation,... |
46c277dad9ec574909bdeb856beed9cdbade4156 | 33ec41381e2f62e16caff02576cb641a554fcfc6 | LArSoft/larsim | /larsim/EventWeight/Calculators/GenieWeightCalc.cxx | C++ | cxx | 29,793 | no_license | // GenieWeightCalc.cxx
//
// Handles event weights for GENIE systematics studies
//
// Updated for merge into larsim develop branch on Feb 22 2021 by Steven Gardiner
// Heavily rewritten on Dec 9 2019
// by Steven Gardiner <gardiner@fnal.gov>
// Updated by Marco Del Tutto on Feb 18 2017
// Ported from uboonecode to l... |
f9353cb53853ce4c798e37827c13d0ba022fb3a2 | 3a49adadbf381acfa2fb5c30d323ddcb0e58841f | yarba/artg4tk | /artg4tk/pluginDetectors/gdml/CalorimeterHit.hh | C++ | hh | 1,649 | no_license | // Calorimeter Art Hits
#ifndef CALORIMETERHIT_HH
#define CALORIMETERHIT_HH
#include <vector>
namespace artg4tk {
class CalorimeterHit {
private:
int ID;
double Edep;
double em_Edep;
double nonem_Edep;
double xpos;
double ypos;
double zpos;
double tim... |
f89e500e9fb4a9d83e8ca22d58f8ba8b05d10ce5 | 87b690fdd46afea05353b5e306b5400f5d59d1fd | BeyondSword/JPAT | /Src/1052.cpp | C++ | cpp | 2,019 | no_license | #include<iostream>
#include<stdio.h>
using namespace std;
const int MAXN=100001;
struct ListNode{
int exist;
int val;
int next;
}node[MAXN];
//cur2 头插 cur1
void insert(int prev1, int cur1, int prev2, int cur2, int &head){
//摘cur2,不为头节点时
if(prev2 != -1){
node[prev2].next = node[cur2].next;... |
12b55ea4253e9e70f5531df36f0610f220e821b6 | 1a07a6c64ec0355b5e157fbb17a95a0f5c336d7f | Mogileeswaran/LeetCode_problems_solution | /source-code/Groups_of_Special-Equivalent_Strings.cpp | C++ | cpp | 1,025 | no_license | class Solution {
bool isSpecialEquivalent(string const& s, string const& t) {
int freqOdd[26] = {0}, freqEven[26] = {0};
for(int i = 0; i < s.length(); i++) {
if(i & 1) {
freqEven[s[i] - 'a']++;
freqEven[t[i] - 'a']--;
} else {
... |
b05d12ffcd0effe5eeba71fc861434d7cbefec22 | 14f509ecbf62afd2e9e2a81a727acc89505bf5af | KHOENIX/android_device_xiaomi_picasso | /init/init_picasso.cpp | C++ | cpp | 2,062 | no_license | /*
* Copyright (C) 2019 The LineageOS 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 applicable la... |
b35cc430ccbb27ec2759fc1a097acde9611592b1 | 4b935e32e21622b4667b62e5d29369e963a67445 | indieknite/Super-Spray | /ScoreItem.cpp | C++ | cpp | 1,112 | no_license | /*
* ScoreItem.cpp
* Super Spray
*/
#include <string>
#include "ScoreItem.h"
#define NO_SCORE 0
#define EMPTY_CHAR 0
// Initializes an empty ScoreItem with no name or score.
ScoreItem::ScoreItem()
{
nameLength = 0;
name = NULL;
score = NO_SCORE;
}
// Initializes a ScoreItem with no name or score.
ScoreIt... |
0b357f3e04dd5f39b75fce6c4eb619809d0d5c90 | 12a0409d4e3ca5682600bd8186b71216757f8c1e | inoculate23/P2P-File-Transfer-Client | /src/connectionmanager.cpp | C++ | cpp | 394 | no_license | #include <iostream>
#include "p2pnode.h"
int main(int argc, char** argv) {
unsigned short port = argc == 2 ? P2PNode::strToPort(argv[1]) : P2PNode::DEFPORT;
if (port == 0) { std::cerr << "Invalid port." << std::endl; return EXIT_FAILURE; }
P2PNode connectionManager(port);
std::cout << "Running on port " << port ... |
98f20edbabe637d7cc4d7ef9cf92f3fa85fa0c49 | b5ee271182d9b3718c6d27bae5eac5d0a9a3f1a9 | zxth93/leetcode | /189_Rotate_Array.cpp | C++ | cpp | 448 | no_license | //
// 189_Rotate_Array.cpp
// leetcode
//
// Created by R Z on 2017/8/24.
// Copyright © 2017年 R Z. All rights reserved.
//
#include <stdio.h>
#include <vector>
using namespace std;
class Solution {
public:
void rotate(vector<int>& nums, int k) {
int n = nums.size();
for(int i=0; i<k;i++){
... |
c8c891a8547a8055de3c53b32acbca1cf7667acf | 12e20665b76338304e3b2aa5242352b3be2d5f8d | weixingsun/react-native-caffe | /ios/Caffe/include/caffe/layers/batch_norm_layer.hpp | C++ | hpp | 3,024 | no_license | #ifndef CAFFE_BATCHNORM_LAYER_HPP_
#define CAFFE_BATCHNORM_LAYER_HPP_
#include <vector>
#include "caffe/blob.hpp"
#include "caffe/layer.hpp"
#include "caffe/proto/caffe.pb.h"
namespace caffe {
/**
* @brief Normalizes the input to have 0-mean and/or unit (1) variance across
* the batch.
*
* This layer com... |
3884a6c4faf35d59228943a1ce9feeb9ccfd7107 | 219d65f9572816577c34cafd83ffc0416ef78432 | quintelligence-health/SearchPoint | /SearchPoint/src/cpp/SearchPointSrv.cpp | C++ | cpp | 4,613 | no_license | #include "sp.h"
class TReiStr{
public:
char* inner;
private:
public:
TReiStr(): inner(new char[1]) { inner[0] = 0; }
TReiStr(const char* CStr): inner(new char[strlen(CStr)+1]) {strcpy(inner, CStr);}
~TReiStr(){
delete[] inner;
}
TReiStr& operator=(const TReiStr& Str) {
delete[] inner;
inner=new c... |
ff3777a5ef6a2911c233a230001ca2faa8f68615 | 06369e1089b5c31681e5a2e218d96089500cf8e1 | achintya-7/CP-Directory | /Problems/CodeForces/1579E2.cpp | C++ | cpp | 2,477 | permissive | // problem URL https://codeforces.com/contest/1579/problem/E2
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long
#define uniq(v) (v).erase(unique(all(... |
7cc5b2000855c69f523f84960894583633d4e205 | fe2a7a95dbe3e4057dee81c78fb922d063a04d44 | Symom-Hossain-Shohan/CP_from_windows | /C_Journey.cpp | C++ | cpp | 2,050 | no_license | #include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
//defines...
#define ll long long
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define mp mak... |
4c0e1e4f477a440139b784e3c0e89855f1d0b53c | f4020dc42698a904bf99e3814f2ade2029ca788f | 16071454/work | /InvoiceApp/release/moc_picform.cpp | C++ | cpp | 7,228 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'picform.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1)
**
** WARNING! All changes made in this file will be lost!
*******************************************************... |
c069780cace000e4489162c8d2ceb8fb03933886 | 8e2f9a812b5e438a4b4b542fdad3e5dd2061d8fa | 88plug/sevabit | /src/cryptonote_core/blockchain.cpp | C++ | cpp | 175,566 | permissive | // Copyright (c) 2014-2018, The Monero Project
// Copyright (c) 2018, The SevaBit Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must r... |
11c9e5b07023ccb5ff821fe06564bcc5cf5fd1c6 | 5f3ed19d7f78f3c8553fb1cc667b0f4acb3bf36c | anveshh/cpp-book | /src/Leetcode/461_hamming-distance.cpp | C++ | cpp | 477 | no_license | // https://leetcode.com/problems/hamming-distance/
#include <iostream>
using namespace std;
class Solution
{
public:
int hammingDistance(int x, int y)
{
int count = 0, r;
int z = x ^ y;
for (int i = 0; z; i++)
{
r = z % 2;
z /= 2;
if (r == 1)... |
51b7b844936810893833669ac8af2ffb5f466301 | c7b0ecdf67adbe1d33a1dbc522798de9026e4716 | cailun01/leetcode | /solutions/leetcode_509_solution_3.cc | C++ | cc | 681 | no_license | #include "headers.h"
// 斐波那契数,通常用 F(n) 表示,形成的序列称为斐波那契数列。
// 该数列由 0 和 1 开始,后面的每一项数字都是前面两项数字的和。也就是:
// F(0) = 0, F(1) = 1
// F(N) = F(N - 1) + F(N - 2), 其中 N > 1.
// 给定 N,计算 F(N)。
// 动态规划,优化空间复杂度
class Solution {
public:
int fib(int N) {
if (N == 0 || N == 1) return N;
if (N == 2) return 1;
int curr = 1... |
28646c53f3b899985326acf76a964a438329823e | 3755af537fd7dd02e994021a5f2bd5f9edee8b2d | mseng10/ITKExamples | /src/Filtering/ImageGradient/ComputeGradientMagnitudeRecursiveGaussian/Code.cxx | C++ | cxx | 2,165 | permissive | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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.or... |
186bdc2bc6a38a535181ea2d95a0632196a64062 | 4d22d90ff01c46d3ae30f91d9d5a02954f07e6a2 | federatedcloud/WaterPaths | /src/DataCollector/MasterDataCollector.cpp | C++ | cpp | 33,865 | permissive | //;;
// Created by bernardoct on 8/26/17.
//
#include <fstream>
#include <iomanip>
#include <sys/stat.h>
#include <numeric>
#include <random>
#include <algorithm>
#ifdef NETCDF
#include <netcdf>
using namespace std;
using namespace netCDF;
using namespace netCDF::exceptions;
// Return this in event o... |
e771479857952b1f08a14b38562ffc6f59b836d7 | eed4b58c005b4b7379b86da49b0b27c4e8895794 | aristaeus/rle-voxel | /src/rle.cpp | C++ | cpp | 6,753 | no_license | #include <cstdio>
#include <iostream>
#include "rle.hpp"
void
RLEChunk::print_chunk(){
for(int i = 0, count = 0; i < dim*dim; i++){
if(i == voxels[count+1].coord){
count++;
}
printf("%d ", voxels[count].type);
if(!((i+1) % dim)) printf("\n");
}
}
void
RLEChunk::insert(int coord, int type){
voxels[rle_c... |
d8e3071d75e078138cfee284132b9de82c4a210d | 73bd3450c160740ede1e31fdd49587188a4b11e1 | tensorflow/tensorflow | /tensorflow/compiler/xla/mlir_hlo/lhlo/IR/lhlo_structured_interface.cc | C++ | cc | 851 | permissive | /* Copyright 2021 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 a... |
ccbf99b4abf86a46d93d046c506ad27d885ca137 | 53ec81c8274275ba067875b325e53b4a19d36419 | fersegundo/MineralAnalysis | /codigo/Librerias/LibBarrido/autoenfoque.cpp | C++ | cpp | 27,074 | no_license | /*****************************************************************************
Define las funciones utilizada para la determinación
del contraste en el enfoque.
Autores: JCC, BLM
Copyright: © AITEMIN Enero 2002
*****************************************************************************/
#include "stdaf... |
69068e979691a0e97df756e30f90aa763f1cdde4 | 1d33a636a9262d3a3de2fc256db05a721281a965 | codingiamnot/competitive-programming | /codeforces/1473/A.cpp | C++ | cpp | 514 | no_license | #include <bits/stdc++.h>
using namespace std;
int t,n,d,i;
int a[5005];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cin>>t;
while(t)
{
t--;
cin>>n>>d;
for(i=1;i<=n;i++)
cin>>a[i];
sort(a+1, a+n+1);
if(a[1]+a[2]<=d)
{
... |
12c22722faa5633b1b0d48c5c1fb7d29641fa8a9 | 9284b47d053ea64d25b5f5a4756f21f5cf4c7c1e | karunmatharu/Android-4.4-Pay-by-Data | /external/chromium_org/ash/system/tray/tray_item_more.cc | C++ | cc | 3,029 | 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 "ash/system/tray/tray_item_more.h"
#include "ash/system/tray/fixed_sized_image_view.h"
#include "ash/system/tray/system_tray_item.h"
#includ... |
e8cd6942d86e82aeeaef2cca8879faf772488789 | 72b2de0def8b00cfc724d14efb84e895ccb52aa1 | axkibe/node-vtk | /wrappers/8.1.1/vtkGenericEnSightReaderWrap.cc | C++ | cc | 44,150 | permissive | /* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */
#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>
#include "vtkMultiBlockDataSetAlgorithmWrap.h"
#include "vtkGenericEnSightReaderWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkDataArrayCollectionWr... |
e32ff376d6dee0e43e4528ad5c196d66f7018429 | 3f56d838edc92b8a48a93476d5eb783c6d59214b | lwenzel90/Euler_Repo | /Problem24.cpp | C++ | cpp | 1,285 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
/*
step 1. Find the right most number that is smaller than the next in the array
store its index as firstI
step 2. Find the smallest character/ number to the right of firstI call it secondI
step 3. Swap order[firstI] and order[secondI]
step 4. Revers... |
c89ec887e6179bf3ec011b0c985d462d611f279f | 10d50ca0df2a540705212e9182e2231daf4bb00d | mogoweb/chromium-crosswalk | /content/browser/web_contents/navigation_entry_impl.cc | C++ | cc | 9,231 | 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 "content/browser/web_contents/navigation_entry_impl.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "b... |
a6bc94ad1cd24797deed33a1cf4a2885e7bc6410 | 4273dfe719112eb6f8e7a934887c3475a40ef53d | rojarsmith/bitcoin | /src/test/util/wallet.cpp | C++ | cpp | 803 | permissive | // Copyright (c) 2019-2021 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 <test/util/wallet.h>
#include <key_io.h>
#include <outputtype.h>
#include <script/standard.h>
#ifdef ENABLE_WALLET
... |
03e8018d8e39c244b5edc1dbcd19e497caa154d1 | 0eb70141e9ef2ea0108474729d762b31e63f7f11 | gauravsingh9891/INDL_CPP | /Lecture-15/IntToString.cpp | C++ | cpp | 352 | no_license | #include <iostream>
using namespace std;
string s[10]={"zero","one","two","three","four","five","six","seven","eight","nine"};
void IntToString(int n){
// base case
if(n==0){
return;
}
// Recursive case
IntToString(n/10);
int digit=n%10;
cout<<s[digit]<<" ";
}
int main(){
int n;
cin>>n;
IntToString... |
fa86bd7fcb3d6e96a4599a2a07dfdcdbaffc8910 | 99dee482369c652dedef97e8a4d092335ad07137 | alexanderk23/arm | /libstm32pp/include/peripheral/tim.hpp | C++ | hpp | 6,056 | no_license | /*******************************************************************************
*
* Copyright (C) 2012 Jorge Aparicio <jorge.aparicio.r@gmail.com>
*
* This file is part of libstm32pp.
*
* libstm32pp is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public Lic... |
2a0c8fa009094f02e86f470b2dfbe6faa9b00563 | 1cc7a34d87a1a55d80060caf1fc0a93831f5a88f | SimonSokolowski/Brick-Breaker | /Engine/Bricks.cpp | C++ | cpp | 1,055 | no_license | #include "Bricks.h"
void Bricks::SetCoords(Vec2 pos_in, int i, int i_n)
{
pos = pos_in;
if (i_n >= 1)
{
pos.x = pos.x + (length + dist) * (i_n);
}
}
void Bricks::Draw(Graphics& gfx)
{
for (int posX = pos.x; posX < pos.x+ length; posX++)
for (int posY = pos.y; posY < pos.y + height; posY++)
gfx.PutPixel(... |
a4e27409c00b0d608bc70bb7e7204e9ded1ac6d4 | 17de466b6538aff808c79503ae297bc5b4566839 | garfiaslopez/competitive_programming | /Vjudge/Contest3/SegmentTree.cpp | C++ | cpp | 4,185 | no_license | #include <bits/stdc++.h> //Importa todas las bibliotecas estandar
#define optimizar_io ios_base::sync_with_stdio(0);cin.tie
using namespace std;
const int INF = INT_MAX; //Definimos nuestro infinito
int N; // Numero de elementos
int Q; // Numero de querys
int L,R;// Para el incio y fin de querys, respectivamente
int A... |
a41571156a5bad1a87dad2263b5c9a2a6b4f2b59 | 19aa661a76624d39c07107c4484a164b551114fe | hieudt183739/Aglorithm | /TTUD7/d.cpp | C++ | cpp | 976 | no_license | #include <iostream>
using namespace std;
#define ll long long
int const Max = 1e6 + 1;
int n;
ll a[Max];
ll SumEven[Max];
ll SumOdd[Max];
ll res = -1e6;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n;
for (int i = 1; i <= n; i++)
{
cin >> a[i];
}
if (!(a[1... |
aa5955c33d7bb1fe8b2265dde2aaaf40941bd794 | 909835241fa67efd7d3f2f563ac968f260360286 | fstudio/clangbuilder | /sources/bela/utils/ucwidth/runewidth_table.hpp | C++ | hpp | 24,918 | permissive | // ------------ codegen by ucwidth.go ------------
// Code generated by ucwidth. DO NOT EDIT.
namespace bela::runewidth {
struct interval {
char32_t first;
char32_t last;
};
// clang-format off
[[maybe_unused]] constexpr const interval combining[] = {
{0x0300, 0x036F}, {0x0483, 0x0489}, {0x07EB, 0x07F3},
{0x0C00... |
d279dbc84a8e4d772802bf24445dfbeaa7ab0cb1 | 7de5bcaf3a966baadeec9dc9031ffcf4b94504b7 | phambryan/hiberlite | /src/CppModel.cpp | C++ | cpp | 920 | no_license | #include "hiberlite.h"
namespace hiberlite{
void Model::add(Table t)
{
if( find(t.name)!=end() )
throw std::logic_error("table ["+t.name+"] already exists");
HIBERLITE_HL_DBG_DO( std::cout << "model add table " << t.name << std::endl; )
insert( std::pair<std::string,Table>(t.name,t) );
}
Table::Table()
{
//add... |
096e82987b5f95062eec1f644e39f043393c51fc | ce99b8e45da70bf9fe29dc23b4b074628069f0bb | waaberi/chromium | /extensions/browser/extension_service_worker_message_filter.cc | C++ | cc | 8,913 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "extensions/browser/extension_service_worker_message_filter.h"
#include "base/bind.h"
#include "content/public/browser/service_worker_context.h"... |
97a56ef4540555be96e440a8227aed22b014bd1e | eb4bd6904fb55f9a79e431154ed0093d5cc70c03 | ToruNiina/spray | /src/main.cpp | C++ | cpp | 8,294 | permissive | #include <spray/glad/load.hpp>
#include <spray/glfw/init.hpp>
#include <spray/glfw/window.hpp>
#include <spray/core/buffer_array.hpp>
#include <spray/core/camera_base.hpp>
#include <spray/core/world_base.hpp>
#include <spray/util/log.hpp>
#include <spray/xyz/xyz.hpp>
#include <chrono>
#include <cmath>
#include <img... |
c69ee8356bdfca9107b2cad9b1bcea02eda3207f | a94af22b44f06fc013dafbb15622e76ba5b1c21a | Forrest-Z/localize | /amcl/src/motion.cpp | C++ | cpp | 4,394 | no_license | #include "amcl/motion.h"
static const double EPSILON = 1e-6;
using namespace localize;
// ========== VelModel ========== //
VelModel::VelModel(const double car_length,
const double car_back_center_to_motion_frame_x,
const double car_back_center_to_motion_frame_y,
... |
f3bd500b69c8dbf821b67dbe734c7d1fafc703fa | 8b781b3c804d77985a80bb0bf59a70fe75b17b1c | DiligentGraphics/DiligentTools | /Tests/DiligentToolsTest/src/RenderStateNotationParser/GraphicsTypesParserTest.cpp | C++ | cpp | 20,951 | permissive | /*
* Copyright 2019-2022 Diligent Graphics LLC
*
* 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 applica... |
4fd2811a18d3e646e5ee9ad859422a364803504a | 86b113dfdc9095539a7d439acc4b9b98b3f6c079 | ChaselWu/Painting-Drawingboard-CPP-version- | /Painting (Drawingboard CPP version)/interface.cpp | C++ | cpp | 7,689 | no_license | #include"interface.h"
void Interface::get_screen() {
getviewport(&screen_left, &screen_top, &screen_right, &screen_bottom, NULL,
NULL);
}
//vector<Button> btn_head;
//vector<Button> column;
//vector<Button> steps;
//vector<Button> tools;
//vector<Button> shapes;
//Color colors[10][3][10];
//Point pos_, ... |
fd11e3952abb732295a58c834852ac653d4387a0 | 5412048f2ab12bb8ac2f34a635dfa767a56b069d | teotikalki/vivaldi-source | /chromium/chrome/common/chrome_paths.cc | C++ | cc | 22,404 | 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/common/chrome_paths.h"
#include "base/files/file_util.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/ma... |
da317b196196445c1ab3fbb7038633d1e41ddbca | e6619f54d44585be42cf78f5825988dd9dbd7ac8 | fthaler/gridtools | /include/gridtools/stencil/gpu_horizontal/launch_kernel.hpp | C++ | hpp | 3,087 | permissive | /*
* GridTools
*
* Copyright (c) 2014-2021, ETH Zurich
* All rights reserved.
*
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include <type_traits>
#include <utility>
#include "../../common/cuda_util.hpp"
#include "../../common/defs.hpp"
#i... |
b91a272ba8b2522a924d401e67223e3e930459c6 | cc9b46a8e58ba1ac5f27706e8d0ef5e436f595cc | Unity05/pytorch | /test/cpp_extensions/complex_registration_extension.cpp | C++ | cpp | 1,994 | permissive | #include <torch/extension.h>
#include <c10/core/Allocator.h>
#include <ATen/CPUGenerator.h>
#include <ATen/DeviceGuard.h>
#include <ATen/NativeFunctions.h>
#include <ATen/Utils.h>
#include <ATen/WrapDimUtils.h>
#include <c10/util/Half.h>
#include <c10/core/TensorImpl.h>
#include <c10/core/UndefinedTensorImpl.h>
#inclu... |
20dafa6cd62859f88aaa781b2d09aeb0c0221644 | 484fe417d30ce6e5171878fa0a4c8ae452010186 | sksundaram-learning/ClickHouse | /dbms/src/Storages/StorageTinyLog.cpp | C++ | cpp | 19,908 | permissive | #include <sys/stat.h>
#include <sys/types.h>
#include <map>
#include <Poco/Path.h>
#include <Poco/Util/XMLConfiguration.h>
#include <Common/escapeForFileName.h>
#include <Common/Exception.h>
#include <IO/ReadBufferFromFile.h>
#include <IO/WriteBufferFromFile.h>
#include <IO/CompressedReadBuffer.h>
#include <IO/Com... |
0ea739ea87868fa6c9e33f6dc98dac8f4e2761ce | c7dffb4e3385ce6208dd1eee4260c44835872988 | cfeitong/ACM-problem-archive | /math/4-cf707-C.cpp | C++ | cpp | 2,829 | no_license |
#include <cassert>
#include <numeric>
#include <functional>
#include <iostream>
#include <bitset>
#include <cctype>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <string>
#include <map>
#include <stack>
#include <cstdio>
#include <cstring>
#include <deque>
#include <... |
044d4ea50a4a2396faf7e4c405a0c1a0f77e5288 | f220117407c7473b124dec847c5e3c0455f82748 | TCeason/ClickHouse | /src/Functions/array/array.cpp | C++ | cpp | 3,545 | permissive | #include <Functions/IFunction.h>
#include <Functions/FunctionFactory.h>
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/getLeastSupertype.h>
#include <Columns/ColumnArray.h>
#include <Interpreters/castColumn.h>
namespace DB
{
/// array(c1, c2, ...) - create an array.
class FunctionArray : public IFunction
{... |
beeb9e4b357515ab249fcb85dd5218429cf0842c | ccee6f764b4be9f1bc876c3ccdd331d5701a9dfd | stakenschneider/git.polytest-master | /3/hybrid comsys/селивесртовы/lab6_z1/lab6_z1/lab6_z1/solution1/.autopilot/db/hls_design_meta.cpp | C++ | cpp | 794 | permissive | #include "hls_design_meta.h"
const Port_Property HLS_Design_Meta::port_props[]={
Port_Property("ap_clk", 1, hls_in, -1, "", "", 1),
Port_Property("ap_rst", 1, hls_in, -1, "", "", 1),
Port_Property("ap_start", 1, hls_in, -1, "", "", 1),
Port_Property("ap_done", 1, hls_out, -1, "", "", 1),
Port_Property("ap_idle", 1... |
1d3c0ebae6b23e1b1c6e4b745e8f2f697cf115ca | eeeda5fd2ed7724d05e792c84a20d5a4a59157f1 | skylert7/DataStructureFA2018 | /Final_Project_SearchEngine/Sprint5/Temp/Driver.cpp | C++ | cpp | 249 | no_license | #include "Driver.h"
#include <iostream>
#include <avltree.h>
using namespace std;
Driver::Driver()
{
}
void Driver :: Testing()
{
AVLTree<int>Test;
for(int i = 0; i < 150; ++i){
Test.insert(i);
}
Test.printInOrder();
}
|
22338732f16e6ac2c84a615270b9b7874cc0f6f4 | dde503e3ccd421f007b6842006f58575a7eb19f4 | SgtFlame/indiezen | /Zen/Community/ChatCommon/src/I_ChannelModel.cpp | C++ | cpp | 1,931 | no_license | //-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
// Zen Community Framework
//
// Copyright (C) 2001 - 2009 Tony Richards
// Copyright (C) 2008 - 2010 Matthew Alan Gray
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the aut... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.