text string | size int64 | token_count int64 |
|---|---|---|
#include "PathTree.h"
#include <sstream>
#include "StringUtil.h"
namespace ze::assetdatabase
{
void PathTree::add(const std::filesystem::path& path)
{
ZE_CHECK(path.is_relative());
/** Check if path already exists */
if (has_path(path))
return;
/** Insert the path in the map if it is a directory */
if (!path... | 1,990 | 785 |
#include <iostream>
long Factorial(int no);
long nCr(int n, int r);
int main() {
int n, r;
std::cout << "Enter a value for n ";
std::cin >> n;
std::cout << "Enter a value for r ";
std::cin >> r;
std::cout << "nCr = ";
std::cout << nCr(n, r);
std::cout << std::endl;
return 0;
}
long Factorial(int no)
{
long... | 520 | 249 |
/* file: adaboost_predict_dense_default_batch_fpt_dispatcher.cpp */
/*******************************************************************************
* Copyright 2014-2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Licen... | 2,620 | 811 |
#include <memory>
#include <src/recordbuf.hpp>
#include <gtest/gtest.h>
namespace blackhole {
inline namespace v1 {
namespace {
TEST(recordbuf_t, FromRecordMessage) {
std::unique_ptr<recordbuf_t> result;
{
const string_view message("GET");
const attribute_pack pack;
const record_t ... | 5,655 | 1,842 |
#include "../../include/core/Allocator.h"
using namespace PhysicsEngine;
Allocator::Allocator()
{
}
Allocator::~Allocator(){}; | 128 | 47 |
#ifndef TOTEM_HPP
#define TOTEM_HPP
#include "gameobject.hpp"
class Totem : public GameObject
{
public:
Totem(btVector3 origin, btDiscreteDynamicsWorld *dyn_world);
virtual bool collide(btManifoldPoint &cp,
const btCollisionObjectWrapper *obj1, int id1, int index1);
virtual void u... | 495 | 176 |
#include "RTTStar.hpp"
#include <algorithm>
#include <map>
#include <memory>
#include <numeric>
#include <utility>
/**
* Constructs the RRT Star class.
*
* @param cost_map The cost_map to perform path finding on.
* @param epsilon The maximum distance the new point can be away from the
* nearest point.
* @param ... | 9,762 | 3,235 |
/****************************************************************************
**This file is part of the Motorcar 3D windowing framework
**
**
**Copyright (C) 2014 Forrest Reiling
**
**
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with... | 3,840 | 1,243 |
#include <iostream>
using namespace std;
int main()
{
int t,i,j,k;
int sum;
char a,b;
cin >>t;
while(t--)
{
sum=0;
cin>>i>>a>>j>>b>>k;
if(a=='+')
sum = i+j;
else
sum = i-j;
if(b=='+')
sum = sum + k;
else
... | 383 | 150 |
/*
* Copyright (c) 2011, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this l... | 13,125 | 4,760 |
#include <sys/file.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <iostream>
#include "ecal_process_stub.h"
int main(int argc, char** argv)
{
if (argc <= 1)
{
std::cout << "This program is part of eCAL and should not be launched manually." << std::endl;
return EXIT_FAILURE;
}
... | 3,492 | 1,198 |
#include "pch.h"
#include "BoundingBox.h"
BoundingBox::BoundingBox(glm::vec3 min, glm::vec3 max)
{
m_Params[0] = min;
m_Params[1] = max;
m_Centre = (min + max) * 0.5f;
//Split(0);
}
BoundingBox::~BoundingBox()
{
}
void BoundingBox::Split(int level)
{
//if (level == MAX_DEPTH) return;
glm::vec3 min;
glm:... | 4,978 | 2,400 |
#include <algorithm>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string.h>
#include <stdio.h>
#include "Buffer.h"
#include "Device.h"
#include "Event.h"
#include "Kernel.h"
#include "Platform.h"
#include "Program.h"
#include "Queue.h"
#include "SystemConfiguration.h"
#include "bench_support.h"... | 6,763 | 1,945 |
#include <negli/NeuralGliderGame.hpp>
#include <negli/ConsolePrint.hpp>
using namespace negli;
int main()
{
NeuralGliderGame game = NeuralGliderGame(20, 20, 5, 5);
negli::printGame(game);
return 0;
}
| 216 | 91 |
#include <iostream>
#include "util.hpp"
#include "tsp.hpp"
#include "nearest_neighbor.hpp"
#include "nearest_insertion.hpp"
#include "farthest_insertion.hpp"
#include "double_mst.hpp"
#include "greedy.hpp"
#include "quick_boruvka.hpp"
#include "two_opt.hpp"
// main routine
int main(int argc, char **argv){
if(argc<2... | 4,611 | 1,914 |
/*
** EPITECH PROJECT, 2021
** rtype
** File description:
** Created by seb,
*/
#pragma once
namespace ecs {namespace component {
struct Drawable {
Drawable() {
this->layer = 0;
this->visible = false;
}
Drawable(unsigned int layer, bool visible) {
this->layer = layer;
this->visible = visible;
}
... | 370 | 149 |
/*
* 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 you under the Apache License, Version 2.0 (the
* License); you ma... | 3,442 | 1,235 |
//No of islands (only 4 neighbours)
//Time: O(M*N)
//Space: O(M*N)
#include <bits/stdc++.h>
using namespace std;
bool isInside(int n, int m, int i, int j)
{
if(i<0||j<0||i>n-1||j>m-1) return false;
return true;
}
void dfs(vector<vector<char>>&grid, vector<vector<bool>>&vis, int n, int m, i... | 1,368 | 588 |
#if !defined ADBASE_LOGGING_HPP_
# error "Not allow include this header."
#endif
#ifndef ADBASE_UTILITY_ASYNCLOGGING_HPP_
#define ADBASE_UTILITY_ASYNCLOGGING_HPP_
#include <thread>
#include <condition_variable>
#include <vector>
namespace adbase {
/**
* @addtogroup logging adbase::Logging
*/
/*@{*/
class Async... | 1,353 | 512 |
/*
The MIT License (MIT)
Copyright (c) 2021 Lancaster University.
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 rights to use, copy, modify... | 4,485 | 1,532 |
/*
* Copyright 2021 Marzocchi Alessandro
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "port.h"
using namespace HFMidi;
Port::Port()
{
}
void Port::sendEvent(const QByteArray &data)
{
sendData(data);
}
bool Port::sendData(const QByteArray &data)
{
Q_UNUSED(data);
retur... | 438 | 167 |
class Solution {
public:
int rob(vector<int>& nums) {
int n = nums.size() ;
if(n==1)
return nums[0] ;
if(n==2)
return max(nums[0],nums[1]) ;
int dp1[n-1] ;
dp1[0] = nums[0] ;
dp1[1] = max(nums[0],nums[1]) ;
for(int i=2... | 660 | 309 |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/gRPCCommunication/GrpcStepInput.proto
#include "proto/gRPCCommunication/GrpcStepInput.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.... | 15,475 | 5,766 |
// Copyright 2021 The WebNN-native Authors
//
// 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 ... | 2,338 | 682 |
#include "ControlWindow.h"
void CreateControlWindow(WinDat& wd){
wd._handle = CreateWindowEx(0, wd._className, NULL, wd._style, wd._x, wd._y, wd._w, wd._h, wd._parent, 0, NULL, NULL);
HTREEITEM hRoot;
TV_INSERTSTRUCT tvins;
tvins = { 0 };
tvins.hInsertAfter = TVI_ROOT;
tvins.item.mask = TVIF_TEXT;
tvins.... | 1,259 | 553 |
extern "C" {
#include "vl/generic.h"
#include "vl/stringop.h"
#include "vl/pgm.h"
#include "vl/dsift.h"
#include "vl/sift.h"
#include "vl/getopt_long.h"
}
#include <errno.h>
#include <cstdlib>
#include <cstdio>
#include <cassert>
#include <iostream>
#include <sstream>
#include <cmath>
#include <string>
#include <cstdi... | 5,339 | 2,217 |
/*
BME280Spi.cpp
This code records data from the BME280Spi sensor and provides an API.
This file is part of the Arduino BME280Spi library.
Copyright (C) 2016 Tyler Glenn
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free ... | 2,977 | 1,032 |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... | 5,885 | 1,917 |
/*******************************************************************************
* @file oled.cpp
* @brief File containing all OLED functions.
*******************************************************************************/
#ifndef oled_cpp // Start of precompiler check to avoid dupicate inclusion of this code blo... | 9,122 | 2,737 |
#include<stdio.h>
#include <vector>
using namespace std;
#include <algorithm> // std::random_shuffle
#include <iostream>
#include <random>
void swap(int* a, int* b) {
// return a
int temp = *a;
*a = *b;
*b = temp;
}
int partition(std::vector<int> a, int low, int high) {
int i = low + 1, j = hig... | 1,623 | 623 |
#include "timemory/mpl/math.hpp"
#include "timemory/mpl/stl.hpp"
#include <timemory/components.hpp>
#include <timemory/components/base.hpp>
#include <timemory/mpl/types.hpp>
// for overload resolution, e.g. foo.store(normalize_tag{}, size_t)
struct normalization
{};
namespace tim
{
namespace component
{
template <ty... | 3,222 | 1,055 |
/**********************************************************************
Audacity: A Digital Audio Editor
@file PlugFrame.cpp
@author Vitaly Sverchinsky
@brief Part of Audacity VST3 module
**********************************************************************/
#include "PlugFrame.h"
using namespace intern... | 2,181 | 710 |
#include "menu.h"
#include "Course.h"
#include "Courses.h"
/// <summary>
/// Print menu options to stdout
/// </summary>
/// <param name=""></param>
void printMenu(void) {
cout << "Menu:" << endl;
cout << " 1. Load Data Structure." << endl;
cout << " 2. Print Course List." << endl;
cout << " 3. Print Course." <... | 2,515 | 703 |
#include "PanelAbout.h"
#include "Application.h"
#include "ModuleGui.h"
#include "Imgui/imgui.h"
#include "mmgr/mmgr.h"
PanelAbout::PanelAbout(char * name) : Panel(name)
{
}
PanelAbout::~PanelAbout()
{
}
bool PanelAbout::Draw()
{
ImGuiWindowFlags settingsFlags = 0;
settingsFlags = ImGuiWindowFlags_NoFocusOnAppe... | 2,607 | 961 |
#include <PCH.h>
#include <EditorFramework/EngineProcess/EngineProcessDocumentContext.h>
#include <EditorFramework/EngineProcess/EngineProcessMessages.h>
#include <EditorFramework/IPC/SyncObject.h>
#include <EditorFramework/EngineProcess/EngineProcessMessages.h>
#include <EditorFramework/EngineProcess/EngineProcessView... | 13,944 | 4,718 |
// Copyright 2020 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 "tmp112.h"
#include <lib/fake_ddk/fake_ddk.h>
#include <lib/mock-i2c/mock-i2c.h>
#include <zxtest/zxtest.h>
namespace {
bool FloatNear(float a... | 1,987 | 811 |
// NOLINT(namespace-quic)
//
// This file is part of the QUICHE platform implementation, and is not to be
// consumed or referenced directly by other Envoy code. It serves purely as a
// porting layer for QUICHE.
#include "platform/epoll_platform_impl/quic_epoll_clock.h"
namespace quic {
QuicEpollClock::QuicEpollClo... | 1,186 | 426 |
/*
* Copywrite 2014-2015 Krzysztof Stasik. All rights reserved.
*/
#include "monitor_plugin.h"
#include "base/io/base_file.h"
#include "common/json/json_writer.h"
#include "link/plugin_log.h"
#include "base/core/time_utils.h"
#include "base/core/assert.h"
#include <unistd.h>
namespace Link {
static const streamsi... | 12,922 | 4,922 |
#include "template.hpp"
int main() {
int64_t a, b, k, l;
cin >> a >> b >> k >> l;
cout << min(k % l * a + k / l * b, k / l * b + b) << endl;
}
| 150 | 73 |
#include "../external_dependencies/cmts/include/cmts.h"
#include "algorithm_thread.h"
#include "graphics/vulkan_state.h"
#include "windows-specific/framework.h"
#include "windows-specific/Resource.h"
#include <atomic>
#include <chrono>
#define MAX_LOADSTRING 100
HINSTANCE hinstance;
HWND hwnd;
static HACCEL accel;
s... | 5,380 | 1,926 |
#pragma once
#include <PP/declval.hpp>
#include <PP/get_type.hpp>
#include <PP/macros/simple_concept.hpp>
#include <PP/value_t.hpp>
#include <PP/tuple/count.hpp>
#include <PP/tuple/element.hpp>
#include <PP/tuple/get.hpp>
#include <PP/tuple/value_sequence_for.hpp>
namespace PP::detail
{
template <typename T, auto I>
c... | 999 | 369 |
// Copyright (c) 2020 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "FakeProducerSideService/FakeProducerSideService.h"
#include "VulkanLayerProducerImpl.h"
nam... | 24,837 | 8,640 |
/*******************************************************************************
Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and
Technical University of Darmstadt.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted prov... | 10,856 | 3,280 |
#include <iostream>
#include <cmath>
#define EPSILON 1e-10
bool is_same(double __x, double __y) {
if(std::abs(__x - __y) < EPSILON) {
std::cout << std::fixed << "IN Function __x\t\t" << __x << "\n";
std::cout << std::fixed << "IN Function __y\t\t" << __y << "\n";
std::cout << std::fixe... | 1,485 | 661 |
// DDCPP/standard/bits/DD_ReferenceCounter.hpp
#ifndef DD_REFERENCE_COUNTER_HPP_INCLUDED_
# define DD_REFERENCE_COUNTER_HPP_INCLUDED_ 1
# include "DD_global_definitions.hpp"
DD_DETAIL_BEGIN_
struct ReferenceCounter {
public:
DD_ALIAS(ThisType, ReferenceCounter);
public:
DD_ALIAS(LengthType, ::DD::LengthType)... | 1,731 | 714 |
// RUN: %clang_cc1 %s -std=c++14 -triple=spir -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 %s -std=c++17 -triple=spir -emit-llvm -o - | FileCheck %s
struct MyType {
MyType(int i) : i(i) {}
int i;
};
//CHECK: call void @_ZN6MyTypeC1Ei(%struct.MyType* addrspacecast (%struct.MyType addrspace(10)* @m to %struct.M... | 389 | 182 |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
long long n,r;
cin>>n;
cin>>r;
long long arr1[n],arr2[n];
for(long long i=0;i<n;i++)
{
cin>>arr1[i];
}
for(long long i=0;i<n;i++)
{
... | 992 | 364 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 Microsoft Corporation
*
* -=- Robust Distributed System Nucleus (rDSN) -=-
*
* 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... | 2,111 | 739 |
#include "AST/UnaryOperator.hpp"
#include "visitor/AstNodeVisitor.hpp"
UnaryOperatorNode::UnaryOperatorNode(const uint32_t line, const uint32_t col,
Operator op, ExpressionNode *p_operand)
: ExpressionNode{line, col}, op(op), operand(p_operand) {}
const char *UnaryOperatorNode... | 664 | 229 |
// Copyright 2018 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 <lib/sys/cpp/testing/component_context_provider.h>
#include <zircon/syscalls.h>
#include "garnet/lib/ui/gfx/tests/vk_session_test.h"
#include "gt... | 3,001 | 1,050 |
//
// Created by fy on 2019-01-29.
//
#ifndef FORCEIO_CONTRACT_RELAY_TOKEN_HPP
#define FORCEIO_CONTRACT_RELAY_TOKEN_HPP
#pragma once
#include <eosiolib/eosio.hpp>
#include "force.relay/force.relay.hpp"
#include "sys.match/sys.match.hpp"
namespace relay {
using namespace eosio;
using std::string;
struct sys_b... | 5,560 | 1,863 |
/* FileName: superblock.hpp
* Author: Hover
* E-Mail: hover@hust.edu.cn
* GitHub: HoverWings
* Description: superblock
*/
#ifndef _SUPERBLOCK_H_
#define _SUPERBLOCK_H_
#include "inode.hpp"
#include <fstream>
#include <list>
#include <map>
#include <string>
#include <vector>
#include <cstring>
#in... | 1,161 | 401 |
#include <iostream>
template <bool value> int reversed_binary_value()
{
return value;
}
template <bool a, bool b, bool... d> int reversed_binary_value()
{
return (reversed_binary_value<b, d...>() << 1) + a;
}
| 215 | 81 |
/*
* 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 You under the Apache License, Version 2.0
* (the "License"); you may ... | 5,393 | 1,366 |
#include <nan.h>
#include <ghostscript/gserrors.h>
#include <ghostscript/iapi.h>
using namespace std;
using namespace Nan;
using namespace v8;
class ghostscript : public AsyncWorker {
public:
ghostscript(Callback *callback, vector<string> args) : AsyncWorker(callback), args(args) {}
// Executes in worker thr... | 2,991 | 1,037 |
#include "demoloop.h"
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/rotate_vector.hpp>
#include "graphics/shader.h"
using namespace std;
using namespace demoloop;
const uint32_t CYCLE_LENGTH = 10;
const static std::string shaderCode = R"===(
uniform mediump float cycle_ratio;
#define DEMOLOOP_M_PI 3.145... | 6,813 | 3,671 |
#pragma once
#include "biboumi.h"
#ifdef BOTAN_FOUND
#include <botan/credentials_manager.h>
#include <botan/certstor.h>
#include <botan/tls_client.h>
class TCPSocketHandler;
/**
* If the given cert isn’t valid, based on the given hostname
* and fingerprint, then throws the exception if it’s non-empty.
*
* Must... | 1,797 | 509 |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: diplomacy_tensorflow/core/profiler/tfprof_options.proto
#include "diplomacy_tensorflow/core/profiler/tfprof_options.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/prot... | 98,005 | 34,443 |
/* mbed Microcontroller Library
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* 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.... | 3,845 | 1,467 |
/*
* ASCLITE
* Author: Jerome Ajot, Jon Fiscus, Nicolas Radde, Chris Laprun
*
* This software was developed at the National Institute of Standards and Technology by
* employees of the Federal Government in the course of their official duties. Pursuant
* to title 17 Section 105 of the United States Code this soft... | 6,457 | 2,303 |
/**
* @file RTEC_Initializer.cpp
*
* $Id: RTEC_Initializer.cpp 91675 2010-09-08 19:09:19Z johnnyw $
*
* @author Carlos O'Ryan <coryan@uci.edu>
*/
#include "RTEC_Initializer.h"
#include "RTCORBA_Setup.h"
#include "orbsvcs/Event/EC_Event_Channel.h"
#include "orbsvcs/Event/EC_Default_Factory.h"
#include "orbsvcs/E... | 1,140 | 455 |
//
// kern_policy.hpp
// Lilu
//
// Copyright © 2016-2017 vit9696. All rights reserved.
//
#ifndef kern_policy_hpp
#define kern_policy_hpp
#include <Headers/kern_config.hpp>
#include <sys/types.h>
#include <sys/proc.h>
#include <Library/security/mac_framework.h>
#include <Library/security/mac_policy.h>
#include ... | 1,583 | 621 |
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
char vowels [] {'a', 'e','i', 'w', 'r'};
cout << "The first vowels is " << vowels[0] << endl;
cout << "The last vowels is " << vowels[4] << endl;
double hi_temps [] {90.1, 89.7, 77.5, 81.6};
cout << "The first hi... | 1,066 | 414 |
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <algorithm>
#include <limits>
#include "base/debug/trace_event.h"
#include "cc/base/region.h"
#include "cc/debug/benchmark_instrumentation.h"
#i... | 13,603 | 4,355 |
#include "device.h"
#include "context.h"
#ifdef USE_ARM_PLACE
#ifdef PLATFORM_ANDROID
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/system_properties.h>
#include "cpu_info.h"
#endif //PLATFORM_ANDROID
#if __APPLE__
#include "TargetConditionals.h"
#if TARGET_OS_IPHONE
#include <sys/types.h>
#include <sys... | 21,562 | 7,930 |
// updated Thu Apr 25 21:55:03 PDT 2019
#include <cassert>
#include <GL/gl.h>
#include "Rectangle.h"
Rectangle::Rectangle(double red, double green, double blue)
: Game_object(red, green, blue, RECTANGLE)
{
Register("rotation", 0.0);
}
/* virtual */ void Rectangle::build_display_list()
{
assert(m_display_list);... | 1,180 | 462 |
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkResampleImageFilter.h"
#include "itkIdentityTransform.h"
#include "itkAntiAliasBinaryImageFilter.h"
#include "itkImageRegionIterator.h"
#include "itkChangeInformationImageFilter.h"
#include "string.h"
#include "itkBSplin... | 15,475 | 4,390 |
/* Copyright 2020, RespiraWorks
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 writing, software
d... | 15,981 | 5,510 |
// Copyright 2019 Carnegie Mellon University. See LICENSE file for terms.
#include "test.hpp"
int main() {
path_start();
int n=INT_RAND, k=INT_RAND, j=INT_RAND;
int x=0;
if ( n == 0 ) {
x++;
}
if (k == 0) {
x++;
}
if (j == 0) {
x++;
}
if (x == 3) {
path_goal();
}
}
| 309 | 154 |
/***************************************************************
*
* Copyright (C) 1990-2008, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. Y... | 7,124 | 2,626 |
// This file is part of AsmJit project <https://asmjit.com>
//
// See asmjit.h or LICENSE.md for license and copyright information
// SPDX-License-Identifier: Zlib
#include "../core/api-build_p.h"
#if !defined(ASMJIT_NO_AARCH64) && !defined(ASMJIT_NO_BUILDER)
#include "../arm/a64assembler.h"
#include "../arm/a64build... | 1,263 | 494 |
// bin/convert-ali.cc
// Copyright 2009-2011 Microsoft Corporation
// 2013 Johns Hopkins University (author: Daniel Povey)
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in com... | 4,465 | 1,473 |
/* NxS Tabpages - written by Saivert */
//#include "StdAfx.h"
#include "nxstabpages.h"
NxS_TabPages::~NxS_TabPages()
{
Clear();
}
HWND NxS_TabPages::SetTabCtrl(HWND NewTabCtrl)
{
HWND tmp;
tmp = m_hwTab;
if (IsWindow(NewTabCtrl))
{
if (GetCount()>0)
TabCtrl_DeleteAllItems(m_hwTab);
m_hwTa... | 7,629 | 3,689 |
//
// 2_inSearchOfAnEasyProblem.cpp
// competitive_programming
//
// Created by The Times of Hacker on 05/04/20.
// Copyright © 2020 isharma. All rights reserved.
//
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int n;
int temp[101];
cin >> n;
bool flag = true;
for (int ... | 529 | 208 |
#pragma once
#include <memory>
#include <string>
#include <unordered_set>
#include <vector>
namespace opossum {
class AbstractCardinalityEstimator;
class AbstractCostEstimator;
class AbstractLQPNode;
class LogicalPlanRootNode;
class LQPSubqueryExpression;
class AbstractRule {
public:
virtual ~AbstractRule() = de... | 2,525 | 776 |
#ifdef PEGASUS_OS_AIX
#ifndef __UNIX_SWAPSPACECHECK_PRIVATE_H
#define __UNIX_SWAPSPACECHECK_PRIVATE_H
#endif
#endif
| 122 | 66 |
// Copyright 2020 modio. All Rights Reserved.
// Released under MIT.
#include "BlueprintCallbackProxies/CallbackProxy_GetAllModFiles.h"
#include "ModioSubsystem.h"
#include "Engine/Engine.h"
UCallbackProxy_GetAllModfiles::UCallbackProxy_GetAllModfiles(const FObjectInitializer& ObjectInitializer)
: Super(ObjectIniti... | 1,504 | 525 |
#pragma once
#include <string>
#include <vector>
#include <boost/smart_ptr.hpp>
#include <boost/algorithm/string.hpp>
#include "vfspp_compiler_detection.h"
#include "vfspp_export.h"
namespace vfspp
{
class IFileSystemEntry;
typedef std::string string_type;
typedef boost::shared_ptr<IFileSystemEntry> FileEntryP... | 2,414 | 919 |
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/strings/strcat.h"
#include "chrome/browser/ash/app_mode/kiosk_app_manager.h"
#include "chrome/browser/ash/app_mode/kiosk_app_types.h"
#incl... | 19,398 | 6,003 |
class Point {
public:
constexpr Point(double xVal = 0, double yVal = 0) noexcept
: x(xVal), y(yVal) { }
constexpr double xValue() const noexcept { return x; }
constexpr double yValue() const noexcept { return y; }
void setX(double newX) noexcept { x = newX; }
... | 744 | 280 |
#pragma once
#include <cmath>
#include <iomanip>
#include <limits>
#include <sstream>
#include <string>
#include <vector>
#include "points.hpp"
#include "vec3.hpp"
using namespace std::string_literals;
// Cube has a position, a width (x), a height (y) and a depth (z)
class Cube {
protected:
const Vec3 m_pos; //... | 6,847 | 2,727 |
#include <azule/core/Processor.h>
#include <azule/utilities/PimplImpl.h>
using namespace azule;
class Processor::Impl
{
public:
std::vector<std::function<void(std::chrono::microseconds)>> fixedFunctions;
std::vector<std::function<void(std::chrono::microseconds)>> variableFunctions;
std::vector<std::function<void(s... | 1,215 | 459 |
#include "baldr/compression_utils.h"
namespace valhalla {
namespace baldr {
/* Deflates data with gzip or zlib wrapper
* @param src_func function which modifies the stream to read more input
* @param dst_func function which modifies the stream to write more output
* @param level what compression level to use... | 3,793 | 1,194 |
#include <parrlib/utils2d/AxisAlignedBoundingBox2D.h>
#include <iostream>
#include <parrlib/Matrix3f.h>
#include <parrlib/otherutil.h>
#include <parrlib/stringutils.h>
AxisAlignedBoundingBox2D::AxisAlignedBoundingBox2D(){}
//AxisAlignedBoundingBox2D::AxisAlignedBoundingBox2D(float v) { vmax = v; vmin = v; }
AxisAlig... | 9,905 | 4,120 |
#include <windows.h>
#include <thread>
#include "game.h"
#include "particles.h"
#include "math.h"
#define pressed(c) GetAsyncKeyState(c)
void Game::update() {
Option BSIZE_X = value(m_op[OP_BSIZE_X]);
Option BSIZE_Y = value(m_op[OP_BSIZE_Y]);
Option PSPEED = value(m_op[OP_PSPEED]);
if(m_plr.heal... | 1,982 | 1,066 |
/*
DDS, a bridge double dummy solver.
Copyright (C) 2006-2014 by Bo Haglund /
2014-2018 by Bo Haglund & Soren Hein.
See LICENSE and README.
*/
#include "dds.h"
#include "PBN.h"
int IsCard(const char cardChar);
int ConvertFromPBN(
char const * dealBuff,
unsigned int remainCards[DDS_HANDS][DDS_SUIT... | 3,377 | 1,434 |
// iopyright 2010-2015 RethinkDB, all rights reserved.
#include "clustering/administration/auth/permissions_artificial_table_backend.hpp"
#include "errors.hpp"
#include <boost/algorithm/string/join.hpp>
#include "clustering/administration/artificial_reql_cluster_interface.hpp"
#include "clustering/administration/auth... | 25,928 | 7,379 |
#include "logging/logger_asynchronous.h"
#include <chrono>
#include "logging/manager.h"
namespace logging {
logger_asynchronous::logger_asynchronous()
: state_{static_cast<unsigned>(state::off)}
{
start();
}
logger_asynchronous::~logger_asynchronous()
{
stop();
}
void logger_asynchronous::start()
{
unsigne... | 3,336 | 1,095 |
/*
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2008-2019 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
*... | 45,547 | 12,958 |
#include <mgapiall.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <stddef.h>
#include <math.h>
static int lasterr = 0;
static void Normalize (double *xp, double *yp, double *zp)
{
// normalize
double x = *xp, y = *yp, z = *zp;
double mag = sqrt(x*x + y*y + z*z);
x /= mag;... | 29,800 | 13,050 |
#ifndef __OBOTCHA_HTTP_HEADER_CONNECTION_HPP__
#define __OBOTCHA_HTTP_HEADER_CONNECTION_HPP__
#include "Object.hpp"
#include "StrongPointer.hpp"
#include "String.hpp"
#include "ArrayList.hpp"
namespace obotcha {
DECLARE_CLASS(HttpHeaderConnection) {
public:
_HttpHeaderConnection();
_HttpHeaderConnection(St... | 459 | 167 |
/*
xf86drmMode.h uses the following license:
* Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* Copyright (c) 2007-2008 Dave Airlie <airlied@linux.ie>
* Copyright (c) 2007-2008 Jakob Bornecrantz <wallbraker@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining... | 2,026 | 795 |
#include "Mesh.h"
Mesh::Mesh()
{
}
Mesh::~Mesh()
{
Vertexs.clear();
Normals.clear();
Uvs.clear();
Objects.clear();
}
void Mesh::setName(std::string name){ Name = name; }
std::string* Mesh::getName(){ return &Name; }
void Mesh::AddVertex(float x, float y, float z)
{
glm::vec3 vertex(x, ... | 3,256 | 1,398 |
#pragma once
namespace cgp
{
/** Base class for small fixed-size vectors (vec3, mat3, etc.).
* buffer_stack structure is a generic fixed-size vector, essentially equivalent to a std::array.
* In addition to std::array syntax, buffer_stack provides extra convenient functions (similar to buffer) for numer... | 667 | 186 |
/**
* @author : Maruf Tuhin
* @School : CUET CSE 11
* @Topcoder : the_redback
* @CodeForces : the_redback
* @UVA : the_redback
* @link : http://www.fb.com/maruf.2hin
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long l... | 4,342 | 1,742 |
//
// Created by lab on 16-12-27.
//
#include "reconstruct.h"
namespace tracker{
void Triangulate::Reconstruct3d(vector<Point2f> &matched_L, vector<Point2f> &matched_R, vector<Point3f> &coord_3d) {
size_t num_points=matched_L.size();
//double pixel_size=4.65e-3;
//Z=b*f/d
float d,... | 924 | 370 |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2017-2019 The WaykiChain Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "assetdb.h"
#include "commons/uint256.h"
#include "commons/util/util.... | 1,898 | 640 |
#include <common.hpp>
#include "json_parser.hpp"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/lexical_cast.hpp>
using namespace circle;
template <typename T>
inline T clone(const T &v) { return v; }
template <typename T>
struct object_type { typedef T type; };
template <> ... | 2,411 | 945 |
struct foo
{
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
int i;
int j;
int k;
int l;
int m;
int n;
int o;
int p;
int q;
int r;
foo(int X) :
a(X),
b(X+1),
c(X+3),
d(X+5),
e(X+7),
f(X+9),
g(X+11),
... | 781 | 407 |
/*******************************************************************************
* Copyright (c) 2018, 2018 IBM Corp. and others
* * This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at http://ec... | 4,024 | 1,043 |