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 |
|---|---|---|---|---|---|---|---|---|
a4eae5fbf1da6bf28320272e83c37c7d31687431 | 416cc65ef6f7a0fa78f7f99c3fe3f81dbf8107ea | rjmcguire/HIP-Examples | /reduction/reduction.cpp | C++ | cpp | 4,890 | no_license | /*
Copyright (c) 2015-2016 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
to use, co... |
f48328977121e70ffa88d650bd4bf794d53ee76f | da0d31a8f73695d6847e00d6a17b66ca66367a4f | aroddick/cs190j | /lab05a/WordCount.cpp | C++ | cpp | 4,336 | no_license | // WordCount.cpp
#include "WordCount.h"
#include <vector>
#include <algorithm>
using namespace std;
bool sortBySecond(const pair<string, size_t> &a, const pair<string, size_t> &b) {
if (a.second == b.second) {
return (a.first < b.first);
}
return (a.second > b.second);
}
// Default constructor
WordCount::WordC... |
ea28aa1f1bb413723d32cea15d768c0c6be48dbd | f06da3e129fa718fc02e1af1a7b0b5d0979ea1dc | CCCVLMAlgorithmStudy/AlgorithmStudy_1st | /JJSmith/week1/SelfNumber.cpp | C++ | cpp | 345 | no_license | #include <iostream>
#include <vector>
using namespace std;
vector<bool> selfNum(10100, true);
int dN(int n) {
int res = n;
n*=10;
do { res+=(n/=10)%10; } while(n>0);
return res;
}
int main() {
for(int i=1; i<=10000; i++) {
selfNum[dN(i)]=false;
}
for(int i=1; i<=10000; i++) {
if(selfNum[i]) cout<<i<... |
228c00733c528fb3407128264bbcd9b244650eed | 6f5221d37147b22de9efb87f7fc12c3eb0f6f723 | KrzysztofPakaszewski/NoweRep | /lab4/square/Point.cpp | C++ | cpp | 1,011 | no_license | //
// Created by krzysztof on 20.03.2018.
//
//Definicja znajduje się w pliku Point.cpp
#include <cmath>
#include <iostream>
#include "Point.h"
using ::std::ostream;
using ::std::endl;
using ::std::pow;
using ::std::sqrt;
using namespace geometry;
using namespace std;
/* Aby wskazać, ze definicja funkcji dotyczy meto... |
f75192a4658929edb44adb512008118624b3912f | d6493bc7e445546b7395262b411c50de1b8abae2 | pp2-desktop/wordspace | /Classes/AppDelegate.cpp | C++ | cpp | 3,236 | no_license | #include "AppDelegate.h"
#include "SingleLobbyScene.h"
//#include "HelloWorldScene.h"
USING_NS_CC;
static cocos2d::Size designResolutionSize = cocos2d::Size(750, 1334);
static cocos2d::Size eeResolutionSize = cocos2d::Size(750, 1334);
static cocos2d::Size smallResolutionSize = cocos2d::Size(320, 480);
static cocos2d... |
f72b9f6403c46aa1237f656b71cc38cf4f7696f7 | e29fb2235a2b6af8630fdd9ce4f60c6cd5d63a89 | njrafi/Competitive-Programming-Solutions | /CodeForces/101810D - Magic Sticks - 41118902.cpp | C++ | cpp | 2,708 | no_license | #include <bits/stdc++.h>
#ifndef ONLINE_JUDGE
#define gc getchar
#define pc putchar
#else
#define gc getchar_unlocked
#define pc putchar_unlocked
#endif
using namespace std;
#define vi vector<int>
#define si set<int>
#define vs vector<string>
#define pii pair<int, int>
#define vpi vector<pii>
#define pri priority_queue... |
e8f1e5ea10325f4954e68232af314d6d12fd6330 | 864ef7e4496cd678b690515d8f59c73e2b54ee0b | AIpeter/programmiersprachen-raytracer | /framework/computearc.cpp | C++ | cpp | 942 | permissive | #include "computearc.hpp"
float computeDiffuseArc(Hit const& hit, Light const& light)
{
glm::vec3 l_direction = glm::normalize(light.getposition() - hit.intersectionPoint);
return std::max(glm::dot(hit.normal, l_direction), 0.0f);
}
float computeSpecularArc(Hit const& hit, Ray const& r, Light const& light)
{
g... |
7fd6938fbee4e9b5b01125b4dfb064b089e2b8e4 | 54ab92f77ff00e56d84f6fdaeebc7086214bfd11 | gurpreet-98/anomaly_based_intrusion_detection_system | /src/mainwindow.cpp | C++ | cpp | 6,487 | permissive | #include "src/include/mainwindow.h"
#include "ui_mainwindow.h"
#include <pcap.h>
#include <QMessageBox>
#include <QString>
#include <string>
#include <QtCharts/QBarCategoryAxis>
#include <QtCharts/QBarSeries>
#include <QtCharts/QBarSet>
#include <QtCharts/QChartView>
#include <QtCharts/QLegend>
#include <QtCharts/Q... |
0e76f111a700a2d0f6b6153b9ec9d8dbac9bef04 | c2084630712590ca9fdd986cda14f9a4e02dff16 | LuaDist/ninja | /src/build_test.cc | C++ | cc | 31,809 | permissive | // Copyright 2011 Google Inc. 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... |
69ca478e83e0987527db14f4a6525f1224cce802 | 69fc7e7b46fccb5ef4392951b2a5672d9b6e8c40 | ikarienator/chromium | /chrome/browser/media/webrtc_browsertest_base.cc | C++ | cc | 4,667 | 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/media/webrtc_browsertest_base.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/infobars/infobar... |
ba96fefbc1b27198e206339cb489572427561ddf | 22a3921f8e9892bf2811f2e351d1d9a0d6e738ba | EgorBo/runtime-1 | /src/installer/corehost/cli/fxr/corehost_init.cpp | C++ | cpp | 5,339 | 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.
#include "corehost_init.h"
void make_cstr_arr(const std::vector<pal::string_t>& arr, std::vector<const pal::char_t*... |
9754b78ac2afdfad5f0b8c5f070f4e4e4535adbe | a4210edbf5b91528e93972988951944e40d1737a | GitLeeRepo/Cpp_ProgrammingNotes | /basics/template_ex3.cpp | C++ | cpp | 2,550 | no_license | // template_ex3
//
// Template specialization demo. This example illustrates writing a
// separate specialized template class to handle a case that would
// not have been handled properly by the compiler generated one. This
// is an over simplified example, and in this case there would be better
// solutions, such as... |
a41bf902d03f829e0abff782a54436b9f42a39f1 | 6f1c17ca4caf964113e5b91997dfb9c145435aba | Flare-k/Data_Structure | /ArrayList/실습_lab01/ArrayList.cpp | C++ | cpp | 2,488 | no_license | #include "ArrayList.h"
//배열에 대한 정보를 메소드로 정리
//m_Array는 배열로 표현된 객체이고 data는 단일 객체이다. 근데 data는 주로 내가 입력한 내용을 전달하는 파라미터 용도로 쓰임
void ArrayList::MakeEmpty(){//clear
m_Length = 0;
}
//길이를 리턴하는 함수
int ArrayList::GetLength(){//clear
return m_Length;
}
//꽉 차 있는 확인하는 함수
bool ArrayList::IsFull(){//clear
if(m_Length !... |
99c7d3a8dbea8e87187a035b7b9cad6b9f36b6fa | 3dfbccac0cb3aeb4ee19978340a7f82fc7b5560a | wzyy2/chromium-browser | /third_party/WebKit/Source/core/css/properties/CSSPropertyAPIGridTemplateLine.cpp | C++ | cpp | 649 | 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 "core/css/properties/CSSPropertyAPIGridTemplateLine.h"
#include "core/css/parser/CSSParserContext.h"
#include "core/css/properties/CSSPropertyGr... |
86dffc3f7e8995b4894623789036541fdf0cecb9 | 61e69c461fc933a2356aa59ac34e6f6ab3026578 | swwind/code | /bzoj/4029.cpp | C++ | cpp | 716 | permissive | #include <bits/stdc++.h>
#define ll long long
using namespace std;
inline int read(){
int x=0,f=0;char ch=getchar();
while(ch>'9'||ch<'0'){ch=='-'&&(f=1);ch=getchar();}
while(ch<='9'&&ch>='0'){x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
return f?-x:x;
}
int add(int x){
int ans = 1;
for(;x%10==0;x/=10)ans*=10;
return a... |
450adfa3707f09f2ef3bdcabdd66eba4f2fadf56 | 3a957b94df78bb50bd355bf6892eaced22f7a41a | StefanoT/AltaLux-IrfanView | /AltaLuxUnitTest/TestStrategies.cpp | C++ | cpp | 5,317 | no_license | /*
Project: AltaLux plugin for IrfanView
Author: Stefano Tommesani
Website: http://www.tommesani.com
Microsoft Public License (MS-PL) [OSI Approved License]
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the softwar... |
889454a676a6a5a9b63dfaa688e279f292046b0e | e820344a7e17ac2d4f67fd35f807b5eb5254ad56 | curtkim/c-first | /boost-first/hof_construct.cpp | C++ | cpp | 784 | no_license | #include <vector>
#include <algorithm>
#include <iostream>
#include <boost/hof/construct.hpp>
class Circle
{
public:
explicit Circle(double radius) : radius_(radius) {
std::cout << "생성자 Circle(radius) 호출" << std::endl;
}
Circle(const Circle& copy) : radius_(copy.radius_)
{
std::cout << "생성자 Circle(Cir... |
50cad93b578d231b70a06cb58244105d35f02e36 | 04ea6768a35a8fa922f554ddd9afbf1bd5dafbfb | piyush007978/CPP-Memory-Management-Chatbot | /src/chatlogic.cpp | C++ | cpp | 8,600 | no_license | #include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
#include <iterator>
#include <tuple>
#include <algorithm>
#include <memory>
#include "graphedge.h"
#include "graphnode.h"
#include "chatbot.h"
#include "chatlogic.h"
ChatLogic::ChatLogic()
{
//// STUDENT CODE
////
// create inst... |
07ebb2c4f489e270045a205d3dc2bb801075e535 | 4869977cff71d6794027930327a85481fca40528 | ketansahu07/Interview | /Miscellaneous/find the pair of elements.cpp | C++ | cpp | 1,683 | no_license | /*
Find the pair of elements swapping which makes
the sum of two array same.
Time Complexity: O(M*N)
later improved to O(M + N)
*/
/*
We are looking for two values, a and b, such that:
sumA - a + b = sumB - b + a
2a - 2b = sumA - sumB
a - b = (sumA - sumB) / 2
*/
int getSum(int X[], int n)
{
int... |
b9ba1067b26f201cf69de567f022e82c0a75f2ed | e9bcba3df7bdfbea2654431276eda23e31dc7d95 | sellamiy/GPiD-Framework | /framework/include/abdulot/ilinva/data-dual.hpp | C++ | hpp | 1,694 | permissive | /**
* \file abdulot/ilinva/data-dual.hpp
* \brief Dual Code-Interface conditions and checker.
* \author Yanis Sellami
* \date 2018
*/
#ifndef ABDULOT__ILINVA__DUAL_DATA_HPP
#define ABDULOT__ILINVA__DUAL_DATA_HPP
#include <abdulot/core/errors.hpp>
#include <abdulot/core/saitypes.hpp>
#include <abdulot/core/memory.... |
820c323a829344909efbe15d3a9e0986aa8ab6ac | 3056aedea80278fed288760c10a42e8e3ac76dce | roche-emmanuel/singularity | /sources/plug_wx/src/luna/bind_wxConvAuto.cpp | C++ | cpp | 7,966 | no_license | #include <plug_common.h>
class luna_wrapper_wxConvAuto {
public:
typedef Luna< wxConvAuto > luna_t;
// Base class dynamic cast support:
inline static bool _lg_typecheck_dynCast(lua_State *L) {
if( lua_gettop(L)!=2 ) return false;
if( lua_isstring(L,2)==0 ) return false;
return true;
}
stat... |
45f0c3eb7cf8661266bd79443557dcc0230a712c | d722b7816b1ab656f309485c00880da63b9fc1a6 | CallMeHeartless/CoreCrusaders | /Summative2/Summative2/clock.cpp | C++ | cpp | 1,922 | no_license |
// Library Includes
#include <chrono>
// Local Includes
// This Includes
#include "clock.h"
// Static Variables
// Static Function Prototypes
// Implementation
//****************************************************
// CClock: CClock Class Constructor
// @author:
// @parameter: No parameters
//
// @return: none
/... |
d2e0877edfb6402838ab1610bd2c44647c38f287 | 9ac739e70b532946641ad80f5c0997d7388a8d80 | bino7/chromium | /components/precache/content/precache_manager.cc | C++ | cc | 13,254 | 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 "components/precache/content/precache_manager.h"
#include <string>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/c... |
caf07eea42d1b146316887120ab53dff4877f920 | ea8b51fe7aa0003bd75197086e9c03ffad1b30b3 | MaciejMCh/Project9 | /Project9/TimerController.cpp | C++ | cpp | 468 | no_license | #include "TimerController.h"
TimerController* TimerController::mInstance = 0;
TimerController::TimerController()
{
}
TimerController::~TimerController()
{
}
TimerController* TimerController::getInstance(){
if (mInstance == 0){
mInstance = new TimerController();
}
return mInstance;
}
void ... |
c989b2fe7c74e469075cfaddd962eef89f9d2375 | ad1a6bbfc7626cd9e1f887c0cb3483794b222955 | mvm9289/geoc-qp2010 | /tags/exercice3/code/graphics.cpp | C++ | cpp | 32,247 | no_license | #include "circumference_3p.h"
#include "data.h"
#include "graphics.h"
#include "line_segment.h"
#include "parser.h"
#include "point.h"
#include "polygon.h"
#include "triangle.h"
#include "viewer.h"
#include "writer.h"
#include <cmath>
#include <cstdlib>
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glut.h>
#in... |
b02ae13c936abbb466fa98b78850e5667ef25d78 | 40d4b56895474662d86f2b878b2ff5b1eb1c1bf9 | matovitch/schoco_old | /include/schoco/likelyhood.hpp | C++ | hpp | 258 | permissive | #pragma once
#if defined __GNUC__ || \
defined __llvm__
#define SCHOCO_LIKELY(x) __builtin_expect ((x), 1)
#define SCHOCO_UNLIKELY(x) __builtin_expect ((x), 0)
#else
#define SCHOCO_LIKELY(x) (x)
#define SCHOCO_UNLIKELY(x) (x)
#endif
|
0b7125cfa9c296a08435e10c5cdc5645f5f9f543 | eeae8b63911f488de512d9d731b5c5a013869fce | lanbing510/LeetCode | /3-Longest-Substring-Without-Repeating-Characters/solution.cpp | C++ | cpp | 1,134 | no_license | class Solution {
public:
// // 方法一 using map 100ms
// int lengthOfLongestSubstring(string s) {
// map<char,int> m;
// int max_len=0;
// int last_repeat_pos=-1;
// for(int i=0;i<s.size();++i){
// if(m.find(s[i])!=m.end()&&last_repeat_pos<m[s[i]]){
// ... |
76a2e0cb76a5299c67639789f4898601e5ce0d0f | 17b08f2bb7c3a1be3ea4876eb81434531f7b2314 | Shauqi/Computer-Vision-Lab | /Plane3d/main.cpp | C++ | cpp | 13,850 | permissive | /*
* OGL01Shape3D.cpp: 3D Shapes
*/
#include <windows.h> // for MS Windows
#include <GL/glut.h> // GLUT, include glu.h and gl.h
#include<bits/stdc++.h>
#include "Table.h"
#include "Operations.h"
using namespace std;
/* Global variables */
char title[] = "3D Plane";
GLUquadricObj *quadratic;
GLUquadricObj *quadrati... |
bda1fe6aeafea5f3062c291daf41a013a35eff9c | 1a5a101f7dc231a93ebfab60590876e618a10249 | akshat093/DSA-CPP | /Stack/StackReversalByRecursion.cpp | C++ | cpp | 2,254 | no_license | //https://www.geeksforgeeks.org/reverse-a-stack-using-recursion/
// C++ code to reverse a
// stack using recursion
#include<bits/stdc++.h>
using namespace std;
// using std::stack for
// stack implementation
stack<char> st;
// initializing a string to store
// result of reversed stack
string ns;
// Below is a re... |
b0ce7a10638ec065d45b85540af0f100d54a3efd | 723503ba1b1917fb85b5720372a021eb2fb5f084 | VanshikaSingh10/DataStructures-Algorithms | /Leetcode Daily Challenge/June-2021/28. Remove All Adjacent Duplicates In String.cpp | C++ | cpp | 1,266 | permissive | /*
Remove All Adjacent Duplicates In String
=========================================
You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them.
We repeatedly make duplicate removals on s until we no longer can.
Return ... |
6ea215738be74a069d176c48e1143783fe9efacd | 85c8d596ebf85159afb113f7464f91c38d0d1901 | ECS-251-W2020/chromium | /third_party/abseil-cpp/absl/random/internal/distribution_test_util.cc | C++ | cc | 13,333 | permissive | // Copyright 2017 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
f8ad3f8bd9ec12fcfb1fc019748ea600b049d623 | 6813942ce3cb76663d8e824760ec3e61f96b33d0 | GuBeomJeong/Algorithm | /LeetCode/Medium/1376. Time Needed to Inform All Employees/Time Needed to Inform All Employees.cpp | C++ | cpp | 775 | no_license | class Solution {
public:
int result;
int urgent(int idx, vector<int>& parent, vector<int>& inform, vector<int>& dp){
if(parent[idx] == -1){
return inform[idx];
}
if(dp[idx] != -1){
return dp[idx];
}
dp[idx] = ur... |
f9009face62977a998abd990526aa0220367107a | 90f5f71d55fd36f17e3736f2dfb1a36a4c007b1e | JoosJuliet/algoStudy | /medium/1902/190211/ogh-opt.cc | C++ | cc | 3,223 | no_license | #include <bits/stdc++.h>
using namespace std;
vector<string> split_string(string);
// [nodNum][cost]
bool cost[1010][2048];
// Complete the beautifulPath function below.
#define point pair<int,int>
#define mp make_pair
vector<int> graph[1010][1010];
bool cmp(const point& a, const point& b) {
return a.second > ... |
40c89ce0217fbad58348588726b11de097e64890 | 0af2aa8ef73cf90d7c148fefe139e66efc685ae4 | Lotuseedata2022/PolarDB-for-PostgreSQL | /src/backend/polar_dma/libconsensus/consensus/algorithm/msg_compress.cc | C++ | cc | 4,664 | permissive | /*
* Copyright (c) 2020, Alibaba Group Holding Limited
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
87fc9937539308f8b2f58bad8f4dc943ae1e8d17 | 95e8cb3dc44d84345d823e876e02cc283a10a0d2 | Tim-Paik/cpp | /date/20210704/printf.cpp | C++ | cpp | 240 | no_license | #include <cstdio>
int main() {
printf("%d ", 1);
printf("%o ", 8);
printf("%x ", 17);
printf("%u ", 12);
printf("%c ", 49);
printf("%s ", " 1ab11 ");
printf("%f ", 0.14);
printf("%e ", 0.1);
printf("%lld ", 21473648);
return 0;
}
|
83e8c226c9bad26d72df4416d38f34f988e11028 | 1ac135cc099d5853256b57a65aa708008c9bb1ec | feifeibear/Caffe-Cori | /src/caffe/layers/annotated_data_layer.cpp | C++ | cpp | 14,217 | no_license | /*
All modification made by Intel Corporation: © 2016 Intel Corporation
All contributions by the University of California:
Copyright (c) 2014, 2015, The Regents of the University of California (Regents)
All rights reserved.
All other contributions:
Copyright (c) 2014, 2015, the respective contributors
All rights rese... |
2dea78b545e7c75a6b161f2d00ab1da60624b472 | 1468707c1809c124bdc8a246f334d0f086272988 | BDI-ENIB/enigma-asserv-beta | /src/Motor.cpp | C++ | cpp | 820 | no_license | #if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include "Motor.hpp"
/**
* PWM:
* Brake: ralentissement? HIGH pour activer le moteur
* Direction:
*/
Motor::Motor(int pinPWM,int pinBrake,int pinDirection, bool inverted){
pins[0]=pinPWM;
pins[1]=pinBrake;
pins[2]=pinDire... |
d122a3e1a0c9d44cab0eca94ffac2a90c52dbcf8 | 97bbcb77da15a30de95ae6f49bc0483c2ebe8c0b | gomeifuku/JugJug | /ResultScene.cpp | C++ | cpp | 8,884 | no_license | //
// ResultScene.cpp
// Hanauranai
//
// Created by 前原謙一 on 2014/11/04.
//
//
#include "ResultScene.h"
#include "StageScene.h"
#include "ScoreCenter.h"
#include "HelloWorldScene.h"
#include "AppCCloudPlugin.h"
USING_NS_CC;
Scene* Result::createScene()
{
// 'scene' is an autorelease object
auto scene = Sce... |
dd47ac309c2ca7e6a5342c8c6945b41beaadfed4 | 34d4b4b0bb105a7ce13ae4927104b459570a974e | danielgalvis98/Competitive-Programming | /Codeforces-647-Div2/A.cc | C++ | cc | 1,135 | no_license | #include <bits/stdc++.h>
#define fst first
#define snd second
#define fore(i,a,b) for(int i=a,end=b;i<end;i++)
#define ALL(s) s.begin(),s.end()
#define SZ(s) int(s.size())
#define pb push_back
#define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
using namespace std;
typedef long long int ll;
typedef vector<i... |
20d3ad1a51b0bf0fbc633163fa257610dbcfa6b9 | c84ea388cb37237542155d06d9667a12050cd23d | vvjn/Opcode.jl | /deps/src/jlcxx/opcode/opcodejulia.cpp | C++ | cpp | 5,835 | permissive | #include <vector>
#include <iostream>
#include <cmath>
#include "Opcode.h"
using namespace Opcode;
#include "jlcxx/array.hpp"
#include "jlcxx/jlcxx.hpp"
IceMaths::Point* create_ice_points(jlcxx::ArrayRef<double,2> verts, int64_t nverts) {
IceMaths::Point *iceverts = new IceMaths::Point [nverts];
for (int64_t ki=0... |
016a36a601467299d69f1c0f6676a6c9de567156 | d5c62d7948656833954b24fd2240406eb40db170 | brain5lug/i2pd | /libi2pd_client/SAM.cpp | C++ | cpp | 47,333 | permissive | /*
* Copyright (c) 2013-2021, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
* See full license text in LICENSE file at top of project tree
*/
#include <string.h>
#include <stdio.h>
#ifdef _MSC_VER
#include <stdlib.h>
#endif
#include "Base.h"
#include "Identity.h"
#include... |
027a1c45897790667fae9e7c3a6efb0425909fac | 15a3b4e4b968343e95193bcee043582167508d62 | Markus91Koch/LAMMPS_Extensions | /compute_asphericity_chunk.cpp | C++ | cpp | 12,893 | no_license | /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04... |
126c1595ea921dc1b085a0291d629d2c29ca6f0c | ef0363f946226a81aec2dbdd8bf048766d0a2252 | srinjoyray/Competitive | /Contests/Codeforces/686DIV3/D/D_hackgen.cpp | C++ | cpp | 1,387 | no_license | #include <bits/stdc++.h>
using namespace std;
//----------------------------------- DEBUG -----------------------------------
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > ... |
4bb0bf01f0ba2603bad6175baf67986708365562 | 52f21eb554a2a690d77783bfdfda2af76aedc6c2 | oriongump/GoogleAPAC | /Africa2010/reverseWords/reverseWords.cpp | C++ | cpp | 1,351 | no_license | #include <string>
#include <vector>
#include <stdio.h>
#include <cmath>
#include <map>
#include <iostream>
#include <sstream>
using namespace std;
#define rep(i,m) for(int i=0;i<(int) (m);i++)
#define rep2(i,n,m) for(int i=n;i<(int) (m);i++)
#define pb push_back
typedef stringstream ss;
#define SMALL
//#define LARG... |
bb24027b9c4f45803f256f636587cceb5f5c0907 | c3ee25820a0cda3fc69257fd1b64d4e4cb34de7f | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_5/MP+dmb.sy+data-rfi-pos-addr-pos.c.cbmc_out.cpp | C++ | cpp | 60,255 | no_license | // Global variabls:
// 0:vars:3
// 7:atom_1_X9_0:1
// 3:atom_1_X0_1:1
// 4:atom_1_X4_1:1
// 5:atom_1_X5_1:1
// 6:atom_1_X7_0:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
#define ADDRSIZE 8
#define LOCALADDRSIZE 2
#define NTHREAD 3
#define NCONTEXT 5
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stm... |
2c8ce90c12f34904937d161dd56f6196a8ec3487 | 72d8682f25edfd826a00fffa9e58e0778dbce250 | RobertoMalatesta/threepp | /include/threepp/geometries/ConeGeometry.hpp | C++ | hpp | 1,050 | permissive | // https://github.com/mrdoob/three.js/blob/r129/src/geometries/ConeGeometry.js
#ifndef THREEPP_CONE_GEOMETRY_HPP
#define THREEPP_CONE_GEOMETRY_HPP
#include "threepp/geometries/CylinderGeometry.hpp"
#include "threepp/math/MathUtils.hpp"
namespace threepp {
class ConeGeometry : public CylinderGeometry {
pub... |
db878cc35e652bb809bc7e686ded69739a8e71e4 | 75eb817829605f5941a3a97b939bbd5ce07e00bc | peer9999/cpp | /lab5/111/9.cpp | C++ | cpp | 604 | no_license | #include <map>
#include <set>
#include <string>
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
std::string str( "abrakadabra" );
std::map<char, int> letters;
for (const auto& i : str) {
++letters[i];
}
for (const auto& it : letters) {
std::cout << it.fir... |
2f6f2b547cb25240ae791cad922b54daf15ff43e | 3f0af3c019036f0266ce8b733676277c5bd7701b | Nightanimal-Crawler/OpenColorIO | /src/apps/ocioconvert/main.cpp | C++ | cpp | 21,701 | permissive | /*
Copyright (c) 2003-2010 Sony Pictures Imageworks Inc., et al.
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 co... |
b9ce0ca9e155e2e36f230168456f528985ac67de | 5b46945bc3708e795ae326181f6f3bf742aea2b8 | NKanabolo/nk2497880 | /Homework/Assignment 1/Savitch_8thED_Chap1_Prob7/main.cpp | C++ | cpp | 1,308 | no_license | /*
* File: main.cpp
* Author: Nornubari Kanabolo
* Savitch Chapter 1 Problem 7
* Output "CS" Text to Screen
* Created on June 27, 2014, 11:20 PM
*/
#include <iostream>//User Defined Libraries
using namespace std;
//Global Constants
//Function Prototypes
//Execution
int main(int argc, char** argv) {
c... |
37d776a4faa96ac4e68a38e29a5a818a573caeac | 49bc73ed503353718fcca31e0382cea3c18b507a | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14172/function14172_no_schedule/function14172_no_schedule_wrapper.cpp | C++ | cpp | 855 | no_license | #include "Halide.h"
#include "function14172_no_schedule_wrapper.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>
#include <time.h>
#include <fstream>
#include <chrono>
#define MAX_RAND 200
int main(int, char **){Halide::Buffer<int32_t> buf0(65536, 1024);
init_buffer(buf0, (int32_t)0);
... |
e2564f482d7dbc82268094d226d05547a39afc98 | c19ed951bfbc755cf2bd6d2d3360a7772b38da17 | bobpan613280/toolkits | /example/udpCppExample/udpCppExample/udpCppExample.cpp | C++ | cpp | 856 | no_license | // udpCppExample.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include "pch.h"
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
}
// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单
// 调试程序: F5 或调试 >“开始调试”菜单
// 入门提示:
// 1. 使用解决方案资源管理器窗口添加/管理文件
// 2. 使用团队资源管理器窗口连接到源代码管理
// 3. 使用输出窗口查看生成输出和其他消息
// 4. 使用错误列... |
dccfb19ccd2d09f81497f6f477466d321ff55ac0 | 6520dceeca0a8616cfdfd89802fccff525dc703c | salvicode/qt_opengl_hello_world | /myopenglwidget.cpp | C++ | cpp | 2,080 | no_license | #include "myopenglwidget.h"
MyOpenGLWidget::MyOpenGLWidget(QWidget *parent)
: QOpenGLWidget(parent)
{
}
void MyOpenGLWidget::initializeGL()
{
float r, g, b, a = normalize_0_1(255.0f, RGB_MIN, RGB_MAX);
initializeOpenGLFunctions();
qColorToRGB(Qt::black, r, g, b);
glClearColor(r, g, b, a);
glEn... |
267f30606ececa2e110e4087a9b01411aee4dae6 | 68096241c4318a2962e14779e2988d918f27326a | AkisTacos/Leetcode-HackerRank | /HackerRank/Sherlock-And-Squares.cpp | C++ | cpp | 2,803 | no_license | // Aki Saito
// HackerRank - Easy
// Sherlock and Squares
// July 26, 2018
// Language: C++
//
/* Description:
Watson likes to challenge Sherlock's math ability.
He will provide a starting and ending value describing a range of integers.
Sherlock must determine the number of square integers within that range,
... |
6a23faa12082599a02743bc2c5821286169e2007 | 16cd0bf722e565ceda451c1a5a97a1b795e785a7 | Calibanda/Cpp-Minesweeper | /Minesweeper/include/Explosion.hpp | C++ | hpp | 986 | no_license | #ifndef EXPLOSION_HPP
#define EXPLOSION_HPP
#pragma once
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
class Explosion
{
public:
explicit Explosion(unsigned short int const posX, unsigned short int const posY); // Explicit constructor : we can't create an implicit object in function parameters
~Explosion()... |
9bd700c506bc869b7b0fb7a2957dc9c1933bec1f | 70460b841d08e854769119d5cdd4416b24cc8f9e | ThomasCol/Quantix | /Quantix/QuantixEngine/Src/Core/Render/PostProcess/Bloom.cpp | C++ | cpp | 7,705 | no_license | #include "Core/Render/PostProcess/Bloom.h"
#include <glad/glad.h>
#include "Core/Debugger/Logger.h"
RTTR_PLUGIN_REGISTRATION
{
rttr::registration::class_<Quantix::Core::Render::PostProcess::Bloom>("Bloom")
.property("HDROnly", &Quantix::Core::Render::PostProcess::Bloom::_hdrOnly)
.property("Exposure", &Qu... |
1d8d25ba0fb6566aac3c4b3edae630cc6f12f802 | 4ca7dda5d73eb77e4a4b4014a75498747b503849 | SoCmodder/School | /Computer_Science/Computer Science/CS 54 -Intro to Programming Laboratory/CS54_/lab8/lab8Func.cpp | C++ | cpp | 2,087 | no_license | /*
* Author: Elliot Gross
* Date: 2/28/06
* Filename: lab8.cpp
* Instructor: Brian Sea
* Description: This program will change create a program that recieves
* two integers as a fraction, and prints out them as a fraction and decimal
*/
#include "lab8Func.h" //includes lab8Func.h
#include <iostream>
using n... |
9985c7bd941d7f829e232f61e5015e9c0c6d0ea8 | 7454ae7989255f93ab2d64624e1bdedce5f5df96 | Topstack-first/20210521_directx_laghaim | /start_project/Laghaim_Client/3d_PosPoint.cpp | C++ | cpp | 14,717 | no_license | #include "stdafx.h"
//----------------------------------------------------------------------
// INCLUDE
//----------------------------------------------------------------------
#define D3D_OVERLOADS
#include <math.h>
#include <d3d9.h>
#include "sheet.h"
#include "d3dutil.h"
#include "3d_PosPoint.h"
#include "IndexedTe... |
c3d2c097f3f012b22a384cd882ee7ebe08b39416 | 601d10bbc91cece033d8572c3c92f7c6bc758a56 | SweT-13/3-semestr_4-7praktika | /mainA.cpp | C++ | cpp | 3,319 | no_license | #include <iostream>
#include "subjA.h"
//Скрытый вывод))
//Вот они все тайны дебага
bool debag = false;
using namespace std;
int GetNum(bool s = false) {
if (s)
std::cout << ">> Enter num\n<< ";
int a;
while (true) {
std::cin >> a;
if (std::cin.fail()) // если предыдущее извлечение оказалось неудачным,
{
... |
d114810dd99d36220654e78b093e1619eb9201cd | 572496f7f99b89481bc5d1fa3676e359d343e161 | songclei/leetcode | /editDistance.cpp | C++ | cpp | 659 | no_license | class Solution {
public:
int minDistance(string word1, string word2) {
int l1 = word1.length();
int l2 = word2.length();
if (l1 == 0) return l2;
if (l2 == 0) return l1;
int dis[l1+1][l2+1];
for (int i = 0; i <= l1; ++i) dis[i][0] = i;
for (int i = 0; i <= l... |
98ffad6b9492eb9646d02d52b62d15f8931084f0 | 64dab30a6a7cc9fe324061e3a6ed5ef590c2abd4 | gongweibao/Paddle | /paddle/phi/tests/api/test_split_api.cc | C++ | cc | 2,740 | permissive | // Copyright (c) 2022 PaddlePaddle 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... |
32d0a501670c6cbd05168b74ae072c5404022b21 | d700f5206ca4da7aaa11affe0a865047d550810f | gnocuil/SerialScanner | /ocr.cpp | C++ | cpp | 1,527 | no_license | #include <iostream>
#include <cstdio>
#include <string>
#include <CImg.h>
#include "ocr.h"
using namespace std;
OCR ocr1(1);
OCR::OCR(int id)
{
char buf[100] = {0};
sprintf(buf, "debug/ocr_%d.jpg", id);
path = buf;
api = new tesseract::TessBaseAPI();
// Initialize tesseract-ocr with English, wi... |
1f4fc09b264da225bf72e3f86fca40b365a32585 | c78b315a71e47bf27ca197bf64e205f57c0b7ac3 | rajatverma09/Mini-Bit-torrent | /client/show_downloads.cpp | C++ | cpp | 707 | no_license | /********************************************************************************/
/* Name: Priyendu Mori */
/* Roll no: 2018201103 */
/**********************************************************************... |
459226dcde656bc18ee6be6300c6244344d8491d | fa4a772479d916f9f73c940284798474092fb7b2 | liuzikai/lc3-feedback-system-artifact | /klc3/lib/klc3/FlowAnalysis/FlowGraphVisualizer.cpp | C++ | cpp | 23,221 | permissive | //
// Created by liuzikai on 10/9/20.
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
#include "klc3/FlowAnalysis/FlowGraphVisualizer.h"
#include "klc3/FlowAnalysis/LoopAnalyzer.h"
#include "klc3/FlowAnalysis/CoverageTracker.h"
#include <graphviz... |
d6857de9be11e40fc65a2e7b85e468aa943fed93 | 01dfbec2db91eb8a12bdd71af0936b3356f72011 | Happy-Ferret/xygine | /xyginext/src/network/NetPeer.cpp | C++ | cpp | 2,928 | permissive | /*********************************************************************
(c) Matt Marchant 2017 - 2018
http://trederia.blogspot.com
xygineXT - Zlib license.
This software is provided 'as-is', without any express or
implied warranty. In no event will the authors be held
liable for any damages arising from the use of thi... |
dc2beb37c772a4745acfc4b481b9be162719ad3f | dbfb0259dffb5420f5bc97175983200acf4dce0b | Howie1201/hhvm | /hphp/util/light-process.cpp | C++ | cpp | 25,689 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
2437247f919455c36bbb021e211a50327367cb9d | 8862ba1df5b096b19201b621eae37a27924dcaec | SupaSaiyajinRoze/vendor_AOSP | /mediatek/proprietary/custom/mt6795/hal/imgsensor/imx219_mipi_raw/camera_tuning_para_imx219mipiraw.cpp | C++ | cpp | 61,507 | no_license | /* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek inc. and/or ... |
96c6e1984018840fe06c9710c1938554f3cc2837 | 397aba188f0a969e7c703dbca593e58a9ba2057f | grimtraveller/chainsaw-synth | /util.cpp | C++ | cpp | 562 | no_license | /*
* util.cpp
*
* Created on: Nov 14, 2010
* Author: suva
*/
#include <util.h>
#include <math.h>
double ltlLUT[1000];
double ltl2LUT[1000];
double _linToLog(double v) {
return 1 - log10((1 - v) * 9.0 + 1.0);
}
double _linToLog2(double v) {
return log10(v * 9.0 + 1.0);
}
double linToLog(double v)... |
04e5d28370891f45a83e5b0aa4c725fd8125a736 | 5886068243e2bfb8aa7aacd4f7b5ad7c09f8dfb0 | edewit2/SunstangBPS | /lib/Linduino/LTSketchbook/libraries/LTC6945/LTC6945.cpp | C++ | cpp | 31,358 | no_license | /*!
LTC6945: Ultralow Noise and Spurious 0.35GHz to 6GHz Integer-N Synthesizer
@verbatim
The LTC®6945 is a high performance, low noise, 6GHz phase-locked
loop (PLL), including a reference divider, phase-frequency
detector (PFD) with phase-lock indicator, charge
pump, integer feedback divider and VCO output divide... |
1e8088e3649cb5d52a5ba6435031a1abba19cda5 | a70386ffd03f1e3df0b2242945e4f8702270ffd9 | ncchen99/Competitive-Programming | /UVA/CPE1Star/10252 - Common Permutation.cpp | C++ | cpp | 550 | no_license | #include <bits/stdc++.h>
using namespace std;
int main() {
string f, s; //first, second
while (getline(cin, f)) {
getline(cin, s);
int fl[256] = {0}, sl[256] = {0};
for (int i = 0; i < f.size(); i++)
fl[f[i]]++;
for (int i = 0; i < s.size(); i++)
... |
46f37bf9efc6104d32205f264f4b15ecc65f7bf1 | d5472244624c16542e8fb1daaec8ccf2ef485098 | ashif378/codePractice | /C++/page 21.cpp | C++ | cpp | 368 | no_license | #include <iostream>
using namespace std;
class myclass {
int a;
public:
void set_a(int num);
int get_a();
};
void myclass :: set_a(int num)
{
a = num;
}
int myclass :: get_a()
{
return a;
}
int main()
{
myclass ob1, ob2;
ob1.set_a(10);
ob2.set_a(99);
cout << ob1.get_a() << "\n";
... |
1b29d0a0a90a6cfc27eb932e08cf8f11a395e753 | 7a06120f6319ed5f40be73f994a74714f5ea87f9 | MohamedKamalOthman/CMP1020-Project | /Actions/StartStopSimulation.cpp | C++ | cpp | 988 | no_license | #include "StartStopSimulation.h"
StartStopSimulation::StartStopSimulation(ApplicationManager* pApp, ActionType action) :Action(pApp)
{
Execute(action);
}
void StartStopSimulation::ReadActionParameters()
{
return;
}
//Execute action (code depends on action type)
void StartStopSimulation::Execute(ActionType action)
{
... |
d7254250fd9c45b4dcd5432eb4c4f135bc5b080c | 5ef5fdf1f8f373ae311434586536e477997679a4 | marshad08/C---Program | /RottenOrange.cpp | C++ | cpp | 1,159 | no_license | #include<bits/stdc++.h>
using namespace std;
/* Input :
3 3
2 1 1
1 1 0
0 1 1
Output: 4
*/
int RottonOr(vector <vector <int>> a,int n,int m)
{
queue <pair <int,int>> q;
int rotton=0,total=0;
int i,j;
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
if(a[i][j]==1 || a[i][j]==2)
total++;
if(a[i][j]==2)... |
1ecf3387162ede4a5c1866e7d7ca33d4718c66d4 | 7b50d3a34c27f8726ad4ae55d685203ff44447a6 | Chillee/CompProgramming | /template/readint/custom.cpp | C++ | cpp | 11,707 | no_license | #include <bits/stdc++.h>
using namespace std;
// char gc() {
// #ifdef _WIN32
// return _getchar_nolock();
// #else
// return getchar_unlocked();
// #endif
// }
struct GC {
char buf[1 << 16 | 1];
int bc = 0, be = 0;
char operator()() {
if (bc >= be) {
be = fread(buf, 1, sizeof(... |
f591f2e8272c975b80c30bb1d55f5e5d8bf59e4d | 9d48de79422b90f8539d1ed7af25cae861bf8006 | bbbradsmith/nsfplay | /xgm/devices/Sound/nes_fme7.cpp | C++ | cpp | 4,201 | permissive | #include "nes_fme7.h"
using namespace xgm;
const int DIVIDER = 8; // TODO this is not optimal, rewrite PSG output
NES_FME7::NES_FME7 ()
{
psg = PSG_new ((e_uint32)DEFAULT_CLOCK, DEFAULT_RATE);
divider = 0;
for(int c=0;c<2;++c)
for(int t=0;t<3;++t)
sm[c][t] = 128;
}
NES_FME7::~NES_FM... |
108b16d9ebe5f7877584ade5aaed003aaab9a67c | ea1c52743bbb54e9a660e11d78417ef84f0404f9 | hanaa-mohamed/etl | /include/etl/op/unary/softplus.hpp | C++ | hpp | 3,008 | permissive | //=======================================================================
// Copyright (c) 2014-2017 Baptiste Wicht
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//==================================================================... |
f7c603b0ab36614937ec1fee2ee447a39a644377 | ba8b7311aefd906c156d21f67834a55c77ad962d | lance-tech/Lance-2D | /Lance2D/Tools/TimelinePanel.cpp | C++ | cpp | 1,736 | permissive | #include <QtGui>
#include "TimelinePanel.h"
TimelinePanel::TimelinePanel() : engineEventModel(nullptr)
{
ui.setupUi(this);
Initialize();
}
TimelinePanel::TimelinePanel(QWidget *parent)
: QFrame(parent)
{
}
TimelinePanel::TimelinePanel(EngineEventModel &model) : engineEventModel(&model)
{
ui.setupUi(this);
Init... |
5f01ed0b31ae195d207dd60a144d7ce75514dbd1 | a5a678dac778199ad1de10e84e845e36f34b381a | fanfu13/DNS | /libraries/client/client.cpp | C++ | cpp | 148,875 | permissive | #define DEFAULT_LOGGER "client"
#include <bts/client/client.hpp>
#include <bts/client/messages.hpp>
#include <bts/cli/cli.hpp>
#include <bts/net/node.hpp>
#include <bts/net/exceptions.hpp>
#include <bts/net/upnp.hpp>
#include <bts/net/peer_database.hpp>
#include <bts/net/chain_downloader.hpp>
#include <bts/net/chain_s... |
e1dd8097b6c0dc5fccd528dc88491204eade8d27 | ecefb6441803b4530a4e7a65dc9972ee31196496 | ITMFLtd/ITCONode | /rai/rai_node/entry.cpp | C++ | cpp | 26,665 | no_license | #include <rai/lib/utility.hpp>
#include <rai/node/cli.hpp>
#include <rai/node/node.hpp>
#include <rai/node/testing.hpp>
#include <rai/rai_node/daemon.hpp>
#include <argon2.h>
#include <boost/lexical_cast.hpp>
#include <boost/program_options.hpp>
int main (int argc, char * const * argv)
{
rai::set_umask ();
boost... |
d951fe7636d8a6da1025f3db3ffe3414f47d3332 | b499ba94b59c7cdd14cf5d0fc713e8d19af30b1f | Leehomwang/Leehom_Git | /Point_Radar/coordinate.cpp | C++ | cpp | 3,743 | no_license | int main()
{
//Begin draw Axis
osg::Geometry* Axis=new osg::Geometry;
osg::Vec3Array* vecArray=new osg::Vec3Array;
vecArray->push_back(osg::Vec3(0.0,0.0,0.0));
vecArray->push_back(osg::Vec3(100.0,0.0,0.0));
vecArray->push_back(osg::Vec3(0.0,100.0,0.0));
vecArray->push_back(osg::Vec3(0.0,0.0... |
a5248db6d5efa0bba7f435b9eb389def2b3589ee | 4c56b267931d0aef47326753d9ab509a5dbd5659 | Milerius/doctest | /examples/all_features/asserts_used_outside_of_tests.cpp | C++ | cpp | 2,685 | permissive | #ifndef DOCTEST_CONFIG_DISABLE
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS // defined so the asserts are crazy fast - both for compilation and execution
#endif
#include <doctest/doctest.h>
#include "header.h"
DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN
#include <iostream>
#include <cstring>
#include <al... |
e74dabfdfe89d13ee527559898aa03e583008bcc | 181b2b23cf190f19fc60ae95bdf4a8b2db5937d2 | zahidaliayub/OBC | /src/rpcmining.cpp | C++ | cpp | 19,200 | 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 "main.h"
#include "db.h"
#include "txdb.h"
#include "init.h"
#include "miner.h... |
cb3add31e55d102d74fd4e2495d679a3f48d9a2c | be284a2ba4de3d430c36fc69da5b717e0f15e27a | redmancy750/HelloWorld | /test/src/XmlTest.cpp | C++ | cpp | 4,150 | no_license | #include "../include/XmlTest.hpp"
CXmlTest::CXmlTest()
{
m_iAge = 0;
m_szGender = "ÄÐ";
}
CXmlTest::~CXmlTest()
{
}
bool CXmlTest::XmlToObject(const TiXmlDocument &XmlDocument, string &strError)
{
bool bResult = true;
TiXmlHandle Handle((TiXmlNode*)&XmlDocument);
const TiXmlElement *pElement, *pSonElement, *pEl... |
e4dde2148e55d3f62927feba44b5ec2cc080b6a2 | faffa5b0a69a93adf2889a2de46f82533f09f205 | JayOfemi/iMorpheus-NEO | /src/test/mempool_tests.cpp | C++ | cpp | 23,870 | permissive | // Copyright (c) 2011-2015 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 "policy/policy.h"
#include "txmempool.h"
#include "util.h"
#include "test/test_bitcoin.h"
#include <boost/test/uni... |
12eadbcd201d0716c11880df919d8c3bccdef91a | 8bf8b0b8ee6be5da87bd78386ea00d92576e5811 | baram82/kio-extras | /filter/filter.cpp | C++ | cpp | 5,671 | no_license | /*
This file is part of KDE
SPDX-FileCopyrightText: 1999-2000 Waldo Bastian <bastian@kde.org>
SPDX-FileCopyrightText: 2008 David Faure <faure@kde.org>
SPDX-License-Identifier: MIT
*/
#include "filter.h"
#include <QCoreApplication>
#include <QFileInfo>
#include <QFile>
#include <QDebug>
#include <QUrl>
#include <Q... |
8ac46ba6f24f32439aed1cd5fcab533bc45ff445 | a5a75fa5c72ebc770e5c7ba620c26e795f94daa6 | InitoryDad/botw | /src/KingSystem/Utils/ParamIO.cpp | C++ | cpp | 3,003 | no_license | #include "KingSystem/Utils/ParamIO.h"
#include <agl/Utils/aglParameter.h>
#include <cstring>
#include "KingSystem/ActorSystem/actActorParamMgr.h"
namespace ksys {
void ParamIO::applyParameter(char* data, char* data1, agl::utl::ParameterBase* param,
const sead::SafeString& parent_name, boo... |
3cde2946e92ada1d118673ba4585f0188079b272 | 8adb69f50a87c121db784af9a8c60378e55520e1 | cryptofugu/bsmcoin-core | /src/test/streams_tests.cpp | C++ | cpp | 1,799 | permissive | // Copyright (c) 2012-2015 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 <streams.h>
#include <support/allocators/zeroafterfree.h>
#include <test/test_bsmcoin.h>
#include <boost/assign/std... |
4dd2507489127fc652e10f31fb9d0fdd3e95fa64 | 2505457239fb21a9f97a125cefe5d4386f24104c | theodore/olympiads | /HOJ/1855/imp.cpp | C++ | cpp | 2,099 | no_license | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <deque>
#ifdef DB
# include <iostream>
#endif
const int maxn(2003);
const int maxm(2003);
int n, m, w;
int f[maxn][maxn];
struct T
{
T(): val(0), pos(0){}
T(const int v, const int p): val(v), pos(p){}
int val, pos;
};
//std::deque<T> q;
T q[maxm];... |
445f9eb7ebe5cb5e453dd2389d487b39ab48a6d2 | c066d9f4e1c63eea30106472a7ef141c66b1375f | iammarajul/competitive_programming | /Light oj/1133.cpp | C++ | cpp | 1,263 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
for(int te=1; te<=t; te++)
{
int n,q;
cin>>n>>q;
vector<int>vc;
for(int i=0; i<n; i++)
{
int x;
cin>>x;
vc.push_back(x);
}
... |
63f0106786a07491a77bdb97124f9bc9bd50df04 | dbd63555e4fc031d3d336f656146ac106ee30c29 | ermek-bdnf/c-cpp-sources | /13_0_sort_alg_vector.cpp | C++ | cpp | 2,012 | no_license | //13.0 vector //sorting algorithm
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
bool GreaterThanZero(int a)
{
return a > 0;
}
/*bool MyPred(int a, int b)
{
return a > b;
//returns the result of comparing two incoming parameters
}*/
//instead of a ... |
3586842648d31b9187f2166aee32de094da310fc | 2af5dd34d4283a34ad4864a9d07cfac4a76026e0 | francislbs1986/btctool | /applets/encode64.cpp | C++ | cpp | 736 | no_license | #include <iostream>
#include <unistd.h>
#include "applets.h"
#include "common/base64.h"
#include "common/codec.h"
#include "common/fd.h"
#include "common/hex.h"
const char encode64_usage[] =
" encode64 [<hex>]\n"
" Encode stdin or argument to Base64.";
int encode64_main(int argc, char *argv[]) {
FileDescript... |
4edb7eb9e8ad91036faa00d0d4e684bdf10df769 | 46f4647c89933d90ba2b49b41625065ecb876786 | keivanipchihagh/Competitions | /Quera/دانشگاهی/ماکزیمم.cpp | C++ | cpp | 325 | permissive | #include <iostream>
#include <cmath>
using namespace std;
int main()
{
int Count;
cin >> Count;
int *arr=new int[Count];
for (int i=0;i<Count;i++)
cin >> arr[i];
int Max=arr[0];
for (int i=1;i<Count;i++)
if (arr[i]>Max)
Max=arr[i];
cout << Max << endl;
return ... |
02b59f44aee5999e0bc22e7a3541139ec38518dd | e920b21327575da188b1ee1006b912df29b52643 | yamadagenki/programming_contest | /POJ/1064_Cable_master.cpp | C++ | cpp | 1,003 | no_license | #include <cstdio>
#include <vector>
#include <queue>
using namespace std;
struct Entry {
long centimeters;
int division;
explicit Entry (long c, int d=1) : centimeters(c), division(d) {}
bool operator<(const Entry &other) const {
return
(long long) centimeters * other.division
... |
88dfe5d13055d03bea73ef139904445a0f1a2442 | f75bb684a2c0b39c1d2faa5dca4ac4f74a406d75 | PabloSzx/concurrentec | /main3.1.cpp | C++ | cpp | 1,028 | no_license | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
//compilar con -fopenmp
using namespace std;
int main(int argc, char *argv[]){
//printf("Hello World! \n");
int nth, tid;
omp_set_num_threads(4);
// printf("numproc: %d\n", omp_get_num_procs());
int contador = 0;
int x = 2;
#pragm... |
f52d06990d2219c80227c2f5d5f4f3e8fd9a35db | 878f9b9b6c1b3db8752c6b68c1f821797c294f5f | WarossK/google-domains-ddns | /google-domains-ddns.cpp | C++ | cpp | 1,782 | no_license | #include "google-domains-ddns.h"
std::string user{};
std::string password{};
std::string address{};
uint64_t refresh_minutes{};
bool load_yaml()
{
try
{
auto config = YAML::LoadFile("ddns_conf.yaml");
user = config["config"]["user"].as<std::string>();
password = config["config"]["password"].as<std::string>()... |
9f791d1fb1c06c191c25fa55954a9c6393a9c75d | 955bdd923600cc9fbe1ae4fc8775a429133beb3b | jyok0120/algorithm_inflearn | /문제40)교집합.cpp | C++ | cpp | 617 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int N, M;
cin >> N;
vector<int> a(N);
for(int i = 0 ; i < N ; i++)
{
cin >> a[i];
}
cin >> M;
vector<int> b(M), c(N+M);
for(int i = 0 ; i < M; i++)
{
cin >> b[i];
... |
4b32dec0ce0da436f81ff5ab2ddd5dc5f5556b06 | 5e20da032e384ba432f8c4be3cea7c30674aa84f | Xambey/something | /practice/var13/2/matrix.cpp | C++ | cpp | 6,368 | no_license | #pragma once
#include "matrix.h"
template<typename _Type>
void Matrix<_Type>::loadFromFile(std::string file) //загрузка матрицы из файла
{
_value.clear();
std::ifstream s(file);
std::string in;
int len = 1;
getline(s, in);
for (char c : in)
if (c == ' ') len++;
s.seekg(0);
wh... |
f11ea2d6199b1c47643f46128ae0bf485d390ea8 | e8d5db20114c32daf033bed8ab023c171a103901 | vslavik/poedit | /deps/boost/tools/auto_index/src/auto_index.cpp | C++ | cpp | 30,776 | permissive | // Copyright 2008 John Maddock
//
// 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.txt)
#include <set>
#include <cstring>
#include <boost/array.hpp>
#include <boost/exception/all.hpp... |
c0e4fb04f6111c76acc9a0dbe8cbffb7e7c4d6fc | 744d6eedde709be0039d30de3daf1310c41a5a1e | spease/Trident | /src/trident/globals.cpp | C++ | cpp | 1,046 | no_license | #include "globals.h"
#ifdef TRIDENT_ACL
uint32_t const TRIDENT_ACL_POST_PERIOD_MS=1000;
#endif
#ifdef TRIDENT_GPS
uint32_t const TRIDENT_GPS_POST_PERIOD_MS=5000;
#endif
#if defined(TRIDENT_HMD) || defined(TRIDENT_TMP)
uint32_t const TRIDENT_TMPHMD_POST_PERIOD_MS=2000;
#endif
#ifdef TRIDENT_OUTPUT_NETWORK
//P... |
00f624d608fa391d4e84946974e8a41bffc5c7fa | 9a5f4e939f5e89544d75cc4c19bc2b4e2434c922 | Zeitzmz/micronet-caffe | /src/caffe/solvers/sgd_solver.cpp | C++ | cpp | 14,666 | permissive | #include <string>
#include <vector>
#include "caffe/sgd_solvers.hpp"
#include "caffe/util/hdf5.hpp"
#include "caffe/util/io.hpp"
#include "caffe/util/upgrade_proto.hpp"
namespace caffe {
#define PI 3.1415926
// Return the current learning rate. The currently implemented learning rate
// policies are as follows:
// ... |
28d595eefe387cfa3faff557dadba3f4ce256ee5 | c76c74cb46c8135e296f39100e5b5ea0ed9c8569 | hbdlyao/HVDC | /Code/BaseFrame/CMyRw.cpp | C++ | cpp | 815 | no_license | ///////////////////////////////////////////////////////////
// CMyRw.cpp
// Implementation of the Class CRwDbf
// Created on: 02-4ÔÂ-2017 15:37:52
// Original author: Administrator
///////////////////////////////////////////////////////////
#include "CMyRw.h"
#include "CMyFunc.h"
#include <iostream>
void C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.