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 |
|---|---|---|---|---|---|---|---|---|
fcfca9002ea3513ed1d76ce65b3617e617a5fa67 | f8fc8c21c1e996fe5f9588faa4d46340b68170ec | Bone111/MusicXMLParser | /Pod/musicFramework/core/elements/Coda.cpp | C++ | cpp | 1,611 | permissive | // MusicXML Class Library
// Copyright (c) by Matthew James Briggs
// Distributed under the MIT License
#include "../../core/elements/Coda.h"
#include "../../core/FromXElement.h"
#include <iostream>
namespace mx
{
namespace core
{
Coda::Coda()
:ElementInterface()
,myAttributes( std::ma... |
43eb61ebb8407cb017ad1dbedc1c3c10bd8399c8 | f53eb6f977cd422adcacf8c3e4bc3149d9fb0d3b | cnyali-czy/code | /luogu/4245-fast.cpp | C++ | cpp | 3,090 | no_license | #define REP(i, s, e) for (int i = s; i <= e; i++)
#define DREP(i, s, e) for (int i = s; i >= e; i--)
#define DEBUG fprintf(stderr, "Passing [%s] in Line %d\n", __FUNCTION__, __LINE__)
#define chkmax(a, b) a = max(a, b)
#define chkmin(a, b) a = min(a, b)
#include <algorithm>
#include <cassert>
#include <iostream>
#in... |
3544375aef4b08225743e9c8a015c18326e65a59 | aff163c1cfc66d3a01a3d6d36555f1eb9a263f6f | lineCode/ArchiveGit | /Clients/Powerhouse/Jungle/GAMEGUTS/SOUND.CPP | C++ | cpp | 10,404 | no_license | #include <windows.h>
#include "proto.h"
#include "sound.h"
#include "wavemix.h"
#include "mmsystem.h"
// The CONSTRUCTOR
//************************************************************************
CSound::CSound(BOOL bUseWaveMix)
//************************************************************************
{
i... |
a25f3aab5a6c5313bb4fedf4833c8e9637304e31 | a4c58c2ae680a4fce4e86e54431f2f0f6d87457d | phlight4fork/Vitis_Libraries | /vision/L2/tests/aie/accumulate/16bit_aie_8bit_pl/xf_accumulate.cc | C++ | cc | 802 | permissive | /*
* Copyright 2021 Xilinx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
8618f40c10c062f92e29d94613b8193721141193 | 1eea4e4bc2956508f1925373e1d4489572b8cde5 | jsarthak/LeetCode | /permutations2.cpp | C++ | cpp | 1,365 | no_license | // Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.
#include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
void backtrack(vector<vector<int>> &ans, vector<int> &temp, set<vector<int>> &col, unordered_map<int, int> &fr... |
88b0a72cd47da8d0d32f21780e9b68007b32a215 | 30515f622f7c18380ab602f5985bcd259a573552 | HuaiyuCai/lartkv5 | /src/perception/pedestrians/multimodal_pedestrian_detection/src/pedfuncs.cpp | C++ | cpp | 13,393 | permissive | /**************************************************************************************************
Software License Agreement (BSD License)
Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
All rights reserved.
Redistribution and use in source and binary forms, with o... |
37e69bfff9061cdbf29f31c8d3bb96c2341bdfa2 | 9858f96bd2ddccf8401c2c70b587133bbde4bab6 | alexandraback/datacollection | /solutions_1480487_1/C++/TheRasmus/s.cxx | C++ | cxx | 843 | no_license |
#include <iostream>
#include <cstdlib>
#include <stdio.h>
int main(int argc, char **argv)
{
FILE *fp_in,*fp_out;
fp_in = fopen("E:\\A-large.in","r");
fp_out = fopen("E:\\data.txt","w");
int t,n,m;
double s[205];
double sum,temp,sum2,temp2;
fscanf(fp_in,"%d",&t);
for(int j=1;j<=t;j++){
f... |
f43f2f63ac49a6d8043a479b5a8b32665eb069bd | 6f9c64d919a342c8d9983e3b679a5bf3ea846de1 | luas13/Leetcode_New | /src/Task Scheduler/Task Scheduler.cpp | C++ | cpp | 1,087 | no_license | class Solution {
public:
int leastInterval(vector<char>& tasks, int n) {
int l = tasks.size();
if (!l)
return 0;
unordered_map<char, int> mymap;
for(int i=0; i<l; i++)
mymap[tasks[i]]++;
priority_queue<int> pq;
for (auto it = ... |
6ea015cae46b05ee44d2851297a309c44300e117 | b770d2e1847713800548104a76cd74be7a831c5a | yachtcaptain23/browser-android-tabs | /chrome/browser/ui/unload_controller.cc | C++ | cc | 15,491 | 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 "chrome/browser/ui/unload_controller.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thre... |
5e2cf4e41fa07fa37006d99030dc8613a9e64b3e | da3c7a3e92da21056df74979b390fed120b6516d | AumPatel2208/Asteroids_OpenGL | /SRC/GameDisplay.cpp | C++ | cpp | 998 | no_license | #include "GameUtil.h"
#include "GUIComponent.h"
#include "GameDisplay.h"
// PUBLIC INSTANCE CONSTRUCTORS ///////////////////////////////////////////////
/** Default constructor. */
GameDisplay::GameDisplay(void) : mWidth(200), mHeight(200)
{
}
/** Construct display with given size. */
GameDisplay::GameDisplay(int w,... |
ee7b5417b4cf225f6573446f00bc81c8de326665 | fa828921869e728a142936b004fc549e61ffa226 | ttyang/sandbox | /sandbox/type_erasure/boost/type_erasure/deduced.hpp | C++ | hpp | 1,484 | permissive | // Boost.TypeErasure library
//
// Copyright 2011 Steven Watanabe
//
// Distributed under the Boost Software License Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// $Id$
#ifndef BOOST_TYPE_ERASURE_DEDUCED_HPP_INCLUDED
#define BOOST_TYPE_ERASURE_DEDUCED_H... |
52496d134b559143efb70c1846006be439b2de63 | e3aaf0ca63c3ad6c00c77cfcbb0e4eac8e3b6de8 | DevUtilsNet/Elas | /TestMFCApplication/TestMFCApplicationDoc.cpp | C++ | cpp | 2,879 | no_license |
// TestMFCApplicationDoc.cpp : implementation of the CTestMFCApplicationDoc class
//
#include "stdafx.h"
// SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail
// and search filter handlers and allows sharing of document code with that project.
#ifndef SHARED_HANDLERS
#include "TestMFCApp... |
51726198de7f855deb4a25cc82a0c9229d905614 | 3d5589a59453cb348dc026ff7664dca885aef164 | albernsurya/compute-runtime | /opencl/test/unit_test/context/driver_diagnostics_tests.cpp | C++ | cpp | 43,661 | permissive | /*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "driver_diagnostics_tests.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "opencl/source/helpers/memory_properties_helpers.h"
#include "opencl/source/mem_obj/mem_obj_helper.h"
#include "... |
06f896d3428d40a7dd6ae1a37a246edf5e2fa40e | 3d5ded72858c54e9880ee5562a38e3e91d64d2b8 | ccdxc/logSurvey | /data/crawl/git/hunk_6302.cpp | C++ | cpp | 814 | no_license | return (e < 3 * x) ? n : n - 1;
}
-int show_bisect_vars(struct rev_info *revs, int reaches, int all, int show_all)
+static void show_tried_revs(struct commit_list *tried)
+{
+ printf("bisect_tried='");
+ for (;tried; tried = tried->next) {
+ char *format = tried->next ? "%s|" : "%s";
+ printf(format, sha1_to_hex... |
c56c173f60ca4d190d4f3c34b99bf8f467300307 | 766bc2e7a6f01fa43cafe4090b0d0d763188575e | Shyamtechm/contrail-controller | /src/bgp/bgp_ribout.cc | C++ | cc | 16,972 | permissive | /*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include <boost/bind.hpp>
#include <algorithm>
#include "sandesh/sandesh_types.h"
#include "sandesh/sandesh.h"
#include "sandesh/sandesh_trace.h"
#include "base/string_util.h"
#include "bgp/bgp_peer_types.h"
#include "bgp/bgp_ribout.h"
#include... |
bf2c152dfc1d77ad6d74093c1f9fcc2463595e73 | 36817fd68f0d45bcc3ea50a6790750ceec0addec | Vladislav-S/cpp-lab5-results | /link.cpp | C++ | cpp | 259 | no_license | #include "Header.h"
using namespace std;
Link::Link(string name) :FileSys(nullptr, name, "link") { ; }
Link::Link(FileSys * fs, string name, FileSys * lnk) : FileSys(fs, name, "link") {link = lnk; }
FileSys * Link::getLink(){
return link;
}
|
18db2b667774fc4e794d8594c84f3f0fc5e900ca | 6465591070d943db7a81a7861a8cd76f717434ba | ikageso1/MAGUROBO | /SecondWorld.cpp | C++ | cpp | 604 | no_license | #include "SecondWorld.h"
#include "SecondStage.h"
#include "Stage.h"
#include "Camera.h"
#include "Player.h"
#include "Character.h"
#include "NormalEnemy.h"
#include "TraceEnemy.h"
#include "M95.h"
#include "JetItem.h"
SecondWorld::SecondWorld(Input* input){
stage = new SecondStage(); // ステージ生成
player = stage->Cr... |
4c2977a16244d772a2c207ba7eba2f85092c37bd | 07b2bf8c9d663b739f92f726aa11987dba47f624 | MarfyFeng/LeetCode-exercises | /17.cpp | C++ | cpp | 1,244 | no_license | #include <iostream>
#include <vector>
#include <string>
#include <assert.h>
using namespace std;
class Solution {
private:
const string letterMap[10] = {
" ", //0
"", //1
"abc", //2
"def", //3
"ghi", //4
"jkl", //5
"mno", ... |
4e9674215eb23379feba38b98c154ebe791c3c42 | f0f68a8e731f61f88e0f983c331314b52f7dc567 | TheTypoMaster/dingler | /image/query/expression/vector_logic_test.cc | C++ | cc | 4,403 | no_license | // Copyright 2011 Google Inc. 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... |
9b63912a776a8ea51a0ef208110e17061439da9d | 763f3dc6c8b97a3957559b77fed034a68311d8ae | woopengcheng/LibCore | /deps/boost/boost/config/compiler/mpw.hpp | C++ | hpp | 3,093 | permissive | // (C) Copyright John Maddock 2001 - 2002.
// (C) Copyright Aleksey Gurtovoy 2002.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most... |
2f6c87dba0670e3bf17d0f5aad1209c606dda484 | f2f9db747e4d06dfbc078b5dae8ff93196866627 | HyunnSangCho/algorithm | /boj/dfs_bfs/2606.cpp | C++ | cpp | 564 | no_license | #include <iostream>
#include <vector>
using namespace std;
vector<int> node[101];
bool check[101];
int a,b,cnt;
void dfs(int start){
check[start] =true;
for(int i=0; i<node[start].size(); i++){
if(!check[node[start][i]]){
cnt ++;
dfs(node[start][i]);
}
}
return... |
8d861250cfa2f69f2f7ecbf923bc81f313ad9bcc | 4135e13498c48ba61e1dee83410d8a3fec91121f | alexandraback/datacollection | /solutions_1483488_0/C++/ahxun2006/c.cpp | C++ | cpp | 1,520 | no_license | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmat... |
3d3a93eece1c2b5248e13f07f3a55f0a9c411ffe | e74923bb92d0f6196b43e1ab7da430fba1a30361 | shankarke/CQCharts | /src/CQChartsCorrelationPlot.cpp | C++ | cpp | 32,726 | permissive | #include <CQChartsCorrelationPlot.h>
#include <CQChartsCorrelationModel.h>
#include <CQChartsView.h>
#include <CQChartsAxis.h>
#include <CQChartsModelDetails.h>
#include <CQChartsModelData.h>
#include <CQChartsModelUtil.h>
#include <CQChartsLoader.h>
#include <CQChartsFilterModel.h>
#include <CQChartsUtil.h>
#include <... |
f1111657320610903716211985b44878e8e0eaff | 98c56995e9c15a5fe5338b2d12338255e735143b | teamfcm/futils | /projects/fender/src/Systems/SFML/Children.hpp | C++ | hpp | 458 | no_license | //
// Created by arroganz on 1/3/18.
//
#pragma once
# include "System.hpp"
# include "rendering.hpp"
# include "Components/Children.hpp"
# include "Components/ChildInfo.hpp"
namespace fender::systems::SFMLSystems
{
class Children : public System
{
enum States
{
Init = 0,
... |
fa38c7fb33b7a69b7f779b4a200efe619f844395 | af7683b0537d61accb01c69ab7cc0bcd5da96995 | Sparten/ACC | /ACC sharedmemory exposer/SDK/ACC_ENUM_LowToEpic_parameters.hpp | C++ | hpp | 380 | no_license | #pragma once
// Assetto Corsa Competizione (0.1.0) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ACC_ENUM_LowToEpic_classes.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//--------------------------------------------------------------... |
0eca7f8094a41c535c8ff09e50a555aab5098cd8 | 6921a101430d29ba33a2063f704a0f9f6ea34513 | Radhesh-Sarma/Competitive-Coding | /codeforces/1154/A.cpp | C++ | cpp | 1,695 | no_license | #include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define f first
#define s second
#define int long long
#define PB push_back
#define MP make_pair
#define db long double
... |
9419788794841ae061462f5d1c9354a24dbd7201 | 7f3e5e53c47d9811b949b4f7ba2aa86514479f12 | yanyushr/fuchsia | /zircon/system/dev/test/mock-device/device.cpp | C++ | cpp | 19,716 | permissive | // Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <threads.h>
#include <ddk/binding.h>
#include <ddk/device.h>
#include <ddk/driver.h>
#include <ddk/protocol/test.h>
#include <ddktl/device.h>
#in... |
a2ee250f6a776c71c95ba060dff023450d88948e | 2c6243cced5dbc23d71af21336559cb93ee9d890 | Zeben/QuAmrita5 | /mainwindow.cpp | C++ | cpp | 6,563 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
// INITS:
connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(settings())); // коннектор настроек
/****/
connect(ui->pushAd... |
540960a489bf47b8451d0767304acb57f66eb2f0 | 16322cd7592de7fb3ac227a6170dd02baf62f79b | OpenMD/OpenMD | /src/types/MorseInteractionType.hpp | C++ | hpp | 3,489 | permissive | /*
* Copyright (c) 2004-present, The University of Notre Dame. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
... |
856ffb2ddbef1b73aacd9eba8a4cedbace9721b6 | 9e66843ee3d02c50af731ef7e73d147dee32cf9b | j1249845202/chromium | /chrome/browser/android/omnibox/autocomplete_controller_android.cc | C++ | cc | 23,210 | 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 "chrome/browser/android/omnibox/autocomplete_controller_android.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string>
#... |
6b9e3e2350ce6a900224b166e0665c06731b8c48 | 40c6889aadbc137f4d1cd5cf23686bd95e0a0f5c | MuhammadNurYanhaona/ITandPCubeS | /compilers/new-segmented-backend/src/runtime/communication/communicator.cc | C++ | cc | 8,128 | no_license | #include "comm_buffer.h"
#include "comm_statistics.h"
#include "communicator.h"
#include "comm_barrier.h"
#include "../../../../common-libs/utils/list.h"
#include <iostream>
#include <cstdlib>
#include <sstream>
#include <time.h>
#include <sys/time.h>
//-------------------------------------------------------------- ... |
e4755923de76ead4914409a11692bec452e822d3 | 9096d6d512c2914955420bf0258f117143475d7a | clcheungac/clcheungac.github.io | /comp2012h/csd_only/assignments/PA5-InhPoly/Sol/tyuanab/Swimming_animal.cpp | C++ | cpp | 333 | no_license | /*
* Swimming_animal.cpp
*
* Created on: 2015年11月20日
* Author: user
*/
#include "Swimming_animal.h"
Swimming_animal::Swimming_animal(Game* game, int player, int position) :
Animal(game, player, position),
Normal_att_animal(game, player, position){
Attribute[2] = 1;
}
Swimming_animal::~Swimming_animal() {... |
42bd6c62c8baebe1c72738da7abd86ed81c043f5 | a7a431c41925e9233a99261db5903a81ba36e9b0 | emsr/tr2 | /nricpp/test_integration.cpp | C++ | cpp | 14,525 | no_license |
// $HOME/bin/bin/g++ -o test_integration test_integration.cpp
#include <cstdio>
#include <cmath>
#include <vector>
#define PI 3.1415926535897931
#include "integration.h"
double sin2(double x) { double s = std::sin(x); return s * s; }
double cos2(double x) { double c = std::cos(x); return c * c; }
double ... |
f736d889b2ca53809ceab2f1345359d0578e465b | 2d7edac64aaae06f6ac722a860fa15acc7be5605 | SolidWallOfCode/ngeo_flowspace | /include/ngeo/interval.hpp | C++ | hpp | 25,707 | permissive | /* Copyright 2005-2014 Network Geographics
* SPDX-License-Identifier: Apache-2.0
*/
# pragma once
# include <limits>
# include <functional>
# include <boost/operators.hpp>
# include <boost/mpl/if.hpp>
# include <boost/mpl/has_xxx.hpp>
# include <boost/mpl/logical.hpp>
# include <boost/type_traits/is_arithmetic.hpp>... |
e523be885afb59c5b7ca4b7f3d2ddf8de40b8557 | 651c8be8e8770b4d8f44ca68f0879d093364ad1e | supersojo/chromium | /net/base/file_stream_context.cc | C++ | cc | 8,234 | 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 "net/base/file_stream_context.h"
#include <utility>
#include "base/debug/alias.h"
#include "base/files/file_path.h"
#include "base/location... |
84c33467f40cee96dd190ef77d5c5cd03cf4852b | e3b1aadf5eee5323e9a151b98d1fc2b46981f37c | peng-jinbo/leetcode | /581. 最短无序连续子数组/581.cpp | C++ | cpp | 678 | no_license | class Solution {
public:
int findUnsortedSubarray(vector<int>& nums) {
stack<int> st;
int l = nums.size() - 1;
int r = 0;
for (int i = 0; i < nums.size(); i++) {
while (!st.empty() && nums[st.top()] > nums[i]) {
l = min(l, st.top());
st... |
06590122d3db8b08b344d2ee94cfa3d6c88f5b84 | 47af87da863bde65b609bbbb896fe345c9504211 | meierb/psi46test | /psi46test.cpp | C++ | cpp | 3,883 | no_license | /* -------------------------------------------------------------
*
* file: psi46test.cpp
*
* description: main program for PSI46V2 Wafer tester
*
* author: Beat Meier
* modified: 6.2.2006
*
* rev:
*
* -------------------------------------------------------------
*/
#includ... |
b1a5955bcd9b97af62026a3dc147f7f6ed4ddbdd | ead209732ec7fc461e04ba713c8c82d0cc0a1166 | ahcub/codeforces-tasks-solutions | /1131/b.cpp | C++ | cpp | 1,148 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
unsigned int n, draw_counter, x, y, prev_x, prev_y;
cin >> n;
draw_counter = 1;
prev_x = 0;
prev_y = 0;
for (int i = 0; i < n; ++i) {
cin >> x >> y;
if (!((prev_x == x) && ((prev_y == y)))) {
... |
a5338f7e2e08d45a7fd07076d5150738d8b70716 | 8d0748f91f8cae285a31132afd2c544c7d29e9ff | krvarma/Plotly_SparkCore | /plotly_spark.cpp | C++ | cpp | 10,712 | no_license | #include "plotly_spark.h"
plotly::plotly(char *username, char *api_key, char* stream_tokens[], char *filename, int nTraces)
{
log_level = 2; // 0 = Debugging, 1 = Informational, 2 = Status, 3 = Errors, 4 = Quiet (// Serial Off)
dry_run = false;
username_ = username;
api_key_ = api_key;
stream_t... |
97368a976e6a8b20db3a6363d13ca5f6ebbb9aa1 | b5b8a34cb428546770686bf67a873235b8b9b934 | fizzyfrosty/fc_u2 | /source/MenuScreen.cpp | C++ | cpp | 39,076 | no_license | #include "MenuScreen.h"
MenuScreen::MenuScreen(void)
{
}
MenuScreen::~MenuScreen(void)
{
}
void MenuScreen::Initialize( int16 t )
{
image = Iw2DCreateImage("splash.png");
quitConfirmationImage2 = NULL;
//counter = 0;
buttonCount = 0;
type = t;
// This is the actual pixel size of the image for stretching and... |
d504cf81304b0ff1439b8c122ff36597a722bba5 | 8be312efb4e5749438a3366ebe2175b04cd9a0ad | nolan-downey/SchoolCodingWork | /fundcomp/lab3/menucalc.cpp | C++ | cpp | 2,112 | no_license | //Nolan D Downey
//Simple Arithmetic Calculator
#include <iostream>
#include <cmath>
using namespace std;
//function prototypes
void addition();
void subtraction();
void multiplication();
void division();
void menu_display();
void choice_director(int);
int main() //main function
{
int input_var;
int answer;
... |
1dfb7517f0f09c6a8cdd99ae57e907046be560b4 | 29def72277ae3c6c2497fe3d0195c81aa4f481db | iFihy1475/C_C- | /C_CPP_STL/C_CPP_STL/template2.cpp | C++ | cpp | 1,501 | no_license | #include <iostream>
#include <string>
using namespace std;
// 템플릿 특수화(Template Specialization)
// 특수한 자료형에 대해서 다른 처리 하고 싶을 때
// 같은 함수에 대해서 재정의 하고 싶은 데이터 타입을 이용해 재정의
// T를 없애고 넣고 싶은 데이터 타입을 넣는다.
template <typename T>
T sum(T a, T b)
{
return a + b;
}
template<>
char* sum<char*>(char* s1, char* s2)
{
char* str... |
9d051be1ced29e6f3a3382bb8b09317e7ec60d62 | ca4fba2abf863e0036bdfe2d3fb2efbd970c48db | efren609/LP1 | /basic/Tarea6.cpp | C++ | cpp | 549 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<string> mala_palabra;
mala_palabra.push_back("SHIT");
mala_palabra.push_back("shit");
cout << "Ingresa una palabra: ";
string word;
cin >> word;
bool found = false;
for(int i = 0; i < mala_pala... |
393d5c1c1d29ef7697275dfa27fc3bfcc3f0c290 | 7863256640a052fa27f433424872563ff7b09e5d | qzcx/Internet_Programming | /ThreadedMessageServer/msgd.cc | C++ | cc | 764 | no_license | //Server
#include <stdlib.h>
#include <unistd.h>
#include <iostream>
#include "msg_server.h"
using namespace std;
int
main(int argc, char **argv)
{
int option, port;
bool debug;
// setup default arguments
port = 3000;
debug = false;
// process command line options using getopt()
// see "... |
37f678278316efb15ff835031f71fcfcefc5d91f | 17a015b9306864f2ba7d14194908f0dc295414c8 | Altansukh1101/omim | /map/mwm_tests/mwm_foreach_test.cpp | C++ | cpp | 7,105 | permissive | #include "testing/testing.hpp"
#include "map/feature_vec_model.hpp"
#include "indexer/data_header.hpp"
#include "indexer/scales.hpp"
#include "indexer/feature_visibility.hpp"
#include "indexer/feature_processor.hpp"
#include "indexer/classificator.hpp"
#include "platform/local_country_file_utils.hpp"
#include "geom... |
7e79a6357b2994a0040e79a85a4ffb5ff67ef804 | 4a10880247c99f1f6dfc97e13b4ed38411faf4af | NikhilBansal1999/CS738_Project | /llvm/lib/IR/Attributes.cpp | C++ | cpp | 59,824 | permissive | //===- Attributes.cpp - Implement AttributesList --------------------------===//
//
// 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
//
//===---------------------------... |
d6cfbb8e0715269d37d1479986aedc44546dae3b | faa770c5122432f0a5d3016f0716aa1df1462e8c | littledan/Factor | /vm/quotations.cpp | C++ | cpp | 10,447 | permissive | #include "master.hpp"
namespace factor
{
/* Simple non-optimizing compiler.
This is one of the two compilers implementing Factor; the second one is written
in Factor and performs advanced optimizations. See basis/compiler/compiler.factor.
The non-optimizing compiler compiles a quotation at a time by concatenating
m... |
150b8327984e35f361c79461b030440a72617f94 | 382a32540d219fbc326a5c3525482cdc482de9f8 | windystrife/UnrealEngine_NVIDIAGameWorks | /Engine/Source/Runtime/Core/Private/Internationalization/Internationalization.cpp | C++ | cpp | 13,819 | permissive | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "Internationalization/Internationalization.h"
#include "GenericPlatform/GenericPlatformFile.h"
#include "HAL/FileManager.h"
#include "Misc/Paths.h"
#include "Internationalization/Culture.h"
#include "Internationalization/TextCache.h"
#if UE_ENABLE_... |
aad420b89abfbd120c615bc208ab1fba6951a922 | 8cf80364697e8d2cb3e76b6cdc5d1b9fea69d5f3 | hamko/procon | /atcoder/arc16/b.cpp | C++ | cpp | 1,135 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
#define all(x) x.begin(), x.end()
#define Min(x) *min_element(all(x))
#define Max(x) *max_element(all(x))
template <typename T, typename U> ostream &operator<<(ostream &o, const pair<T, U> &v) { o << "(" << v.first << ", " << v.... |
757a2e6da2c02e0c1acc7fdf1af7e1b2b68c3730 | e1da43434a389efccbba956f5c7c27eed420a094 | lineCode/librush | /Rush/UtilCameraManipulator.cpp | C++ | cpp | 4,510 | permissive | #include "UtilCameraManipulator.h"
#include "Platform.h"
#include "UtilCamera.h"
#include "UtilLog.h"
#include "Window.h"
namespace Rush
{
CameraManipulator::CameraManipulator() : CameraManipulator(KeyboardState{}, MouseState{}) {}
CameraManipulator::CameraManipulator(const KeyboardState& ks, const MouseState& ms)
: ... |
35acc9678c28076d3c07b17cb88460d80e046f71 | 847664b416fd21e37cffa037b218d782757c6622 | Samsufi/GAL | /src/rpcmasternode.cpp | C++ | cpp | 43,882 | permissive | // Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2015-2018 The GALR developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "activemasternode.h"
#include "db.h"
#include "init.h"
#include "main.... |
8eb09bd089c5b69e3355e217c5005bff9a62755b | 73a957f8d699c7c17cdfc384d49fb3c2034e1d21 | RonyK/SEACOW | /MSDB/MSDB-CORE/src/compression/haar.cpp | C++ | cpp | 1,028 | no_license | #include <pch.h>
#include <compression/haar.h>
namespace msdb
{
namespace core
{
namespace haar
{
static const double h2[2] =
{
1 / sqrt(2), 1 / sqrt(2)
};
static const double g2[2] =
{
1 / sqrt(2), -1 / sqrt(2)
};
void getWavelet(const double** h_0, const double** g_0,
const double** h_1,... |
90e5a7daf6b3632cbb97119312b5cb173a9bc928 | 3662aff7b9f5fdc19b09c1e849c9f8a79d22c937 | baptistesx/appsDashboard | /windows/runner/main.cpp | C++ | cpp | 1,272 | no_license | #include <flutter/dart_project.h>
#include <flutter/flutter_view_controller.h>
#include <windows.h>
#include "flutter_window.h"
#include "utils.h"
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
_In_ wchar_t *command_line, _In_ int show_command) {
// Attach to console w... |
a71f6ed16c1e624db7658389f9d5cc4b54e6856d | 7e1c88db7a59c745678955de13a5557492b0f84f | shaozonglin1993/rticonnextdds-examples | /get_publishers/c++03/Foo_publisher.cxx | C++ | cxx | 2,991 | no_license | /*******************************************************************************
(c) 2005-2015 Copyright, Real-Time Innovations, Inc. All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative
works of the Software. Licensee has the right to distribute object form only
for u... |
9c42d7523c960cb4b0cfc85854591c50099a9ab3 | e47c20162efafa6cb678ca26d3dae06689c93beb | dports/dxup | /src/d3d9/d3d9_util.cpp | C++ | cpp | 11,712 | permissive | #include "d3d9_util.h"
#include "d3d9_format.h"
#include "../util/type_converter.h"
#include <array>
namespace dxup {
namespace convert {
using FormatConverter = TypeConverter<uint32_t, DXGI_FORMAT>;
std::vector<FormatConverter::TypeMapping> formats = {
{ D3DFMT_UNKNOWN, DXGI_FORMAT_UNKNOWN },
... |
3ea9af036ec3c4ec9a0d0000c305a31a115474d9 | 1887cc48a08d20943335be75c81f5994a1d476c9 | DeCrypt0/enox | /src/enoxd.cpp | C++ | cpp | 6,027 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The Enox developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or... |
e896798758e5ff57cd16e85b5ee78416fd764c84 | 6c9b016bba077b3f117f669c8379e505571f2ec0 | czkkkkkk/ragdoll | /ragdoll/torch/ops.cc | C++ | cc | 1,780 | no_license | #include <pybind11/pybind11.h>
#include <torch/extension.h>
#include <THC/THC.h>
#include <cstdio>
#include "glog/logging.h"
#include "common/common.h"
#include "common/operations.h"
namespace ragdoll {
extern THCState *state;
class TorchTensor : public Tensor {
public:
TorchTensor(torch::Tensor tensor) : tens... |
594d7c6e9e389b2ced2beba0a2fbbe986edbe668 | 52eac4e0371e9270d5d505b6ecbadc77c7bc042c | mvahe77/LightGuide-Simulation | /include/HCalWLSPmtSD.hh | C++ | hh | 876 | no_license | //
#ifndef HCalWLSPmtSD_h
#define HCalWLSPmtSD_h 1
#include "HCalWLSAnalysisManager.hh"
#include "G4VSensitiveDetector.hh"
#include "G4Navigator.hh"
#include "HCalWLSConfig.hh"
//#include "HCalWLSPmtHit.hh"
class G4Step;
class G4HCofThisEvent;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOoo... |
c81858bacdc57ff6876eb3f4ad7f377b09bb42cd | 1b048af407c49db319d991812600b15b52cf4c6c | Luffky/clrs | /第19章/二项堆/二项堆/main.cpp | C++ | cpp | 775 | no_license | //
// main.cpp
// 二项堆
//
// Created by 伏开宇 on 2017/4/5.
// Copyright © 2017年 伏开宇. All rights reserved.
//
#include <iostream>
#include "BinHeap.hpp"
int main(int argc, const char * argv[]) {
int a[7] = {12,7,25,15,28,33,41};
int b[6] = {18,3,37,6,8,9};
BinHeap* h1 = new BinHeap();
BinHeap* h2 = new... |
271175138143e0ca4a96ebf2c1867d4102845aca | 97b2103738aca70b5ceabc4a2051e16aa85ff992 | AlexxxandraGol/C18 | /C18/C18.cpp | C++ | cpp | 3,319 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include<Windows.h>
#include<tchar.h>
#include"Resource.h"
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
HWND staticTextField, staticTextFieldTwo;
HWND hwnd;
const int HNUM = 10, VNUM = 100;
const int List_size = 20, Combo_size = 20;
const int INTERVAL = 20;
INT_PTR CALLBACK D... |
09d5043d4d42a533f04823d16c0345a3af17005d | 813c440e456424b9987b693bbfc118eea68b17ac | ArthurKuster19/P3 | /MAIN.CPP | C++ | cpp | 518 | no_license | #include <iostream>
#include <math.h>
#include "triangulos.h"
using namespace std;
int main() {
float basee, altur;
cout << "digite o valor da base do triangulo" <<endl;
cin >> basee;
cout << "digite o valor da altura do triangulo" <<endl;
cin >> altur;
tTriangulos triang ;
// Os dados coletados ... |
ea7d69c222e96d7c78bc66ecd1b046b049c05228 | c15149069a5a0cfae2f89e0a8faeb78ef436cec1 | Competitive-Programmers-Community/LeetCode | /23. Merge k Sorted Lists/main.cpp | C++ | cpp | 915 | permissive | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* mergeKLists(vector<ListNode*>& lists) {
vector<int> v;
for(auto node : lists){
while(... |
f8a6135328837fc6f395f57d0d7af702179b3339 | 0077c953d665d16c8de66595b566f06820ef2b32 | opensourceyouthprogramming/h5vcc | /lbshell/src/lb_sqlite_vfs.cc | C++ | cc | 7,479 | permissive | /*
* Copyright 2014 Google Inc. 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 applica... |
352049205e3cf09a957ef893b79d9ef1ada4f5dc | c52800851aa137be4e4cfbe85e251017b875c5a0 | woodpeck/planet-dump-ng | /src/history_filter.cpp | C++ | cpp | 8,536 | permissive | #include "history_filter.hpp"
#include <boost/date_time/posix_time/posix_time.hpp>
#include "xml_writer.hpp"
#include "pbf_writer.hpp"
template <typename T>
history_filter<T>::history_filter(const std::string &option_name, const boost::program_options::variables_map &options,
const u... |
358a6c1aa05e9c3cf4e5b12ace2431ef57b04a21 | 1425f013698c5dbb685f9dfcae6a2565c8ed418d | vansh16100/programmining | /DynamicProgramming/0_1 knapsack.cpp | C++ | cpp | 870 | no_license | #include <bits/stdc++.h>
#include<math.h>
#include<iostream>
#define ll long long int
#define pii pair<int,int>
#define pic pair<int,char>
using namespace std;
using v_i=vector<int>;
int knapSack(int W, int weight[], int arr[], int n)
{
int dp[n+1][W+1];
for(int i=0;i<=n;i++) {
for(int j=0;j<=W;j++) {
... |
a3c86b4855a007d90ae481e323c01cec05cc1c24 | abb273be4dab64b6ef22af6609a584dc23e46bd7 | betyhapau/Mine-27d067f2-0a5d-450f-9cb2-64a4ab241cf8-sweeper | /Minesweeper/Minesweeper/Program.cpp | C++ | cpp | 468 | no_license | #include "GameManager.h"
#include <SDL.h>
#include<iostream>
#include<string>
using namespace std;
int main(int argc, char **argv)
{
/*int rows, columns, bombs;
cout << "Rows:";
cin >> rows;
cout << "Columns:";
cin >> columns;
cout << "Bombs:";
cin >> bombs;
Grid* grid = new Grid(rows, columns, bombs);
... |
9aa50525f33d89b7fbc870ec17cce0091123705b | da1b29c61f65cd9ef7775da77dd5c7e11bc56aa7 | sameert89/problem-solving-2021 | /CodeChef_XOREQUAL.cpp | C++ | cpp | 271 | no_license | #include<bits/stdc++.h>
using namespace std;
int main() {
int t,N,arr[100000];
cin >> t;
for(int i=0;i<100000;i++){
if(i==0){
arr[0] = 1;
continue;
}
arr[i]=(arr[i-1]*2)%1000000007;
}
while(t--){
cin >> N;
cout << arr[N-1] << endl;
}
return 0;
}
|
8cefe9d7c6d1c76de6e8573d5eb9c425b08b00ec | ae8471380390a8c98bb05a3b6329a1dc81ece505 | nike-sh/CarProto | /updated cpps/GameObject.cpp | C++ | cpp | 272 | no_license | #include "GameObject.h"
GameObject::GameObject()
{
sf::FloatRect MgoBoundingBox = object.getGlobalBounds();
}
void GameObject::Draw(sf::RenderWindow &window)
{
window.draw(object);
}
sf::RectangleShape GameObject::GetShape()
{
return object;
}
|
06d17615d53919ba03d0a632d8203f6553863ef3 | 1dde8c288b857a5fe6f6139c2ac5611c528ea8af | Badhansen/code-zero | /Round 1B expogo.cpp | C++ | cpp | 462 | no_license | #include <bits/stdc++.h>
using namespace std;
using Long = long long int;
bool rec(Long a, Long b, int mv){
if
}
int main(){
int t, ts = 1;
scanf("%d", &t);
while(t--){
scanf("%lld%lld", &x, &y);
bool flag = true;
int cnt = 1e3;
if(ans == ""){
printf("Case... |
c5fa5ce7a54c23832f06e6b202e5407da7c3f400 | 47b88a4fba127b5871e672e6c83311120e0d6f15 | nc-77/algorithms | /ACM/16 shu/1000.cpp | C++ | cpp | 1,402 | no_license | #include<iostream>
#include<vector>
#define ll long long
#define debug(x) cout<<#x<<'='<<x<<endl
#define set0(x) memset(x,0,sizeof(x))
using namespace std;
//#define int long long
const int inf=0x3f3f3f3f;
const int maxn=2e6+10;
struct tree{
char root;
tree *l;
tree *r;
};
vector<tree *>address;
tree *dfs(s... |
8e738268fb1261eaece610216470da4805e7ce38 | d0a827cb8d03aca68336660b0cca3e92fc8f1590 | Zhangzhiyi/cocos2d-x | /TestLuaWidget/Classes/cocos2dx_support/cocos2dx_BYGraySprite_luabinding.cpp | C++ | cpp | 5,976 | permissive | /*
** Lua binding: cocos2dx_BYGraySprite_luabinding
** Generated automatically by tolua++-1.0.92 on 08/02/13 10:52:17.
*/
/****************************************************************************
Copyright (c) 2011 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any per... |
afd6b0413b47f4631583600977bd9b8086a3bf9a | 6de0a3061fef15e4cb6abc1592e7009120acf188 | rob-lane/maze_solver | /data_structure.cpp | C++ | cpp | 925 | no_license | #include "data_structure.h"
#include <iostream>
data_structure::data_structure(char& structure_type) {
if (structure_type == 's') {
m_s = new std::stack<Point>;
m_q = NULL;
} else if (structure_type == 'q') {
m_q = new std::queue<Point>;
m_s = NULL;
}
}
data_structure::~data_structure() {
... |
315975fe73324cc308376e533e9dce15c221e3b8 | ff3430313d96b82f3b015c8d0b466acc1d6093ff | ferambot/calvr_plugins | /calit2/GreenLight/oasClient/client.cpp | C++ | cpp | 7,523 | no_license | /* Client code in C - Converted to C++ */
#include "OASSound.h"
#include <cmath>
#include <sys/time.h>
using namespace std;
void wait(double duration);
void test1();
void test2();
void test3();
void test4();
void test0();
#define RESOLUTION 5
#define PI 3.14159265
oasclient::OASSound *heli, *boing;
int main(void)... |
e809b975b2839f77952347c2f1709230afbe3334 | 423e1f2f81699e90b2c5afe224fba13ba3b5ad87 | skqoaudgh/Algorithm_studying | /Baekjoon/9934_BinaryTree.cpp | C++ | cpp | 635 | no_license | #include <cstdio>
#include <cstring>
#include <cmath>
int tree[12][1025];
int arr[1025];
int depth_idx[11] = {0,};
void Building(int start, int end, int depth)
{
if(start > end) return;
int mid = (start+end)/2;
tree[depth][depth_idx[depth]++] = arr[mid];
Building(start,mid-1,depth+1);
Building(mid+1,end,depth+1)... |
5c1b83b60ad1c5a0d4981d7db722ee913483c69b | c92274f8254e8ddc49da704eb0fb5ffa0d1dd1e4 | cpzhang/zen | /trunk/render/vector4.cpp | C++ | cpp | 655 | no_license | #include "vector4.h"
#include "Colour.h"
Vector4::Vector4()
{
}
Vector4::Vector4( float a, float b, float c, float d ) :D3DXVECTOR4( a, b, c, d )
{
}
Vector4::Vector4( const Vector3& v ):D3DXVECTOR4( v.x, v.y, v.z, 0.0f )
{
}
u32 Vector4::getARGB() const
{
return Colour::getUint32FromNormalised(*this);
}
const ... |
c8feacb99f9a30a9ba78ad0385f035464bfc318c | 9edbc56652de542d88cd2982d3e2b2434bf973d1 | Schtolc/system_programming | /IPC/systemV_msgqueue_send.cpp | C++ | cpp | 714 | no_license | #include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "syscall_error.h"
struct message {
long mtype;
char mtext[80];
};
int main() {
auto msgkey = ftok("/tmp/msg.temp", 1);
if (msgkey == -1) throw syscall_error("ftok");
... |
fa52c0d2e6a900d278de687caa59bb4723d906ef | 8a3989e890de973527ef2f50bfa22a3aaa8d89a0 | tdm1223/Algorithm | /acmicpc.net/source/10040.cpp | C++ | cpp | 589 | permissive | // 10040. 투표
// 2019.05.22
// 구현
#include<iostream>
using namespace std;
int cost[1002];
int vote[1002];
int main()
{
int n, m;
cin >> n >> m;
// 심사위원의 비용 입력 받음
for (int i = 1; i <= n; i++)
{
cin >> cost[i];
}
while (m > 0)
{
m--;
int p;
cin >> p;
// 투표
for (int i = 1; i <= n; i++)
{
if (co... |
ac33c8c7352c5c8e3494196b2ca8dce7f8237a16 | 18daadcbb872177b7f75ef8c6e5ba67f404bfc03 | ElliotCouvignou/Project4 | /Source/Project4/Private/Characters/P4PlayerCharacterBase.cpp | C++ | cpp | 15,295 | no_license | // Project4 Copyright (Elliot Couvignou) Dont steal this mayne :(
#include "Characters/P4PlayerCharacterBase.h"
#include "Characters/Project4Character.h"
#include "Project4.h"
#include "Project4Controller.h"
#include "Project4PlayerState.h"
#include "Project4GameMode.h"
#include "Net/UnrealNetwork.h"
#include "Camer... |
e92e0355faba6ea9775c88383178d3ed86271fb1 | 86d8aa9962f932fb9404e2a55644e06c8f49b2a6 | blackberry/Boost | /boost/fusion/mpl/insert.hpp | C++ | hpp | 1,234 | permissive | /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
====================================... |
e76cc4398a586f0769c913c3c7b6df12700a3042 | b5e98e5648a85d43be2432a9fd43e3f20b65c6a2 | amanuelg3/screenviewer | /src/scrview/host.cpp | C++ | cpp | 749 | no_license | #include "host.h"
#include "server.h"
Host::Host(int w, int h, QString format) {
this->w = w;
this->h = h;
this->format = format;
scrMutex = new QMutex();
mouseMutex = new QMutex();
serv = new Server(scrMutex, mouseMutex, this);
scrProcess = new ScrMaker(scrMutex, serv, w, h, form... |
f21c23b1142c94e1732a3a7431f07a8396838670 | 1eaa5d44181c3b321d2ea355b0b1bed1e8a454c2 | FaridJafarov-l/sdl_core | /src/components/policy/src/policy/policy_table/table_struct/validation.cc | C++ | cc | 5,523 | no_license | #include <algorithm>
#include <cctype>
#include <cstdlib>
#include "./types.h"
#include "utils/macro.h"
namespace rpc {
namespace policy_table_interface_base {
bool ApplicationParams::Validate() const {
return ValidateModuleTypes();
}
bool ApplicationParams::ValidateModuleTypes() const {
// moduleType is optional ... |
41cf98854b47a1554955357915fe45207ed47e12 | 9425fff9d31c35b7cfcfd76046bfa3c82fb043ce | Ahmad45123/codeforces-submissions | /codeforces/1321/C.cpp | C++ | cpp | 770 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int n; cin >> n;
string s; cin >> s;
ll ans = 0;
for(char c = 'z'; c >= 'a'; c--) {
bool flag = true;
while(flag) {
... |
df00f302f0fea40f973b831ee03afb36b41a1717 | 73a6b4bd4daebc61d8b74dbd313cc3833c002453 | yeonjaej/hellstroms_hive | /deltaRad/src/bdt_eff.cxx | C++ | cxx | 12,697 | no_license | #include "bdt_eff.h"
bdt_efficiency::bdt_efficiency(bdt_file* filein, std::string denomin, double c1, double c2) : file(filein), denominator(denomin){
//First step, find event entrylist. In future we must actually track this from the event_tree
int event_number=0;
int run_number=0;
int subrun_number=0;
doub... |
6136ed8487a2993947bf9a2dbb2d87971654b0ea | 65d5a79e4de6bcd9e147a031c3e7e79279f075a4 | xsilium-frameworks/xsilium-engine | /Library/Ogre/OgreMain/src/OgreSubMesh.cpp | C++ | cpp | 17,947 | permissive | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2014 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person ... |
9e9f2281e7a63dbc781b9949dd662b2c889006f0 | 9b651bc229edca097735f46cc458cb47b72048c5 | EP2598/LPG | /Coder Class Week 2/XORAB.cpp | C++ | cpp | 402 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main()
{
unsigned long long a, b,c;
int temp;
vector<bool> arr;
cin >> a >> b;
c = b - a;
while (b > 0) {
if (a != 0) {
arr.push_back(c % 2 == 0 && a % 2 == 1);
}
else {
arr.push_back(c % 2 == 1);
}
a /= 2;
b /= 2;
c /= 2;
}
fo... |
55109053b6d2845dc97d87d824a971df81860059 | be279238e14fc45ac39709ff525bf7296f81e3d2 | DavidCrgh/Tarea_Programada_Estructuras_2 | /hilocrearhumanos.cpp | C++ | cpp | 2,963 | no_license | #include "hilocrearhumanos.h"
#include "windows.h"
HiloCrearHumanos::HiloCrearHumanos(QObject* parent,ListaMundo* pListaMundo,QString* pApellidos,QString* pNombres,QString* pPaises,
QString* pCreencias,QString* pProfesiones,ArbolVida* pArbolVida,Paraiso* pParaiso,QString* pContinentes)
{
listaMundo=pListaMundo... |
0d0fa0366ae273df827e047c03c564f1bb6c1a0c | d0c3a5a9777a5ebbdbe19b0988df2edecee6458c | we-conceived-the/ball | /src/test/pow_tests.cpp | C++ | cpp | 8,202 | permissive | // Copyright (c) 2015 The Bitcoin Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h"
#include "chainparams.h"
#include "pow.h"
#include "random.h"
#include "util.h"
#include "test/test_ball.h"... |
6ece0a4ebed25e6b641faaadcdf941acf8d1bf0e | bec0a8a008341bbae7bfe4d0e0c02876cc8ed30d | sevencheng798/webrtc_aec_x86 | /test/test.cpp | C++ | cpp | 3,267 | no_license | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "echo_cancellation.h"
#define MAX_SAMPLERATE (16000)
#define MAX_SAMPLES_10MS ((MAX_SAMPLERATE*10)/1000)
using namespace webrtc;
int main(int argc, char **argv)
{
FILE *fref = NULL;
FILE *fmic = NULL;
FILE *faec = NULL;
void *haec... |
db025d98f4179e570ead978fe24b48e36110dd80 | f56c7099fe323d1e9b6c6b0b69bf362ba4c19d21 | khairulTonu/Codeforces_Solutions | /712A. Memory and Crow.cpp | C++ | cpp | 322 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,i,j;
cin>>n;
int a[n+1];
for(i=0;i<n;i++)
{
cin>>a[i];
}
for(i=0;i<n;i++)
{
if(i==n-1)
{
cout<<a[n-1];
}
else
{
cout<<a[i]+a[i+1]<<" ";
}
}
... |
27953dbd5575e13390b39eb1dfa3690ccf063dee | 892829e46082be5b4b049adfcae6a33e7d182bdf | jacoloves/Algorithm_C_practice- | /cpp_pra/sample15.cpp | C++ | cpp | 290 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void change(int& n, vector<int>& vec) {
n = 1;
vec.at(0) = 1;
}
int main() {
int x = 5;
vector<int> v = {10, 10, 10};
change(x, v);
cout << x << endl;
cout << v.at(0) << endl;
} |
ebe8c8ae975e3a4387079c34df4fd76230696afc | dd3135b51f1e00d40ff5558d7b28024e95f1fc43 | jonathan-santos/battleship | /src/Main.cpp | C++ | cpp | 1,284 | permissive | #include <iostream>
#include <thread>
#include <chrono>
void Clear()
{
std::cout << "\033c" << std::endl;
}
void Wait(int milliseconds)
{
std::this_thread::sleep_until(std::chrono::system_clock::now() + std::chrono::milliseconds(milliseconds));
}
void MainMenu()
{
char option = ' ';
... |
e206ed88bbe32d74273a9bc2499923308b3b2f16 | 2307703f0aed7e8eb03b90f43df626c7202dd86d | NS-2-10/cpp_lessons | /c++/14/ex2.cpp | C++ | cpp | 1,847 | no_license | #include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
setlocale(LC_ALL, "rus");
srand(time(0));
int cube = rand() % 6 + 1; // 1..6
cout << "Ваш первый ход: " << cube << endl;
while (cube < 6)
{
switch (cube)
{
case 1:
{
cout << "Вы упали в яму. Игра окончена! :... |
fdd2111dea05e8f919483570618a8de365d46597 | b4cbc84881827268628a40e3c212650ab7d9942e | harshimogalapalli/codes | /binarysearch5.cpp | C++ | cpp | 546 | no_license | #include<bits/stdc++.h>
using namespace std;
void printun(int arr[],int n){
int start=0;int end=n-1;
int max,min;
for(start=0;start<n-1;start++){
if(arr[start]>arr[start+1])
{min=arr[start];
break;
}
}
for(end=n-1;end>=1;end--){
if(arr[end]<arr[end-1]){
... |
71d96604ee83915f7d0c060089ef211025e64dc7 | 098a734404b190f0c97278e52dc92cd5c08c55a4 | neemiasbsilva/Memory-Management-Techniques | /Allocation Method/worstfit.cpp | C++ | cpp | 1,722 | no_license | #include <iostream>
#include <vector>
using namespace std;
typedef vector<int> vi;
vi blockSize, processSize;
//store block id of the block allocated to a process
vi allocation;
void worstfit(int n, int qtd){
allocation.assign(qtd, -1);
// pick each process and find suitable blocks
// according to its si... |
123a4fb582018f07eeac11a099a45630ca8ebd70 | 7b3124dec4eb486f3d1000619dc11d7d5b41478e | algorithm005-class01/algorithm005-class01 | /Week_02/G20190343020350/week_02/49-group-anagrams.cpp | C++ | cpp | 441 | no_license | class Solution {
public:
vector<vector<string>> groupAnagrams(vector<string>& strs) {
map <string, vector<string>> str_map;
vector<vector<string>> res;
for (string str:strs) {
string tmp = str;
sort(tmp.begin(), tmp.end());
str_map[tmp].push_back(str);
... |
65bf436e676ff5614190133dc2d7cd848c71279e | b3a4e14be2adbf5bd9a1e979c1c6107206fc1388 | koreshx/MySensors | /core/MyLeds.cpp | C++ | cpp | 3,055 | no_license | /*
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
*... |
fe3516744071fde73464ea5d3b913efd246a5be4 | 506d1d2d7e615ee3fabb17fdadf36645f0556f71 | Alipipe/TOP-chain | /src/xtopcom/xbasic/xhash.hpp | C++ | hpp | 6,563 | no_license | // Copyright (c) 2017-2018 Telos Foundation & contributors
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#pragma once
#include "xbasic/xbyte.h"
#include "xbasic/xbyte_buffer.h"
#include <array>
#include <cstdint>
#include <c... |
fbce6b2eed97ef0b26feb00e9ffd1e3da026d77e | 3e921be629b2aaff21aadf513005355d7a16f077 | jason-jxc/Shareaza | /Languages/tools/SkinTranslate/stdafx.cpp | C++ | cpp | 863 | no_license | //
// stdafx.cpp
//
// Copyright (c) Shareaza Development Team, 2009-2011.
// This file is part of SHAREAZA (shareaza.sourceforge.net)
//
// Shareaza 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 ve... |
00184cf56431896112a515e422f5ce14e274b715 | 1c6dfb5e8586946d7d0096270818136c993e2f16 | JoshPetersen-TRI/drake | /multibody/multibody_tree/test/multibody_tree_test.cc | C++ | cc | 28,122 | permissive | #include "drake/multibody/multibody_tree/multibody_tree.h"
#include <functional>
#include <limits>
#include <memory>
#include <gtest/gtest.h>
#include "drake/common/test_utilities/eigen_matrix_compare.h"
#include "drake/common/test_utilities/expect_throws_message.h"
#include "drake/math/autodiff_gradient.h"
#include... |
6ab7840577aa72e7eb9d6300f67ea511667816f9 | 8d34ce5df0d5c36e3f17f65df920fc81e2812ad4 | kkishi/atcoder | /contests/abc139/abc139_c/main.cc | C++ | cc | 275 | no_license | #include <bits/stdc++.h>
#include "atcoder.h"
void Main() {
ints(n);
vector<int> h(n);
cin >> h;
int ans = 0;
int moved = 0;
rep(i, 1, n) {
if (h[i] <= h[i - 1]) {
++moved;
chmax(ans, moved);
} else {
moved = 0;
}
}
wt(ans);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.