text string | size int64 | token_count int64 |
|---|---|---|
//
// MileStone.cpp
// StartupsViz
//
// Created by Mathur, Arpit on 7/18/13.
//
//
#include "MileStone.h"
| 111 | 58 |
// Copyright (C) 2018 David Reid. See included LICENSE file.
typedef ocComponent* (* ocCreateComponentProc)(ocEngineContext* pEngine, ocComponentType type, ocWorldObject* pObject, void* pUserData);
typedef void (* ocDeleteComponentProc)(ocComponent* pComponent, void* pUserData);
struct ocComponentAllocatorIns... | 1,405 | 401 |
/*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and... | 6,653 | 2,300 |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2015, Arthur N. Klassen
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions... | 20,235 | 8,290 |
/*******************************************************************************
* Copyright 2003 & onward LASMEA UMR 6602 CNRS/Univ. Clermont II
* Copyright 2009 & onward LRI UMR 8623 CNRS/Univ Paris Sud XI
*
* Distributed under the Boost Software License, Version 1.0.
* ... | 1,770 | 495 |
/*
* D3D12CommandContext.cpp
*
* This file is part of the "LLGL" project (Copyright (c) 2015-2018 by Lukas Hermanns)
* See "LICENSE.txt" for license information.
*/
#include "D3D12CommandContext.h"
#include "../D3D12Resource.h"
#include "../../DXCommon/DXCore.h"
namespace LLGL
{
void D3D12CommandContext::Set... | 2,820 | 910 |
class CfgAmmo {
class BulletBase;
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
caliber = 6;
};
}; | 115 | 60 |
/*
* Copyright (c) Fouad Valadbeigi (akoylasar@gmail.com) */
#include "Mesh.hpp"
#include <cmath>
#include "Debug.hpp"
namespace Akoylasar
{
constexpr double kTwoPi = Neon::kPi * 2.0;
std::unique_ptr<Mesh> Mesh::buildSphere(double radius,
unsigned int hSegments,
... | 7,911 | 3,502 |
/**
* @file PathSymbols.cpp
*
* @author <a href="mailto:akcayyig@hu-berlin.de">Yigit Can Akcay</a>
*/
#include "PathSymbols.h"
void PathSymbols::registerSymbols(xabsl::Engine& engine)
{
// PathPlanner2018Routine
engine.registerEnumElement("path2018.routine", "path2018.routine.none", static_cast<... | 2,567 | 896 |
#include "InetUtils.h"
//-----------------------------------------------------------------------------
#ifdef _WIN32
#include <winsock2.h>
#else
#include <arpa/inet.h>
#endif
//-----------------------------------------------------------------------------
namespace ratel
{
//-----------------------------------... | 730 | 172 |
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2020 NovAtel Inc.
//
// 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 restrictio... | 3,800 | 1,142 |
//
// Created by Harold on 2021/11/17.
//
#pragma warning(disable : 4996)
#pragma warning(disable : 4819)
#include <boost/filesystem.hpp>
#include <boost/thread/thread.hpp>
#include <pcl/common/transforms.h>
#include <pcl/features/normal_3d.h>
#include <pcl/io/obj_io.h>
#include <pcl/io/ply_io.h>
#include <pcl/kdtre... | 7,574 | 2,943 |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... | 2,134 | 768 |
#include "tic_tac_toe_manager.h"
TicTacToeManager::TicTacToeManager(TicTacToeData & data)
{
games = data.get_games();
for (auto& game : games)
{
update_winner_count(game->get_winner());
}
}
void TicTacToeManager::save_game(unique_ptr<TicTacToe> & game)
{
update_winner_count(game->get_winner());
games.push_b... | 993 | 456 |
#include "animation.hpp"
//////////
// Code //
// Calculating the current frame index.
unsigned int Animation::calcCurrentFrameIndex() const {
int frame = this->timer->getTime() / frameLength;
if (frame >= this->textures.size())
return this->textures.size() - 1;
return frame;
}
// Creating a new ... | 1,809 | 520 |
//
// Created by jacko on 20/01/17.
//
#include "LWM2MObject.h"
char *LWM2MObject::getObjectName() const {
return ObjectName;
}
void LWM2MObject::setObjectName(char *ObjectName) {
LWM2MObject::ObjectName = ObjectName;
}
ObjectIDType LWM2MObject::getObjectID() const {
return ObjectID;
}
void LWM2MObject... | 885 | 327 |
#include "erhe/scene/viewport.hpp"
#include "erhe/scene/log.hpp"
#include "erhe/toolkit/math_util.hpp"
namespace erhe::scene
{
auto Viewport::unproject(
const glm::mat4 world_from_clip,
const glm::vec3 window,
const float depth_range_near,
const float depth_range_far
) const -> std::optional<g... | 1,139 | 385 |
#include "PROPOSAL/scattering/Coefficients.h"
//----------------------------------------------------------------------------//
//-----------------------------Coefficients-----------------------------------//
//---for calculating the power series approximation of the moliere function---//
//---------------------------... | 14,473 | 8,423 |
/**
@file PlotUpdateThread.cpp
@author Lime Microsystems
@brief Class for updating fft data plots
*/
#include "PlotUpdateThread.h"
#include <stdio.h>
#include "pnlFFTviewer.h"
#include "CommonUtilities.h"
#include "SamplesCollector.h"
#include <vector>
#include <wx/time.h>
using namespace std;
const int CHANNEL_COUNT... | 8,567 | 2,906 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
struct point {
double x;
double y;
};
std::ostream& operator<<(std::ostream& os, const std::vector<point>& points) {
for (auto p : points) {
os << "(" << p.x << ", " << p.y << ")\n";
}
return os;
}
double ccw(const point& a, co... | 2,299 | 804 |
// ComDirver.cpp: implementation of the CComDirver class.
//
//////////////////////////////////////////////////////////////////////
#include "vm8051.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "hash.h"
#include "key.h"
#include "main.h"
#include <openssl/des.h>
#include <vector>
#include "... | 77,794 | 39,876 |
/*
* Copyright (c) 2018, Stefan Osswald
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of cond... | 3,561 | 1,447 |
#include "milxQtDICOMPlugin.h"
#include <qplugin.h>
milxQtDICOMPlugin::milxQtDICOMPlugin(QObject *theParent) : milxQtPluginInterface(theParent)
{
///Up cast parent to milxQtMain
MainWindow = qobject_cast<milxQtMain *>(theParent);
//~ threaded = false;
//~ dockable = false;
//~ consoleWindow = fal... | 4,403 | 1,562 |
/**
* Task 1.1
* Write a program calculating area of the rectangle. The
* values of sides a and b are float, so is the area. Display
* the result with precision of two decimal places.
**/
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
float a, b, area;
cout << "Enter side a" <<... | 548 | 180 |
// Memory card support module
#include "burner.h"
static TCHAR szMemoryCardFile[MAX_PATH];
int nMemoryCardStatus = 0;
int nMemoryCardSize;
static int nMinVersion;
static bool bMemCardFC1Format;
static int MakeOfn()
{
memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hScrnWnd;
ofn.lps... | 6,127 | 2,919 |
class Solution {
public:
int XXX(string s) {
if(s.find("IV")!=s.npos)
s = s.replace(s.find("IV"),2,"a");
if (s.find("IX") != s.npos)
s = s.replace(s.find("IX"), 2, "b");
if (s.find("XL") != s.npos)
s = s.replace(s.find("XL"), 2, "c");
if (s.find("XC") != s.npos)
s = s.replace(s.find("XC"), 2, "d");
... | 1,027 | 598 |
//!
//! @file jbr/reg/var/perm/Rights.hpp
//! @author jbruel
//! @date 30/07/19
//!
#ifndef JBR_CREGISTER_REGISTER_VAR_PERM_RIGHTS_HPP
# define JBR_CREGISTER_REGISTER_VAR_PERM_RIGHTS_HPP
# include <jbr/reg/Permission.hpp>
//!
//! @namespace jbr::reg::var::perm
//!
namespace jbr::reg::var::perm
{
//!
//! @st... | 2,933 | 817 |
// ----------------------------------------------------------------
// The contents of this file are distributed under the CC0 license.
// See http://creativecommons.org/publicdomain/zero/1.0/
// ----------------------------------------------------------------
#include "matrix.h"
#include "rand.h"
#include "error.h"
#... | 11,021 | 4,878 |
#include <fstream>
#include <iostream>
#include <stack>
#include <unordered_set>
#include "EquivCollection.hpp"
#include "Optimizer.hpp"
#include "csv.h"
#include "eigen3/Eigen/Dense"
#include "filesystem/path.h"
#include "popl.hpp"
#include "sparsepp.h"
#include "spdlog/spdlog.h"
#include "spdlog/fmt/ostr.h"
struct ... | 13,345 | 4,865 |
static int __=[](){std::ios::sync_with_stdio(false);return 1000;}();
class Solution {
public:
int minDeletionSize(vector<string>& strs) {
int c = 0 , n = strs.size() , m = strs[0].size() ;
for(int i= 0 ; i<m ; i++)
for(int j = 0; j<n-1 ; j++ )
if(strs[j... | 446 | 167 |
#include "sts_behavior_tree_testing/BehaviorTreeNodeInterface.h"
namespace sts_behavior_tree_testing {
/// **************************
/// Constructors
/// **************************
BehaviorTreeNodeInterface::BehaviorTreeNodeInterface(ros::NodeHandle* nodeHandlePtr) : sts_core::sts_interfaces::StsBehaviorTre... | 4,450 | 1,354 |
#include "bagSimModel.h"
#define Ts 0.01
#define PWM_TO_POS_SCALE 0.01
#define BAG_MAX_VOL 1.0
#define BAG_MIN_VOL 0.25
//Expected flow vs. Pressure
// PSI 2 5 10 15 20 25 30
// kPa 13.7 34.5 68.9 103 138 172 206
// Flow (CFM) 40.5 63.5 79.6 108 126 144 162... | 601 | 308 |
#include <iostream>
#include <string>
bool IsEven(int num)
{
return (num % 2 == 0);
}
int main() {
int num;
std::cout << "Enter a number: ";
std::cin >> num;
std::cout << num << " is " << (IsEven(num) ? "Even" : "Odd") << "\n";
}
| 243 | 106 |
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
while(t--){
int n;
cin >> n;
int sindex = 0,k=0;
long int arr[n];
long int brr[n][4];
for(int i=0;i<n;i++){
cin>>arr... | 905 | 351 |
#include "random.h"
#include <stdint.h>
#include <functional>
#include <limits>
#include <thread>
namespace nbd {
namespace util {
struct XorShiftP {
XorShiftP() {
srnd(std::hash<std::thread::id>{}(std::this_thread::get_id()));
}
uint64_t state[2];
uint64_t Step() {
uint64_t x = state[0];
const... | 904 | 414 |
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "ArduiPi_OLED_lib.h"
#include "Adafruit_GFX.h"
#include "ArduiPi_OLED.h"
#include <time.h>
#includ... | 4,414 | 1,730 |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtQuick module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid comme... | 10,520 | 2,942 |
#include "Payoffs.hpp"
#include <algorithm>
namespace dauphine
{
Payoffs::Payoffs()
{
}
// For other products add the corresponding function at maturity, if there are more arguments than the spot and strike adjust the function in Boundaries too
double Payoffs::call(double spot, double strike)
... | 524 | 162 |
/** Copyright 2019 BidFX
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 w... | 1,026 | 316 |
#include<iostream>
using namespace std;
int power(int n, int p){
if(p==0){
return 1;
}
int prevPower= power(n,p-1);
return n*prevPower;
}
int main(){
int n,p;
cin>>n>>p;
cout<<power(n,p)<<endl;
return 0;
} | 250 | 107 |
#include "stdafx.h"
#include "Sprite.h"
using Microsoft::WRL::ComPtr;
using namespace DirectXCore;
Sprite::Sprite()
{
}
Sprite::Sprite(DirectXCore::DeviceResources * _deviceResource, const wchar_t * _charPath, float _scale)
{
//pivot.x = float(spriteDesc.Width / 2);
pivot.x = 0;
//pivot.y = float(spriteDesc.Heigh... | 1,909 | 749 |
// Generated by Haxe 4.1.4
#include <hxcpp.h>
#ifndef INCLUDED_verb_core_SurfacePoint
#include <verb/core/SurfacePoint.h>
#endif
HX_DEFINE_STACK_FRAME(_hx_pos_959611cb896c5e6e_146_new,"verb.core.SurfacePoint","new",0xb12daa55,"verb.core.SurfacePoint.new","verb/core/Intersections.hx",146,0x2e2a0454)
HX_LOCAL_STACK_FRA... | 6,270 | 2,880 |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Masternode initilized & modified by 216k155. Used at your own risk.
#include "assert... | 7,847 | 2,958 |
#include <Zivid/HandEye/Calibrate.h>
#include <ZividPython/Calibrate.h>
#include <ZividPython/CalibrationResidual.h>
#include <ZividPython/Matrix.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace py = pybind11;
namespace ZividPython
{
void wrapClass(pybind11::class_<Zivid::HandEye::Calibrati... | 967 | 331 |
//
// FILE NAME: CQCIGKit_DriverClient.cpp
//
// AUTHOR: Dean Roddey
//
// CREATED: 11/16/2001
//
// COPYRIGHT: Charmed Quark Systems, Ltd @ 2020
//
// This software is copyrighted by 'Charmed Quark Systems, Ltd' and
// the author (Dean Roddey.) It is licensed under the MIT Open Source
// license:
//
// https://o... | 24,259 | 7,363 |
#include <sophiatx/chain/database/database_exceptions.hpp>
#include <sophiatx/chain/genesis_state.hpp>
#include <sophiatx/plugins/chain/chain_plugin_full.hpp>
#include <sophiatx/chain/database/database.hpp>
#include <sophiatx/utilities/benchmark_dumper.hpp>
#include <sophiatx/chain/get_config.hpp>
#include <sophiat... | 20,948 | 6,711 |
#include "Python.h"
#include "gtest/gtest.h"
class DictWatcherTest : public testing::Test {
protected:
DictWatcherTest()
{
Py_NoSiteFlag = true;
Py_Initialize();
this->globals_ = PyDict_New();
this->builtins_ = PyDict_New();
}
~DictWatcherTest()
{
Py_DECREF(t... | 3,419 | 1,295 |
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <windows.h>
#include <string>
#include <numeric>
using namespace std;
class Solution {
public:
vector<int> sortArrayByParityII(vector<int>& A) {... | 958 | 346 |
/*
cxtest_channel_udp1 -lip 10.32.50.57 -lport 5555 -rip 10.32.50.57 -rport 5556
cxtest_channel_udp1 -lip 10.32.50.57 -lport 5556 -rip 10.32.50.57 -rport 5555
/**/
#include <ccxx/ccxx.h>
using namespace std;
class UdpSubject : public CxIChannelSubject
{
public:
UdpSubject(){
mRecvTotalTimes = 0;
... | 2,486 | 1,022 |
#include "Gateway.h"
Gateway& Gateway::getInstance()
{
static Gateway gw;
return gw;
}
Gateway::Gateway()
{}
Gateway::~Gateway()
{}
void Gateway::reg(const std::string& method, std::function<void(std::string&, const std::string&)> func)
{
routeTable_[method] = func;
}
void Gateway::route(std::string& ... | 1,648 | 566 |
class Solution {
public:
bool flag=true;
bool XXX(TreeNode* root) {
int l=dfs(root);
return flag;
}
int dfs(TreeNode* root){
if(root==NULL) return 0;
int l=dfs(root->left);
int r=dfs(root->right);
if(abs(l-r)>1) flag=false;
return max(l,r)+1;
... | 326 | 122 |
#include "StdAfx.h"
#include "GCDetailEquipmentList.h"
uint GCDetailEquipmentListHandler :: Execute( GCDetailEquipmentList* pPacket, Player* pPlayer )
{
__ENTER_FUNCTION
return PACKET_EXE_CONTINUE ;
__LEAVE_FUNCTION
return PACKET_EXE_ERROR ;
}
| 252 | 105 |
// 롤 케이크
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
int L, N;
cin >> L;
cin >> N;
int ranges[2000] = {};
for (int i=0; i<2*N; i++)
{
cin >> ranges[i];
}
// number of cake
int max_expected=0;
int max_received=0;
// nu... | 1,091 | 406 |
#ifndef LUCE_HEADER_AI_CONFIGURATION_HH
#define LUCE_HEADER_AI_CONFIGURATION_HH
#include <Luce/AI/Configuration/ComputeByCpu.hh>
#endif | 137 | 60 |
#include "pch.h"
#if COMMON_COMPILER_GCC
# pragma GCC push_options
# pragma GCC target("avx2")
#elif COMMON_COMPILER_CLANG
# pragma clang attribute push (__attribute__((target("avx2"))), apply_to=function)
#endif
namespace avx2
{
using namespace common;
#define COMMON_SIMD_LV 200
#include "common/simd/SIMD.hpp"... | 4,119 | 2,152 |
#include "TowerEntity.hpp"
#include "Engine.hpp"
#include "PlayerEntity.hpp"
#include "FireballEntity.hpp"
#include "CastleEntity.hpp"
#include "ObstacleComponent.hpp"
#include "Components/RigidBodyComponent.hpp"
#include "Components/SpriteComponent.hpp"
#include "Physics/PathFinding.hpp"
#include "Net/ReplicationMana... | 5,537 | 1,662 |
#include "partners_api/ads/google_ads.hpp"
namespace
{
#if defined(OMIM_OS_IPHONE)
auto const kSearchbannerId = "mobile-app-mapsme";
#elif defined(OMIM_OS_ANDROID)
auto const kSearchbannerId = "mobile-app-mapsme";
#else
auto const kSearchbannerId = "dummy";
#endif
} // namespace
namespace ads
{
std::string Goo... | 444 | 169 |
#include <QSqlQuery>
#include <QSqlRecord>
#include <QSqlError>
#include "kernel.h"
#include "ilwiscontext.h"
#include "workspacemodel.h"
WorkSpaceModel::WorkSpaceModel(const QString &name, QObject *parent) :
CatalogModel( Ilwis::Resource("ilwis://internalcatalog/workspaces/" + name,itWORKSPACE),parent)
{
}
WorkS... | 4,401 | 1,359 |
/* -*- c++ -*- */
/*
* Copyright 2007-2010,2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at y... | 4,445 | 1,487 |
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <iostream>
#include <pqxx/pqxx>
#include "doctest.h"
int test_db()
{
// Connect to the database.
pqxx::connection c{"postgresql://sa@localhost/sa"};
std::cout << "Connected to " << c.dbname() << '\n';
// Start a transaction.
pqxx::work W{c};
... | 874 | 307 |
#include <stdio.h>
#include "../../Demos/BasicDemo/BasicDemoPhysicsSetup.h"
int main(int argc, char* argv[])
{
BasicDemoPhysicsSetup physicsSetup;
GraphicsPhysicsBridge br;
physicsSetup.initPhysics(br);
physicsSetup.stepSimulation(1./60.);
physicsSetup.exitPhysics();
printf("hello\n");
} | 297 | 110 |
#include <iostream>
#include "Employee.h"
#include "Specialist.h"
int main()
{
Employee g;
g.SetName("VASI");
g.SetAddress("JK ZAPAD");
g.SetEGN("9508110056");
g.SetDepartment("IT");
g.SetSalary(100);
g.Print();
Employee c(g);
c.Print();
Employee m;
m = g;
m.Print();
Specialist x;
x.SetName("VASI");
x.S... | 521 | 264 |
#ifndef SLIDER_HPP
#define SLIDER_HPP
#include <SFML/Graphics.hpp>
#include "config.hpp"
#include "utils.hpp"
extern Config CONFIG;
class Slider
{
/**
A Slider.
Example usage:
```
Slider slider(100, 100, gameFont);
slider.create(20, 450);
slider.setSliderValue(235);
...
slider... | 1,080 | 352 |
// see LICENSE.txt
#pragma once
#include <map>
#include <typeindex>
#include <typeinfo>
namespace graphene { namespace chain {
class account_object;
class asset_object;
class database;
namespace detail {
bool _is_authorized_asset(const database& d, const account_object& acct, const asset_object& asset_obj);
} // ... | 1,284 | 444 |
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
#include "globalpostprodcontroller.hpp"
template class GlobalControllerImpl<PostProdStitcherController>;
| 181 | 66 |
#ifndef PARKING_SLOT
#define PARKING_SLOT
#include <iostream>
class ParkingSlot{
private:
int id;
int number;
int id_parking_lot;
int id_vehicle_type;
bool reserved_disability;
public:
ParkingSlot();
ParkingSlot(int id);
ParkingSlot(int id, int ... | 1,127 | 357 |
/*
* Copyright (c) 2017-2018 Nicholas Corgan (n.corgan@gmail.com)
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)
*/
#ifndef PKMN_CLASS_WITH_ATTRIBUTES_HPP
#define PKMN_CLASS_WITH_ATTRIBUTES_HPP
#include <pkmn/types/attribute_engine.h... | 6,834 | 1,611 |
#include <cascara/cascara.hpp>
using namespace cascara;
#include "../src/prefix128.hpp"
#include "../src/crunchy.hpp"
using namespace ipaddress;
class Prefix128Test {
public:
std::vector<std::pair<size_t, Crunchy>> u128_hash;
};
Prefix128Test setup() {
Prefix128Test p128t;
p128t.u128... | 1,491 | 690 |
////////////////////////////////////////////////////////////////////////////
// IncomingMessageHandler.cpp - A class that handles incoming messages //
// ver 1.0 //
// Karthik Umashankar, CSE687 - Object Oriented Design, Summer 2018 //
//////////////////////////////////////////////////////////... | 8,652 | 3,069 |
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "MacConsoleOutputDevice.h"
#include "Misc/App.h"
#include "Misc/CoreDelegates.h"
#include "Misc/ConfigCacheIni.h"
#include "MacApplication.h"
#include "MacPlatformApplicationMisc.h"
#include "Misc/OutputDeviceHelper.h"
#include "Misc/ScopeLock.h"
#i... | 8,360 | 3,204 |
#include <bits/stdc++.h>
using namespace std;
//this sorting algorithm is for sorting 0s,1s and 2s
//we have to traverse the whole array or vector
//so the time complexity becomes O(n)
void dnfsort(vector<int>&v){
int n = v.size();
//here we will be having three pointers
//forb iterating through the v... | 1,029 | 371 |
#include "MD5.hpp"
#include <climits>
#include <cassert>
#include <sstream>
#include <vector>
#include <iostream>
#include <limits>
#include <bitset>
using Chunk = std::array<std::uint32_t, 16>;// 512 bit
constexpr size_t CHUNK_SIZE = sizeof(Chunk::value_type) * 16;
constexpr auto BITS_CHUNK_SIZE = static_cast<std::uin... | 7,949 | 3,517 |
//
// _ _ ______ _ _ _ _ _ _ _
// | \ | | | ____| | (_) | (_) | | | |
// | \| | ___ | |__ __| |_| |_ _ _ __ __ _| | | |
// | . ` |/ _ \ | __| / _` | | __| | '_ \ / _` | | | |
// | |\ | (_) | | |___| (_| | | |_| | | | | (_| |_|_|_|
// |_| \_|\___/ |______\__,_|_|\... | 1,443 | 607 |
/** simple wrapper for optional values or references *************************
* *
* Copyright (c) 2014 Florian Oetke *
* This file is distributed under the MIT License *
* ... | 11,007 | 5,027 |
#include "store.h"
#include "nodestore.h"
#include "statisticsstore.h"
#include "mesh/mesh.h"
#include "esinfo/mpiinfo.h"
#include "esinfo/meshinfo.h"
#include "basis/containers/point.h"
#include "basis/containers/serializededata.h"
#include "basis/utilities/packing.h"
using namespace mesio;
NodeStore::NodeStore()... | 8,802 | 3,545 |
#ifndef FALCON_UTILITYTEMPORARY_SET_HPP
#define FALCON_UTILITYTEMPORARY_SET_HPP
#include <falcon/utility/move.hpp>
#include <falcon/c++/noexcept.hpp>
#include <falcon/c++/reference.hpp>
#include <falcon/functional/operators.hpp>
#if __cplusplus >= 201103L
# include <type_traits>
#endif
namespace falcon {
///\brief M... | 2,054 | 834 |
#ifndef QUBUS_PATTERN_BINARY_OPERATOR_HPP
#define QUBUS_PATTERN_BINARY_OPERATOR_HPP
#include <qubus/IR/binary_operator_expr.hpp>
#include <qubus/pattern/variable.hpp>
#include <qubus/pattern/any.hpp>
#include <qubus/pattern/value.hpp>
#include <utility>
#include <functional>
namespace qubus
{
namespace pattern
{
te... | 4,071 | 1,473 |
#pragma once
#include <cppgit2/libgit2_api.hpp>
#include <cppgit2/proxy.hpp>
#include <cppgit2/strarray.hpp>
#include <git2.h>
#include <string>
#include <vector>
namespace cppgit2 {
class fetch : public libgit2_api {
public:
class options : public libgit2_api {
public:
options() : c_ptr_(nullptr) {
aut... | 3,142 | 995 |
#include "pch.h"
#include "SpectatorView.WinRTExtensions.h"
// Because Marshal.GetObjectForIUnknown does not work when using the .NET Native compiler with IInspectable
// objects, this method allows managed code to explicitly specify a type for the marshaller to query for.
// Example usage from managed code for marsh... | 740 | 214 |
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
#define FIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mod 1000000007
int main() {
FIO;
int t;
cin >> t;
while(t--)
{
int n;
cin>>n;
if(n==1)
{
cout<<"1"<<endl;
... | 836 | 446 |
/**
* Copyright (c) 2015, Lehigh University
* All rights reserved.
* See COPYING for license.
*
* This file implements the solvers for linear system for SOAX.
*/
#include "./solver_bank.h"
namespace soax {
SolverBank::SolverBank() : alpha_(0.01), beta_(0.1), gamma_(2.0) {}
SolverBank::~SolverBank() {
this->... | 4,707 | 1,759 |
#include "ofxNode.h"
#include <random>
#include "ofxTweener.h"
void ofxNode::setup(std::shared_ptr<ofRectangle> boundRect, std::shared_ptr<ofxTrueTypeFontUC> font)
{
captureFont_ = font;
boundRect_ = boundRect;
position_.set(ofRandom(boundRect_->getMinX(), boundRect_->getMaxX()), ofRandom(boundRect_->getMinY(), bo... | 2,776 | 1,142 |
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "system_info/system_info_cellular_network.h"
const std::string SysInfoCellularNetwork::name_ = "CELLULAR_NETWORK";
void SysInfoCellularNetwork... | 639 | 198 |
// Copyright (c) Peter Hillerström (skipifzero.com, peter@hstroem.se)
// For other contributors see Contributors.txt
//
// 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.
//... | 2,574 | 707 |
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
SPDX-License-Identifier: MIT
============================= end_copyright_notice ===========================*/
#include "cif/common/cif.h"
#include "cif/import/library_api.h"
#include "cif/impor... | 1,125 | 404 |
#pragma once
#include <functional>
#include <string>
#include <SDL.h>
#include <SDL_ttf.h>
#include "../store/coord.hpp"
#include "../store/store.hpp"
void text_elt(std::string text, Coord& coord, Store& store, int z_coord = 1);
void text_elt(std::string text, FC_Font* font, Coord& coord, Store& store, int z_coord... | 507 | 196 |
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long ll;
const int maxn = 15000 + 10;
const int MAX = 100000000;
struct node
{
int u;
int v;
ll w;
};
node edge[maxn];
int N, M, cnt;
ll res;
int F[maxn];
bool comp(const node& a, const node& b)
{
return a.w < b.w;
}
void ad... | 1,430 | 818 |
#include "../RedisService.h"
#include <gtest/gtest.h>
#include <unordered_set>
using ua_black_jack_server::data_base_server::RedisService;
RedisService* service;
const char* nickname = "owen1";
const int64_t uid = 2345;
const char* password = "ASIKrgubhy";
int main() {
acl::redis_client client("127.0.0.1:6379")... | 4,151 | 1,780 |
//
// Copyright (C) 2000-2020 - Colen M. Garoutte-Carson <colen at cogmine.com>, Cog Mine LLC
//
// Status: Good, NeedsTesting
#ifndef COGS_HEADER_IO_NET_TELNET
#define COGS_HEADER_IO_NET_TELNET
#include "cogs/collections/container_queue.hpp"
#include "cogs/collections/string.hpp"
#include "cogs/env.hpp"
#include... | 16,261 | 7,221 |
/*
* Code Author: Miroslav Stoyanov
*
* Copyright (C) 2018 Miroslav Stoyanov
*
* This file is part of
* Hardware Accelerated Linear Algebra (HALA)
*
*/
#include "testing_common.hpp"
template<typename T> T mabs2(T a){ return a * a; }
template<typename T> std::complex<T> mabs2(std::complex<T> a){
T r = std:... | 7,147 | 3,035 |
/*
#Project 10 - Visual C++ 2019 - Exercise 1 - Homework - Snack Bar
Description
This program calculates how much each customer spends in a snack bar.
In essence, this program initializes 3 matrices:
p[1][7] - Price of the Snack bar Products
q[7][1] - Quantity of each item asked
t[1][7] - Total pric... | 5,461 | 2,347 |
/*
* Castaway
* (C) 1994 - 2002 Martin Doering, Joachim Hoenig
*
* $File$ - memory read/write
*
* This file is distributed under the GPL, version 2 or at your
* option any later version. See doc/license.txt for details.
*
* revision history
* 23.05.2002 JH FAST1.0.1 code import: KR -> ANSI, restructuring
* 30.05.... | 10,537 | 4,963 |
#include "Country.h"
#include "gtest/gtest.h"
using namespace std;
using namespace france;
TEST(Country, Constructor) {
float GDP = 314000000000;
string continent("europe");
Country Country(GDP,continent);
ASSERT_EQ(Country.GDP(),GDP);
ASSERT_EQ(Country.continent(),continent);
floa... | 730 | 279 |
#ifndef CTRPLUGINFRAMREWORK_CLOCK_HPP
#define CTRPLUGINFRAMREWORK_CLOCK_HPP
#include "CTRPluginFramework/System/Time.hpp"
namespace CTRPluginFramework
{
class Clock
{
public:
Clock(void);
Clock(Time time);
Time GetElapsedTime(void) const;
bool HasTimePassed(Time time... | 417 | 148 |
#ifndef GUI_HPP
#define GUI_HPP
#include "GUIslice.h"
#include "GUIslice_drv.h"
#include "GUIslice_ex.h"
#include "SdFat.h"
#include "util.hpp"
enum Animation
{
ANIM_LIGHT,
ANIM_BLINK,
ANIM_MARQUEE,
};
struct StickConfig
{
const char *fileToLoad;
Animation animation;
CRGB animationColor;
uint8... | 992 | 351 |
#include <iostream>
#include <cstdint>
class Average {
private:
int32_t m_total = 0;
int8_t m_numbers = 0;
public:
Average() {}
friend std::ostream& operator<<(std::ostream &out, const Average &average) {
out << static_cast<double>(average.m_total) / average.m_numbers;
return out;
}
Average& operato... | 723 | 338 |
//********************************************************
// Tour_File.hpp - Tour File Input/Output
//********************************************************
#ifndef TOUR_FILE_HPP
#define TOUR_FILE_HPP
#include "Ext_Header.hpp"
//---------------------------------------------------------
// Tour_File Class definit... | 4,017 | 1,479 |
#include "RollerTile.h"
RollerTile::RollerTile(int id, SDL_Rect destination, SDL_Renderer * renderer, SDL_Texture * texture):
renderer(nullptr),
texture(nullptr),
destination({0,0,0,0}),
id(NONE_ID)
{
this->destination = destination;
this->renderer = renderer;
this->texture = texture;
this->id = id;
}
Rolle... | 619 | 255 |
# include <cstdint>
# include <cstddef>
# include <ostream>
# include <cassert>
# include <cstring>
# include <stdexcept>
# include <bitset>
# include <iostream> // XXX
# pragma once
namespace goo {
/**@class Bitset
* @brief A dynamic bitset implementaation.
*
* We want some nice features of bitsets which lengt... | 5,999 | 1,897 |
#include "stdlib.h"
#include "memory_dev.h"
#include "string.h"
memory_device::memory_device(offs_t start, size_t size, bool readonly)
{
this->readonly = readonly;
this->start = start;
this->size = size;
end = start + size - 1;
memory = (uint8_t *)malloc(size);
next = NULL;
};
memory_device::~... | 951 | 357 |