repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
AndySmile/BachelorThesis
DemoApp/Src/TerrainBuilder.cpp
/** * DemoApp - Terrain Builder Model. * * @author <NAME><<EMAIL>> * @file Src/TerrainBuilder.cpp * @version 1.3.1 14-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup demoapp */ #include <TerrainBuilder.h> #include <Terrai...
AndySmile/BachelorThesis
DemoApp/Src/TerrainDecorator.cpp
/** * @version 1.0.0 03-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <TerrainDecorator.h> TerrainDecorator::TerrainDecorator(void) { } TerrainDecorator::~TerrainDecorator(void) { }
AndySmile/BachelorThesis
DemoApp/Src/Test/EntityDummy.cpp
/** * @version 1.0.0 04-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <Test/EntityDummy.h> namespace DemoAppTest { EntityDummy::EntityDummy(void) { } EntityDummy::~EntityDummy(void) { } ...
AndySmile/BachelorThesis
DemoApp/Src/ImageTransformer.cpp
/** * @version 1.5.0 12-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <ImageTransformer.h> #include <TerrainVoxel.h> #include <TerrainMesh.h> #include <OpenCV/highgui.h> #ifdef _DEBUG #include <SimpleLib/Logger.h> #endif ImageTransfo...
AndySmile/BachelorThesis
DemoApp/Src/Test/TerrainAbstractTest.cpp
/** * DemoApp - Abstract Terrain Model Test Suite. * * Actually this is a test suite for TerrainAbstract class. * like the name let it already assume that the class is abstract * so we need a particular implementation to actually test it. * that's why the TerrainDummy class will be used for all tests * but only ...
AndySmile/BachelorThesis
DemoApp/Src/Test/TerrainBuilderTest.cpp
<reponame>AndySmile/BachelorThesis /** * DemoApp - Terrain Builder Test Suite. * * @author <NAME><<EMAIL>> * @file Src/Test/TerrainBuilderTest.cpp * @version 1.3.0 09-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <Test/Ter...
AndySmile/BachelorThesis
DemoApp/Src/EntityAbstract.cpp
<gh_stars>0 /** * @version 1.0.0 04-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <EntityAbstract.h> EntityAbstract::EntityAbstract(void) { } EntityAbstract::EntityAbstract(const glm::vec3 position) : _position(position) { ...
AndySmile/BachelorThesis
DemoApp/Src/SimpleLib/OpenGLHelper.cpp
<gh_stars>0 /** * @version 1.1.1 28-Dec-14 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <SimpleLib/OpenGLHelper.h> #include <SimpleLib/Logger.h> #include <SFML/OpenGL.hpp> #include <string> namespace SimpleLib { void OpenGLHelper::printErro...
AndySmile/BachelorThesis
DemoApp/Src/Test/TestMain.cpp
/** * DemoApp - UnitTest Main. * * @author <NAME><<EMAIL>> * @version 1.5.0 09-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <cppunit/ui/text/TestRunner.h> #include <Test/ImageTransformerTest.h> #include <Test/SimpleLib/DataCollec...
AndySmile/BachelorThesis
Prototypes/VoxelTerrainDemo/Src/DemoScene.cpp
/** * @version 1.5.1 08-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <DemoScene.h> #include <SFML/OpenGL.hpp> #include <SFML/Graphics/Image.hpp> #ifdef _DEBUG #include <iostream> #endif DemoScene::DemoScene(void) { } DemoScene::~De...
AndySmile/BachelorThesis
Prototypes/VoxelTerrainDemo/Src/VoxelChunk.cpp
<reponame>AndySmile/BachelorThesis /** * @version 1.2.0 09-Dec-14 * @copyright Copyright (c) 2014 by <NAME>. All rights reserved. */ #include <VoxelChunk.h> #include <SFML/OpenGL.hpp> #include <stdlib.h> #ifdef _DEBUG #include <iostream> #endif VoxelChunk::VoxelChunk(const unsigned short widt...
AndySmile/BachelorThesis
DemoApp/Src/AppConfig.cpp
<filename>DemoApp/Src/AppConfig.cpp /** * SimpleLib - App Config Model. * * @author <NAME>\<<EMAIL>\> * @file Src/AppConfig.cpp * @version 1.4.0 12-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup simplelib */ #include <Ap...
AndySmile/BachelorThesis
Prototypes/ImageParameter/Src/ImageProcessor.cpp
<filename>Prototypes/ImageParameter/Src/ImageProcessor.cpp /** * @version 1.1.0 03-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <ImageProcessor.h> #include <vector> #include <OpenCV/cv.h> #ifdef _DEBUG #include <iostream> #endif Im...
AndySmile/BachelorThesis
DemoApp/Src/SimpleLib/Application.cpp
<filename>DemoApp/Src/SimpleLib/Application.cpp<gh_stars>0 /** * SimpleLib - Application Model. * * @author <NAME>\<<EMAIL>> * @file Src/SimpleLib/Application.cpp * @version 1.5.1 02-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ing...
AndySmile/BachelorThesis
DemoApp/Src/Test/EntityAbstractTest.cpp
<gh_stars>0 /** * DemoApp - Abstract Entity Model Test Suite. * * Actually this is a test suite for EntityAbstract class. * like the name let it already assume that the class is abstract * so we need a particular implementation to actually test it. * that's why the EntityDummy class will be used for all tests * ...
AndySmile/BachelorThesis
DemoApp/Src/Test/ImageTransformerTest.cpp
/** * DemoApp - ImageTransformer Test Suite. * * @author <NAME><<EMAIL>> * @version 1.1.0 09-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <Test/ImageTransformerTest.h> #include <ImageTransformer.h> #include <ImageProcessorHeightMa...
AndySmile/BachelorThesis
DemoApp/Src/ImageProcessorBlurring.cpp
/** * @author <NAME><<EMAIL>> * @version 1.0.0 12-Jan-15 * @copyright Copyright (c) 2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <ImageProcessorBlurring.h> #include <OpenCV/cv.h> ImageProcessorBlurring::ImageProcessorBlurring(void) { } ImageProcessorBlurring::~ImagePro...
AndySmile/BachelorThesis
DemoApp/Src/SimpleLib/Camera.cpp
<filename>DemoApp/Src/SimpleLib/Camera.cpp<gh_stars>0 /** * SimpleLib - Camera Model. * * @author <NAME>\<<EMAIL>> * @file SimpleLib/Camera.cpp * @version 1.1.0 02-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup simplelib ...
AndySmile/BachelorThesis
Prototypes/VoxelTerrainDemo/Src/Main.cpp
<reponame>AndySmile/BachelorThesis<filename>Prototypes/VoxelTerrainDemo/Src/Main.cpp<gh_stars>0 /** * @version 1.2.0 30-Nov-14 * @copyright Copyright (c) <NAME>. All rights reserved. */ #include <SimpleLib/Application.h> #include <DemoScene.h> #include <SFML/Graphics.hpp> #include <SFML/OpenGL.hpp> ...
AndySmile/BachelorThesis
DemoApp/Src/TerrainDescriptorWater.cpp
/** * DemoApp - Water Terrain Descriptor Model. * * @author <NAME><<EMAIL>> * @file Src/TerrainDescriptorWater.cpp * @version 1.1.0 04-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup demoapp */ #include <TerrainDescriptor...
AndySmile/BachelorThesis
Prototypes/MeshTerrainDemo/Src/SimpleLib/Camera.cpp
<filename>Prototypes/MeshTerrainDemo/Src/SimpleLib/Camera.cpp /** * @version 1.0.0 03-Aug-14 * @copyright Copyright (c) 2014 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <SimpleLib/Camera.h> #include <SFML/OpenGL.hpp> namespace SimpleLib { Camera::Camera(void) : _posi...
AndySmile/BachelorThesis
DemoApp/Src/SimpleLib/Logger.cpp
<reponame>AndySmile/BachelorThesis /** * SimpleLib - Logger Model. * * @author <NAME>\<<EMAIL>\> * @file SimpleLib/Logger.cpp * @version 1.1.2 03-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup simplelib */ #include <Simp...
AndySmile/BachelorThesis
DemoApp/Src/Test/TerrainDummy.cpp
/** * @version 1.1.0 09-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <Test/TerrainDummy.h> namespace DemoAppTest { TerrainDummy::TerrainDummy(void) : TerrainAbstract(0, 0, 0, 0.0f) { } TerrainDummy::~Ter...
AndySmile/BachelorThesis
DemoApp/Src/HeightMap.cpp
/** * @version 1.1.0 09-Jan-15 * @copyright Copyright (c) 2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <HeightMap.h> #include <cstddef> #ifdef _DEBUG #include <SimpleLib/Logger.h> #endif HeightMap::HeightMap(const unsigned int width, const unsigned int height) : _dat...
AndySmile/BachelorThesis
Prototypes/PerlinNoiseDemo/Src/AppMain.cpp
<filename>Prototypes/PerlinNoiseDemo/Src/AppMain.cpp<gh_stars>0 /** * @version 1.1.0 29-Dec-14 * @copyright Copyright (c) 2014 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <OpenCV/cv.h> #include <OpenCV/cxcore.h> #include <OpenCV/highgui.h> #include <stdlib.h> #define SAMPLE_IMAGE...
AndySmile/BachelorThesis
DemoApp/Src/TerrainVoxel.cpp
/** * @version 2.4.0 09-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <TerrainVoxel.h> #include <SFML/OpenGL.hpp> #include <stdlib.h> #ifdef _DEBUG #include <cassert> #endif TerrainVoxel::TerrainVoxel(void) : TerrainAbstract(0, 0...
AndySmile/BachelorThesis
DemoApp/Src/SimpleLib/DataCollection.cpp
/** * SimpleLib - DataCollection Model. * * @author <NAME>\<<EMAIL>\> * @file SimpleLib/DataCollection.cpp * @version 1.1.3 12-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup simplelib */ #include <SimpleLib/DataCollectio...
AndySmile/BachelorThesis
DemoApp/Src/ImageProcessorHistogramHeightMap.cpp
<reponame>AndySmile/BachelorThesis /** * @version 1.3.0 12-Jan-15 * @copyright Copyright (c) 2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <ImageProcessorHistogramHeightMap.h> #include <OpenCV/cv.h> #include <vector> #include <algorithm> #ifdef _DEBUG #include <SimpleLib/...
AndySmile/BachelorThesis
DemoApp/Src/DemoAppScene.cpp
/** * DemoApp - Demo Application Scene. * * @author <NAME>\<<EMAIL>\> * @file Src/DemoAppScene.cpp * @version 1.8.0 09-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup demoapp */ #include <SimpleLib/SimpleLib.h> #include...
AndySmile/BachelorThesis
DemoApp/Src/ImageProcessorHeightMap.cpp
<gh_stars>0 /** * DemoApp - Height Map Image Processor Model. * * @author <NAME>\<<EMAIL>\> * @file Src/ImageProcessorHeightMap.cpp * @version 2.4.0 12-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup demoapp */ #include <...
AndySmile/BachelorThesis
Prototypes/ImageParameter/Src/AppMain.cpp
/** * ImageParameter - Application Main. * * @author <NAME><<EMAIL>> * @file Src/AppMain.cpp * @version 1.2.0 03-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <OpenCV/cv.h> #include <OpenCV/cxcore.h> #include <OpenCV/high...
AndySmile/BachelorThesis
DemoApp/Src/TerrainMesh.cpp
/** * DemoApp - Terrain Mesh Model. * * @author <NAME>\<<EMAIL>\> * @file Src/TerrainMesh.cpp * @version 2.6.0 09-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup demoapp */ #include <TerrainMesh.h> #include <SimpleLib/Ope...
AndySmile/BachelorThesis
Prototypes/MeshTerrainDemo/Src/SimpleLib/Application.cpp
/** * @version 1.3.2 21-Dec-14 * @copyright Copyright (c) 2014 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <SimpleLib/Application.h> #include <SFML/OpenGL.hpp> #ifdef _DEBUG #include <iostream> #endif namespace SimpleLib { Application::Application(void) { } ...
AndySmile/BachelorThesis
DemoApp/Src/DemoAppMain.cpp
/** * @defgroup demoapp DemoApp * * @author <NAME>\<<EMAIL>\> * @file Src/DemoAppMain.cpp * @version 1.2.1 12-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <SimpleLib/Application.h> #include <DemoAppScene.h> #include <cstdl...
AndySmile/BachelorThesis
Prototypes/MeshTerrainDemo/Src/DemoScene.cpp
<reponame>AndySmile/BachelorThesis<gh_stars>0 /** * @version 1.0.2 08-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <DemoScene.h> #include <SFML/OpenGL.hpp> #include <SFML/Graphics/Image.hpp> #ifdef _DEBUG #include <iostream> #endif ...
AndySmile/BachelorThesis
DemoApp/Src/Test/HeightMapTest.cpp
/** * DemoApp - Height Map Test Suite * * @author <NAME><<EMAIL>> * @file Src/Test/HeightMapTest.cpp * @version 1.1.0 09-Jan-15 * @copyright Copyright (c) 2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) */ #include <Test/HeightMapTest.h> #include <HeightMap.h> #include <Simp...
AndySmile/BachelorThesis
DemoApp/Src/TerrainEnvironment.cpp
/** * DemoApp - Terrain Environment Descriptor Model. * * @author <NAME><<EMAIL>> * @file Src/TerrainEnvironmentDescriptor.cpp * @version 2.0.0 09-Jan-15 * @copyright Copyright (c) 2014-2015 by <NAME>. All rights reserved. (http://andysmiles4games.com) * @ingroup demoapp */ #include <Terra...
mfkiwl/Colorlight-FPGA-Projects
src/i5/hdmi_test_pattern/llhdmi_tb.cpp
#include <verilatedos.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <time.h> #include <sys/types.h> #include <signal.h> #include "verilated.h" #include "Vllhdmi.h" #include "testb.h" int main(int argc, char **argv) { Verilated::commandArgs(argc, argv); TESTB<Vllhdmi> *tb ...
mfkiwl/Colorlight-FPGA-Projects
src/i5/hdmi_test_pattern/pattern_tb.cpp
#include <verilatedos.h> #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <time.h> #include <sys/types.h> #include <signal.h> #include "verilated.h" #include "Vpattern.h" #include "testb.h" int main(int argc, char **argv) { Verilated::commandArgs(argc, argv); TESTB<Vpattern> *tb...
magdesign/ofxPiMapper
src/MediaServer/DirectoryWatcher.cpp
<filename>src/MediaServer/DirectoryWatcher.cpp #include "DirectoryWatcher.h" namespace ofx { namespace piMapper { DirectoryWatcher::DirectoryWatcher(string path, int watcherMediaType){ directoryPath = path; _mediaType = watcherMediaType; if(_mediaType == SourceType::SOURCE_TYPE_VIDEO){ _directory.allowExt("mp4"...
magdesign/ofxPiMapper
src/ofxPiMapper.cpp
<filename>src/ofxPiMapper.cpp<gh_stars>1-10 #include "ofxPiMapper.h" ofxPiMapper::ofxPiMapper(){} void ofxPiMapper::setup(){ _application.setup(); } void ofxPiMapper::update(){ _application.update(); } void ofxPiMapper::draw(){ _application.draw(); } void ofxPiMapper::keyPressed(int key){ ofKeyEventArgs args; ...
magdesign/ofxPiMapper
src/Surfaces/QuadSurface.cpp
#include "QuadSurface.h" namespace ofx { namespace piMapper { QuadSurface::QuadSurface(){ _perspectiveWarping = false; setup(); } QuadSurface::~QuadSurface(){ cout << "QuadSurface destructor." << endl; } void QuadSurface::setup(){ // Create 4 points for the 2 triangles ofVec2f p1 = ofVec2f(0, 0...
magdesign/ofxPiMapper
src/Sources/BaseSource.cpp
<reponame>magdesign/ofxPiMapper #include "BaseSource.h" namespace ofx { namespace piMapper { BaseSource::BaseSource(){ //cout << "BaseSource" << endl; init(); } BaseSource::BaseSource(ofTexture * newTexture){ init(); texture = newTexture; } BaseSource::~BaseSource(){} ofTexture * BaseSource::getTexture(){ ret...
magdesign/ofxPiMapper
example_gamepad/src/InputHandler.cpp
<reponame>magdesign/ofxPiMapper #include "InputHandler.h" InputHandler * InputHandler::_instance = 0; InputHandler * InputHandler::instance(){ if(_instance == 0){ _instance = new InputHandler(); } return _instance; } void InputHandler::initialise(){ if(SDL_Init(SDL_INIT_JOYSTICK) >= 0){ std::cout << "Joysti...
magdesign/ofxPiMapper
src/Commands/SetSourceCmd.cpp
#include "SetSourceCmd.h" namespace ofx { namespace piMapper { SetSourceCmd::SetSourceCmd(int sourceType, string sourceId, BaseSurface * surface, SourcesEditorWidget * sourcesEditor){ _sourceType = sourceType; _sourceId = sourceId; _surface = surface; _sourcesEditor = sourcesEditor; } ...
magdesign/ofxPiMapper
src/Gui/Widgets/TextureEditorWidget.cpp
#include "TextureEditorWidget.h" namespace ofx { namespace piMapper { TextureEditorWidget::TextureEditorWidget(){ _pollCreateJoints = false; clear(); } void TextureEditorWidget::setup(){ // Nothing here yet. } void TextureEditorWidget::update(){ if(surface == 0){ return; } if(_pollCreateJoints){ creat...
magdesign/ofxPiMapper
example/src/CrossSource.cpp
#include "CrossSource.h" CrossSource::CrossSource(){ name = "Cross FBO Source"; allocate(500, 500); } void CrossSource::draw(){ ofClear(0); ofSetColor(255, 255, 0, 255); #if (OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR >= 9) || OF_VERSION_MAJOR > 0 ofDrawRectangle(0, 0, getWidth(), getHeight()); #else ofRect(...
magdesign/ofxPiMapper
src/Sources/FboSource.cpp
<reponame>magdesign/ofxPiMapper #include "FboSource.h" namespace ofx { namespace piMapper { FboSource::FboSource(){ fbo = 0; name = PIMAPPER_FBO_SOURCE_DEF_NAME; loadable = false; loaded = false; type = SourceType::SOURCE_TYPE_FBO; _disableDraw = false; } FboSource::~FboSource(){ clear(); } void FboSource::u...
magdesign/ofxPiMapper
example_shortcuts/src/ofApp.cpp
<filename>example_shortcuts/src/ofApp.cpp<gh_stars>1-10 #include "ofApp.h" void ofApp::setup(){ ofBackground(0); mapper.setup(); } void ofApp::update(){ mapper.update(); } void ofApp::draw(){ mapper.draw(); } void ofApp::keyPressed(int key){ if(key == '1'){ mapper.setMode(ofx::piMapper::PRESENTATION_MODE); ...
magdesign/ofxPiMapper
src/Gui/Widgets/SourcesEditorWidget.cpp
#include "SourcesEditorWidget.h" namespace ofx { namespace piMapper { SourcesEditorWidget::SourcesEditorWidget(){ mediaServer = 0; } void SourcesEditorWidget::setup(){ createSelectors(); } void SourcesEditorWidget::createSelectors(){ imageSelector = new RadioList(); videoSelector = new RadioList(); fboSelector...
tinyspeck/glitch-hq-android
jni/Gallery.cpp
#include <string.h> #include <jni.h>
ifritee/skynet
src/snAux/src/auxFunc.cpp
<gh_stars>1-10 // // SkyNet Project // Copyright (C) 2018 by Contributors <https://github.com/Tyill/skynet> // // This code is licensed under the MIT License. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to dea...
ifritee/skynet
src/snOperatorCPU/src/CPU/fullyConnectedCPU.cpp
// // SkyNet Project // Copyright (C) 2018 by Contributors <https://github.com/Tyill/skynet> // // This code is licensed under the MIT License. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the Sof...
bikerglen/usb-analog-panel-meters
sw/linux/measurements.cpp
#include <linux/types.h> #include <linux/input.h> #include <linux/hidraw.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/socket.h> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <netdb.h> #include <arpa/inet.h...
Nav21000/Shop-Management-software-c-
Final Source Code.cpp
/*Shop Management System Project Source Code Developed using concepts of file handling and oops concepts Username: Admin Password: <PASSWORD> */ #include<iostream> #include<fstream> #include<conio.h> #include<process.h> // exit() fuction #include<string.h> // strcmp() and strcpy() fun...
stanfill/pmartR
src/group_comparisons.cpp
<gh_stars>10-100 #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::depends(RcppArmadillo)]] //This is a copy of `fold_change_diff` that will be called by `group_comparison` // [[Rcpp::export]] arma::mat fold_change_diff_copy(arma::mat data, arma::mat C) { //Given the group means, and wan...
stanfill/pmartR
src/holm_adjustment.cpp
#include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] NumericVector holm_cpp(NumericVector ps) { int n = ps.size(); NumericVector sorted_ps = clone(ps); NumericVector adj_ps(n); int keep_going = 1; std::sort(sorted_ps.begin(), sorted_ps.end()); adj_ps[0] = fmin(sorted_ps[0]*n,1.0); for(int...
stanfill/pmartR
src/nonmissing_per_grp.cpp
<gh_stars>10-100 #include <RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] using namespace Rcpp; std::vector<int> grp_siz(std::vector<std::string> group) { std::vector<std::string> temp; temp = group; //std::sort(temp.begin(),temp.end()); temp.erase( std::unique( temp.begin(), temp.end() ), temp.e...
stanfill/pmartR
src/two_factor_anova.cpp
#include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] List two_factor_anova_cpp(arma::mat y, arma::mat X_full, arma::mat X_red, NumericVector red_df, arma::colvec group_ids){ int i,j; int n = y.n_rows; int p_red = X_red.n_cols; int p_full ...
stanfill/pmartR
src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: <PASSWORD> #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // anova_cpp List anova_cpp(NumericMatrix data, NumericVector gp, int unequal_var, NumericVector df_red); RcppExport SEXP _pmartR_anova_cpp(SEXP dat...
stanfill/pmartR
src/anova_helper_funs.cpp
<reponame>stanfill/pmartR #include <Rcpp.h> using namespace Rcpp; //For each row (peptide), this function computes the group means, counts the number of non-NA //observations, estimates sigma^2, then computes the ANOVA F-statistic and associated p-value // //The results of this function are fed into group_comparison()...
stanfill/pmartR
src/covariate_funs.cpp
<filename>src/covariate_funs.cpp #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::depends(RcppArmadillo)]] //------Function to construct the null space projection matrix------// // [[Rcpp::export]] List proj_mat_cpp(arma::mat X, int ngroups){ //If the X matrix has atleast two rows, find...
stanfill/pmartR
src/kw_rcpp.cpp
<reponame>stanfill/pmartR /*This program uses Rcpp attributes to import pure C++ functions into R. The main function takes in an anrmadillo matrix(which has already had the anova filter applied to it) and parses through its rows. NA values are skipped and non-NA values are stored in a vector of vectors called groups, ...
stanfill/pmartR
src/pooled_cv_rcpp.cpp
<reponame>stanfill/pmartR /*This program uses Rcpp attributes to import pure C++ functions into R. The main function takes in an anrmadillo matrix and parses through its rows. NA values are skipped and non-NA values are stored in their respective "group" vectors. Then the coefficient of variation (cv) is taken of ...
stanfill/pmartR
src/gtest_helper_funs.cpp
<reponame>stanfill/pmartR #include <Rcpp.h> using namespace Rcpp; //For each row (peptide), this function computes the group means, counts the number of non-NA //observations, estimates sigma^2, then computes the ANOVA F-statistic and associated p-value // //The results of this function are fed into group_comparison()...
stanfill/pmartR
src/count_missing_cpp.cpp
<filename>src/count_missing_cpp.cpp<gh_stars>10-100 #include <Rcpp.h> using namespace Rcpp; //Used by imd_test in order to count the number of missing observations for each row in //the data matrix // [[Rcpp::export]] NumericMatrix count_missing_cpp(NumericMatrix data, NumericVector gp) { //data is the n-by-p matri...
stanfill/pmartR
src/tukey_helper.cpp
#include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] NumericMatrix ptukey_speed(NumericMatrix qstats, NumericVector sizes) { int n_samps = qstats.nrow(); int n_compares = qstats.ncol(); NumericMatrix new_pvals(n_samps,n_compares); int i,j; for(i=0; i<n_samps; i++){ for(j=0; j<n_compares; j++){...
stanfill/pmartR
src/fc_functions.cpp
#include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::depends(RcppArmadillo)]] /* Old verion of fold_change_diff that can't handle missing values (kept for posterity only) arma::mat fold_change_diff(arma::mat data, arma::mat C) { //Given the group means, and wanted group comparisons, compute...
BioDataAnalysis/xsimd
include/xsimd/arch/generic/xsimd_generic_memory.hpp
/*************************************************************************** * Copyright (c) <NAME>, <NAME>, <NAME> and * * <NAME> * * Copyright (c) QuantStack * * Copyright (c) <NAME> ...
ilikdoge/sange
src/message.cpp
<reponame>ilikdoge/sange #include "wrapper.h" #include "message.h" void MessageContext::async_cb(uv_async_t* async){ Message* msg, *next; MessageContext* ctx = (MessageContext*)async -> data; ctx -> mutex.lock(); msg = ctx -> message_head; ctx -> active = false; ctx -> message_head = nullptr; ctx ->...
ilikdoge/sange
src/addon.cpp
#include <napi.h> #include "wrapper.h" #include "ffmpeg.h" Napi::Object init(Napi::Env env, Napi::Object exports){ avformat_network_init(); #ifdef SANGE_DEBUG av_log_set_level(AV_LOG_TRACE); #else av_log_set_level(AV_LOG_FATAL); #endif exports = PlayerWrapper::init(env); return exports; } NODE...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
convert_24h_to_12h/convert_24h_to_12h.cpp
#include <iostream> #include <string> using namespace std; int main() { int hour24, minutes24; int hour12, minutes12; string period; char temp; cout<<"Please enter a time in 24 hour format:"<<endl; cin>>hour24>>temp>>minutes24; minutes12 = minutes24; if(hour24 >= 0 && hour24 <= 11){ ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
ascii_value/ascii_value.cpp
<reponame>BjornChrisnach/Introduction_to_Programming_in_C_plusplus #include <iostream> using namespace std; int main() { char inputChar; int asciiValue; cout<<"Please enter a character:"<<endl; cin>>inputChar; asciiValue = (int)inputChar; cout<<"The ASCII value of "<<inputChar<<" is "<<ascii...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
parity/parity.cpp
#include <iostream> using namespace std; int main() { int userInput; cout<<"Please enter a positive number:"<<endl; cin>>userInput; if(userInput % 2 == 0) { cout<<userInput<<" is even"<<endl; } else { cout<<userInput<<" is odd"<<endl; } return 0; }
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
fibonacci/fibonacci.cpp
#include <iostream> using namespace std; int main() { int totalNumAsked, resultValue, intValue0, intValue1, intValue2; cout<<"Please enter a positive integer greater than 1:"<<endl; cin>>totalNumAsked; for(int counter = 0; counter < totalNumAsked; counter++) { if(counter == 0) { i...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
countoddeven/countoddeven.cpp
<filename>countoddeven/countoddeven.cpp #include <iostream> using namespace std; int main () { int value1, value2, value3, value4; int countOdd, countEven; cout<<"Please enter four positive integers, seperated by a space:"<<endl; cin>>value1>>value2>>value3>>value4; countOdd = 0; countEven = ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
abs_value/abs_value.cpp
<gh_stars>0 #include <iostream> using namespace std; int main() { int userInput, absValue; cout<<"Please enter an number:"<<endl; cin>>userInput; if(userInput < 0) // userInput *= (-1); // absValue = userInput * (-1); absValue = abs (userInput); cout<<"|"<<userInput<<"| ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
counter/counter.cpp
#include <iostream> using namespace std; int main() { int quarters, dimes, nickels, pennies, cents, dollars; cout<<"Please enter the number of coins:"<<endl; cout<<"# of quarters"<<endl; cin>>quarters; cout<<"# of dimes"<<endl; cin>>dimes; cout<<"# of nickels"<<endl; cin>>nickels; ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
convert_to_upper_case/convert_to_upper_case.cpp
<reponame>BjornChrisnach/Introduction_to_Programming_in_C_plusplus<filename>convert_to_upper_case/convert_to_upper_case.cpp #include <iostream> using namespace std; int main() { char lowerCaseLetter, upperCaseLetter; int offset; cout<<"PLease enter a lowercase letter:"<<endl; cin>>lowerCaseLetter; ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
bmiimperial/bmiimperial.cpp
<gh_stars>0 #include <iostream> using namespace std; int main() { float bmi, bodyWeight, bodyHeight; cout<<"Please enter weight in pounds:"<<endl; cin>>bodyWeight; cout<<"Please enter height in inches:"<<endl; cin>>bodyHeight; bodyWeight = bodyWeight * 0.453592; bodyHeight = bodyHeight * ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
adding_numbers/adding_numbers.cpp
/* This program reads two integers from the user and prints their sum */ #include <iostream> using namespace std; int main() { int num1; // will hold the first input int num2; // will hold the second input int sum; // will hold the sum cout<<"Please enter two numbers seperated by a space:"<<en...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
evennumbers/evennumbers.cpp
<filename>evennumbers/evennumbers.cpp #include <iostream> using namespace std; int main() { int num, evenValue; cout<<"Please enter a positive number, to show you the even numbers:"<<endl; cin>>num; evenValue = 0; for(int counter = 1; counter <= num; counter++) { evenValue = counter * 2; ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
character_classification/character_classification.cpp
#include <iostream> using namespace std; int main() { char userCh; cout<<"Please enter a character:"<<endl; cin>>userCh; if(userCh >= 'a' && userCh <= 'z') { cout<<userCh<<" is a lower case letter"<<endl; } else if(userCh >= 'A' && userCh <='Z') { cout<<userCh<<" is an upper c...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
isleapyearc/isleapyearc.cpp
#include <iostream> #include <string> #include <sstream> using namespace std; int main(int argc, char* argv[]) { string strArgument1; int argument1; string output; stringstream convertSs; strArgument1 = argv[1]; convertSs << strArgument1; convertSs >> argument1; // output = convertS...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
coins/coins.cpp
<reponame>BjornChrisnach/Introduction_to_Programming_in_C_plusplus #include <iostream> using namespace std; int main() { int quarters, dimes, nickels, pennies, cents, dollars; cout<<"Please enter the amount of money to convert:"<<endl; cout<<"# of dollars:"<<endl; cin>>dollars; cout<<"# of cents:"...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
area_of_circle/area_of_circle.cpp
<filename>area_of_circle/area_of_circle.cpp #include <iostream> #include <cmath> using namespace std; int main() { double radius, area; cout<<"Please enter the radius:"<<endl; cin>>radius; area = M_PI * (radius * radius); cout<<"The area of a circle with radius of "<<radius<<" is "<<area<<endl...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
bmimetric/bmimetric.cpp
<filename>bmimetric/bmimetric.cpp #include <iostream> using namespace std; int main() { float bmi, bodyWeight, bodyHeight; cout<<"Please enter weight in kilogram:"<<endl; cin>>bodyWeight; cout<<"Please enter height in meters:"<<endl; cin>>bodyHeight; bmi = bodyWeight/(bodyHeight * bodyHeight)...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
count_digits_and_sum/count_digits_and_sum.cpp
#include <iostream> using namespace std; int main() { int num, sumDigits,countDigits, currDigit; cout<<"Please enter a positive number:"<<endl; cin>>num; sumDigits = 0; countDigits = 0; while(num > 0){ currDigit = num % 10; sumDigits += currDigit; countDigits ++; ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
average_ex2/average_ex2.cpp
<gh_stars>0 #include <iostream> using namespace std; int main() { bool seenEndOfInput; int gradeValue, studentCount, sumGrades; double average; cout<<"please enter the students grades (seperated by a space):"<<endl; cout<<"End the sequence by typing -1:"<<endl; seenEndOfInput = false; stu...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
gradeclass/gradeclass.cpp
#include <iostream> using namespace std; int main() { int grade1, grade2; cout<<"Please input two grades seperated by a space:"<<endl; cin>>grade1>>grade2; if(grade1 < 60 && grade2 < 60) { cout<<"Student Failed:("<<endl; } else if(grade1 >= 95 && grade2 >= 95) { cout<<"Student...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
average_ex1/average_ex1.cpp
<reponame>BjornChrisnach/Introduction_to_Programming_in_C_plusplus<gh_stars>0 #include <iostream> using namespace std; int main() { int studentCount, sumGrades, currGrade; double average; cout<<"Please enter the number of students in the class:"<<endl; cin>>studentCount; cout<<"please enter the s...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
if_arithmetic/if_arithmetic.cpp
#include <iostream> using namespace std; int main() { int val = 0; if(val = 0) { cout<<"val is 0"<<endl; } else { cout<<"val is not 0"<<endl; } return 0; }
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
weeks_days/weeks_days.cpp
<gh_stars>0 #include <iostream> using namespace std; const int DAYS_IN_A_WEEK = 7; int main() { int daysTraveled; int fullWeeks, remainingDays; cout<<"Please enter number of days you traveled:"<<endl; cin>>daysTraveled; fullWeeks = daysTraveled / DAYS_IN_A_WEEK; remainingDays = daysTraveled %...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
count_while/count_while.cpp
#include <iostream> using namespace std; int main() { int counter, n; cout<<"Please enter the number to count up to:"<<endl; cin>>n; counter = 1; while(counter <= n) { cout<<counter<<endl; // counter += 1; counter ++; } return 0; }
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
switch_eval_expression/switch_eval_expression.cpp
<gh_stars>0 #include <iostream> using namespace std; int main() { double arg1, arg2; double res; char op; cout<<"Please enter an expression of the form arg1 op arg2:"<<endl; cin>>arg1>>op>>arg2; switch(op){ case '+': res = arg1 + arg2; cout<<res<<endl; ...
BjornChrisnach/Introduction_to_Programming_in_C_plusplus
count_for/count_for.cpp
<filename>count_for/count_for.cpp #include <iostream> using namespace std; int main() { int n; cout<<"Please enter the number to count up to:"<<endl; cin>>n; for(int counter = 1; counter <= n; counter++) { cout<<counter<<endl; } return 0; }
sevskii111/test_2
src/examples/pixy_uorb/pixy_uorb_main.cpp
/**************************************************************************** * * Copyright 2019 NXP. * * 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 abo...
sevskii111/test_2
src/examples/nxpcup_work/nxpcup_work.cpp
<gh_stars>0 /**************************************************************************** * * Copyright (c) 2020 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * *...
sevskii111/test_2
src/examples/nxpcup/nxpcup_start.cpp
<gh_stars>0 /**************************************************************************** * * Copyright 2019 NXP. * * 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 re...
sevskii111/test_2
src/examples/nxpcup_old/nxpcup_race.cpp
/**************************************************************************** * * Copyright 2019 NXP. * * 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 abo...