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 |
|---|---|---|---|---|---|---|---|---|
a4d4bf290c79e40a6d3e8b55717ec5921c8cbca4 | 29dc2a3a6003e0843510ac750383d7d32a506477 | player1537-forks/vcb | /vcbcache/MemRoot.cpp | C++ | cpp | 1,453 | no_license |
#include <iostream>
using namespace std;
#include "hashtable.h"
#include "MemRoot.h"
#include <string.h>
#include <stdlib.h>
MemRoot::MemRoot(size_t size)
{
pList = (MemEnt *) 0;
pTrash = (MemEnt *) 0;
iLogSize = MEMSTART;
iNumLeft = 0;
iSize = align(size);
}
MemRoot::~MemRoot()
{
MemEnt *t... |
f649daec1ebc8ca250d4c8d3434d979e01562100 | 7efb31d4853fbd87ceb984fa3ee9ed3f2b78c801 | seganx/old-engine | /version1.5/rob_fa/Player.cpp | C++ | cpp | 14,198 | no_license | #include "Player.h"
#include "Entity.h"
#include "Game.h"
#include "GameGUI.h"
#include "GameConfig.h"
#include "GameStrings.h"
#include "Scripter.h"
#include "EntityManager.h"
#include "ProjectileManager.h"
#include "projectile_Bullet.h"
#include "Projectile_BOMB.h"
#include "com_weapon_MachineGun.h"
#incl... |
f36713fb4412f539a6ad79ba42c8a1abd6c3ed9f | 8ed860e6eb5e98adc737227beb15e5dd7d494ba4 | tangjz/acm-icpc | /51nod/1576.cpp | C++ | cpp | 1,711 | permissive | #include <stdio.h>
const int maxn = (int)1e5 + 3, maxd = 17;
int n, m, lnk[maxn], nxt[maxn], fa[maxd][maxn], dep[maxn], in[maxn], out[maxn], bit[maxn];
void dfs(int u) {
in[u] = ++n;
for(int v = lnk[u]; v; v = nxt[v]) {
dep[v] = dep[u] + 1;
dfs(v);
}
out[u] = n;
}
int lca(int u, int v) {
for(int i ... |
780e9f0911e4baf258b083709d69c5c60f1984cb | f5578d26148679bc3a993fa8686305906a117b8f | jariasf/Online-Judges-Solutions | /UVA/Volume 103 (10300-10399)/10344 - 23 Out of 5.cpp | C++ | cpp | 1,132 | no_license | /*****************************************
***Problema: 23 Out of 5
***ID: 10344
***Juez: UVA
***Tipo: Backtracking
***Autor: Jhosimar George Arias Figueroa
******************************************/
#include <stdio.h>
#include <cstring>
bool seen[ 6 ];
int a[ 6 ];
bool finish;
void solve( int len , int sum ... |
f23d24be326066b357e95f66b0d6db65607bb80d | 2b53c8dd0ecfbc5b47b0aad21885c49eda799315 | ahmetshen-us/systems_programming_notes | /Fischer Textbook/CH3/print_old.cpp | C++ | cpp | 807 | no_license | //------------------------------------------------------------------
void
print_parts( ostream& fout, Part* inventory, int n ){
Part* p = inventory;
Part* pend = inventory+n;
for ( ; p<pend; ++p) {
fout.setf(ios::left, ios::adjustfield); // Left-adjust the first two outputs.
fout <<setw(25) <<setfi... |
3b0625c0bf8dbeca1e968c953807d47690c86eb6 | a69cb852aba6ca96805de61b624f276a8b7eb36b | muzhikid0MSK/AlgorithmLeetcode | /leetcode/editor/cn/50-powx-n.cpp | C++ | cpp | 944 | no_license | //实现 pow(x, n) ,即计算 x 的 n 次幂函数。
//
// 示例 1:
//
// 输入: 2.00000, 10
//输出: 1024.00000
//
//
// 示例 2:
//
// 输入: 2.10000, 3
//输出: 9.26100
//
//
// 示例 3:
//
// 输入: 2.00000, -2
//输出: 0.25000
//解释: 2-2 = 1/22 = 1/4 = 0.25
//
// 说明:
//
//
// -100.0 < x < 100.0
// n 是 32 位有符号整数,其数值范围是 [−231, 231 − 1] 。
//
// Related ... |
f5b89cbaea77c5df96396c7f920475ea8ebee50f | 48818af2d65f101c4721c852b6427c8b95f1bf42 | skautman21/Snegoviki | /snegoviki/ExampleWindow.cc | C++ | cc | 4,404 | no_license | /*
* ExampleWindow.cc
*
* Created on: 16 нояб. 2020 г.
* Author: unyuu
*/
#include "ExampleWindow.h"
#include <cmath>
static constexpr double Pi = acos(-1.);
#include "Primitives.h"
double coeff=0.25;
ExampleWindow::ExampleWindow(int width, int height)
: Window(width, height),
_c... |
d68aa5d8ea84cb9a7865d29948cfe8e1a36811f9 | 8589e29e674dceb353f4b3ed5d04fc4f64f8e347 | Gustavo-machine/Area-calculo | /Area.cpp | C++ | cpp | 498 | no_license | #include<stdio.h>
#include<stdlib.h>
int main(){
float A,B,C,triangulo,trapezio,circulo,retangulo,quadrado;
scanf("%f",&A);
scanf("%f",&B);
scanf("%f",&C);
triangulo=(A*C)/2;
circulo=(C*C)*3.14159;
trapezio=(A+B)*C/2;
quadrado=B*B;
retangulo=A*B;
printf("\nTriangulo: %2.3f",triangulo);
printf(... |
9b00fcdcf5eaabea232286d19f343e9b35d9bd05 | eafbe6294b03c45674d9649fb67d97ec1fc3e9d0 | fuwh-shanghaitech/Metagenomics_CAST | /pilercr/readmfa.cpp | C++ | cpp | 4,616 | no_license | #include "pilercr.h"
const int DP_PAD = 50; // padding to stop alignments
static bool g_TruncateLabels = false;
#define APPEND_CHAR(c) \
{ \
if (Pos >= BufferSize) \
Quit("ReadMFA: buffer too small"); \
Buffer[Pos++] = (c); \
}
#define APPEND_LABEL(c) \
{ ... |
19c0ab26d37aa4a3c89bb1baf07e721dd7c536ed | 4741227490045addeb1078655e0257e2474c4ec4 | jd4rider/CSCI113_intro_cpp | /input.cpp | C++ | cpp | 577 | no_license | /*********************
Jonathan Forrider
CSCI 113
Date
Name - Please Change
Description: Ipsum Dipsum Dolor
*********************/
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ofstream oF1;
int i;
string filename;
cout<<"Enter a filename:... |
c448cf87fc0710f5dbd9006d44727d58bcb60b6c | 30ecd21ffd50420d360ffc68beee32b45383c8e8 | aseprite/skia | /modules/pathkit/pathkit_wasm_bindings.cpp | C++ | cpp | 23,956 | permissive | /*
* Copyright 2018 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/core/SkCubicMap.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkRect.h"
#inc... |
fef21318b699cc45d3cb34e0a238b0ad189abad2 | 4ec48a4c370f0e0029e8aec6f08bc0738b114c71 | arthur-andraade/GamesWithC | /Battleship/game.cpp | C++ | cpp | 4,363 | no_license | #include<stdio.h>
#include<stdlib.h>
#include<string>
#include<iostream>
#include "game.h"
#include<time.h>
#include<stdbool.h>
using namespace std;
void cleanScreen(){
system("clear");
}
// Changing gameBoard in memory
void startGameBoard(char gameBoard[10][10], char mask[10][10]){
int row, column;
... |
18991b0cf53c60eb4634910ff3868cda50518398 | 13085eff0c75e855683ec91f7313ea74d5db0f23 | aox/aox | /message/messagecache.cpp | C++ | cpp | 2,044 | no_license | // Copyright 2009 The Archiveopteryx Developers <info@aox.org>
#include "messagecache.h"
#include "message.h"
#include "mailbox.h"
#include "server.h"
#include "map.h"
#include <time.h> // time(0)
static class MessageCache * c = 0;
class MessageCacheData
: public Garbage
{
public:
MessageCacheData(): Gar... |
52e828fa04b5611ddfdc2cd33af615f2fe7458bf | ad803a7741c4c997ad123502258b0b3513c78646 | DennisZZH/visitorPattern | /max.cpp | C++ | cpp | 348 | no_license | //Author: Zihao Zhang
//Date: 4.2.2019
#include "max.hpp"
// You will need to implement a complete visitor that
// finds the maximum element in the tree. You can use
// the print and sum visitors for reference.
// WRITEME
void MaxVisitor::visitNode(Node* node) {
if(node->value > max){
max = node->value;
}
no... |
e434fb53387bce81fd294256497c8e6463e05542 | 4391c2b6cc8411c354da003132530ac93c8daa56 | jtao22/competitive-code | /practice problems/cbarn.cpp | C++ | cpp | 885 | no_license | #include <iostream>
#include <cstdio>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n;
int arr[100001];
bool fails[100001];
int counts[100001];
int main(){
freopen("cbarn.in","r",stdin);
freopen("cbarn.out","w",stdout);
cin >> n;
int lowpoint,lowindex,currtotal = 0;
for (int i = 0; i... |
21bab7ee22e651e6439300e8c109bda9becf6447 | 5a3f722f234a4518dbcba85933a561844f93e88e | Surbhi-Kohli/DSandAlgo | /Trees/BinaryTrees/TreeCreationNPreorderTraversal.cpp | C++ | cpp | 604 | no_license | #include <iostream>
using namespace std;
class Node{
public:
int data;
Node *left;
Node *right;
Node(int d){
data=d;
left=NULL;
right=NULL;
}
};
Node* buildTree(){
int d;
cin>>d;
if(d==-1)
return NULL;
Node* root=new Node(d);
... |
ed2501d4112c93dcd264da965dda1962818404c0 | 62bda0a04b0cbbece938acad28e928bf918969b7 | ashwin-bitsathy/codeforces-clonr | /contestData/user_submission/toni1_iXLLYkn.cpp | C++ | cpp | 396 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
int a,b,c=0;
cin>>a>>b;
int ac[n+1];
for(int i=1;i<=n;i++)
{
cin>>ac[i];
}
for(int i=2;i<=n;i=i+2)
{
if(ac[i]==b){cout<<"yes"<<endl;c... |
27ba1285e6421ed7cc11090c395ebd4df18e9176 | 1e72f21c69ea28f4b83e4e53b1789707c13b879d | allentc/pgadmin3-lts | /pgadmin/pgscript/objects/pgsVariable.cpp | C++ | cpp | 2,430 | permissive | //////////////////////////////////////////////////////////////////////////
//
// pgScript - PostgreSQL Tools
//
// Copyright (C) 2002 - 2016, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////////////////
#include "p... |
11f59141e23683cb96e5278d7167497556c31167 | 8bd493f88cdd8d1ca40c24f6dbe7bf0140f74317 | growlercab/VTK | /Common/DataModel/Testing/Cxx/UnitTestPlanesIntersection.cxx | C++ | cxx | 14,561 | permissive | /*=========================================================================
Program: Visualization Toolkit
Module: UnitTestPlanesIntersection.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
Thi... |
79ed2d041cf31dded8dd85f2bfb27b8cc3e924a0 | d9685b0872065ea39db304a36fb7d860681d3796 | moscoquera/facerecognition-cuda-mpi | /src/cuda/cuUtils.hpp | C++ | hpp | 1,348 | no_license | /*
* utils.hpp
*
* Created on: May 12, 2017
* Author: smith
*/
#ifndef UTILS_HPP_
#define UTILS_HPP_
#include <stdlib.h>
#include <vector>
#include <stdio.h>
#include <iostream>
#include <cublas_v2.h>
namespace cu{
#define CUDA_CHECK_RETURN(value) CheckCudaErrorAux(__FILE__,__LINE__, #value, value)
#def... |
526f27303b5aca3205b9c9f0e39b33393d2a7006 | 373a4598bbf8f3556084fe5fc27019bea406f05b | S4nop/Baekjoon | /prob1654.cpp | C++ | cpp | 358 | no_license | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll line[10100];
int main(){
ios_base::sync_with_stdio(0);
ll k, n, ans;
ll sum = 0, mn = 99999999;
cin >> k >> n;
for(int i = 0; i < k; i++){
cin >> line[i];
sum += line[i];
mn = min(mn, line[i]);
}
... |
4e7575bf83883518658bcae0345c1ed145bc0f32 | 1166fc8bf6b7a3f974bb4e0b77a5a24f68e84b33 | cppascalinux/zhengrui10 | /fujia14_0417/b/b2.cpp | C++ | cpp | 2,529 | no_license | //2019.04.17
//zroj644 B. 道路修建 最小割建模+网络流
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<queue>
#define db long double
#define eps 1e-8
#define inf 0x7F7F7F7F
using namespace std;
int n,m,tot=1,st,ed;
int t[69];
int w[69][69];
int hd[4009],eg[10000009],nxt[10000009],ca... |
51ce578e55bfe20a25b6a0c20c0c46e6d209f914 | ba99e9a46a47174bd315352202cd75c79062da69 | pacol85/Test1 | /build/Android/Debug/app/src/main/jni/_root.TitleText.cpp | C++ | cpp | 8,452 | no_license | // This file was generated based on '.uno/ux11/TitleText.g.uno'.
// WARNING: Changes might be lost if you edit this file directly.
#include <_root.TitleText.h>
#include <Fuse.Elements.Element.h>
#include <Uno.Float.h>
#include <Uno.Float4.h>
namespace g{
// public partial sealed class TitleText :2
// {
// static Tit... |
ed66b7b54ad3994d9e3d9689496293d3e9310722 | 6f7cde19548bbe663b21ce3ddc17c6cb15bf35b9 | apurvnagvenkar/CTranslate2 | /src/ops/softmax.cc | C++ | cc | 846 | permissive | #include "ctranslate2/ops/softmax.h"
#include "../device_dispatch.h"
namespace ctranslate2 {
namespace ops {
LogSoftMax::LogSoftMax()
: SoftMax(/*log=*/true) {
}
SoftMax::SoftMax(bool log)
: _log(log) {
}
void SoftMax::operator()(const StorageView& x, StorageView& y) const {
... |
b8d1d881527f1b8fdf49a53d382b719f0132ac19 | 9c04ad79b7d04b3dce06881013adf29b94c6a9db | SaineeNihar/Graph | /Krushkal.cpp | C++ | cpp | 1,748 | no_license | #include<bits/stdc++.h>
using namespace std;
class Graph
{
public:
int u, v, w;
};
int find(int par[], int x)
{
while (x != par[x])
x = par[x];
return x;
}
void Union(int par[], int rank[], int r, int s)
{
r = find(par,r);
s = find(par,s);
if (rank[r] > rank[s])
par[s] = r;
else
par[r]... |
1310f0e0c166ac5a3e5e2b5fe8fbf390600750dc | f327cbeeef0b68e2e4edd4be6384e770491fc86c | abeir/syberh-plugins | /qrcode/src/qrcode/decodethread.cpp | C++ | cpp | 3,647 | no_license | #include "decodethread.h"
#include <QDebug>
#include <QImage>
#include <QFile>
#include "cqrcoder.h"
#include <errno.h>
#include "qandroidmultimediautils.h"
#ifdef S1
#include "gralloc_priv.h"
#include <gst/egl/egl.h>
#include <hybris/eglplatformcommon/hybris_nativebufferext.h>
#include <hybris/eglplatformcommon/nativ... |
8c82254a84123b0cfb67548a2d497c1c9dbce649 | d7ff4cef45f83109a866d726f419e326f9d67c29 | TianchunH97/LeetCode | /Easy/700_Search_in_a_Binary_Search_Tree.cpp | C++ | cpp | 688 | no_license | // LeetCode 700: Search in a Binary Search Tree
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(in... |
008477a71d8d4dbee2f288e76c409c23a272ef2a | d36ca450ee6ddb705f7f406864a3b537ac660ad5 | Motherfoka/Taller-No3 | /PUNTO 3/EJERCICIO A.cpp | C++ | cpp | 484 | no_license |
/*
* programa: area de 5 circunferencias de radios
* fecha: 22 de agosto de 2018
* elaborado por: edwar gaviria
*/
#include <stdio.h>
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
float area, radio;
int i;
for (i = 1; i <= 5; i++)
{
printf("introduzca el radio %d: \n"... |
dc8cfb3607e67644a448d18efa7f1c008c63d97f | a6fd11ef043f0e2a7b1a6e97cf12295fb0b959ff | tpurtell/android-cpp-sdk | /android-cpp-sdk/platforms/android-9/android/os/ResultReceiver.hpp | C++ | hpp | 4,975 | permissive | /*================================================================================
code generated by: java2cpp
author: Zoran Angelov, mailto://baldzar@gmail.com
class: android.os.ResultReceiver
================================================================================*/
#ifndef J2CPP_INCLUDE_IMPLEM... |
ab72344873d8cbd6aa46fdf9811688cd7cbc23e0 | d8abb0aaefe187ba25dd7161414c03dda5f9a7b8 | WhiZTiM/coliru | /Archive2/5c/c8bd4a4f9c12b7/main.cpp | C++ | cpp | 1,148 | no_license | #include <iostream>
#include <map>
#include <utility>
#include <string>
template <typename T>
struct executioner {
inline static void exec( const T & ){
std::cout << "generic" << std::endl;
}
};
template <typename T1, typename T2>
struct executioner<... |
76889070fb2662cf5540f74eb3ea22c84ed29283 | 806fdc42ac20d874f88cb589b4834d384cedc0ce | zhiics/tvm | /nnvm/tests/cpp/tuple_test.cc | C++ | cc | 677 | permissive | #include <dmlc/logging.h>
#include <gtest/gtest.h>
#include <nnvm/tuple.h>
TEST(Tuple, Basic) {
using nnvm::Tuple;
using nnvm::TShape;
Tuple<int> x{1, 2, 3};
Tuple<int> y{1, 2, 3, 5, 6};
x = std::move(y);
CHECK_EQ(x.ndim(), 5);
Tuple<int> z{1, 2, 3, 5, 6};
std::ostringstream os;
os << z;
CHECK_EQ(... |
f2fcbb45c7f357d9706ce97aff062e14bcb387a5 | ee8212dc639c3e85da88eb7f3f58d64d3215383b | GuiguiLaGuimauve/RType | /client/include/core/ManagerClient.hh | C++ | hh | 1,148 | no_license | //
// ManagerClient.hh for ManagerClient in /home/lecoq_m/RType
//
// Made by Maxime Lecoq
// Login <maxime.lecoq@epitech.eu>
//
// Started on Fri Dec 2 15:50:05 2016 Maxime Lecoq
// Last update Wed Dec 21 02:00:04 2016 julien dufrene
//
#ifndef MANAGERPCLIENT_HH_
# define MANAGERPCLIENT_HH_
# include "IManager... |
fcfbcb56cd7d6413b2675ccd5c8178b312d31ab7 | bb0cdff58b91e3f89c7ae2625e25161c257ef37a | conset/ticket-system | /.localhistory/F/school/year4/courses/DBpractice/ticket system/ticket system/ticket system/1601898451$ticketsystem.cpp | C++ | cpp | 2,385 | no_license | #include "ticketsystem.h"
#include <QDebug>
CRITICAL_SECTION cs;
ticketsystem::ticketsystem(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
InitializeCriticalSection(&cs);
}
void ticketsystem::on_pushButton_clicked()
{
// initialize
QString totalNumText = ui.lineEdit->text();
if (VerifyNumber(... |
b4cb5b7eb329f98082725d9f4d44957770087d7b | 5e17765f95e42160c72fc385977011a2da80de1b | hunya11/Tetris | /Block.cpp | C++ | cpp | 1,641 | no_license | #include "Root.h"
Block::Block(void)
{
this->Init();
}
Block::~Block(void)
{
}
void Block::Init(void){
this->SizeX(36.0);
this->SizeY(36.0);
this->status = STATUS::NONE;
this->blockType = Block::FORM::NONE;
}
void Block::UpData(void){
if(status == STATUS::NONE){
Texture(GetColor(255,255,255));
}else{
... |
05325201558f0f871fa19d710e9aad3a3c4354d1 | 5abad812ee3b5fbdda7e8319aca9b00c4bd5c0b9 | heswiki/TySOM | /SDx-platforms/2017.2/TySOM_2_7Z045_FMC2_FMC_VISION_FMC3_FMC_ADAS/sw/config0_0/inc/include/include/imgproc/xf_bilateral_filter.hpp | C++ | hpp | 19,555 | no_license | /***************************************************************************
Copyright (c) 2016, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must reta... |
b204a35934961921974aeab02ed6167f55ecb5a4 | 79bedfec85cd23bf0649c75ec47a6c4948522a54 | Chomtana/cptraining | /toi/B2/snowflake.cpp | C++ | cpp | 917 | no_license | #include <bits/stdc++.h>
#define for1(a,b,c) for(int (a)=(b);(a)<(c);(a)++)
#define for2(i,a,b) for(int (i)=(a);((a)<=(b)?(i)<=(b):(i)>=(b));(i)+=((a)<=(b)?1:-1))
#define until(x) while(!(x))
#define all(x) x.begin(),x.end()
#define mp make_pair
#define subfunc(ret,name,args) function<ret args> name; name = [] args
u... |
94396e213e4ec18c4c8a668cafda0545e785078a | fdf5939e4d203a205ad6ff50c066dfedf9689291 | lukeenterprise/aws-sdk-cpp | /aws-cpp-sdk-pinpoint/source/model/SMSTemplateResponse.cpp | C++ | cpp | 4,776 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
c0587833cd957ea3595e419285e36ac4372222ba | d6afd52d15a04711fd753be450d7011bca67a8fb | yf885188/BigWorld-Engine-1.9.1 | /src/tools/mayavisualexporter/matrix4.hpp | C++ | hpp | 3,823 | no_license | /******************************************************************************
BigWorld Technology
Copyright BigWorld Pty, Ltd.
All Rights Reserved. Commercial in confidence.
WARNING: This computer program is protected by copyright law and international
treaties. Unauthorized use, reproduction or distribution of this... |
169a7184d1a6fd19b2beba8e0af5bf5cddcdebc5 | 5ec2aef10bce471e6357c913d015218a714c9c6e | MrScabbyCreature/bitcoin | /src/rpc/net.cpp | C++ | cpp | 34,443 | permissive | // Copyright (c) 2009-2019 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 <rpc/server.h>
#include <banman.h>
#include <chainparams.h>
#include <clientversion.h>
#include <core_io.h>
#includ... |
73263180ff7f4380f02f5b64230bf9784c170213 | f239c8d4311990088f59422a55d069be3a312d98 | taskflow/taskflow | /taskflow/cuda/cuda_graph.hpp | C++ | hpp | 20,014 | permissive | #pragma once
#include "cuda_memory.hpp"
#include "cuda_stream.hpp"
#include "cuda_meta.hpp"
#include "../utility/traits.hpp"
namespace tf {
// ----------------------------------------------------------------------------
// cudaGraph_t routines
// ---------------------------------------------------------------------... |
92c683ca867ac7e18e624161946111d95f892c37 | 504396fa701193a0a678aaa0d1c2c7f5d8c46c36 | lmartin1978/phidgetpp | /include/DigitalOutput.hh | C++ | hh | 1,360 | no_license | #ifndef DIGIOUT_HH
#define DIGIOUT_HH
#include <iostream>
#include <cassert>
#include <stdio.h>
#include <phidget22.h>
#include "Phidget.hh"
namespace PhidgetPP {
class DigitalOutput: public PhidgetPP
/*! \brief Class for the Digital Output Capabilities on the HUB phidget
*
* Class interfaces with the C API for the ... |
e7ca0da43a26554c39a8e7b4a91d4cc06ef15a6c | d5af99c88cc733fb1cd3347c95b01000d34fd21e | madmandidj/github_work | /Experis/Network++/TCP_C++/Phase2/v8_improved/CommSock/CommSock.cpp | C++ | cpp | 1,560 | no_license | #include "CommSock.h"
#include "../NetExceptions/NetExceptions.h"
#include<unistd.h>
#include<stdexcept>
#include<errno.h>
namespace netcpp
{
static const size_t BUFFER_LEN = 256;
CommSock::CommSock(const FD_t& _fd)
{
m_fd = _fd;
m_isConnected = true;
}
CommSock::~CommSock()
{
if(m_isConnected)
{
close(m_fd.m_... |
736d90c620231ffa15344629ed912aa49ba152fb | 60120ff9777acf734c6eb85acad25bb242da0795 | novaquark/aws-sdk-cpp | /aws-cpp-sdk-dlm/source/model/ListTagsForResourceResult.cpp | C++ | cpp | 1,577 | permissive | /*
* Copyright 2010-2017 Amazon.com, Inc. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
d4c9f97c4aac0943e24f4a3afe9495b90b78582a | 98de3423dee28589ef82ee9f87e8f44e1dda8968 | DRFrederik/treefrog-framework | /src/tsqldatabasepool.cpp | C++ | cpp | 10,443 | permissive | /* Copyright (c) 2010-2019, AOYAMA Kazuharu
* All rights reserved.
*
* This software may be used and distributed according to the terms of
* the New BSD License, which is incorporated herein by reference.
*/
#include "tsqldatabasepool.h"
#include "tsqldatabase.h"
#include "tsqldriverextensionfactory.h"
#include "... |
a698a1f77ed324d0705ad1ca42a3f289a78217f9 | f654bd1a10eb71ba132eeb63de7c6c2cedc124c7 | dpariag/leetcode | /min_genetic_mutation.cpp | C++ | cpp | 2,345 | no_license | // Leetcode: https://leetcode.com/problems/minimum-genetic-mutation/description/
// Approach: Treat genes in the bank as the vertices of a graph.
// Then use breadth-first-search from the starting string, trying to reach the destination string.
// O(V+E) time/space
#include <vector>
#include <queue>
#include <unorde... |
2198a8c3ce605e3063e7958bb86baa83e37d92c8 | d69a196e357abfb5e97cb1ee75cfdf152baaa6ec | tcdonovan/firewalker_joysticks | /joystick.cpp | C++ | cpp | 4,238 | no_license | #include "joystick.h"
Joystick::Joystick(int whichJoystick, QObject *parent) : QObject(parent)
{
joy_fd=0;
num_of_axis=0;
num_of_buttons=0;
x=0;
// assert( (whichJoystick == 0) || (whichJoystick == 1) );
which_joystick_index = 0;
strJoystickName = JOY_DEV0;
if( whichJoystick == 1 )
... |
c23301ac07481f082d8d6d25b0eb52e43b059d64 | fc39b543ccca761f977b37c040d6330d8a66f268 | KojimaKazuki/Belle2MCPPMT | /MCP_PMT/Macro/macroTWC1.cc | C++ | cc | 9,857 | no_license | #include <iostream>
#include <sstream>
#include <stdio.h>
#include "TROOT.h"
#include "TH1.h"
#include "TMath.h"
//macroTWC1(const char *test*.root){
void macro_twc01(){
gStyle ->SetOptFit();
gStyle ->SetStatX(x = 0.88); //y at the top-right point of box;
gStyle ->SetStatY(y = 0.88); //y at the top-right p... |
0c273ef91879d69a5e2e539df1ab6fc0bde9a27d | f20123583d39108f18a8f898e2393b3da086ddbf | mirek190/x86-android-5.0 | /vendor/intel/hardware/camera3hal/platformdata/CameraConf.cpp | C++ | cpp | 33,457 | no_license | /*
* Copyright (C) 2012,2013 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
93f14c037bd9afcaa6e4dd17e62dbb5935a18a32 | 3866b66b53898637f5e61facf4ef7b21c2ab5433 | vinaghost/NMLT_BTMH | /tuan_03/hard_05.cpp | C++ | cpp | 510 | no_license | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <conio.h>
//VINAGHOST_18CTT2_FIT_HCMUS
//1 - 9 - 2018
//Please don't copy my code without permission
//Nhap gio - phut - giay va kiem tra tinh hop le
int main()
{
int h, m, s;
printf("Nhap gio: ");
scanf("%d", &h);
printf("Nhap phut: ");
scanf("%d... |
29dd6de755c68bb4526f0ed31a82e09e52a22aea | b617296119a0c246c1553b1b65c819f6e7c219ab | matinzd/myterminal | /commands/mkdir.cpp | C++ | cpp | 819 | no_license | #include "utils/database.h"
#include "headers/commands.h"
#include <iostream>
#include <regex>
#include <string>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/regex.hpp>
#include <boost/tokenizer.hpp>
void Commands::mkdir(string command, int directory_id)
{
string cmd = "... |
099751a52fa8cd7e4d0eb7fd39ee8059d7960cba | 8350359e1542d16480f79e92aebee3edba607503 | BenSliwa/rawData_batmanV | /results/Validation/Measurements/Scenario1/Traces/Delay/merge_delay_mobility.cpp | C++ | cpp | 1,980 | no_license | #include <iostream>
#include <sstream>
#include <vector>
#include <iterator>
#include <algorithm>
#include <fstream>
#include <string>
using namespace std;
template<typename Out>
void split(const std::string &s, char delim, Out result) {
std::stringstream ss(s);
std::string item;
while (std::getline(ss, i... |
2dde75212190d431c9252ce3403c8c3210156008 | 60f6c898e134a173d55fb966dda089782def1417 | Samsung/Castanets | /content/browser/service_worker/service_worker_installed_scripts_sender.cc | C++ | cc | 9,789 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/service_worker/service_worker_installed_scripts_sender.h"
#include "base/memory/ref_counted.h"
#include "base/trace_event/trace... |
8b382d18ff8389859a9a777e18da327f4185dec6 | c98bdef572e919e3f972396965766fae74a39ae2 | ksaveljev/UVa-online-judge | /10034.cpp | C++ | cpp | 2,109 | no_license | #include <iostream>
#include <vector>
#include <cmath>
#include <queue>
#include <iomanip>
using namespace std;
class UnionFindDisjointSets {
public:
UnionFindDisjointSets(int size);
int findSet(int a);
bool isSameSet(int a, int b);
void unionSet(int a, int b);
int numDisjointSets();
int size... |
4497c4f3ca50fc2e5d31c2ebf047e9af57ff4ebc | d21af8174341b772c78178d8b27daffba4207bc3 | AntonStark/spikard | /lib/mathlang/basics/primary.cpp | C++ | cpp | 1,275 | no_license | //
// Created by anton on 31.10.18.
//
#include "primary.hpp"
const AbstractTerm* PrimaryTerm::get(Path path) const
{ return (path.empty() ? this : nullptr); }
AbstractTerm* PrimaryTerm::replace(Path path, const AbstractTerm* by) const
{ return (path.empty() ? by->clone() : nullptr); }
AbstractTerm* PrimaryTerm::repl... |
da052453ed6d48ccc79a84761bf94b6dd06abdcc | 448fd2f75449f3af8713007f60706adadd90210c | Hrockets/algorithm_practice | /offer_4.cpp | C++ | cpp | 1,146 | no_license | /*剑指offer —— 4 重建二叉树
描述:输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。
假设输入的前序遍历和中序遍历的结果中都不含重复的数字。
例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2,1,5,3,8,6},则重建二叉树并返回。
*/
class Solution {
public:
TreeNode* reConstructBinaryTree(vector<int> pre, vector<int> vin) {
int pre_len = pre.size();
int vin_len = vin.size();
if (pre_len == 0 |... |
2cf6d36fb6196b16322eafdd82329ef3ee6b7ff5 | 97ff9d284cb799e3dd4d640e8c6e95da36415967 | LeeCheer00/leetcode | /Queue1.cpp | C++ | cpp | 1,118 | no_license | /*************************************************************************
> File Name: Queue1.cpp
> Author:
> Mail:
> Created Time: 2019年03月16日 星期六 10时23分38秒
************************************************************************/
#include<iostream>
#include<vector>
using namespace std;
class myQueue{
pr... |
9b04ec05dbd8c69aa512aa43593f9d37017e18c6 | 7b4547af2fde06998d40c6fb0782a3401377a090 | camil0palacios/Competitive-programming | /algorithms/Geometry/convex hull/jarvis.cpp | C++ | cpp | 1,313 | no_license | struct Pt {
int x, y;
Pt() {}
Pt(int x, int y): x(x), y(y) {}
bool operator==(Pt & p) { return x == p.x && y == p.y; }
const bool operator<(const Pt & p) const {
return make_pair(x, y) < make_pair(p.x, p.y);
}
};
int dist(Pt & p, Pt & q) {
int x = p.x - q.x;
int y = p.y - q.... |
20c71d7f5e3dc107944aa3478bd7132a5753a190 | 79eeac78cdf6d4fdaa81082ae9ef198fd80f220f | preciousidehen/for_loop_challenge | /for_loop_challenge.cpp | C++ | cpp | 1,070 | no_license | /*
precious idehen
program: hackarank for loop challenge question
*/
#include <iostream>
#include <cstdio>
using namespace std;
int main() {
// declaration of variable
int a, b;
cout<<"Enter two numbers: ";
cin>>a>>b;
for(a; a<=b; a++) {
if(a>=1 && a<=9) {
if(... |
300625ce77d989d1f41bd6eae0ce183943a8569c | 02fabadcc75861bcf08f03163faf1dc210abc44f | adinowi/ComputerGraphicsProject | /ComputerGraphicsProject/io/controls.hpp | C++ | hpp | 213 | no_license | #ifndef CONTROLS_HPP
#define CONTROLS_HPP
#include <glm/glm.hpp>
namespace io {
void ComputeMatricesFromInputs();
glm::mat4 GetViewMatrix();
glm::mat4 GetProjectionMatrix();
glm::vec3 GetPosition();
}
#endif
|
63657e2ba3604eea8133a11fd960c3317213b2a7 | fbfcc6e883b30e4db04ff117c3974213c33347c5 | percivalgambit/simpleBinutils | /src/emulator/emulator.cc | C++ | cc | 3,726 | no_license | #include "emulator/emulator.h"
#include <iostream>
#include "common/constants.h"
#include "common/instruction.h"
#include "common/opcode.h"
#include "emulator/accumulator.h"
#include "emulator/decode_instruction.h"
#include "util/panic.h"
#include "util/status.h"
#include "util/statusor.h"
using common::Instruction;... |
621f22ad2e98c354ff7186364271870177ae16ed | d70afa26c0d9b5dd6495bdf283eb80987e2617ae | eliasm2/problem-solving | /UVa/10616-DivisibleGroupSums.cpp | C++ | cpp | 2,144 | no_license | /*
* Problema:
* Tecnica Utilizada:
*
*
* Dificuldade:
* Complexidade:
* O( )
*/
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <ctime>
#include <cfloat>
#include <vector>
#include <string>
#include <cstdio>
#include <climits>
#include <cstdlib>
#inc... |
32a44016c3eb78669b207bf2f67a740239a1483a | 0742e986efe50f20b279b20b13dc7227b1472e70 | amir5200fx/Tonb | /TnbGeo/TnbLib/Geo/Entities/Triangulation/2d/Entity2d_TriangulationIO.cxx | C++ | cxx | 216 | no_license | #include <Entity2d_Triangulation.hxx>
#include <TecPlot.hxx>
namespace tnbLib
{
template<>
void Entity2d_Triangulation::ExportToPlt(OFstream& File) const
{
Io::ExportMesh(Points(), Connectivity(), File);
}
} |
7955fe9db578b29a45ae581e83d59e44e15651cd | 01bd61d55c6c2ec5536b1f4450b3f0b4505c42b6 | daisuke310vvv/Research | /ishida2/xml.cpp | C++ | cpp | 1,758 | no_license | /*
* xml.cpp
*
* Created on: 2012/10/26
* Author: y-kuwa
*/
#include "xml.h"
#include <iostream>
namespace std {
xml::xml(string str0) {
// TODO 自動生成されたコンストラクター・スタブ
//カメラパラメータが記述されたxmlファイルを開く
if ((cvfs = cvOpenFileStorage(str0.c_str(), NULL, CV_STORAGE_READ)) == 0) {
cout << "read error xml: " << str... |
622091bf47b3aa2504ff5db77c589803805b15df | 0e6be14445808cf277a842d16ab369fabd9d162e | dsg49/DataStructures | /Assignment 6/Part2/Assign06P2.cpp | C++ | cpp | 2,804 | no_license | #include <iostream>
#include <cstdlib>
using namespace std;
long rCalcPoly(int x, const int c[], int degree);
void rShowPoly(int x, const int c[], int degree, long value);
// write prototype for rShowPolyAux here
void rShowPolyAux(int x, const int c[], int degree, long value, int term);
int main()
{
int coeff[] =... |
6ddd9809035ce740e13d92da8c7dc5f47dd9d5f7 | 0f8bf024c4c81d4b329cd8782fdb9b2b5cfeb5af | OlivierBaudry/JamomaModular | /library/source/JamomaObject.cpp | C++ | cpp | 1,340 | permissive | /*
* Jamoma Shared Library: the global jamoma object
* Functions and resources used by Jamoma objects.
* By Tim Place, Copyright © 2007
*
* License: This code is licensed under the terms of the "New BSD License"
* http://creativecommons.org/licenses/BSD/
*/
#include "JamomaObject.h"
// statics and globals
s... |
50726305a1ea7e53b17ad2c8456277083a5e0404 | fb6dd844254786e54ba5ef3938c12bb78190134b | malixian/oneDNN | /src/cpu/x64/injectors/jit_uni_binary_injector.cpp | C++ | cpp | 43,590 | permissive | /*******************************************************************************
* Copyright 2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... |
9784ab54db73d3b226c995e9dc0988fd867efb74 | cf4b1294c7851d87060381f4b573f9a94491d85d | mono/lldb | /source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp | C++ | cpp | 43,145 | permissive | //===-- CPlusPlusLanguage.cpp -----------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
b5a38dce0629e931aa194f29df1f367b91d0f971 | 929ff24f350cf283e70fb5c56d0cd593bf06c0cc | WesleySweazey/Bonic-Bnuckles | /19W_GAM1573_Game2/Game/Source/Scenes/PostEffectScene.cpp | C++ | cpp | 3,642 | no_license | #include "GamePCH.h"
#include "PostEffectScene.h"
#include "Game/Game.h"
#include "Game/ResourceManager.h"
#include "Game/Scene.h"
#include "Game/ObjectPool.h"
#include "GameObjects/CameraObject.h"
#include "GameObjects/OrthoCameraObject.h"
#include "GameObjects/GameObject.h"
#include "GameObjects/Player.h"
#include "... |
e1287d76f9217c52535b02a8fa7d9e1ffe3b726f | 46c500376c28b2e0ef8e2841e7c668652c75e9e9 | alphaCoderVishal/my-learning-c- | /addition of odd place input and even place input in array.cpp | C++ | cpp | 593 | no_license | #include<stdio.h>
#include<math.h>
int add (int x,int y);//function prototype
int main()
{
int i,n,j,odd,even;
odd=0;
even=0;
printf("to find the sum of odd position number and even position number \n");
printf("enter the number of number of input\n");
scanf("%d",&n);
int a[n];
for (i=0;i<=(n-1);i++... |
837581f492993cff9fb9ee4d88e28b2c22de9601 | e33cded3afaf8410df4e402f6ef3dc4cccc8ac7f | Hughtech/enigma-dev | /ENIGMAsystem/SHELL/Universal_System/Extensions/BasicGUI/labels.cpp | C++ | cpp | 9,973 | no_license | /** Copyright (C) 2014-2015 Harijs Grinbergs
***
*** This file is a part of the ENIGMA Development Environment.
***
*** ENIGMA 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, version 3 of the license or an... |
06ced3e9273f0570493c59aa888ed87474e6c9d0 | be07d9d4410976b69b5dd26ff5e23d1f7b5b5030 | massbrowser/android | /third_party/WebKit/Source/core/dom/ClientRectList.cpp | C++ | cpp | 1,933 | permissive | /*
* Copyright (C) 2009 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
629fd91328c08e1e503392970a3b87536ae1e6cf | 34b251e29ab90fc6e2c72068412b79f2ab9bfd3f | 0APOCALYPSE0/Algorithm-Concepts | /String/sanket_and_string.cc | C++ | cc | 568 | no_license | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define endl "\n"
int main(){
#ifndef ONLINE_JUGDE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
freopen("error.txt","w",stderr);
#endif
int m=0,n,i=0,j=0,count;
string s;
cin >> n >> s;
... |
5973e1dc355e4ad8627a258b1f8115cec972a67c | f55c14f042c31a9969e5a8443a532bd65c7ce224 | iq85k/openHASP | /src/hasp_gui.cpp | C++ | cpp | 22,026 | permissive | /* MIT License - Copyright (c) 2019-2021 Francis Van Roie
For full license information read the LICENSE file in the project folder */
#include "hasp_conf.h"
#include "lv_conf.h"
#include "lvgl.h"
#include "lv_drv_conf.h"
// Filesystem Driver
#include "lv_misc/lv_fs.h"
#include "lv_fs_if.h"
// Device Drivers
#inc... |
8c3c1bad3320e67094501403a6b83311a92202be | 5ac11f76fc5881c4516208e20f668325781f43b9 | peykaf/trajectory_framework | /trajectory_framework/include/DVConstraint.hh | C++ | hh | 3,821 | permissive | #ifndef DVConstraint_H
#define DVConstraint_H 1
#include <vector>
#include <utility>
#include "json.hh"
#include "SparseDose.hh"
class DVConstraint {
public:
DVConstraint();
DVConstraint(nlohmann::json &dv_json);
double calculate_unsorted_cost(std::vector<std::pair<int, double> > &struct_do... |
3033503e3606b404d7ebbd19ec4d404a343d3e62 | 420234a497c71d4d7089aa74e880d5510cefafda | eti-p-doray/inf8702 | /poisson-image-editing/src/clone.cpp | C++ | cpp | 8,238 | permissive | /**
This file is part of Poisson Image Editing.
Copyright Christoph Heindl 2015
Poisson Image Editing 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 version 3 of the License, or
(at your option) ... |
99e8f0769f8591ccda2f520d9dbdf8afbdc150d7 | 0cbf72ea97c10971b3b54bb7c37ba3d1b9975566 | EvolutionFS/muek | /Plugins/KBE/Source/KBE/Private/KBECharacter.cpp | C++ | cpp | 4,427 | no_license | #include "KBECharacter.h"
#include "DrawDebugHelpers.h"
#include "Kismet/KismetMathLibrary.h"
#include "KBE.h"
#pragma optimize("", off)
AKBECharacter::AKBECharacter()
{
PrimaryActorTick.bCanEverTick = true;
Entity = nullptr;
}
void AKBECharacter::BeginPlay()
{
Super::BeginPlay();
UCharacterMovemen... |
e42eb618c00b2a5d01336f1448878fc948e6a15a | ca6a4a1bdae3f4e6e8d7c87a334a8ef6c64f595b | yangxw8820/chromium | /media/capture/video/video_capture_device_unittest.cc | C++ | cc | 24,602 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/capture/video/video_capture_device.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <utility>
#include "base/b... |
045936224ebc16adb35ef24c4da6ac6b6939d4e6 | ebd2f851302c27db2e86a225d7c1c8a83e1d1d3b | MonkeyD-IchiJou/OldStuffOpenSourceNow | /XOFEngine/XOFEngine/DebugMesh.cpp | C++ | cpp | 5,628 | no_license | #include "DebugMesh.h"
#include "MyMath.h"
#include "vec4.h"
using namespace Math;
namespace pp
{
DebugMesh::DebugMesh(void) : instanceBuffer(0)
{
}
DebugMesh::~DebugMesh(void)
{
if (instanceBuffer != 0)
{
glDeleteBuffers(1, &instanceBuffer);
}
Clear();
}
bool DebugMesh::LoadMesh(const std::string ... |
8b0e423705df060a82f523b9f04fbe08efe313e9 | 4b714225b9ce5436c3f5528ce301b018f655d937 | mrdoto/osiris | /osiris/OsirisAnalysis/CPanelLabNameStrings.cpp | C++ | cpp | 8,867 | no_license | /*
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It w... |
e61c5180f660b3c9dd61a92d90ff0cabe884c411 | e60afcdbb57b502c778a2c41889b2a3f98a629dc | bwrsandman/OSVR-RenderManager | /examples/RestartD3D.cpp | C++ | cpp | 20,197 | permissive | /** @file
@brief Example program that uses the OSVR direct-to-display interface
and D3D to render a scene with a spinning cube. It also does
a restart (deletion and contruction) of the RenderManager it
is using from time to time.
@date 2015
@author
Russ Taylor <russ@s... |
e677ce497b1aa98347e01700701a212c88d400d1 | 6d8dc6e94fc6a133ed4eacc84d199da8b69c1bca | dizuo/embree | /kernels/common/geometry.cpp | C++ | cpp | 8,085 | permissive | // ======================================================================== //
// Copyright 2009-2018 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... |
2bebcf4132cf416949dc76783988364ed1cff9c9 | 8014255ad65ea8ca32845e66413dcc6977e516e9 | BackupTheBerlios/codelite-svn | /trunk/CodeLite/cpp_comment_creator.cpp | C++ | cpp | 1,440 | no_license | #include "cpp_comment_creator.h"
#include <wx/datetime.h>
#include <vector>
#include "language.h"
CppCommentCreator::CppCommentCreator(TagEntryPtr tag)
: m_tag(tag)
{
}
CppCommentCreator::~CppCommentCreator()
{
}
wxString CppCommentCreator::CreateComment()
{
if(m_tag->GetKind() == wxT("class"))
r... |
73600ae79a0f34428e009d20a6e83103d4e66898 | df699063d1d180a59182d38a0cfc53e8ffaf7acb | Arnaud-Patra/Mesh-Generation | /advancingFront/test/if seg1=seg2.cpp | C++ | cpp | 1,618 | no_license | #include <iostream>
#include <ctime>
#include <cstdlib>
#include <string>
#include <vector> //for Mesh and Front
#include <math.h> //For sqrt(3)
#include <fstream> //readfile
using namespace std;
void Round(float * seg = nullptr, int n =2){
int rnd = pow(10,n);
seg[0] = roundf(seg[0] * rnd) / rnd;
seg[1] = ro... |
c09da4fd41fc414911b594076661d4cfd59e5f12 | 77950f318495c39a28d6809f567397dcb5c4d117 | willmorley/Computer-Graphics-Assignments | /Bounding-Volume-Hierarchies/src/point_AABBTree_squared_distance.cpp | C++ | cpp | 1,860 | no_license | #include "point_AABBTree_squared_distance.h"
#include "point_box_squared_distance.h"
#include <queue> // std::priority_queue
bool point_AABBTree_squared_distance(
const Eigen::RowVector3d & query,
const std::shared_ptr<AABBTree> & root,
const double min_sqrd,
const double max_sqrd,
double & sqrd,
... |
d51a29b7a4854f46afcca5d2025aa0ee523a81e6 | 8b08e1415b62cbb76fa658d7ab4e95726159b7a6 | compounddev/Compound-Coin | /src/test/Checkpoints_tests.cpp | C++ | cpp | 1,090 | permissive | //
// Unit tests for block-chain checkpoints
//
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
#include <boost/test/unit_test.hpp>
#include <boost/foreach.hpp>
#include "../checkpoints.h"
#include "../util.h"
using namespace std;
BOOST_AUTO_TEST_SUITE(Checkpoints_tests)
BOOST_AUTO_TEST_CASE(sanity)
{
... |
be9cf0b2e215c3b69ce3655a4820d41670ee038c | c7da6c2051b3bebe259ee88e8f78c517c20a1805 | nikitamikhaylov/ClickHouse | /src/Disks/IO/ReadBufferFromWebServer.cpp | C++ | cpp | 4,863 | permissive | #include "ReadBufferFromWebServer.h"
#include <base/logger_useful.h>
#include <base/sleep.h>
#include <Core/Types.h>
#include <IO/ReadWriteBufferFromHTTP.h>
#include <IO/ConnectionTimeoutsContext.h>
#include <IO/WriteBufferFromString.h>
#include <IO/Operators.h>
#include <thread>
namespace DB
{
namespace ErrorCodes... |
84fd543fa6aee48e2d12d34cc11bc7933d479f55 | 6972d534281f9406e846ff8305c36cd49af1d859 | hackerlank/Mengine | /src/Kernel/Node.cpp | C++ | cpp | 29,799 | no_license | # include "Kernel/Node.h"
# include "Interface/RenderSystemInterface.h"
# include "Interface/NodeInterface.h"
# include "Logger/Logger.h"
namespace Menge
{
//////////////////////////////////////////////////////////////////////////
Node::Node()
: m_active(false)
, m_deactivating(false)
, m_af... |
ef52833342cf3ed4b49b3c073b6161acd42e2b90 | de54003029ca4c55235c9d5099456b7a44e60505 | TheRealBazhen/MiniJava | /irtree/function_mechanism/address/address.cpp | C++ | cpp | 1,020 | no_license | #include <irtree/function_mechanism/address/address.h>
#include <irtree/nodes/expression/binary_operation.h>
#include <irtree/nodes/expression/constant.h>
#include <irtree/nodes/expression/memory_access.h>
#include <irtree/nodes/expression/temporary.h>
namespace IR {
RegisterAddress::RegisterAddress(const Temporary& ... |
e434e22ea31e471cb5f597491cdef5afd76002a3 | 351ee16feab28db6b6f3cfe6723d464c6d15a544 | duankai/udp | /DB.cpp | C++ | cpp | 3,346 | no_license |
#include "DB.h"
MySqlDB::MySqlDB(PCHAR pacUserName ,
PCHAR pacPassword ,
PCHAR pacDataBase ,
PCHAR pacHostIP ,
UINT32 nPort)
{
_pacUserName = pacUserName;
_pacPassword = pacPassword;
_pacDataBase = pacDataBase;
_pacHostIP = pacHostIP;
_nPort = nPort;
mysql_init(&_stConn);
if (!mysql_real_connect... |
c563c98df85374167e8a528d82f09c2f00773e71 | cd34097de9836e3d0db6fb3fa3d168d72656c19c | uel-dataexchange/Opencascade_uel | /inc/TColgp_DataMapOfIntegerCirc2d.hxx | C++ | hxx | 2,847 | no_license | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _TColgp_DataMapOfIntegerCirc2d_HeaderF... |
cf9d62c444c310c0e92933e76012c40881f1a4f5 | e1f8ddac77e8fd9a6f6bd2bbc086f4dd0ef96637 | jiangjiaqi6/gbbs | /utils/generators/RMAT.cc | C++ | cc | 1,595 | permissive | #include "rmat.h"
#include "gbbs/gbbs.h"
#include <iostream>
#include <fstream>
namespace gbbs {
int BuildRMAT(int argc, char* argv[]) {
commandLine P(argc, argv, "");
size_t n = P.getOptionLongValue("-n", 1UL << 20);
size_t m = P.getOptionLongValue("-m", 1UL << 23);
double a = P.getOptionDoubleValue("-a"... |
38f173da67ed36f17fce3caf9faf649fd955a0ba | b54bfa1da5363bf6ef910eaa1e528035781699b3 | DavidLiedle/sdk | /runtime/lib/ffi.cc | C++ | cc | 10,359 | permissive | // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "include/dart_api.h"
#include "include/dart_api_dl.h"
#include "include/dart_native_api.h"
#in... |
344d09bd79c6724c5bb9a28ba62d47d4ac1fd334 | 123ceb99e5c06d4b655ec18c698f909a56c9bc14 | KatV/03_BuildingEscape | /BuildingEscape/Source/BuildingEscape/PositionReport.cpp | C++ | cpp | 1,025 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "BuildingEscape.h"
#include "PositionReport.h"
// Sets default values for this component's properties
UPositionReport::UPositionReport()
{
// Set this component to be initialized when the game starts, and to be ticked e... |
322ec0662d83e3b24d18c93c00b0d766d255944c | 2980b90fc4793e74a0478cb005373ee51e5c62e0 | melodylail/proxygen | /proxygen/lib/http/session/HTTPSession.cpp | C++ | cpp | 95,703 | permissive | /*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... |
8ddaa80797516ef38a2cfecf2850f92d72fbfab6 | 4aef2017a745ea12fdf32618af4e5e2b8026b84e | Patrick-Heyer/Sabina-patrick | /MDP/pspudd_pat.hh | C++ | hh | 25,906 | no_license | #ifndef _SPUDD
#define _SPUDD
#pragma once
// MDP CLASS
// By Jesse Hoey & Robert St. Aubin
// this class encapsulates an MDP and represents/does calculations on the
// components of the MDP using ADDs. This code was ripped from MVPSpudd in April 2003
// and esentially combines PSpudd.cc and JAPRICODD.cc into a single... |
b32b8e9da294a6ab3629c8778820765e878be564 | cb62d725027f87a7496cdc05b9323a5a827eba84 | talishevskiy92/Tool-rental | /Unit12.cpp | C++ | cpp | 1,011 | no_license | //---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit12.h"
#include "Unit1.h"
#include "Unit10.h"
#include "Unit11.h"
#include "Unit2.h"
#include "Unit3.h"
#include "Unit4.h"
#include "Unit7.h"
#include "Unit8.h"
#include "Unit9.h"
#include "Unit... |
e5274fd97397701f742d16d39806190193247ac2 | f78af550659a0c7a0d479e7c6273d1f23c398d44 | frankilfrancis/KPO_HMI_vs17 | /Tools/Simulator/Simulator/CTlgContainerSortForm.cpp | C++ | cpp | 10,130 | no_license | #include "StdAfx.h"
#include "CTlgContainerSortForm.h"
#include "CTlgElemWrapper.h"
#include "CTlgElem.h"
//-------------------------------------------------------------------
using namespace simulator;
//-------------------------------------------------------------------
System::Void CTlgContainerSortForm::buttDown_Cl... |
6c7c0ffbfb1d08ca464403e769aea6a5823dd90a | f2378e83c0c4fef03dee1e8db42a756a0bfd5464 | yohstone/programming-practice | /interview and test/bytedance-3.cpp | C++ | cpp | 1,526 | no_license | #include<iostream>
#include<unordered_map>
using namespace std;
int main(){
int N;
unordered_map<int, int> workers;
cin >> N;
cout << workers.max_size()<< endl;
while(N--){
int years;
cin >> years;
auto ret = workers.insert( {years, 100} ); // 初始化为 100
cout << ret.fir... |
f8cf57e696dc450a4d61342d41869b1390cc5360 | 8cad81fe1a1446a88aa53e1a5c61d14e8f03e5a2 | jcraighe/CSCI-2270 | /DataStructures/SortingAlgs.cpp | C++ | cpp | 3,836 | no_license | #include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
void selectSort(int arr[], int n)
{
int index_min_value;
int temp;
for (int i=0; i<n-1; i++) // outer loop tracks the sorted portion of the list
{
index_min_value = i; //set index_min_value to the current index of array
for (i... |
ea60dd59405fb57c2740afc7e940ff4d508409b0 | d711cc71a44494f213b4256d3fb0f80387e64b88 | yexihu/hltypes | /src/platform/WinRT_platform.cpp | C++ | cpp | 561 | permissive | /// @file
/// @version 3.0
///
/// @section LICENSE
///
/// This program is free software; you can redistribute it and/or modify it under
/// the terms of the BSD license: http://opensource.org/licenses/BSD-3-Clause
#ifdef _WINRT
#include "hplatform.h"
#include "hstring.h"
namespace hltypes
{
void _platformPrint(c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.