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 |
|---|---|---|---|---|---|---|---|---|
6e37a3cbf4980b234c0ef3b33bd1db74ccc22805 | 80e26dfff0a32657e5871faac4f34d5b8386479c | risteon/code_jam | /2016_Round_1B/C_Technobabble/template.cpp | C++ | cpp | 2,263 | permissive | #include <algorithm>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <climits>
#include <numeric>
#undef NDEBUG
#include <cassert>
#include "io_r... |
ed5f28bfa0c444ad57dd25d05bdb61c3ef68df98 | b206ab5b4471330718109120f9d8e8024f7132b1 | marnando/cpp_cli_sample | /SayHelloNative/Entries.cpp | C++ | cpp | 552 | permissive |
#pragma unmanaged
#include <cstring>
#pragma managed
#include <msclr/marshal_cppstd.h>
#pragma unmanaged
extern "C" bool SayHelloTo(const char *YourName, char *Result, int ResultLength);
#pragma managed
bool SayHelloTo(const char *YourName, char *Result, int ResultLength)
{
using namespace msclr::... |
8c58f54e2bb2875b337955b66641505a4c914ce6 | e9e150a560e5f0995fc212e47f69b6306461ee16 | viveksinghvi/Competitive-Coding-Playbook | /geometry/main.cpp | C++ | cpp | 1,957 | no_license | #include <bits/stdc++.h>
using namespace std;
int polygonArea(){
int area = 0;
int N = lengthof(p);
//We will triangulate the polygon
//into triangles with points p[0],p[i],p[i+1]
for(int i = 1; i+1<N; i++){
int x1 = p[i][0] - p[0][0];
int y1 = p[i][1] - p[0][1];
in... |
0f0a527966e9fbff10f044ce15b78d33c2c66ccc | 7428ccbc8f3f123f413681aed50a604bfc727d66 | wenjinwong/effectivecpp | /effectivec++/11handleAssignmentToSelfInOperator.cpp | C++ | cpp | 582 | no_license | #include<iostream>
#include<string>
class Widget{
public:
Widget& operator=(const Widget& rhs)
{
/*
if(this == &rhs) return *this;
delete pb;
pb = new int(*rhs.pb);
std::cout << *pb << std::endl;
return *this;
*/
/*
int *pOrig = pb;
pb = new int(*rhs.pb);
delete pOrig;
return *... |
56f9c618ad18c1285cb1dbc42d6f81e932588def | fcff139681bbdfe6d8ac65fe6171f4d60bf0ff32 | TorqueGameEngines/Torque3D | /Engine/lib/bullet/examples/ExampleBrowser/GwenGUISupport/gwenUserInterface.cpp | C++ | cpp | 15,469 | permissive |
#include "gwenUserInterface.h"
#include "gwenInternalData.h"
#include "Gwen/Controls/ImagePanel.h"
#include "Gwen/Controls/ColorPicker.h"
//#include "Gwen/Controls/HSVColorPicker.h"
class MyGraphWindow* graphWindow = 0;
GwenUserInterface::GwenUserInterface()
{
m_data = new GwenInternalData();
m_data->m_toggleBut... |
2b1a3eb42bb30a5e278d3c51b9421d8a589194e2 | 94c24e4009ea224eec3674a2eb6fad005036e010 | kobyou/Lottery | /ShowResult.cpp | C++ | cpp | 6,056 | no_license | // ShowResult.cpp : implementation file
//
#include "stdafx.h"
#include "randlottery.h"
#include "ShowResult.h"
#include "RandLotteryDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
///////////////////////////////////////////////////////////////////... |
66c0e707e75c39c267f2344a75fbbb8a7f2de5fc | fef85081c13c076a15884585b5e05671c2780a9f | WuyangPeng/Engine | /Assist/Code/Toolset/CoreTools/ExportTest/CoreTools/Detail/Module/AnimationTestExportMacroImpl.cpp | C++ | cpp | 861 | permissive | /// Copyright (c) 2010-2023
/// Threading Core Render Engine
///
/// 作者:彭武阳,彭晔恩,彭晔泽
/// 联系作者:94458936@qq.com
///
/// 标准:std:c++20
/// 版本:0.9.1.2 (2023/07/31 10:08)
#include "Animation/AnimationExport.h"
#include "AnimationTestExportMacroImpl.h"
#include "CoreTools/Helper/ClassInvariant/AnimationClassInvariantMacro.h"... |
9d6e73156312348c76a2bd0e8eec70335d974db0 | 0e97b3a9bc9d26190063fee5506ada595a0277d6 | AmyMcNeill001/O-k-_Cache | /cache/main.cpp | C++ | cpp | 2,949 | no_license | #include <iostream>
#include <string>
#include <stdlib.h>
#include <unordered_map>
using namespace std;
struct site
{
int siteName;
site* newer;
site* older;
site();
site(int &inName, site* inNewer, site* inOlder);
site& operator=(site& rhsObj);
};
site::site()
{
siteName = -1;
ne... |
86bdac7c56dc0008d64661c35385b686f8a4321c | 462fca10fda2c8161414a8ca90283dad10630b9a | jovanivanovic/chromium | /services/network/sec_header_helpers.cc | C++ | cc | 7,535 | 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 "services/network/sec_header_helpers.h"
#include <algorithm>
#include <string>
#include "base/feature_list.h"
#include "net/base/registry_contr... |
c1d525bdc3d7ef930390f217873db06bc82990f1 | f7dc6e303a27404f08320c497b88e3f4743b1387 | awcook95/CYK-algorithm | /CYKfinal.cpp | C++ | cpp | 14,868 | no_license | #include <iostream>
#include <string>
#include <utility>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
bool isNullable(string s ,vector<char> nullableStates)
{
bool flag = false;
for(int i = 0; i < s.size(); i++)
{
if(s[i] == '|')
{
if(flag)
... |
07118fd2ae96cb54ab076e213b74bb7cc3578427 | e4b3b2be12e95e660d92676bbc5492586e1557a4 | gengyouchen/leetcode | /889_construct-binary-tree-from-preorder-and-postorder-traversal/DFS.cc | C++ | cc | 805 | no_license | class Solution {
public:
/*
* time: O(n), space: O(n), where n = # of nodes
*
* See also:
* 105. Construct Binary Tree from Preorder and Inorder Traversal
* 106. Construct Binary Tree from Inorder and Postorder Traversal
* 1008. Construct Binary Search Tree from Preorder Traversal
*/
T... |
9d2e3dc0a72b482d26fbe7bde33eed57bda8b163 | fae4248ea72d2e5665b3ebba91edcb3f04befeed | rongpiaoxiangcunwa/CppNioSocket | /src/include/boostsctp/asio/ip/sctp.hpp | C++ | hpp | 3,202 | no_license | #ifndef BOOST_ASIO_IP_SCTP_HPP
#define BOOST_ASIO_IP_SCTP_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma once
#endif
#include <boost/asio/basic_socket_acceptor.hpp>
#include <boost/asio/basic_socket_iostream.hpp>
#include <boost/asio/basic_stream_socket.hpp>
#include <boost/asio/ip/basic_endpoint.hpp>
#incl... |
7884f9d76b4c12697f75066c1c0ef3f253c4fb45 | e08abc16814e0b8c543a2891dfffd9728b4f6350 | dmitry-mikhin/comma | /name_value/applications/name-value-eval-preparse.cpp | C++ | cpp | 29,413 | permissive |
#include <iostream>
#include <fstream>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <string>
#include <cctype>
#include <comma/application/command_line_options.h>
// name of executable (will be set to argv[0])
static const char *exec_name = "";
void usage()
{
std::cerr << "Usage:... |
f906ba0e40535499d3a6bf6de83da0f08df55127 | 0e418bf4920e464c514b46085d75fb55bbd929a8 | vsicurella/TerpstraSysEx.2014 | /Source/AllKeysOverview.cpp | C++ | cpp | 17,707 | permissive | /*
==============================================================================
This is an automatically generated GUI class created by the Projucer!
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loade... |
0132cdf3e76bd3779de8a03762c5ae74d0055ed8 | 16436bf949a4610f447027d6a39e70db56b7def1 | own2pwn/veles | /test/util/encoders/text_encoder.cc | C++ | cc | 2,157 | permissive | /*
* Copyright 2016 CodiLime
*
* 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 to in writ... |
3ae07ac5383ac3fac31f148e8cf69fd15e44f5f7 | 96583796f8b713bd299f388c2ec64d6611e9731f | giuspugl/toast | /src/libtoast/tests/toast_test_healpix.cpp | C++ | cpp | 1,130 | permissive |
// Copyright (c) 2015-2020 by the parties listed in the AUTHORS file.
// All rights reserved. Use of this source code is governed by
// a BSD-style license that can be found in the LICENSE file.
#include <toast_test.hpp>
#include <cmath>
TEST_F(TOASThealpixTest, pixelops) {
// These numbers were generated wit... |
7b348297f26703bb7b3d739db5f66e692a509a36 | e6d62b86e458a8fa2241c37d5c1a4f91df66b5f7 | kartiklakhotia/pcpm | /src/propagationBlocking/pr.cpp | C++ | cpp | 14,483 | no_license | /**
* Author: Kartik Lakhotia
* Email id: klakhoti@usc.edu
* Date: 5-Jun-2017
*
* This code implements propagation blocking to compute parallel pagerank
*/
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <time.h>
#include <cmath>
#include <vector>
#include <algorithm>
#i... |
889ffa6f91e804a7bb7d88f0f88c39650e1f765f | eea94df89cc374e6c7d71b1813e37fbbc623ef11 | enterstudio/swift-lldb | /source/Commands/CommandObjectSettings.cpp | C++ | cpp | 42,832 | permissive | //===-- CommandObjectSettings.cpp -------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
6e9da99fd19b8ef8c68babc7ef5fc15972c42a87 | f86b3212fc74d792140572ee323549332c66305f | LeoFalco/algoritimo | /ExerciciosSala/exercicio3.cpp | C++ | cpp | 894 | no_license | /*
* Autor: Leonardo Jesus Falco
* Email: leonardo.falco@outlook.com
*/
#include <stdio.h>
#include <stdlib.h>
int main(){
int tamanho = 3;
float soma [tamanho];
float a[tamanho];
float b[tamanho];
int i; // controle do lašo for
for(i = 0 ; i < tamanho ; i++ ){ // preenchendo a
print... |
1d32625978d60ab17b4eebe28d42fd98b1c34382 | 060bba8fdd0a3d621f48501e31316d16749c0446 | BloodyChicken/atm-automated-teller-machine | /miniAtm.cpp | C++ | cpp | 4,282 | permissive | // Dibakar Sutra Dhar
// Please update idpassword.txt for your own User ID and Password
// Please update bankdetails.txt for your own balance.
#include "stdafx.h"
#include <iostream>
#include <string>
#include <fstream>
#include <conio.h>
#include <cctype>
#include <ctime>
using namespace std;
int main() {
string u... |
cd25472b1e89914fcb233d653f2c1bdd0ca9de0a | fc9f2caac40c4d7a27fe5238fecd89575fd865ec | esl-sun/PX4 | /src/systemcmds/tests/test_mixer.cpp | C++ | cpp | 16,472 | permissive | /****************************************************************************
*
* Copyright (C) 2013-2019 PX4 Development Team. 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. Redi... |
cedb4d64f45ef62471b02df33c3c03c4b31e92ef | 253d14441561562cc3fa1f2e6b5bfa570ee3f096 | jhihn/Vaudeville | /mainwindow.cpp | C++ | cpp | 2,519 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPainter>
#include <QDebug>
#include "qhtml5canvas.h"
#include "httpserver.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
setAutoFillBackground(true);
startTimer(1000);
m_commandBuffer=QBuf... |
feede65e6b5f9fd05f89bb9f5948a7fe28f2f99f | 8bafe809ea81ba7293befcae4349c1de8b5967d4 | jastrzebskim/Concurrent | /barrier.cpp | C++ | cpp | 1,441 | no_license | #include <iostream>
#include <condition_variable>
#include <mutex>
#include <thread>
#include <chrono>
#include <array>
#include <ctime>
class Barrier {
private:
int resistance;
std::condition_variable cv;
std::mutex cv_m;
public:
Barrier(int res) {
resistance = res;
}
void reach() {
... |
35ea38eb1874a0f92927246f0272ef6c8d843da2 | 88f59d36832ca71c37820d1fc4304fbdedf29485 | Maxim-Deriuha/LabSE | /deriuha3/src/deriuha3.cpp | C++ | cpp | 831 | no_license | //============================================================================
// Name : deriuha3.cpp
// Author : deriuha
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#i... |
e9d8ada87e6c10b7a866ba16644db6b8ae879b83 | 619d41231e59201c1ce0f93735c3a8d6c4f82a14 | royzxq/AudioSegmentation | /areamoments.cpp | C++ | cpp | 3,824 | no_license |
#include "stdafx.h"
#include <stdio.h>
#include <memory.h>
#include <math.h>
#include "parameters.h"
// 计算 area of moments 特征时用
// 转化为对数值之后的值,用一个较大数归一化,这样避免计算过程溢出
// 在样本数据集上实验发现,FFT bin 最大值都小于 1.0E+7,所以乘完 "CCCC_FACTOR" 参数之后
// 约为 1.0E+10,所以取对数后约为 10.0
#define BIG_NORMALIZER_VAL 100.0
// 返回值:结果特征维数... |
eefbc9a640c7c1db6995c3384434e0b14509bec2 | 7d5604bc493d6a896d35a74278a403bc4c695c90 | kungfu-monkey/Supernova | /Supernova/unittest/projects/msrv/multimedia/mmplayer/stubs/MSrv_MM_AudioPlayer_stub.cpp | C++ | cpp | 49,943 | no_license | //<MStar Software>
//******************************************************************************
// MStar Software
// Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
// All software, firmware and related documentation herein ("MStar Software") are
// intellectual property of MStar Semiconduc... |
929d13ba34824e07729ea5ab31369e5307a98942 | dd13d9c9486fc36008319ecda1e0f2d2601de6f7 | yibojiang/ogre | /Components/RTShaderSystem/src/OgreShaderFFPTexturing.cpp | C++ | cpp | 41,777 | permissive | /*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org
Copyright (c) 2000-2014 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtain... |
184d85257f7184310ae09820145479ee69a6312b | 610d2b45a82fa542cdf58a1eb7aac4628b58e260 | OlehKostiv/MyXml | /myXml/myXmlDocument.cpp | C++ | cpp | 1,973 | no_license | #include "myXmlDocument.h"
#include "myCstrFunctional.h"
#include <cassert>
MyXml::Document::Document():
Document("theUgliestDefaultDocNameEver", Tree(), Declaration())
{}
MyXml::Document::Document(Char * docName, Tree&& docRoot, Declaration&& xmlDeclaration):
name(AllocateCopyOf(docName)),
root(new Tree(s... |
9220a20c27495933a5e938cccccaf83802b71dca | 00265241f9f628cef783ddf4dac51153fce86db3 | youngtry/SevenClient | /Classes/lib/str_cli.cpp | C++ | cpp | 374 | permissive | #include "common.h"
void str_cli(FILE *fp, int sockfd)
{
char sendline[MAXLINE], recvline[MAXLINE];
while (Fgets(sendline, MAXLINE, fp) != NULL) {
Writen(sockfd, sendline, strlen(sendline));
if (Readline(sockfd, recvline, MAXLINE) == 0)
err_quit("str_cli: server terminated prematurely");
Fputs(recvline, ... |
760215a1af5e03301ef58eebb5bde42a74f9c123 | e5ccfbabb5579b8ea3ea1f552b04153e9f619c6d | Abhishekkapoor800/DSA_Cpp | /Functions/Conversions/binary2decimal.cpp | C++ | cpp | 377 | no_license | #include<iostream>
#include<math.h>
using namespace std;
int bin2Dec(int n){
int equiDec=0;
int i=0;
while (n>0)
{
int lastDigit= n%10;
equiDec += lastDigit*(pow(2,i));
i++;
n=n/10;
}
return equiDec;
}
int main(){
int n;
cout<<"Enter the binary number"<... |
5b5cf0febf70023f773b88a5f1c7372670b6c4a6 | cf9877235134d48754882b29560fbd2cee051202 | annacasters/Projektarbeit-WiSe-2017-18 | /main.cpp | C++ | cpp | 13,584 | no_license | #include <iostream>
#include <fstream>
#include <string.h>
#include "sneaker.h"
#include <stdio.h>
#include <vector>
using namespace std;
int main()
{
fstream sneakersammlungXML; // XML wird eingelesen
sneakersammlungXML.open("sneakersammlung.xml"); //Datei wird geöffnet
if(!sneakersammlungXML){
... |
7ce3da337a98dad098dfcb5f471a80f526add2a9 | f3167a0782e6a2f9e7694a7da52cdacd03b3885f | xpharry/publish_selected_patch | /src/publish_selected_patch.cpp | C++ | cpp | 3,977 | no_license | #include "rviz/selection/selection_manager.h"
#include "rviz/viewport_mouse_event.h"
#include "rviz/display_context.h"
#include "rviz/selection/forwards.h"
#include "rviz/properties/property_tree_model.h"
#include "rviz/properties/property.h"
#include "rviz/properties/vector_property.h"
#include "publish_selected_patc... |
8e4aac62425ce5ab29ffc09ec7bb73d8bbed9d94 | 1b83e956efe6a84f9b00f70b1d743327dd320890 | blaisedias/SplitOrderedLists | /solist_dbg.hpp | C++ | hpp | 5,373 | no_license | /*
Copyright (C) 2017-2019 Blaise Dias
This file 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 later version.
It is distributed in the hope that it wi... |
1a68ddecd7d45b29e92949c30dea39ef99db1246 | a77a58cb6f5823384669bfba9edb74bac643ff7b | lxh027/AccountManagement | /billing_service.cpp | C++ | cpp | 3,327 | no_license | #include <iostream>
#include <cstring>
#include "model.h"
#include "billing_file.h"
#include "billing_service.h"
#include "card_service.h"
using namespace std;
LoginInfo* loginInfo;
LoginInfo* headLogin;
int cntLogin;
Billing* billing;
Billing* headBilling;
int cntBilling;
/*
* name: isLogin
* feat: 判断是否已登录
* pa... |
326eacba118471fc825027ae08bed675f30bc9d0 | 2b83acb7b5a4f045a5c13acd94aae14b1b8ff1f5 | dmtta/mastd863_sims2014 | /w02_hw01_noRefresh_02/src/ofApp.cpp | C++ | cpp | 2,787 | no_license | #include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetBackgroundAuto(false);
ofBackground(ofColor::black);
center.x = ofGetHeight()*0.5;
center.y = center.x;
generalAngle = 10;
// for (int i = 0; i < 200; i++) {
//
// circle newBall;
// newBall.s... |
4bd19888f558f91348738a39c2edc38523e84889 | 2cf496b215a445bf39be06945e213beb568e6184 | yuri410/rpg | /external/DirectXShaderCompiler/tools/clang/test/SemaTemplate/temp_explicit.cpp | C++ | cpp | 4,014 | permissive | // RUN: %clang_cc1 -fsyntax-only -verify -pedantic -Wc++11-compat %s
//
// Tests explicit instantiation of templates.
template<typename T, typename U = T> class X0 { };
namespace N {
template<typename T, typename U = T> class X1 { };
}
// Check the syntax of explicit instantiations.
template class X0<int,... |
fe567c64e256ffc84c74b4038a8e1238bf1cc502 | 5fda99f89513cd40189f14fe10f6f1819720edf6 | HekpoMaH/Olimpiads | /codeforces/round306/d.cpp | C++ | cpp | 888 | no_license | #include<bits/stdc++.h>
using namespace std;
#define pb push_back
int k,i,j,br=2,n,m;
vector<int> v;
int main(){
ios_base::sync_with_stdio(false);
cin>>k;
if(k%2==0){
cout<<"NO\n";
exit(0);
}
cout<<"YES\n";
n=2+4*(k-1);
m=n*k/2;
cout<<n<<" "<<m<<"\n";
cout<<"1 2\n";
for(int i=1... |
325c49740b553a48083a84c3dad679e6bfddbd95 | e1f5a4a401eff5a850fc3ab4fbdcae82abc085db | Bappy38/Light-OJ-solved-Problem | /Beginner/LOJ-1305.cpp | C++ | cpp | 4,024 | no_license | #include<bits/stdc++.h>
#define perfect int main()
#define ll long long int
#define ull unsigned long long int
#define pii pair<int,int>
#define pll pair<ll,ll>
#define sc scanf
#define scin(x)... |
eebd50725c792ab74f175d730fcc07ad1c90c4e2 | 429631650f86ce48cbc97a93b3aaa50606702a6c | studoot/PEGTL | /src/test/pegtl/contrib_tracer.cpp | C++ | cpp | 2,242 | permissive | // Copyright (c) 2014-2018 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
#include "test.hpp"
#include <tao/pegtl/contrib/tracer.hpp>
namespace tao
{
namespace TAO_PEGTL_NAMESPACE
{
using GRAMMAR = sor< failure, one< 'a' > >;
template< ... |
38af07b1ecd16545b1b1bd2c4efdf64712c974b1 | 62b1a7e79ee6b9663052fe264f746dfb1f496496 | SREERAGI18/chromium | /chrome/browser/share/share_history.cc | C++ | cc | 8,257 | permissive | // Copyright 2021 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/share/share_history.h"
#include "base/containers/flat_map.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.... |
ebec13c3e9dd661a5f65362f082c5a9d9fc22636 | 39d3c189aa41dee965c5fad2eddb1b1e88f266a4 | jcrosskey/metalrec | /cpp/Edge.cpp | C++ | cpp | 5,913 | permissive | /*
* Edge.cpp
*
* Created on: Fri Nov 7 15:13:39 EST 2014
* Author: JJ Chai
*/
#include "Common.h"
#include "Edge.h"
/**********************************************************************************************************************
Default Constructor
*****************************************************... |
f7313b81fe5ad04e484865759cdd9cafb9f78cc4 | 2efe25f128821689d6bf30a5624a7e1970946162 | SREERAGI18/chromium | /third_party/blink/renderer/platform/scheduler/main_thread/page_scheduler_impl_unittest.cc | C++ | cc | 68,407 | permissive | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/platform/scheduler/main_thread/page_scheduler_impl.h"
#include <memory>
#include "base/bind.h"
#include "base/callb... |
d65b364e5bfa9cb957f5c146efcdfa7ce936581a | 22fac27514869ea811636d6c1b2e2488f124a47f | UdoiGogoi-github12345/Codeforces_Problems | /Palindromictimes.cpp | C++ | cpp | 2,464 | no_license | #pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#define ONLINE_JUDGE
#include<bits/stdc++.h>
#include<iomanip>
using namespace std;
#define db1(x) cout<<#x<<": "<<x<<"\n"
#define db2(x, y) cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<"... |
e5cf580103a1a8ce56ad9226b73e68eea7da9189 | dfac952fa1ecfe39fd82592b02927d6ef0b33671 | Techno-coder/UndertaleCPPLibrary | /revision_3/src/src/encounter/states/defend/DefendState.cpp | C++ | cpp | 3,789 | no_license | #include "DefendState.h"
#include "DefendArenaSizeTransitionState.h"
ug::DefendState::DefendState(const std::shared_ptr<ug::Encounter> &encounter) : EncounterState(encounter) {}
void ug::DefendState::onDraw(sf::RenderWindow &window) {
EncounterState::onDraw(window);
for(auto &projectile : currentProjectiles) ... |
39abbd89772c286004e99ded6a54a3efa8c5c35a | d5280783d6e6c48407d622bc9713f021b9cbf0f4 | 519984307/Projects-1 | /DiskMasterTool/GeneratedFiles/Debug/moc_copypropertiesui.cpp | C++ | cpp | 4,230 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'copypropertiesui.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************... |
e074777d1eeb51977a084f7c71596fd56f19ec94 | 7e19c2d7658380a3de6008cfccd6512908da920b | coisin/Algorithms | /Data Structures/fenwick_tree.cpp | C++ | cpp | 568 | no_license | #include <bits/stdc++.h>
using namespace std;
class fenwick {
private:
vector<int> ft;
public:
fenwick(int n) {
ft.assign(n + 1, 0);
}
void update(int k, int v) {
for(; k < ft.size(); k += LSOne(k)) ft[k] += v;
}
int rsq(int k) {
int answer = 0;
for(; k; k -= LSOne(k)) answer += ft[k];
return answer;
... |
70dbca981cc2a788d720cfc8862b08a9abbc062e | 2eaa2ebc881d52d2e8fd15454ca234875ba098cb | z80/ignition | /stuff/urho3d/Source/Samples/00_ignition/relative_pose/_zzz/pioneer_src/gameui/Lua.cpp | C++ | cpp | 526 | permissive | // Copyright © 2008-2020 Pioneer Developers. See AUTHORS.txt for details
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
#include "Lua.h"
namespace GameUI {
namespace Lua {
void Init()
{
LuaObject<GameUI::Face>::RegisterClass();
LuaObject<GameUI::GalaxyMap>::RegisterClass();
LuaObject... |
657df4485d56b1499fae4f710e420445d4304035 | 7ef69673e78c364bc22d968d57b70ee777f9b569 | stawel/cheali-charger | /src/hardware/atmega32/generic/adc_key_test/adc.cpp | C++ | cpp | 10,484 | no_license | /*
cheali-charger - open source firmware for a variety of LiPo chargers
Copyright (C) 2013 Paweł Stawicki. All right reserved.
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, eit... |
e6c94b7ffb53e9a4f22e317017d8dca30872421e | a9145d1f9d475fd1a37bc6b93ad11e5c999919d6 | nmeyering/mizuiro | /examples/raw_view.cpp | C++ | cpp | 2,359 | permissive | // Copyright Carl Philipp Reh 2009 - 2010.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <mizuiro/image/dimension.hpp>
#include <mizuiro/image/format.hpp>
#include <mizuiro/image... |
ac0c1496199ace7cf7353946224b1ce7b5c5a745 | 98bd15d4eb265d7d787093267bb55abc222d7686 | SCIInstitute/Seg3D | /src/Interface/Application/SplashScreen.cc | C++ | cc | 11,435 | 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 "Softwa... |
931f26d28392a32984fe9e3f03afe5e117856e0b | 361d6ccb6a26b0cad0169c03063eb5b81a17f64d | atakhmaz/Projects | /Scrabble/blankTile_window.cpp | C++ | cpp | 963 | no_license | #include "blankTile_window.h"
blankTile_window::blankTile_window(QDialog *parent): QDialog(parent)
{
setWindowTitle("Blank Tile");
blankTileLayout = new QVBoxLayout();
messageLabel = new QLabel("Blank Tile replacement tile");
blankTileLayout->addWidget(messageLabel);
options = new QComboBox();
QString letters;... |
b1c3cadd90d6cebecb572a891550d0ce66e377c3 | d302da740697ab8e8a5063df3029b08fa2ab1ae3 | nareix/llvm | /lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp | C++ | cpp | 67,100 | permissive | //==-- AArch64InstPrinter.cpp - Convert AArch64 MCInst to assembly syntax --==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
87bbf17f91a05be9ee9e1a851c52ad8b667718a5 | 1c95a0f73b9734d614dd085ae528accd6bcee5bf | qcraft-ai/s2geometry | /src/s2/s2builder.cc | C++ | cc | 79,937 | permissive | // Copyright 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
62ca1a69e24a545b0927a64595d8a2d59bab07ea | b19b763a3f0fd3818dbac1c71e27b09a6014532c | DBHeise/fileid | /fileid/document/excel/structures/LEMMode.hpp | C++ | hpp | 600 | permissive | #pragma once
#include <string>
#include "../../../common.hpp"
#include "../IParsable.hpp"
#include "../MSExcel.common.hpp"
namespace oless {
namespace excel {
namespace structures {
// see: https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-xls/fe89780c-48f9-40a0-b6df-3dbcda29e9e4
cl... |
5eb9d9f9445a688a35d208b3bea1f5afb2002868 | 4972f8cb690f4a60a3569ee8335506d87252da61 | imateev/Lightning-ohNet | /OpenHome/Net/Bindings/Cpp/ControlPoint/Proxies/CpAvOpenhomeOrgSender1Std.cpp | C++ | cpp | 14,677 | permissive | #include "CpAvOpenhomeOrgSender1.h"
#include <OpenHome/Net/Core/CpProxy.h>
#include <OpenHome/Net/Private/CpiService.h>
#include <OpenHome/Private/Thread.h>
#include <OpenHome/Net/Private/AsyncPrivate.h>
#include <OpenHome/Buffer.h>
#include <OpenHome/Net/Cpp/CpDevice.h>
#include <OpenHome/Net/Private/CpiDevice.h>
#in... |
ffedfee976fbd3f273bb99c238dd2ac9a0f41a8a | f17bee4b6cbb90ece877df865226db2ab56dd9d0 | Ryp/moGL | /mogl/function/states.hpp | C++ | hpp | 1,010 | permissive | ////////////////////////////////////////////////////////////////////////////////
/// Modern OpenGL Wrapper
///
/// Copyright (c) 2015 Thibault Schueller
/// This file is distributed under the MIT License
///
/// @file states.hpp
/// @author Thibault Schueller <ryp.sqrt@gmail.com>
///////////////////////////////////////... |
73bd5405ce62480f127ca068efde26d8a971b8e0 | d7023581f82b4c26dc7ba5e0e94bb5a2c04e6a13 | blockspacer/HQEngine | /ThirdParty-mod/java2cpp/java/lang/ref/PhantomReference.hpp | C++ | hpp | 3,110 | permissive | /*================================================================================
code generated by: java2cpp
author: Zoran Angelov, mailto://baldzar@gmail.com
class: java.lang.ref.PhantomReference
================================================================================*/
#ifndef J2CPP_INCLUDE_I... |
f9a6bf34371bd7ef45df1250b5096538047877d7 | 5d7d010df61642d8bcd86a88d4c84cc6e23db226 | zhuhk/test-toys | /share/misc.cpp | C++ | cpp | 322 | no_license | #include "misc.h"
time_t PR_Now() {
struct timeval tv;
gettimeofday(&tv, 0);
return (tv.tv_sec*1000000 + tv.tv_usec);
}
extern const char*strtime(time_t t, char *buf, int buflen){
struct tm tm_t;
localtime_r(&t, &tm_t);
strftime(buf, buflen, "%Y-%m-%d %T", &tm_t);
return buf;
}... |
d64272e48a1c896c5641c3c75749da5cb1113ec9 | 43d2f84af7335fad1d621f6377a84bd650e77f48 | Yearss/leetcode | /17.cpp | C++ | cpp | 1,475 | no_license |
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std;
long sum(vector<long>& vec){
long s = 0;
for(int i = 0; i < vec.size(); i++){
s += vec[i];
}
return s;
}
vector<long> solve(vector<long>& vec, int x){
int n = vec.size();
vecto... |
f33393a10df0d596c2da8715aeed7220dcc3c08c | 62247bb79f3975366721abe1ec3177e1124eb941 | anomatver/swift | /lib/Index/Index.cpp | C++ | cpp | 40,603 | permissive | //===--- Index.cpp --------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
c2e8cfcde01ba524afd4235791d8b393b465f97e | 4eb118176baad9d0dc6e895b2c4704feb3611b73 | AaronNGray/GenomeWorkbench | /src/util/compress/api/zlib.cpp | C++ | cpp | 50,472 | permissive | /* $Id: zlib.cpp 551452 2017-11-17 18:37:27Z ivanov $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" un... |
239af32eaeb819eef89e4c978c0f85f47ff2b61e | 26aa434c0d06a8460793f5fb9a6bf012e1ec9bcb | DerpLab/platform_art | /compiler/trampolines/trampoline_compiler.cc | C++ | cc | 9,836 | permissive | /*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
d315e901daa5d51425691e5b2d1c374783f48316 | 74aed4a76d3052522bd279d5acc3dfd7992ca146 | stardog-union/boost | /libs/asio/test/windows/object_handle.cpp | C++ | cpp | 3,346 | permissive | //
// object_handle.cpp
// ~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Disable autolinking ... |
2a6fcbbc163ee69beb0759fefd33509a4ff177d3 | bcbbf32a531d3c14d07942893c4ec30417080844 | AliceSchaw/CPPexercise | /Valid Parentheses.cpp | C++ | cpp | 971 | no_license | // 3 ms
class Solution {
public:
bool isValid(string s) {
stack<char> res;
for(int i=0;i<s.size();i++){
if(s[i]=='{'||s[i]=='['||s[i]=='('){
res.push(s[i]);
}
switch(s[i]){
case ')':
if(res.empty() || re... |
09e859cc693cb4003a65916464892ef92db7aa18 | 2f297e0897eae6229ec5c5f821bbe381840c35e5 | Khairul-Anam-Mubin/UVa-Solutions | /11086 - Composite Prime.cpp | C++ | cpp | 4,687 | no_license | /***
** Author: Khairul Anam Mubin
** Bangladesh University of Business and Technology,
** Dept. of CSE.
***/
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <iterator>
#include <vector>
#include <map>
#include <s... |
1458da9af776f0ab017527cff94904863ac2c3ed | 31adef9f404d2e3af2b28cddd8be6dda285bcab1 | haydenzyu/EffluX-UCI-Senior-Design-2020 | /EffluX/main/source/setup.cpp | C++ | cpp | 440 | no_license | #include "../header/leds.h"
// #include "../header/RTC.h"
// #include "../header/buttons.h"
// //#include "../header/coffee_wifi.h"
// #include "../header/carafe.h"
#include "../header/setup.h"
void system_setup(){
led_setup();
delay(100);
//RTCSetup();
delay(100);
//gpio_setup();
delay(100);... |
805989a9bace4ac80608572d1dacceac86bbcadf | fe2cd9167758852f7b90e73fc6f03baf54ebdc90 | stsg/fbreaderosx | /zlibrary/ui/src/gpe/dialogs/ZLGtkOptionView.cpp | C++ | cpp | 18,116 | no_license | /*
* Copyright (C) 2004-2009 Geometer Plus <contact@geometerplus.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later ver... |
a7a1591cefdff0609ac22e7c4af7b9f6775a18c0 | b074fa1d3d7b493b6a2798c81d5d3c1db1300113 | SerenityOS/serenity | /Userland/Utilities/ifconfig.cpp | C++ | cpp | 4,713 | permissive | /*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, Alex Major
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Assertions.h>
#include <AK/IPv4Address.h>
#include <AK/JsonArray.h>
#include <AK/JsonObject.h>
#include <AK/NumberFormat.h>
#include <LibCore/ArgsParser.h>
... |
05a663066f1b5b06d0767af1566282508119b176 | e80fcd1a410a838f122a630884dff9b71b9a3014 | JoonasNatynki/COVPlugins | /PlayerPawnComponents/Source/FocusComponent/Private/FocusableComponent.cpp | C++ | cpp | 1,209 | no_license | #include "FocusableComponent.h"
#include "Net/UnrealNetwork.h"
DEFINE_LOG_CATEGORY(LogFocusable)
// Sets default values for this component's properties
UFocusableComponent::UFocusableComponent()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features... |
1bf1f6f95c8b06bee18c7726480d9191cae9f1de | 3498038c7103ab53134bdf776b27c819187c1ae4 | AdrianNostromo/CodeSamples | /CPP_Joc_Windows_Android/SH_Client_Win_Cpp_Cmake/App/src/sh/scenarios/startarea_a_v1/gw/config/entity/EntityTags.cpp | C++ | cpp | 635 | no_license | #include "EntityTags.h"
using namespace startarea_a_v1;
std::string EntityTags::UNIT = "UNIT";
std::string EntityTags::TREE = "TREE";
std::string EntityTags::PLATFORM = "PLATFORM";
std::string EntityTags::TELEPORT = "TELEPORT";
std::string EntityTags::STRUCTURE = "STRUCTURE";
std::string EntityTags::FLORA = "FLORA";
... |
4771d8a654ac1d34a7332b099b9f9611ce67ada5 | 2d8c610a8eabf9e942c0c82190e230eff52356dc | lcyasdlcy/study | /006/topwidget.cpp | C++ | cpp | 208 | no_license | #include "topwidget.h"
#include "ui_topwidget.h"
TopWidget::TopWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::TopWidget)
{
ui->setupUi(this);
}
TopWidget::~TopWidget()
{
delete ui;
}
|
acc0d91315c659fab225a660fcb20604353b999a | d56ad288495e31d789ab6aec87231edf526fdade | gitmikegonz684/DiningPhilosophersProblem | /main.cpp | C++ | cpp | 1,133 | no_license | //
// main.cpp
// Project142
//
// Created by Michael A. Gonzalez on 11/20/17.
// Copyright © 2017 Michael A. González. All rights reserved.
//
#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
int selector=0;
cout<<"<<--- WELCOME --->>\n";
cout<<"Enter the # of the op... |
2106c797dca19a657cf7cc9ba94d379bb8d27129 | e26b391eb2d44fb2607935681533792c47161a3d | KratosMultiphysics/Kratos | /applications/FluidDynamicsApplication/custom_processes/compute_pressure_coefficient_process.cpp | C++ | cpp | 3,809 | permissive | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Eduard Gómez
//
//
// System ... |
997addff4d45b99bf5a666fc3d7aadba14e3ae3a | c57b79ed5405c4f870aea761dc126a0602f2d9d3 | choreonoid/choreonoid | /src/ManipulatorPlugin/MprMultiVariableListItem.cpp | C++ | cpp | 5,760 | permissive | #include "MprMultiVariableListItem.h"
#include <cnoid/ItemManager>
#include <cnoid/PutPropertyFunction>
#include <cnoid/Archive>
#include <cnoid/ConnectionSet>
#include "gettext.h"
using namespace std;
using namespace cnoid;
namespace cnoid {
class MprMultiVariableListItem::Impl
{
public:
vector<MprVariableListP... |
d08da9b0c818c56e154b3df953798192131f503b | 9fdfd5e71c59596f3f186567bc0d5727529e342c | pingcap/poco | /Data/ODBC/testsuite/src/ODBCPostgreSQLTest.cpp | C++ | cpp | 26,844 | permissive | //
// ODBCPostgreSQLTest.cpp
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "ODBCPostgreSQLTest.h"
#include "Poco/CppUnit/TestCaller.h"
#include "Poco/CppUnit/TestSuite.h"
#include "ODBCTest.h"
#include "Poco/Format.h"
... |
76f8cedfc7d0ef9f7e3b23a412c4f29d4f97e3fc | b3eb275da964371dad5a8586a1419a66aec4feb2 | dkjiang2018/BaseKit-code-samples | /DPC++Compiler/sepia-filter/src/device_selector.hpp | C++ | hpp | 1,762 | permissive | //==============================================================
// Copyright © 2019 Intel Corporation
//
// SPDX-License-Identifier: MIT
// =============================================================
#ifndef DEVICESELECTOR_HPP
#define DEVICESELECTOR_HPP
#include <string>
#include <cstring>
#include <iostream>
#inc... |
5c6136996232af60191c8a15ac4e7e923081a6f9 | a764e833d618a8775e9119678acab453cfd4fb30 | glassjames/Project1 | /exec.hpp | C++ | hpp | 56,321 | no_license |
//ADMIN AND USER METHODS
exec :: exec()
{
}
exec :: ~exec()
{
}
void exec :: run()
{
std::ifstream fileExists("eventFile.txt");
std::string choice;
bool choiceRepeat = true;
//bool skipInterface = true;
if(!fileExists)
{
while(choiceRepeat)
{
std::cout << "========================... |
9abc8b53ec6bee6bd2cabe558450eee54cf571ff | 073f4f8b670911934c31ea41630a69f0122f404a | adzhou/oragle | /Foundation/testsuite/src/TuplesTest.cpp | C++ | cpp | 16,694 | permissive | //
// TuplesTest.cpp
//
// $Id: //poco/1.4/Foundation/testsuite/src/TuplesTest.cpp#1 $
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// Permission is hereby granted, free of charge, to any person or organization
// obtaining a copy of the software and accompanying docu... |
bcbb3f3197c6055683a2d185ed7d936b7b0f0595 | 944f202eb7155a808785b420cc668a3d5fcfb596 | bonanomi/cmssw | /Calibration/HcalAlCaRecoProducers/plugins/AlCaIsolatedBunchFilter.cc | C++ | cc | 8,753 | permissive | // system include files
#include <atomic>
#include <memory>
#include <cmath>
#include <iostream>
#include <sstream>
#include <fstream>
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/stream/EDFilter.h"
#include "FWCore/Framework/interface/Event.h"
#includ... |
28c5ad5ca4521027ef5ded2cd7f11fa29e0ee03c | dbc1694f2bd1e99da00ffc5d91fb137e20549821 | shivamdattapurkayastha99/genc-next-codes | /5.cpp | C++ | cpp | 418 | no_license | // Given an integer array nums and an integer k return the k th largest element in the array ...
// 3 2 1 5 6 4
// k=2
// 5
#include<iostream>
using namespace std;
int findKthLargest(int nums[],int n,int k)
{
priority_queue<int> pq;
int i=0;
for (int i = 0; i < n; i++)
{
pq.push(nums[i]);
}... |
d075afc05e06f5187dc9a29b104de4b0ded6e1a8 | be5851d627e83aea85dfaecd19546c4877ba10f2 | immense055/bitcoin | /src/qt/transactiondesc.cpp | C++ | cpp | 14,730 | permissive | // Copyright (c) 2011-2021 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifdef HAVE_CONFIG_H
#include <config/bitcoin-config.h>
#endif
#include <qt/transactiondesc.h>
#include <qt/bitcoinunits.h>... |
05cee820144144adaa9433afcaa82c5357f8007e | 98d26fc8e7ed893178349e486eea6d803e6d4636 | matpow2/voxie | /src/palette.cpp | C++ | cpp | 11,124 | permissive | /*
Copyright (c) 2013 Mathias Kaerlev
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, merge, publish, distribute,... |
600a1ffe5f69f767ccb13be438d51474a5b6965a | b2a816fec02b0ddb4c93368b616817ee6bcb277f | rahulchhabra07/CompetitiveProgramming | /My Programs/ATMd.cpp | C++ | cpp | 425 | no_license | #include<iostream>
#include<iomanip>
using namespace std;
int nd(int a)
{
int ct=0;
while(a)
{
a/=10;
ct++;
}
return ct;
}
int main()
{
float b;
int e;
cin>>e>>b;
if(!(e%5)&&(b>e+0.5))
{
b=b-(e+0.5);
}
... |
2fb8bf1132df55e4ab398eee6bf2f0a44b2f2014 | 8a35350d2378300b76c74410bb954e4a031c7d78 | nishu112/Geek-Codes | /GeeksforGeeks/Cruise Control.cpp | C++ | cpp | 509 | no_license | #include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int t;
cin>>t;
cout<<fixed;
cout<<setprecision(6);
FILE *fptr;
fptr=fopen("my.txt","w");
for(int i=1;i<=t;++i)
{
fprintf(fptr,"Case #%d: ",i);
unsigned int d,n;
scanf("%d%d",&d,&n);
double temp,n1,n2,max=0;
for(int j=0;j<n;++j)
{
double k,... |
af7493709aeb17ad857ad914ab2bf93a83c7534d | e854eca0e28ed687dba01e78d94084b27619bf1c | ahararwala/learncplusplus | /src/lesson2/learn_variable_assignment_short.cpp | C++ | cpp | 670 | no_license | /*Goal: understand variable assignment operators*/
#include "header_lesson2.h"
int short_variable_assignment_operators() {
int a = 0;
std::cout << "Variable\t\tOperation\tResult\n";
std::cout << "a = " << a;
a += 2;
std::cout << "\t\t\ta += 2 \t\t a = " << a << "\n";
std::cout << "a = " << a ... |
f7020196951d124d23d57cca1211d8d241b74e7c | 2349d6fa11a5eb503a470ecc7c13264773592a9b | KeitaYoshioka/ogs | /MathLib/LinAlg/Lis/LisVector.cpp | C++ | cpp | 1,436 | permissive | /**
* \file
* \author Norihiro Watanabe
* \date 2013-04-16
* \brief Implementation of the LisVector class.
*
* \copyright
* Copyright (c) 2012-2017, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* ... |
88e3bf21edf3c7f59a2b3d9b79bc7f102f5b1811 | 95248d35ad75475cca44c903ebd4baaed8aac8c8 | Adrenalinerush07/Linkedlist | /pairsumindoublylinkedlist.cpp | C++ | cpp | 5,166 | no_license | #include <bits/stdc++.h>
using namespace std;
#define int long long
void __print(int x)
{
cerr << x;
}
void __print(long x) { cerr << x; }
// void __print(long long x) {cerr << x;}
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }... |
320a2f56fa75e16bbdb9ed2fb77a07e2f391c309 | 1571e13f71db2577513afd03a78ef291355791ed | wxinjie/oop_work | /第三次实验作业/example2_06_域解析符.cpp | C++ | cpp | 1,570 | no_license | //
/*----------------------------------------------------*
example2_06.cpp:域解析符使全局变量真正具有全局作用域
*-----------------------------------------------------*/
#include<windows.h>
#include <iostream>
#include <iomanip>
using namespace std; //使用C++的标准名字空间
int sum = 5000; //定义全局变量... |
fb83c38dda4fb4a16657b8d80ec6c15725185705 | 04a120de55d0bf798f0ddde95289ee0a94cc5974 | tkphd/CHiMaD-Hackathon | /Hackathon1/Cahn-Hilliard/mmsp2png.cpp | C++ | cpp | 8,992 | permissive | // File: mmsp2png.cpp
// Purpose: reads MMSP grid and writes PNG image file
// Output: grayscale portable network graphics
// Depends: MMSP, DevIL image library, zlib
// Questions/Comments to kellet@rpi.edu (Trevor Keller)
// DevIL usage after http://bobobobo.wordpress.com/2009/03/02/how-to-use-openil-to-generate... |
bb18011e80d7f7ba72c46db1ffaaad42afa59b36 | aea8f8b8453a0fa5648b76922a46df2225f2c650 | Andy77765953/HitlerCoin | /src/qt/guiutil.cpp | C++ | cpp | 13,320 | permissive | #include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QUrl>
#include <QTextDocument> // For Qt::escape
#include ... |
734126bcebd63fa6835038c9e168ab5ca842e1ce | 0a2cfc6aed5e0b7d9f5d57d97da1f834c0bb8e8b | Csineneo/Vivaldi | /chromium/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_factory.cc | C++ | cc | 5,710 | 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 "chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_factory.h"
#include "base/command_line.h"
#include "base/memory/singleton.h"
#inc... |
1694da93f190c0fdb30357253c830f0a15c86a3d | 30ae03cb7ec64267ff9aced3d7a3429c94ec5ee6 | NLESC-JCER/gBenchLinAlg | /src/arma/arma_diag.cc | C++ | cc | 497 | no_license | #include <benchmark/benchmark.h>
#include <armadillo>
#include <chrono>
#include <omp.h>
using namespace std;
using namespace arma;
void arma_diag(int size){
mat A = randu<mat>(size,size);
mat B = A + A.t();
vec eigval;
mat eigvec;
eig_sym(eigval,eigvec,B);
}
static void DIAG(benchmark::State &st... |
4206275724d5e57c8db64634a9fb24ee0959a130 | ac9441ca140d6edbdd5927c8bf6ac0b125bed4d2 | HyeonJaeGil/rtabmap_ros | /src/StereoSyncNode.cpp | C++ | cpp | 2,021 | permissive | /*
Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... |
08884809a263b6f63366c552f2f729b1a079cf4d | 3b5f8a14ca5fc93bbdc46a9e2f1ab401270e6a25 | rzr/chromium-crosswalk | /components/sessions/session_service_commands.cc | C++ | cc | 31,108 | 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 "components/sessions/session_service_commands.h"
#include <vector>
#include "base/pickle.h"
#include "components/sessions/base_session_service_... |
83cc6bda2cc5a237dee5ec8bbc8437ff1ee3c455 | 1e1fcaab73f5e159a87eb4fc2ed7d65a567b4830 | pdschubert/WALi-OpenNWA | /Tests/unit-tests/Source/opennwa/class-NWA/get-size-is-add-remove-clear.cpp | C++ | cpp | 46,708 | permissive | #include "gtest/gtest.h"
#include "opennwa/Nwa.hpp"
#include "Tests/unit-tests/Source/opennwa/fixtures.hpp"
#include "Tests/unit-tests/Source/opennwa/class-NWA/supporting.hpp"
namespace opennwa
{
//////////////////////////////////
// Supporting stuff
/// All of these fu... |
d715c3ccf5fb469102d87d9f2b2a4e2d1f7680d7 | b048a0df366f6fdd0b386acdafe373f583621034 | joaotargino/moolajoo-tcg | /War of Heroes TCG/src/CApp_OnInit.cpp | C++ | cpp | 987 | no_license | //==============================================================================
#include "CApp.h"
//==============================================================================
bool CApp::OnInit() {
if(SDL_Init(SDL_INIT_EVERYTHING) < 0) {
return false;
}
TTF_Init();
Mix_OpenAudi... |
71ac8f04997a0c051176fef74c48e39ebe0bf07e | 6146ec896b203722472470a23b4e7e056644d76b | novakale/openvino | /src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/activation.hpp | C++ | hpp | 5,979 | permissive | // Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <vector>
#include <tuple>
#include <string>
#include <map>
#include <memory>
#include <set>
#include <functional>
#include <gtest/gtest.h>
#include "ie_core.hpp"
#include "ie_precision.hpp"
#include "ngraph/... |
4c8cf866e602a76da856bff92a747f2af34db3ff | cef6a6577e985666c8e874780f07d131ad03bcd8 | cezaryece/Cpp-Projects | /sniffdata/main.cpp | C++ | cpp | 15,756 | no_license | #include <iostream>
#include <fstream>
#include <list>
#include <string>
#include <stdlib.h>
#include <dirent.h> //do obsługi katalogów na dysku
#include <time.h> //do obsługi funkcji czasowych
#include "str_replace.h"
#include <cstdio> //rename
#include <errno.h>
#include <arpa/inet.h>
#include <cstring>
#include <d... |
aa0a584c8090d974d0a66aa9a85ce7ace4b06296 | c2b7cfe9f6622a7dda96a6110129fe12f4c9a1a3 | alexwalterbos/brick-plane-razor | /main.cpp | C++ | cpp | 979 | permissive | #include "game.h"
#include <cstdlib>
#include <exception>
#include <iostream>
using namespace std;
static Game game;
static void errorCallback(int error, const char* description)
{
std::cerr << "GLFW error:" << description << std::endl;
}
//Because GLFW is a C library, we cannot use member functions of Game directl... |
ac560f36b28d2b9991b9dcd44933c9b8cb5cde9f | 4cd70d3279c90954e07108a9cae3c8cd71d46af6 | Sitispeaks/turicreate | /src/external/boost/boost_1_68_0/libs/phoenix/test/scope/more_let_tests2.cpp | C++ | cpp | 3,503 | permissive | /*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=========================================... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.