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 |
|---|---|---|---|---|---|---|---|---|
6dfa2616a21ab628930bc074a244acdcc88aed86 | 0861d166f50291e56c3593bc7d5d76cd3313a399 | ASMlover/study | /cplusplus/LearnGC/ParallelExChannel/parallel_channel.cc | C++ | cc | 8,143 | no_license | // Copyright (c) 2017 ASMlover. 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 ofconditions and... |
b55bc5631710a06ea1c19ce6fb9fcfce267a1bae | 5c24fddfd2de885e0e0b2276cfe59e00a236b679 | aizazshahid/BuildingPattern | /main.cpp | C++ | cpp | 5,162 | no_license | #include <stdio.h>
#include <iostream>
using namespace std;
// Our Constants
#define MIN_STORIES 1
#define MAX_STORIES 10
#define MIN_WINDOWS 1
#define MAX_WINDOWS 6
#define MIN_WIN_WIDTH 3
#define MAX_WIN_WIDTH 6
#define MIN_WIN_HEIGHT 3
#define MAX_WIN_HEIGHT 6
#define BASE_SPACE 2 // NOT USING
#define ROOF_SPA... |
d86502d1b1907329e4f98dcba9b5433965016066 | b7607bb7fc9e9bf6ef2473289c2b4d523f2649bb | TencentCloud/tencentcloud-sdk-cpp | /clb/src/v20180317/model/CreateListenerRequest.cpp | C++ | cpp | 13,321 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
c96cfa7ce605b894c9c2aa62542767fc482b5348 | b8179cbd0f9f523b073b90a78d0c52497e7b37d6 | habibrahmanbd/Light-Online-Judge | /1177 - Angry Programmer.cpp | C++ | cpp | 6,346 | no_license | using namespace std;
#include<bits/stdc++.h>
#define db double
#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vl vector<long>
#define vll vector<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define pi ... |
f3c672690662c81628c8519932a73d50d8b1cfed | 233e949e37162dd65863798d21fb7e420d4b456d | powderluv/3d_vision | /visual_map/src/optimizer_tool/src/main.cc | C++ | cc | 19,410 | no_license | #include <string>
#include <fstream>
#include <memory>
#include <opencv2/opencv.hpp>
#include <Eigen/Core>
#include <ros/ros.h>
#include <math.h>
#include "imu_tools.h"
#include "NavState.h"
#include "Converter.h"
#include "g2o/core/robust_kernel_impl.h"
#include "g2o/core/block_solver.h"
#include "g2o/core/optimizat... |
8d11ef17e2e71e711b908ae028c35f90e9f60fe1 | 6f1461ffc998ccc8799fb31979c97e0e8a9e1e1c | arangodb/arangodb | /3rdParty/boost/1.78.0/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp | C++ | hpp | 17,348 | permissive |
///////////////////////////////////////////////////////////////////////////////
// Copyright 2014 Anton Bikineev
// Copyright 2014 Christopher Kormanyos
// Copyright 2014 John Maddock
// Copyright 2014 Paul Bristow
// Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENS... |
cc2dc4adafe88440708629fc9ab6d8fe51a9957f | ee8e2cc3854bcdfc21e9ba31e1fa58bcd16fa362 | m0178/legoino | /arduino/Arduino v105.app/Contents/Resources/Java/libraries/SdFat/SdFatUtil.cpp | C++ | cpp | 2,843 | no_license | /* Arduino SdFat Library
* Copyright (C) 2012 by William Greiman
*
* This file is part of the Arduino SdFat Library
*
* This Library is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version... |
d869176e5cc8e837699b2e5adc072cab8139afd5 | c81e4552f1e2657feed8f55566c9f68b39d6e715 | JohnDacquisto/splat-windows | /Usgs2SdfLib/usgs2sdfLib.cpp | C++ | cpp | 794 | no_license | /*****************************************************************************
* Usgs2SdfLib: Functions used by Usgs2Sdf *
*****************************************************************************/
#include "stdafx.h"
#include "usgs2sdfLib.h"
//| ------------------------------
//|
//| FUNCTION: Convert... |
0ad231e5e1906f99cc7604ec5dc14d337fe7943a | 27cd325ea2a9104b30b3ca4be72fabeb797612e6 | tariqulislam-fa1/Codeforces | /A - Superhero Transformation.cpp | C++ | cpp | 744 | no_license | #include<iostream>
#include<string.h>
using namespace std;
int main()
{
string str,str1;
int i,j,k,c=0,d=0,l,m;
cin>>str>>str1;
//bool len=str.length()>str1.length();
k=str.length();
j=str1.length();
for(i=0;str[i]!='\0' || str1[i]!='\0';i++){
if(str[i]=='a'||str[i]... |
7cda644897cb0568e4d2738659faa2524dc1cbaf | e9118d274b0723533902646dcecb0159d8c8d00d | anuragaryan/Competitive-Programming | /hackerrank/cut-the-sticks.cpp | C++ | cpp | 513 | permissive | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int n;
cin>>n;
int a[n];
int i,m,stick=n;
for(int i=0;i<n;i++)
cin>>a[i];
sort(&a[0],&a[n]);
i=0;
while(a[i]==0 && i<n-1){
i++;
}
m=a[i];
//cout<<"first value of m"<<m<<endl;
while(stick>0)
{
stick=0;
for(int i=0;i<n;i++){
i... |
4e8af2feced5888a09b63f2ede0b1dcba6601d82 | 003149567ea5b2a33498870530166f33add435f2 | ElijahAlmanzor/c-_basics | /C_plus_plus_basics/friend.cpp | C++ | cpp | 1,453 | no_license | //friend functions
#include <iostream>
using namespace std;
class Rectangle
{
int width, height;
public:
Rectangle() {} //This is a default constructor
Rectangle (int x, int y):width(x), height(y) {} //A normal constructor
int area() {return width * height;} // Returns the area
... |
7123b7883872e810a2d5d144e108a56d5c24b83c | 26e5773618af4132aa21ee56014924187b7103e0 | parsa/blaze | /blazemark/src/blitz/DVecNorm.cpp | C++ | cpp | 4,174 | permissive | //=================================================================================================
/*!
// \file src/blitz/DVecNorm.cpp
// \brief Source file for the Blitz++ dense vector norm kernel
//
// Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
//
// This file is part of the Blaze library. You... |
6bec8a003e1ac3d1d9409911ea537b08c77d745b | 6596ce9eaf518eb3c9df297be20b07431770db0f | ms-iot/rviz | /rviz_default_plugins/src/rviz_default_plugins/displays/image/ros_image_texture.cpp | C++ | cpp | 10,130 | permissive | /*
* Copyright (c) 2009, Willow Garage, 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 l... |
c21a0bf15d54b9f13b2abc3918acc3f01c6584fd | 1dbcf6947bc74fe53fc300095a1b895e64666877 | fanzcsoft/windows_embedded_ce_6_r3_170331 | /windows_embedded_ce_6_r3_170331/WINCE600/PRIVATE/TEST/NET/NDIS/NDT/SYS/log.cpp | C++ | cpp | 6,963 | no_license | //
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft shared
// source or premium shared source license agreement under which you licensed
// this source code. If you did not accept the terms of the license agreement,
// you are... |
cac312fdb8d835e6113002b230079cda6fa51f37 | 40366d873202b6bfc16ab581163486c44b88d49e | ggory15/locomote2 | /include/locomote2/timeopt/fwd.hpp | C++ | hpp | 370 | no_license | #ifndef __locomote2_timeopt_fwd_hpp__
#define __locomote2_timeopt_fwd_hpp__
namespace locomote2
{
namespace timeopt
{
enum EndeffectorID{
RF = 0,
LF = 1,
RH = 2,
LH = 3,
EE_Undefined
};
enum PhaseType{
SS = 0,
DS = 1,
TS = 2,
PT_Undefined
};
}... |
d91f95f9f6a565db427b6b57cced2eb6094c3e7b | abdf65ff266b696722daa00e4750871a10583d49 | youngsolar/pylith | /unittests/libtests/feassemble/TestElasticityImplicitCases.hh | C++ | hh | 8,024 | permissive | // -*- C++ -*-
//
// ----------------------------------------------------------------------
//
// Brad T. Aagaard, U.S. Geological Survey
// Charles A. Williams, GNS Science
// Matthew G. Knepley, University of Chicago
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://... |
ce8d91d7619c6f41b7a1c708096651fb526500ff | 6cce8a6d0ed4d7e609c9b1cd08270f400e03c8c3 | eriser/CSL | /CSL/Spatializers/SpeakerLayout.cpp | C++ | cpp | 10,809 | no_license | //
// SpeakerLayout.cpp -- Class for loading and parsing loudspeaker position information used
// by the Spatializer and Auralizer classes.
// See the copyright notice and acknowledgment of authors in the file COPYRIGHT
// Created by Jorge Castellanos on 6/16/06. Ammend for WFS, will wolcott, 6/07. Hacked 8/09 by ST... |
ca38f7793303f2d201aa0f5fd7bdb4d6c611e7c1 | 7cb99ec54944c3b2f374dd5ebdb17079985949f4 | StrawCracker/Rovi2 | /src/robot_plugin/src/RobotPlugin.hpp | C++ | hpp | 1,971 | no_license | #ifndef SAMPLEPLUGIN_HPP
#define SAMPLEPLUGIN_HPP
#include <RobWorkStudioConfig.hpp> // For RWS_USE_QT5 definition
#include "/home/resps/rovi2/Rovi2/build/robot_plugin/ui_RobotPlugin.h"
#include </home/resps/rovi2/Rovi2/src/Project_lib/CellManager.hpp>
#include "qtros.h"
#include <ros/ros.h>
#include <cameranode/Poin... |
d925b19fff6842f73de490f46b7f4313f9fde31a | c5aea63d713e9aae04e15489ec87a7848696bc32 | sadrulhc/chromium | /chrome/browser/ui/views/extensions/media_gallery_checkbox_view.cc | C++ | cc | 3,613 | 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/ui/views/extensions/media_gallery_checkbox_view.h"
#include "chrome/browser/media_galleries/media_galleries_preferences.h"
#incl... |
d6a192f8c71344f1e81aa5a007905a345023a3ed | 1a92ec79b83028eed9f1a34b2046cb956415f53c | AlexMeuer/Thor | /include/Thor/Graphics/UniformAccess.hpp | C++ | hpp | 2,073 | permissive | /////////////////////////////////////////////////////////////////////////////////
//
// Thor C++ Library
// Copyright (c) 2011-2019 Jan Haller
//
// 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 ... |
99b9c8a7878710cac8739378104787e85b1e23f1 | 7d49526f5eefb9987d6509bd693df0bded08ad26 | pari2dhi3/GeeksforGeeks | /heap/7.cpp | C++ | cpp | 463 | no_license | #include<bits/stdc++.h>
using namespace std;
void heapsort(vector<int> &a)
{
priority_queue<int, vector<int>, greater<int> > heap;
int i;
for(i=0;i<a.size();i++)
heap.push(a[i]);
for(i=0;i<a.size();i++)
{
a[i]=heap.top();
heap.pop();
}
}
int main()
{
vector<int> a;
int i,p;
cout << "enter 6 numbers\n";
... |
8965b6e6b9ad3bfbd6895eb13b1a044cb7c76e27 | a9034f57427d071b7e2f1baeda05d9735ac1660d | stone-tong/ComputeLibrary | /src/core/NEON/kernels/arm_gemm/indirect-interleaves/a64_interleave8_block4_s8_s8.hpp | C++ | hpp | 12,040 | permissive | /*
* Copyright (c) 2019-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* ri... |
8119b72a0f74441b4c537d56574b3f92fca3054a | 9b36d188eda773793f6bd05ea2b257c6f6c18295 | SaiSundhar173/Hacktoberfest2021 | /Placement Prep/General shortcuts/Sorting of strings with condition.cpp | C++ | cpp | 934 | no_license |
// https://www.hackerrank.com/contests/all-india-contest-by-mission-helix-08-aug/challenges/arrange-as-said/problem
#include<bits/stdc++.h>
using namespace std;
string pat;
int arr[26];
static bool comp(string a,string b){
int i=0,j=0;
int m=a.size(),n=b.size();
if(m==0)
return true;
if(n==0)... |
fc3f8f8582d030edb3b0f545a5688d5307be0b20 | 33ab854d4f4593cacc64e81213d443edd0f81dfc | ECS-251-W2020/chromium | /ash/shelf/shelf_controller_unittest.cc | C++ | cc | 16,992 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/shelf/shelf_controller.h"
#include <string>
#include "ash/public/cpp/ash_pref_names.h"
#include "ash/public/cpp/shelf_model.h"
#include "a... |
14873a64c70223dd18ae417ac4d629663fbe3925 | 47b368cce56f4afe7901e377bd4fe09e950b1718 | aliyun/aliyun-openapi-cpp-sdk | /domain/src/model/QueryFailingReasonListForQualificationResult.cc | C++ | cc | 1,940 | 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... |
5c0cb9c8d97a93ff42f67ef34144f6c99845ada8 | 9dc4f435bf3eb2b840fbae2f7a756c860021a62a | 3wolf3/FitZeeECALELF | /src/fitzeescale.cpp | C++ | cpp | 50,433 | no_license | // Authors: Hengne Li of UVa at CERN in 2013
#include "functions.hpp"
#include "variables.hpp"
#include "config.hpp"
#include "Minuit2/FunctionMinimum.h"
#include "Minuit2/MnMigrad.h"
#include "Minuit2/MnScan.h"
#include "Minuit2/MnHesse.h"
#include "Minuit2/MnUserParameters.h"
#include "Minuit2/MnPrint.h"
#includ... |
d4c55eab478d01e3c185de2c6fde6ab603fe0eb1 | 842e33fa0cdf912e4418062defb4cf94bf23a0ad | cbiituee/Devcpp | /Balance parentheses.cpp | C++ | cpp | 1,668 | no_license | #include<iostream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
using namespace std;
struct Stack{
int top;
int size ;
char* array;
};
struct Stack* createstack(int size){
struct Stack*stack=new Stack[size];
stack->top=-1;
stack->size=size;
stack->array= new char [stack->size];... |
a51404fdd2cca61cfa34939221385fc5c4635fd4 | 29a795b78ead37b599b0f93fd32004cf81f04d93 | nrmnr/AtCoder | /Grand_Contest_016/B2/code.cpp | C++ | cpp | 635 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
bool judge() {
int n, a[100000];
cin >> n;
for (int i = 0; i < n; ++i) cin >> a[i];
int nmin = n, nmax = 0;
for (int i = 0; i < n; ++i) {
nmin = min(nmin, a[i]);
nmax = max(nmax, a[i]);
}
if (nmax - nmin > 1) return false;
if (nmin ... |
359387675a8b7bd0e5a411ba35c9710ce6e7c3e1 | 5785ab92a3ca531cf49f8d74ea85f8f63c86d2c9 | dvanaken/peloton-bwtree | /src/postgres/backend/access/hash/hashsearch.cpp | C++ | cpp | 11,808 | permissive | /*-------------------------------------------------------------------------
*
* hashsearch.c
* search code for postgres hash tables
*
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* src/ba... |
5e978698fc89f27a6249d5788c0d7dbe28feedaa | 10e23f48b761a2f6f6aac1f02b5bf4ffabd31901 | brunolauze/openpegasus-providers-old | /src/Providers/UNIXProviders/EndpointOfNetworkPipe/UNIX_EndpointOfNetworkPipe_WIN32.hpp | C++ | hpp | 3,247 | permissive | //%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor lice... |
8cfa45caf502d2324d2940ec41447a526ce0a2bd | 6cdb3014ec1f9aee66356e7472d951c8d7c64bc4 | ZENPE-HOLDING/GYB_Foundation | /libraries/chain/include/GYB/chain/protocol/ext.hpp | C++ | hpp | 5,917 | permissive | /*
* Copyright (c) 2018 ZENPE, Inc., and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the right... |
fa94c774b786e074cd65c47d0dc96e1bbd443e69 | f8c258fdbcb70b4e37e9d3aa2b84f7b75f44645e | sirvickr/coursera | /C++/RedBelt/1/table/table.cpp | C++ | cpp | 958 | no_license | #include "test_runner.h"
#include <vector>
#include <iostream>
using namespace std;
template<typename T>
class Table {
public:
Table(size_t m = 0, size_t n = 0) {
Resize(m, n);
}
void Resize(size_t m, size_t n) {
data.resize(m);
for(auto& v: data) {
v.resize(n);
}
}
pair<size_t, siz... |
12fe87010c0fb1133a4c6175040ba063b21ade71 | 2c44dc79a825cc6c7d2f73791e9514da0dd3c1c1 | HiteshMah-Jan/gluecodium | /gluecodium/src/test/resources/smoke/generic_types/output/android/jni/com_example_smoke_GenericTypesWithBasicTypes.cpp | C++ | cpp | 9,097 | permissive | /*
*
*/
#include "com_example_smoke_GenericTypesWithBasicTypes.h"
#include "com_example_smoke_GenericTypesWithBasicTypes__Conversion.h"
#include "ArrayConversionUtils.h"
#include "JniClassCache.h"
#include "JniReference.h"
#include "JniWrapperCache.h"
extern "C" {
jobject
Java_com_example_smoke_GenericTypesWithBasicT... |
2676c027e89daed4fd5667f309e06a1c82d1d464 | b49203291fd199fe1a17c2eff9568541d19f7c5f | MAPSWorks/GIS | /viewer-development/indra/llimage/llpngwrapper.cpp | C++ | cpp | 10,003 | no_license | /*
* @file llpngwrapper.cpp
* @brief Encapsulates libpng read/write functionality.
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* GIS Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU L... |
fe3b6f4873d59ca7ccf401cfd13be52f51022c83 | 87176cd51a506acea463a5ea9fb6f20c3b3bb2b8 | Cplaton/JamomaCore | /DSP/extensions/FunctionLib/source/TTCosineFunction.cpp | C++ | cpp | 958 | permissive | /** @file
*
* @ingroup dspFunctionLib
*
* @brief #TTCosineFunction Unit for Jamoma DSP
*
* @details
*
* @authors Dave Watson, Trond Lossius
*
* @copyright Copyright © 2007 by Dave Watson @n
* This code is licensed under the terms of the "New BSD License" @n
* http://creativecommons.org/licenses/BSD/
*/
#... |
2a93a36a10eb7fb1b29016f5f20ccebca631ad15 | a8298d12c19e37dfb5f6f1e00b92a73cb1d2fff3 | himemogu/Box2dTest | /Box2dTest/Classes/HelloWorldScene.cpp | C++ | cpp | 7,902 | no_license | //
// HelloWorldScene.cpp
// Box2dTest
//
// Created by pri on 12/11/05.
// Copyright __MyCompanyName__ 2012年. All rights reserved.
//
#include "HelloWorldScene.h"
#include "SimpleAudioEngine.h"
using namespace cocos2d;
using namespace CocosDenshion;
#define PTM_RATIO 32
enum {
kTagParentNode = 1,
};
Physic... |
3bb232a6fb9990151766b749b287fcf859e7c230 | f5a4b88f0350a52db88a593ab397de775009910a | 1C-Company-third-party/webkit | /Source/ThirdParty/ANGLE/src/libANGLE/renderer/d3d/ShaderD3D.cpp | C++ | cpp | 7,461 | permissive | //
// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ShaderD3D.cpp: Defines the rx::ShaderD3D class which implements rx::ShaderImpl.
#include "libANGLE/renderer/d3d/ShaderD3D.h"
#include ... |
dbe02cab5c1e3c05cb85c695d3ceb91716cd6e5b | ecc925d12736b3af853e3e1a69494b626100bffd | xychen/unix_programming | /HighPerfLinuxServProgramming/8.3-finite-state-machine/finite-state-machine.cpp | C++ | cpp | 6,587 | no_license | #include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#define BUFFER_SIZE 4096 //读缓冲区大小
enum CHECK_STATE
{
CHECK_STATE_REQUESTLINE = 0, // 正在分析请求行
CHECK_STA... |
3ab2e6a80615ac383b3cb341d9f97bd1f2210933 | 0fca979398ff37e6209922c6e8dd84ea45a1c61e | ZdenekM/srs_public | /srs_interaction_primitives/src/interaction_primitives/bounding_box.cpp | C++ | cpp | 10,264 | no_license | /******************************************************************************
* \file
*
* $Id: BoundingBox.cpp 676 2012-04-19 18:32:07Z xlokaj03 $
*
* Copyright (C) Brno University of Technology
*
* This file is part of software developed by Robo@FIT group.
*
* Author: Tomas Lokaj (xlokaj03@stud.fit.vutbr.cz... |
028a56c913bf3087800a76c908affcf3968fbbbc | 54e05931c65d3030a7f1f8c1a4a73e1ea826a0a6 | shoutagit/AtCoder | /過去問D問題/D - Dice in Line.cpp | C++ | cpp | 773 | no_license |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const ll INF = 1LL << 60;
double expect(int x){
return (1+x)/2;
}
//累積和が使えそう
int main(){
int n, k;
cin >> n >> k;
vector<int> p(n);
rep(i,n... |
f95f310e8f382500d285f04fefeac515cb538503 | ad4f4e0317b5accb9639e0f51acd5cc8b6e3538d | webosose/com.webos.service.memorymanager | /src/common/util/Cgroup.cpp | C++ | cpp | 2,182 | permissive | // Copyright (c) 2020 LG Electronics, 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 agr... |
1682b462341c5230aae43e162fb6f9d876c82406 | bab2421c995c7b87ff3d322ac7426672dce09b26 | AnnaPipko/Lisp-interpreter | /test/test_integer.cpp | C++ | cpp | 2,987 | no_license | #include "lisp_test.h"
TEST_CASE_METHOD(LispTest, "IntegersAreSelfEvaluating") {
ExpectEq("4", "4");
ExpectEq("-14", "-14");
ExpectEq("+14", "14");
}
TEST_CASE_METHOD(LispTest, "IntegerPredicate") {
ExpectEq("(number? -1)", "#t");
ExpectEq("(number? 1)", "#t");
ExpectEq("(number? #t)", "#f");
... |
0a70729efd54722fa19e01c78536dcb344451898 | f2f4bd2918a7de6dc9248e9b6948e09b6bda73b6 | romanzes/chromium | /chrome/browser/ui/webui/settings/chromeos/people_section.cc | C++ | cc | 50,616 | permissive | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/settings/chromeos/people_section.h"
#include "ash/public/cpp/ash_features.h"
#include "base/bind.h"
#include "base/i18n... |
0a554ac06e4586774edb66a324620823c35fc241 | ef6d47a2e079123bc2f8bcba286b67da599dc643 | 1828Boxerbots/AllRobotsInOneCode | /src/main/cpp/Drivers/MuxDrivers/MuxDistanceSensorDriver.cpp | C++ | cpp | 2,311 | no_license | /*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
a74f958ca777abd9487411567276e7d1446ed519 | d8bd631dced76ab945fbb8df4fafdcde0b1f06ee | Palitri/Axis | /Engine/Axis/Source/Engine/Properties/AxProperty.cpp | C++ | cpp | 1,005 | permissive | //---------------------------------------------------------------------------------------------
// Axis 3D Engine Copyright (C) 2017 Palitri
//
// This software is released under the MIT License http://palitri.com/axis/license/
//
// For help and documentation, visit http://palitri.com
//-------------------------------... |
96745203b5cc504443f4cc4fae13c782dc4d9b96 | 9f1cb5757cc14a93529e278707dddda75073d015 | breezy1812/MyCodes | /LeetCode/503-Next Greater Element II/solution.cpp | C++ | cpp | 662 | no_license | // Author: David
// Email: youchen.du@gmail.com
// Created: 2017-02-18 09:42
// Last modified: 2017-02-18 09:42
// Filename: solution.cpp
// Description:
class Solution {
public:
vector<int> nextGreaterElements(vector<int>& nums) {
int j;
int size = nums.size();
stack<int> s;
vector<... |
a42f7c5f3ee9db8b49af57029b499b476dd84a2c | 037624fc31f6d282b68b9163296fae47f1d6074f | rianandabp/C- | /wildcard.cpp | C++ | cpp | 638 | no_license | #include<iostream>
using namespace std;
int main(){
string input,temp,input2;
int t; bool p;
getline(cin,input,'*');
getline(cin,input2);
cin>>t;
int len=input.length();
int len2=input2.length();
for(int a=1;a<=t;a++){
cin>>temp;
int lentemp=temp.length();
p=true;
for(int b=0;b<len;b++){
... |
7ed7cf7d75ff5d06adf03d36be5c821a5fdba1de | dda7cd05988af48668cb9b2dfb1aeecad96147c0 | faouellet/BuildSystemTutorial | /Part5/src/main.cpp | C++ | cpp | 1,470 | permissive | #include "dependencygraph.h"
#include <boost/graph/topological_sort.hpp>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <vector>
void Compile(const DependencyGraph& graph)
{
std::vector<DependencyGraph::Vertex> vertices;
boost::topological_sort(graph, std::back_inserter(vertices));
/... |
9cb2f67f452800acc722eed94ca61b9073c4eb15 | 5cbde2919a00f766925b3d52f025a0afbf869ef6 | Jongddi/Study_project | /자료구조/chap8/chap8/array.cpp | C++ | cpp | 1,373 | no_license | #include <stdio.h>
#include <stdlib.h>
typedef int element;
typedef struct TreeNode {
element key;
struct TreeNode* left, * right;
} TreeNode;
TreeNode* new_node(int item)
{
TreeNode* temp = (TreeNode*)malloc(sizeof(TreeNode));
temp->key = item;
temp->left = temp->right = NULL;
return temp;
}
TreeNode* insert_... |
ed7140d94a91b6505046734c4c086559a8ed6ce4 | 93b1f31ed53a7aed5ced752d5021e693dde3861c | jianxinzhu/Chapter-7-Class-Template-Array-and-Vector-Catching-Exceptions | /DiceRolling.cpp | C++ | cpp | 640 | no_license | /* name: jianxin zhu
date: july/19/2020
*/
#include<random>
#include<ctime>
#include<iomanip>
#include<iostream>
#include<vector>
#include<array>
using namespace std;
int main()
{
default_random_engine engine{ static_cast<unsigned int>(time(0)) };
uniform_int_distribution<unsigned int> randomInt{ 1,6 };
a... |
746f821e1714bcd773956d28589d7d299c4d35fd | 7bde73a551ec34153f25568000936eb6d0fcb341 | ciaranm/socs2016-k-clique-paper | /code/max_clique_result.cc | C++ | cc | 287 | no_license | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include "max_clique_result.hh"
auto MaxCliqueResult::merge(const MaxCliqueResult & other) -> void
{
nodes += other.nodes;
if (other.size > size) {
size = other.size;
members = std::move(other.members);
}
}
|
7920428560f950d16acb4b2380de4c57b72b4daf | 70a87eb826cdc1c52f3fa6562b697de3e3b2e5b9 | nicokla/42_CPP | /piscineCPP/3/ex00/main.cpp | C++ | cpp | 857 | no_license | #include <iostream>
#include <fstream>
#include <string>
#include "FragTrap.hpp"
// https://borderlands.fandom.com/wiki/Claptrap/Quotes
int main() {
srand(time(NULL));
FragTrap fragOne;
fragOne.meleeAttack("Bandits");
fragOne.rangedAttack("Raiders");
fragOne.takeDamage(50);
fragOne.beRepaired(20);
fragOne.beRep... |
f96f7598d4a5208bc419a696e2551e44954c8f7d | cc3bd09cd57c1b483dac76986b6015529ff3abeb | af-orozcog/competitiveProgramming | /PreNationals/Contests/112D.cpp | C++ | cpp | 797 | no_license | #include<bits/stdc++.h>
using namespace std;
vector<vector<int>> nums;
bool add(int val, int upTo){
return nums[val].size() == 0 || nums[val].back() < upTo;
}
int main(){
nums.resize(100001);
int n;
scanf(" %d",&n);
for(int i = 0; i < n;++i){
int x,y;
scanf(" %d %d",&x,&y);
... |
461e6145ea7ddd6b36d2eda88f3595b89e4e5428 | 7787e8e75c8fcfce0df187ec5e3b3f8529e07022 | Griizz/Fortnite-Hack | /SDK/FN_TextRotator_parameters.hpp | C++ | hpp | 1,551 | no_license | #pragma once
// Fortnite SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
// Function TextRotator.TextRot... |
93b93f01ee4948c1dab2cac2cd234249b5c04464 | bb31583bd241f7a64fc10411773e1a7d50e71518 | lfricken/Alpha | /include/Universe/Module/ForceFieldCore.hpp | C++ | hpp | 2,556 | no_license | #ifndef FORCEFIELDCORE_H
#define FORCEFIELDCORE_H
#include "GModule.hpp"
#include "ForceField.hpp"
struct ForceFieldCoreData;///WE NEED TO CONSUME ENERGY
class ForceFieldCore : public GModule
{
public:
virtual ~ForceFieldCore();
ForceFieldCore(const ForceFieldCoreData& data);
virtual voi... |
75e2438374bfcc9879848c011b2c337905c9e3d9 | 3aaab5c671baaf5a2042197d70db46b259adaf40 | bruno-krinski/Simplex | /src/Simplex.cpp | C++ | cpp | 4,678 | no_license | #include "Simplex.hpp"
Simplex::Simplex(std::vector<double> C, Matrix A, std::vector<double> b, bool parallel){
std::vector<std::string> vars,aux_vars;
if(parallel == false){
initialize_vars(vars, A.numCols());
printVector(vars);
} else {
}
/*
for(unsigned int i = 0; i < A.numCols(); ++i){
vars.push_back... |
dc781ef9c2e1a54feee911082d6940be3aba577c | e30a82b3c845e164e194e96193e782c1a98b6ace | WopsS/RED4ext.SDK | /include/RED4ext/Scripting/Natives/Generated/game/state/MachineplayeractionsActionDischarge.hpp | C++ | hpp | 760 | permissive | #pragma once
// clang-format off
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/Scripting/Natives/Generated/game/state/MachineplayeractionsWeaponActionBase.hpp>
namespace RED4ext
{
namespace game::state
{
struct MachineplayeractionsAction... |
fe90a48b5852b4c80c5452cb2e3918690db2ecbf | f3ecb311a792f055076551b493f66f3a51f7f848 | batistasilva/QtAppAccount | /Mocs/moc_MngFormEmployee.cpp | C++ | cpp | 2,779 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'MngFormEmployee.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0)
**
** WARNING! All changes made in this file will be lost!
*****************************************************... |
ccb6b0bea217b1c83ae881704227f774147f8663 | 5f6885294bd3e2c7fe20123b86b8763e55fcef4e | Truta446/Vivaldi-browser | /chromium/chrome/installer/setup/setup_constants.cc | C++ | cc | 1,786 | 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/installer/setup/setup_constants.h"
namespace installer {
// Elements that make up install paths.
const wchar_t kChromeArchive[] = L... |
947f45d5f76f576d1909a184380d311adb7fc3c9 | 927e164d1a297410b78f4c56b6e7bd57a223882f | adrset/kms2 | /main.cpp | C++ | cpp | 6,477 | no_license | #include <cmath>
#include <vector>
#include <ctime>
#include <fstream>
#include <iostream>
#include <TROOT.h>
#include <TSystem.h>
#include <TApplication.h>
#include <TLegend.h>
#include <TMultiGraph.h>
#include <cstdlib>
#include <TCanvas.h>
#include <TRandom.h>
#include <TH1D.h>
#include <TGraph.h>
using namespace s... |
16076cb8233bdcced319b2e3577e4053d4ebc562 | 9fb8c3f51183c6df433689125cccfe1d9584b60d | jpvanoosten/VolumeTiledForwardShading | /Engine/src/DLLMain.cpp | C++ | cpp | 643 | permissive | #include <EnginePCH.h>
HINSTANCE g_DLLHandle = nullptr;
BOOLEAN WINAPI DllMain( IN HINSTANCE hDllHandle,
IN DWORD nReason,
IN LPVOID Reserved )
{
BOOLEAN bSuccess = TRUE;
// Perform global initialization.
switch ( nReason )
{
case DLL_PROCES... |
e24dcfc4fef8ddd7ddcd6f223daa9a39977941a4 | bf616d812a1b83f9f9660a05f5c7bdf4d79a0797 | eunchong/chromium-1 | /components/dom_distiller/content/browser/distillability_driver.cc | C++ | cc | 2,774 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/dom_distiller/content/browser/distillability_driver.h"
#include "content/public/browser/render_frame_host.h"
#include "content/publi... |
22f92365d6b7b798d4d6ba41b9495fb0c4aa31ee | be59691e571044c20dfbed983cf0b0d9b4a2942e | akoserwal/wabt | /src/binary-reader.cc | C++ | cc | 48,251 | permissive | /*
* Copyright 2016 WebAssembly Community Group participants
*
* 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... |
b460450d4efa081d9db8e767e1f75fef4c4bb04a | 82c026c4f264f16446d974df16c0b6537357b572 | tony1213/parsec | /parsec_perception/src/floor_filter.cpp | C++ | cpp | 16,504 | no_license | // Copyright 2011 Google Inc.
// Author: moesenle@google.com (Lorenz Moesenlechner)
//
// 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
//... |
7e69fb0505eb158394e0033f38d7336e57172832 | 193aa073370c7fc230aa4824b93d3fec55c8795d | DDunda/Andre-snake | /Andre snake/GameOver.cpp | C++ | cpp | 314 | no_license | #include "GameOver.h"
#include "Globals.h"
#include <SDL.hpp>
using namespace SDL;
bool GameOver::Open(Screen& screen) {
return true;
}
bool GameOver::Close(Screen& screen) {
return true;
}
void GameOver::Update(Screen& screen) {
}
void GameOver::Render(Screen& screen) {
r.SetDrawColour(DARK_GREY).Clear();
} |
13e6ee63f53507265a097a170b68478a600612b2 | 4e0fe4938d212202b16745aebbe715c1fb3dfb52 | pureexe/toisu | /ss1_2013/day2_loopbasic/premake/q02_countdown_even.cpp | C++ | cpp | 433 | no_license | #include<iostream>
using namespace std;
int main()
{
int i,n;
cin >> n;
for(i=n;i>0;i--)
if(i%2==0)
cout << i << " ";
cout << "\n---------------------------\n";
i=n;
while(i>0)
{
if(i%2==0)
cout << i << " ";
i--;
}
cout << "\n--------------... |
b65eb5b7367da2da83123694d08e14ccf4574264 | ffdc13c08753c48de094d1617e3fae9ad36101a4 | gcucurull/qt-vgi | /CGEnv/Load3DS.cpp | C++ | cpp | 40,013 | no_license | // CONJUNT DE FUNCIONS PER A CARREGAR FITXERS 3DS
#include "Load3DS.h"
#include <QMessageBox>
#include <QLabel>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
//#define new DEBUG_NEW
#endif
// This file handles all of the code needed to load a .3DS file.
// Basically, how it works is, ... |
0108451279ef96ccdcc82d99b25f816be5e6418a | 8b13c2a4a1e73275dbda3e998254461602cc8cb1 | Harrypotterrrr/Algorithm-ACM | /DP/HDU 1176 - DP - reverse_solution.cpp | C++ | cpp | 764 | no_license | /************************************************
Problem: HDU 1176 Ãâ·ÑÏÚ±ý
Algorithm: DP
Difficulty: +
Significance: +++
Remark: reverse solution
*************************************************/
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define INF 0X3F3F3F3F
using namespace std;
int dp[10000... |
702290709eb31f640c1148dfba74fc0cc0d65152 | 7943a2eeac49ff997840374a1155e4a3f8a3d634 | BeautifulBeer/algorithms | /BOJ/Uncategorized/P_2156/main.cpp | C++ | cpp | 895 | permissive | #include <iostream>
#include <queue>
#include <cstdarg>
using namespace std;
int n;
int wines[10000];
int cache[10000][3];
int mmax(int num, ...) {
int result = 0, tmp;
va_list vl;
va_start(vl, num);
for (int i = 0; i < num; i++) {
tmp = va_arg(vl, int);
if (result < tmp) {
result = tmp;
}
}
va_end(vl... |
a7bc2d7dfd2a98868f600dfc6450019e33550c11 | 0015a268997100a93f57db8bec3578c0d1c61fef | envoyproxy/envoy-wasm | /source/common/config/new_grpc_mux_impl.cc | C++ | cc | 12,504 | permissive | #include "common/config/new_grpc_mux_impl.h"
#include "envoy/service/discovery/v3/discovery.pb.h"
#include "common/common/assert.h"
#include "common/common/backoff_strategy.h"
#include "common/common/token_bucket_impl.h"
#include "common/config/utility.h"
#include "common/config/version_converter.h"
#include "common/... |
8b9b7e92d852255a7ae31a0cd11a0404cc6e6895 | 24534087b337960de26dc2f75a65c4e3bf338723 | despair86/loki-network | /llarp/routing/dht_message.hpp | C++ | hpp | 734 | permissive | #ifndef LLARP_MESSAGES_DHT_HPP
#define LLARP_MESSAGES_DHT_HPP
#include <dht/message.hpp>
#include <routing/message.hpp>
#include <vector>
namespace llarp
{
namespace routing
{
struct DHTMessage final : public IMessage
{
std::vector< llarp::dht::IMessage::Ptr_t > M;
uint64_t V = 0;
~DHT... |
71203eb6aca357aaa0f760e073ad39795c464062 | 86faef6785c40bdd6909141db39afd60c92fbce1 | KhronosGroup/VK-GL-CTS | /external/vulkancts/modules/vulkan/wsi/vktWsiColorSpaceTests.hpp | C++ | hpp | 1,260 | permissive | #ifndef _VKTWSICOLORSPACETESTS_HPP
#define _VKTWSICOLORSPACETESTS_HPP
/*-------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
*
* Copyright (c) 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may ... |
ea5581ca6d5181f10333f583ce314900252244f4 | 8ed9e4ede713ae4e51efccdab906e273396a10fc | mlange05/serialbox2 | /test/serialbox/core/archive/UnittestArchiveFactory.cpp | C++ | cpp | 2,977 | permissive | //===-- serialbox/core/archive/UnittestArchiveFactory.cpp ---------------------------*- C++ -*-===//
//
// S E R I A L B O X
//
// This file is distributed under terms of BSD license.
// See LICENSE.txt for more information
//
//===----------------------------------------------... |
bfbd6c959648ced39862a02f9b39755b44c3eeba | bd4518a8ff0036d77068499d93d4fb580d270acb | solgenomics/R_libs | /RcppArmadillo/include/armadillo_bits/Cube_bones.hpp | C++ | hpp | 26,876 | permissive | // SPDX-License-Identifier: Apache-2.0
//
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
// Copyright 2008-2016 National ICT Australia (NICTA)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may ob... |
5c94ddbb7ab7a5cdc8bf971a1448c07183e24363 | 67ff6eb975f63827d6eccce5cd76fed553adddde | RuudErmers/crumar-ds2-vst-in-juce | /JUCE/XRECDS2/Source/XOscillator.cpp | C++ | cpp | 4,036 | no_license | /*
==============================================================================
XOscillator.cpp
Created: 13 Sep 2017 11:51:36am
Author: Ruud
==============================================================================
*/
#include "XOscillator.h"
#define _USE_MATH_DEFINES
#include <cmath>
#includ... |
c9c4e7f49e7eac51393ad0affd73f1c01bd5f7d0 | 30d1a413cb921ea984d8c41ffb881de02aa34a14 | karpiu/kp-minisatp | /ADTs/Global.cc | C++ | cc | 2,660 | permissive | /***************************************************************************************[Global.cc]
Copyright (c) 2005-2010, Niklas Een, Niklas Sorensson
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 Sof... |
ee0bebcbae6f4845092174c27da5bbb33b5b3aa1 | 66f00ff392b99d402781eb2e7dda0c098e9bdd2f | DanielJamesTronca/P2_Project | /problema_software.cpp | C++ | cpp | 2,911 | no_license | #include "problema_software.h"
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
problema_software::StaticTableInit::StaticTableInit(){
ptr = new problema_software();
table[ptr->tipo()]=ptr;
}
problema_software::StaticTableInit::~StaticTableInit(){ delete ptr; }
problema_software::StaticTableInit ... |
9fc2d8a616cdc700a70e2ab6c65341f4a5844eb8 | e1c2d663dc22b31507cdff66616ef024fe6b8711 | jchunky/KataMedicineClash | /C++/Patient.hpp | C++ | hpp | 355 | permissive | #include "Medicine.hpp"
#include <ctime>
#include <string>
#include <vector>
class Patient
{
std::string name_;
std::vector<Medicine> medicines_;
public:
explicit Patient(std::string const & name);
std::vector<std::time_t> clash(std::vector<std::string> medicineNames, int daysBack) const;
void ... |
6ce999d52768d6a3a0261ea9760e659c4530191d | e1c54b52a5079ebc75d74f697e1bd864202548c5 | dkjiang2018/BaseKit-code-samples | /DPC++Compiler/sepia-filter/src/sepia_dpcpp.cpp | C++ | cpp | 9,546 | permissive | //==============================================================
// Copyright © 2019 Intel Corporation
//
// SPDX-License-Identifier: MIT
// =============================================================
#include <iostream>
#include <chrono>
#include <cmath>
#include "CL/sycl.hpp"
#include "device_selector.hpp"
#defin... |
c214c96807d077a359596ba1df879ebc8ccc4770 | fa82cad99995d0d3794575500fcd727b031bc5e3 | damoncheng/Markdown | /Program/C++/Friend_Exception_And_More/Exception/Exception_New/newexcp.cpp | C++ | cpp | 563 | no_license | //newexcpp.cpp -- the bad_alloc exception
#include <iostream>
using namespace std;
#include <new>
#include <cstdlib>
struct Big
{
double stuff[2000];
};
int main()
{
Big * pb;
try {
cout << "Trying to get a big block of memory:\n";
pb = new Big[10000];
cout << "Got past the new request;\n";
}
catch(... |
6ee0c4b8b2824944eec2f5ec7f7dcf64b7d5816e | c02571497eec1bff8f8996073df207a4ad1c5324 | jjqcat/capstone-2021-6 | /Sources/Texture2D.cpp | C++ | cpp | 2,498 | permissive | #include "Texture2D.h"
#include <iostream>
#ifndef STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#endif
Texture2D::Texture2D(std::string_view filePath, Sampler2D sampler, bool bGenerateMip) :
m_id(0),
m_latestSlot(0),
m_uri(filePath)
{
int width = 0;
int height = 0;
int channels = 0;
unsigned char* da... |
fb066b349957f92d1939dddf5d8ba53e4f0da67d | 50ecea640cbdfb8a14e0c8844407cf450d3c353a | Windowline/Baekjoon-Online-Judge | /2320(끝말잇기)_sol1.cpp | C++ | cpp | 1,052 | no_license | #include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
int N;
string words[17];
int dp[17][1 << 17];
int solve();
int maxDepth(int, int);
int solve()
{
int ans = 0;
for (int s = 0; s < N; s++)
{
memset(dp, -1, sizeof(dp));
int tmp = maxDepth(s, (1<<s))... |
e3cbe546cb0bfe81a96e53a901644bea0e7de5aa | 2f6325336116788667c945d33ef63c065e51eb81 | aogcontrols/T3000_Building_Automation_System | /T3000/Flash_Multy.cpp | C++ | cpp | 65,744 | no_license | // Flash_Multy.cpp : implementation file
// This file added by Fance Du 2014/06
#include "stdafx.h"
#include "T3000.h"
#include "Flash_Multy.h"
#include "afxdialogex.h"
#include "MainFrm.h"
#include "globle_function.h"
#include "Dowmloadfile.h"
// CFlash_Multy dialog
CString ApplicationFolder;
CString MultyISPtool_pat... |
ffa0b43fa52cf7d957c69868eb81d07a6ec9a005 | f17f17ec0826842b4567793d2f501a2113c2e47e | sunho/algorithms | /old/codeforces/D_Circle_Game.cpp | C++ | cpp | 2,352 | no_license | #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
using ll = long long;
// p = k*a q = k*b
// all possible moves can be represented by a grid.
// we can notice that if we divide the grid by a diogonal line, upper section and lower section are symmetric.
// that f(p,q) = f(q,p) where f is ... |
8edfdde7a024652e5bc372be54b002d2b91b8a26 | b9b2e13440a3050a17434743d4984a3990613b1e | snapmatty/OOP-CPP | /OOP2ndsem/lab5 Basic Inheritance/main.cpp | C++ | cpp | 1,805 | no_license | #include <iostream>
#include <string>
using namespace std;
class Animal
{
public:
string species;
int weight, height;
Animal(): species("Lion"), weight(240), height(175) { }
//default constructor//
virtual void display()=0;
virtual void inZoo()=0;
... |
fe4c6c7d77127623ec4f328294f376b4b8967b10 | fb33d07f3df0429a8ec5da7e60ff20c66f8409aa | Mutanne/hiworld | /eng_mecat_bkp/Prog1/boliche prof.cpp | C++ | cpp | 466 | permissive | #include<iostream>
using namespace std;
int main(){
int n, a, l, p;
int lados = 0;
cin>>n;
cin>>a;
cin>>l;
cin>>p;
n*=2;
if(l<n){
lados++;
}
if(a<n){
lados++;
}
if(p<n){
lados++;
}
if(lados == ... |
6e3a5ed1167e5a24fac21afde2b93ddac644507b | e01cbe899f06173a532c8f336382531e5141d8c0 | pmelendez/ilove2d | /src/modules/graphics/Drawable.cpp | C++ | cpp | 1,043 | permissive | /**
* Copyright (c) 2006-2010 LOVE Development 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 any purpose,
... |
2a2cca63b61503d61dd7bacad079a527184fd8d4 | 90e6aacad7d7955bcbceb0f503e8466c2b0d721d | ojy0216/BOJ | /18258.cpp | C++ | cpp | 1,030 | no_license | #include <cstdio>
#include <queue>
#include <cstring>
using namespace std;
int main(){
int n;
scanf("%d", &n);
queue<int> q;
for(int i = 0; i < n; i++){
char op[6];
scanf("%s", op);
if(strcmp(op, "push") == 0){
int tmp;
scanf("%d", &tmp);
q.... |
a35cf9e9058d875af391272fbdba84d6d4407c9a | 86c16d3fec4d962211d2ac33c865099640047d3a | tangshi/PaperPlane | /OgreFinal/OpenSrcLib/OgreMax/OgreMaxModel.cpp | C++ | cpp | 55,647 | no_license | /*
* OgreMax Sample Viewer and Scene Loader - Ogre3D-based viewer and code for loading and displaying .scene files
* Copyright 2013 AND Entertainment
*
* This code is available under the OgreMax Free License:
* -You may use this code for any purpose, commercial or non-commercial.
* -If distributing deri... |
fe87790ebca18c69fa48857cd1320fbbb0a20b8f | b724c58256f078eb756010d8449df1935df3e047 | victusfate/nvpr_demo | /cg4cpp/src/exp2.cpp | C++ | cpp | 1,633 | no_license | /*
* Copyright 2006 by NVIDIA Corporation. All rights reserved. All
* information contained herein is proprietary and confidential to NVIDIA
* Corporation. Any use, reproduction, or disclosure without the written
* permission of NVIDIA Corporation is prohibited.
*/
#include <Cg/half.hpp>
#include <Cg/... |
7e7ab115e275434fb10bca20c8e17bd9c4a46c9a | 2daf7eae9c59bf151ccc660a31accb7e47af157b | wr786/Key-to-PKU-cxsjsx | /OpenJudge/股票买卖.cpp | C++ | cpp | 1,214 | no_license | #include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int n;
int a[100001]; // 草,居然不是50,看错力(大悲
int dp[3][2];
// 滚动窗口,省一维
// _, _ => buytimes, if with stock
int main() {
ios::sync_with_stdio(false); cin.tie(0);
int t; cin >> t;
while(t--) {
cin >> n;
for(int i=1; ... |
2055c1f1e66101ff6f14c6700008bbb305362a94 | 00a1a3b3a6b25fe81e386ef57657652068c50f7f | Navatusein/Minecraft-GLFW | /Minecraft GLFW/Source/Player/Player.cpp | C++ | cpp | 6,493 | no_license | #include "Player.h"
const vec3 Dimensions(0.3, 1.5, 0.3);
Player::Player(World* world, PlayerGUI* pGUI) :HitBox(Dimensions), world(world), pGUI(pGUI) {
Position = {5, 16, 5};
FOVSettings = 100.f;
renderDist = 10000.f;
camera = new Camera(&Position, &View, &FOV, renderDist);
yaw = 90;
pitch = 0;
LastTime ... |
5c59eaa6d3f89d98a8dbf20dbd898cfe885f6194 | f643db8ae6d85017ff08588a3ce77a6d254dbaa4 | git-Charlie/ARK-SDK | /SDK/ARKSurvivalEvolved_Tek_Generator_Placement_Emitter_parameters.hpp | C++ | hpp | 967 | permissive | #pragma once
// ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_Tek_Generator_Placement_Emitter_classes.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Parameters
//--------------------------------------... |
5f21e94ae7d060b9f08514c7619972a6c34f99c4 | 0561b5dfb6866e37b7c02577431bfeb295d52b48 | GitPaean/opm-parser | /opm/parser/eclipse/IntegrationTests/BoxTest.cpp | C++ | cpp | 5,280 | no_license | /*
Copyright 2013 Statoil ASA.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any l... |
23708b218f0412ad7b770f2e2dad29cf0fde3fe0 | cc3debabf69efb5fb92f3a876be3e902050f4bf0 | nitinkedia7/competitive-coding | /codeforces/round_587/B.cpp | C++ | cpp | 509 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int,int>> v(n);
int d;
for (int i = 0; i < n; i++) {
cin >> d;
v[i] = {d, i};
}
sort(v.begin(), v.end(), greater<pair<int,int>>());
long long shots = 0;
for (int i = 0; i < n; i++... |
99760c69c6204321c91913ef9cba30224a40a61b | fe6cbc85d49ee73d30ba1852c66438a9ee043c71 | wucanyi/vc2-reference | /src/EncodeHQ-CBR/EncodeHQ-CBR.cpp | C++ | cpp | 22,513 | permissive | /*********************************************************************/
/* EncodeHQCBR.cpp */
/* Author: Tim Borer */
/* This version 18th September 2013 */
/* ... |
cd1500dca492a6e06bbc6eaf11cba3ab16e5a91c | 77ff811dd0641eb0b3fbdba2be5a9db39306b887 | denysvitali/tuna-ge | /test/OvoScene.cpp | C++ | cpp | 2,665 | no_license | #include <iomanip>
#include <FreeImage.h>
#include <gtest/gtest.h>
#include "../tuna-ge.h"
#include "../structure/utils/CurrentDir.h"
#include "utils/ImageComparator.h"
using namespace tunage;
using namespace testing_utils;
namespace {
class OvoScene : public ::testing::Test {
protected:
// You can remove any... |
662fdf7e24e5fbea4b8b7cdc3ba14eabbcf4a129 | e12b2813af69f61d7c8c7390a3288a6541a057c6 | ayushmankumar7/tensorflow | /tensorflow/core/profiler/convert/xplane_to_tools_data.cc | C++ | cc | 8,577 | 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... |
55bebda4b6d3f105eb6abfc452bd10a2f0c2db8a | 6b1c1cab743b344659afc5a9d3c5632202bc9d1e | stevenjj/PnC | /PnC/Filters/Kalman/MeasurementModel.hpp | C++ | hpp | 3,016 | permissive | // The MIT License (MIT)
//
// Copyright (c) 2015 Markus Herb
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, cop... |
3d829ac93da2c4d02edaac35b82182e8b3655fc7 | aaf5229a4780f36a16aca770e2f191a45d58b5e4 | jacklee032016/pbx | /800/VPBX_Support/stacks/sipstack/SipVia.cxx | C++ | cxx | 23,800 | no_license | /*
* $Log: SipVia.cxx,v $
* Revision 1.1.1.1 2006/11/30 16:27:10 lizhijie
* AS800 VPBX_Support
*
* Revision 1.1.1.1 2006/06/03 11:55:33 lizhijie
* build a independent directory for VPBX support libraris
*
* $Id: SipVia.cxx,v 1.1.1.1 2006/11/30 16:27:10 lizhijie Exp $
*/
#include "global.h"
#include "Data.hxx"
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.