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 |
|---|---|---|---|---|---|---|---|---|
f7b919bb567223f6bf6a72481dc5ac6b85f4774a | 45c029d946479cb42c3428332232be94f48f7b83 | ofcZsgj/Mymuduo | /InetAddress.cc | C++ | cc | 753 | no_license | #include "InetAddress.h"
#include <string.h>
#include <strings.h>
InetAddress::InetAddress(uint16_t port, std::string ip)
{
bzero(&addr_, sizeof addr_);
addr_.sin_family = AF_INET;
addr_.sin_port = htons(port);
addr_.sin_addr.s_addr = inet_addr(ip.c_str());
}
std::string InetAddress::toIp() const
{
... |
e691467f6e7afcd0f58521e3016a0f333cb2afc6 | 06874143a36aae2008bda944799fcfbc38e17932 | lhon001/bari-cpp | /arrays.cpp | C++ | cpp | 385 | no_license | #include<iostream>
int main() {
int arr1[10] = {5, 9, 2, 1, 6, 3, 8, 4, 7, 0};
std::cout << "arr1: ";
for (int i = 0; i < 10; i++) {
std::cout << arr1[i] << " ";
}
std::cout << std::endl;
int arr2[] = {12, 34, 23, 345, 54, 98, 253};
std::cout << "arr2: ";
for (int i = 0; i < 7; i++) {
std::c... |
8ed812beae7f6bc2cfe798079e2e4ee5c775dc3d | 06da1f1cb5210c0943f84d4ab19d89f5c1aa49bc | wayfinder/Wayfinder-CppCore-v2 | /cpp/Targets/MapLibNG/Shared/src/TextPlacement/TextPlacementPolicy.cpp | C++ | cpp | 9,627 | permissive | /*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
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 condit... |
744bf439b70997cdd2ad67834d7e22c376bd3932 | ddf24b44904db58e1690f273efabac2d40392733 | RcppCore/RcppNT2 | /inst/include/nt2/polynom/functions/polyvalm.hpp | C++ | hpp | 2,865 | no_license | //==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
49c7986fdeb4df108b71738e1fa7162aefc63546 | 0dd98fb2d453abbba6888d8ce664a870b25d9ab2 | divakarsivashankar/Secure-My-Email | /service_apis/gmail/google/gmail_api/history_label_removed.cc | C++ | cc | 1,968 | permissive | // Copyright 2010 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... |
6ca8ba4dffdf8beef5442e67b7712773643a0432 | f6d749821b62412dfda89b246d94f97f5c348ae5 | randomguy4567/cetus_adventure | /Interface.cpp | C++ | cpp | 4,691 | no_license | #include <string>
#include <iostream>
#include "Interface.h"
#include <ncurses.h>
#include <sstream>
using namespace std;
enum COLORS {
GREEN = 2, BLUE, MAGENTA, WHITE, CYAN
};
//ncurses initial
void Interface::init(){
logFile.open("cetus.log");
initscr();
start_color();
nonl();
scrollok(stdscr, true);
//init... |
0f3861290df5d5c6b358dc32248f0a11ab374435 | f51c50908806de245673f1ac03ace86b488fe676 | lamhoangtung/Bai-tap-Ki-thuat-lap-trinh | /Bai thuc hanh so 3B/bai1.cpp | C++ | cpp | 372 | permissive | #include <iostream>
using namespace std;
long giaithua(int n){
if (n==1){
return 1;
}
else{
return (n*giaithua(n-1));
}
}
int main(){
int a,b;
cout << "Nhap so nguyen a: ";
cin >> a;
cout << "Nhap so nguyen b: ";
cin >> b;
float ans=(float)(giaithua(a)+giaithua(b))/giaithua(a+b);
cout <... |
d09afd00910ed5a06391853b96c5c45b56f1433b | c709efde40620d81aea79fce064f636a2659e675 | xrLil-Batya/gitxray | /Physics/PHYSICS.CPP | C++ | cpp | 27,440 | no_license | // http://www.d6.com/users/checker
// it's nice that you have include windows.h to use the cross-platform OpenGL
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#include <windows.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
#include <time.h>
#... |
bf64fe87d89a5c0ac60f16e8d19adad51c0b96c7 | 528147f146cc8bc24c4b123f7215b0b32b2629f4 | Mappy/mapbox-gl-native | /src/mbgl/text/cross_tile_symbol_index.hpp | C++ | hpp | 1,960 | permissive | #pragma once
#include <mbgl/tile/tile_id.hpp>
#include <mbgl/util/geometry.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/optional.hpp>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <memory>
#include <unordered_set>
namespace mbgl {
class SymbolInstance;
class RenderLayerSy... |
7caa88a331b02fb06a3aaa02029cde0e6af6fa11 | 6971cb7ab9dc6d59be4aa6f666d01dabbf7288b2 | AntonKlekovkin/Combo_Sphero | /Шар-комбо LPC1768 - тестовая/mpu_functions.cpp | C++ | cpp | 3,717 | no_license | #include "mbed.h"
#include "MPU9250.h"
extern MPU9250 mpu9250;
extern float SelfTest[6];
extern float gyroBias[3];
extern float accelBias[3];
extern float magCalibration[3];
extern uint8_t Ascale;
extern uint8_t Gscale;
extern uint8_t Mscale;
extern uint8_t Mmode;
extern float aRes, gRes, mRes;
extern float magbias[3]... |
92746d4bd0841ecb2112721abda27e27b5ae2cfc | f45ab1ed280172e9c5878e916d54a00cad8e8283 | AlexJunCpp/EasyPR | /src/core/feature.cpp | C++ | cpp | 12,475 | permissive | #include "easypr/core/feature.h"
#include "easypr/core/core_func.h"
#include "thirdparty/LBP/lbp.hpp"
namespace easypr {
Mat getHistogram(Mat in) {
const int VERTICAL = 0;
const int HORIZONTAL = 1;
// Histogram features
Mat vhist = ProjectedHistogram(in, VERTICAL);
Mat hhist = ProjectedHistogram(in, HORIZ... |
33dc7e9f1f88f610139c3504fd9ce8b8bda04c1d | e8089b14fb7db809372549b5505cc00c0fdf5bbd | dbindel/hiqlab | /tools/mwrap/src/mwrap-cgen.cc | C++ | cc | 39,977 | permissive | /*
* mwrap-cgen.cc
* Generate C MEX file from MWrap AST.
*
* Copyright (c) 2007 David Bindel
* See the file COPYING for copying permissions
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cassert>
#include "mwrap-ast.h"
#include "mwrap-support.h"
/* -- General utility functions -- */... |
27366d0b37cf1d34672ae9ee94ac7ad46d7a5c3a | a201fb7b00b84d73f7dfecba65edffd9fbf1ccab | kumarak/osquery-extension | /zeek-remote/src/utils.cpp | C++ | cpp | 7,907 | permissive | /**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the Apache 2.0 license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may... |
07b67d65266f99de9f5ef2da3c2d3dfb036015b0 | 853e1df13416c589822c693a292814ad4694b685 | adamdddave/DT | /Binned/extractTimeDependence_RS_multimodel.cpp | C++ | cpp | 16,796 | no_license | //c++
#include <iostream>
#include <cmath>
#include <stdlib.h>//chmod for read/write/ex. protecting the output so we can't unblind.
#include <unistd.h> //redirect output.
//root
#include <TH1.h>
#include <TH2.h>
#include <TH3.h>
#include <TStyle.h>
#include <TLatex.h>
#include <TCanvas.h>
#include <TPad.h>
#include <... |
bb6567cd579bfb6510d1c23d3b0492dd40c5fb6f | c42c2ba35059db6a09adc88b42bde0058d163437 | Hannibal404/data-structure-and-algorithms | /problems/CheckTwoStringsAsAnagrams.cpp | C++ | cpp | 663 | permissive | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string s, t;
cin >> s >> t;
int hash1[26], hash2[26];
memset(hash1, 0, sizeof(hash1));
memset(hash2, 0, sizeof(hash2));
for(char c : s) {
hash... |
844de114bdfb6969a46ea7416a61e0041fcc1b9a | 4741ba88c9f3a5d7614fe258da8a50e4f648362b | bvrstich/Hessian-v2DM-1D-Hub | /PHM.cpp | C++ | cpp | 6,648 | no_license | #include <iostream>
#include <fstream>
#include <cstdlib>
#include <cmath>
using std::ostream;
using std::ofstream;
using std::endl;
#include "include.h"
vector< vector<int> > *PHM::ph2s;
int ***PHM::s2ph;
int **PHM::block_char;
/**
* initialize the statics
*/
void PHM::init(){
int L = Tools::gL();
//al... |
c2df62402c7488a748d41e2e0a4a70dc657694bb | dd6f76ead2c856f0c16eda2f0bea3bcc7a3f35c0 | jchan1e/graphics | /second_semester/examples/ex07/ex07.cpp | C++ | cpp | 413 | no_license | //
// Ex07: OpenGL 4 Lighting and Textures
// Willem A. (Vlakkies) Schreuder
// CSCI 4239/5239 Spring 2016
//
#include <QApplication>
#include "ex07viewer.h"
//
// Main function
//
int main(int argc, char *argv[])
{
// Create the application
QApplication app(argc,argv);
// Create and show view widget
... |
ff91d779a79cb0e5b26866489fb6b672d5359645 | 0af4d1783f851b235e860600c115f126519aee88 | abhijeetmokate/OOP_CPP | /jump_search.cpp | C++ | cpp | 599 | no_license | #include<iostream>
#include<cmath>
using namespace std;
int jump_search(int *arr, int size, int value)
{
int block_size = sqrt(size);
int start = 0;
int end = block_size;
while(arr[end]<=value && end<size-1) // |1|2|3|4|5|6|7|8|9|10|11|
{
start = end;
end = end+block_size;
... |
3e3254e97cd7e4d818030f7e0d983c0a91713024 | 4b5f0ef2b2f81ae3fde69e5138451296f26d29f6 | utkarsht/SPOJ-problems | /BYECAKES(amount in ratio).cpp | C++ | cpp | 579 | no_license | #include<iostream>
using namespace std;
int main()
{
int i,a[4],b[4];
float r,max;
while(1)
{
for(i=0;i<4;i++)
cin>>a[i];
for(i=0;i<4;i++)
cin>>b[i];
if(a[0]==-1 &&a[1]==-1 &&a[2]==-1 &&a[3]==-1 && b[0]==-1&& b[1]==-1&& b[2]==-1&& b[3]==-1) break;
if(a[0]==0 &&a[1]==0 &&a[2]==0 &&a[3]==0 ) cout<<"... |
2d832e873c98e7e83542affa49ce63e416f8be57 | 9ac2a5494efaafcc0d6515793f682d57de4ccc8e | fblogy/code | /2018组队/XVIII Open Cup named after E.V. Pankratiev. GP of Romania/solution/i.cpp | C++ | cpp | 2,490 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int T; cin >> T;
while (T--) {
int N, M, MOD; cin >> N >> M >> MOD;
... |
865d0037b6815fad70c82b7308ba3cbf483b4371 | 19134f13484e049cf17adf7d61bb5dc38270dbc8 | standbyme/llvm-project | /llvm/utils/TableGen/CodeGenTarget.cpp | C++ | cpp | 35,766 | permissive | //===- CodeGenTarget.cpp - CodeGen Target Class Wrapper -------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
566319afb3ce4fddfd4090833a313e88290241ac | 68718d4f55e89cb5004091f7cfaff9f0df259348 | Csineneo/Vivaldi | /chromium/content/browser/service_worker/service_worker_process_manager.cc | C++ | cc | 8,213 | 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 "content/browser/service_worker/service_worker_process_manager.h"
#include <stddef.h>
#include <algorithm>
#include <utility>
#include "conten... |
06224b2f1dcd49a7f2adc919e83253a254705509 | e544be7cab2521bd079c2771018eaf38c0b2584c | vectrum-core/vectrum.cdt | /vectrum_llvm/tools/clang/lib/AST/Decl.cpp | C++ | cpp | 166,891 | permissive | //===- Decl.cpp - Declaration AST Node Implementation ---------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
9a354d821896bc9294e11b8b0cfee66491ee4cd1 | c93c13ded68e47ba3e947c9152849710ce8728fc | kikodonda/ejemplos | /binario_a_decimal.cpp | C++ | cpp | 763 | no_license | /*
Pasar de binario a decimal en C++
Programa C++ que pasa un número de binario a decimal. El programa pide un número por teclado en base binaria y calcula y muestra su equivalente base decimal.
*/
//Pasar de binario a decimal en C++
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main... |
2e8df362c7012e1c0d7909ccdbcdbdf71959cbff | 4fcd4ab855f6b75a1f0b2e215112c435b9b6ce9d | Rodousse/OpenGLPlayground | /src/app/03_ubo/ubo/Renderer.hpp | C++ | hpp | 1,083 | no_license | #pragma once
#include <engine/GLProgram.hpp>
#include <engine/Scene.hpp>
#include <memory>
class Renderer final : public engine::GLProgram
{
public:
struct LightMaterial
{
Vector3 lightPosition{0.0f, 0.0f, 0.0f};
float lightIntensity{1000.0f};
Vector3 lightDiffuseColor{1.0f, 1.0f, 1.... |
c17c98e9922d2cac6e3f11c46d67ad2ff967af3d | 113898940a13d51d850527014c33da1cab85c642 | chrismattmann/lucene-lda | /t/t001/code/2003-07-01#mozilla.mailnews.addrbook.src#nsAddbookProtocolHandler.cpp | C++ | cpp | 4,821 | no_license | msgcore
nsxpidlstring
nsreadableutils
nsipref
nsiioservice
nsistreamlistener
nsaddbookprotocolhandler
nsaddbookurl
nsaddbookprotocolhandler
nsifilespec
nscomptr
nsabbasecid
nsnetutil
nsistringstream
nsiaddrbooksession
nsiabmdbcard
nsiabdirectory
nsirdfresource
nsirdfservice
nsrdfcid
prmem
nsiprefservice
nsiprefbranch
n... |
3e9099da554645eb3bfbdae9a93802b57d9bb529 | 7705df20ad9be09d3aea444ecab7b8dd0ca54d5b | alten-linkoping/machine-vision | /node/main.cpp | C++ | cpp | 4,887 | no_license | // main.cpp
#include "opticalFlow.h"
#include "HOGDetection.h"
#include <iostream>
#include <string>
#include <napi.h>
//std::vector<std::string> > dataSets = ["MOT17-09-FRCNN","MOT17-08-DPM"];
#include <boost/algorithm/string.hpp>
std::vector<std::string> dataSets = {"MOT17-09-FRCNN", "MOT17-08-FRCNN", "MOT17-04... |
e8850fea9f25a4ef0289f93ecc46471efbc263e9 | da42b4cb55fc9d72485e3e7d73d2307d25e38fac | raasoft/ConEmu | /src/ConEmu/GuiServer.cpp | C++ | cpp | 24,822 | permissive |
/*
Copyright (c) 2009-2017 Maximus5
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the followin... |
9d18c4de72139be3ed841d683e2aa60bdeea05a9 | f682a20c7e4e70844679efede0464fcb0d10af46 | oguzhankarahan/valhalla | /src/tyr/route_serializer_osrm.cc | C++ | cc | 78,945 | permissive | #include <sstream>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <vector>
#include "baldr/json.h"
#include "midgard/encoded.h"
#include "midgard/pointll.h"
#include "midgard/polyline2.h"
#include "midgard/util.h"
#include "odin/enhancedtrippath.h"
#include "odin/util.h"
#include "route_summa... |
1676012427fc79ad015e041f037a864f97530aad | 82243e5cf79c24999ee074c5402f23965aca3470 | microsoft/onnxruntime-openenclave | /onnxruntime/core/common/logging/logging.cc | C++ | cc | 8,343 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include <exception>
#include <ctime>
#include <utility>
#include "core/common/exceptions.h"
#include "core/common/logging/isink.h"
#include "core/common/logging/logging.h"
#ifdef _WIN32
#include <Windows.h>
#else
#includ... |
4ceb9a5b312d66d71d32ff25ca6ed347d8cfe108 | f921a67fab117a62dc4747321d7b07f43403457c | rajansahu713/Working-with-C-and-Cpp | /queue using class in c++.cpp | C++ | cpp | 1,077 | no_license | #include<iostream>
using namespace std;
#define maxsize 6
int front=-1,rear=-1,arr[maxsize];
void menu();
class queue
{
int item;
public:
void insert()
{
if(rear==maxsize-1)
{
cout<<"\nqueue is full"<<endl;
return;
}
else
{
cout<<"enter the number"<<endl;
cin>>item;
... |
940c3f62ecbed114a2b87a7531fe1e638dadaf22 | ba4077c9688ae44af345561e8c5a3887aa09c58f | hijang/lsc_cctv | /Common/utils.cpp | C++ | cpp | 2,114 | no_license | /*
Adding a InputBox() to any c++ program - an article for Code Project
by Michael Haephrati, Secured Globe, Inc. www.securedglobe.net
haephrati@gmail.com
June 2019
©2019 Michael Haephrati and Secured Globe, Inc. 1501 Broadway Ave. STE 1200, New York 10036, NY
*/
#define GDIPVER 0x0110
#define WIN32_LEAN_AND_MEAN
#... |
a3623305a2392979aa6912990e5baf746ec688dd | 9ceb961b00d681f0d33c9730fe9a4d63e0348201 | tyoma/wpl | /src/visual.cpp | C++ | cpp | 1,755 | no_license | #include <wpl/visual.h>
#include <wpl/helpers.h>
using namespace agge;
using namespace std;
namespace agge
{
template <typename T>
inline rect<T> operator -(rect<T> lhs, const agge_vector<T> &rhs)
{ return wpl::offset(lhs, -rhs.dx, -rhs.dy), lhs; }
template <typename T>
inline rect<T> operator +(rect<T> lhs, c... |
36d05f621aa0dc5c8e7c3c172809189c0d82c4eb | 90b1b9c208e867d8e10ad921d03fc8a47e9ae105 | seahorn/seahorn | /units/HexDumpTests.cpp | C++ | cpp | 18,564 | permissive | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "boost/lexical_cast.hpp"
#include "llvm/ADT/APInt.h"
#include "llvm/Support/raw_ostream.h"
#include <regex>
#include <string>
#include "seahorn/Expr/Expr.hh"
#include "seahorn/Expr/ExprGmp.hh"
#include "seahorn/Expr/ExprLlvm.hh"
#include "seahorn/Expr/ExprOpFinite... |
35f81b8d07be3bdda99dbe5da9a0abfd93a26d5d | 96b718546b2e2799a668852dd44d77f30dde93e0 | Altivar/Jeu-DirectX-PROD | /TPFinal/eventmanager.cpp | C++ | cpp | 2,390 | no_license | #include "EventManager.h"
#include "args.h"
// memory leaks
#include <crtdbg.h>
#ifdef _DEBUG
#define new new( _CLIENT_BLOCK, __FILE__, __LINE__)
#endif // _DEBUG
EventManager* EventManager::_instance = NULL;
EventManager::EventManager(void)
{
}
EventManager::~EventManager(void)
{
}
EventManager* EventManage... |
86c4963eb60e34723de355ea1da96b4d7e274feb | 8eba9315a531783388eb90cdc7be76acfd178512 | geobeans/Earth3d | /projects/EarthWeb/EarthWeb - 副本/Utils/StaticUtils/EarthObjectStaticUtils.cpp | C++ | cpp | 8,483 | no_license | #include <EarthWeb/Utils/StaticUtils/EarthObjectStaticUtils.h>
#include <EarthWeb/EarthGroup/EarthGroup.h>
#include <EarthWeb/Layer/ImageSurfaceLayer/ImageSurfaceLayer.h>
#include <EarthWeb/Layer/VectorSurfaceLayer/VectorSurfaceLayer.h>
#include <EarthWeb/Layer/ElevationSurfaceLayer/ElevationSurfaceLayer.h>
#include ... |
560a3b9473cf13d7d470e161cdcaab49446c54f0 | 1b947da7e0bd380e842e3b2c7799a2ea613c36f3 | Salimlou/Class-Work | /cs442/project.orig/project2/demo/office/Nurse.cpp | C++ | cpp | 3,010 | no_license | /****************************************************************************
Nurse.cpp
The documentation within this file is sparse, and is only intended to provide
an overview of coding practices. For a more detailed description of Nurse,
see Nurse.h.
**************************************************************... |
5fa48d315149929375f823fae0c343e0d7c21095 | 1aa4439de914a00dabccb8420087fd4f2c20f5ee | silky/hifi | /libraries/audio-client/src/AudioClient.cpp | C++ | cpp | 64,920 | permissive | //
// AudioClient.cpp
// interface/src
//
// Created by Stephen Birarda on 1/22/13.
// Copyright 2013 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <cstring>
#include <math.h>
#inclu... |
59cc3e36587f44f849d434e7e70867354420dabc | 0021afde2e9108b23efdbefe4177bff2e5a7d921 | EQ4/hush-vst | /WDL/filebrowse.cpp | C++ | cpp | 9,233 | permissive | // todo: support win7/vista extensions rather than GetOpenFileName? -- merge win7filedialog into here.
#include "filebrowse.h"
#include "win32_utf8.h"
#ifdef _WIN32
#define PREF_DIRCH '\\'
#define WDL_FILEBROWSE_WIN7VISTAMODE
#else
#define PREF_DIRCH '/'
#endif
#ifdef WDL_FILEBROWSE_WIN... |
7bf8fafffc78cdfaaa369edb3cbbda872c59e965 | d9f1533c3dda5b2b1549c014bd9cec16aa9b12f1 | l0rdicon/GoldPieces-Wallet | /src/keystore.cpp | C++ | cpp | 6,134 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "keystore.h"
#include "crypter.h"
#include "script.h"
#include "key.h"
... |
8d64cc502d0cabcf3b4beaa0de6531a419691e43 | b4d6aa24aac599bde9ad7b949cf2fe3dba4172cb | exlimit/mongo-cxx-driver | /src/mongocxx/test/write_concern.cpp | C++ | cpp | 6,617 | permissive | // Copyright 2014 MongoDB Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wri... |
767d1690425f6024aa77c30849df62355323c888 | 13a20331dad85e2dfa6f281a03783a57622a7671 | CyFI-Lab-Public/RetroScope | /external/chromium_org/chrome/browser/sync/test/integration/multiple_client_passwords_sync_test.cc | C++ | cc | 1,366 | permissive | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/password_manager/password_form_data.h... |
8092a69a1c899a030502f2aa327a1485d8d7b782 | 71bf26c51bd1df86b08e99c1ce29dad07872e19b | salieri11/concord-bft | /performance/include/SlowdownManager.hpp | C++ | hpp | 19,471 | permissive | // Concord
//
// Copyright (c) 2020 VMware, Inc. All Rights Reserved.
//
// This product is licensed to you under the Apache 2.0 license (the "License").
// You may not use this product except in compliance with the Apache 2.0 License.
//
// This product may include a number of subcomponents with separate copyright
// ... |
ffa31263834c362862e78e7c3aa601e6abb929da | 8a53e79d9cdc2a523862e066621a78e776b080a5 | simquest/opensurgsim | /SurgSim/Physics/UnitTests/ConstraintComponentTests.cpp | C++ | cpp | 1,538 | permissive | // This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions 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/LICE... |
656dd23068e1781446e2328f36cd4a816b002d7a | 1273df03ac08399d0f61b38a307179a00d08dc36 | tfboyd/reverb | /reverb/cc/table_test.cc | C++ | cc | 20,985 | permissive | // Copyright 2019 DeepMind Technologies Limited.
//
// 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 l... |
e3ef59f9174a9972ea3155f203ddcda489f77966 | 1a4bfc5f6e51b6698faca8c90ecdeccef4e2c204 | ttyang/sandbox | /sandbox/libs/extension/examples/registry/registry_example.cpp | C++ | cpp | 2,498 | no_license | /*
* Boost.Extension / registry class use example
*
* (C) Copyright Jeremy Pack 2007
* 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://www.boost.org/ for latest version.
*/
#inclu... |
b81573294a32220d59a7564e5bb6ad37327e002a | 90dd135c970d8fdc2ad3b1365a640835595238ce | NarutoUA/plugin-sdk | /plugin_sa/game_sa/CCoronas.cpp | C++ | cpp | 3,265 | permissive | /*
Plugin-SDK (Grand Theft Auto) source file
Authors: GTA Community. See more here
https://github.com/DK22Pac/plugin-sdk
Do not delete this comment block. Respect others' work!
*/
#include "CCoronas.h"
unsigned int MAX_NUM_CORONAS = 64;
float& CCoronas::SunScreenX = *(float *)0xC3E028;
float& CCoronas... |
0ba92e48c7316901672cda476dae6877eaf264b9 | c0cb93ba6b2b58c3568d03c4ac046a479f680b25 | pacchiano/lean | /src/library/tactic/tactic_state.cpp | C++ | cpp | 30,354 | permissive | /*
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include <string>
#include "util/fresh_name.h"
#include "util/sexpr/option_declarations.h"
#include "kernel/type_checker.h"
#include "kernel/instantiate.h"
... |
b7bf572af950f42a1c739e26ba9bf7d1e79059bd | 0c37f6b0173cb2230ab9f82d580cfd995200448c | saphiresouldier/cortex | /src/IECoreRI/SLOReader.cpp | C++ | cpp | 11,220 | no_license | //////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007-2013, Image Engine Design 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:
//
// ... |
fe0e49cf9ae5d8c42bda059be5ecc57a4c5c4788 | c9083ba31a7aacea481c253410b8d7081b021612 | skyformat99/text | /test/line_break_58.cpp | C++ | cpp | 114,915 | permissive | // Warning! This file is autogenerated.
#include <boost/text/line_break.hpp>
#include <gtest/gtest.h>
#include <algorithm>
TEST(line, breaks_58)
{
// × 261D ÷ 231A ÷
// × [0.3] WHITE UP POINTING INDEX (EB) ÷ [999.0] WATCH (ID) ÷ [0.3]
{
std::array<uint32_t, 2> cps = {{ 0x261d, 0x231a }};
... |
165123481b0ffb7ae54373b6ee41a8f4816d6cf8 | c2695ba1c51744fb654d35ecbae2e9970915ee59 | TheDirtyCalvinist/spacewalk | /application/common/manifest_handler.cc | C++ | cc | 6,970 | permissive | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "xwalk/application/common/manifest_handler.h"
#include <set>
#include "base/stl_util.h"
#include "xwalk/application/common/manifest_handler... |
2443a7c113a738f6bcf94dae5612559e16eb8c6c | e311a20e09e0da4000aad541ce061890c627865f | kei1107/algorithm | /problems/yukicoder/No0270.cpp | C++ | cpp | 2,855 | no_license | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<c... |
c34f4102cb7a2de8aaa0525b8cb576dd2f36d9f7 | 173d2126fade42d0abb759a5146113f827986318 | aliyun/aliyun-openapi-cpp-sdk | /waf-openapi/src/model/ModifyLogServiceStatusResult.cc | C++ | cc | 1,291 | 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... |
570dd5e2c5ee4e6a17da679a03e8f33b100234e0 | 60ec865c302c622e391c02711e4edee6c1771e05 | buhpc/bfs500 | /serial/bfs_main.cpp | C++ | cpp | 3,950 | no_license | #include <iostream>
#include <stdio.h> /* printf, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h>
#include <vector>
#include <queue>
#define VERTICES 500
#define EDGES 100000
#define STARTV 0
#define GIG 10e9
#include "bfs_serial.h"
#include "bfs_main.h"
using namespace std;
int main() {... |
7512d504210f339a2d5a014f782bdbbabc16e710 | bb78e46e3d869ff5ade4b48ec593110e36007a04 | Orion545/OI-Record | /Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day2程序包/answers/GD-0140/travel/travel.cpp | C++ | cpp | 784 | no_license | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
int n,m,a,b,cnt=0,ans[5008],ev[5008];
bool p[5008];
vector <int> v[5008];
void build_tree_1(int x){
p[x]=true;
ans[++cnt]=x;
int sz_x=v[x].size();
for(int i=0;i<sz_x;i++){
ev[i]=v[x][i];
}
sort(ev,ev+sz_x);
for(int i=... |
a5454a27c7202d85f94ebc3e6017ccbb6a185036 | 276314d3bb0ea67c73907a8d752a6f76c5020e96 | thegamer1907/Codeforces | /897A.cpp | C++ | cpp | 639 | no_license | #include<bits/stdc++.h>
#define ll long long int
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(v) v.begin(),v.end()
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int n... |
60ea93b61f0c7b0252f2a7520c4e731b2433f8b3 | 7620b5e8434e3ac76358c30a9c545b18de1f6db2 | rigertd/complete | /cs162/test/lecture1.cpp | C++ | cpp | 420 | no_license | #include <iostream>
#include <cmath>
#include "functions.hpp"
int main(int argc, char **argv)
{
std::cout << std::sqrt(121) << std::endl;
int a = 1, b = 2;
std::string c = "a", d = "b";
std::cout << "a = " << a << std::endl;
std::cout << "b = " << b << std::endl;
swap(a,b);
swap(c,d);
... |
ec1e08328612add6278ec4d135d38ea12b33d58f | 417f1339000f7546501bb402d4b00f2c154eb232 | Yefri97/Competitive-Programming | /Contests/Codeforces/May 18/Round 482/Kuro and Walking Route.cpp | C++ | cpp | 835 | no_license | #include <bits/stdc++.h>
#define endl '\n'
#define debug(X) cout << #X << " = " << X << endl
#define fori(i,b,e) for (int i = (b); i < (e); ++i)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
const int oo = 1e9, MN = 300010;
int x, y;
ll s[MN];
vi g[MN];
int dfs(int u... |
df934a9c4d1e63b31e324934254f55f179dd996d | 52898621318eed1c82f95cf63319c231ff7b4ecb | SharpyTeam/nlang | /interpreter/ut/thread_spawn_and_execution.cpp | C++ | cpp | 1,014 | permissive | #include <catch2/catch.hpp>
#include <interpreter/interpreter.hpp>
#include <interpreter/function.hpp>
#include <iostream>
TEST_CASE("thread spawn, native and interpreted function execution") {
// TODO fix this test
/*nlang::Environment environment;
double ctr = 0;
auto print = nlang::NativeFuncti... |
11d6ff3206cc91cff04280affd3a6049a9ce86fc | 35de1a4580e625e93c16e4147dcd665b2c0cb105 | FrozenGene/clang | /lib/CodeGen/BackendUtil.cpp | C++ | cpp | 44,166 | permissive | //===--- BackendUtil.cpp - LLVM Backend Utilities -------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
efa23d0a198fd1b6b64ee05710df2e5e64a8da21 | 13406bda9927499dbbfb2d6aee76f4387f787bf1 | jrtomps/nscldaq | /vmusbserver/CImmediateListCommand.cpp | C++ | cpp | 14,678 | no_license | /*
This software is Copyright by the Board of Trustees of Michigan
State University (c) Copyright 2009.
You may use this software under the terms of the GNU public license
(GPL). The terms of this license are described at:
http://www.gnu.org/licenses/gpl.txt
Author:
Ron Fox
... |
6ebe69f1f18ae4b4337ad971629b1c0a767d3919 | 6b54e5e644f59e3c8e5293d132dea7054dc3b4fd | prostMeenzCheerz/UMSL | /Compilers/p0/stringManip.cpp | C++ | cpp | 363 | no_license | #include <sstream>
#include <vector>
#include <iterator>
#include "stringManip.h"
#include "tree.h"
using namespace std;
vector<string> putFormattedInputInVector(string &formattedInput) {
istringstream iStreamVar(formattedInput);
vector<string> tokenizedString((istream_iterator<string>(iStreamVar)), istream_iterat... |
c707e718221f854778434a04c1dd6f85422fcf6e | 87e40584191a3463ac89f2dfe36dc70e4af986c6 | spatialsys/meshoptimizer | /gltf/material.cpp | C++ | cpp | 13,520 | permissive | // This file is part of gltfpack; see gltfpack.h for version/license details
#include "gltfpack.h"
#include <string.h>
static bool areTextureViewsEqual(const cgltf_texture_view& lhs, const cgltf_texture_view& rhs)
{
if (lhs.has_transform != rhs.has_transform)
return false;
if (lhs.has_transform)
{
const cgltf... |
7309824331a605ba9951cfdae8e195bce6d7396b | 0ffaa0f26526695bb48b4ed35d2f524cae93d627 | hiepkhach7488/BeingThere | /examples/robust_planar_pose/demo.cpp | C++ | cpp | 3,790 | no_license | #include <cstdio>
#include <opencv2/core/core.hpp>
#include "RPP.h"
#include <stdio.h>
using namespace cv;
inline double SQ(double x)
{
return x*x;
}
int main(int argc, char **argv)
{
// Data from the original Matlab code, we'll use it for ground truth. Verify the results with the Matlab output.
// First... |
cfb3b9647b138357693c0645e0310d7e6c5b0996 | 2580f3ec07010ea724cae63e4e269b6779cbd1d2 | daralim1987/cmpsci4280 | /Final/src/scope.cpp | C++ | cpp | 1,109 | no_license | //Dara Lim
// cs 4280
//Project 4 is the last project
#include<iostream>
#include <string>
#include "scope.h"
using namespace std;
//Source file of class Scope
//Define default constructor.
Scope::Scope()
{
}
//definition function pop of the vector containerScope
void Scope::pop()
{
//release the element from th... |
dfdc8811406a5d2c3c65375a39dbfb0115e33cce | 9374246194bfcf00b1093169fa1d52166509fdd2 | mahakal001/algorithms | /Greedy_strategy/kruskal_mst/kruskal_mst.cpp | C++ | cpp | 2,322 | no_license | #include <bits/stdc++.h>
#include "disjoint_ds.hpp"
/*
WHY PRIM'S AND KRUSKAL ALGORITHM CANT BE USED FOR DIRECTED GRAPH ? :
Prim's fails because it assumes, every node is reachable from every node which
though valid for undirected graphs may not be true for digraphs. Kruskal fails because
of failure to detect cyc... |
4bc38b54b64045a37caa960586a32945ff9c7b7b | adc916d42e2f7b89f144fac945b33bf26bca1239 | erwanleria-amu/ProjetSurfaceBezier | /visuCourbe/point.cpp | C++ | cpp | 1,639 | no_license | #include "point.h"
//Cette classe permet de creer des points et d'effectuer toutes sortes d'opération sur les points
Point::Point()
{
coords = new float[3];
}
Point::~Point()
{
delete [] coords;
coords = nullptr;
}
Point::Point(const Point& p)
{
coords = new float[3];
for (unsigned i=0; i<3; ++i)... |
5fe8a5ed04fe36d23a63d5642718bb07e9f40f55 | c38fe223e021c8ac8ad72f928da7eb3a93235a0c | steventfan/CS10 | /Week7/main.cpp | C++ | cpp | 918 | permissive | #include <iostream>
using namespace std;
void multiply(double mulNum1, double mulNum2, double& product) {
product = mulNum1 * mulNum2;
return;
}
void divide(double divNum1, double divNum2, double& quotient) {
quotient = divNum1 / divNum2;
return;
}
int main() {
double num1 = 0.0;
do... |
3e4276c993725aa9eb127909e4e894812946717f | 074c7549adb8bbe3a0f094a896cb8521238c7292 | wallacemu/tera | /src/leveldb/util/env_flash.cc | C++ | cc | 12,907 | permissive | // Copyright (c) 2015, Baidu.com, Inc. All Rights Reserved
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LI... |
ec39cd28487567d09b1c5c0bfcd3e1dba39149dd | 4aebacb999ab00d839e92b26dc206f1bcef91c53 | ekg/shasta | /src/LocalMarkerGraph.cpp | C++ | cpp | 38,054 | permissive | #ifndef SHASTA_STATIC_EXECUTABLE
// Shasta
#include "LocalMarkerGraph.hpp"
#include "approximateTopologicalSort.hpp"
#include "findMarkerId.hpp"
#include "LongBaseSequence.hpp"
// #include "Histogram.hpp"
// #include "Marker.hpp"
#include "orderPairs.hpp"
// #include "ReadId.hpp"
using namespace ChanZuckerberg;
using ... |
a2a6317e06f6691a1b03b4d0b899ef5571f0e60f | 70016f3f32f111b6c50b8403bc34109caeca482b | dkaip/jvulkan-natives-Linux-x86_64 | /VulkanExtensionFunctions/vkDebugMarkerSetObjectTagEXT.cpp | C++ | cpp | 2,249 | permissive | /*
* Copyright 2019-2020 Douglas Kaip
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... |
862d5fecfb56fd4d01e0e229232988bf30c74019 | 066da88108978dbed2972a1c5615bf241f711591 | Lindomarc/modorganizer-game_fallout4 | /src/fallout4unmanagedmods.cpp | C++ | cpp | 1,054 | no_license | #include "fallout4unmanagedmods.h"
Fallout4UnmangedMods::Fallout4UnmangedMods(const GameGamebryo *game)
: GamebryoUnmangedMods(game)
{}
Fallout4UnmangedMods::~Fallout4UnmangedMods()
{}
QStringList Fallout4UnmangedMods::secondaryFiles(const QString &modName) const {
// file extension in FO4 is .ba2 instead of bs... |
8c010d6fe51b8969684a7cbefb5c035bac9b90da | 637800c40fe0f2e15f7fbc3e7deeda80ec7d72a9 | skylicht-lab/skylicht-engine | /Projects/Irrlicht/Source/CVideoModeList.cpp | C++ | cpp | 2,930 | permissive | // Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "pch.h"
#include "CVideoModeList.h"
#include "irrMath.h"
namespace irr
{
namespace video
{
//! constructor
CVideoModeList::CVideoModeList(... |
f9a5f4f9c628b9242675f63f0e934658404d1cad | 9bf7b47799c7788a0d867013367793e473e4d88b | 3togo/dfd_gc | /src/map_v5.cpp | C++ | cpp | 16,676 | no_license | //#include "stdafx.h"
#include <cstdint>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <iostream>
#include <sstream>
#include <fstream>
#include <thread>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "DfD.h"
... |
ef5b45bc5800b1f61b9b19e5f61d686d6e939827 | dafdc3f1f981e7c0fe5dc0b21a60cf4e6134dd2c | robotdm/MITK | /Modules/Bundles/org.mitk.gui.qt.diffusionimaging/src/internal/QmitkTbssMetaTableModel.cpp | C++ | cpp | 3,509 | no_license |
/*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date$
Version: $Revision: 18127 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Informatics. All rights reserved.
See MITKCopyri... |
9e8165e461986bf50447916ec3e4fdc4912b6f38 | af37b16f2761687bd2dabd282670d40aae41c9a0 | arzeo68/Babel-cpp | /client/src/Audio/portAudio/PortAudio.cpp | C++ | cpp | 4,597 | no_license | //
// Created by alexis on 20/09/2020.
//
#include <iostream>
#include <cstring>
#include <utility>
#include <common/Error/ThrowError.hpp>
#include "PortAudio.hpp"
PortAudio::PortAudio()
{
_recording = false;
_listening = false;
// Init
if (Pa_Initialize() != paNoError) {
throw ThrowError("Po... |
88414f2d665cec17c341b991284bf8ebd5edff63 | 71c7a3db2fed338cccf02b9af5c592c36c910acc | XiaoLinhong/ecflow | /Pyext/src/ExportSuiteAndFamily.cpp | C++ | cpp | 6,965 | permissive | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// Name :
// Author : Avi
// Revision : $Revision: #85 $
//
// Copyright 2009-2020 ECMWF.
// This software is licensed under the terms of the Apache Licence version 2.0
// which can be obtained at http://www.apache.org/licen... |
c756b561d84be27d08468906d7099216a20b3650 | e4a697ec2e68c5bcf18f6f29134807431037d236 | jmprathab/pshell | /src/utilities/test/ListTest.cpp | C++ | cpp | 1,436 | permissive | #include "gtest/gtest.h"
#include "List.hpp"
using namespace PSTL;
#define TEST_SUITE_NAME ListTest
TEST(TEST_SUITE_NAME, ListCreationTest) {
std::unique_ptr<List<int>> list(new List<int>());
EXPECT_FALSE((list.get() == nullptr));
}
TEST(TEST_SUITE_NAME, ListInsertionTest) {
std::unique_ptr<List<int>> ... |
cbaff1d7db5309b86ec3cd60683ed71c3cf79931 | 31d2b26fc64dc474ef9913045001def39139eaa5 | mxaddict/navcoin-core | /src/mcl/test/paillier_test.cpp | C++ | cpp | 563 | permissive | #include <cybozu/test.hpp>
#include <mcl/paillier.hpp>
CYBOZU_TEST_AUTO(paillier)
{
using namespace mcl::paillier;
SecretKey sec;
sec.init(2048);
PublicKey pub;
sec.getPublicKey(pub);
mpz_class m1("12342340928409"), m2("23049820498204");
mpz_class c1, c2, c3;
pub.enc(c1, m1);
pub.enc(c2, m2);
std::cout << st... |
8cb93eafa26a1479d64c6c7f888e4663b86b6839 | feda85aa8bbf9a9e77c3525886f85d94b5b4083a | init931/yandex.praktikum | /sprint_9/transport_catalogue.cpp | C++ | cpp | 5,385 | no_license | //transport_catalogue.h, transport_catalogue.cpp — класс транспортного справочника
#include "transport_catalogue.h"
#include <algorithm>
namespace Transport::Core {
void TransportCatalogue::AddBus(Bus& bus) {
std::string name = bus.Name;
bus_index_.push_back(bus); //??? copy?
auto bus_sh... |
323d6ec65a2a4d41c793dc09c8c7e159263ac2de | e9c796828a5a604f79741f643c9c98535dfc6925 | cjdyer/7405K_20-21 | /src/Robot.cpp | C++ | cpp | 23,146 | permissive | #include "Robot.h"
#include "PurePursuit.h"
#include <cmath>
#include <atomic>
#include <vector>
#include <chrono>
#include <unordered_map>
#include <deque>
#include <bits/stdc++.h>
using namespace pros;
using namespace std;
#define TO_RAD(n) n * M_PI / 180;
/* Lambda function to convert number in degrees to radians.... |
e931efe252adc4eb311bbb2adbadfefcc6d0ff75 | b2d5f2dee572c064e233c492e26b763cb0c54b31 | akkirajput/Hackerrank--Problem-Solving | /Birthday Cake Candles.cpp | C++ | cpp | 384 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
long int n;
cin>>n;
long int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
sort(a,a+n,greater<int>());
int count=1;
for(int i=0;i<=0;i++)
{
for(int j=1;j<n;j++)
if(a[i]==a[j])
{
count++;
... |
525fab148c1f877d6867f246cf860c61af94bf0f | ad805b2a5413d9361cef7d7e8e1851a22b469eb1 | ywx217/elapse | /test/CrontabTest.cpp | C++ | cpp | 3,730 | permissive | #include "gtest/gtest.h"
#include <tuple>
#include "Crontab.hpp"
#include "Clock.hpp"
using namespace elapse::crontab;
typedef std::tuple<int, int, int, int, int, int> DateTuple;
std::time_t MakeTime(int year, int month, int date, int hour, int minute, int second) {
std::tm tm;
tm.tm_year = year - 1900;
tm.tm_mo... |
403d01edbe4db9f50dfef990917adb6ea09e8e7f | b3992183d8062460d98175e265c52fa94c80910b | chromium/chromium | /third_party/blink/renderer/core/layout/hit_test_result.cc | C++ | cc | 24,353 | permissive | /*
* Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved.
* Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundat... |
bdb63f362dcda74ae2976d1e3c51082aef448468 | 9052ca92ddbd269489ac7b372b5c7f6d87e553c8 | malasiot/wsrv | /include/ws/dictionary.hpp | C++ | hpp | 2,994 | permissive | #ifndef _DICTIONARY_H_
#define _DICTIONARY_H_
#include <regex>
#include <map>
namespace ws {
// A class of key/value pairs of strings.
typedef std::map<std::string, std::string> SSMap ;
class Dictionary: public SSMap
{
public:
Dictionary() ;
~Dictionary() {}
Dictionary(const SSMap &s): S... |
a197e6edbaa7dba1539cb1edb6378ec22ad6e691 | 8df3db4c06c5a7ddde4ea71e25b3430a1943b6f5 | privbox/llvm-project | /clang/test/OpenMP/master_taskloop_private_codegen.cpp | C++ | cpp | 25,165 | permissive | // RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -x c++ -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -x c++ -std=c++11 -triple x86_64-apple-darwin10 -emit-pch -o %t %s
// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -x c++ -triple x86_64-apple-da... |
7acbd47cea93150194c71777bf4e9830565ff005 | 706102f1afaeb33e19afd8b6850f70fa46a15c6f | govoni/learn | /root/root_v4.04.02g/tree/src/TFriendElement.cxx | C++ | cxx | 6,889 | no_license | // @(#)root/tree:$Name: v4-04-02g $:$Id: TFriendElement.cxx,v 1.11 2004/09/24 18:22:46 brun Exp $
// Author: Rene Brun 07/04/2001
/*************************************************************************
* Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
* All rights reserved. ... |
8a75d5ca96f963c9f541e97022d2a8f504ca2794 | 128995a8ae8122705fb666aba752472dab34827a | Deepak2168/Learning-C | /1- C-Basics/25-07-2017 (TASKS)/alphabet didit or special character TASK.cpp | C++ | cpp | 718 | no_license | /*Write a C program to check whether a given character is alphabet, digit or special character using if else.
A character is alphabet if it in given range a-z or A-Z.
A character is digit if it is in range of 0-9.
A character is special symbol character if it neither an alphabet nor a digit.*/
#include<stdio.h>
#inclu... |
3a38e526aa14cd9f495ff737c23f4eb7b662b78f | 5ecfff50b6ef917bfdc92ac9d59322b55eead7e2 | xiaofei2ivan/skia | /docs/examples/Paint_037.cpp | C++ | cpp | 610 | permissive | // Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "fiddle/examples.h"
// HASH=214b559d75c65a7bef6ef4be1f860053
REG_FIDDLE(Paint_037, 256, 128, false, 0) {
void draw(SkCanvas* canvas) {
SkPaint paint;
paint.setColor(0x8000F... |
c7d42482149d8c2d9e27a8699c09f624c4deffff | 95efb9e1ef0e820e7407e209eebe9364cc5c9d79 | keqhe/leetcode | /round2/leetcode282.cpp | C++ | cpp | 1,434 | no_license |
class Solution {
public:
//ref: https://leetcode.com/discuss/58614/java-standard-backtrace-ac-solutoin-short-and-clear
//ref: https://leetcode.com/discuss/83759/java-ac-solution-19ms-beat-100-00%25
//ref: https://leetcode.com/discuss/75308/java-simple-solution-beats-96-56%25
void dfs(string num, int po... |
c813e503eddb7edf736b4a2cef54d7b9e21d2987 | 33237f77a848b6e94de4d4b74379226d8905cc6b | ijames428/Boulder | /Boulder/Boulder/PlatformerLibrary/Box2DRigidBody.cpp | C++ | cpp | 10,511 | no_license | #pragma once
#include "stdafx.h"
#include <iostream>
#include "Box2DRigidBody.h"
#include "GridHandler.h"
#include "..\GameLibrary\Singleton.h"
#include "..\Constants.h"
#include "..\SmashWorld.h"
Box2DRigidBody::Box2DRigidBody(sf::RenderWindow *window, bool subject_to_gravity, bool subject_to_collision) {
render_wi... |
30032bc465835e2abc89a71a794848027db025f1 | 29828639553eaf168b0d7f2af48a055e9168a820 | Adarsh-chaurasia/Programs.cpp | /Char.cpp | C++ | cpp | 337 | no_license | #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
char array[n+1];
cin>>array;
bool check=1;
for(int i=0;i<n;i++){
if(array[i]!=array[n-1-i]){
check=0;
break;
}
}
if(check==1)
cout<<"Word is Palindrome"<<endl;
else
cout<<"Word is not a Palindrome"<<endl;
... |
82b9c5b89d1a2f07e72780716c0ca40644695318 | bb0ddd4e3eff31834a69868361a530f055140e32 | makecir/competitive-programming | /AOJ/challenges/1335.cpp | C++ | cpp | 2,093 | no_license | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
usi... |
1ba039d35c92b0c8d61165aa546573680efa4547 | b89ad8ddce3b23ad0d237a26fb513e607ef97079 | solisqq/HawkRC | /components/HSteering.cpp | C++ | cpp | 1,967 | no_license | #include "HSteering.h"
HSteering::HSteering(): HCStearingRead(), HCRXAxisRead() {}
void HSteering::init(){
throttle.addFilter(new Mapper<float>(settings.radioValues.maxVal.get(), settings.radioValues.minVal.get(), settings.engineValues.STARTV.get()-50, settings.engineValues.MAXV.get()-100));
throttle.addFilter(... |
84558853b6d4b6c1ddb7d860290210d1a1380023 | 34635adc56af54f7e1842ec190d0311a2072dbb4 | sqsgalaxys/workspace | /C++程序/设计模式/建造者模式.cpp | C++ | cpp | 1,202 | no_license | #include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;
class Product{
private:
string str;
public:
void AddString(string adStr){
str+=adStr;
}
void ShowString()const{
cout<<str<<endl;
}
};
class Builder{
virtual void BuildPartA() =0;
virtual void BuildPartB() =0 ;
virtua... |
d66faff541c048390414ceb94f2e4f90355255f5 | 5fba314828096ea99c6e37a8a0e336c388638c0d | 20190524/GAME10.0 | /mainwindow.cpp | C++ | cpp | 23,989 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <iostream>
#include<QMediaPlayer>
#include<QMediaPlaylist>
using namespace std;
static const int Towercost[]={100,200,200,300,300};
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent)
, ui(new Ui::MainWindow)
, waves(1)
, p... |
2c17e79deb58ca72eb69477f46c68ab03da84c52 | f07340f24ac035c04678c040657ff75d724ed9ac | gammasoft71/xtd | /tests/xtd.core.unit_tests/src/xtd/threading/tests/thread_interrupted_exception_tests.cpp | C++ | cpp | 20,070 | permissive | #include <xtd/threading/thread_interrupted_exception.h>
#include <xtd/tunit/assert.h>
#include <xtd/tunit/test_class_attribute.h>
#include <xtd/tunit/test_method_attribute.h>
using namespace xtd;
using namespace xtd::tunit;
namespace xtd::threading::tests {
class test_class_(thread_interrupted_exception_tests) {
... |
f2fdea8c2777e659d38a3533da2c96c2a798cdd7 | 3bd66033eebf907bc5da426a2fe94caaafec1cdd | nordugrid/arc | /src/services/a-rex/grid-manager/log/JobsMetrics.cpp | C++ | cpp | 6,198 | permissive | #ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <cstring>
#include <map>
#include <arc/StringConv.h>
#include <arc/Thread.h>
#include "JobsMetrics.h"
namespace ARex {
static Arc::Logger& logger = Arc::Logger::getRootLogger();
JobStateList::JobStateList(int _limit):limit(_limit){
failures = 0;
}
JobSta... |
defb9f8659c888bab2b3db0a2b1a9b342e9d2222 | c88e43473a5b81ebd1c6f006b6f2a59c5b92a9f7 | burmist-git/slacExperiment_USBWC-CRT_fTOF_SuperB | /G4protosim/include/fTOF_PrimaryGeneratorAction.hh | C++ | hh | 1,383 | no_license | #ifndef fTOF_PrimaryGeneratorAction_h
#define fTOF_PrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "G4String.hh"
class G4ParticleGun;
class G4Event;
class backgroundGen;
class muonGen;
class fTOF_PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
fTOF_PrimaryGen... |
92a0508dd28a9d84313837725e2419b48890834b | ca80e09afc0803f44f48eb7b54aa08ac74e66874 | taemini/programming-book-cpp-part-1 | /simple-unique-pointer.cpp | C++ | cpp | 1,198 | no_license | #include <cstdio>
#include <utility>
template <typename T>
struct SimpleUniquePointer {
SimpleUniquePointer() : pointer{} {}
SimpleUniquePointer(T* pointer) : pointer{pointer} {}
~SimpleUniquePointer() { delete pointer; }
SimpleUniquePointer(const SimpleUniquePointer&) = delete;
SimpleUniquePointer& operator... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.