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 |
|---|---|---|---|---|---|---|---|---|
58ab3a5d41edae857a453836443ac2e9a7e269c3 | 3e6c57a996db367d957c43534536f5a4086c5b9a | bokarev/coin | /src/primitives/block.cpp | C++ | cpp | 2,853 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-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 "primitives/block.h"
#include "hash.h"
#include "tinyformat.h"
#include... |
4439442654a72b9321557304d1b75e97e64d0bf0 | d1ae70d3a189afa2ef150d73ee9ccc750cf85f25 | goodspeed24e/Programming | /Boost/The Boost C++ Libraries/src/16.2.1/main.cpp | C++ | cpp | 347 | permissive | struct father
{
virtual ~father() { };
};
struct mother
{
virtual ~mother() { };
};
struct child :
public father,
public mother
{
};
void func(father *f)
{
child *c = dynamic_cast<child*>(f);
}
int main()
{
child *c = new child;
func(c);
father *f = new child;
mother *m = dy... |
dc90f3252b4adee9fea74d9020d47d03b6e353c1 | a5bf401f850f70e7efc83f615139ffe11e82b489 | anghene/LAB | /C/rezolvate/lab 8/Lab8/p2lab8.CPP | C++ | cpp | 728 | no_license | /*2. Sa se scrie un program care citeste cele n nr care compun vectorul A,cele m
nr reale care compun vectorul B.Sa se afiseze pe ecran cate dintre elem lui A
sunt strict mai mici decat elem lui B. */
# include <stdio.h>
int main ()
{
float a[200],b[200];
int i,j,n,m,k,s=0;
printf ("\nIntroduceti nr de elemente ale p... |
76d79f1336173af31efb11ece8ac67c7a7b09765 | 5f309a4a54e2f3f0889d92e268f58445f4a37404 | leoxiaobin/my-project-hand | /newHOGtrain/newHOGtrain/traincascade.cpp | C++ | cpp | 3,829 | no_license | #include "cv.h"
#include "cascadeclassifier.h"
using namespace std;
int main( int argc, char* argv[] )
{
CvCascadeClassifier classifier;
String cascadeDirName, vecName, bgName;
int numPos = 2000;
int numNeg = 1000;
int numStages = 20;
int precalcValBufSize = 256,
pre... |
ddd5c4dd1fbb61237383b44eba76d18fb44444b3 | 84f5d3904f81c2888c9dda68892ec2c4dc6ced2b | solareenlo/42cpp-module-04 | /ex01/PowerFist.cpp | C++ | cpp | 1,281 | no_license | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* PowerFist.cpp :+: :+: :+: ... |
b393823fda1aeda0ef06ea7c9d8fdc4b1f7ae34b | 30a59296f2a737fe0ab4a5d6acd4f45f72688b14 | a07458666/leetcode | /q/67.cpp | C++ | cpp | 608 | no_license |
class Solution {
public:
string addBinary(string a, string b)
{
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
string ans;
bool carry = false;
int sum = 0;
for (int i = 0; i < max(a.size(), b.size()); ++i)
{
sum = 0;
if (i < a.size() && a[i] == '1') sum++;
if (i < b.size() && b[i] ... |
4ceefe7c42829f2a3bdb7703cbd7f1486b805970 | f86b5d429e1ba52752429de2616b8751597d6f06 | Md-Yeasin-Arafat/text_file | /E.cpp | C++ | cpp | 1,640 | no_license | #include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);
int main()
{
int t;
cin>>t;
for(int i=1;i<=t;i++){
int ... |
150e4359643b645598ebb03dc8defe5f35a683dd | 3a82060d32e6a00f40a4d18872000ad807302863 | s1410832032/Incremental-Method-Selection-Sort- | /main.cpp | C++ | cpp | 629 | no_license | #include <iostream>
using namespace std;
void selection_sort(int array[],int n){
for (int i=0 ; i<n ; i++){
int min_index=i;
for(int j=i+1 ; j<n ; j++)
if(array[min_index]>array[j])
min_index=j;
swap(array[min_index],array[i]);
}
for(int i=0 ; i<n ; i++)
cout << array[i];
}
int m... |
4d2903fd73e24d31f936130f8ce850bd5eec8a0a | 4b5e63ac68354e747e9a66361fefb9f09498840f | lanthan/repsnapper | /src/printer2.cpp | C++ | cpp | 3,832 | no_license | /*
This file is a part of the RepSnapper project.
Copyright (C) 2010 Kulitorum
Copyright (C) 2011 Michael Meeks <michael.meeks@novell.com>
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 Softwar... |
6b6f1e375ea49c0742c2c9b48c38cee7532b80f9 | ef671d375629791ca21a964592e77a8907c2b357 | marco-c/gecko-dev-comments-removed | /third_party/libwebrtc/media/base/video_source_base.cc | C++ | cc | 2,793 | permissive |
#include "media/base/video_source_base.h"
#include <algorithm>
#include "absl/algorithm/container.h"
#include "rtc_base/checks.h"
namespace rtc {
VideoSourceBase::VideoSourceBase() = default;
VideoSourceBase::~VideoSourceBase() = default;
void VideoSourceBase::AddOrUpdateSink(
VideoSinkInterface<webr... |
92641c80b405f84e2e5af4205670bb874a72752c | ae9755ef5b5292f71a1609829c277761751acf54 | tinesoft/cute-collage | /characterwidget.cpp | C++ | cpp | 3,899 | no_license |
#include <QtGui>
#include "characterwidget.h"
CharacterWidget::CharacterWidget(QWidget *parent)
: QWidget(parent)
{
_squareSize = 24;
_columns = 16;
_lastKey = -1;
setMouseTracking(true);
}
void CharacterWidget::updateFont(const QFont &font)
{
_displayFont.setFamily(font.fa... |
f168ee282c8a55138d081448d6669ff56788d4f9 | 5d69b822e00550de451ac5909fb6ce8d8adf4cf7 | sdporzioAtMicroBooNE/LArModule_HSNAnalyzer | /larhsn/_Archived/18-08_ProtonFinder/CustomAnaTree_module.cc | C++ | cc | 11,300 | no_license | #ifndef CustomAnaTree_module
#define CustomAnaTree_module
#include "AnaHelper.h"
// Analyzer class
class CustomAnaTree : public art::EDAnalyzer
{
public:
explicit CustomAnaTree(fhicl::ParameterSet const & pset);
virtual ~CustomAnaTree();
void analyze(art::Event const & evt);
void beginJob();
void endJob();
... |
94c3fd3eaadab63d2bda633c3e22869e34be1e6e | 6193f9dae8bfaf33449be2aed27c53dcf3dd296a | ohryhorchuk/cornerstone | /include/rpc_cli.hxx | C++ | hxx | 1,053 | permissive | /**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. The ASF licenses
* this file to you 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
*
* h... |
7c8358ec832605e6d033c7bf1465a01458a5500b | 9a1ce29a210f32f7bc6975a1b16209b1eefbf92a | rezamaleki71/cplusplus | /099-switch.cpp | C++ | cpp | 325 | no_license | #include<iostream>
#include<conio.h>
using namespace std;
main(){
int num;
string strMessage;
cout<<"Enter a number:";
cin>>num;
switch(num){
case 10: strMessage="its 10"; break;
case 20: strMessage="its 20'";break;
case 30: strMessage="It is 30";break;
default: strMessage="Unknown";
}
cout<<strMessage... |
5741bf5abc0cdb33762c395aa16a0b51743f6eec | 6f057f790a5377384cea853d731d40b49288c07a | ric2b/Vivaldi-browser | /update_notifier/thirdparty/wxWidgets/tests/formatconverter/formatconvertertest.cpp | C++ | cpp | 12,496 | permissive | ///////////////////////////////////////////////////////////////////////////////
// Name: tests/formatconverter/formatconverter.cpp
// Purpose: Test wxFormatConverter
// Author: Mike Wetherell
// Copyright: (c) 2004 Mike Wetherell
// Licence: wxWindows licence
//////////////////////////////////////... |
05ad9e722a6359f497fe3fd1dd6c12695ba1ad79 | d0664cec35732025799564b221028684135179ee | nadavharpazi-private/CppND-System-Monitor | /src/format.cpp | C++ | cpp | 1,197 | permissive | #include "format.h"
#include <string>
using std::string;
using std::to_string;
// INPUT: Long int measuring seconds
// OUTPUT: HH:MM:SS
string Format::ElapsedTime(long seconds) {
int hours = seconds / (60 * 60);
seconds -= hours * (60 * 60);
long minutes = seconds / 60;
seconds -= minutes * 60;
char forma... |
21ae15a063c5d76f9687a6ba6c7dc1ba48c85e64 | a22cff08bae5b01386a36438be30ce785e57c306 | jadyntao/HuaWei_CodeCraft_2020 | /Third_Round/Code/test_main17.cpp | C++ | cpp | 18,802 | no_license | #include<bits/stdc++.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
#include <omp.h>
#include <arm_neon.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
using namespace std;
#define maxn 5000001
// #define outMAXS 400000000
#define Tnum 8
#defi... |
dd416bdc8e5e949e43ad3099312a85143e8ede61 | b2aadb80088c8c83652040e66d17991652de42ca | Graphcoin/source | /src/rpcprotocol.cpp | C++ | cpp | 3,982 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2015-2017 The Graphcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING o... |
ec563e70a009e3b2cf52c487ce98fc7305aeb74f | b16ad401b1001fb2596fc233b02a2fb9c0ff56cd | jkoppel/project-ironfist | /tools/Revitalize/seance/test/imports/funcs/sub_4571A0.cpp | C++ | cpp | 2,344 | no_license | {
int thisa; // [sp+10h] [bp-34h]@1
GUIWindow *thisb; // [sp+1Ch] [bp-28h]@1
int v3; // [sp+20h] [bp-24h]@1
int evt; // [sp+24h] [bp-20h]@7
int v5; // [sp+28h] [bp-1Ch]@7
int v6; // [sp+2Ch] [bp-18h]@7
int v7; // [sp+3Ch] [bp-8h]@7
int window; // [sp+40h] [bp-4h]@2
thisa = (int)this;
sub_456000(thi... |
47076ceb115fc04bcc759758dc5996b99e7134b0 | 15e960c16d0c6b3c55ed0245afe11350963927be | JanaLipkova/RATGBM | /source/makefile/helpers/WriteToFile.cpp | C++ | cpp | 353 | no_license | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <assert.h> /* assert */
int main ()
{
FILE * pFile;
float buffer[3] = { 0.315 , 0.65 , 0.5 };
pFile = fopen ("HGG_TumorIC.bin", "wb");
fwrite (buffer , sizeof(float), sizeof(buffer), pFile);
// terminate
fclose (pFile);
... |
bd48828ad0cd30cdfe23a1d8a0c5d6ed2c23b486 | 3f99fc69284fe4028ca1830074caef2d8df1f94d | sahwar/ahoviewer | /src/main.cc | C++ | cc | 1,246 | permissive | #include <gtkmm.h>
#include <cstdlib>
#include <iostream>
#include <curl/curl.h>
#include <libxml/parser.h>
#include "config.h"
#include "mainwindow.h"
#ifdef HAVE_GSTREAMER
#include <gst/gst.h>
#endif // HAVE_GSTREAMER
extern const unsigned char ahoviewer_ui[];
extern const unsigned long ahoviewer_ui_size;
int mai... |
f1673db968d3e261cf3109c2eeaa19d9bdd44841 | c7609c951325c41fd2d3f4ebfda29902c7b83110 | deeplearning4j/deeplearning4j | /libnd4j/tests_cpu/layers_tests/ConditionalTests.cpp | C++ | cpp | 8,886 | permissive | /* ******************************************************************************
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed wit... |
ec8a8e490266e7bb1991b883ad892ba3fed464d4 | eb760aef2acf794e32455fd3ce45900a3896479e | AdryV/kernel_w200_kk_4.4.2_3.4.67_mt6589 | /mediatek/factory/src/test/ftm_usb.cpp | C++ | cpp | 6,424 | 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 ... |
fdaddf953512df7523e4865ce35f40288e6f0c89 | e156c7004588a0d2b83917e216ab26de40a040d7 | juruo123/some-programs | /单精除法.cpp | C++ | cpp | 428 | no_license | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
char a1[1001];
int a[1001],c[1001];
int i,x=0,b,lena,lenc;
int main(){
cin>>a1>>b;
lena=strlen(a1);
for(i=0;i<lena;i++)
a[i+1]=a1[i]-'0';
for(i=1;i<=lena;i++)
{
c[i]=(x*10+a[i])/b;
x=(x*10+a[i])%b;
}
lenc=1;
while... |
14251e5d2e8c22f35d978cc0b69794f52e966478 | 2eec71df0acbc952e87eb9eeef4324b2e33376a8 | siquel/Uskomaton | /uskomaton/include/conf/config.hpp | C++ | hpp | 902 | no_license | #pragma once
#include <string>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>
#include <vector>
namespace uskomaton {
namespace config {
class Configuration {
private:
std::vector<struct ServerConfiguration> servers;
public:
Configuration();
static bool fromFile(c... |
ff55d1af92bc7956d2fce7b2d7fe4e0e54c17922 | 4ca00d7c62314ada9b0af0a084e90672a05b2143 | leo-drive/rosbag2 | /rosbag2_transport/src/rosbag2_transport/converter.cpp | C++ | cpp | 1,305 | permissive | // Copyright 2018 Open Source Robotics Foundation, Inc.
//
// 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 appli... |
f4f645cb1364f9d4c25e1a3b09d3bcbc85ea641f | 9ab7c7befc018afa931f849e73c9c7c187573c2b | aduric/xmParses | /Tokenizer.cpp | C++ | cpp | 1,881 | no_license | /*
* Tokenizer.cpp
*
* The Tokenizer functions
*
* - breaks up a string into separate words
* - ignores punctuation
* - applies lowercase to all tokens
*
*/
#include "Tokenizer.hpp"
#include <cctype>
#include <iostream>
#include <fstream>
using namespace std;
using namespace boost;
// tokenizes string str ... |
94ffed6a2b9266a38d3697866cc8202e8ee2841b | 8b46fabc9c3072de4f16cc5182f122624e5a8631 | Haar-you/kyopro-lib | /test/aoj/ITP2_11_B/main.desc.test.cpp | C++ | cpp | 825 | no_license | #define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP2_11_B"
#include <iostream>
#include <map>
#include <vector>
#include "Mylib/Bit/enumerate_supersets_desc.cpp"
#include "Mylib/IO/input_vector.cpp"
namespace hl = haar_lib;
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);... |
2da604f4cd9ce21a41bcfb1182a90c0107d1afcd | 916a7d91aa2a902821f6a717f5efeeb6e4fb0e22 | jjzhang166/Bitfield-4 | /Classes/GameObject/Blossom.cpp | C++ | cpp | 4,050 | no_license | #include "Blossom.h"
#include "Input.h"
#include "Util.h"
#include "Constants.h"
#include "UI/World.h"
USING_NS_CC;
Blossom* Blossom::create(World* world, SquadronInfo& info, int squadronID, int shipID) {
Blossom* ship = new (std::nothrow) Blossom();
if (ship && ship->init(world, info, squadronID, shipID)) {
... |
16c295bb91d1bee6ea71a304d2d0aacaa336276d | 8aea7f78677eb1c0954e3a6ccdcf7c7d6a698012 | DEIPworld/deip-graphene | /tests/tests/research_discipline_relation_service_tests.cpp | C++ | cpp | 5,012 | permissive | #ifdef IS_TEST_NET
#include <boost/test/unit_test.hpp>
#include <deip/chain/schema/research_discipline_relation_object.hpp>
#include <deip/chain/services/dbs_research_discipline_relation.hpp>
#include "database_fixture.hpp"
#define RESEARCH_ONE 1
#define RESEARCH_TWO 2
#define DISCIPLINE_MATH 10
#define DISCIPLINE_P... |
0a54727c0f9527a921a611294f3af5ed78aea2cc | ee4f1a06909c9e25f75c4dd0efddc38e5d06a37e | yusuke-matsunaga/ymsl | /src/ast/expr/AstStringConst.cc | C++ | cc | 955 | no_license |
/// @file AstStringConst.cc
/// @brief AstStringConst の実装ファイル
/// @author Yusuke Matsunaga (松永 裕介)
///
/// Copyright (C) 2014 Yusuke Matsunaga
/// All rights reserved.
#include "AstStringConst.h"
BEGIN_NAMESPACE_YM_YMSL
//////////////////////////////////////////////////////////////////////
// クラス AstStringConst
/... |
b7cf2ba6b2c752ae0d0d035d636d3812a8406088 | 18277b1f121a1d2aa4c7f7581838f6f267fee1b5 | massnetwork/mass-browser | /components/autofill/core/browser/webdata/autofill_table_unittest.cc | C++ | cc | 86,880 | 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 <stddef.h>
#include <map>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "base/command_line.h"... |
a470ec57b6568baa51da9b216bd573c43b2035dc | 1d4d8db777f29db024ccd2fc3a13db7ecda94b43 | Eissen/fuchsia | /zircon/system/ulib/zbitl/testing/append-fuzzer.cc | C++ | cc | 1,732 | permissive | // Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/zbitl/image.h>
#include <lib/zbitl/memory.h>
#include <zircon/assert.h>
#include <zircon/boot/image.h>
#include <fuzzer/FuzzedDataProvider.h... |
9f38899257c617543e60edd0e35adb47c03d4010 | 3b60d3c6fb0726fc5d774697fd2ac4a58475dd80 | yevhenVT/poly | /c++/src/utils.cpp | C++ | cpp | 554 | no_license | #include "utils.h"
#include <algorithm>
char *cmdOptionParser(char** begin, char** end, const std::string& option){
char **itr = std::find(begin, end, option);
if ( (option.size() >= 2) && (option.substr(0,2)== "--")){
if (itr != end) return *itr;
else return 0;
}
... |
f3cc1892f5f637d4e556a117b4cd35abe7d2651e | 5137a519542404bdddd009a4e633d1ada2113928 | paco89lol/CandCppReference | /Cpp/io_read_binary_file(file to struct)/io_read_binary_file(file to struct)/Data.cpp | C++ | cpp | 238 | no_license | #include <iostream>
struct Data
{
char name[8];
char student_id[8];
Data()
{
}
Data(const char *string_name, const char *string_student_id)
{
strcpy_s(name, 20, string_name);
strcpy_s(student_id, 20, string_student_id);
}
};
|
b7b85c043807c63a03d5c5c6cf0442592bad2f39 | 3f54f88720af53683e362743bb1975545bae3c0d | ToDayL/Image-Cutter | /CutYourImage/CutYourImage.cpp | C++ | cpp | 2,721 | no_license |
// CutYourImage.cpp : 定义应用程序的类行为。
//
#include "stdafx.h"
#include "CutYourImage.h"
#include "CutYourImageDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CCutYourImageApp
BEGIN_MESSAGE_MAP(CCutYourImageApp, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CCutYourImageApp 构造
CCutYourIma... |
ec7a565214e95fb9da8beace47dd492c8b37d10b | a217f9488cfc4874e8ffc83f6e2fa5cdb6b29257 | UW-COSC-4010-5010-CYBER-FA-2017/foundational-concepts-in-cybersecurity-teamvoldemort | /C5/src/secureCrowd.cpp | C++ | cpp | 481 | no_license | #include "secureCrowd.h"
SecureCrowd::SecureCrowd(){
myCrowd = Crowd();
}
void SecureCrowd::login(string pass){
if(pass=="admin"){
loggedIn=true;
}
}
bool SecureCrowd::isLoggedIn(){
return loggedIn;
}
void SecureCrowd::engageNaturalSelection(){
if(loggedIn){
for (auto it = myCrowd.people.begin(); ... |
f68fc1cbd472a3730bfae1c330c2bece6247ac01 | 231e80d572bbb1756862ac3448690c8e570d74ad | bog-dan-ro/Allegiance | /src/WinTrek/gameoverscreen.cpp | C++ | cpp | 34,811 | permissive | #include <efapp.h>
#include <efpane.h>
#include <button.h>
#include <controls.h>
#include <listpane.h>
#include "badwords.h"
#include "screen.h"
#include "trekctrls.h"
#include "trekmdl.h"
using namespace std;
//////////////////////////////////////////////////////////////////////////////
//
// GameOver Screen
//
////... |
194c62069e5a2728da2177feabb7ef970dfd4419 | 472118c281b104a572ee4f08a358d96a3009d812 | RogerioBarreto/dimacoin | /src/qt/guiutil.cpp | C++ | cpp | 13,491 | permissive | #include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include "base58.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QUrl>
#include <QTextDocument> // For ... |
820257b9e338d4e9b739fd5746e132ed2ffeed5c | de6d738887fb4c5b8c644dccb783aec5dce6a47c | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14019/function14019_schedule_7/function14019_schedule_7.cpp | C++ | cpp | 649 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14019_schedule_7");
constant c0("c0", 262144), c1("c1", 256);
var i0("i0", 0, c0), i1("i1", 0, c1), i01("i01"), i02("i02"), i03("i03"), i04("i04");
computation comp0("comp0", {i0, i1}, ... |
525cb165772abb03f2c976232a8d40817c895bc8 | c2e52d4aadc9e68e4865b3b90fb56c437893c797 | m-garanin/zgui-qt | /previewwidget.cpp | C++ | cpp | 2,781 | no_license | #include "previewwidget.h"
#include <QPainter>
#include <QFont>
#include <QTimer>
#include <QDebug>
#include <QPixmap>
#include "IManager.h"
void myImageCleanupHandler(void *info){
global_manager->free_memory(info);
}
PreviewWidget::PreviewWidget(qint32 compkey, QWidget *parent) :
m_compkey(compkey), QWidge... |
051d14f918a2608395914d15c2296d52095309f1 | 262c77e944db837925af33aa0459c47b3c426c2e | AlexeyMoskalenko/University.Programming | /Prog21/Prog21.cpp | C++ | cpp | 2,151 | no_license | #include <iostream>
#include "HumanCode.h"
#include <random>
#include <chrono>
#include <thread>
HumanCode HC(true);
using namespace std;
#define VER_EXT
#ifdef VER_EXT
template<typename T>
struct diapasone{
T left_limit;
T right_limit;
};
template<typename T>
bool in_diapasone(diapasone<T> dia, T num, bool st... |
2686d0e83a6e0a917d66077a156a33fa81df4e27 | 41e6f536408b9d45154d07edd45ac5b8da54721b | Igronemyk/OI | /CodeForces/950B.cpp | C++ | cpp | 817 | no_license | #include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n,m;
cin >> n >> m;
vector<int> values1;
for(int i = 0;i < n;i++) {
int tmpValue;
cin >> tmpValue;
... |
c447b210008cfea38c0d8a79275d58520df43858 | ded75318ede0cd0e0bdcb239f9b688d149a1ac68 | SuperiorOS/android_frameworks_native | /services/surfaceflinger/tests/unittests/TransactionApplicationTest.cpp | C++ | cpp | 53,910 | permissive | /*
* Copyright 2019 The Android Open Source Project
*
* 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 applica... |
434b17fa2580a5c4eb953eadb0b57a8f4de4aaaf | 14f3d9a8762583e15a373a2f8aea7390384a337b | jiafanxue/Algorithm | /LanQiao/ALGO/ALGO-148.cpp | C++ | cpp | 283 | no_license | #include <iostream>
using namespace std;
int gcd(int a, int b)
{
if(b == 0) {
return a;
}
return gcd(b, a % b);
}
int lcm(int a, int b)
{
return a * b / gcd(a, b);
}
int main(int argc, char const *argv[])
{
int a, b;
cin >> a >> b;
cout << lcm(a, b) << endl;
return 0;
} |
bff31f36b8e8998fb3138d1ae49110b3ac6b8fd2 | 92c36f93badd9719b9fa868be5340e48bd5eb7f2 | chloechsu/curve-smoothing | /src/Vertex.cpp | C++ | cpp | 2,227 | permissive | #include <vector>
#include <cmath>
using namespace std;
#include "Vertex.h"
#include "Mesh.h"
#include "HalfEdge.h"
#include "Utility.h"
namespace DDG
{
double Vertex :: dualLength( void ) const
// assuming this vertex is a vertex of a closed polygon in the x-y plane,
// returns the length of the barycentric... |
53375822727a473a9b26af8b80ed5acb54c39ed5 | a527cb2556c6053acdf0b0b1f0f22b2a671d15b0 | WhiZTiM/coliru | /Archive2/18/e101cc548f31d6/main.cpp | C++ | cpp | 596 | no_license | #include <map>
#include <vector>
#include <algorithm>
template <class Map>
std::vector<typename Map::key_type> getKeys(Map const& m)
{
typedef typename Map::key_type Key;
std::vector<Key> result;
result.reserve(m.size());
for (auto const& keyValuePair : m) //foreach (Map::value_type const& keyValuePair, m)
{... |
20ac1fb31b863bbdf13a79620563d3b1c4969504 | 8f00c979ea8e0946f9a3913a1c0b6d4e0acef147 | OSHChip/mbed-os | /targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/TARGET_UBLOX_C030/ONBOARD_UBLOX.cpp | C++ | cpp | 1,810 | permissive | /* mbed Microcontroller Library
* Copyright (c) 2018 ARM 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 require... |
c6f35b6d6af0ad8a116cb6c470fc937c93fa8099 | 5db5fd20fbd6410b2db7da998e90004f53097a3f | Fearycxy/lintcode | /614_Binary_Tree_Longest_Consecutive_Sequence_II.cpp | C++ | cpp | 1,447 | no_license | /**
* Definition of TreeNode:
* class TreeNode {
* public:
* int val;
* TreeNode *left, *right;
* TreeNode(int val) {
* this->val = val;
* this->left = this->right = NULL;
* }
* }
*/
class Solution {
public:
/**
* @param root: the root of binary tree
* @return: ... |
6c37377132b9768450eefa7bea90a1d71db36ab6 | d09f51e9b1b5c38b2e2806d081c0d7d32ae0d0d2 | sandrofonseca/UserCode-1 | /PATMacros/MC_PU_Distributions.cc | C++ | cc | 26,776 | no_license | //-------------------------------------------------------------------------------------------------------->>
// UNIVERSIDADE DO ESTADO DO RIO DE JANEIRO - CMS/Brasil
//-------------------------------------------------------------------------------------------------------->>
// Project: Exclusive Dijets Analysis
//-----... |
3fb2a157dfa8b890e08288f806153ed529064429 | 993560a1bca9df28b7782bf03b321fb1e5c7658d | github188/MyCode-1 | /leetcode/Palindrome_Number.cpp | C++ | cpp | 407 | no_license | /*
Just check it.Attention to the negative.
*/
class Solution {
public:
bool isPalindrome(int x) {
if (x<0) return false;
if (x==0) return true;
vector<char> num;num.clear();
while (x>0)
{
num.push_back(x%10);x/=10;
}
int n=num.size();
for ... |
4efb310804127534a9105be48ce4ba8199b040a9 | 6d2141634ec1b5436602b301162774a88075beaa | Phibonacci/Bomberman | /Editor/MapEditor.hpp | C++ | hpp | 2,333 | no_license | #ifndef __MAPEDITOR_HPP__
# define __MAPEDITOR_HPP__
# include <Clock.hh>
# include <Input.hh>
# include "IObject.hh"
# include "GameParty.hh"
# include "Info.hpp"
# include "Position.hh"
# include <list>
class Entity;
class Board;
class Menus;
class Player;
/**
* @class MapEditor
* @brief the editor class
*/
cl... |
f03311280a31c29dc3f041f7e609148df27d27ca | 66839cdc1514ef3cd8a16f91ee9cefac6e3447b4 | wayfinder/Wayfinder-CppCore-v2 | /cpp/Targets/CommonLib/POSIX/src/JTC/Tests/JTCThreadExitTest.cpp | C++ | cpp | 2,180 | permissive | // **********************************************************************
//
// Copyright (c) 2001
// IONA Technologies, Inc.
// Waltham, MA, USA
//
// All Rights Reserved
//
// **********************************************************************
#include "JTC/JTC.h"
#include <stdlib.h>
#ifdef HAVE_IOSTREAM
# inc... |
2c8d167c87fb942b95548cda75888ab20426ddd8 | c1ef2548df936ab37cefd51e1a8962faea66d092 | Chinamming/nebuladevice3 | /code/addons/ui/uirenderprotocol.cc | C++ | cc | 746 | no_license | //------------------------------------------------------------------------------
// MACHINE GENERATED, DON'T EDIT!
//------------------------------------------------------------------------------
#include "stdneb.h"
#include "uirenderprotocol.h"
namespace CoreUI
{
__ImplementClass(CoreUI::RenderUIElements, 'ruie'... |
17a449f0204a8c917eb9bec2f9f5375da15d8851 | 0d006a449be1b75a14dba88c0581258c42b02fd8 | ramonsaboya/pRuuFID-estimator | /estimators.cpp | C++ | cpp | 9,885 | no_license | #include "estimators.h"
#include "math_util.h"
#include <bits/stdc++.h>
#include <stdlib.h>
#include <set>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <math.h>
#include <string.h>
#include <chrono>
using namespace std;
using namespace std::chrono;
const int W = 15;
const double THRESHOLD = 0.0... |
df1f77f9caa3e98e4ece76d85f54ceda565992c9 | 007d5b5e2afa7012779bcaa323474d0637998da4 | xueming1988/test1 | /middleware/private/asr_client/libs/wwe/tencent/hrsc_sdk_demo.cc | C++ | cc | 5,334 | no_license | /*
* Copyright (c) 2019 horizon.ai.
*
* Unpublished copyright. All rights reserved. This material contains
* proprietary information that should be used or copied only within
* horizon.ai, except with written permission of horizon.ai.
* @author: xuecheng.cui
* @file: hrsc_sdk_demo.cc
* @date: 12/30/19
... |
a291f53e2e2f5affde087be7b3f5bb5d43d09e84 | 27167f40410856432874ba710e9a355812c1d57b | ssijonson/realTimeRendering | /xWindows/pp/13-checkerboardTexture/checkerboardTexture.cpp | C++ | cpp | 25,517 | no_license | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XKBlib.h>
#include <X11/keysym.h>
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glx.h>
#include "vmath.h"
#define checkImageWidth 64
#define checkImageHeight 64
bool isFull... |
09b624ca8aa1df093dcfa4babf89a9c6ee1450da | d4a57ca8a2fa7d014337a696a65e471251401896 | satyam1990/hrank | /jumpingOnClouds.cc | C++ | cc | 785 | no_license | /******************************************************************************
Function Description
Complete the jumpingOnClouds function in the editor below. It should return
the minimum number of jumps required, as an integer.
jumpingOnClouds has the following parameter(s):
c: an array of binary integers
... |
34724db5f5d8f872050b5e31323132451b53789d | 74ee346493a2007744840d82ed3585012ce71695 | SjoerdJakobs/OOF_OpenGL | /src/framework/rendering/RendererOld.cpp | C++ | cpp | 865 | no_license | #include "RendererOld.h"
#include <iostream>
#include "Camera.h"
#include "Game.h"
void GLClearError()
{
while (glGetError() != GL_NO_ERROR);
}
bool GLLogCall(const char* function, const char* file, int line)
{
while (GLenum error = glGetError())
{
std::cout << "[OpenGl Error] dec : " << error << " | hex : 0x.."... |
e2558d826e1da0d9c4f2d31e202c48459f50d7c4 | bb788c932647bf077dd0be62114bb52dd707d5fd | saimonsaret/Homework | /1 course, 2 semester/1/2/2.cpp | C++ | cpp | 1,281 | no_license | #include <cstdio>
#include <iostream>
#include <string.h>
#include <math.h>
#include "calculator.h"
#include "stackTest.h"
using namespace std;
const int maxLength = 100000;
const double eps = 1e-9;
int main() {
StackTest test;
QTest::qExec(&test);
printf("Enter your expression:\n");
char *expression = new cha... |
91e3c8d360288d94cdce2b33301d1e7302415911 | d2ec28648a96acfd83328f33beae76d55adeadfa | Ziad-M/Circuit_Simulation | /AddNORgate2.cpp | C++ | cpp | 1,016 | no_license | #include "AddNORgate2.h"
#include "/Circuit_Simulation-master/ApplicationManager.h"
AddNORgate2::AddNORgate2(ApplicationManager* pApp) :Action(pApp)
{
}
AddNORgate2::~AddNORgate2(void)
{
}
void AddNORgate2::Execute()
{
//Get a Pointer to the user Interfaces
UI* pUI = pManager->GetUI();
//Print Action Message
p... |
1571856434181934533ce771ae64387b03525a7f | bdbd6fbdeaea42463e9520ce67f405c3dc7a28d7 | shreyaa14/CS-1202 | /kaprekar_nos.cpp | C++ | cpp | 1,053 | no_license | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int digits(int p){
int count=0;
while(p){
p=p/10;
count++;
}
return count;
}
int half(int a){
int len=digits(a);
int i=0;
int h=0;
while(i<=(len/2)){
int p=0;
int num=a%10... |
1f4110c73f7dab32e17c13f9a4e6e44b108ee696 | aa59fc7cf4d6f9c6e8fae59b0668bf2d9f24d7c1 | PramodShenoy/Competitive-Coding | /Hackerrank/wcs/game_of_stones.cpp | C++ | cpp | 582 | no_license | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
long long n;
cin>>n;
long long arr[n];
long long sum,m=-1;
long long i,j;
for(i=0;i<n;i++)
cin>>arr[i];
sum=arr[0];
for(i=2;i<=(n/2);i++)
{
sum=arr[0];
if(n%i==0)
{
long long x = i;//3
long long y = n/i;//3
... |
c2425cf9f05f4f6288ccdc307f4e1ffef719bb0d | c9eaa357c1ea2046540837642a0c8b8f9cf61af1 | ivan-kits/skia-opengl-emscripten | /src/chromium/gen/gen_combined/third_party/blink/renderer/bindings/core/v8/v8_animation_playback_event.cc | C++ | cc | 12,115 | 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.
// This file has been auto-generated from the Jinja2 template
// third_party/blink/renderer/bindings/templates/interface.cc.tmpl
// by the script code_gen... |
56ce2f7d403c3524d802f26dd7fb9254fcce72a6 | 3a82eb21f84726a6691c51c2b905199268f657ca | mattparks/Serial | /src/NodeFormat.hpp | C++ | hpp | 3,345 | permissive | #pragma once
#include <codecvt>
#include <sstream>
#include "NodeView.hpp"
namespace serial {
/**
* @brief Class that represents an abstract node format parser and writer.
*/
class NodeFormat {
public:
class Token {
public:
Token() = default;
Token(NodeType type, std::string_view view) :
type(type),
vi... |
84ce8e792320977e1a4943bb3c229de9458d99f7 | ff8e944970c8893a6443d845e6a6d7374be92cea | tongxingwy/chromium-1 | /net/quic/quic_protocol.cc | C++ | cc | 21,999 | 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 "net/quic/quic_protocol.h"
#include "base/stl_util.h"
#include "net/quic/quic_utils.h"
using base::StringPiece;
using std::map;
using std::... |
deb395a037559802d1c7dc0a6d06373fe199f20f | c31f0fc5cf3b21d20a01562b83a8d6dced79ac19 | arthurChennetier/R-Type | /Game/Behaviours/BulletBehaviour.hpp | C++ | hpp | 671 | permissive | //
// Created by chauvin on 26/01/18.
//
#ifndef GAME_BULLETBEHAVIOUR_HPP
#define GAME_BULLETBEHAVIOUR_HPP
#include "../GameEngine/Behaviour/Behaviour.h"
namespace TacosEngine
{
class BulletBehaviour : public TacosEngine::Behaviour
{
public:
BulletBehaviour(const std::string &name, const std::shared_ptr<... |
3682f9d3a8245e9333a3e47517911f9394dcc288 | 39f004870ff930a9a3bd15fc2e3d91f1dc9bcc70 | mikeadkinsibotta/IntegratedRoutingAdmissionControl | /libraries/HeartBeatProtocol/Neighbor.cpp | C++ | cpp | 4,389 | no_license | #include "Neighbor.h"
const uint8_t MOVING_AVERAGE_SIZE = 5;
Neighbor::Neighbor() {
address = XBeeAddress64();
nextHop = XBeeAddress64();
dataRate = 0;
seqNum = 0;
qualityOfPath = 0;
neighborhoodCapacity = 0;
routeFlag = false;
sinkAddress = XBeeAddress64();
relativeDistance = 0;
packetLoss = 0;
relativeDis... |
6919d533fc4bec424abec9deb621e24358ca76fd | 3d8bfb25bdc5be2e4fa3f79ac41ef41e0199c2d3 | Tiffanylqc/Online-Judge-Solutions | /goldgach's conjecture 2262.cpp | C++ | cpp | 918 | no_license | #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <string>
using namespace std;
#define MAXVALUE 1000000
bool isPrime[MAXVALUE];
void Sieve(){
memset(isPrime,true, sizeof(bool)*MAXVALUE);
for(int i=2;i*i<MAXVAL... |
1796b91b8d20c7ac04c6332082a7adaa016b22bf | 6fa9193620104ec6147a82a2c8eea8dd48ea35a4 | JBMurray6/SerialToAD7124-8 | /AD7124-8.cpp | C++ | cpp | 19,724 | no_license | ///**
//* @file AD7124.cpp
//* @brief Source file for AD7124 ADC
//* @author Analog Devices Inc.
//*
//* For support please go to:
//* Github: https://github.com/analogdevicesinc/mbed-adi
//* Support: https://ez.analog.com/community/linux-device-drivers/microcontroller-no-os-drivers
//* Product: http://w... |
192c8094e7b6d05e7917d4de78570167a5256666 | fdd7f044709c45bc6f04893d6e759759b62d6783 | karajensen/wgtf | /src/core/lib/core_serialization/resizing_memory_stream.cpp | C++ | cpp | 2,317 | permissive | #include "resizing_memory_stream.hpp"
#include <cstring>
#include <algorithm>
#include <utility>
namespace wgt
{
ResizingMemoryStream::ResizingMemoryStream() : buffer_(), pos_(0)
{
}
ResizingMemoryStream::ResizingMemoryStream(Buffer buffer) : buffer_(std::move(buffer)), pos_(0)
{
}
ResizingMemoryStream::ResizingMemo... |
925c8ca22072b7c628bf0a8a6c2ac9548daf1a34 | a5aaa51f07f3b394545b5a4168f8946d87e18f5b | nthatte/VisionProject | /vfhsLibSearch/src/rotObj.cpp | C++ | cpp | 5,284 | no_license | #include <pcl/point_types.h>
#include <pcl/point_cloud.h>
#include <pcl/PolygonMesh.h>
#include <pcl/io/pcd_io.h>
#include <pcl/io/io.h>
#include <pcl/io/ply_io.h>
#include <pcl/io/vtk_lib_io.h>
#include <pcl/ros/conversions.h>
#include <pcl/features/vfh.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/co... |
43e9e48b65a79c9a34d3792a54547edb2d825eb3 | 5fbc74bbfaf763d73ff1f1763da00842996c76ff | stefanhendriks/Dune-II---The-Maker | /timers.cpp | C++ | cpp | 509 | no_license | #include "timers.h"
#include <allegro/base.h>
/**
Timers lib specific implementations
**/
/** FPS timer **/
void allegro_timerseconds() {
allegro_timerSecond = allegro_timerSecond + 1;
}
END_OF_FUNCTION(allegro_timerseconds);
/** Global timer **/
void allegro_timergametime() {
allegro_timerGlobal = allegro_time... |
d856f24ca413d59bfc27bef9e807a98aeda931a8 | bb2d9accb2d333f226013d58050b88da4ddb1171 | CoderStellaJ/CG2271-Operating-System | /Lab3&4&5&6/test.cpp | C++ | cpp | 44,600 | permissive | ///////////// Lab 5 Try Version 1/////////////////////////////////////
/**
* CG2271 Lab 6 - C.A.R.T.O.S. (Car And RTOS)
* @author Justin Ng, Lim Hong Wei, CEG2 2017
*/
//#include <Arduino.h>
//#include <avr/io.h>
//#include <FreeRTOS.h>
//#include <task.h>
//#include <queue.h>
//
//#define STACK_SIZE 100
//#define ... |
78f16a86eb11d7c1a9d6fe876fe75990bf879f2d | 2e9829c00e76173229c8c1daf7462d41c53f2ad6 | fastbuild/fastbuild | /Code/Core/Network/TCPConnectionPool.cpp | C++ | cpp | 42,775 | permissive | // TCPConnectionPool
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
#include "TCPConnectionPool.h"
// Core
#in... |
c28cd321079c1465eb087905b72ef17e9ec978ff | fa673af5a72cf19bb574e2ec9ed031b29d32079d | Robadob/FGPU_ACS | /examples/PedestrianNavigation/src/visualisation/CustomVisualisation.cpp | C++ | cpp | 6,761 | permissive | /*
* Copyright 2011 University of Sheffield.
* Author: Dr Paul Richmond
* Contact: p.richmond@sheffield.ac.uk (http://www.paulrichmond.staff.shef.ac.uk)
*
* University of Sheffield retain all intellectual property and
* proprietary rights in and to this software and related documentation.
* Any use, reproduct... |
cd8b51cc796a65a015efc99f86ba3c583d814aa9 | 619a32a58dd4a568724148e3303264e55b2ab26c | Peter-Zheng-Sp/STL | /06_algorithms/10_other_algo/08_find_first_of.cpp | C++ | cpp | 1,435 | permissive |
/*
* Date:2021-08-20 17:49
* filename:08_find_first_of.cpp
*
*/
/*
* 以[frist2, last2)区间内的某些元素作为查找目标,寻找它们在[first1, last1)区间内的第一次出现地点
* 假设我们希望找出字符序列synesthesia的第一个元音,我们可以定义第二序列为aeiou
* 此算法会返回一个ForwardIterator,指向元音序列中任一元素首次出现于第一序列的地点,此例将指向字符序列的第一个e
* 如果第一序列并未内含第二序列的任何元素,返回的将是last1.
* 本算法第一个版本使用元素型别所提供的equality... |
cd19f502384ad13ddab452cadf7f53b22540eeee | ee2e447a56cc1e65d646864002e807d849086852 | TJFord/sard | /USER-OMP/pair_table_omp.cpp | C++ | cpp | 6,333 | no_license | /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
This software is distributed under the GNU General Public License.
See t... |
a555b4e8a7bbac7ffe54a8b0d4cafe0423c76abf | a0da712e0aba330b10d7cf5112c6a660f488752a | girishlande/CPlusPlus | /exercise_solutions/12MapWithCustomObjects.cpp | C++ | cpp | 879 | no_license | #include <iostream>
#include <map>
using namespace std;
class Student {
int mroll;
string mname;
public:
Student(int roll, string name)
: mroll(roll)
, mname(name)
{
}
int roll()
{
return mroll;
}
string name()
{
return mname;
}
bool ope... |
4e34870b79b9f6b26a9c3045d40a2915c95332c0 | 1202f5030952d418db4c7e297e6824654d43fa62 | marco-c/gecko-dev-wordified | /third_party/jpeg-xl/lib/jpegli/decode_marker.cc | C++ | cc | 20,894 | permissive | /
/
Copyright
(
c
)
the
JPEG
XL
Project
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
"
lib
/
jpegli
/
decode_marker
.
h
"
#
include
<
string
.
h
>
#
include
"
lib
/
jpegli
/
common
.
h
"
#
include
"
lib
/
jpegl... |
b6416de12630c77af65de0e5c975697da5598ece | 50eae4c2e2a17dc5005995b46a1c4fd57570eb7e | mincoin-project/mincoin | /src/version.cpp | C++ | cpp | 2,630 | permissive | // Copyright (c) 2012-2017 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 <string>
#include "version.h"
// Name of client reported in the 'version' message. Report the same name
// for both ... |
e1e129d2413a0a03e77a8b969cf3eba62d25b5b4 | 2c36712283fde0ae94bf4aae0400f8a4622cba9b | bneveu/tubex-vnode | /vnode_tubex/tubex_CtcVnodelp_bkp.cpp | C++ | cpp | 11,897 | no_license |
Interval domain(0.,10.);
TubeVector x(domain, 1);
IntervalVector v(1);
double init = exp(-10);
v[0]=Interval(init);
x.set(v, 10.); // ini
double eps=02;
/* =========== SOLVER =========== */
Vector epsilon(1, eps);
tubex::Solver solver(epsilon);
// solver.set_refi... |
a2a8e329a3d2dca95c087e53d032882c3d001294 | 03d1e88dc75160bb3f27055114a7355328d75b72 | 3F/FlightSDC.RPC-WebSockets | /windows/CDMDebugFrame.cpp | C++ | cpp | 5,475 | no_license | #include "stdafx.h"
#include "../client/DCPlusPlus.h"
#include "Resource.h"
#include "CDMDebugFrame.h"
#include "WinUtil.h"
#include "../client/File.h"
#define MAX_TEXT_LEN 131072
LRESULT CDMDebugFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
ctrlPad.Create(m_hWnd, rcDefault,... |
f840de5604a3f4424a156ce4a2e03044c11c9f7b | b97179107cdd9251fbd3ca012bc32f0a817c5ade | bssrdf/openswr-mesa | /src/gallium/drivers/swr/rasterizer/jitter/builder.cpp | C++ | cpp | 2,632 | no_license | /****************************************************************************
* Copyright (C) 2014-2015 Intel Corporation. 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 Soft... |
3b92c5a83b9171dd935af1fff1554440835b2c08 | 14560481b3ccbcbabde4a05f5bc0900ce13b2fb4 | jbaream/TTGOT5V23Tools | /src/TerminalManager.cpp | C++ | cpp | 3,481 | no_license | #include "TerminalManager.hpp"
#include "DisplayManager.hpp"
TerminalManager::Line::Line(void) {
next = nullptr;
prev = nullptr;
buffer = nullptr;
width = 0;
}
TerminalManager::Line::~Line(void) {
if (buffer)
delete[] buffer;
}
void TerminalManager::Line::alloc(const size_t size) {
... |
f442717853e25198f5bc9ecb6940e6349da4fa3d | a73757afbb6666e5c195155d9b1d0e7c4412833f | sumitkaushik1005/coding | /graph/almrow.cpp | C++ | cpp | 878 | no_license | #include<bits/stdc++.h>
using namespace std;
vector<int> adj[10001];
int dis[10001][10001];
int main(){
int t;
cin>>t;
while(t--){
int nodes,edges;
cin>>nodes;
cin>>edges;
for(int i=0;i<=nodes;i++){
for(int j=0;j<=nodes;j++){
if(i==j){
dis[i][j]=0;
}
else
dis[i][j]=INT_MAX/2-2;
}
... |
40c512ea5c1b19b443162903ced455474e48a516 | 90451037810077aafc0cd73aca98b179fe0998ca | drawliphant/Standard-Dictionary | /GenericDictionary/Testing/DictionaryTester.cpp | C++ | cpp | 2,800 | no_license | //
// Created by drawl_000 on 4/4/2017.
//
#include "DictionaryTester.h"
#include "../Dictionary.h"
DictionaryTester::DictionaryTester(){
}
bool DictionaryTester::testConstructors(){
//test int constructor
Dictionary<int,int> test(10);
test.add(10,20);
test.add(20,30);
test.add(30,... |
da966f8f6552c695faa181ef431a0d109c7b1138 | 567c287be40f998ec28b91f0812f552ddede3207 | Trailblazer01010111/chromium | /net/third_party/quic/core/quic_crypto_stream.cc | C++ | cc | 8,780 | 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 "net/third_party/quic/core/quic_crypto_stream.h"
#include "net/third_party/quic/core/crypto/crypto_handshake.h"
#include "net/third_party/qu... |
7a8cd5e9dafdfe0a704e8b772e6b34ba4e90cc5a | d670a94cd590c0118d57da23a8b2156d53a6dfdb | waebbl/LuxCore | /src/slg/materials/mixmat.cpp | C++ | cpp | 13,767 | permissive | /***************************************************************************
* Copyright 1998-2018 by authors (see AUTHORS.txt) *
* *
* This file is part of LuxCoreRender. *
* ... |
ec58048d6155f4337b01e226e21311423d99ce9b | 504d26d2becc53614278eda0840599b91ed514ee | LuisaKristen/2019-Uni | /NWEN241_A4/files/lldb.hh | C++ | hh | 2,053 | no_license | #include "dbms2.hh"
#include <iostream>
using namespace std;
using namespace dbms2;
namespace dbms2{
struct node {
movie data;
struct node *next;
};
class LinkedListDbTable : public AbstractDbTable{
private:
struct node *head;
public:
LinkedListDbTable(); // constructor... |
5afb3e1b692d61c92278cf827bc8ed74981c74c7 | 274c810cacb54418aa57b206d6528bf4b92f585a | chungthaidung/MarioBros | /Project1/Coin.cpp | C++ | cpp | 1,674 | no_license | #include "Coin.h"
#include "CGame.h"
void Coin::Render()
{
int ani = COIN_ANI;
float cx = CGame::GetInstance()->GetCurrentScene()->GetCamera()->position.x;
float cy = CGame::GetInstance()->GetCurrentScene()->GetCamera()->position.y;
CAnimations::GetInstance()->Get(ani)->Render(x-cx, y-cy);
RenderBoundingBox();
}
... |
b12ee2bad912e868e37e2136daa2aa46c1dd4d12 | e413572d35fae4c18d219c4fed25ef3ff33a2f98 | chkob/forked-blaze | /blazetest/src/mathtest/dmatdmatmax/MDbDDa.cpp | C++ | cpp | 4,013 | permissive | //=================================================================================================
/*!
// \file src/mathtest/dmatdmatmax/MDbDDa.cpp
// \brief Source file for the MDbDDa dense matrix/dense matrix maximum math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// This file is... |
ccb847d0a0b8bafc6d41d90e9016feca7122a06c | 8bf50719d993caadc8400b800f655552c84895b0 | i582/simple-paint-sdl2 | /simple-paint-sdl2/simple-paint-sdl2/simple-paint-sdl2/modules/window/types/new_doc/WindowNeDocument_user_events.cpp | C++ | cpp | 573 | permissive | #include "WindowNewDocument.h"
#include "../../../editor/editor.h"
void NewDocumentWindow::handleUserEvents(Event* ev)
{
switch (ev->common.caller)
{
case BUTTON:
{
if (ev->common.object_id == BUTTON_CREATE &&
ev->common.action == BUTTON_RELEASED)
{
int width = atoi(controls.at(INPUT_WIDTH)->get_valu... |
09613898f39db1bd83dd2195b10b2540d56600e6 | 71605486f18a744479882d2ddb639de44e8170f9 | Kawser-nerd/CLCDSA | /Source Codes/AtCoder/abc096/B/3178784.cpp | C++ | cpp | 686 | no_license | #include <stdio.h>
#include <cstdio>
#include <vector>
#include <iostream>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort... |
ce1cf79058e8451ca875dfc76e0a5b2729119307 | 3f9825a761d5f2475038956c3e3a1a6cbac5a94b | lukaszkurantdev/Object-Oriented-Programming | /8. 19 kwiecień 2018/zad3.cpp | C++ | cpp | 688 | no_license | #include <iostream>
#include <cmath>
using namespace std;
class Polygon {
public:
virtual circ() = 0;
};
class Triangle {
private:
double x, y;
public:
Triangle(double x, double y){
this->x = x;
this->y = y;
}
double circ() {
double c = sqrt(x*x + y*y);
return c + ... |
6a8547845f1b842967e9f7011ded78824e240ae0 | dd6f955aaf3fd685f8bcb2d6b2bfef5123b65b47 | rocdat/OPS | /apps/c/CloverLeaf_3D_HDF5/OpenACC/advec_cell_kernel1_zdir_openacc_kernel.cpp | C++ | cpp | 10,794 | no_license | //
// auto-generated by ops.py
//
#include "./OpenACC/clover_leaf_common.h"
#define OPS_GPU
extern int xdim0_advec_cell_kernel1_zdir;
int xdim0_advec_cell_kernel1_zdir_h = -1;
extern int ydim0_advec_cell_kernel1_zdir;
int ydim0_advec_cell_kernel1_zdir_h = -1;
extern int xdim1_advec_cell_kernel1_zdir;
int xdim1_advec_... |
751c6ff2c8cf895fa1e0915c5c3c9326771f87e6 | 6c073d4d5e415574b06faa551dd113c30ebb003b | dyu/rocksdb | /db/db_impl_debug.cc | C++ | cc | 4,842 | permissive | // Copyright (c) 2013, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
// Copyright (c) 2011 The... |
cc0ef7c93a78903c6862e6bdf9c37f0f6822ad44 | 9862611d164b59d899c0f7fe6f9f39a2c90e43df | ArighnaIITG/DS-AL | /Algorithms/Dynamic Programming/Memoized_Fibonacci.cpp | C++ | cpp | 1,105 | no_license | /*
Memoization
===========
It is also called Top-Down Approach. The memoized program for a problem
is similar to the recursive version with a small modification that it looks
into a lookup table before computing solutions. We initialize a lookup array
with all initial values as NIL. Whenever we need solution ... |
2e6e2311201abfb16c38046bbc7ebcdf90cf970c | 60b53a59a5323b75c0e6f9fda97a8a054c957e87 | FirStSmaN/RTS | /Source/RTS/Private/UI/HealthBarWidget.cpp | C++ | cpp | 455 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "UI/HealthBarWidget.h"
#include "Components/ProgressBar.h"
void UHealthBarWidget::SetHealthPercent(float Percent)
{
const auto HealthBarVisibility = (Percent > PercentVisibilityThreshold || FMath::IsNearlyZero(Percent)) ? ESlat... |
b99fb330270e30f225c0fbb407d4177355135406 | 04ff2d0f6692d5287ef6bb2b04a59b0d65662cfa | flamingfox/Gamagora_TP2_3D | /terrain/terraintab.cpp | C++ | cpp | 5,239 | no_license | #include "terrain/terraintab.h"
TerrainTab::TerrainTab(const TerrainTab& copy):
height(copy.height), width(copy.width), amplitude(copy.amplitude), hauteurMin(copy.hauteurMin), hauteurMax(copy.hauteurMax)
{
longueur = copy.longueur;
largeur = copy.largeur;
box = copy.box;
grille = new floa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.