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 |
|---|---|---|---|---|---|---|---|---|
8ba4794fcb0148dd143a9f85ef372379d3d5ffbd | 8bbf1e14ade77a4cd5a5f226fb29379947636262 | alexandraback/datacollection | /solutions_5644738749267968_1/C++/wolf5x/D-solution.cc | C++ | cc | 1,631 | no_license | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bi... |
f15e99c70c37eb857fa282a8a90d6a9660f853c3 | 98af9bc7bca881babc6e6f92c1c9a2b9a7042a19 | zizipizi/CircleSpawnAlgorithm | /DP_TestTaskGameModeBase.cpp | C++ | cpp | 5,090 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "DP_TestTaskGameModeBase.h"
#include "UObject//ConstructorHelpers.h"
#include "DP_MainCharacter.h"
#include "DP_AICharacter.h"
#include "DP_AICharacterController.h"
#include "Engine/World.h"
#include "Kismet/KismetMathLib... |
53c12f1112d4da5f1623299842579d1abc9a4ece | 47436f61795113acefaea3e328b250c5b60de9b7 | knagakura/procon | /atcoder/abc159/b.cpp | C++ | cpp | 1,628 | no_license | #include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0;i<int(N);++i)
#define rep1(i,N) for(int i=1;i<int(N);++i)
#define all(a) (a).begin(),(a).end()
#define print(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<_<<", "; cerr<<"]"<<endl; }
#define printpair(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<... |
d9e0b36c0b7089c19a500a02bb691d2978628f12 | 6ef9895fa306eb3cce7aac8da3b7a5eb0b65bbc3 | jfmherokiller/TheOuterWorldsSdkDump | /Indi/SDK/Indi_DIS_Board_T1_classes.hpp | C++ | hpp | 646 | no_license | #pragma once
// TheOuterWorlds SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "Indi_DIS_Board_T1_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// Bluepr... |
ab91d206744369cc1c6ed71c9f656f29d717ac5e | 5f0fa62d9babb458dd46f487099e6f7eecf7dbc0 | RyanBabij/WorldSim | /World_Local.hpp | C++ | hpp | 15,839 | no_license | #pragma once
#ifndef WORLDSIM_WORLD_LOCAL_HPP
#define WORLDSIM_WORLD_LOCAL_HPP
/* WorldSim: World_Local.hpp
#include "World_Local.hpp" */
/**
The World stores local-level data, such as the position of local units.
There is only one world, but each tile on the world is a potential local_world, therefore different te... |
dcafa93fa852acae7a2648b1227e41c24960fac4 | 88f40d44b9d726b071d7f417f5c1b5075f28b583 | tanacchi/rogue_game | /include/dungeon/horizontal_wall.hpp | C++ | hpp | 239 | permissive | #ifndef INCLUDED_HORIZONTAL_WALL_HPP
#define INCLUDED_HORIZONTAL_WALL_HPP
#include <dungeon/dungeon_elem.hpp>
// '-'
class HorizontalWall : public DungeonElem
{
public:
HorizontalWall();
};
#endif // INCLUDED_HORIZONTAL_WALL_HPP
|
9e2bd7630d0530c1b63bc682810ab2236bde5c2a | 13155035e15eb51d085846c07296de5e270677b0 | erikz99/Object-Oriented-Programming | /OOP Project - Store/User.cpp | C++ | cpp | 1,016 | no_license | #include <iostream>
#include <string>
#include "User.h"
using namespace std;
User::User(std::string username, std::string password, std::string email, double money) :
u_username(username), u_password(password), u_email(email), u_money(money)
{}
void User::addToCart(Product* pr, unsigned int num)
{
cart.addProduct(p... |
7ae843cc54fe55e5393ac489141f1da426497dfd | 99d44925e81463efd37b563a2f2a4436074b64aa | ViktorHura/TurboHiker | /Source/presentation/Player.cpp | C++ | cpp | 2,851 | no_license | //
// Created by viktor on 19.12.20.
//
#include "Player.h"
#include "Transformation.h"
#include <cmath>
#include <iostream>
void turbohikerSFML::Player::draw(const double &delta) {
Transformation::instance()->setYpos(
position().y() + 1); // update the camera position to player
Transformation::instance()-... |
e50840b43305c28e43abfeaa2b31c98e101b0792 | a1bde2d7141319c548517e9afe4508e3eb7bba0b | EwoutH/entangled | /gossip/services/tcp_receiver.cc | C++ | cc | 4,642 | permissive | /*
* Copyright (c) 2018 IOTA Stiftung
* https://github.com/iotaledger/entangled
*
* Refer to the LICENSE file for licensing information
*/
#include <boost/crc.hpp>
#include <iomanip>
#include "gossip/node.h"
#include "gossip/services/tcp_receiver.hpp"
#include "utils/logger_helper.h"
#define TCP_RECEIVER_SERVIC... |
a1926dd2ffe565720b452dcf75129a5453c5f484 | c4c7b716fea38e9ba09e156581665c13d20a69cf | BitzenyCoreDevelopers/bitzeny | /src/uint256.cpp | C++ | cpp | 2,267 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "uint256.h"
#include "utilstrencodings.h"
#include <stdio.h>
#include ... |
009e23df7766e3ec5e844c5ce922882fdec7bc63 | b280133dc315cb81a9769e7bf3fc70808991e63e | cmdc0de/WolfshadeMud | /src/attributes.cpp | C++ | cpp | 6,228 | no_license | //////////////////////////////////////////////////////////////
//Wolfshade MUD server
//Copyright (C) 1999 Demetrius and John Comes
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; eithe... |
f9a07d7bcee08b2401b4cd59ca18b5181fcd3570 | 0e93ea278cf2d7f74b2fbc564d485148e6e36daf | LiBromine/cache-simulator | /src/main.cpp | C++ | cpp | 3,013 | no_license | #include <iostream>
#include <string>
#include <fstream>
#include "config.h"
#include "cache.h"
#include "policy.h"
#include "utils.h"
// #define DEBUG
using namespace std;
ReplacePolicy rp = ReplacePolicy::BT; // variable
WritePolicy0 w0 = WritePolicy0::WriteBack; // variable
WritePolicy1 w1 = WritePolicy1::WriteAl... |
05d5f19dce8b8d25539c74acfbcfac09ff31a1b3 | 99115752f717782234206edd26e2de4077dc9b83 | r4start/llvm-with-ms-abi-support | /lib/Target/PowerPC/PPCBranchSelector.cpp | C++ | cpp | 6,540 | permissive | //===-- PPCBranchSelector.cpp - Emit long conditional branches ------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
1f7854a5f4e1fd0403a21c78ce4cc1e4fbdabe09 | 62e70cf9b14f87eaf5a0c5ce08eb6223efdb827c | zgsxwsdxg/clDNN | /src/gpu/crop_gpu.cpp | C++ | cpp | 3,465 | permissive | /*
// Copyright (c) 2016 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
18bc5bdb5bcef495a7e971cdee874c59c746eda7 | f6f4ec2f1f73dad8cca3a0c52e3bff1c081b40cd | ythlml/mindspore | /mindspore/ccsrc/onnx/onnx_exporter.cc | C++ | cc | 46,748 | permissive | /**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* 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... |
1c76702162e783c5dc1f7a19f6e305a21fee1dcc | d89beba55445efa572e225dea401642b63739fd9 | Beatrice7/what-i-learned-in-wd | /20140710/bool.cpp | C++ | cpp | 344 | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(int argc, const char *argv[])
{
bool res;
string s1 = "hello";
string s2 = "world";
res = (s1 < s2); // true
/*
* bool类型的值为true和false,但是打印时仍然为1或者0
*/
cout << res << endl;
return 0;
}
|
f45818da34af6ee874dfa352962027d98227f888 | c3c92e5bf89382d68a5aa4125be36617a9fdfdc0 | penaarsenio/csc103 | /csc103-lectures/04/moreloops.cpp | C++ | cpp | 2,881 | no_license | /* More about loops. */
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
int main()
{
/* BIG PICTURE IDEAS WITH LOOPS.
* 1. "Brute force" -- leverage the speed of the computer to explicitly
* run through an entire space of potential solutions, checking
* each candidate for validity.... |
5be5a0ca2d173116ed4529b3f9aec4f306020737 | 7777f80a087dada8aff6afb829f2458f20c3db6c | WaleedAbdelhakim/Competitive-Programming | /PKU/2763.cpp | C++ | cpp | 3,649 | no_license | #include <iostream>
#include <vector>
#include <math.h>
using namespace std;
struct edge {
int to , cost , ind;
edge (int _to , int _cost , int _ind) : to(_to) , cost(_cost) , ind(_ind) {}
};
const int N = 1e5 + 5; // number of nodes
vector<edge> adj[N];
int val[N] , on[N];
struct BIT {
vector<int> tree... |
87b7985d3ba3e8d4494449d264529e94ab5d61c4 | b817be1ad300accdb28f67ea373a524ee5abace8 | Pandinosaurus/pytorch | /aten/src/ATen/native/Blas.cpp | C++ | cpp | 7,423 | permissive | #include <ATen/ATen.h>
#include <ATen/CPUFunctions.h>
#include <ATen/Dispatch.h>
#include <ATen/NamedTensorUtils.h>
#include <ATen/ScalarOps.h>
#include <ATen/Config.h>
#include <ATen/native/mkldnn/Matmul.h>
namespace at {
namespace meta {
TORCH_META_FUNC(addmv)(const Tensor &self, const Tensor &mat, const Tensor &ve... |
3dab970d03de767d18ba55e860fb5805c3854043 | c64fc5fdfb028df37423f0f0543acc3e5679a0fb | gergespenst/digi_new_year_led | /led_effects.cpp | C++ | cpp | 10,615 | no_license | #include "led_effects.h"
static uint8_t g_colorEffect = 0, g_colorSpeed = 0x05,
g_brEffect = 0, g_brSpeed = 0x05,
g_allEffect = 0, g_allSpeed = 0x05;
T_COLOR_PALETTE g_currentPalette = COLOR_RING;
EEMEM T_COLOR_PALETTE g_eepromPalette = COLOR_RING;
EEMEM uint8_t g_eepromAllEffect = 0;
#define RED {0x00,0xFF,0... |
1c7634ac3f7fc128dcae8d07bc8a6d264d469165 | 406ecd3b5397079e89acedd61039b25f2e7896ff | lowdef/ledger | /src/stats.cc | C++ | cc | 3,980 | no_license | /*
* Copyright (c) 2003-2015, John Wiegley. 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 c... |
7d4078e41b1317f6405f777c0a3ccabcf807560a | ae0549c231334449b69957ff007e2b3756ac8438 | Dimferon/stc_qt_test | /stcgraphicpoints.cpp | C++ | cpp | 869 | no_license | #include "stcgraphicpoints.h"
#include <QWheelEvent>
StcGraphicPoints::StcGraphicPoints(QWidget *parent) : QGraphicsView(parent) {}
void StcGraphicPoints::wheelEvent(QWheelEvent *event)
{
QGraphicsView::wheelEvent(event);
scrollPoint += event->angleDelta().y() / 10;
auto sceneRect = scene()->sceneRect();
sceneR... |
595e529851eea3fae27b8375b3f01a64830a02c0 | c6b88b0bac411ae6b600081c42cd1da89549bf27 | Unwrittend/CS60 | /HW6/Prob2/organism.cpp | C++ | cpp | 1,882 | no_license | #include "organism.h"
#include <iostream>
using std::cout;
using std::endl;
Organism::Organism() : repChar(' '), turnsSurvived(0), row(-1), column(-1), spotUsed(false), moved(false)
{
//purposefully empty
}
Organism::Organism(int r, int c) :
repChar(' '), turnsSurvived(0), row(r), column(c), spotUsed(false), m... |
c535cd1d5e64a29fa6c2000e6e6bed53f1aa15bb | 283b3582046fd80f2f2c81c696da4e4bc0e8191d | cal2u/SPOJ | /PARTY/main.cpp | C++ | cpp | 1,495 | no_license | /*
Spoj.com Problem PARTY
Solved by cal2u on 10/12/15
*/
#include <stdio.h>
#include <math.h>
const int MAX_BUDGET = 500;
const int MAX_PARTIES = 100;
int budget =-1, n = -1;
int memo[MAX_PARTIES+1][MAX_BUDGET+1];// max fun considering up to [party][money_left]
int costs[MAX_PARTIES+1];
int funness[MAX_PAR... |
c7bbc0968f63333c2045a2ddd99545fa10ef14d8 | 0ec3d095fa267689c8c3e53ebd56483835eb4003 | sysfce2/SFML_Asteroids-Multiplayer | /src/Asteroid.cpp | C++ | cpp | 4,894 | no_license | #include "Asteroid.hpp"
Asteroid::Asteroid(sf::Vector2f pos, unsigned sides, float speed, sf::Vector2f windowSize):
Collider(sides),
m_velocity(1, 1),
m_speed(speed),
m_isAlive(true),
m_wasOnScreen(false),
m_explosionSound("audio/explosion.wav")
{
if (sides < 5)
{
sides = 5;
}
m_radius = (side... |
4a20dc66c2af8acf15e2133ccdec86c4e6c3b608 | 589150a3a95dda22535276a7ea7ff028d93b8814 | nikhiljsk/DS_Algorithms_Coursera_Specialization | /Algorithmic Toolbox/Week 3/4.cpp | C++ | cpp | 597 | no_license | #include <algorithm>
#include <iostream>
#include <vector>
using std::vector;
long long max_dot_product(vector<int> a, vector<int> b) {
// write your code here
long long result = 0;
sort(a.begin(), a.end());
sort(b.begin(), b.end());
for (long long i = 0; i < a.size(); i++) {
result += ((long long) a[i]... |
a56c4d63c44ee0612371fe3fe43f101c73306ae7 | 8b2dbe9859ecfef100c582b8dcd16effee2ae493 | Skory/fbthrift | /thrift/compiler/test/fixtures/exceptions/gen-py3/module/clients_wrapper.cpp | C++ | cpp | 2,470 | permissive | /**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include <src/gen-py3/module/clients_wrapper.h>
namespace cpp2 {
RaiserClientWrapper::RaiserClientWrapper(
std::shared_ptr<::cpp2::RaiserAsyncClient> async_client,
std::shared_ptr<apache:... |
c560b10f55cb5fba22e2ede94f8803ddff8d4288 | 532e620ed6d61a9d50da73a558dd5303c3d9efb8 | Ant0Kr/SPO_LAbs | /L3_WinApi/CashMachine/CashMachine/processunit.cpp | C++ | cpp | 5,091 | no_license | #include "processunit.h"
#include <windows.h>
#include <tlhelp32.h>
#include <iterator>
HANDLE cProcessUnit::hNamedWritePipe;
LPSTR cProcessUnit::hPipeWriteName = "\\\\.\\pipe\\$SecurityATmWriteLine$";
HANDLE cProcessUnit::hNamedPerformPipe;
LPSTR cProcessUnit:: hPipePerformName = "\\\\.\\pipe\\$SecurityATmPerformLin... |
4d4b2fd167179a2af50887c98ae6beca5535ee6d | e3d90819753a381b4b745cfcbac65ae43aa10462 | ywapple/chromium | /ash/login/ui/login_auth_user_view.cc | C++ | cc | 12,426 | 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 "ash/login/ui/login_auth_user_view.h"
#include "ash/login/lock_screen_controller.h"
#include "ash/login/ui/lock_screen.h"
#include "ash/login/ui... |
54ffc1a60cf102e43544c427a7368553cb10f2c1 | 50ed7099741bde12f44dab9d25120366cef5cebf | rcy17/StudentAchievementManager | /main.cpp | C++ | cpp | 301 | no_license | #include "Menus.h"
#include "User.h"
#include "ConsoleUtils.h"
//一个用来标记是否继续运行的全局变量
bool g_bRunFlag = true;
int main()
{
//注册一个用户
CUser user;
//通过一系列更新来实现用户的相关操作
while (g_bRunFlag)
{
user.Update();
}
return 0;
} |
19f8d74a0b390ce9282bfae5b7ab2222aa2ed9f7 | f31b0763352a7cf9bdba548ac5f05e005ad9ca67 | ldfaiztt/algorithm-3 | /tc/srm560_div2/250.cpp | C++ | cpp | 3,523 | no_license | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... |
51cae95a36d50501cd2125d70bb6d46c494605df | 0452863598a4912f9ceb6369feab5d6644ac54ee | nemimccarter/csc600 | /hw2/q2ParabolicApprox.cpp | C++ | cpp | 1,144 | no_license | // Nehemya McCarter-Ribakoff
// Dujmovic
// HW2
// 29 September 2017
#include <iostream>
// y = ax^2 + bx + c
typedef struct {
double** data;
int rows;
int columns;
} matrix;
void approximateCurve(int x1, int y1, int x2, int y2,
int x3, int y3, int x);
int main() {
return 0;
}
v... |
6ab6e0f5517bd88a534774dfe4388c445066e521 | 6ea4dcb5b9c510c18bc3c7abf7a00270475b05a4 | rupa2997/ds_prog | /bubbleSort.cpp | C++ | cpp | 543 | no_license | #include<iostream>
using namespace std;
int main(){
int arr[]={44,7,2,1,77};
int n,i,k,j,min,temp,flag=0;
n=sizeof(arr)/sizeof(arr[0]);
for(i=0;i<n-1;i++){
for(j=0;j<n-1-i;j++){
flag=0;
if(arr[j]>arr[j+1]){
temp=arr[j];
arr[j]=a... |
57521ad4bc935db551d6cb1945d4427e5b7444c3 | 72fb85ff4eb9198cae62364271738ed158002566 | EthanHu01/microsoft-ui-xaml | /dev/Generated/AnimatedVisualPlayer.properties.cpp | C++ | cpp | 10,864 | permissive | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "AnimatedVisualPlayer.h"
namespace win... |
5cf8e9629c6bb0084bb2db646448040a83bcc8c8 | a8b754eafeaf0637e359742ba3048d8fc36fcbe0 | razinvv/mp2-lab2-matrix | /test/test_tvector.cpp | C++ | cpp | 4,708 | no_license | #include "utmatrix.h"
#include <gtest.h>
TEST( TVector, can_create_vector_with_positive_length)
{
ASSERT_NO_THROW(TVector<int> v(5));
}
TEST(TVector, cant_create_too_large_vector)
{
ASSERT_ANY_THROW(TVector<int> v(MAX_VECTOR_SIZE+1));
}
TEST(TVector, throws_when_create_vector_with_negative_length)
{
ASSERT_AN... |
590a67df11ba8bd7ffabfa604b538c71dfed7a73 | b35c3b668a91d0b40db9bbca07ae807ce1a8843c | zhanglGitHub/windows_10_shared_source_kit | /windows_10_shared_source_kit/windows_10_shared_source_kit/unknown_version/Source/Tests/Graphics/Graphics/Base/Tests/CCDAPI/MinimumDisplaySpec/CheckTabletNativeResolution.cpp | C++ | cpp | 5,982 | no_license | #include "CheckTabletNativeResolution.h"
#include <regex>
#include <shellapi.h>
#include <functional>
typedef std::basic_string<TCHAR> tstring;
typedef std::basic_regex<TCHAR> tregex;
typedef std::match_results<tstring::const_iterator> tsmatch;
CheckTabletNativeResolution::CheckTabletNativeResolution( Logger... |
efc33dee96d1cba11d7d48df82164ac56061816c | a3928de1aa7331d4ce04da9f0fd9951102cfab76 | MichelleZ/leetcode | /algorithms/cpp/teemoAttacking/teemoAttacking.cpp | C++ | cpp | 479 | no_license | // Source: https://leetcode.com/problems/teemo-attacking/
// Author: Miao Zhang
// Date: 2021-02-17
class Solution {
public:
int findPoisonedDuration(vector<int>& timeSeries, int duration) {
if (timeSeries.empty()) return 0;
int res = 0;
for (int i = 1; i < timeSeries.size(); i++) {
... |
271271addcc456e6241540da56889e87d4995a9e | ea5077f0cf34ef5811922019322748f7dff9ac5a | MaximePain/TileMapEditor | /TileMapEditor/TileMapEditor.cpp | C++ | cpp | 14,662 | no_license | // TileMapEditor.cpp : définit le point d'entrée pour l'application console.
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <conio.h>
#include <cmath>
#include <SFML/Graphics.hpp>
#include <rapidjson/filereadstream.h>
#include <rapidjson/filewritestream.h>
#inclu... |
1dfad3bba08ebe8225e789b764fd66d9fcb8eb04 | 92f528616957a00de4c7f6bbf56bc1a23138371a | Romain-GARNIER/VirtualReality | /RVTP7/rvcamera.cpp | C++ | cpp | 1,877 | no_license | /*!
\file rvcamera.cpp
\brief Définition de la classe RVCamera.
\author Leo Donati
\date 2019-2020
\version 5.0
Cours de Réalité Virtuelle
Polytech'Nice Sophia
*/
#include "rvcamera.h"
RVCamera::RVCamera()
{
m_position = QVector3D(0, 0, 0);
m_target = QVector3D(0, 0, -1);
m_up = QVector... |
822cfbf30c987c897daca9265d03c6b8c361c44d | 5d6a617df6a91775622fe6ea2f1a213165db27f2 | blackberry/Boost | /libs/fusion/test/functional/make_fused_function_object.cpp | C++ | cpp | 2,744 | permissive | /*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.t... |
6da5cbe94aebd5d67abc32a9a4770a075bed6467 | c73f7c2d7d48cf7fa4413b81df500c0ad8d19eca | nlbao/competitive-programming | /solution/Codeforces/100484C.cpp | C++ | cpp | 1,395 | no_license | // #pragma comment(linker, "/STACK:1024000000")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define fori(i,a,b) for (ll i=(a); i<=(b); ++i)
#define ford(i,a,b) for (ll i=(a); i>=(b); --i)
#define foreach(it, x) for(... |
1287e39713849b1cbc4361a3183a145042acbbe1 | 755aa7fe6e4f845025b45077158315b66064f39a | xcxcmath/mydeep2 | /Momentum.cpp | C++ | cpp | 1,768 | no_license | #include "Momentum.h"
namespace mydeep {
namespace optimizer {
Momentum::Momentum(network::Network *net, double learning_rate, double momentum)
: Optimizer(net, learning_rate)
{
m_hp[HyperParamKey::gamma] = momentum;
m_hp[HyperParamKey::time] = 0.;
}... |
85fc59421cc78eb72366aa02889e87b47d25df6e | 4431d28ef082451069df2b3b59fbd9d9b9f0fa9d | martial/ofxFeatureDetector | /src/ofxFeatureDetector.cpp | C++ | cpp | 7,088 | permissive | //
// FeatureDetector.cpp
// HomographyTest
//
// Created by Martial Geoffre-Rouland on 26/04/2019.
//
#include "ofxFeatureDetector.hpp"
void ofxFeatureDetector::setup() {
detector = ORB::create(5000);
extractor = BRISK::create(60, 4 );
matcher = new cv::BFMatcher(cv::NORM_HAMMING... |
c6f52910c2bd0c9b6a5e4b6385e1ff49b7af7bd0 | d6002ab225ff6c55d78999c01729ce499587aa28 | LiraLemur/kagome | /core/injector/application_injector.hpp | C++ | hpp | 29,513 | permissive | /**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef KAGOME_CORE_INJECTOR_APPLICATION_INJECTOR_HPP
#define KAGOME_CORE_INJECTOR_APPLICATION_INJECTOR_HPP
#include <boost/di.hpp>
#include <boost/di/extension/scopes/shared.hpp>
#include <crypto/bip39/impl/bip39_pro... |
44e7c70c29ee043284abc08ff4af66af13592b13 | d82c0d3e3730fc0a87debf2520c526ee747530a9 | meniossin/src | /content/shell/test_runner/text_input_controller.cc | C++ | cc | 16,055 | 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 "content/shell/test_runner/text_input_controller.h"
#include "base/macros.h"
#include "content/shell/test_runner/web_test_delegate.h"
#include "... |
49a9f119893eaf250a2facf570fd782ab370315e | 2547d627e996148fc08f7c5b952d637609397b0d | patrickschneider23/hhvm | /hphp/runtime/ext_zend_compat/php-src/Zend/zend_globals.cpp | C++ | cpp | 2,255 | permissive | #include "zend.h"
#include "zend_globals.h"
#include "zend_exceptions.h"
#include "hphp/runtime/base/externals.h"
#include "hphp/util/thread-local.h"
#include "hphp/runtime/base/execution-context.h"
#include "hphp/runtime/base/thread-info.h"
#include "hphp/runtime/base/request-injection-data.h"
#include "hphp/runtime/... |
bb198eb31ffb88837a3cba506513e526cacef9ac | 66c7005b33e6d457e3869a7665674dd632382601 | GindaChen/bustub | /src/storage/page/header_page.cpp | C++ | cpp | 2,675 | permissive | //===----------------------------------------------------------------------===//
//
// CMU-DB Project (15-445/645)
// ***DO NO SHARE PUBLICLY***
//
// Identification: src/page/header_page.cpp
//
// Copyright (c) 2018, Carnegie Mellon University Database Group
//
//===----... |
4d2e036223b62042c6344c66d751de07ec52ceec | d15b3e4d5bebec22eb5f384f64488e65e9037fd5 | roastedcoder/CP-template | /dsu.cpp | C++ | cpp | 899 | no_license | template <class X>
class dsu {
private:
int len;
vector <int> parent;
vector <int> size;
public:
dsu(int n) {
this->len = n+1;
parent.resize(len);
size.resize(len, 1);
for(int i = 0; i<n; i++) parent[i] = i;
}
int Find(int a) { // path com... |
eb3ee3144fc7dce505df609a1309926ea731c39f | f327a59de42ddba459152d24fd574adbff609e33 | krofna/uva | /621.cpp | C++ | cpp | 407 | no_license | #include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
while (n--)
{
string s;
cin >> s;
if (s == "1" || s == "4" || s == "78")
cout << '+';
else if (s.substr(s.size() - 2) == "35")
cout << '-';
else if (s[0] == '9')
... |
4791a85d030f0b8c3b7426b3373ca90b239f3ec9 | d3722710e64929b0af95e30be167971b49c28e9a | erze/llvm-project-20170507 | /llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp | C++ | cpp | 6,213 | permissive | //===-- AMDGPUAnnotateUniformValues.cpp - ---------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
f4cb5c741b3fb590506f8c9528fc92c77017926e | d2b8239b203ed3ddc0ff9c15df611470d153267b | Bhron/LeetCode | /Algorithms/C++/Medium/328_Odd_Even_Linked_List.cpp | C++ | cpp | 761 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* oddEvenList(ListNode* head) {
ListNode odd_dummy(0);
ListNode even_dummy(0);
ListNode* odd = &odd... |
077479535ede244470539849f4786f5800aa08f4 | 9e2eb954c5640c71588ec0ec4c9ae483a647b35f | Mark0tny/Grupa1-MicroblogTemplates-repo | /Server/Consts.hpp | C++ | hpp | 7,650 | no_license | #pragma once
#include <string>
using namespace std::literals;
//Code OK - 200
//Code Bad_Request - 400
//Code Service_Unavailable - 503
namespace RoutingConsts
{
constexpr auto create_user_route = "/createuser";
constexpr auto login_user = "/login";
constexpr auto create_microblog = "/createmicroblog";
... |
5f75af1944709c1cf504eeb8dfd74e1268a07a78 | 5fe2e2ddacdb3b83012ec302e27dfe3d07cf1b8e | renuacpro/releases-comm-central | /mailnews/compose/src/nsSmtpUrl.cpp | C++ | cpp | 22,093 | no_license | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "msgCore.h"
#include "ns... |
bd5c1b82580af8832fc71bfaa6e7b171d8cc827c | 7dc6ee8d05e9edb0306d2ccef1f55de28911e2a6 | tagattie/FreeBSD-Electron | /devel/electron20/files/patch-base_rand__util__posix.cc | C++ | cc | 1,889 | permissive | --- base/rand_util_posix.cc.orig 2022-08-01 19:04:19 UTC
+++ base/rand_util_posix.cc
@@ -17,7 +17,7 @@
#include "base/posix/eintr_wrapper.h"
#include "build/build_config.h"
-#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_NACL)
+#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(... |
a5c14c07e50b66b1d5d7e3ae4b7a2f6c8679432d | 252cbcb94b0f8c0e78f1aaf153b187a693588bfd | marktubu/Unix | /Algorithms/Theory/15/15_1_5.cpp | C++ | cpp | 515 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int shulie(vector<int>& vec, int n)
{
if(n>=0)
{
vec[0] = 0;
}
if(n>=1)
{
vec[1] = 1;
}
for (size_t i = 2; i <= n; i++)
{
vec[i] = vec[i-1] + vec[i-2];
}
return vec[n];
... |
0235787aaf7d659d3d59575bf7a8339cdeb083f6 | 33e2ff58c19a615623542b170b808e6117464fb3 | hdfeos/hdf5 | /c++/src/H5DxferProp.cpp | C++ | cpp | 23,332 | permissive | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* T... |
d0b6e9119d9275d9c632ed63f991a6af5c42dcb1 | b63b2e43c4db29bced2e221e146d8a2dfec9cced | gautam3000/Competitive-Programming | /Leetcode/PalindromeNumber.cpp | C++ | cpp | 646 | no_license | // In the name of Aadi Shakti
// You are everything and I am nothing
// Jai Mata Di
//https://leetcode.com/problems/palindrome-number/
#include<bits/stdc++.h>
using namespace std ;
class Solution {
public:
bool isPalindrome(int x) {
string a , b ;
a = to_string(x) ;
b = a ... |
fc8e6ca1f705ae1b08eb3fe7403d1e263895d55d | 4c97206bfb392839ebc935cfb679594e0898d725 | Alfred-CS3376/cs3376-assignment5 | /onepipe.cpp | C++ | cpp | 1,167 | no_license | // file: onepipe.cpp
// // author: M. Amine Belkoura
// // date: 03/04/2015
// // purpose: CS3376
// // description:
// // this program executes "ls -ltr | grep 3376", by dividing the two command
// among the child and parent process
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include... |
abadbc5fb02ee6646ab1ba7d72a305612e28a327 | ef4ee235b72bac88e71673901598052de54ba791 | CyFI-Lab-Public/RetroScope | /external/chromium_org/chrome/browser/ui/views/location_bar/zoom_bubble_view_browsertest.cc | C++ | cc | 6,066 | 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 "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/fullscreen... |
0c38d13b67cf12e6f024b679f8b6a7bf92faccde | 76d88f97b78fa6b6f5083602d68c66e1ad5be66a | albertouri/waffles | /src/depends/GCuda/GCudaMatrix.cpp | C++ | cpp | 10,035 | no_license | /*
The contents of this file are dedicated by all of its authors, including
Michael S. Gashler,
anonymous contributors,
to the public domain (http://creativecommons.org/publicdomain/zero/1.0/).
Note that some moral obligations still exist in the absence of legal ones.
For example, it would still be d... |
571fbfe367ef8d863e0ebbd67e0674b7faa19446 | 286a1a259b42560b29ddc86d4ef8bd88b4f3debd | khe0818/csc461 | /student/khe11/GameParticles/Main/main.cpp | C++ | cpp | 3,753 | no_license | //----------------------------------------------------------------------------
// Copyright 2019, Ed Keenan, all rights reserved.
//----------------------------------------------------------------------------
#include <conio.h>
#include "EventHandler.h"
#include "OpenGLInterface.h"
#include "Framework.h"
#include "Pa... |
2066e51cc8eef4f553d61431cad83e388a3c63f6 | 80046b0d78d751ac785eb5cebfbcf5399df237c7 | benben983/yas | /include/yas/detail/config/endian.hpp | C++ | hpp | 4,079 | no_license |
// Copyright (c) 2010-2019 niXman (i dot nixman dog gmail dot com). All
// rights reserved.
//
// This file is part of YAS(https://github.com/niXman/yas) project.
//
// 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)
... |
e73f6553463113a67943578f58302890d04b805b | 1b1dd393974f9c63c3fb83dc0de974b8dff73929 | Xala/MEX-Quad | /ekz-public-lib/src/apps/aick_node.cpp | C++ | cpp | 9,322 | permissive | #include "ros/ros.h"
#include "std_msgs/String.h"
#include <sensor_msgs/PointCloud2.h>
#include <pcl_ros/point_cloud.h>
#include <tf/transform_broadcaster.h>
#include <tf/transform_listener.h>
#include <math.h>
// PCL specific includes
#include <pcl/conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.... |
1e3c36623da99ec8b51c5ab22c28dc73c0e54215 | b124bc74f2e2bf09d19a845b37e2c1c35dbf6000 | ZerozedProject/zerozed | /src/wallet/rpcwallet.cpp | C++ | cpp | 119,246 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "amount.h"
#include "base58.h"
#include "chain.h"
#include "core_io.h"
#inclu... |
ffa425aedd911c8a517ed74b29b7264f17ae29e8 | 5fb205355aeb032548a27154894885acd4c59ad0 | akd15102091/Data-Structures-and-Algorithms---Code-ccp- | /Others/MAP [ GFG- find entry with highest value innt map ].cpp | C++ | cpp | 679 | no_license | #include<iostream>
#include<map>
#include<utility>
using namespace std ;
pair<int,int> findEntryWithHighestValue(map<int,int>sampleMap)
{
pair<int,int> p(0,0) ;
int x,y=0;
map<int,int> :: iterator it ;
for(it=sampleMap.begin();it!=sampleMap.end();it++)
{
if(it->second >y)
{
x = it->first ;
y=it->second ... |
d247b20740e9f3ad8f9621545e4c2a76eaad3010 | 7fdaa2c5baf964e01497f2773cf0086eb77b4a50 | mgh3326/iridium-browser | /components/sync/engine_impl/js_mutation_event_observer.cc | C++ | cc | 3,577 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/sync/engine_impl/js_mutation_event_observer.h"
#include <stddef.h>
#include <memory>
#include <utility>
#include "base/locatio... |
0eabad7e5d370bbbc3c49e040e6ac6d10b18aa43 | 75e8e91dbf8660dbf907b6c6241e59e686f46eac | Lurtz7/PostapocalypticStrategyTD | /Source/StrategyTD/Citadell.cpp | C++ | cpp | 681 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "Citadell.h"
// Sets default values
ACitadell::ACitadell()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called... |
f4bcadace0583bc7c2b8479364390a4e1d0017f2 | deac8026f5d80f6e9df158ce5126811ae8490354 | wher021/googleTest | /google/gmock-1.7.0/googletest/test/gtest_xml_outfile1_test_.cc | C++ | cc | 2,051 | permissive | // Copyright 2008, 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 conditions ... |
6f28557411bbfe7c58fa2dd30b4e54f9060b9491 | b655ba0a104cae217aadf3ac7d6b28b6f601ac71 | ada-zqz/leetcode | /dfs129_SumRoottoLeafNumbers.cpp | C++ | cpp | 682 | no_license | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
int sumNumbers(TreeNode* root) {
int sm = 0;
number(root, 0, sm);
retur... |
391f47defcf8952142fa0723aba300ae4f53c4c9 | feef8905757f47b82a0a794f2ab5ee4f4b0dc3f7 | minblock/ifyouarereadingthisitstoolatecoin | /src/qt/test/addressbooktests.cpp | C++ | cpp | 5,371 | permissive | #include <qt/test/addressbooktests.h>
#include <qt/test/util.h>
#include <test/test_bitcoin.h>
#include <interfaces/chain.h>
#include <interfaces/node.h>
#include <qt/addressbookpage.h>
#include <qt/addresstablemodel.h>
#include <qt/editaddressdialog.h>
#include <qt/optionsmodel.h>
#include <qt/platformstyle.h>
#inclu... |
ea0b7050f059fba0e67c7648ba2992bf9b82701d | 8a7abd4cd276607e711db6c14e40ded356d8ffde | oroca/oroca_rov | /Software/Arduino/RovMain_ProMICRO/RSP.cpp | C++ | cpp | 5,762 | permissive | //----------------------------------------------------------------------------
// 프로그램명 : RSP(Rov Serial Protocol)
//
// 만든이 :
//
// 날 짜 :
//
// 최종 수정 :
//
// MPU_Type :
//
// 파일명 : RSP.cpp
//----------------------------------------------------------------------------
#inclu... |
6688d191630d08664e9ced665ec1cb03fd2f7cd2 | 32d190b828919fe8eea1e3c973ac01445c9cfcb9 | Bearzeng/VC4C | /src/optimization/Eliminator.cpp | C++ | cpp | 55,208 | permissive | /*
* Author: doe300
*
* See the file "LICENSE" for the full license governing this code.
*/
#include "Eliminator.h"
#include "../InstructionWalker.h"
#include "../Profiler.h"
#include "../analysis/AvailableExpressionAnalysis.h"
#include "../normalization/LiteralValues.h"
#include "../periphery/SFU.h"
#include "lo... |
728b0f17e2a7ff3d5069a622b61df01ed3012eef | e0abfc1abf64eebcbbbcaff5f8dcf8191e1c24bd | Catddly/Seagull-Engine-Discarded | /Seagull-Core/src/Core/Window.cpp | C++ | cpp | 307 | permissive | #include "sgpch.h"
#include "Window.h"
#include "Platform/Windows/WindowsWindow.h"
namespace SG
{
Scope<Window> Window::Create(const WindowProps& props)
{
#ifdef SG_PLATFORM_WINDOWS
return CreateScope<WindowsWindow>(props);
#else
SG_CORE_ASSERT(false, "Other platform not supported!");
#endif
}
} |
4e5d66d4a881f149aa84ff5abd00b5dd20074db1 | 2d8fd1e1ad73d16b3d40486399e9034c81ded09c | blockspacer/ireon | /branches/refactor/src_root/src/ireon_client/world/object.cpp | C++ | cpp | 2,956 | no_license | /* Copyright (C) 2005 ireon.org developers council
* $Id: object.cpp 361 2005-12-09 12:30:12Z llyeli $
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the Licen... |
5c8fd4cd1fc60f3820b707b8cf4b21ce04380d87 | 77a072218619358b5e4326cc6b09aac387bfad5d | Koloses/Vivaldi-browser | /chromium/components/exo/client_controlled_shell_surface.cc | C++ | cc | 42,264 | 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 "components/exo/client_controlled_shell_surface.h"
#include <map>
#include <utility>
#include "ash/frame/header_view.h"
#include "ash/frame/non... |
a9109e8e341297ce3536a4293e208460ffe8e82f | b41b40c5966dddc8ea31c25f3fbe9f25eb741d68 | yeoeun98/Library_Bot | /src/navigation/amcl/src/amcl_node.cpp | C++ | cpp | 53,687 | no_license | /*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* This library 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.1 of the License, or (at your option)... |
047c5acfa9727a67ee8ae65d684ecb57309e8a73 | bd78a3bc2c6c30278d75156f535796149aaaf080 | biswajitcsecu/ngraph | /src/ngraph/shape.cpp | C++ | cpp | 967 | permissive | //*****************************************************************************
// Copyright 2017-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... |
6c177daf2e89e8728792ba8ed4b2831bcdeb8372 | 299131d0f4c14b0b445d0f365bbc7f12f205dcb8 | Mi-Przystupa/CommandConsoleChess | /WhiteChessPlayer.cpp | C++ | cpp | 1,197 | no_license | #include "WhiteChessPlayer.h"
#include "Pawn.h"
#include "Rook.h"
#include "King.h"
#include "Queen.h"
#include "Bishop.h"
#include "Knight.h"
WhiteChessPlayer::WhiteChessPlayer()
{
InitializeWhitePieces();
}
WhiteChessPlayer::~WhiteChessPlayer()
{
//dtor
}
void WhiteChessPlayer::InitializeWhitePieces(){
... |
75d14cc3f52f0aa4df4413e041a6fb747a0e140c | 74dd878ec7a31367a6f140359b4d088814272411 | savvynavi/Intro-to-cpp | /Inheritance/inheritance question 1/inheritance question 1/plane.cpp | C++ | cpp | 539 | no_license | #include"vehicle.h"
#include"plane.h"
#include<iostream>
using namespace std;
Plane::Plane(){
setType("air");
setWheelNum(3);
setSpeed(0);
setMotorised(true);
setWindowNum(20);
setSeatNum(40);
setMotorised(true);
setPowered(false);
}
Plane::~Plane(){
}
//checks to see if the plane is moving
const void Vehic... |
6419c486bf99151cc806e0a0e2fc9080709d776b | adbeed8bc46d7256e14d38086f22ce8e7ce1c0ff | atyamsriharsha/codeforces_contests | /practice/161div2_2.cpp | C++ | cpp | 1,695 | no_license | /************************************************************
Author : atyam
************************************************************/
#include <bits/stdc++.h>
using namespace std ;
#define ll long long
/*debugging*/
#define out1(x)cout<<#x<<" is "<<x<<endl
#define out2(x,y)cout<<#x<<" is "<<x<<" "<<#y <<" is... |
190b304ae3a8d977dd2349363f2930dab3add72e | 106c824eef006dbcfb54e27350208ee028e4e112 | avsha114/CPP_EX04a | /Virologist.hpp | C++ | hpp | 307 | no_license | #include "City.hpp"
#include "Player.hpp"
#include "Board.hpp"
namespace pandemic
{
class Virologist: public Player
{
public:
Virologist(Board& gameBoard, City city)
: Player(gameBoard, city, "Virologist") {}
Player& treat(City);
};
} |
8b33c6cf3a66287b904575d48b8b1783bbeea60b | 65d3952b9a2578c6807a8b122156368902628a76 | DLR-TS/gdal | /ogr/ogrsf_frmts/sosi/ogrsosidatasource.cpp | C++ | cpp | 26,380 | permissive | /******************************************************************************
*
* Project: SOSI Data Source
* Purpose: Provide SOSI Data to OGR.
* Author: Thomas Hirsch, <thomas.hirsch statkart no>
*
******************************************************************************
* Copyright (c) 2010, Thomas... |
ea6cb16a8033a2bad7aa599384994f130b2057d8 | 477a3bbdbe297d479ec29ffbd4faad38c23b69af | Samsung/Castanets | /third_party/blink/renderer/core/dom/user_gesture_indicator.cc | C++ | cc | 5,316 | 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 "third_party/blink/renderer/core/dom/user_gesture_indicator.h"
#include "base/time/default_clock.h"
#include "third_party/blink/renderer/core/fr... |
ec9c3043c597e261ff09375ac9707e1115451e75 | c7764bc3b4a804e8afb19de27411808313e59f50 | dushyant7917/Competitive-Programming | /SPOJ/lastdigit.cpp | C++ | cpp | 498 | no_license | #include<iostream>
#include<map>
#include<unordered_set>
using namespace std;
typedef unsigned long long ll;
#define fr(x,a,b) for(ll x=a;x<b;x++)
ll mod_power(ll x,ll y){
ll res=1;
while(y>0){
if (y%2==1)
res=((res%10)*(x%10))%10;
y=y>>1;
x=((x%10)*(x%10))%10;
}
return res;
}
int main()... |
80a4cf23aea60ea9ff03d7c152a9bd59ac616c1f | 51db2a4233db6650b5066d86c9bd76cbc9cd30f2 | xulunfan/magma | /src/dgesvd.cpp | C++ | cpp | 159,856 | no_license | /*
-- MAGMA (version 2.0.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date February 2016
@author Stan Tomov
@author Mark Gates
@precisions normal d -> s
*/
#include "magma_internal.h"
#define REAL
// Version 1 -... |
f51374bd6e5f61631712eb4ce9f0e0d858dd1b1a | dafb99ab6caccb9fbe394299ce2a9a965ed44546 | proaholic/Win2K3 | /NT/inetsrv/msmq/src/lib/mt/lib/mt.cpp | C++ | cpp | 1,740 | no_license | /*++
Copyright (c) 1995-97 Microsoft Corporation
Module Name:
Mt.cpp
Abstract:
Message Transport implementation
Author:
Uri Habusha (urih) 11-Aug-99
Environment:
Platform-independent,
--*/
#include <libpch.h>
#include <st.h>
#include "Mt.h"
#include "Mtp.h"
#include "MtObj.h"
#include "mt.tmh"
... |
433ab11c9077d6febda7db155a315ff3dfd43931 | 40a24f258dc664191dfdbd4e1acdd2d61b50174c | alexfmsu/curl_async | /main.cpp | C++ | cpp | 533 | no_license | #include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <unistd.h>
#include <curl/multi.h>
#include "FileDownloader.cpp"
using namespace std;
int main(int argc, char** argv){
if(argc < 2){
cout << "Usage: ./main.x <url_1 .. url_N>" << endl;
return 0;
}
... |
e717ec7d2d82c23ee4e7bea02a68b2c4b2ddfccb | 91f2c0064151bba8f38c9a75c53373906e57a4fe | foontick/openmpt | /soundlib/Load_mo3.cpp | C++ | cpp | 57,522 | permissive | /*
* Load_mo3.cpp
* ------------
* Purpose: MO3 module loader.
* Notes : (currently none)
* Authors: Johannes Schultz / OpenMPT Devs
* Based on documentation and the decompression routines from the
* open-source UNMO3 project (https://github.com/lclevy/unmo3).
* The modified decompre... |
e8b82d762a270ef52325e487235ff1c6f3cd4704 | 631e99108159100b043d466bf5c648685f382003 | b2coin/b2 | /src/rpcrawtransaction.cpp | C++ | cpp | 20,208 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp>
#include "base58.h"
#include "bitcoinrpc.h"
#inclu... |
6e7f14b1c4cb5c7924b31f7b95f2422ad2f9a7c4 | 43b0ac19c6a58142747755a85f806c1fd8c1a849 | pujadpatel/pujadpatel-personal | /Other/Lab23/Lab23/Lab23.cpp | C++ | cpp | 328 | no_license | // Puja Pattel
// ITP 165, Fall 2015
// Lab 23
// pujadpat@usc.edu
#include "Candy.h"
#include "SoftCandy.h"
int main()
{
Candy* myCandy = new Candy ("Candy", 100,100,5.00);
myCandy->display();
delete myCandy;
myCandy = new SoftCandy("Soft", 5,50,2.50,5);
myCandy->display();
retu... |
efed4dd114235522d19bbb996225d9b483966f31 | 417c4f35dc7126956751f0e99f6978903b04d589 | cbernet/cmssw | /Fireworks/Core/src/FWViewManagerManager.cc | C++ | cc | 3,708 | no_license | // -*- C++ -*-
//
// Package: Core
// Class : FWViewManagerManager
//
// Implementation:
// <Notes on implementation>
//
// Original Author: Chris Jones
// Created: Tue Jan 15 10:27:12 EST 2008
//
// system include files
#include <iostream>
#include <boost/bind.hpp>
#include "TEveManager.h"
//... |
a8016374f6e5bcaa6caa87fa623decca422f9e69 | f58331d2af9f77aa3f0557993798bea0dff9a319 | alexey-malov/cg | /labs/01/samples/sample10_animation_with_timer-wtl/sample05_simple_wtl_applicationView.cpp | C++ | cpp | 2,108 | no_license | // sample05_simple_wtl_applicationView.cpp : implementation of the CSample05_simple_wtl_applicationView class
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "resource.h"
#include "sample05_simple_wtl_applicationView.h"
static const double M_PI = 3.141592... |
9545dcec7505371a70cfdeff759cd889c2740069 | 5c096deec872890623af918704402112b9f07cd4 | simplixcurrency/Simplix | /src/device/device_default.hpp | C++ | hpp | 8,542 | permissive | // Copyright (c) 2017-2018, The Simplix Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list ... |
cda945e61948e5fe69c8c895ae7e3bd4e899dc4c | dd3046d5fa599c516cc331bc98b1278cbff9ecdf | xiangzai2014/leetcode | /distinct-sequences.cpp | C++ | cpp | 1,298 | no_license | /*
Given a string S and a string T, count the number of distinct subsequences of T in S.
A subsequence of a string is a new string which is formed from the original string by
deleting some (can be none) of the characters without disturbing the relative positions of
the remaining characters. (ie,"ACE"is a subsequence of... |
6615c7eb67d20eeca5d163eaa0c59b65804ba982 | 7c2fc62ba1c78e5a65dec2ec309b540d35cd6aea | soiry/5gc | /src/nr/model/nr-fr-soft-algorithm.cc | C++ | cc | 16,882 | no_license | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014 Piotr Gawlowicz
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program i... |
2cbcc42ea230cc91e9657572b8064daf6c0c6723 | 1d6897ddbd63d6d78904198f9d18a8fc595199ab | clach04/Aurex2 | /common/main/ruputerexception.cpp | C++ | cpp | 2,134 | no_license | /*
* ruputerexception.cpp - Ruputer's exception
*
* $Id: ruputerexception.cpp,v 1.4 2006/01/09 07:43:15 fumi Exp $
*
* Copyright (C) 2004 Fumihiko MACHIDA <machida@users.sourceforge.jp>
* All rights reserved.
*
* This is free software with ABSOLUTELY NO WARRANTY.
*
* This program is free software; you can red... |
59225397411f1d092c3343d76df5d9cc6bcc406e | e8c273ad7887fae59c1cba7686c999a708fe6fae | benjarus/web-server-example | /server_http.hpp | C++ | hpp | 18,258 | permissive | // Modified copy of https://github.com/eidheim/Simple-Web-Server/blob/master/server_http.hpp
#ifndef SERVER_HTTP_HPP
#define SERVER_HTTP_HPP
#include <boost/asio.hpp>
#include <boost/regex.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/functional/hash.hpp>
#include <unordered_map>
#include <thr... |
406c3099e986ca36152a8cbf1d14e577ba17727e | 59d9d7270f4cedbbbc7f32a68d2dc06f9a61fcad | Georgesarkis/DIT638 | /src/ObjectDetection/src/objectDetection.cpp | C++ | cpp | 13,218 | no_license | #include <opencv2/core/core.hpp>
#include <opencv2/core/types_c.h>
#include <stdio.h>
#include <string>
#include "cluon-complete.hpp"
#include "opendlv-standard-message-set.hpp"
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <array>
#include "StopSignDetection.cpp"
#include "S... |
6edab2aef11affcb652cb3ce5604b522748e8343 | fb9cd628568b5cd67938966c6de39f273c0b1df8 | tariqhamid/couchbase-lite-core | /C/tests/c4Test.hh | C++ | hh | 3,932 | permissive | //
// c4Test.hh
// Couchbase Lite Core
//
// Created by Jens Alfke on 9/16/15.
// Copyright (c) 2015-2016 Couchbase. All rights reserved.
//
#pragma once
#include "FleeceCpp.hh"
using namespace fleeceapi;
#include "c4.h"
#include "CatchHelper.hh"
#include "PlatformCompat.hh"
#include <functional>
#ifdef NDEB... |
d876cf778df72894378f7318a03119068b1832a6 | 9b0a616d0262d8baab62b6e022c237c32004265e | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/Z6.1+poonceonce+poonceonce+pooncerelease.c.cbmc_out.cpp | C++ | cpp | 36,165 | no_license | // Global variabls:
// 0:vars:3
// 3:atom_2_X0_1:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
#define ADDRSIZE 4
#define LOCALADDRSIZE 3
#define NTHREAD 4
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt, "error")
#define max(a,b) (a>b?a:b)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.