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 |
|---|---|---|---|---|---|---|---|---|
73d50ac2f0397bcc44bbb18f9e22237a5cbccf00 | 4a337f9097ee3522a0b902f2a55ce546e61e365c | openvinotoolkit/openvino | /src/common/low_precision_transformations/src/recurrent_cell.cpp | C++ | cpp | 9,737 | permissive | // Copyright (C) 2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "low_precision/recurrent_cell.hpp"
#include <ngraph/pattern/op/wrap_type.hpp>
#include <ngraph/opsets/opset1.hpp>
#include <memory>
#include <ngraph/node.hpp>
#include <ngraph/opsets/opset1.hpp>
#include <ngraph/opsets/opset5... |
a82dfa31ac1e08f629a85d7996f28dd58675df4d | 3bb86a738734d7b67501585fa78df26356b1d8a9 | dmayo/maslab-2016-team-10 | /otherAttempts/otherbot/actuators/motorscontrol.cpp | C++ | cpp | 8,039 | no_license | #include "motorscontrol.h"
#include <unistd.h>
#include <iostream>
motorsControl::motorsControl(sensorsModule *sensors): mysensors(sensors)
{
isTurning=0;
fwdSpeedGain =FWD_SPEED_GAIN;
fwdErrorGain =FWD_ERROR_GAIN;
angSpeedGain = ANG_SPEED_GAIN;
angErrorGain = ANG_ERROR_GAIN;
previousAngle = mys... |
ab692672b2b8a0a0ea21b6a41bb34e344c24b588 | 37f1d47353994729d69c86f1cb30b5ea5de1da7e | RafaelMri/Pretzel | /algorithms.hpp | C++ | hpp | 4,090 | no_license | #ifndef H_ALGORITHMS
#define H_ALGORITHMS
#include <vector>
#include "matrix.hpp"
#include "pretzel.hpp"
// Tries to reorder and reduce the pretzel *p to one that determines an isomorphic
// link. Returns whether any modifications have been made. The resulting pretzel
// has the following properties:
//
// 1. No adj... |
d9de36a9d2ea4ad30ad5d9b5f951745ce6dfdf81 | ad50adb7c2b0815a9284fcc3924d1500af01681c | nani0119/OpensslExample | /rand/rand_example.cc | C++ | cc | 2,098 | no_license | #include <stdio.h>
#include <openssl/bio.h>
#include <openssl/rand.h>
#include <openssl/err.h>
#include <openssl/evp.h>
void randomDataOut(unsigned char* data, int len)
{
BIO* base64 = BIO_new(BIO_f_base64());
BIO* out = BIO_new(BIO_s_file());
BIO_push(base64, out);
BIO_set_fp(out, stdout, BIO_NOCLO... |
9501bae67bddef77d3976febe56583d4709ad255 | f0f84dcd9407260dd569df33164fb9598e3085bd | davidpl064/Ground_Station | /build-Ground_Station-Desktop_Qt_5_12_3_MSVC2017_32bit-Release/release/moc_qfi_ADI.cpp | C++ | cpp | 2,640 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'qfi_ADI.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.3)
**
** WARNING! All changes made in this file will be lost!
************************************************************... |
76aa5c6de26d198805c57d85045f25065195bf06 | c862136eaa24fec27b4c6739d7bea018419d1294 | melnychenkohub/Elementary | /TwoDimensionalArrays/CopyArrays.cpp | C++ | cpp | 469 | permissive | void CopyArr(float **const arr, const float *const copyArr, const int &row, const int &column)
{
int i, j, indx = 0;
for (i = 0; i < row; i++)
{
for (j = 0; j < column; j++)
{
*(*(arr + i) + j) = *(copyArr + indx++);
}
}
}
void CopyArr(int **const arr, const int *const copyArr, const int &row, const int &... |
b8c1a347f5bda500bef2260d6678fc894a8e2ff6 | 1ca2650943e1dbfcbbdd3bc03ebea39aa3c87584 | aidananderson44/OpenGL | /OpenGL/src/Window.cpp | C++ | cpp | 5,026 | no_license | #include "Window.h"
#include <iostream>
Window::Window()
:lastTime(glfwGetTime())
{
if (!glfwInit())
{
std::cout << "Error initializing glfw!" << std::endl;
}
window = glfwCreateWindow(width, height, "", NULL, NULL);
glfwMakeContextCurrent(window);
glfwSetWindowUserPointer(window, th... |
f820568c115ef46a77a535d4e5b5bbf707a875de | 2c48e768230f97ecb4b9800c5de6bf38f0e7b067 | xeon2007/LightSDK | /Source/Branch/MediaUIFramework/Src/Src/D2DAnimatedGif.cpp | C++ | cpp | 13,160 | no_license | /*!
* @file D2DAnimatedGif.cpp
*
* @brief This file defines methods for operating GIF.
*
* Copyright (C) 2010, Toshiba Corporation.
*
* @author Li Hong
* @date 2011/01/03
*/
#include "D2DAnimatedGif.h"
#include "D2DRectUtility.h"
#include "D2DUtility.h"
D2DAnimatedGif::D2DAnimatedGif() : m_pD2DBitma... |
34ef1e19dfffaa0f179b41ab29a7fcd18d939daa | cdcfc0ace62f05546e2d6855c515c44c733d1e8e | lehoon/chromium | /ash/root_window_controller_unittest.cc | C++ | cc | 51,544 | 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/root_window_controller.h"
#include <memory>
#include "ash/common/session/session_controller.h"
#include "ash/common/system/tray/system... |
14819104f3bf4b6815102c06cb527e028997b408 | 2715adf357ef858b30c4e43bcd4d483d9f812c2d | AdrianoPereira/ral-libs-shared | /ConvWx/src/ConvWx/SubgridValWgtCalculator.cc | C++ | cc | 1,487 | no_license | /**
* @file SubgridValWgtCalculator.cc
* @brief Source for SubgridValWgtCalculator class
*/
#include <cmath>
#include <ConvWx/SubgridValWgtCalculator.hh>
#include <ConvWx/ConvWxConstants.hh>
using std::vector;
//
// Value to indicate no area data available
//
const double SubgridValWgtCalculator::minArea = 1;
//... |
280591b1fbf2c01cf3105c3225fa2f2c3e8d5ee1 | dd8bd83c4a73dee34fb0501232a280b8d4153228 | Eclipsim/Eclipsim | /src/qt/optionsdialog.cpp | C++ | cpp | 14,426 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/eclipsim-config.h"
#endif
#include "optionsdialog.h"
#include "ui_optionsdialog.... |
b042ed19b357d6a6967728fa49a1fbb1b19a8704 | 55b23e6c78700ee3881375dde44369d06befd631 | hasanhaja/cranfield-computationMethods-lab2 | /src/main.cpp | C++ | cpp | 377 | no_license | #include <iostream>
#include "aliases.h"
#include "utilities.h"
int main() {
std::vector<double> a = {1.0, 2.0, 3.0, 4.0};
std::vector<double> b = {11.0, 12.0, 13.0, 14.0};
std::vector<double> c = {21.0, 22.0, 23.0, 24.0};
Vector2d<double> sample = {a, b, c};
std::string filename = "test.txt";
... |
1fe8be0894ab5e216b400fcf2ebd12cbff3ecf60 | 96d584c32a4358f7fdf1532a77ab9113f50e406f | hkaiser/range-v3 | /include/range/v3/container/stable_sort.hpp | C++ | hpp | 1,824 | permissive | // Range v3 library
//
// Copyright Eric Niebler 2013-2014
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Project home: https://github.com/ericniebler/range-v3
//
... |
a1e0288542d9878efbfecbdc90eb6ecf5fb0749e | 4e18ae3841ee141f8f09117dcc64ed95fe819db3 | Nobu19800/choreonoid_old | /sample/SimpleController/CameraSampleController.cpp | C++ | cpp | 1,369 | permissive | /**
@author Shin'ichiro Nakaoka
*/
#include <cnoid/SimpleController>
#include <cnoid/Camera>
using namespace cnoid;
class CameraSampleController : public SimpleController
{
DeviceList<Camera> cameras;
double timeCounter;
double timeStep;
public:
virtual bool initialize(SimpleControllerIO* io)... |
d520b90e307bba8aeb8ae22bf5db3bbd7da8374b | 38f62ed6b9f79afe9c324e288a1d4dac3cd53ab4 | dai543103/ServerFramework-1 | /001_ServerLib/BaseLibs/ZmqBus.hpp | C++ | hpp | 1,892 | no_license | #ifndef __ZMQ_WRAPPER_HPP__
#define __ZMQ_WRAPPER_HPP__
#include <stdint.h>
#include "zmq.h"
#include "zmq_utils.h"
//对于ZMQ的封装,在游戏服务器中,所有的服务器内部通信都使用ZMQ
enum enZmqSocketType
{
EN_ZMQ_SOCKET_PAIR = 1, //ZMQ_PAIR
EN_ZMQ_SOCKET_PUB = 2, //ZMQ_PUB
EN_ZMQ_SOCKET_SUB = 3, ... |
dbb8c5ca83a6a6cb8a5abbfd89ee4a3cc8acd641 | 471b8555f33a714fc87ccae1457503a28f44df39 | JieyangChen7/DVFS-MAGMA | /test/magma-1.7.0_timing/src/cgerbt_gpu.cpp | C++ | cpp | 4,691 | no_license | /*
-- MAGMA (version 1.7.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date September 2015
@generated from zgerbt_gpu.cpp normal z -> c, Fri Sep 11 18:29:27 2015
@author Adrien REMY
*/
#include "common_magma.h"
#define PRECIS... |
494fd32a25be70474e0d1dbe40cebce037406c4e | f5cb589c8ff7f4d5026768a8b67f62c8596dcc96 | peterschrammel/cbmc | /src/util/lispirep.cpp | C++ | cpp | 1,902 | permissive | /*******************************************************************\
Module:
Author: Daniel Kroening, kroening@kroening.com
\*******************************************************************/
#include "lispirep.h"
#include "irep.h"
#include "lispexpr.h"
void lisp2irep(const lispexprt &src, irept &dest)
{
de... |
0e4dd25509810588fe3bc8efa6499c47f6779a54 | 62dec8fe1107e5af8aef4045448ee03a48030760 | joricky91/Portfolio | /UTS Data Structure/coba.cpp | C++ | cpp | 4,112 | no_license | #include<iostream>
#include<fstream>
#include<stdlib.h>
using namespace std;
struct mobil{
char plat[8];
int jenis;
int layanan[3];
int masuk;
int keluar;
struct mobil *next;
}*head = NULL, *ptr;
void newNode(char in_plat[8], int in_jenis, int in_layanan[3], int in_masuk, int in_keluar){
s... |
965706227b4a9016f5a4a3c4770a25253e849a8b | b484a26ae834010c84d82aacba6b21af6ef87f44 | dschmoeller/KidnappedVehicle | /src/particle_filter.cpp | C++ | cpp | 9,400 | permissive | /**
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: Tiffany Huang
*/
#include "particle_filter.h"
#include <math.h>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <random>
#include <string>
#include <vector>
#include <tuple>
#include <map>
#include <list>
#... |
8b09055382f766c3b9ee4de9ab170bb4d0a7d6f4 | 7bdc5b5e321e0257003ccac83e3261806cf88d73 | marc-hanheide/cogx | /systems/css-2011-teams/blue/subarchitectures/vision.sa/src/c++/vision/components/ShapeDescriptor3D/DShape3D/ConfigFile.cc | C++ | cc | 2,260 | no_license | /**
* $Id$
*/
#include "Except.hh"
#include "ConfigFile.hh"
namespace P
{
ConfigFile::ConfigFile(const string &name)
{
line_cnt = 0;
file.open(name.c_str(), ios::in);
if(!file)
throw Except(__HERE__, "failed to open file '%s'", name.c_str());
}
ConfigFile::~ConfigFile()
{
file.close();
}
/**
* Reads... |
604cd77591f4206893e9771507e8a2243fe7ee06 | 5f782963c5932dc6e236f7be4c078631b0a9ba34 | kmjp/procon | /srm/741-770/757/MtGFight.cpp | C++ | cpp | 3,139 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<to;x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#de... |
050fbbabf952ada5c16aacebd69fdf4f9af0cff0 | abb66705c5afc386e066d7d8528a13040f781f52 | enerelt21/HW8 | /HW8/EX8_2/Source.cpp | C++ | cpp | 3,287 | no_license | /**
* Eight-Queens Problem
* Reading: 7.5
*/
#include <iostream>
#include <vector>
using namespace std;
const int UNASSIGN_VALUE = -1;
const int NUMBER_ROWS = 8; // Number of rows in our chess board
const int NUMBER_COLS = 8; // Number of columns in our chess board
// RowPlacement is a vector of colum... |
f57b5ae6df21f0167d5c80d636533a39e3bf46f1 | e44c6fb67a69275a1651201e69b03b4e6a291835 | zakuro9715/OpenSiv3D | /Siv3D/include/Siv3D/FontAsset.hpp | C++ | hpp | 4,333 | permissive | //-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2022 Ryo Suzuki
// Copyright (c) 2016-2022 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include "Common.hpp"
# include... |
0e52d49d6ae98939e8c236bf53392c5f0acc4577 | dfa01c05878c026b67b7d95c550a91ca90e7940b | geetanshatrey/Competitive-Coding | /Geeks For Geeks/FriendlyArray.cpp | C++ | cpp | 1,258 | no_license | // Link to the problem : https://practice.geeksforgeeks.org/problems/friendly-array2009/1/
// Problem Name : Friendly Array
// Time Complexity : O(N * log N)
// Technique : Sorting
class Solution
{
public:
int sumOfMinAbsDifferences(int arr[], int n)
{
//code here.
sort(arr, arr+n);
... |
13a9d5f70b8136c68da09185126c7ec1c66f476a | 2762d5b3b16f4ad48531a0607b6d3cbf61dfacdc | tarundecipher/CompetitiveProgramming | /A_Prefixes.cpp | C++ | cpp | 801 | no_license | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
string s;
cin >> s;
int c = 0;
int ca = 0, cb = 0;
for (int i = 0; i < n; i++)
{
if (s[i] == 'a')
{
... |
f3dad4d19c88e2e93fbf83142595a11f1bcdfb3e | e413f4847557087e0f0fa19cd2d456b058ecb5cf | fried-soba/Obstacle_avoidance | /src/AscendingNodeQueue.cpp | C++ | cpp | 776 | no_license | #include <algorithm>
#include "AscendingNodeQueue.h"
void NodeList::push(Node* obj) {
pq.insert(pq.begin(), obj);
sortList();
}
//最小値である先頭要素をpopして返す
Node* NodeList::pop() {
tmp = pq[0];
pq.erase(pq.begin());
return tmp;
}
Node* NodeList::top() {
return pq.front();
}
int NodeList::size() {
return pq.size();
}... |
06e7815169cca02acfe42aba49833c5c51641f5c | 2d83630d641d3ff50381d01eaf4055de316332fd | manmeet-si/Chimera | /drivers/TransientPoisson/TransientPoisson_Chimera_main.cpp | C++ | cpp | 13,173 | no_license | //---------------------------------------------------------------------------//
/*!
* \file TransientPoisson_main.cpp
* \author Stuart R. Slattery
* \brief Driver for transient poisson problem.
*/
//---------------------------------------------------------------------------//
#include <iostream>
#include <vector>
... |
130992eef1f02692590efbe1c4ab1e56ebd64010 | f380ff4ed1c2a05893cefcb03c0d1a08e560a97b | herbyme/pkmDetector | /include/opencv2/contrib/contrib.hpp | C++ | hpp | 21,488 | 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, instal... |
381b3226a7c3fbc1779c9f5a45b956c08ec71c7b | 5df2e174727d070c2f260bf9cd29f3b76b903552 | hayate891/Critical-Hit-engine | /core/src/Common/Color.cpp | C++ | cpp | 1,360 | permissive | #include <stdexcept>
#include <string>
#include "Color.h"
Color::Color(float red, float green, float blue, float alpha) : red(red), green(green), blue(blue), alpha(alpha)
{
}
Color::Color(float red, float green, float blue) : red(red), green(green), blue(blue), alpha(1.0f)
{
}
Color::Color(const Color& other) : re... |
713740f8c46221d23849fa7522ec4f4c1cea17a3 | f8eb3fb7bab92b68e09103c583a71250c6856589 | mdbrelo/PUBG-SDK | /SDK/PUBG_OnlineSubsystemUtils_parameters.hpp | C++ | hpp | 27,908 | no_license | #pragma once
// PlayerUnknown's Battlegrounds (2.6.30.2) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace Classes
{
//---------------------------------------------------------------------------
//Parameters
//------------------------------------------------------------------------... |
42ea0383d377493ab0b6cde7c7e09bc2bf8f3950 | 954b42977e6ff508481316db75ab31b3defd9dfa | Shasthojoy/ROCm-OpenCL-Runtime | /runtime/device/rocm/rocdefs.hpp | C++ | hpp | 2,961 | permissive | #pragma once
#ifndef WITHOUT_HSA_BACKEND
namespace roc {
//! Alignment restriciton for the pinned memory
const static size_t PinnedMemoryAlignment = 4 * Ki;
typedef uint HsaDeviceId;
struct AMDDeviceInfo {
HsaDeviceId hsaDeviceId_; //!< Machine id
const char* targetName_; //!< Target name for compilatio... |
50cd03862a4e4dbaceb04d951755dcd9cc444c1d | 75ff512f9eaf12ed288d547fa0f6c0107ffbc603 | test-m-tmatma/test-sakura | /sakura_core/recent/CRecentReplace.cpp | C++ | cpp | 2,688 | permissive | /*! @file */
/*
Copyright (C) 2008, kobake
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial ap... |
17e6ec83b3b42b075ba92abd0a5a2442fef3424d | 3f3b49750e6ef27d39cbcaa378fec22bc1cf655b | hrliuwei/duicef | /DuiCef/COptionLayoutUI.cpp | C++ | cpp | 2,779 | no_license | #include "stdafx.h"
#include "COptionLayoutUI.h"
COptionLayoutUI::COptionLayoutUI(int width, int height)
: CElementLayoutUI(width, height)
, m_pOption(nullptr)
, m_pLabel(nullptr)
, m_padding(0,0,0,0)
{
}
COptionLayoutUI::~COptionLayoutUI()
{
}
void COptionLayoutUI::CreateChildControls()
{
wchar_t value[32];
... |
91028df0ce7c370bc20b675138452ea616e46024 | 7a28a2ba23c92e2907a260a6f894a7ed0129d0f3 | wangjunbao/nontouchsdk | /src/NthMouseControl.cpp | C++ | cpp | 317 | no_license | /*
* NthMouseControl.cpp
* CopyRight @South China Institute of Software Engineering,.GZU
* Author:
* 2010/10/20
*/
#ifndef DLL_FILE
#define DLL_FILE
#endif
#include "NthMouseController.h"
NthMouseController::NthMouseController(void)
{
}
NthMouseController::~NthMouseController(void)
{
}
|
3bcde1b6f0c9940fa190137b2eec3a67dcae5a03 | 4c1510f5c116acf0e0276b87c3217cbb5c59370a | karunmatharu/Android-4.4-Pay-by-Data | /external/chromium_org/base/nix/xdg_util.cc | C++ | cc | 3,511 | 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 "base/nix/xdg_util.h"
#include <string>
#include "base/environment.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#includ... |
71dca105807f70e1565763638be40bba39c1b8a0 | d626bcb9328a160d3139ca4d64e3cdc9a86497f5 | spurnaye/Feather | /microbenchmark/test1.cpp | C++ | cpp | 728 | no_license | // Basic Write-Write false sharing test
#include<atomic>
#include<iostream>
#include<thread>
#define N (1L << 28)
#define CACHE_LINE_SIZE (64)
using namespace std;
struct alignas(CACHE_LINE_SIZE) {
atomic<int> x;
atomic<int> y;
} A;
/* We expects samples to be reporting W-W false sharing */
void Work(int me... |
4459f67c28e9bce1067eb6b4500986b65b627574 | f66f7f689676c28c294b010d6833b44929167e97 | MISabic/Competitive-Programming-Problem-Implementation | /hackerearth/The Monk and Kundan.cpp | C++ | cpp | 3,866 | no_license | //====================================================//
//=============// IN THE NAME OF ALLAH //=============//
//=======H W C B N T --- RL STUDENT OF G SENSEI=======//
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define read freopen("in.txt", "r... |
62417b2ecad252c26e9179e977292b1286b442b9 | 075c2e31667e3b19a63172fee54f5118b4edd741 | freak97/frameworks_av | /services/camera/libcameraservice/api1/CameraClient.cpp | C++ | cpp | 39,340 | permissive | /*
* Copyright (C) 2012 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... |
9f06ba6a3ccae5ec5567a4c9cab63d6c8f1a9d04 | fa9c4ea99703935b951f59ca7cebc9f0c4f673a6 | sque/glpp | /examples/common/skybox.cpp | C++ | cpp | 2,745 | permissive | /**
* Copyright (c) 2012 Konstantinos Paliouras <squarious _ gmail _dot com>.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the ... |
13164ed7a110ad5b22d8a16135d03748ccfd89a4 | 96d3fa98f3ee1aca6d9e56997e30e635fe5c29bc | lcyzgdy/KeepDistance | /cocos2d/external/bullet/MiniCL/MiniCLTaskScheduler.cpp | C++ | cpp | 15,245 | permissive | /*
BulletSprite Continuous Collision Detection and Physics Library
Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is... |
0d5898a6e2e634b3ff757e08915e3bbe6c54b58b | d6764da5dbc931827467739238f29da6378af867 | zhenglu0/Real_Time_System_Projects | /parallel_gedf/task_manager.cpp | C++ | cpp | 4,889 | permissive | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sched.h>
#include <unistd.h>
#include <omp.h>
#include <math.h>
#include <signal.h>
#include <sstream>
#include <iostream>
#include <sys/types.h>
#include <pthread.h>
#include "task.h"
#include "task_manager.h"
#include "timespec_functions.h"
int mai... |
25004faf8ba8268702ab894f2f1020e77bb724ba | 2dcd249fe238f2c564997fd98d1d20c2bc3d6546 | Chazyboy775/Dead-by-Daylight-SDK | /SDK/杀机_AIModule_structs.hpp | C++ | hpp | 45,707 | no_license | #pragma once
// 黎明杀机 (4.22.3) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "杀机_Basic.hpp"
#include "杀机_Engine_classes.hpp"
#include "杀机_NavigationSystem_classes.hpp"
#include "杀机_CoreUObject_classes.hpp"
#include "杀机_GameplayTasks_classes.hpp"
#include "杀机_GameplayTags_classes.hpp"
namespace SDK
{
/... |
0c98c244ec33bc40060606199c5eb6962838d64e | 4a5c9864d0e7316d6ea8d4115d5a4f3fa684304a | AnminQ97/Titan-Souls | /D2D/Collider/Collider.cpp | C++ | cpp | 4,670 | no_license | #include "stdafx.h"
#include "collider.h"
Collider::Collider()
: bDrawColliderColor(false)
{
shader = new Shader(L"Bounding.fx");
CreateBuffer();
D3DXMatrixIdentity(&world);
sWorld = shader->AsMatrix("World");
sView = shader->AsMatrix("View");
sProjection = shader->AsMatrix("Projection");
sColor = shader->As... |
89c4f07377774aedf9deb90da63ab63059f84ad6 | 991ee44366ea435fd2131b025c630c3467488f56 | tanmaysahay94/Algorithm | /CPP/1088_permutation.cpp | C++ | cpp | 1,036 | no_license | #include <bits/stdc++.h>
using namespace std;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename __Tp1>
void __f(const char* name, __Tp1&& __tp1){
cerr << name << " : " << __tp1 << std::endl;
}
template <typename __Tp1, typename... __Tps>
void __f(const char* names, __T... |
bfacf253f7e80327c8b41ab735c72bd1457f6245 | e295f988ef571ec714d2faae009cf33cd7694c31 | GArGuTZ/Dr.Web | /DrWebAnswer/DrWebAnswer/Censorship.cpp | C++ | cpp | 436 | no_license | #include "Censorship.h"
void Censor::swap(std::string& _str)
{
std::string place = toLower(_str);
std::size_t found = place.find(census);
if (found == std::string::npos)
{
std::string::swap(_str);
}
else
{
throw "Find dr.web in input";
}
}
std::string Censor::toLower(std::string _input)
{
std::transfo... |
5a5ad719e1c1eceaf3b1dc6665b73cefc90e5053 | c55af94cb3b326b6373be5c176a41e7b57f498de | YiChenCityU/OpenARK | /samplecode/UKFAttitude.cpp | C++ | cpp | 3,270 | permissive | /** OpenARK UKF usage example */
#include<iostream>
#include<Eigen/Core>
// OpenARK Libraries
#include "UKF.h"
using namespace ark;
/** Toy UKF model for tracking position and attitude, given GPS position + Gyroscope reading as input */
struct ToyTrackerUKFModel {
/** define state vector: <scalars, 3-vectors, q... |
ed4ba303a09786e4a60bebd5b7bdb75e5a982693 | 86db818480f793b8d2cce9bc8c5d18f13d98d487 | PSS1998/OpenMP-parallelism | /exer02/main.cpp | C++ | cpp | 2,093 | no_license | #include "stdio.h"
#include "stdlib.h"
#include "omp.h"
#define N 10000000
#define NO_THREADS 8
struct node{
int data;
struct node *next;
};
struct node *head;
void create_list ()
{
struct node *newNode, *ptrNode;
head = new node;
head->data = 0;
head->next = NULL;
// Add N items to... |
3305c8c511d76bae26f076ad43fa48a6112522c3 | 52953a76dd3980572ab145c6fa5420406d8c63cf | Starboomboom37183/C_programming | /剑指offer/main/main/main.cpp | C++ | cpp | 745 | no_license | #include<iostream>
#include<string>
#include<vector>
using namespace std;
vector<vector<int> > transformImage(vector<vector<int> > mat, int n) {
// write code here
int temp = 0;
for(int i=0;i<n/2;i++){
for(int j = i;j<n-i-1;j++){
int temp = mat[i][j];
mat[i][j] = mat[n-j-1][i];
mat[n-j-1][i] = mat[n-i-... |
3e4a5fb85ecfa38b79ee115b319a10528039309e | 76555fc53559d2bb0bb94c76bcaf2a66797b610c | semonec/nodegui | /src/cpp/lib/QtWidgets/QLayout/qlayout_wrap.cpp | C++ | cpp | 668 | permissive | #include "QtWidgets/QLayout/qlayout_wrap.h"
#include "Extras/Utils/nutils.h"
Napi::FunctionReference QLayoutWrap::constructor;
void QLayoutWrap::init(Napi::Env env) {
char CLASSNAME[] = "QLayout";
Napi::Function func = DefineClass(
env, CLASSNAME, {QLAYOUT_WRAPPED_METHODS_EXPORT_DEFINE(QLayoutWrap)});
con... |
0765268aa43ccd9986924715fc45ec451b5fc110 | 831449fc3b45ad7e4570fde820fcab78847d10bc | AsherCarneiro/MLH-INIT-Projects | /Day 4.cpp | C++ | cpp | 296 | no_license |
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
// This program will create same sequence of
// random numbers on every program run
for(int i = 0; i<5; i++)
printf(" %d ", rand());
return 0;
// Day 4 Submission - Asher Carneiro
}
|
f119059d013b497d0807e901626f9dd1a7b4f025 | 07820d9373e1872dcd5f7e452de285729ccc1bb4 | AndyUrquijo/PlantFractals | /Source/MatrixStack.cpp | C++ | cpp | 516 | no_license | #include "MatrixStack.h"
MatrixStack::MatrixStack( )
{
current = Matrix44::MakeIdentity();
}
MatrixStack::~MatrixStack( )
{
}
void MatrixStack::PushMatrix( )
{
matrices.push( current );
}
void MatrixStack::PopMatrix( )
{
current = matrices.top();
matrices.pop();
}
void MatrixStack::MultMatrix( const Matrix44... |
891e1803d9e8ed2cd979dc08d34e20fa9228fecb | 83245690ae04f80e9cb515a2f652a3b190f0f498 | brycepg/machine_learning_group2 | /mlpack-1.0.12/src/mlpack/methods/range_search/range_search_impl.hpp | C++ | hpp | 11,126 | permissive | /**
* @file range_search_impl.hpp
* @author Ryan Curtin
*
* Implementation of the RangeSearch class.
*
* This file is part of mlpack 1.0.12.
*
* mlpack is free software; you may redstribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3-clause BS... |
b38195110f0c66aae84b9459e729bbb1d05f2e68 | 68f0613e584629b211d2863254ad255cb9c95ac8 | Jianru-Lin/v8 | /src/x64/macro-assembler-x64.cc | C++ | cc | 150,750 | permissive | // Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of ... |
edd87aa8b0d2d41fb8ca237e212269f95477e620 | d342f4c06190c760b0bb7d5c3291cf14b8311677 | webanpick/webanpick-master | /libraries/wallet/api_documentation_standin.cpp | C++ | cpp | 3,431 | permissive | /*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the... |
0ffd95a9964d4e83547d0a29029d9c9b13072cae | 687adc183de837645789e0b69a4f5ac18ea659e6 | dmilos/color | /example/less-than-1k/reference/lms_vKD65.cpp | C++ | cpp | 955 | permissive | #include <iostream>
#include <iomanip>
#include "color/color.hpp"
using namespace std;
using namespace color;
#define print(c) cout << c[0] << ", " << c[1] << ", " << c[2] << endl;
int main( int argc, char *argv[] )
{
lms<uint8_t , constant::lms::von_Kries_D65_entity > c1( constant::aqua_t{} );... |
6313a87d8d32794a79db5374d7d8f8d9931608b7 | 68d7da5425e51c4388f95dca61b0006091c4084a | SangeethaPrabhu2021/Algorithms-For-Software-Developers | /Subarray Product Less Than K.cpp | C++ | cpp | 420 | permissive | class Solution {
public:
int numSubarrayProductLessThanK(vector<int>& nums, int k) {
if(k<=1)
return 0;
int res=0;
int prod=1;
int left=0;
for(int i=0;i<nums.size();i++){
prod*=nums[i];
while(prod>=k){
prod/=nums[left];
... |
cc17600682eb3e3c7d198b35f358864bd80523ee | bb365c61725c82c0ce7a13c88a9e82af7ca6737e | poojadhoble32/c-c-projects | /readdata.cpp | C++ | cpp | 738 | no_license | #include<stdio.h>
#include<fcntl.h>
#include<io.h>
#define BLOCKSIZE 10
int DisplayData(char fName[])
{
int fd=0,iRet=0;
char Arr[BLOCKSIZE];
fd=open(fName,O_RDONLY);
if(fd==-1)
{
printf("file unable to open\n");
return -1;
}
printf("file is open with fd %d\n",fd);
lseek(fd,0,SEEK_E... |
19be476a92887238a93f16e9de790bf71a0e48d5 | 4c7a29a5a0ada8d9a5c5ca623a37811d2ef5efd6 | shaleen97/new | /shaleen.cpp | C++ | cpp | 669 | no_license |
//this code outputs 0 to 9
for(int i=0; i<10;)
cout<<i++<<""\n";
//this code output 1 to 10
for(int i=0; i<10;)
{
cout<<++1<<"\n";
}
switch (n){
case 0;
cout<<"you typed zero.\n";
break;
case 1;
case 4;
case 9;
cout<<"n is a perfect ... |
60e9d14acaa2c97ac31d58987dc43699d87e1cd4 | 5280397c0ac89943ed8d7643e10cf0f2e958e5b8 | B1sounours/PlayRho | /PlayRho/Dynamics/MovementConf.hpp | C++ | hpp | 1,627 | permissive | /*
* Copyright (c) 2021 Louis Langholtz https://github.com/louis-langholtz/PlayRho
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this... |
92d2a90556673cce01fb93db5c8e315fe661ce96 | 25153815a14ed4a9742f6a70a1eaebd46c02c02d | nbadalls/caffe-server | /include/caffe/gender_age_result.hpp | C++ | hpp | 562 | permissive | /*
* gender age test with multi-label
* age 0-15 16-25 26-35 36-45 46-55 56-65
*
*
*/
#include "caffe/softmax_test.hpp"
namespace caffe {
class Age_Gender_Result : public SoftMax_Test
{
public:
Age_Gender_Result(const string & param_path);
void SaveTrueFaceResult();
private:
//first item is average b... |
d337d3c8f38fab856a277132d579600973d2d52a | 0327dbad58d53f8b9cb5042033bc72fd4b512929 | mhahnenberg/v8 | /src/heap/setup-heap-internal.cc | C++ | cc | 43,111 | permissive | // Copyright 2017 the V8 project 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 "src/builtins/accessors.h"
#include "src/codegen/compilation-cache.h"
#include "src/execution/isolate.h"
#include "src/execution/protectors.h"
... |
41189952a4421885ca39c029e8a803709d7874f1 | 7bb05eae8846caabb6c68c4a512bb900b3f259e2 | NespressoDispenser/NespressoDispenser | /Code/test codes/sensors_functions.cpp | C++ | cpp | 3,586 | no_license | #include "sensors_functions.h"
void init_pins(){
// Inductive sensors pins as input
pinMode(IND_SENS_1,INPUT);
pinMode(IND_SENS_2,INPUT);
pinMode(IND_SENS_3,INPUT);
pinMode(IND_SENS_4,INPUT);
// Phototransitors pins as input
pinMode(PHOTOTR_SENS_1,INPUT);
pinMode(PHOTOTR_SENS_2,INPUT);
pinM... |
b1baa81d94a26ca7295f464cd0f14a0b291717dc | 6d8cea0bf3cf20228592975598b8f589e8a9403e | KDE/okteta | /kasten/controllers/view/structures/script/scriptlogger.hpp | C++ | hpp | 3,749 | no_license | /*
This file is part of the Okteta Kasten Framework, made within the KDE community.
SPDX-FileCopyrightText: 2010, 2011, 2012 Alex Richardson <alex.richardson@gmx.de>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#ifndef KASTEN_SCRIPTLOGGER_HPP
#define KASTEN_S... |
05e142b04deb68af33adf05cb4ba8be08c70f3cf | 51096cfbf7f2dabbdf5e5f902fe9ea710e5b13c9 | LeandrOS1/msphpsql | /source/sqlsrv/conn.cpp | C++ | cpp | 46,772 | permissive | //---------------------------------------------------------------------------------------------------------------------------------
// File: conn.cpp
//
// Contents: Routines that use connection handles
//
// Microsoft Drivers 4.1 for PHP for SQL Server
// Copyright(c) Microsoft Corporation
// All rights reserved.
// M... |
de5a156a426cf538942095ef425f62eee53ceaf5 | a9fde95031dbe500e3ffd4a285ced9c6110be61a | BeardyKing/OpenGL---2D | /OpenGL/src/tests/TestTexture2D.cpp | C++ | cpp | 1,995 | permissive | #include "TestTexture2D.h"
#include "Renderer.h"
#include "imgui/imgui.h"
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
namespace test {
TestTexture2D::TestTexture2D()
:
m_Proj(glm::ortho(0.0f, 960.0f, 0.0f, 540.0f, -1.0f, 1.0f)),
m_View(glm::translate(glm::mat4(1.0f), glm::vec3(0, 0, 0))),
... |
04c9677332dff4771fb3292a5f6839dc090031c6 | 48030566873d678b05ec95324cc878349df261b3 | liebercanis/MaGeLAr | /generators/src/MGGeneratorReadSpectrumFile.cc | C++ | cc | 9,375 | no_license | //---------------------------------------------------------------------------//
//bb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nubb0nu//
// //
// //
... |
0f4481bb2dfb9229b391fda7c3ec3f6bb1a6631e | 1c9a8a5e47d7736e9e0a8513a9b6419cce4293df | rushioda/PIXELVALID_athena | /athena/Trigger/TrigConfiguration/TrigConfStorage/src/TriggerThresholdValueLoader.cxx | C++ | cxx | 7,907 | no_license | /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/////////////////////////////////////////////////////////////////////
//
//NAME: TriggerThresholdValueLoader.cpp
//PACKAGE: TrigConfStorage
// ... |
9c090f4505c993edee0cf918520ba0d7493de0d6 | 09c73f6224e3cf2a37d0c6507e8c82fa60624886 | cxmlg/aliyun-openapi-cpp-sdk | /ehpc/src/model/ListNodesNoPagingRequest.cc | C++ | cc | 2,102 | 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... |
ee4293226aaa2f04ed53d89513f9ce1c7808d638 | 1dd635ec12bb5749841df07aab057cbd56d17dcd | jayparekhjp/openCV-Facial-Recognition | /openCV/sources/modules/gpu/test/nvidia/main_nvidia.cpp | C++ | cpp | 18,563 | permissive | /*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... |
e3518697e4b7483e257497111a0eeb4b067f91c4 | f1a9cebb388fff957d69018741fb3a26ff75b905 | mellinoe/veldridcpp | /src/veldridcpp/CommandList.cpp | C++ | cpp | 31,432 | no_license | #include "stdafx.h"
#include "VeldridConfig.hpp"
#include "CommandList.hpp"
#include "DeviceBuffer.hpp"
#include "ResourceFactory.hpp"
#include "Framebuffer.hpp"
#include "FormatHelpers.hpp"
#include "Util.hpp"
#include "vulkan.h"
#include <algorithm>
namespace Veldrid
{
CommandList::CommandList(GraphicsDevice* gd)
{
... |
705f07ba4ec0795bb006cc15e7d7b84faba72ddf | c41affb6084018d746b636d1e7e07709e7087def | niuxu18/logTracker-old | /second/download/curl/gumtree/curl_repos_function_877_curl-7.51.0.cpp | C++ | cpp | 2,717 | no_license | CURLcode glob_next_url(char **globbed, URLGlob *glob)
{
URLPattern *pat;
size_t i;
size_t len;
size_t buflen = glob->urllen + 1;
char *buf = glob->glob_buffer;
*globbed = NULL;
if(!glob->beenhere)
glob->beenhere = 1;
else {
bool carry = TRUE;
/* implement a counter over the index ranges o... |
683a2e48e16f91fb5b46bb10a5cb47722b40a1b4 | 90ea21eaf435e3f8bb93207c6fcdedc1500cc034 | illuhad/Kernels | /Cxx11/stencil-kokkos.cc | C++ | cc | 8,835 | permissive |
///
/// Copyright (c) 2013, Intel Corporation
///
/// Redistribution and use in source and binary forms, with or without
/// modification, are permitted provided that the following conditions
/// are met:
///
/// * Redistributions of source code must retain the above copyright
/// notice, this list of conditions... |
aff27cb603fd41b544191acd5c6ecce2a16c2d8b | cfa62cba47541720e587a638e74b2ce265be2615 | isciences/wsim | /wsim.lsm/src/coalesce.cpp | C++ | cpp | 1,848 | permissive | // Copyright (c) 2018-2019 ISciences, LLC.
// All rights reserved.
//
// WSIM is 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 require... |
b4c06a973e646d38a1ac2d527765d53214b06e07 | 03b9b95e5d7a2d8b09eda16275ac062f4b7bfacc | sws-team/AnimationConvertor | /mainwindow.cpp | C++ | cpp | 4,851 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>
#include <QMovie>
#include <QFileDialog>
#include <QPainter>
#include <QDropEvent>
#include <QMimeData>
#include <QDragEnterEvent>
#include <QtMath>
#include <QMessageBox>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::... |
2391dafe5af6124a0b2af264883b69a11f1324b9 | 9292b0388e5d4165f10532e6aa01cb78f62c7a0a | SherlockThang/sidecar | /GUI/AScope/HistoryControlWidget.cc | C++ | cc | 3,600 | permissive | #include "GUI/LogUtils.h"
#include "GUI/ToolBar.h"
#include "App.h"
#include "DisplayView.h"
#include "History.h"
#include "HistoryControlWidget.h"
#include "HistoryPosition.h"
#include "HistorySettings.h"
#include "Visualizer.h"
using namespace SideCar;
using namespace SideCar::GUI::AScope;
Logger::Log&
HistoryCont... |
60112ca50384015ae6540e17d037e6e2afa0c4ba | db9905056f07123a8009d7f1774ce36c1bf5ea22 | jtlai0921/PG20173_example | /PG20173_example11/PG20173_example/Update76/ClientNetView.cpp | C++ | cpp | 2,565 | no_license | // ClientNetView.cpp : implementation of the CClientNetView class
//
#include "stdafx.h"
#include "ClientNet.h"
#include "ClientNetDoc.h"
#include "ClientNetView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
///////////////////////////////////////////////////////... |
1668d0eefc2af349c4ae62a7fe4680de94d1b426 | 8d559c140fcc927fc57dc54c0f6e41ee39fe836f | limit79/cubicle_detect | /darknet_ros/src/yolo_object_detector_node.cpp | C++ | cpp | 2,967 | no_license | /*
* yolo_obstacle_detector_node.cpp
*
* Created on: June 19, 2018
* Author: Zhang Handuo
* Institute: NTU, ST Corp Lab
*/
#include <darknet_ros/YoloObjectDetector.hpp>
#include <message_filters/subscriber.h>
#include <message_filters/synchronizer.h>
#include <message_filters/sync_policies/approximate_t... |
1865ff00c293f142a39036acee56e2e6b01860ca | bf36c38c2facfbd6aded8a8dc5e11dbb2839ff51 | GreatChain/BitcoinMoney | /src/qt/intro.cpp | C++ | cpp | 10,541 | permissive | // Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
#endif
#include "fs.h"
#include "intro.h"
#include "ui_intro.h... |
20804c9d31db98d986fe0df1841e1e6b826b9641 | a2574c4c58a2e2099f341fd590cfacf4c2f68211 | adarsh523/Cpp-Programs | /operator overloading 2.cpp | C++ | cpp | 636 | no_license | #include<iostream>
using namespace std;
class Complex
{
private:
int real,imag;
public:
Complex(int r=0,int i=0)
{
real=r;
imag=i;
}
//this is automatically called when "+" is used between 2 complex objects
Complex operator+(Complex const &obj)
{
Complex res;
res.real=(*th... |
9e0c46480e31b59fde472d7baee28089b300477c | 2bd1ca79bfe85cfb3a6cebfd5fbd44d4e7983360 | kjbartel/clmagma | /src/spotrf.cpp | C++ | cpp | 8,791 | no_license | /*
-- clMAGMA (version 1.3.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date November 2014
@author Stan Tomov
@generated from zpotrf.cpp normal z -> s, Sat Nov 15 00:21:37 2014
*/
#include "common_magma.h"
#define A(i, j) ... |
2bd25a11178ffc403de7a2202556a7cb8e02b233 | 0bf976ce94033bad87a227e0d22fc169cab7468f | hieupm123/Hieu | /code/C++/CSES-Solutions/Tree Algorithms/Company Queries II (1688)/catkl.cpp | C++ | cpp | 2,182 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vpi> graph... |
26002af523c00d8d9eee022877c8df7a3ada4942 | 45d1b9c3bacf024e656640d9b7530b489780d4f0 | kcudcigam/Problems | /source/2019.08.13/王星钱/deal.cpp | C++ | cpp | 1,262 | no_license | #include <bits/stdc++.h>
using namespace std;
template<class T> inline void read(T& x){
x=0;T f=1;char ch=getchar();
for (;!isdigit(ch);ch=getchar()) if (ch=='-')f*=-1;
for (;isdigit(ch);ch=getchar()) x=(x<<1)+(x<<3)+(ch^48);
x*=f;
}
typedef long long ll;
const int N=1010;
const int M=5010;
const ll MOD=1000000007l... |
42e4a78e6e44b2f4c3f1ff18bd062027d2c955ed | 794999e5aaf8a3c80893b202c011850c4f694e33 | yana87gt/procon | /atcoder/dwacon2017-prelims/b.cpp | C++ | cpp | 598 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);++i)
int solve(string T){
int res=0,cnt=0;
rep(i,T.size()){
if((cnt%2==0 && T[i]=='2')||(cnt%2==1 && T[i]=='5'))cnt++;
else if(T[i]=='2')cnt=1;
else cnt=0;
res = max(res,cnt);
}
return re... |
96c217af226b206823a7a3b3bacf898851f99116 | 1385d1e84cdf779dfc87bde9b4be1990648b4dc0 | bilportistivraboti/crunchy | /crunchy/internal/algs/crypt/crypter_test.cc | C++ | cc | 27,998 | permissive | // Copyright 2017 The CrunchyCrypt 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 o... |
6355b674d55608d9603a1b6e900dc003bf91577e | 6a4dd3fae3b19f235b355b72aeb82e47ab26285f | subhendu-poddar/competitive-programming | /G_Maximize_the_Remaining_String.cpp | C++ | cpp | 1,572 | no_license | #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pb push_back
#define vv vector
#define ff first
#define ss second
#define pr pair<ll,ll>
#define setpr(x) fixed<<setprecision(10)<<x
#define FOR(i,a,n) for(ll i=a;i<n;i++)
#define For... |
75c7f4ef71212c3cc5a8383477159b8f7c123896 | e9ee04908165fbec83ecf67b7f8bdb025366d9ee | shas9/codehub | /Codeforces/Educational/Educational 105/Upsolve/B.cpp | C++ | cpp | 2,448 | no_license | // God put a smile upon your face <3
#include <bits/stdc++.h>
#define slld(longvalue) scanf("%lld", &longvalue)
#define ll int
#define ull unsigned long long
#define pll pair < int, int >
#define fastio ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define pb push_back
#define bug printf("BUG\n")
#... |
b190abe2c88ae543e316f4e03d2ed321e36e1d95 | 29ac6682f1792300bb4bd4405b52fe619df37e72 | GYESS1/XHimera | /src/kernel.cpp | C++ | cpp | 19,364 | permissive | /* @flow */
// Copyright (c) 2012-2013 The PPCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp>
#include <boost/lexical_cast.hpp>
#include "db.h"
#include "kernel.h"
#include... |
af83146a34d2f5ec4685cb890d6db82ef7fc6934 | 905428ce94dcafbb8de318f42270778c52d500c9 | pjones1063/Atari_ST_Sources | /C/d_m_l/agtools/agtcut.cpp | C++ | cpp | 62,139 | no_license | // --------------------------------------------------------------------
// platform stuff - todo: OSX/Linux porting!
// --------------------------------------------------------------------
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#include "stdio.h"
#include <iostream>
// -------------------------... |
d3623deca3d2fdcb8d6f359de08952238a54fc1f | 7b392e7bbc9f68fd6342a9acbd09fb09429a6496 | rodety/Jireh | /cliente/ui_cliente_datos.cpp | C++ | cpp | 10,101 | no_license | #include "ui_cliente_datos.h"
#include "ui_ui_cliente_datos.h"
ui_cliente_datos::ui_cliente_datos(QWidget *parent) :
QWidget(parent),
ui(new Ui::ui_cliente_datos)
{
ui->setupUi(this);
ui->comboBox_tipoDoc->setTipo("documento");
ui->comboBox_tipoDoc->ActualizarItemsSimple(documento::mostrar... |
736cc249d3f94f61c17caac322f7241ab7a6c426 | 3a8a4794d615538669da8640ef52645d255888d2 | zhellion/arean | /arean/Device.cpp | C++ | cpp | 11,128 | no_license |
#include "mainRenderer.h"
VKStr::Device MainRenderer::initDevice(VkInstance vkInstance, VkSurfaceKHR surface, std::vector<const char*> extensionsRequired,
std::vector<const char*> validationLayersRequired, bool uniqueQueueFamilies)
{
// Устройство которое будет возвращено
VKStr::Device resDevice = {};
// Получи... |
599a7143417187db96adbf440b0ff3ea577fbcda | 85b86c08b8bd076fd670a794ef81432743265987 | FeiLuo/xpathDemo | /vendors/XQilla-2.3.3/src/functions/FunctionContains.cpp | C++ | cpp | 3,668 | permissive | /*
* Copyright (c) 2001, 2008,
* DecisionSoft Limited. All rights reserved.
* Copyright (c) 2004, 2015 Oracle and/or its affiliates. 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 ob... |
8684d68d2eda807e30bd1896f1176ea7abbc03ab | 4a359765ea8f716e2e3bbeb9620ea777f0479a83 | JDCRecomendable/online-judge-answers | /solutions/strlineeqn_easy.cpp | C++ | cpp | 501 | permissive | /**
* Copyright (c) 2018 Jared Daniel Carbonell Recomendable.
*/
// #include <bits/stdc++.h> // non-standard, use only when compiling with G++
// <bits/stdc++.h> includes most header files from the C++ standard libraries,
// making it suitable for programming contests where speed determines rank, but
// not for task... |
eb02545480aacb9e940a57dc24d80c4f1750cf4a | bc8f94335fb46ed39a9e10ce47c6ed298f5fa7b5 | ARMmbed/connectedhomeip | /src/app/server/Server.cpp | C++ | cpp | 19,793 | permissive | /*
*
* Copyright (c) 2021 Project CHIP 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 requir... |
17f71d195fd2feedaa360b8fccfcc8fac1b760d9 | dae57597b18e6efa394b71a030a87f9ea03dd6ad | emilydolson/Empirical | /include/emp/base/array.hpp | C++ | hpp | 8,439 | no_license | /**
* @note This file is part of Empirical, https://github.com/devosoft/Empirical
* @copyright Copyright (C) Michigan State University, MIT Software license; see doc/LICENSE.md
* @date 2016-2021.
*
* @file array.hpp
* @brief A drop-in wrapper for std::array; adds on bounds checking in debug mode.
* @note S... |
3f1ea861cb25c25ab5bbd3ea197c73f0a1ce4145 | 8f03e63c1a5da4a73e4b950c5e0ae9bf11ba1933 | hasansujan23/Hackerearth-Basic-Programming | /Roy_and_Profile_Picture.cpp | C++ | cpp | 378 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int l,n,w,h;
scanf("%d%d",&l,&n);
for(int i=0;i<n;i++){
scanf("%d%d",&w,&h);
if(w<l || h<l)
printf("UPLOAD ANOTHER\n");
else{
if(w==h)
printf("ACCEPTED\n");
else
... |
db93b977d671fa15a7b492e6691093a84380ad58 | 05d718598dd1dd3cdf0bdfd2e0a0c1b5d2272a05 | firiexp/contest_log | /codeforces/1114E.cpp | C++ | cpp | 2,232 | no_license | #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>
static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace... |
2623d2479c3947ea04b2c1d0f73d6f7bb5683d86 | b602efb3179a649219a1a4a0804dfb4ebaa3c4cf | branning/xcpp | /sieve/sieve_test.cpp | C++ | cpp | 1,535 | permissive | #include "sieve.h"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE(primes_up_to_10)
{
const std::vector<int> expected{2, 3, 5, 7};
const std::vector<int> actual = sieve::primes(10);
BOOST_REQUIRE_EQUAL_COLLECTIONS(expected.begin(), expected.end(), actual.begin(), actual.e... |
0fc593ba37969eb92753ea433a90b12c8af0ead8 | 4034b4e819c0040cd189c95e5897a23a04f9018b | sangyx/algorithm | /pat/Basic Level/一元多项式求导.cpp | C++ | cpp | 539 | no_license | #include <iostream>
#include <vector>
using namespace std;
vector<int> resp, resn;
int tmpp, tmpn, i;
int main()
{
while(cin >> tmpp >> tmpn){
if(tmpn == 0)
break;
resp.push_back(tmpp * tmpn);
resn.push_back(tmpn - 1);
}
if(resp.size() > 0){
for(i = 0; i < resp... |
817257a8d5def52a16077f8f206b1813cfa9f4a1 | 62028c3ba5cfa8115fda8538d50e1c97f9621624 | openwns/constanze | /src/TcpListenerBinding.cpp | C++ | cpp | 3,795 | no_license | /*******************************************************************************
* This file is part of openWNS (open Wireless Network Simulator)
* _____________________________________________________________________________
*
* Copyright (C) 2004-2007
* Chair of Communication Networks (ComNets)
* Kopernikusstr.... |
3d06b05e34d598fc5f3130dbccaadd20d4458cc4 | 6d259598bdba129c905cdca97287103bbec613b2 | fengjiachen/leetcode | /100_149/111_Minimum_Depth_of_Binary_Tree/main.cpp | C++ | cpp | 296 | no_license | //
// main.cpp
// 111. Minimum Depth of Binary Tree
//
// Created by 冯嘉晨 on 2019/1/22.
// Copyright © 2019 冯嘉晨. All rights reserved.
//
#include <iostream>
int main(int argc, const char * argv[]) {
// insert code here...
std::cout << "Hello, World!\n";
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.