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 |
|---|---|---|---|---|---|---|---|---|
3d67b1b552e60140a1fae7bb3595cfe16285c3dd | cc603dc6452a266d77256f3a033e37a92b5caa93 | Jmemon/CudaNeuralNet | /Examples/CreditCard/main.cpp | C++ | cpp | 4,988 | no_license | #include "../../include/NeuralNet.h"
#include "../../include/csv.h"
#include <iostream>
#include <istream>
#include <fstream>
#include <vector>
// Dataset Info: https://www.kaggle.com/sakshigoyal7/credit-card-customers
std::ostream& operator<< (std::ostream& cout, std::vector<double> &x);
std::vector<std::vector<dou... |
5299ae23ac1d9c6c2279db2540d4eaa065f82ce1 | 1bffa1a1db95711a02b26871d69ea549e6faecfe | TingPing/xenia | /src/xenia/ui/window.cc | C++ | cc | 15,346 | no_license | /**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. ... |
e4c235d2b69a76bc6d9cba31db9f6e5bdd0de145 | 970696e6459a22e861d1000a186e5c7fc487f4ad | LineageOS/android_system_core | /init/security.cpp | C++ | cpp | 7,566 | permissive | /*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
44626fc29346d132c81c256730484165081a4b1b | e7df9916141047965175eb8383a6dee92ec90051 | rksm/kinect-playground | /src/freenect.cpp | C++ | cpp | 2,057 | no_license | #include <iostream>
#include <libfreenect2/libfreenect2.hpp>
#include <libfreenect2/frame_listener_impl.h>
#include <libfreenect2/registration.h>
#include <libfreenect2/packet_pipeline.h>
#include "freenect.hpp"
using libfreenect2::Freenect2;
using libfreenect2::Freenect2Device;
using libfreenect2::Registration;
usi... |
4b4c3b55eaf70021bab9aa2019a4c7f17f374abe | 33e8d1c231fb6102ed46a6d89c66404be6a8d032 | marcclintdion/animateMe_LINK | /_MODEL_FOLDERS_/rightHeel/rightHeel_RENDER.cpp | C++ | cpp | 2,335 | no_license | runTripleQuat(15); //__MAYBE_THIS_CAN_BE_MOVED_TO_THE_SHADOW_PASS_SO_ITS_ONLY_CALCULATED_ONCE :) THIS_WILL_REQUIRE_THAT_PARTS_HAVE_UNIQUE_MATRICES_SO_THEY_ARE_INSULATED_FROM_SUBSEQUENT_TRANSFORMS
setupTransforms_MainColor();
//--------------------------
glBindBuffer(GL_ARRAY_BUFFER, rightHeel_VBO);
glBin... |
9d699e6d214798d1de06b7dced13924eff1e1e65 | a3e5ad58cf3857cb02093fd18183c1609924e864 | n30phyte/SchoolDocuments | /CMPUT274275/WeeklyExercise/serial_counter/serial_counter.cpp | C++ | cpp | 2,441 | permissive | /**********************************
* Name: Michael Kwok
* ID: 1548454
* CMPUT 274, Fall 2019
* Weekly Exercise 6
********************************/
#include <Arduino.h>
// To reduce magic numbers
const int LED_COUNT = 5;
const int LED_PINS[LED_COUNT] = { 9, 10, 11, 12, 13 };
/*
* Updates the LEDs to output... |
ffadf79398d02bc969d42c2c51b5a2247f237ef1 | ae9e8df96343fb9ffd5f47a24744f1e222c0e331 | tushartk/gym_torcs | /vtorcs-RL-color/src/modules/graphic/ssggraph/grscene.cpp | C++ | cpp | 19,826 | permissive | /***************************************************************************
file : grscene.cpp
created : Mon Aug 21 20:13:56 CEST 2000
copyright : (C) 2000 by Eric Espie
email : torcs@free.fr
version : $Id: grscene.cpp,v 1.47 2006... |
27e398ea5015be98028d7f9017716c8b17ff2a63 | 19a6cf2ccc51b09ee91369a4f3ba7862242ead66 | ZhongXiaoxia/MediaSDK | /_studio/mfx_lib/encode_hw/hevc/hevcehw_disp.cpp | C++ | cpp | 7,108 | permissive | // Copyright (c) 2020 Intel Corporation
//
// 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, merge, publ... |
0aa5b07364890b17ec58856d6a146aae64473504 | 9e2f0e637f53efe366a74d64ed242497e64afad0 | justanothercoder/Compiler | /typemodifier.cpp | C++ | cpp | 859 | no_license | #include "typemodifier.hpp"
TypeModifier::TypeModifier() : dimension_(nullptr) { }
TypeModifier::TypeModifier(std::shared_ptr<ExprNode> dimension) : dimension_(dimension) { }
bool TypeModifier::isPointer() const { return dimension_ == nullptr; }
bool TypeModifier::isDimension() const { return dimension_ != nullptr; }... |
a3f5446f4060957986dc0a806c0e89da2bf6a99e | 7b2413559d5e2efa841f467b3f647ac6fb255edf | chromium/chromium | /chromeos/ash/services/libassistant/grpc/utils/settings_utils.cc | C++ | cc | 5,478 | permissive | // Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/ash/services/libassistant/grpc/utils/settings_utils.h"
#include "base/check.h"
#include "base/logging.h"
#include "chromeos/assistant/internal/libassistant/... |
efc6b5f514f18a00bccb3bd97f5ed7924f492b8e | 3e6da9e84aa463fa6f2cddce5c0d67f9f10fed5a | tanhevg/cool-compiler | /semant/semant_error.cpp | C++ | cpp | 1,289 | no_license | //
// Created by Evgeny Tanhilevich on 22/11/15.
//
#include "semant_error.h"
////////////////////////////////////////////////////////////////////
//
// semant_error is an overloaded function for reporting errors
// during semantic analysis. There are three versions:
//
// ostream& ClassTable::semant_error()
//... |
db3b6ac7157135c36c3a53a54258ba181d535601 | a3b5c9efd731e289505b07a7654b1284ed406b08 | gardzielb/anim3d | /src/api/Shader.cpp | C++ | cpp | 3,188 | no_license | //
// Created by bartosz on 1/5/21.
//
#include "Shader.h"
#include "glUtils.h"
#include <glm/gtc/type_ptr.hpp>
#include <tuple>
Shader::Shader( const std::string & vertexPath, const std::string & fragmentPath )
{
auto[vsSource, fsSource] = readShaderSources( vertexPath, fragmentPath );
programId = createShader( v... |
58858af061883e170f38145bd28ac9fbb4f8d8f8 | cffb12605fdfd225a646190e4e6964e9e71ccb87 | plexoos/star-sw | /StRoot/StUtilities/StMessageManager.cxx | C++ | cxx | 21,028 | no_license | //////////////////////////////////////////////////////////////////////////
// //
// StMessageManager //
// //
// This class manage... |
96509a8d139ab84c2dc81eb68e2e2bfc546283dd | 5f89abc7f196fe316f72ed88ca192879b008f18e | npostnikova/wordSearcher | /mymodel.cpp | C++ | cpp | 395 | no_license | #include "mytreeview.h"
MyModel::MyModel(QWidget * parent) : QStandardItemModel(parent) {}
MyModel::~MyModel() {}
void MyModel::appendRow(QList<QStandardItem*> const& data) {
insertRow(0, data);
}
void MyModel::appendRows(std::vector<QString> const& data) {
for (auto& d : data) {
appendRow(MyTreeView... |
4111c82de49e0888c638e243b285625ef59c5e89 | 4ad3a00a0f5074be581ce2b448066dc222d89e49 | bagelSeed/C-Applications-and-Source-Code | /Classes(large number)/main.cpp | C++ | cpp | 2,313 | no_license | #include <iostream>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
typedef vector<int> ivec;
typedef unsigned int uint32;
class largeNum
{
public:
largeNum();//~largeNum(); = destructor
largeNum(string str);
void fromString(string str);
ivec getVec();
... |
72cc7abbd4619dc8558b77517c3ca97cacb31a33 | d89f132e9ea160d385f219d7a73350267edd782c | artgonzalez/cpp-primer | /src/exercises/002Chapter/205-literals/main.cpp | C++ | cpp | 617 | permissive | #include <iostream>
int main()
{
auto letter = 'a';//char
auto lng = L'a';//wchar_t
auto str = "a";//const char pointer
auto str2 = L"a";//const wchar_t pointer
std::cout<<letter<<" "<<lng<<" "<<str<<" "<<str2<<"\n";
auto n = 10;//int
auto ui = 10u;//unsigned int
auto l = 10L;//long
... |
f8925dd6d9f8cfac52b23b9fb4b366a988ff18ee | b83442d814d30d528b650be45b3aea883444550f | Sondro/rainbow | /src/Heimdall/OverlayActivator.cpp | C++ | cpp | 3,259 | permissive | // Copyright (c) 2010-present Bifrost Entertainment AS and Tommy Nguyen
// Distributed under the MIT License.
// (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
#include "Heimdall/OverlayActivator.h"
#ifdef USE_HEIMDALL
#include <algorithm>
#include "Heimdall/Overlay.h"
#include "Input... |
a1c90a68c814b1f73078c08bfdb891d083844f98 | 708514579458b133245b5058864f62fce690b3f0 | KnifeParty12/Cpp-Codes | /OOPS/student.cpp | C++ | cpp | 451 | permissive | #include<iostream>
using namespace std;
class Student{
public:
int rollNumber;
private:
int age;
public:
~Student(){
cout<<"Destructor called\n";
}
//Default Constructor
Student(){
cout<<"Constructor 1 is called !\n";
}
Student(int a,int r){
cout<<"Construct... |
a412155afa5f4a26a89e1684785f00e35d2b81bf | 59a00e664e04ca53c830d18c72ae79cc123608ea | kks227/BOJ | /10800/10824.cpp | C++ | cpp | 295 | no_license | #include <cstdio>
using namespace std;
long long input(){
bool flag = false;
long long n = 0;
while(1){
int c = getchar();
if(c<0 || c==' ' || c=='\n'){
if(flag) return n;
flag = true;
}
else n = n*10 + c-'0';
}
return -1;
}
int main(){
printf("%lld\n", input()+input());
} |
479ae6d4fb404ec315faef05769a9ec01369c313 | aaa101c0b41572858fac48b44d60275a975096ed | Runskey/cpp_xcode | /cpp_xcode/polymorphism.hpp | C++ | hpp | 1,015 | no_license | //
// polymorphism.hpp
// cpp_xcode
//
// Created by Lin on 4/11/17.
// Copyright © 2017 Runskey. All rights reserved.
//
#ifndef polymorphism_hpp
#define polymorphism_hpp
#include <iostream>
using namespace std;
class BaseClass {
const int bc = 100;
public:
virtual const void print() {
cout... |
0fc363387ba5957965af5add1112038e2a5cd399 | e08a4ddab2acca312fd0b7e5b3dd5bed3995d9a6 | CharlieXu/GridPACK | /src/applications/contingency_analysis/ca_app.hpp | C++ | hpp | 1,739 | permissive | /*
* Copyright (c) 2013 Battelle Memorial Institute
* Licensed under modified BSD License. A copy of this license can be found
* in the LICENSE file in the top level directory of this distribution.
*/
// -------------------------------------------------------------
/**
* @file ca_app.hpp
* @author Y... |
75eda57dd0665625a15300c046333b51c40361ee | 806f4b4486525fa23b5df8fc8e54e87ec0149d8f | fatmingwang/TestProject | /TestProject/Src/Core/OpenGL/GLSL/Blur.cpp | C++ | cpp | 2,075 | no_license | #include "../stdafx.h"
#include "Blur.h"
#include "../Image/FrameBuffer.h"
namespace FATMING_CORE
{
//extern cNamedTypedObjectVector<cBaseShader>*g_pAll2DShaderList;
//
const char*cBlurShader::m_sVSH = "";
const char*cBlurShader::m_sVSV = "";
const char*cBlurShader::m_sFS = "";
cBlurShader* cBlurShader::Create... |
2b397918c4a02c5f5eacacb8d17c0bf1ae5a4680 | a7821c68b3725489faffe4c98e8cf127ca67e83c | beliefy/luogu | /String/zuichangqiznhui_kmp.cpp | C++ | cpp | 1,614 | no_license | #include <bits/stdc++.h>
#define mem(a, b) memset(a, b, sizeof(a))
#define fo1(a, b) for (int a = 0; a < b; ++a)
#define fo2(a, b) for (int a = 1; a <= b; ++a)
#define inf 0x3f3f3f3f
using namespace std;
const int maxn = 2e5 + 5;
int nxt[15];
vector<int> v[maxn]; //首尾位置
bool vis[maxn];
int ans = 0;
void getnxt(string s... |
3997b6dcfd7d0e98c674df4aa3074359797bf796 | 63941602f77cba326a4224fadb3e110d298f0b5b | Mithrilwoodrat/QtGomoku | /serverdialog.cpp | C++ | cpp | 1,600 | no_license | #include "serverdialog.h"
ServerDialog::ServerDialog(QWidget *parent)
{
InitUI ();
}
ServerDialog::~ServerDialog()
{
}
void ServerDialog::InitUI()
{
setFixedSize (300,300);
setWindowFlags (Qt::WindowCloseButtonHint);
Vboxlayout = new QVBoxLayout;
Vboxlayout->setSizeConstraint(QLayout::SetNoConstr... |
e8647c84c42510b39cdc798702e0db8343602f30 | f7ad445dcdb459a0623c43325aa40fa55b07ca1a | arjunbangari/Problem-Solving | /codeforces/1352/F.cpp | C++ | cpp | 1,296 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
ll const inf = 1e18;
ll const maxn = 1e6+5;
ll const mod = 1e9+7;
// code begins here
int main(){
fast;
ll t;
... |
0283b000c624032bd7e4269c57285452a0179ea3 | cf8d4e42c7b04164216c4b06587016d417bc9436 | monocasa/gen7 | /src/libjitpp/source/powerpc/GekkoTranslator.cpp | C++ | cpp | 1,841 | no_license | #include "jitpp/powerpc/GekkoCpuContext.h"
#include "jitpp/powerpc/GekkoTranslator.h"
#include "util/Compilers.h"
namespace jitpp {
void GekkoTranslator::OnUnknownInstruction( uint32_t instr, UnknownCode code,
int codeArg, uint64_t pc )
{
UNUSED(instr);
UNUSED(code);
U... |
8a62fb17519a4979f4516347b613c1ac35534f04 | 3d2b03a83a27a805d6f356ce72845b88e6da8147 | Malvika18/CPP_Dev | /sheet1 ques 2.cpp | C++ | cpp | 391 | no_license | #include<iostream>
using namespace std;
int main()
{
int a[7],m,n,i;
cout<<"Entr the size of array"<<endl;
cin>>n;
cout<<"Enter m"<<endl;
cin>>m;
cout<<"Enter the array"<<endl;
for(int i=0;i<n;i++)
{
cin>>a[i];
}
if(a[i]==m)
{
cout<<"True"<<endl;
}
else
{
cout<<"False";
}
// cout<<"Array is"<<e... |
d8c7f49bca0ef6f15e4fbb82e510cf05e5893d96 | cd715188aad119db7232fd0aaf2dd1435e8f9a04 | crouchingtigre/turicreate | /deps/src/cmake-3.13.4/Source/cmLoadCommandCommand.cxx | C++ | cxx | 6,734 | permissive | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmLoadCommandCommand.h"
#include <signal.h>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cmCPluginAPI.cxx"
#include "... |
af175670074afb041d26a996aa0a72f67659e95c | 842c9875c29e71490624d0dc8cf1a016f1b6ca93 | Work16/documents | /Creating.cpp | C++ | cpp | 344 | no_license | #include "stdafx.h"
#include <iostream>
using namespace std;
int **creating(int **matrix,int n)
{
for (int i = 0;i < n;i++)
for (int j = 0;j < n;j++)
{
cout << "¬ведите [" << i + 1 << ";" << j + 1 << "] элемент матрицы:\n";
cin >> matrix[i][j];
//matrix[i][j] = rand()%10;
}
return matrix;... |
55e83a8e54a96babaed669955823311d30a4361b | ebfa5024bd91ac38bbd6333c168b98e16afbc4de | cybernetics/hhvm | /hphp/runtime/ext/ext_generator.cpp | C++ | cpp | 5,591 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
| Copyrigh... |
7dbbc7ef180208cf7a58af1358b5a90a3781b2a7 | 03e023881894b14282607314eb716f38aa9684bf | blueyeq/codeforces | /round#138div1/B.cpp | C++ | cpp | 2,262 | no_license | #include <stdio.h>
#include <cstring>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
using namespace std;
typedef long long LL;
const int MAXN = 410000;
const int INF = 0;
char a[MAXN], b[MAXN];
int pl[MAXN], pr[MAXN];
bool vis1[30], vis2[30];
int sum[210000][26];
int main(... |
a5916c4e2bfa078a17b7c3ca37cad3ce620d2015 | 40aa0bb7b37d6e5dd0bf3be25e37c4baa23a4c34 | futureneer/wallframe_apps | /modulair_app_wallball/src (copy)/WallBallWidget.cpp | C++ | cpp | 6,403 | no_license | #include "WallBallWidget.h"
#include <Managers/GraphicsManager.h>
#include <Managers/InputManager.h>
#include <iostream>
#include <stdlib.h>
#include <QTimer>
#include <QDialog>
#include <QHBoxLayout>
#include <pthread.h>
using namespace std;
using namespace modulair;
bool WallBallWidget::s_RunPhysics = false;
pth... |
53bbe13215614996b231a27021d1bac66a20c973 | 26818638f9d6d768dd247bf5f6475aaebb88a607 | ha4/ardu | /bayang_ppm/bayang_rx.cpp | C++ | cpp | 7,347 | no_license | #include <Arduino.h>
#include "bayang_rx.h"
#include "nRF24L01.h"
#include "XN297_emu.h"
//#define BIND_DEBUG
//#define BAYANG_AUTOBIND
#define BAYANG_BIND_COUNT 5000 /* 5 seconds */
#define BAYANG_PACKET_PERIOD 2000
#define BAYANG_PACKET_TELEM_PERIOD 5000
#define BAYANG_INITIAL_WAIT 500
#define BAYANG_... |
95b4cf23494aa416bfdd4f872a041a89e672e37e | dcc76957f76b56067de0563ec3bc82c95bd3f606 | bapinney/project-euler | /432.cpp | C++ | cpp | 3,633 | no_license | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... |
37f28a7eec9fa681041b437e5aaa79d0125ad230 | dfdc6aa79011c6d921bad063d0c9853dd2abac5d | rughjake/Physics-128AL-Particle-Lab | /phi_meson.cc | C++ | cc | 6,589 | no_license | // File : phi_meson.cc
// Author : Jake Rugh (5/5/2020)
//
// Edited from : ks.cc
// Author : Ryosuke Itoh, IPNS, KEK
// Date : 1 - Mar - 2004
//-
// Modified by T.Nozaki (2005/10/28)
// Modified by S.Nishida (2007/02/03)
// Modified by T.Nozaki (2009/07/01) Comments in English
#include <cstdio>
#include ... |
aa1888381e6654e386ad03c99656f5c7c08087bc | 2f951c3d72eed40ea121b6afe31c50780d2550f1 | willvelida/cplusplusprojects | /TicTacToeGame/TicTacToeGame/Source.cpp | C++ | cpp | 5,165 | no_license | // Tic Tac Toe
// Plays the game of tic-tac-toe against a human opponent
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
// global constants
const char X = 'X';
const char O = 'O';
const char EMPTY = ' ';
const char TIE = 'T';
const char NO_ONE = 'N';
//function pro... |
f14f13d0c0c3f4a24f17fd4b9459c22eec10c3f4 | b7209ce4893f866c7eea55e111a810333db0470b | Fneger/ArkPro | /Package/AVService/arm/moc_AVService.cpp | C++ | cpp | 3,083 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'AVService.h'
**
** Created: Mon Oct 23 11:17:16 2017
** by: The Qt Meta Object Compiler version 62 (Qt 4.7.4)
**
** WARNING! All changes made in this file will be lost!
*************************... |
ff5298020b08439f93b45f9c23623dc5cba5a489 | e8c6fd107b41f733c499939ae692b846d8825241 | cornwe19/cse825 | /linux/printf_exploit/vuln_server.cpp | C++ | cpp | 1,354 | no_license | #include <iostream>
#include <stdio.h>
#include <arpa/inet.h>
#include "socket_utils.h"
#define OUTPUT_PREFIX "server>> "
using namespace std;
void OnServerMessage( int socket, unicast_pkt data, sockaddr_in sender, struct timeval** timeout );
void OnConsoleMessage( const char* message, bool* shouldExit );
int mai... |
f584108140341051f641f808dd943f9792e8423c | e66f8e8abea8cfc8b1c7a5074d30a326bf7d714d | dungxmta/Ky-thuat-lap-trinh | /BaiTH3/Bai6.cpp | C++ | cpp | 738 | no_license | //so co 3 chu so chia het cho 3?
#include<stdio.h>
const int N=3;
void nhap(char[], int &);
bool kiemtra(int);
void Hienthi(int);
int main()
{
int n;
char filename[50]="Bai6.inp";
nhap(filename,n);
Hienthi(n);
return 0;
}
//**********
void nhap(char filename[50], int &n)
{
char c;
FILE *fi= f... |
b3c1e1f5e3c67de90695c6cfa52280972d83fe18 | 9e24b5600d776c61f52170ef5f89340d1fca067c | lcls-daq/ami | /qt/ImageScale.hh | C++ | hh | 726 | no_license | #ifndef AmiQt_ImageScale_hh
#define AmiQt_ImageScale_hh
#include <QtGui/QWidget>
#include <QtCore/QString>
class QLineEdit;
namespace Ami {
class DescEntry;
namespace Qt {
class ImageScale : public QWidget {
Q_OBJECT
public:
ImageScale(const QString& title);
~ImageScale();
public:
... |
aa59022c46dad7a6a441ef362d4b3290847a6e81 | 0189a59adc62430d26d6b3f30bacce831e7779c8 | lupvasile/contest-problems | /c++/sudest oji 2006 clasa 10 mai rapid/main.cpp | C++ | cpp | 2,808 | no_license | #include <iostream>
#include <fstream>
#include <queue>
#include <iomanip>
#include <stack>
using namespace std;
//ifstream f("teste/0-SUDEST.IN");
ifstream f("sudest.in");
ofstream g("sudest.out");
// in a tiiminte matricea
//in v tii minte numaru de pasi
//in sol tii minte solutia
#define foor(i,a,b) for(i=a;i<=b;i++... |
1afb45e713aeabe234e6dd4d8eab244c0344d6eb | 07b272aad9e0faaf89e2f7afb3a397bb00253af3 | yuwang211/Perceptron | /perceptron_statistic.cpp | C++ | cpp | 1,781 | no_license | #ifndef perceptron_statistic_cpp__
#define perceptron_statistic_cpp__
int Perceptron::error()
{
int ret = 0;
for (int i = 0; i < data.n; ++i)
if (dot(w, data.point(i)) < 0)
++ret;
return ret;
}
int Perceptron::errorMargin(double gamma)
{
int ret = 0;
double c = 0;
for (int i = 0; i <=... |
dc50aac88d2a1e5152ace6c0db169498b09b3a60 | 8b8d74097a530786c9872b4622ba3511c10cc467 | davidgm94/TripleR | /src/external/meshoptimizer/tools/gltfpack.cpp | C++ | cpp | 121,438 | permissive | // gltfpack is part of meshoptimizer library; see meshoptimizer.h for version/license details
//
// gltfpack is a command-line tool that takes a glTF file as an input and can produce two types of files:
// - regular glb/gltf files that use data that has been optimized for GPU consumption using various cache optimizers
... |
18777cea32b1a7e8b823ec392a5f8f0b2e173996 | 958e83c5595a9298abd3783abacb5511b7bcb4ea | wqtangecust/msmrd2 | /include/integrators/overdampedLangevinSelective.hpp | C++ | hpp | 2,579 | no_license | //
// Created by maojrs on 10/15/20.
//
#pragma once
#include "integrators/overdampedLangevin.hpp"
#include "trajectories/discrete/discreteTrajectory.hpp"
#include "trajectories/discrete/patchyDimerTrajectory.hpp"
namespace msmrd {
/**
* Over-damped Langevin with patch selectivity integrator declaration. Th... |
e6156ae94d3d020e5cebffb6e4345fa4d45fdc12 | cb1fd52ea46fa4a300084d2a9440156ec935ae92 | mightyvivek/Programming-codes | /Pointer.cpp | C++ | cpp | 368 | no_license | //pointr
#include<iostream>
using namespace std;
struct Rl_cde
{int x=100,y=200,z=300;
};
int main()
{Rl_cde r;
int *ptx,*pty,*ptz;
ptx=&r.x,pty=&r.y,ptz=&r.z;
cout<<"Pointer Adress->"<<ptx<<endl<<"Value="<<r.x<<endl<<endl;
cout<<"Pointer Adress->"<<pty<<endl<<"Value="<<r.y<<endl<<endl;
cout<<"Pointer Adress->"<<pt... |
1838b21819e799fe8471a0315fde1eea503fa704 | 17a58f3191b6c31b643647ecb22b71f90df311cc | Nora5hhh/My-program | /P7_cannyDetect/P7_cannyDetect/源.cpp | C++ | cpp | 729 | no_license | #include<opencv2/opencv.hpp>
#include<iostream>
using namespace std;
using namespace cv;
#define WINDOW_NAME "canny_detect"
Mat src, dst,gray,cdst;
int threshold1 = 3, threshold2;
static void on_canny(int, void*)
{
blur(gray, dst, Size(3, 3));
Canny(dst, dst, threshold1, threshold2 * 3, 3);
cdst = Scalar::all(0);
... |
049db607130053ba6bf80451da6ea074c4211dc4 | 118ab48717c524554eb53a588bd0e849ba289877 | dingjunyong/MyCocos2dxGame | /3.8.1/Tone_Skipper/Classes/AppDelegate.cpp | C++ | cpp | 2,577 | permissive | #include "AppDelegate.h"
#include "LogoScene.h"
#include "ArchiveManager.h"
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
//if you want a different context,just modify the value of glContextAttrs
//it will takes effect on all platforms
void AppDelegate::initGLContextAttrs()
{
//se... |
1793d918999691dc840a73d205f6aeb2399c9c31 | 1f7cbea5841ef454aae5a6c846e1d0c012361829 | rowhani/Graphics | /src/Hierarchial Shaded 3D Effects/Hierarchial Shaded 3D Effects/ArtmanHRCShaded3D.cpp | C++ | cpp | 10,601 | no_license | //----Keyboard Controls----
//p - toggle view between orthographic and perspective modes
//f - toggle view between fullscreen and window modes
//w - toggle between wireframe and solid shapes
//background colors - r : red, b : blue, g : green, l : black, t : white, o : orange, e : grey, y : yellow
//-----Mouse Controls-... |
2a7a6fd5e77d9b470e01cba6e11b3e009916309e | ae2f548a570bbf5c7367ff2dc19cd272b86beac4 | otcshare/chromium-src | /third_party/abseil-cpp/absl/flags/usage_config.cc | C++ | cc | 5,417 | permissive | //
// Copyright 2019 The Abseil 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
a8ac4e5605f8939a406bb2155f3edc6dabb5f9ef | fbd7b7592f727a2f46309fd0990f830650b32dca | hdrn/hedron | /src/qt/signverifymessagedialog.cpp | C++ | cpp | 8,655 | permissive | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017 The Hedron developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-li... |
c47ecfb4fa7ad43c92a5982046512e7202372e2b | 3edbbbc33abcf3c90accd26975974cdc12040bbe | rezwan4029/UVA-CODES | /1189 - Find The Multiple.cpp | C++ | cpp | 1,665 | no_license | /*
Rezwan_4029
AUST , CSE-25
*/
#include <bits/stdc++.h>
#define pb push_back
#define INF 1<<29
#define all(x) x.begin(),x.end()
#define ms(a,v) memset(a,v,sizeof a)
#define II ({int a; scanf("%d", &a); a;})
#define LL ({ll a; scanf("%lld", &a); a;})
#define EPS 1e-12
#define pi 3.1415926535897932384626433832... |
d9b34f9ad8f27bb96998e94be4cfff929ac0e0a7 | f54dd7f7da13d8761be5ff53888b5af25d24424f | LordSoylent/buysellcoin | /src/qt/transactionrecord.cpp | C++ | cpp | 11,723 | permissive | #include "transactionrecord.h"
#include "base58.h"
#include "util.h"
#include "wallet.h"
#include "darksend.h"
#include "instantx.h"
#include <stdint.h>
/* Return positive answer if transaction should be shown in list.
*/
bool TransactionRecord::showTransaction(const CWalletTx &wtx)
{
if (wtx.IsCoinBase())
... |
10ff262eaccfc05bc682096279e704e3f508a7e9 | 1e7129ddc2d6c9973760cf23aecbde8a28c8021e | mehamasum/competitive-programming | /adhoc/spoj-AE1B-tables.cpp | C++ | cpp | 491 | no_license | #include <stdio.h>
#include <stdlib.h>
#define N 1005
int compare (const void * a, const void * b)
{
return ( *(int*)a - *(int*)b );
}
int main()
{
//freopen("input.txt","r",stdin);
int n,s,t,i;
while(scanf("%d %d %d",&n,&s,&t)==3)
{
int total= s*t;
int a[N]={0};
for(i=0;i<n;i++)
scanf("%d",&a[i]);
qso... |
9e17cf638d20dba3913ae3c8c1d635d14ee60f3b | 9db7788153f46aaa9e452f147fe7a4c0c00ac11c | crspecter/IP-conflict-detection-telnet-shell | /telnet-shell/daemon.cpp | C++ | cpp | 3,717 | no_license | #include "daemon.h"
#include <unistd.h>
#include <stdlib.h>
#include <cstring>
#include <sys/param.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <getopt.h>
#include <string>
#include "time.h"
//#include <syslog.h>
#include <signal.h>
#include "backtra... |
8887659a5e0c34e1c5d0b8ec355992267f1ea851 | 353ba16070749a9e2a2fe3d4de3eabdc4ddcee28 | jieunpark247/algorithm | /Project/programmers/programmers/64061.cpp | C++ | cpp | 710 | no_license | //크레인 인형뽑기 게임
#include <vector>
#include <string>
#include <stack>
using namespace std;
int solution(vector<vector<int>> board, vector<int> moves) {
int answer = 0;
stack <int> s;
for (int i = 0; i < moves.size(); i++) {
for (int j = 0; j < board.size(); j++) {
if (board[j][moves[i] - 1... |
16cd30dbc61d207ea637b2b6619d55d222f62de8 | 4b1748e80a499e58abe95e2d577090b0b33ca34f | JLQmiller/chromium | /chrome/browser/chromeos/login/session/user_session_manager.cc | C++ | cc | 96,009 | 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 "chrome/browser/chromeos/login/session/user_session_manager.h"
#include <stddef.h>
#include <algorithm>
#include <map>
#include <set>
#include ... |
8ecd0a4600e3d86d127675cd4a73eae131394506 | 57a60cc51943d3fbf63bd920b03ddebc09657a03 | mgdesign-fr/mapbox-gl-native | /src/mbgl/shader/dot_shader.cpp | C++ | cpp | 535 | permissive | #include <mbgl/shader/dot_shader.hpp>
#include <mbgl/shader/shaders.hpp>
#include <mbgl/platform/gl.hpp>
#include <cstdio>
using namespace mbgl;
DotShader::DotShader()
: Shader(
"dot",
shaders[DOT_SHADER].vertex,
shaders[DOT_SHADER].fragment
) {
a_pos = MBGL_CHECK_ERROR(glGetA... |
97b85988358579b0829b10dcb477f6076b983fa8 | 7875717288a1d46fa3048fec4279f000eb52f8f5 | arma2WillRobinson/DayZ-Epoch | /SQF/dayz_code/Configs/CfgMagazines/DZE/Items.hpp | C++ | hpp | 11,402 | no_license | // For Chainsaw
class ItemMixOil : CA_Magazine {
scope = public;
displayName = "2-Stroke Engine Oil";
model = "\z\addons\dayz_epoch\models\oilmix.p3d";
picture = "\z\addons\dayz_epoch\pictures\equip_oilmix_CA.paa";
count = 1;
type = "256";
descriptionShort = "2-Stroke Engine Oil";
sfx = "refuel";
class ItemAct... |
087d059900884d788d5f8cc728561c71d2e4a3b0 | 6e738cab340313d8a2e3fab735b66108366b67a2 | gmarco/qthesia | /midiout.cpp | C++ | cpp | 3,942 | no_license | #include <iostream>
#include <cstdlib>
#include "RtMidi.h"
#include <unistd.h>
#define SLEEP( milliseconds ) usleep( (unsigned long) (milliseconds * 1000.0) )
#include "jdksmidi/world.h"
#include "jdksmidi/track.h"
#include "jdksmidi/multitrack.h"
#include "jdksmidi/filereadmultitrack.h"
#include "jdksmidi/fileread.h"... |
5130ac0877937be8f0e66d382e56ba1730f6413e | 1a246e8df9b2cd83147b50d960744332f8582a51 | zylo117/tensorflow-gpu-macosx | /tensorflow/compiler/tf2xla/kernels/concat_op.cc | C++ | cc | 8,598 | permissive | /* Copyright 2017 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... |
2d554ffb0bc16546735729b3468926e65dbb8d1c | bdb9f04df86b8b0a470ffd96c8eb57b8f1487945 | yeosu0107/DirectX12-Pratice | /src/Subject-1/GameObject.cpp | C++ | cpp | 16,088 | no_license | #include "StdAfx.h"
#include "GameObject.h"
#include "Player.h"
CPolygon::CPolygon(int nVertices)
{
if (nVertices > 0)
{
m_nVertices = nVertices;
m_pVertices = new CVertex[nVertices];
}
}
CPolygon::~CPolygon()
{
if (m_pVertices) delete [] m_pVertices;
}
void CPolygon::SetVertex(int nIndex, CVertex& ve... |
9ee4c2cad44bd859bf602d4ed29e99b5ead8d849 | d254cbe364fbd9d0cb9ac79226af0a11ecd217a1 | niuxu18/logTracker-old | /second/download/curl/gumtree/curl_old_log_7614.cpp | C++ | cpp | 543 | no_license | fputs(
" Makes it the equivalent of --socks5-hostname\n"
"\n"
"EXIT CODES\n"
" There are a bunch of different error codes and their corresponding\n"
" error messages that may appear during bad conditions. At the time of\n"
" this writing, the exit codes are:\n"
"\n"
" 1 ... |
86547f738da21ec0bd323dfbf548182db611824b | fe6e7aede01c2a2bff0c32b531f5a72dce437b8a | greenjava/couchdbpp | /src/Exception.cpp | C++ | cpp | 898 | permissive | /**
* Copyright 2009 Tragicphantom Productions
*
* 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 la... |
949888efa1c3085297758ca9ccbb61758cce9c49 | ddcfcb4868f9357b9e8246fb293ed9248d3c1971 | aharthcock/phantomjs | /src/qt/qtwebkit/Source/WebCore/html/HTMLOptionsCollection.cpp | C++ | cpp | 2,551 | permissive | /*
* Copyright (C) 2006, 2011, 2012 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.... |
fb898179ba12d0c8a21557c0df13020fb40c546a | 73f4e6369a659886fca0c1a5baaa6b6c3a5f4735 | rajivadak/cpp_miniproject | /3.Implementation/test/interesttest.cpp | C++ | cpp | 338 | no_license | #include "unity.h"
#include "interest.h"
#include "test_interest.h"
void test_interest_basic(void)
{
TEST_ASSERT_EQUAL( 2, 4250);
}
int test_interest(void)
{
/* Initiate the Unity Test Framework */
UNITY_BEGIN();
/* Run Test functions */
RUN_TEST(test_interest_basic);
/* Close the Unity Test Framework */
ret... |
c8990a2c6806c15397586b6c50df674be7c1e810 | ff982195ac3bf3b5bbbfa6d64fdfc244269cb26e | rafalcieslak/PGK | /zadanie3/engine/Positionable.cpp | C++ | cpp | 2,977 | no_license | #include "Positionable.hpp"
#include <iostream>
glm::vec2 Rotate2dVector01(glm::vec2 v, float angle){
glm::mat2 m(glm::cos(angle*2.0*M_PI), glm::sin(angle*-2.0*M_PI),
glm::sin(angle*2.0*M_PI), glm::cos(angle*2.0*M_PI));
return m*v;
}
Positionable::Positionable(glm::vec2 relative_pos_) : relative_pos(re... |
69ff5fef7602b0824b03ab3eba68530bea31cb29 | df29a1c3be2258b42c5c811d50e42c34a6fb3166 | rblaczkowski/openvino | /ngraph/src/ngraph/frontend/onnx_import/op/softsign.hpp | C++ | hpp | 1,124 | permissive | //*****************************************************************************
// Copyright 2017-2020 Intel Corporation
//
// 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://w... |
981726d1f527758002710e2151e020cf206ea341 | 1199b760a6fe6ac4cd70d2574f3fe6d3c52d785c | slavapestov/swift | /lib/Sema/TypeCheckGeneric.cpp | C++ | cpp | 33,400 | permissive | //===--- TypeCheckGeneric.cpp - Generics ----------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
eb289fa06ea94a0143a75f95c827cb1d477774f9 | 62b36464761680b0b756814d95ebe6febdd730d2 | aleios/temporalmist | /include/Player.hpp | C++ | hpp | 479 | no_license | #ifndef PLAYER_HPP
#define PLAYER_HPP
#include <SFML/Graphics/Texture.hpp>
#include <GameObject.hpp>
#include <VertexBufferObject.hpp>
#include <IndexBufferObject.hpp>
enum class PlayerState
{
IDLE,
WALKLEFT,
WALKRIGHT,
JUMP,
FALLING
};
class Player :
public GameObject
{
public:
Player(const std::string& ... |
c17038fbe4928b2edbc7bef4a60792c2bd1c9cbd | 71476c633395db9c6c2a988bba680c80ab83d2e7 | SBNSoftware/sbndaq-artdaq | /sbndaq-artdaq/Generators/SBND/NevisTPC/nevishwutils/Crate.cpp | C++ | cpp | 19,559 | no_license | #include "Crate.h"
#include "trace.h"
#define TRACE_NAME "Crate"
namespace nevistpc{
// Old constructor kept so things compile
Crate::Crate(ControllerModuleSPtr ctr, int xmit_module_number, int max_fem_slot) :
_ctrlr_module(ctr){
for(int i = 1; i <= (max_fem_slot - xmit_module_number); i++){
N... |
6129253e7e1c49468a2a10296e94619297518928 | eaa8924ed08b227a79b49569fd75c8dba34d1af8 | ca2527705/AvalosChris_CSC17_48983 | /Homework/Assignment_2/HmWK_Mode/main.cpp | C++ | cpp | 3,503 | no_license | /*
* File: main.cpp
* Author: Christopher Avalos
* Purpose: Find the Mode in an Array
* Created on September 21, 2015, 6:41 PM
*/
//System Programs
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
//User Programs
//Global constants
//Function Prototypes
void SamAry (int);//Functio... |
b018c419c69a0950c5df8df3e56513f55a61e289 | cb99ffd03089ce187d41efb472490363a4fd31bf | WarlockD/Mil-std-1750A-Emulator-C20 | /operations/Operation_llb.cpp | C++ | cpp | 254 | no_license |
#include "Operation_llb.h"
namespace {
const std::string opName = "LLB";
}
Operation_llb::Operation_llb() :
AbstractOperation(opName)
{
}
Operation_llb::~Operation_llb()
{
}
void Operation_llb::execute() const
{
AbstractOperation::execute();
}
|
0a2cfeda51e14e33abd2f6e9e505776260e36d00 | b99b05a9fa86eb934e74867eac1d7a131db6670c | vamsirajan/Graph-algorithms | /bfsreach.cpp | C++ | cpp | 1,514 | no_license | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
class Graph
{
public:
int V;
int E;
vector <int> adj[20];
void addEdge(int u,int v)
{
adj[u].push_back(v);
}
void printGraph()
{
for(int u=0;u<V;u++)
{
cout<<"Vertex "<<u<<":";
... |
678e9187d5ed94c47386e12969e2f4a81c512f37 | c5de06ea604acb20aae20848749ac6221a13d5ec | Kaizhang48/MTH9815-Final-Project-TradingSystem | /TradingSystem/TradingSystem/HistoricalDataService/BondStreamingHistoricalDataService.hpp | C++ | hpp | 6,091 | no_license | // Author: Kai Zhang
//
// Define bond streaming historical data related class
// including:
// BondStreamingHistoricalDataService
// BondStreamingHistoricalDataConnector for publishing data, and
// BondStreamingHistoricalDataService for data flow from bond streaming service
#ifndef BONDSTREAMINGHISTORICALD... |
3e8bd648a657ce6930702ae07a7d60457f4a1bab | 1b1fd7cf8129c8d6491e60d72517b5b0c55ef9f2 | stonezk/Thinputer3D_ReadBack | /VirtualBox-5.0.12-Thinputer/src/VBox/ValidationKit/utils/cpu/cpu-alloc-all-mem.cpp | C++ | cpp | 6,823 | no_license | /* $Id: cpu-alloc-all-mem.cpp $ */
/** @file
* Allocate all memory we can get and then quit.
*/
/*
* Copyright (C) 2011-2015 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/... |
f92efc0352d447f4c5a9c564431d9a512231100f | 868ab94478c9e89b27040259a7486725c1155d7f | MarcSeebold/libclangmm | /tests/TranslationUnit_Test.cc | C++ | cc | 507 | permissive | #include <boost/test/unit_test.hpp>
#include "clangmm.h"
#include <string>
#include <map>
BOOST_AUTO_TEST_CASE(translation_unit) {
std::string path("./case/main.cpp");
clang::Index index(0, 0);
clang::TranslationUnit tu(index, path, {});
std::string buffer = "int main(int argc, char *argv[]) {\n"
... |
184508b1a371bc1cff819c91f2de42864f0bfa5b | a52d3c181c17cd7bf5b7cb6faa0899983bce1b13 | byte4byte/cloudretro | /content/public/browser/browser_message_filter.cc | C++ | cc | 6,782 | 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 "content/public/browser/browser_message_filter.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
#incl... |
cc21e9828896b408df7f1690ff98bd3b8c84c2ac | a181933ae000045e9ce2d90557ffe7dca86d6bc3 | d953i/beam | /ui/viewmodel/atomic_swap/swap_tx_object.cpp | C++ | cpp | 20,956 | permissive | // Copyright 2019 The Beam Team
//
// 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... |
a0eb56421b0ee88106d1367b52eaf3c50f1e94fa | 97979fd179bef9124274d6be2813f46789d4a7be | IMoney/IMoney | /src/init.cpp | C++ | cpp | 29,131 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 Litecoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "db.h"
#include "walletdb.h... |
6d9774b30f2c90dd939866cfc07b461d6d4dbdc9 | da77f600a71f7b96bd09b2a62e6fd538e24b745b | Lucretia/mesa-amdgpu | /src/gallium/drivers/swr/rasterizer/jitter/builder_misc.cpp | C++ | cpp | 54,092 | no_license | /****************************************************************************
* Copyright (C) 2014-2015 Intel Corporation. All Rights Reserved.
*
* 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 Soft... |
760b97725ced45569fc23ecc57a2725d4e663851 | f90a7705ed1086208d3999c082a8edc370cb84f5 | korallin/kubo | /deps/taintSummary/SoundyAliasAnalysis/src/PointsToUtils.cpp | C++ | cpp | 7,541 | no_license | //
// Created by machiry on 12/6/16.
//
#include "PointsToUtils.h"
using namespace llvm;
namespace DRCHECKER {
//#define DEBUG_FUNCTION_PTR_ALIASING
std::set<PointerPointsTo*>* PointsToUtils::getPointsToObjects(GlobalState &currState,
std::vector... |
122083c5af3ca6271385f097dfeacbfe18ac419e | 31b53e335bf947122149dca08322dc7dd7205bf1 | Saptaparna/PFCal | /PFCalEE/userlib/src/HGCSSDetector.cc | C++ | cc | 5,894 | no_license | #include "HGCSSDetector.hh"
#include <iostream>
HGCSSDetector & theDetector(){
static HGCSSDetector lDet;
static bool firstDet=true;
if (firstDet) std::cout << " -- Created detector static object." << std::endl;
firstDet=false;
return lDet;
}
void HGCSSDetector::buildDetector(const unsigned versionNumber,
... |
3a51ca9e759447627e6ee922487d4331c16696c5 | 9ef5b239e169f1ba66602a037e6e4431ff6e2fb1 | EugenySychev/wordschart | /main.cpp | C++ | cpp | 734 | no_license | #include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QTranslator>
#include <chartadapt.h>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QQmlApplicationEngine engine;
const QUrl url(QStringLiteral("qrc:/main.qml"));
QObject::connect(&engine, &QQml... |
d4d94ffb4cee0a0af76c7922686d3ea8316ef579 | 6830d449ec8701c36aa9384947040ee13355f25a | sumiokajiwara2017/skyencppgamelib | /SkyBaseLib/thread/worker/WorkQueue.cpp | C++ | cpp | 1,295 | no_license | #include "StdAfx.h"
#include "SkyBaseLib/Thread.h"
namespace sky { namespace lib { namespace thread {
CWorkQueue::~CWorkQueue()
{
CriticalSection::Delete( m_pCs );
}
void CWorkQueue::IncThreadCount()
{
m_ThreadNum++;
}
void CWorkQueue::DecThreadCount()
{
m_ThreadNum--;
}
u32 CWorkQueue::GetThreadCount()
{
ret... |
ca68e0e8579d51a51be760a73924461985053463 | 129d448adb63f8a45b71dd9ec06687969c2145d8 | Naooki/stroustrup_ppp_exercises | /Chapter-18/ex 08.cpp | C++ | cpp | 1,578 | no_license | //is palindrome(using a backward copy)
#include <iostream>
#include <string>
using namespace std;
bool is_palindrome(const string& str)
{
string copy = "";
for (int i = str.length() - 1; i >= 0; --i)
copy.push_back(str[i]);
return copy == str;
}
bool is_palindrome(const char str[], int n)
{
int f... |
03aa3a4112fc14f52154e5d55bd18519ccafed48 | d8d9ba81aa738d529e8d3d10e6bd9db512d38718 | strbum/webkit | /Source/WebKit/UIProcess/API/C/WKPreferences.cpp | C++ | cpp | 70,662 | no_license | /*
* Copyright (C) 2010-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditi... |
358ec6f1fd4df31fb03d775fcc4160a847dfca60 | 703018a2544fdaaa494bf56825e87dfabf3ae9ee | wizzie2/iPlug2 | /IPlug/IPlugParameter.cpp | C++ | cpp | 11,381 | permissive | /*
==============================================================================
This file is part of the iPlug 2 library. Copyright (C) the iPlug 2 developers.
See LICENSE.txt for more info.
==============================================================================
*/
/**
* @file
* @brief IParam implem... |
6d5eb3c84c4f27e537c62eaae8f2b2b14035b06e | 713445550354700793e93a8320efcb5e23089add | Riverside-City-College-Computer-Science/CSC17a_Spring_2014_42448 | /dm2229351/9-4/9-4.cpp | C++ | cpp | 2,275 | no_license |
#include <cstdlib>
#include <ctime>
#include <iostream>
using namespace std;
float mean(int *,int);
void sort(int [], string [], int);
/*
*
*/
int main(int argc, char** argv) {
//get desired array size
cout << "Please enter array size:\n";
int size;
cin >> size;
cout << "You entered " << siz... |
c97f6a36d58f886c7013a875ab3e76e8dcf82ee2 | 4d3231d61601803b02cdcc466366be54a49a549a | DerangedMonkeyNinja/pistache | /src/server/endpoint.cc | C++ | cc | 8,163 | permissive | /* endpoint.cc
Mathieu Stefani, 22 janvier 2016
Implementation of the http endpoint
*/
#include <pistache/config.h>
#include <pistache/endpoint.h>
#include <pistache/peer.h>
#include <pistache/tcp.h>
#include <array>
#include <chrono>
namespace Pistache::Http
{
class TransportImpl : public Tcp::Transport... |
5354de3ed931c90e41a3a4de85aa687f95105665 | b9b5d6b9b00930ce98461ca8ea138bfb67d65286 | jtlai0921/PG20153_solve | /pg20153 (C++教學手冊) 單數習題參考答案/ch11/hw11_21.cpp | C++ | cpp | 788 | no_license | //hw11_21
#include <iostream>
#include <cstdlib>
using namespace std;
class CWin
{
private:
int width;
int height;
public:
void show_area(void)
{
cout << "Area= " << width*height << endl;
}
int set_data(int w,int h)
{
if(w>0 && h... |
88289a5c051224a6dd9c1b0bd7069e051442d75a | 3b0a7db5fedad9c0346e8a7d059844dcc17aafc6 | blockspacer/dormouse-engine | /src/foundation/logger/src/main/c++/dormouse-engine/logger.hpp | C++ | hpp | 316 | permissive | #ifndef DORMOUSEENGINE_LOGGER_HPP_
#define DORMOUSEENGINE_LOGGER_HPP_
#include "logger/LoggerFactory.hpp"
#include "logger/macros.hpp"
namespace dormouse_engine {
using namespace dormouse_engine::logger; // TODO: specify things to import!
} // namespace dormouse_engine
#endif /* DORMOUSEENGINE_LOGGER_HPP_ */
|
d90d3606b18979b74d04dd003f75a2760926be8e | c398dcce26c2c9dc558878bd8be34444777cca01 | water2004/24-points-GUI | /24-points-GUI/mainwindow.cpp | C++ | cpp | 5,327 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->radioButton_2->setChecked(true);
ui->label->setText("?");
ui->label_2->setText("?");
ui->label_3->setText("?");
ui->label_4-... |
4b695a8c63324ec21d81d581c439ad645989dea5 | 9fc23bcac46cc8ca441f878c1aeff54e31918a08 | StilesGao/slam_Basic_exercise | /5/L5/code/E2Rt.cpp | C++ | cpp | 1,868 | no_license | //
// Created by 高翔 on 2017/12/19.
// 本程序演示如何从Essential矩阵计算R,t
//
#include <Eigen/Core>
#include <Eigen/Dense>
#include <Eigen/Geometry>
using namespace Eigen;
#include <sophus/so3.h>
#include <iostream>
using namespace std;
int main(int argc, char **argv) {
// 给定Essential矩阵
Matrix3d E;
E << -0.02036... |
88eaa611749f5b50b555e90defd34650af95cbff | bca495c5cfc6750ae6342e7e2e6ff27d66da5277 | ballet-e/cpp_arcade | /games/libmaze/Maze/Maze.hh | C++ | hh | 1,647 | no_license | //
// Maze.hh for cpp_arcade in /home/vicky/Bureau/EPITECH/tek2-2/C++/cpp_arcade/games/libmaze/Maze
//
// Made by Victorien Fischer
// Login <victorien.fischer@epitech.eu>
//
// Started on Wed Apr 5 13:19:08 2017 Victorien Fischer
// Last update Sun Apr 9 16:36:33 2017 Victorien Fischer
//
#ifndef __MAZE_HH__
#... |
9b206a7a1af547afd0e29d2b779ca3eb906d021b | d4f163498f4a8f8a092556510459ecae559720b6 | JohnnyHendriks/TestAdapter_Catch2 | /ReferenceTests_v3/src/tests/Catch_Duplicates/UT_SameTestNames.cpp | C++ | cpp | 1,136 | permissive | /** Basic Info **
Copyright: 2018 Johnny Hendriks
Author : Johnny Hendriks
Year : 2018
Project: VSTestAdapter for Catch2
Licence: MIT
Notes: None
** Basic Info **/
/************
* Includes *
************/
// Catch2
#include <catch2/catch_test_macros.hpp>
/**************
* Start code *
**************/
nam... |
581fd68204a81d8945fdd19034d03c1ab93bf59e | 5a8c419a406465953454d683cf3fde1e6406b07b | Syedosiz/Jppo | /src/rpcwallet.cpp | C++ | cpp | 55,073 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp>
#include "wallet.h"
#include "walletdb.h"
#include... |
f694eedf7daf96c6b3a54657b84ab7746d3cd947 | efd8435aac4b7dc311de791450ba59ff8e1bfbb8 | pipemfin/CPP_modules | /Module03/ex03/NinjaTrap.hpp | C++ | hpp | 486 | no_license | #ifndef NINJATRAP_HPP
#define NINJATRAP_HPP
#include "ClapTrap.hpp"
#include "FragTrap.hpp"
#include "ScavTrap.hpp"
class NinjaTrap : public ClapTrap
{
private:
NinjaTrap();
public:
NinjaTrap(std::string name);
NinjaTrap(const NinjaTrap &ninjatrap);
NinjaTrap &operator=(const NinjaTrap &ninjatrap);
void ninjaSh... |
1793a0b18c2168e96258e8ee31364d519f11c0c0 | 88c8aa822d62d2e4a34ec3d67877ce3ce7c79ae7 | denys-popov/metagate | /src/StopApplication.cpp | C++ | cpp | 6,979 | no_license | #include "StopApplication.h"
#include <QStandardPaths>
#include <QApplication>
#include <QProcess>
#include <QFile>
#include <QDir>
#include "uploader.h"
#include "utils.h"
#include "check.h"
#include "Log.h"
#include "Paths.h"
#include <iostream>
#ifdef TARGET_WINDOWS
#include <shlobj.h>
#include <shlwapi.h>
#in... |
43259027e00459050c69155ae5669dfbf28f78ff | ed06a81277bdccf6e56461b5a776f318ab2d25a9 | McStasMcXtrace/NJOY21 | /src/njoy21/input/PLOTR/Card12.hpp | C++ | hpp | 372 | permissive | class Card12 {
public:
#include "njoy21/input/PLOTR/Card12/Nform.hpp"
Argument< Nform > nform;
template< typename Char >
Card12 ( iRecordStream< Char >& is )
try:
nform( argument::extract< Nform >( is ) )
{
Card::clear( is );
}
catch( std::exception& e ){
Log::info( "Tr... |
211025c8077002d43d538fe70c44ae6a2ae42f5d | 350a46dee8e824b2fc31de831a471e4c6d05bc27 | codebysumit/Cpp-Playground | /10-Backtracking/02-N-Queen Problem.cpp | C++ | cpp | 1,186 | no_license | #include<iostream>
using namespace std;
bool isSafe(int** arr, int x, int y, int n){
for (int row = 0; row < x; row++) {
if(arr[row][y]==1){
return false;
}
}
int row=x;
int col=y;
while(row>=0&&col>=0){
if(arr[row][col]==1){
return false;
}
row--;
col--;
}
row... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.