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 |
|---|---|---|---|---|---|---|---|---|
29ed10f7118b4506d5ecc16a81b6fc764ac93012 | b2f46baaf1e9d6e3cd9190a9319df4922d7ebe49 | hemmond/SeriousProton | /src/scriptInterfaceMagic.cpp | C++ | cpp | 3,424 | permissive | #include "scriptInterfaceMagic.h"
ScriptClassInfo* scriptClassInfoList;
static string getObjectClassNameRecursive(P<PObject> object, ScriptClassInfo* info)
{
if (info->check_function && info->check_function(object))
{
for(unsigned int n=0; n<info->child_classes.size(); n++)
{
stri... |
8da38290f8be5c0a3d70228307b275c68b04e6f5 | 88b5cb72c8d4b89f9dd51116c714d055d1d3d7cd | walte/resourcerepo | /Think_in_C++/code/C21/Manipulations.cpp | C++ | cpp | 2,698 | no_license | //: C21:Manipulations.cpp
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 1999
// Copyright notice in Copyright.txt
// Shows basic manipulations
#include "PrintSequence.h"
#include "NString.h"
#include "Generators.h"
#include <vector>
#include <strin... |
a8145f8cdbb079acd7b802afec781c5942d37d6c | 4ebcb02e0941121f42aef660218e46931d0a0b74 | genzj/qt-cpp-course | /ch07-thread/p01-long-run-task/mainwindow.cpp | C++ | cpp | 631 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QTime>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void sleep(int sec)
{
QTime dieTime= QTime::currentTime().addSecs(sec);
w... |
57621849fb3a31f26b878e0ea417f24cdcd9af77 | 1f9bb693e3c96e44ddd56c1994a221378daf278d | oshunter/fuchsia | /src/ui/lib/escher/escher.cc | C++ | cc | 13,878 | permissive | // Copyright 2016 The Fuchsia 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 "src/ui/lib/escher/escher.h"
#include "src/ui/lib/escher/defaults/default_shader_program_factory.h"
#include "src/ui/lib/escher/impl/command_buff... |
604411694f4e3f3a44c424a36081a75d5a1e3d68 | e6f57421458f18ef59e93cf4fdd858b31066247f | EchoQian/PhoebeM | /LINUX/android/bionic/libc/bionic/pathconf.cpp | C++ | cpp | 3,861 | permissive | /*
* Copyright (C) 2008 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, t... |
70f89ffcd7e10cdb12981b6675e4506b485341c2 | 1d5c3341d97a8a503ff2c16635ab9fe97f47b296 | PerNilsson360/ydb | /NetconfException.cc | C++ | cc | 4,389 | no_license | #include "NetconfException.hh"
using namespace xercesc;
#include "DomUtils.hh"
#include "NetconfIdentities.hh"
// NetconfException
xercesc::DOMNode*
NetconfException::createRpcReply(xercesc::DOMDocument* document,
xercesc::DOMNode* rpc) const
{
DOMNode* reply = document->importNode(rpc, false);
document... |
e945565c52a621ed0c41bfbf2d19084d29d392c7 | feee643f26b9ee0414432a787d9c275737a5adfd | mzumsande/bitcoin | /src/wallet/rpc/spend.cpp | C++ | cpp | 103,570 | permissive | // Copyright (c) 2011-2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <consensus/validation.h>
#include <core_io.h>
#include <key_io.h>
#include <policy/policy.h>
#include <rpc/rawtransa... |
79bc2304b4bd0327dd8c12c69d3c2fb5704d0f39 | 749215c108d0d48ec7687ae8a0142279d2c63121 | mcomsa/ado | /src/include/ado.tab.hpp | C++ | hpp | 16,625 | permissive | // A Bison parser, made by GNU Bison 3.0.4.
// Skeleton interface for Bison LALR(1) parsers in C++
// Copyright (C) 2002-2015 Free Software Foundation, Inc.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Soft... |
ee400d00898fa973431558864f5e6e6fade94325 | ab97c2ae9d2ab6a27fb481d669f55fdffb03bb13 | toastynerd/UW_cpp_qtr3_assign_3 | /CppUnitLite/BitMapAssign3Test.cpp | C++ | cpp | 4,004 | no_license | #include <iostream>
#include <fstream>
#include "TestHarness.h"
#include "../Binary.h"
#include "../WindowsBitmapHeader.h"
#include "../Color.h"
#include "../Bitmap.h"
#include <sstream>
TEST(Byte_Functionality, Byte)
{
Binary::Byte byte1;
CHECK_EQUAL(byte1, 'a');
Binary::Byte byte2(byte1);
C... |
4c26d39e830abb38a7fa05c786d956d66718de3e | 235bd799b8f097b36379ed678e023d6a02cbd189 | swimfish09/quiche | /quic/core/qpack/qpack_encoder_stream_receiver_test.cc | C++ | cc | 7,881 | permissive | // Copyright (c) 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/third_party/quiche/src/quic/core/qpack/qpack_encoder_stream_receiver.h"
#include "absl/strings/string_view.h"
#include "net/third_party... |
1667ddd43e221795cf29eb901bb6dfdbd56085af | 66d52783ff70baa26d4b1ac815eb568c6dcd330e | csheare/2D | /projects/3/tracker/engine.cpp | C++ | cpp | 3,312 | no_license | #include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <random>
#include <iomanip>
#include "sprite.h"
#include "multisprite.h"
#include "twowaysprite.h"
#include "gamedata.h"
#include "engine.h"
#include "frameGenerator.h"
Engine::~Engine() {
for(auto d : sprites){
delete d;
}
... |
92063fea4477f76cadd2473f1ec09fc8b388cc98 | 2444eadff11ef14e590fec1851ef9725db4e67b8 | TsvetelinaChakarova/Yu-Gi-Oh | /MagicCard.hpp | C++ | hpp | 498 | no_license | /*
@author Tsvetelina Chakarova
@compiler VC
*/
#pragma once
#include "Card.hpp"
enum Type
{
trap,
buff,
spell,
};
class MagicCard : virtual public Card {
public:
MagicCard(string name, string effect, unsigned int rarity, Type type);
Type getType() const;
void print() const;
Card* c... |
103f82d0a3862545ba4110a01f4f5e3413232ad5 | 3a0edea380e243433b87a9d0c4496535f5cc9200 | YannGarcia/repo | /dev/g++/projects/ttcn3/internal_tri/src/tri_qualified_name.cpp | C++ | cpp | 1,063 | permissive | /**
* @file tri_qualified_name.cpp
* @brief Implementation file for the tri qualified name (e.g. module_name.component_name).
* @author garciay.yann@gmail.com
* @copyright Copyright (c) 2015 ygarcia. All rights reserved
* @license This project is released under the MIT License
* @version 0.1
* @see ETSI ES ... |
89564105b264624f2e91ae0f7f6a64db657c6f93 | eabf754c0de7563c27578ff8bf25508cb9cad8f6 | jie104/learngit | /货架腿识别/rack_detector/src/cluster_rack_detection/rectangle_detector.hpp | C++ | hpp | 2,560 | no_license | //
// Created by lfc on 2023/1/3.
//
#ifndef RACK_DETECTOR_RECTANGLE_DETECTOR_HPP
#define RACK_DETECTOR_RECTANGLE_DETECTOR_HPP
#include "triangle_detecor.hpp"
namespace rack_detection{
struct RectangleInfo{
std::vector<TriangleInfo_Ptr> triangles;
Eigen::Vector2f direction;
Eigen::Vector2f mean;
float ... |
0cae846a866a1676a9f414e7b75c3ab95afd4bc1 | 305a1ca0f316ea5f04afb9674246cdadfa97e502 | iwiwi/programming-contests | /topcoder/srm523/AlphabetPaths.cpp | C++ | cpp | 3,719 | no_license | #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
#include <bitset>
using namespace std;
#define al... |
e98a446387d46f72814b789090316b04cabe32ad | a2b2c5ebb496ae5efbad4aabd50eb9f2d9e90aa6 | kokihoon/algorithm | /2698_c++.cpp | C++ | cpp | 532 | no_license | #include <iostream>
using namespace std;
int main() {
int num[101][101][2];
int count;
num[1][0][0] = 1;
num[1][0][1] = 1;
for(int i = 2; i < 101; i++) {
for(int j = 0; j < i; j++) {
num[i][j][0] = num[i-1][j][0] + num[i-1][j][1];
num[i][j][1] = num[i-1][j][0] + ((... |
ff9c4d838aa24c1f61d2c7c2a70470bf761010ab | 6a110e02c034f69a9310bcc66c89fb045b4c3ab2 | salomaoluiz/UriOnlineJudge | /Iniciante/1021/C++/main.cpp | C++ | cpp | 1,131 | no_license | #include <iostream>
using namespace std;
int
main ()
{
//Define Variaveis
int inteiro, aux, aux1;
double N;
//Realiza Calculo
cin >> N;
inteiro = N;
N *= 100;
aux1 = N;
cout << "NOTAS:" <<endl;
cout << inteiro / 100 << " nota(s) de R$ 100.00" << endl;
aux = inteiro % 10... |
237dc89679e1aa2418b12df1ba54d27ecba0d771 | dbb5557e10d9bcff545f14f07082e390956b223e | hedgepigdaniel/electron | /shell/common/api/atom_api_shell.cc | C++ | cc | 5,691 | permissive | // Copyright (c) 2013 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include <string>
#include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_converters/gurl_c... |
2c46036dabdc48539ba2d3574a5d836244cd6c91 | 3a50cfd9f161f17b7d519bb9c0869f5751709928 | dongxiao92/ZenDNN | /src/cpu/ref_binary.hpp | C++ | hpp | 3,656 | permissive | /*******************************************************************************
* Modifications Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
* Notified per clause 4(b) of the license.
*******************************************************************************/
/***************************... |
906230f5d8d20e05dd3d6617d7ef04e81a9089e5 | aa5df1890632edd281564e983445ae4a26719d29 | jiahaoChen/leetcode | /CPlusPlus/189.RotateArray.cpp | C++ | cpp | 261 | no_license | class Solution {
public:
void rotate(vector<int>& nums, int k) {
int n = nums.size();
vector<int> tmp;
tmp.assign(nums.begin(), nums.end());
for (int i = 0; i < n; ++i) {
nums[(i+k)%n] = tmp[i];
}
}
}; |
d4b9c1860221cafd0d87c5976cf9c18e39aa4f34 | 197f601075db540d148160eae479e0449fea87f0 | vaibhavait04/Patterns | /GOFPatterns/Iterator_003.cpp | C++ | cpp | 1,648 | no_license | // Purpose. Iterator using the Java interface
//
// Discussion. Java's standard collection classes have a much leaner inter-
// face. Their next() methods combine the next() and currentItem() methods.
#include <iostream>
using namespace std;
class Stack {
int items[10];
int sp;
public:
friend class StackI... |
910833902f24ea3587df8de0db1d0c4ca6ad8d9f | 7f66ea073533fadf50ff9e2096a433ef018f876a | sowson/clBLAS | /src/library/blas/AutoGemm/UserGemmKernelSources/sgemm_Col_NT_B0_MX096_NX096_KX16_src.cpp | C++ | cpp | 6,429 | permissive | /*******************************************************************************
* Hand-tuned kernel
******************************************************************************/
#ifndef KERNEL_SGEMM_COL_NT_B0_MX096_NX096_KX16_SRC_H
#define KERNEL_SGEMM_COL_NT_B0_MX096_NX096_KX16_SRC_H
// #pragma message("AutoGemm... |
cba14cb1798f8945f7a7bd3d35bb616d9764bab7 | fe7a77f2d9458393fdc80fade054832c29a4a5f0 | Montzter/Montz_Thesis_GUI_Files | /Thesis_GUI_Montz/mainwindow.cpp | C++ | cpp | 129,084 | no_license | #include "mainwindow.h"
#include "dialog.h"
#include "ui_mainwindow.h"
#include <QString>
#include <QtWidgets>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <math.h>
#include <QFileDialog>
#include "colorkey.h"
//MainWindow constructor
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
... |
66e0e779413f4f478171aa244d8030d8de44fc38 | 5e4a242ee79e1235246085cec909cf8998abc7a2 | phoenix76/final_project | /calculate_v_1.01/calculate_v_1.01/WinForm.cpp | C++ | cpp | 11,751 | no_license | #include "WinForm.h"
void cWinForm::Run()
{
MSG msg;
while(GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
UnregisterClass("Calculator", m_hInstance);
DestroyWindow(m_mainWnd);
}
bool cWinForm::Initialize()
{
m_mainWnd = NULL;
for(short count = 0; count < 21; count++)
m_b... |
00dd2a4e055c25d39a9572563b3df522527ad824 | 942d9302212955e4d9c7b84bc75b9dade434f0c2 | casterbn/Qt_project | /006-All_Test_Demo/DaemonProcess/main.cpp | C++ | cpp | 209 | no_license | #include <QCoreApplication>
#include "mydaemon.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
MyDaemon tmpMyDaemon;
tmpMyDaemon.startExternProcess();
return a.exec();
}
|
fe3c5a4a3fe3301caf665224f5c7152cecdffb4d | 098925865211716d15ff211294de5282127409ea | redcapital/algo | /timus/1083.cpp | C++ | cpp | 235 | no_license | #include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int n, k = 0, s = 0;
cin >> n;
char c;
while (cin >> c) ++k;
for (s = n, n -= k; n > 0; n -= k) s *= n ;
cout << s << endl;
return 0;
}
|
b6eb863c3959c17e03e13f5d7377e04842804a0c | 2aec6a0829ce211670fda5cf60830c3c34a0d085 | SymbianSource/oss.FCL.sf.mw.classicui | /classicui_plat/extended_lists_api/tsrc/src/testdomlistscontainer.cpp | C++ | cpp | 3,951 | no_license | /*
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.h... |
09f5bdc29f4af986993d54a9be5ba110cd4615df | 56c86169336d80221670078aa4ff90cfc78928b5 | DataYI/cplusplus | /OJ/acm.hdu.edu.cn/1001.cpp | C++ | cpp | 423 | permissive | #include <vector>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define SC(x) scanf("%d", &x)
typedef long long LL;
using namespace std;
//#define JUDGE_MOD
int main() {
#ifdef JUDGE_MOD
freopen("data.in",... |
63f939f7304a9c7346faab57e298362f785b258e | bc7d8103e7c68793c51d847265f16e691053c5d2 | RobertoOropezaG/ia_ciega | /demos/cantaros.cpp | C++ | cpp | 4,352 | permissive | /* Resuelve el problema de los cántaros:
Se tienen dos cántaros, no aforados (sin marcas de medición),
El cántaro A tiene 3 litros de capacidad, y B 4 litros. Tambien hay una pila abierta, y vale mojar el piso.
Al principio ambos cántaros estan vacíos.
Hay que llenar el cantaro B con exactamente 2 l... |
0deeaa74fc2588389ceb3bb7efeab34b3721140f | cbb7dded9505e760e09ada818a268b9a53116d0b | etchalon/webasm | /source/core/directive/ALImportDirective.cc | C++ | cc | 7,046 | no_license | //
// $Id: ALImportDirective.cc 160 2010-12-06 22:07:33Z brian $
// Web Assembler
//
// Copyright (c) 2009 Wolter Group New York, Inc., All rights reserved.
//
// This software ("WGNY Software") is supplied to you by Wolter Group New York
// ("WGNY") in consideration of your acceptance of the terms of the Agreement
... |
b76858b2c08ff8a52e5101fc215b907c57e137de | 1c66ba1ebc8702b8b1676eb371696861da80a4ce | jstavr/Architecture-Relation-Evaluator | /Replication/DataFileSystem/PRODUCT_SOURCE_CODE/itk/Modules/Core/Common/test/itkThreadLoggerTest.cxx | C++ | cxx | 7,308 | no_license | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* ... |
96d50001b4492d9da7fdb1f1f458ebb9a5c83281 | 2c79e1e5c4b2ce43a1f6d25581269e7ff47b6fd5 | GRMaverick/University | /Year2/FGGC/FGGC_PhysicsLibraryDLL/ComponentsDll/Quaternion.cpp | C++ | cpp | 1,292 | no_license | #include "stdafx.h"
#include "Quaternion.h"
#include <stdexcept>
Quaternion Quaternion::operator+(Quaternion second){
return Quaternion(this->x + second.x, this->y + second.y, this->z + second.z, this->w + second.w);
}
Quaternion Quaternion::operator-(Quaternion second){
return Quaternion(this->x - second.x, this->y... |
6ad88a4f224a655566a914c3d2eb0c1d42e6c7e6 | d2321a5adcd518c12ea46b813eb04175251508c3 | wjdminjoo/project | /Player.hpp | C++ | hpp | 895 | no_license | //
// Player.hpp
// PacMan
//
// Created by MinJu Jeong on 2018. 10. 6..
// Copyright © 2018년 MinJu Jeong. All rights reserved.
//
#ifndef Player_hpp
#define Player_hpp
#include <stdio.h>
#include "arrayMap.hpp"
#include "getkey.cpp"
const int RIGHT = 77;
const int LEFT = 75;
const int UP = 72;
const int DOWN = ... |
95f387c7a03df92b1b260601c46c0972707043bb | fc3df10c0f6473a2503d0c7cb5dd73b92f142842 | mikedn/runtime | /src/coreclr/vm/exstate.cpp | C++ | cpp | 15,914 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
//
//
#include "common.h"
#include "exstate.h"
#include "exinfo.h"
#ifdef _DEBUG
#include "comutilnative.h" // for assertions only
#endif
OBJECTHANDLE ThreadExceptionState::... |
7c99044b1ca80c71f286fb5429910a0e3920138e | 7c79d99d406ab78d7872eab09a6eb4cd23394f0a | ThiuT/Projet_Synthese | /sandbox/TestMob/Weapon.hpp | C++ | hpp | 387 | no_license | #ifndef WEAPON_HPP_INCLUDED
#define WEAPON_HPP_INCLUDED
#include "DynamicElement.hpp"
#include "Mob.hpp"
class Weapon : public DynamicElement
{
public:
Weapon(Mob*);
bool IsDone();
~Weapon();
protected:
Mob* user;
int timer;
b2PrismaticJoint* joint;
... |
231c6a87f22284ea900125ea101a068d28adb1f3 | 0723d4393d5dbb563f10859cc361879671c38f98 | AlekseyLebedev/CompilerTheory | /MiniJavaCompiler/AbstractTreeGenerator/FirstTaskMain.cpp | C++ | cpp | 1,233 | no_license | #include "AbstractTreeGeneratorMain.h"
#include "GraphvizLauncher.h"
#include "INode.h"
#include "CompoundStatement.h"
#include "AssignStatement.h"
#include "OperationExpression.h"
#include "NumExpression.h"
#include "PrintStatement.h"
#include "LastExpressionList.h"
#include "IdExpression.h"
#include <memory>
void ... |
0e96f563bccec49f15734d332c7d8626fbb9cc2f | 5098754e99b63ff40dfb29b5db0de2a752c041d4 | startergate-learns-stuff/Learn-CPP | /src04092.cpp | C++ | cpp | 672 | no_license | #include "stdafx.h"
#include <iostream>
using namespace std;
class CIntArray {
public:
CIntArray(int nSize) {
pndata = new int[nSize];
memset(pndata, 0, sizeof(int) * nSize);
}
~CIntArray() { delete pndata; }
int operator[](int index) const {
cout << "operator[] const" << endl;
return pndata[index];
}
... |
3cd165e2ab06cdd6febf344f93711d6ec7e6c017 | 268c9883665ff6cc15d349d06b2e088c4c80380d | kanghuiseon/algorithms | /baekjoon/실버/1389+케빈베이컨의6단계법칙.cpp | C++ | cpp | 1,221 | no_license | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <cstring>
#define MAX_INDEX 101
#define MAX 101
using namespace std;
int n, m;
int arr[MAX_INDEX][MAX_INDEX];
int main(){
scanf("%d %d", &n, &m);
for(int i=1; i<=n; i++){
for(int j=1; j<=n; j++){
... |
b5211065244f967a6e420169355dde66cec41001 | 19123722da7c6d28d1e06155a1fc55be103b5d95 | JustLuoxi/Eightqueen | /eightqueen.cpp | C++ | cpp | 1,039 | no_license | //8 queen problem
//author: Just Luo
//date: 2016.9.28
//----------------------------
#include <iostream>
#include <vector>
using namespace std;
int count_; //store the number of right solutions
vector<unsigned char> posi; //store the whole position in each solution
void PrintBit(unsigned char A)
{
for ... |
88ed93aa2d9f0c64f3ba80f88b22b16e990683cc | 09710d931fd3a7b96b586af7f41ed101fb19cdc3 | mathemage/CompetitiveProgramming | /topcoder/SRM/SRM-643-DIV-2/1000/TheKingsTree.cc | C++ | cc | 1,313 | permissive | /* ========================================
* Points :
* Total :
* Status :
==========================================*/
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utilit... |
40f2fd4118b70648d592c2cbcbabaf6e0a6510cb | cb8b9d26b37aaca0f148e1e6ceda2856c6bf0eb3 | mbrukman/MirageRender | /src/core/scene.cpp | C++ | cpp | 2,461 | permissive | // std includes
#include <iostream>
#include <fstream>
#include <algorithm>
#include <regex>
#include <map>
// mirage includes
#include "scene.h"
#include "../macros.h"
#include "transform.h"
#include "../accelerators/kdtree.h"
#include "../cameras/orthographic.h"
#include "../cameras/perspective.h"
#include "light.h"... |
a3b257e723319daccf16ca2f05a1fe5e08bec218 | 7165f12921a637f2a5f01076f644fba57a1cd289 | jjzhang166/WinNT5_src_20201004 | /NT/com/oleutest/balls/client/tmarshal/tunk.cxx | C++ | cxx | 9,220 | no_license |
#include <windows.h>
#include <ole2.h>
#include <stdio.h>
#include <tunk.h>
CTestUnk::CTestUnk(void) : _cRefs(1)
{
}
CTestUnk::~CTestUnk(void)
{
}
STDMETHODIMP CTestUnk::QueryInterface(REFIID riid, LPVOID FAR* ppvObj)
{
HRESULT hRslt = S_OK;
if (IsEqualIID(riid, IID_IUnknown) ||
I... |
1f7bce733d13f3b6d0837a669679847c714e96a0 | e42f8ba849e3507e65b5b2451443e84dd8332974 | SYW23/Cpp_prog_probs | /Cpp_prog_probs/test1.cpp | C++ | cpp | 643 | no_license | // test1
// 给定一个英文字符串,请写一段代码找出这个字符串中首先出现三次的那个英文字符。
// 输入:一个字符串,含字母和数字
// 输出:首先出现三次的那个英文字符
# include <iostream>
# include <string>
# include "main.h"
using namespace std;
int test1()
{
string s;
getline(cin, s);
int characters[123] = {0};
for (unsigned int i = 0; i < s.length(); i++)
{
if ((s[i] <= 'Z' and s[i]... |
20e4589d5daf181dde5e2adbb930ca0a71b8fb44 | 0bd9a138d43799fcb80394adbd3fe8584d4ef294 | ChiliCoinProject/ChiliCoin | /src/qt/transactiondesc.cpp | C++ | cpp | 14,993 | 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-2018 The ChiliCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/license... |
1f7d0af52e5374e4fdbb9595bf96a36aabe58691 | 2c0c9eec230aec185d5cf7cdc7f809be86d43f47 | monicadivya/STARSSSS | /kinder.cpp | C++ | cpp | 2,907 | no_license | #include <iostream.h>
class Disk
{
public:
int value;
Disk* next;
};
class Tower
{
public:
int size;
Disk* current;
Tower()
{
size=0;
current=NULL;
}
int peep();
bool push(int);
bool pop();
bool isEmpty();
int getTowerSize();
void printTowerSize();
void printTowerDisks();
void printTowerMenu();
};
int Tower::p... |
ea1b94372757f55c8acc5d424a94c21f8182fd1f | e663292476b6410ac5839dc831712974f014095d | yongchix/jaea2015Dec | /src/core/Globals.cpp | C++ | cpp | 14,025 | no_license | /** \file Globals.cpp
* \brief constant parameters used in pixie16 analysis
* \author K. A. Miernik
*/
#include <iostream>
#include "Exceptions.hpp"
#include "Globals.hpp"
Globals* Globals::instance = NULL;
Globals::Globals() {
clockInSeconds_ = -1;
adcClockInSeconds_ = -1;
filterClockInSeconds_ = -1;... |
bbeba4e4bc592102f5f40fc77e77fd6091764005 | cfab277894436b70dec69eeaf574f6b9857568ed | libla/luaex-runtime | /encrypt/rc4.cpp | C++ | cpp | 4,847 | no_license | #define UTIL_CORE
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include "rc4.h"
#include "xxhash.h"
#include "md5.h"
#define N 624
#define M 397
#define twist(u, v) \
(((((u) & 0x80000000) | ((v) & 0x7fffffff)) >> 1) ^ ((v) & 0x01 ? 0x9908b0df : 0x00))
namespace external
{
class rc4key
{
static c... |
637e8fee14697521fbeeb934d9270b29f4e77249 | 92d2295fa94ae4e7e727de5efee4f0c7c82aba88 | NourhanEl-khodary/Genetics-Sequence | /Protein.cpp | C++ | cpp | 4,540 | no_license | ///Title: Protein Sequence CPP file
///Version: 3.0 (char*)
///Author1: Mira Mohamed (20170305)
///Author3: Nourhan Ihab (20170324)
///Date: 14/12/2018
///UnderSuper vision of: Dr. Mohamed Nassef
/// Dr. Mohamed El-Ramly
/// Eng. Sarah Hassan
/// En... |
60bc514cfdfae7dbd79dda262d1650ef8474dda2 | 6b75bc12cc415c9c1f628645c813d223f650ca55 | crmmc/CVE_2019_2025_EXP | /pwn.cpp | C++ | cpp | 10,092 | no_license | #include <stdio.h>
#include <pthread.h>
#include "pwn.h"
#include "cpu.h"
#include <sys/xattr.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/eventfd.h>
#include <sys/inotify.h>
#include <poll.h>
sp<IMediaPlayerService> getMediaPlayer();
sp<IMediaPlayer> mediaPlayer;
#define BAIT 1000
#define BUFF_SIZ... |
c85c6c15f1a63459a1fe79fbae8d31c8356705fe | 6a0378a509162486a38a7634c4c8c9916ef046ab | ankprogramming/week3-basic-cpp-YositaKongthaworn | /lab_3_5.cpp | C++ | cpp | 466 | no_license | #include <iostream>
using namespace std;
int main() {
int a = 8;
float b = 7.7;
char c = 'Z';
int cast1;
float cast2;
// comment here
cast1 = (int)b; // float ->> int
cast1 = (int)c;
cast1 = (int) 20.1;
cast2 = (float) a;
cast2 = (float) c;
cast2 = (float) 'T';
// กำหนดค่า ... |
a7a26669f8f6ce2f0df751a257314f6eacc61b71 | 6983b72f676f03296e395f995b21328449b5fbf8 | makers-mark/platform_system_core | /fs_mgr/fs_mgr_verity.cpp | C++ | cpp | 26,408 | permissive | /*
* Copyright (C) 2013 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... |
516dc228927a1955c6ed2dc74fdec013437a620e | 4286e639ad013bf60f0cd7a01712cd9193b1695b | 15831944/barry_dev | /src/DataCube/Jimos/DataCubeCtnr.cpp | C++ | cpp | 2,450 | no_license | ////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2005
// Packet Engineering, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification is not permitted unless authorized in writing by a duly
// appointed officer of ... |
e28640cd75cce5756683ca295ffe030bdc294199 | 79f03d6a5ee2d2a46f589415dc65ce8584a87a85 | EdgarPezoa/Proyects-C-plus-plus | /Recursion/main.cpp | C++ | cpp | 279 | no_license | #include <iostream>
using namespace std;
void recursion(){
cout << "Recursion";
recursion();
}
int factorial(int value){
if(value <=1){
return 1;
}
return value * factorial(value - 1);
}
int main()
{
//recursion();
cout << factorial(5);
}
|
d6b42e08efa33d399e2eca56c3f068de20b17109 | 1f9117721d45398eb78619bf5ceb21b8b2dbf62e | byon/myrrh | /myrrh/file/Eraser.hpp | C++ | hpp | 2,666 | permissive | // Copyright 2007 Marko Raatikainen.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
/**
* This file contains declaration and implementation of class
* myrrh::file::Eraser
*
* $Id: Eraser.hpp 286 20... |
f8860cce3cb3886ea989988ae4ee168a274e3ae1 | 6805f74fd66a54d390822893849a1ff8719e219a | stardog-union/boost | /libs/spirit/example/qi/compiler_tutorial/conjure3/expression.hpp | C++ | hpp | 2,436 | permissive | /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2001-2011 Hartmut Kaiser
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_... |
4928285cb51e6a094018c2d0f9118d1672b37c92 | 6d6e601ee6c4cb9fe955a67ae8cf9259630a3c2b | EB-Elder/NARGameEngineCPP | /MoteurCpp/MoteurCpp/Input.cpp | C++ | cpp | 655 | no_license | #include "Input.h"
// pour quitter la boucle : a ne pas utiliser dans une vraie application
#include <conio.h>
#include <iostream>
bool Input::Initialize()
{
#if defined(_DEBUG)
m_DebugName = "Input";
#endif
std::cout << "[Input] initialized\n";
return true;
}
void Input::DeInitialize()
{
std::c... |
4a71718f6bb57ce5573ca7e4981c7fd865ac9844 | a4ee4da04994d5014904abe44aed47f93b396539 | gunjan01/geeks-for-geeks | /count_even_substrings.cpp | C++ | cpp | 1,173 | no_license | #include <bits/stdc++.h>
using namespace std;
//O(n2) Generate all the substrings and individually check them.
int check_even(string s)
{
if((s[s.length()-1]-'0')%2==0) return 1;
else return 0;
}
int main() {
int t;
cin>>t;
string s;
while(t!=0)
{
cin>>s;
... |
0ba35d7547c131932ace3b1579d395fa7d8342ff | 36b5962dda002c1062fc10669b53a163710ba4e7 | maoxingda/qt-src | /src/gui/embedded/qkbdqnx_qws.cpp | C++ | cpp | 11,786 | no_license | /****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public L... |
576122772707a78bfdddc7b25dcbca03dc995ab8 | ca1f9fd01250447f01a61d49afbbd240fd0359c0 | P-Dhruv20/Graphing-Calculator | /header/add_test.hpp | C++ | hpp | 1,058 | no_license | #ifndef _ADD_TEST_HPP_
#define _ADD_TEST_HPP_
#include "gtest/gtest.h"
#include "mock_class.hpp"
#include "add.hpp"
#include "op.hpp"
TEST(AddTest, AddEvaluateNonZero){
Add* test = new Add(new Op(7.5), new Op(10.0));
EXPECT_EQ(test->evaluate(), 17.5);
}
TEST(AddTest, AddEvaluateZero){
Add* test = new Add(new Op(5... |
f547cd09fa9be91a8b75d886951e8f27220e705e | 14e96fc3867781e18025a6495d2c3c764e32a3a6 | G-Research/horovod | /horovod/common/ops/ccl_operations.cc | C++ | cc | 20,491 | permissive | // Copyright 2016 The TensorFlow Authors. All Rights Reserved.
// Modifications copyright (C) 2019 Uber Technologies, Inc.
// Modifications copyright (C) 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.
// Yo... |
dc32dd390e2319a82e56fe1175197c319a293961 | 8168a8cc75b4f31ff0df833889168872dde62292 | uabti/coolfluid3 | /cf3/mesh/LagrangeP1/Triag.cpp | C++ | cpp | 1,723 | no_license | // Copyright (C) 2010-2011 von Karman Institute for Fluid Dynamics, Belgium
//
// This software is distributed under the terms of the
// GNU Lesser General Public License version 3 (LGPLv3).
// See doc/lgpl.txt and doc/gpl.txt for the license text.
#include "common/Builder.hpp"
#include "mesh/ShapeFunctionT.hpp"
#inc... |
ad2a7790edcd772400036005b207c1f2b2e66201 | 3d375bbe5ef0796ff2a694ecc77e624d5df42793 | fermi-lat/OnboardFilter | /src/GammaFilterLibsB1-1-2.cxx | C++ | cxx | 8,488 | permissive | #include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include "GammaFilterLibsB1-1-2.h"
#include "GFC_DB/GFC_DB_V2_schema.h"
#include "GFC_DB/GAMMA_DB_instance.h"
GammaFilterLibsB1_1_2::GammaFilterLibsB1_1_2()
{
// Release for this setup
m_release = "B1-1-2";
// The Filter library name
... |
2cdd653962497f0f56cd2bcabf8d183cd4ffef6b | 517ba92a6c8744e20f8f518d80fe11f7ece28565 | liang0/chromium | /ash/components/audio/audio_devices_pref_handler_stub.cc | C++ | cc | 2,994 | permissive | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/components/audio/audio_devices_pref_handler_stub.h"
#include "ash/components/audio/audio_device.h"
#include "base/containers/contains.h... |
4ba39a4dda5810598e9d98dd9fea0133ab0ca7ef | f9cb582d166a657873391fc0322a44ef0ddfaec1 | gen1izh/cpp | /garbage/shadr/parse_file_with_magnitude/program/program/program.cpp | C++ | cpp | 1,050 | no_license | #include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int _tmain(int argc, _TCHAR* argv[]) {
if ( argc <= 1) {
cout<<"Incorrect params!";
return 0;
}
ifstream input_file(argv[1]);
if (!input_file) {
cout << "Cannot open fil... |
a25e5670d851c35fd7a994a77ef1fabb812cc5fe | 538bd1cfe03656f7c7a1d68b2fb94f4c3a51b3c4 | bademcurrency/badem | /badem/core_test/versioning.cpp | C++ | cpp | 1,139 | permissive | #include <gtest/gtest.h>
#include <badem/blockstore.hpp>
#include <badem/versioning.hpp>
TEST (versioning, account_info_v1)
{
auto file (rai::unique_path ());
rai::account account (1);
rai::open_block open (1, 2, 3, nullptr);
rai::account_info_v1 v1 (open.hash (), open.hash (), 3, 4);
{
auto error ... |
d2bde52128b3199bf98e9ca32313ea796f547261 | 4ffe593bb9c43d4030bead0712f12c5a85e4da24 | macsnoeren/smart-energy-token | /Firmware/TeamRED-hw-building/src/States/SleepState.cpp | C++ | cpp | 2,016 | no_license | #include "States/SleepState.h"
#include <avr/sleep.h>
#include "Settings.h"
#include "Statemachine.h"
void SleepState::on_init(Statemachine *statemachine, RF24 *radio, bool isBase)
{
_statemachine = statemachine;
_radio = radio;
_isBase = isBase;
}
void SleepState::on_start()
{
// init all variables t... |
84f36c7397286e41c11a34dfef6bca1ba48d7593 | 9a2bb3d2045582eb3e9c6c8e6579a96cbcd6a993 | goutomroy/uva.onlinejudge | /solved/11222.cpp | C++ | cpp | 2,630 | permissive | #include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
# define sz 20000
bool flag1[sz],flag2[sz],flag3[sz];
void main()
{
long a1[sz],a2[sz],a3[sz],b1[sz],b2[sz],b3[sz],t1,t2,t3,cas,p1,p2,p3,k,i,j,c,n;
scanf("%ld",&cas);
for(k=1;k<=cas;k++)
{
memset(flag1,0,sz);
memset(flag2,0,sz);
memset... |
171085ced5e24bad5743d70952babd9dab5144cc | 4aa68544fbc8fd352f7c8f2f3371a830d105cd15 | LevyForchh/llvm-project | /libcxx/test/libcxx/utilities/memory/util.dynamic.safety/get_pointer_safety_new_abi.pass.cpp | C++ | cpp | 1,187 | permissive | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
749fae6332cf4676dc8ebc6b36b8d3eebdfb7bdd | 40207c34b0c22896cb40135ab970f403344979b3 | aosyang/Graphic-Workbench | /Workbench/Utilities/EmdExporterMax2011/RootExporter.cpp | C++ | cpp | 4,668 | no_license | #include "RootExporter.h"
#include <IGame/IGame.h>
#include "../../libEmdMesh/EmdDefine.h"
RootExporter::RootExporter()
{
Reset();
}
RootExporter::~RootExporter()
{
}
void RootExporter::AddNode( IGameNode* gameNode )
{
switch ( gameNode->GetIGameObject()->GetIGameType() )
{
case IGameObject:... |
8494368cbcc7b15f744fa0bfff0b88e3fb14f9ca | 929ec59affa6f0651c486ab93d0578b11f0cfdbc | mhochsteger/blaze | /blazetest/src/mathtest/smatdmatmult/LCaLHb.cpp | C++ | cpp | 4,524 | permissive | //=================================================================================================
/*!
// \file src/mathtest/smatdmatmult/LCaLHb.cpp
// \brief Source file for the LCaLHb sparse matrix/dense matrix multiplication math test
//
// Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved
//
// Thi... |
2d32a49ee365c955747f9af58efe6b601f0b0304 | 6a428ffcaed595c7e618ffbf8f37ae2ba3307000 | syureyi/libvpx | /test/hadamard_test.cc | C++ | cc | 3,362 | no_license | /*
* Copyright (c) 2016 The WebM 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 in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributin... |
82832dbc9f8effc95e316f9540b062432c819ae6 | 97008f7b953b7ec3770c0a1b3c6756c011d914c6 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-awstransfer/source/model/UpdateHostKeyRequest.cpp | C++ | cpp | 1,149 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/awstransfer/model/UpdateHostKeyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Transfer::Model;
using namespace Aws::Utils::Json;
usi... |
25d63acee266dff81e7dace25cc00bad3ade9020 | 333eceba18b8643373085b1e66b4712e9addf13e | dwrrehman/cellular-automaton-game | /source/sandbox6/parameters.hpp | C++ | hpp | 623 | no_license | //
// parameters.hpp
// sandbox6
//
// Created by Daniel Rehman on 1902074.
// Copyright © 2019 Daniel Rehman. All rights reserved.
//
#ifndef parameters_hpp
#define parameters_hpp
#include <string>
#include <stdlib.h>
#include "structures.h"
extern const size_t width;
extern const size_t height;
extern const ... |
04bb6678b0a9bb75003e1fd58b188fd4a8818177 | 95e59687dcdeb86d8c269023f0f46461e3a1d03a | TrevisFields/CIS17AProgrammingSpring2017 | /Chapter 5 Examples/fig05_14/fig05_14/fig05_14.cpp | C++ | cpp | 412 | no_license | //Fig.5.14; fig05_14.cpp
//continue statement terminating an iteration of a for statement.
#include <iostream>
using namespace std;
int main()
{
//loop 10 times
for(int count = 1; count <= 10; ++count)
{
//if count is 5,
if(count == 5)
//skip remaining code in loop
continue;
cout << count ... |
17b04f844870e3cd6a2dc206a6237f94b42b5928 | 17839a418c5669348388501c70d105330f1e820b | jinzhu6/chiligeom | /samples/tags_pose/tags_pose.cpp | C++ | cpp | 5,927 | permissive | /*******************************************************************************
* Copyright 2013 EPFL *
* *
* This file is part of chiligeom. ... |
45d4128698de09ac793a948f1d9ca58c523d7b55 | d48cdfa65d9a24524b9a39253a25670b08747817 | yfisyak/star-sw | /StRoot/StEvent/StTriggerData2012.cxx | C++ | cxx | 52,460 | no_license | /***************************************************************************
*
* $Id: StTriggerData2012.cxx,v 2.4 2013/01/23 20:28:55 ullrich Exp $
*
* Author: Akio Ogawa,Nov 2011
***************************************************************************
*
* Description: Concrete implementation of StTriggerDat... |
aeeb3475cfb61ffe18d14c61bb991e4d46d2bf47 | ecc4fe4fdc375c7bf8321e1befde991d2ac1a6e7 | 201812300011/LQL | /第8周实验3.2/第8周实验3.2/第8周实验3.2.cpp | C++ | cpp | 4,813 | no_license |
// 第8周实验3.2.cpp : 定义应用程序的类行为。
//
#include "stdafx.h"
#include "afxwinappex.h"
#include "afxdialogex.h"
#include "第8周实验3.2.h"
#include "MainFrm.h"
#include "第8周实验3.2Doc.h"
#include "第8周实验3.2View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// C第8周实验32App
BEGIN_MESSAGE_MAP(C第8周实验32App, CWinApp... |
bbe77fbb92165c00c8708a511640ea298d5a5a32 | 966669536344fef933dda519bed1d3cf59604922 | PsymonLi/sw | /nic/apollo/agent/svc/nh.hpp | C++ | hpp | 2,039 | no_license | // {C} Copyright 2019 Pensando Systems Inc. All rights reserved
#ifndef __AGENT_SVC_Nexthop_HPP__
#define __AGENT_SVC_Nexthop_HPP__
#include "grpc++/grpc++.h"
#include "gen/proto/types.pb.h"
#include "gen/proto/meta/meta.pb.h"
#include "gen/proto/nh.grpc.pb.h"
#include "nic/apollo/api/include/pds_nexthop.hpp"
using ... |
96a97e24d8f3b02b5e38f5915c16f901796aeb10 | 4177bd55be5ec2917e1c28fdaf1b77f3556ee6f6 | mdheller/newsboat | /src/ttrssapi.cpp | C++ | cpp | 12,940 | permissive | #include "ttrssapi.h"
#include <algorithm>
#include <cinttypes>
#include <cstring>
#include <thread>
#include <time.h>
#include "3rd-party/json.hpp"
#include "logger.h"
#include "remoteapi.h"
#include "rss/feed.h"
#include "strprintf.h"
#include "utils.h"
using json = nlohmann::json;
namespace newsboat {
TtRssApi:... |
4dc3a13cad115d049047b72f07784fba4c7a3b6f | 6ef927e4d1394a5556cb350c61d2a632a4d6e332 | guyberger/QueensGA | /main.cpp | C++ | cpp | 9,050 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cassert>
#include <stdexcept>
#define DEPTH 2048 // Amount of genes in a single generation.
#define ITERATIONS 700 // Number of tries to find a solution.
#define ELITE 0.1 // The ... |
2d8e17fa72d63ef171ff615737386dcffed31cae | e748102c42b8249b60f5492bc7871799209bc409 | ren19890419/xqilla | /functions/FunctionLog.hpp | C++ | hpp | 1,134 | no_license | /*
* Copyright (c) 2004, 2011,
* Oracle and/or its affiliates. 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-... |
0c9cab29af107ae86a74d68d6df4a6f700ae401f | e3eabe15663d3ef0a582c34aebf108f7bc27fe89 | fxsheep/8910DM_LVGL | /prebuilts/linux/gcc-arm-none-eabi/arm-none-eabi/include/c++/7.2.1/ext/pb_ds/detail/binary_heap_/const_iterator.hpp | C++ | hpp | 4,477 | no_license | // -*- C++ -*-
// Copyright (C) 2005-2017 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either ve... |
01d444d142f3fd031030b565720da9586f09551f | 5d65e91b8c9887fddba4f5bd707be639f21aa3c3 | MorganYeung/Final-Project | /final.project.cpp | C++ | cpp | 18,617 | no_license | /*
This code is the one that was ran by the NXt that was attached to the car. Its main purpose is to drive the car and the arm attached.
It also communicated with the slave NXT through bluetooth and told it when to run the conveyer belts.
*/
#include "NXTServo-lib-UW.c" //Needed to control servo motors
struc... |
c28aff46a19f18f6313138deab2d1147c23db9aa | af5a269b32471cda657c9c6cdbbb544bee3acfea | hpgl/hpgl | /src/geo_bsd/hpgl/progress_reporter.cpp | C++ | cpp | 1,905 | permissive | #include "stdafx.h"
#include "progress_reporter.h"
#include "output.h"
int progress_bar_length = 20;
void print_progressbar(int percent)
{
std::cout << "\r[";
for (int i = 0; i < 20; ++i)
{
if (percent / 100.0 > i / 20.0)
std::cout << "*";
else
std::cout << " ";
}
std::cout << "] " <... |
381de7ebdfbf0b9be6627e2b6bbe7263c6ab49f8 | b62da7b940073d6cc4795545988a714fac9f7274 | Kyle-S-Harris/CS150 | /CS150/IC09/IC09_YMCAApp/IC09_YMCAApp/IC09_YMCAApp.cpp | C++ | cpp | 5,117 | no_license | /****************************************************
* AUTHOR: Kyle Stephan Harris
* COURSE: CS 150: C++ Programming 1
* SECTION: TTh 11:00-12:50
* IC (PROJECT)#: Homework #09
* LAST MODIFIED: 09/25/18
*****************************************************/
/*************************************************************... |
e67ff3c755c9d09eed667d558e89a36a7ea0bc9c | b2f769b17fa8cdaa6a26a7524168a8ad375664c9 | maze516/Study-RayTracingFromGroundUp | /Src/RayCast.cpp | C++ | cpp | 1,447 | no_license | // Copyright (C) Kevin Suffern 2000-2007.
// This C++ code is for non-commercial purposes only.
// This C++ code is licensed under the GNU General Public License Version 2.
// See the file COPYING.txt for the full license.
#include "RayCast.h"
#include "World.h"
#include "ShadeRec.h"
#include "Material.h"
// ------... |
064a5454a1fdae66a8a3c7a9248c05e4b62c496c | 45a99224376d53cb4a0ec617ccdd4392e74840d1 | octocoin-project/octocoin | /src/qt/utilitydialog.cpp | C++ | cpp | 4,996 | permissive | // Copyright (c) 2011-2014 The Octocoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "utilitydialog.h"
#include "ui_helpmessagedialog.h"
#include "bitcoingui.h"
#include "clientmodel.h"
#include "gui... |
3ceaf9efedc0e332d23b052f5f20191bc59c0000 | 29a64f83c9c3833b28c48f9f1c92960dff46b693 | albert4252/Comp371TheRoomMeAlPh | /ConsoleApplication1/ConsoleApplication1/shader_skybox.hpp | C++ | hpp | 3,384 | no_license | #ifndef SHADER_H
#define SHADER_H
#include "stdafx.h"
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include "glew.h"
class Shader
{
public:
GLuint Program;
// Constructor generates the shader on the fly
Shader(const GLchar* vertexPath, const GLchar* fragmentPath)
{
... |
95215afc67b750928f6c26acb9dd483a7752e72c | 13c7397f957866c5313b06ca1bc3c2d70926f862 | cromulencellc/chess-aces | /phase_1/example/montague/variants/unpatched/src/mtl/tag/each.cpp | C++ | cpp | 2,405 | permissive | #include "each.hpp"
#include "endeach.hpp"
using namespace mtl::tag;
const std::regex each_parser("each\\s+([a-z_,]+)\\s+in\\s+([a-z_,.]+)");
const std::regex target_parser("(([a-z_]+),)?([a-z_]+)");
Each::Each(std::string t, std::string c) : collection(c) {
std::smatch got;
std::regex_match(t, got, target_parser);... |
6508d0fcfa9d0e6f52e3a87924c4fba5bff48207 | 0c0780d93b68d25f044ac4548208a66bc03a2c08 | blockchain-albachain/albachain-App | /build/iOS/Preview/src/_root.signupInd.cpp | C++ | cpp | 49,900 | no_license | // This file was generated based on /Users/jaeyounchae/Desktop/albachain-App/build/iOS/Preview/cache/ux15/signupInd.g.uno.
// WARNING: Changes might be lost if you edit this file directly.
#include <_root.albachain_bundle.h>
#include <_root.albachain_FuseControlsTextInputControl_Value_Property.h>
#include <_root.signu... |
2111182583cda6f78d1e7191a5bc8a39d3bbf5cf | 3a6be29fa1fd4f1ad1c9482120eb57b9e0f84d63 | msrLi/portingSources | /ACE/ACE_wrappers/TAO/TAO_IDL/be/be_visitor_component/context_ex_idl.cpp | C++ | cpp | 3,365 | permissive |
//=============================================================================
/**
* @file context_ex_idl.cpp
*
* Visitor generating code for the contect class
* in the CIAO executor IDL.
*
* @author Jeff Parsons
*/
//=============================================================================
#includ... |
9b3201f765b8465b895ef26be100f205193c95a9 | fa1e2c0e2679f702ccab503193c89b4d32f2d2f7 | avalchev94/Sphereflake | /Sphereflake/Source/Camera.cpp | C++ | cpp | 1,281 | no_license | #include "StdAfx.h"
#include "Camera.h"
CCamera::CCamera()
: fPitch(0.0)
, fYaw(0.0)
, fZoom(0.0)
, fFocus()
{
}
CCamera::~CCamera()
{
}
void CCamera::Set(double pitch, double yaw, double zoom, const CPoint3D& focus)
{
fPitch = pitch;
fYaw = yaw;
fZoom = zoom;
fFocus = focus;
}
void... |
bf70f786b0ddb036867da98da0a752bf66cb6ebf | 3b2e319d8d98f74939f18493938d14c16abf1262 | Adan222/sokoban | /src/gui/menu/Widget.hpp | C++ | hpp | 774 | no_license | #pragma once
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/System/Vector2.hpp>
#include <SFML/Window/Event.hpp>
#include <vector>
#include "level/LevelConfig.hpp"
class Widget : public sf::Drawable
{
protected:
sf::Vector2f m_relativePos;
public:
... |
c7f74263c453eb3aa398bd011ab3c1c219a892f1 | 8873635ddf470490a2116060327ea64f8aa9ac1d | 45G/sixtysocks | /core/poller.cc | C++ | cc | 2,425 | permissive | #include <system_error>
#include <errno.h>
#include <sys/epoll.h>
#include <pthread.h>
#include "poller.hh"
#include "reactor.hh"
using namespace std;
using boost::intrusive_ptr;
Poller::Poller(int numThreads, size_t expectedFDs)
{
threads.reserve(numThreads);
epollFD = epoll_create(1); // number doesn't matter
if... |
b67889a58d47f4acc762ff5e5e57afbf985620e5 | c0fd9719d5e250d9371f9aaeb809f90601a5b2a4 | SurrealSky/PcapAnalyzer | /PcapWindow/PcapWindow.cpp | C++ | cpp | 5,954 | no_license |
// PcapWindow.cpp : 定义应用程序的类行为。
//
#include "stdafx.h"
#include "afxwinappex.h"
#include "afxdialogex.h"
#include "PcapWindow.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "PcapWindowDoc.h"
#include "PcapWindowView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CPcapWindowApp
BEGIN_MESSAGE_MAP(CPcapWi... |
1ecfe33a66ff891d6ac8ac4cbe448a1839fb4547 | 2f1f53e0de5c5cbcb378e2a8198a3075a1c8eca5 | monta0315/atcoder_begin | /tenkei2/2.cpp | C++ | cpp | 1,402 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define fore(i,a) for(auto &a:a)
#define e(v) sort(v.begin(), v.end())
#define rev(v) reverse(v.begin(), v.end())
#define out(s) cout << s << endl
#define decimal10(s) cout << fixed << setprecision(10) << s << endl
#define two... |
7c5fa352ffb3cf0f0a61b59f8592d49958eef76a | 0871e03acb5e32ae604d8e59f3b0989406a73542 | chris-sanchez/cuny_cpp_algos | /Cpp/hw/Rat/Rat.cpp | C++ | cpp | 2,239 | no_license | #include <iostream>
#include <cmath>
#include "Rat.h"
using namespace std;
//creates a rational number from user input
void Rat::input(){
cout << "Enter the numerator\n";
cin >> num;
cout << "Enter the denominator\n";
cin >> denom;
if(denom == 0){
exit(1);
}
else if (denom<0){
denom = -denom;
num = -num... |
765d4f5fd316168eb9c087d64bfe2f99a03704a2 | 9b196e23b72545882d70aa0717c4f8b4afcdf16f | bkahlert/seqan-research | /raw/pmsb13/pmsb13-data-20130530/sources/7pq0x45on7wg519b/2013-05-14T21-16-02.983+0200/sandbox/group2/apps/seqc/kmer_content.cpp | C++ | cpp | 1,361 | permissive | #include <seqan/basic.h>
#include <seqan/sequence.h>
#include <seqan/arg_parse.h>
#include <iostream>
#include <seqan/sequence.h>
#include <seqan/seq_io.h>
#include <seqan/index.h>
#include <cmath>
#include <vector>
#include "kmer_content.h"
KmerContent::KmerContent(unsigned min, unsigned max)
{
minLength = min;
... |
c07d5dff4301e5ed901672b506df2bc379636a18 | 3cfa3e540c3a1dca30acb749c3307c0977c29853 | tvami/cmssw | /Geometry/HGCalCommonData/src/HGCalWaferMask.cc | C++ | cc | 64,868 | permissive | #include "Geometry/HGCalCommonData/interface/HGCalWaferMask.h"
#include "Geometry/HGCalCommonData/interface/HGCalTypes.h"
#include "Geometry/HGCalCommonData/interface/HGCalGeomTools.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <algorithm>
#include <sstream>
//#define EDM_ML_DEBUG
bool HGCalW... |
2374506c2ee7de8040320be69564970c41fc7498 | 1e0badfcdbcd30f32f059009022a83454837b2ec | RummeniggePires/Projeto-C | /Apontamento_Ponteiros/main.cpp | C++ | cpp | 408 | no_license | #include <cstdlib>
#include <cstdio>
#include <iostream>
using namespace std;
void reajuste20(double *a)
{
cout << " O valor de entrada eh: " << *a << endl;
*a = *a + (*a * 0.2);
}
int main(int argc, const char *argv[])
{
double valor;
cout << "Digite um valor: ";
cin >> valor;
reajuste20(&val... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.