text
stringlengths 2
100k
| meta
dict |
---|---|
#pragma once
#include <lamtram/sentence.h>
#include <lamtram/ll-stats.h>
#include <lamtram/builder-factory.h>
#include <lamtram/softmax-base.h>
#include <lamtram/dict-utils.h>
#include <dynet/dynet.h>
#include <dynet/expr.h>
#include <vector>
#include <iostream>
namespace dynet {
class Model;
struct ComputationGraph;
struct LookupParameter;
struct RNNBuilder;
}
namespace lamtram {
class ExternCalculator;
// A class for feed-forward neural network LMs
class NeuralLM {
public:
// Create a new NeuralLM and add it to the existing model
// vocab: the vocabulary
// ngram_context: number of previous words to use (should be at least one)
// extern_context: The size in nodes of vector containing extern context
// that is calculated from something other than the previous words.
// Can be set to zero if this doesn't apply.
// extern_feed: Whether to feed the previous external context back in
// wordrep_size: The size of the word representations.
// unk_id: The ID of unknown words.
// softmax_sig: A signature indicating the type of softmax to use
// model: The model in which to store the parameters.
NeuralLM(const DictPtr & vocab, int ngram_context, int extern_context,
bool extern_feed,
int wordrep_size, const BuilderSpec & hidden_spec, int unk_id,
const std::string & softmax_sig,
dynet::ParameterCollection & model);
~NeuralLM() { }
// Build the computation graph for the sentence including loss
// REQUIRES NewGraph to be called before usage
// sent_id: Sentence id if caching is used, can be set to -1
// sent: The sentence to be used.
// extern_in: The id of the extern context. Ignored if extern_context=0.
// layer_in: The input of the hidden layer.
// train: Whether we're training or not (so we know whether to use dropout, etc.)
// cg: The computation graph.
// ll: The log likelihood statistics will be used here.
dynet::Expression BuildSentGraph(
const Sentence & sent,
const Sentence & cache_ids,
const float * weight,
const ExternCalculator * extern_calc,
const std::vector<dynet::Expression> & layer_in,
float samp_percent,
bool train,
dynet::ComputationGraph & cg,
LLStats & ll);
dynet::Expression BuildSentGraph(
const std::vector<Sentence> & sent,
const std::vector<Sentence> & cache_ids,
const std::vector<float> * weights,
const ExternCalculator * extern_calc,
const std::vector<dynet::Expression> & layer_in,
float samp_percent,
bool train,
dynet::ComputationGraph & cg,
LLStats & ll);
// Acquire samples from this sentence and return their log probabilities as a vector
dynet::Expression SampleTrgSentences(
const ExternCalculator * extern_calc,
const std::vector<dynet::Expression> & layer_in,
const Sentence * answer,
int num_samples,
int max_len,
bool train,
dynet::ComputationGraph & cg,
std::vector<Sentence> & samples);
// Move forward one step using the language model and return the probabilities.
// REQUIRES NewGraph to be called before usage
// sent: The sentence to be used.
// id: The id of the word in the sentence to be used.
// extern_calc: The extern calculator.
// log_prob: Calculate the log probability
// layer_in: The input of the hidden layer.
// extern_in: The previous extern, if necessary
// layer_out: The output of the hidden layer.
// extern_out: The next extern, if necessary
// cg: The computation graph.
// align_out: The alignments.
template <class Sent>
dynet::Expression Forward(const Sent & sent, int id,
const ExternCalculator * extern_calc,
bool log_prob,
const std::vector<dynet::Expression> & layer_in,
const dynet::Expression & extern_in,
const dynet::Expression & extern_sum_in,
std::vector<dynet::Expression> & layer_out,
dynet::Expression & extern_out,
dynet::Expression & extern_sum_out,
dynet::ComputationGraph & cg,
std::vector<dynet::Expression> & align_out);
template <class Sent>
Sent CreateContext(const Sent & sent, int t);
// Index the parameters in a computation graph
void NewGraph(dynet::ComputationGraph & cg);
// Reading/writing functions
static NeuralLM* Read(const DictPtr & vocab, std::istream & in, dynet::ParameterCollection & model);
void Write(std::ostream & out);
// Information functions
static bool HasSrcVocab() { return false; }
static std::string ModelID() { return "nlm"; }
// Accessors
int GetVocabSize() const;
int GetNgramContext() const { return ngram_context_; }
int GetExternalContext() const { return extern_context_; }
int GetWordrepSize() const { return wordrep_size_; }
int GetUnkId() const { return unk_id_; }
int GetNumLayers() const { return hidden_spec_.layers; }
int GetNumNodes() const { return hidden_spec_.nodes; }
int GetLayerMultiplier() const { return hidden_spec_.multiplier; }
SoftmaxBase & GetSoftmax() { return *softmax_; }
// Setters
void SetDropout(float dropout);
protected:
// The vocabulary
DictPtr vocab_;
// Variables
int ngram_context_, extern_context_;
bool extern_feed_;
int wordrep_size_, unk_id_;
BuilderSpec hidden_spec_;
// Pointers to the parameters
dynet::LookupParameter p_wr_W_; // Wordrep weights
// Pointer to the softmax
SoftmaxPtr softmax_;
// The RNN builder
BuilderPtr builder_;
private:
// A pointer to the current computation graph.
// This is only used for sanity checking to make sure NewGraph
// is called before trying to do anything that requires it.
dynet::ComputationGraph * curr_graph_;
};
typedef std::shared_ptr<NeuralLM> NeuralLMPtr;
}
| {
"pile_set_name": "Github"
} |
(function(window, angular, $) {
'use strict';
angular.module('FileManagerApp', ['pascalprecht.translate', 'ngFileUpload']);
/**
* jQuery inits
*/
$(window.document).on('shown.bs.modal', '.modal', function() {
window.setTimeout(function() {
$('[autofocus]', this).focus();
}.bind(this), 100);
});
$(window.document).on('click', function() {
$('#context-menu').hide();
});
$(window.document).on('contextmenu', '.main-navigation .table-files tr.item-list:has("td"), .item-list', function(e) {
var menu = $('#context-menu');
if (e.pageX >= window.innerWidth - menu.width()) {
e.pageX -= menu.width();
}
if (e.pageY >= window.innerHeight - menu.height()) {
e.pageY -= menu.height();
}
menu.hide().css({
left: e.pageX,
top: e.pageY
}).appendTo('body').show();
e.preventDefault();
});
if (! Array.prototype.find) {
Array.prototype.find = function(predicate) {
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value;
for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
}
}
return undefined;
};
}
})(window, angular, jQuery);
| {
"pile_set_name": "Github"
} |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S15.5.4.15_A3_T1;
* @section: 15.5.4.15;
* @assertion: String.prototype.substring (start, end) can be applied to non String object instance and
* returns a string value(not object);
* @description: Apply String.prototype.substring to Array instance. Start is Infinity, end is -Infinity;
*/
__instance = new Array(1,2,3,4,5);
__instance.substring = String.prototype.substring;
//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if (__instance.substring(Infinity,-Infinity) !== "1,2,3,4,5") {
$ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(Infinity,-Infinity) === "1,2,3,4,5". Actual: '+__instance.substring(Infinity,-Infinity) );
}
//
//////////////////////////////////////////////////////////////////////////////
| {
"pile_set_name": "Github"
} |
.\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
.TH "gnutls_x509_crt_get_preferred_hash_algorithm" 3 "3.6.13" "gnutls" "gnutls"
.SH NAME
gnutls_x509_crt_get_preferred_hash_algorithm \- API function
.SH SYNOPSIS
.B #include <gnutls/compat.h>
.sp
.BI "int gnutls_x509_crt_get_preferred_hash_algorithm(gnutls_x509_crt_t " crt ", gnutls_digest_algorithm_t * " hash ", unsigned int * " mand ");"
.SH ARGUMENTS
.IP "gnutls_x509_crt_t crt" 12
Holds the certificate
.IP "gnutls_digest_algorithm_t * hash" 12
The result of the call with the hash algorithm used for signature
.IP "unsigned int * mand" 12
If non\-zero it means that the algorithm MUST use this hash. May be \fBNULL\fP.
.SH "DESCRIPTION"
This function will read the certificate and return the appropriate digest
algorithm to use for signing with this certificate. Some certificates (i.e.
DSA might not be able to sign without the preferred algorithm).
.SH "DEPRECATED"
Please use \fBgnutls_pubkey_get_preferred_hash_algorithm()\fP.
.SH "RETURNS"
the 0 if the hash algorithm is found. A negative error code is
returned on error.
.SH "SINCE"
2.12.0
.SH "REPORTING BUGS"
Report bugs to <[email protected]>.
.br
Home page: https://www.gnutls.org
.SH COPYRIGHT
Copyright \(co 2001-2020 Free Software Foundation, Inc., and others.
.br
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
.SH "SEE ALSO"
The full documentation for
.B gnutls
is maintained as a Texinfo manual.
If the /usr/share/doc/gnutls/
directory does not contain the HTML form visit
.B
.IP https://www.gnutls.org/manual/
.PP
| {
"pile_set_name": "Github"
} |
D/BitTorrent///
/.cvsignore///
D/BT1///
/PSYCO.py///
/bitfield.py///
/CurrentRateMeasure.py///
/clock.py///
/RateMeasure.py///
/inifile.py///
/ServerPortHandler.py///
D/GUI///
/parseargs.py///
/parsedir.py///
/RawServer.py///
/launchmanycore.py///
/selectpoll.py///
/ConnChoice.py///
/ConfigDir.py///
/RateLimiter.py///
/bencode.py///
/ConfigReader.py///
/piecebuffer.py///
/zurllib.py///
/CreateIcons.py///
/download_bt1.py///
/SocketHandler.py///
/natpunch.py///
/HTTPHandler.py///
/subnetparse.py///
/__init__.py///
| {
"pile_set_name": "Github"
} |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kendra/model/UpdateIndexRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::kendra::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateIndexRequest::UpdateIndexRequest() :
m_idHasBeenSet(false),
m_nameHasBeenSet(false),
m_roleArnHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_documentMetadataConfigurationUpdatesHasBeenSet(false),
m_capacityUnitsHasBeenSet(false)
{
}
Aws::String UpdateIndexRequest::SerializePayload() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_roleArnHasBeenSet)
{
payload.WithString("RoleArn", m_roleArn);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_documentMetadataConfigurationUpdatesHasBeenSet)
{
Array<JsonValue> documentMetadataConfigurationUpdatesJsonList(m_documentMetadataConfigurationUpdates.size());
for(unsigned documentMetadataConfigurationUpdatesIndex = 0; documentMetadataConfigurationUpdatesIndex < documentMetadataConfigurationUpdatesJsonList.GetLength(); ++documentMetadataConfigurationUpdatesIndex)
{
documentMetadataConfigurationUpdatesJsonList[documentMetadataConfigurationUpdatesIndex].AsObject(m_documentMetadataConfigurationUpdates[documentMetadataConfigurationUpdatesIndex].Jsonize());
}
payload.WithArray("DocumentMetadataConfigurationUpdates", std::move(documentMetadataConfigurationUpdatesJsonList));
}
if(m_capacityUnitsHasBeenSet)
{
payload.WithObject("CapacityUnits", m_capacityUnits.Jsonize());
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateIndexRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSKendraFrontendService.UpdateIndex"));
return headers;
}
| {
"pile_set_name": "Github"
} |
运行环境:
Win10 16G
python环境:
python2.7
安装包:
pandas
numpy
lightgbm
运行步骤:
1.将原始数据放入data中。
2.stage_1,stage_2,stage_3依次执行。
| {
"pile_set_name": "Github"
} |
This file is now included in the main libev documentation, see
http://cvs.schmorp.de/libev/ev.html
| {
"pile_set_name": "Github"
} |
/***************************************************************************
qgsexpressioncontextgenerator.h - QgsExpressionContextGenerator
---------------------
begin : 1.8.2016
copyright : (C) 2016 by Matthias Kuhn
email : [email protected]
***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#ifndef QGSEXPRESSIONCONTEXTGENERATOR_H
#define QGSEXPRESSIONCONTEXTGENERATOR_H
#include "qgsexpressioncontext.h"
/**
* \ingroup core
* Abstract interface for generating an expression context.
*
* You need to implement this interface in a class and register this class with
* QgsFieldExpressionWidget::registerExpressionGenerator().
*
* This is used for example in QgsPropertyOverrideButton or QgsFieldExpressionWidget
* classes which will ask for a new QgsExpressionContext every time the expression
* editor is opened. This way they are able to provide an up-to-date expression
* editor even when the environment changes.
*
* \since QGIS 3.0
*/
class CORE_EXPORT QgsExpressionContextGenerator
{
public:
/**
* This method needs to be reimplemented in all classes which implement this interface
* and return an expression context.
*
* \since QGIS 3.0
*/
virtual QgsExpressionContext createExpressionContext() const = 0;
virtual ~QgsExpressionContextGenerator() = default;
};
#endif // QGSEXPRESSIONCONTEXTGENERATOR_H
| {
"pile_set_name": "Github"
} |
FROM node:alpine
WORKDIR /opt/app
COPY --chown=node:node . .
WORKDIR /opt/app/node
RUN npm install
EXPOSE 8000
USER node
ENTRYPOINT ["node"]
CMD ["index.js"]
| {
"pile_set_name": "Github"
} |
/*******************************************************************************
* Copyright 2017 Capital One Services, LLC and Bitwise, 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 in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package hydrograph.ui.dataviewer.actions;
import hydrograph.ui.common.util.ConvertHexValues;
import hydrograph.ui.dataviewer.Activator;
import hydrograph.ui.dataviewer.constants.Messages;
import hydrograph.ui.dataviewer.datastructures.RowData;
import hydrograph.ui.dataviewer.datastructures.RowField;
import hydrograph.ui.dataviewer.preferencepage.ViewDataPreferencesVO;
import hydrograph.ui.dataviewer.window.DebugDataViewer;
import hydrograph.ui.logging.factory.LogFactory;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.slf4j.Logger;
import com.opencsv.CSVWriter;
/**
* The Class ExportAction.
* Responsible for exporting watcher data into CSV or user defined format.
*
* @author Bitwise
*
*/
public class ExportAction extends Action {
private DebugDataViewer debugDataViewer;
private Boolean headerEnabled;
private String delimiter;
private String quoteCharactor;
private static final String EXPORT_FILE = "Export File";
private static final String EXPORT_DATA_DEFAULT_PATH = "exportDataDefaultpath";
private static final String DEFAULT = "default";
private static final String DEFAILT_FILE_NAME = "export_data.csv";
private static final String INFORMATION = "Information";
private static final String ERROR = "Error";
private static final String LABEL = "&Export Data";
public ExportAction(DebugDataViewer debugDataViewer) {
super(LABEL);
this.debugDataViewer = debugDataViewer;
}
@Override
public void run() {
ViewDataPreferencesVO viewDataPreferencesVO = debugDataViewer.getViewDataPreferences();
delimiter = viewDataPreferencesVO.getDelimiter();
quoteCharactor = viewDataPreferencesVO.getQuoteCharactor();
headerEnabled = viewDataPreferencesVO.getIncludeHeaders();
TableViewer tableViewer = debugDataViewer.getTableViewer();
List<RowData> eachRowData = getListOfRowData(tableViewer);
List<String[]> exportedfileDataList = new ArrayList<String[]>();
TableColumn[] columns = tableViewer.getTable().getColumns();
if (headerEnabled != null) {
addHeadersInList(tableViewer, exportedfileDataList, columns);
}
addRowsDataInList(tableViewer, eachRowData, exportedfileDataList);
FileDialog fileDialog = new FileDialog(Display.getDefault().getActiveShell(), SWT.SAVE);
String filePath = getPathOfFileDialog(fileDialog);
writeDataInFile(exportedfileDataList, filePath);
}
private void showMessage(String message, String messageBoxTitle, int icon) {
MessageBox messageBox = new MessageBox(new Shell(), SWT.OK | icon);
messageBox.setText(messageBoxTitle);
messageBox.setMessage(message);
messageBox.open();
}
private void writeDataInFile(List<String[]> fileDataList, String filePath) {
if (filePath != null) {
if (StringUtils.length(ConvertHexValues.parseHex(delimiter)) == 1
&& StringUtils.length(ConvertHexValues.parseHex(quoteCharactor)) == 1) {
try (FileWriter fileWriter = new FileWriter(filePath);
CSVWriter writer = new CSVWriter(fileWriter,
ConvertHexValues.parseHex(delimiter).toCharArray()[0], ConvertHexValues.parseHex(
quoteCharactor).toCharArray()[0])) {
writer.writeAll(fileDataList, false);
showMessage("Data exported to " + filePath + " successfully.", INFORMATION, SWT.ICON_INFORMATION);
} catch (IOException e1) {
showMessage(Messages.ERROR_MESSAGE, ERROR, SWT.ICON_ERROR);
}
}
}
}
private String getPathOfFileDialog(FileDialog fileDialog) {
fileDialog.setText(EXPORT_FILE);
String exportDataDefaultpath = readExportDataDefaultPathFromFile();
if (StringUtils.isBlank(exportDataDefaultpath)) {
fileDialog.setFilterPath(null);
} else {
fileDialog.setFilterPath(exportDataDefaultpath);
}
fileDialog.setFileName(DEFAILT_FILE_NAME);
fileDialog.setOverwrite(true);
String filePath = fileDialog.open();
return filePath;
}
private String readExportDataDefaultPathFromFile() {
IScopeContext context = InstanceScope.INSTANCE;
IEclipsePreferences eclipsePreferences = context.getNode(Activator.PLUGIN_ID);
String exportDataDefaultpath = eclipsePreferences.get(EXPORT_DATA_DEFAULT_PATH, DEFAULT);
exportDataDefaultpath = exportDataDefaultpath.equalsIgnoreCase(DEFAULT) ? " " : exportDataDefaultpath;
return exportDataDefaultpath;
}
private void addRowsDataInList(TableViewer tableViewer, List<RowData> rowDataList, List<String[]> fileDataList) {
for (RowData rowData : rowDataList) {
List<RowField> columnDataList = rowData.getRowFields();
String[] eachRowData = new String[tableViewer.getTable().getColumnCount() - 1];
for (int j = 0; j < columnDataList.size(); j++) {
eachRowData[j] = columnDataList.get(j).getValue();
}
fileDataList.add(eachRowData);
}
}
private void addHeadersInList(TableViewer tableViewer, List<String[]> fileDataList, TableColumn[] columns) {
if (headerEnabled) {
String[] tablecolumns = new String[tableViewer.getTable().getColumnCount() - 1];
for (int k = 0; k < columns.length - 1; k++) {
tablecolumns[k] = columns[k + 1].getText();
}
fileDataList.add(tablecolumns);
}
}
private List<RowData> getListOfRowData(TableViewer tableViewer) {
TableItem[] items = tableViewer.getTable().getItems();
int i = 1;
List<RowData> eachRowData = new ArrayList<RowData>();
for (int index = 0; index < items.length; index++) {
List<RowField> columnData = new ArrayList<RowField>();
for (int j = 1; j < tableViewer.getTable().getColumnCount(); j++) {
columnData.add(new RowField(items[index].getText(j)));
}
RowData rowData = new RowData(columnData, i);
eachRowData.add(rowData);
i++;
}
return eachRowData;
}
}
| {
"pile_set_name": "Github"
} |
### 加拿大华人女孩被困武汉 母亲哭求加政府援助(图)
------------------------
#### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md) | [手把手翻墙教程](https://github.com/gfw-breaker/guides/wiki) | [禁闻聚合安卓版](https://github.com/gfw-breaker/bn-android) | [网门安卓版](https://github.com/oGate2/oGate) | [神州正道安卓版](https://github.com/SzzdOgate/update)
<div class="article_right" style="fone-color:#000">
<p style="text-align: center;">
<img alt="加拿大华人女孩被困武汉 母亲哭求加政府援助" src="//img3.secretchina.com/pic/2020/1-28/p2613671a131088016-ss.jpg" style="height:400px; width:600px"/>
<br>
武汉封城,大街上冷冷清清。图文一护士在等待交通工具回市区医院上班。(图片来源:HECTOR RETAMAL/AFP via Getty Images)
<span id="hideid" name="hideid" style="color:red;display:none;">
<span href="https://www.secretchina.com">
</span>
</span>
</br>
</p>
<div id="txt-mid1-t21-2017">
<ins class="adsbygoogle" data-ad-client="ca-pub-1276641434651360" data-ad-slot="2451032099" style="display:inline-block;width:336px;height:280px">
</ins>
<div id="SC-22xxx">
</div>
</div>
<p>
【看中国2020年1月28日讯】
<strong>
<span href="https://www.secretchina.com/news/gb/tag/武汉肺炎" target="_blank">
武汉肺炎
</span>
</strong>
爆发,
<strong>
武汉封城
</strong>
,有
<strong>
加拿大华人
</strong>
在中国新年期间刚好回武汉过年,被困武汉。日前一名加拿大华人母亲哭求加政府援助,希望能帮助女儿小娜脱离险境。
<span id="hideid" name="hideid" style="color:red;display:none;">
<span href="https://www.secretchina.com">
</span>
</span>
</p>
<p>
据加拿大英文媒体CTV报道,BC省居民刘女士是当地一所大学(Kwantlen Polytechnic University)的老师。她的女儿小娜(Fiona Dong)今年1月10日回武汉探访她的父亲和祖父,原计划在
<span href="https://www.secretchina.com" target="_blank">
中国
</span>
过完新年后,2月10日返回加拿大。
</p>
<p>
没想到在她到武汉之后,当地就爆发了新型冠状病毒肺炎(武汉肺炎)。刘女士急忙将返回加拿大的机票改签到1月27日,但没想到1月23日,武汉全城大封锁,所有的陆路、水路、空运交通都被切断了。
</p>
<p>
在女儿
<span href="https://www.secretchina.com/news/gb/tag/被困武汉" target="_blank">
被困武汉
</span>
之后,刘女士更是心急如焚。每天都和女儿通话、询问情况,分外担心她的安危,
</p>
<p>
周六,美国政府决定包机从武汉撤侨,刘女士希望,加拿大政府也能想想办法,帮助女儿脱离险境。
</p>
<p>
报道称,周六的整整一个早晨,她都在通过电话和加拿大政府联系。
</p>
<p>
刘女士表示,小娜是她唯一的女儿。尽管她现在还没事,但是只要人在武汉多待一天,就多一分危险。新型冠状病毒蔓延得非常快,这两天在欧洲、北美也有了病例,谁也不知道明天会发生什么。
</p>
<p>
“如果加拿大政府不行动,我们是很难从武汉离开的”,刘女士焦急地说。
</p>
<p>
CTV记者就此事采访了联邦外交部。对方证实,整个湖北省有若干加拿大人滞留,但是没有透露具体的人数。外交部发言人说,他们正在“密切关注”形势。如果身在中国的加拿大人需要帮助,可拨打加拿大驻华使馆的联系电话:86(10)5139-4000,或直接拨打加拿大外交部的紧急援助电话。
</p>
<p>
另有报道称,除了千万武汉人被困城内外,武汉市估计还有数以千计的外国学生与侨民。其中一些被困在武汉的外国留学生表示,因存粮不足恐很快就断炊。也有被困在武汉的美国人表示“每天醒来都觉得绝望、难过与愤怒”,因为缺乏资讯,不知道目前武汉疫情的真实发展。(详情阅读:
<span href="https://www.secretchina.com/news/gb/2020/01/27/920941.html">
就快断炊!遭困武汉的老外又气又怕(图)
</span>
)
<center>
<div>
<div id="txt-mid2-t22-2017" style="display: block; max-height: 351px; overflow: hidden;">
<div id="SC-21xxx">
</div>
<ins class="adsbygoogle" data-ad-client="ca-pub-1276641434651360" data-ad-format="auto" data-ad-slot="4301710469" data-full-width-responsive="true" style="display:block">
</ins>
</div>
</div>
</center>
<div style="padding-top:12px;">
</div>
</p>
</div>
<hr/>
手机上长按并复制下列链接或二维码分享本文章:<br/>
https://github.com/gfw-breaker/banned-news/blob/master/pages/p3/921028.md <br/>
<a href='https://github.com/gfw-breaker/banned-news/blob/master/pages/p3/921028.md'><img src='https://github.com/gfw-breaker/banned-news/blob/master/pages/p3/921028.md.png'/></a> <br/>
原文地址(需翻墙访问):https://www.secretchina.com/news/gb/2020/01/28/921028.html
------------------------
#### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md) | [一键翻墙软件](https://github.com/gfw-breaker/nogfw/blob/master/README.md) | [《九评共产党》](https://github.com/gfw-breaker/9ping.md/blob/master/README.md#九评之一评共产党是什么) | [《解体党文化》](https://github.com/gfw-breaker/jtdwh.md/blob/master/README.md) | [《共产主义的终极目的》](https://github.com/gfw-breaker/gczydzjmd.md/blob/master/README.md)
<img src='http://gfw-breaker.win/banned-news/pages/p3/921028.md' width='0px' height='0px'/> | {
"pile_set_name": "Github"
} |
package limit
import (
"context"
"database/sql"
"github.com/target/goalert/permission"
"github.com/target/goalert/util"
"github.com/target/goalert/validation/validate"
)
// A Store allows getting and setting system limits.
type Store struct {
update *sql.Stmt
findAll *sql.Stmt
findOne *sql.Stmt
setOne *sql.Stmt
resetAll *sql.Stmt
}
// NewStore creates a new DB and prepares all necessary SQL statements.
func NewStore(ctx context.Context, db *sql.DB) (*Store, error) {
p := &util.Prepare{DB: db, Ctx: ctx}
return &Store{
update: p.P(`update config_limits set max = $2 where id = $1`),
findAll: p.P(`select id, max from config_limits`),
findOne: p.P(`select max from config_limits where id = $1`),
setOne: p.P(`
insert into config_limits (id, max)
values ($1, $2)
on conflict (id) do update
set max = $2
`),
resetAll: p.P(`truncate config_limits`),
}, p.Err
}
// UpdateLimitsTx updates all configurable limits.
func (s *Store) UpdateLimitsTx(ctx context.Context, tx *sql.Tx, id string, max int) error {
err := permission.LimitCheckAny(ctx, permission.System, permission.Admin)
if err != nil {
return err
}
stmt := s.update
if tx != nil {
stmt = tx.Stmt(stmt)
}
_, err = stmt.ExecContext(ctx, id, max)
if err != nil {
return err
}
return err
}
// ResetAll will reset all configurable limits to the default (no-limit).
func (s *Store) ResetAll(ctx context.Context) error {
err := permission.LimitCheckAny(ctx, permission.Admin)
if err != nil {
return err
}
_, err = s.resetAll.ExecContext(ctx)
return err
}
// Max will return the current max value for the given limit.
func (s *Store) Max(ctx context.Context, id ID) (int, error) {
err := permission.LimitCheckAny(ctx, permission.Admin)
if err != nil {
return 0, err
}
err = id.Valid()
if err != nil {
return 0, err
}
var max int
err = s.findOne.QueryRowContext(ctx, id).Scan(&max)
if err == sql.ErrNoRows {
return -1, nil
}
if err != nil {
return 0, err
}
return max, nil
}
// All will get the current value of all limits.
func (s *Store) All(ctx context.Context) (Limits, error) {
err := permission.LimitCheckAny(ctx, permission.System, permission.Admin)
if err != nil {
return nil, err
}
rows, err := s.findAll.QueryContext(ctx)
if err != nil {
return nil, err
}
defer rows.Close()
var id string
var max int
l := make(Limits, 8)
for rows.Next() {
err = rows.Scan(&id, &max)
if err != nil {
return nil, err
}
l[ID(id)] = max
}
return l, nil
}
// SetMax allows setting the max value for a limit.
func (s *Store) SetMax(ctx context.Context, id ID, max int) error {
err := permission.LimitCheckAny(ctx, permission.Admin)
if err != nil {
return err
}
err = validate.Many(id.Valid(), validate.Range("Max", max, -1, 9000))
if err != nil {
return err
}
_, err = s.setOne.ExecContext(ctx, id, max)
return err
}
| {
"pile_set_name": "Github"
} |
#ifndef GD_COLOR_MAP_H
#define GD_COLOR_MAP_H 1
#include "gd.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
char *color_name;
int red;
int green;
int blue;
} gdColorMapEntry;
typedef struct {
int num_entries;
gdColorMapEntry *entries;
} gdColorMap;
extern BGD_EXPORT_DATA_PROT gdColorMap GD_COLOR_MAP_X11;
BGD_DECLARE(int) gdColorMapLookup(const gdColorMap color_map, const char *color_name, int *r, int *g, int *b);
#ifdef __cplusplus
}
#endif
#endif
| {
"pile_set_name": "Github"
} |
# Walruss RSA Data Signing - Eine Sachspende
Freundliche Spende an den Hersteller von PC-Wahl 10.
Open Source.
So macht updaten Spaß!
## Hintergrund
Der Hersteller der Software **PC-Wahl 10.0** versuchte vor der Bundestagswahl im September 2017 hektisch und vergeblich, die Update-Funktion seiner Software abzusichern.
Dies geschah mehrfach hintereinander mit teils absurden Mechanismen.
Da sämtliche Versuche meist bereits nach wenigen Stunden vom Chaos Computer Club für unzureichend befunden wurden, stellen wir nun in einer Quellcode-Spende ein Verfahren zur Verfügung, welches ausreichend einfach im Rahmen des Ökosystems **PC-Wahl** zu implementieren ist.
## Updates
Update-Pakete können mit diesem Verfahren digital signiert werden. Hierzu muss ein RSA-Schlüsselpaar generiert werden, wie es die Dokumentation des RSACryptoServiceProvider beschreibt. Auf Seiten der Update-Routine kann der Public Key hart-kodiert werden. Dies kommt einem Certificate-Pinning gleich. Nach dem Herunterladen des Update-Paket wird automatisch geprüft, ob die RSA-PSS Signatur des Pakets mit dem hart-kodierten öffentlichen Schlüssel verifiziert werden kann.
### Disclaimer: Update best practices
Für den Update-Prozess empfehlen wir die Verwendung eines signierten Microsoft-Installers (MSI). Über einen solchen Installer wird das Betriebssystem in die Verifizierung eingebunden und die Hürden für einen Angreifer signifikant erhöht.
Der Hersteller scheint jedoch nicht über Willen, Flexibilität und inzwischen auch nicht mehr über die notwendige Zeit zu verfügen, einen solchen nutzen zu wollen.
Entsprechend passen wir uns mit diesem Vorschlag an die Vorlieben des Herstellers an und ergänzen sie um einen Hauch RSA.
## Übermittlung von Wahlergebnis-Daten
Die Wahlergebnisdaten müssen digital signiert werden, um einen Manipulationsschutz zu gewährleisten. Auf die Verschlüsselung der Daten kann verzichtet werden, da diese keinen Integritätschutz darstellt.
Der Versuch des Herstellers, dies mit GnuPG zu realisieren, resultierte in drei neuen Schwachstellen. Der hier veröffentlichte Beispielcode kann von PC-Wahl genutzt werden, um Daten zuverlässig digital zu signieren.
### Disclaimer: Signature best practices
Für das Signieren der Wahldaten empfehlen wir die Verwendung einer X.509-PKI. Über eine solche wird die zentrale Verifizierung erleichtert und die Provisionierung skalierbar.
Hersteller und Wahlleiter scheinen jedoch nicht über Willen, Flexibilität und inzwischen auch nicht mehr über die notwendige Zeit zu verfügen, eine solche PKI herstellerübergreifend zu implementieren.
Entsprechend passen wir uns mit diesem Vorschlag an die Vorlieben an und ergänzen sie um einen Hauch RSA.
## Beispiel
Das Projekt kann per Visual Studio 2017 übersetzt und sofort auf der Kommandozeile getestet werden:
```
bin\Debug\Walruss.exe -verify ..\example-data\input.txt
[d] RSA Verify - Result: True
bin\Debug\Walruss.exe -sign ..\example-data\regioIt-update.key ..\example-data\input.txt
[d] RSA Sign - Result: ZVzDjDPy6+e2J8vcVtE9WrRduKH6V5DJZOi6ad52bX/AOS+tC3geoKC8/wyPfXLyLdXKOxd7wimM/1d8W+ejRsDlKA9nl+Qk1T0+gyUegTGG+VL9op9W8g7hssFaBKxoYah3yZwLUwHM4bXTdI+yd/LcVgkCMEot1adunHnCCBskVBOaPvoH7kHHvKG/GU7BkaEd6iA0Vlw9OUWeQ8V84Uzx7QJvWn0NfIx4FfOlf9v/40jej9Jt/mCGQP7N57D1g8FQKfqgrZp/eFWCoFNIER/FPxJBA5LOKIahSsnT1yZLw0eR50K3MeIBR0/xdzY4KcCOxN/OHzE79ZwvjARwLg==
```
## Author(s)
OpenSource Spende an den Hersteller von PC-Wahl 10 (c) 2017 Chaos Computer Club
by Thorsten (THS) Schroeder <ths [at] ccc [dot] de>
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2015 Kaprica Security, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#include "string.h"
char *strchr(const char *s, int c)
{
unsigned int i;
for (i = 0; s[i] != 0; i++)
if (s[i] == c)
return (char *)&s[i];
if (c == 0)
return (char *)&s[i];
return NULL;
}
| {
"pile_set_name": "Github"
} |
{
"images": [
{
"filename": "ic_fluent_zoom_in_20_regular.pdf",
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
},
"properties": {
"preserves-vector-representation": true,
"template-rendering-intent": "template"
}
} | {
"pile_set_name": "Github"
} |
#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the components of NT OS/2
#
!INCLUDE $(NTMAKEENV)\makefile.def | {
"pile_set_name": "Github"
} |
"lang"
{
"Language" "norwegian"
"Tokens"
{
"#DOTA_RP_INIT" "Hovedmeny"
"#DOTA_RP_IDLE" "Hovedmeny (uvirksom)"
"#DOTA_RP_WAIT_FOR_PLAYERS_TO_LOAD" "{%param0%}: Venter på lastere"
"#DOTA_RP_COACHING" "{%param0%}: Veileder"
"#DOTA_RP_HERO_SELECTION" "{%param0%}: Valg av helt"
"#DOTA_RP_STRATEGY_TIME" "{%param0%}: Strategitid"
"#DOTA_RP_WAIT_FOR_MAP_TO_LOAD" "{%param0%}: Venter på at spillet laster inn"
"#DOTA_RP_PRE_GAME" "{%param0%}: Oppsetting"
"#DOTA_RP_GAME_IN_PROGRESS" "{%param0%}: Spiller en kamp"
"#DOTA_RP_GAME_IN_PROGRESS_CUSTOM" "Spiller %param0%"
"#DOTA_RP_GAME_IN_PROGRESS_CUSTOM_UNNAMED" "Spiller tilpasset spill"
"#DOTA_RP_LOBBY_CUSTOM" "Lobby for %param0%"
"#DOTA_RP_LOBBY_CUSTOM_UNNAMED" "Tilpasset spillobby"
"#DOTA_RP_PLAYING_AS" "{%param0%}: {%param2%} (nivå %param1%)"
"#DOTA_RP_POST_GAME" "{%param0%}: Etter kampen"
"#DOTA_RP_DISCONNECT" "{%param0%}: Kobler fra"
"#DOTA_RP_SPECTATING" "Ser på en kamp"
"#DOTA_RP_CASTING" "Kommenterer en kamp"
"#DOTA_RP_PRIVATE_LOBBY" "Privat lobby"
"#DOTA_RP_LEAGUE_MATCH" "Spiller i en turnering"
"#DOTA_RP_LEAGUE_MATCH_PLAYING_AS" "{%param0%}: {%param1%} (turnering)"
"#DOTA_RP_WATCHING_REPLAY" "Ser på en reprise"
"#DOTA_RP_WATCHING_TOURNAMENT" "Ser på en turneringskamp"
"#DOTA_RP_WATCHING_TOURNAMENT_REPLAY" "Ser på en turneringsreprise"
"#DOTA_RP_FINDING_MATCH" "Finner en kamp"
"#DOTA_RP_FINDING_YEAR_BEAST_BRAWL" "Finner Slaget mellom årsbeistene"
"#DOTA_RP_FINDING_EVENT_MATCH" "Finner en kamp ({%param0%})"
"#DOTA_RP_UNKNOWN_EVENT_GAME" "Tilpasset arrangement"
"#DOTA_RP_SPECTATING_WHILE_FINDING" "Finner en kamp og ser på"
"#DOTA_RP_PENDING" "Venneforespørsel venter"
"#DOTA_RP_ONLINE" "Tilkoblet"
"#DOTA_RP_BUSY" "Opptatt"
"#DOTA_RP_AWAY" "Borte"
"#DOTA_RP_SNOOZE" "Slumre"
"#DOTA_RP_LOOKING_TO_TRADE" "Ønsker å bytte"
"#DOTA_RP_LOOKING_TO_PLAY" "Ønsker å spille"
"#DOTA_RP_PLAYING_OTHER" "Spiller et annet spill"
"#DOTA_RP_ACCOUNT_DISABLED" "Matchmaking er midlertidig slått av"
"#DOTA_RP_QUEST" "På et treningsoppdrag"
"#DOTA_RP_BOTPRACTICE" "Spiller mot boter"
"#DOTA_RP_COOPBOT" "Samarbeid mot bot-kamp"
"#DOTA_RP_TRAINING" "På et treningsoppdrag"
"#DOTA_RP_OPEN_SOLO" "Ser etter gruppemedlemmer"
"#DOTA_RP_OPEN_PARTY" "I gruppe og ser etter medlemmer"
"#DOTA_RP_PLAYING_DOTA_S1" "Spiller Dota 2"
"#custom_game_mode_status" "Spiller tilpasset spill"
"#npc_dota_hero_none" "–"
"#npc_dota_hero_queenofpain" "Queen of Pain"
"#npc_dota_hero_antimage" "Anti-Mage"
"#npc_dota_hero_kunkka" "Kunkka"
"#npc_dota_hero_lina" "Lina"
"#npc_dota_hero_mirana" "Mirana"
"#npc_dota_hero_slardar" "Slardar"
"#npc_dota_hero_lion" "Lion"
"#npc_dota_hero_phantom_assassin" "Phantom Assassin"
"#npc_dota_hero_tidehunter" "Tidehunter"
"#npc_dota_hero_witch_doctor" "Witch Doctor"
"#npc_dota_hero_vengefulspirit" "Vengeful Spirit"
"#npc_dota_hero_juggernaut" "Juggernaut"
"#npc_dota_hero_earthshaker" "Earthshaker"
"#npc_dota_hero_pudge" "Pudge"
"#npc_dota_hero_bane" "Bane"
"#npc_dota_hero_crystal_maiden" "Crystal Maiden"
"#npc_dota_hero_sven" "Sven"
"#npc_dota_hero_skeleton_king" "Wraith King"
"#npc_dota_hero_storm_spirit" "Storm Spirit"
"#npc_dota_hero_sand_king" "Sand King"
"#npc_dota_hero_nevermore" "Shadow Fiend"
"#npc_dota_hero_drow_ranger" "Drow Ranger"
"#npc_dota_hero_axe" "Axe"
"#npc_dota_hero_bloodseeker" "Bloodseeker"
"#npc_dota_hero_phantom_lancer" "Phantom Lancer"
"#npc_dota_hero_razor" "Razor"
"#npc_dota_hero_morphling" "Morphling"
"#npc_dota_hero_zuus" "Zeus"
"#npc_dota_hero_tiny" "Tiny"
"#npc_dota_hero_puck" "Puck"
"#npc_dota_hero_windrunner" "Windranger"
"#npc_dota_hero_lich" "Lich"
"#npc_dota_hero_shadow_shaman" "Shadow Shaman"
"#npc_dota_hero_riki" "Riki"
"#npc_dota_hero_enigma" "Enigma"
"#npc_dota_hero_tinker" "Tinker"
"#npc_dota_hero_sniper" "Sniper"
"#npc_dota_hero_necrolyte" "Necrophos"
"#npc_dota_hero_warlock" "Warlock"
"#npc_dota_hero_beastmaster" "Beastmaster"
"#npc_dota_hero_venomancer" "Venomancer"
"#npc_dota_hero_faceless_void" "Faceless Void"
"#npc_dota_hero_death_prophet" "Death Prophet"
"#npc_dota_hero_pugna" "Pugna"
"#npc_dota_hero_templar_assassin" "Templar Assassin"
"#npc_dota_hero_viper" "Viper"
"#npc_dota_hero_luna" "Luna"
"#npc_dota_hero_dragon_knight" "Dragon Knight"
"#npc_dota_hero_dazzle" "Dazzle"
"#npc_dota_hero_rattletrap" "Clockwerk"
"#npc_dota_hero_leshrac" "Leshrac"
"#npc_dota_hero_furion" "Nature's Prophet"
"#npc_dota_hero_life_stealer" "Lifestealer"
"#npc_dota_hero_dark_seer" "Dark Seer"
"#npc_dota_hero_clinkz" "Clinkz"
"#npc_dota_hero_omniknight" "Omniknight"
"#npc_dota_hero_enchantress" "Enchantress"
"#npc_dota_hero_huskar" "Huskar"
"#npc_dota_hero_night_stalker" "Night Stalker"
"#npc_dota_hero_broodmother" "Broodmother"
"#npc_dota_hero_bounty_hunter" "Bounty Hunter"
"#npc_dota_hero_weaver" "Weaver"
"#npc_dota_hero_jakiro" "Jakiro"
"#npc_dota_hero_batrider" "Batrider"
"#npc_dota_hero_chen" "Chen"
"#npc_dota_hero_spectre" "Spectre"
"#npc_dota_hero_doom_bringer" "Doom"
"#npc_dota_hero_ancient_apparition" "Ancient Apparition"
"#npc_dota_hero_ursa" "Ursa"
"#npc_dota_hero_spirit_breaker" "Spirit Breaker"
"#npc_dota_hero_gyrocopter" "Gyrocopter"
"#npc_dota_hero_alchemist" "Alchemist"
"#npc_dota_hero_invoker" "Invoker"
"#npc_dota_hero_silencer" "Silencer"
"#npc_dota_hero_obsidian_destroyer" "Outworld Devourer"
"#npc_dota_hero_lycan" "Lycan"
"#npc_dota_hero_brewmaster" "Brewmaster"
"#npc_dota_hero_shadow_demon" "Shadow Demon"
"#npc_dota_hero_lone_druid" "Lone Druid"
"#npc_dota_hero_chaos_knight" "Chaos Knight"
"#npc_dota_hero_treant" "Treant Protector"
"#npc_dota_hero_meepo" "Meepo"
"#npc_dota_hero_ogre_magi" "Ogre Magi"
"#npc_dota_hero_undying" "Undying"
"#npc_dota_hero_rubick" "Rubick"
"#npc_dota_hero_disruptor" "Disruptor"
"#npc_dota_hero_nyx_assassin" "Nyx Assassin"
"#npc_dota_hero_naga_siren" "Naga Siren"
"#npc_dota_hero_keeper_of_the_light" "Keeper of the Light"
"#npc_dota_hero_visage" "Visage"
"#npc_dota_hero_wisp" "Io"
"#npc_dota_hero_slark" "Slark"
"#npc_dota_hero_medusa" "Medusa"
"#npc_dota_hero_troll_warlord" "Troll Warlord"
"#npc_dota_hero_centaur" "Centaur Warrunner"
"#npc_dota_hero_magnataur" "Magnus"
"#npc_dota_hero_shredder" "Timbersaw"
"#npc_dota_hero_bristleback" "Bristleback"
"#npc_dota_hero_tusk" "Tusk"
"#npc_dota_hero_skywrath_mage" "Skywrath Mage"
"#npc_dota_hero_abaddon" "Abaddon"
"#npc_dota_hero_elder_titan" "Elder Titan"
"#npc_dota_hero_legion_commander" "Legion Commander"
"#npc_dota_hero_ember_spirit" "Ember Spirit"
"#npc_dota_hero_earth_spirit" "Earth Spirit"
"#npc_dota_hero_abyssal_underlord" "Underlord"
"#npc_dota_hero_phoenix" "Phoenix"
"#npc_dota_hero_terrorblade" "Terrorblade"
"#npc_dota_hero_oracle" "Oracle"
"#npc_dota_hero_techies" "Techies"
"#npc_dota_hero_target_dummy" "Treningsfigur"
"#npc_dota_hero_winter_wyvern" "Winter Wyvern"
"#npc_dota_hero_arc_warden" "Arc Warden"
"#npc_dota_hero_monkey_king" "Monkey King"
"#npc_dota_hero_pangolier" "Pangolier"
"#npc_dota_hero_dark_willow" "Dark Willow"
"#DOTA_lobby_type_name_lobby" "Lobby"
"#DOTA_lobby_type_name_unranked" "Urangert"
"#DOTA_lobby_type_name_ranked" "Rangert"
"#DOTA_lobby_type_name_bot_match" "Boter"
"#DOTA_lobby_type_name_spectator" "Tilskuer"
"#demo_hero_mode_name" "Heltedemo"
"#game_mode_lobby_name_0" "-"
"#game_mode_lobby_name_1" "All Pick"
"#game_mode_lobby_name_2" "Captains Mode"
"#game_mode_lobby_name_3" "Random Draft"
"#game_mode_lobby_name_4" "Single Draft"
"#game_mode_lobby_name_5" "All Random"
"#game_mode_lobby_name_6" "-"
"#game_mode_lobby_name_7" "Diretide"
"#game_mode_lobby_name_8" "Reverse Captains Mode"
"#game_mode_lobby_name_9" "Greeviling"
"#game_mode_lobby_name_10" "Opplæring"
"#game_mode_lobby_name_11" "Mid Only"
"#game_mode_lobby_name_12" "Least Played"
"#game_mode_lobby_name_13" "Limited Heroes"
"#game_mode_lobby_name_14" "Kompendium"
"#game_mode_lobby_name_15" "Tilpasset"
"#game_mode_lobby_name_16" "Captains Draft"
"#game_mode_lobby_name_17" "Balanced Draft"
"#game_mode_lobby_name_18" "Ability Draft"
"#game_mode_lobby_name_20" "All Random Deathmatch"
"#game_mode_lobby_name_21" "1v1 Solo Mid"
"#game_mode_lobby_name_22" "Rangert All Pick"
"#game_mode_lobby_name_23" "Turbo"
"#game_mode_lobby_name_24" "Mutasjon"
"#game_mode_24" "Mutasjon"
"#DOTA_RP_PLAYING_EVENT_MATCH" "Spiller {%param0%}"
"#DOTA_EventGameName_International2018" "Underhollow"
"#npc_dota_hero_grimstroke" "Grimstroke"
"#DOTA_RP_TOURNEY_REGISTERING" "Registrering til Battle Cup: {%param0%}"
"#DOTA_RP_TOURNEY_FINDING_MATCH" "Finner motstander: {%param1%}"
"#DOTA_RP_TOURNEY_BETWEEN_GAMES" "Battle Cup: {%param1%} (pause)"
"#DOTA_RP_TOURNEY_GAME_IN_PROGRESS" "Battle Cup: {%param0%}"
"#DOTA_RP_TOURNEY_PLAYING_AS" "Battle Cup: {%param2%} som {%param1%}"
"#weekendtourney_round_quarterfinals" "Kvartfinaler"
"#weekendtourney_round_semifinals" "Semifinaler"
"#weekendtourney_round_finals" "Finale"
"#DOTA_EventName_Frostivus2018" "Frosthaven"
"#npc_dota_hero_snapfire" "Snapfire"
"#npc_dota_hero_void_spirit" "Void Spirit"
"#DOTA_Guilds_message_motd" "Dagens melding: %param0%"
"#DOTA_Guilds_message_level" "Gildet har nådd nivå %param0%"
"#DOTA_Guild_message_promoted" "%target_persona% ble forfremmet til %guild_role% av %requester_persona%."
"#DOTA_Guild_message_demoted" "%target_persona% ble degradert til %guild_role% av %requester_persona%."
"#dota_rp_playing_event_match_2020" "Labyrint: {%param0%} (dybde %param1%)"
"#DOTA_EventGameName_International2020" "Aghanims labyrint"
"#dota_eventgamedifficulty_international2020_0" "Lærling"
"#dota_eventgamedifficulty_international2020_1" "Magiker"
"#dota_eventgamedifficulty_international2020_2" "Trollmann"
"#dota_eventgamedifficulty_international2020_3" "Stormagus"
"#dota_eventgamedifficulty_international2020_4" "Ypperstemagiker"
}
}
| {
"pile_set_name": "Github"
} |
@HWI-ST808:140:H0L10ADXX:1:1101:8463:2:NNNNNN:CELL_CTTCCA:UMI_AAAA
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTATGATGCTGTGAGTTCC
+
@CCDDDDFHHHHHJIJFDDDDDDDDDBDDDDDBB0@B#####################
@HWI-ST808:140:H0L10ADXX:1:1101:4089:2:NNNNNN:CELL_CTACCA:UMI_TGTT
CGAACTGGCCAACGGCAACATTACCTGGGCTGATGAGGAGGCCAGGTACCCACTCTTT
+
:+14=ADDGHHHHJIIFGICGHG@BFBGGGHIDHGGGIBHIIGIGBGHC@CDE@>DA=
@HWI-ST808:140:H0L10ADXX:1:1101:4597:2:NNNNNN:CELL_CAACCA:UMI_AAAA
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTGTTCTTTCTGTCGTAT
+
@<?DDDDDHFFFFB/A<A########################################
@HWI-ST808:140:H0L10ADXX:1:1101:7216:2:NNNNNN:CELL_CTACCA:UMI_GAAT
ATAGAGTGCCATTTTTTTTTGTTCAAACAATTTTAATTATTGGAATGCACAATTTTTT
+
+114ABA:FBHFHHHHIIIIIGDDDBADFB?DDF?3?D9CGBCC>@FG>G@>CD=CCF
@HWI-ST808:140:H0L10ADXX:1:1101:13033:2:NNNNNN:CELL_CAACCA:UMI_AAAA
GAGAGTTTTTTTTTTTTTTTTTTGGTGAGGGGCAGAAAACAGGGATGAATGTAATCCT
+
11:442=BFHHHDE?FHIGAEA####################################
@HWI-ST808:140:H0L10ADXX:1:1101:1718:2:NNNNNN:CELL_CTACCA:UMI_CCTT
CGTCGAACCTTTCTGGCCTGGCTTGTTTGCCAAGGCTCTGGCCAATGTCAACATTGGG
+
?<8BAADDAFDBFEHGBBHHIIHHFIJIGGEGGJGFCEG0?DCHBB9CB4BBFEC;@=
@HWI-ST808:140:H0L10ADXX:1:1101:11558:2:NNNNNN:CELL_CTACCA:UMI_TTGT
TGCCACCCCCCCTCAAACCCCACCCCCTTTCAGGTTCCTTGCTCAGCCAAGCTTGTCA
+
@@@DDFFFHHHHGIIJ3?GGHJJIGIGHIIGFHE>@GBEGHFHFEEECB;?C>;@@>;
@HWI-ST808:140:H0L10ADXX:1:1101:18714:2:NNNNNN:CELL_CAACCA:UMI_AAAA
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTATTTGTGTTGTCAA
+
???DDDDDDDDDDDDD@9?#######################################
@HWI-ST808:140:H0L10ADXX:1:1101:5802:2:NNNNNN:CELL_CTACCA:UMI_AAAA
GTGACCGCAACGTGGCCAGTGTGTGTCTGCAGATCGGGTACCCAACTGTTGCCTCGGT
+
8?@4=+=@@@D<FGEBGEIGIIIIIICGEGIICGIGEEHGFFEHIGGC@DHGG@GH>;
@HWI-ST808:140:H0L10ADXX:1:1101:6626:2:NNNNNN:CELL_GTACCA:UMI_AAAA
AGGCGATAGTCGCCATTCACAGATTTGCTCGGCAATCAGTACTGGTAGGCGTTAGACC
+
1:?DF1ADFFHHHGIGHGHGIJIGGHIIGHGIIIBDFHGIGGHBAFHGCDA@E<CCC?
| {
"pile_set_name": "Github"
} |
/// 阅读 api.d.ts 查看文档
///<reference path="api.d.ts"/>
import * as path from 'path';
import { UglifyPlugin, CompilePlugin, ManifestPlugin, ExmlPlugin, EmitResConfigFilePlugin, TextureMergerPlugin, CleanPlugin } from 'built-in';
import { WxgamePlugin } from './wxgame/wxgame';
import { CustomPlugin } from './myplugin';
import * as defaultConfig from './config';
const config: ResourceManagerConfig = {
buildConfig: (params) => {
const { target, command, projectName, version } = params;
const outputDir = `../${projectName}_wxgame`;
if (command == 'build') {
return {
outputDir,
commands: [
new CleanPlugin({ matchers: ["js", "resource"] }),
new CompilePlugin({ libraryType: "debug", defines: { DEBUG: true, RELEASE: false } }),
new ExmlPlugin('commonjs'), // 非 EUI 项目关闭此设置
new WxgamePlugin(),
new ManifestPlugin({ output: 'manifest.js' })
]
}
}
else if (command == 'publish') {
return {
outputDir,
commands: [
new CleanPlugin({ matchers: ["js", "resource"] }),
new CompilePlugin({ libraryType: "release", defines: { DEBUG: false, RELEASE: true } }),
new ExmlPlugin('commonjs'), // 非 EUI 项目关闭此设置
new WxgamePlugin(),
new UglifyPlugin([{
sources: ["main.js"],
target: "main.min.js"
}
]),
new ManifestPlugin({ output: 'manifest.js' })
]
}
}
else {
throw `unknown command : ${params.command}`;
}
},
mergeSelector: defaultConfig.mergeSelector,
typeSelector: defaultConfig.typeSelector
}
export = config;
| {
"pile_set_name": "Github"
} |
gcr.io/google_containers/kube-proxy-s390x:v1.12.0-alpha.0
| {
"pile_set_name": "Github"
} |
//
// T1HomeTimelineItemsViewController.h
// YYKitExample
//
// Created by ibireme on 15/10/9.
// Copyright (C) 2015 ibireme. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface T1HomeTimelineItemsViewController : UIViewController
@end
| {
"pile_set_name": "Github"
} |
/*
* This file is part of the PDF Split And Merge source code
* Created on 1 mag 2019
* Copyright 2017 by Sober Lemur S.a.s di Vacondio Andrea ([email protected]).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.pdfsam.pdf;
import static java.util.Objects.isNull;
import static java.util.function.Predicate.not;
import static java.util.stream.Collectors.toList;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import org.apache.commons.lang3.StringUtils;
/**
* @author Andrea Vacondio
*
*/
class PdfListParser implements Function<Path, List<File>> {
/**
* Given a Path to text/csv file, it parses is returning a list of PDF files contained in the parsed file
*
* @param listFile
* @return
*/
@Override
public List<File> apply(Path listFile) {
if (isNull(listFile)) {
return Collections.emptyList();
}
try {
return Files.lines(listFile).filter(StringUtils::isNoneBlank).map(s -> {
String[] items = s.split(",");
if (items.length > 0) {
return items[0];
}
return "";
}).filter(s -> s.toUpperCase().endsWith("PDF")).map(Paths::get).filter(Files::exists)
.filter(not(Files::isDirectory)).map(Path::toFile).collect(toList());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
| {
"pile_set_name": "Github"
} |
#include "precomp.h"
#include "udp_netgame_client.h"
using namespace clan;
UDPNetGameClient::UDPNetGameClient()
{
}
void UDPNetGameClient::process()
{
process_incoming();
process_outgoing();
}
void UDPNetGameClient::process_incoming()
{
DataBuffer packet(64*1024);
while (true)
{
packet.set_size(64*1024);
SocketName from;
int received = socket.read(packet.get_data(), packet.get_size(), from);
if (received == -1)
break;
if (from == server_name)
{
packet.set_size(received);
std::vector<int> acked_sequences;
DataBuffer payload = connection_state.receive_packet(packet, acked_sequences);
if (!payload.is_null())
{
process_acked_sequences(acked_sequences);
payload_received(payload);
}
}
}
}
void UDPNetGameClient::process_outgoing()
{
}
void UDPNetGameClient::payload_received(clan::DataBuffer payload)
{
}
void UDPNetGameClient::send_payload(DataBuffer payload)
{
int packet_sequence = 0;
DataBuffer packet = connection_state.create_packet(payload, packet_sequence);
socket.send(packet.get_data(), packet.get_size(), server_name);
// To do: save packet_sequence
}
void UDPNetGameClient::process_acked_sequences(const std::vector<int> &acked_sequences)
{
// To do: remove acked important messages
}
| {
"pile_set_name": "Github"
} |
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true,
"forin": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-misused-new": true,
"no-non-null-assertion": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
],
"radix": true,
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"typeof-compare": true,
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"no-output-on-prefix": true,
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
}
}
| {
"pile_set_name": "Github"
} |
//----------------------------------------------------------------------
// Class: CEnvironmentSim
// Authors: LiXizhi
// Emails: [email protected]
// Date: 2004.3.8
// Revised: 2006.3.10
//
// desc:
/**
2006.3.10 sentient algorithm: good for both client and server side computing.
@change 2006.8.23: whether an object is sentient has nothing to do with whether it is referenced by other objects.
However, if an object is sentient, all its referenced objects are at least simulated by the basic path-finding algorithm.
and automatically updated in the container tile when their location changes.
// Compute next scene for all game objects and generate the vicinity list.
CEnvironmentSim::Simulate(dTimeDelta){
// Load physics around the current player and the camera position.
// This is very game specific. Usually, it only ensures that physics object
// around the current player and camera eye position is loaded.
Call CheckLoadPhysics(player?position, player?radius*2)
Call CheckLoadPhysics(camera?position, camera?near_plane*2)
// Pass 1:Update Game Objects: building perceived object lists for each sentient object
for each sentient game objects (sentientObj) in the scene{
sentientObj.m_nSentientObjCount=0;
sentientObj.m_PerceivedList.clear();
update itself in the terrain tile according to its current position:
for each valid terrain tiles(9 or more) in the neighbourhood of sentientObj{
for each object (AnotherObj) in the terrain tile{
if(AnotherObj is not a sentient object){
if sentientObj falls inside the sentient area of any other game object(AnotherObj){
wake up AnotherObj, add it to the back of the sentient object list.
AnotherObj.OnEnterSentientArea();
}
}
if AnotherObj falls inside the sentient area of sentientObj{
sentientObj.m_nSentientObjCount++;
if AnotherObj falls inside the perceptive area of sentientObj{
sentientObj.m_PerceivedList.push_back(AnotherObj.name());
}
}
}
}
if(sentientObj.m_nSentientObjCount==0){
sentientObj.OnLeaveSentientArea();
remove sentientObj from the sentient object list.
}else{
// call game AI now or in the next pass, we advise a second pass,
// so it gives equal chance to each character
// sentientObj.OnPerceived();
}
}
// Pass 2 (It can be combined with Pass 1): call game AI of sentient objects
for each sentient game objects (pObj) in the scene{
pObj->m_nSimTag = SIM_TAG_START;
}
for each sentient game objects (pObj) in the scene{
// generate way points
pObj->PathFinding(dTimeDelta);
// move the biped according to way point commands
pObj->AnimateBiped(dTimeDelta);
// apply AI controllers
if(pObj->GetAIModule())
pObj->GetAIModule()->FrameMove((float)dTimeDelta);
if(!pObj->m_PerceivedList.empty())
pObj->On_Perception();
// call the frame move script if any.
pObj->On_FrameMove();
}
}
// Animate all global particles
for each particle system (pObj) in the scene{
if( !pObj->IsExploded() )
pObj->Animate(dTimeDelta);
}
}
*/
//-----------------------------------------------------------------------
#include "ParaEngine.h"
#include "ParaWorldAsset.h"
#include "SceneObject.h"
#include "MissileObject.h"
#include "BipedObject.h"
#include "TerrainTile.h"
#include "AIBase.h"
#include "FrameRateController.h"
#include "PhysicsWorld.h"
#include "TerrainTile.h"
#include "AutoCamera.h"
#include "MeshPhysicsObject.h"
#include "TerrainTileRoot.h"
#include "SunLight.h"
#include "EnvironmentSim.h"
using namespace ParaEngine;
/**
@def The simulation time delta advance must be smaller than this value.
currently it is 1 second lag. Greater than this value, the environment
simulator will only advance MAX_SIM_STEP
*/
#define MAX_SIM_LAG 1.0f
/**
@def this defines the worst case frame rate of the simulator
normally 15FPS works fine.
*/
#define MAX_SIM_STEP (1.f/15.f)
/** for simulation tag */
#define SIM_TAG_START 0
#define SIM_TAG_BASIC 1
#define SIM_TAG_FINISHED 0xff
CEnvironmentSim::CEnvironmentSim(void)
{
}
CEnvironmentSim::~CEnvironmentSim(void)
{
m_listActiveTerrain.clear();
list< ActiveBiped* >::iterator itCurCP, itEndCP = m_listActiveBiped.end();
for( itCurCP = m_listActiveBiped.begin(); itCurCP != itEndCP; ++ itCurCP)
{
ActiveBiped* pBiped = *itCurCP;
delete pBiped;
}
m_listActiveBiped.clear();
m_listVIPBipeds.clear();
}
void CEnvironmentSim::Release()
{
delete this;
}
// 2007.8.27: logic changes: the current player is always sentient to all other objects and all other objects are sentient to the current player.
void CEnvironmentSim::UpdateGameObjects(double dTimeDelta)
{
PERF1("EnvSim::UpdateGameObjects");
CSceneObject* pScene = CGlobals::GetScene();
CTerrainTile* duplicateTiles[9];
for (int i = 0;i < (int)pScene->GetSentientObjects().size(); )
{
// for each sentient game objects (sentientObj) in the scene
IGameObject* sentientObj = pScene->GetSentientObjects()[i];
if (!sentientObj)
{
pScene->GetSentientObjects().erase(i);
OUTPUT_LOG("warn: invalid weak ref found in pScene->GetSentientObjects()\n");
continue;
}
sentientObj->SetSentientObjCount(0);
sentientObj->GetPerceiveList().clear();
Vector3 vPos = sentientObj->GetPosition();
Vector2 vec2Pos(vPos.x, vPos.z);
// update itself in the terrain tile according to its current position:
CTerrainTile * pTile = pScene->GetRootTile()->GetTileByPoint(vPos.x, vPos.z);
if(pTile != NULL)
{
sentientObj->SetTileContainer(pTile);
for(int k=0;k<9;++k)
duplicateTiles[k]=NULL;
//for each valid terrain tiles(9 or more) in the neighborhood of sentientObj
for (int i=0; i<9;++i)
{
CTerrainTile* pTileAdjacent = pScene->GetRootTile()->GetAdjacentTile(vPos, (CTerrainTileRoot::DIRECTION)i);
if(pTileAdjacent!=NULL)
{
// check if pTile is a new tile that has not been processed by the current sentient object.
bool bNewAdjacentTile = true;
if((pTileAdjacent==sentientObj->GetTileContainer()) || pTileAdjacent->m_fRadius != sentientObj->GetTileContainer()->m_fRadius)
{
for(int k=0;k<9 && (duplicateTiles[k]!=NULL);++k)
{
if(duplicateTiles[k] == pTileAdjacent){
bNewAdjacentTile = false;
break;
}
}
}
if(bNewAdjacentTile)
{
{
VisitorList_type::iterator itCurCP, itEndCP = pTileAdjacent->m_listVisitors.end();
for( itCurCP = pTileAdjacent->m_listVisitors.begin(); itCurCP != itEndCP;)
{
IGameObject* AnotherObj = (*itCurCP);
if (AnotherObj != nullptr)
{
if (AnotherObj != sentientObj)
{
Vector3 vPosAnother = AnotherObj->GetPosition();
Vector2 vec2PosAnother(vPosAnother.x, vPosAnother.z);
float fDistSq = (vec2PosAnother - vec2Pos).squaredLength();
if (!AnotherObj->IsSentient())
{
//if sentientObj falls inside the sentient area of AnotherObj
if ((AnotherObj->IsSentientWith(sentientObj)) && fDistSq <= AnotherObj->GetSentientRadius()*AnotherObj->GetSentientRadius()){
pScene->AddSentientObject(AnotherObj);
}
}
//if AnotherObj falls inside the sentient area of sentientObj
if ((sentientObj->IsSentientWith(AnotherObj)) && fDistSq <= sentientObj->GetSentientRadius()*sentientObj->GetSentientRadius())
{
sentientObj->SetSentientObjCount(sentientObj->GetSentientObjCount() + 1);
// if AnotherObj falls inside the perceptive area of sentientObj
if (fDistSq <= sentientObj->GetPerceptiveRadius()*sentientObj->GetPerceptiveRadius())
{
sentientObj->GetPerceiveList().push_back(AnotherObj->GetIdentifier());
}
}
}
++itCurCP;
}
else
itCurCP = pTileAdjacent->m_listVisitors.erase(itCurCP);
}
}
// skip solid object on the root tile, since they are all global objects, not static objects.
if(pTileAdjacent!=pScene->GetRootTile())
{
// check collision with other static solid objects.
for (auto pObject : pTileAdjacent->m_listSolidObj)
{
IGameObject* AnotherObj = pObject->QueryIGameObject();
if(AnotherObj!=NULL && AnotherObj!=sentientObj && sentientObj->IsSentientWith(AnotherObj) )
{
Vector3 vPosAnother = AnotherObj->GetPosition();
Vector2 vec2PosAnother(vPosAnother.x, vPosAnother.z);
float fDistSq = (vec2PosAnother-vec2Pos).squaredLength();
//if AnotherObj falls inside the sentient area of sentientObj
if(fDistSq<= sentientObj->GetSentientRadius()*sentientObj->GetSentientRadius())
{
sentientObj->SetSentientObjCount(sentientObj->GetSentientObjCount()+1);
// if AnotherObj falls inside the perceptive area of sentientObj
if(fDistSq<= sentientObj->GetPerceptiveRadius()*sentientObj->GetPerceptiveRadius())
{
sentientObj->GetPerceiveList().push_back(AnotherObj->GetIdentifier());
}
}
}
}
}
for(int k=0;k<9;++k)
{
if(duplicateTiles[k]==NULL)
{
duplicateTiles[k] = pTileAdjacent;
break;
}
}
}//if(bNewAdjacentTile)
}
}
}
if(sentientObj->GetSentientObjCount()>0 || sentientObj->IsAlwaysSentient())
{
++i;
{ // set the simulation tag of all sentient objects and their referenced objects to SIM_TAG_START state.
sentientObj->SetSimTag(SIM_TAG_START);
if(sentientObj->HasReferences())
{
RefList::iterator itCur, itEnd = sentientObj->GetRefList().end();
for (itCur = sentientObj->GetRefList().begin(); itCur!=itEnd; ++itCur)
{
if(itCur->m_tag == 0)
{
IGameObject* pRefObj = ((CBaseObject*)((*itCur).m_object))->QueryIGameObject();
if(pRefObj!=0)
{
pRefObj->SetSimTag(SIM_TAG_START);
}
}
}
}
}
// call on perceived now or in the next pass.
}
else
{
sentientObj->On_LeaveSentientArea();
pScene->GetSentientObjects().erase(i);
}
}
}
void CEnvironmentSim::Simulate(double dTimeDelta)
{
if(dTimeDelta<=0)
return;
CSceneObject* pScene = CGlobals::GetScene();
if((pScene == NULL) || pScene->IsScenePaused() || (!(pScene->IsSceneEnabled())) )
return;
// when game time is paused, also pause the scene delta time
if (CGlobals::GetFrameRateController(FRC_GAME)->IsPaused() && dTimeDelta > 0.f)
dTimeDelta = CGlobals::GetFrameRateController(FRC_GAME)->GetElapsedTime();
// physics engine frame move.
CGlobals::GetPhysicsWorld()->StepSimulation(dTimeDelta);
/** advance the game time */
if(!CGlobals::GetFrameRateController(FRC_GAME)->IsPaused())
CGlobals::GetFrameRateController(FRC_GAME)->FrameMoveDelta((float)dTimeDelta);
// advance time of day
pScene->GetSunLight().AdvanceTimeOfDay((float)dTimeDelta);
/** Check load physics around the current player and the camera position
* this is very game specific. It only ensures that physics object around the current player and camera is loaded.
*/
CBipedObject* pPlayer = pScene->GetCurrentPlayer();
int nPointCount = 0;
CShapeSphere points[2];
if(pPlayer)
{
points[nPointCount].Set(pPlayer->GetPosition(), pPlayer->GetPhysicsRadius()*2.f);
nPointCount++;
}
if(pScene->GetCurrentCamera())
{
points[nPointCount].Set(pScene->GetCurrentCamera()->GetEyePosition(), pScene->GetCurrentCamera()->GetNearPlane()*2);
nPointCount++;
}
CheckLoadPhysics(points, nPointCount);
UpdateGameObjects(dTimeDelta);
{
PERF1("EnvSim::Frame Move Sentient Objects");
for (auto itCur = pScene->GetSentientObjects().begin(); itCur != pScene->GetSentientObjects().end();)
{
IGameObject* pObj = (*itCur);
if (!pObj)
{
itCur = pScene->GetSentientObjects().erase(itCur);
OUTPUT_LOG("warn: invalid weak ref found in pScene->GetSentientObjects()\n");
continue;
}
else
{
itCur++;
}
if(pObj->GetSimTag() != SIM_TAG_FINISHED)
{
pScene->SetCurrentActor((CBaseObject*)pObj);
if(pObj->GetSimTag() == SIM_TAG_START)
{
// generate way points
pObj->PathFinding(dTimeDelta);
// move the biped according to way point commands
pObj->AnimateBiped(dTimeDelta);
}
// apply AI controller
if(pObj->GetAIModule())
pObj->GetAIModule()->FrameMove((float)dTimeDelta);
if(!pObj->GetPerceiveList().empty())
pObj->On_Perception();
// call the frame move script if any.
pObj->On_FrameMove();
pObj->SetSimTag(SIM_TAG_FINISHED);
if(pObj->HasReferences())
{
RefList::iterator itCur, itEnd = pObj->GetRefList().end();
for (itCur = pObj->GetRefList().begin(); itCur!=itEnd; ++itCur)
{
if(itCur->m_tag == 0)
{
IGameObject* pRefObj = ((CBaseObject*)((*itCur).m_object))->QueryIGameObject();
if(pRefObj!=0 && !pRefObj->IsSentient() && pRefObj->IsGlobal() && (pRefObj->GetSimTag() == SIM_TAG_START))
{
//////////////////////////////////////////////////////////////////////////
// update reference object in the terrain tile according to its current position
Vector3 vPos = pRefObj->GetPosition();
CTerrainTile * pTile = pScene->GetRootTile()->GetTileByPoint(vPos.x, vPos.z);
if(pTile != NULL)
{
pRefObj->SetTileContainer(pTile);
}
//////////////////////////////////////////////////////////////////////////
// basic simulation: path finding, etc.
pScene->SetCurrentActor((CBaseObject*)pRefObj);
// generate way points
pRefObj->PathFinding(dTimeDelta);
// move the biped according to way point commands
pRefObj->AnimateBiped(dTimeDelta);
pRefObj->SetSimTag(SIM_TAG_BASIC);
}
}
}
}
}
}
if(CGlobals::WillGenReport())
{
CGlobals::GetReport()->SetValue("sentient objects", (int)pScene->GetSentientObjects().size());
}
}
/// frame move each unexploded missile objects.
{
for (auto pMissile : pScene->GetMissiles())
{
if( !pMissile->IsExploded() )
{
pMissile->Animate(dTimeDelta);
}
}
}
}
/** the scene must be loaded before calling this function*/
void CEnvironmentSim::CheckLoadPhysics(CShapeSphere* points, int nPointCount)
{
if(nPointCount<=0)
return;
queue_CTerrainTilePtr_Type queueTiles;
CTerrainTile* pTile = CGlobals::GetScene()->GetRootTile();
/// breadth first transversing the scene(the root tile is ignored)
/// pTile is now the root tile. object attached to it are never rendered directly
bool bQueueTilesEmpty = false;
while(bQueueTilesEmpty == false)
{
/// add other tiles
for(int i=0; i<MAX_NUM_SUBTILE; i++)
{
if(pTile->m_subtiles[i])
{
/** since 2009.8, all physics objects are attached to the leaf node, so we need to cull tile using a larger radius rather than the input fRadius. */
#define PhysicsMinDistance 50.f
/// rough culling algorithm using the quad tree terrain tiles
/// test against a sphere round the eye
for (int j=0;j<nPointCount;++j)
{
if(pTile->m_subtiles[i]->TestCollisionSphere(&(points[j].GetCenter()), PhysicsMinDistance))
{
queueTiles.push( pTile->m_subtiles[i] );
break;
}
}
}
}
/// go down the quad tree terrain tile to render objects
if(queueTiles.empty())
{
/// even we know that the tile is empty, we still need to see if there is anything in the queueNode for rendering
/// so when both queue are empty, we can exit the main rendering transversing loop
bQueueTilesEmpty = true;
}
else
{
pTile = queueTiles.front();
queueTiles.pop();
{
// For each mesh physics object in the tile, load its physics.
for (auto pObj : pTile->m_listFreespace)
{
if (pObj && pObj->CanHasPhysics())
{
IViewClippingObject* pViewClippingObject = pObj->GetViewClippingObject();
for(int j=0;j<nPointCount; ++j)
{
if(pViewClippingObject->TestCollisionSphere(&(points[j].GetCenter()), points[j].GetRadius(), 2))
{
pObj->LoadPhysics();
break;
}
}
}
}
// for visiting bipeds
for (auto pObj : pTile->m_listVisitors)
{
if (pObj && pObj->CanHasPhysics())
{
IViewClippingObject* pViewClippingObject = pObj->GetViewClippingObject();
for (int j = 0; j < nPointCount; ++j)
{
if (pViewClippingObject->TestCollisionSphere(&(points[j].GetCenter()), points[j].GetRadius(), 2))
{
pObj->LoadPhysics();
break;
}
}
}
}
}
}
}//while(!queueTiles.empty())
}
//-----------------------------------------------------------------
// name: Animate
/**
// desc: Environment collision detection and response
// call this function at every frame move. It's up to this simulator to decide
// how much computation is done each call. In other words, some computational
// extensive checking is done every few seconds and in multiple calls. In other
// words, the function will guarantee that the amount of computation for each call
// is balanced. Collision pairs are saved in m_pCollisionPairs, which may be used
// for AI simulation or game interface
//
[RIGHT: persistent collision] the ideal collision is like this: Once in collision
always in collision, unless the user or sim has moved object away. Collision in this
sense is better interpreted as touched against one other, like player and NPC.
[WRONG: collision only occurs once, then disapears]Collision is handled like this:
we will implement one step look ahead method. Suppose initially, a player is not in
collision with any object. By taking commands from the user, we will need to move
the player to a new position. So we save the player's old state, and move the player
one frame ahead. Then we will generate collision .
*/
//-----------------------------------------------------------------
void CEnvironmentSim::Animate( double dTimeDelta )
{
if(dTimeDelta > MAX_SIM_LAG)
{
/// time lag more than MAX_SIM_LAG(1) second will be detected by the environment simulator
//OUTPUT_DEBUG("time lag more than 1 second detected by the environment simulator\n");
dTimeDelta = MAX_SIM_STEP;
}
CSceneObject* pScene = CGlobals::GetScene();
/**
// the simulation is divided in to sub steps.
int nStepCount = (int)ceil(dTimeDelta/MAX_SIM_STEP);
double fSubStepDeltaTime = dTimeDelta;
if(nStepCount<=1)
nStepCount = 1;
else
fSubStepDeltaTime /= nStepCount;
// global biped simulation in multiple steps
for (int i =0; i<nStepCount;i++)
{
//CGlobals::GetPhysicsWorld()->StartPhysics(fSubStepDeltaTime);
// CGlobals::GetPhysicsWorld()->GetPhysicsResults();
Simulate(fSubStepDeltaTime);
}
*/
Simulate(dTimeDelta);
/// TODO: simulate other physical object here.
}
| {
"pile_set_name": "Github"
} |
I/ppss do/do not/* mean/vb to/to suggest/vb that/cs these/dts assumptions/nns are/ber self-evident/jj ,/, in/in the/at sense/nn that/cs everyone/pn agrees/vbz with/in them/ppo ./.
If/cs they/ppss were/bed ,/, Walter/np Lippmann/np would/md be/be writing/vbg the/at same/ap columns/nns as/cs George/np Sokolsky/np ,/, and/cc Herb/np Lock/np would/md have/hv nothing/pn to/to draw/vb cartoons/nns about/in ./.
I/ppss do/do mean/vb ,/, however/rb ,/, that/cs I/ppss take/vb them/ppo for/cs granted/vbn ,/, and/cc that/cs everything/pn I/ppss shall/md be/be saying/vbg would/md appear/vb quite/ql idiotic/jj against/in any/dti contrary/jj assumptions/nns ./.
Assumption/nn-hl 1/cd-hl ./.-hl
The/at ultimate/jj objective/nn of/in American/jj policy/nn is/bez to/to help/vb establish/vb a/at world/nn in/in which/wdt there/ex is/bez the/at largest/jjt possible/jj measure/nn of/in freedom/nn and/cc justice/nn and/cc peace/nn and/cc material/nn prosperity/nn ;/. ;/.
and/cc in/in particular/jj --/-- since/cs this/dt is/bez our/pp$ special/jj responsibility/nn --/-- that/cs these/dts conditions/nns be/be enjoyed/vbn by/in the/at people/nns of/in the/at United/vbn-tl States/nns-tl ./.
I/ppss speak/vb of/in ``/`` the/at largest/jjt possible/jj measure/nn ''/'' because/cs any/dti person/nn who/wps supposes/vbz that/cs these/dts conditions/nns can/md be/be universally/rb and/cc perfectly/rb achieved/vbn --/-- ever/rb --/-- reckons/vbz without/in the/at inherent/jj imperfectability/nn of/in himself/ppl and/cc his/pp$ fellow/nn human/jj beings/nns ,/, and/cc is/bez therefore/rb a/at dangerous/jj man/nn to/to have/hv around/rb ./.
Assumption/nn-hl 2/cd-hl ./.-hl
These/dts conditions/nns are/ber unobtainable/jj --/-- are/ber not/* even/rb approachable/jj in/in the/at qualified/vbn sense/nn I/ppss have/hv indicated/vbn --/-- without/in the/at prior/jj defeat/nn of/in world/nn Communism/nn-tl ./.
This/dt is/bez true/jj for/in two/cd reasons/nns :/: because/cs Communism/nn-tl is/bez both/abx doctrinally/rb ,/, and/cc in/in practice/nn ,/, antithetical/jj to/in these/dts conditions/nns ;/. ;/.
and/cc because/cs Communists/nns-tl have/hv the/at will/nn and/cc ,/, as/ql long/jj as/cs Soviet/nn-tl power/nn remains/vbz intact/jj ,/, the/at capacity/nn to/to prevent/vb their/pp$ realization/nn ./.
Moreover/rb ,/, as/cs Communist/jj-tl power/nn increases/vbz ,/, the/at enjoyment/nn of/in these/dts conditions/nns throughout/in the/at world/nn diminishes/vbz pro/in rata/fw-nns and/cc the/at possibility/nn of/in their/pp$ restoration/nn becomes/vbz increasingly/ql remote/jj ./.
Assumption/nn-hl 3/cd-hl ./.-hl
It/pps follows/vbz that/cs victory/nn over/in Communism/nn-tl is/bez the/at dominant/jj ,/, proximate/jj goal/nn of/in American/jj policy/nn ./.
Proximate/jj in/in the/at sense/nn that/cs there/ex are/ber more/ql distant/jj ,/, more/ql ``/`` positive/jj ''/'' ends/nns we/ppss seek/vb ,/, to/in which/wdt victory/nn over/in Communism/nn-tl is/bez but/in a/at means/nn ./.
But/cc dominant/jj in/in the/at sense/nn that/cs every/at other/ap objective/nn ,/, no/at matter/nn how/wql worthy/jj intrinsically/rb ,/, must/md defer/vb to/in it/ppo ./.
Peace/nn is/bez a/at worthy/jj objective/nn ;/. ;/.
but/cc if/cs we/ppss must/md choose/vb between/in peace/nn and/cc keeping/vbg the/at Communists/nns-tl out/in of/in Berlin/np ,/, then/rb we/ppss must/md fight/vb ./.
Freedom/nn ,/, in/in the/at sense/nn of/in self-determination/nn ,/, is/bez a/at worthy/jj objective/nn ;/. ;/.
but/cc if/cs granting/vbg self-determination/nn to/in the/at Algerian/jj-tl rebels/nns entails/vbz sweeping/vbg that/dt area/nn into/in the/at Sino-Soviet/np orbit/nn ,/, then/rb Algerian/jj-tl freedom/nn must/md be/be postponed/vbn ./.
Justice/nn is/bez a/at worthy/jj objective/nn ;/. ;/.
but/cc if/cs justice/nn for/in Bantus/nps entails/vbz driving/vbg the/at government/nn of/in the/at Union/nn-tl of/in-tl South/jj-tl Africa/np-tl away/rb from/in the/at West/nr-tl ,/, then/rb the/at Bantus/nps must/md be/be prepared/vbn to/to carry/vb their/pp$ identification/nn cards/nns yet/rb a/at while/nn longer/rbr ./.
Prosperity/nn is/bez a/at worthy/jj objective/nn ;/. ;/.
but/cc if/cs providing/vbg higher/jjr standards/nns of/in living/vbg gets/vbz in/in the/at way/nn of/in producing/vbg sufficient/jj guns/nns to/to resist/vb Communist/jj aggression/nn ,/, then/rb material/nn sacrifices/nns and/cc denials/nns will/md have/hv to/to be/be made/vbn ./.
It/pps may/md be/be ,/, of/in course/nn ,/, that/cs such/jj objectives/nns can/md be/be pursued/vbn consisently/rb with/in a/at policy/nn designed/vbn to/to overthrow/vb Communism/nn-tl ;/. ;/.
my/pp$ point/nn is/bez that/cs where/wrb conflicts/nns arise/vb they/ppss must/md always/rb be/be resolved/vbn in/in favor/nn of/in achieving/vbg the/at indispensable/jj condition/nn for/in a/at tolerant/jj world/nn --/-- the/at absence/nn of/in Soviet/nn-tl Communist/nn-tl power/nn ./.
The/at-hl uses/nns-hl of/in-hl power/nn-hl
This/dt much/ap having/hvg been/ben said/vbn ,/, the/at question/nn remains/vbz whether/cs we/ppss have/hv the/at resources/nns for/in the/at job/nn we/ppss have/hv to/to do/do --/-- defeat/vb Communism/nn-tl --/-- and/cc ,/, if/cs so/rb ,/, how/wrb those/dts resources/nns ought/md to/to be/be used/vbn ./.
This/dt brings/vbz us/ppo squarely/rb to/in the/at problem/nn of/in power/nn ,/, and/cc the/at uses/nns a/at nation/nn makes/vbz of/in power/nn ./.
I/ppss submit/vb that/cs this/dt is/bez the/at key/jjs problem/nn of/in international/jj relations/nns ,/, that/cs it/pps always/rb has/hvz been/ben ,/, that/cs it/pps always/rb will/md be/be ./.
And/cc I/ppss suggest/vb further/rbr that/cs the/at main/jjs cause/nn of/in the/at trouble/nn we/ppss are/ber in/in has/hvz been/ben the/at failure/nn of/in American/jj policy-makers/nns ,/, ever/ql since/rb we/ppss assumed/vbd free/jj world/nn leadership/nn in/in 1945/cd ,/, to/to deal/vb with/in this/dt problem/nn realistically/rb and/cc seriously/rb ./.
In/in the/at recent/jj political/jj campaign/nn two/cd charges/nns were/bed leveled/vbn affecting/vbg the/at question/nn of/in power/nn ,/, and/cc I/ppss think/vb we/ppss might/md begin/vb by/in trying/vbg to/to put/vb them/ppo into/in proper/jj focus/nn ./.
One/cd was/bedz demonstrably/rb false/jj ;/. ;/.
the/at other/ap ,/, for/in the/at most/ap part/nn ,/, true/jj ./.
The/at first/od was/bedz that/cs America/np had/hvd become/vbn --/-- or/cc was/bedz in/in danger/nn of/in becoming/vbg --/-- a/at second-rate/jj military/jj power/nn ./.
I/ppss know/vb I/ppss do/do not/* have/hv to/to dwell/vb here/rb on/in the/at absurdity/nn of/in that/dt contention/nn ./.
You/ppss may/md have/hv misgivings/nns about/in certain/jj aspects/nns of/in our/pp$ military/jj establishment/nn --/-- I/ppss certainly/rb do/do --/-- but/cc you/ppss know/vb any/dti comparison/nn of/in over-all/jj American/jj strength/nn with/in over-all/jj Soviet/nn-tl strength/nn finds/vbz the/at United/vbn-tl States/nns-tl not/* only/rb superior/jj ,/, but/cc so/ql superior/jj both/abx in/in present/jj weapons/nns and/cc in/in the/at development/nn of/in new/jj ones/nns that/cs our/pp$ advantage/nn promises/vbz to/to be/be a/at permanent/jj feature/nn of/in U.S.-Soviet/jj relations/nns for/in the/at foreseeable/jj future/nn ./.
I/ppss have/hv often/rb searched/vbn for/in a/at graphic/jj way/nn of/in impressing/vbg our/pp$ superiority/nn on/in those/dts Americans/nps who/wps have/hv doubts/nns ,/, and/cc I/ppss think/vb Mr./np Jameson/np Campaigne/np has/hvz done/vbn it/ppo well/rb in/in his/pp$ new/jj book/nn American/jj-tl Might/nn-tl And/cc-tl Soviet/nn-tl Myth/nn-tl ./.
Suppose/vb ,/, he/pps says/vbz ,/, that/cs the/at tables/nns were/bed turned/vbn ,/, and/cc we/ppss were/bed in/in the/at Soviets'/nps$ position/nn :/: ``/`` There/ex would/md be/be more/ap than/in 2,000/cd modern/jj Soviet/nn-tl fighters/nns ,/, all/abn better/jjr than/cs ours/pp$$ ,/, stationed/vbn at/in 250/cd bases/nns in/in Mexico/np and/cc the/at Caribbean/np ./.
Overwhelming/jj Russian/jj naval/jj power/nn would/md always/rb be/be within/in a/at few/ap hundred/cd miles/nns of/in our/pp$ coast/nn ./.
Half/abn of/in the/at population/nn of/in the/at U.S./np would/md be/be needed/vbn to/to work/vb on/in arms/nns just/rb to/to feed/vb the/at people/nns ''/'' ./.
Add/vb this/dt to/in the/at unrest/nn in/in the/at countries/nns around/in us/ppo where/wrb oppressed/vbn peoples/nns would/md be/be ready/jj to/to turn/vb on/in us/ppo at/in the/at first/od opportunity/nn ./.
Add/vb also/rb a/at comparatively/ql primitive/jj industrial/jj plant/nn which/wdt would/md severely/rb limit/vb our/pp$ capacity/nn to/to keep/vb abreast/rb of/in the/at Soviets/nps even/rb in/in the/at missile/nn field/nn which/wdt is/bez reputed/vbn to/to be/be our/pp$ main/jjs strength/nn ./.
If/cs we/ppss look/vb at/in the/at situation/nn this/dt way/nn ,/, we/ppss can/md get/vb an/at idea/nn of/in Khrushchev's/np$ nightmarish/jj worries/nns --/-- or/cc ,/, at/in least/ap ,/, of/in the/at worries/nns he/pps might/md have/hv if/cs his/pp$ enemies/nns were/bed disposed/vbn to/to exploit/vb their/pp$ advantage/nn ./.
U.S./np-hl ``/`` prestige/nn-hl ''/''
The/at other/ap charge/nn was/bedz that/cs America's/np$ political/jj position/nn in/in the/at world/nn has/hvz progressively/rb deteriorated/vbn in/in recent/jj years/nns ./.
The/at contention/nn needs/vbz to/to be/be formulated/vbn with/in much/ql greater/jjr precision/nn than/cs it/pps ever/rb was/bedz during/in the/at campaign/nn ,/, but/cc once/cs that/dt has/hvz been/ben done/vbn ,/, I/ppss fail/vb to/to see/vb how/wrb any/dti serious/jj student/nn of/in world/nn affairs/nns can/md quarrel/vb with/in it/ppo ./.
The/at argument/nn was/bedz typically/rb advanced/vbn in/in terms/nns of/in U.S./np ``/`` prestige/nn ''/'' ./.
Prestige/nn ,/, however/rb ,/, is/bez only/rb a/at minor/jj part/nn of/in the/at problem/nn ;/. ;/.
and/cc even/rb then/rb ,/, it/pps is/bez a/at concept/nn that/wps can/md be/be highly/ql misleading/jj ./.
Prestige/nn is/bez a/at measure/nn of/in how/wrb other/ap people/nns think/vb of/in you/ppo ,/, well/rb or/cc ill/rb ./.
But/cc contrary/jj to/in what/wdt was/bedz implied/vbn during/in the/at campaign/nn ,/, prestige/nn is/bez surely/rb not/* important/jj for/in its/pp$ own/jj sake/nn ./.
Only/rb the/at vain/jj and/cc incurably/ql sentimental/jj among/in us/ppo will/md lose/vb sleep/nn simply/rb because/cs foreign/jj peoples/nns are/ber not/* as/ql impressed/vbn by/in our/pp$ strength/nn as/cs they/ppss ought/md to/to be/be ./.
The/at thing/nn to/to lose/vb sleep/nn over/rp is/bez what/wdt people/nns ,/, having/hvg concluded/vbn that/cs we/ppss are/ber weaker/jjr than/cs we/ppss are/ber ,/, are/ber likely/jj to/to do/do about/in it/ppo ./.
The/at evidence/nn suggests/vbz that/cs foreign/jj peoples/nns believe/vb the/at United/vbn-tl States/nns-tl is/bez weaker/jjr than/cs the/at Soviet/nn-tl Union/nn-tl ,/, and/cc is/bez bound/vbn to/to fall/vb still/ql further/rbr behind/rb in/in the/at years/nns ahead/rb ./.
This/dt ignorant/jj estimate/nn ,/, I/ppss repeat/vb ,/, is/bez not/* of/in any/dti interest/nn in/in itself/ppl ;/. ;/.
but/cc it/pps becomes/vbz very/ql important/jj if/cs foreign/jj peoples/nns react/vb the/at way/nn human/jj beings/nns typically/rb do/do --/-- namely/rb ,/, by/in taking/vbg steps/nns to/to end/vb up/rp on/in what/wdt appears/vbz to/to be/be the/at winning/vbg side/nn ./.
To/in the/at extent/nn ,/, then/rb ,/, that/cs declining/vbg U.S./np prestige/nn means/vbz that/cs other/ap nations/nns will/md be/be tempted/vbn to/to place/vb their/pp$ bets/nns on/in an/at ultimate/jj American/jj defeat/nn ,/, and/cc will/md thus/rb be/be more/ql vulnerable/jj to/in Soviet/nn-tl intimidation/nn ,/, there/ex is/bez reason/nn for/in concern/nn ./.
Still/rb ,/, these/dts guesses/nns about/in the/at outcome/nn of/in the/at struggle/nn cannot/md* be/be as/ql important/jj as/cs the/at actual/jj power/nn relationship/nn between/in the/at Soviet/nn-tl Union/nn-tl and/cc ourselves/ppls ./.
Here/rb I/ppss do/do not/* speak/vb of/in military/jj power/nn where/wrb our/pp$ advantage/nn is/bez obvious/jj and/cc overwhelming/jj but/cc of/in political/jj power/nn --/-- of/in influence/nn ,/, if/cs you/ppss will/md --/-- about/in which/wdt the/at relevant/jj questions/nns are/ber :/: Is/bez Soviet/nn-tl influence/nn throughout/in the/at world/nn greater/jjr or/cc less/ap than/cs it/pps was/bedz ten/cd years/nns ago/rb ?/. ?/.
And/cc is/bez Western/jj-tl influence/nn greater/jjr or/cc less/ap than/cs it/pps used/vbd to/to be/be ?/. ?/.
Communist/jj-hl gains/nns-hl
In/in answering/vbg these/dts questions/nns ,/, we/ppss need/vb to/to ask/vb not/* merely/rb whether/cs Communist/jj troops/nns have/hv crossed/vbn over/rp into/in territories/nns they/ppss did/dod not/* occupy/vb before/rb ,/, and/cc not/* merely/rb whether/cs disciplined/vbn agents/nns of/in the/at Cominform/np are/ber in/in control/nn of/in governments/nns from/in which/wdt they/ppss were/bed formerly/rb excluded/vbn :/: the/at success/nn of/in Communism's/nn$-tl war/nn against/in the/at West/nr-tl does/doz not/* depend/vb on/in such/jj spectacular/jj and/cc definitive/jj conquests/nns ./.
Success/nn may/md mean/vb merely/rb the/at displacement/nn of/in Western/jj-tl influence/nn ./.
Communist/jj political/jj warfare/nn ,/, we/ppss must/md remember/vb ,/, is/bez waged/vbn insidiously/rb and/cc in/in deliberate/jj stages/nns ./.
Fearful/jj of/in inviting/vbg a/at military/jj showdown/nn with/in the/at West/nr-tl which/wdt they/ppss could/md not/* win/vb ,/, the/at Communists/nns-tl seek/vb to/to undermine/vb Western/jj-tl power/nn where/wrb the/at nuclear/jj might/nn of/in the/at West/nr-tl is/bez irrelevant/jj --/-- in/in backwoods/jj guerrilla/nn skirmishes/nns ,/, in/in mob/nn uprisings/nns in/in the/at streets/nns ,/, in/in parliaments/nns ,/, in/in clandestine/jj meetings/nns of/in undercover/jj conspirators/nns ,/, at/in the/at United/vbn-tl Nations/nns-tl ,/, on/in the/at propaganda/nn front/nn ,/, at/in diplomatic/jj conferences/nns --/-- preferably/rb at/in the/at highest/jjt level/nn ./.
The/at Soviets/nps understand/vb ,/, moreover/rb ,/, that/cs the/at first/od step/nn in/in turning/vbg a/at country/nn toward/in Communism/nn-tl is/bez to/to turn/vb it/ppo against/in the/at West/nr-tl ./.
Thus/rb ,/, typically/rb ,/, the/at first/od stage/nn of/in a/at Communist/jj takeover/nn is/bez to/to ``/`` neutralize/vb ''/'' a/at country/nn ./.
The/at second/od stage/nn is/bez to/to retain/vb the/at nominal/jj classification/nn of/in ``/`` neutralist/nn ''/'' ,/, while/cs in/in fact/nn turning/vbg the/at country/nn into/in an/at active/jj advocate/nn and/cc adherent/nn of/in Soviet/nn-tl policy/nn ./.
And/cc this/dt may/md be/be as/ql far/rb as/cs the/at process/nn will/md go/vb ./.
The/at Kremlin's/np$ goal/nn is/bez the/at isolation/nn and/cc capture/nn ,/, not/* of/in Ghana/np ,/, but/cc of/in the/at United/vbn-tl States/nns-tl --/-- and/cc this/dt purpose/nn may/md be/be served/vbn very/ql well/rb by/in countries/nns that/wps masquerade/vb under/in a/at ``/`` neutralist/nn ''/'' mask/nn ,/, yet/cc in/in fact/nn are/ber dependable/jj auxiliaries/nns of/in the/at Soviet/nn-tl Foreign/jj-tl Office/nn-tl ./.
To/to recite/vb the/at particulars/nns of/in recent/jj Soviet/nn-tl successes/nns is/bez hardly/rb reassuring/vbg ./.
Six/cd years/nns ago/rb French/jj-tl Indochina/np-tl ,/, though/cs in/in troubie/nn ,/, was/bedz in/in the/at Western/jj-tl camp/nn ./.
Today/nr Northern/jj-tl Vietnam/np-tl is/bez overtly/rb Communist/jj ;/. ;/.
Laos/np is/bez teetering/vbg between/in Communism/nn-tl and/cc pro-Communist/jj neutralism/nn ;/. ;/.
Cambodia/np is/bez ,/, for/in all/abn practical/jj purposes/nns ,/, neutralist/jj ./.
Indonesia/np ,/, in/in the/at early/jj days/nns of/in the/at Republic/nn-tl ,/, leaned/vbd toward/in the/at West/nr-tl ./.
Today/nr Sukarno's/np$ government/nn is/bez heavily/ql besieged/vbn by/in avowed/vbn Communists/nns-tl ,/, and/cc for/in all/abn of/in its/pp$ ``/`` neutralist/jj ''/'' pretensions/nns ,/, it/pps is/bez a/at firm/jj ally/nn of/in Soviet/nn-tl policy/nn ./.
Ceylon/np has/hvz moved/vbn from/in a/at pro-Western/jj orientation/nn to/in a/at neutralism/nn openly/ql hostile/jj to/in the/at West/nr-tl ./.
In/in the/at Middle/jj-tl East/nr-tl ,/, Iraq/np ,/, Syria/np and/cc Egypt/np were/bed ,/, a/at short/jj while/nn ago/rb ,/, in/in the/at Western/jj-tl camp/nn ./.
Today/nr the/at Nasser/np and/cc Kassem/np governments/nns are/ber adamantly/ql hostile/jj to/in the/at West/nr-tl ,/, are/ber dependent/jj for/in their/pp$ military/jj power/nn on/in Soviet/nn-tl equipment/nn and/cc personnel/nns ;/. ;/.
in/in almost/rb every/at particular/jj follow/vb the/at Kremlin's/np$ foreign/jj policy/nn line/nn ./.
A/at short/jj time/nn ago/rb all/abn Africa/np was/bedz a/at Western/jj-tl preserve/nn ./.
Never/rb mind/vb whether/cs the/at Kikiyus/nps and/cc the/at Bantus/nps enjoyed/vbd Wilsonian/jj self-determination/nn :/: the/at point/nn is/bez that/cs in/in the/at struggle/nn for/in the/at world/nn that/dt vast/jj land/nn mass/nn was/bedz under/in the/at domination/nn and/cc influence/nn of/in the/at West/nr-tl ./.
Today/nr ,/, Africa/np is/bez swerving/vbg violently/rb away/rb from/in the/at West/nr-tl and/cc plunging/vbg ,/, it/pps would/md seem/vb ,/, into/in the/at Soviet/nn-tl orbit/nn ./.
Latin/jj-tl America/np-tl was/bedz once/cs an/at area/nn as/ql ``/`` safe/jj ''/'' for/in the/at West/nr-tl as/cs Nebraska/np was/bedz for/in Nixon/np ./.
Today/nr it/pps is/bez up/rp for/in grabs/nns ./.
One/cd Latin/jj American/jj country/nn ,/, Cuba/np ,/, has/hvz become/vbn a/at Soviet/nn-tl bridgehead/nn ninety/cd miles/nns off/in our/pp$ coast/nn ./.
In/in some/dti countries/nns the/at trend/nn has/hvz gone/vbn further/rbr than/cs others/nns :/: Mexico/np ,/, Panama/np ,/, and/cc Venezuela/np are/ber displaying/vbg open/jj sympathy/nn for/in Castroism/np ,/, and/cc there/ex is/bez no/at country/nn --/-- save/vb the/at Dominican/np-tl Republic/nn-tl whose/wp$ funeral/jj services/nns we/ppss recently/rb arranged/vbd --/-- where/wrb Castroism/np and/cc Anti-Americanism/nn does/doz not/* prevent/vb the/at government/nn from/in unqualifiedly/ql espousing/vbg the/at American/jj cause/nn ./.
Only/rb in/in Europe/np have/hv our/pp$ lines/nns remained/vbn firm/jj --/-- and/cc there/rb only/rb on/in the/at surface/nn ./.
The/at strains/nns of/in neutralism/nn are/ber running/vbg strong/rb ,/, notably/rb in/in England/np ,/, and/cc even/rb in/in Germany/np ./.
Opportunities/nns-hl missed/vbn-hl
What/wdt have/hv we/ppss to/to show/vb by/in way/nn of/in counter-successes/nns ?/. ?/.
We/ppss have/hv had/hvn opportunities/nns --/-- clear/jj invitations/nns to/to plant/vb our/pp$ influence/nn on/in the/at other/ap side/nn of/in the/at Iron/jj-tl Curtain/nn-tl ./.
There/ex was/bedz the/at Hungarian/jj-tl Revolution/nn-tl which/wdt we/ppss praised/vbd and/cc mourned/vbd ,/, but/cc did/dod nothing/pn about/in ./.
There/ex was/bedz the/at Polish/jj-tl Revolution/nn-tl which/wdt we/ppss misunderstood/vbd and/cc then/rb helped/vbd guide/vb along/in a/at course/nn favorable/jj to/in Soviet/nn-tl interests/nns ./.
There/ex was/bedz the/at revolution/nn in/in Tibet/np which/wdt we/ppss pretended/vbd did/dod not/* exist/vb ./.
Only/rb in/in one/cd instance/nn have/hv we/ppss moved/vbn purposively/rb and/cc effectively/rb to/to dislodge/vb existing/vbg Communist/jj power/nn :/: in/in Guatemala/np ./.
And/cc contrary/jj to/in what/wdt has/hvz been/ben said/vbn recently/rb ,/, we/ppss did/dod not/* wait/vb for/in ``/`` outside/jj pressures/nns ''/'' and/cc ``/`` world/nn opinion/nn ''/'' to/to bring/vb down/rp that/dt Communist/jj government/nn ;/. ;/.
we/ppss moved/vbd decisively/rb to/to effect/vb an/at Anti-Communist/jj coup/fw-nn d'etat/fw-in+nn ./.
We/ppss served/vbd our/pp$ national/jj interests/nns ,/, and/cc by/in so/rb doing/vbg we/ppss saved/vbd the/at Guatemalan/jj people/nns the/at ultimate/jj in/in human/jj misery/nn ./.
| {
"pile_set_name": "Github"
} |
#import "GPUImageFilter.h"
@interface GPUImageLineGenerator : GPUImageFilter
{
GLint lineWidthUniform, lineColorUniform;
GLfloat *lineCoordinates;
}
// The width of the displayed lines, in pixels. The default is 1.
@property(readwrite, nonatomic) CGFloat lineWidth;
// The color of the lines is specified using individual red, green, and blue components (normalized to 1.0). The default is green: (0.0, 1.0, 0.0).
- (void)setLineColorRed:(GLfloat)redComponent green:(GLfloat)greenComponent blue:(GLfloat)blueComponent;
// Rendering
- (void)renderLinesFromArray:(GLfloat *)lineSlopeAndIntercepts count:(NSUInteger)numberOfLines frameTime:(CMTime)frameTime;
@end
| {
"pile_set_name": "Github"
} |
API
===
.. automodule:: flask_rq2.app
.. autoclass:: RQ
:members:
:member-order: bysource
.. automethod:: __init__
.. automodule:: flask_rq2.cli
:members:
.. automodule:: flask_rq2.functions
:members:
:member-order: bysource
.. automodule:: flask_rq2.job
:members:
| {
"pile_set_name": "Github"
} |
; RUN: llvm-as %s -o %t.bc
; RUN: llvm-spirv %t.bc -spirv-text -o %t.txt
; RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV
; RUN: llvm-spirv %t.bc -o %t.spv
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
; CHECK-SPIRV: 4 GenericPtrMemSemantics {{[0-9]+}} [[ResID:[0-9]+]] {{[0-9]+}}
; CHECK-SPIRV-NEXT: 5 ShiftRightLogical {{[0-9]+}} {{[0-9]+}} [[ResID]] {{[0-9]+}}
; Note that round-trip conversion replaces 'get_fence (gentype *ptr)' built-in function with 'get_fence (const gentype *ptr)'.
; CHECK-LLVM: call spir_func i32 @_Z9get_fencePKU3AS4v(i8
; CHECK-LLVM-NEXT: shl
; CHECK-LLVM-NEXT: lshr
target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir-unknown-unknown"
@gint = addrspace(1) global i32 1, align 4
; Function Attrs: nounwind readnone
define spir_func i32 @isFenceValid(i32 %fence) #0 {
entry:
%switch = icmp ult i32 %fence, 4
%. = zext i1 %switch to i32
ret i32 %.
}
; Function Attrs: nounwind
define spir_func i32 @f4(i32 %val, i32 addrspace(4)* %ptr) #1 {
entry:
%0 = bitcast i32 addrspace(4)* %ptr to i8 addrspace(4)*
%call = tail call spir_func i32 @_Z9get_fencePU3AS4v(i8 addrspace(4)* %0) #3
%switch.i = icmp ult i32 %call, 4
%1 = load i32 addrspace(4)* %ptr, align 4
%cmp = icmp eq i32 %1, %val
%and4 = and i1 %switch.i, %cmp
%and = zext i1 %and4 to i32
%2 = xor i32 %and, 1
ret i32 %2
}
declare spir_func i32 @_Z9get_fencePU3AS4v(i8 addrspace(4)*) #2
; Function Attrs: nounwind
define spir_kernel void @testKernel(i32 addrspace(1)* nocapture %results) #1 {
entry:
%call = tail call spir_func i32 @_Z13get_global_idj(i32 0) #3
%0 = load i32 addrspace(1)* @gint, align 4
%call.i = tail call spir_func i32 @_Z9get_fencePU3AS4v(i8 addrspace(4)* addrspacecast (i8 addrspace(1)* bitcast (i32 addrspace(1)* @gint to i8 addrspace(1)*) to i8 addrspace(4)*)) #3
%switch.i.i = icmp ult i32 %call.i, 4
%1 = load i32 addrspace(4)* addrspacecast (i32 addrspace(1)* @gint to i32 addrspace(4)*), align 4
%cmp.i = icmp eq i32 %1, %0
%and4.i = and i1 %switch.i.i, %cmp.i
%cond = zext i1 %and4.i to i32
%arrayidx = getelementptr inbounds i32 addrspace(1)* %results, i32 %call
store i32 %cond, i32 addrspace(1)* %arrayidx, align 4
ret void
}
declare spir_func i32 @_Z13get_global_idj(i32) #2
attributes #0 = { nounwind readnone "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #3 = { nounwind }
!opencl.kernels = !{!0}
!opencl.enable.FP_CONTRACT = !{}
!opencl.spir.version = !{!6}
!opencl.ocl.version = !{!7}
!opencl.used.extensions = !{!8}
!opencl.used.optional.core.features = !{!8}
!opencl.compiler.options = !{!8}
!0 = !{void (i32 addrspace(1)*)* @testKernel, !1, !2, !3, !4, !5}
!1 = !{!"kernel_arg_addr_space", i32 1}
!2 = !{!"kernel_arg_access_qual", !"none"}
!3 = !{!"kernel_arg_type", !"uint*"}
!4 = !{!"kernel_arg_base_type", !"uint*"}
!5 = !{!"kernel_arg_type_qual", !""}
!6 = !{i32 1, i32 2}
!7 = !{i32 2, i32 0}
!8 = !{}
| {
"pile_set_name": "Github"
} |
* Spec header
SCHEDULED: <2019-08-01 Thu> DEADLINE: <2019-08-04 Sun>
| {
"pile_set_name": "Github"
} |
fn foo(
x: i32,
y: i32,
z: i32
) {
}
pub fn new<S>(
shape: S,
material_idx: usize)
-> Primitive
where S: Shape + 'static {}
fn main() {
foo(
1,
2,
3,
)
}
| {
"pile_set_name": "Github"
} |
// Copyright 2013 the V8 project authors. 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 and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// general tests
var e31 = Math.pow(2, 31);
assertEquals(-e31, -1*e31);
assertEquals(e31, -1*e31*(-1));
assertEquals(e31, -1*-e31);
assertEquals(e31, -e31*(-1));
var x = {toString : function() {return 1}}
function add(a,b){return a+b;}
add(1,x);
add(1,x);
%OptimizeFunctionOnNextCall(add);
add(1,x);
x.toString = function() {return "2"};
assertEquals(add(1,x), "12");
// Test the correct placement of the simulates in TruncateToNumber:
function Checker() {
this.str = "1";
var toStringCalled = 0;
var toStringExpected = 0;
this.toString = function() {
toStringCalled++;
return this.str;
};
this.check = function() {
toStringExpected++;
assertEquals(toStringExpected, toStringCalled);
};
};
var left = new Checker();
var right = new Checker();
function test(fun,check_fun,a,b,does_throw) {
left.str = a;
right.str = b;
try {
assertEquals(check_fun(a,b), fun(left, right));
assertTrue(!does_throw);
} catch(e) {
if (e instanceof TypeError) {
assertTrue(!!does_throw);
} else {
throw e;
}
} finally {
left.check();
if (!does_throw || does_throw>1) {
right.check();
}
}
}
function minus(a,b) { return a-b };
function check_minus(a,b) { return a-b };
function mod(a,b) { return a%b };
function check_mod(a,b) { return a%b };
test(minus,check_minus,1,2);
// Bailout on left
test(minus,check_minus,1<<30,1);
// Bailout on right
test(minus,check_minus,1,1<<30);
// Bailout on result
test(minus,check_minus,1<<30,-(1<<30));
// Some more interesting things
test(minus,check_minus,1,1.4);
test(minus,check_minus,1.3,4);
test(minus,check_minus,1.3,1.4);
test(minus,check_minus,1,2);
test(minus,check_minus,1,undefined);
test(minus,check_minus,1,2);
test(minus,check_minus,1,true);
test(minus,check_minus,1,2);
test(minus,check_minus,1,null);
test(minus,check_minus,1,2);
test(minus,check_minus,1,"");
test(minus,check_minus,1,2);
// Throw on left
test(minus,check_minus,{},1,1);
// Throw on right
test(minus,check_minus,1,{},2);
// Throw both
test(minus,check_minus,{},{},1);
test(minus,check_minus,1,2);
// Now with optimized code
test(mod,check_mod,1,2);
%OptimizeFunctionOnNextCall(mod);
test(mod,check_mod,1,2);
test(mod,check_mod,1<<30,1);
%OptimizeFunctionOnNextCall(mod);
test(mod,check_mod,1<<30,1);
test(mod,check_mod,1,1<<30);
%OptimizeFunctionOnNextCall(mod);
test(mod,check_mod,1,1<<30);
test(mod,check_mod,1<<30,-(1<<30));
%OptimizeFunctionOnNextCall(mod);
test(mod,check_mod,1<<30,-(1<<30));
test(mod,check_mod,1,{},2);
%OptimizeFunctionOnNextCall(mod);
test(mod,check_mod,1,{},2);
test(mod,check_mod,1,2);
// test oddballs
function t1(a, b) {return a-b}
assertEquals(t1(1,2), 1-2);
assertEquals(t1(2,true), 2-1);
assertEquals(t1(false,2), 0-2);
assertEquals(t1(1,2.4), 1-2.4);
assertEquals(t1(1.3,2.4), 1.3-2.4);
assertEquals(t1(true,2.4), 1-2.4);
assertEquals(t1(1,undefined), 1-NaN);
assertEquals(t1(1,1<<30), 1-(1<<30));
assertEquals(t1(1,2), 1-2);
function t2(a, b) {return a/b}
assertEquals(t2(1,2), 1/2);
assertEquals(t2(null,2), 0/2);
assertEquals(t2(null,-2), 0/-2);
assertEquals(t2(2,null), 2/0);
assertEquals(t2(-2,null), -2/0);
assertEquals(t2(1,2.4), 1/2.4);
assertEquals(t2(1.3,2.4), 1.3/2.4);
assertEquals(t2(null,2.4), 0/2.4);
assertEquals(t2(1.3,null), 1.3/0);
assertEquals(t2(undefined,2), NaN/2);
assertEquals(t2(1,1<<30), 1/(1<<30));
assertEquals(t2(1,2), 1/2);
// Assert that the hole is not truncated to nan for string add.
function string_add(a,i) {
var d = [0.1, ,0.3];
return a + d[i];
}
string_add(1.1, 0);
string_add("", 0);
%OptimizeFunctionOnNextCall(string_add);
string_add(1.1, 0);
// There comes the hole
assertEquals("undefined", string_add("", 1));
| {
"pile_set_name": "Github"
} |
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include "rpc.h"
#include "rpcndr.h"
#ifndef COM_NO_WINDOWS_H
#include "windows.h"
#include "ole2.h"
#endif
#ifndef __mergemod_h__
#define __mergemod_h__
#ifndef _WIN32_MSM
#define _WIN32_MSM 100
#endif
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __IEnumMsmString_FWD_DEFINED__
#define __IEnumMsmString_FWD_DEFINED__
typedef struct IEnumMsmString IEnumMsmString;
#endif
#ifndef __IMsmStrings_FWD_DEFINED__
#define __IMsmStrings_FWD_DEFINED__
typedef struct IMsmStrings IMsmStrings;
#endif
#ifndef __IMsmError_FWD_DEFINED__
#define __IMsmError_FWD_DEFINED__
typedef struct IMsmError IMsmError;
#endif
#ifndef __IEnumMsmError_FWD_DEFINED__
#define __IEnumMsmError_FWD_DEFINED__
typedef struct IEnumMsmError IEnumMsmError;
#endif
#ifndef __IMsmErrors_FWD_DEFINED__
#define __IMsmErrors_FWD_DEFINED__
typedef struct IMsmErrors IMsmErrors;
#endif
#ifndef __IMsmDependency_FWD_DEFINED__
#define __IMsmDependency_FWD_DEFINED__
typedef struct IMsmDependency IMsmDependency;
#endif
#ifndef __IEnumMsmDependency_FWD_DEFINED__
#define __IEnumMsmDependency_FWD_DEFINED__
typedef struct IEnumMsmDependency IEnumMsmDependency;
#endif
#ifndef __IMsmDependencies_FWD_DEFINED__
#define __IMsmDependencies_FWD_DEFINED__
typedef struct IMsmDependencies IMsmDependencies;
#endif
#ifndef __IMsmMerge_FWD_DEFINED__
#define __IMsmMerge_FWD_DEFINED__
typedef struct IMsmMerge IMsmMerge;
#endif
#ifndef __IMsmGetFiles_FWD_DEFINED__
#define __IMsmGetFiles_FWD_DEFINED__
typedef struct IMsmGetFiles IMsmGetFiles;
#endif
#ifndef __IMsmStrings_FWD_DEFINED__
#define __IMsmStrings_FWD_DEFINED__
typedef struct IMsmStrings IMsmStrings;
#endif
#ifndef __IMsmError_FWD_DEFINED__
#define __IMsmError_FWD_DEFINED__
typedef struct IMsmError IMsmError;
#endif
#ifndef __IMsmErrors_FWD_DEFINED__
#define __IMsmErrors_FWD_DEFINED__
typedef struct IMsmErrors IMsmErrors;
#endif
#ifndef __IMsmDependency_FWD_DEFINED__
#define __IMsmDependency_FWD_DEFINED__
typedef struct IMsmDependency IMsmDependency;
#endif
#ifndef __IMsmDependencies_FWD_DEFINED__
#define __IMsmDependencies_FWD_DEFINED__
typedef struct IMsmDependencies IMsmDependencies;
#endif
#ifndef __IMsmGetFiles_FWD_DEFINED__
#define __IMsmGetFiles_FWD_DEFINED__
typedef struct IMsmGetFiles IMsmGetFiles;
#endif
#if (_WIN32_MSM >= 150)
#ifndef __IMsmConfigurableItem_FWD_DEFINED__
#define __IMsmConfigurableItem_FWD_DEFINED__
typedef struct IMsmConfigurableItem IMsmConfigurableItem;
#endif
#ifndef __IEnumMsmConfigurableItem_FWD_DEFINED__
#define __IEnumMsmConfigurableItem_FWD_DEFINED__
typedef struct IEnumMsmConfigurableItem IEnumMsmConfigurableItem;
#endif
#ifndef __IMsmConfigurableItems_FWD_DEFINED__
#define __IMsmConfigurableItems_FWD_DEFINED__
typedef struct IMsmConfigurableItems IMsmConfigurableItems;
#endif
#ifndef __IMsmMerge2_FWD_DEFINED__
#define __IMsmMerge2_FWD_DEFINED__
typedef struct IMsmMerge2 IMsmMerge2;
#endif
#ifndef __IMsmConfigureModule_FWD_DEFINED__
#define __IMsmConfigureModule_FWD_DEFINED__
typedef struct IMsmConfigureModule IMsmConfigureModule;
#endif
#ifndef __MsmMerge2_FWD_DEFINED__
#define __MsmMerge2_FWD_DEFINED__
#ifdef __cplusplus
typedef class MsmMerge2 MsmMerge2;
#else
typedef struct MsmMerge2 MsmMerge2;
#endif
#endif
#endif
#ifndef __MsmMerge_FWD_DEFINED__
#define __MsmMerge_FWD_DEFINED__
#ifdef __cplusplus
typedef class MsmMerge MsmMerge;
#else
typedef struct MsmMerge MsmMerge;
#endif
#endif
#include "oaidl.h"
#ifndef __MIDL_user_allocate_free_DEFINED__
#define __MIDL_user_allocate_free_DEFINED__
void *__RPC_API MIDL_user_allocate(size_t);
void __RPC_API MIDL_user_free(void *);
#endif
#ifndef __FORWARD_IID_IMSMMERGETYPELIB
#define __FORWARD_IID_IMSMMERGETYPELIB
typedef enum msmErrorType {
msmErrorLanguageUnsupported = 1,msmErrorLanguageFailed = 2,msmErrorExclusion = 3,msmErrorTableMerge = 4,msmErrorResequenceMerge = 5,
msmErrorFileCreate = 6,msmErrorDirCreate = 7,msmErrorFeatureRequired = 8,
#if (_WIN32_MSM >= 150)
msmErrorBadNullSubstitution = 9,msmErrorBadSubstitutionType = 10,msmErrorMissingConfigItem = 11,msmErrorBadNullResponse = 12,
msmErrorDataRequestFailed = 13,msmErrorPlatformMismatch = 14
#endif
} msmErrorType;
#if (_WIN32_MSM >= 150)
typedef enum msmConfigurableItemFormat {
msmConfigurableItemText = 0,msmConfigurableItemKey = 1,msmConfigurableItemInteger = 2,msmConfigurableItemBitfield = 3
} msmConfigurableItemFormat;
typedef enum msmConfigurableItemOptions {
msmConfigurableOptionKeyNoOrphan = 1,msmConfigurableOptionNonNullable = 2
} msmConfigurableItemOptions;
#endif
#endif
extern RPC_IF_HANDLE __MIDL_itf_mergemod_0000_v0_0_c_ifspec;
extern RPC_IF_HANDLE __MIDL_itf_mergemod_0000_v0_0_s_ifspec;
#ifndef __IEnumMsmString_INTERFACE_DEFINED__
#define __IEnumMsmString_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IEnumMsmString : public IUnknown {
public:
virtual HRESULT WINAPI Next(unsigned __LONG32 cFetch,BSTR *rgbstrStrings,unsigned __LONG32 *pcFetched) = 0;
virtual HRESULT WINAPI Skip(unsigned __LONG32 cSkip) = 0;
virtual HRESULT WINAPI Reset(void) = 0;
virtual HRESULT WINAPI Clone(IEnumMsmString **pemsmStrings) = 0;
};
#else
typedef struct IEnumMsmStringVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IEnumMsmString *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IEnumMsmString *This);
ULONG (WINAPI *Release)(IEnumMsmString *This);
HRESULT (WINAPI *Next)(IEnumMsmString *This,unsigned __LONG32 cFetch,BSTR *rgbstrStrings,unsigned __LONG32 *pcFetched);
HRESULT (WINAPI *Skip)(IEnumMsmString *This,unsigned __LONG32 cSkip);
HRESULT (WINAPI *Reset)(IEnumMsmString *This);
HRESULT (WINAPI *Clone)(IEnumMsmString *This,IEnumMsmString **pemsmStrings);
END_INTERFACE
} IEnumMsmStringVtbl;
struct IEnumMsmString {
CONST_VTBL struct IEnumMsmStringVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IEnumMsmString_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumMsmString_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumMsmString_Release(This) (This)->lpVtbl->Release(This)
#define IEnumMsmString_Next(This,cFetch,rgbstrStrings,pcFetched) (This)->lpVtbl->Next(This,cFetch,rgbstrStrings,pcFetched)
#define IEnumMsmString_Skip(This,cSkip) (This)->lpVtbl->Skip(This,cSkip)
#define IEnumMsmString_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumMsmString_Clone(This,pemsmStrings) (This)->lpVtbl->Clone(This,pemsmStrings)
#endif
#endif
HRESULT WINAPI IEnumMsmString_Next_Proxy(IEnumMsmString *This,unsigned __LONG32 cFetch,BSTR *rgbstrStrings,unsigned __LONG32 *pcFetched);
void __RPC_STUB IEnumMsmString_Next_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmString_Skip_Proxy(IEnumMsmString *This,unsigned __LONG32 cSkip);
void __RPC_STUB IEnumMsmString_Skip_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmString_Reset_Proxy(IEnumMsmString *This);
void __RPC_STUB IEnumMsmString_Reset_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmString_Clone_Proxy(IEnumMsmString *This,IEnumMsmString **pemsmStrings);
void __RPC_STUB IEnumMsmString_Clone_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IMsmStrings_INTERFACE_DEFINED__
#define __IMsmStrings_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmStrings : public IDispatch {
public:
virtual HRESULT WINAPI get_Item(__LONG32 Item,BSTR *Return) = 0;
virtual HRESULT WINAPI get_Count(__LONG32 *Count) = 0;
virtual HRESULT WINAPI get__NewEnum(IUnknown **NewEnum) = 0;
};
#else
typedef struct IMsmStringsVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmStrings *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmStrings *This);
ULONG (WINAPI *Release)(IMsmStrings *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmStrings *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmStrings *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmStrings *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmStrings *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *get_Item)(IMsmStrings *This,__LONG32 Item,BSTR *Return);
HRESULT (WINAPI *get_Count)(IMsmStrings *This,__LONG32 *Count);
HRESULT (WINAPI *get__NewEnum)(IMsmStrings *This,IUnknown **NewEnum);
END_INTERFACE
} IMsmStringsVtbl;
struct IMsmStrings {
CONST_VTBL struct IMsmStringsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmStrings_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmStrings_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmStrings_Release(This) (This)->lpVtbl->Release(This)
#define IMsmStrings_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmStrings_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmStrings_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmStrings_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmStrings_get_Item(This,Item,Return) (This)->lpVtbl->get_Item(This,Item,Return)
#define IMsmStrings_get_Count(This,Count) (This)->lpVtbl->get_Count(This,Count)
#define IMsmStrings_get__NewEnum(This,NewEnum) (This)->lpVtbl->get__NewEnum(This,NewEnum)
#endif
#endif
HRESULT WINAPI IMsmStrings_get_Item_Proxy(IMsmStrings *This,__LONG32 Item,BSTR *Return);
void __RPC_STUB IMsmStrings_get_Item_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmStrings_get_Count_Proxy(IMsmStrings *This,__LONG32 *Count);
void __RPC_STUB IMsmStrings_get_Count_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmStrings_get__NewEnum_Proxy(IMsmStrings *This,IUnknown **NewEnum);
void __RPC_STUB IMsmStrings_get__NewEnum_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IMsmError_INTERFACE_DEFINED__
#define __IMsmError_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmError : public IDispatch {
public:
virtual HRESULT WINAPI get_Type(msmErrorType *ErrorType) = 0;
virtual HRESULT WINAPI get_Path(BSTR *ErrorPath) = 0;
virtual HRESULT WINAPI get_Language(short *ErrorLanguage) = 0;
virtual HRESULT WINAPI get_DatabaseTable(BSTR *ErrorTable) = 0;
virtual HRESULT WINAPI get_DatabaseKeys(IMsmStrings **ErrorKeys) = 0;
virtual HRESULT WINAPI get_ModuleTable(BSTR *ErrorTable) = 0;
virtual HRESULT WINAPI get_ModuleKeys(IMsmStrings **ErrorKeys) = 0;
};
#else
typedef struct IMsmErrorVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmError *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmError *This);
ULONG (WINAPI *Release)(IMsmError *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmError *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmError *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmError *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmError *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *get_Type)(IMsmError *This,msmErrorType *ErrorType);
HRESULT (WINAPI *get_Path)(IMsmError *This,BSTR *ErrorPath);
HRESULT (WINAPI *get_Language)(IMsmError *This,short *ErrorLanguage);
HRESULT (WINAPI *get_DatabaseTable)(IMsmError *This,BSTR *ErrorTable);
HRESULT (WINAPI *get_DatabaseKeys)(IMsmError *This,IMsmStrings **ErrorKeys);
HRESULT (WINAPI *get_ModuleTable)(IMsmError *This,BSTR *ErrorTable);
HRESULT (WINAPI *get_ModuleKeys)(IMsmError *This,IMsmStrings **ErrorKeys);
END_INTERFACE
} IMsmErrorVtbl;
struct IMsmError {
CONST_VTBL struct IMsmErrorVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmError_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmError_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmError_Release(This) (This)->lpVtbl->Release(This)
#define IMsmError_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmError_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmError_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmError_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmError_get_Type(This,ErrorType) (This)->lpVtbl->get_Type(This,ErrorType)
#define IMsmError_get_Path(This,ErrorPath) (This)->lpVtbl->get_Path(This,ErrorPath)
#define IMsmError_get_Language(This,ErrorLanguage) (This)->lpVtbl->get_Language(This,ErrorLanguage)
#define IMsmError_get_DatabaseTable(This,ErrorTable) (This)->lpVtbl->get_DatabaseTable(This,ErrorTable)
#define IMsmError_get_DatabaseKeys(This,ErrorKeys) (This)->lpVtbl->get_DatabaseKeys(This,ErrorKeys)
#define IMsmError_get_ModuleTable(This,ErrorTable) (This)->lpVtbl->get_ModuleTable(This,ErrorTable)
#define IMsmError_get_ModuleKeys(This,ErrorKeys) (This)->lpVtbl->get_ModuleKeys(This,ErrorKeys)
#endif
#endif
HRESULT WINAPI IMsmError_get_Type_Proxy(IMsmError *This,msmErrorType *ErrorType);
void __RPC_STUB IMsmError_get_Type_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmError_get_Path_Proxy(IMsmError *This,BSTR *ErrorPath);
void __RPC_STUB IMsmError_get_Path_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmError_get_Language_Proxy(IMsmError *This,short *ErrorLanguage);
void __RPC_STUB IMsmError_get_Language_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmError_get_DatabaseTable_Proxy(IMsmError *This,BSTR *ErrorTable);
void __RPC_STUB IMsmError_get_DatabaseTable_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmError_get_DatabaseKeys_Proxy(IMsmError *This,IMsmStrings **ErrorKeys);
void __RPC_STUB IMsmError_get_DatabaseKeys_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmError_get_ModuleTable_Proxy(IMsmError *This,BSTR *ErrorTable);
void __RPC_STUB IMsmError_get_ModuleTable_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmError_get_ModuleKeys_Proxy(IMsmError *This,IMsmStrings **ErrorKeys);
void __RPC_STUB IMsmError_get_ModuleKeys_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IEnumMsmError_INTERFACE_DEFINED__
#define __IEnumMsmError_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IEnumMsmError : public IUnknown {
public:
virtual HRESULT WINAPI Next(unsigned __LONG32 cFetch,IMsmError **rgmsmErrors,unsigned __LONG32 *pcFetched) = 0;
virtual HRESULT WINAPI Skip(unsigned __LONG32 cSkip) = 0;
virtual HRESULT WINAPI Reset(void) = 0;
virtual HRESULT WINAPI Clone(IEnumMsmError **pemsmErrors) = 0;
};
#else
typedef struct IEnumMsmErrorVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IEnumMsmError *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IEnumMsmError *This);
ULONG (WINAPI *Release)(IEnumMsmError *This);
HRESULT (WINAPI *Next)(IEnumMsmError *This,unsigned __LONG32 cFetch,IMsmError **rgmsmErrors,unsigned __LONG32 *pcFetched);
HRESULT (WINAPI *Skip)(IEnumMsmError *This,unsigned __LONG32 cSkip);
HRESULT (WINAPI *Reset)(IEnumMsmError *This);
HRESULT (WINAPI *Clone)(IEnumMsmError *This,IEnumMsmError **pemsmErrors);
END_INTERFACE
} IEnumMsmErrorVtbl;
struct IEnumMsmError {
CONST_VTBL struct IEnumMsmErrorVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IEnumMsmError_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumMsmError_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumMsmError_Release(This) (This)->lpVtbl->Release(This)
#define IEnumMsmError_Next(This,cFetch,rgmsmErrors,pcFetched) (This)->lpVtbl->Next(This,cFetch,rgmsmErrors,pcFetched)
#define IEnumMsmError_Skip(This,cSkip) (This)->lpVtbl->Skip(This,cSkip)
#define IEnumMsmError_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumMsmError_Clone(This,pemsmErrors) (This)->lpVtbl->Clone(This,pemsmErrors)
#endif
#endif
HRESULT WINAPI IEnumMsmError_Next_Proxy(IEnumMsmError *This,unsigned __LONG32 cFetch,IMsmError **rgmsmErrors,unsigned __LONG32 *pcFetched);
void __RPC_STUB IEnumMsmError_Next_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmError_Skip_Proxy(IEnumMsmError *This,unsigned __LONG32 cSkip);
void __RPC_STUB IEnumMsmError_Skip_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmError_Reset_Proxy(IEnumMsmError *This);
void __RPC_STUB IEnumMsmError_Reset_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmError_Clone_Proxy(IEnumMsmError *This,IEnumMsmError **pemsmErrors);
void __RPC_STUB IEnumMsmError_Clone_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IMsmErrors_INTERFACE_DEFINED__
#define __IMsmErrors_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmErrors : public IDispatch {
public:
virtual HRESULT WINAPI get_Item(__LONG32 Item,IMsmError **Return) = 0;
virtual HRESULT WINAPI get_Count(__LONG32 *Count) = 0;
virtual HRESULT WINAPI get__NewEnum(IUnknown **NewEnum) = 0;
};
#else
typedef struct IMsmErrorsVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmErrors *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmErrors *This);
ULONG (WINAPI *Release)(IMsmErrors *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmErrors *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmErrors *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmErrors *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmErrors *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *get_Item)(IMsmErrors *This,__LONG32 Item,IMsmError **Return);
HRESULT (WINAPI *get_Count)(IMsmErrors *This,__LONG32 *Count);
HRESULT (WINAPI *get__NewEnum)(IMsmErrors *This,IUnknown **NewEnum);
END_INTERFACE
} IMsmErrorsVtbl;
struct IMsmErrors {
CONST_VTBL struct IMsmErrorsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmErrors_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmErrors_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmErrors_Release(This) (This)->lpVtbl->Release(This)
#define IMsmErrors_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmErrors_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmErrors_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmErrors_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmErrors_get_Item(This,Item,Return) (This)->lpVtbl->get_Item(This,Item,Return)
#define IMsmErrors_get_Count(This,Count) (This)->lpVtbl->get_Count(This,Count)
#define IMsmErrors_get__NewEnum(This,NewEnum) (This)->lpVtbl->get__NewEnum(This,NewEnum)
#endif
#endif
HRESULT WINAPI IMsmErrors_get_Item_Proxy(IMsmErrors *This,__LONG32 Item,IMsmError **Return);
void __RPC_STUB IMsmErrors_get_Item_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmErrors_get_Count_Proxy(IMsmErrors *This,__LONG32 *Count);
void __RPC_STUB IMsmErrors_get_Count_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmErrors_get__NewEnum_Proxy(IMsmErrors *This,IUnknown **NewEnum);
void __RPC_STUB IMsmErrors_get__NewEnum_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IMsmDependency_INTERFACE_DEFINED__
#define __IMsmDependency_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmDependency : public IDispatch {
public:
virtual HRESULT WINAPI get_Module(BSTR *Module) = 0;
virtual HRESULT WINAPI get_Language(short *Language) = 0;
virtual HRESULT WINAPI get_Version(BSTR *Version) = 0;
};
#else
typedef struct IMsmDependencyVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmDependency *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmDependency *This);
ULONG (WINAPI *Release)(IMsmDependency *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmDependency *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmDependency *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmDependency *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmDependency *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *get_Module)(IMsmDependency *This,BSTR *Module);
HRESULT (WINAPI *get_Language)(IMsmDependency *This,short *Language);
HRESULT (WINAPI *get_Version)(IMsmDependency *This,BSTR *Version);
END_INTERFACE
} IMsmDependencyVtbl;
struct IMsmDependency {
CONST_VTBL struct IMsmDependencyVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmDependency_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmDependency_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmDependency_Release(This) (This)->lpVtbl->Release(This)
#define IMsmDependency_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmDependency_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmDependency_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmDependency_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmDependency_get_Module(This,Module) (This)->lpVtbl->get_Module(This,Module)
#define IMsmDependency_get_Language(This,Language) (This)->lpVtbl->get_Language(This,Language)
#define IMsmDependency_get_Version(This,Version) (This)->lpVtbl->get_Version(This,Version)
#endif
#endif
HRESULT WINAPI IMsmDependency_get_Module_Proxy(IMsmDependency *This,BSTR *Module);
void __RPC_STUB IMsmDependency_get_Module_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmDependency_get_Language_Proxy(IMsmDependency *This,short *Language);
void __RPC_STUB IMsmDependency_get_Language_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmDependency_get_Version_Proxy(IMsmDependency *This,BSTR *Version);
void __RPC_STUB IMsmDependency_get_Version_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IEnumMsmDependency_INTERFACE_DEFINED__
#define __IEnumMsmDependency_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IEnumMsmDependency : public IUnknown {
public:
virtual HRESULT WINAPI Next(unsigned __LONG32 cFetch,IMsmDependency **rgmsmDependencies,unsigned __LONG32 *pcFetched) = 0;
virtual HRESULT WINAPI Skip(unsigned __LONG32 cSkip) = 0;
virtual HRESULT WINAPI Reset(void) = 0;
virtual HRESULT WINAPI Clone(IEnumMsmDependency **pemsmDependencies) = 0;
};
#else
typedef struct IEnumMsmDependencyVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IEnumMsmDependency *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IEnumMsmDependency *This);
ULONG (WINAPI *Release)(IEnumMsmDependency *This);
HRESULT (WINAPI *Next)(IEnumMsmDependency *This,unsigned __LONG32 cFetch,IMsmDependency **rgmsmDependencies,unsigned __LONG32 *pcFetched);
HRESULT (WINAPI *Skip)(IEnumMsmDependency *This,unsigned __LONG32 cSkip);
HRESULT (WINAPI *Reset)(IEnumMsmDependency *This);
HRESULT (WINAPI *Clone)(IEnumMsmDependency *This,IEnumMsmDependency **pemsmDependencies);
END_INTERFACE
} IEnumMsmDependencyVtbl;
struct IEnumMsmDependency {
CONST_VTBL struct IEnumMsmDependencyVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IEnumMsmDependency_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumMsmDependency_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumMsmDependency_Release(This) (This)->lpVtbl->Release(This)
#define IEnumMsmDependency_Next(This,cFetch,rgmsmDependencies,pcFetched) (This)->lpVtbl->Next(This,cFetch,rgmsmDependencies,pcFetched)
#define IEnumMsmDependency_Skip(This,cSkip) (This)->lpVtbl->Skip(This,cSkip)
#define IEnumMsmDependency_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumMsmDependency_Clone(This,pemsmDependencies) (This)->lpVtbl->Clone(This,pemsmDependencies)
#endif
#endif
HRESULT WINAPI IEnumMsmDependency_Next_Proxy(IEnumMsmDependency *This,unsigned __LONG32 cFetch,IMsmDependency **rgmsmDependencies,unsigned __LONG32 *pcFetched);
void __RPC_STUB IEnumMsmDependency_Next_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmDependency_Skip_Proxy(IEnumMsmDependency *This,unsigned __LONG32 cSkip);
void __RPC_STUB IEnumMsmDependency_Skip_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmDependency_Reset_Proxy(IEnumMsmDependency *This);
void __RPC_STUB IEnumMsmDependency_Reset_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmDependency_Clone_Proxy(IEnumMsmDependency *This,IEnumMsmDependency **pemsmDependencies);
void __RPC_STUB IEnumMsmDependency_Clone_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IMsmDependencies_INTERFACE_DEFINED__
#define __IMsmDependencies_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmDependencies : public IDispatch {
public:
virtual HRESULT WINAPI get_Item(__LONG32 Item,IMsmDependency **Return) = 0;
virtual HRESULT WINAPI get_Count(__LONG32 *Count) = 0;
virtual HRESULT WINAPI get__NewEnum(IUnknown **NewEnum) = 0;
};
#else
typedef struct IMsmDependenciesVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmDependencies *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmDependencies *This);
ULONG (WINAPI *Release)(IMsmDependencies *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmDependencies *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmDependencies *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmDependencies *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmDependencies *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *get_Item)(IMsmDependencies *This,__LONG32 Item,IMsmDependency **Return);
HRESULT (WINAPI *get_Count)(IMsmDependencies *This,__LONG32 *Count);
HRESULT (WINAPI *get__NewEnum)(IMsmDependencies *This,IUnknown **NewEnum);
END_INTERFACE
} IMsmDependenciesVtbl;
struct IMsmDependencies {
CONST_VTBL struct IMsmDependenciesVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmDependencies_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmDependencies_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmDependencies_Release(This) (This)->lpVtbl->Release(This)
#define IMsmDependencies_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmDependencies_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmDependencies_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmDependencies_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmDependencies_get_Item(This,Item,Return) (This)->lpVtbl->get_Item(This,Item,Return)
#define IMsmDependencies_get_Count(This,Count) (This)->lpVtbl->get_Count(This,Count)
#define IMsmDependencies_get__NewEnum(This,NewEnum) (This)->lpVtbl->get__NewEnum(This,NewEnum)
#endif
#endif
HRESULT WINAPI IMsmDependencies_get_Item_Proxy(IMsmDependencies *This,__LONG32 Item,IMsmDependency **Return);
void __RPC_STUB IMsmDependencies_get_Item_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmDependencies_get_Count_Proxy(IMsmDependencies *This,__LONG32 *Count);
void __RPC_STUB IMsmDependencies_get_Count_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmDependencies_get__NewEnum_Proxy(IMsmDependencies *This,IUnknown **NewEnum);
void __RPC_STUB IMsmDependencies_get__NewEnum_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#if (_WIN32_MSM >= 150)
#ifndef __IMsmConfigurableItem_INTERFACE_DEFINED__
#define __IMsmConfigurableItem_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmConfigurableItem : public IDispatch {
public:
virtual HRESULT WINAPI get_Name(BSTR *Name) = 0;
virtual HRESULT WINAPI get_Format(msmConfigurableItemFormat *Format) = 0;
virtual HRESULT WINAPI get_Type(BSTR *Type) = 0;
virtual HRESULT WINAPI get_Context(BSTR *Context) = 0;
virtual HRESULT WINAPI get_DefaultValue(BSTR *DefaultValue) = 0;
virtual HRESULT WINAPI get_Attributes(__LONG32 *Attributes) = 0;
virtual HRESULT WINAPI get_DisplayName(BSTR *DisplayName) = 0;
virtual HRESULT WINAPI get_Description(BSTR *Description) = 0;
virtual HRESULT WINAPI get_HelpLocation(BSTR *HelpLocation) = 0;
virtual HRESULT WINAPI get_HelpKeyword(BSTR *HelpKeyword) = 0;
};
#else
typedef struct IMsmConfigurableItemVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmConfigurableItem *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmConfigurableItem *This);
ULONG (WINAPI *Release)(IMsmConfigurableItem *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmConfigurableItem *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmConfigurableItem *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmConfigurableItem *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmConfigurableItem *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *get_Name)(IMsmConfigurableItem *This,BSTR *Name);
HRESULT (WINAPI *get_Format)(IMsmConfigurableItem *This,msmConfigurableItemFormat *Format);
HRESULT (WINAPI *get_Type)(IMsmConfigurableItem *This,BSTR *Type);
HRESULT (WINAPI *get_Context)(IMsmConfigurableItem *This,BSTR *Context);
HRESULT (WINAPI *get_DefaultValue)(IMsmConfigurableItem *This,BSTR *DefaultValue);
HRESULT (WINAPI *get_Attributes)(IMsmConfigurableItem *This,__LONG32 *Attributes);
HRESULT (WINAPI *get_DisplayName)(IMsmConfigurableItem *This,BSTR *DisplayName);
HRESULT (WINAPI *get_Description)(IMsmConfigurableItem *This,BSTR *Description);
HRESULT (WINAPI *get_HelpLocation)(IMsmConfigurableItem *This,BSTR *HelpLocation);
HRESULT (WINAPI *get_HelpKeyword)(IMsmConfigurableItem *This,BSTR *HelpKeyword);
END_INTERFACE
} IMsmConfigurableItemVtbl;
struct IMsmConfigurableItem {
CONST_VTBL struct IMsmConfigurableItemVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmConfigurableItem_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmConfigurableItem_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmConfigurableItem_Release(This) (This)->lpVtbl->Release(This)
#define IMsmConfigurableItem_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmConfigurableItem_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmConfigurableItem_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmConfigurableItem_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmConfigurableItem_get_Name(This,Name) (This)->lpVtbl->get_Name(This,Name)
#define IMsmConfigurableItem_get_Format(This,Format) (This)->lpVtbl->get_Format(This,Format)
#define IMsmConfigurableItem_get_Type(This,Type) (This)->lpVtbl->get_Type(This,Type)
#define IMsmConfigurableItem_get_Context(This,Context) (This)->lpVtbl->get_Context(This,Context)
#define IMsmConfigurableItem_get_DefaultValue(This,DefaultValue) (This)->lpVtbl->get_DefaultValue(This,DefaultValue)
#define IMsmConfigurableItem_get_Attributes(This,Attributes) (This)->lpVtbl->get_Attributes(This,Attributes)
#define IMsmConfigurableItem_get_DisplayName(This,DisplayName) (This)->lpVtbl->get_DisplayName(This,DisplayName)
#define IMsmConfigurableItem_get_Description(This,Description) (This)->lpVtbl->get_Description(This,Description)
#define IMsmConfigurableItem_get_HelpLocation(This,HelpLocation) (This)->lpVtbl->get_HelpLocation(This,HelpLocation)
#define IMsmConfigurableItem_get_HelpKeyword(This,HelpKeyword) (This)->lpVtbl->get_HelpKeyword(This,HelpKeyword)
#endif
#endif
HRESULT WINAPI IMsmConfigurableItem_get_Name_Proxy(IMsmConfigurableItem *This,BSTR *Name);
void __RPC_STUB IMsmConfigurableItem_get_Name_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_Format_Proxy(IMsmConfigurableItem *This,msmConfigurableItemFormat *Format);
void __RPC_STUB IMsmConfigurableItem_get_Format_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_Type_Proxy(IMsmConfigurableItem *This,BSTR *Type);
void __RPC_STUB IMsmConfigurableItem_get_Type_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_Context_Proxy(IMsmConfigurableItem *This,BSTR *Context);
void __RPC_STUB IMsmConfigurableItem_get_Context_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_DefaultValue_Proxy(IMsmConfigurableItem *This,BSTR *DefaultValue);
void __RPC_STUB IMsmConfigurableItem_get_DefaultValue_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_Attributes_Proxy(IMsmConfigurableItem *This,__LONG32 *Attributes);
void __RPC_STUB IMsmConfigurableItem_get_Attributes_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_DisplayName_Proxy(IMsmConfigurableItem *This,BSTR *DisplayName);
void __RPC_STUB IMsmConfigurableItem_get_DisplayName_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_Description_Proxy(IMsmConfigurableItem *This,BSTR *Description);
void __RPC_STUB IMsmConfigurableItem_get_Description_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_HelpLocation_Proxy(IMsmConfigurableItem *This,BSTR *HelpLocation);
void __RPC_STUB IMsmConfigurableItem_get_HelpLocation_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItem_get_HelpKeyword_Proxy(IMsmConfigurableItem *This,BSTR *HelpKeyword);
void __RPC_STUB IMsmConfigurableItem_get_HelpKeyword_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IEnumMsmConfigurableItem_INTERFACE_DEFINED__
#define __IEnumMsmConfigurableItem_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IEnumMsmConfigurableItem : public IUnknown {
public:
virtual HRESULT WINAPI Next(unsigned __LONG32 cFetch,IMsmConfigurableItem **rgmsmItems,unsigned __LONG32 *pcFetched) = 0;
virtual HRESULT WINAPI Skip(unsigned __LONG32 cSkip) = 0;
virtual HRESULT WINAPI Reset(void) = 0;
virtual HRESULT WINAPI Clone(IEnumMsmConfigurableItem **pemsmConfigurableItem) = 0;
};
#else
typedef struct IEnumMsmConfigurableItemVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IEnumMsmConfigurableItem *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IEnumMsmConfigurableItem *This);
ULONG (WINAPI *Release)(IEnumMsmConfigurableItem *This);
HRESULT (WINAPI *Next)(IEnumMsmConfigurableItem *This,unsigned __LONG32 cFetch,IMsmConfigurableItem **rgmsmItems,unsigned __LONG32 *pcFetched);
HRESULT (WINAPI *Skip)(IEnumMsmConfigurableItem *This,unsigned __LONG32 cSkip);
HRESULT (WINAPI *Reset)(IEnumMsmConfigurableItem *This);
HRESULT (WINAPI *Clone)(IEnumMsmConfigurableItem *This,IEnumMsmConfigurableItem **pemsmConfigurableItem);
END_INTERFACE
} IEnumMsmConfigurableItemVtbl;
struct IEnumMsmConfigurableItem {
CONST_VTBL struct IEnumMsmConfigurableItemVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IEnumMsmConfigurableItem_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IEnumMsmConfigurableItem_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IEnumMsmConfigurableItem_Release(This) (This)->lpVtbl->Release(This)
#define IEnumMsmConfigurableItem_Next(This,cFetch,rgmsmItems,pcFetched) (This)->lpVtbl->Next(This,cFetch,rgmsmItems,pcFetched)
#define IEnumMsmConfigurableItem_Skip(This,cSkip) (This)->lpVtbl->Skip(This,cSkip)
#define IEnumMsmConfigurableItem_Reset(This) (This)->lpVtbl->Reset(This)
#define IEnumMsmConfigurableItem_Clone(This,pemsmConfigurableItem) (This)->lpVtbl->Clone(This,pemsmConfigurableItem)
#endif
#endif
HRESULT WINAPI IEnumMsmConfigurableItem_Next_Proxy(IEnumMsmConfigurableItem *This,unsigned __LONG32 cFetch,IMsmConfigurableItem **rgmsmItems,unsigned __LONG32 *pcFetched);
void __RPC_STUB IEnumMsmConfigurableItem_Next_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmConfigurableItem_Skip_Proxy(IEnumMsmConfigurableItem *This,unsigned __LONG32 cSkip);
void __RPC_STUB IEnumMsmConfigurableItem_Skip_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmConfigurableItem_Reset_Proxy(IEnumMsmConfigurableItem *This);
void __RPC_STUB IEnumMsmConfigurableItem_Reset_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IEnumMsmConfigurableItem_Clone_Proxy(IEnumMsmConfigurableItem *This,IEnumMsmConfigurableItem **pemsmConfigurableItem);
void __RPC_STUB IEnumMsmConfigurableItem_Clone_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IMsmConfigurableItems_INTERFACE_DEFINED__
#define __IMsmConfigurableItems_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmConfigurableItems : public IDispatch {
public:
virtual HRESULT WINAPI get_Item(__LONG32 Item,IMsmConfigurableItem **Return) = 0;
virtual HRESULT WINAPI get_Count(__LONG32 *Count) = 0;
virtual HRESULT WINAPI get__NewEnum(IUnknown **NewEnum) = 0;
};
#else
typedef struct IMsmConfigurableItemsVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmConfigurableItems *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmConfigurableItems *This);
ULONG (WINAPI *Release)(IMsmConfigurableItems *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmConfigurableItems *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmConfigurableItems *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmConfigurableItems *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmConfigurableItems *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *get_Item)(IMsmConfigurableItems *This,__LONG32 Item,IMsmConfigurableItem **Return);
HRESULT (WINAPI *get_Count)(IMsmConfigurableItems *This,__LONG32 *Count);
HRESULT (WINAPI *get__NewEnum)(IMsmConfigurableItems *This,IUnknown **NewEnum);
END_INTERFACE
} IMsmConfigurableItemsVtbl;
struct IMsmConfigurableItems {
CONST_VTBL struct IMsmConfigurableItemsVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmConfigurableItems_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmConfigurableItems_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmConfigurableItems_Release(This) (This)->lpVtbl->Release(This)
#define IMsmConfigurableItems_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmConfigurableItems_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmConfigurableItems_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmConfigurableItems_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmConfigurableItems_get_Item(This,Item,Return) (This)->lpVtbl->get_Item(This,Item,Return)
#define IMsmConfigurableItems_get_Count(This,Count) (This)->lpVtbl->get_Count(This,Count)
#define IMsmConfigurableItems_get__NewEnum(This,NewEnum) (This)->lpVtbl->get__NewEnum(This,NewEnum)
#endif
#endif
HRESULT WINAPI IMsmConfigurableItems_get_Item_Proxy(IMsmConfigurableItems *This,__LONG32 Item,IMsmConfigurableItem **Return);
void __RPC_STUB IMsmConfigurableItems_get_Item_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItems_get_Count_Proxy(IMsmConfigurableItems *This,__LONG32 *Count);
void __RPC_STUB IMsmConfigurableItems_get_Count_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigurableItems_get__NewEnum_Proxy(IMsmConfigurableItems *This,IUnknown **NewEnum);
void __RPC_STUB IMsmConfigurableItems_get__NewEnum_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IMsmConfigureModule_INTERFACE_DEFINED__
#define __IMsmConfigureModule_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmConfigureModule : public IDispatch {
public:
virtual HRESULT WINAPI ProvideTextData(const BSTR Name,BSTR *ConfigData) = 0;
virtual HRESULT WINAPI ProvideIntegerData(const BSTR Name,__LONG32 *ConfigData) = 0;
};
#else
typedef struct IMsmConfigureModuleVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmConfigureModule *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmConfigureModule *This);
ULONG (WINAPI *Release)(IMsmConfigureModule *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmConfigureModule *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmConfigureModule *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmConfigureModule *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmConfigureModule *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *ProvideTextData)(IMsmConfigureModule *This,const BSTR Name,BSTR *ConfigData);
HRESULT (WINAPI *ProvideIntegerData)(IMsmConfigureModule *This,const BSTR Name,__LONG32 *ConfigData);
END_INTERFACE
} IMsmConfigureModuleVtbl;
struct IMsmConfigureModule {
CONST_VTBL struct IMsmConfigureModuleVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmConfigureModule_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmConfigureModule_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmConfigureModule_Release(This) (This)->lpVtbl->Release(This)
#define IMsmConfigureModule_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmConfigureModule_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmConfigureModule_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmConfigureModule_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmConfigureModule_ProvideTextData(This,Name,ConfigData) (This)->lpVtbl->ProvideTextData(This,Name,ConfigData)
#define IMsmConfigureModule_ProvideIntegerData(This,Name,ConfigData) (This)->lpVtbl->ProvideIntegerData(This,Name,ConfigData)
#endif
#endif
HRESULT WINAPI IMsmConfigureModule_ProvideTextData_Proxy(IMsmConfigureModule *This,const BSTR Name,BSTR *ConfigData);
void __RPC_STUB IMsmConfigureModule_ProvideTextData_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmConfigureModule_ProvideIntegerData_Proxy(IMsmConfigureModule *This,const BSTR Name,__LONG32 *ConfigData);
void __RPC_STUB IMsmConfigureModule_ProvideIntegerData_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#endif
#ifndef __IMsmMerge_INTERFACE_DEFINED__
#define __IMsmMerge_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmMerge : public IDispatch {
public:
virtual HRESULT WINAPI OpenDatabase(const BSTR Path) = 0;
virtual HRESULT WINAPI OpenModule(const BSTR Path,const short Language) = 0;
virtual HRESULT WINAPI CloseDatabase(const VARIANT_BOOL Commit) = 0;
virtual HRESULT WINAPI CloseModule(void) = 0;
virtual HRESULT WINAPI OpenLog(const BSTR Path) = 0;
virtual HRESULT WINAPI CloseLog(void) = 0;
virtual HRESULT WINAPI Log(const BSTR Message) = 0;
virtual HRESULT WINAPI get_Errors(IMsmErrors **Errors) = 0;
virtual HRESULT WINAPI get_Dependencies(IMsmDependencies **Dependencies) = 0;
virtual HRESULT WINAPI Merge(const BSTR Feature,const BSTR RedirectDir) = 0;
virtual HRESULT WINAPI Connect(const BSTR Feature) = 0;
virtual HRESULT WINAPI ExtractCAB(const BSTR FileName) = 0;
virtual HRESULT WINAPI ExtractFiles(const BSTR Path) = 0;
};
#else
typedef struct IMsmMergeVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmMerge *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmMerge *This);
ULONG (WINAPI *Release)(IMsmMerge *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmMerge *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmMerge *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmMerge *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmMerge *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *OpenDatabase)(IMsmMerge *This,const BSTR Path);
HRESULT (WINAPI *OpenModule)(IMsmMerge *This,const BSTR Path,const short Language);
HRESULT (WINAPI *CloseDatabase)(IMsmMerge *This,const VARIANT_BOOL Commit);
HRESULT (WINAPI *CloseModule)(IMsmMerge *This);
HRESULT (WINAPI *OpenLog)(IMsmMerge *This,const BSTR Path);
HRESULT (WINAPI *CloseLog)(IMsmMerge *This);
HRESULT (WINAPI *Log)(IMsmMerge *This,const BSTR Message);
HRESULT (WINAPI *get_Errors)(IMsmMerge *This,IMsmErrors **Errors);
HRESULT (WINAPI *get_Dependencies)(IMsmMerge *This,IMsmDependencies **Dependencies);
HRESULT (WINAPI *Merge)(IMsmMerge *This,const BSTR Feature,const BSTR RedirectDir);
HRESULT (WINAPI *Connect)(IMsmMerge *This,const BSTR Feature);
HRESULT (WINAPI *ExtractCAB)(IMsmMerge *This,const BSTR FileName);
HRESULT (WINAPI *ExtractFiles)(IMsmMerge *This,const BSTR Path);
END_INTERFACE
} IMsmMergeVtbl;
struct IMsmMerge {
CONST_VTBL struct IMsmMergeVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmMerge_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmMerge_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmMerge_Release(This) (This)->lpVtbl->Release(This)
#define IMsmMerge_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmMerge_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmMerge_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmMerge_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmMerge_OpenDatabase(This,Path) (This)->lpVtbl->OpenDatabase(This,Path)
#define IMsmMerge_OpenModule(This,Path,Language) (This)->lpVtbl->OpenModule(This,Path,Language)
#define IMsmMerge_CloseDatabase(This,Commit) (This)->lpVtbl->CloseDatabase(This,Commit)
#define IMsmMerge_CloseModule(This) (This)->lpVtbl->CloseModule(This)
#define IMsmMerge_OpenLog(This,Path) (This)->lpVtbl->OpenLog(This,Path)
#define IMsmMerge_CloseLog(This) (This)->lpVtbl->CloseLog(This)
#define IMsmMerge_Log(This,Message) (This)->lpVtbl->Log(This,Message)
#define IMsmMerge_get_Errors(This,Errors) (This)->lpVtbl->get_Errors(This,Errors)
#define IMsmMerge_get_Dependencies(This,Dependencies) (This)->lpVtbl->get_Dependencies(This,Dependencies)
#define IMsmMerge_Merge(This,Feature,RedirectDir) (This)->lpVtbl->Merge(This,Feature,RedirectDir)
#define IMsmMerge_Connect(This,Feature) (This)->lpVtbl->Connect(This,Feature)
#define IMsmMerge_ExtractCAB(This,FileName) (This)->lpVtbl->ExtractCAB(This,FileName)
#define IMsmMerge_ExtractFiles(This,Path) (This)->lpVtbl->ExtractFiles(This,Path)
#endif
#endif
HRESULT WINAPI IMsmMerge_OpenDatabase_Proxy(IMsmMerge *This,const BSTR Path);
void __RPC_STUB IMsmMerge_OpenDatabase_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_OpenModule_Proxy(IMsmMerge *This,const BSTR Path,const short Language);
void __RPC_STUB IMsmMerge_OpenModule_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_CloseDatabase_Proxy(IMsmMerge *This,const VARIANT_BOOL Commit);
void __RPC_STUB IMsmMerge_CloseDatabase_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_CloseModule_Proxy(IMsmMerge *This);
void __RPC_STUB IMsmMerge_CloseModule_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_OpenLog_Proxy(IMsmMerge *This,const BSTR Path);
void __RPC_STUB IMsmMerge_OpenLog_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_CloseLog_Proxy(IMsmMerge *This);
void __RPC_STUB IMsmMerge_CloseLog_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_Log_Proxy(IMsmMerge *This,const BSTR Message);
void __RPC_STUB IMsmMerge_Log_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_get_Errors_Proxy(IMsmMerge *This,IMsmErrors **Errors);
void __RPC_STUB IMsmMerge_get_Errors_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_get_Dependencies_Proxy(IMsmMerge *This,IMsmDependencies **Dependencies);
void __RPC_STUB IMsmMerge_get_Dependencies_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_Merge_Proxy(IMsmMerge *This,const BSTR Feature,const BSTR RedirectDir);
void __RPC_STUB IMsmMerge_Merge_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_Connect_Proxy(IMsmMerge *This,const BSTR Feature);
void __RPC_STUB IMsmMerge_Connect_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_ExtractCAB_Proxy(IMsmMerge *This,const BSTR FileName);
void __RPC_STUB IMsmMerge_ExtractCAB_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge_ExtractFiles_Proxy(IMsmMerge *This,const BSTR Path);
void __RPC_STUB IMsmMerge_ExtractFiles_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#ifndef __IMsmGetFiles_INTERFACE_DEFINED__
#define __IMsmGetFiles_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmGetFiles : public IDispatch {
public:
virtual HRESULT WINAPI get_ModuleFiles(IMsmStrings **Files) = 0;
};
#else
typedef struct IMsmGetFilesVtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmGetFiles *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmGetFiles *This);
ULONG (WINAPI *Release)(IMsmGetFiles *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmGetFiles *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmGetFiles *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmGetFiles *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmGetFiles *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *get_ModuleFiles)(IMsmGetFiles *This,IMsmStrings **Files);
END_INTERFACE
} IMsmGetFilesVtbl;
struct IMsmGetFiles {
CONST_VTBL struct IMsmGetFilesVtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmGetFiles_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmGetFiles_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmGetFiles_Release(This) (This)->lpVtbl->Release(This)
#define IMsmGetFiles_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmGetFiles_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmGetFiles_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmGetFiles_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmGetFiles_get_ModuleFiles(This,Files) (This)->lpVtbl->get_ModuleFiles(This,Files)
#endif
#endif
HRESULT WINAPI IMsmGetFiles_get_ModuleFiles_Proxy(IMsmGetFiles *This,IMsmStrings **Files);
void __RPC_STUB IMsmGetFiles_get_ModuleFiles_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#if (_WIN32_MSM >= 150)
#ifndef __IMsmMerge2_INTERFACE_DEFINED__
#define __IMsmMerge2_INTERFACE_DEFINED__
#if defined(__cplusplus) && !defined(CINTERFACE)
struct IMsmMerge2 : public IDispatch {
public:
virtual HRESULT WINAPI OpenDatabase(const BSTR Path) = 0;
virtual HRESULT WINAPI OpenModule(const BSTR Path,const short Language) = 0;
virtual HRESULT WINAPI CloseDatabase(const VARIANT_BOOL Commit) = 0;
virtual HRESULT WINAPI CloseModule(void) = 0;
virtual HRESULT WINAPI OpenLog(const BSTR Path) = 0;
virtual HRESULT WINAPI CloseLog(void) = 0;
virtual HRESULT WINAPI Log(const BSTR Message) = 0;
virtual HRESULT WINAPI get_Errors(IMsmErrors **Errors) = 0;
virtual HRESULT WINAPI get_Dependencies(IMsmDependencies **Dependencies) = 0;
virtual HRESULT WINAPI Merge(const BSTR Feature,const BSTR RedirectDir) = 0;
virtual HRESULT WINAPI Connect(const BSTR Feature) = 0;
virtual HRESULT WINAPI ExtractCAB(const BSTR FileName) = 0;
virtual HRESULT WINAPI ExtractFiles(const BSTR Path) = 0;
virtual HRESULT WINAPI MergeEx(const BSTR Feature,const BSTR RedirectDir,IUnknown *pConfiguration) = 0;
virtual HRESULT WINAPI ExtractFilesEx(const BSTR Path,VARIANT_BOOL fLongFileNames,IMsmStrings **pFilePaths) = 0;
virtual HRESULT WINAPI get_ConfigurableItems(IMsmConfigurableItems **ConfigurableItems) = 0;
virtual HRESULT WINAPI CreateSourceImage(const BSTR Path,VARIANT_BOOL fLongFileNames,IMsmStrings **pFilePaths) = 0;
virtual HRESULT WINAPI get_ModuleFiles(IMsmStrings **Files) = 0;
};
#else
typedef struct IMsmMerge2Vtbl {
BEGIN_INTERFACE
HRESULT (WINAPI *QueryInterface)(IMsmMerge2 *This,REFIID riid,void **ppvObject);
ULONG (WINAPI *AddRef)(IMsmMerge2 *This);
ULONG (WINAPI *Release)(IMsmMerge2 *This);
HRESULT (WINAPI *GetTypeInfoCount)(IMsmMerge2 *This,UINT *pctinfo);
HRESULT (WINAPI *GetTypeInfo)(IMsmMerge2 *This,UINT iTInfo,LCID lcid,ITypeInfo **ppTInfo);
HRESULT (WINAPI *GetIDsOfNames)(IMsmMerge2 *This,REFIID riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);
HRESULT (WINAPI *Invoke)(IMsmMerge2 *This,DISPID dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS *pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
HRESULT (WINAPI *OpenDatabase)(IMsmMerge2 *This,const BSTR Path);
HRESULT (WINAPI *OpenModule)(IMsmMerge2 *This,const BSTR Path,const short Language);
HRESULT (WINAPI *CloseDatabase)(IMsmMerge2 *This,const VARIANT_BOOL Commit);
HRESULT (WINAPI *CloseModule)(IMsmMerge2 *This);
HRESULT (WINAPI *OpenLog)(IMsmMerge2 *This,const BSTR Path);
HRESULT (WINAPI *CloseLog)(IMsmMerge2 *This);
HRESULT (WINAPI *Log)(IMsmMerge2 *This,const BSTR Message);
HRESULT (WINAPI *get_Errors)(IMsmMerge2 *This,IMsmErrors **Errors);
HRESULT (WINAPI *get_Dependencies)(IMsmMerge2 *This,IMsmDependencies **Dependencies);
HRESULT (WINAPI *Merge)(IMsmMerge2 *This,const BSTR Feature,const BSTR RedirectDir);
HRESULT (WINAPI *Connect)(IMsmMerge2 *This,const BSTR Feature);
HRESULT (WINAPI *ExtractCAB)(IMsmMerge2 *This,const BSTR FileName);
HRESULT (WINAPI *ExtractFiles)(IMsmMerge2 *This,const BSTR Path);
HRESULT (WINAPI *MergeEx)(IMsmMerge2 *This,const BSTR Feature,const BSTR RedirectDir,IMsmConfigureModule *pConfiguration);
HRESULT (WINAPI *ExtractFilesEx)(IMsmMerge2 *This,const BSTR Path,VARIANT_BOOL fLongFileNames,IMsmStrings **pFilePaths);
HRESULT (WINAPI *get_ConfigurableItems)(IMsmMerge2 *This,IMsmConfigurableItems **ConfigurableItems);
HRESULT (WINAPI *CreateSourceImage)(IMsmMerge2 *This,const BSTR Path,VARIANT_BOOL fLongFileNames,IMsmStrings **pFilePaths);
HRESULT (WINAPI *get_ModuleFiles)(IMsmMerge2 *This,IMsmStrings **Files);
END_INTERFACE
} IMsmMerge2Vtbl;
struct IMsmMerge2 {
CONST_VTBL struct IMsmMerge2Vtbl *lpVtbl;
};
#ifdef COBJMACROS
#define IMsmMerge2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IMsmMerge2_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IMsmMerge2_Release(This) (This)->lpVtbl->Release(This)
#define IMsmMerge2_GetTypeInfoCount(This,pctinfo) (This)->lpVtbl->GetTypeInfoCount(This,pctinfo)
#define IMsmMerge2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) (This)->lpVtbl->GetTypeInfo(This,iTInfo,lcid,ppTInfo)
#define IMsmMerge2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) (This)->lpVtbl->GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
#define IMsmMerge2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) (This)->lpVtbl->Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
#define IMsmMerge2_OpenDatabase(This,Path) (This)->lpVtbl->OpenDatabase(This,Path)
#define IMsmMerge2_OpenModule(This,Path,Language) (This)->lpVtbl->OpenModule(This,Path,Language)
#define IMsmMerge2_CloseDatabase(This,Commit) (This)->lpVtbl->CloseDatabase(This,Commit)
#define IMsmMerge2_CloseModule(This) (This)->lpVtbl->CloseModule(This)
#define IMsmMerge2_OpenLog(This,Path) (This)->lpVtbl->OpenLog(This,Path)
#define IMsmMerge2_CloseLog(This) (This)->lpVtbl->CloseLog(This)
#define IMsmMerge2_Log(This,Message) (This)->lpVtbl->Log(This,Message)
#define IMsmMerge2_get_Errors(This,Errors) (This)->lpVtbl->get_Errors(This,Errors)
#define IMsmMerge2_get_Dependencies(This,Dependencies) (This)->lpVtbl->get_Dependencies(This,Dependencies)
#define IMsmMerge2_Merge(This,Feature,RedirectDir) (This)->lpVtbl->Merge(This,Feature,RedirectDir)
#define IMsmMerge2_Connect(This,Feature) (This)->lpVtbl->Connect(This,Feature)
#define IMsmMerge2_ExtractCAB(This,FileName) (This)->lpVtbl->ExtractCAB(This,FileName)
#define IMsmMerge2_ExtractFiles(This,Path) (This)->lpVtbl->ExtractFiles(This,Path)
#define IMsmMerge2_MergeEx(This,Feature,RedirectDir,pConfiguration) (This)->lpVtbl->MergeEx(This,Feature,RedirectDir,pConfiguration)
#define IMsmMerge2_ExtractFilesEx(This,Path,fLongFileNames,pFilePaths) (This)->lpVtbl->ExtractFilesEx(This,Path,fLongFileNames,pFilePaths)
#define IMsmMerge2_get_ConfigurableItems(This,ConfigurableItems) (This)->lpVtbl->get_ConfigurableItems(This,ConfigurableItems)
#define IMsmMerge2_CreateSourceImage(This,Path,fLongFileNames,pFilePaths) (This)->lpVtbl->CreateSourceImage(This,Path,fLongFileNames,pFilePaths)
#define IMsmMerge2_get_ModuleFiles(This,Files) (This)->lpVtbl->get_ModuleFiles(This,Files)
#endif
#endif
HRESULT WINAPI IMsmMerge2_OpenDatabase_Proxy(IMsmMerge2 *This,const BSTR Path);
void __RPC_STUB IMsmMerge2_OpenDatabase_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_OpenModule_Proxy(IMsmMerge2 *This,const BSTR Path,const short Language);
void __RPC_STUB IMsmMerge2_OpenModule_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_CloseDatabase_Proxy(IMsmMerge2 *This,const VARIANT_BOOL Commit);
void __RPC_STUB IMsmMerge2_CloseDatabase_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_CloseModule_Proxy(IMsmMerge2 *This);
void __RPC_STUB IMsmMerge2_CloseModule_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_OpenLog_Proxy(IMsmMerge2 *This,const BSTR Path);
void __RPC_STUB IMsmMerge2_OpenLog_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_CloseLog_Proxy(IMsmMerge2 *This);
void __RPC_STUB IMsmMerge2_CloseLog_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_Log_Proxy(IMsmMerge2 *This,const BSTR Message);
void __RPC_STUB IMsmMerge2_Log_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_get_Errors_Proxy(IMsmMerge2 *This,IMsmErrors **Errors);
void __RPC_STUB IMsmMerge2_get_Errors_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_get_Dependencies_Proxy(IMsmMerge2 *This,IMsmDependencies **Dependencies);
void __RPC_STUB IMsmMerge2_get_Dependencies_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_Merge_Proxy(IMsmMerge2 *This,const BSTR Feature,const BSTR RedirectDir);
void __RPC_STUB IMsmMerge2_Merge_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_Connect_Proxy(IMsmMerge2 *This,const BSTR Feature);
void __RPC_STUB IMsmMerge2_Connect_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_ExtractCAB_Proxy(IMsmMerge2 *This,const BSTR FileName);
void __RPC_STUB IMsmMerge2_ExtractCAB_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_ExtractFiles_Proxy(IMsmMerge2 *This,const BSTR Path);
void __RPC_STUB IMsmMerge2_ExtractFiles_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_MergeEx_Proxy(IMsmMerge2 *This,const BSTR Feature,const BSTR RedirectDir,IMsmConfigureModule *pConfiguration);
void __RPC_STUB IMsmMerge2_MergeEx_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_ExtractFilesEx_Proxy(IMsmMerge2 *This,const BSTR Path,VARIANT_BOOL fLongFileNames,IMsmStrings **pFilePaths);
void __RPC_STUB IMsmMerge2_ExtractFilesEx_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_get_ConfigurableItems_Proxy(IMsmMerge2 *This,IMsmConfigurableItems **ConfigurableItems);
void __RPC_STUB IMsmMerge2_get_ConfigurableItems_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_CreateSourceImage_Proxy(IMsmMerge2 *This,const BSTR Path,VARIANT_BOOL fLongFileNames,IMsmStrings **pFilePaths);
void __RPC_STUB IMsmMerge2_CreateSourceImage_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
HRESULT WINAPI IMsmMerge2_get_ModuleFiles_Proxy(IMsmMerge2 *This,IMsmStrings **Files);
void __RPC_STUB IMsmMerge2_get_ModuleFiles_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
#endif
#endif
#ifndef __MsmMergeTypeLib_LIBRARY_DEFINED__
#define __MsmMergeTypeLib_LIBRARY_DEFINED__
#ifdef __cplusplus
class MsmMerge;
#endif
#if (_WIN32_MSM >= 150)
#ifdef __cplusplus
class MsmMerge2;
#endif
#endif
#endif
ULONG __RPC_API BSTR_UserSize(ULONG *,ULONG,BSTR *);
unsigned char *__RPC_API BSTR_UserMarshal(ULONG *,unsigned char *,BSTR *);
unsigned char *__RPC_API BSTR_UserUnmarshal(ULONG *,unsigned char *,BSTR *);
void __RPC_API BSTR_UserFree(ULONG *,BSTR *);
#ifdef __cplusplus
}
#endif
DEFINE_GUID(IID_IEnumMsmString,0x0ADDA826,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IMsmStrings,0x0ADDA827,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IMsmError,0x0ADDA828,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IEnumMsmError,0x0ADDA829,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IMsmErrors,0x0ADDA82A,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IMsmDependency,0x0ADDA82B,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IEnumMsmDependency,0x0ADDA82C,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IMsmDependencies,0x0ADDA82D,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IMsmMerge,0x0ADDA82E,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(IID_IMsmGetFiles,0x7041ae26,0x2d78,0x11d2,0x88,0x8a,0x0,0xa0,0xc9,0x81,0xb0,0x15);
DEFINE_GUID(LIBID_MsmMergeTypeLib,0x0ADDA82F,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
DEFINE_GUID(CLSID_MsmMerge,0x0ADDA830,0x2C26,0x11D2,0xAD,0x65,0x00,0xA0,0xC9,0xAF,0x11,0xA6);
#if (_WIN32_MSM >= 150)
DEFINE_GUID(IID_IMsmMerge2,0x351A72AB,0x21CB,0x47AB,0xB7,0xAA,0xC4,0xD7,0xB0,0x2E,0xA3,0x05);
DEFINE_GUID(IID_IMsmConfigurableItem,0x4D6E6284,0xD21D,0x401E,0x84,0xF6,0x90,0x9E,0x00,0xB5,0x0F,0x71);
DEFINE_GUID(IID_IEnumMsmConfigurableItem,0x832C6969,0x4826,0x4C24,0xA3,0x97,0xB7,0x00,0x2D,0x81,0x96,0xE6);
DEFINE_GUID(IID_IMsmConfigurableItems,0x55BF723C,0x9A0D,0x463E,0xB4,0x2B,0xB4,0xFB,0xC7,0xBE,0x3C,0x7C);
DEFINE_GUID(IID_IMsmConfigureModule,0xAC013209,0x18A7,0x4851,0x8A,0x21,0x23,0x53,0x44,0x3D,0x70,0xA0);
DEFINE_GUID(CLSID_MsmMerge2,0xF94985D5,0x29F9,0x4743,0x98,0x05,0x99,0xBC,0x3F,0x35,0xB6,0x78);
#endif
#endif
| {
"pile_set_name": "Github"
} |
source "https://rubygems.org"
gemspec
gem "google-cloud-language-v1", path: "../google-cloud-language-v1"
gem "google-cloud-language-v1beta2", path: "../google-cloud-language-v1beta2"
| {
"pile_set_name": "Github"
} |
{
"component": true,
"usingComponents": {
"wux-animation-group": "../animation-group/index"
}
} | {
"pile_set_name": "Github"
} |
--- **AI** -- Build large airborne formations of aircraft.
--
-- **Features:**
--
-- * Build in-air formations consisting of more than 40 aircraft as one group.
-- * Build different formation types.
-- * Assign a group leader that will guide the large formation path.
--
-- ===
--
-- ### [Demo Missions](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/FOR%20-%20Formation)
--
-- ===
--
-- ### [YouTube Playlist](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl0bFIJ9jIdYM22uaWmIN4oz)
--
-- ===
--
-- ### Author: **FlightControl**
-- ### Contributions:
--
-- ===
--
-- @module AI.AI_Formation
-- @image AI_Large_Formations.JPG
--- AI_FORMATION class
-- @type AI_FORMATION
-- @extends Core.Fsm#FSM_SET
-- @field Wrapper.Unit#UNIT FollowUnit
-- @field Core.Set#SET_GROUP FollowGroupSet
-- @field #string FollowName
-- @field #AI_FORMATION.MODE FollowMode The mode the escort is in.
-- @field Scheduler#SCHEDULER FollowScheduler The instance of the SCHEDULER class.
-- @field #number FollowDistance The current follow distance.
-- @field #boolean ReportTargets If true, nearby targets are reported.
-- @Field DCSTypes#AI.Option.Air.val.ROE OptionROE Which ROE is set to the FollowGroup.
-- @field DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT OptionReactionOnThreat Which REACTION_ON_THREAT is set to the FollowGroup.
-- @field #number dtFollow Time step between position updates.
--- Build large formations, make AI follow a @{Wrapper.Client#CLIENT} (player) leader or a @{Wrapper.Unit#UNIT} (AI) leader.
--
-- AI_FORMATION makes AI @{GROUP}s fly in formation of various compositions.
-- The AI_FORMATION class models formations in a different manner than the internal DCS formation logic!!!
-- The purpose of the class is to:
--
-- * Make formation building a process that can be managed while in flight, rather than a task.
-- * Human players can guide formations, consisting of larget planes.
-- * Build large formations (like a large bomber field).
-- * Form formations that DCS does not support off the shelve.
--
-- A few remarks:
--
-- * Depending on the type of plane, the change in direction by the leader may result in the formation getting disentangled while in flight and needs to be rebuild.
-- * Formations are vulnerable to collissions, but is depending on the type of plane, the distance between the planes and the speed and angle executed by the leader.
-- * Formations may take a while to build up.
--
-- As a result, the AI_FORMATION is not perfect, but is very useful to:
--
-- * Model large formations when flying straight line. You can build close formations when doing this.
-- * Make humans guide a large formation, when the planes are wide from each other.
--
-- ## AI_FORMATION construction
--
-- Create a new SPAWN object with the @{#AI_FORMATION.New} method:
--
-- * @{#AI_FORMATION.New}(): Creates a new AI_FORMATION object from a @{Wrapper.Group#GROUP} for a @{Wrapper.Client#CLIENT} or a @{Wrapper.Unit#UNIT}, with an optional briefing text.
--
-- ## Formation methods
--
-- The following methods can be used to set or change the formation:
--
-- * @{#AI_FORMATION.FormationLine}(): Form a line formation (core formation function).
-- * @{#AI_FORMATION.FormationTrail}(): Form a trail formation.
-- * @{#AI_FORMATION.FormationLeftLine}(): Form a left line formation.
-- * @{#AI_FORMATION.FormationRightLine}(): Form a right line formation.
-- * @{#AI_FORMATION.FormationRightWing}(): Form a right wing formation.
-- * @{#AI_FORMATION.FormationLeftWing}(): Form a left wing formation.
-- * @{#AI_FORMATION.FormationCenterWing}(): Form a center wing formation.
-- * @{#AI_FORMATION.FormationCenterVic}(): Form a Vic formation (same as CenterWing.
-- * @{#AI_FORMATION.FormationCenterBoxed}(): Form a center boxed formation.
--
-- ## Randomization
--
-- Use the method @{AI.AI_Formation#AI_FORMATION.SetFlightRandomization}() to simulate the formation flying errors that pilots make while in formation. Is a range set in meters.
--
-- @usage
-- local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart()
-- FollowGroupSet:Flush()
-- local LeaderUnit = UNIT:FindByName( "Leader" )
-- local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" )
-- LargeFormation:FormationCenterWing( 500, 50, 0, 250, 250 )
-- LargeFormation:__Start( 1 )
--
-- @field #AI_FORMATION
AI_FORMATION = {
ClassName = "AI_FORMATION",
FollowName = nil, -- The Follow Name
FollowUnit = nil,
FollowGroupSet = nil,
FollowMode = 1,
MODE = {
FOLLOW = 1,
MISSION = 2,
},
FollowScheduler = nil,
OptionROE = AI.Option.Air.val.ROE.OPEN_FIRE,
OptionReactionOnThreat = AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION,
dtFollow = 0.5,
}
AI_FORMATION.__Enum = {}
--- @type AI_FORMATION.__Enum.Formation
-- @field #number None
-- @field #number Line
-- @field #number Trail
-- @field #number Stack
-- @field #number LeftLine
-- @field #number RightLine
-- @field #number LeftWing
-- @field #number RightWing
-- @field #number Vic
-- @field #number Box
AI_FORMATION.__Enum.Formation = {
None = 0,
Mission = 1,
Line = 2,
Trail = 3,
Stack = 4,
LeftLine = 5,
RightLine = 6,
LeftWing = 7,
RightWing = 8,
Vic = 9,
Box = 10,
}
--- @type AI_FORMATION.__Enum.Mode
-- @field #number Mission
-- @field #number Formation
AI_FORMATION.__Enum.Mode = {
Mission = "M",
Formation = "F",
Attack = "A",
Reconnaissance = "R",
}
--- @type AI_FORMATION.__Enum.ReportType
-- @field #number All
-- @field #number Airborne
-- @field #number GroundRadar
-- @field #number Ground
AI_FORMATION.__Enum.ReportType = {
Airborne = "*",
Airborne = "A",
GroundRadar = "R",
Ground = "G",
}
--- MENUPARAM type
-- @type MENUPARAM
-- @field #AI_FORMATION ParamSelf
-- @field #number ParamDistance
-- @field #function ParamFunction
-- @field #string ParamMessage
--- AI_FORMATION class constructor for an AI group
-- @param #AI_FORMATION self
-- @param Wrapper.Unit#UNIT FollowUnit The UNIT leading the FolllowGroupSet.
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string FollowName Name of the escort.
-- @param #string FollowBriefing Briefing.
-- @return #AI_FORMATION self
function AI_FORMATION:New( FollowUnit, FollowGroupSet, FollowName, FollowBriefing ) --R2.1
local self = BASE:Inherit( self, FSM_SET:New( FollowGroupSet ) )
self:F( { FollowUnit, FollowGroupSet, FollowName } )
self.FollowUnit = FollowUnit -- Wrapper.Unit#UNIT
self.FollowGroupSet = FollowGroupSet -- Core.Set#SET_GROUP
self.FollowGroupSet:ForEachGroup(
function( FollowGroup )
self:E("Following")
FollowGroup:SetState( self, "Mode", self.__Enum.Mode.Formation )
end
)
self:SetFlightRandomization( 2 )
self:SetStartState( "None" )
self:AddTransition( "*", "Stop", "Stopped" )
self:AddTransition( {"None", "Stopped"}, "Start", "Following" )
self:AddTransition( "*", "FormationLine", "*" )
--- FormationLine Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationLine
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #boolean
--- FormationLine Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationLine
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationLine Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationLine
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationLine Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationLine
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
self:AddTransition( "*", "FormationTrail", "*" )
--- FormationTrail Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationTrail
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @return #boolean
--- FormationTrail Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationTrail
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
--- FormationTrail Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationTrail
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
--- FormationTrail Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationTrail
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
self:AddTransition( "*", "FormationStack", "*" )
--- FormationStack Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationStack
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @return #boolean
--- FormationStack Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationStack
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
--- FormationStack Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationStack
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
--- FormationStack Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationStack
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
self:AddTransition( "*", "FormationLeftLine", "*" )
--- FormationLeftLine Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationLeftLine
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #boolean
--- FormationLeftLine Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationLeftLine
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationLeftLine Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationLeftLine
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationLeftLine Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationLeftLine
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
self:AddTransition( "*", "FormationRightLine", "*" )
--- FormationRightLine Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationRightLine
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #boolean
--- FormationRightLine Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationRightLine
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationRightLine Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationRightLine
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationRightLine Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationRightLine
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
self:AddTransition( "*", "FormationLeftWing", "*" )
--- FormationLeftWing Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationLeftWing
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #boolean
--- FormationLeftWing Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationLeftWing
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationLeftWing Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationLeftWing
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationLeftWing Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationLeftWing
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
self:AddTransition( "*", "FormationRightWing", "*" )
--- FormationRightWing Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationRightWing
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #boolean
--- FormationRightWing Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationRightWing
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationRightWing Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationRightWing
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationRightWing Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationRightWing
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
self:AddTransition( "*", "FormationCenterWing", "*" )
--- FormationCenterWing Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationCenterWing
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #boolean
--- FormationCenterWing Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationCenterWing
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationCenterWing Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationCenterWing
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationCenterWing Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationCenterWing
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
self:AddTransition( "*", "FormationVic", "*" )
--- FormationVic Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationVic
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #boolean
--- FormationVic Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationVic
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationVic Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationVic
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
--- FormationVic Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationVic
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
self:AddTransition( "*", "FormationBox", "*" )
--- FormationBox Handler OnBefore for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnBeforeFormationBox
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @param #number ZLevels The amount of levels on the Z-axis.
-- @return #boolean
--- FormationBox Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationBox
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @param #number ZLevels The amount of levels on the Z-axis.
--- FormationBox Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] FormationBox
-- @param #AI_FORMATION self
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @param #number ZLevels The amount of levels on the Z-axis.
--- FormationBox Asynchronous Trigger for AI_FORMATION
-- @function [parent=#AI_FORMATION] __FormationBox
-- @param #AI_FORMATION self
-- @param #number Delay
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @param #number ZLevels The amount of levels on the Z-axis.
self:AddTransition( "*", "Follow", "Following" )
self:FormationLeftLine( 500, 0, 250, 250 )
self.FollowName = FollowName
self.FollowBriefing = FollowBriefing
self.CT1 = 0
self.GT1 = 0
self.FollowMode = AI_FORMATION.MODE.MISSION
return self
end
--- Set time interval between updates of the formation.
-- @param #AI_FORMATION self
-- @param #number dt Time step in seconds between formation updates. Default is every 0.5 seconds.
-- @return #AI_FORMATION
function AI_FORMATION:SetFollowTimeInterval(dt) --R2.1
self.dtFollow=dt or 0.5
return self
end
--- This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.
-- This allows to visualize where the escort is flying to.
-- @param #AI_FORMATION self
-- @param #boolean SmokeDirection If true, then the direction vector will be smoked.
-- @return #AI_FORMATION
function AI_FORMATION:TestSmokeDirectionVector( SmokeDirection ) --R2.1
self.SmokeDirectionVector = ( SmokeDirection == true ) and true or false
return self
end
--- FormationLine Handler OnAfter for AI_FORMATION
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #AI_FORMATION
function AI_FORMATION:onafterFormationLine( FollowGroupSet, From , Event , To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, Formation ) --R2.1
self:F( { FollowGroupSet, From , Event ,To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, Formation } )
XStart = XStart or self.XStart
XSpace = XSpace or self.XSpace
YStart = YStart or self.YStart
YSpace = YSpace or self.YSpace
ZStart = ZStart or self.ZStart
ZSpace = ZSpace or self.ZSpace
FollowGroupSet:Flush( self )
local FollowSet = FollowGroupSet:GetSet()
local i = 1 --FF i=0 caused first unit to have no XSpace! Probably needs further adjustments. This is just a quick work around.
for FollowID, FollowGroup in pairs( FollowSet ) do
local PointVec3 = POINT_VEC3:New()
PointVec3:SetX( XStart + i * XSpace )
PointVec3:SetY( YStart + i * YSpace )
PointVec3:SetZ( ZStart + i * ZSpace )
local Vec3 = PointVec3:GetVec3()
FollowGroup:SetState( self, "FormationVec3", Vec3 )
i = i + 1
FollowGroup:SetState( FollowGroup, "Formation", Formation )
end
return self
end
--- FormationTrail Handler OnAfter for AI_FORMATION
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @return #AI_FORMATION
function AI_FORMATION:onafterFormationTrail( FollowGroupSet, From , Event , To, XStart, XSpace, YStart ) --R2.1
self:onafterFormationLine(FollowGroupSet,From,Event,To,XStart,XSpace,YStart,0,0,0, self.__Enum.Formation.Trail )
return self
end
--- FormationStack Handler OnAfter for AI_FORMATION
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @return #AI_FORMATION
function AI_FORMATION:onafterFormationStack( FollowGroupSet, From , Event , To, XStart, XSpace, YStart, YSpace ) --R2.1
self:onafterFormationLine(FollowGroupSet,From,Event,To,XStart,XSpace,YStart,YSpace,0,0, self.__Enum.Formation.Stack )
return self
end
--- FormationLeftLine Handler OnAfter for AI_FORMATION
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #AI_FORMATION
function AI_FORMATION:onafterFormationLeftLine( FollowGroupSet, From , Event , To, XStart, YStart, ZStart, ZSpace ) --R2.1
self:onafterFormationLine(FollowGroupSet,From,Event,To,XStart,0,YStart,0,-ZStart,-ZSpace, self.__Enum.Formation.LeftLine )
return self
end
--- FormationRightLine Handler OnAfter for AI_FORMATION
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #AI_FORMATION
function AI_FORMATION:onafterFormationRightLine( FollowGroupSet, From , Event , To, XStart, YStart, ZStart, ZSpace ) --R2.1
self:onafterFormationLine(FollowGroupSet,From,Event,To,XStart,0,YStart,0,ZStart,ZSpace,self.__Enum.Formation.RightLine)
return self
end
--- FormationLeftWing Handler OnAfter for AI_FORMATION
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
function AI_FORMATION:onafterFormationLeftWing( FollowGroupSet, From , Event , To, XStart, XSpace, YStart, ZStart, ZSpace ) --R2.1
self:onafterFormationLine(FollowGroupSet,From,Event,To,XStart,XSpace,YStart,0,-ZStart,-ZSpace,self.__Enum.Formation.LeftWing)
return self
end
--- FormationRightWing Handler OnAfter for AI_FORMATION
-- @function [parent=#AI_FORMATION] OnAfterFormationRightWing
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
function AI_FORMATION:onafterFormationRightWing( FollowGroupSet, From , Event , To, XStart, XSpace, YStart, ZStart, ZSpace ) --R2.1
self:onafterFormationLine(FollowGroupSet,From,Event,To,XStart,XSpace,YStart,0,ZStart,ZSpace,self.__Enum.Formation.RightWing)
return self
end
--- FormationCenterWing Handler OnAfter for AI_FORMATION
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The group AI escorting the FollowUnit.
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
function AI_FORMATION:onafterFormationCenterWing( FollowGroupSet, From , Event , To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace ) --R2.1
local FollowSet = FollowGroupSet:GetSet()
local i = 0
for FollowID, FollowGroup in pairs( FollowSet ) do
local PointVec3 = POINT_VEC3:New()
local Side = ( i % 2 == 0 ) and 1 or -1
local Row = i / 2 + 1
PointVec3:SetX( XStart + Row * XSpace )
PointVec3:SetY( YStart )
PointVec3:SetZ( Side * ( ZStart + i * ZSpace ) )
local Vec3 = PointVec3:GetVec3()
FollowGroup:SetState( self, "FormationVec3", Vec3 )
i = i + 1
FollowGroup:SetState( FollowGroup, "Formation", self.__Enum.Formation.Vic )
end
return self
end
--- FormationVic Handle for AI_FORMATION
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @return #AI_FORMATION
function AI_FORMATION:onafterFormationVic( FollowGroupSet, From , Event , To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace ) --R2.1
self:onafterFormationCenterWing(FollowGroupSet,From,Event,To,XStart,XSpace,YStart,YSpace,ZStart,ZSpace)
return self
end
--- FormationBox Handler OnAfter for AI_FORMATION
-- @param #AI_FORMATION self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @param #number XStart The start position on the X-axis in meters for the first group.
-- @param #number XSpace The space between groups on the X-axis in meters for each sequent group.
-- @param #number YStart The start position on the Y-axis in meters for the first group.
-- @param #number YSpace The space between groups on the Y-axis in meters for each sequent group.
-- @param #number ZStart The start position on the Z-axis in meters for the first group.
-- @param #number ZSpace The space between groups on the Z-axis in meters for each sequent group.
-- @param #number ZLevels The amount of levels on the Z-axis.
-- @return #AI_FORMATION
function AI_FORMATION:onafterFormationBox( FollowGroupSet, From , Event , To, XStart, XSpace, YStart, YSpace, ZStart, ZSpace, ZLevels ) --R2.1
local FollowSet = FollowGroupSet:GetSet()
local i = 0
for FollowID, FollowGroup in pairs( FollowSet ) do
local PointVec3 = POINT_VEC3:New()
local ZIndex = i % ZLevels
local XIndex = math.floor( i / ZLevels )
local YIndex = math.floor( i / ZLevels )
PointVec3:SetX( XStart + XIndex * XSpace )
PointVec3:SetY( YStart + YIndex * YSpace )
PointVec3:SetZ( -ZStart - (ZSpace * ZLevels / 2 ) + ZSpace * ZIndex )
local Vec3 = PointVec3:GetVec3()
FollowGroup:SetState( self, "FormationVec3", Vec3 )
i = i + 1
FollowGroup:SetState( FollowGroup, "Formation", self.__Enum.Formation.Box )
end
return self
end
--- Use the method @{AI.AI_Formation#AI_FORMATION.SetFlightRandomization}() to make the air units in your formation randomize their flight a bit while in formation.
-- @param #AI_FORMATION self
-- @param #number FlightRandomization The formation flying errors that pilots can make while in formation. Is a range set in meters.
-- @return #AI_FORMATION
function AI_FORMATION:SetFlightRandomization( FlightRandomization ) --R2.1
self.FlightRandomization = FlightRandomization
return self
end
--- Gets your escorts to flight mode.
-- @param #AI_FORMATION self
-- @param Wrapper.Group#GROUP FollowGroup FollowGroup.
-- @return #AI_FORMATION
function AI_FORMATION:GetFlightMode( FollowGroup )
if FollowGroup then
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission )
end
return FollowGroup:GetState( FollowGroup, "Mode" )
end
--- This sets your escorts to fly a mission.
-- @param #AI_FORMATION self
-- @param Wrapper.Group#GROUP FollowGroup FollowGroup.
-- @return #AI_FORMATION
function AI_FORMATION:SetFlightModeMission( FollowGroup )
if FollowGroup then
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission )
else
self.EscortGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Mission )
end
)
end
return self
end
--- This sets your escorts to execute an attack.
-- @param #AI_FORMATION self
-- @param Wrapper.Group#GROUP FollowGroup FollowGroup.
-- @return #AI_FORMATION
function AI_FORMATION:SetFlightModeAttack( FollowGroup )
if FollowGroup then
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack )
else
self.EscortGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Attack )
end
)
end
return self
end
--- This sets your escorts to fly in a formation.
-- @param #AI_FORMATION self
-- @param Wrapper.Group#GROUP FollowGroup FollowGroup.
-- @return #AI_FORMATION
function AI_FORMATION:SetFlightModeFormation( FollowGroup )
if FollowGroup then
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation )
else
self.EscortGroupSet:ForSomeGroupAlive(
--- @param Core.Group#GROUP EscortGroup
function( FollowGroup )
FollowGroup:SetState( FollowGroup, "PreviousMode", FollowGroup:GetState( FollowGroup, "Mode" ) )
FollowGroup:SetState( FollowGroup, "Mode", self.__Enum.Mode.Formation )
end
)
end
return self
end
--- Stop function. Formation will not be updated any more.
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The following set of groups.
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To The to state.
function AI_FORMATION:onafterStop(FollowGroupSet, From, Event, To) --R2.1
self:E("Stopping formation.")
end
--- Follow event fuction. Check if coming from state "stopped". If so the transition is rejected.
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The following set of groups.
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To The to state.
function AI_FORMATION:onbeforeFollow( FollowGroupSet, From, Event, To ) --R2.1
if From=="Stopped" then
return false -- Deny transition.
end
return true
end
--- Enter following state.
-- @param #AI_FORMATION self
-- @param Core.Set#SET_GROUP FollowGroupSet The following set of groups.
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To The to state.
function AI_FORMATION:onenterFollowing( FollowGroupSet ) --R2.1
if self.FollowUnit:IsAlive() then
local ClientUnit = self.FollowUnit
local CT1, CT2, CV1, CV2
CT1 = ClientUnit:GetState( self, "CT1" )
local CuVec3=ClientUnit:GetVec3()
if CT1 == nil or CT1 == 0 then
ClientUnit:SetState( self, "CV1", CuVec3)
ClientUnit:SetState( self, "CT1", timer.getTime() )
else
CT1 = ClientUnit:GetState( self, "CT1" )
CT2 = timer.getTime()
CV1 = ClientUnit:GetState( self, "CV1" )
CV2 = CuVec3
ClientUnit:SetState( self, "CT1", CT2 )
ClientUnit:SetState( self, "CV1", CV2 )
end
--FollowGroupSet:ForEachGroupAlive( bla, self, ClientUnit, CT1, CV1, CT2, CV2)
for _,_group in pairs(FollowGroupSet:GetSet()) do
local group=_group --Wrapper.Group#GROUP
if group and group:IsAlive() then
self:FollowMe(group, ClientUnit, CT1, CV1, CT2, CV2)
end
end
self:__Follow( -self.dtFollow )
end
end
--- Follow me.
-- @param #AI_FORMATION self
-- @param Wrapper.Group#GROUP FollowGroup Follow group.
-- @param Wrapper.Unit#UNIT ClientUnit Client Unit.
-- @param DCS#Time CT1 Time
-- @param DCS#Vec3 CV1 Vec3
-- @param DCS#Time CT2 Time
-- @param DCS#Vec3 CV2 Vec3
function AI_FORMATION:FollowMe(FollowGroup, ClientUnit, CT1, CV1, CT2, CV2)
if FollowGroup:GetState( FollowGroup, "Mode" ) == self.__Enum.Mode.Formation then
self:T({Mode=FollowGroup:GetState( FollowGroup, "Mode" )})
FollowGroup:OptionROTEvadeFire()
FollowGroup:OptionROEReturnFire()
local GroupUnit = FollowGroup:GetUnit( 1 )
local GuVec3=GroupUnit:GetVec3()
local FollowFormation = FollowGroup:GetState( self, "FormationVec3" )
if FollowFormation then
local FollowDistance = FollowFormation.x
local GT1 = GroupUnit:GetState( self, "GT1" )
if CT1 == nil or CT1 == 0 or GT1 == nil or GT1 == 0 then
GroupUnit:SetState( self, "GV1", GuVec3)
GroupUnit:SetState( self, "GT1", timer.getTime() )
else
local CD = ( ( CV2.x - CV1.x )^2 + ( CV2.y - CV1.y )^2 + ( CV2.z - CV1.z )^2 ) ^ 0.5
local CT = CT2 - CT1
local CS = ( 3600 / CT ) * ( CD / 1000 ) / 3.6
local CDv = { x = CV2.x - CV1.x, y = CV2.y - CV1.y, z = CV2.z - CV1.z }
local Ca = math.atan2( CDv.x, CDv.z )
local GT1 = GroupUnit:GetState( self, "GT1" )
local GT2 = timer.getTime()
local GV1 = GroupUnit:GetState( self, "GV1" )
local GV2 = GuVec3
--[[
GV2:AddX( math.random( -Formation.FlightRandomization / 2, Formation.FlightRandomization / 2 ) )
GV2:AddY( math.random( -Formation.FlightRandomization / 2, Formation.FlightRandomization / 2 ) )
GV2:AddZ( math.random( -Formation.FlightRandomization / 2, Formation.FlightRandomization / 2 ) )
]]
GV2.x=GV2.x+math.random( -self.FlightRandomization / 2, self.FlightRandomization / 2 )
GV2.y=GV2.y+math.random( -self.FlightRandomization / 2, self.FlightRandomization / 2 )
GV2.z=GV2.z+math.random( -self.FlightRandomization / 2, self.FlightRandomization / 2 )
GroupUnit:SetState( self, "GT1", GT2 )
GroupUnit:SetState( self, "GV1", GV2 )
local GD = ( ( GV2.x - GV1.x )^2 + ( GV2.y - GV1.y )^2 + ( GV2.z - GV1.z )^2 ) ^ 0.5
local GT = GT2 - GT1
-- Calculate the distance
local GDv = { x = GV2.x - CV1.x, y = GV2.y - CV1.y, z = GV2.z - CV1.z }
local Alpha_T = math.atan2( GDv.x, GDv.z ) - math.atan2( CDv.x, CDv.z )
local Alpha_R = ( Alpha_T < 0 ) and Alpha_T + 2 * math.pi or Alpha_T
local Position = math.cos( Alpha_R )
local GD = ( ( GDv.x )^2 + ( GDv.z )^2 ) ^ 0.5
local Distance = GD * Position + - CS * 0.5
-- Calculate the group direction vector
local GV = { x = GV2.x - CV2.x, y = GV2.y - CV2.y, z = GV2.z - CV2.z }
-- Calculate GH2, GH2 with the same height as CV2.
local GH2 = { x = GV2.x, y = CV2.y + FollowFormation.y, z = GV2.z }
-- Calculate the angle of GV to the orthonormal plane
local alpha = math.atan2( GV.x, GV.z )
local GVx = FollowFormation.z * math.cos( Ca ) + FollowFormation.x * math.sin( Ca )
local GVz = FollowFormation.x * math.cos( Ca ) - FollowFormation.z * math.sin( Ca )
-- Now we calculate the intersecting vector between the circle around CV2 with radius FollowDistance and GH2.
-- From the GeoGebra model: CVI = (x(CV2) + FollowDistance cos(alpha), y(GH2) + FollowDistance sin(alpha), z(CV2))
local Inclination = ( Distance + FollowFormation.x ) / 10
if Inclination < -30 then
Inclination = - 30
end
local CVI = {
x = CV2.x + CS * 10 * math.sin(Ca),
y = GH2.y + Inclination, -- + FollowFormation.y,
y = GH2.y,
z = CV2.z + CS * 10 * math.cos(Ca),
}
-- Calculate the direction vector DV of the escort group. We use CVI as the base and CV2 as the direction.
local DV = { x = CV2.x - CVI.x, y = CV2.y - CVI.y, z = CV2.z - CVI.z }
-- We now calculate the unary direction vector DVu, so that we can multiply DVu with the speed, which is expressed in meters / s.
-- We need to calculate this vector to predict the point the escort group needs to fly to according its speed.
-- The distance of the destination point should be far enough not to have the aircraft starting to swipe left to right...
local DVu = { x = DV.x / FollowDistance, y = DV.y, z = DV.z / FollowDistance }
-- Now we can calculate the group destination vector GDV.
local GDV = { x = CVI.x, y = CVI.y, z = CVI.z }
local ADDx = FollowFormation.x * math.cos(alpha) - FollowFormation.z * math.sin(alpha)
local ADDz = FollowFormation.z * math.cos(alpha) + FollowFormation.x * math.sin(alpha)
local GDV_Formation = {
x = GDV.x - GVx,
y = GDV.y,
z = GDV.z - GVz
}
-- Debug smoke.
if self.SmokeDirectionVector == true then
trigger.action.smoke( GDV, trigger.smokeColor.Green )
trigger.action.smoke( GDV_Formation, trigger.smokeColor.White )
end
local Time = 120
local Speed = - ( Distance + FollowFormation.x ) / Time
if Distance > -10000 then
Speed = - ( Distance + FollowFormation.x ) / 60
end
if Distance > -2500 then
Speed = - ( Distance + FollowFormation.x ) / 20
end
local GS = Speed + CS
--self:F( { Distance = Distance, Speed = Speed, CS = CS, GS = GS } )
-- Now route the escort to the desired point with the desired speed.
FollowGroup:RouteToVec3( GDV_Formation, GS ) -- DCS models speed in Mps (Miles per second)
end
end
end
end
| {
"pile_set_name": "Github"
} |
" Vim compiler file
" Compiler: HTML Tidy
" Maintainer: Doug Kearns <[email protected]>
" Last Change: 2013 Jul 7
if exists("current_compiler")
finish
endif
let current_compiler = "tidy"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %
" sample warning: foo.html:8:1: Warning: inserting missing 'foobar' element
" sample error: foo.html:9:2: Error: <foobar> is not recognized!
CompilerSet errorformat=%f:%l:%c:\ Error:%m,%f:%l:%c:\ Warning:%m,%-G%.%#
| {
"pile_set_name": "Github"
} |
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import "SDImageCacheDefine.h"
#import "SDImageCodersManager.h"
#import "SDImageCoderHelper.h"
#import "SDAnimatedImage.h"
#import "UIImage+Metadata.h"
#import "SDInternalMacros.h"
UIImage * _Nullable SDImageCacheDecodeImageData(NSData * _Nonnull imageData, NSString * _Nonnull cacheKey, SDWebImageOptions options, SDWebImageContext * _Nullable context) {
UIImage *image;
BOOL decodeFirstFrame = SD_OPTIONS_CONTAINS(options, SDWebImageDecodeFirstFrameOnly);
NSNumber *scaleValue = context[SDWebImageContextImageScaleFactor];
CGFloat scale = scaleValue.doubleValue >= 1 ? scaleValue.doubleValue : SDImageScaleFactorForKey(cacheKey);
SDImageCoderOptions *coderOptions = @{SDImageCoderDecodeFirstFrameOnly : @(decodeFirstFrame), SDImageCoderDecodeScaleFactor : @(scale)};
if (context) {
SDImageCoderMutableOptions *mutableCoderOptions = [coderOptions mutableCopy];
[mutableCoderOptions setValue:context forKey:SDImageCoderWebImageContext];
coderOptions = [mutableCoderOptions copy];
}
if (!decodeFirstFrame) {
Class animatedImageClass = context[SDWebImageContextAnimatedImageClass];
// check whether we should use `SDAnimatedImage`
if ([animatedImageClass isSubclassOfClass:[UIImage class]] && [animatedImageClass conformsToProtocol:@protocol(SDAnimatedImage)]) {
image = [[animatedImageClass alloc] initWithData:imageData scale:scale options:coderOptions];
if (image) {
// Preload frames if supported
if (options & SDWebImagePreloadAllFrames && [image respondsToSelector:@selector(preloadAllFrames)]) {
[((id<SDAnimatedImage>)image) preloadAllFrames];
}
} else {
// Check image class matching
if (options & SDWebImageMatchAnimatedImageClass) {
return nil;
}
}
}
}
if (!image) {
image = [[SDImageCodersManager sharedManager] decodedImageWithData:imageData options:coderOptions];
}
if (image) {
BOOL shouldDecode = !SD_OPTIONS_CONTAINS(options, SDWebImageAvoidDecodeImage);
if ([image.class conformsToProtocol:@protocol(SDAnimatedImage)]) {
// `SDAnimatedImage` do not decode
shouldDecode = NO;
} else if (image.sd_isAnimated) {
// animated image do not decode
shouldDecode = NO;
}
if (shouldDecode) {
BOOL shouldScaleDown = SD_OPTIONS_CONTAINS(options, SDWebImageScaleDownLargeImages);
if (shouldScaleDown) {
image = [SDImageCoderHelper decodedAndScaledDownImageWithImage:image limitBytes:0];
} else {
image = [SDImageCoderHelper decodedImageWithImage:image];
}
}
}
return image;
}
| {
"pile_set_name": "Github"
} |
// Meeting Rooms II
/// answer = maximum clique = maximum number of intersecting intervals
class Solution {
public:
int minMeetingRooms(vector<Interval>& intervals) {
int n = intervals.size(), r = 0;
vector<int> a, b;
for (auto &i: intervals) {
a.push_back(i.start);
b.push_back(i.end);
}
sort(a.begin(), a.end());
sort(b.begin(), b.end());
for (int c = 0, i = 0, j = 0; i < n; ) {
if (a[i] < b[j])
i++, c++;
else
j++, c--;
r = max(r, c);
}
return r;
}
};
/// answer = chromatic number. graph coloring with greedy algorithm
class Solution {
public:
int minMeetingRooms(vector<Interval>& intervals) {
sort(intervals.begin(), intervals.end(), [](const Interval &x, const Interval &y) { return x.start < y.start; });
priority_queue<int, vector<int>, greater<int>> h;
for (auto &i: intervals) {
if (! h.empty() && h.top() <= i.start)
h.pop();
h.push(i.end);
}
return h.size();
}
};
| {
"pile_set_name": "Github"
} |
##gff-version 3
##sequence-region NC_003070 1 4294967295
NC_003070 gth gene 10472279 10475534 0.861423 + . ID=gene1
NC_003070 gth exon 10472279 10472330 0.788462 + . Parent=gene1
NC_003070 gth exon 10473721 10473759 0.666667 + . Parent=gene1
NC_003070 gth exon 10475053 10475534 0.869295 + . Parent=gene1
###
NC_003070 gth gene 10472500 10472941 1.000000 + . ID=gene2
NC_003070 gth exon 10472500 10472941 1.000000 + . Parent=gene2
###
NC_003070 gth gene 10474921 10475416 1.000000 + . ID=gene3
NC_003070 gth exon 10474921 10475416 1.000000 + . Parent=gene3
###
| {
"pile_set_name": "Github"
} |
\hypertarget{dir_6c7751b1438a90613932be0180faa43e}{\section{/home/dave/thesis/motorcar/src/compositor/wayland/input Directory Reference}
\label{dir_6c7751b1438a90613932be0180faa43e}\index{/home/dave/thesis/motorcar/src/compositor/wayland/input Directory Reference@{/home/dave/thesis/motorcar/src/compositor/wayland/input Directory Reference}}
}
Directory dependency graph for input\-:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=166pt]{dir_6c7751b1438a90613932be0180faa43e_dep}
\end{center}
\end{figure}
\subsection*{Files}
\begin{DoxyCompactItemize}
\item
file \hyperlink{keyboard_8cpp}{keyboard.\-cpp}
\item
file \hyperlink{keyboard_8h}{keyboard.\-h}
\item
file \hyperlink{pointer_8cpp}{pointer.\-cpp}
\item
file \hyperlink{pointer_8h}{pointer.\-h}
\item
file \hyperlink{seat_8cpp}{seat.\-cpp}
\item
file \hyperlink{seat_8h}{seat.\-h}
\item
file \hyperlink{waylandinput_8h}{waylandinput.\-h}
\end{DoxyCompactItemize}
| {
"pile_set_name": "Github"
} |
package fredboat.config
import fredboat.config.property.Credentials
import fredboat.sentinel.RawUser
import fredboat.util.rest.Http
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
private val log: Logger = LoggerFactory.getLogger(ApplicationInfo::class.java)
private const val APP_URL = "https://discord.com/api/v6/oauth2/applications/@me"
private const val USER_URL = "https://discord.com/api/v6/users/@me"
@Configuration
class DiscordInfoProvider{
@Bean
@ConditionalOnMissingClass("fredboat.testutil.Flag")
fun applicationInfo(credentials: Credentials): ApplicationInfo {
log.info("Retrieving application info")
Http(Http.DEFAULT_BUILDER).get(APP_URL)
.header("Authorization", "Bot " + credentials.botToken)
.asJson()
.run {
return ApplicationInfo(
getLong("id"),
getBoolean("bot_require_code_grant"),
optString("description") ?: "",
optString("icon") ?: "",
getString("name"),
getJSONObject("owner").getLong("id"),
getBoolean("bot_public")
)
}
}
@Bean
@ConditionalOnMissingClass("fredboat.testutil.Flag")
fun selfUser(credentials: Credentials): RawUser {
log.info("Retrieving self user info")
Http(Http.DEFAULT_BUILDER).get(USER_URL)
.header("Authorization", "Bot " + credentials.botToken)
.asJson()
.run {
return RawUser(
getLong("id"),
getString("username"),
getString("discriminator"),
getBoolean("bot")
)
}
}
}
data class ApplicationInfo(
val id: Long,
val requiresCodeGrant: Boolean,
val description: String,
val iconId: String,
val name: String,
val ownerId: Long,
val public: Boolean
)
val RawUser.idString get() = id.toString() | {
"pile_set_name": "Github"
} |
<timeinfo>
<indefinite>0</indefinite>
<duration>56.614444733</duration>
<introDuration>0.000000000</introDuration>
<outroDuration>0.000000000</outroDuration>
</timeinfo>
| {
"pile_set_name": "Github"
} |
/*
* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
*
* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
* rights reserved.
*
* License to copy and use this software is granted provided that it
* is identified as the "RSA Data Security, Inc. MD5 Message-Digest
* Algorithm" in all material mentioning or referencing this software
* or this function.
*
* License is also granted to make and use derivative works provided
* that such works are identified as "derived from the RSA Data
* Security, Inc. MD5 Message-Digest Algorithm" in all material
* mentioning or referencing the derived work.
*
* RSA Data Security, Inc. makes no representations concerning either
* the merchantability of this software or the suitability of this
* software for any particular purpose. It is provided "as is"
* without express or implied warranty of any kind.
*
* These notices must be retained in any copies of any part of this
* documentation and/or software.
*
* This code is the same as the code published by RSA Inc. It has been
* edited for clarity and style only.
*/
#include <sys/types.h>
#include <string.h>
#include "./md5.h"
static void MD5Transform(unsigned int [4], const unsigned char [64]);
#if (BYTE_ORDER == LITTLE_ENDIAN)
#define Encode memcpy
#define Decode memcpy
#else
/*
* OS X doesn't have le32toh() or htole32()
*/
#ifdef __APPLE__
#include <libkern/OSByteOrder.h>
#define le32toh(x) OSSwapLittleToHostInt32(x)
#define htole32(x) OSSwapHostToLittleInt32(x)
#endif
/*
* Encodes input (unsigned int) into output (unsigned char). Assumes len is
* a multiple of 4.
*/
static void
Encode (unsigned char *output, unsigned int *input, unsigned int len)
{
unsigned int i;
unsigned int *op = (unsigned int *)output;
for (i = 0; i < len / 4; i++)
op[i] = htole32(input[i]);
}
/*
* Decodes input (unsigned char) into output (unsigned int). Assumes len is
* a multiple of 4.
*/
static void
Decode (unsigned int *output, const unsigned char *input, unsigned int len)
{
unsigned int i;
const unsigned int *ip = (const unsigned int *)input;
for (i = 0; i < len / 4; i++)
output[i] = le32toh(ip[i]);
}
#endif
static unsigned char PADDING[64] = {
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/* F, G, H and I are basic MD5 functions. */
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | (~z)))
/* ROTATE_LEFT rotates x left n bits. */
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
/*
* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
* Rotation is separate from addition to prevent recomputation.
*/
#define FF(a, b, c, d, x, s, ac) { \
(a) += F ((b), (c), (d)) + (x) + (unsigned int)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define GG(a, b, c, d, x, s, ac) { \
(a) += G ((b), (c), (d)) + (x) + (unsigned int)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define HH(a, b, c, d, x, s, ac) { \
(a) += H ((b), (c), (d)) + (x) + (unsigned int)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define II(a, b, c, d, x, s, ac) { \
(a) += I ((b), (c), (d)) + (x) + (unsigned int)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
/* MD5 initialization. Begins an MD5 operation, writing a new context. */
void
MD5Init (context)
MD5_CTX *context;
{
context->count[0] = context->count[1] = 0;
/* Load magic initialization constants. */
context->state[0] = 0x67452301;
context->state[1] = 0xefcdab89;
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
}
/*
* MD5 block update operation. Continues an MD5 message-digest
* operation, processing another message block, and updating the
* context.
*/
void
MD5Update (context, in, inputLen)
MD5_CTX *context;
const void *in;
unsigned int inputLen;
{
unsigned int i, idx, partLen;
const unsigned char *input = in;
/* Compute number of bytes mod 64 */
idx = (unsigned int)((context->count[0] >> 3) & 0x3F);
/* Update number of bits */
if ((context->count[0] += ((unsigned int)inputLen << 3))
< ((unsigned int)inputLen << 3))
context->count[1]++;
context->count[1] += ((unsigned int)inputLen >> 29);
partLen = 64 - idx;
/* Transform as many times as possible. */
if (inputLen >= partLen) {
memcpy((void *)&context->buffer[idx], (const void *)input,
partLen);
MD5Transform (context->state, context->buffer);
for (i = partLen; i + 63 < inputLen; i += 64)
MD5Transform (context->state, &input[i]);
idx = 0;
}
else
i = 0;
/* Buffer remaining input */
memcpy ((void *)&context->buffer[idx], (const void *)&input[i],
inputLen-i);
}
/*
* MD5 padding. Adds padding followed by original length.
*/
void
MD5Pad (context)
MD5_CTX *context;
{
unsigned char bits[8];
unsigned int idx, padLen;
/* Save number of bits */
Encode (bits, context->count, 8);
/* Pad out to 56 mod 64. */
idx = (unsigned int)((context->count[0] >> 3) & 0x3f);
padLen = (idx < 56) ? (56 - idx) : (120 - idx);
MD5Update (context, PADDING, padLen);
/* Append length (before padding) */
MD5Update (context, bits, 8);
}
/*
* MD5 finalization. Ends an MD5 message-digest operation, writing the
* the message digest and zeroizing the context.
*/
void
MD5Final (digest, context)
unsigned char digest[16];
MD5_CTX *context;
{
/* Do padding. */
MD5Pad (context);
/* Store state in digest */
Encode (digest, context->state, 16);
/* Zeroize sensitive information. */
memset ((void *)context, 0, sizeof (*context));
}
/* MD5 basic transformation. Transforms state based on block. */
static void
MD5Transform (state, block)
unsigned int state[4];
const unsigned char block[64];
{
unsigned int a = state[0], b = state[1], c = state[2], d = state[3], x[16];
Decode (x, block, 64);
/* Round 1 */
#define S11 7
#define S12 12
#define S13 17
#define S14 22
FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
/* Round 2 */
#define S21 5
#define S22 9
#define S23 14
#define S24 20
GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
/* Round 3 */
#define S31 4
#define S32 11
#define S33 16
#define S34 23
HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
/* Round 4 */
#define S41 6
#define S42 10
#define S43 15
#define S44 21
II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
state[0] += a;
state[1] += b;
state[2] += c;
state[3] += d;
/* Zeroize sensitive information. */
memset ((void *)x, 0, sizeof (x));
}
| {
"pile_set_name": "Github"
} |
<a href='https://github.com/angular/angular.js/edit/v1.2.x/src/ngMock/angular-mocks.js?message=docs($exceptionHandlerProvider)%3A%20describe%20your%20change...' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit"> </i>Improve this Doc</a>
<a href='https://github.com/angular/angular.js/tree/v1.2.26/src/ngMock/angular-mocks.js#L181' class='view-source pull-right btn btn-primary'>
<i class="glyphicon glyphicon-zoom-in"> </i>View Source
</a>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">$exceptionHandlerProvider</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
<a href="api/ngMock/service/$exceptionHandler">- $exceptionHandler</a>
</li>
<li>
- provider in module <a href="api/ngMock">ngMock</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>Configures the mock implementation of <a href="api/ng/service/$exceptionHandler"><code>$exceptionHandler</code></a> to rethrow or to log errors
passed into the <code>$exceptionHandler</code>.</p>
</div>
<div>
<h2>Methods</h2>
<ul class="methods">
<li id="mode">
<h3><p><code>mode(mode);</code></p>
</h3>
<div><p>Sets the logging mode.</p>
</div>
<h4>Parameters</h4>
<table class="variables-matrix input-arguments">
<thead>
<tr>
<th>Param</th>
<th>Type</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>
mode
</td>
<td>
<a href="" class="label type-hint type-hint-string">string</a>
</td>
<td>
<p>Mode of operation, defaults to <code>rethrow</code>.</p>
<ul>
<li><code>rethrow</code>: If any errors are passed into the handler in tests, it typically<pre><code>means that there is a bug in the application or test, so this mock will
make these tests fail.
</code></pre>
</li>
<li><code>log</code>: Sometimes it is desirable to test that an error is thrown, for this case the <code>log</code><pre><code>mode stores an array of errors in `$exceptionHandler.errors`, to allow later
assertion of them. See <a href="api/ngMock/service/$log#assertEmpty">assertEmpty()</a> and
<a href="api/ngMock/service/$log#reset">reset()</a>
</code></pre>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
| {
"pile_set_name": "Github"
} |
OUTFILE=gitignore
cat >$OUTFILE <<EOF
##
## This file has been automatically generated with the command line:
## for pom in \$(find -name "pom.xml") ; do path=\${pom%*pom.xml} ; echo '#' \$path ; echo ; echo \${path}target ; echo ; done > .gitignore
##
## - ETj
nb*.xml
.classpath
.project
.settings
EOF
for pom in $(find -name "pom.xml")
do
path=${pom%*pom.xml}
echo '#' $path >>$OUTFILE
echo >>$OUTFILE
echo ${path}target >>$OUTFILE
echo >>$OUTFILE
done
echo New file gitignore has been created. You may now want to replace your original .gitignore file.
echo
| {
"pile_set_name": "Github"
} |
@ECHO OFF
cd ../../Barotrauma
cd BarotraumaClient
dotnet publish LinuxClient.csproj -c Unstable -clp:ErrorsOnly;Summary --self-contained -r linux-x64 /p:Platform=x64
cd ..
cd BarotraumaServer
dotnet publish LinuxServer.csproj -c Unstable -clp:ErrorsOnly;Summary --self-contained -r linux-x64 /p:Platform=x64
PAUSE
| {
"pile_set_name": "Github"
} |
"""Generate skeletons from the example code"""
import os
exercise_dir = os.path.dirname(__file__)
if exercise_dir == '':
exercise_dir = '.'
skeleton_dir = os.path.abspath(os.path.join(exercise_dir, '..', 'skeletons'))
if not os.path.exists(skeleton_dir):
os.makedirs(skeleton_dir)
solutions = os.listdir(exercise_dir)
for f in solutions:
if not f.endswith('.py'):
continue
if f == os.path.basename(__file__):
continue
print("Generating skeleton for %s" % f)
input_file = open(os.path.join(exercise_dir, f))
output_file = open(os.path.join(skeleton_dir, f), 'w')
in_exercise_region = False
for line in input_file:
linestrip = line.strip()
if len(linestrip) == 0:
in_exercise_region = False
elif linestrip.startswith('# TASK:'):
in_exercise_region = True
if not in_exercise_region or linestrip.startswith('#'):
output_file.write(line)
output_file.close()
| {
"pile_set_name": "Github"
} |
---
title: Jest 14.0: React Tree Snapshot Testing
author: Christoph Nakazawa
authorURL: http://twitter.com/cpojer
authorFBID: 100000023028168
---
One of Jest's philosophies is to provide an integrated “zero-configuration” experience. We want to make it as frictionless as possible to write good tests that are useful. We observed that when engineers are provided with ready-to-use tools, they end up writing more tests, which in turn results in stable and healthy code bases.
One of the big open questions was how to write React tests efficiently. There are plenty of tools such as [ReactTestUtils](https://facebook.github.io/react/docs/test-utils.html) and [enzyme](http://airbnb.io/enzyme/). Both of these tools are great and are actively being used. However engineers frequently told us that they spend more time writing a test than the component itself. As a result many people stopped writing tests altogether which eventually led to instabilities. Engineers told us all they wanted was to make sure their components don't change unexpectedly.
<!--truncate-->
Together with the React team we created a new test renderer for React and added snapshot testing to Jest. Consider this [example test](https://github.com/facebook/jest/blob/master/examples/snapshot/__tests__/Link.react-test.js) for a simple [Link component](https://github.com/facebook/jest/blob/master/examples/snapshot/Link.react.js):
```javascript
import renderer from 'react-test-renderer';
test('Link renders correctly', () => {
const tree = renderer
.create(<Link page="http://www.facebook.com">Facebook</Link>)
.toJSON();
expect(tree).toMatchSnapshot();
});
```
The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/master/examples/snapshot/__tests__/__snapshots__/Link.react-test.js.snap) that looks like this:
```javascript
exports[`Link renders correctly 1`] = `
<a
className="normal"
href="http://www.facebook.com"
onMouseEnter={[Function bound _onMouseEnter]}
onMouseLeave={[Function bound _onMouseLeave]}>
Facebook
</a>
`;
```
The snapshot artifact should be committed alongside code changes. We use [pretty-format](https://github.com/thejameskyle/pretty-format) to make snapshots human-readable during code review. On subsequent test runs Jest will simply compare the rendered output with the previous snapshot. If they match, the test will pass. If they don't match, either the implementation has changed and the snapshot needs to be updated with `jest -u`, or the test runner found a bug in your code that should be fixed.
If we change the address the Link component in our example is pointing to, Jest will print this output:

Now you know that you either need to accept the changes with `jest -u`, or fix the component if the changes were unintentional. To try out this functionality, please clone the [snapshot example](https://github.com/facebook/jest/tree/master/examples/snapshot), modify the Link component and run Jest. We updated the [React Tutorial](/docs/tutorial-react.html) with a new guide for snapshot testing.
This feature was built by [Ben Alpert](https://twitter.com/soprano) and [Cristian Carlesso](https://twitter.com/kentaromiura).
## Experimental React Native support
By building a test renderer that targets no specific platform we are finally able to support a full, unmocked version of React Native. We are excited to launch experimental React Native support for Jest through the `jest-react-native` package.
You can start using Jest with react-native by running `yarn add --dev jest-react-native` and by adding the preset to your Jest configuration:
```json
"jest": {
"preset": "jest-react-native"
}
```
- [Tutorial and setup guide](/docs/tutorial-react-native.html#content)
- [Example project](https://github.com/facebook/jest/tree/master/examples/react-native)
- [Example pull request for _snowflake_](https://github.com/bartonhammond/snowflake/pull/110), a popular react-native open source library.
_Note: the preset currently only implements the minimal set of configuration necessary to get started with React Native testing. We are hoping for community contributions to improve this project. Please try it and file [issues](https://github.com/facebook/jest/issues) or send pull requests!_
## Why snapshot testing?
For Facebook's native apps we use a system called “snapshot testing”: a snapshot test system that renders UI components, takes a screenshot and subsequently compares a recorded screenshot with changes made by an engineer. If the screenshots don't match, there are two possibilities: either the change is unexpected or the screenshot can be updated to the new version of the UI component.
While this was the solution we wanted for the web, we also found many problems with such end-to-end tests that snapshot integration tests solve:
- **No flakiness:** Because tests are run in a command line runner instead of a real browser or on a real phone, the test runner doesn't have to wait for builds, spawn browsers, load a page and drive the UI to get a component into the expected state which tends to be flaky and the test results become noisy.
- **Fast iteration speed:** Engineers want to get results in less than a second rather than waiting for minutes or even hours. If tests don't run quickly like in most end-to-end frameworks, engineers don't run them at all or don't bother writing them in the first place.
- **Debugging:** It's easy to step into the code of an integration test in JS instead of trying to recreate the screenshot test scenario and debugging what happened in the visual diff.
Because we believe snapshot testing can be useful beyond Jest we split the feature into a [jest-snapshot](https://github.com/facebook/jest/tree/master/packages/jest-snapshot) package. We are happy to work with the community to make it more generic so it can be integrated with other test runners and share concepts and infrastructure with each other.
Finally, here is a quote of a Facebook engineer describing how snapshot testing changed his unit testing experience:
> “One of the most challenging aspects of my project was keeping the input and output files for each test case in sync. Each little change in functionality could cause all the output files to change. With snapshot testing I do not need the output files, the snapshots are generated for free by Jest! I can simply inspect how Jest updates the snapshots rather than making the changes manually.” – [Kyle Davis](https://github.com/kyldvs) working on [fjs](https://github.com/kyldvs/fjs).
## What's next for Jest
Recently [Aaron Abramov](https://twitter.com/aaronabramov_) has joined the Jest team full time to improve our unit and integration test infrastructure for Facebook's ads products. For the next few months the Jest team is planning major improvements in these areas:
- **Replace Jasmine:** Jasmine is slowing us down and is not being very actively developed. We started replacing all the Jasmine matchers and are excited to add new features and drop this dependency.
- **Code Coverage:** When Jest was originally created, tools such as babel didn't exist. Our code coverage support has a bunch of edge cases and isn't always working properly. We are rewriting it to address all the current problems with coverage.
- **Developer Experience:** This ranges from improving the setup process, the debugging experience to CLI improvements and more documentation.
- **Mocking:** The mocking system, especially around manual mocks, is not working well and is confusing. We hope to make it more strict and easier to understand.
- **Performance:** Further performance improvements especially for really large codebases are being worked on.
As always, if you have questions or if you are excited to help out, please reach out to us!
| {
"pile_set_name": "Github"
} |
//===--- ParseableOutput.h - Helpers for parseable output -------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Helpers for emitting the driver's parseable output.
///
//===----------------------------------------------------------------------===//
#ifndef SWIFT_DRIVER_PARSEABLEOUTPUT_H
#define SWIFT_DRIVER_PARSEABLEOUTPUT_H
#include "swift/Basic/LLVM.h"
#include "swift/Basic/TaskQueue.h"
namespace swift {
namespace driver {
class Job;
namespace parseable_output {
using swift::sys::ProcessId;
/// \brief Emits a "began" message to the given stream.
void emitBeganMessage(raw_ostream &os, const Job &Cmd, ProcessId Pid);
/// \brief Emits a "finished" message to the given stream.
void emitFinishedMessage(raw_ostream &os, const Job &Cmd, ProcessId Pid,
int ExitStatus, StringRef Output);
/// \brief Emits a "signalled" message to the given stream.
void emitSignalledMessage(raw_ostream &os, const Job &Cmd, ProcessId Pid,
StringRef ErrorMsg, StringRef Output, Optional<int> Signal);
/// \brief Emits a "skipped" message to the given stream.
void emitSkippedMessage(raw_ostream &os, const Job &Cmd);
} // end namespace parseable_output
} // end namespace driver
} // end namespace swift
#endif
| {
"pile_set_name": "Github"
} |
// dnlib: See LICENSE.txt for more info
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using dnlib.DotNet.MD;
using dnlib.DotNet.Pdb;
using dnlib.Threading;
namespace dnlib.DotNet {
/// <summary>
/// A high-level representation of a row in the Property table
/// </summary>
public abstract class PropertyDef : IHasConstant, IHasCustomAttribute, IHasSemantic, IHasCustomDebugInformation, IFullName, IMemberDef {
/// <summary>
/// The row id in its table
/// </summary>
protected uint rid;
#if THREAD_SAFE
readonly Lock theLock = Lock.Create();
#endif
/// <inheritdoc/>
public MDToken MDToken => new MDToken(Table.Property, rid);
/// <inheritdoc/>
public uint Rid {
get => rid;
set => rid = value;
}
/// <inheritdoc/>
public int HasConstantTag => 2;
/// <inheritdoc/>
public int HasCustomAttributeTag => 9;
/// <inheritdoc/>
public int HasSemanticTag => 1;
/// <summary>
/// From column Property.PropFlags
/// </summary>
public PropertyAttributes Attributes {
get => (PropertyAttributes)attributes;
set => attributes = (int)value;
}
/// <summary>Attributes</summary>
protected int attributes;
/// <summary>
/// From column Property.Name
/// </summary>
public UTF8String Name {
get => name;
set => name = value;
}
/// <summary>Name</summary>
protected UTF8String name;
/// <summary>
/// From column Property.Type
/// </summary>
public CallingConventionSig Type {
get => type;
set => type = value;
}
/// <summary/>
protected CallingConventionSig type;
/// <inheritdoc/>
public Constant Constant {
get {
if (!constant_isInitialized)
InitializeConstant();
return constant;
}
set {
#if THREAD_SAFE
theLock.EnterWriteLock(); try {
#endif
constant = value;
constant_isInitialized = true;
#if THREAD_SAFE
} finally { theLock.ExitWriteLock(); }
#endif
}
}
/// <summary/>
protected Constant constant;
/// <summary/>
protected bool constant_isInitialized;
void InitializeConstant() {
#if THREAD_SAFE
theLock.EnterWriteLock(); try {
#endif
if (constant_isInitialized)
return;
constant = GetConstant_NoLock();
constant_isInitialized = true;
#if THREAD_SAFE
} finally { theLock.ExitWriteLock(); }
#endif
}
/// <summary>Called to initialize <see cref="constant"/></summary>
protected virtual Constant GetConstant_NoLock() => null;
/// <summary>Reset <see cref="Constant"/></summary>
protected void ResetConstant() => constant_isInitialized = false;
/// <summary>
/// Gets all custom attributes
/// </summary>
public CustomAttributeCollection CustomAttributes {
get {
if (customAttributes is null)
InitializeCustomAttributes();
return customAttributes;
}
}
/// <summary/>
protected CustomAttributeCollection customAttributes;
/// <summary>Initializes <see cref="customAttributes"/></summary>
protected virtual void InitializeCustomAttributes() =>
Interlocked.CompareExchange(ref customAttributes, new CustomAttributeCollection(), null);
/// <inheritdoc/>
public int HasCustomDebugInformationTag => 9;
/// <inheritdoc/>
public bool HasCustomDebugInfos => CustomDebugInfos.Count > 0;
/// <summary>
/// Gets all custom debug infos
/// </summary>
public IList<PdbCustomDebugInfo> CustomDebugInfos {
get {
if (customDebugInfos is null)
InitializeCustomDebugInfos();
return customDebugInfos;
}
}
/// <summary/>
protected IList<PdbCustomDebugInfo> customDebugInfos;
/// <summary>Initializes <see cref="customDebugInfos"/></summary>
protected virtual void InitializeCustomDebugInfos() =>
Interlocked.CompareExchange(ref customDebugInfos, new List<PdbCustomDebugInfo>(), null);
/// <summary>
/// Gets/sets the first getter method. Writing <c>null</c> will clear all get methods.
/// </summary>
public MethodDef GetMethod {
get {
if (otherMethods is null)
InitializePropertyMethods();
return getMethods.Count == 0 ? null : getMethods[0];
}
set {
if (otherMethods is null)
InitializePropertyMethods();
if (value is null)
getMethods.Clear();
else if (getMethods.Count == 0)
getMethods.Add(value);
else
getMethods[0] = value;
}
}
/// <summary>
/// Gets/sets the first setter method. Writing <c>null</c> will clear all set methods.
/// </summary>
public MethodDef SetMethod {
get {
if (otherMethods is null)
InitializePropertyMethods();
return setMethods.Count == 0 ? null : setMethods[0];
}
set {
if (otherMethods is null)
InitializePropertyMethods();
if (value is null)
setMethods.Clear();
else if (setMethods.Count == 0)
setMethods.Add(value);
else
setMethods[0] = value;
}
}
/// <summary>
/// Gets all getter methods
/// </summary>
public IList<MethodDef> GetMethods {
get {
if (otherMethods is null)
InitializePropertyMethods();
return getMethods;
}
}
/// <summary>
/// Gets all setter methods
/// </summary>
public IList<MethodDef> SetMethods {
get {
if (otherMethods is null)
InitializePropertyMethods();
return setMethods;
}
}
/// <summary>
/// Gets the other methods
/// </summary>
public IList<MethodDef> OtherMethods {
get {
if (otherMethods is null)
InitializePropertyMethods();
return otherMethods;
}
}
void InitializePropertyMethods() {
#if THREAD_SAFE
theLock.EnterWriteLock(); try {
#endif
if (otherMethods is null)
InitializePropertyMethods_NoLock();
#if THREAD_SAFE
} finally { theLock.ExitWriteLock(); }
#endif
}
/// <summary>
/// Initializes <see cref="otherMethods"/>, <see cref="getMethods"/>,
/// and <see cref="setMethods"/>.
/// </summary>
protected virtual void InitializePropertyMethods_NoLock() {
getMethods = new List<MethodDef>();
setMethods = new List<MethodDef>();
otherMethods = new List<MethodDef>();
}
/// <summary/>
protected IList<MethodDef> getMethods;
/// <summary/>
protected IList<MethodDef> setMethods;
/// <summary/>
protected IList<MethodDef> otherMethods;
/// <summary>Reset <see cref="GetMethods"/>, <see cref="SetMethods"/>, <see cref="OtherMethods"/></summary>
protected void ResetMethods() => otherMethods = null;
/// <summary>
/// <c>true</c> if there are no methods attached to this property
/// </summary>
public bool IsEmpty =>
// The first property access initializes the other fields we access here
GetMethods.Count == 0 &&
setMethods.Count == 0 &&
otherMethods.Count == 0;
/// <inheritdoc/>
public bool HasCustomAttributes => CustomAttributes.Count > 0;
/// <summary>
/// <c>true</c> if <see cref="OtherMethods"/> is not empty
/// </summary>
public bool HasOtherMethods => OtherMethods.Count > 0;
/// <summary>
/// <c>true</c> if <see cref="Constant"/> is not <c>null</c>
/// </summary>
public bool HasConstant => !(Constant is null);
/// <summary>
/// Gets the constant element type or <see cref="dnlib.DotNet.ElementType.End"/> if there's no constant
/// </summary>
public ElementType ElementType {
get {
var c = Constant;
return c is null ? ElementType.End : c.Type;
}
}
/// <summary>
/// Gets/sets the property sig
/// </summary>
public PropertySig PropertySig {
get => type as PropertySig;
set => type = value;
}
/// <summary>
/// Gets/sets the declaring type (owner type)
/// </summary>
public TypeDef DeclaringType {
get => declaringType2;
set {
var currentDeclaringType = DeclaringType2;
if (currentDeclaringType == value)
return;
if (!(currentDeclaringType is null))
currentDeclaringType.Properties.Remove(this); // Will set DeclaringType2 = null
if (!(value is null))
value.Properties.Add(this); // Will set DeclaringType2 = value
}
}
/// <inheritdoc/>
ITypeDefOrRef IMemberRef.DeclaringType => declaringType2;
/// <summary>
/// Called by <see cref="DeclaringType"/> and should normally not be called by any user
/// code. Use <see cref="DeclaringType"/> instead. Only call this if you must set the
/// declaring type without inserting it in the declaring type's method list.
/// </summary>
public TypeDef DeclaringType2 {
get => declaringType2;
set => declaringType2 = value;
}
/// <summary/>
protected TypeDef declaringType2;
/// <inheritdoc/>
public ModuleDef Module => declaringType2?.Module;
/// <summary>
/// Gets the full name of the property
/// </summary>
public string FullName => FullNameFactory.PropertyFullName(declaringType2?.FullName, name, type, null, null);
bool IIsTypeOrMethod.IsType => false;
bool IIsTypeOrMethod.IsMethod => false;
bool IMemberRef.IsField => false;
bool IMemberRef.IsTypeSpec => false;
bool IMemberRef.IsTypeRef => false;
bool IMemberRef.IsTypeDef => false;
bool IMemberRef.IsMethodSpec => false;
bool IMemberRef.IsMethodDef => false;
bool IMemberRef.IsMemberRef => false;
bool IMemberRef.IsFieldDef => false;
bool IMemberRef.IsPropertyDef => true;
bool IMemberRef.IsEventDef => false;
bool IMemberRef.IsGenericParam => false;
/// <summary>
/// Set or clear flags in <see cref="attributes"/>
/// </summary>
/// <param name="set"><c>true</c> if flags should be set, <c>false</c> if flags should
/// be cleared</param>
/// <param name="flags">Flags to set or clear</param>
void ModifyAttributes(bool set, PropertyAttributes flags) {
if (set)
attributes |= (int)flags;
else
attributes &= ~(int)flags;
}
/// <summary>
/// Gets/sets the <see cref="PropertyAttributes.SpecialName"/> bit
/// </summary>
public bool IsSpecialName {
get => ((PropertyAttributes)attributes & PropertyAttributes.SpecialName) != 0;
set => ModifyAttributes(value, PropertyAttributes.SpecialName);
}
/// <summary>
/// Gets/sets the <see cref="PropertyAttributes.RTSpecialName"/> bit
/// </summary>
public bool IsRuntimeSpecialName {
get => ((PropertyAttributes)attributes & PropertyAttributes.RTSpecialName) != 0;
set => ModifyAttributes(value, PropertyAttributes.RTSpecialName);
}
/// <summary>
/// Gets/sets the <see cref="PropertyAttributes.HasDefault"/> bit
/// </summary>
public bool HasDefault {
get => ((PropertyAttributes)attributes & PropertyAttributes.HasDefault) != 0;
set => ModifyAttributes(value, PropertyAttributes.HasDefault);
}
/// <inheritdoc/>
public override string ToString() => FullName;
}
/// <summary>
/// A Property row created by the user and not present in the original .NET file
/// </summary>
public class PropertyDefUser : PropertyDef {
/// <summary>
/// Default constructor
/// </summary>
public PropertyDefUser() {
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="name">Name</param>
public PropertyDefUser(UTF8String name)
: this(name, null) {
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="name">Name</param>
/// <param name="sig">Property signature</param>
public PropertyDefUser(UTF8String name, PropertySig sig)
: this(name, sig, 0) {
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="name">Name</param>
/// <param name="sig">Property signature</param>
/// <param name="flags">Flags</param>
public PropertyDefUser(UTF8String name, PropertySig sig, PropertyAttributes flags) {
this.name = name;
type = sig;
attributes = (int)flags;
}
}
/// <summary>
/// Created from a row in the Property table
/// </summary>
sealed class PropertyDefMD : PropertyDef, IMDTokenProviderMD {
/// <summary>The module where this instance is located</summary>
readonly ModuleDefMD readerModule;
readonly uint origRid;
/// <inheritdoc/>
public uint OrigRid => origRid;
/// <inheritdoc/>
protected override Constant GetConstant_NoLock() => readerModule.ResolveConstant(readerModule.Metadata.GetConstantRid(Table.Property, origRid));
/// <inheritdoc/>
protected override void InitializeCustomAttributes() {
var list = readerModule.Metadata.GetCustomAttributeRidList(Table.Property, origRid);
var tmp = new CustomAttributeCollection(list.Count, list, (list2, index) => readerModule.ReadCustomAttribute(list[index]));
Interlocked.CompareExchange(ref customAttributes, tmp, null);
}
/// <inheritdoc/>
protected override void InitializeCustomDebugInfos() {
var list = new List<PdbCustomDebugInfo>();
readerModule.InitializeCustomDebugInfos(new MDToken(MDToken.Table, origRid), new GenericParamContext(declaringType2), list);
Interlocked.CompareExchange(ref customDebugInfos, list, null);
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="readerModule">The module which contains this <c>Property</c> row</param>
/// <param name="rid">Row ID</param>
/// <exception cref="ArgumentNullException">If <paramref name="readerModule"/> is <c>null</c></exception>
/// <exception cref="ArgumentException">If <paramref name="rid"/> is invalid</exception>
public PropertyDefMD(ModuleDefMD readerModule, uint rid) {
#if DEBUG
if (readerModule is null)
throw new ArgumentNullException("readerModule");
if (readerModule.TablesStream.PropertyTable.IsInvalidRID(rid))
throw new BadImageFormatException($"Property rid {rid} does not exist");
#endif
origRid = rid;
this.rid = rid;
this.readerModule = readerModule;
bool b = readerModule.TablesStream.TryReadPropertyRow(origRid, out var row);
Debug.Assert(b);
attributes = row.PropFlags;
name = readerModule.StringsStream.ReadNoNull(row.Name);
declaringType2 = readerModule.GetOwnerType(this);
type = readerModule.ReadSignature(row.Type, new GenericParamContext(declaringType2));
}
internal PropertyDefMD InitializeAll() {
MemberMDInitializer.Initialize(Attributes);
MemberMDInitializer.Initialize(Name);
MemberMDInitializer.Initialize(Type);
MemberMDInitializer.Initialize(Constant);
MemberMDInitializer.Initialize(CustomAttributes);
MemberMDInitializer.Initialize(GetMethod);
MemberMDInitializer.Initialize(SetMethod);
MemberMDInitializer.Initialize(OtherMethods);
MemberMDInitializer.Initialize(DeclaringType);
return this;
}
/// <inheritdoc/>
protected override void InitializePropertyMethods_NoLock() {
if (!(otherMethods is null))
return;
IList<MethodDef> newOtherMethods;
IList<MethodDef> newGetMethods, newSetMethods;
var dt = declaringType2 as TypeDefMD;
if (dt is null) {
newGetMethods = new List<MethodDef>();
newSetMethods = new List<MethodDef>();
newOtherMethods = new List<MethodDef>();
}
else
dt.InitializeProperty(this, out newGetMethods, out newSetMethods, out newOtherMethods);
getMethods = newGetMethods;
setMethods = newSetMethods;
// Must be initialized last
otherMethods = newOtherMethods;
}
}
}
| {
"pile_set_name": "Github"
} |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef OPENCV_HIST_COST_HPP
#define OPENCV_HIST_COST_HPP
#include "opencv2/imgproc.hpp"
namespace cv
{
//! @addtogroup shape
//! @{
/** @brief Abstract base class for histogram cost algorithms.
*/
class CV_EXPORTS_W HistogramCostExtractor : public Algorithm
{
public:
CV_WRAP virtual void buildCostMatrix(InputArray descriptors1, InputArray descriptors2, OutputArray costMatrix) = 0;
CV_WRAP virtual void setNDummies(int nDummies) = 0;
CV_WRAP virtual int getNDummies() const = 0;
CV_WRAP virtual void setDefaultCost(float defaultCost) = 0;
CV_WRAP virtual float getDefaultCost() const = 0;
};
/** @brief A norm based cost extraction. :
*/
class CV_EXPORTS_W NormHistogramCostExtractor : public HistogramCostExtractor
{
public:
CV_WRAP virtual void setNormFlag(int flag) = 0;
CV_WRAP virtual int getNormFlag() const = 0;
};
CV_EXPORTS_W Ptr<HistogramCostExtractor>
createNormHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f);
/** @brief An EMD based cost extraction. :
*/
class CV_EXPORTS_W EMDHistogramCostExtractor : public HistogramCostExtractor
{
public:
CV_WRAP virtual void setNormFlag(int flag) = 0;
CV_WRAP virtual int getNormFlag() const = 0;
};
CV_EXPORTS_W Ptr<HistogramCostExtractor>
createEMDHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f);
/** @brief An Chi based cost extraction. :
*/
class CV_EXPORTS_W ChiHistogramCostExtractor : public HistogramCostExtractor
{};
CV_EXPORTS_W Ptr<HistogramCostExtractor> createChiHistogramCostExtractor(int nDummies=25, float defaultCost=0.2f);
/** @brief An EMD-L1 based cost extraction. :
*/
class CV_EXPORTS_W EMDL1HistogramCostExtractor : public HistogramCostExtractor
{};
CV_EXPORTS_W Ptr<HistogramCostExtractor>
createEMDL1HistogramCostExtractor(int nDummies=25, float defaultCost=0.2f);
//! @}
} // cv
#endif
| {
"pile_set_name": "Github"
} |
/*
* Freescale SEC (talitos) device register and descriptor header defines
*
* Copyright (c) 2006-2011 Freescale Semiconductor, Inc.
*
* 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 of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#define TALITOS_TIMEOUT 100000
#define TALITOS1_MAX_DATA_LEN 32768
#define TALITOS2_MAX_DATA_LEN 65535
#define DESC_TYPE(desc_hdr) ((be32_to_cpu(desc_hdr) >> 3) & 0x1f)
#define PRIMARY_EU(desc_hdr) ((be32_to_cpu(desc_hdr) >> 28) & 0xf)
#define SECONDARY_EU(desc_hdr) ((be32_to_cpu(desc_hdr) >> 16) & 0xf)
/* descriptor pointer entry */
struct talitos_ptr {
union {
struct { /* SEC2 format */
__be16 len; /* length */
u8 j_extent; /* jump to sg link table and/or extent*/
u8 eptr; /* extended address */
};
struct { /* SEC1 format */
__be16 res;
__be16 len1; /* length */
};
};
__be32 ptr; /* address */
};
static const struct talitos_ptr zero_entry;
/* descriptor */
struct talitos_desc {
__be32 hdr; /* header high bits */
union {
__be32 hdr_lo; /* header low bits */
__be32 hdr1; /* header for SEC1 */
};
struct talitos_ptr ptr[7]; /* ptr/len pair array */
__be32 next_desc; /* next descriptor (SEC1) */
};
#define TALITOS_DESC_SIZE (sizeof(struct talitos_desc) - sizeof(__be32))
/**
* talitos_request - descriptor submission request
* @desc: descriptor pointer (kernel virtual)
* @dma_desc: descriptor's physical bus address
* @callback: whom to call when descriptor processing is done
* @context: caller context (optional)
*/
struct talitos_request {
struct talitos_desc *desc;
dma_addr_t dma_desc;
void (*callback) (struct device *dev, struct talitos_desc *desc,
void *context, int error);
void *context;
};
/* per-channel fifo management */
struct talitos_channel {
void __iomem *reg;
/* request fifo */
struct talitos_request *fifo;
/* number of requests pending in channel h/w fifo */
atomic_t submit_count ____cacheline_aligned;
/* request submission (head) lock */
spinlock_t head_lock ____cacheline_aligned;
/* index to next free descriptor request */
int head;
/* request release (tail) lock */
spinlock_t tail_lock ____cacheline_aligned;
/* index to next in-progress/done descriptor request */
int tail;
};
struct talitos_private {
struct device *dev;
struct platform_device *ofdev;
void __iomem *reg;
void __iomem *reg_deu;
void __iomem *reg_aesu;
void __iomem *reg_mdeu;
void __iomem *reg_afeu;
void __iomem *reg_rngu;
void __iomem *reg_pkeu;
void __iomem *reg_keu;
void __iomem *reg_crcu;
int irq[2];
/* SEC global registers lock */
spinlock_t reg_lock ____cacheline_aligned;
/* SEC version geometry (from device tree node) */
unsigned int num_channels;
unsigned int chfifo_len;
unsigned int exec_units;
unsigned int desc_types;
/* SEC Compatibility info */
unsigned long features;
/*
* length of the request fifo
* fifo_len is chfifo_len rounded up to next power of 2
* so we can use bitwise ops to wrap
*/
unsigned int fifo_len;
struct talitos_channel *chan;
/* next channel to be assigned next incoming descriptor */
atomic_t last_chan ____cacheline_aligned;
/* request callback tasklet */
struct tasklet_struct done_task[2];
/* list of registered algorithms */
struct list_head alg_list;
/* hwrng device */
struct hwrng rng;
bool rng_registered;
};
extern int talitos_submit(struct device *dev, int ch, struct talitos_desc *desc,
void (*callback)(struct device *dev,
struct talitos_desc *desc,
void *context, int error),
void *context);
/* .features flag */
#define TALITOS_FTR_SRC_LINK_TBL_LEN_INCLUDES_EXTENT 0x00000001
#define TALITOS_FTR_HW_AUTH_CHECK 0x00000002
#define TALITOS_FTR_SHA224_HWINIT 0x00000004
#define TALITOS_FTR_HMAC_OK 0x00000008
#define TALITOS_FTR_SEC1 0x00000010
/*
* If both CONFIG_CRYPTO_DEV_TALITOS1 and CONFIG_CRYPTO_DEV_TALITOS2 are
* defined, we check the features which are set according to the device tree.
* Otherwise, we answer true or false directly
*/
static inline bool has_ftr_sec1(struct talitos_private *priv)
{
#if defined(CONFIG_CRYPTO_DEV_TALITOS1) && defined(CONFIG_CRYPTO_DEV_TALITOS2)
return priv->features & TALITOS_FTR_SEC1 ? true : false;
#elif defined(CONFIG_CRYPTO_DEV_TALITOS1)
return true;
#else
return false;
#endif
}
/*
* TALITOS_xxx_LO addresses point to the low data bits (32-63) of the register
*/
#define ISR1_FORMAT(x) (((x) << 28) | ((x) << 16))
#define ISR2_FORMAT(x) (((x) << 4) | (x))
/* global register offset addresses */
#define TALITOS_MCR 0x1030 /* master control register */
#define TALITOS_MCR_RCA0 (1 << 15) /* remap channel 0 */
#define TALITOS_MCR_RCA1 (1 << 14) /* remap channel 1 */
#define TALITOS_MCR_RCA2 (1 << 13) /* remap channel 2 */
#define TALITOS_MCR_RCA3 (1 << 12) /* remap channel 3 */
#define TALITOS1_MCR_SWR 0x1000000 /* s/w reset */
#define TALITOS2_MCR_SWR 0x1 /* s/w reset */
#define TALITOS_MCR_LO 0x1034
#define TALITOS_IMR 0x1008 /* interrupt mask register */
/* enable channel IRQs */
#define TALITOS1_IMR_INIT ISR1_FORMAT(0xf)
#define TALITOS1_IMR_DONE ISR1_FORMAT(0x5) /* done IRQs */
/* enable channel IRQs */
#define TALITOS2_IMR_INIT (ISR2_FORMAT(0xf) | 0x10000)
#define TALITOS2_IMR_DONE ISR1_FORMAT(0x5) /* done IRQs */
#define TALITOS_IMR_LO 0x100C
#define TALITOS1_IMR_LO_INIT 0x2000000 /* allow RNGU error IRQs */
#define TALITOS2_IMR_LO_INIT 0x20000 /* allow RNGU error IRQs */
#define TALITOS_ISR 0x1010 /* interrupt status register */
#define TALITOS1_ISR_4CHERR ISR1_FORMAT(0xa) /* 4 ch errors mask */
#define TALITOS1_ISR_4CHDONE ISR1_FORMAT(0x5) /* 4 ch done mask */
#define TALITOS1_ISR_TEA_ERR 0x00000040
#define TALITOS2_ISR_4CHERR ISR2_FORMAT(0xa) /* 4 ch errors mask */
#define TALITOS2_ISR_4CHDONE ISR2_FORMAT(0x5) /* 4 ch done mask */
#define TALITOS2_ISR_CH_0_2_ERR ISR2_FORMAT(0x2) /* ch 0, 2 err mask */
#define TALITOS2_ISR_CH_0_2_DONE ISR2_FORMAT(0x1) /* ch 0, 2 done mask */
#define TALITOS2_ISR_CH_1_3_ERR ISR2_FORMAT(0x8) /* ch 1, 3 err mask */
#define TALITOS2_ISR_CH_1_3_DONE ISR2_FORMAT(0x4) /* ch 1, 3 done mask */
#define TALITOS_ISR_LO 0x1014
#define TALITOS_ICR 0x1018 /* interrupt clear register */
#define TALITOS_ICR_LO 0x101C
/* channel register address stride */
#define TALITOS_CH_BASE_OFFSET 0x1000 /* default channel map base */
#define TALITOS1_CH_STRIDE 0x1000
#define TALITOS2_CH_STRIDE 0x100
/* channel configuration register */
#define TALITOS_CCCR 0x8
#define TALITOS2_CCCR_CONT 0x2 /* channel continue on SEC2 */
#define TALITOS2_CCCR_RESET 0x1 /* channel reset on SEC2 */
#define TALITOS_CCCR_LO 0xc
#define TALITOS_CCCR_LO_IWSE 0x80 /* chan. ICCR writeback enab. */
#define TALITOS_CCCR_LO_EAE 0x20 /* extended address enable */
#define TALITOS_CCCR_LO_CDWE 0x10 /* chan. done writeback enab. */
#define TALITOS_CCCR_LO_NT 0x4 /* notification type */
#define TALITOS_CCCR_LO_CDIE 0x2 /* channel done IRQ enable */
#define TALITOS1_CCCR_LO_RESET 0x1 /* channel reset on SEC1 */
/* CCPSR: channel pointer status register */
#define TALITOS_CCPSR 0x10
#define TALITOS_CCPSR_LO 0x14
#define TALITOS_CCPSR_LO_DOF 0x8000 /* double FF write oflow error */
#define TALITOS_CCPSR_LO_SOF 0x4000 /* single FF write oflow error */
#define TALITOS_CCPSR_LO_MDTE 0x2000 /* master data transfer error */
#define TALITOS_CCPSR_LO_SGDLZ 0x1000 /* s/g data len zero error */
#define TALITOS_CCPSR_LO_FPZ 0x0800 /* fetch ptr zero error */
#define TALITOS_CCPSR_LO_IDH 0x0400 /* illegal desc hdr error */
#define TALITOS_CCPSR_LO_IEU 0x0200 /* invalid EU error */
#define TALITOS_CCPSR_LO_EU 0x0100 /* EU error detected */
#define TALITOS_CCPSR_LO_GB 0x0080 /* gather boundary error */
#define TALITOS_CCPSR_LO_GRL 0x0040 /* gather return/length error */
#define TALITOS_CCPSR_LO_SB 0x0020 /* scatter boundary error */
#define TALITOS_CCPSR_LO_SRL 0x0010 /* scatter return/length error */
/* channel fetch fifo register */
#define TALITOS_FF 0x48
#define TALITOS_FF_LO 0x4c
/* current descriptor pointer register */
#define TALITOS_CDPR 0x40
#define TALITOS_CDPR_LO 0x44
/* descriptor buffer register */
#define TALITOS_DESCBUF 0x80
#define TALITOS_DESCBUF_LO 0x84
/* gather link table */
#define TALITOS_GATHER 0xc0
#define TALITOS_GATHER_LO 0xc4
/* scatter link table */
#define TALITOS_SCATTER 0xe0
#define TALITOS_SCATTER_LO 0xe4
/* execution unit registers base */
#define TALITOS2_DEU 0x2000
#define TALITOS2_AESU 0x4000
#define TALITOS2_MDEU 0x6000
#define TALITOS2_AFEU 0x8000
#define TALITOS2_RNGU 0xa000
#define TALITOS2_PKEU 0xc000
#define TALITOS2_KEU 0xe000
#define TALITOS2_CRCU 0xf000
#define TALITOS12_AESU 0x4000
#define TALITOS12_DEU 0x5000
#define TALITOS12_MDEU 0x6000
#define TALITOS10_AFEU 0x8000
#define TALITOS10_DEU 0xa000
#define TALITOS10_MDEU 0xc000
#define TALITOS10_RNGU 0xe000
#define TALITOS10_PKEU 0x10000
#define TALITOS10_AESU 0x12000
/* execution unit interrupt status registers */
#define TALITOS_EUDSR 0x10 /* data size */
#define TALITOS_EUDSR_LO 0x14
#define TALITOS_EURCR 0x18 /* reset control*/
#define TALITOS_EURCR_LO 0x1c
#define TALITOS_EUSR 0x28 /* rng status */
#define TALITOS_EUSR_LO 0x2c
#define TALITOS_EUISR 0x30
#define TALITOS_EUISR_LO 0x34
#define TALITOS_EUICR 0x38 /* int. control */
#define TALITOS_EUICR_LO 0x3c
#define TALITOS_EU_FIFO 0x800 /* output FIFO */
#define TALITOS_EU_FIFO_LO 0x804 /* output FIFO */
/* DES unit */
#define TALITOS1_DEUICR_KPE 0x00200000 /* Key Parity Error */
/* message digest unit */
#define TALITOS_MDEUICR_LO_ICE 0x4000 /* integrity check IRQ enable */
/* random number unit */
#define TALITOS_RNGUSR_LO_RD 0x1 /* reset done */
#define TALITOS_RNGUSR_LO_OFL 0xff0000/* output FIFO length */
#define TALITOS_RNGURCR_LO_SR 0x1 /* software reset */
#define TALITOS_MDEU_CONTEXT_SIZE_MD5_SHA1_SHA256 0x28
#define TALITOS_MDEU_CONTEXT_SIZE_SHA384_SHA512 0x48
/*
* talitos descriptor header (hdr) bits
*/
/* written back when done */
#define DESC_HDR_DONE cpu_to_be32(0xff000000)
#define DESC_HDR_LO_ICCR1_MASK cpu_to_be32(0x00180000)
#define DESC_HDR_LO_ICCR1_PASS cpu_to_be32(0x00080000)
#define DESC_HDR_LO_ICCR1_FAIL cpu_to_be32(0x00100000)
/* primary execution unit select */
#define DESC_HDR_SEL0_MASK cpu_to_be32(0xf0000000)
#define DESC_HDR_SEL0_AFEU cpu_to_be32(0x10000000)
#define DESC_HDR_SEL0_DEU cpu_to_be32(0x20000000)
#define DESC_HDR_SEL0_MDEUA cpu_to_be32(0x30000000)
#define DESC_HDR_SEL0_MDEUB cpu_to_be32(0xb0000000)
#define DESC_HDR_SEL0_RNG cpu_to_be32(0x40000000)
#define DESC_HDR_SEL0_PKEU cpu_to_be32(0x50000000)
#define DESC_HDR_SEL0_AESU cpu_to_be32(0x60000000)
#define DESC_HDR_SEL0_KEU cpu_to_be32(0x70000000)
#define DESC_HDR_SEL0_CRCU cpu_to_be32(0x80000000)
/* primary execution unit mode (MODE0) and derivatives */
#define DESC_HDR_MODE0_ENCRYPT cpu_to_be32(0x00100000)
#define DESC_HDR_MODE0_AESU_CBC cpu_to_be32(0x00200000)
#define DESC_HDR_MODE0_AESU_CTR cpu_to_be32(0x00600000)
#define DESC_HDR_MODE0_DEU_CBC cpu_to_be32(0x00400000)
#define DESC_HDR_MODE0_DEU_3DES cpu_to_be32(0x00200000)
#define DESC_HDR_MODE0_MDEU_CONT cpu_to_be32(0x08000000)
#define DESC_HDR_MODE0_MDEU_INIT cpu_to_be32(0x01000000)
#define DESC_HDR_MODE0_MDEU_HMAC cpu_to_be32(0x00800000)
#define DESC_HDR_MODE0_MDEU_PAD cpu_to_be32(0x00400000)
#define DESC_HDR_MODE0_MDEU_SHA224 cpu_to_be32(0x00300000)
#define DESC_HDR_MODE0_MDEU_MD5 cpu_to_be32(0x00200000)
#define DESC_HDR_MODE0_MDEU_SHA256 cpu_to_be32(0x00100000)
#define DESC_HDR_MODE0_MDEU_SHA1 cpu_to_be32(0x00000000)
#define DESC_HDR_MODE0_MDEUB_SHA384 cpu_to_be32(0x00000000)
#define DESC_HDR_MODE0_MDEUB_SHA512 cpu_to_be32(0x00200000)
#define DESC_HDR_MODE0_MDEU_MD5_HMAC (DESC_HDR_MODE0_MDEU_MD5 | \
DESC_HDR_MODE0_MDEU_HMAC)
#define DESC_HDR_MODE0_MDEU_SHA256_HMAC (DESC_HDR_MODE0_MDEU_SHA256 | \
DESC_HDR_MODE0_MDEU_HMAC)
#define DESC_HDR_MODE0_MDEU_SHA1_HMAC (DESC_HDR_MODE0_MDEU_SHA1 | \
DESC_HDR_MODE0_MDEU_HMAC)
/* secondary execution unit select (SEL1) */
#define DESC_HDR_SEL1_MASK cpu_to_be32(0x000f0000)
#define DESC_HDR_SEL1_MDEUA cpu_to_be32(0x00030000)
#define DESC_HDR_SEL1_MDEUB cpu_to_be32(0x000b0000)
#define DESC_HDR_SEL1_CRCU cpu_to_be32(0x00080000)
/* secondary execution unit mode (MODE1) and derivatives */
#define DESC_HDR_MODE1_MDEU_CICV cpu_to_be32(0x00004000)
#define DESC_HDR_MODE1_MDEU_INIT cpu_to_be32(0x00001000)
#define DESC_HDR_MODE1_MDEU_HMAC cpu_to_be32(0x00000800)
#define DESC_HDR_MODE1_MDEU_PAD cpu_to_be32(0x00000400)
#define DESC_HDR_MODE1_MDEU_SHA224 cpu_to_be32(0x00000300)
#define DESC_HDR_MODE1_MDEU_MD5 cpu_to_be32(0x00000200)
#define DESC_HDR_MODE1_MDEU_SHA256 cpu_to_be32(0x00000100)
#define DESC_HDR_MODE1_MDEU_SHA1 cpu_to_be32(0x00000000)
#define DESC_HDR_MODE1_MDEUB_SHA384 cpu_to_be32(0x00000000)
#define DESC_HDR_MODE1_MDEUB_SHA512 cpu_to_be32(0x00000200)
#define DESC_HDR_MODE1_MDEU_MD5_HMAC (DESC_HDR_MODE1_MDEU_MD5 | \
DESC_HDR_MODE1_MDEU_HMAC)
#define DESC_HDR_MODE1_MDEU_SHA256_HMAC (DESC_HDR_MODE1_MDEU_SHA256 | \
DESC_HDR_MODE1_MDEU_HMAC)
#define DESC_HDR_MODE1_MDEU_SHA1_HMAC (DESC_HDR_MODE1_MDEU_SHA1 | \
DESC_HDR_MODE1_MDEU_HMAC)
#define DESC_HDR_MODE1_MDEU_SHA224_HMAC (DESC_HDR_MODE1_MDEU_SHA224 | \
DESC_HDR_MODE1_MDEU_HMAC)
#define DESC_HDR_MODE1_MDEUB_SHA384_HMAC (DESC_HDR_MODE1_MDEUB_SHA384 | \
DESC_HDR_MODE1_MDEU_HMAC)
#define DESC_HDR_MODE1_MDEUB_SHA512_HMAC (DESC_HDR_MODE1_MDEUB_SHA512 | \
DESC_HDR_MODE1_MDEU_HMAC)
/* direction of overall data flow (DIR) */
#define DESC_HDR_DIR_INBOUND cpu_to_be32(0x00000002)
/* request done notification (DN) */
#define DESC_HDR_DONE_NOTIFY cpu_to_be32(0x00000001)
/* descriptor types */
#define DESC_HDR_TYPE_AESU_CTR_NONSNOOP cpu_to_be32(0 << 3)
#define DESC_HDR_TYPE_IPSEC_ESP cpu_to_be32(1 << 3)
#define DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU cpu_to_be32(2 << 3)
#define DESC_HDR_TYPE_HMAC_SNOOP_NO_AFEU cpu_to_be32(4 << 3)
/* link table extent field bits */
#define DESC_PTR_LNKTBL_JUMP 0x80
#define DESC_PTR_LNKTBL_RETURN 0x02
#define DESC_PTR_LNKTBL_NEXT 0x01
| {
"pile_set_name": "Github"
} |
--TEST--
Check xsltprocessor::registerPHPFunctions with string
--SKIPIF--
<?php
if (!extension_loaded('xsl')) {
die("skip\n");
}
?>
--FILE--
<?php
include __DIR__ .'/prepare.inc';
$phpfuncxsl = new domDocument();
$phpfuncxsl->load(__DIR__."/phpfunc.xsl");
if(!$phpfuncxsl) {
echo "Error while parsing the xsl document\n";
exit;
}
$proc->importStylesheet($phpfuncxsl);
var_dump($proc->registerPHPFunctions('ucwords'));
var_dump($proc->transformToXml($dom));
?>
--EXPECT--
NULL
string(18) "This Is An Example"
--CREDITS--
Christian Weiske, [email protected]
PHP Testfest Berlin 2009-05-09
| {
"pile_set_name": "Github"
} |
#include <3ds.h>
#include "action.h"
#include "../resources.h"
#include "../task/uitask.h"
#include "../../core/core.h"
static void action_launch_title_update(ui_view* view, void* data, float* progress, char* text) {
title_info* info = (title_info*) data;
Result res = 0;
if(R_SUCCEEDED(res = APT_PrepareToDoApplicationJump(0, info->titleId, info->mediaType))) {
u8 param[0x300];
u8 hmac[0x20];
res = APT_DoApplicationJump(param, sizeof(param), hmac);
}
if(R_FAILED(res)) {
ui_pop();
info_destroy(view);
error_display_res(info, task_draw_title_info, res, "Failed to launch title.");
}
}
static void action_launch_title_onresponse(ui_view* view, void* data, u32 response) {
if(response == PROMPT_YES) {
info_display("Launching Title", "", false, data, action_launch_title_update, task_draw_title_info);
}
}
void action_launch_title(linked_list* items, list_item* selected) {
prompt_display_yes_no("Confirmation", "Launch the selected title?", COLOR_TEXT, selected->data, task_draw_title_info, action_launch_title_onresponse);
} | {
"pile_set_name": "Github"
} |
/*
* Copyright 2007-2008 Sun Microsystems, 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 list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Sun Microsystems nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.sun.swingset3.demos.spinner;
import javax.swing.*;
import java.awt.*;
/**
* @author Mikhail Lapshin
*/
public class JPaletteShower extends JComponent {
private Palette palette;
public JPaletteShower(Palette palette, int width, int height) {
setPreferredSize(new Dimension(width, height));
setMinimumSize(new Dimension(width, height));
this.palette = palette;
}
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
int w = getSize().width;
int h = getSize().height;
int maxIndex = palette.getSize() - 1;
double rate = (double) maxIndex / w;
for (int x = 0; x < w; x++) {
g.setColor(palette.getColor((int) (x * rate)));
g.fillRect(x, 0, 1, h);
}
}
public Palette getPalette() {
return palette;
}
public void setPalette(Palette palette) {
this.palette = palette;
repaint();
}
}
| {
"pile_set_name": "Github"
} |
-- chest (5) in level smallcrypt
onLoot = function(W)
local enemyData = {
id = 22,
loot = {
{id="fo_greaterhealingpotion", amount=1},
},
position = {x=2250, y=610}
}
local enemyData2 = {
id = 22,
loot = {
{id="gold", amount=10},
},
position = {x=2170, y=610}
}
W:spawnEnemy(enemyData)
W:spawnEnemy(enemyData2)
end
| {
"pile_set_name": "Github"
} |
# MyApp
This project was generated with [Angular CLI](https://github.com/angular/angular-spa).
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-spa/blob/master/README.md).
| {
"pile_set_name": "Github"
} |
<?php
use Illuminate\Database\Seeder;
class ShopGoodsGalleryTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('shop_goods_gallery')->delete();
}
} | {
"pile_set_name": "Github"
} |
C
C $Id: skpblk.f,v 1.4 2008-07-27 12:23:44 haley Exp $
C
C Copyright (C) 1997
C University Corporation for Atmospheric Research
C All Rights Reserved
C
C The use of this Software is governed by a License Agreement.
C
SUBROUTINE SKPBLK(IOS, STATUS)
C
C Position the buffer pointer to point at the next non-blank
C character in the file.
C
C
C OUTPUT
C IOS -- I/O status flag. This flag is valid only
C if STATUS indicates an error.
C STATUS -- The error status as defined in COMMON CAPERR.
C
C
COMMON /CAPERR/ ALLOK, EOFFL, INTERR, MAXINT, PLBERR, PMBERR,
1 FABERR, TXBERR, FLTERR, MAXFLT, NOTINT, SIZERR,
2 UNDASC, DEVERR, DOCERR, TBLERR , STSZER, ENTERR,
3 TABERR, TABSER, PRSFIL
INTEGER ALLOK, EOFFL, INTERR, MAXINT, PLBERR, PMBERR,
1 FABERR, TXBERR, FLTERR, MAXFLT, NOTINT, SIZERR, UNDASC,
2 DEVERR, DOCERR, STSZER, ENTERR, TABERR, TABSER, TBLERR,
3 PRSFIL
COMMON /CAPIOB/ UNIT, IPTR, LSIZE, NFST, NFLG
COMMON /CAPIO2/ LINE, GRNM
INTEGER LNMAX
PARAMETER (LNMAX=80)
CHARACTER*80 LINE
CHARACTER*80 GRNM
INTEGER UNIT, IPTR, LSIZE, NFST, NFLG
C
INTEGER IOS, STATUS
CHARACTER*1 BLANK
INTEGER II
C
DATA BLANK/' '/
C
C Scan the current buffer for a non-blank.
C
10 CONTINUE
DO 20 II = IPTR,LSIZE
IF (LINE(II:II) .NE. BLANK) THEN
C
C Non-blank found.
C
IPTR = II
RETURN
END IF
20 CONTINUE
C
C End of current buffer and no non-blank, get another line.
C
CALL RDLINE (IOS, STATUS)
C
C Return if EOF or bad read.
C
IF (STATUS.NE.ALLOK) RETURN
C
C Go back and scan this line.
C
GO TO 10
C
END
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "gc/parallel/gcAdaptivePolicyCounters.hpp"
#include "memory/resourceArea.hpp"
// This class keeps statistical information and computes the
// size of the heap.
GCAdaptivePolicyCounters::GCAdaptivePolicyCounters(const char* name,
int collectors,
int generations,
AdaptiveSizePolicy* size_policy_arg)
: GCPolicyCounters(name, collectors, generations),
_size_policy(size_policy_arg) {
if (UsePerfData) {
EXCEPTION_MARK;
ResourceMark rm;
const char* cname = PerfDataManager::counter_name(name_space(), "edenSize");
_eden_size_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, _size_policy->calculated_eden_size_in_bytes(), CHECK);
cname = PerfDataManager::counter_name(name_space(), "promoSize");
_promo_size_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, size_policy()->calculated_promo_size_in_bytes(),
CHECK);
cname = PerfDataManager::counter_name(name_space(), "youngCapacity");
size_t young_capacity_in_bytes =
_size_policy->calculated_eden_size_in_bytes() +
_size_policy->calculated_survivor_size_in_bytes();
_young_capacity_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, young_capacity_in_bytes, CHECK);
cname = PerfDataManager::counter_name(name_space(), "avgSurvivedAvg");
_avg_survived_avg_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, size_policy()->calculated_survivor_size_in_bytes(),
CHECK);
cname = PerfDataManager::counter_name(name_space(), "avgSurvivedDev");
_avg_survived_dev_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, (jlong) 0 , CHECK);
cname = PerfDataManager::counter_name(name_space(), "avgSurvivedPaddedAvg");
_avg_survived_padded_avg_counter =
PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Bytes,
size_policy()->calculated_survivor_size_in_bytes(), CHECK);
cname = PerfDataManager::counter_name(name_space(), "avgMinorPauseTime");
_avg_minor_pause_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Ticks, (jlong) _size_policy->_avg_minor_pause->average(),
CHECK);
cname = PerfDataManager::counter_name(name_space(), "avgMinorIntervalTime");
_avg_minor_interval_counter = PerfDataManager::create_variable(SUN_GC,
cname,
PerfData::U_Ticks,
(jlong) _size_policy->_avg_minor_interval->average(),
CHECK);
#ifdef NOT_PRODUCT
// This is a counter for the most recent minor pause time
// (the last sample, not the average). It is useful for
// verifying the average pause time but not worth putting
// into the product.
cname = PerfDataManager::counter_name(name_space(), "minorPauseTime");
_minor_pause_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Ticks, (jlong) _size_policy->_avg_minor_pause->last_sample(),
CHECK);
#endif
cname = PerfDataManager::counter_name(name_space(), "minorGcCost");
_minor_gc_cost_counter = PerfDataManager::create_variable(SUN_GC,
cname,
PerfData::U_Ticks,
(jlong) _size_policy->minor_gc_cost(),
CHECK);
cname = PerfDataManager::counter_name(name_space(), "mutatorCost");
_mutator_cost_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Ticks, (jlong) _size_policy->mutator_cost(), CHECK);
cname = PerfDataManager::counter_name(name_space(), "survived");
_survived_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, (jlong) 0, CHECK);
cname = PerfDataManager::counter_name(name_space(), "promoted");
_promoted_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, (jlong) 0, CHECK);
cname = PerfDataManager::counter_name(name_space(), "avgYoungLive");
_avg_young_live_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, (jlong) size_policy()->avg_young_live()->average(),
CHECK);
cname = PerfDataManager::counter_name(name_space(), "avgOldLive");
_avg_old_live_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, (jlong) size_policy()->avg_old_live()->average(),
CHECK);
cname = PerfDataManager::counter_name(name_space(), "survivorOverflowed");
_survivor_overflowed_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Events, (jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(),
"decrementTenuringThresholdForGcCost");
_decrement_tenuring_threshold_for_gc_cost_counter =
PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events,
(jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(),
"incrementTenuringThresholdForGcCost");
_increment_tenuring_threshold_for_gc_cost_counter =
PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events,
(jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(),
"decrementTenuringThresholdForSurvivorLimit");
_decrement_tenuring_threshold_for_survivor_limit_counter =
PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events,
(jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(),
"changeYoungGenForMinPauses");
_change_young_gen_for_min_pauses_counter =
PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events,
(jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(),
"changeOldGenForMajPauses");
_change_old_gen_for_maj_pauses_counter =
PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events,
(jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(),
"increaseOldGenForThroughput");
_change_old_gen_for_throughput_counter =
PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events,
(jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(),
"increaseYoungGenForThroughput");
_change_young_gen_for_throughput_counter =
PerfDataManager::create_variable(SUN_GC, cname, PerfData::U_Events,
(jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(),
"decreaseForFootprint");
_decrease_for_footprint_counter =
PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Events, (jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(), "decideAtFullGc");
_decide_at_full_gc_counter = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_None, (jlong)0, CHECK);
cname = PerfDataManager::counter_name(name_space(), "minorPauseYoungSlope");
_minor_pause_young_slope_counter =
PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_None, (jlong) 0, CHECK);
cname = PerfDataManager::counter_name(name_space(), "majorCollectionSlope");
_major_collection_slope_counter =
PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_None, (jlong) 0, CHECK);
cname = PerfDataManager::counter_name(name_space(), "minorCollectionSlope");
_minor_collection_slope_counter =
PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_None, (jlong) 0, CHECK);
}
}
void GCAdaptivePolicyCounters::update_counters_from_policy() {
if (UsePerfData && (size_policy() != NULL)) {
update_avg_minor_pause_counter();
update_avg_minor_interval_counter();
#ifdef NOT_PRODUCT
update_minor_pause_counter();
#endif
update_minor_gc_cost_counter();
update_avg_young_live_counter();
update_survivor_size_counters();
update_avg_survived_avg_counters();
update_avg_survived_dev_counters();
update_avg_survived_padded_avg_counters();
update_change_old_gen_for_throughput();
update_change_young_gen_for_throughput();
update_decrease_for_footprint();
update_change_young_gen_for_min_pauses();
update_change_old_gen_for_maj_pauses();
update_minor_pause_young_slope_counter();
update_minor_collection_slope_counter();
update_major_collection_slope_counter();
}
}
void GCAdaptivePolicyCounters::update_counters() {
if (UsePerfData) {
update_counters_from_policy();
}
}
| {
"pile_set_name": "Github"
} |
# -*- coding: utf-8 -*-
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('make_payments', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='makepayment',
name='reference_number',
field=models.CharField(default='', max_length=20, blank=True),
),
]
| {
"pile_set_name": "Github"
} |
package org.bukkit.command.defaults;
import com.google.common.collect.ImmutableList;
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import java.util.List;
public class SetIdleTimeoutCommand extends VanillaCommand {
public SetIdleTimeoutCommand() {
super("setidletimeout");
this.description = "Sets the server's idle timeout";
this.usageMessage = "/setidletimeout <Minutes until kick>";
this.setPermission("bukkit.command.setidletimeout");
}
@Override
public boolean execute(CommandSender sender, String currentAlias, String[] args) {
if (!testPermission(sender)) return true;
if (args.length == 1) {
int minutes;
try {
minutes = getInteger(sender, args[0], 0, Integer.MAX_VALUE, true);
} catch (NumberFormatException ex) {
sender.sendMessage(ex.getMessage());
return true;
}
Bukkit.getServer().setIdleTimeout(minutes);
Command.broadcastCommandMessage(sender, "Successfully set the idle timeout to " + minutes + " minutes.");
return true;
}
sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
return false;
}
@Override
public List<String> tabComplete(CommandSender sender, String alias, String[] args) {
Validate.notNull(sender, "Sender cannot be null");
Validate.notNull(args, "Arguments cannot be null");
Validate.notNull(alias, "Alias cannot be null");
return ImmutableList.of();
}
}
| {
"pile_set_name": "Github"
} |
'use strict'
const t = require('tap')
const { join } = require('path')
const { fork } = require('child_process')
const { once } = require('./helper')
const pino = require('..')
function test (file) {
file = join('fixtures', 'broken-pipe', file)
t.test(file, { parallel: true }, async ({ is }) => {
const child = fork(join(__dirname, file), { silent: true })
child.stdout.destroy()
child.stderr.pipe(process.stdout)
const res = await once(child, 'close')
is(res, 0) // process exits successfully
})
}
t.jobs = 42
test('basic.js')
test('destination.js')
test('syncfalse.js')
t.test('let error pass through', ({ is, plan }) => {
plan(3)
const stream = pino.destination()
// side effect of the pino constructor is that it will set an
// event handler for error
pino(stream)
process.nextTick(() => stream.emit('error', new Error('kaboom')))
process.nextTick(() => stream.emit('error', new Error('kaboom')))
stream.on('error', (err) => {
is(err.message, 'kaboom')
})
})
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>background</title>
<!-- <script src="background.js"></script> -->
</head>
<body></body>
</html>
| {
"pile_set_name": "Github"
} |
MODULE_TOPDIR = ../..
PGM = r.in.mat
LIBES = $(RASTERLIB) $(GISLIB)
DEPENDENCIES = $(RASTERDEP) $(GISDEP)
include $(MODULE_TOPDIR)/include/Make/Module.make
default: cmd
| {
"pile_set_name": "Github"
} |
<!doctype html>
<title>CodeMirror: RPM changes mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../../lib/codemirror.css">
<script src="../../../lib/codemirror.js"></script>
<script src="changes.js"></script>
<link rel="stylesheet" href="../../../doc/docs.css">
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../../doc/logo.png"></a>
<ul>
<li><a href="../../../index.html">Home</a>
<li><a href="../../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../../index.html">Language modes</a>
<li><a class=active href="#">RPM changes</a>
</ul>
</div>
<article>
<h2>RPM changes mode</h2>
<div><textarea id="code" name="code">
-------------------------------------------------------------------
Tue Oct 18 13:58:40 UTC 2011 - [email protected]
- Update to r60.3
- Fixes bug in the reflect package
* disallow Interface method on Value obtained via unexported name
-------------------------------------------------------------------
Thu Oct 6 08:14:24 UTC 2011 - [email protected]
- Update to r60.2
- Fixes memory leak in certain map types
-------------------------------------------------------------------
Wed Oct 5 14:34:10 UTC 2011 - [email protected]
- Tweaks for gdb debugging
- go.spec changes:
- move %go_arch definition to %prep section
- pass correct location of go specific gdb pretty printer and
functions to cpp as HOST_EXTRA_CFLAGS macro
- install go gdb functions & printer
- gdb-printer.patch
- patch linker (src/cmd/ld/dwarf.c) to emit correct location of go
gdb functions and pretty printer
</textarea></div>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
mode: {name: "changes"},
lineNumbers: true,
indentUnit: 4
});
</script>
<p><strong>MIME types defined:</strong> <code>text/x-rpm-changes</code>.</p>
</article>
| {
"pile_set_name": "Github"
} |
ace.define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var DiffHighlightRules = function() {
this.$rules = {
"start" : [{
regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$",
token: "punctuation.definition.separator.diff",
"name": "keyword"
}, { //diff.range.unified
regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$",
token: [
"constant",
"constant.numeric",
"constant",
"comment.doc.tag"
]
}, { //diff.range.normal
regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",
token: [
"constant.numeric",
"punctuation.definition.range.diff",
"constant.function",
"constant.numeric",
"punctuation.definition.range.diff",
"invalid"
],
"name": "meta."
}, {
regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$",
token: [
"constant.numeric",
"meta.tag"
]
}, { // added
regex: "^([!+>])(.*?)(\\s*)$",
token: [
"support.constant",
"text",
"invalid"
]
}, { // removed
regex: "^([<\\-])(.*?)(\\s*)$",
token: [
"support.function",
"string",
"invalid"
]
}, {
regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
token: ["variable", "variable", "keyword", "variable"]
}, {
regex: "^Index.+$",
token: "variable"
}, {
regex: "^\\s+$",
token: "text"
}, {
regex: "\\s*$",
token: "invalid"
}, {
defaultToken: "invisible",
caseInsensitive: true
}
]
};
};
oop.inherits(DiffHighlightRules, TextHighlightRules);
exports.DiffHighlightRules = DiffHighlightRules;
});
ace.define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
"use strict";
var oop = require("../../lib/oop");
var BaseFoldMode = require("./fold_mode").FoldMode;
var Range = require("../../range").Range;
var FoldMode = exports.FoldMode = function(levels, flag) {
this.regExpList = levels;
this.flag = flag;
this.foldingStartMarker = RegExp("^(" + levels.join("|") + ")", this.flag);
};
oop.inherits(FoldMode, BaseFoldMode);
(function() {
this.getFoldWidgetRange = function(session, foldStyle, row) {
var line = session.getLine(row);
var start = {row: row, column: line.length};
var regList = this.regExpList;
for (var i = 1; i <= regList.length; i++) {
var re = RegExp("^(" + regList.slice(0, i).join("|") + ")", this.flag);
if (re.test(line))
break;
}
for (var l = session.getLength(); ++row < l; ) {
line = session.getLine(row);
if (re.test(line))
break;
}
if (row == start.row + 1)
return;
return Range.fromPoints(start, {row: row - 1, column: line.length});
};
}).call(FoldMode.prototype);
});
ace.define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextMode = require("./text").Mode;
var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules;
var FoldMode = require("./folding/diff").FoldMode;
var Mode = function() {
this.HighlightRules = HighlightRules;
this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i");
};
oop.inherits(Mode, TextMode);
(function() {
this.$id = "ace/mode/diff";
}).call(Mode.prototype);
exports.Mode = Mode;
});
| {
"pile_set_name": "Github"
} |
::
:: 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
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
::
::
:: Build script example for inside the windows docker container
::
:: C:\build is the out-of-tree build directory
:: C:\install is the location where artifacts are placed
:: C:\thrift is where the sources are
::
:: Make and go into the out-of-tree directory
IF NOT EXIST C:\build (MKDIR C:\build)
cd c:\build
:: Generate the out-of-tree build files
cmake^
-DBOOST_ROOT=C:\Libraries\boost_1_69_0^
-DBOOST_LIBRARYDIR=C:\Libraries\boost_1_69_0\lib64-msvc-14.1^
-DFLEX_HOME=C:\Adobe\Flex\SDK\4.6^
-DLIBEVENT_ROOT=C:\Libraries\libevent-2.1.8^
-DZLIB_ROOT=C:\Libraries\zlib-1.2.11^
-DCMAKE_BUILD_TYPE=Release^
-DCMAKE_INSTALL_PREFIX=C:\install^
c:\thrift || EXIT /B
:: Build
cmake --build . --config Release || EXIT /B
:: Test
cmake --build . --target check || EXIT /B
:: Install
cmake --build . --target install
| {
"pile_set_name": "Github"
} |
#pragma once
#include <vector_types.h>
#include "core/warp_solver/solver_constants.h"
namespace surfelwarp {
//The huber wight used in reweigted least square optimization, currently
//this weight is only applied to sparse feature term as there might be outliers.
__host__ __device__ __forceinline__ float compute_huber_weight(
float residual,
float residual_cutoff
) {
const float residual_abs = fabsf(residual);
if(residual_abs < residual_cutoff) {
return 1.0f;
}
else {
return residual_cutoff / residual_abs;
}
}
__host__ __device__ __forceinline__ float compute_feature_huber_weight(float residual) {
return compute_huber_weight(residual, 4e-2f);
}
} // namespace surfelwarp | {
"pile_set_name": "Github"
} |
# Blocks-13.0.0.txt
# Date: 2019-07-10, 19:06:00 GMT [KW]
# © 2019 Unicode®, Inc.
# For terms of use, see http://www.unicode.org/terms_of_use.html
#
# Unicode Character Database
# For documentation, see http://www.unicode.org/reports/tr44/
#
# Format:
# Start Code..End Code; Block Name
# ================================================
# Note: When comparing block names, casing, whitespace, hyphens,
# and underbars are ignored.
# For example, "Latin Extended-A" and "latin extended a" are equivalent.
# For more information on the comparison of property values,
# see UAX #44: http://www.unicode.org/reports/tr44/
#
# All block ranges start with a value where (cp MOD 16) = 0,
# and end with a value where (cp MOD 16) = 15. In other words,
# the last hexadecimal digit of the start of range is ...0
# and the last hexadecimal digit of the end of range is ...F.
# This constraint on block ranges guarantees that allocations
# are done in terms of whole columns, and that code chart display
# never involves splitting columns in the charts.
#
# All code points not explicitly listed for Block
# have the value No_Block.
# Property: Block
#
# @missing: 0000..10FFFF; No_Block
0000..007F; Basic Latin
0080..00FF; Latin-1 Supplement
0100..017F; Latin Extended-A
0180..024F; Latin Extended-B
0250..02AF; IPA Extensions
02B0..02FF; Spacing Modifier Letters
0300..036F; Combining Diacritical Marks
0370..03FF; Greek and Coptic
0400..04FF; Cyrillic
0500..052F; Cyrillic Supplement
0530..058F; Armenian
0590..05FF; Hebrew
0600..06FF; Arabic
0700..074F; Syriac
0750..077F; Arabic Supplement
0780..07BF; Thaana
07C0..07FF; NKo
0800..083F; Samaritan
0840..085F; Mandaic
0860..086F; Syriac Supplement
08A0..08FF; Arabic Extended-A
0900..097F; Devanagari
0980..09FF; Bengali
0A00..0A7F; Gurmukhi
0A80..0AFF; Gujarati
0B00..0B7F; Oriya
0B80..0BFF; Tamil
0C00..0C7F; Telugu
0C80..0CFF; Kannada
0D00..0D7F; Malayalam
0D80..0DFF; Sinhala
0E00..0E7F; Thai
0E80..0EFF; Lao
0F00..0FFF; Tibetan
1000..109F; Myanmar
10A0..10FF; Georgian
1100..11FF; Hangul Jamo
1200..137F; Ethiopic
1380..139F; Ethiopic Supplement
13A0..13FF; Cherokee
1400..167F; Unified Canadian Aboriginal Syllabics
1680..169F; Ogham
16A0..16FF; Runic
1700..171F; Tagalog
1720..173F; Hanunoo
1740..175F; Buhid
1760..177F; Tagbanwa
1780..17FF; Khmer
1800..18AF; Mongolian
18B0..18FF; Unified Canadian Aboriginal Syllabics Extended
1900..194F; Limbu
1950..197F; Tai Le
1980..19DF; New Tai Lue
19E0..19FF; Khmer Symbols
1A00..1A1F; Buginese
1A20..1AAF; Tai Tham
1AB0..1AFF; Combining Diacritical Marks Extended
1B00..1B7F; Balinese
1B80..1BBF; Sundanese
1BC0..1BFF; Batak
1C00..1C4F; Lepcha
1C50..1C7F; Ol Chiki
1C80..1C8F; Cyrillic Extended-C
1C90..1CBF; Georgian Extended
1CC0..1CCF; Sundanese Supplement
1CD0..1CFF; Vedic Extensions
1D00..1D7F; Phonetic Extensions
1D80..1DBF; Phonetic Extensions Supplement
1DC0..1DFF; Combining Diacritical Marks Supplement
1E00..1EFF; Latin Extended Additional
1F00..1FFF; Greek Extended
2000..206F; General Punctuation
2070..209F; Superscripts and Subscripts
20A0..20CF; Currency Symbols
20D0..20FF; Combining Diacritical Marks for Symbols
2100..214F; Letterlike Symbols
2150..218F; Number Forms
2190..21FF; Arrows
2200..22FF; Mathematical Operators
2300..23FF; Miscellaneous Technical
2400..243F; Control Pictures
2440..245F; Optical Character Recognition
2460..24FF; Enclosed Alphanumerics
2500..257F; Box Drawing
2580..259F; Block Elements
25A0..25FF; Geometric Shapes
2600..26FF; Miscellaneous Symbols
2700..27BF; Dingbats
27C0..27EF; Miscellaneous Mathematical Symbols-A
27F0..27FF; Supplemental Arrows-A
2800..28FF; Braille Patterns
2900..297F; Supplemental Arrows-B
2980..29FF; Miscellaneous Mathematical Symbols-B
2A00..2AFF; Supplemental Mathematical Operators
2B00..2BFF; Miscellaneous Symbols and Arrows
2C00..2C5F; Glagolitic
2C60..2C7F; Latin Extended-C
2C80..2CFF; Coptic
2D00..2D2F; Georgian Supplement
2D30..2D7F; Tifinagh
2D80..2DDF; Ethiopic Extended
2DE0..2DFF; Cyrillic Extended-A
2E00..2E7F; Supplemental Punctuation
2E80..2EFF; CJK Radicals Supplement
2F00..2FDF; Kangxi Radicals
2FF0..2FFF; Ideographic Description Characters
3000..303F; CJK Symbols and Punctuation
3040..309F; Hiragana
30A0..30FF; Katakana
3100..312F; Bopomofo
3130..318F; Hangul Compatibility Jamo
3190..319F; Kanbun
31A0..31BF; Bopomofo Extended
31C0..31EF; CJK Strokes
31F0..31FF; Katakana Phonetic Extensions
3200..32FF; Enclosed CJK Letters and Months
3300..33FF; CJK Compatibility
3400..4DBF; CJK Unified Ideographs Extension A
4DC0..4DFF; Yijing Hexagram Symbols
4E00..9FFF; CJK Unified Ideographs
A000..A48F; Yi Syllables
A490..A4CF; Yi Radicals
A4D0..A4FF; Lisu
A500..A63F; Vai
A640..A69F; Cyrillic Extended-B
A6A0..A6FF; Bamum
A700..A71F; Modifier Tone Letters
A720..A7FF; Latin Extended-D
A800..A82F; Syloti Nagri
A830..A83F; Common Indic Number Forms
A840..A87F; Phags-pa
A880..A8DF; Saurashtra
A8E0..A8FF; Devanagari Extended
A900..A92F; Kayah Li
A930..A95F; Rejang
A960..A97F; Hangul Jamo Extended-A
A980..A9DF; Javanese
A9E0..A9FF; Myanmar Extended-B
AA00..AA5F; Cham
AA60..AA7F; Myanmar Extended-A
AA80..AADF; Tai Viet
AAE0..AAFF; Meetei Mayek Extensions
AB00..AB2F; Ethiopic Extended-A
AB30..AB6F; Latin Extended-E
AB70..ABBF; Cherokee Supplement
ABC0..ABFF; Meetei Mayek
AC00..D7AF; Hangul Syllables
D7B0..D7FF; Hangul Jamo Extended-B
D800..DB7F; High Surrogates
DB80..DBFF; High Private Use Surrogates
DC00..DFFF; Low Surrogates
E000..F8FF; Private Use Area
F900..FAFF; CJK Compatibility Ideographs
FB00..FB4F; Alphabetic Presentation Forms
FB50..FDFF; Arabic Presentation Forms-A
FE00..FE0F; Variation Selectors
FE10..FE1F; Vertical Forms
FE20..FE2F; Combining Half Marks
FE30..FE4F; CJK Compatibility Forms
FE50..FE6F; Small Form Variants
FE70..FEFF; Arabic Presentation Forms-B
FF00..FFEF; Halfwidth and Fullwidth Forms
FFF0..FFFF; Specials
10000..1007F; Linear B Syllabary
10080..100FF; Linear B Ideograms
10100..1013F; Aegean Numbers
10140..1018F; Ancient Greek Numbers
10190..101CF; Ancient Symbols
101D0..101FF; Phaistos Disc
10280..1029F; Lycian
102A0..102DF; Carian
102E0..102FF; Coptic Epact Numbers
10300..1032F; Old Italic
10330..1034F; Gothic
10350..1037F; Old Permic
10380..1039F; Ugaritic
103A0..103DF; Old Persian
10400..1044F; Deseret
10450..1047F; Shavian
10480..104AF; Osmanya
104B0..104FF; Osage
10500..1052F; Elbasan
10530..1056F; Caucasian Albanian
10600..1077F; Linear A
10800..1083F; Cypriot Syllabary
10840..1085F; Imperial Aramaic
10860..1087F; Palmyrene
10880..108AF; Nabataean
108E0..108FF; Hatran
10900..1091F; Phoenician
10920..1093F; Lydian
10980..1099F; Meroitic Hieroglyphs
109A0..109FF; Meroitic Cursive
10A00..10A5F; Kharoshthi
10A60..10A7F; Old South Arabian
10A80..10A9F; Old North Arabian
10AC0..10AFF; Manichaean
10B00..10B3F; Avestan
10B40..10B5F; Inscriptional Parthian
10B60..10B7F; Inscriptional Pahlavi
10B80..10BAF; Psalter Pahlavi
10C00..10C4F; Old Turkic
10C80..10CFF; Old Hungarian
10D00..10D3F; Hanifi Rohingya
10E60..10E7F; Rumi Numeral Symbols
10E80..10EBF; Yezidi
10F00..10F2F; Old Sogdian
10F30..10F6F; Sogdian
10FB0..10FDF; Chorasmian
10FE0..10FFF; Elymaic
11000..1107F; Brahmi
11080..110CF; Kaithi
110D0..110FF; Sora Sompeng
11100..1114F; Chakma
11150..1117F; Mahajani
11180..111DF; Sharada
111E0..111FF; Sinhala Archaic Numbers
11200..1124F; Khojki
11280..112AF; Multani
112B0..112FF; Khudawadi
11300..1137F; Grantha
11400..1147F; Newa
11480..114DF; Tirhuta
11580..115FF; Siddham
11600..1165F; Modi
11660..1167F; Mongolian Supplement
11680..116CF; Takri
11700..1173F; Ahom
11800..1184F; Dogra
118A0..118FF; Warang Citi
11900..1195F; Dives Akuru
119A0..119FF; Nandinagari
11A00..11A4F; Zanabazar Square
11A50..11AAF; Soyombo
11AC0..11AFF; Pau Cin Hau
11C00..11C6F; Bhaiksuki
11C70..11CBF; Marchen
11D00..11D5F; Masaram Gondi
11D60..11DAF; Gunjala Gondi
11EE0..11EFF; Makasar
11FB0..11FBF; Lisu Supplement
11FC0..11FFF; Tamil Supplement
12000..123FF; Cuneiform
12400..1247F; Cuneiform Numbers and Punctuation
12480..1254F; Early Dynastic Cuneiform
13000..1342F; Egyptian Hieroglyphs
13430..1343F; Egyptian Hieroglyph Format Controls
14400..1467F; Anatolian Hieroglyphs
16800..16A3F; Bamum Supplement
16A40..16A6F; Mro
16AD0..16AFF; Bassa Vah
16B00..16B8F; Pahawh Hmong
16E40..16E9F; Medefaidrin
16F00..16F9F; Miao
16FE0..16FFF; Ideographic Symbols and Punctuation
17000..187FF; Tangut
18800..18AFF; Tangut Components
18B00..18CFF; Khitan Small Script
18D00..18D8F; Tangut Supplement
1B000..1B0FF; Kana Supplement
1B100..1B12F; Kana Extended-A
1B130..1B16F; Small Kana Extension
1B170..1B2FF; Nushu
1BC00..1BC9F; Duployan
1BCA0..1BCAF; Shorthand Format Controls
1D000..1D0FF; Byzantine Musical Symbols
1D100..1D1FF; Musical Symbols
1D200..1D24F; Ancient Greek Musical Notation
1D2E0..1D2FF; Mayan Numerals
1D300..1D35F; Tai Xuan Jing Symbols
1D360..1D37F; Counting Rod Numerals
1D400..1D7FF; Mathematical Alphanumeric Symbols
1D800..1DAAF; Sutton SignWriting
1E000..1E02F; Glagolitic Supplement
1E100..1E14F; Nyiakeng Puachue Hmong
1E2C0..1E2FF; Wancho
1E800..1E8DF; Mende Kikakui
1E900..1E95F; Adlam
1EC70..1ECBF; Indic Siyaq Numbers
1ED00..1ED4F; Ottoman Siyaq Numbers
1EE00..1EEFF; Arabic Mathematical Alphabetic Symbols
1F000..1F02F; Mahjong Tiles
1F030..1F09F; Domino Tiles
1F0A0..1F0FF; Playing Cards
1F100..1F1FF; Enclosed Alphanumeric Supplement
1F200..1F2FF; Enclosed Ideographic Supplement
1F300..1F5FF; Miscellaneous Symbols and Pictographs
1F600..1F64F; Emoticons
1F650..1F67F; Ornamental Dingbats
1F680..1F6FF; Transport and Map Symbols
1F700..1F77F; Alchemical Symbols
1F780..1F7FF; Geometric Shapes Extended
1F800..1F8FF; Supplemental Arrows-C
1F900..1F9FF; Supplemental Symbols and Pictographs
1FA00..1FA6F; Chess Symbols
1FA70..1FAFF; Symbols and Pictographs Extended-A
1FB00..1FBFF; Symbols for Legacy Computing
20000..2A6DF; CJK Unified Ideographs Extension B
2A700..2B73F; CJK Unified Ideographs Extension C
2B740..2B81F; CJK Unified Ideographs Extension D
2B820..2CEAF; CJK Unified Ideographs Extension E
2CEB0..2EBEF; CJK Unified Ideographs Extension F
2F800..2FA1F; CJK Compatibility Ideographs Supplement
30000..3134F; CJK Unified Ideographs Extension G
E0000..E007F; Tags
E0100..E01EF; Variation Selectors Supplement
F0000..FFFFF; Supplementary Private Use Area-A
100000..10FFFF; Supplementary Private Use Area-B
# EOF
| {
"pile_set_name": "Github"
} |
package com.vaadin.tests.components.menubar;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.MenuBar;
import com.vaadin.ui.MenuBar.MenuItem;
public class MenuBarPrimaryStylenames extends TestBase {
@Override
protected void setup() {
final MenuBar mainMenu = new MenuBar();
mainMenu.setPrimaryStyleName("my-menu-bar");
MenuItem submenu1 = mainMenu.addItem("Submenu1", null);
submenu1.setStyleName("normal icon-white icon-headphones");
MenuItem item1 = submenu1.addItem("Item1", null);
item1.setCheckable(true);
item1.setStyleName("my-menu-item");
submenu1.addItem("Item2", null);
MenuItem submenu2 = mainMenu.addItem("Submenu2", null);
MenuItem menu1 = submenu2.addItem("Menu1", null);
menu1.addItem("Item11", null);
addComponent(mainMenu);
addComponent(new Button("Change primary stylename",
event -> mainMenu.setPrimaryStyleName("my-other-menu")));
}
@Override
protected String getDescription() {
return "Menubar should support primary stylenames both initially and dynamically";
}
@Override
protected Integer getTicketNumber() {
return 9908;
}
}
| {
"pile_set_name": "Github"
} |
/* Derived from: */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
#include "libm_support.h"
#if LIBM_SVID_COMPAT
int
weak_function
__matherrf(struct exceptionf *x)
{
int n=0;
if(x->arg1!=x->arg1) return 0;
return n;
}
compat_symbol (libm, __matherrf, matherrf, GLIBC_2_2_3);
#endif
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="functions_2.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Loading...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!--
createResults();
--></script>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
<script type="text/javascript"><!--
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Example</title>
<script src="../../dist/modular/js/core.js" type="text/javascript"></script>
<link href="../../dist/modular/css/core.css" rel="stylesheet" type="text/css">
<link href="../../dist/modular/css/checkbox.css" rel="stylesheet" type="text/css">
<link href="../../dist/modular/css/tree.css" rel="stylesheet" type="text/css">
<script src="../../dist/modular/js/checkbox.js"></script>
<script src="../../dist/modular/js/tree.js"></script>
</head>
<body style="padding: 8px;">
<button onclick="tree.checkAll()" class="gj-button-md">Check All</button>
<button onclick="tree.uncheckAll()" class="gj-button-md">Uncheck All</button>
<br/><br/>
<div id="tree" data-source="/Locations/Get"></div>
<script>
var tree = $('#tree').tree({
checkboxes: true
});
tree.on('dataBound', function() {
tree.expandAll();
});
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<!-- 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 law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/text"
android:textSize="20sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/box"
android:layout_weight="1"
android:scrollbars="vertical"/>
/>
</LinearLayout>
| {
"pile_set_name": "Github"
} |
{
"name": "class-validator",
"version": "0.12.2",
"description": "Decorator-based property validation for classes.",
"author": "TypeStack contributors",
"license": "MIT",
"sideEffects": false,
"main": "./cjs/index.js",
"module": "./esm5/index.js",
"es2015": "./esm2015/index.js",
"typings": "./types/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/typestack/class-validator.git"
},
"tags": [
"validator",
"validation",
"decorators",
"typescript"
],
"scripts": {
"build": "npm run build:cjs",
"build:clean": "rimraf build",
"build:es2015": "tsc --project tsconfig.prod.esm2015.json",
"build:esm5": "tsc --project tsconfig.prod.esm5.json",
"build:cjs": "tsc --project tsconfig.prod.cjs.json",
"build:umd": "rollup --config rollup.config.js",
"build:types": "tsc --project tsconfig.prod.types.json",
"prettier:fix": "prettier --write \"**/*.{ts,md}\"",
"prettier:check": "prettier --check \"**/*.{ts,md}\"",
"lint:fix": "eslint --max-warnings 0 --fix --ext .ts src/",
"lint:check": "eslint --max-warnings 0 --ext .ts src/",
"test": "jest --coverage --verbose",
"test:watch": "jest --watch",
"test:ci": "jest --runInBand --no-cache --coverage --verbose"
},
"dependencies": {
"libphonenumber-js": "^1.7.57",
"validator": "^13.1.1"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@types/jest": "^26.0.14",
"@types/node": "^14.6.4",
"@types/validator": "^13.1.0",
"@typescript-eslint/eslint-plugin": "^3.10.1",
"@typescript-eslint/parser": "^3.10.1",
"eslint": "^7.8.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-jest": "^23.20.0",
"husky": "^4.3.0",
"jest": "^26.4.2",
"lint-staged": "^10.4.0",
"prettier": "^2.1.1",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.2",
"rollup": "^2.26.11",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^26.3.0",
"ts-node": "^9.0.0",
"typescript": "^4.0.2"
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<org.aisen.weibo.sina.ui.widget.KitkatViewGroup xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:fab="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" app:insetStatus="?attr/themeColor" app:insetStatusForeground="@color/statusForeground">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/comm_white" android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content"
android:background="#00000000" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<org.aisen.android.ui.widget.AsToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/appbar">
<org.aisen.weibo.sina.ui.widget.TimelineDetailScrollView
android:id="@+id/laySroll"
android:layout_width="match_parent" android:layout_height="match_parent"
android:scrollbars="none">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<RelativeLayout
android:id="@+id/layHeader" android:layout_width="match_parent"
android:layout_height="wrap_content" android:minHeight="100dip"/>
<FrameLayout
android:id="@+id/layBar"
android:layout_width="match_parent" android:layout_height="wrap_content"
>
<View
android:id="@+id/layHeaderDivider"
android:layout_width="match_parent"
android:layout_height="2dip" android:layout_gravity="bottom" android:background="@color/divider_timeline_item"/>
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout" android:layout_width="match_parent"
android:layout_height="wrap_content" app:tabIndicatorColor="?attr/colorPrimary"
/>
<org.aisen.android.ui.widget.MDButton
android:id="@+id/txtAttitudes" style="@style/TextSubhead"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical" android:layout_marginRight="24dip"
android:gravity="center" android:minHeight="30dip"
android:paddingLeft="8dip" android:paddingRight="8dip"
android:textColor="@color/text_54" android:textSize="@dimen/design_tab_text_size"/>
</FrameLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="wrap_content"/>
</LinearLayout>
</org.aisen.weibo.sina.ui.widget.TimelineDetailScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
<org.aisen.weibo.sina.ui.widget.sheetfab.DimOverlayFrameLayout
android:id="@+id/overlay" android:layout_width="match_parent"
android:layout_height="match_parent" android:alpha="0"
android:visibility="gone"/>
</RelativeLayout>
<com.getbase.floatingactionbutton.FloatingActionsMenu
android:id="@+id/action_menu" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_gravity="bottom|right" android:layout_marginBottom="@dimen/fab_spacing" android:layout_marginRight="@dimen/fab_spacing"
android:minHeight="30dip" app:layout_anchor="@id/laySroll"
app:layout_anchorGravity="bottom|right"
fab:fab_addButtonColorNormal="?attr/colorPrimary" fab:fab_addButtonColorPressed="?attr/colorPrimaryDark"
>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/action_a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="?attr/colorPrimary"
fab:fab_colorPressed="?attr/colorPrimaryDark"
fab:fab_icon="@drawable/ic_star"
/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/action_b"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="?attr/colorPrimary"
fab:fab_colorPressed="?attr/colorPrimaryDark"
fab:fab_icon="@drawable/ic_retweet"/>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/action_c"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
fab:fab_colorNormal="?attr/colorPrimary"
fab:fab_colorPressed="?attr/colorPrimaryDark"
fab:fab_icon="@drawable/ic_reply"/>
</com.getbase.floatingactionbutton.FloatingActionsMenu>
</FrameLayout>
</org.aisen.weibo.sina.ui.widget.KitkatViewGroup> | {
"pile_set_name": "Github"
} |
// RUN: %locic %s --interpret > %t
// RUN: FileCheck < %t %s
// CHECK: alignof(byte) = 1
// CHECK: alignof(short) = 2
// CHECK: alignof(int) = 4
// CHECK: alignof(long) = 8
// CHECK: alignof(long long) = 8
// CHECK: alignof(float) = 4
// CHECK: alignof(double) = 8
import void printf(const ubyte * str, ...);
export int main(unused int argc, unused ubyte ** argv) {
printf(C"alignof(byte) = %llu\n", alignof(byte).cast<ulonglong_t>());
printf(C"alignof(short) = %llu\n", alignof(short).cast<ulonglong_t>());
printf(C"alignof(int) = %llu\n", alignof(int).cast<ulonglong_t>());
printf(C"alignof(long) = %llu\n", alignof(long).cast<ulonglong_t>());
printf(C"alignof(long long) = %llu\n", alignof(long long).cast<ulonglong_t>());
printf(C"alignof(float) = %llu\n", alignof(float).cast<ulonglong_t>());
printf(C"alignof(double) = %llu\n", alignof(double).cast<ulonglong_t>());
return 0;
}
| {
"pile_set_name": "Github"
} |
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
******************************************************************************/
package org.deeplearning4j.parallelism;
import lombok.val;
import org.deeplearning4j.BaseDL4JTest;
import org.deeplearning4j.nn.conf.NeuralNetConfiguration;
import org.deeplearning4j.nn.conf.layers.OutputLayer;
import org.deeplearning4j.nn.graph.ComputationGraph;
import org.deeplearning4j.parallelism.inference.InferenceMode;
import org.deeplearning4j.parallelism.inference.LoadBalanceMode;
import org.junit.Test;
import org.nd4j.linalg.activations.Activation;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
import static org.junit.Assert.*;
public class InplaceParallelInferenceTest extends BaseDL4JTest {
@Test
public void testUpdateModel() {
int nIn = 5;
val conf = new NeuralNetConfiguration.Builder()
.graphBuilder()
.addInputs("in")
.layer("out0", new OutputLayer.Builder().nIn(nIn).nOut(4).activation(Activation.SOFTMAX).build(), "in")
.layer("out1", new OutputLayer.Builder().nIn(nIn).nOut(6).activation(Activation.SOFTMAX).build(), "in")
.setOutputs("out0", "out1")
.build();
val net = new ComputationGraph(conf);
net.init();
val pi = new ParallelInference.Builder(net)
.inferenceMode(InferenceMode.INPLACE)
.workers(2)
.build();
try {
assertTrue(pi instanceof InplaceParallelInference);
val models = pi.getCurrentModelsFromWorkers();
assertTrue(models.length > 0);
for (val m : models) {
assertNotNull(m);
assertEquals(net.params(), m.params());
}
val conf2 = new NeuralNetConfiguration.Builder()
.graphBuilder()
.addInputs("in")
.layer("out0", new OutputLayer.Builder().nIn(nIn).nOut(4).activation(Activation.SOFTMAX).build(), "in")
.layer("out1", new OutputLayer.Builder().nIn(nIn).nOut(6).activation(Activation.SOFTMAX).build(), "in")
.layer("out2", new OutputLayer.Builder().nIn(nIn).nOut(8).activation(Activation.SOFTMAX).build(), "in")
.setOutputs("out0", "out1", "out2")
.build();
val net2 = new ComputationGraph(conf2);
net2.init();
assertNotEquals(net.params(), net2.params());
pi.updateModel(net2);
val models2 = pi.getCurrentModelsFromWorkers();
assertTrue(models2.length > 0);
for (val m : models2) {
assertNotNull(m);
assertEquals(net2.params(), m.params());
}
} finally {
pi.shutdown();
}
}
@Test
public void testOutput_RoundRobin_1() throws Exception {
int nIn = 5;
val conf = new NeuralNetConfiguration.Builder()
.graphBuilder()
.addInputs("in")
.layer("out0", new OutputLayer.Builder().nIn(nIn).nOut(4).activation(Activation.SOFTMAX).build(), "in")
.layer("out1", new OutputLayer.Builder().nIn(nIn).nOut(6).activation(Activation.SOFTMAX).build(), "in")
.setOutputs("out0", "out1")
.build();
val net = new ComputationGraph(conf);
net.init();
val pi = new ParallelInference.Builder(net)
.inferenceMode(InferenceMode.INPLACE)
.loadBalanceMode(LoadBalanceMode.ROUND_ROBIN)
.workers(2)
.build();
try {
val result0 = pi.output(new INDArray[]{Nd4j.create(new double[]{1.0, 2.0, 3.0, 4.0, 5.0}, new long[]{1, 5})}, null)[0];
val result1 = pi.output(new INDArray[]{Nd4j.create(new double[]{1.0, 2.0, 3.0, 4.0, 5.0}, new long[]{1, 5})}, null)[0];
assertNotNull(result0);
assertEquals(result0, result1);
} finally {
pi.shutdown();
}
}
@Test
public void testOutput_FIFO_1() throws Exception {
int nIn = 5;
val conf = new NeuralNetConfiguration.Builder()
.graphBuilder()
.addInputs("in")
.layer("out0", new OutputLayer.Builder().nIn(nIn).nOut(4).activation(Activation.SOFTMAX).build(), "in")
.layer("out1", new OutputLayer.Builder().nIn(nIn).nOut(6).activation(Activation.SOFTMAX).build(), "in")
.setOutputs("out0", "out1")
.build();
val net = new ComputationGraph(conf);
net.init();
val pi = new ParallelInference.Builder(net)
.inferenceMode(InferenceMode.INPLACE)
.loadBalanceMode(LoadBalanceMode.FIFO)
.workers(2)
.build();
try {
val result0 = pi.output(new INDArray[]{Nd4j.create(new double[]{1.0, 2.0, 3.0, 4.0, 5.0}, new long[]{1, 5})}, null)[0];
val result1 = pi.output(new INDArray[]{Nd4j.create(new double[]{1.0, 2.0, 3.0, 4.0, 5.0}, new long[]{1, 5})}, null)[0];
assertNotNull(result0);
assertEquals(result0, result1);
} finally {
pi.shutdown();
}
}
} | {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>NodeEditDialog</class>
<widget class="QDialog" name="NodeEditDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>464</width>
<height>280</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>450</width>
<height>280</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>500</width>
<height>300</height>
</size>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="windowTitle">
<string>Node Properties</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Node label </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="labelEdit">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_3">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Node value (disabled)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLineEdit" name="valueEdit">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Node shape</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QRadioButton" name="boxRadio">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../src.qrc">
<normaloff>:/images/box.png</normaloff>:/images/box.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="circleRadio">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../src.qrc">
<normaloff>:/images/circle.png</normaloff>:/images/circle.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="diamondRadio">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../src.qrc">
<normaloff>:/images/diamond.png</normaloff>:/images/diamond.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="ellipseRadio">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../src.qrc">
<normaloff>:/images/ellipse.png</normaloff>:/images/ellipse.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="triangleRadio">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../src.qrc">
<normaloff>:/images/triangle.png</normaloff>:/images/triangle.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="1">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Node color (click the button to select)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="colorButton">
<property name="minimumSize">
<size>
<width>60</width>
<height>25</height>
</size>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>...</string>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Node size (default 8)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QSpinBox" name="sizeSpin">
<property name="font">
<font>
<family>DejaVu Sans</family>
<pointsize>11</pointsize>
</font>
</property>
<property name="value">
<number>8</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../src.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>NodeEditDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>233</x>
<y>316</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>NodeEditDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>301</x>
<y>322</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
| {
"pile_set_name": "Github"
} |
namespace Outracks
{
public struct GlWindowPixels : INumeric<GlWindowPixels>
{
public readonly int Value;
public GlWindowPixels(int value)
{
Value = value;
}
public static implicit operator GlWindowPixels(int value)
{
return new GlWindowPixels(value);
}
public static implicit operator int(GlWindowPixels pixels)
{
return (int)pixels.Value;
}
public static bool operator ==(GlWindowPixels left, GlWindowPixels right)
{
return left.Equals(right);
}
public static bool operator !=(GlWindowPixels left, GlWindowPixels right)
{
return !(left == right);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
return obj is GlWindowPixels && Equals((GlWindowPixels)obj);
}
public override int GetHashCode()
{
return Value.GetHashCode();
}
public bool Equals(GlWindowPixels other)
{
return Value.Equals(other.Value);
}
public int CompareTo(GlWindowPixels other)
{
return Value.CompareTo(other);
}
public override string ToString()
{
return Value + "c";
}
public GlWindowPixels Add(GlWindowPixels other)
{
return new GlWindowPixels(Value + other.Value);
}
public GlWindowPixels Inverse()
{
return new GlWindowPixels(-Value);
}
public GlWindowPixels Zero
{
get { return new GlWindowPixels(0); }
}
public GlWindowPixels Mul(GlWindowPixels other)
{
return new GlWindowPixels(Value * other.Value);
}
public GlWindowPixels One
{
get { return new GlWindowPixels(1); }
}
public GlWindowPixels Reciprocal()
{
return new GlWindowPixels(1 / Value);
}
public GlWindowPixels FromDouble(double value)
{
return new GlWindowPixels((int)value);
}
public double ToDouble()
{
return Value;
}
}
} | {
"pile_set_name": "Github"
} |
Error ------------------------------------------------------------------------------------------------ downstream.js:5:2
Cannot cast `inexact` to object type because inexact frozen object literal [1] is incompatible with exact object
type [2]. [incompatible-exact]
downstream.js:5:2
5| (inexact: {||}); // error: inexact -> exact
^^^^^^^
References:
object_freeze.js:33:26
33| inexact: Object.freeze({...inexact}),
^^^^^^^^^^^^ [1]
downstream.js:5:11
5| (inexact: {||}); // error: inexact -> exact
^^^^ [2]
Error ------------------------------------------------------------------------------------------------ downstream.js:7:9
Cannot assign `0` to `inexact.p` because property `p` is not writable. [cannot-write]
7| inexact.p = 0; // error: can't set prop on frozen object
^
Error --------------------------------------------------------------------------------------------- object_freeze.js:4:5
Cannot assign `'23456'` to `foo.bar` because property `bar` is not writable. [cannot-write]
4| foo.bar = '23456'; // error
^^^
Error --------------------------------------------------------------------------------------------- object_freeze.js:6:1
Incorrect arguments passed to call of method `assign` because property `bar` is not writable. [cannot-write]
6| Object.assign(foo, {bar: '12345'}); // error
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error -------------------------------------------------------------------------------------------- object_freeze.js:10:8
Cannot assign `'23456'` to `bliffl.bar` because property `bar` is not writable. [cannot-write]
10| bliffl.bar = '23456'; // error
^^^
Error -------------------------------------------------------------------------------------------- object_freeze.js:11:8
Cannot assign `3456` to `bliffl.baz` because property `baz` is not writable. [cannot-write]
11| bliffl.baz = 3456; // error
^^^
Error -------------------------------------------------------------------------------------------- object_freeze.js:12:8
Cannot get `bliffl.corge` because property `corge` is missing in frozen object literal [1]. [prop-missing]
object_freeze.js:12:8
12| bliffl.corge; // error
^^^^^
References:
object_freeze.js:9:28
9| var bliffl = Object.freeze({bar: '12345', ...baz});
^^^^^^^^^^^^^^^^^^^^^^ [1]
Error -------------------------------------------------------------------------------------------- object_freeze.js:13:8
Cannot assign `baz` to `bliffl.constructor` because property `constructor` is not writable. [cannot-write]
13| bliffl.constructor = baz; // error
^^^^^^^^^^^
Error -------------------------------------------------------------------------------------------- object_freeze.js:14:8
Cannot assign function to `bliffl.toString` because property `toString` is not writable. [cannot-write]
14| bliffl.toString = function() {}; // error
^^^^^^^^
Error ------------------------------------------------------------------------------------------- object_freeze.js:20:45
Cannot assign `Object.freeze(...)` to `xx` because string [1] is incompatible with number [2] in property `x`.
[incompatible-type]
object_freeze.js:20:45
20| var xx : { x: number } = Object.freeze({ x: "error" })
^^^^^^^ [1]
References:
object_freeze.js:20:15
20| var xx : { x: number } = Object.freeze({ x: "error" })
^^^^^^ [2]
Error -------------------------------------------------------------------------------------------- object_freeze.js:30:2
Cannot cast `Object.freeze(...)` to object type because inexact frozen object literal [1] is incompatible with exact
object type [2]. [incompatible-exact]
object_freeze.js:30:2
30| (Object.freeze({...inexact}): {||}); // Error: inexact -> exact
^^^^^^^^^^^^^^^^^^^^^^^^^^^
References:
object_freeze.js:30:16
30| (Object.freeze({...inexact}): {||}); // Error: inexact -> exact
^^^^^^^^^^^^ [1]
object_freeze.js:30:31
30| (Object.freeze({...inexact}): {||}); // Error: inexact -> exact
^^^^ [2]
Found 11 errors
| {
"pile_set_name": "Github"
} |
Gonum LAPACK [](https://godoc.org/gonum.org/v1/gonum/lapack)
======
A collection of packages to provide LAPACK functionality for the Go programming
language (http://golang.org). This provides a partial implementation in native go
and a wrapper using cgo to a c-based implementation.
## Installation
```
go get gonum.org/v1/gonum/lapack/...
```
## Packages
### lapack
Defines the LAPACK API based on http://www.netlib.org/lapack/lapacke.html
### lapack/gonum
Go implementation of the LAPACK API (incomplete, implements the `float64` API).
### lapack/lapack64
Wrappers for an implementation of the double (i.e., `float64`) precision real parts of
the LAPACK API.
| {
"pile_set_name": "Github"
} |
{
stdenv,
fetchFromGitHub,
buildPythonPackage,
pytest,
}:
buildPythonPackage rec {
pname = "itypes";
version = "1.2.0";
src = fetchFromGitHub {
repo = pname;
owner = "tomchristie";
rev = version;
sha256 = "1ljhjp9pacbrv2phs58vppz1dlxix01p98kfhyclvbml6dgjcr52";
};
checkInputs = [ pytest ];
checkPhase = ''
mv itypes.py itypes.py.hidden
pytest tests.py
'';
meta = with stdenv.lib; {
description = "Simple immutable types for python";
homepage = "https://github.com/tomchristie/itypes";
license = licenses.bsd3;
maintainers = with maintainers; [ ivegotasthma ];
};
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="score"
type="com.renyu.databindingdemo.model.Score">
</variable>
<variable
name="act"
type="com.renyu.databindingdemo.CommonMethodActivity">
</variable>
</data>
<LinearLayout
android:id="@+id/layout_commonmethod"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:onClick="@{() -> act.showToastValue(score.name)}"
android:text="点击"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</layout>
| {
"pile_set_name": "Github"
} |
<?php
namespace TYPO3Fluid\Fluid\Core\ViewHelper\Traits;
use TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler;
use TYPO3Fluid\Fluid\Core\Compiler\ViewHelperCompiler;
use TYPO3Fluid\Fluid\Core\Exception;
use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode;
/**
* Class CompilableWithContentArgumentAndRenderStatic
*
* Provides default methods for rendering and compiling
* any ViewHelper that conforms to the `renderStatic`
* method pattern but has the added common use case that
* an argument value must be checked and used instead of
* the normal render children closure, if that named
* argument is specified and not empty.
*/
trait CompileWithContentArgumentAndRenderStatic
{
/**
* Name of variable that contains the value to use
* instead of render children closure, if specified.
* If no name is provided here, the first variable
* registered in `initializeArguments` of the ViewHelper
* will be used.
*
* Note: it is significantly better practice to define
* this property in your ViewHelper class and so fix it
* to one particular argument instead of resolving,
* especially when your ViewHelper is called multiple
* times within an uncompiled template!
*
* @var string
*/
protected $contentArgumentName;
/**
* Default render method to render ViewHelper with
* first defined optional argument as content.
*
* @return mixed Rendered result
* @api
*/
public function render()
{
return static::renderStatic(
$this->arguments,
$this->buildRenderChildrenClosure(),
$this->renderingContext
);
}
/**
* @param string $argumentsName
* @param string $closureName
* @param string $initializationPhpCode
* @param ViewHelperNode $node
* @param TemplateCompiler $compiler
* @return string
*/
public function compile(
$argumentsName,
$closureName,
&$initializationPhpCode,
ViewHelperNode $node,
TemplateCompiler $compiler
) {
list ($initialization, $execution) = ViewHelperCompiler::getInstance()->compileWithCallToStaticMethod(
$this,
$argumentsName,
$closureName,
ViewHelperCompiler::RENDER_STATIC,
static::class
);
$contentArgumentName = $this->resolveContentArgumentName();
$initializationPhpCode .= sprintf(
'%s = (%s[\'%s\'] !== null) ? function() use (%s) { return %s[\'%s\']; } : %s;',
$closureName,
$argumentsName,
$contentArgumentName,
$argumentsName,
$argumentsName,
$contentArgumentName,
$closureName
);
$initializationPhpCode .= $initialization;
return $execution;
}
/**
* Helper which is mostly needed when calling renderStatic() from within
* render().
*
* No public API yet.
*
* @return \Closure
*/
protected function buildRenderChildrenClosure()
{
$argumentName = $this->resolveContentArgumentName();
$arguments = $this->arguments;
if (!empty($argumentName) && isset($arguments[$argumentName])) {
$renderChildrenClosure = function () use ($arguments, $argumentName) {
return $arguments[$argumentName];
};
} else {
$self = clone $this;
$renderChildrenClosure = function () use ($self) {
return $self->renderChildren();
};
}
return $renderChildrenClosure;
}
/**
* @return string
*/
protected function resolveContentArgumentName()
{
if (empty($this->contentArgumentName)) {
$registeredArguments = call_user_func_array([$this, 'prepareArguments'], []);
foreach ($registeredArguments as $registeredArgument) {
if (!$registeredArgument->isRequired()) {
$this->contentArgumentName = $registeredArgument->getName();
return $this->contentArgumentName;
}
}
throw new Exception(
sprintf('Attempting to compile %s failed. Chosen compile method requires that ViewHelper has ' .
'at least one registered and optional argument', __CLASS__)
);
}
return $this->contentArgumentName;
}
}
| {
"pile_set_name": "Github"
} |
#!/bin/sh
cd mman-win32
./configure && make
cd ..
make -f Makefile.windows clean
make -f Makefile.windows USE_HEATSHRINK="yes" GZIP_COMPRESSION="no"
| {
"pile_set_name": "Github"
} |
var path = require('path');
var url = require('url');
function rebaseRemoteMap(sourceMap, sourceUri) {
var sourceDirectory = path.dirname(sourceUri);
sourceMap.sources = sourceMap.sources.map(function(source) {
return url.resolve(sourceDirectory, source);
});
return sourceMap;
}
module.exports = rebaseRemoteMap;
| {
"pile_set_name": "Github"
} |
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils multilib
#Crazy name, issue https://code.google.com/p/armitage/issues/detail?id=165
MY_PV="141120"
MY_PN="armitage"
DESCRIPTION="Cyber Attack Management for Metasploit"
HOMEPAGE="http://www.fastandeasyhacking.com/"
SRC_URI="http://www.fastandeasyhacking.com/download/${MY_PN}${MY_PV}.tgz"
LICENSE="BSD"
SLOT="0"
#KEYWORDS="~amd64 ~arm ~x86" # Requires metasploit, which is dropped
PDEPEND="net-analyzer/metasploit
net-analyzer/nmap
virtual/jre"
DEPEND="!net-analyzer/armitage"
S="${WORKDIR}/${MY_PN}"
src_prepare() {
# use armitage dir for the .store file
sed -i -e "s:rm -f:mkdir ~/.${MY_PN}; rm -f:" teamserver
sed -i -e "s:./armitage.store:~/.${MY_PN}/${MY_PN}.store:" teamserver
sed -i -e "s:armitage.jar:/usr/$(get_libdir)/${MY_PN}/${MY_PN}.jar:" teamserver
sed -i -e "s:armitage.jar:/usr/$(get_libdir)/${MY_PN}/${MY_PN}.jar:" armitage
}
src_install() {
dobin ${MY_PN}
dosbin teamserver
doicon ${MY_PN}-logo.png
insinto /usr/$(get_libdir)/${MY_PN}/
doins ${MY_PN}.jar cortana.jar
dodoc readme.txt
}
| {
"pile_set_name": "Github"
} |
/* Soot - a J*va Optimization Framework
* Copyright (C) 1997 Clark Verbrugge
*
* 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
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the Sable Research Group and others 1997-1999.
* See the 'credits' file distributed with Soot for the complete list of
* contributors. (Soot is distributed at http://www.sable.mcgill.ca/soot)
*/
package soot.coffi;
/** Instruction subclasses are used to represent parsed bytecode; each
* bytecode operation has a corresponding subclass of Instruction.
* <p>
* Each subclass is derived from one of
* <ul><li>Instruction</li>
* <li>Instruction_noargs (an Instruction with no embedded arguments)</li>
* <li>Instruction_byte (an Instruction with a single byte data argument)</li>
* <li>Instruction_bytevar (a byte argument specifying a local variable)</li>
* <li>Instruction_byteindex (a byte argument specifying a constant pool index)</li>
* <li>Instruction_int (an Instruction with a single short data argument)</li>
* <li>Instruction_intvar (a short argument specifying a local variable)</li>
* <li>Instruction_intindex (a short argument specifying a constant pool index)</li>
* <li>Instruction_intbranch (a short argument specifying a code offset)</li>
* <li>Instruction_longbranch (an int argument specifying a code offset)</li>
* </ul>
* @author Clark Verbrugge
* @see Instruction
* @see Instruction_noargs
* @see Instruction_byte
* @see Instruction_bytevar
* @see Instruction_byteindex
* @see Instruction_int
* @see Instruction_intvar
* @see Instruction_intindex
* @see Instruction_intbranch
* @see Instruction_longbranch
* @see Instruction_Unknown
*/
class Instruction_Sipush extends Instruction_int {
public Instruction_Sipush() { super((byte)ByteCode.SIPUSH); name = "sipush"; }
public Instruction_Sipush(int i) { this(); arg_i = i; }
}
| {
"pile_set_name": "Github"
} |
from . import compress_common
from . import encrypt_common
compress = compress_common.compress
decompress = compress_common.decompress
encrypt = encrypt_common.encrypt
decrypt = encrypt_common.decrypt
init_crypto = encrypt_common.init
get_encryption_signature = encrypt_common.get_encryption_signature
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2013 Apple 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JSValueInternal_h
#define JSValueInternal_h
#import <JavaScriptCore/JavaScriptCore.h>
#import <JavaScriptCore/JSValue.h>
#if JSC_OBJC_API_ENABLED
@interface JSValue(Internal)
JSValueRef valueInternalValue(JSValue *);
- (JSValue *)initWithValue:(JSValueRef)value inContext:(JSContext *)context;
JSValueRef objectToValue(JSContext *, id);
id valueToObject(JSContext *, JSValueRef);
id valueToNumber(JSGlobalContextRef, JSValueRef, JSValueRef* exception);
id valueToString(JSGlobalContextRef, JSValueRef, JSValueRef* exception);
id valueToDate(JSGlobalContextRef, JSValueRef, JSValueRef* exception);
id valueToArray(JSGlobalContextRef, JSValueRef, JSValueRef* exception);
id valueToDictionary(JSGlobalContextRef, JSValueRef, JSValueRef* exception);
+ (SEL)selectorForStructToValue:(const char *)structTag;
+ (SEL)selectorForValueToStruct:(const char *)structTag;
@end
NSInvocation *typeToValueInvocationFor(const char* encodedType);
NSInvocation *valueToTypeInvocationFor(const char* encodedType);
#endif
#endif // JSValueInternal_h
| {
"pile_set_name": "Github"
} |
/*
* db - main command loop and error/interrupt handling
*/
#include "defs.h"
#include "fns.h"
int wtflag = OREAD;
BOOL kflag;
BOOL mkfault;
ADDR maxoff;
int xargc; /* bullshit */
extern BOOL executing;
extern int infile;
int exitflg;
extern int eof;
int alldigs(char*);
void fault(void*, char*);
extern char *Ipath;
jmp_buf env;
static char *errmsg;
void
main(int argc, char **argv)
{
char b1[100];
char b2[100];
char *s;
char *name;
name = 0;
outputinit();
maxoff = MAXOFF;
ARGBEGIN{
case 'k':
kflag = 1;
break;
case 'w':
wtflag = ORDWR; /* suitable for open() */
break;
case 'I':
s = ARGF();
if(s == 0)
dprint("missing -I argument\n");
else
Ipath = s;
break;
case 'm':
name = ARGF();
if(name == 0)
dprint("missing -m argument\n");
break;
}ARGEND
symfil = 0;
corfil = 0;
if (argc > 0 && !alldigs(argv[0])) {
symfil = argv[0];
argv++;
argc--;
}
if(argc==1 && alldigs(argv[0])){
char *cpu, *p, *q;
pid = atoi(argv[0]);
pcsactive = 0;
if (!symfil) {
if(kflag){
cpu = getenv("cputype");
if(cpu == 0){
cpu = "386";
dprint("$cputype not set; assuming %s\n", cpu);
}
p = getenv("terminal");
if(p==0 || (p=strchr(p, ' '))==0 || p[1]==' ' || p[1]==0){
strcpy(b1, "/386/9pc");
dprint("missing or bad $terminal; assuming %s\n", b1);
}else{
p++;
q = strchr(p, ' ');
if(q)
*q = 0;
sprint(b1, "/%s/9%s", cpu, p);
}
}else
sprint(b1, "/proc/%s/text", argv[0]);
symfil = b1;
}
sprint(b2, "/proc/%s/mem", argv[0]);
corfil = b2;
} else if (argc > 0) {
fprint(2, "Usage: db [-kw] [-m machine] [-I dir] [symfile] [pid]\n");
exits("usage");
}
if (!symfil)
symfil = "8.out";
xargc = argc;
notify(fault);
setsym();
dotmap = dumbmap(-1);
if (name && machbyname(name) == 0)
dprint("unknown machine %s\n", name);
dprint("%s binary\n", mach->name);
if(setjmp(env) == 0){
if (corfil) {
setcor(); /* could get error */
dprint("%s\n", machdata->excep(cormap, rget));
printpc();
}
}
setjmp(env);
if (executing)
delbp();
executing = FALSE;
for (;;) {
flushbuf();
if (errmsg) {
dprint(errmsg);
printc('\n');
errmsg = 0;
exitflg = 0;
}
if (mkfault) {
mkfault=0;
printc('\n');
prints(DBNAME);
}
clrinp();
rdc();
reread();
if (eof) {
if (infile == STDIN)
done();
iclose(-1, 0);
eof = 0;
longjmp(env, 1);
}
exitflg = 0;
command(0, 0);
reread();
if (rdc() != '\n')
error("newline expected");
}
}
int
alldigs(char *s)
{
while(*s){
if(*s<'0' || '9'<*s)
return 0;
s++;
}
return 1;
}
void
done(void)
{
if (pid)
endpcs();
exits(exitflg? "error": 0);
}
/*
* An error occurred; save the message for later printing,
* close open files, and reset to main command loop.
*/
void
error(char *n)
{
errmsg = n;
iclose(0, 1);
oclose();
flush();
delbp();
ending = 0;
longjmp(env, 1);
}
void
errors(char *m, char *n)
{
static char buf[128];
sprint(buf, "%s: %s", m, n);
error(buf);
}
/*
* An interrupt occurred;
* seek to the end of the current file
* and remember that there was a fault.
*/
void
fault(void *a, char *s)
{
USED(a);
if(strncmp(s, "interrupt", 9) == 0){
seek(infile, 0L, 2);
mkfault++;
noted(NCONT);
}
noted(NDFLT);
}
| {
"pile_set_name": "Github"
} |
// PowerShell completions are based on the amazing work from clap:
// https://github.com/clap-rs/clap/blob/3294d18efe5f264d12c9035f404c7d189d4824e1/src/completions/powershell.rs
//
// The generated scripts require PowerShell v5.0+ (which comes Windows 10, but
// can be downloaded separately for windows 7 or 8.1).
package cobra
import (
"bytes"
"fmt"
"io"
"os"
"strings"
"github.com/spf13/pflag"
)
var powerShellCompletionTemplate = `using namespace System.Management.Automation
using namespace System.Management.Automation.Language
Register-ArgumentCompleter -Native -CommandName '%s' -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
$commandElements = $commandAst.CommandElements
$command = @(
'%s'
for ($i = 1; $i -lt $commandElements.Count; $i++) {
$element = $commandElements[$i]
if ($element -isnot [StringConstantExpressionAst] -or
$element.StringConstantType -ne [StringConstantType]::BareWord -or
$element.Value.StartsWith('-')) {
break
}
$element.Value
}
) -join ';'
$completions = @(switch ($command) {%s
})
$completions.Where{ $_.CompletionText -like "$wordToComplete*" } |
Sort-Object -Property ListItemText
}`
func generatePowerShellSubcommandCases(out io.Writer, cmd *Command, previousCommandName string) {
var cmdName string
if previousCommandName == "" {
cmdName = cmd.Name()
} else {
cmdName = fmt.Sprintf("%s;%s", previousCommandName, cmd.Name())
}
fmt.Fprintf(out, "\n '%s' {", cmdName)
cmd.Flags().VisitAll(func(flag *pflag.Flag) {
if nonCompletableFlag(flag) {
return
}
usage := escapeStringForPowerShell(flag.Usage)
if len(flag.Shorthand) > 0 {
fmt.Fprintf(out, "\n [CompletionResult]::new('-%s', '%s', [CompletionResultType]::ParameterName, '%s')", flag.Shorthand, flag.Shorthand, usage)
}
fmt.Fprintf(out, "\n [CompletionResult]::new('--%s', '%s', [CompletionResultType]::ParameterName, '%s')", flag.Name, flag.Name, usage)
})
for _, subCmd := range cmd.Commands() {
usage := escapeStringForPowerShell(subCmd.Short)
fmt.Fprintf(out, "\n [CompletionResult]::new('%s', '%s', [CompletionResultType]::ParameterValue, '%s')", subCmd.Name(), subCmd.Name(), usage)
}
fmt.Fprint(out, "\n break\n }")
for _, subCmd := range cmd.Commands() {
generatePowerShellSubcommandCases(out, subCmd, cmdName)
}
}
func escapeStringForPowerShell(s string) string {
return strings.Replace(s, "'", "''", -1)
}
// GenPowerShellCompletion generates PowerShell completion file and writes to the passed writer.
func (c *Command) GenPowerShellCompletion(w io.Writer) error {
buf := new(bytes.Buffer)
var subCommandCases bytes.Buffer
generatePowerShellSubcommandCases(&subCommandCases, c, "")
fmt.Fprintf(buf, powerShellCompletionTemplate, c.Name(), c.Name(), subCommandCases.String())
_, err := buf.WriteTo(w)
return err
}
// GenPowerShellCompletionFile generates PowerShell completion file.
func (c *Command) GenPowerShellCompletionFile(filename string) error {
outFile, err := os.Create(filename)
if err != nil {
return err
}
defer outFile.Close()
return c.GenPowerShellCompletion(outFile)
}
| {
"pile_set_name": "Github"
} |
[/Script/MacTargetPlatform.MacTargetSettings]
;AudioSampleRate=48000
;AudioMaxChannels=32
;AudioCallbackBufferFrameSize=1024
;AudioNumBuffersToEnqueue=2
;AudioNumSourceWorkers=0
| {
"pile_set_name": "Github"
} |
/*
* 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*!
* Copyright (c) 2015 by Contributors
* \file sequence_mask.cu
* \brief
* \author Sebastian Bodenstein
*/
#include "./sequence_mask-inl.h"
namespace mxnet {
namespace op {
// (seqlen, batch, rest) case
template <int req>
struct SequenceMask0GPUKernel {
template <typename DType, typename IType>
MSHADOW_XINLINE static void Map(int i, DType *in, const IType *idx,
index_t max_s_len, index_t batch_size,
index_t restsize, DType value) {
index_t batch = i / restsize % batch_size;
const index_t seqpos = static_cast<int>(idx[batch]);
index_t seq = i / restsize / batch_size;
if (seq >= seqpos) {
KERNEL_ASSIGN(in[i], req, value);
}
}
};
// (batch, seqlen, rest) case
template <int req>
struct SequenceMask1GPUKernel {
template <typename DType, typename IType>
MSHADOW_XINLINE static void Map(int i, DType *in, const IType *idx,
index_t max_s_len, index_t batch_size,
index_t restsize, DType value) {
index_t batch = i / restsize / max_s_len;
const index_t seqpos = static_cast<int>(idx[batch]);
index_t seq = i / restsize % max_s_len;
if (seq >= seqpos) {
KERNEL_ASSIGN(in[i], req, value);
}
}
};
template<typename DType, typename IType>
void SequenceMaskExec(
const mshadow::Tensor<gpu, 3, DType> &data,
const mshadow::Tensor<gpu, 1, IType> &indices,
const OpReqType req, mshadow::Stream<gpu> *const s,
int axis, DType val) {
using namespace mshadow;
using namespace mshadow::expr;
using namespace mxnet_op;
index_t batch = indices.size(0);
index_t max_seq_len = data.size(axis);
index_t restsize = data.size(2);
MXNET_ASSIGN_REQ_SWITCH(req, req_type, {
if (axis == 1) {
Kernel<SequenceMask1GPUKernel<req_type>, gpu>::Launch(
s, data.shape_.Size(), data.dptr_, indices.dptr_, max_seq_len, batch, restsize,
val);
} else {
Kernel<SequenceMask0GPUKernel<req_type>, gpu>::Launch(
s, data.shape_.Size(), data.dptr_, indices.dptr_, max_seq_len, batch, restsize,
val);
}
});
}
template <> Operator *CreateOp<gpu>(SequenceMaskParam param, int dtype, int itype) {
Operator *op = nullptr;
MSHADOW_TYPE_SWITCH(dtype, DType, {
MSHADOW_TYPE_SWITCH(itype, IType, {
op = new SequenceMaskOp<gpu, DType, IType>(param);
});
});
return op;
}
} // namespace op
} // namespace mxnet
| {
"pile_set_name": "Github"
} |
// G:\quake2\baseq2\models/monsters/boss2
// This file generated by ModelGen - Do NOT Modify
#define FRAME_stand30 0
#define FRAME_stand31 1
#define FRAME_stand32 2
#define FRAME_stand33 3
#define FRAME_stand34 4
#define FRAME_stand35 5
#define FRAME_stand36 6
#define FRAME_stand37 7
#define FRAME_stand38 8
#define FRAME_stand39 9
#define FRAME_stand40 10
#define FRAME_stand41 11
#define FRAME_stand42 12
#define FRAME_stand43 13
#define FRAME_stand44 14
#define FRAME_stand45 15
#define FRAME_stand46 16
#define FRAME_stand47 17
#define FRAME_stand48 18
#define FRAME_stand49 19
#define FRAME_stand50 20
#define FRAME_stand1 21
#define FRAME_stand2 22
#define FRAME_stand3 23
#define FRAME_stand4 24
#define FRAME_stand5 25
#define FRAME_stand6 26
#define FRAME_stand7 27
#define FRAME_stand8 28
#define FRAME_stand9 29
#define FRAME_stand10 30
#define FRAME_stand11 31
#define FRAME_stand12 32
#define FRAME_stand13 33
#define FRAME_stand14 34
#define FRAME_stand15 35
#define FRAME_stand16 36
#define FRAME_stand17 37
#define FRAME_stand18 38
#define FRAME_stand19 39
#define FRAME_stand20 40
#define FRAME_stand21 41
#define FRAME_stand22 42
#define FRAME_stand23 43
#define FRAME_stand24 44
#define FRAME_stand25 45
#define FRAME_stand26 46
#define FRAME_stand27 47
#define FRAME_stand28 48
#define FRAME_stand29 49
#define FRAME_walk1 50
#define FRAME_walk2 51
#define FRAME_walk3 52
#define FRAME_walk4 53
#define FRAME_walk5 54
#define FRAME_walk6 55
#define FRAME_walk7 56
#define FRAME_walk8 57
#define FRAME_walk9 58
#define FRAME_walk10 59
#define FRAME_walk11 60
#define FRAME_walk12 61
#define FRAME_walk13 62
#define FRAME_walk14 63
#define FRAME_walk15 64
#define FRAME_walk16 65
#define FRAME_walk17 66
#define FRAME_walk18 67
#define FRAME_walk19 68
#define FRAME_walk20 69
#define FRAME_attack1 70
#define FRAME_attack2 71
#define FRAME_attack3 72
#define FRAME_attack4 73
#define FRAME_attack5 74
#define FRAME_attack6 75
#define FRAME_attack7 76
#define FRAME_attack8 77
#define FRAME_attack9 78
#define FRAME_attack10 79
#define FRAME_attack11 80
#define FRAME_attack12 81
#define FRAME_attack13 82
#define FRAME_attack14 83
#define FRAME_attack15 84
#define FRAME_attack16 85
#define FRAME_attack17 86
#define FRAME_attack18 87
#define FRAME_attack19 88
#define FRAME_attack20 89
#define FRAME_attack21 90
#define FRAME_attack22 91
#define FRAME_attack23 92
#define FRAME_attack24 93
#define FRAME_attack25 94
#define FRAME_attack26 95
#define FRAME_attack27 96
#define FRAME_attack28 97
#define FRAME_attack29 98
#define FRAME_attack30 99
#define FRAME_attack31 100
#define FRAME_attack32 101
#define FRAME_attack33 102
#define FRAME_attack34 103
#define FRAME_attack35 104
#define FRAME_attack36 105
#define FRAME_attack37 106
#define FRAME_attack38 107
#define FRAME_attack39 108
#define FRAME_attack40 109
#define FRAME_pain2 110
#define FRAME_pain3 111
#define FRAME_pain4 112
#define FRAME_pain5 113
#define FRAME_pain6 114
#define FRAME_pain7 115
#define FRAME_pain8 116
#define FRAME_pain9 117
#define FRAME_pain10 118
#define FRAME_pain11 119
#define FRAME_pain12 120
#define FRAME_pain13 121
#define FRAME_pain14 122
#define FRAME_pain15 123
#define FRAME_pain16 124
#define FRAME_pain17 125
#define FRAME_pain18 126
#define FRAME_pain19 127
#define FRAME_pain20 128
#define FRAME_pain21 129
#define FRAME_pain22 130
#define FRAME_pain23 131
#define FRAME_death2 132
#define FRAME_death3 133
#define FRAME_death4 134
#define FRAME_death5 135
#define FRAME_death6 136
#define FRAME_death7 137
#define FRAME_death8 138
#define FRAME_death9 139
#define FRAME_death10 140
#define FRAME_death11 141
#define FRAME_death12 142
#define FRAME_death13 143
#define FRAME_death14 144
#define FRAME_death15 145
#define FRAME_death16 146
#define FRAME_death17 147
#define FRAME_death18 148
#define FRAME_death19 149
#define FRAME_death20 150
#define FRAME_death21 151
#define FRAME_death22 152
#define FRAME_death23 153
#define FRAME_death24 154
#define FRAME_death25 155
#define FRAME_death26 156
#define FRAME_death27 157
#define FRAME_death28 158
#define FRAME_death29 159
#define FRAME_death30 160
#define FRAME_death31 161
#define FRAME_death32 162
#define FRAME_death33 163
#define FRAME_death34 164
#define FRAME_death35 165
#define FRAME_death36 166
#define FRAME_death37 167
#define FRAME_death38 168
#define FRAME_death39 169
#define FRAME_death40 170
#define FRAME_death41 171
#define FRAME_death42 172
#define FRAME_death43 173
#define FRAME_death44 174
#define FRAME_death45 175
#define FRAME_death46 176
#define FRAME_death47 177
#define FRAME_death48 178
#define FRAME_death49 179
#define FRAME_death50 180
#define MODEL_SCALE 1.000000
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.