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 |
|---|---|---|---|---|---|---|---|---|
fe9e264a96f620497bf4cd828c4be9473bf0ac28 | 9ba0ce2ceb3475c0268eb9ec2b665b31b47ea62d | southwestCat/rUNSWift-2019-release | /research/Deploy/C++/object-detection.cpp | C++ | cpp | 6,426 | permissive | #include <opencv2/dnn.hpp>
#include <opencv2/dnn/shape_utils.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
using namespace cv::dnn;
const char* classNames[] = {"background",
"ball"};
const char*... |
55ccd54b9400af50ec375cb04d4ec048d48eae35 | f2953d813355fa642539bbde8a0c5f2e40a3af7d | wudeven/cells-android10 | /system/connectivity/wificond/scanning/scanner_impl.cpp | C++ | cpp | 20,223 | permissive | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
08a4844dd749cfc4aea83c215a8842e36d2498f9 | f027b783badedae71ad5b7ff89acfabb7dcb59a4 | Jasonchan35/cloudjs | /src/app/apache2_mod_cloudjs/src/mod_cloudjs.cpp | C++ | cpp | 3,628 | permissive | #include "MyContext.h"
#include "cjsClass_Http.h"
static const char* cloudjs_config_filename = NULL;
class WatchDog : public axTimerThread {
typedef axTimerThread B;
public:
enum {
kInterval = 5, //seconds
kCleanSessionsInterval = 60, // seconds
};
WatchDog() {
axPRINT_FUNC_NAME
cleanSessi... |
adce315429961fa73b975ad1d63e9afdbcd3b824 | e0208f08d4582491f4d6488f23b7c1f7598ec3be | mwinters-stuff/u8g2-raspberrypi-pico-cpp-sdk-play | /drivers/encoder-pio/capture.cpp | C++ | cpp | 2,941 | permissive | #include <math.h>
#include <cfloat>
#include "capture.hpp"
namespace pimoroni {
////////////////////////////////////////////////////////////////////////////////////////////////////
// CONSTRUCTORS
////////////////////////////////////////////////////////////////////////////////////////////////////
Capture::Cap... |
faccf4e57a6fbf6c448b3ab7e6199953b24c0338 | abe9a83f2682dfd467a045d770c0bcfd91a336c0 | prasannabe2004/Cpp | /sololearn/Exceptions2/main.cpp | C++ | cpp | 442 | no_license | #include <iostream>
using namespace std;
int main()
{
try
{
int num1;
int num2;
cout << "Enter first number: " <<endl;
cin >> num1;
cout << "Enter first number: " <<endl;
cin >> num2;
if (num2 == 0)
throw 0;
cout << "Answer is: " <<... |
c7fc95d5ddd80754aaeed7314045234b6813da6b | c2ed3aafec6d4138854bc57701c7c3e3341ed6bf | jjzhang166/WinNT5_src_20201004 | /NT/net/tapi/skywalker/apps/avdialer/avdialer/avtree.cpp | C++ | cpp | 8,272 | no_license | /////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 1997 Active Voice Corporation. All Rights Reserved.
//
// Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
//
// Other brand and product names used herein are tr... |
00c19444225115e83b019c6895c914bbba31b582 | 06d9d5a83fb4452222d24d7824a5dd6b77bfcad6 | heonilp/study | /boj study/4948 베르트랑공준.cpp | C++ | cpp | 540 | no_license | #include <cstdio>
#include <algorithm>
using namespace std;
bool p[270000];
int s[270000];
int n;
int main() {
p[0] = p[1] = true;
for (int i = 2; i <= 270000; i++) {
if (p[i])continue;
for (int j = i + i; j <= 270000; j += i) {
p[j] = true;
}
}
for (int... |
5ab642d7c9272735a9a9237bd8dc2b836cc2f5a0 | 8f5af676c76b80bfdeb6fac1d27bc8fd7613961c | akhikolla/InformationHouse | /hutilscpp/inst/testfiles/is_sorted_int/is_sorted_int_DeepState_TestHarness.cpp | C++ | cpp | 870 | no_license | // AUTOMATICALLY GENERATED BY RCPPDEEPSTATE PLEASE DO NOT EDIT BY HAND, INSTEAD EDIT
// is_sorted_int_DeepState_TestHarness_generation.cpp and is_sorted_int_DeepState_TestHarness_checks.cpp
#include <fstream>
#include <RInside.h>
#include <iostream>
#include <RcppDeepState.h>
#include <qs.h>
#include <DeepState.hpp>
... |
fae49b4c00a3bf6150758c088df02375b2467a9c | d2927c3492376aca2cf58631278485a00b8816c6 | hihiroo/BOJ | /Sqrt_decomposition/16566.cpp | C++ | cpp | 767 | no_license | //카드 게임
#include <bits/stdc++.h>
#define lli long long
#define pb push_back
#define mp make_pair
#define snd second
#define fst first
#define cinFast() ios_base::sync_with_stdio(0);cin.tie(0);
using namespace std;
int card[4000005], rt[2005];
int f(int t){
for(int i=t/2000; i<=2000; i++){
if(rt[i] == 0) c... |
7680f981ace6b6222c27d504e3be1a3869b25bdf | 26cdf4028155d6a69c5f43f9f3897f12890c0c3d | loic44650/Echecs | /src/Tour.hpp | C++ | hpp | 2,031 | no_license | /**
* @file Piece.hpp
* @author MAHIER Loïc && COUILLEROT Carol
* @since 24 sept. 2016
* @brief Fichier header de la classe Tour héritant de la classe Piece
**/
#pragma once
#include "Piece.hpp"
class Tour : public Piece
{
public:
/**
* @brief constructeur
* @entrées un booléen pour l'état de la ... |
a3ef0b013c03913712bbca583bf7d467a8f09978 | cfd00e5f818c9badd22a9ba7a53d74b57584f35a | deanlee-practice/toheaven-2 | /교육/C++ Basic/Day_01/exam_22.cpp | C++ | cpp | 2,802 | no_license | /*
제어문
- 프로그램의 흐름이나 순서를 제어할 때 사용하는 문장
- 일반적으로 위헤서 아래로, 좌에서 우로 진행된다.
- 종류 : 조건문, 반복문, 기타제어문
1. 조건문
- 조건식에 의해 문장을 제어한다.
- 조건식은 그 결과가 참 또는 거짓으로 판정되는 식
- 조건식은 비교연산자나 논리연산자가 올 수 있다.
- 종류 : 단순 if문, if~else문, else if문, switch~case문
- 단순 if문 : 주어진 조건식이 참일 때만 문장을 제어할 때 사용
if(조건식){
// 조건식이 참... |
58fafd7e1ca0afec4469eba66a07e4858157f767 | 9f3592779556146ab1fb5f91c1240759aab85ff0 | aman-tiwari/ofxTSNE | /example-imagesGrid/src/ofApp.cpp | C++ | cpp | 8,182 | no_license | #include "ofApp.h"
const string allowed_ext[] = {"jpg", "png", "gif", "jpeg"};
void ofApp::scan_dir_imgs(ofDirectory dir){
ofDirectory new_dir;
int size = dir.listDir();
for (int i = 0; i < size; i++){
if (dir.getFile(i).isDirectory()){
new_dir = ofDirectory(dir.getFile(i).getAbsoluteP... |
646afa293df4167c4a2adf1e44c9ecd911fbf85b | 0a9446986663d5ef5786a50825a70caa27b679bf | mujige77/WebGame | /Tools/CocosTool/CocosTool.cpp | C++ | cpp | 6,868 | no_license | // 이 MFC 샘플 소스 코드는 MFC Microsoft Office Fluent 사용자 인터페이스("Fluent UI")를
// 사용하는 방법을 보여 주며, MFC C++ 라이브러리 소프트웨어에 포함된
// Microsoft Foundation Classes Reference 및 관련 전자 문서에 대해
// 추가적으로 제공되는 내용입니다.
// Fluent UI를 복사, 사용 또는 배포하는 데 대한 사용 약관은 별도로 제공됩니다.
// Fluent UI 라이선싱 프로그램에 대한 자세한 내용은
// http://msdn.microsoft.com/off... |
9852ca7556431f9d823effc18386c00930747b20 | d4d217c04c2da7b0750801cabbb61b6952f46b38 | creolophuss/mygit | /network.cc | C++ | cc | 9,567 | no_license | #include<cstdio>
#include<iostream>
#include<boost/regex.hpp>
#include"network.h"
void rm_ch(char *str, char c)
{
char *p,*q;
p = q = str;
while(*q != '\0')
{
if( *p != c )
p++;
q++;
while( *q == c )
q++;
*p = *q;
}
}
static int
make_socket_non_blocking(int sfd)
{
int flags ,... |
99a3c855dcb4a2870fe78e7b567c744df4803905 | a6bc06d445f232be081cd1f88f8e4281ad8485cd | yangjiang123/possumwood | /src/plugins/opencv/nodes/sequence/abs.cpp | C++ | cpp | 1,007 | permissive | #include <possumwood_sdk/node_implementation.h>
#include <opencv2/opencv.hpp>
#include <tbb/parallel_for.h>
#include <actions/traits.h>
#include "sequence.h"
namespace {
dependency_graph::InAttr<possumwood::opencv::Sequence> a_inSequence;
dependency_graph::OutAttr<possumwood::opencv::Sequence> a_outSequence;
depen... |
3d9eb194d0ee9270468798b694cf61fe979e39fc | db4dadcd9e9f709935c1268d9a2e2143a7047d08 | kongwonkeun/CarRacing | /include/Objects/Line.hpp | C++ | hpp | 517 | no_license | #ifndef LINE_HPP
#define LINE_HPP
#include "SFML/Graphics.hpp"
namespace cp
{
class Line
{
public:
Line() {}
~Line() {}
sf::Sprite sprite;
float x = 0, y = 0, z = 0; // 3d center of line
float X = 0, Y = 0, W = 0; // screen coord and width of line on screen
... |
953611ba8cd28cc3441a3593fc264a59b3b214dc | a9e12647bc52ad9e85b8011587f1738b2df8e0cc | bluebird581/- | /perception_old/include/perception_ipm.hpp | C++ | hpp | 5,789 | no_license | #ifndef PERCEPTION_IPM_H
#define PERCEPTION_IPM_H
#include "ground_detection.hpp"
//#include "ground_tracker.hpp"
//#include "get_hadmap_data.hpp"
//#include "ground_slam.hpp"
#include "scene_parse.hpp"
#include "hadmap_process.hpp"
#include "config.h"
class PerceptionIPM {
public:
int do_init(cons... |
2c2ceeea8127a62a779de4b846a5fc71dff284b4 | db3aa5a89aa83e9b89710b9dae856c9b468de78d | Marianitomotion/cgru | /afanasy/src/watch/listnodes.cpp | C++ | cpp | 11,214 | no_license | #include "listnodes.h"
#include "itemnode.h"
#include "ctrlsortfilter.h"
#include "modelnodes.h"
#include "monitorhost.h"
#include "viewitems.h"
#include "watch.h"
#include "wndcustomdata.h"
#include <QtCore/QEvent>
#include <QtCore/QTimer>
#include <QtGui/QBoxLayout>
#include <QtGui/QInputDialog>
#define AFOUTPUT
#... |
490cf778e26045e8622719bcb97a5c8d10098b7d | 78ec07fbbab829c108d67a891b4d0b4f6d31e401 | Olaxan/ltu-lab-d0036d_pixelgame | /pixelgame/client/pixelgame.cpp | C++ | cpp | 2,207 | no_license | // pixelgame.cpp : This file contains the 'main' function. Program execution begins and ends there.
#include <iostream>
#include <string>
#define ASIO_STANDALONE
#include "asio/asio.hpp"
#include "client_mgr.h"
#include "userinput/uinput.h"
asio::io_service io_service;
asio::ip::tcp::resolver resolver(io_service);
... |
c03a911f31857b9346b274dbefee5f0ac068b546 | 617d41b482c65839ea0885fb688fb901b2a8e6a2 | PhotonSilencia/potential-palm-tree | /src/Scene.cpp | C++ | cpp | 24,534 | no_license | #include <cmath>
#include <QMessageBox>
#include <fstream>
#include "CGFunctions.h"
#include "EditWidgets.h"
#include "Light.h"
#include "Model.h"
#include "Scene.h"
#include "Skybox.h"
inline void OpenGLError() {
GLenum errCode;
if ((errCode = glGetError()) != GL_NO_ERROR) {
qDebug() << "OpenGL Error: \n" ... |
3e1a6c1d7bf2b768e4969ec914186f7cfc903906 | 871e54953ee04194284eed30237c816275426e24 | rtohid/blaze | /blazetest/src/mathtest/dvecdvecmult/V4aV4a.cpp | C++ | cpp | 3,536 | permissive | //=================================================================================================
/*!
// \file src/mathtest/dvecdvecmult/V4aV4a.cpp
// \brief Source file for the V4aV4a dense vector/dense vector multiplication math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// This... |
bdf126742e40b825c870b1ef6b0297ba8c37afce | d06e12f21650a7b28acca86dee29cbd583de92a6 | xiaoqgao/windows_embedded_7_2014M12 | /windows_embedded_7_2014M12/WINCE700/private/winceos/UTILS/cmd2/cmdexec.cxx | C++ | cxx | 107,854 | no_license | //
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft shared
// source or premium shared source license agreement under which you licensed
// this source code. If you did not accept the terms of the license agreement,
// you are... |
93c91645733709a42f0fa4f643225edfb0b157c3 | 1ce43c2e13e7edb8c4fd2060e0240d8510f99ab7 | Bodmer/ApixuWeather | /ApixuWeather.cpp | C++ | cpp | 13,585 | permissive | // Client library for the Apixu weather datapoint server
// https://api.apixu.com
// Created by Bodmer 10/11/2018
// See license.txt in root folder of library
#ifdef ESP8266
#include <ESP8266WiFi.h>
#else
#include <WiFi.h>
#endif
// The streaming parser to use is not the Arduino IDE library manager default,
// ... |
ce4e461be55885af51527f018ce4a5ecff296a40 | b14b394674866129f1d04044d9cba79745fb0ef3 | zhengsai168/UnixAPI | /3-process/manyWho.cpp | C++ | cpp | 446 | no_license | #include <iostream>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/wait.h>
#include <iostream>
using namespace std;
int main(void){
pid_t pid;
pid = fork();
if(pid<0){
perror("fork");
exit(1);
}
else if(pid==0){
cout<<"son"<<endl;
ex... |
ef9304745615101b30093e44a5a8540bc7335685 | 05b9ef6a6bdc4c7793744271cf8562bfd8f4ec51 | popebx/yal | /example/yal_singleton.cpp | C++ | cpp | 1,490 | permissive | #include <yal/manager.hpp>
#include "sink/console_sink.h"
#include "sink/pair_sink.h"
class singleton {
public:
singleton(const singleton&) = delete;
singleton(singleton&&) = delete;
singleton& operator=(const singleton&) = delete;
singleton& operator=(singleton&&) = delete;
static singleton& instance() {
... |
82fb993e4ff2812f93f5158733dcab32c6213085 | 90f1a9ac3768288b90cf168eea75d7958d2e0300 | rethesda/PassiveWeaponEnchantmentRecharging | /PapyrusWeaponRecharge.cpp | C++ | cpp | 1,646 | permissive | #include "PapyrusWeaponRecharge.h"
#include "WeaponRecharge.h"
using namespace RE;
float PapyrusWeaponRecharge::RechargeAllWeaponsInInventory(StaticFunctionTag*, Actor* actor, float points, float enchantingMultiplier) {
LOG_TRACE("calling RechargeAllWeaponsInInventory({:X}, {:f}, {:f})", actor ? actor->formID : 0, p... |
d94e51468412cc49460ce4bfd339b5b920d4a4e5 | 25518e2ca7d1c9d2587fcc3ca0e62a6f46dc43c3 | ColemanMerchant/nRF52-Arduino | /Arduino/hardware/RBL/RBL_nRF52832/cores/RBL_nRF52832/wiring_uart.cpp | C++ | cpp | 1,866 | permissive |
#include "wiring_uart.h"
#include "ring_buffer.h"
#include "uart.h"
/****************************************************
* Local Variables
****************************************************/
static Ring_Buffer uart_rx_buf;
static rx_callback_t uart_rx_handler = NULL;
/****************************... |
397c2084d92e30c029434372dea9144d9d495093 | 39f6e6ac6eafa5092c64382c80927d7b31693d04 | jeffamstutz/boost.simd | /include/boost/simd/arch/common/scalar/function/asinh.hpp | C++ | hpp | 3,454 | permissive | //==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//===========================... |
31d396912e9c2f0d4a4bd2679ff0362d473685c4 | 13a7f03b96893a7bb5d67367ead9920fdd3857fb | AnselGitAccount/Blockchain | /src/main.cpp | C++ | cpp | 1,416 | no_license | /*
* Author: Ansel Blumers
* Last edit: June, 2020
*
* https://ansel.braket.net
*/
#include "Block.h"
int main(int argc, char **argv)
{
using size_t = std::size_t;
// Generate a Genesis Block
// Information is hard-coded.
auto currenttime = bclock::now();
std::string Genesis_data = "Genesi... |
212a939a87371c6723a62e0ddfa9aabd7e68f39a | ffefed2b1a68989bb81d70c8f2fccd2458193245 | installgentoo/assorted_curiosities | /graph/base_classes/shader.cpp | C++ | cpp | 7,318 | no_license | #include "shader.h"
#include "policies/resource_policy.h"
using namespace gl;
static const char *s_shader_strings[] = {"vertex", "fragment", "geometry"};
static string PrintShaderLog(uint obj) {
int infologLength = 0, maxLength;
if (glIsShader(obj)) {
GLCHECK(glGetShaderiv(obj, GL_INFO_LOG_LENGTH, &maxLengt... |
c0e6771ccd17e1e89ca1e793d078dcbe1c52eb34 | c8d0f21f1f116c622303ea8c532fb063aa777dfd | richelbilderbeek/Apfloat | /wftatest.cpp | C++ | cpp | 2,903 | no_license | #include <iostream>
#include <iomanip>
#include <sstream>
#include <ctime>
#include "ap.h"
using namespace std;
// Program for testing the WFTA functions
int main (int argc, char *argv[])
{
int t, r, n, n1, n2 = 1, i = 1, m = 0, p = 0;
time_t b;
modint pr;
if (argc < 2)
{
... |
b44f9756b3a1ac35f94f44f53ba024d38082ced5 | 17ff8595350bc67f24ab00c2d6122b80e4ded0b0 | dereksalerno/Homework | /C++/testie/test.cpp | C++ | cpp | 348 | no_license | #include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
int main()
{
ifstream inData;
inData.open("myData.dat");
int sum = 0;
int count, number;
while(inData){
count = 1;
while(count <= 5 && inData){
inData >> number;
sum = sum + number;
count++;
if (count == 5){
cout << (sum / count)... |
f1143a67fdd2ffb7af140c930c873519d586272b | 1d308a73fa7e8d5e68822eb84dafdb201bd069f7 | yw-dev/ASSGame | /Source/ShooterGame/Private/Online/ShooterGameMode.cpp | C++ | cpp | 21,805 | no_license | // Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
#include "ShooterGame.h"
#include "ShooterGameInstance.h"
#include "UI/ShooterHUD.h"
#include "Player/ShooterSpectatorPawn.h"
#include "Player/ShooterDemoSpectator.h"
#include "Online/ShooterGameMode.h"
#include "Online/ShooterPlayerState.h"
#include "Online... |
931698af25039d7bc5d2f1f5fe421b2ae34c777e | a1bcffe0b82c13eb60930c4a3579d24fd1cfe3f3 | PengCheng25263/Image-processing-for-industrial-part-recognition | /MFCApplication3Dlg.cpp | C++ | cpp | 16,289 | no_license |
// MFCApplication3Dlg.cpp : implementation file
//
#include "stdafx.h"
#include "MFCApplication3.h"
#include "MFCApplication3Dlg.h"
#include "afxdialogex.h"
#include "cvvimage.h"
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
#include"Resource.h"
#include"math.h"
#include"s... |
7a896a5482df8199311a8c56a8e9ed97de82acda | d7ef82da1d38db03a1eb5e4409d7e781ae831f2a | dementrock/acm | /poj/Archives/3580/7319024_WA.cc | C++ | cc | 5,019 | no_license | #include<stdio.h>
#define MAXN 400001
inline int min(int a, int b){
return a<b?a:b;
}
class Node{
public:
int minv, v;
int size,lc,rc,fa,rev,d;
void swap(){
int t=lc;lc=rc;rc=t;
rev^=1;
}
void add(int t){
minv+=t,v+=t,d+=t;
}
} node[MAXN];
int cnt=0;
class splaytree{
private:
... |
6fce50e4c579ddf1539dce7192c0c467e17a8782 | 5a16686d886866db8516e78a9bbcf87045ace4d6 | Nabeegh-Ahmed/TicTacToe-Cpp | /Ultimate TicTacToe.cpp | C++ | cpp | 9,843 | no_license | #include<iostream>
#include<SFML/Graphics.hpp>
#include<SFML/Audio.hpp>
#include <stdlib.h>
#include"TicTacToe.h"
using namespace std;
void setTextAttrib(sf::Text& win) {
win.setCharacterSize(30);
win.setStyle(sf::Text::Bold);
win.setFillColor(sf::Color::Black);
win.setPosition(sf::Vector2f(... |
0a19cc9db577c35ea452264f6be0dc3167f3ecd4 | 4ac88b2631cc91c04e809689aee7b2a69f5419ec | OneTillEnd/problem-solving-II-programming | /2-05_D_And-Then-There-Was-One_linkedlist.cpp | C++ | cpp | 2,169 | no_license | //
// Created by xavier on 18-4-11.
//
#include <cstdio>
#include <cstdlib>
typedef struct _node{
int *data;
struct _node *next;
}Node;
typedef struct _linkedlist{
Node *head;
Node *tail;
}LinkedList;
Node *tmp = (Node*) malloc(sizeof(Node));
void initialize_list(LinkedList *list){
list->head =... |
f2f25b3cc98236cff1e84d04f32071c89ce4f1ee | 1ef63d5589f8e7381585f18fc7f9bc40cff212dd | Jiafeimaochuanqi/Sparse-Voxel-DAGs | /Vec2.cpp | C++ | cpp | 1,104 | no_license | /**
* Vec2.cpp
*
* by Brent Williams
*/
#include "Vec2.hpp"
Vec2::Vec2()
: x(0),
y(0)
{}
Vec2::Vec2(const float val)
: x(val),
y(val)
{}
Vec2::Vec2(const float xVal, const float yVal)
: x(xVal),
y(yVal)
{}
void Vec2::print() const
{
printf("<%f, %f>\n", x, y);
}
Vec2& Vec2::operator=(const ... |
2986bd357a0c333107e5feb6d73714c91117a3dc | 9c7d5306cd72e056203455af770f6e326e21cf01 | mmarkie2/PRiR | /lab02.cpp | C++ | cpp | 2,791 | no_license |
#include <thread>
#include <chrono>
#include <iostream>
#include <cmath>
using namespace std;
#define M_PI 3.14
void kodWatku() {
for (int i = 0; i < 10; ++i) {
cout << "watek: " << this_thread::get_id() << " mówi cześć, i=" << i << endl;
this_thread::sleep_for(chrono::milliseconds(100));
}
}... |
6d095a6f6e61d352a6fc949a54fe176597187b46 | 0fb7205aae9e17f04e810668291030a792002312 | LiberatorUSA/GUCEF | /platform/gucefVFS/src/gucefVFS_CVfsGlobal.cpp | C++ | cpp | 7,094 | permissive | /*
* gucefVFS: GUCEF module implementing a Virtual File System
* Copyright (C) 2002 - 2007. Dinand Vanvelzen
*
* This library 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; either
*... |
72f03ae505a379fdb5756faddfa3c132b5e606f6 | 0c1a972aa632c60724d09ed92f2d43f55f007571 | Brian022/Interdisciplinar-2-Juego | /Brian/Juego/Collider.cpp | C++ | cpp | 1,874 | no_license | #include "Collider.h"
Collider::Collider(RectangleShape& body):
body(body)
{
}
Collider::~Collider()
{
//dtor
}
bool Collider::CheckCollision(Collider other, Vector2f &direction, float push)
{
Vector2f otherPosition = other.GetPosition();
Vector2f otherHalfSize = other.GetHalfSize();... |
14791c437d1ad7b5429043f68448532ea6eedfb3 | ec4465b2a6b90f3566855d5e901468f41edbf502 | architasurai22/algo | /twosum.cpp | C++ | cpp | 2,033 | no_license | #include <bits/stdc++.h>
#define SIZE 12345
using namespace std;
struct bucket
{
long n;
bucket *next;
};
int main(int argc, char *argv[])
{
char *a=new char[10];
bucket **hash=new bucket*[SIZE];
FILE *f=fopen("HashInt.txt","r");
for(long i=0; i<SIZE; hash[i++]=NULL);
for(long i=1; ... |
e4cd8cb44ae17208395a0c21d13d4f3aa927c293 | 519ffba35be2001128d0fe44fb6d752330581713 | Paolo5150/ICT398Project | /V3/src/Components/Renderer.cpp | C++ | cpp | 4,142 | no_license | #include "pch.h"
#include "Renderer.h"
#include "..\Core\Timer.h"
#include "..\Events\EventDispatcher.h"
#include "..\Core\Camera.h"
#include "..\Events\ApplicationEvents.h"
#include "..\Rendering\RenderingEngine.h"
#include "..\Rendering\Material.h"
#include "..\Utils\ContentManager.h"
#include "..\Lighting\Lighting... |
a353fb1240d7500ee70f8b56d86b71acaa78ae04 | 4b8675069c1c24781ee6b5ed23a1f7e167d1a722 | ashesmin/BLECollectorUsingLoRa_Conis | /준영자료/Gateway/configFunction.cpp | C++ | cpp | 5,320 | no_license | #include "configFunction.h"
#include "arduPiLoRa.h"
#include "json/json.h"
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <string.h>
#include <iostream>
int readLoRaConfig(char* filename, loraConfiguration*** loraConfig, int* expNum) {
FILE *fp = fopen(filename, "r");
char buf[100000];
J... |
c4d1705ac834b2409a706a614fc9db68803de6ef | 50db4ba95e4f2700d8370d3f4393267fcbef75dd | Kevin-Rothi/tink | /cc/core/keyset_handle_test.cc | C++ | cc | 21,545 | permissive | // Copyright 2017 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... |
b966c59b9fecfeedd9ff56d9f2e7726e10897699 | a4434a1178f73f65a912b320513dcea7368c75f9 | fossabot/Math-1 | /tests/vector.cpp | C++ | cpp | 4,888 | permissive | // Copyright 2021 SMS
// License(Apache-2.0)
#include "gtest/gtest.h"
#include "Math.hpp"
#include "Vector.hpp"
#include "Vector2.hpp"
#include "Vector3.hpp"
#include "Vector4.hpp"
TEST(Vector2, subscript)
{
EXPECT_FLOAT_EQ(Vector2(1, 2)[0], 1.f);
EXPECT_FLOAT_EQ(Vector2(1, 2)[1], 2.f);
}
TEST(Vector2, size... |
43892f9e571056682be01e4fbe8819a10e0b1e5f | d3381931782dab64140e8aead1876ed3fa328967 | florianhumblot/v2cpse2 | /week2/scherm_object.hpp | C++ | hpp | 307 | no_license | #ifndef V2CPSE2_SCHERM_OBJECT_HPP
#define V2CPSE2_SCHERM_OBJECT_HPP
#include <SFML/Graphics.hpp>
class scherm_object{
public:
virtual void draw(sf::RenderWindow & w) = 0;
virtual void move(const sf::Vector2f & delta) = 0;
virtual sf::RectangleShape getShape() =0;
};
#endif //V2CPSE2_SCHERM_OBJECT_HPP
|
f1a8c0131b9d0b056fc1c26b0a385e71ce3caa88 | f514370bd2ac3616ada054ff107a626e6e62a31b | sadrulhc/chromium | /base/threading/thread_checker_unittest.cc | C++ | cc | 11,619 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/threading/thread_checker.h"
#include <memory>
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/macros.h"
#inc... |
740031a91c115d051e4fbd69f08bb6e4f68f8697 | 0b21279e502493b49dcfab12b08222a04b990e5c | sunfenghao2017/svscan | /src/svscanner.cpp | C++ | cpp | 11,720 | permissive | #include "svutil.h"
#include "svscanner.h"
#include "ThreadPool.h"
void SVScanner::scanDPandSROne(int32_t tid, JunctionMap* jctMap, DPBamRecordSet* dprSet){
if(mScanRegs[tid].empty()) return; // Skip invalid contig
// Open file handles
samFile* fp = sam_open(mOpt->bamfile.c_str(), "r");
hts_idx_t* idx ... |
96bd0121f08acfae3d84d855ad92476322de4cb7 | d374084429e8c2b40aa1889fa8a2deab7307ae11 | lungben/julia | /src/aotcompile.cpp | C++ | cpp | 39,456 | permissive | // This file is a part of Julia. License is MIT: https://julialang.org/license
#include "llvm-version.h"
#include "platform.h"
// target support
#include <llvm/ADT/Triple.h>
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Target/TargetMachine.h>
#include <llvm/IR/DataLayout.h>
#include <llvm/Analysis/TargetTr... |
0eeaf325bb2c92e132a12446afd094adeaee0298 | 751ab8e7df191a02f789637ac0b18ead5fa38fb3 | karlinglee93/icpp | /cpp_primer_plus/chapter_03/p_3_7.cpp | C++ | cpp | 400 | no_license | #include <iostream>
using namespace std;
int main()
{
const double _100km2mile = 62.14;
const double gallon2l = 3.875;
double l_per_100km;
double mile_per_gallon;
cout << "input l_per_100km: ";
cin >> l_per_100km;
mile_per_gallon = _100km2mile / (l_per_100km / gallon2l);
... |
a4716b4077b80fd54c639b574b4a677736524127 | d950d519d790c155eae9041ac233334d48592111 | sunyinkai/ACM_ICPC | /2018/Futher3_3_String2/a.cpp | C++ | cpp | 848 | no_license | #include<cstdio>
#include<cstring>
#include<cstdlib>
#include<vector>
#include<algorithm>
using namespace std;
const int MAXN=5e5+7;
int sum[MAXN],val[26];
char Ma[MAXN*2];int Mp[MAXN*2];
//abaaba
//Mp[i]-1:回文串长度
//$ # a # b # a # a # b # a #
//1 1 2 1 4 1 2 7 2 1 4 1 2 1
void Manacher(char s[],int len){
int l=0;
Ma... |
db5603313e576f1c88669bdbaa961f105996ee0f | db2d790b332f67a08fca1d5393290ab2c8fa4da0 | mantoshkumar1/repast_hpc | /src/zombies/ZombieObserver.cpp | C++ | cpp | 11,771 | no_license | /*
**
**Adopted from https://github.com/scamicha/SCC15HPCRepast**
**
* Repast for High Performance Computing (Repast HPC)
*
* Copyright (c) 2010 Argonne National Laboratory
* All rights reserved.
*
* Redistribution and use in source and binary forms, with
* or without modification, are permitted provid... |
1b59a5d67f5f21b5447e099f833a64a6fdecaad9 | bb770489ffe14f9f6abdfd9a2b37f11a8f29cfbd | tensorflow/tensorflow | /tensorflow/lite/kernels/split_test.cc | C++ | cc | 10,230 | 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... |
ef716c85e1fd17d0ab4e7b5da57bb349e17b1bdb | d7f36a94d96c211125aa082f3176f3eebb518ed8 | bijay135/CPP | /bank_account.cpp | C++ | cpp | 1,335 | no_license | /* Define a class to represent the bank account include the following members:
1. Name of the depositor
2. Account No
3. Type of account
4. Balance amount in the account
Member Functions:
1. To assign initial values
2. To deposit an amount
3. TO withdraw an amount after checking the balance
4. To display the n... |
b3ee397edd30bdb830106633a19461910aa11e7f | 4d67d80e63d3b01cbbc85ad078769b5daf0ae653 | mahesh001/Myds-program | /DS/avl.cpp | C++ | cpp | 2,994 | no_license | /* TODO (#1#): check why preorder is diff while inorder is correct */
#include<iostream>
#include<cmath>
using namespace std;
struct bstnode
{
bstnode* lchild;
int data;
bstnode* rchild;
};
int height(bstnode *t)
{
if(t==NULL)
{
return -1;
}
else
... |
6fa2c6e2d5897994fd334ad952c000103a819133 | 27bbf4c93f8ff0b2287aff97744751ca681363ce | FatihBAKIR/E2EHDR | /samples/OpenGL/Mustafa/Mustafa/gui.cpp | C++ | cpp | 2,414 | no_license | //OTHER
#include <imgui.h>
//FRAMEWORK
#include "gui.h"
//CPP
#include <cmath>
#include <stdio.h>
#include <vector>
#define ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR)))
namespace gui
{
//Argument might be given as a structure such as CameraControl in the future.
void displayCameraControl(float& exposure1,... |
f85d49f37a6a4f9da158bac135cb0645d381ab3e | 2f3a076f8030849787de341321cfbc0cda2d9f8a | Xuchaoxiong/homework-of-data-structure | /作业/图源识别/bmpmatrix.cpp | C++ | cpp | 7,643 | permissive | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#pragma pack(1)
typedef unsigned short WORD; //WORD代替unsigned short
typedef unsigned long DWORD;
typedef long LONG;
typedef unsigned char BYTE;
#define TRUE 1;
#define FALSE 0;
typedef struct tagBITMAPFILEHEADER { // bmfh
WORD bfType; // 位图文件的类型,必须为BM
DWO... |
1c91e6698c084517dd8c5231513eccdabc1ef5e8 | 71a5cdcad81ed395ab18c02c1759ce0a0ee05e10 | sigu1011/atcoder | /abc059_a.cpp | C++ | cpp | 296 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
string s1;
cin >> s1;
string s2;
cin >> s2;
string s3;
cin >> s3;
string ans;
ans += s1.at(0);
ans += s2.at(0);
ans += s3.at(0);
transform(ans.begin(), ans.end(), ans.begin(), ::toupper);
cout << ans << endl;
}
|
05e6909373cc8a6c43a3cbec64824df12b1b8e1c | 678abfc84e7eaadc5105156d1bfb808835a9deb8 | mevoroth/eternal-engine-utils | /src/Log/FileLog/FileLog.cpp | C++ | cpp | 1,657 | no_license | #include "Log/FileLog/FileLog.hpp"
#include <string>
#include "File/FileFactory.hpp"
#include "File/File.hpp"
namespace Eternal
{
namespace LogSystem
{
using namespace FileSystem;
FileLog::FileLog(_In_ const char* InFileName)
: Log()
{
string Prefix(InFileName ? InFileName : "Eternal");
string Suffi... |
d3bbbc63da59096b2ac7bcd57c42c812d9cc0bb6 | dca4d779992b9b4484728acbfde7b756617c5cab | daniel-goldstein/Level-Set | /algorithms/lss-nopde/omp-original/lib/imghandler.cpp | C++ | cpp | 1,544 | no_license | /* Julian Gutierrez
* Northeastern University
* High Performance Computing
*
* Image Handler Function Implementation
*
*/
#include "imghandler.h"
image<unsigned char>* loadPGM(const char* name) {
char buf[BUF_SIZE];
// Read header
ifstream file(name, ios::in | ios::binary);
readPNM(file... |
e051b2e58151b14e1b789b4f17480ed4ac3bb74d | 1f4c6ed650b97a5da4310888a494aa0c9518b203 | sever7788/course_works | /client/src/client.cpp | C++ | cpp | 2,333 | no_license | #include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <cstdio>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <arpa/inet.h>
#include <pthread.h>
#i... |
1fd965864b54cca8f00442c9fed3d97511b941e4 | 5d4171ce74d5e2dc0618f8e7a2846b1fb143b78a | imyxz/SimpleFileSystem | /cmd_su.cpp | C++ | cpp | 408 | no_license | #include"inode_helper.h"
#include"path_helper.h"
#include "arg_parser.h"
#include "user_context.h"
class CmdSu :public IRunnable {
public:
int run(int argc, string* argv) override {
if (argc >= 1) {
string username = argv[0];
ID_T target = UserContext::LoginAs(username);
if (target == 0) {
cerr << "No s... |
d6a1f602d79de3be2f63d59793699d99707d5308 | 6ff85613343779f76729bd4ddab9a778565ef24e | wlsvy/TIL | /Coding_Problem_Solving/Immigration.cpp | C++ | cpp | 842 | no_license | #include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <numeric>
#include <climits>
using namespace std;
using LL = long long;
LL answer = 0;
LL totalPerson;
LL GetSumAndUpdateAns(LL time, vector<int>& vi) {
LL sum = accumulate(vi.begin(), vi.end(), (LL)0, [time](LL l, LL r) {return l ... |
5f631f7e8f52923b548787b68a12d68316102c4e | 92a95eb3b63ff1e898ceaddcf249207b40ed97da | sfdevgirl/ch9_git | /ch9_git/utilities.cpp | C++ | cpp | 14,874 | no_license | //
// utilities.cpp
// CPPUtilities
//
// Created by Bill Komanetsky on 1/29/15.
// Copyright (c) 2015 Bill Komanetsky. All rights reserved.
//
#include "utilities.hpp"
#include <vector>
#include <iostream>
#include <iomanip>
#include <fstream>
//
//This routine will take a string and convert it to upper case
//... |
cfa57c390ec89750cc6461925b7e44230128156e | d7b1553bbb07b9db098779aa7085e76b2bcd87f4 | b21quocbao/Competitive-Programming | /PROBM.cpp | C++ | cpp | 2,093 | no_license | #include <bits/stdc++.h>
#define fn "test"
#define fn1 ""
using namespace std;
const int mn = 1 * (int)(1e5) + 10;
const int mod = 1 * (int)(1e9) + 7;
const int mm = 1 * (int)(1e3) + 10;
const int base = 1 * (int)(1e9);
const bool aNs = 0;
int tt, ntest = 1;
void docfile()
{
ios::sync_with_stdio(false);
ci... |
2e409830e6466f87f145dd8ae6a432cecf3152e1 | 723a44cf19a4b74243151e8f7c584d5debe95326 | gmagoon/octopus | /src/basics/read_pileup.hpp | C++ | hpp | 1,787 | permissive | // Copyright (c) 2016 Daniel Cooke
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.
#ifndef read_pileup_hpp
#define read_pileup_hpp
#include <vector>
#include <map>
#include <utility>
#include "config/common.hpp"
#include "concepts/mappable.hpp"
#include "contig_region... |
83b1e103831e323e611d5f9599bfd07ec05c40b4 | f424571329391ac068b45ba5187dad039d4853be | xierensong/cppPGround | /tree/3order_n_e.cpp | C++ | cpp | 2,709 | permissive | #include<bits/stdc++.h>
using namespace std;
struct Node {
char val;
Node* left, *right;
Node(char my_val) : val(my_val), left(nullptr), right(nullptr) {};
};
void PreOrder(Node* root) //入栈前打印
{
stack<Node*> my_stack;
//cout << "0" << endl;
if(root) cout << root -> val << ' ';
my_stack.p... |
f3413ff8b7bca3c1351a29feee1e6d6b51832bd9 | 4fadbaca04627ebed3c6bbc4174c7b0f776424cd | Edzelf/ESP32-pdp8-simulator | /src/OLED.hpp | C++ | hpp | 2,084 | no_license | //***************************************************************************************************
// O L E D . H P P *
//***************************************************************************************************
// Driver f... |
a5b09ad75bcda06d93594bdede3b9e6c508bc41f | b62da2a320ce2bd0813eea561a5fcc37c297be76 | bigdoods/OpenInfraPlatform | /IfcBridge/src/OpenInfraPlatform/IfcBridge/entity/IfcShadingDeviceType.cpp | C++ | cpp | 4,949 | no_license | /*! \verbatim
* \copyright Copyright (c) 2014 Julian Amann. All rights reserved.
* \date 2014-02-15 23:00
* \author Julian Amann <julian.amann@tum.de> (https://www.cms.bgu.tum.de/en/team/amann)
* \brief This file is part of the BlueFramework.
* \endverbatim
*/
#include <sstream>
#include <limits>
#include "mo... |
6f762100200f384ed8f5a5169f37a0eb75ac412e | f85bb6bab88f9d0ade1981e6c86146bc224fec78 | JitoKoba/Flower0308 | /FlowerBattle/Temp/il2cppOutput/il2cppOutput/Il2CppCodeRegistration.cpp | C++ | cpp | 1,358 | no_license | #include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include "class-internals.h"
#include "codegen/il2cpp-codegen.h"
extern const Il2CppMethodPoint... |
eca4e6a7098959898d843745281915d6c09fb8d0 | 244b2132056649621e89c4b866727918f5ea4472 | sanjana12345/Leetcode-Solution | /Dynamic Programming/Combination Sum IV.cpp | C++ | cpp | 446 | no_license | class Solution {
public:
int combinationSum4(vector<int>& nums, int target) {
int n=nums.size();
unsigned int dp[target+1];
for(int i=0;i<=target;i++) {
dp[i]=0;}
dp[0]=1;
for(int i=0;i<=target;i++){
for(int j=0;j<n;j++){
if(i>=nums[... |
f42dc76e7386b4e4b00e5cf061f99e27f541b695 | 61aaa2a5e2b7cde4d71d96b89b5dece0c3d85cda | jschueths/Project_Euler | /src/problem21/problem21.cpp | C++ | cpp | 913 | no_license | // Author: jschueths
// Description: Problem 21 of the Euler Project (projecteuler.net/problems)
#include <iostream>
#include <vector>
#include <numeric>
std::vector<size_t> properDivisors(size_t x);
size_t sumProperDivisors(size_t x);
int main() {
size_t result = 0;
for(size_t i = 1; i < 10000; i++) {
std... |
87fa36b1882fafe048635b2013b30dd022642f5e | 03d9896cc72c5eb4f571d5aff377565315dfc642 | datadiode/WinCEWebKit | /wincewebkit/ANGLE/src/libGLESv2/Texture.cpp | C++ | cpp | 54,016 | no_license | //
// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Texture.cpp: Implements the gl::Texture class and its derived classes
// Texture2D and TextureCubeMap. Implements GL texture... |
ce46367189c567507c47103dc8147b676c88ef0f | f0f4491c79c2cced9d529a49168004d285dd74fc | portsip/resiprocate | /p2p/s2c/s2c/s2c_native.hxx | C++ | hxx | 1,937 | permissive | /**
s2c_native.hxx
Copyright (C) 2008, RTFM, Inc.
All Rights Reserved.
ekr@rtfm.com Fri May 2 16:58:21 2008
*/
#ifndef _s2c_native_h
#define _s2c_native_h
#include <iostream>
#include <vector>
#include <string>
/* Typedefs for integral types */
typedef unsigned char u_char;
typedef unsigned char u_i... |
a7ba766d63e496c49d2cb58043a6901574c4a9c9 | 63b05a94eaaaec861573432c9141cfd0a6bdc5ff | xjyu007/BaseLib | /BaseLibTest/strings/string_split_unittest.cpp | C++ | cpp | 15,563 | no_license | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "pch.h"
#include "strings/string_split.h"
#include <stddef.h>
#include "macros.h"
#include "strings/string_util.h"
#include "strings/utf_st... |
433797c79999590e3161501e9def5a6e1cca5490 | e7d9094b745e269b6d104b73fa8688b5fd2fd730 | AlexanderMorton/eutelescope | /src/alibava/ExampleAlibavaProcessor.cc | C++ | cc | 7,104 | no_license | /*
* Created by Eda Yildirim
* (2014 DESY)
*
* email:eda.yildirim@cern.ch
*/
// alibava includes ".h"
#include "ExampleAlibavaProcessor.h"
#include "AlibavaRunHeaderImpl.h"
#include "AlibavaEventImpl.h"
#include "ALIBAVA.h"
#include "AlibavaPedNoiCalIOManager.h"
// marlin includes ".h"
#include "marlin/Proce... |
385dfb4e3d2d889a144fbe4752f5c7cf69539229 | 62a9f3fd8bc4835c1f961aeab5d1cbf514d2932c | neonoia/Protoshop | /src/adjustment/enhancement.hpp | C++ | hpp | 618 | permissive | #ifndef ENHANCEMENT_H
#define ENHANCEMENT_H
#include "base.hpp"
class AdjustmentEnhancement : public Adjustment {
public:
static void brighten(Image* target, double multiplier);
static void contrastStretch(Image* target, int rMin, int rMax);
static void logTransform(Image* target, double c);
static void inver... |
aa9dbc99479edd20a074ad040df778a1d0f28a7c | 0c4161eee436e078eea7e28e99d570e78ce8fe0f | mpsitech/idec_public | /ideccmbd/CrdIdecUsr/PnlIdecUsrHeadbar_blks.cpp | C++ | cpp | 3,903 | permissive | /**
* \file PnlIdecUsrHeadbar_blks.cpp
* job handler for job PnlIdecUsrHeadbar (implementation of blocks)
* \author Alexander Wirthmueller
* \date created: 30 Dec 2017
* \date modified: 30 Dec 2017
*/
/******************************************************************************
class PnlIdecUsrHeadbar::... |
c8462e5a85cc165654abf0d71185714ee94aa360 | 6cd65fde5474f1744c758376b68f0ab3512498f8 | thankthemaker/sharespresso | /CoffeemakerPS/src/tft.cpp | C++ | cpp | 6,898 | permissive | #include "tft.h";
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
TftDisplay::TftDisplay() {}
void TftDisplay::initDisplay() {
//pinMode(TFT_LED, OUTPUT);
//digitalWrite(TFT_LED, HIGH);
tft.initR(INITR_BLACKT... |
ae9e78513a421f96d4d3eb0bac6c31eb84595e45 | d4864f319b60a4806a50b02046808c4917236177 | IgorKatso/c_uart_interface_example | /mavlink_serial.cpp | C++ | cpp | 11,474 | no_license | /** This example is public domain. */
/**
* @file
* @brief The serial interface process
*
* This process connects any external MAVLink UART device and prints data
*
* @author Lorenz Meier, <lm@inf.ethz.ch>
*
*/
#include <common/mavlink.h>
// Standard includes
#include <iostream>
#include <cstdlib>
#in... |
dbf7135ad5505931245778dfc1384eadbc22f2d5 | 77b90539d843b3beb0e1107f6ec3f643f4417554 | Gewery/ComputerGraphicsRayTracing | /src/acceleration_structures_main.cpp | C++ | cpp | 790 | permissive | #include "acceleration_structures.h"
#include <chrono>
int main(int argc, char* argv[])
{
AccelerationStructures* render = new AccelerationStructures(1920, 1080);
int result = render->LoadGeometry("models/CornellBox-Original.obj");
if (result)
{
return result;
}
render->BuildBVH();
render->SetCamera(float3{ 0... |
86e5ff5e9c4b4f76de7489d9d56a03723743fef8 | 47929fd245a456ad6f0c2c68316fdadd70746146 | Sackzement/Heroes | /src/Texture.cpp | C++ | cpp | 2,167 | no_license | #include "Texture.h"
#include <SDL/SDL_image.h>
#include "game.h"
#include <iostream>
using std::cout;
using std::endl;
Texture::Texture()
:texture(nullptr),
name("")
{}
Texture::Texture(int w, int h)
: texture(nullptr),
name("")
{
scale.x = w;
scale.y = h;
}
Texture::Texture(const char* name)
: texture(nu... |
d152866269015f2fc580bce747ca94671af51a03 | c962256c06f5cc33e676047a50fdb3fc758a4d9d | Li2012/AdvCiv | /CvGameCoreDLL/CyPlot.cpp | C++ | cpp | 25,289 | no_license | //
// Python wrapper class for CvPlot
//
//
#include "CvGameCoreDLL.h"
#include "CyPlot.h"
#include "CyCity.h"
#include "CyArea.h"
#include "CyUnit.h"
#include "CvPlot.h"
CyPlot::CyPlot(CvPlot* pPlot) : m_pPlot(pPlot)
{
}
CyPlot::CyPlot() : m_pPlot(NULL)
{
}
void CyPlot::erase()
{
if (m_pPlot)
m_pPlot->erase(... |
1ca7d0382943143764fc5365d752ca6ded4c6e6f | 3f7e8e97462d837cd464e09f65bcaf5c29a17bcd | nyue/ribclients | /utils/tests/DeclarationManagerTestCase.cpp | C++ | cpp | 3,002 | no_license | #include "DeclarationManagerTestCase.h"
CPPUNIT_TEST_SUITE_REGISTRATION( DeclarationManagerTestCase );
void DeclarationManagerTestCase::setUp()
{
}
void DeclarationManagerTestCase::tearDown()
{
}
void DeclarationManagerTestCase::testCDtor()
{
try {
DeclarationManager tc;
} catch (...) {
}
}
void Declarat... |
afe8541362dcb16344f7780804159b7551c336cc | 8101cd2b297d8aa7ecf393f183999da9e9839823 | cp-profiler/gecode-profiling | /examples/queens.cpp | C++ | cpp | 6,386 | permissive | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2001
*
* Last modified:
* $Date$ by $Author$
* $Revision$
*
* This file is part of Gecode, the generic constraint
* developme... |
2004a436fa445f7db23c09541cd366b9b8bca42b | 849bc1b9074834a8107d268958b7086a5f5de8b3 | daball/props | /tests/src/TestBehavioralInterfaces.cpp | C++ | cpp | 30,117 | permissive | //Link to Boost
//#define BOOST_TEST_DYN_LINK
//Define our Module name (prints at testing)
#include <string>
#include "mocks/AdditionProxyTestClass.hpp"
#include "mocks/ArrowProxyTestClass.hpp"
#include "mocks/AssignmentProxyTestClass.hpp"
#include "mocks/CoercionProxyTestClass.hpp"
#include "mocks/DivisionProxyTestCl... |
1fca316d0f8d9d12dd988be34b9cb130c3c9c2b7 | eb2f277e9bb6b8d23a8bc66f2fd56290649147a4 | subnr01/Programming_interviews | /LeetCode-master/Swap Nodes in Pairs.cpp | C++ | cpp | 914 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution
{
public:
ListNode *swapTwoNode(ListNode *pre, ListNode *first, ListNode *second)
// note: don't forget the preNode
{
ListNo... |
db5abac1e5eeaef19c0dd8f708837532bb462856 | b174db25d6fed9c93651dfa7f66cd8dd2e67a4ef | kunal-pahwa/HackerRank_Questions | /merge_sort.cpp | C++ | cpp | 659 | no_license | #include<iostream>
#include<algorithm>
using namespace std;
int i=0;
int recursion(int* A,int n){
// cout<<i++<<" ";
int left=n;
int right=n;
int mid=(left+right)/2;
int i=0;
int j=0;
int k=0;
if(n<1){
return ;
}
while(i<left && j<right){
if(A[i]<=A[right]){
A[k]=A[i];
i++;
}
else... |
a28f5843b7e74b6ade1ab6282f2db60952a78967 | b904da5916ed562ebeadae5f609d29a15bd15613 | zanzo420/SoT-SDK | /SDK/SoT_BP_LargeShipLanterns_classes.hpp | C++ | hpp | 3,619 | no_license | #pragma once
// Sea of Thieves (2) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_BP_LargeShipLanterns_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------... |
d9962ae26860fdc98ffdba69819a7518cef62022 | 1467f497220a2b0cab2ea041d31a5e1980db8d87 | yashgugale/OpenGL-Assignments | /OpenGL_On_XWindows/XWindows/13-Smiley texture tweaking/02-Smiley texture tweaking.cpp | C++ | cpp | 11,624 | no_license | //XWindows first program
#include <iostream>
#include <stdio.h>
#include <stdlib.h> //For exit();
#include <memory.h> //For memset();
//XWindows headers:
#include <X11/Xlib.h>
#include <X11/Xutil.h> //Used for XVisualInfo struct and associated APIs
#include <X11/XKBlib.h> //Keyboard library
#include <X11/keysym.h> ... |
3af92e2bdf02632cfbd4312b7e936ba52feff4ce | 648abd2083014926012bbddf1b2d1d0e99547bad | demonsheart/C- | /rongyu/homework1/file/2017301020_1037_正确_19.cpp | C++ | cpp | 1,207 | no_license | #include <stdio.h>
int main(){
int n,i,j,t,sum;
char type,max;
float min;
scanf("%d",&t);
getchar();
for(i=0;i<t;i++){
scanf("%c",&type);
scanf("%d",&n);
int *array1=new int[n];
float *array3=new float[n];
char *array2=new char[n];
if((type-'I')==... |
51a4e11ebe186ff62057c7f9ea50c6b5510b33cd | bb8487d6997ff7cb2a20d5f50056ce238a8c48f3 | stuRobotics/Exploration-Algrithm | /exploration/src/navigator.cpp | C++ | cpp | 226 | permissive | #include <ros/ros.h>
#include <nearest_frontier_planner/robot_navigator.h>
int main(int argc, char **argv)
{
ros::init(argc, argv, "Navigator");
ros::NodeHandle n;
RobotNavigator robNav;
ros::spin();
return 0;
}
|
5c9853e66fc503c9337028089035bb41d13fdcf0 | 16882e2c0d95ebc7106eb3f9ffc50d5ec1d7c5cc | alibaba/heterogeneity-aware-lowering-and-optimization | /tests/unittests/lit_cases/test_eigen/test_concat_1d_axis_0_eigen.cc | C++ | cc | 1,997 | permissive | //===-test_concat_1d_axis_0_eigen.cc-----------------------------------------------------------===//
//
// Copyright (C) 2019-2020 Alibaba Group Holding 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 ... |
5718d0fa2b7f6f00878779abfc8bb5df2b5530a6 | 8e5aa44a801ea764afd996f8f3f6076939cbea5a | StarPolygen/Code_Library | /比赛/2019秦皇岛Camp/camp1/训练营1A.cpp | C++ | cpp | 2,931 | no_license | //Dijstra
//各点之间若干路,以及1号点(起点)到各点之间有一些铁路,注意有重边
//问删掉哪些铁路不会改变起点到其他点的最短路长度
//解法:Dij求出到所有点的最短路,及到该点的最短路入度inq[i]
//对于所有铁路们,若到达点的最短路小于铁路长度,则显然可以删除它而不影响整个图的最短路
//若到达点的最短路等于铁路长度,那么需要保留一条最短路即可,也就是说只要inq[i]>1那么就可以删除,同时inq[i]--
#include <bits/stdc++.h>
using namespace std;
#define maxn 100005
#define ll long long
cons... |
56dbf361ceb4da7e16666383203fcdf76d064c16 | 1b3ada63d79cbf78da7cb8949b0c1a4e25572da9 | ldhshao/mylearnings | /qtlearnings/sqltest/mythread.cpp | C++ | cpp | 6,396 | no_license | #include "mythread.h"
#include <QDebug>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QDateTime>
CWorkerThread::CWorkerThread(QObject* parent)
: QThread (parent)
{
}
void CWorkerThread::startThread()
{
if(!this->isRunning())
start();
}
void CWorkerThrea... |
30a450884042945f66c3893ab84789e1bead64a4 | f0749ad5873167262fc5c7ad529c8f56f98ebff1 | CP1984/UDACITY--Cpp_For_Programmers | /Lesson3/Video6/Variable_Assignment.cpp | C++ | cpp | 1,091 | no_license | /*Goal: understand C++ implicit variable assignments.
**Run the program to see implicit variable assignment at work.
*/
#include<iostream>
int main()
{
int a = 65;
char charA = 65;
char charB = 'B';
float answer = 0;
char charC = 67;
int integer = 80;
float floatNumber = 0.0;
std::cout << "a = " << a << "... |
e13e6a89c824477d494192e9f74f611bb16e5b89 | 139dd61b3660139a3c764f9c6f59bb80b8869c9a | xwang345/OOP244_W8_IN_LAB | /SavingsAccount.cpp | C++ | cpp | 753 | no_license | #include <iomanip>
#include "SavingsAccount.h"
using namespace std;
namespace ict{
// TODO: Implement SavingsAccount member functions here
SavingsAccount::SavingsAccount(double e_balance, double e_interest): Account(e_balance){
if (e_interest <0) {
interestRate = 0;
} else {
... |
08c81b66e35d0680662d7cdc2c449948ef64adab | 8532bc1665ce82a5176277fa51e5e8ab74d653f0 | mameisam/MMDAIM | /libvpvl/render/a5/main.cc | C++ | cc | 9,448 | permissive | /* ----------------------------------------------------------------- */
/* */
/* Copyright (c) 2010-2011 hkrn */
/* */
/* All rights reserved. ... |
fd4a117f5b0f626c7991e1eb1678790ecf555e69 | 1e22bb9a8bae09547d2eed868e97a423cedad9ed | QLingx/TechieDelight | /binary/ideone_WG65bD.cpp | C++ | cpp | 1,133 | no_license | #include <bits/stdc++.h>
using namespace std;
// Function to print the elements of a vector
void printVector(vector<int> out)
{
for (int i: out)
cout << i << " ";
cout << endl;
}
// Recursive function to print all distinct subsets of S
// S --> input set
// out --> vector to store subset
// i --> index of ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.