text stringlengths 3.08k 12.5k |
|---|
#include <signal.h>
#include <iostream>
#include <string>
#include <cstring>
#include <thread>
#include <chrono>
#include <cstddef>
#include "libipc/ipc.h"
#include <atomic>
#include "libipc/shm.h"
#include "capo/random.hpp"
#include <unordered_map>
using string = std::string;
template <class K, class V>
using map ... |
/* <NAME> `gentilkiwi`
http://blog.gentilkiwi.com
<EMAIL>
Licence : http://creativecommons.org/licenses/by/3.0/fr/
*/
#include "mod_secacl.h"
bool mod_secacl::nullSdToHandle(PHANDLE monHandle, SE_OBJECT_TYPE monType)
{
PSECURITY_DESCRIPTOR newSD = NULL;
ULONG laTaille;
bool succes = false;
if(BuildSecurityDesc... |
/* -*- Mode: C++; c-basic-offset:4 ; -*- */
/*
*
* (C) 2003 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#include "mpi.h"
#include "mpitestconf.h"
#ifdef HAVE_IOSTREAM
// Not all C++ compilers have iostream instead of iostream.h
#include <iostream>
#ifdef HAVE_NAMESPACE_STD
// Th... |
/******************************************************************************
* Copyright (c) 2013 Potential Ventures Ltd
* Copyright (c) 2013 SolarFlare Communications Inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... |
/*
* Copyright 2022 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "tests/Test.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkSurface.h"
#incl... |
#include <xmpp/jid.hpp>
#include <algorithm>
#include <cstring>
#include <map>
#include <biboumi.h>
#ifdef LIBIDN_FOUND
#include <stringprep.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <utils/scopeguard.hpp>
#include <set>
#endif
#include <logger/logger.hpp>
Jid::Jid(const std... |
/*
Copyright 2017 TeamWin
This file is part of TWRP/TeamWin Recovery Project.
TWRP 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 of the License, or
(at your option) any later version.
T... |
/*
* Copyright (C) 2013 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 applicable ... |
/*
* Copyright (C) 2019 Intel Corporation.
* 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(s),
* this list of c... |
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* <NAME> <<EMAIL>>
*
* Copyright:
* Fraunhofer ITWM, 2017
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby grant... |
#include <bits/stdc++.h>
#define maxk 31
#define maxn 1001
#define pb push_back
using namespace std;
int T,n,k,p;
int dad[maxn];
int ar[maxn][maxk];
int cost[maxk][maxk];
int best[maxn][maxk];
int dp[maxn][maxk][maxk];
vector<int> Q;
vector<int> adj[maxn];
void io() {
freopen("input.txt","r",stdin);
freopen("output... |
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/virtualization/bin/vmm/vcpu.h"
#include <lib/fit/defer.h>
#include <lib/syslog/cpp/macros.h>
#include <lib/zx/thread.h>
#include <zircon/sta... |
#include <processing-formats.h>
#include <gtest/gtest.h>
#include <string>
// test data
#define HYPOSTRING "{\"TimeError\":1.984,\"Time\":\"2015-12-28T21:32:24.017Z\",\"LongitudeError\":22.64,\"LatitudeError\":12.5,\"DepthError\":2.44,\"Latitude\":40.3344,\"Longitude\":-121.44,\"Depth\":32.44}" // NOLINT
#define LATI... |
#include "gm_ast.h"
#include "gm_frontend.h"
#include "gm_traverse.h"
#include "gm_transform_helper.h"
#include "gm_misc.h"
#include "gm_builtin.h"
#include "gm_ind_opt.h"
#include "gm_rw_analysis.h"
//====================================================================
// syntax sugar elimination (after type resolutio... |
/*
* globalpropertymodel.cpp
*
* Created on: 02.02.2013
* @author <NAME>
*/
#include "globalpropertymodel.h"
#include "enums.h"
#include "vptr.h"
#include <QDebug>
#include <QPoint>
#include <QColor>
GlobalPropertyModel::GlobalPropertyModel()
{
m_properties = new GlobalPropertyGroup();
... |
// Advent of Code 2019, Day 23
// Copyright 2020 by <NAME>
// https://adventofcode.com/2019/day/23
#include <sstream>
#include "intcode.h"
#define DEBUG_VERBOSE 1
// Define the network as a vector of Nodes.
class Node;
typedef std::vector<Node*> Network;
// A single network-attached IntCode computer.
class Node {
p... |
#include "BlobTool.h"
sb::BlobTool::BlobTool( const std::vector<double>& splitRatio, const cv::Size& imageSize )
{
_splitBoxes.clear();
{
int y = 0;
for( double ratio : splitRatio ) {
int h = static_cast<int>(round( 1.0 * imageSize.height * ratio ));
if( y + h > imageSize.height ) h = imageSize.height - y... |
/*
* Challenge questions and program design by <NAME>, Winter 2020.
* Stylometry example taken from <NAME>.
*/
#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <numeric>
#include <cmath>
using std::cout; using std::endl;
using std::vector; using std::string;
using std::ifs... |
// Copyright: (2017) <NAME>
// License: BSD-3
//
// 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... |
#define __CL_ENABLE_EXCEPTIONS
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <CL/cl.hpp>
#define MAX_SOURCE_SIZE (0x100000)
typedef struct _cords
{
int x;
int y;
float length = 0.0;
} cords;
void check_err(int status,char* line_num)
{
if (status != CL_SUCCESS)
{
printf("OpenCL er... |
/**
Functions used to interface to the ezLCD-301 smart touch LCD
http://store.earthlcd.com/ezLCD-301
Not used because the LCD seemed to have some sort of hardware problem.
This code was used in the context of the SCAD data logger.
This code just treats the LCD as a big character display. It divides the screen
into ... |
/// \ingroup newmat
///@{
/// \file tmt6.cpp
/// Part of matrix library test program.
//#define WANT_STREAM
#define WANT_MATH
#include "include.h"
#include "newmatap.h"
#include "tmt.h"
#ifdef use_namespace
using namespace NEWMAT;
#endif
/**************************** test program *******... |
// Sketchpad005_STLOftenOverlooked.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
#include <vector>
#include <string>
#include <iterator>
#include <algorithm>
void diplayVector(std::vector<int>& aVectorContainer)
{
std::cout ... |
/*
* Copyright (c) 2017, <NAME>
*
* 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 conditions ... |
#include "AoC/2017/problem_14.h"
#include "AoC/2017/problem_10.h"
#include "AoC/problems_map.h"
#include "AoC/utils/2d_array.h"
#include "AoC/utils/algo.h"
#include "AoC/utils/geo.h"
#include "AoC/utils/ranges/enumerate.h"
#include "range/v3/algorithm/copy.hpp"
#include "range/v3/algorithm/count.hpp"
#include "range/... |
#include "framebuffer.h"
#include "utility/imageio.h"
Framebuffer::Framebuffer(const std::string& filename, const int& width, const int& height)
: m_filename(filename), m_width(width), m_height(height)
{
m_name = GetFilename(m_filename);
m_ext = GetFileExtension(m_filename);
m_outputBuffer = new sRGB[... |
#include <iostream>
#include <QApplication>
#include <QJsonDocument>
#include <QJsonObject>
#include <QMainWindow>
#include <QCommandLineParser>
#include <QJForm/qjform.h>
bool asBash=false;
void printJsonBash(QJsonValue J, std::string prefix)
{
if( J.isObject() )
{
auto Jo = J.toObject();
for... |
/*
* @CopyRight:
* FISCO-BCOS 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 of the License, or
* (at your option) any later version.
*
* FISCO-BCOS is distributed in the hope that it ... |
#include <iostream>
#include "MDB1.h"
#include "SaveFile.h"
#include "EXPA.h"
#include "AFS2.h"
void printUse() {
std::cout << "DSCSTools v1.1.0 by SydMontague | https://github.com/SydMontague/DSCSTools/" << std::endl;
std::cout << "Modes:" << std::endl;
std::cout << " --extract <sourceFile> <targetFolder> [--com... |
/*
* (C) Copyright 2014 Kurento (http://kurento.org/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010-2015, University of Washington and Battelle
// Memorial Institute. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following cond... |
/*
* MIT License
*
* Copyright (c) 2018 <NAME>
*
* 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, m... |
#include "Globule.h"
#include "gfx/gl/buffer/Buffer.h"
#include "gfx/gl/texture/Texture2D.h"
#include "gfx/gl/buffer/VertexArray.h"
#include <Logging.h>
#include <mutils/time/profiler.h>
#include <glm/glm.hpp>
using namespace render::chunk;
/**
* Initializes a new globule.
*
* This allocates the vertex and inde... |
// Copyright 2017 The Ray 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 agreed to i... |
#include <iostream>
#include <string>
#include "setup.h"
#include "sdl.h"
#include "exercises.h"
SDL_Surface* optimize(SDL_Surface* window_surface, SDL_Surface* in) {
SDL_Surface* opt = SDL_ConvertSurface(in, window_surface->format, 0);
if (opt == nullptr) {
std::cerr << "Unable to optimize surface." << std::... |
#include "face_api.h"
face_api::face_api()
{
setup_face_model();
high_quality = false;
face_image = "";
}
face_api::~face_api()
{
}
/****************************************
* PUBLIC APIs
*
****************************************/
void face_api::set_input_source(string image_file)
{
face_i... |
#include "StdAfx.h"
#include ".\segmentpointgraphprocessor.h"
#include "IntersectingPointGraph.h"
#include "PointGraph.h"
#include "SegmentPointGraph.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
SegmentPointGraphProcessor::SegmentPointGraphProcessor(Graph* grap... |
//----------------------------------------------------
// file: LandscapeEditor.cpp
//----------------------------------------------------
#include "Pch.h"
#pragma hdrstop
#include "NetDeviceLog.h"
#include "LandscapeEditor.h"
#include "Landscape.h"
#include "SceneClassList.h"
#include "MenuTemplate.rh"
... |
#include <iostream>
#include <vector>
#include <stack>
#include <unordered_set>
using namespace std;
class Solution {
private:
int m, n;
inline bool valid_ij(int i, int j) {
if (i < 0 || i >= m || j < 0 || j >= n) return false;
return true;
}
public:
void solve(vector<vector<char>>& bo... |
#include "opm.h"
#include "ymfm_opm.h"
#include "ymfm_fm.ipp"
#include <ctime>
#include <iostream>
#include <chrono>
#include <cmath>
// reference for timing = https://www.cplusplus.com/reference/chrono/high_resolution_clock/now/
#define BUFFERSIZE 64000
using namespace std::chrono;
class ym2151_interface : public ... |
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicabl... |
/*
* Copyright 2003-2005, <NAME>, <EMAIL>. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include <driver_settings.h>
#include <Directory.h>
#include <Entry.h>
#include <Path.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
bool gVerbose = false;
// Just add your test s... |
#include<iostream>
#include<set>
#include<stack>
#include<vector>
#include<algorithm>
#include<math.h>
#define ROW 10
#define COL 11
using namespace std;
struct cell{
int parent_i,parent_j;
double f,g;
};
bool is_valid(int i, int j)
{
return (i>=0 && i < ROW && j>=0 && j < COL);
}
bool is_unblocked(int gr... |
// ****************************************************************************
// NOTICE
//
// This is the copyright work of The MITRE Corporation, and was produced
// for the U. S. Government under Contract Number DTFAWA-10-C-00080, and
// is subject to Federal Aviation Administration Acquisition Management
// System... |
#include "jvccthread.h"
#include <QDebug>
FILE *pFile = NULL;
AVFormatContext *pFormatCtx;
int i, videoStream;
AVCodecContext *pCodecCtx;
AVCodec *pCodec;
AVFrame *pFrame;
AVFrame *pFrameRGB;
AVPacket packet;
int frameFinished;
int numBytes;
uint8_t *buffer;
unsigned char *... |
#pragma once
#include <inttypes.h>
#include <iostream>
#include <vector>
#include <array>
#include <codecvt>
#pragma message("serializers.hpp must disappear")
// because
// os << cbytes_ref<T>(obj) << ...
// looks better than
// os.read((char*)&obj, sizeof(obj)).read(...
template <typename T>
class ... |
//
// Created by <NAME> on 12/4/16.
//
#include <armadillo>
#include "BinaryLayer.h"
#include "TestBinaryLayer.h"
//#define DEBUG 0
using namespace bd;
bool TestBinaryLayer::test_binarizeMat_single(uint rows, uint cols) {
arma::mat values = arma::randn(rows, cols);
BinaryLayer bl = BinaryLayer(cols, rows);... |
/*
* GreedyPacker.cpp
*
* Created on: Nov 2, 2011
* Author: dkoes
*/
#include "GreedyPacker.h"
#include <boost/multi_array.hpp>
using namespace lemon;
typedef bool (*ICDComp)(const IntraClusterDist& lhs,
const IntraClusterDist& rhs);
static bool reverseDist(const IntraClusterDist& lhs,
const IntraClu... |
#include "common.h"
#ifdef ANDROID
#include <android/log.h>
#endif
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdarg.h>
#include <fstream>
using namespace std;
#ifdef __LP64__
#define SYSTEM_VENDOR_LIB_PREFIX "/system/vendor/lib64/egl/"
#define SYSTEM_LIB_PREFIX "/system/lib64/egl/... |
/*! @file */
/*
Copyright (C) 2007, kobake
Copyright (C) 2018-2021, Sakura Editor Organization
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.
Permission is granted to anyone to use th... |
/* filter_uni.cpp
Runs the univariate Kalman filter with the exact initialization.
To compile in MATLAB, see the make.m script.
This function uses the matrix library armadillo: http://arma.sourceforge.net/
The utility Matlab2cpp 0.5 was used in the initial stages of converting this
from Matlab. Note that many cha... |
#include "Hud.h"
#include "PauseScene.h"
#include "src/engine/scene/camera/OrthoCamera.h"
#include "src/engine/scene/Button.h"
#include "src/engine/scene/RootNode.h"
#include "src/engine/render/Canvas.h"
#include "src/engine/render/Renderer.h"
#include "src/engine/Engine.h"
static const float PAUSE_BUTTON_WIDTH = 64.0... |
/***************************************************************************
LibBandit - Multi-Armed Bandit Library
Written in 2015 by <NAME> <EMAIL>
To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This s... |
/**
File: gas.cpp
Author: <NAME>
Date: 01/04/15
Contributors: ...
Language: C++
Compiler Options: -lglfw3 -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo
Compile Instructions
- OSX: g++ -O3 -o ParticleSimulation.out src/Particle.cpp src/Interaction.cpp src/Particl... |
// Licensed to the LF AI & Data foundation 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 not use th... |
#include "world.hpp"
#include "./../shared/game_settings.hpp"
#include "agar.hpp"
#include "cell.hpp"
#include "context.hpp"
#include "grid.hpp"
#include "network_client.hpp"
#include "virus.hpp"
#include <SDL2/SDL.h>
#include <cmath>
#include <memory>
#include <random>
#include <vector>
World::World(std::string playe... |
#include <opencv2/dnn.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/objdetect.hpp>
#include <iostream>
// using namespace cv;
using namespace std;
static cv::Mat visualize(cv::Mat input, cv::Mat faces, bool print_flag=false, double fps=-1, int thickness=2)
{
cv::Mat output ... |
#include <XlibKeyConnection.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XKBlib.h>
#include <algorithm>
#include <numeric>
#include <unistd.h>
#include <sys/timeb.h>
namespace
{
// Wrapper around XNextEvent which waits for a maximum amount of time
// instead of blocking. Returns true if eventOut was p... |
/****************************************************************************
* Copyright: National ICT Australia, 2007 - 2010 *
* Developed at the ATP lab, Networked Systems research theme *
* Author(s): <NAME> *
* This file is di... |
// Filename: dataGraphTraverser.cxx
// Created by: drose (11Mar02)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. Yo... |
#ifndef BOARD_SIZE
#include "graphics.h"
#include "drawBoard.h"
#include "constants.h"
#endif
// ** This functions shows the pointer in point (i,j) of the board
void showPointer(int i, int j) {
setcolor(BLUE);
setlinestyle(SOLID_LINE, 0xFFFF, 7);
rectangle(getCoordinate(i, j, 'i') - 4, getCoordinate(i, j,... |
/*
+----------------------------------------------------------------------+
| Swoole |
+----------------------------------------------------------------------+
| This source file is subject to version 2.0 of the Apache license, |
| that is bundl... |
//--------------------------------------------------------------------------
// Copyright (C) 2014-2018 Cisco and/or its affiliates. All rights reserved.
// Copyright (C) 2011-2013 Sourcefire, Inc.
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public... |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010, Image Engine Design 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:
//
// * Re... |
#include "src/s3_cmds/zgw_s3_object.h"
#include "slash/include/env.h"
#include "slash/include/slash_string.h"
#include "src/zgwstore/zgw_define.h"
#include "src/s3_cmds/zgw_s3_xml.h"
#include "src/zgw_utils.h"
bool PutObjectCopyCmd::DoInitial() {
std::string source_path = req_headers_.at("x-amz-copy-source");
if... |
#include "2019/day22/cpp/include/deck.hpp"
#include <cassert>
#include "utils/cpp/include/utils.hpp"
Deck::Deck(std::string file_name, int64_t num_cards)
: m_file_name(file_name), m_num_cards(num_cards), m_a(), m_b() {
parse(read_shuffle(), m_a, m_b);
}
void Deck::parse(std::vector<std::pair<char, int>> instr... |
/*********************************************************************
(c) <NAME> 2017 - 2021
http://trederia.blogspot.com
xygineXT - Zlib license.
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 softw... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include <AvailabilityMacros.h>
#include <sys/vnode.h>
#include "VNodeHandler.hpp"
#include "OpNames.hpp"
typedef struct {
#ifdef MAC_OS_X_VERSION_10_15
uint actio... |
#include "sim_field_view.hpp"
#include <QFont>
#include <QMouseEvent>
#include <QPainter>
#include <rj_common/network.hpp>
#include <rj_constants/constants.hpp>
#include <rj_constants/topic_names.hpp>
#include <rj_msgs/msg/ball_placement.hpp>
#include <rj_msgs/msg/robot_placement.hpp>
using namespace boost;
using na... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef struct qnmd//思来想去还是用链表吧
{
char str[100];
struct qnmd* next;
}nmd;
char temp_s[100], m[100], n[100], input_c, temp_temp[100];
int v, i, j, t = 0, r = 0, count = 0, m1, n1, temp1, temp2, l, flag = 0;
nmd* p, * q, * head;
char ch;
FILE* vvv;
int main()
{... |
/*
* Copyright (c) 2019 - 2021 Geode-solutions
*
* 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, mer... |
/*****************************************************************************************[Proof.C]
MiniSat -- Copyright (c) 2003-2005, <NAME>, <NAME>
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 Softwa... |
//
// LWSamplerBurglary.cpp
// swift
//
// Created by <NAME> on 2/9/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#include <random>
#include <chrono>
#include "LWSamplerBurglary.h"
namespace lwsampler {
std::default_random_engine gen;
std::bernoulli_distribution dist1(0.001);
std::bernoulli_dis... |
// license:BSD-3-Clause
// copyright-holders:<NAME>
/***************************************************************************
pngcmp.c
PNG comparison (based on regrep.c)
****************************************************************************/
#include "corefile.h"
#include "png.h"
#include "osdfile... |
#include <algorithm>
#include <set>
#include <iterator>
#include "pass/pass.hpp"
#include "visitor/visitor.hpp"
#include "visitor/util.hpp"
using namespace liong;
bool func_var_eq(
const MemoryFunctionVariableRef& a,
const MemoryFunctionVariableRef& b
) {
return a->structured_eq(b);
}
struct FunctionVariableRe... |
/*
* Support code used by rashelper to set up a shortcut. Isolated to a separate
* file because setting up shortcuts is a pretty complicate undertaking.
*/
#include <objbase.h>
#include <stdio.h>
#include <windows.h>
#include <shlobj.h>
/*#include <afxwin.h> CString, but this include is not available in VS ... |
/*
This file is part of cpp-ethereum.
cpp-ethereum 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 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the... |
/*
* Copyright 2014 Google Inc. 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 applica... |
#include "stdafx.h"
#include "InkEditorPresenter.h"
#include "IInkEditorModel.h"
#include "IInkEditorView.h"
#include "INoteListModel.h"
#include "INoteListView.h"
#include "IUserModel.h"
#include "Resource.h"
#include "Timestamp.h"
#include "Tools.h"
#include "Transaction.h"
using namespace boost;
usin... |
/*!
* \file unit_flow.cpp
*/
#include "unit_flow.h"
using namespace std;
void unit_Flow_constructor(){
cout << "FLOW CONSTRUCTOR TEST STARTING..." << endl;
// TEST 1 - DEFAULT CONSTRUCTOR
Flow *def = new ExponentialFlow();
assert(def->getName() == "default1");
assert(def->getOrigin() == null... |
/* =========FOR INTERNAL USE ONLY. NO DISTRIBUTION PLEASE ========== */
/*********************************************************************
Copyright 1999-2008, University of Cincinnati. All rights reserved.
By using this software the USER indicates that he or she has read,
understood and will comply with the f... |
#include "StrafeQuality.hpp"
#include "Features/Session.hpp"
#include "Features/Timer/PauseTimer.hpp"
#include "Modules/Engine.hpp"
#include "Modules/Surface.hpp"
#include <cstring>
#include <vector>
#define TICKS_AVG 40
enum class StrafeDir {
NONE,
LEFT,
RIGHT,
};
struct TickInfo {
bool grounded;
bool landed... |
/*Begining of Auto generated code by Atmel studio */
#include <Arduino.h>
/*End of auto generated code by Atmel studio */
//http://www.instructables.com/id/How-to-Load-Programs-to-an-Arduino-UNO-From-Atmel-/
//or
//https://medium.com/jungletronics/how-to-load-programs-to-an-arduino-uno-from-atmel-studio-7-83c8d... |
/**************************************************************************
***
*** Copyright (c) 2000-2006 Regents of the University of Michigan,
*** <NAME>, <NAME>, <NAME>
*** and <NAME>
***
*** Contact author(s): <EMAIL>, <EMAIL>
*** Original Affiliation: University of Michigan, EECS ... |
//
// LucusImageFormatPNG.cpp
// LucusGame
//
// Created by <NAME> on 21/03/2020.
// Copyright © 2020 <NAME>. All rights reserved.
//
#include "LucusImageFormatPNG.h"
#include "LucusImage.h"
#include <png.h>
using namespace LucusEngine;
static void _pngRead ( png_structp png, png_bytep buffer, png_size_t size )... |
/*
* Copyright (C) 2015-2016 <NAME>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI... |
/*
* Copyright (C) 2015-2018 Opersys inc.
*
* 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 ... |
#include "render_view.hpp"
RenderView::RenderView(
QRect viewportArea
, QString transformationX
, QString transformationY
, QStringList paramNames
, QWidget * /*parent*/ // unused
){
viewRectAlwaysVisible = viewportArea;
//updateViewRect( this->size() );
// initialize parser
try {
// clear
... |
//===-- UPTInstPrinter.cpp - Convert UPT MCInst to assembly syntax ----===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------------------... |
/******************************************************************************
* Project: PROJ.4
* Purpose: Code to manage the list of currently loaded (cached) PJ_GRIDINFOs
* See pj_gridinfo.c for details of loading individual grids.
* Author: <NAME>, <EMAIL>
*
************************************... |
#include "jobscheduler.h"
#include <exception>
#include <mutex>
#include <condition_variable>
#include <chrono>
#include "log.h"
jobResultFct JobScheduler::no_op_fct = [] (const std::shared_ptr<JobResult>&) {};
/*
* Exceptions related to the JobScheduler class
*/
class JobSchedulerException: publi... |
/*
* FILE: 913C.cpp
*
* @author: <NAME> <arafathasanjenin[at]gmail[dot]com>
*
* LINK:
*
* DATE CREATED: 08-01-18 21:35:31 (+06)
* LAST MODIFIED: 08-01-18 22:47:10 (+06)
*
* DESCRIPTION:
*
* DEVELOPMENT HISTORY:
* Date Version Description
* ------------------------------------------------------... |
/****************************************************************************
* Simple language support (for notation only)
* Author: <NAME>
* License: MIT license. Full text of license is in associated file LICENSE
* Copyright 2010-2016, <NAME> <billforsternz at gmail dot com>
***************************... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
#include <set>
using namespace std;
vector<int> x1, y1, x2, y2; // ll, ur
int N;
inline bool contains(int a, int b, int c, int d, int i) {
return a<=x... |
/*
* 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 ... |
//
// Created by <NAME> on 6/3/21.
//
#include "send_email_task.h"
#include <unordered_set>
#include "actions/action.h"
#include <thread>
enum ConnectionState {
INIT,
TLS,
SEND,
CLOSE,
};
enum EmailState {
MAIL,
RCPT,
DATA,
DONE,
};
void SendEmailTask::perform() {
for (auto& ent... |
#include "Menu.h"
#include <Utilities/Logger.h>
#include <Utilities/JSON.h>
#include <perflib.h>
MenuState::MenuState()
{
}
Audio::AudioClip* adc;
std::string username;
int stage = 0;
Json::Value messageRoot;
#include <iostream>
void MenuState::init()
{
dialog = new Dialogue();
dial = new DialogStack(dialog);
... |
/*
https://www.geeksforgeeks.org/largest-independent-set-problem-dp-26/
Given a Binary Tree, find size of the Largest Independent Set(LIS) in it.
A subset of all tree nodes is an independent set if there is no edge between any two nodes of the subset.
For example, consider the following binary tree.
The largest ind... |
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2018 <NAME>
//
// 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, includin... |
// Copyright [2017] <MaoMao>
#include <string.h>
#include <stdio.h>
struct Node
{
float freq;
char c;
char code;
int code_len;
Node* parent;
Node* left;
Node* right;
Node()
{
freq = 0.0;
c = 0;
code = 0;
code_len = 0;
parent = nullptr;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.