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 |
|---|---|---|---|---|---|---|---|---|
58c3c9c6e6daddf8e0253508a68f0471e14cf79f | 79b7fcdd2620d2e267decc60db2017f79e19ab7b | madhav-bits/Coding_Practice | /leetNumWaysToArriveDest.cpp | C++ | cpp | 3,687 | no_license | /*
*
//******************************************************1976. Number of Ways to Arrive at Destination.******************************************************
https://leetcode.com/problems/number-of-ways-to-arrive-at-destination/
*******************************************************************TEST CASES:****... |
125cd936ab41aea9bdf3350228de018ff588de69 | 5ccdee1352cd908f3fc8c0be451adf001907a9f0 | vsroy/Leet-Code-Solutions | /21_Merge_2_Sorted_Linked_Lists.cpp | C++ | cpp | 2,370 | no_license | /*Merge two sorted linked lists and return it as a new sorted list. The new list should be made by
splicing together the nodes of the first two lists.*/
#include<iostream>
// Definition for singly-linked list.
struct ListNode
{
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
//M... |
69fb5eec3d687cee40f081152a0a7972690e7a7a | 771df9296bddfd8bbdecf61a34e2c0e303ad98c0 | chandan5/DecafCompiler | /CodeGenVisitor.cpp | C++ | cpp | 10,954 | no_license | // #include "AST.h"
#include <iostream>
#include <cstdio>
#include <llvm/IR/Module.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/Function.h>
#include <llvm/PassManager.h>
#include <llvm/Pass.h>
#include <llvm/Assembly/PrintModulePass.h>
#include <llvm/Bitcode/ReaderWriter.h>
#inc... |
d61f823b58eff22ea5739bff26d9e71437848433 | 7dbdbd30b06ff9d617ca40810b7a134ab78f8578 | WhiZTiM/coliru | /Archive2/e8/2c10530fb9306b/main.cpp | C++ | cpp | 368 | no_license | #include <type_traits>
#include <iostream>
// Bigger between two types
template<typename T1, typename T2>
using Bigger = std::conditional_t<sizeof(T1) >= sizeof(T2), T1, T2>;
int main()
{
std::cout << sizeof(double) << '\n';
std::cout << sizeof(Bigger<int, Bigger<char, Bigger<long, Bigger<std::stri... |
cb6268308c97a7209a361702b50cc7fa478ce9cf | 54373d4f26734ec3786f9a443b27273b9a8bd54f | yeshuanova/codility | /Lessons/Lesson-4/FrogRiverOne.cpp | C++ | cpp | 417 | no_license | #include <vector>
#include <algorithm>
using namespace std;
int solution(int X, vector<int> &A) {
auto path_vec = vector<bool>(X, false);
int fill_count = 0;
for (size_t idx = 0; idx < A.size(); ++idx) {
int pos = A[idx] - 1;
if (!path_vec[pos]) {
++fill_count;
... |
66351fda43bc2a87277eda1de290aaa406522fc4 | 14d8932d20d1619b1aad96177036aa92f766816d | Mercrist/PacMan | /src/Game/Entities/RandomPowerUp.cpp | C++ | cpp | 554 | no_license | #include "RandomPowerUp.h"
RandomPowerUp::RandomPowerUp(EntityManager* em, Player* p)
{
this->em = em;
this->p = p;
music.load("music/teleport.wav");
}
void RandomPowerUp::activate()
{
int i = ofRandom(em->entities.size()); //gets the index of a random dot in the map, entities ONLY contains the dots
... |
c7cbb1f7a92d3d5c6a879f5e9248c4980f52d122 | 4fed397b7cbcd3192a3fd0d5c4cf5bd478b210f0 | Mayank-Chaudhari9/self-mastery-zone | /algorithm/heapsort.cpp | C++ | cpp | 748 | no_license | # include <bits/stdc++.h>
using namespace std;
void heapify(int arr[],int i, int n)
{
int largest= i;
int l=2*i+1;
int r=2*i+2;
if(l < n && arr[l] > arr[largest])
largest = l;
if(r < n && arr[r] > arr[largest])
largest = r;
if(largest != i)
{
swap(arr[i], arr[largest]);
heapify(arr, largest, n);... |
6a7b78c23601695ac201e50623df4ffbef27a85b | 850de55df846e4875fec524d76fd16d0e7486111 | souravkrojha/dsa-solution | /arrays/15.cpp | C++ | cpp | 962 | no_license | //QuickSort
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int partition(int arr[], int start, int end)
{
int pivot = arr[end];
int i = (start - 1);
for (int j = start; j <= end - 1; j++)
{
if (arr[j] < pivot)
{
i++;
swap(arr[i], arr[j]);
... |
6dde9b9552fe1640ad18e987fc9a65e3add035f8 | 50bf613ab5ebd3fb147648c08f2ea47353003711 | topdog1189/reshade | /source/d3d12/d3d12_impl_device.cpp | C++ | cpp | 38,230 | permissive | /*
* Copyright (C) 2021 Patrick Mours. All rights reserved.
* License: https://github.com/crosire/reshade#license
*/
#include "dll_log.hpp"
#include "dll_resources.hpp"
#include "d3d12_impl_device.hpp"
#include "d3d12_impl_command_queue.hpp"
#include "d3d12_impl_type_convert.hpp"
const GUID reshade::d3d12::pipelin... |
e715b49ae963e17e4c42d9c0bfc947421879694b | 6dc889b9f7236b9a295c8ba0e3530d9cb2412d98 | mengtest/XProject-1 | /Game/trunk/Src/Server/RouterServer/PacketProc/RouterPacketProc.cpp | C++ | cpp | 1,451 | no_license | #include "Server/RouterServer/PacketProc/RouterPacketProc.h"
#include "Server/Base/CmdDef.h"
#include "Server/Base/PacketHandler.h"
#include "Server/Base/ServerContext.h"
#include "Server/RouterServer/Router.h"
extern ServerContext* gpoContext;
void NSPacketProc::RegisterPacketProc()
{
PacketHandler* poPa... |
fdf2734bb107d30c892d67a25cb11c5700cda7f7 | 19a43f17d2eba2c3ce3643fb1a120969b0617e3a | pytorch/pytorch | /aten/src/ATen/native/mkldnn/MKLDNNConversions.cpp | C++ | cpp | 20,955 | permissive | #define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/Config.h>
#include <ATen/core/Tensor.h>
#include <ATen/native/mkldnn/MKLDNNCommon.h>
#include <ATen/native/mkldnn/Utils.h>
#include <ATen/native/utils/ParamUtils.h>
#include <torch/library.h>
#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/Functions.h>
#include ... |
2b29dc039c9ede8a6d85b96681d67fddd6337867 | a565b154fd300ce17502fe67ddeddbefa0363851 | wowkanwowka/shad-algs | /contest2/LongestCommonSubsequence/LCS.cpp | C++ | cpp | 1,732 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
template <class T>
void read_vector(std::vector<T>* vector) {
size_t num_of_elements;
std::cin >> num_of_elements;
vector->resize(num_of_elements);
for (size_t i = 0; i < vector->size(); ++i) {
std::cin >> (*vector)[i];
}... |
af47c1ffce57fa1eb00eb0943ae2cf431ea9f556 | 5e0cdf916c53179044aaf9e7d8395de8fb78bfeb | OolongQian/Ticket-Office-FSD | /backEnd/header/bptree/vector.hpp | C++ | hpp | 2,806 | no_license | #ifndef DATABASE_VECTOR_H
#define DATABASE_VECTOR_H
#include <cstdlib>
#include <iostream>
#include "constant.h"
namespace sjtu {
template<class ElemType>
class vector {
private:
ElemType arr[blockSize * 2 / sizeof(ElemType)];
short len;
public:
explicit vector(const int &&size) {
// mallocSize = size;
... |
1cdfba1c6762a53627d56450a693a4cd247dc0ef | c769481f532e512111f025245528ba05d1549e89 | rzr/chromium-crosswalk | /components/password_manager/core/browser/login_database.cc | C++ | cc | 33,415 | 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 "components/password_manager/core/browser/login_database.h"
#include <algorithm>
#include <limits>
#include "base/bind.h"
#include "base/files/... |
169bfdded589951435ed4859f84dc546eee0b1a2 | bfe2a66db4e9b620226ac5739fad2f90bcd256f2 | Yusepp/PP | /Teoria/codi/QuickSort/quickSortSerial.cpp | C++ | cpp | 1,308 | no_license | // Algorisme QuickSort.
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
using namespace std;
#define SIZE 10000000
int *A;
int Partition(int p, int r)
{
int mid = (p+r)/2;
int x = A[mid];
int t;
t = A[p]; A[p] = A[mid]; A[mid] = t;
int k = p;
int l = r+1;
do... |
8e5cc80d9a5eb09efb193fbf3ef71bf247bf67da | 8bda85bf616ce7f1bd7c529c69700458c2da0dd8 | 333fred/allwpilib | /wpilibc/shared/src/Commands/WaitCommand.cpp | C++ | cpp | 761 | permissive | /*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2011-2017. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
0381d2f59b8978c912cc5e9f2af6779be59fea92 | 665472822e18dba21efe6c5e835fa9cb9902a8f0 | penguinoneshaw/MPhysProject | /speed_of_sound.hpp | C++ | hpp | 2,330 | permissive | #
#if !defined(H_SPEED_OF_SOUND)
#define H_SPEED_OF_SOUND
#include <algorithm>
#include <cmath>
#include <vector>
#include "polynomial.hpp"
namespace project::speed_of_sound
{
template <class T>
const std::vector<std::vector<T>> C_coeffs{
{1402.388, 5.03830, -5.81090e-2, 3.3432e-4, -1.47797e-6, 3.1419e-9},... |
54d80494e34c1468271e7ea766129fb215d961e6 | 9f2e6510241b4a386b125ea7e001867d4b5d73c4 | ashok201198/C-course | /C-Basics/countFactorials.cpp | C++ | cpp | 834 | no_license | /*Problem - To find the number of factorials in a given range.
Description - You will be given an input array[l, h] which gives the range.Your job is to return the count of the number of factorials between 'l' and 'h' both included.
Example: input = [2, 10]
The factorails between 2 and 10 is '2' alone.Hence 1 must... |
5460a18d8e481fa1f90e9f4eeb00c2ddaf47fcbf | 76a75ad114fd0a45282cf9a52bc2e58eb938b2c0 | iti-agrawal/Usaco-Training-Solutions | /gift1.cpp | C++ | cpp | 1,783 | no_license | /*
ID: itidsta1
PROG: gift1
LANG: C++
*/
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include... |
9a6aa03b11db5725da3e95ca545d9149b0e6da91 | e5ce8695affb58f1864ce5baf390a2b9b8633759 | JamieAgate/RefreshEngine | /OpenGL Refresh/Material.cpp | C++ | cpp | 1,846 | no_license | #include "Material.h"
Material::Material()
{
}
Material::~Material()
{
}
void Material::Load(std::string _path)
{
m_path = _path;
std::vector<unsigned char>image;
unsigned width, hieght;
unsigned error = lodepng::decode(image, width, hieght, _path.c_str());
if (error != 0)
{
std::cout << "Error: " << ... |
534fe9318064d672ffde3521d3e9c82cab73980b | 387cdb66ab7b9dd51a05fe68607c02fcff8cc182 | 1InfinityDoesExist/GeeksForGeeks | /Best Time to Buy and Sell Stock III.cpp | C++ | cpp | 693 | no_license | class Solution {
public:
int dp[100005][2];
int maxProfit(vector<int>& prices)
{
memset(dp, 0, sizeof(dp));
for(int iter = 1; iter < prices.size(); iter++)
{
for(int jter = iter-1; jter >= 0; jter--)
{
dp[iter][0] = max(dp[iter][0],... |
6021dfa53ffd4aab11310ed894e08cad91df87be | 0a901af71cd785f939b0711f88a2f57ffed2de7c | Kim-dongeon/cppStudy | /예외처리/595o_PassException.cpp | C++ | cpp | 562 | no_license | #include <iostream>
using namespace std;
void Divide(int num1, int num2)
{
if (num2 == 0)
{
throw num2;
cout << "나눗셈의 몫: " << num1 / num2 << endl;
cout << "나눗셈의 나머지 : " << num1%num2 << endl;
}
}
int main()
{
int num1, num2;
cout << "두개의 숫자 입력: ";
cin >> num1 >> num2;
try
{
Divide(num1, num2);
cout ... |
54b41965480d10f9fcebb5ae16d7983417a45205 | e57f75a71ef307daaafafde4792974cbcd582ea2 | tpopenfoose/TSP-tabusearch-1 | /greedy/nfInsertion.cpp | C++ | cpp | 1,578 | no_license | #include "nfInsertion.h"
#include <list>
#include <iterator>
#include <algorithm>
#include "nearestNeighbour.h"
using std::list;
template <bool nearest>
void nfInsertionInit(Sequence& sequence, const Params& p) {
list<int> remaining;
for (int i = 1; i < p.N; ++i) {
remaining.push_back(i);
}
list<int> cycle;
... |
aa618659c45b8a5ea4bacdcb6924d1ec64b9cfc9 | 522cb302afd9606cc8c33545293582b2acf64c5d | guisongchen/leetcode_try | /201-250/203_Remove Linked List Elements.cpp | C++ | cpp | 1,000 | no_license | /*
Remove all elements from a linked list of integers that have value val.
Example:
Input: 1->2->6->3->4->5->6, val = 6
Output: 1->2->3->4->5
*/
// keypoints: use deamon node to protect head(in case head is removed)
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *n... |
26f904f7f0a5028b245c8d1034a6ea249d354040 | d6ffda57aa807d3f459f01e9a3355964b1acf306 | devgeekco/duplicate_file_finder | /src/sys_scan.cpp | C++ | cpp | 3,086 | permissive | /*********************************************************************
* This module is for scanning the system and sync all MD5 of the files
* to the database.
*
* @Author Ankit Singh (ankit@devgeek.co)
* @Copyright 2013 devgeek.co
**********************************************************************/
#include "sys... |
484edba0519821a67bda4ebb3dfb8353d79dec3e | 30df437fe29f69eb4961d9bbfdf224fb1c66e8f4 | pateldeev/cs480_Fall18 | /PA04/src/objLoader.cpp | C++ | cpp | 5,859 | no_license | #include "objLoader.h"
#include <fstream>
#include <sstream>
//for private helper functions
namespace {
bool loadVertices(std::stringstream & ss_obj, std::vector<Vertex> & vertices, bool randomColors = true, const glm::vec3 & defaultColor = { 1.0, 1.0,
1.0 }) {
//remove extra starting info and find first line wi... |
1c2410910562a78b2f65aabd18363db043234949 | 052e54a82bdf8ad56f00465966ec5cae70699b8a | Andres6936/Maximilian | /Include/Realtime/IAudioArchitecture.hpp | C++ | hpp | 6,727 | permissive | #ifndef MAXIMILIAN_IAUDIOARCHITECTURE_HPP
#define MAXIMILIAN_IAUDIOARCHITECTURE_HPP
#include <cstdint>
#include <sstream>
#include <functional>
#include <Exception.h>
#include "DeviceInfo.hpp"
#include "AudioStream.hpp"
#include "ConvertInfo.hpp"
#include "StreamOptions.hpp"
#include "StreamParameters.hpp"
#include "... |
fbccfb5d2a3d9258745c9424d5437db6522298d0 | 29452fb7caef664cb3db05713b9bd4c9a26ecb76 | dixtel/arakanoid_android | /jni/SDL2/build/org.libsdl.arkanoid/jni/src/main.cpp | C++ | cpp | 922 | permissive | #include "include/game.h"
#include "include/logsdlerror.h"
#include <string>
#include <sstream>
const unsigned WINDOW_WIDTH = 640;
const unsigned WINDOW_HEIGHT = 960;
const std::string WINDOW_TITLE = "Arkanoid";
int main(int argv, char ** args) {
Game game(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_TITLE);
if (!g... |
a38e4a8693eca65371acc710ab26cc3628189e9f | db64bedd51971b486525cf24982e9e688481d95f | elishacloud/Silent-Hill-2-Enhancements | /Include/criware/criware_lock.cpp | C++ | cpp | 1,042 | permissive | /*
* Copyright (C) 2022 Gemini
* ===========================================================
* Thread module
* -----------------------------------------------------------
* Critical section manager for ADX.
* ===========================================================
*/
#include "criware.h"
#include <chrono>
#if 0
st... |
841a7dcd4af2d95269d0fc5ef213c4f63266de68 | d0fcd00314c9b9891069d48b7bc29f6462210fc8 | lineCode/garnet | /bin/media/audio_server/audio_packet_ref.cc | C++ | cc | 1,149 | permissive | // Copyright 2018 The Fuchsia 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 "garnet/bin/media/audio_server/audio_packet_ref.h"
#include "garnet/bin/media/audio_server/audio_server_impl.h"
#include "lib/fxl/logging.h"
nam... |
a0a0c8b81019238e1cc5fe67f09be10405c643ba | 3c746b43d564d5931668d6fcf2b80539c277574c | prisme-studio/SERVO | /Servo/Behaviours/T-1/B-16/O-16.hpp | C++ | hpp | 806 | no_license | //
// O-16.hpp
// Talkers
//
// Created by Valentin Dufois on 2020-02-24.
//
#ifndef O_16_hpp
#define O_16_hpp
#include "../../Output.hpp"
class O16: public Output {
public:
O16(): Output(16, // Output ID
true, // Is tree end ?
-1, // Ne... |
45e0449bdf004f6894ad41ab695dfeff94094a11 | 5d628a0eb840270201836311e976ee73336b9387 | vslavik/poedit | /deps/boost/libs/intrusive/example/doc_positional_insertion.cpp | C++ | cpp | 2,586 | permissive | /////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2009-2013
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost... |
3240a4cdcd4f196ff922dfbf57ab1ab5d25be02b | ef8b3c1af6b707926c9a67747da17e2d12200930 | LVTl81/PAT | /PAT甲级(Advanced Level)/1125. Chain the Ropes (25).cpp | C++ | cpp | 2,274 | no_license | 1125. Chain the Ropes (25)
Given some segments of rope, you are supposed to chain them into one rope. Each time you may only fold two segments into loops and chain them into one piece, as shown by the figure. The resulting chain will be treated as another segment of rope and can be folded again. After each chaining, t... |
dc71e5871579c72cb9e21a85c5a38267969996a4 | b63c35d65efe388b480d179a6742893417d997b4 | booltox/Cinder-Str33k3r | /src/str33kr.cpp | C++ | cpp | 7,276 | no_license | #include "cinder/app/AppBasic.h"
#include "cinder/gl/gl.h"
#include "cinder/CinderMath.h"
#include "cinder/Vector.h"
#include "cinder/Camera.h"
#include "cinder/gl/Fbo.h"
#include "cinder/gl/GlslProg.h"
#include "cinder/ImageIo.h"
#include "cinder/Utilities.h"
#include "cinder/params/Params.h"
#include "cinder/Surface.... |
792389884943d2d8dd8e4de3a08db9fef1cd8e5e | f05a2083e09ccbb49ba739c5fcc900118a847a68 | MicDZ/Code | /BZOJ/BZOJ5179-JSOI2011-任务调度.cpp | C++ | cpp | 4,379 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#define int ll
using namespace std;
#define REP(i,e,s) for(register int i=(e); i<=(s); i++)
#define DREP(i,e,s) for(register int i=(e); i>=(s); i--)
#define DE(...) fprintf(stderr,__VA_ARGS__)
#define DEBUG(a) DE... |
5f92e74fad6388930d97b87a6fca4fbbd26d4397 | 9519459c843902a9737df95c236aae1a6c50e866 | robomotic/EDFJeelink | /EchoManager/Rfm12b.cpp | C++ | cpp | 17,182 | no_license |
#include "Rfm12b.h"
//#include <Arduino.h>
#include "spi.h"
Rfm12b::State Rfm12b::state;
TXPacket Rfm12b::tx_packet;
PacketBuffer Rfm12b::rx_packet_buffer(12);
void Rfm12b::enable_rx()
{
// 3. Power Management Command 0x8201
// 1 0 0 0 0 0 1 0 er ebb et es ex eb ew dc
// 0 0 0 0 0 0... |
7221d78ed6db0f189623681d0ef4c0e4dbb464af | d08d74c2785e335118e0bfb9fc4421673a4fa2c8 | geoffrey-vl/mbed-XbeeLib | /XBeeDM/XBeeDM.cpp | C++ | cpp | 16,053 | no_license | /**
* Copyright (c) 2015 Digi International Inc.,
* All rights not expressly granted are reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* ... |
f89b7f369c42ce8b10fd86ccfcb5462e2fa1b821 | 81e17144a3ff3e657f6b77a17f88848641c98b10 | Drako0013/AdaptiveCards | /source/uwp/Renderer/lib/AdaptiveImageSetConfig.cpp | C++ | cpp | 1,392 | permissive | #include "pch.h"
#include "AdaptiveImageSetConfig.h"
using namespace Microsoft::WRL;
using namespace ABI::AdaptiveNamespace;
namespace AdaptiveNamespace
{
HRESULT AdaptiveImageSetConfig::RuntimeClassInitialize() noexcept try
{
ImageSetConfig imageSetConfig;
return RuntimeClassInitialize(imageS... |
fc6ca6c6179d8e0b059d9acce43be5e3bbea59ef | 13fb501497ba690f89f31070e2f2eb6706eacb43 | sunjiawen/yugabyte-db | /src/yb/master/permissions_manager.cc | C++ | cc | 40,500 | permissive | // Copyright (c) YugaByte, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... |
1c6fab9f9c853a1896026dee6a8e3a54d5b2d71e | dc3bca5d4567d16eb7b30624751f53be6a022492 | seiichiinoue/procon | /atcoder/arc100/d.cpp | C++ | cpp | 2,485 | no_license | #include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<n; ++i)
#define rep1(i, n) for (int i=1; i<=n; ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll... |
3c8f7dbac0959c16c00191f37d7668aaab4e1f5a | a62a6b43ce85b916995c9d42f6a4cc34c14626e4 | Kobe771/lbd | /docs/BackendTutorial/source_ExampleCode/InputFiles/print.cpp | C++ | cpp | 425 | permissive | #include "print.h"
#include "itoa.cpp"
// For memory IO
void print_char(const char c)
{
char *p = (char*)OUT_MEM;
*p = c;
return;
}
void print_string(const char *str)
{
const char *p;
for (p = str; *p != '\0'; p++)
print_char(*p);
print_char(*p);
print_char('\n');
return;
}
// For memory IO
vo... |
9ca4afc6acab43570094de6addb67c1988114aeb | 303cef2a630d37141ab991bd11d7d85dc00ca1ec | microkatz/Windows-driver-samples | /print/XPSDrvSmpl/src/filters/color/cmflt.cpp | C++ | cpp | 8,186 | permissive | /*++
Copyright (c) 2005 Microsoft Corporation
All rights reserved.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
File Name:
cmflt.cpp
Abstra... |
552b71016224aa788940841f1342229e1cf4730d | f0d5f68c4ec70452eda421fc4bf981ebec4b5eed | joeldipops/Grammagic | /play/enemy.cpp | C++ | cpp | 1,938 | no_license | #include "enemy.h"
#include "playStateManager.h"
using namespace Play;
//{ Lifecycle
Enemy::Enemy(const Resources::EnemyTemplate& tmpl) : NPC(tmpl, MobType::Hostile)
{
_physicalStrength = tmpl.Attack;
_combatDelay = tmpl.AttackDelay;
_combatAction = tmpl.CombatAction;
_rewardForDefeat = tmpl.Reward;
}... |
cf966bdddf53d8f25cad8a75f343a2d0224bba81 | f7807e37ec07a6d0dc409569ef6e9075a572cfcb | reunanen/opencv-build-vs | /include/opencv2/core.hpp | C++ | hpp | 153,937 | 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, instal... |
a47cbd4ea71090ba61aa18e8c5722894cab2a919 | ba7e0b15e544e4acfe1dd2941b54e531e6bd768a | L-Zhe/OJ | /PAT/Advance_Level/首刷/A1098.cpp | C++ | cpp | 4,415 | no_license | /*===================================================================================
A1098 Insertion or Heap Sort (25)(25 分)
=====================================================================================
According to Wikipedia:
Insertion sort iterates, consuming one input element each repetition, and growing
a... |
eb8ee88a6e505c3744e7dac96392621d4e34b8fa | d079beaa478bfaf37c4410b18ba20ab5968b834f | YingkaiHuang/Approx_LKAS | /Profiling/denoise-profiling/denoise_single.cpp | C++ | cpp | 4,078 | no_license | #include <cstdio>
//#include <chrono>
#include <iostream>
#ifdef PROFILEWITHCHRONO
#include "../my_profiler.hpp"
#endif
#ifdef PROFILEWITHVALGRIND
#include "callgrind.h"
#endif
#include "nl_means.h"
#include "halide_benchmark.h"
#include "HalideBuffer.h"
#include "halide_image_io.h"
#include <fstream>
using na... |
c8957949035f0070d19229df9023d344332a4ab6 | ee8694139bb0e2d90862850826377db5a6b0acec | fengjixuchui/windowskernelprogrammingbook | /chapter10/DelProtect/DelProtect.cpp | C++ | cpp | 17,494 | permissive | /*++
Module Name:
DelProtect.c
Abstract:
This is the main module of the DelProtect miniFilter driver.
Environment:
Kernel mode
--*/
#include <fltKernel.h>
#include <dontuse.h>
#define DRIVER_TAG 'ledp'
extern "C" NTSTATUS ZwQueryInformationProcess(
_In_ HANDLE ProcessHandle,
_In_ PROC... |
b5e56405787e21162a52a8aea96f8ad481923134 | 9940a44f63b59e2705295862ccabe20a1835ebe5 | Amoners/cc0 | /src/toolchain/core/Type/VoidType.cpp | C++ | cpp | 429 | permissive |
#include "VoidType.h"
#include <typeinfo>
VoidType::VoidType()
{
}
VoidType::~VoidType()
{
}
std::string VoidType::ToString()
{
return "void";
}
bool VoidType::CanExplicitlyConvertTo(Type*)
{
return false;
}
bool VoidType::CanImplicitlyConvertTo(Type*)
{
return false;
}
bool VoidType::Equals(Type*... |
5d8cefb68ad33f5dc97497794136fb625472b5d6 | a832baf2a6d3ddcdaed7720b2b6bbb6eb3e6ac6f | adishavit/MeshLab | /meshlab/src/meshlabplugins/filter_create/filter_create.cpp | C++ | cpp | 21,377 | no_license | /****************************************************************************
* MeshLab o o *
* A versatile mesh processing toolbox o o *
* _ O _ *
* Co... |
b4ddacf79da4b03170277b9499591cb951c6b036 | 7e89bcd3b02619c8c64b0e4cb21740e5a1d13ba9 | eory96/baekjoon | /baekjoon_1074_Z-> 애매.../baekjoon_1074_Z/main.cpp | C++ | cpp | 1,084 | no_license | //
// main.cpp
// baekjoon_1074_Z
//
// Created by 김대교 on 2020/05/17.
// Copyright © 2020 김대교. All rights reserved.
//
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
using namespace std;
int N,r,c;
int cnt=0;
void Z(int y,int x,int range){
if(range==2){
if(y==r&&x==c){
... |
00a3ddc1e069ba4ca53ae8a56e07071bbc8e7641 | 67d10d367a73c3e8d05744cf51fdcb24771a622d | jizhuoran/caffe_cpu_sj | /tools/caffe.cpp | C++ | cpp | 15,173 | permissive | #ifdef WITH_PYTHON_LAYER
#include "boost/python.hpp"
namespace bp = boost::python;
#endif
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <cstring>
#include <map>
#include <string>
#include <vector>
#include "boost/algorithm/string.hpp"
#include "caffe/caffe.hpp"
#include "caffe/util/signal_handler.h"
... |
a666395fd6959e2a64f4e754f97373da802761b9 | 12084e1de7dda84bedab9f3f41eababe05b5b34c | dartdart26/concord-bft | /client/clientservice/include/client/clientservice/configuration.hpp | C++ | hpp | 2,053 | permissive | // Concord
//
// Copyright (c) 2021 VMware, Inc. All Rights Reserved.
//
// This product is licensed to you under the Apache 2.0 license (the "License"). You may not use this product except in
// compliance with the Apache 2.0 License.
//
// This product may include a number of subcomponents with separate copyright not... |
c0662809100031eafab2cd721415479c86a0f370 | 3cb4fdce1fdcd3e9da3e5c9cc523f37cc4646ee8 | anshu-k2511/Data_Structure-and-Algorithms | /Dijkstra.cpp | C++ | cpp | 768 | no_license | const int INF = 1000000000;
vector<vector<pair<int, int>>> adj;
void dijkstra(int s, vector<int> & d, vector<int> & p) {
int n = adj.size();
d.assign(n, INF);
p.assign(n, -1);
d[s] = 0;
using pii = pair<int, int>;
priority_queue<pii, vector<pii>, greater<pii>> q;
q.push({0, s});... |
cbc5160c6313619dff4a56bdcb7318203976621b | b676e0161c5b32911c28f3f4b9924e42ec271de2 | alrahal6/omim | /android/jni/com/mapsrahal/platform/Language.cpp | C++ | cpp | 877 | permissive | #include "com/mapsrahal/core/jni_helper.hpp"
#include "base/assert.hpp"
#include "base/logging.hpp"
#include "base/string_utils.hpp"
#include <string>
/// This function is called from native c++ code
std::string GetAndroidSystemLanguage()
{
static char const * DEFAULT_LANG = "en";
JNIEnv * env = jni::GetEnv();
... |
7137db29698ca3a1fd58b10c6115e7ef97e6a416 | 44c1770ed3287090d4ad3673401e676a7934d4af | bill0808fine/Two-Phase-Simplex | /source/main.cpp | C++ | cpp | 1,723 | no_license | #include <iostream>
#include <string>
#include <ctime>
#include"../header/simplex.h"
using namespace std;
int main() {
int testbench_sel;
cout << "Select testbench :" << endl;
cout << "1 : AFIRO" << endl;
cout << "2 : SC105" << endl;
cout << "3 : STOCFOR1" << endl;
cout << "4 : SCAG... |
8fd66a89c8021f67cf3715932b6c831818335ab2 | 723df9d48334c14d87fb5346047b33b17d515d2e | JeonJe/Algorithm | /4.programmers/고득점 kit_DFS_BFS/프로그래머스_네트워크_BFS_DFS.cpp | C++ | cpp | 1,010 | no_license | #include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const int MAX = 200;
bool visited[MAX] = { false, };
int Dy[] = { 1,-1,0,0 };
int Dx[] = { 0,0,-1,1 };
int cnt = 0; // 네트워크 수
int map[MAX][MAX] = { 0, };
int N = 0;
void DFS(int v, vector<vector<int>> computers) {
... |
6682eda7b00ed00798b8d3710d8ecf9f501a7116 | f92303f4333374e12b4f939de670f2a0c72b6d85 | Goreli/DKCPPDEV | /apps/testdkmrx/source/mrx_g0120.cpp | C++ | cpp | 5,288 | permissive | /*
MIT License
Copyright(c) 2019 David Krikheli
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... |
f4611b053e47e7174679b2aaef4de2f00bb0d48f | e75bbd262d082c3619460a1d909c88bfabeb1ed8 | openthread/ot-commissioner | /src/library/commissioner_impl_test.cpp | C++ | cpp | 6,425 | permissive | /*
* Copyright (c) 2019, The OpenThread Commissioner 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:
* 1. Redistributions of source code must retain the above copyrig... |
664ea0ab8eb5dea8a1b4e799e36c424cd8653b7a | 5aab8ed8ef09669f1bb8df9e2dc09dfdef3f3c30 | tapaswenipathak/phylanx | /tests/unit/plugins/matrixops/ndim.cpp | C++ | cpp | 3,562 | permissive | // Copyright (c) 2017-2018 Hartmut Kaiser
// Copyright (c) 2018 Shahrzad Shirzad
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <phylanx/phylanx.hpp>
#include <hpx/hpx_main.hpp>
#include <hpx/... |
f6618507930485b589984205779fddd346020379 | 6c1e6d8bffc30cdf3363d83640f254dc8244b592 | msgpo/chromium-1 | /components/page_load_metrics/browser/observers/largest_contentful_paint_handler.cc | C++ | cc | 11,977 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/page_load_metrics/browser/observers/largest_contentful_paint_handler.h"
#include "components/page_load_metrics/browser/page_load_met... |
663a59a92b2bcbcbd0b41a50136d01eff9922117 | 949a4f2cbdfefa3efaa50566b1acc6e31fbb627b | zachallaun/parsertest | /src/parsertest3.cpp | C++ | cpp | 8,066 | no_license | //
// parsertest3.cpp
// parsertest3
//
// Created by Ryan Koven on 10/30/12.
// Copyright (c) 2012 Ryan Koven. All rights reserved.
//
#include <iostream>
#include <string>
#include <vector>
using namespace std;
string strip_outer_parens(const string& expr){
string output = "";
if (expr[0] == '(' &... |
ec63634c773bc9d142e6d1dd11f81ea85b7f9262 | 2b10b72938cb4570858fcb652aa55b60e2a8eff6 | alexandraback/datacollection | /solutions_5688567749672960_0/C++/Breda/a.cpp | C++ | cpp | 1,328 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <queue>
#include <algorithm>
#include <map>
using namespace std;
map<int, int> mapa;
int passou[1000001];
int cont = 0;
void resolver(int caso)
{
int n;
scanf("%d", &n);
printf("Case #%d: %d\n", caso, mapa[n]);
}
int inv(int a)
{
i... |
670c9165a2a95ccd031ff604332edb10b6b94f36 | f91339345a907edfeeb0c7da58838d5427d4697f | terasum/medict | /internal/libmdict/fileutils.cc | C++ | cc | 486 | no_license | #include "fileutils.h"
#include <cstdio>
int fsizeof(const char* fpath) {
FILE* f = std::fopen(fpath, "rb");
std::fseek(f, 0, SEEK_END); // seek to end of file
auto size = std::ftell(f); // get current file pointer
std::fseek(f, 0, SEEK_SET); // seek back to beginning of file
// proceed with allocating ... |
4bf6c70c7b30e93ad28bd336dfc2e58751079199 | 44d8f3f225bef28a44f9eb1ed1a748c70c6f8e5c | Drizshko/openvino | /inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/reverse_sequence.cpp | C++ | cpp | 1,685 | permissive | // Copyright (C) 2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vector>
#include "single_layer_tests/reverse_sequence.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
const std::vector<InferenceEngine::Precision> netPrecisions = {
... |
76533bfa2b72d1a5f567f68d7c8a334acb738828 | 33cb7c3f050bc651a95ef875089fabe9d3503c5d | sphplvk/IDL | /IDLCWriteSourceFile_cpp.cpp | C++ | cpp | 169,430 | permissive |
#include <stdlib.h>
#include "AXP/cplusplus/xplatform/include/stl/tree.h"
#include "AXP/cplusplus/xplatform/include/stl/hashtable.h"
#include "IDLCParser.h"
#include "Common.h"
using namespace AXP;
using namespace AXP::STL;
using namespace IDLC;
namespace IDLC
{
EXTERN Int32 gIDLFlag;
EXTERN Sp<List<String>... |
05c335d5467f9b6000dedc5a14a04bdea8f2e5c7 | 30733c6854a198481fd0e982c8ebe014b2481399 | ric2b/Vivaldi-browser | /chromium/components/performance_manager/persistence/site_data/unittest_utils.cc | C++ | cc | 1,472 | permissive | // Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/performance_manager/persistence/site_data/unittest_utils.h"
#include <utility>
#include "base/callback.h"
#include "base/callback_helpers.h"
#include "co... |
80a493a118dda97fdfcb833b0a7f2f02582850ec | af6ee7baa14a85d523e92b98410d3962d98359de | mkmartinw/compute-runtime | /runtime/platform/platform.cpp | C++ | cpp | 6,448 | permissive | /*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "platform.h"
#include "runtime/api/api.h"
#include "runtime/compiler_interface/compiler_interface.h"
#include "CL/cl_ext.h"
#include "runtime/device/device.h"
#include "runtime/execution_environment/execution_environment.h"
#... |
8d6daade17de2125e16b81e5d57eb168a86ee1c0 | 5558cf17002016efa6d5559884852540ce0b75fd | BUGmakerrr/a | /ClusterChatServer/src/server/chatserver.cpp | C++ | cpp | 1,217 | no_license | #include "chatserver.hpp"
#include "json.hpp"
#include "chatservice.hpp"
#include <iostream>
#include <functional>
#include <string>
using namespace std;
using namespace placeholders;
using json = nlohmann::json;
ChatServer::ChatServer(EventLoop *loop,
const InetAddress &listenAddr,
... |
ddf85d9a71894f70de9a50d76ad58e593c2cd8be | 4dbedc4caaa936da8bb7b7a9756754d88235afff | zhangqiang216/C | /File5/矩阵的逆转/矩阵的逆转/a.cpp | C++ | cpp | 402 | no_license | #include<iostream>
using namespace std;
int main(void)
{
int ** a= new int *[2];
for(int i=0;i<2;i++)
{
a[i]=new int[3];
}
for(int i=0;i<2;i++)
{
for(int j=0;j<3;j++)
{
cin>>a[i][j];
}
}
for(int i=0;i<3;i++)
{
for(int j=0;j<2;j++)
{
cout<<a[j][i]<<" ";
}
cout<<endl;
}
for (int i=... |
789403b74ef8e11f3b1e73eac7d6041f441f22c2 | 14dce2a8f4511811f6c2b1861b0770646961ba90 | httpsgithu/dart | /dart/dynamics/SoftContactConstraint.cpp | C++ | cpp | 37,057 | permissive | /*
* Copyright (c) 2011-2021, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, w... |
2cc8e55e7d7a283217d6c621faf7cd02cd8326be | 042c1ed4904e2c1c479316c74c1380ee22191a1c | Nirmitjatana/DSA-hmmm | /merge-k-sorted-lists/merge-k-sorted-lists.cpp | C++ | cpp | 875 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* mergeKLists... |
73219f4bb1232794823f5e24f5a8ed0becf85668 | 709e89c8a2c9d3a1ebb1ed4d043201fe3048b58a | Dahlqvist/Spelprojekt1 | /Programmering/RobotSplit/RobotSplit/Animation.cpp | C++ | cpp | 2,036 | no_license | #include "Animation.h"
#include "TextureManager.h"
//När objektet skapas måste filnamnet på vilket spritesheet som
//skall användas, hur lång tid varje frame ska synas, anges i millisekunder,
//samt hur många frames per animation.
Animation::Animation(const std::string& filename, int timePerFrame, int numFrames):
mTim... |
f3b51acf11efa833dd78d98a8faf020681ab1544 | b6b716e56dc1e717303ea46b410bb61aa28191b3 | utumen/boringssl | /crypto/bytestring/bytestring_test.cc | C++ | cc | 55,733 | permissive | /* Copyright (c) 2014, Google Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... |
2cbef114f31d2928403837db74680d00906f4578 | 506fd9fdda3625224416f01616743884fb1d945f | ezhangle/exceptions-stacktrace | /exceptions-stacktrace/AutoExceptionStacktraceRegister.cpp | C++ | cpp | 2,004 | permissive | #pragma warning(push, 0)
#include "backward.h"
#pragma warning(pop)
#include <Windows.h>
#include <vector>
#include "AutoExceptionStacktraceRegister.h"
#include "Exceptions.h"
#include "Globals.h"
using namespace backward;
namespace ExceptionsStacktrace
{
static const size_t CALL_FIRST = 0;
static constexpr size_t... |
2d08e3db8244c507113f0b78ffaea8eacdecf6cd | 4504f4ee323729139c862a2bff2456e1e52f8f48 | HarshNema/Competitive-Programming | /codeforces/1368/B.cpp | C++ | cpp | 777 | no_license | //author: Harsh :)
#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
#define F first
#define S second
const ll mod = 1e9 + 7;
const ll INF = 922337203685477;
#define pb push_back
#define deb(x) cout << '>' << #x << ':' << x << endl;
#define fastio ios_base::sync_with_stdio(false); cin.tie(0);
#defi... |
e9b22d6d3a7b5eda8712d27fba380de1122fc2c4 | a01997e5438ebdac334c790faa81b650d2711c5d | SteveZiZi/TemplateStu9001 | /src/Stu9001/prj/GeneratedFiles/Release/moc_MeasureList.cpp | C++ | cpp | 2,845 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'MeasureList.h'
**
** Created: Fri May 6 18:36:21 2016
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
************************... |
0a79f0cb5c5b4f2fe432db36dec4bf1f301e2b44 | 46f4226c6967b2738ef3e8b4b10cb33b27848087 | rishavjnv12/Code-backup | /may/corus.cpp | C++ | cpp | 866 | no_license | #include <bits/stdc++.h>
#define ios ios_base::sync_with_stdio(false);cin.tie(NULL)
#define int long long
#define mod 1000000007
#define INF 1000000000
#define endl '\n'
#define cout(x) cout<<x<<'\n'
#define debug(x) cout<<x<<'\n\n'
#define cin(x) cin>>x
#define cin2(x,y) cin>>x>>y
#define cin3(x,y,z) cin>>x>>y>>z
us... |
fcb99fca1e77d36deac1b3b176c17ca11412ee00 | 9c142b847bb30514527ba5134056bb8c95a6ae80 | RadekVana/EmbeddedStateMechanic | /StateMechanic/Info/IFiredData.hpp | C++ | hpp | 854 | permissive | /*******************************************************************************
CREATED: 13.06.2019, by Vana Radek
DESCRIPTION:
Interface for data sent to State Machine when an event is fired = parent for any data.
Sometimes Info is created at runtime. In this case separate data are needed.
FILE: IFiredData.hpp
****... |
ba91bcc215b460242aa4b9a1b4a9516629aa5859 | 24fb32f28103e7ae84c2d073042f597b137c49b0 | specing/cheali-charger | /src/hardware/atmega32/generic/200W/GTPowerA6-10.cpp | C++ | cpp | 3,673 | no_license | /*
cheali-charger - open source firmware for a variety of LiPo chargers
Copyright (C) 2013 Paweł Stawicki. All right reserved.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, eit... |
6d348b006d67a96f423d1ed3eecfe2a04d796526 | 70f2ac53821738da8cccc172e3d7eb96c22ffdc4 | khaemn/scalc | /src/functions.cpp | C++ | cpp | 2,756 | no_license | #include "functions.hpp"
#include <algorithm>
#include <iostream>
#include <list>
#include "logger.hpp"
#define NO_INPUT_VECTOR_VALIDATION
static bool validate_input(const InputData &sets)
{
#ifndef NO_INPUT_VECTOR_VALIDATION
for (auto const &set : sets)
{
if (!std::is_sorted(set->begin(), set->end()))
... |
c27182553fac8998082596823d2ec9615625f357 | 436c77c64cb438a102dbe0430a8e57e82ef621e9 | aenniw/ARDUINO | /skarsta/lib/calibrator/Calibrator.cpp | C++ | cpp | 2,739 | permissive | #include "Calibrator.h"
unsigned int preset_values[3] = {0u};
Calibrator::Calibrator(Motor *motor) {
this->motor = motor;
for (uint8_t i = 0; i < 3; i++) {
#ifdef __EEPROM__
EEPROM.get(ADDRESS_PRESETS[i], preset_values[i]);
LOG("c | set preset:%d v:%d", i, preset_values[i]);
#endif
}
}
v... |
bb44f8e6e54c5f826f642da8d1d2567c3babaa77 | 7a7d2cf731819474a769dfd02814343af1e01fa8 | goranvasilj/magnetic_field_localization | /src/magnetic_field_localization_two_wire.cpp | C++ | cpp | 28,829 | no_license |
#include <ros/ros.h>
#include <serial/serial.h>
#include <std_msgs/String.h>
#include <sensor_msgs/MagneticField.h>
#include <std_msgs/Empty.h>
#include <tf/transform_listener.h>
#include <tf/transform_broadcaster.h>
#include <tf/tf.h>
#include "asa047.hpp"
//using namespace mrpt;
//using namespace mrpt::math;
//u... |
7772f9b16ec904e13ed766cbaf3c6ab0a93c3446 | 0bbfac116f1cf168534e8b9ee1917f4e3a04f9c3 | VinayRana5674/MyProrammingWrok | /Binary tree.cpp | C++ | cpp | 6,294 | no_license | /*
* C++ Program To Implement BST
*/
# include <iostream>
# include <cstdlib>
using namespace std;
/*
* Node Declaration
*/
struct node
{
int info;
struct node* left;
struct node* right;
}*root;
/*
* Class Declaration
*/
class BST
{
public:
void find(int, node**, node**);
void insert(... |
58aa2b427fd36cbeee2cd52530648c8dd12833d2 | 391f500b8b4a121c8eb65e29a85068d4ca21eb48 | Anik-Modak/CompetitiveProgramming | /OthersAll/set.cpp | C++ | cpp | 725 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
set<int>b;
int n,i;
cin>>n;
int a[n+1],mx,mn;
for(i=1;i<=n;i++){
cin>>a[i];
if(i==1){
mx=a[i];
mn=a[i];
}
if(mx<a[i]) mx=a[i];
if(mn>a[i]) mn=a[i];
}
int j,p=0,s=(mx+mn)... |
9d22d7c173528995257a3ab7e894b3555c49c843 | 7729caa306e39daeded25f60879cd7387bb6f4c5 | ClaudomiroSales/SoftwareDeSeguranca | /Firewall.cpp | C++ | cpp | 3,023 | no_license | #include "Firewall.h"
Firewall::Firewall( const string &ip, const string &mask)
: SoftwareDeSeguranca( )
{
this->ip = ip;
this->mascara = mask;
}
Firewall::Firewall()
: SoftwareDeSeguranca( )
{
this-> ameacaF = true;
this-> atualizacaoF = true;
this-> pontoF = true;
this-> mostrar = "";
th... |
4bc2ccaedb69b6def00b3d7733c0792e4280f5ee | 167cf165165930534b391298ac69a21eda8a3540 | osmansajid/Contest-Problems | /LightOJ/1206/15544088_AC_344ms_2252kB.cpp | C++ | cpp | 2,732 | no_license | #include<bits/stdc++.h>
using namespace std;
#define NIL 0
#define M 510
#define INF INT_MAX
int m,n;
int pairU [M+1];
int pairV [M+1];
int setA [M+1];
int setB [M+1];
int dist [M+1];
int x1[M+1],x2[M+1],yy1[M+1],y2[M+1];
vector<int>adj[M];
bool bfs(){
queue<int> Q;
for (int i=1; i<=m; i++){
if (pairU[... |
23ce284040b96cf9696c86071848d1cf2b26d39c | 619c7a2be764d74c3be3baf8801ecda884a2cf4a | nauman07/tensorflow | /tensorflow/core/distributed_runtime/eager/cluster_function_library_runtime.cc | C++ | cc | 7,574 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
f623f00b3af9683e329986ef1897088720fde0c9 | 0d4edd836cb05b0514d8efe095f6fabcd8b931f6 | mkmartinw/compute-runtime | /unit_tests/os_interface/windows/hw_info_config_win_tests.cpp | C++ | cpp | 2,129 | permissive | /*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/os_interface/windows/hw_info_config_win_tests.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "runtime/os_interface/windows/wddm/wddm.h"
#include "unit_tests/helpers/debug_manager_state_restor... |
9af9e44442f8fb62887b402309af27fdae0ee8e9 | 12b2359cc2426e9d51afa162769d6594be2036c8 | h-godai/ssa | /proj/libTS/math/piml/platform.hpp | C++ | hpp | 2,170 | no_license | /********************************************************************** -*-tab-width:4-*-
@brief Platform Independent Math Library
@brief 環境に依存しない数値演算ライブラリ
@author h.godai godai@techarts.co.jp
@note サポートプラットフォーム
@note Windows (x86,x64), iPhone(ARM), Android(x86), PS-VITA(ARM), PS3(PowerPC,c... |
9f10a3c6dcc8f71a4a23c7576e1568f5357fd782 | 4cda3f32fdf3fdd2d14b201fa902c1f50f3ff98d | sandyhouse/Paddle | /paddle/fluid/imperative/tests/test_prepare_op.cc | C++ | cc | 8,888 | permissive | // Copyright (c) 2019 PaddlePaddle 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... |
5088caf031a517b4942e8eb69cc64a3e95871e24 | 2fffb809eca813b4b10e3fd0aa0df562ae8b2e1a | HappyFreeman/Laboratory-work | /LaboratoryWork#7/Task7.5.cpp | C++ | cpp | 264 | no_license | #include <iostream>
using namespace std;
int main()
{
int abcd;
cin >> abcd;
if ((abcd / 1000) == (abcd % 10)) {
abcd /= 10; // abc
abcd %= 100; // bc
if ((abcd / 10) == (abcd % 10)) cout << "true";
else cout << "false";
}
else cout << "false";
} |
2f63a7a400592993e3267d4b6652695038967bb1 | 3095caede854962c20fe18881f5302780aebffa3 | ArduboyCollection/petitseq | /petitseq/MultiTunes.cpp | C++ | cpp | 1,516 | no_license | #include <Arduboy2.h>
const unsigned int timerLoadValue = 180;//50;//220;
volatile unsigned int level = 0;
volatile unsigned int d[4] = {0,0,0,0}; // default value( for debug)
volatile unsigned int dn[4] = {0,0,0,0}; // work variable
//volatile unsigned int lfo = 0;
volatile unsigned char vol[4] = {0,0,0,0}; //... |
2e897298c51b6a18d44300958175b1263951332a | cbba8b92efa8f093ab2d3af44a23c29c22a13614 | anstadnik/CPP_pool | /rush01/srcs/GraphicalMonitor.cpp | C++ | cpp | 5,762 | no_license | #include "GraphicalMonitor.hpp"
GraphicalMonitor::GraphicalMonitor() : _width(1292),
_height(500),
_margin(2),
_window(NULL),
_screen(NULL),
_textSurface(NULL),
_running(1)
{
SDL_Init(SDL_INIT_VIDEO);
_window =SDL_Cr... |
6854ea6a7b527cbc950b7a0249e923ccc19ff5f5 | dda3aeb4ecf4bd0cf8856c458dd1955cc51760cd | UniMiBAnalyses/EFT | /DatacardCreator/datacard_creator_2.cpp | C++ | cpp | 7,869 | no_license | /*
c++ -o datacard_creator_2 `root-config --glibs --cflags` CfgParser.cc dcutils.cc -lm datacard_creator_2.cpp
one should pass the program a config file like file.cfg
to run: ./datacard_creator_2 file.cfg
*/
// FIXME da generalizzare aggiungendo il loop sui coefficienti di Wilson
// FIXME e la ricerca dei termini in... |
3ca95ac6c663a55c64fec49e5195fde054c2a508 | 60508e6c687eba9f630fd880e949eb50333544bd | hk0i/lyngo | /drillbit/drillbit/ui/imp_settings.cpp | C++ | cpp | 2,088 | no_license | #include "imp_settings.h"
SettingsWin::SettingsWin(QWidget *parent)
: QDialog(parent)
{
setupUi(this);
connect(this, SIGNAL(accepted(void)), SLOT(write_settings(void)));
read_settings();
}
/**
* @brief
* Writes QSetting preferences
*/
void SettingsWin::write_settings(void)
{
qDebug() << "W... |
99bde04e80ebaab368271c4b4e70db4e5c1f0a4c | 60acbbdfbec3336dc626437ccf2b7644ae039c55 | baykaner/ledger | /libs/ledger/include/ledger/consensus/stake_snapshot.hpp | C++ | hpp | 3,322 | permissive | #pragma once
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI Limited
//
// 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 Licen... |
4f75261f4b00fd28fc40b6c6b6b0c2c43106e261 | 72f2f2386447b85b8b937e38e3ad41b37ca0740c | Freedom71/FFmpegDemo | /src/demos/Player/main.cpp | C++ | cpp | 796 | permissive | #include <QApplication>
#include <QScreen>
#ifdef USE_OPENGL
#include "openglwindow.h"
#include <QSurfaceFormat>
#else
#include "widget.h"
#endif
int main(int argc, char *argv[])
{
qSetMessagePattern("log[%{file} %{line} %{function} %{threadid}] %{message}");
QApplication app(argc, argv);
app.setOrganizati... |
3c451099cbc2e777c713fd3222ab9922197ff7c3 | 63562d837af32f266062e4f2abea0461deb3e4ea | issoqlf/Arcade | /src/Libraries/Allegro.cpp | C++ | cpp | 6,775 | no_license | /*
** EPITECH PROJECT, 2018
** cpp_arcade
** File description:
**
*/
#include "Allegro.hpp"
#include "SFML.hpp"
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_ttf.h>
#include <Core/Core.hpp>
#include <iostream>
extern "C" Arcade::ILibrary * createLibrary()
{
return new Arcade::Allegro();
}
extern "... |
7143fc1df1ed32e176c023621c9bd8c5afc3ec8a | abd1657e1e4232550bc0ec8fc5f85afbaa15bacd | nordugrid/arc | /src/Test.cpp | C++ | cpp | 1,016 | permissive | // -*- indent-tabs-mode: nil -*-
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
#include <arc/ArcLocation.h>
#include <arc/Logger.h>
static Arc::Logger logger(Arc::Logger::getRootLogger(), "libarcdatatest");
/*
* Use -v to enable l... |
18616bd2439f5c77b7543c775ca1139e6de19d27 | 35b3d7599a3b5674abf28c8ca4b7bc326d954ef7 | JiyoonJo/soc | /main.cpp | C++ | cpp | 275 | no_license | //
// main.cpp
// testProject
//
// Created by 조지윤 on 10/03/2019.
// 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.