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 |
|---|---|---|---|---|---|---|---|---|
0449a3ec92da00c0be85438f75bd59dd3a1ebcd1 | e274a6065e3539b651dc9452ba821311caaca18c | mohannmm/cse287_Raytracing | /Marcellus_Mohanna_287Code/287BaseCode/LabRaytrace.cpp | C++ | cpp | 10,797 | no_license | #include <ctime>
#include "Defs.h"
#include "IShape.h"
#include "FrameBuffer.h"
#include "Raytracer.h"
#include "IScene.h"
#include "Light.h"
#include "Image.h"
#include "Camera.h"
#include "Rasterization.h"
#include "Utilities.h"
int currLight = 0;
float z = 0.0f;
float inc = 0.2f;
std::vector<PositionalLightPtr> li... |
0bd0e57788faede668144a07bd27e54b2971d29e | 1d021494927143a1ed28dc42e45e17e68890a069 | swagatn22/GFG_mustdo | /DP/Maximum sum increasing subsequence.cpp | C++ | cpp | 525 | no_license | #include <bits/stdc++.h>
using namespace std;
int LIS(vector<int>vec, int n){
vector<int>dp= vec;
for(int i = 0; i < n; i++){
for(int j = 0; j < i; j++){
if(vec[i] > vec[j]){
dp[i] = max(dp[i], vec[i]+dp[j]);
}
}
}
return *max_element(dp.begin(),dp... |
1a3a4869cc7cd39082388c232350943013bff3bb | 0ca9f600af0931788a435512352ca8a9f6223199 | crankler/recast_ros | /recast_ros/src/InputGeom.cpp | C++ | cpp | 18,442 | permissive | //
// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
//
// 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... |
5e5c132aa26a37c236ae04a2b72b94013a0325e3 | e801722c2250e8e2902e3ec157c171cef67d3519 | otcshare/chromium-src | /base/android/jni_registrar.cc | C++ | cc | 842 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/android/jni_registrar.h"
#include "base/android/jni_android.h"
#include "base/logging.h"
#include "base/trace_event/base_tracing.h"
n... |
ea0ad9d7320260591ada3c455c70786ef61b2fe3 | 02b10dd79fe49372f1259ffbb2f016a59a5a8cfc | gangwar1234/CP | /New_Codeforces/23.cpp | C++ | cpp | 1,386 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long lo;
typedef vector<lo> vl;
typedef vector<vl>vll;
#define MOD 1000000007
#define all(v) (v).begin(), (v).end()
#define debug(x) cerr<<#x<<" = "<<x<<endl;
#define REPV(a, b, c) for (lo(a) = b; (a) < (c); (a)++)
#define REP(a,b) for(lo i =(a) ;i<(b);i++)
t... |
0fef43b834bf2c97c373d26da1f9812878daf3ba | 2e2721b26161097e76d46e5f105b5091a9173383 | c-ber/cber | /vscode/wg/sdk/UMotorbikeSidecar_Wheel_C.hpp | C++ | hpp | 916 | no_license | #pragma once
#include "UTslVehicleWheel.hpp"
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
namespace PUBGSDK {
struct alignas(1) UMotorbikeSidecar_Wheel_C // Size: 0x270
: public UTslVehicleWheel // Size: 0x270
{
private:
typedef UMotorbikeSidecar_Wheel_C t_struct;
typedef ExternalPtr<t_struct> t_... |
6e048323a6a453387a1871d7a17b6ba92a33aa2b | 78aeb37d4533c202874c77025ffe4bbab17d373c | morsalin80/Codeforces-and-atcoder | /codeforces/1343/A.cpp | C++ | cpp | 1,352 | no_license | /// Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define f0(n) for(int i=0;i<n;i++)
#define ms(x) memset(x,0,sizeof(x))
#define ins insert
#define ALL(v) v.begin(),v.end()
#define highest(x) numeric_limits<x>::max()
#define lowest(x) numeric_limits<x... |
25ac158ff9cd59b76cca41083ff47ce88891e734 | 9e044bac114c0e6e48cd25b1604ba060135dc4a2 | openharmony/ark_runtime_core | /libpandafile/code_data_accessor.cpp | C++ | cpp | 1,688 | permissive | /*
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
77b2ebc02a224ffc03e87d7da1416db20d1970ce | 78ee2cbff88dcb1c247765bed437be2bc0cf07df | zhenyouluo/liveshow_r2 | /P2pNet/ace/Atomic_Op_T.cpp | C++ | cpp | 2,096 | no_license | #ifndef ACE_ATOMIC_OP_T_CPP
#define ACE_ATOMIC_OP_T_CPP
#include "ace/Atomic_Op_T.h"
#include "ace/Log_Msg.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if !defined (__ACE_INLINE__)
#include "ace/Atomic_Op_T.inl"
#endif /* __ACE_INLINE__ */
ACE_BEGIN_VERSION... |
5a13d04270d952a1c73b77e9458699d37b86097a | 205dacbc5cc972d09ac4771c3bae6f1db407b9f3 | charig/rir | /rir/src/interpreter/interp.cpp | C++ | cpp | 159,485 | no_license | #include "interp.h"
#include "ArgsLazyData.h"
#include "LazyEnvironment.h"
#include "R/Funtab.h"
#include "R/Printing.h"
#include "R/RList.h"
#include "R/Symbols.h"
#include "cache.h"
#include "compiler/parameter.h"
#include "compiler/translations/rir_2_pir/rir_2_pir_compiler.h"
#include "event_counters.h"
#include "ir... |
d0d78449583ad79cfbe2a69b802096416bf2b6a9 | 194bbf44237f230aa394e906530e23e588a2af05 | P5ina/Informatics-homework | /112165/112165.cpp | C++ | cpp | 258 | no_license | #include <iostream>
using namespace std;
int main()
{
double x, y;
cin >> x >> y;
if ((x * x + y * y) > 4 && y < x && y > 0 && x < 2)
{
cout << "YES" << endl;
}
else
{
cout << "NO" << endl;
}
return 0;
}
|
d9251073a04e0529ff96dc01a78584e42e722c80 | f2bbf3125a03aac859c8cfbf07683f01c512afa9 | someja/hhvm | /hphp/runtime/vm/class.cpp | C++ | cpp | 93,905 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
+---------... |
88c1ca2b9d0559512ee5019736f4fdb725333e18 | 5ffc4dddefbbf4fe9a6250e96d7709d9060159ba | KRAITcoin/krait | /src/rpcmasternode.cpp | C++ | cpp | 36,054 | permissive | // Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2017-2018 The Krait developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "activemasternode.h"
#... |
a87cbc0cb037413b2fb3bd273f39dc9f184b4891 | 4aab80dfa3e07902585ed2e1980130842cb873b4 | makromant/basic-txt-game | /main.cpp | C++ | cpp | 2,238 | no_license | //
// main.cpp
// txt_game(test)
//
// Created by makromant on 14/11/2016.
// Copyright © 2016 makromant. All rights reserved.
//
#include <iostream>
#include <string>
#include <fstream>
#include <stdio.h>
#include <curses.h>
#include "find_txt.h"
using namespace std;
int main()
{
string ch;
char ch1,ch2,... |
eb80d9c3ebd6a5df97f45ae06fbb3fcf2d730611 | d9e4663c4eaf36c6723f48f1da36ce66e057b236 | worldgold/rb | /src/rpcwallet.cpp | C++ | cpp | 55,073 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 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 <boost/assign/list_of.hpp>
#include "wallet.h"
#include "walletdb.h"
#include... |
d31ea9646739cbaae33fb2125de30974e0428c5f | 4d8c360d2f9583d3ca3f712b6bb9239495bc6f4a | jmcrn/Vivaldi-browser | /sync/glue/notes_change_processor.cpp | C++ | cpp | 29,595 | permissive | // Copyright (c) 2013-2017 Vivaldi Technologies AS. All rights reserved
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sync/glue/notes_change_processor.h"
#include <map>
#include <memory>
#i... |
2f0298cd1de0f5dfdf10d657716cf479aeed70f7 | 7126ccedf48d8ae76a5c8f06f37ef7f860d1b395 | Balthazar6969/T2K | /highland2/highlandEventModel/v2r19/src/Versioning.hxx | C++ | hxx | 11,334 | no_license | #ifndef VERSIONING_HXX_SEEN
#define VERSIONING_HXX_SEEN
#include "oaAnalysisReaderProjectHeaders.h"
/// This file contains pre-processor directives related to the
/// oaAnalysis file format that was used to generate the oaAnalysisReader classes
/// Depending on the file format, different bits of highland need to
/// ... |
dfc1abd468c71720785e3b386cabf8507a1b3741 | 1e5e0df27e63b58c0eaeba3a23cd2f180d9d9a06 | bbom16/study_algorithm | /algorithm_2019_cplus/algorithm_2019_cplus/1003.cpp | C++ | cpp | 912 | no_license | //
// 1003.cpp
// algorithm_2019_cplus
//
// Created by bomin jung on 2019. 5. 26..
// Copyright © 2019년 bomin jung. All rights reserved.
//
#include <stdio.h>
#include <iostream>
using namespace std;
/* 시간 초과,,
int cnt_zero, int cnt_one;
void fibo(int N){
if(N == 0){
cnt_zero++;
return;
... |
03b41b95170b2f0e3bda8e77a131ea84522cda34 | f7ad90c50dab7181e00b961942aafe08132aa8c8 | tfiner/adobe_asl | /platform_release/macintosh/adobe/future/macintosh_filesystem.hpp | C++ | hpp | 1,174 | no_license | /*
Copyright 2005-2007 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://stlab.adobe.com/licenses.html)
*/
/**************************************************************************************************/
#ifndef ADOBE_CARBON_FILES... |
f654117a6666b638d2d3d53617d58721d9e7ee21 | 9d47ec5f338f8633455e13dcf5ea61cd84a5ecd7 | mqnoy/DTS | /mainwindow.cpp | C++ | cpp | 4,172 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
QSettings qsettings(Constant::settingIni(), QSettings::IniFormat);
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
// serial central process
serialCentralProc = new SerialCentralProcess;... |
cc57be28c82cde6410bdb61bd889d46cca4859c6 | 42394ba958a9eb3756b07f09df737ba80d4dd239 | eikofee/projetALcpp | /projetALcpp/src/Events/Handlers/HandlerDragNDrop.cpp | C++ | cpp | 1,987 | no_license | #include <Events/Handlers/HandlerDragNDrop.hpp>
#include <Application/App.hpp>
#include <Application/Canvas.hpp>
#include <Command/CommandTranslate.hpp>
#include <Command/CommandAddShape.hpp>
#include <Command/CommandDeleteShape.hpp>
#include <Command/CommandAddToToolbar.hpp>
bool HandlerDragNDrop::task(Event* e, App* ... |
9b9d5377d004ea4910fd3ca7855ee5d0da936cff | f481ef2a73d652d7c72e0a4ae8d67351aae47275 | imlihao/leetcode | /8StringtoInteger_atoi.cpp | C++ | cpp | 1,666 | no_license | #include <iostream>
#include <set>
#include <string>
using namespace std;
class Solution
{
public:
int myAtoi(string str)
{
//set<char> st{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
short isMins = -1;
long long res = 0;
bool isRech = false;
bool isRechP = false;
... |
a3f8187e9b890bfc59d310264fc9afbb4b656516 | 85c4a76c1d97bdd0a2a524f1e59c1dfee5ef9069 | bugHappy/chromium | /chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.cc | C++ | cc | 11,830 | 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/enrollment/auto_enrollment_check_screen.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/c... |
c38474be8bc51ba85fb49bc9554a7e47b4600d22 | df29903dc4476ac7198ea50594dff05ed85f841d | rocee/CanvasCV | /src/canvascv/widgets/widgetfactory.cpp | C++ | cpp | 1,318 | permissive | #include "widgetfactory.h"
using namespace std;
using namespace cv;
namespace canvascv
{
WidgetFactory::AllocatorsMap *WidgetFactory::allocators;
shared_ptr<Widget> WidgetFactory::newWidget(string type, Layout &layoutVal, const Point &pos)
{
AllocatorsMap::const_iterator i = allocators->find(type);
assert (... |
9a1f1ea4e8bb695292cc4b68589bde2670fbf738 | 165f069799da2d3fc7615fdddc9b2c2a110e4abe | hidr0/Fmi | /SDP/homework1/Person.cpp | C++ | cpp | 898 | no_license | #include <iostream>
#include <cmath>
struct Person
{
char name[20];
void setName(){
std::cout << "Please, enter the name of the person: ";
std::cin >> name;
}
};
struct Client
{
Person p;
double balance;
void input(){
p.setName();
std::cout << "Please, enter the balance for " << p.name << " : ";
s... |
c1f0257ce2597f48cd9abcc01a9c3bf53614839b | 303efcc38860eeccefe4e6a12cfe9aaa73a6e550 | maojoejoe/Peach-Thinning-GTRI-Agricultural-Robotics-VIP | /ros2-windows/include/std_msgs/msg/detail/int32_multi_array__type_support.cpp | C++ | cpp | 5,136 | no_license | // generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em
// with input from std_msgs:msg\Int32MultiArray.idl
// generated code does not contain a copyright notice
#include "array"
#include "cstddef"
#include "string"
#include "vector"
#include "rosidl_runtime_c/message_type_support_stru... |
dd0c5432f68576e71716727d4963bc658a15eb32 | e47c9625c4b2a95c09a486f218751a74a5f21c54 | tmuttaqueen/MyCodes | /Online Judge Code/[Other] Online-Judge-Solutions-master_from github/UVA/Contest Volumes/12457 - Tennis contest.cpp | C++ | cpp | 584 | no_license | #include <cstdio>
#include <cmath>
using namespace std;
int main(){
int T,n;
double p;
scanf("%d",&T);
while(T--){
scanf("%d %lf",&n,&p);
double ans = 0;
for(int i = n;i <= 2*n - 1;++i){
double aux = pow(1 - p,i - n);
... |
ad965f26b5d98ff0b439d66d536eb2d8a607cad6 | 55e0b7bafdb16615394863a364379dd60864a82d | Sandy4321/DispatcherOpenCL | /include/vectorwise/Primitives.hpp | C++ | hpp | 49,787 | no_license | #pragma once
#include "common/defs.hpp"
#include "common/runtime/HashmapSmall.hpp"
#include "common/runtime/SIMD.hpp"
#include "common/runtime/Types.hpp"
#include "common/runtime/Util.hpp"
#include "vectorwise/VectorAllocator.hpp"
#include "vectorwise/defs.hpp"
#include <unordered_map>
// #include "/home/kersten/tools/... |
354cb2b9b98f164444169046ecddaa4742c7db71 | f2c982f17feb8dc6b19e87d1a48807860078859f | KDE/dragon | /src/app/main.cpp | C++ | cpp | 3,396 | permissive | /*
SPDX-FileCopyrightText: 2004 Max Howell <max.howell@methylblue.com>
SPDX-FileCopyrightText: 2007 Ian Monroe <ian@monroe.nu>
SPDX-FileCopyrightText: 2014 Lukáš Tinkl <lukas@kde.org>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "codeine.h"
#include ... |
12f9cf7e6a4cce1bc448d4bcb846bceb05bd86d2 | 19bc49cee63bb37d7c6ed9d619dfede852f644c8 | skarik/1Engine | /oneEngine/oneGame/source-lib/bullet/BulletDynamics/Featherstone/btMultiBodyFixedConstraint.cpp | C++ | cpp | 7,638 | permissive | /*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2013 Erwin Coumans http://bulletphysics.org
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... |
5c6520ffcac414ceeeccea072872c097da6afe62 | d3abc06558a7ef979392f2fa4d15609fc7d115f8 | Tempoblink/cxxp | /ch14_Overloaded_Operations_and_Conversions/exercise_14_51.cpp | C++ | cpp | 766 | no_license | /*
* 在调用calc的过程中,可能用到哪些类型转换序列呢?
* 说明最佳可行函数是如何被选出来的。
*
* void calc(int);
* void calc(LongDouble);
* double dval;
* calc(dval); //哪个calc?
*/
#include <iostream>
struct LongDouble {
LongDouble(const double &i = 0.0) : x(i) {}
operator double() {
std::cout << "double()" << std::endl;
re... |
76f81cc52b2df901e5b25b11d77f5b86b3636eda | 12df420667029a17dc6f8ad5dadec4868ac13686 | opalkonrad/monitor_producer_consumer | /myMonitor.cpp | C++ | cpp | 2,382 | no_license | #include <iostream>
#include <iomanip>
#include <cstdlib>
#include "myMonitor.h"
extern int progDuration;
void MyMonitor::add(int id)
{
buff.elems[buff.last] = id;
buff.last = (buff.last + 1) % TABSIZE;
++buff.length;
}
int MyMonitor::get()
{
if (buff.isRead == 1)
{
std::cout << "eats " << std::setw(8... |
9639918f2e9beaa7a9f9269148eefebe718c8d55 | dd8b74a914cd8158bf5384f0e710ba2be4726a31 | Nedwize/100daysofleetcode | /cpp/Arrays/maxProductDiffBtw2Pairs.cpp | C++ | cpp | 518 | no_license | // author: Nedwize
// 1913. Maximum Product Difference Between Two Pairs
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int maxProductDifference(vector<int>& nums) {
// sorting the array
sort(nums.begin(), nums.end());
return (nums[nums.size() - 1] * nums[nums.size(... |
c585d299f46b2143af6ab66a4fd317850df3c61f | a4ad5cc937163154c5db563bdc849bb7226de09a | Forilan/chromium | /third_party/blink/renderer/modules/plugins/dom_mime_type_array.cc | C++ | cc | 4,155 | permissive | /*
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; eit... |
ec9e1fcd25c59b7aaf1238ee02f0f2cc5ba00e39 | 2166b9cd8da6bb6ccd77cf07764e76882751f993 | 0xYoshee/iot2 | /modem.cpp | C++ | cpp | 3,042 | no_license | #include "modem.h"
#include <QDebug>
Modem::Modem(QString device, QObject *parent) :
UartDevice(device, parent)
{
// init(device);
if(mStatus == Status::connected){
quint8 attempt = 10;
bool ok = false;
// qDebug() << sendAnswer("AT&F").simplified();
qDebug() << sendAnswer(... |
e3735f51d0ffff14ab8b7370684c1adb8f70e50c | 30f34f3b77ef93ddad44bf9e1657669afb648ca3 | JoyMace/Escape-to-the-Stars | /gamePlay.cpp | C++ | cpp | 3,277 | no_license | #include "Baddie.h"
#include "Item.h"
#include "MapTile.h"
#include "Player.h"
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
//standalone file for functions of game Play
//holds functions that take two or more classes as parameters
void addItem(Item... |
2564f59c7015a86713a11940ba0ef5b18aa97917 | 58a5f8637bf263f0bfb66ac94bf21b6fbc775887 | francescog/nt2 | /modules/arithmetic/cover/simd/fast_hypot.cpp | C++ | cpp | 2,863 | permissive | //////////////////////////////////////////////////////////////////////////////
/// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand
/// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI
///
/// Distributed under the Boost Software License, Version 1.0
/// ... |
1c96fc0afa98b6de081c42756ae1fe4d9b798c77 | 9f9f3ef4679d170be37ed8b90961a6937a632ee5 | sdugit/Nfc_7025 | /jni/com_android_nfc_NativeNfcTag.cpp | C++ | cpp | 43,326 | no_license | /*
* Copyright (C) 2010 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... |
4f0397b5e9424bf5a5821bf62241e61fa9cba99e | c29cd77b81ff627dd718a2aaf53d0129cd369b66 | krishankantray/Standard-Algorithms | /KMP.cpp | C++ | cpp | 1,018 | no_license | #include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin );
freopen("output.txt","w",stdout );
#endif
string pat,text;
cin>>text;
cin>>pat;
int n = pat.length();
int lps[n]={0};
int i=1, j=0;
while(i<n)
... |
7082ea21943261f94a9b38a09cf9a7816f2f8ab8 | 5417ff73a1b0fefb21215c14d450194a6cd3f234 | KendallTencio/PR1C-Ordenamientos | /mainwindow.cpp | C++ | cpp | 3,658 | no_license | #include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPaintEvent>
#include <QPainter>
using namespace std;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
scene = new QGraphicsScene(this);
scene->setSceneRect(-50,50,100,100);
... |
9e9d4f376086756a6f6723f9686519f41d63672d | f5cef6bda422e759b237f5ab95c71bdc13a07116 | willook/3rd-Thinking-PC | /F/solution/Solution.cpp | C++ | cpp | 1,779 | no_license | #include <iostream>
#include <assert.h>
#include <string>
#include <stack>
#include <set>
#include <algorithm>
using namespace std;
typedef struct Ticket {
char letter;
int number;
} Ticket;
bool comp(const Ticket &a, const Ticket &b) {
if (a.letter == b.letter)
return (a.number < b.number);
r... |
6f500eeb23cbf293f6084f978f833f6f66aec417 | 699a2ae2b7e11efd6466c49fe6d10d7598b48ba8 | sahilbajaj82/my-code-repo | /codechef/FOYO2019/keen-grasp-of-the-obvious.cpp | C++ | cpp | 286 | no_license | #include<bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while(t--) {
string s;
cin>>s;
int l=s.length();
int x=0;
for(int i=0;i<l;i++) {
if(s[i]=='0'||s[i]=='4'||s[i]=='6'||s[i]=='9')
x++;
else if(s[i]=='8')
x=x+2;
}
cout<<x<<endl;
}
return 0;
}
|
4d4849ca3264fbcb94769e2592ff389461218571 | b330ce4594c65ab697f2b60edf1bceefd0b9f4d2 | xtblock/chromium | /chrome/browser/chromeos/power/auto_screen_brightness/light_samples_observer_unittest.cc | C++ | cc | 6,377 | permissive | // Copyright 2020 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/power/auto_screen_brightness/light_samples_observer.h"
#include <memory>
#include <utility>
#include "base/bind.h"
#in... |
9ce3a0db3611c41999d19792e7815d2b7dfbd6f4 | cd5522fcb5c62991464dd547b1e488aea8a24f55 | lineCode/chromium_ui | /ui/views/examples/examples_main.cc | C++ | cc | 1,926 | no_license | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/at_exit.h"
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/environment.h... |
8508e752ef31255ad1c45c886b28d49a9cf85086 | df0d8df82bf8712ba1e3a56c36a4f136ff33d3a6 | yubing84/cPlusPlus_Multiple-concurrent-multithreading | /多线程/010使用类的成员函数创建线程.cpp | C++ | cpp | 1,308 | no_license | #include <iostream>
#include <string>
#include<thread>
using namespace std;
class A
{
public:
mutable int m_i;//m_i的值是可以修改的,即使在const中
//构造函数--类型转换构造函数,把一个整形转换为一个类A对象
A(int a) :m_i(a)
{
cout << "A的构造函数执行" << endl;
cout << this << "thread id" << this_thread::get_id() << endl;
}
//拷贝构造函数
A(const A&m) :m_i(m.... |
c4ba4bf5a821333a36947853f159f4232b8cd540 | e65f2c670193ac913c1bc1e351923ecf730c6df4 | elix22/Urho3D-Hashlink | /src/cpp/urho3d_input_touch_state.cpp | C++ | cpp | 2,446 | permissive | #define HL_NAME(n) Urho3D_##n
extern "C"
{
#if defined(URHO3D_HAXE_HASHLINK)
#include <hashlink/hl.h>
#else
#include <hl.h>
#endif
}
#include "global_types.inc"
static Urho3D::TouchState touch_state_stack[TOUCHSTATE_STACK_SIZE] = {0};
static int index_touch_state_stack = 0;
HL_PRIM Urho3D::TouchState* HL_NAME(_in... |
11d7c9d0d8e1cfefe56b09833e9bb18b5a775b2a | ede72d7939e574faa742d88f6d181a3e53614fb7 | grst/freeage | /src/FreeAge/client/settings_dialog.hpp | C++ | hpp | 1,808 | permissive | // Copyright 2020 The FreeAge authors
// This file is part of FreeAge, licensed under the new BSD license.
// See the COPYING file in the project root for the license text.
#pragma once
#include <filesystem>
#include <QCheckBox>
#include <QDialog>
#include <QLineEdit>
struct Settings {
void Save();
void TryLoad... |
0ac149699c526b6aec28c272396a9fcb9a52832e | 8c2eaa8d37ae180abd6b4d8fd5c82653a5290f08 | raphui/XmlApi | /HXmlAPI/hdebug.cpp | C++ | cpp | 1,685 | no_license | #include "hdebug.h"
typedef struct trace_module
{
char module[24];
int level;
}trace_module;
trace_module trace_modules[] =
{
{"HXMLAPI" , TRACE_LEVEL_ALL }
};
void HTraces_printOnly(unsigned int level, unsigned int module, const char *function, const char *format, ...)
{
}
void HTraces... |
e335569e7caa2af19756657bc5e15b0ac42423e9 | a61b72dd5ecf2725cc1518be783d64c67b7431d4 | arnaudsteen/jet_analysis | /src/MyMCFastJetProcessor.cc | C++ | cc | 10,825 | no_license | #include "MyMCFastJetProcessor.h"
#include <iostream>
#include <EVENT/MCParticle.h>
#include "cmath"
#include <UTIL/LCTOOLS.h>
#include <limits>
using namespace lcio ;
using namespace marlin ;
using namespace std ;
MyMCFastJetProcessor aMyMCFastJetProcessor ;
MyMCFastJetProcessor::MyMCFastJetProcessor() : Processor(... |
4a40a40baccda946327b269627c43ca3ec1a2f76 | 721b2af15049b235df982593c1142b51bc982366 | BixBite-project/bixbite | /external/easylogging++/easylogging++.cc | C++ | cc | 118,496 | permissive | //
// Bismillah ar-Rahmaan ar-Raheem
//
// Easylogging++ v9.94.1
// Cross-platform logging library for C++ applications
//
// Copyright (c) 2017 muflihun.com
//
// This library is released under the MIT Licence.
// http://labs.muflihun.com/easyloggingpp/licence.php
//
// https://github.com/muflihun/easyloggingpp... |
ca5cb37038f7d049ebd07d3c27a9e3838f353403 | 7cfb815d9b041cbbd103ac2ec7f8d7416c851ed6 | vivekm07/DSA-Problem-Solving | /GeeksforGeeks/Sorting and Searching/Sort_a_2D_vector_diagonally.cpp | C++ | cpp | 2,234 | no_license | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
void diagonal_sort1(vector<vector<int>>& matrix, int row, int col, int n, int m){
vector<int> v;
int r=row,c=col;
if(col==row){
return;
}
while... |
a9d0ca0b97d63542436b36eb6f61728aed97c080 | 2d8c83e83fa5afcb777ab8cbeb0001cb785225db | TwentyFiveSoftware/ray-tracing-gpu-vulkan | /src/main.cpp | C++ | cpp | 1,661 | no_license | #include <chrono>
#include <thread>
#include <iostream>
#include "vulkan.h"
int main() {
// SETUP
const uint32_t renderCalls = 50;
const uint32_t samples = 10000;
VulkanSettings settings = {
.windowWidth = 1920,
.windowHeight = 1080
};
Vulkan vulkan(settings, generateR... |
b196e970000303648cb5e9640fc93ac6f5a77e00 | 1325c5bc5ef208d1d0baa4479fa5184537ed64cd | StefanCardnell/C-plus-plus-primer-answers | /Chapter9Files/EX9.47.cpp | C++ | cpp | 2,235 | no_license | //#define NDEBUG
#include <iostream>
#include <fstream> //IO file stream
#include <sstream> //stringstream
#include <iterator> //begin/end functions for arrays
#include <vector>
#include <cstring> //c-style string functions
#include <cstddef> //for size_t type and ptr_diff type
#include <stdexcept> //Plain/Runtime/Logi... |
2c256eb562615acb5db995d75069367c020538ca | b9a8def87d687671ac59c64bfd392fc7fd2583c7 | kiangelm/Programacion | /Studywork/rootsexamples.cpp | C++ | cpp | 1,476 | no_license | #include <iostream>
#include <cmath>
using fptr = double(double);
double f(double x);
double bisection(double xl, double xu, double eps, int nmax, fptr func);
double regulafalsi(double xl, double xu, double eps, int nmax, fptr func);
int main(void)
{
const double eps = 1.0e-8;
int NMAX = 50;
double xl = 12, xu... |
f963d3ff2f691d5ea37bce757ea86815002d5cb6 | 73231baec5f2a7c895d2059301caa63bb3369300 | thiagoTBA/GERAL | /LISTA/Aula 18 - projeto17/main.cpp | C++ | cpp | 1,326 | no_license | #include <stdio.h>
#include <stdlib.h>
/*
Outras Funções para manupulação de arquivos
FPUTC - Grava 1 Caracter no arquivo
FGETC - Lê 1 Caracter do arquivo
FPUTS - Grava uma sequência de Caracteres no arquivo
FGETS - Lê uma sequência de Caracteres do arquivo
FWRITE - Grava certa quantidade de bytes no arquivo
FREAD ... |
c72a779c8042adde2ca0aa98e3e84c74fd0b57fc | 10890bbae575d5dbbc025505061d400c0981f7d4 | zhutou82/JSEngine2.0 | /JSEngine2.0/src/JSEngine/Physics/Box2D.cpp | C++ | cpp | 1,847 | no_license | #include "PCH.h"
#include "Box2D.h"
namespace JSEngine
{
Ref<Box2D> Box2D::Create(const glm::vec2& pos, const glm::vec2& size)
{
return CreateRef<Box2D>(pos, size);
}
Box2D::Box2D(const glm::vec2& pos, const glm::vec2& size)
{
m_Size = size;
b2Vec2 position... |
c1b3c6e4d456cd7364468c22037b9bcc444b2cd9 | 76917013be5c11b84cf4bdb4097f86829fd4da90 | fressive/koe-app | /windows/runner/main.cpp | C++ | cpp | 1,221 | permissive | #include <flutter/dart_project.h>
#include <flutter/flutter_view_controller.h>
#include <windows.h>
#include "flutter_window.h"
#include "run_loop.h"
#include "utils.h"
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
_In_ wchar_t *command_line, _In_ int show_command) {
... |
49741f5bb6f45609120ee5537bebe6fedec69cfb | 38348344106c12db5dd2bb4b2b460e435b5e625d | YeeKayy/ffmpegPlayerQt | /my_player_qt/GeneratedFiles/Release/moc_myPlayerQt.cpp | C++ | cpp | 6,895 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'myPlayerQt.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.2)
**
** WARNING! All changes made in this file will be lost!
*********************************************************... |
bf36d4797ba6a0a15c0454011b14cf21f9e36d88 | 1dafc32dedbeb526c7a84b28fe3bbd4e045f1ba1 | lubas569/Halide | /src/CodeGen_Internal.cpp | C++ | cpp | 27,416 | permissive | #include "CodeGen_Internal.h"
#include "CSE.h"
#include "Debug.h"
#include "IntegerDivisionTable.h"
#include "IRMutator.h"
#include "IROperator.h"
#include "LLVM_Headers.h"
namespace Halide {
namespace Internal {
using std::string;
using std::vector;
using namespace llvm;
namespace {
vector<llvm::Type*> llvm_types... |
c5acdc3f786d659b8ee9ee04eb7a4e127eb42ede | 0e1b1f3029129c04c845de989e2d77fde5713424 | YJBeetle/QtAndroidAPI | /android-28/android/provider/Telephony_Mms_Rate.def.hpp | C++ | hpp | 585 | permissive | #pragma once
#include "../../JObject.hpp"
namespace android::net
{
class Uri;
}
class JString;
namespace android::provider
{
class Telephony_Mms_Rate : public JObject
{
public:
// Fields
static android::net::Uri CONTENT_URI();
static JString SENT_TIME();
// QJniObject forward
template<typename ...Ts... |
964bd38ae010197f7b8bd0ed040246ca805b175a | fac4c561b0ec457cde828f178ab52f0b36cc4d60 | pavanky/clSPARSE | /src/library/transform/sort-by-key.cpp | C++ | cpp | 7,841 | permissive | #include "clSPARSE.h"
#include "internal/clsparse-internal.hpp"
#include "internal/clsparse-validate.hpp"
#include "internal/clsparse-control.hpp"
#include "internal/kernel-cache.hpp"
#include "internal/kernel-wrap.hpp"
clsparseStatus
radix_sort_by_key(int keys_first,
int keys_last,
... |
e6cde12402d4aff4c38a5704c7b18a4894ba449f | c07b40cc3a4bbececef41b2dc44a242b3ba40796 | Voleco/hog2_BOBA | /apps/bidirectional/BidirSTP.cpp | C++ | cpp | 10,084 | permissive | //
// BidirSTP.cpp
// hog2 glut
//
// Created by Nathan Sturtevant on 1/30/17.
// Copyright © 2017 University of Denver. All rights reserved.
//
#include "BidirSTP.h"
#include "MNPuzzle.h"
#include "BOBA.h"
#include "IDAStar.h"
#include "TemplateAStar.h"
MNPuzzleState<4, 4> GetKorfInstance(int which)
{
int insta... |
08e6d308c953575f1ebebe984aed5779e06320f1 | 5f4a4884b05be4d163786eb372ab08015e87690a | VaNRoZ/Arrays_learning | /Arrays_learning/Arrays_learning.cpp | C++ | cpp | 209 | no_license |
#include <iostream>
int arrCreating()
{
int arr[5];
for (int i = 0; i < 5; i++)
{
std::cin >> arr[i];
}
return arr;
}
int
int main()
{
std::cout << "Second try for git!\n";
return 0;
}
|
10177ff37055af28287f3c18e473c0b1a14bedd6 | 24392ca6d4b266ccefc18ba862177b8049cb6146 | Jin02/SOCEngine | /SOCEngine/SOCEngine/Rendering/GI/InjectRadianceFromSpotLight.cpp | C++ | cpp | 2,778 | permissive | #include "InjectRadianceFromSpotLight.h"
#include "BindIndexInfo.h"
#include "ShaderFactory.hpp"
using namespace Device;
using namespace Math;
using namespace Core;
using namespace Rendering;
using namespace Rendering::Light;
using namespace Rendering::Shadow;
using namespace Rendering::Buffer;
using namespace Renderi... |
300c1f38ddd172f3454253c01c6e1e68e0e61135 | 93a09afcba81636d40a48fd884ad2afbeda3210e | AnandDhanalakota/Vin-Pro | /CPP/Deque.cpp | C++ | cpp | 2,936 | no_license | #include<iostream>
#include<iomanip>
using namespace std;
template <class T>
struct chainnode
{
T element;
chainnode<T> next,prev;
};
template<class T>class deque
{
private:
chainnode<T> *front,*back;
int deqsize;
public:
deque();
~deque();
bool isdequeempty();
T&deqfront();
T&deqba... |
4f2263a583517035a0a7fe82ecdc3ede19187bec | 61e65f47f53218c699e9c5f3b98bd457b0d11237 | sdanthinne/simpleSobel | /src/lib_perf_event_open.cpp | C++ | cpp | 1,542 | no_license |
#include "lib_perf_event_open.hpp"
#include <sys/ioctl.h>
#include <asm/unistd.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <asm/types.h>
#include <linux/perf_event.h>
#include <string.h>
#include <err.h>
/**
* Serves as a wrapper for the syscall that is perf_event_open.
* Taken from the perf_event_ope... |
fe31eb83ee40b33cbfe2e721895bbffd23980c8c | 26299e6948d304417f50c660c946fb9868d0b345 | KDE/korganizer | /src/datenavigatorcontainer.cpp | C++ | cpp | 13,337 | permissive | /*
This file is part of KOrganizer.
SPDX-FileCopyrightText: 2001, 2002, 2003 Cornelius Schumacher <schumacher@kde.org>
SPDX-FileCopyrightText: 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
SPDX-FileContri... |
30121a723f1dc22e3f913a43f6d1f179365e04c7 | 8254277ba671be3c60fbba143714e67e6b696667 | eriser/audio-1 | /picoloop/Machine/Picodrum/PicodrumADSR.cpp | C++ | cpp | 4,314 | no_license | using namespace std;
#include "PicodrumADSR.h"
enum
{
PicodrumADSR_INIT,
PicodrumADSR_ATTACK,
PicodrumADSR_DECAY,
PicodrumADSR_SUSTAIN,
PicodrumADSR_RELEASE,
PicodrumADSR_FINISH
};
#define SHIFT_TRIG 8 // for drum
PicodrumADSR::PicodrumADSR() : tanh_table(new Sint16[128])
{
float fi... |
c5e84171e6c945dbf8624888fb4842fcf34e115c | dde68d5bed51a287b239065ffe5ee9883de5acdc | BekzhanKassenov/olymp | /Russian Code Cup/2014/Qual 1/B/B.cpp | C++ | cpp | 1,591 | no_license | /****************************************
** Solution by Bekzhan Kassenov **
****************************************/
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define MP make_pair
#define all(x) (x).begin(), (x).end()
#define fill(x, y) memset((x), y, sizeof(x))
typedef... |
cc9038c48149f2ec9cc6a91617b4b11c86f61b55 | 2ac76d132ad087f213ccedf4add26b7e276d9d80 | jccosta/CS-GY-6533 | /Assignment_2/extra/main_properties.cpp | C++ | cpp | 6,823 | no_license | // This example is heavily based on the tutorial at https://open.gl
// OpenGL Helpers to reduce the clutter
#include "Helpers.h"
// GLFW is necessary to handle the OpenGL context
#include <GLFW/glfw3.h>
// Linear Algebra Library
#include <Eigen/Core>
// Timer
#include <chrono>
// VertexBufferObject wrapper
VertexB... |
84d1f295d07f405c6285a2a05b216f46821ca793 | 758fb625dfbf2fb5c1c5d091f523b9b4fcc916a6 | paranaliyanage/Halide | /apps/stencil/heat_2d_np_64.cpp | C++ | cpp | 2,227 | permissive | #include <Halide.h>
using namespace Halide;
Func heat_step(Func input, Expr max_x, Expr max_y) {
Var x("x"), y("y");
Func heat_0("heat_0"), clamped_0("clamped_0"), heat_1("heat_1"), clamped_1(
"clamped_1"), heat_2("heat_0"), clamped_2("clamped_0");
clamped_0(x, y) = input(clamp(x, 1, max_x), clamp(y, 1, max_y));... |
09712bdc610f294c3694c6752bf8ac54d961c274 | 9a8846ca5ce222cbee615f00f589e5f23d6324e3 | huntinux/leetcode | /src/tree/permutations/solution.cc | C++ | cc | 1,141 | no_license | #include "solution.h"
// 非常经典的一道题目
// 生成过程看成一颗树,结合树的深度优先遍历+回溯实现
// 其中depth、used、path是中间的状态变量
void Solution::dfs(vector<int>& nums, int depth, vector<bool>& used,
vector<int>& path, vector<vector<int>>& res) {
// if (path.size() == nums.size()) {
if (depth == nums.size()) {
// 递归终止条件,到达最大深度,说... |
8260a2a3313522c9f357f7a95e2f93ca5d0a8805 | ffadf8289816d79446eaf679c97b2908a9638beb | lachapelle/WardenSigning | /WardenSigning/SSignatureData.hpp | C++ | hpp | 852 | no_license | #pragma once
#include <openssl/sha.h>
#include <cstdint>
#include <vector>
class SSignatureData
{
private:
static constexpr std::uint32_t ModulusSize = 256;
static constexpr std::uint32_t ExponentSize = 4;
static constexpr std::uint32_t Signature = 'SIGN';
public:
explicit SSignatureData(std::uint32... |
d131ab3cb97e3fa820bbe4e532266d17a04b066d | 3e44daa812751a19823a0453b1c8c3767bdbd13d | ascend4nce/columbia | /nonlinearities.cpp | C++ | cpp | 16,773 | no_license | //This code file contains various geometry functions and material property functions.
#include <cmath>
#include <cstdio>
#include "constants.h"
double simpledatars(double x, double y, double alpha, double beta, double shift)
{
double res = 0;
double ys;
ys = y;
if (x > 1)
{
ys += shift;
if (ys > 1.0) ys -= 1... |
974faa5e255518edd217665e9adaaa41c7b3c362 | 3478a68532bf3170cf420b5d3e16cded1bd07725 | danimaleski/CadastroClienteTeste | /CadastroTeste.cpp | C++ | cpp | 4,415 | no_license | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <locale.h>
#include <ctype.h>
#include <math.h>
#define SIZE 200
#define EXIT_SUCESS 0
typedef struct enderecoCliente{
char rua[SIZE];
char bairro[SIZE];
char cidade[SIZE];
char estado[SIZE];
char numero[SIZE];
char cep[SIZE];
}E... |
b81f04b437ad7fa9df9efb21d3085659075acfb2 | 08d6de3fb5092283b6164278f0935fa386e971ba | Coder-256/cadical | /src/checker.hpp | C++ | hpp | 5,595 | permissive | #ifndef _checker_hpp_INCLUDED
#define _checker_hpp_INCLUDED
#include "observer.hpp" // Alphabetically after 'checker'.
/*------------------------------------------------------------------------*/
namespace CaDiCaL {
/*------------------------------------------------------------------------*/
// This checke... |
767f725355052dc877049fb047a047aba2e4108b | a196647614621ebe49fd074df5bfb308e6c0b083 | KorlaMarch/competitive-programming | /Codeforce/621_C_WetSharkAndFlowers.cpp | C++ | cpp | 1,112 | no_license | #include "stdio.h"
int n,p,i;
double x,y,d1,d2;
int l[100005],r[100005];
int cl,cr;
double exp;
int min(int a, int b){
return a<b?a:b;
}
int max(int a, int b){
return a>b?a:b;
}
int isIntersert(int x1, int y1, int x2, int y2){
if((x1>=x2&&x1<=y2)||(y1>=x2&&y1<=y2)||(x2>=x1&&x2<=y1)||(y2>=x1&&y2<=y1)){
... |
ee06c3a10038aa58eb538ba2340bcbc5acd7a08d | d70ba1af5934ccd0c7455a24f1660879384de367 | zeph1912/milkomeda_chromium | /content/public/test/mock_render_thread.cc | C++ | cc | 11,193 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/public/test/mock_render_thread.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/single_thread_task_run... |
b82d8c8480a34e1dda70380b3316ee0f4aa399ab | 170176ab292c78afdf4a451f0bb2088b6a5dcf02 | linfso/kdguigl | /kdgui/script/sqdbg/main.cpp | C++ | cpp | 2,036 | permissive | /*
see copyright notice in sqrdbg.h
*/
#ifdef _WIN32
#include <windows.h>
#include <winsock.h>
#endif
#include <squirrel.h>
#include <stdlib.h>
#include <stdio.h>
#include <sqstdblob.h>
#include <sqstdio.h>
#include <sqstdaux.h>
#include <stdarg.h>
#include <conio.h>
#include "sqrdbg.h"
#include "sqdbgserver.h"
#if... |
f28deeaf20479baeec4d24e811f508e29d176b02 | 735d725e96ef2267d07ac12510b9b5eb76cd40c2 | HekpoMaH/Olimpiads | /grupa C/olimpiada/oblasten/2011/raboti/Pleven/Pleven/C/LEC/roses.cpp | C++ | cpp | 542 | no_license | #include<iostream>
using namespace std;
long long a[1001][1001],n,m,k,b,i,j,max1;
int main()
{
cin>>n>>m>>k;
for (i=1;i<=n;i++)
{
for (j=1;j<=m;j++)
{
cin>>b;
a[i][j]=b+a[i-1][j]+a[i][j-1]-a[i-1][j-1];
}
}
for (i=1;i<=n;i++)
{
for (j=1;j<=m;j++)
{
i... |
49fdb71272173da75f54d589b9c357d34f3864ca | ee22a31d11dd6a5a53f2d80e5e6c9a8a2ea4ce83 | Darui99/ITMO-Discrete-Mathematics | /Laboratory work 10 - Generation functions/Rational generation function.cpp | C++ | cpp | 750 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n;
cin >> n;
vector <ll> a(n), c(n);
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 0; i < n; i++)
cin >> c[i];
vector <ll> p(n);
for (... |
97757da29cc826184120a7c22ab80a6e29a85a71 | b1befacbaac2921ec146cf5d8986be258946ccd5 | raux/Principia | /integrators/methods.hpp | C++ | hpp | 68,062 | permissive |
#pragma once
#include "base/mod.hpp"
#include "base/not_constructible.hpp"
#include "numerics/fixed_arrays.hpp"
#include "serialization/integrators.pb.h"
namespace principia {
namespace integrators {
namespace methods {
using base::mod;
using base::not_constructible;
using numerics::FixedStrictlyLowerTriangularMat... |
e8d4b418bd492e855961732da7c1a0248372910a | 24250a1feb910072a359509be7a79372e346846c | kit10000000/chat | /Server/Server.cpp | C++ | cpp | 7,454 | no_license | #include "stdafx.h"
#include <vector>
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <string>
#include <list>
#define I_MUST_READ_MY_PIPE 11101
#define MAX_BUFFER_SIZE 512
#pragma warning(disable : 4996)
using namespace std;
DWORD WINAPI ThreadProc(LPVOID);
vector<DWORD> ThreadsId;//список всех id... |
fabf164a1cfa5df7b3e0f88b4636ae98305f56fb | 7024dfde47984578e3e69d687ce4f0fe8f958d74 | fcccode/apilib | /str/strhex.cpp | C++ | cpp | 2,299 | no_license | #include "../cfg.h"
#include "../include/lib.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
#include "strhex.h"
#include "strhex.hpp"
///////////////////////////////////////////////////////////////////////////////////////////////////
size_t apilib::strtohex_la... |
125792849b2b2efea904222103730730534d6638 | 7c02f37fa3ef936e291f10c056125e343453bee7 | phlrain/Paddle | /paddle/fluid/operators/detection/multiclass_nms_op.cc | C++ | cc | 26,769 | permissive | /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... |
26e9500bf3f9755c3ba28bf77a00810c35e083bd | d696693034a1cc89a6a67fe9143a7ba674cb6692 | xariniov9/Competitive-programming | /Dec16long/alexrose.cpp | C++ | cpp | 4,779 | no_license | // HIMANSHU TIWARI
// DECEMBER '16 LONG CHALLENGE
// XARINIOV9
/*
*/
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<set>
using namespace std;
#define MOD 1000000007
typedef long long int LLI;
int Agli_Sankhya(){
int num = 0;
char c = getchar();
while(!((c>='0') & (c<='9')))
c=getc... |
273cc1a22c02976dbe6fbc86a3b29f76480f8fe2 | f3e3d062caacf926a16a38f8ba34670fc0e1f658 | iihe-cms-sw/TreeAnalysis | /DYJets/Sources/BLUEMeth.cc | C++ | cc | 10,573 | no_license | #include "BLUEMeth.h"
#include <iostream>
#include <cmath>
#include <vector>
#include "TNamed.h"
#include "TMatrixD.h"
#include "TDecompSVD.h"
#include "TVectorD.h"
#include "TH1.h"
#include "TH2.h"
using namespace std;
//ClassImp(BLUEMeth);
BLUEMeth::BLUEMeth(const vector<TH1D*> &measurements, const vector<vector... |
9174af73f307f9d7ad46e2973376d47947bbc329 | 41547f12d82e183514956d3d772385a28b895c2e | puppym/clang-tools-extra | /clang-tidy/smartcontractsecurity/StringtosymbolCheck.cpp | C++ | cpp | 1,287 | permissive | //===--- StringtosymbolCheck.cpp - clang-tidy------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
9b68dfe928ee6ca8bbcc4a89990326a2c471054e | eb85012c4b24b90eac5cb78386a27fa4ec495e0b | pjones1063/Atari_ST_Sources | /C/Michael Ritzert/SFP004/SRC/LDEXP.CPP | C++ | cpp | 1,547 | no_license | # add exponent to floating point number
# C Interface
# double ldexp(double value, unsigned int exp);
# returns value * 2**exp
# (int is 16 bits if -mshort, 32 bits if !-mshort)
# performed entirely on the 68881 to avoid overfow as good as possible
#################################################################... |
8e13defe3e1e60b10572e04f5555fb4f89d9af71 | 7cedfb07f85e7ff56c83ef29ee26f86ee66ea1a9 | raynald/coding-contest-all | /epfl-hc/hc2014/crypto2/cryptoLib2.hpp | C++ | hpp | 439 | no_license | #ifndef CRYPTO_2_HPP_INCLUDED
#define CRYPTO_2_HPP_INCLUDED
#include <string>
namespace cryptoLib2 {
extern const std::string ALPHABET;
bool is_valid_key(std::string k);
bool is_valid_cleartext(const std::string &s);
int char_index(char c);
std::string encrypt(std::string message, const std::s... |
bf3128ca84f5a56ef0b4800ee3fb5d428be92b61 | 28f581b966966ba6fac394fc30b66c35ed3790c0 | yongdaimi/cpp | /10-C++输入输出/02-输入输出成员函数/02-输入输出成员函数/main.cpp | C++ | cpp | 755 | permissive | #include <iostream>
#include <cstdlib>
using namespace std;
int main01()
{
char *a = "BASIC";
for (int i = 4; i >= 0; i--)
putchar(*(a + i));
putchar('\n');
system("pause");
return 0;
}
int main02()
{
int c;
cout << "enter a sentence: " << endl;
while ((c = cin.get()) != EOF)
cout.put(c);
return 0;
... |
577ea141ed3888cd61142c81bab4f4ede39c6800 | 26255745a90504d8f4f3e965f4cfd716b236f825 | Deltaidiots/EquationComposer | /ModuleAnalogInput.cpp | C++ | cpp | 775 | no_license | #include "ModuleAnalogInput.h"
#include "defines.h"
ModuleAnalogInput::ModuleAnalogInput(int input_pin)
{
this->value = 0;
this->pin = input_pin;
}
uint32_t ModuleAnalogInput::read()
{
// analogRead resolution is set to 10 bits, so it's necessary
// to convert this input to 12 bits to cover the entire 0 - 4... |
77aec0d1470bd0f098cb2d7bc057557b614b8673 | b6d4272b4e84f2612499158759b5c275c75d2895 | llyy4210/git1 | /ep030.cpp | C++ | cpp | 591 | no_license | /*************************************************************************
> File Name: ep030.cpp
> Author:
> Mail:
> Created Time: 2018年07月31日 星期二 15时24分26秒
************************************************************************/
#include<stdio.h>
#include<math.h>
#define MAX_N 354294
int is_he(int a){
in... |
274a90429fd8009f4f5805550ed15f1c6f079dfd | 335d7425560810f05b752db71a550ee876e597de | gkliska/razvoj | /openerp6/client/bin/build/matplotlib/agg23/src/platform/mac/agg_platform_support.cpp | C++ | cpp | 34,371 | permissive | //----------------------------------------------------------------------------
// Anti-Grain Geometry - Version 2.3
// Copyright (C) 2002-2005 Maxim Shemanarev (McSeem)
// Copyright (C) 2003 Hansruedi Baer (MacOS support)
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided ... |
99b2fa9e94c20d16bbd0585e9180267be4e9599a | ab7e5aaff6af843efaf81d2e48df642da2beb60d | toooooodo/PAT-A | /1154 Vertex Coloring (25 分).cpp | C++ | cpp | 734 | no_license | #include <iostream>
#include <vector>
#include <set>
using namespace std;
#define MAX 10000
struct edge {
int v, u;
}edges[MAX];
int check(vector<int> &colors, int m) {
set<int> cl;
for (int i = 0; i < m; i++) {
if (colors[edges[i].u] == colors[edges[i].v])
return -1;
}
for (int i = 0; i < colors.size(); ... |
d0ea237433ae0ead2dc8186f89537e7519e741ed | 5475ced9f1a1bda4a76f74726ec2a89f07a2f2e6 | spectro30/CodeHouse | /DP/CoinChange/LOJ_1231_2_States_Reduced.cpp | C++ | cpp | 833 | no_license | #include <bits/stdc++.h>
#define mod 100000007
using namespace std;
int n,k,a[55],cnt[55],ans,dp[55][1010];
int rec(int i,int koto){
if(i==n+1){
if(!koto)return 1;
else return 0;
}
int res1=0;
if(dp[i][koto]!=-1)return dp[i][koto];
for(int ii=1;ii<=cnt[i];ii++){
if( (koto- (a[i]*ii) )>=0 )res1+=(r... |
9957e233827e489b96180eaf84cdbf5bda77e3cf | e6554f362bff55d6cf001b262b74ab81d60b6c65 | mikicompany/Unreal-Test2DPlatformer | /Source/Test2DPlatformer/FAPPlayerController.cpp | C++ | cpp | 345 | no_license | // Fill out your copyright notice in the Description page of Project Settings.
#include "Test2DPlatformer.h"
#include "FAPPlayerController.h"
AFAPPlayerController::AFAPPlayerController(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
bShowMouseCursor = true;
DefaultMouseCursor = EMo... |
595e83f3054d8549796d0b2af300c0fce5a752a6 | 31cbd0b5f3533c287c1abb651e00a1b0b62300ba | mpcore-hub/ES-Legacy | /es-app/src/VolumeControl.cpp | C++ | cpp | 12,237 | permissive | #include "VolumeControl.h"
#include "math/Misc.h"
#include "Log.h"
#include "Settings.h"
#ifdef WIN32
#include <mmdeviceapi.h>
#endif
#if defined(__linux__)
#ifdef _RPI_
const char * VolumeControl::mixerName = "pcm";
#else
const char * VolumeControl::mixerName = "Lineout volume control";
#end... |
e29e995c8cb31a4a73752f65de8f1328098fb357 | 6082fd715dd5d078a9d9923c6c706090f41a2294 | davidmoreno/locic | /include/locic/CodeGen/Debug.hpp | C++ | hpp | 2,271 | permissive | #ifndef LOCIC_CODEGEN_DEBUG_HPP
#define LOCIC_CODEGEN_DEBUG_HPP
#include <string>
#include <vector>
#include <boost/optional.hpp>
#include <locic/CodeGen/LLVMIncludes.hpp>
#include <locic/Debug.hpp>
#include <locic/Name.hpp>
#include <locic/SEM.hpp>
namespace locic {
namespace CodeGen {
struct DebugCompileUn... |
dd94d583ae605d04b3009ddcc28186a53dab1797 | a96d2538637d09b3ba7c42ac7dee7475fa59a4e9 | charlottetan/Algos | /OnlineLinks/AllMultithreadingProblems.cpp | C++ | cpp | 12,049 | no_license | #include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm> // For sort
#include <thread>
#include <chrono> // Sleep
#include <mutex>
#include <condition_variable>
#include <queue>
using namespace std;
/*
* PROBLEM 1. Producer Consumer Problem
* void producer()
* void consumer()
*
* PROB... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.