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 |
|---|---|---|---|---|---|---|---|---|
a49cb4d352160991a5b2c815eee578e25a416396 | fc953ecfa38d282c4fd09109df565cdf950d523f | verDenoise/am16-ds | /labs/lab5/sharok007/list.hpp | C++ | hpp | 345 | no_license | #ifndef LIST_HPP
#define LIST_HPP
#include <iostream>
class List{
private:
struct element{
int key;
std::string value;
element *next;
};
element *root;
public:
List();
~List();
void add(int _key,std::string _value);
std::string search(int _key);
};
#include "list.... |
b1f37570eaeefa9c9f86930e3356504e4b58e1b2 | 7cd1bd9b6025779f24e6b60612498f5db2853dfb | moevm/oop | /8382/Mironchik_Pavel/lr4/include/GAME/engine/Neutral.hpp | C++ | hpp | 1,010 | no_license | #pragma once
#include <SFML/Graphics/Texture.hpp>
#include <GAME/engine/GameObject.hpp>
#include <GAME/graphics/ShapeDrawer.hpp>
#include <GAME/engine/BoardListener.hpp>
class Unit;
class Neutral : public GameObject {
private:
const sf::Texture *_texture = nullptr;
ShapeDrawer _shapeDrawer;
int _effectDistance =... |
233c8cfb4632499a7eebf288517cb2e77d5d72a0 | 51cca6fdfdaca330e74fa2fa09a9392600fd6045 | nrkurata/onikiri2 | /src/Emu/Utility/SkipOp.cpp | C++ | cpp | 2,546 | permissive | //
// Copyright (c) 2005-2008 Kenichi Watanabe.
// Copyright (c) 2005-2008 Yasuhiro Watari.
// Copyright (c) 2005-2008 Hironori Ichibayashi.
// Copyright (c) 2008-2009 Kazuo Horio.
// Copyright (c) 2009-2015 Naruki Kurata.
// Copyright (c) 2005-2015 Ryota Shioya.
// Copyright (c) 2005-2015 Masahiro Goshima.
//
// Thi... |
437b690bf7002227f108c45d02503fa3953c0ab1 | c1042209d394ee2fa6112a9409fb0245bffa8792 | scytulip/MyCollections | /0_LeetCode/remove-duplicates-from-sorted-array-ii.cpp | C++ | cpp | 694 | no_license | class Solution {
public:
int removeDuplicates(vector<int>& nums) {
int count;
int i;
int n = nums.size();
int len = 2;
if (n==0)
return 0;
else if (n==1)
return 1;
else if (n==2)
return 2;
vector<in... |
0b85c81ec4c2ff4dbf1be26d59bc0bc57f4d1a62 | 650fdeea1cc27007a34969254f71a75a4622c3fa | svn2github/OpenMPT | /tags/1.22.01.00/mptrack/PatternEditorDialogs.cpp | C++ | cpp | 55,927 | permissive | /*
* PatternEditorDialogs.cpp
* ------------------------
* Purpose: Code for various dialogs that are used in the pattern editor.
* Notes : (currently none)
* Authors: Olivier Lapicque
* OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/... |
3053be0cade9a31c7b93ff8aa9a427c33460bc62 | 4511097ebcbc9622bc21756938c68632a339a822 | arc80/plywood | /repos/plywood/src/web/cook-docs/ply-web-cook-docs/CookResult_CopyStatic.cpp | C++ | cpp | 2,233 | permissive | /*------------------------------------
///\ Plywood C++ Framework
\\\/ https://plywood.arc80.com/
------------------------------------*/
#include <ply-web-cook-docs/Core.h>
#include <ply-cook/CookJob.h>
namespace ply {
namespace docs {
void cook_CopyStatic(cook::CookResult* cookResult, AnyObject) {
PLY_ASSE... |
f24eddb53d8932cb47c0f08f5cce7253e98c9653 | a032243a61d2517df3f18b54b35442dff9b0240b | MakSim345/cpp | /error_catch_edu/main.cpp | C++ | cpp | 1,518 | no_license | #include <stdio.h>
#include "math.h" // for sqrt function
#include "gen.h"
class DivideByZeroError
{
public:
DivideByZeroError()
: message("Divide to ZERO!\n")
{
//
}
void printMesage() const { printf ("%s", message);}
private:
const char * message;
};
float quotient(int num1, i... |
9db132fde497bcd5395dc4de68e9c3b10084fb0c | 110534d0a52093955daf25a9dc6790c076d2f610 | tmuttaqueen/MyCodes | /Online Judge Code/[Other] Online-Judge-Solutions-master_from github/SPOJ/Classical/4164 - A conjecture of Paul Erds.cpp | C++ | cpp | 1,054 | no_license | #include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
bool is_prime(int n){
if(n < 2) return false;
if(n == 2) return true;
if(n % 2 == 0) return false;
for(int i = 3;i <= n/i;i += 2)
if(n % i == 0) return false;
return true;
}
int main(){
vector<int>... |
e12ce9f4f6ae5a5ac0279b6a9df96a9f774ba0d3 | 7294693d26b2a4d08148d210d71a0d924588d74b | aliaspider/armips | /Core/Misc.cpp | C++ | cpp | 4,535 | permissive | #include "stdafx.h"
#include "Misc.h"
#include "Common.h"
#include "Core/FileManager.h"
#include <iostream>
#ifdef _WIN32
#include <windows.h>
#endif
std::vector<Logger::QueueEntry> Logger::queue;
std::vector<std::wstring> Logger::errors;
bool Logger::error = false;
bool Logger::fatalError = false;
bool Logger::error... |
7c2497efd9a02f456f7e8b60c319ab4fac9a3034 | ddcf76f816d1a366fbb41d284edc06169b611c80 | reezer/maplibre-gl-native | /platform/android/MapboxGLAndroidSDK/src/cpp/style/formatted_section.cpp | C++ | cpp | 225 | permissive | #include "formatted_section.hpp"
namespace mbgl {
namespace android {
void FormattedSection::registerNative(jni::JNIEnv& env) {
jni::Class<FormattedSection>::Singleton(env);
}
} // namespace android
} // namespace mbgl |
2b2b30fe5a8417daf3dc71b82936ab5944d747b9 | 43c18706b7797cd6233edea380110069251d9b0a | LeeWooSang/MapleStory | /GameServer/Code/GameObject/Status/PlayerStatus/PlayerStatus.cpp | C++ | cpp | 4,820 | no_license | #include "PlayerStatus.h"
#include "../../Job/Job.h"
//#include "../../Item/ArcaneSymbol/ArcaneSymbol.h"
PlayerStatus::PlayerStatus(const string& name)
: Status(name)
{
m_exp = 0;
m_MP = 0;
m_STR = 0;
m_DEX = 0;
m_INT = 0;
m_LUK = 0;
m_Damage = 0;
m_critical = 0;
m_criticalDamage = 0;
m_bossDamage = 0;
m_... |
cfeba625c13417f71ee15f21c867c37cec10315c | 47b96ac8aec8c4b92525c1de1ffab13165d701d3 | shifanpazheri/Codechef | /DSA Learning Series/Complexity Analysis + Basics Warm Up/CARVANS.cpp | C++ | cpp | 419 | no_license | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
vector <int> max;
max.resize(n);
vector <int> a;
a.resize(n);
for(int i=0;i<n;i++)
{
cin>>max[i];
a[i]=max[i];
}
for(int i=1;i<n;i++)
{
a[i]=min(a[i],a[i-1]);
}
int c... |
7acf6199453a40936fa0e882553a338b00afc080 | 86dcee112814b0ef4d46b8b857ed550177cfee3f | yumilceh/libqi | /tests/type/test_value.cpp | C++ | cpp | 31,778 | no_license | /*
**
** Copyright (C) 2012 Aldebaran Robotics
*/
#include <map>
#include <gtest/gtest.h>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
#include <qi/application.hpp>
#include <qi/anyobject.hpp>
#include <qi/type/dynamicobjectbuilder.hpp>
#include <qi/jsoncodec.hpp>
using namespace qi;
qiLogCate... |
a69682534841f8ee9b349ea714aeeeed60f97da0 | da1adea3e039d84d1d0afb28963ea188249aff92 | nibilin33/chromium | /media/gpu/windows/d3d11_copying_texture_wrapper_unittest.cc | C++ | cc | 7,627 | 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 <utility>
#include "base/bind_helpers.h"
#include "media/gpu/windows/d3d11_copying_texture_wrapper.h"
#include "media/gpu/windows/d3d11_texture_... |
e8d735400e21718cd2ffbc664efe9a26cc56d7b9 | a6c802c6894d03185c870326491670d60adaddfb | doctorxyz/ps2autotests | /tests/cpu/ee/lsu.cpp | C++ | cpp | 8,051 | permissive | #include <common-ee.h>
#include <string.h>
static u32 __attribute__((aligned(16))) C_GARBAGE1[4] = {0x1337, 0x1338, 0x1339, 0x133A};
static u32 __attribute__((aligned(16))) C_PATTERN[3][4] = {
{0x45678123, 0x9ABCDEF0, 0xDEADBEEF, 0xC0DE1337},
{0x23456789, 0xABCDEF01, 0xBEEFDEAD, 0xC0DEC0DE},
{0x8899AABB, 0xCCDDEEFF... |
236f275e93d6031ac366f3e117895e6ce62e7e82 | fcaa3fda471c7ac1852fb4630c3cbce5ab7563a8 | TeresaChou/LearningCpp | /Old Lessons/wheat 2.cpp | C++ | cpp | 731 | no_license | #include <iostream>
#include <math.h>
using namespace std;
int main() {
// Please complete the program so that when use input an integer as the number of blocks on the chess board
// the program will shows how much wheat should be place on each blocks
// and the total amount of the wheat.
// ex:
// inp... |
f183df7a45c31c6138f08e8b5e3186eea8732cf7 | ff3a3636263ebca8eb1bc8d14ff99a6585feece5 | kev-reyn/Finalizado | /ProfesorVista.cpp | C++ | cpp | 1,478 | no_license | /*
* ProfesorVista.cpp
*
* Created on: 25 may. 2020
* Author: nanis
*/
#include "ProfesorVista.h"
#include <stdio.h>
#include <string>
#include "Profesor.h"
#include "ProfesorBS.h"
#include "MedioContacto.h"
#include "ControlEscolar.h"
namespace std {
ProfesorVista::ProfesorVista() {
// TODO Auto-generat... |
cc8b50502f5fb15f14ed9b64d569a675113af2fa | 3c5b363b6e2ba77f97b82d8303619e7fa4fb35dd | Brillist/Optimizer-History | /cls/CompositeResourceRequirement.cpp | C++ | cpp | 2,240 | no_license | #include "libcls.h"
#include <libutl/AutoPtr.h>
#include "CompositeResource.h"
#include "CompositeResourceRequirement.h"
#include "IntActivity.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
UTL_NS_USE;
LUT_NS_USE;
CLP_NS_USE;
//////////////////////////////////... |
be9d5f8be60b1e503c36ff263f801ab8c3430504 | d6bb5e5c74fb519b4e6d3f4ffbc935f08b5699eb | nuununuun/DefenseGame | /Classes/FlyingEye.cpp | C++ | cpp | 1,876 | no_license | #include "FlyingEye.hpp"
#include "MainScene.h"
USING_NS_CC;
/*
FlyingEye * FlyingEye::create()
{
auto ret = new (std::nothrow) FlyingEye();
if (ret && ret->init()) {
ret->autorelease();
}
else CC_SAFE_DELETE(ret);
return ret;
}
*/
FlyingEye::FlyingEye()
{
init();
}
bool FlyingEye::init()
{
sprite = Spri... |
16c1b0bef13f9e84cbaf6cbf7d44dc7cf91726fc | fcc07e9bb8f7ae956d831625b0b452cb161f2cc2 | CaoHoaiTan/HCMUTE | /Nhập môn lập trình - Introduction to Programming/Chapter 2/C Cplusplus/B22-CountSquareNumber.cpp | C++ | cpp | 508 | no_license | //-----So luong Square Number-----
#include <stdio.h>
#include <math.h>
void nhap(long int &n);
char SqNum(int n);
int count(int n);
void xuat(int kq);
int main()
{
long int n;
nhap(n);
int kq=count(n);
xuat(kq);
return 0;
}
void nhap(long int &n)
{
scanf("%d", &n);
}
char SqNum(int n)
{
int sqrtN=sqrt(n);
... |
ff025a76d2161162a4f12d25f3194012fe8cf8fd | 8effbca57761891aef99e0a47f896139fd1d4b85 | jayant99acharya/orbit | /src/SessionSetup/OverlayWidget.cpp | C++ | cpp | 2,129 | permissive | // Copyright (c) 2020 The Orbit 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 "SessionSetup/OverlayWidget.h"
#include <QColor>
#include <QPainter>
#include "OrbitBase/Logging.h"
#include "ui_OverlayWidget.h"
namespace {... |
a7c17a570cb567f06afc4bcef751f0e111d27a49 | 8a7023111c8a684e46c7b021ef96c3f8e0b0dc80 | alenming/trunkClient | /cocos2d/cocos/scripting/lua-bindings/manual/cocos2d/LuaScriptHandlerMgr.cpp | C++ | cpp | 12,631 | permissive | /****************************************************************************
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
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 ... |
27b967b2e9bbb18d0799af43a2b9542a46a9cc78 | 1141f0f8ebc69ea31761fab29722beb14db12abd | paulnovo/opensurgsim | /SurgSim/Physics/UnitTests/ContactConstraintGenerationTests.cpp | C++ | cpp | 7,209 | permissive | // This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICE... |
f6f3560c0e4b9c535179118a9c76ce58116a86dd | 5e787b143d3cadfd911b4f244da6324a8b307a31 | claritydevs/clarity | /src/net.cpp | C++ | cpp | 93,790 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#i... |
d0c4fae70cebbd7159efa2e0c7687e2e8ff52c88 | 12381b45364f966c891781323aa25eb4ebfe937e | zhou78yang/homeworks | /bases/graphs/gedian_table.cc | C++ | cc | 1,479 | no_license | #include <iostream>
#include <algorithm>
using namespace std;
#define N 1005
#define M 10005
int n, m;
int u[M], v[M], first[N], nxt[M];
int num[N], low[N], index = 0, root;
bool book[N] = {0}; // 记录是否为割点
void dfs(int cur, int father)
{
int child = 0;
num[cur] = ++index;
low[cur] = i... |
0b56abac99061692165c61b7fe4a4ac5668822bc | 1e90ecaf9961b9677271079fcdc4fcb0f713f9bc | hank08tw/SproutOJ | /62/main.cpp | C++ | cpp | 5,807 | no_license | #include <iostream>
#include <vector>
#define NUM 9
using namespace std;
char sudo[NUM][NUM]={'.'};
struct node{
int x;
int y;
};
vector<node> data;
bool wintmp=false;
bool losetmp=false;
bool ending=false;
void printout(){
for(int j=0;j<NUM;j++){
for(int i=0;i<NUM;i++){
cout << sudo[j][... |
513f0bf6ed68953d8acee0c7eecd217e1825d49e | 2fc4cb6a36e1d755fa051ea1aacee4376e3c7e92 | migashko/faslib-sandbox | /debris/fas/serialization/json/aspect_type.hpp | C++ | hpp | 619 | no_license | #ifndef FAS_SERIALIZATION_JSON_ASPECT_TYPE_HPP
#define FAS_SERIALIZATION_JSON_ASPECT_TYPE_HPP
#include <fas/serialization/parser/aspect.hpp>
#include <fas/serialization/ser/aspect.hpp>
#include <fas/serialization/deser/aspect.hpp>
#include <fas/aop/aspect_merge.hpp>
namespace fas{ namespace json{
/*
typedef ::fa... |
b566bf99ce274bfbeb69a5ca94ca697ec0d24d58 | 72bfd04f86a41af2e85fac0d5906a660d7d2eb90 | innogames/freebsd-ports | /www/chromium/files/patch-third__party_ipcz_src_reference__drivers_random.cc | C++ | cc | 966 | permissive | --- third_party/ipcz/src/reference_drivers/random.cc.orig 2022-06-17 14:20:10 UTC
+++ third_party/ipcz/src/reference_drivers/random.cc
@@ -15,7 +15,7 @@
#include <limits>
#elif BUILDFLAG(IS_FUCHSIA)
#include <zircon/syscalls.h>
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#elif BUIL... |
fd27a43a346ee6e8ba8b8593a0b028654845fa56 | 816d266cd55a597eeff8ec85df4c429f8078cdc6 | DeveloperPaul123/CMakeWizard | /src/main.cpp | C++ | cpp | 3,719 | permissive | #include <QApplication>
#include <QCommandLineParser>
#include <QDir>
#include <QTextStream>
#include "mainwindow.h"
#include "cmakebuildmover.h"
#include <iostream>
#include <easylogging++.h>
INITIALIZE_EASYLOGGINGPP
QCoreApplication* createApplication(int &argc, char *argv[])
{
if(argc >= 2) {
return... |
55a7746530314f871a34639ece8f3e144adb1fa2 | 87b4124d408675ac7b074196f530d4bc5580743e | maoxingda/qt-src | /src/gui/symbian/qsymbianevent.cpp | C++ | cpp | 5,192 | no_license | /****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** GNU Lesser General Public L... |
943f0735cd5571ddf58ae23223460001afd615b7 | 46fddf99a40d453a5f358e508bec864ae162aec5 | jthommen/bulls-and-cows | /BullCowGame/main.cpp | C++ | cpp | 3,851 | no_license | /* This is the console executable, that makes use of the BullCow class
This acts as the view in a MVC pattern, and is responsible for all user interaction.
For game logic see the FBullCowGame class.
*/
#pragma once
#include <iostream>
#include <string>
#include "FBullCowGame.hpp"
// using unreal types
using FText =... |
168171e316a054c8f6972f3f21134a32f0d90408 | b771a309a217c5b33bef810194c1a51b0c66163c | svn2github/angelscript | /branches/2.7.1/sdk/tests/test_feature/source/test_import2.cpp | C++ | cpp | 2,186 | no_license | //
// Tests importing functions from other modules
//
// Test author: Andreas Jonsson
//
#include "utils.h"
namespace TestImport2
{
#define TESTNAME "TestImport2"
static const char *script1 =
"import void Test() from \"DynamicModule\"; \n"
"void Run() \n"
"{ ... |
e2d0f1aed86643e1237a1afb5d16be34e10a0adf | ebe83fca2f7deb4b6a177ee69b3d2cc7382c7d28 | jacopok/interferometry | /montecarlo/Alpha/alpha.cxx | C++ | cxx | 4,118 | no_license | #include <iostream>
#include <fstream>
#include <cmath>
#include <string>
#include "PDF.h"
#include "MultiPDF.h"
#include "LinearFit.h"
#include "PDFFactory.h"
#include "PDFFactoryManager.h"
#include "ErrorPropagator.h"
using namespace std;
class Alpha: public ErrorPropagator{
public:
Alpha(con... |
29fa91a62aa6bcf37a65ea8b9a6c4529e7569c7c | 61e120608a7038613930ef016baaed4195be74a3 | oneeyeman1/wxWidgets | /src/generic/odcombo.cpp | C++ | cpp | 33,893 | no_license | /////////////////////////////////////////////////////////////////////////////
// Name: src/generic/odcombo.cpp
// Purpose: wxOwnerDrawnComboBox, wxVListBoxComboPopup
// Author: Jaakko Salli
// Modified by:
// Created: Apr-30-2006
// Copyright: (c) 2005 Jaakko Salli
// Licence: wxWindows licenc... |
8dd3f09f7d9717ccd64b3543483d34f62c689cb0 | ff6b5bf1c833e3b4e995830b4c64ceef340bd8c8 | pizibing/bones-animation | /src/view/ConcreteDisplay.cpp | C++ | cpp | 3,319 | no_license | #include <gl/glut.h>
#include <gl/glext.h>
#include <assert.h>
#include "../data/SimpleLine.h"
#include "../matrixlib/Vector3D.h"
#include "../data/VBOMesh.h"
#include "Display.h"
#include "ConcreteDisplay.h"
// declare some VBO function which is defined in main.cpp
extern PFNGLBINDBUFFERARBPROC pglBindBuf... |
56edc9d02b9d3a6401ce6adc65558e8dfbc4036f | 27c48700f9561a43902be4af5f6edb61e1c74c1b | turbosun/cortex | /src/IECorePython/JPEGImageWriterBinding.cpp | C++ | cpp | 2,206 | no_license | //////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007-2010, Image Engine Design Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// ... |
6c061eb484684d36a48f6d1c27e755a567295762 | f3ebc079b60be49b5976ab7201bea0cb43111c41 | ahwatts/graphplay | /graphplay/fzx/BBox.cpp | C++ | cpp | 1,497 | no_license | // -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#include "../graphplay.h"
#include "BBox.h"
#include <limits>
#include <glm/vec4.hpp>
namespace graphplay {
namespace fzx {
static constexpr float FLOAT_MIN = std::numeric_limits<float>::lowest();
static constexpr float FLOAT_MAX = s... |
3c10f5405a7e7a844fe983cdbe649becef550e5e | 612cb23ea5a6702c8514361a2c2ac22f8b9806a7 | yxf010/matlab_ws | /sensor_filter/03_filter_ultrasonic/readfileFIR.cpp | C++ | cpp | 1,515 | no_license | // reading a text file
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include "filt.h"
int status;
//ts 0.1s
using namespace std;
void display(vector<string> &v)
{
for(int i = 0; i < v.size(); i++)
{
cout << v[i] << " ";
}
cout << "\n" << endl;... |
becfc274d849de667a7ca9168249f6859e3cb326 | ac81c4835b7befd7b928766440c1d8e668cf5358 | SelyanKab/chromium | /media/capture/video/video_capture_device_factory.cc | C++ | cc | 889 | 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 "media/capture/video/video_capture_device_factory.h"
#include <utility>
#include "base/command_line.h"
#include "build/build_config.h"
#include... |
5253b34ec042742cf9b1fe2e968d8b51200bd13b | e6c1aa0e238263b9cd79b82893a7f1b5686791b4 | coutamg/redbase | /rm_filehandle.cpp | C++ | cpp | 5,435 | no_license | #include <errno.h>
#include <string.h>
#include <stdio.h>
#include <iostream>
#include <math.h>
#include "rm.h"
#include "rm_error.h"
#include "rm_filehandle.h"
#include "rm_pagehdr.h"
using namespace std;
//
// CalcSlotsSize - 计算一个数据块最多所支持的存储的记录的条数
//
uint static CalcSlotsCapacity(uint len)
{
uint remain = PF_PAGE... |
16334ce5df08f0f01f6a02a7a956d0ff7cf5c694 | 1074a1a35abaf875ec7a05b775f0bd07ebcb7602 | sid1980/CppQtProjects | /L1_EventHandling/Lesson4/build-OverrideEventMethod-Desktop_Qt_5_12_8_MSVC2017_64bit-Debug/debug/moc_button.cpp | C++ | cpp | 2,602 | no_license | /****************************************************************************
** Meta object code from reading C++ file 'button.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.8)
**
** WARNING! All changes made in this file will be lost!
*************************************************************... |
fb4d2067f8fca748cc6f524fd82bffbf3d17fec8 | ac2a0adb4507c3ac0459f4f23d5b1824f78f4542 | shirishbahirat/code_examples | /curcular-ll.cpp | C++ | cpp | 1,627 | permissive | #include <iostream>
using namespace std;
struct node {
uint32_t data;
node* next;
};
void insert_cursor(node** cursor,uint32_t data)
{
node* current_node = *cursor;
current_node->data = data;
current_node->next = current_node;
}
void insert_node(node** cursor, uint32_t data)
{
node* current_node = *cursor;... |
7a2618a7d8f2186292241be13062470ac227c6f9 | 73878b75cba864b9d6ca9139eded7322268e14e1 | bitwyre/sdk | /cpp/source/rest/public/SupportedLanguages.hpp | C++ | hpp | 1,606 | permissive | #pragma once
#include "../../details/Dispatcher.hpp"
using namespace Bitwyre::Details;
using AsyncSupportedLanguagesResponse = std::future<SupportedLanguagesResponse>;
namespace Bitwyre::Rest::Public {
struct SupportedLanguages {
using Callback = std::function<void(const SupportedLanguagesResponse&)>;
[[... |
25e93f192fa70e1d35045df3c2def507c85ac557 | 5e11d8f67bfcc776dcf3cbba9f1fe5a4edeb1069 | Scylardor/Monocle2 | /source/Input/Private/InputEventsSink.cpp | C++ | cpp | 543 | permissive | // Monocle Game Engine source files - Alexandre Baron
// TODO Fix compilation for now because missing raw input handler, but this has to be redone properly.
#if defined(MOE_WINDOWS) && defined(MOE_USE_WIN32)
#include "Input/InputEventSink/InputEventsSink.h"
namespace moe
{
void InputEventSink::Flush()
{
// Use Re... |
c40ef370addb52e015fc11fbbce3e1586fe58386 | 06830d2c08d4a72bc71af054b7dc56d6441a950d | sbasrik/Watopoly | /player.cc | C++ | cc | 1,344 | no_license | #include <string>
#include <algorithm>
#include <vector>
#include "player.h"
using namespace std;
Player::Player(std::string givename, const char piece):name{givename},piece{piece}{
money = 500; //pre-determined global const
position = 0;
cups = 0;
timsCard = 0;
}
int Player::getMoney(){
return money;
}
voi... |
afe33d6418059e1256d673736d9a76588133a27d | 7a6b7d69200a86ebd74fb2b7ffdfbe7875318910 | nickrasmussen/openexr | /PyIlmBase/PyImath/imathmodule.cpp | C++ | cpp | 14,831 | permissive | ///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 1998-2011, Industrial Light & Magic, a division of Lucas
// Digital Ltd. LLC
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that ... |
ea9f0f836a0c26b30acaace455735dc7bbba0ce5 | 62cd60a6eee1935758ff05c174126d4172b84c0f | soshiant1992/libqi | /src/messaging/servicedirectory.cpp | C++ | cpp | 13,709 | no_license | /*
** Copyright (C) 2012 Aldebaran Robotics
** See COPYING for the license
*/
// Disable "'this': used in base member initializer list"
#ifdef _MSC_VER
# pragma warning( push )
# pragma warning(disable: 4355)
#endif
#include <vector>
#include <map>
#include <boost/make_shared.hpp>
#include <qi/anyobject.hpp>
#inc... |
db47e7a971ddfa2c3f3b1dc05972f5029dab683f | cf9c6dfc659ea1738650cf1932026e456e70fc69 | overflowsc/inf4715 | /Sources/VCNNodes/TriggerNode.cpp | C++ | cpp | 3,955 | no_license | ///
/// Copyright (C) 2012 - All Rights Reserved
/// All rights reserved. http://www.equals-forty-two.com
///
/// @brief Trigger Implementation
///
#include "Precompiled.h"
#include "TriggerNode.h"
//#include "InputManager.h"
#include "VCNUtils/Ray.h"
#include "VCNUtils/Utilities.h"
#include "VCNRenderer/RenderCore.... |
98e725af583e73a9bad870d2e1d35979ddc272ab | 7f1916c7cf512bed3bfd3ef2b2b2c538c04d0261 | dovker/Rosewood | /Rosewood/src/Rosewood/Scripting/lua/LuaState.cpp | C++ | cpp | 4,765 | permissive | #include "rwpch.h"
#include "LuaState.h"
#include "wrappers/wrap_Debug.h"
#include "wrappers/wrap_Core.h"
#include "wrappers/wrap_Input.h"
#include "wrappers/wrap_Math.h"
#include "wrappers/wrap_ECS.h"
#include "Rosewood/ECS/Entity.h"
#include "Rosewood/Files/FileSystem.h"
extern "C"
{
#include "lua.h"
#include "lau... |
b6decf8c6aac53c84b92291b4d9d4e6baa0af5fb | 5d93e3c404f72a25960e8ab6b10155c91653fb85 | alberto-uni/portafoglioVoti_public | /Algoritmi/2020-07-14/all-CMS-submissions-2020-07-14/20200714T111137.VR450936_id867sej.gioco_triangolo.cpp | C++ | cpp | 1,678 | no_license | /**
* user: VR450936_id867sej
* fname: FRANCESCO
* lname: MARTINI
* task: gioco_triangolo
* score: 0.0
* date: 2020-07-14 11:11:37.805311
*/
#include<iostream>
#include<string>
#include<fstream>
#include<list>
#include<vector>
using namespace std;
int T, N;
int game[100000];
int val_ini;
char M, M_='T';
int l, v1,... |
85210195bc42ed1b7adba79cdb783f85c17b8059 | 416896a955837c772a90d53a003d518485fe9ac8 | a-pinch/PinchukDZ | /C++/Robots/Robots/main.cpp | C++ | cpp | 539 | no_license | #include <iostream>
#include <conio.h>
#include <vector>
#include <stdlib.h>
#include "Circle.h"
#include "Robot.h"
#include "Bolt.h"
#include "Arena.h"
#include "windows.h"
#include "const.h"
using namespace std;
vector<Circle*> objectStorage;
int main(){
int count = 0;
objectStorage.push_back(new Robot(100, 100... |
fa14b9a7aae1eb9f602af6a3d8dc9c9770b4472b | d0744dd60194c24c036186c626651e845e9e83d0 | zhxwmessi/light-matrix | /bench/bench_copy.cpp | C++ | cpp | 6,775 | permissive | /**
* @file bench_copy.cpp
*
* @brief Comparison of the performance of different copying way
*
* @author Dahua Lin
*/
#include "bench_base.h"
#include <light_mat/mateval/ewise_eval.h>
using namespace lmat;
using namespace ltest;
using namespace lmat::bench;
// Jobs
template<typename T>
struct direct_copy
{
c... |
f410b08d34fc6f44f541793d1bcfab6824e4156c | e521df7904381d5235f4abfd9f103cff3146249f | virtyaluk/leetcode | /problems/932/solution.cpp | C++ | cpp | 1,066 | no_license | class Solution {
public:
vector<int> beautifulArray(int n) {
vector<int> ans(n);
iota(begin(ans), end(ans), 1);
sort(begin(ans), end(ans), [&](const int& lhs, const int& rhs) {
return helper(lhs) < helper(rhs);
});
return ans;
}
... |
5996d18c68b7b2ff60c9d2b70aa062d8c9e1e479 | 54745a4e2786b55b860c783dc0e7b02414f5cb70 | stefanreuther/afl | /u/t_net.hpp | C++ | hpp | 3,673 | no_license | /**
* \file u/t_net.hpp
* \brief Test for afl::net
*/
#ifndef AFL_U_T_NET_HPP
#define AFL_U_T_NET_HPP
#include <cxxtest/TestSuite.h>
class TestNetAcceptOperation : public CxxTest::TestSuite {
public:
void testIt();
};
class TestNetCommandHandler : public CxxTest::TestSuite {
public:
void testIt();
... |
bc4a825fd5e34931a4f0984500d343d872b98390 | c020c7a5e4b49413f7b17922a353ee5c4071a822 | swkonz/HoloLens-Demo | /dx11HoloLensDemo/dx11HoloLensDemo/Content/SpinningCubeRenderer.cpp | C++ | cpp | 11,724 | no_license | #include "pch.h"
#include "SpinningCubeRenderer.h"
#include "Common/DirectXHelper.h"
using namespace dx11HoloLensDemo;
using namespace DirectX;
using namespace winrt::Windows::Foundation::Numerics;
using namespace winrt::Windows::UI::Input::Spatial;
// Loads vertex and pixel shaders from files and instantiates the c... |
ce84040fa014a88857776d384f1ee24eedf8a306 | 69efec363ea067f00f6be6ef5a4b75882f8b1c5d | Tarcisio2code/Cplusplus | /Estacio/Lessons/Numero maior ou menor.cpp | C++ | cpp | 290 | no_license | #include <iostream>
#include <locale>
using namespace std;
int main()
{
setlocale(LC_ALL,"ptb");
int num;
cout <<"Informe um número: ";
cin >> num;
if(num>1000)
{
cout <<num<<" é maior que o salário mínimo.";
}
else if(num<1000)
{
cout <<num<<" é menor que o salário mínimo.";
}
}
|
aaa928c5b0ed951016411174d990a8d92769b3bd | 0aef8efb7cc54571f550d64f5760b22da3addd67 | Parranoh/ldrawing | /src/rectangular_dual.cpp | C++ | cpp | 14,174 | no_license | #include <list>
#include <algorithm>
#include "include/rectangular_dual.hpp"
#include "include/debug_print.hpp"
struct path_t {
std::vector<vertex_t> contents{};
std::vector<vertex_t> predecessors{};
};
typedef std::vector<path_t> ordering31_t;
template<typename T>
T pred(T it)
{
return --it;
}
template<... |
015f454bf6f6588aa3d44274b42b6ccc2a886d00 | 1ca45226a41494040e87796c9d572ed81e770dc9 | vxl/vxl | /contrib/brl/bseg/bbgm/Templates/bbgm_image_of+bsta_num_obs+bsta_mixture_fixed+bsta_num_obs+bsta_gauss_if3-.3---.cxx | C++ | cxx | 428 | no_license | #include <bbgm/bbgm_image_of.hxx>
#include <bsta/bsta_attributes.h>
#include <bsta/bsta_mixture_fixed.h>
#include <bsta/bsta_gauss_if3.h>
#include <bsta/io/bsta_io_attributes.h>
#include <bsta/io/bsta_io_mixture_fixed.h>
#include <bsta/io/bsta_io_gaussian_indep.h>
typedef bsta_num_obs<bsta_gauss_if3> gauss_type;
typed... |
3dff3f1793deef6bc2e07b762649b278070a17f4 | aeafa8921eacd09f84de142e47cd122325bd701d | chloegottlieb/csci235 | /project_3/ArrayBag.cpp | C++ | cpp | 5,634 | no_license | // Created by Frank M. Carrano and Timothy M. Henry.
// Copyright (c) 2017 Pearson Education, Hoboken, New Jersey.
// Modified by Tiziana Ligorio for CSCI 235 Hunter college 2019
/** Implementation file for the class ArrayBag.
@file ArrayBag.cpp */
/***************************************************************... |
f9c00fdbab2cef4964ce158f0f4f153ef1a71861 | d2e1bc8f96b7343755e53062f5edd946bf93bd7b | uralx74/Sweety | /old/DataSetFilter.cpp | C++ | cpp | 6,209 | no_license | #include <vcl.h>
#pragma hdrstop
#include "DataSetFilter.h"
//---------------------------------------------------------------------------
/*
TDBGridAltFilterItem class
@created: 2016-01-16
@author: vs.ovchinnikov
*/
__fastcall TDataSetFilterItem::TDataSetFilterItem() :
_active(true),
_text(""),
//_par... |
7f5969ccee1985abdd586b0f4ae4de066a581d10 | 9886ac771466efd35d2c43f0e593114f25419e30 | miao1007/swaggy-jenkins | /clients/cpp-restsdk/generated/model/HudsonMasterComputermonitorData.cpp | C++ | cpp | 16,433 | permissive | /**
* Swaggy Jenkins
* Jenkins API clients generated from Swagger / Open API specification
*
* OpenAPI spec version: 1.1.1
* Contact: blah@cliffano.com
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include ... |
85288837df83266e754cbe514e56e23a8234162f | 288ca1d3d4f25526d931e297c663e18d95280219 | yingzhang536/mrayy-Game-Engine | /Engine/mrayEngine/src/crawloader.cpp | C++ | cpp | 1,763 | no_license | #include "stdafx.h"
#include "CRawLoader.h"
#include "IStream.h"
#include "IFileSystem.h"
#include "ILogManager.h"
#include "TextureResourceManager.h"
#include "common.h"
#include "TraceManager.h"
#include "StringUtil.h"
namespace mray{
namespace loaders{
CRawLoader::CRawLoader()
{
#ifdef ___DEBUG_... |
a88ce5d49da04af7da4e6ca9a5fff26962a21f28 | 215cef2aa06cc1a10ebde916b5e1a1afc0857e06 | ImCostaaa/Decks-Dice | /LeaderBoard/LeaderBoard.cpp | C++ | cpp | 1,218 | no_license | using namespace std;
#include "LeaderBoard.h"
//Constructor For leaderBoard
LeaderBoard::LeaderBoard(){
//Read Data from file, Ignore login info
ifstream file;
string line;
file.open(USER_DATA);
//Ignore the login info
while(getline(file,line)){
if(line.find("LOGIN") != -1){
while(getline(file,l... |
bd4e5f9ae5427b3dcc70795f025226d4bc53583e | 71a85896c2e01ad39b37d897f5ffdfba31c8d214 | ric2b/Vivaldi-browser | /chromium/media/formats/hls/multivariant_playlist_fuzzer.cc | C++ | cc | 1,661 | permissive | // Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <cstddef>
#include <cstdint>
#include "base/at_exit.h"
#include "base/check.h"
#include "base/i18n/icu_util.h"
#include "base/strings/string_piece.h"
#include "media/... |
741664977f4e2b2a4aef9a92fb2a67ee08528c0f | 5897e95a88df6ddd0a8a518186ae5e2be71ce163 | atulRanaa/problem-solving-directory | /atCoder/Beginner Contest 177/A.cpp | C++ | cpp | 1,681 | no_license | // hackerearth incom
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N = 5e5+5;
const ll MOD = 1000000007;
#define all(x) x.begin(),x.end()
#define pii pair<ll,ll>
#define pis pair<ll,string>
#define F first
#... |
63aabd84659724f028d501e8421e6a82ff9a28ad | a38159c31618d2c74e0bcbbdd7b8aaefd8db610e | j0ntan/Project-Euler-plus-plus | /utils/StrNum/StrNum.cpp | C++ | cpp | 9,832 | no_license | #include "StrNum.h"
#include <algorithm>
#include <cctype>
#include <iostream>
#include <utility>
namespace {
const std::string &verifyNumericalString(const std::string &str) {
const bool is_numerical =
!str.empty() and std::find_if(str.begin(), str.end(), [](char c) {
return !std::isd... |
325622aa6bd6dcda89a37366b80f7a7878230308 | 047c5ed07b48984bea937bd4a60bb4a31e682129 | WhiZTiM/coliru | /Archive2/f9/37d15e290bb390/main.cpp | C++ | cpp | 1,176 | no_license | #include <iostream>
#include <string>
#include <vector>
#include <memory>
struct X {void f() {std::cout << "X::f" << std::endl;}};
template <class T> struct checked_ptr : T
{
using T::T;
auto operator*() -> decltype(this->T::operator*()) {
if (!(*this))
throw std::logic_error{"fuck"};
... |
f7ec4cd045efa8994596d42418bbb70db1579519 | 344f6607a2ec8ae73b67f6a7ef50e8e1b8678a69 | JuneAndGreen/v8 | /src/compiler/machine-operator-reducer.cc | C++ | cc | 55,466 | permissive | // Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/compiler/machine-operator-reducer.h"
#include "src/base/bits.h"
#include "src/base/division-by-constant.h"
#include "src/base/ieee754.h"
... |
80efc5e0bb758d3cfd03c2291d95e81aaf8c23fa | a2aee2b307a675ef997f3d6efcb9f22a3656e89e | damian123/rw | /rw/lapack/trdgmth.cc | C++ | cc | 8,257 | no_license |
/*
* Math member functions for the matrix types
*
* $Id: //lapack/13/rw/lapack/trdgmth.cc#1 $
*
* Copyright (c) 1991-2015 Rogue Wave Software, Inc. All Rights Reserved.
*
* This computer software is owned by Rogue Wave Software, Inc. and is
* protected by U.S. copyright laws and other laws and by internation... |
6fbb0635443fa6eb3c65379ddc0ad07dc33222ab | 2adb8f4d5c7d88e45af6e64dc98a1f8f29ae90b4 | NamrathaV99/ADA_LAB | /Fractional_Knapsack_greedy_11.cpp | C++ | cpp | 1,727 | no_license | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef struct {
int v;
int w;
float d;
} Item;
void input(Item items[],int sizeOfItems) {
cout << "Enter total "<< sizeOfItems <<" item's values and weight" <<
endl;
for(int i = 0; i < sizeOfItems; i++) {
cout << "Enter "<< i+1 <... |
ee108a938dc812c62bfd3827ca4ad2da6a865154 | b5f9ada265a70d295bc5e88f8b86b7fcac72d901 | CloudComputer/rGraphicsLibrary | /ext/im/src/im_format_png.cpp | C++ | cpp | 24,926 | permissive | /** \file
* \brief PNG - Portable Network Graphic Format
*
* See Copyright Notice in im_lib.h
* See libPNG Copyright Notice in png.h
*/
#include "im_format.h"
#include "im_format_all.h"
#include "im_util.h"
#include "im_counter.h"
#include "im_binfile.h"
#include <stdlib.h>
#include <string.h>
#include "png.h"... |
d2148684223f4f5f4e4272cd61434e406733fe45 | 1e4052f69a45dcc7b7a2164cba335f9942d39c47 | meniossin/src | /chrome/renderer/security_filter_peer.cc | C++ | cc | 4,747 | 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 "chrome/renderer/security_filter_peer.h"
#include <memory>
#include <string>
#include <utility>
#include "base/memory/ptr_util.h"
#include ... |
9473ace02dfc9c07d72ffc37be2400297741cbb9 | 99efa5afa1162b8d39d5b4c3518c5e3b2ab05909 | cms-fcal-upgrade/ForwardCaloUpgrade | /GEANT_PROJECTS/HF/testBeam.cc | C++ | cc | 7,566 | no_license | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
8bcaa7308e14ee40932919fcb46a124d81e8116e | aa7c1d8dfcb69c1469cacb2ba117639398d944c2 | rosoareslv/SED99 | /c++/cppcheck/2017/4/testio.cpp | C++ | cpp | 193,545 | no_license | /*
* Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2016 Cppcheck team.
*
* 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 3 of the License, or
* (at ... |
3df2297e8c68a22b3d2dfac9211ea333cf6becc1 | e128f5f168d86d3b8dd27c1d6b2ee03e7f3e2120 | fengrenchang86/PKU | /3232/2560451_RE.cpp | C++ | cpp | 643 | no_license | #include <iostream>
using namespace std;
int main ()
{
int a[100200];
int tcase,n,m,k,i;
int begin,end,mid;
_int64 t;
scanf("%d",&tcase);
while ( tcase )
{
tcase--;
scanf("%d",&n);
for ( i = 0; i < n; i++ )
scanf("%d",&a[i]);
scanf("%d%d",&m,&k);
k--;
begin = 0;
end = 100000000;
while ( begin ... |
0fb0672443d00b370057886ef4701d58a34424c7 | 40e9a728e34aa02c512696a17ef7097fec7f146a | rex-gentium/CryptologicalNeuralNetwork | /NeuralNetworkExample/Source.cpp | C++ | cpp | 1,424 | no_license | #include "CryptoANN.h"
#include <string>
#include <chrono>
/// <summary>
/// This method should be called with execution parameters
/// <para>argv[1] - directory, where the file and network config files are to be located, e.g. "C:\dump/hello" or "C:/dump\hello\"</para>
/// <para>argv[2] - file name, e.g. "myFile.txt"<... |
9d023dd7d39769a6fa994e50a69608073f39a9e5 | 1a191a5e47d4216d5e44e1a9d8ce38942006f715 | aimoonchen/Urho3D-Project-Template | /Source/Console/ConsoleHandler.cpp | C++ | cpp | 9,502 | permissive | #include <Urho3D/Core/Object.h>
#include <Urho3D/Input/Input.h>
#include <Urho3D/Resource/ResourceCache.h>
#include <Urho3D/Engine/Engine.h>
#include <Urho3D/Engine/EngineEvents.h>
#include <Urho3D/IO/Log.h>
#include "ConsoleHandler.h"
#include "../MyEvents.h"
#include "../Config/ConfigManager.h"
/// Construct.
Consol... |
c11a52a54b6e2196c761692b9a2e6b7ab4ddb079 | 329f3d9ff8e2ef9269c42e664e20dd8f8c459df5 | dunkyp/liblava | /liblava/asset.hpp | C++ | hpp | 358 | permissive | /**
* @file liblava/asset.hpp
* @brief Asset module
* @author Lava Block OÜ and contributors
* @copyright Copyright (c) 2018-present, MIT License
*/
#pragma once
#include "liblava/asset/image_loader.hpp"
#include "liblava/asset/load_mesh.hpp"
#include "liblava/asset/load_texture.hpp"
#inc... |
e1f43863d5db72bd16f777f5a0a3a54ea68c902f | 52637344e18d14b6523410ce51cd2f458d444f31 | zhaosiwen1949/Fire_Game_Engine | /Runtime/Exported/2D/ExportedClipArea2D.cpp | C++ | cpp | 671 | no_license | #include "ExportedClipArea2D.h"
namespace Alice{
int ExportedClipArea2D::API_SetSize(lua_State*L) {
ExportedClipArea2D*ptr = TO_USERDATA(L, ExportedClipArea2D, -3);
ptr->SetSize(lua_tonumber(L, -2), lua_tonumber(L, -1));
return 0;
}
int ExportedClipArea2D::Export(lua_State*L){
luaL_Reg member_functio... |
f83be957c9c470409744b3ac8f025d3de2142d43 | 238931afde18971d2783e9115a689a3a1122c437 | agutikov/stuff | /cxx/variant_vector.cpp | C++ | cpp | 3,603 | no_license |
#include <initializer_list>
#include <ostream>
#include <stdexcept>
#include <vector>
#include <variant>
#include <iostream>
template<class... Ts> struct overload : Ts... { using Ts::operator()...; };
#if __cplusplus < 202000L
// explicit deduction guide (not needed as of C++20)
template<class... Ts> overloa... |
0907399d14355a3fd4e81a8328c641f2af366dac | c8962933e9cee66a69de5536d0a40934a0a3537b | etclabscore/evm_llvm | /unittests/Support/TypeNameTest.cpp | C++ | cpp | 1,396 | permissive | //===- TypeNameTest.cpp ---------------------------------------------------===//
//
// 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
//
//===---------------------------... |
2f481a08bd6651e4cbd201212b89938f3bf51048 | a141b77901b5e8771324ea5bbe7b89bb82f95deb | cde8eae8/list4 | /test.cpp | C++ | cpp | 3,263 | no_license | //
// Created by nikita on 22.06.19.
//
#include <gtest/gtest.h>
#include <vector>
#include "list.h"
template <typename T>
bool cmp(list<T> const& a, list<T> const& b) {
auto it1 = a.begin(), it2 = b.begin();
for ( ; it1 != a.end() && it2 != b.end(); ++it1, ++it2) {
if (*it1 != *it2) return false;
... |
5447c2d20aad95be9aad2f10ecd076372d1a9df9 | 14d5658b8d60cef503bd311c5a678672b768b721 | edewit2/SunstangBPS | /lib/Linduino/LTSketchbook/libraries/LTC2484/LTC2484.cpp | C++ | cpp | 5,733 | no_license | /*!
LTC2484: 24-Bit Delta Sigma ADC with Easy Drive Input Current Cancellation
@verbatim
The LTC2484 combines a 24-bit no latency delta-sigma analog-to-digital
converter with patented Easy Drive technology. The patented sampling scheme
eliminates dynamic input current errors and the shortcomings of on-chip
buffering ... |
f86df90b685726891d32e0c49c53e68de3cadccd | 9662ce5e60732e1bcc7a137d7924005956fab929 | jus1915/baekjoon | /Project5/16916.cpp | C++ | cpp | 349 | no_license | #include<iostream>
#include<cstring>
using namespace std;
string n, m;
int main(void) {
cin >> n >> m;
int n_l = n.length();
int m_l = m.length();
int k = 0;
int i = 0;
while (true) {
if (m.compare(i, i + m_l, n)==0) {
cout << "1" << endl;
break;
}
i++;
if (i == n_l - m_l) {
cout << "0" << endl;
... |
3bd90530d936aada7e6e02352ccd0deed929f4b6 | 37654a6db75789858de43446d8d4eab795134e9c | FrankStain/jnipp-test | /jnipp-test/sources/jni/source/tests/TestStaticFunction.IsValid.cpp | C++ | cpp | 1,904 | permissive | // Copyright since 2016 : Evgenii Shatunov (github.com/FrankStain/jnipp-test)
// Apache 2.0 License
#include <main.h>
#include <gtest/gtest.h>
#include "TestingEnvironment.h"
TEST( TestStaticFunction, ValidVoidNoArguments )
{
DECLARE_STATIC_FUNCTION_TEST_ENV( "VoidNoArguments", void );
EXPECT_TRUE( fu... |
516c2fdb4b7318ce69d46816c533c8a819ea320d | 7dc545b3666376fa2ecdf91aa81d71f901bcac18 | Dangermannn/Numerical-methods | /2/lab33.cpp | C++ | cpp | 1,388 | no_license | #include <iostream>
using namespace std;
int main()
{
//system("gnuplot -persist -e \"set xlabel 'log10(|blad wzgledny|)'; set ylabel 'log10(x)'; set parametric; set trange [-30:10]; plot log10(2.22045e-16)' t, 'data.txt\"");
//system("gnuplot -persist -e \"set xlabel '|blad wzgledny|'; set ylabel 'x'; set logscale x... |
bf135a78686162351fb3d27facd92542dfc3b275 | 58c01187f5871057ce18e34deb43755fe3765561 | GIRU-GIRU/Mordhau-Unofficial-SDK | /GeneratedPlaceholders/Mordhau/FindMordhauServerSessions.cpp | C++ | cpp | 2,058 | no_license | #include "FindMordhauServerSessions.h"
void UFindMordhauServerSessions::OnFindServerSessionsComplete(bool bWasSuccessful) {
}
bool UFindMordhauServerSessions::STATIC_IsVacSecured(const struct FServerSearchResult& Result) {
}
bool UFindMordhauServerSessions::STATIC_IsRanked(const struct FServerSearchResult& Result) {... |
885771882acc3c9b872089e7b9c3c45d3d7c42b4 | b062697bcfa14c1fbf4debe4be79651b95e9924e | clbx/Cosmic | /lib/misc/imgui_impl_opengl2.cpp | C++ | cpp | 12,251 | permissive | // dear imgui: Renderer for OpenGL2 (legacy OpenGL, fixed pipeline)
// This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..)
// Implemented features:
// [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID!
// ... |
43502bdc6301029311b15fe705a1e92a59b97fb4 | 32cc855b60d4b53e8d3334fbfd31ffba221551ba | Wonkyu-Lee/LogicPractice | /inclusion.cpp | C++ | cpp | 1,314 | no_license | //
// Created by blazeq on 2018. 2. 11..
//
#include "catch.hpp"
using namespace std;
namespace {
int find(int arr[], int s, int e, int x, bool lowerBound) {
if (s > e) {
return lowerBound ? e : s;
}
int m = (s + e) / 2;
if (x < arr[m]) {
return find(arr, s, m - 1, x, lowerBound);
... |
4b1fa6badb9d51fdf0a3676837b7f1296cebbc1b | f80c02b0543ff6ea2c786986429a1b589a53dc77 | primitivorm/latino-llvm | /lib/Format/BreakableToken.cpp | C++ | cpp | 42,664 | permissive | //===--- BreakableToken.cpp - Format C++ code -----------------------------===//
//
// 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
//
//===---------------------------... |
359ff2012a2c38e844536e56ac85dcece4ae88ec | c7c51440e26df8aec70c2597328bc5e2bfc21aaf | RAIIIIIIIN/hello-world | /C语言教材/第五章/纳税.cpp | C++ | cpp | 431 | no_license | #include<stdio.h>
int main(){
float a, b;//a代表收入,b代表税金
printf("请输入需纳税的收入:$");
scanf("%f",&a);
if (a<750)
b=a*0.01f ;
else if(a<2250)
b=7.50f+(a-750)*0.02f;
else if(a<3750)
b=37.50f+(a-2250)*0.03f;
else if(a<5250)
b=82.50f+(a-3750)*0.04f;
else if(a<7000)
b=142.50f+(a-5250)*0.05f;
else
b=230.0... |
5bbc299f9f09a44f674fb20c13395bbb872c6f31 | 49f5f9a1141e1d7c7fe111cf8b2008a790d95618 | syncle/Open3D | /cpp/open3d/visualization/rendering/LightDirectionInteractorLogic.cpp | C++ | cpp | 8,870 | permissive | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018-2021 www.open3d.org
//
// Perm... |
231c5079cbc615c8cb8da2ffc70ee6947c4f2e27 | f981862a3b2db7a6975bab47b85d40bed30d9dbc | TaoSama/ICPC-Code-Library | /OJ - Codeforces/#394/D.cpp | C++ | cpp | 1,641 | no_license | //
// Created by TaoSama on 2017-01-31
// Copyright (c) 2016 TaoSama. All rights reserved.
//
#pragma comment(linker, "/STACK:102400000,102400000")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#i... |
69f87f70acd10bec26f9907f912a93a601f048d1 | 8a027decbd1cdeabe6370079e73ac36be54e049a | yanhuashengdian/chrome_browser | /net/dns/host_cache.cc | C++ | cc | 28,398 | permissive | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/dns/host_cache.h"
#include <algorithm>
#include "base/bind.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_m... |
cf00adc2164f2b0e15be0a4c1f354f27ff579c84 | 0b3b965dfb75462a1a76051f68d489af1a5fbb09 | Dators-inc/Givans-Browser | /Tools/DumpRenderTree/TestRunner.cpp | C++ | cpp | 118,014 | no_license | /*
* Copyright (C) 2007-2016 Apple Inc. All rights reserved.
* Copyright (C) 2010 Joone Hur <joone@kldp.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain t... |
bf532e21f939a25846e286df4f4d755358f2e76a | 22811230d095e0c8720e5b99edaa5c7d255c7137 | hota1024/OpenSiv3D | /Siv3D/include/Siv3D/Bezier2.hpp | C++ | hpp | 2,257 | permissive | //-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2018 Ryo Suzuki
// Copyright (c) 2016-2018 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include "Fwd.hpp"
# include "P... |
df483d52348e04fc49c1453619cfe362203be5aa | e39a9f2b6c45f995465da7d35a98f6942eb1af22 | Nidia08/fundamentospro | /C++/ISC-EVA1/EVA1_11_FORMULAPENDIENTE.cpp | C++ | cpp | 681 | no_license |
//Nidia Gonzalez Morales 18550676
#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cmath>
using namespace std;
string toString (double);
int toInt (string);
double toDouble (string);
int main() {
cout<< "Ingresa el primer valor de x"<<endl;
double x1;
cin>>x1;
... |
856f916fb6d578e908ada7c4df3b882bd3fcbc73 | ed02ddfb79a6aa8dd13088011b0f51a94d0a2f5c | QPC-database/aws-sdk-cpp | /aws-cpp-sdk-codecommit/source/model/GetFileResult.cpp | C++ | cpp | 1,654 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetFileResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/... |
8c96d4cb2c77c39a76452bacfe64f027751cc1bf | dd6220f094e2e5da0bca78e6600ad47666f62162 | oinkatron/RetroRPG | /src/TextBox.cpp | C++ | cpp | 9,354 | no_license | #include "../include/TextBox.h"
TextBox::TextBox()
{
backColor(255, 255, 255);
textColor(0, 0, 0);
}
void TextBox::onKeyPress(SDLKey key, bool shift)
{
string tmp;
switch (key)
{
case SDLK_a:
if (shift)
{
tmp_text += "A";
}
... |
acfad992b7aba2d99f84d6d2c5e48de23558fab9 | 830f113fcc4b8b7f12eda6b933449052b4a235b5 | Kyle-S-Harris/CS150 | /CS150/IC16/IC16_RainFall/IC16_RainFall/RainFall.cpp | C++ | cpp | 3,522 | no_license | /****************************************************
* AUTHOR: Kyle Stephan Harris
* COURSE: CS 150: C++ Programming 1
* SECTION: TTh 11:00-12:50
* IC (PROJECT)#: Homework #16
* LAST MODIFIED: 10/23/18
*****************************************************/
/*******************************************************... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.