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 |
|---|---|---|---|---|---|---|---|---|
6938c6f0bd33b5a25c23154d52edabc13c679223 | fbb7882f5f8a2eda13ca70a531e9e166490e4ad2 | novakale/openvino | /src/common/low_precision_transformations/include/low_precision/subtract.hpp | C++ | hpp | 936 | permissive | // Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <ngraph/ngraph.hpp>
#include "low_precision/layer_transformation.hpp"
namespace ngraph {
namespace pass {
namespace low_precision {
/**
* @ingroup ie_transformation_common_api
* @brief SubtractTransformati... |
08b9075382438db4d6120e0147303f003967ea9d | 3f8d24c8a6ef6ff54ab98bcc04966246361e337d | thecosta/High-Performance-Computing | /HPC/hw3/q3/matrix_multiplication_reduction.cpp | C++ | cpp | 1,563 | no_license | //Bruno Costa Rendon
//Matrix multplication of a 1000x1000 matrix by a 1000x1 vector.
//Reduction clause implemented.
#include <iostream>
#include <omp.h>
#include <stdlib.h>
#include <stdio.h>
#include <fstream>
#include <time.h>
#include <vector>
#define N 1000
using namespace std;
//Clock function to calculat... |
cff493e82248b7e9c52972ac148c1c2aa57781c2 | 7bec2bbba664fa3a1b7c18f614f42b8aa0ad5f90 | qiangzai00001/QuectelShare | /quectel-app/qt/wifisettings/HotspotElement.cpp | C++ | cpp | 1,928 | no_license | #include "HotspotElement.h"
#include "Config.h"
class HotspotElementPrivate
{
public:
HotspotElementPrivate(HotspotElement *parent)
: q_ptr(parent)
{}
private:
HotspotElement * const q_ptr;
Q_DECLARE_PUBLIC(HotspotElement)
QString m_hotspotSSID;
QString m_hotspotRSSI;... |
a566093c091d10c6d53609d22adc96b39463969d | 02a142605cb2472bf13fc9be5f6d003a906afe62 | ZuzaRatajczyk/cpp_Projects | /computer_science_II/list_3/zad_1.cpp | C++ | cpp | 448 | no_license | #include <iostream>
#include "Tzespol.hpp"
using namespace std;
int main()
{
Tzespol num1(4, -7);
Tzespol num2(-3, 2);
Tzespol add_result = num1.add(num2);
add_result.show_number();
Tzespol sub_result = num1.subtract(num2);
sub_result.show_number();
Tzespol multiply_result = num1.multiply(n... |
df58f5c1537c5f8d157d6bf9931aaddba91ecb93 | aa830f3ad677990dd0f51ba24621ef5f179d2bba | StarkitRobots/geometry | /src/starkit_geometry/segment.cpp | C++ | cpp | 1,670 | no_license | #include <cmath>
#include "starkit_geometry/segment.h"
namespace starkit_geometry
{
Segment::Segment() : A(0.0, 0.0), B(0.0, 0.0)
{
}
Segment::Segment(Point A, Point B) : A(A), B(B)
{
}
double Segment::projectAlpha(const Point& P)
{
return ((A.x - B.x) * (A.x - P.x) + (A.y - B.y) * (A.y - P.y)) / (pow(A.x - B.x, 2... |
581a4d67b7b4b2301adb73287b54ed56b0b723af | 97a93e13eb5b1a91f4e95582e047e3574be2b66a | anto0ine/ciyam | /src/gendeps.cpp | C++ | cpp | 6,910 | permissive | // Copyright (c) 2009-2012 CIYAM Pty. Ltd. ACN 093 704 539
// Copyright (c) 2012-2014 CIYAM Developers
//
// Distributed under the MIT/X11 software license, please refer to the file license.txt
// in the root project directory or http://www.opensource.org/licenses/mit-license.php.
#ifdef PRECOMPILE_H
# include "preco... |
11e3b11c5e1162219dd2e70ae1aa9625ce918c49 | 87e26cce04cbd345da08f63ac20b687c4407217f | sbillin/IMLP | /cisstICP/matlabICP/mexInterface_AlgDirICP_PIMLOP_Mesh.cpp | C++ | cpp | 15,932 | permissive | // ****************************************************************************
//
// $Id: mexInterface_AlgDirICP_PIMLOP_Mesh.cpp, v0.1 Exp $
//
// Description:
//
//
// Usage:
//
//
// See Also:
//
//
// Author(s): Seth Billings
//
//
// Created on:
//
//
// Developed by ... |
694506cb9da4ce66462b8375f5acda21d84f087d | 465eada95dc26a31a23a954465e9d364ace9f6f0 | cea56/chromium | /chrome/browser/chromeos/wilco_dtc_supportd/wilco_dtc_supportd_bridge_unittest.cc | C++ | cc | 19,977 | permissive | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <unistd.h>
#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include... |
4633f320c89a29688731630dcfd16697f42e3a49 | 7dd67a8340b5b4b53399b38a72861b4fbe57d292 | joaquintides/cpp14monadworkshop | /cont1.cpp | C++ | cpp | 376 | no_license | #include <iostream>
template<typename C>
auto add(int x,int y,C c){return c(x+y);}
template<typename C>
auto square(int x,C c){return c(x*x);}
template<typename C>
auto pyth(int x,int y,C c) // x*x + y*y
{
return square(x,[=](int xx){
return square(y,[=](int yy){
return add(xx,yy,c);
});
});
}
int... |
d7e71dd65780c916f9070de2f91e299f51abde1f | 141bc80461db562975591d189a220ccb89800563 | brware/Arduino | /brWare/Playade-One/brwWSPlayade01.cpp | C++ | cpp | 16,757 | no_license |
#include "brwWSPlayade01.h"
EthernetServer serverWeb(80);
//-----------------------------------------------------------------------------------------
//
// Construtor da Classe de Web Server para Eth
//
//-------------------------------------------------------------------------------------------
brwWSPlayade01... |
a7d8473f6cb7de493a27063e9cf3c450a00843ca | 7d97c146b33a64d8f66b88eeb411c5c6dac84080 | CU-0xff/juliet-cpp | /000/084/508/CWE190_Integer_Overflow__unsigned_int_max_multiply_83a.cpp | C++ | cpp | 2,321 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__unsigned_int_max_multiply_83a.cpp
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-83a.tmpl.cpp
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: max Set data to the max value for unsigned int
* G... |
17a2311286c4d40a2f7188296565e37f5abf529e | 7b8921ee09bf684758a5e6ee075e3a9f4dfc71c1 | sx-aurora-dev/tensorflow | /tensorflow/compiler/tf2xla/kernels/einsum_op.cc | C++ | cc | 3,470 | permissive | /* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
da31fa560a00e135dfea2e32f1d8433520002a16 | 53226f552bd065712dfb6ff7e6262877ae190c3a | solomanhl/xxx | /Classes/Bullets.cpp | C++ | cpp | 1,251 | no_license | #include "Bullets.h"
Bullets::Bullets()
{
}
Bullets::~Bullets()
{
}
Vector<Bullets*> *Bullets::bullets = new Vector<Bullets*>();
Vector<Bullets*> *Bullets::getBullets(){
return Bullets::bullets;
}
Bullets* Bullets::createWithImg(std::string img, int tag, float rotation){
auto b = new Bullets();
b->initWithImg... |
c4683b40029dc82ab8a7dd6481a8a5dcc98174ee | 5ef24ad7937817987da76e900ec9d2a0ddd77ed1 | cies96035/CPP_programs | /Kattis/AC/schoolspirit.cpp | C++ | cpp | 705 | no_license | #include<iostream>
#include<iomanip>
#include<algorithm>
using namespace std;
using ld = long double;
const int MAX_N = 55;
int n;
int arr[MAX_N];
ld avg;
ld Cnt(int x){
ld sum = 0;
ld b = 1;
for(int i = n - 1; i >= 0; i--){
if(i == x){
continue;
}
sum += b * arr[i];
... |
829648e388f9742ca552445883e1d772d3fac78f | 64af4cdc396973f055817fb6edd2a77959cdd390 | asliturk/serenity | /Libraries/LibKeyboard/CharacterMapFile.cpp | C++ | cpp | 3,686 | permissive | /*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
* 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... |
3029e8bd6629284e55639de06af9fc5b4d106387 | 5bf33a486f7ed408dd3486e95ac1a5f11251a583 | SEJeff/task | /src/Color.cpp | C++ | cpp | 16,598 | permissive | ////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006-2012, Paul Beckingham, Federico Hernandez.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated docume... |
081bc478c7124ee66280a9c340697e956ee5570a | 105ef7089bf830c4543e494624ffb4c1ca384c81 | zeze1004/C-Programing_Lecture | /hw114(1).cpp | C++ | cpp | 891 | no_license | /*
데이터 fruit.txt 파일 속에 영문 과일 이름 (1) 연번, (2)과일명, (3)각단어spell개수 표시
no strlen
+까꾸로
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include<cstring>
using namespace std;
int main()
{
int ret,read;
int i = 0;
char frname[100][50] = { 0, };
char frname2[100][50] = { 0,... |
de33fe856f7c5207b85f1e62943bc9d20d17622b | 8cac5fff9afdc037120d73d7e0d06468900b84d3 | Pipi24/OJ | /second_time_111/二叉树/530. 二叉搜索树的最小绝对差.cpp | C++ | cpp | 2,325 | no_license | /**
* 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(int x, TreeNode *left, TreeNode *right) : val(x), l... |
b7988e67bd318ba9e53c0dfc3a86aa722244190c | c56ce21a24f1808959157d39e2119a2a1d8da2df | qwert830/SP | /J/Box/BoxApp.cpp | C++ | cpp | 18,798 | no_license | //***************************************************************************************
// BoxApp.cpp by Frank Luna (C) 2015 All Rights Reserved.
//
// Shows how to draw a box in Direct3D 12.
//
// Controls:
// Hold the left mouse button down and move the mouse to rotate.
// Hold the right mouse button down and m... |
34803b2224bf0d8c546d40004b66e2ea64c42c45 | 2bea37f6aa8f19136afc6a3243f15170580b7cff | andretorresdg/SocialNetwork | /PersistenciaDaRede.cpp | C++ | cpp | 4,976 | permissive | #include "PersistenciaDaRede.h"
#include "Aluno.h"
#include "Perfil.h"
#include "Professor.h"
#include "Disciplina.h"
#include <iostream>
#include <string>
#include <fstream>
#include <algorithm>
#include <stdexcept>
RedeSocial* PersistenciaDaRede::carregar () {
RedeSocial *novaRede = new RedeSoc... |
2362d6eb4f031d16c82dd7de148a1a31f1a5cd9e | 2185f8fa5d2f1056ea34c1bdc11e244b98352061 | anawhj/chromium-crosswalk | /ios/public/provider/chrome/browser/chrome_browser_provider.cc | C++ | cc | 1,553 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
namespace ios {
namespace {
ChromeBrowserProvider* g_chrome_browser_provider;
} ... |
43b3e499f471db2d2d8650d81cd8a4c17745a2a7 | d825a7564b9ef54397cc86c7336fc7ea33d3555b | dringakn/ROSExamples | /src/example_ceres_helloworld.cpp | C++ | cpp | 1,528 | permissive | /*
A simple example of using the Ceres minimizer.
Minimize 0.5 (10 - x)^2 using jacobian matrix computed using automatic differentiation.
*/
#include <ceres/ceres.h>
#include <glog/log_severity.h>
using ceres::AutoDiffCostFunction;
using ceres::CostFunction;
using ceres::Problem;
using ceres::Solve;
using ceres::S... |
53bf149c00fb6e2b6fcaa4ac91016792c76830fd | 316f925cad346ea399482d08f51effa273d2049c | Paruck/ElE | /ElE/ElEMaterial.cpp | C++ | cpp | 2,840 | permissive | #include "ElEMaterial.h"
#include "ElE.h"
ElEMaterial::ElEMaterial() : vertexShader(nullptr),
fragmentShader(nullptr),
programid(-1), textureid(-1)
{
shaderAttribFunction = nullptr; //ctor
}
ElEMaterial::~ElEMaterial()
{
//dtor
if(glIsProgram(programid))
glDeleteProgram(programid);
... |
0a6e5f1814fc379fcb34ade6c526b0cf253d2794 | 08e2f516bc6595447dc4bb65edbafe6d48f2cfd8 | dmehrab06/Time_wasters | /codeforces/473/A.cpp | C++ | cpp | 1,889 | no_license | /*-------property of the half blood prince-----*/
#include <bits/stdc++.h>
#include <dirent.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#define MIN(X,Y) X<Y?X:Y
#define MAX(X,Y) X>Y?X:Y
#define ISNUM(a) ('0'<=(a) && (a)<='9')
#defin... |
1a29f8f4b720c72d664e75cc221756275949f6dd | 3c016c336543a097d5195972fbcda445be028499 | strigazi/athena | /InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ConditionsParameterTestAlg.cxx | C++ | cxx | 4,451 | permissive | /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
/** @file SCT_ConditionsParameterTestAlg.cxx Implementation file for SCT_ConditionsParameterTestAlg class.
* @author Shaun Roe, based on Jorgen Dalmau example
**/
// Include SCT_ConditionsParameterTestAlg and Tool
#include "SCT_Condit... |
c879665ed9f399d43b8dc6242cff3be92c2d137e | 093e093780ef07519b76c9efce77c6c86ae8989e | winterrace2/rtl_fl2k_433 | /src/wnd_txopt_exp.cpp | C++ | cpp | 3,168 | no_license | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Option sub-dialog for expert settings regarding TX *
* *
* coded in 2018/19 by winterrace (github.com/winterrace) *
* (github... |
249edbc1d30d79e89bfa744c70d712f11be7d4b2 | e82f6277107ca5f07ac25a624fec4b1f11ce90af | marius-18/networkit | /include/networkit/io/CoverReader.hpp | C++ | hpp | 661 | permissive | #ifndef NETWORKIT_IO_COVER_READER_HPP_
#define NETWORKIT_IO_COVER_READER_HPP_
#include <networkit/structures/Cover.hpp>
#include <networkit/graph/Graph.hpp>
namespace NetworKit {
/**
* @ingroup io
*/
class CoverReader {
public:
/**
* Read a cover from a file. File format: each line contains th... |
3eecbdaee64de05d328df3ccbf565e1a3ba709cc | caba327a00158eac2c64e9c45039217dbcb7a9bb | wastegas/modern_opengl | /src/material1.cpp | C++ | cpp | 8,618 | no_license | /* demonstrate materials */
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "shader.h"
#include "camera.h"
#include <iostream>
void framebuffer_size_callback(GLFWwindow* window, GLint width, GLint height);
void pr... |
827fc9df7645b24704e01c34514ffa044bd1e238 | 0b2aa79da7bfee230d1f9215a802552b55f28ebe | etranchi/piscine-cpp | /d08/ex02/mutantstack.hpp | C++ | hpp | 493 | no_license |
#ifndef MUTANTSTACK_H
# define MUTANTSTACK_H
# include <iostream>
# include <stack>
template<typename T>
class MutantStack : public std::stack<T>
{
typedef std::stack<T> _st;
public:
typedef typename _st::container_type::iterator iterator;
MutantStack<T>(void) { }
~MutantStack<T>(void) { }
MutantStack<T... |
85f9565f004fb266fed240b4943ef5b2561ca420 | 6be238682e610638a0f868153f9b9bf7eb1d7caf | leiqunni/STEP_Unicode | /STEP_tta/STEP_tta.cpp | C++ | cpp | 7,406 | no_license | // STEP_tta.cpp : DLL 用の初期化処理の定義を行います。
//
#include "stdafx.h"
#include "STEP_tta.h"
#include "STEPlugin.h"
#include "DlgSetup.h"
#include "id3tag.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//
// メモ!
//
// この DLL が MFC DLL に対して動的にリンクされる場合、
// MFC 内で呼び出されるこの D... |
846a9c56ba0f97167475725009ce7c0974fb3aee | 7589288f88c364ca8bf409cb307a05bdd15d7213 | ArsenArsen/managarm | /kernel/thor/arch/x86/thor-internal/arch/paging.hpp | C++ | hpp | 6,962 | permissive | #pragma once
#include <atomic>
#include <frg/list.hpp>
#include <assert.h>
#include <smarter.hpp>
#include <thor-internal/mm-rc.hpp>
#include <thor-internal/types.hpp>
#include <thor-internal/work-queue.hpp>
namespace thor {
enum {
kPageSize = 0x1000,
kPageShift = 12
};
constexpr Word kPfAccess = 1;
constexpr Wo... |
9a7df6177ec259a46fb042e77a3f61cece1016d4 | f68b1e836c5f3ff7e5489959b0bd2db57ce127db | LegendaryZReborn/UVA-Online-Judge-Problems | /10038 - Jolly Jumpers/10038 - Jolly Jumpers/Source.cpp | C++ | cpp | 767 | no_license | #include <iostream>
#include <vector>
using namespace std;
int main()
{
bool isJolly;
vector<int> numbers;
vector <bool> diffs;
int diffint, size, val;
while (cin >> size)
{
numbers.resize(size);
diffs.resize(size);
diffs.assign(diffs.size(), 0);
isJolly = true;
for (int i = 0; i < size; i++)
{
... |
a89730e90eab31e6bce74e5bffc01a9315a798c4 | 2419d38aa24e3c949feae40925b45d4896752076 | SAGGSOC/CodeChef-Programs | /fl.cpp | C++ | cpp | 708 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
double findWater(int i,int j,double X)
{
if(j>i)
{
return -1.0;
}
double glass[i*(i+1)/2];
memset(glass, 0, sizeof(glass));
int index=0;
glass[index]=X;;
for(int row=1;row<=i&&X!=0.0;++row)
{
for(int col=1;col<=row;++col,++index)
... |
e2bfcc88a0c2e8c744421ab91096d4fb607cf213 | c7b219725edf1b09700558459ede1df3fa7a56dd | ChengYanJin/MeetingRoom | /MeetingRoom/ShowMeetingRoom.cpp | C++ | cpp | 832 | no_license | // ShowMeetingRoom.cpp : 实现文件
//
#include "stdafx.h"
#include "MeetingRoom.h"
#include "ShowMeetingRoom.h"
#include "afxdialogex.h"
// ShowMeetingRoom 对话框
IMPLEMENT_DYNAMIC(ShowMeetingRoom, CDialogEx)
ShowMeetingRoom::ShowMeetingRoom(CWnd* pParent /*=NULL*/)
: CDialogEx(ShowMeetingRoom::IDD, pParent)
{
}
ShowMe... |
7ef4eaf8bd85885d176071a0e9db3e88156492d1 | 3eaf5d1731114b8bd116bf938005681268490938 | darzouras/OSU-Assignments | /CS161/week9_tictactoe/Board.hpp | C++ | hpp | 1,194 | no_license | /*********************************************************************
** Author: Darlene Zouras
** Date: February 29, 2016
** Description: TicTacToe.cpp, TicTacToe.hpp, Board.cpp and Board.hpp
** This program initializes a game of Tic Tac Toe by first asking a
** user whether Xs or Os will go first- this defines which... |
550cc13c25aaaee3c5c0f3b74a3a622d441e6c32 | 65b61f3d3a44011532e9b4c4c1a8bf399c70f5a1 | itai192/Hacktoberfest-Algorithms | /Greedy Algorithms/OptimalFileMerge.cpp | C++ | cpp | 1,087 | no_license | #include<bits/stdc++.h>
using namespace std;
// Function to find minimum computation
int minComputation(int size, int files[])
{
// Create a min heap
priority_queue<int, vector<int>,
greater<int>> pq;
for(int i = 0; i < size; i++)
{
// Add sizes to priorityQueue
pq.push(files[i]);
}
//... |
9ec25ced0450da2ce58c2bb5f1aa05ec22e2c680 | 313dd8b92c2e0016dc1fa74532fb65cbc8ae305e | nc-77/algorithms | /ACM/Newcow/newcow1/I.cpp | C++ | cpp | 441 | no_license | #include<bits/stdc++.h>
using namespace std;
#define ll long long
ll dp[300000+10];
int main()
{
int n,a,b,c;
cin>>n>>a>>b>>c;
string s;
cin>>s;
//cout<<s<<endl;
for(int i=3;i<n;i++)
{ dp[i]=dp[i-1];
if(i>=3&&s.substr(i-3,4)=="nico")
dp[i]=max(dp[i],dp[i-3]+a);
if(i>=5&&s.substr(i-5,6)=="niconi")
dp[i]=m... |
2aa44d9bae09836094afe9c5bbd4c7b34162c500 | acfea552afc373336c35116ade65882155db19eb | mkan0141/Kuso-Game | /ai.hpp | C++ | hpp | 2,313 | no_license | #include <climits>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <queue>
#include "params.hpp"
Vector2 random_ai(Enemy &enemy, int (&maze)[MAZE_SIZE][MAZE_SIZE]) {
int rnd = 0;
while (1) {
rnd = rand() % 4;
if (e_available_move(enemy, Vector2(dx[rnd], dy[rnd]), maze)) {
... |
f3962277b8d1155a8e6a3a97fa8a20ca6b702fb6 | 3c5e0cd3547d8963a4bfcc339f4ff38b1b491f70 | stnoh/sequential-line-search | /demos/bayesian_optimization_1d_gui/mainwindow.cpp | C++ | cpp | 1,588 | permissive | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <iostream>
#include <QDir>
#include <QFileDialog>
#include "core.h"
#include <sequential-line-search/gaussianprocessregressor.h>
using Eigen::VectorXd;
using Eigen::MatrixXd;
namespace{
Core& core = Core::getInstance();
}
MainWindow::MainWindow(QWidget *par... |
bc6b0a105df28302b50b3aa6309e69d02853ac13 | 42a11177b4b1030fd64a6731374a211b584c2d71 | aaa34169/openma | /modules/bindings/src/utils.cpp | C++ | cpp | 2,315 | permissive | /*
* Open Source Movement Analysis Library
* Copyright (C) 2016, Moveck Solution 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 reta... |
5e8cda3bbe2959bcf49266e30934a502089c9924 | 7c1d2aebbe23a423a1f41486ecde3b54f12d8418 | Jaminur-Rashid/Problem-Solving | /Codeforces/Round-593/b.cpp | C++ | cpp | 895 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
#define mp make_pair
#define pb push_back
#define ff first
#define s second
#define nl '\n'
#define MAX 99999999999
#define MIN 0
const unsigned int M = ... |
0fb7a075c5be475e66dba605ab0a27401e1d8905 | f3c22917b55281f87059eab292f88c6a0669c080 | joseoyeon/Algorithm | /BOJ/2098_외판원순회.cpp | C++ | cpp | 623 | no_license | #include<iostream>
#include<bits/stdc++.h>
#define MAX 16
#define INF 987654321
using namespace std;
int N;
int map[MAX][MAX];
int dp[MAX][(1<<MAX)];
int maxBit=0;
int dfs(int n, int bit){
if(bit == maxBit){
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
cin >> N;... |
6ec287f85fdc3e31b4f5503a343cd238ffca2b37 | 891d4f97def808d15914389ee5bece2a9ec5dfc4 | jungsagacity/functionCombination_ | /xmill/XMLParse.hpp | C++ | hpp | 15,634 | no_license | /*
This product contains certain software code or other information
("AT&T Software") proprietary to AT&T Corp. ("AT&T"). The AT&T
Software is provided to you "AS IS". YOU ASSUME TOTAL RESPONSIBILITY
AND RISK FOR USE OF THE AT&T SOFTWARE. AT&T DOES NOT MAKE, AND
EXPRESSLY DISCLAIMS, ANY EXPRESS OR IMPLIED WARRANTIES... |
c3f2cea43b7eee053efd19a4bce0de73975ae0a9 | ea0ae8ade442a547026a70d795acd18e904178a1 | cecilecaillol/cmssw | /L1Trigger/ME0Trigger/src/ME0TriggerBuilder.cc | C++ | cc | 1,889 | permissive | #include "L1Trigger/ME0Trigger/src/ME0TriggerBuilder.h"
#include "L1Trigger/ME0Trigger/src/ME0Motherboard.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "Geometry/Records/interface/MuonGeometryRecord.h"
#include "Geometry/GEMGeometry/interface/ME0Geometry.h"
ME0TriggerBuilder::ME0TriggerBuilder(... |
eacdebb35361f5c0ee40633ceedea6cfaf9e0e5a | 00b84ac045bcb104204b18ac3830b947b8e2326d | weizai118/bsf | /Source/Plugins/bsfRenderBeast/BsRendererScene.cpp | C++ | cpp | 33,444 | permissive | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
#include "BsRendererScene.h"
#include "Renderer/BsCamera.h"
#include "... |
1890f46cf071a6b45bcf96b5b85b9f7720ede215 | a665d92316d5b3263b3b609c05d866de06a55104 | zeborrego/opensource.apple.com | /src/AppleOnboardAudio/AppleOnboardAudio-226.2.12/AppleLegacyAudio/AppleDBDMAAudio/Apple02DBDMAAudioDMAEngine.cpp | C++ | cpp | 102,265 | no_license | #define DEBUGTIMESTAMPS FALSE
#include "Apple02DBDMAAudioDMAEngine.h"
#include "Apple02Audio.h"
#include <IOKit/IOMemoryDescriptor.h>
#include <IOKit/audio/IOAudioDebug.h>
#include <IOKit/IOFilterInterruptEventSource.h>
#include <IOKit/IOWorkLoop.h>
#include "AudioHardwareUtilities.h"
#include "AppleiSubEngine.h"
... |
3ac3a2aa0ff3c0d27c885b6d60066ab32ee06489 | c2739653ddccd0223075a8b3a84597c2887a755a | KlimRadostev/CPP-Piscine | /Day02/ex01/main.cpp | C++ | cpp | 1,499 | no_license | // ************************************************************************** //
// //
// ::: :::::::: //
// main.cpp :+: :+: :+: ... |
334f28e97a3522f7495a8b4eb3693d12042c85f2 | b8442dab90aa430d329cd7ba2e1ffde265c8e0d5 | audiofilter/pyspuc | /pyste/butterworth_iir.cpp | C++ | cpp | 592 | no_license |
// Boost Includes ==============================================================
#include <boost/python.hpp>
#include <boost/cstdint.hpp>
// Includes ====================================================================
#include <spuc/butterworth_iir.h>
// Using =======================================================... |
16ea05e124a45b590b076a7d979c95c55dd1dea6 | 9b1abadbdc475bf7720616cde39f83d1c0efb85f | halsoo/04_507_real-dataset | /src/myUtil.cpp | C++ | cpp | 14,222 | no_license | #include "myUtil.hpp"
void myUtil::withStrokeRect(int x, int y, int size,
ofColor stroke, ofColor fill) {
ofFill();
ofSetColor(fill); //fill color
ofDrawRectangle(x, y, size, size);
ofNoFill();
ofSetColor(stroke);//stroke color
ofDrawRectangle(x, y, size, size);
}
... |
98ea2d60110c27e3acc7c9dc42df22e5f72ad668 | 4af6ba83f20f99860248c5475dcbad571f673a57 | PekkaCoder/SimpleCplusplusCalculator | /Calculator/Calculator.cpp | C++ | cpp | 2,905 | permissive | #include <iostream>
#include <string>
using namespace std;
enum class CalculatorOperation : char { None=0, Plus, Minus, Multiply, Divide, Exit };
CalculatorOperation askOperation()
{
int selection;
CalculatorOperation operation;
cout << "Please select the operation: Plus (1), Minus (2), Multiply (3), Divide (4), ... |
d2cf17bb0a8afa30b6208c004dbb15b9fea8f6fe | 083c9061c35986b9a76a3618eb554d8cc31c3e14 | sgrekhov/sdk | /runtime/vm/virtual_memory_test.cc | C++ | cc | 3,000 | permissive | // Copyright (c) 2012, 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 "vm/virtual_memory.h"
#include "platform/assert.h"
#include "vm/heap/heap.h"
#include "vm/unit... |
be78c475c5c7764c6ba5a01b6eb8a962d8f80d6a | 0ac4fe270055caadef550233844e8557e995e127 | ariabonczek/CommandList | /src/Main.cpp | C++ | cpp | 4,752 | permissive | //-----------------------------------
// PROPERTY OF ARIA BONCZEK
// COPYRIGHT(c) UNDER THE MIT LICENSE
//-----------------------------------
#include <tuple>
#include <iostream>
/// <summary>
/// Sample to prove it works with user-defined types
/// </summary>
struct Vector3
{
float x, y, z;
Vector3() {}
};
templa... |
3f7b3e446fe915b94846cabb173986488723ffae | ace8725c7ca9d2aa6c29cfe370579b19220d73f8 | webosce/chromium53 | /src/cc/blink/web_external_bitmap_impl.cc | C++ | cc | 1,223 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/blink/web_external_bitmap_impl.h"
#include <stdint.h>
#include "cc/resources/shared_bitmap.h"
namespace cc_blink {
namespace {
SharedBit... |
8ab7099bc387762b32e2c7f7711437a0358f9fd1 | a99b853724a50b2cbc995978d88dfcd19d21f220 | kodypeterson/hiphop-php | /hphp/runtime/eval/debugger/cmd/cmd_eval.cpp | C++ | cpp | 2,950 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
+---------... |
8560323bb0b8d7467bcb5301e645319c8c1c6c61 | 16951c6a57312a97d43173fb726cb1c734d79a10 | Orion545/OI-Record | /Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0222/money/money.cpp | C++ | cpp | 1,111 | no_license | #include <iostream>
#include <fstream>
#include <cstring>
#include <algorithm>
using namespace std;
int t,n,a[103],ans[23],ans1=0,js;
int pd(int be,int wz,int x){
int i=be+2,j,k=0,u,v,w;
u=a[be],v=a[be+1];
if(i>wz){
int kk,ks,kv,kvv;
kk=x/u;
ks=x%u;
kv=v/u;
kvv=v%u;
if(ks==0) k=1;
else if(kvv%ks==0&... |
8ecead95e70eaa8e0d26a9d53f748a1a1e174c6e | daecc7460321a052d19a15712ff390cac1c15de6 | Cloude-dehua/compute-material | /课件&代码/代码/20/最大连续子序列.cpp | C++ | cpp | 1,568 | no_license | /**
登登考研团队
*/
#include <cstdio>
const int maxn = 100000;
int a[maxn];
int n;
void solve1() {
for(int i=0; i<n; i++) {
scanf("%d", &a[i]);
}
int maxSum = a[0]; // 默认最大子序列为第一个数字
int ansi = 0, ansj = 0;
// preSum[i] --- [0, i]
// preSum[j] - preSum[i-1]
for(int i=0; i<n; i++) { // 枚举我们的子序列的开始和结尾[i, j]
fo... |
2513e79321bbd4de78b81b19a902b3a9d5023ce2 | 728c76779a05fde5bc4b822af015be9df4eb2ffd | jepsonyang/DuiLib | /QQDemo/main_frame.hpp | C++ | hpp | 1,263 | no_license | #ifndef MAINFRAME_HPP
#define MAINFRAME_HPP
#include "skin_change_event.hpp"
#include "UIFriends.hpp"
class MainFrame : public WindowImplBase
{
public:
MainFrame();
~MainFrame();
public:
LPCTSTR GetWindowClassName() const override;
virtual CDuiString GetSkinFile() const override;
virtual UILIB_RE... |
e15aef1c99bbfe70c5fef216e3ab71eab45af250 | 1ecf65fa20f17675c507f8d1eb6871d01cbfc572 | Tech-XCorp/DataTransferKit | /packages/Operators/test/tstCoarseLocalSearch.cpp | C++ | cpp | 5,060 | no_license | //---------------------------------------------------------------------------//
/*
Copyright (c) 2012, Stuart R. Slattery
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 o... |
ee44b7c1c2c4cbbba0bde0e4d9401d7b99a73811 | ca8f8f2609c5b1af9fe8301c9012e1bf11716cfc | plodev123/kotlin-native | /runtime/src/relaxed/cpp/MemoryImpl.cpp | C++ | cpp | 966 | permissive | /*
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
#include "Memory.h"
// Note that only C++ part of the runtime goes via those functions, Kotlin uses specialized versions.
extern "C" {
OBJ_GETTER(AllocInstance, const... |
379620b5d8c6e97a242b7b8219ebc80349db2ae1 | 2b57bf5da4c403fa2c67f88a51821e976f451935 | ISSuh/chromium | /chrome/browser/notifications/notification_display_queue.cc | C++ | cc | 5,997 | 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 "chrome/browser/notifications/notification_display_queue.h"
#include <algorithm>
#include <utility>
#include "base/bind.h"
#include "base/conta... |
80de8ed9f80315f847d9a905226e190be6130922 | 5523c1417bc3cd36df011d7e7c8fcf0ddc22d5e6 | gabfou/Save | /smtp.cpp | C++ | cpp | 7,061 | no_license | /*
Copyright (c) 2013 Raivis Strogonovs
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute... |
d3438b76df4ac110c391db5f9d745feff3c53cb1 | b8baa767697c1ba4ce9c4f775be4db9fe78ca781 | Boltzee/First_one | /escape one .cpp | C++ | cpp | 1,334 | no_license | #include<bits/stdc++.h>
using namespace std;
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int a[1000005];
int main(){
fast();
int T;cin>>T;
while(T--){
int n;cin>>n;
bool visited[n]={false};
int num=0,ans=0;
for(int i=0;i<n;i++) {
cin>>a[i];
if(a[i]==1) {v... |
53aec3f1372cbd5867ffc73a7e36f7e9bf484b4c | 9e2b9896a4985335550138544f1228a7d83a9d11 | ayushb666/Codechef | /luckyFour.cpp | C++ | cpp | 480 | no_license | #include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
#include <string>
#include <list>
#include <set>
int main(){
long test;
std::cin>>test;
for(long i =0;i<test;i++){
std::string number;
long count=0L;
std::cin>>number;
for(auto it = number.begin() ; i... |
185a20ca845c14763378b577bc1c08e43696c769 | 72b10a1bcfe631683bce0cfd5de77af120a7f889 | mnewhouse/tselements | /src/client/control_event_translator.cpp | C++ | cpp | 3,442 | permissive | /*
* TS Elements
* Copyright 2015-2018 M. Newhouse
* Released under the MIT license.
*/
#include "control_event_translator.hpp"
#include "client_message_dispatcher.hpp"
#include "stage/stage_messages.hpp"
#include "stage/stage.hpp"
#include "controls/key_mapping.hpp"
#include "controls/control_center.hpp"
namespace... |
2405c93fe3c993e05587486f5e8bc79d81ac1482 | 51bdf1c1413ffdcad14ee271836380e92d1d6e2b | jalantechnologies/ssc | /shared/lib_util.cpp | C++ | cpp | 26,866 | permissive | /**
BSD-3-Clause
Copyright 2019 Alliance for Sustainable Energy, LLC
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
and the... |
22fa7b319be384e2945bbfcc0c81e90af18e8c05 | b1f7ced10c9355e3eb301f017dcdbf9862507505 | lele012/rocPRIM | /rocprim/include/rocprim/block/block_exchange.hpp | C++ | hpp | 29,125 | permissive | // Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights... |
ae830b411613e77e23fdd6bd015116108bd1ed1b | 57de861f7defa59dbfc140cd906aa82f114583db | timsilog/cpp-piscine | /d04/ex03/AMateria.hpp | C++ | hpp | 584 | no_license | #ifndef AMATERIA_HPP
#define AMATERIA_HPP
#include <string>
#include <iostream>
class AMateria
{
private:
std::string _type;
unsigned int xp_;
public:
AMateria(std::string const & type);
AMateria(AMateria const & src);
virtual ~AMateria();
AMateria & opera... |
b3e61a4b34b2671fc778627d2b9f36b2c38195dd | ff7716d1e8d9e131a8c081aac315fb327f3bea03 | csnewman/corert | /src/Native/Runtime/FinalizerHelpers.cpp | C++ | cpp | 10,798 | permissive | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// Unmanaged helpers called by the managed finalizer thread.
//
#include "common.h"
#include "gcenv.h"
#include "... |
a068e33d347f045eececae661405f35f3c189b9c | 4d459028268163a3b9a784fa5e00a1701a113c58 | fanzcsoft/windows_embedded_ce_6_r3_170331 | /windows_embedded_ce_6_r3_170331/WINCE600/PRIVATE/TEST/MULTIMEDIA/DIRECTX/DSHOW/CAMERA/TESTS/CAMERAMULTIGRAPHTESTS/tuxtest.cpp | C++ | cpp | 14,387 | no_license | //
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft shared
// source or premium shared source license agreement under which you licensed
// this source code. If you did not accept the terms of the license agreement,
// you are... |
41fdcd602c7f039d9caa201deb1758abd15e1672 | f2ae844f9c471ccb28c02cbba041b0821eeeccb4 | danielecappuccio/UVa-online-judge | /square_sums.cpp | C++ | cpp | 1,162 | no_license | /*
* Competitive Programming
*
* @author Daniele Cappuccio
* @link (https://github.com/daniele-cappuccio/UVa-online-judge)
* @license MIT License (https://opensource.org/licenses/MIT)
*/
#include <iostream>
using namespace std;
int sum_borders(int** matrix, int S){
int res = 0;
fo... |
f50ad28df5432e2126d9db416945b730b56ea438 | 700f9cd148bb25345e385b41fb140f730a8a0f3e | yfisyak/star-sw | /StRoot/StSvtSimulationMaker/StSvtHybridNoise.cc | C++ | cc | 1,587 | no_license | #include <Stiostream.h>
#include <math.h>
#include <stdlib.h>
#include "StSvtHybridNoise.hh"
#include "TMath.h"
ClassImp(StSvtHybridNoise)
StSvtHybridNoise::StSvtHybridNoise(int barrel, int ladder, int wafer, int hybrid):StSvtHybridPixelsC(barrel,ladder,wafer,hybrid)
{ }
//StSvtHybridNoise::~StSvtHybridNoise()
//{ }... |
6ea0902c8b4803e79c885f16ae837fcefd29bfe8 | fe5acb551fb96e5229b5c86580de219bae3fdead | Galino/inet4_mig | /src/inet/common/ProtocolGroup.cc | C++ | cc | 5,114 | no_license | //
// Copyright (C) 2013 OpenSim Ltd.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program i... |
f225d33cfa51b0100261306817ea01bed37b2d25 | 2825b8f0f38858ddb354dfe2e84af4e17800b030 | muitnet/COMPUTER-GRAPHICS | /PRACT3(B.CPP | C++ | cpp | 839 | no_license | #include<iostream.h>
#include<graphics.h>
#include<conio.h>
#include<dos.h>
#include<math.h>
void main()
{
float d;
int gd,gm,x,y,r,xc,yc;
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"c:\\tcc\\bgi");
cout<<"\n\n\t\t\***Mid-Point circle genaretion***\n\n";
cout<<"Enter the radius of the circle:";
c... |
f13401e93ea9c67112b5ff866fe0b5793859d5a7 | ccbf5e9785363be011445f6908169c0681b2e2ab | ChilliWorks/ChilliSource | /Source/CSBackend/Platform/Android/GooglePlay/JNI/Networking/IAP/GooglePlayIAPJavaInterface.cpp | C++ | cpp | 22,366 | permissive | //
// GooglePlayIAPJavaInterface.cpp
// ChilliSource
// Created by Scott Downie on 14/06/2013.
//
// The MIT License (MIT)
//
// Copyright (c) 2013 Tag Games Limited
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Sof... |
72a955e7b1b6312a6fe4d53d5ce4a81ccc98fa6a | 994607640b37fbf349a157ea96dfe6c425d2b5c3 | znznz6037/SWEA | /1225.cpp | C++ | cpp | 1,681 | no_license | #include <iostream>
#include <cstring>
using namespace std;
class Queue {
public:
int front, rear, size = 9;
int *queue;
Queue() {
queue = (int *)malloc(sizeof(int)*size);
front = rear = 0;
}
~Queue() {
memset(queue, 0, sizeof(int)*size);
front = rear = 0;
//delete[] queue;
}
void enQueue(int data... |
c86d034e9be933b8d58c7bfabd7b4d29176da888 | 381b546943ae2b1ee0de57c2d2d9a7e4fc4bb9d8 | fujunwei/dldt | /inference-engine/src/low_precision_transformations/include/low_precision_transformations/transformer.hpp | C++ | hpp | 4,762 | permissive | // Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <algorithm>
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "layer_transformation.hpp"
#include "iparams_manager.hpp"
#include "ilayer_transformations_manager.hpp"
namespace Inf... |
8751b43969a34708fed46fe5a487c29058efdabe | 1fddc514396d55eb236593fd087d380844bc28c3 | crecentcoin/crecentcoin | /src/rpcwallet.cpp | C++ | cpp | 55,161 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp>
#include "wallet.h"
#include "walletdb.h"
#include... |
244e9633bcc62d76b6d1584c832b60e1f5a319d5 | 8772bdd7ffd4ff7861b94f756f72d43d42bda920 | wrongswany/soui | /SOUI/src/control/STreeView.cpp | C++ | cpp | 37,714 | permissive | #include "souistd.h"
#include "control/STreeView.h"
#include <algorithm>
namespace SOUI
{
class STreeViewDataSetObserver : public TObjRefImpl<ITvDataSetObserver>
{
public:
STreeViewDataSetObserver(STreeView *pView):m_pOwner(pView)
{
}
virtual void onBranchChanged(HTREEITEM hBranch)
{
m_pOwner->onB... |
d9f53bafb1dd37759fea9a4ebc49a6c539a40254 | b5b858e72f4ff7209743899d1cef928f0bd8a599 | therealbnut/LLVM-Bleurgh | /Bleurgh/main.cpp | C++ | cpp | 15,563 | no_license | //
// main.cpp
// Bleurgh
//
// Created by Andrew Bennett on 5/08/13.
// Copyright (c) 2013 TeamBnut. All rights reserved.
//
#include "utility.h"
#include <iostream>
#include <fstream>
#include "llvm/ADT/Triple.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/Bitcode/Reade... |
af5bcbd0e770a915727731510e76cf4c4097ae2b | 88bcf7940ede49c44bbeb3b12decf89c674829be | necabo/ppcpp | /chapter5/fragment_07.cpp | C++ | cpp | 385 | no_license | #include "../std_lib_facilities.h"
int main() {
try {
bool cond = true;
if (cond)
cout << "Success!\n";
else
cout << "Fail!\n";
return 0;
} catch (exception& e) {
cerr << "error: " << e.what() << '\n';
return 1;
} catch (...) {
... |
19e5bedf3b368e1cac7c9614e784e6f763dce56e | ccab45c86c07134a67e0db39dd2a0388010493a3 | alexandraback/datacollection | /solutions_5695413893988352_0/C++/Zhandos123/a.cpp | C++ | cpp | 1,993 | no_license | //#pragma comment(linker, "/STACK:512000000")
#include <bits/stdc++.h>
#define forn(i, n) for(int i = 0; i < (int)(n); ++i)
#define all(x) x.begin(),x.end()
#define sz(x) (int)(x.size())
#define LL long long
#define mp make_pair
#define pb push_back
#define f first
#define s second
using namespace std;
... |
c77449822813a2aa53d37541b0544a94b5a66e51 | 8a10e3a646e59ad2aff39ed6100a700609a3ab6b | nickolas-pohilets/antlr3-cxx | /runtime/Cxx/test/TestLexer.cpp | C++ | cpp | 2,003 | permissive | #include <gtest/gtest.h>
#include "BaseTest.hpp"
#include "P1Lexer.hpp"
#include "P1Parser.hpp"
#include "P2Lexer.hpp"
#include "P2Parser.hpp"
#include "P3Lexer.hpp"
#include "P3Parser.hpp"
#include "P4Lexer.hpp"
#include "P4Parser.hpp"
using namespace antlr3;
TEST(TestLexer, testLocation)
{
auto inputStream = mak... |
acb0f58e77f734158197211058a7a8d511d8a535 | 299e91bc275065d99fcceca068edd94981c4c637 | triptych/Godot-Webrtc-test-project | /include/godot_cpp/ShortCut.hpp | C++ | hpp | 634 | no_license | #ifndef SHORTCUT_H
#define SHORTCUT_H
#if defined(_WIN32) && defined(_GD_CPP_BINDING_IMPL)
# define GD_CPP_BINDING_API __declspec(dllexport)
#elif defined(_WIN32)
# define GD_CPP_BINDING_API __declspec(dllimport)
#else
# define GD_CPP_BINDING_API
#endif
#include "core/CoreTypes.hpp"
#include <godot.h>
#includ... |
c57613416c8784004fdc3e141b8dd4d257472740 | b981fa9b55ebf1c88ccd92bab87ee9a0a1024547 | mike9304/schoolWorks | /programming_language/HW(108)/Homework1/ext/nana/include/nana/datetime.hpp | C++ | hpp | 2,084 | permissive | /*
* A Date Time Implementation
* Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.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)
*
* @file: nana/datetime.hpp
*/
#ifndef NANA_DATETIME_HPP
... |
4a63dbb94e143a93194478dd6571969a9a52e94c | 121426d404cecd4d6e7494aa9484289b45d3ae7d | sachaaaaa/loki-network | /llarp/service/endpoint.hpp | C++ | hpp | 12,435 | permissive | #ifndef LLARP_SERVICE_ENDPOINT_HPP
#define LLARP_SERVICE_ENDPOINT_HPP
#include <ev/ev.h>
#include <exit/session.hpp>
#include <net/net.hpp>
#include <path/path.hpp>
#include <path/pathbuilder.hpp>
#include <service/address.hpp>
#include <service/handler.hpp>
#include <service/identity.hpp>
#include <service/pendingbuf... |
afe96564d5b27c270af5ac50e69913c2eec215c5 | 1978df10530397134c82d7d3dec97605e7cdebf5 | observernet/obsr | /src/qt/trafficgraphwidget.cpp | C++ | cpp | 5,323 | permissive | // Copyright (c) 2011-2013 The Bitcoin developers
// Copyright (c) 2017-2018 The PIVX developers
// Copyright (c) 2018 The OBSR developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "trafficgraphwidget.h"
#incl... |
1f9ca8dbcaabfc6d9b2a3480cf260a246f83a239 | 8151d7972b6926ffda7759452d0e01812fc31102 | albertodesouza/CANOpenAnalyzer | /filterutility.cpp | C++ | cpp | 4,731 | permissive | #include "utility.h"
#include "filterutility.h"
#include "dbc/dbchandler.h"
#include <QSettings>
uint32_t FilterUtility::getIdAsInt( QListWidgetItem * item )
{
return Utility::ParseStringToNum(getId(item));
}
QString FilterUtility::getId( QString itemText )
{
if (itemText.contains(" "))
// Strip away ... |
49ef039456a12e361b8ee877ad1ae02d73abf091 | 7d3fb8f2438290f9c0c51e22dccb335cfc96d581 | cha63506/chrome-3 | /chrome/browser/extensions/extension_webui_apitest.cc | C++ | cc | 9,499 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/values.h"
#include "chrome/browser/extensions/... |
eead86f5b2336afc743fde62b1300c04480c99a7 | 49c0220e1d14090f2102ba5f28a5dc7e0bb0fa79 | jtroch/RevPiIOCtrl | /include/ThreadSynchronization.hpp | C++ | hpp | 329 | no_license | #include <sys/sem.h>
#include <onposix/PosixMutex.hpp>
#define SEM_ID_ENTRANCE 1
#define SEM_ID_EXIT 2
using namespace onposix;
class ThreadSynchronization {
public:
static PosixMutex SerialMutex;
static PosixMutex SettingsMutex;
static PosixMutex IOMutex;
static PosixMutex IdKey... |
16d7dc2b5ee92860411423bf34be50d9110936a0 | 87db4c98dd61e71b46fe159f948296b66986b2e5 | SvenRoefs/GUIproject-QT | /mainwindow.cpp | C++ | cpp | 3,701 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
/*
* Constructor
*/
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
// create new widget and place it as a central widget
QWidget *widget = new QWidget();
this->setCentralWidget(widget);
// create tabs
this->create_t... |
57560ee2a1617ca216cf066df91668cf4c5d585b | a5ce63569c7baee0dda049504c7796fcfdebda44 | goodspeed24e/Programming | /Effective STL/estl-examples/06-1.cpp | C++ | cpp | 1,048 | permissive | //
// Example from ESTL Item 6
//
// Fails under MSVC/native lib, STLPort
//
#include <list>
#include <iostream>
#include <fstream>
#include "ESTLUtil.h"
int main()
{
using namespace std;
using namespace ESTLUtils;
ifstream dataFile("ints.dat");
/* incorrect, but works with some compilers:
{
list<int> data(... |
854428e177de2ecabb5d714cdcede28776a31c4b | bb51a249789d0d412557cc9c93b4ee91f5020024 | krisgun/inviwo | /src/core/tests/unittests/interpolation-tests.cpp | C++ | cpp | 5,210 | permissive | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2014-2019 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
1b7bc5d29a6ff8f07b57b7cf899a9dae1cd01b4d | a562adf4c43cb63d3192eb0ab8f064e224f4689c | shuxianghuafu/Research | /CRAB/interactions/crab_interaction_kpluskplus.cpp | C++ | cpp | 1,304 | no_license | /* These first two numbers describe the number of ident numbers used to
screen phase space pt.s from files that are to be used in the generation
of correlation functions. These codes may be different than those of the
particles you are investigating. For instance, you may wish to do pi-pi-
correlations an... |
f35072dce2cb54290c87579f3917944e033c82c5 | a43263bcf21a1fa21885ee7bd0d9dd320fc2097e | sohomdatta1/serenity | /Userland/Libraries/LibC/wctype.cpp | C++ | cpp | 3,492 | permissive | /*
* Copyright (c) 2021, the SerenityOS developers
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Format.h>
#include <string.h>
#include <wctype.h>
enum {
WCTYPE_INVALID = 0,
WCTYPE_ALNUM,
WCTYPE_ALPHA,
WCTYPE_BLANK,
WCTYPE_CNTRL,
WCTYPE_DIGIT,
WCTYPE_GRAPH,
WCTYPE_LOWER... |
794af9818b142dabd1fcf4f6fd4cbd935dad1403 | 3eac7ea04807583897428ed9a316d0c491edb673 | Aque1228556367/Visual_Cpp_By_Example | /Chapter10/Sample231/GetDriverSpace/GetDriverSpace.cpp | C++ | cpp | 2,101 | no_license | // GetDriverSpace.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "GetDriverSpace.h"
#include "GetDriverSpaceDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//////////////////////////////////////////////////////////////////... |
0b2404da8681a64769d7791ccf7bbe6118e43785 | 1a98a814390c05c528cba399c08a1ca446c5e3c8 | ninhngocnhi/C-Demo | /vedepcuaxau.cpp | C++ | cpp | 590 | no_license | #include<iostream>
#include <math.h>
using namespace std;
int main (){
int n,B;
cin>>n>>B;
string s;
cin>>s;
int a[n]={0};
int k=1;
for(int i=0;i<n;i++){
int dem=1;
for(int j=i+1;j<n;j++){
if(s[j]==s[i]){
dem++;
i=j;
}
else{
break;
}
}
a[k]=dem;
k++;
}
int X=k;
a[0]=0;
int m... |
78eac4f0326bc3588ca45b2cf77ea7aea798f04a | 6a4a3697ffbda3985f9a0a7f10407c98c1aa4c52 | deathboydmi/mp2-lab1-set | /test/test_tset.cpp | C++ | cpp | 6,121 | no_license | #include "tset.h"
#include <gtest.h>
TEST(TSet, can_plus_three_sets_in_one_line)
{
const int size = 6;
TSet s1(size), s2(size), s3(size), s4(size), s0(size);
for (int i = 0; i < size; i++) s0.InsElem(i); //111111
s1.InsElem(1);
s1.InsElem(3); //010100
s2.InsElem(0);
s2.InsElem(2); //101000
s3.... |
80eff0e6a632be31dddff217313197826312dc6b | 72ea3df8295c4315e798100e269284c42e41cbe0 | djs55/duniverse | /duniverse/ocamlgraph.1.8.8+dune/benchs/bgl/bench.cpp | C++ | cpp | 1,169 | permissive | #include <string>
#include <iostream>
#include <time.h>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graphviz.hpp>
#include <boost/graph/random.hpp>
#include <boost/graph/depth_first_search.hpp>
#include <boost/random/linear_congruential.hpp>
using namespace boost;
using namespac... |
2ae65333f4d42cba639082b4ddb25d9bb8d3915c | 7758a5dd4d6842de0e3c54c54812de1e0b55de41 | JuliaComputing/tensorflow | /tensorflow/compiler/xla/service/shape_inference.cc | C++ | cc | 120,033 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
ebda97bc800627e87866b2b5a7f0f045dd21546b | cb694c2287f4592305510aa259f97afc888e710a | dboyd42/data-structures | /ANN/trainingData.cpp | C++ | cpp | 3,312 | no_license | /* ************************************************************************
Name: David Boyd and Jacob Reola
Assignment: 09_nNetwork
Purpose: TrainingData definitions
Notes: n/a
Date: 2018.12.11
************************************************************************ */
#include "trainingData.h"
//===================
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.