text stringlengths 5 1.04M |
|---|
//
// Created by brani on 20.02.20.
//
#ifndef MARCHING_CUBES_VISUALIZER_HPP
#define MARCHING_CUBES_VISUALIZER_HPP
#include "data_holder.h"
class Visualizer {
private:
DataHolder &data_holder;
public:
explicit Visualizer(DataHolder &holder): data_holder(holder) {
}
void showSliceZ(int z, int dur... |
#include <bits/stdc++.h>
using namespace std;
struct Node {
int h, dis, cnt;
bool vis;
} nodes[100010];
struct Edge {
int to, nex, w;
} edges[400010];
int n, m, t, w, cnt;
int read() {
int ret, f = 1;
char ch;
while(!isdigit(ch = getchar())) (ch == '-') && (f = -1);
for(ret = ch - '0'; i... |
// Copyright (c) 2012-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet/wallet.h"
#include <set>
#include <stdint.h>
#include <utility>
#include <vector>
#include "test/test_smil... |
/*
* If not stated otherwise in this file or this component's Licenses.txt file the
* following copyright and licenses apply:
*
* Copyright 2016 RDK Management
*
* 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 ... |
//
// GrovePi Example for using the Grove Relay (http://www.seeedstudio.com/wiki/Grove_-_Relay)
//
// The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
//
// Have a question about this example? Ask on the forums here: http://forum... |
// Copyright 2017 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa/fxfa/parser/cxfa_connectstring.h"
#include <memory>
#include "... |
#include <DataStreams/RemoteBlockOutputStream.h>
#include <Client/Connection.h>
#include <common/logger_useful.h>
#include <Common/NetException.h>
#include <Common/CurrentThread.h>
#include <Interpreters/InternalTextLogsQueue.h>
namespace DB
{
namespace ErrorCodes
{
extern const int UNEXPECTED_PACKET_FROM_SERV... |
#include <iostream>
int main() {
int x, y;
std::cin >> x >> y;
auto sum = [x](int i) { return x + i; };
// The lamda must be defined after we read x, otherwise it will capture the
// undefined value of x.
std::cout << x << " + " << y << " = " << sum(y) << std::endl;
return 0;
}
|
/**-----------------------------------------------------------------------------------------------------------------
* @file message.cpp
* @brief packetize and depacketize HTTP message
*
* Copyright (c) 2019-2019 Jim Zhang 303683086@qq.com
*--------------------------------------------------------------------------... |
#include <ros/ros.h>
#include "ros_hsc3api.h"
int main(int argc, char *argv[])
{
ros::init(argc, argv, "hsc3api_bridge");
ros::NodeHandle n;
ros::AsyncSpinner as(2);
as.start();
Hsc3ApiRos s(n);
s.start();
ros::waitForShutdown();
}
|
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
+---------... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2019 Conceal Network & Conceal Devs
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#include "comwrappers.hpp"
#include <interoplibimports.h>
using OBJECTHANDLE = InteropLib::OBJECTHANDLE;
using RuntimeCallContext = InteropLibImports::RuntimeCallContext;
namespace... |
#include<stdint.h>
#include<assert.h>
class BoundedBuffer {
int capacity;
int64_t head, tail;
int * buffer;
public:
BoundedBuffer(uint32_t sz):capacity(sz), head(0), tail(-1) {
buffer= new int[sz];
}
~BoundedBuffer() {
delete buffer;
}
bool Enq(const int data) {
... |
// Copyright (c) 2003-2020 Xsens Technologies B.V. or subsidiaries worldwide.
// 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 of source code must retain the ... |
/*
* _____ _____ ________ _
* / __// __// __/\ \//
* | | _| \ | \ \ /
* | |_//| /_ | /_ / \
* \____\\____\\____\/__/\\
*
* Graphics Environment for EXperimentations.
* Copyright (C) 2006 INRIA - Project ALICE
*
* This program is free software; you can redistribute it and/or modify
* it ... |
// Copyright (c) 2021 Runeterra Team
// Chris Ohk, Seokmin Hong, Woojin Kim
// We are making my contributions/submissions to this project solely in our
// personal capacity and are not conveying any rights to any intellectual
// property of any third parties.
#include <Runeterra/CardSets/Set2CardsGen.hpp>
namespace R... |
/*===============================================================================
Copyright (c) 2016 PTC Inc. All Rights Reserved.
Copyright (c) 2012-2014 Qualcomm Connected Experiences, Inc. All Rights Reserved.
Vuforia is a trademark of PTC Inc., registered in the United States and other
countries.
==============... |
/// @file
/// @author David Pilger <dpilger26@gmail.com>
/// [GitHub Repository](https://github.com/dpilger26/NumCpp)
/// @version 1.2
///
/// @section License
/// Copyright 2019 David Pilger
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this
/// software and associated documen... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2013 The NovaCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txdb.h"
#include "miner.h"... |
#include "Calculator.h"
Calculator::Calculator(Parser& parser) : m_Parser(parser) {}
CalculateResult Calculator::CalculateForX(std::string value, double xCoord)
{
std::vector<std::string> input = m_Parser.Parse(value);
// Convert all X variables to xCoord
for (unsigned int index = 0; index < input.size(); index++)... |
#include "Job.h"
#include "Utils.h"
#include <ctime>
#include <cstdlib>
#include <climits>
#include <cmath>
/**
* This file is the cpp file for the Job class.
* @file Job.cpp
* @brief cpp file for Engine-Job
* @author Seonghyeon Park
* @date 2020-03-31
*
*/
/**
* @fn Job::Job()
* @brief the function... |
/**
* @file simpleclient.cpp
* @date 03.01.2013
* @author Peter Spiess-Knafl <peter.knafl@gmail.com>
* @brief This is a simple client example.
*/
#include <jsonrpccpp/client.h>
#include <jsonrpccpp/client/connectors/httpclient.h>
#include <iostream>
using namespace jsonrpc;
using namespace std;
int main()
{
... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2020-2021 The Altecoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "transactionrecord.h"
... |
/*
* Copyright (C) 2017 The Android Open Source 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 app... |
#ifndef ADVENT_OF_CODE_08_REGISTER_VM_HPP_INCLUDE_GUARD
#define ADVENT_OF_CODE_08_REGISTER_VM_HPP_INCLUDE_GUARD
#include <optional>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>
enum class Operation {
Increment,
Decrement
};
enum class Comparison {
Eq, // ==
Lt, ... |
/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
* T... |
/*
__________ ____ ___
_____ __ _\______ \_____ _______ ______ __________\ \/ /
/ \| | \ ___/\__ \\_ __ \/ ___// __ \_ __ \ /
| Y Y \ | / | / __ \| | \/\___ \\ ___/| | \/ \
|__|_| /____/|____| (____ /__| /____ ... |
#ifndef STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_LPDF_HPP
#define STAN_MATH_PRIM_MAT_PROB_MULTI_NORMAL_LPDF_HPP
#include <stan/math/prim/mat/err/check_ldlt_factor.hpp>
#include <stan/math/prim/mat/err/check_symmetric.hpp>
#include <stan/math/prim/mat/fun/trace_inv_quad_form_ldlt.hpp>
#include <stan/math/prim/mat/fun/log_d... |
#include "common/http/http1/codec_impl_legacy.h"
#include <cstdint>
#include <memory>
#include <string>
#include "envoy/buffer/buffer.h"
#include "envoy/http/codec.h"
#include "envoy/http/header_map.h"
#include "envoy/network/connection.h"
#include "common/common/enum_to_int.h"
#include "common/common/utility.h"
#in... |
//===-- asan_globals_win.cpp ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
/* STLSOFT:FILE_DEPRECATED */
#include <stlsoft/stlsoft.h>
#if _STLSOFT_VER >= 0x010a0200
# error This file is now obsolete. Instead include the precise header file that you require
#else
# ifdef STLSOFT_PPF_pragma_message_SUPPORT
# pragma message(__FILE__ "(" STLSOFT_STRINGIZE(__LINE__) "): This file is now obsole... |
// 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/net/connection_tester.h"
#include "base/prefs/testing_pref_service.h"
#include "content/public/browser/cookie_store_factory.... |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
// feat/sinusoid-detection-test.cc
// Copyright 2015 Johns Hopkins University (author: Daniel Povey)
// 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/licens... |
#ifndef _MATMUL_HPP
#define _MATMUL_HPP
//Copyright (c) 2018, Sanaxn
//All rights reserved.
//Minimum size for applying GPGPU
#define MIN_SIZE_APPLYING_GPGPU 2048/9
#define MIN_SIZE_APPLYING_GPGPU2 2048*2
#define MIN_SIZE_APPLYING_GPGPU3 2048/9
#include "matrix/multiplication.hpp"
#include "matrix/hadamard.hpp"
#i... |
#include <cpp_api.h>
typedef struct Pair {
float value;
} Pair;
void Pairs_add_component_pair() {
flecs::world ecs;
auto entity = ecs.entity()
.add<Pair, Position>();
test_assert(entity.id() != 0);
test_assert((entity.has<Pair, Position>()));
test_assert((!entity.has<Position, Pair>(... |
#include "guinsoodb/function/scalar/nested_functions.hpp"
#include "guinsoodb/execution/expression_executor.hpp"
#include "guinsoodb/planner/expression/bound_function_expression.hpp"
#include "guinsoodb/common/string_util.hpp"
namespace guinsoodb {
struct StructExtractBindData : public FunctionData {
StructExtractBi... |
// Problem Description
// Given an integer A.
// Compute and return the square root of A.
// If A is not a perfect square, return floor(sqrt(A)).
// DO NOT USE SQRT FUNCTION FROM STANDARD LIBRARY.
// NOTE: Do not use sort function from standard library. Users are expected to solve this in O(log(A)) time.
// Inp... |
// Autogenerated from CppHeaderCreator on 7/27/2020 3:09:42 PM
// Created by Sc2ad
// =========================================================================
#pragma once
#pragma pack(push, 8)
// Begin includes
#include "utils/typedefs.h"
// Including type: System.Attribute
#include "System/Attribute.hpp"
#include "u... |
/**
* MIT License
*
* Copyright (c) 2018-2019 Kravchenko Artyom
*
* 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... |
#pragma once
#include <string>
#include <unordered_map>
#include <cstdint>
std::unordered_map<uint32_t, uint32_t> Assemble(std::string assembly);
|
#include <iostream>
#include <string>
#include <vector>
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#incl... |
/*
findfile.cpp
Поиск (Alt-F7)
*/
/*
Copyright © 1996 Eugene Roshal
Copyright © 2000 Far Group
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 of source code must retain the above co... |
#include <bits/stdc++.h>
using namespace std;
const int SIZE=524288*2;
int num[1000001];
struct segTree{
int size,leaf;
long long tree[SIZE];
segTree(int n): size(n){
leaf = 1;
while(leaf<size) leaf *= 2;
memset(tree,0,sizeof(tree));
}
long long sum(int l, int r){... |
/*
* Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
* 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... |
/*
* Copyright (c) 2017-2018, The Alloy Developers.
*
* This file is part of Alloy.
*
* This file is subject to the terms and conditions defined in the
* file 'LICENSE', which is part of this source code package.
*/
#include "BinaryOutputStreamSerializer.h"
#include <cassert>
#include <stdexcept>
#include "Com... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll getyins(ll x)
{
ll res(0);
for (ll i = 1; i * i <= x; i++)
{
if (!(x % i))
{
(i * i != x)? res += 2: res++;
}
}
return res;
}
ll read()
{
ll x = 0; char ch = getchar();
while (!isdigit... |
#ifndef CENTURION_SYSTEM_CURSOR_HEADER
#define CENTURION_SYSTEM_CURSOR_HEADER
#include <SDL2/SDL.h>
#include <ostream> // ostream
#include <string_view> // string_view
#include "../core/exception.hpp"
namespace cen {
/// \addtogroup video
/// \{
/**
* \enum system_cursor
*
* \brief Represents the various... |
/*
* Copyright 1993-2014 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO LICENSEE:
*
* This source code and/or documentation ("Licensed Deliverables") are
* subject to NVIDIA intellectual property rights under U.S. and
* international Copyright laws.
*
* These Licensed Deliverables contained herein is ... |
/*
* 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 ... |
#include <stdio.h>
#include <cmath>
#include <lvr2/io/Timestamp.hpp>
// TODO reorder colors etc...
namespace lvr2{
template <typename BaseVecT>
PointOctree<BaseVecT>::PointOctree(PointBufferPtr& points, int depth) : m_points(*(points->getFloatChannel("points")))
{
// FloatChannelOptional pts_channel... |
/***************************************************************
*
* Copyright (C) 1990-2007, 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... |
//%2005////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Cor... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2016 Facebook, Inc. (http://www.facebook.com) |
+---------... |
// Copyright (C) 2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "ngraph/node.hpp"
#include "openvino/op/op.hpp"
namespace ov {
namespace intel_gna {
namespace op {
/// \brief PWL activation function
class Pwl : public ov::op::Op {
public:
OPENVINO_OP("Pwl", "intel_gna", ov... |
/**************************************************************************/
/* */
/* WWIV Version 5.x */
/* Copyright (C)1998-2020, WWIV Software Services */
/* ... |
// VirtualDub - Video processing and capture application
// Graphics support library
// Copyright (C) 1998-2009 Avery Lee
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 o... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/dns/mock_host_resolver.h"
#include <string>
#include <vector>
#include "base/bind.h"
#include "base/memory/ref_counted.h"
#include "ba... |
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int lock_one, lock_two;
cin >> lock_one >> lock_two;
if (lock_one == 0) {
cout << "yes" << endl;
}
else {
for (int i = 1; i < 10000; ++i)
if ( (i % 2 == 1 && lock_two == i) || (i % 2 == 0 && lock_one == i)) {... |
#include "pch.h"
#include "DX12Texture2DArray.h"
#include "DX12Renderer.h"
#include "stb_image.h"
#include "DX12Sampler2D.h"
DX12Texture2DArray::DX12Texture2DArray(DX12Renderer* renderer)
: m_renderer(renderer)
, m_rgba(nullptr)
{}
DX12Texture2DArray::~DX12Texture2DArray() {
if (m_rgba) {
free(m_rgba);
m_rg... |
#ifndef POSITIONSYSTEM_HPP
#define POSITIONSYSTEM_HPP
void MovementUpdate(float dt);
#endif // POSITIONSYSTEM_HPP
|
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "ActionHistoryCallback.h"
#include <MCore/Source/LogManager.h>
#include <EMotionFX/Source/E... |
#include "LeafCmd.h"
LeafCmd::LeafCmd(Json::Value json)
: ICmd(json)
{
}
|
/** @file
ATS plugin to do combo handling.
@section license License
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 th... |
/*******************************************************************************
Copyright(c) 2015-2018 LORD Corporation. All rights reserved.
MIT Licensed. See the included LICENSE.txt for a copy of the full MIT License.
*******************************************************************************/
#include "stdafx... |
// Copyright (c) 2021 F. Lotfi & D. Kane 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 <catch2/catch.hpp>
#include <fstream>
#include <glm/glm.hpp>
#include "fileParsers/imageExporter.h"
#include "fileParsers/... |
#include "LightIcon.h"
#include <stdexcept>
#include <glm/gtc/matrix_transform.hpp>
#define DIRLIGHT_ICON_POS_HEIGHT 5.0f
#define DIRLIGHT_ICON_OFFSET_FACTOR 3.0f
#define LIGHT_ICON_SIZE 256.0f
#define LIGHT_ICON_IMAGE "light-icons.png"
LightIcon::LightIcon(LightSptr light) : LightIcon(nullptr, light) {}... |
/*
* Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* 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... |
// Copyright (c) 2017-2021 Thomas Fussell
//
// 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, merge, pu... |
// 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 "components/policy/core/common/cloud/cloud_policy_validator.h"
#include <stddef.h>
#include <utility>
#include "base/bind_helpers.h"
#inclu... |
#include <QtWidgets>
#include <QList>
#include <QPrinter>
#include <QPrintDialog>
#include <QPainter>
#include "vmainwindow.h"
#include "vdirectorytree.h"
#include "vnote.h"
#include "vfilelist.h"
#include "vconfigmanager.h"
#include "utils/vutils.h"
#include "veditarea.h"
#include "voutline.h"
#include "vnotebookselec... |
// Copyright 2019-2021 Cambridge Quantum Computing
//
// 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... |
//#include <cstdio>
//#include <cmath>
//#include <iostream>
//#include <sstream>
//#include <string>
//#include <vector>
//#include <map>
//#include <queue>
//#include <algorithm>
//
//#ifdef _DEBUG
//#define DMP(x) cerr << #x << ": " << x << "\n"
//#else
//#define DMP(x) ((void)0)
//#endif
//
//const int MOD = 100000... |
// Copyright 2018 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/autofill/payments/migratable_card_view.h"
#include "base/bind.h"
#include "chrome/app/vector_icons/vector_icons.h"
#inc... |
/*
* Copyright (c) 2013, Ford Motor Company
* 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 condit... |
/*=========================================================================
Program: VMTK
Module: $RCSfile: vtkvmtkPolyDataNetworkExtraction.cxx,v $
Language: C++
Date: $Date: 2006/07/17 09:53:14 $
Version: $Revision: 1.6 $
Copyright (c) Luca Antiga, David Steinman. All rights reserved.
See LICENCE f... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cctype>
using namespace std;
class LetterFreq {
public:
vector <int> getFreqs(vector <string> doc) {
vector<int> sol(26, 0);
for (int i=0; i<(int)doc.si... |
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
/*
* @PLUGIN_CLASS@.cpp
*
* Created on: Jan 8, 2018
*
* Copyright (C) 2018 Pat Deegan, https://psychogenic.com
*
* This file is a supporting component of the
* Coraline [https://coraline.psychogenic.com/] plugin
* skeleton/code generator [https://github.com/psychogenic/coraline-dev-plugin]
*
* It... |
////////////////////////////////////////////////////////////////
//
// Interrupt descriptor table low-level operations
//
// File: idt.hpp
// Date: 08 Feb 2021
//
// Copyright (c) 2017 - 2021, Igor Baklykov
// All rights reserved.
//
//
#pragma once
#include <cstdint>
#include <array>
#include <ty... |
/* This testcase is part of GDB, the GNU debugger.
Copyright 1998, 1999, 2004, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Fo... |
/*
tinyTLS project
Copyright 2015 Nesterov A.
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,... |
/*
* 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... |
#include "Enemy.h"
#include "FieldNames.h"
REGISTER_FINISH(Enemy, ScriptBase) {}
void Enemy::OnDisabled()
{
if (_isInTube)
GetGameObject()->CallDestroy();
}
void Enemy::OnCollide(CollideEvent& e)
{
if (e.GetGameObject()->GetTag().Collide(_collideIgnore))
{
e.SetIsHandled(true);
}
}
void Enemy::Load(nlohmann... |
/*
Copyright (c) 2011, Siemens Corporate Research a Division of Siemens Corporation
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.... |
/*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#include <pr... |
// 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 "content/simple/simple_browser_main_parts.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#includ... |
/* Copyright 2019 École Polytechnique Fédérale de Lausanne. 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 a... |
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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)
//
// Preprocessed version of "boost/mpl/or.hpp" header
// -- DO NOT modify by hand!
namespace bx { namespace mpl {
... |
// Copyright (c) 2017 Ollix. 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 applicable ... |
/*
console.cpp
Console functions
*/
/*
Copyright © 2010 Far Group
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 of source code must retain the above copyright
notice, this list ... |
/* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "datamanlite/Slice.h"
namespace nebula {
namespace dataman {
namespace codec {
// 2 small internal utility fun... |
// 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 "remoting/host/plugin/host_script_object.h"
#include "base/bind.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#in... |
/**
* Aufgabe 11.7
*/
#include <cassert>
#include <iostream>
#include "polynomial.hpp"
int main() {
int p_n = 0, q_n = 0;
std::cout << "Polynomial p: ";
std::cout << "deg(p) = ";
std::cin >> p_n;
Polynomial p(p_n);
p.scanPoly(p_n);
p.printPoly();
std::cout << std::endl;
std::c... |
// This file is licensed under the Elastic License 2.0. Copyright 2021-present, StarRocks Limited.
#include "exec/vectorized/es_http_components.h"
#include <fmt/format.h>
#include "column/column_helper.h"
#include "column/nullable_column.h"
#include "common/config.h"
#include "runtime/primitive_type.h"
#include "run... |
// -----------------------------------------------------------------------------------------------------
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
// This file may be used, modified and/or redistributed under the terms of th... |
// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... |
/**
* @file <argos3/plugins/simulator/actuators/differential_steering_default_actuator.cpp>
*
* @author Carlo Pinciroli - <ilpincy@gmail.com>
*/
#include "differential_steering_default_actuator.h"
#include <argos3/core/utility/logging/argos_log.h>
#include <argos3/core/utility/plugins/factory.h>
namespace argos {... |
//
// Created by Zhuo Chen on 2019-06-01.
//
#ifndef DM_DELETE_STATEMENT_HPP
#define DM_DELETE_STATEMENT_HPP
#include "../../../common/common.hpp"
class Delete_Statement: public Statement
{
std::string table_name;
ExpressionList * delete_cond;
public:
Delete_Statement(const std::string & table_name, ExpressionLis... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.