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 |
|---|---|---|---|---|---|---|---|---|
5cc136487b02b139f222839e4bf3c8e7fd506399 | 9d4b33a3a380e066dc29e7455a31424006a5cd39 | vip7265/ProgrammingStudy | /KakaoTest/Problem4/vip_problem4.cpp | C++ | cpp | 811 | no_license | #include <iostream>
#include <vector>
#define STR_LEN 10000
int w, q;
std::string words[100000];
std::vector<std::string> queries;
std::vector<std::string> words_of_len[STR_LEN+1];
std::vector<int> solution() {
std::vector<int> result;
for (std::string q : queries) {
}
return result;
}
int... |
d0fd212a86c9ffc2a980c6b025a3eaab4b94cdb5 | 00b5deed26526487dd54bad826235a750f2740ea | hutchico/Advent-2020 | /Day 8/part2.cpp | C++ | cpp | 5,328 | no_license | #include <iostream>
#include <fstream>
#include <vector>
#include <sstream>
using std::vector;
using std::string;
using std::cout;
using std::endl;
struct contents{
string instruction;
char relative;
int value;
};
struct node{
int order;
bool visited;
contents code;
node * next; //The nod... |
622b3aafb99fedaac0648664f79556a663efcffb | 8ea1a96f38ebcf313fe701d5716d7574a4109043 | chacal/openthread | /src/core/backbone_router/leader.hpp | C++ | hpp | 5,223 | permissive | /*
* Copyright (c) 2019, The OpenThread 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 copyright
* notice, this ... |
72bd9b178c225236bbdedd94afc5ff182520f601 | 036a8ef1834c505a18678d805f96de210dd10ccc | RuiTong/class2015 | /AntsDemo/TicTacToe/HumanPlayer.cpp | C++ | cpp | 266 | no_license | #include "stdafx.h"
#include "HumanPlayer.h"
#include <iostream>
Move CHumanPlayer::GetNextMove(CGame& game, bool move_black)
{
std::cout << "Please input next move: ";
unsigned int row, column;
std::cin >> row >> column;
return std::make_pair(row, column);
}
|
fbd5cbfce67314faa517302bf118b5184a77cfc4 | 0b46cc0476356273cca867862b578074bd71b160 | OneCalledSyn/UD-cisc-220 | /Class7/sqrt.cpp | C++ | cpp | 232 | no_license | #include<iostream>
#include<string>
int main(){
unsigned long number_to_hit;
std::cin >> number_to_hit;
unsigned long j = 0;
for(unsigned long i = 0; j < number_to_hit; i++){
j = i * i;
}
return 0;
} |
a1c9fd832f0d8524098a36c4ff23c6df70cc2a52 | dc2a12b7f9fafa336f0551c6cc627a131028c143 | utkuozbudak/Codeforces | /59A-word.cpp | C++ | cpp | 610 | permissive | #include "string"
#include <iostream>
using namespace std;
int main(int argc, const char * argv[])
{
string s;
cin>>s;
int count = 0;
for(int i=0;i<s.length();i++)
{
if(s.at(i)>64 && s.at(i)<91) count++;
}
if(count > (s.length()-count))
{
for(int i=0;i<s.length... |
3348a1d8ee5e3f411683c4fd69e5a671eb7f8ee6 | f48b0bba4f887fa81c81430ec704761099217366 | BGCX067/factplusplus-svn-to-git | /tags/Release-1.4.0/DIGParser/DIGNamesManager.cpp | C++ | cpp | 4,154 | no_license | /* This file is part of the FaCT++ DL reasoner
Copyright (C) 2003-2009 by Dmitry Tsarkov
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) ... |
6def6d083fcbac15aec0f26845f91c559434b483 | 066bdf67aa037e9c25cfdfaff7ec8771eb59cde8 | shiyazhou121/Paddle | /paddle/operators/linear_chain_crf_op.cc | C++ | cc | 12,366 | permissive | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve.
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 ... |
7fc12a408ba457da472ed408b8bfe06d3943a27a | 9200ee09327571ce1fead9f24a40bbdc26034b32 | MVPet/ArenaFight | /ArenaFight/Application.hpp | C++ | hpp | 907 | no_license | /*
* Application.hpp
* The Class that contains the entirety of the the game, such as the game window and main game loop
*/
#ifndef _APPLICATION
#define _APPLICATION
#include "ResourceHolder.hpp"
#include "ResourceIdentifiers.hpp"
#include "StateStack.hpp"
#include <SFML/System/Time.hpp>
#include <SFML/Graphics/Rende... |
6d52c0500457ea0cc58f8644a7e46ada7d33b882 | 8c2cc978385b55f8f50b494d7f08dae438be80de | kawing-chiu/exc | /C++/14template/variadic_template_class/test.cpp | C++ | cpp | 1,842 | no_license | #include <iostream>
#include <string>
#include <type_traits>
template<typename T, typename U>
struct is_same {
static const bool value = false;
};
template<typename T>
struct is_same<T, T> {
static const bool value = true;
};
template<class... Ts> struct Tup {};
// (recursive) specialization:
template<cl... |
19ddb714f8ea05869f33637cd1358946a11bd847 | 72224a93561fcb6973ad981d6cb018e88682ce3d | KemalDemirkol/JavaCompiler | /lib/parser/CFGModification.cpp | C++ | cpp | 12,212 | no_license | #include "CFGModification.h"
#include <algorithm>
#include <iterator>
using namespace std;
#pragma clang diagnostic push
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
//bool is_cycle(Production prod);
#pragma clang diagnostic push
#pragma ide diagnostic ignored "OCDFAInspection"
int lastInd ... |
b054e346dbe4647ae8995e7736fae4f846cb42c1 | dd2c49196de8250838280a43b79102093ad67e5f | zH4x/SoT-Insider-SDK | /Cpp/External (Offsets Only)/SDK/BP_fod_Pondie_03_OrchidRaw_00_a_ItemDesc_functions.cpp | C++ | cpp | 597 | no_license | // Name: SoT-Insider, Version: 1.102.2382.0
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//---------------------------------------... |
f2825eb8dba7a0b56fe18b83441f9b82b1b5f467 | 8ff0961cc481635f970d9e16a0730018a341e2cb | shuxiangguo/sxg_leetcode | /401.二进制手表.cpp | C++ | cpp | 1,810 | no_license | /*
* @lc app=leetcode.cn id=401 lang=cpp
*
* [401] 二进制手表
*
* https://leetcode-cn.com/problems/binary-watch/description/
*
* algorithms
* Easy (49.99%)
* Likes: 84
* Dislikes: 0
* Total Accepted: 7.6K
* Total Submissions: 15.2K
* Testcase Example: '0'
*
* 二进制手表顶部有 4 个 LED 代表小时(0-11),底部的 6 个 LED 代表分... |
56ce0b4c0d264c3f5c42696c5d53b324f9a1cc98 | cea7328dbfeb1a246d158c49348bde0589d135f3 | WhiZTiM/coliru | /Archive2/24/8f7b5207cd1939/main.cpp | C++ | cpp | 424 | no_license | #include <string>
#include <boost/utility.hpp>
struct some_policy
{
typedef boost::integral_constant<bool, false> condition;
};
struct other_policy
{
typedef boost::integral_constant<bool, true> condition;
};
template <typename policy>
class test
{
void do_something(typename boost::enable_if<typename pol... |
b1cecf7b7885ccfd1c4fb6092eb56c7b49806477 | 0a91c98e5efdc2e38561a06d10b0da4cbe8f1cde | komplike/PCI | /pile.cpp | C++ | cpp | 988 | no_license | /**
* @file pile.cpp
* @author xsanta07
* @author xslavk01
* @brief Includes functions operating with pile.
*/
#include "table.h"
using namespace std;
void Piles::insert(Card *obj){
if (obj == nullptr)
return;
pile.push_back(obj);
}
unsigned Piles::size(){
return pile.size();
}
void P... |
a0c4874876bc8f6366eca6c242f416c729277250 | 859914be5d2c983894b859eff7fbffeddcffdd64 | salieri11/concord-bft | /bftengine/src/preprocessor/PreProcessor.hpp | C++ | hpp | 19,099 | permissive | // Concord
//
// Copyright (c) 2020-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 copyrigh... |
f976676db1585c272c2bbcb0592097f3e98f558a | 6ad9874ea1a30b4fd4f9640023c3345e1f5b4cd6 | ThyPandaKing/Final-450 | /Array/28-Trapping rainwater.cpp | C++ | cpp | 1,032 | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int trappingWater(int arr[], int n) {
int mxArrL[n], mx = arr[0], mxArrR[n], mn = arr[n - 1];
int ans = 0;
mxArrL[0] = 0;
mxArrR[n - 1] = 0;
for (int i = 1; i < n; i++) {
mxArrL[i] = m... |
8f2dca04f48e75846d54c68ee18f586699e8a8b5 | 432c36e9701501f73fe4e90d580477687934318d | envoyproxy/envoy-wasm | /source/extensions/compression/gzip/compressor/zlib_compressor_impl.cc | C++ | cc | 3,050 | permissive | #include "extensions/compression/gzip/compressor/zlib_compressor_impl.h"
#include <memory>
#include "envoy/common/exception.h"
#include "common/common/assert.h"
#include "absl/container/fixed_array.h"
namespace Envoy {
namespace Extensions {
namespace Compression {
namespace Gzip {
namespace Compressor {
ZlibComp... |
55ddd9e251d6a62cec67500d6b6bdfc5b74d344a | b4191a8937f32f05cf2182d1cca0998d0aa2ead8 | am17/SkyEngine | /SkyEngine/old/PSStage.cpp | C++ | cpp | 2,132 | no_license | #include "stdafx.h"
#include "PSStage.h"
#include "globals.h"
namespace sky
{
PSStage::PSStage()
:pixelShader(nullptr),
m_constantBufferCount(0),
m_shaderResourcesCount(0)
{
}
PSStage::~PSStage()
{
deleteCurrentConstantBuffer();
}
void PSStage::setPixelShader(IPixelShader* shader)
{
pixelShader ... |
e369b3472193ae5f7b70ecc43de084b3950dddbf | e19d98db4191e879b4c21c57b27a4177620111ad | Ashish-kumar7/geeks-for-geeks-solutions | /Possible paths between 2 vertices.cpp | C++ | cpp | 645 | no_license | void dfs(int & path,int source,int destination,int vis[],vector<int>adj[]){
vis[source]=1;
if(source==destination){
path++;
}
else{
for(auto it : adj[source]){
if(vis[it]==0)dfs(path,it,destination,vis,adj);
}
... |
8657bd1f2347d681f032827a3e448eb938443da3 | 0be662d95d0a4922de213e188aadb98231cbb2b3 | zyndor/xrhodes | /xr3/src/GL/xrgl.hpp | C++ | hpp | 1,757 | permissive | #ifndef XR_XRGL_HPP
#define XR_XRGL_HPP
//==============================================================================
//
// XRhodes
//
// copyright (c) Gyorgy Straub. All rights reserved.
//
// License: https://github.com/zyndor/xrhodes#License-bsd-2-clause
//
//======================================================... |
31fe53088e07043e192ee24f196ab498c2d43e3d | f001d2dd738dd872cfc1fa3f11e7c14294048656 | SubhamChoudhury/Back_to_Basics | /Linked List/01 Linked_List_Creating-a-node.cpp | C++ | cpp | 644 | no_license | #include<bits/stdc++.h>
using namespace std;
class Node{
public:
int data; //Defining Data
Node* next; //Defining node for refering next element
};
int printList(Node* n)
{
while(n != NULL)
{
cout<<n->data<<" ";
n = n->next;
}
}
int main()
{
Node* head = NULL; //defining NULL so that... |
557e7942b4eede93227938cd448d0e8a740327e1 | ba9d42bafffb3f6fb2ba0dad158526e0100ee542 | 614984177/Code | /LeetCode/46.全排列.cpp | C++ | cpp | 1,262 | no_license | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
/*
* @lc app=leetcode.cn id=46 lang=cpp
*
* [46] 全排列
*/
// @lc code=start
class Solution {
public:
vector<vector<int>> ans;
vector<int> a;
vector<bool> vis;
vector<vector<int>> permute(vector<int>& nums) {
a = vector<in... |
f61b75025944c8350f324c9929e0b09d9b0da5fc | b38c1d2aa8ab9c11809f66300802fcb044c4008c | abhinavcoder/motion-simulation | /tracking.cpp | C++ | cpp | 1,595 | no_license | #include "tracking.hpp"
#include <math.h>
#include <QDebug>
#include <assert.h>
double sgn(double x) {
return (x > 0) - (0 > x);
}
MiscData Tracker::genControls(Pose s, int &vl, int &vr, int prevVl, int prevVr, double t) {
Q_UNUSED(prevVl);
Q_UNUSED(prevVr);
Pose ref(traj->x(t)*fieldXConvert, traj->y(... |
e6b7111ff0c12892b9b374aaf9513d5d5c562a65 | 202f18a6f541654d6fa843eb33412fc276fb1313 | friskareliv/metal | /include/metal/list/copy.hpp | C++ | hpp | 1,262 | permissive | // Copyright Bruno Dutra 2015-2016
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt
#ifndef METAL_LIST_COPY_HPP
#define METAL_LIST_COPY_HPP
#include <metal/config.hpp>
#include <metal/list/copy_if.hpp>
#include <metal/lambd... |
c134c25e4022ed1bd96b236822b0e0235f1caa44 | 9492bf0caca8396eb4c2247c40de0382276ebcd4 | mamun4122/My-Online-Judge-Submission | /Codeforces/2016-2017 ACM-ICPC, Central Europe Regional Contest (CERC 16) - 101173/101173A-Appearance Analysis.cpp | C++ | cpp | 4,084 | no_license | #pragma comment(linker, "/stack:640000000")
#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INF = 0x7f7f7f7f;
const double PI=acos(-1.0);
#define READ(f) freopen(f, "r", stdin)
#define WRITE(f) freopen(f, "w", stdout)
#define MP(x, y) make_pair(x, y)
#... |
633c1cfe49fddbd66f11ee7f6871138675931202 | 768565317b427a310ac1d80eebfcd6b542050d58 | devmestic/ExamCPlus | /FastCampus_C++/048_Point03/Point03.cpp | C++ | cpp | 4,176 | no_license | /*-----------------------------------------------------------------------------
* Name: 048_Point03
* DESC: 배열 & 포인터 & 함수
* 함수의 파라미터 혹은 리턴값으로 포인터를 이용하는 이유
* 1: 연속된 메모리 공간에 주소값으로 처리
* 2: CallbyReference: 함수에서 하나 이상의 값을 리턴하거나 변경해야 하는 경우
* 3: 동적할당
* 4: 메모리 공간의 효율적 사용: 거대한 사용자 자료형을 함수 파라미터로 주소값만 넘기면 되므로(메모리에 복사를 줄임... |
6a6ff0849b0bf7f5669df44bbb850618fdef9f72 | a2adef1598c55fd6af75e253fc25a470676a6922 | ufz/ogs | /MaterialLib/MPL/Properties/CreateWaterTemperatureIAPWSIF97Region1.cpp | C++ | cpp | 1,206 | permissive | /**
* \file
* \copyright
* Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* Created on Feb 8, 2023, 4:38 PM
*/
#inclu... |
4cf69a24923b71bc37cd34210f594979281ba81f | a20028973fa0f8b590a91d83286e2f80c86d7c98 | Cypher1/Cpp_Tuts | /source/lec4/fri2/findIfFunctionObject.cpp | C++ | cpp | 534 | permissive | #include <iostream>
#include <vector>
#include <algorithm>
class range {
public:
range(int l, int u) : lb(l), ub(u) { }
bool operator() (int val) {
return (lb <= val && val <= ub);
}
private:
int lb, ub;
};
int main() {
std::vector<int> vec{ 20, 2, 4, 3, 8, 10, 15, 1};
auto presult = std::find_... |
1b9cbf5f0971eeca1b40017edf9b0ad2fb45ccd1 | 46f966050ccbfecb278dea63b2ed3fd64db0bcfd | montygupta32/Codeforces-Questions | /probablity.cpp | C++ | cpp | 491 | no_license | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,t;
int a[n];
for(int i=0; i<n; i++) cin>>a[i];
int count =0;
int total = (n*(n+1))/2;
for(int i=0; i<n; i++){
int sum=0;
for(int j=i; j<n; j++){
if(sum+a[j]<t){
sum=sum+a[j];
... |
4bcfd03b7367bccc6f056701cba4cd285df1353d | 0828657fb9213ba9f668545a57c082e4b99f6a58 | 853728579/customControl | /volumebar.cpp | C++ | cpp | 2,637 | no_license | #include <qpainter.h>
#include "volumebar.h"
#include "ui_volumebar.h"
VolumeBar::VolumeBar(QWidget *parent) :
QWidget(parent),
ui(new Ui::VolumeBar)
{
value = 1;
pillarNum = 5;
gapSize = 5;
minPillarHeight = 20;
volumeWidth = 100;
borderWidth = 3;
borderColorStart = QColor(100, 10... |
5f3940cafdf922027129a3f39838c969eb8b4d03 | df2daef386d5489c76c236b410e62b76de3e6b69 | gebi/libgebi | /test_stopwatch/main.cpp | C++ | cpp | 331 | no_license | #include "stopwatch.hpp"
using namespace gebi;
#include <iostream>
#include <string>
using namespace std;
#include <unistd.h>
int main()
{
{
Stopwatch<CoutNotifier> sw;
sleep(1);
}
cout <<endl;
{
Stopwatch<> sw;
sleep(1);
cout << sw.stop() <<endl;
}
r... |
7f11e842d6d3ee92ec70edf96309ffa4cc6409ea | 30e034256bf789fe84dc66dd9a39db50c5855f12 | shahripal/e-BlockCoin-Silver | /src/libzerocoin/Denominations.cpp | C++ | cpp | 3,963 | permissive | // Copyright (c) 2017-2018 The eBlockCoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "Denominations.h"
#include "amount.h"
namespace libzerocoin {
// All denomination values should only exist in these r... |
fc0f6265ae4fd5615c6914cccd61572c5ce52659 | 9bb2fdc16f477367934dd3f8ac1b8ae5655e833a | Jopie64/Boost2Git | /src/importer.cpp | C++ | cpp | 17,366 | no_license | // Copyright Dave Abrahams 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)
#include "importer.hpp"
#include "ruleset.hpp"
#include "svn.hpp"
#include "log.hpp"
#include "path.hpp"
#include <boost/range/adaptor... |
4ed56fb4eedcd661789f8f7ffba571bd882bc202 | d68d2190dedeb98a4ac968c4a3a110f216865be5 | RomanoViolet/C- | /HelloComponents/CoreFunctions/Library/InterfaceTypes/Type_HighAssuranceInterface.hpp | C++ | hpp | 319 | permissive | #ifndef TYPE_HIGH_ASSURNACE_INTERFACE
#define TYPE_HIGH_ASSURNACE_INTERFACE
class TypeHighAssuranceInterface
{
public:
TypeHighAssuranceInterface( ) = default;
virtual void doPreconditionCheck( ) = 0;
virtual ~TypeHighAssuranceInterface( ) = default;
};
#endif // TYPE_HIGH_ASSURNACE_INTERFACE
|
111edfd6371d6af4a67795b88fce9f639298b0d9 | 5760bedf7a35a10e845f6fc5c4db3e2708887814 | robinhhu/uicw3g8 | /player/window.cpp | C++ | cpp | 1,333 | no_license | #include "window.h"
#include <QDir>
#include <QDirIterator>
Window::Window()
{
layout = new QHBoxLayout();
layout->setMargin(0);
setLayout(layout);
icons = readIcons("../icon");
theMenu = new TheMenu(icons);
thePlayer = new ThePlayer(icons);
layout->addWidget(theMenu);
... |
e54a9ba31c95d59306b156cfa504d9889c12de00 | 2b9498212a9d7986522f7ee2568e8dfeef43ff93 | talatynnikA/my-lab-works-on-c | /1 sem/lab5/задача2/Проект1/Проект1/Исходный код.cpp | C++ | cpp | 368 | no_license | #include <iostream>
using namespace std;
void main()
{
float w, s, t = -7.4, n = 9, y = 5, j = 0;
const float e = 2.71828;
while (j < 2.1)
{
w = 0.6 * j + pow(e, t * j) * pow(4 * y / n, 2);
s = sqrt(w - 0.1 * t) / (2 + pow(n, 2));
cout << "j=" << j << "\t";
cout << "w=" << w << "\t";
cout << " s=" << s... |
a5ba18037c28808917f8a3072aecb1f40e52d0e6 | feb7d884dffa8852b1f6a6b7c736f861be6a1e4f | noshaba/DataCompression | /Entropy.hpp | C++ | hpp | 1,243 | no_license | #ifndef ENTROPY_HPP
#define ENTROPY_HPP
#include <map>
#include <math.h>
#include "IOFile.hpp"
#include "MyStructs.hpp"
class Entropy {
public:
typedef std::map<unsigned char, CharInf<unsigned char> > CharInfMap; // defines map type
typedef std::map<unsigned char, CharInf<unsigned char> >::iterator Ch... |
4e465123b28a34bb7a4f99448f33732abca74ee1 | 30d4d61c4d610aba4b8309fac8c3b56e32a2367d | gxy666/badminton | /badminton-qt/Badminton/musicthread.cpp | C++ | cpp | 1,348 | no_license | #include "musicthread.h"
MusicThread::MusicThread()
{
victorybgm = new QMediaPlayer(this);
losebgm = new QMediaPlayer(this);
victorybgm->setMedia(QUrl("qrc:\\new\\prefix1\\resource\\victor.wav"));
victorybgm->setVolume(50);
losebgm->setMedia(QUrl("qrc:\\new\\prefix1\\resource\\lose.wav"));
lose... |
a8d5920b66ebceed13243167ab17c45a5fe5a05d | 471721463f3a37a456b0350368aa28b625ddb3f3 | diegoado/AlgorithmAdvanced | /Basic/bonus/Feynman.cpp | C++ | cpp | 787 | no_license | /*
* University Federal of Campina Grande
* Student: Diego Adolfo Silva de Araújo
* Registry: 113210090
* Discipline: Algoritmos Avançados
*
* URI - Online Judge
* Problem: 1323 - Feynman
* Time limit per test: 1 second
* Memory limit per test: 256 megabytes
* Input: standard input
* Output: standard output
... |
beb7f5a9722af5ca10eecbdd3d1b156b0135cb46 | ef4abc234add2844c3e35d029891c92610181b2e | AlexanderRepin/EAN-Order-System | /a3/EAN.cpp | C++ | cpp | 5,479 | no_license | #define _CRT_SECURE_NO_WARNINGS
// EAN.cpp (Assignment 3)
// Alexander Repin
// This module checks if the EAN number is validated
#include "GS1Prefix.h"
#include "EAN.h"
#include <stdlib.h>
#include <cstring>
using namespace std;
EAN::EAN()
{
eanEan[0] = '\0';
areaEan[0] = '\0';
publisherEan[0] =... |
bedade333b58fa8220cffe381dabda7297c9b812 | 5bcf1117c8634a46d56d896153847c1aef715da5 | AdrianNostromo/CodeSamples | /CPP_Joc_Windows_Android/SH_Client_Win_Cpp_Cmake/App/src/rpg3D/gw/physics3D/dispatcher/CustomCollisionDispatcher.cpp | C++ | cpp | 2,040 | no_license | #include "CustomCollisionDispatcher.h"
#include <rpg3D/gw/physics3D/actor/IPhysicsActor.h>
using namespace rpg3D;
CustomCollisionDispatcher::CustomCollisionDispatcher(btCollisionConfiguration* collisionConfiguration)
: super(collisionConfiguration)
{
//void
}
bool CustomCollisionDispatcher::needsCollision(const bt... |
c012c2e2df4bc1015248c9e816a9b88518d1e0ff | c61610ece2c8cda9da8b374ced07ac97e5f8564e | pawarrahul1002/Cpp-DSA | /stack/minStack.cpp | C++ | cpp | 2,171 | no_license | #include <iostream>
using namespace std;
class stack
{
private:
int data[100];
int top;
int minEle;
public:
stack()
{
top = -1;
}
bool isEmpty()
{
return top == -1;
}
void getMin()
{
if (isEmpty())
{
cou... |
48def3079529c32068936400b8851eb4e6490008 | c218098ca6200260029ae78d5278303c24a94107 | logic-three-body/C-BJFU | /第14周/OJtest/OJtest/QUEQUE/testQUEQUE.cpp | C++ | cpp | 2,678 | no_license | #include<iostream>
using namespace std;
template <typename T> class MyQueue;//前置声明
template <typename T> std::ostream & operator<<(std::ostream &, const MyQueue<T> &);
template <typename T>
class QueueItem
{
public:
QueueItem(const T & t) :item(t), next(0)
{}
private:
T item; //value stored in this element
Queue... |
f6751afb6d6633b0167043344518a2ecd17fb34f | 4003fe9818e561e72d15bc1909e00396d9053271 | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_new_hunk_3615.cpp | C++ | cpp | 1,354 | no_license |
argv0 = apr_filepath_name_get(r->filename);
nph = !(strncmp(argv0, "nph-", 4));
conf = ap_get_module_config(r->server->module_config, &cgi_module);
if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r))
return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(02809),
... |
aabd12bfc2e753f068e870f628a253e4b0fdefc9 | c48db86f47ad79681325f05e09f6cfcb5b248ea5 | neuschaefer/qnap-gpl | /src/boost_1_42_0/doc/html/boost_asio/example/buffers/reference_counted.cpp | C++ | cpp | 3,074 | permissive | //
// reference_counted.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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 <boost/asio.hpp>... |
2a7c65216f7cbc31a6a48df508e4b601ce0064cc | da53013c7e2709df1f69ca13f14ae7ff376192e7 | ck89119/Algorithm | /LeetCode/686.cpp | C++ | cpp | 1,094 | no_license | #include <bits/stdc++.h>
using namespace std;
#define dump(x) cout << __LINE__ << " : "<< #x << " = " << (x) << endl
#define clr(a, x) memset(a, x, sizeof(a)) //0:0, -1:-1, INF:0x3f, -INF:0xc0
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define lowbit(x) x & (-x)
typedef long long ll;
typedef pair<i... |
c4c251dcb31bf01896d811c64de1362df1be66b4 | 33920c9aeae793693556b26a7e92be411f8acd12 | Candarush/DoorState | /MosqMQTTWrapper.hpp | C++ | hpp | 514 | no_license | #pragma once
#include "/usr/local/include/mosquittopp.h"
#include <cstring>
#include <string>
#include <iostream>
#include <vector>
namespace MQTTW
{
class MosqMqttWrapper : public mosqpp::mosquittopp
{
private:
void on_message(const struct mosquitto_message *message);
std::vector<std::str... |
b81cd906df358c4d51dc4978da727593719300b0 | 90a7a96efdcf418c1849d10a93d51968a88adbeb | things-i-want-to-forget/dismay5 | /DEngineRender.cpp | C++ | cpp | 5,372 | no_license | #include "DDismay.h"
#include "DEngineRender.h"
#include "Garry/dismay_cmatsystemsurface.h"
#include "Garry/dismay_cluainterface.h"
#include "Garry/dismay_cengineclient.h"
#include <Windows.h>
#define VK_IS_PRESSED 0x01
#define VK_WAS_PRESSED 0x02
#define FONT_HEIGHT 14
extern DDismay* dismay;
void __stdcall GModL... |
89c9155655df807d876a46a6d59c2677eb4b3fa9 | 1992b63460a6410694b0df882dc13e19ce6c446e | linxinwNeo/CS162 | /labs/lab5/shape.cpp | C++ | cpp | 507 | no_license | #include "shape.h"
using namespace std;
string Shape::get_name() const {
return this->name;
}
void Shape::set_name(string name) {
this->name = name;
}
string Shape::get_color() const {
return this->color;
}
void Shape::set_color(string color) {
this->color = color;
}
Shape::Shape() {
this-... |
8660ce3d800d145ee59ac928128ebeb49e297a1b | 4843ec9093f478cd870766cf4ddbc5f21c3b2577 | quxiaofeng/python-stl | /meshlab/MeshLabSrc_AllInc_v132/vcglib/apps/sample/trimesh_base/trimesh_base.cpp | C++ | cpp | 3,381 | no_license | /****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyri... |
0128d627eb602c62567a19918c90660f1ebdab3b | 578e5a21995978e6280a8cd5aef255a98157fee9 | big-guy/cpp-demo | /lib10core1/src/main/cpp/lib10core1impl1api1.cpp | C++ | cpp | 821 | no_license | // GENERATED SOURCE FILE
#include "lib10core1_private.h"
#include "lib10core1_impl.h"
#include <iostream>
#include <stdio.h>
/*
* Here is a function.
*/
int lib10core1impl1api11(int a, int b) {
return a + b;
}
/*
* Here is a function.
*/
int lib10core1impl1api12(int a, int b) {
return a + b;
}
/*
* Here... |
3526ebd65d6b28e1d1eec702964748dd0c32396a | 80799f5a6f9a507a7b82b7c5b1689c019020a201 | mehash32/operating_system_lab | /scheduling Algorithm/main.cpp | C++ | cpp | 12,299 | no_license | #include <iostream>
using namespace std;
void FCFS();
void SJF();
void priority();
void Round_robin();
int main()
{int a;
cout<< "for FCFS press 1"<<endl;
cout<< "for sjf press 2"<<endl;
cout<<"for priority press 3"<<endl;
cout<<" for round robin press 4"<<endl;
cin>>a;
if (a==1){
FCFS();
... |
de520537e2c851ff07acbb950ef331712f91d3ff | 7e9167828472f49671e57799ebf8bf3ead228516 | wangweisen/xmidictrl | /src/mapping/MappingList.cpp | C++ | cpp | 2,458 | permissive | //---------------------------------------------------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2021 Marco Auer
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (th... |
ec8f9ea24f90bbbbe30ea509b07189021daec724 | e185a17c56fd8ff7a15f0d5b9602a15bbac712ff | yuvrajinbhakti/HackerRank-DSA-in-CPP-Solutions | /Linked Lists/AVL Trees/InsertRotations.cpp | C++ | cpp | 2,675 | permissive | /* Node is defined as :
typedef struct node
{
int val;
struct node* left;
struct node* right;
int ht;
} node; */
//we will make rotation functions for every case
int height(node *root)
{
if(root==NULL)
return -1;
else return max(height(root->left),height(root->right)) + 1;
... |
d388cb03a532c0d3066eb4a5fddfbb11cdf4626f | fd0b70b95d5c90d4a203d42a66c1b8f60b55420b | jgleesawn/voxelengine | /game/src/util/BVH/bvbranch.cpp | C++ | cpp | 1,706 | no_license | #include "bvbranch.h"
#include <glm/glm.hpp>
template<>
void BVBranch<glm::vec4>::splitVolume(const std::vector<glm::vec4> & v_in, std::vector<int> & ind_in, int limit) {
glm::vec4 mean(0.0f);
min = max = v_in[0];
for( int i=0; i<ind_in.size(); i++ ) {
min = glm::min(v_in[ind_in[i]], min);
max = glm::max(v_in[... |
0b5b34c4ba83147086617b561a40c27e61e94c32 | acc51d5291f1186ed188c451c98b73b6a14f7a31 | bp100a/FaultSim | /ListenWindow.cpp | C++ | cpp | 1,054 | no_license | // ListenWindow.cpp : implementation file
//
#include "stdafx.h"
#include "FaultSim.h"
#include "ListenWindow.h"
#include "FaultSimDoc.h"
#include "mainfrm.h"
#include "FaultSimMessages.h" // get WM_CONFIGURE_THREAD
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////... |
6b94029ff4ce45d2356ca2c64c75fa0905302333 | bc37263938dd6e4168d3375d45fe11a1bbb51461 | hvellyr/fspplib | /src/include/fspp/details/vfs.hpp | C++ | hpp | 5,991 | permissive | // Copyright (c) 2016 Gregor Klinke
#pragma once
#if defined(USE_FSPP_CONFIG_HPP)
#include "fspp-config.hpp"
#else
#include "fspp/details/fspp-config.hpp"
#endif
#include "fspp/details/dir_iterator.hpp"
#include "fspp/filesystem.hpp"
#include <cstdint>
#include <memory>
#include <ostream>
#include <string>
namesp... |
5ee91718abd8850e5f1102926d53af5209fce4ad | 5c973f33b6be4081c1b7912967f776cd5e71ce14 | vladimir-rangelov/ubreader-ios | /src/commands/move_books.hpp | C++ | hpp | 608 | no_license | #ifndef commands_MoveBooks_included_hpp
#define commands_MoveBooks_included_hpp
#include <string>
#include <vector>
#include <utility>
#include <unordered_map>
#include "src/bl/book.hpp"
#include "src/bl/book_shelf.hpp"
namespace commands{
struct MoveBooks {
typedef void result_type;
const std::unorder... |
fd2c9e9e40749bcddb376ed86f3acb38e5ffc14c | 9e37f5cd50a71be74ee70de34ebb3af7bd04aca2 | sxs-collaboration/spectre | /src/Evolution/Systems/NewtonianEuler/RamPressure.cpp | C++ | cpp | 1,809 | permissive | // Distributed under the MIT License.
// See LICENSE.txt for details.
#include "Evolution/Systems/NewtonianEuler/RamPressure.hpp"
#include "DataStructures/Tensor/Tensor.hpp"
#include "Utilities/GenerateInstantiations.hpp"
#include "Utilities/Gsl.hpp"
namespace NewtonianEuler {
template <typename DataType, size_t Dim... |
74cf63825da58c2260ad93b6a24f68ba04c85a2c | 829bd8a63d29f6822151e46c9111ce592a5204cc | Alex-Beng/base_enroll_assignment | /assignment_1/source/1-1.cpp | C++ | cpp | 402 | no_license | /**
* OpenCV's hello world code
* Author: Alex Beng
*/
#include <bits/stdc++.h>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main(int argc, char const *argv[]) {
cv::Mat image(200, 750, CV_8UC1, cv::Scalar(0));
cv::putText(image, "Hello World !", cv::Point(75,150), 0, 3, cv::Sca... |
7e4f47cb060aa46cf2c23a0e89811583d8431d49 | b40db50f2dbde5625b3c3f5c652be2fa0069028c | elenaserrano12/ejercicios1 | /C++/30 funciones/2. cambio $ a €.cpp | C++ | cpp | 431 | no_license | #include<iostream>
float cambio(float dolars){
float respuesta;
respuesta=(dolars*0.86);
return(respuesta);
}
int main(){
char salir;
float dolars;
std::cout<<"Introduce una cantidad de dolars: ";
std::cin>>dolars;
std::cout<<"Me cago en dios tiene uste: "<<cambio(dolars... |
2154ac64d54b13c081d92c38e59b9652364c85ac | 3812e7916c6712a708838eb7acb717c5c02b815d | bhouston/BezierCurveDemo1997 | /src/TEAPOT.CPP | C++ | cpp | 9,291 | no_license | ///////////////////////////////////////////////////////////////////////////////
//
// Teapot.Cpp
//
// The Classic Benzier Patch Utah Teapot
// [another source by plash]
//
// Started on July 27, 1997
// Updated on July 29, 1997
//
#include "azrmath.h"
#include <stdio.h>
#include <stdlib.h>
#include <conio.h... |
04a7d161487289c5746800d8995a6e3288d7888f | 62e48cabda90279bff977242e349438e246788b7 | eduardopalmeida/CG-Sistema-Solar | /catmul.cpp | C++ | cpp | 4,885 | no_license | #include "structs.h"
#include "catmul.h"
extern vector< vector<Ponto> > translacoes;
extern int translActual;
extern vector <Patch> patches;
Ponto Points[4][4];
void getCatmullRomPoint(float t, int *indices, float *res)
{
// catmull-rom matrix
float m[4][4] = {
{ -0.5f, 1.5f, -1.5f, 0.5f },
{ 1.0f, -... |
ec13b14caf2cb6b01646494e50acee23ba99b2cd | 52a2a45a678722de33efbcb716a3b77a95dd6636 | mk533/Codes | /LinkedList/Palindrome.cpp | C++ | cpp | 2,684 | no_license | /*
Check Linked List in palindrome or not
Method 1:- using Stack , requires two traversals of linked list O(n) space.
Method 2:- traverse till middle node (Hare and Torotoise)
*/
#include<cstdio>
#include<cstdlib>
using namespace std;
struct node
{
int data;
struct node *next;
};
struct node *NewNode(int ... |
47a1be4982dbe4aa8d0805c0837bc04d6338f5e2 | 88ecab51948dd24d41635732f99d4153e79af66f | n1gp/CWSL | /Utils/SharedMemory.cpp | C++ | cpp | 8,808 | no_license | //
// SharedMemory.h - class for working with shared memory on Win32
// (adapted from my old works - comments in czech)
//
#include <windows.h>
#include <stdio.h>
#include "SharedMemory.h"
///////////////////////////////////////////////////////////////////////////////////////////
// vytvor ... |
d2183587293966e097c6cf300366006bccb402fd | 48203d463c4e72cb4ac8ccb521363ca972625c27 | dtcxzyw/OI-Source | /Source/MergableHeap/4331.cpp | C++ | cpp | 719 | no_license | //TODO:4331
#include <algorithm>
#include <cstdio>
int read() {
int res = 0, c;
do
c = getchar();
while (c < '0' || c > '9');
while ('0' <= c && c <= '9') {
res = res * 10 + c - '0';
c = getchar();
}
return res;
}
const int size = 1000005;
struct Node {
int l, r, dis,... |
a0ff452f33cdb793d09f3087aab6b3dfd8eb9fdf | 983565fc2399b7127f6308d4591109ed703295ee | ankushgarg1998/Competitive_Coding | /practice-websites/hacker-blocks/1.0/conversion2.cpp | C++ | cpp | 705 | no_license | #include <iostream>
#include<math.h>
#include<string>
using namespace std;
int main() {
int sb, db, i=0;
long int n, ans=0;
char str[50] = {'0'};
string s;
cin>>sb>>db>>n;
// if(sb == db)
// cout<<n;
if(sb != 10)
{
while(n!=0)
{
ans += (n%10)*p... |
bf3eda13a1980b29727a0e93cbad7461954db155 | c3228154d684dd5b7554cab5ae4237f21585b20b | SSReal/codingQuestions | /geeksforgeeks/strings/romanToInteger.cpp | C++ | cpp | 1,094 | no_license | #include <bits/stdc++.h>
using namespace std;
/*
Given a Roman Number in string format,
return the associated number as an int.
The Roman Numeral can consist of I, V, X, L, C, D and M.
*/
/*
Made by Sajal Singhal (June 2021)
Approach:
Iterate from last and add the numbers which are bigger than the
previous max, and... |
c0df0fc8f41460074bc422e17cf704fd1d8e993b | 9347709a23ca0e0af47d3082108f89a2fd03901f | shabalind/llvm-project | /clang/test/Sema/warn-free-nonheap-object.cpp | C++ | cpp | 2,645 | permissive | // RUN: %clang_cc1 -Wfree-nonheap-object -std=c++11 -x c++ -fsyntax-only -verify %s
extern "C" void free(void *) {}
namespace std {
using size_t = decltype(sizeof(0));
void *malloc(size_t);
void free(void *p);
} // namespace std
int GI;
struct S {
operator char *() { return ptr; }
void CFree() {
::free(&pt... |
a6bd31f30ea554f4981c44897814648d13596ff8 | 9823820318a241984017819b6b382c8cab509fee | marcbllv/checkers | /heuristics.cpp | C++ | cpp | 7,971 | no_license | #include "heuristics.hpp"
#include "player.hpp"
namespace checkers {
int nodesSeen = 0;
constexpr int Heuristics::COEFFROWS[8];
constexpr int Heuristics::COEFFCOLS[8];
constexpr unsigned int Heuristics::CENTER[6];
constexpr unsigned int Heuristics::MAINDIAG[8];
// Top level minmax
// Special treatment for not retur... |
4deb965fd51e3f6a373fc72c342ef67b8608daac | 1bc7ec8ecd922f254ad1ec8d05c086610257638c | cHrIsToPhErLyNn99/li_yuanqi | /homeWork/8.8/main.cpp | C++ | cpp | 535 | no_license | #include <iostream>
using namespace std;
int main()
{
unsigned int values[5] = {2.4.6.8.10};
unsigned int *ptr;
for ( size_t i = 0; i < 5; i++ )
cout << values [ i ] << " ";
vptr = &values[0];
vptr = values;
for ( size_t i = 0; i < 5; i++ )
cout << *( vptr + i ) << " ";
... |
2e916e65161552970d17e2c2b89e5054331a50c8 | 01499f9c3e4af69b084c9bee28b570f328c41ba5 | Nechrito/nebula | /code/render/coregraphics/vertexsignaturepool.cc | C++ | cc | 985 | permissive | //------------------------------------------------------------------------------
// vertexsignaturepool.cc
// (C) 2007 Radon Labs GmbH
// (C) 2013-2020 Individual contributors, see AUTHORS file
//------------------------------------------------------------------------------
#include "render/stdneb.h"
#include "coreg... |
002b180179b519a78a95ce537118107a5cd7b8de | 5146f669c597db6d40adab41faeb871516594368 | zhanggjun/coolfluid3 | /test/Common/utest-signals.cpp | C++ | cpp | 3,457 | no_license | // Copyright (C) 2010 von Karman Institute for Fluid Dynamics, Belgium
//
// This software is distributed under the terms of the
// GNU Lesser General Public License version 3 (LGPLv3).
// See doc/lgpl.txt and doc/gpl.txt for the license text.
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE "Test module for CF s... |
5d20607eeead8bbbc05386a6ccbcdf50d2721968 | 4597bcab03defd31d07927966fcdf2d213074cb4 | awgn/cat | /cat/container.hpp | C++ | hpp | 8,061 | no_license | /******************************************************************************
*
* The MIT License (MIT)
*
* Copyright (c) 2014-15 Nicola Bonelli <nicola@pfq.io>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"... |
f4cde5a9abde7a5c633f7ee1ced89894b063b08c | 6124e5e9688526da6fa8e8971cb4505009676c17 | project8/locust_mc | /Source/Generators/LMCButterworthLPFGenerator.hh | C++ | hh | 2,401 | no_license | /*
* LMCButterworthLPFGenerator.hh
*
* Created on: 29 January 2015
* Author: plslocum
*/
#ifndef LMCBUTTERWORTHLPFGENERATOR_HH_
#define LMCBUTTERWORTHLPFGENERATOR_HH_
#include "LMCGenerator.hh"
namespace locust
{
/*!
@class ButterworthLPFGenerator
@author P. L. Slocum
@brief Apply dig... |
6d85821f1c656a00a06ce489e19cf24168002e06 | 1d5cfcb78789b4e1f590f4a8400c351a67a85fb6 | Neurologist/mrpt | /apps/mrpt-performance/perf-icp.cpp | C++ | cpp | 4,045 | permissive | /* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| ... |
e4f8547c7e13c1568a793e980ca69e0b2283349e | 77aed4a323fd086144ea2264629f98a0b231f762 | SoumyaM2002/C-Programs | /tutorial4.cpp | C++ | cpp | 522 | no_license | //*************Reference variables************
/*#include<iostream>
using namespace std;
int main(){
float a=455;
float & b=a;
cout<<"The value of a is "<<a<<endl;
cout<<"The value of b is "<<b;
}*/
//**************Typecasting***************
#include<iostream>
using namespace std;
int main(){
int a=... |
1c4ef3bd617f26aa2df19565a11a72e21fafa076 | 4ae1c84139fad5bbb0882da4dc8552b7932e1717 | muzichao/LeetCode | /(012)Integer to Roman/main.cpp | C++ | cpp | 1,845 | no_license | #include <iostream>
using namespace std;
string intToRoman(int num)
{
char ch[20] = {};
int iCout = 0;
while (num > 0)
{
if (num >= 1000)
{
ch[iCout++] = 'M';
num -= 1000;
}
else if (num >= 900)
{
ch[iCout... |
a929ac7c68b9e5459b451fcb04ec098887fd05a4 | 3ea016bb2a7177fa725bb445fd4c433faa81f121 | arximboldi/immer | /test/table/default.cpp | C++ | cpp | 513 | permissive | //
// immer: immutable data structures for C++
// Copyright (C) 2016, 2017, 2018 Juan Pedro Bolivar Puente
//
// This software is distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
//
#include <immer/config.hpp>
#include <immer/memory... |
6721eeea2097d1dcfaa502b5ca51d954ed9a55a1 | 829ef5a6c44ec9b086dd7e3b836c09f56ac5e63f | danishcake/FusionForever | /src/FusionForever_lib/SwarmMissile.cpp | C++ | cpp | 1,852 | no_license | #include "StdAfx.h"
#include "SwarmMissile.h"
#include "BillboardDeco.h"
#include "Puff.h"
bool SwarmMissile::initialised_ = false;
int SwarmMissile::fill_dl_ = 0;
int SwarmMissile::fill_verts_index_ = 0;
SwarmMissile::SwarmMissile(Vector3f _position, BaseEntity* _target)
: HomingProjectile(_target)
{
if... |
51fc41d98927bb23a03bd5af40de6fd3567f8586 | ed8c1f0c2a8c74ea4a60eeb9e2656fb2e4ec9092 | soulofc/chromium | /ash/login/ui/public_account_warning_dialog.cc | C++ | cc | 4,595 | permissive | // Copyright 2018 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/login/ui/public_account_warning_dialog.h"
#include "ash/login/ui/login_expanded_public_account_view.h"
#include "ash/strings/grit/ash_strin... |
378f3f15f9edd920273a8b189e28ca720dc13836 | c2c836fa85f10d0103ffef83232fe1e9b99edf06 | flavioc/meld | /vm/state.cpp | C++ | cpp | 19,070 | no_license |
#include "vm/state.hpp"
#include "process/machine.hpp"
#include "vm/exec.hpp"
#ifdef USE_SIM
#include "sched/nodes/sim.hpp"
#endif
using namespace vm;
using namespace db;
using namespace process;
using namespace std;
using namespace runtime;
using namespace utils;
//#define DEBUG_RULES
namespace vm
{
#ifdef USE_UI... |
6a6d91b77fb0d946dd980b2396477006fb3e635c | 1f5885ef44741f399ad350b08729e46fb2a1282d | SD2435324/SD2435324 | /Hmwk/Assignments3/Gaddis_8thEd_Chap4_Prob13/main.cpp | C++ | cpp | 1,085 | no_license | /*
* File: main.cpp
* Author: Shane L. Daviau
* Created on July 1, 2016, 10:11 AM
* Purpose: calculate points earned for the month from book purchases
*/
//System Libraries
#include <iostream> //Input/Output Library
using namespace std;//Namespace of the System Libraries
//User Libraries
//Global Constants
... |
397ad372b9b449ecc3ad6cb9d0b0a2ca5c4b9c4b | 86cddfea869e93df4ed52d6af94f890fdd35a8fc | loyinglin/Codeforces | /1523/D/Codeforces/main.cpp | C++ | cpp | 6,998 | no_license | //
// main.cpp
// Codeforces
//
// Created by loyinglin.
// Copyright loyinglin. All rights reserved.
/************************** 题解 **********************
[题目链接](https://codeforces.com/contest/1523/problem/D)
**题目大意:**
小明和n个朋友一起选课,一共有m门课,小明知道每个朋友喜欢的课程,并且每个人喜欢的课程数不会超过p;
现在想知道怎么选修课程,才能满足 至少有N/2(向上取整)个同学都喜欢他选择的课... |
2f2393f620ffcb6ef27340325e22751ae483ac9c | 345400d2847ab956913f8e7e8af9ec60e0e6b85e | Geant-RnD/geant | /physics/kernel/utils/src/Spline.cc | C++ | cc | 11,809 | permissive |
#include "Geant/Spline.h"
// cstdlib is for std::abs(int)
#include <cstdlib>
#include <algorithm> //lower_bound
namespace geantphysics {
// spline does not own fXdata and fYdata
Spline::Spline(double *xdata, double *ydata, int numdata, bool isacsecderis, bool isconstrained)
{
fNPoints = numdata;
fXdata = xd... |
feafe6c7d713a74deb7bb04d91f162dcd504d0cf | 65f6ea2a0dda8f30e63a8f643d520306ab346da6 | SuckerServ/suckerserv | /src/hopmod/net/address_prefix.hpp | C++ | hpp | 943 | no_license | #ifndef HOPMOD_NET_ADDRESS_PREFIX_HPP
#define HOPMOD_NET_ADDRESS_PREFIX_HPP
#include "address.hpp"
#include "address_mask.hpp"
namespace hopmod{
namespace ip{
class address_prefix
{
public:
typedef char cstring_buffer[19];
address_prefix();
address_prefix(address, address_mask);
address_prefix(const... |
9cd0ae7132abffba5d67bb2bcbb2ce0bace747cf | dbad5b571b72030abd8f4f37b17fd54dab899420 | laddu74/Programming-Language | /C Plus Plus Programs/DS&OOPinC++/que_sll.cpp | C++ | cpp | 4,121 | no_license | /**********************************************************
Program For implementing the Queue using the linked list.
The queue full condition will never occur in this program.
************************************************************/
#include<iostream.h>
#include<stdlib.h>
#include<conio.h>
//Declaration ... |
630b86b3abfc4279240812cce92333cc6309c453 | b8f4c2fb8cebfe174fa8e0125ecf71144fc6d0f3 | shubham0312/vtr-verilog-to-routing | /vpr/src/place/move_utils.cpp | C++ | cpp | 35,262 | permissive | #include "move_utils.h"
#include "place_util.h"
#include "globals.h"
#include "vtr_random.h"
//f_placer_breakpoint_reached is used to stop the placer when a breakpoint is reached. When this flag is true, it stops the placer after the current perturbation. Thus, when a breakpoint is reached, this flag is set to true.... |
175428c2511c2fa6fe0a6dae20ef3d40fe253408 | 9ad4377230ff48da98eadff04f27aab499e8d920 | miyamotononno/atcoder | /companies/aising/2020/c.cpp | C++ | cpp | 1,091 | no_license | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <unordered_map>
#include <set>
#include <map>
#define INCANT cin.tie(0), cout.tie(0), ios::sync_with_stdio(... |
18b36b8d770d093483a08713813fee361b7b8271 | f1cb0d999c2a171c06235025ebc386e21fec0536 | majiaoliya/acm | /hdu/第一阶段/尺取法/pintia连续素数的和30分/main.cpp | C++ | cpp | 2,341 | no_license | #define debug
#ifdef debug
#include <time.h>
#include "/home/majiao/mb.h"
#endif
#include <iostream>
#include <algorithm>
#include <vector>
#include <string.h>
#define MAXN 100050
#include <map>
#define ll long long int
#define QAQ (0)
using namespace std;
/**
* 有一些正整数可以分解为一个或连续多个素数的和。给定一个正整数,有多少种可能的分解方式?例如,53可以分解... |
b9ebff9128bd3f08eb7d156fbad4cf00a893bd5a | c2e3e452f0846ea085f4ab04c9c322427ae829e0 | Happy-Ferret-Entertainment/creatures3 | /engine/Creature/GenomeStore.cpp | C++ | cpp | 13,250 | no_license | #ifdef _MSC_VER
#pragma warning(disable:4786 4503)
#endif
#include "GenomeStore.h"
#include "Genome.h"
#include "../File.h"
#include "../FilePath.h"
#include "../App.h"
#include "../World.h"
#ifndef C2E_OLD_CPP_LIB
// stringstream is a newish addition to the std lib...
#include <sstream>
#include <iomanip>
#endif // ... |
88b491cb3ab938f899bf93a2329534c6e76d706a | e6df22fc7f6253534ca92d70d14f78cd13f12361 | MVoz/vcpkg-old | /ports/sql/include/sql/types.hpp | C++ | hpp | 3,996 | permissive | #pragma once
#include <optional>
#include <string>
#include <string_view>
#include <type_traits>
#include <variant>
#include <cstddef>
#include <cstdint>
namespace sql {
enum class code {
ok = 0,
error = 1,
internal = 2,
perm = 3,
abort = 4,
busy = 5,
locked = 6,
nomem = 7,
readonly = 8,
interrupt... |
2ad39fff8ee54a573c54f41022be581b725b0808 | 4d80af4b4c1cbd4cdea4eea4c5c5a95576194350 | Intiser/ProblemSolvingAndContest | /UvaOnlineJudge/11480.cpp | C++ | cpp | 655 | no_license | #include<iostream>
#include<stdio.h>
using namespace std;
#define lli long long int
lli mn(lli x){
if(x%2==0) return x/2 - 1;
return x/2;
}
lli fnct(lli t){
lli tmp,ans=0,x;
x = mn(t-1);
tmp = x - 1;
// cout<<" # "<<x<<endl;
for(int i = 2;(i-1)<x;i++){
ans = ans + tmp;
x =... |
ff2cec3e7df93d9906a56e8bc132e44d1e8506a0 | 77707b6cf4be9049e1fc2e3f0c3040ba141e2c81 | wkcn/leetcode | /0101-0200/0106.construct-binary-tree-from-inorder-and-postorder-traversal.cpp | C++ | cpp | 955 | no_license | // TODO: 迭代的方法
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
TreeNode* buildTree(vector<int>& inorder, vector<int>& postorder) {
// L... |
31f6c47d8363ec5e491a11fb5206b7033a53383a | e87ca613d2ad225356d9bd9dac2d1515fd21a85b | Mostafa-At-GitHub/ICPC-BootCamp-2019 | /Day 4 - Graph Search/i.cpp | C++ | cpp | 1,114 | no_license | #include <iostream>
#include <vector>
using namespace std;
const int maxn = 105;
int n;
int e[maxn][maxn];
bool visited[maxn];
int prv[maxn];
void dfs(int v, int parent) {
visited[v] = true;
for (int u = 0; u < n; ++u) {
if (e[v][u] && u != parent) {
if (!visited[u]) {
prv... |
cb08e3a0b19c4235a5950936b45b6dd7358ff031 | 5754e921371fe94924356b207132f2f5946992b8 | fpbeekhof/cvmlcpp | /testing/testCommunication.cc | C++ | cc | 5,844 | no_license | /***************************************************************************
* Copyright (C) 2009 by BEEKHOF, Fokko *
* fpbeekhof@gmail.com *
* *
* This pr... |
e2d7954610e50495f3191a04b0b6d6337a7cf555 | df45440a1dfdcf2c963d4d73495a41f15dc733a3 | Balajiganapathi/code | /practice/hr/circle-city.cpp | C++ | cpp | 4,663 | no_license | /* string coder = "Balajiganapathi S"; // Never give up! */
//#define LOCAL
#ifdef LOCAL
# define TRACE
# define TEST
#else
# define NDEBUG
//# define FAST
#endif
#include<bits/stdc++.h>
using namespace std;
/* aliases */
using vi = vector<int>;
using pi = pair<int, int>;
using ll = long long int;
/* s... |
e297b83e72e0c05fcd4f1c80c03c40548b89d55e | 441141d4d6d268b94b206739308de319c3804da8 | ShankarNara/CompetitiveProgrammingSolutions | /codeforces/644/644A.cpp | C++ | cpp | 527 | no_license | #include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define oo 1000000010
#define mod 1000000007
#define x first
#define y second
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen... |
3b74f5633db7b9a48da96a349e478a799060b9f3 | f4acdd96aa0c96db53780e61ff8525bd67183d16 | brethvoice/tensorflow | /tensorflow/core/data/standalone.cc | C++ | cc | 7,254 | permissive | /* Copyright 2018 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.