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
db41ab8b15543c009cb2702029747ad1d4f0505f
ef0fc4ce1e6b56742f95e76085758c53657b6246
Yeluorag/ACM-ICPC-Code-Library
/UVa/12186 Another Crisis.cpp
C++
cpp
761
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int MAX=100005; vector<int> son[MAX]; int n,T,t; int dfs(int u){ if(son[u].empty())return 1; int len=son[u].size(); vector<int> dp; for(int i=0;i<len;i++) dp.push_back(dfs(son[u][i])); sort(d...
fd655ea774debf72ba881518c3a711671d14d42f
0f8a26434edc7d099276105a36968f6c6e640ccc
FrancoMariotti/tp-final-argentum
/src/Server/Model/Factory.cpp
C++
cpp
14,736
no_license
#include <jsoncpp/json/json.h> #include <iostream> #include <utility> #include <Common/Utils.h> #include <Common/OsException.h> #include "Factory.h" #include "Server/Model/Character/PlayableCharacter.h" #include "Server/Model/Character/Npc.h" #include "string" #include "Server/Model/Map/Obstacle.h" #include "Server/Mod...
9d29c2a0f7a1eb6a89ad37325789cf8529c75008
edf6ed3fa7baf1e56e72e13e26288c9a2c76b922
KevinMathewT/Competitive-Programming
/ChefAndOperations.cpp
C++
cpp
1,129
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; // Author - Kevin Mathew // Birla Institute of Technology, Mesra void te(){ ll n; cin >> n; ll a[n], b[n]; for(ll i=0;i<n;i++) cin >> a[i]; for(ll i=0;i<n;i++) cin >> b[i]; for(ll i=0;i<n;i++) if(a[i] > b[i]){ cout << "NIE\n"; retu...
3efd2808cb817b39a835f5a9aee14de353cc1974
1037494248068985fc7de2092a04c1f845f1cb89
kiwi64ajs/openmrn
/src/openlcb/EventHandler.hxx
C++
hxx
12,237
permissive
/** \copyright * Copyright (c) 2013, Balazs Racz * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this li...
a5a7ae4708a674ff79580a9381d87122a794c4bc
4703acc901df16bb0c87cc6c0b96f4d95abcaebf
wiw14/Dissertation
/SampleCode/GeneticAlgorithm/CrossoverOperators.cpp
C++
cpp
33,784
no_license
#include "CrossoverOperators.h" /* * ================================================================================ * * CROSSOVER OPERATOR. * ================================================================================ * */ /* * ===============================================================================...
8fec65bdd3ab94b2466af9512ca371628d8ea62f
f12f6ee77625dbc7bf09f031a2c9e26a980aadef
seanchas116/Lattice
/src/gl/ContextRecallable.cpp
C++
cpp
348
no_license
#include "ContextRecallable.hpp" #include <QOpenGLContext> namespace Lattice { namespace GL { ContextRecallable::ContextRecallable() { _context = QOpenGLContext::currentContext(); _surface = _context->surface(); } void ContextRecallable::recallContext() { _context->makeCurrent(_surface); } } // namespac...
6df02752b46fb3101a51e9034be287c64e7dd0ee
9a7f40820a13452e86d6e9ed5fdf98548922239e
badzso/bitcoin
/src/test/script_tests.cpp
C++
cpp
41,813
permissive
// Copyright (c) 2011-2014 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 "data/script_invalid.json.h" #include "data/script_valid.json.h" #include "core_io.h" #include "key.h" #include "ke...
7ce034be6500bbd16aff733ecfff4492668c022e
e713f901b13aa60ef43aa2e5b5371e60677cf431
yangcoin/yangcoin
/src/qt/walletview.cpp
C++
cpp
11,303
permissive
// Copyright (c) 2011-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "walletview.h" #include "addressbookpage.h" #include "askpassphrasedialog.h" #include "bitcoingui.h" #include "clie...
cf7c1b329f2e8ceb4f8b6071621f78813ef884e5
6de63a3c836267695365727c1bc18a74da81ce9c
jmacd/envoy
/source/common/upstream/cluster_manager_impl.cc
C++
cc
92,820
permissive
#include "source/common/upstream/cluster_manager_impl.h" #include <chrono> #include <cstdint> #include <functional> #include <memory> #include <string> #include <vector> #include "envoy/admin/v3/config_dump.pb.h" #include "envoy/config/bootstrap/v3/bootstrap.pb.h" #include "envoy/config/cluster/v3/cluster.pb.h" #incl...
a35bd0910e046afcdba7f1277ac9aa64379b004b
8d07ddfa79873e6fadd3cdb295bb6e2b645a39b8
Cam-Corner/MCompProjectClient
/Source/MCompProjectClient/Private/ItemData.cpp
C++
cpp
2,124
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "ItemData.h" #include "Items/ItemBase.h" #include "Engine/SkeletalMesh.h" UItemData::UItemData() { } USkeletalMesh* UItemData::GetHelmetByID(uint8 ID) { if (ID >= _HeadItems.Num()) { return _HeadItems[ID]->GetDefaultObject...
0fa7b36542f7a29fdb9f99fba77afdd5397707c9
6f1fa404a888a68042b10d029fd92fdca001eada
berndreinhold/DS_Hawaii
/Geant4/G9/SD/include/SDPrimaryGeneratorAction.hh
C++
hh
818
no_license
/* Definition of the SDPrimaryGeneratorAction class. */ #ifndef SDPrimaryGeneratorAction_h #define SDPrimaryGeneratorAction_h 1 #include "G4VUserPrimaryGeneratorAction.hh" #include "G4GeneralParticleSource.hh" #include "globals.hh" class G4GeneralParticleSource; class G4Event; class SDDetectorConstruction; //.....o...
7900d8f7c0deb380c0de48bee6dbcf1d963e165f
b8d86c83c121522ceb445fe4701a543d32bbc1a5
kirank215/Spider
/src/vhost/vhost-static-file.hh
C++
hh
2,375
no_license
/** * \file vhost/vhost-static-file.hh * \brief VHostStaticFile declaration. */ #pragma once #include <map> #include "config/config.hh" #include "request/request.hh" #include "vhost/connection.hh" #include "vhost/vhost.hh" #include "vhost/dispatcher.hh" namespace http { /** * \class VHostStaticFile ...
0a8a08f00bc908a6ea2e9122ea2b89efeca48c9a
9630d46ab531ae3b230673984c746142063553b5
epmcoin/EPMCoin
/src/qt/transactionfilterproxy.cpp
C++
cpp
4,657
permissive
// Copyright (c) 2011-2013 The Bitcoin developers // Copyright (c) 2016-2019 The PIVX developers // Copyright (c) 2019 The Extreme Private Masternode developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "transacti...
107cc30283f0ba5bcfee3033256eb47e59dc2662
744a326a5dc5feabae2a810f39fffdbf69ee3eb5
Rahul-Chauhan21/LeetCode
/LeetCodeQues/ExcelSheetColumnNumber.cpp
C++
cpp
883
no_license
/* Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... Example 1: Input: "A" Output: 1 Example 2: Input: "AB" Output: 28 Example 3: Input: "ZY" Output: 701 */ class Solution...
7f97bc85a5e7003610e38eebb458ef7c08cedd10
49e05872854cbe715b21d5d8206a2a5fa0bc4785
BRAINOOOO/CompetitiveProgramming
/CF/CF519-D2-D.Cpp
C++
cpp
2,545
no_license
/* explanation : one easy observation is the problem solution a1 a2 a3 a4 a5 a6 a7 a8 a9 if a6=a9 and if prefix sum till a8 - sum till a6 is the same so sum between a6 and a7 not included equals to zero thats it. co...
041e18e1329ee905f2482a71ac54258b7fe0758a
6564109629189a0a51907c1e7a8ea1baea303c54
michaelhood/chromium
/content/renderer/accessibility/renderer_accessibility_complete.cc
C++
cc
22,561
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/renderer/accessibility/renderer_accessibility_complete.h" #include <queue> #include "base/bind.h" #include "base/message_loop/mess...
ec7b03f41ab13bbb57a317ffc1772d9b562fe2f0
a7842834d3a0abad46617e74410e6bc14ef83cf9
tjurgens/MAP
/BioAid/src/main.cpp
C++
cpp
4,010
no_license
// // main.cpp // BioAid // // Created by nrclark on 03/05/2012. // Copyright (c) 2012 Nick Clark. All rights reserved. // #include <iostream> #include <boost/scoped_array.hpp> #include <boost/thread/mutex.hpp> #include "params.h" #include "algoComponents.h" #include "algoInterface.h" void showData(const float...
feef33a44811268405ea89e60135f7ae38882f63
2a70be9fdc1ad723506245f991711edc2aada936
SamvelRaja/electron
/atom/browser/lib/bluetooth_chooser.cc
C++
cc
3,992
permissive
// Copyright (c) 2016 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/browser/lib/bluetooth_chooser.h" #include "atom/common/native_mate_converters/callback.h" #include "atom/common/native_mate_converters/string16_converter.h" #include "na...
b11a53c985765d6c58eee1bb955984cabc445ffd
efcf644094e86debb4285eb92f42c6b1c01cdeda
mingming97/Compiler
/Optimizer.cpp
C++
cpp
4,797
no_license
#include "Optimizer.h" void Optimizer::init_leaf_vars(DAG &dag, vector<inter_code> &tmp_inter_codes) { unordered_map<string, int>::iterator iter; for (iter = dag.node_table.begin(); iter != dag.node_table.end(); iter++) { string name = iter->first; int index = iter->second; if (d...
4c97d36e7dfa0b5834865fcde034a0faee27868b
5e68da58d263ded6852d315ab287eea873512a59
yanterentev/repetition-cpp
/projects/homework/competition.cpp
C++
cpp
1,552
no_license
#include <iostream> #include <cstdlib> #include <cmath> #include <iomanip> const int SPORTSMEN = 5; const int ATTEMPT = 3; double drand() { double d1 = rand(); double d2 = rand(); double d3 = d2 / d1; return d3 - floor(d3); } void create(double result[SPORTSMEN][ATTEMPT]) { for(int i = 0; i < SPORTSMEN; i++) {...
0799f45cc556a3a95d3d63b10ac9fb526da08882
d1857faa1ef3e9d632b499e7b97f34e920df55cc
Uditgulati/CpCodes
/Codechef/Long Challenges/Oct 17/POINTCN.cpp
C++
cpp
3,749
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll inf = 1e18 + 10; const int MX = 1010; int C[MX][MX], H[MX][MX]; int ans[15][MX][MX], ans1[MX][MX]; unsigned long long s[2]; unsigned long long xorshift128plus() { unsigned long long x = s[0]; const unsigned long long y = s[1]; x ^= x << 23...
1c6a0e9e01187414c9eb9ebf6e812f4a54120bae
f5ea69dde1364e000024f282da060f6af26af646
galtekar/berkeley-replay
/bench/src/kfs/src/cc/tests/KfsWriter_main.cc
C++
cc
5,421
permissive
//---------------------------------------------------------- -*- Mode: C++ -*- // $Id: KfsWriter_main.cc 71 2008-07-07 15:49:14Z sriramsrao $ // // Created 2006/06/23 // // Copyright 2008 Quantcast Corp. // Copyright 2006-2008 Kosmix Corp. // // This file is part of Kosmos File System (KFS). // // Licensed under the A...
f4996eb14688f8a356dc28d18786f41863b85c85
098cabf47ea0d6d30f09fcf706a253d497a75fda
EthSJ/C-and-CPP-in-Base
/CS 3376 - C++ in UNIX/Linux/HW6/HW6/HW6worker.cc
C++
cc
1,762
no_license
//Ethan Johnson #include "HW6shared.h" WorkerOBJ::WorkerOBJ(int tID, boost::barrier *tBarrier, boost::mutex *tMut, boost::interprocess::interprocess_semaphore *tSem, Mat *display) { workSema =tSem; wID =tID; workBlock =tBarrier; workMut = tMut; matrix =display; quantity = 0; status = WAIT_BLOCK; } Wo...
748db38fd4a3071d85a1376c17e138ee9c219500
c29b2fa260b8fb41411103f402dee102d3b629a8
syurskyi/Python_Topics
/125_algorithms/_exercises/templates/_algorithms_challenges/leetcode/leetCode/String/05_LongestPalindromicSubstring.cpp
C++
cpp
1,052
no_license
/* * @Author: xuezaigds@gmail.com * @Last Modified time: 2016-04-04 21:41:17 */ c.. Solution { public: string longestPalindrome(string s) { __(s__"") r_ ""; else __(s.size() __ 1) r_ s; int s_len = s.size(); int max_begin=0, max_end=0; int pos = 0; _____(pos < s...
6c5140c0694399b26dc800712e24000c417949fa
24c42c67a729fdb8b13e4596326a8ad05de0e1a7
apache/openoffice
/main/avmedia/source/macavf/macavf_framegrabber.hxx
C++
hxx
2,465
permissive
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
464cc967fa1ecd0ab35def75117120674485c887
a5e61d0de07bb2e83336df780abb2680591e0eff
nurislam03/Online_Judge-Competitive_Programming
/UVA/11614 - Etruscan Warriors Never Play Chess.cpp
C++
cpp
795
no_license
// // main.cpp // 11614 - Etruscan Warriors Never Play Chess // // Created by Nur Islam on 6/18/16. // Copyright © 2016 Nur Islam. All rights reserved. // #include <iostream> using namespace std; long long BinarySearch( long long min, long long max,long long Target ) { long long mid,res,TotalWarrior; whil...
55bc192e1346f5f561322d3bf845cd62b1fe2512
a2e6d0d7b62d6f52539e3651115c3823e8f46aeb
Grant6899/LeetCode
/Problem561_ArrayPartitionI/test.cpp
C++
cpp
715
no_license
/************************************************************************* > File Name: test.cpp > Author: Grant Liu > Mail: ymliu6899@gmail.com > Created Time: Sat Jan 27 21:14:07 2018 ************************************************************************/ #include<iostream> #include<vector> using namespace st...
574d7a964b4c83948bef25a378a6d4c6fbba6423
ef4c75619f5862f318a7208e1d018632c1ec46c9
zanzo420/SoT-Python-Offset-Finder
/SDK/BP_ResourceIslandWashedUpTreasureArtifactsSpawner_functions.cpp
C++
cpp
636
no_license
// Name: SoT, Version: 2.2.1.1 #include "../pch.h" /*!!DEFINE!!*/ /*!!HELPER_DEF!!*/ /*!!HELPER_INC!!*/ #ifdef _MSC_VER #pragma pack(push, 0x01) #endif namespace CG { //--------------------------------------------------------------------------- // Functions //----------------------------------------------------...
20a740ee2f75f8dfd16394f32a3287cebfcf46b7
f6561541831bf0c4b3572f5e9dc22a8df4911671
AbhijeetKrishnan/codebook
/CodeChef/JULY16/CHEFARC.cpp
C++
cpp
1,805
permissive
#include <bits/stdc++.h> using namespace std; #define INF 100000 int main() { int t; cin >> t; while (t--) { int n, m, k1, k2; cin >> n >> m >> k1 >> k2; vector<vector<int>> v(n, vector<int>(m)), d1(n, vector<int>(m, INF)), d2(n, vector<int>(m, INF)); for (int i = 0; i < n; ++i) { for (int j = 0; j ...
38cc755e6d72d8551af312e6116119e7d3d66512
f80b50ed9d315772b275b9272df38540c11e5750
hunterMG/Algorithm
/acm.hdu.edu.cn/2009/main.cpp
C++
cpp
311
permissive
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main() { int m; float n , a[1000]; while(~scanf("%f%d", &n, &m)){ float res = 0; while(m--){ res+= n; n = sqrt(n); } printf("%.2f\n", res); } return 0; }
815693bc6673bcc5da032c4bc7113d23fe6b30d3
592ff74e52e5158dfe6adaecc763c74c10a41a9d
drtupe/PID_Controller
/src/main.cpp
C++
cpp
3,934
no_license
#include <math.h> #include <uWS/uWS.h> #include <iostream> #include <string> #include "json.hpp" #include "PID.h" // for convenience using nlohmann::json; using std::string; // For converting back and forth between radians and degrees. constexpr double pi() { return M_PI; } double deg2rad(double x) { return x * pi() ...
65e1d4856284bc4a6fe19437a00434e186dbc31f
8701d117f329ebd3ae8879954571f2c3be3e8265
InagakiSota/DuelMachina-flight
/Src/SceneManager/PlayScene/PlaySceneStateManager/PlaySceneFadeOutState.cpp
C++
cpp
2,483
no_license
/////////////////////////////////// //プレイシーンのフェードアウトステート //作成者:2021年5月10日 //作成日:GT2_04_稲垣颯太 /////////////////////////////////// #include "pch.h" #include "PlaySceneFadeOutState.h" #include "Adx2.h" #include "CueSheet_0.h" #include "../../PlayerID.h" #include "../../ResultScene/ResultScene.h" const int PlaySceneFadeOu...
0c1df15d75149b815cbefd15f9f8057be2e14189
e7efa99aa1b0f0dd0851a6a8fbc459c6d41c4e02
GolgiDevs/linux-extension-beta
/src/golgi_fixup.cpp
C++
cpp
441
no_license
#include <time.h> #include <math.h> #include <stdlib.h> #include "golgi_fixup.h" long millis(void) { long ms; // Milliseconds time_t s; // Seconds struct timespec spec; clock_gettime(CLOCK_REALTIME, &spec); s = spec.tv_sec; ms = round(spec.tv_nsec / 1.0e6); // Convert n...
6742d59440a5d97dff26dcdf58a61da5256d36be
bfaefc0afd054e839c9f178214177da95bf45a68
universeroc/net
/tools/quic/quic_server.cc
C++
cc
6,849
no_license
// 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 "net/tools/quic/quic_server.h" #include <errno.h> #include <features.h> #include <netinet/in.h> #include <string.h> #include <sys/epoll.h> #...
572bc234b843f04a5d82380d91df6b9ae838a05b
c4af61b5bf0eaf7b1d051cf92226c9f969920c15
simonkirshon/C-Hotel_part2
/Hotel/Spa.cpp
C++
cpp
357
no_license
#include "Spa.h" Spa::Spa(const char* spaName) { delete[]this->spaName; this->spaName = new char[strlen(spaName) + 1]; strcpy(this->spaName, spaName); } Spa::~Spa() { if (!(spaName == nullptr)) delete[]spaName; } void Spa::relax() const { std::cout << "Relaxing" << std::endl; } void Spa::swim() const { std...
74175847ab8586fead97edb847d735a6ebeaa4f2
bd20b5e8d2afa0b09214ab9cb81bbffef160a9ea
long327/RestAPIWt
/tools/rttr-0.9.0/src/rttr/method.cpp
C++
cpp
8,063
permissive
/************************************************************************************ * * * Copyright (c) 2014 Axel Menzel <info@axelmenzel.de> * * ...
e8e8d2e74ab9f8f376e79b0d21ff82643dbfe77e
68cf6ff0ffc11c7672605c26ebe62f5085bef311
NiceVinke/LeetCode
/206-reverse-linked-list/reverse-linked-list_[AC2_9ms].cpp
C++
cpp
701
permissive
// Reverse a singly linked list. // // click to show more hints. // // Hint: // A linked list can be reversed either iteratively or recursively. Could you implement both? /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {...
4fe793f0487c17f54d9651f37d42db54655f88c8
3fc4e4f0f62e1352891f7e4125c2c1fe39a67fee
Ation/codeeval
/moderate/point_in_circle/main.cpp
C++
cpp
2,135
no_license
#include <iostream> #include <fstream> #include <string> #include <vector> #include <stdio.h> #include <math.h> using namespace std; typedef struct __point { double x; double y; }Point; double readDouble(const string &line, size_t &position) { double result = 0; bool negative = false; char temp; ...
971612954616e3d9956f027c12887df613a2b21a
d8c0b69ad1d727b7150a100d41f8db69b2f06552
chenfushan/alps_algorithm
/MicrosoftExam2/MicrosoftExam2/main.cpp
C++
cpp
2,125
no_license
// // main.cpp // MicrosoftExam2 // // Created by Alps on 15/4/3. // Copyright (c) 2015年 chen. All rights reserved. // #include <iostream> #include <vector> #include <queue> using namespace std; struct node{ int start; int num; vector<int> signal; }; typedef node* Node; int main(int argc, const char...
16683f19fdc5fde951689ffc54abe1cb7d22637c
674e3b068b1444aa20567daf98550a06896e1505
rinauschina/rina
/537.cpp
C++
cpp
1,224
no_license
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> using namespace std; int main() { int mlen, len, temp; int i; string str1; //Введем максимальный размер строки cout << "Enter max number of string:\t"; cin >> mlen; cout << "\n"; char *str = new char[mlen]; ...
9011b17cbda1c65844f15fa28b6bef265d468ec6
d5d760259a81b45fffbd3d2fd80f550ada8626eb
VeryNiceGuy/opengl-samples
/Fireworks/Fireworks/Vector4.cpp
C++
cpp
303
no_license
#include "Vector4.h" Vector4::Vector4() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {} Vector4::Vector4(const Vector4& vector) : x(vector.x), y(vector.y), z(vector.z), w(vector.w) {} Vector4::Vector4(float pmX, float pmY, float pmZ, float pmW) : x(pmX), y(pmY), z(pmZ), w(pmW) {} Vector4::~Vector4() {};
1c7f796e0a9e35914bf019977b309ba46773bcd6
63ebc7feaba9f8a8b0a38ff1557d3f87fd167e0a
DanielEstrada971102/Implementaciones_FPGA
/PYNQ/PYNQ_base/base/base.srcs/sources_1/bd/base/ip/base_m03_regslice_14/sim/base_m03_regslice_14.cpp
C++
cpp
9,826
no_license
// (c) Copyright 1995-2020 Xilinx, Inc. All rights reserved. // // This file contains confidential and proprietary information // of Xilinx, Inc. and is protected under U.S. and // international copyright and other intellectual property // laws. // // DISCLAIMER // This disclaimer is not a license and does not grant ...
02f1ab890946ab34cea958735dd586a9b21bde6e
6ac4e5c734567e9789ee44f17fc6ca871fc61b4a
ric2b/Vivaldi-browser
/chromium/third_party/tflite_support/src/tensorflow_lite_support/acceleration/configuration/edgetpu_coral_plugin_test.cc
C++
cc
4,226
permissive
/* Copyright 2020 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...
3dc0d06e52360f7b1fc4e9801c2e1612442dfdb8
22ab91ae6bf8c2eec3df314ccd7882c9013502d7
debugger592/Coding_Problems
/Spoj/RANJAN02(HanoiRevisited).cpp
C++
cpp
222
no_license
#include<iostream> using namespace std; int main(){ int n,t,i; long long unsigned moves[40]; cin>>t; while(t--){ cin>>n; moves[1]=2; for(i=2;i<=40;i++) moves[i]=3*moves[i-1]+2; cout<<moves[n]<<endl; } return 0; }
3c1135495ef19710f0bb8d641f62a593b3222c03
9c530b6f900b1cc754735cf7ac9007bdd5522dfe
stasinek/BEFS-Explorer
/src/add-ons/kernel/file_systems/packagefs/package/GlobalFactory.cpp
C++
cpp
1,452
permissive
/* * Copyright 2009-2013, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ #include <GlobalFactory.h> #include <new> #include <package/hpkg/HPKGDefs.h> #include <PackageData.h> static const uint32_t kMaxCachedBuffers = 32; /*static*/ GlobalFactory* GlobalFactory::sDef...
bbe59709031a6133b074b5039cf06051b5f0f6ff
6796c52d770c585d82c8d753d83fd8b96506dc5e
17craigiec/MQP_2021_ROS_Architecture
/include/Normal_Vector_Detection_and_Allignment/Camera_UART/uart_test.cpp
C++
cpp
367
no_license
#include <fstream> #include <iostream> using namespace std; int main(int argc, char const *argv[]) { ifstream myfile ("/dev/ttyAMA0"); string line; while(true) { getline(myfile, line); cout << line << endl; int timer = 0; while(timer < 100000000) { ...
2eec6e06e83bdd1b65867cb047bacfb9507ba589
82b3d38a17cd3e678fd8c43ec1027873bc00ee30
iridium-browser/iridium-browser
/services/network/public/cpp/cross_origin_opener_policy.cc
C++
cc
4,650
permissive
// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/network/public/cpp/cross_origin_opener_policy.h" #include "services/network/public/cpp/cross_origin_embedder_policy.h" namespace network { CrossOriginOpene...
8c39d59b15c4ae5f3988fa34e7fb07dd2d99cc98
8921fb994222b0539b33411259ab7cfe4710a027
otcshare/chromium-src
/net/http/http_auth_challenge_tokenizer_unittest.cc
C++
cc
7,328
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 "net/http/http_auth_challenge_tokenizer.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { TEST(HttpAuthChallengeTokenizerTest, ...
eb6446fa1cd2012723d4f8865034b53d447d483c
8da6ba6e2f78c9d8788ee0424a5cb2e6faa9eac8
nieznanysprawiciel/swSerialization
/Tests/SerializerTest/xml/LineNumber_xml.cpp
C++
cpp
664
no_license
#include "swCommonLib/External/Catch/catch.hpp" #include "swCommonLib/Serialization/Serializer.h" #include "swCommonLib/Serialization/Deserializer.h" // ================================ // // Gets line number while serializer sits in Object. TEST_CASE( "Deserialization.XML.LineNumber.Object", "[Serializers]" ) { ID...
f4ade07e235baf3c42636c68d2dfd5734e20f687
db93405dc2c53b05ed9e3e7fd04fa4956c4a671f
myxzlpltk/competitive-programming
/Compfest/Learning/Detektor Palindrom.cpp
C++
cpp
259
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; string s, s1; while(n--){ cin >> s; s1 = s; reverse(s1.begin(), s1.end()); if(s == s1){ cout << "palindrom\n"; } else{ cout << "bukan palindrom\n"; } } }
04ec3c9a90611c622068e54b3e17fed11b5e7b23
30dbd9ea11f855b706ed9c72b78a7dd06f2f4064
apple/swift-libcxx
/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp
C++
cpp
1,683
permissive
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
36801885ae273faccd3108ddf57128476c1d7cf6
6404d299317456649993d8a1a5f109684313d363
haskellstudio/ft
/Source/Main.cpp
C++
cpp
4,041
no_license
/* ============================================================================== This file was auto-generated! It contains the basic startup code for a Juce application. ============================================================================== */ #include "../JuceLibraryCode/JuceHeader.h" #include...
844adc1803b21b4026b611a3427f8ce706a506e2
7d5d3749fb653ff6211d060d9bb325da76235dce
zeeeyang/lexicon_rnn
/binary_task/binary_cnn/cnn/devices.cc
C++
cc
2,097
permissive
#include "cnn/devices.h" #include <iostream> #include "cnn/cuda.h" using namespace std; namespace cnn { Device::~Device() {} #if HAVE_CUDA Device_GPU::Device_GPU(int mb, int device_id) : Device(DeviceType::GPU, &gpu_mem), cuda_device_id(device_id), gpu_mem(device_id) { CUDA_CHECK(cudaSetDevice(device_id)); ...
82001e853f38843f7867d5fd39cb9b48edab9db7
2026f0d3dec6e563f166d00f3e65a7c99591a992
sashank1608/competetive-programming
/dynamicprogramming/codeforces/clearthestring.cpp
C++
cpp
1,010
no_license
#include<bits/stdc++.h> using namespace std; //int dp[501][501]; const int inf=600; vector<vector<int> > dp(501,vector<int>(501,inf)); int main() { int n; cin>>n; string p,s; cin>>p; for(int i=0;i<n;i++) { if(!s.empty()) { if(s.back()!=p[i]) s+=p[i]; ...
d203720ea120dc5b2b59b1853f08ef0b46878abe
292b92db6009eb21f8e97b97b8079dd60a5e2122
ADozois/ZombieSim
/QSimZombie/QSimZombie/SimPieChart.cpp
C++
cpp
944
permissive
#include "SimPieChart.h" #include <QPieSeries> #include "QStatSim.h" SimPieChart::SimPieChart(QChart * chart, const std::map<QString, int> * data, QString title) :QSimChart(chart, title), mData{ data } { mDataSerie = new QPieSeries; CreateSerie(); } SimPieChart::SimPieChart(const std::map<QString, int> * data,...
5e20aa557b5e7c70a4362a4ecd387dd00801d787
7206347f07860722ba51897378ade8420688b371
MaxJTRice/CSE_100_Data_Structure
/CSE100_projects/proj3/HCNode.cpp
C++
cpp
259
no_license
#include "HCNode.hpp" bool HCNode::operator<(HCNode const & other){ if(this->count<other.count)return false; else if(this->count>other.count)return true; else return this->symbol<other.symbol; } bool comp(HCNode* one, HCNode* other){ return one<other; }
21a970e4fe1ded40af0149da0fef4d4a91a2a8c7
32678a006e8988a990be003267cae0088dbc14c2
inishchith/DeepSpeech
/decoders/swig/openfst-1.6.3/src/script/project.cc
C++
cc
628
permissive
// See www.openfst.org for extensive documentation on this weighted // finite-state transducer library. #include <fst/script/fst-class.h> #include <fst/script/project.h> #include <fst/script/script-impl.h> namespace fst { namespace script { void Project(MutableFstClass *ofst, ProjectType project_type) { ProjectAr...
033bcf72fbf159096f3a0d35bafd692d540284de
c97e04a62e6fc19c9ca8d03bd5c3ed2774a909c9
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14197/function14197_schedule_33/function14197_schedule_33_wrapper.cpp
C++
cpp
1,133
no_license
#include "Halide.h" #include "function14197_schedule_33_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(256, 256); Halide::Buffer<int32_t> buf01...
84a6216a009409583071f3c9526450fa457ad639
9bd1ee744af74517e9f3620b547fb633417611f9
lamar-studio/Code365
/pulseAudio/pavucontrol_refactor/audiomanager.cc
C++
cc
14,343
no_license
/*** This file is part of pavucontrol. Copyright 2006-2008 Lennart Poettering Copyright 2008 Sjoerd Simons <sjoerd@luon.net> pavucontrol is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version...
db51f008d4f3e7e0752592f3d9ba00d023d6400b
50fe5ee7679ff769c4ccdb06b37c8dfa8d635fe6
MurryK/Bejing_subway_continued
/subway/mainwindow.cpp
C++
cpp
20,556
no_license
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QDebug> #include <qstring.h> #include <QTextCodec> #define ButtonWidth 10 #define MOVESTANDARD 10 #define ZOOMSTANDARD 1 #define ZOOMMAX 10 #define ZOOMMIN 0 DWORD WINAPI Thread(LPVOID lpParam) { MainWindow *n = (MainWindow*)lpParam; n->p...
92fcabfa554198d7140b1a65df8dd03720081320
9d4f9fd21dddbe0f3446262eed465eb70e37a984
TorstenRobitzki/Sioux
/source/http/http.cpp
C++
cpp
4,088
permissive
// Copyright (c) Torrox GmbH & Co KG. All rights reserved. // Please note that the content of this file is confidential or protected by law. // Any unauthorised copying or unauthorised distribution of the information contained herein is prohibited. #include "http/http.h" #include "tools/asstring.h" #include <ost...
4a18210e47231d6b5db7710daa5f3499f201d30e
c9b26fe8eaf2159b9dbc067b9708b6b7604efb9c
RainbowZerg/X-Ray_Engine_1.5.1.0
/src/Layers/xrRender/Shader.cpp
C++
cpp
4,341
no_license
// Shader.cpp: implementation of the CShader class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #pragma hdrstop #include "Shader.h" #include "ResourceManager.h" #include "dxRenderDeviceRender.h" // STextureList::~STextureList () { DEV->_DeleteTextureList (this...
d0f55a24a8438bf0eefed4a947e55577038d28de
85bd5d3c8f3dee26b3e7807ac424fd1bce4a8aa5
joaogui1/Competitive-Programming
/AtCoder/ABC/103/a.cpp
C++
cpp
215
no_license
#include <bits/stdc++.h> using namespace std; int main(){ cin.tie(0); ios_base::sync_with_stdio(0); int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a + 3); cout << a[2] - a[0] << "\n"; return 0; }
856e8a3831c54aecba84ab283b56d1ab1dab921e
d5d48409b7f4099d951d6095d998861cf4007233
zonasse/Algorithm
/normal problems/string/kmp.cpp
C++
cpp
2,384
no_license
/* * kmp算法 */ #include <bits/stdc++.h> using namespace std; class Solution{ public: /* * 方法1 */ int kmp(string ms,string ss){ if(ms.size() < 1 || ss.size() > ms.size()){ return -1; } vector<int> next = get_next_array(ss); int s1 = 0; int s2 = 0; ...
1a1144940a6bb91603b5c101b34481248e5c1294
e36904f6e2105b1e7d61986ff7b49c76570452c6
Olde-Skuul/burgerlib
/source/graphics/brtexture.cpp
C++
cpp
34,386
permissive
/*************************************** Texture for rendering class Copyright (c) 1995-2017 by Rebecca Ann Heineman <becky@burgerbecky.com> It is released under an MIT Open Source license. Please see LICENSE for license details. Yes, you can use it in a commercial title without paying anything, ...
e7b2b6ac32c230747248d9fc865b2492644bbcf4
9014d7b2096c2dbf8dd4a15b4064d1cf3f6729de
cyan-at/NRF8001_ARM_SUPPORT
/dfu.cpp
C++
cpp
11,411
permissive
#include <lib_aci.h> #include <ble_assert.h> #include <dfu.h> #include <SPI.h> static uint8_t state = ST_ANY; static uint32_t firmware_len; static uint16_t notify_every; static uint32_t bytes_received; static uint16_t packets_received; static void dfu_notify (aci_state_t *aci_state); static bool dfu_send (aci_state_t...
1040b7272c72d090117fc2a16b6e816874941bf6
44b27bc6492a21c2c117d319e895732d9ad0cc78
wxmvolker/OPS
/apps/c/shsgc/OpenCL/initialize_kernel_opencl_kernel.cpp
C++
cpp
10,712
no_license
// // auto-generated by ops.py // #ifdef OCL_FMA_SWITCH_ON #define OCL_FMA 1 #else #define OCL_FMA 0 #endif static bool isbuilt_initialize_kernel = false; void buildOpenCLKernels_initialize_kernel(int xdim0, int xdim1, int xdim2, int xdim3, int xdim4) { //int ocl_fma = OCL_FMA; if(!isbuilt_initialize_kernel) {...
d7ee295c0727878919a94c555a160c17ae5c9dc1
21cce9df460b5cbe666295f32f7db2cd7efcbfc7
AlexMcKeown/Generic-Programming
/Melt.cpp
C++
cpp
1,368
no_license
#include "Melt.h" Melt::Melt(char _character) // Melt { p = 26; // 26 distinct characters in alphbet setCharacter(_character); } int Melt::operator-(Melt otherCharacter) { int num = 0; if (typeid(otherCharacter.getCharacter()).name() == typeid(char).name()) { if (character != otherCharacter...
a580c5f1e1f10fba424cbb479ef1fbe911c3d07a
e63884ee31f247096d739e64307237e9da89179a
ferdaniel789/AlgoritmosSznajdleder
/Ejercicio22.cpp
C++
cpp
1,257
no_license
//============================================================================ // Name : Ejercicio22.cpp // Author : Daniel Fernandez // Version : v1 // Copyright : License-Free Software // Description : Trabajo practico //============================================================================ ...
e626e38f669a9d576667495addeea631b13743ee
caaafd25c12088249a7e24bb97846cf4426bf691
SzymonKrawczyk/FrequencyCounter
/obraz.cpp
C++
cpp
3,494
no_license
////////////////////////////////////////////////////////////////////////////////////////// // // // Klasa obraz (plik .cpp) // // ...
f889d50df9ac306aca91f6f9fad7c15171ed8ec6
18b742f67f4ba10b7202af7d5989c6619179fbca
mfs409/llvm-transmem
/ptm_tm/benchmarks/stamp_raii/intruder/stream.cc
C++
cc
12,037
permissive
/* ============================================================================= * * stream.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =========================================...
3c7bcff3ac58543f6e72dbbbf4f256ba60ddf1c6
5864876fe4ffc3517d45024425c0094d0f1e14b7
danilaferents/BinarySearchTree
/BinarySearchTree.cpp
C++
cpp
21,298
permissive
#include <iostream> #include <cstdlib> #include <vector> #include <string> #include <stdlib.h> #include <queue> #include <stack> #include "BinarySearchTree.hpp" using namespace BinarySearchTree; //Setting values to variables functions void Node::SetLeftNode(Node *_left) { left=_left; } void Nod...
c5128f05bb6b2399b856f3da66c5f6897874bfac
be20e9eed731afd463f1c080c4e3e1790daf4b64
alexandraback/datacollection
/solutions_5640146288377856_0/C++/Anup21d/battleship.cpp
C++
cpp
547
no_license
#include<iostream> #include<cstdio> #include<cstdlib> #include<string> #include<cmath> #include<algorithm> using namespace std; typedef long long ll; int main(){ freopen("sin.in","r",stdin); freopen("sout.out","w",stdout); int t,r,c,w,ans,i,k; cin>>t; for(k=1;k<=t;k++){ ...
094ffb57edcf12c0d3e2db21c24e281d2f6c65c7
3f4553cefbad235a24c703eef37d14c21ed9252e
zouguangxian/omim
/track_analyzing/track_analyzer/cmd_cpp_track.cpp
C++
cpp
955
permissive
#include "track_analyzing/track.hpp" #include "track_analyzing/utils.hpp" #include "storage/routing_helpers.hpp" #include "storage/storage.hpp" using namespace routing; using namespace std; namespace track_analyzing { void CmdCppTrack(string const & trackFile, string const & mwmName, string const & user, ...
bda89d5b903984626d829d503b25c34482466d98
a0a1426529b72712fb99c8f5fe69735d2eb63307
kangaroo/coreclr
/src/vm/assemblyname.cpp
C++
cpp
8,673
permissive
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // /*============================================================ ** ** Header: AssemblyName.cpp ** ** Purpose: Implements AssemblyName (loader domain) architecture...
2fe4485c0eed7204eaa0b914695092ba41842143
a8c6b1f86de56cf2a49d35b79435c3a75742df7a
s-kislyuk/MagicMaze
/Main/Point2D.cpp
C++
cpp
1,254
no_license
#include "pch.h" #include "Point2D.h" CPoint2D::CPoint2D(void) :m_x(0), m_y(0) { } CPoint2D::CPoint2D( double x, double y ) :m_x(x), m_y(y) { } CPoint2D CPoint2D::operator*( double d ) const { CPoint2D res(*this); res.m_x *= d; res.m_y *= d; return res; } CPoint2D CPoint2D::operator+( CPoint2D const & po...
62ad898f862a4738bd79aa6a90d2dc8d8469eefa
68e8ef686359e8d1fec9721947c96308cbd5d09b
alexandraback/datacollection
/solutions_2463486_1/C++/rabbit125/solution.cpp
C++
cpp
920
no_license
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> #define MAXSIZE 10000000 using namespace std ; bool testF( long long a ) { char Now[ 60 ] ; int Len ; bool Fair = 1 ; sprintf( Now , "%lld" , a ) ; Len = strlen( Now ) ; for( int i = 0 ; i < Len/2 ; i++ ) if( Now[ i ]...
067c518117241a720091391d2f1d9aee6232f011
418fb9792067afe27a169e0443e42a6f19ee0a10
Thinkaboutmin/CheckMeOut
/src/item.cpp
C++
cpp
341
permissive
#include "item.h" item::item() { name = "Undefined Item"; price = 0.00; sku = -1; } item::item(std::string name, double price, int sku) { this->name = name; this->price = price; this->sku = sku; } std::string item::getName() { return name; } double item::getPrice() { return price; } int item::getSK...
5c01fedb65a818755f6922fe0ee67cbc18e1d35a
6b1ded4e5ed07aacbd42f4d4f0a85832a56fdbb7
vciriolo/EoP_devel
/ZFitter/src/runDivide_class.cc
C++
cc
9,002
no_license
#include "../interface/runDivide_class.hh" #include "TTreeFormula.h" #define DEBUG #include <cassert> #ifdef DEBUG #include <TStopwatch.h> #endif #define MAX_TIME_DIFF 3600 runDivide_class::runDivide_class(void) { } runDivide_class::runDivide_class(TCut region, std::set<TString> activeBranchList) : _region(region),...
e2c97591e37512a946c08f6080c75f8e0969b7a7
0d0936a5e16e11b6e6427d753df319b33a2503e6
supershaz178/ParallelProcessing_Project2
/Collatz/collatz.cpp
C++
cpp
2,687
no_license
/* Collatz code for CS 4380 / CS 5351 Copyright (c) 2021 Texas State University. All rights reserved. Redistribution in source or binary form, with or without modification, is *not* permitted. Use in source or binary form, with or without modification, is only permitted for academic use in CS 4380 or CS 5351 at Texas...
a3a26e1a20d368a2d5b7027e32fffba589c42c7e
6f9f6bd3462fbf4088ec6f4e5715351500571cfa
sunglen/cpp
/bohyoh/chap03/list1.cpp
C++
cpp
820
no_license
// 特定条件の成立の可否によって配列要素の値を識別表示 #include <ctime> #include <cstdlib> #include <iostream> using namespace std; //--- 成績は良[B:70~79点]か? ---// bool fit(int x) { return x >= 70 && x <= 79; } //--- 関数fit(x)の返却値が真である配列aの要素を識別表示 ---// void put_list(const int a[], int n) { for (int i = 0; i < n; i++) { if ...
decf4df77836c099d00016f14331004b568d2577
4bb51b15ab514bfd9890c20e6429193c65404911
xunzhang/paracel
/test/test_proxy.cpp
C++
cpp
1,294
permissive
/** * Copyright (c) 2014, Douban Inc. * All rights reserved. * * Distributed under the BSD License. Check out the LICENSE file for full text. * * Paracel - A distributed optimization framework with parameter server. * * Downloading * git clone https://github.com/douban/paracel.git * * Authors: Hong Wu...
d0ba7145b18fce83d03c2962abc17155177a33ec
575ecae099a6a1e5bb6c14147d16773ce932a31d
watinha/collector
/opencv-2.4.9/modules/stitching/src/exposure_compensate.cpp
C++
cpp
9,390
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
a03c415ee185656df3d9f85385dfdf0885ae626c
c1e5f82197b5b1ea78e679f3c21d75ef8c102bf7
JasonPV/mpi_and_cuda
/task1_2_3.cpp
C++
cpp
609
no_license
#include <iostream> #include "mpi.h" using namespace std; int main(int argc, char** argv) { int rank, size; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Status status; int msg = 1; for (int id = 0; id < size; id++) { if (id != ran...
73e18179f8948164215cafd1c72cb7971228f590
a87b6c0d46b275209d8fcc25ada13d6b699605d0
amey16/leet-code
/practice/3.logest_substring_without_repeating_characters.cpp
C++
cpp
884
no_license
class Solution { public: int lengthOfLongestSubstring(string s) { int a[96],max=0,curr=0; for(int i=0;i<96;i++) a[i]=0; int k=0; for(int i=0;i<s.length();i++){ a[(int)(s[i]-' ')]++; curr+=1; if(a[(int)(s[i]-' ')]>1){ // ...
a443d19f62d206d0142d9f753c4bdf1848d963b7
1e84c114e646dffaa075cb9a4447d2d261c6234b
Reza-Amani/Hunting
/2018/Navico-tChartPanel-editted.cpp
C++
cpp
1,533
no_license
//No need to worry about #includes tChartPanel::tChartPanel(tBigObject const & object, tChartWidget & _m_pChartWidget, tChartTouchController & _m_pChartTouchController) { m_PanelId = 0; m_color = tColor::BORDER_COLOR_RED; m_Size = { object.getWidth(), object.getHeight() }; m_pChartWidget = _m_pChartWidget; m...
f76c5131348497ce640dabcf54d61c22d031112b
7aa855acc75560efad0524e88a54242a45a31493
xchwarze/Pegasus
/Pegasus/mod_LogonPasswords/sec_pkg/wdigest.cpp
C++
cpp
3,960
no_license
/* Benjamin DELPY `gentilkiwi` http://blog.gentilkiwi.com benjamin@gentilkiwi.com Licence : http://creativecommons.org/licenses/by-nc-sa/3.0/ This file : http://creativecommons.org/licenses/by/3.0/ */ #include <Windows.h> #include <Psapi.h> #include "..\lpmemory.h" #include "..\..\inc\dbg.h" #include "..\..\i...
6c9aeee63ef8a8254da3bbd1dbeb66a722b4db4f
4b5f908ed925e10f59ae24181852dedc97f992e6
patrun/patrik
/N6_prehrana.cpp
C++
cpp
4,791
no_license
#include <iostream> #include <string> #include <fstream> using namespace std; struct cas{ int zac; int kon; }; struct Naslov{ string nas1; string nas2; }; struct restavracija{ string ime; Naslov naslov; cas odpiralni; int cena; double ocena; }; void vnos(restavracija *polje[10]){ ...
34387c588a48106274313b8b0562ac90964d8ce0
05af62c26b3af4f2a104e44df28b083caa3094cc
parkpetersen/Shell
/pipeShell.cpp
C++
cpp
4,184
no_license
#include <iostream> #include <unistd.h> #include <sys/wait.h> #include <vector> #include <string> #include <sys/types.h> #include <algorithm> #include <iterator> #include <stdio.h> #include <chrono> #define READ_END 0 #define WRITE_END 1 std::chrono::steady_clock::time_point start; std::chrono::steady_clock::time_poi...
1e590e7345bc4a4c180f322f5c065f35fc756bab
2769bc8ce0835fde28d27f12a8810c2a6e0a7dd5
zettel-kasten/zettelkasten
/src/qt/bitcoinunits.cpp
C++
cpp
4,284
permissive
#include "bitcoinunits.h" #include <QStringList> BitcoinUnits::BitcoinUnits(QObject *parent): QAbstractListModel(parent), unitlist(availableUnits()) { } QList<BitcoinUnits::Unit> BitcoinUnits::availableUnits() { QList<BitcoinUnits::Unit> unitlist; unitlist.append(BTC); unitlist.append(mBT...
4bdd598c20fbecb83f2ee839932b5b12df82abc7
b28aeb45e24715d915c18ca2fdd966d7290143e6
anchern/abstractVM
/src/Exceptions.hpp
C++
hpp
1,058
no_license
#pragma once #include "string" class Exceptions { public: class StackIsEmpty : public std::range_error { public: explicit StackIsEmpty(); const char *what() const noexcept override; }; class StackHasLessTwoElements : public std::range_error { public: explicit ...
25ecfbb648b61886ec6d47daea45e73a66ba3110
e9f474261eae1041f4c1f31d1151b13b73049485
chinnyannieb/Meus-Projetos
/componentes/TMS Component Pack/AdvHTMLProp.hpp
C++
hpp
6,442
no_license
// CodeGear C++Builder // Copyright (c) 1995, 2009 by Embarcadero Technologies, Inc. // All rights reserved // (DO NOT EDIT: machine generated header) 'Advhtmlprop.pas' rev: 21.00 #ifndef AdvhtmlpropHPP #define AdvhtmlpropHPP #pragma delphiheader begin #pragma option push #pragma option -w- // All warnings off ...
bf4bae423f8a2dba78de6f57ec0765c395adb237
99cdca1bdad8752f9f1906ee62cdf11c7f84b2bb
Kaljurand/EKISpeak
/app/src/main/synthts_et/lib/etana/mrf-gen.cpp
C++
cpp
42,689
no_license
#include "etmrf.h" #include "tmk2t.h" //----------------------- bool ETMRFAS::Set( const FSXSTRING &wstr ) { if(mrfFlags->ChkB(MF_GENE)==false) return ETMRFA::Set(wstr); // morf analüüs else return ETMRFAS::Set1(wstr); // morf süntees } bool ETMRFAS::Set1(const...
1c4515c228f6d98ba0922b56c84c33f73ea0bcf9
37e8c964024b43028ab42671219b121e425e51f1
kmsmgsh/jmcm
/src/external.cpp
C++
cpp
27,301
no_license
// external.cpp: implementing some R functions in C++ // // Copyright (C) 2015-2016 The University of Manchester // // Written by Yi Pan - ypan1988@gmail.com #include <RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] #include "bfgs.h" #include "mcd.h" #include "acd.h" #include "hpc.h" //'@title Fit Joint Mean-Co...
642b4c707bdbffee0987e4e9381c18c42bc42333
cfb17c1ff90bbf20c3731871b6cc97f6061e5450
NHERI-SimCenter/WE-UQ
/EVENTS/StochasticWindModel/src/StochasticWindInput.cpp
C++
cpp
6,009
permissive
/* ***************************************************************************** Copyright (c) 2016-2017, The Regents of the University of California (Regents). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ar...
7aafe33cfd7d31162b583e2969f76a2f005461f5
00c92661ef5742b5cb53be236b2a1b5d379ad3c7
DoktorBotti/RF_Metrics
/test/src/first_tests.cpp
C++
cpp
1,742
permissive
#include "../helpers/Util.h" #include "GeneralizedRfAlgo.h" #include "PllSplit.hpp" #include "PllTree.hpp" #include "RfMetricInterface.h" #include <catch2/catch.hpp> #include <cstdlib> #include <fstream> #include <iostream> #include <sstream> #include <string> TEST_CASE("read first test tree", "[data]") { std::string...
3a8ec8e8d5dd926b02f9db4b59e0ed9ba24298da
8659423b2d955449c733e68a740970a03dddd3c7
NeilChongSun/AI
/AI/Src/WanderBehavior.cpp
C++
cpp
863
no_license
#include "Precompiled.h" #include "WanderBehavior.h" using namespace AI; X::Math::Vector2 WanderBehavior::Calculate(Agent & agent) { X::Math::Vector2 circle = (agent.position + (agent.heading * wanderDistance)); X::Math::Vector2 random; // WanderJitter random.x = X::RandomFloat(-1.0f, 1.0f) * wanderJi...
b3d0a9097c9ba8fd9bce3de7d88fd4f0f44fcf5e
dd504b01941f7106fcdd685ec05c8c158d8c822c
wh2per/Baekjoon-Algorithm
/Baekjoon/10798_세로읽기.cpp
C++
cpp
455
no_license
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <vector> #include <climits> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); //freopen("input.txt", "r", stdin); vector<string> s(5, ""); for (int i = 0; i < 5; ++i) cin >> s[i...
cda3934b32cf469dcf58eee3b805a43411f1cacf
200ed15b181e4e5c3e366dec0de3c424338eecfb
hhhhicode/Algorithm_Study_ver.2
/Algorithm_Study_ver.2/058. 이진트리 깊이우선탐색(DFS)/소스.cpp
C++
cpp
1,073
no_license
// template, auto, lambda, function pointer, tuple, typedef || using, unique/shared_ptr, try // unique_ptr #include <iostream> class Problem { // 1. 이진트리 생성 부분 // 2. 순회부분 private: int _n; std::unique_ptr<int[]> nodes = nullptr; public: void facade() { init(); 전위순회(1); std::cout << std::endl; 중위순회(1); ...
9748c40fb0e95caf2c621fe9bad245b5fbb76bb1
eaf5ae5d32806d4e8deffd2de9e505dedc0e5a08
nikakogho/codeforces
/Problems/401C.cpp
C++
cpp
782
no_license
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); int ones, zeroes; cin >> zeroes >> ones; if(ones > 2 * (zeroes + 1)) cout << -1; else if(zeroes > ones + 1) cout << -1; else if(zeroes == ones + 1) { string answer = "0"; for(int i = 0; i < ones; i++) answer += "10"; ...