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 |
|---|---|---|---|---|---|---|---|---|
5ae583120994318bd19bbb66828db90ef4b212a8 | 0c25298ac7e7d5f4a2034d56caa0f151e112cc70 | dulton/53_hero | /RenderSystem/GLES/GLESUtil.cpp | C++ | cpp | 3,285 | no_license | /*****************************************************/
// Copyright © 2007-2012 Navico
// Confidential and proprietary. All rights reserved.
/*****************************************************/
#include "GLESUtil.h"
#if defined Q_WS_QWS || defined QT_OPENGL_ES_1
// STL Headers
#include <sstream>
#include <... |
98410a45e9962e2f019c3e5d1fc553b9caf5e593 | 02692b0e3af2efebd695fa7a16a44822619ec0e5 | channan/OSU | /CS162/Lab4_Hannan_Cody/inputValidation.cpp | C++ | cpp | 1,783 | no_license | /************************************
* Program name: inputValidation.cpp
* Author: Cody Hannan
* Date: 2/5/17
* Description: Contains validation methods for user inputs.
***********************************/
#include "inputValidation.hpp"
#include <iostream>
#include <string>
using std::cout;
using std::cin;
usi... |
bbf484e19b34f510b1c3c0c8a2403f4759d35c3e | 256dff76d6fbc3f3fdbde89c16d567b2efef1e6d | reqshark/io.js | /src/cares_wrap.cc | C++ | cc | 37,581 | permissive | // Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modi... |
a0fdbcf81c432db1ccfb7ad419dfa349db9944ca | f4fec8d0efaba4884eb3bcf1b1aa70dc8705ecf7 | netconstructor/tilelive-s3 | /src/decode.hpp | C++ | hpp | 2,918 | no_license | #ifndef NODE_DECODE_SRC_DECODE_H
#define NODE_DECODE_SRC_DECODE_H
#include <v8.h>
#include <node.h>
#include <node_version.h>
#include <node_buffer.h>
#include <png.h>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <tr1/memory>
#include "reader.hpp"
#if NODE_MAJOR_VERSION == 0 ... |
28769d54c9142eeeac8e9f58d636a408d06390c2 | 0e81912d0e6620e077f460f4926c32b10e626ad7 | jssstu-lab/computer-networks | /Part A/Unit 1/Client.cpp | C++ | cpp | 1,225 | permissive | // Computer Network Laboratory - CS58L
// 5th Sem 2020-21
// https://github.com/jssstu-lab/computer-networks
// CPP client program to make the client send the file name
#include <stdio.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <unistd.h>
int main()
{
int soc, n;
char buffer[1024], fname[50];
... |
41dd0ebaa21a8b013aef1b974e69013327e60035 | 7085f93c95ab0c2010414b0b1aa51eb718cf7fd1 | ECS-251-W2020/chromium | /chrome/browser/resource_coordinator/tab_lifecycle_unit_source.cc | C++ | cc | 20,609 | 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 "chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h"
#include "base/bind.h"
#include "base/logging.h"
#include "base/stl_util.h"
#i... |
b08b6ec2f827b81ea1341b8f7c303aa2ee267b48 | b1eeb80a42bebd95ee4c377fac112e1824d1a7fb | applezhao/MpmMaya | /MpmCore.cpp | C++ | cpp | 27,510 | no_license | #include "stdafx.h"
GridField::GridField( const Vector3f& grid_size, const Vector3f& grid_min, const Vector3i& grid_division, int boundary)
{
this->grid_size=grid_size;
this->grid_min=grid_min;
this->grid_division=grid_division;
this->grid_max=grid_min + grid_size.cwiseProduct(grid_division.cast<float>());
this->... |
1e76943d1757100135c5edb46c0148df14fc2f48 | bbf7cd8c754e39e2d74f57c03ddbd70c01dbf123 | allison-7/ENGI_3891 | /A2/Course.cpp | C++ | cpp | 688 | no_license | #include "Course.h"
Course::Course(unsigned int number, Level level, unsigned int capacity)
: v_course(number), v_level(level), v_capacity(capacity), v_seatsRemaining(capacity), enrolled(0)
{
}
bool Course::registerStudent(bool overriderLimits)
{
if(v_seatsRemaining != 0)
{
v_seatsRemaining--;
enrolled++;
ret... |
9371606ab5617048342f3a67abfc2893f7325523 | 4d3b99f7c2e5fb7b6e8fcc8f062f80fdb2738a6f | Emrace/oop-fmi-2016 | /Exam 1/71623_2.cpp | C++ | cpp | 3,027 | no_license | #include<iostream>
#include<iomanip>
#include<string>
using namespace std;
struct Product
{
char name[40];
int quantityInStore=100;
int quantityAvailable;
double priceInCafeteria;
double priceCafeteriabuy;
};
struct Cafeteria
{
Product product[20];
double account=0;
void createProducts(Cafeteria *p,int n);//no... |
67cd65c1378d5934adb68a6e7a163a106b06a1c4 | 006acd17972c473d14382daed9053bd0482b6391 | pnck/2016problems | /problem2/clientdll/rpcdef_c.cpp | C++ | cpp | 6,959 | no_license |
/* this ALWAYS GENERATED file contains the RPC client stubs */
/* File created by MIDL compiler version 8.00.0603 */
/* at Wed Oct 12 04:42:32 2016
*/
/* Compiler settings for rpcdef.idl:
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.00.0603
protocol : dce , ms_ext, c_ext, robust
error chec... |
deb075a46ed6eb82869ff55b823d9779ac0efc5d | 0b663e8a590abb0ff31a18cb2db3b488771fc8b2 | niuxu18/logTracker-old | /second/download/httpd/gumtree/httpd_patch_hunk_1347.cpp | C++ | cpp | 1,735 | no_license |
modssl_set_cert_info(info, x509, pkey);
return TRUE;
}
+ ca_cert_chains = sc->proxy->pkp->ca_certs;
for (i = 0; i < sk_X509_NAME_num(ca_list); i++) {
ca_name = sk_X509_NAME_value(ca_list, i);
for (j = 0; j < sk_X509_INFO_num(certs); j++) {
info = sk_... |
0575b0494e4c0efcbaa05a8e5f81cd218a5003da | 6061115a605df6adb9b4db09d31cbace473d680f | shvrd/shvrdengine | /src/library/util/Math.cpp | C++ | cpp | 220 | permissive | //
// Created by thekatze on 22/10/2019.
//
#include "Math.h"
unsigned int Math::getNextPowerOfTwo(unsigned int value) {
unsigned int power = 1;
while (power < value)
power <<= 1;
return power;
}
|
a43895f2cf9aba82d0e2787e781df2993fdad91c | 7e63b3f2e60f674b71737350381d7d4c065022aa | JMK92/C_pp_Programming | /Day004/Reference_4/reference_4.cpp | C++ | cpp | 579 | no_license | /*
- Call By Value : 매개변수로 값을 받아서 호출
- Call By Reference : 매개변수로 주소를 받아서 호출, 참조 - 같은 공간을 사용하는 또다른 이름 사용
*/
# include<iostream>
using namespace std;
void swap(int& ref1, int& ref2) {
/*
int & ref1 = num1; -> 이름만 다를뿐 같은 기억공간을 사용.
int & ref2 = num2;
*/
int tmp = ref1;
ref1 = ref2;
ref2 = tmp;
}
int main()... |
aea95a103635056d6521d689c6d24299601db6fb | 875b60866adff7b33ace9ed7ca82ce8689dd92b9 | ckormanyos/real-time-cpp | /code_snippets/chapter07/chapter07_04-001_register_access_bitmap.cpp | C++ | cpp | 1,118 | permissive | ///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2019.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// chapter07_04-001_register_access... |
8d46cf2c6e53d02f7ec1206e4d1884b5e79a30ce | 7319e0e9abdec8c8f8e8946fc0da28b975da739e | jzrake/Mara3p | /src/core_bsp_tree.hpp | C++ | hpp | 21,484 | no_license | /**
==============================================================================
Copyright 2019, Jonathan Zrake
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, includin... |
998e4a676444cd4b965c74e5c1e52bae44e896df | 7848e3beba2f2ee4d32b845a5e810aceb0e9725e | JoKeR-VIKING/Competitive-Programming | /Number Theory - 1/specialPrime.cpp | C++ | cpp | 868 | no_license | #include<bits/stdc++.h>
using namespace std;
vector<int> sieveOfEratosthenes(int N, vector<bool>& primeCheck)
{
vector<int> primeNumbers;
for (int i=2;i<=N;i++)
{
if (!primeCheck[i])
{
primeNumbers.push_back(i);
for (int j=2*i;j<=N;j+=i)
{
... |
5e30958e0ea77dfd348534321ef10f51a48f888c | 3b4df43dc291a8eda5de79a677f76263d17d133b | advaitraut/ny | /src/ny/common/unix.cpp | C++ | cpp | 2,895 | permissive | // Copyright (c) 2017 nyorain
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
#include <ny/common/unix.hpp>
#include <ny/mouseContext.hpp>
#include <ny/mouseButton.hpp>
#include <ny/cursor.hpp>
namespace ny {
const char* c... |
d0cd31e79ae091fab99814ec26b4cbb61378b806 | 4359b58968616063fe13690ec791959b8cdaf565 | saksham-chaturvedii/DSA-CPP-Apna-College | /Programs/4 Functions/AdvancedQuestions/pythagoreanTriplet.cpp | C++ | cpp | 693 | permissive | #include<iostream>
using namespace std;
int max(int a,int b,int c){
if(a>=b && a>=c){
return a;
}
else if(b>=a && b>=c){
return b;
}
else{
return c;
}
}
bool pyT(int a, int b, int c){
if(a==max(a,b,c) && a*a==b*b+c*c){
return true;
}
else if... |
8ebe966d65fed397acd39b201cab286a4cc639c3 | 4bd9cfe92bf054848d64469eaca31cae0981ed59 | smit-happens/YCP_EVOS | /MainBrain/test/ModelTest/BrakePedalTest/BrakePedalTest.hpp | C++ | hpp | 612 | permissive | /** A one line description of the class.
*
* #include "BrakePedalTest.hpp"
* Created 3-12-18 By: Smitty
*
* A longer description.
*/
#ifndef BRAKEPEDALTEST_HPP
#define BRAKEPEDALTEST_HPP
#include "../BaseModelTest/BaseModelTest.hpp"
//Maybe have states the pedal can be in, since it has the chance
//of causing... |
296c72dd604281076bce43c56d197eb4dcfb55d8 | 35a01522849baf3cb8f2826cefc239fd7ee2c926 | jjzhang166/WinNT5_src_20201004 | /NT/enduser/windows.com/wuau/wuaueng/muiutil.cpp | C++ | cpp | 12,949 | no_license | /******************************************************************************
Copyright (c) 2002 Microsoft Corporation
Module Name:
muiutil.cpp
Abstract:
Implements helper functions for self-updating MUI stuff
******************************************************************************/
#in... |
54beed20d534b60d7522061077994ac8091a8aca | afb14c1183ec8a3475c8533bed744d551bd0ec04 | Imperium-Core-Developpers/imperium | /src/wallet/coincontrol.cpp | C++ | cpp | 679 | permissive | // Copyright (c) 2018 The Imperium Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/coincontrol.h>
#include <util.h>
void CCoinControl::SetNull()
{
destChange = CNoDestination();
m_chang... |
cd5cfecffbd1a4a464863a91d0de0d344e852ce5 | 35024f6d826c767fb3bc794a7c80d962b82575f8 | PriyaranjanPradhan/repolink-3 | /ans11.cpp | C++ | cpp | 473 | no_license | #include <iostream>
using namespace std;
int main() {
int a;
cout<<"enter the week day number\n";
cin>>a;
switch(a){
case 1:
cout<<"sunday\n";
break;
case 2:
cout<<"monday\n";
break;
case 3:
cout<<"tuesday\n";
break;
case 4:
cout<<"wednesday\n";
break;
case 5:
cout<<"thursday\n";
b... |
4de2489d963c4ef195721049e888772fef9c9193 | fc6927d0e8f8e005f8aa1545b176f24b22862f6f | dickynovanto1103/CP | /Online Judges/UVA/CP3/7. Computational Geometry/Circle/circle.cpp | C++ | cpp | 1,333 | no_license | #include <bits/stdc++.h>
using namespace std;
#define inf 1000000000
#define unvisited -1
#define visited 1
#define eps 1e-9
#define pb push_back
#define pi acos(-1.0)
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
double degToRad(double a){return a*pi/180.0;}
double r... |
2ffeb9d0fa645b03dca44d8bbed01ee663fc19d8 | 8f79171fafad96355af950697aa9a3ad451ba24f | hungvvu/Student_management_system_grp5 | /Student_Management_System/Student_Management_System/Edit_Attandance.cpp | C++ | cpp | 3,913 | no_license | #include "Declarations.h"
void Edit_Attandance(ifstream& fin, ofstream& fout, FileCourse**& a, FileSchedule*& s, int& counts, string& username, int& NumofStu, int& countdays)
{
string x;
string y;
string f;
string Class;
string ID;
cout << "\nEnter academic year(YYYY-YYYY): " << endl;//2019-2020
cin.ignore();
... |
65c85b72f6518fe1cff976a5b9adaabd884a0bac | 0ca6d314f355b1e38f0753fb40148a083219ea56 | sangdo913/Algorithm-Study | /11주차/과제/이가송/AddOperator.cpp | C++ | cpp | 1,029 | no_license | #include <cstdio>
#include <cmath>
const int MAX_VALUE = -pow(10, 9);
const int MIN_VALUE = pow(10, 9);
int max_ans, min_ans;
int A[100];
int cal[4];
int n;
int max(int a, int b) { return a > b ? a : b; }
int min(int a, int b) { return a < b ? a : b; }
int calculate(int a, int b, int cmd) {
int sum = 0;
... |
77fe27a81a93e20978f69a300314485047180482 | 743efb710fb6d70301feea847e9d781b51a1cc7f | HelloMandu/OnlineJudge | /Baekjoon/algorithm basic/10824네수.cpp | C++ | cpp | 505 | no_license | #include<iostream>
#include<string>
using namespace std;
long long stringToNumber(string str){
long long n = 0;
for(int i = 0; i < str.size(); i++){
n *= 10;
n += (str[i] - '0');
}
return n;
}
int main(){
freopen("input.txt", "r", stdin);
string str[4];
for(int i = 0; i < 4... |
b9ad62abdcc0ce65ac47ec8749f059a5f523a2c5 | 5fadabb97860a6594d204026cdbd18ee218cc72a | coder0xffff/aos_project | /Aos_Project/src/Aos_Project.cpp | C++ | cpp | 10,283 | no_license | //============================================================================
// Name : AOS_Project.cpp
// Author : Ravi Nankani
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//========================================================================... |
bbf2b93f2bf869472524bbe4d861c3fb2115882f | d3330e2686d8a82ee087c7d0e030ac8f160b76bd | paulpatault/GapChart | /src/screen/MVP.cpp | C++ | cpp | 3,624 | permissive | //
// Created by paul patault on 16/12/2019.
//
#include "MVP.h"
namespace screen {
MVP::MVP()
{
eyePos = glm::vec3(0.f, 0.f, 1000.f);
angle = glm::vec3(90.f, 0.f,0.f);
model = glm::mat4(1.0f);
rotation = glm::mat4(1.0f);
view = glm::mat4(1.0f);
projection = g... |
66fd4d7bdf95794fe4ff12671b1e48ec78c1b9a0 | 8c8fd56f9cba3d163c4485c715a2d810ca2e0b13 | msrLi/portingSources | /ACE/ACE_wrappers/apps/JAWS2/HTTP_Policy.cpp | C++ | cpp | 276 | permissive | #include "HTTP_Policy.h"
HTTP_Policy::HTTP_Policy (JAWS_Concurrency_Base *concurrency)
: concurrency_ (concurrency)
{
}
JAWS_Concurrency_Base *
HTTP_Policy::update (void *)
{
/* for now, we always return the same concurrency strategy */
return this->concurrency_;
}
|
de17a39f76b615bcb9899a97376700306ac66888 | fa9fedab072a2c30591fe9fc93930ad01c82cb0d | wheson/Competitive-programming | /atcoder/abc/abc003/d.cpp | C++ | cpp | 2,375 | no_license | #include <bits/stdc++.h>
#define int long long
using namespace std;
using LL = long long;
using P = pair<int, int>;
#define FOR(i, a, n) for(int i = (int)(a); i < (int)(n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
const int INF = (int)1e9;
const LL INFL = (... |
21c6ddc3f6a62986d37e2416c9f18f7543ff69bd | c047354cae35c90ac7534748fd94f89aef071349 | shelltdf/ifcplusplus | /external/Carve/src/include/carve/mesh.hpp | C++ | hpp | 25,563 | permissive | // Copyright 2006-2015 Tobias Sargeant (tobias.sargeant@gmail.com).
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Softw... |
db801934d457aa2130814afc4e5ad1ec636b21b9 | 6e26e3aba660768a54a29b798ef2b177f476aeb5 | MiroslavStefanov/Chessy | /src/ChessGame/src/Chess/ErrorHandling/Exceptions/ChessPieceNotPickedException.cpp | C++ | cpp | 312 | no_license | #include "stdafx.h"
#include "ChessPieceNotPickedException.h"
namespace chess
{
////////////////////////////////////////////////////////////////////////////////////////////////
ChessPieceNotPickedException::ChessPieceNotPickedException() noexcept
: LoggedException("There is no picked chess piece")
{
}
} |
71278eeb29df85e0fc1470bdd3615f3937b0ca3d | 862ae8bdd7cd8bfe4bd571e38ea00a30f2862898 | BobDeng1974/cameraframework-github | /001_Project/101_baseline_MS2016/00_zchCode/Foundation/src/config/CCommandLineParser.cpp | C++ | cpp | 2,589 | no_license | #include "CCommandLineParser.h"
CCommandLineParser* CCommandLineParser::s_pInstance = NULL;
CCommandLineParser* CCommandLineParser::getInstance()
{
if( s_pInstance == NULL)
{
s_pInstance = new CCommandLineParser();
}
return s_pInstance;
}
void CCommandLineParser::deleteInstance()
{
if( s_pInstance != NULL )
... |
09b43df44cc800f175741d717b17a484ae8b0100 | 4f02f9b62d4789e642250b281e95385f28e0b4cc | hzeller/verible | /common/lsp/lsp-file-utils.cc | C++ | cc | 3,904 | permissive | // Copyright 2023 The Verible Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
e44587e9dce9baa1d458341f52b6d17ec2b9f939 | e45dc2b6d196e62ab8e60677c58f96695f891ac0 | alanw0/Albany | /src/Aeras/problems/Aeras_XZScalarAdvectionProblemOld.hpp | C++ | hpp | 7,626 | permissive | //*****************************************************************//
// Albany 3.0: Copyright 2016 Sandia Corporation //
// This Software is released under the BSD license detailed //
// in the file "license.txt" in the top-level Albany directory //
//**************************************... |
30d3b27c1e1b849559fc1b5ef6a55346b35896ba | bc8a6c80e0da46ef58be2381f8cd08103bd4384a | Jonekee/SMV2Commander | /mw.cpp | C++ | cpp | 16,158 | no_license | #include "mw.h"
#include "ui_mw.h"
MW::MW(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MW)
{
busHandle=-1;
ui->setupUi(this);
logMessage(Debug,QString("Qt version %1").arg(QT_VERSION_STR));
}
MW::~MW()
{
on_disconnect_clicked();
delete ui;
}
void MW::logMessage(MW::MsgSeverity sever... |
c90d3bd5bec4c0ea093da444248c1a6421255d3f | 142e046e91324fe7c89b475b4d0d97bf0cda0882 | vidit-gaur/Data-Structures-and-Algorithms | /Strings/checkAnagram.cpp | C++ | cpp | 429 | no_license | #include<bits/stdc++.h>
using namespace std;
bool anagram(string s1,string s2){
if(s1.length()!= s2.length()) return false;
int count[256]={0};
for(int i=0;i<s1.length();i++) count[s1[i]]++;
for(int i=0;i<s1.length();i++) count[s2[i]]--;
for(int i=0;i<256;i++){
if(count[i]!=0) return fa... |
8bf59324189821fa27f37a03ced937d6002496f1 | d682b534c78c4848c91055e8cd8da5504020524c | abeyuya/hermes | /lib/VM/gcs/HadesGC.cpp | C++ | cpp | 122,741 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "hermes/VM/HadesGC.h"
#include "GCBase-WeakMap.h"
#include "hermes/Support/Compiler.h"
#include "hermes/Support/ErrorHand... |
99219e8fd2ff79b7572d0c6a203b29cb14bb7207 | b1a9ccf3d1923733a4b100eb0d4f0627b02a9f1c | aileatese/oklibrary | /Satisfiability/Transformers/Generators/Random/MetaBernoulli.cpp | C++ | cpp | 6,411 | no_license | // Oliver Kullmann, 10.5.2019 (Swansea)
/* Copyright 2019 Oliver Kullmann
This file is part of the OKlibrary. OKlibrary 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 and included in this library; either version 3... |
e3901d1b5963aff8386a615be75071c21156ffcf | 1fd84f2b8298442859486f322c844bfa94f3e3d5 | higgipoker/senseless_soccer2 | /src/debug/diagnostics.cpp | C++ | cpp | 10,108 | no_license | /****************************************************************************
* Copyright (c) 2018 P. Higgins
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is gr... |
aab09896a06dddc703680434282ef305cb46f9ab | 602a8820c8901b99cf2db2bbe547e22c8132aba9 | 15831944/TRiAS | /TRiAS/TRiASDB/TRiASMI/TRiASMIFeatures.cpp | C++ | cpp | 7,012 | no_license | // $Header: $
// Copyright© 1998-2000 TRiAS GmbH Potsdam, All rights reserved
// Created: 14.09.2000 21:21:48
//
// This file was generated by the TRiASDB Data Server Wizard V1.02.103 (#HK000729)
//
// @doc
// @module TRiASMIFeatures.cpp | Implementation of the <c CTRiASMIFeatures> class
#include "stdafx.h"
... |
9573a4fb3d6b92223a9df2554cba3a38a2539d37 | 5e2d17960b8a78477ab1c6c42628901f1cc21693 | neilstephens/opendnp3 | /cpp/lib/src/outstation/Database.cpp | C++ | cpp | 26,037 | permissive | /*
* Copyright 2013-2020 Automatak, LLC
*
* Licensed to Green Energy Corp (www.greenenergycorp.com) and Automatak
* LLC (www.automatak.com) under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Green Energy Co... |
4de340f4cf822c4604e88d3618d78617480d123a | 87d4c6686ed26688ad3af7c8a993001fddcd8ef0 | team-vigir/vigir_ocs_common | /vigir_ocs_rviz_plugins/vigir_ocs_rviz_plugin_octomap_display_custom/src/points_marker_custom.cpp | C++ | cpp | 5,324 | no_license | /*
* Copyright (c) 2009, Willow Garage, 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this l... |
e54d163e583899abcf8335d80bbe00a7f65a1aa7 | 660a317aac2bc5668e16a354e5fbfc0dcc569173 | VirtualSenseSystems/Lemon-OS | /Kernel/src/storage/atadrive.cpp | C++ | cpp | 2,847 | permissive | #include <atadrive.h>
#include <physicalallocator.h>
#include <paging.h>
#include <logging.h>
#include <memory.h>
#include <gpt.h>
namespace ATA{
ATADiskDevice::ATADiskDevice(int port, int drive) {
this->port = port;
this->drive = drive;
prdBufferPhys = Memory::AllocatePhysicalMemoryBlock... |
4227908e2870e57f4ca25c9948971495cb249e0e | 2805860f6b88a499482d0614069fa59f9e503eba | abhi2694/Data-Structures-Codes | /queues/reverse_k_elements_queue.cpp | C++ | cpp | 775 | no_license | #include <cmath>
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
queue<int> reverseKElements(queue<int> input, int k) {
/* Don't write main().
* Don't read input, it is passed as function argument.
* Return output and don't print it.
* Taking input and printing output is handled automa... |
438365e4625e5edf393124e45a0529efb5f4c4e3 | 4f31985b7a06fc9ee36b6e12e27bfc92238e01a3 | SREERAGI18/chromium | /third_party/blink/renderer/platform/peerconnection/gpu_codec_support_waiter.cc | C++ | cc | 4,167 | permissive | // Copyright 2020 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 "third_party/blink/renderer/platform/peerconnection/gpu_codec_support_waiter.h"
#include "base/logging.h"
#include "base/synchronization/waitabl... |
5e90c801d266928d9e57d8eaf788f92db382d733 | e8a26744d8ad61e61af159612d2edeec6bddc16f | jtwmjtrg/RPGProject | /sounddata.cpp | C++ | cpp | 2,577 | no_license | #include "sounddata.h"
DirectSound SoundData::directsound;
vector<SoundBuffer> SoundData::sb;
map < int, int > SoundData::soundmanager;
SoundData::SoundData() {}
SoundData::~SoundData() {}
int SoundData::LoadSoundMem(TCHAR* filename)
{
int num = 0; // 同期用
Wave wave;
wave.Load(filename);
// データ保存
if (sb.... |
c231fabf1e9757022fe55862bc36a133f32cfff0 | d0b65c3cc8f48d1a00818040dd9165683b6ccc05 | RakVish1342/lidar-segmentation | /src/kdtreeClustering.cpp | C++ | cpp | 3,937 | no_license |
std::vector<std::vector<float>> pcl2Vec(pcl::PointCloud<pcl::PointXYZI>::Ptr cloud)
{
std::vector<std::vector<float>> vect;
for(uint i=0; i<cloud->points.size(); ++i)
{
vect.push_back({cloud->points[i].x, cloud->points[i].y, cloud->points[i].z});
}
return vect;
}
// Structure to represent... |
8bd5a8c894218265045aabd0686f91d433afe699 | 32b852cab4f3ce06b331ca4fcbc57b81d6dfc03e | csarofeen/pytorch | /caffe2/operators/tanh_op.cc | C++ | cc | 1,900 | permissive | #include "caffe2/operators/tanh_op.h"
#include "caffe2/utils/eigen_utils.h"
namespace caffe2 {
#ifdef CAFFE2_USE_ACCELERATE
template <>
template <>
bool TanhFunctor<CPUContext>::operator()<float>(
const int N,
const float* X,
float* Y,
CPUContext* /* context */) const {
vvtanhf(Y, X, &N);
return ... |
052a3479320c06656b5c9ca4fd92598348463375 | 902c1a94588ef77b9268c1210a61ec052f065150 | LittleSheepy/MyMLStudy | /07TensorRTStudy/04TRTPro_tensor/src/main.cpp | C++ | cpp | 6,485 | no_license |
// tensorRT include
// 编译用的头文件
#include <NvInfer.h>
// onnx解析器的头文件
#include <onnx-tensorrt/NvOnnxParser.h>
// 推理用的运行时头文件
#include <NvInferRuntime.h>
// cuda include
#include <cuda_runtime.h>
// system include
#include <stdio.h>
#include <math.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <m... |
0e38c21e3f501b59e7d3b3595993d95c1c589db9 | 1c7b337171cbfbe347c6e13aee7e1c8c17375014 | ldraw-linux/leocad | /qt/lc_qaboutdialog.cpp | C++ | cpp | 2,245 | no_license | #include "lc_global.h"
#include "lc_qaboutdialog.h"
#include "ui_lc_qaboutdialog.h"
#include "lc_mainwindow.h"
#include "preview.h"
#include "opengl.h"
lcQAboutDialog::lcQAboutDialog(QWidget *parent, void *data) :
QDialog(parent),
ui(new Ui::lcQAboutDialog)
{
ui->setupUi(this);
ui->version->setText(tr("LeoCAD Ver... |
fdfb7ce83da2b850a47351f4ce77579fb5ac2e0b | 7480fe691637bb8cf5e8e0682f2fd6d0f52f5140 | ngnevan/ydk-cpp | /cisco-ios-xe/ydk/models/cisco_ios_xe/fragmented/Cisco_IOS_XE_native_60.hpp | C++ | hpp | 198,500 | permissive | #ifndef _CISCO_IOS_XE_NATIVE_60_
#define _CISCO_IOS_XE_NATIVE_60_
#include <memory>
#include <vector>
#include <string>
#include <ydk/types.hpp>
#include <ydk/errors.hpp>
#include "Cisco_IOS_XE_native_0.hpp"
#include "Cisco_IOS_XE_native_18.hpp"
#include "Cisco_IOS_XE_native_59.hpp"
namespace cisco_ios_xe {
namespac... |
e8721644d4b173b56e0978ae9db881b79031a794 | 35292657f69a99f3354b4e245762365aea28e095 | FlorianBury/cmssw | /RecoParticleFlow/PFProducer/src/PFMuonAlgo.cc | C++ | cc | 41,311 | permissive | #include "RecoParticleFlow/PFProducer/interface/PFMuonAlgo.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlock.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlockElement.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlockElementTrack.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlockEle... |
7c28085f7512e2f3e663bb9e53058b675320774d | 0b9aafbfd81d020123e82ef1e5952a357399d47e | eataix/algorithms | /leetcode/134.gas-station.cpp | C++ | cpp | 2,413 | no_license | #include <vector>
using namespace std;
/*
* [134] Gas Station
*
* https://leetcode.com/problems/gas-station/description/
*
* algorithms
* Medium (30.24%)
* Total Accepted: 105K
* Total Submissions: 347.2K
* Testcase Example: '[1,2,3,4,5]\n[3,4,5,1,2]'
*
* There are N gas stations along a circular route, ... |
09973dc2055c5d2a14959be068723b2a7a7e79a6 | 2ec9b77592dbd1f989f827a61c1b6bd7d57a35b7 | Bryan-Peterson/chrono | /src/chrono_parallel/lcp/ChLcpSolverParallelDEM.cpp | C++ | cpp | 30,465 | permissive | // =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... |
594451167ceb8bbea62b2414c650b7e5ebed4a9f | 40f9bc9978b8eac485a54686ebb0d663aa82843c | mmanley/Antares | /antares/src/apps/icon-o-matic/generic/gui/popup_control/PopupView.cpp | C++ | cpp | 705 | no_license | /*
* Copyright 2006, Antares.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
*/
#include "PopupView.h"
#include "PopupWindow.h"
// constructor
PopupView::PopupView(const char* name)
: BView(BRect(0.0, 0.0, 10.0,... |
853102827a37cb1358f6652b4b32a7cfeb47e3df | 4418ee77636b0ed81c543ea42b1f6f1bc26b958d | PacktPublishing/The-Modern-Cpp-Challenge | /libs/asio/include/asio/ip/basic_endpoint.hpp | C++ | hpp | 6,790 | permissive | //
// ip/basic_endpoint.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef ASIO_IP_BASIC_END... |
90f06d9dfa74aa49ab26b8eb3c5892d2c60b0cf9 | 8a0e134376c444d753da61d101efe14bbc7bc9e7 | TrellixVulnTeam/Chromium_7C66 | /content/common/navigation_params_unittest.cc | C++ | cc | 1,102 | permissive | // Copyright 2016 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/common/navigation_params.h"
#include "content/public/common/browser_side_navigation_policy.h"
#include "testing/gtest/include/gt... |
f662313ee90ac65353409e7693f65df48b416a7b | c817e02d69a04569db5d2b7e9eda5d66efec03df | fungosforks/ProDBG | /src/external/bgfx/entry/input.cpp | C++ | cpp | 4,736 | permissive | /*
* Copyright 2010-2014 Branimir Karadzic. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include <memory.h>
#include <string>
#include "entry_p.h"
#include "input.h"
#include <tinystl/allocator.h>
#include <tinystl/unordered_map.h>
namespace stl = tinystl;
struct Mouse
{
M... |
b73fc54ad1e84b83d394437e364fb68941c50e2a | e673b49bd97546f3796f346395a52a72ce5c8545 | meniossin/src | /services/ui/demo/mus_demo_unittests.cc | C++ | cc | 2,346 | permissive | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/base_switches.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/t... |
ddffb39d8dd15ed2fd22a81deac0bd29cc46508a | 6c0b0370b80ec3fcf759a67b38e652501fbc5c1c | hayaten0415/Competitive-programming | /AtCoder/company/HHKB2020/A.cpp | C++ | cpp | 696 | no_license | #include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n - 1); i >= 0; i--)
#define ALL(v) v.begin(), v.end()
using namespace std;
using namespace atcoder;
using P = pair<int, int>;
typedef long long ll;
template<class T> inline bool chmax(T& a, ... |
bd7d06ae758e23ddf654eaf5b063bd2a91f1d2f9 | 45cb02b1657a8d291e3d4a70c4dca0dfdd6ba859 | chromium/chromium | /chrome/browser/printing/pdf_to_emf_converter_browsertest.cc | C++ | cc | 19,920 | permissive | // Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/printing/pdf_to_emf_converter.h"
#include <stdint.h>
#include <windows.h>
#include <limits>
#include "base/containers/span.h"
#include "base/files/f... |
ca8f2928befe61211e11e29942b3be4e04aaaea9 | 522611bbacdc642b279501d30e127ac0f6738a62 | sshekhar1094/spoj_solutions | /MAIN8_C.cpp | C++ | cpp | 1,184 | no_license | #include <iostream>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <algorithm>
#include <string.h>
#include <stdlib.h>
using namespace std;
vector<long long> v;
template <class T>
inline void rd(T &i){
bool minus=false;
char c;
for(c=getchar();(c<'0'||c>'9')&&(c!='-');
c=getchar());
if(c==... |
cc087bb648b95041734386907bd57e3fc025595d | 09635bd300d386374eb569b3cf4b5daa9e6cafd8 | wpfhtl/csapex_core_plugins | /csapex_ml/src/jannlab_mlp.cpp | C++ | cpp | 6,530 | no_license | /// HEADER
#include "jannlab_mlp.h"
/// PROJECT
#include <csapex/msg/io.h>
#include <csapex/utility/register_apex_plugin.h>
#include <csapex/param/parameter_factory.h>
#include <csapex/model/node_modifier.h>
#include <csapex/msg/generic_vector_message.hpp>
/// SYSTEM
#include <fstream>
#include <sstream>
CSAPEX_REGI... |
0b554e1f088745dd63d365adddf8ebccbe6ecfa7 | 9e48828e4f1df22cbc075e457c7ab335f52e211f | Longseabear/AlgorithmStudy | /11377_열혈강호_이분매칭3.cpp | C++ | cpp | 846 | no_license | #include <stdio.h>
#include <vector>
#include <memory.h>
using namespace std;
vector<vector<int>> node(1001);
int visit_A[1001];
int linked_B[1001];
int dfs(int cur_a) {
if (visit_A[cur_a]) return 0;
visit_A[cur_a] = 1;
for (int obj_b : node[cur_a]) {
if (!linked_B[obj_b] || dfs(linked_B[obj_b])) {
linked_B[... |
c53fffeca2874c05dc352c17912689bc348d4e5d | aa2dd09439a3d11759d43effaa651b815579eca6 | dummas2008/chromium | /src/net/ssl/token_binding_nss.cc | C++ | cc | 1,321 | permissive | // Copyright 2015 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 "token_binding.h"
#include "net/base/net_errors.h"
namespace net {
bool IsTokenBindingSupported() {
return false;
}
bool SignTokenBindingEk... |
dbec1751deb961ced7b5a36f49bd7625afcdd428 | a81a72dbdc7827db231c5f9671e05fffc78a060e | bedinin/journal | /debug/moc_designericrossing.cpp | C++ | cpp | 2,161 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'designericrossing.h'
**
** Created: Fri 5. Apr 10:46:54 2013
** by: The Qt Meta Object Compiler version 62 (Qt 4.7.3)
**
** WARNING! All changes made in this file will be lost!
*****************... |
6222feec38de109f3bdcceb02008843c2cda4858 | ca6637462be0eda4c08fd5dc794e24d9f629a87e | samitc/arrayfire | /test/dot.cpp | C++ | cpp | 9,384 | permissive | /*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... |
928d608800ee1af6f6d94131ed31704a4549b42a | c92b8d22bc9f456ce0114dd5bf4b68117d6d4938 | carbonatedcaffeine/zircon-rpi | /src/devices/board/drivers/msm8998/msm8998.cc | C++ | cc | 2,444 | permissive | // Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "msm8998.h"
#include <fuchsia/hardware/platform/bus/cpp/banjo.h>
#include <fuchsia/hardware/platform/device/c/banjo.h>
#include <memory>
#inclu... |
d5abed4f6f06a726faf1ecf9014babb15f40306e | 6b0f690e9837e0d666c813438e2d9729fb084bb8 | lexa95/OOP | /lab[2]/task3/task3/OccurrenceOfWords.cpp | C++ | cpp | 1,572 | no_license | #include "OccurrenceOfWords.h"
#include "stdafx.h"
char ToUpper(const char ch)
{
if (ch >= 97 && ch <= 122)
{
return (char)(ch - ('a' - 'A'));
}
if (ch >= 224 && ch <= 255)
{
return (char)(ch - ('à' - 'À'));
}
return ch;
}
std::string UpperCase(const std::string word)
{
std::string result;
size_t count ... |
184fc0c567ee69aa8b9d563d5357a2aed44d2fbc | 283c773fa4bfc930f661d9b72ab3cc0ae844f059 | gabrielpaquette98/INF1010_TP3 | /Produit.cpp | C++ | cpp | 2,921 | no_license | /********************************************
* Titre: Travail pratique #3 - Produit.cpp
* Date: 16 février 2018
* Auteur: 1894061 & 1899088
*******************************************/
#include "Produit.h"
/**
* Constructeur de Produit qui ajoute le produit au catalogue du fournisseur
* \param {Fournisseur... |
37dce73a8fada4bbb2a25569247a487cf7da3b9a | 6821133066214584f410b1efb899a850cc3f4e45 | PrajjuS/CPP-Lang | /slope/assignment 6b.cpp | C++ | cpp | 379 | no_license | #include <iostream>
#include "slop.h"
using namespace std;
double findSlope();
int main()
{
double p1, p2, p3, p4, slope;
cout << "enter 4 connection points: ";
cin >> p1 >> p2 >> p3 >> p4;
slope = findSlope(p1,p2, p3, p4);
cout << "\npoint1 point2 slope" << endl;
cout << "(" << p1 << "," << p3 << ") " << "(" ... |
924216edf4714c940e3ada6d086651f3099c074c | 4c6b549e31bee1f5280a73e137b31862b5d6e990 | projectescape/cp-archive | /IB/max-sum-without-adjacent-elements.cpp | C++ | cpp | 382 | no_license | int Solution::adjacent(vector<vector<int> > &A) {
int n = A[0].size();
vector<int> dp(n, 0);
for (int i = 0; i < 2 && i < n; i++) {
dp[i] = max(A[0][i], A[1][i]);
}
if (n > 1)
dp[1] = max(dp[1], dp[0]);
for (int i = 2; i < n; i++) {
dp[i] = max(dp[i], max(dp[i - 1], dp[i ... |
b5f52d2522a561dc8eb89f1de06edd9ada3d4140 | ec99b24b9cc07608a67d50e228b0b52d937d4038 | staticlibs/Big-Numbers | /Test/eventloglib/Eventlogold.cpp | C++ | cpp | 5,043 | no_license | #include <stdio.h>
#include "eventlog.h"
#include "message.h"
#include <direct.h>
#include <afxwin.h>
#include <afxdisp.h>
static BOOL AddEventSource(
LPTSTR pszLogName, // "Application" or a custom logfile name
LPTSTR pszSrcName, // event source name
LPTSTR pszMsgDLL, // path for message DLL
DWORD dwNum... |
0efa1084e3936ee5233132b1e1898664adbe6bf3 | d6e553c319c8300582121c25a5948db12a4db637 | jjzhang166/WinNT5_src_20201004 | /NT/admin/admt/command/monitorthread.cpp | C++ | cpp | 10,317 | no_license | #include "StdAfx.h"
#include "MonitorThread.h"
#include <Folders.h>
namespace nsMonitorThread
{
_bstr_t __stdcall GetLogFolder(LPCTSTR pszLog);
bool __stdcall OpenFile(LPCTSTR pszFile, HANDLE& hFile, FILETIME ftFile, bool bDontCheckLastWriteTime = false);
bool __stdcall IsLastWriteTimeUpdated(HANDLE hFile,... |
b48a9896018e608225422af7a1e630481a7b5034 | 5bfccbea46ccf4df16f213085074e8da074fa71a | 100-days-of-code-challenge/Shivani_Rana | /interviewbit/Array/first-missing-number.cpp | C++ | cpp | 334 | no_license | https://www.interviewbit.com/old/problems/first-missing-integer/
int Solution::firstMissingPositive(vector<int> &A) {
sort(A.begin(),A.end());
int n = A.size();
int j=1;
for(int i =0;i<n;i++){
if(A[i]>0){
if(A[i]!=j){break;}
j++;
}
}
... |
55df520780a074ccf650d8ce1fb819c18a4bb162 | 94b5cd4a332b064dc2b27e9b25d1a855ea6bfa65 | gcmillora/slader-codes | /9781285852751/code_error.cpp | C++ | cpp | 541 | no_license | #include<iostream>
using namespace std;
int main(){
int num1,num2;
bool found;
cout<<"Enter two integers: ";
cin>> num1>>num2;
cout<<endl;
if(num1>=num2&&num2>0){
switch(num1%num2){
case 1:
found =(num1/num2)>=6;
break;
case 2:
... |
1e1c642aad91e83011c3ab5a36fcfa6f72d6eaaa | abeed2c9d7e0527a5e3e9df88f622220109cf053 | chenbk85/CuteTestForCoastTest | /coast/modules/SybaseCT/Test/SybCTThreadTest.cpp | C++ | cpp | 3,494 | no_license | /*
* Copyright (c) 2005, Peter Sommerlad and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the file license.txt.... |
a7fd295e252c8a662b4f7f46a6a6e78eace913cb | 96ee958423b17612054b814fd69ada2af16ed506 | pacien/duckdb | /src/planner/binder/statement/bind_call.cpp | C++ | cpp | 855 | permissive | #include "duckdb/planner/binder.hpp"
#include "duckdb/parser/statement/call_statement.hpp"
#include "duckdb/parser/tableref/table_function_ref.hpp"
#include "duckdb/planner/tableref/bound_table_function.hpp"
#include "duckdb/planner/operator/logical_get.hpp"
namespace duckdb {
using namespace std;
BoundStatement Bind... |
5d9b54cd291d5aa18a174472734ff52b917a8b6d | d2f1896a0a26fbd0b038486e78c9f96aa764e66e | olakoralczyk/GUIfame | /GUIgame/GUIgame/StateMachine.cpp | C++ | cpp | 917 | no_license | #include "StateMachine.hpp"
namespace Ola
{
void StateMachine::AddState(StateRef newState, bool isReplacing)
{
this->_isAdding = true;
this->_isReplacing = isReplacing;
this->_newState = std::move(newState);
}
void StateMachine::RemoveState()
{
this->_isRemoving = true;
}
void StateMachine::ProcessSt... |
8f8d5cefe8d7199518e83b3ebdb541b7647f5747 | 42d2a0fc4a43e4c4c6851890d9070d354ad92ddc | HanzhouTang/kys-cpp | /src/Menu.cpp | C++ | cpp | 2,545 | permissive | #include "Menu.h"
#include "Button.h"
#include "Font.h"
Menu::Menu()
{
pass_child_ = 0;
}
Menu::~Menu()
{
}
void Menu::dealEvent(BP_Event& e)
{
//此处处理键盘响应
if (e.type == BP_KEYDOWN)
{
int direct = 0;
if (e.key.keysym.sym == BPK_LEFT || e.key.keysym.sym == BPK_UP)
{
... |
9296e1098c34d24f4b8d8c27be6f59ad2e072aa1 | 7e8b806f550fc8d26bdabba6ef8be67792829f09 | LaboratorioDeMedios/Doll_Head_Pose_Estimator_Client | /src/HeadClient.cpp | C++ | cpp | 9,207 | no_license | #include "HeadClient.h"
using namespace std;
using namespace cv;
// kinect frame width
#define KW 640
// kinect frame height
#define KH 480
// for the average fps calculation
#define FPS_MEAN 30
//-------------- Estimator parameters
// Path to trees
string g_treepath;
// Number of trees
int g_ntrees;
// Patch width
... |
c134c12960c1daadceb2fc773e75d1c87b3c0b4f | 7cc0f8be72952c0a427df55e6f2339c38bd61eb5 | chetan-anand/coding | /two_rec_intersect.cpp | C++ | cpp | 673 | no_license | #include<stdio.h>
struct Point
{
int x, y;
};
// Returns true if two rectangles (l1, r1) and (l2, r2) overlap
bool doOverlap(Point l1, Point r1, Point l2, Point r2)
{
// If one rectangle is on left side of other
if (l1.x > r2.x || l2.x > r1.x)
return false;
// If one rectangle is above other
... |
65bcf68a56b9193b28d2e694731a9af476bda9b9 | 8bce151f5867f14cbf0854b9361d64df2c03a43a | usiksan/SaliCAD | /src/objects/SdPoint.cpp | C++ | cpp | 11,837 | no_license | /*
Project "Electronic schematic and pcb CAD"
Author
Sibilev Alexander S.
Web
www.saliLab.com
www.saliLab.ru
Description
*/
#include "SdPoint.h"
#include "SdProp.h"
#include "SdSegment.h"
#include <math.h>
//#include <boost/geometry/geometry.hpp>
void SdPoint::rotate(SdPoint origin, SdPropAngle angle)
{
... |
a8e28c9e17e672256ac8da2b6114f9bf8060cccf | aff61db5b9c6b022b56f061950b1799013a43ccb | amanthakur1/CP | /Codeforces/CF Round-697 Div-3/B. New Year's Number.cpp | C++ | cpp | 564 | no_license | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define endl "\n"
using namespace std;
const ll inf = 1e18;
const int mod = 1e9+7;
const int N = 2e5+5;
void solve(){
// Write your code from here....
ll n; cin>>n;
ll md=n%2020;
ll mul=... |
d9a8846090a3f17c3ec8399e4a2b10fafda34334 | 3630d4d496dec161378f9eb808f8a2c1bcce3d80 | BitSavage0202/42 | /src/kernel.cpp | C++ | cpp | 22,340 | permissive | // Copyright (c) 2012-2013 The PPCoin developers
// Copyright (c) 2013-2015 The Novacoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Distributed under the MIT/X11 software license, see the accompanying
// fi... |
3d22dd0db38147b0226534a426485a4eb3a7e125 | 1a16c5b3227cc51bd858b335bddb76b083f63b0d | Institute-Web-Science-and-Technologies/visual-stimuli-discovery | /code/src/lib/Feature/FeatureVector.cpp | C++ | cpp | 8,755 | permissive | #include "FeatureVector.hpp"
#include <Descriptor/OCR.hpp>
#include <Feature/Histogram.hpp>
#include <Feature/BagOfWords.hpp>
#include <Feature/NGrams.hpp>
#include <Feature/PixelDiff.hpp>
#include <Feature/EdgeChangeFraction.hpp>
#include <Feature/MSSIM.hpp>
#include <Feature/PSNR.hpp>
#include <Feature/SiftMatch.hpp>... |
e8b4751277d55b2853f7adcf51a46d5226412347 | 488aa72fe80de67c34773ebcca5bcadbeadd09f0 | endu-code/Automated_Object_Detection | /Software/Rob195/src/main.cpp | C++ | cpp | 32,883 | permissive | #include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <cstring>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <math.h>
#include <chrono>
#include <pcl/io/openni2_grabber.h>
#include <pcl/visualization/cloud_vi... |
301b725d3162a55d4688a9b6345e6c0f13eb62b4 | ab127107ffc1b665d81aefd9a56e1ab413e0c7d7 | hashkanna/CLionProjects | /SegmentTrees/RMQ/RMQ.cpp | C++ | cpp | 1,554 | no_license | #include <iostream>
#include <vector>
using namespace std;
//ios::sync_with_stdio(false);
//cin.tie(NULL);
/*
* http://codeforces.com/group/K8KexP52bs/contest/219775/problem/A
*
*/
int n;
vector<int> a;
vector<int> segtree;
void put(int i,int L,int R,int pos,int x) {
if (L==R) {
segtree[i] = a[L] = x... |
b28d136d239e3b6ea792f9ce83427adc79e1269e | 3d8b3e57b5b821af79238d7b734ef0d40af9ef8f | gamamoe/Baekjoon-Online-Judge | /Problem8949/main.cpp | C++ | cpp | 752 | no_license | #include <algorithm>
#include <iostream>
#include <cstdio>
#include <string>
int main() {
std::string integer1;
std::string integer2;
std::cin >> integer1 >> integer2;
int length_of_integer1 = integer1.size();
int length_of_integer2 = integer2.size();
if (length_of_integer1 > length_of_integer2) {
st... |
819d5ab4f25806149f6851e86769a2e01c714f64 | b26d58bd995e7c665852dd4be9b3e6d0aad9bf72 | cyysc1998/PAT | /code-update/others/1016 Phone Bills.cpp | C++ | cpp | 1,635 | no_license | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
const int N = 31 * 24 * 60 + 10;
double cost[24];
double sum[N];
int n;
struct Record {
string time;
int minutes;
string state;
bool operator< (const Record& r) const {
return minutes < r.minutes;
... |
43c22600deef94462f23406b3b329f3ffd0ea1fc | f5a59cb6c2f9c1edeb9ddb47b0f7be59b91d07ba | vamprier/Servers | /logfile.cpp | C++ | cpp | 452 | no_license | #include "logfile.h"
Logger::Logger()
{
}
Logger::~Logger()
{
}
void Logger::CreateFile(const char* f)
{
memcpy(this->filename,f,strlen(f));
out = fopen(this->filename,"wb");
if(out != NULL)
{
fclose(out);
}
}
void Logger::Log(const char* contant)
{
bool isWriteLog = true;
out = fopen(this->filename,"ab... |
1845d423e2e96e2f71dac614e010a0a764b53fb4 | 2a76102fbb218cd26bff974403ff2e694208babf | diorcety/pythran | /pythran/pythonic/include/__builtin__/set/add.hpp | C++ | hpp | 665 | permissive | #ifndef PYTHONIC_INCLUDE_BUILTIN_SET_ADD_HPP
#define PYTHONIC_INCLUDE_BUILTIN_SET_ADD_HPP
#include "pythonic/include/types/set.hpp"
#include "pythonic/include/types/NoneType.hpp"
#include "pythonic/include/utils/functor.hpp"
namespace pythonic
{
namespace __builtin__
{
namespace set
{
template <c... |
0e2142ba527b08cd7519ab364a3aa9fb1df6e354 | 30fe98c6cf8e599db703b8acf23e8f65a9adcbf3 | webosce/chromium53 | /src/third_party/WebKit/Source/platform/PurgeableVectorTest.cpp | C++ | cpp | 11,887 | permissive | /*
* Copyright (C) 2014 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
289e2eedcb10d1686eca188468101b8247fb161b | d6ecb4ef959cbf0a0c4d4ea82292cfcc66564c78 | EunbiZhang/Robust-HTTP-Caching-Proxy | /parse.cpp | C++ | cpp | 6,529 | no_license | #include "proxy.h"
class Parse {
private:
//Format: Sun, 23 Feb 2020 20:07:07 GMT
static time_t getTime(std::string input) {
unsigned long start = input.find(", ")+2;
unsigned long end = input.find(" GMT");
input = input.substr(start, end - start);
input = input.substr(inpu... |
f522093c5539413713ef088828db9780a362a531 | 6aa493f913941bde8d2aa0ae257259f646740b9a | MicrosoftDocs/visualstudio-docs | /docs/snippets/cpp/VS_Snippets_Winforms/CheckedListBox/CPP/source.cpp | C++ | cpp | 5,849 | permissive |
//<Snippet1>
#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>
using namespace System;
using namespace System::Drawing;
using namespace System::Collections;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;
public ref class Form1: public System::Windows::... |
601afd7b20188d645049f65ca01e67becae0f4e3 | 26b4cb06b9ca4ee0539f97002757594a273f9ec7 | areong/CornerMacroPlacer | /src/floorplan/Pin.cpp | C++ | cpp | 1,022 | permissive | #include "floorplan/Pin.h"
#include <iostream>
Pin::Pin(double offsetX, double offsetY, std::string name) {
x = 0;
y = 0;
this->offsetX = offsetX;
this->offsetY = offsetY;
this->name = name;
module = 0;
}
Pin::~Pin() {
}
void Pin::setX(double x) {
this->x = x;
}
double Pin::getX() {
... |
d4e6385853f71895df1e9e6677e63d1059786c3c | 4133167bfc3532958ea3c2969c8588823c7c1556 | xxxx2013/leetcode | /PermutationsII.cpp | C++ | cpp | 2,653 | no_license | class Solution {
public:
void dfs(vector<int> &nums , int index, vector<int> &perm, vector<vector<int> > &res)
{
int size = nums.size();
if(size == index)
{
res.push_back(perm);
}
else
{
int i;
for(i = index;i < size;i++)
... |
c4cc2ecf1c374b8d7f295143c833d8346818c054 | 03e3a88bede2b466ca55aa1a0331f2b3bc221a7a | AraguaneyBits/ArepaCoin-1 | /src/util.cpp | C++ | cpp | 37,970 | permissive | // Copyright (c) 2009-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 "util.h"
#include "sync.h"
#include "strlcpy.h"
#include "version.h"
#inc... |
163e7e6361ad88d7d082bb6cfa7dc770cbd10d15 | 47a617735997305a639672019d85f7fbe653547b | fwhxyer/PAT | /1511/1511/源.cpp | C++ | cpp | 1,321 | no_license | #include<cstdio>
#include<iostream>
using namespace std;
int available=0;
int listSpace[3000000];
int listPi[3000000];
int list[1000001];
int list2[1000001];
int New()
{
listSpace[available]=0;
listPi[available]=-1;
return available++;
}
void pb(int a,int data)
{
while (listPi[a]!=-1) a=listPi[a];
listPi[a]=a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.