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 |
|---|---|---|---|---|---|---|---|---|
3dc520eaf71cc59d3e5bff16a43036f5f556cfbb | 817ae0271eda357e5308859fec7ab95f81d8953a | bagel99/llvm-my66000 | /flang/lib/Optimizer/Builder/MutableBox.cpp | C++ | cpp | 42,038 | permissive | //===-- MutableBox.cpp -- MutableBox utilities ----------------------------===//
//
// 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
//
//===---------------------------... |
19d7a67ba9cc2f3af43f917b84fb0c26b5cac8ed | 4cdc8ab0c58ef17bf90e5b65c01a4add9f769f17 | angelcabeza/IG | /cabezasinruedas.cc | C++ | cc | 1,391 | no_license | #include "cabezasinruedas.h"
CabezaSinRuedas::CabezaSinRuedas(){
chimenea = new Chimenea ();
prisma = new Prisma();
grado_libertad_vagon = 0;
maximo_giro = false;
minimo_giro = false;
Material bronce = Material ({0.7038, 0.27048,0.0828, 1}, {0.256777, 0.137622,0.086014, 1},{0.019125, 0.0735, 0... |
7f101f25da3cb734506fc4314725e2800af3f127 | c6a1637c2014bc029eb17664cfec8872629af01a | maximusyoung007/LeetCode | /c++/0120.cpp | C++ | cpp | 865 | no_license | #include<vector>
using namespace std;
class Solution0120 {
public:
int minimumTotal(vector<vector<int>> &triangle) {
int n = triangle.size();
vector<vector<int>> f(n, vector<int>(n));
f[0][0] = triangle[0][0];
for (int i = 1; i < n; i++) {
for (int j = 0; j < i + 1; j++)... |
76a8c234bcf173b12b3c579974f9151c8d7a69d9 | a67522750e32aed47f64671189ab5aee8c0c4263 | 611project/sixeleven | /src/main.cpp | C++ | cpp | 128,578 | permissive | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include "headers.h"
#include "db.h"
#include "net.h"
#include "init.h"
#include "auxpow.h"
#include "611.h"
#include "cryptopp/s... |
4fa65bf6b8fb3558ff55e7a2a2272510844948f2 | 689514ea70fba7d16b3c26718b65b5afca887333 | bbergaoui/bastoji-coin | /src/rpc/rawtransaction.cpp | C++ | cpp | 85,724 | permissive | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chain.h>
#include <coins.h>
#include <compat/byteswap.h>
#include <consensus... |
9222123dd57b1f5f0facb55421afc5a2bd09480e | 38351afbc61c359f68ff3308b1a41cbdc4c18571 | bfierz/vcl.filesystem | /src/vcl/filesystem/mountpoints/memorymountpoint.cpp | C++ | cpp | 2,759 | permissive | /*
* This file is part of the Visual Computing Library (VCL) release under the
* MIT license.
*
* Copyright (c) 2014-2016 Basil Fierz
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software... |
384a8871727409e0affa164e5d062ff511951901 | 475f509b0920f7ce6307b2340d9ea76932af8eaf | thegamer1907/Code_Analysis | /Graphs/1766.cpp | C++ | cpp | 7,781 | no_license | // ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <set>
#include <vector>
#include <climits>
#include <sstream>
#include <ostr... |
fd1ec7bb4f851a5fd62205ae65a86eea8cb4fb33 | a3b545511a38d67b45cae14c8c674ff27eb22e34 | DenisBakhvalov/llvm | /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | C++ | cpp | 124,634 | permissive | //===- ExprEngine.cpp - Path-Sensitive Expression-Level Dataflow ----------===//
//
// 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
//
//===---------------------------... |
5cf3cb326b4d5a0e5759b894783dbda7a8c3231d | 09ede431b0823c76fa425dd2f9fae5fa0420e534 | yangyang14641/arrayfire | /src/backend/cpu/sparse_arith.cpp | C++ | cpp | 5,351 | permissive | /*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... |
d05b8a8bc47b11083ad6997e453635eae250d090 | 291b8d33a05ac4c6a83508312af6012976579759 | jaishreedhage/Competitive-coding | /Interview Bit/spiral_order_matrix_1.cpp | C++ | cpp | 808 | no_license | vector<int> Solution::spiralOrder(const vector<vector<int> > &A) {
vector<int> result;
// DO STUFF HERE AND POPULATE result
int dir = 0;
int t=0,l=0,b=A.size()-1,r=A[0].size()-1;
while(t<=b && l<=r){
if(dir==0){
for(int i=l;i<=r;i++)
result.push_back(A[t][i]);
t++;
... |
31c9e923bd8e95e4f950470c99e0285067b4cdd9 | 0433370822a6a023e0a988be7b2a9c9a19c209e8 | usc-csci-545/aikido | /src/trajectory/util.cpp | C++ | cpp | 10,705 | permissive | #include "aikido/trajectory/util.hpp"
#include <algorithm>
#include <fstream>
#include <iostream>
#include <boost/program_options.hpp>
#include <dart/common/StlHelpers.hpp>
#include "aikido/common/Spline.hpp"
#include "aikido/common/StepSequence.hpp"
#include "aikido/planner/parabolic/ParabolicTimer.hpp"
#include "aik... |
0e937c37bb1e17f29f29eb1bf75cc5c0db05ee0a | 3a419b886e00144d12afcf8e6bda227e79e208aa | dualword/Visore | /code/engine/vipredictors/viconstantpredictor/sources/viconstantpredictor.cpp | C++ | cpp | 2,606 | no_license | #include <viconstantpredictor.h>
#include <vimath.h>
#include <vilogger.h>
ViConstantPredictor::ViConstantPredictor(const Mode &mode)
: ViPredictor()
{
setMode(mode);
addParameterName("Window Size");
}
ViConstantPredictor::ViConstantPredictor(const ViConstantPredictor &other)
: ViPredictor(other)
{
setMode(other... |
ddb31a6bb655180f0f7fe006dc07035f5be8b396 | deb96baf95b1c9e51574c66f225646f243a9f67c | oduwsdl/Memento-aware-Browser | /src/gpu/config/gpu_control_list.cc | C++ | cc | 25,637 | permissive | // Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "gpu/config/gpu_control_list.h"
#include <utility>
#include "base/logging.h"
#include "base/notreached.h"
#include "base/numerics/safe_conv... |
eabf3ab4067661a78dcb47ff49aef9e112799d1c | 8131fdd8bcdcbc98187e0025af56e651c196d27a | roohaani786/Yammerly | /linux/my_application.cc | C++ | cc | 1,428 | no_license | #include "my_application.h"
#include <flutter_linux/flutter_linux.h>
#include "flutter/generated_plugin_registrant.h"
struct _MyApplication {
GtkApplication parent_instance;
};
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
// Implements GApplication::activate.
static void my_application_acti... |
bb45692ed83c85facc8cb713507cf833fb572763 | 94e1b1698283e1db6130368178b1bc292e63f40b | jwsn/14 | /Classes/ControllerSimpleMove.cpp | C++ | cpp | 2,153 | no_license | #include "ControllerSimpleMove.h"
ControllerSimpleMove::ControllerSimpleMove()
{
m_fMoveTimeCount = 0;
m_MoveSpan = 0;
}
ControllerSimpleMove::~ControllerSimpleMove()
{
CC_SAFE_DELETE(m_curDestPos);
}
ControllerSimpleMove* ControllerSimpleMove::create(Entity* entity)
{
ControllerSimpleMove* csm = new ControllerSimp... |
ffb6971e61258ff208238d6f60896b7a4cafcf07 | fa004be9078749b9d48655c3cce6a9cd2e00ea5d | rannger/MusicEditor | /QWave2/Utils.cc | C++ | cc | 993 | no_license | #include <qstring.h>
#include <cstdio>
#include "QWave2/Utils.h"
namespace QWave2 {
QString
time2str(double t, int e)
{
char const * sign = "";
if (t < 0) {
sign = "-";
t = -t;
}
double shift = 1.0;
double roundup = 0.5;
... |
7d6e4018d5a7bbaf23125ad7a203cf8d3bf919a8 | ff7e6735f2f0d7a4afd2ea510fe463c1908a9eb0 | 15137359541/PyCTP-master | /PyCTP_Client/PyQt_Demo/GAS_V20160904/GAS/api/showdatetime.cpp | C++ | cpp | 1,302 | no_license | #include "showdatetime.h"
#include "myhelper.h"
ShowDateTime::ShowDateTime(QObject *parent) : QObject(parent)
{
labDateTime = 0;
labLive = 0;
lcdNumber = 0;
day = 0;
hour = 0;
minute = 0;
seconds = 0;
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(ShowTime()));
}
ShowDateTime::~Show... |
a3b232f9a0650e0b684434e06ee3badea17a05be | b081d6260f6f78aa18e24ac41fa1c0e3cc1930f0 | joyossarian/Algorithms | /leetcode/ReverseInteger.cpp | C++ | cpp | 535 | no_license | class Solution {
public:
int reverse(int x) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
bool neg = false;
if (x < 0)
{
neg = true;
x = -x;
}
int result = 0;
while (x > 0)
... |
cd19f02cbec61465cb6b686b442328024d70aa95 | 022c525b5e7c4178990f79a39d849dbb0c634d4a | IsraMekki/tiramisu_code_generator | /cmake-build-debug/programs_tiling/function14239/function14239_schedule_19/function14239_schedule_19.cpp | C++ | cpp | 1,342 | no_license | #include <tiramisu/tiramisu.h>
using namespace tiramisu;
int main(int argc, char **argv){
tiramisu::init("function14239_schedule_19");
constant c0("c0", 512), c1("c1", 256), c2("c2", 512);
var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i01("i01"), i02("i02"), i03("i03"), i04("i04"), i05("i05"), ... |
3bf9f9ab49b7fd5a354cb6305691b5ee4e98a3ed | cd2f17b300ddd89fc4bb02e67417fcc643039a8f | git-ty-up/VFSForGit | /ProjFS.Mac/PrjFSKext/VnodeCache.cpp | C++ | cpp | 13,440 | permissive | #include <string.h>
#include "Locks.hpp"
#include "VnodeCache.hpp"
#include "Memory.hpp"
#include "KextLog.hpp"
#include "../PrjFSKext/public/PrjFSCommon.h"
#include "VnodeCachePrivate.hpp"
#ifdef KEXT_UNIT_TESTING
#include "VnodeCacheTestable.hpp"
#endif
KEXT_STATIC_INLINE void InvalidateCache_ExclusiveLocked();
KE... |
f820a35519d979b60f8871b077c295ee07d9a58b | e145ac76c55812862ee64b3b8f9cf798059240a0 | blockspacer/doremi | /Doremi/Core/Include/SkeletalInformationHandler.hpp | C++ | hpp | 1,699 | permissive | #pragma once
// Standard Libraries
#include <unordered_map>
#include <map>
#include <vector>
#include <DirectXMath.h>
namespace DoremiEngine
{
namespace Core
{
class SharedContext;
}
namespace Logging
{
class Logger;
}
namespace Graphic
{
class SkeletalInformat... |
7fac94dd4190a3bc45c4841f745d1da5e8637c79 | 360ff8b1934d4e7d2951ba4796144d97ca2818f1 | Phosfor/Pseudoform-2 | /src/Managers/Entities/Light.cpp | C++ | cpp | 3,101 | no_license | #include "Managers/Entities/Light.hpp"
Light::Light(const string &entityName):Entity()
{
LOG(FORMAT("Loading new entity `%1%` of type `%2%`", entityName % type()));
mEntityName = entityName;
// TODO: Load not Error mesh in Light class (get some other mesh type)
mLight = graphicSystem.getSceneMgr()->createLight("... |
c946f2061557d007800910d4692270507eaf217a | 74264cd202ef4ca12e7f20071b07c98743621b9b | alex-korobko/scad-modus-spider | /spider/spider27_old/src/metro_device.cpp | C++ | cpp | 7,622 | no_license | #include "global.h"
/*
Local functions
*/
int is_connected(int sock, fd_set* rd, fd_set* wr, fd_set* ex)
{
int err;
size_t length = sizeof(err);
if (!FD_ISSET(sock, rd) && !FD_ISSET(sock, wr))
return 0;
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &err, &length) < 0)
return 0;
errno = err;
return err == 0... |
1800e39d5a0e7b49b3c2bf89f956820eb015a825 | 3d39d162e3f70752dcffb7526f2220043c66436b | jjzhang166/WinNT5_src_20201004 | /NT/admin/activec/designer/vb98ctls/mssnapd/mssnapd/pslistvw.cpp | C++ | cpp | 67,850 | no_license | //=--------------------------------------------------------------------------------------
// pslistvw.cpp
//=--------------------------------------------------------------------------------------
//
// Copyright (c) 1999, Microsoft Corporation.
// All Rights Reserved.
//
// Information Contain... |
a93a797d811feb56dfd4a5c59f357c31035dfd14 | b1a1ca0860ee33711de5eb9e93347bb4fe6bab50 | MihailoGrbic/A2-Online-Judge-Ladder-Problem-Solutions | /Codeforces_rating_1500-1599/11.Caisa_and_Pylons.cpp | C++ | cpp | 260 | no_license | #include <bits/stdc++.h>
using namespace std;
int n, current_h, max_h = 0;
int main()
{
cin >> n;
for(int i = 0; i < n; i++)
{
cin >> current_h;
if(current_h > max_h) max_h = current_h;
}
cout << max_h;
return 0;
}
|
5a03d95d6ef4f105e7675a56e81740a6c87459a5 | c19f1c5f98158acab8b2fd05c53c2f48ab1b9488 | Juandavid9909/CplusplusCourse | /2. Expresiones/ejercicio8/main.cpp | C++ | cpp | 576 | no_license | /*8. Escriba un programa que lea de la entrada estándar los dos catetos
de un triángulo rectángulo y escriba en la salida estándar su hipotenusa*/
#include <iostream>
#include <math.h>
using namespace std;
int main() {
float cateto1, cateto2, hipotenusa;
cout << "Digite el cateto 1: ";
cin >... |
fd32b0dc6e6f95ba3f2e0ac6de4895a86b092009 | 878feddeca4ef99d3c5a34c9805cc0ec1f04495f | Mooonside/CompressedNet | /CUDA/BinAprx/bin_aprx.cc | C++ | cc | 2,841 | no_license | // example.cc
#define EIGEN_USE_THREADS
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/shape_inference.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/framework/register_types.h"
#include "bin_aprx.h"
#include "tensorflow/core/framework/op_kernel.h"
using namesp... |
ec9a986d7f617d3e957bb1ff4b71d8cc449d2ef9 | 24cc6f69da12e8cdbe684af860722d16b5db484e | flat0531/Monta3D | /src/CharacterAction/Ratton.cpp | C++ | cpp | 2,846 | no_license | #include "Ratton.h"
#include"../WorldObject/Enemy.h"
#include"../Top/Top.h"
#include"../Top/DrawManager.h"
#include"../WorldCreater/CharacterManager.h"
#include"../WorldCreater/BulletManager.h"
#include"../WorldObject/Bullet/NormalEnemyBullet.h"
#include"../Top/TextureManager.h"
#include"cinder\ObjLoader.h"
//#include"... |
b47a541a4dc81967ce0c529015863e13f587e6c3 | 06ac16a19f1e3b1aae986e697313dfcd1413ff1b | amtili/CrystalDiskInfo | /DialogCx.cpp | C++ | cpp | 9,428 | permissive | /*---------------------------------------------------------------------------*/
// Author : hiyohiyo
// Mail : hiyohiyo@crystalmark.info
// Web : http://crystalmark.info/
// License : The MIT License
/*---------------------------------------------------------------------------*/
#include "s... |
d3791e852d4790abd84ff4b00730283622217aea | 2f4edf52d665ef4fb24d59c5b3971e43d4f33b8d | limbo018/Limbo | /limbo/thirdparty/lemon/test/arc_look_up_test.cc | C++ | cc | 1,647 | permissive | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2013
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
d30b0c39fa2169c6f23c30f2908c908a23bfbd78 | 7d7ebe498553fae4349c93b7d5c0355f5328f4e2 | HengneHiggs/HZZ4lFidXsec | /templates/templates/main_fiducialXSTemplates.cpp | C++ | cpp | 434 | no_license | #include "fiducialXSTemplates.C"
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
if(argc != 10 && argc != 11)
return 1;
if(argc == 10)
fiducialXSTemplates(argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
if(argc == 11)
fiducialXSTe... |
7ca6c8c8b668a725241ee185ae53f3c0bd9ac49e | b458de2fc464f3b7e12a1f6228650f2dab87a8ba | lineCode/wasmview.github.io | /Source Code/server/binaries/chromium/gen/headless/public/devtools/domains/types_console.cc | C++ | cc | 9,848 | no_license | // This file is generated
// Copyright 2016 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 "headless/public/devtools/domains/types_console.h"
#include "headless/public/devtools/domains/types_runtime.h"
#inclu... |
ca87f9ae03f46958b87d454480d89d14c8353139 | f064d62a0c61389c9dc971e5d0e3e65893ed1401 | tylermassey/programming-challenges | /chapter05/reverseadd.cpp | C++ | cpp | 447 | no_license | // reverse and add
#include <iostream>
using namespace std;
long int reverse(long int n) {
long int reverse = 0;
while( n!=0) {
reverse = reverse * 10;
reverse = reverse + n%10;
n = n/10;
}
return reverse;
}
int main() {
int cases;
long n;
cin >> cases;
while(cases--) {
int count = 1;
cin >> n;
n+... |
827dc2b623177769e66a8361b158a35316c4692b | 26364e099dd162f0d2120d4cb03a455a9338ef27 | CatPawBrotherhood/HoudiniEngineForUnreal | /Source/HoudiniEngineEditor/Private/HoudiniAssetFactory.cpp | C++ | cpp | 4,649 | no_license | /*
* PROPRIETARY INFORMATION. This software is proprietary to
* Side Effects Software Inc., and is not to be reproduced,
* transmitted, or disclosed in any way without written permission.
*
* Produced by:
* Mykola Konyk
* Side Effects Software Inc
* 123 Front Street West, Suite 1401
* Toro... |
113be3ae0b8a8cb54d16cd21d3f470fc90b49601 | 3386b0b5aeebc215e1425d9f3526e8c773265517 | lohitakshsingla0/Programming-Questions-C-and-Cpp | /C++ Class Exercise - Read and Print House details along with Room details.cpp | C++ | cpp | 1,246 | no_license | /*C++ Class Exercise - Read and Print House details
along with Room details*/
#include<iostream>
using namespace std;
class room {
int l;
int b;
int h;
public :
void getroom()
{
cout<<"Enter length, breath, height: ";
cin>>l>>b>>h;
}
void putroom()
{
cout<<"Length: "<<l<<",Breath: "<<b<<", Hei... |
84a0c280d88e9e4977bfbe5fcc170ba497a30b2b | a0ac96755605bdc4f3b9e2a9ace7d9b230ce2d82 | tanphattrc/NinjaGaiden | /NinjaGaiden(NES)_Game/NinjaGaiden(NES)_Game/GameObjects/DynamicGameObject/Enemy/Brute.cpp | C++ | cpp | 2,937 | no_license | #include "Brute.h"
Brute::~Brute()
{
}
Brute::Brute(D3DXVECTOR3 position)
{
init(position);
time = 0;
timeBullet = 0;
state = WALKING_STATE;
originalPos = position;
for (int i = 0; i < 3; i++)
{
Bullet* temp = new Bullet(this->GetPosition());
temp->SetShot(false);
bullet.push_back(temp);
}
mAnimatio... |
2639df3dfdbd57c43b66a969524425b0dade1393 | ace67b37e8c6603b945fbf67973a109314851a20 | MadJayQ/Envy | /CS/module/include/options.hpp | C++ | hpp | 3,188 | no_license | #pragma once
#include "singleton.hpp"
#include "enums.hpp"
#include "studio.hpp"
#include <map>
#include <vector>
#include <array>
#define OPTION(type, name, defaultvalue) \
type& name##() const \
{ \
static type _##name = defaultvalue; \
return _##name; \
}
#def... |
5256dad37a03a654c5baa9a5901c2e5d54cc563b | b5a94cee46c734c9c9e229720d82709d19173bd7 | return/garnet | /drivers/bluetooth/lib/testing/fake_controller.cc | C++ | cc | 45,024 | permissive | // Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "fake_controller.h"
#include <endian.h>
#include <lib/async/cpp/task.h>
#include "garnet/drivers/bluetooth/lib/common/packet_view.h"
#include "g... |
257b38961e9e6a20b97b32c01ae8ec955ee1b572 | 7c3be814054169a96f0d95119af5c6ffdd4f932b | arichardson/juliet-test-suite-c | /testcases/CWE680_Integer_Overflow_to_Buffer_Overflow/CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_listen_socket_82_goodG2B.cpp | C++ | cpp | 1,612 | no_license | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE680_Integer_Overflow_to_Buffer_Overflow__malloc_listen_socket_82_goodG2B.cpp
Label Definition File: CWE680_Integer_Overflow_to_Buffer_Overflow__malloc.label.xml
Template File: sources-sink-82_goodG2B.tmpl.cpp
*/
/*
* @description
* CWE: 680 Integer Overflow to B... |
27e8cdbeea2e8e4e06e89b13aa0eaa13bea50b5d | 53f7e3780c8b0b311102ee9b6b599ffbb7353427 | joergbuchwald/ogs | /MaterialLib/SolidModels/Lubby2.cpp | C++ | cpp | 13,243 | permissive | /**
* \file
* \copyright
* Copyright (c) 2012-2022, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*/
#include "Lubby2.h"
#include "MaterialLib/M... |
6c1d1bc7a641db8eb48cf0086dda0e7913032169 | 20745539ef2fdef9517273c022c361770b580430 | lut1y/Stephen_Prata_Ansi_C_plusplus-6thE-Code-Example-and-Answers | /Chapter 9/twofile2.cpp | C++ | cpp | 715 | no_license | // twofile2.cpp -- переменные с внутренним и внешним связыванием
#include <iostream>
extern int tom; // переменная tom определена в другом месте
static int dick = 10; // переопределяет внешнюю переменную dick
int harry = 200; // определение внешней переменной
// конфликт с harry... |
ff96309fc2ab4981432e4421bc5c1f325d5ab24b | 799a59913c610eca8de1103757db644ecadb2d16 | SilvyPuzzlewell/Tunnels_thesis | /dynamic_tunnels/ozcollide/intr_spherebox.cpp | C++ | cpp | 1,721 | no_license | /*
OZCollide - Collision Detection Library
Copyright (C) 2006 Igor Kravtchenko
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; either
version 2.1 of the License, or (at your option) an... |
049edbbfb48938066eaa7286ea99ac3c8de9bf23 | e16b1c72f69dfcbe87d017e5e73a1eb6d0d2edb8 | RainbowZerg/X-Ray_Engine_1.5.1.0 | /src/utils/xrDXT/Image_DXTC.cpp | C++ | cpp | 36,715 | no_license | /*********************************************************************NVMH2****
Path: C:\Dev\devrel\Nv_sdk_4\Direct3D\Decompress_DXTC
File: Image_DXTC.cpp
Copyright (C) 1999, 2000 NVIDIA Corporation
This file is provided without support, instruction, or implied warranty of any
kind. NVIDIA makes no guarantee of its... |
a65e50318d8d78173f3e7adcfa84898982153cdb | 6c93ec7b010374e097cb8bfa3230157d39089eeb | san9w9n/2021_SUMMER_ALGO | /4weeks/17071.cpp | C++ | cpp | 904 | no_license | #include <bits/stdc++.h>
#define X first
#define Y second
using namespace std;
int N, K;
bool visited[500002][2];
int main(void) {
ios::sync_with_stdio(0); cin.tie(0);
cin >> N >> K;
queue<pair<int, int>> Q;
Q.push({N, 0});
visited[N][0] = true;
int cnt=0;
while(1) {
int x, time, lo... |
a4da027ab5c7015c931d6822e16bddb697202c4e | 0c737b9cba2f7390e0c6a56ab541c01c9abcc6f3 | ahbarif/Online-Judge-Solutions | /LightOJ/1163 - Bank Robbery.cpp | C++ | cpp | 711 | no_license | #include<bits/stdc++.h>
using namespace std;
bool ok(long long n, long long a)
{
long long b = a/10;
return (n == a-b);
}
int main()
{
int test;
cin>>test;
for(int i=1; i<=test; i++)
{
long long n;
long long b = -1;
c... |
722fab373cfa4d1fb0e8e8f5105518fcbae19391 | d569ff97976c54217a30c5f33b26983d8c47acb8 | witterauf/kaizo | /lib/src/data/formats/RecordFormat.cc | C++ | cc | 2,667 | no_license | #include "FormatHelpers.h"
#include <algorithm>
#include <contracts/Contracts.h>
#include <kaizo/data/DataReader.h>
#include <kaizo/data/DataWriter.h>
#include <kaizo/data/data/RecordData.h>
#include <kaizo/data/formats/RecordFormat.h>
namespace kaizo::data {
void RecordFormat::append(const std::string& name, std::un... |
12438d41b89e291cc34821dc5834f0538b82607a | 23f89d206fd9f0fa5171acc30a7e7c83c1ea73ac | Claw-Lang/chromium | /content/browser/web_contents/web_contents_impl_unittest.cc | C++ | cc | 104,408 | 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 <stdint.h>
#include <tuple>
#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/check.h"
#include "base... |
151dd44b5da81203e5f318f5cab9d044d57aab4b | 5a0759f6c3e56afa4b8a5d1cf456a9b873f5742c | warcog/VulkanTools | /layers/mem_tracker.cpp | C++ | cpp | 169,604 | permissive | /* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
* Copyright (C) 2015-2016 Google Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and/or associated documentation files (the ... |
83cf37f62d8b7ca8ee039722fc431c12cb95a705 | 4964c3917f20935455d81fde2f5d2a6fbd9e08ab | tangjz/acm-icpc | /leetcode/1001-2000/1419-minimum-number-of-frogs-croaking.cpp | C++ | cpp | 896 | permissive | class Solution {
public:
int minNumberOfFrogs(string croakOfFrogs) {
const char *pat = "croak";
vector<int> pos[5];
int len = 0;
for(char ch : croakOfFrogs) {
for(int i = 0; i < 5; ++i)
if(ch == pat[i])
pos[i].push_back(len++);
... |
b054d365acb76023b1d602d817ef65b9caabfbb7 | d77c2c789e2e8bf2563758245f020fb46118e196 | watchmon/BSdk | /ProjectSample/RakNetClient_PC/src/RakNetSource/WSAStartupSingleton.cpp | C++ | cpp | 1,538 | no_license | #include "WSAStartupSingleton.h"
#if defined(_WIN32) && !defined(WINDOWS_STORE_RT)
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
#include "RakNetDefines.h"
#include <stdio.h>
int WSAStartupSingleton::refCount=0;
WSAStartupSingleton::WSAStartupSingleton() {}
WSAStartupSingleton::~... |
a56474cfbe35c146b7af01e4af12113ab23e9f4c | c5b5b31a4706eea99eb485739f6747873cb097cf | Doctor-James/HUSTRM | /thread/src/lightBarThread.cpp | C++ | cpp | 12,111 | no_license | /*
* @Descripttion:
* @version:
* @Author: Eugene
* @Date: 2021-07-12 20:12:13
* @LastEditors: Andy
* @LastEditTime: 2021-07-22 10:49:15
*/
#include <tools.h>
#include "preProcessThread.h"
#include "lightBarThread.h"
//#define _DEBUG_
//#define RGB_DEBUG_
//#define HSV_DEBUG_
#define PIC_DELAY 0 //图像传输时间
name... |
ac926efcea57d95c95f4359affbf003760cd4627 | 9c5cd8cc7db9cf71151d3ff887279735ba42df5a | inaciosef/rpidmx512 | /lib-artnet/src/artnetnodehandledmxin.cpp | C++ | cpp | 3,060 | no_license | /**
* @file artnetnodehandledmxin.cpp
*
*/
/**
* Art-Net Designed by and Copyright Artistic Licence Holdings Ltd.
*/
/* Copyright (C) 2019 by Arjan van Vught mailto:info@orangepi-dmx.nl
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentati... |
7259abc2632fd1dab39dc0526f539dd65356c3e3 | 78701d01a5b7662ae45316af1ac6bdc1b1daf779 | wzj423/OI | /luogu/mmNumber.cpp | C++ | cpp | 667 | no_license | #include <iostream>
#include <iomanip>
#include <cstring>
#include <cmath>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <bits/stdc++.h>
using namespace std;
int Bucket[1010];
in... |
af9eb0f78d1ca06da86d5945948ef7937ed1b5e0 | 21251167084c4e9df9a4acdfe262ffd2db0e0943 | Gavin-Lau/GMidWare | /src/net/server.cpp | C++ | cpp | 3,093 | no_license | #include "server.h"
#include "netcommon.h"
GServer::GServer()
{
m_listenfd = socket(AF_INET, SOCK_STREAM, 0);
NetTool::setnonblocking(m_listenfd);
m_epfd = epoll_create();
}
GServer::~GServer()
{
}
int GServer::startService()
{
struct epoll_event ev;
ev.data.fd = m_listenfd;
ev.events = EP... |
328eb63260984d962df46f9ad56e16d4bf0f892d | ef8b126784bdc48d1d8d08031868f3a25d85fb64 | rekiramdani26/UTS-DASAR-PEMROGRAMAN | /BAB VI/Reki Pengulangan While.cpp | C++ | cpp | 216 | no_license | #include <iostream>
using namespace std;
int main()
{
int pencacah = 1;
while (pencacah <=10)
{
cout << "Teknik Informatika STMIK Sumedang \n";
pencacah++;
}
return 0;
}
|
6f21c91c77fa8ae9820d9d4d30960c8c80ca4b91 | cc2c6e7526b988c2075e43dc4496575fc6d039f5 | krnlyng/mupen64plus-launcher-sailfish | /src/recents_handler.cpp | C++ | cpp | 1,415 | no_license | #include <string>
#include <vector>
#include <algorithm>
#include "recents_handler.h"
using namespace std;
vector<string> recent_games;
RecentsHandler::RecentsHandler()
{
}
QVariantList RecentsHandler::getRecentGames()
{
unsigned int i = 0;
QVariantList games;
for(vector<string>::iterator it=recent_ga... |
4a0b2e0b1fbc9e78a3345309fac8903236feaa4e | 0cb5b3b382209f99708fd085ada20869594a8474 | Husaimawx/MyLeetcode | /530_二叉搜索树的最小绝对差.cpp | C++ | cpp | 730 | no_license | #include <vector>
#include <iostream>
using namespace std;
// 中序遍历
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
vector<int> inorderList;
int getMinimumDifference(TreeNode* root) {
inor... |
90cedad89c7982369660e653804839b79fac5631 | 1708db5f2411b3c1b8d8ad7d04474b74993ed3f2 | renovate-bot/google-cloud-cpp | /google/cloud/storage/examples/storage_lifecycle_management_samples.cc | C++ | cc | 7,366 | permissive | // Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
9c7269b51a7cda9291d4c4bb5bff8149cecb4fda | f31d006293153c012d8aa747f1806017093e43cf | gobha-me/oci-tool | /src/lib/OCI/Extensions/Yaml.cpp | C++ | cpp | 8,511 | permissive | #include <OCI/Extensions/Yaml.hpp>
#include <OCI/Factory.hpp>
#include <spdlog/spdlog.h>
OCI::Extensions::Yaml::Yaml( std::string const &file_path ) : client_( nullptr ) {
::Yaml::Node root_node; // need a new Yaml parser, this one doesn't follow C++ Iterator standards, which breaks range
/... |
93b1df79c11de05f866af47e6de4dd56204df762 | 73a1409f09dc59f165d397cc40d8fba62e3b880f | Ghabriel/PokemonCpp | /include/engine/state-system/StateMachine.hpp | C++ | hpp | 2,730 | permissive | #ifndef STATE_SYSTEM_STATE_MACHINE_HPP
#define STATE_SYSTEM_STATE_MACHINE_HPP
#include <functional>
#include <memory>
#include <stack>
#include <string>
#include <unordered_map>
#include "NullState.hpp"
#include "State.hpp"
namespace engine::statesystem {
/**
* \brief Simplifies the application of the %State... |
c34a0091165c0f2dd31a1e6fca60c01d1c02c943 | 2ea65cd1bdf54ba4171c69b140c5570bf9f11b16 | davidjb/nghttp2 | /src/asio_client_session_impl.cc | C++ | cc | 18,681 | permissive | /*
* nghttp2 - HTTP/2 C Library
*
* Copyright (c) 2015 Tatsuhiro Tsujikawa
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the ri... |
599f9b4fe815a9725b0d91b50fc20902df643e83 | 6d0ce89ebdfe48d1563ad42a554f6de3ff6aabb4 | lavishabhambri/Coding-Ninjas | /Lecture 6: Operators and For Loop/Terms of AP.cpp | C++ | cpp | 669 | no_license | /*
Write a program to print first x terms of the series 3N + 2 which are not multiples of 4.
Input format :
Integer x
Output format :
Terms of series (separated by space)
Constraints :
1 <= x <= 1,000
Sample Input 1 :
10
Sample Output 1 :
5 11 14 17 23 26 29 35 38 41
Sample Input 2 :
4
Sample Output 2 :
5 11 14 17
*/
... |
cc2f122f91d81ea386be55ebf5e9fa17e3347f4c | 34e7f86a84af1bb4c243a891e14c7c10d4bc268b | Bigpet/jsoncons | /test_suite/src/double_to_string_tests.cpp | C++ | cpp | 4,315 | permissive | // Copyright 2013 Daniel Parker
// Distributed under Boost license
#ifdef __linux__
#define BOOST_TEST_DYN_LINK
#endif
#include <boost/test/unit_test.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include "jsoncons/json.hpp"
#include "jsoncons/json_serializer.hpp"
#include <sstream>
#include <vector>
#include <utili... |
eda02e2a1b3291a4628d6794e150b87e791d4fd6 | ffb496f76bf1f96aa2a0333c0855dff8c82be63b | n3d1117/LabProj16 | /test/TestLoadResources.cpp | C++ | cpp | 507 | no_license | //
// Created by ned on 01/07/16.
//
#include "gtest/gtest.h"
#include "../LoadResources.h"
TEST(TestLoadResources, testNoFileNamesProvided) {
std::vector<const char*> vector;
LoadResources loader;
loader.load(vector);
ASSERT_EQ(loader.getNumberOfResources(), 0);
}
TEST(TestLoadResources, fileNamesPr... |
20a6d174a50c148b8ea80406a6d7ce1fbfe107a7 | 3fb68cfdaa3a26d0ee7b5ed9fba2f1e6d91f42ae | karlburke1986/Algorithm-and-Data-structures | /Lab3B_Upload/Lab3BUpload/Part1-3/BinaryTree.cpp | C++ | cpp | 2,265 | no_license | #include "BinaryTree.h"
#include <stddef.h>
#include <iostream>
using namespace std;
TreeNode::TreeNode()
{
data = NULL;
}
TreeNode::TreeNode(int num)
{
data = num;
left = NULL;
right = NULL;
}
BinaryTree::BinaryTree()
{
root = NULL;
}
/*************************************************************************... |
fd78b83f482b641d3b3a27d0eb1b8dcc854fe391 | b16fbd55491f2a17e2dd83fc73e216264c16ef14 | taylor-an/QNEthernet | /src/sys_arch.cpp | C++ | cpp | 1,673 | permissive | // SPDX-FileCopyrightText: (c) 2021 Shawn Silverman <shawn@pobox.com>
// SPDX-License-Identifier: MIT
// sys_arch.cpp provides system function implementations for lwIP.
// This file is part of the QNEthernet library.
#include <Arduino.h>
extern "C" {
#include <stdint.h>
#include <stdio.h>
#include <lwip/arch.h>
ex... |
673f98ee65e5a5b83fde57ca888e4c0726bd6034 | 701ce3efb6f716b50d41cbdf5fc76bb14d3b9306 | weimingtom/rm20xx-android | /CppSource/rm_src/wcsaveio.cpp | C++ | cpp | 3,181 | no_license | /*
Save I/O
*/
/* Includes */
#include <malloc.h>
#include <memory.h>
#include <string.h>
#include "wcsaveio.h"
#include "wcarray.h"
/* Globals */
arraylist wcsaveio_buffer = 0;
FILE *wcsaveio_file = 0;
int wcsaveio_max = 0;
/* Starts a save block */
void wcsaveio_start(FILE *f)
{
/* Create new ... |
c4a8c940975ef3df98bf6505e8ca55bb41589bbe | 9e2bb6dea3dbbfb1ea505aef242ee3d08bcd774f | LucaZampieri/FSI_HiMod | /project/lib/lifev/lifev/himod/modalbasis/Projector.hpp | C++ | hpp | 3,235 | no_license | //@HEADER
/*
*******************************************************************************
Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
Copyright (C) 2010 EPFL, Politecnico di Milano, Emory UNiversity
This file is part of the LifeV library
LifeV is free software; you can redistribu... |
821270355efe2fb105295bc167c5a808f779b5ff | 84b820dc5c40d2137e74c6fe13ec5edba5666f3d | amohan95/tsp | /src/tsplib/coord/coord.cc | C++ | cc | 813 | no_license | #include "tsplib/coord/coord.h"
#include <random>
using namespace std;
Coord::Coord() {
}
Coord::Coord(int dimension) {
dimension_ = dimension;
coordinates_ = new double[dimension];
}
Coord::~Coord() {
if (coordinates_) {
delete [] coordinates_;
}
}
Coord* Coord::GenerateRandomCoord(int dimension, dou... |
348226f698e8e950cd59e25953242b36feb39142 | 7a3a3853572f34382411257eaccaea20d20364eb | ddcc/llvm-project | /lld/COFF/MinGW.cpp | C++ | cpp | 8,265 | permissive | //===- MinGW.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
//
//===---------------------------... |
322571c908e9ee9453b3390a90f2a6f513dabdd2 | 608b4030ad0d5d74d50f76660858138a2eb8e4b5 | xiaoland/CaiojSolution | /question_solution/first_time/1052.cpp | C++ | cpp | 1,664 | permissive | // author: Lan_zhijiang
// description: 高精度减法
// 仍需进一步模拟
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct num {
int a[1100], len;
num() {
len = 0;
memset(a, 0, sizeof(a));
}
};
num a, b;
char as[1100], bs[1100];
num reduce(num x, num y) {
num result;
... |
9b3375f1f168f471466597c5ef497d2f4881278b | 083abfca4201757fb0175973a4954c72605cb60e | Samsung/Castanets | /components/sync/engine/events/protocol_event_observer.cc | C++ | cc | 380 | permissive | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/sync/engine/events/protocol_event_observer.h"
namespace syncer {
ProtocolEventObserver::ProtocolEventObserver() {}
ProtocolEventOb... |
4f07f1140fc9a7478c4bef760644be20316797f6 | 1f6d56c500b6fe0ca5cde2db8f49cf67ac48ddf7 | wazedrifat/Vjudge | /CodeForces/598B/8784622_AC_15ms_1864kB.cpp | C++ | cpp | 451 | no_license | #include<stdio.h>
#include<string.h>
main()
{
long int j,x,i,k,l,m,q;
char a[10050],temp[10050];
scanf("%s",a);
scanf("%ld",&q);
for(i=0;i<q;i++)
{
scanf("%ld%ld%ld",&k,&l,&m);
l--;
k--;
m=m%(l-k+1);
for(j=k;j<=l;j++)
{
x=j+m;
if(... |
53c1112537151c77a7972601a108a3d4ca941a16 | ca24d2b170a03e18fa5147a1c8316950e58f90d7 | geliadonchak/OpenGLEngine | /src/utils/ShaderLoader.hpp | C++ | hpp | 270 | no_license | #pragma once
#ifndef OPENGLENGINE_SHADER_LOADER_HPP
#define OPENGLENGINE_SHADER_LOADER_HPP
#include <string>
#include <GL/glew.h>
GLuint LoadShaders(const std::string vertex_file_path, const std::string fragment_file_path);
#endif // OPENGLENGINE_SHADER_LOADER_HPP
|
06f2862d0338a295dfddad654625252dadf93341 | 92a036b7f2679999a81974dca19fc1e831ae7b8d | NechukhrinN/enduro2d | /headers/enduro2d/core/_all.hpp | C++ | hpp | 672 | permissive | /*******************************************************************************
* This file is part of the "Enduro2D"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018-2020, by Matvey Cherevko (blackmatov@gmail.com)
***************************************************... |
fb0ea22cd50a4857ad0fedc83c98f211d6e0e1fa | 0bb05e3b0e7655a1b2594aa7a4b947f67b157a43 | YJBeetle/QtAndroidAPI | /android-29/android/media/MediaRouter.hpp | C++ | hpp | 4,585 | permissive | #pragma once
#include "../content/Context.def.hpp"
#include "./MediaRouter_Callback.def.hpp"
#include "./MediaRouter_RouteCategory.def.hpp"
#include "./MediaRouter_RouteInfo.def.hpp"
#include "./MediaRouter_UserRouteInfo.def.hpp"
#include "../../JString.hpp"
#include "./MediaRouter.def.hpp"
namespace android::media
{... |
dd5adec6c0ebe0feef838ad1172583d9d672e251 | ddf9230f19b2004bbf320a7a5fb02d425c9eb28d | gronsy/NWPEditor | /NWPEditor2/RenameDlg.cpp | C++ | cpp | 1,105 | no_license | // RenameDlg.cpp : implementation file
//
#pragma once
#include "stdafx.h"
#include "resource.h"
#include "RenameDlg.h"
#include "afxdialogex.h"
// RenameDlg dialog
IMPLEMENT_DYNAMIC(RenameDlg, CDialogEx)
RenameDlg::RenameDlg(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_RENAME_DIALOG, pParent)
{
}
RenameDlg::~Rena... |
7ae9fea67471865da5460c0b31bd2665ca641f04 | 31e6e5bd13f370dc026ca7d23b85e9c271bbc5e1 | Sudipta-Trisha/AtCoder-Problems-Solutions | /B - Trick or Treat.cpp | C++ | cpp | 418 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k;
cin>>n>>k;
int arr[300] = {};
int cnt=0;
for(int i=1; i<=k; i++){
int d;
cin>>d;
for(int j=1; j<=d; j++){
int m;
cin>>m;
arr[m] = 1;
}
}
for... |
c16337d0a8c99b69b04fd96ae6eed10d0b75735b | 23123716577ccb6a8514e8f9b1c634d3dc45afdc | happiie/CPlusPlus | /Lec Example/date/src/date.cpp | C++ | cpp | 602 | no_license | #include "date.h"
#include <iostream>
using namespace std;
date::date() //ctor
{
day = 1;
month = 1;
year = 2000;
}
date::date(int d, int m, int y)
{
day = d;
month = m;
year = y;
}
void date::setDay(int d)
{
day = d;
}
void date::setMonth(int m)
{
month = m;
}
... |
9a8fe0318f7b9857526ad28e93d352765b4289c8 | aae79e472838dfbe2e3a54fb1387e8afdb5f591b | 123456789asdfjkl/BUAA-OJ-Project | /bound-bsearch/121 相位转移.cpp | C++ | cpp | 1,036 | no_license | #include<stdio.h>
#include<limits.h>
#include<string.h>
#include<algorithm>
using namespace std;
int lo,hi,mi;
int x,m,t;
int a[100010];
int s[100010];
int pre,now;
int main()
{
while(~scanf("%d%d%d",&x,&m,&t))
{
memset(a,0,sizeof(a));
memset(s,0,sizeof(s));
pre=0;
lo=hi=x;
int i;
for(i=1; i<=m; ++i)
... |
b72e4458d8ce3f85a8a1ffe2b195e95d1d17f7be | aac566f53d93a64f1f46630467998b95df8a25a7 | gregcusack/Compiler | /Phase_2_Syn_Anal/SA_up_to_Unary_Op.cpp | C++ | cpp | 6,532 | no_license | #include <cstdio>
#include <cctype>
#include <string>
#include <iostream>
#include <stdio.h>
#include "lexer.h"
#include "lexer.cpp"
using namespace std;
//test
int count = 0;
string lexbuf, lexbuf2;
int la = lexan(lexbuf);
void match(int x);
void match_next_token(int x);
void matchID(void);
void matchOR(void);
void... |
b0ec6553169a636f8461de969e4f16091205381d | d65e13d7ac281c80de82f9979aba3ca54b0808ca | MaxEntroy/pnp | /ep04/demo-00/common.cc | C++ | cc | 1,489 | no_license | #include "common.h"
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <strings.h>
#include <unistd.h>
namespace pnp {
int tcpRead(int sfd, void* buf, int length) {
int nread = 0;
while (nread < length) {
int nr = read(sfd, static_cast<char*>(buf) + nread, length - nread);
if... |
c30601cab15d4cfd7ec50797fbcdf37763b5fe2a | 206b5004ac97a2c8d182c53d09445c1710c51134 | thongteav/AlienInvasion | /Build Files/Framework/HUD.cpp | C++ | cpp | 1,351 | no_license | // This include:
#include "HUD.h"
#include "BackBuffer.h"
#include "Sprite.h"
const int X = 100;
const int Y = 550;
const int NUM_LABELS = 3;
const int LABEL_SIZE = 36;
const int X_OFFSET = 5;
const int Y_OFFSET = 4;
const int WIDTH = X_OFFSET * (NUM_LABELS + 1) + LABEL_SIZE * NUM_LABELS;
const int HEIGHT = Y_OFFSET *... |
0344dd1d5813b76db0f0fd782020fe3ed5077cee | 35d946c2c7b68f46103808917949acc6e4e9ca6f | greshem/develop_wxwidgets | /wxWidget_codegen/output/virtual_fun/wxHashTableBase.cpp | C++ | cpp | 1,214 | no_license | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <string>
#include <dirent.h>
#include <fstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <iostream>
#include <map>
#include <wx/wx.h>
#include <wx/thread.h>
#include <wx/confbase.h>
#include <wx/encc... |
ae4c51a6bcb32eae628f7e5b46b8b6545e8c0ead | 94f7acf8dd63c5f2442147500619a0d3687e6d93 | maZymaZe/acm-remote | /2021-1-19/c.cpp | C++ | cpp | 615 | no_license | #include <cstdio>
#define N 1024
int a[N], f[N][N], n, w;
inline int max(int a, int b) { return a > b ? a : b; }
int main()
{
scanf("%d", &n);
for (int i = 1; i <= n; i++)
{
scanf("%d", &a[i]);
a[n + i] = a[i];
}
for (int k = 2; k <= n; k++)
for (int ... |
0cfe536206ec900fea63eb115f53d6b204aa0fb9 | 0f84bc8b662b44b4d7e10eef4ef68c1dffca8cc3 | wwllww/LiveStream_MultiIntance | /D3DRender/V1.1/GraphicsSystem.cpp | C++ | cpp | 8,268 | no_license |
#pragma warning(disable: 4530)
#include "windows.h"
#include "GraphicsSystem.h"
#include "Defs.h"
#define MANUAL_BUFFER_SIZE 64
GraphicsSystem::GraphicsSystem()
: curMatrix(0)
{
MatrixStack << Matrix().SetIdentity();
}
GraphicsSystem::~GraphicsSystem()
{
}
void GraphicsSystem::Init()
{
}
Shader* Graphics... |
b8c3a7c38e2a02ba197d98ec3c108125fc515a48 | 578ac077c1ad5604a6aad76028397bd7174c856f | hammer2505/MyLeetCode | /113. Path Sum II/main.cpp | C++ | cpp | 894 | no_license | #include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
void findPaths(TreeNode* node, int sum, vector<int>& path, vector<vector<int>>& paths){
... |
9035d8ac2c2279fad49d312f2119e797c2a2ae19 | f508dbf524b1fc955d44a8eec314a9a5d001ad03 | nimish-dev/DSA-with-cpp | /Stack/infix_to_postfix_single.cpp | C++ | cpp | 2,823 | no_license | #include<iostream>
#include<stack>
#include<string>
#include<string.h>
#include<stdlib.h>
using namespace std;
class infix_to_postfix
{
private:
string p;
string q="";
public:
infix_to_postfix(){}
void create();
void post_conv();
void display();
int post_e... |
fceca4bade87928071876169dd25909c07602e02 | 6d93d916552890151e0c337b60ab028aada0c7f8 | akari23/Alternative | /Classes/Scene14.cpp | C++ | cpp | 38,172 | no_license | #include "Scene14.h"
#include "Option.h"
#include "HomeMenu.h"
#include "SaveGame.h"
#include "LoadGame.h"
USING_NS_CC;
Scene* Scene14::scene()
{
return Scene14::create();
}
bool Scene14::init()
{
if (!Scene::init())
{
return false;
}
bgm->playBackgroundMusic("music/14.mp3", true);
Ho... |
d98fd87e575ca2aab680a2e384c181632589d61f | 870ffb4ebc8663fa737551a0a4058805e80e7cd6 | PilzDE/psen_scan | /test/integration_tests/integrationtest_scan_topic_node.cpp | C++ | cpp | 2,342 | no_license | // Copyright (c) 2020 Pilz GmbH & Co. KG
//
// This program 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, either version 3 of the License, or
// (at your option) any later version.
//
// This progra... |
8e09ddd035731b2a3f7db0479405333c88a8f896 | 426241a5d7cf8086b91ca20402c8a3d321f2e1d5 | tahsinsoha/Problem-solving- | /Codeforces/digit game.cpp | C++ | cpp | 1,022 | no_license | #include<bits/stdc++.h>
#define ll long long
using namespace std;
long long arr[1000007];
long long cs[1000007];
long long ps[1000007];
int main()
{
int t;
cin>>t;
while(t--)
{
int d;
string s;
cin>>d;
cin>>s;
int odod=0, odev=0, evod=0, evev=0;
for(... |
a42bfab27c4f9d4d92bd05a5c7138a0e5e313b88 | 9f6cbda0a83b6f01d9d76be594f47140fd9eec05 | voltrevo/project-euler | /cpp/p33.cpp | C++ | cpp | 1,646 | permissive | #include <iostream>
#include <list>
using namespace std;
#include "primeFeed.hpp"
int HCF(int a, int b)
{
static PrimeFeed pf;
pf.Restart();
if (a == 0 || b == 0)
return 0;
int product = 1;
while (a != 1 || b != 1)
{
int p = pf.Next();
while (a % p ==... |
b3d878f29643172a00a3aca82ddb2770886a9b6d | d93d5c7d1d0d4ba82e43458ffbb146f8118dcd7f | djnandinho26/Legend_Server_S16 | /Common/base64.cpp | C++ | cpp | 3,544 | no_license | /*
base64.cpp and base64.h
Copyright (C) 2004-2008 René Nyffenegger
This source code is provided 'as-is', without any express or implied
warranty. In no event will the author be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software ... |
5c11b928ed125a8cd8cea77c01e6128f1788e3a7 | 547893c11dee9b49870846eeffa88dc8121f95ce | SeanTheHuang/SpaceInvaders | /Breakout/Shields.cpp | C++ | cpp | 841 | no_license | //
// Bachelor of Software Engineering
// Media Design School
// Auckland
// New Zealand
//
// (c) 2016 Media Design School.
//
// File Name :
// Description :
// Author : Your Name
// Mail : your.name@mediadesign.school.nz
//
// Library Includes
// Local Includes
#include "resource.h"
#include "utils.h"
// This... |
121c1f2928f9afd26da0dbf01127b906efc17089 | b478da705c7da9bda820266a9f8bb8ddb4f5eae0 | cantbewong/passwordsafe | /src/core/CoreOtherDB.cpp | C++ | cpp | 40,638 | permissive | /*
* Copyright (c) 2003-2016 Rony Shapiro <ronys@pwsafe.org>.
* All rights reserved. Use of the code is allowed under the
* Artistic License 2.0 terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license-2.0.php
*/
// file CoreOtherDB.c... |
7111054c881603992ddbc7c593077ac7dff88014 | 74faf66f2ad254b1850403715822500beaed09b9 | Moshiurmamun/Interview-Preparation- | /balanced bracket.cpp | C++ | cpp | 437 | no_license | #include<bits/stdc++.h>
using namespace std;
int main()
{
int i,j;
stack<char>s;
string a;
cin>>a;
for(i=0;i<a.size();i++){
if(a[i]=='(')
s.push(a[i]);
else if(a[i]==')'){
if(s.top()=='(')
s.pop();
}
else if(a[i]=='[')
s.push(a[i]);
else if(a[i]==']'){
if(s.top()=='[')
... |
d4b71e56f59c4809b0481048f21724ec009f3da6 | 9620782fc5ac6281460d3648bef2eb60dc2e6738 | Manzood/CodeForces | /Rounds/Round-764/C/C.cpp | C++ | cpp | 1,085 | no_license | #include "bits/stdc++.h"
#ifdef local
#include "custom/debugger.h"
#else
#define debug(x) 42;
#endif
using namespace std;
#define int long long
void solve() {
int n;
scanf("%lld", &n);
vector <int> a(n);
for (int i = 0; i < n; i++) {
scanf("%lld", &a[i]);
}
bool possible = true;... |
1a934608416c2b3cb3467b1c20790f3337bfbb86 | 89e154019e406bde8856549318bc71107c57bd3c | itisha23/DataStructures | /sortedCircularLinkedList.cpp | C++ | cpp | 1,872 | no_license |
/*
struct Node
{
int data;
Node *next;
};
*/
void sortedInsert(Node** head_ref, int x)
{
//Your code here
int flag=0;
Node *head,*ptr,*prev;
head=*head_ref;
if(head==NULL)
{
struct Node*newnode=(struct Node*)malloc(sizeof(struct Node));
newnode->data=x;
head=newnode;... |
b09e2427194880fb0ca086b90c5985d5419b18a1 | f456d711dc0cc23f1281839bb2a1dd863eb19637 | SohrabRoohi/Codeforces | /1117A.cpp | C++ | cpp | 1,190 | no_license | /*
Sohrab Roohi
*/
#include <bits/stdc++.h>
using namespace std;
const double pi=acos(-1.0);
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<PII> VII;
typedef vector<VI> VVI;
typedef map<int,int> MPII;
typedef set<int> SETI;
typedef multiset<int> MSETI;
typedef long in... |
526278f522d468f151f98d74d513956d6d53f757 | d0168e2ea89720cf6cdfec4e9c8166886c9db693 | jonsource/dng | /src/game_map.cpp | C++ | cpp | 11,093 | permissive | /*
* game_map.cpp
*
* Created on: 2.3.2013
* Author: tzeentch
*/
#include "game_map.h"
#include "game.h"
#include "game_lib.h"
#include "game_lib_load.h"
#include "texture.h"
#include <string>
#include "mobile.h"
using namespace std;
extern char chbuf[256];
int load_area(string fname)
{ string str1, str2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.