text
stringlengths
3.08k
12.5k
/* * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * 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 of the License, or * (at your option) any later version. * ...
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
/* * Copyright 2007-2021 CM4all GmbH * All rights reserved. * * author: <NAME> <<EMAIL>> * * 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 ...
/* MIT License * * Copyright (c) 2019 <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, merg...
// #include <exception> #include "helpers/StringUtils.h" #include "INIReader.h" #include "CandidatesINIReader.h" CandidatesINIReader::CandidatesINIReader(const std::string& antaresIntercoFile, const std::string& areaFile) { _intercoFileData = ReadAntaresIntercoFile(antaresIntercoFile); _areaNames = ReadAr...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define all(x) (x).begin(), (x).end() #define sz(x) ((int)(x).size()) typedef vector<int> vi; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; mt19937 mrand(random_device{}()); const ll mod = 1000000007; int rnd(int x) {...
#include <bits/stdc++.h> #include <functional> #include "src/mc-graph.hpp" #include "src/input-parser.hpp" using namespace std; bool stripmode = false; int GetWeight() { return -1 + (rand()%3); } int GetFullWeight() { return -1 + (rand()%2 == 0 ? 2 : 0); } int GetGridNodeId(int h, int w, int r, int c) { ...
// [WriteFile Name=PlayAKmlTour, Category=Layers] // [Legal] // Copyright 2019 Esri. // 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...
//%LICENSE//////////////////////////////////////////////////////////////// // // Licensed to The Open Group (TOG) under one or more contributor license // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with // this work for additional information regarding copyright ownership. // Each contributor lice...
/* -------------------------------------------------------------------------- * * OpenSim Moco: MocoMarkerTrackingGoal.h * * -------------------------------------------------------------------------- * * Copyright (c) 2017 Stanford University and the Authors * ...
// // Created by Gary on 2019/12/25. // #include "PassOne.h" #include "OP_Table.h" #include <string> #include <sstream> #include <iomanip> #include <cstdlib> #include <vector> using namespace std; // Init static var int PassOne::shared_program_length = 0; std::map<std::string, int> PassOne::_shared_symbolTable; Pas...
/**************************************************************************\ * Copyright (c) <NAME> & Gas Technologies AS * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistribu...
#include <qtmanagers.h> N::MemberLists:: MemberLists ( QWidget * parent , Plan * p ) : TreeDock ( parent , p ) { WidgetClass ; Configure ( ) ; } N::MemberLists::~MemberLists (void) { emit Leave ( this ) ; } void N::MemberLists::Configure(void) { setAccessibleName ...
#include "vlistwidget.h" #include <QKeyEvent> #include <QCoreApplication> #include <QSet> #include <QScrollBar> #include "utils/vutils.h" #include "utils/vimnavigationforwidget.h" #include "vstyleditemdelegate.h" #include "vpalette.h" extern VPalette *g_palette; VListWidget::VListWidget(QWidget *p_parent) : QLi...
#include<bits/stdc++.h> using namespace std; const int N = 1e5 + 9; const double PI = acos(-1); struct base { double a, b; base(double a = 0, double b = 0) : a(a), b(b) {} const base operator + (const base &c) const { return base(a + c.a, b + c.b); } const base operator - (const base &c) const { ret...
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkView.h" #include "SkCanvas.h" #include "SkPaint.h" #include "SkGradientShader.h" #include "SkColorPalette.h" SkColorPalette::SkColorPalette() { fSlotRect = Sk...
/*========================================================================* * * * Distributed by Whiteley Research Inc., Sunnyvale, California, USA * * http://wrcad.com * * Copyright (...
#include "wr2or.h" #include "parser.h" #include "output.h" #include "bfile.h" #include "default.h" #include <stdio.h> #include <io.h> #include <stdlib.h> #include <string.h> #include <sysexits.h> #include "error.h" #define PROGNAME "wr2or" void showBanner() { printf("\n%s v1.2 - Windows .RC to OS/2 .RC converter...
// // Game.cpp // TankGame // // Created by <NAME> on 4/05/2015. // Copyright (c) 2015 <NAME>. All rights reserved. // #include "Point.h" #include "ConsoleTools.h" #include "Timer.h" #include "MutableArray.h" #include "View.h" #include "IntroView.h" #include "GameView.h" #include "EndView.h" #include "TextureTools...
// Copyright 2021 <NAME> <EMAIL> (Alternate: <EMAIL>) // Copyright 2021 // Copyright 2021 #include <iostream> #include <map> #include <string> #include <vector> // allowed includes // tuple, utility, vector, map, set, unordered_map, // unordered_set, algorithm using std::cin; using std::cout; using std::map; using...
#include <iostream> #include <glad/glad.h> #include <GLFW/glfw3.h> #include <algorithm> #include "glm/glm.hpp" #include "glm/gtc/matrix_transform.hpp" #include "Space.h" double gZoomDistance = .01; const char* gPanetName[] = { "Sun", "Mercury", "Venus", "Earth", "Moon", "Mars", //"Phobos", //"Deimos", //"Ce...
// Ardumower Sunray // Copyright (c) 2013-2020 by <NAME>, Grau GmbH // Licensed GPLv3 for open source use // or Grau GmbH Commercial License for commercial use (http://grauonline.de/cms2/?page_id=153) #include "buzzer.h" #include "config.h" #include <Arduino.h> #if defined(_SAM3XA_) #include "src/due/DueTimer.h" #...
#include "GeneticAlgorithm.hpp" GeneticAlgorithm::GeneticAlgorithm(ObjectCollection& objects, WorkingDirectory& workingDir, ResourceAllocator<sf::Texture>& textureAllocator, Window& window) : objects(objects), workingDir(workingDir), textureAllocator(textureAllocator), window(window), maxPoolSize(40), totalFitnessSc...
/* * Copyright 2009-2017 Alibaba Cloud 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...
/*************************************************************************** # Copyright (c) 2015, NVIDIA 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: # * Redistributions of sourc...
/** \class HLTPixlMBFilt * * See header file for documentation * * * \author <NAME> * */ #include "HLTPixlMBFilt.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ParameterSet/interface/C...
#include "../headers/localsearch.h" LocalSearch::LocalSearch(Grafo *g):Heuristic(g){ map = new int[g->numNodes]; int i = {0}; std::generate(map, map+g->numNodes, [&i]{ return i++; }); random_shuffle(map, map+g->numNodes); } inline void flip(int i,int j, int tag[]){ int t = tag[i]; tag[i] = t...
//+------------------------------------------------------------------------- // // TaskMan - NT TaskManager // Copyright (C) Microsoft // // File: trayicon.CPP // // History: Jan-27-96 DavePl Created // //-------------------------------------------------------------------------- #include "pr...
/** * @file PiPoCollection.cpp * @author Nor<EMAIL> * @author <EMAIL> * * @brief PiPo Module Collection * * @copyright * Copyright (C) 2013 - 2017 by ISMM IRCAM – Centre Pompidou, Paris, France. * All rights reserved. * * License (BSD 3-clause) * * Redistribution and use in source and binary forms, with or...
#include <poll.h> // POLL* constants #include <time.h> // clock_gettime #include <iostream> #include <vector> #include <deque> #include <unordered_map> #include <thread> #include <mutex> #include <functional> #include "backend.hpp" #include "common.hpp" #include "socket.hpp" #include "dns.hpp" using MutexAutoLock = s...
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" /*====== This file is part of PerconaFT. Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. PerconaFT is free software: you can redistribute it and/or modif...
/** * coding: utf-8 * * Copyright (C) 2013, <NAME> * All rights reserved. */ #include <c4d_apibridge.h> #include "BaseList2DTreeModel.h" #include "utils.h" void BaseList2DTreeModel::BitAll( void* root, void* ud, void* node, Int32 bitmask, Bool on) { if (!node) return; BaseList2D* bl = (BaseLi...
// *************************************************************************** // BamIndex.cpp (c) 2009 <NAME> // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- // Last modified: 22 November 2010 (DB) // -----------...
#include <cstdio> #include <cmath> #include <algorithm> struct PointX { int index; double x_position; double y_position; }; struct PointY { int index; double x_position; double y_position; }; PointX point_list[100000]; bool CompareX(PointX a, PointX b) { return a.x_position < b.x_positio...
// Copyright 2020 The FreeAge authors // This file is part of FreeAge, licensed under the new BSD license. // See the COPYING file in the project root for the license text. #pragma once #include <vector> #include "FreeAge/common/unit_types.hpp" #include "FreeAge/client/object.hpp" #include "FreeAge/client/sprite.hpp...
//===- World.cpp ----------------------------------------------------------===// // // SPDX-License-Identifier: Apache-2.0 // //===----------------------------------------------------------------------===// #include "World.hpp" #include "Object.hpp" #include "Procedure.hpp" #include "Resource.hpp" #include "Script.hpp...
// Copyright 2020 Tier IV, 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 agreed to i...
#include <SFML/Graphics.hpp> void explode(sf::Sprite& sprite,sf::Vector2f position,float radius,sf::VertexArray& liveParticles,sf::VertexArray& staticParticles){ float xPos,yPos; int spriteHeight = sprite.getTextureRect().height; int spriteWidth = sprite.getTextureRect().width; int spritePosX = sprite....
//******************************************************************************// // Copyright 2014 Concordia University // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // you may not use this file except in compliance with the License. // // You may ...
/* * Copyright (C) 2007 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...
#include <iostream> #include <set> #include "ShadeGraph.h" namespace { using namespace ren; typedef std::set<NameCodeNodePtr> NameCodeNodeSet; void getReferencesOfType( NameCodeNodeSet& result, CodeNodePtr codeNode, ValueNode::InputType type ) { assert(codeNode); ...