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 |
|---|---|---|---|---|---|---|---|---|
552e1adac8a3f3e361c7b430cf20109a4b20c4bd | 1019ef8ce028b81f227707b90f09d3d68f52fdf4 | skwee357/TankSmasher | /src/World/GameStats.cpp | C++ | cpp | 2,186 | permissive | #include "World/GameStats.hpp"
#include "Game.hpp"
#include "Entities/Tank.hpp"
#include <iomanip>
GameStats::GameStats(){
mTank.SetImage(*GetGlobalContext().imageManager->Get("tanks.png"));
mTank.SetCenter(0, 0);
mTank.Rotate(90);
sf::Color c(255, 255, 255);
FontManager::FontPtr f = GetGlobalConte... |
147a56fd159774a331aacf1446a4c2aa8db80117 | 8fdf8f20e845a78695d6a5c9a3f99c5e0d4192bc | JingxueLiao/Data_Structures_and_Algorithms | /problems/dungeon_game.cpp | C++ | cpp | 1,934 | permissive | // The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon.
// The dungeon consists of M x N rooms laid out in a 2D grid.
// Our valiant knight (K) was initially positioned in the top-left room and must fight his way through the dungeon to rescue the princess.
// The knight h... |
f1748eda794a823327edeebdf73980ba137acd54 | e5e2360f4e26b78722995e79ce635b4fea16e8b6 | sukhpreet-singh1/Algorithms | /sort012.cpp | C++ | cpp | 681 | no_license | //dutch national flag algorithm or 3 way partitioning
//time complexity O(n)
void sort012(int arr[],int n)
{
int low,mid,high;
low=0;
mid=0;
high=n-1;
while(mid<=high)
{
if(arr[mid]==0)
{
swap(arr[low],arr[mid]);
low++;
mid++;
}
if(arr[mid]==1)
{
mid++;
}
if(arr[mid]==2)
{
swap(arr[... |
6e425d45e2ead0a5f3a53595b5a30b5296b4b71e | 3e18a7c10e9006a59a1708db072bf25d74a7bfc8 | DanRuckz/2D-Warfare | /src/Playables.cpp | C++ | cpp | 3,267 | no_license | #include "Playables.h"
Playables::Playables()
{
}
void Playables::setObjectsVector(std::vector<Playables*>& other)
{
objects = other;
}
void Playables::rotateEntity(Sprite & entity, std::string direction, float rotateSpeed)
{
if (direction == "left")
{
entity.rotate(-rotateSpeed);
}
if (direction == "rig... |
25af8a2324b3cefc3e82aa86bcea765cc521fc9c | 0f6ff659937efa9f5c408291ed11d2a35fc4449f | amosbird/ClickHouse | /src/Interpreters/executeQuery.cpp | C++ | cpp | 44,570 | permissive | #include <Common/formatReadable.h>
#include <Common/PODArray.h>
#include <Common/typeid_cast.h>
#include <Common/ThreadProfileEvents.h>
#include <Interpreters/AsynchronousInsertQueue.h>
#include <IO/WriteBufferFromFile.h>
#include <IO/WriteBufferFromVector.h>
#include <IO/LimitReadBuffer.h>
#include <IO/copyData.h>
#... |
68b9ed2cb7281ca935c2507f21f411e1e5fa93c4 | 62d6cdc4465a2931564e8c420f5887f6c879bba3 | bsarvan/code_algorithms | /CountSay.cpp | C++ | cpp | 848 | no_license | //
// main.cpp
// CountSay
//
// Created by bsarvan on 26/01/18.
// Copyright © 2018 bsarvan. All rights reserved.
//
#include <iostream>
#include <string>
using namespace std;
void countAndSay(int A) {
string s = to_string(1);
int cnt = 0;
string tmp;
while(A-1>0){
//cout<<"Input Str... |
5b263d5b1567e1b457b54423bc3e6bf65a1959cf | 985580e2e70bd0f00d0c0af59efe6540b784f112 | vishalprajapati01/cpp | /14)functions/factorialnum.cpp | C++ | cpp | 301 | no_license | #include<iostream>
using namespace std;
int fact (int n)
{
int factorial=1;
for( int i=1; i<=n; i++)
{
factorial=factorial*i;
}
return factorial;
}
int main(){
int n;
cout<<"enter a number: ";
cin>>n;
int ans= fact(n);
cout<<ans<<endl;
return 0;
} |
f8ec3fd531ca85a594dcfe266160c3d56afa3ee7 | 70398f0aba2124e084c235c68be56dafb46ffce3 | leksmax/URMA-TLR | /unit_test/cpputest/monitors/bridge_monitor/test_interfaces.cpp | C++ | cpp | 8,331 | no_license | /*****************************************************************************
* Copyright (c) 2016 Digi International Inc., All Rights Reserved
*
* This software contains proprietary and confidential information of Digi
* International Inc. By accepting transfer of this copy, Recipient agrees
* to retain this softwar... |
da900891e5b3e019f56be7dfa3e6d079a9e47129 | 8b1bdf0d1824ae944b153d4a5f2a4656eec4b428 | zenoalbisser/chromium | /third_party/skia/samplecode/SampleTinyBitmap.cpp | C++ | cpp | 2,100 | permissive |
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SampleCode.h"
#include "SkColorPriv.h"
#include "SkShader.h"
#include "SkView.h"
#include "SkCanvas.h"
#include "SkUtils.h"
static SkBitmap make_bitmap() {
cons... |
6ffd5528f3b5ff9b6a7404ad459aaf3de09683ff | 8601a59da075e05c8718a73af69361dc27026a97 | Mr-Kumar-Abhishek/hhvm | /hphp/runtime/vm/jit/dce.cpp | C++ | cpp | 26,037 | permissive | /*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2016 Facebook, Inc. (http://www.facebook.com) |
+---------... |
8024c649c4a1d63ee0adba4efdc1eeaf672be197 | 38636c143464625361b01bdb8084806f6020b759 | mimon/ogre-next | /Samples/2.0/ApiUsage/IesProfiles/IesProfilesGameState.cpp | C++ | cpp | 5,290 | permissive |
#include "IesProfilesGameState.h"
#include "CameraController.h"
#include "GraphicsSystem.h"
#include "OgreItem.h"
#include "OgreSceneManager.h"
#include "OgreMesh2.h"
#include "OgreMeshManager.h"
#include "OgreMeshManager2.h"
#include "OgreSubMesh2.h"
#include "OgreCamera.h"
#include "OgreHlmsPbsDatablock.h"
#inc... |
36582a65eeac7ab63d2020d53d26a6aae5eb73d0 | 10cf47fb8e69b959c2276df14ace87a1b72cb74a | Satvik0117/CN-codes | /CN Competitive Course/Assignment BT/count balls iterative.cpp | C++ | cpp | 782 | no_license | #include<bits/stdc++.h>
using namespace std;
long long main()
{
long long n;
cin>>n;
long long left = 1;
long long right = n;
long long ans;
while(left<=right){
long long k = left + (right-left)/2;
long long temp =n;
long long ballA=0; //sharma
long lo... |
b27a31d128a12f0273cbba248dc71275c6b732ab | d727807bad77553fc4f462bd988ec3a60f34edca | sc2ad/BeatSaber-Quest-Codegen | /include/NUnit/Framework/Internal/Test.hpp | C++ | hpp | 41,107 | permissive | // Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: NUnit.Framework.Interfaces.I... |
b2f4865f8fb36a56675f7003e6d4a424421bc859 | 077a3d561fa0419655b570f582d6043d20b39718 | InfiniteZero/MyGame1 | /my game/my game.cpp | C++ | cpp | 1,456 | no_license | // my game.cpp : Defines the entry point for the console application.
//
//To save console output to file, type this: "name.exe >> output_file_name.txt"
//To clear console window, type: CLS
//C:\C++\my game\Debug>"my game" >> output.txt
#include "stdafx.h"
#include "Game_Engine.h"
#include <sys/types.h>
#include <fcnt... |
4a55b26aa690ac7674490b0a3c1415b0f187f9cc | 83a4c1ada94eb0a06fa44d48375dcebd09c9597b | DenIS318/Iwmo | /Player.cpp | C++ | cpp | 1,290 | no_license | #include "Player.h"
Player::Player(std::unique_ptr<sf::TcpSocket>* socket, sf::Vector2f position, int id)
{
m_position = position;
m_name = "Noname";
m_id = id;
m_socket = std::move(*socket);
m_velocity = sf::Vector2f(0, 0);
m_timeout = sf::seconds(0);
}
void Player::setPosition(sf::Vector2f position... |
89ceb34506a9edf57ffa8488deec755ad830a982 | de03bef386ee23c7cc17bae763abe433f1d80f5b | dualword/Visore | /code/interface/vicomposedwidgets/sources/viprojectloader.cpp | C++ | cpp | 10,235 | no_license | #include <viprojectloader.h>
#include <ui_viprojectloader.h>
#include <viloadingwidget.h>
ViProjectLoader::ViProjectLoader(QWidget *parent)
: ViWidget(parent)
{
mUi = new Ui::ViProjectLoader();
mUi->setupUi(this);
mTypeMode = ViProjectLoader::MultipleTypes;
mProjectMode = ViProjectLoader::SingleTrack;
mUi->fil... |
6303c421d4f7320733ac2d730c892f9ff32cc03d | f3392f7756807c51524e22ce436d2c3ed2af51bc | MURA-omura/mirs2003_tpylo | /src/uss.cpp | C++ | cpp | 935 | no_license | /**
* @file ucc.cpp
* @brief 距離検出プログラム
* @author 岡部
* @date 2020/11/11
*/
#include "uss.hpp"
#include <stdio.h>
#include <unistd.h>
#include <wiringPiI2C.h>
Uss::Uss(int address, long dist):
t_uss(50),
uss_min(16),
uss_max(600),
dist_center(10),
dist_min(dist)
{
fd = wiringPiI2CSetup(address);
// ソフトウェアリビジョン... |
58eb8d0f3a4ab0a4d3e70a82b1ba96d4bf9f63c0 | e8693b941642ae787d318cd86e0022f50ec96d5d | stack-of-tasks/sot-core | /src/matrix/integrator-euler.cpp | C++ | cpp | 713 | permissive | /*
* Copyright 2010,
* François Bleibel,
* Olivier Stasse,
*
* CNRS/AIST
*
*/
#include <sot/core/integrator-euler-impl.hh>
#include <sot/core/integrator-euler.hh>
#include "integrator-euler.t.cpp"
#ifdef WIN32
IntegratorEulerVectorMatrix::IntegratorEulerVectorMatrix(
const std::string &name)
: Integra... |
f2153baf458e5b0232ade1eacbaa3c9eb2ef6b88 | b0d26b18b18170923726a8e8e81e1bc901a14fbf | NoureldinYosri/competitive-programming | /SPOJ/COURIER/main.cpp | C++ | cpp | 2,198 | no_license | #include <bits/stdc++.h>
#define loop(i,n) for(int i = 0;i < (n);i++)
#define range(i,a,b) for(int i = (a);i <= (b);i++)
#define rrep(i,n) for(int i = (n);i >= 0;i--)
#define rran(i,a,b) for(int i = (b);i >= (a);i--)
#define all(A) A.begin(),A.end()
#define PI acos(-1)
#define pb push_back
#define mp make_pair
#define ... |
a16b22376f9f5f63a48393e45132e93295f08e2a | d9c420cf3beaf036592c60aa0c7863fa53a63b56 | taroni/TurnOn | /TurnOn/fitEfficiency.cc | C++ | cc | 31,458 | no_license | //g++ -o fitEfficiency FuncCB.cc fitEfficiency.cc `root-config --cflags --libs` -L $ROOFITSYS/lib -lRooFit -lRooFitCore -I$ROOFITSYS/include
//g++ -o fitEfficiency fitEfficiency.cc `root-config --cflags --libs` -L $ROOFITSYS/lib -lRooFit -lRooFitCore -I$ROOFITSYS/include
///////////////////////////////////////////... |
0c67099fe56aefc3238b245f1b342a6930046b42 | 9dbb94b50e83b79923f650056b4215220df00777 | zhiyu123/DS | /图/graph.cpp | C++ | cpp | 9,232 | no_license | #include"graph.h"
ALGraph::ALGraph() //创建一个包含v个顶点但不包含边的图
{
this->E = 0;
this->V = 0;
this->in_degree = new int[MaxVertexNum]();
this->AdjList = new VNode[MaxVertexNum]; //创建一个顶点表数组,用来后续存储顶点
for (int i = 0; i < MaxVertexNum; i++) //初始化邻接表
{
this->AdjList[i].data = '#'; //用#表示当前这个索引处没有节点
this->AdjList[i].f... |
200f1b9ab162c2fd3c7ebc3530edf2e8c1b0accc | 04ecc0eb15054608ead71d574e6b97e8430af842 | danoan/LPModel | /modules/terms/src/API.cpp | C++ | cpp | 830 | no_license | #include "LPModel/terms/API.h"
using namespace LPModel::Terms;
void API::mergeMap(Term::GeneralMap& mergedMap,
const Term::GeneralMap& inputMap1,
const Term::GeneralMap& inputMap2)
{
mergedMap = inputMap1;
for(auto it=inputMap2.begin();it!=inputMap2.end();++it)
{
... |
814028461d25fef2645ef013306d1cf4c2c19a9e | a43f14a5ef6231516176c0fb19c61ca5f9f5e8f8 | makai-china/QingStor-C-SDK | /src/Configuration.cpp | C++ | cpp | 7,127 | permissive | /********************************************************************
* 2017 -
* open source under Apache License Version 2.0
********************************************************************/
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOT... |
996b78918b6855eeea3b2f1cea0502b1d53f3d4d | a6c4a2fbaf0b51f0afed1ab50df843e6068d50e6 | dvanaken/peloton-bwtree | /src/postgres/backend/libpq/pqcomm.cpp | C++ | cpp | 49,215 | permissive | /*-------------------------------------------------------------------------
*
* pqcomm.c
* Communication functions between the Frontend and the Backend
*
* These routines handle the low-level details of communication between
* frontend and backend. They just shove data across the communication
* channel, and ... |
9b30032672614452dac7cbaa63b09d467936f349 | 034810b04914a5a10a8523fe91bbc59ee9dfe2f3 | aws/aws-sdk-cpp | /generated/src/aws-cpp-sdk-awstransfer/source/model/HomeDirectoryMapEntry.cpp | C++ | cpp | 1,291 | permissive | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/awstransfer/model/HomeDirectoryMapEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace A... |
2b577d36540fca7b57548eca25f1cffc875e3d87 | 4679b71e66f24c9529cc7aa435e9d8ac09c6caba | fuersten/sun_ray | /test/script/disk_test.cpp | C++ | cpp | 4,319 | permissive | //
// disk_test.cpp
// sun_ray_test
//
// Created by Lars-Christian Fürstenberg on 19.04.20.
// Copyright © 2020 Lars-Christian Fürstenberg. All rights reserved.
//
#include <sun_ray/script/objects/disk.h>
#include <sstream>
#include <catch2/catch.hpp>
TEST_CASE("disk construction", "[disk]")
{
sunray::scrip... |
4bf1bacb36137cef1bd2894a775679eafb861c0a | 2188ebfa77a24b2e62a88be126e94e00830630b7 | hesq1523/proxy | /src/istio/control/client_context_base.cc | C++ | cc | 4,056 | permissive | /* Copyright 2017 Istio Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
6c228204ae570c0310b9aa1a1790f608cf22db42 | 1ca7129ef4ad840863852ce909f05f9abbb1dc2f | Yordi25/Tarea1Datos2 | /List.cpp | C++ | cpp | 3,363 | no_license | //
// Created by yordi on 8/3/21.
//
#include "List.h"
#include "Collector.h"
#include <sstream> //for std::stringstream
#include <string> //for std::string
#include <iostream>
using namespace std;
/*
* Clase List que almacena numeros (int). Formada por nodos de la clase Node
*/
List::List(){
head = 0;
... |
028566c45b7beab8b2e6c21633d86e8498ac1061 | f73cc92c72c717d636c7fe2de226966c3ce45999 | roca12/gpccodes | /Codigos estudiantes por lenguaje/C++/Cristian Maldonado/Ordenamientos/Counting_Sort.cpp | C++ | cpp | 924 | no_license | #include <iostream>
#include <string.h>
using namespace std;
void sorted(char arr[], int n){
char output[n];
int counting[256];
memset(counting, 0, sizeof(counting));
for(int i = 0; i < n; i++){
++counting[arr[i]];
}
for(int i = 1; i <= 255; ++i){
counting[i] += counting[i - 1]... |
e3f92e81a31fad4ca28e6c5bb3ea8d6d52fc3912 | 5ffc5ef67781b6e52364f3e1a7b94ba832cba375 | harderthan/points2image_autoware | /src/main.cpp | C++ | cpp | 202 | permissive | #include <ros/ros.h>
#include <iostream>
int main(int argc, char **argv)
{
ros::init(argc, argv, "points2image_node");
ros::NodeHandle nh;
ros::NodeHandle private_nh("~");
return 0;
}
|
253001f0de104df2ab5e4d695fab4f38b25a85a4 | 31fa4867e4b51906b443975efef61513c00fd926 | zdemirag/PandaAnalysis | /Flat/bin/treeClassTmpl.cc | C++ | cc | 527 | permissive | // THIS FILE IS AUTOGENERATED //
#include "../interface/treeClassTmpl.h"
// STARTCUSTOM INCLUDE
#include <iostream>
//ENDCUSTOM
treeClassTmpl::treeClassTmpl() {
// STARTCUSTOM CONSTRUCTOR
// ENDCUSTOM
Reset();
}
treeClassTmpl::~treeClassTmpl() {
// STARTCUSTOM DESTRUCTOR
// ENDCUSTOM
}
void treeClassTmpl::SetAuxTre... |
ffe4162f2e3587f832268c12ee48dae9ead5fdb4 | 9427500816ce3a85785b5d1e550ea460725520c9 | zhwenwan/DataStructure | /LinearList/DuLinkList.cpp | C++ | cpp | 1,252 | no_license | //
// Created by aSUSS on 2018/10/14.
//
using namespace std;
#include <iostream>
#include "DuLinkList.h"
bool DuList_Init(DuLinkList &L) {
L = (DuLinkList) malloc(sizeof(DuNode));
if (!L) { return false; }
L->next = NULL;
L->prior = NULL;
}
bool DuList_Insert(DuLinkList &L, int loc, int elem) {
... |
cfd7780e187d9bb23abf12d9c89697cf30dfd66c | c1c0b20a56d2455ee88c8d898091ee55a75a02b7 | kani215/2019-cpp | /c++ basic grammer/chap03_number/chap03_number/scanf etc.cpp | C++ | cpp | 471 | no_license | #include <stdio.h>
void main() {
int pie = 3.14;
double pie2 = 3.14;
// printf(pie);로는 문자열만 출력이 가능한가 보다.
printf("0.2f\n", pie);
printf("%0.2f", pie);
int a, b;
int sum;
printf("첫 번째 숫자를 입력하세요:");
scanf_s("%d", &a);
//형식, a에다가 넣어라
printf("두 번째 숫자 입력");
scanf_s("%d", &b);
sum = a + b... |
353986eebc2c95b46e222d7efbc1a745f3d87d3d | b00d71f1a6be2b2e86d1df37d6b2d01deab20d97 | polybox3d/PolyDuino | /AbstractClient.cpp | C++ | cpp | 1,694 | no_license | #include "AbstractClient.h"
AbstractClient::AbstractClient(QObject *parent) :
QObject(parent)
{
_connector = NULL;
connectionUptime = 0 ;
_uptimeTimer.start( 2000 );
connect( &_uptimeTimer, SIGNAL(timeout()), this, SLOT(connectionUptimeProcess()));
}
QByteArray AbstractClient::datas()
{
retur... |
c995161bd353a41a0dc463d06d5cbece1b437fe1 | 1f3167195a5ce06184e64dbcdc3128b22df13c89 | bmswgnp/opensim-core | /OpenSim/Common/VisibleObject.cpp | C++ | cpp | 13,766 | permissive | /* -------------------------------------------------------------------------- *
* OpenSim: VisibleObject.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
... |
73f78e76441630fb47a828ad49bf4ed9d6db418a | 2d98dbb25f5f20fc1ce037e45572e13ed1b39911 | KqSMea8/sstd_library | /sstd_boost/sstd/boost/python/args.hpp | C++ | hpp | 4,239 | permissive | // Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef KEYWORDS_DWA2002323_HPP
# define KEYWORDS_DWA2002323_HPP
# include <sstd/boost/python/detail/prefix.hpp>
# include <sst... |
ce417ac499eabe7678bf53c1d4db38c2c7b7d19c | 03207eec30aae0f013e791808f808622b4c230fd | CadQuery/pywrap | /opencascade/StepShape_HArray1OfShapeDimensionRepresentationItem.hxx | C++ | hxx | 1,197 | permissive | // Created on: 2015-07-21
// Created by: Irina KRYLOVA
// Copyright (c) 2015 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as publ... |
284ca5071bdf567cd147dce75deb1b4100f1a62f | df0f3b947fa078e2ac0b64c1e03ca9395e2357ca | quietust/dfhack-23a | /plugins/devel/kittens.cpp | C++ | cpp | 8,824 | permissive | #include "Core.h"
#include "Console.h"
#include "Export.h"
#include "PluginManager.h"
#include "MiscUtils.h"
#include <vector>
#include <string>
#include "modules/Maps.h"
#include "modules/Items.h"
#include <modules/Gui.h>
#include <llimits.h>
#include <df/caste_raw.h>
#include <df/creature_raw.h>
using std::vector;
u... |
19fc997437021fd74fa5d144f47876ebfdf3d612 | 31a1d764deb2f43a89f91f8c8adf422d4a14a0ae | KAIST-USRG/mbzirc | /mbzirc_wheel_control/src/wheel_control.cpp | C++ | cpp | 3,852 | no_license | #include "ros/ros.h"
#include "dynamixel_workbench_msgs/DynamixelCommand.h"
#include "geometry_msgs/Twist.h"
#include <cmath>
double const RESOLUTION = 1002866;
const double RAD_DEG = 57.2957951;
int dynamixel_degree = 0;
int dynamixel_degree_lf = 0;
int dynamixel_degree_rf = 0;
int dynamixel_degree_lb = 0;
int dynami... |
556fb9b14e4f88de731b41fd4d4c13f53c076050 | f3a13f48e5a700ab3927235697711b8c6ea3cb02 | isabella232/intel-graphics-compiler | /IGC/Compiler/ConvertMSAAPayloadTo16Bit.hpp | C++ | hpp | 2,273 | permissive | /*===================== begin_copyright_notice ==================================
Copyright (c) 2017 Intel Corporation
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, includi... |
fdece20850ca1c2cf48f9404df2a56fda078758e | ff3ff26034255528c17c6d48aeb6796b7ec0bb44 | kaitai-io/formats-kaitai-io.github.io | /uimage/src/cpp_stl_98/uimage.cpp | C++ | cpp | 2,029 | permissive | // This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
#include "uimage.h"
#include "kaitai/exceptions.h"
uimage_t::uimage_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, uimage_t* p__root) : kaitai::kstruct(p__io) {
m__parent = p__parent;
m__root = this;
... |
f4cd7b85b3e5df87255e1be137934023fbbacc62 | 8bd3b367c667e060a5730419529f0717e2cb563c | xtblock/chromium | /components/subresource_filter/content/browser/async_document_subresource_filter.cc | C++ | cc | 11,319 | permissive | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/subresource_filter/content/browser/async_document_subresource_filter.h"
#include <utility>
#include "base/bind.h"
#include "base/ca... |
87b0e65d3d6222fa04146c73cd432966f27fb249 | 7242ce62776a7bc7508479c6b7da92f2456f04a1 | vasu536/KalmanFilter | /Matrix.cpp | C++ | cpp | 14,455 | no_license |
/***************************************
* Created by Srinivas Karuparthi
* Matrix.cpp
****************************************/
#include <stdexcept>
#include "Matrix.h"
#define EPS 1e-10
using std::ostream; using std::istream; using std::endl;
using std::domain_error;
/* PUBLIC MEMBER FUNCTION... |
d47e2ff0fc17ffc0027a4a5609d0f4b8a54fe3d2 | 973bab2416bd63b5398aace0bdf72584af6de2e4 | AdriVC/ExamenLaboProgra3_CobroImpuestos | /AduanasLaMorsa/historial.cpp | C++ | cpp | 603 | no_license | #include "historial.h"
#include "ui_historial.h"
#include <string>
using std::string;
Historial::Historial(string historial, QWidget *parent) :
QDialog(parent),
ui(new Ui::Historial)
{
ui->setupUi(this);
//background
QPixmap bkgnd(":/Logo.png");
bkgnd = bkgnd.scaled(this->size(), Qt::IgnoreAspe... |
12593c91390944f85c412e7aaa399ddec13224a1 | 32a00b326bc27d9566778d882e16d4302cd4330c | takeuchiwataru/Team_Nagayama | /豊平上空物語/tutoriallogo.cpp | C++ | cpp | 3,564 | no_license | //=============================================================================
//
// チュートリアルロゴの処理 [tutoriallogo.cpp]
// Author : 竹内亘
//
//=============================================================================
#include "tutoriallogo.h"
#include "renderer.h"
#include "fade.h"
#include "input.h"
#include "resource... |
4244b7435cc6bc2018484809515f494c131e202b | bb66f695c5d82ec8404089494febe63b475c3938 | MedoN11/CompetitiveProgramming | /TopCoder/SRM331-D1-500.cpp | C++ | cpp | 2,185 | no_license |
#include <iostream>
#include <cstdio>
#include<list>
#include<iomanip>
#include<cmath>
#include<queue>
#include <functional>
#include<stdio.h>
#include<assert.h>
#include<stack>
#include<sstream>
#include <cstdlib>
#include<map>
#include<algorithm>
#include<iostream>
#include<set>
#include<utility>
#include<memory.h>
... |
749c06cb17de924933ea27e213c9f770cf70d8c6 | 06f03df3829743b40af8c9cab3558aba0e553545 | gitpan/mojprogram | /Contact.cpp | C++ | cpp | 803 | no_license | #include <iostream.h>
#include "Contact.h"
Contact::Contact( string fn, string ln, string e, string phNum) {
setFirstName(fn);
setLastName(ln);
setEmail(e);
setPhoneNum(phNum);
}
Contact* Contact::create( string fn, string ln, string em, string phn) {
return new Contact(fn,ln,em,phn);
... |
9dd54afda1f77fe3e8a6c39660482235f6d4bc9a | 3592af7c93df0190aacd7723e0f7970358ca927c | tanxuezhi/VAPOR | /apps/vaporgui/PythonVariables.cpp | C++ | cpp | 36,247 | no_license | #include "PythonVariables.h"
#include "ui_PythonVariablesGUI.h"
#include <ctime>
#include <fstream>
#include <QDebug>
#include <QLineEdit>
#include <QThread>
#include <QFileDialog>
#include <QStandardItemModel>
#include <vapor/DC.h>
#include "vapor/ResourcePath.h"
#include "ErrorReporter.h"
#include "FileOperationCh... |
2ee57362a0e2e64bea3ed32c7e4a141f0c2db3ed | ef85eedf07241ec70165be68b7f7ea5e916860b3 | GarlandChaos/TessellationOpenGL | /Garland/Group.cpp | C++ | cpp | 426 | no_license | #include "Group.h"
Group::Group() {
}
Group::~Group() {
}
void Group::setFaces(vector<Face> faces) {
this->faces = faces;
}
vector<Face>& Group::getFaces() {
return faces;
}
void Group::setName(string name) {
this->name = name;
}
string Group::getName() {
return name;
}
void Group::setMaterialID(string... |
ad5dd9fc5b075045fc5dc34535b54cee1f7f983e | 2a7f8a0ad674d71cd2b015b9023193edefafe27d | tapanmeena/Online-Judges | /HackerRank/Data Structures/Get Node Value.cpp | C++ | cpp | 773 | no_license | // Complete the getNode function below.
/*
* For your reference:
*
* SinglyLinkedListNode {
* int data;
* SinglyLinkedListNode* next;
* };
*
*/SinglyLinkedListNode* reversing(SinglyLinkedListNode* n){
SinglyLinkedListNode *prev=NULL;
SinglyLinkedListNode *next=NULL;
SinglyLinkedListNode *curr=n;
if... |
5be524f94f1d952626d11f9e73111b7a855704b0 | a10ff7fbd7e9611ea94e04d8be3f076a4d39b501 | mmanley/Antares | /antares/src/system/kernel/disk_device_manager/KPartitioningSystem.cpp | C++ | cpp | 10,463 | no_license | /*
* Copyright 2003-2007, Antares, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold <bonefish@cs.tu-berlin.de>
* Lubos Kulic <lubos@radical.ed>
*/
/** \file KPartitioningSystem.cpp
*
* \brief Implementation of \ref KPartitioningSystem class
*/
#incl... |
9e5866cec9d7d79d4b2acc754d433c458c6ba5fb | 57df0d47ede959efa427a4f5d1be84679d2a4bd9 | 1011497938/humanoid-lib | /src/darknetcxx/include/darknetcxx/section.hpp | C++ | hpp | 2,103 | no_license | /**
* @Author: Yusu Pan <yuthon>
* @Date: 2017-03-13T11:41:29+08:00
* @Email: xxdsox@gmail.com
* @Project: Dancer2017
* @Filename: section.hpp
* @Last modified by: yuthon
* @Last modified time: 2017-03-13T11:41:31+08:00
* @Copyright: ZJUDancer
*/
#pragma once
#include <algorithm>
#include <map>
#include <string>
... |
e7ed50b600e0350eacb641d17350b78672a55b8d | 6e8460df578becc0b1a715c50e5da54d0eb9b6e6 | NXROBO/spark | /src/spark_driver/lidar/ydlidar_g2/sdk/src/CYdLidar.cpp | C++ | cpp | 18,344 | permissive | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2018, EAIBOT, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condi... |
3772216149fbf570f0e30d27436f6efdf941c38f | dc5105c4622f04532d6ba7da9fa6e9cebf640521 | logic-life/LeetCode | /LC1319_Number of Operations to Make Network Connected_Disjoint Set.cpp | C++ | cpp | 1,609 | no_license | class DisjointSet { // 并查集模板
private:
vector<int> father;
int rest; // 统计剩余线个数
int count; // 统计连通分量个数
public:
DisjointSet(int n) : father(vector<int>(n)), rest(0), count(n) {
for (int i = 0; i < n; i++) {
father[i] = i;
}
}
int find(int x) {
retu... |
0c2fb1d62f40bcac7ccdbb80e894ff86b2002991 | e601300fb7485fca159297706c60830885a14102 | gemtara/libxcam | /wrapper/gstreamer/gstxcamsrc.cpp | C++ | cpp | 55,888 | permissive | /*
* gstxcamsrc.cpp - gst xcamsrc plugin
*
* Copyright (c) 2015 Intel Corporation
*
* 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... |
0cc49d610236b4d1491078ff22e1809bbdb330d3 | 56ae5f2dfcf4fb4c684a5d649d3587e6f418916b | iamsile/ACM | /Biorhythms.cpp | C++ | cpp | 3,037 | no_license | #include <iostream>
using namespace::std;
int main()
{
int a,b,c,d,i,num,k=1;
while(cin >> a >> b >> c >> d&&a!=-1&&b!=-1&&c!=-1&&d!=-1)
{
if(a>=23)
a%=23;
if(b>=28)
b%=28;
if(c>=33)
c%=33;
for(i=0;i<=21252;i++)
{
num=i+d;
if(num%23==a&&num%28==b&&num%33==c&&num!=d)
break;
}
cout <<... |
55d2ef1b8e00147a26cc99418615c11b0e6f707f | cc16b790d2b1587af59f4abbff832743ebe75fa5 | SakshiWadhwa/DS | /stack_class.cpp | C++ | cpp | 1,081 | no_license | #include<iostream>
using namespace std;
class stack{
public:
int top ;
int *arr;
int size;
stack()
{
int i;
top = -1;
cout<<"enter stack size"<<endl;
cin>>size;
arr = new int[size];
for(i = 0 ; i < size; i++)
arr[i] = 0;
top = -1;
}
... |
af65faf5338f5e64a7bf454a5d40a424ddef64ff | 33ce9be932eca76a0cc321a69b09f1bb621303ff | greearb/vocal-ct | /sip/sipstack/SipHeader.cxx | C++ | cxx | 17,413 | permissive | /* ====================================================================
* The Vovida Software License, Version 1.0
*
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following ... |
a1b867e151be5970f22676b80bedbbb92b120b5b | 6e158d373ef95d3e83f8ba24d57929a3ef5d1652 | bigYellowDuck/Cpp11_muduo | /tpc/InetAddress.cpp | C++ | cpp | 1,773 | no_license | #include "InetAddress.h"
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
InetAddress::InetAddress(const std::string &ipPort)
{
auto colon = ipPort.find(':');
if (colon == std::string::npos)
{
fprintf(stderr, "string ipPort error");
exit(1);
}
uint16_t port = static_c... |
7305f239af787fe6a00b12dbf5c5daf5fa808515 | 8ca0c790b56a1ae67b204f156fdc2f6702cccee8 | coolblaze03/ts3lol | /networkHeaders/Samples/Client File Verification/ClientFileVerification.cpp | C++ | cpp | 5,745 | no_license | // ----------------------------------------------------------------------
// RakNet version 1.405
// ClientFileVerification.cpp
// Created by Rakkar Software (rakkar@jenkinssoftware.com) December 1, 2003
// Shows how to verify that a file on the client matches a file on the server.
// -----------------------------... |
be12641fce7d72879419e972a15ad6c5761707c3 | 46a8c0838a892a01ac44577a02c3d31b67d22807 | Xtended-Devices/device_oneplus_sm8150-common | /fod/FingerprintInscreen.cpp | C++ | cpp | 6,683 | no_license | /*
* Copyright (C) 2019 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... |
07c9c2867ae9067ba8894c17f3b64dad89a5e60a | b2d9afc2eeb05c5901645fa7eb9cdb9c33e9bcdd | Georgiy-Timoshin/X-Ray | /src/xrEngine/xrGame/Artifact.cpp | C++ | cpp | 16,219 | permissive | #include "stdafx.h"
#include "artifact.h"
#include "PhysicsShell.h"
#include "PhysicsShellHolder.h"
#include "game_cl_base.h"
#include "../skeletonanimated.h"
#include "inventory.h"
#include "level.h"
#include "ai_object_location.h"
#include "xrServer_Objects_ALife_Monsters.h"
#include "phworld.h"
#include "restriction... |
5af9830f6f92df2b0766498991146adb2cbcbde5 | 3588811334b9f5d329a7c9e171232f1b9709f835 | snailbaron/vollo | /src/vollo/controller.cpp | C++ | cpp | 1,059 | no_license | #include "controller.hpp"
#include <utility>
Controller::Controller(
std::weak_ptr<Control> control,
const config::client::ControlScheme& controlScheme)
: _control(std::move(control))
, _scheme(controlScheme)
{ }
void Controller::processEvent(const sf::Event& event)
{
auto control = _cont... |
45e5d12d931655cdec2222eec3d1cb6b596dfa99 | 50ac008b30e9e122f0c237824cc91ac8d2f1d3ed | ramungen/OpenGL-rendering-framework | /Core/Texture.cpp | C++ | cpp | 1,278 | no_license | #include "Texture.h"
#include "stb_image.h"
#include <string>
#include <exception>
Texture2D::~Texture2D() {}
void Texture2D::Load(const char* path) {
glGenTextures(1, &this->textureID);
int width, height, nrComponents;
unsigned char* data = stbi_load(path, &width, &height, &nrComponents, 0);
if (data) {
GLen... |
228ae7f9482a2ab47eb4131a0c4d4fe74e6bce2b | 4cb72ac80d226763dbf33de3bb473f26413bcf76 | MautKaFarishta/Competitive_Programming | /Practice/techMahindra.cpp | C++ | cpp | 373 | no_license | #include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<bitset>
#include<algorithm>
using namespace std;
#define fi(i,N) for(int i=0;i<N;i++)
#define fd(N,i) for(int i=N-1;i>=0;i--)
#define ll long long
int main(){
int N,ans=0;
cin>>N;
int A[N];
fi(i,N){
cin>>A[i];
}
fi(i,N-1){
... |
cbc13faf344729a4f5a87aab60ab9064346b6a09 | d2f8df11c6feeace2dda2d2994ce3063c662b451 | pbraga88/study | /2022/CPP-01_ConceptsReview/19_IO-AndStreams/06_WritingToA-TextFile/copy_file.cpp | C++ | cpp | 840 | no_license | // Section 19
// Copy File 2
// File copy using get/put
#include <iostream>
#include <fstream>
#include <string>
int main() {
std::ifstream in_file {"poem.txt"};
std::ofstream out_file{"poem_out.txt"};
if (!in_file) {
std::cerr << "Error opening input file" << std::endl;
return 1;
}
... |
06039563c032af8a12e49e5f7895bcdcea0af0a5 | 7ca9ed77ea7b3e9a2fb5c71187656bf6d727a906 | razvanra2/laboratoare_spg | /Laborator4/Laborator4.cpp | C++ | cpp | 7,182 | no_license | #include "Laborator4.h"
#include <vector>
#include <iostream>
#include <stb/stb_image.h>
#include <Core/Engine.h>
using namespace std;
// Order of function calling can be seen in "Source/Core/World.cpp::LoopUpdate()"
// https://github.com/UPB-Graphics/SPG-Framework/blob/master/Source/Core/World.cpp
Laborator4::La... |
b289b065d19a6a686b43bc920f4457384b57575e | 4cbee50dabc18485e476d0704328d481cf73bd54 | hophacker/algorithm_coding | /POJ/2310/10377461_WA.cc | C++ | cc | 3,965 | no_license | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <string.h>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <queue>
#include <stack>
#include <ctime>
#include ... |
125f34468d549d3f898a1c469fd6c67b2b8db459 | a6ab30424d187212ab0c4f8f0f67ead8bde20c7a | bootupthink/BoardGame | /BoardGame/BoardGame/Cell.cpp | C++ | cpp | 1,139 | no_license | #include "pch.h"
#include "Cell.h"
Cell::Cell(Color color, Color origin)
{
this->color = color;
this->Origin = origin;
cell[0] = ' ';
cell[1] = ' ';
}
void Cell::SetPrintingColor(Color color)
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), color | (color << 4));
}
void Cell::ChangeCol... |
6a386ceeb5f54f75d3042f730b5e569039e83679 | 9d6967c3754761fdcee6d2ec789ba7bd9db088e7 | Tobi-Nightheart/DirectX | /DX11 Framework rebuild/DX11 Framework rebuild/src/Main.cpp | C++ | cpp | 11,266 | no_license | #pragma once
#include "pcH.h"
#include "GameTimer.h"
#include "SceneManager.h"
#include <string>
//Globals
HINSTANCE g_hInst = nullptr;
HWND g_hWnd = nullptr;
D3D_DRIVER_TYPE g_driverType = D3D_DRIVER_TYPE_NULL;
D3D_FEATURE_LEVEL g_featureLevel = D3D_FEATURE_LEVEL_11_1;
Microsoft::WRL::ComPtr<ID3D11Device> g_pDevice ... |
43d9d8332365ef4874ceb239e714898430b6d441 | 1a7e6306c4c2bc64670d8e9ccc17eef919b80805 | dakodun/uair | /inc/uair/fbo.hpp | C++ | hpp | 2,448 | permissive | /* **************************************************************** **
** Uair Engine
** Copyright (c) 2010 - 2017, Iain M. Crawford
**
** This software is provided 'as-is', without any express or
** implied warranty. In no event will the authors be held liable
** for any damages arising from the use of this software.
... |
22b72ab96d8daf0aa9d9f1a2c2afed9c80460004 | 7717230cd22b9fbeadd243db79bd5003b64cf8ab | keyuzh/ics46 | /proj1/include/darkmaze/MazeException.hpp | C++ | hpp | 699 | no_license | // MazeException.hpp
//
// ICS 46 Winter 2021
// Project #1: Dark at the End of the Tunnel
//
// Exception thrown when interacting with a Maze object in ways that are
// invalid (e.g., removing a non-existent wall or trying to create a maze
// with an invalid size like 0x0).
#ifndef MAZEEXCEPTION_HPP
#define MAZEEXCEP... |
f2f682c608261f475101201784ace75049878239 | 87008cfbc6fee511126f72c475e15d74cd99a52d | PillVic/ACM | /HDU/2187/2187/源.cpp | C++ | cpp | 1,247 | no_license | #include<iostream>
#include<iomanip>
#include<algorithm>
using namespace std;
typedef struct {
int perCost;
int capacity;
}shop;
bool IsCheap(shop a, shop b) {
return a.perCost < b.perCost;
}
shop* buildTable(int Kinds);
double buyRice(int Money, shop shops[], int shopsNumber);
int main() {
int Cases;
while (ci... |
f6265e8d0777c9cbd051d39a53874e6f69cd1c77 | 6c2d3f9407f37b804cc22f97e7adcd98a7e75269 | linnitel/cpp_pool | /day04/ex01/EvilBabushka.cpp | C++ | cpp | 481 | no_license |
#include "EvilBabushka.hpp"
EvilBabushka::EvilBabushka(): Enemy(20, "Baba Nadya") {
std::cout << MAGENTA << "* Vas tut ne stoyalo! *" << RESET << std::endl;
}
EvilBabushka::~EvilBabushka() {
std::cout << MAGENTA << "* Oh oh oh *" << RESET << std::endl;
}
EvilBabushka::EvilBabushka(EvilBabushka const &baba): Enem... |
a2bce0607a657a321da45262a0c1dae9147a8556 | 06409d5315f3c42c4e24a64cd230b0cb6deb9132 | Tencent/mars | /mars/boost/thread/shared_lock_guard.hpp | C++ | hpp | 1,251 | permissive | // Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// (C) Copyright 2012 Vicente J. Botet Escriba
#ifndef BOOST_THREAD_SHARED_LOCK_GUARD_HPP
#define BOOST_THREAD_SHARED_LOCK_GUARD_HPP
#include <boost/thread/detail/... |
aa09ca3cbbd294090e09e9f8c8ba25b7419cad09 | 584ac100777a0e3fd24633519cda9beb45312a18 | trishacho/CPlusPlus-Projects | /Year 1 (Data Structures, Loops, & Conditionals)/Various Projects/Exponential Equation/Exponential Equation Midterm.cpp | C++ | cpp | 488 | no_license | #include<iostream>
using namespace std;
int main()
{
double x1, y1, x2, y2;
cout << "Please enter a y-intercept and a point." << endl;
cin >> x1 >> y1;
cin >> x2 >> y2;
double a = y1;
double b = y2/y1;
cout << "y=" << a << "(" << b << ")" << "^x" << endl;
if... |
41414d0f3357f32cc436d18e10dce3a3e6175833 | 69f8dab3fb38f31d95347ac9a5a80e9194c8ab11 | weblifeio/chromium | /chromeos/ash/components/network/policy_util.cc | C++ | cc | 17,523 | permissive | // Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chromeos/ash/components/network/policy_util.h"
#include <memory>
#include <utility>
#include "base/logging.h"
#include "base/notreached.h"
#include "base/values.h"
... |
60ec2f4da02796f6df79df30f941e4cd4a0d516d | eab9d7d929f58d638085496c8cc52b7e346f3385 | openvinotoolkit/openvino | /src/frontends/onnx/onnx_common/src/utils.cpp | C++ | cpp | 4,307 | permissive | // Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "onnx_common/utils.hpp"
#include <onnx/onnx_pb.h>
#include <algorithm>
#include "ngraph/except.hpp"
namespace ngraph {
namespace onnx_common {
size_t get_onnx_data_size(int32_t onnx_type) {
switch (onnx_type) {
... |
d44094b6f7866528da12d523ec7ad7b31dbd844a | cf2cb7548a791ac113de195b390fe96cca320212 | littlelid/OJ | /jobdu/1086.cpp | C++ | cpp | 1,084 | no_license | #include<cstdio>
#include<iostream>
#define INF 99999999999999
using namespace std;
long long L1, L2, L3, C1, C2, C3;
long long get_cost(long long dis);
int main(void)
{
int A, B;
int N;
while(cin >> L1)
{
cin >> L2 >> L3 >> C1 >> C2 >> C3;
cin >> A >> B;
cin >> N;
... |
6e706552bdb56038360d44d7b1d3cb743818c44b | 190ead2ba5eeaaeb5d77cbcaf03204a448ab5fc3 | mld-cih/chrome_deps | /chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc | C++ | cc | 20,628 | 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/browser/ui/views/frame/browser_non_client_frame_view_ash.h"
#include "ash/wm/frame_painter.h"
#include "ash/wm/workspace/frame_maxim... |
79bb482b6bc34d7d3e63f1362564c55cc24e770a | 92bb1ba1112fa995cc42d7b8c1ef0108fde25e85 | 3pointer/ACM-ICPC | /3pointer's Submit/codeforces/335/d3.cc | C++ | cc | 983 | no_license | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int N = 1e5 + 5;
const int mod = 0;
const int base = 1000 * 1000 + 3;
const int oo = 1e9 + 9;
int read() { int x; cin >> x; return x; }
pair<pii, int> p[N];
pii q[N << 2];
int h, t;
pii ans[N];
int main() {
i... |
4a3b34bec5016b57d56823b842d2ccebaa5cf03b | fb731f6ab5ceb6f80f9eee4d18c447a1b5254b7a | DeepBrainChain/DBC-AIComputingNet | /test/unittest/unittest_core/module_manager_test.cpp | C++ | cpp | 501 | no_license |
#include <boost/test/unit_test.hpp>
#include "module_manager.h"
#include "error.h"
using namespace boost::unit_test;
using namespace std;
BOOST_AUTO_TEST_CASE(test_module_manager) {
matrix::core::module_manager mg;
bpo::variables_map v;
int32_t r = mg.init(v);
matrix::core::module m1;
auto... |
8a42bfa22a4eb1e5b870a3893cbe3ced96faa78e | b6ea2591923a559142cf0cd45ccee467eaf43ccb | whu404/acm | /exercise-5-9-Bug-Hunt-UVa1596.cpp | C++ | cpp | 3,249 | no_license | //
// Created by luerfeng on 2016/01/17.
// Description:
// copyright (c) luerfeng 2016, all rights reserved
//
#include <iostream>
#include <map>
#include <stack>
#include <vector>
std::map<std::string, int> variable_size_map;
std::map<std::string, int> variable_value_map;
std::vector<std::string> cmd;
std::string g... |
7a49cdbc8e6ad4d5b8b7affc02b600826d9b2f67 | 52b3b38b08cfc56e9a9d01533beab1717603833f | Satyamnewi/C-_Competitive_Programming | /29.cpp | C++ | cpp | 282 | no_license | //Codechef - FCTRL
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--)
{
int x,sum=0,j=1;
cin >> x;
while(x/pow(5,j)>0)
sum=sum+(x/pow(5,j++));
cout << sum << endl;
}
return 0;
} |
8da8354cbb6a5c57cfb6b524cb6fd043f517b9bf | c45af9ac814b2aa1620ad8c8da22e1112257573e | vayneli/1230background | /libBase/src/base_thread.cpp | C++ | cpp | 1,448 | no_license | #include "base_thread.h"
void* BaseThread::run1()
{
threadStatus = THREAD_STATUS_RUNNING;
tid = pthread_self();
run();
threadStatus = THREAD_STATUS_EXIT;
tid = 0;
pthread_exit(NULL);
}
BaseThread::BaseThread()
{
tid = 0;
threadStatus = THREAD_STATUS_NEW; ... |
9ed1a91f353e4b3d47375984252260e092f5dc5d | d23af5e5c60319c67fa71efe2c158f6e45e1b1c1 | brunolauze/chromeos-stable | /x11/chromeos-stable/files/patch-content__browser__renderer_host__pepper__pepper_file_io_host.cc | C++ | cc | 1,166 | permissive | --- ./content/browser/renderer_host/pepper/pepper_file_io_host.cc.orig 2014-03-04 03:17:47.000000000 +0100
+++ ./content/browser/renderer_host/pepper/pepper_file_io_host.cc 2014-03-07 14:10:33.000000000 +0100
@@ -308,10 +308,12 @@
int64_t actual_offset =
(open_flags_ & PP_FILEOPENFLAG_APPEND) ? max_writte... |
1a3b241321c1cd571dce9185a7697ed9c527b568 | bae5638737faf73146366cbb0393bad804d720a3 | jtrojok/Smilei | /src/ElectroMagn/LaserPropagator.cpp | C++ | cpp | 22,904 | no_license | #include "Tools.h"
#include "Params.h"
#include "LaserPropagator.h"
#include "Field2D.h"
#include "Field3D.h"
#include "H5.h"
#include <cmath>
#include <string>
#include <complex>
#include <algorithm>
using namespace std;
// equivalent of the numpy function fftfreq
// start or stop define a range where the array is ... |
372980c95a3a0f59626ae5049c5f17a5ea09005a | ebb199abe8d2b7e4c21ffe27b305a836d1c267bc | decltypeme/mlpack | /src/mlpack/methods/ann/network_traits.hpp | C++ | hpp | 1,207 | permissive | /**
* @file network_traits.hpp
* @author Marcus Edel
*
* NetworkTraits class, a template class to get information about various
* networks.
*/
#ifndef __MLPACK_METHODS_ANN_NETWORK_TRAITS_HPP
#define __MLPACK_METHODS_ANN_NETWORK_TRAITS_HPP
namespace mlpack {
namespace ann {
/**
* This is a template class that c... |
4c638c73058ef49f6c5a31c4a80c52bd180838ec | 0077cf5d29cebb61551e2220d59ec0b370f5b189 | ashutosh0gupta/llvm_bmc | /examples/litmus/c/run-scripts/tmp_10/3.SB.c.cbmc.cpp | C++ | cpp | 50,827 | no_license | // Global variabls:
// 0:vars:3
// 3:atom_0_X2_0:1
// 4:atom_1_X2_0:1
// 5:atom_2_X2_0:1
// Local global variabls:
// 0:thr0:1
// 1:thr1:1
// 2:thr2:1
#define ADDRSIZE 6
#define LOCALADDRSIZE 3
#define NTHREAD 4
#define NCONTEXT 10
#define ASSUME(stmt) __CPROVER_assume(stmt)
#define ASSERT(stmt) __CPROVER_assert(stmt,... |
b391fa9dfc2b86914641bdd9a7fc108c87347d16 | efb150f65bc0abfd852cdbd1b4bc78d185734ed8 | esraatlici/C | /kuyruk_ilk_deneme.cpp | C++ | cpp | 936 | no_license | h#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#define boyut 5
int kuyruk[boyut],front=-1,rear=-1;
void enQueue(int veri)
{
if(front==boyut-1)
{
printf("\nKuyruk dolu\n");
}
else
{
front=front+1;
rear=rear+1;
kuyruk[rear]=veri;
}
}
void deQueue()
{
if(front==-1)
{
... |
d36ff1a8418b9e287980f71f236d93c8a57b8d7d | 6d6730a19d0a840d8bbe964c4a3961625228d3ce | tryingtokeepup/JA2-1.13 | /Build/Tactical/Rotting Corpses.cpp | C++ | cpp | 87,613 | no_license | #ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
#include "builddefines.h"
#include <stdio.h>
#include <string.h>
#include "wcheck.h"
#include "stdlib.h"
#include "debug.h"
//#include "soldier control.h"
#include "weapons.h"
#include "handle items.h"
#include "worlddef.h"
#include "wor... |
9156b62787ebc4b5cbc0040f14fc809368885e56 | bba6a2a3f530ba159b85afbd0c083a702ef07f66 | Margen67/blamod | /sp/src/game/shared/sdk/weapon_sdkbase.cpp | C++ | cpp | 4,146 | permissive | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "in_buttons.h"
#include "takedamageinfo.h"
#include "weapon_sdkbase.h"
#include "amm... |
94c82f063768b23105d55a283c0aab5cc097608f | 62ae9ab006657d6c56434139d8a42c907ce966b2 | josicann/Git-Test | /main.cpp | C++ | cpp | 1,043 | no_license | /* Author: Joshua Cannon
* File Name: main.cpp
* Description: Simple program to practice using git for assignment 8 in CSCI 325 Data Structures.
*/
#include<iostream>
using namespace std;
/******FORWARD DECLARATIONS***********/
int sum(int n);//A method to sum all integer values from 1 to a number provided by us... |
9a3ae2ae0dbf9ea85210ea7f16db1bfbcaddceef | 932403e1811ee6803b9ec28687563b745c1925bd | nitin-nizhawan/incubator | /prjs/prog/prblm/usaco/section2.1/hamming/hamming.cpp | C++ | cpp | 1,451 | no_license | /*
ID: nitin.n1
PROG: hamming
LANG: C++
*/
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
using namespace std;
int ans[1000];
int count1=0;
int hash[1000]={0};
int tmp[1000];
char ansstr[20];
char* pbit(int a,int b){
int len=0;
while(len<b){
if(a&(1<<len)){
an... |
1a903e8b21231a9aa796113101aebde92d23185e | bd033e2ec9a9dc1d424499429e6bbc6d04ebfb52 | kkyehit/Algorithm2 | /Backjoon/18253/src.cpp | C++ | cpp | 1,736 | no_license | #include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <cstring>
#include <vector>
#include <queue>
#define MAX_N 5
#define MAX_M 100000
using namespace std;
typedef long long int int64;
const int d[4][2] = {{1, 0},{-1, 0},{0, 1},{0, -1}};
int64 graph[MAX_N][MAX_M];
int64 isVisited[MAX_N][MAX_M];
int N,... |
383df5a97edc874900b9c7e924f36035623d1139 | 395821ee837c83876e394367c5069507c628c5c0 | jhlee94/Space_Farm-Power_of_Paint | /Game/Game/Source/AI/Bot.cpp | C++ | cpp | 269 | permissive | #pragma once
#include <Phyre.h>
#include <Navigation\PhyreNavigation.h>
#include "Bot.h"
//
// Bot implementation
//
// Description:
// The constructor for the Bot class.
Bot::Bot()
: m_navigationComponent(NULL)
, m_navigationTarget(NULL)
, m_worldMatrix(NULL)
{
} |
5b780f3ff394104e5a1fd8b515e69355dd947b5f | 69117638c35cff2843584aa2f7f8eca1da016f06 | Turjo7/Algorithms | /Dijektra Remix Version.cpp | C++ | cpp | 3,388 | no_license | #include<stdio.h>
#include<limits.h>
#define maxVertices 100
typedef struct Node
{
int vertex,distance;
}Node;
Node heap[1000000];
int seen[maxVertices];
int heapSize;
void Init()
{
heapSize = 0;
heap[0].distance = -INT_MAX;
heap[0].vertex = -1;
}
void Insert(Node element)
{
... |
b373001f39433d82aa47fc1044c6b5c0e3fca446 | d184e966c11d12e514d586e48cfa8f573fd424a3 | cpmech/vismatrix | /src/boost/xpressive/proto/proto_fwd.hpp | C++ | hpp | 23,987 | permissive | ///////////////////////////////////////////////////////////////////////////////
/// \file proto_fwd.hpp
/// Forward declarations of all of proto's public types and functions.
//
// Copyright 2008 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or ... |
3a0f41ebff06183b2ebea731acf32d06a431fb95 | 3f95966159573f86950ad7f2fc6ee4865c68a487 | Mrinal18/August-LeetCoding-Challenge | /Week5/3. Delete Node in a BST.cpp | C++ | cpp | 3,310 | no_license | /*
Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.
Basically, the deletion can be divided into two stages:
Search for a node to remove.
If the node is found, delete the node.
Note: Time complexity should be O(... |
f424444a4ad505e6895b105647a25992ac157a6e | 082f168ce6f6c93d2af882f730422fb075bb2105 | Kanav-7/Legends-of-Zelda-OpenGL | /src/boat.cpp | C++ | cpp | 8,687 | no_license | #include "boat.h"
#include "main.h"
Boat::Boat(float x, float y,float z, color_t color) {
this->position = glm::vec3(x, y, z);
this->rotation = 0;
this->speed = glm::vec3(0,0,0);
// Our vertices. Three consecutive floats give a 3D vertex; Three consecutive vertices give a triangle.
// A cube has 6 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.