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 |
|---|---|---|---|---|---|---|---|---|
f0a36564634ebb3b0fd77cc5159cf0e8ebb119b2 | ad15a5d1275adc080d1b09e7ca1e69c03f9bcf95 | fightingsleep/Pleasantville485 | /common/cubicSpline.hpp | C++ | hpp | 265 | no_license | //
// cubicSpline.hpp
// CMPT485
//
// Created by Chris Ross on 2016-02-05.
//
//
#ifndef cubicSpline_hpp
#define cubicSpline_hpp
#include <stdio.h>
float cubicSpline(float p1, float p1_prime, float p2, float p2_prime, float t);
#endif /* cubicSpline_hpp */
|
a59aac6570c9caf0a955d14b742310c153a3707e | eb6b0467232d9029029f0b1cfe75cfa300eb6418 | ThanhThien-dev/nhapmonCNTT.github.io | /20520027_01/Bai102/Bai102.cpp | C++ | cpp | 202 | no_license | #include <iostream>
using namespace std;
int main()
{
float s = 0;
float i = 2;
float e = 1;
while (e >= pow(10, -6))
{
e = 1 / i;
s = s + e;
i = i + 2;
}
cout << "S = " << s;
return 1;
} |
e242bd266b872658c5c823e5f5340a718f7c7b7c | 81a2f9be90d9fda5b9b5d8497e74065fa841a69f | yuhan1212/incubator-mxnet | /src/operator/quantization/mkldnn/mkldnn_quantized_fully_connected.cc | C++ | cc | 5,539 | permissive | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
0fa137e116513ea595af8987a1189a34d264dcc6 | b154d0c9e0a101f13b5084d42c442b4ef861ce07 | Sukhdeep62/MCUXpresso_LPC1769 | /RGB Lighting/ss/source/ss.cpp | C++ | cpp | 3,042 | no_license | /*
===============================================================================
Name : main.c
Author : $(author)
Version :
Copyright : $(copyright)
Description : main definition
===============================================================================
*/
#if defined (__USE_LPCOPEN)
#if ... |
c733f0d8793f5a4ad783006bc6c924040d90f169 | 64a92d8f2b90c36204edde533d9f7e009c64c6d4 | kwynne99/Protocol_Server | /Protocol_Server/TCP_Server.cpp | C++ | cpp | 7,826 | no_license | #include <WinSock2.h>
#include <stdio.h>
#include <WS2tcpip.h>
#include <iostream>
#include <ctime>
#pragma comment(lib, "Ws2_32.lib")
#define PORT "8080"
#define CONTROL_BUFFER_SIZE 40
#define MAX_BUFFER_SIZE 80
struct tcp_header {
unsigned int max_bufsize;
unsigned int tcph_seqnum;
unsigned int tcph_acknum;
un... |
d3ff5b154e0473ea349276720e610f4f6bf8ae36 | 035d0fa9029ec157a4853d9dee38f051eb94d07f | Jyun-De/myProgram | /06/CSample/CSample/CSample.cpp | C++ | cpp | 305 | no_license | // CSample.cpp : 定義主控台應用程式的進入點。
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
//弱類型
int x = 100;
//200 =x; 不會對X進行附值,弱類型語言通常這樣寫
if (x = 200)//在C語言中非零為true
{
printf("It,s OK!\n");
}
return 0;
}
|
3904dcf1836b893346f23763cd4b87ab83d4acd1 | 5f01c1fafc40c2c74f3377188565ac718e97c0f2 | Segs/SegsEngine | /editor/project_settings_editor.cpp | C++ | cpp | 77,711 | permissive | /*************************************************************************/
/* project_settings_editor.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
646ea928a50fb86a56a2b9a8ab79a4cb39ed7c39 | 660e8dd32d7b80eb44269712dc353ad0f8b4db54 | simonyhong/OrbitView | /OrbitView/ThreeD.cpp | C++ | cpp | 29,150 | permissive | // ThreeD.cpp : implementation of the CThreeD class
#include "stdafx.h"
#include "stdio.h"
#include "ThreeD.h"
#include "Graph2D.h"
#include "AnalysisDoc.h"
#include "AnalysisView.h"
#include "SinTable.h"
#include <afxwin.h>
#define MY_PEEK_MESSAGE {if(::PeekMessage (&message, NULL,0,0, PM_REMOVE)){::Transla... |
99584201041fbf9d2dc846e17a10aa2076a21a13 | 17d65805b2b3396cfcd891ddcfe0edb52d15d7a4 | artofspeed/node-hmd | /src/support/default/DefaultDevice.cc | C++ | cc | 1,327 | permissive | /*
* Copyright (c) 2013-2015 Geocent - Published under the MIT License.
* See LICENSE for the full text of the license.
*/
#include <DefaultDevice.h>
#include <HMDDeviceInfoElement.h>
#include <string>
const std::string DefaultDevice::displayDeviceName = "node-hmd default device";
const std::string DefaultDevice... |
8d968ab4e5bfd07505e5ca3d43196017ea44981f | 02808880f8bd1fe392088f18fc57954ab89692e4 | Gofress/TornBlackJackTest | /src/main.cpp | C++ | cpp | 11,708 | no_license | #include <iostream>
#include <vector>
#include "Deck.h"
#include "ChartParser.h"
// #include <cstdlib>
// #include <ctime>
// #define TEST
#define HIT 0
#define STAND 1
#define DOUBLE 2
#define SPLIT 3
#define SURRENDER 4
#define ACE 11
#define BASEBET 20
#define TOKENS 1000000
#define STARTTOTAL 2000
using names... |
ea546892d922cd6ab947f1f4ed28a98412a75ada | 7411b5b51a53b2e74e11d3b70ccdb5b67c3bd936 | Miaoshuai/ShuJuJieGou | /algorithm/bit_operation/bit_opertion2.cpp | C++ | cpp | 601 | no_license | /*======================================================
> File Name: bit_opertion2.cpp
> Author: MiaoShuai
> E-mail:
> Other :
> Created Time: 2016年04月03日 星期日 16时36分19秒
=======================================================*/
#include<iostream>
int get1FromNum(int n)
{
int count = 0;
... |
6b9dc917d7f5bd16d202aece13a8100c0a2f2d9d | 068978a2006da601b1401faeafa4be9cba3d7810 | compy-art/SoT-SDK | /SDK/SoT_BP_male_makeup_white_06_Desc_classes.hpp | C++ | hpp | 756 | no_license | #pragma once
// Sea of Thieves (1.4) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SoT_BP_male_makeup_white_06_Desc_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//-----------------------------------------------------------------... |
ab2c859fb5bbd121c80901e625df98124e18d760 | 24962157720a68220e146b922d599da2ca9215c2 | edbird/Worlds-Best-Text-Editor | /include/Config.hpp | C++ | hpp | 12,602 | permissive | #ifndef CONFIG_HPP
#define CONFIG_HPP
#include <fstream>
#include <iostream>
#include <map>
// TODO: change so that config stores all options as string
// and then conversion is done afterwards or even manually by
// the calling context
class Config;
template<typename T>
class ConfigOption
{
friend class Co... |
75f14c85126112d406b8c2b6fd41fcd3370ecc78 | 799a2fc551027ac2984fd666aa84a644ff9197bf | Altivar/Jeu-DirectX-PROD | /TPFinal/modelcomponent.cpp | C++ | cpp | 11,307 | no_license | #include "modelcomponent.h"
#include "model.h"
#include "modelssingleton.h"
#include <sstream>
// memory leaks
#include <crtdbg.h>
#ifdef _DEBUG
#define new new( _CLIENT_BLOCK, __FILE__, __LINE__)
#endif // _DEBUG
/////////////////////////////
// MODEL COMPONENT CLASS //
/////////////////////////////
ModelComp... |
a12b5bbe6bc3c45fadbe192fc68e183e973ff180 | 91dcf66c24fa331844e522cb2a1d0199ab46032b | ChinmayLad/pytorch | /torch/csrc/jit/source_range.cpp | C++ | cpp | 2,730 | permissive | #include <torch/csrc/jit/source_range.h>
#include <torch/csrc/jit/source_range_serialization.h>
namespace torch {
namespace jit {
c10::optional<SourceRange> Source::findSourceRangeThatGenerated(
const SourceRange& range) {
if (!gen_ranges_) {
return c10::nullopt;
}
return gen_ranges_->findSourceRangeTha... |
87170e55618a93230c7953d4e40914c39bb5ad27 | 9c0a803274d349893650ee704ff92662143989ef | kpolnitz/32 | /32/Project1/Game.cpp | C++ | cpp | 3,130 | no_license | //
// Game.cpp
// PROJ1AGAIN
//
// Created by Kaela Polnitz on 1/14/18.
// Copyright © 2018 Kaela Polnitz. All rights reserved.
//
#include <iostream>
#include <string>
#include <random>
#include <utility>
#include <cstdlib>
using namespace std;
#include "globals.h"
#include "Player.h"
#include "Game.h"
//////////... |
68f6cb310ea180a2d6433c43f6b139baa6cd0806 | 8ee0a5a3e4192bb66e05f06e6cffc6848248b81e | crapcoinproject/crapcoin | /src/qt/optionsdialog.cpp | C++ | cpp | 7,668 | permissive | #include "optionsdialog.h"
#include "ui_optionsdialog.h"
#include "bitcoinamountfield.h"
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include "netbase.h"
#include "optionsmodel.h"
#include "qvalidatedlineedit.h"
#include "qvaluecombobox.h"
#include <QCheckBox>
#include <QDir>
#include <QIntValidator>
#... |
0d86853bee4393e72f71220bb7eb4f2c2d85fd96 | 242bac0c2710900d9a0c4a286f3516cddd2e3e17 | digiwage/digiwage | /src/qt/startoptionsmain.cpp | C++ | cpp | 6,968 | permissive | //
// Created by Kolby on 6/19/2019.
//
#include "startoptionsmain.h"
#include "ui_startoptionsmain.h"
#include <startoptionsdialog.h>
#include "guiutil.h"
#include "qt/digiwage/qtutils.h"
#include <qt/guiutil.h>
#include <QDebug>
#include <QFileDialog>
#include <iostream>
#include "random.h"
#include <guiinterface.h... |
542b4d3e53962a0d394362fba1c867d73268e47e | 195387558a7da5a93f35b6fc533269a6ac72c3bf | Stareat0707/HackerRank | /Save the Prisoner!/Main.cpp | C++ | cpp | 334 | no_license | #include <iostream>
using namespace std;
int saveThePrisoner(int n, int m, int s)
{
m %= n;
m += --s;
if (m == 0)
return n;
if (m > n)
m %= n;
return m;
}
int main()
{
int t;
cin >> t;
for (int i = 0; i < t; ++i)
{
int n, m, s;
cin >> n >> m >> s;
cout << saveThePrisoner(n, m, s) << endl;
}
... |
7d106f49a2711e8df81c35afd4645207ce23ef64 | 5e55594192a66323b57f9800ec48781bb6b70413 | dicehub/VTK | /Common/DataModel/vtkReebGraphSimplificationMetric.cxx | C++ | cxx | 1,878 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: vtkReebGraphSimplificationMetric.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
... |
a983de373b493a3187ff10c5073745507313ae52 | 8b7d45641e4ee803c585f22455b4619af41129fa | mescam/raytracer | /src/Vectors.cpp | C++ | cpp | 2,478 | no_license | #include "Vectors.h"
// == Vector3 ==
double Vector3::getX() {
return this->x;
}
double Vector3::getY() {
return this->y;
}
double Vector3::getZ() {
return this->z;
}
void Vector3::setX(double x) {
this->x = x;
}
void Vector3::setY(double y) {
this->y = y;
}
void Vector3::setZ(double z) {
thi... |
4d0d8c8379da8394cbe5373008a42770894b811c | 7da74bccec5ab985e114b6ac31ac514850cfd4eb | abhinavrungta/databaseimpl | /project/src/TestRelOp.cc | C++ | cc | 4,321 | no_license | #include <iostream>
#include "../gtest/gtest.h"
#include "Comparison.h"
#include "DBFile.h"
#include "Defs.h"
#include "Function.h"
#include "Pipe.h"
#include "Record.h"
#include "RelOp.h"
#include "Schema.h"
#include "TestBase.h"
Attribute IA = { "int", Int };
Attribute SA = { "string", String };
Attribute DA = { "d... |
1bbadf4fd32cea772f5cc7351937fee0742e51f6 | 6173c035ed926bc343fa89224f3a000daf40d35d | funado/CG-Midterm | /src/Graphics/Post/PostEffect.cpp | C++ | cpp | 2,433 | no_license | #include "PostEffect.h"
void PostEffect::Init(unsigned width, unsigned height)
{
if (!_shaders.size() > 0)
{
int index = int(_buffers.size());
_buffers.push_back(new Framebuffer());
_buffers[index]->AddColorTarget(GL_RGBA8);
_buffers[index]->AddDepthTarget();
_buffers[index]->Init(width, height);
}
_sh... |
33b8649840db445f5f693ca7655fc9a8504cd6d5 | 6f15826fddc36da3b55e96c2d0c351d2000aefb2 | hungpv1412/sbox_Tuan1 | /src/Bai2.cpp | C++ | cpp | 319 | no_license | #include <stdio.h>
#include <ctype.h>
int main() {
char a[500];
printf(" nhap chuoi ki tu ");
scanf("%[^\n]",&a);
int h=0 , t=0 ;
for(int i=0; i<500; i++){
if (islower(a[i])) t++; else if (isupper(a[i])) h++; else break;
}
printf(" so ki tu hoa %d so ki tu thuong %d ", h , t);
return 0;
}
|
4b59fa81f76bba181f3b7e8ccac4e3b32062c409 | 48fe24b0c6b757f3e06601f34134c63c1d4afc74 | khzimmer/opencv | /modules/core/src/gl_core_3_1.cpp | C++ | cpp | 127,154 | no_license | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
feebdfe3406ae2605789e56ecd4c9eebfaeb5ffa | c2ead5acb41d5f01ea8bdaffad1cc95df3525ac7 | Kxnrl/Zombie-Plague | /zp/core/api.cpp | C++ | cpp | 28,649 | no_license | /**
* ============================================================================
*
* Zombie Plague
*
* File: api.cpp
* Type: Main
* Description: Native handlers for the ZP API.
*
* Copyright (C) 2015-2020 Nikita Ushakov (Ireland, Dublin)
*
* This program is free software: you can... |
c6996303cbeedfc0c0298a5b5bbe04049f0bf658 | cf915dee780448c9aef93fce1a9de5ec66ada64e | TencentCloud/tencentcloud-sdk-cpp | /rce/src/v20201103/model/InputManageMarketingRisk.cpp | C++ | cpp | 25,120 | permissive | /*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
41e622efae8c8bb55d68fb6623e4c05f0ce06821 | edff85cb033a714a840cacda7aec38f1e5f8c2dc | micaebe/HuffmanCoding | /test/testHuffBinTree.cpp | C++ | cpp | 841 | no_license | #include "testHuffBinTree.h"
#include "gtest/gtest.h"
TEST(BasicTest, IsEmpty) {
HuffBinTree tree;
EXPECT_TRUE(tree.isEmpty());
}
TEST(BasicTest, BuildTree) {
HuffBinTree tree;
tree.buildTree("testphrase");
EXPECT_TRUE(!tree.isEmpty());
}
TEST(BasicTest, EncodeBasic) {
HuffBinTree tree;
s... |
cb9686cceecf0003c9741e26dd41927eb58dbb57 | 61dc1cc1820e7467998cd14265026500f23c5dd9 | BackupTheBerlios/instigmata-svn | /trunk/barcounter.cpp | C++ | cpp | 562 | no_license | #include <allegro.h>
#include "colors.h"
#include "barcounter.h"
#include "loader.h"
BarCounter::BarCounter(int x, int y)
: Box(x, y, 92, 20, 0, Box::TYPE_BEVEL)
{
this->x = x;
this->y = y;
bars = -1;
}
void BarCounter::paint() {
if(loader->needsDisplay())
return;
scare_mouse();
for(int i = 0; i < 4; i++) {
... |
bfcef47de27a838289eb311691b8e8508867cc4a | 5c65315d0ff0f7ff5fef237c7a5586a066272d53 | stefaneberl/openkit-native | /test/core/configuration/PrivacyConfigurationTest.cxx | C++ | cxx | 11,368 | permissive | /**
* Copyright 2018-2020 Dynatrace LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
ab9ee20370d73e135eadf35167fa36473780a57b | d9b0e279f1742f4992be88ac21fc58ac9599b301 | williamfiedler/devault | /src/qt/overviewpage.cpp | C++ | cpp | 13,140 | permissive | // Copyright (c) 2011-2016 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 "overviewpage.h"
#include "ui_overviewpage.h"
#include "bitcoinunits.h"
#include "clientmodel.h"
#include "guiconst... |
903e273c21c369c5e150601b7a72410ae713bb30 | e042ddd78fd75a6d41dd49b8f874afc93358fbb4 | MichaelDTP/apollo | /modules/canbus/vehicle/devkit/protocol/ultr_sensor_5_511.cc | C++ | cc | 3,982 | permissive | /******************************************************************************
* Copyright 2020 The Apollo 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
... |
c3f76bbd672a5e65aada9d1de3ccb980c2faf05d | 7267dde430936489f6974ee63f6fe1c3545ad339 | zhang-x-z/CompilerPrincipal-Lab | /Lab-1/SEULex/src/core/DFAO.cpp | C++ | cpp | 4,268 | no_license | #include "DFAO.h"
#include "DFA.h"
DFAO::DFAO()
{
construct_DFAO();
}
void DFAO::construct_DFAO()
{
DFA dfa;
vector<unordered_set<int>> set_map;
vector<int> states_belong(dfa.get_all_states().size());
set_map.push_back(unordered_set<int>{});
int set_num = 1;
for (auto i : dfa.get_all_state... |
eb6db635845c877a56f8a870ad60cf13009fea1b | 0f2c91be707e9399190060d0a844619dc9bcb0b3 | ib13/Coding-Practice | /Coding Ninjas/A18/A18-8.cpp | C++ | cpp | 1,532 | no_license | #include <iostream>
using namespace std;
#include <vector>
#include <queue>
vector<int> mergeKSortedArrays(vector<vector<int> *> input)
{
vector<int> finalvector;
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
int allsize = 0;
for (int i = 0; i < input.size(); i++)
... |
91969d3ea27b7f8edb5f62b85e4ffa75346e90fd | c28f889d4b7eacadbde4d389481091ee9049235e | Manuzor/LispCpp | /source/lcppCoreCont/lcpp/core/builtins/impl/lambda_builtinFunctions_comparison.cpp | C++ | cpp | 5,414 | no_license | #include "stdafx.h"
#include "lcpp/core/builtins/lambda_builtinFunctions.h"
#include "lcpp/core/typeSystem/types/continuation.h"
#include "lcpp/core/typeSystem/types/nil.h"
#include "lcpp/core/typeSystem/types/number.h"
#include "lcpp/core/typeSystem/types/bool.h"
#include "lcpp/core/typeSystem/type.h"
#include "lcpp/... |
3a6aea3522fe361951698f1b590433d44cc44b64 | 64a2f47df3801ce935f89537a426c70d2e4ba7cb | danielsmorais/danielsmorais.github.io | /PDI/helloworld/hello.cpp | C++ | cpp | 734 | permissive | #include <iostream>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main(int argc, char** argv){
Mat image;
image = imread(argv[1],CV_LOAD_IMAGE_COLOR);
if(!image.data)
{
cout << "Não foi possível abrir ou encontrar a imagem 1" << endl;
}
else
{
... |
1a018898f38d411eb69f5bedf34cfb65d7ad6650 | 86aa46df559ba15bdf1009ac7b2c129a27176944 | Juice930/AllesC | /PointerTree.cpp | C++ | cpp | 1,943 | no_license | #include <iostream>
#include <string.h>
#include "PilaGenerica.hpp"
//Árbol
//De: Pablo Velázquez
using namespace std;
bool Operando(char c){
return (c>=65 && c<=90) || (c>=97 && c<=122) || (c>=48 && c<=57);
}
bool Operador(char c){
return (c=='*' || c=='/' || c=='+' || c=='-');
}
struct Nodo{
Nodo *pIzq, *pDer... |
586d2cb469c9205bc74c2323d67610ad7e44b8fa | 1daa6ca03cdc19b685814298571575cdf04f9044 | bks/qz7 | /inherited-from-arkive/engine/kernel/CompressionManager.cpp | C++ | cpp | 11,008 | no_license | #include "CompressionManager.h"
#include <QtCore/QMutexLocker>
#include <QtCore/QQueue>
#include <QtCore/QThread>
#include <QtCore/QThreadPool>
#include <QtCore/QStack>
CompressionTask::CompressionTask()
: mStatus(NotStarted), mBytesIn(0), mBytesOut(0), mLastBlock(false), mStreamFinished(0)
{
}
CompressionTask::... |
578523681d7f6fb362177b1041c4929cbd17260a | d31e676beed7603fc8687166f0461c1bdb489755 | pandya-ae/programming-2 | /Week 2/Assignment 2.cpp | C++ | cpp | 3,772 | no_license | #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
class A // Parent class A: cube, cuboid, and pyramid
{
protected:
int length, width, height;
float vol;
public:
A() // Constructor
{
vol = 0;
}
A(int a, int b, int c) // Overload
{
getVolume(a, b, c);
}
void getVolum... |
bebda982c6e164357d463238e3b2d2227d409d5c | db338551df8b331e1ca07396426115effb55420c | DadSchoorse/pal | /src/core/hw/gfxip/gfx9/gfx9QueueContexts.cpp | C++ | cpp | 84,670 | permissive | /*
***********************************************************************************************************************
*
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associ... |
9e98177cf1af38f28a2b42a2b51fd744c2d460f8 | 36ebcd7f2ca66bd775ae0a053ce8e741e2cc1d6d | clzd0792/platform_frameworks_base | /core/jni/android/graphics/Graphics.cpp | C++ | cpp | 31,784 | permissive | #define LOG_TAG "GraphicsJNI"
#include <unistd.h>
#include <sys/mman.h>
#include "jni.h"
#include <nativehelper/JNIHelp.h>
#include "GraphicsJNI.h"
#include "core_jni_helpers.h"
#include "SkCanvas.h"
#include "SkMath.h"
#include "SkRegion.h"
#include <android_runtime/AndroidRuntime.h>
#include <cutils/ashmem.h>
#inc... |
9938b0f29f3464f07a5bbc4869eb7082a8e8f434 | 28a8769a01c2d8f33326063b4d62bf323a203aec | namduongdinh2364/Gazebo_landing | /src/kalman/src/kf_tracker_node.cpp | C++ | cpp | 1,789 | no_license | /*
BSD 3-Clause License
Copyright (c) 2020, Mohamed Abdelkader Zahana
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
l... |
e33710f1067f2dabcfaf455dbeab4b23105c6093 | cc3f321d6b2993e2481dc28648d07bc32323c5b2 | arangodb/arangodb | /3rdParty/V8/v7.9.317/src/compiler/js-inlining-heuristic.cc | C++ | cc | 31,933 | permissive | // Copyright 2015 the V8 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.
#include "src/compiler/js-inlining-heuristic.h"
#include "src/codegen/optimized-compilation-info.h"
#include "src/compiler/common-operator.h"
#include ... |
3cb11327469c3343d75d70523687fde731e3b655 | db06afab81b0d2da6d84de88e1e7dd35cf8c4bd8 | yesdongil/SAMPLE_CODE | /leetcode/7. Reverse Integer/Solution.cpp | C++ | cpp | 780 | no_license | class Solution {
public:
int reverse(int x) {
int max_product_lim = numeric_limits<int>::max()/10;
int min_product_lim = numeric_limits<int>::min()/10;
int max_lim = numeric_limits<int>::max();
int min_lim = numeric_limits<int>::min();
int ret = 0;
while(x != 0) ... |
8c894ca9a2ddbb41d17ee366849483335d197ef9 | 308fa480363eacc3edc5a2e06a1ca0747b89698c | dimgatz98/prog_lang | /luseis_thematwn/static_discpatch.cpp | C++ | cpp | 376 | no_license | #include <iostream>
using namespace std;
class A {
public:
void foo() {
cout << 1 << endl; bar();
}
void bar(){
cout << 2 << endl;;
}
};
class B : public A {
public:
void foo() {
cout << 3 << endl;; bar();
}
void bar() {
cout << 4 << endl;;
}
};
int main(){
A *a = new A; a->foo();
B ... |
fe0f2579d1c486f51f09bdc33eeaa1e078e13826 | 9d128497cdfc7d8dcc2d43a22f9ad51dd982f2be | briancpark/deitel-cpp | /examples/ch19/FIG19_10.CPP | C++ | cpp | 1,610 | no_license | // Fig. 19.10: fig19_10.cpp
// Using an iterator to output a string.
#include <iostream>
using std::cout;
using std::endl;
#include <string>
using std::string;
int main()
{
string s( "Testing iterators" );
string::const_iterator i1 = s.begin();
cout << "s = " << s
<< "\n(Using ite... |
35732c02071db064998d6c2e712dc9eaa3a8cbba | f3ddef72c4618be6ef68c7d98c16c8009902fec0 | gamapat/DI_lecture_examples | /Examples/InheritFromClass.cpp | C++ | cpp | 971 | no_license | #include <gmock/gmock.h>
#include "Downloader.h"
#include "FsWrapper.h"
using namespace testing;
namespace
{
int DownloadFile(const Downloader& downloader, const FsWrapper& fs) {
const auto& downloadedData = downloader.DownloadData("http://localhost/aaa.txt");
fs.SaveToFile(downloadedData, "C:\\b... |
b21cb4381a8fe6c519f31bab2a5308c22a082e66 | af8de5b0bcdaa09c1365180fdf7db595eb10aba3 | coknight13/IDS6938-SimulationTechniques | /Homework2/queues/main.cpp | C++ | cpp | 5,258 | permissive | /*
A simple program that simulates 5 MM1 queues at an airport. The first queue
feeds 3 other queues that work in parallel. These feed a final queue.
Simulation runs until error below threshold and, at the end,
a performance evaluation report is shown, and logs are generated
for plotting and analysis.
*/
usin... |
6d875dd4be47c94ef509f6b3c5b6a7b7f1b69b7b | b934b8b744c4cd3bf056f103a9e47c314a33bb84 | luca-colasanto/gpd2 | /src/gpd/net/caffe_classifier.cpp | C++ | cpp | 2,597 | permissive | #include <gpd/net/caffe_classifier.h>
namespace gpd {
namespace net {
CaffeClassifier::CaffeClassifier(const std::string& model_file,
const std::string& weights_file,
Classifier::Device device, int batch_size) {
// Initialize Caffe.
switch (device)... |
54f3ae747930b1da3c3e54e86ca60a6ba8e956ae | 1a7cddb581539128c0974929c52ad15e2915b15b | camperjett/DSA_dups | /Algorithms/DP/046 distinctSubsequences2.cpp | C++ | cpp | 2,142 | no_license | class Solution {
public:
int distinctSubseqII(string s) {
// Two choices -> include/exclude current character
// If excluded then -> dp[i] = dp[i-1]
// If included, then two cases -> first occurence or already occured
// If first occurence, then we add it at the end of all the previ... |
abb5b80871fb3b6d417e4921b6984d2606ba856b | 276eeb5b0f0ad8b1f9ee62953a0088608bc2b2c4 | SimoneNardi/mrpt | /libs/containers/src/poly_ptr_unittest.cpp | C++ | cpp | 2,661 | permissive | /* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Cop... |
756b8d62a679da78b979712a90e5bae540bbe474 | fe652ff4ca44b87842384a3b3448c57476b40eeb | axkibe/node-vtk | /wrappers/7.0.0/vtkCircularLayoutStrategyWrap.cc | C++ | cc | 6,473 | permissive | /* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */
#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>
#include "vtkGraphLayoutStrategyWrap.h"
#include "vtkCircularLayoutStrategyWrap.h"
#include "vtkObjectWrap.h"
#include "../../plus/plus.h"
using namespa... |
4e2b2ce3ee5d5c8ee53c426b9814459e8edcd73c | db910d909cb726d4c5dea213b505c1eeeb21d2d0 | EDGE-dev/EDGE | /src/chainparams.cpp | C++ | cpp | 6,867 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 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 "assert.h"
#include "chainparams.h"
#include "main.h"
#include "util.h"
#inc... |
1ded36a2254df68230df881ec1d07dbd6e4cb20f | 5751d4d3a4bb9212f995786a6c043956f7a061cf | SpencerTP31/CSC2710Proj3 | /proj3Speters.cpp | C++ | cpp | 4,711 | no_license | /*
* Author: Spencer Peters
* Date: 9/23/18
* Class: CSC-2710
* File Location: ~/CSC2710/Proj3
*
* This program looks at graphs and determines if they're connected or disconnected
* using floyd,warshalls algorithm
*/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
//Function Prot... |
85bb7d387cfcc9b051fc9c831c7a7a2240d62e91 | 50ed3fbcdd294ffbf165640d60eb31bb69e6005b | wenqicao/algorithm-sec2 | /9_6.cpp | C++ | cpp | 1,072 | no_license | #include <iostream>
#include <memory>
#include <stack>
using namespace std;
template<class T>
struct BST{
T data;
shared_ptr<BST<T>> left;
shared_ptr<BST<T>> right;
};
void BST_iteration_algorithm(shared_ptr<BST<int>> node){
stack<shared_ptr<BST<int>>> st;
shared_ptr<BST<int>> cur = node;
while(cur || !st.empty... |
b0560a31efbfc7edf3d2f792ed6b57a10d9f0e47 | db5f37576a4f3f233729cd63237858202962a81e | joyvotu/CP-SubGrouped | /CodeForces/1367D.cpp | C++ | cpp | 2,340 | no_license | /*
We will construct the string t, starting with the largest letters.
Note that if bi=0, then the i-th letter of the string t is maximal,
so we know that the i-th letter affects all bj≠0. While the line t is
not completely constructed, we will do the following:
Find all i such that bi=0 and the i-th character of st... |
b3a22d720936f0f5ce2ba5f4d1a5bb71a8e4528c | cbe1604e1701b9a5ee3f07c2eff684bbc5350f9d | kyzyx/empty-room | /inverse_render/display.cpp | C++ | cpp | 11,822 | no_license | #include "display.h"
#include "parse_args.h"
#include "hemicuberenderer.h"
#include <pcl/visualization/image_viewer.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/visualization/point_cloud_color_handlers.h>
#include <pcl/filters/extract_indices.h>
#include <boost/thread/thread.hpp>
using namespace std;
... |
8a8067223bca0fa202904a39a12a440f1ad90096 | 509f16cab9e0723bff4efeb2a4f2dadca395591a | ZeroBone/ZBoss | /include/zboss/tilemap/layers/layer.hpp | C++ | hpp | 378 | permissive | #ifndef ZBOSS_TILEMAP_LAYER_HPP
#define ZBOSS_TILEMAP_LAYER_HPP
#include <json/json.hpp>
namespace zboss {
using namespace nlohmann;
class TileMap;
class TileMapLayer {
protected:
TileMap& tileMap;
explicit TileMapLayer(TileMap& tileMap);
public:
virtual voi... |
60446f9a4b9ccd8583a983b97d5ebad6c2228a1b | a78e16699b2848fdd3319af93bf0ca4ce95dfc0c | ronniegnr/hacking | /src/bd/com/ronnie/hacking/uri_online_judge/beginner/1049-Animal.cpp | C++ | cpp | 1,373 | no_license | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main() {
string level1, level2, level3, result = "";
cin >> level1 >> level2 >> level3;
if(!level1.compare("vertebrado")) {
if(!level2.compare("ave")) {
if(!level3.compare("carnivoro")) {
... |
298698216e51d12d42fcc2e9802a40a711a73a98 | f6516e5d663cfd1fc9e143da0bfe72fd70697eed | napasa/Tesseract-exporter | /Render.hh | C++ | hh | 1,123 | permissive | #ifndef RENDER_H
#define RENDER_H
#include <QByteArray>
#include <QString>
#include <QMutex>
class QImage;
namespace Poppler {
class Document;
}
class DisplayRenderer {
public:
DisplayRenderer(const QString& filename) : m_filename(filename) {}
virtual ~DisplayRenderer() {}
virtual QImage render(int page, ... |
8339f839def3073be6994b1249c34d36fcc23d5d | 843bd84818c0b319838ac6bc30cdcd72fb1bbe4e | jie-chen532/Cpp_Language | /C++继承/C++继承/test.cpp | C++ | cpp | 4,520 | no_license | #include<iostream>
#include<string>
using namespace std;
struct A
{
int _a;
};
struct B : virtual public A
{
int _b;
};
struct C : virtual public A
{
int _c;
};
struct D : public B, public C
{
int _d;
};
void test()
{
/*D d;
d.B::_a = 1;
d._b = 2;
d.C::_a = 3;
d._c = 4;
d._d = 5;
*/
}
//class Person
//{... |
3f3eb40ae110f9d08d960c46b4d01eb8a4c4f5bd | d07e373c691905cbcc2d1f678beb8a19f67954b1 | menguan/toj_code | /tojcode/3636.cpp | C++ | cpp | 2,347 | no_license | #include<iostream>//最小割 直接找的
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=2010;
const int M=550000;
const int inf=(1<<28);
int head[N];
struct Edge
{
int v,next,w;
} edge[M];
int cnt,n,s,t;
void addedge(int u,int v,int w)
{
edge[cnt].v=v;
edge[cnt].w=w;
edge[... |
df240892dc5f438fc17cef5a7805df0ada198593 | 964e6597d386787b04c8ee1f2ac670bc9060c919 | ThinkLib/hhvm | /hphp/runtime/vm/jit/region-tracelet.cpp | C++ | cpp | 22,446 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
e9aabb4a5d44e0ed06e271c9f456af0fa65e59c4 | 207172c96e8adbe51fbb60a8e8cfb710a60976a3 | vomyrak/Hot_Wings | /main.cpp | C++ | cpp | 10,272 | no_license | #include "mbed.h"
#include "SHA256.h"
//Photointerrupter input pins
#define I1pin D3
#define I2pin D6
#define I3pin D5
//Incremental encoder input pins
#define CHApin D12
#define CHBpin D11
//Motor Drive output pins //Mask in output byte
#define L1Lpin D1 //0x01
#define L1Hpin A3 //0x02
#de... |
a8b8d0d0009558bf4b464c5476a0c4e7a5d171d3 | 9351ccb887cb07d7547e7f38012f824c39886658 | Drizshko/openvino | /inference-engine/src/vpu/graph_transformer/src/model/data_contents/scaled_content.cpp | C++ | cpp | 1,103 | permissive | // Copyright (C) 2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <vpu/model/data_contents/scaled_content.hpp>
#include <vpu/utils/profiling.hpp>
#include <ie_parallel.hpp>
#include <precision_utils.h>
namespace vpu {
ScaledContent::ScaledContent(const DataContent::Ptr& origContent, float ... |
c1a955967636be46ea934d862151c886b4cc8f42 | ecba54621166ce925c98ac8a6a73d9de7a605af9 | Kamil2601/University | /Studia_inzynierskie/Semestr_5/MIA/Lista_4/Zad3/Zad3.cpp | C++ | cpp | 1,528 | no_license | #include <iostream>
#include <list>
#include <utility>
#include <vector>
using namespace std;
int n;
list <int> *tree;
list<pair<int,int>> result;
int walk(int v, int p)
{
if (tree[v].size()>2)
{
return -1;
}
else if (tree[v].size()==1)
{
return v;
}
else
{
for... |
6ac15254d8dcd0fc4336b88b019cccf0a31d4c45 | 61609fed5fac1322b86386a4015933edb413a440 | kkini90/l-code | /MinimumWindowSubstring.cc | C++ | cc | 1,045 | no_license | #include<string>
using namespace std;
class Solution {
public:
string minWindow(string S, string T) {
if (S == "" || T == "") return "";
int hash[256];
int total_need = 0;
for (int i = 0; i < 256; i++) hash[i] = 0;
for (int i = 0; i < T.length(); i++) {
hash[T[i]]... |
68b3a2f623d4e7d710928d0ca6fe2d33ede5477d | f53ee792c509d2cf2fc1e76e062dd85d5c8fee7d | samwarring/sudoku | /test/sudoku_test/grid_test.cpp | C++ | cpp | 4,149 | permissive | #include <boost/test/unit_test.hpp>
#include <sudoku/grid.h>
#include <sudoku/standard.h>
struct GridTestSuiteFixture
{
sudoku::square::Dimensions dims{2};
sudoku::Grid grid{dims};
void fillGrid()
{
// Fill grid with a valid solution
std::vector<sudoku::CellValue> cellValues{
... |
8bb4a8f9e7e7d711b7fe4e374ee6f7b5307ee91c | 8a74d1f8857ff3f80aaf375c8bb0d6904527f6ad | dcjones/isolator | /src/pos_table.cpp | C++ | cpp | 2,156 | permissive |
#include "pos_table.hpp"
PosTable::PosTable()
{}
PosTable::~PosTable()
{}
bool PosSubtable::inc(pos_t pos, pos_t start, pos_t end, int strand)
{
int s = strand == 0 ? 0 : 1;
boost::unordered_map<pos_t, PosTableVal>::iterator i = table[s].find(pos);
if (i == table[s].end()) {
table[s].insert(... |
fcc50da49ddb0e4c16dc595c4635a109e6ed2f2f | e8691c6238f12866dfab84f4a342151ad52c09cc | NoureldinYosri/competitive-programming | /atcoder/arc080/C/main.cpp | C++ | cpp | 3,176 | no_license | #include <bits/stdc++.h>
#define loop(i,n) for(int i = 0;i < (n);i++)
#define range(i,a,b) for(int i = (a);i <= (b);i++)
#define all(A) A.begin(),A.end()
#define pb push_back
#define mp make_pair
#define sz(A) ((int)A.size())
#define vi vector<int>
#define vl vector<long long>
#define vd vector<double>
#define vp vecto... |
807bdd58cd17af5700a7a69b74d96eb74f736001 | f67a7084eaf907eee072237656346158310c2523 | sallen-repos/BlackJack | /Task10-Cards/Hand.cpp | C++ | cpp | 1,534 | no_license | #include "pch.h"
#include "Hand.h"
#include <string>
int sum;
int count;
int lastCard;
std::string owner;
Hand::Hand(std::string name)
{
setDefault();
owner = name;
}
//defaults to zero and false so fresh for a new game
void Hand::setDefault() {
sum = 0;
count = 0;
lastCard = 0;
}
//adds deal card to the parti... |
def3464ea3f86a4d0e5c743d1d55d58f17f390ce | 8bd0f8af706e3a5cc939e5ad8cecd47809ca8d10 | hyrise/hyrise | /src/lib/storage/vector_compression/fixed_width_integer/fixed_width_integer_vector.hpp | C++ | hpp | 1,874 | permissive | #pragma once
#include <memory>
#include <boost/hana/contains.hpp>
#include <boost/hana/tuple.hpp>
#include <boost/hana/type.hpp>
#include "fixed_width_integer_decompressor.hpp"
#include "storage/vector_compression/base_compressed_vector.hpp"
#include "types.hpp"
namespace hyrise {
namespace hana = boost::hana;
/*... |
976a32b8ac9d4c321a4ace5c3fd255e2b93065c0 | be7715a4e242a95daf8201f742aceab9545f6759 | gwonii/algorithm-V2 | /cosPro/cha_1/my_solution/3_my_code.cpp | C++ | cpp | 1,169 | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
class Pair{
public:
int first_num;
int second_num;
};
int func_a(int numA, int numB, char exp){
if (exp == '+')
return numA + numB;
else if (exp == '-')
return numA - numB;
else
return numA * ... |
84c5963ddf986f1b2b0588a441589d188da3783d | f4c76f34c62cc651d27317872785fa0392cac7b2 | wahello/chromium | /content/browser/site_per_process_sad_frame_browsertest.cc | C++ | cc | 31,265 | 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 "content/browser/site_per_process_browsertest.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/cross_process_frame_connector.h"
#include "co... |
6d12e988d7acf250c794d98a4c3786d86c6bdab2 | 305aec886772ea4e7e2e1ecdaa4c5c6a7f4556dc | mazongkun/GL | /src/main.cpp | C++ | cpp | 1,534 | no_license |
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
//#include <GLFW/glfw3native.h>
#include <stdio.h>
void close_callback(GLFWwindow * window, int key, int scanCode, int action, int mode) {
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) {
glfwSetWindowShouldClose(window, true);
}
... |
f14ffe3a93a4c1f6bbc11d4c36e95124306bd0c5 | 37f534364a930732ac9331851cc88cefb2e40f68 | valentinvstoyanov/dsa-cpp | /algorithms/sorting/counting-sort/main.cpp | C++ | cpp | 1,016 | permissive | #include <iostream>
#include "counting_sort.h"
void Print(int* arr, size_t size) {
for (size_t i = 0; i < size; i++)
std::cout << arr[i] << " ";
std::cout << std::endl;
}
void Print(int* arr, int* sorted_arr, size_t size) {
std::cout << "arr = ";Print(arr, size);
std::cout << "sorted_arr = ";Print(sorted_... |
14cbef5bf4659dea92864004c70b560ee66315de | f3753c3a0de292f3a465485d6ab52dbeca9a7656 | yjjfirst/x-sip | /cpputest/src/CppUTest/TestMemoryAllocator.cpp | C++ | cpp | 5,884 | permissive | /*
* Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde
* 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... |
6cceb9188cfc1a6805431c4a176de9d336b0061e | 4f4fbd01049bdae8cf9fc44368f5029b8b3e8847 | codedazzlers/DSA-Bootcamps | /Vatsal/Strings/length_of_string.cpp | C++ | cpp | 271 | no_license | #include <iostream>
#include <string>
using namespace std;
int main()
{
int i;
string s;
cout << "Enter a String:" << endl;
getline(cin, s);
for (i = 0; s[i] != '\0'; i++)
;
cout << "Length of string is: " << i << endl;
return 0;
}
|
edbe567c59a9d35c5d1704f5d1eda40369ed666e | 20d3d4e68e337097b9e738bf17eac34cce391f0a | apple/swift-lldb | /source/Interpreter/OptionValueFileSpec.cpp | C++ | cpp | 4,381 | permissive | //===-- OptionValueFileSpec.cpp ---------------------------------*- C++ -*-===//
//
// 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
//
//===---------------------------... |
144b76b263b67b665f94178d3e6b6d02be0d39cf | a561913eeb23fc7cb73bfc5b2d1e96848809ae88 | artiste-qb-net/OpenPNL | /c_pgmtk/tests/src/tCreateRandStructs.cpp | C++ | cpp | 10,741 | no_license | /////////////////////////////////////////////////////////////////////////////
// //
// INTEL CORPORATION PROPRIETARY INFORMATION //
// This software is supplied under the terms of a license agreement or //
// nond... |
9f1b0c02a5f8fe45de13e9aec195f07346722970 | 964386e48247e6ceeb695daabae6f674cf24080d | sbmaruf/Codeforces_Solution | /Solutions/535/A[ Tavas and Nafas ].cpp | C++ | cpp | 26,721 | no_license | /EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="X-Csrf-Token" content="29d020367d1a21dacca57beb0c37d401"/>
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=0.01"/>
<script type="text/javascript" src="http://st.codeforces.c... |
a8c31c0d961218f91fa3a6adf41f3785fcabbc34 | a20d512e1be6210011ef39e0d0d77df40d56065c | zaghaghi/pdstl | /src/main.cpp | C++ | cpp | 4,432 | permissive | #include <hash/mmh3_hash_factory.h>
#include <membership/bloom_filter.h>
#include <membership/bloom_filter_calculator.h>
#include <membership/counting_bloom_filter.h>
#include <membership/cuckoo_filter.h>
#include <membership/quotient_filter.h>
#include <algorithm>
#include <iostream>
#include <string>
class MyCustomC... |
abc46a2e937685d543af9581f8dc15f7067c3887 | b1c2337cbd80af2cbfb65dc341bc9c8532f633c4 | SkullStickyRice/UIUC-CS225-Data-Structure- | /mp2/scene.cpp | C++ | cpp | 5,032 | no_license | #include "scene.h"
#include "image.h"
#include <iostream>
using namespace std;
//Constructor
Scene::Scene (int max)
{
imax = max;
theImage = new Image *[imax];
xcoords = new int[imax];
ycoords = new int[imax];
for (int i = 0; i < imax; i++) {
theImage[i] = NULL;
xcoords[i] = 0;
ycoords[i] = 0;
}
}
//dtor... |
f7508469aaaae91bd6e8584a678d3183d3927030 | 072cbfdd67de242f488b169480d48d2c0b3668bf | darren123chen/Cpp-Primer-Plus | /6/6.10.3.cpp | C++ | cpp | 325 | no_license | #include <iostream>
using namespace std;
int main ()
{
char ch;
int ct1, ct2;
ct1 = ct2 = 0;
while ((ch = cin.get ()) != '$')
{
cout << ch;
ct1++;
if (ch = '$')
ct2++;
cout << ch;
}
cout << "ct1 = " << ct1 << ", ct2 = " << ct2 << "\n";
return ... |
8a2472c9d979c365e7b99bed8e99110e771c76f5 | a0a311ded119d91dfad5cadd96143b8ccf15da38 | 03bekjob/Strg | /Grmt/Grmt.cpp | C++ | cpp | 2,810 | no_license | // Grmt.cpp : Defines the initialization routines for the DLL.
//
#include "stdafx.h"
#include <afxdllx.h>
#include "Dlg.h"
#ifdef _MANAGED
#error Please read instructions in Grmt.cpp to compile with /clr
// If you want to add /clr to your project you must do the following:
// 1. Remove the above include for afxdllx.h... |
2976f6179886a8724f58e9831ae472358c2b49ee | a86dbebcd4e8158cbcc4ad74688723e11b8fa63d | infinitio/infinit | /oracles/trophonius/server/src/main.cc | C++ | cc | 4,678 | no_license | #include <infinit/oracles/trophonius/server/Client.hh>
#include <infinit/oracles/trophonius/server/Trophonius.hh>
#include <algorithm>
#include <boost/algorithm/string.hpp>
#include <boost/program_options.hpp>
#include <elle/Exception.hh>
#include <elle/log.hh>
#include <elle/log/SysLogger.hh>
#include <reactor/sch... |
7f0d06db93db36da3dae9f6d1d3e474aba15e6a2 | 5d23764f0234cce5337c84b5f505bebec85c4d18 | onionhoney/codesprint | /judge/sessions/2018Team/Orange/PA_03.cc | C++ | cc | 1,401 | no_license | #include <iostream>
#include <string>
using namespace std;
int main(){
int t, n, k;
cin >> t;
for (int j = 0; j < t; j++){
cin >> n >> k;
string shots;
//getline (cin, shots);
cin >> shots;
int count = 0;
int consec = 0;
/*
for (int i = 0; i < (n - 1);){
while (shots[i] == shots[i+1]){
consec... |
6da6f5beee2f25c0935b08f7fb0fe673f38bb518 | a44b5824df975b5a61586021218b02a09370dd40 | ngangwar962/C_and_Cpp_Programs | /practise/sorted_string_o1.cpp | C++ | cpp | 334 | no_license | #include<iostream>
using namespace std;
void gstring(char *s,int present,int last)
{
if(present==last)
{
cout<<s<<endl;
return;
}
s[present]='0';
gstring(s,present+1,last);
s[present]='1';
gstring(s,present+1,last);
return;
}
int main()
{
int i,k,l;
cin>>k;
char str[k+1];
str[k]='\0';
gstring(str,0,k);... |
9bd7c7144822895fd33f5bb76a7ec3b0bb6970fb | 97be613086560c4f789960b86dae3c646b1a1c0d | arizonat/softroboticfish7 | /fish/mbed/LPCExpress/robotic_fish_6/SerialControl/SerialController.cpp | C++ | cpp | 9,651 | permissive | /*
* Original Author: Joseph DelPreto
*/
#include "SerialController.h"
#include "FishController.h"
#include "IMU/IMU.h"
//#include "unistd.h"
#ifdef serialControl
// The static instance
SerialController serialController;
void lowBatteryCallbackSerialStatic()
{
serialController.lowBatteryCallback();
}
// Initial... |
bb4c6637c93c761ff64d82e0e36386bd59fc3968 | bbc77b1e2b7462cf3f793075a6280d00eeb8c42f | ishanagrawal/SRISCProcessor | /src/Types.cpp | C++ | cpp | 584 | no_license | #include "Types.h"
StageBuffer::StageBuffer() : dirtyNo_sReg1(0), amIdirty(0)
{
str = "";
operand1 = 0;
operand2 = 0;
address = -1;
}
Register::Register() : regVal(0), dirtyNo(0), alive(false)
{
}
Relation::Relation() : src(-1), value(0), dirtyNo(0), order(SrcOpValue), op(IADD)
{
}
void Relation::reset()
{
thi... |
137a253df81301c59319a7ed8156f0e0ca5cb948 | b559272266912a48beeb3b9c4debe756682c0e23 | benfadero/chess-engine | /Rook.cpp | C++ | cpp | 931 | no_license | #include "Rook.h"
using namespace std;
Rook::Rook(Colour _colour,
string _name,
string _currentPosition) : ChessPiece(_colour,
_name,
_currentPosition)
{ }
void Rook::calculateAllowedMoves(string position)
{
// If there is a vector, delete it
if (allowedMoves.size() > 0)
allowedMoves.cl... |
c497b17482d0d3b56dbd2910631b22c80ec80f56 | e542498af1be0f2be8da34644425553e9920564e | mwegner/chaotica-apophysis-plugins-from-jwildfire | /output/tree_js.cpp | C++ | cpp | 15,581 | no_license | #define PLUGIN_WARNING "NOTE_modded_for_jwildfire_workflow"
/*
Apophysis Plugin: tree_js
Port of: https://github.com/thargor6/JWildfire/blob/master/src/org/jwildfire/create/tina/variation/TreeFunc.java
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU G... |
e3e17534ecd61126705adceba43fa118f2ede88f | 237eb6fe72e79c22423fbcb52b34a2ea2a369d7b | JonasToth/cuda_raytracer | /src/graphic/kernels/trace.cpp | C++ | cpp | 1,733 | no_license | #include "graphic/kernels/trace.h"
#include "graphic/kernels/image_loop_macro.h"
void trace_single_triangle(memory_surface& surface, const triangle& t)
{
const float focal_length = 1.f;
const auto width = surface.width();
const auto height = surface.height();
PIXEL_LOOP(surface)
{
... |
7c2f2cab0547bfa2037c0bbdc855a5471549210a | a452004a5774966568663d73ad956142dc7b05bd | andy3000/DATA-STRUCTURES | /BINARY-SEARCH-TREE/database.cpp | C++ | cpp | 3,467 | no_license | //--------------------------------------------------------------------
//
// Laboratory 11, In-lab Exercise 1 database.cs
//
// (Shell) Indexed accounts database program
//
//--------------------------------------------------------------------
// Builds a binary search tree index for the account ... |
96e7b8fdbefc8b05080d5998b2dbbac1ca897ce8 | b85be4b4e141b414a412cf91fd1b6e17cbb25563 | adi1103sh/IMPLEMENATION-OF-DATA-STRUCTURES | /ARRAYS/6_Insertion_of_an_Element.cpp | C++ | cpp | 1,424 | no_license | // FROM NOW ON WE WILL BE USING FUNCTIONS
#include <iostream>
using namespace std;
// CREATION OF integerArray
void createArray(int integerArray[]){
cout<<"Lets create an array consisting 9 elements"<<endl;
int i;
// INITIALISING integerArray BY USER INPUT
for(i=0;i<9;i++)
{
cout<... |
b0141e1aa8b68c278d5a3c756baa0b463ea76674 | 97b131dec4dff2aa6c417a5467619fd77e2f51ac | bbguimaraes/books | /open.gl/geometry/vertex_attrs.cpp | C++ | cpp | 2,606 | no_license | #include "geometry_common.h"
#include "common.h"
const GLchar * VERTEX_SHADER_SRC = GLSL(
in vec2 pos;
in vec3 color;
out vec3 vColor;
void main() {
gl_Position = vec4(pos, 0.0, 1.0);
vColor = color;
}
);
const GLchar * GEO_SHADER_SRC = GLSL(
layout(points) in;
layout(line_... |
88ebb40305a6c6c0155a44b7eca5244774101835 | 9ddc1124e58047a541354e21fca400aed62e03e5 | visheshaggarwal/SPOJ-And-Codechef-Solutions | /customSortString.cpp | C++ | cpp | 572 | no_license | int a[26] = {0};
bool cmp(char a1,char a2)
{
return a[a1-'a'] < a[a2-'a'];
}
class Solution {
public:
string customSortString(string S, string T) {
for(int i=0;i<26;i++)
{
a[i]=0;
}
for(int i=0;i<S.length();i++)
{
if(a[S[i]-'a']==0)
... |
547efcb61fc2c34897a0f028cb6b66172e3e54f9 | 106706de7ee61d8207966252794da32738f24e47 | vaneet-hash/Competitive-Programming-codes-CPP | /testFile.cpp | C++ | cpp | 1,461 | no_license | #include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
typedef long long ll;
// unhackable custom hash for unordered_map
// Credits : neil
struct custom_hash {
size_t operator()(uint64_t x) const {
static const uint64_t FIXED_RANDOM =
chrono::steady_clock::now().time_since_epoch().count();... |
a3d7b951198a447bd0df6400a77e2a5e7361f66d | e40503caafcc11210a50d943d3512360ddb53bd3 | joe4568/centreon-broker | /notification/inc/com/centreon/broker/notification/stream.hh | C++ | hh | 3,719 | permissive | /*
** Copyright 2014-2015 Centreon
**
** 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 t... |
aeb229f37e362c6651943fd381b64f867bcb9892 | de64a8c02ee28df82b5c0ec1dba44c8d86da4817 | snakelayer/gw2-raid-assist | /gw2dps/thread.Speedometer.cpp | C++ | cpp | 2,621 | no_license | #include "globals.h"
using namespace GW2LIB;
using namespace boost;
void threadSpeedometer() {
double pollingRate = 100; // ms
int pId = 0;
Vector3 pPos = Vector3(0,0,0);
timer::cpu_timer timer;
timer.stop();
while (true)
{
this_thread::interruption_point();
if (logSpeedo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.