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 |
|---|---|---|---|---|---|---|---|---|
87920e69b157479f4835588da478193a4bf314b1 | e8ebbca38fa05ae53976ba93c65e05bb6f9459c5 | Vadya44/Summer-Practice | /Day 1/Task2.cpp | C++ | cpp | 1,280 | no_license | /*
* Создать массив длины N(вводится с клавиатуры).
* Переместить все нули в конце массива.
*/
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int N;
cout << "Enter N:" << endl;
cin >> N;
int *arr = new int[N];
cout << "Array is:" << endl;
for(int i = 0; i < N... |
5ec0ded81e62e93500ab7b67924a221de89b3278 | 835edeafb53aa4bbfc49b7e00d77f54f438ebf20 | praneethgb/ProjectEuler | /Project Euler 25.cpp | C++ | cpp | 285 | no_license | #include<iostream>
#include<cmath>
using namespace std;
double phi=(1+sqrt(5))/2;
double c=log10(5)/2;
int main()
{
int n=1;
while(1)
{
if(n*log10(phi)-c>=999)
{
cout<<n;
return 0;
}
n++;
}
}
|
a146708d2aed19adcfb307fc17f43bb5be793520 | d271c3967572d1322e2282d53610dc80dbfbe116 | kingking888/Viking-Wpt | /main.cpp | C++ | cpp | 5,733 | permissive | //==============================================================================
// main.cpp
//==============================================================================
//==============================================================================
#include <windows.h>
#include <tlhelp32.h>
#include "apihook.h"... |
08b7b16ca755b2f320fb8389fb133547795d0908 | 7d430ef061ab4c255eedbbd5e79445de7ab3e858 | greedyDorimi/My-Implementations | /DSU.cpp | C++ | cpp | 905 | no_license | vector<int> parent(300005, 0);
vector<int> ranks(300005, 1);
void build(int A) {
for(int i = 1; i <= A; i++) {
parent[i] = i;
}
}
int find_parent(int node) {
if(parent[node] == node)return node;
return parent[node] = find_parent(parent[node]);
}
void merge(int node1, int node2) {
if(rank... |
30bcb7df7d0717fca0e8ea8bc2a7c730b9f94218 | 407a88ede70216ed969ed6755058d0a8435345b4 | zhanglq79/GameLib | /LibCore/MsgLib/msg/GameMsgProcess.cpp | C++ | cpp | 593 | no_license | #include "GameMsgProcess.h"
#include "MsgDefine.h"
namespace Game
{
INT32 GameMsgProcess::Process(Net::ISession * pSession , UINT32 unMsgID, const char* pBuffer, UINT32 unLength)
{
using namespace ::Net::accsrv;
if(!IsAccept(unMsgID))
return -1;
switch(unMsgID)
{
case 1:
{
CSLogin objProto... |
1a60da3f2fffe171f7d2289a8ea74194c6244a21 | a4dc69f17c864092fe8aa8a46b2dc1397248309e | hilockman/study-notes | /cplusplus/code/src/bpadic/main.cpp | C++ | cpp | 3,574 | permissive | #include <iostream>
#include <string>
#include "BpaDictData.h"
#include "BpaMemDBTable.h"
#include <locale>
#include <QCoreApplication>
#include <QtDebug>
#include <hash_map>
#include <QHash>
#include <QString>
#include <strstream>
#include "bpacards.h"
#include "timecount.h"
#include <QTextStream>
void matchColu... |
a7e6380e77ab933614990c455e7f96a1dc0a4201 | d4a5742c34eebb71a75212cce954e9deddb3c8d3 | queeniexiang/CS32_GH | /Project1/Project1/Arena.cpp | C++ | cpp | 5,165 | no_license | //Arena.cpp
#include <iostream>
#include <cstdlib>
#include "Arena.h"
#include "Player.h"
#include "Zombie.h"
#include "globals.h"
#include "History.h"
using namespace std;
///////////////////////////////////////////////////////////////////////////
// Arena implementations
/////////////////////////////////////////... |
6f9a1c56a30138479135a2d70a0ca2e4fae3b522 | 5f9793d7839c7650f4893fc5507391e9a563f586 | JGooch95/CGPRobot | /Coursework 1/src/Collectable.cpp | C++ | cpp | 1,526 | no_license | #include "Collectable.h"
#include <iostream>
#include <fstream>
Collectable::Collectable()
{
m_fBounceSpeed = 0.01f; //Sets the default bounce speed
m_fBouncePos = 0.0f; //Sets the default bounce position
}
void Collectable::animate()
{
if (!m_bCollected) //If the collectable hasn't been picked up
{
m_fBounceP... |
c9ebd071cb4ef61c6fd53df9e1ae50501b4b464a | b8f9303fb178b946734bb73d5560b28f6eb78d5c | mode777/magnum | /src/Magnum/Vk/Implementation/DriverWorkaround.cpp | C++ | cpp | 5,198 | permissive | /*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020, 2021 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "... |
49de6d1ee542b789acc69cd2f5c1cd924e5f8f9c | ab7afefeb293537770b3ded9742fc30adf30e8a0 | mitchBlock/Shugerman_CSCI2270_FinalProject | /prefixDictionary.cpp | C++ | cpp | 1,928 | no_license | #include "prefixDictionary.h"
#include <iostream>
#include <string>
using namespace std;
prefixDictionary::prefixDictionary()
{
root = NULL;
}
prefixDictionary::~prefixDictionary()
{
delete root;
}
void prefixDictionary::addWord(string word)
{
node* z = new node;
z->word = word;
z->l = NULL;
... |
b04fede94d01538f3aa98cfcb66859748cdcfbf2 | ab0a38b514da288027d5dca70a17e25b9ed63c55 | ives560/InverterController | /chart.cpp | C++ | cpp | 6,286 | no_license | #include "chart.h"
Chart::Chart(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
enpaint=false;
x_axis.id = X;
y_axis.id = Y;
CoordDataInit();
setAxis(Chart::X,0,24,6,"");
setAxis(Chart::Y,0,100,5,"");
}
Chart::~Chart()
{
}
void Chart::CoordDataInit()
{
origin=... |
849603918daeba2bdaaf850f4a2a35e205d5ddb0 | b2a82855e12d6bbec6ec65db98eade70ac3739ef | Andycheng0614/Algorithm-in-Team-Learning | /第一讲/桶排序/code/main.cpp | C++ | cpp | 668 | no_license | #include <iostream>
#include <vector>
#include <time.h>
#include "GenRandN.h"
#include "BucketSort.h"
#include "IsOrder.h"
using namespace std;
const int N(200000); // 定义常数
const int maxNum(0x7FFFFFFF); // 定义常数
int main()
{
vector<int> dataA(N, 0);
GenRandN(&dataA[0], N, maxNum); // 产生随机数组
clo... |
06af5e4744795c35e20b8d4594da799a2780660f | b9ebc22636cc5026b97dc2008eb7c79fe5d64f20 | zjin-lcf/HeCBench | /bfs-omp/bfs.cpp | C++ | cpp | 7,033 | permissive | #include <cstdlib>
#include <iostream>
#include <string>
#include <cstring>
#include <cstdio>
#include <chrono>
#include <omp.h>
#include "util.h"
#define MAX_THREADS_PER_BLOCK 256
//Structure to hold a node information
struct Node
{
int starting;
int no_of_edges;
};
//-----------------------... |
af47bef40f5388e24c08f06b47ee7b3a00313ede | 2896af7fcbcdf24e9c29ed572a79a5473d3db916 | cmaestre/baxter_kinematics | /src/services/restart_robot_service.cpp | C++ | cpp | 4,465 | no_license | #include "../../include/baxter_kinematics/lib_movement.hpp"
#include "baxter_kinematics/RestartRobot.h"
#include "baxter_kinematics/GripperAction.h"
//call back that register baxter left end effector pose and rearrange the orientation in RPY
void left_eef_Callback(const baxter_core_msgs::EndpointState::ConstPtr& l_ee... |
cc3a0ecc511b8269d6821445a97b3150ab44d11e | dfa4dcd0fac59b0cf808a6df86991ebfa03a58a0 | xiegegege/Paddle | /paddle/fluid/operators/collective/c_wait_comm_op.cc | C++ | cc | 3,115 | permissive | /* Copyright (c) 2021 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 by applicable law or... |
db00ee8f06389ee931ac785fefa4f13dde8c64d6 | a41adc451d930efcf6e6522c037f98e3dd0c2fab | brecky/srs | /trunk/src/app/srs_app_source.cpp | C++ | cpp | 71,793 | permissive | /**
* The MIT License (MIT)
*
* Copyright (c) 2013-2017 OSSRS(winlin)
*
* 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
... |
4b5c6cefef75634bfba37b59ebed37d161ddb4bb | 85bbb6a9a8d2671919e06a1db6d80779ff64bc2c | crosswalk-project/chromium-crosswalk-efl | /sync/internal_api/attachments/attachment_service_impl_unittest.cc | C++ | cc | 20,333 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sync/internal_api/public/attachments/attachment_service_impl.h"
#include "base/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/message... |
b84fff9061d47c96a626b30481ff44bdcaeec583 | 77c08ce3b97f7f1459289c351d90c154b7121251 | LIMXTEC/BitSend | /src/test/blockencodings_tests.cpp | C++ | cpp | 14,709 | permissive | // Copyright (c) 2011-2018 The Bitsend Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <blockencodings.h>
#include <consensus/merkle.h>
#include <chainparams.h>
#include <pow.h>
#include <random.h>
#inc... |
a494ce66ab01f68b083d62a48bd3108c1c8f3db9 | 9c05ed34a5d935f4699932f1f7c4d31de9b1d816 | AjayTalati/simbody | /SimTKcommon/tests/TestArray.cpp | C++ | cpp | 39,935 | permissive | /* -------------------------------------------------------------------------- *
* Simbody(tm): SimTKcommon *
* -------------------------------------------------------------------------- *
* This is part of the SimTK biosimulation toolkit originating from *
... |
425e40bb0d2509b07372dda88e999061558a4403 | 7be8d4d917632b2dec77f38cc167e21ee0f8607a | fjtapia/countertree_2.0 | /benchmark_cnc/VC++/benchmark_map_cnc_01.cpp | C++ | cpp | 5,155 | no_license | //----------------------------------------------------------------------------
/// @file : benchmark_map_cnc_01.cpp
/// @brief Test program of the class countertree::map
///
/// @author Copyright (c) 2010 2012 Francisco José Tapia (fjtapia@gmail.com )\n
/// Distributed under the Boost Software License, Vers... |
71c326598eef80afe8ea397a931dc34dd033d02b | 2c2e02aea34c4af8b43517900e409516d16b7fda | pj-ming/IBAMR | /tests/IBFE/zero_exterior_values.cpp | C++ | cpp | 3,496 | no_license | // ---------------------------------------------------------------------
//
// Copyright (c) 2020 - 2020 by the IBAMR developers
// All rights reserved.
//
// This file is part of IBAMR.
//
// IBAMR is free software and is distributed under the 3-clause BSD
// license. The full text of the license can be found in the f... |
0c7ed91780c8f87d8f0253579f8972d8a6b4f6c4 | 5c3fdf7991552d1bff8a9c42425dff52d16f5eb4 | killinux/riscv-isa-sim | /riscv/execute.cc | C++ | cc | 3,202 | permissive | // See LICENSE for license details.
#include "processor.h"
#include "mmu.h"
#include <cassert>
static void commit_log_stash_privilege(state_t* state)
{
#ifdef RISCV_ENABLE_COMMITLOG
state->last_inst_priv = state->prv;
#endif
}
static void commit_log_print_insn(state_t* state, reg_t pc, insn_t insn)
{
#ifdef RISCV... |
5c7a5632a30039ec9d5e2800101eccfb599e13ed | c412ea98c57fd9a1828b1361d8516bb8b3e241c2 | renzhengeek/granary | /clients/watchpoints/clients/null/tests/test_random.cc | C++ | cc | 1,708 | permissive | /* Copyright 2012-2013 Peter Goodman, all rights reserved. */
/*
* test_random.cc
*
* Created on: 2013-05-01
* Author: Peter Goodman
*/
#include "granary/test.h"
#if CONFIG_DEBUG_RUN_TEST_CASES
#include "clients/watchpoints/clients/null/instrument.h"
#include "clients/watchpoints/clients/null/tests/pp.h"
... |
5176d923030bea744f02279bde9279162fdff850 | c92ee3ef19883c670eec6db3ca3165db5577e0ba | xibeilang524/programming-c-cpp-learning | /file/read_file.cpp | C++ | cpp | 381 | no_license | /*
读取文件信息
*/
#include <iostream>
#include <fstream>
using namespace std;
int main() {
char data[100]; // for read data
ifstream infile;
infile.open("afile.dat");
cout << "read data from file." << endl;
infile >> data; // terminate when hit an white character
cout << "file content: " << da... |
7c9a23d8986e2e6e9edf54fd8d799681da3bddf0 | b56dbc8e629cfd659926256a79157315a782fb0b | keflavich/casa | /code/synthesis/TransformMachines/MosaicFTNew.cc | C++ | cc | 7,567 | no_license | //# Mosaicft.cc: Implementation of MosaicFTNew class
//# Copyright (C) 2016
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either... |
c4b9606d81ed5512cb96291b037e00a48a44c2c4 | 5399e6e37807c1b61dc9fd9e271fc57f4e52e1ff | hashemirafsan/codeforces | /translation.cpp | C++ | cpp | 423 | no_license | #include <iostream>
#include <ctype.h>
using namespace std;
int main() {
string S,t;
char c,u;
int a = 0;
cin >> S;
cin >> t;
for(int i = S.size() - 1; i >= 0; i--) {
c = S[i];
u = t[S.size() - (i+1)];
if(islower(c) == 2 && c == u) {
a++;
}
}
i... |
812ba5436d5d7350fb8261f2a0b5bebaa814c182 | 77adcfcb83eee774dd7688f5766ff6c7f1b35204 | myriadcoin/myriadcoin | /src/wallet/test/wallet_tests.cpp | C++ | cpp | 20,884 | permissive | // Copyright (c) 2012-2019 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 <wallet/wallet.h>
#include <memory>
#include <set>
#include <stdint.h>
#include <utility>
#include <vector>
#inclu... |
061f933046940a0cb911b18f0e8c4651f87e0d4c | 49d4c4deee44abae55dbfe50e2b2520e727e7945 | junxzm1990/ASAN-- | /testcases/juliet_test_suite/testcases/CWE78_OS_Command_Injection/s08/CWE78_OS_Command_Injection__wchar_t_file_w32_spawnv_84a.cpp | C++ | cpp | 2,336 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__wchar_t_file_w32_spawnv_84a.cpp
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-84a.tmpl.cpp
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: file Read input from a file
... |
55a4932b5a84732c78c2d1b47816e7fdc69eb2a8 | f154b2ea2c8319ea33d6d577beac0899a12402ed | sigman78/sobjectizer | /so_5/exception.cpp | C++ | cpp | 1,053 | permissive | /*
SObjectizer 5.
*/
#include <so_5/h/exception.hpp>
#include <sstream>
namespace so_5
{
//
// exception_t
//
exception_t::exception_t(
const std::string & error_descr,
int error_code )
:
base_type_t( error_descr ),
m_error_code( error_code )
{
}
exception_t::exception_t( const exception_t & o )
: base_t... |
f928fd29aefde8a251eb2aea962e30965c735c70 | d383b693c2459845d5ac8144bfdfd3511d27621d | KkyuCone/Direct3D_RPGPortfolio | /Direct3DEngine/Include/FontManager.cpp | C++ | cpp | 7,530 | no_license | #include "FontManager.h"
#include "Device.h"
ENGINE_USING
DEFINITION_SINGLETON(FontManager)
FontManager::FontManager() :
m_pWriteFactory(nullptr)
{
}
FontManager::~FontManager()
{
Safe_Release_Map(m_mapFont);
Safe_Release_Map(m_mapColor);
SAFE_RELEASE(m_pWriteFactory);
}
bool FontManager::Init()
{
// __uuidof... |
43567d3967ffb7fbc426fc4b48e1e5282db4b1b5 | 0026e25358e857ed818dc6143356568c66a5b891 | XeeMpee/arcanoid | /src/domain/entities/block/qblock.hpp | C++ | hpp | 556 | no_license | #pragma once
#include <QObject>
#include "domain/entities/i_sprite_decorator.hpp"
class QBlock : public QObject, public ISpriteDecorator
{
Q_OBJECT
private:
std::shared_ptr<ISprite> decoratedSprite_;
public:
QBlock() = default;
QBlock(std::shared_ptr<ISprite> sprite);
~QBlock() = default;
v... |
564f8c57a442dd1d0a17a98a2386643dcf442113 | c5f40d3f5057c9482966795cddaabae5a03d110e | emayk/scite-mql | /trunk/src/scintilla/scite/src/SciTEProps.cxx | C++ | cxx | 57,009 | permissive | // SciTE - Scintilla based Text Editor
/** @file SciTEProps.cxx
** Properties management.
**/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <ctype.h>... |
130120964db273ad4dfcdf0a50155d6dbb3f14d6 | bee4d2c304f5aae38fde13f8a7c066e073e36524 | gruppe-adler/Co_Leinapaeev.ruha | /USER/missionControl/cfgFunctions.hpp | C++ | hpp | 1,512 | no_license | class missionControl {
class client {
file = USER\missionControl\client;
class addModules { postInit = 1; };
class addPeeAction;
class addSmokeToCar;
class addSpawnMarker;
class curatorShowFeedbackMessage;
class decideOutro;
class doPee;
cla... |
ef7238aa8df957d8f1e73ddb6a04599a07f6b797 | 2745d66d796e984d3c5d4abc3e131349f0bcd444 | YeZhao/drake | /drake/examples/kuka_iiwa_arm/test_parse_json.cc | C++ | cc | 1,710 | permissive | #import <iostream>
#import "parse_json.h"
namespace drake {
namespace examples {
namespace kuka_iiwa_arm {
namespace {
int main(){
// TODO: test scientific notation in the parser
std::string nested_braces ="{{{}{{}{}}{}}{{}{}}{{}}}";
std::string nested_brackets ="[[[[][][]][][]]]";
std::string test_string = "... |
a81d7e87f684a9eff480330367d29dc917a8b4f5 | 34550634881e179d801c08bab3e2f1116fce1264 | Minssc/BJA | /old/2447.cpp | C++ | cpp | 561 | no_license | #include<iostream>
using namespace std;
char ARR[2200][2200];
void re(int x, int y, int n){
if(n==1){
ARR[y][x] = '*';
return;
}
int div = n/3;
for(int i=0; i<3; ++i){
for(int j=0; j<3; ++j){
if(i!=1 || j != 1)
re(x+(i*div), y+(j*div), div);
}
}
}
int main(){
cin.tie... |
85665327e66534830a1f028315f861fe25e535bd | 5b9ef2cc2d0cfa2c69d782f12f77901fd1d7f793 | Jabonija99/JabonilloJarone_Csc17b_48037 | /Homework/Assignment1/Chp3/build-spreadsheet-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/moc_finddialog.cpp | C++ | cpp | 5,691 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'finddialog.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.0)
**
** WARNING! All changes made in this file will be lost!
**********************************************************... |
521d38e64c345b20ed5f96698f63a9906bec34b6 | d6c621df7a6d0d3f2c82b7eaa579a430e28bfb52 | openharmony/ace_ace_engine | /frameworks/core/gestures/slide_gesture.cpp | C++ | cpp | 1,568 | permissive | /*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
0ab1b374d8d6965bdcc1e4302fa09fea781a1808 | 7413b98eb0b8cba66cac846784385bf32559bba4 | YaumenauPavel/Cocos2d-x-Snake | /cocos2d/cocos/base/ZipUtils.cpp | C++ | cpp | 22,043 | no_license | /****************************************************************************
Copyright (c) 2010-2012 cocos2d-x.org
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtain... |
d6dd5c483ebadf269727ada978a7aa7eb07a9053 | 5f8ca8e6c4afaea2ae24ce51e1a0102b73c7824b | nui-dali/dali-adaptor | /dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp | C++ | cpp | 9,900 | permissive | /*
* Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
38c34a47ef95bbd6ee6d03aa60288927563a7f98 | 29ba180010844221de468f604d31d1fdcf248d8a | eevans/squash-deb | /plugins/zpaq/squash-zpaq.cpp | C++ | cpp | 8,279 | permissive | /* Copyright (c) 2013-2015 The Squash Authors
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, me... |
03ba392f19224458a902bf6051347476cdb5b8be | 2cfc52c5aaada0d3fc29a15196f67b3ece30864e | huyuji/garden | /algorithms/wildcard_dobbs.cpp | C++ | cpp | 2,114 | no_license | // This function compares text strings, one of which can have wildcards
// ('*' or '?').
//
bool WildTextCompare(
char *pTameText, // A string without wildcards
char *pWildText // A (potentially) corresponding string with wildcards
)
{
// These two values are set when we observe a wildcard character. They
//... |
d548ce7551968e4d241f97f043841895b7ac7dd1 | 860e4bf5e9a3bd123167e3db00d993335e978194 | bbbradsmith/nsfplay | /nsfplug_ui/NSFMemoryWriteDialog.cpp | C++ | cpp | 2,469 | no_license | // NSFMemoryWriteDialog.cpp : インプリメンテーション ファイル
//
#include "stdafx.h"
#include "NSFMemoryWriteDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// NSFMemoryWriteDialog ダイアログ
NSFMemo... |
e090506c94e03f86ce8241e1858f51af929fb877 | 53bccd85cb294ade92b798b904b29ea7bcab89cf | walkccc/LeetCode | /solutions/2245. Maximum Trailing Zeros in a Cornered Path/2245.cpp | C++ | cpp | 2,314 | permissive | class Solution {
public:
int maxTrailingZeros(vector<vector<int>>& grid) {
const int m = grid.size();
const int n = grid[0].size();
// leftPrefix2[i][j] := # of 2 in grid[i][0..j]
// leftPrefix5[i][j] := # of 5 in grid[i][0..j]
// topPrefix2[i][j] := # of 2 in grid[0..i][j]
// topPrefix5[i][j... |
f767eeaf295f8444a752acfcc718c983f18c0fb2 | 9a5b1ae6bbb49a7afcc410be57463bdccdaa43e8 | mehulthakral/logic_detector | /backend/CDataset/hasCycle/hasCycle_46.cpp | C++ | cpp | 761 | no_license | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
class ListNode{
public:
ListNode* next;
int val;
};
bool hasCycle(ListNode *head)
{
if... |
e76b437a23e072a8df5f69c465ae60eefaeb5960 | 75526c1b55680252e18aaafece32283bb00bf298 | kalinathalie/WarBashHammer40K | /src/List.cpp | C++ | cpp | 12,847 | no_license | /**
*@file List.cpp
*@brief Arquivo com a implementação da lista
*/
#include "List.h"
#include "Card.h"
/**
*@brief Construtor
*/
List::List(){
this->First = nullptr;
this->Quantity = 0;
}
/**
*@brief Destrutor
*/
List::~List(){
}
/**
*@brief getter First elemento da lista
*@return primeiro el... |
6244078d88b5119f5658498c9d1e28029bcb6317 | d0f3e1ac9e5f060d84f4e960eaf74a3ccf542106 | ricklon/travelcv | /homography.cpp | C++ | cpp | 3,962 | permissive | #include <stdio.h>
#include <iostream>
#include "opencv2/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/nonfree/nonfree.hpp"
using namespace cv;
void readme();
/** @function main */
int main( int argc, char** argv... |
cb8ad19a4ccac5c9dceec9393904efb8d8d8dd5c | a831e763f1fed78ef350f4934b3495bcacb5c08f | CoderGeoff/BankingKataCplusplus | /FakeIt-2.0.1/include/fakeit/ActionSequence.hpp | C++ | hpp | 2,076 | permissive | /*
* ActionSequence.hpp
* Copyright (c) 2014 Eran Pe'er.
*
* This program is made available under the terms of the MIT License.
*
* Created on Aug 30, 2014
*/
#ifndef ActionSequence_hpp_
#define ActionSequence_hpp_
#include <vector>
#include "fakeit/DomainObjects.hpp"
#include "fakeit/ActualInvocation.hpp"
#i... |
c06991526cb9140b1b3c1f9d344fdc9e39d1455e | c873c90e2310c6fea5a83b3cba1c3df2fd6c6630 | ravi-dafauti/Algoritms | /DynamicProgramming/MinimumJupmsToReachEnd.cpp | C++ | cpp | 1,000 | no_license | /*Given an array of integers where each element represents the max number of steps that can be made forward from that element.
Write a function to return the minimum number of jumps to reach the end of the array (starting from the first element). If an element is 0, then cannot move through that element.
Example:
... |
c3fdd7a8e354b781e7d072aa11a62386a56916e5 | 1036442f616316837c8ae3da55d6b1c30f4b5faf | zzm99/Algorithm-Training | /数论/Soj 1500 Prime Gap.cpp | C++ | cpp | 794 | no_license | #include <iostream>
using namespace std;
bool isPrime( int num ){
for( int i = 2; i * i <= num; ++i ){
if( num % i == 0 ) return false;
}
return true;
}
int main () {
int num,before,after;
while( cin >> num && num != 0 ){
if( isPrime(num) ){
cout << 0 << e... |
479651cf8053ffe47ed3c3af0db7d1334d1b8770 | c9031f819da190f908bf362602dcb780f636d5f8 | google-code/aos | /ca/ca.cpp | C++ | cpp | 430 | no_license | // CA - AOS Core Application compiler
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
char buf[256];
char outputFileName[256];
int i = 0;
if(argc != 2)
{
printf("Usage: ca <input file name>\n");
return 1;
}
while(argv[1][i] && argv[1][i] != '.') outputFileName[i]=argv[1][i++];... |
29b52979c2f96f1594a0094f13559dd3a4592eb4 | 999dbcf2b5e7b89f158340ed6dc4e6a4fb1d0a27 | yuanf225/trinitycore_scripts | /scripts/C++/NPC_Bots/TrinityCore/src/server/game/AI/NpcBots/QBots/botQ_Airen.cpp | C++ | cpp | 3,316 | no_license | #include "bot_ai.h"
#include "Group.h"
#include "Player.h"
#include "ScriptedGossip.h"
#include "ScriptMgr.h"
#include "SpellAuras.h"
#include "WorldSession.h"
/*
Bot Quest npc Airen by Graff onlysuffering@gmail.com
Complete - 0%
TODO:
*/
#define ACT GOSSIP_ACTION_INFO_DEF
class Airen_chapter1 : public... |
aa5c3f36457a70947e866d01b422fb5dbfd05334 | 98b8504a3bec64a3e9c5322c39840ae64cda03a1 | InversePalindrome/HeliosG2V | /src/StateMachine.cpp | C++ | cpp | 2,309 | permissive | /*
Copyright (c) 2017 InversePalindrome
HeliosG2V - StateMachine.cpp
InversePalindrome.com
*/
#include "StateMachine.hpp"
#include "SimulationState.hpp"
#include "IntroState.hpp"
#include "StartState.hpp"
#include "PauseState.hpp"
StateMachine::StateMachine(StateData* stateData) :
states(),
... |
44265275d7f0d8f99c9fd633111d7cba2929f128 | 47c45325c0f9bc5606701d535b3998bb95fdd6e8 | selimfirat/data-structures-study | /hw2/PbBST.cpp | C++ | cpp | 3,178 | no_license | /**
* Title : Binary Search Trees
* Author : Selim Firat Yilmaz
* ID: 21502736
* Section : 1
* Assignment : 2
* Description : Pointer based BST class implementation
*/
#include "PbBST.h"
#include <math.h>
#include "PbBinaryNode.h"
// constructor
PbBST::PbBST() {
root = nullptr;
}
PbBST::~PbBST() {... |
81aae931d1f4e9bbac266161c969f9cd707f7269 | f40f330abe91e3d9a7e82dbca5e2a35390e49370 | ShoreyFish/dxwrapper | /ddraw/IDirect3DMaterialX.cpp | C++ | cpp | 5,865 | permissive | /**
* Copyright (C) 2019 Elisha Riedlinger
*
* This software is provided 'as-is', without any express or implied warranty. In no event will the
* authors be held liable for any damages arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose, including co... |
c53876f3351c01b7c2323dadbd4d07220d83ed6f | 68eae453eebe241dcbb8232f5d9833bad7220c40 | ricbit/Oldies | /2012-04-spojsamples/TMUL.cc | C++ | cc | 304 | no_license | #include "spojlib/lazy.h"
#include "spojlib/io.h"
#include "spojlib/bigint.h"
int main(void) {
_fastio<30000, 10000> io;
int n = io;
while (n--) {
string s1 = io.word();
string s2 = io.word();
io << static_cast<string>(bigint(s1) * bigint(s2)) << "\n";
}
return 0;
}
|
b960e22c5927f960cb3800a374edf502abb6825d | 64cea98922220b6628043af8b08cd6353bc00f8c | kaluginadaria/YetAnotherProject | /Engine/Core/Sources/Threading/ThreadContext.hpp | C++ | hpp | 1,073 | permissive | #ifndef THREAD_CONTEXT_HPP
#define THREAD_CONTEXT_HPP
#pragma once
#include <stack>
#include <unordered_map>
#include "Common.hpp"
#include "Thread.hpp"
#include "Initialiser.hpp"
/** TODO: make the class' constructor private
* NOTE: when it's done there are an acces error of inner classes
*/
class ThreadContext
{... |
3e0782556022f6e9867c340c56a8d1fcecc8a267 | dffdf0e14d53581ecbc9108d0ff908918b07be35 | cuongducn/Daily_Leetcode_Challenge | /Interviews/CongTy_1/Task/TestCpp.cpp | C++ | cpp | 988 | no_license | #include <iostream>
#include <string>
using namespace std;
class Human
{
protected:
int age;
string name;
public:
Human(/* args */){
}
~Human(){
}
virtual void sayHi(){
cout << "Hi from Human!" << endl;
}
};
class Student : public Human
{
private:
/* data */
public:
... |
6094b48ec017db285e5db4f64e2b6d5fb75eaa63 | 40d024c180e8e39d63866a9f08da1035d79c129c | SokolovaCo/Alfa-stock | /Development/Application/Storehouse/Storehouse/boost/include/boost/date_time/time_facet.hpp | C++ | hpp | 58,591 | no_license |
#ifndef _DATE_TIME_FACET__HPP__
#define _DATE_TIME_FACET__HPP__
/* Copyright (c) 2004-2005 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Martin A... |
d2fa887abb9fd2b7aa9263064cac98e5c91a46ae | d576bb2ede4111a47cb80d9afcf877eba658c779 | rynewhitaker/schoolwork | /3213/3/Maze1.cpp | C++ | cpp | 7,612 | permissive | ///////////////////////////////////////////////////////////////////////////////
//
// Ryne Whitaker
// Program 3 (1)
// Due: 10/27/2019
//
// Description: A program that allows the user to create a maze line by line,
// then have it solved by the program.
//
// Input: The user should draw a maze line by ... |
6e992af246045a49713c820d3e827557f82cebf4 | dcb71d5da9d4f4720b22fe716054de8ae87d5af0 | operativeF/Kvasir | /Lib/Chip/CM0/Nordic/nrf51/RTC1.hpp | C++ | hpp | 27,882 | permissive | #pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//Real time counter 1.
namespace Rtc1TasksStart{ ///<Start RTC Counter.
using Addr = Register::Address<0x40011000,0xffffffff,0x00000000,unsigned>;
}
namespace Rtc1TasksStop{ ///<Stop RTC Counter.
using Addr = Register::Ad... |
fae709dcc45f3690451654b92bfb0544fc8de2e2 | 76071bb62e1417f64ecb40743c9bb8af7c88f8ef | sanjosh/smallprogs | /simd/strcmp.cpp | C++ | cpp | 1,134 | permissive | #include <nmmintrin.h>
#include <stdio.h>
/**
* g++ -msse4 <prog>
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53712
*/
int substr( const char* s1, const char * s2 )
{
__m128i s1chars = _mm_loadu_si128( (const __m128i *) s2 );
__m128i s2chars = _mm_loadu_si128( (const __m128i *) (s1));
re... |
461f27c20a6cbe5b99790c7aeb866c5444f12259 | 87bb9d49c0c97181bac33da01ec7e0b10cf5d6fc | simi48/Ef-If_Jassen | /android_test/tensorflow-master/tensorflow/compiler/tf2xla/kernels/elu_op.cc | C++ | cc | 4,255 | permissive | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
3cc0db7e1abd86c032b6441a36473d61608d3113 | ca223d98a9b98b76facf670ee819243e2208498f | Guo-MengTing/code_warehouse | /7-21-3.cpp | C++ | cpp | 2,450 | no_license | //https://www.nowcoder.com/questionTerminal/7a0da8fc483247ff8800059e12d7caf1
class Solution {
public:
int Sum_Solution(int n) {
int sum=n;
bool flag=(n>0)&&(sum+=Sum_Solution(--n));
return sum;
}
};
//https://www.nowcoder.com/questionTerminal/9023a0c988684a53960365b889ceaf5e
struct Tree... |
94736260de05b2e2110a935939e07b089c108574 | aef93c3a48e1f50b7b0a8aed1b026799aaad9d37 | Brandon-T/Aries | /Packages/java/io/FilenameFilter.cxx | C++ | cxx | 909 | permissive | //
// FilenameFilter.cxx
// Aries
//
// Created by Brandon on 2018-02-25.
// Copyright © 2018 Brandon. All rights reserved.
//
#include "FilenameFilter.hxx"
#include "Object.hxx"
#include "File.hxx"
#include "String.hxx"
using java::io::FilenameFilter;
using java::io::File;
using java::lang::Object;
using java::l... |
6129b3165fb5f360fa01e3ece470e57b976ec66b | 2844aaf1a3bf53b84eb88853d17b96aa1c2a20de | CommanderKnight5214/CodingIII | /HW15/Node.hpp | C++ | hpp | 354 | no_license | class Node
{
private:
int payload;
Node* nextNode;
Node* prevNode;
public:
Node(int payload);
void setNextNode(Node* n);
Node* getNextNode();
int getPayload();
void Node::setPayload(int n);
Node* Node::getPrevNode();
v... |
29815cc802ce84cd2a2de7583de7a14eebbbb8c9 | aa6201c87714a376c3750bbd2af8df6f5a09868b | AWildErin/ESx-Reader | /src/Records/GMST.hpp | C++ | hpp | 562 | permissive | #ifndef GMST_HPP
#define GMST_HPP
#include "../Record.hpp"
#include <boost/variant/variant.hpp>
enum DataType
{
String = 's',
Float = 'f',
Integer = 'i'
};
class RecordGMST : public Record
{
public:
struct DATA
{
std::string edid;
boost::variant<float, uint32_t, std::string> varia... |
4f1c97c30d069bf8c31944c2673b415796d95fce | dd0a831462b9a0280efd80019cb23c51f73e5ee6 | CM4all/beng-proxy | /src/cgi/Client.hxx | C++ | hxx | 512 | permissive | // SPDX-License-Identifier: BSD-2-Clause
// Copyright CM4all GmbH
// author: Max Kellermann <mk@cm4all.com>
#pragma once
struct pool;
class StopwatchPtr;
class UnusedIstreamPtr;
class HttpResponseHandler;
class CancellablePointer;
/**
* Communicate with a CGI script.
*
* @param input the stream received from the ... |
598da41f98cbded9abcb55b51195b8add52e0960 | da52beaedfee70b8c38024779ae71f8b5ad28e73 | n5y2j3/geteos | /geteos.cpp | C++ | cpp | 1,049 | no_license | #include<eosio/eosio.hpp>
#include<eosio/asset.hpp>
using namespace eosio;
CONTRACT geteos: public contract {
public:
using contract::contract;
ACTION getbalance(name user, asset token) {
accounts mytoken("eosio.token"_n, user.value);
symbol sym = token.symbol;
... |
9d638574aa1391e915af7b92e9e047fada60ed01 | 76cd174d630bf4e7bc745908b55d920135c83ed0 | husterzxh/networkit | /networkit/cpp/graph/GraphBuilder.cpp | C++ | cpp | 11,552 | permissive | /*
* GraphBuilder.cpp
*
* Created on: 15.07.2014
* Author: Marvin Ritter (marvin.ritter@gmail.com)
*/
#include <omp.h>
#include <stdexcept>
#include <networkit/graph/GraphBuilder.hpp>
namespace NetworKit {
GraphBuilder::GraphBuilder(count n, bool weighted, bool directed)
: n(n), selfloops(0), name(""... |
d59ebe33ddb467045f99eae57736d984ac193338 | 5f4bd89f86a501d5c6510305c650caa0be20015b | tombish/DiligentCore | /Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.hpp | C++ | hpp | 7,894 | permissive | /*
* Copyright 2019-2021 Diligent Graphics LLC
* Copyright 2015-2019 Egor Yusov
*
* 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.... |
8e07fc925886ef711842aabba6ad46d62e5f9a58 | f53668c58f21782510f89525671b40d289b7bcbb | yexihu/hltypes | /src/hstring.cpp | C++ | cpp | 29,940 | permissive | /// @file
/// @version 3.0
///
/// @section LICENSE
///
/// This program is free software; you can redistribute it and/or modify it under
/// the terms of the BSD license: http://opensource.org/licenses/BSD-3-Clause
#include <algorithm>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#in... |
e8685b064f000aa67a824344d3e194732821b58a | 13788c0a59c7aaf2e7f2857cd07f1989f581a30f | MrRoot1123/PraticeOfJianZhiOffer | /No53FirstAppearingOnce.cpp | C++ | cpp | 775 | no_license | #include <string>
using namespace std;
/*
请实现一个函数用来找出字符流中第一个只出现一次的字符。例如,当从字符流中只读出前两个字符"go"时,
第一个只出现一次的字符是"g"。当从该字符流中读出前六个字符“google"时,第一个只出现一次的字符是"l"。
*/
class Solution
{
public:
//Insert one char from stringstream
string s;
char hash[256]={0};
void Insert(char ch)
{
s+=ch;
hash[ch]+... |
313044d2c202724db64c9a3dc1a65bb09b3a46f8 | 38e81287ee1229402974efcec5f578101c8ad46c | chkob/forked-blaze | /blazetest/src/mathtest/dmatdmatschur/HDaHDb.cpp | C++ | cpp | 4,033 | permissive | //=================================================================================================
/*!
// \file src/mathtest/dmatdmatschur/HDaHDb.cpp
// \brief Source file for the HDaHDb dense matrix/dense matrix Schur product math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// This... |
954c7b9452cfa2d055751731470564b5b29a86df | 1dceee7d9cdb03d8da46676455ea84ef1d3d8281 | bharathkarthikeyan/gecode | /gecode/set/rel/lq.hpp | C++ | hpp | 13,562 | permissive | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Guido Tack <tack@gecode.org>
*
* Copyright:
* Guido Tack, 2011
*
* Last modified:
* $Date$ by $Author$
* $Revision$
*
* This file is part of Gecode, the generic constraint
* development environment:
... |
1c91f1ff0e0db0809018c1ec8150e4c48e5c2236 | 8b25ae296039ece83a1a0e2d85e62b52a0ee9a48 | Adrian-Garcia/MyCppAlgorithms | /Parallel Programming/example.cpp | C++ | cpp | 284 | permissive | #include <omp.h>
#include <stdio.h>
#define LIMIT 10000000
int main(void) {
double serie = 0;
long long i;
#pragma omp parallel
{
#pragma omp for reduction(+:serie)
for(i=1; i<=LIMIT; i++)
serie += 1.0/i;
}
printf("Valor de la Serie: %.5f\n",serie);
return 0;
} |
ce18c894ed4ffa54ca3fce1be676f5cd71be2a96 | 3df14c459fc34738a247cba07fa135f9ddd947fc | DKU-STUDY/Algorithm | /programmers/난이도별/level03.네트워크/6047198844.cpp | C++ | cpp | 722 | no_license | #include <iostream>
#include <string>
#include <vector>
using namespace std;
bool computer_node[201];
void dfs(int num,vector<vector<int>>& computers) {
if (computer_node[num]) {
return;
}
computer_node[num] = true;
int computers_size = computers.size();
for (int i = 0; i < computers_size;... |
ff2347911437701f3adf92b4bd27120a8cd5e0a0 | 97bab4fe8cec44b4941a1e022f3eedac863f29a5 | yaxinsn/C_plus_plus_learning | /C++11/auto/hello.cpp | C++ | cpp | 1,069 | no_license | #include <iostream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
/*
* 拷贝构造函数
*
*
*
*
* */
class Hello{
char* hello;
public:
int show_hello(char* who)
{
cout <<hello << "," << who<<endl;
return 0;
}
// 所以在class体以外定义的方法(函数)都必须在class体内进行声明。
void set_hello(char* new_h... |
fcf5f94e649b68825dfb985937934a5e26790ba4 | aa6a958cc168ff4d7ad8bf3a0fc7586dc380a8db | mfkiwl/Beamfomer-on-GPUs | /Cobalt/OutputProc/src/createHeaders.cc | C++ | cc | 4,536 | no_license | //# createHeaders.cc: Generates all .h5/.MS files given a (OLAP) parset
//# Copyright (C) 2012-2013 ASTRON (Netherlands Institute for Radio Astronomy)
//# P.O. Box 2, 7990 AA Dwingeloo, The Netherlands
//#
//# This file is part of the LOFAR software suite.
//# The LOFAR software suite is free software: you can redistr... |
ef139b12d71561dacd5fc72a4b1c72a711988046 | 96b1caef84a6b304eeeb7f3046d32263dc886f46 | testdockerwcsim/XTriggerApplication | /UserTools/template/MyTool.cpp | C++ | cpp | 1,150 | permissive | #include "MyTool.h"
MyTool::MyTool():Tool(){}
bool MyTool::Initialise(std::string configfile, DataModel &data){
if(configfile!="") m_variables.Initialise(configfile);
//m_variables.Print();
m_verbose = 0;
m_variables.Get("verbose", m_verbose);
//Setup and start the stopwatch
bool use_stopwatch = fals... |
5423611171e0f0a55b72bbf21b0be0ba699e8fc9 | cc109862f53bd47d10bb51061f4fb8ac7f8be465 | Viswonathan06/AlgoDS | /Arrays/FourSumNumbers.cpp | C++ | cpp | 2,235 | no_license | #include<bits/stdc++.h>
using namespace std;
bool included(vector<vector<int>> arr, vector<int> m ){
for( vector<int> a: arr){
if( a == m){
return true;
}
}
return false;
}
vector<vector<int> > fourSum(vector<int> &arr, int k) {
// St... |
a08196c5990b5c753ec6d3a8cc4284aab7ee2848 | 2c52b6b4f8cc22b453d84fda435747821eb899e7 | Peshpesh/Untitled | /src/CArea.cpp | C++ | cpp | 3,787 | no_license | #include "CArea.h"
CArea CArea::control;
CArea::CArea() {
OnInit();
}
void CArea::OnInit() {
MapList.clear();
AreaHeight = AreaWidth = 1;
tileset_ID = -1; // will want to change this to some tileset used on title screen
location_ID = -1;
CMap tempMap;
// tempMap.OnLoad();
MapList.push_back(tempMap);
}
bo... |
5a0b9c1326026c2d680a2bee13a7c36b1ef73ba2 | f0a029eb9e297f105c976bf4d0ccf478b61386fc | Serafim1979/CountryPoulationSimple | /main.cpp | C++ | cpp | 574 | no_license | #include<iostream>
using namespace std;
int main()
{
unsigned long long worldPopulation;
unsigned long long countryPopulation;
long double ans;
char ch;
do
{
cout << "Enter the world's population: ";
cin >> worldPopulation;
cout << "Enter the population of the US: ";
cin >> countryPopulation;
ans = (... |
63bccf8d311c02285971d2f1a20319abf237a1cb | e113e859a2e13c9b54ad4ac66ac080e04bcaae63 | hknarutofk/chromium | /components/autofill_assistant/browser/fake_script_executor_delegate.cc | C++ | cc | 7,611 | permissive | // Copyright 2019 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/autofill_assistant/browser/fake_script_executor_delegate.h"
#include <utility>
namespace autofill_assistant {
FakeScriptExecutorDe... |
15e5e6cfd073eb081af13d25d8955ec20b1fcd0e | d37eaa5dca5eb2697d9034132b9da8c89a4c3dd0 | Adrian94F/SDiZO_PEA | /SDiZO2d/sdizo-proj2/my_timer.cpp | C++ | cpp | 786 | no_license | #include "header.h"
void MyTimer::Start() // metoda włączająca zegar
{
DWORD oldmask = SetThreadAffinityMask(GetCurrentThread(), 0);
QueryPerformanceCounter(&start);
SetThreadAffinityMask(GetCurrentThread(), oldmask);
}
long double MyTimer::End() // metoda wyłączająca zegar, zwracająca czas wyk... |
792f2c9e5330f6c1e2782c19fcff1eb5b7ca3fae | d363f10e1059ccb7f689f3ae70770586e6b3a8d5 | superxcgm/PAT-Adcanced | /code/1014.cc | C++ | cc | 1,798 | no_license | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <map>
using namespace std;
struct Cstmr{
int no;
int pro_time;
};
queue<struct Cstmr> que[22];
int tm[22];
queue<struct Cstmr> que_cstmr;
map<int, char *> mp; /* recorad each customer's finish time */
const int INF = 0x3f3f3f3f;
in... |
4095c5d52c62ae08d1a89c98b1201886b691b6a4 | 034f1021e0d16c56b802c699d1cb98401e6ca979 | Haut-Stone/ACM | /INBOX/线段相交.cpp | C++ | cpp | 786 | no_license | /*
* Created by ShiJiahuan(li) in haut.
* for more please visit www.shallweitalk.com
*
* Copyright 2016 SJH. All rights reserved.
*
* @Author: Haut-Stone
* @Date: 2017-01-16 22:22:50
* @Last Modified by: Haut-Stone
* @Last Modified time: 2017-01-16 22:57:24
*/
#include <iostream>
#include <cstdio>
#include <algori... |
005ee2ec07bf86125a069a8a857225d667b8bd4d | 94d40a8394ac5d9d9014a0ea40aefd0c4c6d075e | pombredanne/idmlib | /test/duplicate-detection/t_group_table.cpp | C++ | cpp | 2,176 | permissive | #include <idmlib/duplicate-detection/group_table.h>
#include <boost/test/unit_test.hpp>
using namespace idmlib::dd;
BOOST_AUTO_TEST_SUITE(group_table_test)
BOOST_AUTO_TEST_CASE(no_trans_test)
{
std::string file = "./test_gt_file";
boost::filesystem::remove_all(file);
GroupTable<std::string, uint32_t> ta... |
64ac6fa5d94b5e3378eb5b0a0a25a82b1bc66a62 | b372e583d68d0b246ebe693ac977e61e97d4481c | sadrulhc/chromium | /chrome/browser/safe_browsing/download_protection/check_client_download_request.cc | C++ | cc | 13,824 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/safe_browsing/download_protection/check_client_download_request.h"
#include <algorithm>
#include <memory>
#include <utility>
#i... |
6a89090db0778d48d2db4789970fc41299826fc7 | 832e378b5aa9d1da7a6bc615f4f44819637250ac | irods/aws-sdk-cpp | /aws-cpp-sdk-sagemaker/source/model/InstanceType.cpp | C++ | cpp | 21,735 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sagemaker/model/InstanceType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;... |
5d0d237b1c4aee87739e333217aa74b602c2014b | 6243699fc5350a31fd7220d57cc3e74387b1bbbc | wanwansssss/nncase | /src/runtime/stackvm/runtime_function.cpp | C++ | cpp | 6,166 | permissive | /* Copyright 2019-2021 Canaan 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 applicable law or agreed t... |
dc31238d5dacadd211ca1a087d57b62cc3149ef0 | 7cbb060785b0c2f47332fa3ded9db9aa567409c0 | dhruvinj/Projects | /Projects/HPC-1/MPI/extra/trysplitmandelbrot.cpp | C++ | cpp | 2,989 | no_license | #include<iostream>
#include<cmath>
#include<string>
#include<cassert>
#include<fstream>
#include<cstdlib>
#include<ctime>
#include "ComplexNumber.hpp"
//#include<mpi.h>
int main(int argc, char* argv[])
{
int nodes[] = {5};
double hx;
double hy;
double sum = 0.0;
double total_sum = 0.0;
double* x;
doubl... |
3db47047a9fec7859375d6f1e1266e7a855029f3 | be3bf53e481b1ad7a42536c5a320a1c2b32353d1 | javiermmm/GCO | /pr1/freeglut project 3D vs12/freeglut project 3D/scene1.cpp | C++ | cpp | 8,157 | no_license | //---------------------------------------------------------------------------
#include "scene1.h"
//---------------------------------------------------------------------------
scene::scene(){
estrella.pEsf=gluNewQuadric();
planeta.pEsf = gluNewQuadric();
satelite.pEsf = gluNewQuadric();
orbitaP = gluNewQuadric... |
f6e36e1d01a75a78c26c4519aa8a4e0d166df0a9 | b7da4e185921777fc91c9164b21885cd4fd94855 | ashish1203/Practice-Cpp-codes-functionality | /practice_static_data_members_static_keyword_static_functions.cpp | C++ | cpp | 1,405 | no_license | #if 0
#include <iostream>
#include <conio.h>
#include <stdio.h>
using namespace std;
/*......
Static variable:-> In function or inside class
Static members -> data members and functions
(1) Static variable defined inside the FUNCTION- lives till the end of function
(2) Static variables inside the CLASS- ... |
0dcd2846c5f0420ceae7257aae51bb9b80f2a036 | edaefdb432a38a60f89a8f7c5c91fafaaa514208 | larryl79/TCA-I2C-scan | /lib/TCA/TCA.cpp | C++ | cpp | 3,256 | permissive | /*
* TCA9546A (4 channel) TCA9548A (8 channel) I2C MUX
*
*
*/
//
// FILE: TCA9548.cpp
// AUTHOR larryl79 URL: https://github.com/larryl79/TCA
// FORKED FROM: Rob Tillaart URL: https://github.com/RobTillaart/TCA9548
// FORKED VERSION: 0.1.0
// FORKED DATE: 2021-03-16
// PURPOSE: Library for TCA I2C mul... |
f5557d931377fbd2b4a19110b8a533132b9a5394 | 2f9870f2644d9c58037bbfb1df6a097b1acc7bf0 | Buttars/SCUM-SDK | /SDK/SCUM_Geek_Goggels_classes.hpp | C++ | hpp | 653 | no_license | #pragma once
// SCUM (0.1.17) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "SCUM_Geek_Goggels_structs.hpp"
namespace SDK
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// Bluepri... |
4fd74326214fd3bee05fd7ceefcd1c5233ef25fe | 25fe42a86b39fdd4df32e66fb024d5ca08be47e1 | int-i/ACE1309 | /psj/week06/hw01/main.cpp | C++ | cpp | 397 | no_license | #include <iostream>
#include "date.h"
int main() {
Date date1;
Date date2(284, 2019);
Date date3(11, 10, 2019);
Date date4("October", 11, 2019);
date1.print();
std::cout << std::endl;
date2.print_dddyyyy();
std::cout << std::endl;
date3.print_mmddyy();
std::cout << std::endl;... |
789fcfd82eb72968a3ca0b2481f9df968e6d9459 | 5aa2b4e1a09f787abe920565809de530a007c56c | pufe/programa | /2020-11-20/spam.cpp | C++ | cpp | 1,737 | permissive | #include <cstdio>
#include <vector>
using namespace std;
const int NOT_FILLED = 4;
typedef char name_t[32];
struct spam_t {
int lower, upper;
name_t attribute[3];
int get_index(int x) {
if (x<lower)
return 0;
if (x>=upper)
return 2;
return 1;
}
};
spam_t spam[110];
... |
cb852d4a170b10d5f584cbe3ac983ce09bc69d6b | 381d16fd6a5ba87520418334bd05279f2ac627ff | arowwne/TesraSupernet | /src/test/test_tesra.cpp | C++ | cpp | 2,272 | permissive |
#define BOOST_TEST_MODULE Tesra Test Suite
#include "main.h"
#include "random.h"
#include "txdb.h"
#include "ui_interface.h"
#include "util.h"
#ifdef ENABLE_WALLET
#include "db.h"
#include "wallet.h"
#endif
#include <boost/filesystem.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/thread.hpp>
CClientUII... |
6e06294e3bf1764fa72fb0da9226d7e080b462a1 | a30f5615dee5aceafb89b39a4ac4d806d19b5306 | BlackToppStudios/Mezzanine | /Mezzanine/src/Audio/OALS/oalseffectshandler.cpp | C++ | cpp | 22,928 | no_license | // © Copyright 2010 - 2017 BlackTopp Studios Inc.
/* This file is part of The Mezzanine Engine.
The Mezzanine Engine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or... |
b30c4f11fac96fac819a1ece1fe55785d0f5017a | efa696737674a3643b5b69b86136304ceb33a23a | mcneel/rhino-developer-samples | /cpp/SampleExportMesh/SampleExportMeshPlugIn.cpp | C++ | cpp | 10,751 | no_license | #include "StdAfx.h"
#include "rhinoSdkPlugInDeclare.h"
#include "SampleExportMeshPlugIn.h"
#include "Resource.h"
// The plug-in object must be constructed before any plug-in classes derived
// from CRhinoCommand. The #pragma init_seg(lib) ensures that this happens.
#pragma warning( push )
#pragma warning( disable : 40... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.