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
63cc4eba62a70099111b43eb911b6bbeb1b01877
68c6f266d8e8f4335e3f1eabb4d79b8b181852d5
fanwangwang/fww_study
/test/stock00.cpp
C++
cpp
1,713
no_license
#include <iostream> #include "stock00.h" int main() { Stock fluffy_the_cat; fluffy_the_cat.acquire("NanoSmart",20,12.50); fluffy_the_cat.show(); fluffy_the_cat.buy(15,18.125); fluffy_the_cat.show(); fluffy_the_cat.sell(400,20.00); fluffy_the_cat.show(); fluffy_the_cat.buy(300000,40.125)...
59bacb6e3dd0ea7b1c78fcca15e9043325f08d51
712cdc3e1f1862f16a956fe6c6a6ae4da35c5050
AotY/Play_Interview
/MaxArea/main2.cpp
C++
cpp
1,238
no_license
/* * main.cpp * Copyright (C) 2018 LeonTao <LeonTao@Leons-MacBook-Pro.local> * * Distributed under terms of the MIT license. */ /* #include "main.h" */ #include <iostream> #include <vector> #include <string> #include <set> #include <map> using namespace std; //对撞指针方法,初始时使left,right分别置于两边,此时weight差值最大 //left或ri...
a6cf01c54c59a4d022299fcffd2cb9c8ca4cd66e
6c055c752eaa6dd932bf71c9eaf72e902788a045
evandrix/UVa
/12131.cpp
C++
cpp
2,278
no_license
#include <bits/stdc++.h> using namespace std; #define FOR(i, n) for (int i = 0; i < n; ++i) #define IN getc(stdin) const int MAXPLEN = 1024, MAXW = 10240; struct word { int l; char w[128]; } dict[10048]; int readString(char *s) { char c; int cnt(0); for (c = IN; !islower(c); c = IN) ; for (; islower(c); *s+...
3bdf1a4f9551685a70927c72512dfee4f9616191
4aa2d89eb1a20212f70b88ef583de13315939a7e
teamfisk/AgileBreakOut
/src/game/Game/PadSystem.cpp
C++
cpp
18,159
no_license
// // Created by Adniklastrator on 2015-09-10. // #include "PrecompiledHeader.h" #include "Game/PadSystem.h" #include "Core/World.h" #include <iostream> #include <Game/CPad.h> #include <Rendering/CPointLight.h> void dd::Systems::PadSystem::Initialize() { Events::BindKey r; r.KeyCode = GLFW_KEY_RIGHT; r.C...
aa40d4232f6d77ef23f62e7551853b9fc87ae57b
e64f4f475cd1b696dd78fb2bc0a2920a16f919ec
icywindwemade/TestNetwork
/TestNetwork/Classes/MainMenuScene.cpp
C++
cpp
3,422
no_license
// // MainMenuScene.cpp // TestCCB2X // // Created by Rickie Cheng on 6/11/13. // // #include "cocos-ext.h" USING_NS_CC; USING_NS_CC_EXT; #include "MainMenuScene.h" #include "MainMenuSceneLoader.h" #include "Scene2.h" #include "TCNetwork/TCNetwork.h" //------- libNetwork headers ---------- NNetworkManager* GNe...
fa4812a0864a48976da7e707f4a37e1426206afb
e0146943578c74b4d522d4f9b1f170c09b5d3f21
nashanas/wagerr
/src/qt/walletframe.cpp
C++
cpp
7,367
permissive
// Copyright (c) 2011-2013 The Bitcoin developers // Copyright (c) 2016-2018 The PIVX developers // Copyright (c) 2018 The Wagerr developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "walletframe.h" #include ...
f226b9ff370a468ce0931406e76869d80ce14cca
8c88b9394bb5c17311be44963cf8735efcace78d
wontonst/oop-arduino-robot
/libraries/irsensor.cpp
C++
cpp
1,369
no_license
#include "irsensor.h" IrSensor::IrSensor(int pin) { this->pin = pin; } void IrSensor::setup() { } void IrSensor::debug() { while(true) { Serial.print("Raw: "); Serial.print(this->getDistanceCm()); Serial.print("Sampled: "); Serial.println(this->getDistanceCmSampled(10)); } } int IrSensor::getLastRaw() { r...
08ddfa1aad30d365080983059415d5110bf1c480
f89ae370169ccc21581b916a7ea83d7109f812a1
UtkarshChaurasia/Data-Structures-Algorithm-Specialization
/Algorithmic-Toolbox/Week-2/fibonacci-optimized.cpp
C++
cpp
237
no_license
#include<iostream> #include<vector> using namespace std; int main() { int n; cin>>n; vector<int64_t>fib(n+1); fib[0]=0; fib[1]=1; for(int i=2;i<=n;i++) { fib[i]=fib[i-1]+fib[i-2]; } cout<<fib[n]; return 0; }
c1227ec8a357d13bf271406193d34b16a89adbba
6e305204ec3e9a8690ce2950acff890a389ce807
RenjieChiang/myLC
/JZ-Offer/offer32_levelOrder.cpp
C++
cpp
624
no_license
// // Created by 10372 on 2021/7/28. // #include "offer32_levelOrder.h" #include "deque" std::vector<int> offer32_levelOrder::levelOrder(TreeNode *root) { if ( root == nullptr ) return std::vector<int>(); std::deque<TreeNode*> myQue; std::vector<int> result; myQue.push_back(root); while ( !myQue.em...
737b08fb9bb24a7d33ab352557f82373206a9210
807ab385a0f6476296e91228d069cac5fdca02fa
chuenfaiy/rocketmq-client-cpp
/test/src/common/ValidatorsTest.cpp
C++
cpp
2,792
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 You under the Apache License, Version 2.0 * (the "License"); you may ...
f47b4e8622f67950696f8249b2a851b8ab9d5cdb
8545bc94e546ffda8e7235aa37aaf84f0b86b4df
nihui/tensorflow
/tensorflow/core/profiler/utils/group_events_test.cc
C++
cc
13,607
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...
7c657f616e71e8c4641d371bb2e5679a57fe708b
5fd6a3cebdaa771e39edd242e195c44d77f2be3b
itayo/progresser
/taskcountup.cpp
C++
cpp
251
no_license
#include "taskcountup.h" #include <thread> #include <iostream> taskCountUp::taskCountUp(CallbackFunction f) { m_Cb=f; } void taskCountUp::run() { std::this_thread::sleep_for(std::chrono::seconds(1)); std::cout << "TOCK"; m_Cb(); }
c24b4caa1e852ca31f923f371809255c338ea90f
565eedacc92954e2ba56bbe38a13af8e4ab45657
GeraDNG/VisionRobotica
/C01_Negative_Image/Negative.cpp
C++
cpp
7,311
no_license
//----------------------------------------------------------------------------// // Template for reading portable gray map files (*.pgm) // // // // RickWare ...
f9849d9ba87127289e6c2ac23552606386ea8874
3401d14a80f454f83f10b8824e7054affe30daef
korntewin/catboost
/catboost/libs/algo/plot.cpp
C++
cpp
7,233
permissive
#include "plot.h" #include <library/threading/local_executor/local_executor.h> void TMetricsPlotCalcer::ProceedMetrics(const yvector<yvector<double>>& cursor, const TPool& pool, const yvector<float>& target, ...
bb8dcb63dc1b2dee7ef36b1ad462ba25db04670f
dbb2f44bcd4ca8bd2b354c067a54ea6800e65c49
warrenween/Elastos
/Sources/Elastos/Frameworks/Droid/Base/Services/Server/src/elastos/droid/server/power/CMountShutdownObserver.cpp
C++
cpp
1,035
permissive
//========================================================================= // Copyright (C) 2012 The Elastos Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // ...
0c0121d859d6c44d8f9251a049a0c6b08a199094
4784c0734e3fda993c619e5ffef154477bcbe685
CU-0xff/juliet-cpp
/000/099/880/CWE401_Memory_Leak__new_array_int64_t_13.cpp
C++
cpp
4,475
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE401_Memory_Leak__new_array_int64_t_13.cpp Label Definition File: CWE401_Memory_Leak__new_array.label.xml Template File: sources-sinks-13.tmpl.cpp */ /* * @description * CWE: 401 Memory Leak * BadSource: Allocate data using new[] * GoodSource: Point data to a stack b...
1f896cc4fdc8565fd3b92e2263d4e14aea310c42
180085c2b4b9b41a6a041ff164fe301d245c7011
orliag/Lab_5
/Lab_5.cpp
C++
cpp
3,477
no_license
#include <iostream> using namespace std; class rbuf { private: int n = 8; int head = 0, tail = 0; int avail = 0; int* byte = new int[0]; void inc_h() { if (head == n - 1) { head = 0; } else { head++; } } void inc_...
9eadfe0d1338f243be9fc2a69f35610c4f811dd4
d9ddcf25a8b7e883b1bd8e16efb712abb0b68be2
neuromorphic-paris/hibiscus
/source/calibration.hpp
C++
hpp
27,184
no_license
#pragma once #include "../third_party/json.hpp" #include <algorithm> #include <array> #include <functional> #include <iomanip> #include <iostream> #include <numeric> #include <sstream> #include <vector> /// hibiscus bundles tools to build a psychophysics platform on a Jetson TX1. namespace hibiscus { /// calibrat...
a418834f1ba3f6fc6872ff031ebb79b95816654f
920ab2cb2c12f402c305022c6acf2cb563aa2b33
CKWindowsProject/PresentMon
/PresentMon/MainThread.cpp
C++
cpp
9,785
permissive
// Copyright (C) 2019-2021 Intel Corporation // SPDX-License-Identifier: MIT #include "PresentMon.hpp" #include "../PresentData/TraceSession.hpp" enum { HOTKEY_ID = 0x80, // Timer ID's must be non-zero DELAY_TIMER_ID = 1, TIMED_TIMER_ID = 2, }; static HWND gWnd = NULL; static bool gIsRecording = fal...
883b40a2eae7ebb2a8c64184302e293d301d389b
01b28fb372d10f57017047c921e65ad27a10e8ae
FOSS-Pulchowk/Chess960
/ChessProject/main_BASE_23752.cpp
C++
cpp
1,422
no_license
#include <iostream> #include <SDL.h> #include <SDL_image.h> #include "Graphic.h" #include "chess.h" //#include "rook.h" int i = 0; using std::cout; using std::cin; int main(int argc,char*args[]) { Graphic myGraphic; string move; string tempSelection = "0"; // extra haleko Board myBoard[8][8]; OnePiece noPiece("whi...
a3323756af4ccb937d5d49ffe19a0e9fa3ed4918
9a71c8665da41068c82b56db01cba351705343ea
CogMachines/hyp
/sdl/Hypergraph/DeferAddArcs.hpp
C++
hpp
1,551
permissive
// Copyright 2014-2015 SDL plc // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing,...
bc16e524c68f5c6c647e09446e772653877df04b
54625c224f246cd55b6d03c75849ef38b489a676
chunchou/ACM
/CF/DP/CF 2B The least round way.cpp
C++
cpp
3,908
no_license
/* 题目: 方格中有数,求从左上到右下所经过的格子的数相乘时最少后缀0的路径 分析: DP。只用考虑2和5的个数。另外需要注意存在0的情况。 */ #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int maxn = 1005; const __int64 inf = 2e16; #define debug puts("hrer"); __int64 a[maxn][maxn],b[maxn][maxn],c[maxn][maxn],n; __int64 dp[maxn][maxn],pre[max...
a7097e1084abd63e6964d10f7ccac6cdb258507d
6a07fcd54a5604255cdf4653d58d72066fed306a
jlovelock/DungeonGen
/magic/lvl_2.cpp
C++
cpp
690
no_license
#include <spells.h> #include <defines.h> #include <conditions.h> using namespace std; ///TODO separate attack rolls for each ray void Spell::scorching_ray(){ _name = "scorching ray"; level = 2; range = 120; attack_roll_required = true; num_damage_dice = 6; damage_die = 6; damage_type = ...
a3b10c10cac00ba609ea5323efa8d4f0131470ba
232302228cb5cc04bc22a91c6d90c038864608d9
nkshigeru/crossmidi
/src/midi-chrono/BPMPanel.cpp
C++
cpp
1,560
permissive
#include "BPMPanel.h" enum { ID_ = wxID_HIGHEST, ID_DIGIT_100, ID_DIGIT_10, ID_DIGIT_1, }; wxBEGIN_EVENT_TABLE(BPMPanel, wxPanel) EVT_TEXT(ID_DIGIT_100, BPMPanel::OnKey100) EVT_TEXT(ID_DIGIT_10, BPMPanel::OnKey10) EVT_TEXT(ID_DIGIT_1, BPMPanel::OnKey1) wxEND_EVENT_TABLE() BPMPanel::BPMPanel(wxWindow* parent, ...
72083b2ce6c2ac0a2e5c7caa9b04e795e2c94143
dd7ab9fda82009701f353d6fb6ad42c553648851
southdy/Nano
/Library/Source/Nano/Files/NFile.cpp
C++
cpp
14,888
permissive
/* NAME: NFile.cpp DESCRIPTION: File object. COPYRIGHT: Copyright (c) 2006-2021, refNum Software All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code m...
8103a0f17583c7ebdcb9d526b1df20d6794bc214
4086e1eb99efc1e3afad741458851667b8733f9c
mcstarioni/OBOSSANIY-CURSACH
/inclusion.cpp
C++
cpp
335
no_license
#include "inclusion.h" #include "ui_inclusion.h" Inclusion::Inclusion(QWidget *parent) : QWidget(parent), ui(new Ui::Inclusion) { ui->setupUi(this); } Inclusion::~Inclusion() { delete ui; } void Inclusion::on_cancelB_clicked() { emit cancel(); } void Inclusion::on_pushButton_clicked() { emit...
c47b78c554f41e6311943354592c1fe1e3534a08
7a3543f03645d3932d028a29c6085375603fd10b
vahehakob/cplusplus-snippets
/interface.cpp
C++
cpp
430
permissive
#include <iostream> class IDemo { public: virtual ~IDemo() {} virtual void OverrideMe() = 0; }; class Parent { public: virtual ~Parent(); }; class Child : public IDemo { /* public: virtual void OverrideMe() { //do stuff }*/ }; int main (int arg...
953b75cfb6cf2064e1d82736118c01f146216ae6
c2fffaebf6403a0cca6e0d9308ea04b66101361a
R-aryan/Basics-Data-Structures-And-Algorithms
/Bitmasking/tavas_saDDas.cpp
C++
cpp
389
permissive
#include<iostream> #include<cstring> #define ll long long using namespace std; int main(){ ll ans=0; char a[20]; cout<<"Enter a number...\n"; cin>>a; int pos=0,len,i; len= strlen(a); ans=(1<<len)-2; for(i=len-1;i>=0;i--,pos++){ if(a[i]=='7'){ ans+=(1<<pos); }...
64ce151715fbe7d29104d52da5a2bb2ee3e6acb2
f339f2e630c40f5d0db8b97bc6f5991ecee6e0ae
A4567/haiku
/src/ofApp.cpp
C++
cpp
4,364
no_license
#include "ofApp.h" // using http://www.datamuse.com/api/ //-------------------------------------------------------------- void ofApp::setup(){ sylA = 0; sylB = 0; sylC = 0; alphabet = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}; numb...
82da99a374eb2ac7ddb9f6db360407d458727f62
da14f1f63138856a8ebf517d309728c1b333b218
randomwalk10/my_leetcode_solutions
/71_Simplify_Path.cpp
C++
cpp
2,172
no_license
/* Given an absolute path for a file (Unix-style), simplify it. Or in other words, convert it to the canonical path. In a UNIX-style file system, a period . refers to the current directory. Furthermore, a double period .. moves the directory up a level. For more information, see: Absolute path vs relative path in Linu...
c554e4890efb72e980bcdc0244c226a8b38645d5
fe660d298e0e9bb35a6879a905c7c10886834b17
johndam/VTK
/Wrapping/PythonCore/PyVTKExtras.cxx
C++
cxx
4,527
permissive
/*========================================================================= Program: Visualization Toolkit Module: PyVTKExtras.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is d...
e9e76f5abc362945f22cc128ad2763a173395321
126be5e5fd641e372978f73aa578b07b7e863bb1
linkpark/GroupKeyforInMemoryDatabase
/test/OrderedDictionaryTest.cpp
C++
cpp
3,224
no_license
#include "OrderedDictionary.h" #include <gtest/gtest.h> #include <string> using namespace std; class OrderedDictionaryTest : public ::testing::Test { protected: void SetUp(void) {} void TearDown(void) {} protected: vector<string> origin_data = {"a", "b", "c", "d", "e", "f", "h", "i"}; }; TEST_F(OrderedDic...
03824f247f0e369100da9efd4229499baf9cf377
2cf67f8f502ac3aa62498882d7a2f02da1b9b05d
MSKU-BcRG/tanercoin
/src/qt/editaddressdialog.cpp
C++
cpp
3,927
permissive
// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "editaddressdialog.h" #include "ui_editaddressdialog.h" #include "addresstablemodel.h" #include "guiutil.h" #includ...
e0ae3b1713e508062f7ee222cf1f3559c9fc81f6
f99892ced89ad4251c9bdd64c12aef0106f21a56
patrickstuedi/crailnative
/crail/client/namenode/narpc/narpc_namenode_client.cc
C++
cc
5,574
permissive
/* * CppCrail: Native Crail * * Author: Patrick Stuedi <pstuedi@gmail.com> * * * 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 t...
80ac7f1d7618b05b2d744d90c344da2e6e74f2aa
d7def876b06bfe3b3f376bdbac11c548cb6284d5
boberfly/gaffer
/src/GafferSceneModule/GafferSceneModule.cpp
C++
cpp
3,122
permissive
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2012-2014, Image Engine Design Inc. All rights reserved. // Copyright (c) 2013, John Haddon. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted pro...
8289154079beb0e14d934b45569da5a1cb82259e
d0d14703eb5e0d9f97be872948970c64b92a8e18
MohiniSarwade/Competative-Codes
/ScrambledString.cpp
C++
cpp
796
no_license
#include<bits/stdc++.h> class Solution { public: unordered_map<string, bool>mp; bool isScramble(string s1, string s2) { if(s1.compare(s2)==0) return true; int n=s1.size(); if(n<=1) return false; string s=s1+" "+s2; if(mp.find(s)!=mp.end()) ...
6d2b747772b213ff5b4d9d3310b7358ee4fd262a
dc94929217d5de39a8359c428941259151513deb
jtianling/cocos2d-x
/tools/simulator/libsimulator/lib/runtime/FileServer.cpp
C++
cpp
18,055
no_license
/**************************************************************************** Copyright (c) 2013 cocos2d-x.org http://www.cocos2d-x.org 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 res...
a7bc69c0820cdb9432f5b7492bdcda97e14eaf21
6f5a75165396cd3540e7715a2968c0fe8cd9f58d
leighton676/external_2
/skia/src/images/SkImageDecoder_libico.cpp
C++
cpp
16,624
permissive
/* * Copyright 2006 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkColorPriv.h" #include "SkImageDecoder.h" #include "SkStream.h" #include "SkStreamHelpers.h" #include "SkTypes.h" class SkICOImageDecoder : pub...
ea87c4bede82b3861bcddd217437d30e43419a54
9d7a994579f00b552adb530b9395efecd985f0a6
PaulFSherwood/cplusplus
/clanlib/ClanLib-2.2.8/Tests/Display/HDR/Sources/program.cpp
C++
cpp
1,618
no_license
/* ** ClanLib SDK ** Copyright (c) 1997-2011 The ClanLib Team ** ** This software is provided 'as-is', without any express or implied ** warranty. In no event will the authors be held liable for any damages ** arising from the use of this software. ** ** Permission is granted to anyone to use this software for a...
848b8d3d03569d59d61d5b66858e0a8f74f0d521
c626a61378a96aa0bac55c179e5929d6d42d87ab
TestBigOrg/tile-count
/tile.cpp
C++
cpp
38,357
permissive
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sqlite3.h> #include <sys/stat.h> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <algorithm> #include <fcntl.h> #include <pthread.h> #include <sys/mman.h> #include <limits.h> #include <ma...
45df01ba184170b6351d100608d68b9b625d60de
dcc76552ebc235dd0826cd9fe50dbd81d9ff1762
dhkim9210/Algorithm
/code/example/Codeplus_c++/알고리즘 기초/DP_오르막수_11057.cpp
C++
cpp
551
no_license
#include <iostream> using namespace std; long long d[1001][10]; long long mod = 10007; int main() { int n; cin >> n; for (int i = 0; i <= 9; i++) { d[1][i] = 1; } for (int i = 2; i <= n; i++) { for (int j = 0; j <= 9; j++) { for (int k = 0; k <= j; k++) { ...
8286725ebbb6c8a5d4359905a5c29bac7ab1cd3a
aa4c9a67c6b3e63744306763955f69b868da4308
shoerob/BladeofBetrayal2
/Steph/EnemyCrash.cpp
C++
cpp
11,773
permissive
// EnemyCrash.cpp: implementation of the EnemyCrash class. // ////////////////////////////////////////////////////////////////////// #include "EnemyCrash.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction /////////////////////////////////////////////////////////////...
220d432beb4ebf596fcf5d743910532eff918551
31894c85a462b4f9f21404c3fae7d22e36efd0ec
Godotcoffee/AlignGraph2
/PAGraph/src/main/pagraph.cpp
C++
cpp
13,940
no_license
#include <unordered_map> #include <map> #include <fstream> #include <regex> #include <chrono> #include <utility> #include <args.hxx> #include <align/MummerAlignDatabaseV2.hpp> #include <graph/UnionSet.hpp> #include "seq/AutoSeqDatabase.hpp" #include "graph/PABruijnGraph.hpp" #include "graph/PAlgorithm.hpp" ...
8754b3e5a496643bf9e3ee2f292fffe9dc051f8a
0bf598fa0c7c2986fda3a2c04e8e488f1e7f0471
thelokeshgoel00/Competitive_Programming
/CodeChef/CHFNSWAP.cpp
C++
cpp
1,146
no_license
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long int t,n,i,j,sum1,sum2,m,diff,a,b,ans; cin>>t; while(t--) { cin>>n; m=pow((n*(n+1)*0.5)+0.25,0.5)-0.5; sum1=m*(m+...
988cd91c708efdb3e721b0f6b192d0be1d038cbe
42affddfa661b2b78d67b7e35ff182a2b953a70e
joselynzhao/ALGORITHM_PROCTICE
/2016.cpp
C++
cpp
446
no_license
#include <iostream> #define N 100 using namespace std; int main(){ int n; int a[N]; while(scanf("%d",&n)!=EOF){ if(n==0)continue; int minindex=0; //初始化下标为0的数最小 for(int i=0;i<n;i++){ scanf("%d",&a[i]); if(a[minindex]>a[i]){ minindex=i; } } int temp=a[minindex]; a[minindex]=a[0]; a[0]=temp;...
65b18b5d6936a0b83ca9cd2c940e291b603b1c2e
09ed0c884d23ae17c0d2a013fbec9c9a9d10e5ea
yrnkrn/zapcc
/lib/Target/ARM/ARMFastISel.cpp
C++
cpp
108,833
permissive
//===- ARMFastISel.cpp - ARM FastISel implementation ----------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
a2148e0b758dfc700d12440715f574f5eaba263b
b08a5e6a9ef20dbc8cb01aa023c7a9093e7b2873
TheOtherMorzie/2017FuzzyLogicLibrary
/FuzzyLogicLibrary/FLObject.cpp
C++
cpp
245
no_license
#include "FLObject.h" FLObject::FLObject() { } FLObject::~FLObject() { } std::weak_ptr<FLSystem> FLObject::getSystem() { return m_system; } void FLObject::setSystem(std::weak_ptr<FLSystem> sys) { m_system = sys; }
6d578553f8b934ce7d05cdbf2342df8cb74c3af5
b36738890e6176023fad862db2141284b45c60aa
jamiltron/Conway
/InputParser.cpp
C++
cpp
2,080
no_license
#include "InputParser.hpp" #include <boost/algorithm/string.hpp> #include <boost/range/algorithm_ext/erase.hpp> #include <fstream> #include <iostream> /** * Given command-line input, return the points either from a life file, or the * raw points entered. * TODO: handle errors better, validate input, etc. */ std::v...
c2fad8399f9d5724aeb5e02405472f57c5a2ef3b
bcee06277e5834cb6507ddd6afc07c80d9cfb159
SonyaSmalley/SmalleySonya_CSC5_40514
/Proj/Project 2/Prepping to Make the Game/Create Property Cards/main.cpp
C++
cpp
6,066
no_license
/* * File: main.cpp * Author: Sonya Smalley * Created on June 3, 2020, 9:07 PM * Purpose: Create title deed cards for each property */ //System Libraries #include <iostream> #include <fstream> using namespace std; //Global Constants - No Global Variables //Only Universal Constants, Math, Physics, Conversions, H...
6fee3e62fd0a717c2ec2c4e3e3e324a3aacf78f4
4b1e178c9b874d05b91f32ff4612b39cc5a8466b
kzampog/cilantro
/examples/image_point_cloud_conversions.cpp
C++
cpp
3,558
permissive
#include <iostream> #include <cilantro/utilities/point_cloud.hpp> #include <cilantro/visualization.hpp> void color_toggle_callback(cilantro::Visualizer& viz, cilantro::RenderingProperties& rp) { if (rp.pointColor == cilantro::RenderingProperties::noColor) { rp.setPointColor(0.8f, 0.8f, 0.8f); } else { rp....
7aaecee3d3b358d4c6c7032c8ce259437e9f2f8d
351378f7a1eb2f059591bbfa83c7f377686fbc19
DeepWolf413/additional-native-data
/rdr2/0x1A5AA1208AF5DB59.cpp
C++
cpp
1,116
no_license
// train_robbery4.ysc @ L40626 void func_883() { PATHFIND::_0xC1799FAFD2FDF52B(iLocal_9320[22], 0, 0, 0); PATHFIND::_0xC1799FAFD2FDF52B(iLocal_9320[23], 0, 0, 0); PATHFIND::_0xC1799FAFD2FDF52B(iLocal_9320[24], 0, 0, 0); PATHFIND::_0xC1799FAFD2FDF52B(iLocal_9320[25], 0, 0, 0); PATHFIND::_0xC1799FAFD2FDF52B(iLo...
a99002b394b9ae21d53355f83a0f33ee506ffc6a
331d44b060605dfe593b9adb1503afd34ff4d63a
mdouaihy/jaeger-client-cpp
/src/jaegertracing/Tracer.cpp
C++
cpp
8,896
permissive
/* * Copyright (c) 2017 Uber Technologies, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
d9123db9d1dc68c431d62129e922ae5e5761edde
1172d593b55960b18b3f00e55a3947c95d6ca156
AdamRolek500/Classwork
/CS-200/labs/lab_2/Client.cpp
C++
cpp
1,327
no_license
#include "Client.h" #include <iostream> Client::Client() { //ctor } Client::Client(string firstName, string lastName, int id, double balance) { this->firstName = firstName; this->lastName = lastName; this->id = id; if (balance >= 0) { this->balance = balance; } else { ...
52a4aa16a13de5a50d9731adb6ee8eba6d12bfff
12e621ccbb2720b0ac0c524fc24c7b0dba45f4bf
LegendBC/PET
/src/Test/single_rule_test_8_conv2group.cc
C++
cc
1,975
permissive
#include "generator.h" #include "graph.h" #include "operator.h" #include "search_engine.h" #include "tensor.h" #include <cstdlib> #include <iostream> const int n = 1, c = 2, h = 4, w = 4; const int f = 4, r = 3, s = 3; int main() { auto g = new tpm::Graph(); auto i0 = g->tensor({n, c, h, w}); auto w0 = g-...
f6250d30e6251e99003392ad6f3d70c657b477bb
aa4fda888ffa82c860e8b92f4b8ca042b0248bdb
szebniok/wdi-cw
/cw03/5.cpp
C++
cpp
1,345
no_license
#include <iostream> #include <cmath> int main() { const int N = 5; int result[N]; for (int i = 0; i < N; i++) result[i] = 0; int factorial[N]; for (int i = 0; i < N - 1; i++) factorial[i] = 0; factorial[N - 1] = 1; for (int b = 1; b <= N; b++) { int b_digits[N]; for (int k = 0; k < N; k++) b_digits[k]...
3be672b28a007e7acae83682f550883e3090b9ac
655f4291a1e25e1ec3b37be29e2c38a6c3f1e987
sacrificerXY/CMSC170-sliding-puzzle
/Array16.cpp
C++
cpp
2,540
no_license
//#include "Array16.h" #include <cassert> #include <limits> #include <bitset> #include <sstream> #include <iomanip> #include "Array16.h" using namespace std; constexpr int SIZE = 4; constexpr uint64_t MAX = numeric_limits<uint64_t>::max(); constexpr uint64_t B = 0b1111; //void Array16::set(int pos, int val) //{ //}...
7cce32a3bbdbd3bb5f437f192f34be4df854247f
f65c13b0b5b3f446736c3e41f49a47c48d8fbbce
aplqo/exercises
/bzoj/5102-TestRunner.cpp
C++
cpp
850
no_license
#include <cstdlib> #include <iostream> #include <random> #include <string> using namespace std; random_device rd; int n; string pre, sn; int main(int argc, char* argv[]) { if (argc > 2) n = atoi(argv[2]); else n = 1000000; pre = argv[1]; sn = to_string(n) + " "; uniform_int_distribution<int> src(1, ...
c0bec919e521eedce2859ae974f966cf9ae5cb9e
62d94152d9f6fd30e5908b3ca8b413cf027d2a8a
izumo27/competitive-programming
/AtCoder/ABC/001-010/007/b.cpp
C++
cpp
444
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define REP(i, n) for(int i=0; i<n; ++i) #define FOR(i, a, b) for(int i=a; i<b; ++i) #define FORR(i, a, b) for(int i=b-1; i>=a; --i) int main(){ ...
f07ead03332d4582402d52a21f03e021a7b18f77
242dfb33f1e2ce7b1a051026af528131fcc16531
duanmu23/SOFA-bellow
/SOFA_Custom_CollisionModels-master/ScytherCubeModel.cpp
C++
cpp
13,649
no_license
#include <algorithm> #include <cmath> #include <sofa/core/ObjectFactory.h> #include <sofa/core/visual/VisualParams.h> #include <sofa/simulation/Simulation.h> #include "ScytherCubeModel.h" namespace SofaInterface { using namespace sofa::defaulttype; int ScytherCubeModelClass = sofa::core::RegisterObject("Collisi...
6eace5072ca8c26a71cd20da454417e52c75db2e
b915005ec989eca7d279373faffe8593c3d9c5ee
Abhay4/Algorithm
/LeetCode/LRUCache.cpp
C++
cpp
2,076
no_license
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <string> #include <cstring> #include <unordered_map> #include <list> using names...
848acccdb6b0ff9de12fc838467d02978ead4e60
d1dc1d6a7a9ec21097a824063e6ce25ef2526efe
schweinebauch/control-toolbox
/ct_rbd/include/ct/rbd/robot/costfunction/TermTaskspacePosition.hpp
C++
hpp
6,177
permissive
/********************************************************************************************************************** This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich. Licensed under the BSD-2 license (see LICENSE file in main directory) ****************...
1fa814806ee52e988df252e6173e7a7a18adeca7
ee0922bcef0c17bf32140d897b845a6fe1ecef62
Lencerf/thoughts_bucket
/ScientificC++/ch7/Ebook.hpp
C++
hpp
211
no_license
#ifndef EBOOKHEADERDEF #define EBOOKHEADERDEF #include <string> #include "Book.hpp" class Ebook: public Book { public: Ebook(); Ebook(std::string v); std::string hiddenUrl; std::string version; }; #endif
6c9b683fc7c8587896ab73520b19b37ece336320
e8a9463539c00cf79ee4e4a38e86aec711f941f3
kunhuicho/crawl-tools
/codecrawler/_code/hdu5033/16215357.cpp
C++
cpp
8,350
no_license
// hdu5033 Building 单调队列 // // 题目大意: // // n栋大楼,有一个高度h和位置x,现在有一个人高度为0,有q个询问 // 每个询问有一个位置x,求在位置x能看到天空的最大的角度。 // // 解题思路: // // 首先得想到将q个询问的位置作ä¸...
ef59c646f2efc5c7c039a01868bdb93f27bcc360
69fb1cc55a60bcab53031883bfa82bbb931639ec
seungjae711/SJ_PROJECT
/PA1/main.cpp
C++
cpp
2,510
no_license
#include "BST.hpp" #include <iostream> #include <algorithm> #include <vector> #include<fstream> #include<string> /** * IMPORTANT!! DO NOT CHANGE THE LINES THAT DO I/O BELOW. * * Note that size, height, and name are local variables in main that you * should update accordingly. Also note that actor/actress names...
e9b1dbb18811ba4c5ee1a09473f1ab017b0e5a3d
32d7078a8e7cb6657718803a782512edb7c8d883
cuiwulin/eSDK_eLTE_SDK_Windows
/src/source/eLTE_Player/eLTE_Player/eLTE_PlayerCtrl.cpp
C++
cpp
94,665
permissive
/*Copyright 2015 Huawei Technologies Co., Ltd. All rights reserved. eSDK is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable...
0dfc11518215434f192214e530a18b5106059cd1
89c9d5d31a9790393bbc41323ccfad0b1f3964ed
Trailblazer01010111/chromium
/chrome/browser/prefs/browser_prefs.cc
C++
cc
34,668
permissive
// Copyright 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 "chrome/browser/prefs/browser_prefs.h" #include <string> #include "base/metrics/histogram_macros.h" #include "base/trace_event/trace_event.h" #...
f32cc6b491f9b5f507f490f9407e4014e777499a
781b5063497c94b021ec88879a7e1c3dc7f958ac
dsTA2017/yang
/sobelcv/2sobel.cpp
C++
cpp
4,092
no_license
#include <iostream> #include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, const char * argv[]) { /* Mat dst1 = imread(argv[1],CV_LOAD_IMAGE_GRAYSCALE); Mat img; copyMakeBorder(dst1, img, 1, 1, 1, 1, BORDER_CONSTANT, 0); for(int height=1; height<im...
f2bf760a92c953dbfb754149d94a10f84a71ebed
87b40a8d635042ce2ea215246652973e6bcae6e4
tao558/kwiver
/vital/tests/test_metadata.cxx
C++
cxx
4,641
permissive
/*ckwg +29 * Copyright 2020 by Kitware, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of...
2fcfef1535228b597c4a11ee662e392e1c360e5f
f57e1623912da9ba221e185ad316339dd5589d33
Wayne881004/UVA
/1-star/UVA591/591.cpp
C++
cpp
649
no_license
#include<bits/stdc++.h> using namespace std; int main(){ #ifdef DBG freopen("input.in","r",stdin); freopen("output.out","w",stdout); #endif int number,sum,average,group=1,total; int wall[50]; while(scanf("%d",&number)){ if(number == 0) break; for(int i = 0 ; i < number ; i++){ cin >> wa...
574dc78bf79b3a10012c396e69c58f7495825e1f
36aff0e628973180cdff2ed93a24556de891e8ad
vm-t-yui/school
/DxMyLib/DiectX9/07.DxMyLib(class3)/Device.cpp
C++
cpp
2,437
no_license
//----------------------------------------------------------------------------- // @brief グラフィックデバイス. // 2016 Takeru Yui All Rights Reserved. //----------------------------------------------------------------------------- #include "Device.h" //-------------------------------------------------------------------------...
314e115fcc84c448fd87e2db5cb495144e701cdb
1f34c5f440d60434b73852e9a5acc0093762a8d6
thekenu/Consolidated-Firmware
/boards/shared/Test/Src/Test_SharedClock.cpp
C++
cpp
2,377
no_license
#include "Test_Shared.h" extern "C" { #include "App_SharedClock.h" } class ClockTest : public testing::Test { protected: void SetUp() override { clock = App_SharedClock_Create(); } void TearDown() override { TearDownObject(clock, App_SharedClock_Destroy); } struct Clock *clock; }; TEST_F(ClockTest, g...
1950448010557e0f9c9077f42c5ad739d53e0002
ec9f7941f77afe66e963aeade0be5de568574ce2
gzq942560379/ICSE
/exp_7/bert/tf-implementation/tf-add-batchmatmulv2/mlu_lib_ops.cc
C++
cc
85,423
no_license
/* Copyright 2015 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...
366e688022871ca39c7887e9a0e80bd2d3e10f39
fc35237fb94f6b62de1ff13fa4757fb3b90bbefa
scalablecory/runtime-priv
/src/coreclr/src/vm/appdomain.hpp
C++
hpp
104,655
permissive
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /*============================================================ ** ** Header: AppDomain.cpp ** ** ** Purpose: Imple...
8b5c29d92e3fd4daeaef38ecc29020d5f6463fe4
32d70e570862755c7ed1040b70cd8dd63ce4c8d2
iboB/maibo
/code/common/maibo/EntryPoint.cpp
C++
cpp
1,629
permissive
// MaiBo // Copyright(c) 2015 Borislav Stanimirov // // Distributed under the MIT Software License // See accompanying file LICENSE.txt or copy at // http://opensource.org/licenses/MIT // #include "Application.h" #if defined(_WIN32) # include <Windows.h> # include <stdio.h> # include <io.h> # include <fcntl.h>...
eed12673d9d46e5a362909ddbde8396569c59c21
e61f84c7e84486507f93b76d2926e0796ad797ca
BaiMoHan/AlgorithmUpCpp_ING_20200701
/算法笔记/第4章_入门篇_算法初步/L_4_4.6.3_1.cpp
C++
cpp
242
no_license
#include<stdio.h> #include<stdlib.h> #include<time.h> int main() { int i; //计数器变量 srand((unsigned)time(NULL));//初始化随机数种子 for(i=0;i<10;i++) printf("%d ",rand()); //随机打印十个随机数 return 0; }
76b6c4029512ddb6c8573b33b8d789f7a559d3c7
ac1ffa9c360870e1055666549cef0918706e8a34
angelfish91/LeetcodeLearning
/XuZeng/22.cpp
C++
cpp
639
no_license
class Solution { public: void backtrace(int left, int right, int n, string& s, vector<string>& res) { if (left == n && right == n) { res.push_back(s); return; } if (left < n) { s += "("; backtrace(left + 1, right, n, s, res); s.pop_...
f37be31870b9a8f529ef9b7493a5e583def990cb
87ab2be3c48500ba33927d0eb9676d3a0649cbde
ysei/llvm-project
/clang-tools-extra/clang-tidy/ClangTidyModule.cpp
C++
cpp
1,336
permissive
//===--- tools/extra/clang-tidy/ClangTidyModule.cpp - Clang tidy tool -----===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
c1033da20d483e81c1d2d6ca9bf639def7c1f2f3
afcbd613b2b0356df3f95f91c3b51d4c887e018a
eiz/CMake
/Source/ctest.cxx
C++
cxx
8,063
permissive
/*============================================================================ CMake - Cross Platform Makefile Generator Copyright 2000-2009 Kitware, Inc., Insight Software Consortium Distributed under the OSI-approved BSD License (the "License"); see accompanying file Copyright.txt for details. This softwa...
096d61e9dea42cc61df5b1fbc5aba4f59dc89f39
e397eacaa98ed00f84dd3c604dc27ad4c845ed6f
dai543103/ServerFramework-1
/115_RechargeServer/ServerStatistic.cpp
C++
cpp
958
no_license
#include <string.h> #include "LogAdapter.hpp" #include "ServerStatistic.hpp" using namespace ServerLib; CServerStatistic* CServerStatistic::Instance() { static CServerStatistic* pInstance = NULL; if (!pInstance) { pInstance = new CServerStatistic; } return pInstance; } CServerStatistic::CServerStatistic() ...
aa9eff87e85c1b1a6882db67f098910aa2d71432
c8eab61b54b665e02d1de6f23d86ac94558e7bc3
runom/AtCoderSubmissions
/AtCoder/abc024/abc024_c.cpp
C++
cpp
978
no_license
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <tuple> #include <unordered_map> #include <unordered_set> ...
4ee5eda369004282618ef5859c03737372156961
b58604759248e9c7b05d7e80fed854b6fdc15387
Jim00000/ReadSourceCode
/src/peb/peb.cpp
C++
cpp
2,657
permissive
#include "peb.hpp" #define _WIN32_WINNT 0x0A00 #define _AMD64_ #include <string> #include <iostream> #include <stringapiset.h> #include <intrin.h> #include <winternl.h> namespace { template <typename T> inline auto isEven(T value) noexcept -> bool { return !(value & 0); } void removeStr...
b3ffd1c352525515fec2f1dbec8370491786c39e
f4fa65cd2ae23d56e49700415d0e026237424e2a
rangaeeeee/codes-hackerrank
/algorithms/warm up/a-very-big-sum-English.cpp
C++
cpp
364
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main(){ int n; long long result = 0; cin >> n; vector<int> arr(n); for(int arr_i = 0;arr_i < n;arr_i++){ cin >> arr[arr_i]; result += arr[arr_i]; ...
0e7faf22f0e2f357f991f71b9c1e979838d87b6e
88793b7e0b860e661af46e5c8af9b6c0398e9666
dyg540/chromium
/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
C++
cc
31,310
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/base_switches.h" #include "base/callback_helpers.h" #include "base/command_line.h" #include "base/macros.h" #include "base/path_service...
a26f777b4c34d3b5370d7215cd28f2a5ac281a06
361c998340b094e4a56221dce3feb1c77aaa3178
daviscoder/2016_Leetcode_Pass2
/311. Sparse Matrix Multiplication.cpp
C++
cpp
526
no_license
class Solution { public: vector<vector<int>> multiply(vector<vector<int>>& A, vector<vector<int>>& B) { vector<vector<int>> C (A.size(), vector<int> (B[0].size(), 0)); for (int i = 0; i < A.size(); i++) { for (int j = 0; j < A[0].size(); j++) { if (A[i][j]) { // Only mult...
a56866f41aa54a5eceecfdda981ec7e545bd99f9
44c19e3f927fe501fc2a0fcaf1852f4f77888a4a
aranha96/APA-Cpp
/SelectionSORT.cpp
C++
cpp
1,062
no_license
#include <stdio.h> void selectionSort(int a[], int n) { int i, j, min; for (i = 0; i < n-1; i++) //percorre o array. { min = i; for (j = i+1; j < n; j++) { if (a[j] < a[min]) // compara o primeiro elemento do array com os demais para encontrar um...
d49f0faae1da7c9a2bea1e9c3d5092b215714a55
5bf1429512aa554de440b29c104f949dbcc9f63d
Hissane/Competitive-Programming
/JuniorTraining/CF160-D2-A.cpp
C++
cpp
382
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int n, var, sum = 0, goal, res = 1; vector<int> v; cin >> n; for(int i = 0; i < n; i++){ cin >> var; v.push_back(var); sum += var; } sort(v.begin(), v.end(), greater<int>()); cout << endl; int i = 0; goal = v[i]; while (goal <= ceil(sum / 2)){ ...
c89ed10bf92470867c5357c0b52b0a5b6d2a6cff
89aff32da113572988208c08e5013e4a97097aec
dk-dev/rethinkdb
/src/parsing/utf8.hpp
C++
hpp
4,095
permissive
// Copyright 2010-2014 RethinkDB, all rights reserved. #ifndef PARSING_UTF8_HPP_ #define PARSING_UTF8_HPP_ #include <string> #include <iterator> #include "errors.hpp" class datum_string_t; namespace utf8 { // Counts the number of codepoints in a UTF-8 string. size_t count_codepoints(const datum_string_t &); size_t...
3ba6398b9afb4b6c716092309ad9b8882bb8d8d5
093f8280c84288739282e591f20e54623d3319d0
stevschmid/nsearch
/libnsearch/test/Alphabet/ProteinTest.cpp
C++
cpp
885
permissive
#include <catch.hpp> #include <nsearch/Alphabet/Protein.h> const size_t BitMapPolicy< Protein >::NumBits; TEST_CASE( "Protein" ) { SECTION( "Bitmapping" ) { REQUIRE( BitMapPolicy< Protein >::BitMap( 'C' ) >= 0 ); // E is bitmapped the same as Q REQUIRE( BitMapPolicy< Protein >::BitMap( 'E' ) == ...
94af5a75746be52dc63d53cfbbb6f6ead4c407bb
750c91084bde9c4be06a9734f0abbbd969dcec3c
kamomil/Hackerrank-leetcode
/u/p.cpp
C++
cpp
4,706
no_license
#include <iostream> #include <stdio.h> #include <fstream> #include <cstring> using namespace std; enum state{ READ_LEADING_BYTE, READ_10_BYTE }; class Utf8{ public: virtual void pack_unicode_to_int(unsigned char* unicode,unsigned int* unicode_int) = 0; }; ///// class Utf8_1 : public Utf8{ public: virtual v...
737923d5ebff83da1a89db3f053ddc119b102426
539ed2455d1019967c3a0e74371a91ff7d22de0f
frankie-11/SCUM_SDK7.13.2020
/SDK/SCUM_Beet_classes.hpp
C++
hpp
835
no_license
#pragma once // SCUM (4.24) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass Beet.Beet_C // 0x0000 (0x07...
c9bfbfba5e793cee034ad4192e1f706639807712
f951aefca9dfeee5684628c25d38b1c5f26568aa
ccf19881030/aliyun-openapi-cpp-sdk
/ecs/src/model/ModifyImageAttributeRequest.cc
C++
cc
3,301
permissive
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
efbf5e92bd76a5f0adadb63dd73928dc1d04bd14
520968e6d0c25c6b9f784ace6c8e610b51088425
Samsung/Castanets
/services/audio/public/cpp/sounds/sounds_manager.cc
C++
cc
3,891
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 "services/audio/public/cpp/sounds/sounds_manager.h" #include <memory> #include <utility> #include <vector> #include "base/logging.h" #include "...
81123b42c8b6ad6b58970b54691a725f95ff9959
47f7187ae0f6945eb45c7d3813686513458145e0
mikri2017/SDL_2DPlatformer
/MainHero.cpp
C++
cpp
1,104
permissive
#include "MainHero.h" #include "TextureMgr.h" #include "Debug.h" #include <SDL2/SDL_image.h> MainHero::MainHero() { g_obj_zone = { 0, 0, 0, 0 }; g_obj_real_zone = { 0, 0, 0, 0 }; sprite_file_path = ""; texture_name = "main_hero"; error_text = ""; cur_row = 1; cur_frame = 0; texture_mgr...
f11b7b80274da4069a033c9f4bbc96c39a832818
d51a3bb0bfe173f27e9015f4e1c070be9f8ceedc
fuermobai/Algorithm
/combination.cpp
C++
cpp
821
no_license
#include <iostream> #include <cstdio> using namespace std; namespace comb{ int n,k; int arr[12]; int count; bool arrsame(int site){ if(site>0 && arr[site-1]>=arr[site]) return 0; return 1; } inline void arrprint(){ for (int i = 0; i < k; i++) { printf("%3d\n",arr[i]); } puts(""); count++; } ...
2186a52469c93bd5afa8041e957edf1042eb599a
8bf4a6140271e4f91e41f06ed7054729230375d5
DmitryOlshansky/dsmith
/src/VariableSelector.cpp
C++
cpp
48,853
permissive
// -*- mode: C++ -*- // // Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The University of Utah // All rights reserved. // // This file is part of `csmith', a random generator of C programs. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided t...
47bbabe8e1c6c7cda6584d3470a08a1852c77dfd
ddf021fd048a770cdc3fba0654d8cbd02a55d594
RmMsr/led-countdown
/led-countdown/ClockSetter.cpp
C++
cpp
1,807
permissive
#include "ClockSetter.h" #include <Sodaq_DS3231.h> void ClockSetter::begin() { Serial.println("Console Input sets DS3231 clock"); printCurrentTime(); reset(); nextPart(); } void ClockSetter::proccess() { if ( Serial.available() && currentPart < 7 ) { parts[currentPart] = Serial.parseInt(); currentPa...
920b4b7f7651a21643cc8b2898e0498030f1142e
102307539304b506fb0e4ed34aad376d23106351
sefaAydogan/Projects
/C & C++/Algorithm/HW3/HW3.cpp
C++
cpp
13,132
no_license
/* Student Name and Surname : Muhammed Sefa Aydoğan Student ID: 150150124 */ #include <iostream> #include<fstream> #include <sstream> #include <string> #include <stdlib.h> #include <bits/stdc++.h> using namespace std; /* Global Value holders for max values in the folder */ int max_point=0; int max_assist=0; int max_r...
f97117edb24307320f95885777391cff839298e2
30243f52e2649d14964a570f97e532320eaa9f08
Quenii/adcevm
/soft/zebra-scope-4x/RegAccess.cpp
C++
cpp
7,397
no_license
#include "RegAccess.hpp" #include "RegAccessItem.h" #include "gkhy/mfcminus/Win32App.hpp" #include <QFileDialog> #include <QSignalMapper> #include <QStandardItemModel> #include <QShortcut> RegAccess::RegAccess(QWidget *parent, Qt::WFlags flags) : QWidget(parent, flags) , m_currentStep(-1) , m_bEnable_Slot...
5d8b560edea8307543a5c09162ee09e806b09576
511a5d034b53a3cb4a7a0ebbeb982719c6a94644
DariaTimofte/Project2
/Project2/Header files/Discipline.hpp
C++
hpp
1,074
no_license
// // Discipline.h // Project2 // // Created by Daria Timofte on 07/01/2019. // Copyright © 2019 Daria Timofte. All rights reserved. // #ifndef Discipline_h #define Discipline_h #include "Activity.hpp" class Discipline { public: Discipline(std::string name, Activity* activity); Discipline(std::string nam...
ed49707c4269cb75b8653637ad6f1ab4c422997c
1ea22947d11f479f00ec53493fabaef2297f880a
GabrielDWu/cp-library
/library/numerical/big-integer.hpp
C++
hpp
9,549
no_license
#pragma once /** * Description: Big Integer * Source: https://github.com/indy256/codelibrary/ blob/master/cpp/numbertheory/BigInt.cpp * Verification: https://oj.uz/problem/view/IOI11_parrots */ // base and base_digits must be consistent constexpr int base = 1000000000; constexpr int base_digits = 9; struct Big...