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 |
|---|---|---|---|---|---|---|---|---|
e15b05126722f001b77bc1db66668258afe1a1c5 | ffbb22c21a100b8c77bf81857a9081765852cd30 | 1BB3/c-programs | /1_5.cpp | C++ | cpp | 385 | no_license | #include <stdio.h>
#include <conio.h>
main(){
int u;
float c;
printf("Enter the unit : ");
scanf("%d",&u);
if(u >21 && u <71){
c = 180 + (u - 20)*6.5;
}else if (u > 70) {
c = 180 + (u - 70)*8.5;
}else{
c = 180;
... |
6c456ccc73a21cde7318494666ddfd4cf4d8a6b2 | 0ec09eda793ff166c451f35a5b39e042d9339625 | jcconnol/Programming-Challanges-Probs | /Queue10128/main.cpp | C++ | cpp | 1,005 | no_license | /*
* File: main.cpp
* Author: John Connolly
*
* Created on February 25, 2018, 1:56 PM
*/
#include <cstdlib>
#include <iostream>
#include <ios>
#include <cstdio>
#include <stdio.h>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
void setup(long long arr[20][20][20]... |
5fd8c1d75a9ae462c3722600496c42e955f1ee71 | 85eb7f212308c986b7d56c64765b9406e4005e1c | takaxyz/atcoder | /ABC115/D.cpp | C++ | cpp | 963 | no_license | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define VI vector<int>
#define MOD 1000000007
using ll = long long int;
using P = pair<int,int>;
template<class T>bool chmax(T &a, const T &b) { if ... |
4e47f6a092eba186210e4542b92e827345a46e11 | 6513c71ddf241c30538a577a2b1ac47dc8602412 | yassine-alaoui/cpp | /day04/ex01/Character.hpp | C++ | hpp | 1,454 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Character.hpp :+: :+: :+: ... |
c77614dfac69d647777dc7f586d096e8d7378385 | fcf57215bb47e6336fb3838e179d4fd52e26edc0 | m-ll/boulderdash | /sprite_rotation.cpp | C++ | cpp | 1,660 | permissive | ///
/// Copyright (c) 2004-19 m-ll. All Rights Reserved.
///
/// Licensed under the MIT License.
/// See LICENSE file in the project root for full license information.
///
/// 2b13c8312f53d4b9202b6c8c0f0e790d10044f9a00d8bab3edf3cd287457c979
/// 29c355784a3921aa290371da87bce9c1617b8584ca6ac6fb17fb37ba4a07d191
///
#incl... |
d7863f39ca97be9663eda971e9d27387185e0a7f | dc988010ecf9b21088c5a3e61fc8f2582a9a63f7 | vrnet/communitymodules | /Community/General/Sources/ML/MLPDF/abstract/PDFGenerator/PDFGenerator_Graphics.cpp | C++ | cpp | 20,691 | no_license | //----------------------------------------------------------------------------------
//! The ML module class SavePDF.
/*!
// \file PDFGenerator_Graphics.cpp
// \author Axel Newe (axel.newe@fau.de)
// \date 2015-10-16
//
// Base class for PDF creators.
*/
//--------------------------------------------------------... |
1665c0d5b7abdc0d7dc2dee2fd2b11082387cdb1 | f2c77f8cfeef524e1e3af0f983e6923dd66e3fc9 | liushaopu8/Elastos.OS | /Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/text/style/MaskFilterSpan.cpp | C++ | cpp | 1,731 | permissive | //=========================================================================
// Copyright (C) 2012 The Elastos Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... |
9b9655797a5ab993ed4c933c55e200dfb80fd9da | bb28dedf50238a9e9f12e9a3df7e718d61fe58f6 | LegalizeAdulthood/cimple | /src/wmi/gadget/Gadget_Provider.cpp | C++ | cpp | 3,759 | permissive | /*
**==============================================================================
**
** Copyright (c) 2003, 2004, 2005, 2006, Michael Brasher, Karl Schopmeyer
**
** Permission is hereby granted, free of charge, to any person obtaining u32a
** copy of this software and associated documentation files (the "Software"),... |
3b7179c89313dedd41c39d29e86870f753885928 | 124dbf5d45a703532332b66635ccaabbc08b5201 | rmacnak-google/engine | /shell/common/shell_unittests.cc | C++ | cc | 150,064 | permissive | // Copyright 2013 The Flutter 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 "include/core/SkMatrix.h"
#define FML_USED_ON_EMBEDDER
#include <algorithm>
#include <ctime>
#include <future>
#include <memory>
#include <vector... |
3e79fe9f2323cda2f5d66144bbd7bae90d8c93b2 | f1f9c4e069125d289a55036bb68876f6ae1ec49e | ibrncfe/CPP_Practices | /inverse string.cpp | C++ | cpp | 381 | no_license | #include<iostream.h>
void inverse(char* str){
if(str !=NULL){
char* ptr1=str; char* ptr2=str;char tmp;
while(*str!='\0') ptr2++ ;
ptr2--;
while(ptr2>ptr1)
{
tmp=*ptr1;
*ptr1=*ptr2;
*ptr2=tmp;
ptr1++;ptr2--;
}
}
}
int main(){
char str[8];
cin.getline(str,sizeof(st... |
2c957c89aabb687b80d19e0283c54ea442fcab27 | 92ab21a7b3c7326321daddfcf16873919d8a4220 | semenovf/pfs | /include/pfs/cxx/cxx98/sigslot.orig.hpp | C++ | hpp | 68,968 | no_license | // sigslot.h: Signal/Slot classes
//
// Written by Sarah Thompson (sarah@telergy.com) 2002.
//
// License: Public domain. You are free to use this code however you like, with the proviso that
// the author takes on no responsibility or liability for any use.
//
// QUICK DOCUMENTATION
//
// (see also the ful... |
7beef07c60c45e92abc4348ac00f5d10976192f3 | 282730593deb8cbfd8c64b9fbd0eb931d3976b3a | recepkandemir/opticks | /opticksgeo/tests/TorchStepNPYTest.cc | C++ | cc | 1,647 | permissive | /*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 ... |
ee497bb6bad59b0bcfba2a3f09c776cc3c954b61 | 788c512b6a8be7ffe0df7ae512929ed63505f37d | kcvlex/compro | /lib/strings/ahocorasick.hpp | C++ | hpp | 2,265 | no_license | #pragma once
#include "util/template.hpp"
namespace strings {
struct AutomatonNode {
using node_ptr = AutomatonNode*;
vec<node_ptr> nexts;
vec<size_type> accept;
node_ptr fail;
AutomatonNode(size_type sz) : nexts(sz + 1, nullptr)
{
}
};
struct AhoCorasick {
using node_ptr = Automaton... |
f0e38d1543efd722edd1fa6a0870ee9b5414bc0b | 2ebdfadb1f4793369e554e5fb50764be429e8fdc | DaeunSim/coding-practice | /HackerRank/30 Days of Code (C++)/Day 01 Data Types/Solution.cpp | C++ | cpp | 1,114 | no_license | /*
Author: https://www.hackerrank.com/profile/AllisonP
Difficulty: Easy
Submitted By: https://www.hackerrank.com/challenges/30-data-types/leaderboard
*/
#include <iostream>
#include <iomanip>
#include <limits>
using namespace std;
int main() {
int i = 4;
double d = 4.0;
string s = "HackerRank ";
... |
33908223ab2af6aa50d5a0294bb3b82aec677f24 | 53b88be53a52990255b8df749a76b0be6f77f9de | cjvogl/mfem | /fem/coefficient.hpp | C++ | hpp | 84,854 | permissive | // Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM library. For more information and source code
// availability visit ht... |
42cbee9f3cac22e9996e85b48ff55873c1c54ce0 | 0458f815f3aa1a6b83e00e1b3c5fd4eba8ae09ea | cosu/aws-sdk-cpp | /aws-cpp-sdk-quicksight/source/model/DashboardVersion.cpp | C++ | cpp | 4,291 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/quicksight/model/DashboardVersion.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
n... |
2a7597668257d5eb26d7700e736f18c27be90e19 | c1c70a8976c6ce44eb7f79fbe95fe23f727d2e40 | anjalirajan/Thunder | /Source/plugins/MetaData.cpp | C++ | cpp | 9,158 | permissive | /*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2020 RDK Management
*
* 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 cop... |
ccffaf0cb7ca0758bb02da4d8334c154c315f19a | 0de5d50f975b5a7fe9822f51b2689a3ed4f6875f | YuxinZou/OpenGL-lab | /opengl_lab/code/ecg_ex04_b.cpp | C++ | cpp | 2,136 | no_license | #include "gl/OGLIncludes.h"
#include "gl/oglcontext/GLFWContext.h"
#include "gl/OGLContext.h"
#include "gl/oglobject/OGLMeshObject.h"
#include "gl/oglobject/OGLNormalMeshObject.h"
#include "gl/oglobject/OGLSGRotationalAnimator.h"
#include "gl/oglobject/OGLColoredMeshObject.h"
#include "utility/OGLUtils.h"
#include "u... |
f1592d07b58affb75623d234977ce233ad1096cb | 9ab7645569c85e3844cbbef1e3e96aafb2ebda8f | gnzlbg/hm3 | /test/hm3/io/file.cpp | C++ | cpp | 2,036 | permissive | /// \file
///
/// File I/O tests
#include <hm3/types.hpp>
#include <hm3/utility/test.hpp>
#include <hm3/geometry/point.hpp>
#include <hm3/io/session.hpp>
#include <hm3/io/client.hpp>
#include <iostream>
using namespace hm3;
int main() {
auto env = mpi::env();
auto comm = env.world();
string session_name = "te... |
852bdaa806ba92af0a2751d46f29eac96b1c8abb | f604dcabcfc3e8f35f0af3b577162250f1a249b0 | wangdi2014/smufin-core | /src/registry.hpp | C++ | hpp | 2,838 | no_license | /*
* Copyright © 2015-2019 Barcelona Supercomputing Center (BSC)
*
* This file is part of SMUFIN Core. SMUFIN Core is released under the SMUFIN
* Public License, and may not be used except in compliance with it. This file
* is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; see the SMU... |
f03f867cf26f49b139046563d80171b41adca108 | 9e91c38160582f9a0e44bb4486bcc735baa312cb | Faroito/MarioScene | /source/BulletBill.cpp | C++ | cpp | 541 | no_license | //
// Created by Timothée Couble on 02/11/2019.
//
#include "BulletBill.hpp"
scene::BulletBill::BulletBill(unsigned int id) : Creature(ModelType::BULLET_BILL, id) {}
scene::BulletBill::BulletBill(const scene::AObject &other, unsigned int id) : Creature(other, id) {}
scene::BulletBill::~BulletBill() {
Creature::... |
6405dd79eb36b76a0c90e9d4f10e6e5586357a8f | 8800f45b6be010b5676476f89cbd08d64e69fd79 | SammyB428/WFC | /Sample/Service/Service.cpp | C++ | cpp | 5,807 | permissive | /*
** Author: Samuel R. Blackburn
** Internet: wfc@pobox.com
**
** Copyright (c) 1996-2003, Samuel R. Blackburn
** All rights reserved.
**
** "You can get credit for something or get it done, but not both."
** Dr. Richard Garwin
**
** BSD License follows.
**
** Redistribution and use in source and binary forms, with or... |
ea0446536f21e762658559c8a2fb78758c46f6e8 | 8834b587f1e98733c56214bb186f63b8982aaabb | lvindoor/S-EDA1-Actividad_19 | /videogame.cpp | C++ | cpp | 3,696 | no_license | #include "videogame.h"
#include <fstream>
#include <algorithm>
Videogame::Videogame() { } // constructor
void Videogame::agregarCivilizacion(const Civilizacion &c) { // sobrecarga
civilizaciones.push_back(c);
}
void Videogame::mostrar() {
cout << left;
cout << setw(20) << "\tNombre ";
cout << setw(1... |
804f6062e08cf8a5508e843f5ebdff6df5e1427b | 0aaa9f7db1d15b851dea54218b71e5ae8ac4a8af | lmontigny/hackerrank | /Challenges/Implementation/migratory-birds.cpp | C++ | cpp | 680 | no_license | // Migratory Birds Hackerrank solution
#include <bits/stdc++.h>
using namespace std;
int migratoryBirds(int n, vector <int> ar) {
// Complete this function
vector<int> counter;
for(int i = 0; i < 5; i++){
counter.push_back(std::count(ar.begin(),ar.end(), i+1));
//cout << std::count(ar.beg... |
578407fab19ddf3846801e49b93e7724dbac8748 | 5496cd44181169c528a0853bd5e416615a1a8067 | isabella232/cr-archive | /valhalla/121/webrev.00/src/hotspot/share/ci/ciInlineKlass.cpp | C++ | cpp | 5,247 | no_license | /*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
d198e4118e6b9b654092529c56df1e30c262aa60 | 280753b1ed1d4d5d89b13c6a089c3ca2a0d66dfc | nitin0280/cses-problemset | /range-queries/list-removals.cpp | C++ | cpp | 2,501 | no_license | #include <bits/stdc++.h>
typedef long double ld;
#define int long long
#define gcd __gcd
#define endl "\n"
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define mod2 998244353
#define maxe *max_elemen... |
3a6ffc8d1b4c8d96111e6973ffbd8a93f152a309 | dd36446ffeff3d5a87b85786933b2ef1fab353fa | islamdib/drone_mav_controller | /trajectory_desired/slros_initialize.cpp | C++ | cpp | 405 | no_license | #include "slros_initialize.h"
ros::NodeHandle * SLROSNodePtr;
const std::string SLROSNodeName = "Trajectory_Desired";
// For Block Trajectory_Desired/Publish
SimulinkPublisher<desired_msgs::Desired, SL_Bus_Trajectory_Desired_desired_msgs_Desired> Pub_Trajectory_Desired_4;
void slros_node_init(int argc, char** argv)
... |
bf64eaf6580f128562f82f444b1301c9904ce043 | 6aa86e2e3fa168409bdff596117e78e1c250da2c | meng-xiao/JHUGen | /JHUGenMELAv2/MELA/src/TensorPdfFactory_HVV.cc | C++ | cc | 1,223 | no_license | #ifdef _def_melatools_
#include <interface/TensorPdfFactory_HVV.h>
#else
#include "../include/TensorPdfFactory_HVV.h"
#endif
TensorPdfFactory_HVV::TensorPdfFactory_HVV(RooSpin::modelMeasurables measurables_, RooSpin::VdecayType V1decay_, RooSpin::VdecayType V2decay_, Bool_t OnshellH_) :
TensorPdfFactory(measurables_,... |
9d479eb78401bfb301c87e01cfbf8ca410d79acb | 6b1f0d2544bb2ecf9415caae5e50930d334400d4 | AzureMentor/chromium | /net/http/alternative_service.cc | C++ | cc | 7,589 | 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/http/alternative_service.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/stringprintf.h"... |
5432173c0996575b66678ad86c3e613c58a60212 | 66faa6e746696a0e312344a604c49a7f53802e4a | xycruise/3D_Hair_Rendering | /mitsuba/src/phase/rayleigh.cpp | C++ | cpp | 2,982 | no_license | /*
This file is part of Mitsuba, a physically based rendering system.
Copyright (c) 2007-2011 by Wenzel Jakob and others.
Mitsuba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.
... |
7d72a3d145e141e099f2c005b229b7eb99bfe170 | 79b2fab76f8764cd6cbe462b47042ac034f60dfa | isaigm/leetcode | /daily-temperatures/Time Limit Exceeded/2-28-2021, 7_39_56 PM/Solution.cpp | C++ | cpp | 547 | no_license | // https://leetcode.com/problems/daily-temperatures
class Solution {
public:
vector<int> dailyTemperatures(vector<int>& T) {
std::vector<int> ans(T.size());
for(int i = 0; i < T.size() - 1; i++)
{
int m = 0;
for(int j = i + 1; j < T.size(); j++)
{
... |
2fa0f4e4fa3c5ab2158137dbfa12201f8962534b | dab0d76d676ea3f7c67396c8d4875b94121a33da | nowacoder/cpp-nowcoder | /HJ028_Prime_Mates.cpp | C++ | cpp | 2,058 | no_license | #include <vector>
#include <chrono>
#include <iostream>
using namespace std;
vector<int> get_primes() {
vector<int> primes = {2, 3, 5, 7, 11, 13};
int flag;
for (int i=17; i<59999; i++) {
flag = true;
for (int p : primes) {
if (i%p==0) {
flag = false;
... |
5d69c6a0a8a81c9068b1f9982625c894f7a603f2 | 89e802875f86231fb1f35e6f3c8c04ea3146f870 | Sreekar33/Data-Structures-Assignments | /Hash Tables/hashtable4.cpp | C++ | cpp | 3,748 | no_license | /* name :Sreekar B
CS14BTECH11033
*/
//implementing hash tables using quadratic probing
#include"iostream"
#include"string" //for length of string
using namespace std;
class node{
public:
bool b; //declaring a class
string k;
... |
090c72f4ffa3de7ce926a19d1e652d0575e9b2a3 | d9b8f670eec285fb534683a91bb7a50e9d68052d | Yisaer/ACM_ICPC | /ACMTemplate/扩展欧几里得算法/main.cpp | C++ | cpp | 718 | no_license | //
// main.cpp
// 扩展欧几里得算法
//
// Created by 高松 on 16/1/2.
// Copyright © 2016年 yisa. All rights reserved.
//
//扩展欧几里得算法 求解求解形如ax+by=c的整数解 x y
#include <iostream>
using namespace std;
int exgcd(int a,int b,int & x,int & y){
if(b == 0){
x = 1;
y = 0;
return a;
}
int r = exgcd... |
5832c8ea5afa9a56032ae9a4ad977d9d4473fa42 | da1c4ebab0650b213f16aa4699c3dec9da83f382 | WALDOISCOMING/CPP_ALGORITHM | /selection_sort.cpp | C++ | cpp | 597 | permissive | #include<iostream>
using namespace std;
static int ARRAY[6] = {3,6,4,5,1,2};
static int SIZE=6;
void printArray(){
for(int i=0;i<6;i++){
cout<<"["<<ARRAY[i]<<"]";
}
cout<<endl;
}
void selectionSort(){
int biggest=-1;
int index;
int tmp;
if(SIZE==0){
return;
}
for(int i=0;i<SIZE;i++){
if(ARRAY[i]>=biggest){
... |
2ba046eddc69a180a83b628f920b6c62a15fa0e9 | ff313a2d8849924ba512e3cb9b024d7166756b29 | Havoc-OS/android_bionic | /tests/libs/cfi_test_helper.cpp | C++ | cpp | 1,730 | no_license | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
6499b74d285e163de091c42f536e25ee969d21ef | 2593de0a3cbfeab6004f958d1c77e37dbfde600d | ryotassk/Geant4 | /lab/source/include/Geometry.hh | C++ | hh | 650 | no_license | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Geometry.hh
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#ifndef Geometry_h
#define Geometry_h 1
#include "G4VUserDetectorConstruction.hh"
class G4VPhysicalVolume;
//--------------------------------... |
1e7d3adb17aa22ab435773e3551e7aa85c07b46d | 37b0204eca6e75b9bd13fc2a2eacbf898830d75d | PradeepLogu/testdev | /vendor/ruby/1.9.1/gems/capybara-webkit-0.13.0/src/WebPageManager.cpp | C++ | cpp | 3,059 | permissive | #include "WebPageManager.h"
#include "WebPage.h"
#include "NetworkCookieJar.h"
WebPageManager::WebPageManager(QObject *parent) : QObject(parent) {
m_ignoreSslErrors = false;
m_cookieJar = new NetworkCookieJar(this);
m_success = true;
m_loggingEnabled = false;
m_ignoredOutput = new QString();
m_timeout = -1... |
7a61a2a66970d4659d5dfece085afc03d3b12b35 | 47aa5d691080c0b3902fbd6e87f7616b1a6c32e3 | sebsiman/Cplusplus-projects-3 | /035_germanicus/main.cpp | C++ | cpp | 1,709 | no_license | #include <iostream>
#include <fstream>
using namespace std;
const int CIPHER = 5;
int main()
{
ifstream myInFile;
ofstream myOutFile;
// 1. Open files
myInFile.open("C:\\Users\\Sebastian.Siman001\\Documents\\Original.txt");
myOutFile.open("Cesar.txt");
// defensive code
... |
b92b41c7fb17248add0787168af23b64acb6e344 | 50530fbdf1e71b148ad2e3561aeae5412f7834c3 | sdslabs/Rootex | /rootex/core/resource_files/sky_material_resource_file.cpp | C++ | cpp | 3,569 | permissive | #include "sky_material_resource_file.h"
#include "resource_loader.h"
#include "framework/systems/render_system.h"
void to_json(JSON::json& j, const SkyMaterialData& s)
{
j["sky"] = s.skyImage;
}
void from_json(const JSON::json& j, SkyMaterialData& s)
{
s.skyImage = j.value("sky", String("rootex/assets/sky.dds"));
... |
01499df2e534e98144b86ff342f0c57c2fdf1f29 | 2c73c29910377a97e412ad225bc23eaf3ca0fc46 | setnemo/cpp-sandbox | /coursera/cpp-white-belt/week_03/06_ReversibleString.cpp | C++ | cpp | 304 | no_license | #include <iostream>
#include <string>
#include <algorithm>
class ReversibleString {
public:
ReversibleString() {};
ReversibleString(const string& str) {
s = str;
};
void Reverse() {
reverse(s.begin(), s.end());
}
string ToString() const {
return s;
}
private:
string s;
};
|
4c28ccc2a62aff231d516386b824880cdb853bf3 | 81111e0251d6285144c6fa55bc0770cfbb5132dc | phbou72/design3 | /remise/livrable3/app/src/kinocto/src/vision/SudocubeExtractor.cpp | C++ | cpp | 6,507 | no_license | #include "vision/SudocubeExtractor.h"
using namespace cv;
using namespace std;
const char SudocubeExtractor::OUTPUT_PATH[] = "output";
SudocubeExtractor::SudocubeExtractor() {
white = cv::Scalar(255, 255, 255);
black = cv::Scalar(0, 0, 0);
sudocubeNo = 1;
}
SudocubeExtractor::~SudocubeExtractor() {
}
S... |
03b8d7c3eed3e09abd166e336cb80875bd92149b | b61faba9bae715d763e20824c8dd787629014bc2 | alsuga/Maratones | /CompetitiveProgramming3/12015-GoogleIsFeelingLucky.cpp | C++ | cpp | 536 | no_license | #include <bits/stdc++.h>
using namespace std;
#define __ ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl '\n'
int main(){__
int n, val, mx;
cin >> n;
string in;
for(int caso = 1; caso <= n; caso++) {
map<int, vector<string> > mapa;
mx = -1;
for(int i = 0; i < 10; i++) {
cin >> in... |
2699949a61c06bdf6af2485795a31968cd955a41 | b627bdeae46f036f377125c9175210df2cb2ff1b | Mohsin-syed/uetian87 | /Loops/main3.cpp | C++ | cpp | 566 | no_license | #include <iostream>
using namespace std;
main()
{
int a;
int k=0;
cout<<"Enter the value of a"<<endl;
cin>>a;
while(a>1){
if(a%2==0){
a=a/2;
}
else{
a=(3*a+1);
}
... |
dd5625fd9f611db8388049825c00f09fb8a4a297 | e8e79a004aa18c69875c104fe87eff3f5dbab055 | codenikhil1/30-Days-of-code | /Day K: Sorting.cpp | C++ | cpp | 553 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,p=0;
cin >> n;
vector<int> a(n);
for(int a_i = 0; a_i < n; a_i++){
cin >> a[a_i];
}
for(int i=0;i<n;i++){
for(int j=0;j<n-1;j++){
if(a[j]>a[j+1]){
int temp=a[j];
a[j]=a[j+1... |
ec83b3d0ba4d0f32dad908200527cec6460ba4a4 | 0a0634e0923a1923c5922b152a6e42ac94e7950d | CRblog/algorithm | /practice/day/d9格子路径.cpp | C++ | cpp | 422 | no_license | #include<bits/stdc++.h>
using namespace std;
int dp[1003][1003];
int main()
{
int m,n;
while(cin>>m>>n)
{
int x = max(m,n)+1;
for(int i=1;i<=x;i++)
{
dp[1][i] = i+1;
}
for(int i=1;i<=x;i++)
{
dp[i][1] = i+1;
}
for(int i =2;i<=x;i++)
{
for(int j=2;j<=x;j++)
{
dp[i][j] = dp[i-1]... |
392ffc28549379918e612a330fc6c3c6dbca9398 | ac726910f8f43575cf0bc377130f8017e57c0fa6 | evgenytalanin-intel/openvino_contrib | /modules/arm_plugin/src/transformations/convert_interpolate_arm.hpp | C++ | hpp | 319 | permissive | // Copyright (C) 2020-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <ngraph/pass/graph_rewrite.hpp>
namespace ArmPlugin {
namespace pass {
struct ConvertInterpolate: public ngraph::pass::MatcherPass {
ConvertInterpolate();
};
} // namespace pass
} // namespace ArmPlugin
|
6441d068a385cf2ee425b45162710b2fe1b2b8c6 | 50dc25475d4c801732170e47008f8f34c24f7038 | 409033632/hhvm | /hphp/runtime/base/file.cpp | C++ | cpp | 27,794 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
+---------... |
036449110f9a18e2cff852528a016217af79382f | 82409b9fba3d96673f0abb5c9d8e650ad30d878d | veera-sivarajan/CBSE-Class11 | /Count The Number Of Words.CPP | C++ | cpp | 470 | no_license | #include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
void main()
{ //Count number of words
clrscr();
char s[50][50];
int n,i,j,c=0,l;
cout<<"Enter the number of strings:";
cin>>n;
for(i=0;i<n;++i)
{ cout<<"Enter string "<<i+1<<":";
gets(s[i]);
}
for(i=0;i<n;+... |
4952c2d2e5ef91e00a62e2ba449865707ba2e158 | c4ee232a847c0d7cf322df52fef389bdf2e5d911 | liddiard/cs32 | /proj/2/DivStatement.cpp | C++ | cpp | 569 | permissive | #include <stdlib.h>
#include <iostream>
#include "DivStatement.h"
using namespace std;
DivStatement::DivStatement(char var, int value)
: m_variableName( var ), m_value ( value )
{}
void DivStatement::execute(ProgramState * state, ostream &outf)
{
char var = this->m_variableName;
int val = this->m_value;
... |
8a5964e6ba6c9fb02dbc152b612e1054bdc863ba | aca0c83b3c81d07b9efbfd2a6b564ae663387d1e | lineagech/LintCode | /Maximum_Product_of_Word_Lengths.cpp | C++ | cpp | 701 | no_license | class Solution {
public:
/**
* @param words: a string array
* @return: the maximum product
*/
int maxProduct(vector<string> &words) {
// Write your code here
int n = words.size();
int ans = 0;
vector<int> mask(n,0);
for( int i = 0; i < n; i++ )
{
... |
58bd028f3db232e511e04d973cb96a8bc67afe23 | d576e7c6be3fa4807296a3acbd964d162bf158ea | GraduatePishi/EffectsOfNetworkTopologyADMM-SVMs-code | /internal/ADMM_SVM/src/NodeSolver_linear.cpp | C++ | cpp | 7,765 | no_license | #include "NodeSolver_linear.h"
#include<iostream>
#include <Eigen/IterativeLinearSolvers>
#include <Eigen/unsupported/IterativeSolvers>
#pragma warning( push )
#pragma warning( disable : 4267)
#include <nlopt/nlopt.hpp>
#pragma warning( pop )
using namespace std;
using ExceptionError = std::runtime_error;
Eigen::Vector... |
ba6b9f55453138b3b6479577bdd52dd19677011f | a78cf90de4f3efbeefb12e31626df69610c39b1f | shockjiang/acm | /scenarios/acm-twopath.cc | C++ | cc | 3,428 | no_license | #include <ns3/core-module.h>
#include <ns3/network-module.h>
#include <ns3/ndnSIM-module.h>
namespace ns3 {
int
main(int argc, char* argv[])
{
int stage = 17;
float interval = 20.0;
string topo = "topologies/topo-3link-loss1.txt";
int loss = 1;
int load = 50;
string id = "2";
CommandLine cmd;
cmd.AddV... |
d96b95a80185b828c5f1fee177e0213de132090f | 7c09b79089e7e603dd4fbc9f30a0268a3a24979d | phoxtail/amule | /src/utils/aLinkCreator/src/md4.cpp | C++ | cpp | 11,124 | no_license | ////////////////////////////////////////////////////////////////////////////////
/// Name: MD4 Class
///
/// Purpose: aMule ed2k link creator
///
/// Last modified by: ThePolish <thepolish@vipmail.ru>
///
/// Copyright (c) 2004-2011 ThePolish ( thepolish@vipmail.ru )
///
/// Copyright (c) 2004-2011 Marcelo... |
dce18a1ef7a08d540210de30952539b11292859c | 577e8b663c4a8e7fbb47f6917c8d56382c3ef11c | lcapkovic/aoc2018 | /day9/sol1.cpp | C++ | cpp | 1,435 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <boost/algorithm/string.hpp>
#include <set>
using namespace std;
struct Node {
int n;
Node *prev;
Node *next;
};
long sol(int n, int l) {
Node first;
first.n = 0;
first.prev = &first;
... |
6b017b5a25171366f2ab55bfba9a163e7ae6fa73 | 677a8fe9afa03cd1bea7ded88c49b5cc29f3b69a | Adanos/Personal-planner | /Personal planner/Personal planner/Controller/StatementDatabase.cpp | C++ | cpp | 994 | no_license | #include "StatementDatabase.hpp"
StatementDatabase::StatementDatabase(sql::Connection& p_connection)
{
statement = p_connection.createStatement();
}
StatementDatabase::~StatementDatabase()
{
delete statement;
}
sql::ResultSet& StatementDatabase::insertEvent(Event& p_event)
{
try
{
std::string l_query = "INSER... |
cccab27942da76c1a84084521d92c322ebda270f | 62cab5a8c06811e99f02bb90109ab4253b0f3f4a | sessamekesh/assimp2json | /assimp2json/json_exporter.cpp | C++ | cpp | 18,467 | no_license | /*
Assimp2Json
Copyright (c) 2011, Alexander C. Gessler
Licensed under a 3-clause BSD license. See the LICENSE file for more information.
*/
#include <assimp/Importer.hpp>
#include <assimp/Exporter.hpp>
#include <assimp/IOStream.hpp>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <sstream>
#incl... |
53cf0a69bafdb929cc9584ba86aa9ed85f83e64f | 8ae595199e5df8451f63a0b235ec5b72185bc2c9 | Daiver/NumGrind | /NumGrind/Solvers/SGDWithMomentumSolver.cpp | C++ | cpp | 1,237 | permissive | #include <iostream>
#include "SGDWithMomentumSolver.h"
NumGrind::Solvers::SGDWithMomentumSolver::SGDWithMomentumSolver(const NumGrind::Solvers::SolverSettings &settings,
const float stepSize, const float momentumCoeff,
... |
09775c33da5c3241eb204c05d0e0755b38affca4 | 1fc71dc2e46449dfe1bd5eda00a3888385f887d1 | swq0553/PixelSyncOIT | /src/OIT/OIT_MBOIT.hpp | C++ | hpp | 3,020 | permissive | //
// Created by christoph on 09.09.18.
//
#ifndef PIXELSYNCOIT_OIT_MBOIT_HPP
#define PIXELSYNCOIT_OIT_MBOIT_HPP
#include <Math/Geometry/AABB3.hpp>
#include <Math/Geometry/Sphere.hpp>
#include <Graphics/Texture/TextureManager.hpp>
#include "OIT_Renderer.hpp"
#include "OIT_MBOIT_Utils.hpp"
/**
* An order independen... |
93f3edbf798df2bb6b20610486ef5bd811f8799c | 42e8803696d37c747f63caeda7db687dd850585e | NVenkatAbhilash/MRnD | /ABHI/DAY2/Summer2/MergeSortDoubleLinkedList.cpp | C++ | cpp | 2,500 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include"Header.h"
DLL *createDoubleLinkedListNode(int data){
DLL *newNode = (DLL*)malloc(sizeof(DLL));
newNode->data = data;
newNode->next = NULL;
newNode->prev = NULL;
return newNode;
}
DLL *createDoubleLinkedListThroughArray(int* arr,int ar... |
ca025108fe6f8579392fb955cd21f1bc11fb7b58 | 843b8d52111b4f742f387f1e354a668c7faf7933 | Jonathan-Jiang/Algorithm | /排序算法+/快排非递归/1.cpp | C++ | cpp | 1,446 | no_license | #include <vector>
#include <iostream>
#include <assert.h>
#include <stack>
using namespace std;
const int len = 8;
int n[len] = {
49, 38, 65, 97,
76, 13, 27, 49
};
int partion(int n[], int low, int high) {
int cursor = n[low];
while (low < high) {
while (n[high] >= cursor && low < high) --high;
n[low] = n[hi... |
dc50e37061141fe9ffe8d25c37e4687cfe32898c | 591c37345bc9c97d867c03505b7ffeb1fca6115f | prayasjain/c-c-codes | /competitive/cf9.cpp | C++ | cpp | 704 | no_license | #include<stdio.h>
#define slld(x) scanf("%lld",&x)
#define sd(x) scanf("%d",&x)
#define sld(x) scanf("%ld",&x)
#define ss(x) scanf("%s",x)
#include<ctype.h>
#include<algorithm>
using namespace std ;
int main(){
long long t=0 ,n,z,i,j,k ,l,m,p ;
long long x[101],y[101] ;
slld(n);
for(i=0;i<n;i++){
slld... |
c136beb17f0b893f5bf797b21027f8629a6df046 | 422c59cee1d52d559ff3f0d0a912270eafd63508 | sfzhang/CNStream | /modules/unitest/rtsp_sink/test_rtsp.cpp | C++ | cpp | 10,814 | permissive | /*************************************************************************
* Copyright (C) [2019] by Cambricon, 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 a... |
b1d1aa600431df0601fe7b1b36ebb32fade67942 | fbcd3e4fb4429f0c7f4169099be74a08ae502567 | huqinwei/algorithm | /OutputListReverse.cpp | C++ | cpp | 1,026 | no_license | #include<iostream>
using namespace std;
#include<vector>
struct ListNode {
int val;
struct ListNode *next;
ListNode(int x) :
val(x), next(NULL) {
}
};
//print list in reverse
class Solution {
public:
vector<int> printListFromTailToHead(struct ListNode* head) {
... |
7b95e3f02b43c08420180eec28ca145b4660ab9f | e577a62480797066ef995f807d03000578802e67 | sunjiangbo/NetRadio-1 | /Network/Project/TcpNetServer/TcpIocpServer.cpp | C++ | cpp | 20,634 | no_license | #ifdef _WIN32
#include "TcpIocpServer.h"
#include "DebugTrace.h"
#pragma comment(lib,"Ws2_32.lib")
#pragma comment(lib,"Mswsock.lib")
//=============================================================================
/// 监听数量
#define DEFAULT_LISTEN_BACK_LOG 50
/// 重叠结构缓存池尺寸
#define OVERLAP_CACHE_SIZE 2048
/... |
cd5afa2038713cba75b27c3480cf1f1cc5c18afa | 12b6a488b7d137501b0c016b3cc018ede6ccf022 | dustinrhollar/portfolio | /ECS/src/ecs/entity.cpp | C++ | cpp | 2,869 | no_license | #include "entity.h"
#include "component.h"
namespace jengine { namespace ecs {
global u16 EntityRegistry[MAX_ENTITIES];
global size_t LastEntityIndex;
global LinkedList<GUID> FreeIndices;
global u32 MIN_FREE_INDICES = 1024;
// Each entity gets a linked list of attached components
global LinkedList<GUID> EntityCompo... |
5beaa2df5b3cfd0d8dfc4d9e026bf250d163e25a | 93dc33aa09b13195aac59171d0386d0834c9c519 | ABBAPOH/ccgo | /src/core/gui/createsetdialog.cpp | C++ | cpp | 882 | no_license | #include "createsetdialog.h"
#include "ui_createsetdialog.h"
#include <QFileDialog>
CreateSetDialog::CreateSetDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CreateSetDialog)
{
ui->setupUi(this);
connect(ui->fileDialogButton, SIGNAL(clicked()), SLOT(getFilePath()));
}
CreateSetDialog::~CreateSe... |
2205c66e457585355a36fdee5738103afe1c098e | dc724390560b422c93a2733640a015da3847ba97 | katzeforest/Computer-Animation | /Curve Editor Framework/QT/src/gui/painting/qdrawhelper_mmx.cpp | C++ | cpp | 5,852 | no_license | /****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** ... |
7059e312a0e8fe39c152db48e9eeb2743b1b6297 | b9c6b6331a6657c3c8ca429ad20d60ce987092bd | khm2034/baekjoonAlgorithms | /src/16000/16236.cpp | C++ | cpp | 1,080 | no_license | #include<cstdio>
#include<queue>
struct p { int x, y; };
int N, m[21][21], ret, dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 }, a = 2, c, r;
p s;
int bfs() {
std::queue<p> q;
int v[21][21] = { 0 }, ret = 1e9;
v[s.y][s.x] = 1;
q.push(s);
s = { 22, 22 };
while (!q.empty()) {
p t = q.front(); q.pop();
if (v[t.... |
9a92c39ef09dee660c89123b3a2283b6dd9ebe9d | 0f9a7e3af540831a37195578cf4ec50b1095aae5 | sakshistar/LeetcodeSolutions | /Dynamic Programming/UniqueBST2.cpp | C++ | cpp | 1,339 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... |
98ea58442875c378291417dd313ffa93b134726b | 7e2716f2362452812b1701593b25dfd74fa1da34 | ZouzhiqiangNxf/AutoVAS | /dataset/source/SARD/SARD-5/2022/ResourceInjection_Address_Alias_good.cpp | C++ | cpp | 1,282 | permissive | /* This software was developed at the National Institute of Standards and
* Technology by employees of the Federal Government in the course of their
* official duties. Pursuant to title 17 Section 105 of the United States
* Code this software is not subject to copyright protection and is in the
* public domain.... |
1167e79ede32cd4c6ef6db1cf2d4232939f8213e | 19cecdac2010f802559ddeffc3b1d3187b9f25a3 | zxy3/map3d | /client/readfiles.cc | C++ | cc | 82,342 | no_license | /* readfiles.cxx */
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <set>
#include <string.h>
#include <stdlib.h>
#include "landmarks.h"
#include "readfiles.h"
#include "Surf_Data.h"
#include "Map3d_Geom.h"
#include "MeshList.h"
#include "geomlib.h"
#include "fids.h"
#include "map3dmath.h"
#include ... |
4d594b70c2de3632f7c6d4bdc7e2717574625287 | 71635efb26ffbaae8ddba19c9a223f1f370952bc | junmuz/compute | /include/boost/compute/random.hpp | C++ | hpp | 1,148 | permissive | //---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// 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
//
// See http://kylelutz.gi... |
4706d6c93995c12f9310354d1e2fff8e668d0c25 | 7597198eab33c72078eedbe2ad77f52530c9c44f | mittorn/hlwe_src | /cl_dll/rendersystem/PSSpawnEffect.cpp | C++ | cpp | 4,629 | no_license | #include "hud.h"
#include "cl_util.h"
#include "Particle.h"
#include "RenderManager.h"
#include "RenderSystem.h"
#include "ParticleSystem.h"
#include "PSSpawnEffect.h"
#include "triangleapi.h"
CPSSpawnEffect::CPSSpawnEffect(void)
{
ResetParameters();
}
CPSSpawnEffect::~CPSSpawnEffect(void)
{
KillSys... |
a1a1466059a5dd0a6be2166b32c9f16659f394b5 | dddfde93a1e94267913d95224cad22889f266d8a | jameszang/ACM | /SAUSamaraQuaterfinal2014/C.cpp | C++ | cpp | 389 | no_license | #include <bits/stdc++.h>
#define nl '\n'
using namespace std;
int main() {
int k;
cin >> k;
if (k % 2 == 1) {
cout << 1 << nl;
cout << 2*k << " " << 2*k << nl;
} else {
cout << 3 << nl;
cout << 2*k << " " << 2*k << nl;
cout << 3*k << " " << (3*k) / 2 << nl;
... |
55d54e2580d7b30b62dd474ee262c071d17f3bc7 | c158331f5d7ad4cfd54222e5ea956e21e6f63179 | RoboJackets/roboracing-software | /rr_common/src/camera_geometry/CameraGeometry.cpp | C++ | cpp | 5,358 | permissive | #include <rr_common/CameraGeometry.h>
#include <tf/transform_datatypes.h>
#include <tf/transform_listener.h>
#include <cmath>
#include <rr_common/angle_utils.hpp>
namespace rr {
void CameraGeometry::CameraInfoCallback(const sensor_msgs::CameraInfoConstPtr& msg) {
image_size_rows_ = msg->height;
image_size_co... |
fbcb62dd77d347eaccb2748e7176b2ee2524897c | d97d79ea0630c4aaf37aa0b2bda2baea2d6ad381 | aburgm/freeisle | /src/engine/fs/test/TestDirectory.cc | C++ | cc | 2,401 | permissive | #include "fs/test/util/TempDirFixture.hh"
#include "fs/Directory.hh"
#include <gtest/gtest.h>
#include <cstring>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
namespace {
class DirectoryTest : public freeisle::fs::test::TempDirFixture {};
} // namespace
TEST_F(DirectoryTest,... |
5beb6bd5439e4ca771e692ca36f084b554615e4f | e7d32efa56f0e5ab6cd3373682e13be2e253afe1 | RonDingDing/CPP-Primer-Plus | /CPPPrimerPlus/Chapter 13/13.7-13.9/usebrass1.cpp | C++ | cpp | 773 | no_license | #include <iostream>
#include "brass.h"
int main()
{
using std::cout;
using std::endl;
Brass Piggy("Porcelot Pigg", 381299, 4000.00);
BrassPlus Hoggy("Horatio Hogg", 382288, 3000.00);
Piggy.ViewAcct();
cout << endl;
Hoggy.ViewAcct();
cout << endl;
cout << "Depositing $1000 into the... |
3f1d5df0f9e51acda98decc97a9017617c9d6537 | d8a3078e335b6566be2e4c10db9622ed636329eb | eezstreet/devilutionX | /Source/path.cpp | C++ | cpp | 10,105 | permissive | #include "diablo.h"
DEVILUTION_BEGIN_NAMESPACE
// preallocated nodes, search is terminated after 300 nodes are visited
PATHNODE path_nodes[MAXPATHNODES];
// size of the pnode_tblptr stack
int gdwCurPathStep;
// the number of in-use nodes in path_nodes
int gdwCurNodes;
/* for reconstructing the path after th... |
3eac3c4d418f6ee07bd1c67d2e6aef3444e8a1ed | 95d0e8c5db3410f03de96f492c05a6a5228ac87a | ankitweb007/releases-comm-central | /ldap/xpcom/src/nsLDAPControl.cpp | C++ | cpp | 2,936 | no_license | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsLDAPControl.h"
#includ... |
30ef0c14ba2a940d6e74b72857de8b214f0ed902 | ea9f525461015dfb113f5f22005e5cc05c4c901f | slowfranklin/synology-ds | /usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include/boost/phoenix/core/detail/preprocessed/phx2_result_30.hpp | C++ | hpp | 68,348 | no_license | /*=============================================================================
Copyright (c) 2011 Thomas Heller
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)
===============================================... |
ce0a02eb1154cd044e1e1c332d7cbb0c928dc7a7 | e6d7fa20445cab2af8cc4f7bc10a1dccf39d859f | PortableApps/palemoon27 | /security/manager/ssl/CertBlocklist.cpp | C++ | cpp | 19,892 | no_license | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0... |
ef5cfb5e937a7a6856f14485c6ead3f9df5e5d00 | 8d70c02e2d3c3c011dc61d69f2f9e884991f0300 | DongfeiJi/LeetCode | /剑指offer(合计66道)/数组/剑指Offer:旋转数组的最小数字.cpp | C++ | cpp | 3,614 | no_license | /*
把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。
输入一个非减排序的数组的一个旋转,输出旋转数组的最小元素。
例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,
该数组的最小值为1。 NOTE:给出的所有元素都大于0,若数组大小为0,请返回0。
class Solution {
public:
int minNumberInRotateArray(vector<int> rotateArray) {
int size = rotateArray.size(); //数组长度
if(size == 0... |
a01febd16089e26077afa30e323ead172e566df7 | 0f31d345174135fc6ba0f5cbc0a157acd64c3bdf | proaholic/Win2K3 | /NT/inetsrv/msmq/src/ds/ad/cliutil.cpp | C++ | cpp | 47,121 | no_license | /*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
cliutil.cpp
Abstract:
DS client provider class utils.
Author:
Ilan Herbst (ilanh) 13-Sep-2000
--*/
#include "ds_stdh.h"
#include "ad.h"
#include "cliprov.h"
#include "mqmacro.h"
#include "traninfo.h"
#include "_ta.h"
static WCHAR *s_FN=L... |
df5f37955b952a9d1ea78139061f649cdbf896b0 | 2d1c1be9ae75c2cb29c31bb1f417707265194bef | ajunlonglive/NowSound | /NowSoundLibShared/Check.cpp | C++ | cpp | 401 | permissive | #pragma once
// NowSound library by Rob Jellinghaus, https://github.com/RobJellinghaus/NowSound
// Licensed under the MIT license
#include "stdafx.h"
#include "Check.h"
namespace NowSound
{
// Unconditional check that runs whether in debug mode or not.
void Check(bool condition)
{
if (!condition)... |
50c8b9f8ac92c6ca11817d79e26d325cdc1d34d8 | 2592c14261fdc3dbee0f3d725d322244e0339627 | CustomROMs/android_vendor | /st-ericsson/multimedia/audio/afm/proxy/base/AFMNmfHostMpc_ProcessingComp.cpp | C++ | cpp | 48,640 | no_license | /*****************************************************************************/
/*
* Copyright (C) ST-Ericsson SA 2009,2010. All rights reserved.
* This code is ST-Ericsson proprietary and confidential.
* Any use of the code for whatever purpose is subject to
* specific written permission of ST-Ericsson SA.
*
*/
... |
6ff44e7adfc44d653a76beab416407bd66868bbc | adde517fde55d25b5a8846437d0f58e3cf349472 | irov/Mengine | /src/Plugins/OzzAnimationPlugin/ResourceOzzSkeleton.cpp | C++ | cpp | 2,036 | permissive | #include "ResourceOzzSkeleton.h"
#include "Interface/FileServiceInterface.h"
#include "Kernel/MemoryStreamHelper.h"
#include "Kernel/AssertionMemoryPanic.h"
#include "Kernel/FileStreamHelper.h"
#include "ozz/base/io/stream.h"
#include "ozz/base/io/archive.h"
namespace Mengine
{
/////////////////////////////////... |
f11c91f01c14025e5745d786848b24b7218836c1 | 77ae4dee0972ebc5f33d5fb600e0a2d1b637cf89 | sultanularefin/CPPworks | /lexer3.cpp | C++ | cpp | 17,006 | no_license | //header files needed for this program
#include <iostream>
#include <fstream>
#include <string>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include "stdafx.h"
using namespace std; //use the standard namespace.
//tables
const string tableOfOperators[] = { "+", "-", "/", "*", "=", "<", ">", "++", "--", ... |
cff821224104f3754f63c3e3ad20cc1443ba251f | 8a492152e999a4997a9c28cf8f56f424190fcbc7 | baoxuezhao/solution_set | /binary_tree/serialization.cpp | C++ | cpp | 1,451 | no_license | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
struct Node
{
int val;
Node *left, *right;
Node(int v)
{
val = v;
left = NULL;
right = NULL;
}
};
typedef Node TreeNode;
void serialization(Node *root, stringstream &str)
{
if(root == NULL)
{
str << '#' << ' ';
return;
}
... |
31ddba3f359143bd7d9d91fba81f0b89744c47b8 | 0d9743e1bdbd7a68ad1f9b2c43002b8fdfcf45ac | p61402/UVa-Solutions | /100-1999/637 Booklet Printing.cpp | C++ | cpp | 955 | no_license | #include <iostream>
using namespace std;
int main()
{
int n, x, y, pages;
while (cin >> n && n)
{
if (n % 4 == 0)
pages = n / 4;
else
pages = n / 4 + 1;
x = 1;
y = pages * 4;
cout << "Printing order for " << n << " pages:\n";
... |
f27c5ed79a93e07ccf050419eb35607a999a0af1 | 72bb6c62d3373d09adffeae70024c290300cca1a | sysfce2/AviSynth_RgTools | /RgTools/avs2x.cpp | C++ | cpp | 1,077 | permissive | #include "removegrain.h"
#include "clense.h"
#include "repair.h"
#include "vertical_cleaner.h"
#include "RemoveGrainT.h"
const AVS_Linkage *AVS_linkage = nullptr;
extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) {
AVS_linkage =... |
a3877ec69224c99e2e03fb4a1d09f0ec3cbfec0b | 6d612cf30b2c13b55fc89efd4f80a224c19082e7 | peter-bitfusion/libgdsync | /tests/gpu.cpp | C++ | cpp | 10,522 | no_license | /* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of condi... |
e01a41fbf2956949dd7fcdebf8fa583419a643f2 | 37588a31a69f4b2884da3b3d41036e62f7199e43 | FernandoZhuang/AcmPat | /AcmPat/CountPats.cpp | C++ | cpp | 504 | no_license | //#define _CRT_SECURE_NO_WARNINGS
//#define LOCAL
#include <iostream>
#include <string>
using namespace std;
int main() {
#ifdef LOCAL
freopen("input.txt", "r", stdin);
#endif
int pCnt = 0, tCnt = 0, res = 0;
string str1;
cin >> str1;
for (int i = 0; i < str1.size(); i++)
if (str1[i] == 'T')
tCnt++;
for (i... |
359e02eabb1a23a5b4aa72e4ed850c8dc421afa2 | 0794e9dd48eabc8c9cdce56f483edc87f8937f60 | Kaidran/IFT3355 | /TP2/src/sceneLoader.cpp | C++ | cpp | 17,756 | no_license | #include <fstream>
#include <iostream>
#include <set>
#include "main.h"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtx/transform2.hpp"
#include "sceneLoader.h"
#include "material.h"
using namespace glm;
using namespace std;
SceneLoader::SceneLoader(Scene& scene, string sceneFilename):
scene(scene)
{
... |
e6f6072e1d8bed2b6cf04caab79fc556c15e0a46 | 18dfe3cd0e2dae81959e917f6bb34cfef0dbe9ca | efifogel/sgal | /src/libs/SGAL/lib/Sphere_environment.cpp | C++ | cpp | 4,109 | no_license | // Copyright (c) 2004 Israel.
// All rights reserved.
//
// This file is part of SGAL; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; version 2.1 of the
// License. See the file LICENSE.LGPL distributed with SGAL.
//
... |
f6aabc30ef2373a48fe5c87991573dee3ed6d08f | acff640442cd3494a2b544792c41e3117729bc34 | LuisAntonRebollo/Torque3D | /Engine/source/shaderGen/GLSL/bumpGLSL.cpp | C++ | cpp | 16,639 | permissive | //-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// 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 restrictio... |
8b974314efc92738b228add346287ea8d946d9c2 | 155c3b80d614d7baaf179efded369bfcef5e8cef | Vani4ka/programmiersprachen_aufgabenblatt3 | /source/aufgabe10.cpp | C++ | cpp | 544 | permissive | #define CATCH_CONFIG_RUNNER
#include "catch.hpp"
#include <cmath>
#include <algorithm>
#include <vector>
TEST_CASE ("describe_vector_add", "[aufgabe10]")
{
std::vector<int> v1{1,2,3,4,5,6,7,8,9};
std::vector<int> v2{9,8,7,6,5,4,3,2,1};
// v(5) verändert: v3(9)
std::vector<int> v3(9);
std::transform(v1.begin(), ... |
714cf176795fb56726494b907ac6b15c376cc4ce | 1fe99a08edbec18f0a6501be5c2524e1a20a3104 | BenjaminHCCarr/cgatools | /cgatools/variants/Locus.hpp | C++ | hpp | 10,194 | permissive | // Copyright 2010 Complete Genomics, 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 agree... |
25769c36db68885509a3cab7f9541a2d9987891e | ade98a33fda5e52e4912a38a41e7d02fddb79731 | kushalchordiya216/DSL-Mini-Project | /src/two_player.cpp | C++ | cpp | 12,778 | no_license | /*
* single.cpp
*
* Created on: 15-Oct-2018
* Author: kushal
*/
#include <iostream>
#include <fstream>
#include "two_player.h"
using namespace std;
char Board[5][5];
int Flag = 0, Wm = 0, Wp = 0, Bm = 0, Bp = 0;
bool Whosemove = 1;
int result;
int sum1 = 0, sum2 = 0, goFlag=0; //goFlag-> gameoverFlag ... |
dddf9cf519df086c4514fe7672df328641787bc4 | f9d1aed44e697d7a2c797d8769a78f1f12e444fc | KDE/messagelib | /messagecomposer/autotests/encryptjobtest.cpp | C++ | cpp | 8,828 | permissive | /*
SPDX-FileCopyrightText: 2009 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
SPDX-FileCopyrightText: 2009 Leo Franchi <lfranchi@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "encryptjobtest.h"
#include "cryptofunctions.h"
#include "qtest_messagecomposer.h"
#include "setup... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.