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 |
|---|---|---|---|---|---|---|---|---|
3566385f66dd8c78f32e1f4bf8682e3de2e2cd5d | 4832cab3f7705ceecd3e4b05c47e10513e56a073 | ericprud/SWObjects | /lib/POS2BGPMap.hpp | C++ | hpp | 21,042 | permissive | /* POS2BGPMap.hpp — association variables with the BGPs in which they appear.
* $Id: POS2BGPMap.hpp,v 1.26 2008-11-04 15:12:53 eric Exp $
*
* POS2BGP does double duty:
*
* • For SQL query translation, POS2BGP determines which variables are coref'd
* in which table operations. This is needed for the mapping from... |
8463596ad5da93ff3582131eb308eeded6c6ae66 | 89f564794f960836ee781fc31d73bbe45ba4e40a | Samsung/Castanets | /third_party/blink/renderer/modules/webaudio/audio_node_input_test.cc | C++ | cc | 2,402 | 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 "third_party/blink/renderer/modules/webaudio/audio_node.h"
#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
#include "third_part... |
051ebb321faf7c47ccf9739defaf82b7fdecac03 | 1dbba13682d251cef16732128971362779b6349d | giuseppi/CS130 | /labs/lab-3/debugging/prog-2.cpp | C++ | cpp | 1,527 | no_license | #include <iostream>
#include <string>
#include <cassert>
class vec
{
public:
float data[3];
float& operator[](size_t i)
{
return data[i];
}
const float& operator[](size_t i) const
{
return data[i];
}
};
/*
class object
{
public:
std::string name;
};
*/
class sphere //:... |
47974780dacad874ee6a52fd068dc70d639c1dbd | 5d7d201edd0330365ab61edde7ffc331bd72a998 | jgespino/openvino | /inference-engine/tests/ngraph_functions/include/ngraph_functions/low_precision_transformations/subtract_multiply_to_multiply_add_function.hpp | C++ | hpp | 1,657 | permissive | // Copyright (C) 2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <memory>
#include <vector>
#include <ngraph/ngraph.hpp>
#include "ngraph_functions/low_precision_transformations/common/add.hpp"
#include "ngraph_functions/low_precision_transformations/common/dequantization_opera... |
af93844951984216ad08ab4b1d999fb1f329ec18 | d508b3d7a29571ca8fd64743af90958fd72716f9 | Vendorf/cs6610 | /ShapeGenerator.cpp | C++ | cpp | 36,163 | no_license | #pragma warning(disable:4146)
#include <ShapeGenerator.h>
#include <glm\glm.hpp>
#include <glm\gtc\matrix_transform.hpp>
#include <Vertex.h>
#include <ShapeData.h>
#include <fstream>
#include <vector>
#include <climits>
#define PI 3.14159265359
using glm::vec2;
using glm::vec3;
using glm::mat4;
using glm::mat3;
#define... |
7c8ed3d91289958cab29b289a59495d84c8c379e | 7c10563e87ab5644d6ef314b68188df658a6dfef | dysnomia/book-embedding | /sat-gen/src/main.cpp | C++ | cpp | 4,774 | no_license | #include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>
#include <time.h>
#include <iostream>
#include <fstream>
#include <vector>
#include "consts.h"
#include "clauses.h"
#include "generate.h"
#include "checker.h"
#include "reduce.h"
#include "tools.h"
using namespace std;
/* Transform str... |
196b88f280806bf68f1680ed3223ac26ebbcee33 | a97c586a23737ae7f14e0abceb6117e9ceef4e37 | NikhilSingh883/CSES-Problem-Set | /Introductory Problems/Digit Queries.cpp | C++ | cpp | 657 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define rsz resize
#define endl '\n'
#define all(x) begin(x), end(x)
#define sz(x) (ll)(x).size()
#define pi pair<int,int>
#define f first
#define s second
#define pll pair<ll, ll>
#define vpl vector<pll>
#define vl vector<ll>... |
7af4d2a131a887430fc32dcd481eab1ac48cae41 | 2cc7e19f8199bb11ffcb07b89c4b3f9fb20b6852 | GafferHQ/gaffer | /src/GafferUIModule/ViewBinding.cpp | C++ | cpp | 5,393 | permissive | //////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012, John Haddon. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributio... |
50600739caeba557009e434cda171e1eba823085 | b62fa3b690a3337e631d567f0f23e6ef80057e5a | LibertyChaser/Luogu | /1720.cpp | C++ | cpp | 257 | no_license | #include<iostream>
int main(int argc, char const *argv[])
{
long long n, a = 1, b = 1, c = 0;
std::cin >> n;
for (int i = 3; i <= n; i++)
{
c = a + b;
a = b;
b = c;
}
std::cout << c << ".00";
return 0;
}
|
f4bd0745329a9e8b7f94d0431201006802609cd3 | 08912a9c3b6cc03cfdb389cabb0e79aac25bb38f | moelatt/ECS36C | /hw3/createteams.cxx | C++ | cxx | 1,217 | no_license | #include <iostream>
#include <fstream>
#include <set>
#include <utility>
#include <cmath>
#include "json.hpp"
#include "priorityqueue.h"
#include "teamdata.h"
static const char* TEAMS = "teams";
int main(int argc, char** argv) {
if (argc != 2) {
std::cerr << "Usage: createteams file.json" << std::endl;
... |
4e852d6c7f8c3841abd7c30608eee4fa3d839ec9 | 54b5858afbae45ae4088917674b3991be4ee1ce1 | team-shinkailab/solecon-2021 | /janken_out/src/drv_timerSTM32duino.cpp | C++ | cpp | 1,010 | no_license | //
// drv_timerSTM32duino.cpp : STM32duinoタイマー用
//
// (c)Team Shinkai Lab
#include "drv_timerSTM32duino.h"
/* @brief TIMER1の設定
* @param func 割り込みをかける関数
* @param intvl 割り込みの間隔[Hz]
* @memo im920_procで使用中
*/
void TIM1_Init(callback_function_t func, uint16_t intvl)
{
TIM_TypeDef *Instance = TIM1; ... |
5be35b5807d2fde7f3b79ea524275b007e69531a | 3dd1d6093f55c3d728cec7b87d9f41f8109b365f | satan-nightmare/spoj-Solutions | /STPAR.cpp | C++ | cpp | 1,148 | no_license | #include<cstdio>
#include<iostream>
#include<stack>
using namespace std;
int main()
{
stack <int> s;
int m,n,t,x,k,i;
while(1)
{
m=0,k=1;
scanf("%d",&n);
if(!n)
break;
for(i=0;i<n;i++)
{
scanf("%d",&x);
if(x==... |
0d4e51300f9bf220a9f9f2eecc32b32edb609484 | 4caed73738d2db546956d24744b130241c8f13f2 | kuyoun/KoPFA | /CMGAnalyzer/src/CMGTTbar2bGenFilter.cc | C++ | cc | 18,972 | no_license | #include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDFilter.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "... |
68f2a8f8aa9414b8a25687fa3b19bb570a6d8d56 | 9fc5cc03ea900911b918b2a7097c86acf181ad09 | lubin20999/fdbus | /server/main_ls.cpp | C++ | cpp | 8,148 | no_license | /*
* Copyright (C) 2015 Jeremy Chen jeremy_cz@yahoo.com
*
* 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 requ... |
ffada7f63654fd40c092d05ec36d4f334e84c03e | a29d909a631a7fe045cde6605d2a01bbf5bb5834 | faustgames-ru/AndroidWallpapers | /games/Server/server/src/ScrInternal.cpp | C++ | cpp | 576 | no_license | #include "main.h"
void generateAndLoadInternalScript(lua_State *L)
{
char *szScript = new char[10334];
sprintf(szScript, "MAX_PLAYERS = %u\nMAX_VEHICLES = %u\n", MAX_PLAYERS, MAX_VEHICLES);
char buf[256];
for(int n = 0; n < VEHICLE_LIST_SIZE; n++)
{
sprintf(buf, "%s = %u\n", vehicle_list[n].name, vehicle_list... |
158fe52739d2d92fe32069bc1675fdad409b4f60 | 113d6e1236125c80cc135f0f638e8c69ca940441 | Mbaey/MyDataStruct- | /OJ/团体/L1-050 倒数第N个字符串(15 分)考试那会脑子抽了,刚好看到书上有字典序。。然后就去用递归。。。。。.cpp | C++ | cpp | 425 | no_license | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
const int N=26;
int main()
{
freopen("1.txt", "r", stdin);
int n, m;
cin >> n >> m;
int sum = pow((double)N, n);
m = sum- m;
string res;
for(int i=0; i<n; i++){
res += m%N+'a';
m/=... |
c7f655ebf77b7b9122f34d829f66c321c52bdebb | 36f9c60fe74d91146dd4216feb4e88649bafe671 | antoniomosca/coolfluid3 | /src/Solver/Actions/Proto/ElementTransforms.hpp | C++ | hpp | 3,890 | no_license | // Copyright (C) 2010-2011 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.
#ifndef CF_Solver_Actions_Proto_ElementTransforms_hpp
#define CF_Solve... |
8eedffe2ef992698ecbde878dc306ffc9b585970 | 9a3e4eea7ebe4100d64382d3f4dac35c357bc237 | N7P0L3ON/hlsdk10-bots | /PODBot/util.cpp | C++ | cpp | 17,077 | no_license | /***
*
* Copyright (c) 1999, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
*... |
e79d9001d76703194f08a584df53de75b5f38291 | 7cdad0c303616c5a4a81df7759d7838bc4f1f06d | marshalyyx2000/ftp-client | /tests/utils/utils_tests.cpp | C++ | cpp | 2,383 | permissive | /*
* MIT License
*
* Copyright (c) 2020 Denis Kovalchuk
*
* 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, ... |
e9e46d0a0a04f250df2065635a58d0319abeb6b2 | 27a2b713e9c6316477c794ef554cc68fa9bcbc48 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/3.LB+dmb.ld+dmb.sy+ctrlisb.c.cbmc_out.cpp | C++ | cpp | 44,363 | no_license | // Global variabls:
// 0:vars:3
// 3:atom_0_X0_1:1
// 4:atom_1_X0_1:1
// 5:atom_2_X0_1:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
#define ADDRSIZE 6
#define LOCALADDRSIZE 3
#define NTHREAD 4
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, ... |
534d6dd15b5a84f96cb067b289d8f2f8898c5cba | f99736cd097ee6a11b39e57f94d1f610b6894708 | moyilong/libSemphella | /APD_UTILS/main.cpp | C++ | cpp | 1,232 | no_license | #include <libSemphella/apd.h>
#include <libSemphella/libSemphella.h>
#include <libSemphella/argment.h>
argment args;
enum {
DUMP,
CONVERT,
}work_mode;
string input;
string output;
void for_each(string name, string val)
{
switch (name[0])
{
case 'd':
work_mode = DUMP;
break;
case 'c':
work_mode = CONVERT;
... |
c66136b9e8370d66ddda21483505d14f3baf25f6 | b8af9da695da5e600d5a53a8c47c0580a6559410 | abdullah-abwisk/C-Plus-Plus | /017_HP_Server_Diagnostics.cpp | C++ | cpp | 3,383 | no_license | /* HP Server Diagnostics : Question 3 : Assignment 2
Written by Abdullah Khan : DS-N : 20I-0894 */
#include <iostream>
using namespace std;
int main()
{
char new_server_check, configuration_change, condition_check;
bool exit_flag = false;
cout << "Starting General Diagnosis Program.\n";
... |
a0ba0638684af5f9354f7f6cc0a9fc7f8f7428a5 | 3148f60b47541b1af0c9f5b29a20acfc7b5f9c14 | fnareoh/read_bwt | /internal/rle_string.hpp | C++ | hpp | 11,269 | no_license | /*
* rle_string.hpp
*
* Created on: May 18, 2015
* Author: nicola
*
* A run-length encoded string with rank/access functionalities.
*
*
* space of the structure: R * (H0 + log(n/R) + log(n/R)/B ) (1+o(1)) bits, n being text length,
* R number of runs, B block length, and H0 zero-order entropy of the ... |
167abb99291df9a5143d9204905dcde9d3fe0623 | d918fe2523d6a80cf7917b7e41bf1c9504be6181 | modcrypto/brofist | /src/governance-votedb.cpp | C++ | cpp | 2,579 | permissive | // Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2017-2018 The BroFist Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "governance-votedb.h"
CGovernanceObjectVoteFile::CGovernanc... |
f6fa0b81cc4686a679b7328ac38af78b23a6d1a1 | 64468930b76ef35fb0acdc6435c89615fbd35f98 | AmericanCoinAMC/Core | /tests/UnitTests/EventWaiter.cpp | C++ | cpp | 728 | permissive | // Copyright (c) 2011-2016 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "EventWaiter.h"
void EventWaiter::notify() {
std::unique_lock<std::mutex> lck(mtx);
available = true;... |
6b2ea71472f230dfd36d9102254384c91473710d | e3d25153b1cd8d65066ab2b6e1efa75bafd2b928 | imhsz/chromium | /components/viz/test/test_context_provider.cc | C++ | cc | 17,694 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/viz/test/test_context_provider.h"
#include <stddef.h>
#include <stdint.h>
#include <set>
#include <string>
#include <utility>
#incl... |
4a02b06e436c5f28576b356a01c6428fbd72f9ef | 49bfc0d018fc89d8205438f15bc621e73c99dfaa | boomer41/mbed-os | /features/device_key/TESTS/device_key/functionality/main.cpp | C++ | cpp | 20,771 | permissive | /* mbed Microcontroller Library
* Copyright (c) 2018 ARM 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 License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
db93dbc109d06b0ea1b6f0417abf2054f230a2a3 | 745295df082dc06e52b23857b340e62176a9c5b8 | ccdxc/logSurvey | /data/crawl/git/old_hunk_2810.cpp | C++ | cpp | 272 | no_license | refname = branch_get_push(branch, NULL);
if (!refname)
continue;
} else if (starts_with(name, "color:")) {
char color[COLOR_MAXLEN] = "";
if (color_parse(name + 6, color) < 0)
die(_("unable to parse format"));
v->s = xstrdup(color);
continue;
|
dd3e297f4ea661fcd5d41798a601cbc89a776dde | 9d08fc710a477981ae01ad444617159cbd6e1379 | alexhein189/code-plagiarism-detector | /data/final-19/sources/u128509_475_C_8091671.cpp | C++ | cpp | 1,913 | no_license | #include<bits/stdc++.h>
using namespace std;
char G[1005][1005];
int ok(int U,int D,int L,int R)
{
if(G[U][R+1]=='X'&&G[D+1][L]=='X') return 0;
if(G[U][R+1]=='X'){
for(int i=U;i<=D;i++)
if(G[i][R+1]!='X')
return 0;
return ok(U,D,L+1,R+1);
}
if(G[D... |
d879cb812390d0495368fc4a5e88c64868efac3d | 91a09b65cf768020cfb63ca2477e17352996c9ab | YoshiAoyanagi/OPTIMAL1_CDH | /CDH/nop.cpp | C++ | cpp | 297 | no_license | //
//
//
#include "nop.h"
#include <stddef.h> // for NULL
#include "cmd_analyze_obc.h"
static void nop_(void);
AppInfo create_nop_task(void)
{
return create_app_info("nop", 1, NULL, nop_);
}
static void nop_() {}
int Cmd_NOP(const CTCP* packet)
{
(void)packet;
return CMD_ERROR_NONE;
}
|
3526ace1f8d97cee235f0cbc9fc7ea962550d7f3 | f7c7d8a66fb40795f70db83495573f7351068cfd | Kicer86/Islands | /Islands/button.hpp | C++ | hpp | 1,924 | no_license | #pragma once
#include <SFML/Graphics/Text.hpp>
#include <string>
class button
{
protected:
sf::Text buttText;
sf::Vector2i InteractionBoxPosition;
sf::Vector2i InteractionBoxSize;
public:
button() = default;
button(const sf::Font &font, const sf::Vector2i &position, const sf::Vector2i &size, const std::string &t... |
69b70cc62d0500dc74d1d1029f84ae5d6eb88bf4 | a014ae86196bc7ba9084da0051f627d294d37e9e | andreparker/spiralengine | /GameEngine/Gfx/IndexBuffer.cpp | C++ | cpp | 493 | no_license | #include "IndexBuffer.hpp"
#include "IndexFormatImpl.hpp"
using namespace Spiral;
using namespace boost;
bool IndexBuffer::Create( const IndexFormat& format, boost::int32_t indexCount, bool bManaged /*= false */ )
{
SetIndexCount( indexCount );
SetIndexType( format.GetType() );
return DoCreate( format,... |
c0731346fd4a7659a4f67c3742811401fb56e009 | 67f3d23688b88a358497f29752f2b3cd71006cdc | rocketsroger/chromium | /chrome/test/nacl/nacl_browsertest.cc | C++ | cc | 17,104 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdio.h>
#if defined(OS_POSIX)
#include <unistd.h>
#elif defined(OS_WIN)
#include <windows.h>
#endif
#define TELEMETRY 1
#include "base/bi... |
5f5973d0a61c1dca4693f13fac90fcc1f8044d7d | cded732a1dc99954c383164853072afd7a9886d6 | Aden-Tao/LeetCode | /0122 Best Time to Buy and Sell Stock II/solution.cpp | C++ | cpp | 453 | no_license | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int maxProfit(vector<int>& prices) {
int res = 0;
for (int i = 1; i < prices.size(); i ++ )
res += max(0, prices[i] - prices[i - 1]);
return res;
}
};
int main(){
vector<int> p1{7,1,5,3,6,4};
cou... |
c886265fe3890978b0031ed44fbcbd5b791770ac | cff165602936a9c0782f58900b306ed7d89d8f2b | Kadowns/eagle-raytracing | /eagle/core/source/renderer/vulkan/VulkanDescriptorSetLayout.cpp | C++ | cpp | 1,693 | no_license | //
// Created by Novak on 04/08/2019.
//
#include <eagle/core/renderer/vulkan/VulkanDescriptorSetLayout.h>
#include <eagle/core/renderer/vulkan/VulkanConverter.h>
EG_BEGIN
VulkanDescriptorSetLayout::VulkanDescriptorSetLayout(VkDevice device, const std::vector<DescriptorBindingDescription> &bindings) :
m_device(d... |
d761e2c1a3d0686b84c09e5166d49e366725c653 | 71020f7682f4d1966c7ec6cfcad111233dad7b64 | stden/olymp | /ru-olymp-train-winter-2009/Submits/081227/10_52_27_15_A_9193.cpp | C++ | cpp | 1,646 | no_license | #include<iostream>
#include<vector>
#include<string>
#include<cstring>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<deque>
#include<cmath>
using namespace std;
typedef long long int64;
typedef long double real;
#define forn(i,n) for(int i=0;i<(int)n;i++)
#define ford(i,n) for(int i=(int)n... |
84c1513de9e94c792170bcf0ced33497cd97731a | 7e5360e0318882a59179ef9688d2c838ce767f81 | jexpop/Unity_Learning | /LAVA/Library/Il2cppBuildCache/WebGL/il2cppOutput/UnityEngine.AudioModule.cpp | C++ | cpp | 80,918 | no_license | #include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <limits>
#include <stdint.h>
struct VirtActionInvoker0
{
typedef void (*Action)(void*, const RuntimeMethod*);
static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj)
{
const VirtualInvokeDat... |
3c2fb0597a02c75c5d1f2dfc1a067476423a5f9a | a8dc6e5407d1d2d4fdd9cc806d31f2535197c9c0 | matteosan1/cmssw | /DataFormats/EgammaReco/src/PreshowerCluster.cc | C++ | cc | 1,408 | no_license | //
// $Id: PreshowerCluster.cc,v 1.16 2009/01/27 09:53:06 ferriff Exp $
//
#include "DataFormats/EgammaReco/interface/PreshowerCluster.h"
using namespace reco;
PreshowerCluster::~PreshowerCluster() { }
PreshowerCluster::PreshowerCluster(const double E, const Point& pos,
const std::vector< std::pair<DetId, fl... |
34b4b7e22c9305b03f45322c1577849ec35a49f0 | fd0e52fec8990e30985be314e50e363fc50687ca | prosis369/Data-Structures | /willitst.cpp | C++ | cpp | 436 | no_license | // check powers of 2 using ceil, floor and log2 functions. check for cases less than or equal to 1
// don't forget to use long long int as n is a very large number
#include<iostream>
#include<stdlib.h>
#include<math.h>
using namespace std;
int main()
{
long long int n;
cin>>n;
if(n>1)
{
if(ceil(log2(n)) == floor... |
a81b92d8a90663cb5eed68a2b38ff5a53d8ba8ff | 737bedf957192e0098e038281d412d8386771632 | toha993/my-code | /cubfer.cpp | C++ | cpp | 1,149 | no_license | #include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include <iom... |
80b6dff3f80f19fecc50b82209b26da3803724e0 | 5eb47a038e6e2277875dcf32a4c2519a9932a85e | whlprogram/PAT | /PAT_B/PAT_1010/main.cpp | C++ | cpp | 490 | no_license | //原题链接 https://www.patest.cn/contests/pat-b-practise/1010
//题解 http://blog.csdn.net/whl_program/article/details/76696672
#include <cstdio>
using namespace std;
int main()
{
int a,b;
bool isfirst = true;
while(~scanf("%d %d", &a, &b)){
if(b == 0)
continue;
if(!isfirst)
... |
d565c6f1ce9d033cb75378d960745ba32d573b17 | 1753a423ff809b953bc7671caac4ad5c0c683691 | trustcrypto/chromium | /chrome/browser/chromeos/accessibility/switch_access_browsertest.cc | C++ | cc | 2,801 | 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/public/interfaces/accessibility_controller.mojom.h"
#include "base/command_line.h"
#include "chrome/browser/chromeos/accessibility/accessibi... |
b6d651945ac27dfa8a5235b2d94e36d375249188 | 713a363fb03ed8675daa5e40808c7bc0eaf8bb2d | JoaoDanielRufino/Algorithms | /Dynamic Programming/burst_balloons.cpp | C++ | cpp | 980 | no_license | // https://leetcode.com/problems/burst-balloons/description/
class Solution {
public:
int solve(vector<int>& nums, int left, int right, vector<vector<int>>& dp) {
if(left > right)
return 0;
if(left == right)
return nums[left-1] * nums[left] * nums[right+1];
if(dp[l... |
c53f2a094d092d69ad7ed79ea91feb3a8df9f89a | fc9fe896d051f84d74e419f609f32c6c44cb10cf | rcore-os-infohub/ossoc2020-VitalyAnkh-daily | /Notebook/cpp_primer/SalesItem/ex_1_20_read_and_print_2.cpp | C++ | cpp | 288 | no_license | #include <iostream>
#include "Sales_item.h"
int main()
{
Sales_item book;
std::cout << "请输入销售记录:" << std::endl;
while (std::cin >> book)
{
std::cout << "ISBN、售出本数、销售额和平均售价为" << book << std::endl;
}
return 0;
}
|
c0f103664512fa6643c5401b40c44fc9df133332 | 7499e7b5f1ed0a3204a64dcedc2b1fa0ef663fbd | ShayDgani/Data-structure | /Employee.cpp | C++ | cpp | 844 | no_license | #include "Employee.h"
Employee::Employee(int _id[9], string _name,
int _age, string position, int salary, int seniority){
this->setId(_id);
this->setName(_name);
this->setAge(_age);
this->setPosition(position);
this->setSalary(salary);
this->setSeniority(seniority);
}
string Employee::getPosition()... |
47470623cab7784bb9581add48ea97d6f10f90f9 | 580f57afb49b467ed138a52f115cb6ee4dd3ccc6 | jarven-zhang/PSS_ASIO | /Common/ReadBuffer.hpp | C++ | hpp | 7,344 | permissive | #include "define.h"
//#include "asio/detail/socket_ops.hpp"
inline uint64 ntohll_uint64(uint64 val)
{
#if BYTE_SORT_SWITCH_STATE != BYTE_SORT_SWITCH_OFF
return (((uint64)asio::detail::socket_ops::network_to_host_long((int)((val << 32) >> 32))) << 32) | (unsigned int)asio::detail::socket_ops::network_to_host_long(... |
d50136e5ee31ecfdfc35bd8477ff95856db68133 | fc9f64a1392a423c9f1159d9f268e8b9a600b6e8 | dials/dials | /src/dials/algorithms/image/filter/boost_python/filter_ext.cc | C++ | cc | 930 | permissive | /*
* filter_ext.cc
*
* Copyright (C) 2013 Diamond Light Source
*
* Author: James Parkhurst
*
* This code is distributed under the BSD license, a copy of which is
* included in the root directory of this package.
*/
#include <boost/python.hpp>
#include <boost/python/def.hpp>
namespace dials { namespace alg... |
2deb070680df22e5965276e01af0c98169d6fd94 | 07b32f3ba87faf85ac023e43fcdaeb1d3199ab3f | matt-komm/momenta | /examples/ME/W_4j/P0_Sigma_sm_uux_mumvmxcssxsx_W_4j.cc | C++ | cc | 22,476 | no_license | //==========================================================================
// This file has been automatically generated for C++ Standalone by
// MadGraph 5 v. 2.0.0.beta3, 2013-02-14
// By the MadGraph Development Team
// Please visit us at https://launchpad.net/madgraph5
//==========================================... |
d31961065aa7c15eb1316882fc767a2a2404bff0 | 3906885e0d6ce0103feb1823c4d03e9b639ed432 | johnmangan/calvr | /src/cvrKernel/ComController.cpp | C++ | cpp | 15,842 | no_license | #include <cvrKernel/ComController.h>
#include <cvrKernel/CalVR.h>
#include <cvrConfig/ConfigManager.h>
#include <cvrUtil/CVRSocket.h>
#include <cvrUtil/CVRMulticastSocket.h>
#include <cvrUtil/MultiListenSocket.h>
#include <osg/Timer>
#include <iostream>
#include <sstream>
#include <cstring>
#include <csignal>
#includ... |
c1d07806f0d273f4e8ecc72d206c871ba2d5307e | eafece893090fe4faa1b086436fe060cc61d012d | ChiepChiep0710/algorithm | /C++(thuật toán và hướng đối tượng)/huong/main.cpp | C++ | cpp | 1,546 | no_license | #include <iostream>
#include <cstdio>
#include <string>
using namespace std;
const int maxx=260;
string a,b;
int findchar(int i,int j)
{
int m=-1;
for (int q=i+1;q<=a.length()-1;q++)
{
if (a[q]==b[j] || a[q]==b[j]-32 || a[q]==b[j]+32)
{
m=q;
break;
}
}... |
39a97a61bec9cfa566d0ee74082fb38abab13b40 | bcacf52f99bc5053936e6df98bb9589fa7bc00c1 | Laurilao/TAMK-perusteet-jatko | /harkkatyo/harkkatyo/Helpers.cpp | C++ | cpp | 5,568 | no_license | #include "Helpers.h"
using namespace std;
void TulostaLauta(char lauta[][LAUDAN_KOKO], int rows, int cols)
{
cout << " 1 2 3 4 5 6 7 " << endl;
cout << " --------------- " << endl;
for (int i = 0; i < rows; i++) {
cout << static_cast<char>('A' + i) << " | ";
for (int j = 0; j < cols; j++)
{
if (l... |
d14afa9718db5a98c75f8e18dd901d611f12a23e | 58f1f7baf1303bcd9580b4a0645966c6d48f42d2 | Himanshu2500/Codeforces | /Div3/650/E.cpp | C++ | cpp | 1,054 | no_license | #include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<(b);i++)
#define trav(a,x) for(auto & a :x)
#define all(x) begin(x),end(x)
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vpii vector<pii>
#define F first
#define S second
typedef long long ll;
typ... |
875b5ed97bcae76ba561be42d1582fe93264c309 | 5865ecb96bccaa80b3da65b7bd6558b36cd432d0 | dpkristensen/bfdm | /pkg/BfsdlParser/source/Objects/StringField.cpp | C++ | cpp | 3,612 | permissive | /**
BFSDL Parser String Field Definition
Copyright 2019, Daniel Kristensen, Garmin Ltd, or its subsidiaries.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of... |
45d1cade8fff70bbe5680e07ce6a0066743f5ea9 | b3d7c0a1da19c53bc2b80d89ecc3aaef37c596b4 | youhavegot/Test3 | /MFCA-0330/MFCA-0330/MFCA-0330.cpp | C++ | cpp | 4,576 | no_license |
// MFCA-0330.cpp : 定义应用程序的类行为。
//
#include "stdafx.h"
#include "afxwinappex.h"
#include "afxdialogex.h"
#include "MFCA-0330.h"
#include "MainFrm.h"
#include "MFCA-0330Doc.h"
#include "MFCA-0330View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMFCA0330App
BEGIN_MESSAGE_MAP(CMFCA0330App, CWinApp)
ON_COMMAND(... |
4ce241862ef6ae9958e68cb333919cc6739398bc | 7d356313b93070eb32b92d07855ac9587a5daed4 | Vantskruv/XNVU-Calculator | /dialogcolumns.cpp | C++ | cpp | 6,626 | no_license | #include "dialogcolumns.h"
#include "ui_dialogcolumns.h"
#include <dialogsettings.h>
DialogColumns::DialogColumns(QFlightplanTable* _t, QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogColumns)
{
ui->setupUi(this);
t = _t;
ui->checkBoxN->setChecked(!t->horizontalHeader()->isSectionHidden(t->C... |
93529408c5b61d32bffa98d71efae1ce48e7bfe0 | ce5a6dfedb4fae789891a8bf52818fa6dd6749fb | Nurayend/pp1 | /лабка/lab2_2.cpp | C++ | cpp | 402 | no_license | #include <iostream>
using namespace std;
int main (){
int n;
cin>>n;
if (n%2!=0){
cout<<"Super";}
else if ((n%2==0) && (2<=n<=5)){
cout<<"Not super";}
else if ((n%2==0) && (6<=n<=20)){
cout<<"Super";}
else if ((n%2==0) && (n>... |
3d9cb3e9f67ccc627486ad64922e1092c48fb2ed | 8e47e287738fa436bbcb727392c139732be595a4 | ponderstine/Personal-Portfolio | /DataStructures/Linked Lists/Singly Linked List/SLL.hpp | C++ | hpp | 1,720 | no_license | #include <iostream>
using namespace std;
struct Node{ // A struct for the nodes of the singly linked list
int key; // key is the main value for this node. Does not have to be an int.
Node* next = NULL; ... |
f4e93c9104681d4a03dd41bc5451b37037a36ad1 | 6b9bfa4b7c47496b0a457e4203195536083e05b5 | foolcodemonkey/chromium | /content/browser/renderer_host/render_widget_host_unittest.cc | C++ | cc | 83,369 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <tuple>
#include "base/bind.h"
#include "base/command_line.h"
#include "base/loca... |
190c74a6d788a0fa1f80b5d36f8058d0214c22cf | 01e8663a744d0a7a9f9c053f4bafdfa67aee333e | wcysai/CodeLibrary | /CSA/Regular/22/E.cpp | C++ | cpp | 1,265 | no_license | #include<bits/stdc++.h>
#define MAXN 100005
#define INF 1000000000
#define MOD 1000000007
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
struct node
{
ll l,r,num,res;
}seg[4*MAXN];
ll n,k,p,a[MAXN],ans[MAXN];
void build(ll k,ll l,ll r)
{
seg[k].l=l;seg[k].r=r;
if... |
7fe3947517a29c5d4892da56dc5d853f560e02ff | a443a0f4c7250ea95e0eacb822580ff073c4fd6e | johnny/phr | /b2/gauss.cpp | C++ | cpp | 3,144 | no_license | #include<iostream>
#include "timer.h"
#include <stdlib.h>
typedef double*** d3D;
const int betas[7][3] = {{0,0,1},{0,1,0},{1,0,0},{0,1,1},{1,0,1},{1,1,0},{1,1,1}};
d3D create_matrix(int n);
double gauss(int n){
double sum;
d3D U = create_matrix(n+2);
struct timeval timer;
reset_timer(&timer);
for(int m =... |
81d87c65d9fe33b9fd42d595daf48f79dc12bc15 | c8c8d2b546afb3919a977b7b1d2f70df980740b1 | ARM-software/patrace | /patrace/src/fakedriver/egl/fps_log.cpp | C++ | cpp | 1,145 | permissive |
#include "fps_log.hpp"
#include "../../common/os_time.hpp"
using namespace os;
FpsLog gFpsLog(10, 1.0f);
FpsLog::FpsLog(int frameCnt, float updateFreq)
: mFrameCnt(frameCnt),
mUpdateFreq(updateFreq),
mNextFrameSlot(0),
mValidCnt(0)
{
mFrameLens = new long long [mFrameCnt];
mFrameBeg = getTi... |
4f9feae4fcac8c6c116d8a8a6e7f352b66d7ebb7 | 6a4c36d2da8e40184bf51ae3fbe0002b003a94a1 | iCodeIN/hhvm | /hphp/runtime/vm/jit/irlower-minstr.cpp | C++ | cpp | 38,446 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
8241cd28cd4eed3a8cc750c52948ce2ec8cb54cb | f57831af43d688e49f1b3c44b0106ef0b261eae1 | Mindjolt2406/Competitive-Programming | /GoogleCodeJam/GCJ21/Qual/B.cpp | C++ | cpp | 4,923 | permissive | #include<bits/stdc++.h>
// g++ -std=c++17 -Wl,-stack_size -Wl,0x10000000 main.cpp
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define EPS 1e-6
#define ll long long int
#define ld long double
#define fi first
#define se second
#define all(v) v.begin(),v.e... |
05e895768ed5e9afe5bca7c0316b043b731ad24e | 3d87e789de89f5afe1dafa2bca6cc7c2fdfa7f34 | lzs4073/color | /example/test/main.cpp | C++ | cpp | 11,587 | permissive | #include <vector>
#include <fstream>
#include "color/color.hpp"
#include "./model/invoke.hpp"
#include "./model/operation.hpp"
#include "./model/make.hpp"
#include "./model/intrisic_conversion.hpp"
#include "./model/set.hpp"
#include "./model/get.hpp"
#include "./model/conversion.hpp"
void RGB()
{
... |
fa492c0defa6209f904772df795a79d0f9248138 | bf18832f5c87cecefcc4e72d013a8f049723c6cc | radtek/SMS | /SMS2/SMS2/MSGINFO.cpp | C++ | cpp | 10,659 | no_license | // MSGINFO.cpp : 实现文件
//
#include "stdafx.h"
#include "SMS2.h"
#include "MSGINFO.h"
#include "afxdialogex.h"
#include "MainFrm.h"
// CMSGINFO 对话框
IMPLEMENT_DYNAMIC(CMSGINFO, CBCGPDialog)
CMSGINFO::CMSGINFO(CWnd* pParent /*=NULL*/)
: CBCGPDialog(CMSGINFO::IDD, pParent)
{
EnableVisualManagerStyle();
m_nFlag = 0;... |
867d5f37a90ffe7490892d584245b5a7c99724ee | 187dc02523fab1b837870dd1d679e49a8dfa070b | VakrasVasileios/CHIP-8 | /cpu.cpp | C++ | cpp | 3,467 | no_license | #include <stdlib.h>
#include "cpu.hpp"
uint16_t
Cpu::PopStack() {
return stack[sp--];
}
void
Cpu::InsertToStack(uint16_t _address) {
stack[++sp] = _address;
}
Cpu::Cpu(Memory* _memory, Display* _display) {
bus = Bus(_memory, _display);
// 00E0 display clear display
opcode[0] = [&bus]() {
... |
858136ca4a9aa8105f51222dd9a91f0a41ee0920 | 599ba146f922c1dfe26e9d0636c69afabada063b | rboman/progs | /sandbox/onelonecoder/dungeon/TextWindow.cpp | C++ | cpp | 3,248 | permissive | #include "TextWindow.h"
/// builds the largest text zone from the whole screen
TextWindow::TextWindow(olc::PixelGameEngine &_pge) : pge(_pge)
{
ox = 0;
oy = 0;
nbcols = (pge.ScreenWidth() - 2 * border) / charWidth;
nbrows =
(pge.ScreenHeight() - 2 * border + linesep) / (charHeight + linesep);
... |
9009a6fa84aae25ceb17094dff58adc3753ea728 | 599589217f09702198beb25e0261f986e055024f | raashika03/DAA | /B18081_prog_assign2_soln/question2_soln.cpp | C++ | cpp | 1,023 | no_license | //importing all the libraries
#include <bits/stdc++.h>
using namespace std;
int rate [100000 + 10];
long long values [100000 + 10];
int main()
{
int n;
long long ans = 0, tmp = 0;
cout<<"Enter number of students, n : \n";
cin >> n;
cout<<"Enter students grades : \n";
for(int i = 0; i < n; ... |
19b56207574f64553cba3c64b8be0408f640645d | 26d0e66fad53612c4feb35b479cd44177c2ecbc8 | LeBronWilly/Engineering_Cpp | /ch05/prog5_7.cpp | C++ | cpp | 352 | no_license | // prog5_7, 巢狀for迴圈求9*9乘法表
#include <iostream>
#include <cstdlib>
using namespace std;
int main(void)
{
int i,j;
for(i=1;i<=3;i++) // 外層迴圈
{
for(j=1;j<=3;j++) // 內層迴圈
cout << i << "*" << j << "=" << (i*j) << "\t";
cout << endl;
}
system("pause");
return 0;
}
|
172d020afdee0d0f5f0572f29e6f11376f641ea9 | 89add16802d2f1fef26ca9e8ba3651169c8f73a8 | seemantaggarwal/CODEFORALL | /ALGOS in C++/LINKLISTS/alternatemergell.cpp | C++ | cpp | 1,691 | no_license | #include<iostream>
#include<stack>
using namespace std;
struct node
{
int data;
node *next;
};
class linklist
{
public:
node *head, *tail;
linklist()
{
head=NULL;
tail=NULL;
}
void insert(int);
void display();
int findlen();
};
void linklist::insert(int item)
{
node *temp= new node;... |
e9bedee109939951cec5f6dc1c3ca1e4c83c419e | 082a0ecf6aa7c712e391d3aed9985d4d0c904364 | amenoyoya/old-project | /c/novel/19/hpk19_src/BasicTips.cpp | C++ | cpp | 11,074 | permissive | //--------------------------------------------------------------------------------------
// BasicTips.cpp
//
// ゲームの基本的な下受け関数などなど
//--------------------------------------------------------------------------------------
#include <windows.h>
#include <stdio.h>
#include "g_tool.h"
//--------------------------... |
46fe44e615a64d6b21404c85a4ece241dc8b4d36 | 3a07456d5fcc42cc5ccbd76c9074cbb0ec5a5c50 | njrafi/Competitive-Programming-Solutions | /HackerRank/Day 17 More Exceptions.cpp | C++ | cpp | 312 | no_license |
//Write your code here
class Calculator {
public:
int power(int n,int p)
{
if( n < 0 || p < 0)
{
throw runtime_error("n and p should be non-negative");
}
int ans = 1;
for(int i = 0 ; i < p ; i++)
ans *= n;
return ans;
}
};
|
312bbba16f0d9e197bb8a015b9396727092d74b8 | e310b2bcb6b77c617a0e07ae7f13f755fb1c5e3b | forkee/bish | /src/qt/bish.cpp | C++ | cpp | 24,286 | permissive | // Copyright (c) 2011-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Bish Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/bish-config.h"
#endif
#inclu... |
68a2163579c8471680198814e03108d9eb0f3d70 | b0694f21f3c537d57feb17d926edf89de2faa777 | D-Tsivako/Laboratory-Works | /Tsivako.2019.LW07/ArrayLibrary.cpp | C++ | cpp | 7,320 | no_license | #include <iostream>
#include "ArrayLibrary.h"
using namespace std;
int* ArrayExtension::allocateMemory(int n)
{
if (n <= 0)
{
throw std::invalid_argument("Count of array elements can not be less or equal 0.");
}
int* array = new int[n];
return array;
}
double* ArrayExtension::allocateMemoryDouble(int n)
{
... |
829b7513b359f5ea3f5c43e4cf47ac47d742c7cc | be44f313634af74fb5ce1411240aba77b64f8ae9 | OpenMPDK/KVRocks | /insdb/util/testutil.cc | C++ | cc | 2,046 | permissive | /*
* Original Code Copyright (c) 2011 The LevelDB Authors. All rights reserved.
* Use of the original source code is governed by a BSD-style license that can be
* found in the LICENSE file. See the AUTHORS file for names of contributors.
*
* Modifications made 2019
* Modifications Copyright (c) 2019, Samsung Elec... |
e9f5ad1091371d9031c36b20f1d091239451c265 | 8a8668ad6da766013f648a772c1514c2dafdbdc2 | amitzalamsft/ebpf-for-windows | /tests/libs/common/common_tests.cpp | C++ | cpp | 3,122 | permissive | // Copyright (c) Microsoft Corporation
// SPDX-License-Identifier: MIT
// Common test functions used by end to end and component tests.
#include <map>
#include "catch_wrapper.hpp"
#include "common_tests.h"
#include "sample_test_common.h"
void
ebpf_test_pinned_map_enum()
{
uint32_t return_value;
ebpf_result_t... |
a8ab87ff1afd1d91a012422901bbb3b1fa78b2e7 | 457ebd28ce6cdb7515431c01a05bacc4516524d6 | ashaw596/robocup-software | /soccer/SimFieldView.cpp | C++ | cpp | 3,645 | no_license | #include <SimFieldView.hpp>
#include <Constants.hpp>
#include <Network.hpp>
#include <QPainter>
#include <QMouseEvent>
using namespace boost;
using namespace Packet;
// Converts from meters to m/s for manually shooting the ball
static const float ShootScale = 5;
SimFieldView::SimFieldView(QWidget* parent): FieldVi... |
17f0f426cafe5bea92c36a07fba1a25796673625 | 83802264d4b61e9857e20ee97d225418c0f7578f | GregLando113/GWToolboxpp | /Dependencies/OSHGui/OSHGui/Drawing/GeometryBuffer.cpp | C++ | cpp | 805 | no_license | #include "GeometryBuffer.hpp"
namespace OSHGui {
namespace Drawing {
//---------------------------------------------------------------------------
//Constructor
//---------------------------------------------------------------------------
GeometryBuffer::GeometryBuffer()
: drawMode(VertexDrawMode::Triangle... |
3a9d21dcda834777d905168904868e76f9180c1b | eb9638190a76f0622d90b71808de61427bb10ba2 | T-Bone-Willson/SET09121-GamesEngineering-Labs | /practical_1/main.cpp | C++ | cpp | 6,240 | permissive | #include <SFML/Graphics.hpp>
// Below is main.cpp code, it's commented out because... reasons
/*int main(){
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen()){
sf::Event event;
while (window.pollEvent(eve... |
439481946cc22b279d5c767ef9e4b84cf56f4086 | 9f8f38506b9610a2de997e1e3a609e2f71237671 | crystax/android-vendor-sobjectizer | /dev/so_5/rt/stats/impl/h/std_controller.hpp | C++ | hpp | 2,784 | permissive | /*
* SObjectizer-5
*/
/*!
* \file
* \since v.5.5.4
* \brief A standard implementation of controller for run-time monitoring.
*/
#pragma once
#include <so_5/rt/stats/h/controller.hpp>
#include <so_5/rt/stats/h/repository.hpp>
#include <condition_variable>
#include <mutex>
#include <thread>
#i... |
8f9d38bd41ddcb26c2d8f79227fc0f4740939c9c | a919d368a9e0b2e7df16c84441e075da16ab3341 | ahmedwab/Kattis-Solutions | /jobexpenses.cpp | C++ | cpp | 283 | no_license | #include <iostream>
using namespace std;
int main(){
int x;
cin>>x;
int temp;
int total=0;
for(int i=0;i<x;i++)
{
cin>>temp;
if(temp<0)
total+=temp;
}
cout<<total*-1;
}
|
5f4a7f9f2ee7dd845a3aad01e050e5890286f997 | 9ee1aace620526d634380197162de1e0b99da722 | rajarahul12/Programs | /Maze Recursion/Untitled1.cpp | C++ | cpp | 2,882 | no_license | #include<bits/stdc++.h>
using namespace std;
int linput;
int see( int path2);
int moi();
int main()
{
srand ( time(NULL) );
int life = 30;
int linput;
int dog = 5;
int progress = 0;
int path;
int trolllevel;
cout << "You are venturing out on a journey to save the princess.\n";
cout << "You come across a huge m... |
97873468341ea393c3e904b8fb272792c7bf46c3 | 427e4b93936b15c96d00c21456f530f138413fec | Samsung/Castanets | /content/browser/cache_storage/cache_storage_manager_unittest.cc | C++ | cc | 95,105 | 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 <stddef.h>
#include <stdint.h>
#include <list>
#include <set>
#include <utility>
#include "base/bind.h"
#include "base/containers/flat_map.h"
#... |
ece7a4974af759ca51a293ce6f0b6aa207513516 | e091d7e4cc501ec19664fe648df17eabf74355be | national-champions/knightcoin | /src/policy/feerate.cpp | C++ | cpp | 1,142 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "feerate.h"
#include "tinyformat.h"
const std::string CURRENCY_UNIT = ... |
de2001bf6c31b74bc28e021594130ba2faf11041 | 71fba4a5aefd461a1434f27e4ee4d76818ad262c | IAmAnubhavSaini/cryptoAlgorithm-nt5src | /Source/XPSP1/NT/printscan/ui/printui/help.hxx | C++ | hxx | 716 | no_license | /*++
Copyright (C) Microsoft Corporation, 1995 - 1998
All rights reserved.
Module Name:
help.hxx
Abstract:
Print UI help facilities
Author:
Steve Kiraly (SteveKi) 11/19/95
Revision History:
--*/
#ifndef _HELP_HXX
#define _HELP_HXX
BOOL
PrintUIHelp(
IN UINT uMsg, ... |
2fdc03b229d32f17739401e50b0377e6db9e31ab | c8cabe3cc92947b1f6b001b3562d9b7dee4259b9 | flyhex/AshEngine | /src/Core/Mesh.cpp | C++ | cpp | 8,845 | permissive | #include <Mesh.h>
#include <AbstractGizmo.h>
#include <AbstractLight.h>
Mesh::Mesh(QObject * parent): AbstractEntity(0) {
m_meshType = Triangle;
m_material = 0;
setObjectName("Untitled Mesh");
setParent(parent);
}
Mesh::Mesh(MeshType _meshType, QObject * parent): AbstractEntity(0) {
m_... |
dddb262b5fd7437d703f2af3a18aad815fa1d04b | 205262ceb38b230cdad8121a62fad34081bd267d | 2bite/ARK-SDK | /SDK/ARKSurvivalEvolved_DinoCharacterStatusComponent_BP_QueenBee_parameters.hpp | C++ | hpp | 842 | permissive | #pragma once
// ARKSurvivalEvolved (332.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_DinoCharacterStatusComponent_BP_QueenBee_classes.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Parameters
//-----------------------------... |
26d47ecfda6468278e7753608074ed9b416dbeb3 | 4e1db7a2bf952b69e9425e740fa31d9536ae82c4 | chinhhi102/GiaiThuat | /NTUcoder/33.cpp | C++ | cpp | 1,892 | no_license | #ifndef competitive_programming_H
#define competitive_programming_H
#include <map>
#include <set>
#include <queue>
#include <cmath>
#include <vector>
#include <cstdio>
#include <bitset>
#include <cstring>
#include <cstdlib>
#include <complex>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <iomanip>... |
50711520adaa47d330e39440622ad38caca7c937 | a47ea56faa73dac6b08d60e05d619e96c28d7f26 | stansage/bitcoin-abc | /src/wallet/db.cpp | C++ | cpp | 31,084 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/db.h>
#include <addrman.h>
#include <fs.h>
#include <hash.h>
#i... |
37c11fa36ea4178a5ecd1395a4289dd145acc349 | 1263f1caf51a0167f80b91b68e19a100e58c400e | makeup-artist/Cody | /Cody1.2.3/medialibrary/src/main/cpp/MediaPlayer/source/device/android/GLESDevice.cpp | C++ | cpp | 8,258 | no_license | //
// Created by cain on 2018/12/30.
//
#include "GLESDevice.h"
GLESDevice::GLESDevice() {
mWindow = NULL;
mSurfaceWidth = 0;
mSurfaceHeight = 0;
eglSurface = EGL_NO_SURFACE;
eglHelper = new EglHelper();
mHaveEGLSurface = false;
mHaveEGlContext = false;
mHasSurface = false;
mVide... |
28fcca2a66eac4e5701b0c45e8d029612b601f24 | 7b1bc3b32631ad0c205db4b4342ba9320c0c9190 | marvins/ProjectEuler | /cpp/euler031/euler031.cpp | C++ | cpp | 1,151 | permissive | /**
* @file euler031.cpp
* @author Marvin Smith
* @date 5/2/2015
*/
// C++ Standard Libraries
#include <iostream>
using namespace std;
/**
* @brief Main Function
*/
int main( int argc, char* argv[] ){
//start at 1 due to 200p coin
int count = 1;
//iterate through all possible 1p
for(int... |
cb9ef75193443fe78e456250b24eaab2ed2ad76c | 0f3a6d213af8cf162b3e4377e48ba00d3ef6747b | aTiKhan/grpc | /test/core/iomgr/timer_list_test.cc | C++ | cc | 9,016 | permissive | /*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
3da61f5e20ab8f58ed0578b747c857e9b92602f2 | 407fdf61234ffe40ee09231dff53578bb540e1fa | xyuan/etl | /include/etl/temporary.hpp | C++ | hpp | 8,616 | permissive | //=======================================================================
// Copyright (c) 2014-2020 Baptiste Wicht
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//==================================================================... |
7c1fc0cd0d64b5c83987f8edd89b1813527b475d | 421491ef5912c76ec0bf81c38848091ae19d1cf6 | ashishmohapatra2703/DSA-practice-questions | /18. Dynamic Programming/55. Number of Unique paths in a Grid with Obstacles.cpp | C++ | cpp | 2,259 | no_license | /*Given a grid of size m*n, let us assume you are starting at (0, 0) and your goal is to reach
(m, n). At any instance, if you are on (x, y), you can either go to (x, y+1) or (x+1, y).
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space are marked as... |
608b8df979206a30935a53114f4d0e7180ba4c7e | cacc8301cebfa262139dc569de8610b75e27577f | volsungdenichor/cpp_essentials | /include/cpp_essentials/geo/dcel.hpp | C++ | hpp | 16,592 | no_license | #ifndef CPP_ESSENTIALS_GEO_DCEL_HPP_
#define CPP_ESSENTIALS_GEO_DCEL_HPP_
#pragma once
#include <cpp_essentials/core/tagged_value.hpp>
#include <cpp_essentials/core/map_utils.hpp>
#include <cpp_essentials/geo/vertex_container.hpp>
#include <cpp_essentials/geo/orientation.hpp>
#include <cpp_essentials/core/any_range.... |
1a6402b0274fda793636f8cc5b6e6a4dedb4633f | bc2303ed59b17db5e142f9b9fb1c22443740ee91 | navegador5/chromium | /chrome/browser/ui/webui/management/management_ui_handler.cc | C++ | cc | 46,956 | 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 "chrome/browser/ui/webui/management/management_ui_handler.h"
#include <algorithm>
#include <memory>
#include <set>
#include <string>
#include <u... |
0e3f492c43224ed517bb260b57a036414f2e931f | ec20c740b5ff3e9a467bb38bcc0302af1b31128a | LumoCash2018/LumoCash | /src/chainparamsbase.cpp | C++ | cpp | 2,736 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparamsbase.h"
#include "tinyformat.h"
#include "util.h"
#include <ass... |
fc68e315b66b1b7d0fbd9bc87df6c2e84981c6f0 | 59cd610d37f23c3411cafef20f2140b72193009e | ECS-251-W2020/chromium | /ui/views/controls/label.cc | C++ | cc | 36,142 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/views/controls/label.h"
#include <stddef.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <utility>
#include <vector... |
9782974d7443193b4ffb764451947c1f0d80d50c | 3c905bba37cd30c9eb53200b7bc228adfde4b252 | weizhengwei/di | /test/ut/core/binder_ut.cpp | C++ | cpp | 20,382 | permissive | //
// Copyright (c) 2014 Krzysztof Jusiak (krzysztof at jusiak dot net)
//
// 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/di/core/binder.hpp"
#include <boost/test/unit_test.hpp>
#include <boost/... |
8238ca8ad159e3a490a35e304c2a86e5b08d6fec | e8570532ec9ef3d7034de0597f3862d67acf62f4 | shieldnet/BOJ_shieldnet | /1058.cpp | C++ | cpp | 697 | no_license | #include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
int n, a[51][51], r;
char b;
int main() {
scanf("%d", &n);
memset(a, 0x3f, sizeof(a));
for (int i = 1; i <= n; i++) {
getchar();
for (int j = 1; j <= n; j++) {
scanf("%c", &b);
if (b == 'Y')a[i][j] = 1;
}
}
f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.