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 |
|---|---|---|---|---|---|---|---|---|
5a28782e767a10cc2040d4ec75d17a61546434ac | 76964bec5b1f8708ce3ceb0e3e9143e45b55fdbe | Infin8Gamer1/Beta-Engine | /Beta Engine/Source/stdafx.cpp | C++ | cpp | 461 | permissive | //------------------------------------------------------------------------------
//
// File Name: stdafx.cpp
// Author(s): Jeremy Kings (j.kings)
// Project: Beta Engine
// Course: WANIC VGP2
//
// Copyright © 2018 DigiPen (USA) Corporation.
//
//--------------------------------------------------------------... |
7f457078fcefa5eebb1d6e497d3c922269cb1075 | 2c536e5026b4f783ea367409a058a4d9adbf81d0 | mpzadmin/yuc | /Jafari/parameter.cpp | C++ | cpp | 341 | no_license | #include <iostream>
using namespace std;
int main(int argc, const char** argv)
{
if (argc <= 1)
{
cout << "You haven't entered any parameters.";
return 0;
}
cout << "You have Entered: " << endl;
for (int index = 1; index < argc; index++)
{
cout << argv[index] << endl;
... |
a67dc9ee15d0ac4a3e698d6339fd97e4a4dbc8a9 | 1a7361ba47e385297292c293825fcc9477c73e28 | Satyankar15/C-C-Lab-Extra | /Consecutive1s.cpp | C++ | cpp | 591 | no_license | #include<iostream>
using namespace std;
int score(int a[], int size, int n)
{//n is index where 1 is to be inserted
cout<<"Start of function";
int sum=1,i,j;
if(n==0)
{
for(i=1;i<size;i++)
{
j=i;
while(a[j+1]!=0)
{
sum=sum+a[i];
j++;
}
}
}
/*else
{
}*/
cout<... |
c7b37d34969ebda13581e5d1b013624d42b4aea3 | cf81d4e292ba7e4979f7eeb1ee21ac942f9812fb | rathoresrikant/HacktoberFestContribute | /Algorithms/Greedy/Knight's_Tour.cpp | C++ | cpp | 1,956 | permissive | #include <iostream>
using namespace std;
#define MAX_ROWS 1001
#define MAX_COLS 1001
int rows, cols, i_start, j_start, bestStep;
int chess_board[MAX_ROWS][MAX_COLS], best_board[MAX_ROWS][MAX_COLS];
const int di[]= {2, 2,1, 1,-1,-1,-2,-2},
dj[]= {1,-1,2,-2, 2,-2, 1,-1};
int countMoves(int i, int j)
... |
18f5529cf83e210a014f74c567ce93bace6181eb | 2ebc006baf3798f1127b05c4bfb8bb21aa419c63 | saphiresouldier/appleseed | /src/appleseed/renderer/modeling/bsdf/orennayarbrdf.cpp | C++ | cpp | 12,311 | permissive |
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2014-2015 Luis B. Barrancos, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person ... |
03d74f1360d62289a7a6c7ef0f78412dd0f31623 | 3bcfe3d86d9d46b151a42f0fbff9060c1fc5aa34 | graphcareful/folly | /folly/io/async/Request.cpp | C++ | cpp | 23,578 | permissive | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... |
cb0245d50ea9d6eda88a00ddbe8e2ef3791f6783 | 7358c5f46c3ad1bdb98d3c1f4b9fe2a68f04d687 | browntoad/Competitive-Programming | /Codeforces/1800/933A.cpp | C++ | cpp | 1,339 | no_license | #include <bits/stdc++.h>
#pragma GCC optimize ("Ofast", "unroll-loops")
using namespace std;
#define ll long long
#define int ll
#define FOR(i,a,b) for (int i = (a); i<(b); i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n+1)
#define RREP(i,n) for (int i=(n)-1; i>=0; i--)
#define f first
#define s second
#de... |
a1fb27fd91d37b71c20a223125fb6c66fa7e1bab | 4dc3596844f208d01727ee894ab0d20aabc657a9 | zhanzhigui/TypicalCode | /Code/test/test.cpp | C++ | cpp | 796 | no_license | #include "test.hpp"
#include "../src/NewFeatureIn11/GudgeOneFuncExistsInClass.hpp"
#include "../src/NewFeatureIn11/EnumToString.hpp"
#include "../src/NewFeatureIn11/enumeration.h"
#include "../src/NewFeatureIn11/CouverCases.hpp"
#include "../src/DesignMode/Singleton/singleton.hpp"
#include "../src/NewFeatureIn11/Functi... |
523d5dfc31a588f48d9afb569c31824e21f9ff36 | a8d331461209f0ac991daef4b61ae07909219a2f | prestocore/browser | /platforms/posix_ipc/posix_ipc_process_manager.cpp | C++ | cpp | 7,253 | no_license | /* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#include "core/pch.h"
#include "platforms/posix_ipc/posix_ipc_pro... |
3db6546c35d20d2c1bcc41d4b46afc62b6e37c5f | a383463b4f9700ba27b62478174d5f179971352e | Shinronz/AluxiaMu | /Sources/Library/Cryptopp/3way.cpp | C++ | cpp | 3,639 | permissive | // 3way.cpp - modifed by Wei Dai from Joan Daemen's 3way.c
// The original code and all modifications are in the public domain.
#include "pch.h"
#include "3way.h"
#include "misc.h"
NAMESPACE_BEGIN(CryptoPP)
#if CRYPTOPP_DEBUG && !defined(CRYPTOPP_DOXYGEN_PROCESSING)
void ThreeWay_TestInstantiations()
{
ThreeWay::En... |
85358644077bde4c20005c61f3ba38dc3c59b2cb | 3a78a4955fd72e9fde04876bfac7bb7f3182f580 | tbfe-de/plc2-ccpp-psi | /CCppCode/RealUniqCopy/step2/aufg2.cpp | C++ | cpp | 3,962 | no_license | /*
==============================================================================
Remove all duplicated strings from input - no matter where they appear
==============================================================================
*/
#include <iterator>
#include <set>
#include <string>
// ... TO-BE-DONE ...
void r... |
5aaa096ff7ff255868d010742acdea585fd3d481 | 47537653629bf2cf89bbdf5d9c32cef02d08953f | d3cod3/ofxMtlMapping2D | /src/ofxUI/src/ofxUIDragableLabelButton.cpp | C++ | cpp | 4,127 | permissive | /**********************************************************************************
Copyright (C) 2012 Syed Reza Ali (www.syedrezaali.com)
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 wi... |
dcb0054651318e408c929f802313771d00da727d | 15209c6dd8a5e7e4428b13b91a9e1fc336cf4e03 | furuholm/rapidcheck | /include/rapidcheck/arbitrary/Tuple.hpp | C++ | hpp | 592 | no_license | #pragma once
namespace rc {
template<typename ...Types>
class Arbitrary<std::tuple<Types...>>
: public gen::TupleOf<Arbitrary<Types>...>
{
public:
Arbitrary() : gen::TupleOf<Arbitrary<Types>...>(
gen::arbitrary<Types>()...) {}
};
template<typename T1, typename T2>
class Arbitrary<std::pair<T1, T2... |
2c4abaa3b7d642347036912db1a60405aa567c91 | 56890ecf838d8dd9e4d2d8584912f9b0a8592264 | chensh236/ComputerVisionFinalProject | /A4Warping/segment/reshape.cpp | C++ | cpp | 2,857 | no_license | //
// Created by Chen Sihang on 2018/12/21.
//
#include "reshape.h"
// 判断图像边界
bool reshape::isLegal(int x, int y, int srcWidth, int srcHeight, double theta,
double &srcX, double &srcY)
{
// 找到(x, y)在原图中对应的位置(srcX, srcY)
srcX = (double)x * cos(theta) - (double)y * sin(theta);
s... |
f38b25c75e7be309e4efe8d4cd4e266858fd4cb3 | 7c47e6a5f561db6c7bb51bcadfcff2febc35df60 | EricWang1hitsz/se2_navigation | /car_demo/car_demo/src/prius_controller_node.cpp | C++ | cpp | 576 | permissive | /*
* prius_controller_node.cpp
*
* Created on: Apr 6, 2020
* Author: jelavice
*/
#include <ros/ros.h>
#include "car_demo/PriusControllerRos.hpp"
using namespace car_demo;
int main(int argc, char** argv) {
ros::init(argc, argv, "prius_controller_node");
ros::NodeHandlePtr nh(new ros::NodeHandle("~"));... |
bf5e899bd3f77f2cb3744e05d2ecb06ebf347d95 | c4c73c6f45fc01d401de7a442fd0682c24410a61 | ZhengweiLi/_LeetCode | /132_PalindromePartitioningII.cpp | C++ | cpp | 823 | no_license | /*
Given a string s, partition s such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of s.
Example:
Input: "aab"
Output: 1
Explanation: The palindrome partitioning ["aa","b"] could be produced using 1 cut.
*/
class Solution {
public:
int minCut... |
09d68cd20ee199580369858d470f449fbda9f9ca | ae35b07e0f21accc9a0620b5513523220f011ae9 | junxuezheng/chromium | /chrome/utility/importer/firefox_importer.cc | C++ | cc | 30,788 | permissive | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/utility/importer/firefox_importer.h"
#include <memory>
#include <set>
#include "base/files/file_enumerator.h"
#include "base/files/file... |
9f67f71cb331b26b405ccbe0b1565ee34d7b01c8 | 940739f07f96eb10477519c82ad09b4ad1843f9e | AndreasFMueller/AstroPhotography | /gui.old/tasks/Tasks/downloaddialog.cpp | C++ | cpp | 2,954 | no_license | /**
* downloaddialog.cpp -- Dialog to request file name generation parameters
*
* (c) 2014 Prof Dr Andreas Mueller, Hochschule Rapperswil
*/
#include "downloaddialog.h"
#include "ui_downloaddialog.h"
#include <AstroDebug.h>
/**
* \brief Construct a DownloadDialog
*
* \param _parameters The parameters for file n... |
e057ec32593e3cb02a35fe08866f0405177f4583 | cf6e8af508d46d03530285b5531ce0b09f3c4c48 | neuromancer/XLEngine | /render/IndexBuffer.cpp | C++ | cpp | 1,811 | permissive | #include "IndexBuffer.h"
#include "IDriver3D.h"
#include <cassert>
#include <cstdlib>
#include <memory.h>
IndexBuffer::IndexBuffer(IDriver3D *pDriver)
{
m_uCount = 0;
m_uSize = 0;
m_uIBO_ID = 0xffffffff;
m_bLocked = false;
m_pMemory = NULL;
m_pDriver = pDriver;
}
IndexBuffer::~IndexBuffer(void... |
bf6e2082173c129d729723eb8db22fa8eb32f4a2 | c2d36c218e3decde5db58af60d83a01e733c4e28 | mperrelli/theRacingGame | /template.cpp | C++ | cpp | 11,278 | no_license | // Programmers: Matt Perrelli, Anthony Mascia, Andrew Goreckie
// Course: CMPT 456
// Due Date: 5 May 2014
//
// Unnecessary Vehicle Avoidance Training
//
// UVAT is a game where on must traverse a track as cleanly as
// possible to stay on the track and avoide other cars as they
// come speeding by. Survive ... |
9e46d2f55601f8fb5ffe21a8cae19950c7f81c4b | f8bad75e1b7de2d4f4b3e38597d4b58ecb80043a | xyuan/celerity-runtime | /test/runtime_tests.cc | C++ | cc | 86,324 | permissive | #include "unit_test_suite_celerity.h"
#include <algorithm>
#include <memory>
#include <random>
#include <catch2/catch.hpp>
#define CELERITY_TEST
#include <celerity.h>
#include "ranges.h"
#include "region_map.h"
#include "test_utils.h"
namespace celerity {
namespace detail {
using celerity::access::all;
using c... |
938bcf06b04efbdd1f6020355ce6e9347f13eb28 | 8c7c1c829e0e365b0c007434597ed2e83b69a8fb | armageddoncrypto/AGDN | /src/compat/strnlen.cpp | C++ | cpp | 595 | permissive | // Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/armageddon-config.h"
#endif
#include <cstring>
// OSX 10.6 is missing strnlen at runt... |
bc3e589de5d0e304557a2e4a3e4f60d069a639b3 | 53bdca023ea24e1f65ef644543d60b5de4730594 | KqSMea8/sstd_library | /sstd_boost/sstd/libs/core/test/ref_ref_test.cpp | C++ | cpp | 1,382 | permissive | //
// Test that ref(ref(x)) does NOT collapse to ref(x)
//
// This irregularity of std::ref is questionable and breaks
// existing Boost code such as proto::make_expr
//
// Copyright 2014 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
//... |
a49a342a642d2a89ef19bda30043571646df5daf | 216695b8981ae5a04b46a5ec7385c11d6bcb974d | thalium/icebox | /third_party/virtualbox/src/VBox/Frontends/VBoxAutostart/VBoxAutostartCfg.cpp | C++ | cpp | 22,890 | permissive | /* $Id: VBoxAutostartCfg.cpp $ */
/** @file
* VBoxAutostart - VirtualBox Autostart service, configuration parser.
*/
/*
* Copyright (C) 2012-2017 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can... |
7d2d9804ac81ddcb31f237b863360e46e91d8370 | 9e8b4840e47c2bd853f54cd1d2cf678e4f01f080 | Douglas-Martinez/-EDD-Tarea3_201603168 | /main.cpp | C++ | cpp | 1,356 | no_license | using namespace std;
#include "abb.cpp"
int main()
{
abb *arbolABB = new abb();
string salto = "";
//1
arbolABB->insertar("luigi");
arbolABB->insertar("hammer");
arbolABB->insertar("mario");
arbolABB->insertar("peach");
arbolABB->insertar("pow");
arbolABB->insertar("fermin");
... |
1607c345c8c2ee564e57032d7b723ba6ef3537b8 | 467e757731bc8486eaf2a4ac9b4ca581dee7b484 | rovinski/LSOracle | /lib/mockturtle/test/algorithms/shannon_decomposition.cpp | C++ | cpp | 980 | permissive | #include <catch.hpp>
#include <algorithm>
#include <vector>
#include <kitty/constructors.hpp>
#include <kitty/dynamic_truth_table.hpp>
#include <mockturtle/algorithms/shannon_decomposition.hpp>
#include <mockturtle/algorithms/simulation.hpp>
#include <mockturtle/networks/aig.hpp>
using namespace mockturtle;
TEST_CA... |
460b6be930fc1a10edbf4ceddeba9454061ee39c | d72eb269057d5879a87d2a62691dab09988a0e1d | shenglihou/chromium | /chrome/browser/page_load_metrics/page_load_metrics_update_dispatcher.cc | C++ | cc | 28,806 | 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/page_load_metrics/page_load_metrics_update_dispatcher.h"
#include <ostream>
#include <utility>
#include "base/bind.h"
#include ... |
2b56c657864b1df5fa5d86a7f569c3c03690b06d | 82d2ae6e479e435f05bb917550847906598c7e7d | vij-duggirala/ds_algos | /binary/ceiling.cpp | C++ | cpp | 562 | no_license | #include<bits/stdc++.h>
using namespace std;
int ceiling(int A[], int l , int r, int key)
{
if(key> A[r])
return -1;
int m;
while(r-l>1)
{
m=l+(r-l)/2;
if(A[m]>=key)
r=m;
else
l=m;
}
return A... |
2cf033db92d09d706d33706efc300faa2e4e5e5c | 5201816e59911ffe25ccdefa5c78cf2ffcbfd176 | hyl317/argweaver | /src/argweaver/model.cpp | C++ | cpp | 36,490 | permissive |
#ifdef ARGWEAVER_MPI
#include "mpi.h"
#include "mcmcmc.h"
#endif
#include "model.h"
#include "pop_model.h"
#include "local_tree.h"
#include "MultiArray.h"
#include "logging.h"
#include "sequences.h"
#include "track.h"
namespace argweaver {
double get_delta_diff(double log_delta, const double *times, int ntimes, do... |
71b038bcd034809a78f2d90cddc3062144164a11 | 0f5875a3ca05df6a2ac0050baee8ea9dbc14c521 | Zabrane/llcpp | /include/llcpp/detail/logging.hpp | C++ | hpp | 6,686 | permissive | #pragma once
#include <string>
#include <functional>
#include <vector>
#include <memory>
#include "log_line.hpp"
#include "config.hpp"
namespace llcpp::detail::logging {
struct level {
enum level_enum : unsigned int {
trace = 0,
debug = 1,
info = 2,
warn = ... |
c8105046fc9c8e5fbed9cc3c65f570ae90fa9c50 | 985dc3b64a6aa44229427820061954bc2bf1804f | ArathiGnan/INFO450FavoriteThing | /Gnanodayan Assignment 3/RestaurantList.cpp | C++ | cpp | 1,675 | no_license | #include <iostream>
#include <string>
#include <fstream>
#include "Restaurant.h"
#include "RestaurantList.h"
using namespace std;
RestaurantList::RestaurantList()
{
numItems = 0;
}
void RestaurantList::AddItem()
{
items[numItems].getRestaurantInput();
numItems++;
}
void RestaurantList::showList()
{
int i;
for (i ... |
05be0fbceaca2ff47576c5a1d14671be6b29801b | 4a2f875b4294e3fb865d8f782ef2d8c93530a412 | darionyaphet/nebula-storage | /src/daemons/MetaDaemon.cpp | C++ | cpp | 13,591 | permissive | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "common/base/Base.h"
#include "common/base/SignalHandler.h"
#include "common/webservice/Router.h"
#include "com... |
85da590e592b4f9e346d4d45a1999eacc002894d | 85ff21958fc05b91c0a83a1f17e81abc3ad74388 | rafiqul713/MASK-RCNN | /mask_rcnn.cpp | C++ | cpp | 7,505 | no_license | #include <iostream>
#include <fstream>
#include <sstream>
#include <string.h>
#include <opencv2/dnn.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
using namespace std;
using namespace cv;
using namespace dnn;
float thres = 0.7; //confidence threshold
float maskThres = 0.4; //mask threshold
vector... |
b9c3c8f46014db8f8fd05e6cb050bf26e929ca5e | 1459942cf1b105fce5fd48be427794802e08ae95 | Waclaw-Nietzsche/linux_lab_8 | /send.cpp | C++ | cpp | 1,229 | no_license | #include <iostream>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
using namespace std;
struct send
{
long type;
char text[256];
} message;
/* Параметр: ключ очереди */
int main(int argc, char const *argv[])
{
key_t key = ftok("wait", 5);
int qid;
message.type = 1;
if ((qi... |
d5c13aba9dd8c9c3324f806055e21f79f0c6e6d0 | 40728dd6696eb0b16cf9224162bb1daf48b92f2a | Hanggansta/VulkanLearn | /vulkan/Texture2D.cpp | C++ | cpp | 10,019 | no_license | #include "Texture2D.h"
#include "GlobalDeviceObjects.h"
#include "CommandPool.h"
#include "Queue.h"
#include "CommandBuffer.h"
#include "StagingBuffer.h"
bool Texture2D::Init(const std::shared_ptr<Device>& pDevice, const std::shared_ptr<Texture2D>& pSelf, const GliImageWrapper& gliTex, uint32_t width, uint32_t height,... |
82013f0260ef841e058d8935e62788475de401ea | 975f5496d90ea4c204387933ab2db9fd6d69fc35 | kleopatra999/Far3bis | /unicode_far/filesystemwatcher.cpp | C++ | cpp | 4,448 | permissive | /*
filesystemwatcher.cpp
class FileSystemWatcher
*/
/*
Copyright © 2012 Far Group
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copy... |
54b90aee55d4aa13dc1b99fd11bce1808859460c | c4bd3e3e874fbd647b814a9d79353df185403e89 | dr0pdb/competitive | /codeforces/gym/geometry_basics_ai_cash/b.cpp | C++ | cpp | 6,747 | no_license | #include<bits/stdc++.h>
#define F(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++)
#define RF(i,a,b) for(long long i = (long long)(a); i >= (long long)(b); i--)
#define MIN3(a,b,c) (a)<(b)?((a)<(c)?(a):(c)):((b)<(c)?(b):(c))
#define MAX(a,b) (a)>(b)?(a):(b)
#define MIN2(a,b) (a)<(b)?(a):(b)
using names... |
0f0ebf208b019276ddb39daa2900df08193a1a7b | 56c5e138d0ba456cd0b7756622505d7a42449b98 | gravity101/gravity101 | /백준/Silver/1699. 제곱수의 합/제곱수의 합.cc | C++ | cc | 490 | no_license | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <stack>
#include <queue>
#include <cmath>
using namespace std;
int main()
{
int N;
cin>>N;
int dp[100001];
for (int i = 0; i <= N; i++)
{
dp[i] = i;
}
for (int i = 1; i <= N; i++)
{
//cout << dp[i]... |
3d4236ed0390db6c7540034c384641ba82f74fa2 | f20bd3f6d793dc273d3042da5acfa31ff35ac6a6 | QuentinVecchio/Dessin2D | /C++/Programmation C++/Triangle/TRectangle.cpp | C++ | cpp | 369 | no_license | #include "TRectangle.h"
TRectangle::TRectangle(Point2D A, Point2D B, Point2D C) : Triangle(A,B,C)
{
}
TRectangle::TRectangle(Segment base, Point2D point ) : Triangle(base,point)
{
}
bool TRectangle::estTRectangle()
{
Segment s1(A,B);
Segment s2(A,C);
Segment s3(B,C);
return s1.estPerpendiculaire(s2) || s1.estPer... |
48e22a894bd75e2a1d8b7107aa3eda9450f96e3f | bacec1a7dd9875fa28449b01d8ec9a185bdfb328 | sysyushuo/Seu_dryang_SINS_WindowsMainControl | /WindowsMainControlV1/ReadSimuDlg.cpp | C++ | cpp | 3,458 | no_license | // ReadSimuDlg.cpp : 实现文件
//
#include "stdafx.h"
#include "WindowsMainControlV1.h"
#include "ReadSimuDlg.h"
#include "afxdialogex.h"
// ReadSimuDlg 对话框
IMPLEMENT_DYNAMIC(ReadSimuDlg, CDialogEx)
ReadSimuDlg::ReadSimuDlg(CWnd* pParent /*=NULL*/)
: CDialogEx(ReadSimuDlg::IDD, pParent)
{
}
ReadSimuDlg::~ReadSimuDl... |
46a96d94e6a2f2bef149bf0855ff02004eb09f61 | 85f83b6b79f31b4036c6e2c413b8f002aec082a2 | yapatta/chKOdai | /yahata_icpc/2010/c/c.cpp | C++ | cpp | 704 | no_license | #include <bits/stdc++.h>
using namespace std;
const int MAX = 1e8;
signed
main(){
int n;
vector<int> odd, four;
for(int i=1;i*(i+1)*(i+2)<=6*1e6;i++)
{
int tmp = i*(i+1)*(i+2)/ 6;
if(tmp %2 == 1) odd.push_back(tmp);
four.push_back(tmp);
}
//初期化
vector<int> dp(1e6+5, MAX), dp_odd(1e6+5, MAX);
dp[0]... |
5ce67f7101a7050d8f00a1421fd151334de0d57a | c0e3e4690a8e7533076bb50a6d9095c1b40ac165 | MarkusWilroth/Grupp-30 | /Rendering/eduRend17v1_handout/source/Main.cpp | C++ | cpp | 20,006 | no_license |
#define VSYNC
#define USECONSOLE
#include "stdafx.h"
#include "ShaderBuffers.h"
#include "InputHandler.h"
#include "Camera.h"
#include "Geometry.h"
#include "Cube.h"
//--------------------------------------------------------------------------------------
// Global Variables
//----------------------------------------... |
1ec77b2f1d1999ecd9e218bc5f441243fb51c034 | a548709a445188a571272b07ed6f974d4ef6a3a1 | blockspacer/r-type | /src/RType/Server/main.cpp | C++ | cpp | 513 | no_license | #include <string>
#include <vector>
#include <cstdlib>
#include <iostream>
#include "Server.hpp"
#include "RType/System/Chrono.hpp"
int main(int argc, char *argv[])
{
try
{
rtype::server::Server server(std::vector<std::string>(&argv[1],
&argv[argc]));
}
catch (std::exception const & e)
{
std... |
59ca9b5f1217c8155c9efc53d3456590ed732aae | 2609b8b1e7413a7dcbeec54861f8f46b8fd85a54 | winksaville/fuchsia | /garnet/bin/ui/input_reader/sensor.cc | C++ | cc | 6,520 | permissive | // Copyright 2019 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 "garnet/bin/ui/input_reader/sensor.h"
#include <stdint.h>
#include <stdio.h>
#include <vector>
#include <hid-parser/parser.h>
#include <hid-par... |
8ef5e918f78f8943829b54ed263cd189e17671de | 85620ffa748d430eac25dce464db01641c49e81e | chuxuantinh/C-PLUS | /StringToInteger.cpp | C++ | cpp | 592 | no_license | class Solution {
public:
int myAtoi(string str) {
int sign=1, base=0, i=0;
while (str[i]==' '){
i++;
}
if (str[i] == '-' || str[i] == '+') {
sign = 1 - 2 * (str[i++] == '-');
}
while (str[i] >= '0' && str[i] <= '9') {
if (ba... |
80e9daa464911bc51f27e37a45d13c4671995218 | 817446d79f0ba3da3e4e76e27aa6bdb76a1aed29 | goaoa1/04_BattleTank | /BattleTank/Source/BattleTank/SpawnPoint.cpp | C++ | cpp | 1,170 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "SpawnPoint.h"
#include "Kismet/GameplayStatics.h"
#include "SprungWheel.h"
// Sets default values for this component's properties
USpawnPoint::USpawnPoint()
{
// Set this component to be initialized when the game starts, and to ... |
71421333531118ada706d276e268f47100dc394e | c5e2ed9c5bf15f9010c2bb29213373c556664f98 | fightseed/XNNPACK | /bench/f16-gemm.cc | C++ | cc | 7,636 | permissive | // Copyright (c) Facebook, Inc. and its affiliates.
// All rights reserved.
//
// Copyright 2019 Google LLC
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <functional... |
10ee33c9148a825fa6e2190a090d628cb3df43b4 | 0989e84ff0299304944bce11468fb2c5d39788f0 | sp-alex-osou/Ants | /Game.cpp | C++ | cpp | 2,319 | no_license | #include "Game.h"
#include "Map.h"
#include "Colony.h"
Game::Game(CL_DisplayWindow& window) : window(window), quit(false), pause(false)
{
// Eventhandler anlegen
slotQuit = window.sig_window_close().connect(this, &Game::onWindowClose);
slotKeyDown = window.get_ic().get_keyboard().sig_key_down().connect(this... |
51ab6e9126f8409c4dbe992385455dfadbf850e8 | 47bac666d94230a89d7dfc1d9a914e44c37aa05c | codexaxor/AlgoRithmLAB | /0_1_Knapsack.cpp | C++ | cpp | 609 | no_license | #include<bits/stdc++.h>
using namespace std;
#define mx 10005
int dp[mx][mx], w[mx], p[mx], capacity,n;
int KNAPSACK(int x, int y)
{
int p1(0),p2(0);
if (x == n)
{
return 0;
}
if (dp[x][y] != -1)
return dp[x][y];
if (y + w[x] <= capacity)
p1 = p[x]+KNAPSACK(x+1,y+w[x]... |
8b1291377f0edb5eeda129f612f2a05b873a54fe | 8eab9e9740d62ae67186a473a3291211d1f7f8bb | Riju1998/hacktoberfest2021-2 | /CPP/SERIES~1.CPP | C++ | cpp | 391 | permissive | #include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,n,p=1,q=2,r=3,sum1=0,sum2=0,sum3=0,sum;
clrscr();
printf("enter the number of terms\n");
scanf("%d",&n);
for(i=1;i<=n;i=i+3)
{
sum1=sum1+p;
p=p*1;
}
for(j=2;j<=n;j=j+3)
{
sum2=sum2+q;
q=q*2;
}
for(k=3;k<=n;k=k+3)
{
sum3=sum3+r;
r=r*3;
}
... |
2fa04f48cfacc82e6c42634d96506138634c2e06 | 59dbeb15c1bea2728c710369bafa6f74ec01b17f | ratelware/logreader | /production/include/datasource/data_source.hpp | C++ | hpp | 272 | permissive | #pragma once
#include <memory>
#include <boost/filesystem/path.hpp>
#include <datasource/content.hpp>
namespace datasource {
class data_source {
public:
virtual std::shared_ptr<content> readfile(const boost::filesystem::path& p);
virtual ~data_source();
};
}
|
76b03854931af2b087824abd98b66dc1edd32d8d | 595518ae9cf9cf060840588e8eae5bd2adbdbf59 | adityasaxena-crypto/HackerRank | /Point Filtering.cpp | C++ | cpp | 2,103 | no_license | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
long long int N, b;
cin >> N;
cin >> b;
vector <bool> in_b (N);
vector <v... |
0c43ebc2f9fdfed1d8cd78f3a0d9d7f11459b7eb | a22975a8ee879118073fc5bf859175cf5dfde4f9 | actor-framework/actor-framework | /libcaf_core/caf/unit.hpp | C++ | hpp | 1,509 | permissive | // This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#pragma once
#include "caf/detail/comparable.hpp"
#include <string>
namespace caf {
//... |
4c262cc7ffcccdc781e39f4c440f76a8ac6ae6f1 | 8a91968feddc6247836fa4c69293156b808c0f19 | EasonLin536/Alg_pa | /PA2/src/mps.cpp | C++ | cpp | 2,456 | no_license | #include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include "mps.h"
using namespace std;
void
chordMap::read(string input_file) {
ifstream fin(input_file);
string line;
while(getline(fin, line)) {
if (line == "0") { break; }
if (_num == 0) {
_num = s... |
5c71f2fd003c95bc9a872f8186bd0e4f3ea9d049 | 04c83a5937b921e5f4ea46bc8cdcd388b9bca028 | bepzi/DISSCO-2.0.2 | /LASS/src/XmlReader.cpp | C++ | cpp | 12,382 | no_license | /*
LASS (additive sound synthesis library)
Copyright (C) 2005 Sever Tipei (s-tipei@uiuc.edu)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any ... |
1c7b6b235bb97d44e0dbaafb19d44c8901432e4d | 105f7815e6777882ba9703a1633988ffae3ebdfd | sand0u/Z-Renderer | /Z-Renderer/common/CApp.cpp | C++ | cpp | 4,313 | no_license | // ============================================================================
// [Include Section]
// ============================================================================
#include "CApp.h"
#include <unistd.h>
#include <cstring>
#include <sstream>
#include <cstdlib>
#include <iostream>
// =====================... |
c5c1a8c382cde65bd4e63843736428b8f52dbb66 | 94ef39a33580d7022761595449ede350571f2c8d | ZingLix/LixSTL | /LixSTL/src/memory/pointer_traits.hpp | C++ | hpp | 1,789 | permissive | #ifndef LIX_POINTER_TRAITS_H_
#define LIX_POINTER_TRAITS_H_
#include <cstddef>
#include "memory_utility.hpp"
namespace lix
{
template<class T>
struct _first_parameter
{
using type = T;
};
template<template<class, class...> class T,
class First, class... Other>
struct _first_parameter<T<First, Other...>>
... |
8b53a6c817910297cdcc0845954c2a14be2a180a | c169e68d1ce9c883c9682f8983d2aea343f687c1 | elmarputs/MissionGeometry | /Basics/coordinateTransformations.cpp | C++ | cpp | 3,480 | no_license | //
// Created by Elmar Puts on 16-11-18.
// Contains functions that provide basic coordinate transformations.
// v1.0 (29-11-2018): Kepler -> Cartesian & Cartesian -> Kepler transformations available
//
// Note: all equations taken from AE4868 (MGOD) || all units are SI units except for length (km)
//
#include <math.h>... |
4da2f8c2129b06849d9abf7fe91dc19eecbe1853 | 0bd6bc28833649e258fc1cfe3695036c795a554c | tudormihaieugen/Cpp2009 | /Neintensiv/S1_2_d/V090.cpp | C++ | cpp | 300 | no_license | #include <iostream>
using namespace std;
int main()
{
int a, b, k, t, p = 0;
cout << "a = "; cin >> a;
cout << "b = "; cin >> b;
cout << "k = "; cin >> k;
t = a;
while (t <= b)
{
if (k = t % 10)
{
cout << t;
p = 1;
}
t++;
}
if (p == 0)
cout << "-1";
} |
8d371176b1087a544510a9babb20a34735790987 | f19c76672a641cc5914bf157e55dce9f18fa35ab | grv747/Codevita-solutions | /parenthesis.cpp | C++ | cpp | 1,469 | no_license |
#include <iostream>
#include <stack>
#include <string>
using namespace std;
void checker(string str,int n)
{
int i;
char x;
stack<char>s;
for(i=0;i<n;i++)
{
if(str[i]=='{'||str[i]=='['||str[i]=='(')
{
s.push(str[i]);
continue;
}
... |
2dc895494d77287c89f0f6ec82bd7017ea65e6e1 | bf473c20c3af502264b24fe138c4aa97c2a76fac | Penn000/ACM | /Contest/hihocoder-70/A.cpp | C++ | cpp | 307 | no_license | // 2018-07-29
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define ll long long
using namespace std;
int main()
{
ll n;
while(cin>>n){
ll ans = n^(n-1);
int cnt = 0;
while(ans){
if(ans&1LL){
cnt++;
}
ans>>=1;
}
cout<<cnt<<endl;
}
return 0;
}
|
320fa4a983ed56e53d5f5d9840e648c31c9c989b | 6af7500fb9ec1c19897f98d670b3e9c21136d0e9 | chao-mu/sol-experiment | /src/main.cpp | C++ | cpp | 384 | no_license | #include <iostream>
// Sol
#include <sol/sol.hpp>
int main() {
sol::state lua;
int x = 0;
lua.set_function("beep", [&x]{ ++x; });
lua.script("beep()");
if (x != 1) {
std::cerr << "hmm... wtf..." << std::endl;
}
sol::function beep = lua["beep"];
beep();
if (x != 2) {
... |
759256bc20bda0228ce2f122ec962bb12e9b690a | 07bb7b92d9e62e531635d03bb16eaa109e3dbe9f | arangodb/arangodb | /3rdParty/boost/1.78.0/libs/format/tools/format_matrix.cpp | C++ | cpp | 25,189 | permissive | // ------------------------------------------------------------------------------
// format_matrix.cpp : tool to check for regressions between boost format
// releases and compare format specification handling
// ------------------------------------------------------------------------------
// C... |
0fb482d33fa08bbbd4a6d47feec6cded8cae7dc1 | 0226b75fc6b3116fc1699157541c77e4c75975fe | 920232796/c- | /simple/第二章练习题目/poj3050-DFS.cpp | C++ | cpp | 936 | no_license | #include<iostream>
#include<sstream>
#include<set>
using namespace std;
const int N = 5;
int G[N][N];
set<int> res;
bool isSquare(int x, int y) {
return (x >= 0 && x < 5 && y >= 0 && y < 5);
}
void dfs(int x, int y, int current_res, int steep) {
if (steep == 6) {
//结束
res.insert(current_re... |
ed412fd3c1ea4b409b8aec385ba650d732bc60f6 | 3695213ff9a600bff44e0797037436d6d1df21e1 | jmcrn/Vivaldi-browser | /components/adverse_adblocking/adverse_ad_filter_list_unittests.cc | C++ | cc | 4,344 | permissive | // Copyright (c) 2019 Vivaldi Technologies AS. All rights reserved
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/adverse_adblocking/adverse_ad_filter_list.h"
#include "app/vivald... |
bdcfabeff4294de999b0413792554978cf0f8aef | 5f42e98315d31adeba664cf20347608a85a36474 | Santos-Rui/Computacao-Grafica | /Fichas Praticas/Ficha 6/main.cpp | C++ | cpp | 4,861 | no_license |
#include<stdio.h>
#include<stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <vector>
#include <IL/il.h>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glew.h>
#include <GL/glut.h>
#endif
using namespace std;
struct Ponto {
float x, y, z;
};
vector<Ponto> pontos... |
b06b472f88947564a235f6bd0682d955bd6e815f | d9299e2b8f53818f1026fcb9b422603d3673e01e | tuliolages/AutonomousAgents-StarCraft | /RoBOTson/Source/Util/Message.cpp | C++ | cpp | 1,678 | no_license | #include "Message.h"
using namespace std;
Message::Message(int type, int code, int senderID, int senderType, int receiverID, int receiverType, std::tuple<BWAPI::TilePosition, int> messageContent)
{
this->type = type;
this->code = code;
this->senderID = senderID;
this->senderType = senderType;
this->receiverID = ... |
4bf04b432251c5632f6359dceffbb883645e899d | 2225f796eb0a6c63d84c2c4a576a2b643bb9cd2a | supavit-siriwan/carla | /Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/WorldObserver.cpp | C++ | cpp | 9,407 | permissive | // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include "Carla.h"
#include "Carla/Sensor/WorldObserver.h"
#include "Carla/Traffic/TrafficLigh... |
39c4c9db0d4c0d30c89f3ac806dadec6437eb31b | 8786d64bd4109a3339b2a086c34ec01406e4e5c6 | lrakla/Leetcode-August-2020-Challenge | /14-Longest-Palindrome.cpp | C++ | cpp | 309 | no_license | class Solution {
public:
int longestPalindrome(string s)
{
vector<int> v(255,0);
int ans=0;
for(int i=0;i<s.size();i++)
{
v[s[i]-'A']++;
if(v[s[i]-'A']%2==0)
ans+=2;
}
return s.size() > ans? ans+1:ans;
}
}; |
9467a36483645c8af2e1ee47a1e975a5a43512d5 | 7ac9c50a2c531f4b9345bdbea508f2d42904f2df | mikhailyumanov/compilers_course_4sem_2020 | /milestone2_ast_tree/include/declarations/ClassDecl.hpp | C++ | hpp | 359 | no_license | #pragma once
#include "declarations/Decl.hpp"
#include "declarations/DeclList.hpp"
#include "visitors/Visitor.hpp"
class ClassDecl: public Decl,
public std::enable_shared_from_this<ClassDecl> {
public:
ClassDecl(std::shared_ptr<DeclList> decl_list);
void Accept(std::shared_ptr<Visitor> visitor) override;
s... |
ec7189e4eca5e0ce243f6cf0f4626fe2ddaa958e | ec578af6fb2134c28f7d9f6c99715df846bfa500 | Shad0wSeven/cppfund | /USACO Bronze/Mixing Milk/mixmilk.cpp | C++ | cpp | 1,268 | no_license | #include <iostream>
#include <fstream>
using namespace std;
int x[3];
void pour(int abs, int num, int m1, int m2, int m3, int c1, int c2, int c3) {
if(abs == 1) {
// from 1 -> 2
m2 += m1;
m1 = 0;
m1 += (m2 - c2);
if(m1 < 0)
m1 = 0;
if(m2 > c2... |
b44587267417b5f97d4b363f3af949a7a068aed7 | 056abb43474ad7e31d503f2ece900ffdc230e632 | marklove5102/CPlusPlusCode | /8.1-DataStruct_Queue/5-1-QueueCustomer/5-1-QueueCustomer/Customer.cpp | C++ | cpp | 437 | permissive | //
// Customer.cpp
// 5-1-QueueCustomer
//
// Created by mtianyan on 2018/7/25.
// Copyright © 2018年 mtianyan. All rights reserved.
//
#include <iostream>
#include "Customer.h"
using namespace std;
Customer::Customer(string name, int age)
{
m_strName = name;
m_iAge = age;
}
void Customer::printInfo() con... |
9283840db65f000afe14f19447cb6d1bf4811409 | 5e174d932e5dd5a97ba7050b29cb16f6acbec32f | queid7/mmh | /PyCommon/external_libraries/BaseLib/image/ImageFileBmp.cpp | C++ | cpp | 3,005 | no_license | #include "stdafx.h"
#include "stdimage.h"
#include "Image.h"
#include "../baselib/utility/fileex.h"
#define DIB_HEADER_MARKER ((WORD) ('M' << 8) | 'B')
/////////////////////////////////////////////////////////////////////////////
// CCImage load/save bmp
BOOL CImage::SaveBMP(LPCTSTR lpszFileName)
{
CFil... |
0f6b99a5fbfcf74529c1f74b137cc7b41c2c0224 | 73eaf3db0eed30911bf6b0d86494c250c6791ab1 | shiver/blaze-lib | /blazetest/src/mathtest/dmatdmatsub/M6x6bM6x6b.cpp | C++ | cpp | 3,550 | permissive | //=================================================================================================
/*!
// \file src/mathtest/dmatdmatsub/M6x6bM6x6b.cpp
// \brief Source file for the M6x6bM6x6b dense matrix/dense matrix subtraction math test
//
// Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
//
// This ... |
1a1ceb4c2c1ad1de0b620f69c259d761069176e0 | 6dfed0ae17bc0f3eb3e01547633fba6f71812fba | GrzKon/pto2014_-lazarskiGIMP | /src/core/transformations/bin_gradient.cpp | C++ | cpp | 1,188 | no_license | #include "bin_gradient.h"
BinarizationGradient::BinarizationGradient(PNM* img) :
Transformation(img)
{
}
BinarizationGradient::BinarizationGradient(PNM* img, ImageViewer* iv) :
Transformation(img, iv)
{
}
PNM* BinarizationGradient::transform()
{
int width = image->width();
int height = image->height... |
5962ce2ed8b58940d3d3966d356b0a0b9bb61318 | 2c371573cc32fd084a4fa3117ec930ccbb3a4d06 | siosio34/AlgorithmStudy | /z_unclassified/9507.cpp | C++ | cpp | 558 | no_license | #include <iostream>
#include <vector>
using namespace std;
vector<long long int> ans;
long long int dp[70];
long long int solve(int num) {
if(dp[num] > 0)
return dp[num];
if(num < 2) return dp[num] = 1;
else if(num == 2) return dp[num] = 2;
else if(num == 3) return dp[num] = 4;
else return dp[num] = solve... |
f0c53f4f809075cd3ad68f6897dca588bda48f18 | 42be167856c43a91f443bd4971b1d6d1d0b741b5 | olitheolix/newton-dynamics | /newton-4.00/tests/rigidBody_test.cpp | C++ | cpp | 3,124 | permissive | /* Copyright (c) <2003-2019> <Newton Game Dynamics>
*
* 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... |
70ee1b869f3592f4d7507ccf0c6bef7b8ecac814 | e2ecfaa479da5fda1367f554c943ee900513398b | ericvcastro/TP1-POO | /Modelo_Relatorio_CDv2/graphics.cpp | C++ | cpp | 7,656 | no_license | /** file: graphics.cpp
** brief: Graphic helpers implementation
** author: Andrea Vedaldi
**/
#include "graphics.h"
#include <cassert>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <iomanip>
inline int ROUND(float x) { return (floor(x + 0.5)); }
typedef std::vector<Figure*... |
ef998de03889b682e9459ac709d98afcce05091e | ec85a69f4fc668f9f6603efc4c0c60b452aa4e94 | nathanolah/OOP345 | /MS03/ms3/Workstation.cpp | C++ | cpp | 2,157 | no_license | /*Name: Nathan Olah
Seneca Student ID: 124723198
Seneca email: nolah@myseneca.ca
Date of completion: 2020/03/28
I confirm that I am the only author of this file
and the content was created entirely by me.*/
#include <iostream>
#include <memory>
#include <deque>
#include "Workstation.h"
#include "Station.h"
#in... |
ccf2982c7cb86da7225e65817fdec3bc2fc0fae3 | 67e2b3099bf3511ca3c777df292979eacba66faf | ulucsahin/StoneAgeSurvival | /Source/StoneAgeColony/NightRegularAI.cpp | C++ | cpp | 863 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "NightRegularAI.h"
#include "SettlementMember.h"
#include "Settlement.h"
#include "House.h"
ANightRegularAI::ANightRegularAI()
{
}
void ANightRegularAI::Act()
{
UE_LOG(LogTemp, Warning, TEXT("ANightRegularAI::Act"));
GoHome();... |
d7f2e1f7d3716f4785dec13003a46595506138a7 | aaf7d462a89cc8453e79ca6514af1046a0c72368 | lnikon/virtual_machine | /src/code_section_parser.cpp | C++ | cpp | 6,846 | no_license | #include "code_section_parser.hpp"
#include "utility.hpp"
#include "logger.hpp"
#include "lexer_defs.hpp"
CodeSection CodeSectionParser::parse(std::fstream &inputStream)
{
CodeSection codeSec;
bool isCodeSectionPresent = false;
bool isCodeSectionOk = false;
auto line = std::string{};
while(!isCode... |
35f3426941c2a88c7e9b1462348f17cce136b1b7 | 7388634c61b58b92ad388e1510bbac6a6b8f4ba0 | 514467952/Mymuduo | /mymuduo/Thread.cpp | C++ | cpp | 1,139 | no_license | #include"Thread.h"
#include"CurrentThread.h"
#include<semaphore.h>
std::atomic_int Thread::numCreated_ (0) ;
Thread::Thread(ThreadFunc func,const std::string &name)
:started_(false)
, joined_(false)
, tid_(0)
, func_(std::move(func))
, name_(name)
{
setDefaultName();
}
Thread::~Thread()
{
if(... |
61421befcf9ba1afeed40bbb7b598be7a612c541 | b2b447a110f9bbaefcd6958af4cd0ae59b0c5c2c | mdzobayer/Problem-Solving | /C++ Programming/03. Third Course/09_linkedListPart2.cpp | C++ | cpp | 1,293 | no_license | #include <iostream>
using namespace std;
class Node {
public:
string data;
Node *next;
Node(string aData, Node *aNext) {
data = aData;
next = aNext;
}
string getData() {
return data;
}
Node *Next() {
return next;
}
void setNext(Node *aNext) {
... |
1273561961b9dd4813ea1b281d9ae9a490953828 | 1f46c9784ccf6741e31fd4ab837bd8ea31884b52 | SCIInstitute/Seg3D | /src/Core/State/StateEngine.cc | C++ | cc | 11,163 | permissive | /*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2016 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software")... |
6916d45b95b51bf8a87e0554d813d6bfcc85cc36 | 757c5ee27027258ba75a3b68c848051228094406 | doubletony/leetcode | /atoi.cpp | C++ | cpp | 674 | no_license | class Solution {
public:
int atoi(const char *str) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int i = 0;
unsigned int rsl = 0;
int neg = 1;
while ( str[i] != '\0' && str[i] == ' ' )
{
i++;
}
... |
6157e4210b399441a78c969accac08520197d91d | 9b462663199fba6c66da8bd84113d5b25976d9bf | luisfnqoliveira/sst-elements | /src/sst/elements/savannah/savcomp.cc | C++ | cc | 4,133 | no_license | // Copyright 2009-2016 Sandia Corporation. Under the terms
// of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
// Government retains certain rights in this software.
//
// Copyright (c) 2009-2016, Sandia Corporation
// All rights reserved.
//
// This file is part of the SST software package. For license
... |
7fb1a38432d0e9bd8b94b241252a9c95e6d3dec6 | 0afd81e9218a259ab89035d849c9f90399f44710 | apache/openoffice | /main/vcl/inc/vcl/salctype.hxx | C++ | hxx | 2,354 | permissive | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
aed5b453f5c63880994a124be4cb6dc0a59e821c | 93dec4c42ea8f83775ab3c043caf2cfea6ceb4dc | heanglightman/chromium | /ui/accessibility/platform/ax_platform_node_textrangeprovider_win_unittest.cc | C++ | cc | 39,343 | 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 "ui/accessibility/platform/ax_platform_node_win_unittest.h"
#include <UIAutomationClient.h>
#include <UIAutomationCoreApi.h>
#include "base/win... |
4649981da32594be9ca280172b86c5911e8e0ffe | 959412bb6e048365218ca06d64989e087e8fe4d4 | espipj/ArtificialVisionQR | /src/VisionQR.cpp | C++ | cpp | 4,595 | no_license | #include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <cmath>
#include <iostream>
/* Desarrollado por:
Mario Alcantara Garrote
Alex Hernandez Gonzalez
Pablo Espinosa Bermejo
*/
cv::Point calcularVerticeAbajoIzq(cv::Rect r){
return cv::Point(r.x+r.width,r.y+r.height);
}
int calcula... |
1fe8389aaacb02d6dfaf068dacab2203e0335323 | 10e07ebb97566594ada7aa8e4d57da21ba9b45a8 | maxiaoyuzdz/studywork2 | /Game/week4/Shader Lab/Shader Lab.cpp | C++ | cpp | 30,278 | no_license | //-----------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////... |
c9bbe697008ecf42e1cc18689df21fba9ff67454 | d4f2ddc8edeccf72d6c8f358d17e8de5288b7cf7 | milandamen/grimwall | /src/GUI/Screen/ScreenGame.cpp | C++ | cpp | 5,034 | no_license |
#include "ScreenGame.h"
ScreenGame::ScreenGame(IGame* game, AGUIManager* manager)
: GUI(manager), game(game)
{
this->manager = manager;
this->container = manager->addContainer(0, 0, 1024, 200);
this->container->setBackgroundColor(0, 0, 0, 128);
this->manager->setX(0);
this->manager->setY(... |
d6ce234cd3b84c6589edc191a3db429832184be1 | 8fd509a8d5eae65eba84a1f9da9b8ce39a1aa645 | Shuttles/HZOJ-C | /4.ACMexam/3.小k的迷宫.cpp | C++ | cpp | 2,085 | no_license | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define ind(i, j) ((i) * (m) + (j) + 1)
#define MAX_N 1000000
int mmap[1005][1005];
typedef struct UnionSet {
int *father, *size;
int n;
} UnionSet;
UnionSet *init_UnionSet(int n) {
UnionSet *u = (UnionSet ... |
8006a72d964c70902f5b2ddeca3266524661553e | 405d4f7d4c6923ff331126e519f61fdae51803f7 | TritiumCoins/trtm | /src/init.cpp | C++ | cpp | 35,677 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txdb.h"
#include "walletdb.h"
#include "bitcoinrpc.h"
#include "net.h"
#i... |
28c6a60fd985867840fd4b533d52d2c34424412b | c3e05afeefb576012f8e6aa94883a6f9a88626cd | seken/DeskClock | /src/main.cpp | C++ | cpp | 482 | no_license | #include <QApplication>
#include <QDesktopWidget>
#include "ClockWindow.hpp"
int main(int argc, char **argv) {
QApplication app(argc, argv);
ClockWindow window;
app.setApplicationName("DeskClock");
app.setApplicationVersion("1.0");
app.setOrganizationDomain("http://seken.co.uk");
app.setOrganizationName("Markit... |
3036173310824b43e7a7d003485f98d44166e71f | 4f29a9dc2a63328310d22dc460fe40fdae3305fb | zotvent/competitive-programming | /leetcode/algorithms/760 - Find Anagram Mappings.cpp | C++ | cpp | 468 | no_license | class Solution {
public:
vector<int> anagramMappings(vector<int>& A, vector<int>& B) {
int n = A.size();
vector<int> res(n);
vector<bool> used(n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (A[i] == B[j] && !used[j]) {
... |
43bb55db96159faa2544ee98d388677c148f9342 | 9fc6577b4143466999222810f88b01382969111e | pokaa3a/LeetCode | /problems/1551_Minimum_Operations_to_Make_Array_Equal.cpp | C++ | cpp | 905 | no_license | #include <cmath>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <set>
#include <stack>
#include <sstream>
#include <string>
using namespace std;
struct TreeNode
{
int val;
TreeNode* left;
Tr... |
8203cfdcc722553ffb7491d704b3ae654c237e1b | 7a14cd73090808d4e1a532fd418cb31d794255f1 | Abdur-Rahim-sheikh/Light-oj-code-hint | /Begineer/1182 - Parity/.cpp | C++ | cpp | 532 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
long long int binary,test,n,i,j,rem;
scanf("%lld",&test);
for(i=0; i<test; i++)
{
scanf("%lld",&n);
j=0;
while(n!=0)
{
rem=n%2;
n=n/2;
if(rem==1)
{
j+... |
dc2b40ca0e4ed5ddf8837afb34c4aaf020dbd954 | 95d52f0e9624c752ebb991d0d8fdf60777145a61 | ak795/acm | /uva/10115-Automatic_Editing/1.cpp | C++ | cpp | 2,855 | no_license | #include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <deque>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string... |
ba1c20447342ce308542a2746e0b521c03ed3f1f | 1deb80ae731e8f94988e1d58d367fed785f0617f | ArcEarth/VR-Interaction | /Causality/Common/Textures.cpp | C++ | cpp | 19,647 | no_license | #include "Textures.h"
#include "DirectXHelper.h"
#include "DXGIFormatHelper.h"
#include <DDSTextureLoader.h>
#include <WICTextureLoader.h>
#include <algorithm>
#include <ScreenGrab.h>
#include <wincodec.h>
using namespace DirectX;
using namespace std;
ITexture::ITexture(ITexture&& Src)
: m_pResource(std::move(Src.m_... |
fad36f2f509082147581fda40dd5bb6215c69c2b | aea6bcd42781e07623b4b9fc3dfa70b4c49b3254 | SheikhElMoctarG/Cpp | /references/index.cpp | C++ | cpp | 281 | no_license | #include<iostream>
using namespace std;
int main(){
int a = 3;
string s = "Sheikh";
cout << "references for variable s: "<<&s<<endl;
cout << "references for variable a: "<<&a<<endl;
int &r = a;
cout <<&r << endl;
cout <<&a << endl;
return 0;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.