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 |
|---|---|---|---|---|---|---|---|---|
92f062be63b88ba3387c2bfc1d6eaf1211192374 | 754664c0797c7a5987d0f1ccc061e78b1941402b | JackPrimiani/Computer-Science | /CSCE 350 - Data Structures and Algorithms/HW4/hw4.cpp | C++ | cpp | 2,006 | no_license | /*
Jack Primiani
CSCE 350
December 5th, 2019
*/
#include <string>
#include <iostream>
using namespace std;
int cutPalindrome(string s) {
int len = s.size();
//Milti-array for tracking palindromes
bool pal[len][len];
bool goux=true;
int cut[len];
//Initialize tracking array with non-null values
for... |
ee431db6027f761ccf5570990fbc5b12c8a13b1d | a527b4a975e8789c7fbceb9e6456b5e88f4ca304 | fprime-community/fprime-sphinx-drivers | /fprime-sphinx-drivers/SphinxUartOnboardDriver/test/ut/TesterBase.cpp | C++ | cpp | 20,621 | permissive | // ======================================================================
// \title SphinxUartOnboardDriver/test/ut/TesterBase.cpp
// \author Auto-generated
// \brief cpp file for SphinxUartOnboardDriver component test harness base class
//
// \copyright
// Copyright 2009-2016, by the California Institute of Technolo... |
3a208a153b26df4262ac9152ea8378c1bb8b31e1 | 69133c9fb26423739074c78681a35e1e19b4b290 | imfht/chromium | /components/sync_sessions/session_sync_service_impl.cc | C++ | cc | 3,001 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/sync_sessions/session_sync_service_impl.h"
#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "compo... |
eb8f5a8f1079e292c366fe9e6d713dfd3c250281 | c7c3a857dd51ff4b60139013e0fe747fcb6d5620 | asiator/homework6 | /src/ex2.cpp | C++ | cpp | 1,931 | no_license | #include <Rcpp.h>
#include <vector>
#include <list>
#include <utility>
using namespace Rcpp;
//[[Rcpp::plugins("cpp11")]]
//' @title simplify2array
//' @description This function filled matrix by vectors column-by-column.
//'
//' @param x - list of numeric vectors
//' @return matrix
//'
//' @export
//[[Rcpp::export]]... |
7c51166a26862beb742dd14a93d0b9187b6e1f09 | b893bc09086d7199e1b54832eca011691169eff9 | H6yV7Um/chromium-1 | /chromecast/browser/url_request_context_factory.cc | C++ | cc | 18,281 | 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 "chromecast/browser/url_request_context_factory.h"
#include <algorithm>
#include <utility>
#include "base/command_line.h"
#include "base/files/... |
f91ba774f9674557db7e1f60fa03d467f97787da | 5d6c6cb41d3fa93c76009294f7d23cda803cca28 | OasisGallagher/GL | /Urho3D-master/Source/Urho3D/Graphics/AnimationController.cpp | C++ | cpp | 29,484 | permissive | //
// Copyright (c) 2008-2017 the Urho3D project.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, m... |
b8c2970edd8499dfccbc6e43f4dfcdf8a80d0c2e | ab7d1e2bc744bfe77b2eab23fe5a1987a1aaa3e6 | refugecoin/refugecoin | /src/qt/askpassphrasedialog.cpp | C++ | cpp | 10,013 | permissive | // Original Code: Copyright (c) 2011-2014 The Bitcoin Core Developers
// Modified Code: Copyright (c) 2014 Project Bitmark
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "askpassphrasedialog.h"
#include "ui_askpass... |
696119fbff6be5f79fcda2fcdd802f7bf68244a2 | ee0a1184cea9e5f95fb2b996d2354638c0343b20 | simonbor/CppSocketServer | /Helper.cpp | C++ | cpp | 2,602 | no_license | #include "Helper.h"
#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
using std::string;
// recieves the type code of the message from socket (3 bytes)
// and returns the code. if no message found in the socket returns 0 (which means the client disconnected)
int Helper::getMessageTypeCode(S... |
6bd2de2285d87ec5779ab47a4e2aa765aff70c15 | 244a6c21aecef7b2cb48724aedc63e551d6ee724 | AcademySoftwareFoundation/Imath | /website/examples/Sphere3.cpp | C++ | cpp | 512 | permissive | #include <Imath/ImathSphere.h>
#include <cassert>
void
sphere3_example ()
{
Imath::V3f center (1.0f, 1.0f, 1.0f);
float radius = 2.0f;
Imath::Sphere3f s (center, radius);
assert (s.center == center);
assert (s.radius == radius);
Imath::Line3f line (
Imath::V3f (0.0f, 0.... |
d337464758504f40e09ab01d2ba113dd1777d5b6 | 862d9ba6a5877616232489a986a09ed487dbbb2a | mehedi432/program_cpp | /areaRectangle196.cpp | C++ | cpp | 542 | no_license | /*
Task-> Area of Rectangle.
1.Start
2.Take input length and width
3.Calculate Area (area = length * width)
4.Print Area
*/
#include <iostream>
using namespace std;
double totalArea(float length, float width){
double area;
return(length*width);
}
int main(){
double length,wi... |
c37b51b4bb8dcedaaee03f94173edc7ea5c18001 | 9b3d7eb1a5cba6b874da627850e9934dc4353e4b | nilsknacken/A3B-repo | /sandbox/conny/Testa/gui/MainWindowP3.cpp | C++ | cpp | 1,205 | no_license | #include "MainWindow.h"
#include "ui_MainWindow.h"
void MainWindow::on_pushButtonP3remove_reservation_clicked()
{
}
void MainWindow::on_pushButtonP3checkout_clicked()
{
}
void MainWindow::setup_tableWidgetP3() const
{
ui->tableWidgetP5->setColumnCount(6);
ui->tableWidgetP5->setHorizontalHeaderLabels(QStrin... |
1f685b23e887ec3dbea95d6cd38aa094b6eeb20a | ab41d339d8605728023cf00949dc47e6886ba081 | mworks/mworks | /core/Core/SoundStimuli/AudioPCMBufferSound.cpp | C++ | cpp | 4,374 | permissive | //
// AudioPCMBufferSound.cpp
// MWorksCore
//
// Created by Christopher Stawarz on 8/4/22.
//
#include "AudioPCMBufferSound.hpp"
#include "MachUtilities.h"
BEGIN_NAMESPACE_MW
const std::string AudioPCMBufferSound::LOOP("loop");
const std::string AudioPCMBufferSound::REPEATS("repeats");
void AudioPCMBufferSo... |
989876cb9247884accbcd964ce16cf66a2257c70 | d8c61ed90d49b55feb997d1f344e2be7999f6719 | jkarns275/exact | /rnn/gru_node.cxx | C++ | cxx | 12,047 | no_license | #include <cmath>
#include <fstream>
using std::ostream;
#include <iomanip>
using std::setw;
#include <iostream>
using std::cerr;
using std::cout;
using std::endl;
#include <string>
using std::string;
#include <random>
using std::minstd_rand0;
using std::uniform_real_distribution;
#include <vector>
using std::vect... |
cc5fde29613b1884e4a96e15574b1b09e782b749 | adaab88f9b82abd55d9ccdd68638a4158e71af34 | lxc-xx/CudaSample | /NVIDIA_CUDA-5.5_Samples/7_CUDALibraries/MC_SingleAsianOptionP/src/test.cpp | C++ | cpp | 4,024 | no_license | /*
* Copyright 1993-2013 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related... |
cc31650c4821f69c6d33594b816f0a8c061923e7 | 17d26466fa35cb650d48ee5d3684ecb703e614e5 | nilpunch/DXEngine | /WinProg/WindowContainer.cpp | C++ | cpp | 5,080 | no_license | #include "WindowContainer.h"
WindowContainer::WindowContainer()
{
static bool isRawInputInitialised = false;
if (isRawInputInitialised == false)
{
RAWINPUTDEVICE rid[1];
// Mouse
rid[0].usUsagePage = 0x01;
rid[0].usUsage = 0x02;
rid[0].dwFlags = NULL;
rid[0].hwndTarget = NULL;
//// Pointer WIP
//rid... |
5abf522516528323c9df7b277575b61736cfdc98 | 2e07ef506a9acac727d7196dc1bc4e30091bbe28 | gabrielkheisa/sha256-noBLOCKCHAIN | /main.cpp | C++ | cpp | 3,285 | no_license | #include <iostream>
#include <string>
#include "sha256.h"
using std::string;
using std::cout;
using std::endl;
struct block {
string hash_before;
string transaction;
string hash_now;
};
void generate_hash(string *hash_now,string *transaction){
*hash_now = sha256(*transaction);
return;
}
void saveto_ne... |
485f523d7b02869fce1cc7b1b1f58cd3fddc819d | c60fd2e8e363584f23748eb6aeaf61fe6b3e8af8 | Carfi-Fondamenti-Informatica/calcolo-numeri-di-fibonacci-minori-di-n-elenabissocoli03 | /main.cpp | C++ | cpp | 438 | no_license | #include <iostream>
using namespace std;
int main(){
int n =0, primo = 0, secondo = 1, terzo = 0;
cin >> n;
cout << "1" << endl;
for (int i = 2; i<=(n+1); i++) {
if (terzo <= n) {
terzo = primo + secondo;
primo = secondo;
... |
a9657bc4d2482ff5c2d6b77f89ebb409090a6bdc | 3b5481291b6d38e81c6b7da17cca1ba8d4b3068a | joselbe1976/swift | /lib/Sema/CSGen.cpp | C++ | cpp | 133,378 | permissive | //===--- CSGen.cpp - Constraint Generator ---------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
d216b87cf3ee7418b2244160366d3e50b967a062 | 19ef864da843c157b3face9999eaf3cb6c6e72de | Nanonej/Piscine_CPP | /d03/ex04/FragTrap.hpp | C++ | hpp | 1,346 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* FragTrap.hpp :+: :+: :+: ... |
eb97ac57abcd0b94b8ee6f3574483b46d396560b | 620636054074015ea4ff9ba3bb7524f42a8ec607 | CMSTrackerDPG/cmssw | /SimMuon/GEMDigitizer/src/GEMSimpleModel.cc | C++ | cc | 12,854 | permissive | #include "SimMuon/GEMDigitizer/interface/GEMSimpleModel.h"
#include "Geometry/GEMGeometry/interface/GEMEtaPartitionSpecs.h"
#include "Geometry/CommonTopologies/interface/TrapezoidalStripTopology.h"
#include "Geometry/GEMGeometry/interface/GEMGeometry.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "CLHEP/... |
4542e61ce0ae7a98ab820992713eebea53c76836 | f53d9b9a941f050490da619240baa3e9a16dc8e0 | maca134/breakingpointmod | /breakingpoint_sfx/CfgMusic.hpp | C++ | hpp | 5,327 | no_license | /*
Breaking Point Mod for Arma 3
Released under Arma Public Share Like Licence (APL-SA)
https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Alderon Games Pty Ltd
*/
class CfgMusic
{
class PitchWhine
{
name = "PitchWhine";
sound[] = {"\breakingpoint_sfx\effects\pitchWine.ogg", db+5, ... |
4296de092fe6aa53750d71def3bf31929bddc54a | a04813a835dda7f169746232fd1eafd79b69b377 | otcshare/chromium-src | /chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api_unittest.cc | C++ | cc | 6,446 | permissive | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_api.h"
#include <memory>
#include <string>
#include <utility>
#includ... |
c5b548f2370b074032a49447f438ffca2172bc2a | 68b8ff48b0054a8ae731882445bc14f51ac1517c | blagodarin/yttrium | /libs/renderer/src/renderer.cpp | C++ | cpp | 2,053 | permissive | // This file is part of the Yttrium toolkit.
// Copyright (C) Sergei Blagodarin.
// SPDX-License-Identifier: Apache-2.0
#include "renderer.h"
#include <yttrium/geometry/matrix.h>
#include <yttrium/geometry/rect.h>
#include <yttrium/image/image.h>
#include <yttrium/renderer/mesh.h>
#include <yttrium/renderer/program.h... |
2910b08c16572ff402f54f2e70eef46a120f6043 | c249ceeb3722821131938ebed6f05403df79314d | vaibhavarena/Snake_Game | /src/controller.cpp | C++ | cpp | 1,178 | no_license | #include "controller.h"
#include <iostream>
#include "SDL.h"
#include "snake.h"
void Controller::ChangeDirection(Snake &snake, Snake::Direction input,
Snake::Direction opposite) const {
if (snake.direction != opposite || snake.getSize() == 1) snake.direction = input;
return;
}
voi... |
cbedfe7e6ef6f78d3a6890f2a85f9aebc77982dd | 57a722bd9f97ba9bee756757ebd87ec53155395f | RuurddeRonde/Trixs-raytracer | /Power-iteration-master/matrix.cpp | C++ | cpp | 6,217 | permissive | //
// matrix.cpp
//
// Created by Furkanicus on 12/04/15.
// Copyright (c) 2015 Furkan. All rights reserved.
//
#include "matrix.h"
using namespace std;
// Constructor for Any Matrix
Matrix::Matrix(unsigned rowSize, unsigned colSize, double initial){
m_rowSize = rowSize;
m_colSize = colSize;
m_matrix.r... |
87e2212fda9b837108e9f22c01a42a5c85f9a982 | 33182cec0079b5df28dab57cb3ff039cfac10c6e | rayray0117/EV1_Projects | /Engine/Code/Engine/Renderer/SpriteSheet.cpp | C++ | cpp | 1,314 | no_license | #include "Engine/Renderer/SpriteSheet.hpp"
#include "Engine/Math/MathUtils.hpp"
#include "Engine/RHI/Texture2D.hpp"
SpriteSheet::SpriteSheet(const Texture& texture, int tilesWide, int tilesHigh)
: m_spriteSheetTexture(&texture)
, m_spriteLayout(tilesWide, tilesHigh)
, m_spriteSheetTextureDX(nullptr)
{
}
SpriteShee... |
3782221bd8f3428072a56ab83a8800165b3cb71f | 704ee144f4c0497653e96d45d1e8bba1564bc27f | leafeonia/leetcode | /C++/code/1359.cpp | C++ | cpp | 242 | no_license | class Solution {
public:
int countOrders(int n) {
long ans = 1, mod = 1e9 + 7;
// (2 * x - 1) * x
for (int i = 1; i <= n; i++) {
ans = ans * (2 * i - 1) * i % mod;
}
return ans;
}
}; |
834662a041733c6952b3c4983a36d91bd516e6dc | 98ffd2f3c75159cd6c4769264a7b73703b3beb0a | eTakazawa/procon-archive | /atcoder.jp/indeednow-quala/indeednow_2015_quala_1/Main.cpp | C++ | cpp | 347 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,pair<int,int>> PP;
typedef long long ll;
const double EPS = 1e-9;
const int INF = 1e9;
const int MOD = 1e9+7;
int dy[] = {0,1,0,-1};
int dx[] = {1,0,-1,0};
int main(void) {
string A,B;
cin >> A >> B;
cout << A.size()*B.size(... |
08bd8c357ee7671e0121e6c491ca9b7440935cd7 | 11aeec3949cc5ffef93ab26175443da88fcc08ce | VB6Hobbyst7/OSGAddOnsGV | /Bindings/Python/OSGEffectGroups/module/generated/HDRStageDataBase.pypp.cpp | C++ | cpp | 19,731 | no_license | // This file has been generated by Py++.
// PyOpenSG is (C) Copyright 2005-2009 by Allen Bierbaum
//
// This file is part of PyOpenSG.
//
// PyOpenSG is free software; 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; ... |
71c2e14740a9cec7624100fe04e400f5a23fc3bc | aca150574935ea75e7b74818673b37c959fca9b2 | Zishuo/SpellChecker | /SpellClient.cpp | C++ | cpp | 4,596 | no_license | //Copyright (C) <2014> <Zishuo Wang>
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distribute... |
e02ddedcc6383ce2b18c9aaed4b266031d9288be | 68fae93d0ed5a567d0060b293311be33295240af | pjunior/titanium | /modules/ti.Network/network_module.cpp | C++ | cpp | 634 | permissive | /**
* Appcelerator Titanium - licensed under the Apache Public License 2
* see LICENSE in the root folder for details on the license.
* Copyright (c) 2008 Appcelerator, Inc. All Rights Reserved.
*/
#include "network_module.h"
#include "network_binding.h"
using namespace kroll;
using namespace ti;
namespace ti
{
... |
dfdea61734105b66f797eec6eca5b431a4e4948f | 43ec0ec41fbbef58ecd432eb64a4428b4bee7782 | connectthefuture/psdmrepo | /psana_python/tags/V00-01-00/src/EnvObjectStoreWrapper.cpp | C++ | cpp | 795 | no_license |
#include <list>
#include <sstream>
#include <psana_python/EnvObjectStoreWrapper.h>
#include <psddl_python/EnvObjectStoreGetter.h>
namespace psana_python {
boost::python::object
EnvObjectStoreWrapper::get(const std::string& typeName, const std::string& sourceName)
{
PSEvt::Source source = (sourceName == "") ? PSEv... |
b4a131578889f2ff18becd9b5918104635a2afd0 | ec546b86bdf8a9270bb73063c47afd0b452552ee | TobyRoseman/SFrame | /oss_src/unity/lib/gl_datatype_registration.cpp | C++ | cpp | 641 | permissive | /**
* Copyright (C) 2016 Turi
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*/
#include<unity/lib/gl_sarray.hpp>
namespace graphlab {
namespace sdk_sarray {
/*
* BEGIN_CLASS_REGISTRATION
* REGISTER_CLASS(... |
7da0287975c415865cab90dde9fae81dcf67e76a | ce75f74d8cbd57a782d96f2e4c797f8575851169 | deep40191/monero | /src/cryptonote_core/cryptonote_core.cpp | C++ | cpp | 62,807 | permissive | // Copyright (c) 2014-2018, The Monero Project
//
// 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
/... |
384d28ec08d123560faed12a995702be2104fbe2 | c8e4b3b8672188b2493e63418f2804739ebfbb6f | liuye1996/ACM_Works | /25.A Famous Music Composer/A Famous Music Composer.cpp | C++ | cpp | 2,573 | no_license | /*
2018/3/26
题目25
A Famous Music Composer
时间限制:1000 ms | 内存限制:65535 KB
难度:1
描述
Mr. B is a famous music composer. One of his most famous work was his set of preludes. These 24 pieces span the 24 musical keys (there are musically distinct 12 scale notes, and each may use major or minor tonality). The 12 distinct... |
eeb561f0c7a2c6f44da42265e5508ccaa0822a71 | a7dc02ffcfeefb296d666ab5496d8f1fcf8dfbea | WaySmit72/sipxecs | /sipXcallLib/examples/sipXtapiDriver/src/sipXtapiDriver/HistoryCommand.cpp | C++ | cpp | 5,873 | no_license | //
//
// Copyright (C) 2007 Pingtel Corp., certain elements licensed under a Contributor Agreement.
// Contributors retain copyright to elements licensed under a Contributor Agreement.
// Licensed to the User under the LGPL license.
//
// $$
////////////////////////////////////////////////////////////////////////////... |
2a799d397461d6992e3bcd5cd3350ee250b88ad6 | a65f806a36d9f2212f023f4f69041bbf9cfaa0c0 | thewanderer8891/Outbreak | /sqf/outbreak_code/config/cfgMagazines/Items/boltcutters.hpp | C++ | hpp | 252 | no_license | class boltcutters: CA_Magazine
{
displayName = "Boltcutters";
count = 1;
class ItemInfo
{
mass = 6;
};
picture = "\outbreak_assets\textures\items\boltcutters.paa";
model = "a3\structures_f\Items\Tools\Pliers_F";
descriptionShort = "";
}; |
fe074ead4fc6ac39e452808215cc03d1971aa242 | a4743e8178abcbed15cfc1f9457504ba3c0c3554 | andreszerocross/SMCAMDProcessor | /SMCAMDProcessor/SMCAMDProcessorUserClient.cpp | C++ | cpp | 11,452 | permissive | //
// SMCAMDProcessorUserClient.cpp
// SMCAMDProcessor
//
// Created by Qi HaoYan on 2/4/20.
// Copyright © 2020 Qi HaoYan. All rights reserved.
//
#include "SMCAMDProcessorUserClient.hpp"
OSDefineMetaClassAndStructors(SMCAMDProcessorUserClient, IOUserClient);
bool SMCAMDProcessorUserClient::initWithTask(task... |
fed424c85a1d6523c8bb245b3c287e2b269d3372 | 3c9d459e3356902abbc3a5bdf965059908fe012a | kevinms/cu-ray | /fplane.cpp | C++ | cpp | 2,418 | no_license | /**********************************************************************
* Kevin Matthew Smith && Burns John Hudson
* kevin4 && burnsh
* CpSc 102 Section 003
* March 25, 2009
* Program 6
*
* Description
* This program parses and loads the data for the fplane structure.
* Also a dumper function.
**************... |
b9a8f7395f6a39c3a42a88c4d4476446c1476378 | 275393839ef82fb0437c1978b2fb5ceed41f000b | jareguo/engine | /native/cocos/renderer/gfx-gles3/states/GLES3Sampler.cpp | C++ | cpp | 2,153 | permissive | /****************************************************************************
Copyright (c) 2019-2023 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
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 t... |
fdecc2f052eb3d5418be501b6998585d163e91f1 | a73deb4c407c53a4d27fa325a03c5a2f2a3e8fd7 | Bruce0A0Z/CPP_Learning | /Guess Number Game.cpp | C++ | cpp | 923 | no_license | #include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main() {
cout << "Hello there, what's your name?\n" << endl;
string firstname;
cin >> firstname;
cout << "\nHello, " << firstname << ". Let's play a game.\n" << endl;
cout << "I have picked a number from 1 to 100. Guess what it i... |
4e4a148ab44396df8ea21ee9fdec15b645c07803 | 535d1ce79196dd76bf38e5e1f842a6604ec9d1d6 | daring-board/SpeechToText | /app/src/main/cpp/native-lib.cpp | C++ | cpp | 267 | no_license | #include <jni.h>
#include <string>
extern "C"
JNIEXPORT jstring
JNICALL
Java_com_example_recoder_MainActivity_stringFromJNI(
JNIEnv *env,
jobject /* this */) {
std::string hello = "Hello from C++";
return env->NewStringUTF(hello.c_str());
}
|
87ebce723d7723471c516710412db9d0e61c221d | 86bf393eaf9b8b7f87e6e47603733d445ea69277 | fsetti/milliQan | /Headers/past/muonAnalysis.cc | C++ | cc | 13,232 | no_license | // Make milliqan validation plots. D. Stuart, Oct. 2017.
// adapted F. Setti, Jul. 2019.
#include "/home/users/fsetti/milliQan/Headers/past/muonAnalysis.h"
bool sort_wrt_channel( vector<float> vec1, vector<float> vec2 ){
return vec1[0] < vec2[0];
}
bool sort_wrt_height( vector<float> vec1, vector<float> vec... |
ce160e88b5869e10a5acc1e48fa6bed77f60fff8 | 162a3d315995b4296039f827cac1de161032eb07 | romix/prop-cc | /lib-src/persist/pmisc.cc | C++ | cc | 3,036 | permissive | //////////////////////////////////////////////////////////////////////////////
// NOTICE:
//
// ADLib, Prop and their related set of tools and documentation are in the
// public domain. The author(s) of this software reserve no copyrights on
// the source code and any code generated using the tools. You are encourag... |
1777428abb55535d94ec2de0bcdba2e8aa1e39d0 | 956be0fd589fe21323d4cd9bcfa1b48832dc4057 | HowToCodeWithPaws/ug-msu | /однопроходные/57.cpp | C++ | cpp | 708 | no_license | 1.57. Найдите количество элементов последовательности, для которых
остаток от деления на 3 равен остатку от деления на 5, а также значение
последнего такого элемента.
#include<stdio.h>
int main(){
FILE * f;
f = fopen("input.txt", "r");
if (f == NULL) {
printf("Fatal error, what's wrong with the file?\n");
ret... |
029f24d25b1ccc4c2bfd50b7d806b511588cec87 | 438ed9e909eccdbfc4ca817af878ff50d804e365 | josephkehoe/Sugarscape | /SugarScape/AgentCulture.cpp | C++ | cpp | 1,134 | no_license | //
// AgentCulture.cpp
// SugarScape
//
// Created by Joseph Kehoe on 12/05/2015.
// Copyright (c) 2015 Joseph P Kehoe. All rights reserved.
//
#include "AgentCulture.h"
/**
* Constructor - passes World pointer to parent constructor
* @param sim :Pointer to World
* @param theStrategy :pointer to preferred Stra... |
bdbafb2e09c8aac50759ab7c727ac752824d20ad | 5d2bfa05d98910f272f61c12384dc3186aca2eaa | sasq64/apone | /mods/archive/unrar/crc.cpp | C++ | cpp | 1,453 | permissive | #include "rar.hpp"
uint CRCTab[256];
void InitCRC()
{
for (int I=0;I<256;I++)
{
uint C=I;
for (int J=0;J<8;J++)
C=(C & 1) ? (C>>1)^0xEDB88320L : (C>>1);
CRCTab[I]=C;
}
}
uint CRC(uint StartCRC,const void *Addr,size_t Size)
{
if (CRCTab[1]==0)
InitCRC();
byte *Data=(byte *)Addr;
#if ... |
eec47016f84f484a53265eef6ce45c1ae5b007c8 | b170023ce29a64c31b8074f591ff111af7095cfa | Wicwik/cuda-paralpr | /cuDNN/src/lib/image_parser.hh | C++ | hh | 1,051 | no_license | /*
* Simple image handling using OpenCV
*/
#pragma once
#include <opencv2/opencv.hpp>
namespace ip
{
cv::Mat load_img(std::string image_path)
{
cv::Mat img = imread(image_path, cv::IMREAD_COLOR);
img.convertTo(img, CV_32FC3); // 32 bit floats
cv::normalize(img, img, 0, 1, cv::NO... |
27308dbc48f7ce33bc22e2d0c26832f18b558559 | 53936d50eff839d72242d4f7c972ce433673e6fb | TouchDeeper/vio_data_simulation | /src/wheel.cpp | C++ | cpp | 7,951 | no_license | //
// Created by hyj on 18-1-19.
//
#include "wheel.h"
#include "utilities.h"
//// euler2Rotation: body frame to interitail frame
//Eigen::Matrix3d euler2Rotation( Eigen::Vector3d eulerAngles)
//{
// double roll = eulerAngles(0);
// double pitch = eulerAngles(1);
// double yaw = eulerAngles(2);
//
// d... |
bc550cc625fca421fc80a3d352b421dc40f121c9 | debe7a4f3ec1ef8ce05f19f474f5a05801074611 | meriadec/lib-ledger-core-node-bindings | /src/NJSOperationListCallback.hpp | C++ | hpp | 1,661 | no_license | // AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from callback.djinni
#ifndef DJINNI_GENERATED_NJSOPERATIONLISTCALLBACK_HPP
#define DJINNI_GENERATED_NJSOPERATIONLISTCALLBACK_HPP
#include "../include/../utils/optional.hpp"
#include "../include/Error.hpp"
#include "../include/Operation.hpp"
#inc... |
36146c37fabc6bc619f1c1c491cab0ecea1c1862 | 21bdefb1adde96edd4a6724bd4743d44f59de064 | Rumpl3slaw/OOPLab-1.1 | /OOPLab 1.1/OOPLab 1.1.cpp | C++ | cpp | 838 | no_license | #include <iostream>
#include <Windows.h>
#include "Goods.h"
using namespace std;
bool Goods::Init(double price, int number)
{
bool tmp;
if (price>0 && number >0)
{
first = price;
second = number;
tmp = true;
}
else
tmp = false;
cout << "Некоректні параметри" << endl;
return tmp;
}
void Goods::Rea... |
04b7df3a175da3f7f56f53823bcde36575e1683a | 1979a32ce5545d56418a1fd72800281a57988174 | Smerity/FlashGraph | /libsafs/wpaio.cpp | C++ | cpp | 3,229 | permissive | /**
* Copyright 2014 Open Connectome Project (http://openconnecto.me)
* Written by Da Zheng (zhengda1936@gmail.com)
*
* This file is part of SAFSlib.
*
* 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 ... |
14ca809db08e84a434cfbef391d30af5cd67f3a5 | feb94c51ab4b390ec94a74269e0b0cee200d7341 | cednik/space_transmitter | /fw/lib/display/PCF8574.hpp | C++ | hpp | 933 | permissive | #pragma once
#include "port.hpp"
#include "i2c.hpp"
#include "../time/time.hpp"
template <class I2C>
class PCF8574_t
:public port8_t
{
typedef typename I2C::data_type data_type;
public:
typedef typename I2C::address_type address_type;
typedef port8_t port_type;
typedef typename port_type::value_typ... |
542c12b2245d5b73718482f23acc6547964b2d52 | 785c9e6983e91721747af3a933db3cf4c45ebd68 | Fujita388/practical_Cpp | /hello/9-6.cpp | C++ | cpp | 477 | no_license | ///文字列の'-'を'_'に変換///
#include <iostream>
#include <string>
int main(){
std::string change(std::string line, int len); //関数のプロトタイプ
std::string old_line = "alkdfn-nya-akdfn_as-";
std::cout << change(old_line, old_line.length()) << '\n';
return 0;
}
std::string change(std::string line, int len... |
fe103aa1a0984b9981cba37d19f85c9d64e6ac7f | b791d1cf1e83a9fc3234cd83a40ca4b964fe4b63 | BekzhanKassenov/olymp | /acm.timus.ru/Том 05(1400 - 1499)/1497/1497.cpp | C++ | cpp | 1,425 | no_license | #include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <cstring>
using namespace std;
bool can[1001][1001];
int a[1001][1001];
int n;
bool check() {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++)
if (a[i][j] == 0 && !can[i][j]) {
return false;
}
}
return true;... |
a5935ee4014dddbbd27fceb10b52126ffe56ce03 | ead310dae838dafebb7ee2bc5e181abad0b28c6b | liang0/chromium | /chromecast/browser/exo/cast_wm_helper.cc | C++ | cc | 8,859 | permissive | // Copyright 2018 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 "chromecast/browser/exo/cast_wm_helper.h"
#include "base/callback_helpers.h"
#include "base/memory/singleton.h"
#include "chromecast/browser/cas... |
3a679edee0cf063b0c819d037c5ba6501a6d3590 | 7b3e0e3fc4b9f385adfe19a05cf3f82c71eba567 | skakarla1982/paralution | /paralution-1.1.0/src/base/ocl/kernels/ocl_kernels_dia.hpp | C++ | hpp | 3,940 | no_license | // **************************************************************************
//
// PARALUTION www.paralution.com
//
// Copyright (C) 2015 PARALUTION Labs UG (haftungsbeschränkt) & Co. KG
// Am Hasensprung 6, 76571 Gaggenau
// Handelsregister: Amtsgericht Mannheim,... |
81e10f37beb78da974fc7913997b3a69593c11f6 | 09bcecd42be31a3d36ec5df395c3f7a9bbfda351 | carlosal1015/or-tools | /examples/cpp/flow_api.cc | C++ | cc | 3,467 | permissive | // Copyright 2010-2018 Google LLC
// 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... |
5d7b2c45072af1709f10085883b99e6d2efe5583 | 5383513411f0d6de038360e1eea658de0390ee87 | vivianng30/rainer-fabian-gui | /FabianHFO/WndWaitHourglass.cpp | C++ | cpp | 12,599 | no_license | // WndWaitHourglass.cpp : implementation file
//
#include "stdafx.h"
#include "FabianHFO.h"
#include "WndWaitHourglass.h"
extern HFONT g_hf11AcuBold;
/**********************************************************************************************//**
* CWndWaitHourglass
*
* \author Rainer Kühner
* \d... |
7facd24ba3d31e7ed778c83360fb255a40350408 | 7b9e410c2ae04728fe9da8ce4ec68a187d4248fd | johndpope/CBIR | /Classification/createLabelledDataset.cpp | C++ | cpp | 7,009 | no_license | /*
* @Author: pkar
* @Date: 2016-02-18 18:08:52
* @Last Modified by: Pratyush Kar
* @Last Modified time: 2016-03-21 17:02:12
*/
#include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <string>
//OpenCV Headers
#include <opencv/cv.h>
#include <opencv/highgui.h>
using namespace std;
us... |
316d1c1488024413aa92379137ab9b1d72a6d150 | b26d2f6955c66fe8e21baaa7b5609688d2eb86b6 | wbgilmartin/rocBLAS | /library/src/blas3/trtri_trsm.hpp | C++ | hpp | 15,334 | permissive | /* ************************************************************************
* Copyright 2016-2020 Advanced Micro Devices, Inc.
*
* ************************************************************************ */
#pragma once
#ifndef __TRTRI_TRSM_HPP__
#define __TRTRI_TRSM_HPP__
#include "gemm.hpp"
#include "rocblas_trt... |
37cd4ece0cad67ce3c9e84fed2d639f3bd95b496 | 9263783bb6fc435e528c5ad63377b61f299c3dc4 | jtokuah/NFCPaymentApp | /arm/o.le-v7-g/.moc/moc_alternatinglistitem.cpp | C++ | cpp | 5,331 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'alternatinglistitem.hpp'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************... |
b9e648f08dafeb2a16b74094b8b7b5b97724f9a8 | 1244356574f807bf6adce7584344351e854684e0 | nasosev/SheafSystemTest | /fiber_bundles_test/fiber_spaces/st4_e3.t.cc | C++ | cc | 4,034 | no_license |
//
// Copyright (c) 2013 Limit Point Systems, 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 ... |
e16a80ef086731cd30704d76270b61ca6260c23d | 3862d2b9b879e908b250eb4520d1359c70d28aad | iridium-browser/iridium-browser | /third_party/dawn/src/tint/ast/transform/expand_compound_assignment.cc | C++ | cc | 7,804 | permissive | // Copyright 2022 The Tint Authors.
//
// 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 ... |
5f122484d52aaf2dfbea2d5249777197a9814764 | 9fb34fa482f13ca3b9c48a260f270f17c2872d76 | yyccz123/Demos_MFC | /11_skinh_demo/11_skinh_demoDoc.cpp | C++ | cpp | 2,721 | no_license |
// 11_skinh_demoDoc.cpp : CMy11_skinh_demoDoc 类的实现
//
#include "stdafx.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "11_skinh_demo.h"
#endif
#include "11_skinh_demoDoc.h"
#include <propkey.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CMy11_skinh_dem... |
d8cc4ec9d395f42374871b61bbb53065b0cd3f01 | acc9cca84767e4c07247df9fa3e63703abebdb52 | On-Jin/stf | /include/ANommable.hpp | C++ | hpp | 776 | permissive | #pragma once
#include <string>
#include <stdexcept>
class ANommable {
public:
class NameAlreadyTaken : public std::invalid_argument {
public:
NameAlreadyTaken() noexcept = delete;
explicit NameAlreadyTaken(std::string const &s) noexcept
: invalid_argument(s){};
~NameAlr... |
b9e93ef356c3f101098a71c2de294740ef1115ce | b4d7a34be3d9b620cb413029479ae60dd18d8062 | Brute-f0rce/l0phtcrack | /external/qtpropertybrowser/examples/object_controller/main.cpp | C++ | cpp | 6,047 | permissive | /****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Solutions component.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms o... |
f57d6e591078ac2818308fb4955163fb1a5f2019 | 2398dfc6c096228d49722bb979c4d6b11055f294 | mhhabib/HackerRank | /30 days of code/Day 12 Inheritance.cpp | C++ | cpp | 1,731 | no_license | #include <iostream>
#include <vector>
using namespace std;
class Person{
protected:
string firstName;
string lastName;
int id;
public:
Person(string firstName, string lastName, int identification){
this->firstName = firstName;
this->lastName = lastName;
this->id = identification;
}
void printP... |
403f6d96fd8d9cb810a50409cf160b16b7bd153f | adffc9566da082e109c0ab738720c97fa186d657 | STSjeerasak/tensorflow | /tensorflow/lite/micro/simple_memory_allocator_test.cc | C++ | cc | 8,021 | permissive | /* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
11689225a9403e969464bd4a824446a9e0008651 | fa448f693189d36b13f4d7de5c5f992fff13bb81 | seliftl/opengl-rasterops | /RasterOps/sceneoit.cpp | C++ | cpp | 5,311 | no_license | #include "sceneoit.h"
#include <iostream>
using std::endl;
using std::cerr;
#include <vector>
using std::vector;
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/constants.hpp>
using glm::vec3;
using glm::mat4;
using glm::vec3;
using glm::vec4;
SceneOit::SceneOit() {}
void SceneOit::initScene()
{
compil... |
9e14750a8b79dfda4d7de833f606defe8fcd6b89 | feb61f3a884668ee0a36dd7a2f73b7f526e1a230 | cameronlpm/starting_out_cpp | /chapter_13/program_13-2.cpp | C++ | cpp | 2,144 | permissive | // This program creates three instances of the Rectangle class
#include <iostream>
using namespace std;
// Rectangle class declaration
class Rectangle
{
private:
double width;
double length;
public:
void setWidth(double);
void setLength(double);
double getWidth() const;
double getLength() cons... |
1d63e5e07d207294450ca5e128b6096923d51cff | a1d80607140e6cc546070a207a0533a76d907345 | Deadmanovi4/mmo-resourse | /武侠世界/代码/服务器/Server/Server/Obj/Obj_Monster_AttrRefesh.cpp | C++ | cpp | 7,979 | no_license | #include "stdafx.h"
// Obj_Monster_AttrRefesh.cpp
#include "Scene.h"
#include "Obj_Human.h"
#include "GCCharBaseAttrib.h"
#include "GCCharImpactListUpdate.h"
#include "GameTable.h"
#include "Obj_Monster.h"
extern ENUM_REFESH_ATTR_TYPE CalcRefeshAttrType(Obj_Character *pSour, Obj_Character *pTarget );
... |
ce1d8bf1b5ba09c587b4ce7b8e9f8cc76f706fb0 | 47c77166c82cbef61208b85f1ae73cf0212c8b12 | patrickcjk/rogue-company-sdk | /SDK/RC_AssetRegistry_parameters.hpp | C++ | hpp | 14,840 | no_license | #pragma once
// RogueCompany (Dumped by Hinnie) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "../SDK.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Parameters
//---------------------------------------------------------------------------
// Funct... |
6c3acd26b3323eb871f1a933ac7a9ac3c9872d3a | a3b73ef48cb01cad99f98dcfb278a9fe850a8923 | songchaegyeong/opencv_study | /learningOpencv-bookstudy/chapter/bong/chapter6.cpp | C++ | cpp | 5,936 | no_license | /*
* chapter6.cpp
*
* Created on: 2014. 1. 28.
* Author: bong
*/
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <math.h>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
using namespace cv;
void houghlin... |
02ffe69d17ae521fcbbc2d4128383c9f0447434f | 187c9bd1640299effa45939ae0372f7fad4bc7a2 | szolotykh/particle-code-base | /segmentdisplay/segment_display.cpp | C++ | cpp | 748 | no_license | /**********************************************************
*
* File name: segment_display.cpp
* Author: milk3dfx
*
*********************************************************/
#include "application.h"
#include "segment_display.h"
#define NPINS 7
void SegmentDisplay::Init ()
{
for(int i = 0; i < NPINS; i... |
9923c1837d705da501d92a4c0fd2c959269297d8 | b53bcaa78793dd21290da2bcf882762e621383d4 | acgetchell/CDT-plusplus | /include/Triangulation_traits.hpp | C++ | hpp | 2,413 | permissive | /*******************************************************************************
Causal Dynamical Triangulations in C++ using CGAL
Copyright © 2021 Adam Getchell
******************************************************************************/
/// @file Triangulation_traits.hpp
/// @brief Traits class for particular... |
2b04d221936309c3f9a216f0e765c1980014c55c | 84022f312328324598bfbf066c2b01a17278e7c4 | horejsek/progtest | /pa2/04_genericky_seznam_prvku/pa2-4.cpp | C++ | cpp | 10,765 | no_license | #ifndef __PROGTEST__
#include <iostream>
#include <cstdlib>
#include <sstream>
#include <cstring>
#include <stdio.h>
using namespace std;
#endif /* __PROGTEST__ */
template <class T>
class CList
{
public:
CList(void);
CList(const CList &cl);
~CList(void);
int Size(void) const;
... |
76e849cbc87b67d8f16812d4dd3d1357bc664d35 | 9559aec6541da6d1cf129d91a80530b3c2565622 | PeterBee97/bjd_HW | /毕骏达_2015011159-5/选做题/src/选做题3.cpp | C++ | cpp | 457 | no_license | #include<iostream>
using namespace std;
int main()
{
int i,j,k,s[5]={0},sum;
cout<<"ÕâЩÊýÊÇ£º\n";
for (i=1;i<1000;i++)
{
sum=0;
for (j=1;j<=i;++j)
{
if(0==i%j)
{
s[sum]=j;
sum++;
}
if(sum>5) break;
if((5==sum)&&(j==i))
{... |
a1a55dcc50154038537deb7ee226f61055ae5076 | 9c23eed052d175f07471fb96f34cfec3cdbfa76d | GDBOI101/Nacro | /Nacro/SDK/FN_WoodHouse_Windows_OneSideTrim_classes.hpp | C++ | hpp | 698 | permissive | #pragma once
// Fortnite (1.8) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass WoodHouse_Windows_OneSid... |
7d4288591df6c9448f576180f49d9d28377d4007 | 1cb41c8db6db831155cd509606454070e06b348a | fast-project/lama | /src/test/cuda/distributed/CUDA_P_SparseMatrixTest.cpp | C++ | cpp | 8,514 | no_license | /**
* @file CUDA_P_SparseMatrixTest.cpp
*
* @license
* Copyright (c) 2009-2013
* Fraunhofer Institute for Algorithms and Scientific Computing SCAI
* for Fraunhofer-Gesellschaft
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files... |
390c65befe7b89d469de5e030f54e7338c4efd42 | 9af47b641dc3c50b4c1ec715a8f1335b8097b54b | v1nnyb0y/acmp | /11-20/20.Пилообразная последовательность_(sawtooth sequence).cpp | C++ | cpp | 2,379 | permissive | #define _CRT_SECURE_NO_WARNINGS
//#define TESTING_ 1;
//#define _DEBUG 1;
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <iterator>
#include <numeric>
#include <limits>
#include <algorithm>
#include <string>
#include... |
ad1ba8769a88b44d85a3cdee9e0ecbf5183a8e52 | bac29dd0299b86af959cc10917deeac8de31d493 | jakibaki/whatsapp-purple | /libaxolotl-cpp/libcurve25519/curve.cpp | C++ | cpp | 1,352 | no_license | #include <stdio.h>
#include <stdint.h>
#include "curve.h"
extern "C" {
#include "src/curve25519-donna.h"
#include "src/ed25519/additions/curve_sigs.h"
}
Curve25519::Curve25519()
{
printf("No initialization for Curve class. Use static functions.\n");
}
void Curve25519::generatePrivateKey(char *random)
{
rand... |
02b92dc738725113087faf9e8654a14c40bb2247 | c7df06e754f391e91bf61b24848031d250a1e2a9 | cenit/GammaJetAnalyzer | /src/GammaJetAnalyzer.cc | C++ | cc | 32,929 | permissive | // v. 0.19.SS
// class GammaJetAnalyzer
// GammaJetAnalyzer.cc
// APAnalyzers/GammaJetAnalyzer/src/GammaJetAnalyzer.cc
//
// Original Author: Andrea Perrotta
// Additional Work: Stefano Sinigardi
// Created: Thu Sep 27 17:00:00 CEST 2007
//
#include "GammaJetAnalyzer.h"
#include "FWCore/Mes... |
21a56966aa94659323f8f7e5e4c24be31a39441b | c008b0e19cf0511991be0e601f458da7806632a8 | swordlegend/Cube-Engine | /CubeEngine/Application/CubeGame/GameNodeEditor.cpp | C++ | cpp | 32,135 | permissive | #include "GameNodeEditor.h"
#include "2D/imnodes.h"
#include "NodeEditorNodes/ControlPartNode.h"
#include "NodeEditorNodes/BearingPartNode.h"
//#include <minwindef.h>
#include "Base/GuidMgr.h"
#include "ControlPart.h"
#include "SpringPart.h"
#include "Engine/Engine.h"
#include "NodeEditor/Include/imgui_node_editor.h"
#... |
dce2322f9460ac372c983318ded6e8185b7b88f5 | 7dd76e2be9de90ca17d537135b0e930ac81ab0bd | tianya2010/jittor | /src/mem/allocator/cuda_host_allocator.cc | C++ | cc | 909 | permissive | // ***************************************************************
// Copyright (c) 2021 Jittor. All Rights Reserved.
// Maintainers: Dun Liang <randonlang@gmail.com>.
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
// ******************... |
328d923e3851f1945420477a3c63f937acbe10ed | 46d923e69ddb8ae44d27f1ee3dfd282c33bbbbd9 | hsgwa/tracepoint_test | /src/test_case.cpp | C++ | cpp | 2,470 | permissive | #include <chrono>
#include <memory>
#include <iostream>
#include <utility>
#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/int32.hpp"
using namespace std::chrono_literals;
int main(int argc, char *argv[]) {
rclcpp::init(argc, argv);
auto topic_name = "chatter";
auto talker_node1 = std::make_shared<rclcpp... |
0036ae3c9083e4bf384c73e3e31e1f942c840a5d | 169ff78d28a204a776afeb5cf9f3d323de7804ff | acc-cosc-1337-spring-2021/acc-cosc-1337-spring-2021-Hannah-Kim-acc | /src/homework/tic_tac_toe/tic_tac_toe_manager.cpp | C++ | cpp | 768 | permissive | //cpp
#include "tic_tac_toe_manager.h"
#include <utility>
using std::move;
#include<ostream>
void TicTacToeManager::update_winner_count(string winner)
{
if (winner =="X"){x_win ++;}
else if(winner =="O"){o_win++;}
else{ties ++;}
}
void TicTacToeManager::save_game(unique_ptr<TicTacToe> &b)
{
update_winner_c... |
8008d71f0d6f15126c37d37dc117ef1becd3d8a2 | 896175e1c5aa0d6f9d047b1902875d0a6b66252a | xueqiya/chromium_src | /out/release/gen/gpu/ipc/common/sync_token.mojom-shared.cc | C++ | cc | 3,401 | permissive | // gpu/ipc/common/sync_token.mojom-shared.cc is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2016 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.
#if defined(_MSC_VER)
#pragma warning(push)
#p... |
7fb0d1c7bdacf3117b2a12d8d41a4dbefb0bb811 | 847284bcbf85e41f9b5578533ad7fe2b1a1a7900 | MauriciPrats/ButtonMasher | /Classes/DragAndDrop/DraggableItem.cpp | C++ | cpp | 1,441 | no_license | #include "DragAndDrop/DraggableItem.h"
#include "DragAndDrop/DroppablesManager.h"
DraggableItem::DraggableItem(int idDraggableItem, cocos2d::ui::Button* button, Enumerators::MashButtonType type) {
this->type = type;
this->button = button;
this->idDraggableItem = idDraggableItem;
auto listener = cocos2d::EventListe... |
4af3c9d97be40715f4dbefcc9498c96cb753d115 | fb8eaadab66ab0396b27a84f8582442d93f0310f | benoitleteneur-dolby/libear | /tests/gain_calculator_direct_speakers_tests.cpp | C++ | cpp | 13,450 | permissive | #include <Eigen/Core>
#include <boost/make_unique.hpp>
#include <catch2/catch.hpp>
#include <map>
#include <string>
#include <vector>
#include "common/geom.hpp"
#include "ear/bs2051.hpp"
#include "ear/ear.hpp"
#include "ear/metadata.hpp"
#include "helper/vector_approx.hpp"
using namespace ear;
using Gains = std::vect... |
14f89106db6ecadb594d3cd3a2fcd8f29dde99b4 | f09da8e85f9da9ffeb964f975db9efce32206a93 | ankit0905/codeforces-hackerrank-solutions | /codeforces-solution/669b.cpp | C++ | cpp | 775 | no_license | #include <iostream>
#include <string>
using namespace std;
int main()
{
long long int n,i;
cin >> n;
char str[n+2];
string s;
cin >> s;
/*long long int len=s.length();
for(i=0; i<len; i++){
str[i+1]=s[i];
}
str[len]='\0';*/
long long int arr[n+1];
for(i=0; i<n; i++){... |
07e2b0be0a0e48a2a5aca7e572420031fc8a42f2 | 7be87a13999389dbf3f83b0f92e0adcd1b430898 | wang17/opengm | /include/opengm/inference/infandflip.hxx | C++ | hxx | 4,773 | permissive | #pragma once
#ifndef OPENGM_INF_AND_FLIP_HXX
#define OPENGM_INF_AND_FLIP_HXX
#include <vector>
#include <set>
#include <string>
#include <iostream>
#include <stdexcept>
#include <list>
#include "opengm/opengm.hxx"
#include "opengm/inference/inference.hxx"
#include "opengm/inference/lazyflipper.hxx"
#include "opengm/i... |
a55734198b3dd844cc78628344b9b1d8d87f20f7 | fa2251407f42041dca104be97a00f6f5e85f2a42 | niuxu18/logTracker-old | /second/download/rsync/gumtree/rsync_patch_hunk_600.cpp | C++ | cpp | 12,553 | no_license | /* this can happen if duplicate names were removed */
return;
permstring(perms, f->mode);
if (preserve_links && S_ISLNK(f->mode)) {
- rprintf(FINFO,"%s %11.0f %s %s -> %s\n",
- perms,
- (double)f->length, timestring(f->modtime),
+ rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
+ perms,
+ (double) ... |
6c5825b69b13a5391cede2d04d28cec4b23d41de | 4b9102704c2ca6fb6f07f57066b402726ed86737 | AcuteAngleCloud/Acute-Angle-Chain | /libraries/chain/include/aacio/chain/generated_transaction_object.hpp | C++ | hpp | 5,064 | permissive | /**
* @file
* @copyright defined in aac/LICENSE.txt
*/
#pragma once
#include <fc/io/raw.hpp>
#include <aacio/chain/transaction.hpp>
#include <fc/uint128.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/mem_fun.hpp>
#include "multi_index_includes.hpp"
namespace aacio { namespace ch... |
f3a321f65d06fe1daf7dd757293c32dfc416612c | 14e5687bb21676c77df9a5ae8dfc1d424a825a55 | vitalispopoff/DSA_CPP_Lecture | /classes.cpp | C++ | cpp | 3,905 | no_license | #include "_externalLibs.h"
#include "classes.h"
// Example 1 -----------------------------------
class ExampleClass1 {
public:
char c;
ExampleClass1() {
c = (char) 165;
cout << "\n\t" << "ExampleClass1 constructor successfully called." << endl;
}
~ExampleClass1() {
c = 2;
}
};
void classesExample1()... |
702cea32132511329b41dc0264cb2153dfec15af | 37efad51991bc3933c78c2e16ec3e8529e7f4078 | trouble-max/PP1 | /Informatiks/3061.cpp | C++ | cpp | 269 | no_license | #include <iostream>
using namespace std;
int main(){
int x, i, cont = 0;
cin >> x;
i = 1;
if(x == 0 || x == 1) cout << "0";
else{
do{
i = i * 2;
cont++;
} while(i < x);
}
cout << cont;
return 0;
} |
90523d0f94c4d40caaa7b35649227cdf38b07e52 | f84f18ec50349af854217fd753131f19dcfa37d5 | gnachman/fish-shell | /env_universal_common.cpp | C++ | cpp | 51,126 | no_license | /**
\file env_universal_common.c
The utility library for universal variables. Used both by the
client library and by the daemon.
*/
#include "config.h"
#include "env_universal_common.h"
#include <fcntl.h>
#include <sys/un.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/file.h>
#include <sys/s... |
c4c32282155a031a7930cb0d24b665d594b62143 | e07f146b5e7d38618845b3c7e8a0545174d94a36 | xeon2007/WSProf | /Components/Sourcecode/Components/InstallConfigLib/TestInstallConfigLib/TestRegistrar.cpp | C++ | cpp | 19,545 | no_license | #include "stdafx.h"
#include "..\InstallAgentProcessController.h"
#include "TestRegistrar.h"
#include "GenericMockInstallAgentProcessController.h"
#include "..\Registrar.h"
#include "..\DocProvChooser.h"
#include "..\EmailChooser.h"
#include "..\NotesTypelibRegistrar.h"
#include "..\DiscoveryRegistryInfoRegistrar.h"
#... |
b38bbecc6f990cfd968010a504a90a1dffb4d560 | 36147d0b630a674728ed055537e96b4acb2c09ec | s00500/esphome | /esphome/components/duty_cycle/duty_cycle_sensor.cpp | C++ | cpp | 1,766 | permissive | #include "duty_cycle_sensor.h"
#include "esphome/core/log.h"
#include "esphome/core/helpers.h"
namespace esphome {
namespace duty_cycle {
static const char *TAG = "duty_cycle";
void DutyCycleSensor::setup() {
ESP_LOGCONFIG(TAG, "Setting up Duty Cycle Sensor '%s'...", this->get_name().c_str());
this->pin_->setup(... |
d6e330f519143003efee6a23938a47109af63e67 | d6cdab3b5bad8260a89c6b78f063783c90a5a52b | moumen19/robotiquecartemere | /Vision/RobotVisionModule/main.cpp | C++ | cpp | 964 | no_license |
#include <iostream>
#include "Camera.hpp"
#include "Stereovision.hpp"
int main( int argc, char **argv )
{
// création des caméra
Camera Left_cam(0);
Camera Right_cam(1);
// chargement des matrices intrinsèques/distortion
Left_cam.LoadMatrices("left_cam_matrices.xml");
Right_cam.Loa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.